MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
mln_runtime_event Struct Reference

#include <runtime.h>

Data Fields

uint32_t type
uint32_t source_type
uint64_t source
uint64_t generation
int32_t code
uint32_t payload_type
mln_buffer_view message
mln_runtime_event_payload payload

Detailed Description

One delivered runtime event.

Message bytes are borrowed for the callback or delivery batch lifetime.

Step through an array of these by mln_event_batch_view.event_size rather than by the size of this struct: a later version may add a member to mln_runtime_event_payload and widen the stride. Every field below, payload included, keeps its offset across versions.

Field Documentation

◆ code

int32_t mln_runtime_event::code

Secondary event detail whose meaning type selects; see mln_runtime_event_type.

◆ generation

uint64_t mln_runtime_event::generation

Map snapshot generation that the event reports, or zero when source_type is MLN_RUNTIME_EVENT_SOURCE_RUNTIME.

A camera, style, loading-finished, loading-failed, or idle event follows the publication of a snapshot that includes the change it reports and carries that snapshot's generation, so a snapshot read after receiving it shows state at least as new as the event. Every other map event carries the generation the map had published last.

An event that a map command raises carries the generation that the command's completion reports. An event at or past a command's completion generation was raised by that command or after it; one below it was raised before the command ran. Events from one map are queued in non-decreasing generation order.

◆ message

mln_buffer_view mln_runtime_event::message

Borrowed UTF-8 message bytes, empty when this event carries no message.

◆ payload

mln_runtime_event_payload mln_runtime_event::payload

Typed payload selected by payload_type.

◆ payload_type

uint32_t mln_runtime_event::payload_type

◆ source

uint64_t mln_runtime_event::source

Source handle selected by source_type: an mln_runtime or an mln_map.

The value names one object for the life of the process, so a host may compare it against a handle it holds even after that handle is released.

◆ source_type

uint32_t mln_runtime_event::source_type

◆ type

uint32_t mln_runtime_event::type

The documentation for this struct was generated from the following file: