diff --git a/legacy/edje/src/bin/edje_cc.h b/legacy/edje/src/bin/edje_cc.h index 2983f78e5a..ae751c2f69 100644 --- a/legacy/edje/src/bin/edje_cc.h +++ b/legacy/edje/src/bin/edje_cc.h @@ -44,6 +44,8 @@ void data_process_lookups(void); void compile(void); +int is_param(int n); +int is_num(int n); char *parse_str(int n); int parse_enum(int n, ...); int parse_int(int n); diff --git a/legacy/edje/src/bin/edje_cc_parse.c b/legacy/edje/src/bin/edje_cc_parse.c index 9664470c56..7af69accb0 100644 --- a/legacy/edje/src/bin/edje_cc_parse.c +++ b/legacy/edje/src/bin/edje_cc_parse.c @@ -353,6 +353,37 @@ compile(void) close(fd); } +int +is_param(int n) +{ + char *str; + + str = evas_list_nth(params, n); + if (str) return 1; + return 0; +} + +int +is_num(int n) +{ + char *str; + long int ret; + char *end; + + str = evas_list_nth(params, n); + if (!str) + { + fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n", + progname, file_in, line, n + 1); + exit(-1); + } + if (str[0] == 0) return 0; + end = str; + ret = strtol(str, &end, 0); + if ((end != str) && (end[0] == 0)) return 1; + return 0; +} + char * parse_str(int n) { diff --git a/legacy/edje/src/lib/edje_private.h b/legacy/edje/src/lib/edje_private.h index 3cc14e78f8..feb4a0abab 100644 --- a/legacy/edje/src/lib/edje_private.h +++ b/legacy/edje/src/lib/edje_private.h @@ -16,6 +16,8 @@ #include /* FIXME: + * + * dont segv if given the wrong collection name * * dragables have to work * drag start/top signals etc. @@ -33,11 +35,39 @@ * need to detect clip_to part loops * need to detect confine_to part loops * + * ? programs need to be able to set/get/add/sub and compare variables + * ie: + * action, INT "active_state" = INT 1; + * ... + * action, INT "hidden" = INT 10; + * ... + * action, STR "my_string" = STR "some content here"; + * ... + * action, INT "count" += INT 10; + * ... + * action, INT "count" -= INT 10; + * action, INT "count" += MOUSE_X "this_part"; + * ... + * action, INT "count" *= INT "another_variable"; + * action, INT "count" -= INT 10; + * action, INT "count" /= INT 2; + * ... + * + * if, INT "active_state" == 1; + * ... + * if, MOUSE_X "" > 1; + * or, MOUSE_X "this_part" > 50; + * or, MOUSE_X_REL "this_part" <= 0.5; + * ... + * if, INT "active_state" != 0; + * and, INT "hidden" < 10; + * or, STR "my_string" == "smelly"; + * ... + * * ? programs need to be able to "toggle" part states given a list of states - * ? programs could be extended further * ? reduce linked list walking and list_nth calls * ? add containering (hbox, vbox, table, wrapping multi-line hbox & vbox) - * ? text entry widget (single line) + * ? text entry widget (single line only) * ? add numeric params to conditions for progs (ranges etc.) * ? key/value pair config values per colelction and per edje file */ diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c index 682ff22041..1c4b7bbf14 100644 --- a/legacy/edje/src/lib/edje_util.c +++ b/legacy/edje/src/lib/edje_util.c @@ -275,6 +275,18 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw rp->swallow_params.max.w = w; rp->swallow_params.max.h = h; } + else if ((type) && ((!strcmp(type, "text")) || + (!strcmp(type, "polygon")) || + (!strcmp(type, "line")))) + { + double w, h; + + evas_object_geometry_get(obj_swallow, NULL, NULL, &w, &h); + rp->swallow_params.min.w = w; + rp->swallow_params.min.h = h; + rp->swallow_params.max.w = w; + rp->swallow_params.max.h = h; + } else { rp->swallow_params.min.w =