e_devicemgr: create tizen_input_devices only for first bound seat & manager
[platform/upstream/enlightenment.git] / src / bin / e_comp_wl.h
1 #ifdef E_TYPEDEFS
2 typedef struct _E_Comp_Wl_Hook E_Comp_Wl_Hook;
3 typedef struct _E_Comp_Wl_Pid_Hook E_Comp_Wl_Pid_Hook;
4 #else
5 # ifndef E_COMP_WL_H
6 #  define E_COMP_WL_H
7
8 /* NB: Turn off shadow warnings for Wayland includes */
9 #  pragma GCC diagnostic push
10 #  pragma GCC diagnostic ignored "-Wshadow"
11 #  define WL_HIDE_DEPRECATED
12 #  include <wayland-server.h>
13 #  pragma GCC diagnostic pop
14
15 #  include <xkbcommon/xkbcommon.h>
16
17 #  ifdef __linux__
18 #   include <linux/input.h>
19 #  else
20 #   define BTN_LEFT 0x110
21 #   define BTN_RIGHT 0x111
22 #   define BTN_MIDDLE 0x112
23 #   define BTN_SIDE 0x113
24 #   define BTN_EXTRA 0x114
25 #   define BTN_FORWARD 0x115
26 #   define BTN_BACK 0x116
27 #  endif
28
29 #  define container_of(ptr, type, member) \
30    ({ \
31       const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
32       (type *)( (char *)__mptr - offsetof(type,member) ); \
33    })
34
35 #include <tbm_surface.h>
36
37 typedef struct _E_Comp_Wl_Aux_Hint  E_Comp_Wl_Aux_Hint;
38 typedef struct _E_Comp_Wl_Buffer E_Comp_Wl_Buffer;
39 typedef struct _E_Comp_Wl_Buffer_Ref E_Comp_Wl_Buffer_Ref;
40 typedef struct _E_Comp_Wl_Buffer_Viewport E_Comp_Wl_Buffer_Viewport;
41 typedef struct _E_Comp_Wl_Subsurf_Data E_Comp_Wl_Subsurf_Data;
42 typedef struct _E_Comp_Wl_Surface_State E_Comp_Wl_Surface_State;
43 typedef struct _E_Comp_Wl_Data E_Comp_Wl_Data;
44 typedef struct _E_Comp_Wl_Output E_Comp_Wl_Output;
45 typedef struct _E_Comp_Wl_Intercept_Hook E_Comp_Wl_Intercept_Hook;
46 typedef struct _E_Comp_Wl_Evas_Gl E_Comp_Wl_Evas_Gl;
47 typedef struct _E_Comp_Wl_Seat E_Comp_Wl_Seat;
48
49 typedef enum _E_Comp_Wl_Buffer_Type
50 {
51    E_COMP_WL_BUFFER_TYPE_NONE = 0,
52    E_COMP_WL_BUFFER_TYPE_SHM = 1,
53    E_COMP_WL_BUFFER_TYPE_NATIVE = 2,
54    E_COMP_WL_BUFFER_TYPE_VIDEO = 3,
55    E_COMP_WL_BUFFER_TYPE_TBM = 4,
56 } E_Comp_Wl_Buffer_Type;
57
58 typedef enum _E_Comp_Wl_Hook_Point
59 {
60    E_COMP_WL_HOOK_SHELL_SURFACE_READY,
61    E_COMP_WL_HOOK_SUBSURFACE_CREATE,
62    E_COMP_WL_HOOK_SUBSURFACE_COMMIT_TO_CACHE,
63    E_COMP_WL_HOOK_SUBSURFACE_SYNCHRONIZED_COMMIT,
64    E_COMP_WL_HOOK_BUFFER_CHANGE,
65    E_COMP_WL_HOOK_CLIENT_REUSE,
66    E_COMP_WL_HOOK_BUFFER_SIZE_CHANGE,
67    E_COMP_WL_HOOK_DEL,
68    E_COMP_WL_HOOK_CLIENT_ALPHA_CHANGE,
69    E_COMP_WL_HOOK_CLIENT_SURFACE_COMMIT,
70    E_COMP_WL_HOOK_LAST,
71 } E_Comp_Wl_Hook_Point;
72
73 typedef enum _E_Comp_Wl_Pid_Hook_Point
74 {
75    E_COMP_WL_PID_HOOK_CONNECTED_CLIENT_CREATE,
76    E_COMP_WL_PID_HOOK_LAST,
77 } E_Comp_Wl_Pid_Hook_Point;
78
79 typedef enum _E_Comp_Wl_Sh_Surf_Role
80 {
81    E_COMP_WL_SH_SURF_ROLE_NONE = 0,
82    E_COMP_WL_SH_SURF_ROLE_TOPLV = 1,
83    E_COMP_WL_SH_SURF_ROLE_POPUP = 2,
84 } E_Comp_Wl_Sh_Surf_Role;
85
86 typedef enum _E_Comp_Wl_Intercept_Hook_Point
87 {
88    E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_IN,
89    E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_OUT,
90    E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_MOVE,
91    E_COMP_WL_INTERCEPT_HOOK_LAST,
92 } E_Comp_Wl_Intercept_Hook_Point;
93
94 typedef void (*E_Comp_Wl_Hook_Cb) (void *data, E_Client *ec);
95 typedef void (*E_Comp_Wl_Pid_Hook_Cb) (void *data, pid_t pid);
96 typedef Eina_Bool (*E_Comp_Wl_Intercept_Hook_Cb) (void *data, E_Client *ec);
97
98 struct _E_Comp_Wl_Aux_Hint
99 {
100    int           id;
101    const char   *hint;
102    const char   *val;
103    Eina_Bool     changed;
104    Eina_Bool     deleted;
105 };
106
107 struct _E_Comp_Wl_Buffer
108 {
109    E_Comp_Wl_Buffer_Type type;
110    struct wl_resource *resource;
111    struct wl_signal destroy_signal;
112    struct wl_listener destroy_listener;
113    struct wl_shm_buffer *shm_buffer;
114    tbm_surface_h tbm_surface;
115    struct
116    {
117       Eina_Stringshare *owner_name;
118       void *owner_ptr;
119    } debug_info;
120    int32_t w, h;
121    int format;
122    int transform; // the value of wl_tbm.set_buffer_transform
123    uint32_t busy;
124
125    E_Explicit_Sync_Buffer_Release *buffer_release;
126 };
127
128 struct _E_Comp_Wl_Buffer_Ref
129 {
130    E_Comp_Wl_Buffer *buffer;
131    struct wl_listener destroy_listener;
132    Eina_Bool          destroy_listener_usable;
133 };
134
135 struct _E_Comp_Wl_Buffer_Viewport {
136    struct
137      {
138         uint32_t transform;   /* wl_surface.set_buffer_transform */
139         int32_t scale;        /* wl_surface.set_scaling_factor */
140
141         /* If src_width != wl_fixed_from_int(-1), then and only then src_* are used. */
142         wl_fixed_t src_x, src_y;
143         wl_fixed_t src_width, src_height;
144      } buffer;
145
146    struct
147      {
148         /* If width == -1, the size is inferred from the buffer. */
149         int32_t width, height;
150      } surface;
151
152    int changed;
153
154    /* When screen or window is rotated, a transformed buffer could be
155     * attached after attaching a few buffers. So to detect when the transformed
156     * buffer exactly, we need to know the status of waiting the transformed buffer.
157     */
158    uint32_t wait_for_transform_change;
159 };
160
161 struct _E_Comp_Wl_Surface_State
162 {
163    int sx, sy;
164    int bw, bh;
165    E_Comp_Wl_Buffer *buffer;
166    struct wl_listener buffer_destroy_listener;
167    Eina_List *damages, *buffer_damages, *frames;
168    Eina_Tiler *input, *opaque;
169    E_Comp_Wl_Buffer_Viewport buffer_viewport;
170    Eina_Bool new_attach : 1;
171    Eina_Bool has_data : 1;
172
173    E_Presentation_Time_Container presentation_container;
174 };
175
176 struct _E_Comp_Wl_Subsurf_Data
177 {
178    struct wl_resource *resource;
179
180    E_Client *parent;
181
182    struct
183      {
184         int x, y;
185         Eina_Bool set;
186      } position;
187
188    E_Comp_Wl_Surface_State cached;
189    E_Comp_Wl_Buffer_Ref cached_buffer_ref;
190
191    Eina_Bool synchronized;
192    Eina_Bool stand_alone;
193
194    struct
195      {
196         E_Client *offscreen_parent;
197      } remote_surface;
198 };
199
200 struct _E_Comp_Wl_Data
201 {
202    struct
203      {
204         struct wl_display *disp;
205         struct wl_event_loop *loop;
206      } wl;
207
208    struct
209      {
210         Eina_List *resources;
211         Eina_List *focused;
212         Eina_Bool enabled : 1;
213         xkb_mod_index_t mod_shift, mod_caps;
214         xkb_mod_index_t mod_ctrl, mod_alt;
215         xkb_mod_index_t mod_super;
216         xkb_mod_mask_t mod_depressed, mod_latched, mod_locked;
217         xkb_layout_index_t mod_group;
218         struct wl_array keys;
219         struct wl_array routed_keys;
220         struct wl_resource *focus;
221         int mod_changed;
222         int repeat_delay;
223         int repeat_rate;
224         unsigned int num_devices;
225      } kbd;
226
227    struct
228      {
229         Eina_List *resources;
230         wl_fixed_t x, y;
231         wl_fixed_t grab_x, grab_y;
232         uint32_t button;
233         Ecore_Timer *hide_tmr;
234         E_Client *ec;
235         Eina_Bool enabled : 1;
236         unsigned int num_devices;
237      } ptr;
238
239    struct
240      {
241         Eina_List *resources;
242         Eina_Bool enabled : 1;
243         unsigned int num_devices;
244         unsigned int pressed;
245         E_Client *faked_ec;
246      } touch;
247
248    struct
249      {
250         struct wl_global *global;
251         Eina_List *resources;
252         uint32_t version;
253         char *name;
254
255         struct
256           {
257              struct wl_global *global;
258              struct wl_resource *resource;
259           } im;
260      } seat;
261
262    struct
263      {
264         struct wl_global *global;
265         struct wl_resource *resource;
266         Eina_Hash *data_resources;
267      } mgr;
268
269    struct
270      {
271         void *data_source;
272         uint32_t serial;
273         struct wl_signal signal;
274         struct wl_listener data_source_listener;
275         E_Client *target;
276
277         struct wl_resource *cbhm;
278         Eina_List *data_only_list;
279      } selection;
280
281    struct
282      {
283         void *source;
284         struct wl_listener listener;
285         E_Client *xwl_owner;
286      } clipboard;
287
288    struct
289      {
290         void *data_source;
291         E_Client *icon;
292         uint32_t serial;
293         struct wl_signal signal;
294         struct wl_listener data_source_listener;
295         struct wl_client *client;
296         struct wl_resource *focus;
297         Eina_Bool enabled : 1;
298      } dnd;
299
300    struct
301      {
302         struct wl_resource *resource;
303         uint32_t edges;
304      } resize;
305
306    struct
307      {
308         struct xkb_keymap *keymap;
309         struct xkb_context *context;
310         struct xkb_state *state;
311         int fd;
312         size_t size;
313         char *area;
314      } xkb;
315
316    struct
317      {
318         Eina_Bool underlay;
319         Eina_Bool scaler;
320      } available_hw_accel;
321
322    struct
323      {
324         void *server;
325      } tbm;
326
327    struct
328      {
329         struct wl_global *global;
330         struct wl_client *client;
331      } screenshooter;
332
333    struct
334      {
335         struct wl_global *global;
336      } video;
337
338    struct
339      {
340         struct wl_global *global;
341      } tizen_hwc;
342
343    Eina_List *outputs;
344
345    Ecore_Fd_Handler *fd_hdlr;
346    Ecore_Idler *idler;
347
348    struct wl_client *xwl_client;
349    Eina_List *xwl_pending;
350
351    E_Drag *drag;
352    E_Client *drag_client;
353    void *drag_source;
354    void *drag_offer;
355
356    E_Comp_Wl_Evas_Gl *evas_gl;
357 };
358
359 struct _E_Comp_Wl_Client_Data
360 {
361    struct wl_resource *wl_surface;
362
363    Ecore_Timer *on_focus_timer;
364
365    struct
366      {
367         E_Comp_Wl_Subsurf_Data *data;
368
369         Eina_List *list;
370         Eina_List *list_pending;
371         Eina_Bool list_changed : 1;
372
373         Eina_List *below_list;
374         Eina_List *below_list_pending;
375         Evas_Object *below_obj;
376         E_Map *below_obj_map;
377         E_Client_Hook *below_obj_map_transform_hook;
378         E_Comp_Wl_Hook *comp_wl_del_hook;
379
380         Eina_Bool restacking : 1;
381
382         struct wl_resource *watcher;
383      } sub;
384
385    /* regular surface resource (wl_compositor_create_surface) */
386    struct wl_resource *surface;
387    struct wl_signal destroy_signal;
388    struct wl_signal apply_viewport_signal;
389
390    struct
391      {
392         /* shell surface resource */
393         struct wl_resource *surface;
394
395         void (*configure_send)(struct wl_resource *resource, uint32_t edges, int32_t width, int32_t height);
396         void (*configure)(struct wl_resource *resource, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
397         void (*ping)(struct wl_resource *resource);
398         void (*map)(struct wl_resource *resource);
399         void (*unmap)(struct wl_resource *resource);
400         Eina_Rectangle window;
401      } shell;
402
403    E_Comp_Wl_Buffer_Ref buffer_ref;
404    E_Comp_Wl_Surface_State pending;
405
406    Eina_List *frames;
407    E_Presentation_Time_Container presentation_container;
408
409    struct
410      {
411         int32_t x, y;
412      } popup;
413
414    struct
415      {
416         struct wl_resource *viewport;
417         E_Comp_Wl_Buffer_Viewport buffer_viewport;
418      } scaler;
419
420    struct
421      {
422         Eina_Bool enabled : 1;
423         Eina_Bool start : 1;
424
425         unsigned int scount, stime;
426         int sx, sy, dx, dy;
427         int prev_degree, cur_degree;
428      } transform;
429
430    struct
431      {
432         Eina_Bool  changed : 1;
433         Eina_List *hints;
434         Eina_Bool  use_msg : 1;
435      } aux_hint;
436
437    /* before applying viewport */
438    int width_from_buffer;
439    int height_from_buffer;
440
441    /* after applying viewport */
442    int width_from_viewport;
443    int height_from_viewport;
444
445    Eina_Bool keep_buffer : 1;
446    Eina_Bool mapped : 1;
447    Eina_Bool has_extern_parent : 1;
448    Eina_Bool change_icon : 1;
449    Eina_Bool need_reparent : 1;
450    Eina_Bool reparented : 1;
451    Eina_Bool evas_init : 1;
452    Eina_Bool first_damage : 1;
453    Eina_Bool set_win_type : 1;
454    Eina_Bool frame_update : 1;
455    Eina_Bool maximize_pre : 1;
456    Eina_Bool focus_update : 1;
457    Eina_Bool opaque_state : 1;
458    Eina_Bool video_client : 1; // Deprecated
459    Eina_Bool has_video_client : 1;
460    Eina_Bool never_hwc : 1;          //  force window not to do hwc
461    Eina_Bool first_commit : 1;       // TRUE : once client committed
462    unsigned char accepts_focus : 1;
463    unsigned char conformant : 1;
464    E_Window_Type win_type;
465    E_Layer layer;
466
467    struct
468    {
469       unsigned char win_type : 1;
470       unsigned char layer : 1;
471    } fetch;
472
473    E_Devicemgr_Input_Device *last_device_ptr;
474    E_Devicemgr_Input_Device *last_device_touch;
475    E_Devicemgr_Input_Device *last_device_kbd;
476
477    E_Util_Transform *viewport_transform;
478
479    struct
480      {
481         E_Client *onscreen_parent;
482         Eina_List *regions;  //list of onscreen region (Eina_Rectangle *)
483      } remote_surface;
484
485    /* xdg shell v6 resource: it should be moved to member of struct shell */
486    struct
487      {
488         E_Comp_Wl_Sh_Surf_Role role;
489         struct wl_resource *res_role; /* zxdg_toplevel_v6 or zxdg_popup_v6 */
490      } sh_v6;
491
492    const char *role_name;
493 };
494
495 struct _E_Comp_Wl_Output
496 {
497    struct wl_global *global;
498    Eina_List *resources;
499    const char *id, *make, *model;
500    int x, y, w, h;
501    int phys_width, phys_height;
502    unsigned int refresh;
503    unsigned int subpixel;
504    unsigned int transform;
505    double scale;
506
507    /* added for screenshot ability */
508    struct wl_output *wl_output;
509    struct wl_buffer *buffer;
510    void *data;
511 };
512
513 struct _E_Comp_Wl_Hook
514 {
515    EINA_INLIST;
516    E_Comp_Wl_Hook_Point hookpoint;
517    E_Comp_Wl_Hook_Cb func;
518    void *data;
519    unsigned char delete_me : 1;
520 };
521
522 struct _E_Comp_Wl_Pid_Hook
523 {
524    EINA_INLIST;
525    E_Comp_Wl_Pid_Hook_Point hookpoint;
526    E_Comp_Wl_Pid_Hook_Cb func;
527    void *data;
528    unsigned char delete_me : 1;
529 };
530
531 struct _E_Comp_Wl_Intercept_Hook
532 {
533    EINA_INLIST;
534    E_Comp_Wl_Intercept_Hook_Point hookpoint;
535    E_Comp_Wl_Intercept_Hook_Cb func;
536    void *data;
537    unsigned char delete_me : 1;
538 };
539
540 struct _E_Comp_Wl_Seat
541 {
542    Eina_Bool is_first_resource : 1;
543 };
544
545 EINTERN Eina_Bool e_comp_wl_init(void);
546 EINTERN void e_comp_wl_shutdown(void);
547
548 EINTERN void e_comp_wl_deferred_job(void);
549
550 EINTERN void e_comp_wl_surface_destroy(struct wl_resource *resource);
551 EINTERN void e_comp_wl_surface_attach(E_Client *ec, E_Comp_Wl_Buffer *buffer);
552 E_API Eina_Bool e_comp_wl_surface_commit(E_Client *ec);
553 E_API void e_comp_wl_buffer_reference(E_Comp_Wl_Buffer_Ref *ref, E_Comp_Wl_Buffer *buffer);
554 EINTERN E_Comp_Wl_Buffer *e_comp_wl_buffer_get(struct wl_resource *resource, E_Client *ec);
555
556 E_API Eina_Bool e_comp_wl_output_init(const char *id, const char *make, const char *model, int x, int y, int w, int h, int pw, int ph, unsigned int refresh, unsigned int subpixel, unsigned int transform);
557 E_API void e_comp_wl_output_remove(const char *id);
558
559 EINTERN Eina_Bool e_comp_wl_key_down(Ecore_Event_Key *ev);
560 EINTERN Eina_Bool e_comp_wl_key_up(Ecore_Event_Key *ev);
561 EINTERN Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, uint32_t state);
562 E_API void        e_comp_wl_touch_cancel(void);
563
564 E_API E_Comp_Wl_Hook *e_comp_wl_hook_add(E_Comp_Wl_Hook_Point hookpoint, E_Comp_Wl_Hook_Cb func, const void *data);
565 E_API void e_comp_wl_hook_del(E_Comp_Wl_Hook *ch);
566
567 E_API E_Comp_Wl_Pid_Hook *e_comp_wl_pid_hook_add(E_Comp_Wl_Pid_Hook_Point hookpoint, E_Comp_Wl_Pid_Hook_Cb func, const void *data);
568 E_API void e_comp_wl_pid_hook_del(E_Comp_Wl_Pid_Hook *ch);
569
570 E_API E_Comp_Wl_Intercept_Hook *e_comp_wl_intercept_hook_add(E_Comp_Wl_Intercept_Hook_Point hookpoint, E_Comp_Wl_Intercept_Hook_Cb func, const void *data);
571 E_API void e_comp_wl_intercept_hook_del(E_Comp_Wl_Intercept_Hook *ch);
572
573 EINTERN void e_comp_wl_shell_surface_ready(E_Client *ec);
574
575 E_API   E_Client* e_comp_wl_topmost_parent_get(E_Client *ec);
576
577 EINTERN enum wl_output_transform e_comp_wl_output_pending_buffer_transform_get(E_Client *ec);
578 E_API enum wl_output_transform e_comp_wl_output_buffer_transform_get(E_Client *ec);
579 E_API void e_comp_wl_map_size_cal_from_buffer(E_Client *ec);
580 E_API void e_comp_wl_map_size_cal_from_viewport(E_Client *ec);
581 E_API void e_comp_wl_map_apply(E_Client *ec);
582
583 EINTERN void e_comp_wl_map_inv_coord_get(E_Client *ec, int x, int y, int *mx, int *my);
584
585 E_API void e_comp_wl_input_cursor_timer_enable_set(Eina_Bool enabled);
586 EINTERN void e_comp_wl_send_event_device(struct wl_client *wc, uint32_t timestamp, Ecore_Device *dev, uint32_t serial);
587
588 EINTERN Eina_Bool e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Ecore_Device *dev, uint32_t time);
589 EINTERN Eina_Bool e_comp_wl_key_cancel(E_Client *ec, int keycode, Ecore_Device *dev, uint32_t time);
590 EINTERN Eina_Bool e_comp_wl_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time);
591 EINTERN Eina_Bool e_comp_wl_touch_update_send(E_Client *ec, int idx, int x, int y, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time);
592 EINTERN Eina_Bool e_comp_wl_touch_cancel_send(E_Client *ec);
593 EINTERN Eina_Bool e_comp_wl_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Ecore_Device *dev, uint32_t time);
594 EINTERN Eina_Bool e_comp_wl_mouse_move_send(E_Client *ec, int x, int y, Ecore_Device *dev, uint32_t time);
595 EINTERN Eina_Bool e_comp_wl_mouse_wheel_send(E_Client *ec, int direction, int z, Ecore_Device *dev, uint32_t time);
596 EINTERN Eina_Bool e_comp_wl_mouse_in_send(E_Client *ec, int x, int y, Ecore_Device *dev, uint32_t time);
597 EINTERN Eina_Bool e_comp_wl_mouse_out_send(E_Client *ec, Ecore_Device *dev, uint32_t time);
598 EINTERN void e_comp_wl_mouse_in_renew(E_Client *ec, int buttons, int x, int y, void *data, Evas_Modifier *modifiers, Evas_Lock *locks, unsigned int timestamp, Evas_Event_Flags event_flags, Evas_Device *dev, Evas_Object *event_src);
599 EINTERN void e_comp_wl_mouse_out_renew(E_Client *ec, int buttons, int x, int y, void *data, Evas_Modifier *modifiers, Evas_Lock *locks, unsigned int timestamp, Evas_Event_Flags event_flags, Evas_Device *dev, Evas_Object *event_src);
600 EINTERN Eina_Bool e_comp_wl_key_process(Ecore_Event_Key *ev, int type);
601
602 EINTERN Eina_Bool e_comp_wl_cursor_hide(E_Client *ec);
603
604 EINTERN void e_comp_wl_pos_convert(int width, int height, int transform, int scale, int sx, int sy, int *bx, int *by);
605 EINTERN void e_comp_wl_pos_convert_inverse(int width, int height, int transform, int scale, int bx, int by, int *sx, int *sy);
606 EINTERN void e_comp_wl_rect_convert(int width, int height, int transform, int scale, int sx, int sy, int sw, int sh, int *bx, int *by, int *bw, int *bh);
607 EINTERN void e_comp_wl_rect_convert_inverse(int width, int height, int transform, int scale, int bx, int by, int bw, int bh, int *sx, int *sy, int *sw, int *sh);
608 EINTERN E_Comp_Wl_Output* e_comp_wl_output_find(E_Client *ec);
609
610 EINTERN void      e_comp_wl_feed_focus_in(E_Client *ec);
611
612 EINTERN extern int E_EVENT_WAYLAND_GLOBAL_ADD;
613
614 EINTERN Eina_Bool e_comp_wl_commit_sync_client_geometry_add(E_Client *ec, E_Client_Demand_Geometry mode, uint32_t serial, int32_t x, int32_t y, int32_t w, int32_t h);
615 EINTERN void e_comp_wl_trace_serial_debug(Eina_Bool on);
616 EINTERN Eina_Bool e_comp_wl_commit_sync_configure(E_Client *ec);
617
618 EINTERN Eina_Bool         e_comp_wl_pid_output_configured_resolution_send(pid_t pid, int w, int h);
619
620 EINTERN void    e_comp_wl_surface_state_init(E_Comp_Wl_Surface_State *state, int w, int h);
621 EINTERN void    e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state);
622 EINTERN void    e_comp_wl_hook_call(E_Comp_Wl_Hook_Point hookpoint, E_Client *ec);
623 EINTERN void    e_comp_wl_surface_state_finish(E_Comp_Wl_Surface_State *state);
624 EINTERN void    e_comp_wl_surface_state_buffer_set(E_Comp_Wl_Surface_State *state, E_Comp_Wl_Buffer *buffer);
625
626 EINTERN Eina_Bool e_comp_wl_surface_viewport_get(E_Client *ec, Eina_Rectangle *buffer_viewport, Eina_Rectangle *output_viewport, unsigned int *transform);
627
628 EINTERN Eina_Bool     e_comp_wl_surface_role_set(E_Client *ec, const char *role_name, struct wl_resource *error_resource, uint32_t error_code);
629 EINTERN const char   *e_comp_wl_surface_role_get(E_Client *ec);
630 # endif
631 #endif