struct NCurses::MouseEvent

Overview

Returned by #get_mouse after Key::Mouse has been returned

Defined in:

ncurses/mouse_event.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(device_id : Int16, coordinates : NamedTuple(y: Int32, x: Int32, z: Int32), state : LibNCurses::Mouse) #

[View source]
def self.new(event : LibNCurses::MEVENT) #

Converts fields from LibC ints to specific types


[View source]

Instance Method Detail

def coordinates : NamedTuple(y: Int32, x: Int32, z: Int32) #

[View source]
def device_id : Int16 #

[View source]
def enclose?(window : Window) #

If this mouse event took place inside a specific window


[View source]
def non_relative(window : Window) : MouseEvent #

Returns a new MouseEvent with full-screen relative coordinates

The opposite of #relative

Wrapper for wmouse_trafo()


[View source]
def relative(window : Window) : MouseEvent #

Returns a new MouseEvent with window-relative coordinates

Wrapper for wmouse_trafo()


[View source]
def state : Mouse #

[View source]