Namespace

MaplibreNativeFfi – 0

GObject bindings for MapLibre Native

VersionUnknown
AuthorsMapLibre contributors
LicenseBSD-2-Clause
Websitehttps://maplibre.org/maplibre-native-ffi/
Sourcehttps://github.com/maplibre/maplibre-native-ffi/

Build

C headersmaplibre-native-ffi.h
pkg-config filesmaplibre-native-ffi-gobject-0

Dependencies

GObject—2.0 The base type system library
Browse documentation
Gio—2.0 GObject interfaces and objects
Browse documentation

Additional documentation

Classes

AcquiredFrame

A rendered frame that the caller holds to read or show.

AnchoredMomentum

How a gesture’s zoom, bearing, or pitch keeps changing after release.

AnimationOptions

How a camera change animates.

BoundOptions

Limits on the camera, for maplibre_native_ffi_map_set_bounds_async().

CameraDelta

A change to the camera from where it is now, for gestures.

CameraFitOptions

Options for finding the camera that fits an area.

CameraFitUpdate

A camera change that fits an area, for maplibre_native_ffi_map_fit_camera_to_lat_lng_bounds_async() and the other fit commands.

CameraOptions

A camera, with only the members that fields selects.

CameraUpdate

A camera change for maplibre_native_ffi_map_update_camera_async().

CustomGeometrySourceOptions

The callbacks and options of a custom geometry source.

CustomVectorSourceOptions

The callbacks and options of a custom vector source.

DmaBufRingDescriptor

A ring of dmabufs that the library allocates, for maplibre_native_ffi_map_attach_dma_buf_ring().

EglContextDescriptor

The EGL objects that a render session makes its OpenGL context from.

FeatureStateSelector

The features whose state to set, read, or remove.

FramePacer

Demands render sessions’ frames at a display’s refreshes.

FramePacerOptions

Options for creating a frame pacer.

FreeCameraOptions

The camera’s position and orientation in three dimensions.

GeoJsonSourceOptions

