2016-04-19 08:23:39 -07:00
import eina_types;
2017-09-25 01:15:44 -07:00
enum Efl.Access.Text.Granularity
2016-01-29 12:12:17 -08:00
{
2016-10-21 09:13:58 -07:00
[[Text accessibility granularity]]
char, [[Character granularity]]
word, [[Word granularity]]
sentence, [[Sentence granularity]]
line, [[Line granularity]]
paragraph [[Paragraph granularity]]
2016-01-29 12:12:17 -08:00
}
2017-09-25 01:15:44 -07:00
enum Efl.Access.Text.Clip_Type
2016-01-29 12:12:17 -08:00
{
2016-10-21 09:13:58 -07:00
[[Text clip type]]
2016-01-29 12:12:17 -08:00
legacy: elm_atspi_text_clip;
2016-10-21 09:13:58 -07:00
none, [[No clip type]]
min, [[Minimum clip type]]
max, [[Maximum clip type]]
both [[Both clip types]]
2016-01-29 12:12:17 -08:00
}
2017-09-25 01:15:44 -07:00
struct Efl.Access.Text.Attribute
2016-01-29 12:12:17 -08:00
{
2016-10-21 09:13:58 -07:00
[[Text attribute]]
name: string; [[Text attribute name]]
value: string; [[Text attribute value]]
2016-01-29 12:12:17 -08:00
}
2017-09-25 01:15:44 -07:00
struct Efl.Access.Text.Range
2016-01-29 12:12:17 -08:00
{
2016-10-21 09:13:58 -07:00
[[Text range]]
start_offset: int; [[Range start offset]]
end_offset : int; [[Range end offset]]
2016-11-09 06:49:37 -08:00
content: ptr(char); [[Range content]]
2016-01-29 12:12:17 -08:00
}
2017-09-25 01:15:44 -07:00
struct Efl.Access.Text.Change_Info
2016-01-29 12:12:17 -08:00
{
2016-10-21 09:13:58 -07:00
[[Text change information]]
content: string; [[Change content]]
inserted: bool; [[$true if text got inserted]]
pos: size; [[Change position]]
len: size; [[Change length]]
2016-01-29 12:12:17 -08:00
}
2017-09-25 01:15:44 -07:00
interface Efl.Access.Text ()
2014-06-10 00:18:17 -07:00
{
2017-09-25 01:15:44 -07:00
[[Elementary accessible text interface]]
2015-05-07 09:32:53 -07:00
methods {
2017-11-01 05:31:46 -07:00
@property character @protected @beta {
2014-06-10 00:18:17 -07:00
get {
2015-08-07 06:25:45 -07:00
[[Gets single character present in accessible widget's text at given offset.]]
2014-06-10 00:18:17 -07:00
}
keys {
2015-08-07 06:25:45 -07:00
offset: int; [[Position in text.]]
2014-06-10 00:18:17 -07:00
}
values {
2016-10-21 09:15:11 -07:00
character: Eina.Unicode; [[Character at offset. 0 when out-of bounds offset has been given. Codepoints between DC80 and DCFF indicates that string includes invalid UTF8 chars.]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property string @protected @beta {
2014-06-10 00:18:17 -07:00
get {
2016-10-21 09:15:11 -07:00
[[Gets string, start and end offset in text according to given initial offset and granularity.]]
2014-06-10 00:18:17 -07:00
}
keys {
2017-09-25 01:15:44 -07:00
granularity: Efl.Access.Text.Granularity; [[Text granularity]]
2016-11-09 06:49:37 -08:00
start_offset: ptr(int) @nonull; [[Offset indicating start of string according to given granularity. -1 in case of error.]]
end_offset: ptr(int); [[Offset indicating end of string according to given granularity. -1 in case of error.]]
2014-06-10 00:18:17 -07:00
}
values {
2017-09-22 08:10:42 -07:00
string: mstring @owned; [[Newly allocated UTF-8 encoded string. Must be free by a user.]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property text @protected @beta {
2014-06-10 00:18:17 -07:00
get {
2015-08-07 06:25:45 -07:00
[[Gets text of accessible widget.]]
2014-06-10 00:18:17 -07:00
}
keys {
2015-08-07 06:25:45 -07:00
start_offset: int; [[Position in text.]]
end_offset: int; [[End offset of text.]]
2014-06-10 00:18:17 -07:00
}
values {
2017-09-22 08:10:42 -07:00
text: mstring @owned; [[UTF-8 encoded text.]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property caret_offset @protected @beta {
2016-11-21 00:57:33 -08:00
[[Caret offset property]]
2014-06-10 00:18:17 -07:00
get {
2015-08-07 06:25:45 -07:00
[[Gets offset position of caret (cursor)]]
2014-06-10 00:18:17 -07:00
}
set {
2016-10-21 09:15:11 -07:00
return: bool; [[$true if caret was successfully moved, $false otherwise.]]
2014-06-10 00:18:17 -07:00
}
values {
2016-11-17 03:19:50 -08:00
offset: int; [[Offset]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property attribute @protected @beta {
2014-06-10 00:18:17 -07:00
get {
2015-08-07 06:25:45 -07:00
[[Indicate if a text attribute with a given name is set]]
2016-10-21 15:19:26 -07:00
return: bool; [[$true if attribute name is set, $false otherwise]]
2014-06-10 00:18:17 -07:00
}
keys {
2016-11-17 03:19:50 -08:00
name: string @nonull; [[Text attribute name]]
2016-11-09 06:49:37 -08:00
start_offset: ptr(int) @nonull; [[Position in text from which given attribute is set.]]
end_offset: ptr(int); [[Position in text to which given attribute is set.]]
2014-06-10 00:18:17 -07:00
}
values {
2017-09-22 08:10:42 -07:00
value: mstring @owned; [[Value of text attribute. Should be free()]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property attributes @protected @beta {
2014-06-10 00:18:17 -07:00
get {
2015-08-07 06:25:45 -07:00
[[Gets list of all text attributes.]]
2014-06-10 00:18:17 -07:00
}
keys {
2016-11-17 03:19:50 -08:00
start_offset: ptr(int) @nonull; [[Start offset]]
end_offset: ptr(int); [[End offset]]
2014-06-10 00:18:17 -07:00
}
values {
2017-09-25 01:15:44 -07:00
attributes: list<ptr(Efl.Access.Text.Attribute) @owned> @owned; [[List of text attributes]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property default_attributes @protected @beta {
2016-11-17 03:19:50 -08:00
[[Default attributes]]
2014-06-10 00:18:17 -07:00
get {
}
values {
2017-09-25 01:15:44 -07:00
attributes: list<ptr(Efl.Access.Text.Attribute) @owned> @owned; [[List of default attributes]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property character_extents @protected @beta {
2016-11-17 03:19:50 -08:00
[[Character extents]]
2014-06-10 00:18:17 -07:00
get {
2016-10-21 15:19:26 -07:00
return: bool; [[$true if character extents, $false otherwise]]
2014-06-10 00:18:17 -07:00
}
keys {
2016-11-17 03:19:50 -08:00
offset: int; [[Offset]]
screen_coords: bool; [[If $true, x and y values will be relative to screen origin, otherwise relative to canvas]]
2014-06-10 00:18:17 -07:00
}
values {
2017-09-13 19:59:44 -07:00
rect: Eina.Rect; [[Extents rectangle]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property character_count @protected @beta {
2016-11-17 03:19:50 -08:00
[[Character count]]
2014-06-10 00:18:17 -07:00
get {
}
values {
2016-11-17 03:19:50 -08:00
count: int; [[Character count]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property offset_at_point @protected @beta {
2016-11-17 03:19:50 -08:00
[[Offset at given point]]
2014-06-10 00:18:17 -07:00
get {
}
keys {
2016-11-17 03:19:50 -08:00
screen_coords: bool; [[If $true, x and y values will be relative to screen origin, otherwise relative to canvas]]
x: int; [[X coordinate]]
y: int; [[Y coordinate]]
2014-06-10 00:18:17 -07:00
}
values {
2016-11-17 03:19:50 -08:00
offset: int; [[Offset]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property bounded_ranges @protected @beta {
2016-11-17 03:19:50 -08:00
[[Bounded ranges]]
2014-06-10 00:18:17 -07:00
get {
}
keys {
2016-11-17 03:19:50 -08:00
screen_coords: bool; [[If $true, x and y values will be relative to screen origin, otherwise relative to canvas]]
2017-09-13 19:59:44 -07:00
rect: Eina.Rect; [[Bounding box]]
2017-09-25 01:15:44 -07:00
xclip: Efl.Access.Text.Clip_Type; [[xclip]]
yclip: Efl.Access.Text.Clip_Type; [[yclip]]
2014-06-10 00:18:17 -07:00
}
values {
2017-09-25 01:15:44 -07:00
ranges: list<ptr(Efl.Access.Text.Range) @owned> @owned; [[List of ranges]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property range_extents @protected @beta {
2016-11-17 03:19:50 -08:00
[[Range extents]]
2014-06-10 00:18:17 -07:00
get {
2016-10-21 15:19:26 -07:00
return: bool; [[$true if range extents, $false otherwise]]
2014-06-10 00:18:17 -07:00
}
keys {
2016-10-21 09:15:11 -07:00
screen_coords: bool; [[If $true, x and y values will be relative to screen origin, otherwise relative to canvas]]
2016-11-17 03:19:50 -08:00
start_offset: int; [[Start offset]]
end_offset: int; [[End offset]]
2014-06-10 00:18:17 -07:00
}
values {
2017-09-13 19:59:44 -07:00
rect: Eina.Rect; [[Range rectangle]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property selections_count @protected @beta {
2016-10-21 15:19:26 -07:00
[[Selection count property]]
2014-06-10 00:18:17 -07:00
get {
}
values {
2016-10-21 15:19:26 -07:00
count: int; [[Selection counter]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
@property selection @protected @beta {
2016-10-21 15:19:26 -07:00
[[Selection property]]
2014-06-10 00:18:17 -07:00
get {
}
set {
2016-10-21 15:19:26 -07:00
return: bool; [[$true if selection was set, $false otherwise]]
2014-06-10 00:18:17 -07:00
}
keys {
2016-10-21 15:19:26 -07:00
selection_number: int; [[Selection number for identification]]
2014-06-10 00:18:17 -07:00
}
values {
2016-10-21 15:19:26 -07:00
start_offset: int; [[Selection start offset]]
end_offset: int; [[Selection end offset]]
2014-06-10 00:18:17 -07:00
}
}
2017-11-01 05:31:46 -07:00
selection_add @protected @beta {
2016-10-21 15:19:26 -07:00
[[Add selection]]
2014-06-10 00:18:17 -07:00
params {
2016-10-21 15:19:26 -07:00
@in start_offset: int; [[Start selection from this offset]]
@in end_offset: int; [[End selection at this offset]]
2014-06-10 00:18:17 -07:00
}
2016-10-21 15:19:26 -07:00
return: bool; [[$true if selection was added, $false otherwise]]
2014-06-10 00:18:17 -07:00
}
2017-11-01 05:31:46 -07:00
selection_remove @protected @beta {
2016-10-21 15:19:26 -07:00
[[Remove selection]]
2014-06-10 00:18:17 -07:00
params {
2016-10-21 15:19:26 -07:00
@in selection_number: int; [[Selection number to be removed]]
2014-06-10 00:18:17 -07:00
}
2016-10-21 15:19:26 -07:00
return: bool; [[$true if selection was removed, $false otherwise]]
2014-06-10 00:18:17 -07:00
}
}
events {
2016-10-21 15:19:26 -07:00
access,text,bounds,changed; [[Text bounds have changed]]
access,text,attributes,changed; [[Text attributes have changed]]
access,text,caret,moved; [[Caret moved]]
access,text,inserted; [[Text was inserted]]
access,text,removed; [[Text was removed]]
access,text,selection,changed; [[Text selection has changed]]
2014-06-10 00:18:17 -07:00
}
}