|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
#include <runtime.h>
Data Fields | |
| uint32_t | type |
| uint32_t | source_type |
| uint64_t | source |
| int32_t | code |
| uint32_t | payload_type |
| uint32_t | message_offset |
| uint32_t | message_size |
| mln_runtime_event_payload | payload |
One drained runtime event.
Events have a fixed stride and hold no pointers, so a host can copy a whole batch with one memory copy.
Step through an array of these by mln_runtime_event_batch.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.
| int32_t mln_runtime_event::code |
Secondary event detail whose meaning type selects. Depending on type it carries an mln_camera_change_mode, an mln_status, a MapLibre Native error ordinal, or 0. See mln_runtime_event_type for the per-type meaning.
| uint32_t mln_runtime_event::message_offset |
Byte offset of this event's message inside mln_runtime_event_batch.messages. Zero when message_size is 0.
| uint32_t mln_runtime_event::message_size |
Number of message bytes, excluding the trailing null terminator that follows them in the arena. Zero when this event carries no message.
| mln_runtime_event_payload mln_runtime_event::payload |
Typed payload selected by payload_type.
| uint32_t mln_runtime_event::payload_type |
One of mln_runtime_event_payload_type.
| uint64_t mln_runtime_event::source |
Source handle for this event: the mln_map for map-originated events, the mln_runtime for runtime-originated events, selected by source_type. Every handle type is uint64_t, so this needs no cast.
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.
| uint32_t mln_runtime_event::source_type |
One of mln_runtime_event_source_type.
| uint32_t mln_runtime_event::type |
One of mln_runtime_event_type.