From: Mike McCormack Date: Wed, 23 Nov 2011 07:17:42 +0000 (+0900) Subject: Merge elm_diskselector_display_item_num_get() from upstream X-Git-Tag: REL_F_I9500_20111128_2~63 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=109e7374756d2976bc4c44783b327e8cc48e3f5f;p=framework%2Fuifw%2Felementary.git Merge elm_diskselector_display_item_num_get() from upstream --- diff --git a/src/bin/test_diskselector.c b/src/bin/test_diskselector.c index 927806d..266c103 100644 --- a/src/bin/test_diskselector.c +++ b/src/bin/test_diskselector.c @@ -155,6 +155,7 @@ test_diskselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even // displayed item number setting example disk = elm_diskselector_add(win); elm_diskselector_display_item_num_set(disk, 5); + printf("Number of Items in DiskSelector : %d\n", elm_diskselector_display_item_num_get(disk)); for (idx = 0; idx < (int)(sizeof(month_list) / sizeof(month_list[0])); idx++) { @@ -172,6 +173,7 @@ test_diskselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even // displayed item number setting example disk = elm_diskselector_add(win); elm_diskselector_display_item_num_set(disk, 7); + printf("Number of Items in DiskSelector : %d\n", elm_diskselector_display_item_num_get(disk)); for (idx = 1; idx < 31; idx++) { diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c index 453732d..a05d331 100644 --- a/src/lib/elm_diskselector.c +++ b/src/lib/elm_diskselector.c @@ -1382,3 +1382,12 @@ elm_diskselector_display_item_num_set(Evas_Object *obj, int num) wd->display_item_num = num; wd->display_item_num_by_api = EINA_TRUE; } + +EAPI int +elm_diskselector_display_item_num_get(const Evas_Object *item) +{ + ELM_CHECK_WIDTYPE(item, widtype) (-1); + Widget_Data *wd = elm_widget_data_get(item); + if (!wd) return -1; + return wd->display_item_num; +}