From: SangHyeon Lee Date: Thu, 4 Jan 2018 05:53:07 +0000 (+0900) Subject: genlist: apply tizen_only in upstream genlist X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~610 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F02%2F165802%2F3;p=platform%2Fupstream%2Fefl.git genlist: apply tizen_only in upstream genlist Change-Id: I287e68c10097f65c8f55fb1bef14feb97f03b5a2 Signed-off-by: SangHyeon Lee --- diff --git a/src/lib/elementary/elm_gen.h b/src/lib/elementary/elm_gen.h index 9fc1fa3..e9705b4 100644 --- a/src/lib/elementary/elm_gen.h +++ b/src/lib/elementary/elm_gen.h @@ -124,6 +124,9 @@ typedef struct _Elm_Gen_Item_Class * NULL if you don't care. Currently * it's used only in genlist. */ Elm_Gen_Item_Class_Functions func; /**< Set of callbacks */ +// TIZEN ONLY(20160630): Support homogeneous mode in item class. + Eina_Bool homogeneous : 1; +// } Elm_Gen_Item_Class; /** See @ref Elm_Gen_Item_Class. */ diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index de6421f..19b22b2 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -159,6 +159,8 @@ static const char SIGNAL_GROUP_SINGLE[] = "elm,state,group,single"; static const char SIGNAL_GROUP_FIRST[] = "elm,state,group,first"; static const char SIGNAL_GROUP_LAST[] = "elm,state,group,last"; static const char SIGNAL_GROUP_MIDDLE[] = "elm,state,group,middle"; +//Tizen Only(20160307) +static const char SIGNAL_DEFAULT[] = "elm,state,default"; static void _item_unrealize(Elm_Gen_Item *it); static Eina_Bool _item_select(Elm_Gen_Item *it); @@ -281,6 +283,14 @@ _elm_genlist_pan_elm_pan_content_size_get(Eo *obj EINA_UNUSED, Elm_Genlist_Pan_D if (h) *h = psd->wsd->minh; } +//Tizen Only(20170113) +EOLIAN static void +_elm_genlist_pan_elm_pan_pos_adjust(Eo *obj EINA_UNUSED, Elm_Genlist_Pan_Data *psd EINA_UNUSED, Evas_Coord *x EINA_UNUSED, Evas_Coord *y EINA_UNUSED) +{ + return; +} +// + EOLIAN static void _elm_genlist_pan_efl_canvas_group_group_del(Eo *obj, Elm_Genlist_Pan_Data *psd) { @@ -322,7 +332,8 @@ _elm_genlist_pan_efl_gfx_size_set(Eo *obj, Elm_Genlist_Pan_Data *psd, Eina_Size2 old = efl_gfx_size_get(obj); if ((old.w == size.w) && (old.h == size.h)) goto super; // should already be intercepted above - if ((sd->mode == ELM_LIST_COMPRESS) && (old.w != size.w)) + //TIZEN ONLY(20170512): list scroll should be expanded at least as much as genlist width size. + if ((sd->mode == ELM_LIST_COMPRESS || sd->mode == ELM_LIST_SCROLL) && (old.w != size.w)) { /* fix me later */ ecore_job_del(psd->resize_job); @@ -377,6 +388,9 @@ _item_text_realize(Elm_Gen_Item *it, else { edje_object_part_text_set(target, key, ""); + //TIZEN_ONLY(20180104): call hidden signal when it is not visible + snprintf(buf, sizeof(buf), "elm,state,%s,hidden", key); + edje_object_signal_emit(target, buf, "elm"); } if (_elm_atspi_enabled()) efl_access_name_changed_signal_emit(EO_OBJ(it)); @@ -448,9 +462,15 @@ _item_content_realize(Elm_Gen_Item *it, if (it->itc->func.content_get) content = it->itc->func.content_get ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key); - if (!content) goto out; - } + if (!content) + { + //TIZEN_ONLY(20180104): call hidden signal when it is not visible + snprintf(buf, sizeof(buf), "elm,state,%s,hidden", key); + edje_object_signal_emit(target, buf, "elm"); + goto out; + } + } if (content != old) { eina_hash_add(sd->content_item_map, &content, it->base->eo_obj); @@ -528,12 +548,12 @@ _item_state_realize(Elm_Gen_Item *it, Evas_Object *target, const char *parts) /** * Apply the right style for the created item view. */ -static void -_view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *style) +// TIZEN_ONLY(20150622): update genlist style set +static Eina_Bool +_view_style_find(Elm_Gen_Item *it, Evas_Object *view, const char *style) { char buf[1024]; - const char *stacking_even; - const char *stacking; + char buf2[1024]; ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); // FIXME: There exists @@ -565,12 +585,34 @@ _view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *style) sd->mode == ELM_LIST_COMPRESS ? "_compress" : "",style ? : "default"); } - Efl_Ui_Theme_Apply th_ret = elm_widget_theme_object_set(WIDGET(it), view, "genlist", buf, elm_widget_style_get(WIDGET(it))); if (th_ret == EFL_UI_THEME_APPLY_FAILED) { + //TIZEN_ONLY: Fallback to deafult style when first style set failed. + snprintf(buf2, sizeof(buf2), "item/%s", style ? : "default"); + ERR("%s is not a valid genlist item style. fallback to %s", buf, buf2); + if (!strcmp(buf, buf2)) return EINA_FALSE; + th_ret = elm_widget_theme_object_set(WIDGET(it), view, "genlist", buf2, + elm_widget_style_get(WIDGET(it))); + if (th_ret == EFL_UI_THEME_APPLY_FAILED) return EINA_FALSE; + } + + return EINA_TRUE; +} +// + +static void +_view_style_update(Elm_Gen_Item *it, Evas_Object *view, const char *style) +{ + const char *stacking_even; + const char *stacking; + + // TIZEN_ONLY(20150622): update genlist style set + if (!_view_style_find(it, view, style)) + // + { ERR("%s is not a valid genlist item style. " "Automatically falls back into default style.", style); @@ -792,7 +834,8 @@ _calc_job(void *data) itb->show_me = EINA_FALSE; if (chb) { - if (itb->realized) _item_block_unrealize(itb); + // TIZEN_ONLY(20170106): Fix focus flicking issue when item is prepended + if (itb->realized) _item_block_recalc(itb, in, EINA_FALSE); } if ((itb->changed) || ((itb->must_recalc) && (!did_must_recalc))) { @@ -840,6 +883,9 @@ _calc_job(void *data) itb->w = itb->minw; } } + + // TIZEN_ONLY(20170106): Fix focus flicking issue when item is prepended + /* if ((chb) && (EINA_INLIST_GET(chb)->next)) { EINA_INLIST_FOREACH(EINA_INLIST_GET(chb)->next, itb) @@ -847,6 +893,7 @@ _calc_job(void *data) if (itb->realized) _item_block_unrealize(itb); } } + */ sd->realminw = minw; if (minw < sd->w) minw = sd->w; if ((minw != sd->minw) || (minh != sd->minh)) @@ -935,8 +982,8 @@ _elm_genlist_elm_layout_sizing_eval(Eo *obj, Elm_Genlist_Data *sd) evas_object_size_hint_max_get(obj, &maxw, &maxh); edje_object_size_min_calc(wd->resize_obj, &vmw, &vmh); - - if (sd->mode == ELM_LIST_COMPRESS) + //TIZEN ONLY(20170512): list scroll should be expanded at least as much as genlist width size. + if (sd->mode == ELM_LIST_COMPRESS || sd->mode == ELM_LIST_SCROLL) { Evas_Coord vw = 0, vh = 0; @@ -1653,6 +1700,9 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents) (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)) edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm"); + //Tizen Only(20160307) + edje_object_signal_emit(itc->base_view, SIGNAL_DEFAULT, "elm"); + ELM_SAFE_FREE(it->long_timer, ecore_timer_del); ELM_SAFE_FREE(it->item->swipe_timer, ecore_timer_del); @@ -1940,7 +1990,8 @@ _item_realize(Elm_Gen_Item *it, const int index, Eina_Bool calc) size = eina_hash_find(sd->size_caches, &(it->itc)); /* homogeneous genlist shortcut */ - if ((calc) && (sd->homogeneous) && (!it->item->mincalcd) && size) + // TIZEN ONLY(20160630): Support homogeneous mode in item class. + if ((calc) && (sd->homogeneous || it->itc->homogeneous) && (!it->item->mincalcd) && size) { it->item->w = it->item->minw = size->minw; it->item->h = it->item->minh = size->minh; @@ -1970,7 +2021,8 @@ _item_realize(Elm_Gen_Item *it, const int index, Eina_Bool calc) if (!it->item->mincalcd) { - if (sd->homogeneous && size) + // TIZEN ONLY(20160630): Support homogeneous mode in item class. + if ((sd->homogeneous || it->itc->homogeneous) && size) { it->item->w = it->item->minw = size->minw; it->item->h = it->item->minh = size->minh; @@ -1989,11 +2041,17 @@ _item_realize(Elm_Gen_Item *it, const int index, Eina_Bool calc) // Process signal for proper size calc with text and content visible. edje_object_message_signal_process(VIEW(it)); edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh); + // TIZEN_ONLY(20170512): list scroll should be expanded at least as much as genlist width size. + if (sd->mode == ELM_LIST_COMPRESS || + (sd->mode == ELM_LIST_SCROLL && mw < sd->prev_viewport_w)) + mw = sd->prev_viewport_w; + // it->item->w = it->item->minw = mw; it->item->h = it->item->minh = mh; it->item->mincalcd = EINA_TRUE; - if (sd->homogeneous) + // TIZEN ONLY(20160630): Support homogeneous mode in item class. + if (sd->homogeneous || it->itc->homogeneous) { if (size) eina_hash_del_by_key(sd->size_caches, &(it->itc)); @@ -2667,6 +2725,24 @@ _elm_genlist_pan_efl_canvas_group_group_calculate(Eo *obj, Elm_Genlist_Pan_Data (sd->move_effect_mode == ELM_GENLIST_TREE_EFFECT_NONE)) _item_auto_scroll(sd); + // TIZEN_ONLY(20160907) + // FIXME: There are issue about wrong list positioning in prepend cases. + // To prevent the issue, allocate repositioning in group calculate. + if (sd->prepend_items) + { + Evas_Coord prepend_h = 0; + Elm_Gen_Item *tmp = NULL; + EINA_LIST_FREE(sd->prepend_items, tmp) + { + prepend_h += tmp->item->minh; + } + + elm_interface_scrollable_content_pos_get((sd)->obj, &vx, &vy); + elm_interface_scrollable_content_viewport_geometry_get((sd)->obj, NULL, NULL, &vw, &vh); + /* Set adjusted position as prepended items height */ + elm_interface_scrollable_content_region_show((sd)->obj, vx, vy + prepend_h, vw, vh); + } + elm_interface_scrollable_content_pos_get((sd)->obj, &vx, &vy); elm_interface_scrollable_content_viewport_geometry_get ((sd)->obj, NULL, NULL, &vw, &vh); @@ -2867,7 +2943,8 @@ _elm_genlist_item_focused(Elm_Object_Item *eo_it) (elm_wdg_item_disabled_get(eo_it))) return; - if (it != sd->pin_item) + //TIZEN_ONLY(20161209): Do not autoscroll if scroll to item is exist + if (it != sd->pin_item && (!sd->show_item)) { switch (_elm_config->focus_autoscroll_mode) { @@ -2883,6 +2960,7 @@ _elm_genlist_item_focused(Elm_Object_Item *eo_it) break; } } + // sd->focused_item = eo_it; @@ -4726,6 +4804,10 @@ _item_process_post(Elm_Genlist_Data *sd, Elm_Gen_Item *it) */ if (sd->selected && it->item->before && !it->hide) { + //TIZEN_ONLY(20160907) + //FIXME: There are issue about wrong list positioning in prepend cases. + // To prevent the issue, allocate repositioning in smart calculate. +#if 0 int y = 0, h; Elm_Object_Item *eo_it2; @@ -4743,6 +4825,9 @@ _item_process_post(Elm_Genlist_Data *sd, Elm_Gen_Item *it) else elm_interface_scrollable_content_region_show (sd->obj, it->x + it->item->block->x, y + it->item->h, it->item->block->w, h); + +#endif + sd->prepend_items = eina_list_append(sd->prepend_items, it); } } @@ -4833,8 +4918,9 @@ _item_queue(Elm_Genlist_Data *sd, ELM_SAFE_FREE(sd->queue_idle_enterer, ecore_idle_enterer_del); _queue_process(sd); } + // TIZEN ONLY(20160630): Support homogeneous mode in item class. while ((sd->queue) && (sd->blocks) && - (sd->homogeneous) && (sd->mode == ELM_LIST_COMPRESS)) + ((sd->homogeneous) || it->itc->homogeneous) && (sd->mode == ELM_LIST_COMPRESS)) { ELM_SAFE_FREE(sd->queue_idle_enterer, ecore_idle_enterer_del); _queue_process(sd); @@ -5298,10 +5384,12 @@ _item_block_recalc(Item_Block *itb, const int blk_idx, Eina_Bool qadd) } if (!itb->realized) { - if (itb->sd->homogeneous && + // TIZEN ONLY(20160630): Support homogeneous mode in item class. + if ((itb->sd->homogeneous || it->itc->homogeneous) && ((!size) || it->itc != size->itc)) size = eina_hash_find(itb->sd->size_caches, &(it->itc)); - if (qadd || (itb->sd->homogeneous && !size)) + // TIZEN ONLY(20160630): Support homogeneous mode in item class. + if (qadd || ((itb->sd->homogeneous || it->itc->homogeneous) && !size)) { if (!it->item->mincalcd) changed = EINA_TRUE; if (changed) @@ -5321,7 +5409,8 @@ _item_block_recalc(Item_Block *itb, const int blk_idx, Eina_Bool qadd) } else { - if ((itb->sd->homogeneous) && size && + // TIZEN ONLY(20160630): Support homogeneous mode in item class. + if ((itb->sd->homogeneous || it->itc->homogeneous) && size && (it->item->expanded_depth == size->expanded_depth) && (itb->sd->mode == ELM_LIST_COMPRESS)) { @@ -5640,7 +5729,19 @@ _elm_genlist_looping_up_cb(void *data, Elm_Object_Item *eo_it = elm_genlist_last_item_get(genlist); - elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN); + // TIZEN_ONLY(20150629): add checking item bring in enable on item looping + switch (_elm_config->focus_autoscroll_mode) + { + case ELM_FOCUS_AUTOSCROLL_MODE_SHOW: + elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN); + break; + case ELM_FOCUS_AUTOSCROLL_MODE_BRING_IN: + elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN); + break; + default: + break; + } + // elm_layout_signal_emit(genlist, "elm,action,looping,up,end", "elm"); sd->item_looping_on = EINA_FALSE; @@ -5662,7 +5763,19 @@ _elm_genlist_looping_down_cb(void *data, Elm_Object_Item *eo_it = elm_genlist_first_item_get(genlist); - elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN); + // TIZEN_ONLY(20150629): add checking item bring in enable on item looping + switch (_elm_config->focus_autoscroll_mode) + { + case ELM_FOCUS_AUTOSCROLL_MODE_SHOW: + elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN); + break; + case ELM_FOCUS_AUTOSCROLL_MODE_BRING_IN: + elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN); + break; + default: + break; + } + // elm_layout_signal_emit(genlist, "elm,action,looping,down,end", "elm"); sd->item_looping_on = EINA_FALSE; @@ -7226,8 +7339,10 @@ _elm_genlist_item_coordinates_calc(Elm_Gen_Item *it, return EINA_FALSE; } - //Can't goto the item right now. Reserve it instead. - if (sd->queue || !(sd->homogeneous && (sd->mode == ELM_LIST_COMPRESS))) + // TIZEN ONLY(20160630): Support homogeneous mode in item class. + if ((sd->queue) || (it->item->block->w < 1) || + (!((sd->homogeneous || it->itc->homogeneous) && + (sd->mode == ELM_LIST_COMPRESS)))) { if ((it->item->queued) || (!it->item->mincalcd) || (sd->queue)) deferred_show = EINA_TRUE; @@ -8466,7 +8581,8 @@ _elm_genlist_item_select_mode_set(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it, sd->update_job = ecore_job_add(_update_job, sd->obj); // reset homogeneous item size - if (sd->homogeneous) + // TIZEN ONLY(20160630): Support homogeneous mode in item class. + if (sd->homogeneous || it->itc->homogeneous) { Item_Size *size = eina_hash_find(sd->size_caches, &(it->itc)); diff --git a/src/lib/elementary/elm_genlist.eo b/src/lib/elementary/elm_genlist.eo index 65f749a..20da609 100644 --- a/src/lib/elementary/elm_genlist.eo +++ b/src/lib/elementary/elm_genlist.eo @@ -25,10 +25,19 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll items' callbacks are called only when the item is needed. Note: This also works well with group index. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } get { - [[Get whether the homogeneous mode is enabled.]] + [[Get whether the homogeneous mode is enabled. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } values { homogeneous: bool; [[Assume the items within the genlist are of @@ -47,10 +56,19 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll be called. #ELM_OBJECT_SELECT_MODE_NONE will turn off the ability to select items entirely and they will neither appear selected nor call selected callback functions. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } get { - [[Get the genlist select mode.]] + [[Get the genlist select mode. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } values { mode: Elm.Object.Select_Mode(Elm.Object.Select_Mode.max); [[The select mode.]] @@ -86,10 +104,19 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll Warning: If you set the longpress timeout value with this API, your genlist will not be affected by the longpress value of elementary config value later. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } get { - [[Get the timeout in seconds for the longpress event.]] + [[Get the timeout in seconds for the longpress event. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } values { timeout: double; [[Timeout in seconds. Default is elm config value (1.0).]] @@ -102,10 +129,19 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll This enables ($true) or disables ($false) multi-selection in the list. This allows more than 1 item to be selected. To retrieve the list of selected items, use @.selected_items.get. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } get { - [[Get if multi-selection in genlist is enabled or disabled.]] + [[Get if multi-selection in genlist is enabled or disabled. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } values { multi: bool; [[Multi-select enable/disable. Default is disabled.]] @@ -118,10 +154,19 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll After turning on the reorder mode, longpress on normal item will trigger reordering of the item. You can move the item up and down. However, reorder does not work with group item. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } get { - [[Get the reorder mode.]] + [[Get the reorder mode. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } values { reorder_mode: bool; [[The reorder mode.]] @@ -182,10 +227,19 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll lists, so unless you know you will have a lot of objects visible in the screen at the same time, don't try to change this. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } get { - [[Get the maximum number of items within an item block.]] + [[Get the maximum number of items within an item block. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } values { count: int; [[Maximum number of items within an item block. Default is 32.]] @@ -209,11 +263,19 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll called. Highlight is enabled by default. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } get { [[Get whether the genlist items' should be highlighted when item selected. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } values { @@ -249,10 +311,19 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll in genlist which can be on the flying resizable (such as TEXTBLOCK). If then, some dynamic esizable objects in genlist would not diplayed properly. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } get { - [[Get the horizontal stretching mode.]] + [[Get the horizontal stretching mode. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } values { mode: Elm.List.Mode(Elm.List.Mode.last); [[The mode to use (one of @Elm.List.Mode.scroll or @Elm.List.Mode.limit).]] @@ -279,6 +350,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll @.selected_items.get for when multi-selection is used). If no item is selected, $null is returned. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: Elm.Widget.Item; [[The selected item, or $null if none is selected.]] } @@ -291,6 +366,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll If filter is set on genlist, it returns the first filtered item in the list. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: Elm.Widget.Item; [[The first item or $null.]] } @@ -304,6 +383,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll freed by the caller when done with \@ref eina_list_free. The item pointers in the list are only valid so long as those items are not deleted or the genlist is not deleted. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: list @owned @warn_unused; [[List of realized items]] } @@ -322,6 +405,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll Note: If not in multi-select mode, consider using function @.selected_item.get instead. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: const(list); [[List of selected items]] } @@ -334,6 +421,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll If filter is set to genlist, it returns last filtered item in the list. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: Elm.Widget.Item; [[Last item in list]] } @@ -343,6 +434,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll This inserts an item before another in the list. It will be in the same tree level or group as the item it is inserted before. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: Elm.Widget.Item; [[Handle to inserted item]] params { @@ -364,6 +459,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll desired to be reflected. To update just one item, use \@ref elm_genlist_item_update. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } item_insert_after { @@ -371,6 +470,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll This inserts an item after another in the list. It will be in the same tree level or group as the item it is inserted after. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: Elm.Widget.Item; [[Handle to inserted item]] params { @@ -395,6 +498,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll as an item (no item found there), then posret may indicate -1 or 1 based if the coordinate is above or below all items respectively in the genlist. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: Elm.Widget.Item; [[Item at position]] params { @@ -443,6 +550,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll This behavior is O(1) and includes items which may or may not be realized. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: uint; [[Item in list]] } @@ -451,6 +562,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll This adds an item to the beginning of the list or beginning of the children of the parent if given. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: Elm.Widget.Item; [[Handle to prepended item]] params { @@ -466,6 +581,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll [[Remove all items from a given genlist widget. This removes (and deletes) all items in $obj, leaving it empty. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } item_append { @@ -473,6 +592,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll This adds the given item to the end of the list or the end of the children list if the $parent is given. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: Elm.Widget.Item; [[Handle to appended item]] params { @@ -490,6 +613,10 @@ class Elm.Genlist (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll This inserts an item in the genlist based on user defined comparison function. The two arguments passed to the function $func are genlist item handles to compare. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] return: Elm.Widget.Item; [[Handle to inserted item]] params { diff --git a/src/lib/elementary/elm_genlist_item.eo b/src/lib/elementary/elm_genlist_item.eo index 00aa8ad..6440a8e 100644 --- a/src/lib/elementary/elm_genlist_item.eo +++ b/src/lib/elementary/elm_genlist_item.eo @@ -55,6 +55,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) If filter is set on genlist, this returns the filtered item placed before $item in the list. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } values { @@ -76,6 +80,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) If a item has subitems, and it have expand all subitems will be ignore, and will get the next item in the same level. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } values { @@ -89,6 +97,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) This returns the item that was specified as parent of the item $it on \@ref elm_genlist_item_append and insertion related functions. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } values { @@ -111,7 +123,12 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) } @property selected { get { - [[Get whether a given genlist item is selected or not.]] + [[Get whether a given genlist item is selected or not. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } set { [[Set whether a given genlist item is selected or not @@ -120,6 +137,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) selection is not enabled on the containing genlist and $selected is $true, any other previously selected items will get unselected in favor of this new one. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } values { @@ -131,6 +152,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) [[Get the expanded state of an item This gets the expanded state of an item. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } set { @@ -148,6 +173,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) of this item (if it is a parent). You must manually delete and create them on the callbacks of the "expanded" or "contracted" signals. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } values { @@ -156,7 +185,12 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) } @property expanded_depth { get { - [[Get the depth of expanded item.]] + [[Get the depth of expanded item. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } values { depth: int; [[The depth of expanded item.]] @@ -169,6 +203,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) This returns the Genlist_Item_Class for the given item. It can be used to examine the function pointers and item_style. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } values { @@ -180,6 +218,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) [[Get the index of the item. It is only valid once displayed. The index start from 1. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } values { @@ -225,6 +267,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) [[Get the genlist item's select mode. It's ELM_OBJECT_SELECT_MODE_MAX on failure. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } set { @@ -251,6 +297,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) some touch or small screen devices. So it is enabled, the item can be shrink than predefined finger-size value. And the item will be updated. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } values { @@ -264,6 +314,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) This function returns the item's type. Normally the item's type. If it failed, return value is ELM_GENLIST_ITEM_MAX. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } values { @@ -307,13 +361,27 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) This removes all items that are children (and their descendants) of the given item $it. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } promote { - [[Promote an item to the top of the list.]] + [[Promote an item to the top of the list. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } demote { - [[Demote an item to the end of the list.]] + [[Demote an item to the end of the list. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif + ]] } show { [[Show the portion of a genlist's internal list containing @@ -322,6 +390,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) This causes genlist to jump to the given item $it and show it (by jumping to that position), if it is not fully visible. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] params { @in type: Elm.Genlist.Item.Scrollto_Type; [[The position to bring in, the given item to. @@ -336,6 +408,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) show it (by animatedly scrolling), if it is not fully visible. This may use animation and take a some time to do so. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] params { @in type: Elm.Genlist.Item.Scrollto_Type; [[The position to bring in, the given item to. @@ -349,6 +425,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) in the item, meaning that they will no longer be managed by genlist and are floating "orphans" that can be re-used elsewhere if the user wants to. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] params { @out l: list @owned; [[The contents list to return.]] @@ -371,6 +451,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) because edje_object is deleted and created again by this API. If you want to avoid this, please use \@ref elm_genlist_item_fields_update. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] } fields_update { @@ -385,6 +469,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) Use \@ref elm_genlist_realized_items_update to update an item's all property. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] params { @in parts: string; [[The name of item's part.]] @@ -397,6 +485,10 @@ class Elm.Genlist.Item(Elm.Widget.Item.Static_Focus) This sets another class of the item, changing the way that it is displayed. After changing the item class @.update is called on the item $it. + + \@if MOBILE \@since_tizen 2.3 + \@elseif WEARABLE \@since_tizen 2.3.1 + \@endif ]] params { @cref itc: Elm.Genlist.Item.Class; [[The item class for the item.]] diff --git a/src/lib/elementary/elm_widget_genlist.h b/src/lib/elementary/elm_widget_genlist.h index a3ba1d8..368c517 100644 --- a/src/lib/elementary/elm_widget_genlist.h +++ b/src/lib/elementary/elm_widget_genlist.h @@ -212,6 +212,8 @@ struct _Elm_Genlist_Data Eina_Bool tree_effect_animator : 1; Eina_Bool pin_item_top : 1; + //Tizen Only + Eina_List *prepend_items; }; typedef struct _Item_Block Item_Block;