File: ggiGetc.3ggi

package info (click to toggle)
libggi 1%3A2.0.1-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,072 kB
  • ctags: 5,274
  • sloc: ansic: 42,720; sh: 6,508; makefile: 666
file content (37 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.\\" auto-generated by docbook2man-spec $Revision: 1.4 $
.TH "ggiGetc" "3ggi" "22 August 2001" "GGI" "LibGGI API"
.SH NAME
ggiGetc, ggiKbhit \- Convenience functions for simplistic keyboard input
.SH SYNOPSIS
\fB#include <ggi/ggi.h>
.sp
int ggiGetc(ggi_visual_t \fIvis\fB);
.sp
int ggiKbhit(ggi_visual_t \fIvis\fB);
\fR.SH "DESCRIPTION"
.PP
\fBggiGetc\fR gets a character from the keyboard, 
and blocks if there is no key immediately available.
.PP
\fBggiKbhit\fR 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.
.sp
.RS
.B "Important:"
\fBDo not\fR 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 
\fBggiGetc\fR call.
.RE
.sp
.SH "RETURN VALUE"
.PP
\fBggiKbhit\fR returns 0 if no key has been received
yet, otherwise there is a key to be consumed.
.PP
\fBggiGetc\fR returns a Unicode character in canonical form.
.PP
For a fuller definition of characters, see [XRef to GII-KEYSYM].
.SH "SEE ALSO"
\fBggiEventPoll\fR(3)