Class RuntimeEvent
One copied runtime event from DrainEvents().
public sealed record RuntimeEvent : IEquatable<RuntimeEvent>
- Inheritance
-
RuntimeEvent
- Implements
- Inherited Members
Constructors
RuntimeEvent(RuntimeEventType, uint, RuntimeEventSourceType, uint, ulong, RuntimeHandle?, MapHandle?, int, uint, RuntimeEventPayload, string)
One copied runtime event from DrainEvents().
public RuntimeEvent(RuntimeEventType Type, uint RawType, RuntimeEventSourceType SourceType, uint RawSourceType, ulong RawSource, RuntimeHandle? RuntimeSource, MapHandle? MapSource, int Code, uint RawPayloadType, RuntimeEventPayload Payload, string Message)
Parameters
TypeRuntimeEventTypeThe event kind, when this binding knows the raw value.
RawTypeuintThe raw native event kind.
SourceTypeRuntimeEventSourceTypeThe source kind, when this binding knows the raw value.
RawSourceTypeuintThe raw native source kind.
RawSourceulongThe raw native source identity, which names one object for the life of the process. Every event carries it, including a source kind this binding does not name and a map source that resolves to no live MapHandle, so a host still correlates or forwards an event whose source this binding cannot resolve. It is an identity value only: it compares and hashes, and it grants no operations on the object it names.
RuntimeSourceRuntimeHandleThe runtime that produced a runtime-sourced event.
MapSourceMapHandleThe map that raised this event, resolved from the runtime's weak map registry. Hold a strong reference to the MapHandle for as long as you want to attribute its events: a collected map leaves this null even though SourceType still reports a map source.
CodeintSecondary event detail whose meaning
Typeselects:- MapCameraWillChange and MapCameraDidChange: a Maplibre.NativeFfi.Camera.CameraChangeMode value.
-
MapLoadingFailed: the ordinal of MapLibre Native's internal map
load error kind, which this binding does not name as an enum. Read
Messagefor the failure text. -
OfflineOperationCompleted: the operation result as a
MaplibreStatusvalue. - Every other event kind: 0.
RawPayloadTypeuintThe raw native payload kind.
PayloadRuntimeEventPayloadThe copied typed payload selected by the payload kind.
MessagestringThe copied event message, empty when the event carries none. It carries the image ID for MapStyleImageMissing, the source ID for MapTileAction, and native failure text for the loading and render error kinds.
Properties
Code
Secondary event detail whose meaning Type selects:
- MapCameraWillChange and MapCameraDidChange: a Maplibre.NativeFfi.Camera.CameraChangeMode value.
-
MapLoadingFailed: the ordinal of MapLibre Native's internal map
load error kind, which this binding does not name as an enum. Read
Messagefor the failure text. -
OfflineOperationCompleted: the operation result as a
MaplibreStatusvalue. - Every other event kind: 0.
public int Code { get; init; }
Property Value
MapSource
The map that raised this event, resolved from the runtime's weak map registry. Hold a strong reference to the MapHandle for as long as you want to attribute its events: a collected map leaves this null even though SourceType still reports a map source.
public MapHandle? MapSource { get; init; }
Property Value
Message
The copied event message, empty when the event carries none. It carries the image ID for MapStyleImageMissing, the source ID for MapTileAction, and native failure text for the loading and render error kinds.
public string Message { get; init; }
Property Value
Payload
The copied typed payload selected by the payload kind.
public RuntimeEventPayload Payload { get; init; }
Property Value
RawPayloadType
The raw native payload kind.
public uint RawPayloadType { get; init; }
Property Value
RawSource
The raw native source identity, which names one object for the life of the process. Every event carries it, including a source kind this binding does not name and a map source that resolves to no live MapHandle, so a host still correlates or forwards an event whose source this binding cannot resolve. It is an identity value only: it compares and hashes, and it grants no operations on the object it names.
public ulong RawSource { get; init; }
Property Value
RawSourceType
The raw native source kind.
public uint RawSourceType { get; init; }
Property Value
RawType
The raw native event kind.
public uint RawType { get; init; }
Property Value
RuntimeSource
The runtime that produced a runtime-sourced event.
public RuntimeHandle? RuntimeSource { get; init; }
Property Value
SourceType
The source kind, when this binding knows the raw value.
public RuntimeEventSourceType SourceType { get; init; }
Property Value
Type
The event kind, when this binding knows the raw value.
public RuntimeEventType Type { get; init; }