Index: [thread] [date] [subject] [author]
  From: WHS <wouters@cistron.nl>
  To  : ggi <ggi-develop@eskimo.com>
  Date: Wed, 05 Aug 1998 19:49:11 +0200

ggi man page

Preliminary man page attched. Flesh it out please (with short
descriptions) and commit. Just add an explanation on a new line after
the line .RB <function_prototype>

Wouter

.\" -*- nroff -*-
.\"
.\" General graphics interface
.\" Man page by W.H.Scholten 1998
.\"
.\" This file is public domain
.\"
.\"
.\"
.\"
.\" ggi.3 - nroff -man source for ggi man page.
.\"
.\"
.\"
.TH "GGI" 3 "August 1998" "Version 1.5" "GRAPHICS"
.\"
.\"------------------------------------------------------------------
.\"
.SH NAME
ggi_* - GGI graphics functions
.\"
.\"------------------------------------------------------------------
.\"
.SH SYNTAX
.B #include <ggi/ggi.h>



.SH Library control 
.TP
.RB int\  ggiInit\  "(void);"
Initalizes the GGI library. This function must be called before using any other LibGGI function; otherwise results will be undefined. An application can call ggiInit multiple times.
Returns: 0 if all went ok, otherwise an error code.

.TP
.RB void\  ggiExit\  "(void);"
Frees all resources allocated by the library for the program. This function should be called after an application is finished with the library.
Returns: 0 if all closed, >0 if not all instances of ggiInit have been closed, <0 if an error occurred.
.TP
.RB void\  ggiPanic\  "(const char *format,...);"
Shuts down for fatal errors and prints the given error message (format is as in printf(3)). It will shut down the active graphics modes, close all visuals, print the given error message and exit the application.

ggiPanic() should only be used as a last resort. Libraries could use this too when data is corrupted.
.PP



.SH Mode control 
.TP
.RB ggi_visual_t\  ggiOpen\  "(const char *display,...);"
.TP
.RB int\  ggiClose\  "(ggi_visual_t vis);"
.TP
.RB int\  ggiSetMode\  "(ggi_visual_t visual, ggi_mode *tm);"
.TP
.RB int\  ggiGetMode\  "(ggi_visual_t visual, ggi_mode *tm);"
.TP
.RB int\  ggiCheckMode\  "(ggi_visual_t visual, ggi_mode *tm);"
.TP
.TP
.RB int\  ggiSetTextMode\  "(ggi_visual_t visual, int cols, int rows, int fontx, int fonty);"
.TP
.RB int\  ggiCheckTextMode\  "(ggi_visual_t visual, int cols, int rows, int fontx, int fonty);"
.TP
.RB int\  ggiSetGraphMode\  "(ggi_visual_t visual, int x, int y, int xv, int yv, ggi_graphtype type);"
.TP
.RB int\  ggiCheckGraphMode\  "(ggi_visual_t visual, int x, int y, int xv, int yv, ggi_graphtype type);"
.TP
.RB ggi_flags " ggiGetFlags\  "(ggi_visual_t vis);"
.TP
.RB int\  ggiSetFlags\  "(ggi_visual_t vis, ggi_flags flags);"
.TP
.RB int\  ggiFlush\  "(ggi_visual_t vis);"



.SH The directBuffer API
.TP
.RB int \ ggiDBGetBuffer\  "(ggi_visual *vis, ggi_directbuffer_t *buf);"
.TP
.RB "ggi_buffer_layout " ggiDBGetLayout\  "(ggi_directbuffer_t buf);"
.TP
.RB "ggi_pixellinearbuffer " *ggiDBGetPLB\  "(ggi_directbuffer_t buf);"



.SH Graphics context 
.TP
.RB int\   ggiSetGCForeground  "(ggi_visual_t vis, ggi_pixel  color);"
.TP
.RB int\   ggiGetGCForeground  "(ggi_visual_t vis, ggi_pixel *color);"
.TP
.RB int\   ggiSetGCBackground  "(ggi_visual_t vis, ggi_pixel  color);"
.TP
.RB int\   ggiGetGCBackground  "(ggi_visual_t vis, ggi_pixel *color);"
.TP
.RB int\  ggiSetGCClipping  "(ggi_visual_t vis, int left, int top, int right, int bottom);"
.TP
.RB int\  ggiGetGCClipping  "(ggi_visual_t vis, int *left, int *top, int *right, int *bottom);"



