revert async compositior
[framework/uifw/ecore.git] / src / lib / ecore_wayland / ecore_wl_private.h
1 #ifndef _ECORE_WAYLAND_PRIVATE_H
2 # define _ECORE_WAYLAND_PRIVATE_H
3
4 # include <limits.h>
5 # include <unistd.h>
6
7 # include "Ecore.h"
8 # include "Ecore_Input.h"
9 # include "Ecore_Wayland.h"
10
11 //# define LOGFNS 1
12
13 # ifdef LOGFNS
14 #  include <stdio.h>
15 #  define LOGFN(fl, ln, fn) printf("-ECORE-WL: %25s: %5i - %s\n", fl, ln, fn);
16 # else
17 #  define LOGFN(fl, ln, fn)
18 # endif
19
20 extern int _ecore_wl_log_dom;
21 extern Ecore_Wl_Display *_ecore_wl_disp;
22
23 # ifdef ECORE_WL_DEFAULT_LOG_COLOR
24 #  undef ECORE_WL_DEFAULT_LOG_COLOR
25 # endif
26 # define ECORE_WL_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
27
28 # ifdef ERR
29 #  undef ERR
30 # endif
31 # define ERR(...) EINA_LOG_DOM_ERR(_ecore_wl_log_dom, __VA_ARGS__)
32
33 # ifdef DBG
34 #  undef DBG
35 # endif
36 # define DBG(...) EINA_LOG_DOM_DBG(_ecore_wl_log_dom, __VA_ARGS__)
37
38 # ifdef INF
39 #  undef INF
40 # endif
41 # define INF(...) EINA_LOG_DOM_INFO(_ecore_wl_log_dom, __VA_ARGS__)
42
43 # ifdef WRN
44 #  undef WRN
45 # endif
46 # define WRN(...) EINA_LOG_DOM_WARN(_ecore_wl_log_dom, __VA_ARGS__)
47
48 # ifdef CRIT
49 #  undef CRIT
50 # endif
51 # define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_wl_log_dom, __VA_ARGS__)
52
53 struct _Ecore_Wl_Dnd_Source
54 {
55    struct wl_data_offer *offer;
56    Ecore_Wl_Input *input;
57    struct wl_array types;
58    int refcount;
59    int fd;
60    int x, y;
61
62    /* TODO: task & data_func */
63    void *data;
64 };
65
66 struct _Ecore_Wl_Dnd_Target
67 {
68    Ecore_Wl_Dnd_Source *source;
69 };
70
71 void _ecore_wl_window_init(void);
72 void _ecore_wl_window_shutdown(void);
73
74 void _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id);
75 void _ecore_wl_output_del(Ecore_Wl_Output *output);
76
77 void _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id);
78 void _ecore_wl_input_del(Ecore_Wl_Input *input);
79 void _ecore_wl_input_pointer_xy_get(int *x, int *y);
80
81 void _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, struct wl_data_offer *offer);
82 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);
83 void _ecore_wl_dnd_leave(void *data, struct wl_data_device *data_device __UNUSED__);
84 void _ecore_wl_dnd_motion(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, int x, int y);
85 void _ecore_wl_dnd_drop(void *data, struct wl_data_device *data_device __UNUSED__);
86 void _ecore_wl_dnd_selection(void *data, struct wl_data_device *data_device __UNUSED__, struct wl_data_offer *offer);
87 void _ecore_wl_dnd_del(Ecore_Wl_Dnd_Source *source);
88
89 #endif