forked from enlightenment/efl
243 lines
7.8 KiB
Plaintext
243 lines
7.8 KiB
Plaintext
import eina_types;
|
|
|
|
enum Efl.Access.Text.Granularity
|
|
{
|
|
[[Text accessibility granularity]]
|
|
char, [[Character granularity]]
|
|
word, [[Word granularity]]
|
|
sentence, [[Sentence granularity]]
|
|
line, [[Line granularity]]
|
|
paragraph [[Paragraph granularity]]
|
|
}
|
|
|
|
enum Efl.Access.Text.Clip_Type
|
|
{
|
|
[[Text clip type]]
|
|
legacy: elm_atspi_text_clip;
|
|
none, [[No clip type]]
|
|
min, [[Minimum clip type]]
|
|
max, [[Maximum clip type]]
|
|
both [[Both clip types]]
|
|
}
|
|
|
|
struct Efl.Access.Text.Attribute
|
|
{
|
|
[[Text attribute]]
|
|
name: string; [[Text attribute name]]
|
|
value: string; [[Text attribute value]]
|
|
}
|
|
|
|
struct Efl.Access.Text.Range
|
|
{
|
|
[[Text range]]
|
|
start_offset: int; [[Range start offset]]
|
|
end_offset : int; [[Range end offset]]
|
|
content: ptr(char); [[Range content]]
|
|
}
|
|
|
|
struct 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 Efl.Access.Text ()
|
|
{
|
|
[[Elementary accessible text interface]]
|
|
methods {
|
|
@property character @protected @beta {
|
|
get {
|
|
[[Gets single character present in accessible widget's text at given offset.]]
|
|
}
|
|
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 indicates that string includes invalid UTF8 chars.]]
|
|
}
|
|
}
|
|
@property string @protected @beta {
|
|
get {
|
|
[[Gets string, start and end offset in text according to given initial offset and granularity.]]
|
|
}
|
|
keys {
|
|
granularity: Efl.Access.Text.Granularity; [[Text granularity]]
|
|
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.]]
|
|
}
|
|
values {
|
|
string: mstring @owned; [[Newly allocated UTF-8 encoded string. Must be free by a user.]]
|
|
}
|
|
}
|
|
@property access_text @protected @beta {
|
|
get {
|
|
[[Gets text of accessible widget.]]
|
|
}
|
|
keys {
|
|
start_offset: int; [[Position in text.]]
|
|
end_offset: int; [[End offset of text.]]
|
|
}
|
|
values {
|
|
text: mstring @owned; [[UTF-8 encoded text.]]
|
|
}
|
|
}
|
|
@property caret_offset @protected @beta {
|
|
[[Caret offset property]]
|
|
get {
|
|
[[Gets offset position of caret (cursor)]]
|
|
}
|
|
set {
|
|
return: bool; [[$true if caret was successfully moved, $false otherwise.]]
|
|
}
|
|
values {
|
|
offset: int; [[Offset]]
|
|
}
|
|
}
|
|
@property attribute @protected @beta {
|
|
get {
|
|
[[Indicate if a text attribute with a given name is set]]
|
|
return: bool; [[$true if attribute name is set, $false otherwise]]
|
|
}
|
|
keys {
|
|
name: string @nonull; [[Text attribute name]]
|
|
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.]]
|
|
}
|
|
values {
|
|
value: mstring @owned; [[Value of text attribute. Should be free()]]
|
|
}
|
|
}
|
|
@property text_attributes @protected @beta {
|
|
get {
|
|
[[Gets list of all text attributes.]]
|
|
}
|
|
keys {
|
|
start_offset: ptr(int) @nonull; [[Start offset]]
|
|
end_offset: ptr(int); [[End offset]]
|
|
}
|
|
values {
|
|
attributes: list<ptr(Efl.Access.Text.Attribute) @owned> @owned; [[List of text attributes]]
|
|
}
|
|
}
|
|
@property default_attributes @protected @beta {
|
|
[[Default attributes]]
|
|
get {
|
|
}
|
|
values {
|
|
attributes: list<ptr(Efl.Access.Text.Attribute) @owned> @owned; [[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<ptr(Efl.Access.Text.Range) @owned> @owned; [[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 {
|
|
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]]
|
|
}
|
|
}
|