1 | //! # `DBus` interface proxy for: `org.a11y.atspi.Text` |
2 | //! |
3 | //! This code was generated by `zbus-xmlgen` `2.0.1` from `DBus` introspection data. |
4 | //! Source: `Text.xml`. |
5 | //! |
6 | //! You may prefer to adapt it, instead of using it verbatim. |
7 | //! |
8 | //! More information can be found in the |
9 | //! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html) |
10 | //! section of the zbus documentation. |
11 | //! |
12 | #![allow (clippy::too_many_arguments)] |
13 | // this is to silence clippy due to zbus expanding parameter expressions |
14 | |
15 | use crate::atspi_proxy ; |
16 | use crate::common::{ClipType, CoordType, Granularity}; |
17 | |
18 | #[atspi_proxy (interface = "org.a11y.atspi.Text" , assume_defaults = true)] |
19 | trait Text { |
20 | /// AddSelection method |
21 | fn add_selection(&self, start_offset: i32, end_offset: i32) -> zbus::Result<bool>; |
22 | |
23 | /// GetAttributeRun method |
24 | fn get_attribute_run( |
25 | &self, |
26 | offset: i32, |
27 | include_defaults: bool, |
28 | ) -> zbus::Result<(std::collections::HashMap<String, String>, i32, i32)>; |
29 | |
30 | /// GetAttributeValue method |
31 | fn get_attribute_value(&self, offset: i32, attribute_name: &str) -> zbus::Result<String>; |
32 | |
33 | /// GetAttributes method |
34 | fn get_attributes( |
35 | &self, |
36 | offset: i32, |
37 | ) -> zbus::Result<(std::collections::HashMap<String, String>, i32, i32)>; |
38 | |
39 | /// GetBoundedRanges method |
40 | fn get_bounded_ranges( |
41 | &self, |
42 | x: i32, |
43 | y: i32, |
44 | width: i32, |
45 | height: i32, |
46 | coord_type: CoordType, |
47 | x_clip_type: ClipType, |
48 | y_clip_type: ClipType, |
49 | ) -> zbus::Result<Vec<(i32, i32, String, zbus::zvariant::OwnedValue)>>; |
50 | |
51 | /// GetCharacterAtOffset method |
52 | fn get_character_at_offset(&self, offset: i32) -> zbus::Result<i32>; |
53 | |
54 | /// GetCharacterExtents method |
55 | fn get_character_extents( |
56 | &self, |
57 | offset: i32, |
58 | coord_type: CoordType, |
59 | ) -> zbus::Result<(i32, i32, i32, i32)>; |
60 | |
61 | /// GetDefaultAttributeSet method |
62 | fn get_default_attribute_set(&self) -> zbus::Result<std::collections::HashMap<String, String>>; |
63 | |
64 | /// GetDefaultAttributes method |
65 | fn get_default_attributes(&self) -> zbus::Result<std::collections::HashMap<String, String>>; |
66 | |
67 | /// GetNSelections method |
68 | fn get_nselections(&self) -> zbus::Result<i32>; |
69 | |
70 | /// GetOffsetAtPoint method |
71 | fn get_offset_at_point(&self, x: i32, y: i32, coord_type: CoordType) -> zbus::Result<i32>; |
72 | |
73 | /// GetRangeExtents method |
74 | fn get_range_extents( |
75 | &self, |
76 | start_offset: i32, |
77 | end_offset: i32, |
78 | coord_type: CoordType, |
79 | ) -> zbus::Result<(i32, i32, i32, i32)>; |
80 | |
81 | /// GetSelection method |
82 | fn get_selection(&self, selection_num: i32) -> zbus::Result<(i32, i32)>; |
83 | |
84 | /// GetStringAtOffset method |
85 | fn get_string_at_offset( |
86 | &self, |
87 | offset: i32, |
88 | granularity: Granularity, |
89 | ) -> zbus::Result<(String, i32, i32)>; |
90 | |
91 | /// GetText method |
92 | fn get_text(&self, start_offset: i32, end_offset: i32) -> zbus::Result<String>; |
93 | |
94 | /// GetTextAfterOffset method |
95 | fn get_text_after_offset(&self, offset: i32, type_: u32) -> zbus::Result<(String, i32, i32)>; |
96 | |
97 | /// GetTextAtOffset method |
98 | fn get_text_at_offset(&self, offset: i32, type_: u32) -> zbus::Result<(String, i32, i32)>; |
99 | |
100 | /// GetTextBeforeOffset method |
101 | fn get_text_before_offset(&self, offset: i32, type_: u32) -> zbus::Result<(String, i32, i32)>; |
102 | |
103 | /// RemoveSelection method |
104 | fn remove_selection(&self, selection_num: i32) -> zbus::Result<bool>; |
105 | |
106 | /// ScrollSubstringTo method |
107 | fn scroll_substring_to( |
108 | &self, |
109 | start_offset: i32, |
110 | end_offset: i32, |
111 | type_: u32, |
112 | ) -> zbus::Result<bool>; |
113 | |
114 | /// ScrollSubstringToPoint method |
115 | fn scroll_substring_to_point( |
116 | &self, |
117 | start_offset: i32, |
118 | end_offset: i32, |
119 | type_: u32, |
120 | x: i32, |
121 | y: i32, |
122 | ) -> zbus::Result<bool>; |
123 | |
124 | /// SetCaretOffset method |
125 | fn set_caret_offset(&self, offset: i32) -> zbus::Result<bool>; |
126 | |
127 | /// SetSelection method |
128 | fn set_selection( |
129 | &self, |
130 | selection_num: i32, |
131 | start_offset: i32, |
132 | end_offset: i32, |
133 | ) -> zbus::Result<bool>; |
134 | |
135 | /// CaretOffset property |
136 | #[dbus_proxy(property)] |
137 | fn caret_offset(&self) -> zbus::Result<i32>; |
138 | |
139 | /// CharacterCount property |
140 | #[dbus_proxy(property)] |
141 | fn character_count(&self) -> zbus::Result<i32>; |
142 | } |
143 | |