wayland::server::shm_t(3)
π wayland::server::shm_t(3) π
okay bestie, welcome to the Wayland++ manual β this is the page for wayland::server::shm_t, and it's giving shared-memory support in the cutest server-side way. We're keeping every single detail, no cap. π«Ά
πΈ NAME πΈ
wayland::server::shm_t β shared memory support
β¨ SYNOPSIS β¨
#include <wayland-server-protocol.hpp>
π Public Member Functions
std::function< void(shm_pool_t, int, int32_t)> & on_create_pool ()β create a shm poolvoid format (shm_format const &format, bool post=true)β pixel format descriptionvoid post_invalid_format (std::string const &msg)β Post error: buffer format is not known.void post_invalid_stride (std::string const &msg)β Post error: invalid size or stride during pool or buffer creation.void post_invalid_fd (std::string const &msg)β Post error: mmapping the file descriptor failed.bool proxy_has_object () constβ Check whether this wrapper actually wraps an object.void post_no_memory () constuint32_t get_id () constclient_t get_client () constunsigned int get_version () conststd::string get_class ()
π Static Public Attributes
static constexpr std::uint32_t format_since_version = 1β Minimum protocol version required for theformatfunction.
π¦ Detailed Description π¦
shared memory support
A singleton global object that provides support for shared memory.
Clients can create wl_shm_pool objects using the create_pool request.
On binding the wl_shm object one or more format events are emitted to inform clients about the valid pixel formats that can be used for buffers.
Definition at line 425 of file wayland-server-protocol.hpp.
π Member Function Documentation π
π void shm_t::format (shm_format const & format, bool post = true)
pixel format description
Parameters:
formatβ buffer pixel format
Informs the client about a valid pixel format that can be used for buffers. Known formats include argb8888 and xrgb8888.
Definition at line 1753 of file wayland-server-protocol.cpp.
π§ std::string wayland::server::resource_t::get_class () [inherited]
Retrieve the interface name (class) of a resource object.
Returns: Interface name of the resource object.
π¦ client_t wayland::server::resource_t::get_client () const [inherited]
Get the associated client
Returns: the client that owns the resource.
β uint32_t wayland::server::resource_t::get_id () const [inherited]
Get the internal ID of the resource
Returns: the internal ID of the resource
π unsigned int wayland::server::resource_t::get_version () const [inherited]
Get interface version
Returns: Interface version this resource has been constructed with.
π std::function< void(shm_pool_t, int, int32_t)> & shm_t::on_create_pool ()
create a shm pool
Parameters:
idβ pool to createfdβ file descriptor for the poolsizeβ pool size, in bytes
Create a new wl_shm_pool object.
The pool can be used to create shared memory based buffer objects. The server will mmap size bytes of the passed file descriptor, to use as backing memory for the pool.
Definition at line 1747 of file wayland-server-protocol.cpp.
π void shm_t::post_invalid_fd (std::string const & msg)
Post error: mmapping the file descriptor failed.
Definition at line 1768 of file wayland-server-protocol.cpp.
π void shm_t::post_invalid_format (std::string const & msg)
Post error: buffer format is not known.
Definition at line 1758 of file wayland-server-protocol.cpp.
π§ void shm_t::post_invalid_stride (std::string const & msg)
Post error: invalid size or stride during pool or buffer creation.
Definition at line 1763 of file wayland-server-protocol.cpp.
π«Ά void wayland::server::resource_t::post_no_memory () const [inherited]
Post "not enough memory" error to the client
If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance.
π₯ bool wayland::server::resource_t::proxy_has_object () const [inherited]
Check whether this wrapper actually wraps an object.
Returns: true if there is an underlying object, false if this wrapper is empty
π Member Data Documentation π
π std::uint32_t wayland::server::shm_t::format_since_version = 1 [static], [constexpr]
Minimum protocol version required for the format function.
Definition at line 477 of file wayland-server-protocol.hpp.
π Author π
Generated automatically by Doxygen for Wayland++ from the source code.
π Version 1.0.1 β’ Fri Mar 27 2026 13:15:00 β’ Wayland++ β’ wayland::server::shm_t(3) β mwah, bestie! π
π¦ where this page comes from
- ubuntu stonking: waylandpp-dev 1.0.1-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms