gdk4/
button_event.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use std::fmt;
4
5use crate::{ButtonEvent, EventType};
6
7define_event! {
8    ButtonEvent,
9    crate::ffi::GdkButtonEvent,
10    &[EventType::ButtonPress, EventType::ButtonRelease]
11}
12
13impl fmt::Debug for ButtonEvent {
14    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15        f.debug_struct("ButtonEvent")
16            .field("button", &self.button())
17            .finish()
18    }
19}