screen_set_context_property_*()

Set the value of a context property

Function type:

Delayed execution

Synopsis:

#include <screen/screen.h>

int screen_set_context_property_cv( screen_context_t ctx,
                                    int pname,
                                    int len,
                                    const char * param );

int screen_set_context_property_iv( screen_context_t ctx,
                                    int pname,
                                    const int * param );

int screen_set_context_property_llv( screen_context_t ctx,
                                     int pname,
                                     const long long * param );

int screen_set_context_property_pv( screen_context_t ctx,
                                    int pname,
                                    void ** param );

Arguments:

ctx
The handle of the context whose property you want to set.
pname
The name of the property whose value you're setting. The properties that can be set with this function are:
SCREEN_PROPERTY_IDLE_TIMEOUT
A single integer containing the length of time (in seconds) before the displays goes idle.
SCREEN_PROPERTY_KEYBOARD_FOCUS
A handle to a window that should have keyboard focus. The window will only acquire keyboard focus if the command is issued by a window manager context.
len
(screen_set_context_property_cv()).The number of bytes contained in param.
param
A buffer containing the new values.

Library

screen

Description

These functions set the value of a context 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_context_property_cv()
Takes a char value of a given length.
screen_set_context_property_iv()
Takes an integer value.
screen_set_context_property_llv()
Takes a long long value.
screen_set_context_property_pv()
Takes a pointer to an opaque handle type.

Context properties can be queried with the screen_get_context_property_*() functions.

Returns

The screen_set_context_property_*() functions are all batch-processed. Therefore, the return value indicates only whether the command was successfully stored in the context's command buffer or not.

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

Classification

Windowing API

Safety  Value  
Interrupt handler No
Signal handler No
Thread Yes