screen_get_pixmap_property_*()

Get the current value of a pixmap property

Function type:

Flushing execution

Synopsis:

#include <screen/screen.h>

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

int screen_get_pixmap_property_iv( screen_pixmap_t pix, 
                                   int pname, 
                                   int *param );

int screen_get_pixmap_property_llv( screen_pixmap_t pix, 
                                    int pname, 
                                    long long *param );

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

Arguments:

pix
The handle of the pixmap whose property is being queried.
pname
The name of the property whose value is requested. The properties that can be queried 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 will have 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.
SCREEN_PROPERTY_COLOR_SPACE
A single integer that indicates the buffer’s color space. param must point to a buffer with enough storage for one integer. The value will have one of the following values:
  • 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 enough storage for one integer. The format will 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 will 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_get_pixmap_property_cv() only).
param
A pointer to a buffer where the values will be stored.

Library:

screen

Description:

These functions store the current value of a property into a user-provided array. No more than len bytes will be written. Each property must be queried with the variant corresponding to the type associated with this property. For example, SCREEN_PROPERTY_USAGE must be queried using the screen_get_pixmap_property_iv() function.

The functions and their types are described below:

screen_get_pixmap_property_cv()
Takes a char value of a given length.
screen_get_pixmap_property_iv()
Takes an integer value.
screen_get_pixmap_property_llv()
Takes a long long value.
screen_get_pixmap_property_pv()
Takes a pointer to an opaque handle type.

Pixmap properties can be set with the screen_set_pixmap_property_*() functions.

Returns:

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

Classification:

Windowing API

Safety  Value  
Interrupt handler No
Signal handler No
Thread Yes