2016-04-19 08:23:39 -07:00
import eina_types;
2016-01-29 12:12:17 -08:00
enum Elm.Atspi_Text.Granularity
{
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
}
enum Elm.Atspi_Text.Clip_Type
{
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
}
struct Elm.Atspi_Text.Attribute
{
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
}
struct Elm.Atspi_Text.Range
{
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
}
struct Elm.Atspi_Text.Change_Info
{
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
}
2016-05-12 03:37:43 -07:00
interface Elm.Interface.Atspi.Text ()
2014-06-10 00:18:17 -07:00
{
2016-11-04 02:42:15 -07:00
[[Elementary AT-SPI text interface]]
2014-06-10 00:18:17 -07:00
eo_prefix: elm_interface_atspi_text;
2015-05-07 09:32:53 -07:00
methods {
@property character @protected {
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
}
}
2015-05-07 09:32:53 -07:00
@property string @protected {
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 {
2016-11-17 03:19:50 -08:00
granularity: Elm.Atspi_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 {
2016-11-09 06:49:37 -08:00
string: own(ptr(char)); [[Newly allocated UTF-8 encoded string. Must be free by a user.]]
2014-06-10 00:18:17 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property text @protected {
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 {
2016-11-09 06:49:37 -08:00
text: own(ptr(char)); [[UTF-8 encoded text.]]
2014-06-10 00:18:17 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property caret_offset @protected {
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
}
}
2015-05-07 09:32:53 -07:00
@property attribute @protected {
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 {
2016-11-09 06:49:37 -08:00
value: own(ptr(char)); [[Value of text attribute. Should be free()]]
2014-06-10 00:18:17 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property attributes @protected {
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 {
2016-11-17 03:19:50 -08:00
attributes: own(list<own(ptr(Elm.Atspi_Text.Attribute))>); [[List of text attributes]]
2014-06-10 00:18:17 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property default_attributes @protected {
2016-11-17 03:19:50 -08:00
[[Default attributes]]
2014-06-10 00:18:17 -07:00
get {
}
values {
2016-11-17 03:19:50 -08:00
attributes: own(list<own(ptr(Elm.Atspi_Text.Attribute))>); [[List of default attributes]]
2014-06-10 00:18:17 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property character_extents @protected {
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 {
2016-11-17 03:19:50 -08:00
rect: Eina.Rectangle; [[Extents rectangle]]
2014-06-10 00:18:17 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property character_count @protected {
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
}
}
2015-05-07 09:32:53 -07:00
@property offset_at_point @protected {
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
}
}
2015-05-07 09:32:53 -07:00
@property bounded_ranges @protected {
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]]
rect: Eina.Rectangle; [[Bounding box]]
xclip: Elm.Atspi_Text.Clip_Type; [[AT-SPI xclip]]
yclip: Elm.Atspi_Text.Clip_Type; [[AT-SPI yclip]]
2014-06-10 00:18:17 -07:00
}
values {
2016-11-17 03:19:50 -08:00
ranges: own(list<own(ptr(Elm.Atspi_Text.Range))>); [[List of ranges]]
2014-06-10 00:18:17 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property range_extents @protected {
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 {
2016-11-17 03:19:50 -08:00
rect: Eina.Rectangle; [[Range rectangle]]
2014-06-10 00:18:17 -07:00
}
}
2015-05-07 09:32:53 -07:00
@property selections_count @protected {
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
}
}
2015-05-07 09:32:53 -07:00
@property selection @protected {
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
}
}
2014-07-22 08:36:29 -07:00
selection_add @protected {
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
}
2014-07-22 08:36:29 -07:00
selection_remove @protected {
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
}
}