forked from enlightenment/efl
elm: rename elm_multibuttonentry to Efl.Ui.Multibuttonentry
Summary: @ref T5358 Reviewers: woohyun, jpeg, cedric, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: Jaehyun, bu5hm4n, cedric, jpeg Maniphest Tasks: T5358 Differential Revision: https://phab.enlightenment.org/D5169 JP's note: MBE currently has quite a few issues, probably related to focus handling. This needs to be fixed.
This commit is contained in:
parent
98f81f5cbf
commit
6c3bc915df
|
@ -96,7 +96,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/elc_multibuttonentry.c
|
||||
src/lib/elementary/efl_ui_multibuttonentry.c
|
||||
src/lib/elementary/elc_naviframe.c
|
||||
src/lib/elementary/elc_player.c
|
||||
src/lib/elementary/elc_popup.c
|
||||
|
|
|
@ -46,7 +46,7 @@ elm_public_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/efl_ui_multibuttonentry.eo \
|
||||
lib/elementary/elm_notify.eo \
|
||||
lib/elementary/efl_ui_nstate.eo \
|
||||
lib/elementary/elm_pan.eo \
|
||||
|
@ -122,7 +122,7 @@ elm_public_eolian_files = \
|
|||
lib/elementary/elm_actionslider_part.eo \
|
||||
lib/elementary/elm_bubble_part.eo \
|
||||
lib/elementary/elm_fileselector_part.eo \
|
||||
lib/elementary/elm_multibuttonentry_part.eo \
|
||||
lib/elementary/efl_ui_multibuttonentry_part.eo \
|
||||
lib/elementary/elm_code_widget.eo \
|
||||
lib/elementary/efl_ui_text_interactive.eo \
|
||||
lib/elementary/efl_ui_text.eo \
|
||||
|
@ -279,7 +279,7 @@ includesunstable_HEADERS = \
|
|||
lib/elementary/elm_widget_map.h \
|
||||
lib/elementary/elm_widget_mapbuf.h \
|
||||
lib/elementary/elm_widget_menu.h \
|
||||
lib/elementary/elm_widget_multibuttonentry.h \
|
||||
lib/elementary/efl_ui_multibuttonentry_private.h \
|
||||
lib/elementary/elm_widget_naviframe.h \
|
||||
lib/elementary/elm_widget_notify.h \
|
||||
lib/elementary/elm_widget_panel.h \
|
||||
|
@ -339,7 +339,7 @@ includesub_HEADERS = \
|
|||
lib/elementary/elc_hoversel.h \
|
||||
lib/elementary/elc_hoversel_legacy.h \
|
||||
lib/elementary/elc_multibuttonentry.h \
|
||||
lib/elementary/elc_multibuttonentry_eo.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 \
|
||||
|
@ -570,7 +570,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/elc_multibuttonentry.c \
|
||||
lib/elementary/efl_ui_multibuttonentry.c \
|
||||
lib/elementary/elc_naviframe.c \
|
||||
lib/elementary/elc_player.c \
|
||||
lib/elementary/elc_popup.c \
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#endif
|
||||
#include <Elementary.h>
|
||||
|
||||
static Elm_Multibuttonentry_Format_Cb format_func = NULL;
|
||||
static Efl_Ui_Multibuttonentry_Format_Cb format_func = NULL;
|
||||
|
||||
static char *
|
||||
_custom_format(int count, void *data EINA_UNUSED)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +1,10 @@
|
|||
type Elm_Multibuttonentry_Item_Filter_Cb: __undefined_type; [[Elementary multibuttonentry item filter callback type]]
|
||||
type Elm_Multibuttonentry_Format_Cb: __undefined_type; [[Elementary multibuttonentry format callback type]]
|
||||
type Efl_Ui_Multibuttonentry_Format_Cb: __undefined_type; [[Elementary multibuttonentry format callback type]]
|
||||
|
||||
class Elm.Multibuttonentry (Efl.Ui.Layout, Efl.Ui.Clickable)
|
||||
class Efl.Ui.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.
|
||||
|
@ -44,7 +42,7 @@ class Elm.Multibuttonentry (Efl.Ui.Layout, Efl.Ui.Clickable)
|
|||
@since 1.9]]
|
||||
}
|
||||
values {
|
||||
format_function: Elm_Multibuttonentry_Format_Cb @nullable; [[Format_function The actual format function]]
|
||||
format_function: Efl_Ui_Multibuttonentry_Format_Cb @nullable; [[Format_function The actual format function]]
|
||||
data: const(void_ptr) @optional; [[Data User data to passed to $format_function]]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/**
|
||||
* @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
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "efl_ui_multibuttonentry_common.h"
|
||||
#ifdef EFL_EO_API_SUPPORT
|
||||
#include "efl_ui_multibuttonentry_eo.h"
|
||||
#endif
|
||||
#ifndef EFL_NOLEGACY_API_SUPPORT
|
||||
#include "elc_multibuttonentry_legacy.h"
|
||||
#endif
|
||||
/**
|
||||
* @}
|
||||
*/
|
|
@ -1,2 +1,2 @@
|
|||
#include "elm_multibuttonentry_item.eo.h"
|
||||
#include "elm_multibuttonentry.eo.h"
|
||||
#include "efl_ui_multibuttonentry.eo.h"
|
|
@ -0,0 +1,11 @@
|
|||
class Efl.Ui.Multibuttonentry.Part (Efl.Ui.Layout.Part_Content, Efl.Text)
|
||||
{
|
||||
[[Elementary multibuttonentry internal part class]]
|
||||
data: null;
|
||||
implements {
|
||||
Efl.Container.content { set; get; }
|
||||
Efl.Container.content_unset;
|
||||
Efl.Text.text { set; get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -70,9 +70,9 @@ typedef struct _Elm_Multibuttonentry_Item_Filter
|
|||
void *data;
|
||||
} Elm_Multibuttonentry_Item_Filter;
|
||||
|
||||
typedef struct _Elm_Multibuttonentry_Data
|
||||
Elm_Multibuttonentry_Data;
|
||||
struct _Elm_Multibuttonentry_Data
|
||||
typedef struct _Efl_Ui_Multibuttonentry_Data
|
||||
Efl_Ui_Multibuttonentry_Data;
|
||||
struct _Efl_Ui_Multibuttonentry_Data
|
||||
{
|
||||
Evas_Object *parent;
|
||||
Evas_Object *box;
|
||||
|
@ -88,7 +88,7 @@ struct _Elm_Multibuttonentry_Data
|
|||
Elm_Multibuttonentry_Item_Data *selected_it; /* selected item */
|
||||
Elm_Multibuttonentry_Item_Data *focused_it;
|
||||
|
||||
Elm_Multibuttonentry_Format_Cb format_func;
|
||||
Efl_Ui_Multibuttonentry_Format_Cb format_func;
|
||||
const void *format_func_data;
|
||||
|
||||
const char *label_str, *guide_text_str;
|
||||
|
@ -104,7 +104,7 @@ struct _Elm_Multibuttonentry_Data
|
|||
|
||||
Eina_Bool last_it_select : 1;
|
||||
Eina_Bool editable : 1;
|
||||
Eina_Bool focused : 1; // avoids infinite loop on focus in/out
|
||||
Eina_Bool focused : 1;
|
||||
Eina_Bool label_packed : 1;
|
||||
|
||||
Ecore_Timer *longpress_timer;
|
||||
|
@ -114,11 +114,11 @@ struct _Elm_Multibuttonentry_Data
|
|||
* @}
|
||||
*/
|
||||
|
||||
#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(o, sd) \
|
||||
Efl_Ui_Multibuttonentry_Data *sd = efl_data_scope_get(o, EFL_UI_MULTIBUTTONENTRY_CLASS);
|
||||
|
||||
#define ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(o, ptr) \
|
||||
ELM_MULTIBUTTONENTRY_DATA_GET(o, ptr); \
|
||||
#define EFL_UI_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(o, ptr) \
|
||||
EFL_UI_MULTIBUTTONENTRY_DATA_GET(o, ptr); \
|
||||
if (EINA_UNLIKELY(!ptr)) \
|
||||
{ \
|
||||
CRI("No widget data for object %p (%s)", \
|
||||
|
@ -126,8 +126,8 @@ struct _Elm_Multibuttonentry_Data
|
|||
return; \
|
||||
}
|
||||
|
||||
#define ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
||||
Elm_Multibuttonentry_Data * ptr = efl_data_scope_get(o, ELM_MULTIBUTTONENTRY_CLASS); \
|
||||
#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); \
|
||||
if (EINA_UNLIKELY(!ptr)) \
|
||||
{ \
|
||||
CRI("No widget data for object %p (%s)", \
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
#include "elc_multibuttonentry_common.h"
|
||||
#ifdef EFL_EO_API_SUPPORT
|
||||
#include "elc_multibuttonentry_eo.h"
|
||||
#include "efl_ui_multibuttonentry_eo.h"
|
||||
#endif
|
||||
#ifndef EFL_NOLEGACY_API_SUPPORT
|
||||
#include "elc_multibuttonentry_legacy.h"
|
||||
|
|
|
@ -30,4 +30,4 @@ typedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_Cb)(Evas_
|
|||
*
|
||||
* @ingroup Multibuttonentry
|
||||
*/
|
||||
typedef char * (*Elm_Multibuttonentry_Format_Cb)(int count, void *data);
|
||||
typedef char * (*Efl_Ui_Multibuttonentry_Format_Cb)(int count, void *data);
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
EAPI Evas_Object *elm_multibuttonentry_add(Evas_Object *parent);
|
||||
|
||||
#include "elm_multibuttonentry_item.eo.legacy.h"
|
||||
#include "elm_multibuttonentry.eo.legacy.h"
|
||||
#include "efl_ui_multibuttonentry.eo.legacy.h"
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
class Elm.Multibuttonentry.Part (Efl.Ui.Layout.Part_Legacy)
|
||||
{
|
||||
[[Elementary multibuttonentry internal part class]]
|
||||
data: null;
|
||||
implements {
|
||||
Efl.Text.text { set; get; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue