forked from enlightenment/efl
parent
0bbfd9fc0b
commit
7b3e96932d
|
@ -442,8 +442,3 @@
|
|||
* Fix re-order animation when it doesn't end correctly.
|
||||
* Improve elm map module loading to onlt init the module needed
|
||||
when searching and not all modules.
|
||||
|
||||
2012-09-03 Shinwoo Kim (kimcinoo)
|
||||
|
||||
* Add in more access subsystem features like activation cb.
|
||||
|
||||
|
|
|
@ -290,27 +290,12 @@ _elm_access_on_highlight_hook_set(Elm_Access_Info *ac,
|
|||
ac->on_highlight_data = data;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
_elm_access_activate_hook_set(Elm_Access_Info *ac,
|
||||
Elm_Access_Activate_Cb func,
|
||||
void *data)
|
||||
{
|
||||
if (!ac) return;
|
||||
ac->activate = func;
|
||||
ac->activate_data = data;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
_elm_access_highlight_object_activate(Evas_Object *obj)
|
||||
{
|
||||
Evas_Object *highlight_obj;
|
||||
highlight_obj = elm_widget_focused_object_get(obj);
|
||||
|
||||
Elm_Access_Info *ac = evas_object_data_get(highlight_obj, "_elm_access");
|
||||
if (!ac) return;
|
||||
|
||||
if (ac->activate)
|
||||
ac->activate(highlight_obj, ac->activate_data);
|
||||
elm_widget_activate(highlight_obj);
|
||||
}
|
||||
|
||||
EAPI char *
|
||||
|
|
|
@ -73,6 +73,13 @@ _elm_button_smart_sizing_eval(Evas_Object *obj)
|
|||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_button_smart_activate(Evas_Object *obj)
|
||||
{
|
||||
evas_object_smart_callback_call(obj, SIG_CLICKED, NULL);
|
||||
elm_layout_signal_emit(obj, "elm,anim,activate", "elm");
|
||||
}
|
||||
|
||||
/* FIXME: replicated from elm_layout just because button's icon spot
|
||||
* is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
|
||||
* can changed the theme API */
|
||||
|
@ -257,13 +264,6 @@ _access_state_cb(void *data __UNUSED__,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_access_activate_cb(Evas_Object *obj, void *data __UNUSED__)
|
||||
{
|
||||
evas_object_smart_callback_call(obj, SIG_CLICKED, NULL);
|
||||
elm_layout_signal_emit(obj, "elm,anim,activate", "elm");
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_button_smart_add(Evas_Object *obj)
|
||||
{
|
||||
|
@ -288,8 +288,6 @@ _elm_button_smart_add(Evas_Object *obj)
|
|||
(_elm_access_object_get(obj), ELM_ACCESS_INFO, _access_info_cb, NULL);
|
||||
_elm_access_callback_set
|
||||
(_elm_access_object_get(obj), ELM_ACCESS_STATE, _access_state_cb, priv);
|
||||
_elm_access_activate_hook_set
|
||||
(_elm_access_object_get(obj), _access_activate_cb, NULL);
|
||||
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
|
||||
|
@ -312,6 +310,7 @@ _elm_button_smart_set_user(Elm_Button_Smart_Class *sc)
|
|||
ELM_CONTAINER_CLASS(sc)->content_set = _elm_button_smart_content_set;
|
||||
|
||||
ELM_LAYOUT_CLASS(sc)->sizing_eval = _elm_button_smart_sizing_eval;
|
||||
ELM_WIDGET_CLASS(sc)->activate = _elm_button_smart_activate;
|
||||
|
||||
ELM_LAYOUT_CLASS(sc)->content_aliases = _content_aliases;
|
||||
ELM_LAYOUT_CLASS(sc)->text_aliases = _text_aliases;
|
||||
|
|
|
@ -3506,6 +3506,16 @@ elm_widget_focus_order_get(const Evas_Object *obj)
|
|||
return sd->focus_order;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_widget_activate(Evas_Object *obj)
|
||||
{
|
||||
API_ENTRY return;
|
||||
|
||||
if (!sd->api->activate) return;
|
||||
|
||||
sd->api->activate(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
|
|
|
@ -351,7 +351,7 @@
|
|||
*/
|
||||
#define ELM_WIDGET_SMART_CLASS_INIT(smart_class_init) \
|
||||
{smart_class_init, ELM_WIDGET_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, \
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
|
||||
|
||||
/**
|
||||
* @def ELM_WIDGET_SMART_CLASS_INIT_NULL
|
||||
|
@ -432,6 +432,7 @@ typedef struct _Elm_Widget_Smart_Class
|
|||
Evas_Object *sobj); /**< 'Virtual' function handling sub objects being removed */
|
||||
void (*access)(Evas_Object *obj,
|
||||
Eina_Bool is_access); /**< 'Virtual' function on the widget being set access */
|
||||
void (*activate)(Evas_Object *obj); /**< 'Virtual' function to activate widget */
|
||||
} Elm_Widget_Smart_Class;
|
||||
|
||||
/**
|
||||
|
@ -546,7 +547,6 @@ typedef Eina_Bool (*Elm_Widget_Del_Pre_Cb)(void *data);
|
|||
|
||||
typedef char *(*Elm_Access_Content_Cb)(void *data, Evas_Object *obj, Elm_Widget_Item *item);
|
||||
typedef void (*Elm_Access_On_Highlight_Cb)(void *data);
|
||||
typedef void (*Elm_Access_Activate_Cb)(Evas_Object *obj, void *data);
|
||||
|
||||
struct _Elm_Access_Item
|
||||
{
|
||||
|
@ -562,8 +562,6 @@ struct _Elm_Access_Info
|
|||
Ecore_Timer *delay_timer;
|
||||
void *on_highlight_data;
|
||||
Elm_Access_On_Highlight_Cb on_highlight;
|
||||
void *activate_data;
|
||||
Elm_Access_Activate_Cb activate;
|
||||
};
|
||||
|
||||
EAPI void _elm_access_clear(Elm_Access_Info *ac);
|
||||
|
@ -586,7 +584,6 @@ EAPI Evas_Object * _elm_access_edje_object_part_object_register(Evas_Object *
|
|||
EAPI void _elm_access_widget_item_register(Elm_Widget_Item *item);
|
||||
EAPI void _elm_access_widget_item_unregister(Elm_Widget_Item *item);
|
||||
EAPI void _elm_access_on_highlight_hook_set(Elm_Access_Info *ac, Elm_Access_On_Highlight_Cb func, void *data);
|
||||
EAPI void _elm_access_activate_hook_set(Elm_Access_Info *ac, Elm_Access_Activate_Cb func, void *data);
|
||||
EAPI void _elm_access_highlight_object_activate(Evas_Object *obj);
|
||||
|
||||
/**< put this as the first member in your widget item struct */
|
||||
|
@ -742,6 +739,7 @@ EAPI void elm_widget_focus_mouse_up_handle(Evas_Object *obj);
|
|||
EAPI void elm_widget_focus_tree_unfocusable_handle(Evas_Object *obj);
|
||||
EAPI void elm_widget_focus_disabled_handle(Evas_Object *obj);
|
||||
EAPI unsigned int elm_widget_focus_order_get(const Evas_Object *obj);
|
||||
EAPI void elm_widget_activate(Evas_Object *obj);
|
||||
EAPI void elm_widget_text_part_set(Evas_Object *obj, const char *part, const char *label);
|
||||
EAPI const char *elm_widget_text_part_get(const Evas_Object *obj, const char *part);
|
||||
EAPI void elm_widget_domain_translatable_text_part_set(Evas_Object *obj, const char *part, const char *domain, const char *text);
|
||||
|
|
Loading…
Reference in New Issue