]> Pileus Git - ~andy/gtk/blob - gdk/wayland/gdkprivate-wayland.h
73810cacdaba0b46291d3ac678dcc2a9934d7ad1
[~andy/gtk] / gdk / wayland / gdkprivate-wayland.h
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 /*
19  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
20  * file for a list of people on the GTK+ Team.  See the ChangeLog
21  * files for a list of changes.  These files are distributed with
22  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
23  */
24
25 /*
26  * Private uninstalled header defining things local to X windowing code
27  */
28
29 #ifndef __GDK_PRIVATE_WAYLAND_H__
30 #define __GDK_PRIVATE_WAYLAND_H__
31
32 #include <gdk/gdkcursor.h>
33 #include <gdk/gdkprivate.h>
34 #include <gdk/wayland/gdkwayland.h>
35 #include <gdk/wayland/gdkdisplay-wayland.h>
36
37 #include <xkbcommon/xkbcommon.h>
38
39 #include "gdkinternals.h"
40
41 #include "config.h"
42
43 #define GDK_SCREEN_DISPLAY(screen)    (GDK_SCREEN_WAYLAND (screen)->display)
44 #define GDK_WINDOW_SCREEN(win)        (gdk_window_get_screen (win))
45 #define GDK_WINDOW_DISPLAY(win)       (GDK_SCREEN_WAYLAND (GDK_WINDOW_SCREEN (win))->display)
46 #define GDK_WINDOW_IS_WAYLAND(win)    (GDK_IS_WINDOW_IMPL_WAYLAND (((GdkWindow *)win)->impl))
47
48 GType _gdk_wayland_window_get_type    (void);
49 void _gdk_wayland_window_add_focus    (GdkWindow *window);
50 void _gdk_wayland_window_remove_focus (GdkWindow *window);
51
52 GdkKeymap *_gdk_wayland_keymap_new (void);
53 GdkKeymap *_gdk_wayland_keymap_new_from_fd (uint32_t format,
54                                             uint32_t fd, uint32_t size);
55 struct xkb_state *_gdk_wayland_keymap_get_xkb_state (GdkKeymap *keymap);
56
57 GdkCursor *_gdk_wayland_display_get_cursor_for_type (GdkDisplay    *display,
58                                                      GdkCursorType  cursor_type);
59 GdkCursor *_gdk_wayland_display_get_cursor_for_name (GdkDisplay  *display,
60                                                      const gchar *name);
61 GdkCursor *_gdk_wayland_display_get_cursor_for_pixbuf (GdkDisplay *display,
62                                                        GdkPixbuf  *pixbuf,
63                                                        gint        x,
64                                                        gint        y);
65 void       _gdk_wayland_display_get_default_cursor_size (GdkDisplay *display,
66                                                          guint       *width,
67                                                          guint       *height);
68 void       _gdk_wayland_display_get_maximal_cursor_size (GdkDisplay *display,
69                                                          guint       *width,
70                                                          guint       *height);
71 gboolean   _gdk_wayland_display_supports_cursor_alpha (GdkDisplay *display);
72 gboolean   _gdk_wayland_display_supports_cursor_color (GdkDisplay *display);
73
74 struct wl_buffer *_gdk_wayland_cursor_get_buffer (GdkCursor *cursor,
75                                                   int       *x,
76                                                   int       *y,
77                                                   int       *w,
78                                                   int       *h);
79
80 GdkDragProtocol _gdk_wayland_window_get_drag_protocol (GdkWindow *window,
81                                                        GdkWindow **target);
82
83 void            _gdk_wayland_window_register_dnd (GdkWindow *window);
84 GdkDragContext *_gdk_wayland_window_drag_begin (GdkWindow *window,
85                                                 GdkDevice *device,
86                                                 GList     *targets);
87
88 void _gdk_wayland_display_create_window_impl (GdkDisplay    *display,
89                                               GdkWindow     *window,
90                                               GdkWindow     *real_parent,
91                                               GdkScreen     *screen,
92                                               GdkEventMask   event_mask,
93                                               GdkWindowAttr *attributes,
94                                               gint           attributes_mask);
95
96 GdkWindow *_gdk_wayland_display_get_selection_owner (GdkDisplay *display,
97                                                  GdkAtom     selection);
98 gboolean   _gdk_wayland_display_set_selection_owner (GdkDisplay *display,
99                                                      GdkWindow  *owner,
100                                                      GdkAtom     selection,
101                                                      guint32     time,
102                                                      gboolean    send_event);
103 void       _gdk_wayland_display_send_selection_notify (GdkDisplay *dispay,
104                                                        GdkWindow        *requestor,
105                                                        GdkAtom          selection,
106                                                        GdkAtom          target,
107                                                        GdkAtom          property,
108                                                        guint32          time);
109 gint       _gdk_wayland_display_get_selection_property (GdkDisplay  *display,
110                                                         GdkWindow   *requestor,
111                                                         guchar     **data,
112                                                         GdkAtom     *ret_type,
113                                                         gint        *ret_format);
114 void       _gdk_wayland_display_convert_selection (GdkDisplay *display,
115                                                    GdkWindow  *requestor,
116                                                    GdkAtom     selection,
117                                                    GdkAtom     target,
118                                                    guint32     time);
119 gint        _gdk_wayland_display_text_property_to_utf8_list (GdkDisplay    *display,
120                                                              GdkAtom        encoding,
121                                                              gint           format,
122                                                              const guchar  *text,
123                                                              gint           length,
124                                                              gchar       ***list);
125 gchar *     _gdk_wayland_display_utf8_to_string_target (GdkDisplay  *display,
126                                                         const gchar *str);
127
128 GdkDeviceManager *_gdk_wayland_device_manager_new (GdkDisplay *display);
129 void              _gdk_wayland_device_manager_add_device (GdkDeviceManager *device_manager,
130                                                           struct wl_seat *seat);
131
132 struct wl_seat *_gdk_wayland_device_get_wl_seat (GdkDevice *device);
133 struct wl_pointer *_gdk_wayland_device_get_wl_pointer (GdkDevice *device);
134 struct wl_keyboard *_gdk_wayland_device_get_wl_keyboard (GdkDevice *device);
135
136 GdkKeymap *_gdk_wayland_device_get_keymap (GdkDevice *device);
137
138 void     _gdk_wayland_display_deliver_event (GdkDisplay *display, GdkEvent *event);
139 GSource *_gdk_wayland_display_event_source_new (GdkDisplay *display);
140 void     _gdk_wayland_display_queue_events (GdkDisplay *display);
141
142 GdkAppLaunchContext *_gdk_wayland_display_get_app_launch_context (GdkDisplay *display);
143
144 GdkDisplay *_gdk_wayland_display_open (const gchar *display_name);
145 void        _gdk_wayland_display_make_default (GdkDisplay *display);
146
147 GdkWindow *_gdk_wayland_screen_create_root_window (GdkScreen *screen,
148                                                    int width,
149                                                    int height);
150
151 GdkScreen *_gdk_wayland_screen_new (GdkDisplay *display);
152
153 void _gdk_wayland_display_manager_add_display (GdkDisplayManager *manager,
154                                                GdkDisplay        *display);
155 void _gdk_wayland_display_manager_remove_display (GdkDisplayManager *manager,
156                                                   GdkDisplay        *display);
157
158 void _gdk_wayland_window_set_device_grabbed (GdkWindow      *window,
159                                              struct wl_seat *seat,
160                                              guint32         time_);
161
162 guint32 _gdk_wayland_display_get_serial (GdkWaylandDisplay *wayland_display);
163 void _gdk_wayland_display_update_serial (GdkWaylandDisplay *wayland_display, guint32 serial);
164
165 #endif /* __GDK_PRIVATE_WAYLAND_H__ */