wl

package module
v0.0.0-...-9ebd843 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: BSD-2-Clause Imports: 13 Imported by: 0

README

wl

A wayland protocol implementation in pure Go.

This is a Go implementation of the Wayland protocol. The protocol files themselves (client.go and xdg/shell.go) are built using the tool in github.com/dkolbly/wl-scanner from the XML protocol specification files.

To test:

go get github.com/dkolbly/wl/ui/examples/img  

then:

$GOPATH/bin/img $GOPATH/src/github.com/dkolbly/wl/ui/examples/img/bsd_daemon.jpg

This is a hobby project, forked from a hobby project, github.com/sternix/wl.

Desktops

The image program (img) works in both weston and in Ubuntu Gnome in wayland mode.

Documentation

Overview

generated by wl-scanner https://github.com/malcolmstill/wl-scanner from: /usr/share/wayland/wayland.xml on 2020-04-17 01:01:14 +0100

Index

Constants

View Source
const (
	DisplayErrorInvalidObject  = 0
	DisplayErrorInvalidMethod  = 1
	DisplayErrorNoMemory       = 2
	DisplayErrorImplementation = 3
)
View Source
const (
	ShmErrorInvalidFormat = 0
	ShmErrorInvalidStride = 1
	ShmErrorInvalidFd     = 2
)
View Source
const (
	ShmFormatArgb8888    = 0
	ShmFormatXrgb8888    = 1
	ShmFormatC8          = 0x20203843
	ShmFormatRgb332      = 0x38424752
	ShmFormatBgr233      = 0x38524742
	ShmFormatXrgb4444    = 0x32315258
	ShmFormatXbgr4444    = 0x32314258
	ShmFormatRgbx4444    = 0x32315852
	ShmFormatBgrx4444    = 0x32315842
	ShmFormatArgb4444    = 0x32315241
	ShmFormatAbgr4444    = 0x32314241
	ShmFormatRgba4444    = 0x32314152
	ShmFormatBgra4444    = 0x32314142
	ShmFormatXrgb1555    = 0x35315258
	ShmFormatXbgr1555    = 0x35314258
	ShmFormatRgbx5551    = 0x35315852
	ShmFormatBgrx5551    = 0x35315842
	ShmFormatArgb1555    = 0x35315241
	ShmFormatAbgr1555    = 0x35314241
	ShmFormatRgba5551    = 0x35314152
	ShmFormatBgra5551    = 0x35314142
	ShmFormatRgb565      = 0x36314752
	ShmFormatBgr565      = 0x36314742
	ShmFormatRgb888      = 0x34324752
	ShmFormatBgr888      = 0x34324742
	ShmFormatXbgr8888    = 0x34324258
	ShmFormatRgbx8888    = 0x34325852
	ShmFormatBgrx8888    = 0x34325842
	ShmFormatAbgr8888    = 0x34324241
	ShmFormatRgba8888    = 0x34324152
	ShmFormatBgra8888    = 0x34324142
	ShmFormatXrgb2101010 = 0x30335258
	ShmFormatXbgr2101010 = 0x30334258
	ShmFormatRgbx1010102 = 0x30335852
	ShmFormatBgrx1010102 = 0x30335842
	ShmFormatArgb2101010 = 0x30335241
	ShmFormatAbgr2101010 = 0x30334241
	ShmFormatRgba1010102 = 0x30334152
	ShmFormatBgra1010102 = 0x30334142
	ShmFormatYuyv        = 0x56595559
	ShmFormatYvyu        = 0x55595659
	ShmFormatUyvy        = 0x59565955
	ShmFormatVyuy        = 0x59555956
	ShmFormatAyuv        = 0x56555941
	ShmFormatNv12        = 0x3231564e
	ShmFormatNv21        = 0x3132564e
	ShmFormatNv16        = 0x3631564e
	ShmFormatNv61        = 0x3136564e
	ShmFormatYuv410      = 0x39565559
	ShmFormatYvu410      = 0x39555659
	ShmFormatYuv411      = 0x31315559
	ShmFormatYvu411      = 0x31315659
	ShmFormatYuv420      = 0x32315559
	ShmFormatYvu420      = 0x32315659
	ShmFormatYuv422      = 0x36315559
	ShmFormatYvu422      = 0x36315659
	ShmFormatYuv444      = 0x34325559
	ShmFormatYvu444      = 0x34325659
)
View Source
const (
	DataOfferErrorInvalidFinish     = 0
	DataOfferErrorInvalidActionMask = 1
	DataOfferErrorInvalidAction     = 2
	DataOfferErrorInvalidOffer      = 3
)
View Source
const (
	DataSourceErrorInvalidActionMask = 0
	DataSourceErrorInvalidSource     = 1
)
View Source
const (
	DataDeviceManagerDndActionNone = 0
	DataDeviceManagerDndActionCopy = 1
	DataDeviceManagerDndActionMove = 2
	DataDeviceManagerDndActionAsk  = 4
)
View Source
const (
	ShellSurfaceResizeNone        = 0
	ShellSurfaceResizeTop         = 1
	ShellSurfaceResizeBottom      = 2
	ShellSurfaceResizeLeft        = 4
	ShellSurfaceResizeTopLeft     = 5
	ShellSurfaceResizeBottomLeft  = 6
	ShellSurfaceResizeRight       = 8
	ShellSurfaceResizeTopRight    = 9
	ShellSurfaceResizeBottomRight = 10
)
View Source
const (
	ShellSurfaceFullscreenMethodDefault = 0
	ShellSurfaceFullscreenMethodScale   = 1
	ShellSurfaceFullscreenMethodDriver  = 2
	ShellSurfaceFullscreenMethodFill    = 3
)
View Source
const (
	SurfaceErrorInvalidScale     = 0
	SurfaceErrorInvalidTransform = 1
)
View Source
const (
	SeatCapabilityPointer  = 1
	SeatCapabilityKeyboard = 2
	SeatCapabilityTouch    = 4
)
View Source
const (
	PointerButtonStateReleased = 0
	PointerButtonStatePressed  = 1
)
View Source
const (
	PointerAxisVerticalScroll   = 0
	PointerAxisHorizontalScroll = 1
)
View Source
const (
	PointerAxisSourceWheel      = 0
	PointerAxisSourceFinger     = 1
	PointerAxisSourceContinuous = 2
	PointerAxisSourceWheelTilt  = 3
)
View Source
const (
	KeyboardKeymapFormatNoKeymap = 0
	KeyboardKeymapFormatXkbV1    = 1
)
View Source
const (
	KeyboardKeyStateReleased = 0
	KeyboardKeyStatePressed  = 1
)
View Source
const (
	OutputSubpixelUnknown       = 0
	OutputSubpixelNone          = 1
	OutputSubpixelHorizontalRgb = 2
	OutputSubpixelHorizontalBgr = 3
	OutputSubpixelVerticalRgb   = 4
	OutputSubpixelVerticalBgr   = 5
)
View Source
const (
	OutputTransformNormal     = 0
	OutputTransform90         = 1
	OutputTransform180        = 2
	OutputTransform270        = 3
	OutputTransformFlipped    = 4
	OutputTransformFlipped90  = 5
	OutputTransformFlipped180 = 6
	OutputTransformFlipped270 = 7
)
View Source
const (
	OutputModeCurrent   = 0x1
	OutputModePreferred = 0x2
)
View Source
const (
	DataDeviceErrorRole = 0
)
View Source
const (
	PointerErrorRole = 0
)
View Source
const (
	ShellErrorRole = 0
)
View Source
const (
	ShellSurfaceTransientInactive = 0x1
)
View Source
const (
	SubcompositorErrorBadSurface = 0
)
View Source
const (
	SubsurfaceErrorBadSurface = 0
)

Variables

This section is empty.

Functions

func Float64bits

func Float64bits(f float64) uint64

func GiveBack

func GiveBack(b []byte)

func ListenFD

func ListenFD(addr string) (ret int, err error)

Types

type BaseProxy

type BaseProxy struct {
	// contains filtered or unexported fields
}

func (*BaseProxy) Container

func (p *BaseProxy) Container() interface{}

func (*BaseProxy) Context

func (p *BaseProxy) Context() *Context

func (*BaseProxy) Id

func (p *BaseProxy) Id() ProxyId

func (*BaseProxy) SetContainer

func (p *BaseProxy) SetContainer(c interface{})

func (*BaseProxy) SetContext

func (p *BaseProxy) SetContext(c *Context)

func (*BaseProxy) SetId

func (p *BaseProxy) SetId(id ProxyId)

func (*BaseProxy) SetVersion

func (p *BaseProxy) SetVersion(version uint32)

func (*BaseProxy) Unregister

func (p *BaseProxy) Unregister(s string)

func (*BaseProxy) Version

func (p *BaseProxy) Version() uint32

type Buffer

type Buffer struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer(ctx *Context, id int) *Buffer

func (*Buffer) AddDestroyHandler

func (p *Buffer) AddDestroyHandler(h BufferDestroyHandler)

func (*Buffer) Dispatch

func (p *Buffer) Dispatch(event *Event)

func (*Buffer) Release

func (p *Buffer) Release() error

Release will compositor releases buffer.

Sent when this wl_buffer is no longer used by the compositor. The client is now free to reuse or destroy this buffer and its backing storage.

If a client receives a release event before the frame callback requested in the same wl_surface.commit that attaches this wl_buffer to a surface, then the client is immediately free to reuse the buffer and its backing storage, and does not need a second buffer for the next surface content update. Typically this is possible, when the compositor maintains a copy of the wl_surface contents, e.g. as a GL texture. This is an important optimization for GL(ES) compositors with wl_shm clients.

func (*Buffer) RemoveDestroyHandler

func (p *Buffer) RemoveDestroyHandler(h BufferDestroyHandler)

type BufferDestroyEvent

type BufferDestroyEvent struct {
}

type BufferDestroyHandler

type BufferDestroyHandler interface {
	HandleBufferDestroy(BufferDestroyEvent)
}

type BytePool

type BytePool struct {
	sync.Pool
}

func (*BytePool) Give

