📄 ntddvdeo.h
字号:
} VIDEO_COLOR_CAPABILITIES, *PVIDEO_COLOR_CAPABILITIES;
//
// Flag Bit definitions
//
#define VIDEO_DEVICE_COLOR 0x1 // Is this device support color (1)
// or monochrome only
#define VIDEO_OPTIONAL_GAMMET_TABLE 0x2 // Indicates that a gammet table can
// be queried/set for the device
// use other IOCTLs for that purpose.
//
//Length - Length of the basic structure. Used for versioning by checking the
// Length of the struct is at least as large as the value given by sizeof().
//
//AttributesFlag - List of falgs determining some of the properties of the
// device.
//
//See the VDDP documentation for the details on the various fields
//
//RedPhosphoreDecay
//GreenPhosphoreDecay
//BluePhosphoreDecay -
//
//WhiteChromaticity_x
//WhiteChromaticity_y
//WhiteChromaticity_Y -
//
//RedChromaticity_x
//RedChromaticity_y
//GreenChromaticity_x
//GreenChromaticity_y
//BlueChromaticity_x
//BlueChromaticity_y -
//
//WhiteGamma -
//
//RedGamma
//GreenGamma
//BlueGamma -
//
//All values returned in this structure are integers.
//The values returned must be floating point values * 10,000; i.e:
//a gamma of 2.34 would be returned as 23400.
//
//
// IOCTL_VIDEO_SET_POWER_MANAGEMENT - Tells the device to change the power
// consumption level of the device to the
// new state.
// IOCTL_VIDEO_GET_POWER_MANAGEMENT - Return the current power consumption
// level of the device.
//
// Private IOCTLs intercepted by the video port:
//
// IOCTL_VIDEO_SET_OUTPUT_DEVICE_POWER_STATE - Sets the power state on the
// output device
//
// IOCTL_VIDEO_GET_OUTPUT_DEVICE_POWER_STATE - Returns if it is possible to set
// this partcular power state on the
// output device (monitor, TV).
//
// NOTE:
// This IOCTL is based on the VESA DPMS proposal.
// Changes to the DPMS standard will be refelcted in this IOCTL.
//
typedef enum _VIDEO_POWER_STATE {
VideoPowerUnspecified = 0,
VideoPowerOn = 1,
VideoPowerStandBy,
VideoPowerSuspend,
VideoPowerOff,
VideoPowerHibernate,
VideoPowerShutdown,
VideoPowerMaximum
} VIDEO_POWER_STATE, *PVIDEO_POWER_STATE;
typedef struct _VIDEO_POWER_MANAGEMENT {
ULONG Length;
ULONG DPMSVersion;
ULONG PowerState;
} VIDEO_POWER_MANAGEMENT, *PVIDEO_POWER_MANAGEMENT;
//
//Length - Length of the structure in bytes. Also used to do verisioning.
//
//DPMSVersion - Version of the DPMS standard supported by the device.
// Only used in the "GET" IOCTL.
//
//PowerState - One of the power states listed in VIDEO_POWER_STATE.
//
//
// Note:
// Once the power has been turned off to the device, all other IOCTLs made
// to the miniport will be intercepted by the port driver and will return
// failiure, until the power on the device has been turned back on.
//
//
// IOCTL_VIDEO_SET_COLOR_LUT_DATA - Confugure color look up table on video adaptor.
//
typedef struct _VIDEO_COLOR_LUT_DATA {
ULONG Length;
ULONG LutDataFormat;
UCHAR LutData[1];
} VIDEO_COLOR_LUT_DATA, *PVIDEO_COLOR_LUT_DATA;
//
// Length - Length of the structure in bytes.
//
// LutDataFormat values - indicate data format in ColorLutTable.
//
// LutDataTable - color lut table data.
//
#define VIDEO_COLOR_LUT_DATA_FORMAT_RGB256WORDS 0x00000001
typedef struct _VIDEO_LUT_RGB256WORDS {
USHORT Red[256];
USHORT Green[256];
USHORT Blue[256];
} VIDEO_LUT_RGB256WORDS, *PVIDEO_LUT_RGB256WORDS;
#define VIDEO_COLOR_LUT_DATA_FORMAT_PRIVATEFORMAT 0x80000000
//
// VIDEO_COLOR_LUT_DATA_FORMAT_RGB256WORDS -
// Lut data has 3 array of 256 WORDs. 1st 256 WORDs array for Red, next
// for Blue, then Green. And its value have to be packed in the most
// significant bits of the WORDs (0 to 0xFF00 for 8 bit). This allows
// for 8, 12 and 16 bit RAMDAC independance. Thus Driver can shifts them
// right by 8, 4 or 0 places for 8, 12 and 16 bits RAMDAC.
//
// VIDEO_COLOR_LUT_DATA_FORMAT_PRIVATEFORMAT -
// Driver defined format. This value should be OR-ed with other driver
// internal identify index in 0 - 30 bits. Callee should know the detail
// format.
//
//
// BANK_POSITION
//
typedef struct _BANK_POSITION
{
ULONG ReadBankPosition;
ULONG WriteBankPosition;
} BANK_POSITION, *PBANK_POSITION;
//
// IOCTL_VIDEO_QUERY_SUPPORTED_BRIGHTNESS - Queries via _BCL the available backlight
// levels.
// IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS - Queries the current AC/DC backlight levels
// and indicates the current power state per
// ucDisplayPolicy.
// IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS - Sets via _BCM the AC/DC brightness of the
// backlight for the power states indicated
// in ucDisplayPolicy.
//
typedef struct _DISPLAY_BRIGHTNESS {
UCHAR ucDisplayPolicy;
UCHAR ucACBrightness;
UCHAR ucDCBrightness;
} DISPLAY_BRIGHTNESS, *PDISPLAY_BRIGHTNESS;
#define DISPLAYPOLICY_AC 0x00000001
#define DISPLAYPOLICY_DC 0x00000002
#define DISPLAYPOLICY_BOTH (DISPLAYPOLICY_AC | DISPLAYPOLICY_DC)
//+----------------------------------------------------------------------------
//
// Far East fullscreen support
//
//-----------------------------------------------------------------------------
#ifndef _WINCON_
typedef struct _COORD {
SHORT X;
SHORT Y;
} COORD, *PCOORD;
typedef struct _CHAR_INFO {
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} Char;
USHORT Attributes;
} CHAR_INFO, *PCHAR_INFO;
//
// Attributes flags:
//
#define FOREGROUND_BLUE 0x0001 // text color contains blue.
#define FOREGROUND_GREEN 0x0002 // text color contains green.
#define FOREGROUND_RED 0x0004 // text color contains red.
#define FOREGROUND_INTENSITY 0x0008 // text color is intensified.
#define BACKGROUND_BLUE 0x0010 // background color contains blue.
#define BACKGROUND_GREEN 0x0020 // background color contains green.
#define BACKGROUND_RED 0x0040 // background color contains red.
#define BACKGROUND_INTENSITY 0x0080 // background color is intensified.
#define COMMON_LVB_LEADING_BYTE 0x0100 // Leading Byte of DBCS
#define COMMON_LVB_TRAILING_BYTE 0x0200 // Trailing Byte of DBCS
#define COMMON_LVB_GRID_HORIZONTAL 0x0400 // DBCS: Grid attribute: top horizontal.
#define COMMON_LVB_GRID_LVERTICAL 0x0800 // DBCS: Grid attribute: left vertical.
#define COMMON_LVB_GRID_RVERTICAL 0x1000 // DBCS: Grid attribute: right vertical.
#define COMMON_LVB_REVERSE_VIDEO 0x4000 // DBCS: Reverse fore/back ground attribute.
#define COMMON_LVB_UNDERSCORE 0x8000 // DBCS: Underscore.
#define COMMON_LVB_SBCSDBCS 0x0300 // SBCS or DBCS flag.
//
// Share of conapi.h
//
#define CHAR_TYPE_SBCS 0 // Displayed SBCS character
#define CHAR_TYPE_LEADING 2 // Displayed leading byte of DBCS
#define CHAR_TYPE_TRAILING 3 // Displayed trailing byte of DBCS
//
// Share of foncache.h
//
#define BITMAP_BITS_BYTE_ALIGN 8 // BYTE align is 8 bit
#define BITMAP_BITS_WORD_ALIGN 16 // WORD align is 16 bit
#define BITMAP_ARRAY_BYTE 3 // BYTE array is 8 bit (shift count = 3)
#define BITMAP_PLANES 1
#define BITMAP_BITS_PIXEL 1
#define BYTE_ALIGN sizeof(UCHAR)
#define WORD_ALIGN sizeof(USHORT)
#endif // _WINCON_
typedef struct _FSCNTL_SCREEN_INFO {
COORD Position;
COORD ScreenSize;
ULONG nNumberOfChars;
} FSCNTL_SCREEN_INFO, *PFSCNTL_SCREEN_INFO;
typedef struct _FONT_IMAGE_INFO {
COORD FontSize;
PUCHAR ImageBits; // WORD aligned.
} FONT_IMAGE_INFO, *PFONT_IMAGE_INFO;
typedef struct _CHAR_IMAGE_INFO {
CHAR_INFO CharInfo;
FONT_IMAGE_INFO FontImageInfo;
} CHAR_IMAGE_INFO, *PCHAR_IMAGE_INFO;
//
// Share of consrv.h
//
#define SCREEN_BUFFER_POINTER(X,Y,XSIZE,CELLSIZE) (((XSIZE * (Y)) + (X)) * (ULONG)CELLSIZE)
typedef struct _VGA_CHAR {
CHAR Char;
CHAR Attributes;
} VGA_CHAR, *PVGA_CHAR;
//
// Define the Full Screen Video device name strings.
//
#define DD_FULLSCREEN_VIDEO_DEVICE_NAME L"\\Device\\FSVideo"
//
// IOCTL_FSVIDEO_COPY_FRAME_BUFFER - Copy in the frame buffer.
//
typedef struct _FSVIDEO_COPY_FRAME_BUFFER {
FSCNTL_SCREEN_INFO SrcScreen;
FSCNTL_SCREEN_INFO DestScreen;
} FSVIDEO_COPY_FRAME_BUFFER, *PFSVIDEO_COPY_FRAME_BUFFER;
//
// IOCTL_FSVIDEO_WRITE_TO_FRAME_BUFFER - Write to the frame buffer.
//
typedef struct _FSVIDEO_WRITE_TO_FRAME_BUFFER {
PCHAR_IMAGE_INFO SrcBuffer;
FSCNTL_SCREEN_INFO DestScreen;
} FSVIDEO_WRITE_TO_FRAME_BUFFER, *PFSVIDEO_WRITE_TO_FRAME_BUFFER;
//
// IOCTL_FSVIDEO_REVERSE_MOUSE_POINTER - Reverse to the frame buffer for mouse pointer.
//
// dwType as follows:
// CHAR_TYPE_SBCS 0 // Displayed SBCS character
// CHAR_TYPE_LEADING 2 // Displayed leading byte of DBCS
// CHAR_TYPE_TRAILING 3 // Displayed trailing byte of DBCS
//
typedef struct _FSVIDEO_REVERSE_MOUSE_POINTER {
FSCNTL_SCREEN_INFO Screen;
ULONG dwType;
} FSVIDEO_REVERSE_MOUSE_POINTER, *PFSVIDEO_REVERSE_MOUSE_POINTER;
//
// IOCTL_FSVIDEO_SET_CURRENT_MODE - Set the information for the current
// video mode.
//
// Information used by this function is passed using the following structure:
//
typedef struct _FSVIDEO_MODE_INFORMATION {
VIDEO_MODE_INFORMATION VideoMode;
VIDEO_MEMORY_INFORMATION VideoMemory;
} FSVIDEO_MODE_INFORMATION, *PFSVIDEO_MODE_INFORMATION;
//
// IOCTL_FSVIDEO_SET_SCREEN_INFORMATION - Set the information for current console screen
//
typedef struct _FSVIDEO_SCREEN_INFORMATION {
COORD ScreenSize;
COORD FontSize;
} FSVIDEO_SCREEN_INFORMATION, *PFSVIDEO_SCREEN_INFORMATION;
//
// IOCTL_FSVIDEO_SET_CURSOR_POSITION - Set the information for cursor position
//
// dwType as follows:
// CHAR_TYPE_SBCS 0 // Displayed SBCS character
// CHAR_TYPE_LEADING 2 // Displayed leading byte of DBCS
// CHAR_TYPE_TRAILING 3 // Displayed trailing byte of DBCS
//
typedef struct _FSVIDEO_CURSOR_POSITION {
VIDEO_CURSOR_POSITION Coord;
ULONG dwType;
} FSVIDEO_CURSOR_POSITION, *PFSVIDEO_CURSOR_POSITION;
#ifdef __cplusplus
}
#endif
#endif // _NTDDVDEO_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -