diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/edje/src/lib/Edje_Edit.h | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to '')
-rw-r--r-- | libraries/edje/src/lib/Edje_Edit.h | 3539 |
1 files changed, 3539 insertions, 0 deletions
diff --git a/libraries/edje/src/lib/Edje_Edit.h b/libraries/edje/src/lib/Edje_Edit.h new file mode 100644 index 0000000..935d661 --- /dev/null +++ b/libraries/edje/src/lib/Edje_Edit.h | |||
@@ -0,0 +1,3539 @@ | |||
1 | #ifndef _EDJE_EDIT_H | ||
2 | #define _EDJE_EDIT_H | ||
3 | |||
4 | #ifndef EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT | ||
5 | #error "Do not use the Edje_Edit API unless you know what you are doing. It's meant only for writing editors and nothing else." | ||
6 | #endif | ||
7 | |||
8 | #include <Edje.h> | ||
9 | |||
10 | #ifdef EAPI | ||
11 | # undef EAPI | ||
12 | #endif | ||
13 | |||
14 | #ifdef _WIN32 | ||
15 | # ifdef EFL_EDJE_BUILD | ||
16 | # ifdef DLL_EXPORT | ||
17 | # define EAPI __declspec(dllexport) | ||
18 | # else | ||
19 | # define EAPI | ||
20 | # endif /* ! DLL_EXPORT */ | ||
21 | # else | ||
22 | # define EAPI __declspec(dllimport) | ||
23 | # endif /* ! EFL_EDJE_BUILD */ | ||
24 | #else | ||
25 | # ifdef __GNUC__ | ||
26 | # if __GNUC__ >= 4 | ||
27 | # define EAPI __attribute__ ((visibility("default"))) | ||
28 | # else | ||
29 | # define EAPI | ||
30 | # endif | ||
31 | # else | ||
32 | # define EAPI | ||
33 | # endif | ||
34 | #endif | ||
35 | |||
36 | |||
37 | typedef enum _Edje_Edit_Image_Comp | ||
38 | { | ||
39 | EDJE_EDIT_IMAGE_COMP_RAW, | ||
40 | EDJE_EDIT_IMAGE_COMP_USER, | ||
41 | EDJE_EDIT_IMAGE_COMP_COMP, | ||
42 | EDJE_EDIT_IMAGE_COMP_LOSSY | ||
43 | } Edje_Edit_Image_Comp; | ||
44 | |||
45 | struct _Edje_Edit_Script_Error | ||
46 | { | ||
47 | const char *program_name; /* null == group shared script */ | ||
48 | int line; | ||
49 | const char *error_str; | ||
50 | }; | ||
51 | typedef struct _Edje_Edit_Script_Error Edje_Edit_Script_Error; | ||
52 | |||
53 | /** | ||
54 | * @file | ||
55 | * @brief Functions to deal with edje internal object. Don't use in standard | ||
56 | * situations. The use of any of the edje_edit_* functions can break your | ||
57 | * theme ability, remember that the program must be separated from the interface! | ||
58 | * | ||
59 | * This was intended ONLY for use in an actual edje editor program. Unless | ||
60 | * you are writing one of these, do NOT use this API here. | ||
61 | * | ||
62 | * The API can be used to query or set every part of an edje object in real time. | ||
63 | * You can manage every aspect of parts, part states, programs, script and whatever | ||
64 | * is contained in the edje file. For a reference of what all parameter means | ||
65 | * look at the complete @ref edcref. | ||
66 | * | ||
67 | * Don't forget to free all the strings and the lists returned by any edje_edit_*() | ||
68 | * functions using edje_edit_string_free() and edje_edit_string_list_free() when | ||
69 | * you don't need anymore. | ||
70 | * | ||
71 | * Example: print all the part in a loaded edje_object | ||
72 | * @code | ||
73 | * Eina_List *parts, *l; | ||
74 | * char *part; | ||
75 | * | ||
76 | * parts = edje_edit_parts_list_get(edje_object); | ||
77 | * EINA_LIST_FOREACH(parts, l, part) | ||
78 | * { | ||
79 | * printf("Part: %s\n", part); | ||
80 | * } | ||
81 | * edje_edit_string_list_free(parts); | ||
82 | * @endcode | ||
83 | * | ||
84 | * Example: Change the color of a rect inside an edje file | ||
85 | * @code | ||
86 | * Evas_Object *edje; | ||
87 | * | ||
88 | * edje = edje_edit_object_add(evas); | ||
89 | * edje_object_file_set(edje, "edj/file/name", "group to load"); | ||
90 | * edje_edit_state_color_set(edje, "MyRectName", "default", 0.00, 255, 255, 0, 255); | ||
91 | * edje_edit_save(edje); | ||
92 | * @endcode | ||
93 | * | ||
94 | */ | ||
95 | |||
96 | |||
97 | #ifdef __cplusplus | ||
98 | extern "C" { | ||
99 | #endif | ||
100 | |||
101 | /******************************************************************************/ | ||
102 | /************************** GENERAL API ***********************************/ | ||
103 | /******************************************************************************/ | ||
104 | /** @name General API | ||
105 | * General functions that don't fit in other cateories. | ||
106 | */ //@{ | ||
107 | |||
108 | /** Adds an editable Edje object to the canvas. | ||
109 | * | ||
110 | * An Edje_Edit object is, for the most part, a standard Edje object. Only | ||
111 | * difference is you can use the Edje_Edit API on them. | ||
112 | * | ||
113 | * @param e Evas canvas where to add the object. | ||
114 | * | ||
115 | * @return An Evas_Object of type Edje_Edit, or NULL if an error occurred. | ||
116 | */ | ||
117 | EAPI Evas_Object * edje_edit_object_add(Evas *e); | ||
118 | |||
119 | /** Free a generic Eina_List of (char *) allocated by an edje_edit_*_get() function. | ||
120 | * | ||
121 | * @param lst List of strings to free. | ||
122 | */ | ||
123 | EAPI void edje_edit_string_list_free(Eina_List *lst); | ||
124 | |||
125 | /** Free a generic string (char *) allocated by an edje_edit_*_get() function. | ||
126 | * | ||
127 | * @param str String to free. | ||
128 | */ | ||
129 | EAPI void edje_edit_string_free(const char *str); | ||
130 | |||
131 | /** Get the name of the program that compiled the edje file. | ||
132 | * Can be 'edje_cc' or 'edje_edit' | ||
133 | * | ||
134 | * @param obj Object being edited. | ||
135 | * | ||
136 | * @return Compiler stored in the Edje file | ||
137 | */ | ||
138 | EAPI const char * edje_edit_compiler_get(Evas_Object *obj); | ||
139 | |||
140 | /** Save the modified edje object back to his file. | ||
141 | * | ||
142 | * Use this function when you are done with your editing, all the change made | ||
143 | * to the current loaded group will be saved back to the original file. | ||
144 | * | ||
145 | * @note Source for the whole file will be auto generated and will overwrite | ||
146 | * any previously stored source. | ||
147 | * | ||
148 | * @param obj Object to save back to the file it was loaded from. | ||
149 | * | ||
150 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
151 | * | ||
152 | * @todo Add a way to check what the error actually was, the way Edje Load does. | ||
153 | */ | ||
154 | EAPI Eina_Bool edje_edit_save(Evas_Object *obj); | ||
155 | |||
156 | /** Saves every group back into the file. | ||
157 | * | ||
158 | * @param obj Object to save. | ||
159 | * | ||
160 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
161 | * | ||
162 | * @see edje_edit_save() | ||
163 | */ | ||
164 | EAPI Eina_Bool edje_edit_save_all(Evas_Object *obj); | ||
165 | |||
166 | /** Print on standard output many information about the internal status | ||
167 | * of the edje object. | ||
168 | * | ||
169 | * This is probably only useful to debug. | ||
170 | * | ||
171 | * @param obj Object being edited. | ||
172 | */ | ||
173 | EAPI void edje_edit_print_internal_status(Evas_Object *obj); | ||
174 | |||
175 | |||
176 | //@} | ||
177 | /******************************************************************************/ | ||
178 | /************************** GROUPS API ************************************/ | ||
179 | /******************************************************************************/ | ||
180 | /** @name Groups API | ||
181 | * Functions to deal with groups property (see @ref edcref). | ||
182 | */ //@{ | ||
183 | |||
184 | /** Create a new empty group in the given edje. | ||
185 | * | ||
186 | * If a group with the same name exist none is created. | ||
187 | * | ||
188 | * @param obj Object being edited. | ||
189 | * @param name Name of the new group. | ||
190 | * | ||
191 | * @return EINA_TRUE if successfully added the group, EINA_FALSE if an error | ||
192 | * occurred or if a group with the same name exists. | ||
193 | */ | ||
194 | |||
195 | /** | ||
196 | * @brief Add an edje (empty) group to an edje object's group set. | ||
197 | * | ||
198 | * @param obj The pointer to edje object. | ||
199 | * @param name The name of the group. | ||
200 | * | ||
201 | * @return 1 If it could allocate memory to the part group added | ||
202 | * or zero if not. | ||
203 | * | ||
204 | * This function adds, at run time, one more group, which will reside | ||
205 | * in memory, to the group set found in the .edj file which @a obj was | ||
206 | * loaded with. This group can be manipulated by other API functions, | ||
207 | * like @c edje_edit_part_add(), for example. If desired, the new | ||
208 | * group can be actually committed the respective .edj by use of @c | ||
209 | * edje_edit_save(). | ||
210 | * | ||
211 | */ | ||
212 | EAPI Eina_Bool edje_edit_group_add(Evas_Object *obj, const char *name); | ||
213 | |||
214 | /** Delete the specified group from the given edje. | ||
215 | * | ||
216 | * You can only delete a currently unused group. | ||
217 | * All the parts and the programs inside the group will be deleted as well, | ||
218 | * but not image or font embedded in the edje. | ||
219 | * | ||
220 | * @param obj Object being edited. | ||
221 | * @param group_name Name of group to delete. | ||
222 | * | ||
223 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
224 | */ | ||
225 | |||
226 | /** | ||
227 | * @brief Delete the specified group from the edje file. | ||
228 | * | ||
229 | * @param obj The pointer to the edje object. | ||
230 | * @param group_name Group to delete. | ||
231 | * | ||
232 | * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. | ||
233 | * | ||
234 | * This function deletes the given group from the file @a obj is set to. This | ||
235 | * operation can't be undone as all references to the group are removed from | ||
236 | * the file. | ||
237 | * This function may fail if the group to be deleted is currently in use. | ||
238 | * | ||
239 | */ | ||
240 | EAPI Eina_Bool edje_edit_group_del(Evas_Object *obj, const char *group_name); | ||
241 | |||
242 | /** Check if a group with the given name exist in the edje. | ||
243 | * | ||
244 | * @param obj Object being edited. | ||
245 | * @param group Group name to check for. | ||
246 | * | ||
247 | * @return EINA_TRUE if group exists, EINA_FALSE if not. | ||
248 | */ | ||
249 | EAPI Eina_Bool edje_edit_group_exist(Evas_Object *obj, const char *group); | ||
250 | |||
251 | /** Set a new name for the current open group. | ||
252 | * | ||
253 | * You can only rename a group that is currently loaded | ||
254 | * Note that the relative getter function don't exist as it doesn't make sense ;) | ||
255 | * @param obj Object being edited. | ||
256 | * @param new_name New name for the group. | ||
257 | * | ||
258 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
259 | */ | ||
260 | EAPI Eina_Bool edje_edit_group_name_set(Evas_Object *obj, const char *new_name); | ||
261 | |||
262 | /** Get the group minimum width. | ||
263 | * | ||
264 | * @param obj Object being edited. | ||
265 | * | ||
266 | * @return The minimum width set for the group. -1 if an error occurred. | ||
267 | */ | ||
268 | EAPI int edje_edit_group_min_w_get(Evas_Object *obj); | ||
269 | |||
270 | /** Set the group minimum width. | ||
271 | * | ||
272 | * @param obj Object being edited. | ||
273 | * @param w New minimum width for the group. | ||
274 | */ | ||
275 | EAPI void edje_edit_group_min_w_set(Evas_Object *obj, int w); | ||
276 | |||
277 | /** Get the group minimum height. | ||
278 | * | ||
279 | * @param obj Object being edited. | ||
280 | * | ||
281 | * @return The minimum height set for the group. -1 if an error occurred. | ||
282 | */ | ||
283 | EAPI int edje_edit_group_min_h_get(Evas_Object *obj); | ||
284 | |||
285 | /** Set the group minimum height. | ||
286 | * | ||
287 | * @param obj Object being edited. | ||
288 | * @param h New minimum height for the group. | ||
289 | */ | ||
290 | EAPI void edje_edit_group_min_h_set(Evas_Object *obj, int h); | ||
291 | |||
292 | /** Get the group maximum width. | ||
293 | * | ||
294 | * @param obj Object being edited. | ||
295 | * | ||
296 | * @return The maximum width set for the group. -1 if an error occurred. | ||
297 | */ | ||
298 | EAPI int edje_edit_group_max_w_get(Evas_Object *obj); | ||
299 | |||
300 | /** Set the group maximum width. | ||
301 | * | ||
302 | * @param obj Object being edited. | ||
303 | * @param w New maximum width for the group. | ||
304 | */ | ||
305 | EAPI void edje_edit_group_max_w_set(Evas_Object *obj, int w); | ||
306 | |||
307 | /** Get the group maximum height. | ||
308 | * | ||
309 | * @param obj Object being edited. | ||
310 | * | ||
311 | * @return The maximum height set for the group. -1 if an error occurred. | ||
312 | */ | ||
313 | EAPI int edje_edit_group_max_h_get(Evas_Object *obj); | ||
314 | |||
315 | /** Set the group maximum height. | ||
316 | * | ||
317 | * @param obj Object being edited. | ||
318 | * @param h New maximum height for the group. | ||
319 | */ | ||
320 | EAPI void edje_edit_group_max_h_set(Evas_Object *obj, int h); | ||
321 | |||
322 | |||
323 | //@} | ||
324 | /******************************************************************************/ | ||
325 | /************************** DATA API **************************************/ | ||
326 | /******************************************************************************/ | ||
327 | /** @name Data API | ||
328 | * Functions to deal with data embedded in the edje (see @ref edcref). | ||
329 | */ //@{ | ||
330 | |||
331 | /** Retrieves a list with the item names inside the data block. | ||
332 | * | ||
333 | * @param obj Object being edited. | ||
334 | * | ||
335 | * @return List of strings, each being a name entry in the global data block for the file. | ||
336 | */ | ||
337 | EAPI Eina_List * edje_edit_data_list_get(Evas_Object *obj); | ||
338 | |||
339 | /** Create a new *global* data object in the given edje file. | ||
340 | * | ||
341 | * If another data entry with the same name exists, nothing is created and | ||
342 | * EINA_FALSE is returned. | ||
343 | * | ||
344 | * @param obj Object being edited. | ||
345 | * @param itemname Name for the new data entry. | ||
346 | * @param value Value for the new data entry. | ||
347 | * | ||
348 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
349 | */ | ||
350 | EAPI Eina_Bool edje_edit_data_add(Evas_Object *obj, const char *itemname, const char *value); | ||
351 | |||
352 | /** Delete the given data object from edje. | ||
353 | * | ||
354 | * @param obj Object being edited. | ||
355 | * @param itemname Data entry to remove from the global data block. | ||
356 | * | ||
357 | * @return EINA_TRUE on success, EINA_FALSE otherwise. | ||
358 | */ | ||
359 | EAPI Eina_Bool edje_edit_data_del(Evas_Object *obj, const char *itemname); | ||
360 | |||
361 | /** Get the data associated with the given itemname. | ||
362 | * | ||
363 | * @param obj Object being edited. | ||
364 | * @param itemname Name of the data entry to fetch the value for. | ||
365 | * | ||
366 | * @return Value of the given entry, or NULL if not found. | ||
367 | */ | ||
368 | EAPI const char * edje_edit_data_value_get(Evas_Object *obj, const char *itemname); | ||
369 | |||
370 | /** Set the data associated with the given itemname. | ||
371 | * | ||
372 | * @param obj Object being edited. | ||
373 | * @param itemname Name of data entry to change the value. | ||
374 | * @param value New value for the entry. | ||
375 | * | ||
376 | * @return EINA_TRUE on success, EINA_FALSE otherwise. | ||
377 | */ | ||
378 | EAPI Eina_Bool edje_edit_data_value_set(Evas_Object *obj, const char *itemname, const char *value); | ||
379 | |||
380 | /** Change the name of the given data object. | ||
381 | * | ||
382 | * @param obj Object being edited. | ||
383 | * @param itemname Data entry to rename. | ||
384 | * @param newname New name for the data entry. | ||
385 | * | ||
386 | * @return EINA_TRUE on success, EINA_FALSE otherwise. | ||
387 | */ | ||
388 | EAPI Eina_Bool edje_edit_data_name_set(Evas_Object *obj, const char *itemname, const char *newname); | ||
389 | |||
390 | /** Retrieves a list with the item names inside the data block at the group level. | ||
391 | * | ||
392 | * @param obj Object being edited. | ||
393 | * | ||
394 | * @return List of strings, each being a name entry in the data block for the group. | ||
395 | */ | ||
396 | EAPI Eina_List * edje_edit_group_data_list_get(Evas_Object *obj); | ||
397 | |||
398 | /** Create a new data object in the given edje file *belonging to the current group*. | ||
399 | * | ||
400 | * If another data entry with the same name exists, | ||
401 | * nothing is created and EINA_FALSE is returned. | ||
402 | * | ||
403 | * @param obj Object being edited. | ||
404 | * @param itemname Name for the new data entry. | ||
405 | * @param value Value for the new data entry. | ||
406 | * | ||
407 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
408 | */ | ||
409 | EAPI Eina_Bool edje_edit_group_data_add(Evas_Object *obj, const char *itemname, const char *value); | ||
410 | |||
411 | /** Delete the given data object from the group. | ||
412 | * | ||
413 | * @param obj Object being edited. | ||
414 | * @param itemname Name of the data entry to remove. | ||
415 | * | ||
416 | * @return EINA_TRUE on success, EINA_FALSE otherwise. | ||
417 | */ | ||
418 | EAPI Eina_Bool edje_edit_group_data_del(Evas_Object *obj, const char *itemname); | ||
419 | |||
420 | /** Get the data associated with the given itemname. | ||
421 | * | ||
422 | * @param obj Object being edited. | ||
423 | * @param itemname Name of the data entry. | ||
424 | * | ||
425 | * @return Value of the data entry or NULL if not found. | ||
426 | */ | ||
427 | EAPI const char * edje_edit_group_data_value_get(Evas_Object *obj, const char *itemname); | ||
428 | |||
429 | /** Set the data associated with the given itemname. | ||
430 | * | ||
431 | * @param obj Object being edited. | ||
432 | * @param itemname Name of the data entry to set the value. | ||
433 | * @param value Value to set for the data entry. | ||
434 | * | ||
435 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
436 | */ | ||
437 | EAPI Eina_Bool edje_edit_group_data_value_set(Evas_Object *obj, const char *itemname, const char *value); | ||
438 | |||
439 | /** Change the name of the given data object. | ||
440 | * | ||
441 | * @param obj Object being edited. | ||
442 | * @param itemname Name of the data entry to rename. | ||
443 | * @param newname New name for the data entry. | ||
444 | * | ||
445 | * @return EINA_TRUE on success, EINA_FALSE otherwise. | ||
446 | */ | ||
447 | EAPI Eina_Bool edje_edit_group_data_name_set(Evas_Object *obj, const char *itemname, const char *newname); | ||
448 | |||
449 | |||
450 | //@} | ||
451 | /******************************************************************************/ | ||
452 | /*********************** COLOR CLASSES API ********************************/ | ||
453 | /******************************************************************************/ | ||
454 | /** @name Color Classes API | ||
455 | * Functions to deal with Color Classes (see @ref edcref). | ||
456 | */ //@{ | ||
457 | |||
458 | /** Get the list of all the Color Classes in the given edje object. | ||
459 | * | ||
460 | * @param obj Object being edited. | ||
461 | * | ||
462 | * @return List of strings, each being one color class. | ||
463 | */ | ||
464 | EAPI Eina_List * edje_edit_color_classes_list_get(Evas_Object *obj); | ||
465 | |||
466 | /** Create a new color class object in the given edje. | ||
467 | * | ||
468 | * If another class with the same name exists nothing is created and EINA_FALSE is returned. | ||
469 | * | ||
470 | * @param obj Object being edited. | ||
471 | * @param name Name for the new color class. | ||
472 | * | ||
473 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
474 | */ | ||
475 | EAPI Eina_Bool edje_edit_color_class_add(Evas_Object *obj, const char *name); | ||
476 | |||
477 | /** Delete the given class object from edje. | ||
478 | * | ||
479 | * @param obj Object being edited. | ||
480 | * @param name Color class to delete. | ||
481 | * | ||
482 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
483 | */ | ||
484 | EAPI Eina_Bool edje_edit_color_class_del(Evas_Object *obj, const char *name); | ||
485 | |||
486 | /** Get all the colors that compose the class. | ||
487 | * | ||
488 | * You can pass NULL to colors you are not intrested in. | ||
489 | * | ||
490 | * @param obj Object being edited. | ||
491 | * @param class_name Color class to fetch values. | ||
492 | * @param r Red component of main color. | ||
493 | * @param g Green component of main color. | ||
494 | * @param b Blue component of main color. | ||
495 | * @param a Alpha component of main color. | ||
496 | * @param r2 Red component of secondary color. | ||
497 | * @param g2 Green component of secondary color. | ||
498 | * @param b2 Blue component of secondary color. | ||
499 | * @param a2 Alpha component of secondary color. | ||
500 | * @param r3 Red component of tertiary color. | ||
501 | * @param g3 Green component of tertiary color. | ||
502 | * @param b3 Blue component of tertiary color. | ||
503 | * @param a3 Alpha component of tertiary color. | ||
504 | * | ||
505 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
506 | */ | ||
507 | EAPI Eina_Bool edje_edit_color_class_colors_get(Evas_Object *obj, const char *class_name, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3); | ||
508 | |||
509 | /** Set the colors for the given color class. | ||
510 | * | ||
511 | * If you set a color to -1 it will not be touched. | ||
512 | * | ||
513 | * @param obj Object being edited. | ||
514 | * @param class_name Color class to fetch values. | ||
515 | * @param r Red component of main color. | ||
516 | * @param g Green component of main color. | ||
517 | * @param b Blue component of main color. | ||
518 | * @param a Alpha component of main color. | ||
519 | * @param r2 Red component of secondary color. | ||
520 | * @param g2 Green component of secondary color. | ||
521 | * @param b2 Blue component of secondary color. | ||
522 | * @param a2 Alpha component of secondary color. | ||
523 | * @param r3 Red component of tertiary color. | ||
524 | * @param g3 Green component of tertiary color. | ||
525 | * @param b3 Blue component of tertiary color. | ||
526 | * @param a3 Alpha component of tertiary color. | ||
527 | * | ||
528 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
529 | */ | ||
530 | EAPI Eina_Bool edje_edit_color_class_colors_set(Evas_Object *obj, const char *class_name, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3); | ||
531 | |||
532 | /** Change the name of a color class. | ||
533 | * | ||
534 | * @param obj Object being edited. | ||
535 | * @param name Color class to rename. | ||
536 | * @param newname New name for the color class. | ||
537 | * | ||
538 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
539 | */ | ||
540 | EAPI Eina_Bool edje_edit_color_class_name_set(Evas_Object *obj, const char *name, const char *newname); | ||
541 | |||
542 | //@} | ||
543 | |||
544 | |||
545 | /******************************************************************************/ | ||
546 | /************************** TEXT STYLES *************************************/ | ||
547 | /******************************************************************************/ | ||
548 | /** @name Text styles API | ||
549 | * Functions to deal with text styles (see @ref edcref). | ||
550 | */ //@{ | ||
551 | |||
552 | /** Get the list of all the text styles in the given edje object. | ||
553 | * | ||
554 | * @param obj Object being edited. | ||
555 | * | ||
556 | * @return List of strings, each being the name for a text style. | ||
557 | */ | ||
558 | EAPI Eina_List * edje_edit_styles_list_get(Evas_Object *obj); | ||
559 | |||
560 | /** Create a new text style object in the given edje. | ||
561 | * | ||
562 | * If another style with the same name exists nothing is created and EINA_FALSE is returned. | ||
563 | * | ||
564 | * @param obj Object being edited. | ||
565 | * @param style Name for the new style. | ||
566 | * | ||
567 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
568 | */ | ||
569 | EAPI Eina_Bool edje_edit_style_add(Evas_Object *obj, const char *style); | ||
570 | |||
571 | /** Delete the given text style and all the child tags. | ||
572 | * | ||
573 | * @param obj Object being edited. | ||
574 | * @param style Style to delete. | ||
575 | */ | ||
576 | EAPI void edje_edit_style_del(Evas_Object *obj, const char *style); | ||
577 | |||
578 | /** Get the list of all the tags name in the given text style. | ||
579 | * | ||
580 | * @param obj Object being edited. | ||
581 | * @param style Style to get the tags for. | ||
582 | * | ||
583 | * @return List of strings, each being one tag in the given style. | ||
584 | */ | ||
585 | EAPI Eina_List * edje_edit_style_tags_list_get(Evas_Object *obj, const char *style); | ||
586 | |||
587 | /** Get the value of the given tag. | ||
588 | * | ||
589 | * @param obj Object being edited. | ||
590 | * @param style Style containing the tag being. | ||
591 | * @param tag Tag to get the value for. | ||
592 | * | ||
593 | * @return Value of the given tag. | ||
594 | */ | ||
595 | EAPI const char * edje_edit_style_tag_value_get(Evas_Object *obj, const char *style, const char *tag); | ||
596 | |||
597 | /** Set the value of the given tag. | ||
598 | * | ||
599 | * @param obj Object being edited. | ||
600 | * @param style Style containing the tag to change. | ||
601 | * @param tag Name of the tag to set the value for. | ||
602 | * @param new_value Value for the tag. | ||
603 | */ | ||
604 | EAPI void edje_edit_style_tag_value_set(Evas_Object *obj, const char *style, const char *tag, const char *new_value); | ||
605 | |||
606 | /** Set the name of the given tag. | ||
607 | * | ||
608 | * @param obj Object being edited. | ||
609 | * @param style Style containing the tag to rename. | ||
610 | * @param tag Tag to rename. | ||
611 | * @param new_name New name for the tag. | ||
612 | */ | ||
613 | EAPI void edje_edit_style_tag_name_set(Evas_Object *obj, const char *style, const char *tag, const char *new_name); | ||
614 | |||
615 | /** Add a new tag to the given text style. | ||
616 | * | ||
617 | * If another tag with the same name exists nothing is created and EINA_FALSE is returned. | ||
618 | * | ||
619 | * @param obj Object being edited. | ||
620 | * @param style Style where to add the new tag. | ||
621 | * @param tag_name Name for the new tag. | ||
622 | * | ||
623 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
624 | */ | ||
625 | EAPI Eina_Bool edje_edit_style_tag_add(Evas_Object *obj, const char *style, const char *tag_name); | ||
626 | |||
627 | /** Delete the given tag. | ||
628 | * | ||
629 | * @param obj Object being edited. | ||
630 | * @param style Style from where to remove the tag. | ||
631 | * @param tag Tag to delete. | ||
632 | */ | ||
633 | EAPI void edje_edit_style_tag_del(Evas_Object *obj, const char *style, const char *tag); | ||
634 | |||
635 | |||
636 | //@} | ||
637 | /******************************************************************************/ | ||
638 | /************************ EXTERNALS API ***********************************/ | ||
639 | /******************************************************************************/ | ||
640 | /** @name Externals API | ||
641 | * Functions to deal with list of external modules (see @ref edcref). | ||
642 | */ //@{ | ||
643 | |||
644 | /** Get the list of all the externals requested in the given edje object. | ||
645 | * | ||
646 | * @param obj Object being edited. | ||
647 | * | ||
648 | * @return List of strings, each being an entry in the block of automatically loaded external modules. | ||
649 | */ | ||
650 | EAPI Eina_List * edje_edit_externals_list_get(Evas_Object *obj); | ||
651 | |||
652 | /** Add an external module to be requested on edje load. | ||
653 | * | ||
654 | * @param obj Object being edited. | ||
655 | * @param external Name of the external module to add to the list of autoload. | ||
656 | * | ||
657 | * @return EINA_TRUE on success (or it was already there), EINA_FALSE otherwise. | ||
658 | */ | ||
659 | EAPI Eina_Bool edje_edit_external_add(Evas_Object *obj, const char *external); | ||
660 | |||
661 | /** Delete the given external from the list. | ||
662 | * | ||
663 | * @param obj Object being edited. | ||
664 | * @param external Name of the external module to remove from the autoload list. | ||
665 | * | ||
666 | * @return EINA_TRUE on success, EINA_FALSE otherwise. | ||
667 | */ | ||
668 | EAPI Eina_Bool edje_edit_external_del(Evas_Object *obj, const char *external); | ||
669 | |||
670 | |||
671 | //@} | ||
672 | /******************************************************************************/ | ||
673 | /************************** PARTS API *************************************/ | ||
674 | /******************************************************************************/ | ||
675 | /** @name Parts API | ||
676 | * Functions to deal with part objects (see @ref edcref). | ||
677 | */ //@{ | ||
678 | |||
679 | /** Get the list of all the parts in the given edje object. | ||
680 | * | ||
681 | * @param obj Object being edited. | ||
682 | * | ||
683 | * @return List of strings, each being the name for a part in the open group. | ||
684 | */ | ||
685 | EAPI Eina_List * edje_edit_parts_list_get(Evas_Object *obj); | ||
686 | |||
687 | /** Create a new part in the given edje. | ||
688 | * | ||
689 | * If another part with the same name just exists nothing is created and EINA_FALSE is returned. | ||
690 | * Note that this function also create a default description for the part. | ||
691 | * | ||
692 | * @param obj Object being edited. | ||
693 | * @param name Name for the new part. | ||
694 | * @param type Type of the new part. See @ref edcref for more info on this. | ||
695 | * | ||
696 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
697 | */ | ||
698 | EAPI Eina_Bool edje_edit_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type); | ||
699 | |||
700 | /** Create a new part of type EXTERNAL in the given edje. | ||
701 | * | ||
702 | * If another part with the same name just exists nothing is created and EINA_FALSE is returned. | ||
703 | * Note that this function also create a default description for the part. | ||
704 | * | ||
705 | * @param obj Object being edited. | ||
706 | * @param name Name for the new part. | ||
707 | * @param source The registered external type to use for this part. | ||
708 | * | ||
709 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
710 | */ | ||
711 | EAPI Eina_Bool edje_edit_part_external_add(Evas_Object *obj, const char *name, const char *source); | ||
712 | |||
713 | /** Delete the given part from the edje. | ||
714 | * | ||
715 | * All the reference to this part will be zeroed. | ||
716 | * | ||
717 | * @param obj Object being edited. | ||
718 | * @param part Name of part to delete. | ||
719 | * | ||
720 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
721 | */ | ||
722 | EAPI Eina_Bool edje_edit_part_del(Evas_Object *obj, const char *part); | ||
723 | |||
724 | /** Check if a part with the given name exist in the edje object. | ||
725 | * | ||
726 | * @param obj Object being edited. | ||
727 | * @param part Name of part to check for its existence. | ||
728 | * | ||
729 | * @return EINA_TRUE if the part exists, EINA_FALSE if not. | ||
730 | */ | ||
731 | EAPI Eina_Bool edje_edit_part_exist(Evas_Object *obj, const char *part); | ||
732 | |||
733 | /** Get the name of part stacked above the one passed. | ||
734 | * | ||
735 | * @param obj Object being edited. | ||
736 | * @param part Name of part of which to check the one above. | ||
737 | * | ||
738 | * @return Name of the part above. NULL if an error occurred or if @p part is | ||
739 | * the topmost part in the group. | ||
740 | */ | ||
741 | EAPI const char * edje_edit_part_above_get(Evas_Object *obj, const char *part); | ||
742 | |||
743 | /** Get the name of part stacked below the one passed. | ||
744 | * | ||
745 | * @param obj Object being edited. | ||
746 | * @param part Name of part of which to check the one below. | ||
747 | * | ||
748 | * @return Name of the part below. NULL if an error occurred or if @p part is | ||
749 | * the bottommost part in the group. | ||
750 | */ | ||
751 | EAPI const char * edje_edit_part_below_get(Evas_Object *obj, const char *part); | ||
752 | |||
753 | /** Move the given part below the previous one. | ||
754 | * | ||
755 | * @param obj Object being edited. | ||
756 | * @param part Name of part to move one step below. | ||
757 | * | ||
758 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
759 | */ | ||
760 | EAPI Eina_Bool edje_edit_part_restack_below(Evas_Object *obj, const char *part); | ||
761 | |||
762 | /** Move the given part above the next one. | ||
763 | * | ||
764 | * @param obj Object being edited. | ||
765 | * @param part Name of part to move one step above. | ||
766 | * | ||
767 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
768 | */ | ||
769 | EAPI Eina_Bool edje_edit_part_restack_above(Evas_Object *obj, const char *part); | ||
770 | |||
771 | /** Set a new name for part. | ||
772 | * | ||
773 | * Note that the relative getter function don't exist as it don't make sense ;) | ||
774 | * | ||
775 | * @param obj Object being edited. | ||
776 | * @param part Name of part to rename. | ||
777 | * @param new_name New name for the given part. | ||
778 | * | ||
779 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
780 | */ | ||
781 | EAPI Eina_Bool edje_edit_part_name_set(Evas_Object *obj, const char *part, const char *new_name); | ||
782 | |||
783 | /** Get api's name of a part. | ||
784 | * | ||
785 | * @param obj Object being edited. | ||
786 | * @param part Name of the part. | ||
787 | * | ||
788 | * @return name of the api if successful, NULL otherwise. | ||
789 | */ | ||
790 | EAPI const char * edje_edit_part_api_name_get(Evas_Object *obj, const char *part); | ||
791 | |||
792 | /** Get api's description of a part. | ||
793 | * | ||
794 | * @param obj Object being edited. | ||
795 | * @param part Name of the part. | ||
796 | * | ||
797 | * @return description of the api if successful, NULL otherwise. | ||
798 | */ | ||
799 | EAPI const char * edje_edit_part_api_description_get(Evas_Object *obj, const char *part); | ||
800 | |||
801 | /** Set api's name of a part. | ||
802 | * | ||
803 | * @param obj Object being edited. | ||
804 | * @param part Name of the part. | ||
805 | * @param name New name for the api property. | ||
806 | * | ||
807 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
808 | */ | ||
809 | EAPI Eina_Bool edje_edit_part_api_name_set(Evas_Object *obj, const char *part, const char *name); | ||
810 | |||
811 | /** Set api's description of a part. | ||
812 | * | ||
813 | * @param obj Object being edited. | ||
814 | * @param part Name of part. | ||
815 | * @param description New description for the api property. | ||
816 | * | ||
817 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
818 | */ | ||
819 | EAPI Eina_Bool edje_edit_part_api_description_set(Evas_Object *obj, const char *part, const char *description); | ||
820 | |||
821 | /** Get the type of a part. | ||
822 | * | ||
823 | * @param obj Object being edited. | ||
824 | * @param part Name of part to get the type of. | ||
825 | * | ||
826 | * @return Type of the part. See @ref edcref for details. | ||
827 | */ | ||
828 | EAPI Edje_Part_Type edje_edit_part_type_get(Evas_Object *obj, const char *part); | ||
829 | |||
830 | /** Get the clip_to part. | ||
831 | * | ||
832 | * @param obj Object being edited. | ||
833 | * @param part Name of the part whose clipper to get. | ||
834 | * | ||
835 | * @return Name of the part @p part is clipped to. NULL is returned on errors and if the part don't have a clip. | ||
836 | */ | ||
837 | EAPI const char * edje_edit_part_clip_to_get(Evas_Object *obj, const char *part); | ||
838 | |||
839 | /** Set a part to clip part to. | ||
840 | * | ||
841 | * @param obj Object being edited. | ||
842 | * @param part Part to set the clipper to. | ||
843 | * @param clip_to Part to use as clipper, if NULL then the clipping value will be cancelled (unset clipping). | ||
844 | * | ||
845 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
846 | */ | ||
847 | EAPI Eina_Bool edje_edit_part_clip_to_set(Evas_Object *obj, const char *part, const char *clip_to); | ||
848 | |||
849 | /** Get the source of part. | ||
850 | * | ||
851 | * The meaning of this parameter varies depending on the type of the part. | ||
852 | * For GROUP parts, it's the name of another group in the Edje file which will | ||
853 | * be autoloaded and swallowed on this part. | ||
854 | * For TEXTBLOCK parts, it's the name of a group to be used for selection | ||
855 | * display under the text. | ||
856 | * For EXTERNAL parts, it's the name of the registered external widget to load | ||
857 | * and swallow on this part. | ||
858 | * | ||
859 | * @param obj Object being edited. | ||
860 | * @param part Part to get the source from. | ||
861 | * | ||
862 | * @return Content of the source parameter or NULL if nothing set or an error occurred. | ||
863 | */ | ||
864 | EAPI const char * edje_edit_part_source_get(Evas_Object *obj, const char *part); | ||
865 | |||
866 | /** Set the source of part. | ||
867 | * | ||
868 | * @param obj Object being edited. | ||
869 | * @param part Part to set the source of. | ||
870 | * @param source Value for the source parameter. | ||
871 | * | ||
872 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
873 | * | ||
874 | * @see edje_edit_part_source_get() | ||
875 | * | ||
876 | * @note You can't change the source for EXTERNAL parts, it's akin to changing | ||
877 | * the type of the part. | ||
878 | * | ||
879 | * NOTE: This is not applied now. You must reload the edje to see the change. | ||
880 | */ | ||
881 | EAPI Eina_Bool edje_edit_part_source_set(Evas_Object *obj, const char *part, const char *source); | ||
882 | |||
883 | /** Get the effect for a given part. | ||
884 | * | ||
885 | * Gets the effect used for parts of type TEXT. See @ref edcref for more details. | ||
886 | * | ||
887 | * @param obj Object being edited. | ||
888 | * @param part Part to get the effect of. | ||
889 | * | ||
890 | * @return The effect set for the part. | ||
891 | */ | ||
892 | EAPI Edje_Text_Effect edje_edit_part_effect_get(Evas_Object *obj, const char *part); | ||
893 | |||
894 | /** Set the effect for a given part. | ||
895 | * | ||
896 | * @param obj Object being edited. | ||
897 | * @param part Part to set the effect to. Only makes sense on type TEXT. | ||
898 | * @param effect Effect to set for the part. | ||
899 | */ | ||
900 | EAPI void edje_edit_part_effect_set(Evas_Object *obj, const char *part, Edje_Text_Effect effect); | ||
901 | |||
902 | /** Get the current selected state in part. | ||
903 | * | ||
904 | * @param obj Object being edited. | ||
905 | * @param part Part to get the selected state of. | ||
906 | * @param value Pointer to a double where the value of the state will be stored. | ||
907 | * | ||
908 | * @return The name of the currently selected state for the part. | ||
909 | */ | ||
910 | EAPI const char * edje_edit_part_selected_state_get(Evas_Object *obj, const char *part, double *value); | ||
911 | |||
912 | /** Set the current state in part. | ||
913 | * | ||
914 | * @param obj Object being edited. | ||
915 | * @param part Part to set the state of. | ||
916 | * @param state Name of the state to set. | ||
917 | * @param value Value of the state. | ||
918 | * | ||
919 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
920 | */ | ||
921 | EAPI Eina_Bool edje_edit_part_selected_state_set(Evas_Object *obj, const char *part, const char *state, double value); | ||
922 | |||
923 | /** Get mouse_events for part. | ||
924 | * | ||
925 | * @param obj Object being edited. | ||
926 | * @param part Part to get if the mouse events is accepted. | ||
927 | * | ||
928 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
929 | */ | ||
930 | EAPI Eina_Bool edje_edit_part_mouse_events_get(Evas_Object *obj, const char *part); | ||
931 | |||
932 | /** Set mouse_events for part. | ||
933 | * | ||
934 | * @param obj Object being edited. | ||
935 | * @param part The part to set if the mouse events is accepted. | ||
936 | * @param mouse_events EINA_TRUE if part will accept mouse events, EINA_FALSE otherwise. | ||
937 | */ | ||
938 | EAPI void edje_edit_part_mouse_events_set(Evas_Object *obj, const char *part, Eina_Bool mouse_events); | ||
939 | |||
940 | /** Get repeat_events for part. | ||
941 | * | ||
942 | * @param obj Object being edited. | ||
943 | * @param part Part to set if will pass all events to the other parts. | ||
944 | * | ||
945 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
946 | */ | ||
947 | EAPI Eina_Bool edje_edit_part_repeat_events_get(Evas_Object *obj, const char *part); | ||
948 | |||
949 | /** Set repeat_events for part. | ||
950 | * | ||
951 | * @param obj Object being edited. | ||
952 | * @param part Part to set if will repeat all the received mouse events to other parts. | ||
953 | * @param repeat_events EINA_TRUE if the events received will propagate to other parts, EINA_FALSE otherwise | ||
954 | */ | ||
955 | EAPI void edje_edit_part_repeat_events_set(Evas_Object *obj, const char *part, Eina_Bool repeat_events); | ||
956 | |||
957 | /** Get ignore_flags for part. | ||
958 | * | ||
959 | * @param obj Object being edited. | ||
960 | * @param part Part to get which event_flags are being ignored. | ||
961 | * | ||
962 | * @return The Event flags set to the part. | ||
963 | */ | ||
964 | EAPI Evas_Event_Flags edje_edit_part_ignore_flags_get(Evas_Object *obj, const char *part); | ||
965 | |||
966 | /** Set ignore_flags for part. | ||
967 | * | ||
968 | * @param obj Object being edited. | ||
969 | * @param part Part to set which event flags will be ignored. | ||
970 | * @param ignore_flags The Event flags to be ignored by the part. | ||
971 | */ | ||
972 | EAPI void edje_edit_part_ignore_flags_set(Evas_Object *obj, const char *part, Evas_Event_Flags ignore_flags); | ||
973 | |||
974 | /** Set scale property for the part. | ||
975 | * | ||
976 | * This property tells Edje that the given part should be scaled by the | ||
977 | * Edje scale factor. | ||
978 | * | ||
979 | * @param obj Object being edited. | ||
980 | * @param part Part to set scale for. | ||
981 | * @param scale Scale value to set. | ||
982 | */ | ||
983 | EAPI void edje_edit_part_scale_set(Evas_Object *obj, const char *part, Eina_Bool scale); | ||
984 | |||
985 | /** Get scale for the part. | ||
986 | * | ||
987 | * @param obj Object being edited. | ||
988 | * @param part Part to get the scale value of. | ||
989 | * | ||
990 | * @return Whether scale is on (EINA_TRUE) or not. | ||
991 | */ | ||
992 | EAPI Eina_Bool edje_edit_part_scale_get(Evas_Object *obj, const char *part); | ||
993 | |||
994 | /** Get horizontal dragable state for part. | ||
995 | * | ||
996 | * @param obj Object being edited. | ||
997 | * @param part Part to get if can be dragged horizontally; | ||
998 | * | ||
999 | * @return 1 (or -1) if the part can be dragged horizontally, 0 otherwise. | ||
1000 | */ | ||
1001 | EAPI int edje_edit_part_drag_x_get(Evas_Object *obj, const char *part); | ||
1002 | |||
1003 | /** Set horizontal dragable state for part. | ||
1004 | * | ||
1005 | * @param obj Object being edited. | ||
1006 | * @param part Part to set if should be dragged horizontally. | ||
1007 | * @param drag 1 (or -1) if the part should be dragged horizontally, 0 otherwise. | ||
1008 | */ | ||
1009 | EAPI void edje_edit_part_drag_x_set(Evas_Object *obj, const char *part, int drag); | ||
1010 | |||
1011 | /** Get vertical dragable state for part. | ||
1012 | * | ||
1013 | * @param obj Object being edited. | ||
1014 | * @param part Part to get if can be dragged vertically. | ||
1015 | * | ||
1016 | * @return 1 (or - 1) if the part can be dragged vertically, 0 otherwise. | ||
1017 | */ | ||
1018 | EAPI int edje_edit_part_drag_y_get(Evas_Object *obj, const char *part); | ||
1019 | |||
1020 | /** Set vertical dragable state for part. | ||
1021 | * | ||
1022 | * @param obj Object being edited. | ||
1023 | * @param part Part to set if should be dragged vertically. | ||
1024 | * @param drag 1 (or -1) of the part shpuld be dragged vertically, 0 otherwise. | ||
1025 | */ | ||
1026 | EAPI void edje_edit_part_drag_y_set(Evas_Object *obj, const char *part, int drag); | ||
1027 | |||
1028 | /** Get horizontal dragable step for part. | ||
1029 | * | ||
1030 | * @param obj Object being edited. | ||
1031 | * @param part Part to get the drag horizontal step value. | ||
1032 | * | ||
1033 | * @return The step value. | ||
1034 | */ | ||
1035 | EAPI int edje_edit_part_drag_step_x_get(Evas_Object *obj, const char *part); | ||
1036 | |||
1037 | /** Set horizontal dragable state for part. | ||
1038 | * | ||
1039 | * @param obj Object being edited. | ||
1040 | * @param part Part to set the drag horizontal step value. | ||
1041 | * @param step The step the will be dragged. | ||
1042 | */ | ||
1043 | EAPI void edje_edit_part_drag_step_x_set(Evas_Object *obj, const char *part, int step); | ||
1044 | |||
1045 | /** Get vertical dragable step for part. | ||
1046 | * | ||
1047 | * @param obj Object being edited. | ||
1048 | * @param part Part to get the drag vertical step value. | ||
1049 | * | ||
1050 | * @return The step value. | ||
1051 | */ | ||
1052 | EAPI int edje_edit_part_drag_step_y_get(Evas_Object *obj, const char *part); | ||
1053 | |||
1054 | /** Set vertical dragable state for part. | ||
1055 | * | ||
1056 | * @param obj Object being edited. | ||
1057 | * @param part Part to set the drag vertical step value. | ||
1058 | * @param step The step the will be dragged. | ||
1059 | */ | ||
1060 | EAPI void edje_edit_part_drag_step_y_set(Evas_Object *obj, const char *part, int step); | ||
1061 | |||
1062 | /** Get horizontal dragable count for part. | ||
1063 | * | ||
1064 | * @param obj Object being edited. | ||
1065 | * @param part Part to get the drag horizontal count value. | ||
1066 | */ | ||
1067 | EAPI int edje_edit_part_drag_count_x_get(Evas_Object *obj, const char *part); | ||
1068 | |||
1069 | /** Set horizontal dragable count for part. | ||
1070 | * | ||
1071 | * @param obj Object being edited. | ||
1072 | * @param part Part to set the drag horizontal count value. | ||
1073 | * @param count The count value. | ||
1074 | */ | ||
1075 | EAPI void edje_edit_part_drag_count_x_set(Evas_Object *obj, const char *part, int count); | ||
1076 | |||
1077 | /** Get vertical dragable count for part. | ||
1078 | * | ||
1079 | * @param obj Object being edited. | ||
1080 | * @param part Part to get the drag vertical count value. | ||
1081 | */ | ||
1082 | EAPI int edje_edit_part_drag_count_y_get(Evas_Object *obj, const char *part); | ||
1083 | |||
1084 | /** Set vertical dragable count for part. | ||
1085 | * | ||
1086 | * @param obj Object being edited. | ||
1087 | * @param part Part to set the drag vertical count value. | ||
1088 | * @param count The count value. | ||
1089 | */ | ||
1090 | EAPI void edje_edit_part_drag_count_y_set(Evas_Object *obj, const char *part, int count); | ||
1091 | |||
1092 | /** Get the name of the part that is used as 'confine' for the given draggies. | ||
1093 | * | ||
1094 | * @param obj Object being edited. | ||
1095 | * @param part Part to get the name that is used as 'confine' for the given draggies. | ||
1096 | * | ||
1097 | * @return The name of the confine part or NULL (if unset). | ||
1098 | */ | ||
1099 | EAPI const char * edje_edit_part_drag_confine_get(Evas_Object *obj, const char *part); | ||
1100 | |||
1101 | /** Set the name of the part that is used as 'confine' for the given draggies. | ||
1102 | * | ||
1103 | * @param obj Object being edited. | ||
1104 | * @param part Part to set the name that is used as 'confine' for the given draggies. | ||
1105 | * @param confine The name of the confine part or NULL to unset confine. | ||
1106 | */ | ||
1107 | EAPI void edje_edit_part_drag_confine_set(Evas_Object *obj, const char *part, const char *confine); | ||
1108 | |||
1109 | /** Get the name of the part that is used as the receiver of the drag event. | ||
1110 | * | ||
1111 | * @param obj Object being edited. | ||
1112 | * @param part Part to get the name that is used as the receiver of the drag event. | ||
1113 | * | ||
1114 | * @return The name of the part that will receive events, or NULL (if unset). | ||
1115 | */ | ||
1116 | EAPI const char * edje_edit_part_drag_event_get(Evas_Object *obj, const char *part); | ||
1117 | |||
1118 | /** Set the name of the part that will receive events from the given draggies. | ||
1119 | * | ||
1120 | * @param obj Object being edited. | ||
1121 | * @param part Part to set the name that will receive events from the given draggies. | ||
1122 | * @param event The name of the part that will receive events, or NULL to unset. | ||
1123 | */ | ||
1124 | EAPI void edje_edit_part_drag_event_set(Evas_Object *obj, const char *part, const char *event); | ||
1125 | |||
1126 | |||
1127 | //@} | ||
1128 | /******************************************************************************/ | ||
1129 | /************************** STATES API ************************************/ | ||
1130 | /******************************************************************************/ | ||
1131 | /** @name States API | ||
1132 | * Functions to deal with part states (see @ref edcref). | ||
1133 | */ //@{ | ||
1134 | |||
1135 | /** Get the list of all the states in the given part. | ||
1136 | * | ||
1137 | * @param obj Object being edited. | ||
1138 | * @param part Part to get the states names list. | ||
1139 | * | ||
1140 | * @return An Eina_List* of string (char *)containing all the states names found | ||
1141 | * in part, including the float value (ex: "default 0.00"). | ||
1142 | * | ||
1143 | * Use edje_edit_string_list_free() when you don't need it anymore. | ||
1144 | */ | ||
1145 | EAPI Eina_List * edje_edit_part_states_list_get(Evas_Object *obj, const char *part); | ||
1146 | |||
1147 | /** Set a new name for the given state in the given part. | ||
1148 | * | ||
1149 | * @param obj Object being edited. | ||
1150 | * @param part Part that contain state. | ||
1151 | * @param state Name of the state to rename. | ||
1152 | * @param value Value of the state to rename. | ||
1153 | * @param new_name The new name for the state. | ||
1154 | * @param new_value The new value for the state. | ||
1155 | * | ||
1156 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
1157 | */ | ||
1158 | EAPI Eina_Bool edje_edit_state_name_set(Evas_Object *obj, const char *part, const char *state, double value, const char *new_name, double new_value); | ||
1159 | |||
1160 | /** Create a new state to the give part. | ||
1161 | * | ||
1162 | * @param obj Object being edited. | ||
1163 | * @param part Part to set the name of the new state. | ||
1164 | * @param name Name for the new state (not including the state value). | ||
1165 | * @param value The state value. | ||
1166 | * | ||
1167 | * @return EINA_TRUE if successfully, EINA_FALSE otherwise. | ||
1168 | */ | ||
1169 | EAPI Eina_Bool edje_edit_state_add(Evas_Object *obj, const char *part, const char *name, double value); | ||
1170 | |||
1171 | /** Delete the given part state from the edje. | ||
1172 | * | ||
1173 | * @param obj Object being edited. | ||
1174 | * @param part Part that contain state. | ||
1175 | * @param state The current name of the state (not including the state value). | ||
1176 | * @param value The state value. | ||
1177 | * | ||
1178 | * @return EINA_TRUE if successfully, EINA_FALSE otherwise. | ||
1179 | */ | ||
1180 | EAPI Eina_Bool edje_edit_state_del(Evas_Object *obj, const char *part, const char *state, double value); | ||
1181 | |||
1182 | /** Check if a part state with the given name exist. | ||
1183 | * | ||
1184 | * @param obj Object being edited. | ||
1185 | * @param part Part that contain state. | ||
1186 | * @param state The name of the state to check (not including the state value). | ||
1187 | * @param value The state value. | ||
1188 | * | ||
1189 | * @return EINA_TRUE if the part state exist, EINA_FALSE otherwise. | ||
1190 | */ | ||
1191 | EAPI Eina_Bool edje_edit_state_exist(Evas_Object *obj, const char *part, const char *state, double value); | ||
1192 | |||
1193 | /** Copies the state @p from into @p to. If @p to doesn't exist it will be created. | ||
1194 | * | ||
1195 | * @param obj Object being edited. | ||
1196 | * @param part Part that contain state. | ||
1197 | * @param from State to copy from (not including state value). | ||
1198 | * @param val_from The value of the state to copy from. | ||
1199 | * @param to State to copy into (not including state value). | ||
1200 | * @param val_to The value of the state to copy into. | ||
1201 | * | ||
1202 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
1203 | */ | ||
1204 | EAPI Eina_Bool edje_edit_state_copy(Evas_Object *obj, const char *part, const char *from, double val_from, const char *to, double val_to); | ||
1205 | |||
1206 | /** Get the 'rel1 relative X' value of state. | ||
1207 | * | ||
1208 | * @param obj Object being edited. | ||
1209 | * @param part Part that contain state. | ||
1210 | * @param state The name of the state to get 'rel1 relative X' (not including the state value). | ||
1211 | * @param value The state value. | ||
1212 | * | ||
1213 | * @return The 'rel1 relative X' value of the part state. | ||
1214 | */ | ||
1215 | EAPI double edje_edit_state_rel1_relative_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1216 | |||
1217 | /** Get the 'rel1 relative Y' value of state. | ||
1218 | * | ||
1219 | * @param obj Object being edited. | ||
1220 | * @param part Part that contain state. | ||
1221 | * @param state The name of the state to get 'rel1 relative Y' (not including the state value). | ||
1222 | * @param value The state value. | ||
1223 | * | ||
1224 | * @return The 'rel1 relative Y' value of the part state. | ||
1225 | */ | ||
1226 | EAPI double edje_edit_state_rel1_relative_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1227 | |||
1228 | /** Get the 'rel2 relative X' value of state. | ||
1229 | * | ||
1230 | * @param obj Object being edited. | ||
1231 | * @param part Part that contain state. | ||
1232 | * @param state The name of the state to get 'rel2 relative X' (not including the state value). | ||
1233 | * @param value The state value. | ||
1234 | * | ||
1235 | * @return The 'rel2 relative X' value of the part state. | ||
1236 | */ | ||
1237 | EAPI double edje_edit_state_rel2_relative_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1238 | |||
1239 | /** Get the 'rel2 relative Y' value of state. | ||
1240 | * | ||
1241 | * @param obj Object being edited. | ||
1242 | * @param part Part that contain state. | ||
1243 | * @param state The name of the state to get 'rel2 relative Y' (not including the state value). | ||
1244 | * @param value The state value. | ||
1245 | * | ||
1246 | * @return The 'rel2 relative Y' value of the part state. | ||
1247 | */ | ||
1248 | EAPI double edje_edit_state_rel2_relative_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1249 | |||
1250 | /** Set the 'rel1 relative X' value of state. | ||
1251 | * | ||
1252 | * @param obj Object being edited. | ||
1253 | * @param part Part that contain state. | ||
1254 | * @param state The name of the state to set 'rel1 relative X' (not including the state value). | ||
1255 | * @param value The state value. | ||
1256 | * @param x The new 'rel1 relative X' value to set'. | ||
1257 | */ | ||
1258 | EAPI void edje_edit_state_rel1_relative_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x); | ||
1259 | |||
1260 | /** Set the 'rel1 relative Y' value of state. | ||
1261 | * | ||
1262 | * @param obj Object being edited. | ||
1263 | * @param part Part that contain state. | ||
1264 | * @param state The name of the state to set 'rel1 relative Y' (not including the state value). | ||
1265 | * @param value The state value. | ||
1266 | * @param y The new 'rel1 relative Y' value to set'. | ||
1267 | */ | ||
1268 | EAPI void edje_edit_state_rel1_relative_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y); | ||
1269 | |||
1270 | /** Set the 'rel2 relative X' value of state. | ||
1271 | * | ||
1272 | * @param obj Object being edited. | ||
1273 | * @param part Part that contain state. | ||
1274 | * @param state The name of the state to set 'rel2 relative X' (not including the state value). | ||
1275 | * @param value The state value. | ||
1276 | * @param x The new 'rel2 relative X' value to set'. | ||
1277 | */ | ||
1278 | EAPI void edje_edit_state_rel2_relative_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x); | ||
1279 | |||
1280 | /** Set the 'rel2 relative Y' value of state. | ||
1281 | * | ||
1282 | * @param obj Object being edited. | ||
1283 | * @param part Part that contain state. | ||
1284 | * @param state The name of the state to set 'rel2 relative Y' (not including the state value). | ||
1285 | * @param value The state value. | ||
1286 | * @param y The new 'rel2 relative Y' value to set'. | ||
1287 | */ | ||
1288 | EAPI void edje_edit_state_rel2_relative_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y); | ||
1289 | |||
1290 | /** Get the 'rel1 offset X' value of state. | ||
1291 | * | ||
1292 | * @param obj Object being edited. | ||
1293 | * @param part Part that contain state. | ||
1294 | * @param state The name of the state to get 'rel1 offset X' (not including the state value). | ||
1295 | * @param value The state value. | ||
1296 | * | ||
1297 | * @return The 'rel1 offset X' value of the part state. | ||
1298 | */ | ||
1299 | EAPI int edje_edit_state_rel1_offset_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1300 | |||
1301 | /** Get the 'rel1 offset Y' value of state. | ||
1302 | * | ||
1303 | * @param obj Object being edited. | ||
1304 | * @param part Part that contain state. | ||
1305 | * @param state The name of the state to get 'rel1 offset Y' (not including the state value). | ||
1306 | * @param value The state value. | ||
1307 | * | ||
1308 | * @return The 'rel1 offset Y' value of the part state. | ||
1309 | */ | ||
1310 | EAPI int edje_edit_state_rel1_offset_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1311 | |||
1312 | /** Get the 'rel2 offset X' value of state. | ||
1313 | * | ||
1314 | * @param obj Object being edited. | ||
1315 | * @param part Part that contain state. | ||
1316 | * @param state The name of the state to get 'rel2 offset X' (not including the state value). | ||
1317 | * @param value The state value. | ||
1318 | * | ||
1319 | * @return The 'rel2 offset X' value of the part state. | ||
1320 | */ | ||
1321 | EAPI int edje_edit_state_rel2_offset_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1322 | |||
1323 | /** Get the 'rel2 offset Y' value of state. | ||
1324 | * | ||
1325 | * @param obj Object being edited. | ||
1326 | * @param part Part that contain state. | ||
1327 | * @param state The name of the state to get 'rel2 offset Y' (not including the state value). | ||
1328 | * @param value The state value. | ||
1329 | * | ||
1330 | * @return The 'rel2 offset Y' value of the part state. | ||
1331 | */ | ||
1332 | EAPI int edje_edit_state_rel2_offset_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1333 | |||
1334 | /** Set the 'rel1 offset X' value of state. | ||
1335 | * | ||
1336 | * @param obj Object being edited. | ||
1337 | * @param part Part that contain state. | ||
1338 | * @param state The name of the state to set 'rel1 offset X' (not including the state value). | ||
1339 | * @param value The state value. | ||
1340 | * @param x The new 'rel1 offset X' value to set'. | ||
1341 | */ | ||
1342 | EAPI void edje_edit_state_rel1_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x); | ||
1343 | |||
1344 | /** Set the 'rel1 offset Y' value of state. | ||
1345 | * | ||
1346 | * @param obj Object being edited. | ||
1347 | * @param part Part that contain state. | ||
1348 | * @param state The name of the state to set 'rel1 offset Y' (not including the state value). | ||
1349 | * @param value The state value. | ||
1350 | * @param y The new 'rel1 offset Y' value to set'. | ||
1351 | */ | ||
1352 | EAPI void edje_edit_state_rel1_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y); | ||
1353 | |||
1354 | /** Set the 'rel2 offset X' value of state. | ||
1355 | * | ||
1356 | * @param obj Object being edited. | ||
1357 | * @param part Part that contain state. | ||
1358 | * @param state The name of the state to set 'rel2 offset X' (not including the state value). | ||
1359 | * @param value The state value. | ||
1360 | * @param x The new 'rel2 offset X' value to set'. | ||
1361 | */ | ||
1362 | EAPI void edje_edit_state_rel2_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x); | ||
1363 | |||
1364 | /** Set the 'rel2 offset Y' value of state. | ||
1365 | * | ||
1366 | * @param obj Object being edited. | ||
1367 | * @param part Part that contain state. | ||
1368 | * @param state The name of the state to set 'rel2 offset Y' (not including the state value). | ||
1369 | * @param value The state value. | ||
1370 | * @param y The new 'rel2 offset Y' value to set'. | ||
1371 | */ | ||
1372 | EAPI void edje_edit_state_rel2_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y); | ||
1373 | |||
1374 | /** Get the part name rel1x is relative to. | ||
1375 | * | ||
1376 | * @param obj Object being edited. | ||
1377 | * @param part Part that contain state. | ||
1378 | * @param state The state that contain which the part name rel1x is relative to (not including the state value). | ||
1379 | * @param value The state value. | ||
1380 | * | ||
1381 | * @return The part name rel1x is relative to or NULL if the part is relative to the whole interface. | ||
1382 | */ | ||
1383 | EAPI const char * edje_edit_state_rel1_to_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1384 | |||
1385 | /** Get the part name rel1y is relative to. | ||
1386 | * | ||
1387 | * @param obj Object being edited. | ||
1388 | * @param part Part that contain state. | ||
1389 | * @param state The state that contain which the part name rel1y is relative to (not including the state value). | ||
1390 | * @param value The state value. | ||
1391 | * | ||
1392 | * @return The part name rel1y is relative to or NULL if the part is relative to the whole interface. | ||
1393 | */ | ||
1394 | EAPI const char * edje_edit_state_rel1_to_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1395 | |||
1396 | /** Get the part name rel2x is relative to. | ||
1397 | * | ||
1398 | * @param obj Object being edited. | ||
1399 | * @param part Part that contain state. | ||
1400 | * @param state The state that contain which the part name rel2x is relative to (not including the state value). | ||
1401 | * @param value The state value. | ||
1402 | * | ||
1403 | * @return The part name rel2x is relative to or NULL if the part is relative to the whole interface. | ||
1404 | */ | ||
1405 | EAPI const char * edje_edit_state_rel2_to_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1406 | |||
1407 | /** Get the part name rel2y is relative to. | ||
1408 | * | ||
1409 | * @param obj Object being edited. | ||
1410 | * @param part Part that contain state. | ||
1411 | * @param state The state that contain which the part name rel2y is relative to (not including the state value). | ||
1412 | * @param value The state value. | ||
1413 | * | ||
1414 | * @return The part name rel2y is relative to or NULL if the part is relative to the whole interface. | ||
1415 | */ | ||
1416 | EAPI const char * edje_edit_state_rel2_to_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1417 | |||
1418 | /** Set the part rel1x is relative to. | ||
1419 | * | ||
1420 | * @param obj Object being edited. | ||
1421 | * @param part Part that contain state. | ||
1422 | * @param state The name of the state to set rel1x is relative to (not including the state value). | ||
1423 | * @param value The state value. | ||
1424 | * @param rel_to The name of the part that is used as container/parent (NULL make the part relative to the whole interface). | ||
1425 | * | ||
1426 | * @return The part name rel1x is relative to or NULL if the part is relative to the whole interface. | ||
1427 | */ | ||
1428 | EAPI void edje_edit_state_rel1_to_x_set(Evas_Object *obj, const char *part, const char *state, double value, const char *rel_to); | ||
1429 | |||
1430 | /** Set the part rel1y is relative to. | ||
1431 | * | ||
1432 | * @param obj Object being edited. | ||
1433 | * @param part Part that contain state. | ||
1434 | * @param state The name of the state to set rel1y is relative to (not including the state value). | ||
1435 | * @param value The state value. | ||
1436 | * @param rel_to The name of the part that is used as container/parent (NULL make the part relative to the whole interface). | ||
1437 | * | ||
1438 | * @return The part name rel1y is relative to or NULL if the part is relative to the whole interface. | ||
1439 | */ | ||
1440 | EAPI void edje_edit_state_rel1_to_y_set(Evas_Object *obj, const char *part, const char *state, double value, const char *rel_to); | ||
1441 | |||
1442 | /** Set the part rel2x is relative to. | ||
1443 | * | ||
1444 | * @param obj Object being edited. | ||
1445 | * @param part Part that contain state. | ||
1446 | * @param state The name of the state to set rel2x is relative to (not including the state value). | ||
1447 | * @param value The state value. | ||
1448 | * @param rel_to The name of the part that is used as container/parent (NULL make the part relative to the whole interface). | ||
1449 | * | ||
1450 | * @return The part name rel2x is relative to or NULL if the part is relative to the whole interface. | ||
1451 | */ | ||
1452 | EAPI void edje_edit_state_rel2_to_x_set(Evas_Object *obj, const char *part, const char *state, double value, const char *rel_to); | ||
1453 | |||
1454 | /** Set the part rel2y is relative to. | ||
1455 | * | ||
1456 | * @param obj Object being edited. | ||
1457 | * @param part Part that contain state. | ||
1458 | * @param state The name of the state to set rel2y is relative to (not including the state value). | ||
1459 | * @param value The state value. | ||
1460 | * @param rel_to The name of the part that is used as container/parent (NULL make the part relative to the whole interface). | ||
1461 | * | ||
1462 | * @return The part name rel2y is relative to or NULL if the part is relative to the whole interface. | ||
1463 | */ | ||
1464 | EAPI void edje_edit_state_rel2_to_y_set(Evas_Object *obj, const char *part, const char *state, double value, const char *rel_to); | ||
1465 | |||
1466 | /** Get the color of a part state. | ||
1467 | * | ||
1468 | * @param obj Object being edited. | ||
1469 | * @param part Part that contain state. | ||
1470 | * @param state The name of the state to get color (not including the state value). | ||
1471 | * @param value The state value. | ||
1472 | * @param r A pointer to store the red value. | ||
1473 | * @param g A pointer to store the green value. | ||
1474 | * @param b A pointer to store the blue value. | ||
1475 | * @param a A pointer to store the alpha value. | ||
1476 | */ | ||
1477 | EAPI void edje_edit_state_color_get(Evas_Object *obj, const char *part, const char *state, double value, int *r, int *g, int *b, int *a); | ||
1478 | |||
1479 | /** Get the color2 of a part state. | ||
1480 | * | ||
1481 | * @param obj Object being edited. | ||
1482 | * @param part Part that contain state. | ||
1483 | * @param state The name of the state to get color (not including the state value). | ||
1484 | * @param value The state value. | ||
1485 | * @param r A pointer to store the red value. | ||
1486 | * @param g A pointer to store the green value. | ||
1487 | * @param b A pointer to store the blue value. | ||
1488 | * @param a A pointer to store the alpha value. | ||
1489 | */ | ||
1490 | EAPI void edje_edit_state_color2_get(Evas_Object *obj, const char *part, const char *state, double value, int *r, int *g, int *b, int *a); | ||
1491 | |||
1492 | /** Get the color3 of a part state. | ||
1493 | * | ||
1494 | * @param obj Object being edited. | ||
1495 | * @param part Part that contain state. | ||
1496 | * @param state The name of the state to get color (not including the state value). | ||
1497 | * @param value The state value. | ||
1498 | * @param r A pointer to store the red value. | ||
1499 | * @param g A pointer to store the green value. | ||
1500 | * @param b A pointer to store the blue value. | ||
1501 | * @param a A pointer to store the alpha value. | ||
1502 | */ | ||
1503 | EAPI void edje_edit_state_color3_get(Evas_Object *obj, const char *part, const char *state, double value, int *r, int *g, int *b, int *a); | ||
1504 | |||
1505 | /** Set the color of a part state. | ||
1506 | * | ||
1507 | * @param obj Object being edited. | ||
1508 | * @param part Part that contain state. | ||
1509 | * @param state The name of the state to set color (not including the state value). | ||
1510 | * @param value The state value. | ||
1511 | * @param r The red value of the color. | ||
1512 | * @param g The green value of the color. | ||
1513 | * @param b The blue value of the color. | ||
1514 | * @param a The alpha value of the color. | ||
1515 | */ | ||
1516 | EAPI void edje_edit_state_color_set(Evas_Object *obj, const char *part, const char *state, double value, int r, int g, int b, int a); | ||
1517 | |||
1518 | /** Set the color2 of a part state. | ||
1519 | * | ||
1520 | * @param obj Object being edited. | ||
1521 | * @param part Part that contain state. | ||
1522 | * @param state The name of the state to set color (not including the state value). | ||
1523 | * @param value The state value. | ||
1524 | * @param r The red value of the color. | ||
1525 | * @param g The green value of the color. | ||
1526 | * @param b The blue value of the color. | ||
1527 | * @param a The alpha value of the color. | ||
1528 | */ | ||
1529 | EAPI void edje_edit_state_color2_set(Evas_Object *obj, const char *part, const char *state, double value, int r, int g, int b, int a); | ||
1530 | |||
1531 | /** Set the color3 of a part state. | ||
1532 | * | ||
1533 | * @param obj Object being edited. | ||
1534 | * @param part Part that contain state. | ||
1535 | * @param state The name of the state to set color (not including the state value). | ||
1536 | * @param value The state value. | ||
1537 | * @param r The red value of the color. | ||
1538 | * @param g The green value of the color. | ||
1539 | * @param b The blue value of the color. | ||
1540 | * @param a The alpha value of the color. | ||
1541 | */ | ||
1542 | EAPI void edje_edit_state_color3_set(Evas_Object *obj, const char *part, const char *state, double value, int r, int g, int b, int a); | ||
1543 | |||
1544 | /** Get the horizontal align value of a part state. | ||
1545 | * | ||
1546 | * @param obj Object being edited. | ||
1547 | * @param part Part that contain state. | ||
1548 | * @param state The name of the state to get horizontal align (not including the state value). | ||
1549 | * @param value The state value. | ||
1550 | * | ||
1551 | * @return The horizontal align value for the given state | ||
1552 | */ | ||
1553 | EAPI double edje_edit_state_align_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1554 | |||
1555 | /** Get the vertical align value of a part state. | ||
1556 | * | ||
1557 | * @param obj Object being edited. | ||
1558 | * @param part Part that contain state. | ||
1559 | * @param state The name of the state to get horizontal align (not including the state value). | ||
1560 | * @param value The state value. | ||
1561 | * | ||
1562 | * @return The vertical align value for the given state | ||
1563 | */ | ||
1564 | EAPI double edje_edit_state_align_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1565 | |||
1566 | /** Set the horizontal align value of a part state. | ||
1567 | * | ||
1568 | * @param obj Object being edited. | ||
1569 | * @param part Part that contain state. | ||
1570 | * @param state The name of the state to get horizontal align (not including the state value). | ||
1571 | * @param value The state value. | ||
1572 | * @param align The new vertical align value. | ||
1573 | */ | ||
1574 | EAPI void edje_edit_state_align_x_set(Evas_Object *obj, const char *part, const char *state, double value, double align); | ||
1575 | |||
1576 | /** Set the vertical align value of a part state. | ||
1577 | * | ||
1578 | * @param obj Object being edited. | ||
1579 | * @param part Part that contain state. | ||
1580 | * @param state The name of the state to get vertical align (not including the state value). | ||
1581 | * @param value The state value. | ||
1582 | * @param align The new vertical align value. | ||
1583 | */ | ||
1584 | EAPI void edje_edit_state_align_y_set(Evas_Object *obj, const char *part, const char *state, double value, double align); | ||
1585 | |||
1586 | /** Get the minimum width value of a part state. | ||
1587 | * | ||
1588 | * @param obj Object being edited. | ||
1589 | * @param part Part that contain state. | ||
1590 | * @param state The name of the state to get minimum width (not including the state value). | ||
1591 | * @param value The state value. | ||
1592 | * | ||
1593 | * @return The minimum width value. | ||
1594 | */ | ||
1595 | EAPI int edje_edit_state_min_w_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1596 | |||
1597 | /** Set the minimum width value of a part state. | ||
1598 | * | ||
1599 | * @param obj Object being edited. | ||
1600 | * @param part Part that contain state. | ||
1601 | * @param state The name of the state to set minimum width (not including the state value). | ||
1602 | * @param value The state value. | ||
1603 | * @param min_w Minimum width value. | ||
1604 | */ | ||
1605 | EAPI void edje_edit_state_min_w_set(Evas_Object *obj, const char *part, const char *state, double value, int min_w); | ||
1606 | |||
1607 | /** Get the minimum height value of a part state. | ||
1608 | * | ||
1609 | * @param obj Object being edited. | ||
1610 | * @param part Part that contain state. | ||
1611 | * @param state The name of the state to get minimum height (not including the state value). | ||
1612 | * @param value The state value. | ||
1613 | * | ||
1614 | * @return The minimum height value. | ||
1615 | */ | ||
1616 | EAPI int edje_edit_state_min_h_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1617 | |||
1618 | /** Set the minimum height value of a part state. | ||
1619 | * | ||
1620 | * @param obj Object being edited. | ||
1621 | * @param part Part that contain state. | ||
1622 | * @param state The name of the state to set minimum height (not including the state value). | ||
1623 | * @param value The state value. | ||
1624 | * @param min_h Minimum height value. | ||
1625 | */ | ||
1626 | EAPI void edje_edit_state_min_h_set(Evas_Object *obj, const char *part, const char *state, double value, int min_h); | ||
1627 | |||
1628 | /** Get the maximum width value of a part state. | ||
1629 | * | ||
1630 | * @param obj Object being edited. | ||
1631 | * @param part Part that contain state. | ||
1632 | * @param state The name of the state to get maximum width (not including the state value). | ||
1633 | * @param value The state value. | ||
1634 | * | ||
1635 | * @return The maximum width value. | ||
1636 | */ | ||
1637 | EAPI int edje_edit_state_max_w_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1638 | |||
1639 | /** Set the maximum width value of a part state. | ||
1640 | * | ||
1641 | * @param obj Object being edited. | ||
1642 | * @param part Part that contain state. | ||
1643 | * @param state The name of the state to set maximum width (not including the state value). | ||
1644 | * @param value The state value. | ||
1645 | * @param max_w Maximum width value. | ||
1646 | */ | ||
1647 | EAPI void edje_edit_state_max_w_set(Evas_Object *obj, const char *part, const char *state, double value, int max_w); | ||
1648 | |||
1649 | /** Get the maximum height value of a part state. | ||
1650 | * | ||
1651 | * @param obj Object being edited. | ||
1652 | * @param part Part that contain state. | ||
1653 | * @param state The name of the state to get maximum height (not including the state value). | ||
1654 | * @param value The state value. | ||
1655 | * | ||
1656 | * @return The maximum height value. | ||
1657 | */ | ||
1658 | EAPI int edje_edit_state_max_h_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1659 | |||
1660 | /** Set the maximum height value of a part state. | ||
1661 | * | ||
1662 | * @param obj Object being edited. | ||
1663 | * @param part Part that contain state. | ||
1664 | * @param state The name of the state to set maximum height (not including the state value). | ||
1665 | * @param value The state value. | ||
1666 | * @param max_h Maximum height value. | ||
1667 | */ | ||
1668 | EAPI void edje_edit_state_max_h_set(Evas_Object *obj, const char *part, const char *state, double value, int max_h); | ||
1669 | |||
1670 | /** Get the minimum aspect value of a part state. | ||
1671 | * | ||
1672 | * @param obj Object being edited. | ||
1673 | * @param part Part that contain state. | ||
1674 | * @param state The name of the state to get minimum aspect (not including the state value). | ||
1675 | * @param value The state value. | ||
1676 | * | ||
1677 | * @return The minimum aspect | ||
1678 | */ | ||
1679 | EAPI double edje_edit_state_aspect_min_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1680 | |||
1681 | /** Get the maximum aspect value of a part state. | ||
1682 | * | ||
1683 | * @param obj Object being edited. | ||
1684 | * @param part Part that contain state. | ||
1685 | * @param state The name of the state to get maximum aspect (not including the state value). | ||
1686 | * @param value The state value. | ||
1687 | * | ||
1688 | * @return The maximum aspect | ||
1689 | */ | ||
1690 | EAPI double edje_edit_state_aspect_max_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1691 | |||
1692 | /** Set the minimum aspect value of a part state. | ||
1693 | * | ||
1694 | * @param obj Object being edited. | ||
1695 | * @param part Part that contain state. | ||
1696 | * @param state The name of the state to set minimum aspect (not including the state value). | ||
1697 | * @param value The state value. | ||
1698 | * @param aspect Minimum aspect value. | ||
1699 | */ | ||
1700 | EAPI void edje_edit_state_aspect_min_set(Evas_Object *obj, const char *part, const char *state, double value, double aspect); | ||
1701 | |||
1702 | /** Set the maximum aspect value of a part state. | ||
1703 | * | ||
1704 | * @param obj Object being edited. | ||
1705 | * @param part Part that contain state. | ||
1706 | * @param state The name of the state to set maximum aspect (not including the state value). | ||
1707 | * @param value The state value. | ||
1708 | * @param aspect Maximum aspect value. | ||
1709 | */ | ||
1710 | EAPI void edje_edit_state_aspect_max_set(Evas_Object *obj, const char *part, const char *state, double value, double aspect); | ||
1711 | |||
1712 | /** Get the aspect preference of a part state. | ||
1713 | * | ||
1714 | * @param obj Object being edited. | ||
1715 | * @param part Part that contain state. | ||
1716 | * @param state The name of the state to get aspect preference (not including the state value). | ||
1717 | * @param value The state value. | ||
1718 | * | ||
1719 | * @return The aspect preference (0 = None, 1 = Vertical, 2 = Horizontal, 3 = Both) | ||
1720 | */ | ||
1721 | EAPI unsigned char edje_edit_state_aspect_pref_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1722 | |||
1723 | /** Set the aspect preference of a part state. | ||
1724 | * | ||
1725 | * @param obj Object being edited. | ||
1726 | * @param part Part that contain state. | ||
1727 | * @param state The name of the state to set aspect preference (not | ||
1728 | * including the state value). | ||
1729 | * @param value The state value. | ||
1730 | * @param pref The aspect preference to set (0 = None, 1 = Vertical, 2 | ||
1731 | * = Horizontal, 3 = Both) | ||
1732 | */ | ||
1733 | EAPI void edje_edit_state_aspect_pref_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char pref); | ||
1734 | |||
1735 | /** Get the fill horizontal origin relative value of a part state. | ||
1736 | * | ||
1737 | * @param obj Object being edited. | ||
1738 | * @param part Part that contain state. | ||
1739 | * @param state The name of the state to get the fill horizontal origin relative to area (not including the state value). | ||
1740 | * @param value The state value. | ||
1741 | * | ||
1742 | * @return The fill horizontal origin relative to area. | ||
1743 | */ | ||
1744 | EAPI double edje_edit_state_fill_origin_relative_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1745 | |||
1746 | /** Get the fill vertical origin relative value of a part state. | ||
1747 | * | ||
1748 | * @param obj Object being edited. | ||
1749 | * @param part Part that contain state. | ||
1750 | * @param state The name of the state to get fill vertical origin relative to area (not including the state value). | ||
1751 | * @param value The state value. | ||
1752 | * | ||
1753 | * @return The fill vertical origin relative to area. | ||
1754 | */ | ||
1755 | EAPI double edje_edit_state_fill_origin_relative_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1756 | |||
1757 | /** Get the fill horizontal origin offset value of a part state. | ||
1758 | * | ||
1759 | * @param obj Object being edited. | ||
1760 | * @param part Part that contain state. | ||
1761 | * @param state The name of the state to get fill horizontal origin offset relative to area (not including the state value). | ||
1762 | * @param value The state value. | ||
1763 | * | ||
1764 | * @return The fill horizontal origin offset relative to area. | ||
1765 | */ | ||
1766 | EAPI int edje_edit_state_fill_origin_offset_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1767 | |||
1768 | /** Get the fill vertical origin offset value of a part state. | ||
1769 | * | ||
1770 | * @param obj Object being edited. | ||
1771 | * @param part Part that contain state. | ||
1772 | * @param state The name of the state to get fill vertical origin offset relative to area (not including the state value). | ||
1773 | * @param value The state value. | ||
1774 | * | ||
1775 | * @return The fill vertical origin offset value. | ||
1776 | */ | ||
1777 | EAPI int edje_edit_state_fill_origin_offset_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1778 | |||
1779 | /** Set the fill horizontal origin relative value of a part state. | ||
1780 | * | ||
1781 | * @param obj Object being edited. | ||
1782 | * @param part Part that contain state. | ||
1783 | * @param state The name of the state to set fill horizontal origin relative to area (not including the state value). | ||
1784 | * @param value The state value. | ||
1785 | * @param x The fill horizontal origin value. | ||
1786 | */ | ||
1787 | EAPI void edje_edit_state_fill_origin_relative_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x); | ||
1788 | |||
1789 | /** Set the fill horizontal origin relative value of a part state. | ||
1790 | * | ||
1791 | * @param obj Object being edited. | ||
1792 | * @param part Part that contain state. | ||
1793 | * @param state The name of the state to set fill vertical origin relative to area (not including the state value). | ||
1794 | * @param value The state value. | ||
1795 | * @param y The fill vertical origin value. | ||
1796 | */ | ||
1797 | EAPI void edje_edit_state_fill_origin_relative_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y); | ||
1798 | |||
1799 | /** Set the fill horizontal origin offset value of a part state. | ||
1800 | * | ||
1801 | * @param obj Object being edited. | ||
1802 | * @param part Part that contain state. | ||
1803 | * @param state The name of the state to set fill horizontal origin offset relative to area (not including the state value). | ||
1804 | * @param value The state value. | ||
1805 | * @param x The fill horizontal origin offset value. | ||
1806 | */ | ||
1807 | EAPI void edje_edit_state_fill_origin_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x); | ||
1808 | |||
1809 | /** Set the fill vertical origin offset value of a part state. | ||
1810 | * | ||
1811 | * @param obj Object being edited. | ||
1812 | * @param part Part that contain state. | ||
1813 | * @param state The name of the state to set fill vertical origin offset relative to area (not including the state value). | ||
1814 | * @param value The state value. | ||
1815 | * @param y The fill vertical origin offset value. | ||
1816 | */ | ||
1817 | EAPI void edje_edit_state_fill_origin_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y); | ||
1818 | |||
1819 | /** Get the fill horizontal size relative value of a part state. | ||
1820 | * | ||
1821 | * @param obj Object being edited. | ||
1822 | * @param part Part that contain state. | ||
1823 | * @param state The name of the state to get fill horizontal size relative to area (not including the state value). | ||
1824 | * @param value The state value. | ||
1825 | * | ||
1826 | * @return The fill horizontal size relative to area. | ||
1827 | */ | ||
1828 | EAPI double edje_edit_state_fill_size_relative_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1829 | |||
1830 | /** Get the fill vertical size relative value of a part state. | ||
1831 | * | ||
1832 | * @param obj Object being edited. | ||
1833 | * @param part Part that contain state. | ||
1834 | * @param state The name of the state to get fill vertical size relative to area (not including the state value). | ||
1835 | * @param value The state value. | ||
1836 | * | ||
1837 | * @return The fill vertical size relative to area. | ||
1838 | */ | ||
1839 | EAPI double edje_edit_state_fill_size_relative_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1840 | |||
1841 | /** Get the fill horizontal size offset value of a part state. | ||
1842 | * | ||
1843 | * @param obj Object being edited. | ||
1844 | * @param part Part that contain state. | ||
1845 | * @param state The name of the state to get fill horizontal size | ||
1846 | * offset relative to area (not including the state value). | ||
1847 | * @param value The state value. | ||
1848 | * | ||
1849 | * @return The fill horizontal size offset relative to area. | ||
1850 | */ | ||
1851 | EAPI int edje_edit_state_fill_size_offset_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1852 | |||
1853 | /** Get the fill vertical size offset value of a part state. | ||
1854 | * | ||
1855 | * @param obj Object being edited. | ||
1856 | * @param part Part that contain state. | ||
1857 | * @param state The name of the state to get fill vertical size offset | ||
1858 | * relative to area (not including the state value). | ||
1859 | * @param value The state value. | ||
1860 | * | ||
1861 | * @return The fill vertical size offset relative to area. | ||
1862 | */ | ||
1863 | EAPI int edje_edit_state_fill_size_offset_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1864 | |||
1865 | /** Set the fill horizontal size relative value of a part state. | ||
1866 | * | ||
1867 | * @param obj Object being edited. | ||
1868 | * @param part Part that contain state. | ||
1869 | * @param state The name of the state to set fill horizontal size | ||
1870 | * relative value (not including the state value). | ||
1871 | * @param value The state value. | ||
1872 | * @param x The horizontal size relative value. | ||
1873 | */ | ||
1874 | EAPI void edje_edit_state_fill_size_relative_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x); | ||
1875 | |||
1876 | /** Set the fill vertical size relative value of a part state. | ||
1877 | * | ||
1878 | * @param obj Object being edited. | ||
1879 | * @param part Part that contain state. | ||
1880 | * @param state The name of the state to set fill vertical size | ||
1881 | * relative value (not including the state value). | ||
1882 | * @param value The state value. | ||
1883 | * @param x The vertical size relative value. | ||
1884 | */ | ||
1885 | EAPI void edje_edit_state_fill_size_relative_y_set(Evas_Object *obj, const char *part, const char *state, double value, double x); | ||
1886 | |||
1887 | /** Set the fill horizontal size offset value of a part state. | ||
1888 | * | ||
1889 | * @param obj Object being edited. | ||
1890 | * @param part Part that contain state. | ||
1891 | * @param state The name of the state to set fill horizontal size | ||
1892 | * offset relative value (not including the state value). | ||
1893 | * @param value The state value. | ||
1894 | * @param x The horizontal size offset value. | ||
1895 | */ | ||
1896 | EAPI void edje_edit_state_fill_size_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, double x); | ||
1897 | |||
1898 | /** Set the fill vertical size offset value of a part state. | ||
1899 | * | ||
1900 | * @param obj Object being edited. | ||
1901 | * @param part Part that contain state. | ||
1902 | * @param state The name of the state to set fill vertical size offset | ||
1903 | * relative value (not including the state value). | ||
1904 | * @param value The state value. | ||
1905 | * @param y The vertical size offset value. | ||
1906 | */ | ||
1907 | EAPI void edje_edit_state_fill_size_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, double y); | ||
1908 | |||
1909 | /** Get the visibility of a part state. | ||
1910 | * | ||
1911 | * @param obj Object being edited. | ||
1912 | * @param part Part that contain state. | ||
1913 | * @param state The name of the state to get visibility (not including the state value). | ||
1914 | * @param value The state value. | ||
1915 | * | ||
1916 | * @return EINA_TRUE if the state is visible, EINA_FALSE otherwise. | ||
1917 | */ | ||
1918 | EAPI Eina_Bool edje_edit_state_visible_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1919 | |||
1920 | /** Set the visibility of a part state. | ||
1921 | * | ||
1922 | * @param obj Object being edited. | ||
1923 | * @param part Part that contain state. | ||
1924 | * @param state The name of the state to set visibility (not including the state value). | ||
1925 | * @param value The state value. | ||
1926 | * @param visible To set state visible (EINA_TRUE if the state is visible, EINA_FALSE otherwise) | ||
1927 | */ | ||
1928 | EAPI void edje_edit_state_visible_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool visible); | ||
1929 | |||
1930 | /** Get the color class of the given part state. | ||
1931 | * | ||
1932 | * Remember to free the string with edje_edit_string_free() | ||
1933 | * | ||
1934 | * @param obj Object being edited. | ||
1935 | * @param part Part that contain state. | ||
1936 | * @param state The name of the state to get color class (not including the state value). | ||
1937 | * @param value The state value. | ||
1938 | * | ||
1939 | * @return The current color class. | ||
1940 | */ | ||
1941 | EAPI const char *edje_edit_state_color_class_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1942 | |||
1943 | /** Set the color class of the given part state. | ||
1944 | * | ||
1945 | * @param obj Object being edited. | ||
1946 | * @param part Part that contain state. | ||
1947 | * @param state The name of the state to set color class (not including the state value). | ||
1948 | * @param value The state value. | ||
1949 | * @param color_class The color class to assign. | ||
1950 | */ | ||
1951 | EAPI void edje_edit_state_color_class_set(Evas_Object *obj, const char *part, const char *state, double value, const char *color_class); | ||
1952 | |||
1953 | /** Get the list of parameters for an external part. | ||
1954 | * | ||
1955 | * DO NOT FREE THE LIST! | ||
1956 | * | ||
1957 | * @param obj Object being edited. | ||
1958 | * @param part Part that contain state. | ||
1959 | * @param state The name of the state to get list of Edje_External_Param (not including the state value). | ||
1960 | * @param value The state value. | ||
1961 | * | ||
1962 | * @return The list of Edje_External_Param. | ||
1963 | */ | ||
1964 | EAPI const Eina_List * edje_edit_state_external_params_list_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
1965 | |||
1966 | /** Get the external parameter type and value. | ||
1967 | * | ||
1968 | * @param obj Object being edited. | ||
1969 | * @param part Part that contain state. | ||
1970 | * @param state The name of the state to get external parameter (not including the state value). | ||
1971 | * @param value The state value. | ||
1972 | * @param param The name of the paramter to look for. | ||
1973 | * @param type The type of the parameter will be stored here. | ||
1974 | * @param val Pointer to value will be stored here - DO NOT FREE IT! | ||
1975 | * | ||
1976 | * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise. | ||
1977 | */ | ||
1978 | EAPI Eina_Bool edje_edit_state_external_param_get(Evas_Object *obj, const char *part, const char *state, double value, const char *param, Edje_External_Param_Type *type, void **val); | ||
1979 | |||
1980 | /** Get external parameter of type INT. | ||
1981 | * | ||
1982 | * @param obj Object being edited. | ||
1983 | * @param part Part that contain state. | ||
1984 | * @param state The name of the state to get external parameter of type INT (not including the state value). | ||
1985 | * @param value The state value. | ||
1986 | * @param param The name of the paramter. | ||
1987 | * @param val The value of the parameter. | ||
1988 | * | ||
1989 | * @return EINA_TRUE if successful. EINA_FALSE if not found or is of different type. | ||
1990 | */ | ||
1991 | EAPI Eina_Bool edje_edit_state_external_param_int_get(Evas_Object *obj, const char *part, const char *state, double value, const char *param, int *val); | ||
1992 | |||
1993 | /** Get external parameter of type BOOL. | ||
1994 | * | ||
1995 | * @param obj Object being edited. | ||
1996 | * @param part Part that contain state. | ||
1997 | * @param state The name of the state to get external parameter of type BOOL (not including the state value). | ||
1998 | * @param value The state value. | ||
1999 | * @param param The name of the paramter. | ||
2000 | * @param val The value of the parameter. | ||
2001 | * | ||
2002 | * @return EINA_TRUE if successful. EINA_FALSE if not found or is of different type. | ||
2003 | */ | ||
2004 | EAPI Eina_Bool edje_edit_state_external_param_bool_get(Evas_Object *obj, const char *part, const char *state, double value, const char *param, Eina_Bool *val); | ||
2005 | |||
2006 | /** Get external parameter of type DOUBLE. | ||
2007 | * | ||
2008 | * @param obj Object being edited. | ||
2009 | * @param part Part that contain state. | ||
2010 | * @param state The name of the state to get external parameter of type DOUBLE (not including the state value). | ||
2011 | * @param value The state value. | ||
2012 | * @param param The name of the paramter. | ||
2013 | * @param val The value of the parameter. | ||
2014 | * | ||
2015 | * @return EINA_TRUE if successful. EINA_FALSE if not found or is of different type. | ||
2016 | */ | ||
2017 | EAPI Eina_Bool edje_edit_state_external_param_double_get(Evas_Object *obj, const char *part, const char *state, double value, const char *param, double *val); | ||
2018 | |||
2019 | /** Get external parameter of type STRING. | ||
2020 | * | ||
2021 | * @param obj Object being edited. | ||
2022 | * @param part Part that contain state. | ||
2023 | * @param state The name of the state to get external parameter of | ||
2024 | * type STRING (not including the state value). | ||
2025 | * @param value The state value. | ||
2026 | * @param param The name of the paramter. | ||
2027 | * @param val The value of the parameter. | ||
2028 | * | ||
2029 | * @return EINA_TRUE if successful. EINA_FALSE if not found or is of | ||
2030 | * different type. | ||
2031 | */ | ||
2032 | EAPI Eina_Bool edje_edit_state_external_param_string_get(Evas_Object *obj, const char *part, const char *state, double value, const char *param, const char **val); | ||
2033 | |||
2034 | /** Get external parameter of type CHOICE. | ||
2035 | * | ||
2036 | * @param obj Object being edited. | ||
2037 | * @param part Part that contain state. | ||
2038 | * @param state The name of the state to get external parameter of | ||
2039 | * type CHOICE (not including the state value). | ||
2040 | * @param value The state value. | ||
2041 | * @param param The name of the paramter. | ||
2042 | * @param val The value of the parameter. | ||
2043 | * | ||
2044 | * @return EINA_TRUE if successful. EINA_FALSE if not found or is of | ||
2045 | * different type. | ||
2046 | */ | ||
2047 | EAPI Eina_Bool edje_edit_state_external_param_choice_get(Evas_Object *obj, const char *part, const char *state, double value, const char *param, const char **val); | ||
2048 | |||
2049 | /** Set the external parameter type and value, adding it if it didn't | ||
2050 | * exist before. | ||
2051 | * | ||
2052 | * @param obj Object being edited. | ||
2053 | |||
2054 | * @param part Part that contain state. | ||
2055 | * @param state The name of the state to get external parameter (not | ||
2056 | * including the state value). | ||
2057 | * @param value The state value. | ||
2058 | * @param param The name of the paramter set. | ||
2059 | * @param type The type of the parameter. | ||
2060 | * | ||
2061 | * @return EINA_TRUE if it was set, EINA_FALSE otherwise. | ||
2062 | */ | ||
2063 | |||
2064 | /** | ||
2065 | * Arguments should have proper sized values matching their types: | ||
2066 | * - EDJE_EXTERNAL_PARAM_TYPE_INT: int | ||
2067 | * - EDJE_EXTERNAL_PARAM_TYPE_BOOL: int | ||
2068 | * - EDJE_EXTERNAL_PARAM_TYPE_DOUBLE: double | ||
2069 | * - EDJE_EXTERNAL_PARAM_TYPE_STRING: char* | ||
2070 | * - EDJE_EXTERNAL_PARAM_TYPE_CHOICE: char* | ||
2071 | * | ||
2072 | * @note: The validation of the parameter will occur only if the part | ||
2073 | * is in the same state as the one being modified. | ||
2074 | */ | ||
2075 | EAPI Eina_Bool edje_edit_state_external_param_set(Evas_Object *obj, const char *part, const char *state, double value, const char *param, Edje_External_Param_Type type, ...); | ||
2076 | |||
2077 | /** Set external parameter of type INT. | ||
2078 | * | ||
2079 | * @param obj Object being edited. | ||
2080 | * @param part Part that contain state. | ||
2081 | * @param state The name of the state to get external parameter of | ||
2082 | * type INT (not including the state value). | ||
2083 | * @param value The state value. | ||
2084 | * @param param The name of the paramter. | ||
2085 | * @param val Value will be stored here. | ||
2086 | * | ||
2087 | * @return EINA_TRUE if it was set, EINA_FALSE otherwise. | ||
2088 | */ | ||
2089 | EAPI Eina_Bool edje_edit_state_external_param_int_set(Evas_Object *obj, const char *part, const char *state, double value, const char *param, int val); | ||
2090 | |||
2091 | /** Set external parameter of type BOOL. | ||
2092 | * | ||
2093 | * @param obj Object being edited. | ||
2094 | * @param part Part that contain state. | ||
2095 | * @param state The name of the state to get external parameter of type BOOL (not including the state value). | ||
2096 | * @param value The state value. | ||
2097 | * @param param The name of the paramter. | ||
2098 | * @param val Value will be stored here. | ||
2099 | * | ||
2100 | * @return EINA_TRUE if it was set, EINA_FALSE otherwise. | ||
2101 | */ | ||
2102 | EAPI Eina_Bool edje_edit_state_external_param_bool_set(Evas_Object *obj, const char *part, const char *state, double value, const char *param, Eina_Bool val); | ||
2103 | |||
2104 | /** Set external parameter of type DOUBLE. | ||
2105 | * | ||
2106 | * @param obj Object being edited. | ||
2107 | * @param part Part that contain state. | ||
2108 | * @param state The name of the state to get external parameter of type DOUBLE (not including the state value). | ||
2109 | * @param value The state value. | ||
2110 | * @param param The name of the paramter. | ||
2111 | * @param val Value will be stored here. | ||
2112 | * | ||
2113 | * @return EINA_TRUE if it was set, EINA_FALSE otherwise. | ||
2114 | */ | ||
2115 | EAPI Eina_Bool edje_edit_state_external_param_double_set(Evas_Object *obj, const char *part, const char *state, double value, const char *param, double val); | ||
2116 | |||
2117 | /** Set external parameter of type STRING. | ||
2118 | * | ||
2119 | * @param obj Object being edited. | ||
2120 | * @param part Part that contain state. | ||
2121 | * @param state The name of the state to get external parameter of type STRING (not including the state value). | ||
2122 | * @param value The state value. | ||
2123 | * @param param The name of the paramter. | ||
2124 | * @param val Value will be stored here. | ||
2125 | * | ||
2126 | * @return EINA_TRUE if it was set, EINA_FALSE otherwise. | ||
2127 | */ | ||
2128 | EAPI Eina_Bool edje_edit_state_external_param_string_set(Evas_Object *obj, const char *part, const char *state, double value, const char *param, const char *val); | ||
2129 | |||
2130 | /** Set external parameter of type CHOICE. | ||
2131 | * | ||
2132 | * @param obj Object being edited. | ||
2133 | * @param part Part that contain state. | ||
2134 | * @param state The name of the state to get external parameter of type CHOICE (not including the state value). | ||
2135 | * @param value The state value. | ||
2136 | * @param param The name of the paramter. | ||
2137 | * @param val Value will be stored here. | ||
2138 | * | ||
2139 | * @return EINA_TRUE if it was set, EINA_FALSE otherwise. | ||
2140 | */ | ||
2141 | EAPI Eina_Bool edje_edit_state_external_param_choice_set(Evas_Object *obj, const char *part, const char *state, double value, const char *param, const char *val); | ||
2142 | |||
2143 | |||
2144 | //@} | ||
2145 | /******************************************************************************/ | ||
2146 | /************************** TEXT API ************************************/ | ||
2147 | /******************************************************************************/ | ||
2148 | /** @name Text API | ||
2149 | * Functions to deal with text objects (see @ref edcref). | ||
2150 | */ //@{ | ||
2151 | |||
2152 | /** Get the text of a part state. | ||
2153 | * | ||
2154 | * Remember to free the returned string with edje_edit_string_free(). | ||
2155 | * | ||
2156 | * @param obj Object being edited. | ||
2157 | * @param part Part that contain state. | ||
2158 | * @param state The name of the state to get text (not including the state value). | ||
2159 | * @param value The state value. | ||
2160 | * | ||
2161 | * @return A newly allocated string containing the text for the given state. | ||
2162 | */ | ||
2163 | EAPI const char * edje_edit_state_text_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2164 | |||
2165 | /** Set the text of a part state. | ||
2166 | * | ||
2167 | * @param obj Object being edited. | ||
2168 | * @param part Part that contain state. | ||
2169 | * @param state The name of the state to set text (not including the state value). | ||
2170 | * @param value The state value. | ||
2171 | * @param text The new text to assign. | ||
2172 | */ | ||
2173 | EAPI void edje_edit_state_text_set(Evas_Object *obj, const char *part, const char *state, double value,const char *text); | ||
2174 | |||
2175 | /** Get font name for a given part state. | ||
2176 | * | ||
2177 | * @param obj Object being edited. | ||
2178 | * @param part The name of the part to get the font of. | ||
2179 | * @param state The state of the part to get the font of. | ||
2180 | * @param value Value of the state. | ||
2181 | * | ||
2182 | * @return Font used by the part or NULL if error or nothing is set. | ||
2183 | */ | ||
2184 | EAPI const char * edje_edit_state_font_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2185 | |||
2186 | /** Set font name for a given part state. | ||
2187 | * | ||
2188 | * Font name can be any alias of an internal font in the Edje file and, | ||
2189 | * if it doesn't match any, Edje will look for a font with the given name | ||
2190 | * in the system fonts. | ||
2191 | * | ||
2192 | * @param obj Object being edited. | ||
2193 | * @param part Part to set the font of. | ||
2194 | * @param state State in which the font is set. | ||
2195 | * @param value Value of the state. | ||
2196 | * @param font The font name to use. | ||
2197 | */ | ||
2198 | EAPI void edje_edit_state_font_set(Evas_Object *obj, const char *part, const char *state, double value, const char *font); | ||
2199 | |||
2200 | /** Get the text size of a part state | ||
2201 | * | ||
2202 | * @param obj Object being edited. | ||
2203 | * @param part Part that contain state. | ||
2204 | * @param state The name of the state to get text size (not including the state value). | ||
2205 | * @param value The state value. | ||
2206 | * | ||
2207 | * @return The text size or -1 on errors. | ||
2208 | */ | ||
2209 | EAPI int edje_edit_state_text_size_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2210 | |||
2211 | /** Set the text size of a part state. | ||
2212 | * | ||
2213 | * @param obj Object being edited. | ||
2214 | * @param part Part that contain state. | ||
2215 | * @param state The name of the state to set text size (not including the state value). | ||
2216 | * @param value The state value. | ||
2217 | * @param size The new font size to set (in pixel) | ||
2218 | */ | ||
2219 | EAPI void edje_edit_state_text_size_set(Evas_Object *obj, const char *part, const char *state, double value, int size); | ||
2220 | |||
2221 | /** Get the text horizontal align of a part state. | ||
2222 | * | ||
2223 | * The value range is from 0.0(right) to 1.0(left) | ||
2224 | * | ||
2225 | * @param obj Object being edited. | ||
2226 | * @param part Part that contain state. | ||
2227 | * @param state The name of the state to get the text horizontal align (not including the state value). | ||
2228 | * @param value The state value. | ||
2229 | * | ||
2230 | * @return The text horizont align value | ||
2231 | */ | ||
2232 | EAPI double edje_edit_state_text_align_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2233 | |||
2234 | /** Get the text vertical align of a part state. | ||
2235 | * | ||
2236 | * The value range is from 0.0(top) to 1.0(bottom) | ||
2237 | * | ||
2238 | * @param obj Object being edited. | ||
2239 | * @param part Part that contain state. | ||
2240 | * @param state The name of the state to get the text vertical align (not including the state value). | ||
2241 | * @param value The state value. | ||
2242 | * | ||
2243 | * @return The text horizont align value | ||
2244 | */ | ||
2245 | EAPI double edje_edit_state_text_align_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2246 | |||
2247 | /** Set the text horizontal align of a part state. | ||
2248 | * | ||
2249 | * The value range is from 0.0(right) to 1.0(left) | ||
2250 | * | ||
2251 | * @param obj Object being edited. | ||
2252 | * @param part Part that contain state. | ||
2253 | * @param state The name of the state to set the text horizontal align (not including the state value). | ||
2254 | * @param value The state value. | ||
2255 | * @param align The new text horizontal align value | ||
2256 | */ | ||
2257 | EAPI void edje_edit_state_text_align_x_set(Evas_Object *obj, const char *part, const char *state, double value, double align); | ||
2258 | |||
2259 | /** Set the text vertical align of a part state. | ||
2260 | * | ||
2261 | * The value range is from 0.0(top) to 1.0(bottom) | ||
2262 | * | ||
2263 | * @param obj Object being edited. | ||
2264 | * @param part Part that contain state. | ||
2265 | * @param state The name of the state to set the text vertical align (not including the state value). | ||
2266 | * @param value The state value. | ||
2267 | * @param align The new text vertical align value | ||
2268 | */ | ||
2269 | EAPI void edje_edit_state_text_align_y_set(Evas_Object *obj, const char *part, const char *state, double value, double align); | ||
2270 | |||
2271 | /** Get the text elipsis of a part state. | ||
2272 | * | ||
2273 | * The value range is from 0.0(right) to 1.0(left) | ||
2274 | * | ||
2275 | * @param obj Object being edited. | ||
2276 | * @param part Part that contain state. | ||
2277 | * @param state The name of the state to get the text elipses value (not including the state value). | ||
2278 | * @param value The state value. | ||
2279 | * | ||
2280 | * @return The text elipsis value | ||
2281 | */ | ||
2282 | EAPI double edje_edit_state_text_elipsis_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2283 | |||
2284 | /** Set the text vertical align of a part state. | ||
2285 | * | ||
2286 | * The value range is from 0.0(right) to 1.0(left) | ||
2287 | * | ||
2288 | * @param obj Object being edited. | ||
2289 | * @param part Part that contain state. | ||
2290 | * @param state The name of the state to set the text elipses value (not including the state value). | ||
2291 | * @param value The state value. | ||
2292 | * @param balance The position where to cut the string | ||
2293 | */ | ||
2294 | EAPI void edje_edit_state_text_elipsis_set(Evas_Object *obj, const char *part, const char *state, double value, double balance); | ||
2295 | |||
2296 | /** Get if the text part fit it's container horizontally | ||
2297 | * | ||
2298 | * @param obj Object being edited. | ||
2299 | * @param part Part that contain state. | ||
2300 | * @param state The name of the state to get the if the text part fit it's container horizontally (not including the state value). | ||
2301 | * @param value The state value. | ||
2302 | * | ||
2303 | * @return EINA_TRUE If the part fit it's container horizontally, EINA_FALSE otherwise. | ||
2304 | */ | ||
2305 | EAPI Eina_Bool edje_edit_state_text_fit_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2306 | |||
2307 | /** Set if the text part should fit it's container horizontally | ||
2308 | * | ||
2309 | * @param obj Object being edited. | ||
2310 | * @param part Part that contain state. | ||
2311 | * @param state The name of the state to set the if the text part fit it's container horizontally (not including the state value). | ||
2312 | * @param value The state value. | ||
2313 | * @param fit EINA_TRUE to make the text fit it's container horizontally, EINA_FALSE otherwise. | ||
2314 | */ | ||
2315 | EAPI void edje_edit_state_text_fit_x_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool fit); | ||
2316 | |||
2317 | /** Get if the text part fit it's container vertically | ||
2318 | * | ||
2319 | * @param obj Object being edited. | ||
2320 | * @param part Part that contain state. | ||
2321 | * @param state The name of the state to get the if the text part fit it's container vertically (not including the state value). | ||
2322 | * @param value The state value. | ||
2323 | * | ||
2324 | * @return EINA_TRUE If the part fit it's container vertically, EINA_FALSE otherwise. | ||
2325 | */ | ||
2326 | EAPI Eina_Bool edje_edit_state_text_fit_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2327 | |||
2328 | /** Set if the text part should fit it's container vertically | ||
2329 | * | ||
2330 | * @param obj Object being edited. | ||
2331 | * @param part Part that contain state. | ||
2332 | * @param state The name of the state to set the if the text part fit it's container vertically (not including the state value). | ||
2333 | * @param value The state value. | ||
2334 | * @param fit EINA_TRUE to make the text fit it's container vertically, EINA_FALSE otherwise. | ||
2335 | */ | ||
2336 | EAPI void edje_edit_state_text_fit_y_set(Evas_Object *obj, const char *part, const char *state, double value, Eina_Bool fit); | ||
2337 | |||
2338 | /** Get the list of all the fonts in the given edje. | ||
2339 | * | ||
2340 | * Use edje_edit_string_list_free() when you don't need the list anymore. | ||
2341 | * | ||
2342 | * @param obj Object being edited. | ||
2343 | * | ||
2344 | * @return A list containing all the fonts names found in the edje file. | ||
2345 | */ | ||
2346 | EAPI Eina_List * edje_edit_fonts_list_get(Evas_Object *obj); | ||
2347 | |||
2348 | /** Add a new font to the edje file. | ||
2349 | * | ||
2350 | * The newly created font will be available to all the groups in the edje, not only the current one. | ||
2351 | * | ||
2352 | * @param obj Object being edited. | ||
2353 | * @param path The file path to load the font from. | ||
2354 | * @param alias The alias for file, or NULL to use filename | ||
2355 | * | ||
2356 | * @return EINA_TRUE if font cat be loaded, EINA_FALSE otherwise. | ||
2357 | */ | ||
2358 | EAPI Eina_Bool edje_edit_font_add(Evas_Object *obj, const char *path, const char* alias); | ||
2359 | |||
2360 | /** Delete font from the edje file. | ||
2361 | * | ||
2362 | * The font will be removed from all the groups in the edje, not only the current one. | ||
2363 | * | ||
2364 | * @param obj Object being edited. | ||
2365 | * @param alias The font alias | ||
2366 | * | ||
2367 | * @return EINA_TRUE if successful, EINA_FALSE otherwise (including the | ||
2368 | * case when the alias is not valid). | ||
2369 | */ | ||
2370 | EAPI Eina_Bool edje_edit_font_del(Evas_Object *obj, const char* alias); | ||
2371 | |||
2372 | /** Get font path for a given font alias. | ||
2373 | * | ||
2374 | * Remember to free the string with edje_edit_string_free() | ||
2375 | * | ||
2376 | * @param obj Object being edited. | ||
2377 | * @param alias The font alias. | ||
2378 | * | ||
2379 | * @return The path of the given font alias. | ||
2380 | */ | ||
2381 | EAPI const char *edje_edit_font_path_get(Evas_Object *obj, const char *alias); | ||
2382 | |||
2383 | |||
2384 | /** Get font name for a given part state. | ||
2385 | * | ||
2386 | * Remember to free the returned string using edje_edit_string_free(). | ||
2387 | * | ||
2388 | * @param obj Object being edited. | ||
2389 | * @param part Part that contain state. | ||
2390 | * @param state The name of the state to get the name of the font used (not including the state value). | ||
2391 | * @param value The state value. | ||
2392 | * | ||
2393 | * @return The name of the font used in the given part state. | ||
2394 | */ | ||
2395 | EAPI const char * edje_edit_state_font_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2396 | |||
2397 | /** Set font name for a given part state. | ||
2398 | * | ||
2399 | * @param obj Object being edited. | ||
2400 | * @param part Part that contain state. | ||
2401 | * @param state The name of the state to set the name of the font that will be used (not including the state value). | ||
2402 | * @param value The state value. | ||
2403 | * @param font The name of the font to use in the given part state. | ||
2404 | */ | ||
2405 | EAPI void edje_edit_state_font_set(Evas_Object *obj, const char *part, const char *state, double value, const char *font); | ||
2406 | |||
2407 | |||
2408 | //@} | ||
2409 | /******************************************************************************/ | ||
2410 | /************************** IMAGES API ************************************/ | ||
2411 | /******************************************************************************/ | ||
2412 | /** @name Images API | ||
2413 | * Functions to deal with image objects (see @ref edcref). | ||
2414 | */ //@{ | ||
2415 | |||
2416 | /** Get the list of all the images in the given edje. | ||
2417 | * Use edje_edit_string_list_free() when you don't need the list anymore. | ||
2418 | * | ||
2419 | * @param obj Object being edited. | ||
2420 | * | ||
2421 | * @return A List containing all images names found in the edje file. | ||
2422 | */ | ||
2423 | EAPI Eina_List * edje_edit_images_list_get(Evas_Object *obj); | ||
2424 | |||
2425 | /** Add an new image to the image collection | ||
2426 | * | ||
2427 | * This function add the given image inside the edje. Don't add a new image part | ||
2428 | * but only put the image inside the edje file. It actually write directly to | ||
2429 | * the file so you don't have to save. | ||
2430 | * After you have to create a new image_part that use this image. Note that all | ||
2431 | * the parts in the edje share the same image collection, thus you can/must use | ||
2432 | * the same image for different part. | ||
2433 | * | ||
2434 | * The format of the image files that can be loaded depend on the evas engine on your system | ||
2435 | * | ||
2436 | * @param obj Object being edited. | ||
2437 | * @param path The name of the image file to include in the edje. | ||
2438 | * | ||
2439 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2440 | */ | ||
2441 | EAPI Eina_Bool edje_edit_image_add(Evas_Object *obj, const char *path); | ||
2442 | |||
2443 | /** Delete an image from the image collection | ||
2444 | * | ||
2445 | * It actually write directly to the file so you don't have to save. | ||
2446 | * | ||
2447 | * @param obj Object being edited. | ||
2448 | * @param name The name of the image file to include in the edje. | ||
2449 | * | ||
2450 | * @return EINA_TRUE if successful, EINA_FALSE otherwise (including the | ||
2451 | * case when the name is not valid). | ||
2452 | */ | ||
2453 | EAPI Eina_Bool edje_edit_image_del(Evas_Object *obj, const char *name); | ||
2454 | |||
2455 | /** Add an image entry to the image collection | ||
2456 | * | ||
2457 | * This function adds the given image entry to the edje image collection. The | ||
2458 | * image needs to be inside the eet already, with key name "images/id". After | ||
2459 | * you have to create a new image_part that use this image, referring to it as | ||
2460 | * "name". Note that all the parts in the edje share the same image collection, | ||
2461 | * thus you can/must use the same image for different part. | ||
2462 | * | ||
2463 | * @param obj Object being edited. | ||
2464 | * @param name The image entry name. | ||
2465 | * @param id The image id. | ||
2466 | * | ||
2467 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2468 | */ | ||
2469 | EAPI Eina_Bool edje_edit_image_data_add(Evas_Object *obj, const char *name, int id); | ||
2470 | |||
2471 | /** Get normal image name for a given part state. | ||
2472 | * | ||
2473 | * @param obj Object being edited. | ||
2474 | * @param part Part that contain state. | ||
2475 | * @param state The name of the state to get the name that is being used (not including the state value). | ||
2476 | * @param value The state value. | ||
2477 | * | ||
2478 | * @return The name of the image used by state. | ||
2479 | */ | ||
2480 | EAPI const char * edje_edit_state_image_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2481 | |||
2482 | /** Set normal image for a given part state. | ||
2483 | * | ||
2484 | * @param obj Object being edited. | ||
2485 | * @param part Part that contain state. | ||
2486 | * @param state The name of the state to set the image that will be used (not including the state value). | ||
2487 | * @param value The state value. | ||
2488 | * @param image The name of the image (must be an image contained in the edje file). | ||
2489 | */ | ||
2490 | EAPI void edje_edit_state_image_set(Evas_Object *obj, const char *part, const char *state, double value, const char *image); | ||
2491 | |||
2492 | /** Get image id for a given image name. | ||
2493 | * | ||
2494 | * @param obj Object being edited. | ||
2495 | * @param image_name The image name. | ||
2496 | * | ||
2497 | * @return The id of the given image name. | ||
2498 | */ | ||
2499 | EAPI int edje_edit_image_id_get(Evas_Object *obj, const char *image_name); | ||
2500 | |||
2501 | /** Get compression type for the given image. | ||
2502 | * | ||
2503 | * @param obj Object being edited. | ||
2504 | * @param image The name of the image. | ||
2505 | * | ||
2506 | * @return One of Image Compression types. | ||
2507 | * (EDJE_EDIT_IMAGE_COMP_RAW, EDJE_EDIT_IMAGE_COMP_USER, EDJE_EDIT_IMAGE_COMP_COMP, EDJE_EDIT_IMAGE_COMP_LOSSY). | ||
2508 | */ | ||
2509 | EAPI Edje_Edit_Image_Comp edje_edit_image_compression_type_get(Evas_Object *obj, const char *image); | ||
2510 | |||
2511 | /** Get compression rate for the given image. | ||
2512 | * | ||
2513 | * @param obj Object being edited. | ||
2514 | * @param image The name of the image. | ||
2515 | * | ||
2516 | * @return The compression rate (if the imnage is @c | ||
2517 | * EDJE_EDIT_IMAGE_COMP_LOSSY) or < 0, on errors. | ||
2518 | */ | ||
2519 | EAPI int edje_edit_image_compression_rate_get(Evas_Object *obj, const char *image); | ||
2520 | |||
2521 | /** Get the image border of a part state. | ||
2522 | * | ||
2523 | * Pass NULL to any of [r,g,b,a] to get only the others. | ||
2524 | * | ||
2525 | * @param obj Object being edited. | ||
2526 | * @param part Part that contain state. | ||
2527 | * @param state The name of the state to get the image border (not | ||
2528 | * including the state value). | ||
2529 | * @param value The state value. | ||
2530 | * @param l A pointer to store the left value | ||
2531 | * @param r A pointer to store the right value | ||
2532 | * @param t A pointer to store the top value | ||
2533 | * @param b A pointer to store the bottom value | ||
2534 | */ | ||
2535 | EAPI void edje_edit_state_image_border_get(Evas_Object *obj, const char *part, const char *state, double value, int *l, int *r, int *t, int *b); | ||
2536 | |||
2537 | /** Set the image border of a part state. | ||
2538 | * | ||
2539 | * Pass -1 to any of [l,r,t,b] to leave the value untouched. | ||
2540 | * | ||
2541 | * @param obj Object being edited. | ||
2542 | * @param part Part that contain state. | ||
2543 | * @param state The name of the state to set the image border (not | ||
2544 | * including the state value). | ||
2545 | * @param value The state value. | ||
2546 | * @param l Left border value (or -1). | ||
2547 | * @param r Right border value (or -1). | ||
2548 | * @param t Top border value (or -1). | ||
2549 | * @param b Bottom border value (or -1). | ||
2550 | */ | ||
2551 | EAPI void edje_edit_state_image_border_set(Evas_Object *obj, const char *part, const char *state, double value, int l, int r, int t, int b); | ||
2552 | |||
2553 | /** Get if the image center should be draw. | ||
2554 | * | ||
2555 | * 1 means to draw the center, 0 to don't draw it. | ||
2556 | * | ||
2557 | * @param obj Object being edited. | ||
2558 | * @param part Part that contain state. | ||
2559 | * @param state The name of the state to get the image border fill (not including the state value). | ||
2560 | * @param value The state value. | ||
2561 | * | ||
2562 | * @return 1 if the center of the bordered image is draw, 0 otherwise. | ||
2563 | */ | ||
2564 | EAPI unsigned char edje_edit_state_image_border_fill_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2565 | |||
2566 | /** Set if the image center should be draw. | ||
2567 | * | ||
2568 | * 1 means to draw the center, 0 to don't draw it. | ||
2569 | * | ||
2570 | * @param obj Object being edited. | ||
2571 | * @param part Part that contain state. | ||
2572 | * @param state The name of the state to set the image border fill (not including the state value). | ||
2573 | * @param value The state value. | ||
2574 | * @param fill Fill to be se. 1 if the center of the bordered image is draw, 0 otherwise. | ||
2575 | */ | ||
2576 | EAPI void edje_edit_state_image_border_fill_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char fill); | ||
2577 | |||
2578 | /** Get the list of all the tweens images in the given part state. | ||
2579 | * | ||
2580 | * Use edje_edit_string_list_free() when you don't need it anymore. | ||
2581 | * | ||
2582 | * @param obj Object being edited. | ||
2583 | * @param part Part that contain state. | ||
2584 | * @param state The name of the state to get the list of all the tweens images (not including the state value). | ||
2585 | * @param value The state value. | ||
2586 | * | ||
2587 | * @return A string list containing all the image name that form a tween animation in the given part state. | ||
2588 | */ | ||
2589 | EAPI Eina_List * edje_edit_state_tweens_list_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2590 | |||
2591 | /** Add a new tween frame to the given part state. | ||
2592 | * | ||
2593 | * The tween param must be the name of an existing image. | ||
2594 | * | ||
2595 | * @param obj Object being edited. | ||
2596 | * @param part Part that contain state. | ||
2597 | * @param state The name of the state to add a new tween frame (not including the state value). | ||
2598 | * @param value The state value. | ||
2599 | * @param tween The name of the image to add. | ||
2600 | * | ||
2601 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2602 | */ | ||
2603 | EAPI Eina_Bool edje_edit_state_tween_add(Evas_Object *obj, const char *part, const char *state, double value, const char *tween); | ||
2604 | |||
2605 | /** Remove the first tween with the given name. | ||
2606 | * | ||
2607 | * The image is not removed from the edje. | ||
2608 | * | ||
2609 | * @param obj Object being edited. | ||
2610 | * @param part Part that contain state. | ||
2611 | * @param state The name of the state to del the tween (not including the state value). | ||
2612 | * @param value The state value. | ||
2613 | * @param tween The name of the image to del. | ||
2614 | * | ||
2615 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2616 | */ | ||
2617 | EAPI Eina_Bool edje_edit_state_tween_del(Evas_Object *obj, const char *part, const char *state, double value, const char *tween); | ||
2618 | |||
2619 | |||
2620 | //@} | ||
2621 | /******************************************************************************/ | ||
2622 | /************************* SPECTRUM API ***********************************/ | ||
2623 | /******************************************************************************/ | ||
2624 | /** @name Spectrum API | ||
2625 | * Functions to manage spectrum (see @ref edcref). | ||
2626 | */ //@{ | ||
2627 | |||
2628 | /** Get the list of all the spectrum in the given edje object. | ||
2629 | * | ||
2630 | * Use edje_edit_string_list_free() when you don't need it anymore. | ||
2631 | * | ||
2632 | * @param obj Object being edited. | ||
2633 | * | ||
2634 | * @return A list containing all the spectra names. | ||
2635 | */ | ||
2636 | EAPI Eina_List * edje_edit_spectrum_list_get(Evas_Object *obj); | ||
2637 | |||
2638 | /** Add a new spectra in the given edje object. | ||
2639 | * | ||
2640 | * @param obj Object being edited. | ||
2641 | * @param name The name of the spectra to include in the edje. | ||
2642 | * | ||
2643 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2644 | */ | ||
2645 | EAPI Eina_Bool edje_edit_spectra_add(Evas_Object *obj, const char *name); | ||
2646 | |||
2647 | /** Delete the given spectra from the edje object. | ||
2648 | * | ||
2649 | * @param obj Object being edited. | ||
2650 | * @param spectra The name of the spectra to delete. | ||
2651 | * | ||
2652 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2653 | */ | ||
2654 | EAPI Eina_Bool edje_edit_spectra_del(Evas_Object *obj, const char *spectra); | ||
2655 | |||
2656 | /** Change the name of the given spectra. | ||
2657 | * | ||
2658 | * @param obj Object being edited. | ||
2659 | * @param spectra The name of the current spectra. | ||
2660 | * @param name The new name to assign. | ||
2661 | * | ||
2662 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2663 | */ | ||
2664 | EAPI Eina_Bool edje_edit_spectra_name_set(Evas_Object *obj, const char *spectra, const char *name); | ||
2665 | |||
2666 | /** Get the number of stops in the given spectra. | ||
2667 | * | ||
2668 | * @param obj Object being edited. | ||
2669 | * @param spectra The name of the spectra. | ||
2670 | * | ||
2671 | * @return The number of stops (or 0 on errors). | ||
2672 | */ | ||
2673 | EAPI int edje_edit_spectra_stop_num_get(Evas_Object *obj, const char *spectra); | ||
2674 | |||
2675 | /** Set the number of stops in the given spectra. | ||
2676 | * | ||
2677 | * @param obj Object being edited. | ||
2678 | * @param spectra The name of the spectra. | ||
2679 | * @param num The number of stops you want | ||
2680 | * | ||
2681 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2682 | */ | ||
2683 | EAPI Eina_Bool edje_edit_spectra_stop_num_set(Evas_Object *obj, const char *spectra, int num); | ||
2684 | |||
2685 | /** Get the colors of the given stop. | ||
2686 | * | ||
2687 | * @param obj Object being edited. | ||
2688 | * @param spectra The name of the spectra. | ||
2689 | * @param stop_number The number of the stop, | ||
2690 | * @param r Where to store the red color value, | ||
2691 | * @param g Where to store the green color value, | ||
2692 | * @param b Where to store the blue color value, | ||
2693 | * @param a Where to store the alpha color value, | ||
2694 | * @param d Where to store the delta stop value, | ||
2695 | * | ||
2696 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2697 | */ | ||
2698 | EAPI Eina_Bool edje_edit_spectra_stop_color_get(Evas_Object *obj, const char *spectra, int stop_number, int *r, int *g, int *b, int *a, int *d); | ||
2699 | |||
2700 | /** Set the colors of the given stop. | ||
2701 | * | ||
2702 | * @param obj Object being edited. | ||
2703 | * @param spectra The name of the spectra. | ||
2704 | * @param stop_number The number of the stops, | ||
2705 | * @param r The red color value to set, | ||
2706 | * @param g The green color value to set, | ||
2707 | * @param b The blue color value to set, | ||
2708 | * @param a The alpha color value to set, | ||
2709 | * @param d The delta stop value to set, | ||
2710 | */ | ||
2711 | EAPI Eina_Bool edje_edit_spectra_stop_color_set(Evas_Object *obj, const char *spectra, int stop_number, int r, int g, int b, int a, int d); | ||
2712 | |||
2713 | |||
2714 | //@} | ||
2715 | /******************************************************************************/ | ||
2716 | /************************* GRADIENT API ***********************************/ | ||
2717 | /******************************************************************************/ | ||
2718 | /** @name Gradient API | ||
2719 | * Functions to deal with gradient objects (see @ref edcref). | ||
2720 | */ //@{ | ||
2721 | |||
2722 | /** Get the type of gradient. | ||
2723 | * | ||
2724 | * Remember to free the string with edje_edit_string_free(). | ||
2725 | * | ||
2726 | * @param obj Object being edited. | ||
2727 | * @param part The part that contain state. | ||
2728 | * @param state The name of the state to get the gradient type (not including the state value). | ||
2729 | * @param value The state value. | ||
2730 | * | ||
2731 | * @return The type of gradient used in state. | ||
2732 | * (linear, linear.diag, linear.codiag, radial, rectangular, angular, sinosoidal) | ||
2733 | */ | ||
2734 | EAPI const char * edje_edit_state_gradient_type_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2735 | |||
2736 | /** Set the type of gradient. | ||
2737 | * | ||
2738 | * Gradient type can be on of the following: linear, linear.diag, linear.codiag, radial, rectangular, angular, sinusoidal | ||
2739 | * | ||
2740 | * @param obj Object being edited. | ||
2741 | * @param part The part that contain state. | ||
2742 | * @param state The name of the state to set the gradient type (not including the state value). | ||
2743 | * @param value The state value. | ||
2744 | * @param type The type of gradient to use. | ||
2745 | * | ||
2746 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2747 | */ | ||
2748 | EAPI Eina_Bool edje_edit_state_gradient_type_set(Evas_Object *obj, const char *part, const char *state, double value, const char *type); | ||
2749 | |||
2750 | /** Get if the current gradient use the fill properties or the gradient_rel as params. | ||
2751 | * | ||
2752 | * @param obj Object being edited. | ||
2753 | * @param part The part that contain state. | ||
2754 | * @param state The name of the state to set the gradient type (not including the state value). | ||
2755 | * @param value The state value. | ||
2756 | * | ||
2757 | * @return EINA_TRUE if gradient use the fill properties, EINA_FALSE otherwise. | ||
2758 | * */ | ||
2759 | EAPI Eina_Bool edje_edit_state_gradient_use_fill_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2760 | |||
2761 | /** Get the spectra used by part state. | ||
2762 | * | ||
2763 | * Remember to free the string with edje_edit_string_free(). | ||
2764 | * | ||
2765 | * @param obj Object being edited. | ||
2766 | * @param part The part that contain state. | ||
2767 | * @param state The name of the state to get the spectra name used (not including the state value). | ||
2768 | * @param value The state value. | ||
2769 | * | ||
2770 | * @return The spectra name used in state. | ||
2771 | */ | ||
2772 | EAPI const char * edje_edit_state_gradient_spectra_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2773 | |||
2774 | /** Set the spectra used by part state. | ||
2775 | * | ||
2776 | * @param obj Object being edited. | ||
2777 | * @param part The part that contain state. | ||
2778 | * @param state The name of the state to set the spectra (not including the state value). | ||
2779 | * @param value The state value. | ||
2780 | * @param spectra The spectra name to assign | ||
2781 | * | ||
2782 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2783 | */ | ||
2784 | EAPI Eina_Bool edje_edit_state_gradient_spectra_set(Evas_Object *obj, const char *part, const char *state, double value, const char *spectra); | ||
2785 | |||
2786 | /** Get the angle of the gradient. | ||
2787 | * | ||
2788 | * @param obj Object being edited. | ||
2789 | * @param part The part that contain state. | ||
2790 | * @param state The name of the state to get the angle (not including the state value). | ||
2791 | * @param value The state value. | ||
2792 | * | ||
2793 | * @return The angle of the gradient. | ||
2794 | */ | ||
2795 | EAPI int edje_edit_state_gradient_angle_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2796 | |||
2797 | /** Set the angle of the gradient. | ||
2798 | * | ||
2799 | * @param obj Object being edited. | ||
2800 | * @param part The part that contain state. | ||
2801 | * @param state The name of the state to set the angle (not including the state value). | ||
2802 | * @param value The state value. | ||
2803 | * @param angle The angle to set. | ||
2804 | */ | ||
2805 | EAPI void edje_edit_state_gradient_angle_set(Evas_Object *obj, const char *part, const char *state, double value, int angle); | ||
2806 | |||
2807 | /** Get the gradient rel1 horizontal relative value | ||
2808 | * | ||
2809 | * @param obj Object being edited. | ||
2810 | * @param part The part that contain state. | ||
2811 | * @param state The name of the state to get rel1 relative x value (not including the state value). | ||
2812 | * @param value The state value. | ||
2813 | * | ||
2814 | * @return The gradient rel1 horizontal relative value. | ||
2815 | */ | ||
2816 | EAPI double edje_edit_state_gradient_rel1_relative_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2817 | |||
2818 | /** Get the gradient rel1 vertical relative value | ||
2819 | * | ||
2820 | * @param obj Object being edited. | ||
2821 | * @param part The part that contain state. | ||
2822 | * @param state The name of the state to get rel1 relative y value (not including the state value). | ||
2823 | * @param value The state value. | ||
2824 | * | ||
2825 | * @return The gradient rel1 vertical relative value. | ||
2826 | */ | ||
2827 | EAPI double edje_edit_state_gradient_rel1_relative_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2828 | |||
2829 | /** Get the gradient rel2 horizontal relative value | ||
2830 | * | ||
2831 | * @param obj Object being edited. | ||
2832 | * @param part The part that contain state. | ||
2833 | * @param state The name of the state to get rel2 relative x value (not including the state value). | ||
2834 | * @param value The state value. | ||
2835 | * | ||
2836 | * @return The gradient rel2 horizontal relative value. | ||
2837 | */ | ||
2838 | EAPI double edje_edit_state_gradient_rel2_relative_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2839 | |||
2840 | /** Get the gradient rel2 vertical relative value | ||
2841 | * | ||
2842 | * @param obj Object being edited. | ||
2843 | * @param part The part that contain state. | ||
2844 | * @param state The name of the state to get rel2 relative y value (not including the state value). | ||
2845 | * @param value The state value. | ||
2846 | * | ||
2847 | * @return The gradient rel2 vertical relative value. | ||
2848 | */ | ||
2849 | EAPI double edje_edit_state_gradient_rel2_relative_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2850 | |||
2851 | |||
2852 | /** Set the gradient rel1 horizontal relative value | ||
2853 | * | ||
2854 | * @param obj Object being edited. | ||
2855 | * @param part The part that contain state. | ||
2856 | * @param state The name of the state to set rel1 relative x value (not including the state value). | ||
2857 | * @param value The state value. | ||
2858 | * @param val The rel1 relative x to be set, | ||
2859 | * | ||
2860 | * @return EINA_TRUE if successful, EINA_FALSE otherwise.. | ||
2861 | */ | ||
2862 | EAPI Eina_Bool edje_edit_state_gradient_rel1_relative_x_set(Evas_Object *obj, const char *part, const char *state, double value, double val); | ||
2863 | |||
2864 | |||
2865 | /** Set the gradient rel1 vertical relative value | ||
2866 | * | ||
2867 | * @param obj Object being edited. | ||
2868 | * @param part The part that contain state. | ||
2869 | * @param state The name of the state to set rel1 relative y value (not including the state value). | ||
2870 | * @param value The state value. | ||
2871 | * @param val The rel1 relative y to be set, | ||
2872 | * | ||
2873 | * @return EINA_TRUE if successful, EINA_FALSE otherwise.. | ||
2874 | */ | ||
2875 | EAPI Eina_Bool edje_edit_state_gradient_rel1_relative_y_set(Evas_Object *obj, const char *part, const char *state, double value, double val); | ||
2876 | |||
2877 | /** Set the gradient rel2 horizontal relative value | ||
2878 | * | ||
2879 | * @param obj Object being edited. | ||
2880 | * @param part The part that contain state. | ||
2881 | * @param state The name of the state to set rel2 relative x value (not including the state value). | ||
2882 | * @param value The state value. | ||
2883 | * @param val The rel2 relative x to be set, | ||
2884 | * | ||
2885 | * @return EINA_TRUE if successful, EINA_FALSE otherwise.. | ||
2886 | */ | ||
2887 | EAPI Eina_Bool edje_edit_state_gradient_rel2_relative_x_set(Evas_Object *obj, const char *part, const char *state, double value, double val); | ||
2888 | |||
2889 | /** Set the gradient rel2 vertical relative value | ||
2890 | * | ||
2891 | * @param obj Object being edited. | ||
2892 | * @param part The part that contain state. | ||
2893 | * @param state The name of the state to set rel2 relative y value (not including the state value). | ||
2894 | * @param value The state value. | ||
2895 | * @param val The rel2 relative y to be set, | ||
2896 | * | ||
2897 | * @return EINA_TRUE if successful, EINA_FALSE otherwise.. | ||
2898 | */ | ||
2899 | EAPI Eina_Bool edje_edit_state_gradient_rel2_relative_y_set(Evas_Object *obj, const char *part, const char *state, double value, double val); | ||
2900 | |||
2901 | /** Get the gradient rel1 horizontal offset value | ||
2902 | * | ||
2903 | * @param obj Object being edited. | ||
2904 | * @param part The part that contain state. | ||
2905 | * @param state The name of the state to get rel1 offset x value (not including the state value). | ||
2906 | * @param value The state value. | ||
2907 | * | ||
2908 | * @return The gradient rel1 horizontal offset value. | ||
2909 | */ | ||
2910 | EAPI int edje_edit_state_gradient_rel1_offset_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2911 | |||
2912 | /** Get the gradient rel1 vertical offset value | ||
2913 | * | ||
2914 | * @param obj Object being edited. | ||
2915 | * @param part The part that contain state. | ||
2916 | * @param state The name of the state to get rel1 offset y value (not including the state value). | ||
2917 | * @param value The state value. | ||
2918 | * | ||
2919 | * @return The gradient rel1 vertical offset value. | ||
2920 | */ | ||
2921 | EAPI int edje_edit_state_gradient_rel1_offset_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2922 | |||
2923 | /** Get the gradient rel2 horizontal offset value | ||
2924 | * | ||
2925 | * @param obj Object being edited. | ||
2926 | * @param part The part that contain state. | ||
2927 | * @param state The name of the state to get rel2 offset x value (not including the state value). | ||
2928 | * @param value The state value. | ||
2929 | * | ||
2930 | * @return The gradient rel2 horizontal offset value. | ||
2931 | */ | ||
2932 | EAPI int edje_edit_state_gradient_rel2_offset_x_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2933 | |||
2934 | /** Get the gradient rel2 vertical offset value | ||
2935 | * | ||
2936 | * @param obj Object being edited. | ||
2937 | * @param part The part that contain state. | ||
2938 | * @param state The name of the state to get rel2 offset y value (not including the state value). | ||
2939 | * @param value The state value. | ||
2940 | * | ||
2941 | * @return The gradient rel2 vertical offset value. | ||
2942 | */ | ||
2943 | EAPI int edje_edit_state_gradient_rel2_offset_y_get(Evas_Object *obj, const char *part, const char *state, double value); | ||
2944 | |||
2945 | /** Set the gradient rel1 horizontal offset value | ||
2946 | * | ||
2947 | * @param obj Object being edited. | ||
2948 | * @param part The part that contain state. | ||
2949 | * @param state The name of the state to set rel1 offset x value (not including the state value). | ||
2950 | * @param value The state value. | ||
2951 | * @param val The rel1 offset x value. | ||
2952 | * | ||
2953 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2954 | */ | ||
2955 | EAPI Eina_Bool edje_edit_state_gradient_rel1_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, int val); | ||
2956 | |||
2957 | /** Set the gradient rel1 vertical offset value | ||
2958 | * | ||
2959 | * @param obj Object being edited. | ||
2960 | * @param part The part that contain state. | ||
2961 | * @param state The name of the state to set rel1 offset y value (not including the state value). | ||
2962 | * @param value The state value. | ||
2963 | * @param val The rel1 offset y value. | ||
2964 | * | ||
2965 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2966 | */ | ||
2967 | EAPI Eina_Bool edje_edit_state_gradient_rel1_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, int val); | ||
2968 | |||
2969 | /** Set the gradient rel2 horizontal offset value | ||
2970 | * | ||
2971 | * @param obj Object being edited. | ||
2972 | * @param part The part that contain state. | ||
2973 | * @param state The name of the state to set rel2 offset x value (not including the state value). | ||
2974 | * @param value The state value. | ||
2975 | * @param val The rel2 offset x value. | ||
2976 | * | ||
2977 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2978 | */ | ||
2979 | EAPI Eina_Bool edje_edit_state_gradient_rel2_offset_x_set(Evas_Object *obj, const char *part, const char *state, double value, int val); | ||
2980 | |||
2981 | /** Set the gradient rel2 vertical offset value | ||
2982 | * | ||
2983 | * @param obj Object being edited. | ||
2984 | * @param part The part that contain state. | ||
2985 | * @param state The name of the state to set rel2 offset y value (not including the state value). | ||
2986 | * @param value The state value. | ||
2987 | * @param val The rel2 offset y value. | ||
2988 | * | ||
2989 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
2990 | */ | ||
2991 | EAPI Eina_Bool edje_edit_state_gradient_rel2_offset_y_set(Evas_Object *obj, const char *part, const char *state, double value, int val); | ||
2992 | |||
2993 | |||
2994 | //@} | ||
2995 | /******************************************************************************/ | ||
2996 | /************************* PROGRAMS API ***********************************/ | ||
2997 | /******************************************************************************/ | ||
2998 | /** @name Programs API | ||
2999 | * Functions to deal with programs (see @ref edcref). | ||
3000 | */ //@{ | ||
3001 | |||
3002 | /** Get the list of all the programs in the given edje object. | ||
3003 | * | ||
3004 | * Use edje_edit_string_list_free() when you don't need it anymore. | ||
3005 | * | ||
3006 | * @param obj Object being edited. | ||
3007 | * | ||
3008 | * @return A list containing all the program names. | ||
3009 | */ | ||
3010 | EAPI Eina_List * edje_edit_programs_list_get(Evas_Object *obj); | ||
3011 | |||
3012 | /** Add a new program to the edje file | ||
3013 | * | ||
3014 | * If a program with the same name just exist the function will fail. | ||
3015 | * | ||
3016 | * @param obj Object being edited. | ||
3017 | * @param name The name of the new program. | ||
3018 | * | ||
3019 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3020 | */ | ||
3021 | EAPI Eina_Bool edje_edit_program_add(Evas_Object *obj, const char *name); | ||
3022 | |||
3023 | /** Remove the given program from the edje file. | ||
3024 | * | ||
3025 | * @param obj Object being edited. | ||
3026 | * @param prog The name of the program to remove. | ||
3027 | * | ||
3028 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3029 | */ | ||
3030 | EAPI Eina_Bool edje_edit_program_del(Evas_Object *obj, const char *prog); | ||
3031 | |||
3032 | /** Check if a program with the given name exist in the edje object. | ||
3033 | * | ||
3034 | * @param obj Object being edited. | ||
3035 | * @param prog The prog of the program that will be searched. | ||
3036 | * | ||
3037 | * @return EINA_TRUE if the program exist, EINA_FALSE otherwise. | ||
3038 | */ | ||
3039 | EAPI Eina_Bool edje_edit_program_exist(Evas_Object *obj, const char *prog); | ||
3040 | |||
3041 | /** Run the given program. | ||
3042 | * | ||
3043 | * @param obj Object being edited. | ||
3044 | * @param prog The name of the program to execute. | ||
3045 | * | ||
3046 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3047 | */ | ||
3048 | EAPI Eina_Bool edje_edit_program_run(Evas_Object *obj, const char *prog); | ||
3049 | |||
3050 | /** Set a new name for the given program | ||
3051 | * | ||
3052 | * @param obj Object being edited. | ||
3053 | * @param prog The current program name. | ||
3054 | * @param new_name The new name to assign. | ||
3055 | * | ||
3056 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3057 | */ | ||
3058 | EAPI Eina_Bool edje_edit_program_name_set(Evas_Object *obj, const char *prog, const char *new_name); | ||
3059 | |||
3060 | /** Get source of a given program. | ||
3061 | * | ||
3062 | * Remember to free the returned string using edje_edit_string_free(). | ||
3063 | * | ||
3064 | * @param obj Object being edited. | ||
3065 | * @param prog The name of the program to get source. | ||
3066 | * | ||
3067 | * @return The source value por program. | ||
3068 | */ | ||
3069 | EAPI const char * edje_edit_program_source_get(Evas_Object *obj, const char *prog); | ||
3070 | |||
3071 | /** Set source of the given program. | ||
3072 | * | ||
3073 | * @param obj Object being edited. | ||
3074 | * @param prog The name of the program to set source. | ||
3075 | * @param source The new source value. | ||
3076 | * | ||
3077 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3078 | */ | ||
3079 | EAPI Eina_Bool edje_edit_program_source_set(Evas_Object *obj, const char *prog, const char *source); | ||
3080 | |||
3081 | /** Get signal of a given program. | ||
3082 | * | ||
3083 | * Remember to free the returned string using edje_edit_string_free(). | ||
3084 | * | ||
3085 | * @param obj Object being edited. | ||
3086 | * @param prog The name of the program to get the signal. | ||
3087 | * | ||
3088 | * @return The signal value for program. | ||
3089 | */ | ||
3090 | EAPI const char * edje_edit_program_signal_get(Evas_Object *obj, const char *prog); | ||
3091 | |||
3092 | /** Set signal of the given program. | ||
3093 | * | ||
3094 | * @param obj Object being edited. | ||
3095 | * @param prog The name of the program to set the signal. | ||
3096 | * @param signal The new signal value. | ||
3097 | * | ||
3098 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3099 | */ | ||
3100 | EAPI Eina_Bool edje_edit_program_signal_set(Evas_Object *obj, const char *prog, const char *signal); | ||
3101 | |||
3102 | /** Get in.from of a given program. | ||
3103 | * | ||
3104 | * @param obj Object being edited. | ||
3105 | * @param prog The name of the program to get the delay. | ||
3106 | * | ||
3107 | * @return The delay. | ||
3108 | */ | ||
3109 | EAPI double edje_edit_program_in_from_get(Evas_Object *obj, const char *prog); | ||
3110 | |||
3111 | /** Set in.from of a given program. | ||
3112 | * | ||
3113 | * @param obj Object being edited. | ||
3114 | * @param prog The name of the program to set the delay. | ||
3115 | * @param seconds Number of seconds to delay the program execution | ||
3116 | * | ||
3117 | * */ | ||
3118 | EAPI Eina_Bool edje_edit_program_in_from_set(Evas_Object *obj, const char *prog, double seconds); | ||
3119 | |||
3120 | /** Get in.range of a given program. | ||
3121 | * | ||
3122 | * @param obj Object being edited. | ||
3123 | * @param prog The name of the program to get random delay. | ||
3124 | * | ||
3125 | * @return The delay random. | ||
3126 | */ | ||
3127 | EAPI double edje_edit_program_in_range_get(Evas_Object *obj, const char *prog); | ||
3128 | |||
3129 | /** Set in.range of a given program. | ||
3130 | * | ||
3131 | * @param obj Object being edited. | ||
3132 | * @param prog The name of the program to set random delay. | ||
3133 | * @param seconds Max random number of seconds to delay. | ||
3134 | * | ||
3135 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3136 | */ | ||
3137 | EAPI Eina_Bool edje_edit_program_in_range_set(Evas_Object *obj, const char *prog, double seconds); | ||
3138 | |||
3139 | /** Get the action of a given program. | ||
3140 | * | ||
3141 | * @param obj Object being edited. | ||
3142 | * @param prog The name of the program to get the action. | ||
3143 | * | ||
3144 | * @return The action type, or -1 on errors. | ||
3145 | * Action can be one of EDJE_ACTION_TYPE_NONE, _STATE_SET, ACTION_STOP, SIGNAL_EMIT, DRAG_VAL_SET, _DRAG_VAL_STEP, _DRAG_VAL_PAGE, _SCRIPT | ||
3146 | */ | ||
3147 | EAPI Edje_Action_Type edje_edit_program_action_get(Evas_Object *obj, const char *prog); | ||
3148 | |||
3149 | /** Set the action of a given program. | ||
3150 | * | ||
3151 | * Action can be one of EDJE_ACTION_TYPE_NONE, _STATE_SET, ACTION_STOP, SIGNAL_EMIT, DRAG_VAL_SET, _DRAG_VAL_STEP, _DRAG_VAL_PAGE, _SCRIPT | ||
3152 | * | ||
3153 | * @param obj Object being edited. | ||
3154 | * @param prog The name of the program to set the action. | ||
3155 | * @param action The new action type. | ||
3156 | * | ||
3157 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3158 | */ | ||
3159 | EAPI Eina_Bool edje_edit_program_action_set(Evas_Object *obj, const char *prog, Edje_Action_Type action); | ||
3160 | |||
3161 | /** Get the list of the targets for the given program. | ||
3162 | * | ||
3163 | * Use edje_edit_string_list_free() when you don't need it anymore. | ||
3164 | * | ||
3165 | * @param obj Object being edited. | ||
3166 | * @param prog The name of the progrem to get the list of the targets. | ||
3167 | * | ||
3168 | * @return A list with all the targets names, or NULL on error. | ||
3169 | */ | ||
3170 | EAPI Eina_List * edje_edit_program_targets_get(Evas_Object *obj, const char *prog); | ||
3171 | |||
3172 | /** Add a new target program to the list of 'targets' in the given program. | ||
3173 | * | ||
3174 | * If program action is @c EDJE_ACTION_TYPE_ACTION_STOP, then 'target' | ||
3175 | * must be an existing program name. If it's @c | ||
3176 | * EDJE_ACTION_TYPE_STATE_SET, then 'target' must be an existing part | ||
3177 | * name. | ||
3178 | * | ||
3179 | * @param obj Object being edited. | ||
3180 | * @param prog The name of the program to add a new target. | ||
3181 | * @param target The name of the new target itself. | ||
3182 | * | ||
3183 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3184 | */ | ||
3185 | EAPI Eina_Bool edje_edit_program_target_add(Evas_Object *obj, const char *prog, const char *target); | ||
3186 | |||
3187 | /** Deletes a target from the list of 'targets' in the given program. | ||
3188 | * | ||
3189 | * If program action is EDJE_ACTION_TYPE_ACTION_STOP then 'target' must be an existing program name. | ||
3190 | * If action is EDJE_ACTION_TYPE_STATE_SET then 'target' must be an existing part name. | ||
3191 | * | ||
3192 | * @param obj Object being edited. | ||
3193 | * @param prog The name of the program to del a target from the list of targets. | ||
3194 | * @param target The name of another program or another part. | ||
3195 | * | ||
3196 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3197 | */ | ||
3198 | EAPI Eina_Bool edje_edit_program_target_del(Evas_Object *obj, const char *prog, const char *target); | ||
3199 | |||
3200 | /** Clear the 'targets' list of the given program | ||
3201 | * | ||
3202 | * @param obj Object being edited. | ||
3203 | * @param prog The name of the program to cleaar the 'targets' list. | ||
3204 | * | ||
3205 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3206 | */ | ||
3207 | EAPI Eina_Bool edje_edit_program_targets_clear(Evas_Object *obj, const char *prog); | ||
3208 | |||
3209 | /** Get the list of action that will be run after the give program | ||
3210 | * | ||
3211 | * Use edje_edit_string_list_free() when you don't need it anymore. | ||
3212 | * | ||
3213 | * @param obj Object being edited. | ||
3214 | * @param prog The name of the program to get the list of actions | ||
3215 | * | ||
3216 | * @return A list with all program names. or NULL on error. | ||
3217 | */ | ||
3218 | EAPI Eina_List * edje_edit_program_afters_get(Evas_Object *obj, const char *prog); | ||
3219 | |||
3220 | /** Add a new program name to the list of 'afters' in the given program. | ||
3221 | * | ||
3222 | * All the programs listed in 'afters' will be executed after program execution. | ||
3223 | * | ||
3224 | * @param obj Object being edited. | ||
3225 | * @param prog The name of the program that contains the list of afters | ||
3226 | * @param after The name of another program to add to the afters list | ||
3227 | * | ||
3228 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3229 | */ | ||
3230 | EAPI Eina_Bool edje_edit_program_after_add(Evas_Object *obj, const char *prog, const char *after); | ||
3231 | |||
3232 | /** Delete the given program from the list of 'afters' of the program. | ||
3233 | * | ||
3234 | * @param obj Object being edited. | ||
3235 | * @param prog The name of the program from where to remove the after. | ||
3236 | * @param after The name of the program to remove from the list of afters. | ||
3237 | * | ||
3238 | * @return EINA_TRUE is successful or not in the list, EINA_FALSE otherwise. | ||
3239 | */ | ||
3240 | EAPI Eina_Bool edje_edit_program_after_del(Evas_Object *obj, const char *prog, const char *after); | ||
3241 | |||
3242 | /** Clear the 'afters' list of the given program. | ||
3243 | * | ||
3244 | * @param obj Object being edited. | ||
3245 | * @param prog The name of the program to clear the 'afters' list. | ||
3246 | * | ||
3247 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3248 | */ | ||
3249 | EAPI Eina_Bool edje_edit_program_afters_clear(Evas_Object *obj, const char *prog); | ||
3250 | |||
3251 | /** Get the state for the given program | ||
3252 | * | ||
3253 | * In a STATE_SET action this is the name of state to set. | ||
3254 | * In a SIGNAL_EMIT action is the name of the signal to emit. | ||
3255 | * | ||
3256 | * @param obj Object being edited. | ||
3257 | * @param prog The name of the program to get the state. | ||
3258 | * | ||
3259 | * @return The name of the state. | ||
3260 | */ | ||
3261 | EAPI const char * edje_edit_program_state_get(Evas_Object *obj, const char *prog); | ||
3262 | |||
3263 | /** Get api's name of a program. | ||
3264 | * | ||
3265 | * @param obj Object being edited. | ||
3266 | * @param prog Name of program. | ||
3267 | * | ||
3268 | * @return name of the api if successful, NULL otherwise. | ||
3269 | */ | ||
3270 | EAPI const char * edje_edit_program_api_name_get(Evas_Object *obj, const char *prog); | ||
3271 | |||
3272 | /** Get api's description of a program. | ||
3273 | * | ||
3274 | * @param obj Object being edited. | ||
3275 | * @param prog Name of program. | ||
3276 | * | ||
3277 | * @return description of the api if successful, NULL otherwise. | ||
3278 | */ | ||
3279 | EAPI const char * edje_edit_program_api_description_get(Evas_Object *obj, const char *prog); | ||
3280 | |||
3281 | /** Set api's name of a program. | ||
3282 | * | ||
3283 | * @param obj Object being edited. | ||
3284 | * @param prog Name of the part. | ||
3285 | * @param name New name for the api property. | ||
3286 | * | ||
3287 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3288 | */ | ||
3289 | EAPI Eina_Bool edje_edit_program_api_name_set(Evas_Object *obj, const char *prog, const char *name); | ||
3290 | |||
3291 | /** Set api's description of a program. | ||
3292 | * | ||
3293 | * @param obj Object being edited. | ||
3294 | * @param prog Name of the program. | ||
3295 | * @param description New description for the api property. | ||
3296 | * | ||
3297 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3298 | */ | ||
3299 | EAPI Eina_Bool edje_edit_program_api_description_set(Evas_Object *obj, const char *prog, const char *description); | ||
3300 | |||
3301 | /** Set the state for the given program | ||
3302 | * | ||
3303 | * In a STATE_SET action this is the name of state to set. | ||
3304 | * In a SIGNAL_EMIT action is the name of the signal to emit. | ||
3305 | * | ||
3306 | * @param obj Object being edited. | ||
3307 | * @param prog The name of the program to set a state. | ||
3308 | * @param state The nameo of the state to set (not including the state value) | ||
3309 | * | ||
3310 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3311 | */ | ||
3312 | EAPI Eina_Bool edje_edit_program_state_set(Evas_Object *obj, const char *prog, const char *state); | ||
3313 | |||
3314 | /** Get the value of state for the given program. | ||
3315 | * | ||
3316 | * In a STATE_SET action this is the value of state to set. | ||
3317 | * Not used on SIGNAL_EMIT action. | ||
3318 | * | ||
3319 | * @param obj Object being edited. | ||
3320 | * @param prog The name of the program to get the value of state. | ||
3321 | * | ||
3322 | * @return The value of state for the program. | ||
3323 | */ | ||
3324 | EAPI double edje_edit_program_value_get(Evas_Object *obj, const char *prog); | ||
3325 | |||
3326 | /** Set the value of state for the given program. | ||
3327 | * | ||
3328 | * In a STATE_SET action this is the value of state to set. | ||
3329 | * Not used on SIGNAL_EMIT action. | ||
3330 | * | ||
3331 | * @param obj Object being edited. | ||
3332 | * @param prog The name of the program to set the value of state. | ||
3333 | * @param value The vale to set. | ||
3334 | * | ||
3335 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3336 | */ | ||
3337 | EAPI Eina_Bool edje_edit_program_value_set(Evas_Object *obj, const char *prog, double value); | ||
3338 | |||
3339 | /** Get the state2 for the given program | ||
3340 | * | ||
3341 | * In a STATE_SET action is not used | ||
3342 | * In a SIGNAL_EMIT action is the source of the emitted signal. | ||
3343 | * | ||
3344 | * @param obj Object being edited. | ||
3345 | * @param prog The name of the program to get the state2. | ||
3346 | * | ||
3347 | * @return The source to emit for the program. | ||
3348 | */ | ||
3349 | EAPI const char * edje_edit_program_state2_get(Evas_Object *obj, const char *prog); | ||
3350 | |||
3351 | /** Set the state2 for the given program | ||
3352 | * | ||
3353 | * In a STATE_SET action is not used | ||
3354 | * In a SIGNAL_EMIT action is the source of the emitted signal. | ||
3355 | * | ||
3356 | * @param obj Object being edited. | ||
3357 | * @param prog The name of the program to set the state2. | ||
3358 | * @param state2 The name of the state to set. | ||
3359 | * | ||
3360 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3361 | */ | ||
3362 | EAPI Eina_Bool edje_edit_program_state2_set(Evas_Object *obj, const char *prog, const char *state2); | ||
3363 | |||
3364 | /** Get the value of state2 for the given program. | ||
3365 | * | ||
3366 | * @param obj Object being edited. | ||
3367 | * @param prog The name of the program to get the state2 value. | ||
3368 | * | ||
3369 | * @return The vale of the state2 for the program. | ||
3370 | */ | ||
3371 | EAPI double edje_edit_program_value2_get(Evas_Object *obj, const char *prog); | ||
3372 | |||
3373 | /** Set the value2 of state for the given program. | ||
3374 | * | ||
3375 | * This is used in DRAG_ACTION | ||
3376 | * | ||
3377 | * @param obj Object being edited. | ||
3378 | * @param prog The name of the program to set the state2 value. | ||
3379 | * @param value The value of the state2 to set. | ||
3380 | */ | ||
3381 | EAPI Eina_Bool edje_edit_program_value2_set(Evas_Object *obj, const char *prog, double value); | ||
3382 | |||
3383 | /** Get the type of transition to use when apply animations. | ||
3384 | * | ||
3385 | * Can be one of: EDJE_TWEEN_MODE_NONE, EDJE_TWEEN_MODE_LINEAR, EDJE_TWEEN_MODE_SINUSOIDAL, EDJE_TWEEN_MODE_ACCELERATE or EDJE_TWEEN_MODE_DECELERATE. | ||
3386 | * | ||
3387 | * @param obj Object being edited. | ||
3388 | * @param prog The name of the program to get the transition. | ||
3389 | * | ||
3390 | * @return The type of transition used by program. | ||
3391 | */ | ||
3392 | EAPI Edje_Tween_Mode edje_edit_program_transition_get(Evas_Object *obj, const char *prog); | ||
3393 | |||
3394 | /** Set the type of transition to use when apply animations. | ||
3395 | * | ||
3396 | * Can be one of: EDJE_TWEEN_MODE_NONE, EDJE_TWEEN_MODE_LINEAR, EDJE_TWEEN_MODE_SINUSOIDAL, EDJE_TWEEN_MODE_ACCELERATE or EDJE_TWEEN_MODE_DECELERATE. | ||
3397 | * | ||
3398 | * @param obj Object being edited. | ||
3399 | * @param prog The name of the program to set the transition. | ||
3400 | * @param transition The transition type to set | ||
3401 | * | ||
3402 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3403 | */ | ||
3404 | EAPI Eina_Bool edje_edit_program_transition_set(Evas_Object *obj, const char *prog, Edje_Tween_Mode transition); | ||
3405 | |||
3406 | /** Get the duration of the transition in seconds. | ||
3407 | * | ||
3408 | * @param obj Object being edited. | ||
3409 | * @param prog The name of the program to get the transition time. | ||
3410 | * | ||
3411 | * @return The duration of the transition. | ||
3412 | */ | ||
3413 | EAPI double edje_edit_program_transition_time_get(Evas_Object *obj, const char *prog); | ||
3414 | |||
3415 | /** Set the duration of the transition in seconds. | ||
3416 | * | ||
3417 | * @param obj Object being edited. | ||
3418 | * @param prog The name of the program to set the transition time. | ||
3419 | * @param seconds The duration of the transition (in seconds). | ||
3420 | * | ||
3421 | * @return EINA_TRUE if successful, EINA_FALSE otherwise. | ||
3422 | */ | ||
3423 | EAPI Eina_Bool edje_edit_program_transition_time_set(Evas_Object *obj, const char *prog, double seconds); | ||
3424 | |||
3425 | EAPI const char * edje_edit_program_filter_part_get(Evas_Object *obj, const char *prog); | ||
3426 | EAPI Eina_Bool edje_edit_program_filter_part_set(Evas_Object *obj, const char *prog, const char *filter_part); | ||
3427 | |||
3428 | //@} | ||
3429 | /******************************************************************************/ | ||
3430 | /************************** SCRIPTS API ***********************************/ | ||
3431 | /******************************************************************************/ | ||
3432 | /** @name Scripts API | ||
3433 | * Functions to deal with embryo scripts (see @ref edcref). | ||
3434 | */ //@{ | ||
3435 | |||
3436 | /** | ||
3437 | * Get the Embryo script for the group of the given object. | ||
3438 | * | ||
3439 | * Get the shared script for the group under edition. Shared script means | ||
3440 | * the script {} block for the group, not counting what's in each program. | ||
3441 | * It returns a malloc'd duplicate of the code, so users are free to modify | ||
3442 | * the contents directly and they should remember to free() it when done. | ||
3443 | * NULL will be returned if there's no script or an error occurred. | ||
3444 | * | ||
3445 | * @param obj Object being edited. | ||
3446 | * | ||
3447 | * @return The shared script code for this group. | ||
3448 | */ | ||
3449 | EAPI char *edje_edit_script_get(Evas_Object *obj); | ||
3450 | |||
3451 | /** | ||
3452 | * Set the code for the group script. | ||
3453 | * | ||
3454 | * Set the Embryo source code for the shared script of the edited group. | ||
3455 | * Note that changing the code itself will not update the running VM, you | ||
3456 | * need to call edje_edit_script_compile for it to get updated. | ||
3457 | * | ||
3458 | * @param obj The object being edited | ||
3459 | * @param code The Embryo source | ||
3460 | */ | ||
3461 | EAPI void edje_edit_script_set(Evas_Object *obj, const char *code); | ||
3462 | |||
3463 | /** | ||
3464 | * Get the Embryo script for the given program. | ||
3465 | * | ||
3466 | * Get the script code for the given program. Like the group script, this | ||
3467 | * function returns a duplicate of the code that the user can modify at will | ||
3468 | * and must free when done using it. | ||
3469 | * NULL will be returned if the program doesn't exist, doesn't have any | ||
3470 | * script or is not of type script. | ||
3471 | * | ||
3472 | * @param obj Object being edited | ||
3473 | * @param prog Program name | ||
3474 | * | ||
3475 | * @return The program script code | ||
3476 | */ | ||
3477 | EAPI char *edje_edit_script_program_get(Evas_Object *obj, const char *prog); | ||
3478 | |||
3479 | /** | ||
3480 | * Set the Embryo script for the given program. | ||
3481 | * | ||
3482 | * Set the Embryo source code for the program @p prog. It must be an | ||
3483 | * existing program of type EDJE_ACTION_TYPE_SCRIPT, or the function | ||
3484 | * will fail and do nothing. | ||
3485 | * Note that changing the code itself will not update the running VM, you | ||
3486 | * need to call edje_edit_script_compile for it to get updated. | ||
3487 | * | ||
3488 | * @param obj The object being edited | ||
3489 | * @param prog The program name. | ||
3490 | * @param code The Embryo source | ||
3491 | */ | ||
3492 | EAPI void edje_edit_script_program_set(Evas_Object *obj, const char *prog, const char *code); | ||
3493 | |||
3494 | /** | ||
3495 | * Compile the Embryo script for the given object | ||
3496 | * | ||
3497 | * If required, this function will process all script code for the group and | ||
3498 | * build the bytecode, updating the running Embryo VM Program if the build | ||
3499 | * is succesful. | ||
3500 | * | ||
3501 | * @param obj The object being edited | ||
3502 | * | ||
3503 | */ | ||
3504 | EAPI Eina_Bool edje_edit_script_compile(Evas_Object *obj); | ||
3505 | |||
3506 | /** | ||
3507 | * Get the list of errors resulting from the last script build | ||
3508 | * | ||
3509 | * Get the list of errors that resulted from the last attempt to rebuild | ||
3510 | * the Embryo script for the edited group. This will be a standard Eina_List | ||
3511 | * with Edje_Edit_Script_Error pointers as its data. | ||
3512 | * The user should not do anything else but read the contents of this list. | ||
3513 | * These errors can be the output of the embryo compiler, or internal errors | ||
3514 | * generated by Edje_Edit if the preprocessing of the scripts failed. | ||
3515 | * | ||
3516 | * @param obj The object being edited | ||
3517 | * | ||
3518 | * @return A constant list of Edje_Edit_Script_Error, or NULL if there are none | ||
3519 | */ | ||
3520 | EAPI const Eina_List *edje_edit_script_error_list_get(Evas_Object *obj); | ||
3521 | |||
3522 | //@} | ||
3523 | /******************************************************************************/ | ||
3524 | /************************** ERROR API ***********************************/ | ||
3525 | /******************************************************************************/ | ||
3526 | /** @name Error API | ||
3527 | * to deal with error messages (see @ref edcref). | ||
3528 | */ //@{ | ||
3529 | |||
3530 | EAPI extern Eina_Error EDJE_EDIT_ERROR_GROUP_CURRENTLY_USED; | ||
3531 | EAPI extern Eina_Error EDJE_EDIT_ERROR_GROUP_REFERENCED; | ||
3532 | EAPI extern Eina_Error EDJE_EDIT_ERROR_GROUP_DOES_NOT_EXIST; | ||
3533 | |||
3534 | |||
3535 | #ifdef __cplusplus | ||
3536 | } | ||
3537 | #endif | ||
3538 | |||
3539 | #endif | ||