diff --git a/atspi-common/src/events/document.rs b/atspi-common/src/events/document.rs index a8d4518e..d2db94b4 100644 --- a/atspi-common/src/events/document.rs +++ b/atspi-common/src/events/document.rs @@ -134,6 +134,13 @@ pub struct AttributesChangedEvent { pub item: crate::events::ObjectRef, } +/// The focused page has changed. This event is usually sent only by document readers, signaling +/// that the _physical page equivalent is now different. +/// This event does not encode _which_ page is the new one, only that a new page is now the primary +/// one. +/// +/// See `atspi_proxies::document::DocumentProxy::current_page_number` to actively find the +/// page number. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct PageChangedEvent { /// The [`ObjectRef`] which the event applies to. diff --git a/atspi-common/src/events/object.rs b/atspi-common/src/events/object.rs index cef25adb..1bbf0551 100644 --- a/atspi-common/src/events/object.rs +++ b/atspi-common/src/events/object.rs @@ -232,6 +232,7 @@ impl HasMatchRule for ObjectEvents { pub struct PropertyChangeEvent { /// The [`ObjectRef`] which the event applies to. pub item: crate::events::ObjectRef, + // TODO: this is not necessary since the string is encoded in the `Property` type. pub property: String, pub value: Property, } @@ -254,6 +255,9 @@ impl Default for PropertyChangeEvent { } } +/// Any accessibility related property on an [`ObjectRef`]. +/// This is used only in the [`PropertyChangeEvent`]; this event gets triggered if a role or accessible +/// description of an item changes. #[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)] #[non_exhaustive] pub enum Property { @@ -563,6 +567,9 @@ pub struct TextChangedEvent { pub text: String, } +/// Signal that some attributes about the text (usually styling) have changed. +/// This event does not encode _what_ has changed about the attributes, merely that they have +/// changed. #[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)] pub struct TextAttributesChangedEvent { /// The [`ObjectRef`] which the event applies to.