Reference map for native window handles, raw HWND conversion, window
enumeration, matching, foreground tracking, and bounds tracking.
Interactive picking belongs to osd/selection.md.
HWND / IntPtr into IWindowHandle.IWindowHandle is the PoeShared wrapper around a native window.IWindowHandleProvider converts raw handles into wrappers.IWindowListProvider owns live enumeration, ignored windows, blacklists, andIWindowMatcher performs stateless expression matching.IWindowSelector keeps a stateful active target from a match expression.IWindowHandleMatcher and IComplexWindowHandleMatcher are infrastructurePoeShared.Native.IWindowHandle
Handle only when raw IntPtr is required.ProcessId, ProcessName, Title, Bounds, owner/parent/statePoeShared.Native.IWindowHandleProvider
GetByWindowHandle(IntPtr hwnd) converts raw handles.GetMonitorByWindowHandle(IntPtr hwnd) resolves monitor context.IWindowListProvider
AllWindowList, WindowList, IgnoredWindows, BlacklistedWindows.ResolveByHandle(IntPtr), GetForegroundWindow(),RefreshWindowList().IWindowMatcher
IsMatch(...) and FindMatches(...) for WindowMatchExpression.IWindowSelector
TargetWindow, ActiveWindow, MatchingWindowList, OnlyVisible,WindowFilter.WindowSelectorExtensions
FindWindow(...) sets TargetWindow and returns the selectedActiveWindow, or null when no match exists.GetWindow(...) sets TargetWindow and returns the selectedActiveWindow; use it when absence is exceptional.TargetWindow plus ActiveWindow when absence is expected and shouldIWindowMatcher.FindMatches(...) when the code intentionally needsWindowHandleExtensions
Activate(...) brings an IWindowHandle to the foreground.Activate(...) delegates to UnsafeNative.ActivateWindow(...).ToWindowMatchExpressionOrDefault(...) creates a reusable match expressionUnsafeNative.ActivateWindow(...)
IntPtr, IWindowHandle, timeout, and logWindowHandleExtensions.Activate(...) in script/docs examples.IForegroundWindowTracker, IWindowTracker
IWindowBoundsTrackerFactory
Raw handle to wrapper:
IntPtr hwnd.IWindowHandleProvider.GetByWindowHandle(hwnd).IWindowHandle downstream.Persistent target selection:
IWindowSelector.TargetWindow.ActiveWindow and MatchingWindowList.Single target lookup:
IWindowSelector.FindWindow(...) when absence is expected and should be handledGetWindow(...) only when absence is exceptional.TargetWindow plus ActiveWindow when the code wants persistentIWindowHandle instead of re-querying by raw handle orMultiple-match or stateless query:
IWindowListProvider and IWindowMatcher.WindowsProvider.WindowList.Items.IWindowMatcher.FindMatches(..., targetExpression).One-shot "window is active" query:
IWindowListProvider and IWindowMatcher.IWindowListProvider.GetForegroundWindow().IWindowMatcher.IsMatch(foregroundWindow, targetExpression).Activate a matched window:
IWindowSelector.FindWindow(...) when the missing-window path should be handledGetWindow(...) only when absence is exceptional.Activate(...) on the handle.Window match expression basics:
/pattern/ is regex.0x... or &H... matches a native handle.#2 selects the second matching window.&& and || combine simpler expressions.[type=toplevel], [type=child], [visible], and[focus] further constrain matching.Track bounds:
IWindowBoundsTrackerFactory.Track(window).IWindowHandle after selection/resolution.IWindowHandleProvider only for raw handle conversion.IWindowSelector for live target matching.IWindowSelector.FindWindow(...) for non-throwing single-windowIWindowSelector.GetWindow(...) only when absence is exceptional.IWindowMatcher plus IWindowListProvider for multi-window matching,IntPtr as long-term contract.IWindowHandleProvider as selector/enumerator.WinTitle tokens such as ahk_exe or ahk_classWindowMatchExpression; map them deliberately.IWindowHandle, IWindowHandleProvider, IWindowListProvider,IWindowMatcher, IWindowSelector, WindowMatchExpression,WindowSelectorExtensions, WindowHandleExtensions,UnsafeNative.ActivateWindow,IWindowHandleMatcher, IComplexWindowHandleMatcher,IForegroundWindowTracker, IWindowBoundsTrackerFactory,IWinEventHookWrapper.osd/selection.mdosd/screen-overlay.mdwindows-subsystems/input-hooks-hotkeys.mdmemory/processes.md