Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_display_query_mode.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_display_query_mode.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_display_query_mode.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_display_query_mode.html on line 8
Query a display for supported modes
#include <gf/gf.h>
int gf_display_query_mode( gf_display_t display,
int index,
gf_modeinfo_t *mode );
- display
- The handle for a display whose list of available modes you want to query.
- index
- The index of the mode you want to query. Modes are indexed starting at 0. You can iterate through the list of modes by incrementing the index until the function returns an index out of range error.
- mode
- A pointer to a gf_modeinfo_t structure which the function fills in with information about the queried mode.
gf
This function queries the capabilities of a mode in the specified display's list of supported modes. Modes are indexed starting at 0.
The mode argument is filled in with information about the queried mode:
typedef struct {
unsigned flags;
gf_format_t primary_format;
unsigned xres;
unsigned yres;
unsigned refresh[7];
} gf_modeinfo_t;
It contains at least the following members:
- flags
- One flag is defined: GF_MODE_GENERIC.
Arbitrary xres/yres/refresh rates may be specified. For modes of this type, a generic formula (the Vesa GTF) is used to calculate the settings used to program the display controller. The xres, yres and refresh members don't apply when this mode is specified.
- primary_format
- This member is used to support devices where the pixel format of the main layer is tied to the selected video mode, for example, drivers that use the VESA BIOS for modeswitching.
On some devices, the main layer may support more than one pixel format. In this case multiple modes are reported with identical xres, yres, and refresh values, but different values for primary_format. It won't matter which of the reported format values is passed to gf_display_set_mode(), since any of the formats reported via gf_layer_query() can be used to create surfaces displayable on the main layer regardless.
- xres, yres
- The horizontal and vertical resolution for the queried mode. These members have meaning only if GF_MODE_GENERIC isn't set in flags.
- refresh
- A zero-terminated list of supported refresh rates. Up to 6 discrete refresh rates can be supported for non-generic modes. This member has meaning only if GF_MODE_GENERIC isn't set in flags.
- GF_ERR_OK
- Success.
- GF_ERR_MEM
- Memory allocation failure.
- GF_ERR_IODISPLAY
- Could not access the /dev/io-display directory. Check to ensure that io-display is running. The sloginfo utility may provide more information.
- GF_ERR_PARM
- The mode index is out of bounds.
- GF_ERR_CFG
- Badly configured display; check the io-display configuration file.
QNX Graphics Framework
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
gf_display_set_mode(),
gf_layer_query()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_display_query_mode.html on line 189
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_display_query_mode.html on line 189