screen_get_display_modes()

Get the display modes supported by a given display

Function type:

Flushing execution

Synopsis:

#include <screen/screen.h>

int screen_get_display_modes( screen_display_t display, 
                              int max, 
                              screen_display_mode_t *param );

Arguments:

display
The handle of the display for which to return the supported display modes.
max
The maximum number of display modes that can be written to the array of modes pointed to by param.
param
A pointer to a buffer containing the new values.

Library

screen

Description

This function returns the video modes that are supported by a display. All elements in the list are unique. Note that several modes can have identical resolutions and differ only in refresh rate or aspect ratio. You can obtain the number of modes supported by querying the SCREEN_PROPERTY_MODE_COUNT property. No more than max modes will be stored.

Returns

A successful return value indicates that any delayed command and the flushing command all executed without errors. Conversely, if a flushing API returns an error, it could have been caused by a batch-processed command that did not execute properly, or the flushing call itself encountering an error. It is important to note that the server won't stop processing batched commands when it detects an error.

0
The function succeeded and the value (or values) of the display property are changed.
-1
An error occurred (errno is set).

Classification

Windowing API

Safety  Value  
Interrupt handler No
Signal handler No
Thread Yes