diff options
author | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
commit | c963d75dfdeec11f82e79e727062fbf89afa2c04 (patch) | |
tree | 895633dbf641110be46f117c29890c49b3ffc0bd /libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c | |
parent | Adding the new extantz viewer and grid manager. (diff) | |
download | SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.zip SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.gz SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.bz2 SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.xz |
Update EFL to latest beta.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c')
-rw-r--r-- | libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c | 694 |
1 files changed, 290 insertions, 404 deletions
diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c index 72e8555..e88fc35 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c | |||
@@ -1,8 +1,8 @@ | |||
1 | #ifdef HAVE_CONFIG_H | 1 | #ifdef HAVE_CONFIG_H |
2 | # include <config.h> | 2 | # include "config.h" |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #define LOGFNS 1 | 5 | //#define LOGFNS 1 |
6 | 6 | ||
7 | #ifdef LOGFNS | 7 | #ifdef LOGFNS |
8 | # include <stdio.h> | 8 | # include <stdio.h> |
@@ -28,15 +28,15 @@ | |||
28 | #include "Ecore_Evas.h" | 28 | #include "Ecore_Evas.h" |
29 | 29 | ||
30 | #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL | 30 | #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL |
31 | # include <wayland-egl.h> | ||
32 | # include <Evas_Engine_Wayland_Egl.h> | 31 | # include <Evas_Engine_Wayland_Egl.h> |
33 | # include <Ecore_Wayland.h> | 32 | # include <Ecore_Wayland.h> |
34 | 33 | ||
35 | /* local structures */ | 34 | /* local structures */ |
36 | typedef struct _EE_Wl_Smart_Data EE_Wl_Smart_Data; | 35 | typedef struct _EE_Wl_Smart_Data EE_Wl_Smart_Data; |
37 | struct _EE_Wl_Smart_Data | 36 | struct _EE_Wl_Smart_Data |
38 | { | 37 | { |
39 | Evas_Object *frame, *text; | 38 | Evas_Object *frame; |
39 | Evas_Object *text; | ||
40 | Evas_Coord x, y, w, h; | 40 | Evas_Coord x, y, w, h; |
41 | }; | 41 | }; |
42 | 42 | ||
@@ -51,40 +51,33 @@ static void _ecore_evas_wl_callback_delete_request_set(Ecore_Evas *ee, void (*fu | |||
51 | static void _ecore_evas_wl_callback_focus_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); | 51 | static void _ecore_evas_wl_callback_focus_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); |
52 | static void _ecore_evas_wl_callback_focus_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); | 52 | static void _ecore_evas_wl_callback_focus_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); |
53 | static void _ecore_evas_wl_callback_mouse_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); | 53 | static void _ecore_evas_wl_callback_mouse_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); |
54 | static void _ecore_evas_wl_callback_mouse_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); | ||
54 | static void _ecore_evas_wl_move(Ecore_Evas *ee, int x, int y); | 55 | static void _ecore_evas_wl_move(Ecore_Evas *ee, int x, int y); |
55 | static void _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h); | 56 | static void _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h); |
56 | static void _ecore_evas_wl_show(Ecore_Evas *ee); | 57 | static void _ecore_evas_wl_show(Ecore_Evas *ee); |
57 | static void _ecore_evas_wl_hide(Ecore_Evas *ee); | 58 | static void _ecore_evas_wl_hide(Ecore_Evas *ee); |
58 | static void _ecore_evas_wl_raise(Ecore_Evas *ee); | 59 | static void _ecore_evas_wl_raise(Ecore_Evas *ee); |
59 | static void _ecore_evas_wl_lower(Ecore_Evas *ee); | 60 | static void _ecore_evas_wl_title_set(Ecore_Evas *ee, const char *title); |
60 | static void _ecore_evas_wl_activate(Ecore_Evas *ee); | ||
61 | static void _ecore_evas_wl_title_set(Ecore_Evas *ee, const char *t); | ||
62 | static void _ecore_evas_wl_name_class_set(Ecore_Evas *ee, const char *n, const char *c); | 61 | static void _ecore_evas_wl_name_class_set(Ecore_Evas *ee, const char *n, const char *c); |
63 | static void _ecore_evas_wl_size_min_set(Ecore_Evas *ee, int w, int h); | 62 | static void _ecore_evas_wl_size_min_set(Ecore_Evas *ee, int w, int h); |
64 | static void _ecore_evas_wl_size_max_set(Ecore_Evas *ee, int w, int h); | 63 | static void _ecore_evas_wl_size_max_set(Ecore_Evas *ee, int w, int h); |
65 | static void _ecore_evas_wl_size_base_set(Ecore_Evas *ee, int w, int h); | 64 | static void _ecore_evas_wl_size_base_set(Ecore_Evas *ee, int w, int h); |
66 | static void _ecore_evas_wl_size_step_set(Ecore_Evas *ee, int w, int h); | 65 | static void _ecore_evas_wl_size_step_set(Ecore_Evas *ee, int w, int h); |
67 | static void _ecore_evas_wl_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y); | ||
68 | static void _ecore_evas_wl_object_cursor_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__); | ||
69 | static void _ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer); | 66 | static void _ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer); |
70 | static void _ecore_evas_wl_focus_set(Ecore_Evas *ee, int focus __UNUSED__); | ||
71 | static void _ecore_evas_wl_iconified_set(Ecore_Evas *ee, int iconify); | 67 | static void _ecore_evas_wl_iconified_set(Ecore_Evas *ee, int iconify); |
72 | static void _ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max); | 68 | static void _ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max); |
73 | static void _ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full __UNUSED__); | 69 | static void _ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full); |
70 | static void _ecore_evas_wl_ignore_events_set(Ecore_Evas *ee, int ignore); | ||
71 | static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha); | ||
72 | static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent); | ||
74 | static int _ecore_evas_wl_render(Ecore_Evas *ee); | 73 | static int _ecore_evas_wl_render(Ecore_Evas *ee); |
75 | static void _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h); | 74 | static void _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h); |
76 | 75 | ||
77 | static Eina_Bool _ecore_evas_wl_event_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event); | 76 | static Eina_Bool _ecore_evas_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event); |
78 | static Eina_Bool _ecore_evas_wl_event_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event); | 77 | static Eina_Bool _ecore_evas_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event); |
79 | static Eina_Bool _ecore_evas_wl_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event); | 78 | static Eina_Bool _ecore_evas_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event); |
80 | static Eina_Bool _ecore_evas_wl_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event); | 79 | static Eina_Bool _ecore_evas_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event); |
81 | static Eina_Bool _ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event); | 80 | static Eina_Bool _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, void *event); |
82 | static Eina_Bool _ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event); | ||
83 | static Eina_Bool _ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event); | ||
84 | static Eina_Bool _ecore_evas_wl_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event); | ||
85 | |||
86 | static void _ecore_evas_wl_handle_configure(void *data, struct wl_shell_surface *shell_surface __UNUSED__, uint32_t timestamp __UNUSED__, uint32_t edges __UNUSED__, int32_t width, int32_t height); | ||
87 | static void _ecore_evas_wl_handle_popup_done(void *data __UNUSED__, struct wl_shell_surface *shell_surface __UNUSED__); | ||
88 | 81 | ||
89 | /* SMART stuff for frame */ | 82 | /* SMART stuff for frame */ |
90 | static Evas_Smart *_ecore_evas_wl_smart = NULL; | 83 | static Evas_Smart *_ecore_evas_wl_smart = NULL; |
@@ -100,94 +93,94 @@ static Evas_Object *_ecore_evas_wl_frame_add(Evas *evas); | |||
100 | 93 | ||
101 | /* local variables */ | 94 | /* local variables */ |
102 | static int _ecore_evas_wl_init_count = 0; | 95 | static int _ecore_evas_wl_init_count = 0; |
103 | static Ecore_Event_Handler *_ecore_evas_wl_event_handlers[8]; | 96 | static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[5]; |
104 | static uint32_t _ecore_evas_wl_btn_timestamp; | ||
105 | static const struct wl_shell_surface_listener _ecore_evas_wl_shell_surface_listener = | ||
106 | { | ||
107 | _ecore_evas_wl_handle_configure, | ||
108 | _ecore_evas_wl_handle_popup_done | ||
109 | }; | ||
110 | 97 | ||
111 | static Ecore_Evas_Engine_Func _ecore_wl_engine_func = | 98 | static Ecore_Evas_Engine_Func _ecore_wl_engine_func = |
112 | { | 99 | { |
113 | _ecore_evas_wl_free, | 100 | _ecore_evas_wl_free, |
114 | _ecore_evas_wl_callback_resize_set, | 101 | _ecore_evas_wl_callback_resize_set, |
115 | _ecore_evas_wl_callback_move_set, | 102 | _ecore_evas_wl_callback_move_set, |
116 | NULL, // callback show set | 103 | NULL, |
117 | NULL, // callback hide set | 104 | NULL, |
118 | _ecore_evas_wl_callback_delete_request_set, | 105 | _ecore_evas_wl_callback_delete_request_set, |
119 | NULL, // callback destroy set | 106 | NULL, |
120 | _ecore_evas_wl_callback_focus_in_set, | 107 | _ecore_evas_wl_callback_focus_in_set, |
121 | _ecore_evas_wl_callback_focus_out_set, | 108 | _ecore_evas_wl_callback_focus_out_set, |
122 | _ecore_evas_wl_callback_mouse_in_set, | 109 | _ecore_evas_wl_callback_mouse_in_set, |
123 | NULL, // callback mouse out set | 110 | _ecore_evas_wl_callback_mouse_out_set, |
124 | NULL, // callback sticky set | 111 | NULL, // sticky_set |
125 | NULL, // callback unsticky set | 112 | NULL, // unsticky_set |
126 | NULL, // callback pre render set | 113 | NULL, // pre_render_set |
127 | NULL, // callback post render set | 114 | NULL, // post_render_set |
128 | _ecore_evas_wl_move, | 115 | _ecore_evas_wl_move, |
129 | NULL, // func managed move | 116 | NULL, // managed_move |
130 | _ecore_evas_wl_resize, | 117 | _ecore_evas_wl_resize, |
131 | NULL, // _ecore_evas_wl_move_resize, | 118 | NULL, // move_resize |
132 | NULL, // func rotation set | 119 | NULL, // rotation_set |
133 | NULL, // func shaped set | 120 | NULL, // shaped_set |
134 | _ecore_evas_wl_show, | 121 | _ecore_evas_wl_show, |
135 | _ecore_evas_wl_hide, | 122 | _ecore_evas_wl_hide, |
136 | _ecore_evas_wl_raise, | 123 | _ecore_evas_wl_raise, |
137 | _ecore_evas_wl_lower, | 124 | NULL, // lower |
138 | _ecore_evas_wl_activate, | 125 | NULL, // activate |
139 | _ecore_evas_wl_title_set, | 126 | _ecore_evas_wl_title_set, |
140 | _ecore_evas_wl_name_class_set, | 127 | _ecore_evas_wl_name_class_set, |
141 | _ecore_evas_wl_size_min_set, | 128 | _ecore_evas_wl_size_min_set, |
142 | _ecore_evas_wl_size_max_set, | 129 | _ecore_evas_wl_size_max_set, |
143 | _ecore_evas_wl_size_base_set, | 130 | _ecore_evas_wl_size_base_set, |
144 | _ecore_evas_wl_size_step_set, | 131 | _ecore_evas_wl_size_step_set, |
145 | _ecore_evas_wl_object_cursor_set, | 132 | NULL, // object_cursor_set |
146 | _ecore_evas_wl_layer_set, | 133 | _ecore_evas_wl_layer_set, |
147 | _ecore_evas_wl_focus_set, | 134 | NULL, // focus set |
148 | _ecore_evas_wl_iconified_set, | 135 | _ecore_evas_wl_iconified_set, |
149 | NULL, // func borderless set | 136 | NULL, // borderless set |
150 | NULL, // func override set | 137 | NULL, // override set |
151 | _ecore_evas_wl_maximized_set, | 138 | _ecore_evas_wl_maximized_set, |
152 | _ecore_evas_wl_fullscreen_set, | 139 | _ecore_evas_wl_fullscreen_set, |
153 | NULL, // _ecore_evas_wl_avoid_damage_set, | 140 | NULL, // func avoid_damage set |
154 | NULL, // func withdrawn set | 141 | NULL, // func withdrawn set |
155 | NULL, // func sticky set | 142 | NULL, // func sticky set |
156 | NULL, // func ignore events set | 143 | _ecore_evas_wl_ignore_events_set, |
157 | NULL, // func alpha set | 144 | _ecore_evas_wl_alpha_set, |
158 | NULL, // func transparent set | 145 | _ecore_evas_wl_transparent_set, |
146 | NULL, | ||
147 | NULL, | ||
148 | NULL, | ||
149 | NULL, | ||
150 | NULL, | ||
151 | NULL, | ||
159 | _ecore_evas_wl_render, | 152 | _ecore_evas_wl_render, |
160 | _ecore_evas_wl_screen_geometry_get | 153 | _ecore_evas_wl_screen_geometry_get |
161 | }; | 154 | }; |
162 | 155 | ||
163 | #endif | 156 | /* external variables */ |
164 | 157 | ||
165 | #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL | 158 | /* external functions */ |
166 | EAPI Ecore_Evas * | 159 | EAPI Ecore_Evas * |
167 | ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, int frame) | 160 | ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame) |
168 | { | 161 | { |
162 | Ecore_Wl_Window *p = NULL; | ||
169 | Evas_Engine_Info_Wayland_Egl *einfo; | 163 | Evas_Engine_Info_Wayland_Egl *einfo; |
170 | Ecore_Evas *ee; | 164 | Ecore_Evas *ee; |
171 | int method = 0; | 165 | int method = 0; |
172 | static int _win_id = 1; | ||
173 | 166 | ||
174 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 167 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
175 | 168 | ||
176 | if (!(method = evas_render_method_lookup("wayland_egl"))) | 169 | if (!(method = evas_render_method_lookup("wayland_egl"))) |
177 | { | 170 | { |
178 | printf("Render method lookup failed for Wayland Egl"); | 171 | ERR("Render method lookup failed for Wayland_Egl"); |
179 | return NULL; | 172 | return NULL; |
180 | } | 173 | } |
181 | 174 | ||
182 | if (!ecore_wl_init(disp_name)) | 175 | if (!ecore_wl_init(disp_name)) |
183 | { | 176 | { |
184 | printf("Failed to initialize Ecore Wayland"); | 177 | ERR("Failed to initialize Ecore_Wayland"); |
185 | return NULL; | 178 | return NULL; |
186 | } | 179 | } |
187 | 180 | ||
188 | if (!(ee = calloc(1, sizeof(Ecore_Evas)))) | 181 | if (!(ee = calloc(1, sizeof(Ecore_Evas)))) |
189 | { | 182 | { |
190 | printf("Failed to allocate Ecore_Evas."); | 183 | ERR("Failed to allocate Ecore_Evas"); |
191 | ecore_wl_shutdown(); | 184 | ecore_wl_shutdown(); |
192 | return NULL; | 185 | return NULL; |
193 | } | 186 | } |
@@ -204,17 +197,22 @@ ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, in | |||
204 | if (w < 1) w = 1; | 197 | if (w < 1) w = 1; |
205 | if (h < 1) h = 1; | 198 | if (h < 1) h = 1; |
206 | 199 | ||
207 | ee->req.x = ee->x = x; | 200 | ee->x = x; |
208 | ee->req.y = ee->y = y; | 201 | ee->y = y; |
209 | ee->req.w = ee->w = w; | 202 | ee->w = w; |
210 | ee->req.h = ee->h = h; | 203 | ee->h = h; |
204 | ee->req.x = ee->x; | ||
205 | ee->req.y = ee->y; | ||
206 | ee->req.w = ee->w; | ||
207 | ee->req.h = ee->h; | ||
211 | ee->rotation = 0; | 208 | ee->rotation = 0; |
212 | ee->prop.max.w = ee->prop.max.h = 32767; | 209 | ee->prop.max.w = 32767; |
210 | ee->prop.max.h = 32767; | ||
213 | ee->prop.layer = 4; | 211 | ee->prop.layer = 4; |
214 | ee->prop.request_pos = 0; | 212 | ee->prop.request_pos = 0; |
215 | ee->prop.sticky = 0; | 213 | ee->prop.sticky = 0; |
216 | ee->prop.draw_frame = frame; | 214 | ee->prop.draw_frame = frame; |
217 | ee->prop.window = _win_id++; | 215 | ee->alpha = EINA_FALSE; |
218 | 216 | ||
219 | ee->evas = evas_new(); | 217 | ee->evas = evas_new(); |
220 | evas_data_attach_set(ee->evas, ee); | 218 | evas_data_attach_set(ee->evas, ee); |
@@ -222,29 +220,43 @@ ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, in | |||
222 | evas_output_size_set(ee->evas, ee->w, ee->h); | 220 | evas_output_size_set(ee->evas, ee->w, ee->h); |
223 | evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); | 221 | evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); |
224 | 222 | ||
225 | if (ee->prop.draw_frame) | 223 | /* FIXME: This needs to be set based on theme & scale */ |
224 | if (ee->prop.draw_frame) | ||
226 | evas_output_framespace_set(ee->evas, 4, 18, 8, 22); | 225 | evas_output_framespace_set(ee->evas, 4, 18, 8, 22); |
227 | 226 | ||
228 | if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) | 227 | if (parent) |
228 | p = ecore_wl_window_find(parent); | ||
229 | |||
230 | /* FIXME: Get if parent is alpha, and set */ | ||
231 | |||
232 | ee->engine.wl.parent = p; | ||
233 | ee->engine.wl.win = | ||
234 | ecore_wl_window_new(p, x, y, w, h, ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW); | ||
235 | ee->prop.window = ee->engine.wl.win->id; | ||
236 | |||
237 | if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) | ||
229 | { | 238 | { |
230 | einfo->info.display = ecore_wl_display_get(); | 239 | einfo->info.display = ecore_wl_display_get(); |
240 | einfo->info.destination_alpha = EINA_FALSE; | ||
231 | einfo->info.rotation = ee->rotation; | 241 | einfo->info.rotation = ee->rotation; |
232 | if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) | 242 | if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) |
233 | { | 243 | { |
234 | printf("Failed to set Evas Engine Info for '%s'.", ee->driver); | 244 | ERR("Failed to set Evas Engine Info for '%s'", ee->driver); |
235 | ecore_evas_free(ee); | 245 | ecore_evas_free(ee); |
246 | _ecore_evas_wl_shutdown(); | ||
247 | ecore_wl_shutdown(); | ||
236 | return NULL; | 248 | return NULL; |
237 | } | 249 | } |
238 | } | 250 | } |
239 | else | 251 | else |
240 | { | 252 | { |
241 | printf("Failed to get Evas Engine Info for '%s'.", ee->driver); | 253 | ERR("Failed to get Evas Engine Info for '%s'", ee->driver); |
242 | ecore_evas_free(ee); | 254 | ecore_evas_free(ee); |
255 | _ecore_evas_wl_shutdown(); | ||
256 | ecore_wl_shutdown(); | ||
243 | return NULL; | 257 | return NULL; |
244 | } | 258 | } |
245 | 259 | ||
246 | /* NB: we need to be notified before 'free' so we can munmap the evas | ||
247 | * engine destination */ | ||
248 | ecore_evas_callback_pre_free_set(ee, _ecore_evas_wl_pre_free); | 260 | ecore_evas_callback_pre_free_set(ee, _ecore_evas_wl_pre_free); |
249 | 261 | ||
250 | if (ee->prop.draw_frame) | 262 | if (ee->prop.draw_frame) |
@@ -270,37 +282,28 @@ ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, in | |||
270 | 282 | ||
271 | /* local functions */ | 283 | /* local functions */ |
272 | static int | 284 | static int |
273 | _ecore_evas_wl_init(void) | 285 | _ecore_evas_wl_init(void) |
274 | { | 286 | { |
275 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 287 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
276 | 288 | ||
277 | if (++_ecore_evas_wl_init_count != 1) | 289 | if (++_ecore_evas_wl_init_count != 1) |
278 | return _ecore_evas_wl_init_count; | 290 | return _ecore_evas_wl_init_count; |
279 | 291 | ||
280 | _ecore_evas_wl_event_handlers[0] = | 292 | _ecore_evas_wl_event_hdls[0] = |
281 | ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, | ||
282 | _ecore_evas_wl_event_mouse_down, NULL); | ||
283 | _ecore_evas_wl_event_handlers[1] = | ||
284 | ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, | ||
285 | _ecore_evas_wl_event_mouse_up, NULL); | ||
286 | _ecore_evas_wl_event_handlers[2] = | ||
287 | ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, | ||
288 | _ecore_evas_wl_event_mouse_move, NULL); | ||
289 | _ecore_evas_wl_event_handlers[3] = | ||
290 | ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, | ||
291 | _ecore_evas_wl_event_mouse_wheel, NULL); | ||
292 | _ecore_evas_wl_event_handlers[4] = | ||
293 | ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_IN, | 293 | ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_IN, |
294 | _ecore_evas_wl_event_mouse_in, NULL); | 294 | _ecore_evas_wl_cb_mouse_in, NULL); |
295 | _ecore_evas_wl_event_handlers[5] = | 295 | _ecore_evas_wl_event_hdls[1] = |
296 | ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_OUT, | 296 | ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_OUT, |
297 | _ecore_evas_wl_event_mouse_out, NULL); | 297 | _ecore_evas_wl_cb_mouse_out, NULL); |
298 | _ecore_evas_wl_event_handlers[6] = | 298 | _ecore_evas_wl_event_hdls[2] = |
299 | ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_IN, | 299 | ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_IN, |
300 | _ecore_evas_wl_event_focus_in, NULL); | 300 | _ecore_evas_wl_cb_focus_in, NULL); |
301 | _ecore_evas_wl_event_handlers[7] = | 301 | _ecore_evas_wl_event_hdls[3] = |
302 | ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_OUT, | 302 | ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_OUT, |
303 | _ecore_evas_wl_event_focus_out, NULL); | 303 | _ecore_evas_wl_cb_focus_out, NULL); |
304 | _ecore_evas_wl_event_hdls[4] = | ||
305 | ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, | ||
306 | _ecore_evas_wl_cb_window_configure, NULL); | ||
304 | 307 | ||
305 | ecore_event_evas_init(); | 308 | ecore_event_evas_init(); |
306 | 309 | ||
@@ -308,7 +311,7 @@ _ecore_evas_wl_init(void) | |||
308 | } | 311 | } |
309 | 312 | ||
310 | static int | 313 | static int |
311 | _ecore_evas_wl_shutdown(void) | 314 | _ecore_evas_wl_shutdown(void) |
312 | { | 315 | { |
313 | unsigned int i = 0; | 316 | unsigned int i = 0; |
314 | 317 | ||
@@ -317,10 +320,10 @@ _ecore_evas_wl_shutdown(void) | |||
317 | if (--_ecore_evas_wl_init_count != 0) | 320 | if (--_ecore_evas_wl_init_count != 0) |
318 | return _ecore_evas_wl_init_count; | 321 | return _ecore_evas_wl_init_count; |
319 | 322 | ||
320 | for (i = 0; i < sizeof(_ecore_evas_wl_event_handlers) / sizeof(Ecore_Event_Handler *); i++) | 323 | for (i = 0; i < sizeof(_ecore_evas_wl_event_hdls) / sizeof(Ecore_Event_Handler *); i++) |
321 | { | 324 | { |
322 | if (_ecore_evas_wl_event_handlers[i]) | 325 | if (_ecore_evas_wl_event_hdls[i]) |
323 | ecore_event_handler_del(_ecore_evas_wl_event_handlers[i]); | 326 | ecore_event_handler_del(_ecore_evas_wl_event_hdls[i]); |
324 | } | 327 | } |
325 | 328 | ||
326 | ecore_event_evas_shutdown(); | 329 | ecore_event_evas_shutdown(); |
@@ -338,24 +341,16 @@ _ecore_evas_wl_pre_free(Ecore_Evas *ee) | |||
338 | } | 341 | } |
339 | 342 | ||
340 | static void | 343 | static void |
341 | _ecore_evas_wl_free(Ecore_Evas *ee) | 344 | _ecore_evas_wl_free(Ecore_Evas *ee) |
342 | { | 345 | { |
343 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 346 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
344 | 347 | ||
345 | if (ee) | 348 | if (ee->engine.wl.win) ecore_wl_window_free(ee->engine.wl.win); |
346 | { | 349 | ee->engine.wl.win = NULL; |
347 | /* destroy shell surface */ | ||
348 | if (ee->engine.wl.shell_surface) | ||
349 | wl_shell_surface_destroy(ee->engine.wl.shell_surface); | ||
350 | ee->engine.wl.shell_surface = NULL; | ||
351 | 350 | ||
352 | /* destroy surface */ | 351 | ecore_event_window_unregister(ee->prop.window); |
353 | if (ee->engine.wl.surface) wl_surface_destroy(ee->engine.wl.surface); | 352 | ecore_evas_input_event_unregister(ee); |
354 | ee->engine.wl.surface = NULL; | ||
355 | 353 | ||
356 | ecore_event_window_unregister(ee->prop.window); | ||
357 | ecore_evas_input_event_unregister(ee); | ||
358 | } | ||
359 | _ecore_evas_wl_shutdown(); | 354 | _ecore_evas_wl_shutdown(); |
360 | ecore_wl_shutdown(); | 355 | ecore_wl_shutdown(); |
361 | } | 356 | } |
@@ -415,138 +410,131 @@ _ecore_evas_wl_callback_mouse_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee | |||
415 | } | 410 | } |
416 | 411 | ||
417 | static void | 412 | static void |
418 | _ecore_evas_wl_move(Ecore_Evas *ee, int x, int y) | 413 | _ecore_evas_wl_callback_mouse_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) |
414 | { | ||
415 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
416 | |||
417 | if (!ee) return; | ||
418 | ee->func.fn_mouse_out = func; | ||
419 | } | ||
420 | |||
421 | static void | ||
422 | _ecore_evas_wl_move(Ecore_Evas *ee, int x, int y) | ||
419 | { | 423 | { |
420 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 424 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
421 | 425 | ||
422 | if (!ee) return; | 426 | if (!ee) return; |
423 | // if ((ee->x == x) && (ee->y == y)) return; | ||
424 | ee->req.x = x; | 427 | ee->req.x = x; |
425 | ee->req.y = y; | 428 | ee->req.y = y; |
426 | |||
427 | ee->x = x; | 429 | ee->x = x; |
428 | ee->y = y; | 430 | ee->y = y; |
429 | if (ee->engine.wl.shell_surface) | 431 | if (ee->engine.wl.win) ecore_wl_window_move(ee->engine.wl.win, x, y); |
430 | { | ||
431 | wl_shell_surface_move(ee->engine.wl.shell_surface, | ||
432 | ecore_wl_input_device_get(), | ||
433 | _ecore_evas_wl_btn_timestamp); | ||
434 | } | ||
435 | if (ee->func.fn_move) ee->func.fn_move(ee); | 432 | if (ee->func.fn_move) ee->func.fn_move(ee); |
436 | } | 433 | } |
437 | 434 | ||
438 | static void | 435 | static void |
439 | _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h) | 436 | _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h) |
440 | { | 437 | { |
441 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 438 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
442 | 439 | ||
443 | if (!ee) return; | 440 | if (!ee) return; |
444 | if (w < 1) w = 1; | 441 | if (w < 1) w = 1; |
445 | if (h < 1) h = 1; | 442 | if (h < 1) h = 1; |
446 | if ((ee->w == w) && (ee->h == h)) return; | 443 | // if ((ee->w == w) && (ee->h == h)) return; |
444 | |||
445 | if (ee->prop.min.w > w) w = ee->prop.min.w; | ||
446 | else if (w > ee->prop.max.w) w = ee->prop.max.w; | ||
447 | if (ee->prop.min.h > h) h = ee->prop.min.h; | ||
448 | else if (h > ee->prop.max.h) h = ee->prop.max.h; | ||
447 | 449 | ||
448 | ee->req.w = w; | 450 | ee->req.w = w; |
449 | ee->req.h = h; | 451 | ee->req.h = h; |
450 | 452 | ||
451 | /* if (ee->visible) */ | 453 | // ecore_wl_window_damage(ee->engine.wl.win, 0, 0, ee->w, ee->h); |
452 | /* { */ | ||
453 | /* damage old surface, if it exists */ | ||
454 | |||
455 | /* NB: This removes any lingering screen artifacts in the compositor. | ||
456 | * This may be a 'HACK' if the issue is actually in the wayland | ||
457 | * compositor, but for now lets implement this so we don't have screen | ||
458 | * artifacts laying around during a resize */ | ||
459 | /* if (ee->engine.wl.surface) */ | ||
460 | /* wl_surface_damage(ee->engine.wl.surface, 0, 0, ee->w, ee->h); */ | ||
461 | /* } */ | ||
462 | 454 | ||
463 | ee->w = w; | 455 | ee->w = w; |
464 | ee->h = h; | 456 | ee->h = h; |
465 | 457 | ||
466 | // ecore_wl_flush(); | 458 | /* change evas output & viewport sizes */ |
467 | |||
468 | evas_output_size_set(ee->evas, ee->w, ee->h); | 459 | evas_output_size_set(ee->evas, ee->w, ee->h); |
469 | evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); | 460 | evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); |
470 | evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); | 461 | evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); |
471 | if (ee->engine.wl.frame) | 462 | if (ee->engine.wl.frame) |
472 | evas_object_resize(ee->engine.wl.frame, ee->w, ee->h); | 463 | evas_object_resize(ee->engine.wl.frame, ee->w, ee->h); |
473 | 464 | ||
474 | /* if ((ee->visible) && (ee->engine.wl.surface)) */ | 465 | /* set new engine destination */ |
475 | /* wl_surface_damage(ee->engine.wl.surface, 0, 0, ee->w, ee->h); */ | 466 | /* evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */ |
467 | |||
468 | /* ecore_wl_window_damage(ee->engine.wl.win, 0, 0, ee->w, ee->h); */ | ||
469 | ecore_wl_flush(); | ||
470 | |||
471 | ecore_wl_window_update_size(ee->engine.wl.win, ee->w, ee->h); | ||
476 | 472 | ||
477 | if (ee->func.fn_resize) ee->func.fn_resize(ee); | 473 | if (ee->func.fn_resize) ee->func.fn_resize(ee); |
478 | } | 474 | } |
479 | 475 | ||
480 | static void | 476 | static void |
481 | _ecore_evas_wl_show(Ecore_Evas *ee) | 477 | _ecore_evas_wl_show(Ecore_Evas *ee) |
482 | { | 478 | { |
483 | Evas_Engine_Info_Wayland_Egl *einfo; | 479 | Evas_Engine_Info_Wayland_Egl *einfo; |
484 | 480 | ||
485 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 481 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
486 | 482 | ||
487 | if (!ee) return; | 483 | if ((!ee) || (ee->visible)) return; |
488 | if (ee->visible) return; | ||
489 | |||
490 | einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas); | ||
491 | 484 | ||
492 | /* create new surface */ | 485 | if (ee->engine.wl.win) |
493 | ee->engine.wl.surface = | 486 | { |
494 | wl_compositor_create_surface(ecore_wl_compositor_get()); | 487 | ecore_wl_window_show(ee->engine.wl.win); |
495 | wl_surface_set_user_data(ee->engine.wl.surface, (void *)ee->prop.window); | 488 | ecore_wl_flush(); |
489 | } | ||
496 | 490 | ||
497 | /* create new shell surface */ | 491 | einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas); |
498 | ee->engine.wl.shell_surface = | 492 | if (!einfo) |
499 | wl_shell_get_shell_surface(ecore_wl_shell_get(), ee->engine.wl.surface); | 493 | { |
494 | ERR("Failed to get Evas Engine Info for '%s'", ee->driver); | ||
495 | return; | ||
496 | } | ||
500 | 497 | ||
501 | /* set the engine surface here. This should trigger an egl window create */ | 498 | einfo->info.surface = ecore_wl_window_surface_get(ee->engine.wl.win); |
502 | einfo->info.surface = ee->engine.wl.surface; | ||
503 | evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); | 499 | evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); |
504 | 500 | ||
505 | /* add listener for configure events (happen on shell surface resize) */ | ||
506 | wl_shell_surface_add_listener(ee->engine.wl.shell_surface, | ||
507 | &_ecore_evas_wl_shell_surface_listener, ee); | ||
508 | |||
509 | /* Raise this surface to the top */ | ||
510 | wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); | ||
511 | |||
512 | if (ee->engine.wl.frame) | 501 | if (ee->engine.wl.frame) |
513 | { | 502 | { |
514 | evas_object_show(ee->engine.wl.frame); | 503 | evas_object_show(ee->engine.wl.frame); |
515 | evas_object_resize(ee->engine.wl.frame, ee->w, ee->h); | 504 | evas_object_resize(ee->engine.wl.frame, ee->w, ee->h); |
516 | } | 505 | } |
517 | 506 | ||
518 | ecore_wl_flush(); | 507 | /* ecore_wl_window_buffer_attach(ee->engine.wl.win, ee->engine.wl.buffer, 0, 0); */ |
519 | 508 | ||
520 | ee->visible = 1; | 509 | ee->visible = 1; |
521 | if (ee->func.fn_show) ee->func.fn_show(ee); | 510 | if (ee->func.fn_show) ee->func.fn_show(ee); |
522 | } | 511 | } |
523 | 512 | ||
524 | static void | 513 | static void |
525 | _ecore_evas_wl_hide(Ecore_Evas *ee) | 514 | _ecore_evas_wl_hide(Ecore_Evas *ee) |
526 | { | 515 | { |
527 | Evas_Engine_Info_Wayland_Egl *einfo; | 516 | Evas_Engine_Info_Wayland_Egl *einfo; |
528 | 517 | ||
529 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 518 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
530 | 519 | ||
531 | if (!ee) return; | 520 | if ((!ee) || (!ee->visible)) return; |
532 | if (!ee->visible) return; | ||
533 | |||
534 | /* get engine info */ | ||
535 | einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas); | ||
536 | einfo->info.surface = NULL; | ||
537 | evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); | ||
538 | 521 | ||
539 | /* destroy shell surface */ | 522 | if (ee->engine.wl.win) |
540 | if (ee->engine.wl.shell_surface) | 523 | { |
541 | wl_shell_surface_destroy(ee->engine.wl.shell_surface); | 524 | ecore_wl_window_hide(ee->engine.wl.win); |
542 | ee->engine.wl.shell_surface = NULL; | 525 | ecore_wl_flush(); |
526 | } | ||
543 | 527 | ||
544 | /* destroy surface */ | 528 | einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas); |
545 | if (ee->engine.wl.surface) wl_surface_destroy(ee->engine.wl.surface); | 529 | if (einfo) |
546 | ee->engine.wl.surface = NULL; | 530 | { |
531 | einfo->info.surface = NULL; | ||
532 | evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); | ||
533 | } | ||
547 | 534 | ||
548 | ee->visible = 0; | 535 | ee->visible = 0; |
549 | ee->should_be_visible = 0; | 536 | ee->should_be_visible = 0; |
537 | |||
550 | if (ee->func.fn_hide) ee->func.fn_hide(ee); | 538 | if (ee->func.fn_hide) ee->func.fn_hide(ee); |
551 | } | 539 | } |
552 | 540 | ||
@@ -556,39 +544,18 @@ _ecore_evas_wl_raise(Ecore_Evas *ee) | |||
556 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 544 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
557 | 545 | ||
558 | if ((!ee) || (!ee->visible)) return; | 546 | if ((!ee) || (!ee->visible)) return; |
559 | if (!ee->engine.wl.shell_surface) return; | 547 | ecore_wl_window_raise(ee->engine.wl.win); |
560 | wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); | ||
561 | } | ||
562 | |||
563 | static void | ||
564 | _ecore_evas_wl_lower(Ecore_Evas *ee) | ||
565 | { | ||
566 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
567 | |||
568 | if ((!ee) || (!ee->visible)) return; | ||
569 | /* FIXME: Need a way to tell Wayland to lower */ | ||
570 | } | ||
571 | |||
572 | static void | ||
573 | _ecore_evas_wl_activate(Ecore_Evas *ee) | ||
574 | { | ||
575 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
576 | |||
577 | if ((!ee) || (!ee->visible)) return; | ||
578 | if (!ee->engine.wl.shell_surface) return; | ||
579 | wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); | ||
580 | } | 548 | } |
581 | 549 | ||
582 | static void | 550 | static void |
583 | _ecore_evas_wl_title_set(Ecore_Evas *ee, const char *t) | 551 | _ecore_evas_wl_title_set(Ecore_Evas *ee, const char *title) |
584 | { | 552 | { |
585 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 553 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
586 | 554 | ||
587 | if (!ee) return; | 555 | if (!ee) return; |
588 | if (ee->prop.title) free(ee->prop.title); | 556 | if (ee->prop.title) free(ee->prop.title); |
589 | ee->prop.title = NULL; | 557 | ee->prop.title = NULL; |
590 | if (t) ee->prop.title = strdup(t); | 558 | if (title) ee->prop.title = strdup(title); |
591 | |||
592 | if ((ee->prop.draw_frame) && (ee->engine.wl.frame)) | 559 | if ((ee->prop.draw_frame) && (ee->engine.wl.frame)) |
593 | { | 560 | { |
594 | EE_Wl_Smart_Data *sd; | 561 | EE_Wl_Smart_Data *sd; |
@@ -666,106 +633,101 @@ _ecore_evas_wl_size_step_set(Ecore_Evas *ee, int w, int h) | |||
666 | } | 633 | } |
667 | 634 | ||
668 | static void | 635 | static void |
669 | _ecore_evas_wl_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y) | 636 | _ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer) |
670 | { | 637 | { |
671 | int x = 0, y = 0; | ||
672 | |||
673 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 638 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
674 | 639 | ||
675 | if (!ee) return; | 640 | if (!ee) return; |
676 | if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); | 641 | if (ee->prop.layer == layer) return; |
677 | ee->prop.cursor.object = NULL; | 642 | if (layer < 1) layer = 1; |
678 | 643 | else if (layer > 255) layer = 255; | |
679 | if (!obj) | 644 | ee->prop.layer = layer; |
680 | { | ||
681 | ee->prop.cursor.layer = 0; | ||
682 | ee->prop.cursor.hot.x = 0; | ||
683 | ee->prop.cursor.hot.y = 0; | ||
684 | return; | ||
685 | } | ||
686 | |||
687 | ee->prop.cursor.object = obj; | ||
688 | ee->prop.cursor.layer = layer; | ||
689 | ee->prop.cursor.hot.x = hot_x; | ||
690 | ee->prop.cursor.hot.y = hot_y; | ||
691 | |||
692 | evas_pointer_output_xy_get(ee->evas, &x, &y); | ||
693 | evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer); | ||
694 | evas_object_move(ee->prop.cursor.object, | ||
695 | x - ee->prop.cursor.hot.x, y - ee->prop.cursor.hot.y); | ||
696 | evas_object_pass_events_set(ee->prop.cursor.object, 1); | ||
697 | if (evas_pointer_inside_get(ee->evas)) | ||
698 | evas_object_show(ee->prop.cursor.object); | ||
699 | |||
700 | evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, | ||
701 | _ecore_evas_wl_object_cursor_del, ee); | ||
702 | } | 645 | } |
703 | 646 | ||
704 | static void | 647 | static void |
705 | _ecore_evas_wl_object_cursor_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__) | 648 | _ecore_evas_wl_iconified_set(Ecore_Evas *ee, int iconify) |
706 | { | 649 | { |
707 | Ecore_Evas *ee; | 650 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
708 | 651 | ||
709 | if (!(ee = data)) return; | 652 | if (!ee) return; |
710 | ee->prop.cursor.object = NULL; | 653 | if (ee->prop.iconified == iconify) return; |
654 | ee->prop.iconified = iconify; | ||
655 | /* FIXME: Implement this in Wayland someshow */ | ||
711 | } | 656 | } |
712 | 657 | ||
713 | static void | 658 | static void |
714 | _ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer) | 659 | _ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max) |
715 | { | 660 | { |
716 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 661 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
717 | 662 | ||
718 | if (!ee) return; | 663 | if (!ee) return; |
719 | if (ee->prop.layer == layer) return; | 664 | if (ee->prop.maximized == max) return; |
720 | if (layer < 1) layer = 1; | 665 | ee->prop.maximized = max; |
721 | else if (layer > 255) layer = 255; | 666 | ecore_wl_window_maximized_set(ee->engine.wl.win, max); |
722 | ee->prop.layer = layer; | ||
723 | } | 667 | } |
724 | 668 | ||
725 | static void | 669 | static void |
726 | _ecore_evas_wl_focus_set(Ecore_Evas *ee, int focus __UNUSED__) | 670 | _ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full) |
727 | { | 671 | { |
728 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 672 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
729 | 673 | ||
730 | if ((!ee) || (!ee->visible)) return; | 674 | if ((!ee) || (!ee->visible)) return; |
731 | if (!ee->engine.wl.shell_surface) return; | 675 | if (ee->prop.fullscreen == full) return; |
732 | wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); | 676 | ee->prop.fullscreen = full; |
677 | ecore_wl_window_fullscreen_set(ee->engine.wl.win, full); | ||
733 | } | 678 | } |
734 | 679 | ||
735 | static void | 680 | static void |
736 | _ecore_evas_wl_iconified_set(Ecore_Evas *ee, int iconify) | 681 | _ecore_evas_wl_ignore_events_set(Ecore_Evas *ee, int ignore) |
737 | { | 682 | { |
738 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 683 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
739 | 684 | ||
740 | if (!ee) return; | 685 | if (!ee) return; |
741 | if (ee->prop.iconified == iconify) return; | 686 | ee->ignore_events = ignore; |
742 | ee->prop.iconified = iconify; | 687 | /* NB: Hmmm, may need to pass this to ecore_wl_window in the future */ |
743 | /* FIXME: Implement this in Wayland someshow */ | ||
744 | } | 688 | } |
745 | 689 | ||
746 | static void | 690 | static void |
747 | _ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max) | 691 | _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha) |
748 | { | 692 | { |
693 | Evas_Engine_Info_Wayland_Egl *einfo; | ||
694 | |||
749 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 695 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
750 | 696 | ||
751 | if (!ee) return; | 697 | if (!ee) return; |
752 | if (ee->prop.maximized == max) return; | 698 | if ((ee->alpha == alpha)) return; |
753 | ee->prop.maximized = max; | 699 | ee->alpha = alpha; |
754 | /* FIXME: Implement this in Wayland someshow */ | 700 | if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) |
701 | { | ||
702 | einfo->info.destination_alpha = alpha; | ||
703 | if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) | ||
704 | ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); | ||
705 | evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); | ||
706 | } | ||
755 | } | 707 | } |
756 | 708 | ||
757 | static void | 709 | static void |
758 | _ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full __UNUSED__) | 710 | _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent) |
759 | { | 711 | { |
712 | Evas_Engine_Info_Wayland_Egl *einfo; | ||
713 | |||
760 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 714 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
761 | 715 | ||
762 | if ((!ee) || (!ee->visible)) return; | 716 | if (!ee) return; |
763 | if (!ee->engine.wl.shell_surface) return; | 717 | if ((ee->transparent == transparent)) return; |
764 | wl_shell_surface_set_fullscreen(ee->engine.wl.shell_surface); | 718 | ee->transparent = transparent; |
719 | if (!ee->visible) return; | ||
720 | if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) | ||
721 | { | ||
722 | einfo->info.destination_alpha = transparent; | ||
723 | if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) | ||
724 | ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); | ||
725 | evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); | ||
726 | } | ||
765 | } | 727 | } |
766 | 728 | ||
767 | static int | 729 | static int |
768 | _ecore_evas_wl_render(Ecore_Evas *ee) | 730 | _ecore_evas_wl_render(Ecore_Evas *ee) |
769 | { | 731 | { |
770 | int rend = 0; | 732 | int rend = 0; |
771 | 733 | ||
@@ -789,26 +751,24 @@ _ecore_evas_wl_render(Ecore_Evas *ee) | |||
789 | 751 | ||
790 | if ((updates = evas_render_updates(ee->evas))) | 752 | if ((updates = evas_render_updates(ee->evas))) |
791 | { | 753 | { |
792 | /* if (ee->engine.wl.surface) */ | 754 | Eina_List *l = NULL; |
793 | /* { */ | 755 | Eina_Rectangle *r; |
794 | /* Eina_List *l = NULL; */ | 756 | |
795 | /* Eina_Rectangle *r; */ | 757 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
796 | 758 | ||
797 | /* EINA_LIST_FOREACH(updates, l, r) */ | 759 | EINA_LIST_FOREACH(updates, l, r) |
798 | /* wl_surface_damage(ee->engine.wl.surface, */ | 760 | ecore_wl_window_damage(ee->engine.wl.win, |
799 | /* r->x, r->y, r->w, r->h); */ | 761 | r->x, r->y, r->w, r->h); |
800 | /* } */ | 762 | |
763 | ecore_wl_flush(); | ||
801 | 764 | ||
802 | evas_render_updates_free(updates); | 765 | evas_render_updates_free(updates); |
803 | _ecore_evas_idle_timeout_update(ee); | 766 | _ecore_evas_idle_timeout_update(ee); |
804 | rend = 1; | 767 | rend = 1; |
805 | |||
806 | ecore_wl_flush(); | ||
807 | } | 768 | } |
808 | 769 | ||
809 | if (ee->func.fn_post_render) ee->func.fn_post_render(ee); | 770 | if (ee->func.fn_post_render) ee->func.fn_post_render(ee); |
810 | } | 771 | } |
811 | |||
812 | return rend; | 772 | return rend; |
813 | } | 773 | } |
814 | 774 | ||
@@ -822,77 +782,18 @@ _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int | |||
822 | ecore_wl_screen_size_get(w, h); | 782 | ecore_wl_screen_size_get(w, h); |
823 | } | 783 | } |
824 | 784 | ||
825 | static Eina_Bool | 785 | void |
826 | _ecore_evas_wl_event_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event) | 786 | _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location) |
827 | { | ||
828 | Ecore_Evas *ee; | ||
829 | Ecore_Event_Mouse_Button *ev; | ||
830 | |||
831 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
832 | |||
833 | ev = event; | ||
834 | _ecore_evas_wl_btn_timestamp = ev->timestamp; | ||
835 | ee = ecore_event_window_match(ev->window); | ||
836 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; | ||
837 | if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; | ||
838 | evas_event_feed_mouse_down(ee->evas, ev->buttons, ev->modifiers, | ||
839 | ev->timestamp, NULL); | ||
840 | return ECORE_CALLBACK_PASS_ON; | ||
841 | } | ||
842 | |||
843 | static Eina_Bool | ||
844 | _ecore_evas_wl_event_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event) | ||
845 | { | ||
846 | Ecore_Evas *ee; | ||
847 | Ecore_Event_Mouse_Button *ev; | ||
848 | |||
849 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
850 | |||
851 | ev = event; | ||
852 | ee = ecore_event_window_match(ev->window); | ||
853 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; | ||
854 | if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; | ||
855 | evas_event_feed_mouse_up(ee->evas, ev->buttons, ev->modifiers, | ||
856 | ev->timestamp, NULL); | ||
857 | return ECORE_CALLBACK_PASS_ON; | ||
858 | } | ||
859 | |||
860 | static Eina_Bool | ||
861 | _ecore_evas_wl_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event) | ||
862 | { | ||
863 | Ecore_Evas *ee; | ||
864 | Ecore_Event_Mouse_Move *ev; | ||
865 | |||
866 | ev = event; | ||
867 | ee = ecore_event_window_match(ev->window); | ||
868 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; | ||
869 | if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; | ||
870 | ee->mouse.x = ev->x; | ||
871 | ee->mouse.y = ev->y; | ||
872 | evas_event_feed_mouse_move(ee->evas, ev->x, ev->y, ev->timestamp, NULL); | ||
873 | _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->timestamp); | ||
874 | return ECORE_CALLBACK_PASS_ON; | ||
875 | } | ||
876 | |||
877 | static Eina_Bool | ||
878 | _ecore_evas_wl_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event) | ||
879 | { | 787 | { |
880 | Ecore_Evas *ee; | ||
881 | Ecore_Event_Mouse_Wheel *ev; | ||
882 | |||
883 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 788 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
884 | 789 | ||
885 | ev = event; | 790 | if (!ee) return; |
886 | ee = ecore_event_window_match(ev->window); | 791 | if (ee->engine.wl.win) |
887 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; | 792 | ecore_wl_window_resize(ee->engine.wl.win, ee->w, ee->h, location); |
888 | if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; | ||
889 | evas_event_feed_mouse_wheel(ee->evas, ev->direction, ev->z, | ||
890 | ev->timestamp, NULL); | ||
891 | return ECORE_CALLBACK_PASS_ON; | ||
892 | } | 793 | } |
893 | 794 | ||
894 | static Eina_Bool | 795 | static Eina_Bool |
895 | _ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event) | 796 | _ecore_evas_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event) |
896 | { | 797 | { |
897 | Ecore_Evas *ee; | 798 | Ecore_Evas *ee; |
898 | Ecore_Wl_Event_Mouse_In *ev; | 799 | Ecore_Wl_Event_Mouse_In *ev; |
@@ -900,18 +801,18 @@ _ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void * | |||
900 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 801 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
901 | 802 | ||
902 | ev = event; | 803 | ev = event; |
903 | ee = ecore_event_window_match(ev->window); | 804 | ee = ecore_event_window_match(ev->win); |
904 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; | 805 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; |
905 | if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; | 806 | if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; |
906 | if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); | 807 | if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); |
907 | ecore_event_evas_modifier_lock_update(ee->evas, ev->modifiers); | 808 | ecore_event_evas_modifier_lock_update(ee->evas, ev->modifiers); |
908 | evas_event_feed_mouse_in(ee->evas, ev->time, NULL); | 809 | evas_event_feed_mouse_in(ee->evas, ev->timestamp, NULL); |
909 | _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->time); | 810 | _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->timestamp); |
910 | return ECORE_CALLBACK_PASS_ON; | 811 | return ECORE_CALLBACK_PASS_ON; |
911 | } | 812 | } |
912 | 813 | ||
913 | static Eina_Bool | 814 | static Eina_Bool |
914 | _ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event) | 815 | _ecore_evas_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event) |
915 | { | 816 | { |
916 | Ecore_Evas *ee; | 817 | Ecore_Evas *ee; |
917 | Ecore_Wl_Event_Mouse_Out *ev; | 818 | Ecore_Wl_Event_Mouse_Out *ev; |
@@ -919,19 +820,19 @@ _ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void | |||
919 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 820 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
920 | 821 | ||
921 | ev = event; | 822 | ev = event; |
922 | ee = ecore_event_window_match(ev->window); | 823 | ee = ecore_event_window_match(ev->win); |
923 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; | 824 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; |
924 | if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; | 825 | if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; |
925 | ecore_event_evas_modifier_lock_update(ee->evas, ev->modifiers); | 826 | ecore_event_evas_modifier_lock_update(ee->evas, ev->modifiers); |
926 | _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->time); | 827 | _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->timestamp); |
927 | evas_event_feed_mouse_out(ee->evas, ev->time, NULL); | 828 | evas_event_feed_mouse_out(ee->evas, ev->timestamp, NULL); |
928 | if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee); | 829 | if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee); |
929 | if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object); | 830 | if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object); |
930 | return ECORE_CALLBACK_PASS_ON; | 831 | return ECORE_CALLBACK_PASS_ON; |
931 | } | 832 | } |
932 | 833 | ||
933 | static Eina_Bool | 834 | static Eina_Bool |
934 | _ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event) | 835 | _ecore_evas_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event) |
935 | { | 836 | { |
936 | Ecore_Evas *ee; | 837 | Ecore_Evas *ee; |
937 | Ecore_Wl_Event_Focus_In *ev; | 838 | Ecore_Wl_Event_Focus_In *ev; |
@@ -939,9 +840,9 @@ _ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void * | |||
939 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 840 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
940 | 841 | ||
941 | ev = event; | 842 | ev = event; |
942 | ee = ecore_event_window_match(ev->window); | 843 | ee = ecore_event_window_match(ev->win); |
943 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; | 844 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; |
944 | if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; | 845 | if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; |
945 | ee->prop.focused = 1; | 846 | ee->prop.focused = 1; |
946 | evas_focus_in(ee->evas); | 847 | evas_focus_in(ee->evas); |
947 | if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); | 848 | if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); |
@@ -949,45 +850,51 @@ _ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void * | |||
949 | } | 850 | } |
950 | 851 | ||
951 | static Eina_Bool | 852 | static Eina_Bool |
952 | _ecore_evas_wl_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event) | 853 | _ecore_evas_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event) |
953 | { | 854 | { |
954 | Ecore_Evas *ee; | 855 | Ecore_Evas *ee; |
955 | Ecore_Wl_Event_Focus_Out *ev; | 856 | Ecore_Wl_Event_Focus_In *ev; |
956 | 857 | ||
957 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 858 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
958 | 859 | ||
959 | ev = event; | 860 | ev = event; |
960 | ee = ecore_event_window_match(ev->window); | 861 | ee = ecore_event_window_match(ev->win); |
961 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; | 862 | if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; |
962 | if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; | 863 | if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; |
963 | evas_focus_out(ee->evas); | 864 | evas_focus_out(ee->evas); |
964 | ee->prop.focused = 0; | 865 | ee->prop.focused = 0; |
965 | if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee); | 866 | if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee); |
966 | return ECORE_CALLBACK_PASS_ON; | 867 | return ECORE_CALLBACK_PASS_ON; |
967 | } | 868 | } |
968 | 869 | ||
969 | static void | 870 | static Eina_Bool |
970 | _ecore_evas_wl_handle_configure(void *data, struct wl_shell_surface *shell_surface, uint32_t timestamp __UNUSED__, uint32_t edges __UNUSED__, int32_t width, int32_t height) | 871 | _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, void *event) |
971 | { | 872 | { |
972 | Ecore_Evas *ee; | 873 | Ecore_Evas *ee; |
874 | Ecore_Wl_Event_Window_Configure *ev; | ||
973 | 875 | ||
974 | /* NB: Trap to prevent compositor from crashing */ | 876 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
975 | if ((width <= 0) || (height <= 0)) return; | ||
976 | |||
977 | if (!(ee = data)) return; | ||
978 | 877 | ||
979 | printf("EGL Handle Configure Message\n"); | 878 | ev = event; |
980 | if ((shell_surface) && (ee->engine.wl.shell_surface)) | 879 | ee = ecore_event_window_match(ev->win); |
880 | if (!ee) return ECORE_CALLBACK_PASS_ON; | ||
881 | if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; | ||
882 | if ((ee->x != ev->x) || (ee->y != ev->y)) | ||
981 | { | 883 | { |
982 | if (ee->engine.wl.shell_surface != shell_surface) return; | 884 | ee->x = ev->x; |
983 | ecore_evas_resize(ee, width, height); | 885 | ee->y = ev->y; |
886 | ee->req.x = ee->x; | ||
887 | ee->req.y = ee->y; | ||
888 | if (ee->func.fn_move) ee->func.fn_move(ee); | ||
889 | } | ||
890 | if ((ee->req.w != ev->w) || (ee->req.h != ev->h)) | ||
891 | { | ||
892 | ee->req.w = ev->w; | ||
893 | ee->req.h = ev->h; | ||
894 | if (ee->func.fn_resize) ee->func.fn_resize(ee); | ||
984 | } | 895 | } |
985 | } | ||
986 | |||
987 | static void | ||
988 | _ecore_evas_wl_handle_popup_done(void *data __UNUSED__, struct wl_shell_surface *shell_surface __UNUSED__) | ||
989 | { | ||
990 | 896 | ||
897 | return ECORE_CALLBACK_PASS_ON; | ||
991 | } | 898 | } |
992 | 899 | ||
993 | static void | 900 | static void |
@@ -1101,30 +1008,9 @@ _ecore_evas_wl_frame_add(Evas *evas) | |||
1101 | return evas_object_smart_add(evas, _ecore_evas_wl_smart); | 1008 | return evas_object_smart_add(evas, _ecore_evas_wl_smart); |
1102 | } | 1009 | } |
1103 | 1010 | ||
1104 | void | ||
1105 | _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location) | ||
1106 | { | ||
1107 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1108 | |||
1109 | if ((!ee) || (!ee->engine.wl.shell_surface)) return; | ||
1110 | wl_shell_surface_resize(ee->engine.wl.shell_surface, | ||
1111 | ecore_wl_input_device_get(), | ||
1112 | _ecore_evas_wl_btn_timestamp, location); | ||
1113 | } | ||
1114 | |||
1115 | void | ||
1116 | _ecore_evas_wayland_egl_drag_start(Ecore_Evas *ee, Ecore_Evas *drag_ee, void *source) | ||
1117 | { | ||
1118 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1119 | |||
1120 | if ((!ee) || (!ee->engine.wl.surface)) return; | ||
1121 | if ((!source) || (!drag_ee)) return; | ||
1122 | ecore_wl_drag_start(source, ee->engine.wl.surface, drag_ee->engine.wl.buffer); | ||
1123 | } | ||
1124 | |||
1125 | #else | 1011 | #else |
1126 | EAPI Ecore_Evas * | 1012 | EAPI Ecore_Evas * |
1127 | ecore_evas_wayland_egl_new(const char *disp_name __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, int frame __UNUSED__) | 1013 | ecore_evas_wayland_egl_new(const char *disp_name __UNUSED__, unsigned int parent __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, Eina_Bool frame __UNUSED__) |
1128 | { | 1014 | { |
1129 | return NULL; | 1015 | return NULL; |
1130 | } | 1016 | } |