wayland::serv...ion_offer_v1_t(3)
π wayland::server::zwp_primary_selection_offer_v1_t
okay bestie, this is the Wayland++ manual page for wayland::serv...ion_offer_v1_t(3) β yes the truncated title is giving main-character energy, but the actual class is wayland::server::zwp_primary_selection_offer_v1_t. let's go π
β¨ NAME β¨
wayland::server::zwp_primary_selection_offer_v1_t β offer to transfer primary selection contents
πΈ SYNOPSIS πΈ
#include <wayland-server-protocol-unstable.hpp>
π Public Member Functions
std::function< void(std::string, int)> & on_receive ()β request that the data is transferredstd::function< void()> & on_destroy ()β destroy the primary selection offervoid offer (std::string const &mime_type, bool post=true)β advertise offered mime typebool 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 offer_since_version = 1β Minimum protocol version required for theofferfunction.
π¦ Detailed Description π¦
offer to transfer primary selection contents
A wp_primary_selection_offer represents an offer to transfer the contents of the primary selection clipboard to the client. Similar to wl_data_offer, the offer also describes the mime types that the data can be converted to and provides the mechanisms for transferring the data directly to the client.
Definition at line 3679 of file wayland-server-protocol-unstable.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.
void zwp_primary_selection_offer_v1_t::offer (std::string const & mime_type, bool post = true)
advertise offered mime type
- Parameters:
mime_type
Sent immediately after creating announcing the wp_primary_selection_offer through wp_primary_selection_device.data_offer. One event is sent per offered mime type.
Definition at line 5901 of file wayland-server-protocol-unstable.cpp.
std::function< void()> & zwp_primary_selection_offer_v1_t::on_destroy ()
destroy the primary selection offer Destroy the primary selection offer.
Definition at line 5895 of file wayland-server-protocol-unstable.cpp.
std::function< void(std::string, int)> & zwp_primary_selection_offer_v1_t::on_receive ()
request that the data is transferred
- Parameters:
mime_typefd
To transfer the contents of the primary selection clipboard, the client issues this request and indicates the mime type that it wants to receive. The transfer happens through the passed file descriptor (typically created with the pipe system call). The source client writes the data in the mime type representation requested and then closes the file descriptor.
The receiving client reads from the read end of the pipe until EOF and closes its end, at which point the transfer is complete.
Definition at line 5889 of file wayland-server-protocol-unstable.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:
trueif there is an underlying object,falseif this wrapper is empty
π Member Data Documentation π
std::uint32_t
wayland::server::zwp_primary_selection_offer_v1_t::offer_since_version =
1 [static], [constexpr]
Minimum protocol version required for the offer function.
Definition at line 3743 of file wayland-server-protocol-unstable.hpp.
π Author π
Generated automatically by Doxygen for Wayland++ from the source code.
that's the whole vibe check, bestie π«Ά this page was made with love by Wayland++ version 1.0.1, dated Fri Mar 27 2026. go off and slay those primary selection offers π β¨
π¦ 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