Hi

Attached patch adds three new functions to edje/embryo, namely
part_raise, part_lower and get_mouse_buttons.

Comments?

Regrads
Lars Munch
Index: data/include/edje.inc
===================================================================
RCS file: /var/cvs/e/e17/libs/edje/data/include/edje.inc,v
retrieving revision 1.23
diff -u -u -r1.23 edje.inc
--- data/include/edje.inc	11 Aug 2007 13:20:33 -0000	1.23
+++ data/include/edje.inc	5 Apr 2008 18:48:14 -0000
@@ -104,10 +104,13 @@
 native       get_text_class   (class[], font[], &Float:size);
 native       get_geometry     (part_id, &x, &y, &w, &h);
 native       get_mouse        (&x, &y);
+native       get_mouse_buttons();
 native       stop_program     (program_id);
 native       stop_programs_on (part_id);
 native       set_min_size     (Float:w, Float:h);
 native       set_max_size     (Float:w, Float:h);
+native       part_raise       (part_id);
+native       part_lower       (part_id);
 
 enum Msg_Type
 {
Index: src/lib/edje_embryo.c
===================================================================
RCS file: /var/cvs/e/e17/libs/edje/src/lib/edje_embryo.c,v
retrieving revision 1.59
diff -u -u -r1.59 edje_embryo.c
--- src/lib/edje_embryo.c	6 Mar 2008 17:52:58 -0000	1.59
+++ src/lib/edje_embryo.c	5 Apr 2008 18:48:15 -0000
@@ -794,6 +794,17 @@
    return 0;
 }
 
+/* get_mouse_buttons() */
+static Embryo_Cell
+_edje_embryo_fn_get_mouse_buttons(Embryo_Program *ep, Embryo_Cell *params)
+{
+   Edje *ed;
+
+   CHKPARAM(0);
+   ed = embryo_program_data_get(ep);
+   return evas_pointer_button_down_mask_get(ed->evas);
+}
+
 /* emit(sig[], src[]) */
 static Embryo_Cell
 _edje_embryo_fn_emit(Embryo_Program *ep, Embryo_Cell *params)
@@ -2129,6 +2140,44 @@
    return 0;
 }
 
+/* part_raise(part_id) */
+static Embryo_Cell
+_edje_embryo_fn_part_raise(Embryo_Program *ep, Embryo_Cell *params)
+{	      
+   int part_id = 0;
+   Edje *ed;	 
+		 
+   CHKPARAM(1);	 
+	      
+   part_id = params[1];
+   if (part_id < 0) return 0;
+
+   ed = embryo_program_data_get(ep);
+		      
+   evas_object_raise(ed->obj);
+
+   return 0;
+}
+
+/* part_lower(part_id) */
+static Embryo_Cell
+_edje_embryo_fn_part_lower(Embryo_Program *ep, Embryo_Cell *params)
+{	      
+   int part_id = 0;
+   Edje *ed;	 
+		 
+   CHKPARAM(1);	 
+	      
+   part_id = params[1];
+   if (part_id < 0) return 0;
+
+   ed = embryo_program_data_get(ep);
+		      
+   evas_object_lower(ed->obj);
+
+   return 0;
+}
+
 void
 _edje_embryo_script_init(Edje *ed)
 {
@@ -2192,6 +2241,7 @@
    embryo_program_native_call_add(ep, "get_drag_page", _edje_embryo_fn_get_drag_page);
    embryo_program_native_call_add(ep, "set_drag_page", _edje_embryo_fn_set_drag_page);
    embryo_program_native_call_add(ep, "get_mouse", _edje_embryo_fn_get_mouse);
+   embryo_program_native_call_add(ep, "get_mouse_buttons", _edje_embryo_fn_get_mouse_buttons);
    embryo_program_native_call_add(ep, "stop_program", _edje_embryo_fn_stop_program);
    embryo_program_native_call_add(ep, "stop_programs_on", _edje_embryo_fn_stop_programs_on);
    embryo_program_native_call_add(ep, "set_min_size", _edje_embryo_fn_set_min_size);
@@ -2203,6 +2253,9 @@
    embryo_program_native_call_add(ep, "set_state_val", _edje_embryo_fn_set_state_val);
    embryo_program_native_call_add(ep, "get_state_val", _edje_embryo_fn_get_state_val);
 
+   embryo_program_native_call_add(ep, "part_raise", _edje_embryo_fn_part_raise);
+   embryo_program_native_call_add(ep, "part_lower", _edje_embryo_fn_part_lower);
+
 //   embryo_program_vm_push(ed->collection->script);
 //   _edje_embryo_globals_init(ed);
 }
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to