func (bp *BytePool) Give(b []byte)

func (*BytePool) Take

func (bp *BytePool) Take(n int) []byte

type Callback

type Callback struct {
	BaseProxy
}

func NewCallback

func NewCallback(ctx *Context, id int) *Callback

func (*Callback) Done

func (p *Callback) Done(callback_data uint32) error

Done will done event.

Notify the client when the related request is done.

type Compositor

type Compositor struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewCompositor

func NewCompositor(ctx *Context, id int) *Compositor

func (*Compositor) AddCreateRegionHandler

func (p *Compositor) AddCreateRegionHandler(h CompositorCreateRegionHandler)

func (*Compositor) AddCreateSurfaceHandler

func (p *Compositor) AddCreateSurfaceHandler(h CompositorCreateSurfaceHandler)

func (*Compositor) Dispatch

func (p *Compositor) Dispatch(event *Event)

func (*Compositor) RemoveCreateRegionHandler

func (p *Compositor) RemoveCreateRegionHandler(h CompositorCreateRegionHandler)

func (*Compositor) RemoveCreateSurfaceHandler

func (p *Compositor) RemoveCreateSurfaceHandler(h CompositorCreateSurfaceHandler)

type CompositorCreateRegionEvent

type CompositorCreateRegionEvent struct {
	Id *Region
}

type CompositorCreateRegionHandler

type CompositorCreateRegionHandler interface {
	HandleCompositorCreateRegion(CompositorCreateRegionEvent)
}

type CompositorCreateSurfaceEvent

type CompositorCreateSurfaceEvent struct {
	Id *Surface
}

type CompositorCreateSurfaceHandler

type CompositorCreateSurfaceHandler interface {
	HandleCompositorCreateSurface(CompositorCreateSurfaceEvent)
}

type Context

type Context struct {
	SockFD int
	// contains filtered or unexported fields
}

func (*Context) AddFD

func (c *Context) AddFD(fd uintptr)

func (*Context) Close

func (c *Context) Close()

func (*Context) Dispatch

func (c *Context) Dispatch() chan<- struct{}

func (*Context) LookupProxy

func (ctx *Context) LookupProxy(id ProxyId) Proxy

func (*Context) NextFD

func (c *Context) NextFD() uintptr

func (*Context) Objects

func (ctx *Context) Objects() map[ProxyId]Proxy

func (*Context) ReadEvent

func (c *Context) ReadEvent() (Event, error)

func (*Context) Register

func (ctx *Context) Register(proxy Proxy)

func (*Context) RegisterId

func (ctx *Context) RegisterId(proxy Proxy, id int)

func (*Context) SendRequest

func (context *Context) SendRequest(proxy Proxy, opcode uint32, args ...interface{}) (err error)

func (*Context) Unregister

func (ctx *Context) Unregister(proxy Proxy)

type DataDevice

type DataDevice struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewDataDevice

func NewDataDevice(ctx *Context, id int) *DataDevice

func (*DataDevice) AddReleaseHandler

func (p *DataDevice) AddReleaseHandler(h DataDeviceReleaseHandler)

func (*DataDevice) AddSetSelectionHandler

func (p *DataDevice) AddSetSelectionHandler(h DataDeviceSetSelectionHandler)

func (*DataDevice) AddStartDragHandler

func (p *DataDevice) AddStartDragHandler(h DataDeviceStartDragHandler)

func (*DataDevice) DataOffer

func (p *DataDevice) DataOffer(id int) (*DataOffer, error)

DataOffer will introduce a new wl_data_offer.

The data_offer event introduces a new wl_data_offer object, which will subsequently be used in either the data_device.enter event (for drag-and-drop) or the data_device.selection event (for selections). Immediately following the data_device_data_offer event, the new data_offer object will send out data_offer.offer events to describe the mime types it offers.

func (*DataDevice) Dispatch

func (p *DataDevice) Dispatch(event *Event)

func (*DataDevice) Drop

func (p *DataDevice) Drop() error

Drop will end drag-and-drop session successfully.

The event is sent when a drag-and-drop operation is ended because the implicit grab is removed.

The drag-and-drop destination is expected to honor the last action received through wl_data_offer.action, if the resulting action is "copy" or "move", the destination can still perform wl_data_offer.receive requests, and is expected to end all transfers with a wl_data_offer.finish request.

If the resulting action is "ask", the action will not be considered final. The drag-and-drop destination is expected to perform one last wl_data_offer.set_actions request, or wl_data_offer.destroy in order to cancel the operation.

func (*DataDevice) Enter

func (p *DataDevice) Enter(serial uint32, surface *Surface, x float32, y float32, id *DataOffer) error

Enter will initiate drag-and-drop session.

This event is sent when an active drag-and-drop pointer enters a surface owned by the client. The position of the pointer at enter time is provided by the x and y arguments, in surface-local coordinates.

func (*DataDevice) Leave

func (p *DataDevice) Leave() error

Leave will end drag-and-drop session.

This event is sent when the drag-and-drop pointer leaves the surface and the session ends. The client must destroy the wl_data_offer introduced at enter time at this point.

func (*DataDevice) Motion

func (p *DataDevice) Motion(time uint32, x float32, y float32) error

Motion will drag-and-drop session motion.

This event is sent when the drag-and-drop pointer moves within the currently focused surface. The new position of the pointer is provided by the x and y arguments, in surface-local coordinates.

func (*DataDevice) RemoveReleaseHandler

func (p *DataDevice) RemoveReleaseHandler(h DataDeviceReleaseHandler)

func (*DataDevice) RemoveSetSelectionHandler

func (p *DataDevice) RemoveSetSelectionHandler(h DataDeviceSetSelectionHandler)

func (*DataDevice) RemoveStartDragHandler

func (p *DataDevice) RemoveStartDragHandler(h DataDeviceStartDragHandler)

func (*DataDevice) Selection

func (p *DataDevice) Selection(id *DataOffer) error

Selection will advertise new selection.

The selection event is sent out to notify the client of a new wl_data_offer for the selection for this device. The data_device.data_offer and the data_offer.offer events are sent out immediately before this event to introduce the data offer object. The selection event is sent to a client immediately before receiving keyboard focus and when a new selection is set while the client has keyboard focus. The data_offer is valid until a new data_offer or NULL is received or until the client loses keyboard focus. The client must destroy the previous selection data_offer, if any, upon receiving this event.

type DataDeviceManager

type DataDeviceManager struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewDataDeviceManager

func NewDataDeviceManager(ctx *Context, id int) *DataDeviceManager

func (*DataDeviceManager) AddCreateDataSourceHandler

func (p *DataDeviceManager) AddCreateDataSourceHandler(h DataDeviceManagerCreateDataSourceHandler)

func (*DataDeviceManager) AddGetDataDeviceHandler

func (p *DataDeviceManager) AddGetDataDeviceHandler(h DataDeviceManagerGetDataDeviceHandler)

func (*DataDeviceManager) Dispatch

func (p *DataDeviceManager) Dispatch(event *Event)

func (*DataDeviceManager) RemoveCreateDataSourceHandler

func (p *DataDeviceManager) RemoveCreateDataSourceHandler(h DataDeviceManagerCreateDataSourceHandler)

func (*DataDeviceManager) RemoveGetDataDeviceHandler

func (p *DataDeviceManager) RemoveGetDataDeviceHandler(h DataDeviceManagerGetDataDeviceHandler)

type DataDeviceManagerCreateDataSourceEvent

type DataDeviceManagerCreateDataSourceEvent struct {
	Id *DataSource
}

type DataDeviceManagerCreateDataSourceHandler

type DataDeviceManagerCreateDataSourceHandler interface {
	HandleDataDeviceManagerCreateDataSource(DataDeviceManagerCreateDataSourceEvent)
}

type DataDeviceManagerGetDataDeviceEvent

type DataDeviceManagerGetDataDeviceEvent struct {
	Id   *DataDevice
	Seat *Seat
}

type DataDeviceManagerGetDataDeviceHandler

type DataDeviceManagerGetDataDeviceHandler interface {
	HandleDataDeviceManagerGetDataDevice(DataDeviceManagerGetDataDeviceEvent)
}

type DataDeviceReleaseEvent

type DataDeviceReleaseEvent struct {
}

type DataDeviceReleaseHandler

type DataDeviceReleaseHandler interface {
	HandleDataDeviceRelease(DataDeviceReleaseEvent)
}

type DataDeviceSetSelectionEvent

type DataDeviceSetSelectionEvent struct {
	Source *DataSource
	Serial uint32
}

type DataDeviceSetSelectionHandler

type DataDeviceSetSelectionHandler interface {
	HandleDataDeviceSetSelection(DataDeviceSetSelectionEvent)
}

type DataDeviceStartDragEvent

type DataDeviceStartDragEvent struct {
	Source *DataSource
	Origin *Surface
	Icon   *Surface
	Serial uint32
}

type DataDeviceStartDragHandler

type DataDeviceStartDragHandler interface {
	HandleDataDeviceStartDrag(DataDeviceStartDragEvent)
}

type DataOffer

type DataOffer struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewDataOffer

func NewDataOffer(ctx *Context, id int) *DataOffer

func (*DataOffer) Action

func (p *DataOffer) Action(dnd_action uint32) error

Action will notify the selected action.

This event indicates the action selected by the compositor after matching the source/destination side actions. Only one action (or none) will be offered here.

This event can be emitted multiple times during the drag-and-drop operation in response to destination side action changes through wl_data_offer.set_actions.

This event will no longer be emitted after wl_data_device.drop happened on the drag-and-drop destination, the client must honor the last action received, or the last preferred one set through wl_data_offer.set_actions when handling an "ask" action.

Compositors may also change the selected action on the fly, mainly in response to keyboard modifier changes during the drag-and-drop operation.

The most recent action received is always the valid one. Prior to receiving wl_data_device.drop, the chosen action may change (e.g. due to keyboard modifiers being pressed). At the time of receiving wl_data_device.drop the drag-and-drop destination must honor the last action received.

