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_SDL 1
68 #define HAVE_ECORE_EVAS_WINCE 1
70 typedef enum _Ecore_Evas_Engine_Type
72 ECORE_EVAS_ENGINE_SOFTWARE_BUFFER,
73 ECORE_EVAS_ENGINE_SOFTWARE_X11,
74 ECORE_EVAS_ENGINE_XRENDER_X11,
75 ECORE_EVAS_ENGINE_OPENGL_X11,
76 ECORE_EVAS_ENGINE_SOFTWARE_XCB,
77 ECORE_EVAS_ENGINE_XRENDER_XCB,
78 ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
79 ECORE_EVAS_ENGINE_DIRECT3D,
80 ECORE_EVAS_ENGINE_OPENGL_GLEW,
81 ECORE_EVAS_ENGINE_SDL,
82 ECORE_EVAS_ENGINE_DIRECTFB,
83 ECORE_EVAS_ENGINE_SOFTWARE_FB,
84 ECORE_EVAS_ENGINE_SOFTWARE_16_X11,
85 ECORE_EVAS_ENGINE_SOFTWARE_16_DDRAW,
86 ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE
87 } Ecore_Evas_Engine_Type;
89 typedef enum _Ecore_Evas_Avoid_Damage_Type
91 ECORE_EVAS_AVOID_DAMAGE_NONE = 0,
92 ECORE_EVAS_AVOID_DAMAGE_EXPOSE = 1,
93 ECORE_EVAS_AVOID_DAMAGE_BUILT_IN = 2
94 } Ecore_Evas_Avoid_Damage_Type;
96 typedef enum _Ecore_Evas_Object_Associate_Flags
98 ECORE_EVAS_OBJECT_ASSOCIATE_BASE = 0,
99 ECORE_EVAS_OBJECT_ASSOCIATE_STACK = 1 << 0,
100 ECORE_EVAS_OBJECT_ASSOCIATE_LAYER = 1 << 1,
101 ECORE_EVAS_OBJECT_ASSOCIATE_DEL = 1 << 2
102 } Ecore_Evas_Object_Associate_Flags;
105 #define _ECORE_X_WINDOW_PREDEF
106 typedef unsigned int Ecore_X_Window;
109 #ifndef _ECORE_DIRECTFB_H
110 #define _ECORE_DIRECTFB_WINDOW_PREDEF
111 typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
114 #ifndef __ECORE_WIN32_H__
115 typedef void Ecore_Win32_Window;
118 #ifndef __ECORE_WINCE_H__
119 typedef void Ecore_WinCE_Window;
122 #ifndef _ECORE_EVAS_PRIVATE_H
123 /* basic data types */
124 typedef struct _Ecore_Evas Ecore_Evas;
127 /* module setup/shutdown calls */
129 EAPI int ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine);
131 EAPI int ecore_evas_init(void);
132 EAPI int ecore_evas_shutdown(void);
134 EAPI Eina_List *ecore_evas_engines_get(void);
135 EAPI void ecore_evas_engines_free(Eina_List *engines);
136 EAPI Ecore_Evas *ecore_evas_new(const char *engine_name, int x, int y, int w, int h, const char *extra_options);
139 /* engine/target specific init calls */
140 EAPI Ecore_Evas *ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
141 EAPI Ecore_X_Window ecore_evas_software_x11_window_get(const Ecore_Evas *ee);
142 EAPI Ecore_X_Window ecore_evas_software_x11_subwindow_get(const Ecore_Evas *ee);
143 EAPI void ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee, int on);
144 EAPI int ecore_evas_software_x11_direct_resize_get(const Ecore_Evas *ee);
145 EAPI void ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
147 EAPI Ecore_Evas *ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
148 EAPI Ecore_X_Window ecore_evas_gl_x11_window_get(const Ecore_Evas *ee);
149 EAPI Ecore_X_Window ecore_evas_gl_x11_subwindow_get(const Ecore_Evas *ee);
150 EAPI void ecore_evas_gl_x11_direct_resize_set(Ecore_Evas *ee, int on);
151 EAPI int ecore_evas_gl_x11_direct_resize_get(const Ecore_Evas *ee);
152 EAPI void ecore_evas_gl_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
154 EAPI Ecore_Evas *ecore_evas_xrender_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
155 EAPI Ecore_X_Window ecore_evas_xrender_x11_window_get(const Ecore_Evas *ee);
156 EAPI Ecore_X_Window ecore_evas_xrender_x11_subwindow_get(const Ecore_Evas *ee);
157 EAPI void ecore_evas_xrender_x11_direct_resize_set(Ecore_Evas *ee, int on);
158 EAPI int ecore_evas_xrender_x11_direct_resize_get(const Ecore_Evas *ee);
159 EAPI void ecore_evas_xrender_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
161 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);
162 EAPI Ecore_X_Window ecore_evas_software_x11_16_window_get(const Ecore_Evas *ee);
163 EAPI Ecore_X_Window ecore_evas_software_x11_16_subwindow_get(const Ecore_Evas *ee);
164 EAPI void ecore_evas_software_x11_16_direct_resize_set(Ecore_Evas *ee, int on);
165 EAPI int ecore_evas_software_x11_16_direct_resize_get(const Ecore_Evas *ee);
166 EAPI void ecore_evas_software_x11_16_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
168 EAPI Ecore_Evas *ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h);
170 EAPI Ecore_Evas *ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w, int h);
171 EAPI Ecore_DirectFB_Window *ecore_evas_directfb_window_get(const Ecore_Evas *ee);
173 EAPI Ecore_Evas *ecore_evas_buffer_new(int w, int h);
174 EAPI const void *ecore_evas_buffer_pixels_get(Ecore_Evas *ee);
176 EAPI Evas_Object *ecore_evas_object_image_new(Ecore_Evas *ee_target);
178 EAPI Ecore_Evas *ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
184 EAPI Ecore_Evas *ecore_evas_software_ddraw_16_new(Ecore_Win32_Window *parent,
190 EAPI Ecore_Evas *ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
196 EAPI Ecore_Evas *ecore_evas_gl_glew_new(Ecore_Win32_Window *parent,
202 EAPI Ecore_Win32_Window *ecore_evas_win32_window_get(const Ecore_Evas *ee);
204 EAPI Ecore_Evas *ecore_evas_sdl_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha);
205 EAPI Ecore_Evas *ecore_evas_sdl16_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha);
207 EAPI Ecore_Evas *ecore_evas_software_wince_new(Ecore_WinCE_Window *parent,
213 EAPI Ecore_Evas *ecore_evas_software_wince_fb_new(Ecore_WinCE_Window *parent,
219 EAPI Ecore_Evas *ecore_evas_software_wince_gapi_new(Ecore_WinCE_Window *parent,
225 EAPI Ecore_Evas *ecore_evas_software_wince_ddraw_new(Ecore_WinCE_Window *parent,
231 EAPI Ecore_Evas *ecore_evas_software_wince_gdi_new(Ecore_WinCE_Window *parent,
237 EAPI Ecore_WinCE_Window *ecore_evas_software_wince_window_get(const Ecore_Evas *ee);
239 /* generic manipulation calls */
240 EAPI const char *ecore_evas_engine_name_get(const Ecore_Evas *ee);
241 EAPI Ecore_Evas *ecore_evas_ecore_evas_get(const Evas *e);
242 EAPI void ecore_evas_free(Ecore_Evas *ee);
243 EAPI void *ecore_evas_data_get(const Ecore_Evas *ee, const char *key);
244 EAPI void ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data);
245 EAPI void ecore_evas_callback_resize_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
246 EAPI void ecore_evas_callback_move_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
247 EAPI void ecore_evas_callback_show_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
248 EAPI void ecore_evas_callback_hide_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
249 EAPI void ecore_evas_callback_delete_request_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
250 EAPI void ecore_evas_callback_destroy_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
251 EAPI void ecore_evas_callback_focus_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
252 EAPI void ecore_evas_callback_focus_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
253 EAPI void ecore_evas_callback_sticky_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
254 EAPI void ecore_evas_callback_unsticky_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
255 EAPI void ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
256 EAPI void ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
257 EAPI void ecore_evas_callback_pre_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
258 EAPI void ecore_evas_callback_post_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
259 EAPI void ecore_evas_callback_pre_free_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee));
260 EAPI Evas *ecore_evas_get(const Ecore_Evas *ee);
261 EAPI void ecore_evas_move(Ecore_Evas *ee, int x, int y);
262 EAPI void ecore_evas_managed_move(Ecore_Evas *ee, int x, int y);
263 EAPI void ecore_evas_resize(Ecore_Evas *ee, int w, int h);
264 EAPI void ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h);
265 EAPI void ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
266 EAPI void ecore_evas_rotation_set(Ecore_Evas *ee, int rot);
267 EAPI int ecore_evas_rotation_get(const Ecore_Evas *ee);
268 EAPI void ecore_evas_shaped_set(Ecore_Evas *ee, int shaped);
269 EAPI int ecore_evas_shaped_get(const Ecore_Evas *ee);
270 EAPI void ecore_evas_alpha_set(Ecore_Evas *ee, int alpha);
271 EAPI int ecore_evas_alpha_get(const Ecore_Evas *ee);
272 EAPI void ecore_evas_show(Ecore_Evas *ee);
273 EAPI void ecore_evas_hide(Ecore_Evas *ee);
274 EAPI int ecore_evas_visibility_get(const Ecore_Evas *ee);
275 EAPI void ecore_evas_raise(Ecore_Evas *ee);
276 EAPI void ecore_evas_lower(Ecore_Evas *ee);
277 EAPI void ecore_evas_activate(Ecore_Evas *ee);
278 EAPI void ecore_evas_title_set(Ecore_Evas *ee, const char *t);
279 EAPI const char *ecore_evas_title_get(const Ecore_Evas *ee);
280 EAPI void ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, const char *c);
281 EAPI void ecore_evas_name_class_get(const Ecore_Evas *ee, const char **n, const char **c);
282 EAPI void ecore_evas_size_min_set(Ecore_Evas *ee, int w, int h);
283 EAPI void ecore_evas_size_min_get(const Ecore_Evas *ee, int *w, int *h);
284 EAPI void ecore_evas_size_max_set(Ecore_Evas *ee, int w, int h);
285 EAPI void ecore_evas_size_max_get(const Ecore_Evas *ee, int *w, int *h);
286 EAPI void ecore_evas_size_base_set(Ecore_Evas *ee, int w, int h);
287 EAPI void ecore_evas_size_base_get(const Ecore_Evas *ee, int *w, int *h);
288 EAPI void ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h);
289 EAPI void ecore_evas_size_step_get(const Ecore_Evas *ee, int *w, int *h);
290 EAPI void ecore_evas_cursor_set(Ecore_Evas *ee, const char *file, int layer, int hot_x, int hot_y);
291 EAPI void ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y);
292 EAPI void ecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object **obj, int *layer, int *hot_x, int *hot_y);
293 EAPI void ecore_evas_layer_set(Ecore_Evas *ee, int layer);
294 EAPI int ecore_evas_layer_get(const Ecore_Evas *ee);
295 EAPI void ecore_evas_focus_set(Ecore_Evas *ee, int on);
296 EAPI int ecore_evas_focus_get(const Ecore_Evas *ee);
297 EAPI void ecore_evas_iconified_set(Ecore_Evas *ee, int on);
298 EAPI int ecore_evas_iconified_get(const Ecore_Evas *ee);
299 EAPI void ecore_evas_borderless_set(Ecore_Evas *ee, int on);
300 EAPI int ecore_evas_borderless_get(const Ecore_Evas *ee);
301 EAPI void ecore_evas_override_set(Ecore_Evas *ee, int on);
302 EAPI int ecore_evas_override_get(const Ecore_Evas *ee);
303 EAPI void ecore_evas_maximized_set(Ecore_Evas *ee, int on);
304 EAPI int ecore_evas_maximized_get(const Ecore_Evas *ee);
305 EAPI void ecore_evas_fullscreen_set(Ecore_Evas *ee, int on);
306 EAPI int ecore_evas_fullscreen_get(const Ecore_Evas *ee);
307 EAPI void ecore_evas_avoid_damage_set(Ecore_Evas *ee, Ecore_Evas_Avoid_Damage_Type on);
308 EAPI Ecore_Evas_Avoid_Damage_Type ecore_evas_avoid_damage_get(const Ecore_Evas *ee);
309 EAPI void ecore_evas_withdrawn_set(Ecore_Evas *ee, int withdrawn);
310 EAPI int ecore_evas_withdrawn_get(const Ecore_Evas *ee);
311 EAPI void ecore_evas_sticky_set(Ecore_Evas *ee, int sticky);
312 EAPI int ecore_evas_sticky_get(const Ecore_Evas *ee);
313 EAPI void ecore_evas_ignore_events_set(Ecore_Evas *ee, int ignore);
314 EAPI int ecore_evas_ignore_events_get(const Ecore_Evas *ee);
315 EAPI void *ecore_evas_window_get(const Ecore_Evas *ee);
318 EAPI int ecore_evas_object_associate(Ecore_Evas *ee, Evas_Object *obj, Ecore_Evas_Object_Associate_Flags flags);
319 EAPI int ecore_evas_object_dissociate(Ecore_Evas *ee, Evas_Object *obj);
320 EAPI Evas_Object *ecore_evas_object_associate_get(const Ecore_Evas *ee);
322 /* helper function to be used with ECORE_GETOPT_CALLBACK_*() */
323 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);