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)
{
#include <fnmatch.h>
/* FIXME:
+ *
+ * dont segv if given the wrong collection name
*
* dragables have to work
* drag start/top signals etc.
* 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
*/
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 =