Action changes may still happen after wl_data_device.drop, especially on "ask" actions, where the drag-and-drop destination may choose another action afterwards. Action changes happening at this stage are always the result of inter-client negotiation, the compositor shall no longer be able to induce a different action.

Upon "ask" actions, it is expected that the drag-and-drop destination may potentially choose a different action and/or mime type, based on wl_data_offer.source_actions and finally chosen by the user (e.g. popping up a menu with the available options). The final wl_data_offer.set_actions and wl_data_offer.accept requests must happen before the call to wl_data_offer.finish.

func (*DataOffer) AddAcceptHandler

func (p *DataOffer) AddAcceptHandler(h DataOfferAcceptHandler)

func (*DataOffer) AddDestroyHandler

func (p *DataOffer) AddDestroyHandler(h DataOfferDestroyHandler)

func (*DataOffer) AddFinishHandler

func (p *DataOffer) AddFinishHandler(h DataOfferFinishHandler)

func (*DataOffer) AddReceiveHandler

func (p *DataOffer) AddReceiveHandler(h DataOfferReceiveHandler)

func (*DataOffer) AddSetActionsHandler

func (p *DataOffer) AddSetActionsHandler(h DataOfferSetActionsHandler)

func (*DataOffer) Dispatch

func (p *DataOffer) Dispatch(event *Event)

func (*DataOffer) Offer

func (p *DataOffer) Offer(mime_type string) error

Offer will advertise offered mime type.

Sent immediately after creating the wl_data_offer object. One event per offered mime type.

func (*DataOffer) RemoveAcceptHandler

func (p *DataOffer) RemoveAcceptHandler(h DataOfferAcceptHandler)

func (*DataOffer) RemoveDestroyHandler

func (p *DataOffer) RemoveDestroyHandler(h DataOfferDestroyHandler)

func (*DataOffer) RemoveFinishHandler

func (p *DataOffer) RemoveFinishHandler(h DataOfferFinishHandler)

func (*DataOffer) RemoveReceiveHandler

func (p *DataOffer) RemoveReceiveHandler(h DataOfferReceiveHandler)

func (*DataOffer) RemoveSetActionsHandler

func (p *DataOffer) RemoveSetActionsHandler(h DataOfferSetActionsHandler)

func (*DataOffer) SourceActions

func (p *DataOffer) SourceActions(source_actions uint32) error

SourceActions will notify the source-side available actions.

This event indicates the actions offered by the data source. It will be sent right after wl_data_device.enter, or anytime the source side changes its offered actions through wl_data_source.set_actions.

type DataOfferAcceptEvent

type DataOfferAcceptEvent struct {
	Serial   uint32
	MimeType string
}

type DataOfferAcceptHandler

type DataOfferAcceptHandler interface {
	HandleDataOfferAccept(DataOfferAcceptEvent)
}

type DataOfferDestroyEvent

type DataOfferDestroyEvent struct {
}

type DataOfferDestroyHandler

type DataOfferDestroyHandler interface {
	HandleDataOfferDestroy(DataOfferDestroyEvent)
}

type DataOfferFinishEvent

type DataOfferFinishEvent struct {
}

type DataOfferFinishHandler

type DataOfferFinishHandler interface {
	HandleDataOfferFinish(DataOfferFinishEvent)
}

type DataOfferReceiveEvent

type DataOfferReceiveEvent struct {
	MimeType string
	Fd       uintptr
}

type DataOfferReceiveHandler

type DataOfferReceiveHandler interface {
	HandleDataOfferReceive(DataOfferReceiveEvent)
}

type DataOfferSetActionsEvent

type DataOfferSetActionsEvent struct {
	DndActions      uint32
	PreferredAction uint32
}

type DataOfferSetActionsHandler

type DataOfferSetActionsHandler interface {
	HandleDataOfferSetActions(DataOfferSetActionsEvent)
}

type DataSource

type DataSource struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewDataSource

func NewDataSource(ctx *Context, id int) *DataSource

func (*DataSource) Action

func (p *DataSource) Action(dnd_action uint32) error

Action will notify the selected action.

This event indicates the action selected by the compositor after matching the source/destination side actions. Only one action (or none) will be offered here.

This event can be emitted multiple times during the drag-and-drop operation, mainly in response to destination side changes through wl_data_offer.set_actions, and as the data device enters/leaves surfaces.

It is only possible to receive this event after wl_data_source.dnd_drop_performed if the drag-and-drop operation ended in an "ask" action, in which case the final wl_data_source.action event will happen immediately before wl_data_source.dnd_finished.

Compositors may also change the selected action on the fly, mainly in response to keyboard modifier changes during the drag-and-drop operation.

The most recent action received is always the valid one. The chosen action may change alongside negotiation (e.g. an "ask" action can turn into a "move" operation), so the effects of the final action must always be applied in wl_data_offer.dnd_finished.

Clients can trigger cursor surface changes from this point, so they reflect the current action.

func (*DataSource) AddDestroyHandler

func (p *DataSource) AddDestroyHandler(h DataSourceDestroyHandler)

func (*DataSource) AddOfferHandler

func (p *DataSource) AddOfferHandler(h DataSourceOfferHandler)

func (*DataSource) AddSetActionsHandler

func (p *DataSource) AddSetActionsHandler(h DataSourceSetActionsHandler)

func (*DataSource) Cancelled

func (p *DataSource) Cancelled() error

Cancelled will selection was cancelled.

This data source is no longer valid. There are several reasons why this could happen:

- The data source has been replaced by another data source. - The drag-and-drop operation was performed, but the drop destination did not accept any of the mime types offered through wl_data_source.target. - The drag-and-drop operation was performed, but the drop destination did not select any of the actions present in the mask offered through wl_data_source.action. - The drag-and-drop operation was performed but didn't happen over a surface. - The compositor cancelled the drag-and-drop operation (e.g. compositor dependent timeouts to avoid stale drag-and-drop transfers).

The client should clean up and destroy this data source.

For objects of version 2 or older, wl_data_source.cancelled will only be emitted if the data source was replaced by another data source.

func (*DataSource) Dispatch

func (p *DataSource) Dispatch(event *Event)

func (*DataSource) DndDropPerformed

func (p *DataSource) DndDropPerformed() error

DndDropPerformed will the drag-and-drop operation physically finished.

The user performed the drop action. This event does not indicate acceptance, wl_data_source.cancelled may still be emitted afterwards if the drop destination does not accept any mime type.

However, this event might however not be received if the compositor cancelled the drag-and-drop operation before this event could happen.

Note that the data_source may still be used in the future and should not be destroyed here.

func (*DataSource) DndFinished

func (p *DataSource) DndFinished() error

DndFinished will the drag-and-drop operation concluded.

The drop destination finished interoperating with this data source, so the client is now free to destroy this data source and free all associated data.

If the action used to perform the operation was "move", the source can now delete the transferred data.

func (*DataSource) RemoveDestroyHandler

func (p *DataSource) RemoveDestroyHandler(h DataSourceDestroyHandler)

func (*DataSource) RemoveOfferHandler

func (p *DataSource) RemoveOfferHandler(h DataSourceOfferHandler)

func (*DataSource) RemoveSetActionsHandler

func (p *DataSource) RemoveSetActionsHandler(h DataSourceSetActionsHandler)

func (*DataSource) Send

func (p *DataSource) Send(mime_type string, fd uintptr) error

Send will send the data.

Request for data from the client. Send the data as the specified mime type over the passed file descriptor, then close it.

func (*DataSource) Target

func (p *DataSource) Target(mime_type string) error

Target will a target accepts an offered mime type.

Sent when a target accepts pointer_focus or motion events. If a target does not accept any of the offered types, type is NULL.

Used for feedback during drag-and-drop.

type DataSourceDestroyEvent

type DataSourceDestroyEvent struct {
}

type DataSourceDestroyHandler

type DataSourceDestroyHandler interface {
	HandleDataSourceDestroy(DataSourceDestroyEvent)
}

type DataSourceOfferEvent

type DataSourceOfferEvent struct {
	MimeType string
}

type DataSourceOfferHandler

type DataSourceOfferHandler interface {
	HandleDataSourceOffer(DataSourceOfferEvent)
}

type DataSourceSetActionsEvent

type DataSourceSetActionsEvent struct {
	DndActions uint32
}

type DataSourceSetActionsHandler

type DataSourceSetActionsHandler interface {
	HandleDataSourceSetActions(DataSourceSetActionsEvent)
}

type Dispatcher

type Dispatcher interface {
	Dispatch(*Event)
}

type Display

type Display struct {
	BaseProxy
	// contains filtered or unexported fields
}

func Connect

func Connect(addr string) (ret *Display, err error)

func Listen

func Listen(addr string) (ret *Display, err error)

func NewClientConnect

func NewClientConnect(fd int) *Display

func NewDisplay

func NewDisplay(ctx *Context, id int) *Display

func (*Display) AddGetRegistryHandler

func (p *Display) AddGetRegistryHandler(h DisplayGetRegistryHandler)

func (*Display) AddSyncHandler

func (p *Display) AddSyncHandler(h DisplaySyncHandler)

func (*Display) DeleteId

func (p *Display) DeleteId(id uint32) error

DeleteId will acknowledge object ID deletion.

This event is used internally by the object ID management logic. When a client deletes an object, the server will send this event to acknowledge that it has seen the delete request. When the client receives this event, it will know that it can safely reuse the object ID.

func (*Display) Dispatch

func (p *Display) Dispatch(event *Event)

func (*Display) Error

func (p *Display) Error(object_id, code uint32, message string) error

Error will fatal error event.

The error event is sent out when a fatal (non-recoverable) error has occurred. The object_id argument is the object where the error occurred, most often in response to a request to that object. The code identifies the error and is defined by the object interface. As such, each interface defines its own set of error codes. The message is a brief description of the error, for (debugging) convenience.

func (*Display) RemoveGetRegistryHandler

func (p *Display) RemoveGetRegistryHandler(h DisplayGetRegistryHandler)

func (*Display) RemoveSyncHandler

func (p *Display) RemoveSyncHandler(h DisplaySyncHandler)

