From: cedric Date: Tue, 24 Jan 2012 15:15:43 +0000 (+0000) Subject: elementary: match elm_list API. X-Git-Tag: REL_F_I9500_20120323_1~17^2~839 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76500bb381e44423a23b22fe8f57e063494f68a4;p=framework%2Fuifw%2Felementary.git elementary: match elm_list API. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@67499 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/examples/genlist_example_02.c b/src/examples/genlist_example_02.c index 0191baf..0148fc5 100644 --- a/src/examples/genlist_example_02.c +++ b/src/examples/genlist_example_02.c @@ -71,7 +71,7 @@ _show_status_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED EINA_LIST_FOREACH(realized, l, glit) printf("%p ", glit); printf("\n"); - printf("genlist mode: %s\n", elm_genlist_mode_get(list)); + printf("genlist mode: %s\n", elm_genlist_mode_type_get(list)); printf("mode item: %p\n", elm_genlist_mode_item_get(list)); evas_object_geometry_get(list, &x, &y, &w, &h); @@ -129,7 +129,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) printf("bounce - horizontal: %d, vertical: %d\n", hbounce, vbounce); printf("compress mode: %d\n", elm_genlist_compress_mode_get(list)); printf("homogeneous: %d\n", elm_genlist_homogeneous_get(list)); - printf("horizontal mode: %d\n", elm_genlist_horizontal_mode_get(list)); + printf("horizontal mode: %d\n", elm_genlist_mode_get(list)); printf("longpress timeout: %0.3f\n", elm_genlist_longpress_timeout_get(list)); printf("multi selection: %d\n", elm_genlist_multi_select_get(list)); @@ -145,7 +145,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) elm_genlist_bounce_set(list, EINA_FALSE, EINA_FALSE); elm_genlist_compress_mode_set(list, EINA_TRUE); elm_genlist_homogeneous_set(list, EINA_FALSE); - elm_genlist_horizontal_mode_set(list, ELM_LIST_LIMIT); + elm_genlist_mode_set(list, ELM_LIST_LIMIT); elm_genlist_multi_select_set(list, EINA_TRUE); elm_genlist_no_select_mode_set(list, EINA_FALSE); elm_genlist_height_for_width_mode_set(list, EINA_FALSE); diff --git a/src/lib/elm_deprecated.h b/src/lib/elm_deprecated.h index cfdb51b..643d0bf 100644 --- a/src/lib/elm_deprecated.h +++ b/src/lib/elm_deprecated.h @@ -1705,6 +1705,41 @@ EINA_DEPRECATED EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj); EINA_DEPRECATED EAPI void elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode); EINA_DEPRECATED EAPI Elm_List_Mode elm_genlist_horizontal_mode_get(const Evas_Object *obj); EINA_DEPRECATED EAPI void elm_genlist_item_icons_orphan(Elm_Object_Item *it); +/** + * This sets the horizontal stretching mode. + * + * @param obj The genlist object + * @param mode The mode to use (one of #ELM_LIST_SCROLL or #ELM_LIST_LIMIT). + * + * This sets the mode used for sizing items horizontally. Valid modes + * are #ELM_LIST_LIMIT and #ELM_LIST_SCROLL. The default is + * ELM_LIST_SCROLL. This mode means that if items are too wide to fit, + * the scroller will scroll horizontally. Otherwise items are expanded + * to fill the width of the viewport of the scroller. If it is + * ELM_LIST_LIMIT, items will be expanded to the viewport width and + * limited to that size. + * + * @see elm_genlist_horizontal_get() + * + * @deprecated use elm_genlist_mode_set() + * @ingroup Genlist + */ +EINA_DEPRECATED EAPI void elm_genlist_horizontal_set(Evas_Object *obj, Elm_List_Mode mode); + +/** + * Gets the horizontal stretching mode. + * + * @param obj The genlist object + * @return The mode to use + * (#ELM_LIST_LIMIT, #ELM_LIST_SCROLL) + * + * @see elm_genlist_horizontal_set() + * + * @deprecated use elm_genlist_mode_get() + * @ingroup Genlist + */ +EAPI Elm_List_Mode elm_genlist_horizontal_get(const Evas_Object *obj); + #define ELM_IMAGE_ROTATE_90_CW 1 #define ELM_IMAGE_ROTATE_180_CW 2 diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 8c076e7..aea67bb 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -4938,8 +4938,8 @@ elm_genlist_item_index_get(Elm_Object_Item *it) } EAPI void -elm_genlist_horizontal_set(Evas_Object *obj, - Elm_List_Mode mode) +elm_genlist_mode_set(Evas_Object *obj, + Elm_List_Mode mode) { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); @@ -4950,14 +4950,21 @@ elm_genlist_horizontal_set(Evas_Object *obj, } EAPI void +elm_genlist_horizontal_set(Evas_Object *obj, + Elm_List_Mode mode) +{ + elm_genlist_mode_set(obj, mode); +} + +EAPI void elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode) { - elm_genlist_horizontal_set(obj, mode); + elm_genlist_mode_set(obj, mode); } EAPI Elm_List_Mode -elm_genlist_horizontal_get(const Evas_Object *obj) +elm_genlist_mode_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) ELM_LIST_LAST; Widget_Data *wd = elm_widget_data_get(obj); @@ -4966,9 +4973,15 @@ elm_genlist_horizontal_get(const Evas_Object *obj) } EAPI Elm_List_Mode +elm_genlist_horizontal_get(const Evas_Object *obj) +{ + return elm_genlist_mode_get(obj); +} + +EAPI Elm_List_Mode elm_genlist_horizontal_mode_get(const Evas_Object *obj) { - return elm_genlist_horizontal_get(obj); + return elm_genlist_mode_get(obj); } EAPI void @@ -5248,7 +5261,7 @@ elm_genlist_mode_item_style_set(Evas_Object *obj, const char *style) } EAPI const char * -elm_genlist_mode_get(const Evas_Object *obj) +elm_genlist_mode_type_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; Widget_Data *wd = elm_widget_data_get(obj); diff --git a/src/lib/elm_genlist.h b/src/lib/elm_genlist.h index 90a87a6..16e3a16 100644 --- a/src/lib/elm_genlist.h +++ b/src/lib/elm_genlist.h @@ -484,11 +484,11 @@ EAPI Eina_Bool elm_genlist_multi_select_get(const Evas_Objec * ELM_LIST_LIMIT, items will be expanded to the viewport width and * limited to that size. * - * @see elm_genlist_horizontal_get() + * @see elm_genlist_mode_get() * * @ingroup Genlist */ -EAPI void elm_genlist_horizontal_set(Evas_Object *obj, Elm_List_Mode mode); +EAPI void elm_genlist_mode_set(Evas_Object *obj, Elm_List_Mode mode); /** * Gets the horizontal stretching mode. @@ -501,7 +501,7 @@ EAPI void elm_genlist_horizontal_set(Evas_Object *obj, * * @ingroup Genlist */ -EAPI Elm_List_Mode elm_genlist_horizontal_get(const Evas_Object *obj); +EAPI Elm_List_Mode elm_genlist_mode_get(const Evas_Object *obj); /** * Set the always select mode. @@ -1866,7 +1866,7 @@ EAPI void elm_genlist_item_mode_set(Elm_Object_Item *it * * @ingroup Genlist */ -EAPI const char *elm_genlist_mode_get(const Evas_Object *obj); +EAPI const char *elm_genlist_mode_type_get(const Evas_Object *obj); /** * Get active genlist mode item