Home

Display

Video display

Operations

GetClosestDisplayMode

Get the closest match to the requested display mode

function : public : GetClosestDisplayMode(displayIndex:Int, mode:DisplayMode, closest:DisplayMode) ~ Bool
Parameters
NameTypeDescription
displayIndexIntthe index of the display to query
modeDisplayModean SDL_DisplayMode structure containing the desired display mode
closestDisplayModean SDL_DisplayMode structure filled in with the closest match of the available display modes

Return
TypeDescription
Booltrue of success, false otherwise

GetCurrentDisplayMode

Get information about the current display mode

function : public : GetCurrentDisplayMode(displayIndex:Int, mode:DisplayMode) ~ Int
Parameters
NameTypeDescription
displayIndexIntthe index of the display to query
modeDisplayModean DisplayMode class filled in with the current display mode

Return
TypeDescription
IntReturns 0 on success or a negative error code on failure

GetCurrentVideoDriver

Name of the currently initialized video driver

function : public : GetCurrentVideoDriver() ~ String
Return
TypeDescription
Stringname of the current video driver

GetDisplayBounds

Get the desktop area represented by a display, with the primary display located at 0,0

function : public : GetDisplayBounds(displayIndex:Int, rect:Rect) ~ Int
Parameters
NameTypeDescription
displayIndexIntthe index of the display to query
rectRectthe SDL_Rect structure filled in with the display bounds

Return
TypeDescription
Int0 on success or a negative error code on failure

GetDisplayMode

Get information about a specific display mode

function : public : GetDisplayMode(displayIndex:Int, modeIndex:Int, mode:DisplayMode) ~ Int
Parameters
NameTypeDescription
displayIndexIntthe index of the display to query
modeIndexIntthe index of the display mode to query
modeDisplayModean DisplayMode class filled in with the mode at modeIndex

Return
TypeDescription
IntReturns 0 on success or a negative error code on failure

GetDisplayName

Get the name of a display in UTF-8 encoding

function : public : GetDisplayName(displayIndex:Int) ~ String
Parameters
NameTypeDescription
displayIndexIntthe index of display from which the name should be queried

Return
TypeDescription
Stringthe name of a display

GetNumDisplayModes

Get the number of available display modes

function : public : GetNumDisplayModes(displayIndex:Int) ~ Int
Parameters
NameTypeDescription
displayIndexIntthe index of the display to query

Return
TypeDescription
Intnumber >= 1 on success or a negative error code on failure

GetNumVideoDisplays

Get the number of available video displays

function : public : GetNumVideoDisplays() ~ Int
Return
TypeDescription
Intnumber >= 1 or a negative error code on failure

GetNumVideoDrivers

Get the number of video drivers compiled into SDL

function : public : GetNumVideoDrivers() ~ Int
Return
TypeDescription
Intnumber >= 1 on success or a negative error code on failure

GetVideoDriver

Get the name of a built in video driver

function : public : GetVideoDriver(index:Int) ~ String
Parameters
NameTypeDescription
indexIntthe index of a video driver

Return
TypeDescription
Stringname of the video driver with the given index

VideoInit

Initialize the video subsystem, optionally specifying a video driver

function : public : VideoInit(driver_name:String) ~ Int
Parameters
NameTypeDescription
driver_nameStringname of a video driver to initialize, or Nil for the default driver

Return
TypeDescription
Int0 on success or a negative error code on failure

VideoQuit

Shut down the video subsystem

function : public : VideoQuit() ~ Nil