72 lines
1.8 KiB
C
72 lines
1.8 KiB
C
#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
|
|
// <ntlite/ddi/display.h>.
|
|
|
|
#include <stdint.h>
|
|
|
|
#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;
|
|
|
|
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
|