1 #include <Elementary.h>
5 typedef struct _Widget_Data Widget_Data;
10 Evas_Object *event[2];
11 Evas_Object *bx[2]; // 2 - for now all that's supported
12 Eina_List *items; // 1 list. yes N levels, but only 2 for now and # of items will be small
16 Eina_Bool level_active[2];
17 Eina_Bool horizontal : 1;
22 struct _Elm_Index_Item
27 Eina_Bool selected : 1;
30 static const char *widtype = NULL;
31 static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
32 static void _theme_hook(Evas_Object *obj);
33 static void _sizing_eval(Evas_Object *obj);
34 static void _index_box_auto_fill(Evas_Object *obj, Evas_Object *box, int level);
35 static void _index_box_clear(Evas_Object *obj, Evas_Object *box, int level);
36 static void _item_free(Elm_Index_Item *it);
38 static const char SIG_CHANGED[] = "changed";
39 static const char SIG_DELAY_CHANGED[] = "delay,changed";
40 static const char SIG_SELECTED[] = "selected";
41 static const char SIG_LEVEL_UP[] = "level,up";
42 static const char SIG_LEVEL_DOWN[] = "level,down";
44 static const Evas_Smart_Cb_Description _signals[] = {
46 {SIG_DELAY_CHANGED, ""},
54 _del_pre_hook(Evas_Object *obj)
56 Widget_Data *wd = elm_widget_data_get(obj);
58 _index_box_clear(obj, wd->bx[wd->level], wd->level);
59 _index_box_clear(obj, wd->bx[0], 0);
60 while (wd->items) _item_free(wd->items->data);
61 if (wd->delay) ecore_timer_del(wd->delay);
65 _del_hook(Evas_Object *obj)
67 Widget_Data *wd = elm_widget_data_get(obj);
72 _layout(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
74 Widget_Data *wd = data;
76 _els_box_layout(o, priv, wd->horizontal, 1, 0);
80 _signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
82 Widget_Data *wd = elm_widget_data_get(obj);
84 edje_object_signal_emit(wd->base, emission, source);
88 _signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
90 Widget_Data *wd = elm_widget_data_get(obj);
92 edje_object_signal_callback_add(wd->base, emission, source, func_cb, data);
96 _signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func_cb, void *data)
98 Widget_Data *wd = elm_widget_data_get(obj);
99 edje_object_signal_callback_del_full(wd->base, emission, source, func_cb,
104 _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
106 Widget_Data *wd = elm_widget_data_get(obj);
109 edje_object_mirrored_set(wd->base, rtl);
113 _theme_hook(Evas_Object *obj)
115 Evas_Coord minw = 0, minh = 0;
116 Widget_Data *wd = elm_widget_data_get(obj);
118 _elm_widget_mirrored_reload(obj);
120 _index_box_clear(obj, wd->bx[0], 0);
121 _index_box_clear(obj, wd->bx[1], 1);
123 _elm_theme_object_set(obj, wd->base, "index", "base/horizontal", elm_widget_style_get(obj));
126 _elm_theme_object_set(obj, wd->base, "index", "base/vertical", elm_widget_style_get(obj));
127 _mirrored_set(obj, elm_widget_mirrored_get(obj));
129 edje_object_part_swallow(wd->base, "elm.swallow.event.0", wd->event[0]);
130 elm_coords_finger_size_adjust(1, &minw, 1, &minh);
131 evas_object_size_hint_min_set(wd->event[0], minw, minh);
132 edje_object_part_swallow(wd->base, "elm.swallow.index.0", wd->bx[0]);
133 if (edje_object_part_exists(wd->base, "elm.swallow.index.1"))
137 wd->bx[1] = evas_object_box_add(evas_object_evas_get(wd->base));
138 evas_object_box_layout_set(wd->bx[1], _layout, wd, NULL);
139 elm_widget_sub_object_add(obj, wd->bx[1]);
141 edje_object_part_swallow(wd->base, "elm.swallow.index.1", wd->bx[1]);
142 evas_object_show(wd->bx[1]);
146 evas_object_del(wd->bx[1]);
149 if (edje_object_part_exists(wd->base, "elm.swallow.event.1"))
153 wd->event[1] = evas_object_rectangle_add(evas_object_evas_get(wd->base));
154 evas_object_color_set(wd->event[1], 0, 0, 0, 0);
155 elm_widget_sub_object_add(obj, wd->event[1]);
157 edje_object_part_swallow(wd->base, "elm.swallow.event.1", wd->event[1]);
158 evas_object_size_hint_min_set(wd->event[1], minw, minh);
160 else if (wd->event[1])
162 evas_object_del(wd->event[1]);
165 edje_object_message_signal_process(wd->base);
166 edje_object_scale_set(wd->base, elm_widget_scale_get(obj) * _elm_config->scale);
168 _index_box_auto_fill(obj, wd->bx[0], 0);
171 _index_box_auto_fill(obj, wd->bx[1], 1);
175 _sizing_eval(Evas_Object *obj)
177 Widget_Data *wd = elm_widget_data_get(obj);
178 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
180 edje_object_size_min_calc(wd->base, &minw, &minh);
181 evas_object_size_hint_min_set(obj, minw, minh);
182 evas_object_size_hint_max_set(obj, maxw, maxh);
185 static Elm_Index_Item *
186 _item_new(Evas_Object *obj, const char *letter, const void *item)
188 Widget_Data *wd = elm_widget_data_get(obj);
190 if (!wd) return NULL;
191 it = elm_widget_item_new(obj, Elm_Index_Item);
192 if (!it) return NULL;
193 it->letter = eina_stringshare_add(letter);
194 it->base.data = item;
195 it->level = wd->level;
199 static Elm_Index_Item *
200 _item_find(Evas_Object *obj, const void *item)
202 Widget_Data *wd = elm_widget_data_get(obj);
205 if (!wd) return NULL;
206 EINA_LIST_FOREACH(wd->items, l, it)
207 if (it->base.data == item) return it;
212 _item_free(Elm_Index_Item *it)
214 Widget_Data *wd = elm_widget_data_get(WIDGET(it));
216 wd->items = eina_list_remove(wd->items, it);
217 elm_widget_item_pre_notify_del(it);
218 eina_stringshare_del(it->letter);
219 elm_widget_item_del(it);
222 // FIXME: always have index filled
224 _index_box_auto_fill(Evas_Object *obj, Evas_Object *box, int level)
226 Widget_Data *wd = elm_widget_data_get(obj);
230 Evas_Coord mw, mh, w, h;
233 if (wd->level_active[level]) return;
234 rtl = elm_widget_mirrored_get(obj);
235 evas_object_geometry_get(box, NULL, NULL, &w, &h);
236 EINA_LIST_FOREACH(wd->items, l, it)
239 const char *stacking;
241 if (it->level != level) continue;
242 o = edje_object_add(evas_object_evas_get(obj));
244 edje_object_mirrored_set(VIEW(it), rtl);
246 _elm_theme_object_set(obj, o, "index", "item_odd/vertical", elm_widget_style_get(obj));
248 _elm_theme_object_set(obj, o, "index", "item/vertical", elm_widget_style_get(obj));
249 edje_object_part_text_set(o, "elm.text", it->letter);
250 edje_object_size_min_restricted_calc(o, &mw, &mh, 0, 0);
251 evas_object_size_hint_min_set(o, mw, mh);
252 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
253 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
254 elm_widget_sub_object_add(obj, o);
255 evas_object_box_append(box, o);
256 stacking = edje_object_data_get(o, "stacking");
259 if (!strcmp(stacking, "below")) evas_object_lower(o);
260 else if (!strcmp(stacking, "above")) evas_object_raise(o);
264 evas_object_smart_calculate(box); // force a calc so we know the size
265 evas_object_size_hint_min_get(box, &mw, &mh);
268 _index_box_clear(obj, box, level);
271 // FIXME: only i objects fit! try again. overflows right now
275 evas_object_smart_calculate(box);
276 wd->level_active[level] = 1;
280 _index_box_clear(Evas_Object *obj, Evas_Object *box __UNUSED__, int level)
282 Widget_Data *wd = elm_widget_data_get(obj);
286 if (!wd->level_active[level]) return;
287 EINA_LIST_FOREACH(wd->items, l, it)
289 if (!VIEW(it)) continue;
290 if (it->level != level) continue;
291 evas_object_del(VIEW(it));
294 wd->level_active[level] = 0;
298 _delay_change(void *data)
300 Widget_Data *wd = elm_widget_data_get(data);
302 if (!wd) return ECORE_CALLBACK_CANCEL;
304 d = (void *)elm_index_item_selected_get(data, wd->level);
305 if (d) evas_object_smart_callback_call(data, SIG_DELAY_CHANGED, d);
306 return ECORE_CALLBACK_CANCEL;
310 _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
312 Widget_Data *wd = elm_widget_data_get(obj);
313 Elm_Index_Item *it, *it_closest, *it_last;
315 Evas_Coord x, y, w, h, bx, by, bw, bh, xx, yy;
318 char *label = NULL, *last = NULL;
321 for (i = 0; i <= wd->level; i++)
326 evas_object_geometry_get(wd->bx[i], &bx, &by, &bw, &bh);
327 EINA_LIST_FOREACH(wd->items, l, it)
329 if (!((it->level == i) && (VIEW(it)))) continue;
330 if ((VIEW(it)) && (it->level != wd->level))
344 evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
349 x = (x * x) + (y * y);
350 if ((x < dist) || (!it_closest))
353 cdv = (double)(xx - bx) / (double)bw;
355 cdv = (double)(yy - by) / (double)bh;
360 if ((!i) && (!wd->level))
361 edje_object_part_drag_value_set(wd->base, "elm.dragable.index.1",
363 if (it_closest) it_closest->selected = 1;
364 if (it_closest != it_last)
368 const char *stacking, *selectraise;
371 edje_object_signal_emit(VIEW(it), "elm,state,inactive", "elm");
372 stacking = edje_object_data_get(VIEW(it), "stacking");
373 selectraise = edje_object_data_get(VIEW(it), "selectraise");
374 if ((selectraise) && (!strcmp(selectraise, "on")))
376 if ((stacking) && (!strcmp(stacking, "below")))
377 evas_object_lower(VIEW(it));
382 const char *selectraise;
385 edje_object_signal_emit(VIEW(it), "elm,state,active", "elm");
386 selectraise = edje_object_data_get(VIEW(it), "selectraise");
387 if ((selectraise) && (!strcmp(selectraise, "on")))
388 evas_object_raise(VIEW(it));
389 evas_object_smart_callback_call((void *)obj, SIG_CHANGED, (void *)it->base.data);
390 if (wd->delay) ecore_timer_del(wd->delay);
391 wd->delay = ecore_timer_add(0.2, _delay_change, obj);
398 last = strdup(it->letter);
401 if (!label) label = strdup(last);
404 /* FIXME: realloc return NULL if the request fails */
405 label = realloc(label, strlen(label) + strlen(last) + 1);
409 last = strdup(it->letter);
413 if (!label) label = strdup("");
414 if (!last) last = strdup("");
415 edje_object_part_text_set(wd->base, "elm.text.body", label);
416 edje_object_part_text_set(wd->base, "elm.text", last);
422 _wheel(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
424 Widget_Data *wd = elm_widget_data_get(data);
425 // Evas_Event_Mouse_Wheel *ev = event_info;
426 // Evas_Object *obj = o;
431 _mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info)
433 Widget_Data *wd = elm_widget_data_get(data);
434 Evas_Event_Mouse_Down *ev = event_info;
437 if (ev->button != 1) return;
439 evas_object_geometry_get(wd->base, &x, &y, &w, NULL);
440 wd->dx = ev->canvas.x - x;
441 wd->dy = ev->canvas.y - y;
442 elm_index_active_set(data, 1);
443 _sel_eval(data, ev->canvas.x, ev->canvas.y);
444 edje_object_part_drag_value_set(wd->base, "elm.dragable.pointer",
445 (!edje_object_mirrored_get(wd->base)) ? wd->dx : (wd->dx - w), wd->dy);
447 edje_object_signal_emit(wd->base, "elm,indicator,state,active", "elm");
451 _mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info)
453 Widget_Data *wd = elm_widget_data_get(data);
454 Evas_Event_Mouse_Up *ev = event_info;
457 if (ev->button != 1) return;
459 d = (void *)elm_index_item_selected_get(data, wd->level);
460 if (d) evas_object_smart_callback_call(data, SIG_SELECTED, d);
461 elm_index_active_set(data, 0);
462 edje_object_signal_emit(wd->base, "elm,state,level,0", "elm");
463 edje_object_signal_emit(wd->base, "elm,indicator,state,inactive", "elm");
467 _mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info)
469 Widget_Data *wd = elm_widget_data_get(data);
470 Evas_Event_Mouse_Move *ev = event_info;
471 Evas_Coord minw = 0, minh = 0, x, y, dx, adx, w;
474 if (!wd->down) return;
475 elm_coords_finger_size_adjust(1, &minw, 1, &minh);
476 evas_object_geometry_get(wd->base, &x, &y, &w, NULL);
477 x = ev->cur.canvas.x - x;
478 y = ev->cur.canvas.y - y;
481 if (adx < 0) adx = -dx;
482 edje_object_part_drag_value_set(wd->base, "elm.dragable.pointer"
483 , (!edje_object_mirrored_get(wd->base)) ? x : (x - w), y);
491 snprintf(buf, sizeof(buf), "elm,state,level,%i", wd->level);
492 edje_object_signal_emit(wd->base, buf, "elm");
493 evas_object_smart_callback_call(data, SIG_LEVEL_UP, NULL);
501 snprintf(buf, sizeof(buf), "elm,state,level,%i", wd->level);
502 edje_object_signal_emit(wd->base, buf, "elm");
503 evas_object_smart_callback_call(data, SIG_LEVEL_DOWN, NULL);
507 _sel_eval(data, ev->cur.canvas.x, ev->cur.canvas.y);
511 elm_index_add(Evas_Object *parent)
517 Evas_Coord minw, minh;
519 ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
521 ELM_SET_WIDTYPE(widtype, "index");
522 elm_widget_type_set(obj, "index");
523 elm_widget_sub_object_add(parent, obj);
524 elm_widget_data_set(obj, wd);
525 elm_widget_del_hook_set(obj, _del_hook);
526 elm_widget_del_pre_hook_set(obj, _del_pre_hook);
527 elm_widget_theme_hook_set(obj, _theme_hook);
528 elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
529 elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
530 elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
531 elm_widget_can_focus_set(obj, EINA_FALSE);
533 wd->horizontal = EINA_FALSE;
535 wd->base = edje_object_add(e);
536 _elm_theme_object_set(obj, wd->base, "index", "base/vertical", "default");
537 elm_widget_resize_object_set(obj, wd->base);
539 o = evas_object_rectangle_add(e);
541 evas_object_color_set(o, 0, 0, 0, 0);
543 elm_coords_finger_size_adjust(1, &minw, 1, &minh);
544 evas_object_size_hint_min_set(o, minw, minh);
545 edje_object_part_swallow(wd->base, "elm.swallow.event.0", o);
546 elm_widget_sub_object_add(obj, o);
547 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_WHEEL, _wheel, obj);
548 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, obj);
549 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP, _mouse_up, obj);
550 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move, obj);
552 if (edje_object_part_exists(wd->base, "elm.swallow.event.1"))
554 o = evas_object_rectangle_add(e);
556 evas_object_color_set(o, 0, 0, 0, 0);
557 evas_object_size_hint_min_set(o, minw, minh);
558 edje_object_part_swallow(wd->base, "elm.swallow.event.1", o);
559 elm_widget_sub_object_add(obj, o);
562 wd->bx[0] = evas_object_box_add(e);
563 evas_object_box_layout_set(wd->bx[0], _layout, wd, NULL);
564 elm_widget_sub_object_add(obj, wd->bx[0]);
565 edje_object_part_swallow(wd->base, "elm.swallow.index.0", wd->bx[0]);
566 evas_object_show(wd->bx[0]);
568 if (edje_object_part_exists(wd->base, "elm.swallow.index.1"))
570 wd->bx[1] = evas_object_box_add(e);
571 evas_object_box_layout_set(wd->bx[1], _layout, wd, NULL);
572 elm_widget_sub_object_add(obj, wd->bx[1]);
573 edje_object_part_swallow(wd->base, "elm.swallow.index.1", wd->bx[1]);
574 evas_object_show(wd->bx[1]);
577 evas_object_smart_callbacks_descriptions_set(obj, _signals);
579 _mirrored_set(obj, elm_widget_mirrored_get(obj));
585 elm_index_active_set(Evas_Object *obj, Eina_Bool active)
587 ELM_CHECK_WIDTYPE(obj, widtype);
588 Widget_Data *wd = elm_widget_data_get(obj);
590 if (wd->active == active) return;
595 _index_box_clear(obj, wd->bx[1], 1);
596 _index_box_auto_fill(obj, wd->bx[0], 0);
597 edje_object_signal_emit(wd->base, "elm,state,active", "elm");
600 edje_object_signal_emit(wd->base, "elm,state,inactive", "elm");
604 elm_index_active_get(const Evas_Object *obj)
606 ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
607 Widget_Data *wd = elm_widget_data_get(obj);
608 if (!wd) return EINA_FALSE;
613 elm_index_item_level_set(Evas_Object *obj, int level)
615 ELM_CHECK_WIDTYPE(obj, widtype);
616 Widget_Data *wd = elm_widget_data_get(obj);
618 if (wd->level == level) return;
623 elm_index_item_level_get(const Evas_Object *obj)
625 ELM_CHECK_WIDTYPE(obj, widtype) 0;
626 Widget_Data *wd = elm_widget_data_get(obj);
632 elm_index_item_selected_get(const Evas_Object *obj, int level)
634 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
635 Widget_Data *wd = elm_widget_data_get(obj);
638 if (!wd) return NULL;
639 EINA_LIST_FOREACH(wd->items, l, it)
640 if ((it->selected) && (it->level == level))
641 return elm_widget_item_data_get(it);
646 elm_index_item_append(Evas_Object *obj, const char *letter, const void *item)
648 ELM_CHECK_WIDTYPE(obj, widtype);
649 Widget_Data *wd = elm_widget_data_get(obj);
652 it = _item_new(obj, letter, item);
654 wd->items = eina_list_append(wd->items, it);
655 _index_box_clear(obj, wd->bx[wd->level], wd->level);
659 elm_index_item_prepend(Evas_Object *obj, const char *letter, const void *item)
661 ELM_CHECK_WIDTYPE(obj, widtype);
662 Widget_Data *wd = elm_widget_data_get(obj);
666 it = _item_new(obj, letter, item);
668 wd->items = eina_list_prepend(wd->items, it);
669 _index_box_clear(obj, wd->bx[wd->level], wd->level);
673 elm_index_item_append_relative(Evas_Object *obj, const char *letter, const void *item, const void *relative)
675 ELM_CHECK_WIDTYPE(obj, widtype);
676 Widget_Data *wd = elm_widget_data_get(obj);
677 Elm_Index_Item *it, *it_rel;
681 elm_index_item_append(obj, letter, item);
684 it_rel = _item_find(obj, relative);
687 elm_index_item_append(obj, letter, item);
690 it = _item_new(obj, letter, item);
692 wd->items = eina_list_append_relative(wd->items, it, it_rel);
693 _index_box_clear(obj, wd->bx[wd->level], wd->level);
697 elm_index_item_prepend_relative(Evas_Object *obj, const char *letter, const void *item, const void *relative)
699 ELM_CHECK_WIDTYPE(obj, widtype);
700 Widget_Data *wd = elm_widget_data_get(obj);
701 Elm_Index_Item *it, *it_rel;
705 elm_index_item_prepend(obj, letter, item);
708 it_rel = _item_find(obj, relative);
711 elm_index_item_append(obj, letter, item);
714 it = _item_new(obj, letter, item);
716 wd->items = eina_list_prepend_relative(wd->items, it, it_rel);
717 _index_box_clear(obj, wd->bx[wd->level], wd->level);
721 elm_index_item_sorted_insert(Evas_Object *obj, const char *letter, const void *item, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func)
723 ELM_CHECK_WIDTYPE(obj, widtype);
724 Widget_Data *wd = elm_widget_data_get(obj);
732 elm_index_item_append(obj, letter, item);
736 it = _item_new(obj, letter, item);
739 lnear = eina_list_search_sorted_near_list(wd->items, cmp_func, it, &cmp);
741 wd->items = eina_list_append_relative_list(wd->items, it, lnear);
743 wd->items = eina_list_prepend_relative_list(wd->items, it, lnear);
746 /* If cmp_data_func is not provided, append a duplicated item */
748 wd->items = eina_list_append_relative_list(wd->items, it, lnear);
751 Elm_Index_Item *p_it = eina_list_data_get(lnear);
752 if (cmp_data_func(p_it->base.data, it->base.data) >= 0)
753 p_it->base.data = it->base.data;
758 _index_box_clear(obj, wd->bx[wd->level], wd->level);
762 elm_index_item_del(Evas_Object *obj, const void *item)
764 ELM_CHECK_WIDTYPE(obj, widtype);
765 Widget_Data *wd = elm_widget_data_get(obj);
768 it = _item_find(obj, item);
771 _index_box_clear(obj, wd->bx[wd->level], wd->level);
774 EAPI Elm_Index_Item *
775 elm_index_item_find(Evas_Object *obj, const void *item)
777 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
778 Widget_Data *wd = elm_widget_data_get(obj);
779 if (!wd) return NULL;
780 return _item_find(obj, item);
784 elm_index_item_clear(Evas_Object *obj)
786 ELM_CHECK_WIDTYPE(obj, widtype);
787 Widget_Data *wd = elm_widget_data_get(obj);
789 Eina_List *l, *clear = NULL;
791 _index_box_clear(obj, wd->bx[wd->level], wd->level);
792 EINA_LIST_FOREACH(wd->items, l, it)
794 if (it->level != wd->level) continue;
795 clear = eina_list_append(clear, it);
797 EINA_LIST_FREE(clear, it) _item_free(it);
801 elm_index_item_go(Evas_Object *obj, int level __UNUSED__)
803 ELM_CHECK_WIDTYPE(obj, widtype);
804 Widget_Data *wd = elm_widget_data_get(obj);
806 _index_box_auto_fill(obj, wd->bx[0], 0);
807 if (wd->level == 1) _index_box_auto_fill(obj, wd->bx[1], 1);
811 elm_index_item_data_get(const Elm_Index_Item *it)
813 ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);
814 return elm_widget_item_data_get(it);
818 elm_index_item_data_set(Elm_Index_Item *it, const void *data)
820 ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
821 elm_widget_item_data_set(it, data);
825 elm_index_item_del_cb_set(Elm_Index_Item *it, Evas_Smart_Cb func)
827 ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it);
828 elm_widget_item_del_cb_set(it, func);
832 elm_index_item_letter_get(const Elm_Index_Item *it)
834 ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, NULL);