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.Input.Touch.ITouchAdapter Interface Reference

Defines a passive adapter interface for accessing touch device state. Implementations update their internal state in response to platform events and expose that state for polling by TouchEventPoller. No events are raised directly from an adapter; all event routing is handled by the poller. More...

Inheritance diagram for Gondwana.Input.Touch.ITouchAdapter:
Gondwana.Avalonia.Input.Touch.AvaloniaTouchInputAdapter Gondwana.Blazor.Input.Touch.BlazorTouchAdapter

Public Member Functions

IReadOnlyList< TouchPoint > ConsumeBeganTouches ()
 Drains and returns all touch contacts that began since the last call. Keeping beginnings in a queue prevents a short tap that begins and ends between two engine polls from being lost. Adapters that do not maintain a beginning queue may rely on the default empty implementation; the poller will still discover active contacts from ActiveTouches.
IReadOnlyList< TouchPoint > ConsumeEndedTouches ()
 Drains and returns all touch contacts that ended (lifted or cancelled) since the last call. Each entry preserves the original TouchPhase (TouchPhase.Ended or TouchPhase.Cancelled) so the poller can distinguish between the two. This method is intended to be called once per engine tick by the TouchEventPoller.

Properties

IReadOnlyList< TouchPoint > ActiveTouches [get]
 Gets the list of touch contact points that are currently active (in contact with the surface). This list reflects the state at the most recent platform pointer event. An empty list indicates no fingers are currently in contact.

Detailed Description

Defines a passive adapter interface for accessing touch device state. Implementations update their internal state in response to platform events and expose that state for polling by TouchEventPoller. No events are raised directly from an adapter; all event routing is handled by the poller.

Definition at line 9 of file ITouchAdapter.cs.

Member Function Documentation

◆ ConsumeBeganTouches()

IReadOnlyList< TouchPoint > Gondwana.Input.Touch.ITouchAdapter.ConsumeBeganTouches ( )

Drains and returns all touch contacts that began since the last call. Keeping beginnings in a queue prevents a short tap that begins and ends between two engine polls from being lost. Adapters that do not maintain a beginning queue may rely on the default empty implementation; the poller will still discover active contacts from ActiveTouches.

Returns
The newly begun touch contacts, consumed from the pending collection.

Implemented in Gondwana.Avalonia.Input.Touch.AvaloniaTouchInputAdapter, and Gondwana.Blazor.Input.Touch.BlazorTouchAdapter.

◆ ConsumeEndedTouches()

IReadOnlyList< TouchPoint > Gondwana.Input.Touch.ITouchAdapter.ConsumeEndedTouches ( )

Drains and returns all touch contacts that ended (lifted or cancelled) since the last call. Each entry preserves the original TouchPhase (TouchPhase.Ended or TouchPhase.Cancelled) so the poller can distinguish between the two. This method is intended to be called once per engine tick by the TouchEventPoller.

Returns
A snapshot of all contacts that ended since the previous call to this method. The returned list is cleared from the adapter's internal queue on each call.

Implemented in Gondwana.Avalonia.Input.Touch.AvaloniaTouchInputAdapter, and Gondwana.Blazor.Input.Touch.BlazorTouchAdapter.

Property Documentation

◆ ActiveTouches

IReadOnlyList<TouchPoint> Gondwana.Input.Touch.ITouchAdapter.ActiveTouches
get

Gets the list of touch contact points that are currently active (in contact with the surface). This list reflects the state at the most recent platform pointer event. An empty list indicates no fingers are currently in contact.

Implemented in Gondwana.Avalonia.Input.Touch.AvaloniaTouchInputAdapter, and Gondwana.Blazor.Input.Touch.BlazorTouchAdapter.

Definition at line 26 of file ITouchAdapter.cs.