# Xui.Core.Abstract.Events

Assembly: **Xui.Core** · [C# declarations](index.cs) · [Assembly overview](../index.md)

## Types

- [`ref struct DeleteBackwardsEventRef`](#api-51f951f176e94dbf)
- [`ref struct FrameEventRef`](#api-c913ccece833e720)
- [`ref struct InsertTextEventRef`](#api-ba465ec65ed34766)
- [`ref struct KeyEventRef`](#api-21af509bbad01fea)
- [`enum MouseButton`](#api-5eb3f7fa7d126dca)
- [`ref struct MouseDownEventRef`](#api-e4ca67e2605e6558)
- [`ref struct MouseMoveEventRef`](#api-60586b9518386b8c)
- [`ref struct MouseUpEventRef`](#api-6d567ed8f3d2f766)
- [`ref struct RenderEventRef`](#api-0c63731709a0a142)
- [`enum ScrollPhase`](#api-5e1505521a2e2c58)
- [`ref struct ScrollWheelEventRef`](#api-3e99e8b8064b66bc)
- [`struct Touch`](#api-ec96f679b0c342ab)
- [`ref struct TouchEventRef`](#api-a00d4eeae539428d)
- [`enum TouchPhase`](#api-db449831dc30ed6f)
- [`enum VirtualKey`](#api-1e23c7e94690dd4f)
- [`ref struct WindowHitTestEventRef`](#api-cac4137bb6453367)
- [`enum WindowHitTestEventRef.WindowArea`](#api-50d1918b09e589f5)
- [`ref struct ZoomEventRef`](#api-2f45d1153c1e6976)

<a id="api-51f951f176e94dbf"></a>

## `ref struct DeleteBackwardsEventRef`

Represents a platform-level input event requesting deletion of content positioned logically before the caret or selection range. Typically triggered by a &quot;Backspace&quot; key press or an equivalent gesture.

This event originates from the `Actual` window layer and is forwarded to the `Abstract` window for dispatching through the view hierarchy. It is intended to be routed to the appropriate focused or editable view.

```csharp
public ref struct DeleteBackwardsEventRef
{
    public DeleteBackwardsEventRef();
}
```

<a id="api-cc69f27cf6911f55"></a>

### [`DeleteBackwardsEventRef.DeleteBackwardsEventRef()`](#api-cc69f27cf6911f55)


```csharp
public DeleteBackwardsEventRef();
```

Initializes a new instance of the [`Xui.Core.Abstract.Events.DeleteBackwardsEventRef`](../xui-core-abstract-events/index.md#api-51f951f176e94dbf) struct.


<a id="api-c913ccece833e720"></a>

## `ref struct FrameEventRef`

Represents a platform-level event dispatched once per frame, providing timing information used for driving animations and visual updates.

This event is emitted from the `Actual` window and forwarded to the `Abstract` window, typically during the animation phase of the UI lifecycle. It provides both the previous and next frame times, along with the time delta between them. Consumers can use this data to advance animations or perform time-based layout updates.

```csharp
public ref struct FrameEventRef
{
    public TimeSpan Previous;
    public TimeSpan Next;
    public TimeSpan Delta;
    public FrameEventRef(TimeSpan previous, TimeSpan next);
}
```

<a id="api-67e69d21b049a801"></a>

### [`FrameEventRef.FrameEventRef(TimeSpan previous, TimeSpan next)`](#api-67e69d21b049a801)


```csharp
public FrameEventRef(TimeSpan previous, TimeSpan next);
```

Initializes a new instance of the [`Xui.Core.Abstract.Events.FrameEventRef`](../xui-core-abstract-events/index.md#api-c913ccece833e720) struct with the given previous and next frame timestamps.

- **`previous`** — The timestamp of the previous frame.

- **`next`** — The timestamp of the upcoming frame.

<a id="api-ec4fc838f860d339"></a>

### [`TimeSpan FrameEventRef.Delta`](#api-ec4fc838f860d339)


```csharp
public TimeSpan Delta;
```

The time elapsed between the previous and next frames.

<a id="api-d551232deafa1d42"></a>

### [`TimeSpan FrameEventRef.Next`](#api-d551232deafa1d42)


```csharp
public TimeSpan Next;
```

The timestamp of the upcoming frame.

<a id="api-a9122efb848f1f47"></a>

### [`TimeSpan FrameEventRef.Previous`](#api-a9122efb848f1f47)


```csharp
public TimeSpan Previous;
```

The timestamp of the previous frame.


<a id="api-ba465ec65ed34766"></a>

## `ref struct InsertTextEventRef`

Represents a platform-level input event requesting insertion of text at the current caret or selection position.

This event originates from the `Actual` window and is forwarded to the `Abstract` layer for dispatch through the view hierarchy. It is typically triggered by user input such as typing characters, pasting from the clipboard, or text input from IMEs.

```csharp
public ref struct InsertTextEventRef
{
    public readonly string Text;
    public InsertTextEventRef(string text);
}
```

<a id="api-2fc835bf21bd57e9"></a>

### [`InsertTextEventRef.InsertTextEventRef(string text)`](#api-2fc835bf21bd57e9)


```csharp
public InsertTextEventRef(string text);
```

Initializes a new instance of the [`Xui.Core.Abstract.Events.InsertTextEventRef`](../xui-core-abstract-events/index.md#api-ba465ec65ed34766) struct with the specified text to insert.

- **`text`** — The string of text to be inserted.

<a id="api-a0f6685259673e81"></a>

### [`string InsertTextEventRef.Text`](#api-a0f6685259673e81)


```csharp
public readonly string Text;
```

The text to be inserted into the current input context.


<a id="api-21af509bbad01fea"></a>

## `ref struct KeyEventRef`

Represents a keyboard input event. Used for both key down (Key is set) and character input (Character is set) events.

```csharp
public ref struct KeyEventRef
{
    public VirtualKey Key;
    public char Character;
    public bool Shift;
    public bool IsRepeat;
    public bool Handled;
}
```

<a id="api-462242a176c43051"></a>

### [`char KeyEventRef.Character`](#api-462242a176c43051)


```csharp
public char Character;
```

The Unicode character for character input events (e.g. WM_CHAR). Zero when this is a key down/up event without character translation.

<a id="api-c98c4fdc8cf92410"></a>

### [`bool KeyEventRef.Handled`](#api-c98c4fdc8cf92410)


```csharp
public bool Handled;
```

Set to true by the handler to indicate the event was consumed.

<a id="api-392f2ca1d3934753"></a>

### [`bool KeyEventRef.IsRepeat`](#api-392f2ca1d3934753)


```csharp
public bool IsRepeat;
```

True if this is an auto-repeat event (key held down).

<a id="api-c7cb4ef551a35067"></a>

### [`VirtualKey KeyEventRef.Key`](#api-c7cb4ef551a35067)


```csharp
public VirtualKey Key;
```

The virtual key code for key down/up events.

<a id="api-76b417072d0c67ec"></a>

### [`bool KeyEventRef.Shift`](#api-76b417072d0c67ec)


```csharp
public bool Shift;
```

True if the Shift key is held during this event.


<a id="api-5eb3f7fa7d126dca"></a>

## `enum MouseButton`

Identifies a specific mouse button involved in a pointer event.

```csharp
public enum MouseButton
{
    Left,
    Right,
    Other
}
```

<a id="api-817f370f752a2e45"></a>

### [`MouseButton.Left`](#api-817f370f752a2e45)


```csharp
Left
```

The left mouse button, typically used for primary actions like selection or dragging.

<a id="api-4928e437cef81317"></a>

### [`MouseButton.Other`](#api-4928e437cef81317)


```csharp
Other
```

Any other mouse button, such as middle-click or additional buttons on advanced mice.

<a id="api-7669a776e7977f11"></a>

### [`MouseButton.Right`](#api-7669a776e7977f11)


```csharp
Right
```

The right mouse button, typically used for context menus or alternate actions.


<a id="api-e4ca67e2605e6558"></a>

## `ref struct MouseDownEventRef`

Represents a platform-level input event indicating that a mouse button was pressed at a given position.

This event is dispatched by the `Actual` window and forwarded to the `Abstract` layer for routing through the view hierarchy. It may be used to initiate focus, dragging, selection, or other pointer interactions.

```csharp
public ref struct MouseDownEventRef
{
    public Point Position;
    public System.Runtime.InteropServices.NFloat Pressure;
    public bool HasPressure;
    public MouseButton Button;
    public ITextMeasureContext? TextMeasure;
}
```

<a id="api-fb8d566ad6dae0a5"></a>

### [`MouseButton MouseDownEventRef.Button`](#api-fb8d566ad6dae0a5)


```csharp
public MouseButton Button;
```

The mouse button that was pressed.

<a id="api-b843de5fcc93c2e4"></a>

### [`bool MouseDownEventRef.HasPressure`](#api-b843de5fcc93c2e4)


```csharp
public bool HasPressure;
```

Whether the source supplied a real pressure measurement.

<a id="api-6e4bf188de5196ba"></a>

### [`Point MouseDownEventRef.Position`](#api-6e4bf188de5196ba)


```csharp
public Point Position;
```

The position of the mouse pointer at the time of the event, in logical window coordinates.

<a id="api-d8917fd98832c79b"></a>

### [`NFloat MouseDownEventRef.Pressure`](#api-d8917fd98832c79b)


```csharp
public System.Runtime.InteropServices.NFloat Pressure;
```

Normalized device pressure, from 0 to 1, when HasPressure is true.

<a id="api-87cbd8aaa2eca9db"></a>

### [`ITextMeasureContext? MouseDownEventRef.TextMeasure`](#api-87cbd8aaa2eca9db)


```csharp
public ITextMeasureContext? TextMeasure;
```

Optional text measure context for hit-testing text positions. May be null on platforms that do not provide one.


<a id="api-60586b9518386b8c"></a>

## `ref struct MouseMoveEventRef`

Represents a platform-level input event indicating that the mouse pointer has moved to a new position.

This event is dispatched by the `Actual` window and forwarded to the `Abstract` layer for routing through the view hierarchy. It is typically used to trigger hover effects, cursor updates, or to track dragging or gesture movement.

```csharp
public ref struct MouseMoveEventRef
{
    public Point Position;
    public System.Runtime.InteropServices.NFloat Pressure;
    public bool HasPressure;
    public ITextMeasureContext? TextMeasure;
}
```

<a id="api-d4c56d0fe50b8a0d"></a>

### [`bool MouseMoveEventRef.HasPressure`](#api-d4c56d0fe50b8a0d)


```csharp
public bool HasPressure;
```

Whether the source supplied a real pressure measurement.

<a id="api-07a544c376d696e2"></a>

### [`Point MouseMoveEventRef.Position`](#api-07a544c376d696e2)


```csharp
public Point Position;
```

The current position of the mouse pointer in logical window coordinates.

<a id="api-4097daab5d3af374"></a>

### [`NFloat MouseMoveEventRef.Pressure`](#api-4097daab5d3af374)


```csharp
public System.Runtime.InteropServices.NFloat Pressure;
```

Normalized device pressure, from 0 to 1, when HasPressure is true.

<a id="api-7829169d5b11e967"></a>

### [`ITextMeasureContext? MouseMoveEventRef.TextMeasure`](#api-7829169d5b11e967)


```csharp
public ITextMeasureContext? TextMeasure;
```

Optional text measure context for hit-testing text positions. May be null on platforms that do not provide one.


<a id="api-6d567ed8f3d2f766"></a>

## `ref struct MouseUpEventRef`

Represents a platform-level input event indicating that a mouse button was released at a given position.

This event is dispatched by the `Actual` window and forwarded to the `Abstract` layer for routing through the view hierarchy. It is typically used to complete interactions such as clicks, drags, or other pointer-driven gestures.

```csharp
public ref struct MouseUpEventRef
{
    public Point Position;
    public System.Runtime.InteropServices.NFloat Pressure;
    public bool HasPressure;
    public MouseButton Button;
    public ITextMeasureContext? TextMeasure;
}
```

<a id="api-872fd39dbddfb640"></a>

### [`MouseButton MouseUpEventRef.Button`](#api-872fd39dbddfb640)


```csharp
public MouseButton Button;
```

The mouse button that was released.

<a id="api-44cb5763f657e915"></a>

### [`bool MouseUpEventRef.HasPressure`](#api-44cb5763f657e915)


```csharp
public bool HasPressure;
```

Whether the source supplied a real pressure measurement.

<a id="api-57ed1a21edce7c1c"></a>

### [`Point MouseUpEventRef.Position`](#api-57ed1a21edce7c1c)


```csharp
public Point Position;
```

The position of the mouse pointer at the time of the event, in logical window coordinates.

<a id="api-3ee6b1eb476031f1"></a>

### [`NFloat MouseUpEventRef.Pressure`](#api-3ee6b1eb476031f1)


```csharp
public System.Runtime.InteropServices.NFloat Pressure;
```

Normalized device pressure, from 0 to 1, when HasPressure is true.

<a id="api-c738989776fb2f72"></a>

### [`ITextMeasureContext? MouseUpEventRef.TextMeasure`](#api-c738989776fb2f72)


```csharp
public ITextMeasureContext? TextMeasure;
```

Optional text measure context for hit-testing text positions. May be null on platforms that do not provide one.


<a id="api-0c63731709a0a142"></a>

## `ref struct RenderEventRef`

Represents a platform-level render event dispatched after a timing frame, indicating that views should perform layout and rendering operations within a given region.

This event follows a [`Xui.Core.Abstract.Events.FrameEventRef`](../xui-core-abstract-events/index.md#api-c913ccece833e720) and marks the phase during which views are expected to perform their `Measure`, `Arrange`, and `Render` passes. It is emitted by the `Actual` window and forwarded to the `Abstract` layer.

```csharp
public ref struct RenderEventRef
{
    public Rect Rect;
    public FrameEventRef Frame;
    public IContext Context;
    public RenderEventRef(Rect rect, FrameEventRef frame, IContext context);
}
```

<a id="api-27237d7a236d19a9"></a>

### [`RenderEventRef.RenderEventRef(Rect rect, FrameEventRef frame, IContext context)`](#api-27237d7a236d19a9)


```csharp
public RenderEventRef(Rect rect, FrameEventRef frame, IContext context);
```

Initializes a new instance of the [`Xui.Core.Abstract.Events.RenderEventRef`](../xui-core-abstract-events/index.md#api-0c63731709a0a142) struct with the given invalidation region and frame timing data.

- **`rect`** — The region to be rendered.

- **`frame`** — The timing information for this frame.

- **`context`** — The drawing context for this render pass.

<a id="api-91e5ac8b2b3fe256"></a>

### [`IContext RenderEventRef.Context`](#api-91e5ac8b2b3fe256)


```csharp
public IContext Context;
```

The frame-bound drawing context for this render pass. It must not be retained after the event returns to the render surface.

<a id="api-ee93b4bc263b743c"></a>

### [`FrameEventRef RenderEventRef.Frame`](#api-ee93b4bc263b743c)


```csharp
public FrameEventRef Frame;
```

Timing information associated with this frame, typically used for animations.

<a id="api-7ed8c6ebd339f9d8"></a>

### [`Rect RenderEventRef.Rect`](#api-7ed8c6ebd339f9d8)


```csharp
public Rect Rect;
```

The region of the screen or surface that should be re-rendered.


<a id="api-5e1505521a2e2c58"></a>

## `enum ScrollPhase`

Lifecycle flags for direct scrolling or platform-generated scroll inertia.

```csharp
[Flags]
public enum ScrollPhase
{
    None = 0,
    Began = 1,
    Stationary = 2,
    Changed = 4,
    Ended = 8,
    Cancelled = 16,
    MayBegin = 32
}
```

<a id="api-4b1944cba6561f1e"></a>

### [`ScrollPhase.Began`](#api-4b1944cba6561f1e)


```csharp
Began = 1
```

The sequence began.

<a id="api-ac4bde6acf95a327"></a>

### [`ScrollPhase.Cancelled`](#api-ac4bde6acf95a327)


```csharp
Cancelled = 16
```

The sequence was cancelled.

<a id="api-a6f0c9472ed977e4"></a>

### [`ScrollPhase.Changed`](#api-a6f0c9472ed977e4)


```csharp
Changed = 4
```

The sequence moved.

<a id="api-933cf251cc66f091"></a>

### [`ScrollPhase.Ended`](#api-933cf251cc66f091)


```csharp
Ended = 8
```

The sequence ended normally.

<a id="api-efa83cde5b1afa5d"></a>

### [`ScrollPhase.MayBegin`](#api-efa83cde5b1afa5d)


```csharp
MayBegin = 32
```

Contact may begin a scroll gesture.

<a id="api-beb1a8d752cab4a5"></a>

### [`ScrollPhase.None`](#api-beb1a8d752cab4a5)


```csharp
None = 0
```

No phase information is available.

<a id="api-c8605d868c0b7968"></a>

### [`ScrollPhase.Stationary`](#api-c8605d868c0b7968)


```csharp
Stationary = 2
```

Contact continues without movement.


<a id="api-3e99e8b8064b66bc"></a>

## `ref struct ScrollWheelEventRef`

Represents a platform-level input event generated by a scroll wheel or trackpad gesture, indicating a change in scroll position.

This event is dispatched by the `Actual` window and forwarded to the `Abstract` layer for routing through the view hierarchy. It may be used to scroll content, zoom views, or trigger kinetic effects, depending on platform and modifier keys.

```csharp
public ref struct ScrollWheelEventRef
{
    public Vector Delta;
    public bool IsPrecise;
    public ScrollPhase Phase;
    public ScrollPhase MomentumPhase;
    public Point Position;
    public bool HasPosition;
    public bool Handled;
}
```

<a id="api-b245492913959285"></a>

### [`Vector ScrollWheelEventRef.Delta`](#api-b245492913959285)


```csharp
public Vector Delta;
```

The scroll delta, typically measured in logical units per axis. Positive Y values usually indicate upward scrolling.

<a id="api-e925616e42bc9886"></a>

### [`bool ScrollWheelEventRef.Handled`](#api-e925616e42bc9886)


```csharp
public bool Handled;
```

Set to `true` by a handler to stop further propagation of this event.

<a id="api-b26e8e2b626efa2a"></a>

### [`bool ScrollWheelEventRef.HasPosition`](#api-b26e8e2b626efa2a)


```csharp
public bool HasPosition;
```

Whether [`Xui.Core.Abstract.Events.ScrollWheelEventRef.Position`](../xui-core-abstract-events/index.md#api-3ff93c6cc3441585) is populated.

<a id="api-5addfde39fe33406"></a>

### [`bool ScrollWheelEventRef.IsPrecise`](#api-5addfde39fe33406)


```csharp
public bool IsPrecise;
```

True for continuous, precise deltas in logical points (for example a macOS trackpad). False for ordinary wheel input or sources that do not report precision.

<a id="api-5826a7333b599d26"></a>

### [`ScrollPhase ScrollWheelEventRef.MomentumPhase`](#api-5826a7333b599d26)


```csharp
public ScrollPhase MomentumPhase;
```

Platform-generated inertia phase. Its deltas already include deceleration; a handler must not treat them as continued finger contact or add another fling.

<a id="api-5feeed500d8975fb"></a>

### [`ScrollPhase ScrollWheelEventRef.Phase`](#api-5feeed500d8975fb)


```csharp
public ScrollPhase Phase;
```

Direct gesture phase, or [`Xui.Core.Abstract.Events.ScrollPhase.None`](../xui-core-abstract-events/index.md#api-beb1a8d752cab4a5) when unavailable.

<a id="api-3ff93c6cc3441585"></a>

### [`Point ScrollWheelEventRef.Position`](#api-3ff93c6cc3441585)


```csharp
public Point Position;
```

The position at which this gesture should be routed, when the input source provides one. Sources without a position use the most recently observed pointer location instead.


<a id="api-ec96f679b0c342ab"></a>

## `struct Touch`

Represents a single touch point within a multi-touch input event.

This structure contains identifying and positional data for a specific finger or contact point on a touch surface. Multiple [`Xui.Core.Abstract.Events.Touch`](../xui-core-abstract-events/index.md#api-ec96f679b0c342ab) instances may be reported in a single event when handling gestures or complex touch interactions.

```csharp
public struct Touch
{
    public int Index;
    public Point Position;
    public nfloat Radius;
    public TouchPhase Phase;
}
```

<a id="api-c5ed03e934592210"></a>

### [`int Touch.Index`](#api-c5ed03e934592210)


```csharp
public int Index;
```

A unique index identifying this touch point during its lifetime. Typically assigned by the platform and reused after release.

<a id="api-77b8e51fbb2d9b0a"></a>

### [`TouchPhase Touch.Phase`](#api-77b8e51fbb2d9b0a)


```csharp
public TouchPhase Phase;
```

The current phase of the touch (e.g., began, moved, ended).

<a id="api-938b15c1ea868cd7"></a>

### [`Point Touch.Position`](#api-938b15c1ea868cd7)


```csharp
public Point Position;
```

The current position of the touch in logical window coordinates.

<a id="api-ebdbab4dcb8b27d3"></a>

### [`NFloat Touch.Radius`](#api-ebdbab4dcb8b27d3)


```csharp
public nfloat Radius;
```

The estimated contact radius of the touch, in logical units. Used for gesture recognition or pressure emulation.


<a id="api-a00d4eeae539428d"></a>

## `ref struct TouchEventRef`

Represents a platform-level input event containing one or more touch points, typically originating from a touchscreen or trackpad gesture.

This event is dispatched by the `Actual` window and forwarded to the `Abstract` layer for routing through the view hierarchy. It includes all active touch points for the current frame, allowing gesture recognition, hit testing, and view interaction logic.

```csharp
public ref struct TouchEventRef
{
    public readonly ReadOnlySpan<Touch> Touches;
    public Xui.Core.Canvas.ITextMeasureContext? TextMeasure;
    public TouchEventRef(ReadOnlySpan<Touch> touches);
}
```

<a id="api-f3005074b30916cf"></a>

### [`TouchEventRef.TouchEventRef(ReadOnlySpan<Touch> touches)`](#api-f3005074b30916cf)


```csharp
public TouchEventRef(ReadOnlySpan<Touch> touches);
```

Initializes a new instance of the [`Xui.Core.Abstract.Events.TouchEventRef`](../xui-core-abstract-events/index.md#api-a00d4eeae539428d) struct with the provided set of touch points.

- **`touches`** — A span of active touch data.

<a id="api-eb97ba6010f0e0f5"></a>

### [`ITextMeasureContext? TouchEventRef.TextMeasure`](#api-eb97ba6010f0e0f5)


```csharp
public Xui.Core.Canvas.ITextMeasureContext? TextMeasure;
```

Text measurement supplied by the window for precision caret hit-testing.

<a id="api-058f9c275a372c7b"></a>

### [`ReadOnlySpan<Touch> TouchEventRef.Touches`](#api-058f9c275a372c7b)


```csharp
public readonly ReadOnlySpan<Touch> Touches;
```

A span of all current touch points involved in this event.


<a id="api-db449831dc30ed6f"></a>

## `enum TouchPhase`

Describes the phase of an individual touch point during a touch event.

```csharp
public enum TouchPhase
{
    Start,
    Move,
    End,
    Cancel
}
```

<a id="api-177eb5fc1b728e9f"></a>

### [`TouchPhase.Cancel`](#api-177eb5fc1b728e9f)


```csharp
Cancel
```

The system interrupted the contact; it must not complete a tap.

<a id="api-10f436605a935e5e"></a>

### [`TouchPhase.End`](#api-10f436605a935e5e)


```csharp
End
```

The touch has ended (finger or stylus lifted off the surface).

<a id="api-6c00518969ea4be4"></a>

### [`TouchPhase.Move`](#api-6c00518969ea4be4)


```csharp
Move
```

The touch is actively moving across the surface.

<a id="api-c503905c893be251"></a>

### [`TouchPhase.Start`](#api-c503905c893be251)


```csharp
Start
```

The touch has just started (finger or stylus contacted the surface).


<a id="api-1e23c7e94690dd4f"></a>

## `enum VirtualKey`

Platform-agnostic virtual key codes for keyboard input. Values intentionally match Win32 VK_* codes for zero-cost mapping on Windows.

```csharp
public enum VirtualKey : ushort
{
    None = 0x00,
    Back = 0x08,
    Tab = 0x09,
    Return = 0x0D,
    Shift = 0x10,
    Control = 0x11,
    Alt = 0x12,
    Escape = 0x1B,
    Space = 0x20,
    Prior = 0x21,
    Next = 0x22,
    End = 0x23,
    Home = 0x24,
    Left = 0x25,
    Up = 0x26,
    Right = 0x27,
    Down = 0x28,
    Insert = 0x2D,
    Delete = 0x2E,
    D0 = 0x30,
    D1 = 0x31,
    D2 = 0x32,
    D3 = 0x33,
    D4 = 0x34,
    D5 = 0x35,
    D6 = 0x36,
    D7 = 0x37,
    D8 = 0x38,
    D9 = 0x39,
    A = 0x41,
    B = 0x42,
    C = 0x43,
    D = 0x44,
    E = 0x45,
    F = 0x46,
    G = 0x47,
    H = 0x48,
    I = 0x49,
    J = 0x4A,
    K = 0x4B,
    L = 0x4C,
    M = 0x4D,
    N = 0x4E,
    O = 0x4F,
    P = 0x50,
    Q = 0x51,
    R = 0x52,
    S = 0x53,
    T = 0x54,
    U = 0x55,
    V = 0x56,
    W = 0x57,
    X = 0x58,
    Y = 0x59,
    Z = 0x5A,
}
```

<a id="api-d1b94b284af9830c"></a>

### [`VirtualKey.A`](#api-d1b94b284af9830c)


```csharp
A = 0x41
```

Letter key A.

<a id="api-2c9846bc02fef665"></a>

### [`VirtualKey.Alt`](#api-2c9846bc02fef665)


```csharp
Alt = 0x12
```

Alt modifier key.

<a id="api-8076f8b41570b15c"></a>

### [`VirtualKey.B`](#api-8076f8b41570b15c)


```csharp
B = 0x42
```

Letter key B.

<a id="api-64e52c012b8cb8b8"></a>

### [`VirtualKey.Back`](#api-64e52c012b8cb8b8)


```csharp
Back = 0x08
```

Backspace key.

<a id="api-f010f715293b3e94"></a>

### [`VirtualKey.C`](#api-f010f715293b3e94)


```csharp
C = 0x43
```

Letter key C.

<a id="api-b2ae34cef2e69bb7"></a>

### [`VirtualKey.Control`](#api-b2ae34cef2e69bb7)


```csharp
Control = 0x11
```

Control modifier key.

<a id="api-c66a8383b88aea8e"></a>

### [`VirtualKey.D`](#api-c66a8383b88aea8e)


```csharp
D = 0x44
```

Letter key D.

<a id="api-607f4e0c84835afa"></a>

### [`VirtualKey.D0`](#api-607f4e0c84835afa)


```csharp
D0 = 0x30
```

Digit key 0.

<a id="api-3952668d7de40e58"></a>

### [`VirtualKey.D1`](#api-3952668d7de40e58)


```csharp
D1 = 0x31
```

Digit key 1.

<a id="api-100c1e432aa5f0db"></a>

### [`VirtualKey.D2`](#api-100c1e432aa5f0db)


```csharp
D2 = 0x32
```

Digit key 2.

<a id="api-c911a0811792a89a"></a>

### [`VirtualKey.D3`](#api-c911a0811792a89a)


```csharp
D3 = 0x33
```

Digit key 3.

<a id="api-4be7bc7e591b776c"></a>

### [`VirtualKey.D4`](#api-4be7bc7e591b776c)


```csharp
D4 = 0x34
```

Digit key 4.

<a id="api-a05bd3a015b76545"></a>

### [`VirtualKey.D5`](#api-a05bd3a015b76545)


```csharp
D5 = 0x35
```

Digit key 5.

<a id="api-2819f7cc36bebc37"></a>

### [`VirtualKey.D6`](#api-2819f7cc36bebc37)


```csharp
D6 = 0x36
```

Digit key 6.

<a id="api-c7c09ea83c49c177"></a>

### [`VirtualKey.D7`](#api-c7c09ea83c49c177)


```csharp
D7 = 0x37
```

Digit key 7.

<a id="api-3baa4e7cd8cc8c58"></a>

### [`VirtualKey.D8`](#api-3baa4e7cd8cc8c58)


```csharp
D8 = 0x38
```

Digit key 8.

<a id="api-48745a27df017c23"></a>

### [`VirtualKey.D9`](#api-48745a27df017c23)


```csharp
D9 = 0x39
```

Digit key 9.

<a id="api-80e75f3569e2874a"></a>

### [`VirtualKey.Delete`](#api-80e75f3569e2874a)


```csharp
Delete = 0x2E
```

Delete key.

<a id="api-04845cc65739de24"></a>

### [`VirtualKey.Down`](#api-04845cc65739de24)


```csharp
Down = 0x28
```

Down arrow key.

<a id="api-91c1568ca74fea73"></a>

### [`VirtualKey.E`](#api-91c1568ca74fea73)


```csharp
E = 0x45
```

Letter key E.

<a id="api-e56628c6e2143515"></a>

### [`VirtualKey.End`](#api-e56628c6e2143515)


```csharp
End = 0x23
```

End key.

<a id="api-6449bc2264739b65"></a>

### [`VirtualKey.Escape`](#api-6449bc2264739b65)


```csharp
Escape = 0x1B
```

Escape key.

<a id="api-1d57095ec9075c95"></a>

### [`VirtualKey.F`](#api-1d57095ec9075c95)


```csharp
F = 0x46
```

Letter key F.

<a id="api-7c74b3ff8ec0f47d"></a>

### [`VirtualKey.G`](#api-7c74b3ff8ec0f47d)


```csharp
G = 0x47
```

Letter key G.

<a id="api-edd51eb4ce8fbcc2"></a>

### [`VirtualKey.H`](#api-edd51eb4ce8fbcc2)


```csharp
H = 0x48
```

Letter key H.

<a id="api-f16d1743c0bc1567"></a>

### [`VirtualKey.Home`](#api-f16d1743c0bc1567)


```csharp
Home = 0x24
```

Home key.

<a id="api-e3c133360befcf50"></a>

### [`VirtualKey.I`](#api-e3c133360befcf50)


```csharp
I = 0x49
```

Letter key I.

<a id="api-ac672b71074b195d"></a>

### [`VirtualKey.Insert`](#api-ac672b71074b195d)


```csharp
Insert = 0x2D
```

Insert key.

<a id="api-34cfa1b878bfde8f"></a>

### [`VirtualKey.J`](#api-34cfa1b878bfde8f)


```csharp
J = 0x4A
```

Letter key J.

<a id="api-945e2bb7b0f11387"></a>

### [`VirtualKey.K`](#api-945e2bb7b0f11387)


```csharp
K = 0x4B
```

Letter key K.

<a id="api-06a4a98269321505"></a>

### [`VirtualKey.L`](#api-06a4a98269321505)


```csharp
L = 0x4C
```

Letter key L.

<a id="api-4c1760be1b3ceae3"></a>

### [`VirtualKey.Left`](#api-4c1760be1b3ceae3)


```csharp
Left = 0x25
```

Left arrow key.

<a id="api-8f47d3f6540aae17"></a>

### [`VirtualKey.M`](#api-8f47d3f6540aae17)


```csharp
M = 0x4D
```

Letter key M.

<a id="api-047e560f7b7536c7"></a>

### [`VirtualKey.N`](#api-047e560f7b7536c7)


```csharp
N = 0x4E
```

Letter key N.

<a id="api-b5664948aafe533c"></a>

### [`VirtualKey.Next`](#api-b5664948aafe533c)


```csharp
Next = 0x22
```

Page Down key.

<a id="api-260c48a6f19d0117"></a>

### [`VirtualKey.None`](#api-260c48a6f19d0117)


```csharp
None = 0x00
```

No key pressed.

<a id="api-cd41b57d55a63ac1"></a>

### [`VirtualKey.O`](#api-cd41b57d55a63ac1)


```csharp
O = 0x4F
```

Letter key O.

<a id="api-d19f6e65b15bfb08"></a>

### [`VirtualKey.P`](#api-d19f6e65b15bfb08)


```csharp
P = 0x50
```

Letter key P.

<a id="api-485d14e576a12c49"></a>

### [`VirtualKey.Prior`](#api-485d14e576a12c49)


```csharp
Prior = 0x21
```

Page Up key.

<a id="api-a290b225d484714c"></a>

### [`VirtualKey.Q`](#api-a290b225d484714c)


```csharp
Q = 0x51
```

Letter key Q.

<a id="api-bb74b554c08dbfa8"></a>

### [`VirtualKey.R`](#api-bb74b554c08dbfa8)


```csharp
R = 0x52
```

Letter key R.

<a id="api-18f9b66ef0feb350"></a>

### [`VirtualKey.Return`](#api-18f9b66ef0feb350)


```csharp
Return = 0x0D
```

Enter/Return key.

<a id="api-f002051ca84caccc"></a>

### [`VirtualKey.Right`](#api-f002051ca84caccc)


```csharp
Right = 0x27
```

Right arrow key.

<a id="api-f81b3c576a857210"></a>

### [`VirtualKey.S`](#api-f81b3c576a857210)


```csharp
S = 0x53
```

Letter key S.

<a id="api-9471cbf50611f97f"></a>

### [`VirtualKey.Shift`](#api-9471cbf50611f97f)


```csharp
Shift = 0x10
```

Shift modifier key.

<a id="api-3b2c89065af9673a"></a>

### [`VirtualKey.Space`](#api-3b2c89065af9673a)


```csharp
Space = 0x20
```

Space bar.

<a id="api-ec98641285190c89"></a>

### [`VirtualKey.T`](#api-ec98641285190c89)


```csharp
T = 0x54
```

Letter key T.

<a id="api-cbbc4b8acbebbec7"></a>

### [`VirtualKey.Tab`](#api-cbbc4b8acbebbec7)


```csharp
Tab = 0x09
```

Tab key.

<a id="api-a3eac70b47e238c6"></a>

### [`VirtualKey.U`](#api-a3eac70b47e238c6)


```csharp
U = 0x55
```

Letter key U.

<a id="api-a6a7f3b19df478a9"></a>

### [`VirtualKey.Up`](#api-a6a7f3b19df478a9)


```csharp
Up = 0x26
```

Up arrow key.

<a id="api-8b32a6f8ed10a557"></a>

### [`VirtualKey.V`](#api-8b32a6f8ed10a557)


```csharp
V = 0x56
```

Letter key V.

<a id="api-ea90e43b729ebafb"></a>

### [`VirtualKey.W`](#api-ea90e43b729ebafb)


```csharp
W = 0x57
```

Letter key W.

<a id="api-10e74d4fb586d78c"></a>

### [`VirtualKey.X`](#api-10e74d4fb586d78c)


```csharp
X = 0x58
```

Letter key X.

<a id="api-52889b909d7a3f6a"></a>

### [`VirtualKey.Y`](#api-52889b909d7a3f6a)


```csharp
Y = 0x59
```

Letter key Y.

<a id="api-63b2bf66e803784e"></a>

### [`VirtualKey.Z`](#api-63b2bf66e803784e)


```csharp
Z = 0x5A
```

Letter key Z.


<a id="api-cac4137bb6453367"></a>

## `ref struct WindowHitTestEventRef`

Represents a platform-level hit test event that allows the application to define how a point within a custom window frame should be interpreted (e.g., as a draggable title bar, resize border, or transparent region).

This event is dispatched when the user interacts with the non-client area of a custom-framed window (such as the emulator window or a styled installer). It is primarily used on platforms like Windows that support fine-grained window frame interaction via hit testing. On macOS and other platforms where native support is unavailable, this event may be ignored or implemented through custom code.

```csharp
public ref struct WindowHitTestEventRef
{
    public Point Point;
    public Rect Window;
    public WindowArea Area;
    public WindowHitTestEventRef(Point point, Rect window);
    public enum WindowArea : uint
    {
        Default = 0,
        Transparent,
        Client,
        Title,
        BorderTopLeft,
        BorderTop,
        BorderTopRight,
        BorderRight,
        BorderBottomRight,
        BorderBottom,
        BorderBottomLeft,
        BorderLeft
    }
}
```

<a id="api-89d32244ee015cfe"></a>

### [`WindowHitTestEventRef.WindowHitTestEventRef(Point point, Rect window)`](#api-89d32244ee015cfe)


```csharp
public WindowHitTestEventRef(Point point, Rect window);
```

Initializes a new instance of the [`Xui.Core.Abstract.Events.WindowHitTestEventRef`](../xui-core-abstract-events/index.md#api-cac4137bb6453367) struct.

- **`point`** — The location of the pointer input.

- **`window`** — The bounds of the target window.

<a id="api-dbbcada3fd591f4f"></a>

### [`WindowArea WindowHitTestEventRef.Area`](#api-dbbcada3fd591f4f)


```csharp
public WindowArea Area;
```

The result of the hit test, set by the application to control how the system should interpret the hit location.

<a id="api-97f4215ebb860490"></a>

### [`Point WindowHitTestEventRef.Point`](#api-97f4215ebb860490)


```csharp
public Point Point;
```

The location of the hit test, in logical window coordinates.

<a id="api-d6672af2654ff3ab"></a>

### [`Rect WindowHitTestEventRef.Window`](#api-d6672af2654ff3ab)


```csharp
public Rect Window;
```

The bounds of the entire window, in logical coordinates. This may be used to determine edge proximity for resizing logic.


<a id="api-50d1918b09e589f5"></a>

## `enum WindowHitTestEventRef.WindowArea`

Describes the purpose or function of a region within a window.

```csharp
public enum WindowArea : uint
{
    Default = 0,
    Transparent,
    Client,
    Title,
    BorderTopLeft,
    BorderTop,
    BorderTopRight,
    BorderRight,
    BorderBottomRight,
    BorderBottom,
    BorderBottomLeft,
    BorderLeft
}
```

<a id="api-95f679be9d49c734"></a>

### [`WindowArea.BorderBottom`](#api-95f679be9d49c734)


```csharp
BorderBottom
```

Bottom edge resize border.

<a id="api-325388ab218bf242"></a>

### [`WindowArea.BorderBottomLeft`](#api-325388ab218bf242)


```csharp
BorderBottomLeft
```

Bottom-left resize corner.

<a id="api-08c53013d38bcc10"></a>

### [`WindowArea.BorderBottomRight`](#api-08c53013d38bcc10)


```csharp
BorderBottomRight
```

Bottom-right resize corner.

<a id="api-295ae98fca5a8321"></a>

### [`WindowArea.BorderLeft`](#api-295ae98fca5a8321)


```csharp
BorderLeft
```

Left edge resize border.

<a id="api-c8bd6b6e056f6636"></a>

### [`WindowArea.BorderRight`](#api-c8bd6b6e056f6636)


```csharp
BorderRight
```

Right edge resize border.

<a id="api-9e2c39b7fb0bf697"></a>

### [`WindowArea.BorderTop`](#api-9e2c39b7fb0bf697)


```csharp
BorderTop
```

Top edge resize border.

<a id="api-a9acfa1767c9268c"></a>

### [`WindowArea.BorderTopLeft`](#api-a9acfa1767c9268c)


```csharp
BorderTopLeft
```

Top-left resize corner.

<a id="api-66ee94261fb58012"></a>

### [`WindowArea.BorderTopRight`](#api-66ee94261fb58012)


```csharp
BorderTopRight
```

Top-right resize corner.

<a id="api-efb691e859106d81"></a>

### [`WindowArea.Client`](#api-efb691e859106d81)


```csharp
Client
```

The area represents the client region of the window (normal content).

<a id="api-b223b31d07c4d182"></a>

### [`WindowArea.Default`](#api-b223b31d07c4d182)


```csharp
Default = 0
```

The area is unspecified; the platform should handle it normally.

<a id="api-17ed1744c8e994be"></a>

### [`WindowArea.Title`](#api-17ed1744c8e994be)


```csharp
Title
```

The area represents a draggable title bar region.

<a id="api-a9fc252d4e5edbf1"></a>

### [`WindowArea.Transparent`](#api-a9fc252d4e5edbf1)


```csharp
Transparent
```

The area is transparent to hit testing and should not trigger drag or resize.


<a id="api-2f45d1153c1e6976"></a>

## `ref struct ZoomEventRef`

A platform magnification gesture, routed separately from scrolling and touch contacts.

```csharp
public ref struct ZoomEventRef
{
    public NFloat ScaleFactor;
    public Point Position;
    public bool HasPosition;
    public ScrollPhase Phase;
    public bool Handled;
}
```

<a id="api-25474a756e6c0746"></a>

### [`bool ZoomEventRef.Handled`](#api-25474a756e6c0746)


```csharp
public bool Handled;
```

Set to true to stop propagation to ancestor views.

<a id="api-1d974bccda156ba3"></a>

### [`bool ZoomEventRef.HasPosition`](#api-1d974bccda156ba3)


```csharp
public bool HasPosition;
```

Whether [`Xui.Core.Abstract.Events.ZoomEventRef.Position`](../xui-core-abstract-events/index.md#api-522a5d382fc53757) is available; otherwise routing uses the last mouse position.

<a id="api-fe304ada541ed711"></a>

### [`ScrollPhase ZoomEventRef.Phase`](#api-fe304ada541ed711)


```csharp
public ScrollPhase Phase;
```

The native gesture lifecycle, using the same flags as scrolling.

<a id="api-522a5d382fc53757"></a>

### [`Point ZoomEventRef.Position`](#api-522a5d382fc53757)


```csharp
public Point Position;
```

The gesture anchor in window coordinates.

<a id="api-3404c449d4603e58"></a>

### [`NFloat ZoomEventRef.ScaleFactor`](#api-3404c449d4603e58)


```csharp
public NFloat ScaleFactor;
```

Incremental scale multiplier: 1 is unchanged, values above 1 zoom in.

