Skip to content

Commit

Permalink
Remove unused, commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
TTWNO committed Jul 2, 2023
1 parent 065f3e8 commit a0a6768
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 893 deletions.
108 changes: 0 additions & 108 deletions atspi-common/src/events/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,6 @@ impl GenericEvent<'_> for LoadCompleteEvent {
}
}

/*
impl TryFrom<Event> for LoadCompleteEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Document(DocumentEvents::LoadComplete(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

impl GenericEvent<'_> for ReloadEvent {
const DBUS_MEMBER: &'static str = "Reload";
const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
Expand All @@ -113,18 +101,6 @@ impl GenericEvent<'_> for ReloadEvent {
}
}

/*
impl TryFrom<Event> for ReloadEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Document(DocumentEvents::Reload(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

impl GenericEvent<'_> for LoadStoppedEvent {
const DBUS_MEMBER: &'static str = "LoadStopped";
const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
Expand All @@ -149,18 +125,6 @@ impl GenericEvent<'_> for LoadStoppedEvent {
}
}

/*
impl TryFrom<Event> for LoadStoppedEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Document(DocumentEvents::LoadStopped(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

impl GenericEvent<'_> for ContentChangedEvent {
const DBUS_MEMBER: &'static str = "ContentChanged";
const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
Expand All @@ -185,18 +149,6 @@ impl GenericEvent<'_> for ContentChangedEvent {
}
}

/*
impl TryFrom<Event> for ContentChangedEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Document(DocumentEvents::ContentChanged(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

impl GenericEvent<'_> for AttributesChangedEvent {
const DBUS_MEMBER: &'static str = "AttributesChanged";
const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
Expand All @@ -221,18 +173,6 @@ impl GenericEvent<'_> for AttributesChangedEvent {
}
}

/*
impl TryFrom<Event> for AttributesChangedEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Document(DocumentEvents::AttributesChanged(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

impl GenericEvent<'_> for PageChangedEvent {
const DBUS_MEMBER: &'static str = "PageChanged";
const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Document";
Expand All @@ -257,18 +197,6 @@ impl GenericEvent<'_> for PageChangedEvent {
}
}

/*
impl TryFrom<Event> for PageChangedEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Document(DocumentEvents::PageChanged(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

#[cfg(feature = "zbus")]
impl TryFrom<&zbus::Message> for DocumentEvents {
type Error = AtspiError;
Expand Down Expand Up @@ -409,42 +337,6 @@ impl From<PageChangedEvent> for EventBodyOwned {
}
}

/*impl HasMatchRule for LoadCompleteEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Document',member='LoadComplete'";
}*/
/*impl HasMatchRule for ReloadEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Document',member='Reload'";
}*/
/*impl HasMatchRule for LoadStoppedEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Document',member='LoadStopped'";
}*/
/*impl HasMatchRule for ContentChangedEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Document',member='ContentChanged'";
}*/
/*impl HasMatchRule for AttributesChangedEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Document',member='AttributesChanged'";
}*/
/*impl HasMatchRule for PageChangedEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Document',member='PageChanged'";
}*/
/*impl HasRegistryEventString for LoadCompleteEvent {
const REGISTRY_EVENT_STRING: &'static str = "Document:LoadComplete";
}*/
/*impl HasRegistryEventString for ReloadEvent {
const REGISTRY_EVENT_STRING: &'static str = "Document:Reload";
}*/
/*impl HasRegistryEventString for LoadStoppedEvent {
const REGISTRY_EVENT_STRING: &'static str = "Document:LoadStopped";
}*/
/*impl HasRegistryEventString for ContentChangedEvent {
const REGISTRY_EVENT_STRING: &'static str = "Document:ContentChanged";
}*/
/*impl HasRegistryEventString for AttributesChangedEvent {
const REGISTRY_EVENT_STRING: &'static str = "Document:AttributesChanged";
}*/
/*impl HasRegistryEventString for PageChangedEvent {
const REGISTRY_EVENT_STRING: &'static str = "Document:PageChanged";
}*/
impl HasRegistryEventString for DocumentEvents {
const REGISTRY_EVENT_STRING: &'static str = "Document:";
}
18 changes: 0 additions & 18 deletions atspi-common/src/events/focus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ impl GenericEvent<'_> for FocusEvent {
}
}

