GGI_MODE(3)

NAME
ggi_mode, ggi_coord, ggi_graphtype - LibGGI mode description

SYNOPSIS
#include <ggi/ggi.h>

DESCRIPTION
typedef struct { sint16 x, y; } ggi_coord;
typedef uint32 ggi_graphtype;
typedef struct
{
        sint32          frames;
        ggi_coord       visible;
        ggi_coord       virt;
        ggi_coord       size;
        ggi_graphtype   graphtype;
        ggi_coord       dpp;
} ggi_mode;

The mode structure describes a visual configuration given by its size and other graphic properties.

STRUCTURE MEMBERS

frames
    The number of frames. Some displays have multi-buffer capabilites (double-buffering, triple-buffering...). See libggi frame-related functions for information on working with multiple frames.

visible
    The size of the visible area. This is what the user will see.

virt
    The virtual size of the visual. It can be larger (but not smaller) than the visible area, in which case only a part of it is displayed. It is useful for scrolling or backing up portions of screen efficiently. See ggi[Set|Get]Origin functions for more.

size
    ???

graphtype
    It holds information on the type of display. libggi defines macros to construct graphtypes values or access individual field.

    depth ( GT_DEPTH(gt), GT_SETDEPTH(gt,x) )
        The number of significant bits holding color information.

    size ( GT_SIZE(gt), GT_SETSIZE(gt,x) )
        The actual size (in bits) of a pixel. For instance, on a 32 bits X server the pixel size is 32 but the depth is only 24 (8bits RGB channels, 8 unused).

    scheme ( GT_SCHEME(gt), GT_SETSCHEME(gt,x) )
        The following schemes are available : GT_TEXT : text mode onlyGT_TRUECOLOR : GT_GREYSCALE : pixels represent level of grayGT_PALETTE : pixels are entries in a CLUT (Color Look-Up Table)GT_STATIC_PALETTEGT_SUBSAMPLE_YUVGT_SUBSAMPLE_U_YCRBRGT_SUBSAMPLE_S_YCRBRGT_NIL

    subscheme ( GT_SUBSCHEME(gt), GT_SETSUBSCHEME(gt,x) )
        ???? GT_SUB_REVERSE_ENDIANGT_SUB_HIGHBIT_RIGHTGT_SUB_PACKED_GETPUT
Graphtypes can be constructed directly or via the GT_CONSTRUCT(depth,scheme,size) macro. The following common graphtypes are defined : GT_TEXT16GT_TEXT32GT_1BITGT_2BITGT_4BITGT_8BITGT_15BITGT_16BITGT_24BITGT_32BITGT_AUTOGT_INVALID

dpp It stands for dot-per-pixel.

When filling a mode structure for setting a visual, any field can be assigned GGI_AUTO (GT_AUTO for graphtype) if a specific value isn't required.

SEE ALSO
ggiCheckMode(3), ggiSetMode(3)