v2026.5.3
All Bundles
Bundle SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2.

DisplayMode

Contains the description of a display mode

Operations

GetFormat #

Get the format

method : public : GetFormat() ~ Int

Return

TypeDescription
Intformat

GetH #

Get height

method : public : GetH() ~ Int

Return

TypeDescription
Intheight

GetRefreshRate #

Get refresh rate

method : public : GetRefreshRate() ~ Int

Return

TypeDescription
Intrefresh rate

GetW #

Get width

method : public : GetW() ~ Int

Return

TypeDescription
Intwidth

New # constructor

Constructor

New(format:Int, w:Int, h:Int, refresh_rate:Int)

Parameters

NameTypeDescription
formatIntone of the SDL_PixelFormatEnum values; see Remarks for details
wIntwidth, in screen coordinates
hIntheight, in screen coordinates
refresh_rateIntrefresh rate (in Hz), or 0 for unspecified

SetFormat #

Set the format

method : public : SetFormat(format:Int) ~ Nil

Parameters

NameTypeDescription
formatIntformat

SetH #

Set height

method : public : SetH(h:Int) ~ Nil

Parameters

NameTypeDescription
hIntheight

SetRefreshRate #

Set refresh rate

method : public : SetRefreshRate(refresh_rate:Int) ~ Nil

Parameters

NameTypeDescription
refresh_rateIntrefresh rate

SetW #

Set width

method : public : SetW(w:Int) ~ Nil

Parameters

NameTypeDescription
wIntwidth