/*
impl TryFrom<Event> for FocusEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Focus(FocusEvents::Focus(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

#[cfg(feature = "zbus")]
impl TryFrom<&zbus::Message> for FocusEvents {
type Error = AtspiError;
Expand Down Expand Up @@ -88,12 +76,6 @@ impl From<FocusEvent> for EventBodyOwned {
}
}

/*impl HasMatchRule for FocusEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Focus',member='Focus'";
}*/
/*impl HasRegistryEventString for FocusEvent {
const REGISTRY_EVENT_STRING: &'static str = "Focus:Focus";
}*/
impl HasRegistryEventString for FocusEvents {
const REGISTRY_EVENT_STRING: &'static str = "Focus:";
}
18 changes: 0 additions & 18 deletions atspi-common/src/events/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@ impl GenericEvent<'_> for ModifiersEvent {
}
}

/*
impl TryFrom<Event> for ModifiersEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Keyboard(KeyboardEvents::Modifiers(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

#[cfg(feature = "zbus")]
impl TryFrom<&zbus::Message> for KeyboardEvents {
type Error = AtspiError;
Expand Down Expand Up @@ -91,12 +79,6 @@ impl From<ModifiersEvent> for EventBodyOwned {
}
}

/*impl HasMatchRule for ModifiersEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Keyboard',member='Modifiers'";
}*/
/*impl HasRegistryEventString for ModifiersEvent {
const REGISTRY_EVENT_STRING: &'static str = "Keyboard:Modifiers";
}*/
impl HasRegistryEventString for KeyboardEvents {
const REGISTRY_EVENT_STRING: &'static str = "Keyboard:";
}
54 changes: 0 additions & 54 deletions atspi-common/src/events/mouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@ impl GenericEvent<'_> for AbsEvent {
}
}

/*
impl TryFrom<Event> for AbsEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Mouse(MouseEvents::Abs(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

impl GenericEvent<'_> for RelEvent {
const DBUS_MEMBER: &'static str = "Rel";
const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Mouse";
Expand All @@ -101,18 +89,6 @@ impl GenericEvent<'_> for RelEvent {
}
}

/*
impl TryFrom<Event> for RelEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Mouse(MouseEvents::Rel(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

impl GenericEvent<'_> for ButtonEvent {
const DBUS_MEMBER: &'static str = "Button";
const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Mouse";
Expand All @@ -137,18 +113,6 @@ impl GenericEvent<'_> for ButtonEvent {
}
}

/*
impl TryFrom<Event> for ButtonEvent {
type Error = AtspiError;
fn try_from(event: Event) -> Result<Self, Self::Error> {
if let Event::Mouse(MouseEvents::Button(inner_event)) = event {
Ok(inner_event)
} else {
Err(AtspiError::Conversion("Invalid type"))
}
}
}*/

#[cfg(feature = "zbus")]
impl TryFrom<&zbus::Message> for MouseEvents {
type Error = AtspiError;
Expand Down Expand Up @@ -213,24 +177,6 @@ impl From<ButtonEvent> for EventBodyOwned {
}
}

/*impl HasMatchRule for AbsEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Mouse',member='Abs'";
}*/
/*impl HasMatchRule for RelEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Mouse',member='Rel'";
}*/
/*impl HasMatchRule for ButtonEvent {
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Mouse',member='Button'";
}*/
/*impl HasRegistryEventString for AbsEvent {
const REGISTRY_EVENT_STRING: &'static str = "Mouse:Abs";
}*/
/*impl HasRegistryEventString for RelEvent {
const REGISTRY_EVENT_STRING: &'static str = "Mouse:Rel";
}*/
/*impl HasRegistryEventString for ButtonEvent {
const REGISTRY_EVENT_STRING: &'static str = "Mouse:Button";
}*/
impl HasRegistryEventString for MouseEvents {
const REGISTRY_EVENT_STRING: &'static str = "Mouse:";
}
Loading

0 comments on commit a0a6768

Please sign in to comment.