LJ Archive

Listing 1. Example Program

#include <ggi/ggi.h>
ggi_visual_t visual;
int main(void)
{
   ggiInit();
   visual=ggiOpen(NULL);
   ggiSetGraphMode(vis,visx,visy,virtx,virty,GT_24BIT);
   for(x=0;x<200;x++) {
      ggiSetGCForeground(vis,rand());
      ggiDrawPixel(vis,x,x);
   }
   for(x=0;x<200;x++) {
      ggiPutPixel(vis,x,199-x,rand());
   }
   ggiDrawLine(vis,10,20,190,180);
   ggiDrawBox(vis,90,90,20,20);
   ggiEventPoll(vis,emMouse|emKeyboard,NULL);
   ggiGetc(vis);
   ggiClose(vis);
   ggiExit();
}
LJ Archive