.TH "wayland::server::zwp_primary_selection_source_v1_t" 3 "Wed May 1 2024 17:27:19" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::server::zwp_primary_selection_source_v1_t \- offer to replace the contents of the primary selection .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits wayland::server::resource_t\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "std::function< void(std::string)> & \fBon_offer\fP ()" .br .RI "add an offered mime type " .ti -1c .RI "std::function< void()> & \fBon_destroy\fP ()" .br .RI "destroy the primary selection source " .ti -1c .RI "void \fBsend\fP (std::string const &mime_type, int fd, bool post=true)" .br .RI "send the primary selection contents " .ti -1c .RI "void \fBcancelled\fP (bool post=true)" .br .RI "request for primary selection contents was canceled " .ti -1c .RI "bool \fBproxy_has_object\fP () const" .br .RI "Check whether this wrapper actually wraps an object\&. " .ti -1c .RI "void \fBpost_no_memory\fP () const" .br .ti -1c .RI "uint32_t \fBget_id\fP () const" .br .ti -1c .RI "client_t \fBget_client\fP () const" .br .ti -1c .RI "unsigned int \fBget_version\fP () const" .br .ti -1c .RI "std::string \fBget_class\fP ()" .br .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static constexpr std::uint32_t \fBsend_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBsend\fP function\&. " .ti -1c .RI "static constexpr std::uint32_t \fBcancelled_since_version\fP = 1" .br .RI "Minimum protocol version required for the \fBcancelled\fP function\&. " .in -1c .SH "Detailed Description" .PP 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\&. .PP Definition at line \fB3756\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SH "Member Function Documentation" .PP .SS "void zwp_primary_selection_source_v1_t::cancelled (bool post = \fCtrue\fP)" .PP 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\&. .PP Definition at line \fB5957\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::string wayland::server::resource_t::get_class ()\fC [inherited]\fP" Retrieve the interface name (class) of a resource object\&. .PP \fBReturns\fP .RS 4 Interface name of the resource object\&. .RE .PP .SS "client_t wayland::server::resource_t::get_client () const\fC [inherited]\fP" Get the associated client .PP \fBReturns\fP .RS 4 the client that owns the resource\&. .RE .PP .SS "uint32_t wayland::server::resource_t::get_id () const\fC [inherited]\fP" Get the internal ID of the resource .PP \fBReturns\fP .RS 4 the internal ID of the resource .RE .PP .SS "unsigned int wayland::server::resource_t::get_version () const\fC [inherited]\fP" Get interface version .PP \fBReturns\fP .RS 4 Interface version this resource has been constructed with\&. .RE .PP .SS "std::function< void()> & zwp_primary_selection_source_v1_t::on_destroy ()" .PP destroy the primary selection source Destroy the primary selection source\&. .PP Definition at line \fB5946\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(std::string)> & zwp_primary_selection_source_v1_t::on_offer ()" .PP add an offered mime type .PP \fBParameters\fP .RS 4 \fImime_type\fP .RE .PP This request adds a mime type to the set of mime types advertised to targets\&. Can be called several times to offer multiple types\&. .PP Definition at line \fB5940\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void wayland::server::resource_t::post_no_memory () const\fC [inherited]\fP" Post 'not enough memory' error to the client .PP 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\&. .SS "bool wayland::server::resource_t::proxy_has_object () const\fC [inherited]\fP" .PP Check whether this wrapper actually wraps an object\&. .PP \fBReturns\fP .RS 4 true if there is an underlying object, false if this wrapper is empty .RE .PP .SS "void zwp_primary_selection_source_v1_t::send (std::string const & mime_type, int fd, bool post = \fCtrue\fP)" .PP send the primary selection contents .PP \fBParameters\fP .RS 4 \fImime_type\fP .br \fIfd\fP .RE .PP Request for the current primary selection contents from the client\&. Send the specified mime type over the passed file descriptor, then close it\&. .PP Definition at line \fB5952\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SH "Member Data Documentation" .PP .SS "constexpr std::uint32_t wayland::server::zwp_primary_selection_source_v1_t::cancelled_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBcancelled\fP function\&. .PP Definition at line \fB3824\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SS "constexpr std::uint32_t wayland::server::zwp_primary_selection_source_v1_t::send_since_version = 1\fC [static]\fP, \fC [constexpr]\fP" .PP Minimum protocol version required for the \fBsend\fP function\&. .PP Definition at line \fB3812\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.