23 lines
609 B
C++
23 lines
609 B
C++
/*
|
|
* InputEvents.hpp
|
|
* Shared input activity event source
|
|
* Copyright (c) 2026 Daniel Hammer
|
|
*/
|
|
|
|
#pragma once
|
|
#include <cstdint>
|
|
|
|
namespace Drivers::InputEvents {
|
|
|
|
// Monotonic serial incremented after mouse or keyboard state changes.
|
|
uint64_t GetSerial();
|
|
|
|
// Notify latency-sensitive input activity and wake input waiters.
|
|
void NotifyActivity();
|
|
|
|
// Wait until the serial differs from observedSerial or timeoutMs elapses.
|
|
// timeoutMs == 0 is a poll; timeoutMs == UINT64_MAX waits indefinitely.
|
|
uint64_t WaitForChange(uint64_t observedSerial, uint64_t timeoutMs);
|
|
|
|
}
|