Attached patch adds a get_mouse_buttons function to edje embryo scripts.
The function returns the button mask.

-- Lars Munch

Index: data/include/edje.inc
===================================================================
RCS file: /var/cvs/e/e17/libs/edje/data/include/edje.inc,v
retrieving revision 1.24
diff -u -r1.24 edje.inc
--- data/include/edje.inc	11 Apr 2008 23:36:35 -0000	1.24
+++ data/include/edje.inc	14 Apr 2008 19:17:25 -0000
@@ -104,6 +104,7 @@
 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);
Index: src/lib/edje_embryo.c
===================================================================
RCS file: /var/cvs/e/e17/libs/edje/src/lib/edje_embryo.c,v
retrieving revision 1.60
diff -u -r1.60 edje_embryo.c
--- src/lib/edje_embryo.c	11 Apr 2008 23:36:35 -0000	1.60
+++ src/lib/edje_embryo.c	14 Apr 2008 19:17:27 -0000
@@ -795,6 +795,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)
@@ -2229,6 +2240,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);
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
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