ReactOS  0.4.14-dev-614-gbfd8a84
blue.h File Reference
#include <ntifs.h>
#include <blue/ntddblue.h>
Include dependency graph for blue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagCOORD
 
struct  tagSMALL_RECT
 
struct  tagCONSOLE_SCREEN_BUFFER_INFO
 
struct  tagCONSOLE_CURSOR_INFO
 
struct  _CFHEADER
 
struct  _CFFILE
 

Macros

#define TAG_BLUE   'EULB'
 
#define TAB_WIDTH   8
 
#define MAX_PATH   260
 
#define ENABLE_PROCESSED_OUTPUT   0x0001
 
#define ENABLE_WRAP_AT_EOL_OUTPUT   0x0002
 
#define FOREGROUND_BLUE   0x0001
 
#define FOREGROUND_GREEN   0x0002
 
#define FOREGROUND_RED   0x0004
 
#define FOREGROUND_INTENSITY   0x0008
 
#define BACKGROUND_BLUE   0x0010
 
#define BACKGROUND_GREEN   0x0020
 
#define BACKGROUND_RED   0x0040
 
#define BACKGROUND_INTENSITY   0x0080
 
#define CAB_SIGNATURE   0x4643534D
 
#define VIDMEM_BASE   0xb8000
 
#define BITPLANE_BASE   0xa0000
 
#define CRTC_COMMAND   ((PUCHAR)0x3d4)
 
#define CRTC_DATA   ((PUCHAR)0x3d5)
 
#define CRTC_COLUMNS   0x01
 
#define CRTC_OVERFLOW   0x07
 
#define CRTC_ROWS   0x12
 
#define CRTC_SCANLINES   0x09
 
#define CRTC_CURSORSTART   0x0a
 
#define CRTC_CURSOREND   0x0b
 
#define CRTC_CURSORPOSHI   0x0e
 
#define CRTC_CURSORPOSLO   0x0f
 
#define SEQ_COMMAND   ((PUCHAR)0x3c4)
 
#define SEQ_DATA   ((PUCHAR)0x3c5)
 
#define GCT_COMMAND   ((PUCHAR)0x3ce)
 
#define GCT_DATA   ((PUCHAR)0x3cf)
 
#define SEQ_RESET   0x00
 
#define SEQ_ENABLE_WRT_PLANE   0x02
 
#define SEQ_MEM_MODE   0x04
 
#define GCT_READ_PLANE   0x04
 
#define GCT_RW_MODES   0x05
 
#define GCT_GRAPH_MODE   0x06
 
#define ATTRC_WRITEREG   ((PUCHAR)0x3c0)
 
#define ATTRC_READREG   ((PUCHAR)0x3c1)
 
#define ATTRC_INPST1   ((PUCHAR)0x3da)
 
#define MISC   (PUCHAR)0x3c2
 
#define SEQ   (PUCHAR)0x3c4
 
#define SEQDATA   (PUCHAR)0x3c5
 
#define CRTC   (PUCHAR)0x3d4
 
#define CRTCDATA   (PUCHAR)0x3d5
 
#define GRAPHICS   (PUCHAR)0x3ce
 
#define GRAPHICSDATA   (PUCHAR)0x3cf
 
#define ATTRIB   (PUCHAR)0x3c0
 
#define STATUS   (PUCHAR)0x3da
 
#define PELMASK   (PUCHAR)0x3c6
 
#define PELINDEX   (PUCHAR)0x3c8
 
#define PELDATA   (PUCHAR)0x3c9
 

Typedefs

typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
 
typedef struct _SECURITY_ATTRIBUTESPSECURITY_ATTRIBUTES
 
typedef struct tagCOORD COORD
 
typedef struct tagCOORDPCOORD
 
typedef struct tagSMALL_RECT SMALL_RECT
 
typedef struct tagCONSOLE_SCREEN_BUFFER_INFO CONSOLE_SCREEN_BUFFER_INFO
 
typedef struct tagCONSOLE_SCREEN_BUFFER_INFOPCONSOLE_SCREEN_BUFFER_INFO
 
typedef struct tagCONSOLE_CURSOR_INFO CONSOLE_CURSOR_INFO
 
typedef struct tagCONSOLE_CURSOR_INFOPCONSOLE_CURSOR_INFO
 
typedef struct _CFHEADER CFHEADER
 
typedef struct _CFHEADERPCFHEADER
 
typedef struct _CFFILE CFFILE
 
typedef struct _CFFILEPCFFILE
 

Functions

VOID ScrLoadFontTable (_In_ ULONG CodePage)
 

Macro Definition Documentation

◆ ATTRC_INPST1

#define ATTRC_INPST1   ((PUCHAR)0x3da)

Definition at line 132 of file blue.h.

◆ ATTRC_READREG

#define ATTRC_READREG   ((PUCHAR)0x3c1)

