2015-09-18 02:38:04 -07:00
|
|
|
import elm_general;
|
|
|
|
|
2017-08-21 23:16:54 -07:00
|
|
|
function Efl.Ui.Scrollable_On_Show_Region
|
|
|
|
{
|
|
|
|
params {
|
|
|
|
@in obj: Efl.Canvas.Object;
|
|
|
|
@in region: Eina.Rectangle;
|
|
|
|
}
|
|
|
|
};
|
2016-04-19 08:07:55 -07:00
|
|
|
|
2016-10-26 14:51:04 -07:00
|
|
|
struct @extern Elm.Theme; [[Elementary theme]]
|
2016-02-15 17:57:10 -08:00
|
|
|
|
2017-06-09 00:47:42 -07:00
|
|
|
abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
|
|
|
|
Elm.Interface.Atspi_Component, Efl.Ui.Focus.User,
|
2017-08-02 02:35:57 -07:00
|
|
|
Efl.Ui.Focus.Object, Efl.Ui.Base, Efl.Ui.Cursor)
|
2014-03-14 02:13:29 -07:00
|
|
|
{
|
2016-11-17 03:54:29 -08:00
|
|
|
[[Elementary widget abstract class]]
|
2016-05-12 09:06:04 -07:00
|
|
|
legacy_prefix: elm_widget;
|
2014-03-14 02:13:29 -07:00
|
|
|
eo_prefix: elm_obj_widget;
|
2016-05-17 09:14:47 -07:00
|
|
|
event_prefix: elm_widget;
|
2014-03-14 02:13:29 -07:00
|
|
|
data: Elm_Widget_Smart_Data;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
2017-08-08 04:37:41 -07:00
|
|
|
@property resize_object @protected {
|
|
|
|
[[This is the internal canvas object managed by a widget.
|
|
|
|
|
|
|
|
This property is protected as it is meant for widget implementations
|
|
|
|
only, to set and access the internal canvas object. Do use this
|
|
|
|
function unless you're implementing a widget.
|
|
|
|
]]
|
|
|
|
set {
|
|
|
|
[[Sets the new resize object for this widget.]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
sobj: Efl.Canvas.Object @nullable;
|
|
|
|
[[A canvas object (often a $Efl.Canvas.Layout object).]]
|
|
|
|
}
|
|
|
|
}
|
2017-08-08 06:10:58 -07:00
|
|
|
@property disabled {
|
|
|
|
[[Whether the widget is enabled (accepts and reacts to user inputs).
|
|
|
|
|
|
|
|
Each widget may handle the disabled state differently, but overall
|
|
|
|
disabled widgets shall not respond to any input events. This is
|
|
|
|
$false by default, meaning the widget is enabled.
|
|
|
|
]]
|
2017-08-23 22:06:32 -07:00
|
|
|
set {
|
|
|
|
[[Enables or disables this widget.
|
|
|
|
|
|
|
|
Disabling a widget will disable all its children recursively,
|
|
|
|
but only this widget will be marked as disabled internally.
|
|
|
|
]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Returns whether the widget is disabled.
|
|
|
|
|
|
|
|
This will return $true if any widget in the parent hierarchy
|
|
|
|
is disabled. Re-enabling that parent may in turn change the
|
|
|
|
disabled state of this widget.
|
|
|
|
]]
|
|
|
|
}
|
2017-08-08 06:10:58 -07:00
|
|
|
values {
|
|
|
|
disabled: bool(false); [[$true if the widget is disabled.]]
|
|
|
|
}
|
|
|
|
}
|
2017-08-09 00:13:06 -07:00
|
|
|
@property style {
|
|
|
|
[[The widget style to use.
|
|
|
|
|
|
|
|
Styles define different look and feel for widgets, and may provide
|
|
|
|
different parts for layout-based widgets. Styles vary from widget
|
|
|
|
to widget and may be defined by other themes by means of extensions
|
|
|
|
and overlays.
|
|
|
|
|
|
|
|
The style can only be set before @Efl.Object.finalize, which means
|
|
|
|
at construction time of the object (inside $efl_add in C).
|
|
|
|
]]
|
2017-08-09 00:22:48 -07:00
|
|
|
set @protected {
|
2017-08-09 00:13:06 -07:00
|
|
|
[[Can only be called during construction, before finalize.]]
|
|
|
|
return: Efl.Ui.Theme.Apply(0);
|
|
|
|
[[Whether the style was successfully applied or not, see
|
|
|
|
the values of @Efl.Ui.Theme.Apply for more information.]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Returns the current style of a widget.]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
style: string;
|
|
|
|
[[Name of the style to use. Refer to each widget's documentation
|
|
|
|
for the available style names, or to the themes in use.]]
|
|
|
|
}
|
|
|
|
}
|
2017-08-17 02:14:52 -07:00
|
|
|
widget_event @protected {
|
|
|
|
[[Virtual function handling input events on the widget.
|
|
|
|
|
|
|
|
This method should return $true if the event has been processed.
|
|
|
|
Only key down, key up and pointer wheel events will be propagated
|
|
|
|
through this function.
|
|
|
|
|
|
|
|
It is common for the event to be also marked as processed as in
|
|
|
|
@Efl.Input.Event.processed, if this operation was successful. This
|
|
|
|
makes sure other widgets will not also process this input event.
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
@in eo_event: const(ptr(Efl.Event));
|
|
|
|
[[EO event struct with an Efl.Input.Event as info.]]
|
|
|
|
@in source: Efl.Canvas.Object;
|
|
|
|
[[Source object where the event originated. Often same as this.]]
|
|
|
|
}
|
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
|
|
|
legacy: null;
|
|
|
|
}
|
2017-08-17 06:17:53 -07:00
|
|
|
@property orientation_mode_disabled {
|
|
|
|
[[Whether the widget's automatic orientation is disabled or not.
|
|
|
|
|
|
|
|
Orientation mode is used for widgets to change their style or send
|
|
|
|
signals based on the canvas rotation (i.e. the window orientation).
|
|
|
|
If the orientation mode is enabled, the widget will emit signals
|
|
|
|
such as "elm,state,orient,N" where $N is one of 0, 90, 180, 270,
|
|
|
|
depending on the window orientation. Such signals may be handled by
|
|
|
|
the theme in order to provide a different look for the widget based
|
|
|
|
on the canvas orientation.
|
|
|
|
|
|
|
|
By default orientation mode is enabled, which means this property
|
|
|
|
is $false.
|
|
|
|
]]
|
|
|
|
values {
|
|
|
|
disabled: bool(false); [[$true if the orientation mode is disabled.]]
|
|
|
|
}
|
|
|
|
}
|
2017-08-17 06:45:08 -07:00
|
|
|
// FIXME: This property may be simply removed from EO (replaced by focus manager stuff)
|
2015-05-07 09:32:53 -07:00
|
|
|
@property focus {
|
2017-08-17 06:45:08 -07:00
|
|
|
[[Whether the object is focused for inputs.
|
|
|
|
|
|
|
|
If an object is focused it will be the first to receive keyboard
|
|
|
|
inputs. Only visible, non-disabled objects can be focused.
|
|
|
|
|
|
|
|
Focus can be disabled by setting @.focus_allow to $false.
|
|
|
|
]]
|
|
|
|
set {
|
|
|
|
[[Set or unsets the focus on this widget.
|
|
|
|
|
|
|
|
Note: When you set focus to this object, if it can handle focus,
|
|
|
|
will take the focus away from the one who had it previously and
|
|
|
|
will, for now on, be the one receiving input events. Unsetting
|
|
|
|
focus will remove the focus from this object, passing it back to
|
|
|
|
the previous element as defined by the focus manager policy.
|
|
|
|
]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Gets whether this object is currently focused.]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
focus: bool(false); [[Whether the object is focused.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// FIXME: focus_allow? can_focus? focusable?
|
|
|
|
@property focus_allow {
|
|
|
|
[[The ability for a widget to be focused.
|
|
|
|
|
|
|
|
Unfocusable objects do nothing when programmatically focused. The
|
|
|
|
nearest focusable parent object the one really getting focus. Also,
|
|
|
|
when they receive mouse input, they will get the event, but not take
|
|
|
|
away the focus from where it was previously.
|
|
|
|
|
|
|
|
Note: Objects which are meant to be interacted with by input events
|
|
|
|
are created able to be focused, by default. All the others are not.
|
|
|
|
|
|
|
|
This property's default value depends on the widget (eg. a box is
|
|
|
|
not focusable, but a button is).
|
|
|
|
]]
|
|
|
|
set {
|
|
|
|
legacy: elm_widget_can_focus_set;
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
legacy: elm_widget_can_focus_get;
|
|
|
|
}
|
2014-03-14 02:13:29 -07:00
|
|
|
values {
|
2017-08-17 06:45:08 -07:00
|
|
|
can_focus: bool; [[Whether the object is focusable.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-23 00:24:05 -07:00
|
|
|
@property widget_parent @protected {
|
|
|
|
[[The internal parent of this widget.
|
|
|
|
|
|
|
|
@Elm.Widget objects have a parent hierarchy that may differ slightly
|
|
|
|
from their @Efl.Object or @Efl.Canvas.Object hierarchy. This is
|
|
|
|
meant for internal handling.
|
|
|
|
|
|
|
|
See also @.widget_top.
|
|
|
|
]]
|
|
|
|
set {}
|
|
|
|
get {
|
|
|
|
legacy: elm_widget_parent_get; /* internal in legacy */
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
parent: Elm.Widget @nullable; [[Widget parent object]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@property widget_top {
|
|
|
|
[[Root widget in the widget hierarchy.
|
|
|
|
|
|
|
|
This returns the top widget, in terms of widget hierarchy. This is
|
|
|
|
usually a window ($Efl.Ui.Win). This function walks the list of
|
|
|
|
@.widget_parent.
|
|
|
|
|
|
|
|
If this widget has no parent (in terms of widget hierarchy) this
|
|
|
|
will return $null.
|
|
|
|
|
|
|
|
Note: This may not be a display manager window in case of nested
|
|
|
|
canvases. If a "real" window is required, then you might want to
|
|
|
|
verify that the returned object is a $Efl.Ui.Win_Inlined, and then
|
|
|
|
get $Efl.Ui.Win_Inlined.inlined_parent to find an object in the
|
|
|
|
master window.
|
|
|
|
|
|
|
|
See also @.widget_parent.
|
|
|
|
]]
|
|
|
|
get {
|
|
|
|
legacy: elm_widget_top_get; /* internal in legacy */
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
top: Elm.Widget; [[Top widget, usually a window.]]
|
|
|
|
}
|
|
|
|
}
|
2017-08-17 06:45:08 -07:00
|
|
|
|
2017-08-23 04:11:49 -07:00
|
|
|
/* Theme API: Not bound to EO */
|
|
|
|
@property theme @beta {
|
2016-11-17 03:54:29 -08:00
|
|
|
[[Widget theme]]
|
2014-03-14 02:13:29 -07:00
|
|
|
values {
|
2016-11-17 03:54:29 -08:00
|
|
|
th: ptr(Elm.Theme) @nullable; [[Elementary theme]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-23 04:11:49 -07:00
|
|
|
@property theme_object @beta {
|
|
|
|
[[Theme object property]]
|
2014-03-14 02:13:29 -07:00
|
|
|
set {
|
2017-08-23 04:11:49 -07:00
|
|
|
return: Efl.Ui.Theme.Apply; [[Theme apply]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
2017-08-23 04:11:49 -07:00
|
|
|
values {
|
|
|
|
edj: Efl.Canvas.Object; [[Edje object]]
|
|
|
|
wname: string; [[Widget name]]
|
|
|
|
welement: string; [[Widget element]]
|
|
|
|
wstyle: string; [[Widget style]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-23 04:11:49 -07:00
|
|
|
|
|
|
|
/* Accessibility */
|
2015-05-07 09:32:53 -07:00
|
|
|
@property access_info {
|
2017-08-28 21:50:56 -07:00
|
|
|
[[Accessibility information.
|
|
|
|
|
|
|
|
This is a replacement string to be read by the accessibility
|
|
|
|
text-to-speech engine, if accessibility is enabled by configuration.
|
|
|
|
This will take precedence over the default text for this object,
|
|
|
|
which means for instance that the label of a button won't be read
|
|
|
|
out loud, instead $txt will be read out.
|
|
|
|
]]
|
2014-03-14 02:13:29 -07:00
|
|
|
values {
|
2017-08-28 21:50:56 -07:00
|
|
|
txt: string @nullable; [[Accessibility text description.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-23 23:31:05 -07:00
|
|
|
on_access_activate @protected @beta {
|
|
|
|
[[Hook function called when widget is activated through accessibility.
|
|
|
|
|
|
|
|
This meant to be overridden by subclasses to support accessibility.
|
|
|
|
This is an unstable API.
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
@in act: Elm.Activate; [[Type of activation.]]
|
|
|
|
}
|
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
|
|
|
legacy: null; /* FIXME: legacy API does extra work */
|
|
|
|
}
|
|
|
|
on_access_update @protected @beta {
|
|
|
|
[[Hook function called when accessibility is changed on the widget.
|
|
|
|
|
|
|
|
This meant to be overridden by subclasses to support accessibility.
|
|
|
|
This is an unstable API.
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
@in enable: bool; [[$true if accessibility is enabled.]]
|
|
|
|
}
|
|
|
|
legacy: null; /* FIXME: legacy API does extra work */
|
|
|
|
}
|
2017-08-23 04:11:49 -07:00
|
|
|
|
|
|
|
/* Translation & Text API. */
|
|
|
|
translate @protected {
|
|
|
|
[[Virtual function handling language changes.]]
|
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
|
|
|
legacy: null;
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property domain_part_text_translatable {
|
2017-08-23 04:11:49 -07:00
|
|
|
[[Translate domain text part property]]
|
2014-03-14 02:13:29 -07:00
|
|
|
set {
|
|
|
|
}
|
|
|
|
values {
|
2016-11-23 02:36:28 -08:00
|
|
|
part: string; [[Part name]]
|
|
|
|
domain: string; [[Domain]]
|
|
|
|
translatable: bool; [[$true if translatable, $false otherwise]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-23 04:11:49 -07:00
|
|
|
@property part_text {
|
|
|
|
[[Part text property]]
|
|
|
|
keys {
|
|
|
|
part: string; [[Part name]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
values {
|
2017-08-23 04:11:49 -07:00
|
|
|
label: string; [[Label]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
translatable_part_text_get @const {
|
|
|
|
[[Get translatable part text]]
|
|
|
|
return: string; [[Part text]]
|
|
|
|
params {
|
|
|
|
@in part: string; [[Part name]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property domain_translatable_part_text {
|
2017-08-23 04:11:49 -07:00
|
|
|
[[Domain translatable text part property]]
|
2014-03-14 02:13:29 -07:00
|
|
|
set {
|
|
|
|
}
|
|
|
|
values {
|
2016-11-23 02:36:28 -08:00
|
|
|
part: string; [[Part name]]
|
|
|
|
domain: string; [[Domain name]]
|
|
|
|
label: string; [[Label]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-23 04:11:49 -07:00
|
|
|
part_text_translate {
|
|
|
|
[[Translate part text]]
|
|
|
|
return: string; [[Translated text]]
|
|
|
|
params {
|
|
|
|
@in part: string; [[Part name]]
|
|
|
|
@in text: string; [[Text]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-23 04:11:49 -07:00
|
|
|
|
|
|
|
/* Internal hooks. */
|
2017-08-23 04:41:37 -07:00
|
|
|
widget_sub_object_add @protected {
|
|
|
|
[[Virtual function handling sub objects being added.
|
|
|
|
|
|
|
|
Sub objects can be any canvas object, not necessarily widgets.
|
|
|
|
|
|
|
|
See also @.widget_parent.
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
@in sub_obj: Efl.Canvas.Object;
|
|
|
|
[[Sub object to be added. Not necessarily a widget itself.]]
|
|
|
|
}
|
|
|
|
return: bool; [[Indicates if the operation succeeded.]]
|
|
|
|
legacy: elm_widget_sub_object_add;
|
|
|
|
}
|
|
|
|
widget_sub_object_del @protected {
|
|
|
|
[[Virtual function handling sub objects being removed.
|
|
|
|
|
|
|
|
Sub objects can be any canvas object, not necessarily widgets.
|
|
|
|
|
|
|
|
See also @.widget_parent.
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
@in sub_obj: Efl.Canvas.Object;
|
|
|
|
[[Sub object to be removed. Should be a child of this widget.]]
|
|
|
|
}
|
|
|
|
return: bool; [[Indicates if the operation succeeded.]]
|
|
|
|
legacy: elm_widget_sub_object_del;
|
|
|
|
}
|
2017-08-23 21:45:01 -07:00
|
|
|
on_orientation_update @protected {
|
|
|
|
[[Virtual function handling canvas orientation changes.
|
|
|
|
|
|
|
|
This method will be called recursively from the top widget (the
|
|
|
|
window) to all the children objects whenever the window rotation
|
|
|
|
is changed. The given $rotation will be one of 0, 90, 180, 270 or
|
|
|
|
the special value -1 if @.orientation_mode_disabled is $true.
|
|
|
|
|
|
|
|
If @.orientation_mode_disabled is $false, the default implementation
|
|
|
|
will emit the signal "elm,state,orient,$R" will be emitted (where $R
|
|
|
|
is the rotation angle in degrees).
|
|
|
|
|
2017-08-23 22:06:32 -07:00
|
|
|
Note: This function may be called even if the orientation has not
|
|
|
|
actually changed, like when a widget needs to be reconfigured.
|
|
|
|
|
2017-08-23 21:45:01 -07:00
|
|
|
See also @Efl.Orientation.orientation.set.
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
rotation: int; [[Orientation in degrees: 0, 90, 180, 270 or -1 if
|
|
|
|
@.orientation_mode_disabled is $true.]]
|
2017-08-23 04:11:49 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-23 22:06:32 -07:00
|
|
|
on_disabled_update @protected {
|
|
|
|
[[Virtual function called when the widget becomes disabled.
|
|
|
|
|
|
|
|
This may be triggered even if this widget is not disabled, as the
|
|
|
|
parent widget could be disabled and propagate its state.
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
disabled: bool; [[The new value of @.disabled.]]
|
|
|
|
}
|
|
|
|
return: bool; [[Indicates if the operation succeeded.]]
|
2017-08-23 04:11:49 -07:00
|
|
|
}
|
2017-08-23 22:33:36 -07:00
|
|
|
theme_apply @protected {
|
|
|
|
[[Virtual function called when the widget needs to re-apply its theme.
|
|
|
|
|
|
|
|
This may be called when the object is first created, or whenever
|
|
|
|
the widget is modified in any way that may require a reload of the
|
|
|
|
theme. This may include but is not limited to scale, theme, or
|
|
|
|
mirrored mode changes.
|
|
|
|
|
|
|
|
Note: even widgets not based on layouts may override this method
|
|
|
|
to handle widget updates (scale, mirrored mode, etc...).
|
|
|
|
]]
|
|
|
|
return: Efl.Ui.Theme.Apply; [[Indicates success, and if the current
|
|
|
|
theme or default theme was used.]]
|
2017-08-23 04:11:49 -07:00
|
|
|
}
|
|
|
|
on_focus {
|
|
|
|
[['Virtual' function handling focus in/out events on the widget]]
|
|
|
|
params {
|
|
|
|
@in item: Elm.Widget.Item @nullable; [[Widget]]
|
|
|
|
}
|
|
|
|
return: bool; [[$true if this widget can handle focus, $false otherwise]]
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Scroll API. */
|
|
|
|
@property on_show_region_hook {
|
|
|
|
[[Region hook on show property]]
|
|
|
|
set {}
|
|
|
|
values {
|
|
|
|
func: Efl.Ui.Scrollable_On_Show_Region @nullable; [[Region hook function]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property item_loop_enabled {
|
2015-08-07 06:16:55 -07:00
|
|
|
[[Control item loop feature.]]
|
2014-03-24 01:35:07 -07:00
|
|
|
values {
|
2016-11-23 02:36:28 -08:00
|
|
|
enable: bool; [[$true if item loop is enabled, $false otherwise]]
|
2014-03-24 01:35:07 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-23 04:11:49 -07:00
|
|
|
scroll_hold_push {
|
|
|
|
[[Push scroll hold]]
|
|
|
|
}
|
2017-08-29 19:29:08 -07:00
|
|
|
|
|
|
|
/* FIXME: property with a Eina.Rectangle */
|
2017-08-23 04:11:49 -07:00
|
|
|
show_region_set {
|
|
|
|
[[Set show region]]
|
|
|
|
params {
|
|
|
|
@in x: int; [[X coordinate]]
|
|
|
|
@in y: int; [[Y coordinate]]
|
|
|
|
@in w: int; [[Width]]
|
|
|
|
@in h: int; [[Height]]
|
|
|
|
@in forceshow: bool; [[$true if show should be forced, $false otherwise]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
show_region_get @const {
|
|
|
|
[[Get show region]]
|
|
|
|
params {
|
|
|
|
@out x: int @optional; [[X coordinate]]
|
|
|
|
@out y: int @optional; [[Y coordinate]]
|
|
|
|
@out w: int @optional; [[Width]]
|
|
|
|
@out h: int @optional; [[Height]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scroll_hold_pop {
|
|
|
|
[[Pop scroller hold]]
|
|
|
|
}
|
|
|
|
scroll_freeze_push {
|
|
|
|
[[Push scroller freeze]]
|
|
|
|
}
|
|
|
|
scroll_freeze_pop {
|
|
|
|
[[Pop scroller freeze]]
|
|
|
|
}
|
|
|
|
|
2015-05-07 09:32:53 -07:00
|
|
|
@property focus_region {
|
2017-08-28 22:18:50 -07:00
|
|
|
[[Region to show when focus changes within this widget.
|
|
|
|
|
|
|
|
When this widget or one of its subwidgets is given focus, this
|
|
|
|
region should be shown, which means any parent scroller should
|
|
|
|
attempt to display the given area of this widget. For instance, an
|
|
|
|
entry given focus should scroll to show the text cursor if that
|
|
|
|
cursor moves. In this example, this region defines the relative
|
|
|
|
geometry of the cursor within the widget.
|
|
|
|
|
|
|
|
Note: The region is relative to the top-left corner of the widget,
|
|
|
|
i.e. X,Y start from 0,0 to indicate the top-left corner of the
|
2017-08-29 19:29:08 -07:00
|
|
|
widget. W,H must be greater or equal to 1 for this region to be
|
|
|
|
taken into account, otherwise it is ignored.
|
2017-08-28 22:18:50 -07:00
|
|
|
|
|
|
|
See also @.focus_region_show.
|
|
|
|
]]
|
2014-03-14 02:13:29 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2017-08-29 19:29:08 -07:00
|
|
|
region: Eina.Rectangle;
|
|
|
|
[[The relative region to show. If width or height is <= 0 it
|
|
|
|
will be ignored, and no action will be taken.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2017-08-28 22:48:48 -07:00
|
|
|
focus_region_show @protected {
|
2017-08-29 19:29:08 -07:00
|
|
|
[[Show the region of interest inside this widget.
|
2017-08-28 22:48:48 -07:00
|
|
|
|
|
|
|
See also @.focus_region.
|
|
|
|
]]
|
|
|
|
}
|
|
|
|
/* FIXME: This enum is in Elm namespace! */
|
|
|
|
@property focus_region_show_mode {
|
|
|
|
[[Control the focus_region_show mode.]]
|
|
|
|
values {
|
|
|
|
mode: Elm.Focus.Region.Show_Mode; [[Focus region show mode]]
|
|
|
|
}
|
|
|
|
}
|
2017-08-29 00:41:53 -07:00
|
|
|
@property focus_highlight_geometry @protected {
|
2017-08-28 23:59:40 -07:00
|
|
|
[[The rectangle region to be highlighted on focus.
|
|
|
|
|
|
|
|
This is a rectangle region where the focus highlight should be
|
|
|
|
displayed.
|
|
|
|
]]
|
|
|
|
get {
|
|
|
|
[[This is a read-only property.]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
region: Eina.Rectangle; [[The rectangle area.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@property focus_highlight_style {
|
|
|
|
[[Control the widget focus highlight style.]]
|
|
|
|
set {
|
|
|
|
return: bool; [[$true on success, $false otherwise.]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
style: string; [[The name of the focus highlight style.]]
|
|
|
|
}
|
|
|
|
}
|
2017-08-28 22:29:45 -07:00
|
|
|
|
|
|
|
/* Old focus API. FIXME: Needs massive clean up! */
|
2015-05-07 09:32:53 -07:00
|
|
|
@property focus_order {
|
2017-08-23 04:11:49 -07:00
|
|
|
[[Focus order property]]
|
2014-03-14 02:13:29 -07:00
|
|
|
get {
|
2016-11-23 02:36:28 -08:00
|
|
|
return: uint; [[FIXME]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
focus_next_object_set {
|
2015-09-15 03:41:51 -07:00
|
|
|
[[Set the next object with specific focus direction.
|
|
|
|
|
|
|
|
@since 1.8]]
|
2014-03-14 02:13:29 -07:00
|
|
|
params {
|
2016-06-20 21:26:15 -07:00
|
|
|
@in next: Efl.Canvas.Object @nullable; [[Focus next object]]
|
2015-09-18 02:38:04 -07:00
|
|
|
@in dir: Elm.Focus_Direction; [[Focus direction]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2014-07-22 09:13:52 -07:00
|
|
|
focus_next_object_get @const {
|
2015-09-15 03:41:51 -07:00
|
|
|
[[Get the next object with specific focus direction.
|
|
|
|
|
|
|
|
@since 1.8]]
|
2016-06-20 21:26:15 -07:00
|
|
|
return: Efl.Canvas.Object; [[Focus next object]]
|
2014-03-14 02:13:29 -07:00
|
|
|
params {
|
2015-09-18 02:38:04 -07:00
|
|
|
@in dir: Elm.Focus_Direction; [[Focus direction]]
|
2015-09-15 03:41:51 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
focus_next_item_set {
|
|
|
|
[[Set the next object item with specific focus direction.
|
|
|
|
|
|
|
|
@since 1.16]]
|
|
|
|
params {
|
2016-05-23 07:41:28 -07:00
|
|
|
@in next_item: Elm.Widget.Item @nullable; [[Focus next object item]]
|
2015-09-18 02:38:04 -07:00
|
|
|
@in dir: Elm.Focus_Direction; [[Focus direction]]
|
2015-09-15 03:41:51 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
focus_next_item_get @const {
|
|
|
|
[[Get the next object item with specific focus direction.
|
|
|
|
|
|
|
|
@since 1.16]]
|
2016-05-23 07:41:28 -07:00
|
|
|
return: Elm.Widget.Item; [[Focus next object item]]
|
2015-09-15 03:41:51 -07:00
|
|
|
params {
|
2015-09-18 02:38:04 -07:00
|
|
|
@in dir: Elm.Focus_Direction; [[Focus direction]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
focus_custom_chain_prepend {
|
2016-02-15 07:04:48 -08:00
|
|
|
[[Prepend object to custom focus chain.
|
|
|
|
|
|
|
|
Note: If @"relative_child" equal to $null or not in custom chain,
|
|
|
|
the object will be added in begin.
|
|
|
|
|
|
|
|
Note: On focus cycle, only will be evaluated children of this container.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
params {
|
2016-06-20 21:26:15 -07:00
|
|
|
@in child: Efl.Canvas.Object; [[The child to be added in custom chain.]]
|
|
|
|
@in relative_child: Efl.Canvas.Object @optional; [[The relative object to position the child.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
focus_cycle {
|
2016-02-15 07:04:48 -08:00
|
|
|
[[Give focus to next object with specific focus direction in
|
|
|
|
object tree.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
params {
|
2016-02-15 07:04:48 -08:00
|
|
|
@in dir: Elm.Focus_Direction; [[Direction to move the focus.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2017-01-13 06:44:09 -08:00
|
|
|
focus_direction @pure_virtual {
|
2015-08-07 06:16:55 -07:00
|
|
|
[['Virtual' function handling passing focus to sub-objects given a direction, in degrees.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
params {
|
2016-11-23 02:36:28 -08:00
|
|
|
@in base: const(Efl.Canvas.Object); [[Base object]]
|
|
|
|
@in degree: double; [[Degree]]
|
|
|
|
@out direction: Efl.Canvas.Object; [[Direction]]
|
|
|
|
@out direction_item: Elm.Widget.Item; [[Direction item]]
|
|
|
|
@out weight: double; [[Weight]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
2016-11-23 02:36:28 -08:00
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
focus_next_manager_is {
|
2015-08-07 06:16:55 -07:00
|
|
|
[['Virtual' function which checks if handling of passing focus to sub-objects is supported by widget.]]
|
2016-11-23 02:36:28 -08:00
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
focused_object_clear {
|
2016-11-23 02:36:28 -08:00
|
|
|
[[Clear focused object]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
focus_direction_go {
|
2017-08-23 04:11:49 -07:00
|
|
|
[[Go in focus direction]]
|
2016-11-23 02:36:28 -08:00
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2014-03-14 02:13:29 -07:00
|
|
|
params {
|
2016-11-23 02:36:28 -08:00
|
|
|
@in degree: double; [[Degree]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2014-07-22 09:13:52 -07:00
|
|
|
focus_next_get @const {
|
2017-08-23 04:11:49 -07:00
|
|
|
[[Get next focus item]]
|
2016-11-23 02:36:28 -08:00
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2014-03-14 02:13:29 -07:00
|
|
|
params {
|
2016-11-23 02:36:28 -08:00
|
|
|
@in dir: Elm.Focus_Direction; [[Focus direction]]
|
|
|
|
@out next: Efl.Canvas.Object; [[Next object]]
|
|
|
|
@out next_item: Elm.Widget.Item; [[Next item]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
focus_restore {
|
2015-08-07 06:16:55 -07:00
|
|
|
[[Restore the focus state of the sub-tree.
|
2014-03-14 02:13:29 -07:00
|
|
|
|
|
|
|
This API will restore the focus state of the sub-tree to the latest
|
|
|
|
state. If a sub-tree is unfocused and wants to get back to the latest
|
2015-08-07 06:16:55 -07:00
|
|
|
focus state, this API will be helpful.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
focus_custom_chain_unset {
|
2016-02-15 07:04:48 -08:00
|
|
|
[[Unset a custom focus chain on a given Elementary widget.
|
|
|
|
|
|
|
|
Any focus chain previously set is removed entirely after this call.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
focus_steal {
|
2017-08-23 04:11:49 -07:00
|
|
|
[[Steal focus]]
|
2015-09-15 03:41:51 -07:00
|
|
|
params {
|
2016-11-23 02:36:28 -08:00
|
|
|
@in item: Elm.Widget.Item @nullable; [[Widget to steal focus from]]
|
2015-09-15 03:41:51 -07:00
|
|
|
}
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
focus_hide_handle {
|
2016-11-23 02:36:28 -08:00
|
|
|
[[Handle hide focus]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
2017-01-13 06:44:09 -08:00
|
|
|
focus_next @pure_virtual {
|
2015-08-07 06:16:55 -07:00
|
|
|
[['Virtual' function handling passing focus to sub-objects.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
params {
|
2016-11-23 02:36:28 -08:00
|
|
|
@in dir: Elm.Focus_Direction; [[Focus direction]]
|
|
|
|
@out next: Efl.Canvas.Object; [[Next object]]
|
|
|
|
@out next_item: Elm.Widget.Item; [[Next item]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
2016-11-23 02:36:28 -08:00
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
focus_mouse_up_handle {
|
2017-08-23 04:11:49 -07:00
|
|
|
[[Handle focus mouse up]]
|
2014-08-11 07:46:11 -07:00
|
|
|
legacy: null;
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
2014-07-22 09:13:52 -07:00
|
|
|
focus_direction_get @const {
|
2017-08-23 04:11:49 -07:00
|
|
|
[[Get focus direction]]
|
2016-11-23 02:36:28 -08:00
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2014-03-14 02:13:29 -07:00
|
|
|
params {
|
2016-11-23 02:36:28 -08:00
|
|
|
@in base: const(Efl.Canvas.Object); [[Base]]
|
|
|
|
@in degree: double; [[Degree]]
|
|
|
|
@out direction: Efl.Canvas.Object; [[Direction]]
|
|
|
|
@out direction_item: Elm.Widget.Item; [[Direction item]]
|
|
|
|
@out weight: double; [[Weight]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
focus_disabled_handle {
|
2016-11-23 02:36:28 -08:00
|
|
|
[[Handle disable widget focus]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
focus_custom_chain_append {
|
2016-02-15 07:04:48 -08:00
|
|
|
[[Append object to custom focus chain.
|
|
|
|
|
|
|
|
Note: If @"relative_child" equal to $null or not in custom chain,
|
|
|
|
the object will be added in end.
|
|
|
|
|
|
|
|
Note: On focus cycle, only will be evaluated children of this container.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
params {
|
2016-06-20 21:26:15 -07:00
|
|
|
@in child: Efl.Canvas.Object; [[The child to be added in custom chain.]]
|
|
|
|
@in relative_child: Efl.Canvas.Object @optional; [[The relative object to position the child.]]
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
}
|
2015-06-01 21:42:00 -07:00
|
|
|
@property focus_move_policy {
|
2016-10-12 02:14:58 -07:00
|
|
|
[[The widget's focus move policy.]]
|
2015-06-01 21:42:00 -07:00
|
|
|
values {
|
2016-11-23 02:36:28 -08:00
|
|
|
policy: Efl.Ui.Focus.Move_Policy; [[Focus move policy]]
|
2015-06-01 21:42:00 -07:00
|
|
|
}
|
2016-03-18 00:38:26 -07:00
|
|
|
}
|
2016-11-23 02:36:28 -08:00
|
|
|
@property focus_move_policy_automatic {
|
2016-08-12 08:42:16 -07:00
|
|
|
[[Control the widget's focus_move_policy mode setting.
|
2016-10-12 02:14:58 -07:00
|
|
|
|
2016-08-12 08:42:16 -07:00
|
|
|
@since 1.18]]
|
2016-03-18 00:38:26 -07:00
|
|
|
values {
|
|
|
|
automatic: bool; [[$true to follow system focus move policy change, $false otherwise]]
|
|
|
|
}
|
|
|
|
}
|
2016-11-23 02:36:28 -08:00
|
|
|
focus_reconfigure {
|
|
|
|
[[@since 1.18]]
|
2015-06-01 21:42:00 -07:00
|
|
|
}
|
2017-08-23 04:11:49 -07:00
|
|
|
@property focus_custom_chain {
|
|
|
|
[[A custom chain of objects to pass focus.
|
|
|
|
|
|
|
|
Note: On focus cycle, only will be evaluated children of this container.]]
|
|
|
|
set {
|
|
|
|
[[This function overwrites any previous custom focus chain within
|
|
|
|
the list of objects. The previous list will be deleted and this list
|
|
|
|
will be managed by elementary. After it is set, don't modify it.]]
|
|
|
|
values {
|
|
|
|
objs: list<Efl.Canvas.Object>; [[Chain of objects to pass focus]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
values {
|
|
|
|
objs: const(list<Efl.Canvas.Object>); [[Chain of objects]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@property focused_item {
|
|
|
|
get {
|
|
|
|
[[Get the focused widget item.]]
|
|
|
|
return: Elm.Widget.Item; [[Focused item]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@property focused_object {
|
|
|
|
[[Current focused object in object tree.]]
|
|
|
|
get {
|
|
|
|
return: Efl.Canvas.Object; [[Current focused or $null, if there is no focused object.]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Focus Manager API */
|
2016-12-07 07:59:13 -08:00
|
|
|
focus_register {
|
2017-04-25 02:32:03 -07:00
|
|
|
[[Register focus with focus manager]]
|
2016-12-07 07:59:13 -08:00
|
|
|
params {
|
2016-12-20 08:31:33 -08:00
|
|
|
manager : Efl.Ui.Focus.Manager; [[The manager to register against]]
|
|
|
|
logical : Efl.Ui.Focus.Object; [[The logical parent to use]]
|
2017-07-26 09:56:59 -07:00
|
|
|
@inout logical_flag : bool; [[reference to the flag indicating if the should be logical or not change this flag to the value you have it registered]]
|
2016-12-07 07:59:13 -08:00
|
|
|
}
|
2017-07-20 08:37:03 -07:00
|
|
|
return : bool; [[return $true or $false if the registration was successfull or not]]
|
2016-12-07 07:59:13 -08:00
|
|
|
}
|
2017-06-08 14:52:37 -07:00
|
|
|
focus_manager_factory {
|
|
|
|
[[If the widget needs a manager, this function is called
|
|
|
|
|
|
|
|
It can be used and overriden to inject your own manager or set custom options on the manager
|
|
|
|
]]
|
|
|
|
params {
|
|
|
|
root : Efl.Ui.Focus.Object; [[the logical root to use in the manager.]]
|
|
|
|
}
|
|
|
|
return : Efl.Ui.Focus.Manager;
|
|
|
|
}
|
2017-08-23 04:11:49 -07:00
|
|
|
focus_direction_manager_is @protected {
|
|
|
|
[['Virtual' function which checks if handling of passing focus to sub-objects in given direction is supported by widget.]]
|
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
|
|
|
legacy: null;
|
|
|
|
}
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
|
|
|
implements {
|
2014-06-20 02:47:39 -07:00
|
|
|
class.constructor;
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl.Object.constructor;
|
2016-11-04 09:43:40 -07:00
|
|
|
Efl.Object.finalize;
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl.Object.destructor;
|
|
|
|
Efl.Object.provider_find;
|
2017-07-20 23:24:08 -07:00
|
|
|
Efl.Object.debug_name_override;
|
2016-12-27 10:15:41 -08:00
|
|
|
Efl.Gfx.color { set; }
|
|
|
|
Efl.Gfx.visible { set; }
|
|
|
|
Efl.Gfx.position { set; }
|
|
|
|
Efl.Gfx.size { set; }
|
|
|
|
Efl.Canvas.Object.clip { set; }
|
|
|
|
Efl.Canvas.Object.no_render { set; }
|
|
|
|
Efl.Canvas.Object.is_frame_object { set; }
|
2016-06-17 01:26:08 -07:00
|
|
|
Efl.Canvas.Group.group_calculate;
|
|
|
|
Efl.Canvas.Group.group_member_del;
|
|
|
|
Efl.Canvas.Group.group_member_add;
|
2016-12-27 10:15:41 -08:00
|
|
|
Elm.Interface.Atspi_Accessible.name { get; }
|
|
|
|
Elm.Interface.Atspi_Accessible.state_set { get; }
|
|
|
|
Elm.Interface.Atspi_Accessible.children { get; }
|
|
|
|
Elm.Interface.Atspi_Accessible.parent { get; }
|
|
|
|
Elm.Interface.Atspi_Accessible.attributes { get; }
|
2016-05-12 03:37:43 -07:00
|
|
|
Elm.Interface.Atspi_Component.focus_grab;
|
2017-01-02 02:42:35 -08:00
|
|
|
Efl.Ui.Focus.User.manager { get; }
|
|
|
|
Efl.Ui.Focus.User.parent { get; }
|
2017-04-30 01:57:56 -07:00
|
|
|
Efl.Ui.Focus.Object.focus_geometry { get; }
|
2017-01-02 02:42:35 -08:00
|
|
|
Efl.Ui.Focus.Object.focus { set; }
|
2017-06-09 00:47:42 -07:00
|
|
|
Efl.Ui.Base.scale { get; set; }
|
2017-06-13 03:41:15 -07:00
|
|
|
Efl.Ui.Base.mirrored { get; set; }
|
2017-06-14 19:12:00 -07:00
|
|
|
Efl.Ui.Base.mirrored_automatic { get; set; }
|
2017-08-02 02:35:57 -07:00
|
|
|
Efl.Ui.Cursor.cursor { get; set; }
|
|
|
|
Efl.Ui.Cursor.cursor_style { get; set; }
|
|
|
|
Efl.Ui.Cursor.cursor_theme_search_enabled { get; set; }
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|
2015-05-03 04:28:16 -07:00
|
|
|
events {
|
2016-10-26 14:51:04 -07:00
|
|
|
moved; [[Called when widget moved]]
|
|
|
|
focused; [[Called when widget was focused]]
|
|
|
|
unfocused; [[Called when widget was unfocused]]
|
|
|
|
language,changed; [[Called when widget language changed]]
|
|
|
|
access,changed; [[Called when accessibility changed]]
|
2015-05-03 04:28:16 -07:00
|
|
|
}
|
2014-03-14 02:13:29 -07:00
|
|
|
}
|