Elementary: Rename elm_object_label_* -> elm_object_text_part_*.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 4 Jul 2011 09:18:16 +0000 (09:18 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 4 Jul 2011 09:18:16 +0000 (09:18 +0000)
This name is better as it also applies for entries, and not just
for labels.

git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@60975 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

16 files changed:
src/bin/config.c
src/bin/test_actionslider.c
src/bin/test_layout.c
src/lib/Elementary.h.in
src/lib/elc_hoversel.c
src/lib/elm_actionslider.c
src/lib/elm_button.c
src/lib/elm_check.c
src/lib/elm_frame.c
src/lib/elm_label.c
src/lib/elm_layout.c
src/lib/elm_main.c
src/lib/elm_slider.c
src/lib/elm_toggle.c
src/lib/elm_widget.c
src/lib/elm_widget.h

index ff0d078..ffde281 100644 (file)
@@ -1977,7 +1977,7 @@ _status_config_fonts(Evas_Object *win,
    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);
index 662a777..d8311c4 100644 (file)
@@ -52,9 +52,9 @@ test_actionslider(void *data __UNUSED__, Evas_Object * obj __UNUSED__, void *eve
    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",
@@ -68,9 +68,9 @@ test_actionslider(void *data __UNUSED__, Evas_Object * obj __UNUSED__, void *eve
    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);
@@ -86,9 +86,9 @@ test_actionslider(void *data __UNUSED__, Evas_Object * obj __UNUSED__, void *eve
                                    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);
@@ -99,9 +99,9 @@ test_actionslider(void *data __UNUSED__, Evas_Object * obj __UNUSED__, void *eve
    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);
@@ -115,9 +115,9 @@ test_actionslider(void *data __UNUSED__, Evas_Object * obj __UNUSED__, void *eve
    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);
@@ -128,9 +128,9 @@ test_actionslider(void *data __UNUSED__, Evas_Object * obj __UNUSED__, void *eve
    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);
index a4aa696..e83da07 100644 (file)
@@ -8,7 +8,7 @@
 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
index e85e00c..d21d76e 100644 (file)
@@ -687,9 +687,9 @@ extern "C" {
     *
     * @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
@@ -703,9 +703,9 @@ extern "C" {
     *
     * @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)
 
    /**
     * @}
index d06e6b2..321d098 100644 (file)
@@ -315,8 +315,8 @@ elm_hoversel_add(Evas_Object *parent)
    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);
index c6fc4f3..16fffea 100644 (file)
@@ -406,8 +406,8 @@ elm_actionslider_add(Evas_Object *parent)
    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;
index ab75e67..b71c716 100644 (file)
@@ -339,8 +339,8 @@ elm_button_add(Evas_Object *parent)
    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");
index 8ad2215..41c90d8 100644 (file)
@@ -286,8 +286,8 @@ elm_check_add(Evas_Object *parent)
    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");
index 4b98201..06ee8d4 100644 (file)
@@ -156,8 +156,8 @@ elm_frame_add(Evas_Object *parent)
    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");
index 229bf6e..348f223 100644 (file)
@@ -564,8 +564,8 @@ elm_label_add(Evas_Object *parent)
    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);
index 5e984a3..e5b75b4 100644 (file)
@@ -386,8 +386,8 @@ elm_layout_add(Evas_Object *parent)
    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);
index e6b0e75..c6a3ce2 100644 (file)
@@ -1197,17 +1197,17 @@ elm_object_scale_get(const Evas_Object *obj)
 }
 
 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);
 }
 
 /**
index add5bbb..a8bdfed 100644 (file)
@@ -541,8 +541,8 @@ elm_slider_add(Evas_Object *parent)
    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;
index f5b109f..5a341a8 100644 (file)
@@ -256,8 +256,8 @@ elm_toggle_add(Evas_Object *parent)
    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));
index 101b250..ad5d03b 100644 (file)
@@ -70,10 +70,10 @@ struct _Smart_Data
                                       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;
@@ -483,22 +483,22 @@ elm_widget_event_hook_set(Evas_Object *obj,
 }
 
 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
@@ -2030,25 +2030,25 @@ elm_widget_theme_set(Evas_Object *obj,
 }
 
 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 *
index 4745caf..ab57237 100644 (file)
@@ -228,8 +228,8 @@ EAPI void             elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func
 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);
@@ -310,8 +310,8 @@ EAPI Eina_List       *elm_widget_stringlist_get(const char *str);
 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);