[SHELL32] Fix Control_RunDLLW (#5400)
[reactos.git] / drivers / setup / blue / blue.h
1 /*
2 * PROJECT: ReactOS Console Text-Mode Device Driver
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Main Header File.
5 * COPYRIGHT: Copyright 1999 Boudewijn Dekker
6 * Copyright 1999-2019 Eric Kohl
7 */
8
9 #ifndef _BLUE_PCH_
10 #define _BLUE_PCH_
11
12 #include <ntifs.h>
13
14 #define TAG_BLUE 'EULB'
15
16 #define TAB_WIDTH 8
17 #define MAX_PATH 260
18
19 typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES;
20
21 // Define material that normally comes from PSDK
22 // This is mandatory to prevent any inclusion of
23 // user-mode stuff.
24 typedef struct tagCOORD
25 {
26 SHORT X;
27 SHORT Y;
28 } COORD, *PCOORD;
29
30 typedef struct tagSMALL_RECT
31 {
32 SHORT Left;
33 SHORT Top;
34 SHORT Right;
35 SHORT Bottom;
36 } SMALL_RECT;
37
38 typedef struct tagCONSOLE_SCREEN_BUFFER_INFO
39 {
40 COORD dwSize;
41 COORD dwCursorPosition;
42 USHORT wAttributes;
43 SMALL_RECT srWindow;
44 COORD dwMaximumWindowSize;
45 } CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO;
46
47 typedef struct tagCONSOLE_CURSOR_INFO
48 {
49 ULONG dwSize;
50 INT bVisible; // BOOL
51 } CONSOLE_CURSOR_INFO, *PCONSOLE_CURSOR_INFO;
52
53 #define ENABLE_PROCESSED_OUTPUT 0x0001
54 #define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002
55
56 #include <blue/ntddblue.h>
57
58 /*
59 * Color attributes for text and screen background
60 */
61 #define FOREGROUND_BLUE 0x0001
62 #define FOREGROUND_GREEN 0x0002
63 #define FOREGROUND_RED 0x0004
64 #define FOREGROUND_INTENSITY 0x0008
65 #define BACKGROUND_BLUE 0x0010
66 #define BACKGROUND_GREEN 0x0020
67 #define BACKGROUND_RED 0x0040
68 #define BACKGROUND_INTENSITY 0x0080
69
70 /*
71 * VGA registers
72 */
73 #define VIDMEM_BASE 0xb8000
74 #define BITPLANE_BASE 0xa0000
75
76 #define CRTC_COMMAND ((PUCHAR)0x3d4)
77 #define CRTC_DATA ((PUCHAR)0x3d5)
78
79 #define CRTC_COLUMNS 0x01
80 #define CRTC_OVERFLOW 0x07
81 #define CRTC_ROWS 0x12
82 #define CRTC_SCANLINES 0x09
83 #define CRTC_CURSORSTART 0x0a
84 #define CRTC_CURSOREND 0x0b
85 #define CRTC_CURSORPOSHI 0x0e
86 #define CRTC_CURSORPOSLO 0x0f
87
88 #define SEQ_COMMAND ((PUCHAR)0x3c4)
89 #define SEQ_DATA ((PUCHAR)0x3c5)
90
91 #define GCT_COMMAND ((PUCHAR)0x3ce)
92 #define GCT_DATA ((PUCHAR)0x3cf)
93
94 /* SEQ regs numbers*/
95 #define SEQ_RESET 0x00
96 #define SEQ_ENABLE_WRT_PLANE 0x02
97 #define SEQ_MEM_MODE 0x04
98
99 /* GCT regs numbers */
100 #define GCT_READ_PLANE 0x04
101 #define GCT_RW_MODES 0x05
102 #define GCT_GRAPH_MODE 0x06
103
104 #define ATTRC_WRITEREG ((PUCHAR)0x3c0)
105 #define ATTRC_READREG ((PUCHAR)0x3c1)
106 #define ATTRC_INPST1 ((PUCHAR)0x3da)
107
108 #define MISC (PUCHAR)0x3c2
109 #define SEQ (PUCHAR)0x3c4
110 #define SEQDATA (PUCHAR)0x3c5
111 #define CRTC (PUCHAR)0x3d4
112 #define CRTCDATA (PUCHAR)0x3d5
113 #define GRAPHICS (PUCHAR)0x3ce
114 #define GRAPHICSDATA (PUCHAR)0x3cf
115 #define ATTRIB (PUCHAR)0x3c0
116 #define STATUS (PUCHAR)0x3da
117 #define PELMASK (PUCHAR)0x3c6
118 #define PELINDEX (PUCHAR)0x3c8
119 #define PELDATA (PUCHAR)0x3c9
120
121 VOID ScrSetFont(_In_ PUCHAR FontBitfield);
122
123 #endif /* _BLUE_PCH_ */