2016-04-19 08:23:39 -07:00
|
|
|
import eina_types;
|
|
|
|
|
2019-03-08 06:55:43 -08:00
|
|
|
enum @beta 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
|
|
|
}
|
|
|
|
|
2019-03-08 06:55:43 -08:00
|
|
|
enum @beta Efl.Access.Text_Clip_Type
|
2016-01-29 12:12:17 -08:00
|
|
|
{
|
2016-10-21 09:13:58 -07:00
|
|
|
[[Text clip type]]
|
|
|
|
none, [[No clip type]]
|
|
|
|
min, [[Minimum clip type]]
|
|
|
|
max, [[Maximum clip type]]
|
|
|
|
both [[Both clip types]]
|
2016-01-29 12:12:17 -08:00
|
|
|
}
|
|
|
|
|
2019-09-10 05:29:06 -07:00
|
|
|
struct @beta @free(elm_atspi_text_text_attribute_free) 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
|
|
|
}
|
|
|
|
|
2019-09-10 05:29:06 -07:00
|
|
|
struct @beta @free(elm_atspi_text_text_range_free) 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
|
|
|
}
|
|
|
|
|
2019-03-08 06:55:43 -08:00
|
|
|
struct @beta 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
|
|
|
}
|
|
|
|
|
2019-02-14 08:37:02 -08:00
|
|
|
interface @beta 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 {
|
2019-09-13 03:25:49 -07:00
|
|
|
[[Gets single character present in accessible widget's text at given offset.]]
|
2014-06-10 00:18:17 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
keys {
|
2015-08-07 06:25:45 -07:00
|
|
|
offset: int; [[Position in text.]]
|
2014-06-10 00:18:17 -07:00
|
|
|
}
|
|
|
|
values {
|
2019-09-02 07:24:26 -07:00
|
|
|
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.]]
|
2014-06-10 00:18:17 -07:00
|
|
|
}
|
|
|
|
}
|
2017-11-01 05:31:46 -07:00
|
|
|
@property string @protected @beta {
|
2019-09-13 03:25:49 -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
|
|
|
get {
|
|
|
|
}
|
|
|
|
keys {
|
2018-04-12 02:26:37 -07:00
|
|
|
granularity: Efl.Access.Text_Granularity; [[Text granularity]]
|
2019-09-02 07:24:26 -07:00
|
|
|
start_offset: ptr(int); [[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 {
|
2019-09-06 08:01:05 -07:00
|
|
|
string: mstring @move; [[Newly allocated UTF-8 encoded string. Must be free by a user.]]
|
2014-06-10 00:18:17 -07:00
|
|
|
}
|
|
|
|
}
|
2018-02-14 18:14:52 -08:00
|
|
|
@property access_text @protected @beta {
|
2019-09-13 03:25:49 -07:00
|
|
|
[[Gets text of accessible widget.]]
|
2014-06-10 00:18:17 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
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 {
|
2019-09-06 08:01:05 -07:00
|
|
|
text: mstring @move; [[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 {
|
2018-02-12 09:56:31 -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 {
|
2019-09-13 03:25:49 -07:00
|
|
|
[[Indicate if a text attribute with a given name is set]]
|
2014-06-10 00:18:17 -07:00
|
|
|
get {
|
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 {
|
2019-05-26 08:25:15 -07:00
|
|
|
name: string; [[Text attribute name]]
|
|
|
|
start_offset: ptr(int); [[Position in text from which given attribute is set.]]
|
2016-11-09 06:49:37 -08:00
|
|
|
end_offset: ptr(int); [[Position in text to which given attribute is set.]]
|
2014-06-10 00:18:17 -07:00
|
|
|
}
|
|
|
|
values {
|
2019-09-06 08:01:05 -07:00
|
|
|
value: mstring @move; [[Value of text attribute. Should be free()]]
|
2014-06-10 00:18:17 -07:00
|
|
|
}
|
|
|
|
}
|
2018-02-14 18:14:52 -08:00
|
|
|
@property text_attributes @protected @beta {
|
2019-09-13 03:25:49 -07:00
|
|
|
[[Gets list of all text attributes.]]
|
2014-06-10 00:18:17 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
keys {
|
2019-05-26 08:25:15 -07:00
|
|
|
start_offset: ptr(int); [[Start offset]]
|
2016-11-17 03:19:50 -08:00
|
|
|
end_offset: ptr(int); [[End offset]]
|
2014-06-10 00:18:17 -07:00
|
|
|
}
|
|
|
|
values {
|
2019-09-06 08:01:05 -07:00
|
|
|
attributes: list<ptr(Efl.Access.Text_Attribute) @move> @move; [[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 {
|
2018-02-12 09:56:31 -08:00
|
|
|
[[Default attributes]]
|
2014-06-10 00:18:17 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2019-09-06 08:01:05 -07:00
|
|
|
attributes: list<ptr(Efl.Access.Text_Attribute) @move> @move; [[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 {
|
2018-02-12 09:56:31 -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]]
|
2019-09-02 07:24:26 -07:00
|
|
|
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 {
|
2018-02-12 09:56:31 -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 {
|
2018-02-12 09:56:31 -08:00
|
|
|
[[Offset at given point]]
|
2014-06-10 00:18:17 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
keys {
|
2019-09-02 07:24:26 -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
|
|
|
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 {
|
2018-02-12 09:56:31 -08:00
|
|
|
[[Bounded ranges]]
|
2014-06-10 00:18:17 -07:00
|
|
|
get {
|
|
|
|
}
|
|
|
|
keys {
|
2019-09-02 07:24:26 -07: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]]
|
2018-04-12 02:26:37 -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 {
|
2019-09-06 08:01:05 -07:00
|
|
|
ranges: list<ptr(Efl.Access.Text_Range) @move> @move; [[List of ranges]]
|
2014-06-10 00:18:17 -07:00
|
|
|
}
|
|
|
|
}
|
2017-11-01 05:31:46 -07:00
|
|
|
@property range_extents @protected @beta {
|
2018-02-12 09:56:31 -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 {
|
2019-09-02 07:24:26 -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
|
|
|
}
|
|
|
|
}
|
2018-02-14 18:14:52 -08:00
|
|
|
@property access_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 {
|
efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).
In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).
Test Plan: make with c# bindings works, make check and make examples work too.
Reviewers: cedric, q66, lauromoura
Subscribers: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6169
2018-05-11 08:20:40 -07:00
|
|
|
/* 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]]
|
2014-06-10 00:18:17 -07:00
|
|
|
}
|
|
|
|
}
|