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