Struct xcb::x::ButtonPressEvent
source · pub struct ButtonPressEvent { /* private fields */ }
Expand description
a mouse button was pressed/released
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.
Trait Implementations§
source§impl BaseEvent for ButtonPressEvent
impl BaseEvent for ButtonPressEvent
source§impl Debug for ButtonPressEvent
impl Debug for ButtonPressEvent
source§impl Drop for ButtonPressEvent
impl Drop for ButtonPressEvent
source§impl Raw<xcb_generic_event_t> for ButtonPressEvent
impl Raw<xcb_generic_event_t> for ButtonPressEvent
impl Send for ButtonPressEvent
impl Sync for ButtonPressEvent
Auto Trait Implementations§
impl Freeze for ButtonPressEvent
impl RefUnwindSafe for ButtonPressEvent
impl Unpin for ButtonPressEvent
impl UnwindSafe for ButtonPressEvent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more