diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/edje/src/lib/Edje.h | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to '')
-rw-r--r-- | libraries/edje/src/lib/Edje.h | 4105 |
1 files changed, 0 insertions, 4105 deletions
diff --git a/libraries/edje/src/lib/Edje.h b/libraries/edje/src/lib/Edje.h deleted file mode 100644 index 1449d70..0000000 --- a/libraries/edje/src/lib/Edje.h +++ /dev/null | |||
@@ -1,4105 +0,0 @@ | |||
1 | /** | ||
2 | @brief Edje Graphical Design Library | ||
3 | |||
4 | These routines are used for Edje. | ||
5 | |||
6 | @mainpage Edje Library Documentation | ||
7 | @version 1.1 | ||
8 | @date 2003-2012 | ||
9 | |||
10 | Please see the @ref authors page for contact details. | ||
11 | |||
12 | |||
13 | |||
14 | |||
15 | |||
16 | |||
17 | |||
18 | @section intro What is Edje? | ||
19 | |||
20 | Edje is a complex graphical design & layout library. | ||
21 | |||
22 | It doesn't intend to do containing and regular layout like a widget | ||
23 | set, but it is the base for such components. Based on the requirements | ||
24 | of Enlightenment 0.17, Edje should serve all the purposes of creating | ||
25 | visual elements (borders of windows, buttons, scrollbars, etc.) and | ||
26 | allow the designer the ability to animate, layout and control the look | ||
27 | and feel of any program using Edje as its basic GUI constructor. This | ||
28 | library allows for multiple collections of Layouts in one file, | ||
29 | sharing the same image and font database and thus allowing a whole | ||
30 | theme to be conveniently packaged into 1 file and shipped around. | ||
31 | |||
32 | Edje separates the layout and behavior logic. Edje files ship with an | ||
33 | image and font database, used by all the parts in all the collections | ||
34 | to source graphical data. It has a directory of logical part names | ||
35 | pointing to the part collection entry ID in the file (thus allowing | ||
36 | for multiple logical names to point to the same part collection, | ||
37 | allowing for the sharing of data between display elements). Each part | ||
38 | collection consists of a list of visual parts, as well as a list of | ||
39 | programs. A program is a conditionally run program that if a | ||
40 | particular event occurs (a button is pressed, a mouse enters or leaves | ||
41 | a part) will trigger an action that may affect other parts. In this | ||
42 | way a part collection can be "programmed" via its file as to hilight | ||
43 | buttons when the mouse passes over them or show hidden parts when a | ||
44 | button is clicked somewhere etc. The actions performed in changing | ||
45 | from one state to another are also allowed to transition over a period | ||
46 | of time, allowing animation. Programs and animations can be run in | ||
47 | "parallel". | ||
48 | |||
49 | This separation and simplistic event driven style of programming can produce | ||
50 | almost any look and feel one could want for basic visual elements. Anything | ||
51 | more complex is likely the domain of an application or widget set that may | ||
52 | use Edje as a convenient way of being able to configure parts of the display. | ||
53 | |||
54 | For details of Edje's history, see the \ref history section. | ||
55 | |||
56 | |||
57 | @section requirements What does Edje require? | ||
58 | |||
59 | Edje requires fairly little on your system. to use the Edje runtime library | ||
60 | you need: | ||
61 | |||
62 | - Evas (library) | ||
63 | - Ecore (library) | ||
64 | - Eet (library) | ||
65 | - Embryo (library) | ||
66 | - Eina (library) | ||
67 | - Lua 5.1 (library) | ||
68 | |||
69 | Evas needs to be build with the JPEG, PNG and EET image loaders enabled at a | ||
70 | minimum. You will also need the buffer engine (which requires the | ||
71 | software_generic engine) as well. | ||
72 | |||
73 | Ecore needs the ECORE, ECORE_EVAS and ECORE_X modules built at a minimum. | ||
74 | It's suggested to build all the Ecore modules. You will beed the Buffer | ||
75 | engine support built into Ecore_Evas for edje?_cc to function. | ||
76 | |||
77 | |||
78 | @section compiling How to compile and test Edje | ||
79 | |||
80 | Now you need to compile and install Edje. | ||
81 | |||
82 | @verbatim | ||
83 | ./configure | ||
84 | make | ||
85 | sudo make install | ||
86 | @endverbatim | ||
87 | |||
88 | You now have it installed and ready to go, but you need input | ||
89 | data. There are lots of examples in SVN, the best one is | ||
90 | Enlightenment's own theme file. | ||
91 | |||
92 | You may use different tools to edit and view the generated ".edj" | ||
93 | files, for instance: | ||
94 | |||
95 | - edje_player (provided by Edje) | ||
96 | - editje (http://trac.enlightenment.org/e/wiki/Editje) | ||
97 | - edje_viewer (http://trac.enlightenment.org/e/wiki/Edje_Viewer) | ||
98 | |||
99 | |||
100 | @section details So how does this all work? | ||
101 | |||
102 | Edje internally holds a geometry state machine and state graph of what is | ||
103 | visible, not, where, at what size, with what colors etc. This is described | ||
104 | to Edje from an Edje .edj file containing this information. These files can | ||
105 | be produced by using edje_cc to take a text file (a .edc file) and "compile" | ||
106 | an output .edj file that contains this information, images and any other | ||
107 | data needed. | ||
108 | |||
109 | The application using Edje will then create an object in its Evas | ||
110 | canvas and set the bundle file to use, specifying the @b group name to | ||
111 | use. Edje will load such information and create all the required | ||
112 | children objects with the specified properties as defined in each @b | ||
113 | part of the given group. See the following example: | ||
114 | @include edje_example.c | ||
115 | |||
116 | The above example requires the following annotated source Edje file: | ||
117 | @include edje_example.edc | ||
118 | |||
119 | |||
120 | One should save these files as edje_example.c and edje_example.edc then: | ||
121 | @verbatim | ||
122 | gcc -o edje_example edje_example.c `pkg-config --cflags --libs eina evas ecore ecore-evas edje` | ||
123 | edje_cc edje_example.edc | ||
124 | |||
125 | ./edje_example "some text" | ||
126 | @endverbatim | ||
127 | |||
128 | Although simple, this example illustrates that animations and state | ||
129 | changes can be done from the Edje file itself without any requirement | ||
130 | in the C application. | ||
131 | |||
132 | Before digging into changing or creating your own Edje source (edc) | ||
133 | files, read the @ref edcref. | ||
134 | |||
135 | |||
136 | |||
137 | @section history Edje History | ||
138 | |||
139 | It's a sequel to "Ebits" which has serviced the needs of Enlightenment | ||
140 | development for early version 0.17. The original design parameters under | ||
141 | which Ebits came about were a lot more restricted than the resulting | ||
142 | use of them, thus Edje was born. | ||
143 | |||
144 | Edje is a more complex layout engine compared to Ebits. It doesn't | ||
145 | pretend to do containing and regular layout like a widget set. It | ||
146 | still inherits the more simplistic layout ideas behind Ebits, but it | ||
147 | now does them a lot more cleanly, allowing for easy expansion, and the | ||
148 | ability to cover much more ground than Ebits ever could. For the | ||
149 | purposes of Enlightenment 0.17, Edje was conceived to serve all the | ||
150 | purposes of creating visual elements (borders of windows, buttons, | ||
151 | scrollbars, etc.) and allow the designer the ability to animate, | ||
152 | layout and control the look and feel of any program using Edje as its | ||
153 | basic GUI constructor. | ||
154 | |||
155 | Unlike Ebits, Edje separates the layout and behavior logic. | ||
156 | |||
157 | |||
158 | |||
159 | @section Edje_Examples Examples on Edje's usage | ||
160 | |||
161 | What follows is a list with various commented examples, covering a great | ||
162 | part of Edje's API: | ||
163 | |||
164 | - @ref Example_Edje_Basics | ||
165 | - @ref tutorial_edje_swallow | ||
166 | - @ref tutorial_edje_table | ||
167 | - @ref tutorial_edje_box | ||
168 | - @ref tutorial_edje_box2 | ||
169 | - @ref tutorial_edje_color_class | ||
170 | - @ref tutorial_edje_animations | ||
171 | - @ref Example_Edje_Signals_Messages | ||
172 | |||
173 | |||
174 | */ | ||
175 | |||
176 | /** | ||
177 | @page authors Authors | ||
178 | @author Carsten Haitzler <raster@@rasterman.com> | ||
179 | @author Tilman Sauerbeck (tilman at code-monkey de) | ||
180 | @author ZigsMcKenzie <zigsmckenzie@@gmail.com> | ||
181 | @author Cedric BAIL <cedric.bail@@free.fr> | ||
182 | @author Brian Mattern <rephorm@@rephorm.com> | ||
183 | @author Mathieu Taillefumier <mathieu.taillefumier@@free.fr> | ||
184 | @author Tristan <blunderer@@gmail.com> | ||
185 | @author Gustavo Lima Chaves <glima@@profusion.mobi> | ||
186 | @author Bruno Dilly <bdilly@@profusion.mobi> | ||
187 | @author Fabiano Fidêncio <fidencio@@profusion.mobi> | ||
188 | @author Jihoon Kim <jihoon48.kim@@samsung.com> | ||
189 | @author Tiago Falcão <tiago@@profusion.mobi> | ||
190 | @author Davide Andreoli <dave@@gurumeditation.it> | ||
191 | @author Sebastian Dransfeld <sd@@tango.flipp.net> | ||
192 | @author Tom Hacohen <tom@@stosb.com> | ||
193 | @author Aharon Hillel <a.hillel@@partner.samsung.com> | ||
194 | @author Shilpa Singh <shilpa.singh@samsung.com> <shilpasingh.o@gmail.com> | ||
195 | @author Mike Blumenkrantz <michael.blumenkrantz@gmail.com | ||
196 | @author Jaehwan Kim <jae.hwan.kim@samsung.com> | ||
197 | @author billiob (Boris Faure) <billiob@gmail.com> | ||
198 | @author Govindaraju SM <govi.sm@samsung.com> <govism@gmail.com> | ||
199 | @author Prince Kumar Dubey <prince.dubey@samsung.com> <prince.dubey@gmail.com> | ||
200 | @author David Seikel <onefang at gmail.com> | ||
201 | |||
202 | Please contact <enlightenment-devel@lists.sourceforge.net> to get in | ||
203 | contact with the developers and maintainers. | ||
204 | */ | ||
205 | |||
206 | |||
207 | /** | ||
208 | |||
209 | @example embryo_custom_state.edc | ||
210 | This example show how to create a custom state from embryo. Clicking on the | ||
211 | 3 labels will rotate the object in the given direction. | ||
212 | |||
213 | @example embryo_pong.edc | ||
214 | Super-simple Pong implementation in pure embryo. | ||
215 | |||
216 | @example embryo_run_program.edc | ||
217 | This example show how to run an edje program from embryo code. | ||
218 | |||
219 | @example embryo_set_state.edc | ||
220 | This example show how to change the state of a part from embryo code. | ||
221 | |||
222 | @example embryo_set_text.edc | ||
223 | This example show how to set the text in TEXT part from embryo code. | ||
224 | |||
225 | @example embryo_timer.edc | ||
226 | This example show the usage of timers in embryo. | ||
227 | |||
228 | @example external_elm_anchorblock.edc | ||
229 | This example use an elementary anchorblock and a button to animate the text. | ||
230 | |||
231 | @example external_elm_button.edc | ||
232 | This example create some elementary buttons and do some actions on user click. | ||
233 | |||
234 | @example external_elm_check.edc | ||
235 | This example show EXTERNAL checkbox in action. | ||
236 | |||
237 | @example external_elm_panes.edc | ||
238 | This example show EXTERNAL elementary panes in action. | ||
239 | |||
240 | @example external_emotion_elm.edc | ||
241 | Super-concise video player example using Edje/Emotion/Elementary. | ||
242 | |||
243 | @example lua_script.edc | ||
244 | This example show the usage of lua scripting to create and animate some | ||
245 | objects in the canvas. | ||
246 | |||
247 | @example toggle_using_filter.edc | ||
248 | This example show how to toggle the state of a part using the 'filter' | ||
249 | param in edje programs | ||
250 | |||
251 | */ | ||
252 | |||
253 | #ifndef _EDJE_H | ||
254 | #define _EDJE_H | ||
255 | |||
256 | #ifndef _MSC_VER | ||
257 | # include <stdint.h> | ||
258 | #endif | ||
259 | #include <math.h> | ||
260 | #include <float.h> | ||
261 | #include <limits.h> | ||
262 | |||
263 | #include <Evas.h> | ||
264 | |||
265 | #ifdef EAPI | ||
266 | # undef EAPI | ||
267 | #endif | ||
268 | |||
269 | #ifdef HAVE_ECORE_IMF | ||
270 | #include <Ecore_IMF.h> | ||
271 | #endif | ||
272 | |||
273 | #ifdef _WIN32 | ||
274 | # ifdef EFL_EDJE_BUILD | ||
275 | # ifdef DLL_EXPORT | ||
276 | # define EAPI __declspec(dllexport) | ||
277 | # else | ||
278 | # define EAPI | ||
279 | # endif /* ! DLL_EXPORT */ | ||
280 | # else | ||
281 | # define EAPI __declspec(dllimport) | ||
282 | # endif /* ! EFL_EDJE_BUILD */ | ||
283 | #else | ||
284 | # ifdef __GNUC__ | ||
285 | # if __GNUC__ >= 4 | ||
286 | # define EAPI __attribute__ ((visibility("default"))) | ||
287 | # else | ||
288 | # define EAPI | ||
289 | # endif | ||
290 | # else | ||
291 | # define EAPI | ||
292 | # endif | ||
293 | #endif | ||
294 | |||
295 | #ifdef __cplusplus | ||
296 | extern "C" { | ||
297 | #endif | ||
298 | |||
299 | #define EDJE_VERSION_MAJOR 1 | ||
300 | #define EDJE_VERSION_MINOR 2 | ||
301 | |||
302 | typedef struct _Edje_Version | ||
303 | { | ||
304 | int major; | ||
305 | int minor; | ||
306 | int micro; | ||
307 | int revision; | ||
308 | } Edje_Version; | ||
309 | |||
310 | EAPI extern Edje_Version *edje_version; | ||
311 | |||
312 | /** | ||
313 | * @file Edje.h | ||
314 | * @brief Edje Graphical Design Library | ||
315 | * | ||
316 | * These routines are used for Edje. | ||
317 | */ | ||
318 | |||
319 | /** | ||
320 | * Identifiers of Edje message types, which can be sent back and forth | ||
321 | * code and a given Edje object's theme file/group. | ||
322 | * | ||
323 | * @see edje_object_message_send() | ||
324 | * @see edje_object_message_handler_set() | ||
325 | */ | ||
326 | typedef enum _Edje_Message_Type | ||
327 | { | ||
328 | EDJE_MESSAGE_NONE = 0, | ||
329 | |||
330 | EDJE_MESSAGE_SIGNAL = 1, /* DONT USE THIS */ | ||
331 | |||
332 | EDJE_MESSAGE_STRING = 2, /**< A message with a string as value. Use #Edje_Message_String structs as message body, for this type. */ | ||
333 | EDJE_MESSAGE_INT = 3, /**< A message with an integer number as value. Use #Edje_Message_Int structs as message body, for this type. */ | ||
334 | EDJE_MESSAGE_FLOAT = 4, /**< A message with a floating pointer number as value. Use #Edje_Message_Float structs as message body, for this type. */ | ||
335 | |||
336 | EDJE_MESSAGE_STRING_SET = 5, /**< A message with a list of strings as value. Use #Edje_Message_String_Set structs as message body, for this type. */ | ||
337 | EDJE_MESSAGE_INT_SET = 6, /**< A message with a list of integer numbers as value. Use #Edje_Message_Int_Set structs as message body, for this type. */ | ||
338 | EDJE_MESSAGE_FLOAT_SET = 7, /**< A message with a list of floating point numbers as value. Use #Edje_Message_Float_Set structs as message body, for this type. */ | ||
339 | |||
340 | EDJE_MESSAGE_STRING_INT = 8, /**< A message with a struct containing a string and an integer number as value. Use #Edje_Message_String_Int structs as message body, for this type. */ | ||
341 | EDJE_MESSAGE_STRING_FLOAT = 9, /**< A message with a struct containing a string and a floating point number as value. Use #Edje_Message_String_Float structs as message body, for this type. */ | ||
342 | |||
343 | EDJE_MESSAGE_STRING_INT_SET = 10, /**< A message with a struct containing a string and list of integer numbers as value. Use #Edje_Message_String_Int_Set structs as message body, for this type. */ | ||
344 | EDJE_MESSAGE_STRING_FLOAT_SET = 11 /**< A message with a struct containing a string and list of floating point numbers as value. Use #Edje_Message_String_Float_Set structs as message body, for this type. */ | ||
345 | } Edje_Message_Type; | ||
346 | |||
347 | typedef enum _Edje_Aspect_Control | ||
348 | { | ||
349 | EDJE_ASPECT_CONTROL_NONE = 0, | ||
350 | EDJE_ASPECT_CONTROL_NEITHER = 1, | ||
351 | EDJE_ASPECT_CONTROL_HORIZONTAL = 2, | ||
352 | EDJE_ASPECT_CONTROL_VERTICAL = 3, | ||
353 | EDJE_ASPECT_CONTROL_BOTH = 4 | ||
354 | } Edje_Aspect_Control; | ||
355 | |||
356 | typedef enum _Edje_Object_Table_Homogeneous_Mode | ||
357 | { | ||
358 | EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, | ||
359 | EDJE_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, | ||
360 | EDJE_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 | ||
361 | } Edje_Object_Table_Homogeneous_Mode; | ||
362 | |||
363 | typedef enum _Edje_Part_Type | ||
364 | { | ||
365 | EDJE_PART_TYPE_NONE = 0, | ||
366 | EDJE_PART_TYPE_RECTANGLE = 1, | ||
367 | EDJE_PART_TYPE_TEXT = 2, | ||
368 | EDJE_PART_TYPE_IMAGE = 3, | ||
369 | EDJE_PART_TYPE_SWALLOW = 4, | ||
370 | EDJE_PART_TYPE_TEXTBLOCK = 5, | ||
371 | EDJE_PART_TYPE_GRADIENT = 6, | ||
372 | EDJE_PART_TYPE_GROUP = 7, | ||
373 | EDJE_PART_TYPE_BOX = 8, | ||
374 | EDJE_PART_TYPE_TABLE = 9, | ||
375 | EDJE_PART_TYPE_EXTERNAL = 10, | ||
376 | EDJE_PART_TYPE_PROXY = 11, | ||
377 | EDJE_PART_TYPE_LAST = 12 | ||
378 | } Edje_Part_Type; | ||
379 | |||
380 | typedef enum _Edje_Text_Effect | ||
381 | { | ||
382 | #define EDJE_TEXT_EFFECT_MASK_BASIC 0xf | ||
383 | #define EDJE_TEXT_EFFECT_BASIC_SET(x, s) \ | ||
384 | do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_BASIC) | (s); } while (0) | ||
385 | EDJE_TEXT_EFFECT_NONE = 0, | ||
386 | EDJE_TEXT_EFFECT_PLAIN = 1, | ||
387 | EDJE_TEXT_EFFECT_OUTLINE = 2, | ||
388 | EDJE_TEXT_EFFECT_SOFT_OUTLINE = 3, | ||
389 | EDJE_TEXT_EFFECT_SHADOW = 4, | ||
390 | EDJE_TEXT_EFFECT_SOFT_SHADOW = 5, | ||
391 | EDJE_TEXT_EFFECT_OUTLINE_SHADOW = 6, | ||
392 | EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW = 7, | ||
393 | EDJE_TEXT_EFFECT_FAR_SHADOW = 8, | ||
394 | EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW = 9, | ||
395 | EDJE_TEXT_EFFECT_GLOW = 10, | ||
396 | |||
397 | EDJE_TEXT_EFFECT_LAST = 11, | ||
398 | |||
399 | #define EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION (0x7 << 4) | ||
400 | #define EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(x, s) \ | ||
401 | do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) | (s); } while (0) | ||
402 | EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4), | ||
403 | EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM = (0x1 << 4), | ||
404 | EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4), | ||
405 | EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT = (0x3 << 4), | ||
406 | EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4), | ||
407 | EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP = (0x5 << 4), | ||
408 | EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4), | ||
409 | EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT = (0x7 << 4) | ||
410 | } Edje_Text_Effect; | ||
411 | |||
412 | typedef enum _Edje_Action_Type | ||
413 | { | ||
414 | EDJE_ACTION_TYPE_NONE = 0, | ||
415 | EDJE_ACTION_TYPE_STATE_SET = 1, | ||
416 | EDJE_ACTION_TYPE_ACTION_STOP = 2, | ||
417 | EDJE_ACTION_TYPE_SIGNAL_EMIT = 3, | ||
418 | EDJE_ACTION_TYPE_DRAG_VAL_SET = 4, | ||
419 | EDJE_ACTION_TYPE_DRAG_VAL_STEP = 5, | ||
420 | EDJE_ACTION_TYPE_DRAG_VAL_PAGE = 6, | ||
421 | EDJE_ACTION_TYPE_SCRIPT = 7, | ||
422 | EDJE_ACTION_TYPE_FOCUS_SET = 8, | ||
423 | EDJE_ACTION_TYPE_RESERVED00 = 9, | ||
424 | EDJE_ACTION_TYPE_FOCUS_OBJECT = 10, | ||
425 | EDJE_ACTION_TYPE_PARAM_COPY = 11, | ||
426 | EDJE_ACTION_TYPE_PARAM_SET = 12, | ||
427 | EDJE_ACTION_TYPE_SOUND_SAMPLE = 13, /**< @since 1.1 */ | ||
428 | EDJE_ACTION_TYPE_SOUND_TONE = 14, /**< @since 1.1 */ | ||
429 | EDJE_ACTION_TYPE_LAST = 15 | ||
430 | } Edje_Action_Type; | ||
431 | |||
432 | typedef enum _Edje_Tween_Mode | ||
433 | { | ||
434 | EDJE_TWEEN_MODE_NONE = 0, | ||
435 | EDJE_TWEEN_MODE_LINEAR = 1, | ||
436 | EDJE_TWEEN_MODE_SINUSOIDAL = 2, | ||
437 | EDJE_TWEEN_MODE_ACCELERATE = 3, | ||
438 | EDJE_TWEEN_MODE_DECELERATE = 4, | ||
439 | EDJE_TWEEN_MODE_ACCELERATE_FACTOR = 5, | ||
440 | EDJE_TWEEN_MODE_DECELERATE_FACTOR = 6, | ||
441 | EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR = 7, | ||
442 | EDJE_TWEEN_MODE_DIVISOR_INTERP = 8, | ||
443 | EDJE_TWEEN_MODE_BOUNCE = 9, | ||
444 | EDJE_TWEEN_MODE_SPRING = 10, | ||
445 | EDJE_TWEEN_MODE_LAST = 11, | ||
446 | EDJE_TWEEN_MODE_MASK = 0xff, | ||
447 | EDJE_TWEEN_MODE_OPT_FROM_CURRENT = (1 << 31) | ||
448 | } Edje_Tween_Mode; | ||
449 | |||
450 | typedef enum _Edje_Cursor | ||
451 | { | ||
452 | EDJE_CURSOR_MAIN, | ||
453 | EDJE_CURSOR_SELECTION_BEGIN, | ||
454 | EDJE_CURSOR_SELECTION_END, | ||
455 | EDJE_CURSOR_PREEDIT_START, | ||
456 | EDJE_CURSOR_PREEDIT_END, | ||
457 | EDJE_CURSOR_USER, | ||
458 | EDJE_CURSOR_USER_EXTRA, | ||
459 | // more later | ||
460 | } Edje_Cursor; | ||
461 | |||
462 | struct _Edje_Entry_Change_Info | ||
463 | { | ||
464 | union { | ||
465 | struct { | ||
466 | const char *content; | ||
467 | size_t pos; | ||
468 | size_t plain_length; /* Number of cursor positions represented | ||
469 | in content. */ | ||
470 | } insert; | ||
471 | struct { | ||
472 | const char *content; | ||
473 | size_t start, end; | ||
474 | } del; | ||
475 | } change; | ||
476 | Eina_Bool insert : 1; /**< True if the "change" union's "insert" is valid */ | ||
477 | Eina_Bool merge : 1; /**< True if can be merged with the previous one. Used for example with insertion when something is already selected. */ | ||
478 | }; | ||
479 | |||
480 | /** | ||
481 | * @since 1.1.0 | ||
482 | */ | ||
483 | typedef struct _Edje_Entry_Change_Info Edje_Entry_Change_Info; | ||
484 | |||
485 | typedef struct _Edje_Message_String Edje_Message_String; | ||
486 | typedef struct _Edje_Message_Int Edje_Message_Int; | ||
487 | typedef struct _Edje_Message_Float Edje_Message_Float; | ||
488 | typedef struct _Edje_Message_String_Set Edje_Message_String_Set; | ||
489 | typedef struct _Edje_Message_Int_Set Edje_Message_Int_Set; | ||
490 | typedef struct _Edje_Message_Float_Set Edje_Message_Float_Set; | ||
491 | typedef struct _Edje_Message_String_Int Edje_Message_String_Int; | ||
492 | typedef struct _Edje_Message_String_Float Edje_Message_String_Float; | ||
493 | typedef struct _Edje_Message_String_Int_Set Edje_Message_String_Int_Set; | ||
494 | typedef struct _Edje_Message_String_Float_Set Edje_Message_String_Float_Set; | ||
495 | |||
496 | struct _Edje_Message_String | ||
497 | { | ||
498 | char *str; /**< The message's string pointer */ | ||
499 | }; /**< Structure passed as value on #EDJE_MESSAGE_STRING messages. The string in it is automatically freed be Edje if passed to you by Edje */ | ||
500 | |||
501 | struct _Edje_Message_Int | ||
502 | { | ||
503 | int val; /**< The message's value */ | ||
504 | }; /**< Structure passed as value on #EDJE_MESSAGE_INT messages */ | ||
505 | |||
506 | struct _Edje_Message_Float | ||
507 | { | ||
508 | double val; /**< The message's value */ | ||
509 | }; /**< Structure passed as value on #EDJE_MESSAGE_FLOAT messages */ | ||
510 | |||
511 | struct _Edje_Message_String_Set | ||
512 | { | ||
513 | int count; /**< The size of the message's array (may be greater than 1) */ | ||
514 | char *str[1]; /**< The message's @b array of string pointers */ | ||
515 | }; /**< Structure passed as value on #EDJE_MESSAGE_STRING_SET messages. The array in it is automatically freed be Edje if passed to you by Edje */ | ||
516 | |||
517 | struct _Edje_Message_Int_Set | ||
518 | { | ||
519 | int count; /**< The size of the message's array (may be greater than 1) */ | ||
520 | int val[1]; /**< The message's @b array of integers */ | ||
521 | }; /**< Structure passed as value on #EDJE_MESSAGE_INT_SET messages. The array in it is automatically freed be Edje if passed to you by Edje */ | ||
522 | |||
523 | struct _Edje_Message_Float_Set | ||
524 | { | ||
525 | int count; /**< The size of the message's array (may be greater than 1) */ | ||
526 | double val[1]; /**< The message's @b array of floats */ | ||
527 | }; /**< Structure passed as value on #EDJE_MESSAGE_FLOAT_SET messages. The array in it is automatically freed be Edje if passed to you by Edje */ | ||
528 | |||
529 | struct _Edje_Message_String_Int | ||
530 | { | ||
531 | char *str; /**< The message's string value */ | ||
532 | int val; /**< The message's integer value */ | ||
533 | }; /**< Structure passed as value on #EDJE_MESSAGE_STRING_INT messages. The string in it is automatically freed be Edje if passed to you by Edje */ | ||
534 | |||
535 | struct _Edje_Message_String_Float | ||
536 | { | ||
537 | char *str; /**< The message's string value */ | ||
538 | double val; /**< The message's float value */ | ||
539 | }; /**< Structure passed as value on #EDJE_MESSAGE_STRING_FLOAT messages. The string in it is automatically freed be Edje if passed to you by Edje */ | ||
540 | |||
541 | struct _Edje_Message_String_Int_Set | ||
542 | { | ||
543 | char *str; /**< The message's string value */ | ||
544 | int count; /**< The size of the message's array (may be greater than 1) */ | ||
545 | int val[1]; /**< The message's @b array of integers */ | ||
546 | }; /**< Structure passed as value on #EDJE_MESSAGE_STRING_INT_SET messages. The array and string in it are automatically freed be Edje if passed to you by Edje */ | ||
547 | |||
548 | struct _Edje_Message_String_Float_Set | ||
549 | { | ||
550 | char *str; /**< The message's string value */ | ||
551 | int count; /**< The size of the message's array (may be greater than 1) */ | ||
552 | double val[1]; /**< The message's @b array of floats */ | ||
553 | }; /**< Structure passed as value on #EDJE_MESSAGE_STRING_FLOAT_SET messages. The array and string in it are automatically freed be Edje if passed to you by Edje */ | ||
554 | |||
555 | typedef enum _Edje_Drag_Dir | ||
556 | { | ||
557 | EDJE_DRAG_DIR_NONE = 0, | ||
558 | EDJE_DRAG_DIR_X = 1, | ||
559 | EDJE_DRAG_DIR_Y = 2, | ||
560 | EDJE_DRAG_DIR_XY = 3 | ||
561 | } Edje_Drag_Dir; | ||
562 | |||
563 | typedef enum _Edje_Load_Error | ||
564 | { | ||
565 | EDJE_LOAD_ERROR_NONE = 0, /**< No error happened, the loading was successful */ | ||
566 | EDJE_LOAD_ERROR_GENERIC = 1, /**< A generic error happened during the loading */ | ||
567 | EDJE_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< The file pointed to did not exist */ | ||
568 | EDJE_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission to read the given file was denied */ | ||
569 | EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Resource allocation failed during the loading */ | ||
570 | EDJE_LOAD_ERROR_CORRUPT_FILE = 5, /**< The file pointed to was corrupt */ | ||
571 | EDJE_LOAD_ERROR_UNKNOWN_FORMAT = 6, /**< The file pointed to had an unknown format */ | ||
572 | EDJE_LOAD_ERROR_INCOMPATIBLE_FILE = 7, /**< The file pointed to is incompatible, i.e., it doesn't match the library's current version's format */ | ||
573 | EDJE_LOAD_ERROR_UNKNOWN_COLLECTION = 8, /**< The group/collection set to load from was @b not found in the file */ | ||
574 | EDJE_LOAD_ERROR_RECURSIVE_REFERENCE = 9 /**< The group/collection set to load from had <b>recursive references</b> on its components */ | ||
575 | } Edje_Load_Error; /**< Edje file loading error codes one can get - see edje_load_error_str() too. */ | ||
576 | |||
577 | typedef enum _Edje_Text_Filter_Type | ||
578 | { | ||
579 | EDJE_TEXT_FILTER_TEXT = 0, | ||
580 | EDJE_TEXT_FILTER_FORMAT = 1, | ||
581 | EDJE_TEXT_FILTER_MARKUP = 2 | ||
582 | } Edje_Text_Filter_Type; | ||
583 | |||
584 | typedef enum _Edje_Text_Autocapital_Type | ||
585 | { | ||
586 | EDJE_TEXT_AUTOCAPITAL_TYPE_NONE, | ||
587 | EDJE_TEXT_AUTOCAPITAL_TYPE_WORD, | ||
588 | EDJE_TEXT_AUTOCAPITAL_TYPE_SENTENCE, | ||
589 | EDJE_TEXT_AUTOCAPITAL_TYPE_ALLCHARACTER | ||
590 | } Edje_Text_Autocapital_Type; | ||
591 | |||
592 | /** | ||
593 | * The possible types the parameters of an EXTERNAL part can be. | ||
594 | */ | ||
595 | typedef enum _Edje_External_Param_Type | ||
596 | { | ||
597 | EDJE_EXTERNAL_PARAM_TYPE_INT, /**< Parameter value is an integer. */ | ||
598 | EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, /**< Parameter value is a double. */ | ||
599 | EDJE_EXTERNAL_PARAM_TYPE_STRING, /**< Parameter value is a string. */ | ||
600 | EDJE_EXTERNAL_PARAM_TYPE_BOOL, /**< Parameter value is boolean. */ | ||
601 | EDJE_EXTERNAL_PARAM_TYPE_CHOICE, /**< Parameter value is one of a set of | ||
602 | predefined string choices. */ | ||
603 | EDJE_EXTERNAL_PARAM_TYPE_MAX /**< Sentinel. Don't use. */ | ||
604 | } Edje_External_Param_Type; | ||
605 | |||
606 | /** | ||
607 | * Flags that determine how a parameter may be accessed in different | ||
608 | * circumstances. | ||
609 | */ | ||
610 | typedef enum _Edje_External_Param_Flags | ||
611 | { | ||
612 | EDJE_EXTERNAL_PARAM_FLAGS_NONE = 0, /**< Property is incapable of operations, this is used to catch bogus flags. */ | ||
613 | EDJE_EXTERNAL_PARAM_FLAGS_GET = (1 << 0), /**< Property can be read/get. */ | ||
614 | EDJE_EXTERNAL_PARAM_FLAGS_SET = (1 << 1), /**< Property can be written/set. This only enables edje_object_part_external_param_set() and Embryo scripts. To enable the parameter being set from state description whenever it changes state, use #EDJE_EXTERNAL_PARAM_FLAGS_STATE. */ | ||
615 | EDJE_EXTERNAL_PARAM_FLAGS_STATE = (1 << 2), /**< Property can be set from state description. */ | ||
616 | EDJE_EXTERNAL_PARAM_FLAGS_CONSTRUCTOR = (1 << 3), /**< This property is only set once when the object is constructed using its value from "default" 0.0 state description. Setting this overrides #EDJE_EXTERNAL_PARAM_FLAGS_STATE. */ | ||
617 | EDJE_EXTERNAL_PARAM_FLAGS_REGULAR = (EDJE_EXTERNAL_PARAM_FLAGS_GET | | ||
618 | EDJE_EXTERNAL_PARAM_FLAGS_SET | | ||
619 | EDJE_EXTERNAL_PARAM_FLAGS_STATE) /**< Convenience flag that sets property as GET, SET and STATE. */ | ||
620 | } Edje_External_Param_Flags; | ||
621 | |||
622 | typedef enum _Edje_Input_Panel_Layout | ||
623 | { | ||
624 | EDJE_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */ | ||
625 | EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */ | ||
626 | EDJE_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */ | ||
627 | EDJE_INPUT_PANEL_LAYOUT_URL, /**< URL layout */ | ||
628 | EDJE_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */ | ||
629 | EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP layout */ | ||
630 | EDJE_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */ | ||
631 | EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */ | ||
632 | EDJE_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */ | ||
633 | EDJE_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout @since 1.2 */ | ||
634 | EDJE_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout @since 1.2 */ | ||
635 | EDJE_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */ | ||
636 | } Edje_Input_Panel_Layout; | ||
637 | |||
638 | typedef enum _Edje_Input_Panel_Lang | ||
639 | { | ||
640 | EDJE_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic @since 1.2 */ | ||
641 | EDJE_INPUT_PANEL_LANG_ALPHABET /**< Alphabet @since 1.2 */ | ||
642 | } Edje_Input_Panel_Lang; | ||
643 | |||
644 | typedef enum _Edje_Input_Panel_Return_Key_Type | ||
645 | { | ||
646 | EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default @since 1.2 */ | ||
647 | EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done @since 1.2 */ | ||
648 | EDJE_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go @since 1.2 */ | ||
649 | EDJE_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join @since 1.2 */ | ||
650 | EDJE_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login @since 1.2 */ | ||
651 | EDJE_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next @since 1.2 */ | ||
652 | EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search or magnifier icon @since 1.2 */ | ||
653 | EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEND /**< Send @since 1.2 */ | ||
654 | } Edje_Input_Panel_Return_Key_Type; | ||
655 | |||
656 | /** | ||
657 | * @brief Converts type identifier to string nicer representation. | ||
658 | * | ||
659 | * This may be used to debug or other informational purposes. | ||
660 | * | ||
661 | * @param type the identifier to convert. | ||
662 | * @return the string with the string representation, or @c "(unknown)". | ||
663 | */ | ||
664 | EAPI const char *edje_external_param_type_str(Edje_External_Param_Type type) EINA_PURE; | ||
665 | |||
666 | /** | ||
667 | * Struct that holds parameters for parts of type EXTERNAL. | ||
668 | */ | ||
669 | struct _Edje_External_Param | ||
670 | { | ||
671 | const char *name; /**< The name of the parameter. */ | ||
672 | Edje_External_Param_Type type; /**< The type of the parameter. This defines | ||
673 | which of the next three variables holds | ||
674 | the value for it. */ | ||
675 | // XXX these could be in a union, but eet doesn't support them (or does it?) | ||
676 | int i; /**< Used by both integer and boolean */ | ||
677 | double d; /**< Used by double */ | ||
678 | const char *s; /**< Used by both string and choice */ | ||
679 | }; | ||
680 | /** | ||
681 | * Struct that holds parameters for parts of type EXTERNAL. | ||
682 | */ | ||
683 | typedef struct _Edje_External_Param Edje_External_Param; | ||
684 | |||
685 | /** | ||
686 | * Helper macro to indicate an EXTERNAL's integer parameter is undefined. | ||
687 | */ | ||
688 | #define EDJE_EXTERNAL_INT_UNSET INT_MAX | ||
689 | /** | ||
690 | * Helper macro to indicate an EXTERNAL's double parameter is undefined. | ||
691 | */ | ||
692 | #define EDJE_EXTERNAL_DOUBLE_UNSET DBL_MAX | ||
693 | |||
694 | /** | ||
695 | * Struct holding information about an EXTERNAL part's parameters. | ||
696 | * | ||
697 | * When creating types to use with EXTERNAL parts, an array of this type is | ||
698 | * used to describe the different parameters the object uses. | ||
699 | * | ||
700 | * This struct holds the name, type and flags that define how and when the | ||
701 | * parameter is used, as well as information specific to each type, like the | ||
702 | * maximum or minimum value, that can be used by editors to restrict the | ||
703 | * range of values to set for each parameter. | ||
704 | */ | ||
705 | typedef struct _Edje_External_Param_Info Edje_External_Param_Info; | ||
706 | /** | ||
707 | * Struct holding information about an EXTERNAL part's parameters. | ||
708 | * | ||
709 | * When creating types to use with EXTERNAL parts, an array of this type is | ||
710 | * used to describe the different parameters the object uses. | ||
711 | * | ||
712 | * This struct holds the name, type and flags that define how and when the | ||
713 | * parameter is used, as well as information specific to each type, like the | ||
714 | * maximum or minimum value, that can be used by editors to restrict the | ||
715 | * range of values to set for each parameter. | ||
716 | */ | ||
717 | struct _Edje_External_Param_Info | ||
718 | { | ||
719 | const char *name; /**< Name of the parameter. */ | ||
720 | Edje_External_Param_Type type; /**< Type of the parameter. */ | ||
721 | Edje_External_Param_Flags flags; /**< Flags indicating how this parameter is | ||
722 | used. */ | ||
723 | union { | ||
724 | struct { | ||
725 | int def, /**< Default value for the parameter. */ | ||
726 | min, /**< Minimum value it can have. */ | ||
727 | max, /**< Maximum value it can have. */ | ||
728 | step; /**< Values will be a multiple of this. */ | ||
729 | } i; /**< Info about integer type parameters. Use #EDJE_EXTERNAL_INT_UNSET | ||
730 | on any of them to indicate they are not defined.*/ | ||
731 | struct { | ||
732 | double def, /**< Default value for the parameter. */ | ||
733 | min, /**< Minimum value it can have. */ | ||
734 | max, /**< Maximum value it can have. */ | ||
735 | step; /**< Values will be a multiple of this. */ | ||
736 | } d; /**< Info about double type parameters. Use | ||
737 | #EDJE_EXTERNAL_DOUBLE_UNSET on any of them to indicate they are not defined.*/ | ||
738 | struct { | ||
739 | const char *def; /**< Default value. */ | ||
740 | const char *accept_fmt; /**< Not implemented. */ | ||
741 | const char *deny_fmt; /**< Not implemented */ | ||
742 | } s; /**< Info about string type parameters. NULL indicates undefined. */ | ||
743 | struct { | ||
744 | int def; /**< Default value. */ | ||
745 | const char *false_str; /**< String shown by editors to indicate the false state. */ | ||
746 | const char *true_str; /**< String shown by editors to indicate the true state. */ | ||
747 | } b; /**< Info about boolean type parameters.*/ | ||
748 | struct { | ||
749 | const char *def; /**< Default value. */ | ||
750 | const char **choices; /* Array of strings, each represents a | ||
751 | valid value for this parameter. The | ||
752 | last element of the array must be | ||
753 | NULL. */ | ||
754 | char *(*def_get)(void *data, const Edje_External_Param_Info *info); /** return malloc() memory with the default choice, should be used if def is NULL. First parameter is Edje_External_Type::data */ | ||
755 | char **(*query)(void *data, const Edje_External_Param_Info *info); /** NULL terminated array of strings, memory is dynamically allocated and should be freed with free() for array and each element. First parameter is Edje_External_Type::data */ | ||
756 | } c; /**< Info about choice type parameters. */ | ||
757 | } info; | ||
758 | }; | ||
759 | |||
760 | #define EDJE_EXTERNAL_PARAM_INFO_INT_FULL_FLAGS(name, def, min, max, step, flags) \ | ||
761 | {name, EDJE_EXTERNAL_PARAM_TYPE_INT, flags, {.i = {def, min, max, step}}} | ||
762 | #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL_FLAGS(name, def, min, max, step, flags) \ | ||
763 | {name, EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, flags, {.d = {def, min, max, step}}} | ||
764 | #define EDJE_EXTERNAL_PARAM_INFO_STRING_FULL_FLAGS(name, def, accept, deny, flags) \ | ||
765 | {name, EDJE_EXTERNAL_PARAM_TYPE_STRING, flags, {.s = {def, accept, deny}}} | ||
766 | #define EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL_FLAGS(name, def, false_str, true_str, flags) \ | ||
767 | {name, EDJE_EXTERNAL_PARAM_TYPE_BOOL, flags, {.b = {def, false_str, true_str}}} | ||
768 | #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL_FLAGS(name, def, choices, flags) \ | ||
769 | {name, EDJE_EXTERNAL_PARAM_TYPE_CHOICE, flags, {.c = {def, choices, NULL, NULL}}} | ||
770 | #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_DYNAMIC_FULL_FLAGS(name, def_get, query, flags) \ | ||
771 | {name, EDJE_EXTERNAL_PARAM_TYPE_CHOICE, flags, {.c = {NULL, NULL, def_get, query}}} | ||
772 | |||
773 | #define EDJE_EXTERNAL_PARAM_INFO_INT_FULL(name, def, min, max, step) \ | ||
774 | EDJE_EXTERNAL_PARAM_INFO_INT_FULL_FLAGS(name, def, min, max, step, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR) | ||
775 | #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL(name, def, min, max, step) \ | ||
776 | EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL_FLAGS(name, def, min, max, step, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR) | ||
777 | #define EDJE_EXTERNAL_PARAM_INFO_STRING_FULL(name, def, accept, deny) \ | ||
778 | EDJE_EXTERNAL_PARAM_INFO_STRING_FULL_FLAGS(name, def, accept, deny, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR) | ||
779 | #define EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL(name, def, false_str, true_str) \ | ||
780 | EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL_FLAGS(name, def, false_str, true_str, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR) | ||
781 | #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL(name, def, choices) \ | ||
782 | EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL_FLAGS(name, def, choices, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR) | ||
783 | #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_DYNAMIC_FULL(name, def_get, query) \ | ||
784 | EDJE_EXTERNAL_PARAM_INFO_CHOICE_DYNAMIC_FULL_FLAGS(name, def_get, query, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR) | ||
785 | |||
786 | #define EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT(name, def) \ | ||
787 | EDJE_EXTERNAL_PARAM_INFO_INT_FULL(name, def, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET) | ||
788 | #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT(name, def) \ | ||
789 | EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL(name, def, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET) | ||
790 | #define EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT(name, def) \ | ||
791 | EDJE_EXTERNAL_PARAM_INFO_STRING_FULL(name, def, NULL, NULL) | ||
792 | #define EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT(name, def) \ | ||
793 | EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL(name, def, "false", "true") | ||
794 | |||
795 | #define EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT_FLAGS(name, def, flags) \ | ||
796 | EDJE_EXTERNAL_PARAM_INFO_INT_FULL_FLAGS(name, def, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET, flags) | ||
797 | #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT_FLAGS(name, def, flags) \ | ||
798 | EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL_FLAGS(name, def, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET, flags) | ||
799 | #define EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT_FLAGS(name, def, flags) \ | ||
800 | EDJE_EXTERNAL_PARAM_INFO_STRING_FULL_FLAGS(name, def, NULL, NULL, flags) | ||
801 | #define EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT_FLAGS(name, def, flags) \ | ||
802 | EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL_FLAGS(name, def, "false", "true", flags) | ||
803 | |||
804 | #define EDJE_EXTERNAL_PARAM_INFO_INT(name) \ | ||
805 | EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT(name, 0) | ||
806 | #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE(name) \ | ||
807 | EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT(name, 0.0) | ||
808 | #define EDJE_EXTERNAL_PARAM_INFO_STRING(name) \ | ||
809 | EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT(name, NULL) | ||
810 | #define EDJE_EXTERNAL_PARAM_INFO_BOOL(name) \ | ||
811 | EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT(name, 0) | ||
812 | |||
813 | #define EDJE_EXTERNAL_PARAM_INFO_INT_FLAGS(name, flags) \ | ||
814 | EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT_FLAGS(name, 0, flags) | ||
815 | #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FLAGS(name, flags) \ | ||
816 | EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT_FLAGS(name, 0.0, flags) | ||
817 | #define EDJE_EXTERNAL_PARAM_INFO_STRING_FLAGS(name, flags) \ | ||
818 | EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT_FLAGS(name, NULL, flags) | ||
819 | #define EDJE_EXTERNAL_PARAM_INFO_BOOL_FLAGS(name, flags) \ | ||
820 | EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT_FLAGS(name, 0, flags) | ||
821 | |||
822 | #define EDJE_EXTERNAL_PARAM_INFO_SENTINEL {NULL, 0, 0, {.s = {NULL, NULL, NULL}}} | ||
823 | |||
824 | /** | ||
825 | * @struct _Edje_External_Type | ||
826 | * | ||
827 | * @brief Information about an external type to be used. | ||
828 | * | ||
829 | * This structure provides information on how to display and modify a | ||
830 | * third party Evas_Object in Edje. | ||
831 | * | ||
832 | * Some function pointers are not really used by Edje, but provide | ||
833 | * means for Edje users to better interact with such objects. For | ||
834 | * instance, an editor may use label_get() and icon_get() to list all | ||
835 | * registered external types. | ||
836 | * | ||
837 | * @note The function pointers provided in this structure must check | ||
838 | * for errors and invalid or out-of-range values as for | ||
839 | * performance reasons Edje will not enforce hints provided as | ||
840 | * #Edje_External_Param_Info in the member parameters_info. | ||
841 | */ | ||
842 | struct _Edje_External_Type | ||
843 | { | ||
844 | #define EDJE_EXTERNAL_TYPE_ABI_VERSION (3) | ||
845 | unsigned int abi_version; /**< always use: | ||
846 | * - #EDJE_EXTERNAL_TYPE_ABI_VERSION to declare. | ||
847 | * - edje_external_type_abi_version_get() to check. | ||
848 | */ | ||
849 | const char *module; /**< Name of the module that holds these definitions, | ||
850 | as used in the externals {} block of a theme | ||
851 | definition. */ | ||
852 | const char *module_name; /**< Canonical name of the module, for displaying | ||
853 | in edition programs, for example. */ | ||
854 | Evas_Object *(*add) (void *data, Evas *evas, Evas_Object *parent, const Eina_List *params, const char *part_name); /**< Creates the object to be used by Edje as the part. @p part_name is the name of the part that holds the object and can be used to forward callbacks from the object as signals from Edje. @p params is the list of #Edje_External_Param, not parsed, from the default state of the part. Parameters of type #EDJE_EXTERNAL_PARAM_FLAGS_CONSTRUCTOR should be set on | ||
855 | the object here. */ | ||
856 | void (*state_set) (void *data, Evas_Object *obj, const void *from_params, const void *to_params, float pos); /**< Called upon state changes, including the initial "default" 0.0 state. Parameters are the value returned by params_parse(). The @p pos parameter is a value between 0.0 and 1.0 indicating the position in time within the state transition. */ | ||
857 | void (*signal_emit) (void *data, Evas_Object *obj, const char *emission, const char *source); /**< Feed a signal emitted with emission originally set as part_name:signal to this object (without the "part_name:" prefix) */ | ||
858 | Eina_Bool (*param_set) (void *data, Evas_Object *obj, const Edje_External_Param *param); /**< Dynamically change a parameter of this external, called by scripts and user code. Returns @c EINA_TRUE on success */ | ||
859 | Eina_Bool (*param_get) (void *data, const Evas_Object *obj, Edje_External_Param *param); /**< Dynamically fetch a parameter of this external, called by scripts and user code. Returns @c EINA_TRUE on success. (Must check parameter name and type!) */ | ||
860 | Evas_Object *(*content_get) (void *data, const Evas_Object *obj, const char *content); /**< Dynamically fetch a sub object of this external, called by scripts and user code. Returns @c Evas_Object * on success. (Must check parameter name and type!) */ | ||
861 | void *(*params_parse) (void *data, Evas_Object *obj, const Eina_List *params); /**< Parses the list of parameters, converting into a friendly representation. Used with state_set() */ | ||
862 | void (*params_free) (void *params); /**< Free parameters parsed with params_parse() */ | ||
863 | |||
864 | /* The following callbacks aren't used by Edje itself, but by UI design | ||
865 | tools instead */ | ||
866 | const char *(*label_get) (void *data); /**< Get a label to use to identify this EXTERNAL. (For editors) */ | ||
867 | const char *(*description_get) (void *data); /**< Get a user friendly description of this EXTERNAL. (For editors) */ | ||
868 | Evas_Object *(*icon_add) (void *data, Evas *e); /**< Get an icon to use to identify this EXTERNAL. (For editors) */ | ||
869 | Evas_Object *(*preview_add) (void *data, Evas *e); /**< Get a preview of the EXTERNAL object in use. (For editors) */ | ||
870 | const char *(*translate) (void *data, const char *orig); /**< called to translate parameters_info name properties for use in user interfaces that support internationalization (i18n) (For editors) */ | ||
871 | |||
872 | Edje_External_Param_Info *parameters_info; /**< An array of #Edje_External_Param_Info describing the different parameters this EXTERNAL may have. The last element in the array must be #EDJE_EXTERNAL_PARAM_INFO_SENTINEL. */ | ||
873 | void *data; /**< Private user data that will be passed to all of the class functions. */ | ||
874 | }; | ||
875 | typedef struct _Edje_External_Type Edje_External_Type; | ||
876 | |||
877 | /** | ||
878 | * Convenience struct used to mass-register types of EXTERNAL objects. | ||
879 | * | ||
880 | * Used with edje_external_type_array_register(). | ||
881 | */ | ||
882 | struct _Edje_External_Type_Info | ||
883 | { | ||
884 | const char *name; /**< The name of the type to register. */ | ||
885 | const Edje_External_Type *info; /**< The type definition. */ | ||
886 | }; | ||
887 | typedef struct _Edje_External_Type_Info Edje_External_Type_Info; | ||
888 | |||
889 | typedef void (*Edje_Signal_Cb) (void *data, Evas_Object *obj, const char *emission, const char *source); /**< Edje signal callback functions's prototype definition. @c data will have the auxiliary data pointer set at the time the callback registration. @c obj will be a pointer the Edje object where the signal comes from. @c emission will identify the exact signal's emission string and @c source the exact signal's source one. */ | ||
890 | typedef void (*Edje_Text_Change_Cb) (void *data, Evas_Object *obj, const char *part); | ||
891 | typedef void (*Edje_Message_Handler_Cb) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg); /**< Edje message handler callback functions's prototype definition. @c data will have the auxiliary data pointer set at the time the callback registration. @c obj will be a pointer the Edje object where the message comes from. @c type will identify the type of the given message and @c msg will be a pointer the message's contents, de facto, which depend on @c type. */ | ||
892 | typedef void (*Edje_Text_Filter_Cb) (void *data, Evas_Object *obj, const char *part, Edje_Text_Filter_Type type, char **text); | ||
893 | typedef void (*Edje_Markup_Filter_Cb) (void *data, Evas_Object *obj, const char *part, char **text); | ||
894 | typedef Evas_Object *(*Edje_Item_Provider_Cb) (void *data, Evas_Object *obj, const char *part, const char *item); | ||
895 | |||
896 | /** | ||
897 | * @brief Initialize the Edje library. | ||
898 | * | ||
899 | * @return The new init count. The initial value is zero. | ||
900 | * | ||
901 | * This function initializes the Ejde library, making the proper calls | ||
902 | * to internal initialization functions. It will also initialize its | ||
903 | * @b dependencies, making calls to @c eina_init(), @c ecore_init(), | ||
904 | * @c embryo_init() and @c eet_init(). So, there is no need to call | ||
905 | * those functions again, in your code. To shutdown Edje there is the | ||
906 | * function edje_shutdown(). | ||
907 | * | ||
908 | * @see edje_shutdown() | ||
909 | * @see eina_init() | ||
910 | * @see ecore_init() | ||
911 | * @see embryo_init() | ||
912 | * @see eet_init() | ||
913 | * | ||
914 | */ | ||
915 | EAPI int edje_init (void); | ||
916 | |||
917 | /** | ||
918 | * @brief Shutdown the Edje library. | ||
919 | * | ||
920 | * @return The number of times the library has been initialised | ||
921 | * without being shutdown. | ||
922 | * | ||
923 | * This function shuts down the Edje library. It will also call the | ||
924 | * shutdown functions of its @b dependencies, which are @c | ||
925 | * eina_shutdown(), @c ecore_shutdown(), @c embryo_shutdown() and @c | ||
926 | * eet_shutdown(), so there is no need to call these functions again, | ||
927 | * in your code. | ||
928 | * | ||
929 | * @see edje_init() | ||
930 | * @see eina_shutdown() | ||
931 | * @see ecore_shutdown() | ||
932 | * @see embryo_shutdown() | ||
933 | * @see eet_shutdown() | ||
934 | * | ||
935 | */ | ||
936 | EAPI int edje_shutdown (void); | ||
937 | |||
938 | /** | ||
939 | * @brief Set edje trasitions' frame time. | ||
940 | * | ||
941 | * @param t The frame time, in seconds. Default value is 1/30. | ||
942 | * | ||
943 | * This function sets the edje built-in animations' frame time (thus, | ||
944 | * affecting their resolution) by calling | ||
945 | * ecore_animator_frametime_set(). This frame time can be retrieved | ||
946 | * with edje_frametime_get(). | ||
947 | * | ||
948 | * @see edje_frametime_get() | ||
949 | * | ||
950 | */ | ||
951 | EAPI void edje_frametime_set (double t); | ||
952 | |||
953 | /** | ||
954 | * @brief Get edje trasitions' frame time. | ||
955 | * | ||
956 | * @return The frame time, in seconds. | ||
957 | * | ||
958 | * This function returns the edje frame time set by | ||
959 | * edje_frametime_set() or the default value 1/30. | ||
960 | * | ||
961 | * @see edje_frametime_set() | ||
962 | * | ||
963 | */ | ||
964 | EAPI double edje_frametime_get (void); | ||
965 | |||
966 | /** | ||
967 | * @brief Freeze Edje objects. | ||
968 | * | ||
969 | * This function freezes all Edje animations in the current process. | ||
970 | * | ||
971 | * @note: for freeze a specific object @see edje_object_freeze(). | ||
972 | * | ||
973 | * @see edje_thaw() | ||
974 | * | ||
975 | */ | ||
976 | EAPI void edje_freeze (void); | ||
977 | |||
978 | /** | ||
979 | * @brief Thaw Edje objects. | ||
980 | * | ||
981 | * This function thaws all Edje animations in the current process. | ||
982 | * | ||
983 | * @note for thaw a specific object @see edje_object_thaw(). | ||
984 | * | ||
985 | * @see edje_freeze() | ||
986 | * | ||
987 | */ | ||
988 | EAPI void edje_thaw (void); | ||
989 | |||
990 | /** | ||
991 | * @brief Set the edje append fontset. | ||
992 | * | ||
993 | * @param fonts The fontset to append. | ||
994 | * | ||
995 | * This function sets the edje append fontset. | ||
996 | * | ||
997 | */ | ||
998 | EAPI void edje_fontset_append_set (const char *fonts); | ||
999 | |||
1000 | /** | ||
1001 | * @brief Get the edje append fontset. | ||
1002 | * | ||
1003 | * @return The edje append fontset. | ||
1004 | * | ||
1005 | * This function returns the edje append fontset set by | ||
1006 | * edje_fontset_append_set() function. | ||
1007 | * | ||
1008 | * @see edje_fontset_append_set(). | ||
1009 | * | ||
1010 | */ | ||
1011 | EAPI const char *edje_fontset_append_get (void); | ||
1012 | |||
1013 | /** | ||
1014 | * @brief Set Edje's global scaling factor. | ||
1015 | * | ||
1016 | * @param scale The global scaling factor (the default value is @c 1.0) | ||
1017 | * | ||
1018 | * Edje allows one to build scalable interfaces. Scaling factors, | ||
1019 | * which are set to neutral (@c 1.0) values by default (no scaling, | ||
1020 | * actual sizes), are of two types: @b global and @b individual. | ||
1021 | * Edje's global scaling factor will affect all its objects which | ||
1022 | * hadn't their individual scaling factors altered from the default | ||
1023 | * value (which is zero). If they had it set differently, by | ||
1024 | * edje_object_scale_set(), that factor will @b override the global | ||
1025 | * one. | ||
1026 | * | ||
1027 | * Scaling affects the values of minimum/maximum @b part sizes, which | ||
1028 | * are @b multiplied by it. Font sizes are scaled, too. | ||
1029 | * | ||
1030 | * @warning Only parts which, at EDC level, had the @c "scale" | ||
1031 | * property set to @c 1, will be affected by this function. Check the | ||
1032 | * complete @ref edcref "syntax reference" for EDC files. | ||
1033 | * | ||
1034 | * @see edje_scale_get(). | ||
1035 | */ | ||
1036 | EAPI void edje_scale_set (double scale); | ||
1037 | |||
1038 | /** | ||
1039 | * @brief Retrieve Edje's global scaling factor. | ||
1040 | * | ||
1041 | * @return The global scaling factor | ||
1042 | * | ||
1043 | * This function returns Edje's global scaling factor. | ||
1044 | * | ||
1045 | * @see edje_scale_set() for more details | ||
1046 | * | ||
1047 | */ | ||
1048 | EAPI double edje_scale_get (void); | ||
1049 | |||
1050 | /** | ||
1051 | * @brief Show last character in password mode. | ||
1052 | * | ||
1053 | * @param password_show_last If TRUE enable last character show in password mode. | ||
1054 | * | ||
1055 | * This function enables last input to be visible when in password mode for few seconds | ||
1056 | * or until the next input is entered. | ||
1057 | * | ||
1058 | * The time out value is obtained by edje_password_show_last_timeout_set function. | ||
1059 | * | ||
1060 | * @see edje_password_show_last_timeout_set(). | ||
1061 | */ | ||
1062 | EAPI void edje_password_show_last_set(Eina_Bool password_show_last); | ||
1063 | |||
1064 | /** | ||
1065 | * @brief Set's the timeout value in last show password mode. | ||
1066 | * | ||
1067 | * @param password_show_last_timeout The timeout value. | ||
1068 | * | ||
1069 | * This functions sets the time out value for which the last input entered in password | ||
1070 | * mode will be visible. | ||
1071 | * | ||
1072 | * This value can be used only when last show mode is set in password mode. | ||
1073 | * | ||
1074 | * @see edje_password_show_last_set(). | ||
1075 | * | ||
1076 | */ | ||
1077 | EAPI void edje_password_show_last_timeout_set(double password_show_last_timeout); | ||
1078 | |||
1079 | /** | ||
1080 | * @brief Set the scaling factor for a given Edje object. | ||
1081 | * | ||
1082 | * @param obj A handle to an Edje object | ||
1083 | * @param scale The scaling factor (the default value is @c 0.0, | ||
1084 | * meaning individual scaling @b not set) | ||
1085 | * | ||
1086 | * This function sets an @b individual scaling factor on the @a obj | ||
1087 | * Edje object. This property (or Edje's global scaling factor, when | ||
1088 | * applicable), will affect this object's part sizes. If @p scale is | ||
1089 | * not zero, than the individual scaling will @b override any global | ||
1090 | * scaling set, for the object @p obj's parts. Put it back to zero to | ||
1091 | * get the effects of the global scaling again. | ||
1092 | * | ||
1093 | * @warning Only parts which, at EDC level, had the @c "scale" | ||
1094 | * property set to @c 1, will be affected by this function. Check the | ||
1095 | * complete @ref edcref "syntax reference" for EDC files. | ||
1096 | * | ||
1097 | * @see edje_object_scale_get() | ||
1098 | * @see edje_scale_get() for more details | ||
1099 | */ | ||
1100 | EAPI Eina_Bool edje_object_scale_set (Evas_Object *obj, double scale); | ||
1101 | |||
1102 | /** | ||
1103 | * @brief Get a given Edje object's scaling factor. | ||
1104 | * | ||
1105 | * @param obj A handle to an Edje object | ||
1106 | * | ||
1107 | * This function returns the @c individual scaling factor set on the | ||
1108 | * @a obj Edje object. | ||
1109 | * | ||
1110 | * @see edje_object_scale_set() for more details | ||
1111 | * | ||
1112 | */ | ||
1113 | EAPI double edje_object_scale_get (const Evas_Object *obj); | ||
1114 | |||
1115 | /** | ||
1116 | * @brief Set the RTL orientation for this object. | ||
1117 | * | ||
1118 | * @param obj A handle to an Edje object. | ||
1119 | * @rtl new value of flag EINA_TRUE/EINA_FALSE | ||
1120 | * @since 1.1.0 | ||
1121 | */ | ||
1122 | EAPI void edje_object_mirrored_set (Evas_Object *obj, Eina_Bool rtl); | ||
1123 | |||
1124 | /** | ||
1125 | * @brief Get the RTL orientation for this object. | ||
1126 | * | ||
1127 | * You can RTL orientation explicitly with edje_object_mirrored_set. | ||
1128 | * | ||
1129 | * @param obj A handle to an Edje object. | ||
1130 | * @return @c EINA_TRUE if the flag is set or @c EINA_FALSE if not. | ||
1131 | * @since 1.1.0 | ||
1132 | */ | ||
1133 | EAPI Eina_Bool edje_object_mirrored_get (const Evas_Object *obj); | ||
1134 | |||
1135 | /** | ||
1136 | * Get a list of groups in an edje file | ||
1137 | * @param file The path to the edje file | ||
1138 | * | ||
1139 | * @return The Eina_List of group names (char *) | ||
1140 | * | ||
1141 | * Note: the list must be freed using edje_file_collection_list_free() | ||
1142 | * when you are done with it. | ||
1143 | */ | ||
1144 | EAPI Eina_List *edje_file_collection_list (const char *file); | ||
1145 | |||
1146 | /** | ||
1147 | * Free file collection list | ||
1148 | * @param lst The Eina_List of groups | ||
1149 | * | ||
1150 | * Frees the list returned by edje_file_collection_list(). | ||
1151 | */ | ||
1152 | EAPI void edje_file_collection_list_free (Eina_List *lst); | ||
1153 | |||
1154 | /** | ||
1155 | * Determine whether a group matching glob exists in an edje file. | ||
1156 | * @param file The file path | ||
1157 | * @param glob A glob to match on | ||
1158 | * | ||
1159 | * @return 1 if a match is found, 0 otherwise | ||
1160 | */ | ||
1161 | EAPI Eina_Bool edje_file_group_exists (const char *file, const char *glob); | ||
1162 | |||
1163 | /** | ||
1164 | * Get data from the file level data block of an edje file | ||
1165 | * @param file The path to the .edj file | ||
1166 | * @param key The data key | ||
1167 | * @return The string value of the data. Must be freed by the user when no | ||
1168 | * longer needed. | ||
1169 | * | ||
1170 | * If an edje file is built from the following edc: | ||
1171 | * | ||
1172 | * data { | ||
1173 | * item: "key1" "value1"; | ||
1174 | * item: "key2" "value2"; | ||
1175 | * } | ||
1176 | * collections { ... } | ||
1177 | * | ||
1178 | * Then, edje_file_data_get("key1") will return "value1" | ||
1179 | */ | ||
1180 | EAPI char *edje_file_data_get (const char *file, const char *key); | ||
1181 | |||
1182 | /** | ||
1183 | * @brief Set the file cache size. | ||
1184 | * | ||
1185 | * @param count The file cache size in edje file units. Default is 16. | ||
1186 | * | ||
1187 | * This function sets the file cache size. Edje keeps this cache in | ||
1188 | * order to prevent duplicates of edje file entries in memory. The | ||
1189 | * file cache size can be retrieved with edje_file_cache_get(). | ||
1190 | * | ||
1191 | * @see edje_file_cache_get() | ||
1192 | * @see edje_file_cache_flush() | ||
1193 | * | ||
1194 | */ | ||
1195 | EAPI void edje_file_cache_set (int count); | ||
1196 | |||
1197 | /** | ||
1198 | * @brief Return the file cache size. | ||
1199 | * | ||
1200 | * @return The file cache size in edje file units. Default is 16. | ||
1201 | * | ||
1202 | * This function returns the file cache size set by | ||
1203 | * edje_file_cache_set(). | ||
1204 | * | ||
1205 | * @see edje_file_cache_set() | ||
1206 | * @see edje_file_cache_flush() | ||
1207 | * | ||
1208 | */ | ||
1209 | EAPI int edje_file_cache_get (void); | ||
1210 | |||
1211 | /** | ||
1212 | * @brief Clean the file cache. | ||
1213 | * | ||
1214 | * This function cleans the file cache entries, but keeps this cache's | ||
1215 | * size to the last value set. | ||
1216 | * | ||
1217 | * @see edje_file_cache_set() | ||
1218 | * @see edje_file_cache_get() | ||
1219 | * | ||
1220 | */ | ||
1221 | EAPI void edje_file_cache_flush (void); | ||
1222 | |||
1223 | /** | ||
1224 | * @brief Set the collection cache size. | ||
1225 | * | ||
1226 | * @param count The collection cache size, in edje object units. Default is 16. | ||
1227 | * | ||
1228 | * This function sets the collection cache size. Edje keeps this cache | ||
1229 | * in order to prevent duplicates of edje {collection,group,part} | ||
1230 | * entries in memory. The collection cache size can be retrieved with | ||
1231 | * edje_collection_cache_get(). | ||
1232 | * | ||
1233 | * @see edje_collection_cache_get() | ||
1234 | * @see edje_collection_cache_flush() | ||
1235 | * | ||
1236 | */ | ||
1237 | EAPI void edje_collection_cache_set (int count); | ||
1238 | |||
1239 | /** | ||
1240 | * @brief Return the collection cache size. | ||
1241 | * | ||
1242 | * @return The collection cache size, in edje object units. Default is 16. | ||
1243 | * | ||
1244 | * This function returns the collection cache size set by | ||
1245 | * edje_collection_cache_set(). | ||
1246 | * | ||
1247 | * @see edje_collection_cache_set() | ||
1248 | * @see edje_collection_cache_flush() | ||
1249 | * | ||
1250 | */ | ||
1251 | EAPI int edje_collection_cache_get (void); | ||
1252 | |||
1253 | /** | ||
1254 | * @brief Clean the collection cache. | ||
1255 | * | ||
1256 | * This function cleans the collection cache, but keeps this cache's | ||
1257 | * size to the last value set. | ||
1258 | * | ||
1259 | * @see edje_collection_cache_set() | ||
1260 | * @see edje_collection_cache_get() | ||
1261 | * | ||
1262 | */ | ||
1263 | EAPI void edje_collection_cache_flush (void); | ||
1264 | |||
1265 | /** | ||
1266 | * @brief Set Edje color class. | ||
1267 | * | ||
1268 | * @param color_class | ||
1269 | * @param r Object Red value | ||
1270 | * @param g Object Green value | ||
1271 | * @param b Object Blue value | ||
1272 | * @param a Object Alpha value | ||
1273 | * @param r2 Outline Red value | ||
1274 | * @param g2 Outline Green value | ||
1275 | * @param b2 Outline Blue value | ||
1276 | * @param a2 Outline Alpha value | ||
1277 | * @param r3 Shadow Red value | ||
1278 | * @param g3 Shadow Green value | ||
1279 | * @param b3 Shadow Blue value | ||
1280 | * @param a3 Shadow Alpha value | ||
1281 | * | ||
1282 | * This function sets the color values for a process level color | ||
1283 | * class. This will cause all edje parts in the current process that | ||
1284 | * have the specified color class to have their colors multiplied by | ||
1285 | * these values. (Object level color classes set by | ||
1286 | * edje_object_color_class_set() will override the values set by this | ||
1287 | * function). | ||
1288 | * | ||
1289 | * The first color is the object, the second is the text outline, and | ||
1290 | * the third is the text shadow. (Note that the second two only apply | ||
1291 | * to text parts). | ||
1292 | * | ||
1293 | * Setting color emits a signal "color_class,set" with source being | ||
1294 | * the given color class in all objects. | ||
1295 | * | ||
1296 | * @see edje_color_class_set(). | ||
1297 | * | ||
1298 | * @note unlike Evas, Edje colors are @b not pre-multiplied. That is, | ||
1299 | * half-transparent white is 255 255 255 128. | ||
1300 | */ | ||
1301 | EAPI Eina_Bool edje_color_class_set (const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3); | ||
1302 | |||
1303 | /** | ||
1304 | * @brief Get Edje color class. | ||
1305 | * | ||
1306 | * @param color_class | ||
1307 | * @param r Object Red value | ||
1308 | * @param g Object Green value | ||
1309 | * @param b Object Blue value | ||
1310 | * @param a Object Alpha value | ||
1311 | * @param r2 Outline Red value | ||
1312 | * @param g2 Outline Green value | ||
1313 | * @param b2 Outline Blue value | ||
1314 | * @param a2 Outline Alpha value | ||
1315 | * @param r3 Shadow Red value | ||
1316 | * @param g3 Shadow Green value | ||
1317 | * @param b3 Shadow Blue value | ||
1318 | * @param a3 Shadow Alpha value | ||
1319 | * | ||
1320 | * @return EINA_TRUE if found or EINA_FALSE if not found and all | ||
1321 | * values are zeroed. | ||
1322 | * | ||
1323 | * This function gets the color values for a process level color | ||
1324 | * class. This value is the globally set and not per-object, that is, | ||
1325 | * the value that would be used by objects if they did not override with | ||
1326 | * edje_object_color_class_set(). | ||
1327 | * | ||
1328 | * The first color is the object, the second is the text outline, and | ||
1329 | * the third is the text shadow. (Note that the second two only apply | ||
1330 | * to text parts). | ||
1331 | * | ||
1332 | * @see edje_color_class_set(). | ||
1333 | * | ||
1334 | * @note unlike Evas, Edje colors are @b not pre-multiplied. That is, | ||
1335 | * half-transparent white is 255 255 255 128. | ||
1336 | */ | ||
1337 | EAPI Eina_Bool edje_color_class_get (const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3); | ||
1338 | |||
1339 | /** | ||
1340 | * @brief Delete edje color class. | ||
1341 | * | ||
1342 | * @param color_class | ||
1343 | * | ||
1344 | * This function deletes any values at the process level for the | ||
1345 | * specified color class. | ||
1346 | * @note Deleting the color class will revert it to the | ||
1347 | * values defined in the theme file. | ||
1348 | * | ||
1349 | * Deleting the color class will emit the signal "color_class,del" | ||
1350 | * to all the Edje objects in the running program. | ||
1351 | */ | ||
1352 | EAPI void edje_color_class_del (const char *color_class); | ||
1353 | |||
1354 | /** | ||
1355 | * @brief Lists color classes. | ||
1356 | * | ||
1357 | * @return A list of color class names (strings). These strings and | ||
1358 | * the list must be free()'d by the caller. | ||
1359 | * | ||
1360 | * This function lists all color classes known about by the current | ||
1361 | * process. | ||
1362 | * | ||
1363 | */ | ||
1364 | EAPI Eina_List *edje_color_class_list (void); | ||
1365 | |||
1366 | /** | ||
1367 | * @brief Set the Edje text class. | ||
1368 | * | ||
1369 | * @param text_class The text class name | ||
1370 | * @param font The font name | ||
1371 | * @param size The font size | ||
1372 | * | ||
1373 | * @return @c EINA_TRUE, on success or @c EINA_FALSE, on error | ||
1374 | * | ||
1375 | * This function updates all Edje members at the process level which | ||
1376 | * belong to this text class with the new font attributes. | ||
1377 | * | ||
1378 | * @see edje_text_class_get(). | ||
1379 | * | ||
1380 | */ | ||
1381 | EAPI Eina_Bool edje_text_class_set (const char *text_class, const char *font, Evas_Font_Size size); | ||
1382 | |||
1383 | /** | ||
1384 | * @brief Delete the text class. | ||
1385 | * | ||
1386 | * @param text_class The text class name string | ||
1387 | * | ||
1388 | * This function deletes any values at the process level for the | ||
1389 | * specified text class. | ||
1390 | * | ||
1391 | */ | ||
1392 | EAPI void edje_text_class_del (const char *text_class); | ||
1393 | |||
1394 | /** | ||
1395 | * @brief List text classes. | ||
1396 | * | ||
1397 | * @return A list of text class names (strings). These strings are | ||
1398 | * stringshares and the list must be free()'d by the caller. | ||
1399 | * | ||
1400 | * This function lists all text classes known about by the current | ||
1401 | * process. | ||
1402 | * | ||
1403 | */ | ||
1404 | EAPI Eina_List *edje_text_class_list (void); | ||
1405 | |||
1406 | /** | ||
1407 | * @brief Set the object minimum size. | ||
1408 | * | ||
1409 | * @param obj A valid Evas_Object handle | ||
1410 | * @param minw The minimum width | ||
1411 | * @param minh The minimum height | ||
1412 | * | ||
1413 | * This sets the minimum size restriction for the object. | ||
1414 | */ | ||
1415 | EAPI void edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh); | ||
1416 | |||
1417 | /** | ||
1418 | * @brief Set the object maximum size. | ||
1419 | * | ||
1420 | * @param obj A valid Evas_Object handle | ||
1421 | * @param maxw The maximum width | ||
1422 | * @param maxh The maximum height | ||
1423 | * | ||
1424 | * This sets the maximum size restriction for the object. | ||
1425 | */ | ||
1426 | EAPI void edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh); | ||
1427 | |||
1428 | /** | ||
1429 | * @brief Set the object aspect size. | ||
1430 | * | ||
1431 | * @param obj A valid Evas_Object handle | ||
1432 | * @param aspect The aspect control axes | ||
1433 | * @param aw The aspect radio width | ||
1434 | * @param ah The aspect ratio height | ||
1435 | * | ||
1436 | * This sets the desired aspect ratio to keep an object that will be | ||
1437 | * swallowed by Edje. The width and height define a preferred size | ||
1438 | * ASPECT and the object may be scaled to be larger or smaller, but | ||
1439 | * retaining the relative scale of both aspect width and height. | ||
1440 | */ | ||
1441 | EAPI void edje_extern_object_aspect_set (Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah); | ||
1442 | |||
1443 | /** | ||
1444 | * @brief Registers a custom layout to be used in edje boxes. | ||
1445 | * | ||
1446 | * @param name The name of the layout | ||
1447 | * @param func The function defining the layout | ||
1448 | * @param layout_data_get This function gets the custom data pointer | ||
1449 | * for func | ||
1450 | * @param layout_data_free Passed to func to free its private data | ||
1451 | * when needed | ||
1452 | * @param free_data Frees data | ||
1453 | * @param data Private pointer passed to layout_data_get | ||
1454 | * | ||
1455 | * This function registers custom layouts that can be referred from | ||
1456 | * themes by the registered name. The Evas_Object_Box_Layout | ||
1457 | * functions receive two pointers for internal use, one being private | ||
1458 | * data, and the other the function to free that data when it's not | ||
1459 | * longer needed. From Edje, this private data will be retrieved by | ||
1460 | * calling layout_data_get, and layout_data_free will be the free | ||
1461 | * function passed to func. layout_data_get will be called with data | ||
1462 | * as its parameter, and this one will be freed by free_data whenever | ||
1463 | * the layout is unregistered from Edje. | ||
1464 | */ | ||
1465 | EAPI void edje_box_layout_register (const char *name, Evas_Object_Box_Layout func, void *(*layout_data_get)(void *), void (*layout_data_free)(void *), void (*free_data)(void *), void *data); | ||
1466 | |||
1467 | /** | ||
1468 | * @brief Instantiate a new Edje object | ||
1469 | * | ||
1470 | * @param evas A valid Evas handle, the canvas to place the new object | ||
1471 | * in | ||
1472 | * @return A handle to the new object created or @c NULL, on errors. | ||
1473 | * | ||
1474 | * This function creates a new Edje smart object, returning its @c | ||
1475 | * Evas_Object handle. An Edje object is useless without a (source) | ||
1476 | * file set to it, so you'd most probably call edje_object_file_set() | ||
1477 | * afterwards, like in: | ||
1478 | * @code | ||
1479 | * Evas_Object *edje; | ||
1480 | * | ||
1481 | * edje = edje_object_add(canvas); | ||
1482 | * if (!edje) | ||
1483 | * { | ||
1484 | * fprintf(stderr, "could not create edje object!\n"); | ||
1485 | * return NULL; | ||
1486 | * } | ||
1487 | * | ||
1488 | * if (!edje_object_file_set(edje, "theme.edj", "group_name")) | ||
1489 | * { | ||
1490 | * int err = edje_object_load_error_get(edje); | ||
1491 | * const char *errmsg = edje_load_error_str(err); | ||
1492 | * fprintf(stderr, "could not load 'group_name' from theme.edj: %s", | ||
1493 | * errmsg); | ||
1494 | * | ||
1495 | * evas_object_del(edje); | ||
1496 | * return NULL; | ||
1497 | * } | ||
1498 | * | ||
1499 | * @endcode | ||
1500 | * | ||
1501 | * @note You can get a callback every time edje re-calculates the object | ||
1502 | * (either due to animation or some kind of signal or input). This is called | ||
1503 | * in-line just after the recalculation has occurred. It is a good idea not | ||
1504 | * to go and delete or alter the object inside this callbacks, simply make | ||
1505 | * a note that the recalculation has taken place and then do something about | ||
1506 | * it outside the callback. to register a callback use code like: | ||
1507 | * | ||
1508 | * @code | ||
1509 | * evas_object_smart_callback_add(edje_obj, "recalc", my_cb, my_cb_data); | ||
1510 | * @endcode | ||
1511 | * | ||
1512 | * @see evas_object_smart_callback_add() | ||
1513 | * | ||
1514 | * @note Before creating the first Edje object in your code, remember | ||
1515 | * to initialize the library, with edje_init(), or unexpected behavior | ||
1516 | * might occur. | ||
1517 | */ | ||
1518 | EAPI Evas_Object *edje_object_add (Evas *evas); | ||
1519 | |||
1520 | /** | ||
1521 | * @brief Retrive an <b>EDC data field's value</b> from a given Edje | ||
1522 | * object's group. | ||
1523 | * | ||
1524 | * @param obj A handle to an Edje object | ||
1525 | * @param key The data field's key string | ||
1526 | * @return The data's value string. Must not be freed. | ||
1527 | * | ||
1528 | * This function fetches an EDC data field's value, which is declared | ||
1529 | * on the objects building EDC file, <b>under its group</b>. EDC data | ||
1530 | * blocks are most commonly used to pass arbitrary parameters from an | ||
1531 | * application's theme to its code. | ||
1532 | * | ||
1533 | * They look like the following: | ||
1534 | * | ||
1535 | * @code | ||
1536 | * collections { | ||
1537 | * group { | ||
1538 | * name: "a_group"; | ||
1539 | * data { | ||
1540 | * item: "key1" "value1"; | ||
1541 | * item: "key2" "value2"; | ||
1542 | * } | ||
1543 | * } | ||
1544 | * } | ||
1545 | * @endcode | ||
1546 | * | ||
1547 | * EDC data fields always hold @b strings as values, hence the return | ||
1548 | * type of this function. Check the complete @ref edcref "syntax reference" | ||
1549 | * for EDC files. | ||
1550 | * | ||
1551 | * @warning Do not confuse this call with edje_file_data_get(), which | ||
1552 | * queries for a @b global EDC data field on an EDC declaration file. | ||
1553 | * | ||
1554 | * @see edje_object_file_set() | ||
1555 | */ | ||
1556 | EAPI const char *edje_object_data_get (const Evas_Object *obj, const char *key); | ||
1557 | |||
1558 | /** | ||
1559 | * @brief Sets the @b EDJ file (and group within it) to load an Edje | ||
1560 | * object's contents from | ||
1561 | * | ||
1562 | * @param obj A handle to an Edje object | ||
1563 | * @param file The path to the EDJ file to load @p from | ||
1564 | * @param group The name of the group, in @p file, which implements an | ||
1565 | * Edje object | ||
1566 | * @return @c EINA_TRUE, on success or @c EINA_FALSE, on errors (check | ||
1567 | * edje_object_load_error_get() after this call to get errors causes) | ||
1568 | * | ||
1569 | * Edje expects EDJ files, which are theming objects' descriptions and | ||
1570 | * resources packed together in an EET file, to read Edje object | ||
1571 | * definitions from. They usually are created with the @c .edj | ||
1572 | * extension. EDJ files, in turn, are assembled from @b textual object | ||
1573 | * description files, where one describes Edje objects declaratively | ||
1574 | * -- the EDC files (see @ref edcref "the syntax" for those files). | ||
1575 | * | ||
1576 | * Those description files were designed so that many Edje object | ||
1577 | * definitions -- also called @b groups (or collections) -- could be | ||
1578 | * packed together <b>in the same EDJ file</b>, so that a whole | ||
1579 | * application's theme could be packed in one file only. This is the | ||
1580 | * reason for the @p group argument. | ||
1581 | * | ||
1582 | * Use this function after you instantiate a new Edje object, so that | ||
1583 | * you can "give him life", telling where to get its contents from. | ||
1584 | * | ||
1585 | * @see edje_object_add() | ||
1586 | * @see edje_object_file_get() | ||
1587 | */ | ||
1588 | EAPI Eina_Bool edje_object_file_set (Evas_Object *obj, const char *file, const char *group); | ||
1589 | |||
1590 | /** | ||
1591 | * @brief Get the file and group name that a given Edje object is bound to | ||
1592 | * | ||
1593 | * @param obj A handle to an Edje object | ||
1594 | * @param file A pointer to a variable whero to store the <b>file's | ||
1595 | * path</b> | ||
1596 | * @param group A pointer to a variable where to store the <b>group | ||
1597 | * name</b> in | ||
1598 | * | ||
1599 | * This gets the EDJ file's path, with the respective group set for | ||
1600 | * the given Edje object. If @a obj is either not an Edje file, or has | ||
1601 | * not had its file/group set previously, by edje_object_file_set(), | ||
1602 | * then both @p file and @p group will be set to @c NULL, indicating | ||
1603 | * an error. | ||
1604 | * | ||
1605 | * @see edje_object_file_set() | ||
1606 | * | ||
1607 | * @note Use @c NULL pointers on the file/group components you're not | ||
1608 | * interested in: they'll be ignored by the function. | ||
1609 | */ | ||
1610 | EAPI void edje_object_file_get (const Evas_Object *obj, const char **file, const char **group); | ||
1611 | |||
1612 | /** | ||
1613 | * @brief Gets the (last) file loading error for a given Edje object | ||
1614 | * | ||
1615 | * @param obj A handlet to an Edje object | ||
1616 | * | ||
1617 | * @return The Edje loading error, one of: | ||
1618 | * - #EDJE_LOAD_ERROR_NONE | ||
1619 | * - #EDJE_LOAD_ERROR_GENERIC | ||
1620 | * - #EDJE_LOAD_ERROR_DOES_NOT_EXIST | ||
1621 | * - #EDJE_LOAD_ERROR_PERMISSION_DENIED | ||
1622 | * - #EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED | ||
1623 | * - #EDJE_LOAD_ERROR_CORRUPT_FILE | ||
1624 | * - #EDJE_LOAD_ERROR_UNKNOWN_FORMAT | ||
1625 | * - #EDJE_LOAD_ERROR_INCOMPATIBLE_FILE | ||
1626 | * - #EDJE_LOAD_ERROR_UNKNOWN_COLLECTION | ||
1627 | * - #EDJE_LOAD_ERROR_RECURSIVE_REFERENCE | ||
1628 | * | ||
1629 | * This function is meant to be used after an Edje EDJ <b>file | ||
1630 | * loading</b>, what takes place with the edje_object_file_set() | ||
1631 | * function. If that function does not return @c EINA_TRUE, one should | ||
1632 | * check for the reason of failure with this one. | ||
1633 | * | ||
1634 | * @see edje_load_error_str() | ||
1635 | */ | ||
1636 | EAPI Edje_Load_Error edje_object_load_error_get (const Evas_Object *obj); | ||
1637 | |||
1638 | /** | ||
1639 | * Converts the given Edje file load error code into a string | ||
1640 | * describing it in English. | ||
1641 | * | ||
1642 | * @param error the error code, a value in ::Edje_Load_Error. | ||
1643 | * @return Always returns a valid string. If the given @p error is not | ||
1644 | * supported, <code>"Unknown error"</code> is returned. | ||
1645 | * | ||
1646 | * edje_object_file_set() is a function which sets an error value, | ||
1647 | * afterwards, which can be fetched with | ||
1648 | * edje_object_load_error_get(). The function in question is meant | ||
1649 | * to be used in conjunction with the latter, for pretty-printing any | ||
1650 | * possible error cause. | ||
1651 | */ | ||
1652 | EAPI const char *edje_load_error_str (Edje_Load_Error error); | ||
1653 | |||
1654 | /** | ||
1655 | * @brief Preload the images on the Edje Object in the background. | ||
1656 | * | ||
1657 | * @param obj A handle to an Edje object | ||
1658 | * @param cancel @c EINA_FALSE will add it the preloading work queue, | ||
1659 | * @c EINA_TRUE will remove it (if it was issued before). | ||
1660 | * @return @c EINA_FASLE if obj was not a valid Edje object | ||
1661 | * otherwise @c EINA_TRUE | ||
1662 | * | ||
1663 | * This function requests the preload of all data images (on the given | ||
1664 | * object) in the background. The work is queued before being processed | ||
1665 | * (because there might be other pending requests of this type). | ||
1666 | * It emits a signal "preload,done" when finished. | ||
1667 | * | ||
1668 | * @note Use @c EINA_TRUE on scenarios where you don't need | ||
1669 | * the image data preloaded anymore. | ||
1670 | */ | ||
1671 | EAPI Eina_Bool edje_object_preload (Evas_Object *obj, Eina_Bool cancel); | ||
1672 | |||
1673 | /** | ||
1674 | * @brief Add a callback for an arriving Edje signal, emitted by | ||
1675 | * a given Ejde object. | ||
1676 | * | ||
1677 | * @param obj A handle to an Edje object | ||
1678 | * @param emission The signal's "emission" string | ||
1679 | * @param source The signal's "source" string | ||
1680 | * @param func The callback function to be executed when the signal is | ||
1681 | * emitted. | ||
1682 | * @param data A pointer to data to pass in to @p func. | ||
1683 | * | ||
1684 | * Edje signals are one of the communication interfaces between | ||
1685 | * @b code and a given Edje object's @b theme. With signals, one can | ||
1686 | * communicate two string values at a time, which are: | ||
1687 | * - "emission" value: the name of the signal, in general | ||
1688 | * - "source" value: a name for the signal's context, in general | ||
1689 | * | ||
1690 | * Though there are those common uses for the two strings, one is free | ||
1691 | * to use them however they like. | ||
1692 | * | ||
1693 | * This function adds a callback function to a signal emitted by @a obj, to | ||
1694 | * be issued every time an EDC program like the following | ||
1695 | * @code | ||
1696 | * program { | ||
1697 | * name: "emit_example"; | ||
1698 | * action: SIGNAL_EMIT "a_signal" "a_source"; | ||
1699 | * } | ||
1700 | * @endcode | ||
1701 | * is run, if @p emission and @p source are given those same values, | ||
1702 | * here. | ||
1703 | * | ||
1704 | * Signal callback registration is powerful, in the way that @b blobs | ||
1705 | * may be used to match <b>multiple signals at once</b>. All the @c | ||
1706 | * "*?[\" set of @c fnmatch() operators can be used, both for @p | ||
1707 | * emission and @p source. | ||
1708 | * | ||
1709 | * Edje has @b internal signals it will emit, automatically, on | ||
1710 | * various actions taking place on group parts. For example, the mouse | ||
1711 | * cursor being moved, pressed, released, etc., over a given part's | ||
1712 | * area, all generate individual signals. | ||
1713 | * | ||
1714 | * By using something like | ||
1715 | * @code | ||
1716 | * edje_object_signal_callback_add(obj, "mouse,down,*", "button.*", | ||
1717 | * signal_cb, NULL); | ||
1718 | * @endcode | ||
1719 | * being @c "button.*" the pattern for the names of parts implementing | ||
1720 | * buttons on an interface, you'd be registering for notifications on | ||
1721 | * events of mouse buttons being pressed down on either of those parts | ||
1722 | * (those events all have the @c "mouse,down," common prefix on their | ||
1723 | * names, with a suffix giving the button number). The actual emission | ||
1724 | * and source strings of an event will be passed in as the @a emission | ||
1725 | * and @a source parameters of the callback function (e.g. @c | ||
1726 | * "mouse,down,2" and @c "button.close"), for each of those events. | ||
1727 | * | ||
1728 | * @note See @ref edcref "the syntax" for EDC files | ||
1729 | * @see edje_object_signal_emit() on how to emits Edje signals from | ||
1730 | * code to a an object | ||
1731 | * @see edje_object_signal_callback_del_full() | ||
1732 | */ | ||
1733 | EAPI void edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data); | ||
1734 | |||
1735 | /** | ||
1736 | * @brief Remove a signal-triggered callback from an object. | ||
1737 | * | ||
1738 | * @param obj A valid Evas_Object handle. | ||
1739 | * @param emission The emission string. | ||
1740 | * @param source The source string. | ||
1741 | * @param func The callback function. | ||
1742 | * @return The data pointer | ||
1743 | * | ||
1744 | * This function removes a callback, previously attached to the | ||
1745 | * emittion of a signal, from the object @a obj. The parameters @a | ||
1746 | * emission, @a source and @a func must match exactly those passed to | ||
1747 | * a previous call to edje_object_signal_callback_add(). The data | ||
1748 | * pointer that was passed to this call will be returned. | ||
1749 | * | ||
1750 | * @see edje_object_signal_callback_add(). | ||
1751 | * @see edje_object_signal_callback_del_full(). | ||
1752 | * | ||
1753 | */ | ||
1754 | EAPI void *edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func); | ||
1755 | |||
1756 | /** | ||
1757 | * @brief Unregister/delete a callback set for an arriving Edje | ||
1758 | * signal, emitted by a given Ejde object. | ||
1759 | * | ||
1760 | * @param obj A handle to an Edje object | ||
1761 | * @param emission The signal's "emission" string | ||
1762 | * @param source The signal's "source" string | ||
1763 | * @param func The callback function passed on the callback's | ||
1764 | * registration | ||
1765 | * @param data The pointer given to be passed as data to @p func | ||
1766 | * @return @p data, on success or @c NULL, on errors (or if @p data | ||
1767 | * had this value) | ||
1768 | * | ||
1769 | * This function removes a callback, previously attached to the | ||
1770 | * emittion of a signal, from the object @a obj. The parameters | ||
1771 | * @a emission, @a source, @a func and @a data must match exactly those | ||
1772 | * passed to a previous call to edje_object_signal_callback_add(). The | ||
1773 | * data pointer that was passed to this call will be returned. | ||
1774 | * | ||
1775 | * @see edje_object_signal_callback_add(). | ||
1776 | * @see edje_object_signal_callback_del(). | ||
1777 | * | ||
1778 | */ | ||
1779 | EAPI void *edje_object_signal_callback_del_full(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data); | ||
1780 | |||
1781 | /** | ||
1782 | * @brief Send/emit an Edje signal to a given Edje object | ||
1783 | * | ||
1784 | * @param obj A handle to an Edje object | ||
1785 | * @param emission The signal's "emission" string | ||
1786 | * @param source The signal's "source" string | ||
1787 | * | ||
1788 | * This function sends a signal to the object @a obj. An Edje program, | ||
1789 | * at @p obj's EDC specification level, can respond to a signal by | ||
1790 | * having declared matching @c 'signal' and @c 'source' fields on its | ||
1791 | * block (see @ref edcref "the syntax" for EDC files). | ||
1792 | * | ||
1793 | * As an example, | ||
1794 | * @code | ||
1795 | * edje_object_signal_emit(obj, "a_signal", ""); | ||
1796 | * @endcode | ||
1797 | * would trigger a program which had an EDC declaration block like | ||
1798 | * @code | ||
1799 | * program { | ||
1800 | * name: "a_program"; | ||
1801 | * signal: "a_signal"; | ||
1802 | * source: ""; | ||
1803 | * action: ... | ||
1804 | * } | ||
1805 | * @endcode | ||
1806 | * | ||
1807 | * @see edje_object_signal_callback_add() for more on Edje signals. | ||
1808 | */ | ||
1809 | EAPI void edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source); | ||
1810 | |||
1811 | /** | ||
1812 | * @brief Get extra data passed to callbacks. | ||
1813 | * | ||
1814 | * @return the extra data for that callback. | ||
1815 | * | ||
1816 | * Some callbacks pass extra information. This function gives access to that | ||
1817 | * extra information. It's somehow like event_info in smart callbacks. | ||
1818 | * | ||
1819 | * @see edje_object_signal_callback_add() for more on Edje signals. | ||
1820 | * @since 1.1.0 | ||
1821 | */ | ||
1822 | EAPI void * edje_object_signal_callback_extra_data_get(void); | ||
1823 | |||
1824 | /** | ||
1825 | * @brief Set the Edje object to playing or paused states. | ||
1826 | * | ||
1827 | * @param obj A handle to an Edje object. | ||
1828 | * @param play Object state (@c EINA_TRUE to playing, | ||
1829 | * @c EINA_FALSE to paused). | ||
1830 | * | ||
1831 | * This function sets the Edje object @a obj to playing or paused | ||
1832 | * states, depending on the parameter @a play. This has no effect if | ||
1833 | * the object was already at that state. | ||
1834 | * | ||
1835 | * @see edje_object_play_get(). | ||
1836 | * | ||
1837 | */ | ||
1838 | EAPI void edje_object_play_set (Evas_Object *obj, Eina_Bool play); | ||
1839 | |||
1840 | /** | ||
1841 | * @brief Get the Edje object's state. | ||
1842 | * | ||
1843 | * @param obj A handle to an Edje object. | ||
1844 | * @return @c EINA_FALSE if the object is not connected, its @c delete_me flag | ||
1845 | * is set, or it is at paused state; @c EINA_TRUE if the object is at playing | ||
1846 | * state. | ||
1847 | * | ||
1848 | * This function tells if an Edje object is playing or not. This state | ||
1849 | * is set by edje_object_play_set(). | ||
1850 | * | ||
1851 | * @see edje_object_play_set(). | ||
1852 | * | ||
1853 | */ | ||
1854 | EAPI Eina_Bool edje_object_play_get (const Evas_Object *obj); | ||
1855 | |||
1856 | /** | ||
1857 | * @brief Set the object's animation state. | ||
1858 | * | ||
1859 | * @param obj A handle to an Edje object. | ||
1860 | * @param on The animation state. @c EINA_TRUE to starts or | ||
1861 | * @c EINA_FALSE to stops. | ||
1862 | * | ||
1863 | * This function starts or stops an Edje object's animation. The | ||
1864 | * information if it's stopped can be retrieved by | ||
1865 | * edje_object_animation_get(). | ||
1866 | * | ||
1867 | * @see edje_object_animation_get() | ||
1868 | * | ||
1869 | */ | ||
1870 | EAPI void edje_object_animation_set (Evas_Object *obj, Eina_Bool on); | ||
1871 | |||
1872 | /** | ||
1873 | * @brief Get the Edje object's animation state. | ||
1874 | * | ||
1875 | * @param obj A handle to an Edje object. | ||
1876 | * @return @c EINA_FALSE on error or if object is not animated; | ||
1877 | * @c EINA_TRUE if animated. | ||
1878 | * | ||
1879 | * This function returns if the animation is stopped or not. The | ||
1880 | * animation state is set by edje_object_animation_set(). | ||
1881 | * | ||
1882 | * @see edje_object_animation_set(). | ||
1883 | * | ||
1884 | */ | ||
1885 | EAPI Eina_Bool edje_object_animation_get (const Evas_Object *obj); | ||
1886 | |||
1887 | /** | ||
1888 | * @brief Freezes the Edje object. | ||
1889 | * | ||
1890 | * @param obj A handle to an Edje object. | ||
1891 | * @return The frozen state or 0 on Error | ||
1892 | * | ||
1893 | * This function puts all changes on hold. Successive freezes will | ||
1894 | * nest, requiring an equal number of thaws. | ||
1895 | * | ||
1896 | * @see edje_object_thaw() | ||
1897 | */ | ||
1898 | EAPI int edje_object_freeze (Evas_Object *obj); | ||
1899 | |||
1900 | /** | ||
1901 | * @brief Thaws the Edje object. | ||
1902 | * | ||
1903 | * @param obj A handle to an Edje object. | ||
1904 | * @return The frozen state or 0 if the object is not frozen or on error. | ||
1905 | * | ||
1906 | * This function thaws the given Edje object. | ||
1907 | * | ||
1908 | * @note: If sucessives freezes were done, an equal number of | ||
1909 | * thaws will be required. | ||
1910 | * | ||
1911 | * @see edje_object_freeze() | ||
1912 | */ | ||
1913 | EAPI int edje_object_thaw (Evas_Object *obj); | ||
1914 | |||
1915 | /** | ||
1916 | * @brief Sets the object color class. | ||
1917 | * | ||
1918 | * @param obj A valid Evas_Object handle | ||
1919 | * @param color_class | ||
1920 | * @param r Object Red value | ||
1921 | * @param g Object Green value | ||
1922 | * @param b Object Blue value | ||
1923 | * @param a Object Alpha value | ||
1924 | * @param r2 Outline Red value | ||
1925 | * @param g2 Outline Green value | ||
1926 | * @param b2 Outline Blue value | ||
1927 | * @param a2 Outline Alpha value | ||
1928 | * @param r3 Shadow Red value | ||
1929 | * @param g3 Shadow Green value | ||
1930 | * @param b3 Shadow Blue value | ||
1931 | * @param a3 Shadow Alpha value | ||
1932 | * | ||
1933 | * This function sets the color values for an object level color | ||
1934 | * class. This will cause all edje parts in the specified object that | ||
1935 | * have the specified color class to have their colors multiplied by | ||
1936 | * these values. | ||
1937 | * | ||
1938 | * The first color is the object, the second is the text outline, and | ||
1939 | * the third is the text shadow. (Note that the second two only apply | ||
1940 | * to text parts). | ||
1941 | * | ||
1942 | * Setting color emits a signal "color_class,set" with source being | ||
1943 | * the given color. | ||
1944 | * | ||
1945 | * @note unlike Evas, Edje colors are @b not pre-multiplied. That is, | ||
1946 | * half-transparent white is 255 255 255 128. | ||
1947 | */ | ||
1948 | EAPI Eina_Bool edje_object_color_class_set (Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3); | ||
1949 | |||
1950 | /** | ||
1951 | * @brief Gets the object color class. | ||
1952 | * | ||
1953 | * @param o A valid Evas_Object handle | ||
1954 | * @param color_class | ||
1955 | * @param r Object Red value | ||
1956 | * @param g Object Green value | ||
1957 | * @param b Object Blue value | ||
1958 | * @param a Object Alpha value | ||
1959 | * @param r2 Outline Red value | ||
1960 | * @param g2 Outline Green value | ||
1961 | * @param b2 Outline Blue value | ||
1962 | * @param a2 Outline Alpha value | ||
1963 | * @param r3 Shadow Red value | ||
1964 | * @param g3 Shadow Green value | ||
1965 | * @param b3 Shadow Blue value | ||
1966 | * @param a3 Shadow Alpha value | ||
1967 | * | ||
1968 | * @return EINA_TRUE if found or EINA_FALSE if not found and all | ||
1969 | * values are zeroed. | ||
1970 | * | ||
1971 | * This function gets the color values for an object level color | ||
1972 | * class. If no explicit object color is set, then global values will | ||
1973 | * be used. | ||
1974 | * | ||
1975 | * The first color is the object, the second is the text outline, and | ||
1976 | * the third is the text shadow. (Note that the second two only apply | ||
1977 | * to text parts). | ||
1978 | * | ||
1979 | * @note unlike Evas, Edje colors are @b not pre-multiplied. That is, | ||
1980 | * half-transparent white is 255 255 255 128. | ||
1981 | */ | ||
1982 | EAPI Eina_Bool edje_object_color_class_get (const Evas_Object *o, const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3); | ||
1983 | |||
1984 | /** | ||
1985 | * @brief Delete the object color class. | ||
1986 | * | ||
1987 | * @param obj The edje object's reference. | ||
1988 | * @param color_class The color class to be deleted. | ||
1989 | * | ||
1990 | * This function deletes any values at the object level for the | ||
1991 | * specified object and color class. | ||
1992 | * @note Deleting the color class will revert it to the values | ||
1993 | * defined by edje_color_class_set() or the color class | ||
1994 | * defined in the theme file. | ||
1995 | * | ||
1996 | * Deleting the color class will emit the signal "color_class,del" | ||
1997 | * for the given Edje object. | ||
1998 | */ | ||
1999 | EAPI void edje_object_color_class_del (Evas_Object *obj, const char *color_class); | ||
2000 | |||
2001 | /** | ||
2002 | * @brief Sets Edje text class. | ||
2003 | * | ||
2004 | * @param obj A valid Evas_Object handle | ||
2005 | * @param text_class The text class name | ||
2006 | * @param font Font name | ||
2007 | * @param size Font Size | ||
2008 | * | ||
2009 | * @return @c EINA_TRUE, on success or @c EINA_FALSE, on error | ||
2010 | * | ||
2011 | * This function sets the text class for the Edje. | ||
2012 | * | ||
2013 | */ | ||
2014 | EAPI Eina_Bool edje_object_text_class_set (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size); | ||
2015 | |||
2016 | /** | ||
2017 | * @brief Get the minimum size specified -- as an EDC property -- for a | ||
2018 | * given Edje object | ||
2019 | * | ||
2020 | * @param obj A handle to an Edje object | ||
2021 | * @param minw Pointer to a variable where to store the minimum width | ||
2022 | * @param minh Pointer to a variable where to store the minimum height | ||
2023 | * | ||
2024 | * This function retrieves the @p obj object's minimum size values, | ||
2025 | * <b>as declared in its EDC group definition</b>. Minimum size of | ||
2026 | * groups have the following syntax | ||
2027 | * @code | ||
2028 | * collections { | ||
2029 | * group { | ||
2030 | * name: "a_group"; | ||
2031 | * min: 100 100; | ||
2032 | * } | ||
2033 | * } | ||
2034 | * @endcode | ||
2035 | * | ||
2036 | * where one declares a minimum size of 100 pixels both for width and | ||
2037 | * height. Those are (hint) values which should be respected when the | ||
2038 | * given object/group is to be controlled by a given container object | ||
2039 | * (e.g. an Edje object being "swallowed" into a given @c SWALLOW | ||
2040 | * typed part, as in edje_object_part_swallow()). Check the complete | ||
2041 | * @ref edcref "syntax reference" for EDC files. | ||
2042 | * | ||
2043 | * @note If the @c min EDC property was not declared for @p obj, this | ||
2044 | * call will return the value 0, for each axis. | ||
2045 | * | ||
2046 | * @note On failure, this function will make all non-@c NULL size | ||
2047 | * pointers' pointed variables be set to zero. | ||
2048 | * | ||
2049 | * @see edje_object_size_max_get() | ||
2050 | */ | ||
2051 | EAPI void edje_object_size_min_get (const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh); | ||
2052 | |||
2053 | /** | ||
2054 | * @brief Edje will automatically update the size hints on itself. | ||
2055 | * | ||
2056 | * @param obj A handle to an Edje object. | ||
2057 | * @param update Wether or not update the size hints. | ||
2058 | * | ||
2059 | * By default edje doesn't set size hints on itself. With this function | ||
2060 | * call, it will do so if update is true. Be carefully, it cost a lot to | ||
2061 | * trigger this feature as it will recalc the object every time it make | ||
2062 | * sense to be sure that's its minimal size hint is always accurate. | ||
2063 | */ | ||
2064 | EAPI void edje_object_update_hints_set(Evas_Object *obj, Eina_Bool update); | ||
2065 | |||
2066 | /** | ||
2067 | * @brief Wether or not Edje will update size hints on itself. | ||
2068 | * | ||
2069 | * @param obj A handle to an Edje object. | ||
2070 | * @return @c true if does, @c false if it doesn't. | ||
2071 | */ | ||
2072 | EAPI Eina_Bool edje_object_update_hints_get(Evas_Object *obj); | ||
2073 | |||
2074 | /** | ||
2075 | * @brief Get the maximum size specified -- as an EDC property -- for a | ||
2076 | * given Edje object | ||
2077 | * | ||
2078 | * @param obj A handle to an Edje object | ||
2079 | * @param maxw Pointer to a variable where to store the maximum width | ||
2080 | * @param maxh Pointer to a variable where to store the maximum height | ||
2081 | * | ||
2082 | * This function retrieves the @p obj object's maximum size values, | ||
2083 | * <b>as declared in its EDC group definition</b>. Maximum size of | ||
2084 | * groups have the following syntax | ||
2085 | * @code | ||
2086 | * collections { | ||
2087 | * group { | ||
2088 | * name: "a_group"; | ||
2089 | * max: 100 100; | ||
2090 | * } | ||
2091 | * } | ||
2092 | * @endcode | ||
2093 | * | ||
2094 | * where one declares a maximum size of 100 pixels both for width and | ||
2095 | * height. Those are (hint) values which should be respected when the | ||
2096 | * given object/group is to be controlled by a given container object | ||
2097 | * (e.g. an Edje object being "swallowed" into a given @c SWALLOW | ||
2098 | * typed part, as in edje_object_part_swallow()). Check the complete | ||
2099 | * @ref edcref "syntax reference" for EDC files. | ||
2100 | * | ||
2101 | * @note If the @c max EDC property was not declared for @p obj, this | ||
2102 | * call will return the maximum size a given Edje object may have, for | ||
2103 | * each axis. | ||
2104 | * | ||
2105 | * @note On failure, this function will make all non-@c NULL size | ||
2106 | * pointers' pointed variables be set to zero. | ||
2107 | * | ||
2108 | * @see edje_object_size_min_get() | ||
2109 | */ | ||
2110 | EAPI void edje_object_size_max_get (const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh); | ||
2111 | |||
2112 | /** | ||
2113 | * @brief Force a Size/Geometry calculation. | ||
2114 | * | ||
2115 | * @param obj A valid Evas_Object handle | ||
2116 | * | ||
2117 | * Forces the object @p obj to recalculation layout regardless of | ||
2118 | * freeze/thaw. | ||
2119 | */ | ||
2120 | EAPI void edje_object_calc_force (Evas_Object *obj); | ||
2121 | |||
2122 | /** | ||
2123 | * @brief Calculate the minimum required size for a given Edje object. | ||
2124 | * | ||
2125 | * @param obj A handle to an Edje object | ||
2126 | * @param minw Pointer to a variable where to store the minimum | ||
2127 | * required width | ||
2128 | * @param minh Pointer to a variable where to store the minimum | ||
2129 | * required height | ||
2130 | * | ||
2131 | * This call works exactly as edje_object_size_min_restricted_calc(), | ||
2132 | * with the last two arguments set to 0. Please refer to its | ||
2133 | * documentation, then. | ||
2134 | */ | ||
2135 | EAPI void edje_object_size_min_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh); | ||
2136 | |||
2137 | /** | ||
2138 | * Calculate the geometry of the region, relative to a given Edje | ||
2139 | * object's area, <b>occupied by all parts in the object</b> | ||
2140 | * | ||
2141 | * @param obj A handle to an Edje object | ||
2142 | * @param part The Edje part's name | ||
2143 | * @param x A pointer to a variable where to store the parts region's | ||
2144 | * x coordinate | ||
2145 | * @param y A pointer to a variable where to store the parts region's | ||
2146 | * y coordinate | ||
2147 | * @param w A pointer to a variable where to store the parts region's | ||
2148 | * width | ||
2149 | * @param h A pointer to a variable where to store the parts region's | ||
2150 | * height | ||
2151 | * | ||
2152 | * This function gets the geometry of the rectangle equal to the area | ||
2153 | * required to group all parts in @p obj's group/collection. The @p x | ||
2154 | * and @p y coordinates are relative to the top left corner of the | ||
2155 | * whole @p obj object's area. Parts placed out of the group's | ||
2156 | * boundaries will also be taken in account, so that @p x and @p y | ||
2157 | * <b>may be negative</b>. | ||
2158 | * | ||
2159 | * @note Use @c NULL pointers on the geometry components you're not | ||
2160 | * interested in: they'll be ignored by the function. | ||
2161 | * | ||
2162 | * @note On failure, this function will make all non-@c NULL geometry | ||
2163 | * pointers' pointed variables be set to zero. | ||
2164 | */ | ||
2165 | EAPI Eina_Bool edje_object_parts_extends_calc (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); | ||
2166 | |||
2167 | /** | ||
2168 | * @brief Calculate the minimum required size for a given Edje object. | ||
2169 | * | ||
2170 | * @param obj A handle to an Edje object | ||
2171 | * @param minw Pointer to a variable where to store the minimum | ||
2172 | * required width | ||
2173 | * @param minh Pointer to a variable where to store the minimum | ||
2174 | * required height | ||
2175 | * @param restrictedw Do not allow object's calculated (minimum) width | ||
2176 | * to be less than this value | ||
2177 | * @param restrictedh Do not allow object's calculated (minimum) | ||
2178 | * height to be less than this value | ||
2179 | * | ||
2180 | * This call will trigger an internal recalculation of all parts of | ||
2181 | * the @p obj object, in order to return its minimum required | ||
2182 | * dimensions for width and height. The user might choose to @b impose | ||
2183 | * those minimum sizes, making the resulting calculation to get to values | ||
2184 | * equal or bigger than @p restrictedw and @p restrictedh, for width and | ||
2185 | * height, respectively. | ||
2186 | * | ||
2187 | * @note At the end of this call, @p obj @b won't be automatically | ||
2188 | * resized to new dimensions, but just return the calculated | ||
2189 | * sizes. The caller is the one up to change its geometry or not. | ||
2190 | * | ||
2191 | * @warning Be advised that invisible parts in @p obj @b will be taken | ||
2192 | * into account in this calculation. | ||
2193 | */ | ||
2194 | EAPI void edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh); | ||
2195 | |||
2196 | /** | ||
2197 | * @brief Check if an Edje part exists in a given Edje object's group | ||
2198 | * definition.. | ||
2199 | * | ||
2200 | * @param obj A handle to an Edje object | ||
2201 | * @param part The part's name to check for existence in @p obj's | ||
2202 | * group | ||
2203 | * @return @c EINA_TRUE, if the Edje part exists in @p obj's group or | ||
2204 | * @c EINA_FALSE, otherwise (and on errors) | ||
2205 | * | ||
2206 | * This function returns if a given part exists in the Edje group | ||
2207 | * bound to object @p obj (with edje_object_file_set()). | ||
2208 | * | ||
2209 | * This call is useful, for example, when one could expect or not a | ||
2210 | * given GUI element, depending on the @b theme applied to @p obj. | ||
2211 | */ | ||
2212 | EAPI Eina_Bool edje_object_part_exists (const Evas_Object *obj, const char *part); | ||
2213 | |||
2214 | /** | ||
2215 | * @brief Get a handle to the Evas object implementing a given Edje | ||
2216 | * part, in an Edje object. | ||
2217 | * | ||
2218 | * @param obj A handle to an Edje object | ||
2219 | * @param part The Edje part's name | ||
2220 | * @return A pointer to the Evas object implementing the given part, | ||
2221 | * or @c NULL on failure (e.g. the given part doesn't exist) | ||
2222 | * | ||
2223 | * This function gets a pointer of the Evas object corresponding to a | ||
2224 | * given part in the @p obj object's group. | ||
2225 | * | ||
2226 | * You should @b never modify the state of the returned object (with | ||
2227 | * @c evas_object_move() or @c evas_object_hide() for example), | ||
2228 | * because it's meant to be managed by Edje, solely. You are safe to | ||
2229 | * query information about its current state (with @c | ||
2230 | * evas_object_visible_get() or @c evas_object_color_get() for | ||
2231 | * example), though. | ||
2232 | */ | ||
2233 | EAPI const Evas_Object *edje_object_part_object_get (const Evas_Object *obj, const char *part); | ||
2234 | |||
2235 | /** | ||
2236 | * @brief Retrieve the geometry of a given Edje part, in a given Edje | ||
2237 | * object's group definition, <b>relative to the object's area</b> | ||
2238 | * | ||
2239 | * @param obj A handle to an Edje object | ||
2240 | * @param part The Edje part's name | ||
2241 | * @param x A pointer to a variable where to store the part's x | ||
2242 | * coordinate | ||
2243 | * @param y A pointer to a variable where to store the part's y | ||
2244 | * coordinate | ||
2245 | * @param w A pointer to a variable where to store the part's width | ||
2246 | * @param h A pointer to a variable where to store the part's height | ||
2247 | * | ||
2248 | * This function gets the geometry of an Edje part within its | ||
2249 | * group. The @p x and @p y coordinates are relative to the top left | ||
2250 | * corner of the whole @p obj object's area. | ||
2251 | * | ||
2252 | * @note Use @c NULL pointers on the geometry components you're not | ||
2253 | * interested in: they'll be ignored by the function. | ||
2254 | * | ||
2255 | * @note On failure, this function will make all non-@c NULL geometry | ||
2256 | * pointers' pointed variables be set to zero. | ||
2257 | */ | ||
2258 | EAPI Eina_Bool edje_object_part_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); | ||
2259 | |||
2260 | |||
2261 | /** | ||
2262 | * @brief Set the function that provides item objects for named items in an edje entry text | ||
2263 | * | ||
2264 | * @param obj A valid Evas Object handle | ||
2265 | * @param func The function to call (or NULL to disable) to get item objects | ||
2266 | * @param data The data pointer to pass to the @p func callback | ||
2267 | * | ||
2268 | * Item objects may be deleted any time by Edje, and will be deleted when the | ||
2269 | * Edje object is deleted (or file is set to a new file). | ||
2270 | */ | ||
2271 | EAPI void edje_object_item_provider_set (Evas_Object *obj, Edje_Item_Provider_Cb func, void *data); | ||
2272 | |||
2273 | |||
2274 | /** | ||
2275 | * @brief Set the object text callback. | ||
2276 | * | ||
2277 | * @param obj A valid Evas_Object handle | ||
2278 | * @param func The callback function to handle the text change | ||
2279 | * @param data The data associated to the callback function. | ||
2280 | * | ||
2281 | * This function sets the callback to be called when the text changes. | ||
2282 | */ | ||
2283 | EAPI void edje_object_text_change_cb_set (Evas_Object *obj, Edje_Text_Change_Cb func, void *data); | ||
2284 | |||
2285 | /** | ||
2286 | * @brief Sets the text for an object part | ||
2287 | * | ||
2288 | * @param obj A valid Evas Object handle | ||
2289 | * @param part The part name | ||
2290 | * @param text The text string | ||
2291 | */ | ||
2292 | EAPI Eina_Bool edje_object_part_text_set (Evas_Object *obj, const char *part, const char *text); | ||
2293 | |||
2294 | /** | ||
2295 | * @brief Return the text of the object part. | ||
2296 | * | ||
2297 | * @param obj A valid Evas_Object handle | ||
2298 | * @param part The part name | ||
2299 | * | ||
2300 | * @return The text string | ||
2301 | * | ||
2302 | * This function returns the text associated to the object part. | ||
2303 | * | ||
2304 | * @see edje_object_part_text_set(). | ||
2305 | */ | ||
2306 | EAPI const char *edje_object_part_text_get (const Evas_Object *obj, const char *part); | ||
2307 | |||
2308 | /** | ||
2309 | * @brief Set the style of the | ||
2310 | * | ||
2311 | * @param obj A valid Evas_Object handle | ||
2312 | * @param part The part name | ||
2313 | * @param style The style to set (textblock conventions). | ||
2314 | * | ||
2315 | * This function sets the style associated with the textblock part. | ||
2316 | * | ||
2317 | * @since 1.2.0 | ||
2318 | */ | ||
2319 | EAPI void edje_object_part_text_style_user_push(Evas_Object *obj, const char *part, const char *style); | ||
2320 | |||
2321 | /** | ||
2322 | * @brief Return the text of the object part. | ||
2323 | * | ||
2324 | * @param obj A valid Evas_Object handle | ||
2325 | * @param part The part name | ||
2326 | * | ||
2327 | * @return The text string | ||
2328 | * | ||
2329 | * This function returns the style associated with the textblock part. | ||
2330 | * | ||
2331 | * @since 1.2.0 | ||
2332 | */ | ||
2333 | EAPI const char *edje_object_part_text_style_user_peek(const Evas_Object *obj, const char *part); | ||
2334 | |||
2335 | /** | ||
2336 | * @brief Delete the top style form the user style stack. | ||
2337 | * | ||
2338 | * @param obj A valid Evas_Object handle | ||
2339 | * @param part The part name | ||
2340 | * | ||
2341 | * @since 1.2.0 | ||
2342 | */ | ||
2343 | EAPI void edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part); | ||
2344 | |||
2345 | /** | ||
2346 | * @brief Sets the raw (non escaped) text for an object part. | ||
2347 | * | ||
2348 | * @param obj A valid Evas Object handle | ||
2349 | * @param part The part name | ||
2350 | * @param text_to_escape The text string | ||
2351 | * | ||
2352 | * This funciton will not do escape for you if it is a TEXTBLOCK part, that is, | ||
2353 | * if text contain tags, these tags will not be interpreted/parsed by TEXTBLOCK. | ||
2354 | * | ||
2355 | * @see edje_object_part_text_unescaped_get(). | ||
2356 | */ | ||
2357 | EAPI Eina_Bool edje_object_part_text_unescaped_set (Evas_Object *obj, const char *part, const char *text_to_escape); | ||
2358 | |||
2359 | /** | ||
2360 | * @brief Returns the text of the object part, without escaping. | ||
2361 | * | ||
2362 | * @param obj A valid Evas_Object handle | ||
2363 | * @param part The part name | ||
2364 | * @return The @b allocated text string without escaping, or NULL on | ||
2365 | * problems. | ||
2366 | * | ||
2367 | * This function is the counterpart of | ||
2368 | * edje_object_part_text_unescaped_set(). Please notice that the | ||
2369 | * result is newly allocated memory and should be released with free() | ||
2370 | * when done. | ||
2371 | * | ||
2372 | * @see edje_object_part_text_unescaped_set(). | ||
2373 | */ | ||
2374 | EAPI char *edje_object_part_text_unescaped_get (const Evas_Object *obj, const char *part); | ||
2375 | |||
2376 | /** | ||
2377 | * @brief Return the selection text of the object part. | ||
2378 | * | ||
2379 | * @param obj A valid Evas_Object handle | ||
2380 | * @param part The part name | ||
2381 | * @return The text string | ||
2382 | * | ||
2383 | * This function returns selection text of the object part. | ||
2384 | * | ||
2385 | * @see edje_object_part_text_select_all() | ||
2386 | * @see edje_object_part_text_select_none() | ||
2387 | */ | ||
2388 | EAPI const char *edje_object_part_text_selection_get (const Evas_Object *obj, const char *part); | ||
2389 | |||
2390 | /** | ||
2391 | * @brief Set the selection to be none. | ||
2392 | * | ||
2393 | * @param obj A valid Evas_Object handle | ||
2394 | * @param part The part name | ||
2395 | * | ||
2396 | * This function sets the selection text to be none. | ||
2397 | */ | ||
2398 | EAPI void edje_object_part_text_select_none (const Evas_Object *obj, const char *part); | ||
2399 | |||
2400 | /** | ||
2401 | * @brief Set the selection to be everything. | ||
2402 | * | ||
2403 | * @param obj A valid Evas_Object handle | ||
2404 | * @param part The part name | ||
2405 | * | ||
2406 | * This function selects all text of the object of the part. | ||
2407 | */ | ||
2408 | EAPI void edje_object_part_text_select_all (const Evas_Object *obj, const char *part); | ||
2409 | |||
2410 | /** | ||
2411 | * @brief Insert text for an object part. | ||
2412 | * | ||
2413 | * @param obj A valid Evas Object handle | ||
2414 | * @param part The part name | ||
2415 | * @param text The text string | ||
2416 | * | ||
2417 | * This function inserts the text for an object part just before the | ||
2418 | * cursor position. | ||
2419 | * | ||
2420 | */ | ||
2421 | EAPI void edje_object_part_text_insert (Evas_Object *obj, const char *part, const char *text); | ||
2422 | |||
2423 | /** | ||
2424 | * @brief Insert text for an object part. | ||
2425 | * | ||
2426 | * @param obj A valid Evas Object handle | ||
2427 | * @param part The part name | ||
2428 | * @param text The text string | ||
2429 | * | ||
2430 | * This function inserts the text for an object part at the end; It does not | ||
2431 | * move the cursor. | ||
2432 | * | ||
2433 | * @since 1.1 | ||
2434 | */ | ||
2435 | EAPI void edje_object_part_text_append(Evas_Object *obj, const char *part, const char *text); | ||
2436 | |||
2437 | /** | ||
2438 | * @brief Return a list of char anchor names. | ||
2439 | * | ||
2440 | * @param obj A valid Evas_Object handle | ||
2441 | * @param part The part name | ||
2442 | * | ||
2443 | * @return The list of anchors (const char *), do not modify! | ||
2444 | * | ||
2445 | * This function returns a list of char anchor names. | ||
2446 | * | ||
2447 | */ | ||
2448 | EAPI const Eina_List *edje_object_part_text_anchor_list_get (const Evas_Object *obj, const char *part); | ||
2449 | |||
2450 | /** | ||
2451 | * @brief Return a list of Evas_Textblock_Rectangle anchor rectangles. | ||
2452 | * | ||
2453 | * @param obj A valid Evas_Object handle | ||
2454 | * @param part The part name | ||
2455 | * @param anchor The anchor name | ||
2456 | * | ||
2457 | * @return The list of anchor rects (const Evas_Textblock_Rectangle | ||
2458 | * *), do not modify! Geometry is relative to entry part. | ||
2459 | * | ||
2460 | * This function return a list of Evas_Textblock_Rectangle anchor | ||
2461 | * rectangles. | ||
2462 | * | ||
2463 | */ | ||
2464 | EAPI const Eina_List *edje_object_part_text_anchor_geometry_get (const Evas_Object *obj, const char *part, const char *anchor); | ||
2465 | |||
2466 | /** | ||
2467 | * @brief Return a list of char item names. | ||
2468 | * | ||
2469 | * @param obj A valid Evas_Object handle | ||
2470 | * @param part The part name | ||
2471 | * | ||
2472 | * @return The list of items (const char *), do not modify! | ||
2473 | * | ||
2474 | * This function returns a list of char item names. | ||
2475 | * | ||
2476 | */ | ||
2477 | EAPI const Eina_List *edje_object_part_text_item_list_get (const Evas_Object *obj, const char *part); | ||
2478 | |||
2479 | /** | ||
2480 | * @brief Return item geometry. | ||
2481 | * | ||
2482 | * @param obj A valid Evas_Object handle | ||
2483 | * @param part The part name | ||
2484 | * @param item The item name | ||
2485 | * @param cx Item x return (relative to entry part) | ||
2486 | * @param cy Item y return (relative to entry part) | ||
2487 | * @param cw Item width return | ||
2488 | * @param ch Item height return | ||
2489 | * | ||
2490 | * @return 1 if item exists, 0 if not | ||
2491 | * | ||
2492 | * This function return a list of Evas_Textblock_Rectangle item | ||
2493 | * rectangles. | ||
2494 | * | ||
2495 | */ | ||
2496 | EAPI Eina_Bool edje_object_part_text_item_geometry_get (const Evas_Object *obj, const char *part, const char *item, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch); | ||
2497 | |||
2498 | /** | ||
2499 | * @brief Returns the cursor geometry of the part relative to the edje | ||
2500 | * object. | ||
2501 | * | ||
2502 | * @param obj A valid Evas_Object handle | ||
2503 | * @param part The part name | ||
2504 | * @param x Cursor X position | ||
2505 | * @param y Cursor Y position | ||
2506 | * @param w Cursor width | ||
2507 | * @param h Cursor height | ||
2508 | * | ||
2509 | */ | ||
2510 | EAPI void edje_object_part_text_cursor_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); | ||
2511 | |||
2512 | /** | ||
2513 | * @brief Deletes the selection and emits a change event. | ||
2514 | * | ||
2515 | * @param obj A valid Evas_Object handle | ||
2516 | * @param part The part name | ||
2517 | * @since 1.2.0 | ||
2518 | */ | ||
2519 | EAPI void edje_object_part_text_user_insert (const Evas_Object *obj, const char *part, const char *text); | ||
2520 | |||
2521 | /** | ||
2522 | * @brief Enables selection if the entry is an EXPLICIT selection mode | ||
2523 | * type. | ||
2524 | * | ||
2525 | * @param obj A valid Evas_Object handle | ||
2526 | * @param part The part name | ||
2527 | * @param allow EINA_TRUE to enable, EINA_FALSE otherwise | ||
2528 | * | ||
2529 | * The default is to @b not allow selection. This function only affects user | ||
2530 | * selection, functions such as edje_object_part_text_select_all() and | ||
2531 | * edje_object_part_text_select_none() are not affected. | ||
2532 | */ | ||
2533 | EAPI void edje_object_part_text_select_allow_set (const Evas_Object *obj, const char *part, Eina_Bool allow); | ||
2534 | |||
2535 | /** | ||
2536 | * @brief Aborts any selection action on a part. | ||
2537 | * | ||
2538 | * @param obj A valid Evas_Object handle | ||
2539 | * @param part The part name | ||
2540 | */ | ||
2541 | EAPI void edje_object_part_text_select_abort (const Evas_Object *obj, const char *part); | ||
2542 | |||
2543 | /** | ||
2544 | * @brief Starts selecting at current cursor position | ||
2545 | * | ||
2546 | * @param obj A valid Evas_Object handle | ||
2547 | * @param part The part name | ||
2548 | */ | ||
2549 | EAPI void edje_object_part_text_select_begin (const Evas_Object *obj, const char *part); | ||
2550 | |||
2551 | /** | ||
2552 | * @brief Extends the current selection to the current cursor position | ||
2553 | * | ||
2554 | * @param obj A valid Evas_Object handle | ||
2555 | * @param part The part name | ||
2556 | */ | ||
2557 | EAPI void edje_object_part_text_select_extend (const Evas_Object *obj, const char *part); | ||
2558 | |||
2559 | |||
2560 | /** | ||
2561 | * @brief Advances the cursor to the next cursor position. | ||
2562 | * @see evas_textblock_cursor_char_next | ||
2563 | * | ||
2564 | * @param obj A valid Evas_Object handle | ||
2565 | * @param part The part name | ||
2566 | * @param cur The edje cursor to advance | ||
2567 | */ | ||
2568 | EAPI Eina_Bool edje_object_part_text_cursor_next (Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2569 | |||
2570 | /** | ||
2571 | * @brief Moves the cursor to the previous char | ||
2572 | * @see evas_textblock_cursor_char_prev | ||
2573 | * | ||
2574 | * @param obj A valid Evas_Object handle | ||
2575 | * @param part The part name | ||
2576 | * @param cur the edje cursor to work on | ||
2577 | */ | ||
2578 | EAPI Eina_Bool edje_object_part_text_cursor_prev (Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2579 | |||
2580 | /** | ||
2581 | * @brief Move the cursor to the char above the current cursor position. | ||
2582 | * | ||
2583 | * @param obj A valid Evas_Object handle | ||
2584 | * @param part The part name | ||
2585 | * @param cur the edje cursor to work on | ||
2586 | */ | ||
2587 | EAPI Eina_Bool edje_object_part_text_cursor_up (Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2588 | |||
2589 | /** | ||
2590 | * @brief Moves the cursor to the char below the current cursor position. | ||
2591 | * | ||
2592 | * @param obj A valid Evas_Object handle | ||
2593 | * @param part The part name | ||
2594 | * @param cur the edje cursor to work on | ||
2595 | */ | ||
2596 | EAPI Eina_Bool edje_object_part_text_cursor_down (Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2597 | |||
2598 | /** | ||
2599 | * @brief Moves the cursor to the beginning of the text part | ||
2600 | * @see evas_textblock_cursor_paragraph_first | ||
2601 | * | ||
2602 | * @param obj A valid Evas_Object handle | ||
2603 | * @param part The part name | ||
2604 | * @param cur the edje cursor to work on | ||
2605 | */ | ||
2606 | EAPI void edje_object_part_text_cursor_begin_set (Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2607 | |||
2608 | /** | ||
2609 | * @brief Moves the cursor to the end of the text part. | ||
2610 | * @see evas_textblock_cursor_paragraph_last | ||
2611 | * | ||
2612 | * @param obj A valid Evas_Object handle | ||
2613 | * @param part The part name | ||
2614 | * @param cur the edje cursor to work on | ||
2615 | */ | ||
2616 | EAPI void edje_object_part_text_cursor_end_set (Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2617 | |||
2618 | /** | ||
2619 | * @brief Copy the cursor to another cursor. | ||
2620 | * | ||
2621 | * @param obj A valid Evas_Object handle | ||
2622 | * @param part The part name | ||
2623 | * @param sry the cursor to copy from | ||
2624 | * @param dst the cursor to copy to | ||
2625 | */ | ||
2626 | EAPI void edje_object_part_text_cursor_copy (Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst); | ||
2627 | |||
2628 | /** | ||
2629 | * @brief Move the cursor to the beginning of the line. | ||
2630 | * @see evas_textblock_cursor_line_char_first | ||
2631 | * | ||
2632 | * @param obj A valid Evas_Object handle | ||
2633 | * @param part The part name | ||
2634 | * @param cur the edje cursor to work on | ||
2635 | */ | ||
2636 | EAPI void edje_object_part_text_cursor_line_begin_set (Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2637 | |||
2638 | /** | ||
2639 | * @brief Move the cursor to the end of the line. | ||
2640 | * @see evas_textblock_cursor_line_char_last | ||
2641 | * | ||
2642 | * @param obj A valid Evas_Object handle | ||
2643 | * @param part The part name | ||
2644 | * @param cur the edje cursor to work on | ||
2645 | */ | ||
2646 | EAPI void edje_object_part_text_cursor_line_end_set (Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2647 | |||
2648 | /** | ||
2649 | * Position the given cursor to a X,Y position. | ||
2650 | * | ||
2651 | * This is frequently used with the user cursor. | ||
2652 | * | ||
2653 | * @param obj An Edje object. | ||
2654 | * @param part The part containing the object. | ||
2655 | * @param cur The cursor to adjust. | ||
2656 | * @param x X Coordinate. | ||
2657 | * @param y Y Coordinate. | ||
2658 | * @return True on success, false on error. | ||
2659 | */ | ||
2660 | EAPI Eina_Bool edje_object_part_text_cursor_coord_set (Evas_Object *obj, const char *part, Edje_Cursor cur, Evas_Coord x, Evas_Coord y); | ||
2661 | |||
2662 | /** | ||
2663 | * @brief Returns whether the cursor points to a format. | ||
2664 | * @see evas_textblock_cursor_is_format | ||
2665 | * | ||
2666 | * @param obj A valid Evas_Object handle | ||
2667 | * @param part The part name | ||
2668 | * @param cur The cursor to adjust. | ||
2669 | * @return EINA_TRUE if it's true, EINA_FALSE otherwise. | ||
2670 | */ | ||
2671 | EAPI Eina_Bool edje_object_part_text_cursor_is_format_get (const Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2672 | |||
2673 | /** | ||
2674 | * @brief Return true if the cursor points to a visible format | ||
2675 | * For example \t, \n, item and etc. | ||
2676 | * @see evas_textblock_cursor_format_is_visible_get | ||
2677 | * | ||
2678 | * @param obj A valid Evas_Object handle | ||
2679 | * @param part The part name | ||
2680 | * @param cur The cursor to adjust. | ||
2681 | */ | ||
2682 | EAPI Eina_Bool edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2683 | |||
2684 | /** | ||
2685 | * @brief Returns the content (char) at the cursor position. | ||
2686 | * @see evas_textblock_cursor_content_get | ||
2687 | * | ||
2688 | * You must free the return (if not NULL) after you are done with it. | ||
2689 | * | ||
2690 | * @param obj A valid Evas_Object handle | ||
2691 | * @param part The part name | ||
2692 | * @param cur The cursor to use | ||
2693 | * @return The character string pointed to (may be a multi-byte utf8 sequence) terminated by a nul byte. | ||
2694 | */ | ||
2695 | EAPI char *edje_object_part_text_cursor_content_get (const Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2696 | |||
2697 | /** | ||
2698 | * @brief Sets the cursor position to the given value | ||
2699 | * | ||
2700 | * @param obj A valid Evas_Object handle | ||
2701 | * @param part The part name | ||
2702 | * @param cur The cursor to move | ||
2703 | * @param pos the position of the cursor | ||
2704 | * @since 1.1.0 | ||
2705 | */ | ||
2706 | EAPI void edje_object_part_text_cursor_pos_set (Evas_Object *obj, const char *part, Edje_Cursor cur, int pos); | ||
2707 | |||
2708 | /** | ||
2709 | * @brief Retrieves the current position of the cursor | ||
2710 | * | ||
2711 | * @param obj A valid Evas_Object handle | ||
2712 | * @param part The part name | ||
2713 | * @param cur The cursor to get the position | ||
2714 | * @return The cursor position | ||
2715 | * @since 1.1.0 | ||
2716 | */ | ||
2717 | EAPI int edje_object_part_text_cursor_pos_get (const Evas_Object *obj, const char *part, Edje_Cursor cur); | ||
2718 | |||
2719 | /** | ||
2720 | * @brief Reset the input method context if needed. | ||
2721 | * | ||
2722 | * This can be necessary in the case where modifying the buffer would confuse on-going input method behavior | ||
2723 | * | ||
2724 | * @param obj A valid Evas_Object handle | ||
2725 | * @param part The part name | ||
2726 | * @since 1.2.0 | ||
2727 | */ | ||
2728 | EAPI void edje_object_part_text_imf_context_reset (const Evas_Object *obj, const char *part); | ||
2729 | |||
2730 | /** | ||
2731 | * @brief Get the input method context in entry. | ||
2732 | * | ||
2733 | * If ecore_imf was not available when edje was compiled, this function returns NULL | ||
2734 | * otherwise, the returned pointer is an Ecore_IMF * | ||
2735 | * | ||
2736 | * @param obj A valid Evas_Object handle | ||
2737 | * @param part The part name | ||
2738 | * | ||
2739 | * @return The input method context (Ecore_IMF_Context *) in entry | ||
2740 | * @since 1.2.0 | ||
2741 | */ | ||
2742 | EAPI void *edje_object_part_text_imf_context_get (const Evas_Object *obj, const char *part); | ||
2743 | |||
2744 | /** | ||
2745 | * @brief Set the layout of the input panel. | ||
2746 | * | ||
2747 | * The layout of the input panel or virtual keyboard can make it easier or | ||
2748 | * harder to enter content. This allows you to hint what kind of input you | ||
2749 | * are expecting to enter and thus have the input panel automatically | ||
2750 | * come up with the right mode. | ||
2751 | * | ||
2752 | * @param obj A valid Evas_Object handle | ||
2753 | * @param part The part name | ||
2754 | * @param layout layout type | ||
2755 | * @since 1.1 | ||
2756 | */ | ||
2757 | EAPI void edje_object_part_text_input_panel_layout_set (Evas_Object *obj, const char *part, Edje_Input_Panel_Layout layout); | ||
2758 | |||
2759 | /** | ||
2760 | * @brief Get the layout of the input panel. | ||
2761 | * | ||
2762 | * @param obj A valid Evas_Object handle | ||
2763 | * @param part The part name | ||
2764 | * | ||
2765 | * @return Layout type of the input panel | ||
2766 | * | ||
2767 | * @see edje_object_part_text_input_panel_layout_set | ||
2768 | * @since 1.1 | ||
2769 | */ | ||
2770 | EAPI Edje_Input_Panel_Layout edje_object_part_text_input_panel_layout_get (const Evas_Object *obj, const char *part); | ||
2771 | |||
2772 | /** | ||
2773 | * @brief Set the autocapitalization type on the immodule. | ||
2774 | * | ||
2775 | * @param obj A valid Evas_Object handle | ||
2776 | * @param part The part name | ||
2777 | * @param autocapital_type The type of autocapitalization | ||
2778 | * @since 1.1.0 | ||
2779 | */ | ||
2780 | EAPI void edje_object_part_text_autocapital_type_set (Evas_Object *obj, const char *part, Edje_Text_Autocapital_Type autocapital_type); | ||
2781 | |||
2782 | /** | ||
2783 | * @brief Retrieves the autocapitalization type | ||
2784 | * | ||
2785 | * @param obj A valid Evas_Object handle | ||
2786 | * @param part The part name | ||
2787 | * @return The autocapitalization type | ||
2788 | * @since 1.1.0 | ||
2789 | */ | ||
2790 | EAPI Edje_Text_Autocapital_Type edje_object_part_text_autocapital_type_get (const Evas_Object *obj, const char *part); | ||
2791 | |||
2792 | /** | ||
2793 | * @brief Set whether the prediction is allowed or not. | ||
2794 | * | ||
2795 | * @param obj A valid Evas_Object handle | ||
2796 | * @param part The part name | ||
2797 | * @param prediction If true, the prediction feature is allowed. | ||
2798 | * @since 1.2.0 | ||
2799 | */ | ||
2800 | EAPI void edje_object_part_text_prediction_allow_set (Evas_Object *obj, const char *part, Eina_Bool prediction); | ||
2801 | |||
2802 | /** | ||
2803 | * @brief Get whether the prediction is allowed or not. | ||
2804 | * | ||
2805 | * @param obj A valid Evas_Object handle | ||
2806 | * @param part The part name | ||
2807 | * @return EINA_TRUE if prediction feature is allowed. | ||
2808 | * @since 1.2.0 | ||
2809 | */ | ||
2810 | EAPI Eina_Bool edje_object_part_text_prediction_allow_get (const Evas_Object *obj, const char *part); | ||
2811 | |||
2812 | /** | ||
2813 | * @brief Sets the attribute to show the input panel automatically. | ||
2814 | * | ||
2815 | * @param obj A valid Evas_Object handle | ||
2816 | * @param part The part name | ||
2817 | * @param enabled If true, the input panel is appeared when entry is clicked or has a focus | ||
2818 | * @since 1.1.0 | ||
2819 | */ | ||
2820 | EAPI void edje_object_part_text_input_panel_enabled_set (Evas_Object *obj, const char *part, Eina_Bool enabled); | ||
2821 | |||
2822 | /** | ||
2823 | * @brief Retrieve the attribute to show the input panel automatically. | ||
2824 | * @see edje_object_part_text_input_panel_enabled_set | ||
2825 | * | ||
2826 | * @param obj A valid Evas_Object handle | ||
2827 | * @param part The part name | ||
2828 | * @return EINA_TRUE if it supports or EINA_FALSE otherwise | ||
2829 | * @since 1.1.0 | ||
2830 | */ | ||
2831 | EAPI Eina_Bool edje_object_part_text_input_panel_enabled_get (const Evas_Object *obj, const char *part); | ||
2832 | |||
2833 | /** | ||
2834 | * @brief Show the input panel (virtual keyboard) based on the input panel property such as layout, autocapital types, and so on. | ||
2835 | * | ||
2836 | * Note that input panel is shown or hidden automatically according to the focus state. | ||
2837 | * This API can be used in the case of manually controlling by using edje_object_part_text_input_panel_enabled_set. | ||
2838 | * | ||
2839 | * @param obj A valid Evas_Object handle | ||
2840 | * @param part The part name | ||
2841 | * @since 1.2.0 | ||
2842 | */ | ||
2843 | EAPI void edje_object_part_text_input_panel_show(const Evas_Object *obj, const char *part); | ||
2844 | |||
2845 | /** | ||
2846 | * @brief Hide the input panel (virtual keyboard). | ||
2847 | * @see edje_object_part_text_input_panel_show | ||
2848 | * | ||
2849 | * Note that input panel is shown or hidden automatically according to the focus state. | ||
2850 | * This API can be used in the case of manually controlling by using edje_object_part_text_input_panel_enabled_set. | ||
2851 | * | ||
2852 | * @param obj A valid Evas_Object handle | ||
2853 | * @param part The part name | ||
2854 | * @since 1.2.0 | ||
2855 | */ | ||
2856 | EAPI void edje_object_part_text_input_panel_hide(const Evas_Object *obj, const char *part); | ||
2857 | |||
2858 | /** | ||
2859 | * Set the language mode of the input panel. | ||
2860 | * | ||
2861 | * This API can be used if you want to show the Alphabet keyboard. | ||
2862 | * | ||
2863 | * @param obj A valid Evas_Object handle | ||
2864 | * @param part The part name | ||
2865 | * @param lang the language to be set to the input panel. | ||
2866 | * @since 1.2.0 | ||
2867 | */ | ||
2868 | EAPI void edje_object_part_text_input_panel_language_set(Evas_Object *obj, const char *part, Edje_Input_Panel_Lang lang); | ||
2869 | |||
2870 | /** | ||
2871 | * Get the language mode of the input panel. | ||
2872 | * | ||
2873 | * See @ref edje_object_part_text_input_panel_language_set for more details. | ||
2874 | * | ||
2875 | * @param obj A valid Evas_Object handle | ||
2876 | * @param part The part name | ||
2877 | * @return input panel language type | ||
2878 | * @since 1.2.0 | ||
2879 | */ | ||
2880 | EAPI Edje_Input_Panel_Lang edje_object_part_text_input_panel_language_get(const Evas_Object *obj, const char *part); | ||
2881 | |||
2882 | /** | ||
2883 | * Set the input panel-specific data to deliver to the input panel. | ||
2884 | * | ||
2885 | * This API is used by applications to deliver specific data to the input panel. | ||
2886 | * The data format MUST be negotiated by both application and the input panel. | ||
2887 | * The size and format of data are defined by the input panel. | ||
2888 | * | ||
2889 | * @param obj A valid Evas_Object handle | ||
2890 | * @param part The part name | ||
2891 | * @param data The specific data to be set to the input panel. | ||
2892 | * @param len the length of data, in bytes, to send to the input panel | ||
2893 | * @since 1.2.0 | ||
2894 | */ | ||
2895 | EAPI void edje_object_part_text_input_panel_imdata_set(Evas_Object *obj, const char *part, const void *data, int len); | ||
2896 | |||
2897 | /** | ||
2898 | * Get the specific data of the current active input panel. | ||
2899 | * | ||
2900 | * @param obj A valid Evas_Object handle | ||
2901 | * @param part The part name | ||
2902 | * @param data The specific data to be got from the input panel | ||
2903 | * @param len The length of data | ||
2904 | * @since 1.2.0 | ||
2905 | */ | ||
2906 | EAPI void edje_object_part_text_input_panel_imdata_get(const Evas_Object *obj, const char *part, void *data, int *len); | ||
2907 | |||
2908 | /** | ||
2909 | * Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel. | ||
2910 | * | ||
2911 | * An input panel displays the string or icon associated with this type | ||
2912 | * | ||
2913 | * @param obj A valid Evas_Object handle | ||
2914 | * @param part The part name | ||
2915 | * @param return_key_type The type of "return" key on the input panel | ||
2916 | * @since 1.2.0 | ||
2917 | */ | ||
2918 | EAPI void edje_object_part_text_input_panel_return_key_type_set(Evas_Object *obj, const char *part, Edje_Input_Panel_Return_Key_Type return_key_type); | ||
2919 | |||
2920 | /** | ||
2921 | * Get the "return" key type. | ||
2922 | * | ||
2923 | * @see edje_object_part_text_input_panel_return_key_type_set() for more details | ||
2924 | * | ||
2925 | * @param obj A valid Evas_Object handle | ||
2926 | * @param part The part name | ||
2927 | * @return The type of "return" key on the input panel | ||
2928 | * @since 1.2.0 | ||
2929 | */ | ||
2930 | EAPI Edje_Input_Panel_Return_Key_Type edje_object_part_text_input_panel_return_key_type_get(const Evas_Object *obj, const char *part); | ||
2931 | |||
2932 | /** | ||
2933 | * Set the return key on the input panel to be disabled. | ||
2934 | * | ||
2935 | * @param obj A valid Evas_Object handle | ||
2936 | * @param part The part name | ||
2937 | * @param disabled The state | ||
2938 | * @since 1.2.0 | ||
2939 | */ | ||
2940 | EAPI void edje_object_part_text_input_panel_return_key_disabled_set(Evas_Object *obj, const char *part, Eina_Bool disabled); | ||
2941 | |||
2942 | /** | ||
2943 | * Get whether the return key on the input panel should be disabled or not. | ||
2944 | * | ||
2945 | * @param obj A valid Evas_Object handle | ||
2946 | * @param part The part name | ||
2947 | * @return EINA_TRUE if it should be disabled | ||
2948 | * @since 1.2.0 | ||
2949 | */ | ||
2950 | EAPI Eina_Bool edje_object_part_text_input_panel_return_key_disabled_get(const Evas_Object *obj, const char *part); | ||
2951 | |||
2952 | /** | ||
2953 | * Add a filter function for newly inserted text. | ||
2954 | * | ||
2955 | * Whenever text is inserted (not the same as set) into the given @p part, | ||
2956 | * the list of filter functions will be called to decide if and how the new | ||
2957 | * text will be accepted. | ||
2958 | * There are three types of filters, EDJE_TEXT_FILTER_TEXT, | ||
2959 | * EDJE_TEXT_FILTER_FORMAT and EDJE_TEXT_FILTER_MARKUP. | ||
2960 | * The text parameter in the @p func filter can be modified by the user and | ||
2961 | * it's up to him to free the one passed if he's to change the pointer. If | ||
2962 | * doing so, the newly set text should be malloc'ed, as once all the filters | ||
2963 | * are called Edje will free it. | ||
2964 | * If the text is to be rejected, freeing it and setting the pointer to NULL | ||
2965 | * will make Edje break out of the filter cycle and reject the inserted | ||
2966 | * text. | ||
2967 | * | ||
2968 | * @warning This function will be deprecated because of difficulty in use. | ||
2969 | * The type(format, text, or markup) of text should be always | ||
2970 | * checked in the filter function for correct filtering. | ||
2971 | * Please use edje_object_text_markup_filter_callback_add() instead. There | ||
2972 | * is no need to check the type of text in the filter function | ||
2973 | * because the text is always markup. | ||
2974 | * @warning If you use this function with | ||
2975 | * edje_object_text_markup_filter_callback_add() together, all | ||
2976 | * Edje_Text_Filter_Cb functions and Edje_Markup_Filter_Cb functions | ||
2977 | * will be executed, and then filtered text will be inserted. | ||
2978 | * | ||
2979 | * @see edje_object_text_insert_filter_callback_del | ||
2980 | * @see edje_object_text_insert_filter_callback_del_full | ||
2981 | * @see edje_object_text_markup_filter_callback_add | ||
2982 | * | ||
2983 | * @param obj A valid Evas_Object handle | ||
2984 | * @param part The part name | ||
2985 | * @param func The callback function that will act as filter | ||
2986 | * @param data User provided data to pass to the filter function | ||
2987 | */ | ||
2988 | EAPI void edje_object_text_insert_filter_callback_add (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data); | ||
2989 | |||
2990 | /** | ||
2991 | * Delete a function from the filter list. | ||
2992 | * | ||
2993 | * Delete the given @p func filter from the list in @p part. Returns | ||
2994 | * the user data pointer given when added. | ||
2995 | * | ||
2996 | * @see edje_object_text_insert_filter_callback_add | ||
2997 | * @see edje_object_text_insert_filter_callback_del_full | ||
2998 | * | ||
2999 | * @param obj A valid Evas_Object handle | ||
3000 | * @param part The part name | ||
3001 | * @param func The function callback to remove | ||
3002 | * | ||
3003 | * @return The user data pointer if successful, or NULL otherwise | ||
3004 | */ | ||
3005 | EAPI void *edje_object_text_insert_filter_callback_del (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func); | ||
3006 | |||
3007 | /** | ||
3008 | * Delete a function and matching user data from the filter list. | ||
3009 | * | ||
3010 | * Delete the given @p func filter and @p data user data from the list | ||
3011 | * in @p part. | ||
3012 | * Returns the user data pointer given when added. | ||
3013 | * | ||
3014 | * @see edje_object_text_insert_filter_callback_add | ||
3015 | * @see edje_object_text_insert_filter_callback_del | ||
3016 | * | ||
3017 | * @param obj A valid Evas_Object handle | ||
3018 | * @param part The part name | ||
3019 | * @param func The function callback to remove | ||
3020 | * @param data The data passed to the callback function | ||
3021 | * | ||
3022 | * @return The same data pointer if successful, or NULL otherwise | ||
3023 | */ | ||
3024 | EAPI void *edje_object_text_insert_filter_callback_del_full (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data); | ||
3025 | |||
3026 | /** | ||
3027 | * Add a markup filter function for newly inserted text. | ||
3028 | * | ||
3029 | * Whenever text is inserted (not the same as set) into the given @p part, | ||
3030 | * the list of markup filter functions will be called to decide if and how | ||
3031 | * the new text will be accepted. | ||
3032 | * The text parameter in the @p func filter is always markup. It can be | ||
3033 | * modified by the user and it's up to him to free the one passed if he's to | ||
3034 | * change the pointer. If doing so, the newly set text should be malloc'ed, | ||
3035 | * as once all the filters are called Edje will free it. | ||
3036 | * If the text is to be rejected, freeing it and setting the pointer to NULL | ||
3037 | * will make Edje break out of the filter cycle and reject the inserted | ||
3038 | * text. | ||
3039 | * This function is different from edje_object_text_insert_filter_callback_add() | ||
3040 | * in that the text parameter in the @p fucn filter is always markup. | ||
3041 | * | ||
3042 | * @warning If you use this function with | ||
3043 | * edje_object_text_insert_filter_callback_add() togehter, all | ||
3044 | * Edje_Text_Filter_Cb functions and Edje_Markup_Filter_Cb functions | ||
3045 | * will be executed, and then filtered text will be inserted. | ||
3046 | * | ||
3047 | * @see edje_object_text_markup_filter_callback_del | ||
3048 | * @see edje_object_text_markup_filter_callback_del_full | ||
3049 | * @see edje_object_text_insert_filter_callback_add | ||
3050 | * | ||
3051 | * @param obj A valid Evas_Object handle | ||
3052 | * @param part The part name | ||
3053 | * @param func The callback function that will act as markup filter | ||
3054 | * @param data User provided data to pass to the filter function | ||
3055 | * @since 1.2.0 | ||
3056 | */ | ||
3057 | EAPI void edje_object_text_markup_filter_callback_add(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func, void *data); | ||
3058 | |||
3059 | /** | ||
3060 | * Delete a function from the markup filter list. | ||
3061 | * | ||
3062 | * Delete the given @p func filter from the list in @p part. Returns | ||
3063 | * the user data pointer given when added. | ||
3064 | * | ||
3065 | * @see edje_object_text_markup_filter_callback_add | ||
3066 | * @see edje_object_text_markup_filter_callback_del_full | ||
3067 | * | ||
3068 | * @param obj A valid Evas_Object handle | ||
3069 | * @param part The part name | ||
3070 | * @param func The function callback to remove | ||
3071 | * | ||
3072 | * @return The user data pointer if successful, or NULL otherwise | ||
3073 | * @since 1.2.0 | ||
3074 | */ | ||
3075 | EAPI void *edje_object_text_markup_filter_callback_del(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func); | ||
3076 | |||
3077 | /** | ||
3078 | * Delete a function and matching user data from the markup filter list. | ||
3079 | * | ||
3080 | * Delete the given @p func filter and @p data user data from the list | ||
3081 | * in @p part. | ||
3082 | * Returns the user data pointer given when added. | ||
3083 | * | ||
3084 | * @see edje_object_text_markup_filter_callback_add | ||
3085 | * @see edje_object_text_markup_filter_callback_del | ||
3086 | * | ||
3087 | * @param obj A valid Evas_Object handle | ||
3088 | * @param part The part name | ||
3089 | * @param func The function callback to remove | ||
3090 | * @param data The data passed to the callback function | ||
3091 | * | ||
3092 | * @return The same data pointer if successful, or NULL otherwise | ||
3093 | * @since 1.2.0 | ||
3094 | */ | ||
3095 | EAPI void *edje_object_text_markup_filter_callback_del_full(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func, void *data); | ||
3096 | |||
3097 | /** | ||
3098 | * @brief Swallows an object into the edje. | ||
3099 | * | ||
3100 | * @param obj A valid Evas_Object handle | ||
3101 | * @param part The part name | ||
3102 | * @param obj_swallow The object to swallow | ||
3103 | * | ||
3104 | * Swallows the object into the edje part so that all geometry changes | ||
3105 | * for the part affect the swallowed object. (e.g. resize, move, show, | ||
3106 | * raise/lower, etc.). | ||
3107 | * | ||
3108 | * If an object has already been swallowed into this part, then it | ||
3109 | * will first be unswallowed before the new object is swallowed. | ||
3110 | */ | ||
3111 | EAPI Eina_Bool edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow); | ||
3112 | |||
3113 | /** | ||
3114 | * @brief Unswallow an object. | ||
3115 | * | ||
3116 | * @param obj A valid Evas_Object handle | ||
3117 | * @param obj_swallow The swallowed object | ||
3118 | * | ||
3119 | * Causes the edje to regurgitate a previously swallowed object. :) | ||
3120 | * | ||
3121 | * @note @p obj_swallow will @b not be deleted or hidden. | ||
3122 | * @note @p obj_swallow may appear shown on the evas depending on its state when | ||
3123 | * it got unswallowed. Make sure you delete it or hide it if you do not want it to. | ||
3124 | */ | ||
3125 | EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow); | ||
3126 | |||
3127 | /** | ||
3128 | * @brief Get the object currently swallowed by a part. | ||
3129 | * | ||
3130 | * @param obj A valid Evas_Object handle | ||
3131 | * @param part The part name | ||
3132 | * @return The swallowed object, or NULL if there is none. | ||
3133 | */ | ||
3134 | EAPI Evas_Object *edje_object_part_swallow_get (const Evas_Object *obj, const char *part); | ||
3135 | |||
3136 | /** | ||
3137 | * @brief Returns the state of the Edje part. | ||
3138 | * | ||
3139 | * @param obj A valid Evas_Object handle | ||
3140 | * @param part The part name | ||
3141 | * @param val_ret | ||
3142 | * | ||
3143 | * @return The part state:\n | ||
3144 | * "default" for the default state\n | ||
3145 | * "" for other states | ||
3146 | */ | ||
3147 | EAPI const char *edje_object_part_state_get (const Evas_Object *obj, const char *part, double *val_ret); | ||
3148 | |||
3149 | /** | ||
3150 | * @brief Determine dragable directions. | ||
3151 | * | ||
3152 | * @param obj A valid Evas_Object handle | ||
3153 | * @param part The part name | ||
3154 | * | ||
3155 | * The dragable directions are defined in the EDC file, inside the @c dragable | ||
3156 | * section, by the attributes @c x and @c y. See the @ref edcref for more | ||
3157 | * information. | ||
3158 | * | ||
3159 | * @return #EDJE_DRAG_DIR_NONE: Not dragable\n | ||
3160 | * #EDJE_DRAG_DIR_X: Dragable in X direction\n | ||
3161 | * #EDJE_DRAG_DIR_Y: Dragable in Y direction\n | ||
3162 | * #EDJE_DRAG_DIR_XY: Dragable in X & Y directions | ||
3163 | */ | ||
3164 | EAPI Edje_Drag_Dir edje_object_part_drag_dir_get (const Evas_Object *obj, const char *part); | ||
3165 | |||
3166 | /** | ||
3167 | * @brief Set the dragable object location. | ||
3168 | * | ||
3169 | * @param obj A valid Evas_Object handle | ||
3170 | * @param part The part name | ||
3171 | * @param dx The x value | ||
3172 | * @param dy The y value | ||
3173 | * | ||
3174 | * Places the dragable object at the given location. | ||
3175 | * | ||
3176 | * Values for @p dx and @p dy are real numbers that range from 0 to 1, | ||
3177 | * representing the relative position to the dragable area on that axis. | ||
3178 | * | ||
3179 | * This value means, for the vertical axis, that 0.0 will be at the top if the | ||
3180 | * first parameter of @c y in the dragable part theme is 1, and at bottom if it | ||
3181 | * is -1. | ||
3182 | * | ||
3183 | * For the horizontal axis, 0.0 means left if the first parameter of @c x in the | ||
3184 | * dragable part theme is 1, and right if it is -1. | ||
3185 | * | ||
3186 | * @see edje_object_part_drag_value_get() | ||
3187 | */ | ||
3188 | EAPI Eina_Bool edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy); | ||
3189 | |||
3190 | /** | ||
3191 | * @brief Get the dragable object location. | ||
3192 | * | ||
3193 | * @param obj A valid Evas_Object handle | ||
3194 | * @param part The part name | ||
3195 | * @param dx The X value pointer | ||
3196 | * @param dy The Y value pointer | ||
3197 | * | ||
3198 | * Values for @p dx and @p dy are real numbers that range from 0 to 1, | ||
3199 | * representing the relative position to the dragable area on that axis. | ||
3200 | * | ||
3201 | * @see edje_object_part_drag_value_set() | ||
3202 | * | ||
3203 | * Gets the drag location values. | ||
3204 | */ | ||
3205 | EAPI Eina_Bool edje_object_part_drag_value_get (const Evas_Object *obj, const char *part, double *dx, double *dy); | ||
3206 | |||
3207 | /** | ||
3208 | * @brief Set the dragable object size. | ||
3209 | * | ||
3210 | * @param obj A valid Evas_Object handle | ||
3211 | * @param part The part name | ||
3212 | * @param dw The drag width | ||
3213 | * @param dh The drag height | ||
3214 | * | ||
3215 | * Values for @p dw and @p dh are real numbers that range from 0 to 1, | ||
3216 | * representing the relative size of the dragable area on that axis. | ||
3217 | * | ||
3218 | * Sets the size of the dragable object. | ||
3219 | * | ||
3220 | * @see edje_object_part_drag_size_get() | ||
3221 | */ | ||
3222 | EAPI Eina_Bool edje_object_part_drag_size_set (Evas_Object *obj, const char *part, double dw, double dh); | ||
3223 | |||
3224 | /** | ||
3225 | * @brief Get the dragable object size. | ||
3226 | * | ||
3227 | * @param obj A valid Evas_Object handle | ||
3228 | * @param part The part name | ||
3229 | * @param dw The drag width pointer | ||
3230 | * @param dh The drag height pointer | ||
3231 | * | ||
3232 | * Gets the dragable object size. | ||
3233 | * | ||
3234 | * @see edje_object_part_drag_size_set() | ||
3235 | */ | ||
3236 | EAPI Eina_Bool edje_object_part_drag_size_get (const Evas_Object *obj, const char *part, double *dw, double *dh); | ||
3237 | |||
3238 | /** | ||
3239 | * @brief Sets the drag step increment. | ||
3240 | * | ||
3241 | * @param obj A valid Evas_Object handle | ||
3242 | * @param part The part name | ||
3243 | * @param dx The x step amount | ||
3244 | * @param dy The y step amount | ||
3245 | * | ||
3246 | * Sets the x,y step increments for a dragable object. | ||
3247 | * | ||
3248 | * Values for @p dx and @p dy are real numbers that range from 0 to 1, | ||
3249 | * representing the relative size of the dragable area on that axis by which the | ||
3250 | * part will be moved. | ||
3251 | * | ||
3252 | * @see edje_object_part_drag_step_get() | ||
3253 | */ | ||
3254 | EAPI Eina_Bool edje_object_part_drag_step_set (Evas_Object *obj, const char *part, double dx, double dy); | ||
3255 | |||
3256 | /** | ||
3257 | * @brief Gets the drag step increment values. | ||
3258 | * | ||
3259 | * @param obj A valid Evas_Object handle | ||
3260 | * @param part The part | ||
3261 | * @param dx The x step increment pointer | ||
3262 | * @param dy The y step increment pointer | ||
3263 | * | ||
3264 | * Gets the x and y step increments for the dragable object. | ||
3265 | * | ||
3266 | * | ||
3267 | * @see edje_object_part_drag_step_set() | ||
3268 | */ | ||
3269 | EAPI Eina_Bool edje_object_part_drag_step_get (const Evas_Object *obj, const char *part, double *dx, double *dy); | ||
3270 | |||
3271 | /** | ||
3272 | * @brief Sets the page step increments. | ||
3273 | * | ||
3274 | * @param obj A valid Evas_Object handle | ||
3275 | * @param part The part name | ||
3276 | * @param dx The x page step increment | ||
3277 | * @param dy The y page step increment | ||
3278 | * | ||
3279 | * Sets the x,y page step increment values. | ||
3280 | * | ||
3281 | * Values for @p dx and @p dy are real numbers that range from 0 to 1, | ||
3282 | * representing the relative size of the dragable area on that axis by which the | ||
3283 | * part will be moved. | ||
3284 | * | ||
3285 | * @see edje_object_part_drag_page_get() | ||
3286 | */ | ||
3287 | EAPI Eina_Bool edje_object_part_drag_page_set (Evas_Object *obj, const char *part, double dx, double dy); | ||
3288 | |||
3289 | /** | ||
3290 | * @brief Gets the page step increments. | ||
3291 | * | ||
3292 | * @param obj A valid Evas_Object handle | ||
3293 | * @param part The part name | ||
3294 | * @param dx The dx page increment pointer | ||
3295 | * @param dy The dy page increment pointer | ||
3296 | * | ||
3297 | * Gets the x,y page step increments for the dragable object. | ||
3298 | * | ||
3299 | * @see edje_object_part_drag_page_set() | ||
3300 | */ | ||
3301 | EAPI Eina_Bool edje_object_part_drag_page_get (const Evas_Object *obj, const char *part, double *dx, double *dy); | ||
3302 | |||
3303 | /** | ||
3304 | * @brief Steps the dragable x,y steps. | ||
3305 | * | ||
3306 | * @param obj A valid Evas_Object handle | ||
3307 | * @param part The part name | ||
3308 | * @param dx The x step | ||
3309 | * @param dy The y step | ||
3310 | * | ||
3311 | * Steps x,y where the step increment is the amount set by | ||
3312 | * edje_object_part_drag_step_set. | ||
3313 | * | ||
3314 | * Values for @p dx and @p dy are real numbers that range from 0 to 1. | ||
3315 | * | ||
3316 | * @see edje_object_part_drag_page() | ||
3317 | */ | ||
3318 | EAPI Eina_Bool edje_object_part_drag_step (Evas_Object *obj, const char *part, double dx, double dy); | ||
3319 | |||
3320 | /** | ||
3321 | * @brief Pages x,y steps. | ||
3322 | * | ||
3323 | * @param obj A valid Evas_Object handle | ||
3324 | * @param part The part name | ||
3325 | * @param dx The x step | ||
3326 | * @param dy The y step | ||
3327 | * | ||
3328 | * Pages x,y where the increment is defined by | ||
3329 | * edje_object_part_drag_page_set. | ||
3330 | * | ||
3331 | * Values for @p dx and @p dy are real numbers that range from 0 to 1. | ||
3332 | * | ||
3333 | * @warning Paging is bugged! | ||
3334 | * | ||
3335 | * @see edje_object_part_drag_step() | ||
3336 | */ | ||
3337 | EAPI Eina_Bool edje_object_part_drag_page (Evas_Object *obj, const char *part, double dx, double dy); | ||
3338 | |||
3339 | |||
3340 | /** | ||
3341 | * @brief Get the object created by this external part. | ||
3342 | * | ||
3343 | * Parts of type external creates the part object using information | ||
3344 | * provided by external plugins. It's somehow like "swallow" | ||
3345 | * (edje_object_part_swallow()), but it's all set automatically. | ||
3346 | * | ||
3347 | * This function returns the part created by such external plugins and | ||
3348 | * being currently managed by this Edje. | ||
3349 | * | ||
3350 | * @note Almost all swallow rules apply: you should not move, resize, | ||
3351 | * hide, show, set the color or clipper of such part. It's a bit | ||
3352 | * more restrictive as one must @b never delete this object! | ||
3353 | * | ||
3354 | * @param obj A valid Evas_Object handle | ||
3355 | * @param part The part name | ||
3356 | * @return The externally created object, or NULL if there is none or | ||
3357 | * part is not an external. | ||
3358 | */ | ||
3359 | EAPI Evas_Object *edje_object_part_external_object_get (const Evas_Object *obj, const char *part); | ||
3360 | |||
3361 | /** | ||
3362 | * @brief Set the parameter for the external part. | ||
3363 | * | ||
3364 | * Parts of type external may carry extra properties that have | ||
3365 | * meanings defined by the external plugin. For instance, it may be a | ||
3366 | * string that defines a button label and setting this property will | ||
3367 | * change that label on the fly. | ||
3368 | * | ||
3369 | * @note external parts have parameters set when they change | ||
3370 | * states. Those parameters will never be changed by this | ||
3371 | * function. The interpretation of how state_set parameters and | ||
3372 | * param_set will interact is up to the external plugin. | ||
3373 | * | ||
3374 | * @note this function will not check if parameter value is valid | ||
3375 | * using #Edje_External_Param_Info minimum, maximum, valid | ||
3376 | * choices and others. However these should be checked by the | ||
3377 | * underlying implementation provided by the external | ||
3378 | * plugin. This is done for performance reasons. | ||
3379 | * | ||
3380 | * @param obj A valid Evas_Object handle | ||
3381 | * @param part The part name | ||
3382 | * @param param the parameter details, including its name, type and | ||
3383 | * actual value. This pointer should be valid, and the | ||
3384 | * parameter must exist in | ||
3385 | * #Edje_External_Type::parameters_info, with the exact type, | ||
3386 | * otherwise the operation will fail and @c EINA_FALSE will be | ||
3387 | * returned. | ||
3388 | * | ||
3389 | * @return @c EINA_TRUE if everything went fine, @c EINA_FALSE on errors. | ||
3390 | */ | ||
3391 | EAPI Eina_Bool edje_object_part_external_param_set (Evas_Object *obj, const char *part, const Edje_External_Param *param); | ||
3392 | |||
3393 | /** | ||
3394 | * @brief Get the parameter for the external part. | ||
3395 | * | ||
3396 | * Parts of type external may carry extra properties that have | ||
3397 | * meanings defined by the external plugin. For instance, it may be a | ||
3398 | * string that defines a button label. This property can be modified by | ||
3399 | * state parameters, by explicit calls to | ||
3400 | * edje_object_part_external_param_set() or getting the actual object | ||
3401 | * with edje_object_part_external_object_get() and calling native | ||
3402 | * functions. | ||
3403 | * | ||
3404 | * This function asks the external plugin what is the current value, | ||
3405 | * independent on how it was set. | ||
3406 | * | ||
3407 | * @param obj A valid Evas_Object handle | ||
3408 | * @param part The part name | ||
3409 | |||
3410 | * @param param the parameter details. It is used as both input and | ||
3411 | * output variable. This pointer should be valid, and the | ||
3412 | * parameter must exist in | ||
3413 | * #Edje_External_Type::parameters_info, with the exact type, | ||
3414 | * otherwise the operation will fail and @c EINA_FALSE will be | ||
3415 | * returned. | ||
3416 | * | ||
3417 | * @return @c EINA_TRUE if everything went fine and @p param members | ||
3418 | * are filled with information, @c EINA_FALSE on errors and @p | ||
3419 | * param member values are not set or valid. | ||
3420 | */ | ||
3421 | EAPI Eina_Bool edje_object_part_external_param_get (const Evas_Object *obj, const char *part, Edje_External_Param *param); | ||
3422 | |||
3423 | /** | ||
3424 | * @brief Get an object contained in an part of type EXTERNAL | ||
3425 | * | ||
3426 | * The @p content string must not be NULL. Its actual value depends on the | ||
3427 | * code providing the EXTERNAL. | ||
3428 | * | ||
3429 | * @param obj The Edje object | ||
3430 | * @param part The name of the part holding the EXTERNAL | ||
3431 | * @param content A string identifying which content from the EXTERNAL to get | ||
3432 | */ | ||
3433 | EAPI Evas_Object *edje_object_part_external_content_get (const Evas_Object *obj, const char *part, const char *content); | ||
3434 | |||
3435 | /** | ||
3436 | * Facility to query the type of the given parameter of the given part. | ||
3437 | * | ||
3438 | * @param obj A valid Evas_Object handle | ||
3439 | * @param part The part name | ||
3440 | * @param param the parameter name to use. | ||
3441 | * | ||
3442 | * @return @c EDJE_EXTERNAL_PARAM_TYPE_MAX on errors, or another value | ||
3443 | * from #Edje_External_Param_Type on success. | ||
3444 | */ | ||
3445 | EAPI Edje_External_Param_Type edje_object_part_external_param_type_get (const Evas_Object *obj, const char *part, const char *param); | ||
3446 | |||
3447 | |||
3448 | /** | ||
3449 | * @brief Appends an object to the box. | ||
3450 | * | ||
3451 | * @param obj A valid Evas_Object handle | ||
3452 | * @param part The part name | ||
3453 | * @param child The object to append | ||
3454 | * | ||
3455 | * @return @c EINA_TRUE: Successfully added.\n | ||
3456 | * @c EINA_FALSE: An error occurred. | ||
3457 | * | ||
3458 | * Appends child to the box indicated by part. | ||
3459 | * | ||
3460 | * @see edje_object_part_box_prepend() | ||
3461 | * @see edje_object_part_box_insert_before() | ||
3462 | * @see edje_object_part_box_insert_at() | ||
3463 | */ | ||
3464 | EAPI Eina_Bool edje_object_part_box_append (Evas_Object *obj, const char *part, Evas_Object *child); | ||
3465 | |||
3466 | /** | ||
3467 | * @brief Prepends an object to the box. | ||
3468 | * | ||
3469 | * @param obj A valid Evas_Object handle | ||
3470 | * @param part The part name | ||
3471 | * @param child The object to prepend | ||
3472 | * | ||
3473 | * @return @c EINA_TRUE: Successfully added.\n | ||
3474 | * @c EINA_FALSE: An error occurred. | ||
3475 | * | ||
3476 | * Prepends child to the box indicated by part. | ||
3477 | * | ||
3478 | * @see edje_object_part_box_append() | ||
3479 | * @see edje_object_part_box_insert_before() | ||
3480 | * @see edje_object_part_box_insert_at() | ||
3481 | */ | ||
3482 | EAPI Eina_Bool edje_object_part_box_prepend (Evas_Object *obj, const char *part, Evas_Object *child); | ||
3483 | |||
3484 | /** | ||
3485 | * @brief Adds an object to the box. | ||
3486 | * | ||
3487 | * @param obj A valid Evas_Object handle | ||
3488 | * @param part The part name | ||
3489 | * @param child The object to insert | ||
3490 | * @param reference The object to be used as reference | ||
3491 | * | ||
3492 | * @return @c EINA_TRUE: Successfully added.\n | ||
3493 | * @c EINA_FALSE: An error occurred. | ||
3494 | * | ||
3495 | * Inserts child in the box given by part, in the position marked by | ||
3496 | * reference. | ||
3497 | * | ||
3498 | * @see edje_object_part_box_append() | ||
3499 | * @see edje_object_part_box_prepend() | ||
3500 | * @see edje_object_part_box_insert_at() | ||
3501 | */ | ||
3502 | EAPI Eina_Bool edje_object_part_box_insert_before (Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference); | ||
3503 | |||
3504 | /** | ||
3505 | * @brief Inserts an object to the box. | ||
3506 | * | ||
3507 | * @param obj A valid Evas_Object handle | ||
3508 | * @param part The part name | ||
3509 | * @param child The object to insert | ||
3510 | * @param pos The position where to insert child | ||
3511 | * | ||
3512 | * @return @c EINA_TRUE: Successfully added.\n | ||
3513 | * @c EINA_FALSE: An error occurred. | ||
3514 | * | ||
3515 | * Adds child to the box indicated by part, in the position given by | ||
3516 | * pos. | ||
3517 | * | ||
3518 | * @see edje_object_part_box_append() | ||
3519 | * @see edje_object_part_box_prepend() | ||
3520 | * @see edje_object_part_box_insert_before() | ||
3521 | */ | ||
3522 | EAPI Eina_Bool edje_object_part_box_insert_at (Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos); | ||
3523 | |||
3524 | /** | ||
3525 | * @brief Removes an object from the box. | ||
3526 | * | ||
3527 | * @param obj A valid Evas_Object handle | ||
3528 | * @param part The part name | ||
3529 | * @param child The object to remove | ||
3530 | * | ||
3531 | * @return Pointer to the object removed, or @c NULL. | ||
3532 | * | ||
3533 | * Removes child from the box indicated by part. | ||
3534 | * | ||
3535 | * @see edje_object_part_box_remove_at() | ||
3536 | * @see edje_object_part_box_remove_all() | ||
3537 | */ | ||
3538 | EAPI Evas_Object *edje_object_part_box_remove (Evas_Object *obj, const char *part, Evas_Object *child); | ||
3539 | |||
3540 | /** | ||
3541 | * @brief Removes an object from the box. | ||
3542 | * | ||
3543 | * @param obj A valid Evas_Object handle | ||
3544 | * @param part The part name | ||
3545 | * @param pos The position index of the object (starts counting from 0) | ||
3546 | * | ||
3547 | * @return Pointer to the object removed, or @c NULL. | ||
3548 | * | ||
3549 | * Removes from the box indicated by part, the object in the position | ||
3550 | * pos. | ||
3551 | * | ||
3552 | * @see edje_object_part_box_remove() | ||
3553 | * @see edje_object_part_box_remove_all() | ||
3554 | */ | ||
3555 | EAPI Evas_Object *edje_object_part_box_remove_at (Evas_Object *obj, const char *part, unsigned int pos); | ||
3556 | |||
3557 | /** | ||
3558 | * @brief Removes all elements from the box. | ||
3559 | * | ||
3560 | * @param obj A valid Evas_Object handle | ||
3561 | * @param part The part name | ||
3562 | * @param clear Delete objects on removal | ||
3563 | * | ||
3564 | * @return 1: Successfully cleared.\n | ||
3565 | * 0: An error occurred. | ||
3566 | * | ||
3567 | * Removes all the external objects from the box indicated by part. | ||
3568 | * Elements created from the theme will not be removed. | ||
3569 | * | ||
3570 | * @see edje_object_part_box_remove() | ||
3571 | * @see edje_object_part_box_remove_at() | ||
3572 | */ | ||
3573 | EAPI Eina_Bool edje_object_part_box_remove_all (Evas_Object *obj, const char *part, Eina_Bool clear); | ||
3574 | |||
3575 | /** | ||
3576 | * @brief Retrieve a child from a table | ||
3577 | * | ||
3578 | * @param obj A valid Evas_Object handle | ||
3579 | * @param part The part name | ||
3580 | * @param col The column of the child to get | ||
3581 | * @param row The row of the child to get | ||
3582 | * @return The child Evas_Object | ||
3583 | */ | ||
3584 | EAPI Evas_Object *edje_object_part_table_child_get (Evas_Object *obj, const char *part, unsigned int col, unsigned int row); | ||
3585 | |||
3586 | /** | ||
3587 | * @brief Packs an object into the table. | ||
3588 | * | ||
3589 | * @param obj A valid Evas_Object handle | ||
3590 | * @param part The part name | ||
3591 | * @param child_obj The object to pack in | ||
3592 | * @param col The column to place it in | ||
3593 | * @param row The row to place it in | ||
3594 | * @param colspan Columns the child will take | ||
3595 | * @param rowspan Rows the child will take | ||
3596 | * | ||
3597 | * @return @c EINA_TRUE object was added, @c EINA_FALSE on failure | ||
3598 | * | ||
3599 | * Packs an object into the table indicated by part. | ||
3600 | */ | ||
3601 | EAPI Eina_Bool edje_object_part_table_pack (Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan); | ||
3602 | |||
3603 | /** | ||
3604 | * @brief Removes an object from the table. | ||
3605 | * | ||
3606 | * @param obj A valid Evas_Object handle | ||
3607 | * @param part The part name | ||
3608 | * @param child_obj The object to pack in | ||
3609 | * | ||
3610 | * @return @c EINA_TRUE object removed, @c EINA_FALSE on failure | ||
3611 | * | ||
3612 | * Removes an object from the table indicated by part. | ||
3613 | */ | ||
3614 | EAPI Eina_Bool edje_object_part_table_unpack (Evas_Object *obj, const char *part, Evas_Object *child_obj); | ||
3615 | |||
3616 | /** | ||
3617 | * @brief Gets the number of columns and rows the table has. | ||
3618 | * | ||
3619 | * @param obj A valid Evas_Object handle | ||
3620 | * @param part The part name | ||
3621 | * @param cols Pointer where to store number of columns (can be NULL) | ||
3622 | * @param rows Pointer where to store number of rows (can be NULL) | ||
3623 | * | ||
3624 | * @return @c EINA_TRUE get some data, @c EINA_FALSE on failure | ||
3625 | * | ||
3626 | * Retrieves the size of the table in number of columns and rows. | ||
3627 | */ | ||
3628 | EAPI Eina_Bool edje_object_part_table_col_row_size_get (const Evas_Object *obj, const char *part, int *cols, int *rows); | ||
3629 | |||
3630 | /** | ||
3631 | * @brief Removes all object from the table. | ||
3632 | * | ||
3633 | * @param obj A valid Evas_Object handle | ||
3634 | * @param part The part name | ||
3635 | * @param clear If set, will delete subobjs on remove | ||
3636 | * | ||
3637 | * @return @c EINA_TRUE clear the table, @c EINA_FALSE on failure | ||
3638 | * | ||
3639 | * Removes all object from the table indicated by part, except the | ||
3640 | * internal ones set from the theme. | ||
3641 | */ | ||
3642 | EAPI Eina_Bool edje_object_part_table_clear (Evas_Object *obj, const char *part, Eina_Bool clear); | ||
3643 | |||
3644 | /** | ||
3645 | * @brief Send an (Edje) message to a given Edje object | ||
3646 | * | ||
3647 | * @param obj A handle to an Edje object | ||
3648 | * @param type The type of message to send to @p obj | ||
3649 | * @param id A identification number for the message to be sent | ||
3650 | * @param msg The message's body, a struct depending on @p type | ||
3651 | * | ||
3652 | * This function sends an Edje message to @p obj and to all of its | ||
3653 | * child objects, if it has any (swallowed objects are one kind of | ||
3654 | * child object). @p type and @p msg @b must be matched accordingly, | ||
3655 | * as documented in #Edje_Message_Type. | ||
3656 | * | ||
3657 | * The @p id argument as a form of code and theme defining a common | ||
3658 | * interface on message communication. One should define the same IDs | ||
3659 | * on both code and EDC declaration (see @ref edcref "the syntax" for | ||
3660 | * EDC files), to individualize messages (binding them to a given | ||
3661 | * context). | ||
3662 | * | ||
3663 | * The function to handle messages arriving @b from @b obj is set with | ||
3664 | * edje_object_message_handler_set(). | ||
3665 | */ | ||
3666 | EAPI void edje_object_message_send (Evas_Object *obj, Edje_Message_Type type, int id, void *msg); | ||
3667 | |||
3668 | /** | ||
3669 | * @brief Set an Edje message handler function for a given Edje object. | ||
3670 | * | ||
3671 | * @param obj A handle to an Edje object | ||
3672 | * @param func The function to handle messages @b coming from @p obj | ||
3673 | * @param data Auxiliary data to be passed to @p func | ||
3674 | * | ||
3675 | * Edje messages are one of the communication interfaces between | ||
3676 | * @b code and a given Edje object's @b theme. With messages, one can | ||
3677 | * communicate values beyond strings (which are the subject of Edje | ||
3678 | * signals -- see edje_object_signal_emit()), like float and integer | ||
3679 | * numbers. Moreover, messages can be identified by integer | ||
3680 | * numbers. See #Edje_Message_Type for the full list of message types. | ||
3681 | * | ||
3682 | * For scriptable programs on an Edje object's defining EDC file which | ||
3683 | * send messages with the @c send_message() primitive, one can attach | ||
3684 | * <b>handler functions</b>, to be called in the code which creates | ||
3685 | * that object (see @ref edcref "the syntax" for EDC files). | ||
3686 | * | ||
3687 | * This function associates a message handler function and the | ||
3688 | * attached data pointer to the object @p obj. | ||
3689 | * | ||
3690 | * @see edje_object_message_send() | ||
3691 | */ | ||
3692 | EAPI void edje_object_message_handler_set (Evas_Object *obj, Edje_Message_Handler_Cb func, void *data); | ||
3693 | |||
3694 | /** | ||
3695 | * @brief Process an object's message queue. | ||
3696 | * | ||
3697 | * @param obj A handle to an Edje object. | ||
3698 | * | ||
3699 | * This function goes through the object message queue processing the | ||
3700 | * pending messages for @b this specific Edje object. Normally they'd | ||
3701 | * be processed only at idle time. | ||
3702 | * | ||
3703 | */ | ||
3704 | EAPI void edje_object_message_signal_process (Evas_Object *obj); | ||
3705 | |||
3706 | |||
3707 | /** | ||
3708 | * @brief Process all queued up edje messages. | ||
3709 | * | ||
3710 | * This function triggers the processing of messages addressed to any | ||
3711 | * (alive) edje objects. | ||
3712 | * | ||
3713 | */ | ||
3714 | EAPI void edje_message_signal_process (void); | ||
3715 | |||
3716 | /** | ||
3717 | * Register a type to be used by EXTERNAL parts. | ||
3718 | * | ||
3719 | * Edje supports parts of type EXTERNAL, which will call user defined functions | ||
3720 | * to create and manipulate the object that's allocated in that part. This is | ||
3721 | * done by expecifying in the @c source property of the part the name of the | ||
3722 | * external to use, which must be one registered with this function. | ||
3723 | * | ||
3724 | * @param type_name name to register and be known by edje's "source:" | ||
3725 | * parameter of "type: EXTERNAL" parts. | ||
3726 | * @param type_info meta-information describing how to interact with it. | ||
3727 | * | ||
3728 | * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like | ||
3729 | * type already registered). | ||
3730 | * | ||
3731 | * @see edje_external_type_array_register() | ||
3732 | */ | ||
3733 | EAPI Eina_Bool edje_external_type_register (const char *type_name, const Edje_External_Type *type_info); | ||
3734 | |||
3735 | /** | ||
3736 | * Unregister a previously registered EXTERNAL type. | ||
3737 | * | ||
3738 | * @param type_name name to unregister. It should have been registered with | ||
3739 | * edje_external_type_register() before. | ||
3740 | * | ||
3741 | * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like | ||
3742 | * type_name did not exist). | ||
3743 | * | ||
3744 | * @see edje_external_type_array_unregister() | ||
3745 | */ | ||
3746 | EAPI Eina_Bool edje_external_type_unregister (const char *type_name); | ||
3747 | |||
3748 | /** | ||
3749 | * Register a batch of types and their information. | ||
3750 | * | ||
3751 | * When several types will be registered it is recommended to use this | ||
3752 | * function instead of several calls to edje_external_type_register(), as it | ||
3753 | * is faster. | ||
3754 | * | ||
3755 | * @note The contents of the array will be referenced directly for as long as | ||
3756 | * the type remains registered, so both the @c name and @c info in the | ||
3757 | * @p array must be kept alive during all this period (usually, the entire | ||
3758 | * program lifetime). The most common case would be to keep the array as a | ||
3759 | * @c static @c const type anyway. | ||
3760 | * | ||
3761 | * @param array @c NULL terminated array with type name and | ||
3762 | * information. Note that type name or information are | ||
3763 | * referenced directly, so they must be kept alive after | ||
3764 | * this function returns! | ||
3765 | * | ||
3766 | * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like | ||
3767 | * type already registered). | ||
3768 | * | ||
3769 | * @see edje_external_type_register() | ||
3770 | */ | ||
3771 | EAPI void edje_external_type_array_register (const Edje_External_Type_Info *array); | ||
3772 | |||
3773 | /** | ||
3774 | * Unregister a batch of given external type previously registered. | ||
3775 | * | ||
3776 | * @param array @c NULL terminated array, should be the same as the | ||
3777 | * one used to register with edje_external_type_array_register() | ||
3778 | * | ||
3779 | * @see edje_external_type_unregister() | ||
3780 | */ | ||
3781 | EAPI void edje_external_type_array_unregister (const Edje_External_Type_Info *array); | ||
3782 | |||
3783 | /** | ||
3784 | * Return the current ABI version for Edje_External_Type structure. | ||
3785 | * | ||
3786 | * Always check this number before accessing Edje_External_Type in | ||
3787 | * your own software. If the number is not the same, your software may | ||
3788 | * access invalid memory and crash, or just get garbage values. | ||
3789 | * | ||
3790 | * @warning @b NEVER, EVER define your own Edje_External_Type using the | ||
3791 | * return of this function as it will change as Edje library | ||
3792 | * (libedje.so) changes, but your type definition will | ||
3793 | * not. Instead, use #EDJE_EXTERNAL_TYPE_ABI_VERSION. | ||
3794 | * | ||
3795 | * Summary: | ||
3796 | * - use edje_external_type_abi_version_get() to check. | ||
3797 | * - use #EDJE_EXTERNAL_TYPE_ABI_VERSION to define/declare. | ||
3798 | * | ||
3799 | * @return The external ABI version the Edje library was compiled with. That | ||
3800 | * is, the value #EDJE_EXTERNAL_TYPE_ABI_VERSION had at that moment. | ||
3801 | */ | ||
3802 | EAPI unsigned int edje_external_type_abi_version_get (void) EINA_CONST; | ||
3803 | |||
3804 | /** | ||
3805 | * Returns an interator of all the registered EXTERNAL types. | ||
3806 | * | ||
3807 | * Each item in the iterator is an @c Eina_Hash_Tuple which has the type | ||
3808 | * of the external in the @c key and #Edje_External_Type as @c data. | ||
3809 | * | ||
3810 | * @code | ||
3811 | * const Eina_Hash_Tuple *tuple; | ||
3812 | * Eina_Iterator *itr; | ||
3813 | * const Eina_List *l, *modules; | ||
3814 | * const char *s; | ||
3815 | * | ||
3816 | * modules = edje_available_modules_get(); | ||
3817 | * EINA_LIST_FOREACH(modules, l, s) | ||
3818 | * { | ||
3819 | * if (!edje_module_load(s)) | ||
3820 | * printf("Error loading edje module: %s\n", s); | ||
3821 | * } | ||
3822 | * | ||
3823 | * itr = edje_external_iterator_get(); | ||
3824 | * EINA_ITERATOR_FOREACH(itr, tuple) | ||
3825 | * { | ||
3826 | * const char *name = tuple->key; | ||
3827 | * const Edje_External_Type *type = tuple->data; | ||
3828 | * | ||
3829 | * if ((!type) || | ||
3830 | * (type->abi_version != edje_external_type_abi_version_get())) | ||
3831 | * { | ||
3832 | * printf("Error: invalid type %p (abi: %d, expected: %d)\n", | ||
3833 | * type, type ? type->abi_version : 0, | ||
3834 | * edje_external_type_abi_version_get()); | ||
3835 | * continue; | ||
3836 | * } | ||
3837 | * | ||
3838 | * printf("%s: %s (%s) label='%s' desc='%s'\n", | ||
3839 | * name, type->module, type->module_name, | ||
3840 | * type->label_get ? type->label_get(type->data) : "", | ||
3841 | * type->description_get ? type->description_get(type->data) : ""); | ||
3842 | * } | ||
3843 | * | ||
3844 | * @endcode | ||
3845 | */ | ||
3846 | EAPI Eina_Iterator *edje_external_iterator_get (void); | ||
3847 | |||
3848 | /** | ||
3849 | * Conevenience function to find a specific parameter in a list of them. | ||
3850 | * | ||
3851 | * @param params The list of parameters for the external | ||
3852 | * @param key The parameter to look for | ||
3853 | * | ||
3854 | * @return The matching #Edje_External_Param or NULL if it's not found. | ||
3855 | */ | ||
3856 | EAPI Edje_External_Param *edje_external_param_find (const Eina_List *params, const char *key); | ||
3857 | /** | ||
3858 | * Get the value of the given parameter of integer type. | ||
3859 | * | ||
3860 | * Look for the @p key parameter in the @p params list and return its value in | ||
3861 | * @p ret. If the parameter is found and is of type | ||
3862 | * #EDJE_EXTERNAL_PARAM_TYPE_INT, its value will be stored in the int pointed | ||
3863 | * by @p ret, returning EINA_TRUE. In any other case, the function returns | ||
3864 | * EINA_FALSE. | ||
3865 | * | ||
3866 | * @param params List of parameters where to look | ||
3867 | * @param key Name of the parameter to fetch | ||
3868 | * @param ret Int pointer where to store the value, must not be NULL. | ||
3869 | * | ||
3870 | * @return EINA_TRUE if the parameter was found and is of integer type, | ||
3871 | * EINA_FALSE otherwise. | ||
3872 | */ | ||
3873 | EAPI Eina_Bool edje_external_param_int_get (const Eina_List *params, const char *key, int *ret); | ||
3874 | /** | ||
3875 | * Get the value of the given parameter of double type. | ||
3876 | * | ||
3877 | * Look for the @p key parameter in the @p params list and return its value in | ||
3878 | * @p ret. If the parameter is found and is of type | ||
3879 | * #EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, its value will be stored in the double | ||
3880 | * pointed by @p ret, returning EINA_TRUE. In any other case, the function | ||
3881 | * returns EINA_FALSE. | ||
3882 | * | ||
3883 | * @param params List of parameters where to look | ||
3884 | * @param key Name of the parameter to fetch | ||
3885 | * @param ret Double pointer where to store the value, must not be NULL. | ||
3886 | * | ||
3887 | * @return EINA_TRUE if the parameter was found and is of double type, | ||
3888 | * EINA_FALSE otherwise. | ||
3889 | */ | ||
3890 | EAPI Eina_Bool edje_external_param_double_get (const Eina_List *params, const char *key, double *ret); | ||
3891 | /** | ||
3892 | * Get the value of the given parameter of string type. | ||
3893 | * | ||
3894 | * Look for the @p key parameter in the @p params list and return its value in | ||
3895 | * @p ret. If the parameter is found and is of type | ||
3896 | * #EDJE_EXTERNAL_PARAM_TYPE_STRING, its value will be stored in the pointer | ||
3897 | * pointed by @p ret, returning EINA_TRUE. In any other case, the function | ||
3898 | * returns EINA_FALSE. | ||
3899 | * | ||
3900 | * The string stored in @p ret must not be freed or modified. | ||
3901 | * | ||
3902 | * @param params List of parameters where to look | ||
3903 | * @param key Name of the parameter to fetch | ||
3904 | * @param ret String pointer where to store the value, must not be NULL. | ||
3905 | * | ||
3906 | * @return EINA_TRUE if the parameter was found and is of string type, | ||
3907 | * EINA_FALSE otherwise. | ||
3908 | */ | ||
3909 | EAPI Eina_Bool edje_external_param_string_get (const Eina_List *params, const char *key, const char **ret); | ||
3910 | /** | ||
3911 | * Get the value of the given parameter of boolean type. | ||
3912 | * | ||
3913 | * Look for the @p key parameter in the @p params list and return its value in | ||
3914 | * @p ret. If the parameter is found and is of type | ||
3915 | * #EDJE_EXTERNAL_PARAM_TYPE_BOOL, its value will be stored in the Eina_Bool | ||
3916 | * pointed by @p ret, returning EINA_TRUE. In any other case, the function | ||
3917 | * returns EINA_FALSE. | ||
3918 | * | ||
3919 | * @param params List of parameters where to look | ||
3920 | * @param key Name of the parameter to fetch | ||
3921 | * @param ret Eina_Bool pointer where to store the value, must not be NULL. | ||
3922 | * | ||
3923 | * @return EINA_TRUE if the parameter was found and is of boolean type, | ||
3924 | * EINA_FALSE otherwise. | ||
3925 | */ | ||
3926 | EAPI Eina_Bool edje_external_param_bool_get (const Eina_List *params, const char *key, Eina_Bool *ret); | ||
3927 | /** | ||
3928 | * Get the value of the given parameter of choice type. | ||
3929 | * | ||
3930 | * Look for the @p key parameter in the @p params list and return its value in | ||
3931 | * @p ret. If the parameter is found and is of type | ||
3932 | * #EDJE_EXTERNAL_PARAM_TYPE_CHOICE, its value will be stored in the string | ||
3933 | * pointed by @p ret, returning EINA_TRUE. In any other case, the function | ||
3934 | * returns EINA_FALSE. | ||
3935 | * | ||
3936 | * The string stored in @p ret must not be freed or modified. | ||
3937 | * | ||
3938 | * @param params List of parameters where to look | ||
3939 | * @param key Name of the parameter to fetch | ||
3940 | * @param ret String pointer where to store the value, must not be NULL. | ||
3941 | * | ||
3942 | * @return EINA_TRUE if the parameter was found and is of integer type, | ||
3943 | * EINA_FALSE otherwise. | ||
3944 | */ | ||
3945 | EAPI Eina_Bool edje_external_param_choice_get (const Eina_List *params, const char *key, const char **ret); | ||
3946 | |||
3947 | /** | ||
3948 | * Get the array of parameters information about a type given its name. | ||
3949 | * | ||
3950 | * @note the type names and other strings are static, that means they are | ||
3951 | * @b NOT translated. One must use | ||
3952 | * Edje_External_Type::translate() to translate those. | ||
3953 | * | ||
3954 | * @return the NULL terminated array, or @c NULL if type is unknown or | ||
3955 | * it does not have any parameter information. | ||
3956 | * | ||
3957 | * @see edje_external_type_get() | ||
3958 | */ | ||
3959 | EAPI const Edje_External_Param_Info *edje_external_param_info_get (const char *type_name); | ||
3960 | |||
3961 | /** | ||
3962 | * Get the #Edje_External_Type that defines an EXTERNAL type registered with | ||
3963 | * the name @p type_name. | ||
3964 | */ | ||
3965 | EAPI const Edje_External_Type *edje_external_type_get (const char *type_name); | ||
3966 | |||
3967 | EAPI Eina_Bool edje_module_load (const char *module); | ||
3968 | EAPI const Eina_List *edje_available_modules_get (void); | ||
3969 | |||
3970 | /* perspective info for maps inside edje objects */ | ||
3971 | typedef struct _Edje_Perspective Edje_Perspective; | ||
3972 | |||
3973 | /** | ||
3974 | * Creates a new perspective in the given canvas. | ||
3975 | * | ||
3976 | * @param e The given canvas (Evas). | ||
3977 | * @return An @ref Edje_Perspective object for this canvas, or @c NULL on errors. | ||
3978 | * | ||
3979 | * This function creates a perspective object that can be set on an Edje | ||
3980 | * object, or globally to all Edje objects on this canvas. | ||
3981 | * | ||
3982 | * @see edje_perspective_set() | ||
3983 | * @see edje_perspective_free() | ||
3984 | */ | ||
3985 | EAPI Edje_Perspective *edje_perspective_new (Evas *e); | ||
3986 | /** | ||
3987 | * Delete the given perspective object. | ||
3988 | * | ||
3989 | * @param ps A valid perspective object, or @c NULL. | ||
3990 | * | ||
3991 | * This function will delete the perspective object. If the perspective | ||
3992 | * effect was being applied to any Edje object or part, this effect won't be | ||
3993 | * applied anymore. | ||
3994 | * | ||
3995 | * @see edje_perspective_new() | ||
3996 | */ | ||
3997 | EAPI void edje_perspective_free (Edje_Perspective *ps); | ||
3998 | /** | ||
3999 | * Setup the transform for this perspective object. | ||
4000 | * | ||
4001 | * This sets the parameters of the perspective transformation. X, Y and Z | ||
4002 | * values are used. The px and py points specify the "infinite distance" point | ||
4003 | * in the 3D conversion (where all lines converge to like when artists draw | ||
4004 | * 3D by hand). The @p z0 value specifies the z value at which there is a 1:1 | ||
4005 | * mapping between spatial coordinates and screen coordinates. Any points | ||
4006 | * on this z value will not have their X and Y values modified in the transform. | ||
4007 | * Those further away (Z value higher) will shrink into the distance, and | ||
4008 | * those less than this value will expand and become bigger. The @p foc value | ||
4009 | * determines the "focal length" of the camera. This is in reality the distance | ||
4010 | * between the camera lens plane itself (at or closer than this rendering | ||
4011 | * results are undefined) and the "z0" z value. This allows for some "depth" | ||
4012 | * control and @p foc must be greater than 0. | ||
4013 | * | ||
4014 | * @param m map to change. | ||
4015 | * @param px The perspective distance X coordinate | ||
4016 | * @param py The perspective distance Y coordinate | ||
4017 | * @param z0 The "0" z plane value | ||
4018 | * @param foc The focal distance | ||
4019 | */ | ||
4020 | EAPI void edje_perspective_set (Edje_Perspective *ps, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc); | ||
4021 | /** | ||
4022 | * Make this perspective object be global for its canvas. | ||
4023 | * | ||
4024 | * @param ps The given perspective object | ||
4025 | * @param global @c EINA_TRUE if the perspective should be global, @c | ||
4026 | * EINA_FALSE otherwise. | ||
4027 | * | ||
4028 | * The canvas which this perspective object is being set as global is the one | ||
4029 | * given as argument upon the object creation (the @p evas parameter on the | ||
4030 | * function @c edje_perspective_new(evas) ). | ||
4031 | * | ||
4032 | * There can be only one global perspective object set per canvas, and if | ||
4033 | * a perspective object is set to global when there was already another | ||
4034 | * global perspective set, the old one will be set as non-global. | ||
4035 | * | ||
4036 | * A global perspective just affects a part if its Edje object doesn't have a | ||
4037 | * perspective object set to it, and if the part doesn't point to another | ||
4038 | * part to be used as perspective. | ||
4039 | * | ||
4040 | * @see edje_object_perspective_set() | ||
4041 | * @see edje_perspective_global_get() | ||
4042 | * @see edje_perspective_new() | ||
4043 | */ | ||
4044 | EAPI void edje_perspective_global_set (Edje_Perspective *ps, Eina_Bool global); | ||
4045 | /** | ||
4046 | * Get whether the given perspective object is global or not. | ||
4047 | * | ||
4048 | * @param ps The given perspective object. | ||
4049 | * @return @c EINA_TRUE if this perspective object is global, @c EINA_FALSE | ||
4050 | * otherwise. | ||
4051 | * | ||
4052 | * @see edje_perspective_global_set() | ||
4053 | */ | ||
4054 | EAPI Eina_Bool edje_perspective_global_get (const Edje_Perspective *ps); | ||
4055 | /** | ||
4056 | * Get the global perspective object set for this canvas. | ||
4057 | * | ||
4058 | * @param e The given canvas (Evas). | ||
4059 | * @return The perspective object set as global for this canvas. Or @c NULL | ||
4060 | * if there is no global perspective set and on errors. | ||
4061 | * | ||
4062 | * This function will return the perspective object that was set as global | ||
4063 | * with edje_perspective_global_set(). | ||
4064 | * | ||
4065 | * @see edje_perspective_global_set() | ||
4066 | * @see edje_perspective_global_get() | ||
4067 | */ | ||
4068 | EAPI const Edje_Perspective *edje_evas_global_perspective_get(const Evas *e); | ||
4069 | /** | ||
4070 | * Set the given perspective object on this Edje object. | ||
4071 | * | ||
4072 | * @param obj The Edje object on the perspective will be set. | ||
4073 | * @param ps The perspective object that will be used. | ||
4074 | * | ||
4075 | * Make the given perspective object be the default perspective for this Edje | ||
4076 | * object. | ||
4077 | * | ||
4078 | * There can be only one perspective object per Edje object, and if a | ||
4079 | * previous one was set, it will be removed and the new perspective object | ||
4080 | * will be used. | ||
4081 | * | ||
4082 | * An Edje perspective will only affect a part if it doesn't point to another | ||
4083 | * part to be used as perspective. | ||
4084 | * | ||
4085 | * @see edje_object_perspective_new() | ||
4086 | * @see edje_object_perspective_get() | ||
4087 | * @see edje_perspective_set() | ||
4088 | */ | ||
4089 | EAPI void edje_object_perspective_set (Evas_Object *obj, Edje_Perspective *ps); | ||
4090 | /** | ||
4091 | * Get the current perspective used on this Edje object. | ||
4092 | * | ||
4093 | * @param obj the given Edje object. | ||
4094 | * @return The perspective object being used on this Edje object. Or @c NULL | ||
4095 | * if there was none, and on errors. | ||
4096 | * | ||
4097 | * @see edje_object_perspective_set() | ||
4098 | */ | ||
4099 | EAPI const Edje_Perspective *edje_object_perspective_get (const Evas_Object *obj); | ||
4100 | |||
4101 | #ifdef __cplusplus | ||
4102 | } | ||
4103 | #endif | ||
4104 | |||
4105 | #endif | ||