Kōtuku
  • Gallery
  • API
  • Wiki
  • GitHub
    • Audio
    • Config
    • Core
    • Display
    • Document
    • Font
    • HTTP
    • Network
    • Regex
    • SVG
    • Tiri
    • Vector
    • XML
    • XQuery
    • XRandR
      • Audio
      • MP3
      • Sound
      • File
      • MetaClass
      • Module
      • StorageDevice
      • Task
      • Thread
      • Time
      • Compression
      • CompressedStream
      • Config
      • LZMAStream
      • Script
      • Tiri
      • XML
      • XQuery
      • Controller
      • BlurFX
      • ColourFX
      • CompositeFX
      • ConvolveFX
      • DisplacementFX
      • FilterEffect
      • FloodFX
      • ImageFX
      • LightingFX
      • MergeFX
      • MorphologyFX
      • OffsetFX
      • RemapFX
      • SourceFX
      • TurbulenceFX
      • WaveFunctionFX
      • Scintilla
      • Bitmap
      • Clipboard
      • Display
      • Document
      • Font
      • Image
      • Pointer
      • Surface
      • SVG
      • ClientSocket
      • HTTP
      • NetClient
      • NetLookup
      • NetServer
      • NetSocket
      • Proxy
      • Gradient
      • GradientConic
      • GradientContour
      • GradientDiamond
      • GradientDiffusion
      • GradientDistal
      • GradientGouraud
      • GradientLinear
      • GradientMesh
      • GradientRadial
      • GradientVoronoi
      • Vector
      • VectorClip
      • VectorColour
      • VectorEllipse
      • VectorFilter
      • VectorGradient
      • VectorGroup
      • VectorImage
      • VectorPath
      • VectorPattern
      • VectorPolygon
      • VectorRectangle
      • VectorScene
      • VectorShape
      • VectorSpiral
      • VectorText
      • VectorTransition
      • VectorViewport
      • VectorWave
      • Linux Builds
      • Windows Builds
      • Customising Your Build
      • Kōtuku Objects
      • Kōtuku In Depth
      • Kōtuku Design Patterns
      • Coding With AI
      • Regex Manual
      • XML Comparisons
      • Tiri Reference Manual
      • Config API
      • Defer Syntax
      • GUI API
      • HTTP Server API
      • I/O API
      • JSON API
      • OAuth API
      • Options API
      • Proxy Server API
      • Tempus API
      • URL API
      • VFX API
      • Widgets
      • RIPL Reference Manual
      • Origo
      • Flute / Unit Testing
      • Tuku
      • Embedded Document Format
      • TDL Reference Manual
      • TDL Tools
      • Action Reference Manual
      • System Error Codes

Display Class

Represents a drawable display target and its host window or video mode.

A Display object owns the bitmap-backed area that is presented to the user. Depending on the active display driver, the object may represent a hosted desktop window, a native full-screen video mode or a platform-managed rendering surface.

Display is a low-level interface for display mode, window and bitmap management. Most application code should create and manipulate Surface objects instead, using Display directly only when it needs to configure the underlying window, display mode, palette, gamma or hardware-facing bitmap.

Structure

The Display class consists of the following fields:

Access
NameTypeComment
 Bitmap*BitmapReference to the display's bitmap information.

The Bitmap object describes the drawable pixel region presented by the display. It stores the width, height, colour format, palette and related bitmap state. Display fields mirror the most common bitmap dimensions, so callers rarely need to access the bitmap directly for simple sizing operations.

The Bitmap⇒Width and Bitmap⇒Height can be larger than the visible display area, but never smaller.

 BmpXINTThe horizontal coordinate of the bitmap within a display.

This field stores the horizontal offset of the Bitmap relative to the visible display viewport. It is used by drivers that support a bitmap larger than the visible display area.

 BmpYINTThe vertical coordinate of the Bitmap within a display.

This field stores the vertical offset of the Bitmap relative to the visible display viewport. It is used by drivers that support a bitmap larger than the visible display area.

 BottomMarginINTIn hosted mode, indicates the bottom margin of the client window.

If the display is hosted in a client window, the BottomMargin indicates the number of pixels between the client area and the bottom window edge.

 ChipsetSTRINGString describing the graphics chipset.

This string describes the graphic card's chipset, if known.

 DisplaySTRINGString describing the display (e.g. model name of the monitor).

