Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
Loading...
Searching...
No Matches
Gondwana.Avalonia.Input.Mouse.AvaloniaMouseAdapter Class Referencesealed

Provides a mouse/pointer input adapter for Avalonia applications, tracking pointer position, button states, modifier keys, and scroll events. More...

Inheritance diagram for Gondwana.Avalonia.Input.Mouse.AvaloniaMouseAdapter:
Gondwana.Input.Mouse.IMouseAdapter

Public Member Functions

 AvaloniaMouseAdapter (Control control)
 Initializes a new instance of the AvaloniaMouseAdapter class attached to the specified control.
void Dispose ()
 Unsubscribes from the control's pointer events.

Properties

Point CurrentPosition [get]
 Gets the current position of the pointer cursor in client (control-local) coordinates.
HashSet< GondwanaMouseButton > PressedButtons [get]
 Gets the set of currently pressed mouse buttons.
KeyboardModifierState CurrentKeyboardModifiers [get]
 Gets the current state of keyboard modifiers (Shift, Ctrl, Alt).
int ScrollDelta [get]
 Gets the accumulated scroll wheel delta since the last read, then resets it to zero.

Detailed Description

Provides a mouse/pointer input adapter for Avalonia applications, tracking pointer position, button states, modifier keys, and scroll events.

Definition at line 14 of file AvaloniaMouseAdapter.cs.

Constructor & Destructor Documentation

◆ AvaloniaMouseAdapter()

Gondwana.Avalonia.Input.Mouse.AvaloniaMouseAdapter.AvaloniaMouseAdapter ( Control control)

Initializes a new instance of the AvaloniaMouseAdapter class attached to the specified control.

Parameters
controlThe control to monitor for pointer events.
Exceptions
ArgumentNullExceptionThrown when control is null.

Definition at line 47 of file AvaloniaMouseAdapter.cs.

Member Function Documentation

◆ Dispose()

void Gondwana.Avalonia.Input.Mouse.AvaloniaMouseAdapter.Dispose ( )

Unsubscribes from the control's pointer events.

Definition at line 112 of file AvaloniaMouseAdapter.cs.

Property Documentation

◆ CurrentKeyboardModifiers

KeyboardModifierState Gondwana.Avalonia.Input.Mouse.AvaloniaMouseAdapter.CurrentKeyboardModifiers
get

Gets the current state of keyboard modifiers (Shift, Ctrl, Alt).

Implements Gondwana.Input.Mouse.IMouseAdapter.

Definition at line 35 of file AvaloniaMouseAdapter.cs.

◆ CurrentPosition

Point Gondwana.Avalonia.Input.Mouse.AvaloniaMouseAdapter.CurrentPosition
get

Gets the current position of the pointer cursor in client (control-local) coordinates.

Implements Gondwana.Input.Mouse.IMouseAdapter.

Definition at line 25 of file AvaloniaMouseAdapter.cs.

◆ PressedButtons

HashSet<GondwanaMouseButton> Gondwana.Avalonia.Input.Mouse.AvaloniaMouseAdapter.PressedButtons
get

Gets the set of currently pressed mouse buttons.

Implements Gondwana.Input.Mouse.IMouseAdapter.

Definition at line 30 of file AvaloniaMouseAdapter.cs.

◆ ScrollDelta

int Gondwana.Avalonia.Input.Mouse.AvaloniaMouseAdapter.ScrollDelta
get

Gets the accumulated scroll wheel delta since the last read, then resets it to zero.

Implements Gondwana.Input.Mouse.IMouseAdapter.

Definition at line 40 of file AvaloniaMouseAdapter.cs.