Use proper Eolian syntax for default values instead of docs

Summary:
Eolian supports reporting the defaults for parameters and return values, but in some
places we have been writing this information in the documentation instead.
This patch moves it to its proper place, where documentation generators can pick it up
and render it in a consistent manner.

Ref T8171

Reviewers: zmike, bu5hm4n, lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8171

Differential Revision: https://phab.enlightenment.org/D10051
This commit is contained in:
Xavi Artigas 2019-09-20 11:38:18 -03:00 committed by Lauro Moura
parent 32f92d3d86
commit 61ce4c79fd
10 changed files with 58 additions and 77 deletions

View File

@ -43,13 +43,11 @@ abstract Efl.Task extends Efl.Loop_Consumer
}
}
@property flags {
[[Flags to further customize task's behavior. The default value:
exit_with_parent
]]
[[Flags to further customize task's behavior.]]
set { }
get { }
values {
flags: Efl.Task_Flags; [[Desired task flags.]]
flags: Efl.Task_Flags(Efl.Task_Flags.exit_with_parent); [[Desired task flags.]]
}
}
run @pure_virtual {

View File

@ -22,10 +22,10 @@ interface @beta Efl.Gfx.Arrangement
set {}
get {}
values {
align_horiz: double; [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the horizontal axis
and 1.0 is at the end. The default value is 0.5.]]
align_vert: double; [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the vertical axis
and 1.0 is at the end. The default value is 0.5.]]
align_horiz: double(0.5); [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the horizontal
axis and 1.0 is at the end.]]
align_vert: double(0.5); [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the vertical
axis and 1.0 is at the end.]]
}
}
@property content_padding {
@ -40,9 +40,9 @@ interface @beta Efl.Gfx.Arrangement
set {}
get {}
values {
pad_horiz: double; [[Horizontal padding. The default value is 0.0.]]
pad_vert: double; [[Vertical padding. The default value is 0.0.]]
scalable: bool; [[$true if scalable, $false otherwise. The default value is $false.]]
pad_horiz: double(0.0); [[Horizontal padding.]]
pad_vert: double(0.0); [[Vertical padding.]]
scalable: bool(false); [[$true if scalable.]]
}
}
}

View File

