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:


dragables are about complete now.. with new actions, page and step values....
all happy & smelly.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_cc_handlers.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- edje_cc_handlers.c  14 Aug 2003 04:45:31 -0000      1.21
+++ edje_cc_handlers.c  1 Sep 2003 02:53:08 -0000       1.22
@@ -241,7 +241,8 @@
 static void
 ob_images(void)
 {
-   edje_file->image_dir = mem_alloc(SZ(Edje_Image_Directory));
+   if (!edje_file->image_dir)
+     edje_file->image_dir = mem_alloc(SZ(Edje_Image_Directory));
 }
 
 static void
@@ -306,7 +307,8 @@
 static void
 ob_collections(void)
 {
-   edje_file->collection_dir = mem_alloc(SZ(Edje_Part_Collection_Directory));
+   if (!edje_file->collection_dir)
+     edje_file->collection_dir = mem_alloc(SZ(Edje_Part_Collection_Directory));
 }
 
 static void
@@ -479,7 +481,7 @@
 
    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.x = parse_int_range(0, -1, 1);
    ep->dragable.step_x = parse_int_range(1, 0, 0x7fffffff);
    ep->dragable.count_x = parse_int_range(2, 0, 0x7fffffff);
 }
@@ -492,7 +494,7 @@
 
    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.y = parse_int_range(0, -1, 1);
    ep->dragable.step_y = parse_int_range(1, 0, 0x7fffffff);
    ep->dragable.count_y = parse_int_range(2, 0, 0x7fffffff);
 }
@@ -1229,6 +1231,9 @@
                           "STATE_SET", EDJE_ACTION_TYPE_STATE_SET,
                           "ACTION_STOP", EDJE_ACTION_TYPE_ACTION_STOP,
                           "SIGNAL_EMIT", EDJE_ACTION_TYPE_SIGNAL_EMIT,
+                          "DRAG_VAL_SET", EDJE_ACTION_TYPE_DRAG_VAL_SET,
+                          "DRAG_VAL_STEP", EDJE_ACTION_TYPE_DRAG_VAL_STEP,
+                          "DRAG_VAL_PAGE", EDJE_ACTION_TYPE_DRAG_VAL_PAGE,
                           NULL);
    if (ep->action == EDJE_ACTION_TYPE_STATE_SET)
      {
@@ -1240,6 +1245,21 @@
        ep->state = parse_str(1);
        ep->state2 = parse_str(2);
      }
+   else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_SET)
+     {
+       ep->value = parse_float(1);
+       ep->value2 = parse_float(2);
+     }
+   else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_STEP)
+     {
+       ep->value = parse_float(1);
+       ep->value2 = parse_float(2);
+     }
+   else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_PAGE)
+     {
+       ep->value = parse_float(1);
+       ep->value2 = parse_float(2);
+     }
 }
 
 static void
@@ -1279,6 +1299,12 @@
          data_queue_part_lookup(pc, name, &(et->id));
        else if (ep->action == EDJE_ACTION_TYPE_ACTION_STOP)
          data_queue_program_lookup(pc, name, &(et->id));
+       else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_SET)
+         data_queue_part_lookup(pc, name, &(et->id));
+       else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_STEP)
+         data_queue_part_lookup(pc, name, &(et->id));
+       else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_PAGE)
+         data_queue_part_lookup(pc, name, &(et->id));
        else
          {
             /* FIXME: not type specified. guess */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/bin/edje_main.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- edje_main.c 15 Aug 2003 13:35:25 -0000      1.28
+++ edje_main.c 1 Sep 2003 02:53:08 -0000       1.29
@@ -447,7 +447,7 @@
 static void
 cb (void *data, Evas_Object *o, const char *sig, const char *src)
 {
-//   printf("CALLBACK for %p %p \"%s\" \"%s\"\n", data, o, sig, src);
+   printf("CALLBACK for %p %p \"%s\" \"%s\"\n", data, o, sig, src);
    if (!strcmp(sig, "drag"))
      {
        double x, y;
@@ -687,9 +687,11 @@
    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, "*", "*", cb, NULL);
-//   edje_object_part_drag_size_set(o, "dragable", 0.01, 0.5);
+   edje_object_signal_callback_add(o, "*", "*", cb, NULL);
+   edje_object_part_drag_size_set(o, "dragable", 0.01, 0.5);
 //   edje_object_part_drag_value_set(o, "dragable", 0.5, 0.5);
+edje_object_part_drag_step_set(o, "dragable", 0.1, 0.1);
+edje_object_part_drag_page_set(o, "dragable", 0.2, 0.2);
    evas_object_move(o, 10 + 10, 10 + 20);
    evas_object_show(o);
    edje_object_size_min_get(o, &(de->minw), &(de->minh));




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to