ggiSetGraphMode(3ggi)

NAME
ggiSetTextMode, ggiCheckTextMode, ggiSetGraphMode, ggiCheckGraphMode, ggiSetSimpleMode, ggiCheckSimpleMode - Set and check a text/graphics mode on a visual

SYNOPSIS
#include <ggi/ggi.h>

int ggiSetTextMode(ggi_visual_t visual, int cols, int rows, int vcols, int vrows, int fontx, int fonty);

int ggiCheckTextMode(ggi_visual_t visual, int cols, int rows, int vcols, int vrows, int fontx, int fonty, ggi_mode *suggested_mode, ...);

int ggiSetGraphMode(ggi_visual_t visual, int x, int y, int xv, int yv, ggi_graphtype type);

int ggiCheckGraphMode(ggi_visual_t visual, int x, int y, int xv, int yv, ggi_graphtype type, ggi_mode *suggested_mode, ...);

int ggiSetSimpleMode(ggi_visual_t visual, int x, int y, int frames, ggi_graphtype type);

int ggiCheckSimpleMode(ggi_visual_t visual, int x, int y, int frames, ggi_graphtype type, ggi_mode *suggested_mode); .SH "DESCRIPTION"

The ggiCheck{Text,Graph,Simple}Mode and ggiSet{Text,Graph,Simple}Mode are convenient versions of ggiSetMode. They accept the mode parameters as integer arguments rather than as a ggi_mode struct that the application has to fill out. Otherwise, they are functionally equivalent to the 'master' ggiCheckMode and ggiSetMode functions, and the same mode-setting semantics apply.

ggiSetTextMode sets a textmode with given columns and rows, virtual columns and rows and a font of the given size.

ggiCheckTextMode checks a textmode with given columns and rows, virtual columns and rows and a font of the given size.

ggiSetGraphMode sets a graphics mode with a visible area of size x,y and a virtual area of size xvyv and the specified graphics type. (You can pan around the virtual area using ggiSetOrigin.)

ggiCheckGraphMode checks a graphics mode with the specified mode features.

ggiSetSimpleMode sets a graphics mode with a visible area of size xy and frames number of frames and the specified graphics type.

ggiCheckSimpleMode checks a graphics mode with the specified mode features.

If suggested_mode is not NULL, then it will be filled with the suggested mode, as documented under ggiCheckMode.

In text modes, the font size is the size of the pixel (ggi_mode.dpp).

RETURN VALUE

For ggiCheckTextMode and ggiCheckGraphMode, a return of 0 means that a ggiSet*Mode call for this mode would succeed. Otherwise, the mode given cannot be set. In this case, suggested_mode is changed to the suggested mode.

For ggiSetTextMode and ggiSetGraphMode, a return of 0 indicates success, while any other value indicates an error.

EXAMPLES

  TRY A 320X200X8 MODE

err = ggiCheckGraphMode(vis, 320, 200, GGI_AUTO, GGI_AUTO, GT_8BIT,
			&sug_mode, NULL);
if(err) {
        /* Check if returned mode is ok... /*
}
else {
        ggiSetMode(&sug_mode);
}

SEE ALSO
ggiOpen(3), ggiSetMode(3)