@ -83,7 +83,7 @@ interface Efl.Gfx.Entity {
This property is an individual scaling factor on the object (Edje
or UI widget). This property (or Edje's global scaling factor, when
applicable), will affect this object's part sizes. If scale is
not zero, than the individual scaling will override any global
not zero, then the individual scaling will override any global
scaling set, for the object obj's parts. Set it back to zero to
get the effects of the global scaling again.
@ -98,8 +98,7 @@ interface Efl.Gfx.Entity {
[[Gets an object's scaling factor.]]
}
values {
scale: double(0.0); [[The scaling factor (the default value is 0.0,
meaning individual scaling is not set)]]
scale: double(0.0); [[The scaling factor.]]
}
}
}

View File

@ -79,7 +79,7 @@ interface @beta Efl.Gfx.Image
set {}
get {}
values {
smooth_scale: bool; [[Whether to use smooth scale or not. The default value is $true.]]
smooth_scale: bool(true); [[Whether to use smooth scale or not.]]
}
}
@property scale_method {
@ -89,8 +89,7 @@ interface @beta Efl.Gfx.Image
buffer. The underlying image data will not be modified.
]]
values {
scale_method: Efl.Gfx.Image_Scale_Method; [[Image scale type to use. The default value is
@Efl.Gfx.Image_Scale_Method.none.]]
scale_method: Efl.Gfx.Image_Scale_Method(Efl.Gfx.Image_Scale_Method.none); [[Image scale type to use.]]
}
}
@property can_upscale {
@ -98,7 +97,7 @@ interface @beta Efl.Gfx.Image
the image will never be resized larger than its native size.
]]
values {
upscale: bool; [[Whether to allow image upscaling. The default value is $true.]]
upscale: bool(true); [[Whether to allow image upscaling.]]
}
}
@property can_downscale {
@ -106,7 +105,7 @@ interface @beta Efl.Gfx.Image
the image will never be resized smaller than its native size.
]]
values {
downscale: bool; [[Whether to allow image downscaling. The default value is $true.]]
downscale: bool(true); [[Whether to allow image downscaling.]]
}
}
@property ratio {
@ -116,7 +115,7 @@ interface @beta Efl.Gfx.Image
get {
}
values {
ratio: double; [[The image's ratio. The default value is $[1.0].]]
ratio: double(1.0); [[The image's ratio.]]
}
}
@property content_region {
@ -161,10 +160,10 @@ interface @beta Efl.Gfx.Image
set {}
get {}
values {
l: int; [[The border's left width. The default value is $0.]]
r: int; [[The border's right width. The default value is $0.]]
t: int; [[The border's top height. The default value is $0.]]
b: int; [[The border's bottom height. The default value is $0.]]
l: int(0); [[The border's left width.]]
r: int(0); [[The border's right width.]]
t: int(0); [[The border's top height.]]
b: int(0); [[The border's bottom height.]]
}
}
@property border_insets_scale {
@ -176,7 +175,7 @@ interface @beta Efl.Gfx.Image
set {}
get {}
values {
scale: double; [[The scale factor. The default value is $[1.0].]]
scale: double(1.0); [[The scale factor.]]
}
}
@property center_fill_mode {
@ -193,8 +192,8 @@ interface @beta Efl.Gfx.Image
set {}
get {}
values {
fill: Efl.Gfx.Center_Fill_Mode; [[Fill mode of the center region.
The default value is @Efl.Gfx.Center_Fill_Mode.default, i.e. render
fill: Efl.Gfx.Center_Fill_Mode(Efl.Gfx.Center_Fill_Mode.default); [[Fill mode of the center region.
The default behavior is to render
and scale the center area, respecting its transparency.]]
}
}
@ -214,12 +213,10 @@ interface @beta Efl.Gfx.Image
}
get {}
values {
horizontal: iterator<ptr(Efl.Gfx.Image_Stretch_Region)>; [[Representation of areas that are stretchable in
the image horizontal space. The default value
is $NULL.]]
vertical: iterator<ptr(Efl.Gfx.Image_Stretch_Region)>; [[Representation of areas that are stretchable in
the image vertical space. The default value
is $NULL.]]
horizontal: iterator<ptr(Efl.Gfx.Image_Stretch_Region)>(null); [[Representation of areas that are
stretchable in the image horizontal space.]]
vertical: iterator<ptr(Efl.Gfx.Image_Stretch_Region)>(null); [[Representation of areas that are
stretchable in the image vertical space.]]
}
}
@property image_size {
@ -251,8 +248,7 @@ interface @beta Efl.Gfx.Image
get {
}
values {
hint: Efl.Gfx.Image_Content_Hint; [[Dynamic or static content hint. The default value is
@Efl.Gfx.Image_Content_Hint.none.]]
hint: Efl.Gfx.Image_Content_Hint(Efl.Gfx.Image_Content_Hint.none); [[Dynamic or static content hint.]]
}
}
@property scale_hint {
@ -266,8 +262,7 @@ interface @beta Efl.Gfx.Image
get {
}
values {
hint: Efl.Gfx.Image_Scale_Hint; [[Scalable or static size hint. The default value is
@Efl.Gfx.Image_Scale_Hint.none.]]
hint: Efl.Gfx.Image_Scale_Hint(Efl.Gfx.Image_Scale_Hint.none); [[Scalable or static size hint.]]
}
}
@property image_load_error {

View File

@ -86,11 +86,12 @@ interface @beta Efl.Ui.Scrollable_Interactive extends Efl.Ui.Scrollable
}
}
@property movement_block {
[[Blocking of scrolling (per axis)
[[Blocking of scrolling (per axis).
This function will block scrolling movement (by input of a user) in
a given direction. You can disable movements in the X axis, the Y
axis or both. The default value is $none, where movements are
axis or both.
The default value is @Efl.Ui.Layout_Orientation.default meaning that movements are
allowed in both directions.
]]
set {
@ -107,21 +108,19 @@ interface @beta Efl.Ui.Scrollable_Interactive extends Efl.Ui.Scrollable
The gravity defines how the scroller will adjust its view
when the size of the scroller contents increases.
The scroller will adjust the view to glue itself as follows.
x=0.0, for staying where it is relative to the left edge of the content
x=1.0, for staying where it is relative to the right edge of the content
y=0.0, for staying where it is relative to the top edge of the content
y=1.0, for staying where it is relative to the bottom edge of the content
Default values for x and y are 0.0]]
The scroller will adjust the view to glue itself as follows:
$[x=0.0] to stay where it is relative to the left edge of the content.
$[x=1.0] to stay where it is relative to the right edge of the content.
$[y=0.0] to stay where it is relative to the top edge of the content.
$[y=1.0] to stay where it is relative to the bottom edge of the content.
]]
set {
}
get {
}
values {
x: double; [[Horizontal scrolling gravity]]
y: double; [[Vertical scrolling gravity]]
x: double(0.0); [[Horizontal scrolling gravity.]]
y: double(0.0); [[Vertical scrolling gravity.]]
}
}
@property match_content {

View File

@ -67,7 +67,7 @@ interface @beta Efl.Ui.Zoom
get {
}
values {
mode: Efl.Ui.Zoom_Mode; [[The zoom mode.]]
mode: Efl.Ui.Zoom_Mode(Efl.Ui.Zoom_Mode.manual); [[The zoom mode.]]
}
}
}

View File

@ -45,7 +45,7 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
get {
}
values {
auto_play: bool; [[Auto play mode, Default value is $false]]
auto_play: bool(false); [[Auto play mode.]]
}
}
@property auto_repeat {
@ -71,17 +71,15 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
animation double-time faster, you can give $speed 2. If you want to play
animation double-time slower, you can give $speed 0.5.
$true when it's successful. $false otherwise.
Warning: speed must be greater than zero.
]]
set {
return: bool;
return: bool; [[$true when it's successful. $false otherwise.]]
}
get {
}
values {
speed: double; [[ Speed factor. Default value is 1.0]]
speed: double(1.0); [[Speed factor.]]
}
}
@property duration_time {
@ -214,50 +212,48 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View,
}
@property min_progress {
[[The start progress of the play.
Default value is 0.
]]
set {
}
get {
}
values {
min_progress: double; [[The minimum progress. Value must be 0 ~ 1.]]
min_progress: double(0.0); [[The minimum progress. Value must be 0 ~ 1.]]
}
}
@property max_progress {
[[The last progress of the play.
Default value is 1.
]]
set {
}
get {
}
values {
max_progress: double; [[The maximum progress. Value must be 0 ~ 1.]]
max_progress: double(1.0); [[The maximum progress. Value must be 0 ~ 1.]]
}
}
@property min_frame {
[[The start frame of the play.
Default value is 0.
]]
set {
}
get {
}
values {
min_frame: int; [[The minimum frame for play. Value must be 0 ~ @.max_frame]]
min_frame: int(0); [[The minimum frame for play. Value must be 0 ~ @.max_frame]]
}
}
@property max_frame {
[[The last frame of the play.
Default value is @.frame_count - 1
]]
set {
}
get {
}
values {
max_frame: int; [[The maximum frame for play. Value must be @.min_frame ~ (@.frame_count - 1)]]
max_frame: int; [[The maximum frame for play. Value must be @.min_frame ~ (@.frame_count - 1).
The default value is @.frame_count - 1.
]]
}
}

View File

@ -2,18 +2,16 @@ class @beta Efl.Ui.Spotlight.Manager_Scroll extends Efl.Ui.Spotlight.Manager
{
methods {
@property scroll_block {
[[Blocking of scrolling
[[User scrolling forbidden.
This function will block scrolling movement (by input of a user).
You can disable scrolling movement. The default value is $false,
where the scrolling movement is allowed.
This property blocks scrolling movement by user input.
]]
set {
}
get {
}
values {
scroll_block: bool; [[$true if block scrolling movement, $false otherwise]]
scroll_block: bool(false); [[$true if user should not be able to scroll.]]
}
}
}

View File

@ -190,12 +190,11 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
If $enabled is $true, the return key on input panel is disabled when the entry has no text.
The return key on the input panel is automatically enabled when the entry has text.
The default value is $false.
]]
set {
}
values {
enabled: bool; [[If $true, the return key is automatically disabled when the entry has no text.]]
enabled: bool(false); [[If $true, the return key is automatically disabled when the entry has no text.]]
}
}
@property item_factory {

View File

@ -47,7 +47,6 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
If the value is @Efl.Input.Object_Pointer_Mode.no_grab, then events
will be emitted just when inside this object area.
The default value is @Efl.Input.Object_Pointer_Mode.auto_grab.
See also: @.pointer_mode_by_device.get and @.pointer_mode_by_device.set
Note: This function will only set/get the mode for the default pointer.
]]
@ -57,7 +56,7 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
return: bool; [[$true if pointer behaviour was set, $false otherwise]]
}
values {
pointer_mode: Efl.Input.Object_Pointer_Mode; [[Input pointer mode]]
pointer_mode: Efl.Input.Object_Pointer_Mode(Efl.Input.Object_Pointer_Mode.auto_grab); [[Input pointer mode]]
}
}
@property render_op {
@ -265,8 +264,7 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
get {
}
values {
precise: bool; [[Whether to use precise point collision
detection or not. The default value is false.]]
precise: bool(false); [[Whether to use precise point collision detection.]]
}
}
@property propagate_events {
@ -280,7 +278,7 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
propagated on to the smart object of which $obj is a member.
If $prop is $false, events occurring on this object will not
be propagated on to the smart object of which $obj is a
member. The default value is $true.
member.
See also @.repeat_events.set, @.pass_events.set.
]]
@ -289,8 +287,7 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
get {
}
values {
propagate: bool; [[Whether to propagate events ($true) or not
($false).]]
propagate: bool(true); [[Whether to propagate events.]]
}
}
@property pass_events {