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/lib/edje_util.c | |
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 '')
-rw-r--r-- | libraries/edje/src/lib/edje_util.c | 44 |
1 files changed, 38 insertions, 6 deletions
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 | ||