Skip to content

Display Monitor functions

Finalspace edited this page May 29, 2026 · 1 revision

This category contains functions for handling multiple monitors. More...

Data Structures

Type Name
struct fplDisplayInfo
A struct containing information about a display. More...
struct fplDisplayMode
A structure containing one set of display mode settings, such as size, refresh rate, etc. More...

Functions

Type Name
fpl_platform_api size_t fplGetDisplayCount (void)
Gets the number of active displays.
fpl_platform_api bool fplGetDisplayFromPosition (const int32_t x, const int32_t y, fplDisplayInfo *outInfo)
Finds the display from a cursor position and retrieves the information for it.
fpl_platform_api size_t fplGetDisplayModes (const char *id, fplDisplayMode *outModes, const size_t maxDisplayModeCount)
Gets the information about the available display modes for the given display id.
fpl_platform_api size_t fplGetDisplays (fplDisplayInfo *outDisplays, const size_t maxDisplayCount)
Gets information about all active displays.
fpl_platform_api bool fplGetPrimaryDisplay (fplDisplayInfo *outInfo)
Gets information about the primary display.
fpl_platform_api bool fplGetWindowDisplay (fplDisplayInfo *outInfo)
Gets information about the display for the FPL window.

Detailed Description

This category contains functions for handling multiple monitors.

Function Documentation

fplGetDisplayCount()

fpl_platform_api size_t fplGetDisplayCount ( void )

Gets the number of active displays.

Returns: Returns the number of active displays.

fplGetDisplayFromPosition()

fpl_platform_api bool fplGetDisplayFromPosition ( const int32_t x, const int32_t y, fplDisplayInfo * outInfo )

Finds the display from a cursor position and retrieves the information for it.

Parameters

Direction Parameter Description
[in] x The x position in screen coordinates.
[in] y The y position in screen coordinates.
[out] outInfo Reference to the display information structure fplDisplayInfo.

Returns: Returns true when the display was found, false otherwise.

fplGetDisplayModes()

fpl_platform_api size_t fplGetDisplayModes ( const char * id, fplDisplayMode * outModes, const size_t maxDisplayModeCount )

Gets the information about the available display modes for the given display id.

Parameters

Direction Parameter Description
[in] id The display id.
[out] outModes The array of display modes fplDisplayMode.
[in] maxDisplayModeCount The maximum number of display modes available in the output array.

Returns: Returns the number of found display modes.

fplGetDisplays()

fpl_platform_api size_t fplGetDisplays ( fplDisplayInfo * outDisplays, const size_t maxDisplayCount )

Gets information about all active displays.

Parameters

Direction Parameter Description
[out] outDisplays The output array of display information structures fplDisplayInfo.
[in] maxDisplayCount The maximum number of display infos available in the output array.

Returns: Returns the total number of active displays.

fplGetPrimaryDisplay()

fpl_platform_api bool fplGetPrimaryDisplay ( fplDisplayInfo * outInfo)

Gets information about the primary display.

Parameters

Direction Parameter Description
[out] outInfo Reference to the display information structure fplDisplayInfo.

Returns: Returns true when the primary display was found, false otherwise.

fplGetWindowDisplay()

fpl_platform_api bool fplGetWindowDisplay ( fplDisplayInfo * outInfo)

Gets information about the display for the FPL window.

Parameters

Direction Parameter Description
[out] outInfo Reference to the display information structure fplDisplayInfo.

Returns: Returns true when the display for the window was found, false otherwise.

Final Platform Layer

Pages

Topics

Data Structures

Clone this wiki locally