This string describes the display device that is connected to the user's graphics card.

 DisplayMfrSTRINGString describing the display manufacturer.

This string names the manufacturer of the user's display device.

 DisplayTypeDTIdentifies the active display backend.

This field reports the display driver type, such as native, X11, Windows GDI or OpenGL ES.

NameDescription
DT::GLESThe selected display driver uses OpenGL ES.
DT::NATIVEThe selected display driver uses no platform-specific hosted backend.
DT::WINGDIThe display is driven by Microsoft Windows drivers.
DT::X11The display is driven by the X Window System (X11, X.Org, XFree86)
 FlagsSCROptional flag settings.

Display flags configure hosted-window behaviour, buffering, visibility, controller grabbing and driver-reported capabilities. After initialisation, only a limited subset can be changed and support for changing window style is platform dependent.

NameDescription
SCR::ACTIVEThe display is participating in the desktop view - this does not guarantee it is visible.
SCR::ALPHA_BLENDEnables alpha channel blending (if display is hosted and 32-bit).
SCR::AUTO_SAVESaves settings to the global display state when the object is freed.
SCR::BIT_6Display is limited to 6-bit output per colour gun.
SCR::BORDERLESSIf display is hosted, create it as a popup / borderless window.
SCR::BUFFERSet if you would like a complementing buffer in video RAM.
SCR::COMPOSITEEnables alpha channel blending (if display is hosted and 32-bit).
SCR::CUSTOM_WINDOWThe display has been created with a custom window reference.
SCR::DPMS_ENABLEDPower saving through DPMS is supported.
SCR::FLIPPABLEIf SCR::BUFFER is used, this flag may be set by the display manager if it is possible to flip the buffer.
SCR::GRAB_CONTROLLERSGrab controllers for receiving input when the display has the focus.
SCR::GTF_ENABLEDGTF frequency timings are supported.
SCR::HOSTEDThe display is a desktop hosted window.
SCR::MAXIMISESpecial win32 flag.
SCR::MAXSIZEFor GetDisplayInfo() only, indicates that the width and height values indicate the display's maximum size.
SCR::MIRROREDThe display is a mirrored copy.
SCR::NO_ACCELERATION2D graphics card acceleration is not available.
SCR::POWERSAVEPower saving is active (read-only).
SCR::PRIMARYThe display is flagged as being the primary.
SCR::READ_ONLYSynonym for MAXIMISE | CUSTOM_WINDOW | FLIPPABLE | GTF_ENABLED | DPMS_ENABLED | POWERSAVE | HOSTED | MAXSIZE | REFRESH | BIT_6 | VISIBLE | NO_ACCELERATION
SCR::REFRESHFor GetDisplayInfo() only, used to indicate that a display change has recently occurred and cache refresh is required.
SCR::ROTATEDTrue if the display is rotated.
SCR::VIRTUALThe display is virtual or not visible (device not switched on).
SCR::VISIBLESet if the screen is on display.
 GammaDOUBLE []Contains red, green and blue values for the display's gamma setting.

The gamma settings for the display are stored in this field. The settings are stored in an array of 3 floating point values that represent the red, green and blue colour components. The default gamma value for each component is 1.0.

To modify the display gamma values, please refer to the SetGamma() and SetGammaLinear() methods.

 HDensityINTReturns the horizontal pixel density for the display.

Reading the HDensity field will return the horizontal pixel density for the display (pixels per inch). If the physical size of the display is unknown, a default value based on the platform is returned. For standard desktop systems this will usually be 96.

A custom density value can be enforced by setting the /interface/@dpi value in the loaded style, or by setting HDensity.

Reading this field always succeeds.

 HeightINTDefines the height of the display.

This field defines the visible display viewport height. If the height exceeds allowable limits, it is restricted to a value that the display driver can handle.

If the display is hosted, the height reflects the internal height of the host window. On some hosted systems, the true height of the window can be calculated by reading the TopMargin and BottomMargin fields.

 InsideHeightINTRepresents the internal height of the display.

On drivers that support a drawable area larger than the visible viewport, InsideHeight reflects the internal bitmap height in pixels. If this feature is not in use, InsideHeight is equal to Height.

 InsideWidthINTRepresents the internal width of the display.

On drivers that support a drawable area larger than the visible viewport, InsideWidth reflects the internal bitmap width in pixels. If this feature is not in use, InsideWidth is equal to Width.

 LeftMarginINTIn hosted mode, indicates the left-hand margin of the client window.

