7#ifndef MAPLIBRE_NATIVE_C_MAP_H
8#define MAPLIBRE_NATIVE_C_MAP_H
27 MLN_CAMERA_OPTION_CENTER = 1U << 0U,
28 MLN_CAMERA_OPTION_ZOOM = 1U << 1U,
29 MLN_CAMERA_OPTION_BEARING = 1U << 2U,
30 MLN_CAMERA_OPTION_PITCH = 1U << 3U,
31 MLN_CAMERA_OPTION_CENTER_ALTITUDE = 1U << 4U,
32 MLN_CAMERA_OPTION_PADDING = 1U << 5U,
33 MLN_CAMERA_OPTION_ANCHOR = 1U << 6U,
34 MLN_CAMERA_OPTION_ROLL = 1U << 7U,
35 MLN_CAMERA_OPTION_FOV = 1U << 8U,
40 MLN_ANIMATION_OPTION_DURATION = 1U << 0U,
41 MLN_ANIMATION_OPTION_VELOCITY = 1U << 1U,
42 MLN_ANIMATION_OPTION_MIN_ZOOM = 1U << 2U,
43 MLN_ANIMATION_OPTION_EASING = 1U << 3U,
44 MLN_ANIMATION_OPTION_TRANSITION_ID = 1U << 4U,
51 MLN_CAMERA_FIT_OPTION_PADDING = 1U << 0U,
52 MLN_CAMERA_FIT_OPTION_BEARING = 1U << 1U,
53 MLN_CAMERA_FIT_OPTION_PITCH = 1U << 2U,
64 MLN_BOUND_OPTION_MIN_ZOOM = 1U << 1U,
65 MLN_BOUND_OPTION_MAX_ZOOM = 1U << 2U,
66 MLN_BOUND_OPTION_MIN_PITCH = 1U << 3U,
67 MLN_BOUND_OPTION_MAX_PITCH = 1U << 4U,
82 MLN_FREE_CAMERA_OPTION_POSITION = 1U << 0U,
83 MLN_FREE_CAMERA_OPTION_ORIENTATION = 1U << 1U,
88 MLN_PROJECTION_MODE_AXONOMETRIC = 1U << 0U,
89 MLN_PROJECTION_MODE_X_SKEW = 1U << 1U,
90 MLN_PROJECTION_MODE_Y_SKEW = 1U << 2U,
95 MLN_MAP_DEBUG_TILE_BORDERS = 1U << 1U,
96 MLN_MAP_DEBUG_PARSE_STATUS = 1U << 2U,
97 MLN_MAP_DEBUG_TIMESTAMPS = 1U << 3U,
98 MLN_MAP_DEBUG_COLLISION = 1U << 4U,
99 MLN_MAP_DEBUG_OVERDRAW = 1U << 5U,
100 MLN_MAP_DEBUG_STENCIL_CLIP = 1U << 6U,
101 MLN_MAP_DEBUG_DEPTH_BUFFER = 1U << 7U,
106 MLN_NORTH_ORIENTATION_UP = 0,
107 MLN_NORTH_ORIENTATION_RIGHT = 1,
108 MLN_NORTH_ORIENTATION_DOWN = 2,
109 MLN_NORTH_ORIENTATION_LEFT = 3,
114 MLN_CONSTRAIN_MODE_NONE = 0,
115 MLN_CONSTRAIN_MODE_HEIGHT_ONLY = 1,
116 MLN_CONSTRAIN_MODE_WIDTH_AND_HEIGHT = 2,
117 MLN_CONSTRAIN_MODE_SCREEN = 3,
122 MLN_VIEWPORT_MODE_DEFAULT = 0,
123 MLN_VIEWPORT_MODE_FLIPPED_Y = 1,
130 MLN_MAP_VIEWPORT_OPTION_NORTH_ORIENTATION = 1U << 0U,
131 MLN_MAP_VIEWPORT_OPTION_CONSTRAIN_MODE = 1U << 1U,
132 MLN_MAP_VIEWPORT_OPTION_VIEWPORT_MODE = 1U << 2U,
133 MLN_MAP_VIEWPORT_OPTION_FRUSTUM_OFFSET = 1U << 3U,
138 MLN_TILE_LOD_MODE_DEFAULT = 0,
139 MLN_TILE_LOD_MODE_DISTANCE = 1,
144 MLN_MAP_TILE_OPTION_PREFETCH_ZOOM_DELTA = 1U << 0U,
145 MLN_MAP_TILE_OPTION_LOD_MIN_RADIUS = 1U << 1U,
146 MLN_MAP_TILE_OPTION_LOD_SCALE = 1U << 2U,
147 MLN_MAP_TILE_OPTION_LOD_PITCH_THRESHOLD = 1U << 3U,
148 MLN_MAP_TILE_OPTION_LOD_ZOOM_SHIFT = 1U << 4U,
149 MLN_MAP_TILE_OPTION_LOD_MODE = 1U << 5U,
240 uint32_t fields
MLN_BINDING(
"enum=mln_camera_option_field");
242 double center_altitude
243 MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_OPTION_CENTER_ALTITUDE");
245 MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_OPTION_PADDING");
248 MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_OPTION_ANCHOR");
249 double zoom
MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_OPTION_ZOOM");
250 double bearing
MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_OPTION_BEARING");
251 double pitch
MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_OPTION_PITCH");
252 double roll
MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_OPTION_ROLL");
253 double field_of_view
MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_OPTION_FOV");
303MLN_BINDING(
"delivery=MLN_DELIVERY_TYPE_CAMERA_TRANSITION_END")
336 "kind=callback_registration;release=release_user_data"
341 uint32_t fields
MLN_BINDING(
"enum=mln_animation_option_field");
350 MLN_BINDING(
"mask=fields;bit=MLN_ANIMATION_OPTION_DURATION");
361 MLN_BINDING(
"mask=fields;bit=MLN_ANIMATION_OPTION_EASING");
372 MLN_BINDING(
"mask=fields;bit=MLN_ANIMATION_OPTION_TRANSITION_ID");
400 MLN_CAMERA_UPDATE_MODE_JUMP = 0,
401 MLN_CAMERA_UPDATE_MODE_EASE = 1,
402 MLN_CAMERA_UPDATE_MODE_FLY = 2,
432 MLN_CAMERA_DELTA_OFFSET = 1U << 0U,
433 MLN_CAMERA_DELTA_SCALE = 1U << 1U,
434 MLN_CAMERA_DELTA_BEARING = 1U << 2U,
435 MLN_CAMERA_DELTA_PITCH = 1U << 3U,
436 MLN_CAMERA_DELTA_ANCHOR = 1U << 4U,
466 uint32_t fields
MLN_BINDING(
"enum=mln_camera_delta_field");
469 MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_DELTA_OFFSET");
481 MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_DELTA_ANCHOR");
483 uint32_t gesture_phase
MLN_BINDING(
"enum=mln_gesture_phase");
494 uint32_t mode
MLN_BINDING(
"enum=mln_camera_update_mode");
497 uint32_t gesture_phase
MLN_BINDING(
"enum=mln_gesture_phase");
504 uint32_t fields
MLN_BINDING(
"enum=mln_camera_fit_option_field");
506 MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_FIT_OPTION_PADDING");
507 double bearing
MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_FIT_OPTION_BEARING");
508 double pitch
MLN_BINDING(
"mask=fields;bit=MLN_CAMERA_FIT_OPTION_PITCH");
529 uint32_t fields
MLN_BINDING(
"enum=mln_free_camera_option_field");
531 MLN_BINDING(
"mask=fields;bit=MLN_FREE_CAMERA_OPTION_POSITION");
533 MLN_BINDING(
"mask=fields;bit=MLN_FREE_CAMERA_OPTION_ORIENTATION");
540 MLN_FEATURE_STATE_SELECTOR_SOURCE_LAYER_ID = 1U << 0U,
541 MLN_FEATURE_STATE_SELECTOR_FEATURE_ID = 1U << 1U,
542 MLN_FEATURE_STATE_SELECTOR_STATE_KEY = 1U << 2U,
548 uint32_t fields
MLN_BINDING(
"enum=mln_feature_state_selector_field");
553 MLN_BINDING(
"mask=fields;bit=MLN_FEATURE_STATE_SELECTOR_SOURCE_LAYER_ID");
560 MLN_BINDING(
"mask=fields;bit=MLN_FEATURE_STATE_SELECTOR_FEATURE_ID");
563 MLN_BINDING(
"mask=fields;bit=MLN_FEATURE_STATE_SELECTOR_STATE_KEY");
575 uint32_t fields
MLN_BINDING(
"enum=mln_bound_option_field");
578 MLN_BINDING(
"mask=fields;bit=MLN_BOUND_OPTION_BOUNDS");
579 double min_zoom
MLN_BINDING(
"mask=fields;bit=MLN_BOUND_OPTION_MIN_ZOOM");
580 double max_zoom
MLN_BINDING(
"mask=fields;bit=MLN_BOUND_OPTION_MAX_ZOOM");
581 double min_pitch
MLN_BINDING(
"mask=fields;bit=MLN_BOUND_OPTION_MIN_PITCH");
582 double max_pitch
MLN_BINDING(
"mask=fields;bit=MLN_BOUND_OPTION_MAX_PITCH");
597 bool include_ideographs;
613 bool include_ideographs;
619 MLN_BINDING(
"variant=MLN_OFFLINE_REGION_DEFINITION_TILE_PYRAMID");
621 MLN_BINDING(
"variant=MLN_OFFLINE_REGION_DEFINITION_GEOMETRY");
640 mln_offline_region_id id;
644 size_t metadata_size;
667MLN_BINDING(
"execution=operation;result=mln_offline_region_info")
670 const uint8_t* metadata
MLN_BINDING(
"length=metadata_size;encoding=bytes"),
696MLN_BINDING(
"execution=query;result=mln_offline_region_info;nullable=true")
698 mln_runtime runtime, mln_offline_region_id region_id,
720MLN_BINDING(
"execution=query;result=mln_offline_region_info;shape=array")
760MLN_BINDING(
"execution=operation;result=mln_offline_region_info;shape=array")
786MLN_BINDING(
"execution=operation;result=mln_offline_region_info")
788 mln_runtime runtime, mln_offline_region_id region_id,
789 const uint8_t* metadata
MLN_BINDING(
"length=metadata_size;encoding=bytes"),
812MLN_BINDING(
"execution=query;result=mln_offline_region_status")
814 mln_runtime runtime, mln_offline_region_id region_id,
840 mln_runtime runtime, mln_offline_region_id region_id,
bool observed,
865 mln_runtime runtime, mln_offline_region_id region_id,
866 uint32_t state
MLN_BINDING(
"enum=mln_offline_region_download_state"),
889 mln_runtime runtime, mln_offline_region_id region_id,
914 mln_runtime runtime, mln_offline_region_id region_id,
939 uint32_t fields
MLN_BINDING(
"enum=mln_projection_mode_field");
942 MLN_BINDING(
"mask=fields;bit=MLN_PROJECTION_MODE_AXONOMETRIC");
952 uint32_t fields
MLN_BINDING(
"enum=mln_map_viewport_option_field");
955 "mask=fields;bit=MLN_MAP_VIEWPORT_OPTION_NORTH_ORIENTATION;"
956 "enum=mln_north_orientation"
960 "mask=fields;bit=MLN_MAP_VIEWPORT_OPTION_CONSTRAIN_MODE;"
961 "enum=mln_constrain_mode"
965 "mask=fields;bit=MLN_MAP_VIEWPORT_OPTION_VIEWPORT_MODE;"
966 "enum=mln_viewport_mode"
969 MLN_BINDING(
"mask=fields;bit=MLN_MAP_VIEWPORT_OPTION_FRUSTUM_OFFSET");
1010 uint32_t fields
MLN_BINDING(
"enum=mln_map_tile_option_field");
1013 MLN_BINDING(
"mask=fields;bit=MLN_MAP_TILE_OPTION_PREFETCH_ZOOM_DELTA");
1014 double lod_min_radius
1015 MLN_BINDING(
"mask=fields;bit=MLN_MAP_TILE_OPTION_LOD_MIN_RADIUS");
1016 double lod_scale
MLN_BINDING(
"mask=fields;bit=MLN_MAP_TILE_OPTION_LOD_SCALE");
1017 double lod_pitch_threshold
1018 MLN_BINDING(
"mask=fields;bit=MLN_MAP_TILE_OPTION_LOD_PITCH_THRESHOLD");
1019 double lod_zoom_shift
1020 MLN_BINDING(
"mask=fields;bit=MLN_MAP_TILE_OPTION_LOD_ZOOM_SHIFT");
1023 "mask=fields;bit=MLN_MAP_TILE_OPTION_LOD_MODE;enum=mln_tile_lod_mode"
1039 uint64_t generation;
1042 bool rendering_stats_view_enabled;
1061 uint64_t event_mask
MLN_BINDING(
"enum=mln_runtime_event_mask");
1094 uint64_t generation;
1301MLN_BINDING(
"execution=query;result=mln_buffer_view;encoding=json")
1471MLN_BINDING(
"execution=query;result=mln_buffer_view;encoding=json")
1491MLN_BINDING(
"execution=query;result=mln_buffer_view")
uint64_t mln_delivery_queue
Definition base.h:178
uint64_t mln_map
Definition base.h:131
void(*) mln_user_data_release(void *user_data)
Definition base.h:205
uint64_t mln_runtime
Definition base.h:126
mln_status
Definition base.h:61
#define MLN_BINDING(contract)
Definition binding.h:17
mln_status mln_runtime_create_map(mln_runtime runtime, const mln_map_options *options, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_map_mode
Definition map.h:153
@ MLN_MAP_MODE_STATIC
Definition map.h:157
@ MLN_MAP_MODE_TILE
Definition map.h:159
@ MLN_MAP_MODE_CONTINUOUS
Definition map.h:155
mln_status mln_map_end_command_group(mln_map map, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_runtime_get_offline_region(mln_runtime runtime, mln_offline_region_id region_id, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_runtime_update_offline_region_metadata(mln_runtime runtime, mln_offline_region_id region_id, const uint8_t *metadata, size_t metadata_size, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_runtime_delete_offline_region(mln_runtime runtime, mln_offline_region_id region_id, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_map_options mln_map_options_default(void)
mln_feature_state_selector_field
Definition map.h:539
mln_status mln_map_request_still_image(mln_map map, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_map_remove_feature_state(mln_map map, const mln_feature_state_selector *selector, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_camera_option_field
Definition map.h:26
mln_viewport_mode
Definition map.h:121
mln_projection_mode_field
Definition map.h:87
mln_status mln_map_request_repaint(mln_map map, const mln_completion *completion, mln_diagnostic *out_diagnostic)
void(*) mln_camera_transition_end_callback(void *user_data, const mln_camera_transition_end *end)
Definition map.h:304
mln_status mln_map_release(mln_map map, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_camera_fit_option_field
Definition map.h:50
mln_status mln_map_begin_command_group(mln_map map, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_runtime_invalidate_offline_region(mln_runtime runtime, mln_offline_region_id region_id, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_tile_lod_mode
Definition map.h:137
mln_logical_extent mln_logical_extent_default(void)
mln_status mln_runtime_set_offline_region_download_state(mln_runtime runtime, mln_offline_region_id region_id, uint32_t state, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_camera_update_mode
Definition map.h:399
mln_status mln_map_set_style_json(mln_map map, mln_buffer_view json, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_map_get_feature_state(mln_map map, const mln_feature_state_selector *selector, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_map_set_event_mask(mln_map map, uint64_t mask, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_camera_transition_outcome
Definition map.h:265
@ MLN_CAMERA_TRANSITION_OUTCOME_CLOSED
Definition map.h:278
@ MLN_CAMERA_TRANSITION_OUTCOME_CANCELLED
Definition map.h:276
@ MLN_CAMERA_TRANSITION_OUTCOME_COMPLETED
Definition map.h:270
mln_status mln_map_get_snapshot(mln_map map, mln_map_snapshot *out_snapshot, mln_diagnostic *out_diagnostic)
mln_status mln_runtime_merge_offline_regions(mln_runtime runtime, mln_buffer_view side_database_path, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_map_resize(mln_map map, mln_logical_extent extent, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_gesture_phase
Definition map.h:411
@ MLN_GESTURE_PHASE_NONE
Definition map.h:413
@ MLN_GESTURE_PHASE_END
Definition map.h:422
@ MLN_GESTURE_PHASE_UPDATE
Definition map.h:420
@ MLN_GESTURE_PHASE_CANCEL
Definition map.h:427
@ MLN_GESTURE_PHASE_BEGIN
Definition map.h:418
mln_bound_option_field
Definition map.h:57
@ MLN_BOUND_OPTION_UNBOUNDED
Definition map.h:75
@ MLN_BOUND_OPTION_BOUNDS
Definition map.h:63
mln_status mln_map_get_loaded_style_json(mln_map map, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_map_viewport_option_field
Definition map.h:129
mln_animation_option_field
Definition map.h:39
mln_constrain_mode
Definition map.h:113
mln_map_tile_option_field
Definition map.h:143
mln_status mln_map_set_feature_state(mln_map map, const mln_feature_state_selector *selector, mln_buffer_view state, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_map_dispose(mln_map map, mln_diagnostic *out_diagnostic)
mln_status mln_runtime_create_offline_region(mln_runtime runtime, const mln_offline_region_definition *definition, const uint8_t *metadata, size_t metadata_size, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_runtime_list_offline_regions(mln_runtime runtime, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_map_set_style_url(mln_map map, mln_buffer_view url, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_map_debug_option
Definition map.h:94
mln_north_orientation
Definition map.h:105
mln_camera_delta_field
Definition map.h:431
mln_status mln_map_get_style_url(mln_map map, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_runtime_set_offline_region_observed(mln_runtime runtime, mln_offline_region_id region_id, bool observed, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_runtime_get_offline_region_status(mln_runtime runtime, mln_offline_region_id region_id, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_free_camera_option_field
Definition map.h:81
mln_camera_transition_handler end_handler
Definition map.h:395
double duration_ms
Definition map.h:350
double velocity
Definition map.h:357
double min_zoom
Definition map.h:359
uint64_t transition_id
Definition map.h:372
mln_lat_lng_bounds bounds
Definition map.h:578
mln_screen_point anchor
Definition map.h:481
mln_screen_point offset
Definition map.h:469
double bearing
Definition map.h:473
double scale
Definition map.h:471
double pitch
Definition map.h:475
mln_screen_point anchor
Definition map.h:248
uint64_t generation
Definition map.h:294
uint32_t outcome
Definition map.h:287
mln_user_data_release release_user_data
Definition map.h:325
mln_delivery_queue queue
Definition map.h:334
void * user_data
Definition map.h:319
Definition completion.h:121
mln_buffer_view source_id
Definition map.h:550
mln_buffer_view state_key
Definition map.h:563
mln_buffer_view source_layer_id
Definition map.h:553
mln_buffer_view feature_id
Definition map.h:560
double longitude
Definition map.h:234
double latitude
Definition map.h:232
double scale_factor
Definition map.h:168
uint32_t height
Definition map.h:166
uint32_t width
Definition map.h:164
uint32_t map_mode
Definition map.h:186
bool fast_pfor_enabled
Definition map.h:197
mln_logical_extent initial_extent
Definition map.h:184
uint64_t event_mask
Definition map.h:209
mln_map_view view
Definition map.h:1089
bool transition_in_progress
Definition map.h:1060
uint32_t debug_options
Definition map.h:1038
bool fully_loaded
Definition map.h:1041
uint64_t latest_render_update_generation
Definition map.h:1081
bool gesture_in_progress
Definition map.h:1050
uint32_t lod_mode
Definition map.h:1024
uint32_t prefetch_zoom_delta
Definition map.h:1013
mln_map_viewport_options viewport
Definition map.h:1004
mln_logical_extent extent
Definition map.h:997
mln_projection_mode projection_mode
Definition map.h:999
mln_camera_options camera
Definition map.h:992
uint32_t viewport_mode
Definition map.h:967
uint32_t north_orientation
Definition map.h:957
uint32_t constrain_mode
Definition map.h:962
mln_buffer_view geometry
Definition map.h:605
double max_zoom
Definition map.h:611
mln_buffer_view style_url
Definition map.h:603
uint32_t type
Definition map.h:628
const uint8_t * metadata
Definition map.h:643
double max_zoom
Definition map.h:595
mln_buffer_view style_url
Definition map.h:588
double northing
Definition map.h:926
double easting
Definition map.h:928
double x_skew
Definition map.h:944
bool axonometric
Definition map.h:942
double y_skew
Definition map.h:946