// Public NTLite display ABI declarations shared between kernel, drivers, and user mode. #pragma once // display.h - user/kernel shared display ABI types // This header is safe for user-mode code. It contains only plain syscall ABI // data types and capability bits. Kernel/driver provider interfaces live in // . #include #ifdef __cplusplus extern "C" { #endif typedef enum DISPLAY_PIXEL_FORMAT { DisplayPixelFormatUnknown = 0, DisplayPixelFormatX8R8G8B8 = 1, } DISPLAY_PIXEL_FORMAT; typedef struct DISPLAY_MODE { uint32_t Width; uint32_t Height; uint32_t Stride; // pixels per scanline DISPLAY_PIXEL_FORMAT Format; } DISPLAY_MODE; typedef struct DISPLAY_RECT { int32_t X; int32_t Y; int32_t W; int32_t H; } DISPLAY_RECT; #define SYS_SURFACE_FORMAT_XRGB8888 1u #define SYS_SURFACE_FLAG_NONE 0u #define SYS_SURFACE_MAX_RECTS 64u typedef struct SYS_SURFACE_DESC { uint32_t Width; uint32_t Height; uint32_t PitchBytes; uint32_t Format; void* Base; uint64_t PayloadBytes; uint64_t PageCount; uint64_t MapCount; uint64_t PresentCount; uint64_t PresentRectCount; uint64_t PresentClippedRectCount; uint64_t PresentEmptyClipCount; uint64_t PresentRowsCopied; uint64_t PresentBytesCopied; } SYS_SURFACE_DESC; typedef struct SYS_SURFACE_STATS { uint64_t CreatedSurfaces; uint64_t DestroyedSurfaces; uint64_t LiveSurfaces; uint64_t LivePages; uint64_t LiveBytes; uint64_t MapCalls; uint64_t PresentCalls; uint64_t PresentRectInputs; uint64_t PresentClippedRects; uint64_t PresentEmptyClips; uint64_t PresentRowsCopied; uint64_t PresentBytesCopied; } SYS_SURFACE_STATS; typedef struct DISPLAY_STATS { uint64_t BlitCount; uint64_t FillRectCount; uint64_t CopyRectCount; uint64_t ReadRectCount; uint64_t PresentCount; uint64_t PresentRectCount; uint64_t DirtyRectCount; uint64_t DirtyAllCount; uint64_t BytesCopied; uint64_t SyncCount; uint64_t CursorMoveCount; uint64_t CursorShowCount; uint64_t CursorHideCount; } DISPLAY_STATS; #define DISPLAY_CAP_FRAMEBUFFER 0x00000001u #define DISPLAY_CAP_SOFTWARE_CURSOR 0x00000002u #define DISPLAY_CAP_HARDWARE_CURSOR 0x00000004u #define DISPLAY_CAP_ACCEL_FILL 0x00000008u #define DISPLAY_CAP_ACCEL_COPY 0x00000010u #define DISPLAY_CAP_PRESENT_SYNC 0x00000020u #define DISPLAY_CAP_VBLANK 0x00000040u #define DISPLAY_CAP_3D 0x00000080u #define SYS_DISPLAY_NAME_MAX 32u typedef struct SYS_DISPLAY_INFO { char PrimaryName[SYS_DISPLAY_NAME_MAX]; DISPLAY_MODE Mode; uint32_t Caps; uint32_t DeviceCount; DISPLAY_STATS ManagerStats; DISPLAY_STATS DeviceStats; } SYS_DISPLAY_INFO; #ifdef __cplusplus } #endif