|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
Go to the source code of this file.
Data Structures | |
| struct | mln_wayland_surface_descriptor |
| struct | mln_wayland_surface_replacement |
Typedefs | |
| typedef struct mln_wayland_surface_descriptor | mln_wayland_surface_descriptor |
| typedef struct mln_wayland_surface_replacement | mln_wayland_surface_replacement |
Functions | |
| mln_status | mln_map_attach_wayland_surface (mln_map map, const mln_wayland_surface_descriptor *descriptor, mln_vulkan_device device, const mln_render_session_attach_options *options, mln_render_session *out_session, const mln_completion *completion, mln_diagnostic *out_diagnostic) |
| mln_status | mln_render_session_set_wayland_surface_target (mln_render_session session, const mln_wayland_surface_replacement *replacement, const mln_completion *completion, mln_diagnostic *out_diagnostic) |
Present the map to a Wayland surface.
| typedef struct mln_wayland_surface_descriptor mln_wayland_surface_descriptor |
A Wayland surface to present to, for mln_map_attach_wayland_surface().
| typedef struct mln_wayland_surface_replacement mln_wayland_surface_replacement |
A new Wayland surface for mln_render_session_set_wayland_surface_target().
| mln_status mln_map_attach_wayland_surface | ( | mln_map | map, |
| const mln_wayland_surface_descriptor * | descriptor, | ||
| mln_vulkan_device | device, | ||
| const mln_render_session_attach_options * | options, | ||
| mln_render_session * | out_session, | ||
| const mln_completion * | completion, | ||
| mln_diagnostic * | out_diagnostic ) |
Creates a session that presents the map to a Wayland surface, with a graphics context that the library creates.
A Vulkan build presents with device, or, when device is null, with a device that the library creates. An OpenGL build uses an EGL context on the display, and device must be null. Attach with MLN_RENDER_DRIVER_CORE_WORKER.
The session presents without waiting for the compositor, so demand at most one frame per display refresh.
Keep the surface until a release or replacement of the target, or a detach of the session, completes. Keep the display connected until the session's detach completes. In an OpenGL build, if you also use EGL on the display, initialize it before you attach.
Returns:
Completes with:
| mln_status mln_render_session_set_wayland_surface_target | ( | mln_render_session | session, |
| const mln_wayland_surface_replacement * | replacement, | ||
| const mln_completion * | completion, | ||
| mln_diagnostic * | out_diagnostic ) |
Replaces the Wayland surface that the session presents to.
Use it to give the session a surface again after mln_render_session_release_target(), to move it to another surface, or to resize it. Once the replacement completes, the session no longer uses the old surface.
Completes with: