some notes for me about edje program expansions..

SVN revision: 7219
This commit is contained in:
Carsten Haitzler 2003-07-23 05:19:50 +00:00
parent cbb61da0f5
commit 9a9a28fa14
4 changed files with 77 additions and 2 deletions

View File

@ -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);

View File

@ -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)
{

View File

@ -16,6 +16,8 @@
#include <fnmatch.h>
/* 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
*/

View File

@ -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 =