Definition at line 131 of file blue.h.

◆ ATTRC_WRITEREG

#define ATTRC_WRITEREG   ((PUCHAR)0x3c0)

Definition at line 130 of file blue.h.

◆ ATTRIB

#define ATTRIB   (PUCHAR)0x3c0

Definition at line 141 of file blue.h.

◆ BACKGROUND_BLUE

#define BACKGROUND_BLUE   0x0010

Definition at line 65 of file blue.h.

◆ BACKGROUND_GREEN

#define BACKGROUND_GREEN   0x0020

Definition at line 66 of file blue.h.

◆ BACKGROUND_INTENSITY

#define BACKGROUND_INTENSITY   0x0080

Definition at line 68 of file blue.h.

◆ BACKGROUND_RED

#define BACKGROUND_RED   0x0040

Definition at line 67 of file blue.h.

◆ BITPLANE_BASE

#define BITPLANE_BASE   0xa0000

Definition at line 100 of file blue.h.

◆ CAB_SIGNATURE

#define CAB_SIGNATURE   0x4643534D

Definition at line 97 of file blue.h.

◆ CRTC

#define CRTC   (PUCHAR)0x3d4

Definition at line 137 of file blue.h.

◆ CRTC_COLUMNS

#define CRTC_COLUMNS   0x01

Definition at line 105 of file blue.h.

◆ CRTC_COMMAND

#define CRTC_COMMAND   ((PUCHAR)0x3d4)

Definition at line 102 of file blue.h.

◆ CRTC_CURSOREND

#define CRTC_CURSOREND   0x0b

Definition at line 110 of file blue.h.

◆ CRTC_CURSORPOSHI

#define CRTC_CURSORPOSHI   0x0e

Definition at line 111 of file blue.h.

◆ CRTC_CURSORPOSLO

#define CRTC_CURSORPOSLO   0x0f

Definition at line 112 of file blue.h.

◆ CRTC_CURSORSTART

#define CRTC_CURSORSTART   0x0a

Definition at line 109 of file blue.h.

◆ CRTC_DATA

#define CRTC_DATA   ((PUCHAR)0x3d5)

Definition at line 103 of file blue.h.

◆ CRTC_OVERFLOW

#define CRTC_OVERFLOW   0x07

Definition at line 106 of file blue.h.

◆ CRTC_ROWS

#define CRTC_ROWS   0x12

Definition at line 107 of file blue.h.

◆ CRTC_SCANLINES

#define CRTC_SCANLINES   0x09

Definition at line 108 of file blue.h.

◆ CRTCDATA

#define CRTCDATA   (PUCHAR)0x3d5

Definition at line 138 of file blue.h.

◆ ENABLE_PROCESSED_OUTPUT

#define ENABLE_PROCESSED_OUTPUT   0x0001

Definition at line 53 of file blue.h.

◆ ENABLE_WRAP_AT_EOL_OUTPUT

#define ENABLE_WRAP_AT_EOL_OUTPUT   0x0002

Definition at line 54 of file blue.h.

◆ FOREGROUND_BLUE

#define FOREGROUND_BLUE   0x0001

Definition at line 61 of file blue.h.

◆ FOREGROUND_GREEN

#define FOREGROUND_GREEN   0x0002

Definition at line 62 of file blue.h.

◆ FOREGROUND_INTENSITY

#define FOREGROUND_INTENSITY   0x0008

Definition at line 64 of file blue.h.

◆ FOREGROUND_RED

#define FOREGROUND_RED   0x0004

Definition at line 63 of file blue.h.

◆ GCT_COMMAND

#define GCT_COMMAND   ((PUCHAR)0x3ce)

Definition at line 117 of file blue.h.

◆ GCT_DATA

#define GCT_DATA   ((PUCHAR)0x3cf)

Definition at line 118 of file blue.h.

◆ GCT_GRAPH_MODE

#define GCT_GRAPH_MODE   0x06

Definition at line 128 of file blue.h.

◆ GCT_READ_PLANE

#define GCT_READ_PLANE   0x04

Definition at line 126 of file blue.h.

◆ GCT_RW_MODES

#define GCT_RW_MODES   0x05

Definition at line 127 of file blue.h.

◆ GRAPHICS

#define GRAPHICS   (PUCHAR)0x3ce

Definition at line 139 of file blue.h.

◆ GRAPHICSDATA

#define GRAPHICSDATA   (PUCHAR)0x3cf

Definition at line 140 of file blue.h.

◆ MAX_PATH

#define MAX_PATH   260

Definition at line 17 of file blue.h.

◆ MISC

#define MISC   (PUCHAR)0x3c2

Definition at line 134 of file blue.h.

◆ PELDATA

#define PELDATA   (PUCHAR)0x3c9

Definition at line 145 of file blue.h.

◆ PELINDEX

