mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[BLUE] Code formatting, add SAL2 annotations, and update file source headers.
This commit is contained in:
parent
c917c442ad
commit
d684f90632
4 changed files with 747 additions and 728 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Setup Driver
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: drivers/setup/blue/font.h
|
||||
* PURPOSE: Loading specific fonts into VGA
|
||||
* PROGRAMMERS: Aleksey Bragin (aleksey@reactos.org)
|
||||
* PROJECT: ReactOS Console Text-Mode Device Driver
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: Main Header File.
|
||||
* COPYRIGHT: Copyright 1999 Boudewijn Dekker
|
||||
* Copyright 1999-2019 Eric Kohl
|
||||
*/
|
||||
|
||||
#ifndef _BLUE_PCH_
|
||||
|
@ -11,34 +11,43 @@
|
|||
|
||||
#include <wdm.h>
|
||||
|
||||
#define TAG_BLUE 'EULB'
|
||||
|
||||
#define TAB_WIDTH 8
|
||||
#define MAX_PATH 260
|
||||
|
||||
typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES;
|
||||
|
||||
// Define material that normally comes from PSDK
|
||||
// This is mandatory to prevent any inclusion of
|
||||
// user-mode stuff.
|
||||
typedef struct tagCOORD {
|
||||
SHORT X;
|
||||
SHORT Y;
|
||||
typedef struct tagCOORD
|
||||
{
|
||||
SHORT X;
|
||||
SHORT Y;
|
||||
} COORD, *PCOORD;
|
||||
|
||||
typedef struct tagSMALL_RECT {
|
||||
SHORT Left;
|
||||
SHORT Top;
|
||||
SHORT Right;
|
||||
SHORT Bottom;
|
||||
typedef struct tagSMALL_RECT
|
||||
{
|
||||
SHORT Left;
|
||||
SHORT Top;
|
||||
SHORT Right;
|
||||
SHORT Bottom;
|
||||
} SMALL_RECT;
|
||||
|
||||
typedef struct tagCONSOLE_SCREEN_BUFFER_INFO {
|
||||
COORD dwSize;
|
||||
COORD dwCursorPosition;
|
||||
USHORT wAttributes;
|
||||
SMALL_RECT srWindow;
|
||||
COORD dwMaximumWindowSize;
|
||||
typedef struct tagCONSOLE_SCREEN_BUFFER_INFO
|
||||
{
|
||||
COORD dwSize;
|
||||
COORD dwCursorPosition;
|
||||
USHORT wAttributes;
|
||||
SMALL_RECT srWindow;
|
||||
COORD dwMaximumWindowSize;
|
||||
} CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO;
|
||||
|
||||
typedef struct tagCONSOLE_CURSOR_INFO {
|
||||
ULONG dwSize;
|
||||
BOOLEAN bVisible;
|
||||
typedef struct tagCONSOLE_CURSOR_INFO
|
||||
{
|
||||
ULONG dwSize;
|
||||
INT bVisible; // BOOL
|
||||
} CONSOLE_CURSOR_INFO, *PCONSOLE_CURSOR_INFO;
|
||||
|
||||
#define ENABLE_PROCESSED_OUTPUT 0x0001
|
||||
|
@ -47,7 +56,17 @@ typedef struct tagCONSOLE_CURSOR_INFO {
|
|||
#include <blue/ntddblue.h>
|
||||
#include <ndk/inbvfuncs.h>
|
||||
|
||||
#define TAG_BLUE 'EULB'
|
||||
/*
|
||||
* Color attributes for text and screen background
|
||||
*/
|
||||
#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
|
||||
|
||||
typedef struct _CFHEADER
|
||||
{
|
||||
|
@ -113,10 +132,6 @@ typedef struct _CFFILE
|
|||
#define ATTRC_READREG ((PUCHAR)0x3c1)
|
||||
#define ATTRC_INPST1 ((PUCHAR)0x3da)
|
||||
|
||||
#define TAB_WIDTH 8
|
||||
|
||||
#define MAX_PATH 260
|
||||
|
||||
#define MISC (PUCHAR)0x3c2
|
||||
#define SEQ (PUCHAR)0x3c4
|
||||
#define SEQDATA (PUCHAR)0x3c5
|
||||
|
@ -130,7 +145,6 @@ typedef struct _CFFILE
|
|||
#define PELINDEX (PUCHAR)0x3c8
|
||||
#define PELDATA (PUCHAR)0x3c9
|
||||
|
||||
void ScrLoadFontTable(UINT32 CodePage);
|
||||
NTSTATUS ExtractFont(UINT32 CodePage, PUCHAR FontBitField);
|
||||
VOID ScrLoadFontTable(_In_ ULONG CodePage);
|
||||
|
||||
#endif /* _BLUE_PCH_ */
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Setup Driver
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: drivers/setup/blue/font.c
|
||||
* PURPOSE: Loading specific fonts into VGA
|
||||
* PROGRAMMERS: Aleksey Bragin (aleksey@reactos.org)
|
||||
* Colin Finck (mail@colinfinck.de)
|
||||
* Christoph von Wittich (christoph_vw@reactos.org)
|
||||
*/
|
||||
* PROJECT: ReactOS Console Text-Mode Device Driver
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: Loading specific fonts into VGA.
|
||||
* COPYRIGHT: Copyright 2008-2019 Aleksey Bragin (aleksey@reactos.org)
|
||||
* Copyright 2008-2019 Colin Finck (mail@colinfinck.de)
|
||||
* Copyright 2008-2019 Christoph von Wittich (christoph_vw@reactos.org)
|
||||
*/
|
||||
|
||||
/* INCLUDES ***************************************************************/
|
||||
|
||||
|
@ -17,15 +16,16 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
VOID OpenBitPlane();
|
||||
VOID CloseBitPlane();
|
||||
VOID LoadFont(PUCHAR Bitplane, PUCHAR FontBitfield);
|
||||
NTSTATUS ExtractFont(_In_ ULONG CodePage, _In_ PUCHAR FontBitField);
|
||||
VOID OpenBitPlane(VOID);
|
||||
VOID CloseBitPlane(VOID);
|
||||
VOID LoadFont(_In_ PUCHAR Bitplane, _In_ PUCHAR FontBitfield);
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
VOID
|
||||
ScrLoadFontTable(
|
||||
UINT32 CodePage)
|
||||
_In_ ULONG CodePage)
|
||||
{
|
||||
PHYSICAL_ADDRESS BaseAddress;
|
||||
PUCHAR Bitplane;
|
||||
|
@ -67,8 +67,8 @@ ScrLoadFontTable(
|
|||
|
||||
NTSTATUS
|
||||
ExtractFont(
|
||||
UINT32 CodePage,
|
||||
PUCHAR FontBitField)
|
||||
_In_ ULONG CodePage,
|
||||
_In_ PUCHAR FontBitField)
|
||||
{
|
||||
BOOLEAN bFoundFile = FALSE;
|
||||
HANDLE Handle;
|
||||
|
@ -299,8 +299,8 @@ CloseBitPlane(VOID)
|
|||
|
||||
VOID
|
||||
LoadFont(
|
||||
PUCHAR Bitplane,
|
||||
PUCHAR FontBitfield)
|
||||
_In_ PUCHAR Bitplane,
|
||||
_In_ PUCHAR FontBitfield)
|
||||
{
|
||||
UINT32 i, j;
|
||||
|
||||
|
|
|
@ -8,13 +8,11 @@
|
|||
#define IOCTL_CONSOLE_GET_MODE CTL_CODE(FILE_DEVICE_SCREEN, 0x805, METHOD_BUFFERED, FILE_READ_ACCESS)
|
||||
#define IOCTL_CONSOLE_SET_MODE CTL_CODE(FILE_DEVICE_SCREEN, 0x806, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
|
||||
#define IOCTL_CONSOLE_FILL_OUTPUT_ATTRIBUTE CTL_CODE(FILE_DEVICE_SCREEN, 0x810, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
#define IOCTL_CONSOLE_READ_OUTPUT_ATTRIBUTE CTL_CODE(FILE_DEVICE_SCREEN, 0x811, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
|
||||
#define IOCTL_CONSOLE_WRITE_OUTPUT_ATTRIBUTE CTL_CODE(FILE_DEVICE_SCREEN, 0x812, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
|
||||
#define IOCTL_CONSOLE_SET_TEXT_ATTRIBUTE CTL_CODE(FILE_DEVICE_SCREEN, 0x813, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
|
||||
|
||||
#define IOCTL_CONSOLE_FILL_OUTPUT_CHARACTER CTL_CODE(FILE_DEVICE_SCREEN, 0x820, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||
#define IOCTL_CONSOLE_READ_OUTPUT_CHARACTER CTL_CODE(FILE_DEVICE_SCREEN, 0x821, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
|
||||
#define IOCTL_CONSOLE_WRITE_OUTPUT_CHARACTER CTL_CODE(FILE_DEVICE_SCREEN, 0x822, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
|
||||
|
@ -23,44 +21,38 @@
|
|||
|
||||
#define IOCTL_CONSOLE_LOADFONT CTL_CODE(FILE_DEVICE_SCREEN, 0x840, METHOD_IN_DIRECT, FILE_WRITE_ACCESS)
|
||||
|
||||
|
||||
/* TYPEDEFS **************************************************************/
|
||||
|
||||
|
||||
typedef struct tagCONSOLE_MODE
|
||||
{
|
||||
ULONG dwMode;
|
||||
ULONG dwMode;
|
||||
} CONSOLE_MODE, *PCONSOLE_MODE;
|
||||
|
||||
|
||||
typedef struct tagOUTPUT_ATTRIBUTE
|
||||
{
|
||||
USHORT wAttribute;
|
||||
ULONG nLength;
|
||||
COORD dwCoord;
|
||||
ULONG dwTransfered;
|
||||
USHORT wAttribute;
|
||||
ULONG nLength;
|
||||
COORD dwCoord;
|
||||
ULONG dwTransfered;
|
||||
} OUTPUT_ATTRIBUTE, *POUTPUT_ATTRIBUTE;
|
||||
|
||||
|
||||
typedef struct tagOUTPUT_CHARACTER
|
||||
{
|
||||
CHAR cCharacter;
|
||||
ULONG nLength;
|
||||
COORD dwCoord;
|
||||
ULONG dwTransfered;
|
||||
CHAR cCharacter;
|
||||
ULONG nLength;
|
||||
COORD dwCoord;
|
||||
ULONG dwTransfered;
|
||||
} OUTPUT_CHARACTER, *POUTPUT_CHARACTER;
|
||||
|
||||
|
||||
typedef struct tagCONSOLE_DRAW
|
||||
{
|
||||
ULONG X; /* Origin */
|
||||
ULONG Y;
|
||||
ULONG SizeX; /* Size of the screen buffer (chars) */
|
||||
ULONG SizeY;
|
||||
ULONG CursorX; /* New cursor position (screen-relative) */
|
||||
ULONG CursorY;
|
||||
/* Followed by screen buffer in char/attrib format */
|
||||
ULONG X; /* Origin */
|
||||
ULONG Y;
|
||||
ULONG SizeX; /* Size of the screen buffer (chars) */
|
||||
ULONG SizeY;
|
||||
ULONG CursorX; /* New cursor position (screen-relative) */
|
||||
ULONG CursorY;
|
||||
/* Followed by screen buffer in char/attrib format */
|
||||
} CONSOLE_DRAW, *PCONSOLE_DRAW;
|
||||
|
||||
|
||||
#endif /* _NTDDBLUE_H_INCLUDED_ */
|
||||
|
|
Loading…
Reference in a new issue