1 //  This may look like C code, but it is really -*- C++ -*-
2 
3 //  ------------------------------------------------------------------
4 //  The Goldware Library
5 //  Copyright (C) 1990-1999 Odinn Sorensen
6 //  ------------------------------------------------------------------
7 //  This library is free software; you can redistribute it and/or
8 //  modify it under the terms of the GNU Library General Public
9 //  License as published by the Free Software Foundation; either
10 //  version 2 of the License, or (at your option) any later version.
11 //
12 //  This library is distributed in the hope that it will be useful,
13 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 //  Library General Public License for more details.
16 //
17 //  You should have received a copy of the GNU Library General Public
18 //  License along with this program; if not, write to the Free
19 //  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 //  MA 02111-1307, USA
21 //  ------------------------------------------------------------------
22 //  $Id: gkbdunix.h,v 1.1.1.1 2000/02/25 10:11:05 asa Exp $
23 //  ------------------------------------------------------------------
24 //  Unix keyboard functions. Based on SLang source code.
25 //  ------------------------------------------------------------------
26 
27 #ifndef __gkbdunix_h
28 #define __gkbdunix_h
29 
30 
31 //  ------------------------------------------------------------------
32 
33 #include <gdefs.h>
34 
35 
36 //  ------------------------------------------------------------------
37 
38 const int GKBD_MAX_INPUT_BUFFER_LEN = 1024;
39 
40 
41 //  ------------------------------------------------------------------
42 
43 extern int gkbd_stdin;
44 
45 
46 //  ------------------------------------------------------------------
47 
48 int  gkbd_tty_init();
49 void gkbd_tty_reset();
50 int  gkbd_sys_input_pending(int tsecs=0);
51 uint gkbd_sys_getkey();
52 
53 
54 //  ------------------------------------------------------------------
55 
56 extern uint gkbd_last_key_char;
57 
58 uint gkbd_getkey();
59 void gkbd_ungetkey_string(char *s, uint n);
60 int  gkbd_input_pending(int tsecs=0);
61 void gkbd_flush_input();
62 void gkbd_keymap_init();
63 void gkbd_keymap_reset();
64 int  gkbd_define_keysym(char* s, uint keysym);
65 uint gkbd_getmappedkey();
66 
67 
68 //  ------------------------------------------------------------------
69 
70 #endif
71 
72 //  ------------------------------------------------------------------
73