screen_set_pixmap_property_*()

Set the value of a buffer property

Function type:

Delayed execution

Synopsis:

#include <screen/screen.h>

int screen_set_pixmap_property_cv( screen_pixmap_t pix, 
                                  int pname, 
                                  int len, 
                                  const char *param );

int screen_set_pixmap_property_iv( screen_pixmap_t pix, 
                                   int pname, 
                                   const int *param );

int screen_set_pixmap_property_llv( screen_pixmap_t pix, 
                                    int pname, 
                                    const long long *param );

int screen_set_pixmap_property_pv( screen_pixmap_t pix, 
                                   int pname, 
                                   void **param );

Arguments:

pix
The handle of the pixmap that contains the property to be set.
pname
The name of the property to set. The properties that can be set with this function are:
SCREEN_PROPERTY_ALPHA_MODE
A single integer that defines how alpha should be interpreted. param must point to a buffer with enough storage for one integer. The value must be one of the following values:
  • SCREEN_NON_PRE_MULTIPLIED_ALPHA
  • SCREEN_PRE_MULTIPLIED_ALPHA
SCREEN_PROPERTY_BUFFER_SIZE
A pair of integers containing the width and height of the buffer associated with this pixmap. param must point to a buffer with enough storage for two integers. This can only be set for buffers created with screen_create_buffer().
SCREEN_PROPERTY_COLOR_SPACE
A single integer that has one of the following values. param must point to a buffer with at least one integer.
  • SCREEN_COLOR_SPACE_LINEAR
  • SCREEN_COLOR_SPACE_SRGB
SCREEN_PROPERTY_FORMAT
A single integer that indicates the pixel format of the buffer associated with this pixmap. param must point to a buffer with at least one integer. The format can be one of:
  • SCREEN_FORMAT_BYTE
  • SCREEN_FORMAT_RGBA4444
  • SCREEN_FORMAT_RGBX4444
  • SCREEN_FORMAT_RGBA5551
  • SCREEN_FORMAT_RGBX5551
  • SCREEN_FORMAT_RGB565
  • SCREEN_FORMAT_RGBA8888
  • SCREEN_FORMAT_RGBX8888
  • SCREEN_FORMAT_YVU9
  • SCREEN_FORMAT_YUV420
  • SCREEN_FORMAT_NV12
  • SCREEN_FORMAT_YV12
  • SCREEN_FORMAT_UYVY
  • SCREEN_FORMAT_YUY2
  • SCREEN_FORMAT_YVYU
  • SCREEN_FORMAT_V422
  • SCREEN_FORMAT_AYUV
SCREEN_PROPERTY_RENDER_BUFFERS
The handle of the pixmap buffer. param must point to a buffer with enough storage for one void pointer for each buffer created.
SCREEN_PROPERTY_USAGE
A single integer that contains a bitmask indicating the intended usage for the pixmap buffer. param must point to a buffer with enough storage for one integer. The value must be a combination of the following constants:
  • SCREEN_USAGE_READ
  • SCREEN_USAGE_WRITE
  • SCREEN_USAGE_NATIVE
  • SCREEN_USAGE_OPENGL_ES1
  • SCREEN_USAGE_OPENGL_ES2
  • SCREEN_USAGE_VG
  • SCREEN_USAGE_VIDEO
  • SCREEN_USAGE_CAPTURE
  • SCREEN_USAGE_ROTATION
  • SCREEN_USAGE_OVERLAY
len
(screen_set_pixmap_property_cv()). The maximum number of bytes that can be written to param.
param
A pointer to a buffer containing the new values.

Library:

screen

Description:

These functions set the value of a pixmap 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. For example, SCREEN_PROPERTY_USAGE must be set using the screen_set_pixmap_property_iv() function.

The functions and their types are described below:

screen_set_pixmap_property_cv()
Takes a char value of a given length.
screen_set_pixmap_property_iv()
Takes an integer value.
screen_set_pixmap_property_llv()
Takes a long long value.
screen_set_pixmap_property_pv()
Takes a pointer to an opaque handle type.

Pixmap properties can be queried with the screen_get_pixmap_property() functions.

Returns:

If the function succeeds, it returns 0 and the value(s) of the pixmap property are changed. Otherwise, the function returns -1 and errno is set.

Classification:

Windowing API

Safety  Value  
Interrupt handler No
Signal handler No
Thread Yes