snprintf(buf, sizeof(buf), "%s/objects/font_preview.edj", PACKAGE_DATA_DIR);
preview = elm_layout_add(win);
elm_layout_file_set(preview, buf, "font_preview");
- elm_object_label_set(preview, "elm.text", "Preview Text — 我真的会写中文");
+ elm_object_text_part_set(preview, "elm.text", "Preview Text — 我真的会写中文");
evas_object_size_hint_weight_set(preview, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(preview, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(preview);
evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0);
elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_RIGHT);
elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_RIGHT);
- elm_object_label_set(as, "left", "Snooze");
- elm_object_label_set(as, "center", NULL);
- elm_object_label_set(as, "right", "Stop");
+ elm_object_text_part_set(as, "left", "Snooze");
+ elm_object_text_part_set(as, "center", NULL);
+ elm_object_text_part_set(as, "right", "Stop");
elm_actionslider_enabled_pos_set(as, ELM_ACTIONSLIDER_LEFT |
ELM_ACTIONSLIDER_RIGHT);
evas_object_smart_callback_add(as, "pos_changed",
evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0);
elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_CENTER);
elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_CENTER);
- elm_object_label_set(as, "left", "Snooze");
- elm_object_label_set(as, "center", NULL);
- elm_object_label_set(as, "right", "Stop");
+ elm_object_text_part_set(as, "left", "Snooze");
+ elm_object_text_part_set(as, "center", NULL);
+ elm_object_text_part_set(as, "right", "Stop");
elm_actionslider_enabled_pos_set(as, ELM_ACTIONSLIDER_LEFT |
ELM_ACTIONSLIDER_RIGHT);
evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL);
ELM_ACTIONSLIDER_RIGHT);
elm_actionslider_enabled_pos_set(as, ELM_ACTIONSLIDER_CENTER |
ELM_ACTIONSLIDER_RIGHT);
- elm_object_label_set(as, "left", NULL);
- elm_object_label_set(as, "center", "Accept");
- elm_object_label_set(as, "right", "Reject");
+ elm_object_text_part_set(as, "left", NULL);
+ elm_object_text_part_set(as, "center", "Accept");
+ elm_object_text_part_set(as, "right", "Reject");
evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL);
evas_object_show(as);
elm_box_pack_end(bx, as);
evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0);
elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_LEFT);
elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_LEFT);
- elm_object_label_set(as, "left", NULL);
- elm_object_label_set(as, "center", "Accept");
- elm_object_label_set(as, "right", "Reject");
+ elm_object_text_part_set(as, "left", NULL);
+ elm_object_text_part_set(as, "center", "Accept");
+ elm_object_text_part_set(as, "right", "Reject");
elm_object_text_set(as, "Go");
evas_object_smart_callback_add(as, "pos_changed",
_position_change_magnetic_cb, NULL);
evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0);
elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_LEFT);
elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_ALL);
- elm_object_label_set(as, "left", "Left");
- elm_object_label_set(as, "center", "Center");
- elm_object_label_set(as, "right", "Right");
+ elm_object_text_part_set(as, "left", "Left");
+ elm_object_text_part_set(as, "center", "Center");
+ elm_object_text_part_set(as, "right", "Right");
elm_object_text_set(as, "Go");
evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL);
evas_object_show(as);
evas_object_size_hint_align_set(as, EVAS_HINT_FILL, 0);
elm_actionslider_indicator_pos_set(as, ELM_ACTIONSLIDER_CENTER);
elm_actionslider_magnet_pos_set(as, ELM_ACTIONSLIDER_CENTER);
- elm_object_label_set(as, "left", "Enable");
- elm_object_label_set(as, "center", "Magnet");
- elm_object_label_set(as, "right", "Disable");
+ elm_object_text_part_set(as, "left", "Enable");
+ elm_object_text_part_set(as, "center", "Magnet");
+ elm_object_text_part_set(as, "right", "Disable");
evas_object_smart_callback_add(as, "pos_changed",
_magnet_enable_disable_cb, NULL);
evas_object_smart_callback_add(as, "selected", _pos_selected_cb, NULL);
static void
_clicked_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
{
- elm_object_label_set(data, "text", elm_object_text_get(obj));
+ elm_object_text_part_set(data, "text", elm_object_text_get(obj));
}
void
*
* @ingroup General
*/
- EAPI void elm_object_label_set(Evas_Object *obj, const char *item, const char *label);
+ EAPI void elm_object_text_part_set(Evas_Object *obj, const char *item, const char *label);
-#define elm_object_text_set(obj, label) elm_object_label_set((obj), NULL, (label))
+#define elm_object_text_set(obj, label) elm_object_text_part_set((obj), NULL, (label))
/**
* Get a label of an object
*
* @ingroup General
*/
- EAPI const char *elm_object_label_get(const Evas_Object *obj, const char *item);
+ EAPI const char *elm_object_text_part_get(const Evas_Object *obj, const char *item);
-#define elm_object_text_get(obj) elm_object_label_get((obj), NULL)
+#define elm_object_text_get(obj) elm_object_text_part_get((obj), NULL)
/**
* @}
elm_widget_activate_hook_set(obj, _activate_hook);
elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
elm_widget_can_focus_set(obj, EINA_TRUE);
- elm_widget_label_set_hook_set(obj, _elm_hoversel_label_set);
- elm_widget_label_get_hook_set(obj, _elm_hoversel_label_get);
+ elm_widget_text_set_hook_set(obj, _elm_hoversel_label_set);
+ elm_widget_text_get_hook_set(obj, _elm_hoversel_label_get);
wd->btn = elm_button_add(parent);
elm_widget_mirrored_automatic_set(wd->btn, EINA_FALSE);
elm_widget_data_set(obj, wd);
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
- elm_widget_label_set_hook_set(obj, _elm_actionslider_label_set);
- elm_widget_label_get_hook_set(obj, _elm_actionslider_label_get);
+ elm_widget_text_set_hook_set(obj, _elm_actionslider_label_set);
+ elm_widget_text_get_hook_set(obj, _elm_actionslider_label_get);
wd->mouse_down = EINA_FALSE;
wd->enabled_position = ELM_ACTIONSLIDER_ALL;
elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
- elm_widget_label_set_hook_set(obj, _elm_button_label_set);
- elm_widget_label_get_hook_set(obj, _elm_button_label_get);
+ elm_widget_text_set_hook_set(obj, _elm_button_label_set);
+ elm_widget_text_get_hook_set(obj, _elm_button_label_get);
wd->btn = edje_object_add(e);
_elm_theme_object_set(obj, wd->btn, "button", "base", "default");
elm_widget_can_focus_set(obj, EINA_TRUE);
elm_widget_activate_hook_set(obj, _activate_hook);
elm_widget_event_hook_set(obj, _event_hook);
- elm_widget_label_set_hook_set(obj, _elm_check_label_set);
- elm_widget_label_get_hook_set(obj, _elm_check_label_get);
+ elm_widget_text_set_hook_set(obj, _elm_check_label_set);
+ elm_widget_text_get_hook_set(obj, _elm_check_label_get);
wd->chk = edje_object_add(e);
_elm_theme_object_set(obj, wd->chk, "check", "base", "default");
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_focus_next_hook_set(obj, _elm_frame_focus_next_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
- elm_widget_label_set_hook_set(obj, _elm_frame_label_set);
- elm_widget_label_get_hook_set(obj, _elm_frame_label_get);
+ elm_widget_text_set_hook_set(obj, _elm_frame_label_set);
+ elm_widget_text_get_hook_set(obj, _elm_frame_label_get);
wd->frm = edje_object_add(e);
_elm_theme_object_set(obj, wd->frm, "frame", "base", "default");
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
- elm_widget_label_set_hook_set(obj, _elm_label_label_set);
- elm_widget_label_get_hook_set(obj, _elm_label_label_get);
+ elm_widget_text_set_hook_set(obj, _elm_label_label_set);
+ elm_widget_text_get_hook_set(obj, _elm_label_label_get);
wd->bgcolor = EINA_FALSE;
wd->bg = evas_object_rectangle_add(e);
elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
- elm_widget_label_set_hook_set(obj, _elm_layout_label_set);
- elm_widget_label_get_hook_set(obj, _elm_layout_label_get);
+ elm_widget_text_set_hook_set(obj, _elm_layout_label_set);
+ elm_widget_text_get_hook_set(obj, _elm_layout_label_get);
wd->obj = obj;
wd->lay = edje_object_add(e);
}
EAPI void
-elm_object_label_set(Evas_Object *obj, const char *item, const char *label)
+elm_object_text_part_set(Evas_Object *obj, const char *item, const char *label)
{
EINA_SAFETY_ON_NULL_RETURN(obj);
- elm_widget_label_set(obj, item, label);
+ elm_widget_text_part_set(obj, item, label);
}
EAPI const char *
-elm_object_label_get(const Evas_Object *obj, const char *item)
+elm_object_text_part_get(const Evas_Object *obj, const char *item)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
- return elm_widget_label_get(obj, item);
+ return elm_widget_text_part_get(obj, item);
}
/**
elm_widget_disable_hook_set(obj, _disable_hook);
elm_widget_can_focus_set(obj, EINA_TRUE);
elm_widget_event_hook_set(obj, _event_hook);
- elm_widget_label_set_hook_set(obj, _elm_slider_label_set);
- elm_widget_label_get_hook_set(obj, _elm_slider_label_get);
+ elm_widget_text_set_hook_set(obj, _elm_slider_label_set);
+ elm_widget_text_get_hook_set(obj, _elm_slider_label_get);
wd->horizontal = EINA_TRUE;
wd->indicator_show = EINA_TRUE;
elm_widget_disable_hook_set(obj, _disable_hook);
elm_widget_can_focus_set(obj, EINA_TRUE);
elm_widget_event_hook_set(obj, _event_hook);
- elm_widget_label_set_hook_set(obj, _elm_toggle_label_set);
- elm_widget_label_get_hook_set(obj, _elm_toggle_label_get);
+ elm_widget_text_set_hook_set(obj, _elm_toggle_label_set);
+ elm_widget_text_get_hook_set(obj, _elm_toggle_label_get);
wd->tgl = edje_object_add(e);
_mirrored_set(obj, elm_widget_mirrored_get(obj));
Evas_Coord *y,
Evas_Coord *w,
Evas_Coord *h);
- void (*on_label_set_func)(Evas_Object *obj,
+ void (*on_text_set_func)(Evas_Object *obj,
const char *item,
const char *text);
- const char *(*on_label_get_func)(const Evas_Object *obj,
+ const char *(*on_text_get_func)(const Evas_Object *obj,
const char *item);
void *data;
Evas_Coord rx, ry, rw, rh;
}
EAPI void
-elm_widget_label_set_hook_set(Evas_Object *obj,
+elm_widget_text_set_hook_set(Evas_Object *obj,
void (*func)(Evas_Object *obj,
const char *item,
const char *text))
{
API_ENTRY return;
- sd->on_label_set_func = func;
+ sd->on_text_set_func = func;
}
EAPI void
-elm_widget_label_get_hook_set(Evas_Object *obj,
+elm_widget_text_get_hook_set(Evas_Object *obj,
const char *(*func)(const Evas_Object *obj,
const char *item))
{
API_ENTRY return;
- sd->on_label_get_func = func;
+ sd->on_text_get_func = func;
}
EAPI void
}
EAPI void
-elm_widget_label_set(Evas_Object *obj, const char *item, const char *label)
+elm_widget_text_part_set(Evas_Object *obj, const char *item, const char *label)
{
API_ENTRY return;
- if (!sd->on_label_set_func)
+ if (!sd->on_text_set_func)
return;
- sd->on_label_set_func(obj, item, label);
+ sd->on_text_set_func(obj, item, label);
}
EAPI const char *
-elm_widget_label_get(const Evas_Object *obj, const char *item)
+elm_widget_text_part_get(const Evas_Object *obj, const char *item)
{
API_ENTRY return NULL;
- if (!sd->on_label_get_func)
+ if (!sd->on_text_get_func)
return NULL;
- return sd->on_label_get_func(obj, item);
+ return sd->on_text_get_func(obj, item);
}
EAPI Elm_Theme *
EAPI void elm_widget_on_change_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
EAPI void elm_widget_focus_region_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h));
-EAPI void elm_widget_label_set_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *item, const char *text));
-EAPI void elm_widget_label_get_hook_set(Evas_Object *obj, const char *(*func)(const Evas_Object *obj, const char *item));
+EAPI void elm_widget_text_set_hook_set(Evas_Object *obj, void (*func)(Evas_Object *obj, const char *item, const char *text));
+EAPI void elm_widget_text_get_hook_set(Evas_Object *obj, const char *(*func)(const Evas_Object *obj, const char *item));
EAPI void elm_widget_on_focus_region_hook_set(Evas_Object *obj, void (*func) (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h));
EAPI void elm_widget_data_set(Evas_Object *obj, void *data);
EAPI void *elm_widget_data_get(const Evas_Object *obj);
EAPI void elm_widget_stringlist_free(Eina_List *list);
EAPI void elm_widget_focus_hide_handle(Evas_Object *obj);
EAPI void elm_widget_focus_mouse_down_handle(Evas_Object *obj);
-EAPI void elm_widget_label_set(Evas_Object *obj, const char *item, const char *label);
-EAPI const char *elm_widget_label_get(const Evas_Object *obj, const char *item);
+EAPI void elm_widget_text_part_set(Evas_Object *obj, const char *item, const char *label);
+EAPI const char *elm_widget_text_part_get(const Evas_Object *obj, const char *item);
EAPI Elm_Widget_Item *_elm_widget_item_new(Evas_Object *parent, size_t alloc_size);
EAPI void _elm_widget_item_del(Elm_Widget_Item *item);