2022-09-17 14:38:44 +02:00
|
|
|
/*
|
|
|
|
* This an unstable interface of wlroots. No guarantees are made regarding the
|
|
|
|
* future consistency of this API.
|
|
|
|
*/
|
|
|
|
#ifndef WLR_USE_UNSTABLE
|
|
|
|
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WLR_TYPES_WLR_SHM_H
|
|
|
|
#define WLR_TYPES_WLR_SHM_H
|
|
|
|
|
|
|
|
#include <wayland-server-core.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Shared memory buffer interface.
|
|
|
|
*
|
|
|
|
* The buffers created via this interface are not safe to use from different
|
|
|
|
* threads.
|
|
|
|
*
|
|
|
|
* Currently, accessing two buffers concurrently via
|
|
|
|
* wlr_buffer_begin_data_ptr_access() will return an error.
|
|
|
|
*/
|
|
|
|
struct wlr_shm;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create the wl_shm global.
|
2022-11-24 09:54:51 +01:00
|
|
|
*
|
|
|
|
* Compositors using struct wlr_renderer should use wlr_shm_create_with_renderer()
|
|
|
|
* instead.
|
|
|
|
*/
|
|
|
|
struct wlr_shm *wlr_shm_create(struct wl_display *display, uint32_t version,
|
|
|
|
const uint32_t *formats, size_t formats_len);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create the wl_shm global.
|
|
|
|
*
|
|
|
|
* The pixel formats advertised to clients are taken from the struct wlr_renderer.
|
2022-09-17 14:38:44 +02:00
|
|
|
*/
|
|
|
|
struct wlr_shm *wlr_shm_create_with_renderer(struct wl_display *display,
|
|
|
|
uint32_t version, struct wlr_renderer *renderer);
|
|
|
|
|
|
|
|
#endif
|