wayland::serve...on_source_v1_t(3)
π
wayland::serve...on_source_v1_t(3) β the Wayland++ manual, bestie π
okay so you've opened the wayland::serve...on_source_v1_t(3) page from the Wayland++ manual, and it's all about wayland::server::zwp_primary_selection_source_v1_t β offer to replace the contents of the primary selection. No cap, let's unpack it β¨
πΈ NAME πΈ
wayland::server::zwp_primary_selection_source_v1_tβ offer to replace the contents of the primary selection
β¨ SYNOPSIS β¨
#include <wayland-server-protocol-unstable.hpp>
π«Ά Public Member Functions π«Ά
std::function< void(std::string)> & on_offer ()β add an offered mime typestd::function< void()> & on_destroy ()β destroy the primary selection sourcevoid send (std::string const &mime_type, int fd, bool post=true)β send the primary selection contentsvoid cancelled (bool post=true)β request for primary selection contents was canceledbool proxy_has_object () constβ Check whether this wrapper actually wraps an object.void post_no_memory () constβ inherited fromresource_t; the full story is down belowuint32_t get_id () constβ inherited fromresource_t; details belowclient_t get_client () constβ inherited fromresource_t; details belowunsigned int get_version () constβ inherited fromresource_t; details belowstd::string get_class ()β inherited fromresource_t; details below
π Static Public Attributes π
static constexpr std::uint32_t send_since_version = 1β Minimum protocol version required for thesendfunction.static constexpr std::uint32_t cancelled_since_version = 1β Minimum protocol version required for thecancelledfunction.
π Detailed Description π
offer to replace the contents of the primary selection
The source side of a wp_primary_selection_offer, it provides a way to describe the offered data and respond to requests to transfer the requested contents of the primary selection clipboard.
Definition at line 3757 of file wayland-server-protocol-unstable.hpp.
π₯ Member Function Documentation π₯
π
void zwp_primary_selection_source_v1_t::cancelled (bool post = true)
request for primary selection contents was canceled β This primary selection source is no longer valid. The client should clean up and destroy this primary selection source.
Definition at line 5957 of file wayland-server-protocol-unstable.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()> & zwp_primary_selection_source_v1_t::on_destroy ()
destroy the primary selection source β Destroy the primary selection source.
Definition at line 5946 of file wayland-server-protocol-unstable.cpp.
π std::function< void(std::string)> & zwp_primary_selection_source_v1_t::on_offer ()
add an offered mime type
Parameters: mime_type
This request adds a mime type to the set of mime types advertised to targets. Can be called several times to offer multiple types.
Definition at line 5940 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: true if there is an underlying object, false if this wrapper is empty
π₯ void zwp_primary_selection_source_v1_t::send (std::string const & mime_type, int fd, bool post = true)
send the primary selection contents
Parameters: mime_type, fd
Request for the current primary selection contents from the client. Send the specified mime type over the passed file descriptor, then close it.
Definition at line 5952 of file wayland-server-protocol-unstable.cpp.
π Member Data Documentation π
π std::uint32_t wayland::server::zwp_primary_selection_source_v1_t::cancelled_since_version = 1 [static], [constexpr]
Minimum protocol version required for the cancelled function.
Definition at line 3825 of file wayland-server-protocol-unstable.hpp.
π std::uint32_t wayland::server::zwp_primary_selection_source_v1_t::send_since_version = 1 [static], [constexpr]
Minimum protocol version required for the send function.
Definition at line 3813 of file wayland-server-protocol-unstable.hpp.
π Author π
Generated automatically by Doxygen for Wayland++ from the source code.
okay that's the whole page, bestie β this manual came from Wayland++ version 1.0.1, dated Fri Mar 27 2026. Bye, slay, and may your primary selection always be valid π
β¨
π¦ 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