On Wed, Jan 20, 2010 at 4:42 PM, daniele_athome
<daniele.ath...@gmail.com> wrote:
> On Wed, Jan 20, 2010 at 06:55, Brian Wang <brian.wang.0...@gmail.com> wrote:
>> Hello all,
>>
>> The attached enables the programmer to handle 'pressed' signal (mouse
>> down) on elm_button.
>
> Ehm where is the attachment? Sorry I cannot see it, neither in the
> received e-mail nor in ML archives.

Strange... I did attach the patch.  Everyone seeing the same thing?

Well here it is without the attachment complication:

Index: Elementary.h.in
===================================================================
--- Elementary.h.in     (revision 45349)
+++ Elementary.h.in     (working copy)
@@ -382,7 +382,8 @@
     * hoversel_vertical_entry
     */
    /* smart callbacks called:
-    * "clicked" - the user clicked the button
+    * "clicked" - the user clicked the button (up event)
+    * "pressed" - the user pressed the button (down event)
     */

    typedef enum _Elm_Scroller_Policy
Index: elm_button.c
===================================================================
--- elm_button.c        (revision 45349)
+++ elm_button.c        (working copy)
@@ -23,6 +23,7 @@
 static void _changed_size_hints(void *data, Evas *e, Evas_Object
*obj, void *event_info);
 static void _sub_del(void *data, Evas_Object *obj, void *event_info);
 static void _signal_clicked(void *data, Evas_Object *obj, const char
*emission, const char *source);
+static void _signal_pressed(void *data, Evas_Object *obj, const char
*emission, const char *source);
 static void _on_focus_hook(void *data, Evas_Object *obj);

 static void
@@ -126,6 +127,14 @@
    evas_object_smart_callback_call(data, "clicked", NULL);
 }

+static void
+_signal_pressed(void *data, Evas_Object *obj, const char *emission,
const char *source)
+{
+   Widget_Data *wd = elm_widget_data_get(data);
+   if (!wd) return;
+   evas_object_smart_callback_call(data, "pressed", NULL);
+}
+
 /**
  * Add a new button to the parent
  * @param parent The parent object
@@ -156,6 +165,8 @@
    _elm_theme_set(wd->btn, "button", "base", "default");
    edje_object_signal_callback_add(wd->btn, "elm,action,click", "",
                                    _signal_clicked, obj);
+   edje_object_signal_callback_add(wd->btn, "elm,action,press", "",
+                                   _signal_pressed, obj);
    elm_widget_resize_object_set(obj, wd->btn);

    evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);

>
> --
> daniele_athome
>



-- 
brian
------------------

Cool-Karaoke - The smallest recording studio, in your palm, open-sourced
http://cool-idea.com.tw/

iMaGiNaTiOn iS mOrE iMpOrTaNt tHaN kNoWlEdGe

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to