35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
/*******************************************************************************
|
|
* StellarX routed keyboard event contract.
|
|
* Stage 3 defines the public control seam and internal bubbling contract.
|
|
* Production routing uses this contract after the slice-6 atomic cutover.
|
|
******************************************************************************/
|
|
#pragma once
|
|
|
|
#include "InputEvents.h"
|
|
#include "CoreTypes.h"
|
|
|
|
namespace StellarX
|
|
{
|
|
// A normalized key plus the stable identities used while it bubbles through
|
|
// the focus path. The router updates currentTarget before each control call;
|
|
// controls must not retain either identity as a raw pointer.
|
|
struct RoutedKeyEvent
|
|
{
|
|
std::uint64_t sequence = 0;
|
|
DWORD messageTime = 0;
|
|
HWND hwnd = nullptr;
|
|
KeyEvent key{};
|
|
FocusTargetId originalTarget{};
|
|
FocusTargetId currentTarget{};
|
|
};
|
|
|
|
// Stopping the control bubble and suppressing a later framework default are
|
|
// independent decisions. Neither result can change the completed WndProc
|
|
// return value.
|
|
struct KeyRouteResult
|
|
{
|
|
bool stopBubble = false;
|
|
bool preventFrameworkDefault = false;
|
|
};
|
|
}
|