type DisplayGetRegistryEvent

type DisplayGetRegistryEvent struct {
	Registry *Registry
}

type DisplayGetRegistryHandler

type DisplayGetRegistryHandler interface {
	HandleDisplayGetRegistry(DisplayGetRegistryEvent)
}

type DisplaySyncEvent

type DisplaySyncEvent struct {
	Callback *Callback
}

type DisplaySyncHandler

type DisplaySyncHandler interface {
	HandleDisplaySync(DisplaySyncEvent)
}

type Event

type Event struct {
	Pid    ProxyId
	Opcode uint32
	Data   []byte
	// contains filtered or unexported fields
}

func ReadEventUnix

func ReadEventUnix(fd int) (Event, error)

func (*Event) Array

func (ev *Event) Array() []int32

func (*Event) FD

func (ev *Event) FD() uintptr

func (*Event) Float32

func (ev *Event) Float32() float32

func (*Event) Int32

func (ev *Event) Int32() int32

func (*Event) Proxy

func (ev *Event) Proxy(c *Context) Proxy

func (*Event) String

func (ev *Event) String() string

func (*Event) Uint32

func (ev *Event) Uint32() uint32

type Handler

type Handler interface {
	Handle(ev interface{})
}

func HandlerFunc

func HandlerFunc(f func(interface{})) Handler

type Keyboard

type Keyboard struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewKeyboard

func NewKeyboard(ctx *Context, id int) *Keyboard

func (*Keyboard) AddReleaseHandler

func (p *Keyboard) AddReleaseHandler(h KeyboardReleaseHandler)

func (*Keyboard) Dispatch

func (p *Keyboard) Dispatch(event *Event)

func (*Keyboard) Enter

func (p *Keyboard) Enter(serial uint32, surface *Surface, keys []int32) error

Enter will enter event.

Notification that this seat's keyboard focus is on a certain surface.

func (*Keyboard) Key

func (p *Keyboard) Key(serial uint32, time uint32, key uint32, state uint32) error

Key will key event.

A key was pressed or released. The time argument is a timestamp with millisecond granularity, with an undefined base.

func (*Keyboard) Keymap

func (p *Keyboard) Keymap(format uint32, fd uintptr, size uint32) error

Keymap will keyboard mapping.

This event provides a file descriptor to the client which can be memory-mapped to provide a keyboard mapping description.

From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail.

func (*Keyboard) Leave

func (p *Keyboard) Leave(serial uint32, surface *Surface) error

Leave will leave event.

Notification that this seat's keyboard focus is no longer on a certain surface.

The leave notification is sent before the enter notification for the new focus.

func (*Keyboard) Modifiers

func (p *Keyboard) Modifiers(serial uint32, mods_depressed uint32, mods_latched uint32, mods_locked uint32, group uint32) error

Modifiers will modifier and group state.

Notifies clients that the modifier and/or group state has changed, and it should update its local state.

func (*Keyboard) RemoveReleaseHandler

func (p *Keyboard) RemoveReleaseHandler(h KeyboardReleaseHandler)

func (*Keyboard) RepeatInfo

func (p *Keyboard) RepeatInfo(rate int32, delay int32) error

RepeatInfo will repeat rate and delay.

Informs the client about the keyboard's repeat rate and delay.

This event is sent as soon as the wl_keyboard object has been created, and is guaranteed to be received by the client before any key press event.

Negative values for either rate or delay are illegal. A rate of zero will disable any repeating (regardless of the value of delay).

This event can be sent later on as well with a new value if necessary, so clients should continue listening for the event past the creation of wl_keyboard.

type KeyboardReleaseEvent

type KeyboardReleaseEvent struct {
}

type KeyboardReleaseHandler

type KeyboardReleaseHandler interface {
	HandleKeyboardRelease(KeyboardReleaseEvent)
}

type Output

type Output struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewOutput

func NewOutput(ctx *Context, id int) *Output

func (*Output) AddReleaseHandler

func (p *Output) AddReleaseHandler(h OutputReleaseHandler)

func (*Output) Dispatch

func (p *Output) Dispatch(event *Event)

func (*Output) Done

func (p *Output) Done() error

Done will sent all information about output.

This event is sent after all other properties have been sent after binding to the output object and after any other property changes done after that. This allows changes to the output properties to be seen as atomic, even if they happen via multiple events.

func (*Output) Geometry

func (p *Output) Geometry(x int32, y int32, physical_width int32, physical_height int32, subpixel int32, make string, model string, transform int32) error

Geometry will properties of the output.

The geometry event describes geometric properties of the output. The event is sent when binding to the output object and whenever any of the properties change.

The physical size can be set to zero if it doesn't make sense for this output (e.g. for projectors or virtual outputs).

Note: wl_output only advertises partial information about the output position and identification. Some compositors, for instance those not implementing a desktop-style output layout or those exposing virtual outputs, might fake this information. Instead of using x and y, clients should use xdg_output.logical_position. Instead of using make and model, clients should use xdg_output.name and xdg_output.description.

func (*Output) Mode

func (p *Output) Mode(flags uint32, width int32, height int32, refresh int32) error

Mode will advertise available modes for the output.

The mode event describes an available mode for the output.

The event is sent when binding to the output object and there will always be one mode, the current mode. The event is sent again if an output changes mode, for the mode that is now current. In other words, the current mode is always the last mode that was received with the current flag set.

The size of a mode is given in physical hardware units of the output device. This is not necessarily the same as the output size in the global compositor space. For instance, the output may be scaled, as described in wl_output.scale, or transformed, as described in wl_output.transform. Clients willing to retrieve the output size in the global compositor space should use xdg_output.logical_size instead.

Clients should not use the refresh rate to schedule frames. Instead, they should use the wl_surface.frame event or the presentation-time protocol.

Note: this information is not always meaningful for all outputs. Some compositors, such as those exposing virtual outputs, might fake the refresh rate or the size.

func (*Output) RemoveReleaseHandler

func (p *Output) RemoveReleaseHandler(h OutputReleaseHandler)

func (*Output) Scale

func (p *Output) Scale(factor int32) error

Scale will output scaling properties.

This event contains scaling geometry information that is not in the geometry event. It may be sent after binding the output object or if the output scale changes later. If it is not sent, the client should assume a scale of 1.

A scale larger than 1 means that the compositor will automatically scale surface buffers by this amount when rendering. This is used for very high resolution displays where applications rendering at the native resolution would be too small to be legible.

It is intended that scaling aware clients track the current output of a surface, and if it is on a scaled output it should use wl_surface.set_buffer_scale with the scale of the output. That way the compositor can avoid scaling the surface, and the client can supply a higher detail image.

type OutputReleaseEvent

type OutputReleaseEvent struct {
}

type OutputReleaseHandler

type OutputReleaseHandler interface {
	HandleOutputRelease(OutputReleaseEvent)
}

type Pointer

type Pointer struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewPointer

func NewPointer(ctx *Context, id int) *Pointer

func (*Pointer) AddReleaseHandler

func (p *Pointer) AddReleaseHandler(h PointerReleaseHandler)

func (*Pointer) AddSetCursorHandler

func (p *Pointer) AddSetCursorHandler(h PointerSetCursorHandler)

func (*Pointer) Axis

func (p *Pointer) Axis(time uint32, axis uint32, value float32) error

Axis will axis event.

Scroll and other axis notifications.

For scroll events (vertical and horizontal scroll axes), the value parameter is the length of a vector along the specified axis in a coordinate space identical to those of motion events, representing a relative movement along the specified axis.

For devices that support movements non-parallel to axes multiple axis events will be emitted.

When applicable, for example for touch pads, the server can choose to emit scroll events where the motion vector is equivalent to a motion event vector.

When applicable, a client can transform its content relative to the scroll distance.

func (*Pointer) AxisDiscrete

func (p *Pointer) AxisDiscrete(axis uint32, discrete int32) error

AxisDiscrete will axis click event.

Discrete step information for scroll and other axes.

This event carries the axis value of the wl_pointer.axis event in discrete steps (e.g. mouse wheel clicks).

This event does not occur on its own, it is coupled with a wl_pointer.axis event that represents this axis value on a continuous scale. The protocol guarantees that each axis_discrete event is always followed by exactly one axis event with the same axis number within the same wl_pointer.frame. Note that the protocol allows for other events to occur between the axis_discrete and its coupled axis event, including other axis_discrete or axis events.

This event is optional; continuous scrolling devices like two-finger scrolling on touchpads do not have discrete steps and do not generate this event.

The discrete value carries the directional information. e.g. a value of -2 is two steps towards the negative direction of this axis.

The axis number is identical to the axis number in the associated axis event.

The order of wl_pointer.axis_discrete and wl_pointer.axis_source is not guaranteed.

func (*Pointer) AxisSource

func (p *Pointer) AxisSource(axis_source uint32) error

AxisSource will axis source event.

Source information for scroll and other axes.

This event does not occur on its own. It is sent before a wl_pointer.frame event and carries the source information for all events within that frame.

The source specifies how this event was generated. If the source is wl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be sent when the user lifts the finger off the device.

If the source is wl_pointer.axis_source.wheel, wl_pointer.axis_source.wheel_tilt or wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may or may not be sent. Whether a compositor sends an axis_stop event for these sources is hardware-specific and implementation-dependent; clients must not rely on receiving an axis_stop event for these scroll sources and should treat scroll sequences from these scroll sources as unterminated by default.

This event is optional. If the source is unknown for a particular axis event sequence, no event is sent. Only one wl_pointer.axis_source event is permitted per frame.

The order of wl_pointer.axis_discrete and wl_pointer.axis_source is not guaranteed.

func (*Pointer) AxisStop

func (p *Pointer) AxisStop(time uint32, axis uint32) error

AxisStop will axis stop event.

Stop notification for scroll and other axes.

For some wl_pointer.axis_source types, a wl_pointer.axis_stop event is sent to notify a client that the axis sequence has terminated. This enables the client to implement kinetic scrolling. See the wl_pointer.axis_source documentation for information on when this event may be generated.

