From 1e9c7ab31fd7d7df81411e727223ae9490aa48ad Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Thu, 8 Mar 2012 19:27:56 +0900 Subject: [PATCH] [multibuttonentry]Fixed Conflicts --- src/bin/test_multibuttonentry.c | 24 -- src/edje_externals/elm_multibuttonentry.c | 12 - src/lib/elc_multibuttonentry.c | 511 +----------------------------- src/lib/elc_multibuttonentry.h | 162 ---------- 4 files changed, 1 insertion(+), 708 deletions(-) diff --git a/src/bin/test_multibuttonentry.c b/src/bin/test_multibuttonentry.c index 038aa9a..576edd6 100644 --- a/src/bin/test_multibuttonentry.c +++ b/src/bin/test_multibuttonentry.c @@ -48,11 +48,7 @@ _mbe_clicked_cb(void *data __UNUSED__, void *event_info __UNUSED__ ) { //Unset the multibuttonentry to contracted mode of single line -<<<<<<< HEAD - elm_multibuttonentry_shrink_mode_set(obj, 0); -======= elm_multibuttonentry_expanded_set(obj, EINA_TRUE); ->>>>>>> remotes/origin/upstream printf("A multibuttonentry is clicked!\n"); Evas_Object *entry; entry = elm_multibuttonentry_entry_get(obj); @@ -75,11 +71,7 @@ _mbe_unfocused_cb(void *data __UNUSED__, void *event_info __UNUSED__ ) { //Set the multibuttonentry to contracted mode of single line -<<<<<<< HEAD - elm_multibuttonentry_shrink_mode_set(obj, 1); -======= elm_multibuttonentry_expanded_set(obj, EINA_FALSE); ->>>>>>> remotes/origin/upstream printf("multibuttonentry unfocused!\n"); } @@ -102,19 +94,11 @@ _expanded_cb(void *data __UNUSED__, // "contracted" smart callback static void -<<<<<<< HEAD -_shrank_cb(void *data __UNUSED__, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) -{ - printf("shrank!\n"); -======= _contracted_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { printf("contracted!\n"); ->>>>>>> remotes/origin/upstream } // "contracted,state,changed" smart callback @@ -160,11 +144,7 @@ _add_multibuttonentry(Evas_Object *parent) mbe = elm_multibuttonentry_add(parent); elm_object_text_set(mbe, "To: "); -<<<<<<< HEAD - elm_multibuttonentry_guide_text_set(mbe, "Tap to add recipient"); -======= elm_object_part_text_set(mbe, "guide", "Tap to add recipient"); ->>>>>>> remotes/origin/upstream evas_object_size_hint_weight_set(mbe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(mbe, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_object_content_set(scr, mbe); @@ -184,11 +164,7 @@ _add_multibuttonentry(Evas_Object *parent) evas_object_smart_callback_add(mbe, "unfocused", _mbe_unfocused_cb, NULL); evas_object_smart_callback_add(mbe, "expanded", _expanded_cb, NULL); -<<<<<<< HEAD - evas_object_smart_callback_add(mbe, "shrank", _shrank_cb, NULL); -======= evas_object_smart_callback_add(mbe, "contracted", _contracted_cb, NULL); ->>>>>>> remotes/origin/upstream evas_object_smart_callback_add(mbe, "shrink,state,changed", _shrink_state_changed_cb, NULL); evas_object_resize(mbe, 220, 300); diff --git a/src/edje_externals/elm_multibuttonentry.c b/src/edje_externals/elm_multibuttonentry.c index bb700c0..63ed57a 100644 --- a/src/edje_externals/elm_multibuttonentry.c +++ b/src/edje_externals/elm_multibuttonentry.c @@ -18,11 +18,7 @@ external_multibuttonentry_state_set(void *data __UNUSED__, Evas_Object *obj, con if (p->label) elm_object_text_set(obj, p->label); if (p->guide_text) -<<<<<<< HEAD - elm_multibuttonentry_guide_text_set(obj, p->guide_text); -======= elm_object_part_text_set(obj, "guide", p->guide_text); ->>>>>>> remotes/origin/upstream } static Eina_Bool @@ -40,11 +36,7 @@ external_multibuttonentry_param_set(void *data __UNUSED__, Evas_Object *obj, con { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { -<<<<<<< HEAD - elm_multibuttonentry_guide_text_set(obj, param->s); -======= elm_object_part_text_set(obj, "guide", param->s); ->>>>>>> remotes/origin/upstream return EINA_TRUE; } } @@ -70,11 +62,7 @@ external_multibuttonentry_param_get(void *data __UNUSED__, const Evas_Object *ob { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) { -<<<<<<< HEAD - param->s = elm_multibuttonentry_guide_text_get(obj); -======= param->s = elm_object_part_text_get(obj, "guide"); ->>>>>>> remotes/origin/upstream return EINA_TRUE; } } diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c index ebf2e55..9ef2269 100644 --- a/src/lib/elc_multibuttonentry.c +++ b/src/lib/elc_multibuttonentry.c @@ -2,11 +2,7 @@ #include "elm_priv.h" #define MAX_STR 256 -<<<<<<< HEAD -#define MIN_W_ENTRY 20 -======= #define MIN_W_ENTRY 10 ->>>>>>> remotes/origin/upstream typedef enum _Multibuttonentry_Pos { @@ -14,25 +10,15 @@ typedef enum _Multibuttonentry_Pos MULTIBUTTONENTRY_POS_END, MULTIBUTTONENTRY_POS_BEFORE, MULTIBUTTONENTRY_POS_AFTER, -<<<<<<< HEAD - MULTIBUTTONENTRY_POS_NUM -======= ->>>>>>> remotes/origin/upstream } Multibuttonentry_Pos; typedef enum _Multibuttonentry_Button_State { MULTIBUTTONENTRY_BUTTON_STATE_DEFAULT, MULTIBUTTONENTRY_BUTTON_STATE_SELECTED, -<<<<<<< HEAD - MULTIBUTTONENTRY_BUTTON_STATE_NUM - } Multibuttonentry_Button_State; - -======= } Multibuttonentry_Button_State; ->>>>>>> remotes/origin/upstream typedef enum _MultiButtonEntry_Closed_Button_Type { MULTIBUTTONENTRY_CLOSED_IMAGE, @@ -56,19 +42,12 @@ struct _Multibuttonentry_Item Evas_Object *button; Evas_Coord vw, rw; // vw: visual width, real width Eina_Bool visible: 1; -<<<<<<< HEAD -======= Evas_Smart_Cb func; ->>>>>>> remotes/origin/upstream }; typedef struct _Elm_Multibuttonentry_Item_Filter { -<<<<<<< HEAD - Elm_Multibuttonentry_Item_Filter_callback callback_func; -======= Elm_Multibuttonentry_Item_Filter_Cb callback_func; ->>>>>>> remotes/origin/upstream void *data; } Elm_Multibuttonentry_Item_Filter; @@ -88,11 +67,8 @@ struct _Widget_Data Eina_List *current; Eina_List *filter_list; -<<<<<<< HEAD -======= const char *labeltxt, *guidetexttxt; ->>>>>>> remotes/origin/upstream int n_str; Multibuttonentry_View_State view_state; @@ -100,12 +76,7 @@ struct _Widget_Data int shrink; Eina_Bool focused: 1; Eina_Bool last_btn_select: 1; -<<<<<<< HEAD - Eina_Bool view_mode; - Elm_Multibuttonentry_Item_Filter_callback add_callback; -======= Elm_Multibuttonentry_Item_Filter_Cb add_callback; ->>>>>>> remotes/origin/upstream void *add_callback_data; }; @@ -118,11 +89,7 @@ static void _sizing_eval(Evas_Object *obj); static void _changed_size_hint_cb(void *data, Evas *evas, Evas_Object *obj, void *event); static void _resize_cb(void *data, Evas *evas, Evas_Object *obj, void *event); static void _event_init(Evas_Object *obj); -<<<<<<< HEAD -static void _shrink_mode_set(Evas_Object *obj, int shrink); -======= static void _shrink_mode_set(Evas_Object *obj, Eina_Bool shrink); ->>>>>>> remotes/origin/upstream static void _view_update(Evas_Object *obj); static void _set_label(Evas_Object *obj, const char *str); static void _change_current_button_state(Evas_Object *obj, Multibuttonentry_Button_State state); @@ -131,13 +98,7 @@ static void _button_clicked(void *data, Evas_Object *obj, const char *emission, static void _del_button_obj(Evas_Object *obj, Evas_Object *btn); static void _del_button_item(Elm_Multibuttonentry_Item *item); static void _select_button(Evas_Object *obj, Evas_Object *btn); -<<<<<<< HEAD -static Elm_Multibuttonentry_Item *_add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, - const Elm_Multibuttonentry_Item *reference, void *data); -static void _add_button(Evas_Object *obj, const char *str); -======= static Elm_Object_Item *_add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, const void *ref, Evas_Smart_Cb func, void *data); ->>>>>>> remotes/origin/upstream static void _evas_mbe_key_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _entry_changed_cb(void *data, Evas_Object *obj, void *event_info); static void _entry_key_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info); @@ -152,12 +113,6 @@ static void _calculate_box_min_size(Evas_Object *box, Evas_Object_Box_Data *priv static Evas_Coord _calculate_item_max_height(Evas_Object *box, Evas_Object_Box_Data *priv, int obj_index); static void _box_layout_cb(Evas_Object *o, Evas_Object_Box_Data *priv, void *data); static void _item_text_set_hook(Elm_Object_Item *it, -<<<<<<< HEAD - const char *part, - const char *label); -static const char * _item_text_get_hook(const Elm_Object_Item *it, - const char *part); -======= const char *part, const char *label); static const char *_item_text_get_hook(const Elm_Object_Item *it, @@ -167,7 +122,6 @@ static const char *_item_text_get_hook(const Elm_Object_Item *it, * Code refactoring * use evas_object_smart_callback_descriptions_set for smart callbacks. */ ->>>>>>> remotes/origin/upstream static void _del_hook(Evas_Object *obj) @@ -187,19 +141,12 @@ _del_hook(Evas_Object *obj) } wd->current = NULL; -<<<<<<< HEAD - if (wd->entry) evas_object_del (wd->entry); - if (wd->label) evas_object_del (wd->label); - if (wd->guidetext) evas_object_del (wd->guidetext); - if (wd->end) evas_object_del (wd->end); -======= if (wd->labeltxt) eina_stringshare_del(wd->labeltxt); if (wd->guidetexttxt) eina_stringshare_del(wd->guidetexttxt); if (wd->entry) evas_object_del(wd->entry); if (wd->label) evas_object_del(wd->label); if (wd->guidetext) evas_object_del(wd->guidetext); if (wd->end) evas_object_del(wd->end); ->>>>>>> remotes/origin/upstream if (wd->rect_for_end) evas_object_del(wd->rect_for_end); } @@ -213,21 +160,13 @@ _theme_hook(Evas_Object *obj) if (!wd) return; _elm_theme_object_set(obj, wd->base, "multibuttonentry", "base", elm_widget_style_get(obj)); -<<<<<<< HEAD - if (wd->box) edje_object_part_swallow (wd->base, "box.swallow", wd->box); -======= if (wd->box) edje_object_part_swallow(wd->base, "box.swallow", wd->box); ->>>>>>> remotes/origin/upstream edje_object_scale_set(wd->base, elm_widget_scale_get(obj) * _elm_config->scale); EINA_LIST_FOREACH(wd->items, l, item) { if (item->button) -<<<<<<< HEAD - _elm_theme_object_set(obj, item->button, "multibuttonentry", "btn", elm_widget_style_get (obj)); -======= _elm_theme_object_set(obj, item->button, "multibuttonentry", "btn", elm_widget_style_get(obj)); ->>>>>>> remotes/origin/upstream edje_object_scale_set(item->button, elm_widget_scale_get(obj) * _elm_config->scale); } @@ -332,13 +271,8 @@ _resize_cb(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void if (!wd) return; evas_object_geometry_get(wd->box, NULL, NULL, &w, &h); -<<<<<<< HEAD - if (wd->h_box < h) evas_object_smart_callback_call (data, "expanded", NULL); - else if (wd->h_box > h) evas_object_smart_callback_call (data, "shrank", NULL); -======= if (wd->h_box < h) evas_object_smart_callback_call(data, "expanded", NULL); else if (wd->h_box > h) evas_object_smart_callback_call(data, "contracted", NULL); ->>>>>>> remotes/origin/upstream wd->w_box = w; wd->h_box = h; @@ -397,16 +331,8 @@ _set_vis_guidetext(Evas_Object *obj) else { evas_object_hide(wd->guidetext); -<<<<<<< HEAD - if (!wd->view_mode) - { - elm_box_pack_end(wd->box, wd->entry); - evas_object_show(wd->entry); - } -======= elm_box_pack_end(wd->box, wd->entry); evas_object_show(wd->entry); ->>>>>>> remotes/origin/upstream if (elm_widget_focus_get(obj) || wd->focused) if (!wd->current) elm_object_focus_set(wd->entry, EINA_TRUE); @@ -415,11 +341,7 @@ _set_vis_guidetext(Evas_Object *obj) } static void -<<<<<<< HEAD -_shrink_mode_set(Evas_Object *obj, int shrink) -======= _shrink_mode_set(Evas_Object *obj, Eina_Bool shrink) ->>>>>>> remotes/origin/upstream { Widget_Data *wd = elm_widget_data_get(obj); Eina_List *l; @@ -437,15 +359,9 @@ _shrink_mode_set(Evas_Object *obj, Eina_Bool shrink) wd->view_state = MULTIBUTTONENTRY_VIEW_NONE; } -<<<<<<< HEAD - if (shrink == 1) - { - Evas_Coord w=0, w_tmp=0; -======= if (shrink == EINA_TRUE) { Evas_Coord w = 0, w_tmp = 0; ->>>>>>> remotes/origin/upstream Evas_Coord box_inner_item_width_padding = 0; elm_box_padding_get(wd->box, &box_inner_item_width_padding, NULL); @@ -524,11 +440,7 @@ _shrink_mode_set(Evas_Object *obj, Eina_Bool shrink) evas_object_show(wd->end); wd->view_state = MULTIBUTTONENTRY_VIEW_SHRINK; -<<<<<<< HEAD - evas_object_smart_callback_call(obj, "shrink,state,changed", (void *)1); -======= evas_object_smart_callback_call(obj, "expand,state,changed", (void *)1); ->>>>>>> remotes/origin/upstream break; } } @@ -553,11 +465,7 @@ _shrink_mode_set(Evas_Object *obj, Eina_Bool shrink) wd->rect_for_end = evas_object_rectangle_add(e); evas_object_color_set(wd->rect_for_end, 0, 0, 0, 0); } -<<<<<<< HEAD - evas_object_size_hint_min_set(wd->rect_for_end, rectSize, closed_height * elm_scale_get()); -======= evas_object_size_hint_min_set(wd->rect_for_end, rectSize, closed_height * _elm_config->scale); ->>>>>>> remotes/origin/upstream elm_box_pack_end(wd->box, wd->rect_for_end); evas_object_show(wd->rect_for_end); @@ -565,11 +473,7 @@ _shrink_mode_set(Evas_Object *obj, Eina_Bool shrink) evas_object_show(wd->end); wd->view_state = MULTIBUTTONENTRY_VIEW_SHRINK; -<<<<<<< HEAD - evas_object_smart_callback_call(obj, "shrink,state,changed", (void *)0); -======= evas_object_smart_callback_call(obj, "expand,state,changed", (void *)0); ->>>>>>> remotes/origin/upstream break; } } @@ -609,11 +513,7 @@ _shrink_mode_set(Evas_Object *obj, Eina_Bool shrink) } wd->view_state = MULTIBUTTONENTRY_VIEW_NONE; -<<<<<<< HEAD - evas_object_smart_callback_call(obj, "shrink,state,changed", (void *)wd->shrink); -======= evas_object_smart_callback_call(obj, "expand,state,changed", (void *)(long)wd->shrink); ->>>>>>> remotes/origin/upstream } if (wd->view_state != MULTIBUTTONENTRY_VIEW_SHRINK) { @@ -645,30 +545,19 @@ _view_update(Evas_Object *obj) // update buttons in shrink mode if (wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) -<<<<<<< HEAD - _shrink_mode_set(obj, 1); -======= _shrink_mode_set(obj, EINA_TRUE); ->>>>>>> remotes/origin/upstream // update guidetext _set_vis_guidetext(obj); } static void -<<<<<<< HEAD -_set_label(Evas_Object *obj, const char* str) -======= _set_label(Evas_Object *obj, const char *str) ->>>>>>> remotes/origin/upstream { Widget_Data *wd = elm_widget_data_get(obj); if (!wd || !str) return; -<<<<<<< HEAD -======= eina_stringshare_replace(&wd->labeltxt, str); ->>>>>>> remotes/origin/upstream if (wd->label) { Evas_Coord width, height, sum_width = 0; @@ -703,27 +592,11 @@ _set_label(Evas_Object *obj, const char *str) } static void -<<<<<<< HEAD -_set_guidetext(Evas_Object *obj, const char* str) -======= _set_guidetext(Evas_Object *obj, const char *str) ->>>>>>> remotes/origin/upstream { Widget_Data *wd = elm_widget_data_get(obj); if (!wd || !str) return; -<<<<<<< HEAD - if (!wd->guidetext) - { - if (! (wd->guidetext = edje_object_add (evas_object_evas_get (obj)))) return; - _elm_theme_object_set(obj, wd->guidetext, "multibuttonentry", "guidetext", elm_widget_style_get(obj)); - evas_object_size_hint_weight_set(wd->guidetext, 0.0, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(wd->guidetext, EVAS_HINT_FILL, EVAS_HINT_FILL); - } - - if (wd->guidetext) edje_object_part_text_set (wd->guidetext, "elm.text", str); - _view_update(obj); -======= eina_stringshare_replace(&wd->guidetexttxt, str); if (wd->guidetext == NULL) @@ -739,7 +612,6 @@ _set_guidetext(Evas_Object *obj, const char *str) edje_object_part_text_set(wd->guidetext, "elm.text", str); _view_update(obj); } ->>>>>>> remotes/origin/upstream } static void @@ -805,21 +677,10 @@ _button_clicked(void *data, Evas_Object *obj, const char *emission __UNUSED__, c Elm_Multibuttonentry_Item *item = NULL; if (!wd || wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) return; -<<<<<<< HEAD _select_button(data, obj); if ((wd->current) && ((item = eina_list_data_get(wd->current)) != NULL)) evas_object_smart_callback_call(data, "item,clicked", item); -======= - _change_current_button(data, obj); - - if (wd->current) - if ((item = eina_list_data_get(wd->current)) != NULL) - { - evas_object_smart_callback_call(data, "item,clicked", item); - _select_button(data, item->button); - } ->>>>>>> remotes/origin/upstream } static void @@ -860,11 +721,7 @@ _del_button_item(Elm_Multibuttonentry_Item *item) } } if (wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) -<<<<<<< HEAD - _shrink_mode_set(obj, 1); -======= _shrink_mode_set(obj, EINA_TRUE); ->>>>>>> remotes/origin/upstream if (!eina_list_count(wd->items)) _set_vis_guidetext(obj); @@ -897,11 +754,7 @@ static void _resize_button(Evas_Object *btn, Evas_Coord *realw, Evas_Coord *vieww) { Evas_Coord rw, vw; -<<<<<<< HEAD Evas_Coord w_text, h_btn, padding_outer = 0; -======= - Evas_Coord w_text, h_btn, padding_outer, padding_inner = 0; ->>>>>>> remotes/origin/upstream Evas_Coord w_btn = 0, button_max_width = 0; const char *size_str; @@ -912,12 +765,7 @@ _resize_button(Evas_Object *btn, Evas_Coord *realw, Evas_Coord *vieww) edje_object_part_geometry_get(btn, "elm.base", NULL, NULL, NULL, &h_btn); edje_object_part_geometry_get(btn, "elm.btn.text", NULL, NULL, &w_text, NULL); edje_object_part_geometry_get(btn, "right.padding", NULL, NULL, &padding_outer, NULL); -<<<<<<< HEAD w_btn = w_text + 2*padding_outer; -======= - w_btn = w_text + 2*padding_outer + 2*padding_inner; ->>>>>>> remotes/origin/upstream - rw = w_btn; if (button_max_width < w_btn) @@ -936,18 +784,6 @@ _resize_button(Evas_Object *btn, Evas_Coord *realw, Evas_Coord *vieww) static Eina_Bool _item_del_pre_hook(Elm_Object_Item *it) { -<<<<<<< HEAD - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE); - _del_button_item((Elm_Multibuttonentry_Item *) it); - return EINA_TRUE; -} - -static Elm_Multibuttonentry_Item* -_add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, const Elm_Multibuttonentry_Item *reference, void *data) -{ - Elm_Multibuttonentry_Item *item; - Elm_Multibuttonentry_Item_Filter *item_filter; -======= _del_button_item((Elm_Multibuttonentry_Item *)it); return EINA_TRUE; } @@ -958,23 +794,15 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co Elm_Multibuttonentry_Item *item; Elm_Multibuttonentry_Item_Filter *item_filter; Elm_Multibuttonentry_Item *reference = (Elm_Multibuttonentry_Item *)ref; ->>>>>>> remotes/origin/upstream Eina_List *l; Evas_Object *btn; Evas_Coord width = -1, height = -1; char *str_utf8 = NULL; -<<<<<<< HEAD - - Widget_Data *wd = elm_widget_data_get(obj); - - if (!wd || !wd->box || !wd->entry) return NULL; -======= Widget_Data *wd = elm_widget_data_get(obj); if (!wd || !wd->box || !wd->entry) return NULL; ELM_CHECK_WIDTYPE(obj, widtype) NULL; if (!str) return NULL; ->>>>>>> remotes/origin/upstream EINA_LIST_FOREACH(wd->filter_list, l, item_filter) { @@ -1013,14 +841,11 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co item->vw = vw; item->visible = EINA_TRUE; -<<<<<<< HEAD -======= if (func) { item->func = func; } ->>>>>>> remotes/origin/upstream switch (pos) { case MULTIBUTTONENTRY_POS_START: @@ -1028,11 +853,7 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co if (wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) { elm_widget_sub_object_add(obj, btn); -<<<<<<< HEAD - _shrink_mode_set(obj, 1); -======= _shrink_mode_set(obj, EINA_TRUE); ->>>>>>> remotes/origin/upstream } else { @@ -1056,16 +877,7 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co if (wd->view_state == MULTIBUTTONENTRY_VIEW_GUIDETEXT) _set_vis_guidetext(obj); if (wd->entry) -<<<<<<< HEAD - { - if (!wd->view_mode) - elm_box_pack_before(wd->box, btn, wd->entry); - else - elm_box_pack_end(wd->box, btn); - } -======= elm_box_pack_before(wd->box, btn, wd->entry); ->>>>>>> remotes/origin/upstream else elm_box_pack_end(wd->box, btn); } @@ -1079,11 +891,7 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co { elm_widget_sub_object_add(obj, btn); evas_object_hide(btn); -<<<<<<< HEAD - _shrink_mode_set(obj, 1); -======= _shrink_mode_set(obj, EINA_TRUE); ->>>>>>> remotes/origin/upstream } else { @@ -1094,16 +902,7 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co if (wd->view_state == MULTIBUTTONENTRY_VIEW_GUIDETEXT) _set_vis_guidetext(obj); if (wd->entry) -<<<<<<< HEAD - { - if (!wd->view_mode) - elm_box_pack_before(wd->box, btn, wd->entry); - else - elm_box_pack_end(wd->box, btn); - } -======= elm_box_pack_before(wd->box, btn, wd->entry); ->>>>>>> remotes/origin/upstream else elm_box_pack_end(wd->box, btn); } @@ -1117,11 +916,7 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co if (wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) { elm_widget_sub_object_add(obj, btn); -<<<<<<< HEAD - _shrink_mode_set(obj, 1); -======= _shrink_mode_set(obj, EINA_TRUE); ->>>>>>> remotes/origin/upstream } else { @@ -1132,16 +927,7 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co if (wd->view_state == MULTIBUTTONENTRY_VIEW_GUIDETEXT) _set_vis_guidetext(obj); if (wd->entry) -<<<<<<< HEAD - { - if (!wd->view_mode) - elm_box_pack_before(wd->box, btn, wd->entry); - else - elm_box_pack_end(wd->box, btn); - } -======= elm_box_pack_before(wd->box, btn, wd->entry); ->>>>>>> remotes/origin/upstream else elm_box_pack_end(wd->box, btn); } @@ -1155,28 +941,11 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co free(str_utf8); -<<<<<<< HEAD - return item; -} - -static void -_add_button(Evas_Object *obj, const char *str) -{ - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return; - - _add_button_item(obj, str, MULTIBUTTONENTRY_POS_END, NULL, NULL); -} - -static Elm_Multibuttonentry_Item_Filter* -_filter_new(Elm_Multibuttonentry_Item_Filter_callback func, void *data) -======= return (Elm_Object_Item *)item; } static Elm_Multibuttonentry_Item_Filter* _filter_new(Elm_Multibuttonentry_Item_Filter_Cb func, void *data) ->>>>>>> remotes/origin/upstream { Elm_Multibuttonentry_Item_Filter *item_filter = ELM_NEW(Elm_Multibuttonentry_Item_Filter); if (!item_filter) return NULL; @@ -1207,11 +976,7 @@ _evas_mbe_key_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, { if (wd->current && ((strcmp(ev->keyname, "BackSpace") == 0) || -<<<<<<< HEAD - (strcmp(ev->keyname, "BackSpace (") == 0))) -======= (strcmp(ev->keyname, "Delete") == 0))) ->>>>>>> remotes/origin/upstream { item = eina_list_data_get(wd->current); if (item) @@ -1223,11 +988,7 @@ _evas_mbe_key_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, } else if (((!wd->current && (wd->n_str == 0) && (strcmp(ev->keyname, "BackSpace") == 0)) || -<<<<<<< HEAD - (strcmp(ev->keyname, "BackSpace (") == 0))) -======= (strcmp(ev->keyname, "Delete") == 0))) ->>>>>>> remotes/origin/upstream { item = eina_list_data_get(eina_list_last(wd->items)); if (item) @@ -1246,11 +1007,7 @@ _entry_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, if (!wd) return; -<<<<<<< HEAD - if ((wd->n_str == 1) && (strcmp(ev->keyname, "BackSpace") == 0 || (strcmp(ev->keyname, "BackSpace (") == 0 ))) -======= if ((wd->n_str == 1) && (strcmp(ev->keyname, "BackSpace") == 0 || (strcmp(ev->keyname, "Delete") == 0 ))) ->>>>>>> remotes/origin/upstream wd->last_btn_select = EINA_FALSE; } @@ -1267,11 +1024,7 @@ _entry_key_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, vo if ((strcmp(str, "") != 0) && (strcmp(ev->keyname, "KP_Enter") == 0 || strcmp(ev->keyname, "Return") == 0 )) { -<<<<<<< HEAD - _add_button(data, str); -======= _add_button_item(data, str, MULTIBUTTONENTRY_POS_END, NULL, NULL, NULL); ->>>>>>> remotes/origin/upstream wd->n_str = 0; } } @@ -1312,11 +1065,7 @@ _entry_focus_out_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __ str = elm_object_text_get(wd->entry); if (strlen(str)) -<<<<<<< HEAD - _add_button(data, str); -======= _add_button_item(data, str, MULTIBUTTONENTRY_POS_END, NULL, NULL, NULL); ->>>>>>> remotes/origin/upstream } static void @@ -1335,26 +1084,14 @@ static void _entry_resized_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Evas_Coord en_x, en_y, en_w, en_h; -<<<<<<< HEAD -======= - Evas_Coord bx_x, bx_y; ->>>>>>> remotes/origin/upstream Widget_Data *wd = elm_widget_data_get(data); if (!wd) return; evas_object_geometry_get(wd->entry, &en_x, &en_y, &en_w, &en_h); -<<<<<<< HEAD if (wd->focused) elm_widget_show_region_set(wd->entry, en_x, en_y, en_w, en_h, EINA_TRUE); -======= - evas_object_geometry_get(wd->box, &bx_x, &bx_y, NULL, NULL); - - if (wd->focused) - elm_widget_show_region_set(wd->box, en_x - bx_x, en_y - bx_y, en_w, - en_h, EINA_TRUE); ->>>>>>> remotes/origin/upstream } static void @@ -1366,11 +1103,7 @@ _view_init(Evas_Object *obj) if (!wd->box) { -<<<<<<< HEAD - wd->box = elm_box_add (obj); -======= wd->box = elm_box_add(obj); ->>>>>>> remotes/origin/upstream if (!wd->box) return; elm_widget_sub_object_add(obj, wd->box); elm_box_layout_set(wd->box, _box_layout_cb, NULL, NULL); @@ -1388,25 +1121,16 @@ _view_init(Evas_Object *obj) if (!wd->entry) { -<<<<<<< HEAD - wd->entry = elm_entry_add (obj); - if (!wd->entry) return; - elm_entry_scrollable_set(wd->entry, EINA_TRUE); -======= wd->entry = elm_entry_add(obj); if (!wd->entry) return; ->>>>>>> remotes/origin/upstream + elm_entry_scrollable_set(wd->entry, EINA_TRUE); elm_entry_single_line_set(wd->entry, EINA_TRUE); elm_object_text_set(wd->entry, ""); elm_entry_input_panel_enabled_set(wd->entry, EINA_FALSE); evas_object_size_hint_min_set(wd->entry, MIN_W_ENTRY, 0); evas_object_size_hint_weight_set(wd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(wd->entry, EVAS_HINT_FILL, EVAS_HINT_FILL); -<<<<<<< HEAD - if (wd->box) elm_box_pack_end (wd->box, wd->entry); -======= if (wd->box) elm_box_pack_end(wd->box, wd->entry); ->>>>>>> remotes/origin/upstream evas_object_show(wd->entry); wd->view_state = MULTIBUTTONENTRY_VIEW_ENTRY; } @@ -1418,11 +1142,7 @@ _view_init(Evas_Object *obj) end_type = edje_object_data_get(wd->base, "closed_button_type"); if (!end_type || !strcmp(end_type, "label")) { -<<<<<<< HEAD - wd->end = elm_label_add (obj); -======= wd->end = elm_label_add(obj); ->>>>>>> remotes/origin/upstream if (!wd->end) return; elm_object_style_set(wd->end, "extended/multibuttonentry_default"); wd->end_type = MULTIBUTTONENTRY_CLOSED_LABEL; @@ -1442,13 +1162,9 @@ _view_init(Evas_Object *obj) if (size_str) button_min_height = (Evas_Coord)atoi(size_str); wd->end_type = MULTIBUTTONENTRY_CLOSED_IMAGE; -<<<<<<< HEAD - evas_object_size_hint_min_set(wd->end, button_min_width * elm_scale_get(), button_min_height * elm_scale_get()); -======= evas_object_size_hint_min_set(wd->end, button_min_width * _elm_config->scale, button_min_height * _elm_config->scale); ->>>>>>> remotes/origin/upstream elm_widget_sub_object_add(obj, wd->end); } } @@ -1477,23 +1193,16 @@ _calculate_box_min_size(Evas_Object *box, Evas_Object_Box_Data *priv) if (wx) { -<<<<<<< HEAD if ((elm_widget_is(opt->obj)) && (!(strcmp(elm_widget_type_get(opt->obj), "entry"))) && (mnw == -1)) mnw = MIN_W_ENTRY; -======= ->>>>>>> remotes/origin/upstream if (mnw != -1 && (w - cw) >= mnw) ww = w - cw; else ww = w; } else -<<<<<<< HEAD - ww = mnw; -======= ww = mnw; ->>>>>>> remotes/origin/upstream if ((cw + mnw) > w) { @@ -1516,11 +1225,7 @@ _calculate_item_max_height(Evas_Object *box, Evas_Object_Box_Data *priv, int obj Evas_Coord mnw, mnh, cw = 0, cmaxh = 0, w, ww; const Eina_List *l; Evas_Object_Box_Option *opt; -<<<<<<< HEAD - int index = 0; -======= int local_index = 0; ->>>>>>> remotes/origin/upstream double wx; evas_object_geometry_get(box, NULL, NULL, &w, NULL); @@ -1532,23 +1237,10 @@ _calculate_item_max_height(Evas_Object *box, Evas_Object_Box_Data *priv, int obj if (wx) { -<<<<<<< HEAD if ((elm_widget_is(opt->obj)) && (!(strcmp(elm_widget_type_get(opt->obj), "entry"))) && (mnw == -1)) mnw = MIN_W_ENTRY; if (mnw != -1 && (w - cw) >= mnw) - ww = w - cw; - else - ww = w; - } - else - ww = mnw; - - if ((cw + ww) > w) - { - if (index > obj_index) return cmaxh; -======= - if (mnw != -1 && (w - cw) >= mnw) ww = w - cw; else ww = w; @@ -1559,7 +1251,6 @@ _calculate_item_max_height(Evas_Object *box, Evas_Object_Box_Data *priv, int obj if ((cw + ww) > w) { if (local_index > obj_index) return cmaxh; ->>>>>>> remotes/origin/upstream cw = 0; cmaxh = 0; } @@ -1567,11 +1258,7 @@ _calculate_item_max_height(Evas_Object *box, Evas_Object_Box_Data *priv, int obj cw += ww; if (cmaxh < mnh) cmaxh = mnh; -<<<<<<< HEAD - index++; -======= local_index++; ->>>>>>> remotes/origin/upstream } return cmaxh; @@ -1627,26 +1314,16 @@ _box_layout_cb(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__ if (wx) { -<<<<<<< HEAD if ((elm_widget_is(obj)) && (!(strcmp(elm_widget_type_get(obj), "entry"))) && (mnw == -1)) mnw = MIN_W_ENTRY; if (mnw != -1 && (w - cw) >= mnw) - ww = w - cw; - else - ww = w; - } - else - ww = mnw; -======= - if (mnw != -1 && (w - cw) >= mnw) ww = w - cw; else ww = w; } else ww = mnw; ->>>>>>> remotes/origin/upstream hh = _calculate_item_max_height(o, priv, obj_index); ow = mnw; @@ -1678,19 +1355,10 @@ _box_layout_cb(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__ static void _item_text_set_hook(Elm_Object_Item *it, const char *part, const char *label) { -<<<<<<< HEAD - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - - Elm_Multibuttonentry_Item *item; - if (part && strcmp(part, "default")) return; - if (!label) return; - item = (Elm_Multibuttonentry_Item *) it; -======= Elm_Multibuttonentry_Item *item; if (part && strcmp(part, "default")) return; if (!label) return; item = (Elm_Multibuttonentry_Item *)it; ->>>>>>> remotes/origin/upstream edje_object_part_text_set(item->button, "elm.btn.text", label); _resize_button(item->button, &item->rw, &item->vw); } @@ -1698,16 +1366,9 @@ _item_text_set_hook(Elm_Object_Item *it, const char *part, const char *label) static const char * _item_text_get_hook(const Elm_Object_Item *it, const char *part) { -<<<<<<< HEAD - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); - Elm_Multibuttonentry_Item *item; - if (part && strcmp(part, "default")) return NULL; - item = (Elm_Multibuttonentry_Item *) it; -======= Elm_Multibuttonentry_Item *item; if (part && strcmp(part, "default")) return NULL; item = (Elm_Multibuttonentry_Item *)it; ->>>>>>> remotes/origin/upstream return edje_object_part_text_get(item->button, "elm.btn.text"); } @@ -1715,11 +1376,6 @@ static void _text_set_hook(Evas_Object *obj, const char *part, const char *label) { ELM_CHECK_WIDTYPE(obj, widtype); -<<<<<<< HEAD - if (part && strcmp(part, "default")) return; - if (label) _set_label(obj, label); - else _set_label(obj, ""); -======= if (!part || !strcmp(part, "default")) { if (label) _set_label(obj, label); @@ -1730,20 +1386,12 @@ _text_set_hook(Evas_Object *obj, const char *part, const char *label) if (label) _set_guidetext(obj, label); else _set_guidetext(obj, ""); } ->>>>>>> remotes/origin/upstream } static const char * _text_get_hook(const Evas_Object *obj, const char *part) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; -<<<<<<< HEAD - Widget_Data *wd; - if (part && strcmp(part, "default")) return NULL; - wd = elm_widget_data_get(obj); - if (!wd) return NULL; - if (wd->label) return edje_object_part_text_get(wd->label, "mbe.label"); -======= Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return NULL; @@ -1755,7 +1403,6 @@ _text_get_hook(const Evas_Object *obj, const char *part) { return wd->guidetexttxt; } ->>>>>>> remotes/origin/upstream return NULL; } @@ -1790,11 +1437,7 @@ elm_multibuttonentry_add(Evas_Object *parent) wd->focused = EINA_FALSE; wd->last_btn_select = EINA_TRUE; wd->n_str = 0; -<<<<<<< HEAD - wd->rect_for_end= NULL; -======= wd->rect_for_end = NULL; ->>>>>>> remotes/origin/upstream wd->add_callback = NULL; wd->add_callback_data = NULL; @@ -1815,31 +1458,19 @@ elm_multibuttonentry_entry_get(const Evas_Object *obj) return wd->entry; } -<<<<<<< HEAD -EAPI const char * -======= EINA_DEPRECATED EAPI const char * ->>>>>>> remotes/origin/upstream elm_multibuttonentry_label_get(const Evas_Object *obj) { return _text_get_hook(obj, NULL); } -<<<<<<< HEAD -EAPI void -======= EINA_DEPRECATED EAPI void ->>>>>>> remotes/origin/upstream elm_multibuttonentry_label_set(Evas_Object *obj, const char *label) { _text_set_hook(obj, NULL, label); } -<<<<<<< HEAD -EAPI const char * -======= EINA_DEPRECATED EAPI const char * ->>>>>>> remotes/origin/upstream elm_multibuttonentry_guide_text_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; @@ -1850,28 +1481,13 @@ elm_multibuttonentry_guide_text_get(const Evas_Object *obj) return NULL; } -<<<<<<< HEAD -EAPI void -======= EINA_DEPRECATED EAPI void ->>>>>>> remotes/origin/upstream elm_multibuttonentry_guide_text_set(Evas_Object *obj, const char *guidetext) { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return; -<<<<<<< HEAD - if (guidetext) - _set_guidetext(obj, guidetext); - else - _set_guidetext(obj, ""); -} - -EAPI int -elm_multibuttonentry_shrink_mode_get(const Evas_Object *obj) -{ -======= _set_guidetext(obj, guidetext); } @@ -1888,19 +1504,10 @@ elm_multibuttonentry_shrink_mode_get(const Evas_Object *obj) EAPI Eina_Bool elm_multibuttonentry_expanded_get(const Evas_Object *obj) { ->>>>>>> remotes/origin/upstream ELM_CHECK_WIDTYPE(obj, widtype) -1; Widget_Data *wd = elm_widget_data_get(obj); if (!wd) return -1; -<<<<<<< HEAD - return wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK ? 1 : 0; -} - -EAPI void -elm_multibuttonentry_shrink_mode_set(Evas_Object *obj, int shrink) -{ -======= return (wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK ? EINA_FALSE : EINA_TRUE); } @@ -1918,57 +1525,10 @@ elm_multibuttonentry_shrink_mode_set(Evas_Object *obj, int shrink) EAPI void elm_multibuttonentry_expanded_set(Evas_Object *obj, Eina_Bool expanded) { ->>>>>>> remotes/origin/upstream ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); if (!wd || !wd->box || -<<<<<<< HEAD - ((wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) ? 1 : 0) == shrink) return; - _shrink_mode_set(obj, shrink); -} - -EAPI Elm_Object_Item * -elm_multibuttonentry_item_prepend(Evas_Object *obj, const char *label, void *data) -{ - ELM_CHECK_WIDTYPE(obj, widtype) NULL; - Elm_Multibuttonentry_Item *item; - if (!label) return NULL; - item = _add_button_item(obj, label, MULTIBUTTONENTRY_POS_START, NULL, data); - return (Elm_Object_Item *) item; -} - -EAPI Elm_Object_Item * -elm_multibuttonentry_item_append(Evas_Object *obj, const char *label, void *data) -{ - ELM_CHECK_WIDTYPE(obj, widtype) NULL; - Elm_Multibuttonentry_Item *item; - if (!label) return NULL; - item = _add_button_item(obj, label, MULTIBUTTONENTRY_POS_END, NULL, data); - return (Elm_Object_Item *) item; -} - -EAPI Elm_Object_Item * -elm_multibuttonentry_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, void *data) -{ - ELM_CHECK_WIDTYPE(obj, widtype) NULL; - Elm_Multibuttonentry_Item *item; - if (!label) return NULL; - item = _add_button_item(obj, label, MULTIBUTTONENTRY_POS_BEFORE, - (Elm_Multibuttonentry_Item *) before, data); - return (Elm_Object_Item *) item; -} - -EAPI Elm_Object_Item * -elm_multibuttonentry_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, void *data) -{ - ELM_CHECK_WIDTYPE(obj, widtype) NULL; - Elm_Multibuttonentry_Item *item; - if (!label) return NULL; - item = _add_button_item(obj, label, MULTIBUTTONENTRY_POS_AFTER, - (Elm_Multibuttonentry_Item *) after, data); - return (Elm_Object_Item *) item; -======= ((wd->view_state == MULTIBUTTONENTRY_VIEW_SHRINK) ? EINA_FALSE : EINA_TRUE) == expanded) return; if (expanded) @@ -2000,7 +1560,6 @@ EAPI Elm_Object_Item * elm_multibuttonentry_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, Evas_Smart_Cb func, void *data) { return _add_button_item(obj, label, MULTIBUTTONENTRY_POS_AFTER, after, func, data); ->>>>>>> remotes/origin/upstream } EAPI const Eina_List * @@ -2040,37 +1599,20 @@ elm_multibuttonentry_selected_item_get(const Evas_Object *obj) } EAPI void -<<<<<<< HEAD -elm_multibuttonentry_item_select(Elm_Object_Item *it, Eina_Bool selected) -{ - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); - Elm_Multibuttonentry_Item *item = (Elm_Multibuttonentry_Item *) it; -======= elm_multibuttonentry_item_selected_set(Elm_Object_Item *it, Eina_Bool selected) { ELM_OBJ_ITEM_CHECK_OR_RETURN(it); Elm_Multibuttonentry_Item *item = (Elm_Multibuttonentry_Item *)it; ->>>>>>> remotes/origin/upstream if (selected) _select_button(WIDGET(item), item->button); else _select_button(WIDGET(item), NULL); } -<<<<<<< HEAD -EAPI void -elm_multibuttonentry_item_unselect_all(Evas_Object *obj) -{ - ELM_CHECK_WIDTYPE(obj, widtype); - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return; - _select_button(obj, NULL); -======= EAPI Eina_Bool elm_multibuttonentry_item_selected_get(const Elm_Object_Item *it) { //TODO : To be implemented. if (!it) return EINA_FALSE; return EINA_TRUE; ->>>>>>> remotes/origin/upstream } EAPI void @@ -2126,11 +1668,7 @@ elm_multibuttonentry_item_prev_get(const Elm_Object_Item *it) EINA_LIST_FOREACH(wd->items, l, _item) { -<<<<<<< HEAD - if (_item == (Elm_Multibuttonentry_Item *) it) -======= if (_item == (Elm_Multibuttonentry_Item *)it) ->>>>>>> remotes/origin/upstream { l = eina_list_prev(l); if (!l) return NULL; @@ -2152,11 +1690,7 @@ elm_multibuttonentry_item_next_get(const Elm_Object_Item *it) EINA_LIST_FOREACH(wd->items, l, _item) { -<<<<<<< HEAD - if (_item == (Elm_Multibuttonentry_Item *) it) -======= if (_item == (Elm_Multibuttonentry_Item *)it) ->>>>>>> remotes/origin/upstream { l = eina_list_next(l); if (!l) return NULL; @@ -2169,29 +1703,17 @@ elm_multibuttonentry_item_next_get(const Elm_Object_Item *it) EAPI void * elm_multibuttonentry_item_data_get(const Elm_Object_Item *it) { -<<<<<<< HEAD - ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); -======= ->>>>>>> remotes/origin/upstream return elm_widget_item_data_get(it); } EAPI void elm_multibuttonentry_item_data_set(Elm_Object_Item *it, void *data) { -<<<<<<< HEAD - ELM_OBJ_ITEM_CHECK_OR_RETURN(it); -======= ->>>>>>> remotes/origin/upstream return elm_widget_item_data_set(it, data); } EAPI void -<<<<<<< HEAD -elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data) -======= elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data) ->>>>>>> remotes/origin/upstream { Elm_Multibuttonentry_Item_Filter *new_item_filter = NULL; Elm_Multibuttonentry_Item_Filter *_item_filter = NULL; @@ -2208,11 +1730,7 @@ elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_I EINA_LIST_FOREACH(wd->filter_list, l, _item_filter) { -<<<<<<< HEAD - if ( _item_filter && ((_item_filter->callback_func == func) && (_item_filter->data == data))) -======= if (_item_filter && ((_item_filter->callback_func == func) && (_item_filter->data == data))) ->>>>>>> remotes/origin/upstream { printf("Already Registered this item filter!!!!\n"); return; @@ -2222,11 +1740,7 @@ elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_I } EAPI void -<<<<<<< HEAD -elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data) -======= elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data) ->>>>>>> remotes/origin/upstream { Elm_Multibuttonentry_Item_Filter *new_item_filter = NULL; Elm_Multibuttonentry_Item_Filter *_item_filter = NULL; @@ -2252,11 +1766,7 @@ elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_ } EAPI void -<<<<<<< HEAD -elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data) -======= elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data) ->>>>>>> remotes/origin/upstream { Widget_Data *wd; Eina_List *l; @@ -2276,22 +1786,3 @@ elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_I } } } -<<<<<<< HEAD - -EAPI void -elm_multibuttonentry_view_mode(Evas_Object *obj, Eina_Bool view_mode) -{ - ELM_CHECK_WIDTYPE(obj, widtype); - Widget_Data *wd = elm_widget_data_get(obj); - wd->view_mode = view_mode; - - if (view_mode) - { - elm_box_unpack(wd->box, wd->entry); - evas_object_hide(wd->entry); - } - else - _view_update(obj); -} -======= ->>>>>>> remotes/origin/upstream diff --git a/src/lib/elc_multibuttonentry.h b/src/lib/elc_multibuttonentry.h index ccb3df4..d34dea4 100644 --- a/src/lib/elc_multibuttonentry.h +++ b/src/lib/elc_multibuttonentry.h @@ -1,19 +1,6 @@ /** * @defgroup Multibuttonentry Multibuttonentry * -<<<<<<< HEAD - * A Multibuttonentry is a widget to allow a user enter text and manage it as a number of buttons - * Each text button is inserted by pressing the "return" key. If there is no space in the current row, - * a new button is added to the next row. When a text button is pressed, it will become focused. - * Backspace removes the focus. - * When the Multibuttonentry loses focus items longer than 1 lines are shrunk to one line. - * - * Smart callbacks one can register: - * - @c "item,selected" - when item is selected. May be called on backspace key. - * - @c "item,added" - when a new multibuttonentry item is added. - * - @c "item,deleted" - when a multibuttonentry item is deleted. - * - @c "item,clicked" - selected item of multibuttonentry is clicked. -======= * A Multibuttonentry is a widget to allow a user enter text and manage it as a number * of buttons. Each text button is inserted by pressing the "return" key. * If there is no space in the current row, a new button is added to the next row. @@ -33,21 +20,13 @@ * - @c "item,deleted" - when a multibuttonentry item is deleted. * - @c "item,clicked" - this is called when an item is clicked by user * interaction. Both "item,selected" and "item,clicked" are needed. ->>>>>>> remotes/origin/upstream * - @c "clicked" - when multibuttonentry is clicked. * - @c "focused" - when multibuttonentry is focused. * - @c "unfocused" - when multibuttonentry is unfocused. * - @c "expanded" - when multibuttonentry is expanded. -<<<<<<< HEAD - * - @c "shrank" - when multibuttonentry is shrank. - * - @c "shrank,state,changed" - when shrink mode state of multibuttonentry is - * changed. - * -======= * - @c "contracted" - when multibuttonentry is contracted. * - @c "expand,state,changed" - when shrink mode state of multibuttonentry is changed. * ->>>>>>> remotes/origin/upstream * Default text parts of the multibuttonentry widget that you can use for are: * @li "default" - A label of the multibuttonentry * @@ -70,9 +49,6 @@ * @{ */ -<<<<<<< HEAD -typedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_callback)(Evas_Object *obj, const char *item_label, void *item_data, void *data); -======= /** * @brief Callback to be invoked when an item is added to the multibuttonentry. * @@ -87,7 +63,6 @@ typedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_callback) * @ingroup Multibuttonentry */ typedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_Cb)(Evas_Object *obj, const char *item_label, void *item_data, void *data); ->>>>>>> remotes/origin/upstream /** * @brief Add a new multibuttonentry to the parent @@ -95,11 +70,8 @@ typedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_Cb)(Evas_ * @param parent The parent object * @return The new object or NULL if it cannot be created * -<<<<<<< HEAD -======= * * @ingroup Multibuttonentry ->>>>>>> remotes/origin/upstream */ EAPI Evas_Object *elm_multibuttonentry_add(Evas_Object *parent); @@ -110,50 +82,11 @@ EAPI Evas_Object *elm_multibuttonentry_add(Evas_Object *parent); * @param obj The multibuttonentry object * @return The entry object, or NULL if none * -<<<<<<< HEAD -======= * @ingroup Multibuttonentry ->>>>>>> remotes/origin/upstream */ EAPI Evas_Object *elm_multibuttonentry_entry_get(const Evas_Object *obj); /** -<<<<<<< HEAD - * Get the guide text - * - * @param obj The multibuttonentry object - * @return The guide text, or NULL if none - * - */ -EAPI const char *elm_multibuttonentry_guide_text_get(const Evas_Object *obj); - -/** - * Set the guide text - * - * @param obj The multibuttonentry object - * @param guidetext The guide text string - * - */ -EAPI void elm_multibuttonentry_guide_text_set(Evas_Object *obj, const char *guidetext); - -/** - * Get the value of shrink_mode state. - * - * @param obj The multibuttonentry object - * @return the value of shrink mode state. - * - */ -EAPI int elm_multibuttonentry_shrink_mode_get(const Evas_Object *obj); - -/** - * Set/Unset the multibuttonentry to shrink mode state of single line - * - * @param obj The multibuttonentry object - * @param shrink the value of shrink_mode state. set this to 1 to set the multibuttonentry to shrink state of single line. set this to 0 to unset the contracted state. - * - */ -EAPI void elm_multibuttonentry_shrink_mode_set(Evas_Object *obj, int shrink); -======= * Get the value of expanded state. * In expanded state, the complete entry will be displayed. * Otherwise, only single line of the entry will be displayed. @@ -178,20 +111,12 @@ EAPI Eina_Bool elm_multibuttonentry_expanded_get(const Evas_Obj * @ingroup Multibuttonentry */ EAPI void elm_multibuttonentry_expanded_set(Evas_Object *obj, Eina_Bool expanded); ->>>>>>> remotes/origin/upstream /** * Prepend a new item to the multibuttonentry * * @param obj The multibuttonentry object * @param label The label of new item -<<<<<<< HEAD - * @param data The ponter to the data to be attached - * @return A handle to the item added or NULL if not possible - * - */ -EAPI Elm_Object_Item *elm_multibuttonentry_item_prepend(Evas_Object *obj, const char *label, void *data); -======= * @param func The callback function to be invoked when this item is pressed. * @param data The pointer to the data to be attached * @return A handle to the item added or NULL if not possible @@ -201,20 +126,12 @@ EAPI Elm_Object_Item *elm_multibuttonentry_item_prepend(Evas_Object *obj, const * @ingroup Multibuttonentry */ EAPI Elm_Object_Item *elm_multibuttonentry_item_prepend(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data); ->>>>>>> remotes/origin/upstream /** * Append a new item to the multibuttonentry * * @param obj The multibuttonentry object * @param label The label of new item -<<<<<<< HEAD - * @param data The ponter to the data to be attached - * @return A handle to the item added or NULL if not possible - * - */ -EAPI Elm_Object_Item *elm_multibuttonentry_item_append(Evas_Object *obj, const char *label, void *data); -======= * @param func The callback function to be invoked when this item is pressed. * @param data The pointer to the data to be attached * @return A handle to the item added or NULL if not possible @@ -224,7 +141,6 @@ EAPI Elm_Object_Item *elm_multibuttonentry_item_append(Evas_Object *obj, const c * @ingroup Multibuttonentry */ EAPI Elm_Object_Item *elm_multibuttonentry_item_append(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data); ->>>>>>> remotes/origin/upstream /** * Add a new item to the multibuttonentry before the indicated object @@ -233,13 +149,6 @@ EAPI Elm_Object_Item *elm_multibuttonentry_item_append(Evas_Object *obj, const c * @param obj The multibuttonentry object * @param before The item before which to add it * @param label The label of new item -<<<<<<< HEAD - * @param data The ponter to the data to be attached - * @return A handle to the item added or NULL if not possible - * - */ -EAPI Elm_Object_Item *elm_multibuttonentry_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, void *data); -======= * @param func The callback function to be invoked when this item is pressed. * @param data The pointer to the data to be attached * @return A handle to the item added or NULL if not possible @@ -249,7 +158,6 @@ EAPI Elm_Object_Item *elm_multibuttonentry_item_insert_before(Evas_Object *obj, * @ingroup Multibuttonentry */ EAPI Elm_Object_Item *elm_multibuttonentry_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, Evas_Smart_Cb func, void *data); ->>>>>>> remotes/origin/upstream /** * Add a new item to the multibuttonentry after the indicated object @@ -257,13 +165,6 @@ EAPI Elm_Object_Item *elm_multibuttonentry_item_insert_before(Evas_Object *obj, * @param obj The multibuttonentry object * @param after The item after which to add it * @param label The label of new item -<<<<<<< HEAD - * @param data The ponter to the data to be attached - * @return A handle to the item added or NULL if not possible - * - */ -EAPI Elm_Object_Item *elm_multibuttonentry_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, void *data); -======= * @param func The callback function to be invoked when this item is pressed. * @param data The pointer to the data to be attached * @return A handle to the item added or NULL if not possible @@ -273,7 +174,6 @@ EAPI Elm_Object_Item *elm_multibuttonentry_item_insert_after(Evas_Object *obj, E * @ingroup Multibuttonentry */ EAPI Elm_Object_Item *elm_multibuttonentry_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, Evas_Smart_Cb func, void *data); ->>>>>>> remotes/origin/upstream /** * Get a list of items in the multibuttonentry @@ -281,10 +181,7 @@ EAPI Elm_Object_Item *elm_multibuttonentry_item_insert_after(Evas_Object *obj, E * @param obj The multibuttonentry object * @return The list of items, or NULL if none * -<<<<<<< HEAD -======= * @ingroup Multibuttonentry ->>>>>>> remotes/origin/upstream */ EAPI const Eina_List *elm_multibuttonentry_items_get(const Evas_Object *obj); @@ -294,10 +191,7 @@ EAPI const Eina_List *elm_multibuttonentry_items_get(const Evas_Object * @param obj The multibuttonentry object * @return The first item, or NULL if none * -<<<<<<< HEAD -======= * @ingroup Multibuttonentry ->>>>>>> remotes/origin/upstream */ EAPI Elm_Object_Item *elm_multibuttonentry_first_item_get(const Evas_Object *obj); @@ -307,10 +201,7 @@ EAPI Elm_Object_Item *elm_multibuttonentry_first_item_get(const Evas_Object *obj * @param obj The multibuttonentry object * @return The last item, or NULL if none * -<<<<<<< HEAD -======= * @ingroup Multibuttonentry ->>>>>>> remotes/origin/upstream */ EAPI Elm_Object_Item *elm_multibuttonentry_last_item_get(const Evas_Object *obj); @@ -320,10 +211,7 @@ EAPI Elm_Object_Item *elm_multibuttonentry_last_item_get(const Evas_Object *obj) * @param obj The multibuttonentry object * @return The selected item, or NULL if none * -<<<<<<< HEAD -======= * @ingroup Multibuttonentry ->>>>>>> remotes/origin/upstream */ EAPI Elm_Object_Item *elm_multibuttonentry_selected_item_get(const Evas_Object *obj); @@ -333,18 +221,6 @@ EAPI Elm_Object_Item *elm_multibuttonentry_selected_item_get(const Evas_Object * * @param it The item * @param selected if it's EINA_TRUE, select the item otherwise, unselect the item * -<<<<<<< HEAD - */ -EAPI void elm_multibuttonentry_item_select(Elm_Object_Item *it, Eina_Bool selected); - -/** - * unselect all items. - * - * @param obj The multibuttonentry object - * - */ -EAPI void elm_multibuttonentry_item_unselect_all(Evas_Object *obj); -======= * @ingroup Multibuttonentry */ EAPI void elm_multibuttonentry_item_selected_set(Elm_Object_Item *it, Eina_Bool selected); @@ -359,17 +235,13 @@ EAPI void elm_multibuttonentry_item_selected_set(Elm_Objec * @ingroup Multibuttonentry */ EAPI Eina_Bool elm_multibuttonentry_item_selected_get(const Elm_Object_Item *it); ->>>>>>> remotes/origin/upstream /** * Remove all items in the multibuttonentry. * * @param obj The multibuttonentry object * -<<<<<<< HEAD -======= * @ingroup Multibuttonentry ->>>>>>> remotes/origin/upstream */ EAPI void elm_multibuttonentry_clear(Evas_Object *obj); @@ -379,10 +251,7 @@ EAPI void elm_multibuttonentry_clear(Evas_Object *obj); * @param it The item * @return The item before the item @p it * -<<<<<<< HEAD -======= * @ingroup Multibuttonentry ->>>>>>> remotes/origin/upstream */ EAPI Elm_Object_Item *elm_multibuttonentry_item_prev_get(const Elm_Object_Item *it); @@ -392,19 +261,12 @@ EAPI Elm_Object_Item *elm_multibuttonentry_item_prev_get(const Elm_Object_Item * * @param it The item * @return The item after the item @p it * -<<<<<<< HEAD -======= * @ingroup Multibuttonentry ->>>>>>> remotes/origin/upstream */ EAPI Elm_Object_Item *elm_multibuttonentry_item_next_get(const Elm_Object_Item *it); /** -<<<<<<< HEAD - * Append a item filter function for text inserted in the Multibuttonentry -======= * Append an item filter function for text inserted in the Multibuttonentry ->>>>>>> remotes/origin/upstream * * Append the given callback to the list. This functions will be called * whenever any text is inserted into the Multibuttonentry, with the text to be inserted @@ -414,17 +276,6 @@ EAPI Elm_Object_Item *elm_multibuttonentry_item_next_get(const Elm_Object_Item * * parameter to NULL. This will also prevent any following filters from being * called. * -<<<<<<< HEAD - * @param obj The multibuttonentryentry object - * @param func The function to use as item filter - * @param data User data to pass to @p func - * - */ -EAPI void elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data); - -/** - * Prepend a filter function for text inserted in the Multibuttentry -======= * @param obj The multibuttonentry object * @param func The function to use as item filter * @param data User data to pass to @p func @@ -435,7 +286,6 @@ EAPI void elm_multibuttonentry_item_filter_append(Evas_Obj /** * Prepend a filter function for text inserted in the Multibuttonentry ->>>>>>> remotes/origin/upstream * * Prepend the given callback to the list. See elm_multibuttonentry_item_filter_append() * for more information @@ -444,14 +294,9 @@ EAPI void elm_multibuttonentry_item_filter_append(Evas_Obj * @param func The function to use as text filter * @param data User data to pass to @p func * -<<<<<<< HEAD - */ -EAPI void elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data); -======= * @ingroup Multibuttonentry */ EAPI void elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); ->>>>>>> remotes/origin/upstream /** * Remove a filter from the list @@ -463,16 +308,9 @@ EAPI void elm_multibuttonentry_item_filter_prepend(Evas_Ob * @param func The filter function to remove * @param data The user data passed when adding the function * -<<<<<<< HEAD - */ -EAPI void elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data); - -EAPI void elm_multibuttonentry_view_mode(Evas_Object *obj, Eina_Bool view_mode); -======= * @ingroup Multibuttonentry */ EAPI void elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_Cb func, void *data); ->>>>>>> remotes/origin/upstream /** * @} -- 2.7.4