atspi_proxies/
component.rs

1//! # `DBus` interface proxy for: `org.a11y.atspi.Component`
2//!
3//! This code was generated by `zbus-xmlgen` `2.0.1` from `DBus` introspection data.
4//! Source: `Component.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
13use crate::common::{CoordType, Layer, ScrollType};
14use atspi_common::object_ref::ObjectRefOwned;
15
16#[zbus::proxy(interface = "org.a11y.atspi.Component", assume_defaults = true)]
17pub trait Component {
18	/// `Contains` method
19	fn contains(&self, x: i32, y: i32, coord_type: CoordType) -> zbus::Result<bool>;
20
21	/// `GetAccessibleAtPoint` method
22	/// To get an accessible at a point inside a frame of a particular app, you must use `CoordType::Window`
23	fn get_accessible_at_point(
24		&self,
25		x: i32,
26		y: i32,
27		coord_type: CoordType,
28	) -> zbus::Result<ObjectRefOwned>;
29
30	/// `GetAlpha` method
31	fn get_alpha(&self) -> zbus::Result<f64>;
32
33	/// `GetExtents` method
34	fn get_extents(&self, coord_type: CoordType) -> zbus::Result<(i32, i32, i32, i32)>;
35
36	/// `GetLayer` method
37	fn get_layer(&self) -> zbus::Result<Layer>;
38
39	/// `GetMDIZOrder` method
40	#[zbus(name = "GetMDIZOrder")]
41	fn get_mdiz_order(&self) -> zbus::Result<i16>;
42
43	/// `GetPosition` method
44	/// To get the position of a frame of a particular app, you must use `CoordType::Screen`
45	fn get_position(&self, coord_type: CoordType) -> zbus::Result<(i32, i32)>;
46
47	/// `GetSize` method
48	fn get_size(&self) -> zbus::Result<(i32, i32)>;
49
50	/// `GrabFocus` method
51	fn grab_focus(&self) -> zbus::Result<bool>;
52
53	/// `ScrollTo` method
54	fn scroll_to(&self, type_: ScrollType) -> zbus::Result<bool>;
55
56	/// `ScrollToPoint` method
57	fn scroll_to_point(&self, coord_type: CoordType, x: i32, y: i32) -> zbus::Result<bool>;
58
59	/// `SetExtents` method
60	fn set_extents(
61		&self,
62		x: i32,
63		y: i32,
64		width: i32,
65		height: i32,
66		coord_type: CoordType,
67	) -> zbus::Result<bool>;
68
69	/// `SetPosition` method
70	fn set_position(&self, x: i32, y: i32, coord_type: CoordType) -> zbus::Result<bool>;
71
72	/// `SetSize` method
73	fn set_size(&self, width: i32, height: i32) -> zbus::Result<bool>;
74}