Documentation
¶
Index ¶
- Constants
- type PrimarySelectionDevice
- func (o *PrimarySelectionDevice) Destroy() error
- func (o *PrimarySelectionDevice) Dispatch(event *wl.Event)
- func (o *PrimarySelectionDevice) EventSignature(opcode uint16) (string, bool)
- func (o *PrimarySelectionDevice) OnDataOffer(handler func(offerObject *PrimarySelectionOffer))
- func (o *PrimarySelectionDevice) OnSelection(handler func(idID uint32))
- func (o *PrimarySelectionDevice) SetSelection(source *PrimarySelectionSource, serial uint32) error
- type PrimarySelectionDeviceManager
- func (o *PrimarySelectionDeviceManager) CreateSource() (*PrimarySelectionSource, error)
- func (o *PrimarySelectionDeviceManager) Destroy() error
- func (o *PrimarySelectionDeviceManager) Dispatch(event *wl.Event)
- func (o *PrimarySelectionDeviceManager) EventSignature(opcode uint16) (string, bool)
- func (o *PrimarySelectionDeviceManager) GetDevice(seat *cross_wl_seat.Seat) (*PrimarySelectionDevice, error)
- type PrimarySelectionOffer
- func (o *PrimarySelectionOffer) Destroy() error
- func (o *PrimarySelectionOffer) Dispatch(event *wl.Event)
- func (o *PrimarySelectionOffer) EventSignature(opcode uint16) (string, bool)
- func (o *PrimarySelectionOffer) OnOffer(handler func(mimeType string))
- func (o *PrimarySelectionOffer) Receive(mimeType string, fd int) error
- type PrimarySelectionSource
- func (o *PrimarySelectionSource) Destroy() error
- func (o *PrimarySelectionSource) Dispatch(event *wl.Event)
- func (o *PrimarySelectionSource) EventSignature(opcode uint16) (string, bool)
- func (o *PrimarySelectionSource) Offer(mimeType string) error
- func (o *PrimarySelectionSource) OnCancelled(handler func())
- func (o *PrimarySelectionSource) OnSend(handler func(mimeType string, fd *wl.OwnedFD))
Constants ¶
const PrimarySelectionDeviceInterface = "zwp_primary_selection_device_v1"
PrimarySelectionDeviceInterface is the protocol interface name.
const PrimarySelectionDeviceManagerInterface = "zwp_primary_selection_device_manager_v1"
PrimarySelectionDeviceManagerInterface is the protocol interface name.
const PrimarySelectionOfferInterface = "zwp_primary_selection_offer_v1"
PrimarySelectionOfferInterface is the protocol interface name.
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 ¶
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 ¶
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 ¶
func (o *PrimarySelectionDeviceManager) CreateSource() (*PrimarySelectionSource, error)
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 ¶
func (o *PrimarySelectionDeviceManager) GetDevice(seat *cross_wl_seat.Seat) (*PrimarySelectionDevice, error)
Create a new data device for a given seat.
type PrimarySelectionOffer ¶
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 ¶
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.