If the display is hosted in a client window, the LeftMargin indicates the number of pixels between the client area and the left window edge.

 ManufacturerSTRINGString describing the manufacturer of the graphics hardware.

The string in this field returns the name of the manufacturer that created the user's graphics card. If this information is not detectable, a NULL pointer is returned.

 MaxHScanINTThe maximum horizontal scan rate of the display output device.

If the display output device supports variable refresh rates, this field will refer to the maximum horizontal scan rate supported by the device. If variable refresh rates are not supported, this field is set to zero.

 MaxVScanINTThe maximum vertical scan rate of the display output device.

If the display output device supports variable refresh rates, this field will refer to the maximum vertical scan rate supported by the device. If variable refresh rates are not supported, this field is set to zero.

 MinHScanINTThe minimum horizontal scan rate of the display output device.

If the display output device supports variable refresh rates, this field will refer to the minimum horizontal scan rate supported by the device. If variable refresh rates are not supported, this field is set to zero.

 MinVScanINTThe minimum vertical scan rate of the display output device.

If the display output device supports variable refresh rates, this field will refer to the minimum vertical scan rate supported by the device. If variable refresh rates are not supported, this field is set to zero.

 OpacityDOUBLEDetermines the level of translucency applied to the display window (hosted displays only).

This field determines the translucency level applied to a hosted display window, expressed as a normalised value. The default setting is 1, which makes the display fully opaque. Lower values make the window more transparent where the host platform supports translucent windows.

 PopOverOBJECTIDEnables pop-over support for hosted display windows.

The PopOver field can be used when a display is hosted as a window. Setting the PopOver field to refer to the object ID of another display will ensure that the host window is always in front of the other display's window (assuming both windows are visible on the desktop).

The ERR::NoSupport error code is returned if the host does not support this functionality or if the display owns the output device.

 PowerModeDPMSThe display's power management method.

When DPMS is supported and Disable() is called, this field identifies the requested power-management mode.

DPMS is normally user-configurable, so applications should avoid changing PowerMode without user intent.

