64 lines
2.6 KiB
C
64 lines
2.6 KiB
C
// Public nt-lite DDK display-miniport declarations.
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <ntlite/status.h>
|
|
#include <ntlite/ddi/display.h>
|
|
|
|
typedef struct KE_CONSOLE_INFO {
|
|
uint32_t Columns;
|
|
uint32_t Rows;
|
|
uint32_t CursorX;
|
|
uint32_t CursorY;
|
|
uint16_t Attribute;
|
|
} KE_CONSOLE_INFO;
|
|
|
|
typedef struct KE_DISPLAY_INFO {
|
|
char PrimaryName[32];
|
|
DISPLAY_MODE Mode;
|
|
uint32_t Caps;
|
|
uint32_t DeviceCount;
|
|
uint32_t Flags;
|
|
uint32_t Reserved;
|
|
DISPLAY_STATS ManagerStats;
|
|
DISPLAY_STATS DeviceStats;
|
|
} KE_DISPLAY_INFO;
|
|
|
|
// Registers a display miniport device with the kernel display manager.
|
|
DISPLAY_API KSTATUS KeDisplayRegisterDevice(DISPLAY_DEVICE* device);
|
|
|
|
// Sets the primary display device.
|
|
DISPLAY_API KSTATUS KeDisplaySetPrimary(DISPLAY_DEVICE* device);
|
|
|
|
// Suspends or resumes fallback console drawing.
|
|
DISPLAY_API void KeDisplaySuspendConsole(bool suspend);
|
|
|
|
// Queries the current display mode.
|
|
DISPLAY_API KSTATUS KeDisplayGetMode(DISPLAY_MODE* outMode);
|
|
|
|
// Queries the current display size.
|
|
DISPLAY_API KSTATUS KeDisplayGetSize(int* outWidth, int* outHeight);
|
|
|
|
DISPLAY_API KSTATUS KeDisplayBlit(int x, int y, int w, int h, const uint32_t* pixels);
|
|
DISPLAY_API KSTATUS KeDisplayBlitPitched(int x, int y, int w, int h, const uint32_t* pixels, uint32_t pitchBytes);
|
|
DISPLAY_API KSTATUS KeDisplayPresentPitched(int x, int y, int w, int h, const uint32_t* pixels, uint32_t pitchBytes);
|
|
DISPLAY_API KSTATUS KeDisplayFillRect(int x, int y, int w, int h, uint32_t color);
|
|
DISPLAY_API KSTATUS KeDisplayClear(uint32_t color);
|
|
DISPLAY_API KSTATUS KeDisplayCopyRect(int dstX, int dstY, int srcX, int srcY, int w, int h);
|
|
DISPLAY_API KSTATUS KeDisplayScroll(int lines);
|
|
DISPLAY_API KSTATUS KeDisplayPutChar(char c, int x, int y, uint32_t fg, uint32_t bg);
|
|
DISPLAY_API KSTATUS KeDisplayPrintChar(char c, uint32_t fg, uint32_t bg);
|
|
DISPLAY_API KSTATUS KeDisplayGetConsoleInfo(KE_CONSOLE_INFO* outInfo);
|
|
DISPLAY_API KSTATUS KeDisplaySetConsoleCursor(int col, int row);
|
|
DISPLAY_API KSTATUS KeDisplayFillConsoleChars(char c, int col, int row, size_t length, size_t* writtenOut);
|
|
DISPLAY_API KSTATUS KeDisplayFillConsoleAttrs(uint16_t attr, int col, int row, size_t length, size_t* writtenOut);
|
|
DISPLAY_API KSTATUS KeDisplayPresent(const DISPLAY_RECT* rects, size_t rectCount);
|
|
DISPLAY_API KSTATUS KeDisplaySync(void);
|
|
DISPLAY_API KSTATUS KeDisplayQueryInfo(KE_DISPLAY_INFO* outInfo);
|
|
DISPLAY_API KSTATUS KeDisplaySetCursorImage(int width, int height, int hotX, int hotY, const uint32_t* argbPixels);
|
|
DISPLAY_API KSTATUS KeDisplaySetCursorPosition(int x, int y);
|
|
DISPLAY_API KSTATUS KeDisplayShowCursor(bool show);
|