|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
#include <runtime.h>
Data Fields | |
| mln_resource_request_cancel_callback | callback |
| void * | user_data |
| mln_user_data_release | release_user_data |
| mln_delivery_queue | queue |
Cancel callback or queue state for one handled resource request.
The struct itself is borrowed for the registering call. Exactly one of callback and queue is set.
| mln_resource_request_cancel_callback mln_resource_request_cancel_handler::callback |
Required in callback mode; null in queue mode.
| mln_delivery_queue mln_resource_request_cancel_handler::queue |
Optional. Queue delivery in place of callback: a cancel is copied into one MLN_DELIVERY_TYPE_RESOURCE_REQUEST_CANCEL delivery carrying user_data, and one MLN_DELIVERY_TYPE_RETIRED delivery follows where callback mode runs release_user_data. The registration rejects an invalid queue handle with MLN_STATUS_INVALID_ARGUMENT and a released queue with MLN_STATUS_INVALID_STATE.
| mln_user_data_release mln_resource_request_cancel_handler::release_user_data |
Optional. Releases user_data exactly once for an accepted registration, after the callback can no longer run: when the callback returns, on the thread that ran it, or when the request is released without the callback having run, on the releasing thread. It never runs for a rejected registration or for a request that was already cancelled. Null in queue mode.
| void* mln_resource_request_cancel_handler::user_data |
Opaque host token in queue mode; native code never dereferences it.