Any wl_pointer.axis events with the same axis_source after this event should be considered as the start of a new axis motion.

The timestamp is to be interpreted identical to the timestamp in the wl_pointer.axis event. The timestamp value may be the same as a preceding wl_pointer.axis event.

func (*Pointer) Button

func (p *Pointer) Button(serial uint32, time uint32, button uint32, state uint32) error

Button will pointer button event.

Mouse button click and release notifications.

The location of the click is given by the last motion or enter event. The time argument is a timestamp with millisecond granularity, with an undefined base.

The button is a button code as defined in the Linux kernel's linux/input-event-codes.h header file, e.g. BTN_LEFT.

Any 16-bit button code value is reserved for future additions to the kernel's event code list. All other button codes above 0xFFFF are currently undefined but may be used in future versions of this protocol.

func (*Pointer) Dispatch

func (p *Pointer) Dispatch(event *Event)

func (*Pointer) Enter

func (p *Pointer) Enter(serial uint32, surface *Surface, surface_x float32, surface_y float32) error

Enter will enter event.

Notification that this seat's pointer is focused on a certain surface.

When a seat's focus enters a surface, the pointer image is undefined and a client should respond to this event by setting an appropriate pointer image with the set_cursor request.

func (*Pointer) Frame

func (p *Pointer) Frame() error

Frame will end of a pointer event sequence.

Indicates the end of a set of events that logically belong together. A client is expected to accumulate the data in all events within the frame before proceeding.

All wl_pointer events before a wl_pointer.frame event belong logically together. For example, in a diagonal scroll motion the compositor will send an optional wl_pointer.axis_source event, two wl_pointer.axis events (horizontal and vertical) and finally a wl_pointer.frame event. The client may use this information to calculate a diagonal vector for scrolling.

When multiple wl_pointer.axis events occur within the same frame, the motion vector is the combined motion of all events. When a wl_pointer.axis and a wl_pointer.axis_stop event occur within the same frame, this indicates that axis movement in one axis has stopped but continues in the other axis. When multiple wl_pointer.axis_stop events occur within the same frame, this indicates that these axes stopped in the same instance.

A wl_pointer.frame event is sent for every logical event group, even if the group only contains a single wl_pointer event. Specifically, a client may get a sequence: motion, frame, button, frame, axis, frame, axis_stop, frame.

The wl_pointer.enter and wl_pointer.leave events are logical events generated by the compositor and not the hardware. These events are also grouped by a wl_pointer.frame. When a pointer moves from one surface to another, a compositor should group the wl_pointer.leave event within the same wl_pointer.frame. However, a client must not rely on wl_pointer.leave and wl_pointer.enter being in the same wl_pointer.frame. Compositor-specific policies may require the wl_pointer.leave and wl_pointer.enter event being split across multiple wl_pointer.frame groups.

func (*Pointer) Leave

func (p *Pointer) Leave(serial uint32, surface *Surface) error

Leave will leave event.

Notification that this seat's pointer is no longer focused on a certain surface.

The leave notification is sent before the enter notification for the new focus.

func (*Pointer) Motion

func (p *Pointer) Motion(time uint32, surface_x float32, surface_y float32) error

Motion will pointer motion event.

Notification of pointer location change. The arguments surface_x and surface_y are the location relative to the focused surface.

func (*Pointer) RemoveReleaseHandler

func (p *Pointer) RemoveReleaseHandler(h PointerReleaseHandler)

func (*Pointer) RemoveSetCursorHandler

func (p *Pointer) RemoveSetCursorHandler(h PointerSetCursorHandler)

type PointerReleaseEvent

type PointerReleaseEvent struct {
}

type PointerReleaseHandler

type PointerReleaseHandler interface {
	HandlePointerRelease(PointerReleaseEvent)
}

type PointerSetCursorEvent

type PointerSetCursorEvent struct {
	Serial   uint32
	Surface  *Surface
	HotspotX int32
	HotspotY int32
}

type PointerSetCursorHandler

type PointerSetCursorHandler interface {
	HandlePointerSetCursor(PointerSetCursorEvent)
}

type Proxy

type Proxy interface {
	Context() *Context
	SetContext(c *Context)
	Id() ProxyId
	SetId(id ProxyId)
}

type ProxyId

type ProxyId uint32

type Region

type Region struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewRegion

func NewRegion(ctx *Context, id int) *Region

func (*Region) AddAddHandler

func (p *Region) AddAddHandler(h RegionAddHandler)

func (*Region) AddDestroyHandler

func (p *Region) AddDestroyHandler(h RegionDestroyHandler)

func (*Region) AddSubtractHandler

func (p *Region) AddSubtractHandler(h RegionSubtractHandler)

func (*Region) Dispatch

func (p *Region) Dispatch(event *Event)

func (*Region) RemoveAddHandler

func (p *Region) RemoveAddHandler(h RegionAddHandler)

func (*Region) RemoveDestroyHandler

func (p *Region) RemoveDestroyHandler(h RegionDestroyHandler)

func (*Region) RemoveSubtractHandler

func (p *Region) RemoveSubtractHandler(h RegionSubtractHandler)

type RegionAddEvent

type RegionAddEvent struct {
	X      int32
	Y      int32
	Width  int32
	Height int32
}

type RegionAddHandler

type RegionAddHandler interface {
	HandleRegionAdd(RegionAddEvent)
}

type RegionDestroyEvent

type RegionDestroyEvent struct {
}

type RegionDestroyHandler

type RegionDestroyHandler interface {
	HandleRegionDestroy(RegionDestroyEvent)
}

type RegionSubtractEvent

type RegionSubtractEvent struct {
	X      int32
	Y      int32
	Width  int32
	Height int32
}

type RegionSubtractHandler

type RegionSubtractHandler interface {
	HandleRegionSubtract(RegionSubtractEvent)
}

type Registry

type Registry struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(ctx *Context, id int) *Registry

func (*Registry) AddBindHandler

func (p *Registry) AddBindHandler(h RegistryBindHandler)

func (*Registry) Dispatch

func (p *Registry) Dispatch(event *Event)

func (*Registry) Global

func (p *Registry) Global(name uint32, iface string, version uint32) error

Global will announce global object.

Notify the client of global objects.

The event notifies the client that a global object with the given name is now available, and it implements the given version of the given interface.

func (*Registry) GlobalRemove

func (p *Registry) GlobalRemove(name uint32) error

GlobalRemove will announce removal of global object.

Notify the client of removed global objects.

This event notifies the client that the global identified by name is no longer available. If the client bound to the global using the bind request, the client should now destroy that object.

The object remains valid and requests to the object will be ignored until the client destroys it, to avoid races between the global going away and a client sending a request to it.

func (*Registry) RemoveBindHandler

func (p *Registry) RemoveBindHandler(h RegistryBindHandler)

type RegistryBindEvent

type RegistryBindEvent struct {
	Name    uint32
	Id      uint32 //Proxy
	Iface   string
	Version uint32
}

type RegistryBindHandler

type RegistryBindHandler interface {
	HandleRegistryBind(RegistryBindEvent)
}

type Request

type Request struct {
	Opcode uint32
	// contains filtered or unexported fields
}

func (*Request) PutArray

func (r *Request) PutArray(a []int32)

func (*Request) PutFd

func (r *Request) PutFd(fd uintptr)

func (*Request) PutFloat32

func (r *Request) PutFloat32(f float32)

func (*Request) PutInt32

func (r *Request) PutInt32(i int32)

func (*Request) PutProxy

func (r *Request) PutProxy(p Proxy)

func (*Request) PutString

func (r *Request) PutString(s string)

func (*Request) PutUint32

func (r *Request) PutUint32(u uint32)

func (*Request) Write

func (r *Request) Write(arg interface{})

type Seat

type Seat struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewSeat

func NewSeat(ctx *Context, id int) *Seat

func (*Seat) AddGetKeyboardHandler

func (p *Seat) AddGetKeyboardHandler(h SeatGetKeyboardHandler)

func (*Seat) AddGetPointerHandler

func (p *Seat) AddGetPointerHandler(h SeatGetPointerHandler)

func (*Seat) AddGetTouchHandler

func (p *Seat) AddGetTouchHandler(h SeatGetTouchHandler)

func (*Seat) AddReleaseHandler

func (p *Seat) AddReleaseHandler(h SeatReleaseHandler)

func (*Seat) Capabilities

func (p *Seat) Capabilities(capabilities uint32) error

Capabilities will seat capabilities changed.

This is emitted whenever a seat gains or loses the pointer, keyboard or touch capabilities. The argument is a capability enum containing the complete set of capabilities this seat has.

When the pointer capability is added, a client may create a wl_pointer object using the wl_seat.get_pointer request. This object will receive pointer events until the capability is removed in the future.

When the pointer capability is removed, a client should destroy the wl_pointer objects associated with the seat where the capability was removed, using the wl_pointer.release request. No further pointer events will be received on these objects.

In some compositors, if a seat regains the pointer capability and a client has a previously obtained wl_pointer object of version 4 or less, that object may start sending pointer events again. This behavior is considered a misinterpretation of the intended behavior and must not be relied upon by the client. wl_pointer objects of version 5 or later must not send events if created before the most recent event notifying the client of an added pointer capability.

The above behavior also applies to wl_keyboard and wl_touch with the keyboard and touch capabilities, respectively.

func (*Seat) Dispatch

func (p *Seat) Dispatch(event *Event)

func (*Seat) Name

func (p *Seat) Name(name string) error

Name will unique identifier for this seat.

In a multiseat configuration this can be used by the client to help identify which physical devices the seat represents. Based on the seat configuration used by the compositor.

func (*Seat) RemoveGetKeyboardHandler

func (p *Seat) RemoveGetKeyboardHandler(h SeatGetKeyboardHandler)

func (*Seat) RemoveGetPointerHandler

func (p *Seat) RemoveGetPointerHandler(h SeatGetPointerHandler)

func (*Seat) RemoveGetTouchHandler

func (p *Seat) RemoveGetTouchHandler(h SeatGetTouchHandler)

