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_UNSUPPORTEDwhen, 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_ERRORwhen 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:
MaplibreNativeFfiWaylandSurfaceReplacementNo description available.
The data is owned by the caller of the method. callback-
Type:
GAsyncReadyCallbackThe callback to call when the call finishes.
The argument can be NULL. user_data-
Type:
gpointerThe data to pass to
callback.The argument can be NULL.The data is owned by the caller of the method.