forked from enlightenment/efl
elm: rename Elm.Nstate to Efl.Ui.Nstate
This commit is contained in:
parent
780b964427
commit
be47c4b9c0
|
@ -622,7 +622,7 @@ group "Elm_Config" struct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group "Elm_Config_Bindings_Widget" struct {
|
group "Elm_Config_Bindings_Widget" struct {
|
||||||
value "name" string: "Elm_Nstate";
|
value "name" string: "Efl.Ui.Nstate";
|
||||||
group "key_bindings" list {
|
group "key_bindings" list {
|
||||||
group "Elm_Config_Binding_Key" struct {
|
group "Elm_Config_Binding_Key" struct {
|
||||||
value "context" int: 0;
|
value "context" int: 0;
|
||||||
|
|
|
@ -626,7 +626,7 @@ group "Elm_Config" struct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group "Elm_Config_Bindings_Widget" struct {
|
group "Elm_Config_Bindings_Widget" struct {
|
||||||
value "name" string: "Elm_Nstate";
|
value "name" string: "Efl.Ui.Nstate";
|
||||||
group "key_bindings" list {
|
group "key_bindings" list {
|
||||||
group "Elm_Config_Binding_Key" struct {
|
group "Elm_Config_Binding_Key" struct {
|
||||||
value "context" int: 0;
|
value "context" int: 0;
|
||||||
|
|
|
@ -623,7 +623,7 @@ group "Elm_Config" struct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group "Elm_Config_Bindings_Widget" struct {
|
group "Elm_Config_Bindings_Widget" struct {
|
||||||
value "name" string: "Elm_Nstate";
|
value "name" string: "Efl.Ui.Nstate";
|
||||||
group "key_bindings" list {
|
group "key_bindings" list {
|
||||||
group "Elm_Config_Binding_Key" struct {
|
group "Elm_Config_Binding_Key" struct {
|
||||||
value "context" int: 0;
|
value "context" int: 0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "widget_preview_tmpl_head.c"
|
#include "widget_preview_tmpl_head.c"
|
||||||
|
|
||||||
Evas_Object *o = eo_add(ELM_NSTATE_CLASS, win);
|
Evas_Object *o = eo_add(EFL_UI_NSTATE_CLASS, win);
|
||||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_win_resize_object_add(win, o);
|
elm_win_resize_object_add(win, o);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
|
@ -64,7 +64,7 @@ elm_public_eolian_files = \
|
||||||
lib/elementary/elm_multibuttonentry.eo \
|
lib/elementary/elm_multibuttonentry.eo \
|
||||||
lib/elementary/elm_naviframe.eo \
|
lib/elementary/elm_naviframe.eo \
|
||||||
lib/elementary/elm_notify.eo \
|
lib/elementary/elm_notify.eo \
|
||||||
lib/elementary/elm_nstate.eo \
|
lib/elementary/efl_ui_nstate.eo \
|
||||||
lib/elementary/elm_pan.eo \
|
lib/elementary/elm_pan.eo \
|
||||||
lib/elementary/elm_panel.eo \
|
lib/elementary/elm_panel.eo \
|
||||||
lib/elementary/elm_panes.eo \
|
lib/elementary/elm_panes.eo \
|
||||||
|
@ -215,7 +215,6 @@ includesunstable_HEADERS = \
|
||||||
lib/elementary/elm_widget_multibuttonentry.h \
|
lib/elementary/elm_widget_multibuttonentry.h \
|
||||||
lib/elementary/elm_widget_naviframe.h \
|
lib/elementary/elm_widget_naviframe.h \
|
||||||
lib/elementary/elm_widget_notify.h \
|
lib/elementary/elm_widget_notify.h \
|
||||||
lib/elementary/elm_widget_nstate.h \
|
|
||||||
lib/elementary/elm_widget_panel.h \
|
lib/elementary/elm_widget_panel.h \
|
||||||
lib/elementary/elm_widget_panes.h \
|
lib/elementary/elm_widget_panes.h \
|
||||||
lib/elementary/elm_widget_photo.h \
|
lib/elementary/elm_widget_photo.h \
|
||||||
|
@ -419,7 +418,7 @@ includesub_HEADERS = \
|
||||||
lib/elementary/elm_notify_common.h \
|
lib/elementary/elm_notify_common.h \
|
||||||
lib/elementary/elm_notify_eo.h \
|
lib/elementary/elm_notify_eo.h \
|
||||||
lib/elementary/elm_notify_legacy.h \
|
lib/elementary/elm_notify_legacy.h \
|
||||||
lib/elementary/elm_nstate.h \
|
lib/elementary/efl_ui_nstate.h \
|
||||||
lib/elementary/elm_object.h \
|
lib/elementary/elm_object.h \
|
||||||
lib/elementary/elm_object_item.h \
|
lib/elementary/elm_object_item.h \
|
||||||
lib/elementary/elm_panel.h \
|
lib/elementary/elm_panel.h \
|
||||||
|
@ -594,7 +593,7 @@ lib_elementary_libelementary_la_SOURCES = \
|
||||||
lib/elementary/elm_menu.c \
|
lib/elementary/elm_menu.c \
|
||||||
lib/elementary/elm_module.c \
|
lib/elementary/elm_module.c \
|
||||||
lib/elementary/elm_notify.c \
|
lib/elementary/elm_notify.c \
|
||||||
lib/elementary/elm_nstate.c \
|
lib/elementary/efl_ui_nstate.c \
|
||||||
lib/elementary/elm_panel.c \
|
lib/elementary/elm_panel.c \
|
||||||
lib/elementary/elm_panes.c \
|
lib/elementary/elm_panes.c \
|
||||||
lib/elementary/elm_photo.c \
|
lib/elementary/elm_photo.c \
|
||||||
|
|
|
@ -29,7 +29,7 @@ test_nstate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
||||||
elm_win_resize_object_add(win, bx);
|
elm_win_resize_object_add(win, bx);
|
||||||
evas_object_show(bx);
|
evas_object_show(bx);
|
||||||
|
|
||||||
nstate = eo_add(ELM_NSTATE_CLASS, win);
|
nstate = eo_add(EFL_UI_NSTATE_CLASS, win);
|
||||||
efl_ui_nstate_count_set(nstate, 5);
|
efl_ui_nstate_count_set(nstate, 5);
|
||||||
elm_object_text_set(nstate, "nstate = 0");
|
elm_object_text_set(nstate, "nstate = 0");
|
||||||
elm_box_pack_end(bx, nstate);
|
elm_box_pack_end(bx, nstate);
|
||||||
|
|
|
@ -235,7 +235,7 @@ EAPI extern Elm_Version *elm_version;
|
||||||
#include <elm_mirroring.h>
|
#include <elm_mirroring.h>
|
||||||
#include <elm_need.h>
|
#include <elm_need.h>
|
||||||
#include <elm_notify.h>
|
#include <elm_notify.h>
|
||||||
#include <elm_nstate.h>
|
#include <efl_ui_nstate.h>
|
||||||
#include <elm_object.h>
|
#include <elm_object.h>
|
||||||
|
|
||||||
#include <elm_panel.h>
|
#include <elm_panel.h>
|
||||||
|
|
|
@ -69,7 +69,7 @@ elm_eolian_files = \
|
||||||
elm_multibuttonentry.eo \
|
elm_multibuttonentry.eo \
|
||||||
elm_naviframe.eo \
|
elm_naviframe.eo \
|
||||||
elm_notify.eo \
|
elm_notify.eo \
|
||||||
elm_nstate.eo \
|
efl_ui_nstate.eo \
|
||||||
elm_pan.eo \
|
elm_pan.eo \
|
||||||
elm_panel.eo \
|
elm_panel.eo \
|
||||||
elm_panes.eo \
|
elm_panes.eo \
|
||||||
|
@ -203,7 +203,6 @@ includesunstable_HEADERS = \
|
||||||
elm_widget_multibuttonentry.h \
|
elm_widget_multibuttonentry.h \
|
||||||
elm_widget_naviframe.h \
|
elm_widget_naviframe.h \
|
||||||
elm_widget_notify.h \
|
elm_widget_notify.h \
|
||||||
elm_widget_nstate.h \
|
|
||||||
elm_widget_panel.h \
|
elm_widget_panel.h \
|
||||||
elm_widget_panes.h \
|
elm_widget_panes.h \
|
||||||
elm_widget_photo.h \
|
elm_widget_photo.h \
|
||||||
|
@ -405,7 +404,7 @@ includesub_HEADERS = \
|
||||||
elm_notify_common.h \
|
elm_notify_common.h \
|
||||||
elm_notify_eo.h \
|
elm_notify_eo.h \
|
||||||
elm_notify_legacy.h \
|
elm_notify_legacy.h \
|
||||||
elm_nstate.h \
|
efl_ui_nstate.h \
|
||||||
elm_object.h \
|
elm_object.h \
|
||||||
elm_object_item.h \
|
elm_object_item.h \
|
||||||
elm_panel.h \
|
elm_panel.h \
|
||||||
|
@ -580,7 +579,7 @@ libelementary_la_SOURCES = \
|
||||||
elm_menu.c \
|
elm_menu.c \
|
||||||
elm_module.c \
|
elm_module.c \
|
||||||
elm_notify.c \
|
elm_notify.c \
|
||||||
elm_nstate.c \
|
efl_ui_nstate.c \
|
||||||
elm_panel.c \
|
elm_panel.c \
|
||||||
elm_panes.c \
|
elm_panes.c \
|
||||||
elm_photo.c \
|
elm_photo.c \
|
||||||
|
|
|
@ -2,23 +2,29 @@
|
||||||
# include "elementary_config.h"
|
# include "elementary_config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ELM_NSTATE_PROTECTED
|
#define EFL_UI_NSTATE_PROTECTED
|
||||||
#include "Elementary.h"
|
#include "Elementary.h"
|
||||||
#include "elm_priv.h"
|
#include "elm_priv.h"
|
||||||
#include "elm_widget_nstate.h"
|
#include "efl_ui_nstate.eo.h"
|
||||||
#include "elm_widget_button.h"
|
#include "elm_widget_button.h"
|
||||||
|
|
||||||
#define MY_CLASS ELM_NSTATE_CLASS
|
#define MY_CLASS EFL_UI_NSTATE_CLASS
|
||||||
|
|
||||||
#define MY_CLASS_NAME "Elm_Nstate"
|
#define MY_CLASS_NAME "Efl.Ui.Nstate"
|
||||||
#define MY_CLASS_NAME_LEGACY "elm_nstate"
|
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int nstate;
|
||||||
|
int state;
|
||||||
|
} Efl_Ui_Nstate_Data;
|
||||||
|
|
||||||
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
|
static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
|
||||||
static void _state_active(Evas_Object *obj, Elm_Nstate_Data *sd);
|
static void _state_active(Evas_Object *obj, Efl_Ui_Nstate_Data *sd);
|
||||||
|
|
||||||
static const Elm_Action key_actions[] = {
|
static const Elm_Action key_actions[] = {
|
||||||
{"activate", _key_action_activate},
|
{"activate", _key_action_activate},
|
||||||
|
@ -26,10 +32,10 @@ static const Elm_Action key_actions[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
EOLIAN static Eo_Base *
|
EOLIAN static Eo_Base *
|
||||||
_elm_nstate_eo_base_constructor(Eo *obj, Elm_Nstate_Data *pd EINA_UNUSED)
|
_efl_ui_nstate_eo_base_constructor(Eo *obj, Efl_Ui_Nstate_Data *pd EINA_UNUSED)
|
||||||
{
|
{
|
||||||
obj = eo_constructor(eo_super(obj, MY_CLASS));
|
obj = eo_constructor(eo_super(obj, MY_CLASS));
|
||||||
evas_obj_type_set(obj, MY_CLASS_NAME_LEGACY);
|
evas_obj_type_set(obj, MY_CLASS_NAME);
|
||||||
evas_obj_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
evas_obj_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
||||||
//TODO: Add ATSPI call here
|
//TODO: Add ATSPI call here
|
||||||
|
|
||||||
|
@ -37,14 +43,14 @@ _elm_nstate_eo_base_constructor(Eo *obj, Elm_Nstate_Data *pd EINA_UNUSED)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_next_state_set(Elm_Nstate_Data *sd)
|
_next_state_set(Efl_Ui_Nstate_Data *sd)
|
||||||
{
|
{
|
||||||
++sd->state;
|
++sd->state;
|
||||||
if (sd->state == sd->nstate) sd->state = 0;
|
if (sd->state == sd->nstate) sd->state = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_state_active(Evas_Object *obj, Elm_Nstate_Data *sd)
|
_state_active(Evas_Object *obj, Efl_Ui_Nstate_Data *sd)
|
||||||
{
|
{
|
||||||
char buf[64];
|
char buf[64];
|
||||||
|
|
||||||
|
@ -52,7 +58,7 @@ _state_active(Evas_Object *obj, Elm_Nstate_Data *sd)
|
||||||
elm_layout_signal_emit(obj, buf, "elm");
|
elm_layout_signal_emit(obj, buf, "elm");
|
||||||
edje_object_message_signal_process(elm_layout_edje_get(obj));
|
edje_object_message_signal_process(elm_layout_edje_get(obj));
|
||||||
elm_obj_layout_sizing_eval(obj);
|
elm_obj_layout_sizing_eval(obj);
|
||||||
eo_event_callback_call(obj, ELM_NSTATE_EVENT_STATE_CHANGED, NULL);
|
eo_event_callback_call(obj, EFL_UI_NSTATE_EVENT_STATE_CHANGED, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -65,7 +71,7 @@ _on_state_changed(void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_nstate_evas_object_smart_add(Eo *obj, Elm_Nstate_Data *pd)
|
_efl_ui_nstate_evas_object_smart_add(Eo *obj, Efl_Ui_Nstate_Data *pd)
|
||||||
{
|
{
|
||||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||||
|
|
||||||
|
@ -84,19 +90,19 @@ _elm_nstate_evas_object_smart_add(Eo *obj, Elm_Nstate_Data *pd)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_nstate_evas_object_smart_del(Eo *obj, Elm_Nstate_Data *pd EINA_UNUSED)
|
_efl_ui_nstate_evas_object_smart_del(Eo *obj, Efl_Ui_Nstate_Data *pd EINA_UNUSED)
|
||||||
{
|
{
|
||||||
evas_obj_smart_del(eo_super(obj, MY_CLASS));
|
evas_obj_smart_del(eo_super(obj, MY_CLASS));
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static int
|
EOLIAN static int
|
||||||
_elm_nstate_count_get(Eo *obj EINA_UNUSED, Elm_Nstate_Data *pd)
|
_efl_ui_nstate_count_get(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd)
|
||||||
{
|
{
|
||||||
return pd->nstate;
|
return pd->nstate;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_nstate_count_set(Eo *obj EINA_UNUSED, Elm_Nstate_Data *pd, int nstate)
|
_efl_ui_nstate_count_set(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd, int nstate)
|
||||||
{
|
{
|
||||||
if (pd->nstate == nstate) return;
|
if (pd->nstate == nstate) return;
|
||||||
|
|
||||||
|
@ -105,13 +111,13 @@ _elm_nstate_count_set(Eo *obj EINA_UNUSED, Elm_Nstate_Data *pd, int nstate)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static int
|
EOLIAN static int
|
||||||
_elm_nstate_value_get(Eo *obj EINA_UNUSED, Elm_Nstate_Data *pd)
|
_efl_ui_nstate_value_get(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd)
|
||||||
{
|
{
|
||||||
return pd->state;
|
return pd->state;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_is_valid_state(Elm_Nstate_Data *sd, int state)
|
_is_valid_state(Efl_Ui_Nstate_Data *sd, int state)
|
||||||
{
|
{
|
||||||
if (sd->state == state || (state < 0 || state >= sd->nstate))
|
if (sd->state == state || (state < 0 || state >= sd->nstate))
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
@ -120,7 +126,7 @@ _is_valid_state(Elm_Nstate_Data *sd, int state)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_nstate_value_set(Eo *obj, Elm_Nstate_Data *pd, int state)
|
_efl_ui_nstate_value_set(Eo *obj, Efl_Ui_Nstate_Data *pd, int state)
|
||||||
{
|
{
|
||||||
if (!_is_valid_state(pd, state)) return;
|
if (!_is_valid_state(pd, state)) return;
|
||||||
|
|
||||||
|
@ -129,7 +135,7 @@ _elm_nstate_value_set(Eo *obj, Elm_Nstate_Data *pd, int state)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EOLIAN static Eina_Bool
|
||||||
_elm_nstate_elm_widget_theme_apply(Eo *obj, Elm_Nstate_Data *pd)
|
_efl_ui_nstate_elm_widget_theme_apply(Eo *obj, Efl_Ui_Nstate_Data *pd)
|
||||||
{
|
{
|
||||||
Eina_Bool int_ret;
|
Eina_Bool int_ret;
|
||||||
|
|
||||||
|
@ -149,7 +155,7 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EOLIAN static Eina_Bool
|
||||||
_elm_nstate_elm_widget_event(Eo *obj, Elm_Nstate_Data *_pd EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info)
|
_efl_ui_nstate_elm_widget_event(Eo *obj, Efl_Ui_Nstate_Data *_pd EINA_UNUSED, Evas_Object *src EINA_UNUSED, Evas_Callback_Type type, void *event_info)
|
||||||
{
|
{
|
||||||
Evas_Event_Key_Down *ev = event_info;
|
Evas_Event_Key_Down *ev = event_info;
|
||||||
|
|
||||||
|
@ -164,16 +170,16 @@ _elm_nstate_elm_widget_event(Eo *obj, Elm_Nstate_Data *_pd EINA_UNUSED, Evas_Obj
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_nstate_activate(Eo *obj, Elm_Nstate_Data *_pd)
|
_efl_ui_nstate_activate(Eo *obj, Efl_Ui_Nstate_Data *_pd)
|
||||||
{
|
{
|
||||||
_next_state_set(_pd);
|
_next_state_set(_pd);
|
||||||
_state_active(obj, _pd);
|
_state_active(obj, _pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_nstate_class_constructor(Eo_Class *klass)
|
_efl_ui_nstate_class_constructor(Eo_Class *klass)
|
||||||
{
|
{
|
||||||
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
evas_smart_legacy_type_register(MY_CLASS_NAME, klass);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "elm_nstate.eo.c"
|
#include "efl_ui_nstate.eo.c"
|
|
@ -1,8 +1,6 @@
|
||||||
class Elm.Nstate(Elm.Button)
|
class Efl.Ui.Nstate(Elm.Button)
|
||||||
{
|
{
|
||||||
eo_prefix: efl_ui_nstate;
|
|
||||||
legacy_prefix: null;
|
legacy_prefix: null;
|
||||||
data: Elm_Nstate_Data;
|
|
||||||
methods {
|
methods {
|
||||||
activate @protected {
|
activate @protected {
|
||||||
}
|
}
|
|
@ -22,5 +22,5 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef EFL_EO_API_SUPPORT
|
#ifdef EFL_EO_API_SUPPORT
|
||||||
#include "elm_nstate.eo.h"
|
#include "efl_ui_nstate.eo.h"
|
||||||
#endif
|
#endif
|
|
@ -5,12 +5,12 @@
|
||||||
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
|
||||||
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
|
#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
|
||||||
#define ELM_LAYOUT_PROTECTED
|
#define ELM_LAYOUT_PROTECTED
|
||||||
#define ELM_NSTATE_PROTECTED
|
#define EFL_UI_NSTATE_PROTECTED
|
||||||
|
|
||||||
#include <Elementary.h>
|
#include <Elementary.h>
|
||||||
#include "elm_priv.h"
|
#include "elm_priv.h"
|
||||||
|
#include "efl_ui_nstate.eo.h"
|
||||||
#include "elm_widget_check.h"
|
#include "elm_widget_check.h"
|
||||||
#include "elm_widget_nstate.h"
|
|
||||||
|
|
||||||
#define MY_CLASS ELM_CHECK_CLASS
|
#define MY_CLASS ELM_CHECK_CLASS
|
||||||
|
|
||||||
|
@ -341,13 +341,13 @@ _elm_check_selected_set(Eo *obj, Elm_Check_Data *pd EINA_UNUSED, Eina_Bool value
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_check_elm_nstate_count_set(Eo *obj EINA_UNUSED, Elm_Check_Data *pd EINA_UNUSED, int nstate EINA_UNUSED)
|
_elm_check_efl_ui_nstate_count_set(Eo *obj EINA_UNUSED, Elm_Check_Data *pd EINA_UNUSED, int nstate EINA_UNUSED)
|
||||||
{
|
{
|
||||||
//NOP;
|
//NOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_check_elm_nstate_value_set(Eo *obj, Elm_Check_Data *pd EINA_UNUSED, int state)
|
_elm_check_efl_ui_nstate_value_set(Eo *obj, Elm_Check_Data *pd EINA_UNUSED, int state)
|
||||||
{
|
{
|
||||||
Eina_Bool _state = !!state;
|
Eina_Bool _state = !!state;
|
||||||
if (_state == efl_ui_nstate_value_get(obj)) return;
|
if (_state == efl_ui_nstate_value_get(obj)) return;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Elm.Check (Elm.Nstate, Elm.Interface_Atspi_Widget_Action)
|
class Elm.Check (Efl.Ui.Nstate, Elm.Interface_Atspi_Widget_Action)
|
||||||
{
|
{
|
||||||
[[Check widget
|
[[Check widget
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ class Elm.Check (Elm.Nstate, Elm.Interface_Atspi_Widget_Action)
|
||||||
Elm.Widget.sub_object_del;
|
Elm.Widget.sub_object_del;
|
||||||
Elm.Widget.event;
|
Elm.Widget.event;
|
||||||
Elm.Layout.text_aliases.get;
|
Elm.Layout.text_aliases.get;
|
||||||
Elm.Nstate.count.set;
|
Efl.Ui.Nstate.count.set;
|
||||||
Elm.Nstate.value.set;
|
Efl.Ui.Nstate.value.set;
|
||||||
Elm.Interface_Atspi_Accessible.state_set.get;
|
Elm.Interface_Atspi_Accessible.state_set.get;
|
||||||
Elm.Interface_Atspi_Widget_Action.elm_actions.get;
|
Elm.Interface_Atspi_Widget_Action.elm_actions.get;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
#ifndef ELM_WIDGET_NSTATE_H
|
|
||||||
#define ELM_WIDGET_NSTATE_H
|
|
||||||
|
|
||||||
#include "elm_nstate.eo.h"
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int nstate;
|
|
||||||
int state;
|
|
||||||
} Elm_Nstate_Data;
|
|
||||||
|
|
||||||
|
|
||||||
#define ELM_NSTATE_DATA_GET(o, sd) \
|
|
||||||
Elm_Nstate_Data * sd = eo_data_scope_get(o, ELM_NSTATE_CLASS)
|
|
||||||
|
|
||||||
#define ELM_NSTATE_DATA_GET_OR_RETURN(o, ptr) \
|
|
||||||
ELM_NSTATE_DATA_GET(o, ptr); \
|
|
||||||
if (EINA_UNLIKELY(!ptr)) \
|
|
||||||
{ \
|
|
||||||
CRI("No widget data for object %p (%s)", \
|
|
||||||
o, evas_object_type_get(o)); \
|
|
||||||
return; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ELM_NSTATE_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
|
||||||
ELM_NSTATE_DATA_GET(o, ptr); \
|
|
||||||
if (EINA_UNLIKELY(!ptr)) \
|
|
||||||
{ \
|
|
||||||
CRI("No widget data for object %p (%s)", \
|
|
||||||
o, evas_object_type_get(o)); \
|
|
||||||
return val; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ELM_NSTATE_CHECK(obj) \
|
|
||||||
if (EINA_UNLIKELY(!eo_isa((obj), ELM_NSTATE_CLASS))) \
|
|
||||||
return
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in New Issue