1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! # `DBus` interface proxy for: `org.a11y.atspi.Component`
//!
//! This code was generated by `zbus-xmlgen` `2.0.1` from `DBus` introspection data.
//! Source: `Component.xml`.
//!
//! You may prefer to adapt it, instead of using it verbatim.
//!
//! More information can be found in the
//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html)
//! section of the zbus documentation.
//!

use crate::common::{CoordType, Layer, ObjectRef, ScrollType};

#[zbus::proxy(interface = "org.a11y.atspi.Component", assume_defaults = true)]
trait Component {
	/// Contains method
	fn contains(&self, x: i32, y: i32, coord_type: CoordType) -> zbus::Result<bool>;

	/// GetAccessibleAtPoint method
	fn get_accessible_at_point(
		&self,
		x: i32,
		y: i32,
		coord_type: CoordType,
	) -> zbus::Result<ObjectRef>;

	/// GetAlpha method
	fn get_alpha(&self) -> zbus::Result<f64>;

	/// GetExtents method
	fn get_extents(&self, coord_type: CoordType) -> zbus::Result<(i32, i32, i32, i32)>;

	/// GetLayer method
	fn get_layer(&self) -> zbus::Result<Layer>;

	/// GetMDIZOrder method
	fn get_mdizorder(&self) -> zbus::Result<i16>;

	/// GetPosition method
	fn get_position(&self, coord_type: CoordType) -> zbus::Result<(i32, i32)>;

	/// GetSize method
	fn get_size(&self) -> zbus::Result<(i32, i32)>;

	/// GrabFocus method
	fn grab_focus(&self) -> zbus::Result<bool>;

	/// ScrollTo method
	fn scroll_to(&self, type_: ScrollType) -> zbus::Result<bool>;

	/// ScrollToPoint method
	fn scroll_to_point(&self, coord_type: CoordType, x: i32, y: i32) -> zbus::Result<bool>;

	/// SetExtents method
	fn set_extents(
		&self,
		x: i32,
		y: i32,
		width: i32,
		height: i32,
		coord_type: CoordType,
	) -> zbus::Result<bool>;

	/// SetPosition method
	fn set_position(&self, x: i32, y: i32, coord_type: CoordType) -> zbus::Result<bool>;

	/// SetSize method
	fn set_size(&self, width: i32, height: i32) -> zbus::Result<bool>;
}