Options for a GeoJSON [source](https://maplibre.org/maplibre-style-spec/sources/#geojson).

GestureMomentum

How a gesture keeps moving the camera after the user lets go.

HttpHeader

An HTTP header.

HttpHeaderRule

Headers to add to the HTTP requests whose URL matches a pattern.

IoSurfaceRingDescriptor

A ring of IOSurfaces that the library allocates, for maplibre_native_ffi_map_attach_io_surface_ring().

LogHandler

A log callback, for maplibre_native_ffi_set_log_callback().

Map

A map, with its style and camera.

MapOptions

Options for maplibre_native_ffi_runtime_create_map().

MapProjection

A camera view for converting between screen points and coordinates.

MapTileOptions

How the map picks the tiles to load.

MapViewportOptions

How the map orients and constrains its view.

MetalBorrowedTexture

A Metal texture of a borrowed ring.

MetalBorrowedTextureDescriptor

A ring of your Metal textures, for maplibre_native_ffi_map_attach_metal_borrowed_texture().

MetalBorrowedTextureReplacement

New Metal textures for a borrowed ring, for maplibre_native_ffi_render_session_set_metal_borrowed_texture_target_async().

MetalContextDescriptor

The Metal device that a render session uses.

MetalSurfaceDescriptor

A Metal layer to render to, for maplibre_native_ffi_map_attach_metal_surface().

MetalSurfaceReplacement

A new Metal layer for maplibre_native_ffi_render_session_set_metal_surface_target_async().

MomentumDecay

How one part of a gesture’s momentum slows from its release speed.

MomentumSnap

Where a part settles after a gesture that changed it.

OfflineGeometryRegionDefinition

An offline region that covers a GeoJSON geometry.

OfflineTilePyramidRegionDefinition

An offline region that covers a rectangle of the map.

OffscreenDevice

A GPU device that the library creates to render maps offscreen.

OffscreenDeviceOptions

Options for maplibre_native_ffi_offscreen_device_create().

OpenGlBorrowedTextureDescriptor

A ring of your OpenGL textures, for maplibre_native_ffi_map_attach_open_gl_borrowed_texture().

OpenGlBorrowedTextureReplacement

New OpenGL textures for a borrowed ring, for maplibre_native_ffi_render_session_set_open_gl_borrowed_texture_target_async().

OpenGlContextDescriptor

How a render session gets the OpenGL context that it renders with.

OpenGlSurfaceDescriptor

An OpenGL surface to present to, for maplibre_native_ffi_map_attach_open_gl_surface().

OpenGlSurfaceReplacement

A new OpenGL surface for maplibre_native_ffi_render_session_set_open_gl_surface_target_async().

PanMomentum

How a gesture’s pan keeps moving the map’s content after release.

PremultipliedRgba8Image

An image of 8-bit RGBA pixels whose colors are multiplied by their alpha.

ProjectionModeOptions

Settings that skew the map or draw it without perspective.

RenderedFeatureQueryOptions

Options for a rendered feature query.

RenderSession

A render session draws a map into a surface or a texture.

RenderSessionAttachOptions

Options for attaching a render session to a map.

ResourceRequest

A resource load that a resource provider answers.

ResourceResponse

The answer to a resource request.

ResourceRoute

The requests that a resource provider serves.

ResourceTransformError

Why a resource transform fails a request.

ResourceTransformRequest

A URL rewrite that a resource transform answers with the URL to load.

ResourceTransformRule

Query parameters to add to the URLs of requests that match a pattern.

Runtime

A runtime owns maps and the network and cache settings that they share.

RuntimeOptions

Options for maplibre_native_ffi_runtime_create().

ScreenLineString

A line through points on the screen.

SourceFeatureQueryOptions

Options for a source feature query.

StyleExpression

A parsed style expression.

StyleExpressionInputs

The inputs that a style expression reads while it evaluates.

StyleExpressionOptions

Options for parsing a style expression.

StyleImageOptions

Options for a style image, as the [sprite](https://maplibre.org/maplibre-style-spec/sprite/) spec describes them.

StyleTransitionOptions

The default [transition](https://maplibre.org/maplibre-style-spec/transition/) for changes to a style’s paint properties.

UrlQueryParameter

A query parameter that a resource transform rule adds to a URL.

VulkanBorrowedTextureDescriptor

A ring of your Vulkan images, for maplibre_native_ffi_map_attach_vulkan_borrowed_texture().

VulkanBorrowedTextureReplacement

New Vulkan images for a borrowed ring, for maplibre_native_ffi_render_session_set_vulkan_borrowed_texture_target_async().

VulkanContextDescriptor

The Vulkan device and queue that a render session uses.

VulkanDevice

A Vulkan instance, device, and queue that the library creates and owns.

VulkanDeviceOptions

Options for maplibre_native_ffi_vulkan_device_create().

VulkanSurfaceDescriptor

A Vulkan surface to present to, for maplibre_native_ffi_map_attach_vulkan_surface().

WaylandSurfaceDescriptor

A Wayland surface to present to, for maplibre_native_ffi_map_attach_wayland_surface().

WaylandSurfaceReplacement

A new Wayland surface for maplibre_native_ffi_render_session_set_wayland_surface_target_async().

WebGlContextDescriptor

The WebGL context or canvas that a render session uses.

WglContextDescriptor

The WGL objects that a render session makes its OpenGL context from.

Structs

Camera

A map’s whole camera.

CameraBounds

All the limits on a map’s camera.

CameraQueryResult

A map’s camera, with the snapshot generation that it matches.

CameraTransitionEnd

The end of a camera change.

CameraTransitionHandler

A callback for the end of a camera change, for MaplibreNativeFfiAnimationOptions.

CameraVelocity

How fast each part of a camera change moves.

CanonicalTileId

A tile’s zoom level z, column x, and row y, with row 0 at the north.

CommandCompletion

The result of a command that finished.

DmaBufFormat

A DRM format and modifier that you can import.

DmaBufFrame

The dmabuf of an acquired frame.

DmaBufPlane

Where one plane of a dmabuf keeps its data.

EdgeInsets

Distances in logical pixels from each edge of the map.

FeatureId

The ID of a feature in a source, as the source’s data gives it.

FrameDemand

A demand for one frame.

FreeCamera

A map camera’s whole position and orientation in three dimensions.

GpuSync

A point in GPU work that the other side waits for before using a texture.

HttpHeaderTransform

Headers to add to HTTP requests, for maplibre_native_ffi_runtime_set_http_header_transform_async().

ImageContent

The area of an image, in image pixels, that text fits inside.

ImageStretch

A range of image pixels, from from to to, that stretches to fit text.

IoSurfaceFrame

The IOSurface of an acquired frame.

LatLng

A geographic coordinate, in degrees.

LatLngBounds

A rectangle of coordinates, from its southwest to its northeast corner.

LogicalExtent

A size in logical pixels, and the physical pixels in each logical pixel.

LogicalSize

A size in logical pixels, which the map’s scale factor turns into pixels.

MapProjectionCameraResult

A projection’s camera, as maplibre_native_ffi_map_projection_get_camera() reports it.

MapSnapshot

A map’s state, as maplibre_native_ffi_map_get_snapshot() reads it.

MapTileSettings

All the settings for how a map picks the tiles to load.

MapView

One view of a map: its camera, size, and projection.

MapViewport

A map’s whole viewport.

MetalTextureFrame

The Metal texture of an acquired frame.

OfflineRegionDefinition

The area, zoom range, and style that an offline region covers.

OfflineRegionInfo

An offline region in the runtime’s cache file.

OfflineRegionStatus

The download progress of an offline region.

OffscreenDescriptor

The image that maplibre_native_ffi_map_attach_offscreen() renders. The session renders it at the map’s scale factor.

OpenGlBorrowedTexture

An OpenGL texture of a borrowed ring.

OpenGlContextDescriptorData

The WGL, EGL, or WebGL part of an OpenGL context descriptor.

OpenGlTextureFrame

The OpenGL texture of an acquired frame.

ProjectedMeters

A point in the Web Mercator projection, in meters.

ProjectionMode

A map’s whole projection mode.

Quaternion

A rotation, as a quaternion.

QueueLock

Your lock on a Vulkan queue that you and a render session both submit to.

RenderAbandonResult

The outcome of maplibre_native_ffi_render_session_abandon().

RenderedFeature

A feature that a rendered feature query found.

RenderedQueryGeometry

The screen area that a rendered feature query covers.

RenderFrameResult

How one frame demand finished.

RenderingStats

Statistics about the frames that a map renders.

RenderSessionCapabilities

What an attached render session supports.

RenderSessionSnapshot

The state of a render session at one moment.

ResourceProvider

A resource provider, for maplibre_native_ffi_runtime_set_resource_provider_async().

ResourceRange

The bytes from start to end of a resource, both included.

ResourceRequestCancelHandler

A cancel callback, for maplibre_native_ffi_resource_request_set_cancel_callback().

ResourceRequestInfo

A request that a resource provider serves.

ResourceTransform

How to rewrite request URLs, for maplibre_native_ffi_runtime_set_resource_transform_async().

RuntimeEvent

An event that a runtime or one of its maps raised.

RuntimeEventCameraChange

The details of MAPLIBRE_NATIVE_FFI_RUNTIME_EVENT_MAP_CAMERA_WILL_CHANGE and MAPLIBRE_NATIVE_FFI_RUNTIME_EVENT_MAP_CAMERA_DID_CHANGE.

RuntimeEventGlyphs

The details of a glyph event.

RuntimeEventHandler

An event callback, for maplibre_native_ffi_runtime_set_event_handler_async().

RuntimeEventLoadingFailed

The details of MAPLIBRE_NATIVE_FFI_RUNTIME_EVENT_MAP_LOADING_FAILED.

RuntimeEventOfflineRegionResponseError

The details of MAPLIBRE_NATIVE_FFI_RUNTIME_EVENT_OFFLINE_REGION_RESPONSE_ERROR.

RuntimeEventOfflineRegionStatus

The details of MAPLIBRE_NATIVE_FFI_RUNTIME_EVENT_OFFLINE_REGION_STATUS_CHANGED.

RuntimeEventOfflineRegionTileCountLimit

The details of MAPLIBRE_NATIVE_FFI_RUNTIME_EVENT_OFFLINE_REGION_TILE_COUNT_LIMIT_EXCEEDED.

RuntimeEventPayload

The details of an event, in the member that its payload_type names.

RuntimeEventRenderFrame

The details of MAPLIBRE_NATIVE_FFI_RUNTIME_EVENT_MAP_RENDER_FRAME_FINISHED.

RuntimeEventSourceChanged

The details of MAPLIBRE_NATIVE_FFI_RUNTIME_EVENT_MAP_SOURCE_CHANGED.

RuntimeEventSprite

The details of a sprite event.

RuntimeEventStyleImage

The details of MAPLIBRE_NATIVE_FFI_RUNTIME_EVENT_MAP_STYLE_IMAGE_MISSING.

RuntimeEventTileAction

The details of MAPLIBRE_NATIVE_FFI_RUNTIME_EVENT_MAP_TILE_ACTION.

ScreenBox

A rectangle of the screen, from its min corner to its max corner.

ScreenPoint

A point on the screen, in logical pixels from the map’s top-left corner.

SourceFeature

A feature that a source feature query found.

StyleExpressionInfo

What a style expression’s result depends on.

StyleExpressionType

The type of a style expression’s result.

StyleImageInfo

An image in the map’s style.

StyleLayerInfo

A layer in the map’s style.

StyleSourceInfo

A source in the map’s style.

StyleSourceTileInfo

The tiles of a source, as the style lists them.

TextureImageInfo

The layout of the pixels that maplibre_native_ffi_render_session_read_texture_async() reads.

TextureReadbackResult

The pixels that maplibre_native_ffi_render_session_read_texture_async() reads.

TileId

The ID of a tile.

UnitBezier

A timing curve from (0, 0) to (1, 1), with the control points (x1, y1) and (x2, y2).

Vec3

A vector in three dimensions.

VulkanBorrowedTexture

A Vulkan image of a borrowed ring.

VulkanDeviceContextResult

A Vulkan device’s context, as maplibre_native_ffi_vulkan_device_get_context() reports it.

VulkanSurfaceReplacement

A new Vulkan surface for maplibre_native_ffi_render_session_set_vulkan_surface_target_async().

VulkanTextureFrame

The Vulkan image of an acquired frame.

Wake

A callback that tells the caller when work is ready.

Enumerations

CacheDatabaseOperation

A maintenance action on a runtime’s cache database.

CameraChangeMode

Whether a camera change jumps or animates.

CameraChangeSource

What moved the camera.

CameraTransitionOutcome

How a camera change ended.

CameraUpdateMode

How a camera command moves the camera.

ConstrainMode

How the map keeps the camera within the world or within its bounds.

GesturePhase

Where a camera change falls in a gesture that the user makes.

GpuSyncKind

How one side waits for the other’s GPU work on a shared texture.

LogEvent

The part of the library that logged a message.

LogSeverity

The severity of a log message.

MapLoadError

Why a map failed to load a style.

MapMode

When a map renders.

MomentumDecayModel

How a part of a gesture’s momentum slows from its release speed.

NetworkStatus

Whether the library may use the network.

NorthOrientation

The screen direction that north points to when the bearing is 0.

OfflineRegionDownloadState

Whether an offline region is downloading.

OpenGlClientApi

The OpenGL API that a context renders with.

OpenGlContextOwnership

Whether a render session’s OpenGL context shares objects with yours.

RenderAbandonDisposition

What maplibre_native_ffi_render_session_abandon() did with a session’s graphics objects.

RenderDriverKind

The thread that runs a render session’s graphics work.

RenderMode

Whether a frame drew the map complete, or lacked resources that are still loading.

RenderResult

How a frame demand finished.

RenderSessionState

Where a render session is in its life.

ResourceErrorReason

Why a resource request failed.

ResourceKind

The kind of a resource that the library loads.

ResourceLoadingMethod

Where a request may load its resource from.

ResourcePriority

The priority of a resource request.

ResourceResponseStatus

The outcome of a resource request.

ResourceStoragePolicy

Whether the library keeps a loaded resource in its cache.

ResourceUsage

Whether a request loads a resource for a map or an offline region.

RuntimeEventSourceType

The kind of handle that raised an event.

RuntimeEventType

The kind of an event.

StyleExpressionTypeKind

The type of a style expression’s result, or of the items of an array result.

StyleImageTextFit

How an image stretches to fit text along one axis.

StyleLayerVisibility

Whether a layer shows.

StyleRasterDemEncoding

How a raster DEM tile encodes elevation in its colors.

StyleSourceType

The type of a style source.

StyleTileScheme

Whether a tileset counts tile rows from the north (XYZ) or the south (TMS).

StyleVectorTileEncoding

The format of vector tiles.

TileLodMode

How the map picks the level of detail of its tiles.

TileOperation

A step in loading a tile.

ViewportMode

The vertical direction of the image that the map renders.

VulkanImageOwner

The queue family that a borrowed image goes to after each frame.

WebGlContextKind

How a render session gets its WebGL context.

Bitfields

FrameDemandFlag

How a frame demand behaves.

GpuSyncKindFlag

A GPU sync kind, as a bit in a set.

LogSeverityFlag

A log severity, as a bit in a set.

MapDebugFlag

A debug overlay that the map draws.

OpenGlContextProviderFlag

An OpenGL context platform, as a bit in a set.

RenderBackendFlag

A render backend, as a bit in a set.

RenderSessionCapabilityFlag

Something that a render session can do.

ResourceKindFlag

A resource kind, as a bit in a set.

RuntimeEventFlag

An event type, as a bit in a set.

UrlMatchFlag

How a URL pattern matches a request’s URL.

Error Domains

Error

The result of a call or of asynchronous work.

Callbacks

CameraTransitionEndCallback

Receives the end of a camera change.

CustomSourceCancelTileCallback

Reports that a custom source no longer needs a tile.

CustomSourceFetchTileCallback

Asks for the data of a tile in a custom source.

LogCallback

Receives a log message.

QueueLockCallback

Locks or unlocks the Vulkan queue that you share with a render session.

ResourceProviderCallback

Serves a network request in place of the library.

ResourceRequestCancelCallback

Reports that the library no longer needs a resource request.

ResourceTransformCallback

Rewrites the URL of a network request before the library sends it.

RuntimeEventCallback

Receives a batch of events.

WakeCallback

Tells the caller that work is ready for it.

Functions

c_version

Returns the API epoch of the library.

clear_log_callback

Sends log messages to the platform’s log again, instead of a callback.

get_network_status

Reads whether the library may use the network.

get_plugin_register_function_v1

Returns the function that registers a plugin’s style layer types.

open_gl_supported_context_provider_mask

Reports the OpenGL context platforms that this build of the library has.

set_log_async_severity_mask

Selects the severities that the library logs on a background thread.

set_log_callback

Sends the log messages of every runtime in the process to a callback.

set_network_status

Tells the library whether it may use the network.

supported_render_backend_mask

Returns the render backends that this build of the library draws with.

Constants

DIAGNOSTIC_MESSAGE_CAPACITY

The size of a diagnostic message in bytes, with its terminator.

FRAME_DEMAND_TOKEN_STILL_IMAGE

The token of the frame results that a session adds when it renders an image for maplibre_native_ffi_map_request_still_image_async(). Your own demands can’t use it.

TEXTURE_RING_MAX_DEPTH

The most textures that a render session’s texture ring can have.

VULKAN_NON_DISPATCHABLE_HANDLE_NULL

The null Vulkan non-dispatchable handle.