forked from enlightenment/efl
elm: all the focusable widget now emits "focused" and "unfocused" smart callbacks.
1. documentations, NEWS, and ChangeLog will be updated later after some more test. 2. need to check entry.
This commit is contained in:
parent
93fb6bcde9
commit
8bfdbd2ba6
|
@ -452,6 +452,12 @@ static void
|
|||
_elm_datetime_smart_on_focus(Eo *obj, void *_pd, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
if (ret) *ret = EINA_FALSE;
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
|
||||
if (!int_ret) return;
|
||||
|
||||
if (!elm_widget_focus_get(obj))
|
||||
{
|
||||
Elm_Datetime_Smart_Data *sd = _pd;
|
||||
|
|
|
@ -39,17 +39,15 @@ _elm_glview_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
|||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
|
||||
if (!int_ret) return;
|
||||
|
||||
if (elm_widget_focus_get(obj))
|
||||
{
|
||||
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
|
||||
evas_object_smart_callback_call(obj, SIG_FOCUSED, NULL);
|
||||
}
|
||||
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
|
||||
else
|
||||
{
|
||||
evas_object_focus_set(wd->resize_obj, EINA_FALSE);
|
||||
evas_object_smart_callback_call(obj, SIG_UNFOCUSED, NULL);
|
||||
}
|
||||
evas_object_focus_set(wd->resize_obj, EINA_FALSE);
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -370,9 +370,12 @@ static void
|
|||
_elm_layout_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
|
||||
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
if (ret) *ret = EINA_FALSE;
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
|
||||
if (!int_ret) return;
|
||||
|
||||
if (elm_widget_focus_get(obj))
|
||||
{
|
||||
|
|
|
@ -3804,6 +3804,10 @@ _elm_map_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
|||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
if (ret) *ret = EINA_FALSE;
|
||||
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
|
||||
if (!int_ret) return;
|
||||
|
||||
if (elm_widget_focus_get(obj))
|
||||
{
|
||||
|
|
|
@ -863,6 +863,10 @@ _elm_photocam_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
|||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
|
||||
if (!int_ret) return;
|
||||
|
||||
if (elm_widget_focus_get(obj))
|
||||
{
|
||||
|
|
|
@ -571,6 +571,10 @@ _elm_toolbar_smart_on_focus(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
|||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
|
||||
ELM_TOOLBAR_DATA_GET(obj, sd);
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
|
||||
if (!int_ret) return;
|
||||
|
||||
if (elm_widget_focus_get(obj))
|
||||
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
|
||||
|
|
|
@ -154,6 +154,10 @@ _elm_web_smart_on_focus(Eo *obj, void *_pd, va_list *list)
|
|||
|
||||
Elm_Web_Smart_Data *sd = _pd;
|
||||
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
|
||||
if (!int_ret) return;
|
||||
|
||||
top = elm_widget_top_get(obj);
|
||||
|
||||
|
|
|
@ -5852,7 +5852,16 @@ static void
|
|||
_elm_widget_on_focus(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
|
||||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
if (ret) *ret = EINA_FALSE;
|
||||
|
||||
if (elm_widget_can_focus_get(obj))
|
||||
{
|
||||
if (elm_widget_focus_get(obj))
|
||||
evas_object_smart_callback_call(obj, "focused", NULL);
|
||||
else
|
||||
evas_object_smart_callback_call(obj, "unfocused", NULL);
|
||||
}
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1128,8 +1128,11 @@ _elm_win_smart_on_focus(Eo *obj, void *_pd, va_list *list)
|
|||
{
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
|
||||
Elm_Win_Smart_Data *sd = _pd;
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
||||
eo_do_super(obj, MY_CLASS, elm_wdg_on_focus(&int_ret));
|
||||
if (!int_ret) return;
|
||||
|
||||
if (sd->img_obj)
|
||||
evas_object_focus_set(sd->img_obj, elm_widget_focus_get(obj));
|
||||
|
|
Loading…
Reference in New Issue