Set or get a mode on a visual
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 gg-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).