|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
Go to the source code of this file.
Data Structures | |
| struct | mln_diagnostic |
| struct | mln_buffer_view |
Macros | |
| #define | MLN_DIAGNOSTIC_MESSAGE_CAPACITY 4096u |
| #define | MLN_HANDLE_NULL ((uint64_t)0) |
| #define | MLN_C_VERSION 0u |
| #define | MLN_STRIDED_AT(type, items, stride, index) |
Typedefs | |
| typedef enum mln_status | mln_status |
| typedef struct mln_diagnostic | mln_diagnostic |
| typedef enum mln_render_backend_flag | mln_render_backend_flag |
| typedef uint32_t | mln_render_backend_flags |
| typedef uint64_t | mln_runtime |
| typedef uint64_t | mln_map |
| typedef uint64_t | mln_style_expression |
| typedef uint64_t | mln_offscreen_device |
| typedef uint64_t | mln_vulkan_device |
| typedef uint64_t | mln_map_projection |
| typedef uint64_t | mln_resource_request |
| typedef uint64_t | mln_resource_transform_request |
| typedef uint64_t | mln_render_session |
| typedef uint64_t | mln_acquired_frame |
| typedef uint64_t | mln_render_frame_batch |
| typedef uint64_t | mln_frame_pacer |
| typedef uint64_t | mln_delivery_queue |
| typedef struct mln_buffer_view | mln_buffer_view |
| typedef void(*) | mln_user_data_release(void *user_data) |
Enumerations | |
| enum | mln_status : int32_t { MLN_STATUS_OK = 0 , MLN_STATUS_INVALID_ARGUMENT = -1 , MLN_STATUS_INVALID_STATE = -2 , MLN_STATUS_WRONG_THREAD = -3 , MLN_STATUS_UNSUPPORTED = -4 , MLN_STATUS_NATIVE_ERROR = -5 , MLN_STATUS_CANCELLED = -6 , MLN_STATUS_BUSY = -7 , MLN_STATUS_TARGET_LOST = -8 , MLN_STATUS_NOT_FOUND = -10 , MLN_STATUS_ALREADY_EXISTS = -11 } |
| enum | mln_render_backend_flag : uint32_t { MLN_RENDER_BACKEND_FLAG_METAL = 1u << 0u , MLN_RENDER_BACKEND_FLAG_VULKAN = 1u << 1u , MLN_RENDER_BACKEND_FLAG_OPEN_GL = 1u << 2u , MLN_RENDER_BACKEND_FLAG_WEB_GPU = 1u << 3u } |
Functions | |
| uint32_t | mln_c_version (void) |
| mln_render_backend_flags | mln_supported_render_backend_mask (void) |
Statuses, diagnostics, handles, and other types that every header uses.
| #define MLN_C_VERSION 0u |
The API epoch of these headers.
| #define MLN_DIAGNOSTIC_MESSAGE_CAPACITY 4096u |
The size of a diagnostic message in bytes, with its terminator.
| #define MLN_HANDLE_NULL ((uint64_t)0) |
The handle that names no object.
| #define MLN_STRIDED_AT | ( | type, | |
| items, | |||
| stride, | |||
| index ) |
Points at item index of an array whose items are stride bytes apart.
Use it to read arrays whose item size native reports, such as a completion's value, because a newer library can return larger items.
| typedef uint64_t mln_acquired_frame |
A rendered frame that the caller holds to read or show.
| typedef struct mln_buffer_view mln_buffer_view |
A range of bytes, such as UTF-8 text.
Lifetimes: data can be null when size is 0. Text ends at size and needs no NUL terminator.
| typedef uint64_t mln_delivery_queue |
A queue that holds callback calls until the caller dispatches them.
| typedef struct mln_diagnostic mln_diagnostic |
A message that explains why a call failed.
Lifetimes: A function writes a NUL-terminated message, or an empty one when it succeeds. Pass null as out_diagnostic to skip the message.
| typedef uint64_t mln_frame_pacer |
Demands render sessions' frames at a display's refreshes.
| typedef uint64_t mln_map |
A map, with its style and camera.
| typedef uint64_t mln_map_projection |
A camera view for converting between screen points and coordinates.
| typedef uint64_t mln_offscreen_device |
A GPU device that the library creates to render maps offscreen.
| typedef enum mln_render_backend_flag mln_render_backend_flag |
A render backend, as a bit in a set.
| typedef uint32_t mln_render_backend_flags |
A set of mln_render_backend_flag bits.
| typedef uint64_t mln_render_frame_batch |
The frame results that mln_render_session_drain_frame_results() took.
| typedef uint64_t mln_render_session |
A render session draws a map into a surface or a texture.
| typedef uint64_t mln_resource_request |
A resource load that a resource provider answers.
| typedef uint64_t mln_resource_transform_request |
A URL rewrite that a resource transform answers with the URL to load.
| typedef uint64_t mln_runtime |
A runtime owns maps and the network and cache settings that they share.
| typedef enum mln_status mln_status |
The result of a call or of asynchronous work.
| typedef uint64_t mln_style_expression |
A parsed style expression.
| typedef void(*) mln_user_data_release(void *user_data) |
Frees the user_data of a callback registration.
Lifetimes: Native calls it once, after the last call to the registration's callback. When the function that takes the registration fails, native never calls it, and the caller still owns user_data.
| typedef uint64_t mln_vulkan_device |
A Vulkan instance, device, and queue that the library creates and owns.
| enum mln_render_backend_flag : uint32_t |
| enum mln_status : int32_t |
The result of a call or of asynchronous work.
| uint32_t mln_c_version | ( | void | ) |
Returns the API epoch of the library.
Headers and a library with different epochs aren't compatible. Compare the result with MLN_C_VERSION.
| mln_render_backend_flags mln_supported_render_backend_mask | ( | void | ) |
Returns the render backends that this build of the library draws with.