2 /* Copyright 1998 - Joseph Pranevich */
4 /* Include file for definitions pertaining to Wine's text-console
15 /* Which libs can be used for wine's curses implementation... */
16 #ifdef HAVE_LIBNCURSES
24 #define CONSOLE_DEFAULT_DRIVER "tty"
25 /* If you have problems, try setting the next line to xterm */
26 #define CONSOLE_XTERM_PROG "nxterm" /* We should check for this first... */
28 typedef struct CONSOLE_DRIVER
32 void (*write
)(char, int, int, int);
33 void (*moveCursor
)(char, char);
34 void (*getCursorPosition
)(char *, char *);
35 void (*getCharacterAtCursor
)(char *, int *, int *, int *);
36 void (*clearScreen
)();
38 /* Keyboard Functions */
39 int (*checkForKeystroke
)(char *, char *);
40 void (*getKeystroke
)(char *, char *);
42 /* Windowing Functions */
43 void (*resizeScreen
)(int, int);
44 void (*notifyResizeScreen
)(int, int); /* May be rethought later... */
46 /* Accellerator Functions (Screen) */
47 void (*clearWindow
)(char, char, char, char, int, int);
48 void (*scrollUpWindow
)(char, char, char, char, char, int, int);
49 void (*scrollDownWindow
)(char, char, char, char, char, int, int);
51 /* Accellerator Functions (Keyboard) */
52 char (*getCharacter
)();
64 CONSOLE_device driver
; /* Global driver struct */
67 void CONSOLE_Init(char *drivers
);
69 void CONSOLE_Write(char out
, int fg_color
, int bg_color
, int attribute
);
70 void CONSOLE_MoveCursor(char row
, char col
);
71 void CONSOLE_ClearWindow(char, char, char, char, int, int);
72 void CONSOLE_ScrollUpWindow(char, char, char, char, char, int, int);
73 void CONSOLE_ScrollDownWindow(char, char, char, char, char, int, int);
74 int CONSOLE_CheckForKeystroke(char *, char*);
75 void CONSOLE_GetKeystroke(char *, char *);
76 void CONSOLE_GetCursorPosition(char *, char *);
77 void CONSOLE_GetCharacterAtCursor(char *, int *, int *, int *);
78 void CONSOLE_Refresh();
79 void CONSOLE_SetRefresh(int);
80 int CONSOLE_GetRefresh();
81 void CONSOLE_ClearScreen();
82 char CONSOLE_GetCharacter();
83 void CONSOLE_ResizeScreen();
84 void CONSOLE_NotifyResizeScreen();
85 void CONSOLE_WriteRawString(char *);
89 void GENERIC_ClearWindow(char, char, char, char, int, int);
90 void GENERIC_ScrollUpWindow(char, char, char, char, char, int, int);
91 void GENERIC_ScrollDownWindow(char, char, char, char, char, int, int);
92 char GENERIC_GetCharacter();
94 /* TTY specific defines */
95 void TTY_Write(char out
, int fg_color
, int bg_color
, int attribute
);
97 void TTY_GetKeystroke(char *, char *);
101 /* ncurses defines */
102 void NCURSES_Write(char out
, int fg_color
, int bg_color
, int attribute
);
103 void NCURSES_Start();
105 void NCURSES_Close();
106 int NCURSES_CheckForKeystroke(char *, char *);
107 void NCURSES_GetKeystroke(char *, char *);
108 void NCURSES_MoveCursor(char ,char);
109 void NCURSES_GetCursorPosition(char *, char *);
110 void NCURSES_GetCharacterAtCursor(char *, int *, int *, int *);
111 void NCURSES_Refresh();
112 void NCURSES_ClearScreen();
113 void NCURSES_NotifyResizeScreen(int x
, int y
);
115 #endif /* WINE_NCURSES */
117 /* Xterm specific defines */
121 void XTERM_ResizeScreen(int x
, int y
);
123 #endif /* CONSOLE_H */