Name
ggiSetMode, ggiSetTextMode, ggiSetGraphMode, ggiSetSimpleMode, ggiGetMode — Set or get a mode on a visual
Synopsis
#include <ggi/ggi.h>
ggi_visual_t | vis; |
ggi_mode * | tm; |
int ggiSetTextMode( | visual, | |
| cols, | |
| rows, | |
| vcols, | |
| vrows, | |
| fontx, | |
| fonty, | |
| type) ; | |
ggi_visual_t | visual; |
int | cols; |
int | rows; |
int | vcols; |
int | vrows; |
int | fontx; |
int | fonty; |
ggi_graphtype | type; |
int ggiSetGraphMode( | visual, | |
| x, | |
| y, | |
| xv, | |
| yv, | |
| type) ; | |
ggi_visual_t | visual; |
int | x; |
int | y; |
int | xv; |
int | yv; |
ggi_graphtype | type; |
int ggiSetSimpleMode( | visual, | |
| x, | |
| y, | |
| frames, | |
| type) ; | |
ggi_visual_t | visual; |
int | x; |
int | y; |
int | frames; |
ggi_graphtype | type; |
ggi_visual_t | vis; |
ggi_mode * | tm; |
Description
ggiSetMode sets any mode (text or graphics). It
also performs mode negotiation like ggiCheckMode,
but if any non-GGI_AUTO/GT_AUTO
parameters are changed from the original mode, the new mode will not
be silently set.
ggiSetTextMode
ggiSetGraphMode
ggiSetSimpleMode are convenient versions of
ggiSetMode that take the mode paramters as
integer arguments rather than as a ggi_mode
struct that the application has to fill out. Otherwise, they are
functionally equivalent to ggiSetMode function,
and the same mode-setting semantics apply, except the changed
ggi_mode cannot be seen.
ggiGetMode fills out the passed
ggi_mode with
the parameters of the current mode of the visual.
Return value
The mode setting functions return 0 if the
mode is set successfully, otherwise an error code.