forked from enlightenment/efl
win: Merge focus with elm_widget's (EO)
I believe this should work fine! Ref T5363 Ref T5322
This commit is contained in:
parent
4b74ca477d
commit
89492d859b
|
@ -1701,9 +1701,8 @@ _efl_ui_win_elm_widget_focus_direction(Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED
|
|||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_elm_widget_on_focus(Eo *obj, Efl_Ui_Win_Data *sd, Elm_Object_Item *item EINA_UNUSED)
|
||||
{
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
int_ret = elm_obj_widget_on_focus(efl_super(obj, MY_CLASS), NULL);
|
||||
if (!int_ret) return EINA_TRUE;
|
||||
if (!elm_obj_widget_on_focus(efl_super(obj, MY_CLASS), NULL))
|
||||
return EINA_TRUE;
|
||||
|
||||
if (sd->img_obj)
|
||||
evas_object_focus_set(sd->img_obj, elm_widget_focus_get(obj));
|
||||
|
@ -6177,8 +6176,9 @@ _efl_ui_win_indicator_type_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd EINA_UNU
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_focus_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
|
||||
_efl_ui_win_elm_widget_focus_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
|
||||
{
|
||||
// Bypass widget implementation here.
|
||||
return ecore_evas_focus_get(sd->ee);
|
||||
}
|
||||
|
||||
|
@ -8157,6 +8157,12 @@ elm_win_socket_listen(Efl_Ui_Win *obj, const char *svcname, int svcnum, Eina_Boo
|
|||
return efl_ui_win_socket_listen(obj, svcname, svcnum, svcsys);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_win_focus_get(const Efl_Ui_Win *obj)
|
||||
{
|
||||
return elm_obj_widget_focus_get(obj);
|
||||
}
|
||||
|
||||
// deprecated
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -339,12 +339,6 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
|
|||
skip: bool; [[The skip flag state ($true if it is to be skipped).]]
|
||||
}
|
||||
}
|
||||
@property focus {
|
||||
get {
|
||||
[[Get whether a window has focus.]]
|
||||
return: bool; [[$true if window has focus, $false otherwise]]
|
||||
}
|
||||
}
|
||||
@property autodel {
|
||||
set {
|
||||
[[Set the window's autodel state.
|
||||
|
@ -905,6 +899,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
|
|||
Elm.Widget.focus_direction_manager_is;
|
||||
Elm.Widget.focus_next;
|
||||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus { get; }
|
||||
Elm.Widget.on_focus;
|
||||
Elm.Widget.widget_event;
|
||||
Elm.Widget.focus_manager_factory;
|
||||
|
|
|
@ -1148,3 +1148,12 @@ EAPI Evas_Object *elm_win_get(Evas_Object *obj);
|
|||
* @ingroup Efl_Ui_Win
|
||||
*/
|
||||
EAPI Eina_Bool elm_win_socket_listen(Efl_Ui_Win *obj, const char *svcname, int svcnum, Eina_Bool svcsys);
|
||||
|
||||
/**
|
||||
* @brief Get whether a window has focus.
|
||||
*
|
||||
* @return @c true if window has focus, @c false otherwise
|
||||
*
|
||||
* @ingroup Efl_Ui_Win
|
||||
*/
|
||||
EAPI Eina_Bool elm_win_focus_get(const Efl_Ui_Win *obj);
|
||||
|
|
Loading…
Reference in New Issue