Hello Daniel, I am not sure they are supported now. When I needed them a while ago, I remember that he only available callbacks that also did the job, were being triggered by other events, like when you highlight an item by walking through the list with keyboard/focus. This wasn't the intended behavior that I was looking for, and I believe that ceolin's commit is closer to what I wanted to do.
Just my 2 cents. On Tue, Mar 26, 2013 at 1:14 PM, Daniel Juyung Seo <[email protected]> wrote: > Hello, I think these smart callbacks are already supported with the > different names. > "highlighted" and "unhighlighted" > So it looks like redundant. > Glima and Flavio Ceolin, how do you think? > > Daniel Juyung Seo (SeoZ) > > On Thu, Mar 21, 2013 at 1:41 AM, Flavio Ceolin - Enlightenment Git > <[email protected]> wrote: >> glima pushed a commit to branch master. >> >> commit 953be9b122be56856c2a69c19b2badee85a0d246 >> Author: Flavio Ceolin <[email protected]> >> Date: Wed Mar 20 13:39:51 2013 -0300 >> >> Genlist, gengrid: two new smart callbacks >> >> Adding ones for mouse pressed and mouse released on items. The event >> info for both callbacks are the items being pressed/released. >> --- >> src/lib/elm_gengrid.c | 7 +++++++ >> src/lib/elm_gengrid.h | 4 ++++ >> src/lib/elm_genlist.c | 7 +++++++ >> src/lib/elm_genlist.h | 4 ++++ >> 4 files changed, 22 insertions(+) >> >> diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c >> index bc16bb3..3bd26e2 100644 >> --- a/src/lib/elm_gengrid.c >> +++ b/src/lib/elm_gengrid.c >> @@ -60,6 +60,8 @@ static const char SIG_INDEX_UPDATE[] = "index,update"; >> static const char SIG_HIGHLIGHTED[] = "highlighted"; >> static const char SIG_UNHIGHLIGHTED[] = "unhighlighted"; >> static const char SIG_LANG_CHANGED[] = "language,changed"; >> +static const char SIG_PRESSED[] = "pressed"; >> +static const char SIG_RELEASED[] = "released"; >> >> static const Evas_Smart_Cb_Description _smart_callbacks[] = { >> {SIG_ACTIVATED, ""}, >> @@ -89,6 +91,8 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] >> = { >> {SIG_HIGHLIGHTED, ""}, >> {SIG_UNHIGHLIGHTED, ""}, >> {SIG_LANG_CHANGED, ""}, >> + {SIG_PRESSED, ""}, >> + {SIG_RELEASED, ""}, >> >> {NULL, NULL} >> }; >> @@ -499,6 +503,8 @@ _item_mouse_down_cb(void *data, >> evas_object_smart_callback_call(WIDGET(it), SIG_CLICKED_DOUBLE, it); >> evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it); >> } >> + >> + evas_object_smart_callback_call(WIDGET(it), SIG_PRESSED, it); >> if (it->long_timer) ecore_timer_del(it->long_timer); >> if (it->realized) >> it->long_timer = ecore_timer_add >> @@ -562,6 +568,7 @@ _item_mouse_up_cb(void *data, >> sd->on_hold = EINA_TRUE; >> else sd->on_hold = EINA_FALSE; >> >> + evas_object_smart_callback_call(WIDGET(it), SIG_RELEASED, it); >> if (it->long_timer) >> { >> ecore_timer_del(it->long_timer); >> diff --git a/src/lib/elm_gengrid.h b/src/lib/elm_gengrid.h >> index b7aef75..35b76d1 100644 >> --- a/src/lib/elm_gengrid.h >> +++ b/src/lib/elm_gengrid.h >> @@ -166,6 +166,10 @@ >> * - @c "activated" - The user has double-clicked or pressed >> * (enter|return|spacebar) on an item. The @c event_info parameter >> * is the gengrid item that was activated. >> + * - @c "pressed" - The user pressed the an item. The @c event_info >> + * parameter is the item that was pressed. >> + * - @c "released" - The user released the an item. The @c event_info >> + * parameter is the item that was released. >> * - @c "clicked,double" - The user has double-clicked an item. >> * The @c event_info parameter is the gengrid item that was >> double-clicked. >> * - @c "longpressed" - This is called when the item is pressed for a >> certain >> diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c >> index ef3d454..40fb162 100644 >> --- a/src/lib/elm_genlist.c >> +++ b/src/lib/elm_genlist.c >> @@ -75,6 +75,8 @@ static const char SIG_TREE_EFFECT_FINISHED [] = >> "tree,effect,finished"; >> static const char SIG_HIGHLIGHTED[] = "highlighted"; >> static const char SIG_UNHIGHLIGHTED[] = "unhighlighted"; >> static const char SIG_LANG_CHANGED[] = "language,changed"; >> +static const char SIG_PRESSED[] = "pressed"; >> +static const char SIG_RELEASED[] = "released"; >> >> static const Evas_Smart_Cb_Description _smart_callbacks[] = { >> {SIG_CLICKED_DOUBLE, ""}, >> @@ -122,6 +124,9 @@ static const Evas_Smart_Cb_Description >> _smart_callbacks[] = { >> {SIG_HIGHLIGHTED, ""}, >> {SIG_UNHIGHLIGHTED, ""}, >> {SIG_LANG_CHANGED, ""}, >> + {SIG_PRESSED, ""}, >> + {SIG_RELEASED, ""}, >> + >> {NULL, NULL} >> }; >> >> @@ -3446,6 +3451,7 @@ _item_mouse_down_cb(void *data, >> evas_object_smart_callback_call(WIDGET(it), SIG_CLICKED_DOUBLE, >> it); >> evas_object_smart_callback_call(WIDGET(it), SIG_ACTIVATED, it); >> } >> + evas_object_smart_callback_call(WIDGET(it), SIG_PRESSED, it); >> if (it->item->swipe_timer) ecore_timer_del(it->item->swipe_timer); >> it->item->swipe_timer = ecore_timer_add(0.4, _swipe_cancel, it); >> if (it->long_timer) ecore_timer_del(it->long_timer); >> @@ -4013,6 +4019,7 @@ _item_mouse_up_cb(void *data, >> sd = GL_IT(it)->wsd; >> >> sd->mouse_down = EINA_FALSE; >> + evas_object_smart_callback_call(WIDGET(it), SIG_RELEASED, it); >> if (sd->multi_touched) >> { >> if ((!sd->multi) && (!it->selected) && (it->highlighted)) >> diff --git a/src/lib/elm_genlist.h b/src/lib/elm_genlist.h >> index 1851ddf..efa8495 100644 >> --- a/src/lib/elm_genlist.h >> +++ b/src/lib/elm_genlist.h >> @@ -264,6 +264,10 @@ >> * - @c "activated" - The user has double-clicked or pressed >> * (enter|return|spacebar) on an item. The @c event_info parameter is the >> * item that was activated. >> + * - @c "pressed" - The user pressed the an item. The @c event_info >> + * parameter is the item that was pressed. >> + * - @c "released" - The user released the an item. The @c event_info >> + * parameter is the item that was released. >> * - @c "clicked,double" - The user has double-clicked an item. The @c >> * event_info parameter is the item that was double-clicked. >> * - @c "selected" - This is called when a user has made an item selected. >> >> -- >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_mar > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Rafael Antognolli http://antognolli.org/ ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
