|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
Go to the source code of this file.
Typedefs | |
| typedef uint32_t(* | mln_log_callback) (void *user_data, uint32_t severity, uint32_t event, int64_t code, const char *message) |
Enumerations | |
| enum | mln_log_severity : uint32_t |
| enum | mln_log_severity_mask : uint32_t |
| enum | mln_log_event : uint32_t |
Functions | |
| mln_status | mln_log_set_callback (mln_log_callback callback, void *user_data) |
| mln_status | mln_log_clear_callback (void) |
| mln_status | mln_log_set_async_severity_mask (uint32_t mask) |
Public C API declarations for logging.
| typedef uint32_t(* mln_log_callback) (void *user_data, uint32_t severity, uint32_t event, int64_t code, const char *message) |
Receives a MapLibre Native log record.
The message pointer is borrowed for the callback duration. Returning non-zero consumes the record. Returning zero lets MapLibre Native's platform logger handle it.
| enum mln_log_event : uint32_t |
Log event categories emitted by MapLibre Native.
| enum mln_log_severity : uint32_t |
Log severity values emitted by MapLibre Native.
| enum mln_log_severity_mask : uint32_t |
Bitmask values for log severities dispatched asynchronously.
| mln_status mln_log_clear_callback | ( | void | ) |
Clears the process-global log callback.
After this call succeeds, future log dispatches no longer use the callback that was previously registered through mln_log_set_callback().
Returns:
| mln_status mln_log_set_async_severity_mask | ( | uint32_t | mask | ) |
Controls which log severities MapLibre Native may dispatch asynchronously.
MLN_LOG_SEVERITY_MASK_DEFAULT restores MapLibre Native's default behavior: info and warning records may be asynchronous, while error records remain synchronous.
Returns:
| mln_status mln_log_set_callback | ( | mln_log_callback | callback, |
| void * | user_data ) |
Installs a process-global MapLibre Native log callback.
Passing null clears the current callback. The callback and user_data are stored by reference and must remain valid until the callback is replaced or cleared.
The callback is a low-level native callback:
Returns: