Efl canvas text: fix api doc a bit

This commit is contained in:
Daniel Hirt 2016-10-05 17:10:06 +03:00
parent c0701a1051
commit 876b5e5c62
1 changed files with 88 additions and 58 deletions

View File

@ -10,23 +10,23 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
e-mail clients where bidi oddities can occur when mixing RTL e-mail clients where bidi oddities can occur when mixing RTL
and LTR. and LTR.
@since 1.1 @since 1.18
]] ]]
set {} set {}
get {} get {}
values { values {
delim: string; [[A null terminated string of delimiters, e.g ",|" or $null if empty.]] delim: string; [[A null terminated string of delimiters, e.g ",|" or $null if empty]]
} }
} }
@property legacy_newline { @property legacy_newline {
[[When true, newline character will behave as a paragraph separator. [[When true, newline character will behave as a paragraph separator.
@since 1.1 @since 1.18
]] ]]
set {} set {}
get {} get {}
values { values {
mode: bool; [[$true for legacy mode, $false otherwise.]] mode: bool; [[$true for legacy mode, $false otherwise]]
} }
} }
@property style { @property style {
@ -39,6 +39,8 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
first. first.
Set $style to $NULL to delete it. Set $style to $NULL to delete it.
@since 1.18
]] ]]
set { set {
legacy: null; legacy: null;
@ -50,7 +52,7 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
key: string; [[The name to the style. $NULL is the default style]] key: string; [[The name to the style. $NULL is the default style]]
} }
values { values {
style: string; [[The style.]] style: string; [[The style]]
} }
} }
@property size_formatted { @property size_formatted {
@ -70,6 +72,8 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
"You shall not pass!" with no margins or padding and assuming "You shall not pass!" with no margins or padding and assuming
a monospace font and a size of 7x10 char widths (for simplicity) a monospace font and a size of 7x10 char widths (for simplicity)
has a native size of 19x1 and a formatted size of 5x4. has a native size of 19x1 and a formatted size of 5x4.
@since 1.18
]] ]]
get {} get {}
values { values {
@ -78,7 +82,10 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
} }
} }
@property cursor { @property cursor {
[[The object's main cursor.]] [[The object's main cursor.
@since 1.18
]]
get { get {
return: Efl.Canvas.Text.Cursor; return: Efl.Canvas.Text.Cursor;
} }
@ -100,6 +107,8 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
"You shall not pass!" with no margins or padding and assuming "You shall not pass!" with no margins or padding and assuming
a monospace font and a size of 7x10 char widths (for simplicity) a monospace font and a size of 7x10 char widths (for simplicity)
has a native size of 19x1 and a formatted size of 5x4. has a native size of 19x1 and a formatted size of 5x4.
@since 1.18
]] ]]
get {} get {}
values { values {
@ -108,16 +117,25 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
} }
} }
@property style_insets { @property style_insets {
[[Gets the left, right, top and bottom insets of the text.
The inset is any applied padding on the text.
@since 1.18
]]
get {} get {}
values { values {
l: Evas.Coord; l: Evas.Coord; [[Left padding]]
r: Evas.Coord; r: Evas.Coord; [[Right padding]]
t: Evas.Coord; t: Evas.Coord; [[Top padding]]
b: Evas.Coord; b: Evas.Coord; [[Bottom padding]]
} }
} }
@property is_empty { @property is_empty {
[[Whether the object is empty (no text) or not]] [[Whether the object is empty (no text) or not
@since 1.18
]]
get { get {
legacy: null; legacy: null;
} }
@ -132,7 +150,7 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
The textblock does the layout of the text according to the The textblock does the layout of the text according to the
position of the obstacle. position of the obstacle.
@since 1.15 @since 1.18
]] ]]
params { params {
@in eo_obs: Efl.Canvas.Object; @in eo_obs: Efl.Canvas.Object;
@ -142,7 +160,7 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
obstacle_del { obstacle_del {
[[Removes $eo_obs from observation during text layout. [[Removes $eo_obs from observation during text layout.
@since 1.15 @since 1.18
]] ]]
params { params {
@in eo_obs: Efl.Canvas.Object; @in eo_obs: Efl.Canvas.Object;
@ -162,7 +180,7 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
call this so it will consider this new state and will relayout call this so it will consider this new state and will relayout
the text. the text.
@since 1.15 @since 1.18
]] ]]
} }
@property annotation { @property annotation {
@ -183,10 +201,10 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
legacy: null; legacy: null;
} }
keys { keys {
annotation: Efl.Canvas.Text.Annotation *; annotation: Efl.Canvas.Text.Annotation *; [[Given annotation]]
} }
values { values {
format: string; format: string; [[The new format for the given annotation]]
} }
} }
range_annotations_get { range_annotations_get {
@ -196,40 +214,42 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
]] ]]
legacy: null; legacy: null;
params { params {
@in start: const(Efl.Canvas.Text.Cursor); @in start: const(Efl.Canvas.Text.Cursor); [[Start of range]]
@in end: const(Efl.Canvas.Text.Cursor); @in end: const(Efl.Canvas.Text.Cursor); [[End of range]]
} }
return: free(own(iterator<Efl.Canvas.Text.Annotation *>), return: free(own(iterator<Efl.Canvas.Text.Annotation *>),
eina_iterator_free); [[Handle of the Annotation]] eina_iterator_free); [[Handle of the Annotation]]
} }
annotation_del {
[[Deletes $annotation.
All formats applied by $annotations will be removed and it will be
deleted.
]]
legacy: null;
params {
@in annotation: Efl.Canvas.Text.Annotation *;
}
return: bool; [[$true on success, $false otherwise.]]
}
annotation_insert { annotation_insert {
[[Inserts an annotation format in a specified range [$start, $end - 1]. [[Inserts an annotation format in a specified range [$start, $end - 1].
This will add both opening and closing formats for the given The $format will be applied to the given range, and the $annotation
$format. handle will be returned for further handling.
Returns a handle to manipulate the inserted annotation.
@since 1.18 @since 1.18
]] ]]
legacy: null; legacy: null;
params { params {
@in start: Efl.Canvas.Text.Cursor; @in start: Efl.Canvas.Text.Cursor; [[Start of range]]
@in end: Efl.Canvas.Text.Cursor; @in end: Efl.Canvas.Text.Cursor; [[End of range]]
@in format: string; @in format: string;
} }
return: Efl.Canvas.Text.Annotation *; return: Efl.Canvas.Text.Annotation *; [[Handle of inserted annotation]]
}
annotation_del {
[[Deletes given annotation.
All formats applied by $annotation will be removed and it will be
deleted.
@since 1.18
]]
legacy: null;
params {
@in annotation: Efl.Canvas.Text.Annotation *; [[Annotation to be
removed]]
}
return: bool; [[$true on success, $false otherwise.]]
} }
range_geometry_get { range_geometry_get {
[[Get the geometry of a range in the text. [[Get the geometry of a range in the text.
@ -241,11 +261,12 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
]] ]]
legacy: null; legacy: null;
params { params {
@in cur1: const(Efl.Canvas.Text.Cursor); @in cur1: const(Efl.Canvas.Text.Cursor); [[Start of range]]
@in cur2: const(Efl.Canvas.Text.Cursor); @in cur2: const(Efl.Canvas.Text.Cursor); [[End of range]]
} }
return: free(own(iterator<Eina.Rectangle>), return: free(own(iterator<Eina.Rectangle>),
eina_iterator_free); eina_iterator_free); [[Iterator on all geoemtries of
the given range]]
} }
range_simple_geometry_get { range_simple_geometry_get {
[[Get the "simple" geometry of a range. [[Get the "simple" geometry of a range.
@ -254,22 +275,26 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
range are merged into one big rectangle. This is an optimized range are merged into one big rectangle. This is an optimized
version of @.range_geometry_get. version of @.range_geometry_get.
@since 1.13 @since 1.19
]] ]]
legacy: null; legacy: null;
params { params {
@in cur1: const(Efl.Canvas.Text.Cursor); @in cur1: const(Efl.Canvas.Text.Cursor); [[Start of range]]
@in cur2: const(Efl.Canvas.Text.Cursor); @in cur2: const(Efl.Canvas.Text.Cursor); [[End of range]]
} }
return: free(own(iterator<Eina.Rectangle>), return: free(own(iterator<Eina.Rectangle>),
eina_iterator_free); eina_iterator_free); [[Iterator on all simple
geometries of the given range]]
} }
range_delete { range_delete {
[[Deletes the range between given cursors.]] [[Deletes the range between given cursors.
This removes all the text in given range [$start,$end].
]]
legacy: null; legacy: null;
params { params {
@in cur1: Efl.Canvas.Text.Cursor; [[Range start position.]] @in cur1: Efl.Canvas.Text.Cursor; [[Range start position]]
@in cur2: Efl.Canvas.Text.Cursor; [[Range end position.]] @in cur2: Efl.Canvas.Text.Cursor; [[Range end position]]
} }
} }
visible_range_get { visible_range_get {
@ -281,33 +306,38 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text)
@since 1.18 @since 1.18
]] ]]
return: bool; [[$true on success, $false otherwise.]] return: bool; [[$true on success, $false otherwise]]
params { params {
@in start: Efl.Canvas.Text.Cursor; [[Range start position.]] @in start: Efl.Canvas.Text.Cursor; [[Range start position]]
@in end: Efl.Canvas.Text.Cursor; [[Range end position.]] @in end: Efl.Canvas.Text.Cursor; [[Range end position]]
} }
} }
range_text_get { range_text_get {
[[Returns the text in the range between $cur1 and $cur2.]] [[Returns the text in the range between $cur1 and $cur2.
@since 1.18
]]
legacy: null; legacy: null;
return: own(char*); [[The text in the given range.]] return: own(char*); [[The text in the given range]]
params { params {
@in cur1: const(Efl.Canvas.Text.Cursor); [[Range start position.]] @in cur1: const(Efl.Canvas.Text.Cursor); [[Start of range]]
@in cur2: const(Efl.Canvas.Text.Cursor); [[Range end position.]] @in cur2: const(Efl.Canvas.Text.Cursor); [[End of range]]
} }
} }
object_item_geometry_get { object_item_geometry_get {
[[Queries a given object item for its geometry [[Queries a given object item for its geometry.
Note that the provided annotation should be an object item type. Note that the provided annotation should be an object item type.
@since 1.18
]] ]]
legacy: null; legacy: null;
params { params {
@in an: const(Efl.Canvas.Text.Annotation)*; [[Given annotation to query]] @in an: const(Efl.Canvas.Text.Annotation)*; [[Given annotation to query]]
@out x: Evas.Coord; @out x: Evas.Coord; [[x coordinate of the annotation]]
@out y: Evas.Coord; @out y: Evas.Coord; [[y coordinate of the annotation]]
@out w: Evas.Coord; @out w: Evas.Coord; [[w coordinate of the annotation]]
@out h: Evas.Coord; @out h: Evas.Coord; [[h coordinate of the annotation]]
} }
return: bool; [[$true if given annotation is an object item, $false otherwise]] return: bool; [[$true if given annotation is an object item, $false otherwise]]
} }