accesskit_atspi_common/
events.rs1use accesskit::NodeId;
7use atspi_common::{Politeness, 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, Politeness),
38 BoundsChanged(Rect),
39 CaretMoved(i32),
40 ChildAdded(usize, NodeId),
41 ChildRemoved(NodeId),
42 PropertyChanged(Property),
43 SelectionChanged,
44 StateChanged(State, bool),
45 TextInserted {
46 start_index: i32,
47 length: i32,
48 content: String,
49 },
50 TextRemoved {
51 start_index: i32,
52 length: i32,
53 content: String,
54 },
55 TextSelectionChanged,
56}
57
58#[derive(Debug)]
59pub enum WindowEvent {
60 Activated,
61 Deactivated,
62}