summaryrefslogtreecommitdiff
path: root/legacy/evas/src
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2010-03-18 04:57:40 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2010-03-18 04:57:40 +0000
commitfd2659c57275248abca559d22c1a478586373e7f (patch)
tree912388ef90b62cf5182e45d0be469dd82d81b1e2 /legacy/evas/src
parent57036495671e54704744387cc201636602dcfe8a (diff)
evas: mega documentation improving commit.
This commit moves Evas.h contents a lot, but it should not change code (some conts were added, some function attributes were changed). The purpose of such is to define the order that doxygen show modules in its documentation. I also splitted documentation a bit more, and added a src/examples to list useful example code. Right now it is just a pure-evas draw-and-save using buffer engine. NOTE: there is lots to document, and the @todo list is quite long but I guess lots of things there were done already. Raster, could you review this list? SVN revision: 47308
Diffstat (limited to 'legacy/evas/src')
-rw-r--r--legacy/evas/src/Makefile.am2
-rw-r--r--legacy/evas/src/examples/Makefile.am43
-rw-r--r--legacy/evas/src/examples/evas-buffer-simple.c228
-rw-r--r--legacy/evas/src/lib/Evas.h1930
-rw-r--r--legacy/evas/src/lib/canvas/evas_async_events.c3
-rw-r--r--legacy/evas/src/lib/canvas/evas_callbacks.c165
-rw-r--r--legacy/evas/src/lib/canvas/evas_clip.c2
-rw-r--r--legacy/evas/src/lib/canvas/evas_data.c2
-rw-r--r--legacy/evas/src/lib/canvas/evas_events.c38
-rw-r--r--legacy/evas/src/lib/canvas/evas_focus.c10
-rw-r--r--legacy/evas/src/lib/canvas/evas_layer.c3
-rw-r--r--legacy/evas/src/lib/canvas/evas_main.c109
-rw-r--r--legacy/evas/src/lib/canvas/evas_map.c19
-rw-r--r--legacy/evas/src/lib/canvas/evas_name.c11
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_box.c1
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_gradient.c22
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_gradient2.c9
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_image.c94
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_intercept.c9
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_line.c6
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_main.c83
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_polygon.c7
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_rectangle.c6
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_smart.c14
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_smart_clipped.c2
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_text.c80
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_textblock.c20
-rw-r--r--legacy/evas/src/lib/canvas/evas_render.c15
-rw-r--r--legacy/evas/src/lib/canvas/evas_smart.c7
-rw-r--r--legacy/evas/src/lib/canvas/evas_stack.c34
-rw-r--r--legacy/evas/src/lib/canvas/evas_stats.c38
-rw-r--r--legacy/evas/src/lib/canvas/evas_transform.c45
-rw-r--r--legacy/evas/src/lib/imaging/evas_imaging.c8
-rw-r--r--legacy/evas/src/lib/main.c2
34 files changed, 2058 insertions, 1009 deletions
diff --git a/legacy/evas/src/Makefile.am b/legacy/evas/src/Makefile.am
index 1f52208..8828c78 100644
--- a/legacy/evas/src/Makefile.am
+++ b/legacy/evas/src/Makefile.am
@@ -1,3 +1,3 @@
1MAINTAINERCLEANFILES = Makefile.in 1MAINTAINERCLEANFILES = Makefile.in
2 2
3SUBDIRS = lib bin modules 3SUBDIRS = lib bin modules examples
diff --git a/legacy/evas/src/examples/Makefile.am b/legacy/evas/src/examples/Makefile.am
new file mode 100644
index 0000000..746146d
--- /dev/null
+++ b/legacy/evas/src/examples/Makefile.am
@@ -0,0 +1,43 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3pkglibdir = $(datadir)/$(PACKAGE)/examples
4
5if BUILD_EXAMPLES
6
7AM_CPPFLAGS = \
8-I. \
9-I$(top_srcdir)/src/lib \
10-I$(top_srcdir)/src/lib/include \
11-DPACKAGE_BIN_DIR=\"$(bindir)\" \
12-DPACKAGE_LIB_DIR=\"$(libdir)\" \
13-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
14@EINA_CFLAGS@ \
15@FREETYPE_CFLAGS@ \
16@FRIBIDI_CFLAGS@ \
17@EET_CFLAGS@ \
18@FONTCONFIG_CFLAGS@ \
19@pthread_cflags@
20
21AM_CFLAGS = @WIN32_CFLAGS@
22
23pkglib_PROGRAMS =
24
25if BUILD_ENGINE_BUFFER
26AM_CPPFLAGS += -I$(top_srcdir)/src/modules/engines/buffer
27
28pkglib_PROGRAMS += evas_buffer_simple
29evas_buffer_simple_SOURCES = evas-buffer-simple.c
30evas_buffer_simple_LDADD = $(top_builddir)/src/lib/libevas.la
31endif
32
33endif
34
35
36
37filesdir = $(datadir)/$(PACKAGE)/examples
38files_DATA =
39
40if INSTALL_EXAMPLES
41files_DATA += \
42 evas-buffer-simple.c
43endif
diff --git a/legacy/evas/src/examples/evas-buffer-simple.c b/legacy/evas/src/examples/evas-buffer-simple.c
new file mode 100644
index 0000000..6676ef1
--- /dev/null
+++ b/legacy/evas/src/examples/evas-buffer-simple.c
@@ -0,0 +1,228 @@
1/**
2 * Simple Evas example using the Buffer engine.
3 *
4 * You must have Evas compiled with the buffer engine, and have the
5 * evas-software-buffer pkg-config files installed.
6 *
7 * Compile with:
8 *
9 * @verbatim
10 * gcc -o evas-buffer-simple evas-buffer-simple.c `pkg-config --libs --cflags evas evas-software-buffer`
11 * @endverbatim
12 *
13 */
14#include <Evas.h>
15#include <Evas_Engine_Buffer.h>
16#include <stdio.h>
17#include <errno.h>
18
19#define WIDTH (320)
20#define HEIGHT (240)
21
22/*
23 * create_canvas(), destroy_canvas() and draw_scene() are support functions.
24 *
25 * They are only required to use raw Evas, but for real world usage,
26 * it is recommended to use ecore and its ecore-evas submodule, that
27 * provide convenience canvas creators, integration with main loop and
28 * automatic render of updates (draw_scene()) when system goes back to
29 * main loop.
30 */
31static Evas *create_canvas(int width, int height);
32static void destroy_canvas(Evas *canvas);
33static void draw_scene(Evas *canvas);
34
35// support function to save scene as PPM image
36static void save_scene(Evas *canvas, const char *dest);
37
38int main(void)
39{
40 Evas *canvas;
41 Evas_Object *bg, *r1, *r2, *r3;
42
43 evas_init();
44
45 // create your canvas
46 // NOTE: consider using ecore_evas_buffer_new() instead!
47 canvas = create_canvas(WIDTH, HEIGHT);
48 if (!canvas)
49 return -1;
50
51 bg = evas_object_rectangle_add(canvas);
52 evas_object_color_set(bg, 255, 255, 255, 255); // white bg
53 evas_object_move(bg, 0, 0); // at origin
54 evas_object_resize(bg, WIDTH, HEIGHT); // covers full canvas
55 evas_object_show(bg);
56
57 puts("initial scene, with just background:");
58 draw_scene(canvas);
59
60 r1 = evas_object_rectangle_add(canvas);
61 evas_object_color_set(r1, 255, 0, 0, 255); // 100% opaque red
62 evas_object_move(r1, 10, 10);
63 evas_object_resize(r1, 100, 100);
64 evas_object_show(r1);
65
66 // pay attention to transparency! Evas color values are pre-multiplied by
67 // alpha, so 50% opaque green is:
68 // non-premul: r=0, g=255, b=0 a=128 (50% alpha)
69 // premul:
70 // r_premul = r * a / 255 = 0 * 128 / 255 = 0
71 // g_premul = g * a / 255 = 255 * 128 / 255 = 128
72 // b_premul = b * a / 255 = 0 * 128 / 255 = 0
73 //
74 // this 50% green is over a red background, so it will show in the
75 // final output as yellow (green + red = yellow)
76 r2 = evas_object_rectangle_add(canvas);
77 evas_object_color_set(r2, 0, 128, 0, 128); // 50% opaque green
78 evas_object_move(r2, 10, 10);
79 evas_object_resize(r2, 50, 50);
80 evas_object_show(r2);
81
82 r3 = evas_object_rectangle_add(canvas);
83 evas_object_color_set(r3, 0, 128, 0, 255); // 100% opaque dark green
84 evas_object_move(r3, 60, 60);
85 evas_object_resize(r3, 50, 50);
86 evas_object_show(r3);
87
88 puts("final scene (note updates):");
89 draw_scene(canvas);
90 save_scene(canvas, "/tmp/evas-buffer-simple-render.ppm");
91
92 // NOTE: use ecore_evas_buffer_new() and here ecore_evas_free()
93 destroy_canvas(canvas);
94
95 evas_shutdown();
96
97 return 0;
98}
99
100static Evas *create_canvas(int width, int height)
101{
102 Evas *canvas;
103 Evas_Engine_Info_Buffer *einfo;
104 int method;
105 void *pixels;
106
107 method = evas_render_method_lookup("buffer");
108 if (method <= 0)
109 {
110 fputs("ERROR: evas was not compiled with 'buffer' engine!\n", stderr);
111 return NULL;
112 }
113
114 canvas = evas_new();
115 if (!canvas)
116 {
117 fputs("ERROR: could not instantiate new evas canvas.\n", stderr);
118 return NULL;
119 }
120
121 evas_output_method_set(canvas, method);
122 evas_output_size_set(canvas, width, height);
123 evas_output_viewport_set(canvas, 0, 0, width, height);
124
125 einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas);
126 if (!einfo)
127 {
128 fputs("ERROR: could not get evas engine info!\n", stderr);
129 evas_free(canvas);
130 return NULL;
131 }
132
133 // ARGB32 is sizeof(int), that is 4 bytes, per pixel
134 pixels = malloc(width * height * sizeof(int));
135 if (!pixels)
136 {
137 fputs("ERROR: could not allocate canvas pixels!\n", stderr);
138 evas_free(canvas);
139 return NULL;
140 }
141
142 einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32;
143 einfo->info.dest_buffer = pixels;
144 einfo->info.dest_buffer_row_bytes = width * sizeof(int);
145 einfo->info.use_color_key = 0;
146 einfo->info.alpha_threshold = 0;
147 einfo->info.func.new_update_region = NULL;
148 einfo->info.func.free_update_region = NULL;
149 evas_engine_info_set(canvas, (Evas_Engine_Info *)einfo);
150
151 return canvas;
152}
153
154static void destroy_canvas(Evas *canvas)
155{
156 Evas_Engine_Info_Buffer *einfo;
157
158 einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas);
159 if (!einfo)
160 {
161 fputs("ERROR: could not get evas engine info!\n", stderr);
162 evas_free(canvas);
163 return;
164 }
165
166 free(einfo->info.dest_buffer);
167 evas_free(canvas);
168}
169
170static void draw_scene(Evas *canvas)
171{
172 Eina_List *updates, *n;
173 Eina_Rectangle *update;
174
175 // render and get the updated rectangles:
176 updates = evas_render_updates(canvas);
177
178 // informative only here, just print the updated areas:
179 EINA_LIST_FOREACH(updates, n, update)
180 printf("UPDATED REGION: pos: %3d, %3d size: %3dx%3d\n",
181 update->x, update->y, update->w, update->h);
182
183 // free list of updates
184 evas_render_updates_free(updates);
185}
186
187static void save_scene(Evas *canvas, const char *dest)
188{
189 Evas_Engine_Info_Buffer *einfo;
190 const unsigned int *pixels, *pixels_end;
191 int width, height;
192 FILE *f;
193
194 einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas);
195 if (!einfo)
196 {
197 fputs("ERROR: could not get evas engine info!\n", stderr);
198 return;
199 }
200 evas_output_size_get(canvas, &width, &height);
201
202 f = fopen(dest, "wb+");
203 if (!f)
204 {
205 fprintf(stderr, "ERROR: could not open for writing '%s': %s\n",
206 dest, strerror(errno));
207 return;
208 }
209
210 pixels = einfo->info.dest_buffer;
211 pixels_end = pixels + (width * height);
212
213 // PPM P6 format is dead simple to write:
214 fprintf(f, "P6\n%d %d\n255\n", width, height);
215 for (; pixels < pixels_end; pixels++)
216 {
217 int r, g, b;
218
219 r = ((*pixels) & 0xff0000) >> 16;
220 g = ((*pixels) & 0x00ff00) >> 8;
221 b = (*pixels) & 0x0000ff;
222
223 fprintf(f, "%c%c%c", r, g, b);
224 }
225
226 fclose(f);
227 printf("saved scene as '%s'\n", dest);
228}
diff --git a/legacy/evas/src/lib/Evas.h b/legacy/evas/src/lib/Evas.h
index 2f90f0e..f98df31 100644
--- a/legacy/evas/src/lib/Evas.h
+++ b/legacy/evas/src/lib/Evas.h
@@ -41,6 +41,13 @@
41 * @todo finish api documentation 41 * @todo finish api documentation
42 */ 42 */
43 43
44
45/**
46 * Identifier of callbacks to be used with object or canvas.
47 *
48 * @see evas_object_event_callback_add()
49 * @see evas_event_callback_add()
50 */
44typedef enum _Evas_Callback_Type 51typedef enum _Evas_Callback_Type
45{ 52{
46 /* 53 /*
@@ -88,6 +95,9 @@ typedef enum _Evas_Callback_Type
88 EVAS_CALLBACK_LAST /**< keep as last element/sentinel -- not really an event */ 95 EVAS_CALLBACK_LAST /**< keep as last element/sentinel -- not really an event */
89} Evas_Callback_Type; /**< The type of event to trigger the callback */ 96} Evas_Callback_Type; /**< The type of event to trigger the callback */
90 97
98/**
99 * Flags for Mouse Button events
100 */
91typedef enum _Evas_Button_Flags 101typedef enum _Evas_Button_Flags
92{ 102{
93 EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */ 103 EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */
@@ -95,12 +105,19 @@ typedef enum _Evas_Button_Flags
95 EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */ 105 EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */
96} Evas_Button_Flags; /**< Flags for Mouse Button events */ 106} Evas_Button_Flags; /**< Flags for Mouse Button events */
97 107
108/**
109 * Flags for Events
110 */
98typedef enum _Evas_Event_Flags 111typedef enum _Evas_Event_Flags
99{ 112{
100 EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */ 113 EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */
101 EVAS_EVENT_FLAG_ON_HOLD = (1 << 0) /**< This event is being delivered but should be put "on hold" until the on hold flag is unset. the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ 114 EVAS_EVENT_FLAG_ON_HOLD = (1 << 0) /**< This event is being delivered but should be put "on hold" until the on hold flag is unset. the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */
102} Evas_Event_Flags; /**< Flags for Events */ 115} Evas_Event_Flags; /**< Flags for Events */
103 116
117/**
118 * Flags for Font Hinting
119 * @ingroup Evas_Font_Group
120 */
104typedef enum _Evas_Font_Hinting_Flags 121typedef enum _Evas_Font_Hinting_Flags
105{ 122{
106 EVAS_FONT_HINTING_NONE, /**< No font hinting */ 123 EVAS_FONT_HINTING_NONE, /**< No font hinting */
@@ -108,6 +125,10 @@ typedef enum _Evas_Font_Hinting_Flags
108 EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */ 125 EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */
109} Evas_Font_Hinting_Flags; /**< Flags for Font Hinting */ 126} Evas_Font_Hinting_Flags; /**< Flags for Font Hinting */
110 127
128/**
129 * Colorspaces for pixel data supported by Evas
130 * @ingroup Evas_Object_Image
131 */
111typedef enum _Evas_Colorspace 132typedef enum _Evas_Colorspace
112{ 133{
113 EVAS_COLORSPACE_ARGB8888, /**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */ 134 EVAS_COLORSPACE_ARGB8888, /**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */
@@ -117,12 +138,16 @@ typedef enum _Evas_Colorspace
117 EVAS_COLORSPACE_RGB565_A5P /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */ 138 EVAS_COLORSPACE_RGB565_A5P /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */
118} Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ 139} Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */
119 140
141/**
142 * How to pack items into cells in a table.
143 * @ingroup Evas_Object_Table
144 */
120typedef enum _Evas_Object_Table_Homogeneous_Mode 145typedef enum _Evas_Object_Table_Homogeneous_Mode
121{ 146{
122 EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, 147 EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0,
123 EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, 148 EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1,
124 EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 149 EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2
125} Evas_Object_Table_Homogeneous_Mode; 150} Evas_Object_Table_Homogeneous_Mode; /**< Table cell pack mode. */
126 151
127typedef struct _Evas_Transform Evas_Transform; /**< An Evas projective or affine transform */ 152typedef struct _Evas_Transform Evas_Transform; /**< An Evas projective or affine transform */
128typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle */ 153typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle */
@@ -134,12 +159,46 @@ typedef struct _Evas_Coord_Precision_Point Evas_Coord_Precision_Point; /**< Ev
134typedef struct _Evas_Position Evas_Position; /**< associates given point in Canvas and Output */ 159typedef struct _Evas_Position Evas_Position; /**< associates given point in Canvas and Output */
135typedef struct _Evas_Precision_Position Evas_Precision_Position; /**< associates given point in Canvas and Output, with sub-pixel precision */ 160typedef struct _Evas_Precision_Position Evas_Precision_Position; /**< associates given point in Canvas and Output, with sub-pixel precision */
136 161
137typedef struct _Evas_Smart_Class Evas_Smart_Class; /**< A smart object base class */ 162/**
138typedef struct _Evas_Smart_Cb_Description Evas_Smart_Cb_Description; /**< A smart object callback description, used to provide introspection */ 163 * @typedef Evas_Smart_Class
139typedef struct _Evas_Map Evas_Map; /**< An array of map points */ 164 * A smart object base class
165 * @ingroup Evas_Smart_Group
166 */
167typedef struct _Evas_Smart_Class Evas_Smart_Class;
168
169/**
170 * @typedef Evas_Smart_Cb_Description
171 * A smart object callback description, used to provide introspection
172 * @ingroup Evas_Smart_Group
173 */
174typedef struct _Evas_Smart_Cb_Description Evas_Smart_Cb_Description;
175
176/**
177 * @typedef Evas_Map
178 * An opaque handle to map points
179 * @see evas_map_new()
180 * @see evas_map_free()
181 * @see evas_map_dup()
182 * @ingroup Evas_Object_Group_Map
183 */
184typedef struct _Evas_Map Evas_Map;
185
186/**
187 * @typedef Evas
188 * An Evas canvas handle.
189 * @see evas_new()
190 * @see evas_free()
191 * @ingroup Evas_Canvas
192 */
193typedef struct _Evas Evas;
194
195/**
196 * @typedef Evas_Object
197 * An Evas Object handle.
198 * @ingroup Evas_Object_Group
199 */
200typedef struct _Evas_Object Evas_Object;
140 201
141typedef struct _Evas Evas; /**< An Evas canvas handle */
142typedef struct _Evas_Object Evas_Object; /**< An Evas Object handle */
143typedef void Evas_Performance; /**< An Evas Performance handle */ 202typedef void Evas_Performance; /**< An Evas Performance handle */
144typedef struct _Evas_Modifier Evas_Modifier; /**< An Evas Modifier */ 203typedef struct _Evas_Modifier Evas_Modifier; /**< An Evas Modifier */
145typedef struct _Evas_Lock Evas_Lock; /**< An Evas Lock */ 204typedef struct _Evas_Lock Evas_Lock; /**< An Evas Lock */
@@ -158,7 +217,7 @@ struct _Evas_Transform /** An affine or projective coordinate transformation mat
158 float mzx, mzy, mzz; 217 float mzx, mzy, mzz;
159}; 218};
160 219
161struct _Evas_Coord_Rectangle /** A rectangle in Evas_Coord */ 220struct _Evas_Coord_Rectangle /**< A rectangle in Evas_Coord */
162{ 221{
163 Evas_Coord x; /**< top-left x co-ordinate of rectangle */ 222 Evas_Coord x; /**< top-left x co-ordinate of rectangle */
164 Evas_Coord y; /**< top-left y co-ordinate of rectangle */ 223 Evas_Coord y; /**< top-left y co-ordinate of rectangle */
@@ -204,229 +263,6 @@ typedef enum _Evas_Aspect_Control
204} Evas_Aspect_Control; 263} Evas_Aspect_Control;
205 264
206 265
207#define EVAS_SMART_CLASS_VERSION 4 /** the version you have to put into the version field in the smart class struct */
208struct _Evas_Smart_Class /** a smart object class */
209{
210 const char *name; /** the string name of the class */
211
212 int version;
213
214 void (*add) (Evas_Object *o);
215 void (*del) (Evas_Object *o);
216 void (*move) (Evas_Object *o, Evas_Coord x, Evas_Coord y);
217 void (*resize) (Evas_Object *o, Evas_Coord w, Evas_Coord h);
218 void (*show) (Evas_Object *o);
219 void (*hide) (Evas_Object *o);
220 void (*color_set) (Evas_Object *o, int r, int g, int b, int a);
221 void (*clip_set) (Evas_Object *o, Evas_Object *clip);
222 void (*clip_unset) (Evas_Object *o);
223 void (*calculate) (Evas_Object *o);
224 void (*member_add) (Evas_Object *o, Evas_Object *child);
225 void (*member_del) (Evas_Object *o, Evas_Object *child);
226
227 const Evas_Smart_Class *parent; /**< this class inherits from this parent */
228 const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, NULL terminated */
229
230 const void *data;
231};
232
233struct _Evas_Smart_Cb_Description
234{
235 const char *name; /**< callback name, ie: "changed" */
236
237 /**
238 * @brief Hint type of @c event_info parameter of Evas_Smart_Cb.
239 *
240 * The type string uses the pattern similar to
241 *
242 * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures
243 *
244 * but extended to optionally include variable names within
245 * brackets preceding types. Example:
246 *
247 * @li Structure with two integers:
248 * @c "(ii)"
249 *
250 * @li Structure called 'x' with two integers named 'a' and 'b':
251 * @c "[x]([a]i[b]i)"
252 *
253 * @li Array of integers:
254 * @c "ai"
255 *
256 * @li Array called 'x' of struct with two integers:
257 * @c "[x]a(ii)"
258 *
259 * @note This type string is used as a hint and is @b not validated
260 * or enforced anyhow. Implementors should make the best use
261 * of it to help bindings, documentation and other users of
262 * introspection features.
263 */
264 const char *type;
265};
266
267/**
268 * Initializer to zero a whole Evas_Smart_Class structure.
269 *
270 * @see EVAS_SMART_CLASS_INIT_VERSION
271 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
272 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
273 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
274 */
275#define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
276
277/**
278 * Initializer to zero a whole Evas_Smart_Class structure and set version.
279 *
280 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
281 * latest EVAS_SMART_CLASS_VERSION.
282 *
283 * @see EVAS_SMART_CLASS_INIT_NULL
284 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
285 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
286 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
287 */
288#define EVAS_SMART_CLASS_INIT_VERSION {NULL, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
289
290/**
291 * Initializer to zero a whole Evas_Smart_Class structure and set name
292 * and version.
293 *
294 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
295 * latest EVAS_SMART_CLASS_VERSION and name to the specified value.
296 *
297 * It will keep a reference to name field as a "const char *", that is,
298 * name must be available while the structure is used (hint: static or global!)
299 * and will not be modified.
300 *
301 * @see EVAS_SMART_CLASS_INIT_NULL
302 * @see EVAS_SMART_CLASS_INIT_VERSION
303 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
304 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
305 */
306#define EVAS_SMART_CLASS_INIT_NAME_VERSION(name) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
307
308/**
309 * Initializer to zero a whole Evas_Smart_Class structure and set name,
310 * version and parent class.
311 *
312 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
313 * latest EVAS_SMART_CLASS_VERSION, name to the specified value and
314 * parent class.
315 *
316 * It will keep a reference to name field as a "const char *", that is,
317 * name must be available while the structure is used (hint: static or global!)
318 * and will not be modified. Similarly, parent reference will be kept.
319 *
320 * @see EVAS_SMART_CLASS_INIT_NULL
321 * @see EVAS_SMART_CLASS_INIT_VERSION
322 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
323 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
324 */
325#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT(name, parent) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, NULL}
326
327/**
328 * Initializer to zero a whole Evas_Smart_Class structure and set name,
329 * version, parent class and callbacks definition.
330 *
331 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
332 * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent
333 * class and callbacks at this level.
334 *
335 * It will keep a reference to name field as a "const char *", that is,
336 * name must be available while the structure is used (hint: static or global!)
337 * and will not be modified. Similarly, parent and callbacks reference
338 * will be kept.
339 *
340 * @see EVAS_SMART_CLASS_INIT_NULL
341 * @see EVAS_SMART_CLASS_INIT_VERSION
342 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
343 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
344 */
345#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS(name, parent, callbacks) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, callbacks}
346
347/**
348 * Convenience macro to subclass a Smart Class.
349 *
350 * This macro saves some typing when writing a Smart Class derived from
351 * another one. In order to work, the user needs to provide some functions
352 * adhering to the following guidelines.
353 * - <prefix>_smart_set_user(): the internal _smart_set function will call
354 * this one provided by the user after inheriting everything from the
355 * parent, which should take care of setting the right member functions
356 * for the class.
357 * - <prefix>_parent_sc: smart class of the parent. When calling parent
358 * functions from overloaded ones, use this global variable.
359 * - <prefix>_smart_class_new(): this function returns the Evas_Smart needed
360 * to create smart objects with this class, should be called by the public
361 * _add() function.
362 * - If this new class should be subclassable as well, a public _smart_set()
363 * function is desirable to fill the class used as parent by the children.
364 * It's up to the user to provide this interface, which will most likely
365 * call <prefix>_smart_set() to get the job done.
366 *
367 * @param smart_name The name used for the Smart Class. e.g: "Evas_Object_Box".
368 * @param prefix Prefix used for all variables and functions defined.
369 * @param api_type Type of the structure used as API for the Smart Class. Either Evas_Smart_Class or something derived from it.
370 * @param parent_type Type of the parent class API.
371 * @param parent_func Function that sets up the parent class. e.g: evas_object_box_smart_set().
372 * @param cb_desc Array of callback descriptions for this Smart Class.
373 */
374#define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \
375static parent_type prefix##_parent_sc; \
376static Eina_Bool prefix##_parent_init = 0; \
377static void prefix##_smart_set_user(api_type *api); \
378static void prefix##_smart_set(api_type *api) \
379{ \
380 Evas_Smart_Class *sc; \
381 if (!(sc = (Evas_Smart_Class *)api)) \
382 return; \
383 if (!prefix##_parent_init) \
384 { \
385 memset(&prefix##_parent_sc, 0, sizeof(parent_type)); \
386 ((Evas_Smart_Class*)&prefix##_parent_sc)->version = EVAS_SMART_CLASS_VERSION; \
387 parent_func(&prefix##_parent_sc); \
388 prefix##_parent_init = 1; \
389 } \
390 evas_smart_class_inherit(sc, &prefix##_parent_sc); \
391 prefix##_smart_set_user(api); \
392} \
393static Evas_Smart * prefix##_smart_class_new(void) \
394{ \
395 static Evas_Smart *smart = NULL; \
396 static api_type api; \
397 if (!smart) \
398 { \
399 Evas_Smart_Class *sc = (Evas_Smart_Class *)&api; \
400 memset(&api, 0, sizeof(api_type)); \
401 sc->version = EVAS_SMART_CLASS_VERSION; \
402 sc->name = smart_name; \
403 sc->callbacks = cb_desc; \
404 prefix##_smart_set(&api); \
405 smart = evas_smart_class_new(sc); \
406 } \
407 return smart; \
408}
409
410/**
411 * Convenience macro to allocate smart data only if needed.
412 *
413 * When writing a subclassable smart object, the .add function will need
414 * to check if the smart private data was already allocated by some child
415 * object or not. This macro makes it easier to do it.
416 *
417 * @param o Evas object passed to the .add function
418 * @param priv_type The type of the data to allocate
419 */
420#define EVAS_SMART_DATA_ALLOC(o, priv_type) \
421 priv_type *priv; \
422 priv = evas_object_smart_data_get(o); \
423 if (!priv) \
424 { \
425 priv = (priv_type *)calloc(1, sizeof(priv_type)); \
426 if (!priv) \
427 return; \
428 evas_object_smart_data_set(o, priv); \
429 }
430 266
431typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */ 267typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */
432typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */ 268typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */
@@ -504,6 +340,10 @@ struct _Evas_Native_Surface
504#define evas_object_size_hint_expand_set evas_object_size_hint_weight_set /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ 340#define evas_object_size_hint_expand_set evas_object_size_hint_weight_set /**< Convenience macro to make it easier to understand that weight is also used for expand properties */
505#define evas_object_size_hint_expand_get evas_object_size_hint_weight_get /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ 341#define evas_object_size_hint_expand_get evas_object_size_hint_weight_get /**< Convenience macro to make it easier to understand that weight is also used for expand properties */
506 342
343/**
344 * How the object should be rendered to output.
345 * @ingroup Evas_Object_Group_Extras
346 */
507typedef enum _Evas_Render_Op 347typedef enum _Evas_Render_Op
508{ 348{
509 EVAS_RENDER_BLEND = 0, /**< default op: d = d*(1-sa) + s */ 349 EVAS_RENDER_BLEND = 0, /**< default op: d = d*(1-sa) + s */
@@ -518,7 +358,7 @@ typedef enum _Evas_Render_Op
518 EVAS_RENDER_TINT_REL = 9, /**< d = d*(1 - sa + s) */ 358 EVAS_RENDER_TINT_REL = 9, /**< d = d*(1 - sa + s) */
519 EVAS_RENDER_MASK = 10, /**< d = d*sa */ 359 EVAS_RENDER_MASK = 10, /**< d = d*sa */
520 EVAS_RENDER_MUL = 11 /**< d = d*s */ 360 EVAS_RENDER_MUL = 11 /**< d = d*s */
521} Evas_Render_Op; /**< */ 361} Evas_Render_Op; /**< How the object should be rendered to output. */
522 362
523typedef enum _Evas_Border_Fill_Mode 363typedef enum _Evas_Border_Fill_Mode
524{ 364{
@@ -735,11 +575,22 @@ struct _Evas_Event_Hold /** Hold change event */
735 Evas_Device *dev; 575 Evas_Device *dev;
736}; 576};
737 577
578/**
579 * How mouse pointer should be handled by Evas.
580 *
581 * If #EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse is down an
582 * object, then moves outside of it, the pointer still behaves as
583 * being bound to the object, albeit out of its drawing region. On
584 * mouse up, the event will be feed to the object, that may check if
585 * the final position is over or not and do something about it.
586 *
587 * @ingroup Evas_Object_Group_Extras
588 */
738typedef enum _Evas_Object_Pointer_Mode 589typedef enum _Evas_Object_Pointer_Mode
739{ 590{
740 EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */ 591 EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */
741 EVAS_OBJECT_POINTER_MODE_NOGRAB 592 EVAS_OBJECT_POINTER_MODE_NOGRAB
742} Evas_Object_Pointer_Mode; 593} Evas_Object_Pointer_Mode; /**< How mouse pointer should be handled by Evas. */
743 594
744typedef void (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info); 595typedef void (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info);
745typedef void (*Evas_Event_Cb) (void *data, Evas *e, void *event_info); 596typedef void (*Evas_Event_Cb) (void *data, Evas *e, void *event_info);
@@ -749,14 +600,80 @@ typedef void (*Evas_Object_Event_Cb) (void *data, Evas *e, Evas_Object *obj, voi
749extern "C" { 600extern "C" {
750#endif 601#endif
751 602
752 EAPI int evas_alloc_error (void); 603/**
753 604 * @defgroup Evas_Group Top level functions
605 *
606 * Functions that affect Evas as a whole.
607 */
754 EAPI int evas_init (void); 608 EAPI int evas_init (void);
755 EAPI int evas_shutdown (void); 609 EAPI int evas_shutdown (void);
756 610
611 EAPI int evas_alloc_error (void);
612
613 EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
614 EAPI int evas_async_events_process (void);
615 EAPI Eina_Bool evas_async_events_put (const void *target, Evas_Callback_Type type, void *event_info, void (*func)(void *target, Evas_Callback_Type type, void *event_info)) EINA_ARG_NONNULL(1, 4);
616
617/**
618 * @defgroup Evas_Canvas Canvas functions
619 *
620 * Functions that deal with the basic evas object. They are the
621 * functions you need to use at a minimum to get a working evas, and
622 * to destroy it.
623 *
624 */
625
757 EAPI Evas *evas_new (void) EINA_WARN_UNUSED_RESULT EINA_MALLOC; 626 EAPI Evas *evas_new (void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
758 EAPI void evas_free (Evas *e) EINA_ARG_NONNULL(1); 627 EAPI void evas_free (Evas *e) EINA_ARG_NONNULL(1);
759 628
629 EAPI void evas_focus_in (Evas *e);
630 EAPI void evas_focus_out (Evas *e);
631 EAPI Eina_Bool evas_focus_state_get (const Evas *e) EINA_PURE;
632
633 EAPI void evas_data_attach_set (Evas *e, void *data) EINA_ARG_NONNULL(1);
634 EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
635
636 EAPI void evas_damage_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
637 EAPI void evas_obscured_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
638 EAPI void evas_obscured_clear (Evas *e) EINA_ARG_NONNULL(1);
639 EAPI Eina_List *evas_render_updates (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
640 EAPI void evas_render_updates_free (Eina_List *updates);
641 EAPI void evas_render (Evas *e) EINA_ARG_NONNULL(1);
642 EAPI void evas_norender (Evas *e) EINA_ARG_NONNULL(1);
643 EAPI void evas_render_idle_flush (Evas *e) EINA_ARG_NONNULL(1);
644
645
646/**
647 * @defgroup Evas_Output_Method Render Engine Functions
648 *
649 * Functions that are used to set the render engine for a given
650 * function, and then get that engine working.
651 *
652 * The following code snippet shows how they can be used to
653 * initialise an evas that uses the X11 software engine:
654 * @code
655 * Evas *evas;
656 * Evas_Engine_Info_Software_X11 *einfo;
657 * extern Display *display;
658 * extern Window win;
659 *
660 * evas_init();
661 *
662 * evas = evas_new();
663 * evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
664 * evas_output_size_set(evas, 640, 480);
665 * evas_output_viewport_set(evas, 0, 0, 640, 480);
666 * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas);
667 * einfo->info.display = display;
668 * einfo->info.visual = DefaultVisual(display, DefaultScreen(display));
669 * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display));
670 * einfo->info.drawable = win;
671 * einfo->info.depth = DefaultDepth(display, DefaultScreen(display));
672 * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo);
673 * @endcode
674 *
675 * @ingroup Evas_Canvas
676 */
760 EAPI int evas_render_method_lookup (const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 677 EAPI int evas_render_method_lookup (const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
761 EAPI Eina_List *evas_render_method_list (void) EINA_WARN_UNUSED_RESULT; 678 EAPI Eina_List *evas_render_method_list (void) EINA_WARN_UNUSED_RESULT;
762 EAPI void evas_render_method_list_free (Eina_List *list); 679 EAPI void evas_render_method_list_free (Eina_List *list);
@@ -767,89 +684,490 @@ extern "C" {
767 EAPI Evas_Engine_Info *evas_engine_info_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 684 EAPI Evas_Engine_Info *evas_engine_info_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
768 EAPI int evas_engine_info_set (Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1); 685 EAPI int evas_engine_info_set (Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1);
769 686
687/**
688 * @defgroup Evas_Output_Size Output and Viewport Resizing Functions
689 *
690 * Functions that set and retrieve the output and viewport size of an
691 * evas.
692 *
693 * @ingroup Evas_Canvas
694 */
770 EAPI void evas_output_size_set (Evas *e, int w, int h) EINA_ARG_NONNULL(1); 695 EAPI void evas_output_size_set (Evas *e, int w, int h) EINA_ARG_NONNULL(1);
771 EAPI void evas_output_size_get (const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1); 696 EAPI void evas_output_size_get (const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1);
772 EAPI void evas_output_viewport_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); 697 EAPI void evas_output_viewport_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
773 EAPI void evas_output_viewport_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); 698 EAPI void evas_output_viewport_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
774 699
700/**
701 * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions
702 *
703 * Functions that are used to map coordinates from the canvas to the
704 * screen or the screen to the canvas.
705 *
706 * @ingroup Evas_Canvas
707 */
775 EAPI Evas_Coord evas_coord_screen_x_to_world (const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 708 EAPI Evas_Coord evas_coord_screen_x_to_world (const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
776 EAPI Evas_Coord evas_coord_screen_y_to_world (const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 709 EAPI Evas_Coord evas_coord_screen_y_to_world (const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
777 EAPI int evas_coord_world_x_to_screen (const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 710 EAPI int evas_coord_world_x_to_screen (const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
778 EAPI int evas_coord_world_y_to_screen (const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 711 EAPI int evas_coord_world_y_to_screen (const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
779 712
713/**
714 * @defgroup Evas_Pointer_Group Pointer (Mouse) Functions
715 *
716 * Functions that deal with the status of the pointer (mouse cursor).
717 *
718 * @ingroup Evas_Canvas
719 */
780 EAPI void evas_pointer_output_xy_get (const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1); 720 EAPI void evas_pointer_output_xy_get (const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1);
781 EAPI void evas_pointer_canvas_xy_get (const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1); 721 EAPI void evas_pointer_canvas_xy_get (const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1);
782 EAPI int evas_pointer_button_down_mask_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 722 EAPI int evas_pointer_button_down_mask_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
783 EAPI Eina_Bool evas_pointer_inside_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); 723 EAPI Eina_Bool evas_pointer_inside_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
784 EAPI void evas_data_attach_set (Evas *e, void *data) EINA_ARG_NONNULL(1);
785 EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
786 EAPI void evas_focus_in (Evas *e);
787 EAPI void evas_focus_out (Evas *e);
788 EAPI Eina_Bool evas_focus_state_get (const Evas *e);
789
790/* DOC UP TO HERE */
791 EAPI void evas_damage_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
792 EAPI void evas_obscured_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
793 EAPI void evas_obscured_clear (Evas *e) EINA_ARG_NONNULL(1);
794 EAPI Eina_List *evas_render_updates (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
795 EAPI void evas_render_updates_free (Eina_List *updates);
796 EAPI void evas_render (Evas *e) EINA_ARG_NONNULL(1);
797 EAPI void evas_norender (Evas *e) EINA_ARG_NONNULL(1);
798 EAPI void evas_render_idle_flush (Evas *e) EINA_ARG_NONNULL(1);
799 724
800/* rectangle objects */
801 EAPI Evas_Object *evas_object_rectangle_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
802 725
803/* line objects */ 726/**
804 EAPI Evas_Object *evas_object_line_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 727 * @defgroup Evas_Event_Freezing_Group Event Freezing Functions
805 EAPI void evas_object_line_xy_set (Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2); 728 *
806 EAPI void evas_object_line_xy_get (const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2); 729 * Functions that deal with the freezing of event processing of an
730 * evas.
731 *
732 * @ingroup Evas_Canvas
733 */
734 EAPI void evas_event_freeze (Evas *e) EINA_ARG_NONNULL(1);
735 EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONNULL(1);
736 EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
807 737
808/* gradient objects */ 738/**
809 EAPI Evas_Object *evas_object_gradient_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 739 * @defgroup Evas_Event_Feeding_Group Event Feeding Functions
810 EAPI void evas_object_gradient_color_stop_add (Evas_Object *obj, int r, int g, int b, int a, int delta) EINA_ARG_NONNULL(1); 740 *
811 EAPI void evas_object_gradient_alpha_stop_add (Evas_Object *obj, int a, int delta) EINA_ARG_NONNULL(1); 741 * Functions to tell Evas that events happened and should be
812 EAPI void evas_object_gradient_color_data_set (Evas_Object *obj, void *color_data, int len, Eina_Bool has_alpha) EINA_ARG_NONNULL(1, 2); 742 * processed.
813 EAPI void evas_object_gradient_alpha_data_set (Evas_Object *obj, void *alpha_data, int len) EINA_ARG_NONNULL(1, 2); 743 *
814 EAPI void evas_object_gradient_clear (Evas_Object *obj) EINA_ARG_NONNULL(1); 744 * As explained in @ref intro_not_evas, Evas does not know how to poll
815 EAPI void evas_object_gradient_type_set (Evas_Object *obj, const char *type, const char *instance_params) EINA_ARG_NONNULL(1, 2); 745 * for events, so the developer should do it and then feed such events
816 EAPI void evas_object_gradient_type_get (const Evas_Object *obj, char **type, char **instance_params) EINA_ARG_NONNULL(1, 2); 746 * to the canvas to be processed. This is only required if operating
817 EAPI void evas_object_gradient_fill_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); 747 * Evas directly as modules such as Ecore_Evas does that for you.
818 EAPI void evas_object_gradient_fill_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); 748 *
819 EAPI void evas_object_gradient_fill_angle_set (Evas_Object *obj, Evas_Angle angle) EINA_ARG_NONNULL(1); 749 * @ingroup Evas_Canvas
820 EAPI Evas_Angle evas_object_gradient_fill_angle_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 750 */
821 EAPI void evas_object_gradient_fill_spread_set(Evas_Object *obj, int tile_mode) EINA_ARG_NONNULL(1); 751 EAPI void evas_event_feed_mouse_down (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
822 EAPI int evas_object_gradient_fill_spread_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 752 EAPI void evas_event_feed_mouse_up (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
823 EAPI void evas_object_gradient_angle_set (Evas_Object *obj, Evas_Angle angle) EINA_ARG_NONNULL(1); 753 EAPI void evas_event_feed_mouse_move (Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
824 EAPI Evas_Angle evas_object_gradient_angle_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 754 EAPI void evas_event_feed_mouse_in (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
825 EAPI void evas_object_gradient_direction_set (Evas_Object *obj, int direction) EINA_ARG_NONNULL(1); 755 EAPI void evas_event_feed_mouse_out (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
826 EAPI int evas_object_gradient_direction_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 756 EAPI void evas_event_feed_multi_down (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
827 EAPI void evas_object_gradient_offset_set (Evas_Object *obj, float offset) EINA_ARG_NONNULL(1); 757 EAPI void evas_event_feed_multi_up (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
828 EAPI float evas_object_gradient_offset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 758 EAPI void evas_event_feed_multi_move (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data);
759 EAPI void evas_event_feed_mouse_cancel (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
760 EAPI void evas_event_feed_mouse_wheel (Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
761 EAPI void evas_event_feed_key_down (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
762 EAPI void evas_event_feed_key_up (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
763 EAPI void evas_event_feed_hold (Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
829 764
830/* new gradient2 objects - generic properties */ 765/**
831 EAPI void evas_object_gradient2_color_np_stop_insert (Evas_Object *obj, int r, int g, int b, int a, float pos) EINA_ARG_NONNULL(1); 766 * @defgroup Evas_Canvas_Events Canvas Events
832 EAPI void evas_object_gradient2_fill_spread_set (Evas_Object *obj, int tile_mode) EINA_ARG_NONNULL(1); 767 *
833 EAPI int evas_object_gradient2_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 768 * Canvas generates some events
834 EAPI void evas_object_gradient2_fill_transform_set (Evas_Object *obj, Evas_Transform *t) EINA_ARG_NONNULL(1); 769 *
835 EAPI void evas_object_gradient2_fill_transform_get (const Evas_Object *obj, Evas_Transform *t) EINA_ARG_NONNULL(1); 770 * @ingroup Evas_Canvas
771 */
836 772
837/* linear gradient2 objects */ 773 EAPI void evas_event_callback_add (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
838 EAPI Evas_Object *evas_object_gradient2_linear_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 774 EAPI void *evas_event_callback_del (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3);
839 EAPI void evas_object_gradient2_linear_fill_set (Evas_Object *obj, float x0, float y0, float x1, float y1) EINA_ARG_NONNULL(1); 775 EAPI void *evas_event_callback_del_full (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
840 EAPI void evas_object_gradient2_linear_fill_get (const Evas_Object *obj, float *x0, float *y0, float *x1, float *y1) EINA_ARG_NONNULL(1);
841 776
842/* radial gradient2 objects */ 777/**
843 EAPI Evas_Object *evas_object_gradient2_radial_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 778 * @defgroup Evas_Image_Group Image Functions
844 EAPI void evas_object_gradient2_radial_fill_set (Evas_Object *obj, float cx, float cy, float rx, float ry) EINA_ARG_NONNULL(1); 779 *
845 EAPI void evas_object_gradient2_radial_fill_get (const Evas_Object *obj, float *cx, float *cy, float *rx, float *ry) EINA_ARG_NONNULL(1); 780 * Functions that deals with images at canvas level.
781 *
782 * @ingroup Evas_Canvas
783 */
784 EAPI void evas_image_cache_flush (Evas *e) EINA_ARG_NONNULL(1);
785 EAPI void evas_image_cache_reload (Evas *e) EINA_ARG_NONNULL(1);
786 EAPI void evas_image_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1);
787 EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
846 788
847/* polygon objects */
848 EAPI Evas_Object *evas_object_polygon_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
849 EAPI void evas_object_polygon_point_add (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
850 EAPI void evas_object_polygon_points_clear (Evas_Object *obj) EINA_ARG_NONNULL(1);
851 789
852/* image objects */ 790/**
791 * @defgroup Evas_Font_Group Font Functions
792 *
793 * Functions that deals with fonts.
794 *
795 * @ingroup Evas_Canvas
796 */
797 EAPI void evas_font_hinting_set (Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1);
798 EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
799 EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
800
801 EAPI void evas_font_cache_flush (Evas *e) EINA_ARG_NONNULL(1);
802 EAPI void evas_font_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1);
803 EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
804
805 EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
806 EAPI void evas_font_available_list_free (Evas *e, Eina_List *available) EINA_ARG_NONNULL(1);
807
808/**
809 * @defgroup Evas_Font_Path_Group Font Path Functions
810 *
811 * Functions that edit the paths being used to load fonts.
812 *
813 * @ingroup Evas_Font_Group
814 */
815 EAPI void evas_font_path_clear (Evas *e) EINA_ARG_NONNULL(1);
816 EAPI void evas_font_path_append (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
817 EAPI void evas_font_path_prepend (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
818 EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
819
820/**
821 * @defgroup Evas_Object_Group Generic Object Functions
822 *
823 * Functions that manipulate generic evas objects.
824 */
825
826/**
827 * @defgroup Evas_Object_Group_Basic Basic Object Manipulation
828 *
829 * Methods that are often used, like those that change the color,
830 * clippers and geometry of the object.
831 *
832 * @ingroup Evas_Object_Group
833 */
834 EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2);
835 EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
836 EAPI void evas_object_clip_unset (Evas_Object *obj);
837 EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
838
839 EAPI void evas_object_focus_set (Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1);
840 EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
841
842 EAPI void evas_object_layer_set (Evas_Object *obj, short l) EINA_ARG_NONNULL(1);
843 EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
844
845 EAPI void evas_object_name_set (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1);
846 EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
847
848 EAPI void evas_object_del (Evas_Object *obj) EINA_ARG_NONNULL(1);
849 EAPI void evas_object_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
850 EAPI void evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
851 EAPI void evas_object_geometry_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
852
853 EAPI void evas_object_show (Evas_Object *obj) EINA_ARG_NONNULL(1);
854 EAPI void evas_object_hide (Evas_Object *obj) EINA_ARG_NONNULL(1);
855 EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
856
857 EAPI void evas_object_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
858 EAPI void evas_object_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
859
860 EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
861
862 EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
863
864 EAPI void evas_object_raise (Evas_Object *obj) EINA_ARG_NONNULL(1);
865 EAPI void evas_object_lower (Evas_Object *obj) EINA_ARG_NONNULL(1);
866 EAPI void evas_object_stack_above (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2);
867 EAPI void evas_object_stack_below (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2);
868 EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
869 EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
870
871
872/**
873 * @defgroup Evas_Object_Group_Events Object Events
874 *
875 * Objects generates events when they are moved, resized, when their
876 * visibility change, when they are deleted and so on. These methods
877 * will allow one to handle such events.
878 *
879 * The events can be those from keyboard and mouse, if the object
880 * accepts these events.
881 *
882 * @ingroup Evas_Object_Group
883 */
884 EAPI void evas_object_event_callback_add (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
885 EAPI void *evas_object_event_callback_del (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3);
886 EAPI void *evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
887
888 EAPI void evas_object_pass_events_set (Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1);
889 EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
890 EAPI void evas_object_repeat_events_set (Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1);
891 EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
892 EAPI void evas_object_propagate_events_set (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1);
893 EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
894
895/**
896 * @defgroup Evas_Object_Group_Map UV Mapping (Rotation, Perspecitve, 3D...)
897 *
898 * Evas allows different transformations to be applied to all kinds of
899 * objects. These are applied by means of UV mapping.
900 *
901 * With UV mapping, one maps points in the source object to a 3D space
902 * positioning at target. This allows rotation, perspective, scale and
903 * lots of other effects, depending on the map that is used.
904 *
905 * Each map point may carry a multiplier color. If properly
906 * calculated, these can do shading effects on the object, producing
907 * 3D effects.
908 *
909 * As usual, Evas provides both the raw and easy to use methods. The
910 * raw methods allow developer to create its maps somewhere else,
911 * maybe load them from some file format. The easy to use methods,
912 * calculate the points given some high-level parameters, such as
913 * rotation angle, ambient light and so on.
914 *
915 * @note applying mapping will reduce performance, so use with
916 * care. The impact on performance depends on engine in
917 * use. Software is quite optimized, but not as fast as OpenGL.
918 *
919 * @ingroup Evas_Object_Group
920 */
921 EAPI void evas_object_map_enable_set (Evas_Object *obj, Eina_Bool enabled);
922 EAPI Eina_Bool evas_object_map_enable_get (const Evas_Object *obj);
923 EAPI void evas_object_map_source_set (Evas_Object *obj, Evas_Object *src);
924 EAPI Evas_Object *evas_object_map_source_get (const Evas_Object *obj);
925 EAPI void evas_object_map_set (Evas_Object *obj, const Evas_Map *map);
926 EAPI const Evas_Map *evas_object_map_get (const Evas_Object *obj);
927
928 EAPI void evas_map_util_points_populate_from_object_full (Evas_Map *m, const Evas_Object *obj, Evas_Coord z);
929 EAPI void evas_map_util_points_populate_from_object (Evas_Map *m, const Evas_Object *obj);
930 EAPI void evas_map_util_points_populate_from_geometry (Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z);
931
932 EAPI void evas_map_util_points_color_set (Evas_Map *m, int r, int g, int b, int a);
933
934 EAPI void evas_map_util_rotate (Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy);
935 EAPI void evas_map_util_zoom (Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy);
936 EAPI void evas_map_util_3d_rotate (Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz);
937 EAPI void evas_map_util_3d_lighting (Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ag, int ab);
938 EAPI void evas_map_util_3d_perspective (Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc);
939 EAPI Eina_Bool evas_map_util_clockwise_get (Evas_Map *m);
940
941 EAPI Evas_Map *evas_map_new (int count);
942 EAPI void evas_map_smooth_set (Evas_Map *m, Eina_Bool enabled);
943 EAPI Eina_Bool evas_map_smooth_get (const Evas_Map *m);
944 EAPI void evas_map_alpha_set (Evas_Map *m, Eina_Bool enabled);
945 EAPI Eina_Bool evas_map_alpha_get (const Evas_Map *m);
946 EAPI Evas_Map *evas_map_dup (const Evas_Map *m);
947 EAPI void evas_map_free (Evas_Map *m);
948 EAPI void evas_map_point_coord_set (Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z);
949 EAPI void evas_map_point_coord_get (const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z);
950 EAPI void evas_map_point_image_uv_set (Evas_Map *m, int idx, double u, double v);
951 EAPI void evas_map_point_image_uv_get (const Evas_Map *m, int idx, double *u, double *v);
952 EAPI void evas_map_point_color_set (Evas_Map *m, int idx, int r, int g, int b, int a);
953 EAPI void evas_map_point_color_get (const Evas_Map *m, int idx, int *r, int *g, int *b, int *a);
954
955/**
956 * @defgroup Evas_Object_Group_Size_Hints Size Hints
957 *
958 * Objects may carry hints so another object that acts as a manager
959 * (see @ref Evas_Smart_Object_Group) may know how to proper position
960 * and resize the object. The Size Hints provide a common interface
961 * that is recommended as the protocol for such information.
962 *
963 * @ingroup Evas_Object_Group
964 */
965 EAPI void evas_object_size_hint_min_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
966 EAPI void evas_object_size_hint_min_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
967 EAPI void evas_object_size_hint_max_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
968 EAPI void evas_object_size_hint_max_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
969 EAPI void evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
970 EAPI void evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
971 EAPI void evas_object_size_hint_aspect_get (const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
972 EAPI void evas_object_size_hint_aspect_set (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
973 EAPI void evas_object_size_hint_align_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
974 EAPI void evas_object_size_hint_align_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
975 EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
976 EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
977 EAPI void evas_object_size_hint_padding_get (const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1);
978 EAPI void evas_object_size_hint_padding_set (Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) EINA_ARG_NONNULL(1);
979
980/**
981 * @defgroup Evas_Object_Group_Extras Extra Object Manipulation
982 *
983 * Miscellaneous functions that also apply to any object, but are less
984 * used or not implemented by all objects.
985 *
986 * @ingroup Evas_Object_Group
987 */
988 EAPI void evas_object_data_set (Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2);
989 EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
990 EAPI void *evas_object_data_del (Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
991
992 EAPI void evas_object_pointer_mode_set (Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1);
993 EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
994
995 EAPI void evas_object_anti_alias_set (Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1);
996 EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
997
998 EAPI void evas_object_scale_set (Evas_Object *obj, double scale) EINA_ARG_NONNULL(1);
999 EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1000
1001 EAPI void evas_object_color_interpolation_set (Evas_Object *obj, int color_space) EINA_ARG_NONNULL(1);
1002 EAPI int evas_object_color_interpolation_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1003
1004 EAPI void evas_object_render_op_set (Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1);
1005 EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1006
1007 EAPI void evas_object_precise_is_inside_set (Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1);
1008 EAPI Eina_Bool evas_object_precise_is_inside_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1009
1010/**
1011 * @defgroup Evas_Object_Group_Find Finding Objects
1012 *
1013 * Functions that allows finding objects by their position, name or
1014 * other properties.
1015 *
1016 * @ingroup Evas_Object_Group
1017 */
1018 EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1019
1020 EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1021
1022 EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1023 EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1024 EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1025
1026 EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1027 EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1028
1029 EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1030 EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1031
1032/**
1033 * @defgroup Evas_Object_Group_Interceptors Object Method Interceptors
1034 *
1035 * Evas provides a way to intercept method calls. The interceptor
1036 * callback may opt to completely deny the call, or may check and
1037 * change the parameters before continuing. The continuation of an
1038 * intercepted call is done by calling the intercepted call again,
1039 * from inside the interceptor callback.
1040 *
1041 * @ingroup Evas_Object_Group
1042 */
1043 EAPI void evas_object_intercept_show_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2);
1044 EAPI void *evas_object_intercept_show_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2);
1045 EAPI void evas_object_intercept_hide_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2);
1046 EAPI void *evas_object_intercept_hide_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2);
1047 EAPI void evas_object_intercept_move_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y), const void *data) EINA_ARG_NONNULL(1, 2);
1048 EAPI void *evas_object_intercept_move_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y)) EINA_ARG_NONNULL(1, 2);
1049 EAPI void evas_object_intercept_resize_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h), const void *data) EINA_ARG_NONNULL(1, 2);
1050 EAPI void *evas_object_intercept_resize_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h)) EINA_ARG_NONNULL(1, 2);
1051 EAPI void evas_object_intercept_raise_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2);
1052 EAPI void *evas_object_intercept_raise_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2);
1053 EAPI void evas_object_intercept_lower_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2);
1054 EAPI void *evas_object_intercept_lower_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2);
1055 EAPI void evas_object_intercept_stack_above_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *above), const void *data) EINA_ARG_NONNULL(1, 2);
1056 EAPI void *evas_object_intercept_stack_above_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *above)) EINA_ARG_NONNULL(1, 2);
1057 EAPI void evas_object_intercept_stack_below_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *below), const void *data) EINA_ARG_NONNULL(1, 2);
1058 EAPI void *evas_object_intercept_stack_below_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *below)) EINA_ARG_NONNULL(1, 2);
1059 EAPI void evas_object_intercept_layer_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int l), const void *data) EINA_ARG_NONNULL(1, 2);
1060 EAPI void *evas_object_intercept_layer_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int l)) EINA_ARG_NONNULL(1, 2);
1061 EAPI void evas_object_intercept_color_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int r, int g, int b, int a), const void *data) EINA_ARG_NONNULL(1, 2);
1062 EAPI void *evas_object_intercept_color_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int r, int g, int b, int a)) EINA_ARG_NONNULL(1, 2);
1063 EAPI void evas_object_intercept_clip_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *clip), const void *data) EINA_ARG_NONNULL(1, 2);
1064 EAPI void *evas_object_intercept_clip_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *clip)) EINA_ARG_NONNULL(1, 2);
1065 EAPI void evas_object_intercept_clip_unset_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2);
1066 EAPI void *evas_object_intercept_clip_unset_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2);
1067
1068
1069
1070/**
1071 * @defgroup Evas_Object_Specific Specific Object Functions
1072 *
1073 * Functions that work on specific objects.
1074 *
1075 */
1076
1077/**
1078 * @defgroup Evas_Object_Rectangle Rectangle Object Functions
1079 *
1080 * Functions that operate on evas rectangle objects.
1081 *
1082 * @ingroup Evas_Object_Specific
1083 */
1084 EAPI Evas_Object *evas_object_rectangle_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1085
1086/**
1087 * @defgroup Evas_Object_Image Image Object Functions
1088 *
1089 * Functions used to create and manipulate image objects.
1090 *
1091 * Note - Image objects may return or accept "image data" in multiple
1092 * formats. This is based on the colorspace of an object. Here is a
1093 * rundown on formats:
1094 *
1095 * EVAS_COLORSPACE_ARGB8888:
1096 *
1097 * This pixel format is a linear block of pixels, starting at the
1098 * top-left row by row until the bottom right of the image or pixel
1099 * region. All pixels are 32-bit unsigned int's with the high-byte
1100 * being alpha and the low byte being blue in the format ARGB. Alpha
1101 * may or may not be used by evas depending on the alpha flag of the
1102 * image, but if not used, should be set to 0xff anyway.
1103 *
1104 * This colorspace uses premultiplied alpha. That means that R, G and
1105 * B cannot exceed A in value. The conversion from non-premultiplied
1106 * colorspace is:
1107 *
1108 * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255;
1109 *
1110 * So 50% transparent blue will be: 0x80000080. This will not be
1111 * "dark" - just 50% transparent. Values are 0 == black, 255 == solid
1112 * or full red, green or blue.
1113 *
1114 * EVAS_COLORSPACE_YCBCR422P601_PL:
1115 *
1116 * This is a pointer-list indirected set of YUV (YCbCr) pixel
1117 * data. This means that the data returned or set is not actual pixel
1118 * data, but pointers TO lines of pixel data. The list of pointers
1119 * will first be N rows of pointers to the Y plane - pointing to the
1120 * first pixel at the start of each row in the Y plane. N is the
1121 * height of the image data in pixels. Each pixel in the Y, U and V
1122 * planes is 1 byte exactly, packed. The next N / 2 pointers will
1123 * point to rows in the U plane, and the next N / 2 pointers will
1124 * point to the V plane rows. U and V planes are half the horizontal
1125 * and vertical resolution of the Y plane.
1126 *
1127 * Row order is top to bottom and row pixels are stored left to right.
1128 *
1129 * There is a limitation that these images MUST be a multiple of 2
1130 * pixels in size horizontally or vertically. This is due to the U and
1131 * V planes being half resolution. Also note that this assumes the
1132 * itu601 YUV colorspace specification. This is defined for standard
1133 * television and mpeg streams. HDTV may use the itu709
1134 * specification.
1135 *
1136 * Values are 0 to 255, indicating full or no signal in that plane
1137 * respectively.
1138 *
1139 * EVAS_COLORSPACE_YCBCR422P709_PL:
1140 *
1141 * Not implemented yet.
1142 *
1143 * EVAS_COLORSPACE_RGB565_A5P:
1144 *
1145 * In the process of being implemented in 1 engine only. This may change.
1146 *
1147 * This is a pointer to image data for 16-bit half-word pixel data in
1148 * 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue), with
1149 * the high-byte containing red and the low byte containing blue, per
1150 * pixel. This data is packed row by row from the top-left to the
1151 * bottom right.
1152 *
1153 * If the image has an alpha channel enabled there will be an extra
1154 * alpha plane after the color pixel plane. If not, then this data
1155 * will not exist and should not be accessed in any way. This plane is
1156 * a set of pixels with 1 byte per pixel defining the alpha values of
1157 * all pixels in the image from the top-left to the bottom right of
1158 * the image, row by row. Even though the values of the alpha pixels
1159 * can be 0 to 255, only values 0 through to 32 are used, 32 being
1160 * solid and 0 being transparent.
1161 *
1162 * RGB values can be 0 to 31 for red and blue and 0 to 63 for green,
1163 * with 0 being black and 31 or 63 being full red, green or blue
1164 * respectively. This colorspace is also pre-multiplied like
1165 * EVAS_COLORSPACE_ARGB8888 so:
1166 *
1167 * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32;
1168 *
1169 * @ingroup Evas_Object_Specific
1170 */
853 EAPI Evas_Object *evas_object_image_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 1171 EAPI Evas_Object *evas_object_image_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
854 EAPI Evas_Object *evas_object_image_filled_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 1172 EAPI Evas_Object *evas_object_image_filled_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
855 1173
@@ -897,7 +1215,7 @@ extern "C" {
897 EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1215 EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
898 EAPI void evas_object_image_load_region_set (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); 1216 EAPI void evas_object_image_load_region_set (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
899 EAPI void evas_object_image_load_region_get (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1); 1217 EAPI void evas_object_image_load_region_get (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
900 1218
901 EAPI void evas_object_image_colorspace_set (Evas_Object *obj, Evas_Colorspace cspace) EINA_ARG_NONNULL(1); 1219 EAPI void evas_object_image_colorspace_set (Evas_Object *obj, Evas_Colorspace cspace) EINA_ARG_NONNULL(1);
902 EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1220 EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
903 EAPI void evas_object_image_native_surface_set (Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2); 1221 EAPI void evas_object_image_native_surface_set (Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2);
@@ -907,13 +1225,15 @@ extern "C" {
907 EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1); 1225 EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1);
908 EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1226 EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
909 1227
910/* image cache */ 1228/**
911 EAPI void evas_image_cache_flush (Evas *e) EINA_ARG_NONNULL(1); 1229 * @defgroup Evas_Object_Text Text Object Functions
912 EAPI void evas_image_cache_reload (Evas *e) EINA_ARG_NONNULL(1); 1230 *
913 EAPI void evas_image_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1); 1231 * Functions that operate on single line, single style text objects.
914 EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1232 *
915 1233 * For multiline and multiple style text, see @ref Evas_Object_Textblock.
916/* text objects */ 1234 *
1235 * @ingroup Evas_Object_Specific
1236 */
917 typedef enum _Evas_Text_Style_Type 1237 typedef enum _Evas_Text_Style_Type
918 { 1238 {
919 EVAS_TEXT_STYLE_PLAIN, 1239 EVAS_TEXT_STYLE_PLAIN,
@@ -957,28 +1277,19 @@ extern "C" {
957 EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); 1277 EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
958 EAPI void evas_object_text_style_pad_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1); 1278 EAPI void evas_object_text_style_pad_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
959 1279
960/* string and font handling */
961 EAPI int evas_string_char_next_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
962 EAPI int evas_string_char_prev_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
963 EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
964
965 EAPI void evas_font_path_clear (Evas *e) EINA_ARG_NONNULL(1);
966 EAPI void evas_font_path_append (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
967 EAPI void evas_font_path_prepend (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
968 EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
969 1280
970 EAPI void evas_font_hinting_set (Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1); 1281/**
971 EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1282 * @defgroup Evas_Object_Textblock Textblock Object Functions
972 EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1283 *
973 1284 * Functions used to create and manipulate textblock objects. Unlike
974 EAPI void evas_font_cache_flush (Evas *e) EINA_ARG_NONNULL(1); 1285 * @ref Evas_Object_Text, these handle complex text, doing multiple
975 EAPI void evas_font_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1); 1286 * styles and multiline text based on HTML-like tags. Of these extra
976 EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1287 * features will be heavier on memory and processing cost.
977 1288 *
978 EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1289 * @todo put here some usage examples
979 EAPI void evas_font_available_list_free (Evas *e, Eina_List *available) EINA_ARG_NONNULL(1); 1290 *
980 1291 * @ingroup Evas_Object_Specific
981/* textblock objects */ 1292 */
982 typedef struct _Evas_Textblock_Style Evas_Textblock_Style; 1293 typedef struct _Evas_Textblock_Style Evas_Textblock_Style;
983 typedef struct _Evas_Textblock_Cursor Evas_Textblock_Cursor; 1294 typedef struct _Evas_Textblock_Cursor Evas_Textblock_Cursor;
984 typedef struct _Evas_Textblock_Rectangle Evas_Textblock_Rectangle; 1295 typedef struct _Evas_Textblock_Rectangle Evas_Textblock_Rectangle;
@@ -1066,119 +1377,359 @@ extern "C" {
1066 EAPI void evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); 1377 EAPI void evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
1067 EAPI void evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1); 1378 EAPI void evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1);
1068 1379
1380/**
1381 * @defgroup Evas_Line_Group Line Object Functions
1382 *
1383 * Functions used to deal with evas line objects.
1384 *
1385 * @ingroup Evas_Object_Specific
1386 */
1387 EAPI Evas_Object *evas_object_line_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1388 EAPI void evas_object_line_xy_set (Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2);
1389 EAPI void evas_object_line_xy_get (const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2);
1069 1390
1070/* general objects */ 1391/**
1071 EAPI void evas_object_del (Evas_Object *obj) EINA_ARG_NONNULL(1); 1392 * @defgroup Evas_Object_Polygon Polygon Object Functions
1072 1393 *
1073 EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1394 * Functions that operate on evas polygon objects.
1395 *
1396 * Hint: as evas does not provide ellipse, smooth paths or circle, one
1397 * can calculate points and convert these to a polygon.
1398 *
1399 * @ingroup Evas_Object_Specific
1400 */
1401 EAPI Evas_Object *evas_object_polygon_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1402 EAPI void evas_object_polygon_point_add (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
1403 EAPI void evas_object_polygon_points_clear (Evas_Object *obj) EINA_ARG_NONNULL(1);
1074 1404
1075 EAPI void evas_object_layer_set (Evas_Object *obj, short l) EINA_ARG_NONNULL(1); 1405/**
1076 EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1406 * @defgroup Evas_Object_Gradient_Group Gradient Object Functions
1407 *
1408 * Functions that work on evas gradient objects.
1409 *
1410 * @ingroup Evas_Object_Specific
1411 */
1412 EAPI Evas_Object *evas_object_gradient_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1413 EAPI void evas_object_gradient_color_stop_add (Evas_Object *obj, int r, int g, int b, int a, int delta) EINA_ARG_NONNULL(1);
1414 EAPI void evas_object_gradient_alpha_stop_add (Evas_Object *obj, int a, int delta) EINA_ARG_NONNULL(1);
1415 EAPI void evas_object_gradient_color_data_set (Evas_Object *obj, void *color_data, int len, Eina_Bool has_alpha) EINA_ARG_NONNULL(1, 2);
1416 EAPI void evas_object_gradient_alpha_data_set (Evas_Object *obj, void *alpha_data, int len) EINA_ARG_NONNULL(1, 2);
1417 EAPI void evas_object_gradient_clear (Evas_Object *obj) EINA_ARG_NONNULL(1);
1418 EAPI void evas_object_gradient_type_set (Evas_Object *obj, const char *type, const char *instance_params) EINA_ARG_NONNULL(1, 2);
1419 EAPI void evas_object_gradient_type_get (const Evas_Object *obj, char **type, char **instance_params) EINA_ARG_NONNULL(1, 2);
1420 EAPI void evas_object_gradient_fill_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
1421 EAPI void evas_object_gradient_fill_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
1422 EAPI void evas_object_gradient_fill_angle_set (Evas_Object *obj, Evas_Angle angle) EINA_ARG_NONNULL(1);
1423 EAPI Evas_Angle evas_object_gradient_fill_angle_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1424 EAPI void evas_object_gradient_fill_spread_set(Evas_Object *obj, int tile_mode) EINA_ARG_NONNULL(1);
1425 EAPI int evas_object_gradient_fill_spread_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1426 EAPI void evas_object_gradient_angle_set (Evas_Object *obj, Evas_Angle angle) EINA_ARG_NONNULL(1);
1427 EAPI Evas_Angle evas_object_gradient_angle_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1428 EAPI void evas_object_gradient_direction_set (Evas_Object *obj, int direction) EINA_ARG_NONNULL(1);
1429 EAPI int evas_object_gradient_direction_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1430 EAPI void evas_object_gradient_offset_set (Evas_Object *obj, float offset) EINA_ARG_NONNULL(1);
1431 EAPI float evas_object_gradient_offset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1077 1432
1078 EAPI void evas_object_raise (Evas_Object *obj) EINA_ARG_NONNULL(1); 1433/**
1079 EAPI void evas_object_lower (Evas_Object *obj) EINA_ARG_NONNULL(1); 1434 * @defgroup Evas_Object_Gradient2_Group Gradient2 Object Functions
1080 EAPI void evas_object_stack_above (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2); 1435 *
1081 EAPI void evas_object_stack_below (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2); 1436 * Functions that work on evas gradient2 objects.
1082 EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1437 *
1083 EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1438 * @ingroup Evas_Object_Specific
1084 EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1439 */
1085 EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1440 EAPI void evas_object_gradient2_color_np_stop_insert (Evas_Object *obj, int r, int g, int b, int a, float pos) EINA_ARG_NONNULL(1);
1441 EAPI void evas_object_gradient2_fill_spread_set (Evas_Object *obj, int tile_mode) EINA_ARG_NONNULL(1);
1442 EAPI int evas_object_gradient2_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1443 EAPI void evas_object_gradient2_fill_transform_set (Evas_Object *obj, Evas_Transform *t) EINA_ARG_NONNULL(1);
1444 EAPI void evas_object_gradient2_fill_transform_get (const Evas_Object *obj, Evas_Transform *t) EINA_ARG_NONNULL(1);
1086 1445
1087 EAPI void evas_object_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); 1446/* linear gradient2 objects */
1088 EAPI void evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); 1447 EAPI Evas_Object *evas_object_gradient2_linear_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1089 EAPI void evas_object_geometry_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); 1448 EAPI void evas_object_gradient2_linear_fill_set (Evas_Object *obj, float x0, float y0, float x1, float y1) EINA_ARG_NONNULL(1);
1449 EAPI void evas_object_gradient2_linear_fill_get (const Evas_Object *obj, float *x0, float *y0, float *x1, float *y1) EINA_ARG_NONNULL(1);
1090 1450
1091 EAPI void evas_object_size_hint_min_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); 1451/* radial gradient2 objects */
1092 EAPI void evas_object_size_hint_min_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); 1452 EAPI Evas_Object *evas_object_gradient2_radial_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1093 EAPI void evas_object_size_hint_max_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); 1453 EAPI void evas_object_gradient2_radial_fill_set (Evas_Object *obj, float cx, float cy, float rx, float ry) EINA_ARG_NONNULL(1);
1094 EAPI void evas_object_size_hint_max_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); 1454 EAPI void evas_object_gradient2_radial_fill_get (const Evas_Object *obj, float *cx, float *cy, float *rx, float *ry) EINA_ARG_NONNULL(1);
1095 EAPI void evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
1096 EAPI void evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
1097 EAPI void evas_object_size_hint_aspect_get (const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
1098 EAPI void evas_object_size_hint_aspect_set (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
1099 EAPI void evas_object_size_hint_align_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
1100 EAPI void evas_object_size_hint_align_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
1101 EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
1102 EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
1103 EAPI void evas_object_size_hint_padding_get (const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1);
1104 EAPI void evas_object_size_hint_padding_set (Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) EINA_ARG_NONNULL(1);
1105 1455
1106 EAPI void evas_object_show (Evas_Object *obj) EINA_ARG_NONNULL(1);
1107 EAPI void evas_object_hide (Evas_Object *obj) EINA_ARG_NONNULL(1);
1108 EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1109 1456
1110 EAPI void evas_object_render_op_set (Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1); 1457/**
1111 EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1458 * @defgroup Evas_Smart_Group Smart Functions
1459 *
1460 * Functions that deal with Evas_Smart's, creating definition
1461 * (classes) of objects that will have customized behavior for methods
1462 * like evas_object_move(), evas_object_resize(),
1463 * evas_object_clip_set() and others.
1464 *
1465 * These objects will accept the generic methods defined in @ref
1466 * Evas_Object_Group and the extensions defined in @ref
1467 * Evas_Smart_Object_Group. There are couple of existent smart objects
1468 * in Evas itself, see @ref Evas_Object_Box, @ref Evas_Object_Table
1469 * and @ref Evas_Smart_Object_Clipped.
1470 */
1112 1471
1113 EAPI void evas_object_anti_alias_set (Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1); 1472/**
1114 EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1473 * @def EVAS_SMART_CLASS_VERSION
1474 * The version you have to put into the version field in the smart
1475 * class struct
1476 * @ingroup Evas_Smart_Group
1477 */
1478#define EVAS_SMART_CLASS_VERSION 4
1479/**
1480 * @struct _Evas_Smart_Class
1481 * a smart object class
1482 * @ingroup Evas_Smart_Group
1483 */
1484struct _Evas_Smart_Class
1485{
1486 const char *name; /**< the string name of the class */
1115 1487
1116 EAPI void evas_object_scale_set (Evas_Object *obj, double scale) EINA_ARG_NONNULL(1); 1488 int version;
1117 EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1118 1489
1119 EAPI void evas_object_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); 1490 void (*add) (Evas_Object *o);
1120 EAPI void evas_object_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); 1491 void (*del) (Evas_Object *o);
1492 void (*move) (Evas_Object *o, Evas_Coord x, Evas_Coord y);
1493 void (*resize) (Evas_Object *o, Evas_Coord w, Evas_Coord h);
1494 void (*show) (Evas_Object *o);
1495 void (*hide) (Evas_Object *o);
1496 void (*color_set) (Evas_Object *o, int r, int g, int b, int a);
1497 void (*clip_set) (Evas_Object *o, Evas_Object *clip);
1498 void (*clip_unset) (Evas_Object *o);
1499 void (*calculate) (Evas_Object *o);
1500 void (*member_add) (Evas_Object *o, Evas_Object *child);
1501 void (*member_del) (Evas_Object *o, Evas_Object *child);
1121 1502
1122 EAPI void evas_object_color_interpolation_set (Evas_Object *obj, int color_space) EINA_ARG_NONNULL(1); 1503 const Evas_Smart_Class *parent; /**< this class inherits from this parent */
1123 EAPI int evas_object_color_interpolation_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1504 const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, NULL terminated */
1124 1505
1125 EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2); 1506 const void *data;
1126 EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1507};
1127 EAPI void evas_object_clip_unset (Evas_Object *obj);
1128 EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1129 1508
1130 EAPI void evas_object_data_set (Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2); 1509/**
1131 EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; 1510 * @struct _Evas_Smart_Cb_Description
1132 EAPI void *evas_object_data_del (Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2); 1511 *
1512 * Describes a callback used by a smart class
1513 * evas_object_smart_callback_call(), particularly useful to explain
1514 * to user and its code (ie: introspection) what the parameter @c
1515 * event_info will contain.
1516 *
1517 * @ingroup Evas_Smart_Group
1518 */
1519struct _Evas_Smart_Cb_Description
1520{
1521 const char *name; /**< callback name, ie: "changed" */
1133 1522
1134 EAPI void evas_object_name_set (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1); 1523 /**
1135 EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1524 * @brief Hint type of @c event_info parameter of Evas_Smart_Cb.
1136 EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1525 *
1526 * The type string uses the pattern similar to
1527 *
1528 * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures
1529 *
1530 * but extended to optionally include variable names within
1531 * brackets preceding types. Example:
1532 *
1533 * @li Structure with two integers:
1534 * @c "(ii)"
1535 *
1536 * @li Structure called 'x' with two integers named 'a' and 'b':
1537 * @c "[x]([a]i[b]i)"
1538 *
1539 * @li Array of integers:
1540 * @c "ai"
1541 *
1542 * @li Array called 'x' of struct with two integers:
1543 * @c "[x]a(ii)"
1544 *
1545 * @note This type string is used as a hint and is @b not validated
1546 * or enforced anyhow. Implementors should make the best use
1547 * of it to help bindings, documentation and other users of
1548 * introspection features.
1549 */
1550 const char *type;
1551};
1137 1552
1138 EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1553/**
1554 * @def EVAS_SMART_CLASS_INIT_NULL
1555 * Initializer to zero a whole Evas_Smart_Class structure.
1556 *
1557 * @see EVAS_SMART_CLASS_INIT_VERSION
1558 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
1559 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
1560 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
1561 * @ingroup Evas_Smart_Group
1562 */
1563#define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
1139 1564
1140 EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1565/**
1141 EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1566 * @def EVAS_SMART_CLASS_INIT_VERSION
1142 EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1567 * Initializer to zero a whole Evas_Smart_Class structure and set version.
1568 *
1569 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
1570 * latest EVAS_SMART_CLASS_VERSION.
1571 *
1572 * @see EVAS_SMART_CLASS_INIT_NULL
1573 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
1574 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
1575 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
1576 * @ingroup Evas_Smart_Group
1577 */
1578#define EVAS_SMART_CLASS_INIT_VERSION {NULL, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
1143 1579
1144 EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1580/**
1145 EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1581 * @def EVAS_SMART_CLASS_INIT_NAME_VERSION
1582 * Initializer to zero a whole Evas_Smart_Class structure and set name
1583 * and version.
1584 *
1585 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
1586 * latest EVAS_SMART_CLASS_VERSION and name to the specified value.
1587 *
1588 * It will keep a reference to name field as a "const char *", that is,
1589 * name must be available while the structure is used (hint: static or global!)
1590 * and will not be modified.
1591 *
1592 * @see EVAS_SMART_CLASS_INIT_NULL
1593 * @see EVAS_SMART_CLASS_INIT_VERSION
1594 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
1595 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
1596 * @ingroup Evas_Smart_Group
1597 */
1598#define EVAS_SMART_CLASS_INIT_NAME_VERSION(name) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
1146 1599
1147 EAPI void evas_object_map_enable_set (Evas_Object *obj, Eina_Bool enabled); 1600/**
1148 EAPI Eina_Bool evas_object_map_enable_get (const Evas_Object *obj); 1601 * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
1149 EAPI void evas_object_map_source_set (Evas_Object *obj, Evas_Object *src); 1602 * Initializer to zero a whole Evas_Smart_Class structure and set name,
1150 EAPI Evas_Object *evas_object_map_source_get (const Evas_Object *obj); 1603 * version and parent class.
1151 EAPI void evas_object_map_set (Evas_Object *obj, const Evas_Map *map); 1604 *
1152 EAPI const Evas_Map *evas_object_map_get (const Evas_Object *obj); 1605 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
1606 * latest EVAS_SMART_CLASS_VERSION, name to the specified value and
1607 * parent class.
1608 *
1609 * It will keep a reference to name field as a "const char *", that is,
1610 * name must be available while the structure is used (hint: static or global!)
1611 * and will not be modified. Similarly, parent reference will be kept.
1612 *
1613 * @see EVAS_SMART_CLASS_INIT_NULL
1614 * @see EVAS_SMART_CLASS_INIT_VERSION
1615 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
1616 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
1617 * @ingroup Evas_Smart_Group
1618 */
1619#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT(name, parent) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, NULL}
1153 1620
1154 EAPI void evas_map_util_points_populate_from_object_full (Evas_Map *m, const Evas_Object *obj, Evas_Coord z); 1621/**
1155 EAPI void evas_map_util_points_populate_from_object (Evas_Map *m, const Evas_Object *obj); 1622 * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
1156 EAPI void evas_map_util_points_populate_from_geometry (Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z); 1623 * Initializer to zero a whole Evas_Smart_Class structure and set name,
1624 * version, parent class and callbacks definition.
1625 *
1626 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
1627 * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent
1628 * class and callbacks at this level.
1629 *
1630 * It will keep a reference to name field as a "const char *", that is,
1631 * name must be available while the structure is used (hint: static or global!)
1632 * and will not be modified. Similarly, parent and callbacks reference
1633 * will be kept.
1634 *
1635 * @see EVAS_SMART_CLASS_INIT_NULL
1636 * @see EVAS_SMART_CLASS_INIT_VERSION
1637 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
1638 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
1639 * @ingroup Evas_Smart_Group
1640 */
1641#define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS(name, parent, callbacks) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, callbacks}
1157 1642
1158 EAPI void evas_map_util_points_color_set (Evas_Map *m, int r, int g, int b, int a); 1643/**
1644 * @def EVAS_SMART_SUBCLASS_NEW
1645 *
1646 * Convenience macro to subclass a Smart Class.
1647 *
1648 * This macro saves some typing when writing a Smart Class derived from
1649 * another one. In order to work, the user needs to provide some functions
1650 * adhering to the following guidelines.
1651 * - @<prefix@>_smart_set_user(): the internal _smart_set function will call
1652 * this one provided by the user after inheriting everything from the
1653 * parent, which should take care of setting the right member functions
1654 * for the class.
1655 * - @<prefix@>_parent_sc: smart class of the parent. When calling parent
1656 * functions from overloaded ones, use this global variable.
1657 * - @<prefix@>_smart_class_new(): this function returns the Evas_Smart needed
1658 * to create smart objects with this class, should be called by the public
1659 * _add() function.
1660 * - If this new class should be subclassable as well, a public _smart_set()
1661 * function is desirable to fill the class used as parent by the children.
1662 * It's up to the user to provide this interface, which will most likely
1663 * call @<prefix@>_smart_set() to get the job done.
1664 *
1665 * @param smart_name The name used for the Smart Class. e.g: "Evas_Object_Box".
1666 * @param prefix Prefix used for all variables and functions defined.
1667 * @param api_type Type of the structure used as API for the Smart Class. Either Evas_Smart_Class or something derived from it.
1668 * @param parent_type Type of the parent class API.
1669 * @param parent_func Function that sets up the parent class. e.g: evas_object_box_smart_set().
1670 * @param cb_desc Array of callback descriptions for this Smart Class.
1671 *
1672 * @ingroup Evas_Smart_Group
1673 */
1674#define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \
1675 static parent_type prefix##_parent_sc; \
1676 static Eina_Bool prefix##_parent_init = 0; \
1677 static void prefix##_smart_set_user(api_type *api); \
1678 static void prefix##_smart_set(api_type *api) \
1679 { \
1680 Evas_Smart_Class *sc; \
1681 if (!(sc = (Evas_Smart_Class *)api)) \
1682 return; \
1683 if (!prefix##_parent_init) \
1684 { \
1685 memset(&prefix##_parent_sc, 0, sizeof(parent_type)); \
1686 ((Evas_Smart_Class*)&prefix##_parent_sc)->version = EVAS_SMART_CLASS_VERSION; \
1687 parent_func(&prefix##_parent_sc); \
1688 prefix##_parent_init = 1; \
1689 } \
1690 evas_smart_class_inherit(sc, &prefix##_parent_sc); \
1691 prefix##_smart_set_user(api); \
1692 } \
1693 static Evas_Smart * prefix##_smart_class_new(void) \
1694 { \
1695 static Evas_Smart *smart = NULL; \
1696 static api_type api; \
1697 if (!smart) \
1698 { \
1699 Evas_Smart_Class *sc = (Evas_Smart_Class *)&api; \
1700 memset(&api, 0, sizeof(api_type)); \
1701 sc->version = EVAS_SMART_CLASS_VERSION; \
1702 sc->name = smart_name; \
1703 sc->callbacks = cb_desc; \
1704 prefix##_smart_set(&api); \
1705 smart = evas_smart_class_new(sc); \
1706 } \
1707 return smart; \
1708 }
1159 1709
1160 EAPI void evas_map_util_rotate (Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy); 1710/**
1161 EAPI void evas_map_util_zoom (Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy); 1711 * @def EVAS_SMART_DATA_ALLOC
1162 EAPI void evas_map_util_3d_rotate (Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz); 1712 * Convenience macro to allocate smart data only if needed.
1163 EAPI void evas_map_util_3d_lighting (Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ab, int ag); 1713 *
1164 EAPI void evas_map_util_3d_perspective (Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc); 1714 * When writing a subclassable smart object, the .add function will need
1165 EAPI Eina_Bool evas_map_util_clockwise_get (Evas_Map *m); 1715 * to check if the smart private data was already allocated by some child
1716 * object or not. This macro makes it easier to do it.
1717 *
1718 * @param o Evas object passed to the .add function
1719 * @param priv_type The type of the data to allocate
1720 * @ingroup Evas_Smart_Group
1721 */
1722#define EVAS_SMART_DATA_ALLOC(o, priv_type) \
1723 priv_type *priv; \
1724 priv = evas_object_smart_data_get(o); \
1725 if (!priv) \
1726 { \
1727 priv = (priv_type *)calloc(1, sizeof(priv_type)); \
1728 if (!priv) \
1729 return; \
1730 evas_object_smart_data_set(o, priv); \
1731 }
1166 1732
1167 EAPI Evas_Map *evas_map_new (int count);
1168 EAPI void evas_map_smooth_set (Evas_Map *m, Eina_Bool enabled);
1169 EAPI Eina_Bool evas_map_smooth_get (const Evas_Map *m);
1170 EAPI void evas_map_alpha_set (Evas_Map *m, Eina_Bool enabled);
1171 EAPI Eina_Bool evas_map_alpha_get (const Evas_Map *m);
1172 EAPI Evas_Map *evas_map_dup (const Evas_Map *m);
1173 EAPI void evas_map_free (Evas_Map *m);
1174 EAPI void evas_map_point_coord_set (Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z);
1175 EAPI void evas_map_point_coord_get (const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z);
1176 EAPI void evas_map_point_image_uv_set (Evas_Map *m, int idx, double u, double v);
1177 EAPI void evas_map_point_image_uv_get (const Evas_Map *m, int idx, double *u, double *v);
1178 EAPI void evas_map_point_color_set (Evas_Map *m, int idx, int r, int g, int b, int a);
1179 EAPI void evas_map_point_color_get (const Evas_Map *m, int idx, int *r, int *g, int *b, int *a);
1180
1181/* smart objects */
1182 EINA_DEPRECATED EAPI Evas_Smart *evas_smart_new (const char *name, void (*func_add) (Evas_Object *obj), void (*func_del) (Evas_Object *obj), void (*func_layer_set) (Evas_Object *obj, int l), void (*func_raise) (Evas_Object *obj), void (*func_lower) (Evas_Object *obj), void (*func_stack_above) (Evas_Object *obj, Evas_Object *above), void (*func_stack_below) (Evas_Object *obj, Evas_Object *below), void (*func_move) (Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*func_resize) (Evas_Object *obj, Evas_Coord w, Evas_Coord h), void (*func_show) (Evas_Object *obj), void (*func_hide) (Evas_Object *obj), void (*func_color_set) (Evas_Object *obj, int r, int g, int b, int a), void (*func_clip_set) (Evas_Object *obj, Evas_Object *clip), void (*func_clip_unset) (Evas_Object *obj), const void *data) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 1733 EINA_DEPRECATED EAPI Evas_Smart *evas_smart_new (const char *name, void (*func_add) (Evas_Object *obj), void (*func_del) (Evas_Object *obj), void (*func_layer_set) (Evas_Object *obj, int l), void (*func_raise) (Evas_Object *obj), void (*func_lower) (Evas_Object *obj), void (*func_stack_above) (Evas_Object *obj, Evas_Object *above), void (*func_stack_below) (Evas_Object *obj, Evas_Object *below), void (*func_move) (Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*func_resize) (Evas_Object *obj, Evas_Coord w, Evas_Coord h), void (*func_show) (Evas_Object *obj), void (*func_hide) (Evas_Object *obj), void (*func_color_set) (Evas_Object *obj, int r, int g, int b, int a), void (*func_clip_set) (Evas_Object *obj, Evas_Object *clip), void (*func_clip_unset) (Evas_Object *obj), const void *data) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1183 EAPI void evas_smart_free (Evas_Smart *s) EINA_ARG_NONNULL(1); 1734 EAPI void evas_smart_free (Evas_Smart *s) EINA_ARG_NONNULL(1);
1184 EAPI Evas_Smart *evas_smart_class_new (const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 1735 EAPI Evas_Smart *evas_smart_class_new (const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
@@ -1189,6 +1740,7 @@ extern "C" {
1189 1740
1190 EAPI Eina_Bool evas_smart_class_inherit_full (Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) EINA_ARG_NONNULL(1, 2); 1741 EAPI Eina_Bool evas_smart_class_inherit_full (Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) EINA_ARG_NONNULL(1, 2);
1191 /** 1742 /**
1743 * @def evas_smart_class_inherit
1192 * Easy to use version of evas_smart_class_inherit_full(). 1744 * Easy to use version of evas_smart_class_inherit_full().
1193 * 1745 *
1194 * This version will use sizeof(parent_sc), copying everything. 1746 * This version will use sizeof(parent_sc), copying everything.
@@ -1196,10 +1748,23 @@ extern "C" {
1196 * @param sc child class, will have methods copied from @a parent_sc 1748 * @param sc child class, will have methods copied from @a parent_sc
1197 * @param parent_sc parent class, will provide contents to be copied. 1749 * @param parent_sc parent class, will provide contents to be copied.
1198 * @return 1 on success, 0 on failure. 1750 * @return 1 on success, 0 on failure.
1751 * @ingroup Evas_Smart_Group
1199 */ 1752 */
1200#define evas_smart_class_inherit(sc, parent_sc) evas_smart_class_inherit_full(sc, parent_sc, sizeof(*parent_sc)) 1753#define evas_smart_class_inherit(sc, parent_sc) evas_smart_class_inherit_full(sc, parent_sc, sizeof(*parent_sc))
1201 1754
1202 1755/**
1756 * @defgroup Evas_Smart_Object_Group Smart Object Functions
1757 *
1758 * Functions dealing with evas smart objects (instances).
1759 *
1760 * Smart objects are groupings of primitive evas objects that behave as a
1761 * cohesive group. For instance, a file manager icon may be a smart object
1762 * composed of an image object, a text label and two rectangles that appear
1763 * behind the image and text when the icon is selected. As a smart object,
1764 * the normal evas api could be used on the icon object.
1765 *
1766 * @see @ref Evas_Smart_Group for class definitions.
1767 */
1203 EAPI Evas_Object *evas_object_smart_add (Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC; 1768 EAPI Evas_Object *evas_object_smart_add (Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC;
1204 EAPI void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2); 1769 EAPI void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2);
1205 EAPI void evas_object_smart_member_del (Evas_Object *obj) EINA_ARG_NONNULL(1); 1770 EAPI void evas_object_smart_member_del (Evas_Object *obj) EINA_ARG_NONNULL(1);
@@ -1220,259 +1785,90 @@ extern "C" {
1220 EAPI void evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1); 1785 EAPI void evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
1221 EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1786 EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1222 EAPI void evas_object_smart_calculate (Evas_Object *obj) EINA_ARG_NONNULL(1); 1787 EAPI void evas_object_smart_calculate (Evas_Object *obj) EINA_ARG_NONNULL(1);
1223
1224 EAPI void evas_smart_objects_calculate (Evas *e);
1225
1226/* events */
1227 EAPI void evas_event_freeze (Evas *e) EINA_ARG_NONNULL(1);
1228 EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONNULL(1);
1229 EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1230 EAPI void evas_event_feed_mouse_down (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
1231 EAPI void evas_event_feed_mouse_up (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
1232 EAPI void evas_event_feed_mouse_move (Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
1233 EAPI void evas_event_feed_mouse_in (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
1234 EAPI void evas_event_feed_mouse_out (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
1235 EAPI void evas_event_feed_multi_down (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
1236 EAPI void evas_event_feed_multi_up (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
1237 EAPI void evas_event_feed_multi_move (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data);
1238 EAPI void evas_event_feed_mouse_cancel (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
1239 EAPI void evas_event_feed_mouse_wheel (Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
1240 EAPI void evas_event_feed_key_down (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
1241 EAPI void evas_event_feed_key_up (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
1242 EAPI void evas_event_feed_hold (Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
1243
1244 EAPI void evas_object_focus_set (Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1);
1245 EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1246
1247 EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1248
1249 EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1250 EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1251
1252 EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
1253
1254 EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
1255
1256 EAPI void evas_key_modifier_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
1257 EAPI void evas_key_modifier_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
1258 EAPI void evas_key_lock_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
1259 EAPI void evas_key_lock_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
1260
1261 EAPI void evas_key_modifier_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
1262 EAPI void evas_key_modifier_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
1263 EAPI void evas_key_lock_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
1264 EAPI void evas_key_lock_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
1265
1266 EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
1267
1268 EAPI Eina_Bool evas_object_key_grab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
1269 EAPI void evas_object_key_ungrab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) EINA_ARG_NONNULL(1, 2);
1270
1271 EAPI void evas_object_pass_events_set (Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1);
1272 EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1273 EAPI void evas_object_repeat_events_set (Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1);
1274 EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1275 EAPI void evas_object_propagate_events_set (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1);
1276 EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1277 EAPI void evas_object_pointer_mode_set (Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1);
1278 EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1279 1788
1280 1789 EAPI void evas_smart_objects_calculate (Evas *e);
1281 EAPI void evas_object_precise_is_inside_set (Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1);
1282 EAPI Eina_Bool evas_object_precise_is_inside_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1283
1284 EAPI void evas_object_event_callback_add (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
1285 EAPI void *evas_object_event_callback_del (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3);
1286 EAPI void *evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
1287
1288 EAPI void evas_event_callback_add (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
1289 EAPI void *evas_event_callback_del (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3);
1290 EAPI void *evas_event_callback_del_full (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
1291
1292 EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
1293 EAPI int evas_async_events_process (void);
1294 EAPI Eina_Bool evas_async_events_put (const void *target, Evas_Callback_Type type, void *event_info, void (*func)(void *target, Evas_Callback_Type type, void *event_info)) EINA_ARG_NONNULL(1, 4);
1295
1296 EAPI void evas_object_intercept_show_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2);
1297 EAPI void *evas_object_intercept_show_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2);
1298 EAPI void evas_object_intercept_hide_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2);
1299 EAPI void *evas_object_intercept_hide_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2);
1300 EAPI void evas_object_intercept_move_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y), const void *data) EINA_ARG_NONNULL(1, 2);
1301 EAPI void *evas_object_intercept_move_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y)) EINA_ARG_NONNULL(1, 2);
1302 EAPI void evas_object_intercept_resize_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h), const void *data) EINA_ARG_NONNULL(1, 2);
1303 EAPI void *evas_object_intercept_resize_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h)) EINA_ARG_NONNULL(1, 2);
1304 EAPI void evas_object_intercept_raise_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2);
1305 EAPI void *evas_object_intercept_raise_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2);
1306 EAPI void evas_object_intercept_lower_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2);
1307 EAPI void *evas_object_intercept_lower_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2);
1308 EAPI void evas_object_intercept_stack_above_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *above), const void *data) EINA_ARG_NONNULL(1, 2);
1309 EAPI void *evas_object_intercept_stack_above_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *above)) EINA_ARG_NONNULL(1, 2);
1310 EAPI void evas_object_intercept_stack_below_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *below), const void *data) EINA_ARG_NONNULL(1, 2);
1311 EAPI void *evas_object_intercept_stack_below_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *below)) EINA_ARG_NONNULL(1, 2);
1312 EAPI void evas_object_intercept_layer_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int l), const void *data) EINA_ARG_NONNULL(1, 2);
1313 EAPI void *evas_object_intercept_layer_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int l)) EINA_ARG_NONNULL(1, 2);
1314 EAPI void evas_object_intercept_color_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int r, int g, int b, int a), const void *data) EINA_ARG_NONNULL(1, 2);
1315 EAPI void *evas_object_intercept_color_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int r, int g, int b, int a)) EINA_ARG_NONNULL(1, 2);
1316 EAPI void evas_object_intercept_clip_set_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *clip), const void *data) EINA_ARG_NONNULL(1, 2);
1317 EAPI void *evas_object_intercept_clip_set_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object *clip)) EINA_ARG_NONNULL(1, 2);
1318 EAPI void evas_object_intercept_clip_unset_callback_add (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void *data) EINA_ARG_NONNULL(1, 2);
1319 EAPI void *evas_object_intercept_clip_unset_callback_del (Evas_Object *obj, void (*func) (void *data, Evas_Object *obj)) EINA_ARG_NONNULL(1, 2);
1320
1321 typedef struct _Evas_Cserve_Stats Evas_Cserve_Stats;
1322 typedef struct _Evas_Cserve_Image_Cache Evas_Cserve_Image_Cache;
1323 typedef struct _Evas_Cserve_Image Evas_Cserve_Image;
1324 typedef struct _Evas_Cserve_Config Evas_Cserve_Config;
1325
1326 struct _Evas_Cserve_Stats
1327 {
1328 int saved_memory;
1329 int wasted_memory;
1330 int saved_memory_peak;
1331 int wasted_memory_peak;
1332 double saved_time_image_header_load;
1333 double saved_time_image_data_load;
1334 };
1335
1336 struct _Evas_Cserve_Image_Cache
1337 {
1338 struct {
1339 int mem_total;
1340 int count;
1341 } active, cached;
1342 Eina_List *images;
1343 };
1344
1345 struct _Evas_Cserve_Image
1346 {
1347 const char *file, *key;
1348 int w, h;
1349 time_t file_mod_time;
1350 time_t file_checked_time;
1351 time_t cached_time;
1352 int refcount;
1353 int data_refcount;
1354 int memory_footprint;
1355 double head_load_time;
1356 double data_load_time;
1357 Eina_Bool alpha : 1;
1358 Eina_Bool data_loaded : 1;
1359 Eina_Bool active : 1;
1360 Eina_Bool dead : 1;
1361 Eina_Bool useless : 1;
1362 };
1363
1364 struct _Evas_Cserve_Config
1365 {
1366 int cache_max_usage;
1367 int cache_item_timeout;
1368 int cache_item_timeout_check;
1369 };
1370
1371 EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
1372 EAPI Eina_Bool evas_cserve_connected_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
1373 EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT EINA_PURE;
1374 EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache) EINA_PURE;
1375 EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE;
1376 EAPI Eina_Bool evas_cserve_config_set (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE;
1377 EAPI void evas_cserve_disconnect (void) EINA_PURE;
1378
1379/* Evas utility routines for color space conversions */
1380/* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */
1381/* rgb color space has r,g,b in the range 0 to 255 */
1382 EAPI void evas_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b);
1383 EAPI void evas_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v);
1384
1385/* argb color space has a,r,g,b in the range 0 to 255 */
1386 EAPI void evas_color_argb_premul (int a, int *r, int *g, int *b);
1387 EAPI void evas_color_argb_unpremul (int a, int *r, int *g, int *b);
1388
1389 EAPI void evas_data_argb_premul (unsigned int *data, unsigned int len);
1390 EAPI void evas_data_argb_unpremul (unsigned int *data, unsigned int len);
1391
1392/* Evas utility routines for working with transforms */
1393 /* Set t to the identity */
1394 EAPI void evas_transform_identity_set (Evas_Transform *t);
1395 /* Left-multiply t by an xy rotation defined by the given angle (in degrees) */
1396 EAPI void evas_transform_rotate (double angle, Evas_Transform *t);
1397 /* Left-multiply t by an xy translation defined by the given dx, dy values */
1398 EAPI void evas_transform_translate (float dx, float dy, Evas_Transform *t);
1399 /* Left-multiply t by an xy scaling defined by the given sx, sy factors */
1400 EAPI void evas_transform_scale (float sx, float sy, Evas_Transform *t);
1401 /* Left-multiply t by an xy shearing defined by the given sh, sv values */
1402 EAPI void evas_transform_shear (float sh, float sv, Evas_Transform *t);
1403 /* Left-multiply t by the given transform l */
1404 EAPI void evas_transform_compose (Evas_Transform *l, Evas_Transform *t);
1405
1406/* Evas imaging api - exports some of the comon gfx engine routines */
1407/* this is not complete and should be considered experimental. use at your */
1408/* own risk */
1409
1410 typedef struct _Evas_Imaging_Image Evas_Imaging_Image;
1411 typedef struct _Evas_Imaging_Font Evas_Imaging_Font;
1412
1413 /**
1414 * Error identifier or EVAS_LOAD_ERROR_NONE. see evas_load_error_str().
1415 */
1416 EAPI extern int evas_imaging_image_load_error;
1417
1418 EAPI Evas_Imaging_Image *evas_imaging_image_load (const char *file, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC;
1419 EAPI void evas_imaging_image_free (Evas_Imaging_Image *im) EINA_ARG_NONNULL(1);
1420 EAPI void evas_imaging_image_size_get (const Evas_Imaging_Image *im, int *w, int *h) EINA_ARG_NONNULL(1);
1421 EAPI Eina_Bool evas_imaging_image_alpha_get (const Evas_Imaging_Image *im) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1422 EAPI void evas_imaging_image_cache_set (int bytes);
1423 EAPI int evas_imaging_image_cache_get (void) EINA_WARN_UNUSED_RESULT;
1424
1425 EAPI void evas_imaging_font_hinting_set (Evas_Font_Hinting_Flags hinting);
1426 EAPI Evas_Font_Hinting_Flags evas_imaging_font_hinting_get (void) EINA_WARN_UNUSED_RESULT;
1427 EAPI Eina_Bool evas_imaging_font_hinting_can_hint (Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT;
1428
1429 EAPI Evas_Imaging_Font *evas_imaging_font_load (const char *file, const char *key, int size) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1430 EAPI void evas_imaging_font_free (Evas_Imaging_Font *fn) EINA_ARG_NONNULL(1);
1431 EAPI int evas_imaging_font_ascent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1432 EAPI int evas_imaging_font_descent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1433 EAPI int evas_imaging_font_max_ascent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1434 EAPI int evas_imaging_font_max_descent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1435 EAPI int evas_imaging_font_line_advance_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1436 EAPI void evas_imaging_font_string_advance_get (const Evas_Imaging_Font *fn, const char *str, int *x, int *y) EINA_ARG_NONNULL(1, 2);
1437 EAPI void evas_imaging_font_string_size_query (const Evas_Imaging_Font *fn, const char *str, int *w, int *h) EINA_ARG_NONNULL(1, 2);
1438 EAPI int evas_imaging_font_string_inset_get (const Evas_Imaging_Font *fn, const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
1439 EAPI int evas_imaging_font_string_char_coords_get (const Evas_Imaging_Font *fn, const char *str, int pos, int *cx, int *cy, int *cw, int *ch) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
1440 EAPI int evas_imaging_font_string_char_at_coords_get (const Evas_Imaging_Font *fn, const char *str, int x, int y, int *cx, int *cy, int *cw, int *ch) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
1441
1442 EAPI void evas_imaging_font_cache_set (int bytes);
1443 EAPI int evas_imaging_font_cache_get (void) EINA_WARN_UNUSED_RESULT;
1444 1790
1445 1791
1446 /** 1792/**
1447 * Utilities: 1793 * @defgroup Evas_Smart_Object_Clipped Clipped Smart Object
1448 */ 1794 *
1449 EAPI const char *evas_load_error_str(int error); 1795 * Clipped smart object is a base to construct other smart objects
1450 1796 * that based on the concept of having an internal clipper that is
1797 * applied to all its other children. This clipper will control the
1798 * visibility, clipping and color of sibling objects (remember that
1799 * the clipping is recursive, and clipper color modulates the color of
1800 * its clippees). By default, this base will also move children
1801 * relatively to the parent, and delete them when parent is
1802 * deleted. In other words, it is the base for simple object grouping.
1803 *
1804 * @see evas_object_smart_clipped_smart_set()
1805 *
1806 * @ingroup Evas_Smart_Object_Group
1807 */
1451 1808
1452 /** 1809/**
1453 * Every subclass should provide this at the beginning of their own 1810 * Every subclass should provide this at the beginning of their own
1454 * data set with evas_object_smart_data_set(). 1811 * data set with evas_object_smart_data_set().
1455 */ 1812 */
1456 typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data; 1813 typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data;
1457 struct _Evas_Object_Smart_Clipped_Data 1814 struct _Evas_Object_Smart_Clipped_Data
1458 { 1815 {
1459 Evas_Object *clipper; 1816 Evas_Object *clipper;
1460 Evas *evas; 1817 Evas *evas;
1461 }; 1818 };
1462 1819
1463 EAPI Evas_Object *evas_object_smart_clipped_clipper_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 1820 EAPI Evas_Object *evas_object_smart_clipped_clipper_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1464 EAPI void evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc) EINA_ARG_NONNULL(1); 1821 EAPI void evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc) EINA_ARG_NONNULL(1);
1465 1822
1466 /* convenience */
1467 EAPI void evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1); 1823 EAPI void evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1);
1468 1824
1469 1825/**
1826 * @defgroup Evas_Object_Box Box (Sequence) Smart Object.
1827 *
1828 * Convenience smart object that packs children as a sequence using
1829 * a layout function specified by user. There are a couple of helper
1830 * layout functions, all of them using children size hints to define
1831 * their size and alignment inside their cell space.
1832 *
1833 * @see @ref Evas_Object_Group_Size_Hints
1834 *
1835 * @ingroup Evas_Smart_Object_Group
1836 */
1837/**
1838 * @typedef Evas_Object_Box_Api
1839 * Smart Class extension providing extra box requirements.
1840 * @ingroup Evas_Object_Box
1841 */
1470 typedef struct _Evas_Object_Box_Api Evas_Object_Box_Api; 1842 typedef struct _Evas_Object_Box_Api Evas_Object_Box_Api;
1843/**
1844 * @typedef Evas_Object_Box_Data
1845 * Smart instance data providing box requirements.
1846 * @ingroup Evas_Object_Box
1847 */
1471 typedef struct _Evas_Object_Box_Data Evas_Object_Box_Data; 1848 typedef struct _Evas_Object_Box_Data Evas_Object_Box_Data;
1849/**
1850 * @typedef Evas_Object_Box_Option
1851 * The base structure for a box option.
1852 * @ingroup Evas_Object_Box
1853 */
1472 typedef struct _Evas_Object_Box_Option Evas_Object_Box_Option; 1854 typedef struct _Evas_Object_Box_Option Evas_Object_Box_Option;
1473 typedef void (*Evas_Object_Box_Layout)(Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data); 1855 typedef void (*Evas_Object_Box_Layout)(Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data);
1474 1856
1857/**
1858 * @def EVAS_OBJECT_BOX_API_VERSION
1859 * @ingroup Evas_Object_Box
1860 */
1475#define EVAS_OBJECT_BOX_API_VERSION 1 1861#define EVAS_OBJECT_BOX_API_VERSION 1
1862/**
1863 * @struct _Evas_Object_Box_Api
1864 *
1865 * This structure should be used by any class that wants to inherit
1866 * from box to provide custom behavior not allowed only by providing a
1867 * layout function with evas_object_box_layout_set().
1868 *
1869 * @extends Evas_Smart_Class
1870 * @ingroup Evas_Object_Box
1871 */
1476 struct _Evas_Object_Box_Api 1872 struct _Evas_Object_Box_Api
1477 { 1873 {
1478 Evas_Smart_Class base; 1874 Evas_Smart_Class base;
@@ -1493,6 +1889,7 @@ extern "C" {
1493 }; 1889 };
1494 1890
1495/** 1891/**
1892 * @def EVAS_OBJECT_BOX_API_INIT
1496 * Initializer for whole Evas_Object_Box_Api structure. 1893 * Initializer for whole Evas_Object_Box_Api structure.
1497 * 1894 *
1498 * @param smart_class_init initializer to use for the "base" field 1895 * @param smart_class_init initializer to use for the "base" field
@@ -1504,19 +1901,23 @@ extern "C" {
1504 * @see EVAS_OBJECT_BOX_API_INIT_NULL 1901 * @see EVAS_OBJECT_BOX_API_INIT_NULL
1505 * @see EVAS_OBJECT_BOX_API_INIT_VERSION 1902 * @see EVAS_OBJECT_BOX_API_INIT_VERSION
1506 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION 1903 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
1904 * @ingroup Evas_Object_Box
1507 */ 1905 */
1508#define EVAS_OBJECT_BOX_API_INIT(smart_class_init) {smart_class_init, EVAS_OBJECT_BOX_API_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} 1906#define EVAS_OBJECT_BOX_API_INIT(smart_class_init) {smart_class_init, EVAS_OBJECT_BOX_API_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
1509 1907
1510/** 1908/**
1909 * @def EVAS_OBJECT_BOX_API_INIT_NULL
1511 * Initializer to zero a whole Evas_Object_Box_Api structure. 1910 * Initializer to zero a whole Evas_Object_Box_Api structure.
1512 * 1911 *
1513 * @see EVAS_OBJECT_BOX_API_INIT_VERSION 1912 * @see EVAS_OBJECT_BOX_API_INIT_VERSION
1514 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION 1913 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
1515 * @see EVAS_OBJECT_BOX_API_INIT 1914 * @see EVAS_OBJECT_BOX_API_INIT
1915 * @ingroup Evas_Object_Box
1516 */ 1916 */
1517#define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL) 1917#define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL)
1518 1918
1519/** 1919/**
1920 * @def EVAS_OBJECT_BOX_API_INIT_VERSION
1520 * Initializer to zero a whole Evas_Object_Box_Api structure and set version. 1921 * Initializer to zero a whole Evas_Object_Box_Api structure and set version.
1521 * 1922 *
1522 * Similar to EVAS_OBJECT_BOX_API_INIT_NULL, but will set version field of 1923 * Similar to EVAS_OBJECT_BOX_API_INIT_NULL, but will set version field of
@@ -1525,10 +1926,12 @@ extern "C" {
1525 * @see EVAS_OBJECT_BOX_API_INIT_NULL 1926 * @see EVAS_OBJECT_BOX_API_INIT_NULL
1526 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION 1927 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
1527 * @see EVAS_OBJECT_BOX_API_INIT 1928 * @see EVAS_OBJECT_BOX_API_INIT
1929 * @ingroup Evas_Object_Box
1528 */ 1930 */
1529#define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION) 1931#define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION)
1530 1932
1531/** 1933/**
1934 * @def EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
1532 * Initializer to zero a whole Evas_Object_Box_Api structure and set 1935 * Initializer to zero a whole Evas_Object_Box_Api structure and set
1533 * name and version. 1936 * name and version.
1534 * 1937 *
@@ -1543,9 +1946,21 @@ extern "C" {
1543 * @see EVAS_OBJECT_BOX_API_INIT_NULL 1946 * @see EVAS_OBJECT_BOX_API_INIT_NULL
1544 * @see EVAS_OBJECT_BOX_API_INIT_VERSION 1947 * @see EVAS_OBJECT_BOX_API_INIT_VERSION
1545 * @see EVAS_OBJECT_BOX_API_INIT 1948 * @see EVAS_OBJECT_BOX_API_INIT
1949 * @ingroup Evas_Object_Box
1546 */ 1950 */
1547#define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name)) 1951#define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
1548 1952
1953/**
1954 * @struct _Evas_Object_Box_Data
1955 *
1956 * This structure augments clipped smart object's instance data,
1957 * providing extra members required by generic box implementation. If
1958 * a subclass inherits from #Evas_Object_Box_Api then it may augment
1959 * #Evas_Object_Box_Data to fit its own needs.
1960 *
1961 * @extends Evas_Object_Smart_Clipped_Data
1962 * @ingroup Evas_Object_Box
1963 */
1549 struct _Evas_Object_Box_Data 1964 struct _Evas_Object_Box_Data
1550 { 1965 {
1551 Evas_Object_Smart_Clipped_Data base; 1966 Evas_Object_Smart_Clipped_Data base;
@@ -1611,6 +2026,17 @@ extern "C" {
1611 EAPI Eina_Bool evas_object_box_option_property_vget(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2); 2026 EAPI Eina_Bool evas_object_box_option_property_vget(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2);
1612 2027
1613 2028
2029/**
2030 * @defgroup Evas_Object_Table Table Smart Object.
2031 *
2032 * Convenience smart object that packs children using a tabular
2033 * layout using children size hints to define their size and
2034 * alignment inside their cell space.
2035 *
2036 * @see @ref Evas_Object_Group_Size_Hints
2037 *
2038 * @ingroup Evas_Smart_Object_Group
2039 */
1614 EAPI Evas_Object *evas_object_table_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 2040 EAPI Evas_Object *evas_object_table_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1615 EAPI Evas_Object *evas_object_table_add_to(Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 2041 EAPI Evas_Object *evas_object_table_add_to(Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1616 EAPI void evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) EINA_ARG_NONNULL(1); 2042 EAPI void evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) EINA_ARG_NONNULL(1);
@@ -1629,6 +2055,204 @@ extern "C" {
1629 EAPI Eina_Accessor *evas_object_table_accessor_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 2055 EAPI Eina_Accessor *evas_object_table_accessor_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1630 EAPI Eina_List *evas_object_table_children_get(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 2056 EAPI Eina_List *evas_object_table_children_get(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1631 2057
2058
2059/**
2060 * @defgroup Evas_Cserve Shared Image Cache Server
2061 *
2062 * Provides client-server infrastructure to share bitmaps across
2063 * multiple processes, saving data and processing power.
2064 */
2065 typedef struct _Evas_Cserve_Stats Evas_Cserve_Stats;
2066 typedef struct _Evas_Cserve_Image_Cache Evas_Cserve_Image_Cache;
2067 typedef struct _Evas_Cserve_Image Evas_Cserve_Image;
2068 typedef struct _Evas_Cserve_Config Evas_Cserve_Config;
2069
2070/**
2071 * Statistics about server that shares cached bitmaps.
2072 * @ingroup Evas_Cserve
2073 */
2074 struct _Evas_Cserve_Stats
2075 {
2076 int saved_memory; /**< current saved memory, in bytes */
2077 int wasted_memory; /**< current wasted memory, in bytes */
2078 int saved_memory_peak; /**< peak of saved memory, in bytes */
2079 int wasted_memory_peak; /**< peak of wasted memory, in bytes */
2080 double saved_time_image_header_load;
2081 double saved_time_image_data_load;
2082 };
2083
2084/**
2085 * Cache of images shared by server.
2086 * @ingroup Evas_Cserve
2087 */
2088 struct _Evas_Cserve_Image_Cache
2089 {
2090 struct {
2091 int mem_total;
2092 int count;
2093 } active, cached;
2094 Eina_List *images;
2095 };
2096
2097/**
2098 * An image shared by the server.
2099 * @ingroup Evas_Cserve
2100 */
2101 struct _Evas_Cserve_Image
2102 {
2103 const char *file, *key;
2104 int w, h;
2105 time_t file_mod_time;
2106 time_t file_checked_time;
2107 time_t cached_time;
2108 int refcount;
2109 int data_refcount;
2110 int memory_footprint;
2111 double head_load_time;
2112 double data_load_time;
2113 Eina_Bool alpha : 1;
2114 Eina_Bool data_loaded : 1;
2115 Eina_Bool active : 1;
2116 Eina_Bool dead : 1;
2117 Eina_Bool useless : 1;
2118 };
2119
2120/**
2121 * Configuration that controls the server that shares cached bitmaps.
2122 * @ingroup Evas_Cserve
2123 */
2124 struct _Evas_Cserve_Config
2125 {
2126 int cache_max_usage;
2127 int cache_item_timeout;
2128 int cache_item_timeout_check;
2129 };
2130
2131 EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
2132 EAPI Eina_Bool evas_cserve_connected_get (void) EINA_WARN_UNUSED_RESULT;
2133 EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT;
2134 EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache) EINA_PURE;
2135 EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE;
2136 EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE;
2137 EAPI void evas_cserve_disconnect (void);
2138
2139
2140/**
2141 * @defgroup Evas_Utils General Utilities
2142 *
2143 * Some functions that are handy but are not specific of canvas or
2144 * objects.
2145 */
2146 EAPI const char *evas_load_error_str(int error);
2147
2148/* Evas utility routines for color space conversions */
2149/* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */
2150/* rgb color space has r,g,b in the range 0 to 255 */
2151 EAPI void evas_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b);
2152 EAPI void evas_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v);
2153
2154/* argb color space has a,r,g,b in the range 0 to 255 */
2155 EAPI void evas_color_argb_premul (int a, int *r, int *g, int *b);
2156 EAPI void evas_color_argb_unpremul (int a, int *r, int *g, int *b);
2157
2158 EAPI void evas_data_argb_premul (unsigned int *data, unsigned int len);
2159 EAPI void evas_data_argb_unpremul (unsigned int *data, unsigned int len);
2160
2161/* Evas utility routines for working with transforms */
2162 /* Set t to the identity */
2163 EAPI void evas_transform_identity_set (Evas_Transform *t);
2164 /* Left-multiply t by an xy rotation defined by the given angle (in degrees) */
2165 EAPI void evas_transform_rotate (double angle, Evas_Transform *t);
2166 /* Left-multiply t by an xy translation defined by the given dx, dy values */
2167 EAPI void evas_transform_translate (float dx, float dy, Evas_Transform *t);
2168 /* Left-multiply t by an xy scaling defined by the given sx, sy factors */
2169 EAPI void evas_transform_scale (float sx, float sy, Evas_Transform *t);
2170 /* Left-multiply t by an xy shearing defined by the given sh, sv values */
2171 EAPI void evas_transform_shear (float sh, float sv, Evas_Transform *t);
2172 /* Left-multiply t by the given transform l */
2173 EAPI void evas_transform_compose (Evas_Transform *l, Evas_Transform *t);
2174
2175/* string and font handling */
2176 EAPI int evas_string_char_next_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
2177 EAPI int evas_string_char_prev_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
2178 EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2179
2180/**
2181 * @defgroup Evas_Imaging Imaging and Commong GFX
2182 *
2183 * Evas imaging api - exports some of the comon gfx engine routines
2184 * this is not complete and should be considered experimental. use at your
2185 * own risk
2186 */
2187
2188 typedef struct _Evas_Imaging_Image Evas_Imaging_Image;
2189 typedef struct _Evas_Imaging_Font Evas_Imaging_Font;
2190
2191 /**
2192 * Error identifier or EVAS_LOAD_ERROR_NONE. see evas_load_error_str().
2193 * @ingroup Evas_Imaging
2194 */
2195 EAPI extern int evas_imaging_image_load_error;
2196
2197 EAPI Evas_Imaging_Image *evas_imaging_image_load (const char *file, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC;
2198 EAPI void evas_imaging_image_free (Evas_Imaging_Image *im) EINA_ARG_NONNULL(1);
2199 EAPI void evas_imaging_image_size_get (const Evas_Imaging_Image *im, int *w, int *h) EINA_ARG_NONNULL(1);
2200 EAPI Eina_Bool evas_imaging_image_alpha_get (const Evas_Imaging_Image *im) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2201 EAPI void evas_imaging_image_cache_set (int bytes);
2202 EAPI int evas_imaging_image_cache_get (void) EINA_WARN_UNUSED_RESULT;
2203
2204 EAPI void evas_imaging_font_hinting_set (Evas_Font_Hinting_Flags hinting);
2205 EAPI Evas_Font_Hinting_Flags evas_imaging_font_hinting_get (void) EINA_WARN_UNUSED_RESULT;
2206 EAPI Eina_Bool evas_imaging_font_hinting_can_hint (Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT;
2207
2208 EAPI Evas_Imaging_Font *evas_imaging_font_load (const char *file, const char *key, int size) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2209 EAPI void evas_imaging_font_free (Evas_Imaging_Font *fn) EINA_ARG_NONNULL(1);
2210 EAPI int evas_imaging_font_ascent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2211 EAPI int evas_imaging_font_descent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2212 EAPI int evas_imaging_font_max_ascent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2213 EAPI int evas_imaging_font_max_descent_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2214 EAPI int evas_imaging_font_line_advance_get (const Evas_Imaging_Font *fn) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2215 EAPI void evas_imaging_font_string_advance_get (const Evas_Imaging_Font *fn, const char *str, int *x, int *y) EINA_ARG_NONNULL(1, 2);
2216 EAPI void evas_imaging_font_string_size_query (const Evas_Imaging_Font *fn, const char *str, int *w, int *h) EINA_ARG_NONNULL(1, 2);
2217 EAPI int evas_imaging_font_string_inset_get (const Evas_Imaging_Font *fn, const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
2218 EAPI int evas_imaging_font_string_char_coords_get (const Evas_Imaging_Font *fn, const char *str, int pos, int *cx, int *cy, int *cw, int *ch) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
2219 EAPI int evas_imaging_font_string_char_at_coords_get (const Evas_Imaging_Font *fn, const char *str, int x, int y, int *cx, int *cy, int *cw, int *ch) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
2220
2221 EAPI void evas_imaging_font_cache_set (int bytes);
2222 EAPI int evas_imaging_font_cache_get (void) EINA_WARN_UNUSED_RESULT;
2223
2224
2225
2226
2227
2228/**
2229 * TO BE DOCUMENTED:
2230 * @todo document key modifiers.
2231 */
2232 EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2233 EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2234
2235 EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
2236
2237 EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
2238
2239 EAPI void evas_key_modifier_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2240 EAPI void evas_key_modifier_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2241 EAPI void evas_key_lock_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2242 EAPI void evas_key_lock_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2243
2244 EAPI void evas_key_modifier_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2245 EAPI void evas_key_modifier_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2246 EAPI void evas_key_lock_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2247 EAPI void evas_key_lock_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2248
2249 EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
2250
2251 EAPI Eina_Bool evas_object_key_grab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
2252 EAPI void evas_object_key_ungrab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) EINA_ARG_NONNULL(1, 2);
2253
2254
2255
1632#ifdef __cplusplus 2256#ifdef __cplusplus
1633} 2257}
1634#endif 2258#endif
diff --git a/legacy/evas/src/lib/canvas/evas_async_events.c b/legacy/evas/src/lib/canvas/evas_async_events.c
index 45cbf3f..76a3787 100644
--- a/legacy/evas/src/lib/canvas/evas_async_events.c
+++ b/legacy/evas/src/lib/canvas/evas_async_events.c
@@ -81,6 +81,7 @@ evas_async_events_shutdown(void)
81 * asynchronous events of the canvas. Naturally, other mainloops, 81 * asynchronous events of the canvas. Naturally, other mainloops,
82 * apart from ecore, may make use of it. 82 * apart from ecore, may make use of it.
83 * 83 *
84 * @ingroup Evas_Group
84 */ 85 */
85EAPI int 86EAPI int
86evas_async_events_fd_get(void) 87evas_async_events_fd_get(void)
@@ -103,6 +104,7 @@ evas_async_events_fd_get(void)
103 * together with other event parameters, when queued, get called (with 104 * together with other event parameters, when queued, get called (with
104 * those parameters), in that order. 105 * those parameters), in that order.
105 * 106 *
107 * @ingroup Evas_Group
106 */ 108 */
107EAPI int 109EAPI int
108evas_async_events_process(void) 110evas_async_events_process(void)
@@ -156,6 +158,7 @@ evas_async_events_process(void)
156 * whose call is to happen after evas_async_events_process() is 158 * whose call is to happen after evas_async_events_process() is
157 * called. 159 * called.
158 * 160 *
161 * @ingroup Evas_Group
159 */ 162 */
160EAPI Eina_Bool 163EAPI Eina_Bool
161evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, void (*func)(void *target, Evas_Callback_Type type, void *event_info)) 164evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, void (*func)(void *target, Evas_Callback_Type type, void *event_info))
diff --git a/legacy/evas/src/lib/canvas/evas_callbacks.c b/legacy/evas/src/lib/canvas/evas_callbacks.c
index c61d73c..c67c67b 100644
--- a/legacy/evas/src/lib/canvas/evas_callbacks.c
+++ b/legacy/evas/src/lib/canvas/evas_callbacks.c
@@ -184,7 +184,7 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
184 184
185 185
186/** 186/**
187 * @addtogroup Evas_Object_Group 187 * @addtogroup Evas_Object_Group_Events
188 * @{ 188 * @{
189 */ 189 */
190 190
@@ -221,18 +221,18 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
221 * that triggered the callback. 221 * that triggered the callback.
222 * 222 *
223 * The event type @p type to trigger the function may be one of 223 * The event type @p type to trigger the function may be one of
224 * EVAS_CALLBACK_MOUSE_IN, EVAS_CALLBACK_MOUSE_OUT, 224 * #EVAS_CALLBACK_MOUSE_IN, #EVAS_CALLBACK_MOUSE_OUT,
225 * EVAS_CALLBACK_MOUSE_DOWN, EVAS_CALLBACK_MOUSE_UP, 225 * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP,
226 * EVAS_CALLBACK_MOUSE_MOVE, EVAS_CALLBACK_MOUSE_WHEEL, 226 * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL,
227 * EVAS_CALLBACK_FREE, EVAS_CALLBACK_KEY_DOWN, EVAS_CALLBACK_KEY_UP, 227 * #EVAS_CALLBACK_FREE, #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP,
228 * EVAS_CALLBACK_FOCUS_IN, EVAS_CALLBACK_FOCUS_OUT, 228 * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT,
229 * EVAS_CALLBACK_SHOW, EVAS_CALLBACK_HIDE, EVAS_CALLBACK_MOVE, 229 * #EVAS_CALLBACK_SHOW, #EVAS_CALLBACK_HIDE, #EVAS_CALLBACK_MOVE,
230 * EVAS_CALLBACK_RESIZE or EVAS_CALLBACK_RESTACK. 230 * #EVAS_CALLBACK_RESIZE or #EVAS_CALLBACK_RESTACK.
231 * This determines the kind of event that will trigger the callback to 231 * This determines the kind of event that will trigger the callback to
232 * be called. The @p event_info pointer passed to the callback will 232 * be called. The @p event_info pointer passed to the callback will
233 * be one of the following, depending on the event triggering it: 233 * be one of the following, depending on the event triggering it:
234 * 234 *
235 * EVAS_CALLBACK_MOUSE_IN: event_info = pointer to Evas_Event_Mouse_In 235 * #EVAS_CALLBACK_MOUSE_IN: event_info = pointer to Evas_Event_Mouse_In
236 * 236 *
237 * This event is triggered when the mouse pointer enters the region of 237 * This event is triggered when the mouse pointer enters the region of
238 * the object @p obj. This may occur by the mouse pointer being moved 238 * the object @p obj. This may occur by the mouse pointer being moved
@@ -241,9 +241,9 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
241 * shown, raised, moved, resized, or other objects being moved out of 241 * shown, raised, moved, resized, or other objects being moved out of
242 * the way, hidden, lowered or moved out of the way. 242 * the way, hidden, lowered or moved out of the way.
243 * 243 *
244 * EVAS_CALLBACK_MOUSE_OUT: event_info = pointer to Evas_Event_Mouse_Out 244 * #EVAS_CALLBACK_MOUSE_OUT: event_info = pointer to Evas_Event_Mouse_Out
245 * 245 *
246 * This event is triggered exactly like EVAS_CALLBACK_MOUSE_IN is, but 246 * This event is triggered exactly like #EVAS_CALLBACK_MOUSE_IN is, but
247 * occurs when the mouse pointer exits an object. Note that no out 247 * occurs when the mouse pointer exits an object. Note that no out
248 * events will be reported if the mouse pointer is implicitly grabbed 248 * events will be reported if the mouse pointer is implicitly grabbed
249 * to an object (the mouse buttons are down at all and any were 249 * to an object (the mouse buttons are down at all and any were
@@ -252,7 +252,7 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
252 * depressed). Out events will be reported once all buttons are 252 * depressed). Out events will be reported once all buttons are
253 * released, if the mouse has left the object. 253 * released, if the mouse has left the object.
254 * 254 *
255 * EVAS_CALLBACK_MOUSE_DOWN: event_info = pointer to 255 * #EVAS_CALLBACK_MOUSE_DOWN: event_info = pointer to
256 * Evas_Event_Mouse_Down 256 * Evas_Event_Mouse_Down
257 * 257 *
258 * This event is triggered by a mouse button being depressed while 258 * This event is triggered by a mouse button being depressed while
@@ -265,25 +265,25 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
265 * presses. When all buttons are released, event propagation occurs as 265 * presses. When all buttons are released, event propagation occurs as
266 * normal. 266 * normal.
267 * 267 *
268 * EVAS_CALLBACK_MOUSE_UP: event_info = pointer to Evas_Event_Mouse_Up 268 * #EVAS_CALLBACK_MOUSE_UP: event_info = pointer to Evas_Event_Mouse_Up
269 * 269 *
270 * This event is triggered by a mouse button being released while over 270 * This event is triggered by a mouse button being released while over
271 * an object or when passively grabbed to an object. If this is the 271 * an object or when passively grabbed to an object. If this is the
272 * last mouse button to be raised on an object then the passive grab 272 * last mouse button to be raised on an object then the passive grab
273 * is released and event processing will continue as normal. 273 * is released and event processing will continue as normal.
274 * 274 *
275 * EVAS_CALLBACK_MOUSE_MOVE: event_info = pointer to Evas_Event_Mouse_Move 275 * #EVAS_CALLBACK_MOUSE_MOVE: event_info = pointer to Evas_Event_Mouse_Move
276 * 276 *
277 * This event is triggered by the mouse pointer moving while over an 277 * This event is triggered by the mouse pointer moving while over an
278 * object or passively grabbed to an object. 278 * object or passively grabbed to an object.
279 * 279 *
280 * EVAS_CALLBACK_MOUSE_WHEEL: event_info = pointer to 280 * #EVAS_CALLBACK_MOUSE_WHEEL: event_info = pointer to
281 * Evas_Event_Mouse_Wheel 281 * Evas_Event_Mouse_Wheel
282 * 282 *
283 * This event is triggered by the mouse wheel being rolled while over 283 * This event is triggered by the mouse wheel being rolled while over
284 * an object or passively grabbed to an object. 284 * an object or passively grabbed to an object.
285 * 285 *
286 * EVAS_CALLBACK_FREE: event_info = NULL 286 * #EVAS_CALLBACK_FREE: event_info = NULL
287 * 287 *
288 * This event is triggered just before Evas is about to free all 288 * This event is triggered just before Evas is about to free all
289 * memory used by an object and remove all references to it. This is 289 * memory used by an object and remove all references to it. This is
@@ -292,48 +292,48 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
292 * valid when this callback is called, but after this callback 292 * valid when this callback is called, but after this callback
293 * returns, there is no guarantee on the object's validity. 293 * returns, there is no guarantee on the object's validity.
294 * 294 *
295 * EVAS_CALLBACK_KEY_DOWN: event_info = pointer to Evas_Event_Key_Down 295 * #EVAS_CALLBACK_KEY_DOWN: event_info = pointer to Evas_Event_Key_Down
296 * 296 *
297 * This callback is called when a key is pressed and the focus is on 297 * This callback is called when a key is pressed and the focus is on
298 * the object, or a key has been grabbed to a particular object which 298 * the object, or a key has been grabbed to a particular object which
299 * wants to intercept the key press regardless of what object has the 299 * wants to intercept the key press regardless of what object has the
300 * focus. 300 * focus.
301 * 301 *
302 * EVAS_CALLBACK_KEY_UP: event_info = pointer to Evas_Event_Key_Up 302 * #EVAS_CALLBACK_KEY_UP: event_info = pointer to Evas_Event_Key_Up
303 * 303 *
304 * This callback is called when a key is released and the focus is on 304 * This callback is called when a key is released and the focus is on
305 * the object, or a key has been grabbed to a particular object which 305 * the object, or a key has been grabbed to a particular object which
306 * wants to intercept the key release regardless of what object has 306 * wants to intercept the key release regardless of what object has
307 * the focus. 307 * the focus.
308 * 308 *
309 * EVAS_CALLBACK_FOCUS_IN: event_info = NULL 309 * #EVAS_CALLBACK_FOCUS_IN: event_info = NULL
310 * 310 *
311 * This event is called when an object gains the focus. When the 311 * This event is called when an object gains the focus. When the
312 * callback is called the object has already gained the focus. 312 * callback is called the object has already gained the focus.
313 * 313 *
314 * EVAS_CALLBACK_FOCUS_OUT: event_info = NULL 314 * #EVAS_CALLBACK_FOCUS_OUT: event_info = NULL
315 * 315 *
316 * This event is triggered by an object losing the focus. When the 316 * This event is triggered by an object losing the focus. When the
317 * callback is called the object has already lost the focus. 317 * callback is called the object has already lost the focus.
318 * 318 *
319 * EVAS_CALLBACK_SHOW: event_info = NULL 319 * #EVAS_CALLBACK_SHOW: event_info = NULL
320 * 320 *
321 * This event is triggered by the object being shown by 321 * This event is triggered by the object being shown by
322 * evas_object_show(). 322 * evas_object_show().
323 * 323 *
324 * EVAS_CALLBACK_HIDE: event_info = NULL 324 * #EVAS_CALLBACK_HIDE: event_info = NULL
325 * 325 *
326 * This event is triggered by an object being hidden by 326 * This event is triggered by an object being hidden by
327 * evas_object_hide(). 327 * evas_object_hide().
328 * 328 *
329 * EVAS_CALLBACK_MOVE: event_info = NULL 329 * #EVAS_CALLBACK_MOVE: event_info = NULL
330 * 330 *
331 * This event is triggered by an object being 331 * This event is triggered by an object being
332 * moved. evas_object_move() can trigger this, as can any 332 * moved. evas_object_move() can trigger this, as can any
333 * object-specific manipulations that would mean the object's origin 333 * object-specific manipulations that would mean the object's origin
334 * could move. 334 * could move.
335 * 335 *
336 * EVAS_CALLBACK_RESIZE: event_info = NULL 336 * #EVAS_CALLBACK_RESIZE: event_info = NULL
337 * 337 *
338 * This event is triggered by an object being resized. Resizes can be 338 * This event is triggered by an object being resized. Resizes can be
339 * triggered by evas_object_resize() or by any object-specific calls 339 * triggered by evas_object_resize() or by any object-specific calls
@@ -501,6 +501,73 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, E
501 return NULL; 501 return NULL;
502} 502}
503 503
504/**
505 * @}
506 */
507
508/**
509 * @addtogroup Evas_Canvas_Events
510 * @{
511 */
512
513/**
514 * Add a callback function to the canvas.
515 *
516 * @param e Canvas to attach a callback to
517 * @param type The type of event that will trigger the callback
518 * @param func The function to be called when the event is triggered
519 * @param data The data pointer to be passed to @p func
520 *
521 * This function adds a function callback to the canvas when the event
522 * of type @p type occurs on canvas @p e. The function is @p func.
523 *
524 * In the event of a memory allocation error during addition of the
525 * callback to the canvas, evas_alloc_error() should be used to
526 * determine the nature of the error, if any, and the program should
527 * sensibly try and recover.
528 *
529 * The function will be passed the pointer @p data when it is
530 * called. A callback function must look like this:
531 *
532 * @code
533 * void callback (void *data, Evas *e, void *event_info);
534 * @endcode
535 *
536 * The first parameter @p data in this function will be the same value
537 * passed to evas_event_callback_add() as the @p data parameter. The
538 * second parameter @p e is the canvas handle on which the event
539 * occured. The third parameter @p event_info is a pointer to a data
540 * structure that may or may not be passed to the callback, depending
541 * on the event type that triggered the callback.
542 *
543 * The event type @p type to trigger the function may be one of
544 * #EVAS_CALLBACK_RENDER_FLUSH_PRE, #EVAS_CALLBACK_RENDER_FLUSH_POST,
545 * #EVAS_CALLBACK_CANVAS_FOCUS_IN, #EVAS_CALLBACK_CANVAS_FOCUS_OUT.
546 * This determines the kind of event that will trigger the callback to
547 * be called. So far none of the event types provide useful data, so
548 * in all of them @p event_info pointer is @c NULL.
549 *
550 * Example:
551 * @code
552 * extern Evas *e;
553 * extern void *my_data;
554 * void focus_in_callback(void *data, Evas *e, void *event_info);
555 * void focus_out_callback(void *data, Evas *e, void *event_info);
556 *
557 * evas_event_callback_add(e, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback, my_data);
558 * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
559 * {
560 * fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
561 * exit(-1);
562 * }
563 * evas_event_callback_add(e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, focus_out_callback, my_data);
564 * if (evas_alloc_error() != EVAS_ALLOC_ERROR_NONE)
565 * {
566 * fprintf(stderr, "ERROR: Callback registering failed! Abort!\n");
567 * exit(-1);
568 * }
569 * @endcode
570 */
504EAPI void 571EAPI void
505evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) 572evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
506{ 573{
@@ -530,6 +597,30 @@ evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, co
530 eina_inlist_prepend(e->callbacks->callbacks, EINA_INLIST_GET(fn)); 597 eina_inlist_prepend(e->callbacks->callbacks, EINA_INLIST_GET(fn));
531} 598}
532 599
600/**
601 * Delete a callback function from the canvas.
602 *
603 * @param e Canvas to remove a callback from
604 * @param type The type of event that was triggering the callback
605 * @param func The function that was to be called when the event was triggered
606 * @return The data pointer that was to be passed to the callback
607 *
608 * This function removes the most recently added callback from the
609 * canvas @p e which was triggered by the event type @p type and was
610 * calling the function @p func when triggered. If the removal is
611 * successful it will also return the data pointer that was passed to
612 * evas_event_callback_add() when the callback was added to the
613 * canvas. If not successful NULL will be returned.
614 *
615 * Example:
616 * @code
617 * extern Evas *e;
618 * void *my_data;
619 * void focus_in_callback(void *data, Evas *e, void *event_info);
620 *
621 * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback);
622 * @endcode
623 */
533EAPI void * 624EAPI void *
534evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) 625evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
535{ 626{
@@ -559,6 +650,32 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
559 return NULL; 650 return NULL;
560} 651}
561 652
653/**
654 * Delete a callback function from the canvas.
655 *
656 * @param e Canvas to remove a callback from
657 * @param type The type of event that was triggering the callback
658 * @param func The function that was to be called when the event was triggered
659 * @param data The data pointer that was to be passed to the callback
660 * @return The data pointer that was to be passed to the callback
661 *
662 * This function removes the most recently added callback from the
663 * canvas @p e which was triggered by the event type @p type and was
664 * calling the function @p func with data @p data when triggered. If
665 * the removal is successful it will also return the data pointer that
666 * was passed to evas_event_callback_add() (that will be the same as
667 * the parameter) when the callback was added to the canvas. If not
668 * successful NULL will be returned.
669 *
670 * Example:
671 * @code
672 * extern Evas *e;
673 * void *my_data;
674 * void focus_in_callback(void *data, Evas *e, void *event_info);
675 *
676 * my_data = evas_event_callback_del_full(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback, my_data);
677 * @endcode
678 */
562EAPI void * 679EAPI void *
563evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) 680evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
564{ 681{
diff --git a/legacy/evas/src/lib/canvas/evas_clip.c b/legacy/evas/src/lib/canvas/evas_clip.c
index fa2951a..1f9ce4d 100644
--- a/legacy/evas/src/lib/canvas/evas_clip.c
+++ b/legacy/evas/src/lib/canvas/evas_clip.c
@@ -41,7 +41,7 @@ evas_object_clippers_was_visible(Evas_Object *obj)
41/* public functions */ 41/* public functions */
42 42
43/** 43/**
44 * @addtogroup Evas_Object_Group 44 * @addtogroup Evas_Object_Group_Basic
45 * @{ 45 * @{
46 */ 46 */
47 47
diff --git a/legacy/evas/src/lib/canvas/evas_data.c b/legacy/evas/src/lib/canvas/evas_data.c
index e8b6d20..a3ddc7f 100644
--- a/legacy/evas/src/lib/canvas/evas_data.c
+++ b/legacy/evas/src/lib/canvas/evas_data.c
@@ -2,7 +2,7 @@
2#include "evas_private.h" 2#include "evas_private.h"
3 3
4/** 4/**
5 * @addtogroup Evas_Object_Group 5 * @addtogroup Evas_Object_Group_Extras
6 * @{ 6 * @{
7 */ 7 */
8 8
diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c
index 5b03acd..21648e1 100644
--- a/legacy/evas/src/lib/canvas/evas_events.c
+++ b/legacy/evas/src/lib/canvas/evas_events.c
@@ -158,10 +158,8 @@ evas_event_list_copy(Eina_List *list)
158/* public functions */ 158/* public functions */
159 159
160/** 160/**
161 * @defgroup Evas_Event_Freezing_Group Evas Event Freezing Functions 161 * @addtogroup Evas_Event_Freezing_Group
162 * 162 * @{
163 * Functions that deal with the freezing of event processing of an
164 * evas.
165 */ 163 */
166 164
167/** 165/**
@@ -183,7 +181,6 @@ evas_event_list_copy(Eina_List *list)
183 * evas_object_resize(object, 200, 200); 181 * evas_object_resize(object, 200, 200);
184 * evas_event_thaw(evas); 182 * evas_event_thaw(evas);
185 * @endcode 183 * @endcode
186 * @ingroup Evas_Event_Freezing_Group
187 */ 184 */
188EAPI void 185EAPI void
189evas_event_freeze(Evas *e) 186evas_event_freeze(Evas *e)
@@ -205,7 +202,6 @@ evas_event_freeze(Evas *e)
205 * invole any "missed" events to be evaluated. 202 * invole any "missed" events to be evaluated.
206 * 203 *
207 * See evas_event_freeze() for an example. 204 * See evas_event_freeze() for an example.
208 * @ingroup Evas_Event_Freezing_Group
209 */ 205 */
210EAPI void 206EAPI void
211evas_event_thaw(Evas *e) 207evas_event_thaw(Evas *e)
@@ -234,6 +230,15 @@ evas_event_thaw(Evas *e)
234} 230}
235 231
236/** 232/**
233 * @}
234 */
235
236/**
237 * @addtogroup Evas_Event_Feeding_Group
238 * @{
239 */
240
241/**
237 * Return the freeze count of a given canvas. 242 * Return the freeze count of a given canvas.
238 * @param e The canvas to fetch the freeze count from. 243 * @param e The canvas to fetch the freeze count from.
239 * 244 *
@@ -250,7 +255,7 @@ evas_event_thaw(Evas *e)
250 * 255 *
251 * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas); 256 * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas);
252 * @endcode 257 * @endcode
253 * @ingroup Evas_Event_Freezing_Group 258 *
254 */ 259 */
255EAPI int 260EAPI int
256evas_event_freeze_get(const Evas *e) 261evas_event_freeze_get(const Evas *e)
@@ -1466,9 +1471,12 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data
1466 _evas_unwalk(e); 1471 _evas_unwalk(e);
1467} 1472}
1468 1473
1474/**
1475 * @}
1476 */
1469 1477
1470/** 1478/**
1471 * @addtogroup Evas_Object_Group 1479 * @addtogroup Evas_Object_Group_Events
1472 * @{ 1480 * @{
1473 */ 1481 */
1474 1482
@@ -1482,8 +1490,6 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data
1482 * pass events) instead. 1490 * pass events) instead.
1483 * 1491 *
1484 * If @p pass is false, events will be processed as normal. 1492 * If @p pass is false, events will be processed as normal.
1485 *
1486 * @ingroup Evas_Object_Event_Flags_Group
1487 */ 1493 */
1488EAPI void 1494EAPI void
1489evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass) 1495evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass)
@@ -1511,8 +1517,6 @@ evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass)
1511 * Determine whether an object is set to pass events. 1517 * Determine whether an object is set to pass events.
1512 * @param obj 1518 * @param obj
1513 * @return pass events state 1519 * @return pass events state
1514 *
1515 * @ingroup Evas_Object_Event_Flags_Group
1516 */ 1520 */
1517EAPI Eina_Bool 1521EAPI Eina_Bool
1518evas_object_pass_events_get(const Evas_Object *obj) 1522evas_object_pass_events_get(const Evas_Object *obj)
@@ -1534,8 +1538,6 @@ evas_object_pass_events_get(const Evas_Object *obj)
1534 * 1538 *
1535 * If @p repeat is false, events occuring on @p obj will be processed 1539 * If @p repeat is false, events occuring on @p obj will be processed
1536 * normally. 1540 * normally.
1537 *
1538 * @ingroup Evas_Object_Event_Flags_Group
1539 */ 1541 */
1540EAPI void 1542EAPI void
1541evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) 1543evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
@@ -1562,8 +1564,6 @@ evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
1562 * Determine whether an object is set to repeat events. 1564 * Determine whether an object is set to repeat events.
1563 * @param obj 1565 * @param obj
1564 * @return repeat events state 1566 * @return repeat events state
1565 *
1566 * @ingroup Evas_Object_Event_Flags_Group
1567 */ 1567 */
1568EAPI Eina_Bool 1568EAPI Eina_Bool
1569evas_object_repeat_events_get(const Evas_Object *obj) 1569evas_object_repeat_events_get(const Evas_Object *obj)
@@ -1591,7 +1591,6 @@ evas_object_repeat_events_get(const Evas_Object *obj)
1591 * object, @p obj, will not be passed on to the parent smart object. 1591 * object, @p obj, will not be passed on to the parent smart object.
1592 * 1592 *
1593 * The default value is true. 1593 * The default value is true.
1594 * @ingroup Evas_Object_Event_Flags_Group
1595 */ 1594 */
1596EAPI void 1595EAPI void
1597evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop) 1596evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop)
@@ -1606,8 +1605,6 @@ evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop)
1606 * Determine whether an object is set to propagate events. 1605 * Determine whether an object is set to propagate events.
1607 * @param obj 1606 * @param obj
1608 * @return propogate events state 1607 * @return propogate events state
1609 *
1610 * @ingroup Evas_Object_Event_Flags_Group
1611 */ 1608 */
1612EAPI Eina_Bool 1609EAPI Eina_Bool
1613evas_object_propagate_events_get(const Evas_Object *obj) 1610evas_object_propagate_events_get(const Evas_Object *obj)
@@ -1640,6 +1637,8 @@ evas_object_propagate_events_get(const Evas_Object *obj)
1640 * be emitted just when inside this object area. 1637 * be emitted just when inside this object area.
1641 * 1638 *
1642 * The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB. 1639 * The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB.
1640 *
1641 * @ingroup Evas_Object_Group_Extras
1643 */ 1642 */
1644EAPI void 1643EAPI void
1645evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting) 1644evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting)
@@ -1654,6 +1653,7 @@ evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting)
1654 * Determine how pointer will behave. 1653 * Determine how pointer will behave.
1655 * @param obj 1654 * @param obj
1656 * @return pointer behavior. 1655 * @return pointer behavior.
1656 * @ingroup Evas_Object_Group_Extras
1657 */ 1657 */
1658EAPI Evas_Object_Pointer_Mode 1658EAPI Evas_Object_Pointer_Mode
1659evas_object_pointer_mode_get(const Evas_Object *obj) 1659evas_object_pointer_mode_get(const Evas_Object *obj)
diff --git a/legacy/evas/src/lib/canvas/evas_focus.c b/legacy/evas/src/lib/canvas/evas_focus.c
index 9ce9cd8..6e2ec5b 100644
--- a/legacy/evas/src/lib/canvas/evas_focus.c
+++ b/legacy/evas/src/lib/canvas/evas_focus.c
@@ -8,6 +8,10 @@
8/* public calls */ 8/* public calls */
9 9
10/** 10/**
11 * @addtogroup Evas_Object_Group_Basic
12 * @{
13 */
14/**
11 * Sets focus to the given object. 15 * Sets focus to the given object.
12 * 16 *
13 * @param obj The object to be focused or unfocused. 17 * @param obj The object to be focused or unfocused.
@@ -76,6 +80,10 @@ evas_object_focus_get(const Evas_Object *obj)
76} 80}
77 81
78/** 82/**
83 * @}
84 */
85
86/**
79 * Retrieve the object that currently has focus. 87 * Retrieve the object that currently has focus.
80 * 88 *
81 * @param e The @c Evas canvas to query focus on. 89 * @param e The @c Evas canvas to query focus on.
@@ -88,6 +96,8 @@ evas_object_focus_get(const Evas_Object *obj)
88 * @see evas_object_key_ungrab 96 * @see evas_object_key_ungrab
89 * 97 *
90 * @return The object that has focus or NULL is there is not one. 98 * @return The object that has focus or NULL is there is not one.
99 *
100 * @ingroup Evas_Object_Group_Find
91 */ 101 */
92EAPI Evas_Object * 102EAPI Evas_Object *
93evas_focus_get(const Evas *e) 103evas_focus_get(const Evas *e)
diff --git a/legacy/evas/src/lib/canvas/evas_layer.c b/legacy/evas/src/lib/canvas/evas_layer.c
index 9f0041d..a3e5f5b 100644
--- a/legacy/evas/src/lib/canvas/evas_layer.c
+++ b/legacy/evas/src/lib/canvas/evas_layer.c
@@ -136,7 +136,7 @@ evas_layer_del(Evas_Layer *lay)
136/* public functions */ 136/* public functions */
137 137
138/** 138/**
139 * @addtogroup Evas_Object_Group 139 * @addtogroup Evas_Object_Group_Basic
140 * @{ 140 * @{
141 */ 141 */
142 142
@@ -147,6 +147,7 @@ evas_layer_del(Evas_Layer *lay)
147 * 147 *
148 * @param obj The given evas object. 148 * @param obj The given evas object.
149 * @param l The number of the layer to place the object on. 149 * @param l The number of the layer to place the object on.
150 * Between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX.
150 */ 151 */
151EAPI void 152EAPI void
152evas_object_layer_set(Evas_Object *obj, short l) 153evas_object_layer_set(Evas_Object *obj, short l)
diff --git a/legacy/evas/src/lib/canvas/evas_main.c b/legacy/evas/src/lib/canvas/evas_main.c
index 666afab..00b692b 100644
--- a/legacy/evas/src/lib/canvas/evas_main.c
+++ b/legacy/evas/src/lib/canvas/evas_main.c
@@ -14,6 +14,7 @@ int _evas_log_dom_global = -1;
14 * 14 *
15 * @see evas_shutdown(). 15 * @see evas_shutdown().
16 * 16 *
17 * @ingroup Evas_Group
17 */ 18 */
18EAPI int 19EAPI int
19evas_init(void) 20evas_init(void)
@@ -75,8 +76,8 @@ evas_init(void)
75 * 76 *
76 * @see evas_init(). 77 * @see evas_init().
77 * 78 *
79 * @ingroup Evas_Group
78 */ 80 */
79
80EAPI int 81EAPI int
81evas_shutdown(void) 82evas_shutdown(void)
82{ 83{
@@ -104,14 +105,6 @@ evas_shutdown(void)
104 return _evas_init_count; 105 return _evas_init_count;
105} 106}
106 107
107/**
108 * @defgroup Evas_Canvas Evas Canvas functions
109 *
110 * Functions that deal with the basic evas object. They are the
111 * functions you need to use at a minimum to get a working evas, and
112 * to destroy it.
113 *
114 */
115 108
116/** 109/**
117 * Creates a new empty evas. 110 * Creates a new empty evas.
@@ -123,7 +116,15 @@ evas_shutdown(void)
123 * @li Ensure that the render engine is given the correct settings 116 * @li Ensure that the render engine is given the correct settings
124 * with @ref evas_engine_info_set . 117 * with @ref evas_engine_info_set .
125 * 118 *
126 * This function should only fail if the memory allocation fails. 119 * This function should only fail if the memory allocation fails
120 *
121 * @note this function is very low level. Instead of using it
122 * directly, consider using the high level functions in
123 * Ecore_Evas such as @c ecore_evas_new(). See
124 * http://docs.enlightenment.org/auto/ecore/.
125 *
126 * @attention it is recommended that one calls evas_init() before
127 * creating new canvas.
127 * 128 *
128 * @return A new uninitialised Evas canvas on success. Otherwise, @c 129 * @return A new uninitialised Evas canvas on success. Otherwise, @c
129 * NULL. 130 * NULL.
@@ -164,6 +165,7 @@ evas_new(void)
164 * in this function. 165 * in this function.
165 * 166 *
166 * @param e The given evas. 167 * @param e The given evas.
168 *
167 * @ingroup Evas_Canvas 169 * @ingroup Evas_Canvas
168 */ 170 */
169EAPI void 171EAPI void
@@ -269,40 +271,15 @@ evas_free(Evas *e)
269} 271}
270 272
271/** 273/**
272 * @defgroup Evas_Output_Method Evas Render Engine Functions
273 *
274 * Functions that are used to set the render engine for a given
275 * function, and then get that engine working.
276 *
277 * The following code snippet shows how they can be used to
278 * initialise an evas that uses the X11 software engine:
279 * @code
280 * Evas *evas;
281 * Evas_Engine_Info_Software_X11 *einfo;
282 * extern Display *display;
283 * extern Window win;
284 *
285 * evas = evas_new();
286 * evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
287 * evas_output_size_set(evas, 640, 480);
288 * evas_output_viewport_set(evas, 0, 0, 640, 480);
289 * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas);
290 * einfo->info.display = display;
291 * einfo->info.visual = DefaultVisual(display, DefaultScreen(display));
292 * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display));
293 * einfo->info.drawable = win;
294 * einfo->info.depth = DefaultDepth(display, DefaultScreen(display));
295 * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo);
296 * @endcode
297 */
298
299/**
300 * Sets the output engine for the given evas. 274 * Sets the output engine for the given evas.
301 * 275 *
302 * Once the output engine for an evas is set, any attempt to change it 276 * Once the output engine for an evas is set, any attempt to change it
303 * will be ignored. The value for @p render_method can be found using 277 * will be ignored. The value for @p render_method can be found using
304 * @ref evas_render_method_lookup . 278 * @ref evas_render_method_lookup .
305 * 279 *
280 * @attention it is mandatory that one calls evas_init() before
281 * setting the output method.
282 *
306 * @param e The given evas. 283 * @param e The given evas.
307 * @param render_method The numeric engine value to use. 284 * @param render_method The numeric engine value to use.
308 * @ingroup Evas_Output_Method 285 * @ingroup Evas_Output_Method
@@ -400,8 +377,6 @@ evas_engine_info_get(const Evas *e)
400 * 377 *
401 * Once called, the @p info pointer should be considered invalid. 378 * Once called, the @p info pointer should be considered invalid.
402 * 379 *
403 * Example:
404 *
405 * @param e The pointer to the Evas Canvas 380 * @param e The pointer to the Evas Canvas
406 * @param info The pointer to the Engine Info to use 381 * @param info The pointer to the Engine Info to use
407 * @return 1 if no error occured, 0 otherwise 382 * @return 1 if no error occured, 0 otherwise
@@ -420,14 +395,6 @@ evas_engine_info_set(Evas *e, Evas_Engine_Info *info)
420} 395}
421 396
422/** 397/**
423 * @defgroup Evas_Output_Size Evas Output and Viewport Resizing
424 * Functions
425 *
426 * Functions that set and retrieve the output and viewport size of an
427 * evas.
428 */
429
430/**
431 * Sets the output size of the render engine of the given evas. 398 * Sets the output size of the render engine of the given evas.
432 * 399 *
433 * The evas will render to a rectangle of the given size once this 400 * The evas will render to a rectangle of the given size once this
@@ -573,14 +540,6 @@ evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord
573} 540}
574 541
575/** 542/**
576 * @defgroup Evas_Coord_Mapping_Group Evas Coordinate Mapping
577 * Functions
578 *
579 * Functions that are used to map coordinates from the canvas to the
580 * screen or the screen to the canvas.
581 */
582
583/**
584 * Convert/scale an ouput screen co-ordinate into canvas co-ordinates 543 * Convert/scale an ouput screen co-ordinate into canvas co-ordinates
585 * 544 *
586 * @param e The pointer to the Evas Canvas 545 * @param e The pointer to the Evas Canvas
@@ -727,11 +686,16 @@ evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y)
727 * written accessing render method ID's directly, without first 686 * written accessing render method ID's directly, without first
728 * obtaining it from this function. 687 * obtaining it from this function.
729 * 688 *
689 * @attention it is mandatory that one calls evas_init() before
690 * looking up the render method.
691 *
730 * Example: 692 * Example:
731 * @code 693 * @code
732 * int engine_id; 694 * int engine_id;
733 * Evas *evas; 695 * Evas *evas;
734 * 696 *
697 * evas_init();
698 *
735 * evas = evas_new(); 699 * evas = evas_new();
736 * if (!evas) 700 * if (!evas)
737 * { 701 * {
@@ -890,12 +854,6 @@ evas_render_method_list_free(Eina_List *list)
890} 854}
891 855
892/** 856/**
893 * @defgroup Evas_Pointer_Group Evas Pointer Functions
894 *
895 * Functions that deal with the status of the pointer.
896 */
897
898/**
899 * This function returns the current known pointer co-ordinates 857 * This function returns the current known pointer co-ordinates
900 * 858 *
901 * @param e The pointer to the Evas Canvas 859 * @param e The pointer to the Evas Canvas
@@ -1051,6 +1009,7 @@ evas_pointer_inside_get(const Evas *e)
1051 * 1009 *
1052 * @param e The canvas to attach the pointer to 1010 * @param e The canvas to attach the pointer to
1053 * @param data The pointer to attach 1011 * @param data The pointer to attach
1012 * @ingroup Evas_Canvas
1054 */ 1013 */
1055EAPI void 1014EAPI void
1056evas_data_attach_set(Evas *e, void *data) 1015evas_data_attach_set(Evas *e, void *data)
@@ -1066,6 +1025,7 @@ evas_data_attach_set(Evas *e, void *data)
1066 * 1025 *
1067 * @param e The canvas to attach the pointer to 1026 * @param e The canvas to attach the pointer to
1068 * @return The pointer attached 1027 * @return The pointer attached
1028 * @ingroup Evas_Canvas
1069 */ 1029 */
1070EAPI void * 1030EAPI void *
1071evas_data_attach_get(const Evas *e) 1031evas_data_attach_get(const Evas *e)
@@ -1076,6 +1036,12 @@ evas_data_attach_get(const Evas *e)
1076 return e->attach_data; 1036 return e->attach_data;
1077} 1037}
1078 1038
1039/**
1040 * Inform to the evas that it got the focus.
1041 *