genlist: implement list position signals

Desktop / Enlightenment / Elementary - Gustavo Sverzut Barbieri [profusion.mobi] - 22 August 2013 15:02 UTC

Genlist will now emit the following signals to item view related to their position in the whole list:- elm,state,list,first: first item of the whole list- elm,state,list,last: last item of the whole list
- elm,state,list,middle: any item that is not first or last.
- elm,state,list,single: when the item is the only element of list. And the following related to a group (considering its given 'parent'):- elm,state,group,first: first item of the group- elm,state,group,last: last item of the group
- elm,state,group,middle: any item that is not first or last.
- elm,state,group,single: when the item is the only element of group.

Unlike odd/even the signals have an extra namespace "list" or "group" to avoid conflicts with applications that may have declared these signals themselves for other purposes.

With this patch one can implement easily something like this:

https://developer.apple.com/library/ios/documentation/userexperience/conceptual/tableview_iphone/Art/tv_grouped_style.jpg

b40a6eb genlist: implement list position signals.
src/lib/elm_genlist.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 73 insertions(+), 2 deletions(-)

Upstream: git.enlightenment.org


  • Share