Skip to content

Commit

Permalink
Using a struct in a doc item is not considered 'using' it
Browse files Browse the repository at this point in the history
  • Loading branch information
TTWNO committed Jun 28, 2024
1 parent e75a5f0 commit 301e8d0
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 44 deletions.
12 changes: 6 additions & 6 deletions atspi-common/src/events/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,35 +104,35 @@ impl HasMatchRule for DocumentEvents {
/// `LibreOffice` has loaded a document from disk.
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct LoadCompleteEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

/// An event triggered by a reloading of a document.
/// For example: pressing F5, or `Control + r` will reload a page in a web browser.
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct ReloadEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

/// An event triggered by the cancelling of a document load.
/// For example: during the loading of a large web page, a user may press `Escape` to stop loading the page.
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct LoadStoppedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct ContentChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct AttributesChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

Expand All @@ -145,7 +145,7 @@ pub struct AttributesChangedEvent {
/// page number.
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct PageChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

Expand Down
2 changes: 1 addition & 1 deletion atspi-common/src/events/focus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl HasMatchRule for FocusEvents {

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct FocusEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

Expand Down
42 changes: 21 additions & 21 deletions atspi-common/src/events/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl HasMatchRule for ObjectEvents {
/// The `org.a11y.atspi.Event.Object:PropertyChange` event.
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct PropertyChangeEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::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,
Expand All @@ -257,7 +257,7 @@ impl Default for PropertyChangeEvent {
}
}

/// Any accessibility related property on an [`ObjectRef`].
/// Any accessibility related property on an [`crate::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)]
Expand Down Expand Up @@ -404,21 +404,21 @@ impl From<Property> for OwnedValue {

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct BoundsChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct LinkSelectedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

/// A state of an object has been modified.
/// A [`State`] can be added or removed from any [`ObjectRef`].
/// A [`State`] can be added or removed from any [`crate::ObjectRef`].
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct StateChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
/// The state to be enabled/disabled.
pub state: State,
Expand Down Expand Up @@ -451,10 +451,10 @@ mod i32_bool_conversion {
}
}

/// A child of an [`ObjectRef`] has been added or removed.
/// A child of an [`crate::ObjectRef`] has been added or removed.
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct ChildrenChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
/// Operation, which may be one of:
///
Expand All @@ -474,32 +474,32 @@ pub struct ChildrenChangedEvent {

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct VisibleDataChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct SelectionChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct ModelChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct ActiveDescendantChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
pub child: ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct AnnouncementEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
/// Text of the announcement.
pub text: String,
Expand All @@ -509,7 +509,7 @@ pub struct AnnouncementEvent {

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct AttributesChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

Expand Down Expand Up @@ -557,20 +557,20 @@ pub struct ColumnDeletedEvent {

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct TextBoundsChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct TextSelectionChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

/// Text has changed within an [`ObjectRef`].
/// Text has changed within an [`crate::ObjectRef`].
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct TextChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
/// Operation, which may be one of:
///
Expand All @@ -595,7 +595,7 @@ pub struct TextChangedEvent {
/// changed.
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct TextAttributesChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

Expand Down Expand Up @@ -1062,7 +1062,7 @@ impl From<ChildrenChangedEvent> for EventBodyOwned {
kind: event.operation,
detail1: event.index_in_parent,
detail2: i32::default(),
// `OwnedValue` is constructed from the `ObjectRef`
// `OwnedValue` is constructed from the `crate::ObjectRef`
// Only path to fail is to convert a Fd into an `OwnedValue`.
// Therefore, this is safe.
any_data: Value::from(event.child)
Expand Down Expand Up @@ -1145,7 +1145,7 @@ impl From<ActiveDescendantChangedEvent> for EventBodyOwned {
kind: String::default(),
detail1: i32::default(),
detail2: i32::default(),
// `OwnedValue` is constructed from the `ObjectRef`
// `OwnedValue` is constructed from the `crate::ObjectRef`
// Only path to fail is to convert a Fd into an `OwnedValue`.
// Therefore, this is safe.
any_data: Value::from(event.child)
Expand Down
10 changes: 5 additions & 5 deletions atspi-common/src/events/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,37 +96,37 @@ impl HasMatchRule for TerminalEvents {
/// A line of text has been changed.
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct LineChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

/// The width of a terminal emulator has changed sufficiently such that the number of characters
/// able to fit on one *visual* line has changed.
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct ColumnCountChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

/// The height of a terminal emulator has changed sufficiently such that the number of lines
/// able to fit within the terminal has changed.
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct LineCountChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct ApplicationChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

/// The width of a terminal emulator has changed sufficiently such that the number of characters
/// able to fit on one *visual* line has changed.
#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct CharWidthChangedEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

Expand Down
22 changes: 11 additions & 11 deletions atspi-common/src/events/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ pub struct MaximizeEvent {

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct RestoreEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

Expand All @@ -247,7 +247,7 @@ pub struct CreateEvent {

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct ReparentEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

Expand All @@ -267,37 +267,37 @@ pub struct DesktopDestroyEvent {

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct DestroyEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct ActivateEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct DeactivateEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct RaiseEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct LowerEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct MoveEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

Expand All @@ -310,19 +310,19 @@ pub struct ResizeEvent {

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct ShadeEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct UUshadeEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

#[derive(Debug, PartialEq, Clone, serde::Serialize, serde::Deserialize, Eq, Hash, Default)]
pub struct RestyleEvent {
/// The [`ObjectRef`] which the event applies to.
/// The [`crate::ObjectRef`] which the event applies to.
pub item: crate::events::ObjectRef,
}

Expand Down

0 comments on commit 301e8d0

Please sign in to comment.