Poster of Linux kernelThe best gift for a Linux geek
ggiGetc

ggiGetc

Section: GGI (3) Updated: 2006-12-30
Local index Up
 

NAME

ggiGetc, ggiKbhit - Convenience functions for simplistic keyboard input  

SYNOPSIS

#include <ggi/ggi.h>

int ggiGetc(ggi_visual_t vis);

int ggiKbhit(ggi_visual_t vis);

 

DESCRIPTION

ggiGetc gets a character from the keyboard, and blocks if there is no key immediately available.

ggiKbhit checks if a key has been hit on the keyboard. This does not consume the key. It is used for easy porting of old DOS applications.

Important: Do not poll like this: do while( ! ggiKbhit(vis) ); On a multitasking OS you would be wasting a lot of resources which could be available to other processes. If you want to wait for a key, use the ggiGetc call.
 

RETURN VALUE

ggiKbhit returns 0 if no key has been received yet, otherwise there is a key to be consumed.

ggiGetc returns a Unicode character in canonical form.

For a more detailed definition of characters, see gii_key_event(3).  

SEE ALSO

ggiEventPoll(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 21:46:51 GMT, April 16, 2011