func (*Seat) RemoveReleaseHandler

func (p *Seat) RemoveReleaseHandler(h SeatReleaseHandler)

type SeatGetKeyboardEvent

type SeatGetKeyboardEvent struct {
	Id *Keyboard
}

type SeatGetKeyboardHandler

type SeatGetKeyboardHandler interface {
	HandleSeatGetKeyboard(SeatGetKeyboardEvent)
}

type SeatGetPointerEvent

type SeatGetPointerEvent struct {
	Id *Pointer
}

type SeatGetPointerHandler

type SeatGetPointerHandler interface {
	HandleSeatGetPointer(SeatGetPointerEvent)
}

type SeatGetTouchEvent

type SeatGetTouchEvent struct {
	Id *Touch
}

type SeatGetTouchHandler

type SeatGetTouchHandler interface {
	HandleSeatGetTouch(SeatGetTouchEvent)
}

type SeatReleaseEvent

type SeatReleaseEvent struct {
}

type SeatReleaseHandler

type SeatReleaseHandler interface {
	HandleSeatRelease(SeatReleaseEvent)
}

type Shell

type Shell struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewShell

func NewShell(ctx *Context, id int) *Shell

func (*Shell) AddGetShellSurfaceHandler

func (p *Shell) AddGetShellSurfaceHandler(h ShellGetShellSurfaceHandler)

func (*Shell) Dispatch

func (p *Shell) Dispatch(event *Event)

func (*Shell) RemoveGetShellSurfaceHandler

func (p *Shell) RemoveGetShellSurfaceHandler(h ShellGetShellSurfaceHandler)

type ShellGetShellSurfaceEvent

type ShellGetShellSurfaceEvent struct {
	Id      *ShellSurface
	Surface *Surface
}

type ShellGetShellSurfaceHandler

type ShellGetShellSurfaceHandler interface {
	HandleShellGetShellSurface(ShellGetShellSurfaceEvent)
}

type ShellSurface

type ShellSurface struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewShellSurface

func NewShellSurface(ctx *Context, id int) *ShellSurface

func (*ShellSurface) AddMoveHandler

func (p *ShellSurface) AddMoveHandler(h ShellSurfaceMoveHandler)

func (*ShellSurface) AddPongHandler

func (p *ShellSurface) AddPongHandler(h ShellSurfacePongHandler)

func (*ShellSurface) AddResizeHandler

func (p *ShellSurface) AddResizeHandler(h ShellSurfaceResizeHandler)

func (*ShellSurface) AddSetClassHandler

func (p *ShellSurface) AddSetClassHandler(h ShellSurfaceSetClassHandler)

func (*ShellSurface) AddSetFullscreenHandler

func (p *ShellSurface) AddSetFullscreenHandler(h ShellSurfaceSetFullscreenHandler)

func (*ShellSurface) AddSetMaximizedHandler

func (p *ShellSurface) AddSetMaximizedHandler(h ShellSurfaceSetMaximizedHandler)

func (*ShellSurface) AddSetPopupHandler

func (p *ShellSurface) AddSetPopupHandler(h ShellSurfaceSetPopupHandler)

func (*ShellSurface) AddSetTitleHandler

func (p *ShellSurface) AddSetTitleHandler(h ShellSurfaceSetTitleHandler)

func (*ShellSurface) AddSetToplevelHandler

func (p *ShellSurface) AddSetToplevelHandler(h ShellSurfaceSetToplevelHandler)

func (*ShellSurface) AddSetTransientHandler

func (p *ShellSurface) AddSetTransientHandler(h ShellSurfaceSetTransientHandler)

func (*ShellSurface) Configure

func (p *ShellSurface) Configure(edges uint32, width int32, height int32) error

Configure will suggest resize.

The configure event asks the client to resize its surface.

The size is a hint, in the sense that the client is free to ignore it if it doesn't resize, pick a smaller size (to satisfy aspect ratio or resize in steps of NxM pixels).

The edges parameter provides a hint about how the surface was resized. The client may use this information to decide how to adjust its content to the new size (e.g. a scrolling area might adjust its content position to leave the viewable content unmoved).

The client is free to dismiss all but the last configure event it received.

The width and height arguments specify the size of the window in surface-local coordinates.

func (*ShellSurface) Dispatch

func (p *ShellSurface) Dispatch(event *Event)

func (*ShellSurface) Ping

func (p *ShellSurface) Ping(serial uint32) error

Ping will ping client.

Ping a client to check if it is receiving events and sending requests. A client is expected to reply with a pong request.

func (*ShellSurface) PopupDone

func (p *ShellSurface) PopupDone() error

PopupDone will popup interaction is done.

The popup_done event is sent out when a popup grab is broken, that is, when the user clicks a surface that doesn't belong to the client owning the popup surface.

func (*ShellSurface) RemoveMoveHandler

func (p *ShellSurface) RemoveMoveHandler(h ShellSurfaceMoveHandler)

func (*ShellSurface) RemovePongHandler

func (p *ShellSurface) RemovePongHandler(h ShellSurfacePongHandler)

func (*ShellSurface) RemoveResizeHandler

func (p *ShellSurface) RemoveResizeHandler(h ShellSurfaceResizeHandler)

func (*ShellSurface) RemoveSetClassHandler

func (p *ShellSurface) RemoveSetClassHandler(h ShellSurfaceSetClassHandler)

func (*ShellSurface) RemoveSetFullscreenHandler

func (p *ShellSurface) RemoveSetFullscreenHandler(h ShellSurfaceSetFullscreenHandler)

func (*ShellSurface) RemoveSetMaximizedHandler

func (p *ShellSurface) RemoveSetMaximizedHandler(h ShellSurfaceSetMaximizedHandler)

func (*ShellSurface) RemoveSetPopupHandler

func (p *ShellSurface) RemoveSetPopupHandler(h ShellSurfaceSetPopupHandler)

func (*ShellSurface) RemoveSetTitleHandler

func (p *ShellSurface) RemoveSetTitleHandler(h ShellSurfaceSetTitleHandler)

func (*ShellSurface) RemoveSetToplevelHandler

func (p *ShellSurface) RemoveSetToplevelHandler(h ShellSurfaceSetToplevelHandler)

func (*ShellSurface) RemoveSetTransientHandler

func (p *ShellSurface) RemoveSetTransientHandler(h ShellSurfaceSetTransientHandler)

type ShellSurfaceMoveEvent

type ShellSurfaceMoveEvent struct {
	Seat   *Seat
	Serial uint32
}

type ShellSurfaceMoveHandler

type ShellSurfaceMoveHandler interface {
	HandleShellSurfaceMove(ShellSurfaceMoveEvent)
}

type ShellSurfacePongEvent

type ShellSurfacePongEvent struct {
	Serial uint32
}

type ShellSurfacePongHandler

type ShellSurfacePongHandler interface {
	HandleShellSurfacePong(ShellSurfacePongEvent)
}

type ShellSurfaceResizeEvent

type ShellSurfaceResizeEvent struct {
	Seat   *Seat
	Serial uint32
	Edges  uint32
}

type ShellSurfaceResizeHandler

type ShellSurfaceResizeHandler interface {
	HandleShellSurfaceResize(ShellSurfaceResizeEvent)
}

type ShellSurfaceSetClassEvent

type ShellSurfaceSetClassEvent struct {
	Class string
}

type ShellSurfaceSetClassHandler

type ShellSurfaceSetClassHandler interface {
	HandleShellSurfaceSetClass(ShellSurfaceSetClassEvent)
}

type ShellSurfaceSetFullscreenEvent

type ShellSurfaceSetFullscreenEvent struct {
	Method    uint32
	Framerate uint32
	Output    *Output
}

type ShellSurfaceSetFullscreenHandler

type ShellSurfaceSetFullscreenHandler interface {
	HandleShellSurfaceSetFullscreen(ShellSurfaceSetFullscreenEvent)
}

type ShellSurfaceSetMaximizedEvent

type ShellSurfaceSetMaximizedEvent struct {
	Output *Output
}

type ShellSurfaceSetMaximizedHandler

type ShellSurfaceSetMaximizedHandler interface {
	HandleShellSurfaceSetMaximized(ShellSurfaceSetMaximizedEvent)
}

type ShellSurfaceSetPopupEvent

type ShellSurfaceSetPopupEvent struct {
	Seat   *Seat
	Serial uint32
	Parent *Surface
	X      int32
	Y      int32
	Flags  uint32
}

type ShellSurfaceSetPopupHandler

type ShellSurfaceSetPopupHandler interface {
	HandleShellSurfaceSetPopup(ShellSurfaceSetPopupEvent)
}

type ShellSurfaceSetTitleEvent

type ShellSurfaceSetTitleEvent struct {
	Title string
}

type ShellSurfaceSetTitleHandler

type ShellSurfaceSetTitleHandler interface {
	HandleShellSurfaceSetTitle(ShellSurfaceSetTitleEvent)
}

type ShellSurfaceSetToplevelEvent

type ShellSurfaceSetToplevelEvent struct {
}

type ShellSurfaceSetToplevelHandler

type ShellSurfaceSetToplevelHandler interface {
	HandleShellSurfaceSetToplevel(ShellSurfaceSetToplevelEvent)
}

type ShellSurfaceSetTransientEvent

type ShellSurfaceSetTransientEvent struct {
	Parent *Surface
	X      int32
	Y      int32
	Flags  uint32
}

type ShellSurfaceSetTransientHandler

type ShellSurfaceSetTransientHandler interface {
	HandleShellSurfaceSetTransient(ShellSurfaceSetTransientEvent)
}

type Shm

type Shm struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewShm

func NewShm(ctx *Context, id int) *Shm

func (*Shm) AddCreatePoolHandler

func (p *Shm) AddCreatePoolHandler(h ShmCreatePoolHandler)

func (*Shm) Dispatch

func (p *Shm) Dispatch(event *Event)

func (*Shm) Format

func (p *Shm) Format(format uint32) error

Format will pixel format description.

Informs the client about a valid pixel format that can be used for buffers. Known formats include argb8888 and xrgb8888.

