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:
you can add arbitary key/value pair strings to either 1 the edje file .eet as
a whole and/or to each collection in the edje .eet file (different
namespoaces with each collection having its own namespace) :) this shoudl
make Rbdpngn happy :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_cc_handlers.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- edje_cc_handlers.c 27 Jul 2003 13:16:50 -0000 1.18
+++ edje_cc_handlers.c 5 Aug 2003 14:33:35 -0000 1.19
@@ -5,14 +5,15 @@
static void ob_images_image(void);
static void st_images_image(void);
+static void st_data_item(void);
+
static void ob_collections(void);
static void ob_collections_group(void);
static void st_collections_group_name(void);
static void st_collections_group_min(void);
static void st_collections_group_max(void);
-
-static void ob_collections_group_parts(void);
+static void st_collections_group_data_item(void);
static void ob_collections_group_parts_part(void);
static void st_collections_group_parts_part_name(void);
@@ -76,9 +77,11 @@
New_Statement_Handler statement_handlers[] =
{
{"images.image", st_images_image},
+ {"data.item", st_data_item},
{"collections.group.name", st_collections_group_name},
{"collections.group.min", st_collections_group_min},
{"collections.group.max", st_collections_group_max},
+ {"collections.group.data.item", st_collections_group_data_item},
{"collections.group.parts.part.name", st_collections_group_parts_part_name},
{"collections.group.parts.part.type", st_collections_group_parts_part_type},
{"collections.group.parts.part.effect", st_collections_group_parts_part_effect},
@@ -134,12 +137,16 @@
{
{"images", ob_images},
{"images.image", ob_images_image},
+ {"data", NULL},
+ {"data.item", NULL},
{"collections", ob_collections},
{"collections.group", ob_collections_group},
{"collections.group.name", NULL},
{"collections.group.min", NULL},
{"collections.group.max", NULL},
- {"collections.group.parts", ob_collections_group_parts},
+ {"collections.group.data", NULL},
+ {"collections.group.data.item", NULL},
+ {"collections.group.parts", NULL},
{"collections.group.parts.part", ob_collections_group_parts_part},
{"collections.group.parts.part.name", NULL},
{"collections.group.parts.part.type", NULL},
@@ -274,6 +281,17 @@
}
static void
+st_data_item(void)
+{
+ Edje_Data *di;
+
+ di = calloc(1, sizeof(Edje_Data));
+ di->key = parse_str(0);
+ di->value = parse_str(1);
+ edje_file->data = evas_list_append(edje_file->data, di);
+}
+
+static void
ob_collections(void)
{
edje_file->collection_dir = mem_alloc(SZ(Edje_Part_Collection_Directory));
@@ -324,8 +342,16 @@
}
static void
-ob_collections_group_parts(void)
+st_collections_group_data_item(void)
{
+ Edje_Part_Collection *pc;
+ Edje_Data *di;
+
+ pc = evas_list_data(evas_list_last(edje_collections));
+ di = calloc(1, sizeof(Edje_Data));
+ di->key = parse_str(0);
+ di->value = parse_str(1);
+ pc->data = evas_list_append(pc->data, di);
}
static void
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_main.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- edje_main.c 5 Aug 2003 13:38:43 -0000 1.25
+++ edje_main.c 5 Aug 2003 14:33:35 -0000 1.26
@@ -497,6 +497,8 @@
Evas_List *collections = NULL;
entries = edje_file_collection_list(file);
+// printf("%s\n", edje_file_data_get(file, "My Data");
+// printf("%s\n", edje_file_data_get(file, "The Key");
{
Collection *co;
Evas_Object *o;
@@ -658,8 +660,8 @@
o = edje_object_add(evas);
edje_object_file_set(o, file, name);
- edje_object_signal_callback_add(o, "do_it", "the_source", cb, NULL);
- edje_object_signal_callback_add(o, "mouse,*", "logo", cb, NULL);
+// edje_object_signal_callback_add(o, "do_it", "the_source", cb, NULL);
+// edje_object_signal_callback_add(o, "mouse,*", "logo", cb, NULL);
evas_object_move(o, 10 + 10, 10 + 20);
evas_object_show(o);
edje_object_size_min_get(o, &(de->minw), &(de->minh));
@@ -669,6 +671,9 @@
if (240 < de->minh) h = de->minh;
evas_object_resize(o, w, h);
de->edje = o;
+
+// printf("%s\n", edje_object_data_get(o, "My Data"));
+// printf("%s\n", edje_object_data_get(o, "The Key"));
/* test swallowing */
/*
-------------------------------------------------------
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