compile again... and add docs and @sinces etc. :)
[framework/uifw/ecore.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_Getopt.h>
6 #include <Ecore_Input.h>
7
8 #ifdef EAPI
9 # undef EAPI
10 #endif
11
12 #ifdef _WIN32
13 # ifdef EFL_ECORE_EVAS_BUILD
14 #  ifdef DLL_EXPORT
15 #   define EAPI __declspec(dllexport)
16 #  else
17 #   define EAPI
18 #  endif /* ! DLL_EXPORT */
19 # else
20 #  define EAPI __declspec(dllimport)
21 # endif /* ! EFL_ECORE_EVAS_BUILD */
22 #else
23 # ifdef __GNUC__
24 #  if __GNUC__ >= 4
25 #   define EAPI __attribute__ ((visibility("default")))
26 #  else
27 #   define EAPI
28 #  endif
29 # else
30 #  define EAPI
31 # endif
32 #endif /* ! _WIN32 */
33
34 /**
35  * @file Ecore_Evas.h
36  * @brief Evas wrapper functions
37  *
38  * The following is a list of example that partially exemplify Ecore_Evas's API:
39  * @li @ref ecore_evas_callbacks_example_c
40  * @li @ref ecore_evas_object_example_c
41  * @li @ref ecore_evas_basics_example_c
42  */
43
44 /* FIXME:
45  * to do soon:
46  * - iconfication api needs to work
47  * - maximization api needs to work
48  * - document all calls
49  *
50  * later:
51  * - buffer back-end that renders to an evas_image_object ???
52  * - qt back-end ???
53  * - dfb back-end ??? (dfb's threads make this REALLY HARD)
54  */
55
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59
60 /**
61  * @defgroup Ecore_Evas_Group Ecore_Evas wrapper/helper set of functions
62  *
63  * This is a list of examples of these functions:
64  * - @ref Ecore_Evas_Window_Sizes_Example_c
65  * - @ref Ecore_Evas_Buffer_Example_01_c
66  * - @ref Ecore_Evas_Buffer_Example_02_c
67  * @{
68  */
69
70 /* these are dummy and just tell u what API levels ecore_evas supports - not if
71  * the actual support is compiled in. you need to query for that separately.
72  */
73 #define HAVE_ECORE_EVAS_X 1
74 #define HAVE_ECORE_EVAS_FB 1
75 #define HAVE_ECORE_EVAS_X11_GL 1
76 #define HAVE_ECORE_EVAS_X11_16 1
77 #define HAVE_ECORE_EVAS_DIRECTFB 1
78 #define HAVE_ECORE_EVAS_WIN32 1
79 #define HAVE_ECORE_EVAS_COCOA 1
80 #define HAVE_ECORE_EVAS_SDL 1
81 #define HAVE_ECORE_EVAS_WINCE 1
82 #define HAVE_ECORE_EVAS_EWS 1
83 #define HAVE_ECORE_EVAS_PSL1GHT 1
84 #define HAVE_ECORE_EVAS_WAYLAND_SHM 1
85 #define HAVE_ECORE_EVAS_WAYLAND_EGL 1
86
87 typedef enum _Ecore_Evas_Engine_Type
88 {
89    ECORE_EVAS_ENGINE_SOFTWARE_BUFFER,
90    ECORE_EVAS_ENGINE_SOFTWARE_XLIB,
91    ECORE_EVAS_ENGINE_XRENDER_X11,
92    ECORE_EVAS_ENGINE_OPENGL_X11,
93    ECORE_EVAS_ENGINE_SOFTWARE_XCB,
94    ECORE_EVAS_ENGINE_XRENDER_XCB,
95    ECORE_EVAS_ENGINE_SOFTWARE_GDI,
96    ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
97    ECORE_EVAS_ENGINE_DIRECT3D,
98    ECORE_EVAS_ENGINE_OPENGL_GLEW,
99    ECORE_EVAS_ENGINE_OPENGL_COCOA,
100    ECORE_EVAS_ENGINE_SOFTWARE_SDL,
101    ECORE_EVAS_ENGINE_DIRECTFB,
102    ECORE_EVAS_ENGINE_SOFTWARE_FB,
103    ECORE_EVAS_ENGINE_SOFTWARE_8_X11,
104    ECORE_EVAS_ENGINE_SOFTWARE_16_X11,
105    ECORE_EVAS_ENGINE_SOFTWARE_16_DDRAW,
106    ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE,
107    ECORE_EVAS_ENGINE_OPENGL_SDL,
108    ECORE_EVAS_ENGINE_EWS,
109    ECORE_EVAS_ENGINE_PSL1GHT,
110    ECORE_EVAS_ENGINE_WAYLAND_SHM, 
111    ECORE_EVAS_ENGINE_WAYLAND_EGL
112 } Ecore_Evas_Engine_Type;
113
114 typedef enum _Ecore_Evas_Avoid_Damage_Type
115 {
116    ECORE_EVAS_AVOID_DAMAGE_NONE = 0,
117    ECORE_EVAS_AVOID_DAMAGE_EXPOSE = 1,
118    ECORE_EVAS_AVOID_DAMAGE_BUILT_IN = 2
119 } Ecore_Evas_Avoid_Damage_Type;
120
121 typedef enum _Ecore_Evas_Object_Associate_Flags
122 {
123   ECORE_EVAS_OBJECT_ASSOCIATE_BASE  = 0,
124   ECORE_EVAS_OBJECT_ASSOCIATE_STACK = 1 << 0,
125   ECORE_EVAS_OBJECT_ASSOCIATE_LAYER = 1 << 1,
126   ECORE_EVAS_OBJECT_ASSOCIATE_DEL = 1 << 2
127 } Ecore_Evas_Object_Associate_Flags;
128
129 #ifndef _ECORE_X_H
130 #define _ECORE_X_WINDOW_PREDEF
131 typedef unsigned int Ecore_X_Window;
132 #endif
133
134 #ifndef _ECORE_DIRECTFB_H
135 #define _ECORE_DIRECTFB_WINDOW_PREDEF
136 typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
137 #endif
138
139 #ifndef __ECORE_WIN32_H__
140 typedef struct _Ecore_Win32_Window Ecore_Win32_Window;
141 #endif
142
143 #ifndef __ECORE_WINCE_H__
144 typedef struct _Ecore_WinCE_Window Ecore_WinCE_Window;
145 #endif
146
147 #ifndef __ECORE_COCOA_H__
148 typedef struct _Ecore_Cocoa_Window Ecore_Cocoa_Window;
149 #endif
150
151 #ifndef _ECORE_EVAS_PRIVATE_H
152 /* basic data types */
153 typedef struct _Ecore_Evas Ecore_Evas;
154 typedef void   (*Ecore_Evas_Event_Cb) (Ecore_Evas *ee); /**< Callback used for several ecore evas events @since 1.2 */
155 #endif
156
157 /* module setup/shutdown calls */
158
159 EAPI int         ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine);
160
161 /**
162  * @brief Init the Ecore_Evas system.
163  *
164  * @return How many times the lib has been initialized, 0 indicates failure.
165  *
166  * Set up the Evas wrapper system. Init Evas and Ecore libraries.
167  *
168  * @see ecore_evas_shutdown()
169  */
170 EAPI int         ecore_evas_init(void);
171 /**
172  * @brief Shut down the Ecore_Evas system.
173  *
174  * @return 0 if ecore evas is fully shut down, or > 0 if it still being used.
175  *
176  * This closes the Evas wrapper system down. Shut down Evas and Ecore libraries.
177  *
178  * @see ecore_evas_init()
179  */
180 EAPI int         ecore_evas_shutdown(void);
181
182 EAPI void        ecore_evas_app_comp_sync_set(Eina_Bool do_sync);
183 EAPI Eina_Bool   ecore_evas_app_comp_sync_get(void);
184
185 /**
186  * @brief Returns a list of supported engines names.
187  *
188  * @return Newly allocated list with engines names. Engines names
189  * strings are internal and should be considered constants, do not
190  * free or modify them, to free the list use ecore_evas_engines_free().
191  */
192 EAPI Eina_List  *ecore_evas_engines_get(void);
193 /**
194  * @brief Free list returned by ecore_evas_engines_get()
195  */
196 EAPI void        ecore_evas_engines_free(Eina_List *engines);
197 /**
198  * @brief Creates a new Ecore_Evas based on engine name and common parameters.
199  *
200  * @param engine_name engine name as returned by
201  *        ecore_evas_engines_get() or NULL to use environment variable
202  *        ECORE_EVAS_ENGINE, that can be undefined and in this case
203  *        this call will try to find the first working engine.
204  * @param x horizontal position of window (not supported in all engines)
205  * @param y vertical position of window (not supported in all engines)
206  * @param w width of window
207  * @param h height of window
208  * @param extra_options string with extra parameter, dependent on engines
209  *        or NULL. String is usually in the form: 'key1=value1;key2=value2'.
210  *        Pay attention that when getting that from shell commands, most
211  *        consider ';' as the command terminator, so you need to escape
212  *        it or use quotes.
213  *
214  * @return Ecore_Evas instance or NULL if creation failed.
215  */
216 EAPI Ecore_Evas *ecore_evas_new(const char *engine_name, int x, int y, int w, int h, const char *extra_options);
217 /**
218  * @brief Set whether an Ecore_Evas has an alpha channel or not.
219  *
220  * @param ee The Ecore_Evas to shape
221  * @param alpha EINA_TRUE to enable the alpha channel, EINA_FALSE to disable it
222  *
223  * This function allows you to make an Ecore_Evas translucent using an
224  * alpha channel. See ecore_evas_shaped_set() for details. The difference
225  * between a shaped window and a window with an alpha channel is that an
226  * alpha channel supports multiple levels of transpararency, as opposed to
227  * the 1 bit transparency of a shaped window (a pixel is either opaque, or
228  * it's transparent).
229  *
230  * @warning Support for this depends on the underlying windowing system.
231  */
232 EAPI void        ecore_evas_alpha_set(Ecore_Evas *ee, Eina_Bool alpha);
233 /**
234  * @brief Query whether an Ecore_Evas has an alpha channel.
235  * @param ee The Ecore_Evas to query.
236  * @return EINA_TRUE if ee has an alpha channel, EINA_FALSE if it does not.
237  *
238  * This function returns EINA_TRUE if @p ee has an alpha channel, and EINA_FALSE
239  * if it does not.
240  *
241  * @see ecore_evas_alpha_set()
242  */
243 EAPI Eina_Bool   ecore_evas_alpha_get(const Ecore_Evas *ee);
244 /**
245  * @brief Set whether an Ecore_Evas has an transparent window or not.
246  *
247  * @param ee The Ecore_Evas to shape
248  * @param transparent EINA_TRUE to enable the transparent window, EINA_FALSE to
249  * disable it
250  *
251  * This function sets some translucency options, for more complete support see
252  * ecore_evas_alpha_set().
253  *
254  * @warning Support for this depends on the underlying windowing system.
255  *
256  * @see ecore_evas_alpha_set()
257  */
258 EAPI void        ecore_evas_transparent_set(Ecore_Evas *ee, Eina_Bool transparent);
259 /**
260  * @brief  Query whether an Ecore_Evas is transparent.
261  *
262  * @param ee The Ecore_Evas to query.
263  * @return EINA_TRUE if ee is transparent, EINA_FALSE if it isn't.
264  *
265  * @see ecore_evas_transparent_set()
266  */
267 EAPI Eina_Bool   ecore_evas_transparent_get(const Ecore_Evas *ee);
268 /**
269  * @brief  Get the geometry of an Ecore_Evas.
270  *
271  * @param ee The Ecore_Evas whose geometry y
272  * @param x A pointer to an int to place the x coordinate in
273  * @param y A pointer to an int to place the y coordinate in
274  * @param w A pointer to an int to place the w size in
275  * @param h A pointer to an int to place the h size in
276  *
277  * This function takes four pointers to (already allocated) ints, and places
278  * the geometry of @p ee in them. If any of the parameters is not desired you
279  * may pass NULL on them.
280  *
281  * @code
282  * int x, y, w, h;
283  * ecore_evas_geometry_get(ee, &x, &y, &w, &h);
284  * @endcode
285  *
286  * @see ecore_evas_new()
287  * @see ecore_evas_resize()
288  * @see ecore_evas_move()
289  * @see ecore_evas_move_resize()
290  */
291 EAPI void        ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
292 /**
293  * @brief  Get the geometry which an Ecore_Evas was latest recently requested.
294  *
295  * @param ee The Ecore_Evas whose geometry y
296  * @param x A pointer to an int to place the x coordinate in
297  * @param y A pointer to an int to place the y coordinate in
298  * @param w A pointer to an int to place the w size in
299  * @param h A pointer to an int to place the h size in
300  *
301  * This function takes four pointers to (already allocated) ints, and places
302  * the geometry which @p ee was latest recently requested . If any of the parameters is not desired you
303  * may pass NULL on them. 
304  * This function can represent recently requested geomety. 
305  * ecore_evas_geometry_get function returns the value is updated after engine finished request.
306  * By comparison, ecore_evas_request_geometry_get returns 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 EINA_TRUE for focus, EINA_FALSE to defocus.
321  *
322  * This function focuses @p ee if @p on is EINA_TRUE, or unfocuses @p ee if @p
323  * on is 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 EINA_TRUE if @p ee if focused, 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 EINA_TRUE to iconify, EINA_FALSE to uniconify.
342  *
343  * This function iconifies @p ee if @p on is EINA_TRUE, or uniconifies @p ee if
344  * @p on is EINA_FALSE.
345  *
346  * @note Iconify and minize are synonims.
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 EINA_TRUE if @p ee is iconified, EINA_FALSE if not.
356  *
357  * @note Iconify and minize are synonims.
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 EINA_TRUE for borderless, EINA_FALSE for bordered.
367  *
368  * This function makes @p ee borderless if @p on is EINA_TRUE, or bordered if @p
369  * on is 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 EINA_TRUE if @p ee is borderless, 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 EINA_TRUE fullscreen, EINA_FALSE not.
388  *
389  * This function causes @p ee to be fullscreen if @p on is EINA_TRUE,
390  * or not if @p on is 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 EINA_TRUE if @p ee is fullscreen, 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 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 Canavs 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_attention 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 Returns 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 EINA_TRUE to maximize, EINA_FALSE to unmaximize.
619  *
620  * This function maximizes @p ee if @p on is EINA_TRUE, or unmaximizes @p ee
621  * if @p on is 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 EINA_TRUE if @p ee is maximized, 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 Move an Ecore_Evas.
637  *
638  * @param ee The Ecore_Evas to move
639  * @param x The x coordinate to move to
640  * @param y The y coordinate to move to
641  *
642  * This moves @p ee to the screen coordinates (@p x, @p y)
643  *
644  * @warning Support for this depends on the underlying windowing system.
645  *
646  * @see ecore_evas_new()
647  * @see ecore_evas_resize()
648  * @see ecore_evas_move_resize()
649  */
650 EAPI void        ecore_evas_move(Ecore_Evas *ee, int x, int y);
651 /**
652  * @brief Resize an Ecore_Evas.
653  *
654  * @param ee The Ecore_Evas to move
655  * @param w The w coordinate to resize to
656  * @param h The h coordinate to resize to
657  *
658  * This resizes @p ee to @p w x @p h.
659  *
660  * @warning Support for this depends on the underlying windowing system.
661  *
662  * @see ecore_evas_new()
663  * @see ecore_evas_move()
664  * @see ecore_evas_move_resize()
665  */
666 EAPI void        ecore_evas_resize(Ecore_Evas *ee, int w, int h);
667 /**
668  * @brief Move and resize an Ecore_Evas
669  *
670  * @param ee The Ecore_Evas to move and resize
671  * @param x The x coordinate to move to
672  * @param y The y coordinate to move to
673  * @param w The w coordinate to resize to
674  * @param h The h coordinate to resize to
675  *
676  * This moves @p ee to the screen coordinates (@p x, @p y) and  resizes
677  * it to @p w x @p h.
678  *
679  * @warning Support for this depends on the underlying windowing system.
680  *
681  * @see ecore_evas_new()
682  * @see ecore_evas_move()
683  * @see ecore_evas_resize()
684  */
685 EAPI void        ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h);
686 /**
687  * @brief Set the rotation of an Ecore_Evas' window.
688  *
689  * @param ee The Ecore_Evas
690  * @param rot the angle (in degrees) of rotation.
691  *
692  * The allowed values of @p rot depend on the engine being used. Most only
693  * allow multiples of 90.
694  *
695  * @warning Support for this depends on the underlying windowing system.
696  *
697  * @see ecore_evas_rotation_with_resize_set()
698  */
699 EAPI void        ecore_evas_rotation_set(Ecore_Evas *ee, int rot);
700 /**
701  * @brief Set the rotation of an Ecore_Evas' window
702  *
703  * @param ee The Ecore_Evas
704  * @param rot the angle (in degrees) of rotation.
705  *
706  * Like ecore_evas_rotation_set(), but it also resizes the window's contents so
707  * that they fit inside the current window geometry.
708  *
709  * @warning Support for this depends on the underlying windowing system.
710  *
711  * @see ecore_evas_rotation_set()
712  */
713 EAPI void        ecore_evas_rotation_with_resize_set(Ecore_Evas *ee, int rot);
714 /**
715  * @brief Get the rotation of an Ecore_Evas' window
716  *
717  * @param ee The Ecore_Evas
718  * @return the angle (in degrees) of rotation.
719  *
720  * @see ecore_evas_rotation_set()
721  * @see ecore_evas_rotation_with_resize_set()
722  */
723 EAPI int         ecore_evas_rotation_get(const Ecore_Evas *ee);
724 /**
725  * @brief Raise an Ecore_Evas' window.
726  *
727  * @param ee The Ecore_Evas to raise.
728  *
729  * This functions raises the Ecore_Evas to the front.
730  *
731  * @warning Support for this depends on the underlying windowing system.
732  *
733  * @see ecore_evas_lower()
734  * @see ecore_evas_layer_set()
735  */
736 EAPI void        ecore_evas_raise(Ecore_Evas *ee);
737 /**
738  * @brief Lower an Ecore_Evas' window.
739  *
740  * @param ee The Ecore_Evas to raise.
741  *
742  * This functions lowers the Ecore_Evas to the back.
743  *
744  * @warning Support for this depends on the underlying windowing system.
745  *
746  * @see ecore_evas_raise()
747  * @see ecore_evas_layer_set()
748  */
749 EAPI void        ecore_evas_lower(Ecore_Evas *ee);
750 /**
751  * @brief Set the title of an Ecore_Evas' window.
752  *
753  * @param ee The Ecore_Evas whose title you wish to set.
754  * @param t The title
755  *
756  * This function sets the title of @p ee to @p t.
757  *
758  * @warning Support for this depends on the underlying windowing system.
759  */
760 EAPI void        ecore_evas_title_set(Ecore_Evas *ee, const char *t);
761 /**
762  * @brief Get the title of an Ecore_Evas' window.
763  *
764  * @param ee The Ecore_Evas whose title you wish to get.
765  * @return The title of @p ee.
766  *
767  * This function returns the title of @p ee.
768  *
769  * @see ecore_evas_title_set()
770  */
771 EAPI const char *ecore_evas_title_get(const Ecore_Evas *ee);
772 /**
773  * @brief Set the name and class of an Ecore_Evas' window.
774  *
775  * @param ee the Ecore_Evas
776  * @param n the name
777  * @param c the class
778  *
779  * This function sets the name of @p ee to @p n, and its class to @p c. The
780  * meaning of @p name and @p class depends on the underlying windowing system.
781  *
782  * @warning Support for this depends on the underlying windowing system.
783  */
784 EAPI void        ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, const char *c);
785 /**
786  * @brief Get the name and class of an Ecore_Evas' window
787  *
788  * @p ee The Ecore_Evas to query
789  * @p n A pointer to a string to place the name in.
790  * @p c A pointer to a string to place the class in.
791  *
792  * This function gets the name of @p ee into @p n, and its class into
793  * @p c.
794  *
795  * @see ecore_evas_name_class_set()
796  */
797 EAPI void        ecore_evas_name_class_get(const Ecore_Evas *ee, const char **n, const char **c);
798 /**
799  * @brief Returns a pointer to the underlying window.
800  *
801  * @param ee The Ecore_Evas whose window is desired.
802  *
803  * @warning Support for this depends on the underlying windowing system.
804  */
805 EAPI Ecore_Window ecore_evas_window_get(const Ecore_Evas *ee);
806
807
808 /* engine/target specific init calls */
809 EAPI Ecore_Evas     *ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
810 EAPI Ecore_X_Window  ecore_evas_software_x11_window_get(const Ecore_Evas *ee);
811 EAPI void            ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on);
812 EAPI Eina_Bool       ecore_evas_software_x11_direct_resize_get(const Ecore_Evas *ee);
813 EAPI void            ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
814
815 #define ECORE_EVAS_GL_X11_OPT_NONE     0
816 #define ECORE_EVAS_GL_X11_OPT_INDIRECT 1
817 #define ECORE_EVAS_GL_X11_OPT_VSYNC    2
818 #define ECORE_EVAS_GL_X11_OPT_LAST     3
819
820 EAPI Ecore_Evas     *ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
821 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);
822 EAPI Ecore_X_Window  ecore_evas_gl_x11_window_get(const Ecore_Evas *ee);
823 EAPI void            ecore_evas_gl_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on);
824 EAPI Eina_Bool       ecore_evas_gl_x11_direct_resize_get(const Ecore_Evas *ee);
825 EAPI void            ecore_evas_gl_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
826 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));
827
828 EAPI Ecore_Evas     *ecore_evas_xrender_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
829 EAPI Ecore_X_Window  ecore_evas_xrender_x11_window_get(const Ecore_Evas *ee);
830 EAPI void            ecore_evas_xrender_x11_direct_resize_set(Ecore_Evas *ee, Eina_Bool on);
831 EAPI Eina_Bool       ecore_evas_xrender_x11_direct_resize_get(const Ecore_Evas *ee);
832 EAPI void            ecore_evas_xrender_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
833
834 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);
835 EAPI Ecore_X_Window  ecore_evas_software_x11_8_window_get(const Ecore_Evas *ee);
836 EAPI Ecore_X_Window  ecore_evas_software_x11_8_subwindow_get(const Ecore_Evas *ee);
837 EAPI void            ecore_evas_software_x11_8_direct_resize_set(Ecore_Evas *ee, Eina_Bool on);
838 EAPI Eina_Bool       ecore_evas_software_x11_8_direct_resize_get(const Ecore_Evas *ee);
839 EAPI void            ecore_evas_software_x11_8_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
840
841 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);
842 EAPI Ecore_X_Window  ecore_evas_software_x11_16_window_get(const Ecore_Evas *ee);
843 EAPI void            ecore_evas_software_x11_16_direct_resize_set(Ecore_Evas *ee, Eina_Bool on);
844 EAPI Eina_Bool       ecore_evas_software_x11_16_direct_resize_get(const Ecore_Evas *ee);
845 EAPI void            ecore_evas_software_x11_16_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
846
847 EAPI Ecore_Evas     *ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h);
848
849 EAPI Ecore_Evas     *ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w, int h);
850 EAPI Ecore_DirectFB_Window *ecore_evas_directfb_window_get(const Ecore_Evas *ee);
851
852 EAPI Ecore_Evas     *ecore_evas_wayland_shm_new(const char *disp_name, int x, int y, int w, int h, int frame);
853 EAPI Ecore_Evas     *ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, int frame);
854 EAPI void            ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
855 EAPI void            ecore_evas_wayland_drag_start(Ecore_Evas *ee, Ecore_Evas *drag_ee, void *source);
856 EAPI void            ecore_evas_wayland_pointer_set(Ecore_Evas *ee, int hot_x, int hot_y);
857
858 /**
859  * @brief Create a new @c Ecore_Evas canvas bound to the Evas
860  * @b buffer engine
861  *
862  * @param w The width of the canvas, in pixels
863  * @param h The height of the canvas, in pixels
864  * @return A new @c Ecore_Evas instance or @c NULL, on failure
865  *
866  * This creates a new buffer canvas wrapper, with image data array
867  * @b bound to the ARGB format, 8 bits per pixel.
868  *
869  * This function will allocate the needed pixels array with canonical
870  * @c malloc(). If you wish a custom function to allocate it, consider
871  * using ecore_evas_buffer_allocfunc_new(), instead.
872  *
873  * @note This function actually is a wrapper on
874  * ecore_evas_buffer_allocfunc_new(), using the same @a w and @a h
875  * arguments and canonical @c malloc() and @c free() to the memory
876  * allocation and freeing functions. See that function's documentation
877  * for more details.
878  */
879 EAPI Ecore_Evas     *ecore_evas_buffer_new(int w, int h);
880
881 /**
882  * @brief Create a new @c Ecore_Evas canvas bound to the Evas
883  * @b buffer engine, giving custom allocation and freeing functions for
884  * the canvas memory region
885  *
886  * @param w The width of the canvas, in canvas units
887  * @param h The height of the canvas, in canvas units
888  * @param alloc_func Function to be called to allocate the memory
889  * needed for the new buffer canvas. @a data will be passed the same
890  * value as the @p data of this function, while @a size will be passed
891  * @p w times @p h times @c sizeof(int).
892  * @param free_func Function to be called to free the memory used by
893  * the new buffer canvas. @a data will be passed the same value as the
894  * @p data of this function, while @a pix will be passed the canvas
895  * memory pointer.
896  * @param data Custom data to be passed to the allocation and freeing
897  * functions
898  * @return A new @c Ecore_Evas instance or @c NULL, on failure
899  *
900  * This creates a new buffer canvas wrapper, with image data array
901  * @b bound to the ARGB format, 8 bits per pixel.
902  *
903  * This function is useful when one wants an @c Ecore_Evas buffer
904  * canvas with a custom allocation function, like one getting memory
905  * chunks from a memory pool, for example.
906  *
907  * On any resizing of this @c Ecore_Evas buffer canvas, its image data
908  * will be @b freed, to be allocated again with the new size.
909  *
910  * @note @p w and @p h sizes have to greater or equal to 1. Otherwise,
911  * they'll be interpreted as 1, exactly.
912  *
913  * @see ecore_evas_buffer_new()
914  */
915 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);
916
917 /**
918  * @brief Grab a pointer to the actual pixels array of a given
919  * @c Ecore_Evas @b buffer canvas/window.
920  *
921  * @param ee An @c Ecore_Evas handle
922  * @return A pointer to the internal pixels array of @p ee
923  *
924  * Besides returning a pointer to the actual pixel array of the given
925  * canvas, this call will force a <b>rendering update on @p ee</b>,
926  * first.
927  *
928  * A common use case for this call is to create an image object, from
929  * @b another canvas, to have as data @p ee's contents, thus
930  * snapshoting the canvas. For that case, one can also use the
931  * ecore_evas_object_image_new() helper function.
932  */
933 EAPI const void     *ecore_evas_buffer_pixels_get(Ecore_Evas *ee);
934
935 /**
936  * @brief Create a new @c Ecore_Evas canvas bound to the Evas
937  * @b ews (Ecore + Evas Single Process Windowing System) engine
938  *
939  * EWS is a simple single process windowing system. The backing store
940  * is also an @c Ecore_Evas that can be setup with
941  * ecore_evas_ews_setup() and retrieved with
942  * ecore_evas_ews_ecore_evas_get(). It will allow window management
943  * using events prefixed with @c ECORE_EVAS_EVENT_EWS_.
944  *
945  * The EWS windows (returned by this function or
946  * ecore_evas_new("ews"...)) will all be software buffer windows
947  * automatic rendered to the backing store.
948  *
949  * @param x horizontal position of window, in pixels
950  * @param y vertical position of window, in pixels
951  * @param w The width of the canvas, in pixels
952  * @param h The height of the canvas, in pixels
953  * @return A new @c Ecore_Evas instance or @c NULL, on failure
954  *
955  * @see ecore_evas_ews_setup()
956  * @see ecore_evas_ews_ecore_evas_get()
957  *
958  * @since 1.1
959  */
960 EAPI Ecore_Evas     *ecore_evas_ews_new(int x, int y, int w, int h);
961
962
963 /**
964  * Returns the backing store image object that represents the given
965  * window in EWS.
966  *
967  * @note This should not be modified anyhow, but may be helpful to
968  *       determine stacking and geometry of it for window managers
969  *       that decorate windows.
970  *
971  * @see ecore_evas_ews_manager_set()
972  * @see ecore_evas_ews_evas_get()
973  * @since 1.1
974  */
975 EAPI Evas_Object *ecore_evas_ews_backing_store_get(const Ecore_Evas *ee);
976
977 /**
978  * Calls the window to be deleted (freed), but can let user decide to
979  * forbid it by using ecore_evas_callback_delete_request_set()
980  *
981  * @since 1.1
982  */
983 EAPI void ecore_evas_ews_delete_request(Ecore_Evas *ee);
984
985 /**
986  * @brief Create an Evas image object with image data <b>bound to an
987  * own, internal @c Ecore_Evas canvas wrapper</b>
988  *
989  * @param ee_target @c Ecore_Evas to have the canvas receiving the new
990  * image object
991  * @return A handle to the new image object
992  *
993  * This will create a @b special Evas image object. The image's pixel
994  * array will get bound to the same image data array of an @b internal
995  * @b buffer @c Ecore_Evas canvas. The user of this function is, then,
996  * supposed to grab that @c Ecore_Evas handle, with
997  * ecore_evas_object_ecore_evas_get(), and use its canvas to render
998  * whichever contents he/she wants, @b independently of the contents
999  * of the canvas owned by @p ee_target. Those contents will reflect on
1000  * the canvas of @p ee, though, being exactly the image data of the
1001  * object returned by this function.
1002  *
1003  * This is a helper function for the scenario of one wanting to grab a
1004  * buffer canvas' contents (with ecore_evas_buffer_pixels_get()) to be
1005  * used on another canvas, for whichever reason. The most common goal
1006  * of this setup is to @b save an image file with a whole canvas as
1007  * contents, which could not be achieved by using an image file within
1008  * the target canvas.
1009  *
1010  * @warning Always resize the returned image and its underlying
1011  * @c Ecore_Evas handle accordingly. They must be kept with same sizes
1012  * for things to work as expected. Also, you @b must issue
1013  * @c evas_object_image_size_set() on the image with that same size. If
1014  * the image is to be shown in a canvas bound to an engine different
1015  * than the buffer one, then you must also set this image's @b fill
1016  * properties accordingly.
1017  *
1018  * @note The image returned will always be bound to the
1019  * @c EVAS_COLORSPACE_ARGB8888 colorspace, always.
1020  *
1021  * @note Use ecore_evas_object_evas_get() to grab the image's internal
1022  * own canvas directly.
1023  *
1024  * @note If snapshoting this image's internal canvas, remember to
1025  * flush its internal @c Ecore_Evas firstly, with
1026  * ecore_evas_manual_render().
1027  */
1028 EAPI Evas_Object    *ecore_evas_object_image_new(Ecore_Evas *ee_target);
1029
1030 /**
1031  * @brief Retrieve the internal @c Ecore_Evas handle of an image
1032  * object created via ecore_evas_object_image_new()
1033  *
1034  * @param obj A handle to an image object created via
1035  * ecore_evas_object_image_new()
1036  * @return The underlying @c Ecore_Evas handle in @p obj
1037  */
1038 EAPI Ecore_Evas     *ecore_evas_object_ecore_evas_get(Evas_Object *obj);
1039
1040 /**
1041  * @brief Retrieve the canvas bound to the internal @c Ecore_Evas
1042  * handle of an image object created via ecore_evas_object_image_new()
1043  *
1044  * @param obj A handle to an image object created via
1045  * ecore_evas_object_image_new()
1046  * @return A handle to @p obj's underlying @c Ecore_Evas's canvas
1047  */
1048 EAPI Evas           *ecore_evas_object_evas_get(Evas_Object *obj);
1049
1050 EAPI Ecore_Evas     *ecore_evas_software_gdi_new(Ecore_Win32_Window *parent,
1051                                                  int                 x,
1052                                                  int                 y,
1053                                                  int                 width,
1054                                                  int                 height);
1055
1056 EAPI Ecore_Evas     *ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
1057                                                    int                 x,
1058                                                    int                 y,
1059                                                    int                 width,
1060                                                    int                 height);
1061
1062 EAPI Ecore_Evas     *ecore_evas_software_16_ddraw_new(Ecore_Win32_Window *parent,
1063                                                       int                 x,
1064                                                       int                 y,
1065                                                       int                 width,
1066                                                       int                 height);
1067
1068 EAPI Ecore_Evas     *ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
1069                                              int                 x,
1070                                              int                 y,
1071                                              int                 width,
1072                                              int                 height);
1073
1074 EAPI Ecore_Evas *ecore_evas_gl_glew_new(Ecore_Win32_Window *parent,
1075                                         int                 x,
1076                                         int                 y,
1077                                         int                 width,
1078                                         int                 height);
1079
1080 EAPI Ecore_Win32_Window *ecore_evas_win32_window_get(const Ecore_Evas *ee);
1081
1082 EAPI Ecore_Evas     *ecore_evas_sdl_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha);
1083 EAPI Ecore_Evas     *ecore_evas_sdl16_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha);
1084 EAPI Ecore_Evas     *ecore_evas_gl_sdl_new(const char* name, int w, int h, int fullscreen, int noframe);
1085
1086 EAPI Ecore_Evas     *ecore_evas_software_wince_new(Ecore_WinCE_Window *parent,
1087                                                    int                 x,
1088                                                    int                 y,
1089                                                    int                 width,
1090                                                    int                 height);
1091
1092 EAPI Ecore_Evas     *ecore_evas_software_wince_fb_new(Ecore_WinCE_Window *parent,
1093                                                       int                 x,
1094                                                       int                 y,
1095                                                       int                 width,
1096                                                       int                 height);
1097
1098 EAPI Ecore_Evas     *ecore_evas_software_wince_gapi_new(Ecore_WinCE_Window *parent,
1099                                                         int                 x,
1100                                                         int                 y,
1101                                                         int                 width,
1102                                                         int                 height);
1103
1104 EAPI Ecore_Evas     *ecore_evas_software_wince_ddraw_new(Ecore_WinCE_Window *parent,
1105                                                          int                 x,
1106                                                          int                 y,
1107                                                          int                 width,
1108                                                          int                 height);
1109
1110 EAPI Ecore_Evas     *ecore_evas_software_wince_gdi_new(Ecore_WinCE_Window *parent,
1111                                                        int                 x,
1112                                                        int                 y,
1113                                                        int                 width,
1114                                                        int                 height);
1115
1116 EAPI Ecore_WinCE_Window *ecore_evas_software_wince_window_get(const Ecore_Evas *ee);
1117
1118 EAPI Ecore_Evas *ecore_evas_cocoa_new(Ecore_Cocoa_Window *parent,
1119                                       int x,
1120                                       int y,
1121                                       int w,
1122                                       int h);
1123
1124 EAPI Ecore_Evas *ecore_evas_psl1ght_new(const char* name, int w, int h);
1125
1126
1127 /* generic manipulation calls */
1128 /**
1129  * @brief Get the engine name used by this Ecore_Evas(window).
1130  *
1131  * @param ee Ecore_Evas whose engine's name is desired.
1132  * @return A string that can(usually) be used in ecore_evas_new()
1133  *
1134  * @see ecore_evas_free()
1135  */
1136 EAPI const char *ecore_evas_engine_name_get(const Ecore_Evas *ee);
1137 /**
1138  * @brief Return the Ecore_Evas for this Evas
1139  *
1140  * @param e The Evas to get the Ecore_Evas from
1141  * @return The Ecore_Evas that holds this Evas, or NULL if not held by one.
1142  *
1143  * @warning Only use on Evas' created with ecore evas!
1144  */
1145 EAPI Ecore_Evas *ecore_evas_ecore_evas_get(const Evas *e);
1146 /**
1147  * @brief Free an Ecore_Evas
1148  *
1149  * @param ee The Ecore_Evas to free
1150  *
1151  * This frees up any memory used by the Ecore_Evas.
1152  */
1153 EAPI void        ecore_evas_free(Ecore_Evas *ee);
1154 /**
1155  * @brief Retrieve user data associated with an Ecore_Evas.
1156  *
1157  * @param ee The Ecore_Evas to retrieve the user data from.
1158  * @param key The key which the user data to be retrieved is associated with.
1159  *
1160  * This function retrieves user specific data that has been stored within an
1161  * Ecore_Evas structure with ecore_evas_data_set().
1162  *
1163  * @returns NULL on error or no data found, A pointer to the user data on
1164  *     success.
1165  *
1166  * @see ecore_evas_data_set()
1167  */
1168 EAPI void       *ecore_evas_data_get(const Ecore_Evas *ee, const char *key);
1169 /**
1170  * @brief Store user data in an Ecore_Evas structure.
1171  *
1172  * @param ee The Ecore_Evas to store the user data in.
1173  * @param key A unique string to associate the user data against. Cannot
1174  * be NULL.
1175  * @param data A pointer to the user data to store.
1176  *
1177  * This function associates the @p data with a @p key which is stored by
1178  * the Ecore_Evas @p ee. Be aware that a call to ecore_evas_free() will
1179  * not free any memory for the associated user data, this is the responsibility
1180  * of the caller.
1181  *
1182  * @see ecore_evas_callback_pre_free_set()
1183  * @see ecore_evas_free()
1184  * @see ecore_evas_data_get()
1185  */
1186 EAPI void        ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data);
1187 /**
1188  * Set a callback for Ecore_Evas resize events.
1189  * @param ee The Ecore_Evas to set callbacks on
1190  * @param func The function to call
1191
1192  * A call to this function will set a callback on an Ecore_Evas, causing
1193  * @p func to be called whenever @p ee is resized.
1194  *
1195  * @warning If and when this function is called depends on the underlying
1196  * windowing system.
1197  */
1198 EAPI void        ecore_evas_callback_resize_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1199 /**
1200  * Set a callback for Ecore_Evas move events.
1201  * @param ee The Ecore_Evas to set callbacks on
1202  * @param func The function to call
1203
1204  * A call to this function will set a callback on an Ecore_Evas, causing
1205  * @p func to be called whenever @p ee is moved.
1206  *
1207  * @warning If and when this function is called depends on the underlying
1208  * windowing system.
1209  */
1210 EAPI void        ecore_evas_callback_move_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1211 /**
1212  * Set a callback for Ecore_Evas show events.
1213  * @param ee The Ecore_Evas to set callbacks on
1214  * @param func The function to call
1215
1216  * A call to this function will set a callback on an Ecore_Evas, causing
1217  * @p func to be called whenever @p ee is shown.
1218  *
1219  * @warning If and when this function is called depends on the underlying
1220  * windowing system.
1221  */
1222 EAPI void        ecore_evas_callback_show_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1223 /**
1224  * Set a callback for Ecore_Evas hide events.
1225  * @param ee The Ecore_Evas to set callbacks on
1226  * @param func The function to call
1227
1228  * A call to this function will set a callback on an Ecore_Evas, causing
1229  * @p func to be called whenever @p ee is hidden.
1230  *
1231  * @warning If and when this function is called depends on the underlying
1232  * windowing system.
1233  */
1234 EAPI void        ecore_evas_callback_hide_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1235 /**
1236  * Set a callback for Ecore_Evas delete request events.
1237  * @param ee The Ecore_Evas to set callbacks on
1238  * @param func The function to call
1239
1240  * A call to this function will set a callback on an Ecore_Evas, causing
1241  * @p func to be called whenever @p ee gets a delete request.
1242  *
1243  * @warning If and when this function is called depends on the underlying
1244  * windowing system.
1245  */
1246 EAPI void        ecore_evas_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1247 /**
1248  * Set a callback for Ecore_Evas destroy events.
1249  * @param ee The Ecore_Evas to set callbacks on
1250  * @param func The function to call
1251
1252  * A call to this function will set a callback on an Ecore_Evas, causing
1253  * @p func to be called whenever @p ee is destroyed.
1254  *
1255  * @warning If and when this function is called depends on the underlying
1256  * windowing system.
1257  */
1258 EAPI void        ecore_evas_callback_destroy_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1259 /**
1260  * Set a callback for Ecore_Evas focus in events.
1261  * @param ee The Ecore_Evas to set callbacks on
1262  * @param func The function to call
1263
1264  * A call to this function will set a callback on an Ecore_Evas, causing
1265  * @p func to be called whenever @p ee gets focus.
1266  *
1267  * @warning If and when this function is called depends on the underlying
1268  * windowing system.
1269  */
1270 EAPI void        ecore_evas_callback_focus_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1271 /**
1272  * Set a callback for Ecore_Evas focus out events.
1273  * @param ee The Ecore_Evas to set callbacks on
1274  * @param func The function to call
1275
1276  * A call to this function will set a callback on an Ecore_Evas, causing
1277  * @p func to be called whenever @p ee loses focus.
1278  *
1279  * @warning If and when this function is called depends on the underlying
1280  * windowing system.
1281  */
1282 EAPI void        ecore_evas_callback_focus_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1283 /**
1284  * Set a callback for Ecore_Evas sticky events.
1285  * @param ee The Ecore_Evas to set callbacks on
1286  * @param func The function to call
1287
1288  * A call to this function will set a callback on an Ecore_Evas, causing
1289  * @p func to be called whenever @p ee becomes sticky.
1290  *
1291  * @warning If and when this function is called depends on the underlying
1292  * windowing system.
1293  */
1294 EAPI void        ecore_evas_callback_sticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1295 /**
1296  * Set a callback for Ecore_Evas un-sticky events.
1297  * @param ee The Ecore_Evas to set callbacks on
1298  * @param func The function to call
1299
1300  * A call to this function will set a callback on an Ecore_Evas, causing
1301  * @p func to be called whenever @p ee becomes un-sticky.
1302  *
1303  * @warning If and when this function is called depends on the underlying
1304  * windowing system.
1305  */
1306 EAPI void        ecore_evas_callback_unsticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1307 /**
1308  * Set a callback for Ecore_Evas mouse in events.
1309  * @param ee The Ecore_Evas to set callbacks on
1310  * @param func The function to call
1311
1312  * A call to this function will set a callback on an Ecore_Evas, causing
1313  * @p func to be called whenever the mouse enters @p ee.
1314  *
1315  * @warning If and when this function is called depends on the underlying
1316  * windowing system.
1317  */
1318 EAPI void        ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1319 /**
1320  * Set a callback for Ecore_Evas mouse out events.
1321  * @param ee The Ecore_Evas to set callbacks on
1322  * @param func The function to call
1323
1324  * A call to this function will set a callback on an Ecore_Evas, causing
1325  * @p func to be called whenever the mouse leaves @p ee.
1326  *
1327  * @warning If and when this function is called depends on the underlying
1328  * windowing system.
1329  */
1330 EAPI void        ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1331 /**
1332  * Set a callback for Ecore_Evas pre render events.
1333  * @param ee The Ecore_Evas to set callbacks on
1334  * @param func The function to call
1335
1336  * A call to this function will set a callback on an Ecore_Evas, causing
1337  * @p func to be called just before the evas in @p ee is rendered.
1338  *
1339  * @warning If and when this function is called depends on the underlying
1340  * windowing system.
1341  */
1342 EAPI void        ecore_evas_callback_pre_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1343 /**
1344  * Set a callback for Ecore_Evas mouse post render events.
1345  * @param ee The Ecore_Evas to set callbacks on
1346  * @param func The function to call
1347
1348  * A call to this function will set a callback on an Ecore_Evas, causing
1349  * @p func to be called just after the evas in @p ee is rendered.
1350  *
1351  * @warning If and when this function is called depends on the underlying
1352  * windowing system.
1353  */
1354 EAPI void        ecore_evas_callback_post_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1355 /**
1356  * Set a callback for Ecore_Evas pre-free event.
1357  * @param ee The Ecore_Evas to set callbacks on
1358  * @param func The function to call
1359  *
1360  * A call to this function will set a callback on an Ecore_Evas, causing
1361  * @p func to be called just before the instance @p ee is freed.
1362  *
1363  * @warning If and when this function is called depends on the underlying
1364  * windowing system.
1365  */
1366 EAPI void        ecore_evas_callback_pre_free_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1367 /**
1368  * Set a callback for Ecore_Evas state changes.
1369  * @param ee The Ecore_Evas to set callbacks on
1370  * @param func The function to call
1371
1372  * A call to this function will set a callback on an Ecore_Evas, causing
1373  * @p func to be called whenever @p ee changes state.
1374  *
1375  * @since 1.2
1376  * @warning If and when this function is called depends on the underlying
1377  * windowing system.
1378  */
1379 EAPI void        ecore_evas_callback_state_change_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func);
1380
1381 EAPI Evas       *ecore_evas_get(const Ecore_Evas *ee);
1382 EAPI void        ecore_evas_managed_move(Ecore_Evas *ee, int x, int y);
1383 EAPI void        ecore_evas_shaped_set(Ecore_Evas *ee, Eina_Bool shaped);
1384 EAPI Eina_Bool   ecore_evas_shaped_get(const Ecore_Evas *ee);
1385 /**
1386  * @brief Show an Ecore_Evas' window
1387  *
1388  * @param ee The Ecore_Evas to show.
1389  *
1390  * This function makes @p ee visible.
1391  */
1392 EAPI void        ecore_evas_show(Ecore_Evas *ee);
1393 /**
1394  * @brief Hide an Ecore_Evas' window
1395  *
1396  * @param ee The Ecore_Evas to hide.
1397  *
1398  * This function makes @p ee hidden(not visible).
1399  */
1400 EAPI void        ecore_evas_hide(Ecore_Evas *ee);
1401 EAPI void        ecore_evas_activate(Ecore_Evas *ee);
1402
1403
1404 /**
1405  * Set the minimum size of a given @c Ecore_Evas window
1406  *
1407  * @param ee An @c Ecore_Evas window's handle
1408  * @param w The minimum width
1409  * @param h The minimum height
1410  *
1411  * This function sets the minimum size of @p ee to be @p w x @p h.
1412  * One won't be able to resize that window to dimensions smaller than
1413  * the ones set.
1414  *
1415  * @note When base sizes are set, via ecore_evas_size_base_set(),
1416  * they'll be used to calculate a window's minimum size, instead of
1417  * those set by this function.
1418  *
1419  * @see ecore_evas_size_min_get()
1420  */
1421 EAPI void        ecore_evas_size_min_set(Ecore_Evas *ee, int w, int h);
1422
1423 /**
1424  * Get the minimum size set for a given @c Ecore_Evas window
1425  *
1426  * @param ee An @c Ecore_Evas window's handle
1427  * @param w A pointer to an int to place the minimum width in.
1428  * @param h A pointer to an int to place the minimum height in.
1429  *
1430  * @note Use @c NULL pointers on the size components you're not
1431  * interested in: they'll be ignored by the function.
1432  *
1433  * @see ecore_evas_size_min_set() for more details
1434  */
1435 EAPI void        ecore_evas_size_min_get(const Ecore_Evas *ee, int *w, int *h);
1436
1437 /**
1438  * Set the maximum size of a given @c Ecore_Evas window
1439  *
1440  * @param ee An @c Ecore_Evas window's handle
1441  * @param w The maximum width
1442  * @param h The maximum height
1443  *
1444  * This function sets the maximum size of @p ee to be @p w x @p h.
1445  * One won't be able to resize that window to dimensions bigger than
1446  * the ones set.
1447  *
1448  * @see ecore_evas_size_max_get()
1449  */
1450 EAPI void        ecore_evas_size_max_set(Ecore_Evas *ee, int w, int h);
1451
1452 /**
1453  * Get the maximum size set for a given @c Ecore_Evas window
1454  *
1455  * @param ee An @c Ecore_Evas window's handle
1456  * @param w A pointer to an int to place the maximum width in.
1457  * @param h A pointer to an int to place the maximum height in.
1458  *
1459  * @note Use @c NULL pointers on the size components you're not
1460  * interested in: they'll be ignored by the function.
1461  *
1462  * @see ecore_evas_size_max_set() for more details
1463  */
1464 EAPI void        ecore_evas_size_max_get(const Ecore_Evas *ee, int *w, int *h);
1465
1466 /**
1467  * Set the base size for a given @c Ecore_Evas window
1468  *
1469  * @param ee An @c Ecore_Evas window's handle
1470  * @param w The base width
1471  * @param h The base height
1472  *
1473  * This function sets the @b base size of @p ee to be @p w x @p h.
1474  * When base sizes are set, they'll be used to calculate a window's
1475  * @b minimum size, instead of those set by ecore_evas_size_min_get().
1476  *
1477  * @see ecore_evas_size_base_get()
1478  */
1479 EAPI void        ecore_evas_size_base_set(Ecore_Evas *ee, int w, int h);
1480
1481 /**
1482  * Get the base size set for a given @c Ecore_Evas window
1483  *
1484  * @param ee An @c Ecore_Evas window's handle
1485  * @param w A pointer to an int to place the base width in.
1486  * @param h A pointer to an int to place the base height in.
1487  *
1488  * @note Use @c NULL pointers on the size components you're not
1489  * interested in: they'll be ignored by the function.
1490  *
1491  * @see ecore_evas_size_base_set() for more details
1492  */
1493 EAPI void        ecore_evas_size_base_get(const Ecore_Evas *ee, int *w, int *h);
1494
1495 /**
1496  * Set the "size step" for a given @c Ecore_Evas window
1497  *
1498  * @param ee An @c Ecore_Evas window's handle
1499  * @param w The step width
1500  * @param h The step height
1501  *
1502  * This function sets the size steps of @p ee to be @p w x @p h. This
1503  * limits the size of this @c Ecore_Evas window to be @b always an
1504  * integer multiple of the step size, for each axis.
1505  */
1506 EAPI void        ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h);
1507
1508 /**
1509  * Get the "size step" set for a given @c Ecore_Evas window
1510  *
1511  * @param ee An @c Ecore_Evas window's handle
1512  * @param w A pointer to an int to place the step width in.
1513  * @param h A pointer to an int to place the step height in.
1514  *
1515  * @note Use @c NULL pointers on the size components you're not
1516  * interested in: they'll be ignored by the function.
1517  *
1518  * @see ecore_evas_size_base_set() for more details
1519  */
1520 EAPI void        ecore_evas_size_step_get(const Ecore_Evas *ee, int *w, int *h);
1521
1522 /**
1523  * @brief Set the cursor of an Ecore_Evas.
1524  *
1525  * @param ee The Ecore_Evas
1526  * @param file  The path to an image file for the cursor.
1527  * @param layer The layer in which the cursor will appear.
1528  * @param hot_x The x coordinate of the cursor's hot spot.
1529  * @param hot_y The y coordinate of the cursor's hot spot.
1530  *
1531  * This function makes the mouse cursor over @p ee be the image specified by
1532  * @p file. The actual point within the image that the mouse is at is specified
1533  * by @p hot_x and @p hot_y, which are coordinates with respect to the top left
1534  * corner of the cursor image.
1535  *
1536  * @note This function creates an object from the image and uses
1537  * ecore_evas_object_cursor_set().
1538  *
1539  * @see ecore_evas_object_cursor_set()
1540  */
1541 EAPI void        ecore_evas_cursor_set(Ecore_Evas *ee, const char *file, int layer, int hot_x, int hot_y);
1542 /**
1543  * @brief Get information about an Ecore_Evas' cursor
1544  *
1545  * @param ee The Ecore_Evas to set
1546  * @param obj A pointer to an Evas_Object to place the cursor Evas_Object.
1547  * @param layer A pointer to an int to place the cursor's layer in.
1548  * @param hot_x A pointer to an int to place the cursor's hot_x coordinate in.
1549  * @param hot_y A pointer to an int to place the cursor's hot_y coordinate in.
1550  *
1551  * This function queries information about an Ecore_Evas' cursor.
1552  *
1553  * @see ecore_evas_cursor_set()
1554  * @see ecore_evas_object_cursor_set()
1555  */
1556 EAPI void        ecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object **obj, int *layer, int *hot_x, int *hot_y);
1557 /**
1558  * @brief Set the cursor of an Ecore_Evas
1559  *
1560  * @param ee The Ecore_Evas
1561  *
1562  * @param obj The Evas_Object which will be the cursor.
1563  * @param layer The layer in which the cursor will appear.
1564  * @param hot_x The x coordinate of the cursor's hot spot.
1565  * @param hot_y The y coordinate of the cursor's hot spot.
1566  *
1567  * This function makes the mouse cursor over @p ee be the object specified by
1568  * @p obj. The actual point within the object that the mouse is at is specified
1569  * by @p hot_x and @p hot_y, which are coordinates with respect to the top left
1570  * corner of the cursor object.
1571  *
1572  * @see ecore_evas_cursor_set()
1573  */
1574 EAPI void        ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y);
1575 EAPI void        ecore_evas_override_set(Ecore_Evas *ee, Eina_Bool on);
1576 EAPI Eina_Bool   ecore_evas_override_get(const Ecore_Evas *ee);
1577 EAPI void        ecore_evas_avoid_damage_set(Ecore_Evas *ee, Ecore_Evas_Avoid_Damage_Type on);
1578 EAPI Ecore_Evas_Avoid_Damage_Type ecore_evas_avoid_damage_get(const Ecore_Evas *ee);
1579 EAPI void        ecore_evas_withdrawn_set(Ecore_Evas *ee, Eina_Bool withdrawn);
1580 EAPI Eina_Bool   ecore_evas_withdrawn_get(const Ecore_Evas *ee);
1581 EAPI void        ecore_evas_sticky_set(Ecore_Evas *ee, Eina_Bool sticky);
1582 EAPI Eina_Bool   ecore_evas_sticky_get(const Ecore_Evas *ee);
1583 EAPI void        ecore_evas_manual_render_set(Ecore_Evas *ee, Eina_Bool manual_render);
1584 EAPI Eina_Bool   ecore_evas_manual_render_get(const Ecore_Evas *ee);
1585
1586 /**
1587  * @brief Registers an @c Ecore_Evas to receive events through ecore_input_evas.
1588  *
1589  * @param ee The @c Ecore_Evas handle.
1590  *
1591  * This function calls ecore_event_window_register() with the @p ee as its @c
1592  * id argument, @c window argument, and uses its @c Evas too. It is useful when
1593  * no @c window information is available on a given @c Ecore_Evas backend.
1594  *
1595  * @see ecore_evas_input_event_unregister()
1596  * @since 1.1
1597  */
1598 EAPI void        ecore_evas_input_event_register(Ecore_Evas *ee);
1599 /**
1600  * @brief Unregisters an @c Ecore_Evas receiving events through ecore_input_evas.
1601  *
1602  * @param ee The @c Ecore_Evas handle.
1603  *
1604  * @see ecore_evas_input_event_register()
1605  * @since 1.1
1606  */
1607 EAPI void        ecore_evas_input_event_unregister(Ecore_Evas *ee);
1608
1609 /**
1610  * @brief Force immediate rendering on a given @c Ecore_Evas window
1611  *
1612  * @param ee An @c Ecore_Evas handle
1613  *
1614  * Use this call to forcefully flush the @p ee's canvas rendering
1615  * pipeline, thus bring its window to an up to date state.
1616  */
1617 EAPI void        ecore_evas_manual_render(Ecore_Evas *ee);
1618 EAPI void        ecore_evas_comp_sync_set(Ecore_Evas *ee, Eina_Bool do_sync);
1619 EAPI Eina_Bool   ecore_evas_comp_sync_get(const Ecore_Evas *ee);
1620 /**
1621  * @brief Get geometry of screen associated with this Ecore_Evas.
1622  *
1623  * @param ee The Ecore_Evas whose window's to query container screen geometry.
1624  * @param x where to return the horizontal offset value. May be NULL.
1625  * @param y where to return the vertical offset value. May be NULL.
1626  * @param w where to return the width value. May be NULL.
1627  * @param h where to return the height value. May be NULL.
1628  *
1629  * @since 1.1
1630  */
1631 EAPI void        ecore_evas_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
1632
1633 EAPI void        ecore_evas_draw_frame_set(Ecore_Evas *ee, Eina_Bool draw_frame);
1634 EAPI Eina_Bool   ecore_evas_draw_frame_get(const Ecore_Evas *ee);
1635
1636 /**
1637  * @brief Associate the given object to this ecore evas.
1638  *
1639  * @param ee The Ecore_Evas to associate to @a obj
1640  * @param obj The object to associate to @a ee
1641  * @param flags The association flags.
1642  * @return EINA_TRUE on success, EINA_FALSE otherwise.
1643  *
1644  * Association means that operations on one will affect the other, for
1645  * example moving the object will move the window, resize the object will
1646  * also affect the ecore evas window, hide and show applies as well.
1647  *
1648  * This is meant to simplify development, since you often need to associate
1649  * these events with your "base" objects, background or bottom-most object.
1650  *
1651  * Be aware that some methods might not be what you would like, deleting
1652  * either the window or the object will delete the other. If you want to
1653  * change that behavior, let's say to hide window when it's closed, you
1654  * must use ecore_evas_callback_delete_request_set() and set your own code,
1655  * like ecore_evas_hide(). Just remember that if you override delete_request
1656  * and still want to delete the window/object, you must do that yourself.
1657  *
1658  * Since we now define delete_request, deleting windows will not quit
1659  * main loop, if you wish to do so, you should listen for EVAS_CALLBACK_FREE
1660  * on the object, that way you get notified and you can call
1661  * ecore_main_loop_quit().
1662  *
1663  * Flags can be OR'ed of:
1664  * @li ECORE_EVAS_OBJECT_ASSOCIATE_BASE (or 0): to listen to basic events
1665  *     like delete, resize and move, but no stacking or layer are used.
1666  * @li ECORE_EVAS_OBJECT_ASSOCIATE_STACK: stacking operations will act
1667  *     on the Ecore_Evas, not the object. So evas_object_raise() will
1668  *     call ecore_evas_raise(). Relative operations (stack_above, stack_below)
1669  *     are still not implemented.
1670  * @li ECORE_EVAS_OBJECT_ASSOCIATE_LAYER: stacking operations will act
1671  *     on the Ecore_Evas, not the object. So evas_object_layer_set() will
1672  *     call ecore_evas_layer_set().
1673  * @li ECORE_EVAS_OBJECT_ASSOCIATE_DEL: the object delete will delete the
1674  *     ecore_evas as well as delete_requests on the ecore_evas will delete
1675  *     etc.
1676  */
1677 EAPI Eina_Bool    ecore_evas_object_associate(Ecore_Evas *ee, Evas_Object *obj, Ecore_Evas_Object_Associate_Flags flags);
1678 /**
1679  * @brief Cancel the association set with ecore_evas_object_associate().
1680  *
1681  * @param ee The Ecore_Evas to dissociate from @a obj
1682  * @param obj The object to dissociate from @a ee
1683  * @return EINA_TRUE on success, EINA_FALSE otherwise.
1684  */
1685 EAPI Eina_Bool    ecore_evas_object_dissociate(Ecore_Evas *ee, Evas_Object *obj);
1686 /**
1687  * @brief Get the object associated with @p ee
1688  *
1689  * @param ee The Ecore_Evas to get the object from.
1690  * @return The associated object, or NULL if there is no associated object.
1691  */
1692 EAPI Evas_Object *ecore_evas_object_associate_get(const Ecore_Evas *ee);
1693
1694 /* helper function to be used with ECORE_GETOPT_CALLBACK_*() */
1695 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);
1696
1697 /**
1698  * @brief Get a list of all the ecore_evases.
1699  *
1700  * @return A list of ecore_evases.
1701  *
1702  * The returned list of ecore evases is only valid until the canvases are
1703  * destroyed (and should not be cached for instance). The list can be freed by
1704  * just deleting the list.
1705  */
1706 EAPI Eina_List   *ecore_evas_ecore_evas_list_get(void);
1707
1708 /* specific calls to an x11 environment ecore_evas */
1709 EAPI void           ecore_evas_x11_leader_set(Ecore_Evas *ee, Ecore_X_Window win);
1710 EAPI Ecore_X_Window ecore_evas_x11_leader_get(Ecore_Evas *ee);
1711 EAPI void           ecore_evas_x11_leader_default_set(Ecore_Evas *ee);
1712 EAPI void           ecore_evas_x11_shape_input_rectangle_set(Ecore_Evas *ee, int x, int y, int w, int h);
1713 EAPI void           ecore_evas_x11_shape_input_rectangle_add(Ecore_Evas *ee, int x, int y, int w, int h);
1714 EAPI void           ecore_evas_x11_shape_input_rectangle_subtract(Ecore_Evas *ee, int x, int y, int w, int h);
1715 EAPI void           ecore_evas_x11_shape_input_empty(Ecore_Evas *ee);
1716 EAPI void           ecore_evas_x11_shape_input_reset(Ecore_Evas *ee);
1717 EAPI void           ecore_evas_x11_shape_input_apply(Ecore_Evas *ee);
1718
1719 /**
1720  * @defgroup Ecore_Evas_Ews Ecore_Evas Single Process Windowing System.
1721  *
1722  * These are global scope functions to manage the EWS to be used by
1723  * ecore_evas_ews_new().
1724  *
1725  * @since 1.1
1726  * @{
1727  */
1728
1729 /**
1730  * Sets the engine to be used by the backing store engine.
1731  *
1732  * @return EINA_TRUE on success, EINA_FALSE if ews is already in use.
1733  * @since 1.1
1734  */
1735 EAPI Eina_Bool ecore_evas_ews_engine_set(const char *engine, const char *options);
1736
1737 /**
1738  * Reconfigure the backing store used.
1739  * @since 1.1
1740  */
1741 EAPI Eina_Bool ecore_evas_ews_setup(int x, int y, int w, int h);
1742
1743 /**
1744  * Return the internal backing store in use.
1745  *
1746  * @note this will foced it to be created, making future calls to
1747  * ecore_evas_ews_engine_set() void.
1748  *
1749  * @see ecore_evas_ews_evas_get()
1750  * @since 1.1
1751  */
1752 EAPI Ecore_Evas *ecore_evas_ews_ecore_evas_get(void);
1753
1754 /**
1755  * Return the internal backing store in use.
1756  *
1757  * @note this will foced it to be created, making future calls to
1758  * ecore_evas_ews_engine_set() void.
1759  *
1760  * @see ecore_evas_ews_ecore_evas_get()
1761  * @since 1.1
1762  */
1763 EAPI Evas *ecore_evas_ews_evas_get(void);
1764
1765 /**
1766  * Get the current background.
1767  */
1768 EAPI Evas_Object *ecore_evas_ews_background_get(void);
1769
1770 /**
1771  * Set the current background, must be created at evas ecore_evas_ews_evas_get()
1772  *
1773  * It will be kept at lowest layer (EVAS_LAYER_MIN) and below
1774  * everything else. You can set any object, default is a black
1775  * rectangle.
1776  *
1777  * @note previous object will be deleted!
1778  */
1779 EAPI void ecore_evas_ews_background_set(Evas_Object *o);
1780
1781 /**
1782  * Return all Ecore_Evas* created by EWS.
1783  *
1784  * @note do not change the returned list or its contents.
1785  * @since 1.1
1786  */
1787 EAPI const Eina_List *ecore_evas_ews_children_get(void);
1788
1789 /**
1790  * Set the identifier of the manager taking care of internal windows.
1791  *
1792  * The ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE event is issued. Consider
1793  * handling it to know if you should stop handling events yourself
1794  * (ie: another manager took over)
1795  *
1796  * @param manager any unique identifier address.
1797  *
1798  * @see ecore_evas_ews_manager_get()
1799  * @since 1.1
1800  */
1801 EAPI void        ecore_evas_ews_manager_set(const void *manager);
1802
1803 /**
1804  * Get the identifier of the manager taking care of internal windows.
1805  *
1806  * @return the value set by ecore_evas_ews_manager_set()
1807  * @since 1.1
1808  */
1809 EAPI const void *ecore_evas_ews_manager_get(void);
1810
1811 EAPI extern int ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE; /**< manager was changed @since 1.1 */
1812 EAPI extern int ECORE_EVAS_EWS_EVENT_ADD; /**< window was created @since 1.1 */
1813 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 */
1814 EAPI extern int ECORE_EVAS_EWS_EVENT_RESIZE; /**< window was resized @since 1.1 */
1815 EAPI extern int ECORE_EVAS_EWS_EVENT_MOVE; /**< window was moved @since 1.1 */
1816 EAPI extern int ECORE_EVAS_EWS_EVENT_SHOW; /**< window become visible @since 1.1 */
1817 EAPI extern int ECORE_EVAS_EWS_EVENT_HIDE; /**< window become hidden @since 1.1 */
1818 EAPI extern int ECORE_EVAS_EWS_EVENT_FOCUS; /**< window was focused @since 1.1 */
1819 EAPI extern int ECORE_EVAS_EWS_EVENT_UNFOCUS; /**< window lost focus @since 1.1 */
1820 EAPI extern int ECORE_EVAS_EWS_EVENT_RAISE; /**< window was raised @since 1.1 */
1821 EAPI extern int ECORE_EVAS_EWS_EVENT_LOWER; /**< window was lowered @since 1.1 */
1822 EAPI extern int ECORE_EVAS_EWS_EVENT_ACTIVATE; /**< window was activated @since 1.1 */
1823
1824 EAPI extern int ECORE_EVAS_EWS_EVENT_ICONIFIED_CHANGE; /**< window minimized/iconified changed @since 1.1 */
1825 EAPI extern int ECORE_EVAS_EWS_EVENT_MAXIMIZED_CHANGE; /**< window maximized changed @since 1.1 */
1826 EAPI extern int ECORE_EVAS_EWS_EVENT_LAYER_CHANGE; /**< window layer changed @since 1.1 */
1827 EAPI extern int ECORE_EVAS_EWS_EVENT_FULLSCREEN_CHANGE; /**< window fullscreen changed @since 1.1 */
1828 EAPI extern int ECORE_EVAS_EWS_EVENT_CONFIG_CHANGE; /**< some other window property changed (title, name, class, alpha, transparent, shaped...) @since 1.1 */
1829
1830 /**
1831  * @}
1832  */
1833
1834 /**
1835  * @defgroup Ecore_Evas_Extn External plug/socket infrastructure to remote canvases
1836  *
1837  * These functions allow 1 process to create a "socket" was pluged into which another
1838  * process can create a "plug" remotely to plug into.
1839  * Socket can provides content for several plugs.
1840  * This is best for small sized objects (about the size range
1841  * of a small icon up to a few large icons). Sine the plug is actually an
1842  * image object, you can fetch the pixel data
1843  *
1844  * @since 1.2
1845  * @{
1846  */
1847
1848 EAPI extern int ECORE_EVAS_EXTN_CLIENT_ADD; /**< this event is received when a plug has connected to an extn socket @since 1.2 */
1849 EAPI extern int ECORE_EVAS_EXTN_CLIENT_DEL; /**< this event is received when a plug has disconnected from an extn socket @since 1.2 */
1850    
1851 /**
1852  * @brief Create a new Ecore_Evas canvas for the new external ecore evas socket
1853  * 
1854  * @param w The width of the canvas, in pixels
1855  * @param h The height of the canvas, in pixels
1856  * @return A new @c Ecore_Evas instance or @c NULL, on failure
1857  * 
1858  * This creates a new extn_socket canvas wrapper, with image data array
1859  * @b bound to the ARGB format, 8 bits per pixel.
1860  *
1861  * If creation is successful, an Ecore_Evas handle is returned or NULL if creation
1862  * fails. Also focus, show, hide etc. callbacks
1863  * will also be called if the plug object is shown, or already visible on
1864  * connect, or if it is hidden later, focused or unfocused.
1865  *
1866  * This function has to be flowed by ecore_evas_extn_socket_listen(),
1867  * for starting ecore ipc service.
1868  *
1869  * @code
1870  * Eina_Bool res = EINA_FALSE;
1871  * Ecore_Evas *ee = ecore_evas_extn_socket_new(1, 1);
1872  *
1873  * res = ecore_evas_extn_socket_listen("svcname", 1, EINA_FALSE);
1874  * if (!res) return;
1875  * ecore_evas_resize(ee, 240, 400);
1876  * @endcode
1877  *
1878  * or
1879  *
1880  * @code
1881  * Eina_Bool res = EINA_FALSE;
1882  * Ecore_Evas *ee = ecore_evas_extn_socket_new(240, 400);
1883  *
1884  * res = ecore_evas_extn_socket_listen("svcname", 1, EINA_FALSE);
1885  * if (!res) return;
1886  * @endcode
1887  *
1888  * When a client(plug) connects, you will get the ECORE_EVAS_EXTN_CLIENT_ADD event
1889  * in the ecore event queue, with event_info being the image object pointer
1890  * passed as a void pointer. When a client disconnects you will get the
1891  * ECORE_EVAS_EXTN_CLIENT_DEL event.
1892  * 
1893  * You can set up event handles for these events as follows:
1894  * 
1895  * @code
1896  * static void client_add_cb(void *data, int event, void *event_info)
1897  * {
1898  *   Evas_Object *obj = event_info;
1899  *   printf("client added to image object %p\n", obj);
1900  *   evas_object_show(obj);
1901  * }
1902  * 
1903  * static void client_del_cb(void *data, int event, void *event_info)
1904  * {
1905  *   Evas_Object *obj = event_info;
1906  *   printf("client deleted from image object %p\n", obj);
1907  *   evas_object_hide(obj);
1908  * }
1909  * 
1910  * void setup(void)
1911  * {
1912  *   ecore_event_handler_add(ECORE_EVAS_EXTN_CLIENT_ADD,
1913  *                           client_add_cb, NULL);
1914  *   ecore_event_handler_add(ECORE_EVAS_EXTN_CLIENT_DEL,
1915  *                           client_del_cb, NULL);
1916  * }
1917  * @endcode
1918  * 
1919  * Note that events come in later after the event happened. You may want to be
1920  * careful as data structures you had associated with the image object
1921  * may have been freed after deleting, but the object may still be around
1922  * awating cleanup and thus still be valid.You can change the size with something like:
1923  * 
1924  * @see ecore_evas_extn_socket_listen()
1925  * @see ecore_evas_extn_plug_new()
1926  * @see ecore_evas_extn_plug_object_data_lock()
1927  * @see ecore_evas_extn_plug_object_data_unlock()
1928  * 
1929  * @since 1.2
1930  */
1931 EAPI Ecore_Evas *ecore_evas_extn_socket_new(int w, int h);
1932
1933 /**
1934  * @brief Create a socket to provide the service for external ecore evas socket. 
1935  *
1936  * @param ee The Ecore_Evas
1937  * @param svcname The name of the service to be advertised. ensure that it is unique (when combined with @p svcnum) otherwise creation may fail.
1938  * @param svcnum A number (any value, 0 beig the common default) to differentiate multiple instances of services with the same name.
1939  * @param svcsys A boolean that if true, specifies to create a system-wide service all users can connect to, otherwise the service is private to the user ide that created the service.
1940  * @return EINA_TRUE if creation is successful, EINA_FALSE if it does not.
1941  * 
1942  * This creates socket specified by @p svcname, @p svcnum and @p svcsys. If creation
1943  * is successful, EINA_TRUE is returned or EINA_FALSE if creation
1944  * fails. 
1945  *
1946  * @see ecore_evas_extn_socket_new()
1947  * @see ecore_evas_extn_plug_new()
1948  * @see ecore_evas_extn_plug_object_data_lock()
1949  * @see ecore_evas_extn_plug_object_data_unlock()
1950  * 
1951  * @since 1.2
1952  */
1953 EAPI Eina_Bool ecore_evas_extn_socket_listen(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys);
1954
1955 /**
1956  * @brief Lock the pixel data so the socket cannot change it
1957  *
1958  * @param obj The image object returned by ecore_evas_extn_plug_new() to lock
1959  * 
1960  * You may need to get the image pixel data with evas_object_image_data_get()
1961  * from the image object, but need to ensure that it does not change while
1962  * you are using the data. This function lets you set an advisory lock on the
1963  * image data so the external plug process will not render to it or alter it.
1964  * 
1965  * You should only hold the lock for just as long as you need to read out the
1966  * image data or otherwise deal with it, and then unlokc it with
1967  * ecore_evas_extn_plug_object_data_unlock(). Keeping a lock over more than
1968  * 1 iteration of the main ecore loop will be problematic, so avoid it. Also
1969  * forgetting to unlock may cause the socket process to freeze and thus create
1970  * odd behavior.
1971  * 
1972  * @see ecore_evas_extn_plug_new()
1973  * @see ecore_evas_extn_plug_object_data_unlock()
1974  * 
1975  * @since 1.2
1976  */
1977 EAPI void ecore_evas_extn_plug_object_data_lock(Evas_Object *obj);
1978
1979 /**
1980  * @brief Unlock the pixel data so the socket can change it again.
1981  *
1982  * @param obj The image object returned by ecore_evas_extn_plug_new() to unlock
1983  * 
1984  * This unlocks after an advisor lock has been taken by 
1985  * ecore_evas_extn_plug_object_data_lock().
1986  * 
1987  * @see ecore_evas_extn_plug_new()
1988  * @see ecore_evas_extn_plug_object_data_lock()
1989  * 
1990  * @since 1.2
1991  */
1992 EAPI void ecore_evas_extn_plug_object_data_unlock(Evas_Object *obj); 
1993   
1994 /**
1995  * @brief Create a new external ecore evas plug
1996  *
1997  * @param ee_target The Ecore_Evas containing the canvas in which the new image object will live.
1998  * @return An evas image object that will contain the image output of a socket.
1999  * 
2000  * This creates an image object that will contain the output of another
2001  * processes socket canvas when it connects. All input will be sent back to
2002  * this process as well, effectively swallowing or placing the socket process
2003  * in the canvas of the plug process in place of the image object. The image
2004  * object by default is created to be filled (equivalent of
2005  * evas_object_image_filled_add() on creation) so image content will scale
2006  * toi fill the image unless otherwise reconfigured. The Ecore_Evas size
2007  * of the plug is the master size and determines size in pixels of the
2008  * plug canvas. You can change the size with something like:
2009  * 
2010  * @code
2011  * Eina_Bool res = EINA_FALSE;
2012  * Evas_Object *obj = ecore_evas_extn_plug_new(ee);
2013  *
2014  * res = ecore_evas_extn_plug_connect("svcname", 1, EINA_FALSE);
2015  * if (!res) return;
2016  * ecore_evas_resize(ee, 240, 400);
2017  * @endcode
2018  * 
2019  * @see ecore_evas_extn_socket_new()
2020  * @see ecore_evas_extn_plug_connect() 
2021  * @since 1.2
2022  */
2023 EAPI Evas_Object *ecore_evas_extn_plug_new(Ecore_Evas *ee_target);
2024
2025 /**
2026  * @brief Connect a external ecore evas plug to service provided by external ecore evas socket
2027  *
2028  * @param obj The Ecore_Evas containing the canvas in which the new image object will live.
2029  * @param svcname The service name to connect to set up by the socket.
2030  * @param svcnum The service number to connect to (set up by socket).
2031  * @param svcsys Booleain to set if the service is a system one or not (set up by socket).
2032  * @return EINA_TRUE if creation is successful, EINA_FALSE if it does not.
2033  * 
2034  *
2035  * @see ecore_evas_extn_plug_new()
2036  * 
2037  * @since 1.2
2038  */
2039 EAPI Eina_Bool ecore_evas_extn_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys);
2040         
2041 /**
2042  * @}
2043  */
2044
2045 /**
2046  * @}
2047  */
2048
2049 #ifdef __cplusplus
2050 }
2051 #endif
2052
2053 #endif