WindowEvent

Event structure on Window Events.

Members

Enums

Type
enum Type

Types that can occur when WindowEvents are fired.

Functions

fromSDL
void fromSDL(const ref SDL_Event event)

Function for converting a SDL event to a WindowEvent

Unions

__anonymous
union __anonymous
__anonymous
union __anonymous
__anonymous
union __anonymous
__anonymous
union __anonymous

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;

Relative mouse coordinates in Mouse events.

yrel
int yrel;

Relative mouse coordinates in Mouse events.

Examples

1 SDL_Event source;
2 WindowEvent event;
3 source.type = SDL_KEYDOWN;
4 source.key.keysym.sym = 42;
5 event.fromSDL(source);
6 
7 assert(event.type == WindowEvent.Type.KeyPressed);
8 assert(event.key == 42);

Meta