func (*Shm) RemoveCreatePoolHandler

func (p *Shm) RemoveCreatePoolHandler(h ShmCreatePoolHandler)

type ShmCreatePoolEvent

type ShmCreatePoolEvent struct {
	Id   *ShmPool
	Fd   uintptr
	Size int32
}

type ShmCreatePoolHandler

type ShmCreatePoolHandler interface {
	HandleShmCreatePool(ShmCreatePoolEvent)
}

type ShmPool

type ShmPool struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewShmPool

func NewShmPool(ctx *Context, id int) *ShmPool

func (*ShmPool) AddCreateBufferHandler

func (p *ShmPool) AddCreateBufferHandler(h ShmPoolCreateBufferHandler)

func (*ShmPool) AddDestroyHandler

func (p *ShmPool) AddDestroyHandler(h ShmPoolDestroyHandler)

func (*ShmPool) AddResizeHandler

func (p *ShmPool) AddResizeHandler(h ShmPoolResizeHandler)

func (*ShmPool) Dispatch

func (p *ShmPool) Dispatch(event *Event)

func (*ShmPool) RemoveCreateBufferHandler

func (p *ShmPool) RemoveCreateBufferHandler(h ShmPoolCreateBufferHandler)

func (*ShmPool) RemoveDestroyHandler

func (p *ShmPool) RemoveDestroyHandler(h ShmPoolDestroyHandler)

func (*ShmPool) RemoveResizeHandler

func (p *ShmPool) RemoveResizeHandler(h ShmPoolResizeHandler)

type ShmPoolCreateBufferEvent

type ShmPoolCreateBufferEvent struct {
	Id     *Buffer
	Offset int32
	Width  int32
	Height int32
	Stride int32
	Format uint32
}

type ShmPoolCreateBufferHandler

type ShmPoolCreateBufferHandler interface {
	HandleShmPoolCreateBuffer(ShmPoolCreateBufferEvent)
}

type ShmPoolDestroyEvent

type ShmPoolDestroyEvent struct {
}

type ShmPoolDestroyHandler

type ShmPoolDestroyHandler interface {
	HandleShmPoolDestroy(ShmPoolDestroyEvent)
}

type ShmPoolResizeEvent

type ShmPoolResizeEvent struct {
	Size int32
}

type ShmPoolResizeHandler

type ShmPoolResizeHandler interface {
	HandleShmPoolResize(ShmPoolResizeEvent)
}

type Subcompositor

type Subcompositor struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewSubcompositor

func NewSubcompositor(ctx *Context, id int) *Subcompositor

func (*Subcompositor) AddDestroyHandler

func (p *Subcompositor) AddDestroyHandler(h SubcompositorDestroyHandler)

func (*Subcompositor) AddGetSubsurfaceHandler

func (p *Subcompositor) AddGetSubsurfaceHandler(h SubcompositorGetSubsurfaceHandler)

func (*Subcompositor) Dispatch

func (p *Subcompositor) Dispatch(event *Event)

func (*Subcompositor) RemoveDestroyHandler

func (p *Subcompositor) RemoveDestroyHandler(h SubcompositorDestroyHandler)

func (*Subcompositor) RemoveGetSubsurfaceHandler

func (p *Subcompositor) RemoveGetSubsurfaceHandler(h SubcompositorGetSubsurfaceHandler)

type SubcompositorDestroyEvent

type SubcompositorDestroyEvent struct {
}

type SubcompositorDestroyHandler

type SubcompositorDestroyHandler interface {
	HandleSubcompositorDestroy(SubcompositorDestroyEvent)
}

type SubcompositorGetSubsurfaceEvent

type SubcompositorGetSubsurfaceEvent struct {
	Id      *Subsurface
	Surface *Surface
	Parent  *Surface
}

type SubcompositorGetSubsurfaceHandler

type SubcompositorGetSubsurfaceHandler interface {
	HandleSubcompositorGetSubsurface(SubcompositorGetSubsurfaceEvent)
}

type Subsurface

type Subsurface struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewSubsurface

func NewSubsurface(ctx *Context, id int) *Subsurface

func (*Subsurface) AddDestroyHandler

func (p *Subsurface) AddDestroyHandler(h SubsurfaceDestroyHandler)

func (*Subsurface) AddPlaceAboveHandler

func (p *Subsurface) AddPlaceAboveHandler(h SubsurfacePlaceAboveHandler)

func (*Subsurface) AddPlaceBelowHandler

func (p *Subsurface) AddPlaceBelowHandler(h SubsurfacePlaceBelowHandler)

func (*Subsurface) AddSetDesyncHandler

func (p *Subsurface) AddSetDesyncHandler(h SubsurfaceSetDesyncHandler)

func (*Subsurface) AddSetPositionHandler

func (p *Subsurface) AddSetPositionHandler(h SubsurfaceSetPositionHandler)

func (*Subsurface) AddSetSyncHandler

func (p *Subsurface) AddSetSyncHandler(h SubsurfaceSetSyncHandler)

func (*Subsurface) Dispatch

func (p *Subsurface) Dispatch(event *Event)

func (*Subsurface) RemoveDestroyHandler

func (p *Subsurface) RemoveDestroyHandler(h SubsurfaceDestroyHandler)

func (*Subsurface) RemovePlaceAboveHandler

func (p *Subsurface) RemovePlaceAboveHandler(h SubsurfacePlaceAboveHandler)

func (*Subsurface) RemovePlaceBelowHandler

func (p *Subsurface) RemovePlaceBelowHandler(h SubsurfacePlaceBelowHandler)

func (*Subsurface) RemoveSetDesyncHandler

func (p *Subsurface) RemoveSetDesyncHandler(h SubsurfaceSetDesyncHandler)

func (*Subsurface) RemoveSetPositionHandler

func (p *Subsurface) RemoveSetPositionHandler(h SubsurfaceSetPositionHandler)

func (*Subsurface) RemoveSetSyncHandler

func (p *Subsurface) RemoveSetSyncHandler(h SubsurfaceSetSyncHandler)

type SubsurfaceDestroyEvent

type SubsurfaceDestroyEvent struct {
}

type SubsurfaceDestroyHandler

type SubsurfaceDestroyHandler interface {
	HandleSubsurfaceDestroy(SubsurfaceDestroyEvent)
}

type SubsurfacePlaceAboveEvent

type SubsurfacePlaceAboveEvent struct {
	Sibling *Surface
}

type SubsurfacePlaceAboveHandler

type SubsurfacePlaceAboveHandler interface {
	HandleSubsurfacePlaceAbove(SubsurfacePlaceAboveEvent)
}

type SubsurfacePlaceBelowEvent

type SubsurfacePlaceBelowEvent struct {
	Sibling *Surface
}

type SubsurfacePlaceBelowHandler

type SubsurfacePlaceBelowHandler interface {
	HandleSubsurfacePlaceBelow(SubsurfacePlaceBelowEvent)
}

type SubsurfaceSetDesyncEvent

type SubsurfaceSetDesyncEvent struct {
}

type SubsurfaceSetDesyncHandler

type SubsurfaceSetDesyncHandler interface {
	HandleSubsurfaceSetDesync(SubsurfaceSetDesyncEvent)
}

type SubsurfaceSetPositionEvent

type SubsurfaceSetPositionEvent struct {
	X int32
	Y int32
}

type SubsurfaceSetPositionHandler

type SubsurfaceSetPositionHandler interface {
	HandleSubsurfaceSetPosition(SubsurfaceSetPositionEvent)
}

type SubsurfaceSetSyncEvent

type SubsurfaceSetSyncEvent struct {
}

type SubsurfaceSetSyncHandler

type SubsurfaceSetSyncHandler interface {
	HandleSubsurfaceSetSync(SubsurfaceSetSyncEvent)
}

type Surface

type Surface struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewSurface

func NewSurface(ctx *Context, id int) *Surface

func (*Surface) AddAttachHandler

func (p *Surface) AddAttachHandler(h SurfaceAttachHandler)

func (*Surface) AddCommitHandler

func (p *Surface) AddCommitHandler(h SurfaceCommitHandler)

func (*Surface) AddDamageBufferHandler

func (p *Surface) AddDamageBufferHandler(h SurfaceDamageBufferHandler)

func (*Surface) AddDamageHandler

func (p *Surface) AddDamageHandler(h SurfaceDamageHandler)

func (*Surface) AddDestroyHandler

func (p *Surface) AddDestroyHandler(h SurfaceDestroyHandler)

func (*Surface) AddFrameHandler

func (p *Surface) AddFrameHandler(h SurfaceFrameHandler)

func (*Surface) AddSetBufferScaleHandler

func (p *Surface) AddSetBufferScaleHandler(h SurfaceSetBufferScaleHandler)

func (*Surface) AddSetBufferTransformHandler

func (p *Surface) AddSetBufferTransformHandler(h SurfaceSetBufferTransformHandler)

func (*Surface) AddSetInputRegionHandler

func (p *Surface) AddSetInputRegionHandler(h SurfaceSetInputRegionHandler)

func (*Surface) AddSetOpaqueRegionHandler

func (p *Surface) AddSetOpaqueRegionHandler(h SurfaceSetOpaqueRegionHandler)

func (*Surface) Dispatch

func (p *Surface) Dispatch(event *Event)

func (*Surface) Enter

func (p *Surface) Enter(output *Output) error

Enter will surface enters an output.

This is emitted whenever a surface's creation, movement, or resizing results in some part of it being within the scanout region of an output.

Note that a surface may be overlapping with zero or more outputs.

func (*Surface) Leave

func (p *Surface) Leave(output *Output) error

Leave will surface leaves an output.

This is emitted whenever a surface's creation, movement, or resizing results in it no longer having any part of it within the scanout region of an output.

func (*Surface) RemoveAttachHandler

func (p *Surface) RemoveAttachHandler(h SurfaceAttachHandler)

func (*Surface) RemoveCommitHandler

func (p *Surface) RemoveCommitHandler(h SurfaceCommitHandler)

func (*Surface) RemoveDamageBufferHandler

