gf_layer_choose_format()

Choose a format

Synopsis:

#include <gf/gf.h>

unsigned gf_layer_choose_format (
        gf_layer_t         layer,
        gf_format_t        format[],
        size_t             nformat,
        const unsigned *   criteria  );

Arguments:

layer
The handle for the layer, returned by gf_layer_attach().
format
An array of gf_format_t that the function fills with the formats that the layer supports and that satisfy the specified criteria.
nformat
The size of format array. No more than nformat formats will be returned.
criteria
A list of criteria to facilitate the selection of appropriate formats. The list takes the form of an array of unsigned values and is interpreted as a list of key/value pairs. The list must be terminated with a key of GF_NONE (no value needs to be specified). The valid manifests for keys and their corresponding values include:

Library:

gf

Description:

This function chooses a format based on a layer's capabilities and application requirements.

Returns:

The number of formats that satisfied the criteria and were placed into the formats array. A 0 means that the layer does not support any formats that satisfy all the specified criteria.

Classification:

QNX Graphics Framework

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

gf_format_t, gf_layer_attach()