1 /**
2  ** lnxkeys.c ---- DOS (TCC/BCC/DJGPP: "conio.h") style keyboard utilities
3  **
4  ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221
5  ** [e-mail: csaba@vuse.vanderbilt.edu]
6  **
7  ** This file is part of the GRX graphics library.
8  **
9  ** The GRX graphics library is free software; you can redistribute it
10  ** and/or modify it under some conditions; see the "copying.grx" file
11  ** for details.
12  **
13  ** This library is distributed in the hope that it will be useful,
14  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
15  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  **
17  ** Contributions by: (See "doc/credits.doc" for details)
18  ** Hartmut Schirmer (hsc@techfak.uni-kiel.de)
19  **
20  **/
21 
22 #include "libgrx.h"
23 #include "input.h"
24 
25 #include "grxkeys.h"
26 
kbhit(void)27 int kbhit(void)
28 {
29 	return(_GrCheckKeyboardHit());
30 }
31 
getch(void)32 int getch(void)
33 {
34 	return(_GrReadCharFromKeyboard());
35 }
36 
getkey(void)37 int getkey(void)
38 {
39 	return(_GrReadCharFromKeyboard());
40 }
41 
getkbstat(void)42 int getkbstat(void)
43 {
44 	return(0);
45 }
46 
47 
48 /*
49 ** new functions to replace the old style
50 **   kbhit / getch / getkey / getxkey / getkbstat
51 ** keyboard interface
52 */
GrKeyPressed(void)53 int GrKeyPressed(void) {
54   return(_GrCheckKeyboardHit());
55 }
56 
GrKeyRead(void)57 GrKeyType GrKeyRead(void) {
58   return (GrKeyType)_GrReadCharFromKeyboard();
59 }
60 
GrKeyStat(void)61 int GrKeyStat(void) {
62   return(0);
63 }
64