diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/edje/src | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/edje/src')
41 files changed, 1450 insertions, 920 deletions
diff --git a/libraries/edje/src/Makefile.in b/libraries/edje/src/Makefile.in index 532d75b..fc05386 100644 --- a/libraries/edje/src/Makefile.in +++ b/libraries/edje/src/Makefile.in | |||
@@ -193,8 +193,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
193 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 193 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
194 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 194 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
195 | PKG_CONFIG = @PKG_CONFIG@ | 195 | PKG_CONFIG = @PKG_CONFIG@ |
196 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
197 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
198 | PYTHON = @PYTHON@ | 196 | PYTHON = @PYTHON@ |
199 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | 197 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ |
200 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | 198 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ |
diff --git a/libraries/edje/src/bin/Makefile.in b/libraries/edje/src/bin/Makefile.in index 877bcb2..07bf025 100644 --- a/libraries/edje/src/bin/Makefile.in +++ b/libraries/edje/src/bin/Makefile.in | |||
@@ -291,8 +291,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
291 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 291 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
292 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 292 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
293 | PKG_CONFIG = @PKG_CONFIG@ | 293 | PKG_CONFIG = @PKG_CONFIG@ |
294 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
295 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
296 | PYTHON = @PYTHON@ | 294 | PYTHON = @PYTHON@ |
297 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | 295 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ |
298 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | 296 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ |
diff --git a/libraries/edje/src/bin/edje_cc.h b/libraries/edje/src/bin/edje_cc.h index bcd31a1..d0c6d22 100644 --- a/libraries/edje/src/bin/edje_cc.h +++ b/libraries/edje/src/bin/edje_cc.h | |||
@@ -138,6 +138,7 @@ struct _Edje_Part_Parser | |||
138 | /* global fn calls */ | 138 | /* global fn calls */ |
139 | void data_setup(void); | 139 | void data_setup(void); |
140 | void data_write(void); | 140 | void data_write(void); |
141 | void data_queue_group_lookup(const char *name, Edje_Part *part); | ||
141 | void data_queue_part_lookup(Edje_Part_Collection *pc, const char *name, int *dest); | 142 | void data_queue_part_lookup(Edje_Part_Collection *pc, const char *name, int *dest); |
142 | void data_queue_copied_part_lookup(Edje_Part_Collection *pc, int *src, int *dest); | 143 | void data_queue_copied_part_lookup(Edje_Part_Collection *pc, int *src, int *dest); |
143 | void data_queue_program_lookup(Edje_Part_Collection *pc, const char *name, int *dest); | 144 | void data_queue_program_lookup(Edje_Part_Collection *pc, const char *name, int *dest); |
diff --git a/libraries/edje/src/bin/edje_cc_handlers.c b/libraries/edje/src/bin/edje_cc_handlers.c index 8bfc262..f74fa12 100644 --- a/libraries/edje/src/bin/edje_cc_handlers.c +++ b/libraries/edje/src/bin/edje_cc_handlers.c | |||
@@ -172,6 +172,7 @@ static void st_collections_group_parts_part_description_visible(void); | |||
172 | static void st_collections_group_parts_part_description_align(void); | 172 | static void st_collections_group_parts_part_description_align(void); |
173 | static void st_collections_group_parts_part_description_fixed(void); | 173 | static void st_collections_group_parts_part_description_fixed(void); |
174 | static void st_collections_group_parts_part_description_min(void); | 174 | static void st_collections_group_parts_part_description_min(void); |
175 | static void st_collections_group_parts_part_description_minmul(void); | ||
175 | static void st_collections_group_parts_part_description_max(void); | 176 | static void st_collections_group_parts_part_description_max(void); |
176 | static void st_collections_group_parts_part_description_step(void); | 177 | static void st_collections_group_parts_part_description_step(void); |
177 | static void st_collections_group_parts_part_description_aspect(void); | 178 | static void st_collections_group_parts_part_description_aspect(void); |
@@ -261,12 +262,9 @@ static void st_collections_group_programs_program_after(void); | |||
261 | static void st_collections_group_programs_program_api(void); | 262 | static void st_collections_group_programs_program_api(void); |
262 | 263 | ||
263 | static void ob_collections_group_programs_program_script(void); | 264 | static void ob_collections_group_programs_program_script(void); |
264 | |||
265 | #ifdef ENABLE_MULTISENSE | ||
266 | static void st_collections_group_sound_sample_name(void); | 265 | static void st_collections_group_sound_sample_name(void); |
267 | static void st_collections_group_sound_sample_source(void); | 266 | static void st_collections_group_sound_sample_source(void); |
268 | static void st_collections_group_sound_tone(void); | 267 | static void st_collections_group_sound_tone(void); |
269 | #endif | ||
270 | 268 | ||
271 | /*****/ | 269 | /*****/ |
272 | 270 | ||
@@ -305,14 +303,13 @@ New_Statement_Handler statement_handlers[] = | |||
305 | {"collections.color_classes.color_class.color", st_color_class_color}, /* dup */ | 303 | {"collections.color_classes.color_class.color", st_color_class_color}, /* dup */ |
306 | {"collections.color_classes.color_class.color2", st_color_class_color2}, /* dup */ | 304 | {"collections.color_classes.color_class.color2", st_color_class_color2}, /* dup */ |
307 | {"collections.color_classes.color_class.color3", st_color_class_color3}, /* dup */ | 305 | {"collections.color_classes.color_class.color3", st_color_class_color3}, /* dup */ |
308 | #ifdef ENABLE_MULTISENSE | 306 | |
309 | {"collections.sounds.sample.name", st_collections_group_sound_sample_name}, | 307 | {"collections.sounds.sample.name", st_collections_group_sound_sample_name}, |
310 | {"collections.sounds.sample.source", st_collections_group_sound_sample_source}, | 308 | {"collections.sounds.sample.source", st_collections_group_sound_sample_source}, |
311 | {"collections.group.sounds.sample.name", st_collections_group_sound_sample_name}, /* dup */ | 309 | {"collections.group.sounds.sample.name", st_collections_group_sound_sample_name}, /* dup */ |
312 | {"collections.group.sounds.sample.source", st_collections_group_sound_sample_source}, /* dup */ | 310 | {"collections.group.sounds.sample.source", st_collections_group_sound_sample_source}, /* dup */ |
313 | {"collections.sounds.tone", st_collections_group_sound_tone}, | 311 | {"collections.sounds.tone", st_collections_group_sound_tone}, |
314 | {"collections.group.sounds.tone", st_collections_group_sound_tone}, /* dup */ | 312 | {"collections.group.sounds.tone", st_collections_group_sound_tone}, /* dup */ |
315 | #endif | ||
316 | {"collections.group.name", st_collections_group_name}, | 313 | {"collections.group.name", st_collections_group_name}, |
317 | {"collections.group.inherit", st_collections_group_inherit}, | 314 | {"collections.group.inherit", st_collections_group_inherit}, |
318 | {"collections.group.script_only", st_collections_group_script_only}, | 315 | {"collections.group.script_only", st_collections_group_script_only}, |
@@ -438,6 +435,7 @@ New_Statement_Handler statement_handlers[] = | |||
438 | {"collections.group.parts.part.description.align", st_collections_group_parts_part_description_align}, | 435 | {"collections.group.parts.part.description.align", st_collections_group_parts_part_description_align}, |
439 | {"collections.group.parts.part.description.fixed", st_collections_group_parts_part_description_fixed}, | 436 | {"collections.group.parts.part.description.fixed", st_collections_group_parts_part_description_fixed}, |
440 | {"collections.group.parts.part.description.min", st_collections_group_parts_part_description_min}, | 437 | {"collections.group.parts.part.description.min", st_collections_group_parts_part_description_min}, |
438 | {"collections.group.parts.part.description.minmul", st_collections_group_parts_part_description_minmul}, | ||
441 | {"collections.group.parts.part.description.max", st_collections_group_parts_part_description_max}, | 439 | {"collections.group.parts.part.description.max", st_collections_group_parts_part_description_max}, |
442 | {"collections.group.parts.part.description.step", st_collections_group_parts_part_description_step}, | 440 | {"collections.group.parts.part.description.step", st_collections_group_parts_part_description_step}, |
443 | {"collections.group.parts.part.description.aspect", st_collections_group_parts_part_description_aspect}, | 441 | {"collections.group.parts.part.description.aspect", st_collections_group_parts_part_description_aspect}, |
@@ -677,14 +675,13 @@ New_Object_Handler object_handlers[] = | |||
677 | {"collections.styles.style", ob_styles_style}, /* dup */ | 675 | {"collections.styles.style", ob_styles_style}, /* dup */ |
678 | {"collections.color_classes", NULL}, /* dup */ | 676 | {"collections.color_classes", NULL}, /* dup */ |
679 | {"collections.color_classes.color_class", ob_color_class}, /* dup */ | 677 | {"collections.color_classes.color_class", ob_color_class}, /* dup */ |
680 | #ifdef ENABLE_MULTISENSE | ||
681 | {"collections.sounds", NULL}, | 678 | {"collections.sounds", NULL}, |
682 | {"collections.group.sounds", NULL}, /* dup */ | 679 | {"collections.group.sounds", NULL}, /* dup */ |
683 | {"collections.sounds.sample", NULL}, | 680 | {"collections.sounds.sample", NULL}, |
684 | {"collections.group.sounds.sample", NULL}, /* dup */ | 681 | {"collections.group.sounds.sample", NULL}, /* dup */ |
685 | #endif | ||
686 | {"collections.group", ob_collections_group}, | 682 | {"collections.group", ob_collections_group}, |
687 | {"collections.group.data", NULL}, | 683 | {"collections.group.data", NULL}, |
684 | {"collections.group.limits", NULL}, | ||
688 | {"collections.group.script", ob_collections_group_script}, | 685 | {"collections.group.script", ob_collections_group_script}, |
689 | {"collections.group.lua_script", ob_collections_group_lua_script}, | 686 | {"collections.group.lua_script", ob_collections_group_lua_script}, |
690 | {"collections.group.externals", NULL}, /* dup */ | 687 | {"collections.group.externals", NULL}, /* dup */ |
@@ -1836,12 +1833,6 @@ st_styles_style_tag(void) | |||
1836 | stl->tags = eina_list_append(stl->tags, tag); | 1833 | stl->tags = eina_list_append(stl->tags, tag); |
1837 | } | 1834 | } |
1838 | 1835 | ||
1839 | #ifdef ENABLE_MULTISENSE | ||
1840 | /* add to below doc | ||
1841 | sounds { } | ||
1842 | */ | ||
1843 | #endif | ||
1844 | |||
1845 | /** | 1836 | /** |
1846 | @page edcref | 1837 | @page edcref |
1847 | @block | 1838 | @block |
@@ -1851,6 +1842,7 @@ sounds { } | |||
1851 | .. | 1842 | .. |
1852 | group { } | 1843 | group { } |
1853 | group { } | 1844 | group { } |
1845 | sounds { } | ||
1854 | .. | 1846 | .. |
1855 | } | 1847 | } |
1856 | @description | 1848 | @description |
@@ -1866,8 +1858,7 @@ ob_collections(void) | |||
1866 | edje_file->collection = eina_hash_string_small_new(NULL); | 1858 | edje_file->collection = eina_hash_string_small_new(NULL); |
1867 | } | 1859 | } |
1868 | 1860 | ||
1869 | #ifdef ENABLE_MULTISENSE | 1861 | /** |
1870 | /* * delete space before * | ||
1871 | @page edcref | 1862 | @page edcref |
1872 | @block | 1863 | @block |
1873 | sounds | 1864 | sounds |
@@ -1980,7 +1971,7 @@ st_collections_group_sound_sample_name(void) | |||
1980 | 1971 | ||
1981 | } | 1972 | } |
1982 | 1973 | ||
1983 | /* * delete space before * | 1974 | /** |
1984 | @page edcref | 1975 | @page edcref |
1985 | @property | 1976 | @property |
1986 | source | 1977 | source |
@@ -2016,7 +2007,7 @@ st_collections_group_sound_sample_source(void) | |||
2016 | check_arg_count(1); | 2007 | check_arg_count(1); |
2017 | } | 2008 | } |
2018 | 2009 | ||
2019 | /* * delete space before * | 2010 | /** |
2020 | @page edcref | 2011 | @page edcref |
2021 | @property | 2012 | @property |
2022 | tone | 2013 | tone |
@@ -2079,7 +2070,6 @@ st_collections_group_sound_tone(void) | |||
2079 | tone->value = value; | 2070 | tone->value = value; |
2080 | tone->id = edje_file->sound_dir->tones_count - 1; | 2071 | tone->id = edje_file->sound_dir->tones_count - 1; |
2081 | } | 2072 | } |
2082 | #endif | ||
2083 | 2073 | ||
2084 | /** | 2074 | /** |
2085 | @edcsection{group,Group sub blocks} | 2075 | @edcsection{group,Group sub blocks} |
@@ -2677,14 +2667,14 @@ st_collections_group_orientation(void) | |||
2677 | @block | 2667 | @block |
2678 | limits | 2668 | limits |
2679 | @context | 2669 | @context |
2680 | group { | 2670 | group { |
2681 | limits { | 2671 | limits { |
2682 | vertical: "limit_name" height_barrier; | 2672 | vertical: "limit_name" height_barrier; |
2683 | horizontal: "limit_name" width_barrier; | 2673 | horizontal: "limit_name" width_barrier; |
2684 | .. | 2674 | .. |
2685 | } | 2675 | } |
2686 | .. | 2676 | .. |
2687 | } | 2677 | } |
2688 | .. | 2678 | .. |
2689 | @description | 2679 | @description |
2690 | This block is used to trigger some signal when the Edje object is resized. | 2680 | This block is used to trigger some signal when the Edje object is resized. |
@@ -2696,10 +2686,10 @@ st_collections_group_orientation(void) | |||
2696 | @parameters | 2686 | @parameters |
2697 | [name] [height barrier] | 2687 | [name] [height barrier] |
2698 | @effect | 2688 | @effect |
2699 | It will send a signal: "limit,name,over" when the object is resized and pass | 2689 | It will send a signal: "limit,name,over" when the object is resized and pass |
2700 | the limit by growing over it. And it will send: "limit,name,below" when | 2690 | the limit by growing over it. And it will send: "limit,name,below" when |
2701 | it pass below that limit. | 2691 | it pass below that limit. |
2702 | This limit will be applied on the y absis. | 2692 | This limit will be applied on the y absis and is expressed in pixels. |
2703 | @endproperty | 2693 | @endproperty |
2704 | */ | 2694 | */ |
2705 | static void | 2695 | static void |
@@ -2734,10 +2724,10 @@ st_collections_group_limits_vertical(void) | |||
2734 | @parameters | 2724 | @parameters |
2735 | [name] [width barrier] | 2725 | [name] [width barrier] |
2736 | @effect | 2726 | @effect |
2737 | It will send a signal: "limit,name,over" when the object is resized and pass | 2727 | It will send a signal: "limit,name,over" when the object is resized and pass |
2738 | the limit by growing over it. And it will send: "limit,name,below" when | 2728 | the limit by growing over it. And it will send: "limit,name,below" when |
2739 | it pass below that limit. | 2729 | it pass below that limit. |
2740 | This limit will be applied on the x absis. | 2730 | This limit will be applied on the x absis and is expressed in pixels. |
2741 | @endproperty | 2731 | @endproperty |
2742 | */ | 2732 | */ |
2743 | static void | 2733 | static void |
@@ -3224,6 +3214,7 @@ st_collections_group_parts_part_source(void) | |||
3224 | 3214 | ||
3225 | //FIXME: validate this somehow (need to decide on the format also) | 3215 | //FIXME: validate this somehow (need to decide on the format also) |
3226 | current_part->source = parse_str(0); | 3216 | current_part->source = parse_str(0); |
3217 | data_queue_group_lookup(current_part->source, current_part); | ||
3227 | } | 3218 | } |
3228 | 3219 | ||
3229 | /** | 3220 | /** |
@@ -3245,6 +3236,7 @@ st_collections_group_parts_part_source2(void) | |||
3245 | 3236 | ||
3246 | //FIXME: validate this somehow (need to decide on the format also) | 3237 | //FIXME: validate this somehow (need to decide on the format also) |
3247 | current_part->source2 = parse_str(0); | 3238 | current_part->source2 = parse_str(0); |
3239 | data_queue_group_lookup(current_part->source2, current_part); | ||
3248 | } | 3240 | } |
3249 | 3241 | ||
3250 | /** | 3242 | /** |
@@ -3266,6 +3258,7 @@ st_collections_group_parts_part_source3(void) | |||
3266 | 3258 | ||
3267 | //FIXME: validate this somehow (need to decide on the format also) | 3259 | //FIXME: validate this somehow (need to decide on the format also) |
3268 | current_part->source3 = parse_str(0); | 3260 | current_part->source3 = parse_str(0); |
3261 | data_queue_group_lookup(current_part->source3, current_part); | ||
3269 | } | 3262 | } |
3270 | 3263 | ||
3271 | /** | 3264 | /** |
@@ -3287,6 +3280,7 @@ st_collections_group_parts_part_source4(void) | |||
3287 | 3280 | ||
3288 | //FIXME: validate this somehow (need to decide on the format also) | 3281 | //FIXME: validate this somehow (need to decide on the format also) |
3289 | current_part->source4 = parse_str(0); | 3282 | current_part->source4 = parse_str(0); |
3283 | data_queue_group_lookup(current_part->source4, current_part); | ||
3290 | } | 3284 | } |
3291 | 3285 | ||
3292 | /** | 3286 | /** |
@@ -3308,6 +3302,7 @@ st_collections_group_parts_part_source5(void) | |||
3308 | 3302 | ||
3309 | //FIXME: validate this somehow (need to decide on the format also) | 3303 | //FIXME: validate this somehow (need to decide on the format also) |
3310 | current_part->source5 = parse_str(0); | 3304 | current_part->source5 = parse_str(0); |
3305 | data_queue_group_lookup(current_part->source5, current_part); | ||
3311 | } | 3306 | } |
3312 | 3307 | ||
3313 | /** | 3308 | /** |
@@ -3329,6 +3324,7 @@ st_collections_group_parts_part_source6(void) | |||
3329 | 3324 | ||
3330 | //FIXME: validate this somehow (need to decide on the format also) | 3325 | //FIXME: validate this somehow (need to decide on the format also) |
3331 | current_part->source6 = parse_str(0); | 3326 | current_part->source6 = parse_str(0); |
3327 | data_queue_group_lookup(current_part->source6, current_part); | ||
3332 | } | 3328 | } |
3333 | 3329 | ||
3334 | /** | 3330 | /** |
@@ -3439,10 +3435,9 @@ st_collections_group_parts_part_entry_mode(void) | |||
3439 | [MODE] | 3435 | [MODE] |
3440 | @effect | 3436 | @effect |
3441 | Sets the selection mode for a textblock part to one of: | 3437 | Sets the selection mode for a textblock part to one of: |
3442 | @li DEFAULT | 3438 | @li DEFAULT selection mode is what you would expect on any desktop. Press |
3443 | @li EXPLICIT | 3439 | mouse, drag and release to end. |
3444 | DEFAULT selection mode is what you would expect on any desktop. Press | 3440 | @li EXPLICITmode requires the application |
3445 | mouse, drag and release to end. EXPLICIT mode requires the application | ||
3446 | controlling the edje object has to explicitly begin and end selection | 3441 | controlling the edje object has to explicitly begin and end selection |
3447 | modes, and the selection itself is dragable at both ends. | 3442 | modes, and the selection itself is dragable at both ends. |
3448 | @endproperty | 3443 | @endproperty |
@@ -3466,11 +3461,9 @@ st_collections_group_parts_part_select_mode(void) | |||
3466 | [MODE] | 3461 | [MODE] |
3467 | @effect | 3462 | @effect |
3468 | Sets the cursor mode for a textblock part to one of: | 3463 | Sets the cursor mode for a textblock part to one of: |
3469 | @li UNDER | 3464 | @li UNDER cursor mode means the cursor will draw below the character pointed |
3470 | @li BEFORE | ||
3471 | UNDER cursor mode means the cursor will draw below the character pointed | ||
3472 | at. That's the default. | 3465 | at. That's the default. |
3473 | BEFORE cursor mode means the cursor is drawn as a vertical line before | 3466 | @li BEFORE cursor mode means the cursor is drawn as a vertical line before |
3474 | the current character, just like many other GUI toolkits handle it. | 3467 | the current character, just like many other GUI toolkits handle it. |
3475 | @endproperty | 3468 | @endproperty |
3476 | */ | 3469 | */ |
@@ -3816,6 +3809,7 @@ static void st_collections_group_parts_part_box_items_item_source(void) | |||
3816 | check_arg_count(1); | 3809 | check_arg_count(1); |
3817 | 3810 | ||
3818 | current_item->source = parse_str(0); | 3811 | current_item->source = parse_str(0); |
3812 | data_queue_group_lookup(current_item->source, current_part); | ||
3819 | } | 3813 | } |
3820 | 3814 | ||
3821 | /** | 3815 | /** |
@@ -4140,6 +4134,9 @@ ob_collections_group_parts_part_description(void) | |||
4140 | ed->map.persp_on = 0; | 4134 | ed->map.persp_on = 0; |
4141 | ed->persp.zplane = 0; | 4135 | ed->persp.zplane = 0; |
4142 | ed->persp.focal = 1000; | 4136 | ed->persp.focal = 1000; |
4137 | ed->minmul.have = 1; | ||
4138 | ed->minmul.w = FROM_INT(1); | ||
4139 | ed->minmul.h = FROM_INT(1); | ||
4143 | } | 4140 | } |
4144 | 4141 | ||
4145 | /** | 4142 | /** |
@@ -4558,6 +4555,27 @@ st_collections_group_parts_part_description_min(void) | |||
4558 | /** | 4555 | /** |
4559 | @page edcref | 4556 | @page edcref |
4560 | @property | 4557 | @property |
4558 | minmul | ||
4559 | @parameters | ||
4560 | [width multipler] [height multiplier] | ||
4561 | @effect | ||
4562 | A multiplier FORCIBLY applied to whatever minimum size is only during | ||
4563 | minimum size calculation. | ||
4564 | @endproperty | ||
4565 | @since 1.2 | ||
4566 | */ | ||
4567 | static void | ||
4568 | st_collections_group_parts_part_description_minmul(void) | ||
4569 | { | ||
4570 | check_arg_count(2); | ||
4571 | |||
4572 | current_desc->minmul.w = FROM_DOUBLE(parse_float_range(0, 0, 999999)); | ||
4573 | current_desc->minmul.h = FROM_DOUBLE(parse_float_range(1, 0, 999999)); | ||
4574 | } | ||
4575 | |||
4576 | /** | ||
4577 | @page edcref | ||
4578 | @property | ||
4561 | max | 4579 | max |
4562 | @parameters | 4580 | @parameters |
4563 | [width] [height] | 4581 | [width] [height] |
@@ -4605,7 +4623,7 @@ st_collections_group_parts_part_description_step(void) | |||
4605 | Normally width and height can be resized to any values independently. | 4623 | Normally width and height can be resized to any values independently. |
4606 | The aspect property forces the width to height ratio to be kept between | 4624 | The aspect property forces the width to height ratio to be kept between |
4607 | the minimum and maximum set. For example, "1.0 1.0" will increase the | 4625 | the minimum and maximum set. For example, "1.0 1.0" will increase the |
4608 | width a pixel for every pixel added to heigh. The default value is | 4626 | width a pixel for every pixel added to height. The default value is |
4609 | "0.0 0.0" disabling aspect. | 4627 | "0.0 0.0" disabling aspect. |
4610 | @endproperty | 4628 | @endproperty |
4611 | */ | 4629 | */ |
@@ -4626,7 +4644,7 @@ st_collections_group_parts_part_description_aspect(void) | |||
4626 | [DIMENSION] | 4644 | [DIMENSION] |
4627 | @effect | 4645 | @effect |
4628 | Sets the scope of the "aspect" property to a given dimension. Available | 4646 | Sets the scope of the "aspect" property to a given dimension. Available |
4629 | options are BOTH, VERTICAL, HORIZONTAL and NONE | 4647 | options are BOTH, VERTICAL, HORIZONTAL, SOURCE and NONE |
4630 | @endproperty | 4648 | @endproperty |
4631 | */ | 4649 | */ |
4632 | static void | 4650 | static void |
@@ -4639,6 +4657,7 @@ st_collections_group_parts_part_description_aspect_preference(void) | |||
4639 | "VERTICAL", EDJE_ASPECT_PREFER_VERTICAL, | 4657 | "VERTICAL", EDJE_ASPECT_PREFER_VERTICAL, |
4640 | "HORIZONTAL", EDJE_ASPECT_PREFER_HORIZONTAL, | 4658 | "HORIZONTAL", EDJE_ASPECT_PREFER_HORIZONTAL, |
4641 | "BOTH", EDJE_ASPECT_PREFER_BOTH, | 4659 | "BOTH", EDJE_ASPECT_PREFER_BOTH, |
4660 | "SOURCE", EDJE_ASPECT_PREFER_SOURCE, | ||
4642 | NULL); | 4661 | NULL); |
4643 | } | 4662 | } |
4644 | 4663 | ||
@@ -7236,15 +7255,6 @@ st_collections_group_programs_program_in(void) | |||
7236 | current_program->in.range = parse_float_range(1, 0.0, 999999999.0); | 7255 | current_program->in.range = parse_float_range(1, 0.0, 999999999.0); |
7237 | } | 7256 | } |
7238 | 7257 | ||
7239 | #ifdef ENABLE_MULTISENSE | ||
7240 | /* add to docs below | ||
7241 | , PLAY_SAMPLE, PLAY_TONE | ||
7242 | |||
7243 | action: PLAY_SAMPLE "sample name";\n | ||
7244 | action: PLAY_TONE "tone name" duration in seconds ( Range 0.1 to 10.0 );\n | ||
7245 | */ | ||
7246 | #endif | ||
7247 | |||
7248 | /** | 7258 | /** |
7249 | @page edcref | 7259 | @page edcref |
7250 | @property | 7260 | @property |
@@ -7254,7 +7264,7 @@ st_collections_group_programs_program_in(void) | |||
7254 | @effect | 7264 | @effect |
7255 | Action to be performed by the program. Valid actions are: STATE_SET, | 7265 | Action to be performed by the program. Valid actions are: STATE_SET, |
7256 | ACTION_STOP, SIGNAL_EMIT, DRAG_VAL_SET, DRAG_VAL_STEP, DRAG_VAL_PAGE, | 7266 | ACTION_STOP, SIGNAL_EMIT, DRAG_VAL_SET, DRAG_VAL_STEP, DRAG_VAL_PAGE, |
7257 | FOCUS_SET, PARAM_COPY, PARAM_SET | 7267 | FOCUS_SET, PARAM_COPY, PARAM_SET, PLAY_SAMPLE, PLAY_TONE |
7258 | Only one action can be specified per program. Examples:\n | 7268 | Only one action can be specified per program. Examples:\n |
7259 | action: STATE_SET "statename" 0.5;\n | 7269 | action: STATE_SET "statename" 0.5;\n |
7260 | action: ACTION_STOP;\n | 7270 | action: ACTION_STOP;\n |
@@ -7266,6 +7276,8 @@ st_collections_group_programs_program_in(void) | |||
7266 | action: FOCUS_OBJECT;\n | 7276 | action: FOCUS_OBJECT;\n |
7267 | action: PARAM_COPY "src_part" "src_param" "dst_part" "dst_param";\n | 7277 | action: PARAM_COPY "src_part" "src_param" "dst_part" "dst_param";\n |
7268 | action: PARAM_SET "part" "param" "value";\n | 7278 | action: PARAM_SET "part" "param" "value";\n |
7279 | action: PLAY_SAMPLE "sample name";\n | ||
7280 | action: PLAY_TONE "tone name" duration in seconds ( Range 0.1 to 10.0 );\n | ||
7269 | @endproperty | 7281 | @endproperty |
7270 | */ | 7282 | */ |
7271 | static void | 7283 | static void |
@@ -7273,6 +7285,7 @@ st_collections_group_programs_program_action(void) | |||
7273 | { | 7285 | { |
7274 | Edje_Part_Collection *pc; | 7286 | Edje_Part_Collection *pc; |
7275 | Edje_Program *ep; | 7287 | Edje_Program *ep; |
7288 | int i; | ||
7276 | 7289 | ||
7277 | pc = eina_list_data_get(eina_list_last(edje_collections)); | 7290 | pc = eina_list_data_get(eina_list_last(edje_collections)); |
7278 | ep = current_program; | 7291 | ep = current_program; |
@@ -7288,10 +7301,8 @@ st_collections_group_programs_program_action(void) | |||
7288 | "FOCUS_OBJECT", EDJE_ACTION_TYPE_FOCUS_OBJECT, | 7301 | "FOCUS_OBJECT", EDJE_ACTION_TYPE_FOCUS_OBJECT, |
7289 | "PARAM_COPY", EDJE_ACTION_TYPE_PARAM_COPY, | 7302 | "PARAM_COPY", EDJE_ACTION_TYPE_PARAM_COPY, |
7290 | "PARAM_SET", EDJE_ACTION_TYPE_PARAM_SET, | 7303 | "PARAM_SET", EDJE_ACTION_TYPE_PARAM_SET, |
7291 | #ifdef ENABLE_MULTISENSE | ||
7292 | "PLAY_SAMPLE", EDJE_ACTION_TYPE_SOUND_SAMPLE, | 7304 | "PLAY_SAMPLE", EDJE_ACTION_TYPE_SOUND_SAMPLE, |
7293 | "PLAY_TONE", EDJE_ACTION_TYPE_SOUND_TONE, | 7305 | "PLAY_TONE", EDJE_ACTION_TYPE_SOUND_TONE, |
7294 | #endif | ||
7295 | NULL); | 7306 | NULL); |
7296 | if (ep->action == EDJE_ACTION_TYPE_STATE_SET) | 7307 | if (ep->action == EDJE_ACTION_TYPE_STATE_SET) |
7297 | { | 7308 | { |
@@ -7303,11 +7314,8 @@ st_collections_group_programs_program_action(void) | |||
7303 | ep->state = parse_str(1); | 7314 | ep->state = parse_str(1); |
7304 | ep->state2 = parse_str(2); | 7315 | ep->state2 = parse_str(2); |
7305 | } | 7316 | } |
7306 | #ifdef ENABLE_MULTISENSE | ||
7307 | else if (ep->action == EDJE_ACTION_TYPE_SOUND_SAMPLE) | 7317 | else if (ep->action == EDJE_ACTION_TYPE_SOUND_SAMPLE) |
7308 | { | 7318 | { |
7309 | int i; | ||
7310 | |||
7311 | ep->sample_name = parse_str(1); | 7319 | ep->sample_name = parse_str(1); |
7312 | for (i = 0; i < (int)edje_file->sound_dir->samples_count; i++) | 7320 | for (i = 0; i < (int)edje_file->sound_dir->samples_count; i++) |
7313 | { | 7321 | { |
@@ -7324,8 +7332,6 @@ st_collections_group_programs_program_action(void) | |||
7324 | } | 7332 | } |
7325 | else if (ep->action == EDJE_ACTION_TYPE_SOUND_TONE) | 7333 | else if (ep->action == EDJE_ACTION_TYPE_SOUND_TONE) |
7326 | { | 7334 | { |
7327 | int i; | ||
7328 | |||
7329 | ep->tone_name = parse_str(1); | 7335 | ep->tone_name = parse_str(1); |
7330 | for (i = 0; i < (int)edje_file->sound_dir->tones_count; i++) | 7336 | for (i = 0; i < (int)edje_file->sound_dir->tones_count; i++) |
7331 | { | 7337 | { |
@@ -7340,7 +7346,6 @@ st_collections_group_programs_program_action(void) | |||
7340 | } | 7346 | } |
7341 | ep->duration = parse_float_range(2, 0.1, 10.0); | 7347 | ep->duration = parse_float_range(2, 0.1, 10.0); |
7342 | } | 7348 | } |
7343 | #endif | ||
7344 | else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_SET) | 7349 | else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_SET) |
7345 | { | 7350 | { |
7346 | ep->value = parse_float(1); | 7351 | ep->value = parse_float(1); |
@@ -7402,14 +7407,12 @@ st_collections_group_programs_program_action(void) | |||
7402 | case EDJE_ACTION_TYPE_PARAM_SET: | 7407 | case EDJE_ACTION_TYPE_PARAM_SET: |
7403 | check_arg_count(4); | 7408 | check_arg_count(4); |
7404 | break; | 7409 | break; |
7405 | #ifdef ENABLE_MULTISENSE | ||
7406 | case EDJE_ACTION_TYPE_SOUND_SAMPLE: | 7410 | case EDJE_ACTION_TYPE_SOUND_SAMPLE: |
7407 | check_arg_count(3); | 7411 | check_arg_count(3); |
7408 | break; | 7412 | break; |
7409 | case EDJE_ACTION_TYPE_SOUND_TONE: | 7413 | case EDJE_ACTION_TYPE_SOUND_TONE: |
7410 | check_arg_count(3); | 7414 | check_arg_count(3); |
7411 | break; | 7415 | break; |
7412 | #endif | ||
7413 | default: | 7416 | default: |
7414 | check_arg_count(3); | 7417 | check_arg_count(3); |
7415 | } | 7418 | } |
diff --git a/libraries/edje/src/bin/edje_cc_out.c b/libraries/edje/src/bin/edje_cc_out.c index 443a702..5050ad4 100644 --- a/libraries/edje/src/bin/edje_cc_out.c +++ b/libraries/edje/src/bin/edje_cc_out.c | |||
@@ -72,6 +72,7 @@ struct _Program_Lookup | |||
72 | struct _Group_Lookup | 72 | struct _Group_Lookup |
73 | { | 73 | { |
74 | char *name; | 74 | char *name; |
75 | Edje_Part *part; | ||
75 | }; | 76 | }; |
76 | 77 | ||
77 | struct _String_Lookup | 78 | struct _String_Lookup |
@@ -808,8 +809,8 @@ data_write_groups(Eet_File *ef, int *collection_num) | |||
808 | 809 | ||
809 | if (verbose) | 810 | if (verbose) |
810 | { | 811 | { |
811 | printf("%s: Wrote %9i bytes (%4iKb) for \"%s\" collection entry\n", | 812 | printf("%s: Wrote %9i bytes (%4iKb) for \"%s\" aka \"%s\" collection entry\n", |
812 | progname, bytes, (bytes + 512) / 1024, buf); | 813 | progname, bytes, (bytes + 512) / 1024, buf, pc->part); |
813 | } | 814 | } |
814 | } | 815 | } |
815 | 816 | ||
@@ -1371,13 +1372,16 @@ reorder_parts(void) | |||
1371 | } | 1372 | } |
1372 | 1373 | ||
1373 | void | 1374 | void |
1374 | data_queue_group_lookup(char *name) | 1375 | data_queue_group_lookup(const char *name, Edje_Part *part) |
1375 | { | 1376 | { |
1376 | Group_Lookup *gl; | 1377 | Group_Lookup *gl; |
1377 | 1378 | ||
1379 | if (!name || !name[0]) return; | ||
1380 | |||
1378 | gl = mem_alloc(SZ(Group_Lookup)); | 1381 | gl = mem_alloc(SZ(Group_Lookup)); |
1379 | group_lookups = eina_list_append(group_lookups, gl); | 1382 | group_lookups = eina_list_append(group_lookups, gl); |
1380 | gl->name = mem_strdup(name); | 1383 | gl->name = mem_strdup(name); |
1384 | gl->part = part; | ||
1381 | } | 1385 | } |
1382 | 1386 | ||
1383 | void | 1387 | void |
@@ -1698,15 +1702,38 @@ data_process_lookups(void) | |||
1698 | { | 1702 | { |
1699 | Edje_Part_Collection_Directory_Entry *de; | 1703 | Edje_Part_Collection_Directory_Entry *de; |
1700 | 1704 | ||
1705 | if (group->part) | ||
1706 | { | ||
1707 | if (group->part->type != EDJE_PART_TYPE_GROUP | ||
1708 | && group->part->type != EDJE_PART_TYPE_TEXTBLOCK | ||
1709 | && group->part->type != EDJE_PART_TYPE_BOX | ||
1710 | && group->part->type != EDJE_PART_TYPE_TABLE) | ||
1711 | goto free_group; | ||
1712 | } | ||
1713 | |||
1701 | de = eina_hash_find(edje_file->collection, group->name); | 1714 | de = eina_hash_find(edje_file->collection, group->name); |
1702 | 1715 | ||
1703 | if (!de) | 1716 | if (!de) |
1717 | { | ||
1718 | Eina_Bool found = EINA_FALSE; | ||
1719 | |||
1720 | EINA_LIST_FOREACH(aliases, l, de) | ||
1721 | if (strcmp(de->entry, group->name) == 0) | ||
1722 | { | ||
1723 | found = EINA_TRUE; | ||
1724 | break; | ||
1725 | } | ||
1726 | if (!found) de = NULL; | ||
1727 | } | ||
1728 | |||
1729 | if (!de) | ||
1704 | { | 1730 | { |
1705 | ERR("%s: Error. Unable to find group name \"%s\".", | 1731 | ERR("%s: Error. Unable to find group name \"%s\".", |
1706 | progname, group->name); | 1732 | progname, group->name); |
1707 | exit(-1); | 1733 | exit(-1); |
1708 | } | 1734 | } |
1709 | 1735 | ||
1736 | free_group: | ||
1710 | free(group->name); | 1737 | free(group->name); |
1711 | free(group); | 1738 | free(group); |
1712 | } | 1739 | } |
@@ -1914,7 +1941,7 @@ _data_queue_program_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int | |||
1914 | static void | 1941 | static void |
1915 | _data_queue_group_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr __UNUSED__, int len __UNUSED__) | 1942 | _data_queue_group_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr __UNUSED__, int len __UNUSED__) |
1916 | { | 1943 | { |
1917 | data_queue_group_lookup(name); | 1944 | data_queue_group_lookup(name, NULL); |
1918 | } | 1945 | } |
1919 | static void | 1946 | static void |
1920 | _data_queue_image_pc_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr, int len) | 1947 | _data_queue_image_pc_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr, int len) |
diff --git a/libraries/edje/src/bin/edje_cc_parse.c b/libraries/edje/src/bin/edje_cc_parse.c index ae68e00..adc08d3 100644 --- a/libraries/edje/src/bin/edje_cc_parse.c +++ b/libraries/edje/src/bin/edje_cc_parse.c | |||
@@ -238,8 +238,6 @@ next_token(char *p, char *end, char **new_p, int *delim) | |||
238 | int in_comment_sa = 0; | 238 | int in_comment_sa = 0; |
239 | int had_quote = 0; | 239 | int had_quote = 0; |
240 | int is_escaped = 0; | 240 | int is_escaped = 0; |
241 | char *cpp_token_line = NULL; | ||
242 | char *cpp_token_file = NULL; | ||
243 | 241 | ||
244 | *delim = 0; | 242 | *delim = 0; |
245 | if (p >= end) return NULL; | 243 | if (p >= end) return NULL; |
@@ -249,8 +247,6 @@ next_token(char *p, char *end, char **new_p, int *delim) | |||
249 | { | 247 | { |
250 | in_comment_ss = 0; | 248 | in_comment_ss = 0; |
251 | in_comment_cpp = 0; | 249 | in_comment_cpp = 0; |
252 | cpp_token_line = NULL; | ||
253 | cpp_token_file = NULL; | ||
254 | line++; | 250 | line++; |
255 | } | 251 | } |
256 | if ((!in_comment_ss) && (!in_comment_sa)) | 252 | if ((!in_comment_ss) && (!in_comment_sa)) |
@@ -275,8 +271,6 @@ next_token(char *p, char *end, char **new_p, int *delim) | |||
275 | /* their line format is | 271 | /* their line format is |
276 | * #line <line no. of next line> <filename from next line on> [??] | 272 | * #line <line no. of next line> <filename from next line on> [??] |
277 | */ | 273 | */ |
278 | cpp_token_line = NULL; | ||
279 | cpp_token_file = NULL; | ||
280 | 274 | ||
281 | pp = p; | 275 | pp = p; |
282 | while ((pp < end) && (*pp != '\n')) | 276 | while ((pp < end) && (*pp != '\n')) |
diff --git a/libraries/edje/src/bin/edje_decc.c b/libraries/edje/src/bin/edje_decc.c index 1b79e13..ac776e9 100644 --- a/libraries/edje/src/bin/edje_decc.c +++ b/libraries/edje/src/bin/edje_decc.c | |||
@@ -69,7 +69,6 @@ main(int argc, char **argv) | |||
69 | eina_shutdown(); | 69 | eina_shutdown(); |
70 | exit(-1); | 70 | exit(-1); |
71 | } | 71 | } |
72 | eina_log_level_set(EINA_LOG_LEVEL_INFO); | ||
73 | progname = argv[0]; | 72 | progname = argv[0]; |
74 | for (i = 1; i < argc; i++) | 73 | for (i = 1; i < argc; i++) |
75 | { | 74 | { |
@@ -104,7 +103,7 @@ main(int argc, char **argv) | |||
104 | if (!decomp()) return -1; | 103 | if (!decomp()) return -1; |
105 | output(); | 104 | output(); |
106 | 105 | ||
107 | printf("WARNING! If any Image or audio data was encoded in a LOSSY way, then\n" | 106 | fprintf(stderr, "WARNING! If any Image or audio data was encoded in a LOSSY way, then\n" |
108 | "re-encoding will drop quality even more. You need access to the original\n" | 107 | "re-encoding will drop quality even more. You need access to the original\n" |
109 | "data to ensure no loss of quality.\n"); | 108 | "data to ensure no loss of quality.\n"); |
110 | eet_close(ef); | 109 | eet_close(ef); |
diff --git a/libraries/edje/src/bin/edje_inspector.c b/libraries/edje/src/bin/edje_inspector.c index ed3baaf..093de86 100644 --- a/libraries/edje/src/bin/edje_inspector.c +++ b/libraries/edje/src/bin/edje_inspector.c | |||
@@ -263,20 +263,20 @@ border_fill_name_get(int id) | |||
263 | } | 263 | } |
264 | 264 | ||
265 | static void | 265 | static void |
266 | state_details(Evas_Object *ed, const char *part, const char *state, double value) | 266 | state_details(Evas_Object *ed, const char *ppart, const char *state, double value) |
267 | { | 267 | { |
268 | Edje_Part_Type t = edje_edit_part_type_get(ed, part); | 268 | Edje_Part_Type t = edje_edit_part_type_get(ed, ppart); |
269 | double dx, dy; | 269 | double dx, dy; |
270 | const char *str, *str2; | 270 | const char *str, *str2; |
271 | int x, y, r, g, b, a; | 271 | int x, y, r, g, b, a; |
272 | 272 | ||
273 | if (detail < 1) return; | 273 | if (detail < 1) return; |
274 | 274 | ||
275 | b = edje_edit_state_visible_get(ed, part, state, value); | 275 | b = edje_edit_state_visible_get(ed, ppart, state, value); |
276 | if (machine) printf("VISIBLE: %d\n", b); | 276 | if (machine) printf("VISIBLE: %d\n", b); |
277 | else if (!b) puts(INDENT4 "visible: 0;"); | 277 | else if (!b) puts(INDENT4 "visible: 0;"); |
278 | 278 | ||
279 | edje_edit_state_color_get(ed, part, state, value, &r, &g, &b, &a); | 279 | edje_edit_state_color_get(ed, ppart, state, value, &r, &g, &b, &a); |
280 | if (machine) | 280 | if (machine) |
281 | printf("COLOR-R: %d\nCOLOR-G: %d\nCOLOR-B: %d\nCOLOR-A: %d\n", r, g, b, a); | 281 | printf("COLOR-R: %d\nCOLOR-G: %d\nCOLOR-B: %d\nCOLOR-A: %d\n", r, g, b, a); |
282 | else if ((r != 255) || (g != 255) || (b != 255) || (a != 255)) | 282 | else if ((r != 255) || (g != 255) || (b != 255) || (a != 255)) |
@@ -284,14 +284,14 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
284 | 284 | ||
285 | if (detail > 1) | 285 | if (detail > 1) |
286 | { | 286 | { |
287 | edje_edit_state_color2_get(ed, part, state, value, &r, &g, &b, &a); | 287 | edje_edit_state_color2_get(ed, ppart, state, value, &r, &g, &b, &a); |
288 | if (machine) | 288 | if (machine) |
289 | printf("COLOR2-R: %d\nCOLOR2-G: %d\nCOLOR2-B: %d\nCOLOR2-A: %d\n", | 289 | printf("COLOR2-R: %d\nCOLOR2-G: %d\nCOLOR2-B: %d\nCOLOR2-A: %d\n", |
290 | r, g, b, a); | 290 | r, g, b, a); |
291 | else if ((r != 255) || (g != 255) || (b != 255) || (a != 255)) | 291 | else if ((r != 255) || (g != 255) || (b != 255) || (a != 255)) |
292 | printf(INDENT4 "color2: %d %d %d %d;\n", r, g, b, a); | 292 | printf(INDENT4 "color2: %d %d %d %d;\n", r, g, b, a); |
293 | 293 | ||
294 | edje_edit_state_color3_get(ed, part, state, value, &r, &g, &b, &a); | 294 | edje_edit_state_color3_get(ed, ppart, state, value, &r, &g, &b, &a); |
295 | if (machine) | 295 | if (machine) |
296 | printf("COLOR3-R: %d\nCOLOR3-G: %d\nCOLOR3-B: %d\nCOLOR3-A: %d\n", | 296 | printf("COLOR3-R: %d\nCOLOR3-G: %d\nCOLOR3-B: %d\nCOLOR3-A: %d\n", |
297 | r, g, b, a); | 297 | r, g, b, a); |
@@ -299,19 +299,19 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
299 | printf(INDENT4 "color3: %d %d %d %d;\n", r, g, b, a); | 299 | printf(INDENT4 "color3: %d %d %d %d;\n", r, g, b, a); |
300 | } | 300 | } |
301 | 301 | ||
302 | dx = edje_edit_state_align_x_get(ed, part, state, value); | 302 | dx = edje_edit_state_align_x_get(ed, ppart, state, value); |
303 | dy = edje_edit_state_align_y_get(ed, part, state, value); | 303 | dy = edje_edit_state_align_y_get(ed, ppart, state, value); |
304 | if (machine) printf("ALIGN-X: %g\nALIGN-Y: %g\n", dx, dy); | 304 | if (machine) printf("ALIGN-X: %g\nALIGN-Y: %g\n", dx, dy); |
305 | else if (FDIFF(dx, 0.5) || FDIFF(dy, 0.5)) | 305 | else if (FDIFF(dx, 0.5) || FDIFF(dy, 0.5)) |
306 | printf(INDENT4 "align: %g %g;\n", dx, dy); | 306 | printf(INDENT4 "align: %g %g;\n", dx, dy); |
307 | 307 | ||
308 | x = edje_edit_state_min_w_get(ed, part, state, value); | 308 | x = edje_edit_state_min_w_get(ed, ppart, state, value); |
309 | y = edje_edit_state_min_h_get(ed, part, state, value); | 309 | y = edje_edit_state_min_h_get(ed, ppart, state, value); |
310 | if (machine) printf("MIN-W: %d\nMIN-H: %d\n", x, y); | 310 | if (machine) printf("MIN-W: %d\nMIN-H: %d\n", x, y); |
311 | else if ((x) || (y)) printf(INDENT4 "min: %d %d;\n", x, y); | 311 | else if ((x) || (y)) printf(INDENT4 "min: %d %d;\n", x, y); |
312 | 312 | ||
313 | x = edje_edit_state_max_w_get(ed, part, state, value); | 313 | x = edje_edit_state_max_w_get(ed, ppart, state, value); |
314 | y = edje_edit_state_max_h_get(ed, part, state, value); | 314 | y = edje_edit_state_max_h_get(ed, ppart, state, value); |
315 | if (machine) printf("MAX-W: %d\nMAX-H: %d\n", x, y); | 315 | if (machine) printf("MAX-W: %d\nMAX-H: %d\n", x, y); |
316 | else if ((x != -1) || (y != -1)) printf(INDENT4 "max: %d %d;\n", x, y); | 316 | else if ((x != -1) || (y != -1)) printf(INDENT4 "max: %d %d;\n", x, y); |
317 | 317 | ||
@@ -320,30 +320,30 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
320 | 320 | ||
321 | if (detail > 1) | 321 | if (detail > 1) |
322 | { | 322 | { |
323 | dx = edje_edit_state_aspect_min_get(ed, part, state, value); | 323 | dx = edje_edit_state_aspect_min_get(ed, ppart, state, value); |
324 | dy = edje_edit_state_aspect_max_get(ed, part, state, value); | 324 | dy = edje_edit_state_aspect_max_get(ed, ppart, state, value); |
325 | if (machine) printf("ASPECT-MIN: %g\nASPECT-MAX: %g\n", dx, dy); | 325 | if (machine) printf("ASPECT-MIN: %g\nASPECT-MAX: %g\n", dx, dy); |
326 | else if (FDIFF(dx, 0.0) || FDIFF(dy, 0.0)) | 326 | else if (FDIFF(dx, 0.0) || FDIFF(dy, 0.0)) |
327 | printf(INDENT4 "aspect: %g %g;\n", dx, dy); | 327 | printf(INDENT4 "aspect: %g %g;\n", dx, dy); |
328 | 328 | ||
329 | x = edje_edit_state_aspect_pref_get(ed, part, state, value); | 329 | x = edje_edit_state_aspect_pref_get(ed, ppart, state, value); |
330 | str = aspect_pref_name_get(x); | 330 | str = aspect_pref_name_get(x); |
331 | if (machine) printf("ASPECT-PREFERENCE: %s\n", str); | 331 | if (machine) printf("ASPECT-PREFERENCE: %s\n", str); |
332 | else if (x) printf(INDENT4 "aspect_preference: %s;\n", str); | 332 | else if (x) printf(INDENT4 "aspect_preference: %s;\n", str); |
333 | /* do not free this str! */ | 333 | /* do not free this str! */ |
334 | 334 | ||
335 | str = edje_edit_state_color_class_get(ed, part, state, value); | 335 | str = edje_edit_state_color_class_get(ed, ppart, state, value); |
336 | if (machine) printf("COLOR_CLASS: %s\n", str ? str : ""); | 336 | if (machine) printf("COLOR_CLASS: %s\n", str ? str : ""); |
337 | else if (str) printf(INDENT4 "color_class: \"%s\";\n", str); | 337 | else if (str) printf(INDENT4 "color_class: \"%s\";\n", str); |
338 | edje_edit_string_free(str); | 338 | edje_edit_string_free(str); |
339 | } | 339 | } |
340 | 340 | ||
341 | dx = edje_edit_state_rel1_relative_x_get(ed, part, state, value); | 341 | dx = edje_edit_state_rel1_relative_x_get(ed, ppart, state, value); |
342 | dy = edje_edit_state_rel1_relative_y_get(ed, part, state, value); | 342 | dy = edje_edit_state_rel1_relative_y_get(ed, ppart, state, value); |
343 | x = edje_edit_state_rel1_offset_x_get(ed, part, state, value); | 343 | x = edje_edit_state_rel1_offset_x_get(ed, ppart, state, value); |
344 | y = edje_edit_state_rel1_offset_y_get(ed, part, state, value); | 344 | y = edje_edit_state_rel1_offset_y_get(ed, ppart, state, value); |
345 | str = edje_edit_state_rel1_to_x_get(ed, part, state, value); | 345 | str = edje_edit_state_rel1_to_x_get(ed, ppart, state, value); |
346 | str2 = edje_edit_state_rel1_to_y_get(ed, part, state, value); | 346 | str2 = edje_edit_state_rel1_to_y_get(ed, ppart, state, value); |
347 | if (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y) || (str) || (str2)) | 347 | if (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y) || (str) || (str2)) |
348 | { | 348 | { |
349 | if (machine) puts("REL1-BEGIN"); | 349 | if (machine) puts("REL1-BEGIN"); |
@@ -372,12 +372,12 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
372 | edje_edit_string_free(str); | 372 | edje_edit_string_free(str); |
373 | edje_edit_string_free(str2); | 373 | edje_edit_string_free(str2); |
374 | 374 | ||
375 | dx = edje_edit_state_rel2_relative_x_get(ed, part, state, value); | 375 | dx = edje_edit_state_rel2_relative_x_get(ed, ppart, state, value); |
376 | dy = edje_edit_state_rel2_relative_y_get(ed, part, state, value); | 376 | dy = edje_edit_state_rel2_relative_y_get(ed, ppart, state, value); |
377 | x = edje_edit_state_rel2_offset_x_get(ed, part, state, value); | 377 | x = edje_edit_state_rel2_offset_x_get(ed, ppart, state, value); |
378 | y = edje_edit_state_rel2_offset_y_get(ed, part, state, value); | 378 | y = edje_edit_state_rel2_offset_y_get(ed, ppart, state, value); |
379 | str = edje_edit_state_rel2_to_x_get(ed, part, state, value); | 379 | str = edje_edit_state_rel2_to_x_get(ed, ppart, state, value); |
380 | str2 = edje_edit_state_rel2_to_y_get(ed, part, state, value); | 380 | str2 = edje_edit_state_rel2_to_y_get(ed, ppart, state, value); |
381 | if (FDIFF(dx, 1.0) || FDIFF(dy, 1.0) || (x != -1) || (y != -1) || | 381 | if (FDIFF(dx, 1.0) || FDIFF(dy, 1.0) || (x != -1) || (y != -1) || |
382 | (str) || (str2)) | 382 | (str) || (str2)) |
383 | { | 383 | { |
@@ -410,7 +410,7 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
410 | 410 | ||
411 | if (t == EDJE_PART_TYPE_IMAGE) | 411 | if (t == EDJE_PART_TYPE_IMAGE) |
412 | { | 412 | { |
413 | str = edje_edit_state_image_get(ed, part, state, value); | 413 | str = edje_edit_state_image_get(ed, ppart, state, value); |
414 | 414 | ||
415 | if (machine) printf("IMAGE-BEGIN\nNORMAL: %s\n", str ? str : ""); | 415 | if (machine) printf("IMAGE-BEGIN\nNORMAL: %s\n", str ? str : ""); |
416 | else if (detail > 1) | 416 | else if (detail > 1) |
@@ -429,7 +429,7 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
429 | double dx2, dy2; | 429 | double dx2, dy2; |
430 | Eina_Bool has_orgin, has_size; | 430 | Eina_Bool has_orgin, has_size; |
431 | 431 | ||
432 | tweens = edje_edit_state_tweens_list_get(ed, part, state, value); | 432 | tweens = edje_edit_state_tweens_list_get(ed, ppart, state, value); |
433 | EINA_LIST_FOREACH(tweens, l, str) | 433 | EINA_LIST_FOREACH(tweens, l, str) |
434 | { | 434 | { |
435 | if (machine) printf("TWEEN: %s\n", str); | 435 | if (machine) printf("TWEEN: %s\n", str); |
@@ -438,14 +438,14 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
438 | edje_edit_string_list_free(tweens); | 438 | edje_edit_string_list_free(tweens); |
439 | 439 | ||
440 | edje_edit_state_image_border_get | 440 | edje_edit_state_image_border_get |
441 | (ed, part, state, value, &bl, &br, &bt, &bb); | 441 | (ed, ppart, state, value, &bl, &br, &bt, &bb); |
442 | if (machine) | 442 | if (machine) |
443 | printf("BORDER-LEFT: %d\nBORDER-RIGHT: %d\n" | 443 | printf("BORDER-LEFT: %d\nBORDER-RIGHT: %d\n" |
444 | "BORDER-TOP: %d\nBORDER-BOTTOM: %d\n", bl, br, bt, bb); | 444 | "BORDER-TOP: %d\nBORDER-BOTTOM: %d\n", bl, br, bt, bb); |
445 | else if ((bl) || (br) || (bt) || (bb)) | 445 | else if ((bl) || (br) || (bt) || (bb)) |
446 | printf(INDENT5 "border: %d %d %d %d;\n", bl, br, bt, bb); | 446 | printf(INDENT5 "border: %d %d %d %d;\n", bl, br, bt, bb); |
447 | 447 | ||
448 | x = edje_edit_state_image_border_fill_get(ed, part, state, value); | 448 | x = edje_edit_state_image_border_fill_get(ed, ppart, state, value); |
449 | str = border_fill_name_get(x); | 449 | str = border_fill_name_get(x); |
450 | if (machine) printf("BORDER-FILL: %s\n", str); | 450 | if (machine) printf("BORDER-FILL: %s\n", str); |
451 | else if (x != 1) printf(INDENT5 "middle: %s;\n", str); | 451 | else if (x != 1) printf(INDENT5 "middle: %s;\n", str); |
@@ -454,22 +454,22 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
454 | // TODO support image.fill.smooth | 454 | // TODO support image.fill.smooth |
455 | 455 | ||
456 | dx = edje_edit_state_fill_origin_relative_x_get | 456 | dx = edje_edit_state_fill_origin_relative_x_get |
457 | (ed, part, state, value); | 457 | (ed, ppart, state, value); |
458 | dy = edje_edit_state_fill_origin_relative_y_get | 458 | dy = edje_edit_state_fill_origin_relative_y_get |
459 | (ed, part, state, value); | 459 | (ed, ppart, state, value); |
460 | x = edje_edit_state_fill_origin_offset_x_get | 460 | x = edje_edit_state_fill_origin_offset_x_get |
461 | (ed, part, state, value); | 461 | (ed, ppart, state, value); |
462 | y = edje_edit_state_fill_origin_offset_y_get | 462 | y = edje_edit_state_fill_origin_offset_y_get |
463 | (ed, part, state, value); | 463 | (ed, ppart, state, value); |
464 | 464 | ||
465 | dx2 = edje_edit_state_fill_size_relative_x_get | 465 | dx2 = edje_edit_state_fill_size_relative_x_get |
466 | (ed, part, state, value); | 466 | (ed, ppart, state, value); |
467 | dy2 = edje_edit_state_fill_size_relative_y_get | 467 | dy2 = edje_edit_state_fill_size_relative_y_get |
468 | (ed, part, state, value); | 468 | (ed, ppart, state, value); |
469 | x2 = edje_edit_state_fill_size_offset_x_get | 469 | x2 = edje_edit_state_fill_size_offset_x_get |
470 | (ed, part, state, value); | 470 | (ed, ppart, state, value); |
471 | y2 = edje_edit_state_fill_size_offset_y_get | 471 | y2 = edje_edit_state_fill_size_offset_y_get |
472 | (ed, part, state, value); | 472 | (ed, ppart, state, value); |
473 | 473 | ||
474 | has_orgin = (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y)); | 474 | has_orgin = (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y)); |
475 | has_size = (FDIFF(dx2, 1.0) || FDIFF(dy2, 1.0) || (x2) || (y2)); | 475 | has_size = (FDIFF(dx2, 1.0) || FDIFF(dy2, 1.0) || (x2) || (y2)); |
@@ -531,22 +531,22 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
531 | // TODO support proxy.fill.smooth | 531 | // TODO support proxy.fill.smooth |
532 | 532 | ||
533 | dx = edje_edit_state_fill_origin_relative_x_get | 533 | dx = edje_edit_state_fill_origin_relative_x_get |
534 | (ed, part, state, value); | 534 | (ed, ppart, state, value); |
535 | dy = edje_edit_state_fill_origin_relative_y_get | 535 | dy = edje_edit_state_fill_origin_relative_y_get |
536 | (ed, part, state, value); | 536 | (ed, ppart, state, value); |
537 | x = edje_edit_state_fill_origin_offset_x_get | 537 | x = edje_edit_state_fill_origin_offset_x_get |
538 | (ed, part, state, value); | 538 | (ed, ppart, state, value); |
539 | y = edje_edit_state_fill_origin_offset_y_get | 539 | y = edje_edit_state_fill_origin_offset_y_get |
540 | (ed, part, state, value); | 540 | (ed, ppart, state, value); |
541 | 541 | ||
542 | dx2 = edje_edit_state_fill_size_relative_x_get | 542 | dx2 = edje_edit_state_fill_size_relative_x_get |
543 | (ed, part, state, value); | 543 | (ed, ppart, state, value); |
544 | dy2 = edje_edit_state_fill_size_relative_y_get | 544 | dy2 = edje_edit_state_fill_size_relative_y_get |
545 | (ed, part, state, value); | 545 | (ed, ppart, state, value); |
546 | x2 = edje_edit_state_fill_size_offset_x_get | 546 | x2 = edje_edit_state_fill_size_offset_x_get |
547 | (ed, part, state, value); | 547 | (ed, ppart, state, value); |
548 | y2 = edje_edit_state_fill_size_offset_y_get | 548 | y2 = edje_edit_state_fill_size_offset_y_get |
549 | (ed, part, state, value); | 549 | (ed, ppart, state, value); |
550 | 550 | ||
551 | has_orgin = (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y)); | 551 | has_orgin = (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y)); |
552 | has_size = (FDIFF(dx2, 1.0) || FDIFF(dy2, 1.0) || (x2) || (y2)); | 552 | has_size = (FDIFF(dx2, 1.0) || FDIFF(dy2, 1.0) || (x2) || (y2)); |
@@ -600,34 +600,34 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
600 | if (machine) puts("TEXT-BEGIN"); | 600 | if (machine) puts("TEXT-BEGIN"); |
601 | else puts(INDENT4 "text {"); | 601 | else puts(INDENT4 "text {"); |
602 | 602 | ||
603 | str = edje_edit_state_text_get(ed, part, state, value); | 603 | str = edje_edit_state_text_get(ed, ppart, state, value); |
604 | if (machine) printf("TEXT: %s\n", str ? str : ""); | 604 | if (machine) printf("TEXT: %s\n", str ? str : ""); |
605 | else if (str) printf(INDENT5 "text: \"%s\";\n", str); | 605 | else if (str) printf(INDENT5 "text: \"%s\";\n", str); |
606 | edje_edit_string_free(str); | 606 | edje_edit_string_free(str); |
607 | 607 | ||
608 | str = edje_edit_state_font_get(ed, part, state, value); | 608 | str = edje_edit_state_font_get(ed, ppart, state, value); |
609 | if (machine) printf("FONT: %s\n", str ? str : ""); | 609 | if (machine) printf("FONT: %s\n", str ? str : ""); |
610 | else if (str) printf(INDENT5 "font: \"%s\";\n", str); | 610 | else if (str) printf(INDENT5 "font: \"%s\";\n", str); |
611 | edje_edit_string_free(str); | 611 | edje_edit_string_free(str); |
612 | 612 | ||
613 | x = edje_edit_state_text_size_get(ed, part, state, value); | 613 | x = edje_edit_state_text_size_get(ed, ppart, state, value); |
614 | if (machine) printf("SIZE: %d\n", x); | 614 | if (machine) printf("SIZE: %d\n", x); |
615 | else if (x > 0) printf(INDENT5 "size: %d;\n", x); | 615 | else if (x > 0) printf(INDENT5 "size: %d;\n", x); |
616 | 616 | ||
617 | // TODO text_class | 617 | // TODO text_class |
618 | 618 | ||
619 | dx = edje_edit_state_text_align_x_get(ed, part, state, value); | 619 | dx = edje_edit_state_text_align_x_get(ed, ppart, state, value); |
620 | dy = edje_edit_state_text_align_y_get(ed, part, state, value); | 620 | dy = edje_edit_state_text_align_y_get(ed, ppart, state, value); |
621 | if (machine) printf("TEXT-ALIGN-X: %g\nTEXT-ALIGN-Y: %g\n", dx, dy); | 621 | if (machine) printf("TEXT-ALIGN-X: %g\nTEXT-ALIGN-Y: %g\n", dx, dy); |
622 | else if (FDIFF(dx, 0.5) || FDIFF(dy, 0.5)) | 622 | else if (FDIFF(dx, 0.5) || FDIFF(dy, 0.5)) |
623 | printf(INDENT5 "align: %g %g;\n", dx, dy); | 623 | printf(INDENT5 "align: %g %g;\n", dx, dy); |
624 | 624 | ||
625 | x = edje_edit_state_text_fit_x_get(ed, part, state, value); | 625 | x = edje_edit_state_text_fit_x_get(ed, ppart, state, value); |
626 | y = edje_edit_state_text_fit_y_get(ed, part, state, value); | 626 | y = edje_edit_state_text_fit_y_get(ed, ppart, state, value); |
627 | if (machine) printf("TEXT-FIT-X: %d\nTEXT-FIT-Y: %d\n", x, y); | 627 | if (machine) printf("TEXT-FIT-X: %d\nTEXT-FIT-Y: %d\n", x, y); |
628 | else if ((x) || (y)) printf(INDENT5 "fit: %d %d;\n", x, y); | 628 | else if ((x) || (y)) printf(INDENT5 "fit: %d %d;\n", x, y); |
629 | 629 | ||
630 | dx = edje_edit_state_text_elipsis_get(ed, part, state, value); | 630 | dx = edje_edit_state_text_elipsis_get(ed, ppart, state, value); |
631 | if (machine) printf("TEXT-ELIPSIS: %g\n", dx); | 631 | if (machine) printf("TEXT-ELIPSIS: %g\n", dx); |
632 | else if (FDIFF(dx, 0.5)) printf(INDENT5 "elipsis: %g;\n", dx); | 632 | else if (FDIFF(dx, 0.5)) printf(INDENT5 "elipsis: %g;\n", dx); |
633 | 633 | ||
@@ -640,7 +640,7 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value | |||
640 | const Edje_External_Param *p; | 640 | const Edje_External_Param *p; |
641 | 641 | ||
642 | params = edje_edit_state_external_params_list_get | 642 | params = edje_edit_state_external_params_list_get |
643 | (ed, part, state, value); | 643 | (ed, ppart, state, value); |
644 | 644 | ||
645 | if (params) | 645 | if (params) |
646 | { | 646 | { |
@@ -766,16 +766,16 @@ _api_name_fix(const char *orig) | |||
766 | } | 766 | } |
767 | 767 | ||
768 | static char * | 768 | static char * |
769 | _part_api_name_get(Evas_Object *ed, const char *part) | 769 | _part_api_name_get(Evas_Object *ed, const char *ppart) |
770 | { | 770 | { |
771 | const char *orig = edje_edit_part_api_name_get(ed, part); | 771 | const char *orig = edje_edit_part_api_name_get(ed, ppart); |
772 | char *fix = _api_name_fix(orig); | 772 | char *fix = _api_name_fix(orig); |
773 | edje_edit_string_free(orig); | 773 | edje_edit_string_free(orig); |
774 | return fix; | 774 | return fix; |
775 | } | 775 | } |
776 | 776 | ||
777 | static void | 777 | static void |
778 | part_details(Evas_Object *ed, const char *part) | 778 | part_details(Evas_Object *ed, const char *ppart) |
779 | { | 779 | { |
780 | Eina_List *states, *l; | 780 | Eina_List *states, *l; |
781 | Eina_Bool b; | 781 | Eina_Bool b; |
@@ -786,8 +786,8 @@ part_details(Evas_Object *ed, const char *part) | |||
786 | 786 | ||
787 | if (machine) puts("PART-DETAILS-BEGIN"); | 787 | if (machine) puts("PART-DETAILS-BEGIN"); |
788 | 788 | ||
789 | str = api =_part_api_name_get(ed, part); | 789 | str = api =_part_api_name_get(ed, ppart); |
790 | str2 = edje_edit_part_api_description_get(ed, part); | 790 | str2 = edje_edit_part_api_description_get(ed, ppart); |
791 | if (machine) | 791 | if (machine) |
792 | { | 792 | { |
793 | printf("API-NAME: %s\n", str ? str : ""); | 793 | printf("API-NAME: %s\n", str ? str : ""); |
@@ -798,67 +798,67 @@ part_details(Evas_Object *ed, const char *part) | |||
798 | free(api); | 798 | free(api); |
799 | edje_edit_string_free(str2); | 799 | edje_edit_string_free(str2); |
800 | 800 | ||
801 | b = edje_edit_part_mouse_events_get(ed, part); | 801 | b = edje_edit_part_mouse_events_get(ed, ppart); |
802 | if (machine) printf("MOUSE_EVENTS: %d\n", b); | 802 | if (machine) printf("MOUSE_EVENTS: %d\n", b); |
803 | else if (!b) puts(INDENT3 "mouse_events: 0;"); | 803 | else if (!b) puts(INDENT3 "mouse_events: 0;"); |
804 | 804 | ||
805 | if (detail > 1) | 805 | if (detail > 1) |
806 | { | 806 | { |
807 | b = edje_edit_part_repeat_events_get(ed, part); | 807 | b = edje_edit_part_repeat_events_get(ed, ppart); |
808 | if (machine) printf("REPEAT_EVENTS: %d\n", b); | 808 | if (machine) printf("REPEAT_EVENTS: %d\n", b); |
809 | else if (b) puts(INDENT3 "repeat_events: 1;"); | 809 | else if (b) puts(INDENT3 "repeat_events: 1;"); |
810 | 810 | ||
811 | b = edje_edit_part_scale_get(ed, part); | 811 | b = edje_edit_part_scale_get(ed, ppart); |
812 | if (machine) printf("SCALE: %d\n", b); | 812 | if (machine) printf("SCALE: %d\n", b); |
813 | else if (b) puts(INDENT3 "scale: 1;"); | 813 | else if (b) puts(INDENT3 "scale: 1;"); |
814 | } | 814 | } |
815 | 815 | ||
816 | str = edje_edit_part_clip_to_get(ed, part); | 816 | str = edje_edit_part_clip_to_get(ed, ppart); |
817 | if (machine) printf("CLIP_TO: %s\n", str ? str : ""); | 817 | if (machine) printf("CLIP_TO: %s\n", str ? str : ""); |
818 | else if (str) printf(INDENT3 "clip_to: \"%s\";\n", str); | 818 | else if (str) printf(INDENT3 "clip_to: \"%s\";\n", str); |
819 | edje_edit_string_free(str); | 819 | edje_edit_string_free(str); |
820 | 820 | ||
821 | str = edje_edit_part_source_get(ed, part); | 821 | str = edje_edit_part_source_get(ed, ppart); |
822 | if (machine) printf("SOURCE: %s\n", str ? str : ""); | 822 | if (machine) printf("SOURCE: %s\n", str ? str : ""); |
823 | else if (str) printf(INDENT3 "source: \"%s\";\n", str); | 823 | else if (str) printf(INDENT3 "source: \"%s\";\n", str); |
824 | edje_edit_string_free(str); | 824 | edje_edit_string_free(str); |
825 | 825 | ||
826 | if (detail > 1) | 826 | if (detail > 1) |
827 | { | 827 | { |
828 | if (edje_edit_part_type_get(ed, part) == EDJE_PART_TYPE_TEXT) | 828 | if (edje_edit_part_type_get(ed, ppart) == EDJE_PART_TYPE_TEXT) |
829 | { | 829 | { |
830 | str = text_effect_name_get(edje_edit_part_effect_get(ed, part)); | 830 | str = text_effect_name_get(edje_edit_part_effect_get(ed, ppart)); |
831 | if (machine) printf("EFFECT: %s\n", str ? str : ""); | 831 | if (machine) printf("EFFECT: %s\n", str ? str : ""); |
832 | else if (str) printf(INDENT3 "effect: %s;\n", str); | 832 | else if (str) printf(INDENT3 "effect: %s;\n", str); |
833 | /* do not free this str! */ | 833 | /* do not free this str! */ |
834 | } | 834 | } |
835 | 835 | ||
836 | if (edje_edit_part_drag_x_get(ed, part) || | 836 | if (edje_edit_part_drag_x_get(ed, ppart) || |
837 | edje_edit_part_drag_y_get(ed, part)) | 837 | edje_edit_part_drag_y_get(ed, ppart)) |
838 | { | 838 | { |
839 | int dir, step, count; | 839 | int dir, step, count; |
840 | 840 | ||
841 | if (machine) puts("DRAGABLE-BEGIN"); | 841 | if (machine) puts("DRAGABLE-BEGIN"); |
842 | else puts(INDENT3 "dragable {"); | 842 | else puts(INDENT3 "dragable {"); |
843 | 843 | ||
844 | dir = edje_edit_part_drag_x_get(ed, part); | 844 | dir = edje_edit_part_drag_x_get(ed, ppart); |
845 | step = edje_edit_part_drag_step_x_get(ed, part); | 845 | step = edje_edit_part_drag_step_x_get(ed, ppart); |
846 | count = edje_edit_part_drag_count_x_get(ed, part); | 846 | count = edje_edit_part_drag_count_x_get(ed, ppart); |
847 | if (machine) printf("DRAG-X: %d %d %d\n", dir, step, count); | 847 | if (machine) printf("DRAG-X: %d %d %d\n", dir, step, count); |
848 | else printf(INDENT4 "x: %d %d %d;\n", dir, step, count); | 848 | else printf(INDENT4 "x: %d %d %d;\n", dir, step, count); |
849 | 849 | ||
850 | dir = edje_edit_part_drag_y_get(ed, part); | 850 | dir = edje_edit_part_drag_y_get(ed, ppart); |
851 | step = edje_edit_part_drag_step_y_get(ed, part); | 851 | step = edje_edit_part_drag_step_y_get(ed, ppart); |
852 | count = edje_edit_part_drag_count_y_get(ed, part); | 852 | count = edje_edit_part_drag_count_y_get(ed, ppart); |
853 | if (machine) printf("DRAG-Y: %d %d %d\n", dir, step, count); | 853 | if (machine) printf("DRAG-Y: %d %d %d\n", dir, step, count); |
854 | else printf(INDENT4 "y: %d %d %d;\n", dir, step, count); | 854 | else printf(INDENT4 "y: %d %d %d;\n", dir, step, count); |
855 | 855 | ||
856 | str = edje_edit_part_drag_confine_get(ed, part); | 856 | str = edje_edit_part_drag_confine_get(ed, ppart); |
857 | if (machine) printf("DRAG-CONFINE: %s\n", str ? str : ""); | 857 | if (machine) printf("DRAG-CONFINE: %s\n", str ? str : ""); |
858 | else if (str) printf(INDENT4 "confine: \"%s\";\n", str); | 858 | else if (str) printf(INDENT4 "confine: \"%s\";\n", str); |
859 | edje_edit_string_free(str); | 859 | edje_edit_string_free(str); |
860 | 860 | ||
861 | str = edje_edit_part_drag_event_get(ed, part); | 861 | str = edje_edit_part_drag_event_get(ed, ppart); |
862 | if (machine) printf("DRAG-EVENTS: %s\n", str ? str : ""); | 862 | if (machine) printf("DRAG-EVENTS: %s\n", str ? str : ""); |
863 | else if (str) printf(INDENT4 "events: \"%s\";\n", str); | 863 | else if (str) printf(INDENT4 "events: \"%s\";\n", str); |
864 | edje_edit_string_free(str); | 864 | edje_edit_string_free(str); |
@@ -868,7 +868,7 @@ part_details(Evas_Object *ed, const char *part) | |||
868 | } | 868 | } |
869 | } | 869 | } |
870 | 870 | ||
871 | states = edje_edit_part_states_list_get(ed, part); | 871 | states = edje_edit_part_states_list_get(ed, ppart); |
872 | EINA_LIST_FOREACH(states, l, str) | 872 | EINA_LIST_FOREACH(states, l, str) |
873 | { | 873 | { |
874 | char state[512], *delim; | 874 | char state[512], *delim; |
@@ -879,7 +879,7 @@ part_details(Evas_Object *ed, const char *part) | |||
879 | delim++; | 879 | delim++; |
880 | value = strtod(delim, NULL); | 880 | value = strtod(delim, NULL); |
881 | state_begin(state, value); | 881 | state_begin(state, value); |
882 | state_details(ed, part, state, value); | 882 | state_details(ed, ppart, state, value); |
883 | state_end(); | 883 | state_end(); |
884 | } | 884 | } |
885 | edje_edit_string_list_free(states); | 885 | edje_edit_string_list_free(states); |
@@ -1047,9 +1047,9 @@ program_end(void) | |||
1047 | 1047 | ||
1048 | 1048 | ||
1049 | static char * | 1049 | static char * |
1050 | _program_api_name_get(Evas_Object *ed, const char *program) | 1050 | _program_api_name_get(Evas_Object *ed, const char *pprogram) |
1051 | { | 1051 | { |
1052 | const char *orig = edje_edit_program_api_name_get(ed, program); | 1052 | const char *orig = edje_edit_program_api_name_get(ed, pprogram); |
1053 | char *fix = _api_name_fix(orig); | 1053 | char *fix = _api_name_fix(orig); |
1054 | edje_edit_string_free(orig); | 1054 | edje_edit_string_free(orig); |
1055 | return fix; | 1055 | return fix; |
@@ -1071,7 +1071,7 @@ _transition_name_get(Edje_Tween_Mode mode) | |||
1071 | } | 1071 | } |
1072 | 1072 | ||
1073 | static void | 1073 | static void |
1074 | program_details(Evas_Object *ed, const char *program) | 1074 | program_details(Evas_Object *ed, const char *pprogram) |
1075 | { | 1075 | { |
1076 | const char *str, *str2; | 1076 | const char *str, *str2; |
1077 | char *api; | 1077 | char *api; |
@@ -1080,8 +1080,8 @@ program_details(Evas_Object *ed, const char *program) | |||
1080 | 1080 | ||
1081 | if (machine) puts("PROGRAM-DETAILS-BEGIN"); | 1081 | if (machine) puts("PROGRAM-DETAILS-BEGIN"); |
1082 | 1082 | ||
1083 | str = api =_program_api_name_get(ed, program); | 1083 | str = api =_program_api_name_get(ed, pprogram); |
1084 | str2 = edje_edit_program_api_description_get(ed, program); | 1084 | str2 = edje_edit_program_api_description_get(ed, pprogram); |
1085 | if (machine) | 1085 | if (machine) |
1086 | { | 1086 | { |
1087 | printf("API-NAME: %s\n", str ? str : ""); | 1087 | printf("API-NAME: %s\n", str ? str : ""); |
@@ -1092,12 +1092,12 @@ program_details(Evas_Object *ed, const char *program) | |||
1092 | free(api); | 1092 | free(api); |
1093 | edje_edit_string_free(str2); | 1093 | edje_edit_string_free(str2); |
1094 | 1094 | ||
1095 | str = edje_edit_program_signal_get(ed, program); | 1095 | str = edje_edit_program_signal_get(ed, pprogram); |
1096 | if (machine) printf("SIGNAL: %s\n", str ? str : ""); | 1096 | if (machine) printf("SIGNAL: %s\n", str ? str : ""); |
1097 | else if (str) printf(INDENT3 "signal: \"%s\";\n", str); | 1097 | else if (str) printf(INDENT3 "signal: \"%s\";\n", str); |
1098 | edje_edit_string_free(str); | 1098 | edje_edit_string_free(str); |
1099 | 1099 | ||
1100 | str = edje_edit_program_source_get(ed, program); | 1100 | str = edje_edit_program_source_get(ed, pprogram); |
1101 | if (machine) printf("SOURCE: %s\n", str ? str : ""); | 1101 | if (machine) printf("SOURCE: %s\n", str ? str : ""); |
1102 | else if (str) printf(INDENT3 "source: \"%s\";\n", str); | 1102 | else if (str) printf(INDENT3 "source: \"%s\";\n", str); |
1103 | edje_edit_string_free(str); | 1103 | edje_edit_string_free(str); |
@@ -1105,7 +1105,7 @@ program_details(Evas_Object *ed, const char *program) | |||
1105 | if (detail >= 1) | 1105 | if (detail >= 1) |
1106 | { | 1106 | { |
1107 | Eina_List *lst, *l; | 1107 | Eina_List *lst, *l; |
1108 | Edje_Action_Type type = edje_edit_program_action_get(ed, program); | 1108 | Edje_Action_Type type = edje_edit_program_action_get(ed, pprogram); |
1109 | switch (type) | 1109 | switch (type) |
1110 | { | 1110 | { |
1111 | case EDJE_ACTION_TYPE_ACTION_STOP: | 1111 | case EDJE_ACTION_TYPE_ACTION_STOP: |
@@ -1113,18 +1113,18 @@ program_details(Evas_Object *ed, const char *program) | |||
1113 | else puts(INDENT3 "action: ACTION_STOP;"); | 1113 | else puts(INDENT3 "action: ACTION_STOP;"); |
1114 | break; | 1114 | break; |
1115 | case EDJE_ACTION_TYPE_STATE_SET: | 1115 | case EDJE_ACTION_TYPE_STATE_SET: |
1116 | str = edje_edit_program_state_get(ed, program); | 1116 | str = edje_edit_program_state_get(ed, pprogram); |
1117 | if (machine) | 1117 | if (machine) |
1118 | printf("ACTION: STATE_SET\nACTION-STATE: %s %g\n", | 1118 | printf("ACTION: STATE_SET\nACTION-STATE: %s %g\n", |
1119 | str, edje_edit_program_value_get(ed, program)); | 1119 | str, edje_edit_program_value_get(ed, pprogram)); |
1120 | else | 1120 | else |
1121 | printf(INDENT3 "action: STATE_SET \"%s\" %2.1f;\n", | 1121 | printf(INDENT3 "action: STATE_SET \"%s\" %2.1f;\n", |
1122 | str, edje_edit_program_value_get(ed, program)); | 1122 | str, edje_edit_program_value_get(ed, pprogram)); |
1123 | edje_edit_string_free(str); | 1123 | edje_edit_string_free(str); |
1124 | break; | 1124 | break; |
1125 | case EDJE_ACTION_TYPE_SIGNAL_EMIT: | 1125 | case EDJE_ACTION_TYPE_SIGNAL_EMIT: |
1126 | str = edje_edit_program_state_get(ed, program); | 1126 | str = edje_edit_program_state_get(ed, pprogram); |
1127 | str2 = edje_edit_program_state2_get(ed, program); | 1127 | str2 = edje_edit_program_state2_get(ed, pprogram); |
1128 | if (machine) | 1128 | if (machine) |
1129 | printf("ACTION: SIGNAL_EMIT\nACTION-SIGNAL: %s\n" | 1129 | printf("ACTION: SIGNAL_EMIT\nACTION-SIGNAL: %s\n" |
1130 | "ACTION-SOURCE: %s\n", | 1130 | "ACTION-SOURCE: %s\n", |
@@ -1146,7 +1146,7 @@ program_details(Evas_Object *ed, const char *program) | |||
1146 | //~ eina_strbuf_append(buf, I4"action: DRAG_VAL_PAGE TODO;\n"); | 1146 | //~ eina_strbuf_append(buf, I4"action: DRAG_VAL_PAGE TODO;\n"); |
1147 | //~ break; | 1147 | //~ break; |
1148 | default: | 1148 | default: |
1149 | ERR("Unhandled program action type %d", type); | 1149 | ERR("Unhandled pprogram action type %d", type); |
1150 | break; | 1150 | break; |
1151 | } | 1151 | } |
1152 | 1152 | ||
@@ -1154,11 +1154,11 @@ program_details(Evas_Object *ed, const char *program) | |||
1154 | { | 1154 | { |
1155 | double from, range; | 1155 | double from, range; |
1156 | 1156 | ||
1157 | from = edje_edit_program_transition_time_get(ed, program); | 1157 | from = edje_edit_program_transition_time_get(ed, pprogram); |
1158 | if (from > 0.0) | 1158 | if (from > 0.0) |
1159 | { | 1159 | { |
1160 | str = _transition_name_get | 1160 | str = _transition_name_get |
1161 | (edje_edit_program_transition_get(ed, program)); | 1161 | (edje_edit_program_transition_get(ed, pprogram)); |
1162 | if (machine) | 1162 | if (machine) |
1163 | printf("TRANSITION-NAME: %s\nTRANSITION-DURATION: %g\n", | 1163 | printf("TRANSITION-NAME: %s\nTRANSITION-DURATION: %g\n", |
1164 | str, from); | 1164 | str, from); |
@@ -1166,8 +1166,8 @@ program_details(Evas_Object *ed, const char *program) | |||
1166 | /* do not free str! */ | 1166 | /* do not free str! */ |
1167 | } | 1167 | } |
1168 | 1168 | ||
1169 | from = edje_edit_program_in_from_get(ed, program); | 1169 | from = edje_edit_program_in_from_get(ed, pprogram); |
1170 | range = edje_edit_program_in_range_get(ed, program); | 1170 | range = edje_edit_program_in_range_get(ed, pprogram); |
1171 | if (FDIFF(from, 0.0) || FDIFF(range, 0.0)) | 1171 | if (FDIFF(from, 0.0) || FDIFF(range, 0.0)) |
1172 | { | 1172 | { |
1173 | if (machine) | 1173 | if (machine) |
@@ -1176,13 +1176,13 @@ program_details(Evas_Object *ed, const char *program) | |||
1176 | } | 1176 | } |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | lst = edje_edit_program_targets_get(ed, program); | 1179 | lst = edje_edit_program_targets_get(ed, pprogram); |
1180 | EINA_LIST_FOREACH(lst, l, str) | 1180 | EINA_LIST_FOREACH(lst, l, str) |
1181 | if (machine) printf("TARGET: %s\n", str); | 1181 | if (machine) printf("TARGET: %s\n", str); |
1182 | else printf(INDENT3 "target: \"%s\";\n", str); | 1182 | else printf(INDENT3 "target: \"%s\";\n", str); |
1183 | edje_edit_string_list_free(lst); | 1183 | edje_edit_string_list_free(lst); |
1184 | 1184 | ||
1185 | lst = edje_edit_program_afters_get(ed, program); | 1185 | lst = edje_edit_program_afters_get(ed, pprogram); |
1186 | EINA_LIST_FOREACH(lst, l, str) | 1186 | EINA_LIST_FOREACH(lst, l, str) |
1187 | if (machine) printf("AFTER: %s\n", str); | 1187 | if (machine) printf("AFTER: %s\n", str); |
1188 | else printf(INDENT3 "after: \"%s\";\n", str); | 1188 | else printf(INDENT3 "after: \"%s\";\n", str); |
diff --git a/libraries/edje/src/bin/edje_multisense_convert.c b/libraries/edje/src/bin/edje_multisense_convert.c index d37d218..62c2f67 100644 --- a/libraries/edje/src/bin/edje_multisense_convert.c +++ b/libraries/edje/src/bin/edje_multisense_convert.c | |||
@@ -12,7 +12,7 @@ | |||
12 | # endif | 12 | # endif |
13 | 13 | ||
14 | Edje_Sound_Encode * | 14 | Edje_Sound_Encode * |
15 | _edje_multisense_encode(const char *filename, Edje_Sound_Sample *sample, double quality) | 15 | _edje_multisense_encode(const char *filename, Edje_Sound_Sample *sample, double quality __UNUSED__) |
16 | { | 16 | { |
17 | SF_INFO sfinfo; | 17 | SF_INFO sfinfo; |
18 | SNDFILE* sfile; | 18 | SNDFILE* sfile; |
diff --git a/libraries/edje/src/bin/epp/Makefile.in b/libraries/edje/src/bin/epp/Makefile.in index 2ef2e56..c1a8ee5 100644 --- a/libraries/edje/src/bin/epp/Makefile.in +++ b/libraries/edje/src/bin/epp/Makefile.in | |||
@@ -225,8 +225,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
225 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 225 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
226 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 226 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
227 | PKG_CONFIG = @PKG_CONFIG@ | 227 | PKG_CONFIG = @PKG_CONFIG@ |
228 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
229 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
230 | PYTHON = @PYTHON@ | 228 | PYTHON = @PYTHON@ |
231 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | 229 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ |
232 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | 230 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ |
diff --git a/libraries/edje/src/bin/epp/cppmain.c b/libraries/edje/src/bin/epp/cppmain.c index 45b67b5..ea0a0b2 100644 --- a/libraries/edje/src/bin/epp/cppmain.c +++ b/libraries/edje/src/bin/epp/cppmain.c | |||
@@ -44,7 +44,9 @@ main(int argc, char **argv) | |||
44 | int argi = 1; /* Next argument to handle. */ | 44 | int argi = 1; /* Next argument to handle. */ |
45 | struct cpp_options *opts = &options; | 45 | struct cpp_options *opts = &options; |
46 | enum cpp_token kind; | 46 | enum cpp_token kind; |
47 | int got_text; | 47 | #if EPP_DEBUG |
48 | int got_text = 0; | ||
49 | #endif | ||
48 | 50 | ||
49 | p = argv[0] + strlen(argv[0]); | 51 | p = argv[0] + strlen(argv[0]); |
50 | #ifndef __EMX__ | 52 | #ifndef __EMX__ |
@@ -76,7 +78,6 @@ main(int argc, char **argv) | |||
76 | else if (!freopen(opts->out_fname, "w", stdout)) | 78 | else if (!freopen(opts->out_fname, "w", stdout)) |
77 | cpp_pfatal_with_name(&parse_in, opts->out_fname); | 79 | cpp_pfatal_with_name(&parse_in, opts->out_fname); |
78 | 80 | ||
79 | got_text = 0; | ||
80 | for (i = 0;; i++) | 81 | for (i = 0;; i++) |
81 | { | 82 | { |
82 | kind = cpp_get_token(&parse_in); | 83 | kind = cpp_get_token(&parse_in); |
@@ -108,7 +109,9 @@ main(int argc, char **argv) | |||
108 | case CPP_COMMA: | 109 | case CPP_COMMA: |
109 | case CPP_SEMICOLON: | 110 | case CPP_SEMICOLON: |
110 | case CPP_3DOTS: | 111 | case CPP_3DOTS: |
111 | got_text = 1; | 112 | #if EPP_DEBUG |
113 | got_text = 1; | ||
114 | #endif | ||
112 | continue; | 115 | continue; |
113 | 116 | ||
114 | case CPP_COMMENT: | 117 | case CPP_COMMENT: |
@@ -130,7 +133,9 @@ main(int argc, char **argv) | |||
130 | exit(FATAL_EXIT_CODE); | 133 | exit(FATAL_EXIT_CODE); |
131 | } | 134 | } |
132 | parse_in.limit = parse_in.token_buffer; | 135 | parse_in.limit = parse_in.token_buffer; |
133 | got_text = 0; | 136 | #if EPP_DEBUG |
137 | got_text = 0; | ||
138 | #endif | ||
134 | } | 139 | } |
135 | 140 | ||
136 | done: | 141 | done: |
diff --git a/libraries/edje/src/examples/Makefile.am b/libraries/edje/src/examples/Makefile.am index 20e2c81..579f148 100644 --- a/libraries/edje/src/examples/Makefile.am +++ b/libraries/edje/src/examples/Makefile.am | |||
@@ -1,12 +1,15 @@ | |||
1 | MAINTAINERCLEANFILES = Makefile.in | 1 | MAINTAINERCLEANFILES = Makefile.in |
2 | 2 | ||
3 | pkglibdir = $(datadir)/$(PACKAGE)/examples | 3 | examplesdir = $(datadir)/$(PACKAGE)/examples |
4 | |||
4 | if ENABLE_MULTISENSE | 5 | if ENABLE_MULTISENSE |
5 | MULTISENSE_EDC_FILE = multisense.edc | 6 | MULTISENSE_EDC_FILE = multisense.edc |
6 | SND_DIR = -sd $(srcdir) | 7 | SND_DIR = -sd $(srcdir) |
7 | endif | 8 | endif |
9 | |||
8 | #put here all EDCs one needs to the examples | 10 | #put here all EDCs one needs to the examples |
9 | EDCS = basic.edc \ | 11 | EDCS = \ |
12 | basic.edc \ | ||
10 | swallow.edc \ | 13 | swallow.edc \ |
11 | text.edc \ | 14 | text.edc \ |
12 | table.edc \ | 15 | table.edc \ |
@@ -20,26 +23,48 @@ EDCS = basic.edc \ | |||
20 | sigtest.edc \ | 23 | sigtest.edc \ |
21 | $(MULTISENSE_EDC_FILE) | 24 | $(MULTISENSE_EDC_FILE) |
22 | 25 | ||
26 | .edc.edj: | ||
27 | $(edje_cc) -v -fd $(srcdir) -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) | ||
28 | |||
29 | EDJS = $(EDCS:%.edc=%.edj) | ||
30 | |||
23 | filesdir = $(datadir)/$(PACKAGE)/examples | 31 | filesdir = $(datadir)/$(PACKAGE)/examples |
24 | files_DATA = | 32 | files_DATA = \ |
33 | $(EDCS) \ | ||
34 | bubble.png \ | ||
35 | red.png \ | ||
36 | test.png \ | ||
37 | Vera.ttf \ | ||
38 | edje-basic.c \ | ||
39 | edje-swallow.c \ | ||
40 | edje-text.c \ | ||
41 | edje-table.c \ | ||
42 | edje-box.c \ | ||
43 | edje-box2.c \ | ||
44 | edje-drag.c \ | ||
45 | edje-signals-messages.c \ | ||
46 | edje-color-class.c \ | ||
47 | edje-perspective.c \ | ||
48 | edje-animations.c \ | ||
49 | sigtest.c | ||
50 | |||
51 | EXTRA_DIST = $(files_DATA) | ||
25 | 52 | ||
26 | if BUILD_EXAMPLES | 53 | if BUILD_EXAMPLES |
27 | 54 | ||
28 | AM_CPPFLAGS = \ | 55 | AM_CPPFLAGS = \ |
29 | -I. \ | 56 | -I. \ |
30 | -I$(top_srcdir)/src/lib \ | 57 | -I$(top_srcdir)/src/lib \ |
31 | -I$(top_srcdir)/src/lib/include \ | 58 | -I$(top_srcdir)/src/lib/include \ |
32 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ | 59 | -DPACKAGE_BIN_DIR=\"$(bindir)\" \ |
33 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ | 60 | -DPACKAGE_LIB_DIR=\"$(libdir)\" \ |
34 | -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ | 61 | -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ |
35 | -DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" | 62 | -DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" \ |
36 | 63 | @EDJE_CFLAGS@ | |
37 | pkglib_PROGRAMS = | ||
38 | 64 | ||
39 | #the ones using ecore_evas follow | 65 | files_DATA += $(EDJS) |
40 | AM_CPPFLAGS += @EDJE_CFLAGS@ | ||
41 | 66 | ||
42 | pkglib_PROGRAMS += \ | 67 | examples_PROGRAMS = \ |
43 | edje-basic \ | 68 | edje-basic \ |
44 | edje-swallow \ | 69 | edje-swallow \ |
45 | edje-text \ | 70 | edje-text \ |
@@ -55,53 +80,4 @@ pkglib_PROGRAMS += \ | |||
55 | 80 | ||
56 | LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ | 81 | LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ |
57 | 82 | ||
58 | .edc.edj: | ||
59 | $(edje_cc) -v -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) | ||
60 | |||
61 | EDJS = $(EDCS:%.edc=%.edj) | ||
62 | |||
63 | files_DATA += $(EDJS) | ||
64 | |||
65 | endif # if BUILD_EXAMPLES | ||
66 | |||
67 | if INSTALL_EXAMPLES | ||
68 | |||
69 | #put here additional data when installing examples | ||
70 | files_DATA += \ | ||
71 | $(srcdir)/bubble.png \ | ||
72 | $(srcdir)/red.png \ | ||
73 | $(srcdir)/test.png \ | ||
74 | $(srcdir)/Vera.ttf | ||
75 | |||
76 | files_DATA += \ | ||
77 | $(EDCS) \ | ||
78 | $(srcdir)/edje-basic.c \ | ||
79 | $(srcdir)/edje-swallow.c \ | ||
80 | $(srcdir)/edje-text.c \ | ||
81 | $(srcdir)/edje-table.c \ | ||
82 | $(srcdir)/edje-box.c \ | ||
83 | $(srcdir)/edje-box2.c \ | ||
84 | $(srcdir)/edje-drag.c \ | ||
85 | $(srcdir)/edje-signals-messages.c \ | ||
86 | $(srcdir)/edje-color-class.c \ | ||
87 | $(srcdir)/edje-perspective.c \ | ||
88 | $(srcdir)/edje-animations.c \ | ||
89 | $(srcdir)/sigtest.c | ||
90 | endif | 83 | endif |
91 | |||
92 | EXTRA_DIST = $(EDCS) \ | ||
93 | $(srcdir)/bubble.png \ | ||
94 | $(srcdir)/red.png \ | ||
95 | $(srcdir)/test.png \ | ||
96 | $(srcdir)/edje-basic.c \ | ||
97 | $(srcdir)/edje-swallow.c \ | ||
98 | $(srcdir)/edje-text.c \ | ||
99 | $(srcdir)/edje-table.c \ | ||
100 | $(srcdir)/edje-box.c \ | ||
101 | $(srcdir)/edje-box2.c \ | ||
102 | $(srcdir)/edje-drag.c \ | ||
103 | $(srcdir)/edje-signals-messages.c \ | ||
104 | $(srcdir)/edje-color-class.c \ | ||
105 | $(srcdir)/edje-perspective.c \ | ||
106 | $(srcdir)/edje-animations.c \ | ||
107 | $(srcdir)/sigtest.c | ||
diff --git a/libraries/edje/src/examples/Makefile.in b/libraries/edje/src/examples/Makefile.in index bde628f..7f867e0 100644 --- a/libraries/edje/src/examples/Makefile.in +++ b/libraries/edje/src/examples/Makefile.in | |||
@@ -19,6 +19,7 @@ | |||
19 | VPATH = @srcdir@ | 19 | VPATH = @srcdir@ |
20 | pkgdatadir = $(datadir)/@PACKAGE@ | 20 | pkgdatadir = $(datadir)/@PACKAGE@ |
21 | pkgincludedir = $(includedir)/@PACKAGE@ | 21 | pkgincludedir = $(includedir)/@PACKAGE@ |
22 | pkglibdir = $(libdir)/@PACKAGE@ | ||
22 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | 23 | pkglibexecdir = $(libexecdir)/@PACKAGE@ |
23 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | 24 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd |
24 | install_sh_DATA = $(install_sh) -c -m 644 | 25 | install_sh_DATA = $(install_sh) -c -m 644 |
@@ -34,7 +35,8 @@ PRE_UNINSTALL = : | |||
34 | POST_UNINSTALL = : | 35 | POST_UNINSTALL = : |
35 | build_triplet = @build@ | 36 | build_triplet = @build@ |
36 | host_triplet = @host@ | 37 | host_triplet = @host@ |
37 | @BUILD_EXAMPLES_TRUE@pkglib_PROGRAMS = edje-basic$(EXEEXT) \ | 38 | @BUILD_EXAMPLES_TRUE@am__append_1 = $(EDJS) |
39 | @BUILD_EXAMPLES_TRUE@examples_PROGRAMS = edje-basic$(EXEEXT) \ | ||
38 | @BUILD_EXAMPLES_TRUE@ edje-swallow$(EXEEXT) edje-text$(EXEEXT) \ | 40 | @BUILD_EXAMPLES_TRUE@ edje-swallow$(EXEEXT) edje-text$(EXEEXT) \ |
39 | @BUILD_EXAMPLES_TRUE@ edje-table$(EXEEXT) edje-box$(EXEEXT) \ | 41 | @BUILD_EXAMPLES_TRUE@ edje-table$(EXEEXT) edje-box$(EXEEXT) \ |
40 | @BUILD_EXAMPLES_TRUE@ edje-box2$(EXEEXT) edje-drag$(EXEEXT) \ | 42 | @BUILD_EXAMPLES_TRUE@ edje-box2$(EXEEXT) edje-drag$(EXEEXT) \ |
@@ -42,24 +44,6 @@ host_triplet = @host@ | |||
42 | @BUILD_EXAMPLES_TRUE@ edje-color-class$(EXEEXT) \ | 44 | @BUILD_EXAMPLES_TRUE@ edje-color-class$(EXEEXT) \ |
43 | @BUILD_EXAMPLES_TRUE@ edje-perspective$(EXEEXT) \ | 45 | @BUILD_EXAMPLES_TRUE@ edje-perspective$(EXEEXT) \ |
44 | @BUILD_EXAMPLES_TRUE@ edje-animations$(EXEEXT) sigtest$(EXEEXT) | 46 | @BUILD_EXAMPLES_TRUE@ edje-animations$(EXEEXT) sigtest$(EXEEXT) |
45 | @BUILD_EXAMPLES_TRUE@am__append_1 = $(EDJS) | ||
46 | |||
47 | #put here additional data when installing examples | ||
48 | @INSTALL_EXAMPLES_TRUE@am__append_2 = $(srcdir)/bubble.png \ | ||
49 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/red.png $(srcdir)/test.png \ | ||
50 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/Vera.ttf $(EDCS) \ | ||
51 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-basic.c \ | ||
52 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-swallow.c \ | ||
53 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-text.c \ | ||
54 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-table.c \ | ||
55 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-box.c \ | ||
56 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-box2.c \ | ||
57 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-drag.c \ | ||
58 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-signals-messages.c \ | ||
59 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-color-class.c \ | ||
60 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-perspective.c \ | ||
61 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-animations.c \ | ||
62 | @INSTALL_EXAMPLES_TRUE@ $(srcdir)/sigtest.c | ||
63 | subdir = src/examples | 47 | subdir = src/examples |
64 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | 48 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in |
65 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | 49 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
@@ -77,8 +61,8 @@ mkinstalldirs = $(install_sh) -d | |||
77 | CONFIG_HEADER = $(top_builddir)/config.h | 61 | CONFIG_HEADER = $(top_builddir)/config.h |
78 | CONFIG_CLEAN_FILES = | 62 | CONFIG_CLEAN_FILES = |
79 | CONFIG_CLEAN_VPATH_FILES = | 63 | CONFIG_CLEAN_VPATH_FILES = |
80 | am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)" | 64 | am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)" |
81 | PROGRAMS = $(pkglib_PROGRAMS) | 65 | PROGRAMS = $(examples_PROGRAMS) |
82 | edje_animations_SOURCES = edje-animations.c | 66 | edje_animations_SOURCES = edje-animations.c |
83 | edje_animations_OBJECTS = edje-animations.$(OBJEXT) | 67 | edje_animations_OBJECTS = edje-animations.$(OBJEXT) |
84 | edje_animations_LDADD = $(LDADD) | 68 | edje_animations_LDADD = $(LDADD) |
@@ -201,7 +185,6 @@ DATA = $(files_DATA) | |||
201 | ETAGS = etags | 185 | ETAGS = etags |
202 | CTAGS = ctags | 186 | CTAGS = ctags |
203 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | 187 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
204 | pkglibdir = $(datadir)/$(PACKAGE)/examples | ||
205 | ACLOCAL = @ACLOCAL@ | 188 | ACLOCAL = @ACLOCAL@ |
206 | ALLOCA = @ALLOCA@ | 189 | ALLOCA = @ALLOCA@ |
207 | ALSA_CFLAGS = @ALSA_CFLAGS@ | 190 | ALSA_CFLAGS = @ALSA_CFLAGS@ |
@@ -296,8 +279,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
296 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 279 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
297 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 280 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
298 | PKG_CONFIG = @PKG_CONFIG@ | 281 | PKG_CONFIG = @PKG_CONFIG@ |
299 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
300 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
301 | PYTHON = @PYTHON@ | 282 | PYTHON = @PYTHON@ |
302 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | 283 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ |
303 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | 284 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ |
@@ -385,10 +366,13 @@ top_srcdir = @top_srcdir@ | |||
385 | version_info = @version_info@ | 366 | version_info = @version_info@ |
386 | vimdir = @vimdir@ | 367 | vimdir = @vimdir@ |
387 | MAINTAINERCLEANFILES = Makefile.in | 368 | MAINTAINERCLEANFILES = Makefile.in |
369 | examplesdir = $(datadir)/$(PACKAGE)/examples | ||
388 | @ENABLE_MULTISENSE_TRUE@MULTISENSE_EDC_FILE = multisense.edc | 370 | @ENABLE_MULTISENSE_TRUE@MULTISENSE_EDC_FILE = multisense.edc |
389 | @ENABLE_MULTISENSE_TRUE@SND_DIR = -sd $(srcdir) | 371 | @ENABLE_MULTISENSE_TRUE@SND_DIR = -sd $(srcdir) |
372 | |||
390 | #put here all EDCs one needs to the examples | 373 | #put here all EDCs one needs to the examples |
391 | EDCS = basic.edc \ | 374 | EDCS = \ |
375 | basic.edc \ | ||
392 | swallow.edc \ | 376 | swallow.edc \ |
393 | text.edc \ | 377 | text.edc \ |
394 | table.edc \ | 378 | table.edc \ |
@@ -402,36 +386,24 @@ EDCS = basic.edc \ | |||
402 | sigtest.edc \ | 386 | sigtest.edc \ |
403 | $(MULTISENSE_EDC_FILE) | 387 | $(MULTISENSE_EDC_FILE) |
404 | 388 | ||
389 | EDJS = $(EDCS:%.edc=%.edj) | ||
405 | filesdir = $(datadir)/$(PACKAGE)/examples | 390 | filesdir = $(datadir)/$(PACKAGE)/examples |
406 | files_DATA = $(am__append_1) $(am__append_2) | 391 | files_DATA = $(EDCS) bubble.png red.png test.png Vera.ttf edje-basic.c \ |
407 | 392 | edje-swallow.c edje-text.c edje-table.c edje-box.c edje-box2.c \ | |
408 | #the ones using ecore_evas follow | 393 | edje-drag.c edje-signals-messages.c edje-color-class.c \ |
409 | @BUILD_EXAMPLES_TRUE@AM_CPPFLAGS = -I. -I$(top_srcdir)/src/lib \ | 394 | edje-perspective.c edje-animations.c sigtest.c $(am__append_1) |
410 | @BUILD_EXAMPLES_TRUE@ -I$(top_srcdir)/src/lib/include \ | 395 | EXTRA_DIST = $(files_DATA) |
411 | @BUILD_EXAMPLES_TRUE@ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ | 396 | @BUILD_EXAMPLES_TRUE@AM_CPPFLAGS = \ |
412 | @BUILD_EXAMPLES_TRUE@ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ | 397 | @BUILD_EXAMPLES_TRUE@ -I. \ |
413 | @BUILD_EXAMPLES_TRUE@ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ | 398 | @BUILD_EXAMPLES_TRUE@ -I$(top_srcdir)/src/lib \ |
414 | @BUILD_EXAMPLES_TRUE@ -DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" \ | 399 | @BUILD_EXAMPLES_TRUE@ -I$(top_srcdir)/src/lib/include \ |
415 | @BUILD_EXAMPLES_TRUE@ @EDJE_CFLAGS@ $(am__empty) | 400 | @BUILD_EXAMPLES_TRUE@ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ |
416 | @BUILD_EXAMPLES_TRUE@LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ | 401 | @BUILD_EXAMPLES_TRUE@ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ |
417 | @BUILD_EXAMPLES_TRUE@EDJS = $(EDCS:%.edc=%.edj) | 402 | @BUILD_EXAMPLES_TRUE@ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ |
418 | EXTRA_DIST = $(EDCS) \ | 403 | @BUILD_EXAMPLES_TRUE@ -DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" \ |
419 | $(srcdir)/bubble.png \ | 404 | @BUILD_EXAMPLES_TRUE@ @EDJE_CFLAGS@ |
420 | $(srcdir)/red.png \ | ||
421 | $(srcdir)/test.png \ | ||
422 | $(srcdir)/edje-basic.c \ | ||
423 | $(srcdir)/edje-swallow.c \ | ||
424 | $(srcdir)/edje-text.c \ | ||
425 | $(srcdir)/edje-table.c \ | ||
426 | $(srcdir)/edje-box.c \ | ||
427 | $(srcdir)/edje-box2.c \ | ||
428 | $(srcdir)/edje-drag.c \ | ||
429 | $(srcdir)/edje-signals-messages.c \ | ||
430 | $(srcdir)/edje-color-class.c \ | ||
431 | $(srcdir)/edje-perspective.c \ | ||
432 | $(srcdir)/edje-animations.c \ | ||
433 | $(srcdir)/sigtest.c | ||
434 | 405 | ||
406 | @BUILD_EXAMPLES_TRUE@LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ | ||
435 | all: all-am | 407 | all: all-am |
436 | 408 | ||
437 | .SUFFIXES: | 409 | .SUFFIXES: |
@@ -466,10 +438,10 @@ $(top_srcdir)/configure: $(am__configure_deps) | |||
466 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | 438 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) |
467 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | 439 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
468 | $(am__aclocal_m4_deps): | 440 | $(am__aclocal_m4_deps): |
469 | install-pkglibPROGRAMS: $(pkglib_PROGRAMS) | 441 | install-examplesPROGRAMS: $(examples_PROGRAMS) |
470 | @$(NORMAL_INSTALL) | 442 | @$(NORMAL_INSTALL) |
471 | test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" | 443 | test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" |
472 | @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ | 444 | @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ |
473 | for p in $$list; do echo "$$p $$p"; done | \ | 445 | for p in $$list; do echo "$$p $$p"; done | \ |
474 | sed 's/$(EXEEXT)$$//' | \ | 446 | sed 's/$(EXEEXT)$$//' | \ |
475 | while read p p1; do if test -f $$p || test -f $$p1; \ | 447 | while read p p1; do if test -f $$p || test -f $$p1; \ |
@@ -486,23 +458,23 @@ install-pkglibPROGRAMS: $(pkglib_PROGRAMS) | |||
486 | while read type dir files; do \ | 458 | while read type dir files; do \ |
487 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ | 459 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ |
488 | test -z "$$files" || { \ | 460 | test -z "$$files" || { \ |
489 | echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \ | 461 | echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \ |
490 | $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \ | 462 | $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \ |
491 | } \ | 463 | } \ |
492 | ; done | 464 | ; done |
493 | 465 | ||
494 | uninstall-pkglibPROGRAMS: | 466 | uninstall-examplesPROGRAMS: |
495 | @$(NORMAL_UNINSTALL) | 467 | @$(NORMAL_UNINSTALL) |
496 | @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ | 468 | @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ |
497 | files=`for p in $$list; do echo "$$p"; done | \ | 469 | files=`for p in $$list; do echo "$$p"; done | \ |
498 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ | 470 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ |
499 | -e 's/$$/$(EXEEXT)/' `; \ | 471 | -e 's/$$/$(EXEEXT)/' `; \ |
500 | test -n "$$list" || exit 0; \ | 472 | test -n "$$list" || exit 0; \ |
501 | echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \ | 473 | echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ |
502 | cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files | 474 | cd "$(DESTDIR)$(examplesdir)" && rm -f $$files |
503 | 475 | ||
504 | clean-pkglibPROGRAMS: | 476 | clean-examplesPROGRAMS: |
505 | @list='$(pkglib_PROGRAMS)'; test -n "$$list" || exit 0; \ | 477 | @list='$(examples_PROGRAMS)'; test -n "$$list" || exit 0; \ |
506 | echo " rm -f" $$list; \ | 478 | echo " rm -f" $$list; \ |
507 | rm -f $$list || exit $$?; \ | 479 | rm -f $$list || exit $$?; \ |
508 | test -n "$(EXEEXT)" || exit 0; \ | 480 | test -n "$(EXEEXT)" || exit 0; \ |
@@ -701,7 +673,7 @@ check-am: all-am | |||
701 | check: check-am | 673 | check: check-am |
702 | all-am: Makefile $(PROGRAMS) $(DATA) | 674 | all-am: Makefile $(PROGRAMS) $(DATA) |
703 | installdirs: | 675 | installdirs: |
704 | for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"; do \ | 676 | for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"; do \ |
705 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | 677 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ |
706 | done | 678 | done |
707 | install: install-am | 679 | install: install-am |
@@ -732,7 +704,7 @@ maintainer-clean-generic: | |||
732 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | 704 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) |
733 | clean: clean-am | 705 | clean: clean-am |
734 | 706 | ||
735 | clean-am: clean-generic clean-libtool clean-pkglibPROGRAMS \ | 707 | clean-am: clean-examplesPROGRAMS clean-generic clean-libtool \ |
736 | mostlyclean-am | 708 | mostlyclean-am |
737 | 709 | ||
738 | distclean: distclean-am | 710 | distclean: distclean-am |
@@ -753,13 +725,13 @@ info: info-am | |||
753 | 725 | ||
754 | info-am: | 726 | info-am: |
755 | 727 | ||
756 | install-data-am: install-filesDATA | 728 | install-data-am: install-examplesPROGRAMS install-filesDATA |
757 | 729 | ||
758 | install-dvi: install-dvi-am | 730 | install-dvi: install-dvi-am |
759 | 731 | ||
760 | install-dvi-am: | 732 | install-dvi-am: |
761 | 733 | ||
762 | install-exec-am: install-pkglibPROGRAMS | 734 | install-exec-am: |
763 | 735 | ||
764 | install-html: install-html-am | 736 | install-html: install-html-am |
765 | 737 | ||
@@ -799,28 +771,29 @@ ps: ps-am | |||
799 | 771 | ||
800 | ps-am: | 772 | ps-am: |
801 | 773 | ||
802 | uninstall-am: uninstall-filesDATA uninstall-pkglibPROGRAMS | 774 | uninstall-am: uninstall-examplesPROGRAMS uninstall-filesDATA |
803 | 775 | ||
804 | .MAKE: install-am install-strip | 776 | .MAKE: install-am install-strip |
805 | 777 | ||
806 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | 778 | .PHONY: CTAGS GTAGS all all-am check check-am clean \ |
807 | clean-libtool clean-pkglibPROGRAMS ctags distclean \ | 779 | clean-examplesPROGRAMS clean-generic clean-libtool ctags \ |
808 | distclean-compile distclean-generic distclean-libtool \ | 780 | distclean distclean-compile distclean-generic \ |
809 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | 781 | distclean-libtool distclean-tags distdir dvi dvi-am html \ |
810 | install install-am install-data install-data-am install-dvi \ | 782 | html-am info info-am install install-am install-data \ |
811 | install-dvi-am install-exec install-exec-am install-filesDATA \ | 783 | install-data-am install-dvi install-dvi-am \ |
812 | install-html install-html-am install-info install-info-am \ | 784 | install-examplesPROGRAMS install-exec install-exec-am \ |
813 | install-man install-pdf install-pdf-am install-pkglibPROGRAMS \ | 785 | install-filesDATA install-html install-html-am install-info \ |
786 | install-info-am install-man install-pdf install-pdf-am \ | ||
814 | install-ps install-ps-am install-strip installcheck \ | 787 | install-ps install-ps-am install-strip installcheck \ |
815 | installcheck-am installdirs maintainer-clean \ | 788 | installcheck-am installdirs maintainer-clean \ |
816 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | 789 | maintainer-clean-generic mostlyclean mostlyclean-compile \ |
817 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | 790 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ |
818 | tags uninstall uninstall-am uninstall-filesDATA \ | 791 | tags uninstall uninstall-am uninstall-examplesPROGRAMS \ |
819 | uninstall-pkglibPROGRAMS | 792 | uninstall-filesDATA |
820 | 793 | ||
821 | 794 | ||
822 | @BUILD_EXAMPLES_TRUE@.edc.edj: | 795 | .edc.edj: |
823 | @BUILD_EXAMPLES_TRUE@ $(edje_cc) -v -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) | 796 | $(edje_cc) -v -fd $(srcdir) -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) |
824 | 797 | ||
825 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | 798 | # Tell versions [3.59,3.63) of GNU make to not export all variables. |
826 | # Otherwise a system limit (for SysV at least) may be exceeded. | 799 | # Otherwise a system limit (for SysV at least) may be exceeded. |
diff --git a/libraries/edje/src/examples/Vera.ttf b/libraries/edje/src/examples/Vera.ttf new file mode 100644 index 0000000..58cd6b5 --- /dev/null +++ b/libraries/edje/src/examples/Vera.ttf | |||
Binary files differ | |||
diff --git a/libraries/edje/src/examples/lua_script.edc b/libraries/edje/src/examples/lua_script.edc index 24e8ebe..23c2926 100644 --- a/libraries/edje/src/examples/lua_script.edc +++ b/libraries/edje/src/examples/lua_script.edc | |||
@@ -104,6 +104,10 @@ collections { | |||
104 | print("lua::init ... " .. D.val); | 104 | print("lua::init ... " .. D.val); |
105 | edje.echo("lua::echo('hello world')"); | 105 | edje.echo("lua::echo('hello world')"); |
106 | 106 | ||
107 | --// How to check the edje version. | ||
108 | version = edje.version(); | ||
109 | print("The edje version number is " .. version.major .. "." .. version.minor); | ||
110 | |||
107 | --// actually add the timer to call mycb in 1.23 sec | 111 | --// actually add the timer to call mycb in 1.23 sec |
108 | D.tim = edje.timer(1.23, mycb); | 112 | D.tim = edje.timer(1.23, mycb); |
109 | D.tra = edje.transition(5.0, mycb3); | 113 | D.tra = edje.transition(5.0, mycb3); |
@@ -168,6 +172,14 @@ collections { | |||
168 | print(D.text:text()); | 172 | print(D.text:text()); |
169 | D.text:show(); | 173 | D.text:show(); |
170 | 174 | ||
175 | --// Put a few bogus API calls here to test the bogus API protection, | ||
176 | --// If the bogus API protection works, these should get ignored, but everything else runs smoothly. | ||
177 | --// Otherwise, the map is not done, the bubbles are not done, but the timers keep runinng. | ||
178 | bogus.failme(1, "two", D.rect); | ||
179 | temp = bogus.failme2(); | ||
180 | D.text.bogus(); | ||
181 | edje.bogus2(); | ||
182 | |||
171 | --// Fun with maps! | 183 | --// Fun with maps! |
172 | D.map = edje.map(4); --// 4 is the only supported map size at the moment. | 184 | D.map = edje.map(4); --// 4 is the only supported map size at the moment. |
173 | --// These all do the same thing. | 185 | --// These all do the same thing. |
diff --git a/libraries/edje/src/examples/multisense.edc b/libraries/edje/src/examples/multisense.edc new file mode 100644 index 0000000..5a3cf79 --- /dev/null +++ b/libraries/edje/src/examples/multisense.edc | |||
@@ -0,0 +1,139 @@ | |||
1 | #if 0 | ||
2 | collections { | ||
3 | sounds { | ||
4 | sample { | ||
5 | name: "sound_name1" RAW; | ||
6 | source: "8806__jovica__basic-sine-wave-g-1.wav"; | ||
7 | // source: "sample.wav"; | ||
8 | // source: "sample-flac10k.wav"; | ||
9 | // source: "sample-flac10k-mono.wav"; | ||
10 | } | ||
11 | // sample { | ||
12 | // name: "sound_name2" COMP; | ||
13 | // source: "sample.wav"; | ||
14 | // } | ||
15 | /* | ||
16 | sample { | ||
17 | name: "sound_name3" LOSSY 0.5; | ||
18 | source: "sample.wav"; | ||
19 | } | ||
20 | sample { | ||
21 | name: "sound_name4" AS_IS; | ||
22 | source: "sample.wav"; | ||
23 | } | ||
24 | */ | ||
25 | sample { | ||
26 | // name: "sound_name5" AS_IS; | ||
27 | // name: "sound_name5" COMP; | ||
28 | name: "sound_name5" RAW; | ||
29 | // source: "sample-ogg.wav"; | ||
30 | source: "sample-ogg-mono.wav"; | ||
31 | // source: "sample-ogg10k.wav"; | ||
32 | // source: "sample-flac10k.wav"; | ||
33 | // source: "sample-flac10k-mono.wav"; | ||
34 | } | ||
35 | sample { | ||
36 | name: "sound_name6" AS_IS; | ||
37 | // name: "sound_name6" LOSSY 45.0; | ||
38 | source: "sample-flac44k-mono.wav"; | ||
39 | // source: "sample-flac.wav"; | ||
40 | // source: "sample.ogg"; | ||
41 | } | ||
42 | tone: "tone-name" 2600; | ||
43 | } | ||
44 | group { | ||
45 | name: "example_group"; | ||
46 | parts { | ||
47 | part { | ||
48 | name: "sample_bg"; | ||
49 | type: RECT; | ||
50 | mouse_events: 1; | ||
51 | description { | ||
52 | state: "default" 0.0; | ||
53 | min: 300 150; | ||
54 | max: 300 150; | ||
55 | color: 200 200 200 100; | ||
56 | align: 0.5 0.0; | ||
57 | rel1 { | ||
58 | relative: 0.0 0.0; | ||
59 | } | ||
60 | } | ||
61 | } | ||
62 | part { | ||
63 | name: "sample_text"; | ||
64 | type: TEXT; | ||
65 | mouse_events: 1; | ||
66 | repeat_events: 1; | ||
67 | description { | ||
68 | state: "default" 0.0; | ||
69 | rel1.to: "sample_bg"; | ||
70 | rel2.to: "sample_bg"; | ||
71 | text { | ||
72 | font: "Sans"; | ||
73 | size: 20; | ||
74 | text: "Play Sound Sample"; | ||
75 | } | ||
76 | } | ||
77 | } | ||
78 | part { | ||
79 | name: "tone_bg"; | ||
80 | type: RECT; | ||
81 | mouse_events: 1; | ||
82 | description { | ||
83 | state: "default" 0.0; | ||
84 | min: 300 150; | ||
85 | max: 300 150; | ||
86 | align: 0.5 0.0; | ||
87 | color: 180 180 180 100; | ||
88 | rel1 { | ||
89 | relative: 0.0 1.0; | ||
90 | to: "sample_bg"; | ||
91 | } | ||
92 | } | ||
93 | } | ||
94 | part { | ||
95 | name: "tone_text"; | ||
96 | type: TEXT; | ||
97 | mouse_events: 1; | ||
98 | repeat_events : 1; | ||
99 | description { | ||
100 | state: "default" 0.0; | ||
101 | rel1.to: "tone_bg"; | ||
102 | rel2.to: "tone_bg"; | ||
103 | text { | ||
104 | font: "Sans"; | ||
105 | size: 20; | ||
106 | text: "Play Tone"; | ||
107 | } | ||
108 | } | ||
109 | } | ||
110 | programs { | ||
111 | program { | ||
112 | name: "click_sample1"; | ||
113 | signal: "mouse,down,1"; | ||
114 | source: "sample_bg"; | ||
115 | action: PLAY_SAMPLE "sound_name1" 1.0; | ||
116 | } | ||
117 | program { | ||
118 | name: "click_sample2"; | ||
119 | signal: "mouse,down,2"; | ||
120 | source: "sample_bg"; | ||
121 | action: PLAY_SAMPLE "sound_name5" 1.0; | ||
122 | } | ||
123 | program { | ||
124 | name: "click_sample3"; | ||
125 | signal: "mouse,down,3"; | ||
126 | source: "sample_bg"; | ||
127 | action: PLAY_SAMPLE "sound_name6" 1.0; | ||
128 | } | ||
129 | program { | ||
130 | name: "click_tone"; | ||
131 | signal: "mouse,down,1"; | ||
132 | source: "tone_bg"; | ||
133 | action: PLAY_TONE "tone-name" 0.1; | ||
134 | } | ||
135 | } | ||
136 | } | ||
137 | } | ||
138 | } | ||
139 | #endif | ||
diff --git a/libraries/edje/src/examples/signals-messages.edc b/libraries/edje/src/examples/signals-messages.edc index 45d9c58..b251368 100644 --- a/libraries/edje/src/examples/signals-messages.edc +++ b/libraries/edje/src/examples/signals-messages.edc | |||
@@ -105,10 +105,10 @@ collections { | |||
105 | if ((type == MSG_INT_SET) && (id == MSG_COLOR)) { | 105 | if ((type == MSG_INT_SET) && (id == MSG_COLOR)) { |
106 | new r, g, b, a; | 106 | new r, g, b, a; |
107 | 107 | ||
108 | r = getarg(3); | 108 | r = getarg(2); |
109 | g = getarg(4); | 109 | g = getarg(3); |
110 | b = getarg(5); | 110 | b = getarg(4); |
111 | a = getarg(6); | 111 | a = getarg(5); |
112 | 112 | ||
113 | set_color_class("cc", r, g, b, a); | 113 | set_color_class("cc", r, g, b, a); |
114 | } | 114 | } |
diff --git a/libraries/edje/src/lib/Edje.h b/libraries/edje/src/lib/Edje.h index c8094b4..6413014 100644 --- a/libraries/edje/src/lib/Edje.h +++ b/libraries/edje/src/lib/Edje.h | |||
@@ -377,6 +377,13 @@ part of Edje's API: | |||
377 | @author Sebastian Dransfeld <sd@@tango.flipp.net> | 377 | @author Sebastian Dransfeld <sd@@tango.flipp.net> |
378 | @author Tom Hacohen <tom@@stosb.com> | 378 | @author Tom Hacohen <tom@@stosb.com> |
379 | @author Aharon Hillel <a.hillel@@partner.samsung.com> | 379 | @author Aharon Hillel <a.hillel@@partner.samsung.com> |
380 | @author Shilpa Singh <shilpa.singh@samsung.com> <shilpasingh.o@gmail.com> | ||
381 | @author Mike Blumenkrantz <michael.blumenkrantz@gmail.com | ||
382 | @author Jaehwan Kim <jae.hwan.kim@samsung.com> | ||
383 | @author billiob (Boris Faure) <billiob@gmail.com> | ||
384 | @author Govindaraju SM <govi.sm@samsung.com> <govism@gmail.com> | ||
385 | @author Prince Kumar Dubey <prince.dubey@samsung.com> <prince.dubey@gmail.com> | ||
386 | @author David Seikel <onefang at gmail.com> | ||
380 | 387 | ||
381 | Please contact <enlightenment-devel@lists.sourceforge.net> to get in | 388 | Please contact <enlightenment-devel@lists.sourceforge.net> to get in |
382 | contact with the developers and maintainers. | 389 | contact with the developers and maintainers. |
@@ -472,7 +479,7 @@ extern "C" { | |||
472 | #endif | 479 | #endif |
473 | 480 | ||
474 | #define EDJE_VERSION_MAJOR 1 | 481 | #define EDJE_VERSION_MAJOR 1 |
475 | #define EDJE_VERSION_MINOR 0 | 482 | #define EDJE_VERSION_MINOR 2 |
476 | 483 | ||
477 | typedef struct _Edje_Version | 484 | typedef struct _Edje_Version |
478 | { | 485 | { |
@@ -794,7 +801,7 @@ typedef enum _Edje_External_Param_Flags | |||
794 | EDJE_EXTERNAL_PARAM_FLAGS_STATE) /**< Convenience flag that sets property as GET, SET and STATE. */ | 801 | EDJE_EXTERNAL_PARAM_FLAGS_STATE) /**< Convenience flag that sets property as GET, SET and STATE. */ |
795 | } Edje_External_Param_Flags; | 802 | } Edje_External_Param_Flags; |
796 | 803 | ||
797 | typedef enum | 804 | typedef enum _Edje_Input_Panel_Layout |
798 | { | 805 | { |
799 | EDJE_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */ | 806 | EDJE_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */ |
800 | EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */ | 807 | EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */ |
@@ -804,7 +811,10 @@ typedef enum | |||
804 | EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP layout */ | 811 | EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP layout */ |
805 | EDJE_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */ | 812 | EDJE_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */ |
806 | EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */ | 813 | EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */ |
807 | EDJE_INPUT_PANEL_LAYOUT_INVALID | 814 | EDJE_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */ |
815 | EDJE_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout @since 1.2 */ | ||
816 | EDJE_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout @since 1.2 */ | ||
817 | EDJE_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */ | ||
808 | } Edje_Input_Panel_Layout; | 818 | } Edje_Input_Panel_Layout; |
809 | 819 | ||
810 | /** | 820 | /** |
@@ -1650,8 +1660,21 @@ EAPI void edje_box_layout_register (const char *name, Evas_Object | |||
1650 | * } | 1660 | * } |
1651 | * | 1661 | * |
1652 | * @endcode | 1662 | * @endcode |
1663 | * | ||
1664 | * @note You can get a callback every time edje re-calculates the object | ||
1665 | * (either due to animation or some kind of signal or input). This is called | ||
1666 | * in-line just after the recalculation has occured. It is a good idea not | ||
1667 | * to go and delete or alter the object inside this callbacks, simply make | ||
1668 | * a note that the recalculation has taken place and then do somethnig about | ||
1669 | * it outside the callback. to register a callback use code like: | ||
1670 | * | ||
1671 | * @code | ||
1672 | * evas_object_smart_callback_add(edje_obj, "recalc", my_cb, my_cb_data); | ||
1673 | * @endcode | ||
1674 | * | ||
1675 | * @see evas_object_smart_callback_add() | ||
1653 | * | 1676 | * |
1654 | * @note before creating the first Edje object in your code, remember | 1677 | * @note Before creating the first Edje object in your code, remember |
1655 | * to initialize the library, with edje_init(), or unexpected behavior | 1678 | * to initialize the library, with edje_init(), or unexpected behavior |
1656 | * might occur. | 1679 | * might occur. |
1657 | */ | 1680 | */ |
@@ -2757,12 +2780,15 @@ EAPI Eina_Bool edje_object_part_text_cursor_is_visible_format_get(const E | |||
2757 | /** | 2780 | /** |
2758 | * @brief Returns the content (char) at the cursor position. | 2781 | * @brief Returns the content (char) at the cursor position. |
2759 | * @see evas_textblock_cursor_content_get | 2782 | * @see evas_textblock_cursor_content_get |
2783 | * | ||
2784 | * You must free the return (if not NULL) after you are done with it. | ||
2760 | * | 2785 | * |
2761 | * @param obj A valid Evas_Object handle | 2786 | * @param obj A valid Evas_Object handle |
2762 | * @param part The part name | 2787 | * @param part The part name |
2763 | * @param cur The cursor to use | 2788 | * @param cur The cursor to use |
2789 | * @return The character string pointed to (may be a multi-byte utf8 sequence) terminated by a nul byte. | ||
2764 | */ | 2790 | */ |
2765 | EAPI const char *edje_object_part_text_cursor_content_get (const Evas_Object *obj, const char *part, Edje_Cursor cur); | 2791 | EAPI char *edje_object_part_text_cursor_content_get (const Evas_Object *obj, const char *part, Edje_Cursor cur); |
2766 | 2792 | ||
2767 | /** | 2793 | /** |
2768 | * @brief Sets the cursor position to the given value | 2794 | * @brief Sets the cursor position to the given value |
@@ -2941,7 +2967,9 @@ EAPI Eina_Bool edje_object_part_swallow (Evas_Object *obj, const c | |||
2941 | * | 2967 | * |
2942 | * Causes the edje to regurgitate a previously swallowed object. :) | 2968 | * Causes the edje to regurgitate a previously swallowed object. :) |
2943 | * | 2969 | * |
2944 | * @note @p obj_swallow will @b not be deleted. | 2970 | * @note @p obj_swallow will @b not be deleted or hidden. |
2971 | * @note @p obj_swallow may appear shown on the evas depending on its state when | ||
2972 | * it got unswallowed. Make sure you delete it or hide it if you do not want it to. | ||
2945 | */ | 2973 | */ |
2946 | EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow); | 2974 | EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow); |
2947 | 2975 | ||
diff --git a/libraries/edje/src/lib/Makefile.in b/libraries/edje/src/lib/Makefile.in index cf73390..e67d90c 100644 --- a/libraries/edje/src/lib/Makefile.in +++ b/libraries/edje/src/lib/Makefile.in | |||
@@ -230,8 +230,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
230 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 230 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
231 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 231 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
232 | PKG_CONFIG = @PKG_CONFIG@ | 232 | PKG_CONFIG = @PKG_CONFIG@ |
233 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
234 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
235 | PYTHON = @PYTHON@ | 233 | PYTHON = @PYTHON@ |
236 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | 234 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ |
237 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | 235 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ |
diff --git a/libraries/edje/src/lib/edje_cache.c b/libraries/edje/src/lib/edje_cache.c index a8b355f..0ce6b30 100644 --- a/libraries/edje/src/lib/edje_cache.c +++ b/libraries/edje/src/lib/edje_cache.c | |||
@@ -128,18 +128,11 @@ _edje_file_coll_open(Edje_File *edf, const char *coll) | |||
128 | } | 128 | } |
129 | 129 | ||
130 | static Edje_File * | 130 | static Edje_File * |
131 | _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret) | 131 | _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, time_t mtime) |
132 | { | 132 | { |
133 | Edje_File *edf; | 133 | Edje_File *edf; |
134 | Edje_Part_Collection *edc; | 134 | Edje_Part_Collection *edc; |
135 | Eet_File *ef; | 135 | Eet_File *ef; |
136 | struct stat st; | ||
137 | |||
138 | if (stat(file, &st) != 0) | ||
139 | { | ||
140 | *error_ret = EDJE_LOAD_ERROR_DOES_NOT_EXIST; | ||
141 | return NULL; | ||
142 | } | ||
143 | 136 | ||
144 | ef = eet_open(file, EET_FILE_MODE_READ); | 137 | ef = eet_open(file, EET_FILE_MODE_READ); |
145 | if (!ef) | 138 | if (!ef) |
@@ -156,7 +149,7 @@ _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Co | |||
156 | } | 149 | } |
157 | 150 | ||
158 | edf->ef = ef; | 151 | edf->ef = ef; |
159 | edf->mtime = st.st_mtime; | 152 | edf->mtime = mtime; |
160 | 153 | ||
161 | if (edf->version != EDJE_FILE_VERSION) | 154 | if (edf->version != EDJE_FILE_VERSION) |
162 | { | 155 | { |
@@ -262,7 +255,7 @@ open_new: | |||
262 | if (!_edje_file_hash) | 255 | if (!_edje_file_hash) |
263 | _edje_file_hash = eina_hash_string_small_new(NULL); | 256 | _edje_file_hash = eina_hash_string_small_new(NULL); |
264 | 257 | ||
265 | edf = _edje_file_open(file, coll, error_ret, edc_ret); | 258 | edf = _edje_file_open(file, coll, error_ret, edc_ret, st.st_mtime); |
266 | if (!edf) | 259 | if (!edf) |
267 | return NULL; | 260 | return NULL; |
268 | 261 | ||
diff --git a/libraries/edje/src/lib/edje_calc.c b/libraries/edje/src/lib/edje_calc.c index d9fd51d..213e266 100644 --- a/libraries/edje/src/lib/edje_calc.c +++ b/libraries/edje/src/lib/edje_calc.c | |||
@@ -8,7 +8,8 @@ static void _edje_part_recalc_single(Edje *ed, Edje_Real_Part *ep, | |||
8 | Edje_Real_Part *center, Edje_Real_Part *light, Edje_Real_Part *persp, | 8 | Edje_Real_Part *center, Edje_Real_Part *light, Edje_Real_Part *persp, |
9 | Edje_Real_Part *rel1_to_x, Edje_Real_Part *rel1_to_y, | 9 | Edje_Real_Part *rel1_to_x, Edje_Real_Part *rel1_to_y, |
10 | Edje_Real_Part *rel2_to_x, Edje_Real_Part *rel2_to_y, | 10 | Edje_Real_Part *rel2_to_x, Edje_Real_Part *rel2_to_y, |
11 | Edje_Real_Part *confine_to, Edje_Calc_Params *params); | 11 | Edje_Real_Part *confine_to, Edje_Calc_Params *params, |
12 | FLOAT_T pos); | ||
12 | 13 | ||
13 | void | 14 | void |
14 | _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2) | 15 | _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2) |
@@ -115,6 +116,7 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T | |||
115 | ep->description_pos = npos; | 116 | ep->description_pos = npos; |
116 | 117 | ||
117 | ed->dirty = 1; | 118 | ed->dirty = 1; |
119 | ed->recalc_call = 1; | ||
118 | #ifdef EDJE_CALC_CACHE | 120 | #ifdef EDJE_CALC_CACHE |
119 | ep->invalidate = 1; | 121 | ep->invalidate = 1; |
120 | #endif | 122 | #endif |
@@ -304,6 +306,179 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *name, | |||
304 | return ret; | 306 | return ret; |
305 | } | 307 | } |
306 | 308 | ||
309 | static int | ||
310 | _edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps, Edje_Part_Description_Image *st, Edje_Part_Image_Id *imid) | ||
311 | { | ||
312 | Edje_Image_Directory_Set_Entry *entry; | ||
313 | Edje_Image_Directory_Set *set = NULL; | ||
314 | Eina_List *l; | ||
315 | int w = 0; | ||
316 | int h = 0; | ||
317 | int id; | ||
318 | |||
319 | if (!st && !imid) | ||
320 | return -1; | ||
321 | |||
322 | if (st && !st->image.set) | ||
323 | return st->image.id; | ||
324 | |||
325 | if (imid && !imid->set) | ||
326 | return imid->id; | ||
327 | |||
328 | if (imid) | ||
329 | id = imid->id; | ||
330 | else | ||
331 | id = st->image.id; | ||
332 | |||
333 | evas_object_geometry_get(obj, NULL, NULL, &w, &h); | ||
334 | |||
335 | if (eps && *eps) | ||
336 | { | ||
337 | if ((*eps)->id == id) | ||
338 | set = (*eps)->set; | ||
339 | |||
340 | if (set) | ||
341 | if ((*eps)->entry->size.min.w <= w && w <= (*eps)->entry->size.max.w) | ||
342 | if ((*eps)->entry->size.min.h <= h && h <= (*eps)->entry->size.max.h) | ||
343 | return (*eps)->entry->id; | ||
344 | } | ||
345 | |||
346 | if (!set) | ||
347 | set = ed->file->image_dir->sets + id; | ||
348 | |||
349 | EINA_LIST_FOREACH(set->entries, l, entry) | ||
350 | { | ||
351 | if (entry->size.min.w <= w && w <= entry->size.max.w) | ||
352 | if (entry->size.min.h <= h && h <= entry->size.max.h) | ||
353 | { | ||
354 | if (eps) | ||
355 | { | ||
356 | if (!*eps) | ||
357 | *eps = calloc(1, sizeof (Edje_Real_Part_Set)); | ||
358 | |||
359 | if (*eps) | ||
360 | { | ||
361 | (*eps)->entry = entry; | ||
362 | (*eps)->set = set; | ||
363 | (*eps)->id = id; | ||
364 | } | ||
365 | } | ||
366 | return entry->id; | ||
367 | } | ||
368 | } | ||
369 | |||
370 | return -1; | ||
371 | } | ||
372 | |||
373 | static void | ||
374 | _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T pos) | ||
375 | { | ||
376 | int image_id; | ||
377 | int image_count, image_num; | ||
378 | |||
379 | image_id = _edje_image_find(ep->object, ed, | ||
380 | &ep->param1.set, | ||
381 | (Edje_Part_Description_Image*) ep->param1.description, | ||
382 | NULL); | ||
383 | if (image_id < 0) | ||
384 | { | ||
385 | Edje_Image_Directory_Entry *ie; | ||
386 | |||
387 | if (!ed->file->image_dir) ie = NULL; | ||
388 | else ie = ed->file->image_dir->entries + (-image_id) - 1; | ||
389 | if ((ie) && | ||
390 | (ie->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) && | ||
391 | (ie->entry)) | ||
392 | { | ||
393 | evas_object_image_file_set(ep->object, ie->entry, NULL); | ||
394 | } | ||
395 | } | ||
396 | else | ||
397 | { | ||
398 | image_count = 2; | ||
399 | if (ep->param2) | ||
400 | image_count += ((Edje_Part_Description_Image*) ep->param2->description)->image.tweens_count; | ||
401 | image_num = TO_INT(MUL(pos, SUB(FROM_INT(image_count), | ||
402 | FROM_DOUBLE(0.5)))); | ||
403 | if (image_num > (image_count - 1)) | ||
404 | image_num = image_count - 1; | ||
405 | if (image_num == 0) | ||
406 | { | ||
407 | image_id = _edje_image_find(ep->object, ed, | ||
408 | &ep->param1.set, | ||
409 | (Edje_Part_Description_Image*) ep->param1.description, | ||
410 | NULL); | ||
411 | } | ||
412 | else | ||
413 | if (ep->param2) | ||
414 | { | ||
415 | if (image_num == (image_count - 1)) | ||
416 | { | ||
417 | image_id = _edje_image_find(ep->object, ed, | ||
418 | &ep->param2->set, | ||
419 | (Edje_Part_Description_Image*) ep->param2->description, | ||
420 | NULL); | ||
421 | } | ||
422 | else | ||
423 | { | ||
424 | Edje_Part_Image_Id *imid; | ||
425 | |||
426 | imid = ((Edje_Part_Description_Image*) ep->param2->description)->image.tweens[image_num - 1]; | ||
427 | image_id = _edje_image_find(ep->object, ed, NULL, NULL, imid); | ||
428 | } | ||
429 | } | ||
430 | if (image_id < 0) | ||
431 | { | ||
432 | ERR("¨Part \"%s\" has description, " | ||
433 | "\"%s\" %3.3f with a missing image id!!!", | ||
434 | ep->part->name, | ||
435 | ep->param1.description->state.name, | ||
436 | ep->param1.description->state.value); | ||
437 | } | ||
438 | else | ||
439 | { | ||
440 | char buf[1024]; | ||
441 | |||
442 | /* Replace snprint("edje/images/%i") == memcpy + itoa */ | ||
443 | #define IMAGES "edje/images/" | ||
444 | memcpy(buf, IMAGES, strlen(IMAGES)); | ||
445 | eina_convert_itoa(image_id, buf + strlen(IMAGES)); /* No need to check length as 2³² need only 10 characteres. */ | ||
446 | |||
447 | evas_object_image_file_set(ep->object, ed->file->path, buf); | ||
448 | if (evas_object_image_load_error_get(ep->object) != EVAS_LOAD_ERROR_NONE) | ||
449 | { | ||
450 | ERR("Error loading image collection \"%s\" from " | ||
451 | "file \"%s\". Missing EET Evas loader module?", | ||
452 | buf, ed->file->path); | ||
453 | switch (evas_object_image_load_error_get(ep->object)) | ||
454 | { | ||
455 | case EVAS_LOAD_ERROR_GENERIC: | ||
456 | ERR("Error type: EVAS_LOAD_ERROR_GENERIC"); | ||
457 | break; | ||
458 | case EVAS_LOAD_ERROR_DOES_NOT_EXIST: | ||
459 | ERR("Error type: EVAS_LOAD_ERROR_DOES_NOT_EXIST"); | ||
460 | break; | ||
461 | case EVAS_LOAD_ERROR_PERMISSION_DENIED: | ||
462 | ERR("Error type: EVAS_LOAD_ERROR_PERMISSION_DENIED"); | ||
463 | break; | ||
464 | case EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED: | ||
465 | ERR("Error type: EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED"); | ||
466 | break; | ||
467 | case EVAS_LOAD_ERROR_CORRUPT_FILE: | ||
468 | ERR("Error type: EVAS_LOAD_ERROR_CORRUPT_FILE"); | ||
469 | break; | ||
470 | case EVAS_LOAD_ERROR_UNKNOWN_FORMAT: | ||
471 | ERR("Error type: EVAS_LOAD_ERROR_UNKNOWN_FORMAT"); | ||
472 | break; | ||
473 | default: | ||
474 | ERR("Error type: ???"); | ||
475 | break; | ||
476 | } | ||
477 | } | ||
478 | } | ||
479 | } | ||
480 | } | ||
481 | |||
307 | static void | 482 | static void |
308 | _edje_real_part_rel_to_apply(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part_State *state) | 483 | _edje_real_part_rel_to_apply(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part_State *state) |
309 | { | 484 | { |
@@ -398,6 +573,7 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl | |||
398 | _edje_external_recalc_apply(ed, ep, NULL, chosen_desc); | 573 | _edje_external_recalc_apply(ed, ep, NULL, chosen_desc); |
399 | 574 | ||
400 | ed->dirty = 1; | 575 | ed->dirty = 1; |
576 | ed->recalc_call = 1; | ||
401 | #ifdef EDJE_CALC_CACHE | 577 | #ifdef EDJE_CALC_CACHE |
402 | ep->invalidate = 1; | 578 | ep->invalidate = 1; |
403 | #endif | 579 | #endif |
@@ -423,17 +599,23 @@ _edje_recalc(Edje *ed) | |||
423 | return; | 599 | return; |
424 | } | 600 | } |
425 | } | 601 | } |
426 | if (ed->postponed) return; | 602 | // XXX: dont need this with current smart calc infra. remove me later |
427 | evas_object_smart_changed(ed->obj); | 603 | // if (ed->postponed) return; |
428 | ed->postponed = 1; | 604 | // if (!ed->calc_only) |
605 | evas_object_smart_changed(ed->obj); | ||
606 | // XXX: dont need this with current smart calc infra. remove me later | ||
607 | // ed->postponed = 1; | ||
429 | } | 608 | } |
430 | 609 | ||
431 | void | 610 | void |
432 | _edje_recalc_do(Edje *ed) | 611 | _edje_recalc_do(Edje *ed) |
433 | { | 612 | { |
434 | unsigned int i; | 613 | unsigned int i; |
614 | Eina_Bool need_calc; | ||
435 | 615 | ||
436 | ed->postponed = 0; | 616 | // XXX: dont need this with current smart calc infra. remove me later |
617 | // ed->postponed = 0; | ||
618 | need_calc = evas_object_smart_need_recalculate_get(ed->obj); | ||
437 | evas_object_smart_need_recalculate_set(ed->obj, 0); | 619 | evas_object_smart_need_recalculate_set(ed->obj, 0); |
438 | if (!ed->dirty) return; | 620 | if (!ed->dirty) return; |
439 | ed->have_mapped_part = 0; | 621 | ed->have_mapped_part = 0; |
@@ -460,6 +642,14 @@ _edje_recalc_do(Edje *ed) | |||
460 | ed->all_part_change = 0; | 642 | ed->all_part_change = 0; |
461 | ed->text_part_change = 0; | 643 | ed->text_part_change = 0; |
462 | #endif | 644 | #endif |
645 | if (!ed->calc_only) | ||
646 | { | ||
647 | if (ed->recalc_call) | ||
648 | evas_object_smart_callback_call(ed->obj, "recalc", NULL); | ||
649 | } | ||
650 | else | ||
651 | evas_object_smart_need_recalculate_set(ed->obj, need_calc); | ||
652 | ed->recalc_call = 0; | ||
463 | } | 653 | } |
464 | 654 | ||
465 | void | 655 | void |
@@ -527,6 +717,7 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y) | |||
527 | ep->drag->tmp.x = 0; | 717 | ep->drag->tmp.x = 0; |
528 | ep->drag->need_reset = 0; | 718 | ep->drag->need_reset = 0; |
529 | ed->dirty = 1; | 719 | ed->dirty = 1; |
720 | ed->recalc_call = 1; | ||
530 | } | 721 | } |
531 | 722 | ||
532 | if (ep->drag->y != y || ep->drag->tmp.y) | 723 | if (ep->drag->y != y || ep->drag->tmp.y) |
@@ -535,6 +726,7 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y) | |||
535 | ep->drag->tmp.y = 0; | 726 | ep->drag->tmp.y = 0; |
536 | ep->drag->need_reset = 0; | 727 | ep->drag->need_reset = 0; |
537 | ed->dirty = 1; | 728 | ed->dirty = 1; |
729 | ed->recalc_call = 1; | ||
538 | } | 730 | } |
539 | 731 | ||
540 | #ifdef EDJE_CALC_CACHE | 732 | #ifdef EDJE_CALC_CACHE |
@@ -598,11 +790,13 @@ _edje_part_recalc_single_rel(Edje *ed, | |||
598 | } | 790 | } |
599 | 791 | ||
600 | static Edje_Internal_Aspect | 792 | static Edje_Internal_Aspect |
601 | _edje_part_recalc_single_aspect(Edje_Real_Part *ep, | 793 | _edje_part_recalc_single_aspect(Edje *ed, |
794 | Edje_Real_Part *ep, | ||
602 | Edje_Part_Description_Common *desc, | 795 | Edje_Part_Description_Common *desc, |
603 | Edje_Calc_Params *params, | 796 | Edje_Calc_Params *params, |
604 | int *minw, int *minh, | 797 | int *minw, int *minh, |
605 | int *maxw, int *maxh) | 798 | int *maxw, int *maxh, |
799 | FLOAT_T pos) | ||
606 | { | 800 | { |
607 | Edje_Internal_Aspect apref = EDJE_ASPECT_PREFER_NONE; | 801 | Edje_Internal_Aspect apref = EDJE_ASPECT_PREFER_NONE; |
608 | FLOAT_T aspect, amax, amin; | 802 | FLOAT_T aspect, amax, amin; |
@@ -612,6 +806,17 @@ _edje_part_recalc_single_aspect(Edje_Real_Part *ep, | |||
612 | else aspect = DIV(FROM_INT(params->w), FROM_INT(params->h)); | 806 | else aspect = DIV(FROM_INT(params->w), FROM_INT(params->h)); |
613 | amax = desc->aspect.max; | 807 | amax = desc->aspect.max; |
614 | amin = desc->aspect.min; | 808 | amin = desc->aspect.min; |
809 | if (desc->aspect.prefer == EDJE_ASPECT_PREFER_SOURCE && | ||
810 | ep->part->type == EDJE_PART_TYPE_IMAGE) | ||
811 | { | ||
812 | Evas_Coord w, h; | ||
813 | |||
814 | /* We only need pose to find the right image that would be displayed, | ||
815 | and the right aspect ratio in that case */ | ||
816 | _edje_real_part_image_set(ed, ep, pos); | ||
817 | evas_object_image_size_get(ep->object, &w, &h); | ||
818 | amin = amax = DIV(FROM_INT(w), FROM_INT(h)); | ||
819 | } | ||
615 | if ((ep->swallow_params.aspect.w > 0) && | 820 | if ((ep->swallow_params.aspect.w > 0) && |
616 | (ep->swallow_params.aspect.h > 0)) | 821 | (ep->swallow_params.aspect.h > 0)) |
617 | amin = amax = | 822 | amin = amax = |
@@ -693,6 +898,7 @@ _edje_part_recalc_single_aspect(Edje_Real_Part *ep, | |||
693 | if ((amin > ZERO) && (aspect < amin)) | 898 | if ((amin > ZERO) && (aspect < amin)) |
694 | new_h = DIV(FROM_INT(params->w), amin); | 899 | new_h = DIV(FROM_INT(params->w), amin); |
695 | break; | 900 | break; |
901 | case EDJE_ASPECT_PREFER_SOURCE: | ||
696 | case EDJE_ASPECT_PREFER_BOTH: | 902 | case EDJE_ASPECT_PREFER_BOTH: |
697 | /* keep both dimensions in check */ | 903 | /* keep both dimensions in check */ |
698 | /* adjust for max aspect (width / height) */ | 904 | /* adjust for max aspect (width / height) */ |
@@ -1255,6 +1461,7 @@ _edje_part_recalc_single_min(Edje_Part_Description_Common *desc, | |||
1255 | minh = tmp; | 1461 | minh = tmp; |
1256 | break; | 1462 | break; |
1257 | } | 1463 | } |
1464 | case EDJE_ASPECT_PREFER_SOURCE: | ||
1258 | case EDJE_ASPECT_PREFER_BOTH: | 1465 | case EDJE_ASPECT_PREFER_BOTH: |
1259 | tmp = minh * params->w / h; | 1466 | tmp = minh * params->w / h; |
1260 | if (tmp >= minw) | 1467 | if (tmp >= minw) |
@@ -1321,6 +1528,7 @@ _edje_part_recalc_single_max(Edje_Part_Description_Common *desc, | |||
1321 | maxh = tmp; | 1528 | maxh = tmp; |
1322 | break; | 1529 | break; |
1323 | } | 1530 | } |
1531 | case EDJE_ASPECT_PREFER_SOURCE: | ||
1324 | case EDJE_ASPECT_PREFER_BOTH: | 1532 | case EDJE_ASPECT_PREFER_BOTH: |
1325 | tmp = maxh * params->w / h; | 1533 | tmp = maxh * params->w / h; |
1326 | if (tmp <= maxw) | 1534 | if (tmp <= maxw) |
@@ -1481,6 +1689,15 @@ _edje_part_recalc_single_min_max(FLOAT_T sc, | |||
1481 | if (ep->swallow_params.min.w > desc->min.w) | 1689 | if (ep->swallow_params.min.w > desc->min.w) |
1482 | *minw = ep->swallow_params.min.w; | 1690 | *minw = ep->swallow_params.min.w; |
1483 | 1691 | ||
1692 | if (ep->edje->calc_only) | ||
1693 | { | ||
1694 | if (desc->minmul.have) | ||
1695 | { | ||
1696 | FLOAT_T mmw = desc->minmul.w; | ||
1697 | if (mmw != FROM_INT(1)) *minw = TO_INT(SCALE(mmw, *minw)); | ||
1698 | } | ||
1699 | } | ||
1700 | |||
1484 | /* XXX TODO: remove need of EDJE_INF_MAX_W, see edje_util.c */ | 1701 | /* XXX TODO: remove need of EDJE_INF_MAX_W, see edje_util.c */ |
1485 | if ((ep->swallow_params.max.w <= 0) || | 1702 | if ((ep->swallow_params.max.w <= 0) || |
1486 | (ep->swallow_params.max.w == EDJE_INF_MAX_W)) | 1703 | (ep->swallow_params.max.w == EDJE_INF_MAX_W)) |
@@ -1508,6 +1725,8 @@ _edje_part_recalc_single_min_max(FLOAT_T sc, | |||
1508 | *maxw = ep->swallow_params.max.w; | 1725 | *maxw = ep->swallow_params.max.w; |
1509 | } | 1726 | } |
1510 | } | 1727 | } |
1728 | if ((ep->edje->calc_only) && (desc->minmul.have) && | ||
1729 | (desc->minmul.w != FROM_INT(1))) *maxw = *minw; | ||
1511 | if (*maxw >= 0) | 1730 | if (*maxw >= 0) |
1512 | { | 1731 | { |
1513 | if (*maxw < *minw) *maxw = *minw; | 1732 | if (*maxw < *minw) *maxw = *minw; |
@@ -1518,6 +1737,16 @@ _edje_part_recalc_single_min_max(FLOAT_T sc, | |||
1518 | if (ep->swallow_params.min.h > desc->min.h) | 1737 | if (ep->swallow_params.min.h > desc->min.h) |
1519 | *minh = ep->swallow_params.min.h; | 1738 | *minh = ep->swallow_params.min.h; |
1520 | 1739 | ||
1740 | if (ep->edje->calc_only) | ||
1741 | { | ||
1742 | if (desc->minmul.have) | ||
1743 | { | ||
1744 | FLOAT_T mmh = desc->minmul.h; | ||
1745 | if (mmh != FROM_INT(1)) *minh = TO_INT(SCALE(mmh, *minh)); | ||
1746 | } | ||
1747 | } | ||
1748 | |||
1749 | |||
1521 | /* XXX TODO: remove need of EDJE_INF_MAX_H, see edje_util.c */ | 1750 | /* XXX TODO: remove need of EDJE_INF_MAX_H, see edje_util.c */ |
1522 | if ((ep->swallow_params.max.h <= 0) || | 1751 | if ((ep->swallow_params.max.h <= 0) || |
1523 | (ep->swallow_params.max.h == EDJE_INF_MAX_H)) | 1752 | (ep->swallow_params.max.h == EDJE_INF_MAX_H)) |
@@ -1544,7 +1773,9 @@ _edje_part_recalc_single_min_max(FLOAT_T sc, | |||
1544 | if (ep->swallow_params.max.h < *maxh) | 1773 | if (ep->swallow_params.max.h < *maxh) |
1545 | *maxh = ep->swallow_params.max.h; | 1774 | *maxh = ep->swallow_params.max.h; |
1546 | } | 1775 | } |
1547 | } | 1776 | } |
1777 | if ((ep->edje->calc_only) && (desc->minmul.have) && | ||
1778 | (desc->minmul.h != FROM_INT(1))) *maxh = *minh; | ||
1548 | if (*maxh >= 0) | 1779 | if (*maxh >= 0) |
1549 | { | 1780 | { |
1550 | if (*maxh < *minh) *maxh = *minh; | 1781 | if (*maxh < *minh) *maxh = *minh; |
@@ -1665,7 +1896,8 @@ _edje_part_recalc_single(Edje *ed, | |||
1665 | Edje_Real_Part *rel2_to_x, | 1896 | Edje_Real_Part *rel2_to_x, |
1666 | Edje_Real_Part *rel2_to_y, | 1897 | Edje_Real_Part *rel2_to_y, |
1667 | Edje_Real_Part *confine_to, | 1898 | Edje_Real_Part *confine_to, |
1668 | Edje_Calc_Params *params) | 1899 | Edje_Calc_Params *params, |
1900 | FLOAT_T pos) | ||
1669 | { | 1901 | { |
1670 | Edje_Color_Class *cc = NULL; | 1902 | Edje_Color_Class *cc = NULL; |
1671 | Edje_Internal_Aspect apref; | 1903 | Edje_Internal_Aspect apref; |
@@ -1675,12 +1907,12 @@ _edje_part_recalc_single(Edje *ed, | |||
1675 | sc = ed->scale; | 1907 | sc = ed->scale; |
1676 | if (sc == ZERO) sc = _edje_scale; | 1908 | if (sc == ZERO) sc = _edje_scale; |
1677 | _edje_part_recalc_single_min_max(sc, ep, desc, &minw, &minh, &maxw, &maxh); | 1909 | _edje_part_recalc_single_min_max(sc, ep, desc, &minw, &minh, &maxw, &maxh); |
1678 | 1910 | ||
1679 | /* relative coords of top left & bottom right */ | 1911 | /* relative coords of top left & bottom right */ |
1680 | _edje_part_recalc_single_rel(ed, ep, desc, rel1_to_x, rel1_to_y, rel2_to_x, rel2_to_y, params); | 1912 | _edje_part_recalc_single_rel(ed, ep, desc, rel1_to_x, rel1_to_y, rel2_to_x, rel2_to_y, params); |
1681 | 1913 | ||
1682 | /* aspect */ | 1914 | /* aspect */ |
1683 | apref = _edje_part_recalc_single_aspect(ep, desc, params, &minw, &minh, &maxw, &maxh); | 1915 | apref = _edje_part_recalc_single_aspect(ed, ep, desc, params, &minw, &minh, &maxw, &maxh, pos); |
1684 | 1916 | ||
1685 | /* size step */ | 1917 | /* size step */ |
1686 | _edje_part_recalc_single_step(desc, params); | 1918 | _edje_part_recalc_single_step(desc, params); |
@@ -1855,77 +2087,13 @@ _edje_table_recalc_apply(Edje *ed __UNUSED__, | |||
1855 | } | 2087 | } |
1856 | } | 2088 | } |
1857 | 2089 | ||
1858 | static int | ||
1859 | _edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps, Edje_Part_Description_Image *st, Edje_Part_Image_Id *imid) | ||
1860 | { | ||
1861 | Edje_Image_Directory_Set_Entry *entry; | ||
1862 | Edje_Image_Directory_Set *set = NULL; | ||
1863 | Eina_List *l; | ||
1864 | int w = 0; | ||
1865 | int h = 0; | ||
1866 | int id; | ||
1867 | |||
1868 | if (!st && !imid) | ||
1869 | return -1; | ||
1870 | |||
1871 | if (st && !st->image.set) | ||
1872 | return st->image.id; | ||
1873 | |||
1874 | if (imid && !imid->set) | ||
1875 | return imid->id; | ||
1876 | |||
1877 | if (imid) | ||
1878 | id = imid->id; | ||
1879 | else | ||
1880 | id = st->image.id; | ||
1881 | |||
1882 | evas_object_geometry_get(obj, NULL, NULL, &w, &h); | ||
1883 | |||
1884 | if (eps && *eps) | ||
1885 | { | ||
1886 | if ((*eps)->id == id) | ||
1887 | set = (*eps)->set; | ||
1888 | |||
1889 | if (set) | ||
1890 | if ((*eps)->entry->size.min.w <= w && w <= (*eps)->entry->size.max.w) | ||
1891 | if ((*eps)->entry->size.min.h <= h && h <= (*eps)->entry->size.max.h) | ||
1892 | return (*eps)->entry->id; | ||
1893 | } | ||
1894 | |||
1895 | if (!set) | ||
1896 | set = ed->file->image_dir->sets + id; | ||
1897 | |||
1898 | EINA_LIST_FOREACH(set->entries, l, entry) | ||
1899 | { | ||
1900 | if (entry->size.min.w <= w && w <= entry->size.max.w) | ||
1901 | if (entry->size.min.h <= h && h <= entry->size.max.h) | ||
1902 | { | ||
1903 | if (eps) | ||
1904 | { | ||
1905 | if (!*eps) | ||
1906 | *eps = calloc(1, sizeof (Edje_Real_Part_Set)); | ||
1907 | |||
1908 | if (*eps) | ||
1909 | { | ||
1910 | (*eps)->entry = entry; | ||
1911 | (*eps)->set = set; | ||
1912 | (*eps)->id = id; | ||
1913 | } | ||
1914 | } | ||
1915 | return entry->id; | ||
1916 | } | ||
1917 | } | ||
1918 | |||
1919 | return -1; | ||
1920 | } | ||
1921 | |||
1922 | static void | 2090 | static void |
1923 | _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Proxy *chosen_desc, FLOAT_T pos) | 2091 | _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Proxy *chosen_desc, FLOAT_T pos) |
1924 | { | 2092 | { |
1925 | Edje_Real_Part *pp; | 2093 | Edje_Real_Part *pp; |
1926 | int part_id = -1; | 2094 | int part_id = -1; |
1927 | 2095 | ||
1928 | if (pos >= 0.5) | 2096 | if (pos >= FROM_DOUBLE(0.5)) |
1929 | part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id; | 2097 | part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id; |
1930 | else | 2098 | else |
1931 | part_id = chosen_desc->proxy.id; | 2099 | part_id = chosen_desc->proxy.id; |
@@ -1967,8 +2135,6 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj | |||
1967 | static void | 2135 | static void |
1968 | _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Image *chosen_desc, FLOAT_T pos) | 2136 | _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Image *chosen_desc, FLOAT_T pos) |
1969 | { | 2137 | { |
1970 | int image_id; | ||
1971 | int image_count, image_num; | ||
1972 | FLOAT_T sc; | 2138 | FLOAT_T sc; |
1973 | 2139 | ||
1974 | sc = ed->scale; | 2140 | sc = ed->scale; |
@@ -2003,107 +2169,7 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj | |||
2003 | else if (chosen_desc->image.border.no_fill == 2) | 2169 | else if (chosen_desc->image.border.no_fill == 2) |
2004 | evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_SOLID); | 2170 | evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_SOLID); |
2005 | 2171 | ||
2006 | image_id = _edje_image_find(ep->object, ed, | 2172 | _edje_real_part_image_set(ed, ep, pos); |
2007 | &ep->param1.set, | ||
2008 | (Edje_Part_Description_Image*) ep->param1.description, | ||
2009 | NULL); | ||
2010 | if (image_id < 0) | ||
2011 | { | ||
2012 | Edje_Image_Directory_Entry *ie; | ||
2013 | |||
2014 | if (!ed->file->image_dir) ie = NULL; | ||
2015 | else ie = ed->file->image_dir->entries + (-image_id) - 1; | ||
2016 | if ((ie) && | ||
2017 | (ie->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) && | ||
2018 | (ie->entry)) | ||
2019 | { | ||
2020 | evas_object_image_file_set(ep->object, ie->entry, NULL); | ||
2021 | } | ||
2022 | } | ||
2023 | else | ||
2024 | { | ||
2025 | image_count = 2; | ||
2026 | if (ep->param2) | ||
2027 | image_count += ((Edje_Part_Description_Image*) ep->param2->description)->image.tweens_count; | ||
2028 | image_num = TO_INT(MUL(pos, SUB(FROM_INT(image_count), | ||
2029 | FROM_DOUBLE(0.5)))); | ||
2030 | if (image_num > (image_count - 1)) | ||
2031 | image_num = image_count - 1; | ||
2032 | if (image_num == 0) | ||
2033 | { | ||
2034 | image_id = _edje_image_find(ep->object, ed, | ||
2035 | &ep->param1.set, | ||
2036 | (Edje_Part_Description_Image*) ep->param1.description, | ||
2037 | NULL); | ||
2038 | } | ||
2039 | else | ||
2040 | if (ep->param2) | ||
2041 | { | ||
2042 | if (image_num == (image_count - 1)) | ||
2043 | { | ||
2044 | image_id = _edje_image_find(ep->object, ed, | ||
2045 | &ep->param2->set, | ||
2046 | (Edje_Part_Description_Image*) ep->param2->description, | ||
2047 | NULL); | ||
2048 | } | ||
2049 | else | ||
2050 | { | ||
2051 | Edje_Part_Image_Id *imid; | ||
2052 | |||
2053 | imid = ((Edje_Part_Description_Image*) ep->param2->description)->image.tweens[image_num - 1]; | ||
2054 | image_id = _edje_image_find(ep->object, ed, NULL, NULL, imid); | ||
2055 | } | ||
2056 | } | ||
2057 | if (image_id < 0) | ||
2058 | { | ||
2059 | ERR("¨Part \"%s\" has description, " | ||
2060 | "\"%s\" %3.3f with a missing image id!!!", | ||
2061 | ep->part->name, | ||
2062 | ep->param1.description->state.name, | ||
2063 | ep->param1.description->state.value); | ||
2064 | } | ||
2065 | else | ||
2066 | { | ||
2067 | char buf[1024]; | ||
2068 | |||
2069 | /* Replace snprint("edje/images/%i") == memcpy + itoa */ | ||
2070 | #define IMAGES "edje/images/" | ||
2071 | memcpy(buf, IMAGES, strlen(IMAGES)); | ||
2072 | eina_convert_itoa(image_id, buf + strlen(IMAGES)); /* No need to check length as 2³² need only 10 characteres. */ | ||
2073 | |||
2074 | evas_object_image_file_set(ep->object, ed->file->path, buf); | ||
2075 | if (evas_object_image_load_error_get(ep->object) != EVAS_LOAD_ERROR_NONE) | ||
2076 | { | ||
2077 | ERR("Error loading image collection \"%s\" from " | ||
2078 | "file \"%s\". Missing EET Evas loader module?", | ||
2079 | buf, ed->file->path); | ||
2080 | switch (evas_object_image_load_error_get(ep->object)) | ||
2081 | { | ||
2082 | case EVAS_LOAD_ERROR_GENERIC: | ||
2083 | ERR("Error type: EVAS_LOAD_ERROR_GENERIC"); | ||
2084 | break; | ||
2085 | case EVAS_LOAD_ERROR_DOES_NOT_EXIST: | ||
2086 | ERR("Error type: EVAS_LOAD_ERROR_DOES_NOT_EXIST"); | ||
2087 | break; | ||
2088 | case EVAS_LOAD_ERROR_PERMISSION_DENIED: | ||
2089 | ERR("Error type: EVAS_LOAD_ERROR_PERMISSION_DENIED"); | ||
2090 | break; | ||
2091 | case EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED: | ||
2092 | ERR("Error type: EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED"); | ||
2093 | break; | ||
2094 | case EVAS_LOAD_ERROR_CORRUPT_FILE: | ||
2095 | ERR("Error type: EVAS_LOAD_ERROR_CORRUPT_FILE"); | ||
2096 | break; | ||
2097 | case EVAS_LOAD_ERROR_UNKNOWN_FORMAT: | ||
2098 | ERR("Error type: EVAS_LOAD_ERROR_UNKNOWN_FORMAT"); | ||
2099 | break; | ||
2100 | default: | ||
2101 | ERR("Error type: ???"); | ||
2102 | break; | ||
2103 | } | ||
2104 | } | ||
2105 | } | ||
2106 | } | ||
2107 | } | 2173 | } |
2108 | 2174 | ||
2109 | static Edje_Real_Part * | 2175 | static Edje_Real_Part * |
@@ -2299,13 +2365,15 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta | |||
2299 | Edje_Real_Part *pp; | 2365 | Edje_Real_Part *pp; |
2300 | int part_id = -1; | 2366 | int part_id = -1; |
2301 | 2367 | ||
2302 | if (pos >= 0.5) | 2368 | if (pos >= FROM_DOUBLE(0.5)) |
2303 | part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id; | 2369 | part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id; |
2304 | else | 2370 | else |
2305 | part_id = ((Edje_Part_Description_Proxy*) chosen_desc)->proxy.id; | 2371 | part_id = ((Edje_Part_Description_Proxy*) chosen_desc)->proxy.id; |
2306 | 2372 | ||
2307 | pp = _edje_real_part_state_get(ed, ep, flags, part_id, NULL); | 2373 | pp = _edje_real_part_state_get(ed, ep, flags, part_id, NULL); |
2374 | #ifdef EDJE_CALC_CACHE | ||
2308 | if (pp && pp->invalidate) proxy_invalidate = EINA_TRUE; | 2375 | if (pp && pp->invalidate) proxy_invalidate = EINA_TRUE; |
2376 | #endif | ||
2309 | } | 2377 | } |
2310 | 2378 | ||
2311 | /* Recalc if needed the map center && light source */ | 2379 | /* Recalc if needed the map center && light source */ |
@@ -2355,7 +2423,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta | |||
2355 | _edje_part_recalc_single(ed, ep, ep->param1.description, chosen_desc, center[0], light[0], persp[0], | 2423 | _edje_part_recalc_single(ed, ep, ep->param1.description, chosen_desc, center[0], light[0], persp[0], |
2356 | ep->param1.rel1_to_x, ep->param1.rel1_to_y, ep->param1.rel2_to_x, ep->param1.rel2_to_y, | 2424 | ep->param1.rel1_to_x, ep->param1.rel1_to_y, ep->param1.rel2_to_x, ep->param1.rel2_to_y, |
2357 | confine_to, | 2425 | confine_to, |
2358 | p1); | 2426 | p1, pos); |
2359 | 2427 | ||
2360 | #ifdef EDJE_CALC_CACHE | 2428 | #ifdef EDJE_CALC_CACHE |
2361 | ep->param1.state = ed->state; | 2429 | ep->param1.state = ed->state; |
@@ -2400,10 +2468,15 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta | |||
2400 | ((ep->part->type == EDJE_PART_TYPE_TEXT || ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) && ed->text_part_change)) | 2468 | ((ep->part->type == EDJE_PART_TYPE_TEXT || ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) && ed->text_part_change)) |
2401 | #endif | 2469 | #endif |
2402 | { | 2470 | { |
2403 | _edje_part_recalc_single(ed, ep, ep->param2->description, chosen_desc, center[1], light[1], persp[1], | 2471 | _edje_part_recalc_single(ed, ep, ep->param2->description, |
2404 | ep->param2->rel1_to_x, ep->param2->rel1_to_y, ep->param2->rel2_to_x, ep->param2->rel2_to_y, | 2472 | chosen_desc, |
2473 | center[1], light[1], persp[1], | ||
2474 | ep->param2->rel1_to_x, | ||
2475 | ep->param2->rel1_to_y, | ||
2476 | ep->param2->rel2_to_x, | ||
2477 | ep->param2->rel2_to_y, | ||
2405 | confine_to, | 2478 | confine_to, |
2406 | p2); | 2479 | p2, pos); |
2407 | #ifdef EDJE_CALC_CACHE | 2480 | #ifdef EDJE_CALC_CACHE |
2408 | ep->param2->state = ed->state; | 2481 | ep->param2->state = ed->state; |
2409 | #endif | 2482 | #endif |
@@ -2449,7 +2522,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta | |||
2449 | p3->req.y = INTP(p1->req.y, p2->req.y, pos); | 2522 | p3->req.y = INTP(p1->req.y, p2->req.y, pos); |
2450 | p3->req.w = INTP(p1->req.w, p2->req.w, pos); | 2523 | p3->req.w = INTP(p1->req.w, p2->req.w, pos); |
2451 | p3->req.h = INTP(p1->req.h, p2->req.h, pos); | 2524 | p3->req.h = INTP(p1->req.h, p2->req.h, pos); |
2452 | 2525 | ||
2453 | if (ep->part->dragable.x) | 2526 | if (ep->part->dragable.x) |
2454 | { | 2527 | { |
2455 | p3->req_drag.x = INTP(p1->req_drag.x, p2->req_drag.x, pos); | 2528 | p3->req_drag.x = INTP(p1->req_drag.x, p2->req_drag.x, pos); |
@@ -2543,11 +2616,11 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta | |||
2543 | } | 2616 | } |
2544 | else if (p1->persp_on) | 2617 | else if (p1->persp_on) |
2545 | { | 2618 | { |
2546 | memcpy(&p3->map.persp, &p1->map.persp, sizeof (p1->map.light)); | 2619 | memcpy(&p3->map.persp, &p1->map.persp, sizeof (p1->map.persp)); |
2547 | } | 2620 | } |
2548 | else if (p2->persp_on) | 2621 | else if (p2->persp_on) |
2549 | { | 2622 | { |
2550 | memcpy(&p3->map.persp, &p2->map.persp, sizeof (p2->map.light)); | 2623 | memcpy(&p3->map.persp, &p2->map.persp, sizeof (p2->map.persp)); |
2551 | } | 2624 | } |
2552 | } | 2625 | } |
2553 | 2626 | ||
diff --git a/libraries/edje/src/lib/edje_callbacks.c b/libraries/edje/src/lib/edje_callbacks.c index e0b0eae..2b02891 100644 --- a/libraries/edje/src/lib/edje_callbacks.c +++ b/libraries/edje/src/lib/edje_callbacks.c | |||
@@ -134,6 +134,7 @@ _edje_mouse_down_signal_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, voi | |||
134 | _edje_emit(ed, buf, events->part->name); | 134 | _edje_emit(ed, buf, events->part->name); |
135 | } | 135 | } |
136 | ed->dirty = 1; | 136 | ed->dirty = 1; |
137 | ed->recalc_call = 1; | ||
137 | #ifdef EDJE_CALC_CACHE | 138 | #ifdef EDJE_CALC_CACHE |
138 | rp->invalidate = 1; | 139 | rp->invalidate = 1; |
139 | #endif | 140 | #endif |
@@ -157,6 +158,7 @@ _edje_mouse_down_signal_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, voi | |||
157 | rp->drag->val.y = dy; | 158 | rp->drag->val.y = dy; |
158 | if (!ignored) | 159 | if (!ignored) |
159 | _edje_emit(ed, "drag", rp->part->name); | 160 | _edje_emit(ed, "drag", rp->part->name); |
161 | ed->recalc_call = 1; | ||
160 | ed->dirty = 1; | 162 | ed->dirty = 1; |
161 | #ifdef EDJE_CALC_CACHE | 163 | #ifdef EDJE_CALC_CACHE |
162 | rp->invalidate = 1; | 164 | rp->invalidate = 1; |
@@ -235,6 +237,7 @@ _edje_mouse_up_signal_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, void | |||
235 | if (rp->drag->down.count == 0) | 237 | if (rp->drag->down.count == 0) |
236 | { | 238 | { |
237 | rp->drag->need_reset = 1; | 239 | rp->drag->need_reset = 1; |
240 | ed->recalc_call = 1; | ||
238 | ed->dirty = 1; | 241 | ed->dirty = 1; |
239 | #ifdef EDJE_CALC_CACHE | 242 | #ifdef EDJE_CALC_CACHE |
240 | rp->invalidate = 1; | 243 | rp->invalidate = 1; |
@@ -314,6 +317,7 @@ _edje_mouse_move_signal_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, voi | |||
314 | rp->drag->tmp.x = ev->cur.canvas.x - rp->drag->down.x; | 317 | rp->drag->tmp.x = ev->cur.canvas.x - rp->drag->down.x; |
315 | if (rp->part->dragable.y) | 318 | if (rp->part->dragable.y) |
316 | rp->drag->tmp.y = ev->cur.canvas.y - rp->drag->down.y; | 319 | rp->drag->tmp.y = ev->cur.canvas.y - rp->drag->down.y; |
320 | ed->recalc_call = 1; | ||
317 | ed->dirty = 1; | 321 | ed->dirty = 1; |
318 | #ifdef EDJE_CALC_CACHE | 322 | #ifdef EDJE_CALC_CACHE |
319 | rp->invalidate = 1; | 323 | rp->invalidate = 1; |
@@ -332,6 +336,7 @@ _edje_mouse_move_signal_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, voi | |||
332 | rp->drag->val.y = dy; | 336 | rp->drag->val.y = dy; |
333 | if (!ignored) | 337 | if (!ignored) |
334 | _edje_emit(ed, "drag", rp->part->name); | 338 | _edje_emit(ed, "drag", rp->part->name); |
339 | ed->recalc_call = 1; | ||
335 | ed->dirty = 1; | 340 | ed->dirty = 1; |
336 | #ifdef EDJE_CALC_CACHE | 341 | #ifdef EDJE_CALC_CACHE |
337 | rp->invalidate = 1; | 342 | rp->invalidate = 1; |
diff --git a/libraries/edje/src/lib/edje_data.c b/libraries/edje/src/lib/edje_data.c index 6b7b395..32b17b6 100644 --- a/libraries/edje/src/lib/edje_data.c +++ b/libraries/edje/src/lib/edje_data.c | |||
@@ -451,6 +451,9 @@ _edje_edd_init(void) | |||
451 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "align.y", align.y, EDJE_T_FLOAT); \ | 451 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "align.y", align.y, EDJE_T_FLOAT); \ |
452 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", fixed.w, EET_T_UCHAR); \ | 452 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", fixed.w, EET_T_UCHAR); \ |
453 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", fixed.h, EET_T_UCHAR); \ | 453 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", fixed.h, EET_T_UCHAR); \ |
454 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.have", minmul.have, EET_T_UCHAR); \ | ||
455 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.w", minmul.w, EDJE_T_FLOAT); \ | ||
456 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.h", minmul.h, EDJE_T_FLOAT); \ | ||
454 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.w", min.w, EET_T_INT); \ | 457 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.w", min.w, EET_T_INT); \ |
455 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.h", min.h, EET_T_INT); \ | 458 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.h", min.h, EET_T_INT); \ |
456 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "max.w", max.w, EET_T_INT); \ | 459 | EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "max.w", max.w, EET_T_INT); \ |
diff --git a/libraries/edje/src/lib/edje_edit.c b/libraries/edje/src/lib/edje_edit.c index 901a1b1..eec5e04 100644 --- a/libraries/edje/src/lib/edje_edit.c +++ b/libraries/edje/src/lib/edje_edit.c | |||
@@ -20,14 +20,18 @@ EAPI Eina_Error EDJE_EDIT_ERROR_GROUP_CURRENTLY_USED = 0 ; | |||
20 | EAPI Eina_Error EDJE_EDIT_ERROR_GROUP_REFERENCED = 0; | 20 | EAPI Eina_Error EDJE_EDIT_ERROR_GROUP_REFERENCED = 0; |
21 | EAPI Eina_Error EDJE_EDIT_ERROR_GROUP_DOES_NOT_EXIST = 0; | 21 | EAPI Eina_Error EDJE_EDIT_ERROR_GROUP_DOES_NOT_EXIST = 0; |
22 | 22 | ||
23 | /* Get ed(Edje*) from obj(Evas_Object*) */ | 23 | /* Get eed(Edje_Edit*) from obj(Evas_Object*) */ |
24 | #define GET_ED_OR_RETURN(RET) \ | 24 | #define GET_EED_OR_RETURN(RET) \ |
25 | Edje *ed; \ | ||
26 | Edje_Edit *eed; \ | 25 | Edje_Edit *eed; \ |
27 | if (!evas_object_smart_type_check_ptr(obj, _edje_edit_type)) \ | 26 | if (!evas_object_smart_type_check_ptr(obj, _edje_edit_type)) \ |
28 | return RET; \ | 27 | return RET; \ |
29 | eed = evas_object_smart_data_get(obj); \ | 28 | eed = evas_object_smart_data_get(obj); \ |
30 | if (!eed) return RET; \ | 29 | if (!eed) return RET; |
30 | |||
31 | /* Get ed(Edje*) from obj(Evas_Object*) */ | ||
32 | #define GET_ED_OR_RETURN(RET) \ | ||
33 | Edje *ed; \ | ||
34 | GET_EED_OR_RETURN(RET); \ | ||
31 | ed = (Edje *)eed; | 35 | ed = (Edje *)eed; |
32 | 36 | ||
33 | /* Get rp(Edje_Real_Part*) from obj(Evas_Object*) and part(char*) */ | 37 | /* Get rp(Edje_Real_Part*) from obj(Evas_Object*) and part(char*) */ |
@@ -388,72 +392,59 @@ _edje_real_part_free(Edje_Real_Part *rp) | |||
388 | static Eina_Bool | 392 | static Eina_Bool |
389 | _edje_import_font_file(Edje *ed, const char *path, const char *entry) | 393 | _edje_import_font_file(Edje *ed, const char *path, const char *entry) |
390 | { | 394 | { |
395 | Eina_File *f; | ||
396 | Eet_File *eetf = NULL; | ||
391 | void *fdata = NULL; | 397 | void *fdata = NULL; |
392 | long fsize = 0; | 398 | long fsize = 0; |
393 | 399 | ||
394 | /* Read font data from file */ | 400 | /* Read font data from file */ |
395 | { | 401 | f = eina_file_open(path, 0); |
396 | FILE *f = fopen(path, "rb"); | 402 | if (!f) |
397 | if (!f) | 403 | { |
398 | { | 404 | ERR("Unable to open font file \"%s\"", path); |
399 | ERR("Unable to open font file \"%s\"", path); | 405 | return EINA_FALSE; |
400 | return EINA_FALSE; | 406 | } |
401 | } | ||
402 | 407 | ||
403 | fseek(f, 0, SEEK_END); | 408 | fsize = eina_file_size_get(f); |
404 | fsize = ftell(f); | 409 | fdata = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); |
405 | rewind(f); | 410 | if (!fdata) |
406 | fdata = malloc(fsize); | 411 | { |
407 | if (!fdata) | 412 | ERR("Unable to map font file \"%s\"", path); |
408 | { | 413 | goto on_error; |
409 | ERR("Unable to alloc font file \"%s\"", path); | 414 | } |
410 | fclose(f); | ||
411 | return EINA_FALSE; | ||
412 | } | ||
413 | if (fread(fdata, fsize, 1, f) != 1) | ||
414 | { | ||
415 | free(fdata); | ||
416 | fclose(f); | ||
417 | ERR("Unable to read all of font file \"%s\"", path); | ||
418 | return EINA_FALSE; | ||
419 | } | ||
420 | fclose(f); | ||
421 | } | ||
422 | 415 | ||
423 | /* Write font to edje file */ | 416 | /* Write font to edje file */ |
424 | { | 417 | eetf = eet_open(ed->path, EET_FILE_MODE_READ_WRITE); |
425 | /* open the eet file */ | 418 | if (!eetf) |
426 | Eet_File *eetf = eet_open(ed->path, EET_FILE_MODE_READ_WRITE); | 419 | { |
427 | if (!eetf) | 420 | ERR("Unable to open \"%s\" for writing output", ed->path); |
428 | { | 421 | goto on_error; |
429 | ERR("Unable to open \"%s\" for writing output", ed->path); | 422 | } |
430 | free(fdata); | ||
431 | return EINA_FALSE; | ||
432 | } | ||
433 | 423 | ||
434 | if (eet_write(eetf, entry, fdata, fsize, 1) <= 0) | 424 | if (eet_write(eetf, entry, fdata, fsize, 1) <= 0) |
435 | { | 425 | { |
436 | ERR("Unable to write font part \"%s\" as \"%s\" part entry", | 426 | ERR("Unable to write font part \"%s\" as \"%s\" part entry", |
437 | path, entry); | 427 | path, entry); |
438 | eet_close(eetf); | 428 | goto on_error; |
439 | free(fdata); | 429 | } |
440 | return EINA_FALSE; | ||
441 | } | ||
442 | 430 | ||
443 | free(fdata); | 431 | /* write the edje_file */ |
432 | if (!_edje_edit_edje_file_save(eetf, ed->file)) | ||
433 | goto on_error; | ||
444 | 434 | ||
445 | /* write the edje_file */ | 435 | eet_close(eetf); |
446 | if (!_edje_edit_edje_file_save(eetf, ed->file)) | ||
447 | { | ||
448 | eet_delete(eetf, entry); | ||
449 | eet_close(eetf); | ||
450 | return EINA_FALSE; | ||
451 | } | ||
452 | 436 | ||
453 | eet_close(eetf); | 437 | eina_file_map_free(f, fdata); |
454 | } | 438 | eina_file_close(f); |
455 | 439 | ||
456 | return EINA_TRUE; | 440 | return EINA_TRUE; |
441 | |||
442 | on_error: | ||
443 | if (eetf) eet_close(eetf); | ||
444 | eina_file_map_free(f, fdata); | ||
445 | eina_file_close(f); | ||
446 | |||
447 | return EINA_FALSE; | ||
457 | } | 448 | } |
458 | 449 | ||
459 | 450 | ||
@@ -4791,7 +4782,7 @@ edje_edit_image_id_get(Evas_Object *obj, const char *image_name) | |||
4791 | { | 4782 | { |
4792 | eina_error_set(0); | 4783 | eina_error_set(0); |
4793 | 4784 | ||
4794 | GET_ED_OR_RETURN(-1); | 4785 | GET_EED_OR_RETURN(-1); |
4795 | 4786 | ||
4796 | return _edje_image_id_find(eed, image_name); | 4787 | return _edje_image_id_find(eed, image_name); |
4797 | } | 4788 | } |
@@ -5174,7 +5165,6 @@ EAPI Eina_Bool | |||
5174 | edje_edit_program_add(Evas_Object *obj, const char *name) | 5165 | edje_edit_program_add(Evas_Object *obj, const char *name) |
5175 | { | 5166 | { |
5176 | Edje_Program *epr; | 5167 | Edje_Program *epr; |
5177 | Edje_Part_Collection *pc; | ||
5178 | 5168 | ||
5179 | eina_error_set(0); | 5169 | eina_error_set(0); |
5180 | 5170 | ||
@@ -5191,7 +5181,7 @@ edje_edit_program_add(Evas_Object *obj, const char *name) | |||
5191 | if (!epr) return EINA_FALSE; | 5181 | if (!epr) return EINA_FALSE; |
5192 | 5182 | ||
5193 | //Add program to group | 5183 | //Add program to group |
5194 | pc = ed->collection; | 5184 | // pc = ed->collection; |
5195 | 5185 | ||
5196 | /* By default, source and signal are empty, so they fill in nocmp category */ | 5186 | /* By default, source and signal are empty, so they fill in nocmp category */ |
5197 | ed->collection->programs.nocmp = realloc(ed->collection->programs.nocmp, | 5187 | ed->collection->programs.nocmp = realloc(ed->collection->programs.nocmp, |
@@ -5237,7 +5227,6 @@ edje_edit_program_del(Evas_Object *obj, const char *prog) | |||
5237 | Eina_List *l, *l_next; | 5227 | Eina_List *l, *l_next; |
5238 | Edje_Program_Target *prt; | 5228 | Edje_Program_Target *prt; |
5239 | Edje_Program_After *pa; | 5229 | Edje_Program_After *pa; |
5240 | Edje_Part_Collection *pc; | ||
5241 | Edje_Program *p; | 5230 | Edje_Program *p; |
5242 | Program_Script *ps, *old_ps; | 5231 | Program_Script *ps, *old_ps; |
5243 | int id, i; | 5232 | int id, i; |
@@ -5248,7 +5237,7 @@ edje_edit_program_del(Evas_Object *obj, const char *prog) | |||
5248 | GET_ED_OR_RETURN(EINA_FALSE); | 5237 | GET_ED_OR_RETURN(EINA_FALSE); |
5249 | GET_EPR_OR_RETURN(EINA_FALSE); | 5238 | GET_EPR_OR_RETURN(EINA_FALSE); |
5250 | 5239 | ||
5251 | pc = ed->collection; | 5240 | //pc = ed->collection; |
5252 | 5241 | ||
5253 | //Remove program from programs list | 5242 | //Remove program from programs list |
5254 | id = epr->id; | 5243 | id = epr->id; |
@@ -5737,7 +5726,7 @@ edje_edit_program_action_set(Evas_Object *obj, const char *prog, Edje_Action_Typ | |||
5737 | 5726 | ||
5738 | eina_error_set(0); | 5727 | eina_error_set(0); |
5739 | 5728 | ||
5740 | GET_ED_OR_RETURN(EINA_FALSE); | 5729 | GET_EED_OR_RETURN(EINA_FALSE); |
5741 | GET_EPR_OR_RETURN(EINA_FALSE); | 5730 | GET_EPR_OR_RETURN(EINA_FALSE); |
5742 | 5731 | ||
5743 | //printf("SET ACTION for program: %s [%d]\n", prog, action); | 5732 | //printf("SET ACTION for program: %s [%d]\n", prog, action); |
@@ -6081,7 +6070,7 @@ edje_edit_script_set(Evas_Object *obj, const char *code) | |||
6081 | { | 6070 | { |
6082 | eina_error_set(0); | 6071 | eina_error_set(0); |
6083 | 6072 | ||
6084 | GET_ED_OR_RETURN(); | 6073 | GET_EED_OR_RETURN(); |
6085 | 6074 | ||
6086 | free(eed->embryo_source); | 6075 | free(eed->embryo_source); |
6087 | free(eed->embryo_processed); | 6076 | free(eed->embryo_processed); |
@@ -6104,7 +6093,7 @@ edje_edit_script_program_get(Evas_Object *obj, const char *prog) | |||
6104 | 6093 | ||
6105 | eina_error_set(0); | 6094 | eina_error_set(0); |
6106 | 6095 | ||
6107 | GET_ED_OR_RETURN(NULL); | 6096 | GET_EED_OR_RETURN(NULL); |
6108 | GET_EPR_OR_RETURN(NULL); | 6097 | GET_EPR_OR_RETURN(NULL); |
6109 | 6098 | ||
6110 | if (epr->action != EDJE_ACTION_TYPE_SCRIPT) | 6099 | if (epr->action != EDJE_ACTION_TYPE_SCRIPT) |
@@ -6124,7 +6113,7 @@ edje_edit_script_program_set(Evas_Object *obj, const char *prog, const char *cod | |||
6124 | 6113 | ||
6125 | eina_error_set(0); | 6114 | eina_error_set(0); |
6126 | 6115 | ||
6127 | GET_ED_OR_RETURN(); | 6116 | GET_EED_OR_RETURN(); |
6128 | GET_EPR_OR_RETURN(); | 6117 | GET_EPR_OR_RETURN(); |
6129 | 6118 | ||
6130 | if (epr->action != EDJE_ACTION_TYPE_SCRIPT) | 6119 | if (epr->action != EDJE_ACTION_TYPE_SCRIPT) |
@@ -6550,7 +6539,7 @@ almost_out: | |||
6550 | EAPI Eina_Bool | 6539 | EAPI Eina_Bool |
6551 | edje_edit_script_compile(Evas_Object *obj) | 6540 | edje_edit_script_compile(Evas_Object *obj) |
6552 | { | 6541 | { |
6553 | GET_ED_OR_RETURN(EINA_FALSE); | 6542 | GET_EED_OR_RETURN(EINA_FALSE); |
6554 | 6543 | ||
6555 | if (!eed->script_need_recompile) | 6544 | if (!eed->script_need_recompile) |
6556 | return EINA_TRUE; | 6545 | return EINA_TRUE; |
@@ -6561,7 +6550,7 @@ edje_edit_script_compile(Evas_Object *obj) | |||
6561 | EAPI const Eina_List * | 6550 | EAPI const Eina_List * |
6562 | edje_edit_script_error_list_get(Evas_Object *obj) | 6551 | edje_edit_script_error_list_get(Evas_Object *obj) |
6563 | { | 6552 | { |
6564 | GET_ED_OR_RETURN(NULL); | 6553 | GET_EED_OR_RETURN(NULL); |
6565 | return eed->errors; | 6554 | return eed->errors; |
6566 | } | 6555 | } |
6567 | 6556 | ||
@@ -6643,7 +6632,7 @@ _edje_generate_source_of_program(Evas_Object *obj, const char *program, Eina_Str | |||
6643 | const char *api_name, *api_description; | 6632 | const char *api_name, *api_description; |
6644 | Edje_Program *epr; | 6633 | Edje_Program *epr; |
6645 | 6634 | ||
6646 | GET_ED_OR_RETURN(EINA_FALSE); | 6635 | GET_EED_OR_RETURN(EINA_FALSE); |
6647 | 6636 | ||
6648 | epr = _edje_program_get_byname(obj, program); | 6637 | epr = _edje_program_get_byname(obj, program); |
6649 | 6638 | ||
@@ -6816,7 +6805,7 @@ _edje_generate_source_of_state(Evas_Object *obj, const char *part, const char *s | |||
6816 | if (pd->aspect.min || pd->aspect.max) | 6805 | if (pd->aspect.min || pd->aspect.max) |
6817 | BUF_APPENDF(I5"aspect: %g %g;\n", TO_DOUBLE(pd->aspect.min), TO_DOUBLE(pd->aspect.max)); | 6806 | BUF_APPENDF(I5"aspect: %g %g;\n", TO_DOUBLE(pd->aspect.min), TO_DOUBLE(pd->aspect.max)); |
6818 | if (pd->aspect.prefer) | 6807 | if (pd->aspect.prefer) |
6819 | BUF_APPENDF(I5"aspect_preference: %s;\n", prefers[pd->aspect.prefer]); | 6808 | BUF_APPENDF(I5"aspect_preference: %s;\n", prefers[(int) pd->aspect.prefer]); |
6820 | 6809 | ||
6821 | if (pd->color_class) | 6810 | if (pd->color_class) |
6822 | BUF_APPENDF(I5"color_class: \"%s\";\n", pd->color_class); | 6811 | BUF_APPENDF(I5"color_class: \"%s\";\n", pd->color_class); |
@@ -7786,7 +7775,7 @@ edje_edit_print_internal_status(Evas_Object *obj) | |||
7786 | */ | 7775 | */ |
7787 | eina_error_set(0); | 7776 | eina_error_set(0); |
7788 | 7777 | ||
7789 | GET_ED_OR_RETURN(); | 7778 | GET_EED_OR_RETURN(); |
7790 | 7779 | ||
7791 | _edje_generate_source(obj); | 7780 | _edje_generate_source(obj); |
7792 | /* | 7781 | /* |
diff --git a/libraries/edje/src/lib/edje_embryo.c b/libraries/edje/src/lib/edje_embryo.c index c89a4f4..1ad2377 100644 --- a/libraries/edje/src/lib/edje_embryo.c +++ b/libraries/edje/src/lib/edje_embryo.c | |||
@@ -674,6 +674,7 @@ _edje_embryo_fn_set_min_size(Embryo_Program *ep, Embryo_Cell *params) | |||
674 | if (h < 0.0) h = 0.0; | 674 | if (h < 0.0) h = 0.0; |
675 | ed->collection->prop.min.w = w; | 675 | ed->collection->prop.min.w = w; |
676 | ed->collection->prop.min.h = h; | 676 | ed->collection->prop.min.h = h; |
677 | ed->recalc_call = 1; | ||
677 | ed->dirty = 1; | 678 | ed->dirty = 1; |
678 | #ifdef EDJE_CALC_CACHE | 679 | #ifdef EDJE_CALC_CACHE |
679 | ed->all_part_change = 1; | 680 | ed->all_part_change = 1; |
@@ -701,6 +702,7 @@ _edje_embryo_fn_set_max_size(Embryo_Program *ep, Embryo_Cell *params) | |||
701 | if (h < 0.0) h = 0.0; | 702 | if (h < 0.0) h = 0.0; |
702 | ed->collection->prop.max.w = w; | 703 | ed->collection->prop.max.w = w; |
703 | ed->collection->prop.max.h = h; | 704 | ed->collection->prop.max.h = h; |
705 | ed->recalc_call = 1; | ||
704 | ed->dirty = 1; | 706 | ed->dirty = 1; |
705 | #ifdef EDJE_CALC_CACHE | 707 | #ifdef EDJE_CALC_CACHE |
706 | ed->all_part_change = 1; | 708 | ed->all_part_change = 1; |
diff --git a/libraries/edje/src/lib/edje_entry.c b/libraries/edje/src/lib/edje_entry.c index e25397a..563497d 100644 --- a/libraries/edje/src/lib/edje_entry.c +++ b/libraries/edje/src/lib/edje_entry.c | |||
@@ -2,9 +2,9 @@ | |||
2 | 2 | ||
3 | #ifdef HAVE_ECORE_IMF | 3 | #ifdef HAVE_ECORE_IMF |
4 | static Eina_Bool _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos); | 4 | static Eina_Bool _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos); |
5 | static Eina_Bool _edje_entry_imf_event_commit_cb(void *data, int type, void *event); | 5 | static void _edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx, void *event_info); |
6 | static Eina_Bool _edje_entry_imf_event_preedit_changed_cb(void *data, int type, void *event); | 6 | static void _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx, void *event_info); |
7 | static Eina_Bool _edje_entry_imf_event_delete_surrounding_cb(void *data, int type, void *event); | 7 | static void _edje_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx, void *event); |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | typedef struct _Entry Entry; | 10 | typedef struct _Entry Entry; |
@@ -39,10 +39,6 @@ struct _Entry | |||
39 | #ifdef HAVE_ECORE_IMF | 39 | #ifdef HAVE_ECORE_IMF |
40 | Eina_Bool have_preedit : 1; | 40 | Eina_Bool have_preedit : 1; |
41 | Ecore_IMF_Context *imf_context; | 41 | Ecore_IMF_Context *imf_context; |
42 | |||
43 | Ecore_Event_Handler *imf_ee_handler_commit; | ||
44 | Ecore_Event_Handler *imf_ee_handler_delete; | ||
45 | Ecore_Event_Handler *imf_ee_handler_changed; | ||
46 | #endif | 42 | #endif |
47 | }; | 43 | }; |
48 | 44 | ||
@@ -272,20 +268,6 @@ _curs_update_from_curs(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, Entr | |||
272 | *cy += (ch / 2); | 268 | *cy += (ch / 2); |
273 | } | 269 | } |
274 | 270 | ||
275 | static void | ||
276 | _curs_back(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, | ||
277 | Entry *en __UNUSED__) | ||
278 | { | ||
279 | evas_textblock_cursor_char_prev(c); | ||
280 | } | ||
281 | |||
282 | static void | ||
283 | _curs_next(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, | ||
284 | Entry *en __UNUSED__) | ||
285 | { | ||
286 | evas_textblock_cursor_char_next(c); | ||
287 | } | ||
288 | |||
289 | static int | 271 | static int |
290 | _curs_line_last_get(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en __UNUSED__) | 272 | _curs_line_last_get(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en __UNUSED__) |
291 | { | 273 | { |
@@ -415,6 +397,7 @@ static void | |||
415 | _sel_extend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) | 397 | _sel_extend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) |
416 | { | 398 | { |
417 | if (!en->sel_end) return; | 399 | if (!en->sel_end) return; |
400 | _edje_entry_imf_context_reset(en); | ||
418 | _sel_enable(c, o, en); | 401 | _sel_enable(c, o, en); |
419 | if (!evas_textblock_cursor_compare(c, en->sel_end)) return; | 402 | if (!evas_textblock_cursor_compare(c, en->sel_end)) return; |
420 | evas_textblock_cursor_copy(c, en->sel_end); | 403 | evas_textblock_cursor_copy(c, en->sel_end); |
@@ -424,13 +407,13 @@ _sel_extend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) | |||
424 | en->selection = NULL; | 407 | en->selection = NULL; |
425 | } | 408 | } |
426 | _edje_emit(en->rp->edje, "selection,changed", en->rp->part->name); | 409 | _edje_emit(en->rp->edje, "selection,changed", en->rp->part->name); |
427 | _edje_entry_imf_context_reset(en); | ||
428 | } | 410 | } |
429 | 411 | ||
430 | static void | 412 | static void |
431 | _sel_preextend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) | 413 | _sel_preextend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) |
432 | { | 414 | { |
433 | if (!en->sel_end) return; | 415 | if (!en->sel_end) return; |
416 | _edje_entry_imf_context_reset(en); | ||
434 | _sel_enable(c, o, en); | 417 | _sel_enable(c, o, en); |
435 | if (!evas_textblock_cursor_compare(c, en->sel_start)) return; | 418 | if (!evas_textblock_cursor_compare(c, en->sel_start)) return; |
436 | evas_textblock_cursor_copy(c, en->sel_start); | 419 | evas_textblock_cursor_copy(c, en->sel_start); |
@@ -440,7 +423,6 @@ _sel_preextend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) | |||
440 | en->selection = NULL; | 423 | en->selection = NULL; |
441 | } | 424 | } |
442 | _edje_emit(en->rp->edje, "selection,changed", en->rp->part->name); | 425 | _edje_emit(en->rp->edje, "selection,changed", en->rp->part->name); |
443 | _edje_entry_imf_context_reset(en); | ||
444 | } | 426 | } |
445 | 427 | ||
446 | static void | 428 | static void |
@@ -1107,6 +1089,10 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1107 | } | 1089 | } |
1108 | #endif | 1090 | #endif |
1109 | 1091 | ||
1092 | if ((!strcmp(ev->key, "Escape")) || | ||
1093 | (!strcmp(ev->key, "Return")) || (!strcmp(ev->key, "KP_Enter"))) | ||
1094 | _edje_entry_imf_context_reset(en); | ||
1095 | |||
1110 | old_cur_pos = evas_textblock_cursor_pos_get(en->cursor); | 1096 | old_cur_pos = evas_textblock_cursor_pos_get(en->cursor); |
1111 | 1097 | ||
1112 | control = evas_key_modifier_is_set(ev->modifiers, "Control"); | 1098 | control = evas_key_modifier_is_set(ev->modifiers, "Control"); |
@@ -1138,6 +1124,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1138 | } | 1124 | } |
1139 | _sel_clear(en->cursor, rp->object, en); | 1125 | _sel_clear(en->cursor, rp->object, en); |
1140 | _edje_emit(ed, "entry,key,up", rp->part->name); | 1126 | _edje_emit(ed, "entry,key,up", rp->part->name); |
1127 | _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); | ||
1141 | } | 1128 | } |
1142 | else if (!strcmp(ev->key, "Down") || !strcmp(ev->key, "KP_Down")) | 1129 | else if (!strcmp(ev->key, "Down") || !strcmp(ev->key, "KP_Down")) |
1143 | { | 1130 | { |
@@ -1157,6 +1144,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1157 | } | 1144 | } |
1158 | _sel_clear(en->cursor, rp->object, en); | 1145 | _sel_clear(en->cursor, rp->object, en); |
1159 | _edje_emit(ed, "entry,key,down", rp->part->name); | 1146 | _edje_emit(ed, "entry,key,down", rp->part->name); |
1147 | _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); | ||
1160 | } | 1148 | } |
1161 | else if (!strcmp(ev->key, "Left") || !strcmp(ev->key, "KP_Left")) | 1149 | else if (!strcmp(ev->key, "Left") || !strcmp(ev->key, "KP_Left")) |
1162 | { | 1150 | { |
@@ -1165,13 +1153,16 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1165 | if (shift) _sel_start(en->cursor, rp->object, en); | 1153 | if (shift) _sel_start(en->cursor, rp->object, en); |
1166 | else _sel_clear(en->cursor, rp->object, en); | 1154 | else _sel_clear(en->cursor, rp->object, en); |
1167 | } | 1155 | } |
1168 | _curs_back(en->cursor, rp->object, en); | 1156 | evas_textblock_cursor_char_prev(en->cursor); |
1157 | /* If control is pressed, go to the start of the word */ | ||
1158 | if (control) evas_textblock_cursor_word_start(en->cursor); | ||
1169 | if (en->select_allow) | 1159 | if (en->select_allow) |
1170 | { | 1160 | { |
1171 | if (shift) _sel_extend(en->cursor, rp->object, en); | 1161 | if (shift) _sel_extend(en->cursor, rp->object, en); |
1172 | } | 1162 | } |
1173 | _sel_clear(en->cursor, rp->object, en); | 1163 | _sel_clear(en->cursor, rp->object, en); |
1174 | _edje_emit(ed, "entry,key,left", rp->part->name); | 1164 | _edje_emit(ed, "entry,key,left", rp->part->name); |
1165 | _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); | ||
1175 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; | 1166 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; |
1176 | } | 1167 | } |
1177 | else if (!strcmp(ev->key, "Right") || !strcmp(ev->key, "KP_Right")) | 1168 | else if (!strcmp(ev->key, "Right") || !strcmp(ev->key, "KP_Right")) |
@@ -1181,20 +1172,31 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1181 | if (shift) _sel_start(en->cursor, rp->object, en); | 1172 | if (shift) _sel_start(en->cursor, rp->object, en); |
1182 | else _sel_clear(en->cursor, rp->object, en); | 1173 | else _sel_clear(en->cursor, rp->object, en); |
1183 | } | 1174 | } |
1184 | _curs_next(en->cursor, rp->object, en); | 1175 | /* If control is pressed, go to the start of the word */ |
1176 | if (control) evas_textblock_cursor_word_end(en->cursor); | ||
1177 | evas_textblock_cursor_char_next(en->cursor); | ||
1185 | if (en->select_allow) | 1178 | if (en->select_allow) |
1186 | { | 1179 | { |
1187 | if (shift) _sel_extend(en->cursor, rp->object, en); | 1180 | if (shift) _sel_extend(en->cursor, rp->object, en); |
1188 | } | 1181 | } |
1189 | _sel_clear(en->cursor, rp->object, en); | 1182 | _sel_clear(en->cursor, rp->object, en); |
1190 | _edje_emit(ed, "entry,key,right", rp->part->name); | 1183 | _edje_emit(ed, "entry,key,right", rp->part->name); |
1184 | _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); | ||
1191 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; | 1185 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; |
1192 | } | 1186 | } |
1193 | else if (!strcmp(ev->key, "BackSpace")) | 1187 | else if (!strcmp(ev->key, "BackSpace")) |
1194 | { | 1188 | { |
1195 | if (control) | 1189 | if (control && !en->have_selection) |
1196 | { | 1190 | { |
1197 | // del to start of previous word | 1191 | // del to start of previous word |
1192 | _sel_start(en->cursor, rp->object, en); | ||
1193 | |||
1194 | evas_textblock_cursor_char_prev(en->cursor); | ||
1195 | evas_textblock_cursor_word_start(en->cursor); | ||
1196 | |||
1197 | _sel_extend(en->cursor, rp->object, en); | ||
1198 | |||
1199 | _range_del_emit(ed, en->cursor, rp->object, en); | ||
1198 | } | 1200 | } |
1199 | else if ((alt) && (shift)) | 1201 | else if ((alt) && (shift)) |
1200 | { | 1202 | { |
@@ -1224,6 +1226,14 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1224 | if (control) | 1226 | if (control) |
1225 | { | 1227 | { |
1226 | // del to end of next word | 1228 | // del to end of next word |
1229 | _sel_start(en->cursor, rp->object, en); | ||
1230 | |||
1231 | evas_textblock_cursor_word_end(en->cursor); | ||
1232 | evas_textblock_cursor_char_next(en->cursor); | ||
1233 | |||
1234 | _sel_extend(en->cursor, rp->object, en); | ||
1235 | |||
1236 | _range_del_emit(ed, en->cursor, rp->object, en); | ||
1227 | } | 1237 | } |
1228 | else if (shift) | 1238 | else if (shift) |
1229 | { | 1239 | { |
@@ -1281,10 +1291,6 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1281 | _edje_emit(ed, "entry,key,end", rp->part->name); | 1291 | _edje_emit(ed, "entry,key,end", rp->part->name); |
1282 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; | 1292 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; |
1283 | } | 1293 | } |
1284 | else if (!strcmp(ev->key, "Shift_L") || !strcmp(ev->key, "Shift_R")) | ||
1285 | { | ||
1286 | return; | ||
1287 | } | ||
1288 | else if ((control) && (!strcmp(ev->key, "v"))) | 1294 | else if ((control) && (!strcmp(ev->key, "v"))) |
1289 | { | 1295 | { |
1290 | _edje_emit(ed, "entry,paste,request", rp->part->name); | 1296 | _edje_emit(ed, "entry,paste,request", rp->part->name); |
@@ -1303,13 +1309,11 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1303 | } | 1309 | } |
1304 | else if ((control) && ((!strcmp(ev->key, "c") || (!strcmp(ev->key, "Insert"))))) | 1310 | else if ((control) && ((!strcmp(ev->key, "c") || (!strcmp(ev->key, "Insert"))))) |
1305 | { | 1311 | { |
1306 | // FIXME: copy - save selection | ||
1307 | _edje_emit(ed, "entry,copy,notify", rp->part->name); | 1312 | _edje_emit(ed, "entry,copy,notify", rp->part->name); |
1308 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; | 1313 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; |
1309 | } | 1314 | } |
1310 | else if ((control) && ((!strcmp(ev->key, "x") || (!strcmp(ev->key, "m"))))) | 1315 | else if ((control) && ((!strcmp(ev->key, "x") || (!strcmp(ev->key, "m"))))) |
1311 | { | 1316 | { |
1312 | // FIXME: cut - save selection, delete seletion | ||
1313 | _edje_emit(ed, "entry,cut,notify", rp->part->name); | 1317 | _edje_emit(ed, "entry,cut,notify", rp->part->name); |
1314 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; | 1318 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; |
1315 | } | 1319 | } |
@@ -1336,7 +1340,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1336 | else if ((control) && (!strcmp(ev->key, "w"))) | 1340 | else if ((control) && (!strcmp(ev->key, "w"))) |
1337 | { | 1341 | { |
1338 | _sel_clear(en->cursor, rp->object, en); | 1342 | _sel_clear(en->cursor, rp->object, en); |
1339 | // select current word | 1343 | // select current word? |
1340 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; | 1344 | ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; |
1341 | } | 1345 | } |
1342 | else if (!strcmp(ev->key, "Tab")) | 1346 | else if (!strcmp(ev->key, "Tab")) |
@@ -1361,10 +1365,10 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1361 | _sel_clear(en->cursor, rp->object, en); | 1365 | _sel_clear(en->cursor, rp->object, en); |
1362 | info->change.insert.pos = | 1366 | info->change.insert.pos = |
1363 | evas_textblock_cursor_pos_get(en->cursor); | 1367 | evas_textblock_cursor_pos_get(en->cursor); |
1364 | info->change.insert.content = eina_stringshare_add("<\t>"); | 1368 | info->change.insert.content = eina_stringshare_add("<tab/>"); |
1365 | //yy | 1369 | //yy |
1366 | // evas_textblock_cursor_format_prepend(en->cursor, "\t"); | 1370 | // evas_textblock_cursor_format_prepend(en->cursor, "tab"); |
1367 | _text_filter_format_prepend(en, en->cursor, "\t"); | 1371 | _text_filter_format_prepend(en, en->cursor, "tab"); |
1368 | _anchors_get(en->cursor, rp->object, en); | 1372 | _anchors_get(en->cursor, rp->object, en); |
1369 | _edje_emit(ed, "entry,changed", rp->part->name); | 1373 | _edje_emit(ed, "entry,changed", rp->part->name); |
1370 | _edje_emit_full(ed, "entry,changed,user", rp->part->name, | 1374 | _edje_emit_full(ed, "entry,changed,user", rp->part->name, |
@@ -1427,19 +1431,20 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1427 | 1431 | ||
1428 | info->change.insert.pos = | 1432 | info->change.insert.pos = |
1429 | evas_textblock_cursor_pos_get(en->cursor); | 1433 | evas_textblock_cursor_pos_get(en->cursor); |
1430 | if (shift) | 1434 | if (shift || |
1435 | evas_object_textblock_legacy_newline_get(rp->object)) | ||
1431 | { | 1436 | { |
1432 | //yy | 1437 | //yy |
1433 | // evas_textblock_cursor_format_prepend(en->cursor, "\n"); | 1438 | // evas_textblock_cursor_format_prepend(en->cursor, "br"); |
1434 | _text_filter_format_prepend(en, en->cursor, "\n"); | 1439 | _text_filter_format_prepend(en, en->cursor, "br"); |
1435 | info->change.insert.content = eina_stringshare_add("<\n>"); | 1440 | info->change.insert.content = eina_stringshare_add("<br/>"); |
1436 | } | 1441 | } |
1437 | else | 1442 | else |
1438 | { | 1443 | { |
1439 | //yy | 1444 | //yy |
1440 | // evas_textblock_cursor_format_prepend(en->cursor, "ps"); | 1445 | // evas_textblock_cursor_format_prepend(en->cursor, "ps"); |
1441 | _text_filter_format_prepend(en, en->cursor, "ps"); | 1446 | _text_filter_format_prepend(en, en->cursor, "ps"); |
1442 | info->change.insert.content = eina_stringshare_add("<ps>"); | 1447 | info->change.insert.content = eina_stringshare_add("<ps/>"); |
1443 | } | 1448 | } |
1444 | _anchors_get(en->cursor, rp->object, en); | 1449 | _anchors_get(en->cursor, rp->object, en); |
1445 | _edje_emit(ed, "entry,changed", rp->part->name); | 1450 | _edje_emit(ed, "entry,changed", rp->part->name); |
@@ -1499,7 +1504,6 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v | |||
1499 | if (!cursor_changed && (old_cur_pos != evas_textblock_cursor_pos_get(en->cursor))) | 1504 | if (!cursor_changed && (old_cur_pos != evas_textblock_cursor_pos_get(en->cursor))) |
1500 | _edje_emit(ed, "cursor,changed", rp->part->name); | 1505 | _edje_emit(ed, "cursor,changed", rp->part->name); |
1501 | 1506 | ||
1502 | _edje_entry_imf_context_reset(en); | ||
1503 | _edje_entry_imf_cursor_info_set(en); | 1507 | _edje_entry_imf_cursor_info_set(en); |
1504 | _edje_entry_real_part_configure(rp); | 1508 | _edje_entry_real_part_configure(rp); |
1505 | } | 1509 | } |
@@ -1576,6 +1580,8 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS | |||
1576 | } | 1580 | } |
1577 | #endif | 1581 | #endif |
1578 | 1582 | ||
1583 | _edje_entry_imf_context_reset(en); | ||
1584 | |||
1579 | en->select_mod_start = EINA_FALSE; | 1585 | en->select_mod_start = EINA_FALSE; |
1580 | en->select_mod_end = EINA_FALSE; | 1586 | en->select_mod_end = EINA_FALSE; |
1581 | if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT) | 1587 | if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT) |
@@ -1690,10 +1696,12 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS | |||
1690 | } | 1696 | } |
1691 | } | 1697 | } |
1692 | if (evas_textblock_cursor_compare(tc, en->cursor)) | 1698 | if (evas_textblock_cursor_compare(tc, en->cursor)) |
1693 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 1699 | { |
1700 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | ||
1701 | _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); | ||
1702 | } | ||
1694 | evas_textblock_cursor_free(tc); | 1703 | evas_textblock_cursor_free(tc); |
1695 | 1704 | ||
1696 | _edje_entry_imf_context_reset(en); | ||
1697 | _edje_entry_imf_cursor_info_set(en); | 1705 | _edje_entry_imf_cursor_info_set(en); |
1698 | 1706 | ||
1699 | _edje_entry_real_part_configure(rp); | 1707 | _edje_entry_real_part_configure(rp); |
@@ -1733,6 +1741,8 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED | |||
1733 | } | 1741 | } |
1734 | #endif | 1742 | #endif |
1735 | 1743 | ||
1744 | _edje_entry_imf_context_reset(en); | ||
1745 | |||
1736 | tc = evas_object_textblock_cursor_new(rp->object); | 1746 | tc = evas_object_textblock_cursor_new(rp->object); |
1737 | evas_textblock_cursor_copy(en->cursor, tc); | 1747 | evas_textblock_cursor_copy(en->cursor, tc); |
1738 | evas_object_geometry_get(rp->object, &x, &y, &w, &h); | 1748 | evas_object_geometry_get(rp->object, &x, &y, &w, &h); |
@@ -1799,10 +1809,12 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED | |||
1799 | en->selecting = EINA_FALSE; | 1809 | en->selecting = EINA_FALSE; |
1800 | } | 1810 | } |
1801 | if (evas_textblock_cursor_compare(tc, en->cursor)) | 1811 | if (evas_textblock_cursor_compare(tc, en->cursor)) |
1802 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 1812 | { |
1813 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | ||
1814 | _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); | ||
1815 | } | ||
1803 | evas_textblock_cursor_free(tc); | 1816 | evas_textblock_cursor_free(tc); |
1804 | 1817 | ||
1805 | _edje_entry_imf_context_reset(en); | ||
1806 | _edje_entry_imf_cursor_info_set(en); | 1818 | _edje_entry_imf_cursor_info_set(en); |
1807 | _edje_entry_real_part_configure(rp); | 1819 | _edje_entry_real_part_configure(rp); |
1808 | } | 1820 | } |
@@ -1893,7 +1905,10 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS | |||
1893 | _sel_update(en->cursor, rp->object, en); | 1905 | _sel_update(en->cursor, rp->object, en); |
1894 | } | 1906 | } |
1895 | if (evas_textblock_cursor_compare(tc, en->cursor)) | 1907 | if (evas_textblock_cursor_compare(tc, en->cursor)) |
1896 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 1908 | { |
1909 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | ||
1910 | _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); | ||
1911 | } | ||
1897 | evas_textblock_cursor_free(tc); | 1912 | evas_textblock_cursor_free(tc); |
1898 | 1913 | ||
1899 | _edje_entry_imf_context_reset(en); | 1914 | _edje_entry_imf_context_reset(en); |
@@ -2014,6 +2029,8 @@ _edje_entry_real_part_init(Edje_Real_Part *rp) | |||
2014 | evas_object_pass_events_set(en->cursor_fg, EINA_TRUE); | 2029 | evas_object_pass_events_set(en->cursor_fg, EINA_TRUE); |
2015 | _edje_subobj_register(en->rp->edje, en->cursor_fg); | 2030 | _edje_subobj_register(en->rp->edje, en->cursor_fg); |
2016 | 2031 | ||
2032 | evas_object_textblock_legacy_newline_set(rp->object, EINA_TRUE); | ||
2033 | |||
2017 | if (rp->part->entry_mode >= EDJE_ENTRY_EDIT_MODE_EDITABLE) | 2034 | if (rp->part->entry_mode >= EDJE_ENTRY_EDIT_MODE_EDITABLE) |
2018 | { | 2035 | { |
2019 | evas_object_show(en->cursor_bg); | 2036 | evas_object_show(en->cursor_bg); |
@@ -2055,9 +2072,9 @@ _edje_entry_real_part_init(Edje_Real_Part *rp) | |||
2055 | 2072 | ||
2056 | ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context, | 2073 | ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context, |
2057 | _edje_entry_imf_retrieve_surrounding_cb, rp->edje); | 2074 | _edje_entry_imf_retrieve_surrounding_cb, rp->edje); |
2058 | en->imf_ee_handler_commit = ecore_event_handler_add(ECORE_IMF_EVENT_COMMIT, _edje_entry_imf_event_commit_cb, rp->edje); | 2075 | ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_COMMIT, _edje_entry_imf_event_commit_cb, rp->edje); |
2059 | en->imf_ee_handler_delete = ecore_event_handler_add(ECORE_IMF_EVENT_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb, rp->edje); | 2076 | ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb, rp->edje); |
2060 | en->imf_ee_handler_changed = ecore_event_handler_add(ECORE_IMF_EVENT_PREEDIT_CHANGED, _edje_entry_imf_event_preedit_changed_cb, rp->edje); | 2077 | ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, _edje_entry_imf_event_preedit_changed_cb, rp->edje); |
2061 | ecore_imf_context_input_mode_set(en->imf_context, | 2078 | ecore_imf_context_input_mode_set(en->imf_context, |
2062 | rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD ? | 2079 | rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD ? |
2063 | ECORE_IMF_INPUT_MODE_INVISIBLE : ECORE_IMF_INPUT_MODE_FULL); | 2080 | ECORE_IMF_INPUT_MODE_INVISIBLE : ECORE_IMF_INPUT_MODE_FULL); |
@@ -2094,23 +2111,9 @@ _edje_entry_real_part_shutdown(Edje_Real_Part *rp) | |||
2094 | { | 2111 | { |
2095 | if (en->imf_context) | 2112 | if (en->imf_context) |
2096 | { | 2113 | { |
2097 | if (en->imf_ee_handler_commit) | 2114 | ecore_imf_context_event_callback_del(en->imf_context, ECORE_IMF_CALLBACK_COMMIT, _edje_entry_imf_event_commit_cb); |
2098 | { | 2115 | ecore_imf_context_event_callback_del(en->imf_context, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb); |
2099 | ecore_event_handler_del(en->imf_ee_handler_commit); | 2116 | ecore_imf_context_event_callback_del(en->imf_context, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, _edje_entry_imf_event_preedit_changed_cb); |
2100 | en->imf_ee_handler_commit = NULL; | ||
2101 | } | ||
2102 | |||
2103 | if (en->imf_ee_handler_delete) | ||
2104 | { | ||
2105 | ecore_event_handler_del(en->imf_ee_handler_delete); | ||
2106 | en->imf_ee_handler_delete = NULL; | ||
2107 | } | ||
2108 | |||
2109 | if (en->imf_ee_handler_changed) | ||
2110 | { | ||
2111 | ecore_event_handler_del(en->imf_ee_handler_changed); | ||
2112 | en->imf_ee_handler_changed = NULL; | ||
2113 | } | ||
2114 | 2117 | ||
2115 | ecore_imf_context_del(en->imf_context); | 2118 | ecore_imf_context_del(en->imf_context); |
2116 | en->imf_context = NULL; | 2119 | en->imf_context = NULL; |
@@ -2189,7 +2192,7 @@ _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text) | |||
2189 | { | 2192 | { |
2190 | Entry *en = rp->entry_data; | 2193 | Entry *en = rp->entry_data; |
2191 | if (!en) return; | 2194 | if (!en) return; |
2192 | 2195 | _edje_entry_imf_context_reset(en); | |
2193 | // set text as markup | 2196 | // set text as markup |
2194 | _sel_clear(en->cursor, rp->object, en); | 2197 | _sel_clear(en->cursor, rp->object, en); |
2195 | evas_object_textblock_text_markup_set(rp->object, text); | 2198 | evas_object_textblock_text_markup_set(rp->object, text); |
@@ -2228,6 +2231,8 @@ _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text) | |||
2228 | { | 2231 | { |
2229 | Entry *en = rp->entry_data; | 2232 | Entry *en = rp->entry_data; |
2230 | if (!en) return; | 2233 | if (!en) return; |
2234 | _edje_entry_imf_context_reset(en); | ||
2235 | |||
2231 | // prepend markup @ cursor pos | 2236 | // prepend markup @ cursor pos |
2232 | if (en->have_selection) | 2237 | if (en->have_selection) |
2233 | _range_del(en->cursor, rp->object, en); | 2238 | _range_del(en->cursor, rp->object, en); |
@@ -2239,9 +2244,7 @@ _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text) | |||
2239 | _edje_emit(rp->edje, "entry,changed", rp->part->name); | 2244 | _edje_emit(rp->edje, "entry,changed", rp->part->name); |
2240 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 2245 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); |
2241 | 2246 | ||
2242 | _edje_entry_imf_context_reset(en); | ||
2243 | _edje_entry_imf_cursor_info_set(en); | 2247 | _edje_entry_imf_cursor_info_set(en); |
2244 | |||
2245 | _edje_entry_real_part_configure(rp); | 2248 | _edje_entry_real_part_configure(rp); |
2246 | } | 2249 | } |
2247 | 2250 | ||
@@ -2278,6 +2281,9 @@ _edje_entry_select_all(Edje_Real_Part *rp) | |||
2278 | { | 2281 | { |
2279 | Entry *en = rp->entry_data; | 2282 | Entry *en = rp->entry_data; |
2280 | if (!en) return; | 2283 | if (!en) return; |
2284 | |||
2285 | _edje_entry_imf_context_reset(en); | ||
2286 | |||
2281 | _sel_clear(en->cursor, rp->object, en); | 2287 | _sel_clear(en->cursor, rp->object, en); |
2282 | _curs_start(en->cursor, rp->object, en); | 2288 | _curs_start(en->cursor, rp->object, en); |
2283 | _sel_enable(en->cursor, rp->object, en); | 2289 | _sel_enable(en->cursor, rp->object, en); |
@@ -2285,7 +2291,6 @@ _edje_entry_select_all(Edje_Real_Part *rp) | |||
2285 | _curs_end(en->cursor, rp->object, en); | 2291 | _curs_end(en->cursor, rp->object, en); |
2286 | _sel_extend(en->cursor, rp->object, en); | 2292 | _sel_extend(en->cursor, rp->object, en); |
2287 | 2293 | ||
2288 | _edje_entry_imf_context_reset(en); | ||
2289 | _edje_entry_imf_cursor_info_set(en); | 2294 | _edje_entry_imf_cursor_info_set(en); |
2290 | _edje_entry_real_part_configure(rp); | 2295 | _edje_entry_real_part_configure(rp); |
2291 | } | 2296 | } |
@@ -2295,12 +2300,14 @@ _edje_entry_select_begin(Edje_Real_Part *rp) | |||
2295 | { | 2300 | { |
2296 | Entry *en = rp->entry_data; | 2301 | Entry *en = rp->entry_data; |
2297 | if (!en) return; | 2302 | if (!en) return; |
2303 | |||
2304 | _edje_entry_imf_context_reset(en); | ||
2305 | |||
2298 | _sel_clear(en->cursor, rp->object, en); | 2306 | _sel_clear(en->cursor, rp->object, en); |
2299 | _sel_enable(en->cursor, rp->object, en); | 2307 | _sel_enable(en->cursor, rp->object, en); |
2300 | _sel_start(en->cursor, rp->object, en); | 2308 | _sel_start(en->cursor, rp->object, en); |
2301 | _sel_extend(en->cursor, rp->object, en); | 2309 | _sel_extend(en->cursor, rp->object, en); |
2302 | 2310 | ||
2303 | _edje_entry_imf_context_reset(en); | ||
2304 | _edje_entry_imf_cursor_info_set(en); | 2311 | _edje_entry_imf_cursor_info_set(en); |
2305 | 2312 | ||
2306 | _edje_entry_real_part_configure(rp); | 2313 | _edje_entry_real_part_configure(rp); |
@@ -2311,9 +2318,9 @@ _edje_entry_select_extend(Edje_Real_Part *rp) | |||
2311 | { | 2318 | { |
2312 | Entry *en = rp->entry_data; | 2319 | Entry *en = rp->entry_data; |
2313 | if (!en) return; | 2320 | if (!en) return; |
2321 | _edje_entry_imf_context_reset(en); | ||
2314 | _sel_extend(en->cursor, rp->object, en); | 2322 | _sel_extend(en->cursor, rp->object, en); |
2315 | 2323 | ||
2316 | _edje_entry_imf_context_reset(en); | ||
2317 | _edje_entry_imf_cursor_info_set(en); | 2324 | _edje_entry_imf_cursor_info_set(en); |
2318 | 2325 | ||
2319 | _edje_entry_real_part_configure(rp); | 2326 | _edje_entry_real_part_configure(rp); |
@@ -2560,13 +2567,14 @@ _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2560 | Entry *en = rp->entry_data; | 2567 | Entry *en = rp->entry_data; |
2561 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); | 2568 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); |
2562 | if (!c) return EINA_FALSE; | 2569 | if (!c) return EINA_FALSE; |
2570 | |||
2571 | _edje_entry_imf_context_reset(en); | ||
2572 | |||
2563 | if (!evas_textblock_cursor_char_next(c)) | 2573 | if (!evas_textblock_cursor_char_next(c)) |
2564 | { | 2574 | { |
2565 | return EINA_FALSE; | 2575 | return EINA_FALSE; |
2566 | } | 2576 | } |
2567 | _sel_update(c, rp->object, rp->entry_data); | 2577 | _sel_update(c, rp->object, rp->entry_data); |
2568 | |||
2569 | _edje_entry_imf_context_reset(en); | ||
2570 | _edje_entry_imf_cursor_info_set(en); | 2578 | _edje_entry_imf_cursor_info_set(en); |
2571 | 2579 | ||
2572 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 2580 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); |
@@ -2580,6 +2588,9 @@ _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2580 | Entry *en = rp->entry_data; | 2588 | Entry *en = rp->entry_data; |
2581 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); | 2589 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); |
2582 | if (!c) return EINA_FALSE; | 2590 | if (!c) return EINA_FALSE; |
2591 | |||
2592 | _edje_entry_imf_context_reset(en); | ||
2593 | |||
2583 | if (!evas_textblock_cursor_char_prev(c)) | 2594 | if (!evas_textblock_cursor_char_prev(c)) |
2584 | { | 2595 | { |
2585 | if (evas_textblock_cursor_paragraph_prev(c)) goto ok; | 2596 | if (evas_textblock_cursor_paragraph_prev(c)) goto ok; |
@@ -2588,7 +2599,6 @@ _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2588 | ok: | 2599 | ok: |
2589 | _sel_update(c, rp->object, rp->entry_data); | 2600 | _sel_update(c, rp->object, rp->entry_data); |
2590 | 2601 | ||
2591 | _edje_entry_imf_context_reset(en); | ||
2592 | _edje_entry_imf_cursor_info_set(en); | 2602 | _edje_entry_imf_cursor_info_set(en); |
2593 | 2603 | ||
2594 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 2604 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); |
@@ -2604,6 +2614,9 @@ _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2604 | Evas_Coord lx, ly, lw, lh, cx, cy, cw, ch; | 2614 | Evas_Coord lx, ly, lw, lh, cx, cy, cw, ch; |
2605 | int ln; | 2615 | int ln; |
2606 | if (!c) return EINA_FALSE; | 2616 | if (!c) return EINA_FALSE; |
2617 | |||
2618 | _edje_entry_imf_context_reset(en); | ||
2619 | |||
2607 | ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL); | 2620 | ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL); |
2608 | ln--; | 2621 | ln--; |
2609 | if (ln < 0) return EINA_FALSE; | 2622 | if (ln < 0) return EINA_FALSE; |
@@ -2620,7 +2633,6 @@ _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2620 | } | 2633 | } |
2621 | _sel_update(c, rp->object, rp->entry_data); | 2634 | _sel_update(c, rp->object, rp->entry_data); |
2622 | 2635 | ||
2623 | _edje_entry_imf_context_reset(en); | ||
2624 | _edje_entry_imf_cursor_info_set(en); | 2636 | _edje_entry_imf_cursor_info_set(en); |
2625 | 2637 | ||
2626 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 2638 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); |
@@ -2636,6 +2648,9 @@ _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2636 | Evas_Coord lx, ly, lw, lh, cx, cy, cw, ch; | 2648 | Evas_Coord lx, ly, lw, lh, cx, cy, cw, ch; |
2637 | int ln; | 2649 | int ln; |
2638 | if (!c) return EINA_FALSE; | 2650 | if (!c) return EINA_FALSE; |
2651 | |||
2652 | _edje_entry_imf_context_reset(en); | ||
2653 | |||
2639 | ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL); | 2654 | ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL); |
2640 | ln++; | 2655 | ln++; |
2641 | if (!evas_object_textblock_line_number_geometry_get(rp->object, ln, | 2656 | if (!evas_object_textblock_line_number_geometry_get(rp->object, ln, |
@@ -2651,7 +2666,6 @@ _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2651 | } | 2666 | } |
2652 | _sel_update(c, rp->object, rp->entry_data); | 2667 | _sel_update(c, rp->object, rp->entry_data); |
2653 | 2668 | ||
2654 | _edje_entry_imf_context_reset(en); | ||
2655 | _edje_entry_imf_cursor_info_set(en); | 2669 | _edje_entry_imf_cursor_info_set(en); |
2656 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 2670 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); |
2657 | _edje_entry_real_part_configure(rp); | 2671 | _edje_entry_real_part_configure(rp); |
@@ -2664,10 +2678,12 @@ _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2664 | Entry *en = rp->entry_data; | 2678 | Entry *en = rp->entry_data; |
2665 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); | 2679 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); |
2666 | if (!c) return; | 2680 | if (!c) return; |
2681 | |||
2682 | _edje_entry_imf_context_reset(en); | ||
2683 | |||
2667 | evas_textblock_cursor_paragraph_first(c); | 2684 | evas_textblock_cursor_paragraph_first(c); |
2668 | _sel_update(c, rp->object, rp->entry_data); | 2685 | _sel_update(c, rp->object, rp->entry_data); |
2669 | 2686 | ||
2670 | _edje_entry_imf_context_reset(en); | ||
2671 | _edje_entry_imf_cursor_info_set(en); | 2687 | _edje_entry_imf_cursor_info_set(en); |
2672 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 2688 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); |
2673 | _edje_entry_real_part_configure(rp); | 2689 | _edje_entry_real_part_configure(rp); |
@@ -2679,10 +2695,12 @@ _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2679 | Entry *en = rp->entry_data; | 2695 | Entry *en = rp->entry_data; |
2680 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); | 2696 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); |
2681 | if (!c) return; | 2697 | if (!c) return; |
2698 | |||
2699 | _edje_entry_imf_context_reset(en); | ||
2700 | |||
2682 | _curs_end(c, rp->object, rp->entry_data); | 2701 | _curs_end(c, rp->object, rp->entry_data); |
2683 | _sel_update(c, rp->object, rp->entry_data); | 2702 | _sel_update(c, rp->object, rp->entry_data); |
2684 | 2703 | ||
2685 | _edje_entry_imf_context_reset(en); | ||
2686 | _edje_entry_imf_cursor_info_set(en); | 2704 | _edje_entry_imf_cursor_info_set(en); |
2687 | 2705 | ||
2688 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 2706 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); |
@@ -2715,10 +2733,11 @@ _edje_entry_cursor_line_begin(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2715 | Entry *en = rp->entry_data; | 2733 | Entry *en = rp->entry_data; |
2716 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); | 2734 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); |
2717 | if (!c) return; | 2735 | if (!c) return; |
2736 | _edje_entry_imf_context_reset(en); | ||
2737 | |||
2718 | evas_textblock_cursor_line_char_first(c); | 2738 | evas_textblock_cursor_line_char_first(c); |
2719 | _sel_update(c, rp->object, rp->entry_data); | 2739 | _sel_update(c, rp->object, rp->entry_data); |
2720 | 2740 | ||
2721 | _edje_entry_imf_context_reset(en); | ||
2722 | _edje_entry_imf_cursor_info_set(en); | 2741 | _edje_entry_imf_cursor_info_set(en); |
2723 | 2742 | ||
2724 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 2743 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); |
@@ -2731,10 +2750,10 @@ _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2731 | Entry *en = rp->entry_data; | 2750 | Entry *en = rp->entry_data; |
2732 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); | 2751 | Evas_Textblock_Cursor *c = _cursor_get(rp, cur); |
2733 | if (!c) return; | 2752 | if (!c) return; |
2753 | _edje_entry_imf_context_reset(en); | ||
2734 | evas_textblock_cursor_line_char_last(c); | 2754 | evas_textblock_cursor_line_char_last(c); |
2735 | _sel_update(c, rp->object, rp->entry_data); | 2755 | _sel_update(c, rp->object, rp->entry_data); |
2736 | 2756 | ||
2737 | _edje_entry_imf_context_reset(en); | ||
2738 | _edje_entry_imf_cursor_info_set(en); | 2757 | _edje_entry_imf_cursor_info_set(en); |
2739 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 2758 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); |
2740 | _edje_entry_real_part_configure(rp); | 2759 | _edje_entry_real_part_configure(rp); |
@@ -2766,7 +2785,7 @@ _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur) | |||
2766 | return evas_textblock_cursor_format_is_visible_get(c); | 2785 | return evas_textblock_cursor_format_is_visible_get(c); |
2767 | } | 2786 | } |
2768 | 2787 | ||
2769 | const char * | 2788 | char * |
2770 | _edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur) | 2789 | _edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur) |
2771 | { | 2790 | { |
2772 | static char *s = NULL; | 2791 | static char *s = NULL; |
@@ -2793,10 +2812,10 @@ _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos) | |||
2793 | if (evas_textblock_cursor_pos_get(c) == pos) | 2812 | if (evas_textblock_cursor_pos_get(c) == pos) |
2794 | return; | 2813 | return; |
2795 | 2814 | ||
2815 | _edje_entry_imf_context_reset(en); | ||
2796 | evas_textblock_cursor_pos_set(c, pos); | 2816 | evas_textblock_cursor_pos_set(c, pos); |
2797 | _sel_update(c, rp->object, rp->entry_data); | 2817 | _sel_update(c, rp->object, rp->entry_data); |
2798 | 2818 | ||
2799 | _edje_entry_imf_context_reset(en); | ||
2800 | _edje_entry_imf_cursor_info_set(en); | 2819 | _edje_entry_imf_cursor_info_set(en); |
2801 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); | 2820 | _edje_emit(rp->edje, "cursor,changed", rp->part->name); |
2802 | _edje_entry_real_part_configure(rp); | 2821 | _edje_entry_real_part_configure(rp); |
@@ -2891,43 +2910,33 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx __UNU | |||
2891 | return EINA_TRUE; | 2910 | return EINA_TRUE; |
2892 | } | 2911 | } |
2893 | 2912 | ||
2894 | static Eina_Bool | 2913 | static void |
2895 | _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) | 2914 | _edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx __UNUSED__, void *event_info) |
2896 | { | 2915 | { |
2897 | Edje *ed = data; | 2916 | Edje *ed = data; |
2898 | Edje_Real_Part *rp = ed->focused_part; | 2917 | Edje_Real_Part *rp = ed->focused_part; |
2899 | Entry *en; | 2918 | Entry *en; |
2900 | Ecore_IMF_Event_Commit *ev = event; | 2919 | char *commit_str = event_info; |
2901 | Evas_Textblock_Cursor *tc; | 2920 | int start_pos; |
2902 | Eina_Bool cursor_move = EINA_FALSE; | ||
2903 | 2921 | ||
2904 | if ((!rp) || (!ev) || (!ev->str)) return ECORE_CALLBACK_PASS_ON; | 2922 | if ((!rp)) return; |
2905 | 2923 | ||
2906 | en = rp->entry_data; | 2924 | en = rp->entry_data; |
2907 | if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || | 2925 | if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || |
2908 | (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) | 2926 | (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) |
2909 | return ECORE_CALLBACK_PASS_ON; | 2927 | return; |
2910 | |||
2911 | if (!en->imf_context) return ECORE_CALLBACK_PASS_ON; | ||
2912 | if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON; | ||
2913 | 2928 | ||
2914 | if (en->have_selection) | 2929 | if (en->have_selection) |
2915 | { | 2930 | { |
2916 | if (strcmp(ev->str, "")) | 2931 | if (strcmp(commit_str, "")) |
2917 | { | 2932 | { |
2918 | /* delete selected characters */ | 2933 | /* delete selected characters */ |
2919 | _range_del(en->cursor, rp->object, en); | 2934 | _range_del_emit(ed, en->cursor, rp->object, en); |
2920 | _sel_clear(en->cursor, rp->object, en); | 2935 | _sel_clear(en->cursor, rp->object, en); |
2921 | } | 2936 | } |
2922 | } | 2937 | } |
2923 | 2938 | ||
2924 | tc = evas_object_textblock_cursor_new(rp->object); | 2939 | start_pos = evas_textblock_cursor_pos_get(en->cursor); |
2925 | |||
2926 | /* calculate the cursor position to insert commit string */ | ||
2927 | if (en->preedit_start) | ||
2928 | evas_textblock_cursor_copy(en->preedit_start, tc); | ||
2929 | else | ||
2930 | evas_textblock_cursor_copy(en->cursor, tc); | ||
2931 | 2940 | ||
2932 | #ifdef HAVE_ECORE_IMF | 2941 | #ifdef HAVE_ECORE_IMF |
2933 | /* delete preedit characters */ | 2942 | /* delete preedit characters */ |
@@ -2935,17 +2944,16 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) | |||
2935 | _preedit_clear(en); | 2944 | _preedit_clear(en); |
2936 | #endif | 2945 | #endif |
2937 | 2946 | ||
2938 | if (evas_textblock_cursor_compare(en->cursor, tc)) | ||
2939 | cursor_move = EINA_TRUE; | ||
2940 | if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) && | 2947 | if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) && |
2941 | _edje_password_show_last) | 2948 | _edje_password_show_last) |
2942 | _edje_entry_hide_visible_password(en->rp); | 2949 | _edje_entry_hide_visible_password(en->rp); |
2943 | if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) && | 2950 | if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) && |
2944 | _edje_password_show_last && (!en->preedit_start)) | 2951 | _edje_password_show_last && (!en->preedit_start)) |
2945 | { | 2952 | { |
2946 | _text_filter_format_prepend(en, tc, "+ password=off"); | 2953 | _text_filter_format_prepend(en, en->cursor, "+ password=off"); |
2947 | _text_filter_markup_prepend(en, tc, ev->str); | 2954 | _text_filter_text_prepend(en, en->cursor, commit_str); |
2948 | _text_filter_format_prepend(en, tc, "- password"); | 2955 | _text_filter_format_prepend(en, en->cursor, "- password"); |
2956 | |||
2949 | if (en->pw_timer) | 2957 | if (en->pw_timer) |
2950 | { | 2958 | { |
2951 | ecore_timer_del(en->pw_timer); | 2959 | ecore_timer_del(en->pw_timer); |
@@ -2955,51 +2963,54 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) | |||
2955 | _password_timer_cb, en); | 2963 | _password_timer_cb, en); |
2956 | } | 2964 | } |
2957 | else | 2965 | else |
2958 | _text_filter_text_prepend(en, tc, ev->str); | 2966 | _text_filter_text_prepend(en, en->cursor, commit_str); |
2959 | |||
2960 | if (!cursor_move) | ||
2961 | { | ||
2962 | /* move cursor to the end of commit string */ | ||
2963 | evas_textblock_cursor_copy(tc, en->cursor); | ||
2964 | } | ||
2965 | 2967 | ||
2966 | evas_textblock_cursor_free(tc); | ||
2967 | 2968 | ||
2968 | _edje_entry_imf_cursor_info_set(en); | 2969 | _edje_entry_imf_cursor_info_set(en); |
2969 | _anchors_get(en->cursor, rp->object, en); | 2970 | _anchors_get(en->cursor, rp->object, en); |
2970 | _edje_emit(rp->edje, "entry,changed", rp->part->name); | 2971 | _edje_emit(rp->edje, "entry,changed", rp->part->name); |
2971 | _edje_emit(ed, "entry,changed,user", rp->part->name); | ||
2972 | _edje_emit(ed, "cursor,changed", rp->part->name); | ||
2973 | 2972 | ||
2974 | return ECORE_CALLBACK_DONE; | 2973 | { |
2974 | Edje_Entry_Change_Info *info = calloc(1, sizeof(*info)); | ||
2975 | info->insert = EINA_TRUE; | ||
2976 | info->change.insert.pos = start_pos; | ||
2977 | info->change.insert.content = eina_stringshare_add(commit_str); | ||
2978 | info->change.insert.plain_length = | ||
2979 | eina_unicode_utf8_get_len(info->change.insert.content); | ||
2980 | _edje_emit_full(ed, "entry,changed,user", rp->part->name, | ||
2981 | info, _free_entry_change_info); | ||
2982 | _edje_emit(ed, "cursor,changed", rp->part->name); | ||
2983 | } | ||
2975 | } | 2984 | } |
2976 | 2985 | ||
2977 | static Eina_Bool | 2986 | static void |
2978 | _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void *event) | 2987 | _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx __UNUSED__, void *event_info __UNUSED__) |
2979 | { | 2988 | { |
2980 | Edje *ed = data; | 2989 | Edje *ed = data; |
2981 | Edje_Real_Part *rp = ed->focused_part; | 2990 | Edje_Real_Part *rp = ed->focused_part; |
2982 | Entry *en; | 2991 | Entry *en; |
2983 | Ecore_IMF_Event_Preedit_Changed *ev = event; | ||
2984 | int cursor_pos; | 2992 | int cursor_pos; |
2985 | int preedit_start_pos, preedit_end_pos; | 2993 | int preedit_start_pos, preedit_end_pos; |
2986 | char *preedit_string; | 2994 | char *preedit_string; |
2987 | int i; | 2995 | int i; |
2988 | Eina_Bool preedit_end_state = EINA_FALSE; | 2996 | Eina_Bool preedit_end_state = EINA_FALSE; |
2997 | Eina_List *attrs = NULL, *l = NULL; | ||
2998 | Ecore_IMF_Preedit_Attr *attr; | ||
2999 | Eina_Strbuf *buf; | ||
2989 | 3000 | ||
2990 | if ((!rp) || (!ev)) return ECORE_CALLBACK_PASS_ON; | 3001 | if ((!rp)) return; |
2991 | 3002 | ||
2992 | en = rp->entry_data; | 3003 | en = rp->entry_data; |
2993 | if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || | 3004 | if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || |
2994 | (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) | 3005 | (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) |
2995 | return ECORE_CALLBACK_PASS_ON; | 3006 | return; |
2996 | |||
2997 | if (!en->imf_context) return ECORE_CALLBACK_PASS_ON; | ||
2998 | 3007 | ||
2999 | if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON; | 3008 | if (!en->imf_context) return; |
3000 | 3009 | ||
3001 | ecore_imf_context_preedit_string_get(en->imf_context, &preedit_string, &cursor_pos); | 3010 | ecore_imf_context_preedit_string_with_attributes_get(en->imf_context, |
3002 | if (!preedit_string) return ECORE_CALLBACK_PASS_ON; | 3011 | &preedit_string, |
3012 | &attrs, &cursor_pos); | ||
3013 | if (!preedit_string) return; | ||
3003 | 3014 | ||
3004 | if (!strcmp(preedit_string, "")) | 3015 | if (!strcmp(preedit_string, "")) |
3005 | preedit_end_state = EINA_TRUE; | 3016 | preedit_end_state = EINA_TRUE; |
@@ -3007,7 +3018,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void * | |||
3007 | if (en->have_selection && !preedit_end_state) | 3018 | if (en->have_selection && !preedit_end_state) |
3008 | { | 3019 | { |
3009 | /* delete selected characters */ | 3020 | /* delete selected characters */ |
3010 | _range_del(en->cursor, rp->object, en); | 3021 | _range_del_emit(ed, en->cursor, rp->object, en); |
3011 | _sel_clear(en->cursor, rp->object, en); | 3022 | _sel_clear(en->cursor, rp->object, en); |
3012 | } | 3023 | } |
3013 | 3024 | ||
@@ -3017,23 +3028,51 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void * | |||
3017 | preedit_start_pos = evas_textblock_cursor_pos_get(en->cursor); | 3028 | preedit_start_pos = evas_textblock_cursor_pos_get(en->cursor); |
3018 | 3029 | ||
3019 | /* insert preedit character(s) */ | 3030 | /* insert preedit character(s) */ |
3020 | if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) && | 3031 | if (strlen(preedit_string) > 0) |
3021 | _edje_password_show_last) | ||
3022 | { | 3032 | { |
3023 | _text_filter_format_prepend(en, en->cursor, "+ password=off"); | 3033 | buf = eina_strbuf_new(); |
3024 | _text_filter_markup_prepend(en, en->cursor, preedit_string); | 3034 | if (attrs) |
3025 | _text_filter_format_prepend(en, en->cursor, "- password"); | ||
3026 | if (en->pw_timer) | ||
3027 | { | 3035 | { |
3028 | ecore_timer_del(en->pw_timer); | 3036 | EINA_LIST_FOREACH(attrs, l, attr) |
3029 | en->pw_timer = NULL; | 3037 | { |
3038 | if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB1) | ||
3039 | { | ||
3040 | eina_strbuf_append(buf, "<preedit>"); | ||
3041 | eina_strbuf_append_n(buf, preedit_string + attr->start_index, | ||
3042 | attr->end_index - attr->start_index); | ||
3043 | eina_strbuf_append(buf, "</preedit>"); | ||
3044 | } | ||
3045 | |||
3046 | else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB2 || | ||
3047 | attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB3) | ||
3048 | { | ||
3049 | eina_strbuf_append(buf, "<preedit_sel>"); | ||
3050 | eina_strbuf_append_n(buf, preedit_string + attr->start_index, | ||
3051 | attr->end_index - attr->start_index); | ||
3052 | eina_strbuf_append(buf, "</preedit_sel>"); | ||
3053 | } | ||
3054 | } | ||
3030 | } | 3055 | } |
3031 | en->pw_timer = ecore_timer_add(_edje_password_show_last_timeout, | 3056 | if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) && |
3032 | _password_timer_cb, en); | 3057 | _edje_password_show_last) |
3033 | } | 3058 | { |
3034 | else | 3059 | _edje_entry_hide_visible_password(en->rp); |
3035 | { | 3060 | _text_filter_format_prepend(en, en->cursor, "+ password=off"); |
3036 | _text_filter_markup_prepend(en, en->cursor, preedit_string); | 3061 | _text_filter_markup_prepend(en, en->cursor, eina_strbuf_string_get(buf)); |
3062 | _text_filter_format_prepend(en, en->cursor, "- password"); | ||
3063 | if (en->pw_timer) | ||
3064 | { | ||
3065 | ecore_timer_del(en->pw_timer); | ||
3066 | en->pw_timer = NULL; | ||
3067 | } | ||
3068 | en->pw_timer = ecore_timer_add(_edje_password_show_last_timeout, | ||
3069 | _password_timer_cb, en); | ||
3070 | } | ||
3071 | else | ||
3072 | { | ||
3073 | _text_filter_markup_prepend(en, en->cursor, eina_strbuf_string_get(buf)); | ||
3074 | } | ||
3075 | eina_strbuf_free(buf); | ||
3037 | } | 3076 | } |
3038 | 3077 | ||
3039 | if (!preedit_end_state) | 3078 | if (!preedit_end_state) |
@@ -3066,29 +3105,30 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void * | |||
3066 | _edje_emit(rp->edje, "preedit,changed", rp->part->name); | 3105 | _edje_emit(rp->edje, "preedit,changed", rp->part->name); |
3067 | _edje_emit(ed, "cursor,changed", rp->part->name); | 3106 | _edje_emit(ed, "cursor,changed", rp->part->name); |
3068 | 3107 | ||
3069 | free(preedit_string); | 3108 | /* delete attribute list */ |
3109 | if (attrs) | ||
3110 | { | ||
3111 | EINA_LIST_FREE(attrs, attr) free(attr); | ||
3112 | } | ||
3070 | 3113 | ||
3071 | return ECORE_CALLBACK_DONE; | 3114 | free(preedit_string); |
3072 | } | 3115 | } |
3073 | 3116 | ||
3074 | static Eina_Bool | 3117 | static void |
3075 | _edje_entry_imf_event_delete_surrounding_cb(void *data, int type __UNUSED__, void *event) | 3118 | _edje_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx __UNUSED__, void *event_info) |
3076 | { | 3119 | { |
3077 | Edje *ed = data; | 3120 | Edje *ed = data; |
3078 | Edje_Real_Part *rp = ed->focused_part; | 3121 | Edje_Real_Part *rp = ed->focused_part; |
3079 | Entry *en; | 3122 | Entry *en; |
3080 | Ecore_IMF_Event_Delete_Surrounding *ev = event; | 3123 | Ecore_IMF_Event_Delete_Surrounding *ev = event_info; |
3081 | Evas_Textblock_Cursor *del_start, *del_end; | 3124 | Evas_Textblock_Cursor *del_start, *del_end; |
3082 | int cursor_pos; | 3125 | int cursor_pos; |
3083 | 3126 | ||
3084 | if ((!rp) || (!ev)) return ECORE_CALLBACK_PASS_ON; | 3127 | if ((!rp) || (!ev)) return; |
3085 | en = rp->entry_data; | 3128 | en = rp->entry_data; |
3086 | if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || | 3129 | if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || |
3087 | (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) | 3130 | (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) |
3088 | return ECORE_CALLBACK_PASS_ON; | 3131 | return; |
3089 | |||
3090 | if (!en->imf_context) return ECORE_CALLBACK_PASS_ON; | ||
3091 | if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON; | ||
3092 | 3132 | ||
3093 | cursor_pos = evas_textblock_cursor_pos_get(en->cursor); | 3133 | cursor_pos = evas_textblock_cursor_pos_get(en->cursor); |
3094 | 3134 | ||
@@ -3102,8 +3142,6 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, int type __UNUSED__, voi | |||
3102 | 3142 | ||
3103 | evas_textblock_cursor_free(del_start); | 3143 | evas_textblock_cursor_free(del_start); |
3104 | evas_textblock_cursor_free(del_end); | 3144 | evas_textblock_cursor_free(del_end); |
3105 | |||
3106 | return ECORE_CALLBACK_DONE; | ||
3107 | } | 3145 | } |
3108 | #endif | 3146 | #endif |
3109 | 3147 | ||
diff --git a/libraries/edje/src/lib/edje_load.c b/libraries/edje/src/lib/edje_load.c index 644bb7c..8fe5842 100644 --- a/libraries/edje/src/lib/edje_load.c +++ b/libraries/edje/src/lib/edje_load.c | |||
@@ -262,6 +262,10 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
262 | { | 262 | { |
263 | Edje *ed; | 263 | Edje *ed; |
264 | Evas *tev; | 264 | Evas *tev; |
265 | Edje_Real_Part *rp; | ||
266 | Eina_List *textblocks = NULL; | ||
267 | Eina_List *sources = NULL; | ||
268 | Eina_List *externals = NULL; | ||
265 | Eina_List *old_swallows; | 269 | Eina_List *old_swallows; |
266 | unsigned int n; | 270 | unsigned int n; |
267 | Eina_List *parts = NULL; | 271 | Eina_List *parts = NULL; |
@@ -323,7 +327,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
323 | else | 327 | else |
324 | { | 328 | { |
325 | unsigned int i; | 329 | unsigned int i; |
326 | int errors = 0; | ||
327 | 330 | ||
328 | /* colorclass stuff */ | 331 | /* colorclass stuff */ |
329 | for (i = 0; i < ed->collection->parts_count; ++i) | 332 | for (i = 0; i < ed->collection->parts_count; ++i) |
@@ -333,8 +336,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
333 | 336 | ||
334 | ep = ed->collection->parts[i]; | 337 | ep = ed->collection->parts[i]; |
335 | 338 | ||
336 | if (errors) | ||
337 | break; | ||
338 | /* Register any color classes in this parts descriptions. */ | 339 | /* Register any color classes in this parts descriptions. */ |
339 | if ((ep->default_desc) && (ep->default_desc->color_class)) | 340 | if ((ep->default_desc) && (ep->default_desc->color_class)) |
340 | _edje_color_class_member_add(ed, ep->default_desc->color_class); | 341 | _edje_color_class_member_add(ed, ep->default_desc->color_class); |
@@ -353,12 +354,12 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
353 | for (n = 0; n < ed->collection->parts_count; n++) | 354 | for (n = 0; n < ed->collection->parts_count; n++) |
354 | { | 355 | { |
355 | Edje_Part *ep; | 356 | Edje_Part *ep; |
356 | Edje_Real_Part *rp; | ||
357 | 357 | ||
358 | ep = ed->collection->parts[n]; | 358 | ep = ed->collection->parts[n]; |
359 | rp = eina_mempool_malloc(_edje_real_part_mp, sizeof(Edje_Real_Part)); | 359 | rp = eina_mempool_malloc(_edje_real_part_mp, sizeof(Edje_Real_Part)); |
360 | if (!rp) | 360 | if (!rp) |
361 | { | 361 | { |
362 | /* FIXME: destroy all allocated ressource, need to have a common exit point */ | ||
362 | ed->load_error = EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | 363 | ed->load_error = EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; |
363 | evas_event_thaw(tev); | 364 | evas_event_thaw(tev); |
364 | evas_event_thaw_eval(tev); | 365 | evas_event_thaw_eval(tev); |
@@ -373,7 +374,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
373 | if (!rp->drag) | 374 | if (!rp->drag) |
374 | { | 375 | { |
375 | ed->load_error = EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | 376 | ed->load_error = EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; |
376 | free(rp); | 377 | eina_mempool_free(_edje_real_part_mp, rp); |
377 | evas_event_thaw(tev); | 378 | evas_event_thaw(tev); |
378 | evas_event_thaw_eval(tev); | 379 | evas_event_thaw_eval(tev); |
379 | return 0; | 380 | return 0; |
@@ -407,9 +408,12 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
407 | rp->object = evas_object_text_add(ed->base.evas); | 408 | rp->object = evas_object_text_add(ed->base.evas); |
408 | evas_object_text_font_source_set(rp->object, ed->path); | 409 | evas_object_text_font_source_set(rp->object, ed->path); |
409 | break; | 410 | break; |
410 | case EDJE_PART_TYPE_SWALLOW: | ||
411 | case EDJE_PART_TYPE_GROUP: | 411 | case EDJE_PART_TYPE_GROUP: |
412 | sources = eina_list_append(sources, rp); | ||
413 | case EDJE_PART_TYPE_SWALLOW: | ||
412 | case EDJE_PART_TYPE_EXTERNAL: | 414 | case EDJE_PART_TYPE_EXTERNAL: |
415 | if (ep->type == EDJE_PART_TYPE_EXTERNAL) | ||
416 | externals = eina_list_append(externals, rp); | ||
413 | rp->object = evas_object_rectangle_add(ed->base.evas); | 417 | rp->object = evas_object_rectangle_add(ed->base.evas); |
414 | evas_object_color_set(rp->object, 0, 0, 0, 0); | 418 | evas_object_color_set(rp->object, 0, 0, 0, 0); |
415 | evas_object_pass_events_set(rp->object, 1); | 419 | evas_object_pass_events_set(rp->object, 1); |
@@ -417,13 +421,16 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
417 | _edje_callbacks_focus_add(rp->object, ed, rp); | 421 | _edje_callbacks_focus_add(rp->object, ed, rp); |
418 | break; | 422 | break; |
419 | case EDJE_PART_TYPE_TEXTBLOCK: | 423 | case EDJE_PART_TYPE_TEXTBLOCK: |
424 | textblocks = eina_list_append(textblocks, rp); | ||
420 | rp->object = evas_object_textblock_add(ed->base.evas); | 425 | rp->object = evas_object_textblock_add(ed->base.evas); |
421 | break; | 426 | break; |
422 | case EDJE_PART_TYPE_BOX: | 427 | case EDJE_PART_TYPE_BOX: |
428 | sources = eina_list_append(sources, rp); | ||
423 | rp->object = evas_object_box_add(ed->base.evas); | 429 | rp->object = evas_object_box_add(ed->base.evas); |
424 | rp->anim = _edje_box_layout_anim_new(rp->object); | 430 | rp->anim = _edje_box_layout_anim_new(rp->object); |
425 | break; | 431 | break; |
426 | case EDJE_PART_TYPE_TABLE: | 432 | case EDJE_PART_TYPE_TABLE: |
433 | sources = eina_list_append(sources, rp); | ||
427 | rp->object = evas_object_table_add(ed->base.evas); | 434 | rp->object = evas_object_table_add(ed->base.evas); |
428 | break; | 435 | break; |
429 | case EDJE_PART_TYPE_GRADIENT: | 436 | case EDJE_PART_TYPE_GRADIENT: |
@@ -463,7 +470,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
463 | } | 470 | } |
464 | if (n > 0) | 471 | if (n > 0) |
465 | { | 472 | { |
466 | Edje_Real_Part *rp; | ||
467 | Eina_List *l; | 473 | Eina_List *l; |
468 | 474 | ||
469 | ed->table_parts = malloc(sizeof(Edje_Real_Part *) * n); | 475 | ed->table_parts = malloc(sizeof(Edje_Real_Part *) * n); |
@@ -519,7 +525,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
519 | } | 525 | } |
520 | 526 | ||
521 | rp->swallow_params.min.w = 0; | 527 | rp->swallow_params.min.w = 0; |
522 | rp->swallow_params.min.w = 0; | 528 | rp->swallow_params.min.h = 0; |
523 | rp->swallow_params.max.w = -1; | 529 | rp->swallow_params.max.w = -1; |
524 | rp->swallow_params.max.h = -1; | 530 | rp->swallow_params.max.h = -1; |
525 | 531 | ||
@@ -587,8 +593,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
587 | _edje_var_init(ed); | 593 | _edje_var_init(ed); |
588 | for (i = 0; i < ed->table_parts_size; i++) | 594 | for (i = 0; i < ed->table_parts_size; i++) |
589 | { | 595 | { |
590 | Edje_Real_Part *rp; | ||
591 | |||
592 | rp = ed->table_parts[i]; | 596 | rp = ed->table_parts[i]; |
593 | evas_object_show(rp->object); | 597 | evas_object_show(rp->object); |
594 | if (_edje_block_break(ed)) break; | 598 | if (_edje_block_break(ed)) break; |
@@ -599,6 +603,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
599 | _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y); | 603 | _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y); |
600 | } | 604 | } |
601 | } | 605 | } |
606 | ed->recalc_call = 1; | ||
602 | ed->dirty = 1; | 607 | ed->dirty = 1; |
603 | #ifdef EDJE_CALC_CACHE | 608 | #ifdef EDJE_CALC_CACHE |
604 | ed->all_part_change = 1; | 609 | ed->all_part_change = 1; |
@@ -606,11 +611,28 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
606 | if ((evas_object_clipees_get(ed->base.clipper)) && | 611 | if ((evas_object_clipees_get(ed->base.clipper)) && |
607 | (evas_object_visible_get(obj))) | 612 | (evas_object_visible_get(obj))) |
608 | evas_object_show(ed->base.clipper); | 613 | evas_object_show(ed->base.clipper); |
609 | 614 | ||
610 | /* instantiate 'internal swallows' */ | 615 | /* instantiate 'internal swallows' */ |
611 | for (i = 0; i < ed->table_parts_size; i++) | 616 | EINA_LIST_FREE(externals, rp) |
617 | { | ||
618 | Edje_Part_Description_External *external; | ||
619 | Evas_Object *child_obj; | ||
620 | |||
621 | external = (Edje_Part_Description_External *) rp->part->default_desc; | ||
622 | child_obj = _edje_external_type_add(rp->part->source, | ||
623 | evas_object_evas_get(ed->obj), ed->obj, | ||
624 | external->external_params, rp->part->name); | ||
625 | if (child_obj) | ||
626 | { | ||
627 | _edje_real_part_swallow(rp, child_obj, EINA_TRUE); | ||
628 | rp->param1.external_params = _edje_external_params_parse(child_obj, | ||
629 | external->external_params); | ||
630 | _edje_external_recalc_apply(ed, rp, NULL, rp->chosen_description); | ||
631 | } | ||
632 | } | ||
633 | |||
634 | EINA_LIST_FREE(sources, rp) | ||
612 | { | 635 | { |
613 | Edje_Real_Part *rp; | ||
614 | /* XXX: curr_item and pack_it don't require to be NULL since | 636 | /* XXX: curr_item and pack_it don't require to be NULL since |
615 | * XXX: they are just used when source != NULL and type == BOX, | 637 | * XXX: they are just used when source != NULL and type == BOX, |
616 | * XXX: and they're always set in this case, but GCC fails to | 638 | * XXX: and they're always set in this case, but GCC fails to |
@@ -620,8 +642,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
620 | unsigned int item_count = 0; | 642 | unsigned int item_count = 0; |
621 | Edje_Pack_Element *pack_it = NULL; | 643 | Edje_Pack_Element *pack_it = NULL; |
622 | const char *source = NULL; | 644 | const char *source = NULL; |
623 | |||
624 | rp = ed->table_parts[i]; | ||
625 | 645 | ||
626 | switch (rp->part->type) | 646 | switch (rp->part->type) |
627 | { | 647 | { |
@@ -643,25 +663,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
643 | } | 663 | } |
644 | } | 664 | } |
645 | break; | 665 | break; |
646 | case EDJE_PART_TYPE_EXTERNAL: | ||
647 | { | ||
648 | Edje_Part_Description_External *external; | ||
649 | Evas_Object *child_obj; | ||
650 | |||
651 | external = (Edje_Part_Description_External *) rp->part->default_desc; | ||
652 | child_obj = _edje_external_type_add(rp->part->source, | ||
653 | evas_object_evas_get(ed->obj), ed->obj, | ||
654 | external->external_params, rp->part->name); | ||
655 | if (child_obj) | ||
656 | { | ||
657 | _edje_real_part_swallow(rp, child_obj, EINA_TRUE); | ||
658 | rp->param1.external_params = _edje_external_params_parse(child_obj, | ||
659 | external->external_params); | ||
660 | _edje_external_recalc_apply(ed, rp, NULL, rp->chosen_description); | ||
661 | } | ||
662 | } | ||
663 | continue; | ||
664 | default: | 666 | default: |
667 | /* This list should only be filled by group, box or table, nothing else. */ | ||
668 | abort(); | ||
665 | continue; | 669 | continue; |
666 | } | 670 | } |
667 | 671 | ||
@@ -682,6 +686,11 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
682 | { | 686 | { |
683 | if (data == group_path_entry) | 687 | if (data == group_path_entry) |
684 | { | 688 | { |
689 | ERR("recursive loop group '%s' already included inside part '%s' of group '%s' from file '%s'", | ||
690 | group_path_entry, rp->part->name, group, file); | ||
691 | textblocks = eina_list_free(textblocks); | ||
692 | externals = eina_list_free(externals); | ||
693 | sources = eina_list_free(sources); | ||
685 | _edje_thaw(ed); | 694 | _edje_thaw(ed); |
686 | _edje_unblock(ed); | 695 | _edje_unblock(ed); |
687 | _edje_unref(ed); | 696 | _edje_unref(ed); |
@@ -698,7 +707,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
698 | return 0; | 707 | return 0; |
699 | } | 708 | } |
700 | } | 709 | } |
701 | 710 | ||
702 | child_obj = edje_object_add(ed->base.evas); | 711 | child_obj = edje_object_add(ed->base.evas); |
703 | group_path = eina_list_append(group_path, group_path_entry); | 712 | group_path = eina_list_append(group_path, group_path_entry); |
704 | if (rp->part->type == EDJE_PART_TYPE_GROUP) | 713 | if (rp->part->type == EDJE_PART_TYPE_GROUP) |
@@ -708,11 +717,16 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
708 | 717 | ||
709 | if (!_edje_object_file_set_internal(child_obj, file, source, rp->part->name, group_path)) | 718 | if (!_edje_object_file_set_internal(child_obj, file, source, rp->part->name, group_path)) |
710 | { | 719 | { |
720 | ERR("impossible to set part '%s' of group '%s' from file '%s' to '%s'", | ||
721 | rp->part->name, group_path_entry, file, source); | ||
722 | textblocks = eina_list_free(textblocks); | ||
723 | externals = eina_list_free(externals); | ||
724 | sources = eina_list_free(sources); | ||
711 | _edje_thaw(ed); | 725 | _edje_thaw(ed); |
712 | _edje_unblock(ed); | 726 | _edje_unblock(ed); |
713 | _edje_unref(ed); | 727 | _edje_unref(ed); |
714 | _edje_file_del(ed); | 728 | _edje_file_del(ed); |
715 | 729 | ||
716 | if (group_path_started) | 730 | if (group_path_started) |
717 | { | 731 | { |
718 | while (group_path) | 732 | while (group_path) |
@@ -794,56 +808,51 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g | |||
794 | { | 808 | { |
795 | const char *name; | 809 | const char *name; |
796 | Evas_Object *swallow; | 810 | Evas_Object *swallow; |
797 | 811 | ||
798 | name = eina_list_data_get(old_swallows); | 812 | name = eina_list_data_get(old_swallows); |
799 | old_swallows = eina_list_remove_list(old_swallows, old_swallows); | 813 | old_swallows = eina_list_remove_list(old_swallows, old_swallows); |
800 | 814 | ||
801 | swallow = eina_list_data_get(old_swallows); | 815 | swallow = eina_list_data_get(old_swallows); |
802 | old_swallows = eina_list_remove_list(old_swallows, old_swallows); | 816 | old_swallows = eina_list_remove_list(old_swallows, old_swallows); |
803 | 817 | ||
804 | edje_object_part_swallow(obj, name, swallow); | 818 | edje_object_part_swallow(obj, name, swallow); |
805 | eina_stringshare_del(name); | 819 | eina_stringshare_del(name); |
806 | } | 820 | } |
807 | } | 821 | } |
808 | 822 | ||
809 | _edje_recalc(ed); | 823 | _edje_recalc(ed); |
810 | _edje_thaw(ed); | 824 | _edje_thaw(ed); |
811 | _edje_unblock(ed); | 825 | _edje_unblock(ed); |
812 | _edje_unref(ed); | 826 | _edje_unref(ed); |
813 | ed->load_error = EDJE_LOAD_ERROR_NONE; | 827 | ed->load_error = EDJE_LOAD_ERROR_NONE; |
814 | _edje_emit(ed, "load", NULL); | 828 | _edje_emit(ed, "load", NULL); |
815 | /* instantiate 'internal swallows' */ | 829 | |
816 | for (i = 0; i < ed->table_parts_size; i++) | 830 | /* instantiate 'internal textblock style' */ |
817 | { | 831 | EINA_LIST_FREE(textblocks, rp) |
818 | Edje_Real_Part *rp; | 832 | if (rp->part->default_desc) |
819 | 833 | { | |
820 | rp = ed->table_parts[i]; | 834 | Edje_Part_Description_Text *text; |
821 | if ((rp->part->type == EDJE_PART_TYPE_TEXTBLOCK) && | 835 | Edje_Style *stl = NULL; |
822 | (rp->part->default_desc)) | 836 | const char *style; |
823 | { | 837 | |
824 | Edje_Part_Description_Text *text; | 838 | text = (Edje_Part_Description_Text *) rp->part->default_desc; |
825 | Edje_Style *stl = NULL; | 839 | style = edje_string_get(&text->text.style); |
826 | const char *style; | 840 | if (style) |
827 | 841 | { | |
828 | text = (Edje_Part_Description_Text *) rp->part->default_desc; | 842 | Eina_List *l; |
829 | style = edje_string_get(&text->text.style); | 843 | |
830 | if (style) | 844 | EINA_LIST_FOREACH(ed->file->styles, l, stl) |
831 | { | 845 | { |
832 | Eina_List *l; | 846 | if ((stl->name) && (!strcmp(stl->name, style))) break; |
833 | 847 | stl = NULL; | |
834 | EINA_LIST_FOREACH(ed->file->styles, l, stl) | 848 | } |
835 | { | 849 | } |
836 | if ((stl->name) && (!strcmp(stl->name, style))) break; | 850 | if (stl) |
837 | stl = NULL; | 851 | { |
838 | } | 852 | if (evas_object_textblock_style_get(rp->object) != stl->style) |
839 | } | 853 | evas_object_textblock_style_set(rp->object, stl->style); |
840 | if (stl) | 854 | } |
841 | { | 855 | } |
842 | if (evas_object_textblock_style_get(rp->object) != stl->style) | ||
843 | evas_object_textblock_style_set(rp->object, stl->style); | ||
844 | } | ||
845 | } | ||
846 | } | ||
847 | } | 856 | } |
848 | _edje_entry_init(ed); | 857 | _edje_entry_init(ed); |
849 | evas_event_thaw(tev); | 858 | evas_event_thaw(tev); |
diff --git a/libraries/edje/src/lib/edje_lua2.c b/libraries/edje/src/lib/edje_lua2.c index 2318af9..1d167e9 100644 --- a/libraries/edje/src/lib/edje_lua2.c +++ b/libraries/edje/src/lib/edje_lua2.c | |||
@@ -376,7 +376,7 @@ _elua_gc(lua_State *L) // Stack usage [-0, +0, e] | |||
376 | // nil ~ | 376 | // nil ~ |
377 | 377 | ||
378 | static char * | 378 | static char * |
379 | _elua_push_name(lua_State *L, char *q, int index) // Stack usage [-0, +1, e or m] | 379 | _elua_push_name(lua_State *L, char *q, int idx) // Stack usage [-0, +1, e or m] |
380 | { | 380 | { |
381 | char *p = q; | 381 | char *p = q; |
382 | char temp = '\0'; | 382 | char temp = '\0'; |
@@ -387,8 +387,8 @@ _elua_push_name(lua_State *L, char *q, int index) // Stack usage [-0, +1, e or | |||
387 | q++; | 387 | q++; |
388 | temp = *q; | 388 | temp = *q; |
389 | *q = '\0'; | 389 | *q = '\0'; |
390 | if (index > 0) | 390 | if (idx > 0) |
391 | lua_getfield(L, index, p); // Stack usage [-0, +1, e] | 391 | lua_getfield(L, idx, p); // Stack usage [-0, +1, e] |
392 | else | 392 | else |
393 | lua_pushstring(L, p); // Stack usage [-0, +1, m] | 393 | lua_pushstring(L, p); // Stack usage [-0, +1, m] |
394 | *q = temp; | 394 | *q = temp; |
@@ -614,6 +614,7 @@ static int _elua_echo(lua_State *L); | |||
614 | static int _elua_date(lua_State *L); | 614 | static int _elua_date(lua_State *L); |
615 | static int _elua_looptime(lua_State *L); | 615 | static int _elua_looptime(lua_State *L); |
616 | static int _elua_seconds(lua_State *L); | 616 | static int _elua_seconds(lua_State *L); |
617 | static int _elua_version(lua_State *L); | ||
617 | 618 | ||
618 | static int _elua_objgeom(lua_State *L); | 619 | static int _elua_objgeom(lua_State *L); |
619 | static int _elua_objpos(lua_State *L); | 620 | static int _elua_objpos(lua_State *L); |
@@ -649,6 +650,7 @@ static const struct luaL_reg _elua_edje_funcs [] = | |||
649 | {"date", _elua_date}, // get date in a table | 650 | {"date", _elua_date}, // get date in a table |
650 | {"looptime", _elua_looptime}, // get loop time | 651 | {"looptime", _elua_looptime}, // get loop time |
651 | {"seconds", _elua_seconds}, // get seconds | 652 | {"seconds", _elua_seconds}, // get seconds |
653 | {"version", _elua_version}, // edje version | ||
652 | 654 | ||
653 | // query edje - size, pos | 655 | // query edje - size, pos |
654 | {"geom", _elua_objgeom}, // get while edje object geometry in canvas | 656 | {"geom", _elua_objgeom}, // get while edje object geometry in canvas |
@@ -801,6 +803,25 @@ _elua_seconds(lua_State *L) // Stack usage [-0, +1, -] | |||
801 | return 1; | 803 | return 1; |
802 | } | 804 | } |
803 | 805 | ||
806 | /** | ||
807 | @page luaref | ||
808 | @subsubsection edje_version edje:version() | ||
809 | |||
810 | Retrieves the current edje version number. | ||
811 | |||
812 | @returns A table with these fields: | ||
813 | - integer major: The edje version major number. | ||
814 | - integer minor: The edje version minor number. | ||
815 | |||
816 | @since 1.2.0 | ||
817 | */ | ||
818 | static int | ||
819 | _elua_version(lua_State *L) // Stack usage [-4, +5, em] | ||
820 | { | ||
821 | _elua_ret(L, "%major %minor", EDJE_VERSION_MAJOR, EDJE_VERSION_MINOR); // Stack usage [-4, +5, em] | ||
822 | return 1; | ||
823 | } | ||
824 | |||
804 | //------------- | 825 | //------------- |
805 | /** | 826 | /** |
806 | @page luaref | 827 | @page luaref |
@@ -2936,7 +2957,9 @@ static int _elua_line_xy(lua_State *L) // Stack usage [ | |||
2936 | 2957 | ||
2937 | The lua evas map class includes functions for dealing with evas map objects. | 2958 | The lua evas map class includes functions for dealing with evas map objects. |
2938 | The evas map objects must have been previously created by lua using the lua | 2959 | The evas map objects must have been previously created by lua using the lua |
2939 | map object creation function edje:map(). | 2960 | map object creation function edje:map(). The evas map system is complex, rather |
2961 | than repeat the copious documentation here, please refer to the evas map | ||
2962 | documentation. It has pictures and everything. B-) | ||
2940 | 2963 | ||
2941 | In the following, "map_object" is a place holder for any lua variable that | 2964 | In the following, "map_object" is a place holder for any lua variable that |
2942 | holds a reference to an evas map object. | 2965 | holds a reference to an evas map object. |
@@ -2980,8 +3003,18 @@ static const struct luaL_reg _elua_evas_map_funcs [] = | |||
2980 | 3003 | ||
2981 | /** | 3004 | /** |
2982 | @page luaref | 3005 | @page luaref |
2983 | @subsubsection map_alpha map_object:alpha() | 3006 | @subsubsection map_alpha map_object:alpha(alpha) |
3007 | |||
3008 | Get (and optionally set) the maps alpha mode. | ||
3009 | |||
3010 | Wraps evas_map_alpha_set(). | ||
2984 | 3011 | ||
3012 | @param alpha The alpha mode. | ||
3013 | |||
3014 | Note that the argument is optional, without it this function just queries the | ||
3015 | current value. | ||
3016 | |||
3017 | @return A boolean reflecting the alpha mode. | ||
2985 | 3018 | ||
2986 | @since 1.1.0 | 3019 | @since 1.1.0 |
2987 | */ | 3020 | */ |
@@ -3008,6 +3041,11 @@ _elua_map_alpha(lua_State *L) // Stack usage [ | |||
3008 | @page luaref | 3041 | @page luaref |
3009 | @subsubsection map_clockwise map_object:clockwise() | 3042 | @subsubsection map_clockwise map_object:clockwise() |
3010 | 3043 | ||
3044 | Get the maps clockwise state. | ||
3045 | |||
3046 | Wraps evas_map_util_clockwise_get(). | ||
3047 | |||
3048 | @return A boolean reflecting if the map is clockwise or not. | ||
3011 | 3049 | ||
3012 | @since 1.1.0 | 3050 | @since 1.1.0 |
3013 | */ | 3051 | */ |
@@ -3025,8 +3063,30 @@ _elua_map_clockwise(lua_State *L) // Stack usage [ | |||
3025 | 3063 | ||
3026 | /** | 3064 | /** |
3027 | @page luaref | 3065 | @page luaref |
3028 | @subsubsection map_colour map_object:colour() | 3066 | @subsubsection map_colour map_object:colour(index, r, g, b, a) |
3029 | 3067 | ||
3068 | Gets or sets colour information for the map. There are two variations, with or | ||
3069 | without the index. With the index parameter it gets (and optionally sets) the | ||
3070 | colour of the point the index refers to, without it sets the colour for the | ||
3071 | entire map. | ||
3072 | |||
3073 | Wraps evas_map_point_color_set() or evas_map_util_points_color_set() | ||
3074 | |||
3075 | @param index Which point to change the colour of. | ||
3076 | @param r The new red value. | ||
3077 | @param g The new green value. | ||
3078 | @param b The new blue value. | ||
3079 | @param a The new alpha value. | ||
3080 | |||
3081 | Note that the arguments are optional, without them this function just queries | ||
3082 | the current values. The colour arguments can be separate values, or named | ||
3083 | fields in a table. | ||
3084 | |||
3085 | @return A table with these fields: | ||
3086 | - integer r: The red value. | ||
3087 | - integer g: The green value. | ||
3088 | - integer b: The blue value. | ||
3089 | - integer a: The alpha value. | ||
3030 | 3090 | ||
3031 | @since 1.1.0 | 3091 | @since 1.1.0 |
3032 | */ | 3092 | */ |
@@ -3073,8 +3133,24 @@ _elua_map_colour(lua_State *L) // Stack usage [ | |||
3073 | 3133 | ||
3074 | /** | 3134 | /** |
3075 | @page luaref | 3135 | @page luaref |
3076 | @subsubsection map_coord map_object:coord() | 3136 | @subsubsection map_coord map_object:coord(index, x, y, z) |
3137 | |||
3138 | Gets (and optionally sets) the 3D coordinates of a point on the map. | ||
3139 | |||
3140 | Wraps evas_map_point_coord_set(). | ||
3141 | |||
3142 | @param x The x coordinate of the point. | ||
3143 | @param y The y coordinate of the point. | ||
3144 | @param z The z coordinate of the point. | ||
3145 | |||
3146 | Note that the arguments are optional, without them this function just queries | ||
3147 | the current values. The coordinate arguments can be separate values, or named | ||
3148 | fields in a table. | ||
3077 | 3149 | ||
3150 | @return A table with these fields: | ||
3151 | - integer x: The x coordinate of the point. | ||
3152 | - integer y: The y coordinate of the point. | ||
3153 | - integer z: The z coordinate of the point. | ||
3078 | 3154 | ||
3079 | @since 1.1.0 | 3155 | @since 1.1.0 |
3080 | */ | 3156 | */ |
@@ -3104,8 +3180,21 @@ _elua_map_coord(lua_State *L) // Stack usage [ | |||
3104 | 3180 | ||
3105 | /** | 3181 | /** |
3106 | @page luaref | 3182 | @page luaref |
3107 | @subsubsection map_lighting map_object:lighting() | 3183 | @subsubsection map_lighting map_object:lighting(x, y, z, r, g, b, ar, ag, ab) |
3184 | |||
3185 | Set the 3D lights for the map. The three triplets can be tables. | ||
3108 | 3186 | ||
3187 | Wraps evas_map_util_3d_lighting(). | ||
3188 | |||
3189 | @param x The x coordinate of the light point. | ||
3190 | @param y The y coordinate of the light point. | ||
3191 | @param z The z coordinate of the light point. | ||
3192 | @param r The new red value of the light point. | ||
3193 | @param g The new green value of the light point. | ||
3194 | @param b The new blue value of the light point. | ||
3195 | @param ar The new red value of the ambient light. | ||
3196 | @param ag The new green value of the ambient light. | ||
3197 | @param ab The new blue value of the ambient light. | ||
3109 | 3198 | ||
3110 | @since 1.1.0 | 3199 | @since 1.1.0 |
3111 | */ | 3200 | */ |
@@ -3133,8 +3222,18 @@ _elua_map_lighting(lua_State *L) // Stack usage [ | |||
3133 | 3222 | ||
3134 | /** | 3223 | /** |
3135 | @page luaref | 3224 | @page luaref |
3136 | @subsubsection map_perspective map_object:perspective() | 3225 | @subsubsection map_perspective map_object:perspective(x, y, z, f) |
3226 | |||
3227 | Apply a perspective transform to the map. | ||
3228 | |||
3229 | Wraps evas_map_util_3d_perspective(). | ||
3137 | 3230 | ||
3231 | The arguments can be separate values, or named fields in a table. | ||
3232 | |||
3233 | @param x The perspective distance X coordinate | ||
3234 | @param y The perspective distance Y coordinate | ||
3235 | @param z The "0" z plane value | ||
3236 | @param f The focal distance | ||
3138 | 3237 | ||
3139 | @since 1.1.0 | 3238 | @since 1.1.0 |
3140 | */ | 3239 | */ |
@@ -3156,8 +3255,28 @@ _elua_map_perspective(lua_State *L) // Stack usage [ | |||
3156 | 3255 | ||
3157 | /** | 3256 | /** |
3158 | @page luaref | 3257 | @page luaref |
3159 | @subsubsection map_populate map_object:populate() | 3258 | @subsubsection map_populate map_object:populate(...) |
3259 | |||
3260 | Populate the points in a map, in one of three different methods. | ||
3261 | |||
3262 | 1) Wraps evas_map_util_points_populate_from_object(). | ||
3263 | |||
3264 | @param source An evas object to copy points from. | ||
3265 | |||
3266 | 2) Wraps evas_map_util_paints_populate_from_object_full(). | ||
3267 | |||
3268 | @param source An evas object to copy points from. | ||
3269 | @param z Common Z coordinate hint for all four points. | ||
3160 | 3270 | ||
3271 | 3) Wraps evas_map_util_points_populate_from_geometry(). | ||
3272 | |||
3273 | The first four arguments can be separate values, or named fields in a table. | ||
3274 | |||
3275 | @param x Point X coordinate | ||
3276 | @param y Point Y coordinate | ||
3277 | @param w Width to use to calculate second and third points. | ||
3278 | @param h Height to use to calculate third and fourth points. | ||
3279 | @param z Common Z coordinate hint for all four points. | ||
3161 | 3280 | ||
3162 | @since 1.1.0 | 3281 | @since 1.1.0 |
3163 | */ | 3282 | */ |
@@ -3210,8 +3329,17 @@ _elua_map_populate(lua_State *L) // Stack usage [ | |||
3210 | 3329 | ||
3211 | /** | 3330 | /** |
3212 | @page luaref | 3331 | @page luaref |
3213 | @subsubsection map_rotate map_object:rotate() | 3332 | @subsubsection map_rotate map_object:rotate(degrees, x, y) |
3333 | |||
3334 | Rotate the maps coordinates in 2D. | ||
3214 | 3335 | ||
3336 | Wraps evas_map_util_rotate(). | ||
3337 | |||
3338 | The coordinates can be separate values, or named fields in a table. | ||
3339 | |||
3340 | @param degrees Amount of degrees from 0.0 to 360.0 to rotate. | ||
3341 | @param x Rotation's centre horizontal position. | ||
3342 | @param y Rotation's centre vertical position. | ||
3215 | 3343 | ||
3216 | @since 1.1.0 | 3344 | @since 1.1.0 |
3217 | */ | 3345 | */ |
@@ -3238,8 +3366,21 @@ _elua_map_rotate(lua_State *L) // Stack usage [ | |||
3238 | 3366 | ||
3239 | /** | 3367 | /** |
3240 | @page luaref | 3368 | @page luaref |
3241 | @subsubsection map_rotate3d map_object:rotate3d() | 3369 | @subsubsection map_rotate3d map_object:rotate3d(dx, dy, dz, x, y, z) |
3370 | |||
3371 | Rotate the maps coordinates in 3D. | ||
3242 | 3372 | ||
3373 | Wraps evas_map_util_3d_rotate(). | ||
3374 | |||
3375 | The coordinates can be separate values, or named fields in a table. The same | ||
3376 | with the rotation. | ||
3377 | |||
3378 | @param dx Amount of degrees from 0.0 to 360.0 to rotate around X axis. | ||
3379 | @param dy Amount of degrees from 0.0 to 360.0 to rotate around Y axis. | ||
3380 | @param dz Amount of degrees from 0.0 to 360.0 to rotate around Z axis. | ||
3381 | @param x Rotation's centre horizontal position. | ||
3382 | @param y Rotation's centre vertical position. | ||
3383 | @param z Rotation's centre vertical position. | ||
3243 | 3384 | ||
3244 | @since 1.1.0 | 3385 | @since 1.1.0 |
3245 | */ | 3386 | */ |
@@ -3265,8 +3406,18 @@ _elua_map_rotate3d(lua_State *L) // Stack usage [ | |||
3265 | 3406 | ||
3266 | /** | 3407 | /** |
3267 | @page luaref | 3408 | @page luaref |
3268 | @subsubsection map_smooth map_object:smooth() | 3409 | @subsubsection map_smooth map_object:smooth(smooth) |
3410 | |||
3411 | Get (and optionally set) the maps smooth mode. | ||
3412 | |||
3413 | Wraps evas_map_smooth_set(). | ||
3414 | |||
3415 | @param smooth The smooth mode. | ||
3416 | |||
3417 | Note that the argument is optional, without it this function just queries the | ||
3418 | current value. | ||
3269 | 3419 | ||
3420 | @return A boolean reflecting the smooth mode. | ||
3270 | 3421 | ||
3271 | @since 1.1.0 | 3422 | @since 1.1.0 |
3272 | */ | 3423 | */ |
@@ -3291,8 +3442,23 @@ _elua_map_smooth(lua_State *L) // Stack usage [ | |||
3291 | 3442 | ||
3292 | /** | 3443 | /** |
3293 | @page luaref | 3444 | @page luaref |
3294 | @subsubsection map_uv map_object:uv() | 3445 | @subsubsection map_uv map_object:uv(index, u, v) |
3446 | |||
3447 | Gets (and optionally sets) the texture U and V texture coordinates for this map. | ||
3448 | |||
3449 | Wraps evas_map_point_image_uv_set(). | ||
3450 | |||
3451 | @param index Index of the point to change. Must be smaller than map size. | ||
3452 | @param u The X coordinate within the image/texture source. | ||
3453 | @param v The Y coordinate within the image/texture source. | ||
3454 | |||
3455 | Note that the U,V arguments are optional, without them this function just queries | ||
3456 | the current values. The coordinate arguments can be separate values, or named | ||
3457 | fields in a table. | ||
3295 | 3458 | ||
3459 | @return A table with these fields: | ||
3460 | - number u: The X coordinate within the image/texture source. | ||
3461 | - number v: The Y coordinate within the image/texture source. | ||
3296 | 3462 | ||
3297 | @since 1.1.0 | 3463 | @since 1.1.0 |
3298 | */ | 3464 | */ |
@@ -3322,8 +3488,18 @@ _elua_map_uv(lua_State *L) // Stack usage [ | |||
3322 | 3488 | ||
3323 | /** | 3489 | /** |
3324 | @page luaref | 3490 | @page luaref |
3325 | @subsubsection map_zoom map_object:zoom() | 3491 | @subsubsection map_zoom map_object:zoom(x, y, x, y) |
3492 | |||
3493 | Apply a zoom to the map. | ||
3494 | |||
3495 | Wraps evas_map_util_zoom(). | ||
3326 | 3496 | ||
3497 | The arguments can be two separate values, or named fields in a table. | ||
3498 | |||
3499 | @param x The horizontal zoom amount. | ||
3500 | @param y The vertical zoom amount. | ||
3501 | @param x The X coordinate of the centre of the zoom. | ||
3502 | @param y The Y coordinate of the centre of the zoom. | ||
3327 | 3503 | ||
3328 | @since 1.1.0 | 3504 | @since 1.1.0 |
3329 | */ | 3505 | */ |
@@ -3530,7 +3706,7 @@ _elua_text_font(lua_State *L) // Stack usage [ | |||
3530 | @page luaref | 3706 | @page luaref |
3531 | @subsubsection text_text text_object:text(text) | 3707 | @subsubsection text_text text_object:text(text) |
3532 | 3708 | ||
3533 | Get (and optionally set) the actual tetx for this text object. | 3709 | Get (and optionally set) the actual text for this text object. |
3534 | 3710 | ||
3535 | Wraps evas_object_text_text_set(). | 3711 | Wraps evas_object_text_text_set(). |
3536 | 3712 | ||
@@ -3569,25 +3745,80 @@ _elua_text_text(lua_State *L) // Stack usage [ | |||
3569 | 3745 | ||
3570 | 3746 | ||
3571 | //--------------------------------------------------------------------------// | 3747 | //--------------------------------------------------------------------------// |
3748 | |||
3749 | // A metatable and functions so that calling non existant API does not crash Lua scripts. | ||
3750 | |||
3751 | static int _elua_bogan_nilfunc(lua_State *L); | ||
3752 | static int _elua_bogan_index(lua_State *L); | ||
3753 | |||
3754 | static const struct luaL_reg _elua_bogan_funcs [] = | ||
3755 | { | ||
3756 | {"nilfunc", _elua_bogan_nilfunc}, // Just return a nil. | ||
3757 | {"__index", _elua_bogan_index}, // Return the above func. | ||
3758 | |||
3759 | {NULL, NULL} // end | ||
3760 | }; | ||
3761 | |||
3762 | static int | ||
3763 | _elua_bogan_nilfunc(lua_State *L) | ||
3764 | { | ||
3765 | lua_getglobal(L, "nil"); | ||
3766 | return 1; | ||
3767 | } | ||
3768 | |||
3769 | static int | ||
3770 | _elua_bogan_index(lua_State *L) | ||
3771 | { | ||
3772 | const char *key; | ||
3773 | |||
3774 | key = lua_tostring(L, 2); | ||
3775 | LE("%s does not exist!", key); | ||
3776 | lua_pushcfunction(L, _elua_bogan_nilfunc); | ||
3777 | return 1; | ||
3778 | } | ||
3779 | |||
3780 | static void | ||
3781 | _elua_bogan_protect(lua_State *L) // Stack usage [-3, +3, m] | ||
3782 | { | ||
3783 | lua_pushnil(L); // Stack usage [-0, +1, -] | ||
3784 | luaL_newmetatable(L, "bogan"); // Stack usage [-0, +1, m] | ||
3785 | luaL_register(L, 0, _elua_bogan_funcs); // Stack usage [-1, +1, m] | ||
3786 | lua_setmetatable(L, -2); // Stack usage [-1, +0, -] | ||
3787 | lua_pop(L, 1); // Stack usage [-1, +0, -] | ||
3788 | } | ||
3789 | |||
3790 | //--------------------------------------------------------------------------// | ||
3791 | |||
3572 | // Brain dead inheritance thingy, built for speed. Kinda. Part 1. | 3792 | // Brain dead inheritance thingy, built for speed. Kinda. Part 1. |
3573 | static void | 3793 | static void |
3574 | _elua_add_functions(lua_State *L, const char *api, const luaL_Reg *funcs, const char *meta, const char *parent, const char *base) // Stack usage [-3, +5, m] if inheriting [-6, +11, em] | 3794 | _elua_add_functions(lua_State *L, const char *api, const luaL_Reg *funcs, const char *meta, const char *parent, const char *base) // Stack usage [-3, +5, m] if inheriting [-6, +11, em] |
3575 | { | 3795 | { |
3796 | // Create an api table, fill it full of the methods. | ||
3576 | luaL_register(L, api, funcs); // Stack usage [-0, +1, m] | 3797 | luaL_register(L, api, funcs); // Stack usage [-0, +1, m] |
3798 | // Set the api metatable to the bogan metatable. | ||
3799 | luaL_getmetatable(L, "bogan"); // Stack usage [-0, +1, -] | ||
3800 | lua_setmetatable(L, -2); // Stack usage [-1, +0, -] | ||
3801 | // Creat a meta metatable. | ||
3577 | luaL_newmetatable(L, meta); // Stack usage [-0, +1, m] | 3802 | luaL_newmetatable(L, meta); // Stack usage [-0, +1, m] |
3803 | // Put the gc functions in the metatable. | ||
3578 | luaL_register(L, 0, _elua_edje_gc_funcs); // Stack usage [-1, +1, m] | 3804 | luaL_register(L, 0, _elua_edje_gc_funcs); // Stack usage [-1, +1, m] |
3805 | // Create an __index entry in the metatable, make it point to the api table. | ||
3579 | lua_pushliteral(L, "__index"); // Stack usage [-0, +1, m] | 3806 | lua_pushliteral(L, "__index"); // Stack usage [-0, +1, m] |
3580 | lua_pushvalue(L, -3); // Stack usage [-0, +1, -] | 3807 | lua_pushvalue(L, -3); // Stack usage [-0, +1, -] |
3581 | lua_rawset(L, -3); // Stack usage [-2, +0, m] | 3808 | lua_rawset(L, -3); // Stack usage [-2, +0, m] |
3809 | // Later this metatable is used as the metatable for newly created objects of this class. | ||
3582 | 3810 | ||
3583 | if (base && parent) | 3811 | if (base && parent) |
3584 | { | 3812 | { |
3585 | // Inherit from base | 3813 | // Inherit from base |
3586 | lua_getglobal(L, base); // Stack usage [-0, +1, e] | 3814 | lua_getglobal(L, base); // Stack usage [-0, +1, e] |
3815 | // Create a new parent metatable. | ||
3587 | luaL_newmetatable(L, parent); // Stack usage [-0, +1, m] | 3816 | luaL_newmetatable(L, parent); // Stack usage [-0, +1, m] |
3817 | // Create an __index entry in the metatable, make it point to the base table. | ||
3588 | lua_pushliteral(L, "__index"); // Stack usage [-0, +1, m] | 3818 | lua_pushliteral(L, "__index"); // Stack usage [-0, +1, m] |
3589 | lua_pushvalue(L, -3); // Stack usage [-0, +1, -] | 3819 | lua_pushvalue(L, -3); // Stack usage [-0, +1, -] |
3590 | lua_rawset(L, -3); // Stack usage [-2, +0, m] | 3820 | lua_rawset(L, -3); // Stack usage [-2, +0, m] |
3821 | // Set the metatable for the api table to the parent metatable. | ||
3591 | lua_getglobal(L, api); // Stack usage [-0, +1, e] | 3822 | lua_getglobal(L, api); // Stack usage [-0, +1, e] |
3592 | luaL_getmetatable(L, parent); // Stack usage [-0, +1, -] | 3823 | luaL_getmetatable(L, parent); // Stack usage [-0, +1, -] |
3593 | lua_setmetatable(L, -2); // Stack usage [-1, +0, -] | 3824 | lua_setmetatable(L, -2); // Stack usage [-1, +0, -] |
@@ -3695,7 +3926,11 @@ _edje_lua2_script_init(Edje *ed) // Stack usage | |||
3695 | lua_call(L, 1, 0); // Stack usage [-2, +0, m] | 3926 | lua_call(L, 1, 0); // Stack usage [-2, +0, m] |
3696 | } | 3927 | } |
3697 | 3928 | ||
3929 | _elua_bogan_protect(L); // Stack usage [+3, -3, m] | ||
3930 | |||
3698 | luaL_register(L, _elua_edje_api, _elua_edje_funcs); // Stack usage [-0, +1, m] | 3931 | luaL_register(L, _elua_edje_api, _elua_edje_funcs); // Stack usage [-0, +1, m] |
3932 | luaL_getmetatable(L, "bogan"); // Stack usage [-0, +1, -] | ||
3933 | lua_setmetatable(L, -2); // Stack usage [-1, +0, -] | ||
3699 | luaL_newmetatable(L, _elua_edje_meta); // Stack usage [-0, +1, m] | 3934 | luaL_newmetatable(L, _elua_edje_meta); // Stack usage [-0, +1, m] |
3700 | luaL_register(L, 0, _elua_edje_gc_funcs); // Stack usage [-1, +1, m] | 3935 | luaL_register(L, 0, _elua_edje_gc_funcs); // Stack usage [-1, +1, m] |
3701 | 3936 | ||
@@ -3737,6 +3972,8 @@ _edje_lua2_script_init(Edje *ed) // Stack usage | |||
3737 | { | 3972 | { |
3738 | int err; | 3973 | int err; |
3739 | 3974 | ||
3975 | /* This ends up pushing a function onto the stack for the lua_pcall() below to use. | ||
3976 | * The function is the compiled code. */ | ||
3740 | err = luaL_loadbuffer(L, data, size, "edje_lua_script"); // Stack usage [-0, +1, m] | 3977 | err = luaL_loadbuffer(L, data, size, "edje_lua_script"); // Stack usage [-0, +1, m] |
3741 | if (err) | 3978 | if (err) |
3742 | { | 3979 | { |
diff --git a/libraries/edje/src/lib/edje_main.c b/libraries/edje/src/lib/edje_main.c index cf443c7..5d011ad 100644 --- a/libraries/edje/src/lib/edje_main.c +++ b/libraries/edje/src/lib/edje_main.c | |||
@@ -22,10 +22,7 @@ edje_init(void) | |||
22 | srand(time(NULL)); | 22 | srand(time(NULL)); |
23 | 23 | ||
24 | if (!eina_init()) | 24 | if (!eina_init()) |
25 | { | 25 | return --_edje_init_count; |
26 | fprintf(stderr, "Edje: Eina init failed"); | ||
27 | return --_edje_init_count; | ||
28 | } | ||
29 | 26 | ||
30 | _edje_default_log_dom = eina_log_domain_register | 27 | _edje_default_log_dom = eina_log_domain_register |
31 | ("edje", EDJE_DEFAULT_LOG_COLOR); | 28 | ("edje", EDJE_DEFAULT_LOG_COLOR); |
diff --git a/libraries/edje/src/lib/edje_message_queue.c b/libraries/edje/src/lib/edje_message_queue.c index 1a313a5..5628ccc 100644 --- a/libraries/edje/src/lib/edje_message_queue.c +++ b/libraries/edje/src/lib/edje_message_queue.c | |||
@@ -364,8 +364,8 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, | |||
364 | } | 364 | } |
365 | if (_injob > 0) | 365 | if (_injob > 0) |
366 | { | 366 | { |
367 | if (_job_loss_timer) ecore_timer_del(_job_loss_timer); | 367 | if (!_job_loss_timer) |
368 | _job_loss_timer = ecore_timer_add(0.001, _edje_job_loss_timer, NULL); | 368 | _job_loss_timer = ecore_timer_add(0.001, _edje_job_loss_timer, NULL); |
369 | } | 369 | } |
370 | else | 370 | else |
371 | { | 371 | { |
diff --git a/libraries/edje/src/lib/edje_module.c b/libraries/edje/src/lib/edje_module.c index effcee1..358295b 100644 --- a/libraries/edje/src/lib/edje_module.c +++ b/libraries/edje/src/lib/edje_module.c | |||
@@ -136,12 +136,12 @@ edje_available_modules_get(void) | |||
136 | 136 | ||
137 | snprintf(tmp, sizeof (tmp), "%s/%s/" EDJE_MODULE_NAME, info->path, MODULE_ARCH | 137 | snprintf(tmp, sizeof (tmp), "%s/%s/" EDJE_MODULE_NAME, info->path, MODULE_ARCH |
138 | #ifdef EDJE_EXTRA_MODULE_NAME | 138 | #ifdef EDJE_EXTRA_MODULE_NAME |
139 | , ecore_file_file_get(info->path) | 139 | , info->path + info->name_start |
140 | #endif | 140 | #endif |
141 | ); | 141 | ); |
142 | 142 | ||
143 | if (ecore_file_exists(tmp)) | 143 | if (ecore_file_exists(tmp)) |
144 | result = eina_list_append(result, eina_stringshare_add(ecore_file_file_get(info->path))); | 144 | result = eina_list_append(result, eina_stringshare_add(info->path + info->name_start)); |
145 | } | 145 | } |
146 | 146 | ||
147 | eina_iterator_free(it); | 147 | eina_iterator_free(it); |
diff --git a/libraries/edje/src/lib/edje_multisense.c b/libraries/edje/src/lib/edje_multisense.c index f9c7f91..f3324e7 100644 --- a/libraries/edje/src/lib/edje_multisense.c +++ b/libraries/edje/src/lib/edje_multisense.c | |||
@@ -351,8 +351,10 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c | |||
351 | command.type.sample.speed = speed; | 351 | command.type.sample.speed = speed; |
352 | size = write(command_pipe[1], &command, sizeof(command)); | 352 | size = write(command_pipe[1], &command, sizeof(command)); |
353 | #else | 353 | #else |
354 | ed = NULL; // warning shh | 354 | // warning shh |
355 | if (speed > 0) sample_name = NULL; // warning shh | 355 | (void) ed; |
356 | (void) sample_name; | ||
357 | (void) speed; | ||
356 | #endif | 358 | #endif |
357 | return (size == sizeof(Edje_Multisense_Sound_Action)); | 359 | return (size == sizeof(Edje_Multisense_Sound_Action)); |
358 | } | 360 | } |
@@ -371,8 +373,10 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const | |||
371 | command.type.tone.duration = duration; | 373 | command.type.tone.duration = duration; |
372 | size = write(command_pipe[1], &command, sizeof(command)); | 374 | size = write(command_pipe[1], &command, sizeof(command)); |
373 | #else | 375 | #else |
374 | ed = NULL; // warning shh | 376 | // warning shh |
375 | if (duration > 0) tone_name = NULL; // warning shh | 377 | (void) ed; |
378 | (void) duration; | ||
379 | (void) tone_name; | ||
376 | #endif | 380 | #endif |
377 | return (size == sizeof(Edje_Multisense_Sound_Action)); | 381 | return (size == sizeof(Edje_Multisense_Sound_Action)); |
378 | 382 | ||
diff --git a/libraries/edje/src/lib/edje_private.h b/libraries/edje/src/lib/edje_private.h index cbb3e03..8bf18eb 100644 --- a/libraries/edje/src/lib/edje_private.h +++ b/libraries/edje/src/lib/edje_private.h | |||
@@ -192,7 +192,8 @@ typedef enum | |||
192 | EDJE_ASPECT_PREFER_NONE, | 192 | EDJE_ASPECT_PREFER_NONE, |
193 | EDJE_ASPECT_PREFER_VERTICAL, | 193 | EDJE_ASPECT_PREFER_VERTICAL, |
194 | EDJE_ASPECT_PREFER_HORIZONTAL, | 194 | EDJE_ASPECT_PREFER_HORIZONTAL, |
195 | EDJE_ASPECT_PREFER_BOTH | 195 | EDJE_ASPECT_PREFER_BOTH, |
196 | EDJE_ASPECT_PREFER_SOURCE | ||
196 | } Edje_Internal_Aspect; | 197 | } Edje_Internal_Aspect; |
197 | 198 | ||
198 | struct _Edje_Perspective | 199 | struct _Edje_Perspective |
@@ -232,7 +233,7 @@ struct _Edje_Color | |||
232 | struct _Edje_Aspect_Prefer | 233 | struct _Edje_Aspect_Prefer |
233 | { | 234 | { |
234 | FLOAT_T min, max; | 235 | FLOAT_T min, max; |
235 | Edje_Internal_Aspect prefer; | 236 | char prefer; |
236 | }; | 237 | }; |
237 | 238 | ||
238 | struct _Edje_Aspect | 239 | struct _Edje_Aspect |
@@ -834,6 +835,11 @@ struct _Edje_Part_Description_Common | |||
834 | unsigned char w, h; /* width or height is fixed in side (cannot expand with Edje object size) */ | 835 | unsigned char w, h; /* width or height is fixed in side (cannot expand with Edje object size) */ |
835 | } fixed; | 836 | } fixed; |
836 | 837 | ||
838 | struct { // only during recalc | ||
839 | unsigned char have; | ||
840 | FLOAT_T w, h; | ||
841 | } minmul; | ||
842 | |||
837 | Edje_Size min, max; | 843 | Edje_Size min, max; |
838 | Edje_Position step; /* size stepping by n pixels, 0 = none */ | 844 | Edje_Position step; /* size stepping by n pixels, 0 = none */ |
839 | Edje_Aspect_Prefer aspect; | 845 | Edje_Aspect_Prefer aspect; |
@@ -1138,6 +1144,7 @@ struct _Edje | |||
1138 | unsigned int all_part_change : 1; | 1144 | unsigned int all_part_change : 1; |
1139 | #endif | 1145 | #endif |
1140 | unsigned int have_mapped_part : 1; | 1146 | unsigned int have_mapped_part : 1; |
1147 | unsigned int recalc_call : 1; | ||
1141 | }; | 1148 | }; |
1142 | 1149 | ||
1143 | struct _Edje_Calc_Params | 1150 | struct _Edje_Calc_Params |
@@ -1915,7 +1922,7 @@ void _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur); | |||
1915 | Eina_Bool _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur, int x, int y); | 1922 | Eina_Bool _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur, int x, int y); |
1916 | Eina_Bool _edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur); | 1923 | Eina_Bool _edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur); |
1917 | Eina_Bool _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur); | 1924 | Eina_Bool _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur); |
1918 | const char *_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur); | 1925 | char *_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur); |
1919 | void _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos); | 1926 | void _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos); |
1920 | int _edje_entry_cursor_pos_get(Edje_Real_Part *rp, Edje_Cursor cur); | 1927 | int _edje_entry_cursor_pos_get(Edje_Real_Part *rp, Edje_Cursor cur); |
1921 | void _edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout layout); | 1928 | void _edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout layout); |
diff --git a/libraries/edje/src/lib/edje_program.c b/libraries/edje/src/lib/edje_program.c index 505b6a2..d80c7c9 100644 --- a/libraries/edje/src/lib/edje_program.c +++ b/libraries/edje/src/lib/edje_program.c | |||
@@ -992,7 +992,7 @@ _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*f | |||
992 | break ; | 992 | break ; |
993 | 993 | ||
994 | default: | 994 | default: |
995 | fprintf(stderr, "SPANK SPANK SPANK !!!\nYou should never be here !\n"); | 995 | ERR("SPANK SPANK SPANK !!!\nYou should never be here !"); |
996 | break; | 996 | break; |
997 | } | 997 | } |
998 | } | 998 | } |
@@ -1621,6 +1621,7 @@ _edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External | |||
1621 | if (param->type != EDJE_EXTERNAL_PARAM_TYPE_DOUBLE) | 1621 | if (param->type != EDJE_EXTERNAL_PARAM_TYPE_DOUBLE) |
1622 | return EINA_FALSE; | 1622 | return EINA_FALSE; |
1623 | rp->drag->size.x = FROM_DOUBLE(CLAMP(param->d, 0.0, 1.0)); | 1623 | rp->drag->size.x = FROM_DOUBLE(CLAMP(param->d, 0.0, 1.0)); |
1624 | rp->edje->recalc_call = 1; | ||
1624 | rp->edje->dirty = 1; | 1625 | rp->edje->dirty = 1; |
1625 | #ifdef EDJE_CALC_CACHE | 1626 | #ifdef EDJE_CALC_CACHE |
1626 | rp->invalidate = 1; | 1627 | rp->invalidate = 1; |
@@ -1633,6 +1634,7 @@ _edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External | |||
1633 | if (param->type != EDJE_EXTERNAL_PARAM_TYPE_DOUBLE) | 1634 | if (param->type != EDJE_EXTERNAL_PARAM_TYPE_DOUBLE) |
1634 | return EINA_FALSE; | 1635 | return EINA_FALSE; |
1635 | rp->drag->size.y = FROM_DOUBLE(CLAMP(param->d, 0.0, 1.0)); | 1636 | rp->drag->size.y = FROM_DOUBLE(CLAMP(param->d, 0.0, 1.0)); |
1637 | rp->edje->recalc_call = 1; | ||
1636 | rp->edje->dirty = 1; | 1638 | rp->edje->dirty = 1; |
1637 | #ifdef EDJE_CALC_CACHE | 1639 | #ifdef EDJE_CALC_CACHE |
1638 | rp->invalidate = 1; | 1640 | rp->invalidate = 1; |
diff --git a/libraries/edje/src/lib/edje_util.c b/libraries/edje/src/lib/edje_util.c index dbb37a7..2205ba3 100644 --- a/libraries/edje/src/lib/edje_util.c +++ b/libraries/edje/src/lib/edje_util.c | |||
@@ -438,6 +438,7 @@ edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2 | |||
438 | 438 | ||
439 | ed = eina_list_data_get(members); | 439 | ed = eina_list_data_get(members); |
440 | ed->dirty = 1; | 440 | ed->dirty = 1; |
441 | ed->recalc_call = 1; | ||
441 | #ifdef EDJE_CALC_CACHE | 442 | #ifdef EDJE_CALC_CACHE |
442 | ed->all_part_change = 1; | 443 | ed->all_part_change = 1; |
443 | #endif | 444 | #endif |
@@ -504,6 +505,7 @@ edje_color_class_del(const char *color_class) | |||
504 | 505 | ||
505 | ed = eina_list_data_get(members); | 506 | ed = eina_list_data_get(members); |
506 | ed->dirty = 1; | 507 | ed->dirty = 1; |
508 | ed->recalc_call = 1; | ||
507 | #ifdef EDJE_CALC_CACHE | 509 | #ifdef EDJE_CALC_CACHE |
508 | ed->all_part_change = 1; | 510 | ed->all_part_change = 1; |
509 | #endif | 511 | #endif |
@@ -583,6 +585,7 @@ edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, in | |||
583 | cc->b3 = b3; | 585 | cc->b3 = b3; |
584 | cc->a3 = a3; | 586 | cc->a3 = a3; |
585 | ed->dirty = 1; | 587 | ed->dirty = 1; |
588 | ed->recalc_call = 1; | ||
586 | #ifdef EDJE_CALC_CACHE | 589 | #ifdef EDJE_CALC_CACHE |
587 | ed->all_part_change = 1; | 590 | ed->all_part_change = 1; |
588 | #endif | 591 | #endif |
@@ -611,6 +614,7 @@ edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, in | |||
611 | cc->a3 = a3; | 614 | cc->a3 = a3; |
612 | ed->color_classes = eina_list_append(ed->color_classes, cc); | 615 | ed->color_classes = eina_list_append(ed->color_classes, cc); |
613 | ed->dirty = 1; | 616 | ed->dirty = 1; |
617 | ed->recalc_call = 1; | ||
614 | #ifdef EDJE_CALC_CACHE | 618 | #ifdef EDJE_CALC_CACHE |
615 | ed->all_part_change = 1; | 619 | ed->all_part_change = 1; |
616 | #endif | 620 | #endif |
@@ -693,6 +697,7 @@ edje_object_color_class_del(Evas_Object *obj, const char *color_class) | |||
693 | } | 697 | } |
694 | 698 | ||
695 | ed->dirty = 1; | 699 | ed->dirty = 1; |
700 | ed->recalc_call = 1; | ||
696 | #ifdef EDJE_CALC_CACHE | 701 | #ifdef EDJE_CALC_CACHE |
697 | ed->all_part_change = 1; | 702 | ed->all_part_change = 1; |
698 | #endif | 703 | #endif |
@@ -752,6 +757,7 @@ edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size siz | |||
752 | 757 | ||
753 | ed = eina_list_data_get(members); | 758 | ed = eina_list_data_get(members); |
754 | ed->dirty = 1; | 759 | ed->dirty = 1; |
760 | ed->recalc_call = 1; | ||
755 | _edje_textblock_style_all_update(ed); | 761 | _edje_textblock_style_all_update(ed); |
756 | #ifdef EDJE_CALC_CACHE | 762 | #ifdef EDJE_CALC_CACHE |
757 | ed->text_part_change = 1; | 763 | ed->text_part_change = 1; |
@@ -847,6 +853,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char | |||
847 | 853 | ||
848 | /* Update edje */ | 854 | /* Update edje */ |
849 | ed->dirty = 1; | 855 | ed->dirty = 1; |
856 | ed->recalc_call = 1; | ||
850 | #ifdef EDJE_CALC_CACHE | 857 | #ifdef EDJE_CALC_CACHE |
851 | ed->text_part_change = 1; | 858 | ed->text_part_change = 1; |
852 | #endif | 859 | #endif |
@@ -881,6 +888,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char | |||
881 | /* Add to edje's text class list */ | 888 | /* Add to edje's text class list */ |
882 | ed->text_classes = eina_list_append(ed->text_classes, tc); | 889 | ed->text_classes = eina_list_append(ed->text_classes, tc); |
883 | ed->dirty = 1; | 890 | ed->dirty = 1; |
891 | ed->recalc_call = 1; | ||
884 | #ifdef EDJE_CALC_CACHE | 892 | #ifdef EDJE_CALC_CACHE |
885 | ed->text_part_change = 1; | 893 | ed->text_part_change = 1; |
886 | #endif | 894 | #endif |
@@ -1005,6 +1013,7 @@ _edje_object_part_text_raw_set(Evas_Object *obj, Edje_Real_Part *rp, const char | |||
1005 | else | 1013 | else |
1006 | if (text) rp->text.text = eina_stringshare_add(text); | 1014 | if (text) rp->text.text = eina_stringshare_add(text); |
1007 | rp->edje->dirty = 1; | 1015 | rp->edje->dirty = 1; |
1016 | rp->edje->recalc_call = 1; | ||
1008 | #ifdef EDJE_CALC_CACHE | 1017 | #ifdef EDJE_CALC_CACHE |
1009 | rp->invalidate = 1; | 1018 | rp->invalidate = 1; |
1010 | #endif | 1019 | #endif |
@@ -1039,6 +1048,7 @@ _edje_object_part_text_raw_append(Evas_Object *obj, Edje_Real_Part *rp, const ch | |||
1039 | } | 1048 | } |
1040 | } | 1049 | } |
1041 | rp->edje->dirty = 1; | 1050 | rp->edje->dirty = 1; |
1051 | rp->edje->recalc_call = 1; | ||
1042 | #ifdef EDJE_CALC_CACHE | 1052 | #ifdef EDJE_CALC_CACHE |
1043 | rp->invalidate = 1; | 1053 | rp->invalidate = 1; |
1044 | #endif | 1054 | #endif |
@@ -1307,6 +1317,7 @@ edje_object_part_text_insert(Evas_Object *obj, const char *part, const char *tex | |||
1307 | if (rp->part->entry_mode <= EDJE_ENTRY_EDIT_MODE_NONE) return; | 1317 | if (rp->part->entry_mode <= EDJE_ENTRY_EDIT_MODE_NONE) return; |
1308 | _edje_entry_text_markup_insert(rp, text); | 1318 | _edje_entry_text_markup_insert(rp, text); |
1309 | rp->edje->dirty = 1; | 1319 | rp->edje->dirty = 1; |
1320 | rp->edje->recalc_call = 1; | ||
1310 | #ifdef EDJE_CALC_CACHE | 1321 | #ifdef EDJE_CALC_CACHE |
1311 | rp->invalidate = 1; | 1322 | rp->invalidate = 1; |
1312 | #endif | 1323 | #endif |
@@ -1328,6 +1339,7 @@ edje_object_part_text_append(Evas_Object *obj, const char *part, const char *tex | |||
1328 | if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return; | 1339 | if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return; |
1329 | _edje_object_part_text_raw_append(obj, rp, part, text); | 1340 | _edje_object_part_text_raw_append(obj, rp, part, text); |
1330 | rp->edje->dirty = 1; | 1341 | rp->edje->dirty = 1; |
1342 | rp->edje->recalc_call = 1; | ||
1331 | #ifdef EDJE_CALC_CACHE | 1343 | #ifdef EDJE_CALC_CACHE |
1332 | rp->invalidate = 1; | 1344 | rp->invalidate = 1; |
1333 | #endif | 1345 | #endif |
@@ -1675,7 +1687,7 @@ edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const | |||
1675 | return 0; | 1687 | return 0; |
1676 | } | 1688 | } |
1677 | 1689 | ||
1678 | EAPI const char * | 1690 | EAPI char * |
1679 | edje_object_part_text_cursor_content_get(const Evas_Object *obj, const char *part, Edje_Cursor cur) | 1691 | edje_object_part_text_cursor_content_get(const Evas_Object *obj, const char *part, Edje_Cursor cur) |
1680 | { | 1692 | { |
1681 | Edje *ed; | 1693 | Edje *ed; |
@@ -1908,6 +1920,13 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw | |||
1908 | // XXX: by Sachiel, January 21th 2009, 19:30 UTC | 1920 | // XXX: by Sachiel, January 21th 2009, 19:30 UTC |
1909 | _edje_recalc_do(ed); | 1921 | _edje_recalc_do(ed); |
1910 | 1922 | ||
1923 | rp = evas_object_data_get(obj_swallow, "\377 edje.swallowing_part"); | ||
1924 | if (rp) | ||
1925 | { | ||
1926 | /* The object is already swallowed somewhere, unswallow it first */ | ||
1927 | edje_object_part_unswallow(rp->edje->obj, obj_swallow); | ||
1928 | } | ||
1929 | |||
1911 | rp = _edje_real_part_recursive_get(ed, (char *)part); | 1930 | rp = _edje_real_part_recursive_get(ed, (char *)part); |
1912 | if (!rp) return EINA_FALSE; | 1931 | if (!rp) return EINA_FALSE; |
1913 | if (rp->part->type != EDJE_PART_TYPE_SWALLOW) | 1932 | if (rp->part->type != EDJE_PART_TYPE_SWALLOW) |
@@ -1929,6 +1948,7 @@ _recalc_extern_parent(Evas_Object *obj) | |||
1929 | ed = _edje_fetch(parent); | 1948 | ed = _edje_fetch(parent); |
1930 | 1949 | ||
1931 | ed->dirty = 1; | 1950 | ed->dirty = 1; |
1951 | ed->recalc_call = 1; // ZZZ: ??? | ||
1932 | _edje_recalc(ed); | 1952 | _edje_recalc(ed); |
1933 | } | 1953 | } |
1934 | 1954 | ||
@@ -2110,11 +2130,7 @@ _edje_box_layout_external_new(const char *name, Evas_Object_Box_Layout func, voi | |||
2110 | 2130 | ||
2111 | name_len = strlen(name) + 1; | 2131 | name_len = strlen(name) + 1; |
2112 | l = malloc(sizeof(Edje_Box_Layout) + name_len); | 2132 | l = malloc(sizeof(Edje_Box_Layout) + name_len); |
2113 | if (!l) | 2133 | if (!l) return NULL; |
2114 | { | ||
2115 | perror("malloc"); | ||
2116 | return NULL; | ||
2117 | } | ||
2118 | 2134 | ||
2119 | l->func = func; | 2135 | l->func = func; |
2120 | l->layout_data_get = layout_data_get; | 2136 | l->layout_data_get = layout_data_get; |
@@ -2224,6 +2240,7 @@ edje_object_part_unswallow(Evas_Object *obj __UNUSED__, Evas_Object *obj_swallow | |||
2224 | rp->swallow_params.max.w = 0; | 2240 | rp->swallow_params.max.w = 0; |
2225 | rp->swallow_params.max.h = 0; | 2241 | rp->swallow_params.max.h = 0; |
2226 | rp->edje->dirty = 1; | 2242 | rp->edje->dirty = 1; |
2243 | rp->edje->recalc_call = 1; | ||
2227 | #ifdef EDJE_CALC_CACHE | 2244 | #ifdef EDJE_CALC_CACHE |
2228 | rp->invalidate = 1; | 2245 | rp->invalidate = 1; |
2229 | #endif | 2246 | #endif |
@@ -2684,6 +2701,7 @@ edje_object_part_drag_size_set(Evas_Object *obj, const char *part, double dw, do | |||
2684 | rp->drag->size.x = FROM_DOUBLE(dw); | 2701 | rp->drag->size.x = FROM_DOUBLE(dw); |
2685 | rp->drag->size.y = FROM_DOUBLE(dh); | 2702 | rp->drag->size.y = FROM_DOUBLE(dh); |
2686 | rp->edje->dirty = 1; | 2703 | rp->edje->dirty = 1; |
2704 | rp->edje->recalc_call = 1; | ||
2687 | #ifdef EDJE_CALC_CACHE | 2705 | #ifdef EDJE_CALC_CACHE |
2688 | rp->invalidate = 1; | 2706 | rp->invalidate = 1; |
2689 | #endif | 2707 | #endif |
@@ -3018,6 +3036,7 @@ _edje_box_child_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *child __UNUS | |||
3018 | Edje_Real_Part *rp = data; | 3036 | Edje_Real_Part *rp = data; |
3019 | 3037 | ||
3020 | rp->edje->dirty = 1; | 3038 | rp->edje->dirty = 1; |
3039 | rp->edje->recalc_call = 1; | ||
3021 | #ifdef EDJE_CALC_CACHE | 3040 | #ifdef EDJE_CALC_CACHE |
3022 | rp->invalidate = 1; | 3041 | rp->invalidate = 1; |
3023 | #endif | 3042 | #endif |
@@ -3031,6 +3050,7 @@ _edje_box_child_add(Edje_Real_Part *rp, Evas_Object *child) | |||
3031 | (child, EVAS_CALLBACK_DEL, _edje_box_child_del_cb, rp); | 3050 | (child, EVAS_CALLBACK_DEL, _edje_box_child_del_cb, rp); |
3032 | 3051 | ||
3033 | rp->edje->dirty = 1; | 3052 | rp->edje->dirty = 1; |
3053 | rp->edje->recalc_call = 1; | ||
3034 | #ifdef EDJE_CALC_CACHE | 3054 | #ifdef EDJE_CALC_CACHE |
3035 | rp->invalidate = 1; | 3055 | rp->invalidate = 1; |
3036 | #endif | 3056 | #endif |
@@ -3044,6 +3064,7 @@ _edje_box_child_remove(Edje_Real_Part *rp, Evas_Object *child) | |||
3044 | (child, EVAS_CALLBACK_DEL, _edje_box_child_del_cb, rp); | 3064 | (child, EVAS_CALLBACK_DEL, _edje_box_child_del_cb, rp); |
3045 | 3065 | ||
3046 | rp->edje->dirty = 1; | 3066 | rp->edje->dirty = 1; |
3067 | rp->edje->recalc_call = 1; | ||
3047 | #ifdef EDJE_CALC_CACHE | 3068 | #ifdef EDJE_CALC_CACHE |
3048 | rp->invalidate = 1; | 3069 | rp->invalidate = 1; |
3049 | #endif | 3070 | #endif |
@@ -3186,6 +3207,7 @@ _edje_table_child_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *child __UN | |||
3186 | Edje_Real_Part *rp = data; | 3207 | Edje_Real_Part *rp = data; |
3187 | 3208 | ||
3188 | rp->edje->dirty = 1; | 3209 | rp->edje->dirty = 1; |
3210 | rp->edje->recalc_call = 1; | ||
3189 | #ifdef EDJE_CALC_CACHE | 3211 | #ifdef EDJE_CALC_CACHE |
3190 | rp->invalidate = 1; | 3212 | rp->invalidate = 1; |
3191 | #endif | 3213 | #endif |
@@ -3199,6 +3221,7 @@ _edje_table_child_add(Edje_Real_Part *rp, Evas_Object *child) | |||
3199 | (child, EVAS_CALLBACK_DEL, _edje_table_child_del_cb, rp); | 3221 | (child, EVAS_CALLBACK_DEL, _edje_table_child_del_cb, rp); |
3200 | 3222 | ||
3201 | rp->edje->dirty = 1; | 3223 | rp->edje->dirty = 1; |
3224 | rp->edje->recalc_call = 1; | ||
3202 | #ifdef EDJE_CALC_CACHE | 3225 | #ifdef EDJE_CALC_CACHE |
3203 | rp->invalidate = 1; | 3226 | rp->invalidate = 1; |
3204 | #endif | 3227 | #endif |
@@ -3212,6 +3235,7 @@ _edje_table_child_remove(Edje_Real_Part *rp, Evas_Object *child) | |||
3212 | (child, EVAS_CALLBACK_DEL, _edje_table_child_del_cb, rp); | 3235 | (child, EVAS_CALLBACK_DEL, _edje_table_child_del_cb, rp); |
3213 | 3236 | ||
3214 | rp->edje->dirty = 1; | 3237 | rp->edje->dirty = 1; |
3238 | rp->edje->recalc_call = 1; | ||
3215 | #ifdef EDJE_CALC_CACHE | 3239 | #ifdef EDJE_CALC_CACHE |
3216 | rp->invalidate = 1; | 3240 | rp->invalidate = 1; |
3217 | #endif | 3241 | #endif |
@@ -3314,6 +3338,7 @@ _edje_perspective_obj_del(void *data, __UNUSED__ Evas *e, __UNUSED__ Evas_Object | |||
3314 | if (!ed) continue; | 3338 | if (!ed) continue; |
3315 | ed->persp = NULL; | 3339 | ed->persp = NULL; |
3316 | ed->dirty = 1; | 3340 | ed->dirty = 1; |
3341 | ed->recalc_call = 1; | ||
3317 | _edje_recalc_do(ed); | 3342 | _edje_recalc_do(ed); |
3318 | } | 3343 | } |
3319 | free(ps); | 3344 | free(ps); |
@@ -3367,6 +3392,7 @@ edje_perspective_set(Edje_Perspective *ps, Evas_Coord px, Evas_Coord py, Evas_Co | |||
3367 | if (!ed->persp) | 3392 | if (!ed->persp) |
3368 | { | 3393 | { |
3369 | ed->dirty = 1; | 3394 | ed->dirty = 1; |
3395 | ed->recalc_call = 1; | ||
3370 | _edje_recalc_do(ed); | 3396 | _edje_recalc_do(ed); |
3371 | } | 3397 | } |
3372 | } | 3398 | } |
@@ -3381,6 +3407,7 @@ edje_perspective_set(Edje_Perspective *ps, Evas_Coord px, Evas_Coord py, Evas_Co | |||
3381 | if (!ed->persp) | 3407 | if (!ed->persp) |
3382 | { | 3408 | { |
3383 | ed->dirty = 1; | 3409 | ed->dirty = 1; |
3410 | ed->recalc_call = 1; | ||
3384 | _edje_recalc_do(ed); | 3411 | _edje_recalc_do(ed); |
3385 | } | 3412 | } |
3386 | } | 3413 | } |
@@ -3414,6 +3441,7 @@ edje_perspective_global_set(Edje_Perspective *ps, Eina_Bool global) | |||
3414 | if (!ed->persp) | 3441 | if (!ed->persp) |
3415 | { | 3442 | { |
3416 | ed->dirty = 1; | 3443 | ed->dirty = 1; |
3444 | ed->recalc_call = 1; | ||
3417 | _edje_recalc_do(ed); | 3445 | _edje_recalc_do(ed); |
3418 | } | 3446 | } |
3419 | } | 3447 | } |
@@ -3453,6 +3481,7 @@ edje_object_perspective_set(Evas_Object *obj, Edje_Perspective *ps) | |||
3453 | ed->persp = ps; | 3481 | ed->persp = ps; |
3454 | if (ps) ps->users = eina_list_append(ps->users, obj); | 3482 | if (ps) ps->users = eina_list_append(ps->users, obj); |
3455 | ed->dirty = 1; | 3483 | ed->dirty = 1; |
3484 | ed->recalc_call = 1; | ||
3456 | _edje_recalc_do(ed); | 3485 | _edje_recalc_do(ed); |
3457 | } | 3486 | } |
3458 | 3487 | ||
@@ -4075,6 +4104,7 @@ _edje_object_part_swallow_changed_hints_cb(void *data, __UNUSED__ Evas *e, __UNU | |||
4075 | rp = data; | 4104 | rp = data; |
4076 | _edje_real_part_swallow_hints_update(rp); | 4105 | _edje_real_part_swallow_hints_update(rp); |
4077 | rp->edje->dirty = 1; | 4106 | rp->edje->dirty = 1; |
4107 | rp->edje->recalc_call = 1; | ||
4078 | _edje_recalc(rp->edje); | 4108 | _edje_recalc(rp->edje); |
4079 | return; | 4109 | return; |
4080 | } | 4110 | } |
@@ -4096,6 +4126,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp, | |||
4096 | if (hints_update) | 4126 | if (hints_update) |
4097 | _edje_real_part_swallow_hints_update(rp); | 4127 | _edje_real_part_swallow_hints_update(rp); |
4098 | rp->edje->dirty = 1; | 4128 | rp->edje->dirty = 1; |
4129 | rp->edje->recalc_call = 1; | ||
4099 | _edje_recalc(rp->edje); | 4130 | _edje_recalc(rp->edje); |
4100 | return; | 4131 | return; |
4101 | } | 4132 | } |
@@ -4139,6 +4170,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp, | |||
4139 | evas_object_precise_is_inside_set(obj_swallow, 1); | 4170 | evas_object_precise_is_inside_set(obj_swallow, 1); |
4140 | 4171 | ||
4141 | rp->edje->dirty = 1; | 4172 | rp->edje->dirty = 1; |
4173 | rp->edje->recalc_call = 1; | ||
4142 | _edje_recalc(rp->edje); | 4174 | _edje_recalc(rp->edje); |
4143 | } | 4175 | } |
4144 | 4176 | ||
diff --git a/libraries/edje/src/modules/Makefile.in b/libraries/edje/src/modules/Makefile.in index 55c47d6..5e81050 100644 --- a/libraries/edje/src/modules/Makefile.in +++ b/libraries/edje/src/modules/Makefile.in | |||
@@ -193,8 +193,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
193 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 193 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
194 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 194 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
195 | PKG_CONFIG = @PKG_CONFIG@ | 195 | PKG_CONFIG = @PKG_CONFIG@ |
196 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
197 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
198 | PYTHON = @PYTHON@ | 196 | PYTHON = @PYTHON@ |
199 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | 197 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ |
200 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | 198 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ |
diff --git a/libraries/edje/src/modules/alsa_snd_player/Makefile.in b/libraries/edje/src/modules/alsa_snd_player/Makefile.in index ce68f41..1fe2fb1 100644 --- a/libraries/edje/src/modules/alsa_snd_player/Makefile.in +++ b/libraries/edje/src/modules/alsa_snd_player/Makefile.in | |||
@@ -210,8 +210,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
210 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 210 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
211 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 211 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
212 | PKG_CONFIG = @PKG_CONFIG@ | 212 | PKG_CONFIG = @PKG_CONFIG@ |
213 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
214 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
215 | PYTHON = @PYTHON@ | 213 | PYTHON = @PYTHON@ |
216 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | 214 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ |
217 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | 215 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ |
diff --git a/libraries/edje/src/modules/eet_snd_reader/Makefile.in b/libraries/edje/src/modules/eet_snd_reader/Makefile.in index f4d99bb..12d0487 100644 --- a/libraries/edje/src/modules/eet_snd_reader/Makefile.in +++ b/libraries/edje/src/modules/eet_snd_reader/Makefile.in | |||
@@ -211,8 +211,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
211 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 211 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
212 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 212 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
213 | PKG_CONFIG = @PKG_CONFIG@ | 213 | PKG_CONFIG = @PKG_CONFIG@ |
214 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
215 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
216 | PYTHON = @PYTHON@ | 214 | PYTHON = @PYTHON@ |
217 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | 215 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ |
218 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | 216 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ |
diff --git a/libraries/edje/src/modules/multisense_factory/Makefile.in b/libraries/edje/src/modules/multisense_factory/Makefile.in index ed0c3e4..8fbc0aa 100644 --- a/libraries/edje/src/modules/multisense_factory/Makefile.in +++ b/libraries/edje/src/modules/multisense_factory/Makefile.in | |||
@@ -208,8 +208,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
208 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 208 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
209 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 209 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
210 | PKG_CONFIG = @PKG_CONFIG@ | 210 | PKG_CONFIG = @PKG_CONFIG@ |
211 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
212 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
213 | PYTHON = @PYTHON@ | 211 | PYTHON = @PYTHON@ |
214 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | 212 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ |
215 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | 213 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ |
diff --git a/libraries/edje/src/modules/multisense_factory/multisense_factory.c b/libraries/edje/src/modules/multisense_factory/multisense_factory.c index f89ae9b..8b17be1 100644 --- a/libraries/edje/src/modules/multisense_factory/multisense_factory.c +++ b/libraries/edje/src/modules/multisense_factory/multisense_factory.c | |||
@@ -1,33 +1,33 @@ | |||
1 | #include "config.h" | 1 | #include "config.h" |
2 | #include "edje_private.h" | 2 | #include "edje_private.h" |
3 | 3 | ||
4 | #define DEFAULT_SAMPLERATE 44100 | 4 | #define DEFAULT_SAMPLERATE 44100 |
5 | 5 | ||
6 | #ifdef HAVE_LIBREMIX | 6 | #ifdef HAVE_LIBREMIX |
7 | EAPI RemixBase * | 7 | EAPI RemixBase * |
8 | multisense_sound_player_get(Edje_Multisense_Env *msenv) | 8 | multisense_sound_player_get(Edje_Multisense_Env *msenv) |
9 | { | 9 | { |
10 | RemixEnv *env = msenv->remixenv; | 10 | RemixEnv *env = msenv->remixenv; |
11 | RemixPlugin *player_plugin; | 11 | RemixPlugin *player_plugin; |
12 | RemixBase *player; | 12 | RemixBase *player; |
13 | 13 | ||
14 | player_plugin = remix_find_plugin(env, "alsa_snd_player"); | 14 | player_plugin = remix_find_plugin(env, "alsa_snd_player"); |
15 | if (!player_plugin) | 15 | if (!player_plugin) |
16 | { | 16 | { |
17 | WRN("ALSA player_plugin init fail\n"); | 17 | WRN("ALSA player_plugin init fail\n"); |
18 | return remix_monitor_new(env); | 18 | return remix_monitor_new(env); |
19 | } | 19 | } |
20 | player = remix_new(env, player_plugin, NULL); | 20 | player = remix_new(env, player_plugin, NULL); |
21 | return player; | 21 | return player; |
22 | } | 22 | } |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | EAPI Eina_Bool | 25 | EAPI Eina_Bool |
26 | multisense_factory_init(Edje_Multisense_Env *env) | 26 | multisense_factory_init(Edje_Multisense_Env *env __UNUSED__) |
27 | { | 27 | { |
28 | #ifdef HAVE_LIBREMIX | 28 | #ifdef HAVE_LIBREMIX |
29 | remix_set_samplerate(env->remixenv, DEFAULT_SAMPLERATE); | 29 | remix_set_samplerate(env->remixenv, DEFAULT_SAMPLERATE); |
30 | remix_set_channels(env->remixenv, REMIX_STEREO); | 30 | remix_set_channels(env->remixenv, REMIX_STEREO); |
31 | #endif | 31 | #endif |
32 | return EINA_TRUE; | 32 | return EINA_TRUE; |
33 | } | 33 | } |
diff --git a/libraries/edje/src/tests/Makefile.in b/libraries/edje/src/tests/Makefile.in index f610548..ff5193e 100644 --- a/libraries/edje/src/tests/Makefile.in +++ b/libraries/edje/src/tests/Makefile.in | |||
@@ -189,8 +189,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
189 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 189 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
190 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 190 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
191 | PKG_CONFIG = @PKG_CONFIG@ | 191 | PKG_CONFIG = @PKG_CONFIG@ |
192 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
193 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
194 | PYTHON = @PYTHON@ | 192 | PYTHON = @PYTHON@ |
195 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ | 193 | PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ |
196 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ | 194 | PYTHON_PLATFORM = @PYTHON_PLATFORM@ |