struct NCurses::MouseEvent
- NCurses::MouseEvent
- Struct
- Value
- Object
Overview
Returned by #get_mouse
after Key::Mouse
has been returned
Defined in:
ncurses/mouse_event.crConstructors
- .new(device_id : Int16, coordinates : NamedTuple(y: Int32, x: Int32, z: Int32), state : LibNCurses::Mouse)
-
.new(event : LibNCurses::MEVENT)
Converts fields from LibC ints to specific types
Instance Method Summary
- #coordinates : NamedTuple(y: Int32, x: Int32, z: Int32)
- #device_id : Int16
-
#enclose?(window : Window)
If this mouse event took place inside a specific window
-
#non_relative(window : Window) : MouseEvent
Returns a new
MouseEvent
with full-screen relative coordinates -
#relative(window : Window) : MouseEvent
Returns a new
MouseEvent
with window-relative coordinates - #state : Mouse
Constructor Detail
def self.new(device_id : Int16, coordinates : NamedTuple(y: Int32, x: Int32, z: Int32), state : LibNCurses::Mouse)
#
Instance Method Detail
If this mouse event took place inside a specific window
Returns a new MouseEvent
with full-screen relative coordinates
The opposite of #relative
Wrapper for wmouse_trafo()
Returns a new MouseEvent
with window-relative coordinates
Wrapper for wmouse_trafo()