WindowEvent

Event structure on Window Events.

Members

Enums

Type
enum Type

Types that can occur when WindowEvents are fired.

Functions

fromSDL
void fromSDL(SDL_Event event)

Function for converting a SDL event to a WindowEvent

Unions

__anonymous
union __anonymous
Undocumented in source.
__anonymous
union __anonymous
Undocumented in source.
__anonymous
union __anonymous
Undocumented in source.
__anonymous
union __anonymous
Undocumented in source.

Variables

controllerID
int controllerID;

Controller id in any Controller event.

text
string text;

Text contained in TextEntered event.

type
Type type;

Type of this event.

xrel
int xrel;
yrel
int yrel;

Relative mouse coordinates in Mouse events.

Examples

SDL_Event source;
WindowEvent event;
source.type = SDL_KEYDOWN;
source.key.keysym.sym = cast(SDL_Keycode) 42;
event.fromSDL(source);

assert(event.type == WindowEvent.Type.KeyPressed);
assert(event.key == 42);

Meta