efl/src/lib/elementary/efl_access_text.eo

249 lines
8.1 KiB
Plaintext

import eina_types;
enum @beta Efl.Access.Text_Granularity
{
[[Text accessibility granularity]]
char, [[Character granularity]]
word, [[Word granularity]]
sentence, [[Sentence granularity]]
line, [[Line granularity]]
paragraph [[Paragraph granularity]]
}
enum @beta Efl.Access.Text_Clip_Type
{
[[Text clip type]]
none, [[No clip type]]
min, [[Minimum clip type]]
max, [[Maximum clip type]]
both [[Both clip types]]
}
struct @beta @free(elm_atspi_text_text_attribute_free) Efl.Access.Text_Attribute
{
[[Text attribute]]
name: string; [[Text attribute name]]
value: string; [[Text attribute value]]
}
struct @beta @free(elm_atspi_text_text_range_free) Efl.Access.Text_Range
{
[[Text range]]
start_offset: int; [[Range start offset]]
end_offset : int; [[Range end offset]]
content: string; [[Range content]]
}
struct @beta Efl.Access.Text_Change_Info
{
[[Text change information]]
content: string; [[Change content]]
inserted: bool; [[$true if text got inserted]]
pos: size; [[Change position]]
len: size; [[Change length]]
}
interface @beta Efl.Access.Text
{
[[Elementary accessible text interface]]
methods {
@property character @protected @beta {
[[Gets single character present in accessible widget's text at given offset.]]
get {
}
keys {
offset: int; [[Position in text.]]
}
values {
character: Eina.Unicode; [[Character at offset. 0 when out-of bounds offset has been given.
Codepoints between DC80 and DCFF indicate that string includes invalid
UTF8 chars.]]
}
}
@property string @protected @beta {
[[Gets string, start and end offset in text according to given initial offset and granularity.]]
get {
}
keys {
granularity: Efl.Access.Text_Granularity; [[Text granularity]]
}
values {
start_offset: int; [[Offset indicating start of string according to given granularity.
-1 in case of error.]]
end_offset: int; [[Offset indicating end of string according to given granularity.
-1 in case of error.]]
string: mstring @move; [[Newly allocated UTF-8 encoded string. Must be free by a user.]]
}
}
@property access_text @protected @beta {
[[Gets text of accessible widget.]]
get {
}
keys {
start_offset: int; [[Position in text.]]
end_offset: int; [[End offset of text.]]
}
values {
text: mstring @move; [[UTF-8 encoded text.]]
}
}
@property caret_offset @protected @beta {
[[Offset position of the caret (cursor).]]
get {
}
set {
return: bool; [[$true if caret was successfully moved, $false otherwise.]]
}
values {
offset: int; [[Offset]]
}
}
@property attribute @protected @beta {
[[Indicate if a text attribute with a given name is set]]
get {
return: bool; [[$true if attribute name is set, $false otherwise]]
}
keys {
name: string; [[Text attribute name]]
}
values {
start_offset: int; [[Position in text from which given attribute is set.]]
end_offset: int; [[Position in text to which given attribute is set.]]
value: mstring @move; [[Value of text attribute. Should be free()]]
}
}
@property text_attributes @protected @beta {
[[Gets list of all text attributes.]]
get {
}
values {
start_offset: int; [[Start offset]]
end_offset: int; [[End offset]]
attributes: list<Efl.Access.Text_Attribute> @move; [[List of text attributes]]
}
}
@property default_attributes @protected @beta {
[[Default attributes]]
get {
}
values {
attributes: list<Efl.Access.Text_Attribute> @move; [[List of default attributes]]
}
}
@property character_extents @protected @beta {
[[Character extents]]
get {
return: bool; [[$true if character extents, $false otherwise]]
}
keys {
offset: int; [[Offset]]
screen_coords: bool; [[If $true, x and y values will be relative to screen origin,
otherwise relative to canvas]]
}
values {
rect: Eina.Rect; [[Extents rectangle]]
}
}
@property character_count @protected @beta {
[[Character count]]
get {
}
values {
count: int; [[Character count]]
}
}
@property offset_at_point @protected @beta {
[[Offset at given point]]
get {
}
keys {
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]]
}
values {
offset: int; [[Offset]]
}
}
@property bounded_ranges @protected @beta {
[[Bounded ranges]]
get {
}
keys {
screen_coords: bool; [[If $true, x and y values will be relative to screen origin,
otherwise relative to canvas]]
rect: Eina.Rect; [[Bounding box]]
xclip: Efl.Access.Text_Clip_Type; [[xclip]]
yclip: Efl.Access.Text_Clip_Type; [[yclip]]
}
values {
ranges: list<Efl.Access.Text_Range> @move; [[List of ranges]]
}
}
@property range_extents @protected @beta {
[[Range extents]]
get {
return: bool; [[$true if range extents, $false otherwise]]
}
keys {
screen_coords: bool; [[If $true, x and y values will be relative to screen origin,
otherwise relative to canvas]]
start_offset: int; [[Start offset]]
end_offset: int; [[End offset]]
}
values {
rect: Eina.Rect; [[Range rectangle]]
}
}
@property selections_count @protected @beta {
[[Selection count property]]
get {
}
values {
count: int; [[Selection counter]]
}
}
@property access_selection @protected @beta {
[[Selection property]]
get {
}
set {
return: bool; [[$true if selection was set, $false otherwise]]
}
keys {
selection_number: int; [[Selection number for identification]]
}
values {
start_offset: int; [[Selection start offset]]
end_offset: int; [[Selection end offset]]
}
}
selection_add @protected @beta {
[[Add selection]]
params {
@in start_offset: int; [[Start selection from this offset]]
@in end_offset: int; [[End selection at this offset]]
}
return: bool; [[$true if selection was added, $false otherwise]]
}
selection_remove @protected @beta {
[[Remove selection]]
params {
@in selection_number: int; [[Selection number to be removed]]
}
return: bool; [[$true if selection was removed, $false otherwise]]
}
}
events {
/* FIXME: Nobody emits these
access,text,bounds,changed: void; [[Text bounds have changed]]
access,text,attributes,changed: void; [[Text attributes have changed]]
*/
access,text,caret,moved: void; [[Caret moved]]
access,text,inserted: Efl.Access.Text_Change_Info; [[Text was inserted]]
access,text,removed: Efl.Access.Text_Change_Info; [[Text was removed]]
access,text,selection,changed: void; [[Text selection has changed]]
}
}