Merge svn changes up to r28549
[mplayer.git] / osdep / getch2.h
bloba85969207cf99d51f8fee4dd3313e45d04d14a02
1 /* GyS-TermIO v2.0 (for GySmail v3) (C) 1999 A'rpi/ESP-team */
2 /* a very small replacement of ncurses library */
4 #ifndef MPLAYER_GETCH2_H
5 #define MPLAYER_GETCH2_H
7 /* Screen size. Initialized by load_termcap() and get_screen_size() */
8 extern int screen_width;
9 extern int screen_height;
11 /* Termcap code to erase to end of line */
12 extern char * erase_to_end_of_line;
14 /* Get screen-size using IOCTL call. */
15 void get_screen_size(void);
17 /* Load key definitions from the TERMCAP database. 'termtype' can be NULL */
18 int load_termcap(char *termtype);
20 /* Enable and disable STDIN line-buffering */
21 void getch2_enable(void);
22 void getch2_disable(void);
24 /* Read a character or a special key code (see keycodes.h) */
25 struct mp_fifo;
26 void getch2(struct mp_fifo *fifo);
28 /* slave cmd function for Windows and OS/2 */
29 int mp_input_slave_cmd_func(int fd,char* dest,int size);
31 #if defined(__MINGW32__) || defined(__OS2__)
32 #define USE_SELECT 0
33 #define MP_INPUT_SLAVE_CMD_FUNC mp_input_slave_cmd_func
34 #else
35 #define USE_SELECT 1
36 #define MP_INPUT_SLAVE_CMD_FUNC NULL
37 #endif
39 #endif /* MPLAYER_GETCH2_H */