IEventHandler

Interface for cross-platform listening for events from the window manager.

Members

Functions

isInputText
bool isInputText()

Indicates whether the user has entered text information.

isKeyDown
bool isKeyDown()

Checking if any key is pressed in the current event.

isKeyUp
bool isKeyUp()

Checking if any key is released in the current event.

isMouseDown
bool isMouseDown()

Check if the mouse button is pressed in the current event.

isMouseUp
bool isMouseUp()

Check if the mouse button is released in the current event.

isQuit
bool isQuit()

Indicates whether the user is attempting to exit the program.

isResize
bool isResize()

Indicates whether the window has been resized in this event.

nextEvent
bool nextEvent()

Moves to the next event. If there are no more events, it returns false, otherwise, it throws true and the programmer can safely check which event s in the current queue.

opApply
int opApply(int delegate(ref int) dg)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

inputChar
string inputChar [@property getter]

User entered data.

key
int key [@property getter]

Will return the key that was pressed. Returns zero if no key is pressed in the current event.

keyDown
int keyDown [@property getter]

Returns the key at the moment the key was pressed, otherwise it returns zero.

keyUp
int keyUp [@property getter]

Returns the key at the moment the key was released, otherwise it returns zero.

mouseButton
MouseButton mouseButton [@property getter]

Returns the currently pressed or released mouse button.

mouseDownButton
MouseButton mouseDownButton [@property getter]

Returns the mouse button at the moment the key was pressed; otherwise, it returns zero.

mousePosition
int[2] mousePosition [@property getter]

Returns the position of the mouse in the window.

mouseUpButton
MouseButton mouseUpButton [@property getter]

Returns the mouse button at the moment the key was released; otherwise, it returns zero.

mouseWheel
int mouseWheel [@property getter]

Returns in which direction the user is turning the mouse wheel. 1 - down, -1 - up, 0 - does not twist.

Meta