2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
9 #include <Ecore_Getopt.h>
16 # ifdef EFL_ECORE_EVAS_BUILD
18 # define EAPI __declspec(dllexport)
21 # endif /* ! DLL_EXPORT */
23 # define EAPI __declspec(dllimport)
24 # endif /* ! EFL_ECORE_EVAS_BUILD */
28 # define EAPI __attribute__ ((visibility("default")))
39 * @brief Evas wrapper functions
44 * - iconfication api needs to work
45 * - maximization api needs to work
46 * - document all calls
49 * - buffer back-end that renders to an evas_image_object ???
51 * - dfb back-end ??? (dfb's threads make this REALLY HARD)
58 /* these are dummy and just tell u what API levels ecore_evas supports - not if
59 * the actual support is compiled in. you need to query for that separately.
61 #define HAVE_ECORE_EVAS_X 1
62 #define HAVE_ECORE_EVAS_FB 1
63 #define HAVE_ECORE_EVAS_X11_GL 1
64 #define HAVE_ECORE_EVAS_X11_16 1
65 #define HAVE_ECORE_EVAS_DIRECTFB 1
66 #define HAVE_ECORE_EVAS_WIN32 1
67 #define HAVE_ECORE_EVAS_COCOA 1
68 #define HAVE_ECORE_EVAS_SDL 1
69 #define HAVE_ECORE_EVAS_WINCE 1
71 typedef enum _Ecore_Evas_Engine_Type
73 ECORE_EVAS_ENGINE_SOFTWARE_BUFFER,
74 ECORE_EVAS_ENGINE_SOFTWARE_XLIB,
75 ECORE_EVAS_ENGINE_XRENDER_X11,
76 ECORE_EVAS_ENGINE_OPENGL_X11,
77 ECORE_EVAS_ENGINE_SOFTWARE_XCB,
78 ECORE_EVAS_ENGINE_XRENDER_XCB,
79 ECORE_EVAS_ENGINE_SOFTWARE_GDI,
80 ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
81 ECORE_EVAS_ENGINE_DIRECT3D,
82 ECORE_EVAS_ENGINE_OPENGL_GLEW,
83 ECORE_EVAS_ENGINE_COCOA,
84 ECORE_EVAS_ENGINE_SOFTWARE_SDL,
85 ECORE_EVAS_ENGINE_DIRECTFB,
86 ECORE_EVAS_ENGINE_SOFTWARE_FB,
87 ECORE_EVAS_ENGINE_SOFTWARE_16_X11,
88 ECORE_EVAS_ENGINE_SOFTWARE_16_DDRAW,
89 ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE,
90 ECORE_EVAS_ENGINE_OPENGL_SDL
91 } Ecore_Evas_Engine_Type;
93 typedef enum _Ecore_Evas_Avoid_Damage_Type
95 ECORE_EVAS_AVOID_DAMAGE_NONE = 0,
96 ECORE_EVAS_AVOID_DAMAGE_EXPOSE = 1,
97 ECORE_EVAS_AVOID_DAMAGE_BUILT_IN = 2
98 } Ecore_Evas_Avoid_Damage_Type;
100 typedef enum _Ecore_Evas_Object_Associate_Flags
102 ECORE_EVAS_OBJECT_ASSOCIATE_BASE = 0,
103 ECORE_EVAS_OBJECT_ASSOCIATE_STACK = 1 << 0,
104 ECORE_EVAS_OBJECT_ASSOCIATE_LAYER = 1 << 1,
105 ECORE_EVAS_OBJECT_ASSOCIATE_DEL = 1 << 2
106 } Ecore_Evas_Object_Associate_Flags;
109 #define _ECORE_X_WINDOW_PREDEF
110 typedef unsigned int Ecore_X_Window;
113 #ifndef _ECORE_DIRECTFB_H
114 #define _ECORE_DIRECTFB_WINDOW_PREDEF
115 typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
118 #ifndef __ECORE_WIN32_H__
119 typedef struct _Ecore_Win32_Window Ecore_Win32_Window;
122 #ifndef __ECORE_WINCE_H__
123 typedef void Ecore_WinCE_Window;
126 #ifndef _ECORE_EVAS_PRIVATE_H
127 /* basic data types */
128 typedef struct _Ecore_Evas Ecore_Evas;
131 #include <Ecore_Input.h>
133 /* module setup/shutdown calls */
135 EAPI int ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine);
137 EAPI int ecore_evas_init(void);
138 EAPI int ecore_evas_shutdown(void);
140 EAPI void ecore_evas_app_comp_sync_set(int do_sync);
141 EAPI int ecore_evas_app_comp_sync_get(void);
143 EAPI Eina_List *ecore_evas_engines_get(void);
144 EAPI void ecore_evas_engines_free(Eina_List *engines);
145 EAPI Ecore_Evas *ecore_evas_new(const char *engine_name, int x, int y, int w, int h, const char *extra_options);
148 /* engine/target specific init calls */
149 EAPI Ecore_Evas *ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
150 EAPI Ecore_X_Window ecore_evas_software_x11_window_get(const Ecore_Evas *ee);
151 EAPI void ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee, int on);
152 EAPI int ecore_evas_software_x11_direct_resize_get(const Ecore_Evas *ee);
153 EAPI void ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
155 #define ECORE_EVAS_GL_X11_OPT_NONE 0
156 #define ECORE_EVAS_GL_X11_OPT_INDIRECT 1
157 #define ECORE_EVAS_GL_X11_OPT_LAST 2
159 EAPI Ecore_Evas *ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
160 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);
161 EAPI Ecore_X_Window ecore_evas_gl_x11_window_get(const Ecore_Evas *ee);
162 EAPI void ecore_evas_gl_x11_direct_resize_set(Ecore_Evas *ee, int on);
163 EAPI int ecore_evas_gl_x11_direct_resize_get(const Ecore_Evas *ee);
164 EAPI void ecore_evas_gl_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
165 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));
167 EAPI Ecore_Evas *ecore_evas_xrender_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
168 EAPI Ecore_X_Window ecore_evas_xrender_x11_window_get(const Ecore_Evas *ee);
169 EAPI void ecore_evas_xrender_x11_direct_resize_set(Ecore_Evas *ee, int on);
170 EAPI int ecore_evas_xrender_x11_direct_resize_get(const Ecore_Evas *ee);
171 EAPI void ecore_evas_xrender_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
173 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);
174 EAPI Ecore_X_Window ecore_evas_software_x11_16_window_get(const Ecore_Evas *ee);
175 EAPI void ecore_evas_software_x11_16_direct_resize_set(Ecore_Evas *ee, int on);
176 EAPI int ecore_evas_software_x11_16_direct_resize_get(const Ecore_Evas *ee);
177 EAPI void ecore_evas_software_x11_16_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
179 EAPI Ecore_Evas *ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h);
181 EAPI Ecore_Evas *ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w, int h);
182 EAPI Ecore_DirectFB_Window *ecore_evas_directfb_window_get(const Ecore_Evas *ee);
184 EAPI Ecore_Evas *ecore_evas_buffer_new(int w, int h);
185 EAPI const void *ecore_evas_buffer_pixels_get(Ecore_Evas *ee);
187 EAPI Evas_Object *ecore_evas_object_image_new(Ecore_Evas *ee_target);
189 EAPI Ecore_Evas *ecore_evas_software_gdi_new(Ecore_Win32_Window *parent,
195 EAPI Ecore_Evas *ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
201 EAPI Ecore_Evas *ecore_evas_software_16_ddraw_new(Ecore_Win32_Window *parent,
207 EAPI Ecore_Evas *ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
213 EAPI Ecore_Evas *ecore_evas_gl_glew_new(Ecore_Win32_Window *parent,
219 EAPI Ecore_Win32_Window *ecore_evas_win32_window_get(const Ecore_Evas *ee);
221 EAPI Ecore_Evas *ecore_evas_sdl_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha);
222 EAPI Ecore_Evas *ecore_evas_sdl16_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha);
223 EAPI Ecore_Evas *ecore_evas_gl_sdl_new(const char* name, int w, int h, int fullscreen, int noframe);
225 EAPI Ecore_Evas *ecore_evas_software_wince_new(Ecore_WinCE_Window *parent,
231 EAPI Ecore_Evas *ecore_evas_software_wince_fb_new(Ecore_WinCE_Window *parent,
237 EAPI Ecore_Evas *ecore_evas_software_wince_gapi_new(Ecore_WinCE_Window *parent,
243 EAPI Ecore_Evas *ecore_evas_software_wince_ddraw_new(Ecore_WinCE_Window *parent,
249 EAPI Ecore_Evas *ecore_evas_software_wince_gdi_new(Ecore_WinCE_Window *parent,
255 EAPI Ecore_WinCE_Window *ecore_evas_software_wince_window_get(const Ecore_Evas *ee);
257 EAPI Ecore_Evas *ecore_evas_cocoa_new(const char* name, int w, int h);
259 /* generic manipulation calls */
260 EAPI const char *ecore_evas_engine_name_get(const Ecore_Evas *ee);
261 EAPI Ecore_Evas *ecore_evas_ecore_evas_get(const Evas *e);
262 EAPI void ecore_evas_free(Ecore_Evas *ee);
263 EAPI void *ecore_evas_data_get(const Ecore_Evas *ee, const char *key);
264 EAPI void ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data);
265 EAPI void ecore_evas_callback_resize_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
266 EAPI void ecore_evas_callback_move_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
267 EAPI void ecore_evas_callback_show_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
268 EAPI void ecore_evas_callback_hide_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
269 EAPI void ecore_evas_callback_delete_request_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
270 EAPI void ecore_evas_callback_destroy_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
271 EAPI void ecore_evas_callback_focus_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
272 EAPI void ecore_evas_callback_focus_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
273 EAPI void ecore_evas_callback_sticky_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
274 EAPI void ecore_evas_callback_unsticky_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
275 EAPI void ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
276 EAPI void ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
277 EAPI void ecore_evas_callback_pre_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
278 EAPI void ecore_evas_callback_post_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
279 EAPI void ecore_evas_callback_pre_free_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
280 EAPI Evas *ecore_evas_get(const Ecore_Evas *ee);
281 EAPI void ecore_evas_move(Ecore_Evas *ee, int x, int y);
282 EAPI void ecore_evas_managed_move(Ecore_Evas *ee, int x, int y);
283 EAPI void ecore_evas_resize(Ecore_Evas *ee, int w, int h);
284 EAPI void ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h);
285 EAPI void ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
286 EAPI void ecore_evas_rotation_set(Ecore_Evas *ee, int rot);
287 EAPI void ecore_evas_rotation_with_resize_set(Ecore_Evas *ee, int rot);
288 EAPI int ecore_evas_rotation_get(const Ecore_Evas *ee);
289 EAPI void ecore_evas_shaped_set(Ecore_Evas *ee, int shaped);
290 EAPI int ecore_evas_shaped_get(const Ecore_Evas *ee);
291 EAPI void ecore_evas_alpha_set(Ecore_Evas *ee, int alpha);
292 EAPI int ecore_evas_alpha_get(const Ecore_Evas *ee);
293 EAPI void ecore_evas_transparent_set(Ecore_Evas *ee, int transparent);
294 EAPI int ecore_evas_transparent_get(const Ecore_Evas *ee);
295 EAPI void ecore_evas_show(Ecore_Evas *ee);
296 EAPI void ecore_evas_hide(Ecore_Evas *ee);
297 EAPI int ecore_evas_visibility_get(const Ecore_Evas *ee);
298 EAPI void ecore_evas_raise(Ecore_Evas *ee);
299 EAPI void ecore_evas_lower(Ecore_Evas *ee);
300 EAPI void ecore_evas_activate(Ecore_Evas *ee);
301 EAPI void ecore_evas_title_set(Ecore_Evas *ee, const char *t);
302 EAPI const char *ecore_evas_title_get(const Ecore_Evas *ee);
303 EAPI void ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, const char *c);
304 EAPI void ecore_evas_name_class_get(const Ecore_Evas *ee, const char **n, const char **c);
305 EAPI void ecore_evas_size_min_set(Ecore_Evas *ee, int w, int h);
306 EAPI void ecore_evas_size_min_get(const Ecore_Evas *ee, int *w, int *h);
307 EAPI void ecore_evas_size_max_set(Ecore_Evas *ee, int w, int h);
308 EAPI void ecore_evas_size_max_get(const Ecore_Evas *ee, int *w, int *h);
309 EAPI void ecore_evas_size_base_set(Ecore_Evas *ee, int w, int h);
310 EAPI void ecore_evas_size_base_get(const Ecore_Evas *ee, int *w, int *h);
311 EAPI void ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h);
312 EAPI void ecore_evas_size_step_get(const Ecore_Evas *ee, int *w, int *h);
313 EAPI void ecore_evas_cursor_set(Ecore_Evas *ee, const char *file, int layer, int hot_x, int hot_y);
314 EAPI void ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y);
315 EAPI void ecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object **obj, int *layer, int *hot_x, int *hot_y);
316 EAPI void ecore_evas_layer_set(Ecore_Evas *ee, int layer);
317 EAPI int ecore_evas_layer_get(const Ecore_Evas *ee);
318 EAPI void ecore_evas_focus_set(Ecore_Evas *ee, int on);
319 EAPI int ecore_evas_focus_get(const Ecore_Evas *ee);
320 EAPI void ecore_evas_iconified_set(Ecore_Evas *ee, int on);
321 EAPI int ecore_evas_iconified_get(const Ecore_Evas *ee);
322 EAPI void ecore_evas_borderless_set(Ecore_Evas *ee, int on);
323 EAPI int ecore_evas_borderless_get(const Ecore_Evas *ee);
324 EAPI void ecore_evas_override_set(Ecore_Evas *ee, int on);
325 EAPI int ecore_evas_override_get(const Ecore_Evas *ee);
326 EAPI void ecore_evas_maximized_set(Ecore_Evas *ee, int on);
327 EAPI int ecore_evas_maximized_get(const Ecore_Evas *ee);
328 EAPI void ecore_evas_fullscreen_set(Ecore_Evas *ee, int on);
329 EAPI int ecore_evas_fullscreen_get(const Ecore_Evas *ee);
330 EAPI void ecore_evas_avoid_damage_set(Ecore_Evas *ee, Ecore_Evas_Avoid_Damage_Type on);
331 EAPI Ecore_Evas_Avoid_Damage_Type ecore_evas_avoid_damage_get(const Ecore_Evas *ee);
332 EAPI void ecore_evas_withdrawn_set(Ecore_Evas *ee, int withdrawn);
333 EAPI int ecore_evas_withdrawn_get(const Ecore_Evas *ee);
334 EAPI void ecore_evas_sticky_set(Ecore_Evas *ee, int sticky);
335 EAPI int ecore_evas_sticky_get(const Ecore_Evas *ee);
336 EAPI void ecore_evas_ignore_events_set(Ecore_Evas *ee, int ignore);
337 EAPI int ecore_evas_ignore_events_get(const Ecore_Evas *ee);
338 EAPI void ecore_evas_manual_render_set(Ecore_Evas *ee, int manual_render);
339 EAPI int ecore_evas_manual_render_get(const Ecore_Evas *ee);
340 EAPI void ecore_evas_manual_render(Ecore_Evas *ee);
341 EAPI void ecore_evas_comp_sync_set(Ecore_Evas *ee, int do_sync);
342 EAPI int ecore_evas_comp_sync_get(const Ecore_Evas *ee);
344 EAPI Ecore_Window ecore_evas_window_get(const Ecore_Evas *ee);
347 EAPI int ecore_evas_object_associate(Ecore_Evas *ee, Evas_Object *obj, Ecore_Evas_Object_Associate_Flags flags);
348 EAPI int ecore_evas_object_dissociate(Ecore_Evas *ee, Evas_Object *obj);
349 EAPI Evas_Object *ecore_evas_object_associate_get(const Ecore_Evas *ee);
351 /* helper function to be used with ECORE_GETOPT_CALLBACK_*() */
352 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);