Files
nt-lite/code/common/include/ntlite/internal/session_control.h
T

54 lines
1.5 KiB
C

// Private RSSRV-to-DWM Session 0 routing protocol. Capability possession, not path publication, grants access.
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <ntlite/input.h>
#include <ntlite/status.h>
#define NTL_SESSION_DWM_PROTOCOL_VERSION 2u
#define NTL_SESSION_DWM_FLAG_NONE 0x00000000u
#define NTL_SESSION_DWM_OP_SET_KEYBOARD_FOCUS 1u
#define NTL_SESSION_DWM_OP_SET_POINTER_FOCUS 2u
#define NTL_SESSION_DWM_OP_SET_POINTER_CAPTURE 3u
#define NTL_SESSION_DWM_EVENT_OBSERVE_KEY 1u
#define NTL_SESSION_DWM_EVENT_OBSERVE_MOUSE 2u
#define NTL_SESSION_DWM_EVENT_DELIVER_KEY 3u
#define NTL_SESSION_DWM_EVENT_DELIVER_MOUSE 4u
typedef struct NTL_SESSION_DWM_REQUEST {
uint32_t Size;
uint32_t Version;
uint32_t Operation;
uint32_t Flags;
bool Enabled;
uint32_t Reserved[3];
} NTL_SESSION_DWM_REQUEST;
typedef struct NTL_SESSION_DWM_REPLY {
uint32_t Size;
uint32_t Version;
uint32_t Operation;
uint32_t Flags;
KSTATUS Status;
uint32_t Reserved[3];
} NTL_SESSION_DWM_REPLY;
typedef struct NTL_SESSION_DWM_EVENT {
uint32_t Size;
uint32_t Version;
uint32_t Type;
uint32_t Flags;
int32_t PointerX;
int32_t PointerY;
INPUT_KEY_RECORD Key;
INPUT_MOUSE_EVENT Mouse;
} NTL_SESSION_DWM_EVENT;
// RSSRV and DWM must agree on the private session-control payload.
_Static_assert(sizeof(NTL_SESSION_DWM_REQUEST) == 32u, "NTL_SESSION_DWM_REQUEST size changed");
_Static_assert(offsetof(NTL_SESSION_DWM_REQUEST, Enabled) == 16u, "NTL_SESSION_DWM_REQUEST Enabled offset changed");