forked from enlightenment/efl
80 lines
3.9 KiB
Plaintext
80 lines
3.9 KiB
Plaintext
enum @beta Efl.Ui.Spotlight.Manager_Switch_Reason {
|
|
[[Indicator for the reason of a @Efl.Ui.Spotlight.Manager.switch_to call]]
|
|
jump, [[The Reason for this switch is a casual jump caused by @Efl.Ui.Spotlight.Container.active_element]]
|
|
push, [[The Reason for this switch is a casual jump caused by @Efl.Ui.Spotlight.Container.push]]
|
|
pop [[The Reason for this switch is a casual jump caused by @Efl.Ui.Spotlight.Container.pop]]
|
|
}
|
|
|
|
abstract @beta Efl.Ui.Spotlight.Manager extends Efl.Object {
|
|
[[Manager object used by @Efl.Ui.Spotlight.Container to handle rendering and animation of its sub-widgets,
|
|
and user interaction.
|
|
|
|
For instance, changes to the current sub-widget in the spotlight (@Efl.Ui.Spotlight.Container.active_element) can be
|
|
animated with a transition.
|
|
This object can also handle user interaction. For example, dragging the sub-widget to one side to get to a
|
|
different sub-widget (like an smartphone home screen).
|
|
Such user interactions should end up setting a new @Efl.Ui.Spotlight.Container.active_element.
|
|
During a transition, the evolution of the current position should be exposed by emitting $pos_update events.
|
|
]]
|
|
methods {
|
|
bind @pure_virtual {
|
|
[[This method is called the first time an @Efl.Ui.Spotlight.Manager is assigned to an
|
|
@Efl.Ui.Spotlight.Container, binding them together.
|
|
The manager can read the current content of the container, subscribe to events, or do any initialization it
|
|
requires.
|
|
]]
|
|
params {
|
|
spotlight : Efl.Ui.Spotlight.Container; [[The container to bind the manager to.]]
|
|
}
|
|
}
|
|
content_add @pure_virtual {
|
|
[[A $subobj has been added at position $index in the bound container.]]
|
|
params {
|
|
subobj : Efl.Gfx.Entity; [[The new object that has been added to the container.]]
|
|
index : int; [[The index of the new object in the container's list.]]
|
|
}
|
|
}
|
|
content_del @pure_virtual {
|
|
[[The $subobj at position $index in the bound container has been removed.]]
|
|
params {
|
|
subobj : Efl.Gfx.Entity; [[The object being removed from the container.]]
|
|
index : int; [[The index this object had in the container's list.]]
|
|
}
|
|
}
|
|
switch_to @pure_virtual {
|
|
[[Switch from one sub-widget to another. If there was no previous sub-widget, $from might be -1.
|
|
This function should display an animation if the @Efl.Ui.Spotlight.Manager supports them.
|
|
]]
|
|
params {
|
|
from : int; [[Index of the starting sub-widget in the container's list. Might be -1 if unknown.]]
|
|
to : int; [[Index of the target sub-widget in the container's list.]]
|
|
reason : Efl.Ui.Spotlight.Manager_Switch_Reason; [[The reason for this switch to call]]
|
|
}
|
|
}
|
|
@property size @pure_virtual {
|
|
[[Will be called whenever the @Efl.Ui.Spotlight.Container.spotlight_size changes so the
|
|
@Efl.Ui.Spotlight.Manager can update itself.]]
|
|
set {
|
|
}
|
|
values {
|
|
size : Eina.Size2D; [[The new size of the sub-widgets.]]
|
|
}
|
|
}
|
|
@property animated_transition @pure_virtual {
|
|
[[When this flag is $true the transition from the previous element to the new one will be animated whenever
|
|
@Efl.Ui.Spotlight.Container.active_element changes.]]
|
|
values {
|
|
enable : bool; [[$true to enable animated transitions. If $false, the new active element is shown
|
|
immediately.]]
|
|
}
|
|
}
|
|
}
|
|
events {
|
|
pos_update : double; [[Index of the sub-widget currently being displayed. Fractional values indicate a position
|
|
in-between sub-widgets. For instance, when transitioning from sub-widget 2 to sub-widget 3,
|
|
this event should be emitted with monotonically increasing values ranging from 2.0 to 3.0.
|
|
Animations can perform any movement they want, but the reported $pos_update must move in
|
|
the same direction.]]
|
|
}
|
|
}
|