SDL2

Owns both the loader, logging, keyboard state... This object is passed around to other SDL wrapper objects to ensure library loading.

Constructors

this
this(Logger logger)

Load SDL2 library, redirect logging to our logger. You can pass a null logger if you don't want logging.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

close
void close()

Releases the SDL library and all resources. All resources should have been released at this point, since you won't be able to call any SDL function afterwards.

firstDisplaySize
vec2i firstDisplaySize()
getCPUCount
int getCPUCount()
getClipboard
string getClipboard()
getDisplays
SDL2VideoDisplay[] getDisplays()
getErrorString
string getErrorString()
Undocumented in source. Be warned that the author may not have intended to support it.
getL1LineSize
int getL1LineSize()
getPlatform
string getPlatform()
getRenderersInfo
SDL2RendererInfo[] getRenderersInfo()
getVideoDrivers
string[] getVideoDrivers()
keyboard
SDL2Keyboard keyboard()
pollEvent
bool pollEvent(SDL_Event* event)

Get next SDL event. Input state gets updated and window callbacks are called too.

processEvents
void processEvents()

Process all pending SDL events. Input state gets updated and window callbacks are called too.

registerWindow
void registerWindow(SDL2Window window)
Undocumented in source. Be warned that the author may not have intended to support it.
setClipboard
string setClipboard(string s)

Sets clipboard content.

startTextInput
void startTextInput()

Start text input.

stopTextInput
void stopTextInput()

Stops text input.

throwSDL2Exception
void throwSDL2Exception(string callThatFailed)
Undocumented in source. Be warned that the author may not have intended to support it.
unregisterWindow
void unregisterWindow(SDL2Window window)
Undocumented in source. Be warned that the author may not have intended to support it.
wasQuitResquested
bool wasQuitResquested()

Variables

_logger
Logger _logger;
Undocumented in source.

Meta