Dgame.Window.Event

« Go back


» Toggle member

Bottom


struct WindowMoveEvent;
The Window move Event structure.

int x;
The new x position

int y;
The new y position

struct WindowSizeEvent;
The Window size Event structure.

int width;
The new width

int height;
The new height

struct WindowEvent;
The Window Event structure.

enum Type: int;
All supported Window Event Types

Shown
Window has been shown

Hidden
Window has been hidden

Exposed
Window has been exposed and should be redrawn

Moved
Window has been moved

Resized
Window has been resized

SizeChanged
Window size has changed; this event is followed by Type.Resized

Minimized
Window has been minimized

Maximized
Window has been maximized

Restored
Window has been restored to normal size and position

Enter
Window has gained mouse focus

Leave
Window has lost mouse focus

FocusGained
Window has gained keyboard focus

FocusLost
Window has lost keyboard focus

Close
The window manager requests that the window be closed

Type event;
The Type of the Window Event

WindowSizeEvent size;
Size Event

WindowMoveEvent motion;
Motion Event

struct KeyboardEvent;
The Keyboard Event structure.

bool isPressed;
true, if the key is pressed

Keyboard.Key key;
The Key which is released or pressed.

Keyboard.Mod mod;
The Key modifier.

bool isRepeat;
true, if this is a key repeat.

deprecated alias code = key;
An alias

struct MouseButtonEvent;
The Mouse button Event structure.

Mouse.Button button;
The mouse button which is pressed or released.

bool isPressed;
true, if the button is pressed

ubyte clicks;
1 for single-click, 2 for double-click, etc.

int x;
Current x position.

int y;
Current y position.

struct MouseMotionEvent;
The Mouse motion Event structure.

bool isPressed;
true, if the button is pressed

int x;
Current x position.

int y;
Current y position.

int rel_x;
Relative motion in the x direction.

int rel_y;
Relative motion in the y direction.

struct MouseWheelEvent;
The Mouse wheel Event structure.

int x;
The amount scrolled horizontally, positive to the right and negative to the left

int y;
The amount scrolled vertically, positive away from the user and negative toward the user

struct JoystickAxisEvent;
The Joystick axis motion Event structure

int which;
The instance id of the joystick which reported the event

ubyte axis;
The index of the axis that changed Typically 0 is the x axis, 1 is the y axis etc.

short value;
The current position of the axis (range: -32768 to 32767)

struct JoystickButtonEvent;
The Joystick button Event structure

int which;
The instance id of the joystick which reported the event

ubyte button;
The index of the button which is pressed or released

bool isPressed;
true, if the button is pressed

struct JoystickHatEvent;
The Joystick hat Event structure

int which;
The instance id of the joystick which reported the event

ubyte hat;
The index of the hat that changed

Joystick.Hat value;
The new position of the hat

See Joystick.Hat enum

struct JoystickDeviceEvent;
The Joystick device Event structure

int which;
The instance id of the joystick which reported the event

struct ControllerAxisEvent;
The Game Controller axis Event structure

int which;
The instance id of the joystick which reported the event

GameController.Axis axis;
The index of the axis that changed Typically 0 is the x axis, 1 is the y axis etc.

short value;
The current position of the axis (range: -32768 to 32767)

struct ControllerButtonEvent;
The Game Controller button Event structure

int which;
The instance id of the joystick which reported the event

GameController.Button button;
The GameController button which is pressed or released

bool isPressed;
true, if the button is pressed

struct ControllerDeviceEvent;
The Game Controller device Event structure

int which;
The instance id of the joystick which reported the event

struct TouchFingerEvent;
The Finger Touch Event structure

long touchId;
The id of the touch device

long fingerId;
The id of the finger who touched the device

float x;
The x coordinate of the touch event, in range of 0 .. 1 Multiply it with the width if the Window to get the real x coordinate

float y;
The y coordinate of the touch event, in range of 0 .. 1 Multiply it with the height if the Window to get the real y coordinate

float dx;
The distance of the x coordinate (since the last event) in range of 0 .. 1

float dy;
The distance of the y coordinate (since the last event) in range of 0 .. 1

float pressure;
The quantity of pressure applied in range of 0 .. 1

union MouseUnion;
Mouse union

MouseButtonEvent button;
Mouse button Event

MouseMotionEvent motion;
Mouse motion Event

MouseWheelEvent wheel;
Mouse wheel Event

union JoystickUnion;
Joystick union

JoystickAxisEvent motion;
Joystick motion Event

JoystickButtonEvent button;
Joystick button Event

JoystickHatEvent hat;
Joystick hat Event

JoystickDeviceEvent device;
Joystick device Event

union ControllerUnion;
Game Controller union

ControllerAxisEvent motion;
Controller motion Event

ControllerButtonEvent button;
Controller button Event

ControllerDeviceEvent device;
Controller device Event

struct Event;
The Event structure. Event defines a system event and it's parameters

Author:
Randy Schuett (rswhite4@googlemail.com)

enum Type: int;
All supported Event Types.

Quit
Quit Event. Time to close the window.

Window
Something happens with the window.

KeyDown
A key is pressed.

KeyUp
A key is released.

MouseMotion
The mouse has moved.

MouseButtonDown
A mouse button is pressed.

MouseButtonUp
A mouse button is released.

MouseWheel
The mouse wheel has scolled.

JoystickAxisMotion
A Joystick axis has moved

JoystickButtonDown
A Joystick button is pressed

JoystickButtonUp
A Joystick button is released

JoystickHatMotion
A Joystick hat has moved

JoystickDeviceAdded
A Joystick was added

JoystickDeviceRemoved
A Joystick was removed

ControllerAxisMotion
A GameController axis has moved

ControllerButtonDown
A GameController button is pressed

ControllerButtonUp
A GameController button is released

ControllerDeviceAdded
A GameController was added

ControllerDeviceRemoved
A GameController was removed

ControllerDeviceMapped
A GameController was mapped

FingerMotion
A finger was moved onto the touch device

FingerDown
A finger is pressed onto the touch device

FingerUp
A finger is released of the touch device

Type type;
The type of the Event

uint timestamp;
Milliseconds since the app is running

uint windowId;
The window which has raised this event

KeyboardEvent keyboard;
Keyboard Event

WindowEvent window;
Window Event

MouseUnion mouse;
Mouse Events

JoystickUnion joystick;
Joystick Events

ControllerUnion controller;
Controller Events

TouchFingerEvent fingerTouch;
Finger-Touch Events


Page generated by Ddoc.

» Dgame.Window.Event on Github

Top

« Go back