gfm



class  SDL2Window;

SDL Window wrapper.

There is two ways to receive events, either by polling a SDL2 object,

or by overriding the event callbacks.


this(SDL2 sdl2, int x, int y, int width, int height, int flags);

Creates a SDL window which targets a window.

See Also
http://wiki.libsdl.org/SDL_CreateWindow
Throws
SDL2Exception on error.

this(SDL2 sdl2, void* windowData);

Creates a SDL window from anexisting handle.

See Also
http://wiki.libsdl.org/SDL_CreateWindowFrom
Throws
SDL2Exception on error.

final void  setFullscreenSetting(uint flags);

See Also
http://wiki.libsdl.org/SDL_SetWindowFullscreen
Throws
SDL2Exception on error.

final int  getX();

Returns
X window coordinate.
See Also
http://wiki.libsdl.org/SDL_GetWindowPosition

final int  getY();

Returns
Y window coordinate.
See Also
http://wiki.libsdl.org/SDL_GetWindowPosition

final SDL_Point  getPosition();

Returns
Window coordinates.
See Also
http://wiki.libsdl.org/SDL_GetWindowPosition

final void  setPosition(int positionX, int positionY);


final void  setSize(int width, int height);


final SDL_Point  getSize();

See Also
http://wiki.libsdl.org/SDL_GetWindowSize
Returns
Window size in pixels.

final void  setIcon(SDL2Surface icon);


final void  setBordered(bool bordered);


final int  getWidth();

See Also
http://wiki.libsdl.org/SDL_GetWindowSize
Returns
Window width in pixels.

final int  getHeight();

See Also
http://wiki.libsdl.org/SDL_GetWindowSize
Returns
Window height in pixels.

final void  setTitle(string title);


final void  show();


final void  hide();


final void  minimize();


final void  maximize();


final SDL2Surface  surface();

Returns
Window  surface.
See Also
http://wiki.libsdl.org/SDL_GetWindowSurface
Throws
SDL2Exception on error.

final void  updateSurface();

Submit changes to the window surface.

See Also
http://wiki.libsdl.org/SDL_UpdateWindowSurface
Throws
SDL2Exception on error.

final int  id();

Returns
Window ID.
See Also
http://wiki.libsdl.org/SDL_GetWindowID

SDL_SysWMinfo  getWindowInfo();

Returns
System-specific window information, useful to use a third-party rendering library.
See Also
http://wiki.libsdl.org/SDL_GetWindowWMInfo
Throws
SDL2Exception on error.

void  swapBuffers();

Swap OpenGL buffers.

See Also
http://wiki.libsdl.org/SDL_GL_SwapWindow
Throws
SDL2Exception on error.

class  SDL2GLContext;

SDL OpenGL context wrapper. You probably don't need to use it directly.


this(SDL2Window window);

Creates an OpenGL context for a given SDL window.


void  close();

Release the associated SDL ressource.


void  makeCurrent();

Makes this OpenGL context current.

Throws
SDL2Exception on error.