ggiSetMode(3ggi)

NAME
ggiSetMode, ggiCheckMode, ggiGetMode - Set, check or get a mode on a visual

SYNOPSIS
#include <ggi/ggi.h>

int ggiSetMode(ggi_visual_t vis, ggi_mode *tm);

int ggiCheckMode(ggi_visual_t vis, ggi_mode *tm);

int ggiGetMode(ggi_visual_t vis, ggi_mode *tm); .SH "DESCRIPTION"

ggiSetMode sets any mode (text or graphics).

ggiCheckMode checks whether or not the given mode (text or graphics) will work on the visual.

For both ggiSetMode and ggiCheckMode, normal mode negotiation is performed, and if the given mode is not possible, modifications will be made to the passed structure to make it work. If GGI_AUTO (or GT_AUTO for the graphtype) is specified for any of the members of *tm, these are filled in with the recommended parameters.

For ggiSetMode, if the mode cannot be set, a mode is suggested in *tm, but it will not be silently set. However, you'll probably want to use the convenience functions ggiSetTextMode and ggiSetGraphMode instead of ggiSetMode.

ggiGetMode gets the current mode set on the visual.

RETURN VALUE

ggiSetMode returns 0 if the mode is set successfully, otherwise an error code.

For ggiCheckMode, a return of 0 means that a ggiSetMode call for the given mode mode would succeed. Otherwise, the mode given cannot be set. (But the modified mode passed back to the application should work.)

For both functions, if the only modifications made to the structure is filling GGI_AUTO parameters, it is still considered as success.

ggiGetMode gets the current mode. tm will be filled with the current mode on return.

SEE ALSO
ggiOpen(3), ggiSetGraphMode(3)