15#include <qwayland-server-wp-primary-selection-unstable-v1.h>
28 QPointer<PrimarySelectionSourceV1Interface>
selection;
41 wl_resource *resource)
42 : QtWaylandServer::zwp_primary_selection_device_v1(resource)
71 wl_resource_destroy(resource->handle);
81 wl_resource *data_offer_resource = wl_resource_create(resource()->client(), &zwp_primary_selection_offer_v1_interface, resource()->
version(), 0);
82 if (!data_offer_resource) {
83 wl_resource_post_no_memory(resource()->handle);
94 QtWaylandServer::zwp_primary_selection_device_v1::Resource *resource)
99PrimarySelectionDeviceV1Interface::PrimarySelectionDeviceV1Interface(
SeatInterface *seat, wl_resource *resource)
122 d->send_selection(offer ? offer->
resource() :
nullptr);
127 return d->resource()->client();
132#include "moc_primaryselectiondevice_v1.cpp"
The AbstractDataSource class abstracts the data that can be transferred to another client.
Represents the Resource for the wl_data_device interface.
virtual ~PrimarySelectionDeviceV1Interface()
void sendSelection(AbstractDataSource *other)
PrimarySelectionSourceV1Interface * selection() const
SeatInterface * seat() const
void selectionChanged(KWin::PrimarySelectionSourceV1Interface *)
wl_client * client() const
PrimarySelectionOfferV1Interface * createDataOffer(AbstractDataSource *source)
void zwp_primary_selection_device_v1_destroy_resource(Resource *resource) override
PrimarySelectionDeviceV1Interface * q
QPointer< PrimarySelectionSourceV1Interface > selection
void zwp_primary_selection_device_v1_destroy(Resource *resource) override
void zwp_primary_selection_device_v1_set_selection(Resource *resource, wl_resource *source, uint32_t serial) override
PrimarySelectionDeviceV1InterfacePrivate(PrimarySelectionDeviceV1Interface *q, SeatInterface *seat, wl_resource *resource)
Represents the Resource for the wl_data_offer interface. Lifespan is mapped to the underlying object.
wl_resource * resource() const
Represents the Resource for the zwp_primary_selection_source_v1 interface. Lifespan is mapped to the ...
static PrimarySelectionSourceV1Interface * get(wl_resource *native)
Represents a Seat on the Wayland Display.
void registerPrimarySelectionDevice(PrimarySelectionDeviceV1Interface *primarySelectionDevice)
static KWIN_EXPORT SeatInterfacePrivate * get(SeatInterface *seat)