NameDescription
DPMS::DEFAULTUse the default DPMS mode as defined by the display driver.
DPMS::OFFStop sending power to the display in order to turn it off (it may not be possible to restart the display without the user's intervention).
DPMS::STANDBYPuts the display into standby (reduced power) mode.
DPMS::SUSPENDPuts the display into suspend mode (blanks the display output while maintaining normal power levels).
 RefreshRateDOUBLEActive display refresh rate.

This field reflects the refresh rate of the currently active full-screen display mode where the driver can report it. Hosted display drivers may leave this value unset or set it to a sentinel value.

 ResizeFeedbackFUNCTIONCallback invoked when the display position or size changes.

Set this field to receive display resize feedback from hosted-window events and display-managed coordinate repairs. The callback receives the display object ID, X, Y, Width and Height values.

 RightMarginINTIn hosted mode, indicates the pixel margin between the client window and right window edge.
 TitleSTRINGSets the window title (hosted environments only).
 TopMarginINTIn hosted mode, indicates the pixel margin between the client window and top window edge.
 TotalMemoryINTThe total amount of user accessible RAM installed on the video card, or zero if unknown.
 TotalResolutionsINTThe total number of resolutions supported by the display.
 VDensityINTReturns the vertical pixel density for the display.

Reading the VDensity field will return the vertical pixel density for the display (pixels per inch). If the physical size of the display is unknown, a default value based on the platform is returned. For standard desktop systems this will usually be 96.

A custom density value can be enforced by setting the /interface/@dpi value in the loaded style, or by setting VDensity.

Reading this field always succeeds.

 WidthINTDefines the width of the display.

This field defines the visible display viewport width. If the width exceeds allowable limits, it is restricted to a value that the display driver can handle.

If the display is hosted, the width reflects the internal width of the host window. On some hosted systems, the true width of the window can be calculated by reading the LeftMargin and RightMargin fields.

 WindowHandleAPTRRefers to a display object's window handle, if relevant.

This field refers to the platform window handle owned or used by the display. It is relevant only on hosted display backends such as X11 and Microsoft Windows.

Set WindowHandle before initialisation to bind the Display object to an existing host window. In that case the display sets SCR::CUSTOM_WINDOW and will not destroy the host window as its own resource.

 XINTDefines the horizontal coordinate of the display.

The X field defines the horizontal coordinate of the display. On native full-screen drivers this is a hardware offset and should normally remain zero unless the output device requires adjustment.

On hosted displays, prior to initialisation the coordinate will reflect the position of the display window when it is created. After initialisation, the coordinate is altered to reflect the absolute position of the client area of the display window. The LeftMargin can be used to determine the actual position of the host window.

To adjust the position of the display, use the MoveToPoint() action rather than setting this field directly.

 YINTDefines the vertical coordinate of the display.

The Y field defines the vertical coordinate of the display. On native full-screen drivers this is a hardware offset and should normally remain zero unless the output device requires adjustment.

On hosted displays, prior to initialisation the coordinate will reflect the position of the display window when it is created. After initialisation, the coordinate is altered to reflect the absolute position of the client area of the display window. The TopMargin can be used to determine the actual position of the host window.

To adjust the position of the display, use the MoveToPoint() action rather than setting this field directly.

Actions

The following actions are currently supported:

ActivateShows the display.
ClearClears the display's drawable image data.
DisableDisables the display (goes into power saving mode).
ERR acDisable(*Object)

Disabling a display requests display power management, where supported by the active driver. The DPMS mode is determined by user and system configuration. The display remains disabled until Enable() is called or the platform restores it.

This action does nothing if the display is in hosted mode.

Error Codes
OkayThe display was disabled.
NoSupportThe display driver does not support DPMS.
DrawDraws object graphics to drawable areas.
ERR acDraw(*Object, DOUBLE X, DOUBLE Y, DOUBLE Width, DOUBLE Height)
ParameterDescription
XThe X position of the region to be drawn.
YThe Y position of the region to be drawn.
WidthThe width of the region to be drawn.
HeightThe height of the region to be drawn.
EnableRestores the display from power saving mode.
FlushFlushes pending graphics operations to the display driver.
ERR acFlush(*Object)

Flush synchronises pending X11 requests or flushes OpenGL ES commands where those backends are active. On other drivers it is a harmless no-op.

FocusFocus on this object in the user interface.
HideHides a display from the user's view.
ERR acHide(*Object)

Hide removes a hosted display window from view, or releases the visible presentation resources used by native and OpenGL ES drivers. The display remains valid and can be shown again with Show().

The SCR::VISIBLE flag is cleared after the hide request is processed.

MoveMoves the display by a relative offset.
ERR acMove(*Object, DOUBLE DeltaX, DOUBLE DeltaY, DOUBLE DeltaZ)
ParameterDescription
DeltaXThe number of units to move along the X axis.
DeltaYThe number of units to move along the Y axis.
DeltaZThe number of units to move along the Z axis.

Move adjusts the hosted window or native display position by the supplied delta values. Hosted drivers interpret the movement in window-manager coordinates.

Error Codes
OkayOperation successful.
NoSupportOperation not supported
SystemCallA call to the host system has failed
NullArgsFunction call missing argument value(s)
MoveToBackMoves the hosted display window behind other windows.
ERR acMoveToBack(*Object)

This action lowers the host window where the active platform supports window stacking.

MoveToFrontMoves the hosted display window in front of other windows.
ERR acMoveToFront(*Object)

This action raises the host window where the active platform supports window stacking.

MoveToPointMove the display to a new position.
ERR acMoveToPoint(*Object, DOUBLE X, DOUBLE Y, DOUBLE Z, MTF Flags)
ParameterDescription
XThe new X position to move the object to.
YThe new Y position to move the object to.
ZThe new Z position to move the object to.
FlagsSet the relevant MTF flag for each provided parameter.

MoveToPoint moves the display to an absolute position. The MTF::X and MTF::Y flags determine which coordinates are applied.

In a hosted environment, the supplied coordinates describe the host window position. The LeftMargin and TopMargin fields can be used when translating between host window coordinates and client-area coordinates.

For full-screen displays, MoveToPoint can alter the screen position for the hardware device managing the display output. This is a rare feature that requires hardware support. ERR::NoSupport is returned if this feature is unavailable.

Error Codes
OkayOperation successful.
NoSupportOperation not supported
SystemCallA call to the host system has failed
NullArgsFunction call missing argument value(s)
RedimensionMoves and resizes a display object in a single action call.
ERR acRedimension(*Object, DOUBLE X, DOUBLE Y, DOUBLE Z, DOUBLE Width, DOUBLE Height, DOUBLE Depth)
ParameterDescription
XThe new X position to apply to the target object.
YThe new Y position to apply to the target object.
ZThe new Z position to apply to the target object.
WidthThe new width of the target object.
HeightThe new height of the target object.
DepthThe new depth of the target object.
ResizeResizes the dimensions of a display object.
ERR acResize(*Object, DOUBLE Width, DOUBLE Height, DOUBLE Depth)
ParameterDescription
WidthThe new width of the object.
HeightThe new height of the object.
DepthThe new depth of the object.

Resize changes the display viewport size and resizes the underlying Bitmap. If a display buffer is active, it is reallocated after the resize.

For hosted displays, Width and Height describe the client area inside the host window, not the full outer window including frame decorations.

Error Codes
OkayOperation successful.
NoSupportOperation not supported
NotInitialisedThe resource has not been initialised
ResizeFailure during the resize of an object
NullArgsFunction call missing argument value(s)
SaveImageSaves the display bitmap image to a data object.
ERR acSaveImage(*Object, OBJECTID Dest, CLASSID ClassID)
ParameterDescription
DestRefers to an object that will receive the encoded image data.
ClassIDThe Image class to use for encoding the image data.
SaveSettingsSaves the current display settings as defaults.
ERR acSaveSettings(*Object)

SaveSettings stores supported window and display preferences, such as window position, size, DPMS setting and full-screen state, in the user display configuration.

Error Codes
OkayOperation successful.
CreateObjectA call to CreateObject() failed
ShowPresents a display object to the user.
ERR acShow(*Object)

Show presents a display object to the user. On hosted platforms this maps or shows the host window. By default the window uses the platform's normal border, title and window controls. The initial window position is determined by the X and Y fields. On native full-screen drivers, showing the display may switch the active video mode and present the display Bitmap across the screen.

If SCR::BORDERLESS is set in Flags, the host window is created without the normal window border and controls where the platform supports that mode.

In Microsoft Windows, the LeftMargin, RightMargin, TopMargin and BottomMargin fields will be updated to reflect the position of the client area within the hosted window. In X11 these field values are all set to zero.

If the window is minimised at the time this action is called, the window will be restored to its original position if the code for the host platform supports this capability.

The SCR::VISIBLE flag is set if the Show operation succeeds. Showing the first display also ensures that the shared SystemPointer object exists.

Error Codes
OkayOperation successful.
NoSupportOperation not supported

Methods

The following methods are currently supported:

GetFrameReturns window frame size information for hosted displays.
ERR gfx::GetFrame(OBJECTPTR Object, INT * Left, INT * Top, INT * Right, INT * Bottom)
ParameterDescription
LeftReturns the width of the left side of the window frame, in pixels.
TopReturns the height of the top of the window frame, in pixels.
RightReturns the width of the right side of the window frame, in pixels.
BottomReturns the height of the bottom of the window frame, in pixels.

On hosted displays, GetFrame() returns the thickness of the host window frame around the client display area.

Error Codes
OkayOperation successful.
NoSupportOperation not supported
SystemCallA call to the host system has failed
NullArgsFunction call missing argument value(s)
MinimiseMinimise the desktop window hosting the display.
ERR gfx::Minimise(OBJECTPTR Object)

If a display is hosted in a desktop window, Minimise() performs the platform's default minimise action for that window. On Microsoft Windows this normally minimises the window to the taskbar. On X11 the current implementation unmaps the window.

Calling Minimise() on a display that is already minimised may restore the host window on some platforms. Treat that behaviour as platform dependent.

Error Codes
OkayOperation successful.
SetDisplayChanges the current display mode.
ERR gfx::SetDisplay(OBJECTPTR Object, INT X, INT Y, INT Width, INT Height, INT InsideWidth, INT InsideHeight, INT BitsPerPixel, DOUBLE RefreshRate, INT Flags)
ParameterDescription
XHorizontal offset of the display, relative to its default position.
YVertical offset of the display, relative to its default position.
WidthWidth of the display.
HeightHeight of the display.
InsideWidthInternal display width (must be equal to or greater than the display width).
InsideHeightInternal display height (must be equal to or greater than the display height).
BitsPerPixelThe desired display depth (15, 16, 24 or 32).
RefreshRateRefresh rate, measured in floating point format for precision.
FlagsOptional flags.

SetDisplay() changes the active display mode or hosted display size, depending on the platform. It can alter display position, viewport dimensions, bit depth and refresh rate when the active display driver supports those features. The new settings are applied immediately, although the graphics card, monitor or host window manager may introduce a short delay.

To keep any of the display settings at their current value, set the appropriate parameters to zero to leave them unchanged. Only the parameters that you set will be used.

If a requested full-screen mode is not available, the driver may choose the closest supported mode.

Only the original owner of the display object is allowed to change the display settings.

Error Codes
OkayOperation successful.
FailedFailed to switch to the requested display mode.
NoSupportOperation not supported
ResizeFailure during the resize of an object
NullArgsFunction call missing argument value(s)
SetGammaSets the display gamma levels.
ERR gfx::SetGamma(OBJECTPTR Object, DOUBLE Red, DOUBLE Green, DOUBLE Blue, GMF Flags)
ParameterDescription
RedGamma correction for the red gun.
GreenGamma correction for the green gun.
BlueGamma correction for the blue gun.
FlagsOptional flags.

The SetGamma method controls the gamma correction levels for the display. Gamma levels for the red, green and blue colour components can be set at floating point precision. The default gamma level for each component is 1.0; the minimum value is 0.0 and the maximum value is 100.

Optional flags include GMF::SAVE. This option stores the requested gamma values on the Display object so they can be saved as defaults where the driver supports persistent display settings.

If you would like to know the default gamma correction settings for a display, please refer to the Gamma field.

Error Codes
OkayOperation successful.
NoSupportThe graphics hardware does not support gamma correction.
NullArgsFunction call missing argument value(s)
SetGammaLinearSets the display gamma level using a linear algorithm.
ERR gfx::SetGammaLinear(OBJECTPTR Object, DOUBLE Red, DOUBLE Green, DOUBLE Blue, GMF Flags)
ParameterDescription
RedNew red gamma value.
GreenNew green gamma value.
BlueNew blue gamma value.
FlagsUse SAVE to store the new settings.

SetGammaLinear() updates display gamma values with a linear algorithm where the active driver supports it. Values are clamped to the supported range before being applied.

Error Codes
OkayOperation successful.
NoSupportOperation not supported
NullArgsFunction call missing argument value(s)
SetMonitorChanges the default monitor settings.
ERR gfx::SetMonitor(OBJECTPTR Object, STRVIEW Name, INT MinH, INT MaxH, INT MinV, INT MaxV, MON Flags)
ParameterDescription
NameThe name of the display.
MinHThe minimum horizontal scan rate. Usually set to 31.
MaxHThe maximum horizontal scan rate.
MinVThe minimum vertical scan rate. Usually set to 50.
MaxVThe maximum vertical scan rate.
FlagsSet to AUTO_DETECT if the monitor settings should be auto-detected on startup. Set BIT_6 if the device is limited to 6-bit colour output.

Use SetMonitor() to change the monitor metadata and scan-rate limits used by native display drivers. Altering the supported frequencies can change the available display resolutions and maximum refresh rate.

The auto-detect option requests monitor detection when the desktop starts. If detection fails, the system reverts to its default monitor settings.

This method does not work on hosted platforms. All parameters passed to this method are optional (set a value to zero if it should not be changed).

Error Codes
OkayOperation successful.
NoSupportOperation not supported
NoPermissionGeneral security violation
NullArgsFunction call missing argument value(s)
SizeHintsSets the width and height restrictions for the host window (hosted environments only).
ERR gfx::SizeHints(OBJECTPTR Object, INT MinWidth, INT MinHeight, INT MaxWidth, INT MaxHeight, INT EnforceAspect)
ParameterDescription
MinWidthThe minimum width of the window.
MinHeightThe minimum height of the window.
MaxWidthThe maximum width of the window.
MaxHeightThe maximum height of the window.
EnforceAspectSet to true to enforce an aspect ratio that is scaled from MinWidth,MinHeight to MaxWidth,MaxHeight.

If a display is hosted in a desktop window, it may be possible to enforce size restrictions that prevent the window from being shrunk or expanded beyond a certain size. This feature is platform dependent and ERR::NoSupport will be returned if it is not implemented.

Error Codes
OkayOperation successful.
NoSupportThe host platform does not support this feature.
NullArgsFunction call missing argument value(s)
UpdatePaletteUpdates the video display palette to new colour values if in 256 colour mode.
ERR gfx::UpdatePalette(OBJECTPTR Object, struct RGBPalette * NewPalette)
ParameterDescription
NewPaletteThe new palette to apply to the display bitmap.

Call UpdatePalette() to copy a new palette to the display bitmap's internal palette. If the video display is running in 256-colour mode, the new palette colours are also applied to the display where supported.

This method has no visible effect on RGB pixel displays.

Error Codes
OkayOperation successful.
ArgsInvalid arguments passed to function
NullArgsFunction call missing argument value(s)
WaitVBLWaits for a vertical blank.
ERR gfx::WaitVBL(OBJECTPTR Object)

WaitVBL() waits for the display to reach vertical blank where the active driver exposes that timing primitive. Drivers that do not support it return ERR::NoSupport immediately.

Error Codes
OkayOperation successful.
NoSupportOperation not supported
Display class documentation © Paul Manias © 2003-2026

DPMS Type

Possible modes for the Display class' PowerMode field.

NameDescription
DPMS::DEFAULTUse the default DPMS mode as defined by the display driver.
DPMS::OFFStop sending power to the display in order to turn it off (it may not be possible to restart the display without the user's intervention).
DPMS::STANDBYPuts the display into standby (reduced power) mode.
DPMS::SUSPENDPuts the display into suspend mode (blanks the display output while maintaining normal power levels).
Display module documentation © Paul Manias © 2003-2026

DT Type

Display backend identities returned by GetDisplayType().

NameDescription
DT::GLESThe selected display driver uses OpenGL ES.
DT::NATIVEThe selected display driver uses no platform-specific hosted backend.
DT::WINGDIThe display is driven by Microsoft Windows drivers.
DT::X11The display is driven by the X Window System (X11, X.Org, XFree86)
Display module documentation © Paul Manias © 2003-2026

GMF Type

Flags for gamma operations.

NameDescription
GMF::SAVESave the provided settings permanently.
Display module documentation © Paul Manias © 2003-2026

MON Type

Flags for the Display class SetMonitor() method.

NameDescription
MON::AUTO_DETECTMonitor settings to be auto-detected on startup.
MON::BIT_6The device is limited to 6-bit colour production in real terms.
Display module documentation © Paul Manias © 2003-2026

SCR Type

Display flags.

NameDescription
SCR::ACTIVEThe display is participating in the desktop view - this does not guarantee it is visible.
SCR::ALPHA_BLENDEnables alpha channel blending (if display is hosted and 32-bit).
SCR::AUTO_SAVESaves settings to the global display state when the object is freed.
SCR::BIT_6Display is limited to 6-bit output per colour gun.
SCR::BORDERLESSIf display is hosted, create it as a popup / borderless window.
SCR::BUFFERSet if you would like a complementing buffer in video RAM.
SCR::COMPOSITEEnables alpha channel blending (if display is hosted and 32-bit).
SCR::CUSTOM_WINDOWThe display has been created with a custom window reference.
SCR::DPMS_ENABLEDPower saving through DPMS is supported.
SCR::FLIPPABLEIf SCR::BUFFER is used, this flag may be set by the display manager if it is possible to flip the buffer.
SCR::GRAB_CONTROLLERSGrab controllers for receiving input when the display has the focus.
SCR::GTF_ENABLEDGTF frequency timings are supported.
SCR::HOSTEDThe display is a desktop hosted window.
SCR::MAXIMISESpecial win32 flag.
SCR::MAXSIZEFor GetDisplayInfo() only, indicates that the width and height values indicate the display's maximum size.
SCR::MIRROREDThe display is a mirrored copy.
SCR::NO_ACCELERATION2D graphics card acceleration is not available.
SCR::POWERSAVEPower saving is active (read-only).
SCR::PRIMARYThe display is flagged as being the primary.
SCR::READ_ONLYSynonym for MAXIMISE | CUSTOM_WINDOW | FLIPPABLE | GTF_ENABLED | DPMS_ENABLED | POWERSAVE | HOSTED | MAXSIZE | REFRESH | BIT_6 | VISIBLE | NO_ACCELERATION
SCR::REFRESHFor GetDisplayInfo() only, used to indicate that a display change has recently occurred and cache refresh is required.
SCR::ROTATEDTrue if the display is rotated.
SCR::VIRTUALThe display is virtual or not visible (device not switched on).
SCR::VISIBLESet if the screen is on display.
Display module documentation © Paul Manias © 2003-2026