Method

MaplibreNativeFfiRenderSessionset_wayland_surface_target_async

Declaration [src]

void
maplibre_native_ffi_render_session_set_wayland_surface_target_async (
  MaplibreNativeFfiRenderSession* self,
  MaplibreNativeFfiWaylandSurfaceReplacement* replacement,
  GAsyncReadyCallback callback,
  gpointer user_data
)

Description [src]

Replaces the Wayland surface that the session presents to.

Use it to give the session a surface again after maplibre_native_ffi_render_session_release_target_async(), to move it to another surface, or to resize it. Once the replacement completes, the session no longer uses the old surface.

See mln_render_session_set_wayland_surface_target in the C API reference.

It fails with these errors:

  • MAPLIBRE_NATIVE_FFI_ERROR_UNSUPPORTED when, in a Vulkan build, the new surface needs a different color format than the old one. Attach a new session instead.
  • MAPLIBRE_NATIVE_FFI_ERROR_NATIVE_ERROR when the library can’t present to the new surface.

This method completes asynchronously. Use maplibre_native_ffi_render_session_set_wayland_surface_target_finish() inside the GAsyncReadyCallback to obtain the result of the operation.

Parameters

replacement

Type: MaplibreNativeFfiWaylandSurfaceReplacement

No description available.

The data is owned by the caller of the method.
callback

Type: GAsyncReadyCallback

The callback to call when the call finishes.

The argument can be NULL.
user_data

Type: gpointer

The data to pass to callback.

The argument can be NULL.
The data is owned by the caller of the method.