Revert Efl.Ui.Multibuttonentry to create new one.

Summary:
Revert e02b2f04c2945ad60fab5612af1e02b0838b7ff5.

I couldnt make a revert commit for many commit has been related with above commit.

I will create a new MBE eo class ASAP. (https://phab.enlightenment.org/T5358)

Reviewers: cedric, woohyun, Jaehyun_Cho, SanghyeonLee, herb

Reviewed By: Jaehyun_Cho

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5954
This commit is contained in:
Woochan Lee 2018-04-19 22:20:29 +09:00 committed by Jaehyun Cho
parent a2ccdb7b21
commit 939690a8a9
10 changed files with 248 additions and 394 deletions

View File

@ -97,7 +97,7 @@ src/lib/elementary/elc_fileselector.c
src/lib/elementary/elc_fileselector_button.c
src/lib/elementary/elc_fileselector_entry.c
src/lib/elementary/elc_hoversel.c
src/lib/elementary/efl_ui_multibuttonentry.c
src/lib/elementary/elc_multibuttonentry.c
src/lib/elementary/elc_naviframe.c
src/lib/elementary/elc_player.c
src/lib/elementary/elc_popup.c

View File

@ -14,7 +14,6 @@ elm_public_eolian_files = \
lib/elementary/efl_ui_image.eo \
lib/elementary/efl_ui_image_zoomable.eo \
lib/elementary/efl_ui_layout.eo \
lib/elementary/efl_ui_multibuttonentry.eo \
lib/elementary/efl_ui_nstate.eo \
lib/elementary/efl_ui_panes.eo \
lib/elementary/efl_ui_progressbar.eo \
@ -75,7 +74,6 @@ elm_public_eolian_files = \
lib/elementary/efl_ui_view_list_pan.eo \
lib/elementary/efl_ui_view_list_segarray.eo \
lib/elementary/efl_ui_view_list_relayout.eo \
lib/elementary/efl_ui_multibuttonentry_part.eo \
lib/elementary/efl_ui_panes_part.eo \
lib/elementary/efl_ui_progressbar_part.eo \
lib/elementary/efl_ui_slider_part_indicator.eo \
@ -150,7 +148,6 @@ elm_legacy_eolian_files = \
lib/elementary/efl_ui_slider_legacy.eo \
lib/elementary/efl_ui_panes_legacy.eo \
lib/elementary/efl_ui_image_zoomable_legacy.eo \
lib/elementary/efl_ui_multibuttonentry_legacy.eo \
lib/elementary/efl_ui_flip_legacy.eo \
lib/elementary/efl_ui_win_legacy.eo \
lib/elementary/efl_ui_image_legacy.eo \
@ -182,6 +179,7 @@ elm_legacy_eolian_files = \
lib/elementary/elm_map.eo \
lib/elementary/elm_map_pan.eo \
lib/elementary/elm_menu.eo \
lib/elementary/elm_multibuttonentry.eo \
lib/elementary/elm_notify.eo \
lib/elementary/elm_panel.eo \
lib/elementary/elm_player.eo \
@ -197,6 +195,7 @@ elm_legacy_eolian_files = \
lib/elementary/elm_dayselector_item.eo \
lib/elementary/elm_flipselector_item.eo \
lib/elementary/elm_menu_item.eo \
lib/elementary/elm_multibuttonentry_part.eo \
lib/elementary/elm_ctxpopup_item.eo \
lib/elementary/elm_index_item.eo \
lib/elementary/elm_widget_item_static_focus.eo \
@ -348,7 +347,7 @@ includesunstable_HEADERS = \
lib/elementary/elm_widget_map.h \
lib/elementary/elm_widget_mapbuf.h \
lib/elementary/elm_widget_menu.h \
lib/elementary/efl_ui_multibuttonentry_private.h \
lib/elementary/elm_widget_multibuttonentry.h \
lib/elementary/elm_widget_naviframe.h \
lib/elementary/elm_widget_notify.h \
lib/elementary/elm_widget_panel.h \
@ -389,7 +388,6 @@ includesunstable_HEADERS = \
lib/elementary/elm_code_file.h \
lib/elementary/elm_code_parse.h \
lib/elementary/elm_code_syntax.h \
lib/elementary/efl_ui_multibuttonentry.h \
lib/elementary/efl_ui_widget_scroller.h \
lib/elementary/efl_ui_widget_scroll_manager.h \
lib/elementary/efl_ui_widget_pan.h \
@ -416,7 +414,6 @@ includesub_HEADERS = \
lib/elementary/elc_hoversel.h \
lib/elementary/elc_hoversel_legacy.h \
lib/elementary/elc_multibuttonentry.h \
lib/elementary/efl_ui_multibuttonentry_eo.h \
lib/elementary/elc_multibuttonentry_legacy.h \
lib/elementary/elc_multibuttonentry_common.h \
lib/elementary/elc_naviframe.h \
@ -624,7 +621,7 @@ lib_elementary_libelementary_la_SOURCES = \
lib/elementary/elc_fileselector_button.c \
lib/elementary/elc_fileselector_entry.c \
lib/elementary/elc_hoversel.c \
lib/elementary/efl_ui_multibuttonentry.c \
lib/elementary/elc_multibuttonentry.c \
lib/elementary/elc_naviframe.c \
lib/elementary/elc_player.c \
lib/elementary/elc_popup.c \

View File

@ -3,7 +3,7 @@
#endif
#include <Elementary.h>
#define MAX_NUM_OF_CONTENT 19
#define MAX_NUM_OF_CONTENT 18
const Efl_Class *content_class[MAX_NUM_OF_CONTENT];
@ -126,22 +126,21 @@ test_part_background(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
content_class[0] = EFL_UI_CALENDAR_CLASS;
content_class[1] = EFL_UI_SLIDER_CLASS;
content_class[2] = EFL_UI_SLIDER_INTERVAL_CLASS;
content_class[3] = EFL_UI_MULTIBUTTONENTRY_CLASS;
content_class[4] = EFL_UI_PROGRESSBAR_CLASS;
content_class[5] = EFL_UI_CLOCK_CLASS;
content_class[6] = EFL_UI_BUTTON_CLASS;
content_class[7] = EFL_UI_CHECK_CLASS;
content_class[8] = EFL_UI_RADIO_CLASS;
content_class[9] = EFL_UI_TEXT_CLASS;
content_class[10] = EFL_UI_FLIP_CLASS;
content_class[11] = EFL_UI_PANES_CLASS;
content_class[12] = EFL_UI_VIDEO_CLASS;
content_class[13] = EFL_UI_BG_WIDGET_CLASS;
content_class[14] = EFL_UI_IMAGE_CLASS;
content_class[15] = EFL_UI_IMAGE_ZOOMABLE_CLASS;
content_class[16] = EFL_UI_NSTATE_CLASS;
content_class[17] = EFL_UI_SPIN_CLASS;
content_class[18] = EFL_UI_SPIN_BUTTON_CLASS;
content_class[3] = EFL_UI_PROGRESSBAR_CLASS;
content_class[4] = EFL_UI_CLOCK_CLASS;
content_class[5] = EFL_UI_BUTTON_CLASS;
content_class[6] = EFL_UI_CHECK_CLASS;
content_class[7] = EFL_UI_RADIO_CLASS;
content_class[8] = EFL_UI_TEXT_CLASS;
content_class[9] = EFL_UI_FLIP_CLASS;
content_class[10] = EFL_UI_PANES_CLASS;
content_class[11] = EFL_UI_VIDEO_CLASS;
content_class[12] = EFL_UI_BG_WIDGET_CLASS;
content_class[13] = EFL_UI_IMAGE_CLASS;
content_class[14] = EFL_UI_IMAGE_ZOOMABLE_CLASS;
content_class[15] = EFL_UI_NSTATE_CLASS;
content_class[16] = EFL_UI_SPIN_CLASS;
content_class[17] = EFL_UI_SPIN_BUTTON_CLASS;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_text_set(efl_added, "Widget Part Background"),

View File

@ -1,68 +0,0 @@
/**
* @defgroup efl_ui_multibuttonentry
* @ingroup Elementary
*
* @image html multibuttonentry_inheritance_tree.png
* @image latex multibuttonentry_inheritance_tree.eps
*
* A multi-button entry is a widget letting an user enter text and
* each chunk of text managed as a set 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 multi-button entry loses focus, items longer than
* one line are shrunk to one line.
*
* The typical use case of multi-button entry is composing
* emails/messages to a group of addresses, each of which is an item
* that can be clicked for further actions.
*
* This widget inherits from the @ref Layout one, so that all the
* functions acting on it also work for multi-button entry objects (since 1.8).
*
* This widget emits the following signals, besides the ones sent from
* @ref Layout:
* - @c "item,selected" - this is called when an item is selected by
* api, user interaction, and etc. this is also called when a
* user press back space while cursor is on the first field of
* entry.
* - @c "item,added" - when a new multi-button entry item is added.
* - @c "item,deleted" - when a multi-button entry 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.
* - @c "item,longpressed" - when multi-button entry item is pressed for a long time.
* - @c "clicked" - when multi-button entry is clicked.
* - @c "focused" - when multi-button entry is focused.
* - @c "unfocused" - when multi-button entry is unfocused.
* - @c "expanded" - when multi-button entry is expanded.
* - @c "contracted" - when multi-button entry is contracted.
* - @c "expand,state,changed" - when shrink mode state of
* multi-button entry is changed.
*
* Default text parts of the multi-button entry widget that you can use are:
* @li "default" - A label of the multi-button entry
*
* Default text parts of multi-button entry @b items that you can use are:
* @li "default" - A label of the multi-button entry item
*
* Supported elm_object_item common APIs.
* @li @ref elm_object_item_del
* @li @ref elm_object_item_part_text_set
* @li @ref elm_object_item_part_text_get
*/
/**
* @addtogroup Multibuttonentry
* @{
*/
#ifdef EFL_EO_API_SUPPORT
#include "efl_ui_multibuttonentry_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elc_multibuttonentry_legacy.h"
#endif
/**
* @}
*/

View File

@ -59,7 +59,7 @@
#include "elc_multibuttonentry_common.h"
#ifdef EFL_EO_API_SUPPORT
#include "efl_ui_multibuttonentry_eo.h"
#include "elc_multibuttonentry_eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elc_multibuttonentry_legacy.h"

View File

@ -1,2 +1,2 @@
#include "elm_multibuttonentry_item.eo.h"
#include "efl_ui_multibuttonentry.eo.h"
#include "elm_multibuttonentry.eo.h"

View File

@ -1,10 +1,12 @@
type Elm_Multibuttonentry_Item_Filter_Cb: __undefined_type; [[Elementary multibuttonentry item filter callback type]]
type Efl_Ui_Multibuttonentry_Format_Cb: __undefined_type; [[Elementary multibuttonentry format callback type]]
type Elm_Multibuttonentry_Format_Cb: __undefined_type; [[Elementary multibuttonentry format callback type]]
class Efl.Ui.Multibuttonentry (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Ui.Format)
class Elm.Multibuttonentry (Efl.Ui.Layout, Efl.Ui.Clickable)
{
[[Elementary multibuttonentry class]]
legacy_prefix: elm_multibuttonentry;
eo_prefix: elm_obj_multibuttonentry;
event_prefix: elm_multibuttonentry;
methods {
@property editable {
[[Control if the multibuttonentry is to be editable or not.
@ -29,7 +31,21 @@ class Efl.Ui.Multibuttonentry (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Ui.Format)
}
values {
expanded: bool; [[The value of expanded state. Set this to $true for expanded state. Set
this to $false for single line state.]]
this to $false for single line state.]]
}
}
@property format_function {
set {
[[Set a function to format the string that will be used to display the hidden items counter.
If $format_function is $NULL, the default format will be used,
which is $"... + %d".
@since 1.9]]
}
values {
format_function: Elm_Multibuttonentry_Format_Cb @nullable; [[Format_function The actual format function]]
data: const(void_ptr) @optional; [[Data User data to passed to $format_function]]
}
}
@property items {
@ -162,13 +178,12 @@ class Efl.Ui.Multibuttonentry (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Ui.Format)
implements {
class.constructor;
Efl.Object.constructor;
Efl.Ui.Widget.theme_apply;
Efl.Ui.Widget.on_access_update;
Efl.Ui.Translatable.translation_update;
Efl.Ui.Widget.widget_event;
Efl.Access.access_children { get; }
Efl.Ui.Widget.theme_apply;
Efl.Ui.Widget.on_access_update;
Efl.Ui.Translatable.translation_update;
Efl.Ui.Widget.widget_event;
Efl.Access.access_children { get; }
Efl.Part.part;
Efl.Ui.Format.format_cb { set; }
}
events {
item,selected; [[Called when item was selected]]

View File

@ -1,4 +1,4 @@
class Efl.Ui.Multibuttonentry.Part (Efl.Ui.Layout.Part_Text)
class Elm.Multibuttonentry.Part (Efl.Ui.Layout.Part_Legacy)
{
[[Elementary multibuttonentry internal part class]]
data: null;

View File

@ -70,9 +70,9 @@ typedef struct _Elm_Multibuttonentry_Item_Filter
void *data;
} Elm_Multibuttonentry_Item_Filter;
typedef struct _Efl_Ui_Multibuttonentry_Data
Efl_Ui_Multibuttonentry_Data;
struct _Efl_Ui_Multibuttonentry_Data
typedef struct _Elm_Multibuttonentry_Data
Elm_Multibuttonentry_Data;
struct _Elm_Multibuttonentry_Data
{
Evas_Object *parent;
Evas_Object *box;
@ -88,6 +88,9 @@ struct _Efl_Ui_Multibuttonentry_Data
Elm_Multibuttonentry_Item_Data *selected_it; /* selected item */
Elm_Multibuttonentry_Item_Data *focused_it;
Elm_Multibuttonentry_Format_Cb format_func;
const void *format_func_data;
const char *label_str, *guide_text_str;
int n_str;
@ -107,7 +110,7 @@ struct _Efl_Ui_Multibuttonentry_Data
Eina_Bool last_it_select : 1;
Eina_Bool editable : 1;
Eina_Bool focused : 1;
Eina_Bool focused : 1; // avoids infinite loop on focus in/out
Eina_Bool label_packed : 1;
};
@ -115,11 +118,11 @@ struct _Efl_Ui_Multibuttonentry_Data
* @}
*/
#define EFL_UI_MULTIBUTTONENTRY_DATA_GET(o, sd) \
Efl_Ui_Multibuttonentry_Data *sd = efl_data_scope_get(o, EFL_UI_MULTIBUTTONENTRY_CLASS);
#define ELM_MULTIBUTTONENTRY_DATA_GET(o, sd) \
Elm_Multibuttonentry_Data *sd = efl_data_scope_get(o, ELM_MULTIBUTTONENTRY_CLASS);
#define EFL_UI_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(o, ptr) \
EFL_UI_MULTIBUTTONENTRY_DATA_GET(o, ptr); \
#define ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(o, ptr) \
ELM_MULTIBUTTONENTRY_DATA_GET(o, ptr); \
if (EINA_UNLIKELY(!ptr)) \
{ \
ERR("No widget data for object %p (%s)", \
@ -127,8 +130,8 @@ struct _Efl_Ui_Multibuttonentry_Data
return; \
}
#define EFL_UI_MULTIBUTTONENTRY_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
Efl_Ui_Multibuttonentry_Data * ptr = efl_data_scope_get(o, EFL_UI_MULTIBUTTONENTRY_CLASS); \
#define ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
Elm_Multibuttonentry_Data * ptr = efl_data_scope_get(o, ELM_MULTIBUTTONENTRY_CLASS); \
if (EINA_UNLIKELY(!ptr)) \
{ \
ERR("No widget data for object %p (%s)", \