func (p *Surface) RemoveDamageBufferHandler(h SurfaceDamageBufferHandler)

func (*Surface) RemoveDamageHandler

func (p *Surface) RemoveDamageHandler(h SurfaceDamageHandler)

func (*Surface) RemoveDestroyHandler

func (p *Surface) RemoveDestroyHandler(h SurfaceDestroyHandler)

func (*Surface) RemoveFrameHandler

func (p *Surface) RemoveFrameHandler(h SurfaceFrameHandler)

func (*Surface) RemoveSetBufferScaleHandler

func (p *Surface) RemoveSetBufferScaleHandler(h SurfaceSetBufferScaleHandler)

func (*Surface) RemoveSetBufferTransformHandler

func (p *Surface) RemoveSetBufferTransformHandler(h SurfaceSetBufferTransformHandler)

func (*Surface) RemoveSetInputRegionHandler

func (p *Surface) RemoveSetInputRegionHandler(h SurfaceSetInputRegionHandler)

func (*Surface) RemoveSetOpaqueRegionHandler

func (p *Surface) RemoveSetOpaqueRegionHandler(h SurfaceSetOpaqueRegionHandler)

type SurfaceAttachEvent

type SurfaceAttachEvent struct {
	Buffer *Buffer
	X      int32
	Y      int32
}

type SurfaceAttachHandler

type SurfaceAttachHandler interface {
	HandleSurfaceAttach(SurfaceAttachEvent)
}

type SurfaceCommitEvent

type SurfaceCommitEvent struct {
}

type SurfaceCommitHandler

type SurfaceCommitHandler interface {
	HandleSurfaceCommit(SurfaceCommitEvent)
}

type SurfaceDamageBufferEvent

type SurfaceDamageBufferEvent struct {
	X      int32
	Y      int32
	Width  int32
	Height int32
}

type SurfaceDamageBufferHandler

type SurfaceDamageBufferHandler interface {
	HandleSurfaceDamageBuffer(SurfaceDamageBufferEvent)
}

type SurfaceDamageEvent

type SurfaceDamageEvent struct {
	X      int32
	Y      int32
	Width  int32
	Height int32
}

type SurfaceDamageHandler

type SurfaceDamageHandler interface {
	HandleSurfaceDamage(SurfaceDamageEvent)
}

type SurfaceDestroyEvent

type SurfaceDestroyEvent struct {
}

type SurfaceDestroyHandler

type SurfaceDestroyHandler interface {
	HandleSurfaceDestroy(SurfaceDestroyEvent)
}

type SurfaceFrameEvent

type SurfaceFrameEvent struct {
	Callback *Callback
}

type SurfaceFrameHandler

type SurfaceFrameHandler interface {
	HandleSurfaceFrame(SurfaceFrameEvent)
}

type SurfaceSetBufferScaleEvent

type SurfaceSetBufferScaleEvent struct {
	Scale int32
}

type SurfaceSetBufferScaleHandler

type SurfaceSetBufferScaleHandler interface {
	HandleSurfaceSetBufferScale(SurfaceSetBufferScaleEvent)
}

type SurfaceSetBufferTransformEvent

type SurfaceSetBufferTransformEvent struct {
	Transform int32
}

type SurfaceSetBufferTransformHandler

type SurfaceSetBufferTransformHandler interface {
	HandleSurfaceSetBufferTransform(SurfaceSetBufferTransformEvent)
}

type SurfaceSetInputRegionEvent

type SurfaceSetInputRegionEvent struct {
	Region *Region
}

type SurfaceSetInputRegionHandler

type SurfaceSetInputRegionHandler interface {
	HandleSurfaceSetInputRegion(SurfaceSetInputRegionEvent)
}

type SurfaceSetOpaqueRegionEvent

type SurfaceSetOpaqueRegionEvent struct {
	Region *Region
}

type SurfaceSetOpaqueRegionHandler

type SurfaceSetOpaqueRegionHandler interface {
	HandleSurfaceSetOpaqueRegion(SurfaceSetOpaqueRegionEvent)
}

type TextCursorPosition

type TextCursorPosition struct {
	BaseProxy
}

func NewTextCursorPosition

func NewTextCursorPosition(conn *Context) *TextCursorPosition

func (*TextCursorPosition) Notify

func (p *TextCursorPosition) Notify(surface *Surface, x float32, y float32) error

type Touch

type Touch struct {
	BaseProxy
	// contains filtered or unexported fields
}

func NewTouch

func NewTouch(ctx *Context, id int) *Touch

func (*Touch) AddReleaseHandler

func (p *Touch) AddReleaseHandler(h TouchReleaseHandler)

func (*Touch) Cancel

func (p *Touch) Cancel() error

Cancel will touch session cancelled.

Sent if the compositor decides the touch stream is a global gesture. No further events are sent to the clients from that particular gesture. Touch cancellation applies to all touch points currently active on this client's surface. The client is responsible for finalizing the touch points, future touch points on this surface may reuse the touch point ID.

func (*Touch) Dispatch

func (p *Touch) Dispatch(event *Event)

func (*Touch) Down

func (p *Touch) Down(serial uint32, time uint32, surface *Surface, id int32, x float32, y float32) error

Down will touch down event and beginning of a touch sequence.

A new touch point has appeared on the surface. This touch point is assigned a unique ID. Future events from this touch point reference this ID. The ID ceases to be valid after a touch up event and may be reused in the future.

func (*Touch) Frame

func (p *Touch) Frame() error

Frame will end of touch frame event.

Indicates the end of a set of events that logically belong together. A client is expected to accumulate the data in all events within the frame before proceeding.

A wl_touch.frame terminates at least one event but otherwise no guarantee is provided about the set of events within a frame. A client must assume that any state not updated in a frame is unchanged from the previously known state.

func (*Touch) Motion

func (p *Touch) Motion(time uint32, id int32, x float32, y float32) error

Motion will update of touch point coordinates.

A touch point has changed coordinates.

func (*Touch) Orientation

func (p *Touch) Orientation(id int32, orientation float32) error

Orientation will update orientation of touch point.

Sent when a touchpoint has changed its orientation.

This event does not occur on its own. It is sent before a wl_touch.frame event and carries the new shape information for any previously reported, or new touch points of that frame.

Other events describing the touch point such as wl_touch.down, wl_touch.motion or wl_touch.shape may be sent within the same wl_touch.frame. A client should treat these events as a single logical touch point update. The order of wl_touch.shape, wl_touch.orientation and wl_touch.motion is not guaranteed. A wl_touch.down event is guaranteed to occur before the first wl_touch.orientation event for this touch ID but both events may occur within the same wl_touch.frame.

The orientation describes the clockwise angle of a touchpoint's major axis to the positive surface y-axis and is normalized to the -180 to +180 degree range. The granularity of orientation depends on the touch device, some devices only support binary rotation values between 0 and 90 degrees.

This event is only sent by the compositor if the touch device supports orientation reports.

func (*Touch) RemoveReleaseHandler

func (p *Touch) RemoveReleaseHandler(h TouchReleaseHandler)

func (*Touch) Shape

func (p *Touch) Shape(id int32, major float32, minor float32) error

Shape will update shape of touch point.

Sent when a touchpoint has changed its shape.

This event does not occur on its own. It is sent before a wl_touch.frame event and carries the new shape information for any previously reported, or new touch points of that frame.

Other events describing the touch point such as wl_touch.down, wl_touch.motion or wl_touch.orientation may be sent within the same wl_touch.frame. A client should treat these events as a single logical touch point update. The order of wl_touch.shape, wl_touch.orientation and wl_touch.motion is not guaranteed. A wl_touch.down event is guaranteed to occur before the first wl_touch.shape event for this touch ID but both events may occur within the same wl_touch.frame.

A touchpoint shape is approximated by an ellipse through the major and minor axis length. The major axis length describes the longer diameter of the ellipse, while the minor axis length describes the shorter diameter. Major and minor are orthogonal and both are specified in surface-local coordinates. The center of the ellipse is always at the touchpoint location as reported by wl_touch.down or wl_touch.move.

This event is only sent by the compositor if the touch device supports shape reports. The client has to make reasonable assumptions about the shape if it did not receive this event.

func (*Touch) Up

func (p *Touch) Up(serial uint32, time uint32, id int32) error

Up will end of a touch event sequence.

The touch point has disappeared. No further events will be sent for this touch point and the touch point's ID is released and may be reused in a future touch down event.

type TouchReleaseEvent

type TouchReleaseEvent struct {
}

type TouchReleaseHandler

type TouchReleaseHandler interface {
	HandleTouchRelease(TouchReleaseEvent)
}

type WestonScreenshooter

type WestonScreenshooter struct {
	BaseProxy
	DoneChan chan WestonScreenshooterDoneEvent
}

func NewWestonScreenshooter

func NewWestonScreenshooter(conn *Context) *WestonScreenshooter

func (*WestonScreenshooter) Shoot

func (p *WestonScreenshooter) Shoot(output *Output, buffer *Buffer) error

type WestonScreenshooterDoneEvent

type WestonScreenshooterDoneEvent struct {
}

Directories

Path Synopsis
generated by wl-scanner https://github.com/malcolmstill/wl-scanner from: /usr/share/wayland-protocols/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml on 2020-04-17 01:02:10 +0100
generated by wl-scanner https://github.com/malcolmstill/wl-scanner from: /usr/share/wayland-protocols/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml on 2020-04-17 01:02:10 +0100
ui
generated by wl-scanner https://github.com/malcolmstill/wl-scanner from: /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml on 2020-04-17 01:06:21 +0100
generated by wl-scanner https://github.com/malcolmstill/wl-scanner from: /usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml on 2020-04-17 01:06:21 +0100
generated by wl-scanner https://github.com/malcolmstill/wl-scanner from: /usr/share/wayland-protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml on 2020-04-17 01:07:31 +0100
generated by wl-scanner https://github.com/malcolmstill/wl-scanner from: /usr/share/wayland-protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml on 2020-04-17 01:07:31 +0100

Jump to

Keyboard shortcuts

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