root / Whitix / branches / hybrid / include / console.h

Revision 487, 1.8 kB (checked in by mwhitworth, 4 months ago)

Add to and tidy up various header files.

Line 
1/*  This file is part of Whitix.
2 *
3 *  Whitix is free software; you can redistribute it and/or modify
4 *  it under the terms of the GNU General Public License as published by
5 *  the Free Software Foundation; either version 2 of the License, or
6 *  (at your option) any later version.
7 *
8 *  Whitix is distributed in the hope that it will be useful,
9 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 *  GNU General Public License for more details.
12 *
13 *  You should have received a copy of the GNU General Public License
14 *  along with Whitix; if not, write to the Free Software
15 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16 *
17 */
18
19#ifndef CONSOLE_H
20#define CONSOLE_H
21
22#include <typedefs.h>
23#include <wait.h>
24
25int ConsoleEarlyInit();
26void ConsoleClearCurrent();
27void ConsoleSwitchToText();
28#define puts(s) printf(s)
29int printf(char* str,...);
30void putc(int c);
31
32int ChangeConsole(int index);
33void ConsoleAddKey(BYTE n);
34void ConsoleAddKeyCode(BYTE n);
35
36#define MAX_CONSOLES 7
37
38extern int currConsole;
39
40struct Console
41{
42        WORD currX,currY,currColor;
43        WaitQueue waitQueue;
44        BYTE keyboardBuf[25];
45        BYTE head,tail;
46        unsigned int params[16]; /* For ASCII control codes */
47        int inCtrl,ctrlParams,cmdLetter,paramIndex;
48        int flags;
49};
50
51extern struct Console consoles[MAX_CONSOLES];
52
53/* Console ioctls */
54#define CONSOLE_SET_OPTIONS 0x00000001
55#define CONSOLE_GET_OPTIONS 0x00000002
56#define CONSOLE_GET_INFO        0x00000003
57
58/* Console flags */
59#define CONSOLE_NO_ECHO         0x00000001
60#define CONSOLE_GRAPHICS        0x00000002
61#define CONSOLE_SENDKEYC        0x00000004
62
63/* and related structures */
64
65struct ConsoleInfo
66{
67        int rows,cols;
68};
69
70#endif
Note: See TracBrowser for help on using the browser.