1 #ifndef _ECORE_EVAS_PRIVATE_H
2 #define _ECORE_EVAS_PRIVATE_H
3
4 #ifdef EAPI
5 # undef EAPI
6 #endif
7
8 #ifdef _WIN32
9 # ifdef EFL_BUILD
10 # ifdef DLL_EXPORT
11 # define EAPI __declspec(dllexport)
12 # else
13 # define EAPI
14 # endif
15 # else
16 # define EAPI __declspec(dllimport)
17 # endif
18 #else
19 # ifdef __GNUC__
20 # if __GNUC__ >= 4
21 # define EAPI __attribute__ ((visibility("default")))
22 # else
23 # define EAPI
24 # endif
25 # else
26 # define EAPI
27 # endif
28 #endif
29
30 #define ECORE_MAGIC_EVAS 0x76543211
31
32 /** Log domain macros and variables **/
33
34 EAPI extern int _ecore_evas_log_dom;
35
36 EAPI extern Eina_Error ecore_evas_no_matching_type;
37 EAPI extern Eina_Error ecore_evas_no_selection;
38 EAPI extern Eina_Error ecore_evas_request_replaced;
39
40 #ifdef ECORE_EVAS_DEFAULT_LOG_COLOR
41 # undef ECORE_EVAS_DEFAULT_LOG_COLOR
42 #endif
43 #define ECORE_EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
44
45 #ifdef ERR
46 # undef ERR
47 #endif
48 #define ERR(...) EINA_LOG_DOM_ERR(_ecore_evas_log_dom, __VA_ARGS__)
49 #ifdef DBG
50 # undef DBG
51 #endif
52 #define DBG(...) EINA_LOG_DOM_DBG(_ecore_evas_log_dom, __VA_ARGS__)
53 #ifdef INF
54 # undef INF
55 #endif
56 #define INF(...) EINA_LOG_DOM_INFO(_ecore_evas_log_dom, __VA_ARGS__)
57 #ifdef WRN
58 # undef WRN
59 #endif
60 #define WRN(...) EINA_LOG_DOM_WARN(_ecore_evas_log_dom, __VA_ARGS__)
61 #ifdef CRI
62 # undef CRI
63 #endif
64 #define CRI(...) EINA_LOG_DOM_CRIT(_ecore_evas_log_dom, __VA_ARGS__)
65
66 #define PORTRAIT_CHECK(r) \
67 ((r == 0) || (r == 180))
68
69 #define ECORE_EVAS_PORTRAIT(ee) \
70 (PORTRAIT_CHECK(ee->rotation))
71
72
73 #define IDLE_FLUSH_TIME 0.5
74 #ifndef _ECORE_EVAS_H
75 typedef struct _Ecore_Evas Ecore_Evas;
76 typedef void (*Ecore_Evas_Event_Cb) (Ecore_Evas *ee);
77 #endif
78
79 typedef struct _Ecore_Evas_Engine Ecore_Evas_Engine;
80 typedef struct _Ecore_Evas_Engine_Func Ecore_Evas_Engine_Func;
81 typedef struct _Ecore_Evas_Interface Ecore_Evas_Interface;
82 typedef struct _Ecore_Evas_Aux_Hint Ecore_Evas_Aux_Hint;
83 typedef struct _Ecore_Evas_Cursor Ecore_Evas_Cursor;
84
85 typedef Eina_Bool (*Ecore_Evas_Selection_Internal_Delivery)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, const char *type, Eina_Rw_Slice *slice);
86 typedef void (*Ecore_Evas_Selection_Internal_Cancel)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer);
87 typedef struct
88 {
89 Ecore_Evas_Selection_Internal_Delivery delivery;
90 Ecore_Evas_Selection_Internal_Cancel cancel;
91 Eina_Array *available_types;
92 } Ecore_Evas_Selection_Callbacks;
93
94 /* Engines interfaces */
95 struct _Ecore_Evas_Engine_Func
96 {
97 void (*fn_free) (Ecore_Evas *ee);
98 void (*fn_callback_resize_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
99 void (*fn_callback_move_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
100 void (*fn_callback_show_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
101 void (*fn_callback_hide_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
102 void (*fn_callback_delete_request_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
103 void (*fn_callback_destroy_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
104 void (*fn_callback_focus_in_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
105 void (*fn_callback_focus_out_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
106 void (*fn_callback_mouse_in_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
107 void (*fn_callback_mouse_out_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
108 void (*fn_callback_sticky_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
109 void (*fn_callback_unsticky_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
110 void (*fn_callback_pre_render_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
111 void (*fn_callback_post_render_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
112 void (*fn_move) (Ecore_Evas *ee, int x, int y);
113 void (*fn_managed_move) (Ecore_Evas *ee, int x, int y);
114 void (*fn_resize) (Ecore_Evas *ee, int w, int h);
115 void (*fn_move_resize) (Ecore_Evas *ee, int x, int y, int w, int h);
116 void (*fn_rotation_set) (Ecore_Evas *ee, int rot, int resize);
117 void (*fn_shaped_set) (Ecore_Evas *ee, int shaped);
118 void (*fn_show) (Ecore_Evas *ee);
119 void (*fn_hide) (Ecore_Evas *ee);
120 void (*fn_raise) (Ecore_Evas *ee);
121 void (*fn_lower) (Ecore_Evas *ee);
122 void (*fn_activate) (Ecore_Evas *ee);
123 void (*fn_title_set) (Ecore_Evas *ee, const char *t);
124 void (*fn_name_class_set) (Ecore_Evas *ee, const char *n, const char *c);
125 void (*fn_size_min_set) (Ecore_Evas *ee, int w, int h);
126 void (*fn_size_max_set) (Ecore_Evas *ee, int w, int h);
127 void (*fn_size_base_set) (Ecore_Evas *ee, int w, int h);
128 void (*fn_size_step_set) (Ecore_Evas *ee, int w, int h);
129 void (*fn_object_cursor_set) (Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y);
130 void (*fn_object_cursor_unset) (Ecore_Evas *ee);
131 void (*fn_layer_set) (Ecore_Evas *ee, int layer);
132 void (*fn_focus_set) (Ecore_Evas *ee, Eina_Bool on);
133 void (*fn_iconified_set) (Ecore_Evas *ee, Eina_Bool on);
134 void (*fn_borderless_set) (Ecore_Evas *ee, Eina_Bool on);
135 void (*fn_override_set) (Ecore_Evas *ee, Eina_Bool on);
136 void (*fn_maximized_set) (Ecore_Evas *ee, Eina_Bool on);
137 void (*fn_fullscreen_set) (Ecore_Evas *ee, Eina_Bool on);
138 void (*fn_avoid_damage_set) (Ecore_Evas *ee, int on);
139 void (*fn_withdrawn_set) (Ecore_Evas *ee, Eina_Bool on);
140 void (*fn_sticky_set) (Ecore_Evas *ee, Eina_Bool on);
141 void (*fn_ignore_events_set) (Ecore_Evas *ee, int ignore);
142 void (*fn_alpha_set) (Ecore_Evas *ee, int alpha);
143 void (*fn_transparent_set) (Ecore_Evas *ee, int transparent);
144 void (*fn_profiles_set) (Ecore_Evas *ee, const char **profiles, int count);
145 void (*fn_profile_set) (Ecore_Evas *ee, const char *profile);
146
147 void (*fn_window_group_set) (Ecore_Evas *ee, const Ecore_Evas *ee_group);
148 void (*fn_aspect_set) (Ecore_Evas *ee, double aspect);
149 void (*fn_urgent_set) (Ecore_Evas *ee, Eina_Bool on);
150 void (*fn_modal_set) (Ecore_Evas *ee, Eina_Bool on);
151 void (*fn_demands_attention_set) (Ecore_Evas *ee, Eina_Bool on);
152 void (*fn_focus_skip_set) (Ecore_Evas *ee, Eina_Bool on);
153
154 int (*fn_render) (Ecore_Evas *ee);
155 void (*fn_screen_geometry_get) (const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
156 void (*fn_screen_dpi_get) (const Ecore_Evas *ee, int *xdpi, int *ydpi);
157 void (*fn_msg_parent_send) (Ecore_Evas *ee, int maj, int min, void *data, int size);
158 void (*fn_msg_send) (Ecore_Evas *ee, int maj, int min, void *data, int size);
159
160 /* 1.8 abstractions */
161 void (*fn_pointer_xy_get) (const Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y);
162 Eina_Bool (*fn_pointer_warp) (const Ecore_Evas *ee, Evas_Coord x, Evas_Coord y);
163
164 void (*fn_wm_rot_preferred_rotation_set) (Ecore_Evas *ee, int rot);
165 void (*fn_wm_rot_available_rotations_set) (Ecore_Evas *ee, const int *rots, unsigned int count);
166 void (*fn_wm_rot_manual_rotation_done_set) (Ecore_Evas *ee, Eina_Bool set);
167 void (*fn_wm_rot_manual_rotation_done) (Ecore_Evas *ee);
168
169 void (*fn_aux_hints_set) (Ecore_Evas *ee, const char *hints);
170
171 void (*fn_animator_register) (Ecore_Evas *ee);
172 void (*fn_animator_unregister)(Ecore_Evas *ee);
173
174 void (*fn_evas_changed)(Ecore_Evas *ee, Eina_Bool changed);
175
176 void (*fn_focus_device_set) (Ecore_Evas *ee, Efl_Input_Device *seat, Eina_Bool on);
177 void (*fn_callback_focus_device_in_set) (Ecore_Evas *ee, Ecore_Evas_Focus_Device_Event_Cb func);
178 void (*fn_callback_focus_device_out_set) (Ecore_Evas *ee, Ecore_Evas_Focus_Device_Event_Cb func);
179
180 void (*fn_callback_device_mouse_in_set) (Ecore_Evas *ee, Ecore_Evas_Mouse_IO_Cb func);
181 void (*fn_callback_device_mouse_out_set) (Ecore_Evas *ee, Ecore_Evas_Mouse_IO_Cb func);
182 void (*fn_pointer_device_xy_get)(const Ecore_Evas *ee, const Efl_Input_Device *pointer, Evas_Coord *x, Evas_Coord *y);
183
184 Eina_Bool (*fn_prepare)(Ecore_Evas *ee);
185
186 double (*fn_last_tick_get)(Ecore_Evas *ee);
187
188 Eina_Bool (*fn_selection_claim)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel);
189 Eina_Bool (*fn_selection_has_owner)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection);
190 Eina_Future* (*fn_selection_request)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *acceptable_types); // a future containing a Eina_Content, type must be in acceptable_types
191 Eina_Bool (*fn_dnd_start)(Ecore_Evas *ee, unsigned int seat, Eina_Array *available_types, Ecore_Evas *drag_rep, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel, const char *action);
192 Eina_Bool (*fn_dnd_stop)(Ecore_Evas *ee, unsigned int seat);
193 };
194
195 struct _Ecore_Evas_Interface
196 {
197 const char *name;
198 unsigned int version;
199 };
200
201 struct _Ecore_Evas_Engine
202 {
203 Ecore_Evas_Engine_Func *func;
204 void *data;
205 Eina_List *ifaces;
206 Ecore_Timer *idle_flush_timer;
207 #ifdef BUILD_ECORE_EVAS_EWS
208 struct
209 {
210 Evas_Object *image;
211 } ews;
212 #endif
213 };
214
215 struct _Ecore_Evas_Cursor
216 {
217 Evas_Object *object;
218 int layer;
219 struct
220 {
221 int x, y;
222 } hot;
223 int pos_x;
224 int pos_y;
225 };
226
227 typedef struct
228 {
229 unsigned int seat;
230 Eina_Content *selection_buffer[ECORE_EVAS_SELECTION_BUFFER_LAST];
231 } Ecore_Evas_Selection_Seat_Buffers;
232
233 struct _Ecore_Evas
234 {
235 EINA_INLIST;
236 ECORE_MAGIC;
237 Evas *evas;
238 const char *driver;
239 char *name;
240 int x, y, w, h;
241 short rotation;
242 Eina_Bool shaped : 1;
243 Eina_Bool visible : 1;
244 Eina_Bool draw_block : 1;
245 Eina_Bool should_be_visible : 1;
246 Eina_Bool alpha : 1;
247 Eina_Bool transparent : 1;
248 Eina_Bool events_block : 1; /* @since 1.14 */
249
250 Eina_Hash *data;
251 Eina_List *mice_in;
252
253 Eina_List *vnc_server; /* @since 1.19 */
254
255 Eina_Hash *selection_buffers;
256
257 struct
258 {
259 int x, y, w, h;
260 } req;
261
262 struct
263 {
264 int l, r, t, b;
265 int changed : 1;
266 } shadow;
267
268 struct
269 {
270 int w, h;
271 } expecting_resize;
272
273 struct
274 {
275 int w, h;
276 } framespace;
277
278 struct
279 {
280 Eina_Hash *cursors;
281 char *title;
282 char *name;
283 char *clas;
284 struct
285 {
286 char *name;
287 char **available_list;
288 int count;
289 } profile;
290 struct
291 {
292 int w, h;
293 } min, max, base, step;
294 Ecore_Evas_Cursor cursor_cache;
295 struct
296 {
297 Eina_Bool supported; // indicate that the underlying window system supports window manager rotation protocol
298 Eina_Bool app_set; // indicate that the ee supports window manager rotation protocol
299 Eina_Bool win_resize; // indicate that the ee will be resized by the WM
300 int angle; // rotation value which is decided by the WM
301 int w, h; // window size to rotate
302 int preferred_rot; // preferred rotation hint
303 int *available_rots; // array of avaialable rotation values
304 unsigned int count; // number of elements of available_rots
305 struct
306 {
307 Eina_Bool set;
308 Eina_Bool wait_for_done;
309 Ecore_Timer *timer;
310 } manual_mode;
311 } wm_rot;
312 struct
313 {
314 Eina_List *supported_list;
315 Eina_List *hints;
316 int id;
317 } aux_hint;
318 Eina_List *focused_by;
319 int layer;
320 Ecore_Window window;
321 unsigned char avoid_damage;
322 Ecore_Evas *group_ee;
323 Ecore_Window group_ee_win;
324 double aspect;
325 Eina_Bool iconified : 1;
326 Eina_Bool borderless : 1;
327 Eina_Bool override : 1;
328 Eina_Bool maximized : 1;
329 Eina_Bool fullscreen : 1;
330 Eina_Bool withdrawn : 1;
331 Eina_Bool sticky : 1;
332 Eina_Bool request_pos : 1;
333 Eina_Bool hwsurface : 1;
334 Eina_Bool urgent : 1;
335 Eina_Bool modal : 1;
336 Eina_Bool demand_attention : 1;
337 Eina_Bool focus_skip : 1;
338 Eina_Bool focused : 1;
339 } prop;
340
341 struct
342 {
343 void (*fn_resize) (Ecore_Evas *ee);
344 void (*fn_move) (Ecore_Evas *ee);
345 void (*fn_show) (Ecore_Evas *ee);
346 void (*fn_hide) (Ecore_Evas *ee);
347 void (*fn_delete_request) (Ecore_Evas *ee);
348 void (*fn_destroy) (Ecore_Evas *ee);
349 void (*fn_focus_in) (Ecore_Evas *ee);
350 void (*fn_focus_out) (Ecore_Evas *ee);
351 void (*fn_sticky) (Ecore_Evas *ee);
352 void (*fn_unsticky) (Ecore_Evas *ee);
353 void (*fn_mouse_in) (Ecore_Evas *ee);
354 void (*fn_mouse_out) (Ecore_Evas *ee);
355 void (*fn_pre_render) (Ecore_Evas *ee);
356 void (*fn_post_render) (Ecore_Evas *ee);
357 void (*fn_pre_free) (Ecore_Evas *ee);
358 void (*fn_state_change) (Ecore_Evas *ee);
359 void (*fn_msg_parent_handle) (Ecore_Evas *ee, int maj, int min, void *data, int size);
360 void (*fn_msg_handle) (Ecore_Evas *ee, int maj, int min, void *data, int size);
361 void (*fn_pointer_xy_get) (const Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y);
362 Eina_Bool (*fn_pointer_warp) (const Ecore_Evas *ee, Evas_Coord x, Evas_Coord y);
363 void (*fn_focus_device_in) (Ecore_Evas *ee, Efl_Input_Device *seat);
364 void (*fn_focus_device_out) (Ecore_Evas *ee, Efl_Input_Device *seat);
365 void (*fn_device_mouse_in) (Ecore_Evas *ee, Efl_Input_Device *mouse);
366 void (*fn_device_mouse_out) (Ecore_Evas *ee, Efl_Input_Device *mouse);
367 void (*fn_selection_changed) (Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection);
368 void (*fn_dnd_motion) (Ecore_Evas *ee, unsigned int seat, Eina_Position2D p);
369 void (*fn_dnd_state_change) (Ecore_Evas *ee, unsigned int seat, Eina_Position2D p, Eina_Bool inside);
370 void (*fn_dnd_drop)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p, const char *action);
371 } func;
372
373 Ecore_Evas_Engine engine;
374 Eina_List *sub_ecore_evas;
375
376 // Animator code
377 Ecore_Animator *anim;
378 unsigned int animator_count;
379
380 struct
381 {
382 Eina_Inlist *active;
383 Eina_Inlist *deleted;
384 Eina_Inlist *suspended;
385 Eina_Inlist *run_list;
386 } ee_anim;
387
388 struct
389 {
390 unsigned char avoid_damage;
391 unsigned char resize_shape : 1;
392 unsigned char shaped : 1;
393 unsigned char shaped_changed : 1;
394 unsigned char alpha : 1;
395 unsigned char alpha_changed : 1;
396 unsigned char transparent : 1;
397 unsigned char transparent_changed : 1;
398 int rotation;
399 int rotation_resize;
400 unsigned char rotation_changed : 1;
401 } delayed;
402
403 Eina_Hash *active_drags;
404 struct
405 {
406 Ecore_Evas *rep;
407 void *data;
408 Ecore_Evas_Drag_Finished_Cb free;
409 Eina_Bool accepted;
410 } drag;
411
412 int refcount;
413 //#define ECORE_EVAS_ASYNC_RENDER_DEBUG 1 /* TODO: remove me */
414 #ifdef ECORE_EVAS_ASYNC_RENDER_DEBUG
415 double async_render_start;
416 #endif
417
418 unsigned char ignore_events : 1;
419 unsigned char manual_render : 1;
420 unsigned char registered : 1;
421 unsigned char no_comp_sync : 1;
422 unsigned char deleted : 1;
423 unsigned char profile_supported : 1;
424 unsigned char in_async_render : 1;
425 unsigned char can_async_render : 1;
426
427 unsigned char animator_registered : 1;
428 unsigned char animator_ticked : 1;
429 unsigned char animator_ran : 1;
430 unsigned char first_frame : 1;
431 unsigned char self_del : 1;
432 unsigned char evas_dying : 1;
433 unsigned char fallback_interface : 1;
434 };
435
436 struct _Ecore_Evas_Aux_Hint
437 {
438 int id; // ID of aux hint
439 const char *hint; // hint string
440 const char *val; // value string
441 unsigned char allowed : 1; // received allowed event from the window manager
442 unsigned char notified : 1; // let caller know ee has got response for this aux hint
443 };
444
445 EAPI void _ecore_evas_ref(Ecore_Evas *ee);
446 EAPI void _ecore_evas_unref(Ecore_Evas *ee);
447 EAPI int ecore_evas_buffer_render(Ecore_Evas *ee);
448
449 EAPI void _ecore_evas_fps_debug_init(void);
450 EAPI void _ecore_evas_fps_debug_shutdown(void);
451 EAPI void _ecore_evas_fps_debug_rendertime_add(double t);
452 EAPI void _ecore_evas_register(Ecore_Evas *ee);
453 EAPI void _ecore_evas_subregister(Ecore_Evas *ee_target, Ecore_Evas *ee);
454 EAPI void _ecore_evas_register_animators(Ecore_Evas *ee);
455 EAPI void _ecore_evas_free(Ecore_Evas *ee);
456 EAPI void _ecore_evas_idle_timeout_update(Ecore_Evas *ee);
457 EAPI void _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y, unsigned int timestamp);
458 EAPI void _ecore_evas_mouse_device_move_process(Ecore_Evas *ee, Efl_Input_Device *pointer,
459 int x, int y, unsigned int timestamp);
460 EAPI void _ecore_evas_mouse_multi_move_process(Ecore_Evas *ee, int device,
461 int x, int y,
462 double radius,
463 double radius_x, double radius_y,
464 double pressure,
465 double angle,
466 double mx, double my,
467 unsigned int timestamp);
468 EAPI void _ecore_evas_mouse_multi_down_process(Ecore_Evas *ee, int device,
469 int x, int y,
470 double radius,
471 double radius_x, double radius_y,
472 double pressure,
473 double angle,
474 double mx, double my,
475 Evas_Button_Flags flags,
476 unsigned int timestamp);
477 EAPI void _ecore_evas_mouse_multi_up_process(Ecore_Evas *ee, int device,
478 int x, int y,
479 double radius,
480 double radius_x, double radius_y,
481 double pressure,
482 double angle,
483 double mx, double my,
484 Evas_Button_Flags flags,
485 unsigned int timestamp);
486 EAPI Eina_Bool _ecore_evas_input_direct_cb(void *window, int type, const void *info);
487
488 EAPI extern Eina_Bool _ecore_evas_app_comp_sync;
489
490
491 EAPI Ecore_Evas_Interface *_ecore_evas_interface_get(const Ecore_Evas *ee, const char *iname);
492
493 /**
494 * @brief Free the string of the window profile.
495 *
496 * This is a helper function to free window profile.
497 */
498 EAPI void _ecore_evas_window_profile_free(Ecore_Evas *ee);
499
500 /**
501 * @brief Free the string array of available window profiles.
502 *
503 * This is a helper function to free available window profiles.
504 */
505 EAPI void _ecore_evas_window_available_profiles_free(Ecore_Evas *ee);
506
507 #ifdef BUILD_ECORE_EVAS_EWS
508 void _ecore_evas_ews_events_init(void);
509 void _ecore_evas_ews_events_flush(void);
510 int _ecore_evas_ews_shutdown(void);
511 #endif
512
513 void _ecore_evas_extn_init(void);
514 void _ecore_evas_extn_shutdown(void);
515
516 EAPI Eina_Strbuf *_ecore_evas_aux_hints_string_get(Ecore_Evas *ee);
517 void _ecore_evas_aux_hint_free(Ecore_Evas *ee);
518
519 Eina_Module *_ecore_evas_engine_load(const char *engine);
520 const Eina_List *_ecore_evas_available_engines_get(void);
521 void _ecore_evas_engine_init(void);
522 void _ecore_evas_engine_shutdown(void);
523
524 EAPI void ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport, double loop_time);
525
526 Eina_Module *_ecore_evas_vnc_server_module_load(void);
527
528 EAPI void _ecore_evas_focus_device_set(Ecore_Evas *ee, Efl_Input_Device *seat,
529 Eina_Bool on);
530
531 EAPI Eina_Bool _ecore_evas_mouse_in_check(Ecore_Evas *ee, Efl_Input_Device *mouse);
532 EAPI void _ecore_evas_mouse_inout_set(Ecore_Evas *ee, Efl_Input_Device *mouse,
533 Eina_Bool in, Eina_Bool force_out);
534
535 EAPI Evas_Object *_ecore_evas_default_cursor_image_get(Ecore_Evas *ee);
536 EAPI void _ecore_evas_default_cursor_hide(Ecore_Evas *ee);
537
538 Eina_Bool _ecore_evas_cursors_init(Ecore_Evas *ee);
539
540 EAPI void ecore_evas_render_wait(Ecore_Evas *ee);
541 EAPI Eina_Bool ecore_evas_render(Ecore_Evas *ee);
542
543 EAPI Evas *ecore_evas_evas_new(Ecore_Evas *ee, int w, int h);
544 EAPI void ecore_evas_done(Ecore_Evas *ee, Eina_Bool single_window);
545 EAPI void ecore_evas_dnd_mark_motion_used(Ecore_Evas *ee, unsigned int seat);
546 EAPI Eina_Bool ecore_evas_dnd_position_set(Ecore_Evas *ee, unsigned int seat, Eina_Position2D pos);
547 EAPI void ecore_evas_dnd_leave(Ecore_Evas *ee, unsigned int seat, Eina_Position2D pos);
548 EAPI void ecore_evas_dnd_enter(Ecore_Evas *ee, unsigned int seat, Eina_Iterator *available_types, Eina_Position2D pos);
549 EAPI Eina_Position2D ecore_evas_dnd_pos_get(Ecore_Evas *ee, unsigned int seat);
550
551
552 void fallback_selection_init(Ecore_Evas *ee);
553 void fallback_selection_shutdown(Ecore_Evas *ee);
554 Eina_Bool fallback_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *available_types, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel);
555 Eina_Bool fallback_selection_has_owner(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection);
556 Eina_Future* fallback_selection_request(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection, Eina_Array *acceptable_type);
557 Eina_Bool fallback_dnd_start(Ecore_Evas *ee, unsigned int seat, Eina_Array *available_types, Ecore_Evas *drag_rep, Ecore_Evas_Selection_Internal_Delivery delivery, Ecore_Evas_Selection_Internal_Cancel cancel, const char* action);
558 Eina_Bool fallback_dnd_stop(Ecore_Evas *ee, unsigned int seat);
559
560 #ifdef IPA_YLNO_ESU_LANRETNI_MLE
561 EAPI Ecore_Evas *_wayland_shm_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame);
562 EAPI Ecore_Evas *_wayland_egl_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt);
563 #else
564 #define _wayland_shm_new DONT_USE_INTERNAL_API
565 #define _wayland_egl_new DONT_USE_INTERNAL_API
566 #endif
567
568 static inline Eina_Bool
ecore_evas_render_prepare(Ecore_Evas * ee)569 ecore_evas_render_prepare(Ecore_Evas *ee)
570 {
571 Ecore_Evas *ee2;
572 Eina_List *ll;
573 Eina_Bool r = EINA_FALSE;
574
575 EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
576 {
577 if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
578 if (ee2->engine.func->fn_render)
579 r |= ee2->engine.func->fn_render(ee2);
580 else
581 r |= ecore_evas_render(ee2);
582 if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2);
583 }
584
585 // We do not force the child to be sync, so we should wait for them to be done
586 EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
587 if (!ee2->engine.func->fn_render)
588 ecore_evas_render_wait(ee2);
589
590 if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee);
591 return r;
592 }
593
594 #undef EAPI
595 #define EAPI
596
597 #endif
598