// Public NTLite display ABI declarations shared between kernel, drivers, and user mode. #pragma once // display.h - display device DDI // Display providers register DISPLAY_DEVICE objects with the kernel display // manager. The boot framebuffer backend is registered by the kernel itself; // PCI/virtual GPU drivers register additional providers later. #include #include #include #include #ifndef DISPLAY_API #define DISPLAY_API __declspec(dllimport) #endif #include typedef struct DISPLAY_DEVICE DISPLAY_DEVICE; typedef struct DISPLAY_DEVICE_OPS { KSTATUS (*GetMode)(DISPLAY_DEVICE* device, DISPLAY_MODE* outMode); KSTATUS (*Blit)(DISPLAY_DEVICE* device, int32_t x, int32_t y, int32_t w, int32_t h, const uint32_t* pixels, uint32_t pitchBytes); KSTATUS (*PresentPitched)(DISPLAY_DEVICE* device, int32_t x, int32_t y, int32_t w, int32_t h, const uint32_t* pixels, uint32_t pitchBytes); KSTATUS (*FillRect)(DISPLAY_DEVICE* device, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color); KSTATUS (*CopyRect)(DISPLAY_DEVICE* device, int32_t dstX, int32_t dstY, int32_t srcX, int32_t srcY, int32_t w, int32_t h); KSTATUS (*ReadRect)(DISPLAY_DEVICE* device, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t* outPixels, uint32_t outStride); KSTATUS (*Present)(DISPLAY_DEVICE* device, const DISPLAY_RECT* rects, size_t rectCount); KSTATUS (*Sync)(DISPLAY_DEVICE* device); KSTATUS (*SetCursorImage)(DISPLAY_DEVICE* device, int32_t width, int32_t height, int32_t hotX, int32_t hotY, const uint32_t* argbPixels); KSTATUS (*SetCursorPosition)(DISPLAY_DEVICE* device, int32_t x, int32_t y); KSTATUS (*ShowCursor)(DISPLAY_DEVICE* device, bool show); KSTATUS (*QueryStats)(DISPLAY_DEVICE* device, DISPLAY_STATS* outStats); } DISPLAY_DEVICE_OPS; struct DISPLAY_DEVICE { const char* Name; uint32_t Caps; void* DriverContext; const DISPLAY_DEVICE_OPS* Ops; DISPLAY_DEVICE* Next; }; DISPLAY_API KSTATUS KeDisplayRegisterDevice(DISPLAY_DEVICE* device); DISPLAY_API KSTATUS KeDisplayUnregisterDevice(DISPLAY_DEVICE* device); DISPLAY_API KSTATUS KeDisplaySetPrimary(DISPLAY_DEVICE* device); DISPLAY_API void KeDisplayNotifyFrame(DISPLAY_DEVICE* device);