ReactOS  0.4.14-dev-1331-g167fa2c
blue.h
Go to the documentation of this file.
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 
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 {
28 } COORD, *PCOORD;
29 
30 typedef struct tagSMALL_RECT
31 {
36 } SMALL_RECT;
37 
39 {
46 
47 typedef struct tagCONSOLE_CURSOR_INFO
48 {
50  INT bVisible; // BOOL
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 typedef struct _CFHEADER
71 {
72  ULONG Signature; // File signature 'MSCF' (CAB_SIGNATURE)
73  ULONG Reserved1; // Reserved field
74  ULONG CabinetSize; // Cabinet file size
75  ULONG Reserved2; // Reserved field
76  ULONG FileTableOffset; // Offset of first CFFILE
77  ULONG Reserved3; // Reserved field
78  USHORT Version; // Cabinet version (CAB_VERSION)
79  USHORT FolderCount; // Number of folders
80  USHORT FileCount; // Number of files
81  USHORT Flags; // Cabinet flags (CAB_FLAG_*)
82  USHORT SetID; // Cabinet set id
83  USHORT CabinetNumber; // Zero-based cabinet number
85 
86 typedef struct _CFFILE
87 {
88  ULONG FileSize; // Uncompressed file size in bytes
89  ULONG FileOffset; // Uncompressed offset of file in the folder
90  USHORT FileControlID; // File control ID (CAB_FILE_*)
91  USHORT FileDate; // File date stamp, as used by DOS
92  USHORT FileTime; // File time stamp, as used by DOS
93  USHORT Attributes; // File attributes (CAB_ATTRIB_*)
94  /* After this is the NULL terminated filename */
95 } CFFILE, *PCFFILE;
96 
97 #define CAB_SIGNATURE 0x4643534D // "MSCF"
98 
99 #define VIDMEM_BASE 0xb8000
100 #define BITPLANE_BASE 0xa0000
101 
102 #define CRTC_COMMAND ((PUCHAR)0x3d4)
103 #define CRTC_DATA ((PUCHAR)0x3d5)
104 
105 #define CRTC_COLUMNS 0x01
106 #define CRTC_OVERFLOW 0x07
107 #define CRTC_ROWS 0x12
108 #define CRTC_SCANLINES 0x09
109 #define CRTC_CURSORSTART 0x0a
110 #define CRTC_CURSOREND 0x0b
111 #define CRTC_CURSORPOSHI 0x0e
112 #define CRTC_CURSORPOSLO 0x0f
113 
114 #define SEQ_COMMAND ((PUCHAR)0x3c4)
115 #define SEQ_DATA ((PUCHAR)0x3c5)
116 
117 #define GCT_COMMAND ((PUCHAR)0x3ce)
118 #define GCT_DATA ((PUCHAR)0x3cf)
119 
120 /* SEQ regs numbers*/
121 #define SEQ_RESET 0x00
122 #define SEQ_ENABLE_WRT_PLANE 0x02
123 #define SEQ_MEM_MODE 0x04
124 
125 /* GCT regs numbers */
126 #define GCT_READ_PLANE 0x04
127 #define GCT_RW_MODES 0x05
128 #define GCT_GRAPH_MODE 0x06
129 
130 #define ATTRC_WRITEREG ((PUCHAR)0x3c0)
131 #define ATTRC_READREG ((PUCHAR)0x3c1)
132 #define ATTRC_INPST1 ((PUCHAR)0x3da)
133 
134 #define MISC (PUCHAR)0x3c2
135 #define SEQ (PUCHAR)0x3c4
136 #define SEQDATA (PUCHAR)0x3c5
137 #define CRTC (PUCHAR)0x3d4
138 #define CRTCDATA (PUCHAR)0x3d5
139 #define GRAPHICS (PUCHAR)0x3ce
140 #define GRAPHICSDATA (PUCHAR)0x3cf
141 #define ATTRIB (PUCHAR)0x3c0
142 #define STATUS (PUCHAR)0x3da
143 #define PELMASK (PUCHAR)0x3c6
144 #define PELINDEX (PUCHAR)0x3c8
145 #define PELDATA (PUCHAR)0x3c9
146 
147 VOID ScrLoadFontTable(_In_ ULONG CodePage);
148 
149 #endif /* _BLUE_PCH_ */
struct tagCONSOLE_CURSOR_INFO * PCONSOLE_CURSOR_INFO
struct _CFFILE * PCFFILE
USHORT FileDate
Definition: cabinet.c:119
SHORT X
Definition: blue.h:26
struct _CFFILE CFFILE
struct tagCONSOLE_SCREEN_BUFFER_INFO CONSOLE_SCREEN_BUFFER_INFO
USHORT Version
Definition: cabinet.c:86
USHORT FileTime
Definition: cabinet.c:120
ULONG Reserved3
Definition: cabinet.c:85
ULONG Signature
Definition: cabinet.c:80
struct tagSMALL_RECT SMALL_RECT
int32_t INT
Definition: typedefs.h:57
USHORT Attributes
Definition: cabinet.c:121
struct _SECURITY_ATTRIBUTES * PSECURITY_ATTRIBUTES
Definition: blue.h:19
short SHORT
Definition: pedump.c:59
USHORT FileCount
Definition: cabinet.c:88
struct tagCOORD COORD
struct tagCOORD * PCOORD
SHORT Y
Definition: blue.h:27
USHORT FolderCount
Definition: cabinet.c:87
USHORT CabinetNumber
Definition: cabinet.c:91
SHORT Left
Definition: blue.h:32
SHORT Bottom
Definition: blue.h:35
SHORT Top
Definition: blue.h:33
USHORT SetID
Definition: cabinet.c:90
struct _CFHEADER * PCFHEADER
ULONG Reserved1
Definition: cabinet.c:81
ULONG FileOffset
Definition: cabinet.c:117
USHORT Flags
Definition: cabinet.c:89
Definition: bl.h:1338
Definition: blue.h:24
#define _In_
Definition: no_sal2.h:204
struct _CFHEADER CFHEADER
unsigned short USHORT
Definition: pedump.c:61
ULONG CabinetSize
Definition: cabinet.c:82
unsigned int ULONG
Definition: retypes.h:1
ULONG FileSize
Definition: cabinet.c:116
SHORT Right
Definition: blue.h:34
struct tagCONSOLE_SCREEN_BUFFER_INFO * PCONSOLE_SCREEN_BUFFER_INFO
ULONG FileTableOffset
Definition: cabinet.c:84
struct tagCONSOLE_CURSOR_INFO CONSOLE_CURSOR_INFO
VOID ScrLoadFontTable(_In_ ULONG CodePage)
Definition: font.c:26
ULONG Reserved2
Definition: cabinet.c:83
USHORT FileControlID
Definition: blue.h:90