accesskit_atspi_common/
events.rs
1use accesskit::NodeId;
7use atspi_common::{Live, Role, State};
8
9use crate::{NodeIdOrRoot, Rect};
10
11#[derive(Debug)]
12pub enum Event {
13 Object {
14 target: NodeIdOrRoot,
15 event: ObjectEvent,
16 },
17 Window {
18 target: NodeId,
19 name: String,
20 event: WindowEvent,
21 },
22}
23
24#[derive(Debug)]
25pub enum Property {
26 Name(String),
27 Description(String),
28 Parent(NodeIdOrRoot),
29 Role(Role),
30 Value(f64),
31}
32
33#[allow(clippy::enum_variant_names)]
34#[derive(Debug)]
35pub enum ObjectEvent {
36 ActiveDescendantChanged(NodeId),
37 Announcement(String, Live),
38 BoundsChanged(Rect),
39 CaretMoved(i32),
40 ChildAdded(usize, NodeId),
41 ChildRemoved(NodeId),
42 PropertyChanged(Property),
43 StateChanged(State, bool),
44 TextInserted {
45 start_index: i32,
46 length: i32,
47 content: String,
48 },
49 TextRemoved {
50 start_index: i32,
51 length: i32,
52 content: String,
53 },
54 TextSelectionChanged,
55}
56
57#[derive(Debug)]
58pub enum WindowEvent {
59 Activated,
60 Deactivated,
61}