atspi_common/events/
document.rs1#[cfg(feature = "zbus")]
2use crate::{
3 error::AtspiError,
4 events::{MessageConversion, MessageConversionExt},
5};
6use crate::{events::BusProperties, EventProperties};
7use zbus_names::UniqueName;
8use zvariant::ObjectPath;
9
10#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
14pub struct LoadCompleteEvent {
15 pub item: crate::events::ObjectRef,
17}
18
19#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
22pub struct ReloadEvent {
23 pub item: crate::events::ObjectRef,
25}
26
27#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
30pub struct LoadStoppedEvent {
31 pub item: crate::events::ObjectRef,
33}
34
35#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
36pub struct ContentChangedEvent {
37 pub item: crate::events::ObjectRef,
39}
40
41#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
42pub struct AttributesChangedEvent {
43 pub item: crate::events::ObjectRef,
45}
46
47#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
57pub struct PageChangedEvent {
58 pub item: crate::events::ObjectRef,
60}
61
62impl BusProperties for LoadCompleteEvent {
63 const DBUS_MEMBER: &'static str = "LoadComplete";
64 const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
65 const MATCH_RULE_STRING: &'static str =
66 "type='signal',interface='org.a11y.atspi.Event.Document',member='LoadComplete'";
67 const REGISTRY_EVENT_STRING: &'static str = "Document:";
68}
69
70impl BusProperties for ReloadEvent {
71 const DBUS_MEMBER: &'static str = "Reload";
72 const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
73 const MATCH_RULE_STRING: &'static str =
74 "type='signal',interface='org.a11y.atspi.Event.Document',member='Reload'";
75 const REGISTRY_EVENT_STRING: &'static str = "Document:";
76}
77
78impl BusProperties for LoadStoppedEvent {
79 const DBUS_MEMBER: &'static str = "LoadStopped";
80 const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
81 const MATCH_RULE_STRING: &'static str =
82 "type='signal',interface='org.a11y.atspi.Event.Document',member='LoadStopped'";
83 const REGISTRY_EVENT_STRING: &'static str = "Document:";
84}
85
86impl BusProperties for ContentChangedEvent {
87 const DBUS_MEMBER: &'static str = "ContentChanged";
88 const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
89 const MATCH_RULE_STRING: &'static str =
90 "type='signal',interface='org.a11y.atspi.Event.Document',member='ContentChanged'";
91 const REGISTRY_EVENT_STRING: &'static str = "Document:";
92}
93
94impl BusProperties for AttributesChangedEvent {
95 const DBUS_MEMBER: &'static str = "AttributesChanged";
96 const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
97 const MATCH_RULE_STRING: &'static str =
98 "type='signal',interface='org.a11y.atspi.Event.Document',member='AttributesChanged'";
99 const REGISTRY_EVENT_STRING: &'static str = "Document:";
100}
101
102impl BusProperties for PageChangedEvent {
103 const DBUS_MEMBER: &'static str = "PageChanged";
104 const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
105 const MATCH_RULE_STRING: &'static str =
106 "type='signal',interface='org.a11y.atspi.Event.Document',member='PageChanged'";
107 const REGISTRY_EVENT_STRING: &'static str = "Document:";
108}
109
110event_test_cases!(LoadCompleteEvent);
111impl_to_dbus_message!(LoadCompleteEvent);
112impl_from_dbus_message!(LoadCompleteEvent);
113impl_event_properties!(LoadCompleteEvent);
114impl_from_object_ref!(LoadCompleteEvent);
115
116event_test_cases!(ReloadEvent);
117impl_to_dbus_message!(ReloadEvent);
118impl_from_dbus_message!(ReloadEvent);
119impl_event_properties!(ReloadEvent);
120impl_from_object_ref!(ReloadEvent);
121
122event_test_cases!(LoadStoppedEvent);
123impl_to_dbus_message!(LoadStoppedEvent);
124impl_from_dbus_message!(LoadStoppedEvent);
125impl_event_properties!(LoadStoppedEvent);
126impl_from_object_ref!(LoadStoppedEvent);
127
128event_test_cases!(ContentChangedEvent);
129impl_to_dbus_message!(ContentChangedEvent);
130impl_from_dbus_message!(ContentChangedEvent);
131impl_event_properties!(ContentChangedEvent);
132impl_from_object_ref!(ContentChangedEvent);
133
134event_test_cases!(AttributesChangedEvent);
135impl_to_dbus_message!(AttributesChangedEvent);
136impl_from_dbus_message!(AttributesChangedEvent);
137impl_event_properties!(AttributesChangedEvent);
138impl_from_object_ref!(AttributesChangedEvent);
139
140event_test_cases!(PageChangedEvent);
141impl_to_dbus_message!(PageChangedEvent);
142impl_from_dbus_message!(PageChangedEvent);
143impl_event_properties!(PageChangedEvent);
144impl_from_object_ref!(PageChangedEvent);