Final Platform Layer 0.9.8-beta
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
Display/Monitor functions

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

Data Structures

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

Typedefs

typedef struct fplDisplayInfo fplDisplayInfo
 A struct containing informations about a display.
 
typedef struct fplDisplayMode fplDisplayMode
 A structure containing one set of display mode settings, such as size, refresh rate, etc.
 

Functions

fpl_platform_api size_t fplGetDisplayCount ()
 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 informations 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 ( )

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
xThe x position in screen coordinates
yThe y position in screen coordinates
outInfoA pointer to a fplDisplayInfo structure
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
idThe display id
outModesThe array of fplDisplayMode
maxDisplayModeCountThe 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 informations about all active displays.

Parameters
outDisplaysThe array of fplDisplayInfo
maxDisplayCountThe 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
outInfoA pointer to a fplDisplayInfo structure
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
outInfoA pointer to a fplDisplayInfo structure
Returns
Returns true when the display for the window was found, false otherwise.