pub type ButtonReleaseEvent = ButtonPressEvent;
Expand description
a mouse button was pressed/released
Aliased Type§
struct ButtonReleaseEvent { /* private fields */ }
Implementations
source§impl ButtonPressEvent
impl ButtonPressEvent
pub fn new( detail: Button, time: Timestamp, root: Window, event: Window, child: Window, root_x: i16, root_y: i16, event_x: i16, event_y: i16, state: KeyButMask, same_screen: bool, ) -> ButtonPressEvent
pub fn response_type(&self) -> u8
sourcepub fn detail(&self) -> Button
pub fn detail(&self) -> Button
The keycode (a number representing a physical key on the keyboard) of the key which was pressed.
pub fn sequence(&self) -> u16
pub fn event(&self) -> Window
pub fn child(&self) -> Window
sourcepub fn root_x(&self) -> i16
pub fn root_x(&self) -> i16
The X coordinate of the pointer relative to the root
window at the time of
the event.
sourcepub fn root_y(&self) -> i16
pub fn root_y(&self) -> i16
The Y coordinate of the pointer relative to the root
window at the time of
the event.
sourcepub fn event_x(&self) -> i16
pub fn event_x(&self) -> i16
If same_screen
is true, this is the X coordinate relative to the event
window’s origin. Otherwise, event_x
will be set to zero.
sourcepub fn event_y(&self) -> i16
pub fn event_y(&self) -> i16
If same_screen
is true, this is the Y coordinate relative to the event
window’s origin. Otherwise, event_y
will be set to zero.
sourcepub fn state(&self) -> KeyButMask
pub fn state(&self) -> KeyButMask
The logical state of the pointer buttons and modifier keys just prior to the event.
sourcepub fn same_screen(&self) -> bool
pub fn same_screen(&self) -> bool
Whether the event
window is on the same screen as the root
window.