All Bundles
Display
Video display
Operations
GetClosestDisplayMode
Get the closest match to the requested display mode
function : GetClosestDisplayMode(displayIndex:Int, mode:DisplayMode, closest:DisplayMode) ~ Bool
Parameters
Name | Type | Description |
---|
displayIndex | Int | the index of the display to query |
mode | DisplayMode | an SDL_DisplayMode structure containing the desired display mode |
closest | DisplayMode | an SDL_DisplayMode structure filled in with the closest match of the available display modes |
Return
Type | Description |
---|
Bool | true of success, false otherwise |
GetCurrentDisplayMode
Get information about the current display mode
function : GetCurrentDisplayMode(displayIndex:Int, mode:DisplayMode) ~ Int
Parameters
Name | Type | Description |
---|
displayIndex | Int | the index of the display to query |
mode | DisplayMode | an DisplayMode class filled in with the current display mode |
Return
Type | Description |
---|
Int | Returns 0 on success or a negative error code on failure |
GetCurrentVideoDriver
Name of the currently initialized video driver
function : GetCurrentVideoDriver() ~ String
Return
Type | Description |
---|
String | name of the current video driver |
GetDPI
Get the dots/pixels-per-inch for a display
function : GetDPI(index:Int, ddpi:FloatRef, hdpi:FloatRef, vdpi:FloatRef) ~ Int
Parameters
Name | Type | Description |
---|
index | Int | index of the display from which DPI information should be queried |
ddpi | FloatRef | pointer filled in with the diagonal DPI of the display; may be NULL |
hdpi | FloatRef | pointer filled in with the horizontal DPI of the display; may be NULL |
vdpi | FloatRef | pointer filled in with the vertical DPI of the display; may be NULL |
Return
Type | Description |
---|
Int | 0 on success or a negative error code on failure |
GetDisplayBounds
Get the desktop area represented by a display, with the primary display located at 0,0
function : GetDisplayBounds(displayIndex:Int, rect:Rect) ~ Int
Parameters
Name | Type | Description |
---|
displayIndex | Int | the index of the display to query |
rect | Rect | the SDL_Rect structure filled in with the display bounds |
Return
Type | Description |
---|
Int | 0 on success or a negative error code on failure |
GetDisplayMode
Get information about a specific display mode
function : GetDisplayMode(displayIndex:Int, modeIndex:Int, mode:DisplayMode) ~ Int
Parameters
Name | Type | Description |
---|
displayIndex | Int | the index of the display to query |
modeIndex | Int | the index of the display mode to query |
mode | DisplayMode | an DisplayMode class filled in with the mode at modeIndex |
Return
Type | Description |
---|
Int | Returns 0 on success or a negative error code on failure |
GetDisplayName
Get the name of a display in UTF-8 encoding
function : GetDisplayName(displayIndex:Int) ~ String
Parameters
Name | Type | Description |
---|
displayIndex | Int | the index of display from which the name should be queried |
Return
Type | Description |
---|
String | the name of a display |
GetNumDisplayModes
Get the number of available display modes
function : GetNumDisplayModes(displayIndex:Int) ~ Int
Parameters
Name | Type | Description |
---|
displayIndex | Int | the index of the display to query |
Return
Type | Description |
---|
Int | number >= 1 on success or a negative error code on failure |
GetNumVideoDisplays
Get the number of available video displays
function : GetNumVideoDisplays() ~ Int
Return
Type | Description |
---|
Int | number >= 1 or a negative error code on failure |
GetNumVideoDrivers
Get the number of video drivers compiled into SDL
function : GetNumVideoDrivers() ~ Int
Return
Type | Description |
---|
Int | number >= 1 on success or a negative error code on failure |
GetVideoDriver
Get the name of a built in video driver
function : GetVideoDriver(index:Int) ~ String
Parameters
Name | Type | Description |
---|
index | Int | the index of a video driver |
Return
Type | Description |
---|
String | name of the video driver with the given index |
VideoInit
Initialize the video subsystem, optionally specifying a video driver
function : VideoInit(driver_name:String) ~ Int
Parameters
Name | Type | Description |
---|
driver_name | String | name of a video driver to initialize, or Nil for the default driver |
Return
Type | Description |
---|
Int | 0 on success or a negative error code on failure |
VideoQuit
Shut down the video subsystem
function : VideoQuit() ~ Nil