[ prev :: next :: up ] libggi-current (3)

Open and close a visual

Name

ggiOpen, ggiClose : Open and close a visual

Synopsis

#include <ggi/ggi.h>

ggi_visual_t ggiOpen(const char *display, ...);

int ggiClose(ggi_visual_t vis);

Description

ggiOpen opens a visual. The visual is specified as a display string, followed by NULL. If only NULL is specified, the default display target is opened. The other arguments are for internal purposes only, such as :p:`argptr`, used to pass driver-specific, non-textual information to the driver.

System Message: ERROR/3 (../ggi-core/libggi/doc/libggi.txt, line 162); backlink

Unknown interpreted text role "p".

ggiClose releases and destroys an open visual. This will close X windows, return consoles to text-mode, etc.

Return value

ggiOpen returns the opened visual or NULL for error. The ggi_visual_t is opaque to the programmer and should only be used through GGI functions.

ggiClose returns 0 for OK, otherwise an error code.

Examples

Open and closing default visual:

ggi_visual_t vis = ggiOpen(NULL);

if(vis==NULL) {
      ggiPanic("Couldn't open default visual!\n");
}

/* do stuff */

ggiClose(vis);

Open and closing a memory visual:

ggi_visual_t memvis = ggiOpen("display-memory", NULL);

if(memvis==NULL) {
      return -1;
}

/* do stuff */

ggiClose(memvis);

See Also

:man:`ggiInit(3)`

System Message: ERROR/3 (../ggi-core/libggi/doc/libggi.txt, line 216); backlink

Unknown interpreted text role "man".
 
[ prev :: next :: up ] libggi-current (3)
2006/11/09 16:51:01