aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h')
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h123
1 files changed, 123 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h b/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h
new file mode 100644
index 0000000..fdf6314
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -0,0 +1,123 @@
1#ifndef _ECORE_WAYLAND_H_
2# define _ECORE_WAYLAND_H_
3
4# include <Eina.h>
5# include <wayland-client.h>
6
7# ifdef EAPI
8# undef EAPI
9# endif
10
11# ifdef __GNUC__
12# if __GNUC__ >= 4
13# define EAPI __attribute__ ((visibility("default")))
14# else
15# define EAPI
16# endif
17# else
18# define EAPI
19# endif
20
21typedef struct _Ecore_Wl_Event_Mouse_In Ecore_Wl_Event_Mouse_In;
22typedef struct _Ecore_Wl_Event_Mouse_Out Ecore_Wl_Event_Mouse_Out;
23typedef struct _Ecore_Wl_Event_Focus_In Ecore_Wl_Event_Focus_In;
24typedef struct _Ecore_Wl_Event_Focus_Out Ecore_Wl_Event_Focus_Out;
25
26typedef struct _Ecore_Wl_Drag_Source Ecore_Wl_Drag_Source;
27
28typedef struct _Ecore_Wl_Event_Drag_Start Ecore_Wl_Event_Drag_Start;
29typedef struct _Ecore_Wl_Event_Drag_Stop Ecore_Wl_Event_Drag_Stop;
30
31struct _Ecore_Wl_Event_Mouse_In
32{
33 int modifiers;
34 int x, y;
35
36 struct
37 {
38 int x, y;
39 } root;
40
41 unsigned int window;
42
43 unsigned int time;
44};
45
46struct _Ecore_Wl_Event_Mouse_Out
47{
48 int modifiers;
49 int x, y;
50
51 struct
52 {
53 int x, y;
54 } root;
55
56 unsigned int window;
57
58 unsigned int time;
59};
60
61struct _Ecore_Wl_Event_Focus_In
62{
63 unsigned int window;
64 /* TODO: mode & detail */
65 unsigned int time;
66};
67
68struct _Ecore_Wl_Event_Focus_Out
69{
70 unsigned int window;
71 /* TODO: mode & detail */
72 unsigned int time;
73};
74
75struct _Ecore_Wl_Event_Drag_Start
76{
77 struct wl_data_device *device;
78 struct wl_surface *surface;
79 const char *mime_type;
80 uint32_t timestamp;
81};
82
83struct _Ecore_Wl_Event_Drag_Stop
84{
85
86};
87
88/**
89 * @file
90 * @brief Ecore functions for dealing with the Wayland window system
91 *
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
96 */
97
98EAPI int ecore_wl_init(const char *name);
99EAPI int ecore_wl_shutdown(void);
100
101EAPI struct wl_display *ecore_wl_display_get(void);
102EAPI struct wl_shm *ecore_wl_shm_get(void);
103EAPI struct wl_compositor *ecore_wl_compositor_get(void);
104EAPI struct wl_shell *ecore_wl_shell_get(void);
105EAPI struct wl_input_device *ecore_wl_input_device_get(void);
106EAPI void ecore_wl_screen_size_get(int *w, int *h);
107EAPI unsigned int ecore_wl_format_get(void);
108EAPI void ecore_wl_flush(void);
109EAPI void ecore_wl_sync(void);
110EAPI void ecore_wl_pointer_xy_get(int *x, int *y);
111
112EAPI 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);
113EAPI void ecore_wl_drag_start(Ecore_Wl_Drag_Source *source, struct wl_surface *surface, struct wl_buffer *buffer);
114EAPI void ecore_wl_drag_stop(void);
115
116EAPI extern int ECORE_WL_EVENT_MOUSE_IN;
117EAPI extern int ECORE_WL_EVENT_MOUSE_OUT;
118EAPI extern int ECORE_WL_EVENT_FOCUS_IN;
119EAPI extern int ECORE_WL_EVENT_FOCUS_OUT;
120EAPI extern int ECORE_WL_EVENT_DRAG_START;
121EAPI extern int ECORE_WL_EVENT_DRAG_STOP;
122
123#endif