primaryselection

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const PrimarySelectionDeviceInterface = "zwp_primary_selection_device_v1"

PrimarySelectionDeviceInterface is the protocol interface name.

View Source
const PrimarySelectionDeviceManagerInterface = "zwp_primary_selection_device_manager_v1"

PrimarySelectionDeviceManagerInterface is the protocol interface name.

View Source
const PrimarySelectionOfferInterface = "zwp_primary_selection_offer_v1"

PrimarySelectionOfferInterface is the protocol interface name.

View Source
const PrimarySelectionSourceInterface = "zwp_primary_selection_source_v1"

PrimarySelectionSourceInterface is the protocol interface name.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrimarySelectionDevice

type PrimarySelectionDevice struct {
	wl.BaseProxy
	// contains filtered or unexported fields
}

PrimarySelectionDevice is the generated binding for zwp_primary_selection_device_v1 version 1.

func NewPrimarySelectionDevice

func NewPrimarySelectionDevice(ctx *wl.Context) *PrimarySelectionDevice

NewPrimarySelectionDevice returns an unbound PrimarySelectionDevice.

func (*PrimarySelectionDevice) Destroy

func (o *PrimarySelectionDevice) Destroy() error

Destroy the primary selection device.

func (*PrimarySelectionDevice) Dispatch

func (o *PrimarySelectionDevice) Dispatch(event *wl.Event)

Dispatch decodes one event on zwp_primary_selection_device_v1 and calls the registered handlers.

func (*PrimarySelectionDevice) EventSignature

func (o *PrimarySelectionDevice) EventSignature(opcode uint16) (string, bool)

EventSignature returns the declared event argument types in wire order.

func (*PrimarySelectionDevice) OnDataOffer

func (o *PrimarySelectionDevice) OnDataOffer(handler func(offerObject *PrimarySelectionOffer))

OnDataOffer registers a handler for the data_offer event.

Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.

func (*PrimarySelectionDevice) OnSelection

func (o *PrimarySelectionDevice) OnSelection(handler func(idID uint32))

OnSelection registers a handler for the selection event.

Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.

func (*PrimarySelectionDevice) SetSelection

func (o *PrimarySelectionDevice) SetSelection(source *PrimarySelectionSource, serial uint32) error

Replaces the current selection. The previous owner of the primary selection will receive a wp_primary_selection_source.cancelled event. To unset the selection, set the source to NULL.

type PrimarySelectionDeviceManager

type PrimarySelectionDeviceManager struct {
	wl.BaseProxy
}

PrimarySelectionDeviceManager is the generated binding for zwp_primary_selection_device_manager_v1 version 1.

func NewPrimarySelectionDeviceManager

func NewPrimarySelectionDeviceManager(ctx *wl.Context) *PrimarySelectionDeviceManager

NewPrimarySelectionDeviceManager returns an unbound PrimarySelectionDeviceManager.

func (*PrimarySelectionDeviceManager) CreateSource

Create a new primary selection source.

func (*PrimarySelectionDeviceManager) Destroy

func (o *PrimarySelectionDeviceManager) Destroy() error

Destroy the primary selection device manager.

func (*PrimarySelectionDeviceManager) Dispatch

func (o *PrimarySelectionDeviceManager) Dispatch(event *wl.Event)

Dispatch decodes one event on zwp_primary_selection_device_manager_v1 and calls the registered handlers.

func (*PrimarySelectionDeviceManager) EventSignature

func (o *PrimarySelectionDeviceManager) EventSignature(opcode uint16) (string, bool)

EventSignature returns the declared event argument types in wire order.

func (*PrimarySelectionDeviceManager) GetDevice

Create a new data device for a given seat.

type PrimarySelectionOffer

type PrimarySelectionOffer struct {
	wl.BaseProxy
	// contains filtered or unexported fields
}

PrimarySelectionOffer is the generated binding for zwp_primary_selection_offer_v1 version 1.

func NewPrimarySelectionOffer

func NewPrimarySelectionOffer(ctx *wl.Context) *PrimarySelectionOffer

NewPrimarySelectionOffer returns an unbound PrimarySelectionOffer.

func (*PrimarySelectionOffer) Destroy

func (o *PrimarySelectionOffer) Destroy() error

Destroy the primary selection offer.

func (*PrimarySelectionOffer) Dispatch

func (o *PrimarySelectionOffer) Dispatch(event *wl.Event)

Dispatch decodes one event on zwp_primary_selection_offer_v1 and calls the registered handlers.

func (*PrimarySelectionOffer) EventSignature

func (o *PrimarySelectionOffer) EventSignature(opcode uint16) (string, bool)

EventSignature returns the declared event argument types in wire order.

func (*PrimarySelectionOffer) OnOffer

func (o *PrimarySelectionOffer) OnOffer(handler func(mimeType string))

OnOffer registers a handler for the offer event.

Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.

func (*PrimarySelectionOffer) Receive

func (o *PrimarySelectionOffer) Receive(mimeType string, fd int) error

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.

type PrimarySelectionSource

type PrimarySelectionSource struct {
	wl.BaseProxy
	// contains filtered or unexported fields
}

PrimarySelectionSource is the generated binding for zwp_primary_selection_source_v1 version 1.

func NewPrimarySelectionSource

func NewPrimarySelectionSource(ctx *wl.Context) *PrimarySelectionSource

NewPrimarySelectionSource returns an unbound PrimarySelectionSource.

func (*PrimarySelectionSource) Destroy

func (o *PrimarySelectionSource) Destroy() error

Destroy the primary selection source.

func (*PrimarySelectionSource) Dispatch

func (o *PrimarySelectionSource) Dispatch(event *wl.Event)

Dispatch decodes one event on zwp_primary_selection_source_v1 and calls the registered handlers.

func (*PrimarySelectionSource) EventSignature

func (o *PrimarySelectionSource) EventSignature(opcode uint16) (string, bool)

EventSignature returns the declared event argument types in wire order.

func (*PrimarySelectionSource) Offer

func (o *PrimarySelectionSource) Offer(mimeType string) error

This request adds a mime type to the set of mime types advertised to targets. Can be called several times to offer multiple types.

func (*PrimarySelectionSource) OnCancelled

func (o *PrimarySelectionSource) OnCancelled(handler func())

OnCancelled registers a handler for the cancelled event.

Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.

func (*PrimarySelectionSource) OnSend

func (o *PrimarySelectionSource) OnSend(handler func(mimeType string, fd *wl.OwnedFD))

OnSend registers a handler for the send event.

Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL