26 #include <uwac/config.h>
29 #include <wayland-client.h>
30 #include "xdg-shell-client-protocol.h"
31 #include "keyboard-shortcuts-inhibit-unstable-v1-client-protocol.h"
32 #include "xdg-decoration-unstable-v1-client-protocol.h"
33 #include "server-decoration-client-protocol.h"
34 #include "viewporter-client-protocol.h"
37 #include "ivi-application-client-protocol.h"
39 #ifdef BUILD_FULLSCREEN_SHELL
40 #include "fullscreen-shell-unstable-v1-client-protocol.h"
43 #ifdef UWAC_HAVE_PIXMAN_REGION
44 #include <pixman-1/pixman.h>
46 #include <freerdp/codec/region.h>
49 #include <xkbcommon/xkbcommon.h>
51 #include <uwac/uwac.h>
53 extern UwacErrorHandler uwacErrorHandler;
61 void (*run)(UwacTask* task, uint32_t events);
84 UwacEventListItem *tail, *head;
91 struct wl_list globals;
93 struct wl_display* display;
94 struct wl_registry* registry;
95 struct wl_compositor* compositor;
96 struct wp_viewporter* viewporter;
97 struct wl_subcompositor* subcompositor;
98 struct wl_shell* shell;
99 struct xdg_toplevel* xdg_toplevel;
100 struct xdg_wm_base* xdg_base;
101 struct wl_data_device_manager* devicemanager;
102 struct zwp_keyboard_shortcuts_inhibit_manager_v1* keyboard_inhibit_manager;
103 struct zxdg_decoration_manager_v1* deco_manager;
104 struct org_kde_kwin_server_decoration_manager* kde_deco_manager;
106 struct ivi_application* ivi_application;
108 #ifdef BUILD_FULLSCREEN_SHELL
109 struct zwp_fullscreen_shell_v1* fullscreen_shell;
113 enum wl_shm_format* shm_formats;
114 uint32_t shm_formats_nb;
117 struct wl_data_device_manager* data_device_manager;
118 struct text_cursor_position* text_cursor_position;
119 struct workspace_manager* workspace_manager;
121 struct wl_list seats;
124 UwacReturnCode last_error;
125 uint32_t display_fd_events;
128 UwacTask dispatch_fd_task;
130 uint32_t pointer_focus_serial;
133 struct wl_list windows;
135 struct wl_list outputs;
137 UwacEventListItem *push_queue, *pop_queue;
143 UwacDisplay* display;
148 UwacPosition position;
154 uint32_t server_output_id;
155 struct wl_output* output;
165 UwacDisplay* display;
167 struct wl_seat* seat;
169 uint32_t seat_version;
170 struct wl_data_device* data_device;
171 struct wl_data_source* data_source;
172 struct wl_pointer* pointer;
173 struct wl_surface* pointer_surface;
174 struct wl_cursor_image* pointer_image;
175 struct wl_cursor_theme* cursor_theme;
176 struct wl_cursor* default_cursor;
180 struct wl_keyboard* keyboard;
181 struct wl_touch* touch;
182 struct wl_data_offer* offer;
183 struct xkb_context* xkb_context;
184 struct zwp_keyboard_shortcuts_inhibitor_v1* keyboard_inhibitor;
188 struct xkb_keymap* keymap;
189 struct xkb_state* state;
190 xkb_mod_mask_t control_mask;
191 xkb_mod_mask_t alt_mask;
192 xkb_mod_mask_t shift_mask;
193 xkb_mod_mask_t caps_mask;
194 xkb_mod_mask_t num_mask;
197 int32_t repeat_rate_sec, repeat_rate_nsec;
198 int32_t repeat_delay_sec, repeat_delay_nsec;
199 uint32_t repeat_sym, repeat_key, repeat_time;
201 struct wl_array pressed_keys;
203 UwacWindow* pointer_focus;
205 UwacWindow* keyboard_focus;
207 UwacWindow* touch_focus;
208 bool touch_frame_started;
211 UwacTask repeat_task;
216 UwacDataTransferHandler transfer_data;
217 UwacCancelDataTransferHandler cancel_data;
218 bool ignore_announcement;
226 #ifdef UWAC_HAVE_PIXMAN_REGION
227 pixman_region32_t damage;
231 struct wl_buffer* wayland_buffer;
240 UwacDisplay* display;
241 int width, height, stride;
243 enum wl_shm_format format;
248 struct wl_region* opaque_region;
249 struct wl_region* input_region;
250 ssize_t drawingBufferIdx;
251 ssize_t pendingBufferIdx;
252 struct wl_surface* surface;
253 struct wp_viewport* viewport;
254 struct wl_shell_surface* shell_surface;
255 struct xdg_surface* xdg_surface;
256 struct xdg_toplevel* xdg_toplevel;
257 struct zxdg_toplevel_decoration_v1* deco;
258 struct org_kde_kwin_server_decoration* kde_deco;
260 struct ivi_surface* ivi_surface;
264 uint32_t pointer_enter_serial;
265 uint32_t pointer_cursor_serial;
266 int pointer_current_cursor;
278 UwacEvent* UwacDisplayNewEvent(UwacDisplay* d,
int type);
279 int UwacDisplayWatchFd(UwacDisplay* display,
int fd, uint32_t events, UwacTask* task);
282 UwacSeat* UwacSeatNew(UwacDisplay* d, uint32_t
id, uint32_t version);
283 void UwacSeatDestroy(UwacSeat* s);
286 UwacOutput* UwacCreateOutput(UwacDisplay* d, uint32_t
id, uint32_t version);
287 int UwacDestroyOutput(UwacOutput* output);
289 UwacReturnCode UwacSeatRegisterClipboard(UwacSeat* s);
data to pass to wl_buffer release listener
a buffer used for drawing a surface frame
main connection object to a wayland display
double linked list element
an output on a wayland display
a seat attached to a wayland display