demux_real.c: Remove unused hexdump() forward declaration
[mplayer/greg.git] / osdep / getch2.h
blob7ee40d9e98c8eeb62dce34741ef1da0b96bf7700
1 /*
2 * GyS-TermIO v2.0 (for GySmail v3)
3 * a very small replacement of ncurses library
5 * copyright (C) 1999 A'rpi/ESP-team
7 * This file is part of MPlayer.
9 * MPlayer is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * MPlayer is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #ifndef MPLAYER_GETCH2_H
25 #define MPLAYER_GETCH2_H
27 #include "config.h"
29 /* Screen size. Initialized by load_termcap() and get_screen_size() */
30 extern int screen_width;
31 extern int screen_height;
33 /* Termcap code to erase to end of line */
34 extern char * erase_to_end_of_line;
36 /* Get screen-size using IOCTL call. */
37 void get_screen_size(void);
39 /* Load key definitions from the TERMCAP database. 'termtype' can be NULL */
40 int load_termcap(char *termtype);
42 /* Enable and disable STDIN line-buffering */
43 void getch2_enable(void);
44 void getch2_disable(void);
46 /* Read a character or a special key code (see keycodes.h) */
47 struct mp_fifo;
48 void getch2(struct mp_fifo *fifo);
50 #ifdef CONFIG_ICONV
51 /**
52 * \brief gets the name of the system's terminal character set
53 * \return a malloced string indicating the system charset
55 * Be warned that this function on many systems is in no way thread-safe
56 * since it modifies global data
58 char *get_term_charset(void);
59 #endif
61 #if defined(__MINGW32__) || defined(__OS2__)
62 /* slave cmd function for Windows and OS/2 */
63 int mp_input_slave_cmd_func(int fd,char* dest,int size);
64 #define USE_SELECT 0
65 #define MP_INPUT_SLAVE_CMD_FUNC mp_input_slave_cmd_func
66 #else
67 #define USE_SELECT 1
68 #define MP_INPUT_SLAVE_CMD_FUNC NULL
69 #endif
71 #endif /* MPLAYER_GETCH2_H */