atspi_proxies/
text.rs

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
15use crate::common::{ClipType, CoordType, Granularity};
16
17#[zbus::proxy(interface = "org.a11y.atspi.Text", assume_defaults = true)]
18pub trait Text {
19	/// AddSelection method
20	fn add_selection(&self, start_offset: i32, end_offset: i32) -> zbus::Result<bool>;
21
22	/// GetAttributeRun method
23	fn get_attribute_run(
24		&self,
25		offset: i32,
26		include_defaults: bool,
27	) -> zbus::Result<(std::collections::HashMap<String, String>, i32, i32)>;
28
29	/// GetAttributeValue method
30	fn get_attribute_value(&self, offset: i32, attribute_name: &str) -> zbus::Result<String>;
31
32	/// GetAttributes method
33	fn get_attributes(
34		&self,
35		offset: i32,
36	) -> zbus::Result<(std::collections::HashMap<String, String>, i32, i32)>;
37
38	/// GetBoundedRanges method
39	fn get_bounded_ranges(
40		&self,
41		x: i32,
42		y: i32,
43		width: i32,
44		height: i32,
45		coord_type: CoordType,
46		x_clip_type: ClipType,
47		y_clip_type: ClipType,
48	) -> zbus::Result<Vec<(i32, i32, String, zbus::zvariant::OwnedValue)>>;
49
50	/// GetCharacterAtOffset method
51	fn get_character_at_offset(&self, offset: i32) -> zbus::Result<i32>;
52
53	/// GetCharacterExtents method
54	fn get_character_extents(
55		&self,
56		offset: i32,
57		coord_type: CoordType,
58	) -> zbus::Result<(i32, i32, i32, i32)>;
59
60	/// GetDefaultAttributeSet method
61	fn get_default_attribute_set(&self) -> zbus::Result<std::collections::HashMap<String, String>>;
62
63	/// GetDefaultAttributes method
64	fn get_default_attributes(&self) -> zbus::Result<std::collections::HashMap<String, String>>;
65
66	/// GetNSelections method
67	fn get_nselections(&self) -> zbus::Result<i32>;
68
69	/// GetOffsetAtPoint method
70	fn get_offset_at_point(&self, x: i32, y: i32, coord_type: CoordType) -> zbus::Result<i32>;
71
72	/// GetRangeExtents method
73	fn get_range_extents(
74		&self,
75		start_offset: i32,
76		end_offset: i32,
77		coord_type: CoordType,
78	) -> zbus::Result<(i32, i32, i32, i32)>;
79
80	/// GetSelection method
81	fn get_selection(&self, selection_num: i32) -> zbus::Result<(i32, i32)>;
82
83	/// GetStringAtOffset method
84	fn get_string_at_offset(
85		&self,
86		offset: i32,
87		granularity: Granularity,
88	) -> zbus::Result<(String, i32, i32)>;
89
90	/// GetText method
91	fn get_text(&self, start_offset: i32, end_offset: i32) -> zbus::Result<String>;
92
93	/// GetTextAfterOffset method
94	fn get_text_after_offset(&self, offset: i32, type_: u32) -> zbus::Result<(String, i32, i32)>;
95
96	/// GetTextAtOffset method
97	fn get_text_at_offset(&self, offset: i32, type_: u32) -> zbus::Result<(String, i32, i32)>;
98
99	/// GetTextBeforeOffset method
100	fn get_text_before_offset(&self, offset: i32, type_: u32) -> zbus::Result<(String, i32, i32)>;
101
102	/// RemoveSelection method
103	fn remove_selection(&self, selection_num: i32) -> zbus::Result<bool>;
104
105	/// ScrollSubstringTo method
106	fn scroll_substring_to(
107		&self,
108		start_offset: i32,
109		end_offset: i32,
110		type_: u32,
111	) -> zbus::Result<bool>;
112
113	/// ScrollSubstringToPoint method
114	fn scroll_substring_to_point(
115		&self,
116		start_offset: i32,
117		end_offset: i32,
118		type_: u32,
119		x: i32,
120		y: i32,
121	) -> zbus::Result<bool>;
122
123	/// SetCaretOffset method
124	fn set_caret_offset(&self, offset: i32) -> zbus::Result<bool>;
125
126	/// SetSelection method
127	fn set_selection(
128		&self,
129		selection_num: i32,
130		start_offset: i32,
131		end_offset: i32,
132	) -> zbus::Result<bool>;
133
134	/// CaretOffset property
135	#[zbus(property)]
136	fn caret_offset(&self) -> zbus::Result<i32>;
137
138	/// CharacterCount property
139	#[zbus(property)]
140	fn character_count(&self) -> zbus::Result<i32>;
141}