screen_set_display_property_*()

Sets the value of a display property

Function type:

Delayed execution

Synopsis:

#include <screen/screen.h>

int screen_set_display_property_cv( screen_display_t disp,
                                    int pname,
                                    int len,
                                    const char * param );

int screen_set_display_property_iv( screen_display_t disp,
                                    int pname,
                                    const int * param );

int screen_set_display_property_llv( screen_display_t disp,
                                     int pname,
                                     const long long * param );

int screen_set_display_property_pv( screen_display_t disp,
                                    int pname,
                                    void ** param );

Arguments:

disp
The handle of the display whose property must be set.
pname
The name of the property whose value is requested. The properties that can be queried with these functions are:
SCREEN_PROPERTY_ROTATION
A single integer that defines the current rotation of the display. Accepted values are 0, 90, 180, 270 degrees (clockwise). Changing the display rotation doesn't implicitly change any window properties.
SCREEN_PROPERTY_POWER_MODE
A single integer that defines the power mode of the current display.
SCREEN_PROPERTY_GAMMA
A single integer that defines the gamma setting of the current display.
SCREEN_PROPERTY_MIRROR_MODE
A single integer that defines the mirror setting mode of the current display.
SCREEN_PROPERTY_MODE
A single integer that defines the power mode of the current display.
len
(screen_set_display_property_cv() only)The number of bytes contained in param.
param
A pointer to a buffer containing the new values.

Library

screen

Description

These functions set the value of a display property from a user-provided array. No more than len bytes will be read from param. Each property must be set with the variant corresponding to the type associated with this property.

The functions and their types are described below:

screen_set_display_property_cv()
Takes a char value of a given length.
screen_set_display_property_iv()
Takes an integer value.
screen_set_display_property_llv()
Takes a long long value.
screen_set_display_property_pv()
Takes a pointer to an opaque handle type.

You can query display properties with the screen_get_display_property_*() functions.

You must use SCREEN_WINDOW_MANAGER_CONTEXT to change display properties and SCREEN_POWER_MANAGER_CONTEXT to change display power modes.

Returns

The return value for this type of function simply indicates whether the command was successfully stored in the command buffer.

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