wayland::server::buffer_t(3)
πΈ NAME πΈ
okay bestie, welcome to wayland::server::buffer_t(3) from Wayland++ β this page is all about the content for a wl_surface, and yes it's giving main-character buffer energy π
β¨
β¨ SYNOPSIS β¨
#include <wayland-server-protocol.hpp>
π Public Member Functions π
std::function< void()> & on_destroy ()β destroy a buffervoid release (bool post=true)β compositor releases bufferbool 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 release_since_version = 1β Minimum protocol version required for thereleasefunction.
π¦ Detailed Description π¦
content for a wl_surface β literally the whole point, no cap π«Ά
A buffer provides the content for a wl_surface. Buffers are created through factory interfaces such as wl_shm, wp_linux_buffer_params (from the linux-dmabuf protocol extension) or similar. It has a width and a height and can be attached to a wl_surface, but the mechanism by which a client provides and updates the contents is defined by the buffer factory interface. π¨
If the buffer uses a format that has an alpha channel, the alpha channel is assumed to be premultiplied in the color channels unless otherwise specified. π
Definition at line 749 of file wayland-server-protocol.hpp.
π Member Function Documentation π
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()> & buffer_t::on_destroy ()
destroy a buffer β Destroy a buffer. If and how you need to release the backing storage is defined by the buffer factory interface. π
For possible side-effects to a surface, see wl_surface.attach.
Definition at line 1806 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.
void buffer_t::release (bool post = true)
compositor releases buffer β Sent when this wl_buffer is no longer used by the compositor. The client is now free to reuse or destroy this buffer and its backing storage. π₯
If a client receives a release event before the frame callback requested in the same wl_surface.commit that attaches this wl_buffer to a surface, then the client is immediately free to reuse the buffer and its backing storage, and does not need a second buffer for the next surface content update. Typically this is possible, when the compositor maintains a copy of the wl_surface contents, e.g. as a GL texture. This is an important optimization for GL(ES) compositors with wl_shm clients. β¨
Definition at line 1812 of file wayland-server-protocol.cpp.
π Member Data Documentation π
std::uint32_t wayland::server::buffer_t::release_since_version = 1 [static], [constexpr]
Minimum protocol version required for the release function. π
Definition at line 805 of file wayland-server-protocol.hpp.
π Author π
Generated automatically by Doxygen for Wayland++ from the source code. π§
mwah bestie π β Version 1.0.1, Fri Mar 27 2026 13:15:0, from the Wayland++ source code.
π¦ 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