static void
_item_text_set_hook(Elm_Object_Item *it, const char *part, const char *label)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Widget_Data *wd;
Elm_Segment_Item *item;
if (part && strcmp(part, "default")) return;
- item = (Elm_Segment_Item *) it;
+ item = (Elm_Segment_Item *)it;
wd = elm_widget_item_data_get(item);
if (!wd) return;
static const char *
_item_text_get_hook(const Elm_Object_Item *it, const char *part)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
if (part && strcmp(part, "default")) return NULL;
- return ((Elm_Segment_Item *) it)->label;
+ return ((Elm_Segment_Item *)it)->label;
}
static void
const char *part,
Evas_Object *content)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Elm_Segment_Item *item;
if (part && strcmp(part, "icon")) return;
- item = (Elm_Segment_Item *) it;
+ item = (Elm_Segment_Item *)it;
//Remove the existing icon
if (item->icon)
static Evas_Object *
_item_content_get_hook(const Elm_Object_Item *it, const char *part)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
if (part && strcmp(part, "icon")) return NULL;
- return ((Elm_Segment_Item *) it)->icon;
+ return ((Elm_Segment_Item *)it)->icon;
}
static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *it)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
Widget_Data *wd;
- Elm_Segment_Item *item = (Elm_Segment_Item *) it;
+ Elm_Segment_Item *item = (Elm_Segment_Item *)it;
wd = elm_widget_item_data_get(item);
if (!wd) return EINA_FALSE;
wd->seg_items = eina_list_append(wd->seg_items, it);
_update_list(wd);
- return (Elm_Object_Item *) it;
+ return (Elm_Object_Item *)it;
}
EAPI Elm_Object_Item *
wd->seg_items = eina_list_append(wd->seg_items, it);
_update_list(wd);
- return (Elm_Object_Item *) it;
+ return (Elm_Object_Item *)it;
}
EAPI void
it = _item_find(obj, idx);
if (!it) return;
- elm_object_item_del((Elm_Object_Item *) it);
+ elm_object_item_del((Elm_Object_Item *)it);
}
EAPI const char*
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
Widget_Data *wd;
- Elm_Segment_Item *item = (Elm_Segment_Item *) it;
+ Elm_Segment_Item *item = (Elm_Segment_Item *)it;
wd = elm_widget_item_data_get(item);
if (!wd) return;
elm_segment_control_item_index_get(const Elm_Object_Item *it)
{
ELM_OBJ_ITEM_CHECK_OR_RETURN(it, -1);
- return ((Elm_Segment_Item *) it)->seg_index;
+ return ((Elm_Segment_Item *)it)->seg_index;
}