Add support for selection of console mode drivers to use using the
[wine/multimedia.git] / include / console.h
blob9e1be14cf5f08def0cdba7f3ee7eb8248c822825
1 /* Console.H */
3 /* Include file for definitions pertaining to Wine's text-console
4 interface.
5 */
7 #ifndef CONSOLE_H
8 #define CONSOLE_H
10 #include <stdio.h>
12 #include "config.h"
14 #define CONSOLE_DEFAULT_DRIVER "tty"
16 typedef struct CONSOLE_DRIVER
18 void (*init)();
19 void (*close)();
20 void (*write)(char, int, int, int);
21 void (*moveCursor)(char, char);
22 void (*getCursorPosition)(char *, char *);
23 void (*getCharacterAtCursor)(char *, int *, int *, int *);
24 void (*clearScreen)();
26 /* Keyboard Functions */
27 int (*checkForKeystroke)(char *, char *);
28 void (*getKeystroke)(char *, char *);
30 /* Windowing Functions */
31 void (*resizeScreen)(int, int);
32 void (*notifyResizeScreen)(int, int); /* May be rethought later... */
34 /* Accellerator Functions (Screen) */
35 void (*clearWindow)(char, char, char, char, int, int);
36 void (*scrollUpWindow)(char, char, char, char, char, int, int);
37 void (*scrollDownWindow)(char, char, char, char, char, int, int);
39 /* Accellerator Functions (Keyboard) */
40 char (*getCharacter)();
42 /* Other functions */
43 void (*refresh)();
45 /* Other data */
46 int norefresh;
47 FILE *console_out;
48 FILE *console_in;
50 } CONSOLE_device;
52 CONSOLE_device driver; /* Global driver struct */
54 /* Generic defines */
55 void CONSOLE_Init(char *drivers);
56 void CONSOLE_Close();
57 void CONSOLE_Write(char out, int fg_color, int bg_color, int attribute);
58 void CONSOLE_MoveCursor(char row, char col);
59 void CONSOLE_ClearWindow(char, char, char, char, int, int);
60 void CONSOLE_ScrollUpWindow(char, char, char, char, char, int, int);
61 void CONSOLE_ScrollDownWindow(char, char, char, char, char, int, int);
62 int CONSOLE_CheckForKeystroke(char *, char*);
63 void CONSOLE_GetKeystroke(char *, char *);
64 void CONSOLE_GetCursorPosition(char *, char *);
65 void CONSOLE_GetCharacterAtCursor(char *, int *, int *, int *);
66 void CONSOLE_Refresh();
67 void CONSOLE_SetRefresh(int);
68 int CONSOLE_GetRefresh();
69 void CONSOLE_ClearScreen();
70 char CONSOLE_GetCharacter();
71 void CONSOLE_ResizeScreen();
72 void CONSOLE_NotifyResizeScreen();
74 /* Generic Defines */
75 void GENERIC_Start();
76 void GENERIC_ClearWindow(char, char, char, char, int, int);
77 void GENERIC_ScrollUpWindow(char, char, char, char, char, int, int);
78 void GENERIC_ScrollDownWindow(char, char, char, char, char, int, int);
79 char GENERIC_GetCharacter();
81 /* TTY specific defines */
82 void TTY_Write(char out, int fg_color, int bg_color, int attribute);
83 void TTY_Start();
84 void TTY_GetKeystroke(char *, char *);
86 #ifdef WINE_NCURSES
88 /* ncurses defines */
89 void NCURSES_Write(char out, int fg_color, int bg_color, int attribute);
90 void NCURSES_Start();
91 void NCURSES_Init();
92 void NCURSES_Close();
93 int NCURSES_CheckForKeystroke(char *, char *);
94 void NCURSES_GetKeystroke(char *, char *);
95 void NCURSES_MoveCursor(char ,char);
96 void NCURSES_GetCursorPosition(char *, char *);
97 void NCURSES_GetCharacterAtCursor(char *, int *, int *, int *);
98 void NCURSES_Refresh();
99 void NCURSES_ClearScreen();
101 #endif /* WINE_NCURSES */
103 /* Xterm specific defines */
104 void XTERM_Start();
105 void XTERM_Close();
106 void XTERM_Init();
108 #endif /* CONSOLE_H */