Adds the transform API of video shell wrapper.
[platform/upstream/efl.git] / src / lib / ecore_evas / Ecore_Evas.h
1 #ifndef _ECORE_EVAS_H
2 #define _ECORE_EVAS_H
3
4 #include <Evas.h>
5 #include <Ecore_Evas_Types.h>
6
7 #ifdef EAPI
8 # undef EAPI
9 #endif
10
11 #ifdef _WIN32
12 # ifdef EFL_BUILD
13 #  ifdef DLL_EXPORT
14 #   define EAPI __declspec(dllexport)
15 #  else
16 #   define EAPI
17 #  endif
18 # else
19 #  define EAPI __declspec(dllimport)
20 # endif
21 #else
22 # ifdef __GNUC__
23 #  if __GNUC__ >= 4
24 #   define EAPI __attribute__ ((visibility("default")))
25 #  else
26 #   define EAPI
27 #  endif
28 # else
29 #  define EAPI
30 # endif
31 #endif
32
33 /**
34  * @file Ecore_Evas.h
35  * @brief Evas wrapper functions.
36  *
37  * The following is a list of examples that partially exemplify Ecore_Evas's API:
38  * @li @ref ecore_evas_callbacks_example_c
39  * @li @ref ecore_evas_object_example_c
40  * @li @ref ecore_evas_basics_example_c
41  * @li @ref Ecore_Evas_Window_Sizes_Example_c
42  * @li @ref Ecore_Evas_Buffer_Example_01_c
43  * @li @ref Ecore_Evas_Buffer_Example_02_c
44  */
45
46 /* FIXME:
47  * to do soon:
48  * - iconification api needs to work
49  * - maximization api needs to work
50  *
51  * later:
52  * - buffer back-end that renders to an evas_image_object ???
53  * - qt back-end ???
54  * - dfb back-end ??? (dfb's threads make this REALLY HARD)
55  */
56
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60
61 /**
62  * @defgroup Ecore_Evas_Group Ecore_Evas wrapper/helper set of functions
63  * @ingroup Ecore
64  *
65  * Ecore evas is a set of functions that make it easy to tie together ecore's
66  * main loop and input handling to evas. As such it's a natural base for EFL
67  * applications. While this combination makes it easy to create the basic
68  * aspects all applications need, for normal applications(ones with buttons,
69  * checkboxes and layouts) one should consider using Elementary.
70  *
71  * Ecore evas is extremely well suited for applications that are not based on
72  * widgets. It has a main loop that delivers events, does basic window handling
73  * and leaves all of the drawing up to the user. This works very well if used
74  * in conjunction with Edje or if doing custom drawing as, for example, is done
75  * in games.
76  *
77  * This is a list of examples of these functions:
78  * @li @ref ecore_evas_basics_example_c
79  * @li @ref ecore_evas_object_example_c
80  * @li @ref ecore_evas_callbacks_example_c
81  * @li @ref Ecore_Evas_Window_Sizes_Example_c
82  * @li @ref Ecore_Evas_Buffer_Example_01_c
83  * @li @ref Ecore_Evas_Buffer_Example_02_c
84  *
85  * @{
86  */
87
88 /* these are dummy and just tell you what API levels ecore_evas supports - not if
89  * the actual support is compiled in. You need to query for that separately.
90  */
91 #define HAVE_ECORE_EVAS_X 1
92 #define HAVE_ECORE_EVAS_FB 1
93 #define HAVE_ECORE_EVAS_X11_GL 1
94 //#define HAVE_ECORE_EVAS_X11_16 1
95 //#define HAVE_ECORE_EVAS_DIRECTFB 1
96 #define HAVE_ECORE_EVAS_WIN32 1
97 #define HAVE_ECORE_EVAS_COCOA 1
98 #define HAVE_ECORE_EVAS_SDL 1
99 //#define HAVE_ECORE_EVAS_WINCE 1
100 #define HAVE_ECORE_EVAS_EWS 1
101 #define HAVE_ECORE_EVAS_PSL1GHT 1
102 #define HAVE_ECORE_EVAS_WAYLAND_SHM 1
103 #define HAVE_ECORE_EVAS_WAYLAND_EGL 1
104 #define HAVE_ECORE_EVAS_DRM 1
105 #define HAVE_ECORE_EVAS_DRM_GL 1
106 /* TIZEN_ONLY(20160330): TBM Backend */
107 #define HAVE_ECORE_EVAS_TBM 1
108 #define HAVE_ECORE_EVAS_SOFTWARE_TBM 1
109 /* TIZEN_ONLY(20160330): TBM Backend */
110
111 typedef enum _Ecore_Evas_Engine_Type
112 {
113    ECORE_EVAS_ENGINE_SOFTWARE_BUFFER,
114    ECORE_EVAS_ENGINE_SOFTWARE_XLIB,
115    ECORE_EVAS_ENGINE_XRENDER_X11,
116    ECORE_EVAS_ENGINE_OPENGL_X11,
117    ECORE_EVAS_ENGINE_SOFTWARE_XCB, /* @deprecated */
118    ECORE_EVAS_ENGINE_XRENDER_XCB, /* @deprecated */
119    ECORE_EVAS_ENGINE_SOFTWARE_GDI,
120    ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
121    ECORE_EVAS_ENGINE_DIRECT3D,
122    ECORE_EVAS_ENGINE_OPENGL_GLEW,
123    ECORE_EVAS_ENGINE_OPENGL_COCOA,
124    ECORE_EVAS_ENGINE_SOFTWARE_SDL,
125    ECORE_EVAS_ENGINE_DIRECTFB,
126    ECORE_EVAS_ENGINE_SOFTWARE_FB,
127    ECORE_EVAS_ENGINE_SOFTWARE_8_X11,
128    ECORE_EVAS_ENGINE_SOFTWARE_16_X11,
129    ECORE_EVAS_ENGINE_SOFTWARE_16_DDRAW,
130    ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE,
131    ECORE_EVAS_ENGINE_OPENGL_SDL,
132    ECORE_EVAS_ENGINE_EWS,
133    ECORE_EVAS_ENGINE_PSL1GHT,
134    ECORE_EVAS_ENGINE_WAYLAND_SHM,
135    ECORE_EVAS_ENGINE_WAYLAND_EGL,
136    ECORE_EVAS_ENGINE_DRM,
137    ECORE_EVAS_ENGINE_OPENGL_DRM,
138     /* TIZEN_ONLY(20160330): TBM Backend */
139    ECORE_EVAS_ENGINE_OPENGL_TBM,
140    ECORE_EVAS_ENGINE_SOFTWARE_TBM
141     /* TIZEN_ONLY(20160330): TBM Backend */
142 } Ecore_Evas_Engine_Type;
143
144 #define ECORE_EVAS_OPT_NONE         0
145 #define ECORE_EVAS_OPT_INDIRECT     1
146 #define ECORE_EVAS_OPT_VSYNC        2
147 #define ECORE_EVAS_OPT_SWAP_MODE    3
148 #define ECORE_EVAS_OPT_GL_DEPTH     4
149 #define ECORE_EVAS_OPT_GL_STENCIL   5
150 #define ECORE_EVAS_OPT_GL_MSAA      6
151 //TIZEN_ONLY(20230302): Added frontbuffer API
152 #define ECORE_EVAS_OPT_FRONTBUFFER  7
153 //
154 #define ECORE_EVAS_OPT_LAST         8
155
156 #define ECORE_EVAS_SWAP_MODE_AUTO   0
157 #define ECORE_EVAS_SWAP_MODE_FULL   1
158 #define ECORE_EVAS_SWAP_MODE_COPY   2
159 #define ECORE_EVAS_SWAP_MODE_DOUBLE 3
160 #define ECORE_EVAS_SWAP_MODE_TRIPLE 4
161
162
163 /**
164  * @enum _Ecore_Evas_Avoid_Damage_Type
165  * This option causes updates of the Ecore_Evas to be done on a pixmap, and
166  * then copied to the window, or the pixmap used directly on the window,
167  * depending on the setting.
168  */
169 typedef enum _Ecore_Evas_Avoid_Damage_Type
170 {
171    ECORE_EVAS_AVOID_DAMAGE_NONE = 0, /**< every expose event triggers a new damage and consequently render of the affected area. The rendering of things happens directly on the window */
172    ECORE_EVAS_AVOID_DAMAGE_EXPOSE = 1, /**< there's a pixmap where everything is rendered into, and then copied to the window. On expose events, there's no need to render things again, just to copy the exposed region to the window */
173    ECORE_EVAS_AVOID_DAMAGE_BUILT_IN = 2 /**<  there's the same pixmap as the previous one, but it is set as a "background pixmap" of the window. The rendered things appear directly on the window, with no need to copy anything, but would stay stored on the pixmap, so there's no need to render things again on expose events. This option can be faster than the previous one, but may lead to artifacts during resize of the window */
174 } Ecore_Evas_Avoid_Damage_Type;
175
176 typedef enum _Ecore_Evas_Object_Associate_Flags
177 {
178   ECORE_EVAS_OBJECT_ASSOCIATE_BASE  = 0,
179   ECORE_EVAS_OBJECT_ASSOCIATE_STACK = 1 << 0,
180   ECORE_EVAS_OBJECT_ASSOCIATE_LAYER = 1 << 1,
181   ECORE_EVAS_OBJECT_ASSOCIATE_DEL = 1 << 2
182 } Ecore_Evas_Object_Associate_Flags;
183
184 /* module setup/shutdown calls */
185
186 EAPI int         ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine);
187
188 /**
189  * @brief Inits the Ecore_Evas system.
190  *
191  * @return How many times the lib has been initialized, @c 0 indicates failure.
192  *
193  * Set up the Evas wrapper system. Init Evas and Ecore libraries.
194  *
195  * @see ecore_evas_shutdown()
196  */
197 EAPI int         ecore_evas_init(void);
198
199 /**
200  * @brief Shuts down the Ecore_Evas system.
201  *
202  * @return @c 0 if ecore evas is fully shut down, or > @c 0 if it still being used.
203  *
204  * This closes the Evas wrapper system down. Shut down Evas and Ecore libraries.
205  *
206  * @see ecore_evas_init()
207  */
208 EAPI int         ecore_evas_shutdown(void);
209
210 /**
211  * @deprecated Deprecated since 6.0 DO NOT USE.
212  *
213  * @brief Sets application compositor synchronization on/off
214  *
215  * Turns on client+server synchronized rendering in X11.  App comp sync
216  * is disabled by default, but can be turned on optionally.
217  *
218  * @param do_sync True to enable comp syncing, False to disable
219  */
220 EINA_DEPRECATED EAPI void        ecore_evas_app_comp_sync_set(Eina_Bool do_sync);
221
222 /**
223  * @deprecated Deprecated since 6.0 DO NOT USE.
224  *
225  * @brief Get the compositing synchronization state
226  *
227  * @return True if app comp sync is enabled.
228  */
229 EINA_DEPRECATED EAPI Eina_Bool   ecore_evas_app_comp_sync_get(void);
230
231 /**
232  * @internal
233  *
234  * @brief Returns a list of supported engine names.
235  *
236  * @return Newly allocated list with engine names. Engine names
237  * strings are internal and should be considered constants, do not
238  * free or modify them, to free the list use ecore_evas_engines_free().
239  */
240 EAPI Eina_List  *ecore_evas_engines_get(void);
241
242 /**
243  * @internal
244  *
245  * @brief Free list returned by ecore_evas_engines_get()
246  *
247  * @param engines List with engine names
248  */
249 EAPI void        ecore_evas_engines_free(Eina_List *engines);
250
251 /**
252  * @internal
253  *
254  * @brief Creates a new Ecore_Evas based on engine name and common parameters.
255  *
256  * @param engine_name Engine name as returned by
257  *        ecore_evas_engines_get() or @c NULL to use environment variable
258  *        ECORE_EVAS_ENGINE, which can be undefined and in this case
259  *        this call will try to find the first working engine.
260  * @param x Horizontal position of window (not supported in all engines)
261  * @param y Vertical position of window (not supported in all engines)
262  * @param w Width of window
263  * @param h Height of window
264  * @param extra_options String with extra parameter, dependent on engines
265  *        or @ NULL. String is usually in the form: 'key1=value1;key2=value2'.
266  *        Pay attention that when getting this from shell commands, most
267  *        consider ';' as the command terminator, so you need to escape
268  *        it or use quotes.
269  * @return Ecore_Evas instance or @c NULL if creation failed.
270  */
271 EAPI Ecore_Evas *ecore_evas_new(const char *engine_name, int x, int y, int w, int h, const char *extra_options);
272
273 /**
274  * @brief Sets whether an Ecore_Evas has an alpha channel or not.
275  *
276  * @param ee The Ecore_Evas to shape
277  * @param alpha @c EINA_TRUE to enable the alpha channel, @c EINA_FALSE to
278  * disable it
279  *
280  * This function allows you to make an Ecore_Evas translucent using an
281  * alpha channel. See ecore_evas_shaped_set() for details. The difference
282  * between a shaped window and a window with an alpha channel is that an
283  * alpha channel supports multiple levels of transparency, as opposed to
284  * the 1 bit transparency of a shaped window (a pixel is either opaque, or
285  * it's transparent).
286  *
287  * @warning Support for this depends on the underlying windowing system.
288  */
289 EAPI void        ecore_evas_alpha_set(Ecore_Evas *ee, Eina_Bool alpha);
290
291 /**
292  * @brief Queries whether an Ecore_Evas has an alpha channel.
293  *
294  * @param ee The Ecore_Evas to query.
295  *
296  * @return @c EINA_TRUE if ee has an alpha channel, @c EINA_FALSE if it does
297  * not.
298  *
299  * @see ecore_evas_alpha_set()
300  */
301 EAPI Eina_Bool   ecore_evas_alpha_get(const Ecore_Evas *ee);
302
303 /**
304  * @brief Sets whether an Ecore_Evas has an transparent window or not.
305  *
306  * @param ee The Ecore_Evas to shape
307  * @param transparent @c EINA_TRUE to enable the transparent window,
308  * @c EINA_FALSE to disable it
309  *
310  * This function sets some translucency options, for more complete support see
311  * ecore_evas_alpha_set().
312  *
313  * @warning Support for this depends on the underlying windowing system.
314  *
315  * @see ecore_evas_alpha_set()
316  */
317 EAPI void        ecore_evas_transparent_set(Ecore_Evas *ee, Eina_Bool transparent);
318
319 /**
320  * @brief Queries whether an Ecore_Evas is transparent.
321  *
322  * @param ee The Ecore_Evas to query.
323  * @return @c EINA_TRUE if ee is transparent, @c EINA_FALSE if it isn't.
324  *
325  * @see ecore_evas_transparent_set()
326  */
327 EAPI Eina_Bool   ecore_evas_transparent_get(const Ecore_Evas *ee);
328
329 /**
330  * @brief Gets the geometry of an Ecore_Evas.
331  *
332  * @param ee The Ecore_Evas whose geometry y
333  * @param x A pointer to an int to place the x coordinate in
334  * @param y A pointer to an int to place the y coordinate in
335  * @param w A pointer to an int to place the w size in
336  * @param h A pointer to an int to place the h size in
337  *
338  * This function takes four pointers to (already allocated) ints, and places
339  * the geometry of @p ee in them. If any of the parameters are not desired you
340  * may pass @c NULL for them.
341  *
342  * @code
343  * int x, y, w, h;
344  * ecore_evas_geometry_get(ee, &x, &y, &w, &h);
345  * @endcode
346  *
347  * @see ecore_evas_new()
348  * @see ecore_evas_resize()
349  * @see ecore_evas_move()
350  * @see ecore_evas_move_resize()
351  */
352 EAPI void        ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
353
354 /**
355  * @brief Gets the geometry which an Ecore_Evas was latest recently requested.
356  *
357  * @param ee The Ecore_Evas whose geometry y
358  * @param x A pointer to an int to place the x coordinate in
359  * @param y A pointer to an int to place the y coordinate in
360  * @param w A pointer to an int to place the w size in
361  * @param h A pointer to an int to place the h size in
362  *
363  * This function takes four pointers to (already allocated) ints, and places
364  * the geometry which @p ee was latest recently requested . If any of the
365  * parameters are not desired you may pass @c NULL for them.
366  * This function can represent recently requested geometry.
367  * ecore_evas_geometry_get function returns the value is updated after engine
368  * finished request. By comparison, ecore_evas_request_geometry_get returns
369  * recently requested value.
370  *
371  * @code
372  * int x, y, w, h;
373  * ecore_evas_request_geometry_get(ee, &x, &y, &w, &h);
374  * @endcode
375  *
376  * @since 1.1
377  */
378 EAPI void        ecore_evas_request_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
379
380 /**
381  * @brief Sets the Ecore_Evas window focus for the default seat.
382  *
383  * @param ee The Ecore_Evas
384  * @param on @c EINA_TRUE for focus, @c EINA_FALSE to defocus.
385  *
386  * This function focuses @p ee if @p on is @c EINA_TRUE, or unfocuses @p ee if
387  * @p on is @c EINA_FALSE.
388  *
389  * @warning Support for this depends on the underlying windowing system.
390  * @see ecore_evas_focus_device_set()
391  */
392 EAPI void        ecore_evas_focus_set(Ecore_Evas *ee, Eina_Bool on);
393
394 /**
395  * @brief Queries whether the default seat has the Ecore_Evas focus.
396  *
397  * @param ee The Ecore_Evas to set
398  * @return @c EINA_TRUE if @p ee if focused, @c EINA_FALSE if not.
399  *
400  * @see ecore_evas_focus_set()
401  * @see ecore_evas_focus_device_get()
402  */
403 EAPI Eina_Bool   ecore_evas_focus_get(const Ecore_Evas *ee);
404
405 /**
406  * @internal
407  *
408  * @brief Sets the Ecore_Evas windows focus for a given seat.
409  *
410  * @param ee The Ecore_Evas
411  * @param seat An Efl_Input_Device that represents the seat or @c NULL for the default seat.
412  * @param on @c EINA_TRUE for focus, @c EINA_FALSE to defocus.
413  *
414  * This function focuses @p ee if @p on is @c EINA_TRUE, or unfocuses @p ee if
415  * @p on is @c EINA_FALSE.
416  *
417  * @warning Support for this depends on the underlying windowing system.
418  * @see ecore_evas_focus_device_get()
419  * @since 1.19
420  */
421 EAPI void        ecore_evas_focus_device_set(Ecore_Evas *ee, Eo *seat,
422                                              Eina_Bool on);
423 /**
424  * @internal
425  *
426  * @brief Queries whether an Ecore_Evas' window is focused or not.
427  *
428  * @param ee The Ecore_Evas to set
429  * @param seat An Efl_Input_Device that represents the seat or @c NULL for the default seat.
430  * @return @c EINA_TRUE if @p ee if focused, @c EINA_FALSE if not.
431  *
432  * @see ecore_evas_focus_device_set()
433  * @since 1.19
434  */
435 EAPI Eina_Bool   ecore_evas_focus_device_get(const Ecore_Evas *ee, Eo *seat);
436
437 /**
438  * @brief Iconifies or uniconifies an Ecore_Evas' window.
439  *
440  * @param ee The Ecore_Evas
441  * @param on @c EINA_TRUE to iconify, @c EINA_FALSE to uniconify.
442  *
443  * This function iconifies @p ee if @p on is @c EINA_TRUE, or uniconifies @p ee
444  * if @p on is @c EINA_FALSE.
445  *
446  * @note Iconify and minimize are synonyms.
447  *
448  * @warning Support for this depends on the underlying windowing system.
449  */
450 EAPI void        ecore_evas_iconified_set(Ecore_Evas *ee, Eina_Bool on);
451
452 /**
453  * @brief Queries whether an Ecore_Evas' window is iconified or not.
454  *
455  * @param ee The Ecore_Evas to set
456  * @return @c EINA_TRUE if @p ee is iconified, @c EINA_FALSE if not.
457  *
458  * @note Iconify and minimize are synonyms.
459  *
460  * @see ecore_evas_iconified_set()
461  */
462 EAPI Eina_Bool   ecore_evas_iconified_get(const Ecore_Evas *ee);
463
464 /**
465  * @brief Sets whether an Ecore_Evas' window is borderless or not.
466  *
467  * @param ee The Ecore_Evas
468  * @param on @c EINA_TRUE for borderless, @c EINA_FALSE for bordered.
469  *
470  * This function makes @p ee borderless if @p on is @c EINA_TRUE, or bordered
471  * if @p on is @c EINA_FALSE.
472  *
473  * @warning Support for this depends on the underlying windowing system.
474  */
475 EAPI void        ecore_evas_borderless_set(Ecore_Evas *ee, Eina_Bool on);
476
477 /**
478  * @brief Queries whether an Ecore_Evas' window is borderless or not.
479  *
480  * @param ee The Ecore_Evas to set
481  * @return @c EINA_TRUE if @p ee is borderless, @c EINA_FALSE if not.
482  *
483  * @see ecore_evas_borderless_set()
484  */
485 EAPI Eina_Bool   ecore_evas_borderless_get(const Ecore_Evas *ee);
486
487 /**
488  * @brief Sets whether or not an Ecore_Evas' window is fullscreen.
489  *
490  * @param ee The Ecore_Evas
491  * @param on @c EINA_TRUE fullscreen, @c EINA_FALSE not.
492  *
493  * This function causes @p ee to be fullscreen if @p on is @c EINA_TRUE, or
494  * not if @p on is @c EINA_FALSE.
495  *
496  * @warning Support for this depends on the underlying windowing system.
497  */
498 EAPI void        ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on);
499
500 /**
501  * @brief Queries whether an Ecore_Evas' window is fullscreen or not.
502  *
503  * @param ee The Ecore_Evas to set
504  * @return @c EINA_TRUE if @p ee is fullscreen, @c EINA_FALSE if not.
505  *
506  * @see ecore_evas_fullscreen_set()
507  */
508 EAPI Eina_Bool   ecore_evas_fullscreen_get(const Ecore_Evas *ee);
509
510 /**
511  * @internal
512  *
513  * @brief Sets another window that this window is a group member of.
514  *
515  * @param ee The Ecore_Evas
516  * @param ee_group The other group member
517  *
518  * If @p ee_group is @c NULL, @p ee is removed from the group, otherwise it is
519  * added. Note that if you free the @p ee_group canvas before @p ee, then
520  * getting the group canvas with ecore_evas_window_group_get() will return
521  * an invalid handle.
522  *
523  * @warning Support for this depends on the underlying windowing system.
524  * @since 1.2
525  */
526 EAPI void        ecore_evas_window_group_set(Ecore_Evas *ee, const Ecore_Evas *ee_group);
527
528 /**
529  * @internal
530  *
531  * @brief Gets the canvas group set.
532  *
533  * This returns the handle set by ecore_evas_window_group_set().
534  *
535  * @param ee The Ecore_Evas to set
536  * @return The Canvas group handle
537  *
538  * @see ecore_evas_window_group_set()
539  * @since 1.2
540  */
541 EAPI const Ecore_Evas *ecore_evas_window_group_get(const Ecore_Evas *ee);
542
543 /**
544  * @brief Sets the aspect ratio of a canvas window.
545  *
546  * @param ee The Ecore_Evas
547  * @param aspect The aspect ratio (width divided by height), or 0 to disable
548  *
549  * This sets the desired aspect ratio of a canvas window
550  *
551  * @warning Support for this depends on the underlying windowing system.
552  * @since 1.2
553  */
554 EAPI void        ecore_evas_aspect_set(Ecore_Evas *ee, double aspect);
555
556 /**
557  * @brief Gets the aspect ratio of a canvas window.
558  *
559  * This returns the value set by ecore_evas_aspect_set().
560  *
561  * @param ee The Ecore_Evas to set
562  * @return The aspect ratio
563  *
564  * @see ecore_evas_aspect_set()
565  * @since 1.2
566  */
567 EAPI double      ecore_evas_aspect_get(const Ecore_Evas *ee);
568
569 /**
570  * @internal
571  *
572  * @brief Sets The urgent hint flag.
573  *
574  * @param ee The Ecore_Evas
575  * @param urgent The urgent state flag
576  *
577  * This sets the "urgent" state hint on a window so the desktop environment
578  * can highlight it somehow.
579  *
580  * @warning Support for this depends on the underlying windowing system.
581  * @since 1.2
582  */
583 EAPI void        ecore_evas_urgent_set(Ecore_Evas *ee, Eina_Bool urgent);
584
585 /**
586  * @internal
587  *
588  * @brief Gets the urgent state on the canvas window.
589  *
590  * This returns the value set by ecore_evas_urgent_set()
591  *
592  * @param ee The Ecore_Evas to set
593  * @return The urgent state set
594  *
595  * @see ecore_evas_urgent_set()
596  * @since 1.2
597  */
598 EAPI Eina_Bool   ecore_evas_urgent_get(const Ecore_Evas *ee);
599
600 /**
601  * @internal
602  *
603  * @brief Sets the modal state flag on the canvas window.
604  *
605  * @param ee The Ecore_Evas
606  * @param modal The modal hint flag
607  *
608  * This hints if the window should be modal (eg if it is also transient
609  * for another window, the other window will maybe be denied focus by
610  * the desktop window manager).
611  *
612  * @warning Support for this depends on the underlying windowing system.
613  * @since 1.2
614  */
615 EAPI void        ecore_evas_modal_set(Ecore_Evas *ee, Eina_Bool modal);
616
617 /**
618  * @internal
619  *
620  * @brief Gets The modal flag.
621  *
622  * This returns the value set by ecore_evas_modal_set().
623  *
624  * @param ee The Ecore_Evas to set
625  * @return The modal flag
626  *
627  * @see ecore_evas_modal_set()
628  * @since 1.2
629  */
630 EAPI Eina_Bool   ecore_evas_modal_get(const Ecore_Evas *ee);
631
632 /**
633  * @internal
634  *
635  * @brief Sets the "i demand attention" flag on a canvas window.
636  *
637  * @param ee The Ecore_Evas
638  * @param demand The flag state to set
639  *
640  * A window may demand attention now (eg you must enter a password before
641  * continuing), and so it may flag a window with this.
642  *
643  * @warning Support for this depends on the underlying windowing system.
644  * @since 1.2
645  */
646 EAPI void        ecore_evas_demand_attention_set(Ecore_Evas *ee, Eina_Bool demand);
647
648 /**
649  * @internal
650  *
651  * @brief Gets the "i demand attention" flag.
652  *
653  * This returns the value set by ecore_evas_demand_attention_set().
654  *
655  * @param ee The Ecore_Evas to set
656  * @return The "i demand attention" flag
657  *
658  * @see ecore_evas_demand_attention_set()
659  * @since 1.2
660  */
661 EAPI Eina_Bool   ecore_evas_demand_attention_get(const Ecore_Evas *ee);
662
663 /**
664  * @brief Sets the "focus skip" flag.
665  *
666  * @param ee The Ecore_Evas
667  * @param skip The "focus skip" state to set.
668  *
669  * A window may not want to accept focus, be in the taskbar, pager etc.
670  * sometimes (example for a small notification window that hovers around
671  * a taskbar or panel, or hovers around a window until some activity
672  * dismisses it).
673  *
674  * @warning Support for this depends on the underlying windowing system.
675  * @since 1.2
676  */
677 EAPI void        ecore_evas_focus_skip_set(Ecore_Evas *ee, Eina_Bool skip);
678
679 /**
680  * @brief Gets the "focus skip" flag.
681  *
682  * This returns the value set by ecore_evas_focus_skip_set().
683  *
684  * @param ee The Ecore_Evas to set
685  * @return The "focus skip" flag
686  *
687  * @see ecore_evas_focus_skip_set()
688  * @since 1.2
689  */
690 EAPI Eina_Bool   ecore_evas_focus_skip_get(const Ecore_Evas *ee);
691
692 /**
693  * @brief Sets if this evas should ignore @b all events.
694  *
695  * @param ee The Ecore_Evas whose window's to ignore events.
696  * @param ignore The Ecore_Evas new ignore state.
697  *
698  * @warning Support for this depends on the underlying windowing system.
699  */
700 EAPI void        ecore_evas_ignore_events_set(Ecore_Evas *ee, Eina_Bool ignore);
701
702 /**
703  * @brief Returns the ignore state of an Ecore_Evas' window.
704  *
705  * @param ee The Ecore_Evas whose window's ignore events state is returned.
706  * @return The Ecore_Evas window's ignore state.
707  *
708  * @see ecore_evas_ignore_events_set()
709  */
710 EAPI Eina_Bool   ecore_evas_ignore_events_get(const Ecore_Evas *ee);
711
712 /**
713  * @brief Queries whether an Ecore_Evas' window is visible or not.
714  *
715  * @param ee The Ecore_Evas to query.
716  * @return @c 1 if @p ee is visible, @c 0 if not.
717  *
718  * @see ecore_evas_show()
719  * @see ecore_evas_hide()
720  */
721 EAPI int         ecore_evas_visibility_get(const Ecore_Evas *ee);
722
723 /**
724  * @brief Sets the layer of an Ecore_Evas' window.
725  *
726  * @param ee The Ecore_Evas
727  * @param layer The layer to put @p ee on.
728  *
729  * This function moves @p ee to the layer @p layer.
730  *
731  * @warning Support for this depends on the underlying windowing system.
732  *
733  * @see ecore_evas_lower()
734  * @see ecore_evas_raise()
735  */
736 EAPI void        ecore_evas_layer_set(Ecore_Evas *ee, int layer);
737
738 /**
739  * @brief Gets the layer of an Ecore_Evas' window.
740  *
741  * @param ee The Ecore_Evas to set
742  * @return The layer @p ee's window is on
743  *
744  * @see ecore_evas_layer_set()
745  * @see ecore_evas_lower()
746  * @see ecore_evas_raise()
747  */
748 EAPI int         ecore_evas_layer_get(const Ecore_Evas *ee);
749
750 /**
751  * @brief Maximizes (or unmaximizes) an Ecore_Evas' window.
752  *
753  * @param ee The Ecore_Evas
754  * @param on @c EINA_TRUE to maximize, @c EINA_FALSE to unmaximize
755  *
756  * This function maximizes @p ee if @p on is @c EINA_TRUE, or unmaximizes @p ee
757  * if @p on is @c EINA_FALSE.
758  *
759  * @warning Support for this depends on the underlying windowing system.
760  */
761 EAPI void        ecore_evas_maximized_set(Ecore_Evas *ee, Eina_Bool on);
762
763 /**
764  * @brief Queries whether an Ecore_Evas' window is maximized or not.
765  *
766  * @param ee The Ecore_Evas to set
767  * @return @c EINA_TRUE if @p ee is maximized, @c EINA_FALSE if not.
768  *
769  * @see ecore_evas_maximized_set()
770  */
771 EAPI Eina_Bool   ecore_evas_maximized_get(const Ecore_Evas *ee);
772
773 /**
774  * @brief Queries if the underlying windowing system supports the window profile.
775  *
776  * @param ee The Ecore_Evas
777  * @return @c EINA_TRUE if the window profile is supported, @c EINA_FALSE otherwise.
778  *
779  * @warning Support for this depends on the underlying windowing system.
780  * @since 1.8.0
781  */
782 EAPI Eina_Bool   ecore_evas_window_profile_supported_get(const Ecore_Evas *ee);
783
784 /**
785  * @internal
786  *
787  * @brief Sets the window profile.
788  *
789  * @param ee The Ecore_Evas to set
790  * @param profile The string value of the window profile
791  *
792  * @warning Support for this depends on the underlying windowing system.
793  * @since 1.8.0
794  */
795 EAPI void        ecore_evas_window_profile_set(Ecore_Evas *ee, const char *profile);
796
797 /**
798  * @internal
799  *
800  * @brief Gets the window profile.
801  *
802  * @param ee The Ecore_Evas to get the window profile from.
803  * @return The string value of the window profile, or NULL if none exists
804  *
805  * @warning Support for this depends on the underlying windowing system.
806  * @since 1.8.0
807  */
808 EAPI const char *ecore_evas_window_profile_get(const Ecore_Evas *ee);
809
810 /**
811  * @internal
812  *
813  * @brief Sets the array of available window profiles.
814  *
815  * @param ee The Ecore_Evas to set
816  * @param profiles The string array of available window profiles
817  * @param count The number of members in profiles
818  *
819  * @warning Support for this depends on the underlying windowing system.
820  * @since 1.8.0
821  */
822 EAPI void        ecore_evas_window_available_profiles_set(Ecore_Evas *ee, const char **profiles, const unsigned int count);
823
824 /**
825  * @internal
826  *
827  * @brief Gets the array of available window profiles.
828  *
829  * @param ee The Ecore_Evas to get available window profiles from.
830  * @param profiles Where to return the string array of available window profiles
831  * @param count Where to return the number of members in profiles
832  * @return @c EINA_TRUE if available window profiles exist, @c EINA_FALSE otherwise
833  *
834  * @warning Support for this depends on the underlying windowing system.
835  * @since 1.8.0
836  */
837 EAPI Eina_Bool   ecore_evas_window_available_profiles_get(Ecore_Evas *ee, char ***profiles, unsigned int *count);
838
839 /**
840  * @brief Queries if the underlying windowing system supports the window manager rotation.
841  *
842  * @param ee The Ecore_Evas
843  * @return @c EINA_TRUE if the window manager rotation is supported, @c EINA_FALSE otherwise.
844  *
845  * @warning Support for this depends on the underlying windowing system.
846  * @since 1.9.0
847  */
848 EAPI Eina_Bool   ecore_evas_wm_rotation_supported_get(const Ecore_Evas *ee);
849
850 /**
851  * @brief Sets the preferred rotation hint.
852  *
853  * @param ee The Ecore_Evas to set
854  * @param rotation Value to set the preferred rotation hint
855  *
856  * @warning Support for this depends on the underlying windowing system.
857  * @since 1.9.0
858  */
859 EAPI void        ecore_evas_wm_rotation_preferred_rotation_set(Ecore_Evas *ee, int rotation);
860
861 /**
862  * @brief Gets the preferred rotation hint.
863  *
864  * @param ee The Ecore_Evas to get the preferred rotation hint from.
865  * @return The preferred rotation hint, @c -1 on failure.
866  *
867  * @warning Support for this depends on the underlying windowing system.
868  * @since 1.9.0
869  */
870 EAPI int         ecore_evas_wm_rotation_preferred_rotation_get(const Ecore_Evas *ee);
871
872 /**
873  * @brief Sets the array of available window rotations.
874  *
875  * @param ee The Ecore_Evas to set
876  * @param rotations The integer array of available window rotations
877  * @param count The number of members in rotations
878  *
879  * @warning Support for this depends on the underlying windowing system.
880  * @since 1.9.0
881  */
882 EAPI void        ecore_evas_wm_rotation_available_rotations_set(Ecore_Evas *ee, const int *rotations, unsigned int count);
883
884 /**
885  * @brief Gets the array of available window rotations.
886  *
887  * @param ee The Ecore_Evas to get available window rotations from.
888  * @param rotations Where to return the integer array of available window rotations
889  * @param count Where to return the number of members in rotations
890  * @return @c EINA_TRUE if available window rotations exist, @c EINA_FALSE otherwise
891  *
892  * @warning Support for this depends on the underlying windowing system.
893  * @since 1.9.0
894  */
895 EAPI Eina_Bool   ecore_evas_wm_rotation_available_rotations_get(const Ecore_Evas *ee, int **rotations, unsigned int *count);
896
897 /**
898  * @brief Sets manual rotation done mode of Ecore_Evas's window.
899  *
900  * @param ee The Ecore_Evas
901  * @param set If true, the window manager will not rotate the Ecore_Evas's window until
902  * the rotation done event is received by ecore_evas_wm_rotation_manual_rotation_done.
903  * If false, the manual rotation mode is disabled.
904  *
905  * @since 1.9.0
906  */
907 EAPI void        ecore_evas_wm_rotation_manual_rotation_done_set(Ecore_Evas *ee, Eina_Bool set);
908
909 /**
910  * @brief Gets manual rotation done mode of Ecore_Evas's window.
911  *
912  * @param ee The Ecore_Evas
913  * @return If true, the manual rotation done mode is enabled
914  *
915  * @since 1.9.0
916  */
917 EAPI Eina_Bool   ecore_evas_wm_rotation_manual_rotation_done_get(const Ecore_Evas *ee);
918
919 /**
920  * @brief Sets rotation finish manually.
921  *
922  * @param ee The Ecore_Evas
923  *
924  * @since 1.9.0
925  */
926 EAPI void        ecore_evas_wm_rotation_manual_rotation_done(Ecore_Evas *ee);
927
928 /**
929  * @brief Gets the list of supported auxiliary hint strings.
930  *
931  * @param ee The Ecore_Evas
932  * @return List of supported auxiliary hint strings.
933  *
934  * @note Do not change the returned list of its contents. Auxiliary hint
935  * strings are internal and should be considered constants, do not free or
936  * modify them.
937  * @warning Support for this depends on the underlying windowing system.
938  *
939  * The window auxiliary hint is the value which is used to decide which actions should
940  * be made available to the user by the window manager. If you want to set a specific hint
941  * on your window, then you should check whether it exists in the supported auxiliary
942  * hints that are registered in the root window by the window manager. Once you've added
943  * an auxiliary hint, you can get a new ID which is used to change value and delete hint.
944  * The window manager sends the response message to the application on receiving auxiliary
945  * hint change event. A list of auxiliary hints within the Ecore_Evas has this format:
946  * ID:HINT:VALUE,ID:HINT:VALUE,...
947  *
948  * @since 1.10.0
949  */
950 EAPI const Eina_List *ecore_evas_aux_hints_supported_get(const Ecore_Evas *ee);
951
952 /**
953  * @brief Gets the list of allowed auxiliary hint IDs.
954  *
955  * @param ee The Ecore_Evas
956  * @return List of allowed auxiliary hint IDs.
957  *
958  * @note This function is low level. Instead of using it directly, consider
959  * using the callback mechanism in Elementary such as "aux,hint,allowed".
960  * @warning Support for this depends on the underlying windowing system.
961  *
962  * @since 1.10.0
963  */
964 EAPI Eina_List       *ecore_evas_aux_hints_allowed_get(const Ecore_Evas *ee);
965
966 /**
967  * @internal
968  *
969  * @brief Creates an auxiliary hint of the Ecore_Evas.
970  *
971  * @param ee The Ecore_Evas
972  * @param hint The auxiliary hint string.
973  * @param val The value string.
974  * @return The ID of created auxiliary hint, or @c -1 on failure.
975  *
976  * @warning Support for this depends on the underlying windowing system.
977  *
978  * @since 1.10.0
979  */
980 EAPI int              ecore_evas_aux_hint_add(Ecore_Evas *ee, const char *hint, const char *val);
981
982 /**
983  * @brief Deletes an auxiliary hint of the Ecore_Evas.
984  *
985  * @param ee The Ecore_Evas
986  * @param id The ID of the auxiliary hint.
987  * @return @c EINA_TRUE if no error occurred, @c EINA_FALSE otherwise.
988  *
989  * @warning Support for this depends on the underlying windowing system.
990  *
991  * @since 1.10.0
992  */
993 EAPI Eina_Bool        ecore_evas_aux_hint_del(Ecore_Evas *ee, const int id);
994
995 /**
996  * @brief Changes a value of the auxiliary hint.
997  *
998  * @param ee The Ecore_Evas
999  * @param id The auxiliary hint ID.
1000  * @param val The value string to be set.
1001  * @return @c EINA_TRUE if no error occurred, @c EINA_FALSE otherwise.
1002  *
1003  * @warning Support for this depends on the underlying windowing system.
1004  *
1005  * @since 1.10.0
1006  */
1007 EAPI Eina_Bool        ecore_evas_aux_hint_val_set(Ecore_Evas *ee, const int id, const char *val);
1008
1009 /**
1010  * @brief Gets a value of the auxiliary hint.
1011  *
1012  * @param ee The Ecore_Evas
1013  * @param id The auxiliary hint ID.
1014  * @return The string value of the auxiliary hint ID, or NULL if none exists
1015  *
1016  * @warning Support for this depends on the underlying windowing system.
1017  *
1018  * @since 1.15
1019  */
1020 EAPI const char      *ecore_evas_aux_hint_val_get(const Ecore_Evas *ee, int id);
1021
1022 /**
1023  * @brief Gets a ID of the auxiliary hint string.
1024  *
1025  * @param ee The Ecore_Evas
1026  * @param hint The auxiliary hint string.
1027  * @return The ID of the auxiliary hint string, or @c -1 if none exists
1028  *
1029  * @warning Support for this depends on the underlying windowing system.
1030  *
1031  * @since 1.15
1032  */
1033 EAPI int              ecore_evas_aux_hint_id_get(const Ecore_Evas *ee, const char *hint);
1034
1035 // TIZEN_ONLY(20160201) : support to handle input rectangle
1036 EAPI void             ecore_evas_input_rect_set(Ecore_Evas *ee, Eina_Rectangle *input_rect);
1037 EAPI void             ecore_evas_input_rect_add(Ecore_Evas *ee, Eina_Rectangle *input_rect);
1038 EAPI void             ecore_evas_input_rect_subtract(Ecore_Evas *ee, Eina_Rectangle *input_rect);
1039 //
1040
1041 /**
1042  * @brief Sends message to parent ecore.
1043  *
1044  * @param ee The Ecore_Evas to set
1045  * @param msg_domain The domain of message
1046  * @param msg_id The id of message
1047  * @param data The data of message
1048  * @param size The size of message data
1049  *
1050  * @warning Support for this depends on the underlying windowing system.
1051  * @since 1.8.0
1052  *
1053  * @see ecore_evas_msg_send()
1054  * @see ecore_evas_callback_msg_parent_handle_set()
1055  * @see eecore_evas_callback_msg_handle_set()
1056  *
1057  * This is a list of examples of these functions:
1058  * @li ecore_evas_extn_socket_example
1059  * @li ecore_evas_extn_plug_example
1060  */
1061 EAPI void ecore_evas_msg_parent_send(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size);
1062
1063 /**
1064  * @brief Sends message to child ecore.
1065  *
1066  * @param ee The Ecore_Evas to set
1067  * @param msg_domain The domain of message
1068  * @param msg_id The id of message
1069  * @param data The data of message
1070  * @param size The size of message data
1071  *
1072  * @warning Support for this depends on the underlying windowing system.
1073  * @since 1.8.0
1074  *
1075  * @see ecore_evas_msg_parent_send()
1076  * @see ecore_evas_callback_msg_parent_handle_set()
1077  * @see eecore_evas_callback_msg_handle_set()
1078  */
1079 EAPI void ecore_evas_msg_send(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size);
1080
1081 /**
1082  * @brief Sets a callback for parent Ecore_Evas message.
1083  *
1084  * @param ee The Ecore_Evas to set callbacks on
1085  * @param func_parent_handle The handle to be called when message arrive.
1086  *
1087  * @warning Support for this depends on the underlying windowing system.
1088  * @since 1.8.0
1089  *
1090  * @see ecore_evas_msg_parent_send()
1091  * @see ecore_evas_msg_send()
1092  * @see eecore_evas_callback_msg_handle_set()
1093  */
1094 EAPI void ecore_evas_callback_msg_parent_handle_set(Ecore_Evas *ee, void (*func_parent_handle)(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size));
1095
1096 /**
1097  * @brief Sets a callback for child Ecore_Evas message.
1098  *
1099  * @param ee The Ecore_Evas to set callbacks on
1100  * @param func_handle  The handle to be called when message arrive
1101  *
1102  * @warning Support for this depends on the underlying windowing system.
1103  * @since 1.8.0
1104  *
1105  * @see ecore_evas_msg_parent_send()
1106  * @see ecore_evas_msg_send()
1107  * @see ecore_evas_callback_msg_parent_handle_set()
1108  */
1109 EAPI void ecore_evas_callback_msg_handle_set(Ecore_Evas *ee, void (*func_handle)(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size));
1110
1111 /**
1112  * @brief Moves an Ecore_Evas.
1113  *
1114  * @param ee The Ecore_Evas to move
1115  * @param x The x coordinate to move to
1116  * @param y The y coordinate to move to
1117  *
1118  * This moves @p ee to the screen coordinates (@p x, @p y)
1119  *
1120  * @warning Support for this depends on the underlying windowing system.
1121  *
1122  * @see ecore_evas_new()
1123  * @see ecore_evas_resize()
1124  * @see ecore_evas_move_resize()
1125  */
1126 EAPI void        ecore_evas_move(Ecore_Evas *ee, int x, int y);
1127
1128 /**
1129  * @brief Resizes an Ecore_Evas.
1130  *
1131  * @param ee The Ecore_Evas to move
1132  * @param w The w coordinate to resize to
1133  * @param h The h coordinate to resize to
1134  *
1135  * This resizes @p ee to @p w x @p h.
1136  *
1137  * @warning Support for this depends on the underlying windowing system.
1138  *
1139  * @see ecore_evas_new()
1140  * @see ecore_evas_move()
1141  * @see ecore_evas_move_resize()
1142  */
1143 EAPI void        ecore_evas_resize(Ecore_Evas *ee, int w, int h);
1144
1145 /**
1146  * @brief Moves and resizes an Ecore_Evas.
1147  *
1148  * @param ee The Ecore_Evas to move and resize
1149  * @param x The x coordinate to move to
1150  * @param y The y coordinate to move to
1151  * @param w The w coordinate to resize to
1152  * @param h The h coordinate to resize to
1153  *
1154  * This moves @p ee to the screen coordinates (@p x, @p y) and resizes
1155  * it to @p w x @p h.
1156  *
1157  * @warning Support for this depends on the underlying windowing system.
1158  *
1159  * @see ecore_evas_new()
1160  * @see ecore_evas_move()
1161  * @see ecore_evas_resize()
1162  */
1163 EAPI void        ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h);
1164
1165 /**
1166  * @brief Sets the rotation of an Ecore_Evas' window.
1167  *
1168  * @param ee The Ecore_Evas
1169  * @param rot The angle (in degrees) of rotation
1170  *
1171  * The allowed values of @p rot depend on the engine being used. Most only
1172  * allow multiples of 90.
1173  *
1174  * @warning Support for this depends on the underlying windowing system.
1175  *
1176  * @see ecore_evas_rotation_with_resize_set()
1177  */
1178 EAPI void        ecore_evas_rotation_set(Ecore_Evas *ee, int rot);
1179
1180 /**
1181  * @brief Sets the rotation of an Ecore_Evas' window.
1182  *
1183  * @param ee The Ecore_Evas
1184  * @param rot The angle (in degrees) of rotation.
1185  *
1186  * Like ecore_evas_rotation_set(), but it also resizes the window's content so
1187  * that it fits inside the current window geometry.
1188  *
1189  * @warning Support for this depends on the underlying windowing system.
1190  *
1191  * @see ecore_evas_rotation_set()
1192  */
1193 EAPI void        ecore_evas_rotation_with_resize_set(Ecore_Evas *ee, int rot);
1194
1195 /**
1196  * @brief Gets the rotation of an Ecore_Evas' window
1197  *
1198  * @param ee The Ecore_Evas
1199  * @return The angle (in degrees) of rotation
1200  *
1201  * @see ecore_evas_rotation_set()
1202  * @see ecore_evas_rotation_with_resize_set()
1203  */
1204 EAPI int         ecore_evas_rotation_get(const Ecore_Evas *ee);
1205
1206 /**
1207  * @brief Raises an Ecore_Evas' window.
1208  *
1209  * @param ee The Ecore_Evas to raise.
1210  *
1211  * This functions raises the Ecore_Evas to the front.
1212  *
1213  * @warning Support for this depends on the underlying windowing system.
1214  *
1215  * @see ecore_evas_lower()
1216  * @see ecore_evas_layer_set()
1217  */
1218 EAPI void        ecore_evas_raise(Ecore_Evas *ee);
1219
1220 /**
1221  * @brief Lowers an Ecore_Evas' window.
1222  *
1223  * @param ee The Ecore_Evas to raise.
1224  *
1225  * This functions lowers the Ecore_Evas to the back.
1226  *
1227  * @warning Support for this depends on the underlying windowing system.
1228  *
1229  * @see ecore_evas_raise()
1230  * @see ecore_evas_layer_set()
1231  */
1232 EAPI void        ecore_evas_lower(Ecore_Evas *ee);
1233
1234 /**
1235  * @brief Sets the title of an Ecore_Evas' window.
1236  *
1237  * @param ee The Ecore_Evas whose title you wish to set.
1238  * @param t The title
1239  *
1240  * This function sets the title of @p ee to @p t.
1241  *
1242  * @warning Support for this depends on the underlying windowing system.
1243  */
1244 EAPI void        ecore_evas_title_set(Ecore_Evas *ee, const char *t);
1245
1246 /**
1247  * @brief Gets the title of an Ecore_Evas' window.
1248  *
1249  * @param ee The Ecore_Evas whose title you wish to get.
1250  * @return The title of @p ee.
1251  *
1252  * @see ecore_evas_title_set()
1253  */
1254 EAPI const char *ecore_evas_title_get(const Ecore_Evas *ee);
1255
1256 /**
1257  * @brief Sets the name and class of an Ecore_Evas' window.
1258  *
1259  * @param ee the Ecore_Evas
1260  * @param n The name
1261  * @param c The class
1262  *
1263  * This function sets the name of @p ee to @p n, and its class to @p c. The
1264  * meaning of @p name and @p class depends on the underlying windowing system.
1265  *
1266  * @warning Support for this depends on the underlying windowing system.
1267  */
1268 EAPI void        ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, const char *c);
1269
1270 /**
1271  * @brief Gets the name and class of an Ecore_Evas' window.
1272  *
1273  * @param ee The Ecore_Evas to query.
1274  * @param n A pointer to a string to place the name in.
1275  * @param c A pointer to a string to place the class in.
1276  *
1277  * This function gets the name of @p ee into @p n, and its class into
1278  * @p c.
1279  *
1280  * @see ecore_evas_name_class_set()
1281  */
1282 EAPI void        ecore_evas_name_class_get(const Ecore_Evas *ee, const char **n, const char **c);
1283
1284 /**
1285  * @brief Returns a pointer to the underlying window.
1286  *
1287  * @param ee The Ecore_Evas whose window is desired.
1288  * @return A pointer to the underlying window.
1289  *
1290  * @warning Support for this depends on the underlying windowing system.
1291  */
1292 EAPI Ecore_Window ecore_evas_window_get(const Ecore_Evas *ee);
1293
1294 /* engine/target specific init calls */
1295
1296 /**
1297  * @internal
1298  *
1299  * @brief Creates Ecore_Evas using software x11.
1300  *
1301  * @param disp_name The name of the Ecore_Evas to be created.
1302  * @param parent The parent of the Ecore_Evas to be created.
1303  * @param x The X coordinate to be used.
1304  * @param y The Y coordinate to be used.
1305  * @param w The width of the Ecore_Evas to be created.
1306  * @param h The height of the Ecore_Evas to be created.
1307  * @return A handle to the created Ecore_Evas.
1308  *
1309  * @note If ecore is not compiled with support for x11 then nothing is done and NULL is returned.
1310  */
1311 EAPI Ecore_Evas     *ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
1312
1313 /**
1314  * @internal
1315  *
1316  * @brief Gets the window from Ecore_Evas using software x11.
1317  *
1318  * @param ee The Ecore_Evas from which to get the window.
1319  * @return The window of type Ecore_X_Window.
1320  *
1321  * @note If ecore is not compiled with support for x11 or if @p ee was not
1322  * created with ecore_evas_software_x11_new() then nothing is done and
1323  * 0 is returned.
1324  */
1325 EAPI Ecore_X_Window  ecore_evas_software_x11_window_get(const Ecore_Evas *ee);
1326
1327 /**
1328  * @internal
1329  *
1330  * @brief Sets the direct_resize of Ecore_Evas using software x11.
1331  *
1332  * @param ee The Ecore_Evas in which to set direct resize.
1333  * @param on Enables the resize of Ecore_Evas if equals @c EINA_TRUE, disables if equals @c EINA_FALSE.
1334  *
1335  * @note If ecore is not compiled with support for x11 then nothing is done.
1336  */
1337 EAPI void            ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on);
1338
1339 /**
1340  * @internal
1341  *
1342  * @brief Gets if the Ecore_Evas is being directly resized using software x11.
1343  *
1344  * @param ee The Ecore_Evas from which to get direct resize.
1345  * @return @c EINA_TRUE if the resize was managed directly, otherwise return @c EINA_FALSE.
1346  *
1347  * @note If ecore is not compiled with support for x11 then nothing is done and EINA_FALSE is returned.
1348  */
1349 EAPI Eina_Bool       ecore_evas_software_x11_direct_resize_get(const Ecore_Evas *ee);
1350
1351 /**
1352  * @internal
1353  *
1354  * @brief Adds an extra window on Ecore_Evas using software x11.
1355  *
1356  * @param ee The Ecore_Evas for which to add the window.
1357  * @param win The window to be added to the Ecore_Evas.
1358  *
1359  * @note If ecore is not compiled with support for x11 then nothing is done.
1360  */
1361 EAPI void            ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
1362
1363 /**
1364  * @internal
1365  *
1366  * @brief Creates a new Ecore_Evas which does not contain an XWindow. It will
1367  * only contain an XPixmap to render to
1368  *
1369  * @warning The XPixmap ID can change with every frame after it is rendered,
1370  * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you
1371  * need the current pixmap id.
1372  *
1373  * @since 1.8
1374  */
1375 EAPI Ecore_Evas     *ecore_evas_software_x11_pixmap_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
1376
1377 /**
1378  * @internal
1379  *
1380  * @brief Returns the underlying Ecore_X_Pixmap used in the Ecore_Evas.
1381  *
1382  * @param ee The Ecore_Evas whose pixmap is desired.
1383  * @return The underlying Ecore_X_Pixmap
1384  *
1385  * @warning Support for this depends on the underlying windowing system.
1386  *
1387  * @warning The XPixmap ID can change with every frame after it is rendered,
1388  * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you
1389  * need the current pixmap id.
1390  *
1391  * @since 1.8
1392  */
1393 EAPI Ecore_X_Pixmap ecore_evas_software_x11_pixmap_get(const Ecore_Evas *ee);
1394
1395 #define ECORE_EVAS_GL_X11_OPT_NONE         ECORE_EVAS_OPT_NONE
1396 #define ECORE_EVAS_GL_X11_OPT_INDIRECT     ECORE_EVAS_OPT_INDIRECT
1397 #define ECORE_EVAS_GL_X11_OPT_VSYNC        ECORE_EVAS_OPT_VSYNC
1398 #define ECORE_EVAS_GL_X11_OPT_SWAP_MODE    ECORE_EVAS_OPT_SWAP_MODE
1399 #define ECORE_EVAS_GL_X11_OPT_GL_DEPTH     ECORE_EVAS_OPT_GL_DEPTH
1400 #define ECORE_EVAS_GL_X11_OPT_GL_STENCIL   ECORE_EVAS_OPT_GL_STENCIL
1401 #define ECORE_EVAS_GL_X11_OPT_GL_MSAA      ECORE_EVAS_OPT_GL_MSAA
1402 #define ECORE_EVAS_GL_X11_OPT_LAST         ECORE_EVAS_OPT_LAST
1403
1404 #define ECORE_EVAS_GL_X11_SWAP_MODE_AUTO   ECORE_EVAS_SWAP_MODE_AUTO
1405 #define ECORE_EVAS_GL_X11_SWAP_MODE_FULL   ECORE_EVAS_SWAP_MODE_FULL
1406 #define ECORE_EVAS_GL_X11_SWAP_MODE_COPY   ECORE_EVAS_SWAP_MODE_COPY
1407 #define ECORE_EVAS_GL_X11_SWAP_MODE_DOUBLE ECORE_EVAS_SWAP_MODE_DOUBLE
1408 #define ECORE_EVAS_GL_X11_SWAP_MODE_TRIPLE ECORE_EVAS_SWAP_MODE_TRIPLE
1409
1410 /**
1411  * @internal
1412  *
1413  * @brief Creates Ecore_Evas using opengl x11.
1414  *
1415  * @param disp_name The name of the display of the Ecore_Evas to be created.
1416  * @param parent The parent of the Ecore_Evas to be created.
1417  * @param x The X coordinate to be used.
1418  * @param y The Y coordinate to be used.
1419  * @param w The width of the Ecore_Evas to be created.
1420  * @param h The height of the Ecore_Evas to be created.
1421  * @return The new Ecore_Evas.
1422  *
1423  * @note If ecore is not compiled with support for x11 then nothing is done and NULL is returned.
1424  */
1425 EAPI Ecore_Evas     *ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
1426
1427 /**
1428  * @internal
1429  *
1430  * @brief Create Ecore_Evas using OpenGL X11, with options
1431  *
1432  * @param disp_name The name of the display of the Ecore_Evas to be created.
1433  * @param parent The parent of the Ecore_Evas to be created.
1434  * @param x The X coordinate to be used.
1435  * @param y The Y coordinate to be used.
1436  * @param w The width of the Ecore_Evas to be created.
1437  * @param h The height of the Ecore_Evas to be created.
1438  * @param opt The options array (see above)
1439  * @return The new Ecore_Evas.
1440  *
1441  * Allows creation of an Ecore_Evas, similar to ecore_evas_gl_x11_new,
1442  * except it permits passing in @p opt, a NULL-terminated C array of
1443  * key/value pairs for various settings, as follows:
1444  *
1445  *   ECORE_EVAS_GL_X11_OPT_INDIRECT:  Use indirect rendering [0,1]
1446  *   ECORE_EVAS_GL_X11_OPT_VSYNC: Use vsync [0,1]
1447  *   ECORE_EVAS_GL_X11_OPT_SWAP_MODE: Swap mode to assume (see Evas_Engine_Info_Gl_Swap_Mode)
1448  *   ECORE_EVAS_GL_X11_OPT_GL_DEPTH: depth_bits
1449  *   ECORE_EVAS_GL_X11_OPT_GL_STENCIL: stencil_bits
1450  *   ECORE_EVAS_GL_X11_OPT_GL_MSAA: msaa_bits
1451  *
1452  * @note If ecore is not compiled with support for x11 then nothing is done and NULL is returned.
1453  */
1454 EAPI Ecore_Evas     *ecore_evas_gl_x11_options_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h, const int *opt);
1455
1456 /**
1457  * @brief Gets the window from Ecore_Evas using opengl x11.
1458  *
1459  * @param ee The Ecore_Evas from which to get the window.
1460  * @return The window of type Ecore_X_Window of Ecore_Evas.
1461  *
1462  * @note If ecore is not compiled with support for x11 or if @p ee was not
1463  * created with ecore_evas_gl_x11_new() then nothing is done and
1464  * 0 is returned.
1465  */
1466 EAPI Ecore_X_Window  ecore_evas_gl_x11_window_get(const Ecore_Evas *ee);
1467
1468 /**
1469  * @internal
1470  *
1471  * @brief Sets direct_resize for Ecore_Evas using opengl x11.
1472  *
1473  * @param ee The Ecore_Evas in which to set direct resize.
1474  * @param on Enables the resize of Ecore_Evas if equals @c EINA_TRUE, disables if equals @c EINA_FALSE.
1475  *
1476  * @note If ecore is not compiled with support for x11 then nothing is done.
1477  */
1478 EAPI void            ecore_evas_gl_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on);
1479
1480 /**
1481  * @internal
1482  *
1483  * @brief Gets if the Ecore_Evas is being directly resized using opengl x11.
1484  *
1485  * @param ee The Ecore_Evas from which to get direct resize.
1486  *
1487  * @note If ecore is not compiled with support for x11 then nothing is done and EINA_FALSE is returned.
1488  *
1489  * @return @c EINA_TRUE if the resize was managed directly, otherwise return @c EINA_FALSE.
1490  */
1491 EAPI Eina_Bool       ecore_evas_gl_x11_direct_resize_get(const Ecore_Evas *ee);
1492
1493 /**
1494  * @internal
1495  *
1496  * @brief Adds extra window on Ecore_Evas using opengl x11.
1497  *
1498  * @param ee The Ecore_Evas for which to add the window.
1499  * @param win The window to be added to the Ecore_Evas.
1500  *
1501  * @note If ecore is not compiled with support for x11 then nothing is done.
1502  */
1503 EAPI void            ecore_evas_gl_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
1504
1505 /**
1506  * @internal
1507  *
1508  * @brief Sets the functions to be used before and after the swap callback.
1509  *
1510  * @param ee The Ecore_Evas for which to set the swap callback.
1511  * @param data The data for which to set the swap callback.
1512  * @param pre_cb The function to be called before the callback.
1513  * @param post_cb The function to be called after the callback.
1514  *
1515  * @note If ecore is not compiled with support for x11 then nothing is done and the function is returned.
1516  */
1517 EAPI void            ecore_evas_gl_x11_pre_post_swap_callback_set(const Ecore_Evas *ee, void *data, void (*pre_cb) (void *data, Evas *e), void (*post_cb) (void *data, Evas *e));
1518
1519 /**
1520  * @internal
1521  *
1522  * @brief Creates a new Ecore_Evas which does not contain an XWindow. It will
1523  * only contain an XPixmap to render to.
1524  *
1525  * @warning The XPixmap ID can change with every frame after it is rendered,
1526  * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you
1527  * need the current pixmap id.
1528  *
1529  * @since 1.8
1530  */
1531 EAPI Ecore_Evas     *ecore_evas_gl_x11_pixmap_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
1532
1533 /**
1534  * @internal
1535  *
1536  * @brief Returns the underlying Ecore_X_Pixmap used in the Ecore_Evas.
1537  *
1538  * @param ee The Ecore_Evas whose pixmap is desired.
1539  * @return The underlying Ecore_X_Pixmap
1540  *
1541  * @warning Support for this depends on the underlying windowing system.
1542  *
1543  * @warning The XPixmap ID can change with every frame after it is rendered,
1544  * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you
1545  * need the current pixmap id.
1546  *
1547  * @since 1.8
1548  */
1549 EAPI Ecore_X_Pixmap ecore_evas_gl_x11_pixmap_get(const Ecore_Evas *ee);
1550
1551 EAPI Ecore_Evas     *ecore_evas_xrender_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h) EINA_DEPRECATED;
1552 EAPI Ecore_X_Window  ecore_evas_xrender_x11_window_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1553 EAPI void            ecore_evas_xrender_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on) EINA_DEPRECATED;
1554 EAPI Eina_Bool       ecore_evas_xrender_x11_direct_resize_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1555 EAPI void            ecore_evas_xrender_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win) EINA_DEPRECATED;
1556
1557 EAPI Ecore_Evas     *ecore_evas_software_x11_8_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h) EINA_DEPRECATED;
1558 EAPI Ecore_X_Window  ecore_evas_software_x11_8_window_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1559 EAPI Ecore_X_Window  ecore_evas_software_x11_8_subwindow_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1560 EAPI void            ecore_evas_software_x11_8_direct_resize_set(Ecore_Evas *ee, Eina_Bool on) EINA_DEPRECATED;
1561 EAPI Eina_Bool       ecore_evas_software_x11_8_direct_resize_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1562 EAPI void            ecore_evas_software_x11_8_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win) EINA_DEPRECATED;
1563
1564 EAPI Ecore_Evas     *ecore_evas_software_x11_16_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h) EINA_DEPRECATED;
1565 EAPI Ecore_X_Window  ecore_evas_software_x11_16_window_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1566 EAPI void            ecore_evas_software_x11_16_direct_resize_set(Ecore_Evas *ee, Eina_Bool on) EINA_DEPRECATED;
1567 EAPI Eina_Bool       ecore_evas_software_x11_16_direct_resize_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1568 EAPI void            ecore_evas_software_x11_16_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win) EINA_DEPRECATED;
1569
1570 /**
1571  * @internal
1572  *
1573  * @brief Creates Ecore_Evas using fb backend.
1574  *
1575  * @param disp_name The name of the display to be used.
1576  * @param rotation The rotation to be used.
1577  * @param w The width of the Ecore_Evas to be created.
1578  * @param h The height of the Ecore_Evas to be created.
1579  * @return The new Ecore_Evas.
1580  */
1581 EAPI Ecore_Evas     *ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h);
1582
1583 EAPI Ecore_Evas     *ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w, int h) EINA_DEPRECATED;
1584 EAPI Ecore_DirectFB_Window *ecore_evas_directfb_window_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1585
1586 /**
1587  * @brief Create an Ecore_Evas window using the wayland-shm engine.
1588  *
1589  * @param disp_name Name of the Wayland display to connect to.
1590  * @param parent ID of the parent window this Ecore_Evas window belongs
1591  *        to, or 0 if this is a top-level window.
1592  * @param x Horizontal position of the Ecore_Evas window.
1593  * @param y Vertical position of the Ecore_Evas window.
1594  * @param w Width of the Ecore_Evas window to be created.
1595  * @param h Height of the Ecore_Evas window to be created.
1596  * @param frame Deprecated.  (Just pass EINA_FALSE.)
1597  * @return Ecore_Evas instance or @c NULL if creation failed.
1598  *
1599  * Wayland's Shared Memory (SHM) rendering model stores client-drawn
1600  * data in system memory buffers for communication with the display
1601  * server.  The server then copies the buffer from system memory to the
1602  * video output as appropriate.  This routine constructs an Ecore_Evas
1603  * window object that uses SHM buffers for communication using the
1604  * Wayland protocol.
1605  *
1606  * @see ecore_evas_new()
1607  * @see ecore_evas_wayland_egl_new()
1608  */
1609 EAPI Ecore_Evas     *ecore_evas_wayland_shm_new(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame);
1610
1611 /**
1612  * @internal
1613  *
1614  * @brief Create an Ecore_Evas window using the wayland-egl engine.
1615  *
1616  * @param disp_name Name of the Wayland display to connect to.
1617  * @param parent ID of the parent window this Ecore_Evas window belongs
1618  *        to, or 0 if this is a top-level window.
1619  * @param x Horizontal position of the Ecore_Evas window.
1620  * @param y Vertical position of the Ecore_Evas window.
1621  * @param w Width of the Ecore_Evas window to be created.
1622  * @param h Height of the Ecore_Evas window to be created.
1623  * @param frame Deprecated.  (Just pass EINA_FALSE.)
1624  * @return Ecore_Evas instance or @c NULL if creation failed.
1625  *
1626  * Under Wayland, clients can also set up rendering directly to graphics
1627  * hardware memory via various rendering APIs such as OpenGL, OpenGL ES,
1628  * etc.) thus skipping the need for server-side copying of graphics data
1629  * to the display device, thus providing higher performance than SHM.
1630  * This routine constructs an Ecore_Evas window object using the
1631  * Embedded-system Graphics Library (EGL) interface for handling the
1632  * context management and rendering synchronization.
1633  *
1634  * @see ecore_evas_new()
1635  * @see ecore_evas_wayland_shm_new()
1636  */
1637 EAPI Ecore_Evas     *ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame);
1638
1639 /**
1640  * @internal
1641  *
1642  * @brief Begin resizing the Ecore_Evas window.
1643  *
1644  * @param ee The Ecore_Evas.
1645  * @param location The edge of the window from which the resize should start.
1646  *
1647  * The location edge is an enum as defined by the XDG Shell protocol.  See
1648  * the zxdg_toplevel_v6_resize_edge enum definition for edge numbering.
1649  */
1650 EAPI void            ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
1651
1652 /**
1653  * @internal
1654  *
1655  * @brief Begin moving the Ecore_Evas window.
1656  *
1657  * @param ee The Ecore_Evas.
1658  * @param x (unused)
1659  * @param y (unused)
1660  */
1661 EAPI void            ecore_evas_wayland_move(Ecore_Evas *ee, int x, int y);
1662
1663 /**
1664  * @internal
1665  *
1666  * @brief Set the pointer for the Ecore_Evas window.
1667  *
1668  * @param ee The Ecore_Evas.
1669  * @param hot_x X coordinate.
1670  * @param hot_y Y coordinate.
1671  *
1672  * @note: This routine is unimplemented.
1673  */
1674 EAPI void            ecore_evas_wayland_pointer_set(Ecore_Evas *ee, int hot_x, int hot_y);
1675
1676 /**
1677  * @internal
1678  *
1679  * @brief Set the type of the Ecore_Evas window.
1680  *
1681  * Enables setting the window as top level, menu, dnd, etc.
1682  *
1683  * @param ee The Ecore_Evas.
1684  * @param type The Ecore_Wl2_Window_Type to set on the window.
1685  *
1686  * @see ecore_wl2_window_type_set()
1687  * @see Ecore_Wl2_Window_Type
1688  */
1689 EAPI void            ecore_evas_wayland_type_set(Ecore_Evas *ee, int type);
1690
1691 /**
1692  * @internal
1693  *
1694  * @brief Gets the window from Ecore_Evas using the wayland backend.
1695  *
1696  * @param ee The Ecore_Evas from which to get the window.
1697  * @return The window of type Ecore_X_Window.
1698  *
1699  * @note If ecore is not compiled with support for wayland or if @p ee
1700  * was not created with ecore_evas_wayland_shm_new() or
1701  * ecore_evas_wayland_egl_new() then nothing is done and NULL is returned.
1702  */
1703 EAPI Ecore_Wl_Window *ecore_evas_wayland_window_get(const Ecore_Evas *ee);
1704
1705 /**
1706  * @internal
1707  *
1708  * @brief Gets the window from Ecore_Evas using the wayland2 backend.
1709  *
1710  * @param ee The Ecore_Evas from which to get the window.
1711  * @return The window of type Ecore_X_Window.
1712  *
1713  * @note If ecore is not compiled with support for wayland or if @p ee
1714  * was not created with ecore_evas_wayland_shm_new() or
1715  * ecore_evas_wayland_egl_new() then nothing is done and NULL is returned.
1716  *
1717  * @since 1.17
1718  */
1719 EAPI Ecore_Wl2_Window *ecore_evas_wayland2_window_get(const Ecore_Evas *ee);
1720
1721 /**
1722  * @internal
1723  *
1724  * @brief Gets the window from Ecore_Evas using the opengl_cocoa backend.
1725  *
1726  * @param ee The Ecore_Evas from which to get the window.
1727  * @return The window of type Ecore_X_Window.
1728  *
1729  * @note If ecore is not compiled with support for opengl_cocoa or if @p
1730  * ee was not created with ecore_evas_cocoa_new() then nothing is done
1731  * and NULL is returned.
1732  *
1733  * @since 1.17
1734  */
1735 EAPI Ecore_Cocoa_Window *ecore_evas_cocoa_window_get(const Ecore_Evas *ee);
1736
1737 /**
1738  * @internal
1739  *
1740  * @brief Create an Ecore_Evas window using the drm engine.
1741  *
1742  * @param device Name of the Wayland display to connect to.
1743  * @param parent (Unused)
1744  * @param x Horizontal position of the Ecore_Evas window.
1745  * @param y Vertical position of the Ecore_Evas window.
1746  * @param w Width of the Ecore_Evas window to be created.
1747  * @param h Height of the Ecore_Evas window to be created.
1748  * @return Ecore_Evas instance or @c NULL if creation failed.
1749  *
1750  * Creates an Ecore_Evas window using the Direct Rendering Manager (DRM)
1751  * backend.  DRM is a kernel-level module providing direct graphic
1752  * hardware access, bypassing the GL stack entirely.
1753  *
1754  * @see ecore_evas_new()
1755  * @see ecore_evas_gl_drm_new()
1756  */
1757 EAPI Ecore_Evas     *ecore_evas_drm_new(const char *device, unsigned int parent, int x, int y, int w, int h);
1758
1759 /**
1760  * @internal
1761  *
1762  * @brief Create an Ecore_Evas window using the drm engine with GL support.
1763  *
1764  * @param device Name of the Wayland display to connect to.
1765  * @param parent (Unused)
1766  * @param x Horizontal position of the Ecore_Evas window.
1767  * @param y Vertical position of the Ecore_Evas window.
1768  * @param w Width of the Ecore_Evas window to be created.
1769  * @param h Height of the Ecore_Evas window to be created.
1770  * @return Ecore_Evas instance or @c NULL if creation failed.
1771  *
1772  * This creates a drm backend backed Ecore_Evas window, that also includes
1773  * gl support using libglapi.
1774  *
1775  * @see ecore_evas_new()
1776  * @see ecore_evas_drm_new()
1777  */
1778 EAPI Ecore_Evas     *ecore_evas_gl_drm_new(const char *device, unsigned int parent, int x, int y, int w, int h); /** @since 1.12 */
1779
1780 /**
1781  * @brief Creates a new @c Ecore_Evas canvas bound to the Evas
1782  * @b buffer engine
1783  *
1784  * @param w The width of the canvas, in pixels
1785  * @param h The height of the canvas, in pixels
1786  * @return A new @c Ecore_Evas instance or @c NULL, on failure
1787  *
1788  * This creates a new buffer canvas wrapper, with image data array
1789  * @b bound to the ARGB format, 8 bits per pixel.
1790  *
1791  * This function will allocate the needed pixels array with canonical
1792  * @c malloc(). If you wish a custom function to allocate it, consider
1793  * using ecore_evas_buffer_allocfunc_new(), instead.
1794  *
1795  * @note This function actually is a wrapper on
1796  * ecore_evas_buffer_allocfunc_new(), using the same @a w and @a h
1797  * arguments and canonical @c malloc() and @c free() to the memory
1798  * allocation and freeing functions. See that function's documentation
1799  * for more details.
1800  */
1801 EAPI Ecore_Evas     *ecore_evas_buffer_new(int w, int h);
1802
1803 /**
1804  * @brief Creates a new @c Ecore_Evas canvas bound to the Evas
1805  * @b buffer engine, giving custom allocation and freeing functions for
1806  * the canvas memory region
1807  *
1808  * @param w The width of the canvas, in canvas units
1809  * @param h The height of the canvas, in canvas units
1810  * @param alloc_func Function to be called to allocate the memory
1811  * needed for the new buffer canvas. @a data will be passed the same
1812  * value as the @p data of this function, while @a size will be passed
1813  * @p w times @p h times @c sizeof(int).
1814  * @param free_func Function to be called to free the memory used by
1815  * the new buffer canvas. @a data will be passed the same value as the
1816  * @p data of this function, while @a pix will be passed the canvas
1817  * memory pointer.
1818  * @param data Custom data to be passed to the allocation and freeing
1819  * functions
1820  * @return A new @c Ecore_Evas instance or @c NULL, on failure
1821  *
1822  * This creates a new buffer canvas wrapper, with image data array
1823  * @b bound to the ARGB format, 8 bits per pixel.
1824  *
1825  * This function is useful when one wants an @c Ecore_Evas buffer
1826  * canvas with a custom allocation function, like one getting memory
1827  * chunks from a memory pool, for example.
1828  *
1829  * On any resizing of this @c Ecore_Evas buffer canvas, its image data
1830  * will be @b freed, to be allocated again with the new size.
1831  *
1832  * @note @p w and @p h sizes have to greater or equal to 1. Otherwise,
1833  * they'll be interpreted as 1, exactly.
1834  *
1835  * @see ecore_evas_buffer_new()
1836  */
1837 EAPI Ecore_Evas     *ecore_evas_buffer_allocfunc_new(int w, int h, void *(*alloc_func) (void *data, int size), void (*free_func) (void *data, void *pix), const void *data);
1838
1839 /**
1840  * @brief Grabs a pointer to the actual pixels array of a given
1841  * @c Ecore_Evas @b buffer canvas/window.
1842  *
1843  * @param ee An @c Ecore_Evas handle
1844  * @return A pointer to the internal pixels array of @p ee
1845  *
1846  * Besides returning a pointer to the actual pixel array of the given
1847  * canvas, this call will force a <b>rendering update</b> on @p ee
1848  * first.
1849  *
1850  * A common use case for this call is to create an image object, from
1851  * @b another canvas, to have as data @p ee's contents, thus
1852  * snapshoting the canvas. For that case, one can also use the
1853  * ecore_evas_object_image_new() helper function.
1854  */
1855 EAPI const void     *ecore_evas_buffer_pixels_get(Ecore_Evas *ee);
1856
1857 /**
1858  * @brief Returns a pointer to the Ecore_Evas parent of the given Ecore_Evas.
1859  *
1860  * @param ee An @c Ecore_Evas handle
1861  * @return A pointer to the Ecore_Evas parent.
1862  *
1863  * A use case for the function is to determine if the buffer is used inside
1864  * X11 or Wayland. Since the buffer engine doesn't give any indication on
1865  * it, we need to retrieve information from the Ecore_Evas parent.
1866  *
1867  * @since 1.13
1868  */
1869 EAPI Ecore_Evas *ecore_evas_buffer_ecore_evas_parent_get(Ecore_Evas *ee);
1870
1871 /* TIZEN_ONLY(20160330): TBM Backend */
1872 EAPI Ecore_Evas     *ecore_evas_gl_tbm_new(int w, int h);
1873 EAPI Ecore_Evas     *ecore_evas_software_tbm_new(int w, int h);
1874 EAPI Ecore_Evas     *ecore_evas_tbm_allocfunc_new(const char *engine, int w, int h,void *(*alloc_func) (void *data, int w, int h),void (*free_func) (void *data, void *tbm_queue),const void *data);
1875 EAPI Ecore_Evas     *ecore_evas_tbm_ext_new(const char *engine, void *tbm_surf_queue, void* data);
1876 EAPI const void     *ecore_evas_tbm_pixels_acquire(Ecore_Evas *ee);
1877 EAPI void            ecore_evas_tbm_pixels_release(Ecore_Evas *ee);
1878 EAPI void           *ecore_evas_tbm_surface_get(Ecore_Evas *ee);
1879 EAPI int             ecore_evas_tbm_stride_get(Ecore_Evas *ee);
1880
1881 EAPI Ecore_Evas     *ecore_evas_tbm_native_allocfunc_new(const char *engine,
1882                                                          void *native_device,
1883                                                          int w,
1884                                                          int h,
1885                                                          void *(*alloc_func) (void *data, int w, int h),
1886                                                          void (*free_func) (void *data, void *native_window),
1887                                                          const void *data);
1888 /* TIZEN_ONLY(20160330): TBM Backend */
1889
1890 /**
1891  * @internal
1892  *
1893  * @brief Creates a new @c Ecore_Evas canvas bound to the Evas
1894  * @b ews (Ecore + Evas Single Process Windowing System) engine
1895  *
1896  * EWS is a simple single process windowing system. The backing store
1897  * is also an @c Ecore_Evas that can be setup with
1898  * ecore_evas_ews_setup() and retrieved with
1899  * ecore_evas_ews_ecore_evas_get(). It will allow window management
1900  * using events prefixed with @c ECORE_EVAS_EVENT_EWS_.
1901  *
1902  * The EWS windows (returned by this function or
1903  * ecore_evas_new("ews"...)) will all be software buffer windows
1904  * automatic rendered to the backing store.
1905  *
1906  * @param x Horizontal position of window, in pixels
1907  * @param y Vertical position of window, in pixels
1908  * @param w The width of the canvas, in pixels
1909  * @param h The height of the canvas, in pixels
1910  * @return A new @c Ecore_Evas instance or @c NULL, on failure
1911  *
1912  * @see ecore_evas_ews_setup()
1913  * @see ecore_evas_ews_ecore_evas_get()
1914  *
1915  * @since 1.1
1916  */
1917 EAPI Ecore_Evas     *ecore_evas_ews_new(int x, int y, int w, int h);
1918
1919
1920 /**
1921  * @internal
1922  *
1923  * @brief Returns the backing store image object that represents the given
1924  * window in EWS.
1925  *
1926  * @param ee The Ecore_Evas from which to get the backing store.
1927  * @return The evas object of EWS backing store.
1928  *
1929  * @note This should not be modified anyhow, but may be helpful to
1930  *       determine stacking and geometry of it for window managers
1931  *       that decorate windows.
1932  *
1933  * @see ecore_evas_ews_manager_set()
1934  * @see ecore_evas_ews_evas_get()
1935  * @since 1.1
1936  */
1937 EAPI Evas_Object *ecore_evas_ews_backing_store_get(const Ecore_Evas *ee);
1938
1939 /**
1940  * @internal
1941  *
1942  * @brief Calls the window to be deleted (freed), but can let user decide to
1943  * forbid it by using ecore_evas_callback_delete_request_set().
1944  *
1945  * @param ee The Ecore_Evas for which window will be deleted.
1946  *
1947  * @since 1.1
1948  */
1949 EAPI void ecore_evas_ews_delete_request(Ecore_Evas *ee);
1950
1951 /**
1952  * @internal
1953  *
1954  * @brief Creates an Evas image object with image data <b>bound to an
1955  * own, internal @c Ecore_Evas canvas wrapper</b>
1956  *
1957  * @param ee_target @c Ecore_Evas to have the canvas receiving the new
1958  * image object
1959  * @return A handle to the new image object
1960  *
1961  * This will create a @b special Evas image object. The image's pixel
1962  * array will get bound to the same image data array of an @b internal
1963  * @b buffer @c Ecore_Evas canvas. The user of this function is, then,
1964  * supposed to grab that @c Ecore_Evas handle, with
1965  * ecore_evas_object_ecore_evas_get(), and use its canvas to render
1966  * whatever contents he/she wants, @b independently of the contents
1967  * of the canvas owned by @p ee_target. Those contents will reflect on
1968  * the canvas of @p ee, though, being exactly the image data of the
1969  * object returned by this function.
1970  *
1971  * This is a helper function for the scenario of one wanting to grab a
1972  * buffer canvas' contents (with ecore_evas_buffer_pixels_get()) to be
1973  * used on another canvas, for whatever reason. The most common goal
1974  * of this setup is to @b save an image file with a whole canvas as
1975  * contents, that cannot be achieved by using an image file within
1976  * the target canvas.
1977  *
1978  * @warning Always resize the returned image and its underlying
1979  * @c Ecore_Evas handle accordingly. They must be kept with same sizes
1980  * for things to work as expected. Also, you @b must issue
1981  * @c evas_object_image_size_set() on the image with that same size. If
1982  * the image is to be shown in a canvas bound to an engine different
1983  * than the buffer one, then you must also set this image's @b fill
1984  * properties accordingly.
1985  *
1986  * @note The image returned will always be bound to the
1987  * @c EVAS_COLORSPACE_ARGB8888 colorspace, always.
1988  *
1989  * @note Use ecore_evas_object_evas_get() to grab the image's internal
1990  * own canvas directly.
1991  *
1992  * @note If snapshoting this image's internal canvas, remember to
1993  * flush its internal @c Ecore_Evas firstly, with
1994  * ecore_evas_manual_render().
1995  */
1996 EAPI Evas_Object    *ecore_evas_object_image_new(Ecore_Evas *ee_target);
1997
1998 /**
1999  * @internal
2000  *
2001  * @brief Retrieve the internal @c Ecore_Evas handle of an image
2002  * object created via ecore_evas_object_image_new().
2003  *
2004  * @param obj A handle to an image object created via
2005  * ecore_evas_object_image_new()
2006  * @return The underlying @c Ecore_Evas handle in @p obj
2007  */
2008 EAPI Ecore_Evas     *ecore_evas_object_ecore_evas_get(Evas_Object *obj);
2009
2010 /**
2011  * @internal
2012  *
2013  * @brief Retrieve the canvas bound to the internal @c Ecore_Evas
2014  * handle of an image object created via ecore_evas_object_image_new()
2015  *
2016  * @param obj A handle to an image object created via
2017  * ecore_evas_object_image_new()
2018  * @return A handle to @p obj's underlying @c Ecore_Evas's canvas
2019  */
2020 EAPI Evas           *ecore_evas_object_evas_get(Evas_Object *obj);
2021
2022 /**
2023  * @internal
2024  *
2025  * @brief Creates a new @c Ecore_Evas canvas bound to the Evas
2026  * @b gdi (software) engine.
2027  *
2028  * @param parent ID of the parent window this Ecore_Evas window belongs
2029  *        to, or 0 if this is a top-level window.
2030  * @param x Horizontal position of window, in pixels.
2031  * @param y Vertical position of window, in pixels.
2032  * @param width The width of the canvas, in pixels.
2033  * @param height The height of the canvas, in pixels.
2034  * @return A new @c Ecore_Evas instance, or @c NULL on failure.
2035  *
2036  * The Graphics Device Interface (GDI) is a display API for Microsoft
2037  * Win32 similar in concept to Xlib or Quartz, providing an
2038  * abstraction layer for performing advanced drawing functionalities
2039  * using software rendering.
2040  */
2041 EAPI Ecore_Evas     *ecore_evas_software_gdi_new(Ecore_Win32_Window *parent,
2042                                                  int                 x,
2043                                                  int                 y,
2044                                                  int                 width,
2045                                                  int                 height);
2046
2047 /**
2048  * @internal
2049  *
2050  * @brief Creates a new @c Ecore_Evas canvas bound to the Evas
2051  * @b DirectDraw (software) engine.
2052  *
2053  * @param parent ID of the parent window this Ecore_Evas window belongs
2054  *        to, or 0 if this is a top-level window.
2055  * @param x Horizontal position of window, in pixels
2056  * @param y Vertical position of window, in pixels
2057  * @param width The width of the canvas, in pixels
2058  * @param height The height of the canvas, in pixels
2059  * @return A new @c Ecore_Evas instance or @c NULL on failure
2060  *
2061  * DirectDraw is an old Microsoft Win32 API for graphics rendering.
2062  * This API uses the unaccelerated software-based rendering.
2063  */
2064 EAPI Ecore_Evas     *ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
2065                                                    int                 x,
2066                                                    int                 y,
2067                                                    int                 width,
2068                                                    int                 height);
2069
2070 EAPI Ecore_Evas     *ecore_evas_software_16_ddraw_new(Ecore_Win32_Window *parent,
2071                                                       int                 x,
2072                                                       int                 y,
2073                                                       int                 width,
2074                                                       int                 height);
2075
2076 EAPI Ecore_Evas     *ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
2077                                              int                 x,
2078                                              int                 y,
2079                                              int                 width,
2080                                              int                 height);
2081
2082 EAPI Ecore_Evas *ecore_evas_gl_glew_new(Ecore_Win32_Window *parent,
2083                                         int                 x,
2084                                         int                 y,
2085                                         int                 width,
2086                                         int                 height);
2087
2088 EAPI Ecore_Win32_Window *ecore_evas_win32_window_get(const Ecore_Evas *ee);
2089
2090 /**
2091  * @internal
2092  *
2093  * @brief Creates a new @c Ecore_Evas canvas bound to the Evas
2094  * @b SDL engine.
2095  *
2096  * @param name        Device target name, defaults to "EFL SDL" if NULL.
2097  * @param w           Width of the canvas, in pixels.
2098  * @param h           Height of the canvas, in pixels.
2099  * @param fullscreen  Set the fullscreen property for the window.
2100  * @param hwsurface   Set the hardware surface property for the window.
2101  * @param noframe     Set the noframe flag on the einfo.
2102  * @param alpha       Set alpha for the Ecore_Evas window.
2103  * @return A new @c Ecore_Evas instance, or @c NULL on failure.
2104  */
2105 EAPI Ecore_Evas     *ecore_evas_sdl_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha);
2106
2107 EAPI Ecore_Evas     *ecore_evas_sdl16_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha);
2108
2109 /**
2110  * @internal
2111  *
2112  * @brief Creates a new @c Ecore_Evas canvas bound to the Evas
2113  * @b SDL + gl engine.
2114  *
2115  * @param name        Device target name, defaults to "EFL SDL" if NULL.
2116  * @param w           Width of the canvas, in pixels.
2117  * @param h           Height of the canvas, in pixels.
2118  * @param fullscreen  Set the fullscreen property for the window.
2119  * @param noframe     Set the noframe flag on the einfo.
2120  * @return A new @c Ecore_Evas instance or @c NULL on failure
2121  */
2122 EAPI Ecore_Evas     *ecore_evas_gl_sdl_new(const char* name, int w, int h, int fullscreen, int noframe);
2123
2124 EAPI Ecore_Evas     *ecore_evas_software_wince_new(Ecore_WinCE_Window *parent,
2125                                                    int                 x,
2126                                                    int                 y,
2127                                                    int                 width,
2128                                                    int                 height) EINA_DEPRECATED;
2129
2130 EAPI Ecore_Evas     *ecore_evas_software_wince_fb_new(Ecore_WinCE_Window *parent,
2131                                                       int                 x,
2132                                                       int                 y,
2133                                                       int                 width,
2134                                                       int                 height) EINA_DEPRECATED;
2135
2136 EAPI Ecore_Evas     *ecore_evas_software_wince_gapi_new(Ecore_WinCE_Window *parent,
2137                                                         int                 x,
2138                                                         int                 y,
2139                                                         int                 width,
2140                                                         int                 height) EINA_DEPRECATED;
2141
2142 EAPI Ecore_Evas     *ecore_evas_software_wince_ddraw_new(Ecore_WinCE_Window *parent,
2143                                                          int                 x,
2144                                                          int                 y,
2145                                                          int                 width,
2146                                                          int                 height) EINA_DEPRECATED;
2147
2148 EAPI Ecore_Evas     *ecore_evas_software_wince_gdi_new(Ecore_WinCE_Window *parent,
2149                                                        int                 x,
2150                                                        int                 y,
2151                                                        int                 width,
2152                                                        int                 height) EINA_DEPRECATED;
2153
2154 EAPI Ecore_WinCE_Window *ecore_evas_software_wince_window_get(const Ecore_Evas *ee) EINA_DEPRECATED;
2155
2156 /**
2157  * @internal
2158  *
2159  * @brief Creates a new @c Ecore_Evas canvas bound to the Evas
2160  * @b Cocoa engine.
2161  *
2162  * @param parent ID of the parent window this Ecore_Evas window belongs
2163  *        to, or 0 if this is a top-level window.
2164  * @param x Horizontal position of window, in pixels
2165  * @param y Vertical position of window, in pixels
2166  * @param w Width of the canvas, in pixels.
2167  * @param h Height of the canvas, in pixels.
2168  *
2169  * The cocoa backend is used for MacOS based systems.
2170  */
2171 EAPI Ecore_Evas *ecore_evas_cocoa_new(Ecore_Cocoa_Window *parent,
2172                                       int x,
2173                                       int y,
2174                                       int w,
2175                                       int h);
2176
2177 /**
2178  * @internal
2179  *
2180  * @brief Creates a new @c Ecore_Evas canvas bound to the Evas
2181  * @b psl1ght engine.
2182  *
2183  * @param name Deprecated.
2184  * @param w Width of the canvas, in pixels.
2185  * @param h Height of the canvas, in pixels.
2186  *
2187  * The psl1ght backend is used for the PS3 GameOS.
2188  */
2189 EAPI Ecore_Evas *ecore_evas_psl1ght_new(const char* name, int w, int h) EINA_DEPRECATED;
2190
2191
2192 /* generic manipulation calls */
2193 /**
2194  * @internal
2195  *
2196  * @brief Gets the engine name used by this Ecore_Evas(window).
2197  *
2198  * @param ee Ecore_Evas whose engine's name is desired
2199  * @return A string that can(usually) be used in ecore_evas_new()
2200  *
2201  * @see ecore_evas_free()
2202  */
2203 EAPI const char *ecore_evas_engine_name_get(const Ecore_Evas *ee);
2204
2205 /**
2206  * @brief Returns the Ecore_Evas for this Evas.
2207  *
2208  * @param e The Evas to get the Ecore_Evas from
2209  * @return The Ecore_Evas that holds this Evas, or @c NULL if not held by one.
2210  *
2211  * @warning Only use on Evas' created with ecore evas!
2212  */
2213 EAPI Ecore_Evas *ecore_evas_ecore_evas_get(const Evas *e);
2214
2215 /**
2216  * @brief Frees an Ecore_Evas.
2217  *
2218  * @param ee The Ecore_Evas to free
2219  *
2220  * This frees up any memory used by the Ecore_Evas.
2221  */
2222 EAPI void        ecore_evas_free(Ecore_Evas *ee);
2223
2224 /**
2225  * @brief Retrieves user data associated with an Ecore_Evas.
2226  *
2227  * @param ee The Ecore_Evas to retrieve the user data from.
2228  * @param key The key which the user data to be retrieved is associated with.
2229  * @return @c NULL on error or no data found, A pointer to the user data on
2230  *     success.
2231  *
2232  * This function retrieves user specific data that has been stored within an
2233  * Ecore_Evas structure with ecore_evas_data_set().
2234  *
2235  * @see ecore_evas_data_set()
2236  */
2237 EAPI void       *ecore_evas_data_get(const Ecore_Evas *ee, const char *key);
2238
2239 /**
2240  * @brief Stores user data in an Ecore_Evas structure.
2241  *
2242  * @param ee The Ecore_Evas to store the user data in.
2243  * @param key A unique string to associate the user data against. Cannot
2244  * be NULL.
2245  * @param data A pointer to the user data to store.
2246  *
2247  * This function associates the @p data with a @p key which is stored by
2248  * the Ecore_Evas @p ee. Be aware that a call to ecore_evas_free() will
2249  * not free any memory for the associated user data, this is the responsibility
2250  * of the caller.
2251  *
2252  * @see ecore_evas_callback_pre_free_set()
2253  * @see ecore_evas_free()
2254  * @see ecore_evas_data_get()
2255  */
2256 EAPI void        ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data);
2257
2258   /**
2259  * @brief Sets a callback for Ecore_Evas resize events.
2260  *
2261  * @param ee The Ecore_Evas to set callbacks on
2262  * @param func The function to call
2263  *
2264  * A call to this function will set a callback on an Ecore_Evas, causing
2265  * @p func to be called whenever @p ee is resized.
2266  *
2267  * @warning If and when this function is called depends on the underlying
2268  * windowing system.
2269  */
2270 EAPI void        ecore_evas_callback_resize_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2271
2272 /**
2273  * @brief Sets a callback for Ecore_Evas move events.
2274  *
2275  * @param ee The Ecore_Evas to set callbacks on
2276  * @param func The function to call
2277  *
2278  * A call to this function will set a callback on an Ecore_Evas, causing
2279  * @p func to be called whenever @p ee is moved.
2280  *
2281  * @warning If and when this function is called depends on the underlying
2282  * windowing system.
2283  */
2284 EAPI void        ecore_evas_callback_move_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2285
2286 /**
2287  * @brief Sets a callback for Ecore_Evas show events.
2288  *
2289  * @param ee The Ecore_Evas to set callbacks on
2290  * @param func The function to call
2291  *
2292  * A call to this function will set a callback on an Ecore_Evas, causing
2293  * @p func to be called whenever @p ee is shown.
2294  *
2295  * @warning If and when this function is called depends on the underlying
2296  * windowing system.
2297  */
2298 EAPI void        ecore_evas_callback_show_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2299
2300 /**
2301  * @brief Sets a callback for Ecore_Evas hide events.
2302  *
2303  * @param ee The Ecore_Evas to set callbacks on
2304  * @param func The function to call
2305  *
2306  * A call to this function will set a callback on an Ecore_Evas, causing
2307  * @p func to be called whenever @p ee is hidden.
2308  *
2309  * @warning If and when this function is called depends on the underlying
2310  * windowing system.
2311  */
2312 EAPI void        ecore_evas_callback_hide_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2313
2314 /**
2315  * @brief Sets a callback for Ecore_Evas delete request events.
2316  *
2317  * @param ee The Ecore_Evas to set callbacks on
2318  * @param func The function to call
2319  *
2320  * A call to this function will set a callback on an Ecore_Evas, causing
2321  * @p func to be called whenever @p ee gets a delete request.
2322  *
2323  * @warning If and when this function is called depends on the underlying
2324  * windowing system.
2325  */
2326 EAPI void        ecore_evas_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2327
2328 /**
2329  * @brief Sets a callback for Ecore_Evas destroy events.
2330  *
2331  * @param ee The Ecore_Evas to set callbacks on
2332  * @param func The function to call
2333  *
2334  * A call to this function will set a callback on an Ecore_Evas, causing
2335  * @p func to be called whenever @p ee is destroyed.
2336  *
2337  * @warning If and when this function is called depends on the underlying
2338  * windowing system.
2339  */
2340 EAPI void        ecore_evas_callback_destroy_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2341
2342 /**
2343  * @brief Sets a callback for Ecore_Evas focus in events.
2344  * @param ee The Ecore_Evas to set callbacks on
2345  * @param func The function to call
2346
2347  * A call to this function will set a callback on an Ecore_Evas, causing
2348  * @p func to be called whenever @p ee gets focus.
2349  *
2350  * @warning If and when this function is called depends on the underlying
2351  * windowing system.
2352  * @note This function only reports focus in events for the default seat!
2353  *
2354  * @see ecore_evas_callback_focus_device_in_set()
2355  */
2356 EAPI void        ecore_evas_callback_focus_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2357
2358 /**
2359  * @brief Sets a callback for Ecore_Evas focus out events.
2360  *
2361  * @param ee The Ecore_Evas to set callbacks on
2362  * @param func The function to call
2363  *
2364  * A call to this function will set a callback on an Ecore_Evas, causing
2365  * @p func to be called whenever @p ee loses focus.
2366  *
2367  * @warning If and when this function is called depends on the underlying
2368  * windowing system.
2369  * @note This function only reports focus in events for the default seat!
2370  *
2371  * @see ecore_evas_callback_focus_device_out_set()
2372  */
2373 EAPI void        ecore_evas_callback_focus_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2374
2375 /**
2376  * @internal
2377  *
2378  * @brief Sets a callback for Ecore_Evas focus in events.
2379  *
2380  * @param ee The Ecore_Evas to set callbacks on
2381  * @param func The function to call
2382  *
2383  * A call to this function will set a callback on an Ecore_Evas, causing
2384  * @p func to be called whenever @p ee gets focus.
2385  *
2386  * @warning If and when this function is called depends on the underlying
2387  * windowing system.
2388  *
2389  * @see ecore_evas_callback_focus_device_out_set()
2390  * @since 1.19
2391  */
2392 EAPI void        ecore_evas_callback_focus_device_in_set(Ecore_Evas *ee, Ecore_Evas_Focus_Device_Event_Cb func);
2393
2394 /**
2395  * @internal
2396  *
2397  * @brief Sets a callback for Ecore_Evas focus out events.
2398  *
2399  * @param ee The Ecore_Evas to set callbacks on
2400  * @param func The function to call
2401  *
2402  * A call to this function will set a callback on an Ecore_Evas, causing
2403  * @p func to be called whenever @p ee loses focus.
2404  *
2405  * @warning If and when this function is called depends on the underlying
2406  * windowing system.
2407  *
2408  * @see ecore_evas_callback_focus_device_in_set()
2409  * @since 1.19
2410  */
2411 EAPI void        ecore_evas_callback_focus_device_out_set(Ecore_Evas *ee, Ecore_Evas_Focus_Device_Event_Cb func);
2412
2413 /**
2414  * @brief Sets a callback for Ecore_Evas sticky events.
2415  *
2416  * @param ee The Ecore_Evas to set callbacks on
2417  * @param func The function to call
2418  *
2419  * A call to this function will set a callback on an Ecore_Evas, causing
2420  * @p func to be called whenever @p ee becomes sticky.
2421  *
2422  * @warning If and when this function is called depends on the underlying
2423  * windowing system.
2424  */
2425 EAPI void        ecore_evas_callback_sticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2426
2427 /**
2428  * @brief Sets a callback for Ecore_Evas un-sticky events.
2429  *
2430  * @param ee The Ecore_Evas to set callbacks on
2431  * @param func The function to call
2432
2433  * A call to this function will set a callback on an Ecore_Evas, causing
2434  * @p func to be called whenever @p ee becomes un-sticky.
2435  *
2436  * @warning If and when this function is called depends on the underlying
2437  * windowing system.
2438  */
2439 EAPI void        ecore_evas_callback_unsticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2440
2441 /**
2442  * @internal
2443  *
2444  * @brief Sets a callback for Ecore_Evas mouse in events.
2445  *
2446  * @param ee The Ecore_Evas to set callbacks on
2447  * @param func The function to call
2448  *
2449  * A call to this function will set a callback on an Ecore_Evas, causing
2450  * @p func to be called whenever the mouse enters @p ee.
2451  *
2452  * @warning If and when this function is called depends on the underlying
2453  * windowing system.
2454  *
2455  * @since 1.19
2456  */
2457 EAPI void        ecore_evas_callback_device_mouse_in_set(Ecore_Evas *ee, Ecore_Evas_Mouse_IO_Cb func);
2458
2459 /**
2460  * @internal
2461  *
2462  * @brief Sets a callback for Ecore_Evas mouse out events.
2463  *
2464  * @param ee The Ecore_Evas to set callbacks on
2465  * @param func The function to call
2466  *
2467  * A call to this function will set a callback on an Ecore_Evas, causing
2468  * @p func to be called whenever the mouse leaves @p ee.
2469  *
2470  * @warning If and when this function is called depends on the underlying
2471  * windowing system.
2472  *
2473  * @since 1.19
2474  */
2475 EAPI void        ecore_evas_callback_device_mouse_out_set(Ecore_Evas *ee, Ecore_Evas_Mouse_IO_Cb func);
2476
2477 /**
2478  * @brief Sets a callback for Ecore_Evas mouse in events.
2479  *
2480  * @param ee The Ecore_Evas to set callbacks on
2481  * @param func The function to call
2482  *
2483  * A call to this function will set a callback on an Ecore_Evas, causing
2484  * @p func to be called whenever the mouse enters @p ee.
2485  *
2486  * @note the @p func will only report events for the default mouse.
2487  * @warning If and when this function is called depends on the underlying
2488  * windowing system.
2489  *
2490  * @see ecore_evas_callback_device_mouse_in_set
2491  */
2492 EAPI void        ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2493
2494 /**
2495  * @brief Sets a callback for Ecore_Evas mouse out events.
2496  *
2497  * @param ee The Ecore_Evas to set callbacks on
2498  * @param func The function to call
2499  *
2500  * A call to this function will set a callback on an Ecore_Evas, causing
2501  * @p func to be called whenever the mouse leaves @p ee.
2502  *
2503  * @note the @p func will only report events for the default mouse.
2504  * @warning If and when this function is called depends on the underlying
2505  * windowing system.
2506  *
2507  * @see ecore_evas_callback_device_mouse_out_set
2508  */
2509 EAPI void        ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2510
2511 /**
2512  * @brief Sets a callback for Ecore_Evas pre-render events.
2513  *
2514  * @param ee The Ecore_Evas to set callbacks on
2515  * @param func The function to call
2516  *
2517  * A call to this function will set a callback on an Ecore_Evas, causing
2518  * @p func to be called just before the evas in @p ee is rendered.
2519  *
2520  * @warning If and when this function is called depends on the underlying
2521  * windowing system.
2522  */
2523 EAPI void        ecore_evas_callback_pre_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2524
2525 /**
2526  * @brief Sets a callback for Ecore_Evas mouse post-render events.
2527  *
2528  * @param ee The Ecore_Evas to set callbacks on
2529  * @param func The function to call
2530  *
2531  * A call to this function will set a callback on an Ecore_Evas, causing
2532  * @p func to be called just after the evas in @p ee is rendered.
2533  *
2534  * @warning If and when this function is called depends on the underlying
2535  * windowing system.
2536  */
2537 EAPI void        ecore_evas_callback_post_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2538
2539 /**
2540  * @brief Sets a callback for Ecore_Evas pre-free event.
2541  *
2542  * @param ee The Ecore_Evas to set callbacks on
2543  * @param func The function to call
2544  *
2545  * A call to this function will set a callback on an Ecore_Evas, causing
2546  * @p func to be called just before the instance @p ee is freed.
2547  *
2548  * @warning If and when this function is called depends on the underlying
2549  * windowing system.
2550  */
2551 EAPI void        ecore_evas_callback_pre_free_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2552
2553 /**
2554  * @brief Sets a callback for Ecore_Evas state changes.
2555  *
2556  * @param ee The Ecore_Evas to set callbacks on
2557  * @param func The function to call
2558  *
2559  * A call to this function will set a callback on an Ecore_Evas, causing
2560  * @p func to be called whenever @p ee changes state.
2561  *
2562  * @warning If and when this function is called depends on the underlying
2563  * windowing system.
2564  *
2565  * @since 1.2
2566  */
2567 EAPI void        ecore_evas_callback_state_change_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
2568
2569 /**
2570  * @brief Gets an Ecore_Evas's Evas.
2571  *
2572  * @param ee The Ecore_Evas whose Evas you wish to get
2573  * @return The Evas contained within @p ee.
2574  */
2575 EAPI Evas       *ecore_evas_get(const Ecore_Evas *ee);
2576
2577 /**
2578  * @internal
2579  *
2580  * @brief Provides Managed move co-ordinates for an Ecore_Evas.
2581  *
2582  * @param ee The Ecore_Evas to move
2583  * @param x The x coordinate to set as the managed location
2584  * @param y The y coordinate to set as the managed location
2585  *
2586  * This sets the managed geometry position of the @p ee to (@p x, @p y)
2587  */
2588 EAPI void        ecore_evas_managed_move(Ecore_Evas *ee, int x, int y);
2589
2590 /**
2591  * @internal
2592  *
2593  * @brief Sets whether an Ecore_Evas is shaped or not.
2594  *
2595  * @param ee The Ecore_Evas to shape.
2596  * @param shaped @c EINA_TRUE to shape, @c EINA_FALSE to not.
2597  *
2598  * This function allows one to make an Ecore_Evas shaped to the contents of the
2599  * evas. If @p shaped is @c EINA_TRUE, @p ee will be transparent in parts of
2600  * the evas that contain no objects. If @p shaped is @c EINA_FALSE, then @p ee
2601  * will be rectangular, and parts with no data will show random framebuffer
2602  * artifacting. For non-shaped Ecore_Evases, it is recommended to cover the
2603  * entire evas with a background object.
2604  */
2605 EAPI void        ecore_evas_shaped_set(Ecore_Evas *ee, Eina_Bool shaped);
2606
2607 /**
2608  * @internal
2609  *
2610  * @brief Queries whether an Ecore_Evas is shaped or not.
2611  *
2612  * @param ee The Ecore_Evas to query.
2613  * @return @c EINA_TRUE if shaped, @c EINA_FALSE if not.
2614  */
2615 EAPI Eina_Bool   ecore_evas_shaped_get(const Ecore_Evas *ee);
2616
2617 /**
2618  * @brief Shows an Ecore_Evas' window.
2619  *
2620  * @param ee The Ecore_Evas to show.
2621  *
2622  * This function makes @p ee visible.
2623  */
2624 EAPI void        ecore_evas_show(Ecore_Evas *ee);
2625
2626 /**
2627  * @brief Hides an Ecore_Evas' window.
2628  *
2629  * @param ee The Ecore_Evas to hide.
2630  *
2631  * This function makes @p ee hidden(not visible).
2632  */
2633 EAPI void        ecore_evas_hide(Ecore_Evas *ee);
2634
2635 /**
2636  * @brief Activates (set focus to, via the window manager) an Ecore_Evas' window.
2637  *
2638  * @param ee The Ecore_Evas to activate.
2639  *
2640  * This functions activates the Ecore_Evas.
2641  */
2642 EAPI void        ecore_evas_activate(Ecore_Evas *ee);
2643
2644
2645 /**
2646  * @brief Sets the minimum size of a given @c Ecore_Evas window.
2647  *
2648  * @param ee An @c Ecore_Evas window's handle
2649  * @param w The minimum width
2650  * @param h The minimum height
2651  *
2652  * This function sets the minimum size of @p ee to be @p w x @p h.
2653  * One won't be able to resize that window to dimensions smaller than
2654  * the ones set.
2655  *
2656  * @note When base sizes are set, via ecore_evas_size_base_set(),
2657  * they'll be used to calculate a window's minimum size, instead of
2658  * those set by this function.
2659  *
2660  * @see ecore_evas_size_min_get()
2661  */
2662 EAPI void        ecore_evas_size_min_set(Ecore_Evas *ee, int w, int h);
2663
2664 /**
2665  * @brief Gets the minimum size set for a given @c Ecore_Evas window.
2666  *
2667  * @param ee An @c Ecore_Evas window's handle
2668  * @param w A pointer to an int to place the minimum width in.
2669  * @param h A pointer to an int to place the minimum height in.
2670  *
2671  * @note Use @c NULL pointers on the size components you're not
2672  * interested in: they'll be ignored by the function.
2673  *
2674  * @see ecore_evas_size_min_set() for more details
2675  */
2676 EAPI void        ecore_evas_size_min_get(const Ecore_Evas *ee, int *w, int *h);
2677
2678 /**
2679  * @brief Sets the maximum size of a given @c Ecore_Evas window.
2680  *
2681  * @param ee An @c Ecore_Evas window's handle
2682  * @param w The maximum width
2683  * @param h The maximum height
2684  *
2685  * This function sets the maximum size of @p ee to be @p w x @p h.
2686  * One won't be able to resize that window to dimensions bigger than
2687  * the ones set.
2688  *
2689  * @see ecore_evas_size_max_get()
2690  */
2691 EAPI void        ecore_evas_size_max_set(Ecore_Evas *ee, int w, int h);
2692
2693 /**
2694  * @brief Gets the maximum size set for a given @c Ecore_Evas window.
2695  *
2696  * @param ee An @c Ecore_Evas window's handle
2697  * @param w A pointer to an int to place the maximum width in.
2698  * @param h A pointer to an int to place the maximum height in.
2699  *
2700  * @note Use @c NULL pointers on the size components you're not
2701  * interested in: they'll be ignored by the function.
2702  *
2703  * @see ecore_evas_size_max_set() for more details
2704  */
2705 EAPI void        ecore_evas_size_max_get(const Ecore_Evas *ee, int *w, int *h);
2706
2707 /**
2708  * @brief Sets the base size for a given @c Ecore_Evas window.
2709  *
2710  * @param ee An @c Ecore_Evas window's handle
2711  * @param w The base width
2712  * @param h The base height
2713  *
2714  * This function sets the @b base size of @p ee to be @p w x @p h.
2715  * When base sizes are set, they'll be used to calculate a window's
2716  * @b minimum size, instead of those set by ecore_evas_size_min_get().
2717  *
2718  * @see ecore_evas_size_base_get()
2719  */
2720 EAPI void        ecore_evas_size_base_set(Ecore_Evas *ee, int w, int h);
2721
2722 /**
2723  * @brief Gets the base size set for a given @c Ecore_Evas window.
2724  *
2725  * @param ee An @c Ecore_Evas window's handle
2726  * @param w A pointer to an int to place the base width in.
2727  * @param h A pointer to an int to place the base height in.
2728  *
2729  * @note Use @c NULL pointers on the size components you're not
2730  * interested in: they'll be ignored by the function.
2731  *
2732  * @see ecore_evas_size_base_set() for more details
2733  */
2734 EAPI void        ecore_evas_size_base_get(const Ecore_Evas *ee, int *w, int *h);
2735
2736 /**
2737  * @brief Sets the "size step" for a given @c Ecore_Evas window.
2738  *
2739  * @param ee An @c Ecore_Evas window's handle
2740  * @param w The step width
2741  * @param h The step height
2742  *
2743  * This function sets the size steps of @p ee to be @p w x @p h. This
2744  * limits the size of this @c Ecore_Evas window to be @b always an
2745  * integer multiple of the step size, for each axis.
2746  */
2747 EAPI void        ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h);
2748
2749 /**
2750  * @brief Gets the "size step" set for a given @c Ecore_Evas window.
2751  *
2752  * @param ee An @c Ecore_Evas window's handle
2753  * @param w A pointer to an int to place the step width in.
2754  * @param h A pointer to an int to place the step height in.
2755  *
2756  * @note Use @c NULL pointers on the size components you're not
2757  * interested in: they'll be ignored by the function.
2758  *
2759  * @see ecore_evas_size_base_set() for more details
2760  */
2761 EAPI void        ecore_evas_size_step_get(const Ecore_Evas *ee, int *w, int *h);
2762
2763 /**
2764  * @brief Sets the cursor for the default pointer device.
2765  *
2766  * @param ee The Ecore_Evas
2767  * @param file  The path to an image file for the cursor.
2768  * @param layer The layer in which the cursor will appear.
2769  * @param hot_x The x coordinate of the cursor's hot spot.
2770  * @param hot_y The y coordinate of the cursor's hot spot.
2771  *
2772  * This function makes the mouse cursor over @p ee be the image specified by
2773  * @p file. The actual point within the image that the mouse is at is specified
2774  * by @p hot_x and @p hot_y, which are coordinates with respect to the top left
2775  * corner of the cursor image. Cursor object will be deleted with Ecore_Evas.
2776  *
2777  * @note This function creates an object from the image and uses
2778  * ecore_evas_object_cursor_set().
2779  *
2780  * @warning Previously set cursor will be deleted.
2781  *
2782  * @see ecore_evas_object_cursor_set()
2783  * @see ecore_evas_cursor_unset()
2784  */
2785 EAPI void        ecore_evas_cursor_set(Ecore_Evas *ee, const char *file, int layer, int hot_x, int hot_y);
2786
2787 /**
2788  * @brief Gets information about an Ecore_Evas' default pointer device.
2789  *
2790  * @param ee The Ecore_Evas to get
2791  * @param obj A pointer to an Evas_Object to place the cursor Evas_Object.
2792  * @param layer A pointer to an int to place the cursor's layer in.
2793  * @param hot_x A pointer to an int to place the cursor's hot_x coordinate in.
2794  * @param hot_y A pointer to an int to place the cursor's hot_y coordinate in.
2795  *
2796  * This function queries information about an Ecore_Evas' cursor.
2797  *
2798  * @see ecore_evas_cursor_set()
2799  * @see ecore_evas_object_cursor_set()
2800  * @see ecore_evas_cursor_unset()
2801  */
2802 EAPI void        ecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object **obj, int *layer, int *hot_x, int *hot_y);
2803
2804 /**
2805  * @internal
2806  *
2807  * @brief Sets the cursor for the default pointer device.
2808  *
2809  * @param ee The Ecore_Evas
2810  * @param obj The Evas_Object which will be the cursor.
2811  * @param layer The layer in which the cursor will appear.
2812  * @param hot_x The x coordinate of the cursor's hot spot.
2813  * @param hot_y The y coordinate of the cursor's hot spot.
2814  *
2815  * This function makes the mouse cursor over @p ee be the object specified by
2816  * @p obj. The actual point within the object that the mouse is at is specified
2817  * by @p hot_x and @p hot_y, which are coordinates with respect to the top left
2818  * corner of the cursor object. Cursor object will be deleted with the Ecore_Evas.
2819  *
2820  * @see ecore_evas_cursor_set()
2821  */
2822 EAPI void        ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y);
2823
2824 /**
2825  * @brief Unsets the cursor of the default pointer device.
2826  *
2827  * @param ee The Ecore_Evas to unset the cursor.
2828  *
2829  * This function unsets the cursor from the Ecore_Evas, and returns the cursor
2830  * object. If the cursor was set from ecore_evas_cursor_set(), this function
2831  * returns the image. In this case, the image should be deleted when it is
2832  * no longer needed.
2833  *
2834  * @see ecore_evas_cursor_set()
2835  * @see ecore_evas_object_cursor_set()
2836  * @since 1.11
2837  */
2838 EAPI Evas_Object*        ecore_evas_cursor_unset(Ecore_Evas *ee);
2839
2840 /**
2841  * @internal
2842  *
2843  * @brief Unsets the cursor of the specified pointer device.
2844  *
2845  * @param ee The Ecore_Evas to unset the cursor.
2846  * @param pointer A pointer device to set the cursor. Use @c NULL for the default.
2847  *
2848  * This function unsets the cursor from the Ecore_Evas, and returns the cursor
2849  * object. If the cursor was set from ecore_evas_cursor_set(), this function
2850  * returns the image. In this case, the image should be deleted when it is
2851  * no longer needed.
2852  *
2853  * @see ecore_evas_cursor_device_set()
2854  * @see ecore_evas_object_cursor_device_set()
2855  * @since 1.20
2856  */
2857 EAPI Evas_Object *ecore_evas_cursor_device_unset(Ecore_Evas *ee, Efl_Input_Device *pointer);
2858
2859 /**
2860  * @internal
2861  *
2862  * @brief Sets the cursor of an Ecore_Evas specified pointer device.
2863  *
2864  * @param ee The Ecore_Evas
2865  * @param pointer A pointer device to set the cursor. Use @c NULL for the default.
2866  * @param obj The Evas_Object which will be the cursor.
2867  * @param layer The layer in which the cursor will appear.
2868  * @param hot_x The x coordinate of the cursor's hot spot.
2869  * @param hot_y The y coordinate of the cursor's hot spot.
2870  *
2871  * This function makes the mouse cursor over @p ee be the object specified by
2872  * @p obj. The actual point within the object that the mouse is at is specified
2873  * by @p hot_x and @p hot_y, which are coordinates with respect to the top left
2874  * corner of the cursor object. Cursor object will be deleted with the Ecore_Evas.
2875  *
2876  * @since 1.19
2877  */
2878 EAPI void ecore_evas_object_cursor_device_set(Ecore_Evas *ee, Efl_Input_Device *pointer,
2879                                               Evas_Object *obj, int layer,
2880                                               int hot_x, int hot_y);
2881 /**
2882  * @internal
2883  *
2884  * @brief Gets information about an Ecore_Evas' specified pointer device.
2885  *
2886  * @param ee The Ecore_Evas
2887  * @param pointer A pointer device to set the cursor. Use @c NULL for the default.
2888  * @param obj A pointer to an Evas_Object to place the cursor Evas_Object.
2889  * @param layer A pointer to an int to place the cursor's layer in.
2890  * @param hot_x A pointer to an int to place the cursor's hot_x coordinate in.
2891  * @param hot_y A pointer to an int to place the cursor's hot_y coordinate in.
2892  *
2893  * This function queries information about an Ecore_Evas' cursor.
2894  *
2895  * @see ecore_evas_cursor_device_set()
2896  * @since 1.19
2897  */
2898 EAPI Eina_Bool ecore_evas_cursor_device_get(const Ecore_Evas *ee, Efl_Input_Device *pointer,
2899                                             Evas_Object **obj, int *layer,
2900                                             int *hot_x, int *hot_y);
2901
2902 /**
2903  * @internal
2904  *
2905  * @brief Tells the WM whether or not to ignore an Ecore_Evas' window.
2906  *
2907  * @param ee The Ecore_Evas.
2908  * @param on @c EINA_TRUE to ignore, @c EINA_FALSE to not.
2909  *
2910  * This function causes the window manager to ignore @p ee if @p on is
2911  * @c EINA_TRUE, or not ignore @p ee if @p on is @c EINA_FALSE.
2912  */
2913 EAPI void        ecore_evas_override_set(Ecore_Evas *ee, Eina_Bool on);
2914
2915 /**
2916  * @internal
2917  *
2918  * @brief Queries whether an Ecore_Evas' window is overridden or not.
2919  *
2920  * @param ee The Ecore_Evas to set.
2921  * @return @c EINA_TRUE if @p ee is overridden, @c EINA_FALSE if not.
2922  */
2923 EAPI Eina_Bool   ecore_evas_override_get(const Ecore_Evas *ee);
2924
2925 /**
2926  * @internal
2927  *
2928  * @brief Sets whether or not an Ecore_Evas' window should avoid damage.
2929  *
2930  * @param ee The Ecore_Evas
2931  * @param on The type of the damage management
2932  *
2933  * This option causes updates of the Ecore_Evas to be done on a pixmap, and
2934  * then copied to the window, or the pixmap used directly on the window,
2935  * depending on the setting. Possible options are:
2936  *
2937  * @li @ref ECORE_EVAS_AVOID_DAMAGE_NONE - every expose event triggers a new
2938  * damage and consequently render of the affected area. The rendering of things
2939  * happens directly on the window;
2940  *
2941  * @li @ref ECORE_EVAS_AVOID_DAMAGE_EXPOSE - there's a pixmap where everything
2942  * is rendered into, and then copied to the window. On expose events, there's
2943  * no need to render things again, just copy the exposed region to the
2944  * window;
2945  *
2946  * @li @ref ECORE_EVAS_AVOID_DAMAGE_BUILT_IN - there's the same pixmap as the
2947  * previous one, but it is set as a "background pixmap" of the window.  The
2948  * rendered things appear directly on the window, with no need to copy
2949  * anything, but would stay stored on the pixmap, so there's no need to render
2950  * things again on expose events. This option can be faster than the previous
2951  * one, but may lead to artifacts during resize of the window.
2952  */
2953 EAPI void        ecore_evas_avoid_damage_set(Ecore_Evas *ee, Ecore_Evas_Avoid_Damage_Type on);
2954
2955 /**
2956  * @internal
2957  *
2958  * @brief Queries whether an Ecore_Evas' window avoids damage or not.
2959  *
2960  * @param ee The Ecore_Evas to set
2961  * @return The type of the damage management
2962  */
2963 EAPI Ecore_Evas_Avoid_Damage_Type ecore_evas_avoid_damage_get(const Ecore_Evas *ee);
2964
2965 /**
2966  * @brief Sets the withdrawn state of an Ecore_Evas' window.
2967  *
2968  * @param ee The Ecore_Evas whose window's withdrawn state is set.
2969  * @param withdrawn The Ecore_Evas window's new withdrawn state.
2970  */
2971 EAPI void        ecore_evas_withdrawn_set(Ecore_Evas *ee, Eina_Bool withdrawn);
2972
2973 /**
2974  * @brief Returns the withdrawn state of an Ecore_Evas' window.
2975  *
2976  * @param ee The Ecore_Evas whose window's withdrawn state is returned.
2977  * @return The Ecore_Evas window's withdrawn state.
2978  */
2979 EAPI Eina_Bool   ecore_evas_withdrawn_get(const Ecore_Evas *ee);
2980
2981 /**
2982  * @internal
2983  *
2984  * @brief Sets the sticky state of an Ecore_Evas window.
2985  *
2986  * @param ee The Ecore_Evas whose window's sticky state is set.
2987  * @param sticky The Ecore_Evas window's new sticky state.
2988  */
2989 EAPI void        ecore_evas_sticky_set(Ecore_Evas *ee, Eina_Bool sticky);
2990
2991 /**
2992  * @internal
2993  *
2994  * @brief Returns the sticky state of an Ecore_Evas' window.
2995  *
2996  * @param ee The Ecore_Evas whose window's sticky state is returned.
2997  * @return The Ecore_Evas window's sticky state.
2998  */
2999 EAPI Eina_Bool   ecore_evas_sticky_get(const Ecore_Evas *ee);
3000
3001 /**
3002  * @brief Enables/disables manual render.
3003  *
3004  * @param ee An @c Ecore_Evas handle
3005  * @param manual_render Enable/disable manual render. @c EINA_TRUE to enable
3006  * manual render, @c EINA_FALSE to disable manual render. @c EINA_FALSE by
3007  * default
3008  *
3009  * If @p manual_render is true, default ecore_evas render routine would be
3010  * disabled and rendering will be done only manually. If @p manual_render is
3011  * false, rendering will be done by default ecore_evas rendering routine, but
3012  * still manual rendering is available. Call ecore_evas_manual_render() to
3013  * force immediate render.
3014  *
3015  * @see ecore_evas_manual_render_get()
3016  * @see ecore_evas_manual_render()
3017  */
3018 EAPI void        ecore_evas_manual_render_set(Ecore_Evas *ee, Eina_Bool manual_render);
3019
3020 /**
3021  * @brief Gets enable/disable status of manual render.
3022  *
3023  * @param ee An @c Ecore_Evas handle
3024  * @return @c EINA_TRUE if manual render is enabled, @c EINA_FALSE if manual
3025  * render is disabled
3026  *
3027  * @see ecore_evas_manual_render_set()
3028  * @see ecore_evas_manual_render()
3029  */
3030 EAPI Eina_Bool   ecore_evas_manual_render_get(const Ecore_Evas *ee);
3031
3032 /**
3033  * @brief Registers an @c Ecore_Evas to receive events through ecore_input_evas.
3034  *
3035  * @param ee The @c Ecore_Evas handle.
3036  *
3037  * This function calls ecore_event_window_register() with the @p ee as its @c
3038  * id argument, @c window argument, and uses its @c Evas too. It is useful when
3039  * no @c window information is available on a given @c Ecore_Evas backend.
3040  *
3041  * @see ecore_evas_input_event_unregister()
3042  * @since 1.1
3043  */
3044 EAPI void        ecore_evas_input_event_register(Ecore_Evas *ee);
3045
3046 // TIZEN_ONLY(20160429): add multi_info(radius, pressure and angle) to Evas_Event_Mouse_XXX
3047 /**
3048  * @internal
3049  *
3050  * @brief Registers an @c Ecore_Evas to receive events through ecore_input_evas.
3051  *
3052  * @param ee The @c Ecore_Evas handle.
3053  *
3054  * This function calls ecore_event_window_register_with_multi() with the @p ee as its @c
3055  * id argument, @c window argument, and uses its @c Evas too. It is useful when
3056  * no @c window information is available on a given @c Ecore_Evas backend.
3057  *
3058  * @see ecore_evas_input_event_unregister()
3059  * @since 1.1
3060  */
3061 EAPI void        ecore_evas_input_event_register_with_multi(Ecore_Evas *ee);
3062 //
3063
3064 // TIZEN_ONLY(20170925): add multi_info(radius, pressure and angle) to Evas_Event_Mouse_XXX
3065 /**
3066  * @internal
3067  *
3068  * @brief Registers an @c Ecore_Evas to receive events through ecore_input_evas.
3069  *
3070  * @param ee The @c Ecore_Evas handle.
3071  *
3072  * This function calls ecore_event_window_register_with_multi() with the @p ee as its @c
3073  * id argument, @c window argument, and uses its @c Evas too. It is useful when
3074  * no @c window information is available on a given @c Ecore_Evas backend.
3075  *
3076  * @see ecore_evas_input_event_unregister()
3077  * @since 1.1
3078  */
3079 EAPI void        ecore_evas_input_event_register_with_multi2(Ecore_Evas *ee);
3080 //
3081
3082 /**
3083  * @brief Unregisters an @c Ecore_Evas receiving events through ecore_input_evas.
3084  *
3085  * @param ee The @c Ecore_Evas handle.
3086  *
3087  * @see ecore_evas_input_event_register()
3088  * @since 1.1
3089  */
3090 EAPI void        ecore_evas_input_event_unregister(Ecore_Evas *ee);
3091
3092 /**
3093  * @brief Forces immediate rendering on a given @c Ecore_Evas window.
3094  *
3095  * @param ee An @c Ecore_Evas handle
3096  *
3097  * Use this call to forcefully flush the @p ee's canvas rendering
3098  * pipeline, thus bring its window to an up to date state.
3099  */
3100 EAPI void        ecore_evas_manual_render(Ecore_Evas *ee);
3101
3102 /**
3103  * @deprecated Deprecated since 6.0 DO NOT USE.
3104  *
3105  * @brief Sets comp syncing to enabled/disabled
3106  *
3107  * @param ee An @c Ecore_Evas handle
3108  * @param do_sync True to enable comp syncing, False to disable
3109  *
3110  * Turns on client+server synchronized rendering in X11.  Comp sync is
3111  * disabled by default, but can be turned on optionally.  Can also be
3112  * set via the ECORE_EVAS_COMP_NOSYNC / ECORE_EVAS_COMP_SYNC
3113  * environmental variables.
3114  */
3115 EINA_DEPRECATED EAPI void        ecore_evas_comp_sync_set(Ecore_Evas *ee, Eina_Bool do_sync);
3116
3117 /**
3118  * @deprecated Deprecated since 6.0 DO NOT USE.
3119  *
3120  * @brief Gets the comp sync state
3121  *
3122  * @param ee An @c Ecore_Evas handle
3123  * @return True if composition synchronization is enabled, False otherwise
3124  */
3125 EINA_DEPRECATED EAPI Eina_Bool   ecore_evas_comp_sync_get(const Ecore_Evas *ee);
3126
3127 /**
3128  * @brief Gets geometry of screen associated with this Ecore_Evas.
3129  *
3130  * @param ee The Ecore_Evas whose window's to query container screen geometry.
3131  * @param x Where to return the horizontal offset value. May be @c NULL.
3132  * @param y Where to return the vertical offset value. May be @c NULL.
3133  * @param w Where to return the width value. May be @c NULL.
3134  * @param h Where to return the height value. May be @c NULL.
3135  *
3136  * @since 1.1
3137  */
3138 EAPI void        ecore_evas_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
3139
3140 /**
3141  * @brief Gets the dpi of the screen the Ecore_Evas is primarily on.
3142  *
3143  * @param ee The Ecore_Evas whose window's to query.
3144  * @param xdpi Pointer to integer to store horizontal DPI. May be @c NULL.
3145  * @param ydpi Pointer to integer to store vertical DPI. May be @c NULL.
3146  *
3147  * @since 1.7
3148  */
3149 EAPI void        ecore_evas_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi);
3150
3151 EAPI void        ecore_evas_draw_frame_set(Ecore_Evas *ee, Eina_Bool draw_frame) EINA_DEPRECATED;
3152 EAPI Eina_Bool   ecore_evas_draw_frame_get(const Ecore_Evas *ee) EINA_DEPRECATED;
3153
3154 /**
3155  * @internal
3156  *
3157  * @brief Sets shadow geometry for client-side decorations.
3158  *
3159  * Note that the framespace contains both a shadow or glow around the window,
3160  * and the window borders (title bar, etc...).
3161  *
3162  * @since 1.19
3163  */
3164 EAPI void        ecore_evas_shadow_geometry_set(Ecore_Evas *ee, int x, int y, int w, int h);
3165
3166 /**
3167  * @internal
3168  *
3169  * @brief Gets shadow geometry for client-side decorations.
3170  *
3171  * Note that the framespace contains both a shadow or glow around the window,
3172  * and the window borders (title bar, etc...).
3173  *
3174  * @since 1.19
3175  */
3176 EAPI void        ecore_evas_shadow_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
3177
3178 /**
3179  * @internal
3180  *
3181  * @brief Associates the given object to this ecore evas.
3182  *
3183  * @param ee The Ecore_Evas to associate to @a obj
3184  * @param obj The object to associate to @a ee
3185  * @param flags The association flags.
3186  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
3187  *
3188  * Association means that operations on one will affect the other, for
3189  * example moving the object will move the window, resize the object will
3190  * also affect the ecore evas window, hide and show applies as well.
3191  *
3192  * This is meant to simplify development, since you often need to associate
3193  * these events with your "base" objects, background or bottom-most object.
3194  *
3195  * Be aware that some methods might not be what you would like, deleting
3196  * either the window or the object will delete the other. If you want to
3197  * change that behavior, let's say to hide window when it's closed, you
3198  * must use ecore_evas_callback_delete_request_set() and set your own code,
3199  * like ecore_evas_hide(). Just remember that if you override delete_request
3200  * and still want to delete the window/object, you must do that yourself.
3201  *
3202  * Since we now define delete_request, deleting windows will not quit
3203  * main loop, if you wish to do so, you should listen for EVAS_CALLBACK_FREE
3204  * on the object, that way you get notified and you can call
3205  * ecore_main_loop_quit().
3206  *
3207  * Flags can be OR'ed of:
3208  * @li ECORE_EVAS_OBJECT_ASSOCIATE_BASE (or 0): to listen to basic events
3209  *     like delete, resize and move, but no stacking or layer are used.
3210  * @li ECORE_EVAS_OBJECT_ASSOCIATE_STACK: stacking operations will act
3211  *     on the Ecore_Evas, not the object. So evas_object_raise() will
3212  *     call ecore_evas_raise(). Relative operations (stack_above, stack_below)
3213  *     are still not implemented.
3214  * @li ECORE_EVAS_OBJECT_ASSOCIATE_LAYER: stacking operations will act
3215  *     on the Ecore_Evas, not the object. So evas_object_layer_set() will
3216  *     call ecore_evas_layer_set().
3217  * @li ECORE_EVAS_OBJECT_ASSOCIATE_DEL: the object delete will delete the
3218  *     ecore_evas as well as delete_requests on the ecore_evas will delete
3219  *     etc.
3220  */
3221 EAPI Eina_Bool    ecore_evas_object_associate(Ecore_Evas *ee, Evas_Object *obj, Ecore_Evas_Object_Associate_Flags flags);
3222
3223 /**
3224  * @internal
3225  *
3226  * @brief Cancels the association set with ecore_evas_object_associate().
3227  *
3228  * @param ee The Ecore_Evas to dissociate from @a obj
3229  * @param obj The object to dissociate from @a ee
3230  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
3231  */
3232 EAPI Eina_Bool    ecore_evas_object_dissociate(Ecore_Evas *ee, Evas_Object *obj);
3233
3234 /**
3235  * @internal
3236  *
3237  * @brief Gets the object associated with @p ee.
3238  *
3239  * @param ee The Ecore_Evas to get the object from.
3240  * @return The associated object, or @c NULL if there is no associated object.
3241  */
3242 EAPI Evas_Object *ecore_evas_object_associate_get(const Ecore_Evas *ee);
3243
3244 /* helper function to be used with ECORE_GETOPT_CALLBACK_*() */
3245 EAPI unsigned char ecore_getopt_callback_ecore_evas_list_engines(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage);
3246
3247 /**
3248  * @internal
3249  *
3250  * @brief Gets a list of all the ecore_evases.
3251  *
3252  * @return A list of ecore_evases.
3253  *
3254  * The returned list of ecore evases is only valid until the canvases are
3255  * destroyed (and should not be cached for instance). The list can be freed by
3256  * just deleting the list.
3257  */
3258 EAPI Eina_List   *ecore_evas_ecore_evas_list_get(void);
3259
3260 /**
3261  * @internal
3262  *
3263  * @brief Gets a list of all the sub ecore_evases.
3264  *
3265  * @param ee Ecore_Evas to get the list from.
3266  * @return A list of sub ecore_evases, or @c NULL if there is no sub ecore_evases.
3267  */
3268 EAPI Eina_List   *ecore_evas_sub_ecore_evas_list_get(const Ecore_Evas *ee);
3269
3270 /**
3271  * @internal
3272  *
3273  * @brief Set the window's client leader.
3274  *
3275  * @param ee Ecore_Evas for the window.
3276  * @param win The window.
3277  *
3278  * Sets the client leader X atom property for the given window.  All
3279  * non-transient top-level windows created by an app other than the main
3280  * window must have this property set to the app's main window.
3281  */
3282 EAPI void           ecore_evas_x11_leader_set(Ecore_Evas *ee, Ecore_X_Window win);
3283
3284 /**
3285  * @internal
3286  *
3287  * @brief Get the client leader.
3288  *
3289  * @param ee Ecore_Evas for the window.
3290  * @return the current client leader.
3291  *
3292  * @see ecore_evas_x11_leader_set()
3293  */
3294 EAPI Ecore_X_Window ecore_evas_x11_leader_get(Ecore_Evas *ee);
3295
3296 /**
3297  * @internal
3298  *
3299  * @brief Reset the client leader to default.
3300  *
3301  * @param ee Ecore_Evas for the window.
3302  *
3303  * @see ecore_evas_x11_leader_set()
3304  */
3305 EAPI void           ecore_evas_x11_leader_default_set(Ecore_Evas *ee);
3306
3307 /**
3308  * @internal
3309  *
3310  * @brief Set the rectangular region that can "contain" the pointer, replacing
3311  * any previously set region.
3312  *
3313  * @param ee The Ecore_Evas
3314  * @param x The X coordinate for the origin of the input containment rectangle.
3315  * @param y The Y coordinate for the origin of the input containment rectangle.
3316  * @param w The width of the input containment rectangle.
3317  * @param h The height of the input containment rectangle.
3318  *
3319  * Ecore_Evas may apply (orthogonal) rotations if needed, via an internal
3320  * call to _ecore_evas_x11_convert_rectangle_with_angle().  Note that
3321  * ecore_evas_x11_shape_input_apply() must be called to commit the changes
3322  * to the window itself.
3323  */
3324 EAPI void           ecore_evas_x11_shape_input_rectangle_set(Ecore_Evas *ee, int x, int y, int w, int h);
3325
3326 /**
3327  * @internal
3328  *
3329  * @brief Extends the pointer containment region to the union of the new
3330  * and existing input rectangle.
3331  *
3332  * @param ee The Ecore_Evas
3333  * @param x The X coordinate of the rectangular area to add.
3334  * @param y The Y coordinate of the rectangular area to add.
3335  * @param w The width of the rectangular area to add.
3336  * @param h The height of the rectangular area to add.
3337  *
3338  * Ecore_Evas may apply (orthogonal) rotations if needed, via an internal
3339  * call to _ecore_evas_x11_convert_rectangle_with_angle().  Note that
3340  * ecore_evas_x11_shape_input_apply() must be called to commit the changes
3341  * to the window itself.
3342  */
3343 EAPI void           ecore_evas_x11_shape_input_rectangle_add(Ecore_Evas *ee, int x, int y, int w, int h);
3344
3345 /**
3346  * @internal
3347  *
3348  * @brief Modifies the pointer containment region to subtract a rectangular region from it.
3349  *
3350  * @param ee The Ecore_Evas
3351  * @param x The X coordinate of the subtraction rectangle.
3352  * @param y The Y coordinate of the subtraction rectangle.
3353  * @param w The width of the subtraction rectangle.
3354  * @param h The height of the subtraction rectangle.
3355  *
3356  * Ecore_Evas may apply (orthogonal) rotations if needed, via an internal
3357  * call to _ecore_evas_x11_convert_rectangle_with_angle().  Note that
3358  * ecore_evas_x11_shape_input_apply() must be called to commit the changes
3359  * to the window itself.
3360  */
3361 EAPI void           ecore_evas_x11_shape_input_rectangle_subtract(Ecore_Evas *ee, int x, int y, int w, int h);
3362
3363 /**
3364  * @internal
3365  *
3366  * @brief Disables input for the window.
3367  *
3368  * @param ee The Ecore_Evas
3369  *
3370  * Sets the pointer containment region to a null rectangle, effectively
3371  * disabling input for the window.  Note that
3372  * ecore_evas_x11_shape_input_apply() must be called to commit the
3373  * changes to the window itself.
3374  */
3375 EAPI void           ecore_evas_x11_shape_input_empty(Ecore_Evas *ee);
3376
3377 /**
3378  * @internal
3379  *
3380  * @brief Unsets the pointer containment for the window.
3381  *
3382  * @param ee The Ecore_Evas
3383  *
3384  * Sets the pointer containment region to a maximally wide and high
3385  * rectangle, effectively permitting all allowed input events to reach
3386  * the window.  Note that ecore_evas_x11_shape_input_apply() must be
3387  * called to commit the changes to the window itself.
3388  */
3389 EAPI void           ecore_evas_x11_shape_input_reset(Ecore_Evas *ee);
3390
3391 /**
3392  * @internal
3393  *
3394  * @brief Applies the pointer containment region to the client window.
3395  *
3396  * @param ee The Ecore_Evas
3397  */
3398 EAPI void           ecore_evas_x11_shape_input_apply(Ecore_Evas *ee);
3399
3400 #ifdef EFL_BETA_API_SUPPORT
3401
3402 /**
3403  * @brief A callback used to accept a new client.
3404  *
3405  * @param data The callback data
3406  * @param ee The Ecore_Evas
3407  * @param client_host The address of the new client.
3408  * @return @c EINA_TRUE to accept the client, @c EINA_FALSE otherwise.
3409  *
3410  * @see ecore_evas_vnc_start()
3411  * @since 1.19
3412  */
3413 typedef Eina_Bool (*Ecore_Evas_Vnc_Client_Accept_Cb)(void *data, Ecore_Evas *ee, const char *client_host);
3414
3415 /**
3416  * @brief A callback used to inform that a client has disconnected.
3417  *
3418  * @param data The callback data
3419  * @param ee The Ecore_Evas
3420  * @param client_host The address of the client
3421  *
3422  * @see ecore_evas_vnc_start()
3423  * @since 1.19
3424  */
3425 typedef void (*Ecore_Evas_Vnc_Client_Disconnected_Cb)(void *data, Ecore_Evas *ee, const char *client_host);
3426
3427 /**
3428  * @brief Starts a VNC server.
3429  *
3430  * @param ee The Ecore_Evas to start the VNC server
3431  * @param addr The address that will be used to bind the VNC server. Use @c NULL to bind to any interface.
3432  * @param port The port number to start the VNC server. Use @c -1 to set the default VNC port (5900)
3433  * @param accept_cb A callback used to accept a new client. If @c NULL all clients will be accepted.
3434  * @param disc_cb A callback used to inform that a client has disconnected. It may be @c NULL.
3435  * @param data Data to pass to @p accept_cb and @p disc_cb
3436  * @return an Evas_Object that take everything under it to represent the view of the client.
3437  *
3438  * @see ecore_evas_vnc_stop()
3439  * @see Ecore_Evas_Vnc_Client_Accept_Cb()
3440  * @since 1.19
3441  */
3442 EAPI Evas_Object *ecore_evas_vnc_start(Ecore_Evas *ee, const char *addr, int port,
3443                                        Ecore_Evas_Vnc_Client_Accept_Cb accept_cb,
3444                                        Ecore_Evas_Vnc_Client_Disconnected_Cb disc_cb,
3445                                        void *data);
3446
3447 #endif
3448
3449 /**
3450  * @internal
3451  *
3452  * @brief Sets a callback for building new Evas.
3453  *
3454  * @param func The function to call
3455  *
3456  * A call to this function will set a callback on an Ecore_Evas, causing
3457  * @p func to be called whenever a new Ecore_Evas is created.
3458  *
3459  * @warning If and when this function is called depends on the underlying
3460  * windowing system.
3461  */
3462 EAPI void        ecore_evas_callback_new_set(Evas *(*func)(int w, int h));
3463
3464 /**
3465  * @defgroup Ecore_Evas_Ews Ecore_Evas Single Process Windowing System.
3466  * @ingroup Ecore_Evas_Group
3467  *
3468  * These are global scope functions to manage the EWS to be used by
3469  * ecore_evas_ews_new().
3470  *
3471  * @since 1.1
3472  * @{
3473  */
3474
3475 /**
3476  * @internal
3477  *
3478  * @brief Sets the engine to be used by the backing store engine.
3479  *
3480  * @param engine The engine to be set.
3481  * @param options The options of the engine to be set.
3482  * @return @c EINA_TRUE on success, @c EINA_FALSE if ews is already in use.
3483  *
3484  * @since 1.1
3485  */
3486 EAPI Eina_Bool ecore_evas_ews_engine_set(const char *engine, const char *options);
3487
3488 /**
3489  * @internal
3490  *
3491  * @brief Reconfigures the backing store used.
3492  *
3493  * @param x The X coordinate to be used.
3494  * @param y The Y coordinate to be used.
3495  * @param w The width of the Ecore_Evas to setup.
3496  * @param h The height of the Ecore_Evas to setup.
3497  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
3498  *
3499  * @since 1.1
3500  */
3501 EAPI Eina_Bool ecore_evas_ews_setup(int x, int y, int w, int h);
3502
3503 /**
3504  * @internal
3505  *
3506  * @brief Returns the internal backing store in use.
3507  *
3508  * @return The internal backing store in use.
3509  *
3510  * @note this will force it to be created, making future calls to
3511  * ecore_evas_ews_engine_set() void.
3512  *
3513  * @see ecore_evas_ews_evas_get()
3514  * @since 1.1
3515  */
3516 EAPI Ecore_Evas *ecore_evas_ews_ecore_evas_get(void);
3517
3518 /**
3519  * @internal
3520  *
3521  * @brief Returns the internal backing store in use.
3522  *
3523  * @return The internal backing store in use.
3524  *
3525  * @note this will force it to be created, making future calls to
3526  * ecore_evas_ews_engine_set() void.
3527  *
3528  * @see ecore_evas_ews_ecore_evas_get()
3529  * @since 1.1
3530  */
3531 EAPI Evas *ecore_evas_ews_evas_get(void);
3532
3533 /**
3534  * @internal
3535  *
3536  * @brief Gets the current background.
3537  */
3538 EAPI Evas_Object *ecore_evas_ews_background_get(void);
3539
3540 /**
3541  * @internal
3542  *
3543  * @brief Sets the current background, must be created by evas ecore_evas_ews_evas_get().
3544  *
3545  * @param o The Evas_Object for which to set the background.
3546  *
3547  * It will be kept at lowest layer (EVAS_LAYER_MIN) and below
3548  * everything else. You can set any object, default is a black
3549  * rectangle.
3550  *
3551  * @note previous object will be deleted!
3552  */
3553 EAPI void ecore_evas_ews_background_set(Evas_Object *o);
3554
3555 /**
3556  * @internal
3557  *
3558  * @brief Returns all Ecore_Evas* created by EWS.
3559  *
3560  * @return An eina list of Ecore_evases.
3561  *
3562  * @note Do not change the returned list or its contents.
3563  *
3564  * @since 1.1
3565  */
3566 EAPI const Eina_List *ecore_evas_ews_children_get(void);
3567
3568 /**
3569  * @internal
3570  *
3571  * @brief Sets the identifier of the manager taking care of internal windows.
3572  *
3573  * @param manager any unique identifier address.
3574  *
3575  * The ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE event is issued. Consider
3576  * handling it to know if you should stop handling events yourself
3577  * (ie: another manager took over)
3578  *
3579  * @see ecore_evas_ews_manager_get()
3580  * @since 1.1
3581  */
3582 EAPI void        ecore_evas_ews_manager_set(const void *manager);
3583
3584 /**
3585  * @internal
3586  *
3587  * @brief Gets the identifier of the manager taking care of internal windows.
3588  *
3589  * @return the value set by ecore_evas_ews_manager_set()
3590  *
3591  * @since 1.1
3592  */
3593 EAPI const void *ecore_evas_ews_manager_get(void);
3594
3595 EAPI extern int ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE; /**< manager was changed @since 1.1 */
3596 EAPI extern int ECORE_EVAS_EWS_EVENT_ADD; /**< window was created @since 1.1 */
3597 EAPI extern int ECORE_EVAS_EWS_EVENT_DEL; /**< window was deleted, pointer is already invalid but may be used as reference for further cleanup work. @since 1.1 */
3598 EAPI extern int ECORE_EVAS_EWS_EVENT_RESIZE; /**< window was resized @since 1.1 */
3599 EAPI extern int ECORE_EVAS_EWS_EVENT_MOVE; /**< window was moved @since 1.1 */
3600 EAPI extern int ECORE_EVAS_EWS_EVENT_SHOW; /**< window become visible @since 1.1 */
3601 EAPI extern int ECORE_EVAS_EWS_EVENT_HIDE; /**< window become hidden @since 1.1 */
3602 EAPI extern int ECORE_EVAS_EWS_EVENT_FOCUS; /**< window was focused @since 1.1 */
3603 EAPI extern int ECORE_EVAS_EWS_EVENT_UNFOCUS; /**< window lost focus @since 1.1 */
3604 EAPI extern int ECORE_EVAS_EWS_EVENT_RAISE; /**< window was raised @since 1.1 */
3605 EAPI extern int ECORE_EVAS_EWS_EVENT_LOWER; /**< window was lowered @since 1.1 */
3606 EAPI extern int ECORE_EVAS_EWS_EVENT_ACTIVATE; /**< window was activated @since 1.1 */
3607
3608 EAPI extern int ECORE_EVAS_EWS_EVENT_ICONIFIED_CHANGE; /**< window minimized/iconified changed @since 1.1 */
3609 EAPI extern int ECORE_EVAS_EWS_EVENT_MAXIMIZED_CHANGE; /**< window maximized changed @since 1.1 */
3610 EAPI extern int ECORE_EVAS_EWS_EVENT_LAYER_CHANGE; /**< window layer changed @since 1.1 */
3611 EAPI extern int ECORE_EVAS_EWS_EVENT_FULLSCREEN_CHANGE; /**< window fullscreen changed @since 1.1 */
3612 EAPI extern int ECORE_EVAS_EWS_EVENT_CONFIG_CHANGE; /**< some other window property changed (title, name, class, alpha, transparent, shaped...) @since 1.1 */
3613
3614 /**
3615  * @}
3616  */
3617
3618 /**
3619  * @defgroup Ecore_Evas_Extn External plug/socket infrastructure for remote canvases
3620  * @ingroup Ecore_Evas_Group
3621  *
3622  * These functions allow 1 process to create a "socket" was pluged into which another
3623  * process can create a "plug" remotely to plug into.
3624  * Socket can provide content for several plugs.
3625  * This is best for small sized objects (about the size range
3626  * of a small icon up to a few large icons). Since the plug is actually an
3627  * image object, you can fetch the pixel data
3628  *
3629  * @since 1.2
3630  * @{
3631  */
3632
3633 EAPI extern int ECORE_EVAS_EXTN_CLIENT_ADD; /**< this event is received when a plug has connected to an extn socket @since 1.2 */
3634 EAPI extern int ECORE_EVAS_EXTN_CLIENT_DEL; /**< this event is received when a plug has disconnected from an extn socket @since 1.2 */
3635
3636 /**
3637  * @internal
3638  *
3639  * @brief Creates a new Ecore_Evas canvas for the new external ecore evas socket
3640  *
3641  * @param w The width of the canvas, in pixels
3642  * @param h The height of the canvas, in pixels
3643  * @return A new @c Ecore_Evas instance, or @c NULL on failure
3644  *
3645  * This creates a new extn_socket canvas wrapper, with image data array
3646  * @b bound to the ARGB format, 8 bits per pixel.
3647  *
3648  * If creation is successful, an Ecore_Evas handle is returned or @c NULL if
3649  * creation fails. Also focus, show, hide etc. callbacks will also be called
3650  * if the plug object is shown, or already visible on connect, or if it is
3651  * hidden later, focused or unfocused.
3652  *
3653  * This function has to be followed by ecore_evas_extn_socket_listen(),
3654  * for starting ecore ipc service.
3655  *
3656  * @code
3657  * Eina_Bool res = EINA_FALSE;
3658  * Ecore_Evas *ee = ecore_evas_extn_socket_new(1, 1);
3659  *
3660  * res = ecore_evas_extn_socket_listen("svcname", 1, EINA_FALSE);
3661  * if (!res) return;
3662  * ecore_evas_resize(ee, 240, 400);
3663  * @endcode
3664  *
3665  * or
3666  *
3667  * @code
3668  * Eina_Bool res = EINA_FALSE;
3669  * Ecore_Evas *ee = ecore_evas_extn_socket_new(240, 400);
3670  *
3671  * res = ecore_evas_extn_socket_listen("svcname", 1, EINA_FALSE);
3672  * if (!res) return;
3673  * @endcode
3674  *
3675  * When a client(plug) connects, you will get the ECORE_EVAS_EXTN_CLIENT_ADD event
3676  * in the ecore event queue, with event_info being the image object pointer
3677  * passed as a void pointer. When a client disconnects you will get the
3678  * ECORE_EVAS_EXTN_CLIENT_DEL event.
3679  *
3680  * You can set up event handles for these events as follows:
3681  *
3682  * @code
3683  * static Eina_Bool client_add_cb(void *data, int event, void *event_info)
3684  * {
3685  *    Ecore_Evas *ee = event_info;
3686  *    printf("client is connected to external socket %p\n", ee);
3687  *    return ECORE_CALLBACK_PASS_ON;
3688  * }
3689  *
3690  * static Eina_Bool client_del_cb(void *data, int event, void *event_info)
3691  * {
3692  *    Ecore_Evas *ee = event_info;
3693  *    printf("client is disconnected from external socket %p\n", ee);
3694  *    return ECORE_CALLBACK_PASS_ON;
3695  * }
3696  *
3697  * void setup(void)
3698  * {
3699  *    ecore_event_handler_add(ECORE_EVAS_EXTN_CLIENT_ADD,
3700  *                           client_add_cb, NULL);
3701  *    ecore_event_handler_add(ECORE_EVAS_EXTN_CLIENT_DEL,
3702  *                           client_del_cb, NULL);
3703  * }
3704  * @endcode
3705  *
3706  * Note that events come in later after the event happened. You may want to be
3707  * careful as data structures you had associated with the image object
3708  * may have been freed after deletion, but the object may still be around
3709  * awaiting cleanup and thus still be valid.You can change the size with something like:
3710  *
3711  * @see ecore_evas_extn_socket_listen()
3712  * @see ecore_evas_extn_plug_new()
3713  * @see ecore_evas_extn_plug_object_data_lock()
3714  * @see ecore_evas_extn_plug_object_data_unlock()
3715  *
3716  * @since 1.2
3717  */
3718 EAPI Ecore_Evas *ecore_evas_extn_socket_new(int w, int h);
3719
3720 /**
3721  * @internal
3722  *
3723  * @brief Creates a socket to provide the service for external ecore evas
3724  * socket.
3725  *
3726  * @param ee The Ecore_Evas.
3727  * @param svcname The name of the service to be advertised. ensure that it is
3728  * unique (when combined with @p svcnum) otherwise creation may fail.
3729  * @param svcnum A number (any value, @c 0 being the common default) to
3730  * differentiate multiple instances of services with the same name.
3731  * @param svcsys A boolean that if true, specifies to create a system-wide
3732  * service all users can connect to, otherwise the service is private to the
3733  * user ide that created the service.
3734  * @return @c EINA_TRUE if creation is successful, @c EINA_FALSE if it does
3735  * not.
3736  *
3737  * This creates socket specified by @p svcname, @p svcnum and @p svcsys. If
3738  * creation is successful, @c EINA_TRUE is returned or @c EINA_FALSE if
3739  * creation fails.
3740  *
3741  * @see ecore_evas_extn_socket_new()
3742  * @see ecore_evas_extn_plug_new()
3743  * @see ecore_evas_extn_plug_object_data_lock()
3744  * @see ecore_evas_extn_plug_object_data_unlock()
3745  *
3746  * @since 1.2
3747  */
3748 EAPI Eina_Bool ecore_evas_extn_socket_listen(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
3749
3750 /**
3751  * @internal
3752  *
3753  * @brief Sets the blocking about mouse events to Ecore Evas.
3754  *
3755  * @param ee The Ecore_Evas.
3756  * @param events_block The blocking about mouse events.
3757  *
3758  * @see ecore_evas_extn_socket_events_block_get()
3759  *
3760  * @since 1.15
3761  */
3762 EAPI void ecore_evas_extn_socket_events_block_set(Ecore_Evas *ee, Eina_Bool events_block);
3763
3764 /**
3765  * @internal
3766  *
3767  * @brief Gets the blocking about mouse events to Ecore Evas.
3768  *
3769  * @param ee The Ecore_Evas.
3770  * @return The blocking about mouse events.
3771  *
3772  * @see ecore_evas_extn_socket_events_block_set()
3773  *
3774  * @since 1.15
3775  */
3776 EAPI Eina_Bool ecore_evas_extn_socket_events_block_get(Ecore_Evas *ee);
3777
3778 /**
3779  * @internal
3780  *
3781  * @brief Locks the pixel data so the socket cannot change it.
3782  *
3783  * @param obj The image object returned by ecore_evas_extn_plug_new() to lock
3784  *
3785  * You may need to get the image pixel data with evas_object_image_data_get()
3786  * from the image object, but need to ensure that it does not change while
3787  * you are using the data. This function lets you set an advisory lock on the
3788  * image data so the external plug process will not render to it or alter it.
3789  *
3790  * You should only hold the lock for just as long as you need to read out the
3791  * image data or otherwise deal with it, and then unlock it with
3792  * ecore_evas_extn_plug_object_data_unlock(). Keeping a lock over more than
3793  * 1 iteration of the main ecore loop will be problematic, so avoid it. Also
3794  * forgetting to unlock may cause the socket process to freeze and thus create
3795  * odd behaviors.
3796  *
3797  * @see ecore_evas_extn_plug_new()
3798  * @see ecore_evas_extn_plug_object_data_unlock()
3799  *
3800  * @since 1.2
3801  */
3802 EAPI void ecore_evas_extn_plug_object_data_lock(Evas_Object *obj);
3803
3804 /**
3805  * @internal
3806  *
3807  * @brief Unlocks the pixel data so the socket can change it again.
3808  *
3809  * @param obj The image object returned by ecore_evas_extn_plug_new() to unlock
3810  *
3811  * This unlocks after an advisor lock has been taken by
3812  * ecore_evas_extn_plug_object_data_lock().
3813  *
3814  * @see ecore_evas_extn_plug_new()
3815  * @see ecore_evas_extn_plug_object_data_lock()
3816  *
3817  * @since 1.2
3818  */
3819 EAPI void ecore_evas_extn_plug_object_data_unlock(Evas_Object *obj);
3820
3821 /**
3822  * @internal
3823  *
3824  * @brief Creates a new external ecore evas plug.
3825  *
3826  * @param ee_target The Ecore_Evas containing the canvas in which the new image object will live.
3827  * @return An evas image object that will contain the image output of a socket.
3828  *
3829  * This creates an image object that will contain the output of another
3830  * processes socket canvas when it connects. All input will be sent back to
3831  * this process as well, effectively swallowing or placing the socket process
3832  * in the canvas of the plug process in place of the image object. The image
3833  * object by default is created to be filled (equivalent of
3834  * evas_object_image_filled_add() on creation) so image content will scale
3835  * to fill the image unless otherwise reconfigured. The Ecore_Evas size
3836  * of the plug is the master size and determines size in pixels of the
3837  * plug canvas. You can change the size with something like:
3838  *
3839  * @code
3840  * Eina_Bool res = EINA_FALSE;
3841  * Evas_Object *obj = ecore_evas_extn_plug_new(ee);
3842  *
3843  * res = ecore_evas_extn_plug_connect("svcname", 1, EINA_FALSE);
3844  * if (!res) return;
3845  * ecore_evas_resize(ee, 240, 400);
3846  * @endcode
3847  *
3848  * @see ecore_evas_extn_socket_new()
3849  * @see ecore_evas_extn_plug_connect()
3850  * @since 1.2
3851  */
3852 EAPI Evas_Object *ecore_evas_extn_plug_new(Ecore_Evas *ee_target);
3853
3854 /**
3855  * @internal
3856  *
3857  * @brief Connects an external ecore evas plug to service provided by external
3858  * ecore evas socket.
3859  *
3860  * @param obj The Ecore_Evas containing the canvas in which the new image
3861  * object will live.
3862  * @param svcname The service name to connect to set up by the socket.
3863  * @param svcnum The service number to connect to (set up by socket).
3864  * @param svcsys Boolean to set if the service is a system one or not (set up
3865  * by socket).
3866  * @return @c EINA_TRUE if creation is successful, @c EINA_FALSE if it does
3867  * not.
3868  *
3869  * @see ecore_evas_extn_plug_new()
3870  *
3871  * @since 1.2
3872  */
3873 EAPI Eina_Bool ecore_evas_extn_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys);
3874
3875 // TIZEN_ONLY(20160120): support visibility_change event
3876 /**
3877  * @internal
3878  *
3879  * @brief Query if the ecore evas is obscured or unobscured.
3880  *
3881  * @param ee The Ecore_Evas
3882  * @return EINA_TRUE if the ecore evas is obscured, EINA_FALSE unobscured.
3883  * @warning Support for this depends on the underlying windowing system.
3884  *
3885  * @since 1.16
3886  */
3887 EAPI Eina_Bool ecore_evas_obscured_get(const Ecore_Evas *ee);
3888 //
3889
3890 /**
3891  * @}
3892  */
3893
3894 /**
3895  * @brief Retrieves the coordinates of the default mouse pointer.
3896  *
3897  * @param ee The Ecore_Evas containing the pointer
3898  * @param x Pointer to integer to store horizontal coordinate. May be @c NULL.
3899  * @param y Pointer to integer to store vertical coordinate. May be @c NULL.
3900  *
3901  * @see ecore_evas_pointer_device_xy_get
3902  * @since 1.8
3903  */
3904 EAPI void ecore_evas_pointer_xy_get(const Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y);
3905
3906 /**
3907  * @brief Sets the coordinates of the mouse pointer.
3908  *
3909  * @param ee The Ecore_Evas containing the pointer
3910  * @param x The horizontal coordinate to move the pointer to
3911  * @param y The vertical coordinate to move the pointer to
3912  *
3913  * @return @c EINA_TRUE on success, EINA_FALSE on failure.
3914  *
3915  * @since 1.8
3916  */
3917 EAPI Eina_Bool ecore_evas_pointer_warp(const Ecore_Evas *ee, Evas_Coord x, Evas_Coord y);
3918
3919 /**
3920  * @internal
3921  *
3922  * @brief Retrieves the coordinates of the mouse pointer.
3923  *
3924  * @param ee The Ecore_Evas containing the pointer
3925  * @param pointer The pointer device, use @c NULL for the default pointer.
3926  * @param x Pointer to integer to store horizontal coordinate. May be @c NULL.
3927  * @param y Pointer to integer to store vertical coordinate. May be @c NULL.
3928  * @since 1.19
3929  */
3930 EAPI void ecore_evas_pointer_device_xy_get(const Ecore_Evas *ee, const Efl_Input_Device *pointer, Evas_Coord *x, Evas_Coord *y);
3931
3932 /**
3933  * @internal
3934  *
3935  * @brief Retrieves the Visual used for pixmap creation.
3936  *
3937  * @param ee The Ecore_Evas containing the pixmap
3938  * @return The Visual which was used when creating the pixmap
3939  *
3940  * @warning If and when this function is called depends on the underlying
3941  * windowing system. This function should only be called if the Ecore_Evas was
3942  * created using @c ecore_evas_software_x11_pixmap_new or @c ecore_evas_gl_x11_pixmap_new
3943  *
3944  * @since 1.8
3945  */
3946 EAPI void *ecore_evas_pixmap_visual_get(const Ecore_Evas *ee);
3947
3948 /**
3949  * @internal
3950  *
3951  * @brief Retrieves the Colormap used for pixmap creation.
3952  *
3953  * @param ee The Ecore_Evas containing the pixmap
3954  * @return The Colormap which was used when creating the pixmap
3955  *
3956  * @warning If and when this function is called depends on the underlying
3957  * windowing system. This function should only be called if the Ecore_Evas was
3958  * created using @c ecore_evas_software_x11_pixmap_new or @c ecore_evas_gl_x11_pixmap_new
3959  *
3960  * @since 1.8
3961  */
3962 EAPI unsigned long ecore_evas_pixmap_colormap_get(const Ecore_Evas *ee);
3963
3964 /**
3965  * @internal
3966  *
3967  * @brief Retrieves the depth used for pixmap creation.
3968  *
3969  * @param ee The Ecore_Evas containing the pixmap
3970  * @return The depth which was used when creating the pixmap
3971  *
3972  * @warning If and when this function is called depends on the underlying
3973  * windowing system. This function should only be called if the Ecore_Evas was
3974  * created using @c ecore_evas_software_x11_pixmap_new or @c ecore_evas_gl_x11_pixmap_new
3975  *
3976  * @since 1.8
3977  */
3978 EAPI int ecore_evas_pixmap_depth_get(const Ecore_Evas *ee);
3979
3980 /** @defgroup Ecore_Evas_Selection_Group Ecore_Evas methods to handle selection
3981  *
3982  * These methods perform Copy&Paste and Drag&Drop operations.
3983  *
3984  * @since 1.24
3985  *
3986  * @{
3987  */
3988
3989 /** @brief Data buffer to use in Copy&Paste (and Drag&Drop) operations
3990  *
3991  * @since 1.24
3992  */
3993 typedef enum {
3994    ECORE_EVAS_SELECTION_BUFFER_SELECTION_BUFFER = 0,      /**< Stores selected / highlighted selection */
3995    ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER = 1, /**< Stores copied things (Ctrl + C) */
3996    ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER = 2,  /**< Stores dragged things while drag and drop is happening. */
3997    ECORE_EVAS_SELECTION_BUFFER_LAST = 3,                  /**< Sentinel value. Do not use. */
3998 } Ecore_Evas_Selection_Buffer;
3999
4000 /**
4001  * @internal
4002  *
4003  * @brief Mime type of Copy&Paste operations
4004  */
4005 typedef enum {
4006    ECORE_EVAS_SELECTION_CNP_TYPE_TEXT = 0,  /**< text/plain;charset=utf-8 / application/x-elementary-markup */
4007    ECORE_EVAS_SELECTION_CNP_TYPE_HTML = 1,  /**< application/xhtml+xml */
4008    ECORE_EVAS_SELECTION_CNP_TYPE_URI = 2,   /**< text/uri-list */
4009    ECORE_EVAS_SELECTION_CNP_TYPE_VCARD = 3, /**< text/vcard */
4010    ECORE_EVAS_SELECTION_CNP_TYPE_IMAGE = 4, /**< image/ */
4011    ECORE_EVAS_SELECTION_CNP_TYPE_LAST = 5,  /**< Sentinel value. Do not use. */
4012 } Ecore_Evas_Selection_Cnp_Type;
4013
4014 /**
4015  * @brief Callback called when the content of one of the selection buffers changes.
4016  *
4017  * @param[in] ee The Ecore_Evas that handles this selection.
4018  * @param[in] selection The selection buffer that has changed.
4019  *
4020  * @since 1.24
4021  */
4022 typedef void (*Ecore_Evas_Selection_Changed_Cb)(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection);
4023
4024 /**
4025  * @brief Sets a callback for Ecore_Evas to be called when a selection buffer changes.
4026  *
4027  * @param[in] ee The Ecore_Evas to set the callback on.
4028  * @param[in] cb The function to call.
4029  *
4030  * A call to this function will set a callback on an Ecore_Evas, causing
4031  * @p func to be called whenever @p ee selections change.
4032  * Only one such callback can exist for each Ecore_Evas. Calling this method multiple
4033  * times overwrites previous functions. Use a NULL @p func to stop being notified.
4034  *
4035  * @warning If and when this function is called depends on the underlying
4036  * windowing system.
4037  *
4038  * @since 1.24
4039  */
4040 EAPI void ecore_evas_callback_selection_changed_set(Ecore_Evas *ee, Ecore_Evas_Selection_Changed_Cb cb);
4041
4042 /**
4043  * @brief Sets the content of the specified selection buffer.
4044  *
4045  * @param[in] ee The Ecore_Evas to set the selection buffer on.
4046  * @param[in] buffer The selection buffer to set.
4047  * @param[in] content Content to set to the selection buffer. The Eina_Content specifies the MIME type of the data.
4048  * Ownership of the content is transferred.
4049  *
4050  * @note Only ECORE_EVAS_SELECTION_BUFFER_SELECTION_BUFFER and ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER
4051  * buffers can be set. Drag and drop operations use a different set of methods.
4052  *
4053  * @since 1.24
4054  */
4055 EAPI Eina_Bool ecore_evas_selection_set(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, Eina_Content *content);
4056
4057 /**
4058  * @brief Checks if the specified selection buffer has content.
4059  *
4060  * @param[in] ee The ecore evas to query
4061  * @param[in] buffer Which selection buffer to ask
4062  *
4063  * @return EINA_TRUE if there is an available selection for the specified buffer.
4064  *
4065  * EINA_TRUE is also returned when the selection is in the window associated with @p ee
4066  *
4067  * @note Due to the asynchronous nature of selection buffers, this method might not return
4068  * the right result when invoked from the selection callback set with ecore_evas_callback_selection_changed_set.
4069  *
4070  * @since 1.24
4071  */
4072 EAPI Eina_Bool ecore_evas_selection_exists(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer);
4073
4074 /**
4075  * @brief Retrieves the content of the specified selection buffer.
4076  *
4077  * @param[in] ee The ecore evas to query.
4078  * @param[in] buffer Selection buffer to retrieve.
4079  * @param[in] acceptable_types MIME types which are acceptable for the returned Eina_Content.
4080  * The iterator contains plain strings (char *). Ownership is transferred for the iterator but not for the strings.
4081  * This is convenient for the usual case of a hard-coded array of strings, since the iterator can be generated
4082  * on the fly, used and forgotten.
4083  *
4084  * @return An Eina_Future containing an Eina_Content which has one of the types in @p acceptable_type.
4085  * An error is delivered when no matching type is found or when the requested selection buffer is empty.
4086  *
4087  * This method is time consuming, therefore, it is recommended to verify the existence of a selection
4088  * using ecore_evas_selection_exists before calling it.
4089  *
4090  * @since 1.24
4091  */
4092 EAPI Eina_Future* ecore_evas_selection_get(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer buffer, Eina_Iterator *acceptable_types);
4093
4094 /**
4095  * @brief This method is called when the mouse pointer enters or exits the specified window while
4096  * performing a drag operation.
4097  *
4098  * @param[in] ee The Ecore Evas the drag operation started on.
4099  * @param[in] p Position (in window coordinates) where the event occurred.
4100  * @param[in] inside @c EINA_TRUE if the pointer just entered this window. @c EINA_FALSE if it has just exited.
4101  *
4102  * Set this callback using ecore_evas_callback_drop_state_changed_set.
4103  *
4104  * @since 1.24
4105  */
4106 typedef void (*Ecore_Evas_Drag_Finished_Cb)(Ecore_Evas *ee, unsigned int seat, void *data, Eina_Bool accepted);
4107
4108 /**
4109  * @brief This method is called when the drag object is accepted while performing a drag operation.
4110  *
4111  * @param[in] ee The Ecore Evas the drag operation started on.
4112  * @param[in] data The Drag and Drop data.
4113  * @param[in] accepted @c EINA_TRUE if drag and drop is accepted. @c EINA_FALSE if drag and drop is not accepted.
4114  */
4115 typedef void (*Ecore_Evas_Drag_Accepted_Cb)(Ecore_Evas *ee, unsigned int seat, void *data, Eina_Bool accepted);
4116
4117 /**
4118  * @brief Starts a new drag operation.
4119  *
4120  * @param[in] ee The Ecore Evas the drag operation started on.
4121  * @param[in] content The content to delivery at the drop site (ownership is transferred).
4122  * The Eina_Content has data and its associated MIME type, plus a list of alternate types that can be provided.
4123  * @param[in] drag_rep An Ecore_Evas used as a visual representation of the content being dragged.
4124  * It must have the same type as @p ee. This is the transparent object dragged along the mouse pointer to indicate that
4125  * a drag operation is in progress.
4126  * @p terminate_cb will be called when @p drag_rep is not needed anymore and it must be disposed of.
4127  * Use @p data to convey @p drag_rep to @p terminate_cb. For example, if @p drag_rep is owned by an Efl_Window, @p data
4128  * can point to that window.
4129  * @param[in] action Action the target application should perform upon receiving this content. It is entirely up to the
4130  * target application to honor (or even understand) this request.
4131  * @return @c EINA_TRUE if the drag operation has been successfully started.
4132  *
4133  * This method must be called when a drag operation is initiated in order to provide the necessary information.
4134  *
4135  * @since 1.24
4136  */
4137 EAPI Eina_Bool ecore_evas_drag_start(Ecore_Evas *ee, unsigned int seat, Eina_Content *content, Ecore_Evas *drag_rep,
4138                                      const char* action, Ecore_Evas_Drag_Finished_Cb terminate_cb, Ecore_Evas_Drag_Accepted_Cb accepted_cb,  void *data);
4139
4140 /**
4141  * @brief Cancels an ongoing drag operation.
4142  *
4143  * @param[in] ee The Ecore Evas the drag operation started on.
4144  * @return @c EINA_TRUE if the drag operation has been successfully cancelled.
4145  *
4146  * The initiator of a drag operation can call this method to abort it.
4147  *
4148  * @since 1.24
4149  */
4150 EAPI Eina_Bool ecore_evas_drag_cancel(Ecore_Evas *ee, unsigned int seat);
4151
4152 /**
4153  * @brief This method is called when the mouse pointer enters or exits the specified window while
4154  * performing a drag operation.
4155  *
4156  * @param[in] ee The Ecore Evas the drag operation started on.
4157  * @param[in] p Position (in window coordinates) where the event occurred.
4158  * @param[in] inside @c EINA_TRUE if the pointer just entered this window. @c EINA_FALSE if it has just exited.
4159  *
4160  * Set this callback using ecore_evas_callback_drop_state_changed_set.
4161  *
4162  * @since 1.24
4163  */
4164 typedef void (*Ecore_Evas_Drag_State_Changed_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p, Eina_Bool inside);
4165
4166 /**
4167  * @brief Sets the method (callback) to call when the mouse pointer enters or exits the specified window while
4168  * performing a drag operation.
4169  *
4170  * @param[in] ee The Ecore Evas the drag operation started on.
4171  * @param[in] cb Method to call when the events are received.
4172  *
4173  * Only one such callback can exist for each Ecore_Evas. Calling this method multiple
4174  * times overwrites previous functions. Use a NULL @p cb func to stop being notified.
4175  *
4176  * @since 1.24
4177  */
4178 EAPI void ecore_evas_callback_drop_state_changed_set(Ecore_Evas *ee, Ecore_Evas_Drag_State_Changed_Cb cb);
4179
4180 /**
4181  * @brief This method is called when the mouse pointer moves over the specified window while
4182  * performing a drag operation.
4183  *
4184  * @param[in] ee The Ecore Evas the drag operation started on.
4185  * @param[in] p Position (in window coordinates) where the event occurred.
4186  *
4187  * Set this callback using ecore_evas_callback_drop_motion_set.
4188  *
4189  * @since 1.24
4190  */
4191
4192 typedef void (*Ecore_Evas_Drag_Motion_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p);
4193 /**
4194  * @brief Sets the method (callback) to call when the mouse pointer moves over the specified window while
4195  * performing a drag operation.
4196  *
4197  * @param[in] ee The Ecore Evas the drag operation started on.
4198  * @param[in] cb Method to call when the events are received.
4199  *
4200  * Only one such callback can exist for each Ecore_Evas. Calling this method multiple
4201  * times overwrites previous functions. Use a NULL @p cb func to stop being notified.
4202  *
4203  * @since 1.24
4204  */
4205 EAPI void ecore_evas_callback_drop_motion_set(Ecore_Evas *ee, Ecore_Evas_Drag_Motion_Cb cb);
4206
4207 /**
4208  * @brief This method is called when the mouse pointer is released over the specified window while
4209  * performing a drag operation (thus dropping the dragged content over the window).
4210  *
4211  * @param[in] ee The Ecore Evas the drag operation started on.
4212  * @param[in] p Position (in window coordinates) where the event occurred.
4213  *
4214  * The dropped data can be retrieved using ecore_evas_selection_get and the
4215  * ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER buffer.
4216  *
4217  * Set this callback using ecore_evas_callback_drop_drop_set.
4218  *
4219  * @since 1.24
4220  */
4221 typedef void (*Ecore_Evas_Drop_Cb)(Ecore_Evas *ee, unsigned int seat, Eina_Position2D p, const char *action);
4222
4223 /**
4224  * @brief Sets the method (callback) to call when the mouse pointer is released over the specified window while
4225  * performing a drag operation (thus dropping the dragged content over the window).
4226  *
4227  * @param[in] ee The Ecore Evas the drag operation started on.
4228  * @param[in] cb Method to call when the events are received.
4229  *
4230  * Only one such callback can exist for each Ecore_Evas. Calling this method multiple
4231  * times overwrites previous functions. Use a NULL @p cb func to stop being notified.
4232  *
4233  * @since 1.24
4234  */
4235 EAPI void ecore_evas_callback_drop_drop_set(Ecore_Evas *ee, Ecore_Evas_Drop_Cb cb);
4236
4237 /**
4238  * @brief Retrieves the list of types the data currently being dragged can be automatically converted to.
4239  *
4240  * @param[in] ee The Ecore Evas the drag operation started on.
4241  * @return
4242  *
4243  * This can be used in any of the drag and drop callbacks (Ecore_Evas_Drag_State_Changed_Cb, Ecore_Evas_Drag_Motion_Cb
4244  * and Ecore_Evas_Drop_Cb) to check if the data being dragged is acceptable and give the user some early feedback
4245  * before the data is actually dropped on the window.
4246  *
4247  * This is functionally equivalent to calling ecore_evas_selection_get and examining the available types in the
4248  * returned Eina_Content, but much faster since the actual data does not have to be asynchronously requested to the
4249  * initiator application.
4250  *
4251  * @since 1.24
4252  */
4253 EAPI Eina_Accessor* ecore_evas_drop_available_types_get(Ecore_Evas *ee, unsigned int seat);
4254
4255 /**
4256  * @}
4257  */
4258
4259 /**
4260  * @}
4261  */
4262
4263 #ifdef __cplusplus
4264 }
4265 #endif
4266
4267 #undef EAPI
4268 #define EAPI
4269
4270 #endif
4271