2016-10-27 10:06:17 -07:00
import eina_types;
2019-02-14 08:37:02 -08:00
mixin @beta Efl.Ui.Focus.Object
2016-10-20 13:59:05 -07:00
{
2017-04-20 22:24:45 -07:00
[[Functions of focusable objects.
@since 1.20
]]
2016-10-20 13:59:05 -07:00
methods {
2017-04-30 01:57:56 -07:00
@property focus_geometry {
2019-02-22 01:41:38 -08:00
[[The geometry (that is, the bounding rectangle) used to calculate the
relationship with other objects.]]
get {}
2017-04-30 01:57:56 -07:00
values {
2017-09-13 19:59:44 -07:00
rect : Eina.Rect; [[The geometry to use.]]
2016-10-20 13:59:05 -07:00
}
}
@property focus {
2017-11-14 09:39:06 -08:00
get {
2018-09-26 00:21:26 -07:00
[[Returns whether the widget is currently focused or not.]]
2017-11-14 09:39:06 -08:00
}
set @protected {
2018-09-26 00:21:26 -07:00
[[This is called by the manager and should never be called by
anyone else.
The function emits the focus state events, if focus is
different to the previous state.
]]
2017-11-14 09:39:06 -08:00
}
2016-10-20 13:59:05 -07:00
values {
2019-02-22 01:41:38 -08:00
focus : bool; [[The focused state of the object.]]
2016-10-20 13:59:05 -07:00
}
}
2018-01-16 12:17:11 -08:00
@property focus_manager {
2019-02-17 09:08:42 -08:00
[[This is the focus manager where this focus object is registered in.
The element which is the $root of a Efl.Ui.Focus.Manager will not have this focus manager as this object, but rather the second focus manager where it is registered in.
2018-01-16 12:17:11 -08:00
]]
get {}
values {
manager : Efl.Ui.Focus.Manager; [[The manager object]]
}
}
@property focus_parent {
[[Describes which logical parent is used by this object.]]
get {}
values {
logical_parent : Efl.Ui.Focus.Object; [[The focus parent.]]
}
}
2018-09-24 02:02:09 -07:00
@property child_focus @protected {
2019-02-22 01:41:38 -08:00
[[Indicates if a child of this object has focus set to true.]]
2018-09-24 02:02:09 -07:00
values {
2019-02-22 01:41:38 -08:00
child_focus : bool; [[$true if a child has focus.]]
2018-09-24 02:02:09 -07:00
}
}
2019-02-21 12:46:32 -08:00
setup_order {
2019-02-22 01:41:38 -08:00
[[Tells the object that its children will be queried soon by the focus manager.
Overwrite this to update the order of the children. Deleting items in this call will
2019-02-21 12:46:32 -08:00
result in undefined behaviour and may cause your system to crash.
2017-10-13 02:09:03 -07:00
]]
}
2019-02-21 12:46:32 -08:00
setup_order_non_recursive @protected {
[[This is called when @.setup_order is called, but only on the first call, additional recursive calls to @.setup_order will not call this function again.]]
2018-04-06 03:48:41 -07:00
}
2019-01-23 11:55:17 -08:00
on_focus_update @protected {
2018-01-19 00:25:47 -08:00
[[Virtual function handling focus in/out events on the widget]]
return: bool; [[$true if this widget can handle focus, $false otherwise]]
}
2016-10-20 13:59:05 -07:00
}
implements {
2017-04-30 01:57:56 -07:00
@empty .focus_geometry;
2019-02-21 12:46:32 -08:00
@empty .setup_order_non_recursive;
2018-01-16 12:17:11 -08:00
@empty .focus_manager;
@empty .focus_parent;
2019-01-23 11:55:17 -08:00
@empty .on_focus_update;
2016-10-20 13:59:05 -07:00
}
events {
2019-02-22 01:41:38 -08:00
focus,changed : bool; [[Emitted if the focus state has changed.]]
2019-02-21 12:35:34 -08:00
focus_manager,changed: Efl.Ui.Focus.Manager; [[Emitted when a new manager is
2018-01-16 12:17:11 -08:00
the parent for this object.]]
2019-02-21 12:35:34 -08:00
focus_parent,changed: Efl.Ui.Focus.Object; [[Emitted when a new logical
2018-01-16 12:17:11 -08:00
parent should be used.]]
2019-02-22 01:41:38 -08:00
child_focus,changed: bool; [[Emitted if child_focus has changed.]]
focus_geometry,changed: void; [[Emitted if focus geometry of this object has changed.]]
2016-10-20 13:59:05 -07:00
}
2017-04-20 22:24:45 -07:00
}