import eina_types; enum Elm.Atspi_Text.Granularity { [[Text accessibility granularity]] char, [[Character granularity]] word, [[Word granularity]] sentence, [[Sentence granularity]] line, [[Line granularity]] paragraph [[Paragraph granularity]] } enum Elm.Atspi_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 Elm.Atspi_Text.Attribute { [[Text attribute]] name: string; [[Text attribute name]] value: string; [[Text attribute value]] } struct Elm.Atspi_Text.Range { [[Text range]] start_offset: int; [[Range start offset]] end_offset : int; [[Range end offset]] content: ptr(char); [[Range content]] } struct Elm.Atspi_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 Elm.Interface.Atspi.Text () { [[Elementary AT-SPI text interface]] eo_prefix: elm_interface_atspi_text; methods { @property character @protected { 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 { get { [[Gets string, start and end offset in text according to given initial offset and granularity.]] } keys { granularity: Elm.Atspi_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: own(ptr(char)); [[Newly allocated UTF-8 encoded string. Must be free by a user.]] } } @property text @protected { get { [[Gets text of accessible widget.]] } keys { start_offset: int; [[Position in text.]] end_offset: int; [[End offset of text.]] } values { text: own(ptr(char)); [[UTF-8 encoded text.]] } } @property caret_offset @protected { [[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 { 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: own(ptr(char)); [[Value of text attribute. Should be free()]] } } @property attributes @protected { get { [[Gets list of all text attributes.]] } keys { start_offset: ptr(int) @nonull; [[Start offset]] end_offset: ptr(int); [[End offset]] } values { attributes: own(list); [[List of text attributes]] } } @property default_attributes @protected { [[Default attributes]] get { } values { attributes: own(list); [[List of default attributes]] } } @property character_extents @protected { [[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.Rectangle; [[Extents rectangle]] } } @property character_count @protected { [[Character count]] get { } values { count: int; [[Character count]] } } @property offset_at_point @protected { [[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 { [[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.Rectangle; [[Bounding box]] xclip: Elm.Atspi_Text.Clip_Type; [[AT-SPI xclip]] yclip: Elm.Atspi_Text.Clip_Type; [[AT-SPI yclip]] } values { ranges: own(list); [[List of ranges]] } } @property range_extents @protected { [[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.Rectangle; [[Range rectangle]] } } @property selections_count @protected { [[Selection count property]] get { } values { count: int; [[Selection counter]] } } @property selection @protected { [[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 { [[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 { [[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]] } }