forked from enlightenment/efl
169 lines
6.4 KiB
Plaintext
169 lines
6.4 KiB
Plaintext
import efl_ui;
|
|
|
|
struct Efl.Ui.Focus.Relations {
|
|
[[Structure holding the graph of relations between focussable objects.
|
|
|
|
@since 1.20
|
|
]]
|
|
right : list<Efl.Ui.Focus.Object>; [[List of objects on the right side]]
|
|
left : list<Efl.Ui.Focus.Object>; [[[List of objects on the left side]]
|
|
top : list<Efl.Ui.Focus.Object>; [[[List of objects above]]
|
|
down : list<Efl.Ui.Focus.Object>; [[[List of objects below]]
|
|
next : Efl.Ui.Focus.Object; [[[Next object]]
|
|
prev : Efl.Ui.Focus.Object; [[Previous object]]
|
|
parent : Efl.Ui.Focus.Object; [[Parent object]]
|
|
redirect : Efl.Ui.Focus.Manager; [[Redirect manager]]
|
|
node : Efl.Ui.Focus.Object; [[The node where this is the information from]]
|
|
logical : bool; [[true if this node is only logical]]
|
|
position_in_history : int; [[The position in the history stack]]
|
|
}
|
|
|
|
struct Efl.Ui.Focus.Manager.Logical_End_Detail {
|
|
[[Structure holding the focus object with extra information on logical end
|
|
|
|
@since 1.21
|
|
]]
|
|
is_regular_end : bool; [[$true if logical end, $false otherwise]]
|
|
element : Efl.Ui.Focus.Object; [[Focus object element]]
|
|
}
|
|
|
|
interface Efl.Ui.Focus.Manager {
|
|
[[Calculates the directions of Efl.Ui.Focus.Direction
|
|
|
|
Each registered item will get a other registered object into each
|
|
direction, you can get those items for the currently focused item if
|
|
you call request move.
|
|
|
|
@since 1.20
|
|
]]
|
|
methods {
|
|
move {
|
|
[[Move the focus into the given direction.
|
|
|
|
This call flushes all changes.
|
|
This means all changes between the last flush and now are computed
|
|
]]
|
|
params {
|
|
direction : Efl.Ui.Focus.Direction; [[The direction to move to]]
|
|
}
|
|
return : Efl.Ui.Focus.Object; [[The element which is now focused]]
|
|
}
|
|
request_move {
|
|
[[Returns the object which would be the next object to focus in the
|
|
given direction.
|
|
]]
|
|
params {
|
|
direction : Efl.Ui.Focus.Direction; [[Direction to move focus]]
|
|
}
|
|
return : Efl.Ui.Focus.Object; [[Next object to focus]]
|
|
}
|
|
@property focus {
|
|
[[The element which is currently focused by this manager
|
|
|
|
For the case focus is a logical child, then the item will go to the next none logical element. If there is none, focus will stay where it is right now.
|
|
]]
|
|
|
|
values {
|
|
focus : Efl.Ui.Focus.Object @nonull; [[Focused element]]
|
|
}
|
|
}
|
|
@property redirect {
|
|
[[Add a another manager to serve the move requests.
|
|
|
|
If this value is set, all move requests are redirected to this
|
|
manager object. Set it to $null once nothing should be redirected
|
|
anymore.
|
|
]]
|
|
values {
|
|
redirect : Efl.Ui.Focus.Manager; [[The redirect manager.]]
|
|
}
|
|
}
|
|
@property border_elements {
|
|
[[The list of elements which are at the border of the graph.
|
|
|
|
This means one of the relations right,left or down,up are not set.
|
|
This call flushes all changes. See @Efl.Ui.Focus.Manager.move
|
|
]]
|
|
get {}
|
|
values {
|
|
border_elements : iterator<Efl.Ui.Focus.Object>; [[An iterator
|
|
over the border objects.]]
|
|
}
|
|
}
|
|
@property root {
|
|
[[Root node for all logical subtrees.
|
|
|
|
This property can only be set once.
|
|
]]
|
|
set {
|
|
return : bool; [[If $true, this is the root node]]
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
|
root : Efl.Ui.Focus.Object @nonull; [[Will be registered into
|
|
this manager object.]]
|
|
}
|
|
}
|
|
request_subchild {
|
|
[[Returns a widget that can receive focus
|
|
|
|
The returned widget is in a child of the passed param.
|
|
Its garanteed that child will not be prepared once again,
|
|
so you can call this function out of a prepare call.
|
|
]]
|
|
params {
|
|
child : Efl.Ui.Focus.Object;
|
|
}
|
|
return : Efl.Ui.Focus.Object;
|
|
}
|
|
fetch {
|
|
[[This will fetch the data from a registered node.
|
|
|
|
Be aware this function will trigger all dirty nodes to be computed
|
|
]]
|
|
params {
|
|
child : Efl.Ui.Focus.Object; [[The child object to inspect.]]
|
|
}
|
|
return : ptr(Efl.Ui.Focus.Relations) @owned; [[The list of relations
|
|
starting from $child.]]
|
|
}
|
|
logical_end {
|
|
[[Return the last logical object.
|
|
|
|
The returned object is the last object that would be returned if you start at the root and move the direction into next.
|
|
]]
|
|
return : Efl.Ui.Focus.Manager.Logical_End_Detail; [[Last object]]
|
|
}
|
|
reset_history {
|
|
[[Reset the history stack of this manager object.
|
|
This means the most upper element will be unfocused, all other elements will be removed from the remembered before.
|
|
|
|
To not break the assertion that there should be always a focused element, you should focus a other element immidiatly after calling that.
|
|
]]
|
|
}
|
|
pop_history_stack {
|
|
[[Removes the most upper history element, and gives the focus to the next one below]]
|
|
}
|
|
setup_on_first_touch {
|
|
[[Called when this manager is set as redirect]]
|
|
params {
|
|
direction : Efl.Ui.Focus.Direction; [[The direction in which this should be setup]]
|
|
entry : Efl.Ui.Focus.Object; [[The object that caused this manager to be redirect]]
|
|
}
|
|
}
|
|
}
|
|
events {
|
|
redirect,changed : Efl.Ui.Focus.Manager; [[Emitted when the redirect
|
|
object has changed, the old manager is passed as event info]]
|
|
flush,pre; [[Emitted once the graph calculationg will be performed]]
|
|
coords,dirty; [[Emitted once the graph is dirty, this means there are
|
|
potential changes in border_elements you want to know about]]
|
|
focused : Efl.Ui.Focus.Object; [[Emitted if the manager has focused an
|
|
object, the passed focus object is the last focused object]]
|
|
}
|
|
}
|