remove xcb support in ecore_x and evas engines as per mailing list
[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_ECORE_EVAS_BUILD
13 #  ifdef DLL_EXPORT
14 #   define EAPI __declspec(dllexport)
15 #  else
16 #   define EAPI
17 #  endif /* ! DLL_EXPORT */
18 # else
19 #  define EAPI __declspec(dllimport)
20 # endif /* ! EFL_ECORE_EVAS_BUILD */
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 /* ! _WIN32 */
32
33 /**
34  * @file Ecore_Evas.h
35  * @brief Evas wrapper functions
36  *
37  * The following is a list of example 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  * - iconfication api needs to work
49  * - maximization api needs to work
50  * - document all calls
51  *
52  * later:
53  * - buffer back-end that renders to an evas_image_object ???
54  * - qt back-end ???
55  * - dfb back-end ??? (dfb's threads make this REALLY HARD)
56  */
57
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61
62 /**
63  * @defgroup Ecore_Evas_Group Ecore_Evas wrapper/helper set of functions
64  * @ingroup Ecore
65  *
66  * Ecore evas is a set of functions that makes it easy to tie together ecore's
67  * main loop and input handling to evas. As such it's a natural base for EFL
68  * applications. While this combination makes it easy to create the basic
69  * aspects all applications need, for normal applications(ones with buttons,
70  * checkboxes and layouts) one should consider using Elementary.
71  *
72  * Ecore evas is extremely well suited for applications that are not based on
73  * widgets. It has a main loop that delivers events, does basic window handling
74  * and leaves all of the drawing up to the user. This works very well if used
75  * in conjunction with Edje or if doing custom drawing as, for example, is done
76  * in games.
77  *
78  * This is a list of examples of these functions:
79  * @li @ref ecore_evas_basics_example_c
80  * @li @ref ecore_evas_object_example_c
81  * @li @ref ecore_evas_callbacks_example_c
82  * @li @ref Ecore_Evas_Window_Sizes_Example_c
83  * @li @ref Ecore_Evas_Buffer_Example_01_c
84  * @li @ref Ecore_Evas_Buffer_Example_02_c
85  *
86  * @{
87  */
88
89 /* these are dummy and just tell u what API levels ecore_evas supports - not if
90  * the actual support is compiled in. You need to query for that separately.
91  */
92 #define HAVE_ECORE_EVAS_X 1
93 #define HAVE_ECORE_EVAS_FB 1
94 #define HAVE_ECORE_EVAS_X11_GL 1
95 //#define HAVE_ECORE_EVAS_X11_16 1
96 //#define HAVE_ECORE_EVAS_DIRECTFB 1
97 #define HAVE_ECORE_EVAS_WIN32 1
98 #define HAVE_ECORE_EVAS_COCOA 1
99 #define HAVE_ECORE_EVAS_SDL 1
100 //#define HAVE_ECORE_EVAS_WINCE 1
101 #define HAVE_ECORE_EVAS_EWS 1
102 #define HAVE_ECORE_EVAS_PSL1GHT 1
103 #define HAVE_ECORE_EVAS_WAYLAND_SHM 1
104 #define HAVE_ECORE_EVAS_WAYLAND_EGL 1
105 #define HAVE_ECORE_EVAS_DRM 1
106 #define HAVE_ECORE_EVAS_DRM_GL 1
107
108 typedef enum _Ecore_Evas_Engine_Type
109 {
110    ECORE_EVAS_ENGINE_SOFTWARE_BUFFER,
111    ECORE_EVAS_ENGINE_SOFTWARE_XLIB,
112    ECORE_EVAS_ENGINE_XRENDER_X11,
113    ECORE_EVAS_ENGINE_OPENGL_X11,
114    ECORE_EVAS_ENGINE_SOFTWARE_XCB, /* @deprecated */
115    ECORE_EVAS_ENGINE_XRENDER_XCB, /* @deprecated */
116    ECORE_EVAS_ENGINE_SOFTWARE_GDI,
117    ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
118    ECORE_EVAS_ENGINE_DIRECT3D,
119    ECORE_EVAS_ENGINE_OPENGL_GLEW,
120    ECORE_EVAS_ENGINE_OPENGL_COCOA,
121    ECORE_EVAS_ENGINE_SOFTWARE_SDL,
122    ECORE_EVAS_ENGINE_DIRECTFB,
123    ECORE_EVAS_ENGINE_SOFTWARE_FB,
124    ECORE_EVAS_ENGINE_SOFTWARE_8_X11,
125    ECORE_EVAS_ENGINE_SOFTWARE_16_X11,
126    ECORE_EVAS_ENGINE_SOFTWARE_16_DDRAW,
127    ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE,
128    ECORE_EVAS_ENGINE_OPENGL_SDL,
129    ECORE_EVAS_ENGINE_EWS,
130    ECORE_EVAS_ENGINE_PSL1GHT,
131    ECORE_EVAS_ENGINE_WAYLAND_SHM,
132    ECORE_EVAS_ENGINE_WAYLAND_EGL,
133    ECORE_EVAS_ENGINE_DRM,
134    ECORE_EVAS_ENGINE_OPENGL_DRM
135 } Ecore_Evas_Engine_Type;
136
137 typedef enum _Ecore_Evas_Avoid_Damage_Type
138 {
139    ECORE_EVAS_AVOID_DAMAGE_NONE = 0,
140    ECORE_EVAS_AVOID_DAMAGE_EXPOSE = 1,
141    ECORE_EVAS_AVOID_DAMAGE_BUILT_IN = 2
142 } Ecore_Evas_Avoid_Damage_Type;
143
144 typedef enum _Ecore_Evas_Object_Associate_Flags
145 {
146   ECORE_EVAS_OBJECT_ASSOCIATE_BASE  = 0,
147   ECORE_EVAS_OBJECT_ASSOCIATE_STACK = 1 << 0,
148   ECORE_EVAS_OBJECT_ASSOCIATE_LAYER = 1 << 1,
149   ECORE_EVAS_OBJECT_ASSOCIATE_DEL = 1 << 2
150 } Ecore_Evas_Object_Associate_Flags;
151
152 /* module setup/shutdown calls */
153
154 EAPI int         ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine);
155
156 /**
157  * @brief Init the Ecore_Evas system.
158  *
159  * @return How many times the lib has been initialized, 0 indicates failure.
160  *
161  * Set up the Evas wrapper system. Init Evas and Ecore libraries.
162  *
163  * @see ecore_evas_shutdown()
164  */
165 EAPI int         ecore_evas_init(void);
166 /**
167  * @brief Shut down the Ecore_Evas system.
168  *
169  * @return 0 if ecore evas is fully shut down, or > 0 if it still being used.
170  *
171  * This closes the Evas wrapper system down. Shut down Evas and Ecore libraries.
172  *
173  * @see ecore_evas_init()
174  */
175 EAPI int         ecore_evas_shutdown(void);
176
177 EAPI void        ecore_evas_app_comp_sync_set(Eina_Bool do_sync);
178 EAPI Eina_Bool   ecore_evas_app_comp_sync_get(void);
179
180 /**
181  * @brief Return a list of supported engines names.
182  *
183  * @return Newly allocated list with engines names. Engines names
184  * strings are internal and should be considered constants, do not
185  * free or modify them, to free the list use ecore_evas_engines_free().
186  */
187 EAPI Eina_List  *ecore_evas_engines_get(void);
188 /**
189  * @brief Free list returned by ecore_evas_engines_get()
190  *
191  * @param engines list with engines names
192  */
193 EAPI void        ecore_evas_engines_free(Eina_List *engines);
194 /**
195  * @brief Create a new Ecore_Evas based on engine name and common parameters.
196  *
197  * @param engine_name engine name as returned by
198  *        ecore_evas_engines_get() or @c NULL to use environment variable
199  *        ECORE_EVAS_ENGINE, that can be undefined and in this case
200  *        this call will try to find the first working engine.
201  * @param x horizontal position of window (not supported in all engines)
202  * @param y vertical position of window (not supported in all engines)
203  * @param w width of window
204  * @param h height of window
205  * @param extra_options string with extra parameter, dependent on engines
206  *        or @ NULL. String is usually in the form: 'key1=value1;key2=value2'.
207  *        Pay attention that when getting that from shell commands, most
208  *        consider ';' as the command terminator, so you need to escape
209  *        it or use quotes.
210  *
211  * @return Ecore_Evas instance or @c NULL if creation failed.
212  */
213 EAPI Ecore_Evas *ecore_evas_new(const char *engine_name, int x, int y, int w, int h, const char *extra_options);
214 /**
215  * @brief Set whether an Ecore_Evas has an alpha channel or not.
216  *
217  * @param ee The Ecore_Evas to shape
218  * @param alpha @c EINA_TRUE to enable the alpha channel, @c EINA_FALSE to
219  * disable it
220  *
221  * This function allows you to make an Ecore_Evas translucent using an
222  * alpha channel. See ecore_evas_shaped_set() for details. The difference
223  * between a shaped window and a window with an alpha channel is that an
224  * alpha channel supports multiple levels of transparency, as opposed to
225  * the 1 bit transparency of a shaped window (a pixel is either opaque, or
226  * it's transparent).
227  *
228  * @warning Support for this depends on the underlying windowing system.
229  */
230 EAPI void        ecore_evas_alpha_set(Ecore_Evas *ee, Eina_Bool alpha);
231 /**
232  * @brief Query whether an Ecore_Evas has an alpha channel.
233  * @param ee The Ecore_Evas to query.
234  * @return @c EINA_TRUE if ee has an alpha channel, @c EINA_FALSE if it does
235  * not.
236  *
237  * This function returns @c EINA_TRUE if @p ee has an alpha channel, and
238  * @c EINA_FALSE if it does not.
239  *
240  * @see ecore_evas_alpha_set()
241  */
242 EAPI Eina_Bool   ecore_evas_alpha_get(const Ecore_Evas *ee);
243 /**
244  * @brief Set whether an Ecore_Evas has an transparent window or not.
245  *
246  * @param ee The Ecore_Evas to shape
247  * @param transparent @c EINA_TRUE to enable the transparent window,
248  * @c EINA_FALSE to disable it
249  *
250  * This function sets some translucency options, for more complete support see
251  * ecore_evas_alpha_set().
252  *
253  * @warning Support for this depends on the underlying windowing system.
254  *
255  * @see ecore_evas_alpha_set()
256  */
257 EAPI void        ecore_evas_transparent_set(Ecore_Evas *ee, Eina_Bool transparent);
258 /**
259  * @brief  Query whether an Ecore_Evas is transparent.
260  *
261  * @param ee The Ecore_Evas to query.
262  * @return @c EINA_TRUE if ee is transparent, @c EINA_FALSE if it isn't.
263  *
264  * @see ecore_evas_transparent_set()
265  */
266 EAPI Eina_Bool   ecore_evas_transparent_get(const Ecore_Evas *ee);
267 /**
268  * @brief  Get the geometry of an Ecore_Evas.
269  *
270  * @param ee The Ecore_Evas whose geometry y
271  * @param x A pointer to an int to place the x coordinate in
272  * @param y A pointer to an int to place the y coordinate in
273  * @param w A pointer to an int to place the w size in
274  * @param h A pointer to an int to place the h size in
275  *
276  * This function takes four pointers to (already allocated) ints, and places
277  * the geometry of @p ee in them. If any of the parameters is not desired you
278  * may pass @c NULL on them.
279  *
280  * @code
281  * int x, y, w, h;
282  * ecore_evas_geometry_get(ee, &x, &y, &w, &h);
283  * @endcode
284  *
285  * @see ecore_evas_new()
286  * @see ecore_evas_resize()
287  * @see ecore_evas_move()
288  * @see ecore_evas_move_resize()
289  */
290 EAPI void        ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
291 /**
292  * @brief  Get the geometry which an Ecore_Evas was latest recently requested.
293  *
294  * @param ee The Ecore_Evas whose geometry y
295  * @param x A pointer to an int to place the x coordinate in
296  * @param y A pointer to an int to place the y coordinate in
297  * @param w A pointer to an int to place the w size in
298  * @param h A pointer to an int to place the h size in
299  *
300  * This function takes four pointers to (already allocated) ints, and places
301  * the geometry which @p ee was latest recently requested . If any of the
302  * parameters is not desired you may pass @c NULL on them.
303  * This function can represent recently requested geometry.
304  * ecore_evas_geometry_get function returns the value is updated after engine
305  * finished request. By comparison, ecore_evas_request_geometry_get returns
306  * recently requested value.
307  *
308  * @code
309  * int x, y, w, h;
310  * ecore_evas_request_geometry_get(ee, &x, &y, &w, &h);
311  * @endcode
312  *
313  * @since 1.1
314  */
315 EAPI void        ecore_evas_request_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
316 /**
317  * @brief Set the focus of an Ecore_Evas' window.
318  *
319  * @param ee The Ecore_Evas
320  * @param on @c EINA_TRUE for focus, @c EINA_FALSE to defocus.
321  *
322  * This function focuses @p ee if @p on is @c EINA_TRUE, or unfocuses @p ee if
323  * @p on is @c EINA_FALSE.
324  *
325  * @warning Support for this depends on the underlying windowing system.
326  */
327 EAPI void        ecore_evas_focus_set(Ecore_Evas *ee, Eina_Bool on);
328 /**
329  * @brief Query whether an Ecore_Evas' window is focused or not.
330  *
331  * @param ee The Ecore_Evas to set
332  * @return @c EINA_TRUE if @p ee if focused, @c EINA_FALSE if not.
333  *
334  * @see ecore_evas_focus_set()
335  */
336 EAPI Eina_Bool   ecore_evas_focus_get(const Ecore_Evas *ee);
337 /**
338  * @brief Iconify or uniconify an Ecore_Evas' window.
339  *
340  * @param ee The Ecore_Evas
341  * @param on @c EINA_TRUE to iconify, @c EINA_FALSE to uniconify.
342  *
343  * This function iconifies @p ee if @p on is @c EINA_TRUE, or uniconifies @p ee
344  * if @p on is @c EINA_FALSE.
345  *
346  * @note Iconify and minimize are synonyms.
347  *
348  * @warning Support for this depends on the underlying windowing system.
349  */
350 EAPI void        ecore_evas_iconified_set(Ecore_Evas *ee, Eina_Bool on);
351 /**
352  * @brief Query whether an Ecore_Evas' window is iconified or not.
353  *
354  * @param ee The Ecore_Evas to set
355  * @return @c EINA_TRUE if @p ee is iconified, @c EINA_FALSE if not.
356  *
357  * @note Iconify and minimize are synonyms.
358  *
359  * @see ecore_evas_iconified_set()
360  */
361 EAPI Eina_Bool   ecore_evas_iconified_get(const Ecore_Evas *ee);
362 /**
363  * @brief Set whether an Ecore_Evas' window is borderless or not.
364  *
365  * @param ee The Ecore_Evas
366  * @param on @c EINA_TRUE for borderless, @c EINA_FALSE for bordered.
367  *
368  * This function makes @p ee borderless if @p on is @c EINA_TRUE, or bordered
369  * if @p on is @c EINA_FALSE.
370  *
371  * @warning Support for this depends on the underlying windowing system.
372  */
373 EAPI void        ecore_evas_borderless_set(Ecore_Evas *ee, Eina_Bool on);
374 /**
375  * @brief Query whether an Ecore_Evas' window is borderless or not.
376  *
377  * @param ee The Ecore_Evas to set
378  * @return @c EINA_TRUE if @p ee is borderless, @c EINA_FALSE if not.
379  *
380  * @see ecore_evas_borderless_set()
381  */
382 EAPI Eina_Bool   ecore_evas_borderless_get(const Ecore_Evas *ee);
383 /**
384  * @brief Set whether or not an Ecore_Evas' window is fullscreen.
385  *
386  * @param ee The Ecore_Evas
387  * @param on @c EINA_TRUE fullscreen, @c EINA_FALSE not.
388  *
389  * This function causes @p ee to be fullscreen if @p on is @c EINA_TRUE, or
390  * not if @p on is @c EINA_FALSE.
391  *
392  * @warning Support for this depends on the underlying windowing system.
393  */
394 EAPI void        ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on);
395 /**
396  * @brief Query whether an Ecore_Evas' window is fullscreen or not.
397  *
398  * @param ee The Ecore_Evas to set
399  * @return @c EINA_TRUE if @p ee is fullscreen, @c EINA_FALSE if not.
400  *
401  * @see ecore_evas_fullscreen_set()
402  */
403 EAPI Eina_Bool   ecore_evas_fullscreen_get(const Ecore_Evas *ee);
404 /**
405  * @brief Set another window that this window is a group member of
406  *
407  * @param ee The Ecore_Evas
408  * @param ee_group The other group member
409  *
410  * If @p ee_group is @c NULL, @p ee is removed from the group, otherwise it is
411  * added. Note that if you free the @p ee_group canvas before @p ee, then
412  * getting the group canvas with ecore_evas_window_group_get() will return
413  * an invalid handle.
414  *
415  * @warning Support for this depends on the underlying windowing system.
416  * @since 1.2
417  */
418 EAPI void        ecore_evas_window_group_set(Ecore_Evas *ee, const Ecore_Evas *ee_group);
419 /**
420  * @brief Get the canvas group set.
421  *
422  * This returns the handle set by ecore_evas_window_group_set().
423  *
424  * @param ee The Ecore_Evas to set
425  * @return The Canvas group handle
426  *
427  * @see ecore_evas_window_group_set()
428  * @since 1.2
429  */
430 EAPI const Ecore_Evas *ecore_evas_window_group_get(const Ecore_Evas *ee);
431 /**
432  * @brief Set the aspect ratio of a canvas window
433  *
434  * @param ee The Ecore_Evas
435  * @param aspect The aspect ratio (width divided by height), or 0 to disable
436  *
437  * This sets the desired aspect ratio of a canvas window
438  *
439  * @warning Support for this depends on the underlying windowing system.
440  * @since 1.2
441  */
442 EAPI void        ecore_evas_aspect_set(Ecore_Evas *ee, double aspect);
443 /**
444  * @brief Get the aspect ratio of a canvas window
445  *
446  * This returns the value set by ecore_evas_aspect_set().
447  *
448  * @param ee The Ecore_Evas to set
449  * @return The aspect ratio
450  *
451  * @see ecore_evas_aspect_set()
452  * @since 1.2
453  */
454 EAPI double      ecore_evas_aspect_get(const Ecore_Evas *ee);
455 /**
456  * @brief Set The urgent hint flag
457  *
458  * @param ee The Ecore_Evas
459  * @param urgent The urgent state flag
460  *
461  * This sets the "urgent" state hint on a window so the desktop environment
462  * can highlight it somehow.
463  *
464  * @warning Support for this depends on the underlying windowing system.
465  * @since 1.2
466  */
467 EAPI void        ecore_evas_urgent_set(Ecore_Evas *ee, Eina_Bool urgent);
468 /**
469  * @brief Get the urgent state on the cavas window
470  *
471  * This returns the value set by ecore_evas_urgent_set()
472  *
473  * @param ee The Ecore_Evas to set
474  * @return The urgent state set
475  *
476  * @see ecore_evas_urgent_set()
477  * @since 1.2
478  */
479 EAPI Eina_Bool   ecore_evas_urgent_get(const Ecore_Evas *ee);
480 /**
481  * @brief Set the modal state flag on the canvas window
482  *
483  * @param ee The Ecore_Evas
484  * @param modal The modal hint flag
485  *
486  * This hints if the window should be modal (eg if it is also transient
487  * for another window, the other window will maybe be denied focus by
488  * the desktop window manager).
489  *
490  * @warning Support for this depends on the underlying windowing system.
491  * @since 1.2
492  */
493 EAPI void        ecore_evas_modal_set(Ecore_Evas *ee, Eina_Bool modal);
494 /**
495  * @brief Get The modal flag
496  *
497  * This returns the value set by ecore_evas_modal_set().
498  *
499  * @param ee The Ecore_Evas to set
500  * @return The modal flag
501  *
502  * @see ecore_evas_modal_set()
503  * @since 1.2
504  */
505 EAPI Eina_Bool   ecore_evas_modal_get(const Ecore_Evas *ee);
506 /**
507  * @brief Set the "i demand attention" flag on a canvas window
508  *
509  * @param ee The Ecore_Evas
510  * @param demand The flag state to set
511  *
512  * A window may demand attention now (eg you must enter a password before
513  * continuing), and so it may flag a window with this.
514  *
515  * @warning Support for this depends on the underlying windowing system.
516  * @since 1.2
517  */
518 EAPI void        ecore_evas_demand_attention_set(Ecore_Evas *ee, Eina_Bool demand);
519 /**
520  * @brief Get the "i demand attention" flag
521  *
522  * This returns the value set by ecore_evas_demand_attention_set().
523  *
524  * @param ee The Ecore_Evas to set
525  * @return The "i demand attention" flag.
526  *
527  * @see ecore_evas_demand_attention_set()
528  * @since 1.2
529  */
530 EAPI Eina_Bool   ecore_evas_demand_attention_get(const Ecore_Evas *ee);
531 /**
532  * @brief Set the "focus skip" flag
533  *
534  * @param ee The Ecore_Evas
535  * @param skip The "focus skip" state to set.
536  *
537  * A window may not want to accept focus, be in the taskbar, pager etc.
538  * sometimes (example for a small notification window that hovers around
539  * a taskbar or panel, or hovers around a window until some activity
540  * dismisses it).
541  *
542  * @warning Support for this depends on the underlying windowing system.
543  * @since 1.2
544  */
545 EAPI void        ecore_evas_focus_skip_set(Ecore_Evas *ee, Eina_Bool skip);
546 /**
547  * @brief Get the "focus skip" flag
548  *
549  * This returns the value set by ecore_evas_focus_skip_set().
550  *
551  * @param ee The Ecore_Evas to set
552  * @return The "focus skip" flag.
553  *
554  * @see ecore_evas_focus_skip_set()
555  * @since 1.2
556  */
557 EAPI Eina_Bool   ecore_evas_focus_skip_get(const Ecore_Evas *ee);
558
559 /**
560  * @brief Set if this evas should ignore @b all events.
561  *
562  * @param ee The Ecore_Evas whose window's to ignore events.
563  * @param ignore The Ecore_Evas new ignore state.
564  *
565  * @warning Support for this depends on the underlying windowing system.
566  */
567 EAPI void        ecore_evas_ignore_events_set(Ecore_Evas *ee, Eina_Bool ignore);
568 /**
569  * @brief Return the ignore state of an Ecore_Evas' window.
570  *
571  * @param ee The Ecore_Evas whose window's ignore events state is returned.
572  * @return The Ecore_Evas window's ignore state.
573  *
574  * @see ecore_evas_ignore_events_set()
575  */
576 EAPI Eina_Bool   ecore_evas_ignore_events_get(const Ecore_Evas *ee);
577 /**
578  * @brief Query whether an Ecore_Evas' window is visible or not.
579  *
580  * @param ee The Ecore_Evas to query.
581  * @return 1 if visible, 0 if not.
582  *
583  * This function queries @p ee and returns 1 if it is visible, and 0 if not.
584  *
585  * @see ecore_evas_show()
586  * @see ecore_evas_hide()
587  */
588 EAPI int         ecore_evas_visibility_get(const Ecore_Evas *ee);
589 /**
590  * @brief Set the layer of an Ecore_Evas' window.
591  *
592  * @param ee The Ecore_Evas
593  * @param layer The layer to put @p ee on.
594  *
595  * This function moves @p ee to the layer @p layer.
596  *
597  * @warning Support for this depends on the underlying windowing system.
598  *
599  * @see ecore_evas_lower()
600  * @see ecore_evas_raise()
601  */
602 EAPI void        ecore_evas_layer_set(Ecore_Evas *ee, int layer);
603 /**
604  * @brief Get the layer of an Ecore_Evas' window.
605  *
606  * @param ee The Ecore_Evas to set
607  * @return the layer @p ee's window is on.
608  *
609  * @see ecore_evas_layer_set()
610  * @see ecore_evas_lower()
611  * @see ecore_evas_raise()
612  */
613 EAPI int         ecore_evas_layer_get(const Ecore_Evas *ee);
614 /**
615  * @brief Maximize (or unmaximize) an Ecore_Evas' window.
616  *
617  * @param ee The Ecore_Evas
618  * @param on @c EINA_TRUE to maximize, @c EINA_FALSE to unmaximize.
619  *
620  * This function maximizes @p ee if @p on is @c EINA_TRUE, or unmaximizes @p ee
621  * if @p on is @c EINA_FALSE.
622  *
623  * @warning Support for this depends on the underlying windowing system.
624  */
625 EAPI void        ecore_evas_maximized_set(Ecore_Evas *ee, Eina_Bool on);
626 /**
627  * @brief Query whether an Ecore_Evas' window is maximized or not.
628  *
629  * @param ee The Ecore_Evas to set
630  * @return @c EINA_TRUE if @p ee is maximized, @c EINA_FALSE if not.
631  *
632  * @see ecore_evas_maximized_set()
633  */
634 EAPI Eina_Bool   ecore_evas_maximized_get(const Ecore_Evas *ee);
635 /**
636  * @brief Query if the underlying windowing system supports the window profile.
637  *
638  * @param ee The Ecore_Evas
639  * @return @c EINA_TRUE if the window profile is supported, @c EINA_FALSE otherwise.
640  *
641  * @warning Support for this depends on the underlying windowing system.
642  * @since 1.8.0
643  */
644 EAPI Eina_Bool   ecore_evas_window_profile_supported_get(const Ecore_Evas *ee);
645 /**
646  * @brief Set the window profile
647  *
648  * @param ee The Ecore_Evas to set
649  * @param profile The string value of the window profile
650  *
651  * @warning Support for this depends on the underlying windowing system.
652  * @since 1.8.0
653  */
654 EAPI void        ecore_evas_window_profile_set(Ecore_Evas *ee, const char *profile);
655 /**
656  * @brief Get the window profile
657  *
658  * @param ee The Ecore_Evas to get the window profile from.
659  * @return The string value of the window profile, or NULL if none exists
660  *
661  * @warning Support for this depends on the underlying windowing system.
662  * @since 1.8.0
663  */
664 EAPI const char *ecore_evas_window_profile_get(const Ecore_Evas *ee);
665 /**
666  * @brief Set the array of available window profiles
667  *
668  * @param ee The Ecore_Evas to set
669  * @param profiles The string array of available window profiels
670  * @param count The number of members in profiles
671  *
672  * @warning Support for this depends on the underlying windowing system.
673  * @since 1.8.0
674  */
675 EAPI void        ecore_evas_window_available_profiles_set(Ecore_Evas *ee, const char **profiles, const unsigned int count);
676 /**
677  * @brief Get the array of available window profiles
678  *
679  * @param ee The Ecore_Evas to get available window profiles from.
680  * @param profiles Where to return the string array of available window profiles
681  * @param count Where to return the number of members in profiles
682  * @return EINA_TRUE if available window profiles exist, EINA_FALSE otherwise
683  *
684  * @warning Support for this depends on the underlying windowing system.
685  * @since 1.8.0
686  */
687 EAPI Eina_Bool   ecore_evas_window_available_profiles_get(Ecore_Evas *ee, char ***profiles, unsigned int *count);
688 /**
689  * @brief Query if the underlying windowing system supports the window manager rotation.
690  *
691  * @param ee The Ecore_Evas
692  * @return @c EINA_TRUE if the window manager rotation is supported, @c EINA_FALSE otherwise.
693  *
694  * @warning Support for this depends on the underlying windowing system.
695  * @since 1.9.0
696  */
697 EAPI Eina_Bool   ecore_evas_wm_rotation_supported_get(const Ecore_Evas *ee);
698 /**
699  * @brief Set the preferred rotation hint.
700  *
701  * @param ee The Ecore_Evas to set
702  * @param rotation Value to set the preferred rotation hint
703  *
704  * @warning Support for this depends on the underlying windowing system.
705  * @since 1.9.0
706  */
707 EAPI void        ecore_evas_wm_rotation_preferred_rotation_set(Ecore_Evas *ee, int rotation);
708 /**
709  * @brief Get the preferred rotation hint.
710  *
711  * @param ee The Ecore_Evas to get the preferred rotation hint from.
712  * @return The preferred rotation hint, -1 on failure.
713  *
714  * @warning Support for this depends on the underlying windowing system.
715  * @since 1.9.0
716  */
717 EAPI int         ecore_evas_wm_rotation_preferred_rotation_get(const Ecore_Evas *ee);
718 /**
719  * @brief Set the array of available window rotations.
720  *
721  * @param ee The Ecore_Evas to set
722  * @param rotations The integer array of available window rotations
723  * @param count The number of members in rotations
724  *
725  * @warning Support for this depends on the underlying windowing system.
726  * @since 1.9.0
727  */
728 EAPI void        ecore_evas_wm_rotation_available_rotations_set(Ecore_Evas *ee, const int *rotations, unsigned int count);
729 /**
730  * @brief Get the array of available window rotations.
731  *
732  * @param ee The Ecore_Evas to get available window rotations from.
733  * @param rotations Where to return the integer array of available window rotations
734  * @param count Where to return the number of members in rotations
735  * @return EINA_TRUE if available window rotations exist, EINA_FALSE otherwise
736  *
737  * @warning Support for this depends on the underlying windowing system.
738  * @since 1.9.0
739  */
740 EAPI Eina_Bool   ecore_evas_wm_rotation_available_rotations_get(const Ecore_Evas *ee, int **rotations, unsigned int *count);
741 /**
742  * @brief Set manual rotation done mode of Ecore_Evas's window
743  *
744  * @param ee The Ecore_Evas
745  * @param set If true, the window manager will not rotate the Ecore_Evas's window until
746  * the rotation done event is received by ecore_evas_wm_rotation_manual_rotation_done.
747  * If false, the manual rotation mode is disabled.
748  *
749  * @since 1.9.0
750  */
751 EAPI void        ecore_evas_wm_rotation_manual_rotation_done_set(Ecore_Evas *ee, Eina_Bool set);
752 /**
753  * @brief Get manual rotation done mode of Ecore_Evas's window
754  *
755  * @param ee The Ecore_Evas
756  * @return If true, the manual rotation done mode is enabled
757  *
758  * @since 1.9.0
759  */
760 EAPI Eina_Bool   ecore_evas_wm_rotation_manual_rotation_done_get(const Ecore_Evas *ee);
761 /**
762  * @brief Set rotation finish manually
763  *
764  * @param ee The Ecore_Evas
765  *
766  * @since 1.9.0
767  */
768 EAPI void        ecore_evas_wm_rotation_manual_rotation_done(Ecore_Evas *ee);
769 /**
770  * @brief Get the list of supported auxiliary hint strings.
771  *
772  * @param ee The Ecore_Evas
773  * @return List of supported auxiliary hint strings.
774  * @note Do not change the returned list of its contents. Auxiliary hint
775  * strings are internal and should be considered constants, do not free or
776  * modify them.
777  * @warning Support for this depends on the underlying windowing system.
778  *
779  * The window auxiliary hint is the value which is used to decide which actions should
780  * be made available to the user by the window manager. If you want to set specific hint
781  * to your window, then you should check whether it exists in the supported auxiliary
782  * hints that are registered in the root window by the window manager. Once you've added
783  * an auxiliary hint, you can get a new ID which is used to change value and delete hint.
784  * The window manager sends the response message to the application on receiving auxiliary
785  * hint change event. A list of auxiliary hint within the Ecore_Evas has this format:
786  * ID:HINT:VALUE,ID:HINT:VALUE,...
787  *
788  * @since 1.10.0
789  */
790 EAPI const Eina_List *ecore_evas_aux_hints_supported_get(const Ecore_Evas *ee);
791 /**
792  * @brief Get the list of allowed auxiliary hint ID.
793  *
794  * @param ee The Ecore_Evas
795  * @return List of allowed auxiliary hint ID.
796  * @note This function is low level. Instead of using it directly, consider
797  * using the callback mechanism in Elementary such as "aux,hint,allowed".
798  * @warning Support for this depends on the underlying windowing system.
799  *
800  * @since 1.10.0
801  */
802 EAPI Eina_List       *ecore_evas_aux_hints_allowed_get(const Ecore_Evas *ee);
803 /**
804  * @brief Create an auxiliary hint of the Ecore_Evas.
805  *
806  * @param ee The Ecore_Evas
807  * @param hint The auxiliary hint string.
808  * @param val The value string.
809  * @return The ID of created auxiliary hint, or -1 on failure.
810  * @warning Support for this depends on the underlying windowing system.
811  *
812  * @since 1.10.0
813  */
814 EAPI int              ecore_evas_aux_hint_add(Ecore_Evas *ee, const char *hint, const char *val);
815 /**
816  * @brief Delete an auxiliary hint of the Ecore_Evas.
817  *
818  * @param ee The Ecore_Evas
819  * @param id The ID of the auxiliary hint.
820  * @return EINA_TRUE if no error occurred, EINA_FALSE otherwise.
821  * @warning Support for this depends on the underlying windowing system.
822  *
823  * @since 1.10.0
824  */
825 EAPI Eina_Bool        ecore_evas_aux_hint_del(Ecore_Evas *ee, const int id);
826 /**
827  * @brief Change a value of the auxiliary hint.
828  *
829  * @param ee The Ecore_Evas
830  * @param id The auxiliary hint ID.
831  * @param val The value string to be set.
832  * @return EINA_TRUE if no error occurred, EINA_FALSE otherwise.
833  * @warning Support for this depends on the underlying windowing system.
834  *
835  * @since 1.10.0
836  */
837 EAPI Eina_Bool        ecore_evas_aux_hint_val_set(Ecore_Evas *ee, const int id, const char *val);
838 /**
839  * @brief Get a value of the auxiliary hint.
840  *
841  * @param ee The Ecore_Evas
842  * @param id The auxiliary hint ID.
843  * @return The string value of the auxiliary hint ID, or NULL if none exists
844  * @warning Support for this depends on the underlying windowing system.
845  *
846  * @since 1.15
847  */
848 EAPI const char      *ecore_evas_aux_hint_val_get(const Ecore_Evas *ee, int id);
849 /**
850  * @brief Get a ID of the auxiliary hint string.
851  *
852  * @param ee The Ecore_Evas
853  * @param hint The auxiliary hint string.
854  * @return The ID of the auxiliary hint string, or -1 if none exists
855  * @warning Support for this depends on the underlying windowing system.
856  *
857  * @since 1.15
858  */
859 EAPI int              ecore_evas_aux_hint_id_get(const Ecore_Evas *ee, const char *hint);
860
861 /**
862  * @brief Send message to parent ecore
863  *
864  * @param ee The Ecore_Evas to set
865  * @param msg_domain The domain of message
866  * @param msg_id The id of message
867  * @param data The data of message
868  * @param size The size of message data
869  *
870  * @warning Support for this depends on the underlying windowing system.
871  * @since 1.8.0
872  *
873  * @see ecore_evas_msg_send()
874  * @see ecore_evas_callback_msg_parent_handle_set()
875  * @see eecore_evas_callback_msg_handle_set()
876  *
877  * This is a list of examples of these functions:
878  * @li @ref ecore_evas_extn_socket_example
879  * @li @ref ecore_evas_extn_plug_example
880  */
881 EAPI void ecore_evas_msg_parent_send(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size);
882 /**
883  * @brief Send message to child ecore
884  *
885  * @param ee The Ecore_Evas to set
886  * @param msg_domain The domain of message
887  * @param msg_id The id of message
888  * @param data The data of message
889  * @param size The size of message data
890  *
891  * @warning Support for this depends on the underlying windowing system.
892  * @since 1.8.0
893  *
894  * @see ecore_evas_msg_parent_send()
895  * @see ecore_evas_callback_msg_parent_handle_set()
896  * @see eecore_evas_callback_msg_handle_set()
897  */
898 EAPI void ecore_evas_msg_send(Ecore_Evas *ee, int msg_domain, int msg_id, void *data, int size);
899 /**
900  * @brief Set a callback for parent Ecore_Evas message.
901  *
902  * @param ee The Ecore_Evas to set callbacks on
903  * @param func_parent_handle The handle to be called when message arive.
904  *
905  * @warning Support for this depends on the underlying windowing system.
906  * @since 1.8.0
907  *
908  * @see ecore_evas_msg_parent_send()
909  * @see ecore_evas_msg_send()
910  * @see eecore_evas_callback_msg_handle_set()
911  */
912 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));
913 /**
914  * @brief Set a callback for child Ecore_Evas message.
915  *
916  * @param ee The Ecore_Evas to set callbacks on
917  * @param func_handle  The handle to be called when message arive
918  *
919  * @warning Support for this depends on the underlying windowing system.
920  * @since 1.8.0
921  *
922  * @see ecore_evas_msg_parent_send()
923  * @see ecore_evas_msg_send()
924  * @see ecore_evas_callback_msg_parent_handle_set()
925  */
926 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));
927
928 /**
929  * @brief Move an Ecore_Evas.
930  *
931  * @param ee The Ecore_Evas to move
932  * @param x The x coordinate to move to
933  * @param y The y coordinate to move to
934  *
935  * This moves @p ee to the screen coordinates (@p x, @p y)
936  *
937  * @warning Support for this depends on the underlying windowing system.
938  *
939  * @see ecore_evas_new()
940  * @see ecore_evas_resize()
941  * @see ecore_evas_move_resize()
942  */
943 EAPI void        ecore_evas_move(Ecore_Evas *ee, int x, int y);
944 /**
945  * @brief Resize an Ecore_Evas.
946  *
947  * @param ee The Ecore_Evas to move
948  * @param w The w coordinate to resize to
949  * @param h The h coordinate to resize to
950  *
951  * This resizes @p ee to @p w x @p h.
952  *
953  * @warning Support for this depends on the underlying windowing system.
954  *
955  * @see ecore_evas_new()
956  * @see ecore_evas_move()
957  * @see ecore_evas_move_resize()
958  */
959 EAPI void        ecore_evas_resize(Ecore_Evas *ee, int w, int h);
960 /**
961  * @brief Move and resize an Ecore_Evas
962  *
963  * @param ee The Ecore_Evas to move and resize
964  * @param x The x coordinate to move to
965  * @param y The y coordinate to move to
966  * @param w The w coordinate to resize to
967  * @param h The h coordinate to resize to
968  *
969  * This moves @p ee to the screen coordinates (@p x, @p y) and  resizes
970  * it to @p w x @p h.
971  *
972  * @warning Support for this depends on the underlying windowing system.
973  *
974  * @see ecore_evas_new()
975  * @see ecore_evas_move()
976  * @see ecore_evas_resize()
977  */
978 EAPI void        ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h);
979 /**
980  * @brief Set the rotation of an Ecore_Evas' window.
981  *
982  * @param ee The Ecore_Evas
983  * @param rot the angle (in degrees) of rotation.
984  *
985  * The allowed values of @p rot depend on the engine being used. Most only
986  * allow multiples of 90.
987  *
988  * @warning Support for this depends on the underlying windowing system.
989  *
990  * @see ecore_evas_rotation_with_resize_set()
991  */
992 EAPI void        ecore_evas_rotation_set(Ecore_Evas *ee, int rot);
993 /**
994  * @brief Set the rotation of an Ecore_Evas' window
995  *
996  * @param ee The Ecore_Evas
997  * @param rot the angle (in degrees) of rotation.
998  *
999  * Like ecore_evas_rotation_set(), but it also resizes the window's contents so
1000  * that they fit inside the current window geometry.
1001  *
1002  * @warning Support for this depends on the underlying windowing system.
1003  *
1004  * @see ecore_evas_rotation_set()
1005  */
1006 EAPI void        ecore_evas_rotation_with_resize_set(Ecore_Evas *ee, int rot);
1007 /**
1008  * @brief Get the rotation of an Ecore_Evas' window
1009  *
1010  * @param ee The Ecore_Evas
1011  * @return the angle (in degrees) of rotation.
1012  *
1013  * @see ecore_evas_rotation_set()
1014  * @see ecore_evas_rotation_with_resize_set()
1015  */
1016 EAPI int         ecore_evas_rotation_get(const Ecore_Evas *ee);
1017 /**
1018  * @brief Raise an Ecore_Evas' window.
1019  *
1020  * @param ee The Ecore_Evas to raise.
1021  *
1022  * This functions raises the Ecore_Evas to the front.
1023  *
1024  * @warning Support for this depends on the underlying windowing system.
1025  *
1026  * @see ecore_evas_lower()
1027  * @see ecore_evas_layer_set()
1028  */
1029 EAPI void        ecore_evas_raise(Ecore_Evas *ee);
1030 /**
1031  * @brief Lower an Ecore_Evas' window.
1032  *
1033  * @param ee The Ecore_Evas to raise.
1034  *
1035  * This functions lowers the Ecore_Evas to the back.
1036  *
1037  * @warning Support for this depends on the underlying windowing system.
1038  *
1039  * @see ecore_evas_raise()
1040  * @see ecore_evas_layer_set()
1041  */
1042 EAPI void        ecore_evas_lower(Ecore_Evas *ee);
1043 /**
1044  * @brief Set the title of an Ecore_Evas' window.
1045  *
1046  * @param ee The Ecore_Evas whose title you wish to set.
1047  * @param t The title
1048  *
1049  * This function sets the title of @p ee to @p t.
1050  *
1051  * @warning Support for this depends on the underlying windowing system.
1052  */
1053 EAPI void        ecore_evas_title_set(Ecore_Evas *ee, const char *t);
1054 /**
1055  * @brief Get the title of an Ecore_Evas' window.
1056  *
1057  * @param ee The Ecore_Evas whose title you wish to get.
1058  * @return The title of @p ee.
1059  *
1060  * This function returns the title of @p ee.
1061  *
1062  * @see ecore_evas_title_set()
1063  */
1064 EAPI const char *ecore_evas_title_get(const Ecore_Evas *ee);
1065 /**
1066  * @brief Set the name and class of an Ecore_Evas' window.
1067  *
1068  * @param ee the Ecore_Evas
1069  * @param n the name
1070  * @param c the class
1071  *
1072  * This function sets the name of @p ee to @p n, and its class to @p c. The
1073  * meaning of @p name and @p class depends on the underlying windowing system.
1074  *
1075  * @warning Support for this depends on the underlying windowing system.
1076  */
1077 EAPI void        ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, const char *c);
1078 /**
1079  * @brief Get the name and class of an Ecore_Evas' window
1080  *
1081  * This function gets the name of @p ee into @p n, and its class into
1082  * @p c.
1083  *
1084  * @param ee The Ecore_Evas to query.
1085  * @param n A pointer to a string to place the name in.
1086  * @param c A pointer to a string to place the class in.
1087  * @see ecore_evas_name_class_set()
1088  */
1089 EAPI void        ecore_evas_name_class_get(const Ecore_Evas *ee, const char **n, const char **c);
1090 /**
1091  * @brief Return a pointer to the underlying window.
1092  *
1093  * @param ee The Ecore_Evas whose window is desired.
1094  * @return A pointer to the underlying window.
1095  *
1096  * @warning Support for this depends on the underlying windowing system.
1097  */
1098 EAPI Ecore_Window ecore_evas_window_get(const Ecore_Evas *ee);
1099
1100 /* engine/target specific init calls */
1101
1102 /**
1103  * @brief Create Ecore_Evas using software x11.
1104  * @note If ecore is not compiled with support to x11 then nothing is done and NULL is returned.
1105  * @param disp_name The name of the Ecore_Evas to be created.
1106  * @param parent The parent of the Ecore_Evas to be created.
1107  * @param x The X coordinate to be used.
1108  * @param y The Y coordinate to be used.
1109  * @param w The width of the Ecore_Evas to be created.
1110  * @param h The height of the Ecore_Evas to be created.
1111  * @return A handle to the created Ecore_Evas.
1112  */
1113 EAPI Ecore_Evas     *ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
1114
1115 /**
1116  * @brief Get the window from Ecore_Evas using software x11.
1117  * @note If ecore is not compiled with support for x11 or if @p ee was not
1118  * created with ecore_evas_software_x11_new() then nothing is done and
1119  * 0 is returned.
1120  * @param ee The Ecore_Evas from which to get the window.
1121  * @return The window of type Ecore_X_Window.
1122  */
1123 EAPI Ecore_X_Window  ecore_evas_software_x11_window_get(const Ecore_Evas *ee);
1124
1125 /**
1126  * @brief Set the direct_resize of Ecore_Evas using software x11.
1127  * @note If ecore is not compiled with support to x11 then nothing is done.
1128  * @param ee The Ecore_Evas in which to set direct resize.
1129  * @param on Enables the resize of Ecore_Evas if equals EINA_TRUE, disables if equals EINA_FALSE.
1130  */
1131 EAPI void            ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on);
1132
1133 /**
1134  * @brief Get if the Ecore_Evas is being directly resized using software x11.
1135  * @note If ecore is not compiled with support to x11 then nothing is done and EINA_FALSE is returned.
1136  * @param ee The Ecore_Evas from which to get direct resize.
1137  * @return EINA_TRUE if the resize was managed directly, otherwise return EINA_FALSE.
1138  */
1139 EAPI Eina_Bool       ecore_evas_software_x11_direct_resize_get(const Ecore_Evas *ee);
1140
1141 /**
1142  * @brief Add extra window on Ecore_Evas using software x11.
1143  * @note If ecore is not compiled with support to x11 then nothing is done.
1144  * @param ee The Ecore_Evas on which to add the window.
1145  * @param win The window to be added at the Ecore_Evas.
1146  */
1147 EAPI void            ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
1148
1149 /**
1150  * @brief Create a new Ecore_Evas which does not contain an XWindow. It will
1151  * only contain an XPixmap to render to
1152  *
1153  * @warning The XPixmap ID can change with every frame after it is rendered,
1154  * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you
1155  * need the current pixmap id.
1156  *
1157  * @since 1.8
1158  */
1159 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);
1160
1161 /**
1162  * @brief Return the underlying Ecore_X_Pixmap used in the Ecore_Evas
1163  *
1164  * @param ee The Ecore_Evas whose pixmap is desired.
1165  * @return The underlying Ecore_X_Pixmap
1166  *
1167  * @warning Support for this depends on the underlying windowing system.
1168  *
1169  * @warning The XPixmap ID can change with every frame after it is rendered,
1170  * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you
1171  * need the current pixmap id.
1172  *
1173  * @since 1.8
1174  */
1175 EAPI Ecore_X_Pixmap ecore_evas_software_x11_pixmap_get(const Ecore_Evas *ee);
1176
1177 #define ECORE_EVAS_GL_X11_OPT_NONE         0
1178 #define ECORE_EVAS_GL_X11_OPT_INDIRECT     1
1179 #define ECORE_EVAS_GL_X11_OPT_VSYNC        2
1180 #define ECORE_EVAS_GL_X11_OPT_SWAP_MODE    3
1181 #define ECORE_EVAS_GL_X11_OPT_GL_DEPTH     4
1182 #define ECORE_EVAS_GL_X11_OPT_GL_STENCIL   5
1183 #define ECORE_EVAS_GL_X11_OPT_GL_MSAA      6
1184 #define ECORE_EVAS_GL_X11_OPT_LAST         7
1185
1186 #define ECORE_EVAS_GL_X11_SWAP_MODE_AUTO   0
1187 #define ECORE_EVAS_GL_X11_SWAP_MODE_FULL   1
1188 #define ECORE_EVAS_GL_X11_SWAP_MODE_COPY   2
1189 #define ECORE_EVAS_GL_X11_SWAP_MODE_DOUBLE 3
1190 #define ECORE_EVAS_GL_X11_SWAP_MODE_TRIPLE 4
1191
1192 /**
1193  * @brief Create Ecore_Evas using opengl x11.
1194  * @note If ecore is not compiled with support to x11 then nothing is done and NULL is returned.
1195  * @param disp_name The name of the display of the Ecore_Evas to be created.
1196  * @param parent The parent of the Ecore_Evas to be created.
1197  * @param x The X coordinate to be used.
1198  * @param y The Y coordinate to be used.
1199  * @param w The width of the Ecore_Evas to be created.
1200  * @param h The height of the Ecore_Evas to be created.
1201  * @return The new Ecore_Evas.
1202  */
1203 EAPI Ecore_Evas     *ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
1204 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);
1205
1206 /**
1207  * @brief Get the window from Ecore_Evas using opengl x11.
1208  * @note If ecore is not compiled with support for x11 or if @p ee was not
1209  * created with ecore_evas_gl_x11_new() then nothing is done and
1210  * 0 is returned.
1211  * @param ee The Ecore_Evas from which to get the window.
1212  * @return The window of type Ecore_X_Window of Ecore_Evas.
1213  */
1214 EAPI Ecore_X_Window  ecore_evas_gl_x11_window_get(const Ecore_Evas *ee);
1215
1216 /**
1217  * @brief Set direct_resize for Ecore_Evas using opengl x11.
1218  * @note If ecore is not compiled with support to x11 then nothing is done.
1219  * @param ee The Ecore_Evas in which to set direct resize.
1220  * @param on Enables the resize of Ecore_Evas if equals EINA_TRUE, disables if equals EINA_FALSE.
1221  */
1222 EAPI void            ecore_evas_gl_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on);
1223
1224 /**
1225  * @brief Get if the Ecore_Evas is being directly resized using opengl x11.
1226  * @note If ecore is not compiled with support to x11 then nothing is done and EINA_FALSE is returned.
1227  * @param ee The Ecore_Evas from which to get direct resize.
1228  * @return EINA_TRUE if the resize was managed directly, otherwise return EINA_FALSE.
1229  */
1230 EAPI Eina_Bool       ecore_evas_gl_x11_direct_resize_get(const Ecore_Evas *ee);
1231
1232 /**
1233  * @brief Add extra window on Ecore_Evas using opengl x11.
1234  * @note If ecore is not compiled with support to x11 then nothing is done.
1235  * @param ee The Ecore_Evas for which to add the window.
1236  * @param win The window to be added at the Ecore_Evas.
1237  */
1238 EAPI void            ecore_evas_gl_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
1239
1240 /**
1241  * @brief Set the functions to be used before and after the swap callback.
1242  * @note If ecore is not compiled with support to x11 then nothing is done and the function is returned.
1243  * @param ee The Ecore_Evas for which to set the swap callback.
1244  * @param data The data for which to set the swap callback.
1245  * @param pre_cb The function to be called before the callback.
1246  * @param post_cb The function to be called after the callback.
1247  */
1248 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));
1249
1250 /**
1251  * @brief Create a new Ecore_Evas which does not contain an XWindow. It will
1252  * only contain an XPixmap to render to
1253  *
1254  * @warning The XPixmap ID can change with every frame after it is rendered,
1255  * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you
1256  * need the current pixmap id.
1257  *
1258  * @since 1.8
1259  */
1260 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);
1261
1262 /**
1263  * @brief Return the underlying Ecore_X_Pixmap used in the Ecore_Evas
1264  *
1265  * @param ee The Ecore_Evas whose pixmap is desired.
1266  * @return The underlying Ecore_X_Pixmap
1267  *
1268  * @warning Support for this depends on the underlying windowing system.
1269  *
1270  * @warning The XPixmap ID can change with every frame after it is rendered,
1271  * so you should ALWAYS call ecore_evas_software_x11_pixmap_get when you
1272  * need the current pixmap id.
1273  *
1274  * @since 1.8
1275  */
1276 EAPI Ecore_X_Pixmap ecore_evas_gl_x11_pixmap_get(const Ecore_Evas *ee);
1277
1278 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;
1279 EAPI Ecore_X_Window  ecore_evas_xrender_x11_window_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1280 EAPI void            ecore_evas_xrender_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on) EINA_DEPRECATED;
1281 EAPI Eina_Bool       ecore_evas_xrender_x11_direct_resize_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1282 EAPI void            ecore_evas_xrender_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win) EINA_DEPRECATED;
1283
1284 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;
1285 EAPI Ecore_X_Window  ecore_evas_software_x11_8_window_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1286 EAPI Ecore_X_Window  ecore_evas_software_x11_8_subwindow_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1287 EAPI void            ecore_evas_software_x11_8_direct_resize_set(Ecore_Evas *ee, Eina_Bool on) EINA_DEPRECATED;
1288 EAPI Eina_Bool       ecore_evas_software_x11_8_direct_resize_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1289 EAPI void            ecore_evas_software_x11_8_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win) EINA_DEPRECATED;
1290
1291 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;
1292 EAPI Ecore_X_Window  ecore_evas_software_x11_16_window_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1293 EAPI void            ecore_evas_software_x11_16_direct_resize_set(Ecore_Evas *ee, Eina_Bool on) EINA_DEPRECATED;
1294 EAPI Eina_Bool       ecore_evas_software_x11_16_direct_resize_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1295 EAPI void            ecore_evas_software_x11_16_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win) EINA_DEPRECATED;
1296
1297 /**
1298  * @brief Create Ecore_Evas using fb backend.
1299  * @param disp_name The name of the display to be used.
1300  * @param rotation The rotation to be used.
1301  * @param w The width of the Ecore_Evas to be created.
1302  * @param h The height of the Ecore_Evas to be created.
1303  * @return The new Ecore_Evas.
1304  */
1305 EAPI Ecore_Evas     *ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h);
1306
1307 EAPI Ecore_Evas     *ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w, int h) EINA_DEPRECATED;
1308 EAPI Ecore_DirectFB_Window *ecore_evas_directfb_window_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1309
1310
1311 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);
1312 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);
1313 EAPI void            ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
1314 EAPI void            ecore_evas_wayland_move(Ecore_Evas *ee, int x, int y);
1315
1316 EAPI void            ecore_evas_wayland_pointer_set(Ecore_Evas *ee, int hot_x, int hot_y);
1317 EAPI void            ecore_evas_wayland_type_set(Ecore_Evas *ee, int type);
1318 EAPI Ecore_Wl_Window *ecore_evas_wayland_window_get(const Ecore_Evas *ee);
1319 EAPI Ecore_Wl2_Window *ecore_evas_wayland2_window_get(const Ecore_Evas *ee); /** @since 1.17 */
1320
1321 EAPI Ecore_Cocoa_Window *ecore_evas_cocoa_window_get(const Ecore_Evas *ee); /** @since 1.17 */
1322
1323 EAPI Ecore_Evas     *ecore_evas_drm_new(const char *device, unsigned int parent, int x, int y, int w, int h);
1324 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 */
1325
1326 /**
1327  * @brief Create a new @c Ecore_Evas canvas bound to the Evas
1328  * @b buffer engine
1329  *
1330  * @param w The width of the canvas, in pixels
1331  * @param h The height of the canvas, in pixels
1332  * @return A new @c Ecore_Evas instance or @c NULL, on failure
1333  *
1334  * This creates a new buffer canvas wrapper, with image data array
1335  * @b bound to the ARGB format, 8 bits per pixel.
1336  *
1337  * This function will allocate the needed pixels array with canonical
1338  * @c malloc(). If you wish a custom function to allocate it, consider
1339  * using ecore_evas_buffer_allocfunc_new(), instead.
1340  *
1341  * @note This function actually is a wrapper on
1342  * ecore_evas_buffer_allocfunc_new(), using the same @a w and @a h
1343  * arguments and canonical @c malloc() and @c free() to the memory
1344  * allocation and freeing functions. See that function's documentation
1345  * for more details.
1346  */
1347 EAPI Ecore_Evas     *ecore_evas_buffer_new(int w, int h);
1348
1349 /**
1350  * @brief Create a new @c Ecore_Evas canvas bound to the Evas
1351  * @b buffer engine, giving custom allocation and freeing functions for
1352  * the canvas memory region
1353  *
1354  * @param w The width of the canvas, in canvas units
1355  * @param h The height of the canvas, in canvas units
1356  * @param alloc_func Function to be called to allocate the memory
1357  * needed for the new buffer canvas. @a data will be passed the same
1358  * value as the @p data of this function, while @a size will be passed
1359  * @p w times @p h times @c sizeof(int).
1360  * @param free_func Function to be called to free the memory used by
1361  * the new buffer canvas. @a data will be passed the same value as the
1362  * @p data of this function, while @a pix will be passed the canvas
1363  * memory pointer.
1364  * @param data Custom data to be passed to the allocation and freeing
1365  * functions
1366  * @return A new @c Ecore_Evas instance or @c NULL, on failure
1367  *
1368  * This creates a new buffer canvas wrapper, with image data array
1369  * @b bound to the ARGB format, 8 bits per pixel.
1370  *
1371  * This function is useful when one wants an @c Ecore_Evas buffer
1372  * canvas with a custom allocation function, like one getting memory
1373  * chunks from a memory pool, for example.
1374  *
1375  * On any resizing of this @c Ecore_Evas buffer canvas, its image data
1376  * will be @b freed, to be allocated again with the new size.
1377  *
1378  * @note @p w and @p h sizes have to greater or equal to 1. Otherwise,
1379  * they'll be interpreted as 1, exactly.
1380  *
1381  * @see ecore_evas_buffer_new()
1382  */
1383 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);
1384
1385 /**
1386  * @brief Grab a pointer to the actual pixels array of a given
1387  * @c Ecore_Evas @b buffer canvas/window.
1388  *
1389  * @param ee An @c Ecore_Evas handle
1390  * @return A pointer to the internal pixels array of @p ee
1391  *
1392  * Besides returning a pointer to the actual pixel array of the given
1393  * canvas, this call will force a <b>rendering update on @p ee</b>,
1394  * first.
1395  *
1396  * A common use case for this call is to create an image object, from
1397  * @b another canvas, to have as data @p ee's contents, thus
1398  * snapshoting the canvas. For that case, one can also use the
1399  * ecore_evas_object_image_new() helper function.
1400  */
1401 EAPI const void     *ecore_evas_buffer_pixels_get(Ecore_Evas *ee);
1402
1403 /**
1404  * @brief Return a pointer to the Ecore_Evas parent of the given Ecore_Evas.
1405  *
1406  * @param ee An @c Ecore_Evas handle
1407  * @return A pointer to the Ecore_Evas parent.
1408  *
1409  * A use case for the function is to determine if the buffer is used inside
1410  * X11 or Wayland. Since the buffer engine doesn't give any indication on
1411  * it, we need to retrieve information from the Ecore_Evas parents.
1412  *
1413  * @since 1.13
1414  */
1415 EAPI Ecore_Evas *ecore_evas_buffer_ecore_evas_parent_get(Ecore_Evas *ee);
1416
1417 /**
1418  * @brief Create a new @c Ecore_Evas canvas bound to the Evas
1419  * @b ews (Ecore + Evas Single Process Windowing System) engine
1420  *
1421  * EWS is a simple single process windowing system. The backing store
1422  * is also an @c Ecore_Evas that can be setup with
1423  * ecore_evas_ews_setup() and retrieved with
1424  * ecore_evas_ews_ecore_evas_get(). It will allow window management
1425  * using events prefixed with @c ECORE_EVAS_EVENT_EWS_.
1426  *
1427  * The EWS windows (returned by this function or
1428  * ecore_evas_new("ews"...)) will all be software buffer windows
1429  * automatic rendered to the backing store.
1430  *
1431  * @param x horizontal position of window, in pixels
1432  * @param y vertical position of window, in pixels
1433  * @param w The width of the canvas, in pixels
1434  * @param h The height of the canvas, in pixels
1435  * @return A new @c Ecore_Evas instance or @c NULL, on failure
1436  *
1437  * @see ecore_evas_ews_setup()
1438  * @see ecore_evas_ews_ecore_evas_get()
1439  *
1440  * @since 1.1
1441  */
1442 EAPI Ecore_Evas     *ecore_evas_ews_new(int x, int y, int w, int h);
1443
1444
1445 /**
1446  * @brief Return the backing store image object that represents the given
1447  * window in EWS.
1448  * @return The evas object of EWS backing store.
1449  *
1450  * @note This should not be modified anyhow, but may be helpful to
1451  *       determine stacking and geometry of it for window managers
1452  *       that decorate windows.
1453  *
1454  * @param ee The Ecore_Evas from which to get the backing store.
1455  * @see ecore_evas_ews_manager_set()
1456  * @see ecore_evas_ews_evas_get()
1457  * @since 1.1
1458  */
1459 EAPI Evas_Object *ecore_evas_ews_backing_store_get(const Ecore_Evas *ee);
1460
1461 /**
1462  * @brief Call the window to be deleted (freed), but can let user decide to
1463  * forbid it by using ecore_evas_callback_delete_request_set()
1464  *
1465  * @param ee The Ecore_Evas for which window will be deleted.
1466  * @since 1.1
1467  */
1468 EAPI void ecore_evas_ews_delete_request(Ecore_Evas *ee);
1469
1470 /**
1471  * @brief Create an Evas image object with image data <b>bound to an
1472  * own, internal @c Ecore_Evas canvas wrapper</b>
1473  *
1474  * @param ee_target @c Ecore_Evas to have the canvas receiving the new
1475  * image object
1476  * @return A handle to the new image object
1477  *
1478  * This will create a @b special Evas image object. The image's pixel
1479  * array will get bound to the same image data array of an @b internal
1480  * @b buffer @c Ecore_Evas canvas. The user of this function is, then,
1481  * supposed to grab that @c Ecore_Evas handle, with
1482  * ecore_evas_object_ecore_evas_get(), and use its canvas to render
1483  * whichever contents he/she wants, @b independently of the contents
1484  * of the canvas owned by @p ee_target. Those contents will reflect on
1485  * the canvas of @p ee, though, being exactly the image data of the
1486  * object returned by this function.
1487  *
1488  * This is a helper function for the scenario of one wanting to grab a
1489  * buffer canvas' contents (with ecore_evas_buffer_pixels_get()) to be
1490  * used on another canvas, for whichever reason. The most common goal
1491  * of this setup is to @b save an image file with a whole canvas as
1492  * contents, which could not be achieved by using an image file within
1493  * the target canvas.
1494  *
1495  * @warning Always resize the returned image and its underlying
1496  * @c Ecore_Evas handle accordingly. They must be kept with same sizes
1497  * for things to work as expected. Also, you @b must issue
1498  * @c evas_object_image_size_set() on the image with that same size. If
1499  * the image is to be shown in a canvas bound to an engine different
1500  * than the buffer one, then you must also set this image's @b fill
1501  * properties accordingly.
1502  *
1503  * @note The image returned will always be bound to the
1504  * @c EVAS_COLORSPACE_ARGB8888 colorspace, always.
1505  *
1506  * @note Use ecore_evas_object_evas_get() to grab the image's internal
1507  * own canvas directly.
1508  *
1509  * @note If snapshoting this image's internal canvas, remember to
1510  * flush its internal @c Ecore_Evas firstly, with
1511  * ecore_evas_manual_render().
1512  */
1513 EAPI Evas_Object    *ecore_evas_object_image_new(Ecore_Evas *ee_target);
1514
1515 /**
1516  * @brief Retrieve the internal @c Ecore_Evas handle of an image
1517  * object created via ecore_evas_object_image_new()
1518  *
1519  * @param obj A handle to an image object created via
1520  * ecore_evas_object_image_new()
1521  * @return The underlying @c Ecore_Evas handle in @p obj
1522  */
1523 EAPI Ecore_Evas     *ecore_evas_object_ecore_evas_get(Evas_Object *obj);
1524
1525 /**
1526  * @brief Retrieve the canvas bound to the internal @c Ecore_Evas
1527  * handle of an image object created via ecore_evas_object_image_new()
1528  *
1529  * @param obj A handle to an image object created via
1530  * ecore_evas_object_image_new()
1531  * @return A handle to @p obj's underlying @c Ecore_Evas's canvas
1532  */
1533 EAPI Evas           *ecore_evas_object_evas_get(Evas_Object *obj);
1534
1535 EAPI Ecore_Evas     *ecore_evas_software_gdi_new(Ecore_Win32_Window *parent,
1536                                                  int                 x,
1537                                                  int                 y,
1538                                                  int                 width,
1539                                                  int                 height);
1540
1541 EAPI Ecore_Evas     *ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
1542                                                    int                 x,
1543                                                    int                 y,
1544                                                    int                 width,
1545                                                    int                 height);
1546
1547 EAPI Ecore_Evas     *ecore_evas_software_16_ddraw_new(Ecore_Win32_Window *parent,
1548                                                       int                 x,
1549                                                       int                 y,
1550                                                       int                 width,
1551                                                       int                 height);
1552
1553 EAPI Ecore_Evas     *ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
1554                                              int                 x,
1555                                              int                 y,
1556                                              int                 width,
1557                                              int                 height);
1558
1559 EAPI Ecore_Evas *ecore_evas_gl_glew_new(Ecore_Win32_Window *parent,
1560                                         int                 x,
1561                                         int                 y,
1562                                         int                 width,
1563                                         int                 height);
1564
1565 EAPI Ecore_Win32_Window *ecore_evas_win32_window_get(const Ecore_Evas *ee);
1566
1567 EAPI Ecore_Evas     *ecore_evas_sdl_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha);
1568 EAPI Ecore_Evas     *ecore_evas_sdl16_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha);
1569 EAPI Ecore_Evas     *ecore_evas_gl_sdl_new(const char* name, int w, int h, int fullscreen, int noframe);
1570
1571 EAPI Ecore_Evas     *ecore_evas_software_wince_new(Ecore_WinCE_Window *parent,
1572                                                    int                 x,
1573                                                    int                 y,
1574                                                    int                 width,
1575                                                    int                 height) EINA_DEPRECATED;
1576
1577 EAPI Ecore_Evas     *ecore_evas_software_wince_fb_new(Ecore_WinCE_Window *parent,
1578                                                       int                 x,
1579                                                       int                 y,
1580                                                       int                 width,
1581                                                       int                 height) EINA_DEPRECATED;
1582
1583 EAPI Ecore_Evas     *ecore_evas_software_wince_gapi_new(Ecore_WinCE_Window *parent,
1584                                                         int                 x,
1585                                                         int                 y,
1586                                                         int                 width,
1587                                                         int                 height) EINA_DEPRECATED;
1588
1589 EAPI Ecore_Evas     *ecore_evas_software_wince_ddraw_new(Ecore_WinCE_Window *parent,
1590                                                          int                 x,
1591                                                          int                 y,
1592                                                          int                 width,
1593                                                          int                 height) EINA_DEPRECATED;
1594
1595 EAPI Ecore_Evas     *ecore_evas_software_wince_gdi_new(Ecore_WinCE_Window *parent,
1596                                                        int                 x,
1597                                                        int                 y,
1598                                                        int                 width,
1599                                                        int                 height) EINA_DEPRECATED;
1600
1601 EAPI Ecore_WinCE_Window *ecore_evas_software_wince_window_get(const Ecore_Evas *ee) EINA_DEPRECATED;
1602
1603 EAPI Ecore_Evas *ecore_evas_cocoa_new(Ecore_Cocoa_Window *parent,
1604                                       int x,
1605                                       int y,
1606                                       int w,
1607                                       int h);
1608
1609 EAPI Ecore_Evas *ecore_evas_psl1ght_new(const char* name, int w, int h);
1610
1611
1612 /* generic manipulation calls */
1613 /**
1614  * @brief Get the engine name used by this Ecore_Evas(window).
1615  *
1616  * @param ee Ecore_Evas whose engine's name is desired.
1617  * @return A string that can(usually) be used in ecore_evas_new()
1618  *
1619  * @see ecore_evas_free()
1620  */
1621 EAPI const char *ecore_evas_engine_name_get(const Ecore_Evas *ee);
1622 /**
1623  * @brief Return the Ecore_Evas for this Evas
1624  *
1625  * @param e The Evas to get the Ecore_Evas from
1626  * @return The Ecore_Evas that holds this Evas, or @c NULL if not held by one.
1627  *
1628  * @warning Only use on Evas' created with ecore evas!
1629  */
1630 EAPI Ecore_Evas *ecore_evas_ecore_evas_get(const Evas *e);
1631 /**
1632  * @brief Free an Ecore_Evas
1633  *
1634  * @param ee The Ecore_Evas to free
1635  *
1636  * This frees up any memory used by the Ecore_Evas.
1637  */
1638 EAPI void        ecore_evas_free(Ecore_Evas *ee);
1639 /**
1640  * @brief Retrieve user data associated with an Ecore_Evas.
1641  *
1642  * @param ee The Ecore_Evas to retrieve the user data from.
1643  * @param key The key which the user data to be retrieved is associated with.
1644  *
1645  * This function retrieves user specific data that has been stored within an
1646  * Ecore_Evas structure with ecore_evas_data_set().
1647  *
1648  * @returns @c NULL on error or no data found, A pointer to the user data on
1649  *     success.
1650  *
1651  * @see ecore_evas_data_set()
1652  */
1653 EAPI void       *ecore_evas_data_get(const Ecore_Evas *ee, const char *key);
1654 /**
1655  * @brief Store user data in an Ecore_Evas structure.
1656  *
1657  * @param ee The Ecore_Evas to store the user data in.
1658  * @param key A unique string to associate the user data against. Cannot
1659  * be NULL.
1660  * @param data A pointer to the user data to store.
1661  *
1662  * This function associates the @p data with a @p key which is stored by
1663  * the Ecore_Evas @p ee. Be aware that a call to ecore_evas_free() will
1664  * not free any memory for the associated user data, this is the responsibility
1665  * of the caller.
1666  *
1667  * @see ecore_evas_callback_pre_free_set()
1668  * @see ecore_evas_free()
1669  * @see ecore_evas_data_get()
1670  */
1671 EAPI void        ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data);
1672 /**
1673  * @brief Set a callback for Ecore_Evas resize events.
1674  * @param ee The Ecore_Evas to set callbacks on
1675  * @param func The function to call
1676
1677  * A call to this function will set a callback on an Ecore_Evas, causing
1678  * @p func to be called whenever @p ee is resized.
1679  *
1680  * @warning If and when this function is called depends on the underlying
1681  * windowing system.
1682  */
1683 EAPI void        ecore_evas_callback_resize_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1684 /**
1685  * @brief Set a callback for Ecore_Evas move events.
1686  * @param ee The Ecore_Evas to set callbacks on
1687  * @param func The function to call
1688
1689  * A call to this function will set a callback on an Ecore_Evas, causing
1690  * @p func to be called whenever @p ee is moved.
1691  *
1692  * @warning If and when this function is called depends on the underlying
1693  * windowing system.
1694  */
1695 EAPI void        ecore_evas_callback_move_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1696 /**
1697  * @brief Set a callback for Ecore_Evas show events.
1698  * @param ee The Ecore_Evas to set callbacks on
1699  * @param func The function to call
1700
1701  * A call to this function will set a callback on an Ecore_Evas, causing
1702  * @p func to be called whenever @p ee is shown.
1703  *
1704  * @warning If and when this function is called depends on the underlying
1705  * windowing system.
1706  */
1707 EAPI void        ecore_evas_callback_show_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1708 /**
1709  * @brief Set a callback for Ecore_Evas hide events.
1710  * @param ee The Ecore_Evas to set callbacks on
1711  * @param func The function to call
1712
1713  * A call to this function will set a callback on an Ecore_Evas, causing
1714  * @p func to be called whenever @p ee is hidden.
1715  *
1716  * @warning If and when this function is called depends on the underlying
1717  * windowing system.
1718  */
1719 EAPI void        ecore_evas_callback_hide_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1720 /**
1721  * @brief Set a callback for Ecore_Evas delete request events.
1722  * @param ee The Ecore_Evas to set callbacks on
1723  * @param func The function to call
1724
1725  * A call to this function will set a callback on an Ecore_Evas, causing
1726  * @p func to be called whenever @p ee gets a delete request.
1727  *
1728  * @warning If and when this function is called depends on the underlying
1729  * windowing system.
1730  */
1731 EAPI void        ecore_evas_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1732 /**
1733  * @brief Set a callback for Ecore_Evas destroy events.
1734  * @param ee The Ecore_Evas to set callbacks on
1735  * @param func The function to call
1736
1737  * A call to this function will set a callback on an Ecore_Evas, causing
1738  * @p func to be called whenever @p ee is destroyed.
1739  *
1740  * @warning If and when this function is called depends on the underlying
1741  * windowing system.
1742  */
1743 EAPI void        ecore_evas_callback_destroy_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1744 /**
1745  * @brief Set a callback for Ecore_Evas focus in events.
1746  * @param ee The Ecore_Evas to set callbacks on
1747  * @param func The function to call
1748
1749  * A call to this function will set a callback on an Ecore_Evas, causing
1750  * @p func to be called whenever @p ee gets focus.
1751  *
1752  * @warning If and when this function is called depends on the underlying
1753  * windowing system.
1754  */
1755 EAPI void        ecore_evas_callback_focus_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1756 /**
1757  * @brief Set a callback for Ecore_Evas focus out events.
1758  * @param ee The Ecore_Evas to set callbacks on
1759  * @param func The function to call
1760
1761  * A call to this function will set a callback on an Ecore_Evas, causing
1762  * @p func to be called whenever @p ee loses focus.
1763  *
1764  * @warning If and when this function is called depends on the underlying
1765  * windowing system.
1766  */
1767 EAPI void        ecore_evas_callback_focus_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1768 /**
1769  * @brief Set a callback for Ecore_Evas sticky events.
1770  * @param ee The Ecore_Evas to set callbacks on
1771  * @param func The function to call
1772
1773  * A call to this function will set a callback on an Ecore_Evas, causing
1774  * @p func to be called whenever @p ee becomes sticky.
1775  *
1776  * @warning If and when this function is called depends on the underlying
1777  * windowing system.
1778  */
1779 EAPI void        ecore_evas_callback_sticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1780 /**
1781  * @brief Set a callback for Ecore_Evas un-sticky events.
1782  * @param ee The Ecore_Evas to set callbacks on
1783  * @param func The function to call
1784
1785  * A call to this function will set a callback on an Ecore_Evas, causing
1786  * @p func to be called whenever @p ee becomes un-sticky.
1787  *
1788  * @warning If and when this function is called depends on the underlying
1789  * windowing system.
1790  */
1791 EAPI void        ecore_evas_callback_unsticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1792 /**
1793  * @brief Set a callback for Ecore_Evas mouse in events.
1794  * @param ee The Ecore_Evas to set callbacks on
1795  * @param func The function to call
1796
1797  * A call to this function will set a callback on an Ecore_Evas, causing
1798  * @p func to be called whenever the mouse enters @p ee.
1799  *
1800  * @warning If and when this function is called depends on the underlying
1801  * windowing system.
1802  */
1803 EAPI void        ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1804 /**
1805  * @brief Set a callback for Ecore_Evas mouse out events.
1806  * @param ee The Ecore_Evas to set callbacks on
1807  * @param func The function to call
1808
1809  * A call to this function will set a callback on an Ecore_Evas, causing
1810  * @p func to be called whenever the mouse leaves @p ee.
1811  *
1812  * @warning If and when this function is called depends on the underlying
1813  * windowing system.
1814  */
1815 EAPI void        ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1816 /**
1817  * @brief Set a callback for Ecore_Evas pre render events.
1818  * @param ee The Ecore_Evas to set callbacks on
1819  * @param func The function to call
1820
1821  * A call to this function will set a callback on an Ecore_Evas, causing
1822  * @p func to be called just before the evas in @p ee is rendered.
1823  *
1824  * @warning If and when this function is called depends on the underlying
1825  * windowing system.
1826  */
1827 EAPI void        ecore_evas_callback_pre_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1828 /**
1829  * @brief Set a callback for Ecore_Evas mouse post render events.
1830  * @param ee The Ecore_Evas to set callbacks on
1831  * @param func The function to call
1832
1833  * A call to this function will set a callback on an Ecore_Evas, causing
1834  * @p func to be called just after the evas in @p ee is rendered.
1835  *
1836  * @warning If and when this function is called depends on the underlying
1837  * windowing system.
1838  */
1839 EAPI void        ecore_evas_callback_post_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1840 /**
1841  * @brief Set a callback for Ecore_Evas pre-free event.
1842  * @param ee The Ecore_Evas to set callbacks on
1843  * @param func The function to call
1844  *
1845  * A call to this function will set a callback on an Ecore_Evas, causing
1846  * @p func to be called just before the instance @p ee is freed.
1847  *
1848  * @warning If and when this function is called depends on the underlying
1849  * windowing system.
1850  */
1851 EAPI void        ecore_evas_callback_pre_free_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1852 /**
1853  * @brief Set a callback for Ecore_Evas state changes.
1854  * @param ee The Ecore_Evas to set callbacks on
1855  * @param func The function to call
1856
1857  * A call to this function will set a callback on an Ecore_Evas, causing
1858  * @p func to be called whenever @p ee changes state.
1859  *
1860  * @since 1.2
1861  * @warning If and when this function is called depends on the underlying
1862  * windowing system.
1863  */
1864 EAPI void        ecore_evas_callback_state_change_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1865
1866 /**
1867  * @brief Get an Ecore_Evas's Evas
1868  * @param ee The Ecore_Evas whose Evas you wish to get
1869  * @return The Evas wrapped by @p ee
1870  *
1871  * This function returns the Evas contained within @p ee.
1872  */
1873 EAPI Evas       *ecore_evas_get(const Ecore_Evas *ee);
1874
1875 /**
1876  * @brief Provide Managed move co-ordinates for an Ecore_Evas
1877  * @param ee The Ecore_Evas to move
1878  * @param x The x coordinate to set as the managed location
1879  * @param y The y coordinate to set as the managed location
1880  *
1881  * This sets the managed geometry position of the @p ee to (@p x, @p y)
1882  */
1883 EAPI void        ecore_evas_managed_move(Ecore_Evas *ee, int x, int y);
1884
1885 /**
1886  * @brief Set whether an Ecore_Evas is shaped or not.
1887  *
1888  * @param ee The Ecore_Evas to shape.
1889  * @param shaped @c EINA_TRUE to shape, @c EINA_FALSE to not.
1890  *
1891  * This function allows one to make an Ecore_Evas shaped to the contents of the
1892  * evas. If @p shaped is @c EINA_TRUE, @p ee will be transparent in parts of
1893  * the evas that contain no objects. If @p shaped is @c EINA_FALSE, then @p ee
1894  * will be rectangular, and parts with no data will show random framebuffer
1895  * artifacting. For non-shaped Ecore_Evases, it is recommended to cover the
1896  * entire evas with a background object.
1897  */
1898 EAPI void        ecore_evas_shaped_set(Ecore_Evas *ee, Eina_Bool shaped);
1899
1900 /**
1901  * @brief Query whether an Ecore_Evas is shaped or not.
1902  *
1903  * @param ee The Ecore_Evas to query.
1904  * @return @c EINA_TRUE if shaped, @c EINA_FALSE if not.
1905  *
1906  * This function returns @c EINA_TRUE if @p ee is shaped, and @c EINA_FALSE if not.
1907  */
1908 EAPI Eina_Bool   ecore_evas_shaped_get(const Ecore_Evas *ee);
1909 /**
1910  * @brief Show an Ecore_Evas' window
1911  *
1912  * @param ee The Ecore_Evas to show.
1913  *
1914  * This function makes @p ee visible.
1915  */
1916 EAPI void        ecore_evas_show(Ecore_Evas *ee);
1917 /**
1918  * @brief Hide an Ecore_Evas' window
1919  *
1920  * @param ee The Ecore_Evas to hide.
1921  *
1922  * This function makes @p ee hidden(not visible).
1923  */
1924 EAPI void        ecore_evas_hide(Ecore_Evas *ee);
1925
1926 /**
1927  * @brief Activate (set focus to, via the window manager) an Ecore_Evas' window.
1928  * @param ee The Ecore_Evas to activate.
1929  *
1930  * This functions activates the Ecore_Evas.
1931  */
1932 EAPI void        ecore_evas_activate(Ecore_Evas *ee);
1933
1934
1935 /**
1936  * @brief Set the minimum size of a given @c Ecore_Evas window
1937  *
1938  * @param ee An @c Ecore_Evas window's handle
1939  * @param w The minimum width
1940  * @param h The minimum height
1941  *
1942  * This function sets the minimum size of @p ee to be @p w x @p h.
1943  * One won't be able to resize that window to dimensions smaller than
1944  * the ones set.
1945  *
1946  * @note When base sizes are set, via ecore_evas_size_base_set(),
1947  * they'll be used to calculate a window's minimum size, instead of
1948  * those set by this function.
1949  *
1950  * @see ecore_evas_size_min_get()
1951  */
1952 EAPI void        ecore_evas_size_min_set(Ecore_Evas *ee, int w, int h);
1953
1954 /**
1955  * @brief Get the minimum size set for a given @c Ecore_Evas window
1956  *
1957  * @param ee An @c Ecore_Evas window's handle
1958  * @param w A pointer to an int to place the minimum width in.
1959  * @param h A pointer to an int to place the minimum height in.
1960  *
1961  * @note Use @c NULL pointers on the size components you're not
1962  * interested in: they'll be ignored by the function.
1963  *
1964  * @see ecore_evas_size_min_set() for more details
1965  */
1966 EAPI void        ecore_evas_size_min_get(const Ecore_Evas *ee, int *w, int *h);
1967
1968 /**
1969  * @brief Set the maximum size of a given @c Ecore_Evas window
1970  *
1971  * @param ee An @c Ecore_Evas window's handle
1972  * @param w The maximum width
1973  * @param h The maximum height
1974  *
1975  * This function sets the maximum size of @p ee to be @p w x @p h.
1976  * One won't be able to resize that window to dimensions bigger than
1977  * the ones set.
1978  *
1979  * @see ecore_evas_size_max_get()
1980  */
1981 EAPI void        ecore_evas_size_max_set(Ecore_Evas *ee, int w, int h);
1982
1983 /**
1984  * @brief Get the maximum size set for a given @c Ecore_Evas window
1985  *
1986  * @param ee An @c Ecore_Evas window's handle
1987  * @param w A pointer to an int to place the maximum width in.
1988  * @param h A pointer to an int to place the maximum height in.
1989  *
1990  * @note Use @c NULL pointers on the size components you're not
1991  * interested in: they'll be ignored by the function.
1992  *
1993  * @see ecore_evas_size_max_set() for more details
1994  */
1995 EAPI void        ecore_evas_size_max_get(const Ecore_Evas *ee, int *w, int *h);
1996
1997 /**
1998  * @brief Set the base size for a given @c Ecore_Evas window
1999  *
2000  * @param ee An @c Ecore_Evas window's handle
2001  * @param w The base width
2002  * @param h The base height
2003  *
2004  * This function sets the @b base size of @p ee to be @p w x @p h.
2005  * When base sizes are set, they'll be used to calculate a window's
2006  * @b minimum size, instead of those set by ecore_evas_size_min_get().
2007  *
2008  * @see ecore_evas_size_base_get()
2009  */
2010 EAPI void        ecore_evas_size_base_set(Ecore_Evas *ee, int w, int h);
2011
2012 /**
2013  * @brief Get the base size set for a given @c Ecore_Evas window
2014  *
2015  * @param ee An @c Ecore_Evas window's handle
2016  * @param w A pointer to an int to place the base width in.
2017  * @param h A pointer to an int to place the base height in.
2018  *
2019  * @note Use @c NULL pointers on the size components you're not
2020  * interested in: they'll be ignored by the function.
2021  *
2022  * @see ecore_evas_size_base_set() for more details
2023  */
2024 EAPI void        ecore_evas_size_base_get(const Ecore_Evas *ee, int *w, int *h);
2025
2026 /**
2027  * @brief Set the "size step" for a given @c Ecore_Evas window
2028  *
2029  * @param ee An @c Ecore_Evas window's handle
2030  * @param w The step width
2031  * @param h The step height
2032  *
2033  * This function sets the size steps of @p ee to be @p w x @p h. This
2034  * limits the size of this @c Ecore_Evas window to be @b always an
2035  * integer multiple of the step size, for each axis.
2036  */
2037 EAPI void        ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h);
2038
2039 /**
2040  * @brief Get the "size step" set for a given @c Ecore_Evas window
2041  *
2042  * @param ee An @c Ecore_Evas window's handle
2043  * @param w A pointer to an int to place the step width in.
2044  * @param h A pointer to an int to place the step height in.
2045  *
2046  * @note Use @c NULL pointers on the size components you're not
2047  * interested in: they'll be ignored by the function.
2048  *
2049  * @see ecore_evas_size_base_set() for more details
2050  */
2051 EAPI void        ecore_evas_size_step_get(const Ecore_Evas *ee, int *w, int *h);
2052
2053 /**
2054  * @brief Set the cursor of an Ecore_Evas.
2055  *
2056  * @param ee The Ecore_Evas
2057  * @param file  The path to an image file for the cursor.
2058  * @param layer The layer in which the cursor will appear.
2059  * @param hot_x The x coordinate of the cursor's hot spot.
2060  * @param hot_y The y coordinate of the cursor's hot spot.
2061  *
2062  * This function makes the mouse cursor over @p ee be the image specified by
2063  * @p file. The actual point within the image that the mouse is at is specified
2064  * by @p hot_x and @p hot_y, which are coordinates with respect to the top left
2065  * corner of the cursor image. Cursor object will be delete with Ecore_Evas.
2066  *
2067  * @note This function creates an object from the image and uses
2068  * ecore_evas_object_cursor_set().
2069  *
2070  * @warning Previos setted cursor will be delete.
2071  *
2072  * @see ecore_evas_object_cursor_set()
2073  * @see ecore_evas_cursor_unset()
2074  */
2075 EAPI void        ecore_evas_cursor_set(Ecore_Evas *ee, const char *file, int layer, int hot_x, int hot_y);
2076 /**
2077  * @brief Get information about an Ecore_Evas' cursor
2078  *
2079  * @param ee The Ecore_Evas to set
2080  * @param obj A pointer to an Evas_Object to place the cursor Evas_Object.
2081  * @param layer A pointer to an int to place the cursor's layer in.
2082  * @param hot_x A pointer to an int to place the cursor's hot_x coordinate in.
2083  * @param hot_y A pointer to an int to place the cursor's hot_y coordinate in.
2084  *
2085  * This function queries information about an Ecore_Evas' cursor.
2086  *
2087  * @see ecore_evas_cursor_set()
2088  * @see ecore_evas_object_cursor_set()
2089  * @see ecore_evas_cursor_unset()
2090  */
2091 EAPI void        ecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object **obj, int *layer, int *hot_x, int *hot_y);
2092
2093 /**
2094  * @brief Set the cursor of an Ecore_Evas
2095  *
2096  * @param ee The Ecore_Evas
2097  *
2098  * @param obj The Evas_Object which will be the cursor.
2099  * @param layer The layer in which the cursor will appear.
2100  * @param hot_x The x coordinate of the cursor's hot spot.
2101  * @param hot_y The y coordinate of the cursor's hot spot.
2102  *
2103  * This function makes the mouse cursor over @p ee be the object specified by
2104  * @p obj. The actual point within the object that the mouse is at is specified
2105  * by @p hot_x and @p hot_y, which are coordinates with respect to the top left
2106  * corner of the cursor object. Cursor object will be delete with the Ecore_Evas.
2107  *
2108  * @see ecore_evas_cursor_set()
2109  */
2110 EAPI void        ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y);
2111
2112 /**
2113  * @brief Unset the Ecore_Evas cursor
2114  *
2115  * @param ee The Ecore_Evas to unset the cursor.
2116  *
2117  * This function unsets the cursor from the Ecore_Evas, and returns the cursor
2118  * object. If the cursor was set from ecore_evas_cursor_set(), this function
2119  * returns the image. In this case, the image should be deleted when it is
2120  * no longer needed.
2121  *
2122  * @see ecore_evas_cursor_set()
2123  * @see ecore_evas_object_cursor_set()
2124  * @since 1.11
2125  */
2126 EAPI Evas_Object*        ecore_evas_cursor_unset(Ecore_Evas *ee);
2127
2128 /**
2129  * @brief Tell the WM whether or not to ignore an Ecore_Evas' window
2130  *
2131  * @param ee The Ecore_Evas.
2132  * @param on @c EINA_TRUE to ignore, @c EINA_FALSE to not.
2133  *
2134  * This function causes the window manager to ignore @p ee if @p on is
2135  * @c EINA_TRUE, or not ignore @p ee if @p on is @c EINA_FALSE.
2136  */
2137 EAPI void        ecore_evas_override_set(Ecore_Evas *ee, Eina_Bool on);
2138
2139 /**
2140  * @brief Query whether an Ecore_Evas' window is overridden or not
2141  *
2142  * @param ee The Ecore_Evas to set.
2143  * @return @c EINA_TRUE if @p ee is overridden, @c EINA_FALSE if not.
2144  */
2145 EAPI Eina_Bool   ecore_evas_override_get(const Ecore_Evas *ee);
2146
2147 /**
2148  * @brief Set whether or not an Ecore_Evas' window should avoid damage
2149  *
2150  * @param ee The Ecore_Evas
2151  * @param on The type of the damage management
2152  *
2153  * This option causes updates of the Ecore_Evas to be done on a pixmap, and
2154  * then copied to the window, or the pixmap used directly on the window,
2155  * depending on the setting. Possible options are:
2156  *
2157  * @li @ref ECORE_EVAS_AVOID_DAMAGE_NONE - every expose event triggers a new
2158  * damage and consequently render of the affected area. The rendering of things
2159  * happens directly on the window;
2160  *
2161  * @li @ref ECORE_EVAS_AVOID_DAMAGE_EXPOSE - there's a pixmap where everything
2162  * is rendered into, and then copied to the window. On expose events, there's
2163  * no need to render things again, just to copy the exposed region to the
2164  * window;
2165  *
2166  * @li @ref ECORE_EVAS_AVOID_DAMAGE_BUILT_IN - there's the same pixmap as the
2167  * previous one, but it is set as a "background pixmap" of the window.  The
2168  * rendered things appear directly on the window, with no need to copy
2169  * anything, but would stay stored on the pixmap, so there's no need to render
2170  * things again on expose events. This option can be faster than the previous
2171  * one, but may lead to artifacts during resize of the window.
2172  */
2173 EAPI void        ecore_evas_avoid_damage_set(Ecore_Evas *ee, Ecore_Evas_Avoid_Damage_Type on);
2174
2175 /**
2176  * @brief Query whether an Ecore_Evas' window avoids damage or not
2177  * @param ee The Ecore_Evas to set
2178  * @return The type of the damage management
2179  *
2180  */
2181 EAPI Ecore_Evas_Avoid_Damage_Type ecore_evas_avoid_damage_get(const Ecore_Evas *ee);
2182
2183 /**
2184  * @brief Set the withdrawn state of an Ecore_Evas' window.
2185  * @param ee The Ecore_Evas whose window's withdrawn state is set.
2186  * @param withdrawn The Ecore_Evas window's new withdrawn state.
2187  *
2188  */
2189 EAPI void        ecore_evas_withdrawn_set(Ecore_Evas *ee, Eina_Bool withdrawn);
2190
2191 /**
2192  * @brief Return the withdrawn state of an Ecore_Evas' window.
2193  * @param ee The Ecore_Evas whose window's withdrawn state is returned.
2194  * @return The Ecore_Evas window's withdrawn state.
2195  *
2196  */
2197 EAPI Eina_Bool   ecore_evas_withdrawn_get(const Ecore_Evas *ee);
2198
2199 /**
2200  * @brief Set the sticky state of an Ecore_Evas window.
2201  *
2202  * @param ee The Ecore_Evas whose window's sticky state is set.
2203  * @param sticky The Ecore_Evas window's new sticky state.
2204  *
2205  */
2206 EAPI void        ecore_evas_sticky_set(Ecore_Evas *ee, Eina_Bool sticky);
2207
2208 /**
2209  * @brief Return the sticky state of an Ecore_Evas' window.
2210  *
2211  * @param ee The Ecore_Evas whose window's sticky state is returned.
2212  * @return The Ecore_Evas window's sticky state.
2213  *
2214  */
2215 EAPI Eina_Bool   ecore_evas_sticky_get(const Ecore_Evas *ee);
2216
2217 /**
2218  * @brief Enable/disable manual render
2219  *
2220  * @param ee An @c Ecore_Evas handle
2221  * @param manual_render Enable/disable manual render. @c EINA_TRUE to enable
2222  * manual render, @c EINA_FALSE to disable manual render. @c EINA_FALSE by
2223  * default
2224  *
2225  * If @p manual_render is true, default ecore_evas render routine would be
2226  * disabled and rendering will be done only manually. If @p manual_render is
2227  * false, rendering will be done by default ecore_evas rendering routine, but
2228  * still manual rendering is available. Call ecore_evas_manual_render() to
2229  * force immediate render.
2230  *
2231  * @see ecore_evas_manual_render_get()
2232  * @see ecore_evas_manual_render()
2233  */
2234 EAPI void        ecore_evas_manual_render_set(Ecore_Evas *ee, Eina_Bool manual_render);
2235
2236 /**
2237  * @brief Get enable/disable status of manual render
2238  *
2239  * @param ee An @c Ecore_Evas handle
2240  * @return @c EINA_TRUE if manual render is enabled, @c EINA_FALSE if manual
2241  * render is disabled
2242  *
2243  * @see ecore_evas_manual_render_set()
2244  * @see ecore_evas_manual_render()
2245  */
2246 EAPI Eina_Bool   ecore_evas_manual_render_get(const Ecore_Evas *ee);
2247
2248 /**
2249  * @brief Register an @c Ecore_Evas to receive events through ecore_input_evas.
2250  *
2251  * @param ee The @c Ecore_Evas handle.
2252  *
2253  * This function calls ecore_event_window_register() with the @p ee as its @c
2254  * id argument, @c window argument, and uses its @c Evas too. It is useful when
2255  * no @c window information is available on a given @c Ecore_Evas backend.
2256  *
2257  * @see ecore_evas_input_event_unregister()
2258  * @since 1.1
2259  */
2260 EAPI void        ecore_evas_input_event_register(Ecore_Evas *ee);
2261 /**
2262  * @brief Unregister an @c Ecore_Evas receiving events through ecore_input_evas.
2263  *
2264  * @param ee The @c Ecore_Evas handle.
2265  *
2266  * @see ecore_evas_input_event_register()
2267  * @since 1.1
2268  */
2269 EAPI void        ecore_evas_input_event_unregister(Ecore_Evas *ee);
2270
2271 /**
2272  * @brief Force immediate rendering on a given @c Ecore_Evas window
2273  *
2274  * @param ee An @c Ecore_Evas handle
2275  *
2276  * Use this call to forcefully flush the @p ee's canvas rendering
2277  * pipeline, thus bring its window to an up to date state.
2278  */
2279 EAPI void        ecore_evas_manual_render(Ecore_Evas *ee);
2280 EAPI void        ecore_evas_comp_sync_set(Ecore_Evas *ee, Eina_Bool do_sync);
2281 EAPI Eina_Bool   ecore_evas_comp_sync_get(const Ecore_Evas *ee);
2282
2283 /**
2284  * @brief Get geometry of screen associated with this Ecore_Evas.
2285  *
2286  * @param ee The Ecore_Evas whose window's to query container screen geometry.
2287  * @param x where to return the horizontal offset value. May be @c NULL.
2288  * @param y where to return the vertical offset value. May be @c NULL.
2289  * @param w where to return the width value. May be @c NULL.
2290  * @param h where to return the height value. May be @c NULL.
2291  *
2292  * @since 1.1
2293  */
2294 EAPI void        ecore_evas_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
2295
2296 /**
2297  * @brief Get the dpi of the screen the Ecore_Evas is primarily on.
2298  *
2299  * @param ee The Ecore_Evas whose window's to query.
2300  * @param xdpi Pointer to integer to store horizontal DPI. May be @c NULL.
2301  * @param ydpi Pointer to integer to store vertical DPI. May be @c NULL.
2302  *
2303  * @since 1.7
2304  */
2305 EAPI void        ecore_evas_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi);
2306
2307 EAPI void        ecore_evas_draw_frame_set(Ecore_Evas *ee, Eina_Bool draw_frame) EINA_DEPRECATED;
2308 EAPI Eina_Bool   ecore_evas_draw_frame_get(const Ecore_Evas *ee) EINA_DEPRECATED;
2309
2310 /**
2311  * @brief Associate the given object to this ecore evas.
2312  *
2313  * @param ee The Ecore_Evas to associate to @a obj
2314  * @param obj The object to associate to @a ee
2315  * @param flags The association flags.
2316  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
2317  *
2318  * Association means that operations on one will affect the other, for
2319  * example moving the object will move the window, resize the object will
2320  * also affect the ecore evas window, hide and show applies as well.
2321  *
2322  * This is meant to simplify development, since you often need to associate
2323  * these events with your "base" objects, background or bottom-most object.
2324  *
2325  * Be aware that some methods might not be what you would like, deleting
2326  * either the window or the object will delete the other. If you want to
2327  * change that behavior, let's say to hide window when it's closed, you
2328  * must use ecore_evas_callback_delete_request_set() and set your own code,
2329  * like ecore_evas_hide(). Just remember that if you override delete_request
2330  * and still want to delete the window/object, you must do that yourself.
2331  *
2332  * Since we now define delete_request, deleting windows will not quit
2333  * main loop, if you wish to do so, you should listen for EVAS_CALLBACK_FREE
2334  * on the object, that way you get notified and you can call
2335  * ecore_main_loop_quit().
2336  *
2337  * Flags can be OR'ed of:
2338  * @li ECORE_EVAS_OBJECT_ASSOCIATE_BASE (or 0): to listen to basic events
2339  *     like delete, resize and move, but no stacking or layer are used.
2340  * @li ECORE_EVAS_OBJECT_ASSOCIATE_STACK: stacking operations will act
2341  *     on the Ecore_Evas, not the object. So evas_object_raise() will
2342  *     call ecore_evas_raise(). Relative operations (stack_above, stack_below)
2343  *     are still not implemented.
2344  * @li ECORE_EVAS_OBJECT_ASSOCIATE_LAYER: stacking operations will act
2345  *     on the Ecore_Evas, not the object. So evas_object_layer_set() will
2346  *     call ecore_evas_layer_set().
2347  * @li ECORE_EVAS_OBJECT_ASSOCIATE_DEL: the object delete will delete the
2348  *     ecore_evas as well as delete_requests on the ecore_evas will delete
2349  *     etc.
2350  */
2351 EAPI Eina_Bool    ecore_evas_object_associate(Ecore_Evas *ee, Evas_Object *obj, Ecore_Evas_Object_Associate_Flags flags);
2352 /**
2353  * @brief Cancel the association set with ecore_evas_object_associate().
2354  *
2355  * @param ee The Ecore_Evas to dissociate from @a obj
2356  * @param obj The object to dissociate from @a ee
2357  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
2358  */
2359 EAPI Eina_Bool    ecore_evas_object_dissociate(Ecore_Evas *ee, Evas_Object *obj);
2360 /**
2361  * @brief Get the object associated with @p ee
2362  *
2363  * @param ee The Ecore_Evas to get the object from.
2364  * @return The associated object, or @c NULL if there is no associated object.
2365  */
2366 EAPI Evas_Object *ecore_evas_object_associate_get(const Ecore_Evas *ee);
2367
2368 /* helper function to be used with ECORE_GETOPT_CALLBACK_*() */
2369 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);
2370
2371 /**
2372  * @brief Get a list of all the ecore_evases.
2373  *
2374  * @return A list of ecore_evases.
2375  *
2376  * The returned list of ecore evases is only valid until the canvases are
2377  * destroyed (and should not be cached for instance). The list can be freed by
2378  * just deleting the list.
2379  */
2380 EAPI Eina_List   *ecore_evas_ecore_evas_list_get(void);
2381 /**
2382  * @brief Get a list of all the sub ecore_evases.
2383  *
2384  * @param ee Ecore_Evas to get the list from.
2385  * @return A list of sub ecore_evases, or @c NULL if there is no sub ecore_evases.
2386  */
2387 EAPI Eina_List   *ecore_evas_sub_ecore_evas_list_get(const Ecore_Evas *ee);
2388
2389 /* specific calls to an x11 environment ecore_evas */
2390 EAPI void           ecore_evas_x11_leader_set(Ecore_Evas *ee, Ecore_X_Window win);
2391 EAPI Ecore_X_Window ecore_evas_x11_leader_get(Ecore_Evas *ee);
2392 EAPI void           ecore_evas_x11_leader_default_set(Ecore_Evas *ee);
2393 EAPI void           ecore_evas_x11_shape_input_rectangle_set(Ecore_Evas *ee, int x, int y, int w, int h);
2394 EAPI void           ecore_evas_x11_shape_input_rectangle_add(Ecore_Evas *ee, int x, int y, int w, int h);
2395 EAPI void           ecore_evas_x11_shape_input_rectangle_subtract(Ecore_Evas *ee, int x, int y, int w, int h);
2396 EAPI void           ecore_evas_x11_shape_input_empty(Ecore_Evas *ee);
2397 EAPI void           ecore_evas_x11_shape_input_reset(Ecore_Evas *ee);
2398 EAPI void           ecore_evas_x11_shape_input_apply(Ecore_Evas *ee);
2399
2400 /**
2401  * @brief A callback used to accept a new client.
2402  * @param data The callback data
2403  * @param ee The Ecore_Evas
2404  * @param client_host The address of the new client.
2405  * @return @c EINA_TRUE to accep the client, @c EINA_FALSE otherwise.
2406  * @see ecore_evas_vnc_start()
2407  * @since 1.19
2408  */
2409 typedef Eina_Bool (*Ecore_Evas_Vnc_Client_Accept_Cb)(void *data, Ecore_Evas *ee, const char *client_host);
2410
2411 /**
2412  * @brief Starts a VNC server.
2413  *
2414  * @param ee The Ecore_Evas to start the VNC server
2415  * @param addr The address that will be used to bind the VNC server. Use @c NULL to bind to any interface.
2416  * @param port The port number to start the VNC server. Use @c -1 to set the default VNC port (5900)
2417  * @param cb A callback used to accept a new client. If @c NULL all clients will be accepted.
2418  * @param data Data to @a cb
2419  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
2420  * @see ecore_evas_vnc_stop()
2421  * @see Ecore_Evas_Vnc_Client_Accept_Cb()
2422  * @since 1.19
2423  */
2424 EAPI Eina_Bool      ecore_evas_vnc_start(Ecore_Evas *ee, const char *addr, int port, Ecore_Evas_Vnc_Client_Accept_Cb cb, void *data);
2425
2426 /**
2427  * @brief Stop a running VNC server
2428  *
2429  * @param ee Ecore_Evas to stop the VNC server
2430  * @return @c EINA_TRUE if the VNC server was stopped, @c EINA_FALSE otherwise.
2431  * @see ecore_evas_vnc_start()
2432  * @since 1.19
2433  */
2434 EAPI Eina_Bool      ecore_evas_vnc_stop(Ecore_Evas *ee);
2435
2436 /**
2437  * @defgroup Ecore_Evas_Ews Ecore_Evas Single Process Windowing System.
2438  * @ingroup Ecore_Evas_Group
2439  *
2440  * These are global scope functions to manage the EWS to be used by
2441  * ecore_evas_ews_new().
2442  *
2443  * @since 1.1
2444  * @{
2445  */
2446
2447 /**
2448  * @brief Set the engine to be used by the backing store engine.
2449  *
2450  * @param engine The engine to be set.
2451  * @param options The options of the engine to be set.
2452  * @return @c EINA_TRUE on success, @c EINA_FALSE if ews is already in use.
2453  * @since 1.1
2454  */
2455 EAPI Eina_Bool ecore_evas_ews_engine_set(const char *engine, const char *options);
2456
2457 /**
2458  * @brief Reconfigure the backing store used.
2459  *
2460  * @param x The X coordinate to be used.
2461  * @param y The Y coordinate to be used.
2462  * @param w The width of the Ecore_Evas to setup.
2463  * @param h The height of the Ecore_Evas to setup.
2464  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
2465  * @since 1.1
2466  */
2467 EAPI Eina_Bool ecore_evas_ews_setup(int x, int y, int w, int h);
2468
2469 /**
2470  * @brief Return the internal backing store in use.
2471  *
2472  * @return The internal backing store in use.
2473  * @note this will forced it to be created, making future calls to
2474  * ecore_evas_ews_engine_set() void.
2475  *
2476  * @see ecore_evas_ews_evas_get()
2477  * @since 1.1
2478  */
2479 EAPI Ecore_Evas *ecore_evas_ews_ecore_evas_get(void);
2480
2481 /**
2482  * @brief Return the internal backing store in use.
2483  *
2484  * @return The internal backing store in use.
2485  * @note this will forced it to be created, making future calls to
2486  * ecore_evas_ews_engine_set() void.
2487  *
2488  * @see ecore_evas_ews_ecore_evas_get()
2489  * @since 1.1
2490  */
2491 EAPI Evas *ecore_evas_ews_evas_get(void);
2492
2493 /**
2494  * @brief Get the current background.
2495  */
2496 EAPI Evas_Object *ecore_evas_ews_background_get(void);
2497
2498 /**
2499  * @brief Set the current background, must be created at evas ecore_evas_ews_evas_get()
2500  *
2501  * It will be kept at lowest layer (EVAS_LAYER_MIN) and below
2502  * everything else. You can set any object, default is a black
2503  * rectangle.
2504  *
2505  * @note previous object will be deleted!
2506  * @param o The Evas_Object for which to set the background.
2507  */
2508 EAPI void ecore_evas_ews_background_set(Evas_Object *o);
2509
2510 /**
2511  * @brief Return all Ecore_Evas* created by EWS.
2512  *
2513  * @return An eina list of Ecore_evases.
2514  e @note Do not change the returned list or its contents.
2515  * @since 1.1
2516  */
2517 EAPI const Eina_List *ecore_evas_ews_children_get(void);
2518
2519 /**
2520  * @brief Set the identifier of the manager taking care of internal windows.
2521  *
2522  * The ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE event is issued. Consider
2523  * handling it to know if you should stop handling events yourself
2524  * (ie: another manager took over)
2525  *
2526  * @param manager any unique identifier address.
2527  *
2528  * @see ecore_evas_ews_manager_get()
2529  * @since 1.1
2530  */
2531 EAPI void        ecore_evas_ews_manager_set(const void *manager);
2532
2533 /**
2534  * @brief Get the identifier of the manager taking care of internal windows.
2535  *
2536  * @return the value set by ecore_evas_ews_manager_set()
2537  * @since 1.1
2538  */
2539 EAPI const void *ecore_evas_ews_manager_get(void);
2540
2541 EAPI extern int ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE; /**< manager was changed @since 1.1 */
2542 EAPI extern int ECORE_EVAS_EWS_EVENT_ADD; /**< window was created @since 1.1 */
2543 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 */
2544 EAPI extern int ECORE_EVAS_EWS_EVENT_RESIZE; /**< window was resized @since 1.1 */
2545 EAPI extern int ECORE_EVAS_EWS_EVENT_MOVE; /**< window was moved @since 1.1 */
2546 EAPI extern int ECORE_EVAS_EWS_EVENT_SHOW; /**< window become visible @since 1.1 */
2547 EAPI extern int ECORE_EVAS_EWS_EVENT_HIDE; /**< window become hidden @since 1.1 */
2548 EAPI extern int ECORE_EVAS_EWS_EVENT_FOCUS; /**< window was focused @since 1.1 */
2549 EAPI extern int ECORE_EVAS_EWS_EVENT_UNFOCUS; /**< window lost focus @since 1.1 */
2550 EAPI extern int ECORE_EVAS_EWS_EVENT_RAISE; /**< window was raised @since 1.1 */
2551 EAPI extern int ECORE_EVAS_EWS_EVENT_LOWER; /**< window was lowered @since 1.1 */
2552 EAPI extern int ECORE_EVAS_EWS_EVENT_ACTIVATE; /**< window was activated @since 1.1 */
2553
2554 EAPI extern int ECORE_EVAS_EWS_EVENT_ICONIFIED_CHANGE; /**< window minimized/iconified changed @since 1.1 */
2555 EAPI extern int ECORE_EVAS_EWS_EVENT_MAXIMIZED_CHANGE; /**< window maximized changed @since 1.1 */
2556 EAPI extern int ECORE_EVAS_EWS_EVENT_LAYER_CHANGE; /**< window layer changed @since 1.1 */
2557 EAPI extern int ECORE_EVAS_EWS_EVENT_FULLSCREEN_CHANGE; /**< window fullscreen changed @since 1.1 */
2558 EAPI extern int ECORE_EVAS_EWS_EVENT_CONFIG_CHANGE; /**< some other window property changed (title, name, class, alpha, transparent, shaped...) @since 1.1 */
2559
2560 /**
2561  * @}
2562  */
2563
2564 /**
2565  * @defgroup Ecore_Evas_Extn External plug/socket infrastructure to remote canvases
2566  * @ingroup Ecore_Evas_Group
2567  *
2568  * These functions allow 1 process to create a "socket" was pluged into which another
2569  * process can create a "plug" remotely to plug into.
2570  * Socket can provides content for several plugs.
2571  * This is best for small sized objects (about the size range
2572  * of a small icon up to a few large icons). Sine the plug is actually an
2573  * image object, you can fetch the pixel data
2574  *
2575  * @since 1.2
2576  * @{
2577  */
2578
2579 EAPI extern int ECORE_EVAS_EXTN_CLIENT_ADD; /**< this event is received when a plug has connected to an extn socket @since 1.2 */
2580 EAPI extern int ECORE_EVAS_EXTN_CLIENT_DEL; /**< this event is received when a plug has disconnected from an extn socket @since 1.2 */
2581
2582 /**
2583  * @brief Create a new Ecore_Evas canvas for the new external ecore evas socket
2584  *
2585  * @param w The width of the canvas, in pixels
2586  * @param h The height of the canvas, in pixels
2587  * @return A new @c Ecore_Evas instance or @c NULL, on failure
2588  *
2589  * This creates a new extn_socket canvas wrapper, with image data array
2590  * @b bound to the ARGB format, 8 bits per pixel.
2591  *
2592  * If creation is successful, an Ecore_Evas handle is returned or @c NULL if
2593  * creation fails. Also focus, show, hide etc. callbacks will also be called
2594  * if the plug object is shown, or already visible on connect, or if it is
2595  * hidden later, focused or unfocused.
2596  *
2597  * This function has to be flowed by ecore_evas_extn_socket_listen(),
2598  * for starting ecore ipc service.
2599  *
2600  * @code
2601  * Eina_Bool res = EINA_FALSE;
2602  * Ecore_Evas *ee = ecore_evas_extn_socket_new(1, 1);
2603  *
2604  * res = ecore_evas_extn_socket_listen("svcname", 1, EINA_FALSE);
2605  * if (!res) return;
2606  * ecore_evas_resize(ee, 240, 400);
2607  * @endcode
2608  *
2609  * or
2610  *
2611  * @code
2612  * Eina_Bool res = EINA_FALSE;
2613  * Ecore_Evas *ee = ecore_evas_extn_socket_new(240, 400);
2614  *
2615  * res = ecore_evas_extn_socket_listen("svcname", 1, EINA_FALSE);
2616  * if (!res) return;
2617  * @endcode
2618  *
2619  * When a client(plug) connects, you will get the ECORE_EVAS_EXTN_CLIENT_ADD event
2620  * in the ecore event queue, with event_info being the image object pointer
2621  * passed as a void pointer. When a client disconnects you will get the
2622  * ECORE_EVAS_EXTN_CLIENT_DEL event.
2623  *
2624  * You can set up event handles for these events as follows:
2625  *
2626  * @code
2627  * static Eina_Bool client_add_cb(void *data, int event, void *event_info)
2628  * {
2629  *    Ecore_Evas *ee = event_info;
2630  *    printf("client is connected to external socket %p\n", ee);
2631  *    return ECORE_CALLBACK_PASS_ON;
2632  * }
2633  *
2634  * static Eina_Bool client_del_cb(void *data, int event, void *event_info)
2635  * {
2636  *    Ecore_Evas *ee = event_info;
2637  *    printf("client is disconnected from external socket %p\n", ee);
2638  *    return ECORE_CALLBACK_PASS_ON;
2639  * }
2640  *
2641  * void setup(void)
2642  * {
2643  *    ecore_event_handler_add(ECORE_EVAS_EXTN_CLIENT_ADD,
2644  *                           client_add_cb, NULL);
2645  *    ecore_event_handler_add(ECORE_EVAS_EXTN_CLIENT_DEL,
2646  *                           client_del_cb, NULL);
2647  * }
2648  * @endcode
2649  *
2650  * Note that events come in later after the event happened. You may want to be
2651  * careful as data structures you had associated with the image object
2652  * may have been freed after deleting, but the object may still be around
2653  * awating cleanup and thus still be valid.You can change the size with something like:
2654  *
2655  * @see ecore_evas_extn_socket_listen()
2656  * @see ecore_evas_extn_plug_new()
2657  * @see ecore_evas_extn_plug_object_data_lock()
2658  * @see ecore_evas_extn_plug_object_data_unlock()
2659  *
2660  * @since 1.2
2661  */
2662 EAPI Ecore_Evas *ecore_evas_extn_socket_new(int w, int h);
2663
2664 /**
2665  * @brief Create a socket to provide the service for external ecore evas
2666  * socket.
2667  *
2668  * @param ee The Ecore_Evas.
2669  * @param svcname The name of the service to be advertised. ensure that it is
2670  * unique (when combined with @p svcnum) otherwise creation may fail.
2671  * @param svcnum A number (any value, @c 0 being the common default) to
2672  * differentiate multiple instances of services with the same name.
2673  * @param svcsys A boolean that if true, specifies to create a system-wide
2674  * service all users can connect to, otherwise the service is private to the
2675  * user ide that created the service.
2676  * @return @c EINA_TRUE if creation is successful, @c EINA_FALSE if it does
2677  * not.
2678  *
2679  * This creates socket specified by @p svcname, @p svcnum and @p svcsys. If
2680  * creation is successful, @c EINA_TRUE is returned or @c EINA_FALSE if
2681  * creation fails.
2682  *
2683  * @see ecore_evas_extn_socket_new()
2684  * @see ecore_evas_extn_plug_new()
2685  * @see ecore_evas_extn_plug_object_data_lock()
2686  * @see ecore_evas_extn_plug_object_data_unlock()
2687  *
2688  * @since 1.2
2689  */
2690 EAPI Eina_Bool ecore_evas_extn_socket_listen(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
2691
2692 /**
2693  * @brief Set the blocking about mouse events to Ecore Evas.
2694  *
2695  * @param ee The Ecore_Evas.
2696  * @param events_block The blocking about mouse events.
2697  *
2698  * @see ecore_evas_extn_socket_events_block_get()
2699  *
2700  * @since 1.15
2701  */
2702 EAPI void ecore_evas_extn_socket_events_block_set(Ecore_Evas *ee, Eina_Bool events_block);
2703
2704 /**
2705  * @brief Get the blocking about mouse events to Ecore Evas.
2706  *
2707  * @param ee The Ecore_Evas.
2708
2709  * @return The blocking about mouse events.
2710  *
2711  * @see ecore_evas_extn_socket_events_block_set()
2712  *
2713  * @since 1.15
2714  */
2715 EAPI Eina_Bool ecore_evas_extn_socket_events_block_get(Ecore_Evas *ee);
2716
2717 /**
2718  * @brief Lock the pixel data so the socket cannot change it
2719  *
2720  * @param obj The image object returned by ecore_evas_extn_plug_new() to lock
2721  *
2722  * You may need to get the image pixel data with evas_object_image_data_get()
2723  * from the image object, but need to ensure that it does not change while
2724  * you are using the data. This function lets you set an advisory lock on the
2725  * image data so the external plug process will not render to it or alter it.
2726  *
2727  * You should only hold the lock for just as long as you need to read out the
2728  * image data or otherwise deal with it, and then unlock it with
2729  * ecore_evas_extn_plug_object_data_unlock(). Keeping a lock over more than
2730  * 1 iteration of the main ecore loop will be problematic, so avoid it. Also
2731  * forgetting to unlock may cause the socket process to freeze and thus create
2732  * odd behavior.
2733  *
2734  * @see ecore_evas_extn_plug_new()
2735  * @see ecore_evas_extn_plug_object_data_unlock()
2736  *
2737  * @since 1.2
2738  */
2739 EAPI void ecore_evas_extn_plug_object_data_lock(Evas_Object *obj);
2740
2741 /**
2742  * @brief Unlock the pixel data so the socket can change it again.
2743  *
2744  * @param obj The image object returned by ecore_evas_extn_plug_new() to unlock
2745  *
2746  * This unlocks after an advisor lock has been taken by
2747  * ecore_evas_extn_plug_object_data_lock().
2748  *
2749  * @see ecore_evas_extn_plug_new()
2750  * @see ecore_evas_extn_plug_object_data_lock()
2751  *
2752  * @since 1.2
2753  */
2754 EAPI void ecore_evas_extn_plug_object_data_unlock(Evas_Object *obj);
2755
2756 /**
2757  * @brief Create a new external ecore evas plug
2758  *
2759  * @param ee_target The Ecore_Evas containing the canvas in which the new image object will live.
2760  * @return An evas image object that will contain the image output of a socket.
2761  *
2762  * This creates an image object that will contain the output of another
2763  * processes socket canvas when it connects. All input will be sent back to
2764  * this process as well, effectively swallowing or placing the socket process
2765  * in the canvas of the plug process in place of the image object. The image
2766  * object by default is created to be filled (equivalent of
2767  * evas_object_image_filled_add() on creation) so image content will scale
2768  * to fill the image unless otherwise reconfigured. The Ecore_Evas size
2769  * of the plug is the master size and determines size in pixels of the
2770  * plug canvas. You can change the size with something like:
2771  *
2772  * @code
2773  * Eina_Bool res = EINA_FALSE;
2774  * Evas_Object *obj = ecore_evas_extn_plug_new(ee);
2775  *
2776  * res = ecore_evas_extn_plug_connect("svcname", 1, EINA_FALSE);
2777  * if (!res) return;
2778  * ecore_evas_resize(ee, 240, 400);
2779  * @endcode
2780  *
2781  * @see ecore_evas_extn_socket_new()
2782  * @see ecore_evas_extn_plug_connect()
2783  * @since 1.2
2784  */
2785 EAPI Evas_Object *ecore_evas_extn_plug_new(Ecore_Evas *ee_target);
2786
2787 /**
2788  * @brief Connect an external ecore evas plug to service provided by external
2789  * ecore evas socket.
2790  *
2791  * @param obj The Ecore_Evas containing the canvas in which the new image
2792  * object will live.
2793  * @param svcname The service name to connect to set up by the socket.
2794  * @param svcnum The service number to connect to (set up by socket).
2795  * @param svcsys Boolean to set if the service is a system one or not (set up
2796  * by socket).
2797  * @return @c EINA_TRUE if creation is successful, @c EINA_FALSE if it does
2798  * not.
2799  *
2800  * @see ecore_evas_extn_plug_new()
2801  *
2802  * @since 1.2
2803  */
2804 EAPI Eina_Bool ecore_evas_extn_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys);
2805
2806 /**
2807  * @brief Retrieve the coordinates of the mouse pointer
2808  *
2809  * @param ee The Ecore_Evas containing the pointer
2810  * @param x Pointer to integer to store horizontal coordinate. May be @c NULL.
2811  * @param y Pointer to integer to store vertical coordinate. May be @c NULL.
2812  *
2813  * @since 1.8
2814  */
2815 EAPI void ecore_evas_pointer_xy_get(const Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y);
2816
2817 /**
2818  * @brief Set the coordinates of the mouse pointer
2819  *
2820  * @param ee The Ecore_Evas containing the pointer
2821  * @param x The horizontal coordinate to move the pointer to
2822  * @param y The vertical coordinate to move the pointer to
2823  *
2824  * @return @c EINA_TRUE on success, EINA_FALSE on failure.
2825  *
2826  * @since 1.8
2827  */
2828 EAPI Eina_Bool ecore_evas_pointer_warp(const Ecore_Evas *ee, Evas_Coord x, Evas_Coord y);
2829
2830 /**
2831  * @brief Retrieve the Visual used for pixmap creation
2832  *
2833  * @param ee The Ecore_Evas containing the pixmap
2834  *
2835  * @return The Visual which was used when creating the pixmap
2836  *
2837  * @warning If and when this function is called depends on the underlying
2838  * windowing system. This function should only be called if the Ecore_Evas was
2839  * created using @c ecore_evas_software_x11_pixmap_new or @c ecore_evas_gl_x11_pixmap_new
2840  *
2841  * @since 1.8
2842  */
2843 EAPI void *ecore_evas_pixmap_visual_get(const Ecore_Evas *ee);
2844
2845 /**
2846  * @brief Retrieve the Colormap used for pixmap creation
2847  *
2848  * @param ee The Ecore_Evas containing the pixmap
2849  *
2850  * @return The Colormap which was used when creating the pixmap
2851  *
2852  * @warning If and when this function is called depends on the underlying
2853  * windowing system. This function should only be called if the Ecore_Evas was
2854  * created using @c ecore_evas_software_x11_pixmap_new or @c ecore_evas_gl_x11_pixmap_new
2855  *
2856  * @since 1.8
2857  */
2858 EAPI unsigned long ecore_evas_pixmap_colormap_get(const Ecore_Evas *ee);
2859
2860 /**
2861  * @brief Retrieve the depth used for pixmap creation
2862  *
2863  * @param ee The Ecore_Evas containing the pixmap
2864  *
2865  * @return The depth which was used when creating the pixmap
2866  *
2867  * @warning If and when this function is called depends on the underlying
2868  * windowing system. This function should only be called if the Ecore_Evas was
2869  * created using @c ecore_evas_software_x11_pixmap_new or @c ecore_evas_gl_x11_pixmap_new
2870  *
2871  * @since 1.8
2872  */
2873 EAPI int ecore_evas_pixmap_depth_get(const Ecore_Evas *ee);
2874
2875 /**
2876  * @}
2877  */
2878
2879 /**
2880  * @}
2881  */
2882
2883 #ifdef __cplusplus
2884 }
2885 #endif
2886
2887 #undef EAPI
2888 #define EAPI
2889
2890 #endif