#define PELINDEX   (PUCHAR)0x3c8

Definition at line 144 of file blue.h.

◆ PELMASK

#define PELMASK   (PUCHAR)0x3c6

Definition at line 143 of file blue.h.

◆ SEQ

#define SEQ   (PUCHAR)0x3c4

Definition at line 135 of file blue.h.

◆ SEQ_COMMAND

#define SEQ_COMMAND   ((PUCHAR)0x3c4)

Definition at line 114 of file blue.h.

◆ SEQ_DATA

#define SEQ_DATA   ((PUCHAR)0x3c5)

Definition at line 115 of file blue.h.

◆ SEQ_ENABLE_WRT_PLANE

#define SEQ_ENABLE_WRT_PLANE   0x02

Definition at line 122 of file blue.h.

◆ SEQ_MEM_MODE

#define SEQ_MEM_MODE   0x04

Definition at line 123 of file blue.h.

◆ SEQ_RESET

#define SEQ_RESET   0x00

Definition at line 121 of file blue.h.

◆ SEQDATA

#define SEQDATA   (PUCHAR)0x3c5

Definition at line 136 of file blue.h.

◆ STATUS

#define STATUS   (PUCHAR)0x3da

Definition at line 142 of file blue.h.

◆ TAB_WIDTH

#define TAB_WIDTH   8

Definition at line 16 of file blue.h.

◆ TAG_BLUE

#define TAG_BLUE   'EULB'

Definition at line 14 of file blue.h.

◆ VIDMEM_BASE

#define VIDMEM_BASE   0xb8000

Definition at line 99 of file blue.h.

Typedef Documentation

◆ CFFILE

◆ CFHEADER

◆ CONSOLE_CURSOR_INFO

◆ CONSOLE_SCREEN_BUFFER_INFO

◆ COORD

◆ PCFFILE

typedef struct _CFFILE * PCFFILE

◆ PCFHEADER

◆ PCONSOLE_CURSOR_INFO

◆ PCONSOLE_SCREEN_BUFFER_INFO

◆ PCOORD

typedef struct tagCOORD * PCOORD

◆ PSECURITY_ATTRIBUTES

Definition at line 19 of file blue.h.

◆ SECURITY_ATTRIBUTES

Definition at line 19 of file blue.h.

◆ SMALL_RECT

Function Documentation

◆ ScrLoadFontTable()

VOID ScrLoadFontTable ( _In_ ULONG  CodePage)

Definition at line 26 of file font.c.

28 {
30  PUCHAR Bitplane;
31  PUCHAR FontBitfield = NULL;
33 
34  FontBitfield = (PUCHAR)ExAllocatePoolWithTag(NonPagedPool, 2048, TAG_BLUE);
35  if (FontBitfield == NULL)
36  {
37  DPRINT1("ExAllocatePoolWithTag failed\n");
38  return;
39  }
40 
41  /* open bit plane for font table access */
42  OpenBitPlane();
43 
44  /* get pointer to video memory */
45  BaseAddress.QuadPart = BITPLANE_BASE;
46  Bitplane = (PUCHAR)MmMapIoSpace(BaseAddress, 0xFFFF, MmNonCached);
47 
48  Status = ExtractFont(CodePage, FontBitfield);
49  if (NT_SUCCESS(Status))
50  {
51  LoadFont(Bitplane, FontBitfield);
52  }
53  else
54  {
55  DPRINT1("ExtractFont failed with Status 0x%lx\n", Status);
56  }
57 
58  MmUnmapIoSpace(Bitplane, 0xFFFF);
59  ExFreePoolWithTag(FontBitfield, TAG_BLUE);
60 
61  /* close bit plane */
62  CloseBitPlane();
63 }
VOID CloseBitPlane(VOID)
Definition: font.c:279
unsigned char * PUCHAR
Definition: retypes.h:3
LONG NTSTATUS
Definition: precomp.h:26
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
Definition: iosup.c:47
smooth NULL
Definition: ftsmooth.c:416
#define TAG_BLUE
Definition: blue.h:14
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
VOID LoadFont(_In_ PUCHAR Bitplane, _In_ PUCHAR FontBitfield)
Definition: font.c:300
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define BITPLANE_BASE
Definition: blue.h:100
Status
Definition: gdiplustypes.h:24
VOID NTAPI MmUnmapIoSpace(IN PVOID BaseAddress, IN SIZE_T NumberOfBytes)
Definition: iosup.c:193
#define DPRINT1
Definition: precomp.h:8
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
return STATUS_SUCCESS
Definition: btrfs.c:2938
NTSTATUS ExtractFont(_In_ ULONG CodePage, _In_ PUCHAR FontBitField)
Definition: font.c:68
VOID OpenBitPlane(VOID)
Definition: font.c:258

Referenced by ScrAcquireOwnership(), and ScrIoControl().