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: ptr(char); [[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]] 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.]] } values { 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 { [[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 { [[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]] start_offset: ptr(int); [[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 @move; [[Value of text attribute. Should be free()]] } } @property text_attributes @protected @beta { [[Gets list of all text attributes.]] get { } keys { start_offset: ptr(int); [[Start offset]] end_offset: ptr(int); [[End offset]] } values { attributes: list @move; [[List of text attributes]] } } @property default_attributes @protected @beta { [[Default attributes]] get { } values { attributes: list @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 @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]] } }