2016-10-27 10:06:17 -07:00
|
|
|
import eina_types;
|
|
|
|
|
efl: apply the stabilzed column of the efl api board
Summary:
The project https://phab.enlightenment.org/tag/efl_api/ has been used in
the last few weeks to figure out which classes can be stablized and
which cannot. This commit moves those dedicated classes outside beta.
And makes them stable.
ref T7601
ref T7600
ref T7599
ref T7598
ref T7597
ref T7596
ref T7594
ref T7593
ref T7591
ref T7590
ref T7589
ref T7588
ref T7583
ref T7582
ref T7581
ref T7576
ref T7570
ref T7567
ref T7564
ref T7563
ref T7560
ref T7559
ref T7672
ref T7584
ref T7577
ref T7571
ref T7558
ref T7555
ref T7554
ref T7553
ref T7512
ref T7511
Depends on D8272
Reviewers: cedric, stefan_schmidt, zmike, segfaultxavi
Reviewed By: segfaultxavi
Subscribers: #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7672, T7601, T7600, T7599, T7598, T7597, T7596, T7594, T7593, T7591, T7590, T7589, T7588, T7584, T7583, T7582, T7581, T7577, T7576, T7571, T7570, T7567, T7564, T7563, T7560, T7559, T7558, T7555, T7554, T7553, T7512, T7511
Differential Revision: https://phab.enlightenment.org/D8273
2019-03-09 04:44:17 -08:00
|
|
|
mixin Efl.Ui.Focus.Object
|
2016-10-20 13:59:05 -07:00
|
|
|
{
|
2017-04-20 22:24:45 -07:00
|
|
|
[[Functions of focusable objects.
|
2019-03-22 08:25:22 -07:00
|
|
|
|
|
|
|
@since 1.22
|
2017-04-20 22:24:45 -07:00
|
|
|
]]
|
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 {
|
2019-09-13 03:25:49 -07:00
|
|
|
[[Whether the widget is currently focused or not.]]
|
2017-11-14 09:39:06 -08:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
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.
|
2019-09-03 02:46:52 -07:00
|
|
|
The element which is the $root of an @Efl.Ui.Focus.Manager will not
|
|
|
|
have this focus manager as this object, but rather the focus manager
|
|
|
|
where that is registered in.
|
2018-01-16 12:17:11 -08:00
|
|
|
]]
|
|
|
|
get {}
|
|
|
|
values {
|
2019-09-03 02:46:52 -07:00
|
|
|
manager : Efl.Ui.Focus.Manager; [[The manager object.]]
|
2018-01-16 12:17:11 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property focus_parent {
|
2019-09-03 02:46:52 -07:00
|
|
|
[[The logical parent used by this object.]]
|
2018-01-16 12:17:11 -08:00
|
|
|
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.
|
2019-09-03 02:46:52 -07:00
|
|
|
Overwrite this to have a chance to update the order of the children.
|
|
|
|
Deleting items in this call will 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 {
|
2019-09-02 07:24:26 -07:00
|
|
|
[[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 {
|
2019-09-03 02:46:52 -07:00
|
|
|
[[Virtual function handling focus in/out events on the widget.]]
|
|
|
|
return: bool; [[$true if this widget can handle focus, $false otherwise.]]
|
2018-01-19 00:25:47 -08:00
|
|
|
}
|
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-09-03 02:46:52 -07:00
|
|
|
focus_manager,changed: Efl.Ui.Focus.Manager; [[Emitted when a new manager is the parent for this object.]]
|
|
|
|
focus_parent,changed: Efl.Ui.Focus.Object; [[Emitted when a new logical parent should be used.]]
|
2019-02-22 01:41:38 -08:00
|
|
|
child_focus,changed: bool; [[Emitted if child_focus has changed.]]
|
2019-03-11 07:46:12 -07:00
|
|
|
focus_geometry,changed: Eina.Rect; [[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
|
|
|
}
|