elm list, genlist, gengrid: Added highlighted and unhighlighted signal callbacks.

SVN revision: 82750
This commit is contained in:
Daniel Juyung Seo 2013-01-14 10:12:50 +00:00
parent dd0d6b153f
commit 84d251acc8
8 changed files with 34 additions and 0 deletions

View File

@ -899,3 +899,6 @@
* Don't link anymore with E_DBus at build time.
2013-01-13 Daniel Juyung Seo (SeoZ)
* Added "highlighted" and "unhighlighted" signals to list, genlist, and gengrid.

View File

@ -29,6 +29,7 @@ Additions:
* Add elm_label_slide_mode_set(), elm_label_slide_mode_get()
* Add elm_label_slide_go()
* Add a label signal callback "slide,end"
* Add "highlighted" and "unhighlighted" callbacks to list, genlist, and gengrid.
Improvements:

View File

@ -57,6 +57,8 @@ static const char SIG_EDGE_LEFT[] = "edge,left";
static const char SIG_EDGE_RIGHT[] = "edge,right";
static const char SIG_MOVED[] = "moved";
static const char SIG_INDEX_UPDATE[] = "index,update";
static const char SIG_HIGHLIGHTED[] = "highlighted";
static const char SIG_UNHIGHLIGHTED[] = "unhighlighted";
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_ACTIVATED, ""},
{SIG_CLICKED_DOUBLE, ""},
@ -82,6 +84,8 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_EDGE_LEFT, ""},
{SIG_EDGE_RIGHT, ""},
{SIG_MOVED, ""},
{SIG_HIGHLIGHTED, ""},
{SIG_UNHIGHLIGHTED, ""},
{NULL, NULL}
};
@ -260,6 +264,7 @@ _item_unselect(Elm_Gen_Item *it)
return;
edje_object_signal_emit(VIEW(it), "elm,state,unselected", "elm");
evas_object_smart_callback_call(WIDGET(it), SIG_UNHIGHLIGHTED, it);
it->highlighted = EINA_FALSE;
if (it->selected)
{
@ -445,6 +450,7 @@ _item_highlight(Elm_Gen_Item *it)
return;
edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
evas_object_smart_callback_call(WIDGET(it), SIG_HIGHLIGHTED, it);
it->highlighted = EINA_TRUE;
}

View File

@ -217,6 +217,10 @@
* until the left edge.
* - @c "edge,right" - This is called when the gengrid is scrolled
* until the right edge.
* - @c "highlighted" - an item in the list is pressed and highlighted.
* The %c event_info parameter is the item that was highlighted.
* - @c "unhighlighted" - an item in the list is unpressed and unhighlighted.
* The %c event_info parameter is the item that was unhighlighted.
*
* Supported elm_object common APIs
* @li elm_object_signal_emit()

View File

@ -66,6 +66,8 @@ static const char SIG_MOVED_AFTER[] = "moved,after";
static const char SIG_MOVED_BEFORE[] = "moved,before";
static const char SIG_INDEX_UPDATE[] = "index,update";
static const char SIG_TREE_EFFECT_FINISHED [] = "tree,effect,finished";
static const char SIG_HIGHLIGHTED[] = "highlighted";
static const char SIG_UNHIGHLIGHTED[] = "unhighlighted";
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_CLICKED_DOUBLE, ""},
@ -104,6 +106,8 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_MOVED_AFTER, ""},
{SIG_MOVED_BEFORE, ""},
{SIG_TREE_EFFECT_FINISHED, ""},
{SIG_HIGHLIGHTED, ""},
{SIG_UNHIGHLIGHTED, ""},
{NULL, NULL}
};
@ -2568,6 +2572,7 @@ _item_highlight(Elm_Gen_Item *it)
edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
if (it->deco_all_view)
edje_object_signal_emit(it->deco_all_view, "elm,state,selected", "elm");
evas_object_smart_callback_call(WIDGET(it), SIG_HIGHLIGHTED, it);
selectraise = edje_object_data_get(VIEW(it), "selectraise");
if ((selectraise) && (!strcmp(selectraise, "on")))
@ -2587,6 +2592,7 @@ _item_unhighlight(Elm_Gen_Item *it)
return;
edje_object_signal_emit(VIEW(it), "elm,state,unselected", "elm");
evas_object_smart_callback_call(WIDGET(it), SIG_UNHIGHLIGHTED, it);
if (it->deco_all_view)
edje_object_signal_emit
(it->deco_all_view, "elm,state,unselected", "elm");

View File

@ -350,6 +350,10 @@
* - @c "language,changed" - This is called when the program's language is
* changed.
* - @c "tree,effect,finished" - This is called when a genlist tree effect is finished.
* - @c "highlighted" - an item in the list is pressed and highlighted.
* The %c event_info parameter is the item that was highlighted.
* - @c "unhighlighted" - an item in the list is unpressed and unhighlighted.
* The %c event_info parameter is the item that was unhighlighted.
*
*
* Supported elm_object_item common APIs

View File

@ -20,6 +20,8 @@ static const char SIG_EDGE_LEFT[] = "edge,left";
static const char SIG_EDGE_RIGHT[] = "edge,right";
static const char SIG_LANG_CHANGED[] = "language,changed";
static const char SIG_SWIPE[] = "swipe";
static const char SIG_HIGHLIGHTED[] = "highlighted";
static const char SIG_UNHIGHLIGHTED[] = "unhighlighted";
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_ACTIVATED, ""},
{SIG_CLICKED_DOUBLE, ""},
@ -32,6 +34,8 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_EDGE_RIGHT, ""},
{SIG_LANG_CHANGED, ""},
{SIG_SWIPE, ""},
{SIG_HIGHLIGHTED, ""},
{SIG_UNHIGHLIGHTED, ""},
{NULL, NULL}
};
@ -873,6 +877,7 @@ _item_highlight(Elm_List_Item *it)
_elm_list_walk(sd);
edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
evas_object_smart_callback_call(obj, SIG_HIGHLIGHTED, it);
select_raise = edje_object_data_get(VIEW(it), "selectraise");
if ((select_raise) && (!strcmp(select_raise, "on")))
evas_object_raise(VIEW(it));
@ -927,6 +932,7 @@ _item_unselect(Elm_List_Item *it)
_elm_list_walk(sd);
edje_object_signal_emit(VIEW(it), "elm,state,unselected", "elm");
evas_object_smart_callback_call(obj, SIG_UNHIGHLIGHTED, it);
stacking = edje_object_data_get(VIEW(it), "stacking");
select_raise = edje_object_data_get(VIEW(it), "selectraise");
if ((select_raise) && (!strcmp(select_raise, "on")))

View File

@ -37,6 +37,10 @@
* - @c "edge,left" - the list is scrolled until the left edge
* - @c "edge,right" - the list is scrolled until the right edge
* - @c "language,changed" - the program's language changed
* - @c "highlighted" - an item in the list is pressed and highlighted.
* The %c event_info parameter is the item that was highlighted.
* - @c "unhighlighted" - an item in the list is unpressed and unhighlighted.
* The %c event_info parameter is the item that was unhighlighted.
*
* Available styles for it are:
* - @c "default"