ggiSetMode(3)

NAME
ggiSetMode, ggiGetMode : Set or get a mode on a visual

SYNOPSIS
#include <ggi/ggi.h>
int ggiSetMode(ggi_visual_t visual, ggi_mode *tm);
int ggiGetMode(ggi_visual_t visual, ggi_mode *tm);

DESCRIPTION
ggiSetMode sets any mode (text or graphics). It also performs mode negotiation like ggiCheckMode(3), but if any non-GGI_AUTO/GT_AUTO parameters are changed from the original mode, the new mode will not be silently set. ggiGetMode fills out the passed ggi_mode(3) with the parameters of the current mode of the visual.

RETURN VALUE
ggiSetMode returns 0 if the mode is set successfully, otherwise an ggi-error(3) code.

NOTES
Do not set a mode before checking it. You may be able to set up a certain mode on one target, but not other targets. See the example in ggiCheckMode(3).
    Important: Note that the ggiSetTextMode(3), ggiSetGraphMode(3) and ggiSetSimpleMode(3) functions are deprecated. Use ggiCheckMode(3) and similar functions, and then use ggiSetMode(3) on the resulting adjusted ggi_mode(3), once you have checked it yourself.

SEE ALSO
ggiCheckMode(3), ggiOpen(3), ggi_mode(3)