1 #ifndef _ECORE_WAYLAND_H_
2 # define _ECORE_WAYLAND_H_
5 # include <wayland-client.h>
13 # define EAPI __attribute__ ((visibility("default")))
21 typedef struct _Ecore_Wl_Event_Mouse_In Ecore_Wl_Event_Mouse_In;
22 typedef struct _Ecore_Wl_Event_Mouse_Out Ecore_Wl_Event_Mouse_Out;
23 typedef struct _Ecore_Wl_Event_Focus_In Ecore_Wl_Event_Focus_In;
24 typedef struct _Ecore_Wl_Event_Focus_Out Ecore_Wl_Event_Focus_Out;
26 typedef struct _Ecore_Wl_Drag_Source Ecore_Wl_Drag_Source;
28 typedef struct _Ecore_Wl_Event_Drag_Start Ecore_Wl_Event_Drag_Start;
29 typedef struct _Ecore_Wl_Event_Drag_Stop Ecore_Wl_Event_Drag_Stop;
31 struct _Ecore_Wl_Event_Mouse_In
46 struct _Ecore_Wl_Event_Mouse_Out
61 struct _Ecore_Wl_Event_Focus_In
64 /* TODO: mode & detail */
68 struct _Ecore_Wl_Event_Focus_Out
71 /* TODO: mode & detail */
75 struct _Ecore_Wl_Event_Drag_Start
77 struct wl_data_device *device;
78 struct wl_surface *surface;
79 const char *mime_type;
83 struct _Ecore_Wl_Event_Drag_Stop
90 * @brief Ecore functions for dealing with the Wayland window system
92 * Ecore_Wl provides a wrapper and convenience functions for using the
93 * Wayland window system. Function groups for this part of the library
94 * include the following:
95 * @li @ref Ecore_Wl_Init_Group
98 EAPI int ecore_wl_init(const char *name);
99 EAPI int ecore_wl_shutdown(void);
101 EAPI struct wl_display *ecore_wl_display_get(void);
102 EAPI struct wl_shm *ecore_wl_shm_get(void);
103 EAPI struct wl_compositor *ecore_wl_compositor_get(void);
104 EAPI struct wl_shell *ecore_wl_shell_get(void);
105 EAPI struct wl_input_device *ecore_wl_input_device_get(void);
106 EAPI void ecore_wl_screen_size_get(int *w, int *h);
107 EAPI unsigned int ecore_wl_format_get(void);
108 EAPI void ecore_wl_flush(void);
109 EAPI void ecore_wl_sync(void);
110 EAPI void ecore_wl_pointer_xy_get(int *x, int *y);
112 EAPI Ecore_Wl_Drag_Source *ecore_wl_drag_source_create(int hotspot_x, int hotspot_y, int offset_x, int offset_y, const char *mimetype, unsigned int timestamp, void *data);
113 EAPI void ecore_wl_drag_start(Ecore_Wl_Drag_Source *source, struct wl_surface *surface, struct wl_buffer *buffer);
114 EAPI void ecore_wl_drag_stop(void);
116 EAPI extern int ECORE_WL_EVENT_MOUSE_IN;
117 EAPI extern int ECORE_WL_EVENT_MOUSE_OUT;
118 EAPI extern int ECORE_WL_EVENT_FOCUS_IN;
119 EAPI extern int ECORE_WL_EVENT_FOCUS_OUT;
120 EAPI extern int ECORE_WL_EVENT_DRAG_START;
121 EAPI extern int ECORE_WL_EVENT_DRAG_STOP;