Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/bin
Modified Files:
edje_cc_handlers.c edje_main.c
Log Message:
more features... working on fixme list.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_cc_handlers.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- edje_cc_handlers.c 20 Jul 2003 12:37:49 -0000 1.17
+++ edje_cc_handlers.c 27 Jul 2003 13:16:50 -0000 1.18
@@ -19,16 +19,17 @@
static void st_collections_group_parts_part_type(void);
static void st_collections_group_parts_part_effect(void);
static void st_collections_group_parts_part_mouse_events(void);
+static void st_collections_group_parts_part_repeat_events(void);
static void st_collections_group_parts_part_clip_to_id(void);
static void st_collections_group_parts_part_color_class(void);
static void st_collections_group_parts_part_text_class(void);
+static void st_collections_group_parts_part_dragable_x(void);
+static void st_collections_group_parts_part_dragable_y(void);
+static void st_collections_group_parts_part_dragable_confine(void);
static void ob_collections_group_parts_part_description(void);
static void st_collections_group_parts_part_description_state(void);
static void st_collections_group_parts_part_description_visible(void);
-static void st_collections_group_parts_part_description_dragable_x(void);
-static void st_collections_group_parts_part_description_dragable_y(void);
-static void st_collections_group_parts_part_description_dragable_confine(void);
static void st_collections_group_parts_part_description_align(void);
static void st_collections_group_parts_part_description_min(void);
static void st_collections_group_parts_part_description_max(void);
@@ -82,14 +83,15 @@
{"collections.group.parts.part.type", st_collections_group_parts_part_type},
{"collections.group.parts.part.effect", st_collections_group_parts_part_effect},
{"collections.group.parts.part.mouse_events",
st_collections_group_parts_part_mouse_events},
+ {"collections.group.parts.part.repeat_events",
st_collections_group_parts_part_repeat_events},
{"collections.group.parts.part.clip_to",
st_collections_group_parts_part_clip_to_id},
{"collections.group.parts.part.color_class",
st_collections_group_parts_part_color_class},
{"collections.group.parts.part.text_class",
st_collections_group_parts_part_text_class},
+ {"collections.group.parts.part.dragable.x",
st_collections_group_parts_part_dragable_x},
+ {"collections.group.parts.part.dragable.y",
st_collections_group_parts_part_dragable_y},
+ {"collections.group.parts.part.dragable.confine",
st_collections_group_parts_part_dragable_confine},
{"collections.group.parts.part.description.state",
st_collections_group_parts_part_description_state},
{"collections.group.parts.part.description.visible",
st_collections_group_parts_part_description_visible},
- {"collections.group.parts.part.description.dragable.x",
st_collections_group_parts_part_description_dragable_x},
- {"collections.group.parts.part.description.dragable.y",
st_collections_group_parts_part_description_dragable_y},
- {"collections.group.parts.part.description.dragable.confine",
st_collections_group_parts_part_description_dragable_confine},
{"collections.group.parts.part.description.align",
st_collections_group_parts_part_description_align},
{"collections.group.parts.part.description.min",
st_collections_group_parts_part_description_min},
{"collections.group.parts.part.description.max",
st_collections_group_parts_part_description_max},
@@ -143,16 +145,17 @@
{"collections.group.parts.part.type", NULL},
{"collections.group.parts.part.effect", NULL},
{"collections.group.parts.part.mouse_events", NULL},
+ {"collections.group.parts.part.repeat_events", NULL},
{"collections.group.parts.part.clip_to", NULL},
{"collections.group.parts.part.color_class", NULL},
{"collections.group.parts.part.text_class", NULL},
+ {"collections.group.parts.part.dragable", NULL},
+ {"collections.group.parts.part.dragable.x", NULL},
+ {"collections.group.parts.part.dragable.y", NULL},
+ {"collections.group.parts.part.dragable.confine", NULL},
{"collections.group.parts.part.description",
ob_collections_group_parts_part_description},
{"collections.group.parts.part.description.state", NULL},
{"collections.group.parts.part.description.visible", NULL},
- {"collections.group.parts.part.description.dragable", NULL},
- {"collections.group.parts.part.description.dragable.x", NULL},
- {"collections.group.parts.part.description.dragable.y", NULL},
- {"collections.group.parts.part.description.dragable.confine", NULL},
{"collections.group.parts.part.description.align", NULL},
{"collections.group.parts.part.description.min", NULL},
{"collections.group.parts.part.description.max", NULL},
@@ -337,7 +340,9 @@
ep->id = evas_list_count(pc->parts) - 1;
ep->type = EDJE_PART_TYPE_IMAGE;
ep->mouse_events = 1;
+ ep->repeat_events = 0;
ep->clip_to_id = -1;
+ ep->dragable.confine_id = -1;
}
static void
@@ -379,6 +384,17 @@
}
static void
+st_collections_group_parts_part_repeat_events(void)
+{
+ Edje_Part_Collection *pc;
+ Edje_Part *ep;
+
+ pc = evas_list_data(evas_list_last(edje_collections));
+ ep = evas_list_data(evas_list_last(pc->parts));
+ ep->repeat_events = parse_int_range(0, 0, 1);
+}
+
+static void
st_collections_group_parts_part_clip_to_id(void)
{
Edje_Part_Collection *pc;
@@ -418,6 +434,49 @@
}
static void
+st_collections_group_parts_part_dragable_x(void)
+{
+ Edje_Part_Collection *pc;
+ Edje_Part *ep;
+
+ pc = evas_list_data(evas_list_last(edje_collections));
+ ep = evas_list_data(evas_list_last(pc->parts));
+ ep->dragable.x = parse_int_range(0, 0, 1);
+ ep->dragable.step_x = parse_int_range(1, 0, 0x7fffffff);
+ ep->dragable.count_x = parse_int_range(2, 0, 0x7fffffff);
+}
+
+static void
+st_collections_group_parts_part_dragable_y(void)
+{
+ Edje_Part_Collection *pc;
+ Edje_Part *ep;
+
+ pc = evas_list_data(evas_list_last(edje_collections));
+ ep = evas_list_data(evas_list_last(pc->parts));
+ ep->dragable.y = parse_int_range(0, 0, 1);
+ ep->dragable.step_y = parse_int_range(1, 0, 0x7fffffff);
+ ep->dragable.count_y = parse_int_range(2, 0, 0x7fffffff);
+}
+
+static void
+st_collections_group_parts_part_dragable_confine(void)
+{
+ Edje_Part_Collection *pc;
+ Edje_Part *ep;
+
+ pc = evas_list_data(evas_list_last(edje_collections));
+ ep = evas_list_data(evas_list_last(pc->parts));
+ {
+ char *name;
+
+ name = parse_str(0);
+ data_queue_part_lookup(pc, name, &(ep->dragable.confine_id));
+ free(name);
+ }
+}
+
+static void
ob_collections_group_parts_part_description(void)
{
Edje_Part_Collection *pc;
@@ -432,7 +491,6 @@
else
ep->other_desc = evas_list_append(ep->other_desc, ed);
ed->visible = 1;
- ed->dragable.confine_id = -1;
ed->align.x = 0.5;
ed->align.y = 0.5;
ed->min.w = 0;
@@ -502,58 +560,6 @@
ed = ep->default_desc;
if (ep->other_desc) ed = evas_list_data(evas_list_last(ep->other_desc));
ed->visible = parse_int_range(0, 0, 1);
-}
-
-static void
-st_collections_group_parts_part_description_dragable_x(void)
-{
- Edje_Part_Collection *pc;
- Edje_Part *ep;
- Edje_Part_Description *ed;
-
- pc = evas_list_data(evas_list_last(edje_collections));
- ep = evas_list_data(evas_list_last(pc->parts));
- ed = ep->default_desc;
- if (ep->other_desc) ed = evas_list_data(evas_list_last(ep->other_desc));
- ed->dragable.x = parse_int_range(0, 0, 1);
- ed->dragable.step_x = parse_int_range(1, 1, 0x7fffffff);
- ed->dragable.count_x = parse_int_range(2, 1, 0x7fffffff);
-}
-
-static void
-st_collections_group_parts_part_description_dragable_y(void)
-{
- Edje_Part_Collection *pc;
- Edje_Part *ep;
- Edje_Part_Description *ed;
-
- pc = evas_list_data(evas_list_last(edje_collections));
- ep = evas_list_data(evas_list_last(pc->parts));
- ed = ep->default_desc;
- if (ep->other_desc) ed = evas_list_data(evas_list_last(ep->other_desc));
- ed->dragable.y = parse_int_range(0, 0, 1);
- ed->dragable.step_y = parse_int_range(1, 1, 0x7fffffff);
- ed->dragable.count_y = parse_int_range(2, 1, 0x7fffffff);
-}
-
-static void
-st_collections_group_parts_part_description_dragable_confine(void)
-{
- Edje_Part_Collection *pc;
- Edje_Part *ep;
- Edje_Part_Description *ed;
-
- pc = evas_list_data(evas_list_last(edje_collections));
- ep = evas_list_data(evas_list_last(pc->parts));
- ed = ep->default_desc;
- if (ep->other_desc) ed = evas_list_data(evas_list_last(ep->other_desc));
- {
- char *name;
-
- name = parse_str(0);
- data_queue_part_lookup(pc, name, &(ed->dragable.confine_id));
- free(name);
- }
}
static void
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_main.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- edje_main.c 22 Jul 2003 03:04:46 -0000 1.21
+++ edje_main.c 27 Jul 2003 13:16:50 -0000 1.22
@@ -12,8 +12,10 @@
void bg_resize(double w, double h);
static void bg_key_down(void *data, Evas * e, Evas_Object * obj, void *event_info);
+void test_list(char *file);
void test_setup(char *file, char *name);
void test_reize(double w, double h);
+
typedef struct _Demo_Edje Demo_Edje;
struct _Demo_Edje
@@ -33,10 +35,21 @@
int vdir;
};
+typedef struct _Collection Collection;
+
+struct _Collection
+{
+ char *file;
+ char *part;
+ Evas_Object *text;
+ Evas_Object *bg;
+};
+
static Evas_List *edjes = NULL;
static Evas_Object *o_bg = NULL;
static Evas_Object *o_shadow = NULL;
-
+static Evas_List *collections = NULL;
+
double start_time = 0.0;
Ecore_Evas *ecore_evas = NULL;
Evas *evas = NULL;
@@ -390,6 +403,47 @@
}
void
+test_list(char *file)
+{
+ Evas_List *entries;
+
+ /* FIXME: still working on this */
+ entries = edje_file_collection_list(file);
+ if (entries)
+ {
+ Evas_List *l;
+
+ for (l = entries; l; l = l->next)
+ {
+ char *name;
+ Collection *co;
+ Evas_Object *o;
+
+ name = l->data;
+ co = calloc(1, sizeof(Collection));
+ collections = evas_list_append(collections, co);
+ co->file = strdup(file);
+ co->part = strdup(name);
+
+ o = evas_object_image_add(evas);
+ evas_object_layer_set(o, 10);
+ evas_object_image_border_set(o, 8, 8, 8, 8);
+ evas_object_image_file_set(o, DAT"data/test/images/list_norm.png", NULL);
+ co->bg = o;
+
+ o = evas_object_text_add(evas);
+ evas_object_layer_set(o, 10);
+ evas_object_color_set(o, 0, 0, 0, 255);
+ evas_object_text_text_set(o, co->part);
+ evas_object_text_font_set(o, "Vera", 6);
+ evas_object_pass_events_set(o, 1);
+ co->text = o;
+ }
+ edje_file_collection_list_free(entries);
+ }
+}
+
+void
test_setup(char *file, char *name)
{
Evas_Object *o;
@@ -513,21 +567,34 @@
if (argc < 2)
{
printf("Usage:\n");
- printf(" %s file_to_show.eet collection_to_show ...\n", argv[0]);
+ printf(" %s file_to_show.eet [collection_to_show] ...\n", argv[0]);
printf("\n");
printf("Example:\n");
+ printf(" %s data/e_logo.eet\n", argv[0]);
printf(" %s data/e_logo.eet test\n", argv[0]);
printf(" %s data/e_logo.eet test ~/test.eet my_thing ...\n", argv[0]);
exit(-1);
}
- for (i = 1; i < (argc - 1); i += 2)
+ for (i = 1; i < argc; i++)
{
char *file;
char *coll;
+ int done;
+ done = 0;
file = argv[i];
- coll = argv[i + 1];
- test_setup(file, coll);
+ if (argc > (i + 1))
+ {
+ coll = argv[i + 1];
+ if (strlen(coll) > 0)
+ {
+ test_setup(file, coll);
+ done = 1;
+ }
+ i++;
+ }
+ if (!done)
+ test_list(file);
}
ecore_main_loop_begin();
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs