📄 ntddvdeo.h
字号:
//
// IOCTL_VIDEO_QUERY_AVAIL_MODES - Returns information about each available
// mode on the controller.
//
// IOCTL_VIDEO_QUERY_CURRENT_MODE - Returns the information for the current
// controller mode.
//
// Information used by this function is passed using the following structure:
//
// NOTE This structure is matched exactly with the DISP_MODE structure
// in winddi.h - every change to this structure MUST be made to the
// structure in winddi.h.
//
typedef struct _VIDEO_MODE_INFORMATION {
ULONG Length;
ULONG ModeIndex;
ULONG VisScreenWidth;
ULONG VisScreenHeight;
ULONG ScreenStride;
ULONG NumberOfPlanes;
ULONG BitsPerPlane;
ULONG Frequency;
ULONG XMillimeter;
ULONG YMillimeter;
ULONG NumberRedBits;
ULONG NumberGreenBits;
ULONG NumberBlueBits;
ULONG RedMask;
ULONG GreenMask;
ULONG BlueMask;
ULONG AttributeFlags;
ULONG VideoMemoryBitmapWidth;
ULONG VideoMemoryBitmapHeight;
ULONG DriverSpecificAttributeFlags;
} VIDEO_MODE_INFORMATION, *PVIDEO_MODE_INFORMATION;
//
// Bit definitions for Attribute Flags
//
#define VIDEO_MODE_COLOR 0x0001 // 0 = Mono-compatible, 1 = Color
#define VIDEO_MODE_GRAPHICS 0x0002 // 0 = Text mode, 1 = Graphics
#define VIDEO_MODE_PALETTE_DRIVEN 0x0004 // 0 = Colors are direct
// 1 = Colors are index to a palette
#define VIDEO_MODE_MANAGED_PALETTE 0x0008 // 0 = Palette is fixed (must be
// queried from miniport
// 1 = Palette is settable.
#define VIDEO_MODE_INTERLACED 0x0010 // 1 = Mode is interlaced
// 0 = non-interlaced
#define VIDEO_MODE_NO_OFF_SCREEN 0x0020 // 1 = Offscreen memory CAN NOT be
// used to store information.
// 0 = Offscreen memory is available
#define VIDEO_MODE_NO_64_BIT_ACCESS 0x0040 // 1 = 64 bit memory writes to frame
// buffer are not handled properly.
// 0 = 64 bit memory writes to frame
// buffer are handled properly.
#define VIDEO_MODE_BANKED 0x0080 // 0 = undefined
// 1 = this is a banked mode
#define VIDEO_MODE_LINEAR 0x0100 // 0 = undefined
// 1 = this is a linear mode
//
//Length - Length of the structure in bytes. Also used to do verisioning.
//
//ModeIndex - Number used to set this mode when calling the miniport driver.
//
//VisScreenWidth - Number of visible horizontal pixels on a scan line
//
//VisScreenHeight - Number of visible lines (or scan lines)
//
//ScreenStride - Delta, in *BYTES*, between the start of two scan lines.
//
// NOTE: the width and height are in pixels, but the stride is in bytes !!!
//
//NumberOfPlanes - Number of separate planes combined by the device.
//
//BitsPerPlane - Number of bits per pixel on a plane.
//
//Frequency - Screen Frequency, in Hertz.
//
//XMillimeter - Size of the horizontal active region on the output device,
// in millimeters.
//
//YMillimeter - Size of the vertical active region on the output device,
// in millimeters.
//
//NumberRedBits - Number of bits in the red DAC.
//
//NumberGreenBits - Number of bits in the green DAC.
//
//NumberBlueBits - Number of bits in the blue DAC.
//
//RedMask - Red color Mask for device with direct color modes. Bits turned
// on indicate the bit is of color Red.
//
//GreenMask - Green color Mask for device with direct color modes. Bits
// turned on indicate the bit is of color Green.
//
//BlueMask - Blue color Mask for device with direct color modes. Bits
// turned on indicate the bit is of color Blue.
//
//AttributeFlags. Flags indicating certain behavior for the device.
//
//VideoMemoryBitmapWidth - Width of the video memory bitmap.
// VisScreenWidth <= VideoMemoryBitmapWidth <= ScreenStride
//
//VideoMemoryBitmapHeight - Height of the video memory bitmap.
// VisScreenHeight <= VideoMemoryBitmapHeight = VideoRamLength / ScreenStride
//
//DriverSpecificAttributeFlags - Flags indicating certain behavior for the
// device that are private to the miniport\display driver.
//
//
// IOCTL_VIDEO_LOAD_AND_SET_FONT - Is used to load a user-defined font.
//
// Information used by this function is passed using the following structure:
//
typedef struct _VIDEO_LOAD_FONT_INFORMATION {
USHORT WidthInPixels;
USHORT HeightInPixels;
ULONG FontSize;
UCHAR Font[1];
} VIDEO_LOAD_FONT_INFORMATION, *PVIDEO_LOAD_FONT_INFORMATION;
//
//WidthInPixels - Width of the characters in the font, in pixels.
//
//HeigthInPixels - Heigth of the characters in the font, in pixels.
//
//FontSize - Size of the font buffer being passed in, in bytes.
//
//Font - Start of the font buffer.
//
//
// IOCTL_VIDEO_SET_PALETTE_REGISTERS - Takes buffer containing
// VIDEO_PALETTE_DATA where Colors[]
// specifies the array containing the
// color values for the palette registers.
//
// Information used by this function is passed using the following structure:
//
// NOTE: This should only be used by the VGA type drivers
//
typedef struct _VIDEO_PALETTE_DATA {
USHORT NumEntries;
USHORT FirstEntry;
USHORT Colors[1];
} VIDEO_PALETTE_DATA, *PVIDEO_PALETTE_DATA;
//
//NumEntries - Number of entries in the array of color values.
//
//FirstEntry - Location in the device palette to which the first entry in the
// list of colors should be copied to. The other entries in the color list
// should be copied sequentially, from this starting point into the device's
// palette.
//
//Colors - Array of color entries to copy into the device's color palette.
//
//
// IOCTL_VIDEO_SET_COLOR_REGISTERS - Takes buffer containing VIDEO_CLUT.
//
// Information used by this function is passed using the following structure:
//
typedef struct _VIDEO_CLUTDATA {
UCHAR Red;
UCHAR Green;
UCHAR Blue;
UCHAR Unused;
} VIDEO_CLUTDATA, *PVIDEO_CLUTDATA;
//
//Red - Bits to be put in the Red portion of the color registers.
//
//Green - Bits to be put in the Green portion of the color registers.
//
//Blue - Bits to be put in the Blue portion of the color registers.
//
typedef struct {
USHORT NumEntries;
USHORT FirstEntry;
union {
VIDEO_CLUTDATA RgbArray;
ULONG RgbLong;
} LookupTable[1];
} VIDEO_CLUT, *PVIDEO_CLUT;
//
//NumEntries - Number of entries in the LookupTable of color values.
//
//FirstEntry - Location in the device palette to which the first entry in the
// LookupTable of colors should be copied to. The other entries in the
// LookupTable should be copied sequentially, from this starting point into
// the device's palette.
//
//LookupTable - Array of color entries to copy into the device's color
// registers/palette. The color entries can be accessed as a genric 32 bit
// value or as Red/Green/Blue/Unused fields.
//
//
// NOTE: Cursor vs. Pointer:
// A cursor is a rectangular set of pixels which are used to indicate the
// location of input coming from the keyboard.
//
// A pointer is the set of pixels that are used to paint the shape
// associated with the mouse.
//
//
// IOCTL_VIDEO_QUERY_CURSOR_POSITION - Returns the location of the cursor on
// the screen.
//
// IOCTL_VIDEO_SET_CURSOR_POSITION - Is used to set the location of the
// cursor on the screen.
//
// Information used by this function is passed using the following structure:
//
typedef struct _VIDEO_CURSOR_POSITION {
SHORT Column;
SHORT Row;
} VIDEO_CURSOR_POSITION, *PVIDEO_CURSOR_POSITION;
//
//Column - Column on which the cursor is located from the top left, in pixels.
//
//Row - Row on which the cusor is located from the top left, in pixels.
//
//
// IOCTL_VIDEO_QUERY_CURSOR_ATTR - Returns all attributes of the cursor.
//
// IOCTL_VIDEO_SET_CURSOR_ATTR - Is used to set the attributes of the cursor.
//
// Information used by this function is passed using the following structure:
//
//
// For the VGA:
// TopScanLine will be stored in the height when an IOCTL is made
// BottomScanLine will be stored in the width when an IOCTL is made
//
typedef struct _VIDEO_CURSOR_ATTRIBUTES {
USHORT Width;
USHORT Height;
SHORT Column;
SHORT Row;
UCHAR Rate;
UCHAR Enable;
} VIDEO_CURSOR_ATTRIBUTES, *PVIDEO_CURSOR_ATTRIBUTES;
//
//Width - Width of the cursor, in pixels.
//
//Height - Height of the cursor, in scans.
//
//Column - Column on which the cursor is located from the top left, in pixels.
//
//Row - Row on which the cusor is located from the top left, in pixels.
//
//Rate - Rate at which the cursor whould flash.
//
//Enable - Non-zero to display cursor, 0 not to display.
//
//
// IOCTL_VIDEO_QUERY_POINTER_POSITION - Returns the location of the pointer
// on the screen
//
// IOCTL_VIDEO_SET_POINTER_POSITION - Is used to set the location of the
// pointer on the screen.
//
// Information used by this function is passed using the following structure:
//
typedef struct _VIDEO_POINTER_POSITION {
SHORT Column;
SHORT Row;
} VIDEO_POINTER_POSITION, *PVIDEO_POINTER_POSITION;
//
//Column - Column on which the cursor is located from the top left, in pixels.
//
//Row - Row on which the cusor is located from the top left, in pixels.
//
//
// IOCTL_VIDEO_QUERY_POINTER_ATTR - Returns all attributes of the pointer.
//
// IOCTL_VIDEO_SET_POINTER_ATTR - Is used to set the attributes of the
// pointer.
//
// Information used by this function is passed using the following structure:
//
typedef struct _VIDEO_POINTER_ATTRIBUTES {
ULONG Flags;
ULONG Width;
ULONG Height;
ULONG WidthInBytes;
ULONG Enable;
SHORT Column;
SHORT Row;
UCHAR Pixels[1];
} VIDEO_POINTER_ATTRIBUTES, *PVIDEO_POINTER_ATTRIBUTES;
//
//Flags - color or mono pointer, same as for query pointer capabilities.
//
//Width - Width of the pointer, in pixels.
//
//Height - Height of the pointer, in scans.
//
//WidthInBytes - Width of the pointer, in bytes.
//
//Enable - Non-zero to display pointer, 0 not to display.
//
//Column - Column on which the cursor is located from the top left, in pixels.
//
//Row - Row on which the cusor is located from the top left, in pixels.
//
//Pixels - Start of pointer data, in device-compatible DIB format.
// (Mask data is always in 1-bpp DIB format.)
//
//
// IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES - Returns capabilities of miniport
// hardware cursor
//
typedef struct _VIDEO_POINTER_CAPABILITIES {
ULONG Flags;
ULONG MaxWidth;
ULONG MaxHeight;
ULONG HWPtrBitmapStart;
ULONG HWPtrBitmapEnd;
} VIDEO_POINTER_CAPABILITIES, *PVIDEO_POINTER_CAPABILITIES;
//
// Flag bit definitions
//
#define VIDEO_MODE_ASYNC_POINTER 0x01 // 1 if the cursor can be updated
// asynchronously to drawing operations.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -