1 #ifndef _ECORE_WAYLAND_PRIVATE_H
2 # define _ECORE_WAYLAND_PRIVATE_H
8 # include "Ecore_Input.h"
9 # include "Ecore_Wayland.h"
15 # define LOGFN(fl, ln, fn) printf("-ECORE-WL: %25s: %5i - %s\n", fl, ln, fn);
17 # define LOGFN(fl, ln, fn)
20 extern int _ecore_wl_log_dom;
21 extern Ecore_Wl_Display *_ecore_wl_disp;
23 # ifdef ECORE_WL_DEFAULT_LOG_COLOR
24 # undef ECORE_WL_DEFAULT_LOG_COLOR
26 # define ECORE_WL_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
31 # define ERR(...) EINA_LOG_DOM_ERR(_ecore_wl_log_dom, __VA_ARGS__)
36 # define DBG(...) EINA_LOG_DOM_DBG(_ecore_wl_log_dom, __VA_ARGS__)
41 # define INF(...) EINA_LOG_DOM_INFO(_ecore_wl_log_dom, __VA_ARGS__)
46 # define WRN(...) EINA_LOG_DOM_WARN(_ecore_wl_log_dom, __VA_ARGS__)
51 # define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_wl_log_dom, __VA_ARGS__)
55 Ecore_Wl_Display *ewd;
56 Ecore_Wl_Input *input;
59 struct wl_data_source *data_source;
60 struct wl_array types_offered;
62 /* TODO: dnd specific fields */
65 struct _Ecore_Wl_Dnd_Source
67 struct wl_data_offer *offer;
68 Ecore_Wl_Input *input;
69 struct wl_array types;
74 /* TODO: task & data_func */
78 struct _Ecore_Wl_Dnd_Target
80 Ecore_Wl_Dnd_Source *source;
83 void _ecore_wl_window_init(void);
84 void _ecore_wl_window_shutdown(void);
86 void _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id);
87 void _ecore_wl_output_del(Ecore_Wl_Output *output);
89 void _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id);
90 void _ecore_wl_input_del(Ecore_Wl_Input *input);
91 void _ecore_wl_input_pointer_xy_get(int *x, int *y);
92 void _ecore_wl_input_set_selection(Ecore_Wl_Input *input, struct wl_data_source *source);
94 void _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, struct wl_data_offer *offer);
95 void _ecore_wl_dnd_enter(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer);
96 void _ecore_wl_dnd_leave(void *data, struct wl_data_device *data_device __UNUSED__);
97 void _ecore_wl_dnd_motion(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, int x, int y);
98 void _ecore_wl_dnd_drop(void *data, struct wl_data_device *data_device __UNUSED__);
99 void _ecore_wl_dnd_selection(void *data, struct wl_data_device *data_device __UNUSED__, struct wl_data_offer *offer);
100 void _ecore_wl_dnd_del(Ecore_Wl_Dnd_Source *source);
102 struct wl_data_source *_ecore_wl_create_data_source(Ecore_Wl_Display *ewd);