forked from enlightenment/efl
elementary: internalize elm_combobox, expose legacy only
This is bad eo API, and won't remain like that, so completely remove it from being managed by Eolian.
This commit is contained in:
parent
24df96b1b6
commit
0976e9adf3
|
@ -52,7 +52,6 @@ blacklisted_files = [
|
|||
'efl_object_override.eo',
|
||||
'elm_web.eo',
|
||||
'elm_map.eo',
|
||||
'elm_combobox.eo',
|
||||
'elm_list.eo',
|
||||
'elm_genlist.eo',
|
||||
'elm_view_list.eo',
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "elm_widget_container.h"
|
||||
#include "elm_interface_scrollable.h"
|
||||
#include "elm_part_helper.h"
|
||||
#include "elm_combobox.eo.h"
|
||||
#include "elm_widget_combobox.h"
|
||||
|
||||
/* FIXME: remove this when we don't rely on evas event structs anymore */
|
||||
#define EFL_INTERNAL_UNSTABLE
|
||||
|
|
|
@ -11,10 +11,29 @@
|
|||
#include "elm_priv.h"
|
||||
#include "elm_widget_combobox.h"
|
||||
#include "elm_entry.eo.h"
|
||||
#include "elm_combobox.eo.h"
|
||||
#include "elm_genlist.eo.h"
|
||||
#include "elm_hover.eo.h"
|
||||
|
||||
EOAPI void elm_obj_combobox_hover_begin(Eo *obj);
|
||||
EOAPI void elm_obj_combobox_hover_end(Eo *obj);
|
||||
|
||||
static const Efl_Event_Description _ELM_COMBOBOX_EVENT_DISMISSED =
|
||||
EFL_EVENT_DESCRIPTION("dismissed");
|
||||
static const Efl_Event_Description _ELM_COMBOBOX_EVENT_EXPANDED =
|
||||
EFL_EVENT_DESCRIPTION("expanded");
|
||||
static const Efl_Event_Description _ELM_COMBOBOX_EVENT_ITEM_SELECTED =
|
||||
EFL_EVENT_DESCRIPTION("item,selected");
|
||||
static const Efl_Event_Description _ELM_COMBOBOX_EVENT_ITEM_PRESSED =
|
||||
EFL_EVENT_DESCRIPTION("item,pressed");
|
||||
static const Efl_Event_Description _ELM_COMBOBOX_EVENT_FILTER_DONE =
|
||||
EFL_EVENT_DESCRIPTION("filter,done");
|
||||
|
||||
#define ELM_COMBOBOX_EVENT_DISMISSED (&(_ELM_COMBOBOX_EVENT_DISMISSED))
|
||||
#define ELM_COMBOBOX_EVENT_EXPANDED (&(_ELM_COMBOBOX_EVENT_EXPANDED))
|
||||
#define ELM_COMBOBOX_EVENT_ITEM_SELECTED (&(_ELM_COMBOBOX_EVENT_ITEM_SELECTED))
|
||||
#define ELM_COMBOBOX_EVENT_ITEM_PRESSED (&(_ELM_COMBOBOX_EVENT_ITEM_PRESSED))
|
||||
#define ELM_COMBOBOX_EVENT_FILTER_DONE (&(_ELM_COMBOBOX_EVENT_FILTER_DONE))
|
||||
|
||||
#define MY_CLASS ELM_COMBOBOX_CLASS
|
||||
|
||||
#define MY_CLASS_NAME "Elm_Combobox"
|
||||
|
@ -574,9 +593,58 @@ _elm_combobox_efl_gfx_entity_size_set(Eo *obj, Elm_Combobox_Data *pd, Eina_Size2
|
|||
|
||||
ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_combobox, Elm_Combobox_Data)
|
||||
|
||||
/* Internal EO APIs and hidden overrides */
|
||||
EOAPI EFL_FUNC_BODY_CONST(elm_obj_combobox_expanded_get, Eina_Bool, 0);
|
||||
EOAPI EFL_VOID_FUNC_BODY(elm_obj_combobox_hover_begin);
|
||||
EOAPI EFL_VOID_FUNC_BODY(elm_obj_combobox_hover_end);
|
||||
|
||||
#define ELM_COMBOBOX_EXTRA_OPS \
|
||||
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_combobox)
|
||||
static Eina_Bool
|
||||
_elm_combobox_class_initializer(Efl_Class *klass)
|
||||
{
|
||||
EFL_OPS_DEFINE(ops,
|
||||
EFL_OBJECT_OP_FUNC(elm_obj_combobox_expanded_get, _elm_combobox_expanded_get),
|
||||
EFL_OBJECT_OP_FUNC(elm_obj_combobox_hover_begin, _elm_combobox_hover_begin),
|
||||
EFL_OBJECT_OP_FUNC(elm_obj_combobox_hover_end, _elm_combobox_hover_end),
|
||||
EFL_OBJECT_OP_FUNC(efl_constructor, _elm_combobox_efl_object_constructor),
|
||||
EFL_OBJECT_OP_FUNC(efl_gfx_entity_visible_set, _elm_combobox_efl_gfx_entity_visible_set),
|
||||
EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_combobox_efl_gfx_entity_size_set),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_combobox_efl_ui_widget_theme_apply),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_combobox_efl_ui_l10n_translation_update),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_widget_event, _elm_combobox_efl_ui_widget_widget_event),
|
||||
EFL_OBJECT_OP_FUNC(efl_ui_autorepeat_supported_get, _elm_combobox_efl_ui_autorepeat_autorepeat_supported_get),
|
||||
EFL_OBJECT_OP_FUNC(elm_obj_genlist_filter_set, _elm_combobox_elm_genlist_filter_set),
|
||||
EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_combobox_efl_access_widget_action_elm_actions_get),
|
||||
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_combobox)
|
||||
);
|
||||
|
||||
#include "elm_combobox.eo.c"
|
||||
return efl_class_functions_set(klass, &ops, NULL);
|
||||
}
|
||||
|
||||
static const Efl_Class_Description _elm_combobox_class_desc = {
|
||||
EO_VERSION,
|
||||
"Elm.Combobox",
|
||||
EFL_CLASS_TYPE_REGULAR,
|
||||
sizeof(Elm_Combobox_Data),
|
||||
_elm_combobox_class_initializer,
|
||||
_elm_combobox_class_constructor,
|
||||
NULL
|
||||
};
|
||||
|
||||
EFL_DEFINE_CLASS(elm_combobox_class_get, &_elm_combobox_class_desc, EFL_UI_BUTTON_CLASS, EFL_UI_SELECTABLE_INTERFACE, EFL_ACCESS_WIDGET_ACTION_MIXIN, ELM_ENTRY_CLASS, ELM_GENLIST_CLASS, ELM_HOVER_CLASS, EFL_UI_LEGACY_INTERFACE, NULL);
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_combobox_expanded_get(const Elm_Combobox *obj)
|
||||
{
|
||||
return elm_obj_combobox_expanded_get(obj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_combobox_hover_begin(Elm_Combobox *obj)
|
||||
{
|
||||
elm_obj_combobox_hover_begin(obj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_combobox_hover_end(Elm_Combobox *obj)
|
||||
{
|
||||
elm_obj_combobox_hover_end(obj);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
#ifndef _ELM_COMBOBOX_EO_CLASS_TYPE
|
||||
#define _ELM_COMBOBOX_EO_CLASS_TYPE
|
||||
|
||||
typedef Eo Elm_Combobox;
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Add a new Combobox object
|
||||
*
|
||||
|
@ -8,4 +15,38 @@
|
|||
*/
|
||||
EAPI Evas_Object *elm_combobox_add(Evas_Object *parent);
|
||||
|
||||
/**
|
||||
* @brief Returns whether the combobox is expanded.
|
||||
*
|
||||
* This will return EINA_TRUE if the combobox is expanded or EINA_FALSE if it
|
||||
* is not expanded.
|
||||
*
|
||||
* @param[in] obj The object.
|
||||
*
|
||||
* @return @c true if combobox is expenaded, @c false otherwise
|
||||
*
|
||||
* @since 1.17
|
||||
*
|
||||
* @ingroup Elm_Combobox_Group
|
||||
*/
|
||||
EAPI Eina_Bool elm_combobox_expanded_get(const Elm_Combobox *obj);
|
||||
|
||||
/** This triggers the combobox popup from code, the same as if the user had
|
||||
* clicked the button.
|
||||
*
|
||||
* @since 1.17
|
||||
*
|
||||
* @ingroup Elm_Combobox_Group
|
||||
*/
|
||||
EAPI void elm_combobox_hover_begin(Elm_Combobox *obj);
|
||||
|
||||
/** This dismisses the combobox popup as if the user had clicked outside the
|
||||
* hover.
|
||||
*
|
||||
* @since 1.17
|
||||
*
|
||||
* @ingroup Elm_Combobox_Group
|
||||
*/
|
||||
EAPI void elm_combobox_hover_end(Elm_Combobox *obj);
|
||||
|
||||
#include "elm_combobox.eo.legacy.h"
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
class Elm.Combobox (Efl.Ui.Button, Efl.Ui.Selectable,
|
||||
Efl.Access.Widget.Action,
|
||||
Elm.Entry, Elm.Genlist, Elm.Hover, Efl.Ui.Legacy)
|
||||
{
|
||||
[[Elementary combobox class]]
|
||||
legacy_prefix: elm_combobox;
|
||||
eo_prefix: elm_obj_combobox;
|
||||
event_prefix: elm_combobox;
|
||||
methods {
|
||||
@property expanded {
|
||||
get {
|
||||
[[Returns whether the combobox is expanded.
|
||||
|
||||
This will return EINA_TRUE if the combobox is expanded or
|
||||
EINA_FALSE if it is not expanded.
|
||||
|
||||
@since 1.17
|
||||
]]
|
||||
return: bool; [[$true if combobox is expenaded, $false otherwise]]
|
||||
}
|
||||
}
|
||||
hover_begin {
|
||||
[[This triggers the combobox popup from code, the same as if the user
|
||||
had clicked the button.
|
||||
|
||||
@since 1.17
|
||||
]]
|
||||
}
|
||||
hover_end {
|
||||
[[This dismisses the combobox popup as if the user had clicked
|
||||
outside the hover.
|
||||
|
||||
@since 1.17
|
||||
]]
|
||||
}
|
||||
}
|
||||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Efl.Gfx.Entity.visible { set; }
|
||||
Efl.Gfx.Entity.size { set; }
|
||||
Efl.Ui.Widget.theme_apply;
|
||||
Efl.Ui.L10n.translation_update;
|
||||
Efl.Ui.Widget.widget_event;
|
||||
Efl.Ui.Autorepeat.autorepeat_supported { get; }
|
||||
Elm.Genlist.filter { set; }
|
||||
Efl.Access.Widget.Action.elm_actions { get; }
|
||||
//Efl.Part.part; // TODO?
|
||||
}
|
||||
events {
|
||||
dismissed: void; [[Called when combobox was dismissed]]
|
||||
expanded: void; [[Called when combobox was expanded]]
|
||||
/* FIXME: Nobody is emitting this
|
||||
clicked; [[Called when combobox was clicked]]
|
||||
*/
|
||||
item,selected: Efl.Object; [[Called when combobox item was selected]]
|
||||
item,pressed: Efl.Object; [[Called when combobox item was pressed]]
|
||||
filter,done: Efl.Object; [[Called when combobox filter was done]]
|
||||
}
|
||||
}
|
|
@ -79,4 +79,8 @@ struct _Elm_Combobox_Data
|
|||
ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \
|
||||
ELM_COMBOBOX_CHECK(it->base.widget) __VA_ARGS__;
|
||||
|
||||
#define ELM_COMBOBOX_CLASS elm_combobox_class_get()
|
||||
|
||||
EWAPI const Efl_Class *elm_combobox_class_get(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,7 +21,6 @@ pub_legacy_eo_files = [
|
|||
'elm_calendar_item.eo',
|
||||
'elm_clock.eo',
|
||||
'elm_colorselector.eo',
|
||||
'elm_combobox.eo',
|
||||
'elm_conformant.eo',
|
||||
'elm_ctxpopup.eo',
|
||||
'elm_dayselector.eo',
|
||||
|
|
Loading…
Reference in New Issue