.SH Palette and colour control 
.TP
.RB ggi_pixel\  ggiMapColor "(ggi_visual_t vis, ggi_color *col);"
.TP
.RB int\  ggiUnmapPixel "(ggi_visual_t vis, ggi_pixel pixel, ggi_color *col);"

.TP
.RB int\  ggiPackColors "(ggi_visual_t vis, void *buf, ggi_color *cols, int len);"
.TP
.RB int\  ggiUnpackPixels "(ggi_visual_t vis, void *buf, ggi_color *cols, int len);"

.TP
.RB int\  ggiSetPalette "(ggi_visual_t vis, int s, int len, ggi_color *cmap);"
.TP
.RB int\  ggiGetPalette "(ggi_visual_t vis, int s, int len, ggi_color *cmap);"



.SH Set origin and splitline
.TP
.RB int\  ggiSetOrigin "(ggi_visual_t vis, int x, int y);"
.TP
.RB int\  ggiSetSplitline "(ggi_visual_t vis, int y);"



.SH Graphics primitives 
.TP
.RB int\  ggiFillscreen "(ggi_visual_t vis);"

.TP
.RB int\  ggiDrawPixel " (ggi_visual_t vis, int x, int y);"
.TP
.RB int\  ggiPutPixel " (ggi_visual_t vis, int x, int y, ggi_pixel col);"
.TP
.RB int\  ggiGetPixel " (ggi_visual_t vis, int x, int y, ggi_pixel *col);"

.TP
.RB int\  ggiDrawLine " (ggi_visual_t vis, int x, int y, int xe, int ye);"
.TP
.RB int\  ggiDrawHLine " (ggi_visual_t vis, int x, int y, int w);"
.TP
.RB int\  ggiPutHLine " (ggi_visual_t vis, int x, int y, int w, void *buf);"
.TP
.RB int\  ggiGetHLine " (ggi_visual_t vis, int x, int y, int w, void *buf);"

.TP
.RB int\  ggiDrawVLine " (ggi_visual_t vis, int x, int y, int h);"
.TP
.RB int\  ggiPutVLine " (ggi_visual_t vis, int x, int y, int h, void *buf);"
.TP
.RB int\  ggiGetVLine " (ggi_visual_t vis, int x, int y, int h, void *buf);"

.TP
.RB int\  ggiDrawBox " (ggi_visual_t vis, int x, int y, int w, int h);"
.TP
.RB int\  ggiPutBox " (ggi_visual_t vis, int x, int y, int w, int h, void *buf);"
.TP
.RB int\  ggiGetBox " (ggi_visual_t vis, int x, int y, int w, int h, void *buf);"
.TP
.RB int\  ggiCopyBox " (ggi_visual_t vis, int x, int y, int w, int h, int nx, int ny);"



.SH Event handling 
.TP
.RB "ggi_event_mask " ggiEventPoll " (ggi_visual_t vis, ggi_event_mask mask, struct timeval *t);"
.TP
.RB int\  ggiEventRead " (ggi_visual_t vis, ggi_event *ev, ggi_event_mask mask);"



.SH Input and output 
.TP
.RB int\  ggiKbhit " (ggi_visual_t vis);"
.TP
.RB int\  ggiGetc  " (ggi_visual_t vis);"
.TP
.RB int\  ggiPutc " (ggi_visual_t vis, int x, int y,char c);"
.TP
.RB int\  ggiPuts " (ggi_visual_t vis, int x, int y,const char *str);"






.\"
.\"------------------------------------------------------------------
.\"
.SH DATA

.\"
.\"------------------------------------------------------------------
.\"



.\"
.\"------------------------------------------------------------------
.\"
.SH ARGUMENTS

.\"
.\"------------------------------------------------------------------
.\"



.SH EXAMPLE APPLICATION



.SH BUGS
Many. Esp. the function names which are not in the gsi style :-)

.SH FILES

.SH SEE ALSO
.BR kgi "(3) "

.SH AUTHOR
Man page by WHS, GGI by many authors.

.B email:
??info@ggi-project.org
.br

.B WWW page:
http://www.ggi-project.org



Index: [thread] [date] [subject] [author]