From f61d255cb25d0c79912e63ac26a4dd0ff8a46533 Mon Sep 17 00:00:00 2001 From: hermet Date: Fri, 30 Dec 2011 08:33:50 +0000 Subject: [PATCH] elementary/diskselector - Elm_Diskselector_Item -> Elm_Object_Item Suddently splitted header files. :( git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@66671 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- doc/examples.dox | 2 +- src/bin/test_diskselector.c | 53 ++++---- src/examples/diskselector_example_02.c | 95 +++++++------- src/lib/Elementary.h | 16 +-- src/lib/elm_diskselector.c | 229 ++++++++++++++++----------------- src/lib/elm_diskselector.h | 111 ++++++++-------- 6 files changed, 246 insertions(+), 260 deletions(-) diff --git a/doc/examples.dox b/doc/examples.dox index cbe77d9..8bf1220 100644 --- a/doc/examples.dox +++ b/doc/examples.dox @@ -2135,7 +2135,7 @@ * * This code places a Elementary diskselector widgets on a window, * along with some buttons trigerring actions on it (though its API). - * It covers most of Elm_Diskselector_Item functions. + * It covers most of diskselector item functions. * * On our @c main function, we are adding a default diskselector with * 3 items. We are only setting their labels (second parameter of function diff --git a/src/bin/test_diskselector.c b/src/bin/test_diskselector.c index 266c103..158de0b 100644 --- a/src/bin/test_diskselector.c +++ b/src/bin/test_diskselector.c @@ -7,31 +7,32 @@ static void _disk_sel(void *data __UNUSED__, Evas_Object * obj __UNUSED__, void *event_info) { - Elm_Diskselector_Item *it = event_info; - printf("Equinox: %s\n", elm_diskselector_item_label_get(it)); + Elm_Object_Item *ds_it = event_info; + printf("Equinox: %s\n", elm_diskselector_item_label_get(ds_it)); } static void _disk_next(void *data __UNUSED__, Evas_Object * obj __UNUSED__, void *event_info) { - Elm_Diskselector_Item *next, *prev, *it = event_info; - prev = elm_diskselector_item_prev_get(it); - next = elm_diskselector_item_next_get(it); - printf("Prev: %s, Next: %s\n", elm_diskselector_item_label_get(prev), - elm_diskselector_item_label_get(next)); + Elm_Object_Item *next_ds_it, *prev_ds_it, *ds_it = event_info; + prev_ds_it = elm_diskselector_item_prev_get(ds_it); + next_ds_it = elm_diskselector_item_next_get(ds_it); + printf("Prev: %s, Next: %s\n", + elm_diskselector_item_label_get(prev_ds_it), + elm_diskselector_item_label_get(next_ds_it)); } static void _print_disk_info_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) { - Elm_Diskselector_Item *it = event_info; - printf("Selected label: %s\n", elm_diskselector_item_label_get(it)); + Elm_Object_Item *ds_it = event_info; + printf("Selected label: %s\n", elm_diskselector_item_label_get(ds_it)); } static Evas_Object * _disk_create(Evas_Object *win, Eina_Bool round) { - Elm_Diskselector_Item *it; + Elm_Object_Item *ds_it; Evas_Object *di; di = elm_diskselector_add(win); @@ -43,13 +44,13 @@ _disk_create(Evas_Object *win, Eina_Bool round) elm_diskselector_item_append(di, "May", NULL, NULL, NULL); elm_diskselector_item_append(di, "June", NULL, NULL, NULL); elm_diskselector_item_append(di, "July", NULL, NULL, NULL); - it = elm_diskselector_item_append(di, "August", NULL, NULL, NULL); + ds_it = elm_diskselector_item_append(di, "August", NULL, NULL, NULL); elm_diskselector_item_append(di, "September", NULL, _disk_sel, NULL); elm_diskselector_item_append(di, "October", NULL, NULL, NULL); elm_diskselector_item_append(di, "November", NULL, NULL, NULL); elm_diskselector_item_append(di, "December", NULL, NULL, NULL); - elm_diskselector_item_selected_set(it, EINA_TRUE); + elm_diskselector_item_selected_set(ds_it, EINA_TRUE); elm_diskselector_round_set(di, round); return di; @@ -59,7 +60,7 @@ void test_diskselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Evas_Object *win, *bg, *bx, *disk, *ic; - Elm_Diskselector_Item *it; + Elm_Object_Item *ds_it; char buf[PATH_MAX]; int idx = 0; @@ -93,8 +94,8 @@ test_diskselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even elm_box_pack_end(bx, disk); evas_object_show(disk); evas_object_smart_callback_add(disk, "selected", _print_disk_info_cb, NULL); - it = elm_diskselector_selected_item_get(disk); - elm_diskselector_item_selected_set(it, EINA_FALSE); + ds_it = elm_diskselector_selected_item_get(disk); + elm_diskselector_item_selected_set(ds_it, EINA_FALSE); disk = _disk_create(win, EINA_FALSE); evas_object_size_hint_weight_set(disk, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -102,9 +103,9 @@ test_diskselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even elm_box_pack_end(bx, disk); evas_object_show(disk); evas_object_smart_callback_add(disk, "selected", _print_disk_info_cb, NULL); - it = elm_diskselector_first_item_get(disk); - it = elm_diskselector_item_next_get(it); - elm_diskselector_item_selected_set(it, EINA_TRUE); + ds_it = elm_diskselector_first_item_get(disk); + ds_it = elm_diskselector_item_next_get(ds_it); + elm_diskselector_item_selected_set(ds_it, EINA_TRUE); disk = _disk_create(win, EINA_FALSE); evas_object_size_hint_weight_set(disk, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -155,14 +156,16 @@ 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)); + 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++) { - it = elm_diskselector_item_append(disk, month_list[idx], NULL, NULL, NULL); + ds_it = elm_diskselector_item_append(disk, month_list[idx], NULL, NULL, + NULL); } - elm_diskselector_item_selected_set(it, EINA_TRUE); + elm_diskselector_item_selected_set(ds_it, EINA_TRUE); elm_diskselector_round_set(disk, EINA_TRUE); evas_object_size_hint_weight_set(disk, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(disk, EVAS_HINT_FILL, 0.5); @@ -173,15 +176,16 @@ 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)); + printf("Number of Items in DiskSelector : %d\n", + elm_diskselector_display_item_num_get(disk)); for (idx = 1; idx < 31; idx++) { snprintf(date, sizeof(date), "%d", idx); - it = elm_diskselector_item_append(disk, date, NULL, NULL, NULL); + ds_it = elm_diskselector_item_append(disk, date, NULL, NULL, NULL); } - elm_diskselector_item_selected_set(it, EINA_TRUE); + elm_diskselector_item_selected_set(ds_it, EINA_TRUE); elm_diskselector_round_set(disk, EINA_TRUE); evas_object_size_hint_weight_set(disk, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(disk, EVAS_HINT_FILL, 0.5); @@ -189,7 +193,6 @@ test_diskselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even evas_object_show(disk); evas_object_smart_callback_add(disk, "selected", _print_disk_info_cb, NULL); - evas_object_resize(win, 320, 480); evas_object_show(win); } diff --git a/src/examples/diskselector_example_02.c b/src/examples/diskselector_example_02.c index a95e47b..131c203 100644 --- a/src/examples/diskselector_example_02.c +++ b/src/examples/diskselector_example_02.c @@ -29,20 +29,19 @@ _on_done(void *data __UNUSED__, static void _add_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Elm_Diskselector_Item *it; + Elm_Object_Item *ds_it; Evas_Object *ds = data; char label[32]; snprintf(label, sizeof(label), "Item %i", counter++); - it = elm_diskselector_item_append(ds, label, NULL, NULL, NULL); - if (!it) - printf("Error adding item\n"); + ds_it = elm_diskselector_item_append(ds, label, NULL, NULL, NULL); + if (!ds_it) printf("Error adding item\n"); } static void _add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Elm_Diskselector_Item *it; + Elm_Object_Item *ds_it; Evas_Object *ic, *ds = data; char label[32]; @@ -50,38 +49,36 @@ _add_ic_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) ic = elm_icon_add(ds); elm_icon_standard_set(ic, "home"); - it = elm_diskselector_item_append(ds, label, ic, NULL, NULL); - if (!it) - printf("Error adding item with icon\n"); + ds_it = elm_diskselector_item_append(ds, label, ic, NULL, NULL); + if (!ds_it) printf("Error adding item with icon\n"); } static void _sel_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) { - Elm_Diskselector_Item *it = event_info; - printf("Selected label: %s\n", elm_diskselector_item_label_get(it)); + Elm_Object_Item *ds_it = event_info; + printf("Selected label: %s\n", elm_diskselector_item_label_get(ds_it)); } static void _add_func_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Elm_Diskselector_Item *it; + Elm_Object_Item *ds_it; Evas_Object *ds = data; char label[32]; snprintf(label, sizeof(label), "Item %i", counter++); - it = elm_diskselector_item_append(ds, label, NULL, _sel_cb, NULL); - if (!it) - printf("Error adding item\n"); + ds_it = elm_diskselector_item_append(ds, label, NULL, _sel_cb, NULL); + if (!ds_it) printf("Error adding item\n"); } static void _sel_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info) { char *content = data; - Elm_Diskselector_Item *it = event_info; + Elm_Object_Item *ds_it = event_info; printf("Selected label: %s with data: %s\n", - elm_diskselector_item_label_get(it), content); + elm_diskselector_item_label_get(ds_it), content); } static void @@ -93,51 +90,51 @@ _free_data(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) static void _add_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Elm_Diskselector_Item *it; + Elm_Diskselector_Item *ds_it; Evas_Object *ds = data; char label[32]; char *content = malloc(sizeof(char) * 32); snprintf(content, 32, "Item content %i", counter); snprintf(label, sizeof(label), "Item %i", counter++); - it = elm_diskselector_item_append(ds, label, NULL, _sel_data_cb, content); - if (!it) { + ds_it = elm_diskselector_item_append(ds, label, NULL, _sel_data_cb, content); + if (!ds_it) { printf("Error adding item\n"); return; } - elm_diskselector_item_del_cb_set(it, _free_data); + elm_diskselector_item_del_cb_set(ds_it, _free_data); } static void _del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Elm_Diskselector_Item *selected_item; + Elm_Object_Item *selected_ds_it; Evas_Object *ds = data; - selected_item = elm_diskselector_selected_item_get(ds); - elm_diskselector_item_del(selected_item); + selected_ds_it = elm_diskselector_selected_item_get(ds); + elm_diskselector_item_del(selected_ds_it); } static void _unselect_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Elm_Diskselector_Item *selected_item; + Elm_Object_Item *selected_ds_it; Evas_Object *ds = data; - selected_item = elm_diskselector_selected_item_get(ds); - elm_diskselector_item_selected_set(selected_item, EINA_FALSE); + selected_ds_it = elm_diskselector_selected_item_get(ds); + elm_diskselector_item_selected_set(selected_ds_it, EINA_FALSE); } static void _print_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { const Eina_List *l, *items; - Elm_Diskselector_Item *it; + Elm_Object_Item *ds_it; Evas_Object *ds = data; items = elm_diskselector_items_get(ds); - EINA_LIST_FOREACH(items, l, it) - printf("%s\n", elm_diskselector_item_label_get(it)); + EINA_LIST_FOREACH(items, l, ds_it) + printf("%s\n", elm_diskselector_item_label_get(ds_it)); } static void @@ -150,51 +147,51 @@ _clear_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) static void _select_first_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Elm_Diskselector_Item *first_item; + Elm_Object_Item *first_ds_it; Evas_Object *ds = data; - first_item = elm_diskselector_first_item_get(ds); - if (first_item) - elm_diskselector_item_selected_set(first_item, EINA_TRUE); + first_ds_it = elm_diskselector_first_item_get(ds); + if (first_ds_it) + elm_diskselector_item_selected_set(first_ds_it, EINA_TRUE); } static void _select_last_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Elm_Diskselector_Item *last_item; + Elm_Object_Item *last_ds_it; Evas_Object *ds = data; - last_item = elm_diskselector_last_item_get(ds); - if (last_item) - elm_diskselector_item_selected_set(last_item, EINA_TRUE); + last_ds_it = elm_diskselector_last_item_get(ds); + if (last_ds_it) + elm_diskselector_item_selected_set(last_ds_it, EINA_TRUE); } static void _select_next_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Elm_Diskselector_Item *selected_item, *next_item; + Elm_Diskselector_Item *selected_ds_it, *next_ds_it; Evas_Object *ds = data; - selected_item = elm_diskselector_selected_item_get(ds); - if (!selected_item) return; + selected_ds_it = elm_diskselector_selected_item_get(ds); + if (!selected_ds_it) return; - next_item = elm_diskselector_item_next_get(selected_item); - if (next_item) - elm_diskselector_item_selected_set(next_item, EINA_TRUE); + next_ds_it = elm_diskselector_item_next_get(selected_ds_it); + if (next_ds_it) + elm_diskselector_item_selected_set(next_ds_it, EINA_TRUE); } static void _select_prev_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Elm_Diskselector_Item *selected_item, *prev_item; + Elm_Object_Item *selected_ds_it, *prev_ds_it; Evas_Object *ds = data; - selected_item = elm_diskselector_selected_item_get(ds); - if (!selected_item) return; + selected_ds_it = elm_diskselector_selected_item_get(ds); + if (!selected_ds_it) return; - prev_item = elm_diskselector_item_prev_get(selected_item); - if (prev_item) - elm_diskselector_item_selected_set(prev_item, EINA_TRUE); + prev_ds_it = elm_diskselector_item_prev_get(selected_ds_it); + if (prev_ds_it) + elm_diskselector_item_selected_set(prev_ds_it, EINA_TRUE); } EAPI_MAIN int diff --git a/src/lib/Elementary.h b/src/lib/Elementary.h index 3b110ae..94a5ef6 100644 --- a/src/lib/Elementary.h +++ b/src/lib/Elementary.h @@ -2,20 +2,9 @@ * @file Elementary.h * @brief Elementary Widget Library */ -#include -#include -#include - #ifndef ELEMENTARY_H #define ELEMENTARY_H -/** - * @file Elementary.h - * @brief Elementary's API - * - * Elementary API. - */ - #define ELM_UNIX #undef ELM_WIN32 #undef ELM_WINCE @@ -138,6 +127,11 @@ extern "C" { #endif +/* docs */ +#include +#include +#include + #define ELM_VERSION_MAJOR 0 #define ELM_VERSION_MINOR 8 diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c index e74a0b8..1ac7f6e 100644 --- a/src/lib/elm_diskselector.c +++ b/src/lib/elm_diskselector.c @@ -13,6 +13,7 @@ #define DISPLAY_ITEM_NUM_MIN 3 typedef struct _Widget_Data Widget_Data; +typedef struct _Elm_Diskselector_Item Elm_Diskselector_Item; struct _Widget_Data { @@ -50,10 +51,6 @@ struct _Elm_Diskselector_Item static const char *widtype = NULL; -#define ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, ...) \ - ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \ - ELM_CHECK_WIDTYPE(WIDGET(it), widtype) __VA_ARGS__; - static Eina_Bool _move_scroller(void *data); static void _del_hook(Evas_Object * obj); static void _del_pre_hook(Evas_Object * obj); @@ -1075,7 +1072,7 @@ elm_diskselector_items_get(const Evas_Object *obj) return wd->items; } -EAPI Elm_Diskselector_Item * +EAPI Elm_Object_Item * elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) { Elm_Diskselector_Item *it; @@ -1113,31 +1110,32 @@ elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *i if (!wd->idler) wd->idler = ecore_idle_enterer_before_add(_move_scroller, obj); _sizing_eval(obj); - return it; + return (Elm_Object_Item *) it; } EAPI void -elm_diskselector_item_del(Elm_Diskselector_Item * it) +elm_diskselector_item_del(Elm_Object_Item * it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it); - Elm_Diskselector_Item *dit; - Elm_Diskselector_Item *item; + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + Elm_Diskselector_Item *item, *item2, *dit; Eina_List *l; int i = 0; - Widget_Data *wd = elm_widget_data_get(WIDGET(it)); + Widget_Data *wd; + item = (Elm_Diskselector_Item *) it; + wd = elm_widget_data_get(WIDGET(item)); if (!wd) return; - elm_box_unpack(wd->main_box, VIEW(it)); + elm_box_unpack(wd->main_box, VIEW(item)); if (wd->round) - wd->r_items = eina_list_remove(wd->r_items, it); + wd->r_items = eina_list_remove(wd->r_items, item); - wd->items = eina_list_remove(wd->items, it); + wd->items = eina_list_remove(wd->items, item); - if (wd->selected_item == it) + if (wd->selected_item == item) { dit = (Elm_Diskselector_Item *) eina_list_nth(wd->items, 0); - if (dit != it) + if (dit != item) wd->selected_item = dit; else wd->selected_item = eina_list_nth(wd->items, 1); @@ -1145,7 +1143,7 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it) _selected_item_indicate(wd->selected_item); } - _item_del(it); + _item_del(item); wd->item_count -= 1; if (wd->round) @@ -1157,11 +1155,11 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it) evas_object_hide(wd->VIEW(last)); evas_object_hide(wd->VIEW(s_last)); - EINA_LIST_FOREACH(wd->under_items, l, item) - evas_object_hide(VIEW(item)); + EINA_LIST_FOREACH(wd->under_items, l, item2) + evas_object_hide(VIEW(item2)); - EINA_LIST_FOREACH(wd->over_items, l, item) - evas_object_hide(VIEW(item)); + EINA_LIST_FOREACH(wd->over_items, l, item2) + evas_object_hide(VIEW(item2)); } else { @@ -1183,9 +1181,9 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it) for (i = 2; i < CEIL(wd->display_item_num); i++) { dit = eina_list_nth(wd->items, i); - item = eina_list_nth(wd->over_items, i - 2); - eina_stringshare_replace(&item->label, dit->label); - edje_object_part_text_set(VIEW(item), "elm.text", item->label); + item2 = eina_list_nth(wd->over_items, i - 2); + eina_stringshare_replace(&item2->label, dit->label); + edje_object_part_text_set(VIEW(item2), "elm.text", item2->label); } dit = eina_list_nth(wd->items, eina_list_count(wd->items) - 1); @@ -1206,9 +1204,10 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it) for (i = 3; i <= CEIL(wd->display_item_num); i++) { dit = eina_list_nth(wd->items, wd->item_count - i); - item = eina_list_nth(wd->under_items, i - 3); - eina_stringshare_replace(&item->label, dit->label); - edje_object_part_text_set(VIEW(item), "elm.text", item->label); + item2 = eina_list_nth(wd->under_items, i - 3); + eina_stringshare_replace(&item2->label, dit->label); + edje_object_part_text_set(VIEW(item2), "elm.text", + item2->label); } } } @@ -1217,216 +1216,210 @@ elm_diskselector_item_del(Elm_Diskselector_Item * it) } EAPI const char * -elm_diskselector_item_label_get(const Elm_Diskselector_Item * it) +elm_diskselector_item_label_get(const Elm_Object_Item * it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, NULL); - return it->label; + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); + return ((Elm_Diskselector_Item *) it)->label; } EAPI void -elm_diskselector_item_label_set(Elm_Diskselector_Item * it, const char *label) +elm_diskselector_item_label_set(Elm_Object_Item * it, const char *label) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it); - eina_stringshare_replace(&it->label, label); - edje_object_part_text_set(VIEW(it), "elm.text", it->label); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + Elm_Diskselector_Item *item = (Elm_Diskselector_Item *) it; + eina_stringshare_replace(&item->label, label); + edje_object_part_text_set(VIEW(item), "elm.text", item->label); } -EAPI Elm_Diskselector_Item * +EAPI Elm_Object_Item * elm_diskselector_selected_item_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return NULL; - return wd->selected_item; + return (Elm_Object_Item *) wd->selected_item; } EAPI void -elm_diskselector_item_selected_set(Elm_Diskselector_Item *it, Eina_Bool selected) +elm_diskselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); Widget_Data *wd; - wd = elm_widget_data_get(WIDGET(it)); + Elm_Diskselector_Item *item = (Elm_Diskselector_Item *) it; + wd = elm_widget_data_get(WIDGET(item)); if (!wd) return; - if ((wd->selected_item == it) && (selected)) + if ((wd->selected_item == item) && (selected)) return; - if ((wd->selected_item == it) && (!selected)) + if ((wd->selected_item == item) && (!selected)) wd->selected_item = eina_list_data_get(wd->items); else { - wd->selected_item = it; + wd->selected_item = item; _selected_item_indicate(wd->selected_item); } if (!wd->idler) - wd->idler = ecore_idle_enterer_before_add(_move_scroller, WIDGET(it)); + wd->idler = ecore_idle_enterer_before_add(_move_scroller, WIDGET(item)); } EAPI Eina_Bool -elm_diskselector_item_selected_get(const Elm_Diskselector_Item *it) +elm_diskselector_item_selected_get(const Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); - Widget_Data *wd; - - wd = elm_widget_data_get(WIDGET(it)); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); + Widget_Data *wd = elm_widget_data_get(WIDGET(it)); if (!wd) return EINA_FALSE; - return (wd->selected_item == it); + return (wd->selected_item == ((Elm_Diskselector_Item *) it)); } EAPI void -elm_diskselector_item_del_cb_set(Elm_Diskselector_Item *it, Evas_Smart_Cb func) +elm_diskselector_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); elm_widget_item_del_cb_set(it, func); } EAPI void * -elm_diskselector_item_data_get(const Elm_Diskselector_Item *it) +elm_diskselector_item_data_get(const Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, NULL); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); return elm_widget_item_data_get(it); } EAPI Evas_Object * -elm_diskselector_item_icon_get(const Elm_Diskselector_Item *it) +elm_diskselector_item_icon_get(const Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, NULL); - return it->icon; + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); + return ((Elm_Diskselector_Item *) it)->icon; } EAPI void -elm_diskselector_item_icon_set(Elm_Diskselector_Item *it, Evas_Object *icon) +elm_diskselector_item_icon_set(Elm_Object_Item *it, Evas_Object *icon) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it); - _item_icon_set(it, icon); - _check_identical_item(it, icon); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + _item_icon_set((Elm_Diskselector_Item *) it, icon); + _check_identical_item((Elm_Diskselector_Item *) it, icon); } -EAPI Elm_Diskselector_Item * -elm_diskselector_item_prev_get(const Elm_Diskselector_Item *it) +EAPI Elm_Object_Item * +elm_diskselector_item_prev_get(const Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, NULL); - if (it->node->prev) return it->node->prev->data; + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); + Elm_Diskselector_Item *item = (Elm_Diskselector_Item *) it; + if (item->node->prev) return item->node->prev->data; else return NULL; } -EAPI Elm_Diskselector_Item * -elm_diskselector_item_next_get(const Elm_Diskselector_Item *it) +EAPI Elm_Object_Item * +elm_diskselector_item_next_get(const Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, NULL); - if (it->node->next) return it->node->next->data; + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); + Elm_Diskselector_Item *item = (Elm_Diskselector_Item *) it; + if (item->node->next) return item->node->next->data; else return NULL; } -EAPI Elm_Diskselector_Item * +EAPI Elm_Object_Item * elm_diskselector_first_item_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; - Widget_Data *wd; - - wd = elm_widget_data_get(obj); - if (!wd || !wd->items) - return NULL; - + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd || !wd->items) return NULL; return eina_list_data_get(wd->items); } -EAPI Elm_Diskselector_Item * +EAPI Elm_Object_Item * elm_diskselector_last_item_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; - - Widget_Data *wd; - wd = elm_widget_data_get(obj); - if (!wd || !wd->items) - return NULL; - + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd || !wd->items) return NULL; return eina_list_data_get(eina_list_last(wd->items)); } EAPI void -elm_diskselector_item_tooltip_text_set(Elm_Diskselector_Item *item, const char *text) +elm_diskselector_item_tooltip_text_set(Elm_Object_Item *it, const char *text) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item); - elm_widget_item_tooltip_text_set(item, text); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + elm_widget_item_tooltip_text_set(it, text); } EAPI void -elm_diskselector_item_tooltip_content_cb_set(Elm_Diskselector_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) +elm_diskselector_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item); - elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + elm_widget_item_tooltip_content_cb_set(it, func, data, del_cb); } EAPI void -elm_diskselector_item_tooltip_unset(Elm_Diskselector_Item *item) +elm_diskselector_item_tooltip_unset(Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item); - elm_widget_item_tooltip_unset(item); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + elm_widget_item_tooltip_unset(it); } EAPI void -elm_diskselector_item_tooltip_style_set(Elm_Diskselector_Item *item, const char *style) +elm_diskselector_item_tooltip_style_set(Elm_Object_Item *it, const char *style) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item); - elm_widget_item_tooltip_style_set(item, style); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + elm_widget_item_tooltip_style_set(it, style); } EAPI const char * -elm_diskselector_item_tooltip_style_get(const Elm_Diskselector_Item *item) +elm_diskselector_item_tooltip_style_get(const Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item, NULL); - return elm_widget_item_tooltip_style_get(item); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); + return elm_widget_item_tooltip_style_get(it); } EAPI void -elm_diskselector_item_cursor_set(Elm_Diskselector_Item *item, const char *cursor) +elm_diskselector_item_cursor_set(Elm_Object_Item *it, const char *cursor) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item); - elm_widget_item_cursor_set(item, cursor); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + elm_widget_item_cursor_set(it, cursor); } EAPI const char * -elm_diskselector_item_cursor_get(const Elm_Diskselector_Item *item) +elm_diskselector_item_cursor_get(const Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item, NULL); - return elm_widget_item_cursor_get(item); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); + return elm_widget_item_cursor_get(it); } EAPI void -elm_diskselector_item_cursor_unset(Elm_Diskselector_Item *item) +elm_diskselector_item_cursor_unset(Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item); - elm_widget_item_cursor_unset(item); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + elm_widget_item_cursor_unset(it); } EAPI void -elm_diskselector_item_cursor_style_set(Elm_Diskselector_Item *item, const char *style) +elm_diskselector_item_cursor_style_set(Elm_Object_Item *it, const char *style) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item); - elm_widget_item_cursor_style_set(item, style); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + elm_widget_item_cursor_style_set(it, style); } EAPI const char * -elm_diskselector_item_cursor_style_get(const Elm_Diskselector_Item *item) +elm_diskselector_item_cursor_style_get(const Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item, NULL); - return elm_widget_item_cursor_style_get(item); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); + return elm_widget_item_cursor_style_get(it); } EAPI void -elm_diskselector_item_cursor_engine_only_set(Elm_Diskselector_Item *item, Eina_Bool engine_only) +elm_diskselector_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item); - elm_widget_item_cursor_engine_only_set(item, engine_only); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it); + elm_widget_item_cursor_engine_only_set(it, engine_only); } EAPI Eina_Bool -elm_diskselector_item_cursor_engine_only_get(const Elm_Diskselector_Item *item) +elm_diskselector_item_cursor_engine_only_get(const Elm_Object_Item *it) { - ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(item, EINA_FALSE); - return elm_widget_item_cursor_engine_only_get(item); + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); + return elm_widget_item_cursor_engine_only_get(it); } EAPI void diff --git a/src/lib/elm_diskselector.h b/src/lib/elm_diskselector.h index 62a7c97..77e7a48 100644 --- a/src/lib/elm_diskselector.h +++ b/src/lib/elm_diskselector.h @@ -28,8 +28,6 @@ * @{ */ -typedef struct _Elm_Diskselector_Item Elm_Diskselector_Item; /**< Item handle for a diskselector item. Created with elm_diskselector_item_append() and deleted with elm_diskselector_item_del(). */ - /** * Add a new diskselector widget to the given parent Elementary * (container) object. @@ -41,9 +39,7 @@ typedef struct _Elm_Diskselector_Item Elm_Diskselector_Item; /**< Item handle * * @ingroup Diskselector */ -EAPI Evas_Object * - elm_diskselector_add(Evas_Object *parent) -EINA_ARG_NONNULL(1); +EAPI Evas_Object *elm_diskselector_add(Evas_Object *parent) EINA_ARG_NONNULL(1); /** * Enable or disable round mode. @@ -169,7 +165,7 @@ EAPI void elm_diskselector_display_item_num_set(Evas_Object *o * * @ingroup Diskselector */ -EAPI int elm_diskselector_display_item_num_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EAPI int elm_diskselector_display_item_num_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Set bouncing behaviour when the scrolled content reaches an edge. @@ -255,7 +251,7 @@ EAPI void elm_diskselector_clear(Evas_Object *obj) EINA_ARG_NO * Get a list of all the diskselector items. * * @param obj The diskselector object. - * @return An @c Eina_List of diskselector items, #Elm_Diskselector_Item, + * @return An @c Eina_List of diskselector items, #Elm_Object_Item, * or @c NULL on failure. * * @see elm_diskselector_item_append() @@ -314,12 +310,13 @@ EAPI const Eina_List *elm_diskselector_items_get(const Evas_Object *obj) E * * @ingroup Diskselector */ -EAPI Elm_Diskselector_Item *elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); +EAPI Elm_Object_Item *elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); + /** * Delete them item from the diskselector. * - * @param item The item of diskselector to be deleted. + * @param it The item of diskselector to be deleted. * * If deleting all diskselector items is required, elm_diskselector_clear() * should be used instead of getting items list and deleting each one. @@ -330,12 +327,12 @@ EAPI Elm_Diskselector_Item *elm_diskselector_item_append(Evas_Object *obj, const * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_del(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_del(Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Set the function called when a diskselector item is freed. * - * @param item The item to set the callback on + * @param it The item to set the callback on * @param func The function called * * If there is a @p func, then it will be called prior item's memory release. @@ -349,12 +346,12 @@ EAPI void elm_diskselector_item_del(Elm_Diskselector_Item *ite * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_del_cb_set(Elm_Diskselector_Item *item, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) EINA_ARG_NONNULL(1); /** * Get the data associated to the item. * - * @param item The diskselector item + * @param it The diskselector item * @return The data associated to @p it * * The return value is a pointer to data associated to @p item when it was @@ -365,12 +362,12 @@ EAPI void elm_diskselector_item_del_cb_set(Elm_Diskselector_It * * @ingroup Diskselector */ -EAPI void *elm_diskselector_item_data_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI void *elm_diskselector_item_data_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Set the icon associated to the item. * - * @param item The diskselector item + * @param it The diskselector item * @param icon The icon object to associate with @p it * * The icon object to use at left side of the item. An @@ -390,7 +387,7 @@ EAPI void *elm_diskselector_item_data_get(const Elm_Diskselecto * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_icon_set(Elm_Diskselector_Item *item, Evas_Object *icon) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_icon_set(Elm_Object_Item *it, Evas_Object *icon) EINA_ARG_NONNULL(1); /** * Get the icon associated to the item. @@ -408,12 +405,12 @@ EAPI void elm_diskselector_item_icon_set(Elm_Diskselector_Item * * @ingroup Diskselector */ -EAPI Evas_Object *elm_diskselector_item_icon_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI Evas_Object *elm_diskselector_item_icon_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Set the label of item. * - * @param item The item of diskselector. + * @param it The item of diskselector. * @param label The label of item. * * The label to be displayed by the item. @@ -443,12 +440,12 @@ EAPI Evas_Object *elm_diskselector_item_icon_get(const Elm_Diskselecto * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_label_set(Elm_Diskselector_Item *item, const char *label) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_label_set(Elm_Object_Item *it, const char *label) EINA_ARG_NONNULL(1); /** * Get the label of item. * - * @param item The item of diskselector. + * @param it The item of diskselector. * @return The label of item. * * The return value is a pointer to the label associated to @p item when it was @@ -461,7 +458,7 @@ EAPI void elm_diskselector_item_label_set(Elm_Diskselector_Ite * * @ingroup Diskselector */ -EAPI const char *elm_diskselector_item_label_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI const char *elm_diskselector_item_label_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Get the selected item. @@ -480,12 +477,12 @@ EAPI const char *elm_diskselector_item_label_get(const Elm_Diskselect * * @ingroup Diskselector */ -EAPI Elm_Diskselector_Item *elm_diskselector_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EAPI Elm_Object_Item *elm_diskselector_selected_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Set the selected state of an item. * - * @param item The diskselector item + * @param it The diskselector item * @param selected The selected state * * This sets the selected state of the given item @p it. @@ -508,12 +505,12 @@ EAPI Elm_Diskselector_Item *elm_diskselector_selected_item_get(const Evas_Object * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_selected_set(Elm_Diskselector_Item *item, Eina_Bool selected) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) EINA_ARG_NONNULL(1); /* * Get whether the @p item is selected or not. * - * @param item The diskselector item. + * @param it The diskselector item. * @return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates * it's not. If @p obj is @c NULL, @c EINA_FALSE is returned. * @@ -522,7 +519,7 @@ EAPI void elm_diskselector_item_selected_set(Elm_Diskselector_ * * @ingroup Diskselector */ -EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Get the first item of the diskselector. @@ -538,7 +535,7 @@ EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Disksel * * @ingroup Diskselector */ -EAPI Elm_Diskselector_Item *elm_diskselector_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EAPI Elm_Object_Item *elm_diskselector_first_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Get the last item of the diskselector. @@ -554,12 +551,12 @@ EAPI Elm_Diskselector_Item *elm_diskselector_first_item_get(const Evas_Object *o * * @ingroup Diskselector */ -EAPI Elm_Diskselector_Item *elm_diskselector_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); +EAPI Elm_Object_Item *elm_diskselector_last_item_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Get the item before @p item in diskselector. * - * @param item The diskselector item. + * @param it The diskselector item. * @return The item before @p item, or @c NULL if none or on failure. * * The list of items follows append order. So it will return item appended @@ -573,12 +570,12 @@ EAPI Elm_Diskselector_Item *elm_diskselector_last_item_get(const Evas_Object *ob * * @ingroup Diskselector */ -EAPI Elm_Diskselector_Item *elm_diskselector_item_prev_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI Elm_Object_Item *elm_diskselector_item_prev_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Get the item after @p item in diskselector. * - * @param item The diskselector item. + * @param it The diskselector item. * @return The item after @p item, or @c NULL if none or on failure. * * The list of items follows append order. So it will return item appended @@ -592,12 +589,12 @@ EAPI Elm_Diskselector_Item *elm_diskselector_item_prev_get(const Elm_Diskselecto * * @ingroup Diskselector */ -EAPI Elm_Diskselector_Item *elm_diskselector_item_next_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI Elm_Object_Item *elm_diskselector_item_next_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Set the text to be shown in the diskselector item. * - * @param item Target item + * @param it Target item * @param text The text to set in the content * * Setup the text as tooltip to object. The item can have only one tooltip, @@ -607,7 +604,7 @@ EAPI Elm_Diskselector_Item *elm_diskselector_item_next_get(const Elm_Diskselecto * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_tooltip_text_set(Elm_Diskselector_Item *item, const char *text) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_tooltip_text_set(Elm_Object_Item *it, const char *text) EINA_ARG_NONNULL(1); /** * Set the content to be shown in the tooltip item. @@ -618,7 +615,7 @@ EAPI void elm_diskselector_item_tooltip_text_set(Elm_Diskselec * return a valid Evas_Object. This object is then managed fully by * tooltip system and is deleted when the tooltip is gone. * - * @param item the diskselector item being attached a tooltip. + * @param it the diskselector item being attached a tooltip. * @param func the function used to create the tooltip contents. * @param data what to provide to @a func as callback data/context. * @param del_cb called when data is not needed anymore, either when @@ -631,12 +628,12 @@ EAPI void elm_diskselector_item_tooltip_text_set(Elm_Diskselec * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_tooltip_content_cb_set(Elm_Diskselector_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) EINA_ARG_NONNULL(1); /** * Unset tooltip from item. * - * @param item diskselector item to remove previously set tooltip. + * @param it diskselector item to remove previously set tooltip. * * Remove tooltip from item. The callback provided as del_cb to * elm_diskselector_item_tooltip_content_cb_set() will be called to notify @@ -647,7 +644,7 @@ EAPI void elm_diskselector_item_tooltip_content_cb_set(Elm_Dis * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_tooltip_unset(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_tooltip_unset(Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Sets a different style for this item tooltip. @@ -656,19 +653,19 @@ EAPI void elm_diskselector_item_tooltip_unset(Elm_Diskselector * elm_diskselector_item_tooltip_content_cb_set() or * elm_diskselector_item_tooltip_text_set() * - * @param item diskselector item with tooltip already set. + * @param it diskselector item with tooltip already set. * @param style the theme style to use (default, transparent, ...) * * @see elm_object_tooltip_style_set() for more details. * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_tooltip_style_set(Elm_Diskselector_Item *item, const char *style) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_tooltip_style_set(Elm_Object_Item *it, const char *style) EINA_ARG_NONNULL(1); /** * Get the style for this item tooltip. * - * @param item diskselector item with tooltip already set. + * @param it diskselector item with tooltip already set. * @return style the theme style in use, defaults to "default". If the * object does not have a tooltip set, then NULL is returned. * @@ -677,24 +674,24 @@ EAPI void elm_diskselector_item_tooltip_style_set(Elm_Disksele * * @ingroup Diskselector */ -EAPI const char *elm_diskselector_item_tooltip_style_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI const char *elm_diskselector_item_tooltip_style_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Set the cursor to be shown when mouse is over the diskselector item * - * @param item Target item + * @param it Target item * @param cursor the cursor name to be used. * * @see elm_object_cursor_set() for more details. * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_cursor_set(Elm_Diskselector_Item *item, const char *cursor) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_cursor_set(Elm_Object_Item *it, const char *cursor) EINA_ARG_NONNULL(1); /** * Get the cursor to be shown when mouse is over the diskselector item * - * @param item diskselector item with cursor already set. + * @param it diskselector item with cursor already set. * @return the cursor name. * * @see elm_object_cursor_get() for more details. @@ -702,19 +699,19 @@ EAPI void elm_diskselector_item_cursor_set(Elm_Diskselector_It * * @ingroup Diskselector */ -EAPI const char *elm_diskselector_item_cursor_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI const char *elm_diskselector_item_cursor_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Unset the cursor to be shown when mouse is over the diskselector item * - * @param item Target item + * @param it Target item * * @see elm_object_cursor_unset() for more details. * @see elm_diskselector_cursor_set() * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_cursor_unset(Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_cursor_unset(Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * Sets a different style for this item cursor. @@ -722,19 +719,19 @@ EAPI void elm_diskselector_item_cursor_unset(Elm_Diskselector_ * @note before you set a style you should define a cursor with * elm_diskselector_item_cursor_set() * - * @param item diskselector item with cursor already set. + * @param it diskselector item with cursor already set. * @param style the theme style to use (default, transparent, ...) * * @see elm_object_cursor_style_set() for more details. * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_cursor_style_set(Elm_Diskselector_Item *item, const char *style) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_cursor_style_set(Elm_Object_Item *it, const char *style) EINA_ARG_NONNULL(1); /** * Get the style for this item cursor. * - * @param item diskselector item with cursor already set. + * @param it diskselector item with cursor already set. * @return style the theme style in use, defaults to "default". If the * object does not have a cursor set, then @c NULL is returned. * @@ -743,7 +740,8 @@ EAPI void elm_diskselector_item_cursor_style_set(Elm_Diskselec * * @ingroup Diskselector */ -EAPI const char *elm_diskselector_item_cursor_style_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI const char *elm_diskselector_item_cursor_style_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); + /** * Set if the cursor set should be searched on the theme or should use @@ -753,7 +751,7 @@ EAPI const char *elm_diskselector_item_cursor_style_get(const Elm_Dis * with elm_diskselector_item_cursor_set(). * By default it will only look for cursors provided by the engine. * - * @param item widget item with cursor already set. + * @param it widget item with cursor already set. * @param engine_only boolean to define if cursors set with * elm_diskselector_item_cursor_set() should be searched only * between cursors provided by the engine or searched on widget's @@ -763,12 +761,12 @@ EAPI const char *elm_diskselector_item_cursor_style_get(const Elm_Dis * * @ingroup Diskselector */ -EAPI void elm_diskselector_item_cursor_engine_only_set(Elm_Diskselector_Item *item, Eina_Bool engine_only) EINA_ARG_NONNULL(1); +EAPI void elm_diskselector_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only) EINA_ARG_NONNULL(1); /** * Get the cursor engine only usage for this item cursor. * - * @param item widget item with cursor already set. + * @param it widget item with cursor already set. * @return engine_only boolean to define it cursors should be looked only * between the provided by the engine or searched on widget's theme as well. * If the item does not have a cursor set, then @c EINA_FALSE is returned. @@ -778,8 +776,9 @@ EAPI void elm_diskselector_item_cursor_engine_only_set(Elm_Dis * * @ingroup Diskselector */ -EAPI Eina_Bool elm_diskselector_item_cursor_engine_only_get(const Elm_Diskselector_Item *item) EINA_ARG_NONNULL(1); +EAPI Eina_Bool elm_diskselector_item_cursor_engine_only_get(const Elm_Object_Item *it) EINA_ARG_NONNULL(1); /** * @} */ + -- 2.7.4