Documentation ¶
Overview ¶
Package wl .
Index ¶
- Constants
- type BaseProxy
- type Buffer
- type BufferReleaseEvent
- type BufferReleaseHandler
- type Callback
- type CallbackDoneEvent
- type CallbackDoneHandler
- type Compositor
- type Context
- type DataDevice
- func (p *DataDevice) AddDataOfferHandler(h DataDeviceDataOfferHandler)
- func (p *DataDevice) AddDropHandler(h DataDeviceDropHandler)
- func (p *DataDevice) AddEnterHandler(h DataDeviceEnterHandler)
- func (p *DataDevice) AddLeaveHandler(h DataDeviceLeaveHandler)
- func (p *DataDevice) AddMotionHandler(h DataDeviceMotionHandler)
- func (p *DataDevice) AddSelectionHandler(h DataDeviceSelectionHandler)
- func (p *DataDevice) Dispatch(event *Event)
- func (p *DataDevice) Release() error
- func (p *DataDevice) RemoveDataOfferHandler(h DataDeviceDataOfferHandler)
- func (p *DataDevice) RemoveDropHandler(h DataDeviceDropHandler)
- func (p *DataDevice) RemoveEnterHandler(h DataDeviceEnterHandler)
- func (p *DataDevice) RemoveLeaveHandler(h DataDeviceLeaveHandler)
- func (p *DataDevice) RemoveMotionHandler(h DataDeviceMotionHandler)
- func (p *DataDevice) RemoveSelectionHandler(h DataDeviceSelectionHandler)
- func (p *DataDevice) SetSelection(source *DataSource, serial uint32) error
- func (p *DataDevice) StartDrag(source *DataSource, origin, icon *Surface, serial uint32) error
- type DataDeviceDataOfferEvent
- type DataDeviceDataOfferHandler
- type DataDeviceDropEvent
- type DataDeviceDropHandler
- type DataDeviceEnterEvent
- type DataDeviceEnterHandler
- type DataDeviceLeaveEvent
- type DataDeviceLeaveHandler
- type DataDeviceManager
- type DataDeviceMotionEvent
- type DataDeviceMotionHandler
- type DataDeviceSelectionEvent
- type DataDeviceSelectionHandler
- type DataOffer
- func (p *DataOffer) Accept(serial uint32, mime_type string) error
- func (p *DataOffer) AddActionHandler(h DataOfferActionHandler)
- func (p *DataOffer) AddOfferHandler(h DataOfferOfferHandler)
- func (p *DataOffer) AddSourceActionsHandler(h DataOfferSourceActionsHandler)
- func (p *DataOffer) Destroy() error
- func (p *DataOffer) Dispatch(event *Event)
- func (p *DataOffer) Finish() error
- func (p *DataOffer) Receive(mime_type string, fd uintptr) error
- func (p *DataOffer) RemoveActionHandler(h DataOfferActionHandler)
- func (p *DataOffer) RemoveOfferHandler(h DataOfferOfferHandler)
- func (p *DataOffer) RemoveSourceActionsHandler(h DataOfferSourceActionsHandler)
- func (p *DataOffer) SetActions(dnd_actions, preferred_action uint32) error
- type DataOfferActionEvent
- type DataOfferActionHandler
- type DataOfferOfferEvent
- type DataOfferOfferHandler
- type DataOfferSourceActionsEvent
- type DataOfferSourceActionsHandler
- type DataSource
- func (p *DataSource) AddActionHandler(h DataSourceActionHandler)
- func (p *DataSource) AddCancelledHandler(h DataSourceCancelledHandler)
- func (p *DataSource) AddDndDropPerformedHandler(h DataSourceDndDropPerformedHandler)
- func (p *DataSource) AddDndFinishedHandler(h DataSourceDndFinishedHandler)
- func (p *DataSource) AddSendHandler(h DataSourceSendHandler)
- func (p *DataSource) AddTargetHandler(h DataSourceTargetHandler)
- func (p *DataSource) Destroy() error
- func (p *DataSource) Dispatch(event *Event)
- func (p *DataSource) Offer(mime_type string) error
- func (p *DataSource) RemoveActionHandler(h DataSourceActionHandler)
- func (p *DataSource) RemoveCancelledHandler(h DataSourceCancelledHandler)
- func (p *DataSource) RemoveDndDropPerformedHandler(h DataSourceDndDropPerformedHandler)
- func (p *DataSource) RemoveDndFinishedHandler(h DataSourceDndFinishedHandler)
- func (p *DataSource) RemoveSendHandler(h DataSourceSendHandler)
- func (p *DataSource) RemoveTargetHandler(h DataSourceTargetHandler)
- func (p *DataSource) SetActions(dnd_actions uint32) error
- type DataSourceActionEvent
- type DataSourceActionHandler
- type DataSourceCancelledEvent
- type DataSourceCancelledHandler
- type DataSourceDndDropPerformedEvent
- type DataSourceDndDropPerformedHandler
- type DataSourceDndFinishedEvent
- type DataSourceDndFinishedHandler
- type DataSourceSendEvent
- type DataSourceSendHandler
- type DataSourceTargetEvent
- type DataSourceTargetHandler
- type Dispatcher
- type Display
- func (p *Display) AddDeleteIDHandler(h DisplayDeleteIDHandler)
- func (p *Display) AddErrorHandler(h DisplayErrorHandler)
- func (p *Display) Dispatch(event *Event)
- func (p *Display) GetRegistry() (*Registry, error)
- func (p *Display) RemoveDeleteIDHandler(h DisplayDeleteIDHandler)
- func (p *Display) RemoveErrorHandler(h DisplayErrorHandler)
- func (p *Display) Sync() (*Callback, error)
- type DisplayDeleteIDEvent
- type DisplayDeleteIDHandler
- type DisplayErrorEvent
- type DisplayErrorHandler
- type Event
- type Handler
- type Keyboard
- func (p *Keyboard) AddEnterHandler(h KeyboardEnterHandler)
- func (p *Keyboard) AddKeyHandler(h KeyboardKeyHandler)
- func (p *Keyboard) AddKeymapHandler(h KeyboardKeymapHandler)
- func (p *Keyboard) AddLeaveHandler(h KeyboardLeaveHandler)
- func (p *Keyboard) AddModifiersHandler(h KeyboardModifiersHandler)
- func (p *Keyboard) AddRepeatInfoHandler(h KeyboardRepeatInfoHandler)
- func (p *Keyboard) Dispatch(event *Event)
- func (p *Keyboard) Release() error
- func (p *Keyboard) RemoveEnterHandler(h KeyboardEnterHandler)
- func (p *Keyboard) RemoveKeyHandler(h KeyboardKeyHandler)
- func (p *Keyboard) RemoveKeymapHandler(h KeyboardKeymapHandler)
- func (p *Keyboard) RemoveLeaveHandler(h KeyboardLeaveHandler)
- func (p *Keyboard) RemoveModifiersHandler(h KeyboardModifiersHandler)
- func (p *Keyboard) RemoveRepeatInfoHandler(h KeyboardRepeatInfoHandler)
- type KeyboardEnterEvent
- type KeyboardEnterHandler
- type KeyboardKeyEvent
- type KeyboardKeyHandler
- type KeyboardKeymapEvent
- type KeyboardKeymapHandler
- type KeyboardLeaveEvent
- type KeyboardLeaveHandler
- type KeyboardModifiersEvent
- type KeyboardModifiersHandler
- type KeyboardRepeatInfoEvent
- type KeyboardRepeatInfoHandler
- type Output
- func (p *Output) AddDoneHandler(h OutputDoneHandler)
- func (p *Output) AddGeometryHandler(h OutputGeometryHandler)
- func (p *Output) AddModeHandler(h OutputModeHandler)
- func (p *Output) AddScaleHandler(h OutputScaleHandler)
- func (p *Output) Dispatch(event *Event)
- func (p *Output) Release() error
- func (p *Output) RemoveDoneHandler(h OutputDoneHandler)
- func (p *Output) RemoveGeometryHandler(h OutputGeometryHandler)
- func (p *Output) RemoveModeHandler(h OutputModeHandler)
- func (p *Output) RemoveScaleHandler(h OutputScaleHandler)
- type OutputDoneEvent
- type OutputDoneHandler
- type OutputGeometryEvent
- type OutputGeometryHandler
- type OutputModeEvent
- type OutputModeHandler
- type OutputScaleEvent
- type OutputScaleHandler
- type Pointer
- func (p *Pointer) AddAxisDiscreteHandler(h PointerAxisDiscreteHandler)
- func (p *Pointer) AddAxisHandler(h PointerAxisHandler)
- func (p *Pointer) AddAxisSourceHandler(h PointerAxisSourceHandler)
- func (p *Pointer) AddAxisStopHandler(h PointerAxisStopHandler)
- func (p *Pointer) AddButtonHandler(h PointerButtonHandler)
- func (p *Pointer) AddEnterHandler(h PointerEnterHandler)
- func (p *Pointer) AddFrameHandler(h PointerFrameHandler)
- func (p *Pointer) AddLeaveHandler(h PointerLeaveHandler)
- func (p *Pointer) AddMotionHandler(h PointerMotionHandler)
- func (p *Pointer) Dispatch(event *Event)
- func (p *Pointer) Release() error
- func (p *Pointer) RemoveAxisDiscreteHandler(h PointerAxisDiscreteHandler)
- func (p *Pointer) RemoveAxisHandler(h PointerAxisHandler)
- func (p *Pointer) RemoveAxisSourceHandler(h PointerAxisSourceHandler)
- func (p *Pointer) RemoveAxisStopHandler(h PointerAxisStopHandler)
- func (p *Pointer) RemoveButtonHandler(h PointerButtonHandler)
- func (p *Pointer) RemoveEnterHandler(h PointerEnterHandler)
- func (p *Pointer) RemoveFrameHandler(h PointerFrameHandler)
- func (p *Pointer) RemoveLeaveHandler(h PointerLeaveHandler)
- func (p *Pointer) RemoveMotionHandler(h PointerMotionHandler)
- func (p *Pointer) SetCursor(serial uint32, surface *Surface, hotspot_x, hotspot_y int32) error
- type PointerAxisDiscreteEvent
- type PointerAxisDiscreteHandler
- type PointerAxisEvent
- type PointerAxisHandler
- type PointerAxisSourceEvent
- type PointerAxisSourceHandler
- type PointerAxisStopEvent
- type PointerAxisStopHandler
- type PointerButtonEvent
- type PointerButtonHandler
- type PointerEnterEvent
- type PointerEnterHandler
- type PointerFrameEvent
- type PointerFrameHandler
- type PointerLeaveEvent
- type PointerLeaveHandler
- type PointerMotionEvent
- type PointerMotionHandler
- type Proxy
- type ProxyID
- type Region
- type Registry
- func (p *Registry) AddGlobalHandler(h RegistryGlobalHandler)
- func (p *Registry) AddGlobalRemoveHandler(h RegistryGlobalRemoveHandler)
- func (p *Registry) Bind(name uint32, iface string, version uint32, id Proxy) error
- func (p *Registry) Dispatch(event *Event)
- func (p *Registry) RemoveGlobalHandler(h RegistryGlobalHandler)
- func (p *Registry) RemoveGlobalRemoveHandler(h RegistryGlobalRemoveHandler)
- type RegistryGlobalEvent
- type RegistryGlobalHandler
- type RegistryGlobalRemoveEvent
- type RegistryGlobalRemoveHandler
- type Request
- func (r *Request) PutArray(a []int32)
- func (r *Request) PutFd(fd uintptr)
- func (r *Request) PutFloat32(f float32)
- func (r *Request) PutInt32(i int32)
- func (r *Request) PutProxy(p Proxy)
- func (r *Request) PutString(s string)
- func (r *Request) PutUint32(u uint32)
- func (r *Request) Write(arg interface{})
- type Seat
- func (p *Seat) AddCapabilitiesHandler(h SeatCapabilitiesHandler)
- func (p *Seat) AddNameHandler(h SeatNameHandler)
- func (p *Seat) Dispatch(event *Event)
- func (p *Seat) GetKeyboard() (*Keyboard, error)
- func (p *Seat) GetPointer() (*Pointer, error)
- func (p *Seat) GetTouch() (*Touch, error)
- func (p *Seat) Release() error
- func (p *Seat) RemoveCapabilitiesHandler(h SeatCapabilitiesHandler)
- func (p *Seat) RemoveNameHandler(h SeatNameHandler)
- type SeatCapabilitiesEvent
- type SeatCapabilitiesHandler
- type SeatNameEvent
- type SeatNameHandler
- type Shell
- type ShellSurface
- func (p *ShellSurface) AddConfigureHandler(h ShellSurfaceConfigureHandler)
- func (p *ShellSurface) AddPingHandler(h ShellSurfacePingHandler)
- func (p *ShellSurface) AddPopupDoneHandler(h ShellSurfacePopupDoneHandler)
- func (p *ShellSurface) Dispatch(event *Event)
- func (p *ShellSurface) Move(seat *Seat, serial uint32) error
- func (p *ShellSurface) Pong(serial uint32) error
- func (p *ShellSurface) RemoveConfigureHandler(h ShellSurfaceConfigureHandler)
- func (p *ShellSurface) RemovePingHandler(h ShellSurfacePingHandler)
- func (p *ShellSurface) RemovePopupDoneHandler(h ShellSurfacePopupDoneHandler)
- func (p *ShellSurface) Resize(seat *Seat, serial, edges uint32) error
- func (p *ShellSurface) SetClass(class_ string) error
- func (p *ShellSurface) SetFullscreen(method, framerate uint32, output *Output) error
- func (p *ShellSurface) SetMaximized(output *Output) error
- func (p *ShellSurface) SetPopup(seat *Seat, serial uint32, parent *Surface, x, y int32, flags uint32) error
- func (p *ShellSurface) SetTitle(title string) error
- func (p *ShellSurface) SetToplevel() error
- func (p *ShellSurface) SetTransient(parent *Surface, x, y int32, flags uint32) error
- type ShellSurfaceConfigureEvent
- type ShellSurfaceConfigureHandler
- type ShellSurfacePingEvent
- type ShellSurfacePingHandler
- type ShellSurfacePopupDoneEvent
- type ShellSurfacePopupDoneHandler
- type Shm
- type ShmFormatEvent
- type ShmFormatHandler
- type ShmPool
- type Subcompositor
- type Subsurface
- type Surface
- func (p *Surface) AddEnterHandler(h SurfaceEnterHandler)
- func (p *Surface) AddLeaveHandler(h SurfaceLeaveHandler)
- func (p *Surface) Attach(buffer *Buffer, x, y int32) error
- func (p *Surface) Commit() error
- func (p *Surface) Damage(x, y, width, height int32) error
- func (p *Surface) DamageBuffer(x, y, width, height int32) error
- func (p *Surface) Destroy() error
- func (p *Surface) Dispatch(event *Event)
- func (p *Surface) Frame() (*Callback, error)
- func (p *Surface) RemoveEnterHandler(h SurfaceEnterHandler)
- func (p *Surface) RemoveLeaveHandler(h SurfaceLeaveHandler)
- func (p *Surface) SetBufferScale(scale int32) error
- func (p *Surface) SetBufferTransform(transform int32) error
- func (p *Surface) SetInputRegion(region *Region) error
- func (p *Surface) SetOpaqueRegion(region *Region) error
- type SurfaceEnterEvent
- type SurfaceEnterHandler
- type SurfaceLeaveEvent
- type SurfaceLeaveHandler
- type Touch
- func (p *Touch) AddCancelHandler(h TouchCancelHandler)
- func (p *Touch) AddDownHandler(h TouchDownHandler)
- func (p *Touch) AddFrameHandler(h TouchFrameHandler)
- func (p *Touch) AddMotionHandler(h TouchMotionHandler)
- func (p *Touch) AddOrientationHandler(h TouchOrientationHandler)
- func (p *Touch) AddShapeHandler(h TouchShapeHandler)
- func (p *Touch) AddUpHandler(h TouchUpHandler)
- func (p *Touch) Dispatch(event *Event)
- func (p *Touch) Release() error
- func (p *Touch) RemoveCancelHandler(h TouchCancelHandler)
- func (p *Touch) RemoveDownHandler(h TouchDownHandler)
- func (p *Touch) RemoveFrameHandler(h TouchFrameHandler)
- func (p *Touch) RemoveMotionHandler(h TouchMotionHandler)
- func (p *Touch) RemoveOrientationHandler(h TouchOrientationHandler)
- func (p *Touch) RemoveShapeHandler(h TouchShapeHandler)
- func (p *Touch) RemoveUpHandler(h TouchUpHandler)
- type TouchCancelEvent
- type TouchCancelHandler
- type TouchDownEvent
- type TouchDownHandler
- type TouchFrameEvent
- type TouchFrameHandler
- type TouchMotionEvent
- type TouchMotionHandler
- type TouchOrientationEvent
- type TouchOrientationHandler
- type TouchShapeEvent
- type TouchShapeHandler
- type TouchUpEvent
- type TouchUpHandler
Constants ¶
const ( DisplayErrorInvalidObject = 0 DisplayErrorInvalidMethod = 1 DisplayErrorNoMemory = 2 DisplayErrorImplementation = 3 )
const ( ShmErrorInvalidFormat = 0 ShmErrorInvalidStride = 1 ShmErrorInvalidFd = 2 )
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 ShmFormatR8 = 0x20203852 ShmFormatR16 = 0x20363152 ShmFormatRg88 = 0x38384752 ShmFormatGr88 = 0x38385247 ShmFormatRg1616 = 0x32334752 ShmFormatGr1616 = 0x32335247 ShmFormatXrgb16161616f = 0x48345258 ShmFormatXbgr16161616f = 0x48344258 ShmFormatArgb16161616f = 0x48345241 ShmFormatAbgr16161616f = 0x48344241 ShmFormatXyuv8888 = 0x56555958 ShmFormatVuy888 = 0x34325556 ShmFormatVuy101010 = 0x30335556 ShmFormatY210 = 0x30313259 ShmFormatY212 = 0x32313259 ShmFormatY216 = 0x36313259 ShmFormatY410 = 0x30313459 ShmFormatY412 = 0x32313459 ShmFormatY416 = 0x36313459 ShmFormatXvyu2101010 = 0x30335658 ShmFormatXvyu1216161616 = 0x36335658 ShmFormatXvyu16161616 = 0x38345658 ShmFormatY0l0 = 0x304c3059 ShmFormatX0l0 = 0x304c3058 ShmFormatY0l2 = 0x324c3059 ShmFormatX0l2 = 0x324c3058 ShmFormatYuv4208bit = 0x38305559 ShmFormatYuv42010bit = 0x30315559 ShmFormatXrgb8888A8 = 0x38415258 ShmFormatXbgr8888A8 = 0x38414258 ShmFormatRgbx8888A8 = 0x38415852 ShmFormatBgrx8888A8 = 0x38415842 ShmFormatRgb888A8 = 0x38413852 ShmFormatBgr888A8 = 0x38413842 ShmFormatRgb565A8 = 0x38413552 ShmFormatBgr565A8 = 0x38413542 ShmFormatNv24 = 0x3432564e ShmFormatNv42 = 0x3234564e ShmFormatP210 = 0x30313250 ShmFormatP010 = 0x30313050 ShmFormatP012 = 0x32313050 ShmFormatP016 = 0x36313050 ShmFormatAxbxgxrx106106106106 = 0x30314241 ShmFormatNv15 = 0x3531564e ShmFormatQ410 = 0x30313451 ShmFormatQ401 = 0x31303451 )
const ( DataOfferErrorInvalidFinish = 0 DataOfferErrorInvalidActionMask = 1 DataOfferErrorInvalidAction = 2 DataOfferErrorInvalidOffer = 3 )
const ( DataSourceErrorInvalidActionMask = 0 DataSourceErrorInvalidSource = 1 )
const ( DataDeviceManagerDndActionNone = 0 DataDeviceManagerDndActionCopy = 1 DataDeviceManagerDndActionMove = 2 DataDeviceManagerDndActionAsk = 4 )
const ( ShellSurfaceResizeNone = 0 ShellSurfaceResizeTop = 1 ShellSurfaceResizeBottom = 2 ShellSurfaceResizeLeft = 4 ShellSurfaceResizeTopLeft = 5 ShellSurfaceResizeBottomLeft = 6 ShellSurfaceResizeRight = 8 ShellSurfaceResizeTopRight = 9 ShellSurfaceResizeBottomRight = 10 )
const ( ShellSurfaceFullscreenMethodDefault = 0 ShellSurfaceFullscreenMethodScale = 1 ShellSurfaceFullscreenMethodDriver = 2 ShellSurfaceFullscreenMethodFill = 3 )
const ( SurfaceErrorInvalidScale = 0 SurfaceErrorInvalidTransform = 1 SurfaceErrorInvalidSize = 2 )
const ( SeatCapabilityPointer = 1 SeatCapabilityKeyboard = 2 SeatCapabilityTouch = 4 )
const ( PointerButtonStateReleased = 0 PointerButtonStatePressed = 1 )
const ( PointerAxisVerticalScroll = 0 PointerAxisHorizontalScroll = 1 )
const ( PointerAxisSourceWheel = 0 PointerAxisSourceFinger = 1 PointerAxisSourceContinuous = 2 PointerAxisSourceWheelTilt = 3 )
const ( KeyboardKeymapFormatNoKeymap = 0 KeyboardKeymapFormatXkbV1 = 1 )
const ( KeyboardKeyStateReleased = 0 KeyboardKeyStatePressed = 1 )
const ( OutputSubpixelUnknown = 0 OutputSubpixelNone = 1 OutputSubpixelHorizontalRgb = 2 OutputSubpixelHorizontalBgr = 3 OutputSubpixelVerticalRgb = 4 OutputSubpixelVerticalBgr = 5 )
const ( OutputTransformNormal = 0 OutputTransform90 = 1 OutputTransform180 = 2 OutputTransform270 = 3 OutputTransformFlipped = 4 OutputTransformFlipped90 = 5 OutputTransformFlipped180 = 6 OutputTransformFlipped270 = 7 )
const ( OutputModeCurrent = 0x1 OutputModePreferred = 0x2 )
const (
DataDeviceErrorRole = 0
)
const (
PointerErrorRole = 0
)
const (
SeatErrorMissingCapability = 0
)
const (
ShellErrorRole = 0
)
const (
ShellSurfaceTransientInactive = 0x1
)
const (
SubcompositorErrorBadSurface = 0
)
const (
SubsurfaceErrorBadSurface = 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseProxy ¶
type BaseProxy struct {
// contains filtered or unexported fields
}
func (*BaseProxy) SetContext ¶
type Buffer ¶
type Buffer struct { BaseProxy // contains filtered or unexported fields }
func (*Buffer) AddReleaseHandler ¶
func (p *Buffer) AddReleaseHandler(h BufferReleaseHandler)
func (*Buffer) Destroy ¶
Destroy will destroy a buffer.
Destroy a buffer. If and how you need to release the backing storage is defined by the buffer factory interface.
For possible side-effects to a surface, see wl_surface.attach.
func (*Buffer) RemoveReleaseHandler ¶
func (p *Buffer) RemoveReleaseHandler(h BufferReleaseHandler)
type BufferReleaseEvent ¶
type BufferReleaseEvent struct{}
type BufferReleaseHandler ¶
type BufferReleaseHandler interface {
HandleBufferRelease(BufferReleaseEvent)
}
type Callback ¶
type Callback struct { BaseProxy // contains filtered or unexported fields }
func NewCallback ¶
func (*Callback) AddDoneHandler ¶
func (p *Callback) AddDoneHandler(h CallbackDoneHandler)
func (*Callback) RemoveDoneHandler ¶
func (p *Callback) RemoveDoneHandler(h CallbackDoneHandler)
type CallbackDoneEvent ¶
type CallbackDoneEvent struct {
CallbackData uint32
}
type CallbackDoneHandler ¶
type CallbackDoneHandler interface {
HandleCallbackDone(CallbackDoneEvent)
}
type Compositor ¶
type Compositor struct {
BaseProxy
}
func NewCompositor ¶
func NewCompositor(ctx *Context) *Compositor
func (*Compositor) CreateRegion ¶
func (p *Compositor) CreateRegion() (*Region, error)
CreateRegion will create new region.
Ask the compositor to create a new region.
func (*Compositor) CreateSurface ¶
func (p *Compositor) CreateSurface() (*Surface, error)
CreateSurface will create new surface.
Ask the compositor to create a new surface.
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) SendRequest ¶
func (*Context) Unregister ¶
type DataDevice ¶
type DataDevice struct { BaseProxy // contains filtered or unexported fields }
func NewDataDevice ¶
func NewDataDevice(ctx *Context) *DataDevice
func (*DataDevice) AddDataOfferHandler ¶
func (p *DataDevice) AddDataOfferHandler(h DataDeviceDataOfferHandler)
func (*DataDevice) AddDropHandler ¶
func (p *DataDevice) AddDropHandler(h DataDeviceDropHandler)
func (*DataDevice) AddEnterHandler ¶
func (p *DataDevice) AddEnterHandler(h DataDeviceEnterHandler)
func (*DataDevice) AddLeaveHandler ¶
func (p *DataDevice) AddLeaveHandler(h DataDeviceLeaveHandler)
func (*DataDevice) AddMotionHandler ¶
func (p *DataDevice) AddMotionHandler(h DataDeviceMotionHandler)
func (*DataDevice) AddSelectionHandler ¶
func (p *DataDevice) AddSelectionHandler(h DataDeviceSelectionHandler)
func (*DataDevice) Dispatch ¶
func (p *DataDevice) Dispatch(event *Event)
func (*DataDevice) Release ¶
func (p *DataDevice) Release() error
Release will destroy data device.
This request destroys the data device.
func (*DataDevice) RemoveDataOfferHandler ¶
func (p *DataDevice) RemoveDataOfferHandler(h DataDeviceDataOfferHandler)
func (*DataDevice) RemoveDropHandler ¶
func (p *DataDevice) RemoveDropHandler(h DataDeviceDropHandler)
func (*DataDevice) RemoveEnterHandler ¶
func (p *DataDevice) RemoveEnterHandler(h DataDeviceEnterHandler)
func (*DataDevice) RemoveLeaveHandler ¶
func (p *DataDevice) RemoveLeaveHandler(h DataDeviceLeaveHandler)
func (*DataDevice) RemoveMotionHandler ¶
func (p *DataDevice) RemoveMotionHandler(h DataDeviceMotionHandler)
func (*DataDevice) RemoveSelectionHandler ¶
func (p *DataDevice) RemoveSelectionHandler(h DataDeviceSelectionHandler)
func (*DataDevice) SetSelection ¶
func (p *DataDevice) SetSelection(source *DataSource, serial uint32) error
SetSelection will copy data to the selection.
This request asks the compositor to set the selection to the data from the source on behalf of the client.
To unset the selection, set the source to NULL.
func (*DataDevice) StartDrag ¶
func (p *DataDevice) StartDrag(source *DataSource, origin, icon *Surface, serial uint32) error
StartDrag will start drag-and-drop operation.
This request asks the compositor to start a drag-and-drop operation on behalf of the client.
The source argument is the data source that provides the data for the eventual data transfer. If source is NULL, enter, leave and motion events are sent only to the client that initiated the drag and the client is expected to handle the data passing internally. If source is destroyed, the drag-and-drop session will be cancelled.
The origin surface is the surface where the drag originates and the client must have an active implicit grab that matches the serial.
The icon surface is an optional (can be NULL) surface that provides an icon to be moved around with the cursor. Initially, the top-left corner of the icon surface is placed at the cursor hotspot, but subsequent wl_surface.attach request can move the relative position. Attach requests must be confirmed with wl_surface.commit as usual. The icon surface is given the role of a drag-and-drop icon. If the icon surface already has another role, it raises a protocol error.
The current and pending input regions of the icon wl_surface are cleared, and wl_surface.set_input_region is ignored until the wl_surface is no longer used as the icon surface. When the use as an icon ends, the current and pending input regions become undefined, and the wl_surface is unmapped.
type DataDeviceDataOfferEvent ¶
type DataDeviceDataOfferEvent struct {
ID *DataOffer
}
type DataDeviceDataOfferHandler ¶
type DataDeviceDataOfferHandler interface {
HandleDataDeviceDataOffer(DataDeviceDataOfferEvent)
}
type DataDeviceDropEvent ¶
type DataDeviceDropEvent struct{}
type DataDeviceDropHandler ¶
type DataDeviceDropHandler interface {
HandleDataDeviceDrop(DataDeviceDropEvent)
}
type DataDeviceEnterEvent ¶
type DataDeviceEnterHandler ¶
type DataDeviceEnterHandler interface {
HandleDataDeviceEnter(DataDeviceEnterEvent)
}
type DataDeviceLeaveEvent ¶
type DataDeviceLeaveEvent struct{}
type DataDeviceLeaveHandler ¶
type DataDeviceLeaveHandler interface {
HandleDataDeviceLeave(DataDeviceLeaveEvent)
}
type DataDeviceManager ¶
type DataDeviceManager struct {
BaseProxy
}
func NewDataDeviceManager ¶
func NewDataDeviceManager(ctx *Context) *DataDeviceManager
func (*DataDeviceManager) CreateDataSource ¶
func (p *DataDeviceManager) CreateDataSource() (*DataSource, error)
CreateDataSource will create a new data source.
Create a new data source.
func (*DataDeviceManager) GetDataDevice ¶
func (p *DataDeviceManager) GetDataDevice(seat *Seat) (*DataDevice, error)
GetDataDevice will create a new data device.
Create a new data device for a given seat.
type DataDeviceMotionEvent ¶
type DataDeviceMotionHandler ¶
type DataDeviceMotionHandler interface {
HandleDataDeviceMotion(DataDeviceMotionEvent)
}
type DataDeviceSelectionEvent ¶
type DataDeviceSelectionEvent struct {
ID *DataOffer
}
type DataDeviceSelectionHandler ¶
type DataDeviceSelectionHandler interface {
HandleDataDeviceSelection(DataDeviceSelectionEvent)
}
type DataOffer ¶
type DataOffer struct { BaseProxy // contains filtered or unexported fields }
func NewDataOffer ¶
func (*DataOffer) Accept ¶
Accept will accept one of the offered mime types.
Indicate that the client can accept the given mime type, or NULL for not accepted.
For objects of version 2 or older, this request is used by the client to give feedback whether the client can receive the given mime type, or NULL if none is accepted; the feedback does not determine whether the drag-and-drop operation succeeds or not.
For objects of version 3 or newer, this request determines the final result of the drag-and-drop operation. If the end result is that no mime types were accepted, the drag-and-drop operation will be cancelled and the corresponding drag source will receive wl_data_source.cancelled. Clients may still use this event in conjunction with wl_data_source.action for feedback.
func (*DataOffer) AddActionHandler ¶
func (p *DataOffer) AddActionHandler(h DataOfferActionHandler)
func (*DataOffer) AddOfferHandler ¶
func (p *DataOffer) AddOfferHandler(h DataOfferOfferHandler)
func (*DataOffer) AddSourceActionsHandler ¶
func (p *DataOffer) AddSourceActionsHandler(h DataOfferSourceActionsHandler)
func (*DataOffer) Finish ¶
Finish will the offer will no longer be used.
Notifies the compositor that the drag destination successfully finished the drag-and-drop operation.
Upon receiving this request, the compositor will emit wl_data_source.dnd_finished on the drag source client.
It is a client error to perform other requests than wl_data_offer.destroy after this one. It is also an error to perform this request after a NULL mime type has been set in wl_data_offer.accept or no action was received through wl_data_offer.action.
If wl_data_offer.finish request is received for a non drag and drop operation, the invalid_finish protocol error is raised.
func (*DataOffer) Receive ¶
Receive will request that the data is transferred.
To transfer the offered data, the client issues this request and indicates the mime type 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 then closes its end, at which point the transfer is complete.
This request may happen multiple times for different mime types, both before and after wl_data_device.drop. Drag-and-drop destination clients may preemptively fetch data or examine it more closely to determine acceptance.
func (*DataOffer) RemoveActionHandler ¶
func (p *DataOffer) RemoveActionHandler(h DataOfferActionHandler)
func (*DataOffer) RemoveOfferHandler ¶
func (p *DataOffer) RemoveOfferHandler(h DataOfferOfferHandler)
func (*DataOffer) RemoveSourceActionsHandler ¶
func (p *DataOffer) RemoveSourceActionsHandler(h DataOfferSourceActionsHandler)
func (*DataOffer) SetActions ¶
SetActions will set the available/preferred drag-and-drop actions.
Sets the actions that the destination side client supports for this operation. This request may trigger the emission of wl_data_source.action and wl_data_offer.action events if the compositor needs to change the selected action.
This request can be called multiple times throughout the drag-and-drop operation, typically in response to wl_data_device.enter or wl_data_device.motion events.
This request determines the final result of the drag-and-drop operation. If the end result is that no action is accepted, the drag source will receive wl_data_source.cancelled.
The dnd_actions argument must contain only values expressed in the wl_data_device_manager.dnd_actions enum, and the preferred_action argument must only contain one of those values set, otherwise it will result in a protocol error.
While managing an "ask" action, the destination drag-and-drop client may perform further wl_data_offer.receive requests, and is expected to perform one last wl_data_offer.set_actions request with a preferred action other than "ask" (and optionally wl_data_offer.accept) before requesting wl_data_offer.finish, in order to convey the action selected by the user. If the preferred action is not in the wl_data_offer.source_actions mask, an error will be raised.
If the "ask" action is dismissed (e.g. user cancellation), the client is expected to perform wl_data_offer.destroy right away.
This request can only be made on drag-and-drop offers, a protocol error will be raised otherwise.
type DataOfferActionEvent ¶
type DataOfferActionEvent struct {
DndAction uint32
}
type DataOfferActionHandler ¶
type DataOfferActionHandler interface {
HandleDataOfferAction(DataOfferActionEvent)
}
type DataOfferOfferEvent ¶
type DataOfferOfferEvent struct {
MimeType string
}
type DataOfferOfferHandler ¶
type DataOfferOfferHandler interface {
HandleDataOfferOffer(DataOfferOfferEvent)
}
type DataOfferSourceActionsEvent ¶
type DataOfferSourceActionsEvent struct {
SourceActions uint32
}
type DataOfferSourceActionsHandler ¶
type DataOfferSourceActionsHandler interface {
HandleDataOfferSourceActions(DataOfferSourceActionsEvent)
}
type DataSource ¶
type DataSource struct { BaseProxy // contains filtered or unexported fields }
func NewDataSource ¶
func NewDataSource(ctx *Context) *DataSource
func (*DataSource) AddActionHandler ¶
func (p *DataSource) AddActionHandler(h DataSourceActionHandler)
func (*DataSource) AddCancelledHandler ¶
func (p *DataSource) AddCancelledHandler(h DataSourceCancelledHandler)
func (*DataSource) AddDndDropPerformedHandler ¶
func (p *DataSource) AddDndDropPerformedHandler(h DataSourceDndDropPerformedHandler)
func (*DataSource) AddDndFinishedHandler ¶
func (p *DataSource) AddDndFinishedHandler(h DataSourceDndFinishedHandler)
func (*DataSource) AddSendHandler ¶
func (p *DataSource) AddSendHandler(h DataSourceSendHandler)
func (*DataSource) AddTargetHandler ¶
func (p *DataSource) AddTargetHandler(h DataSourceTargetHandler)
func (*DataSource) Destroy ¶
func (p *DataSource) Destroy() error
Destroy will destroy the data source.
Destroy the data source.
func (*DataSource) Dispatch ¶
func (p *DataSource) Dispatch(event *Event)
func (*DataSource) Offer ¶
func (p *DataSource) Offer(mime_type string) error
Offer will add an offered mime type.
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 (*DataSource) RemoveActionHandler ¶
func (p *DataSource) RemoveActionHandler(h DataSourceActionHandler)
func (*DataSource) RemoveCancelledHandler ¶
func (p *DataSource) RemoveCancelledHandler(h DataSourceCancelledHandler)
func (*DataSource) RemoveDndDropPerformedHandler ¶
func (p *DataSource) RemoveDndDropPerformedHandler(h DataSourceDndDropPerformedHandler)
func (*DataSource) RemoveDndFinishedHandler ¶
func (p *DataSource) RemoveDndFinishedHandler(h DataSourceDndFinishedHandler)
func (*DataSource) RemoveSendHandler ¶
func (p *DataSource) RemoveSendHandler(h DataSourceSendHandler)
func (*DataSource) RemoveTargetHandler ¶
func (p *DataSource) RemoveTargetHandler(h DataSourceTargetHandler)
func (*DataSource) SetActions ¶
func (p *DataSource) SetActions(dnd_actions uint32) error
SetActions will set the available drag-and-drop actions.
Sets the actions that the source side client supports for this operation. This request may trigger wl_data_source.action and wl_data_offer.action events if the compositor needs to change the selected action.
The dnd_actions argument must contain only values expressed in the wl_data_device_manager.dnd_actions enum, otherwise it will result in a protocol error.
This request must be made once only, and can only be made on sources used in drag-and-drop, so it must be performed before wl_data_device.start_drag. Attempting to use the source other than for drag-and-drop will raise a protocol error.
type DataSourceActionEvent ¶
type DataSourceActionEvent struct {
DndAction uint32
}
type DataSourceActionHandler ¶
type DataSourceActionHandler interface {
HandleDataSourceAction(DataSourceActionEvent)
}
type DataSourceCancelledEvent ¶
type DataSourceCancelledEvent struct{}
type DataSourceCancelledHandler ¶
type DataSourceCancelledHandler interface {
HandleDataSourceCancelled(DataSourceCancelledEvent)
}
type DataSourceDndDropPerformedEvent ¶
type DataSourceDndDropPerformedEvent struct{}
type DataSourceDndDropPerformedHandler ¶
type DataSourceDndDropPerformedHandler interface {
HandleDataSourceDndDropPerformed(DataSourceDndDropPerformedEvent)
}
type DataSourceDndFinishedEvent ¶
type DataSourceDndFinishedEvent struct{}
type DataSourceDndFinishedHandler ¶
type DataSourceDndFinishedHandler interface {
HandleDataSourceDndFinished(DataSourceDndFinishedEvent)
}
type DataSourceSendEvent ¶
type DataSourceSendHandler ¶
type DataSourceSendHandler interface {
HandleDataSourceSend(DataSourceSendEvent)
}
type DataSourceTargetEvent ¶
type DataSourceTargetEvent struct {
MimeType string
}
type DataSourceTargetHandler ¶
type DataSourceTargetHandler interface {
HandleDataSourceTarget(DataSourceTargetEvent)
}
type Dispatcher ¶
type Dispatcher interface {
Dispatch(*Event)
}
type Display ¶
type Display struct { BaseProxy // contains filtered or unexported fields }
func NewDisplay ¶
func (*Display) AddDeleteIDHandler ¶
func (p *Display) AddDeleteIDHandler(h DisplayDeleteIDHandler)
func (*Display) AddErrorHandler ¶
func (p *Display) AddErrorHandler(h DisplayErrorHandler)
func (*Display) GetRegistry ¶
GetRegistry will get global registry object.
This request creates a registry object that allows the client to list and bind the global objects available from the compositor.
It should be noted that the server side resources consumed in response to a get_registry request can only be released when the client disconnects, not when the client side proxy is destroyed. Therefore, clients should invoke get_registry as infrequently as possible to avoid wasting memory.
func (*Display) RemoveDeleteIDHandler ¶
func (p *Display) RemoveDeleteIDHandler(h DisplayDeleteIDHandler)
func (*Display) RemoveErrorHandler ¶
func (p *Display) RemoveErrorHandler(h DisplayErrorHandler)
func (*Display) Sync ¶
Sync will asynchronous roundtrip.
The sync request asks the server to emit the 'done' event on the returned wl_callback object. Since requests are handled in-order and events are delivered in-order, this can be used as a barrier to ensure all previous requests and the resulting events have been handled.
The object returned by this request will be destroyed by the compositor after the callback is fired and as such the client must not attempt to use it after that point.
The callback_data passed in the callback is the event serial.
type DisplayDeleteIDEvent ¶
type DisplayDeleteIDEvent struct {
ID uint32
}
type DisplayDeleteIDHandler ¶
type DisplayDeleteIDHandler interface {
HandleDisplayDeleteID(DisplayDeleteIDEvent)
}
type DisplayErrorEvent ¶
type DisplayErrorHandler ¶
type DisplayErrorHandler interface {
HandleDisplayError(DisplayErrorEvent)
}
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 (*Keyboard) AddEnterHandler ¶
func (p *Keyboard) AddEnterHandler(h KeyboardEnterHandler)
func (*Keyboard) AddKeyHandler ¶
func (p *Keyboard) AddKeyHandler(h KeyboardKeyHandler)
func (*Keyboard) AddKeymapHandler ¶
func (p *Keyboard) AddKeymapHandler(h KeyboardKeymapHandler)
func (*Keyboard) AddLeaveHandler ¶
func (p *Keyboard) AddLeaveHandler(h KeyboardLeaveHandler)
func (*Keyboard) AddModifiersHandler ¶
func (p *Keyboard) AddModifiersHandler(h KeyboardModifiersHandler)
func (*Keyboard) AddRepeatInfoHandler ¶
func (p *Keyboard) AddRepeatInfoHandler(h KeyboardRepeatInfoHandler)
func (*Keyboard) RemoveEnterHandler ¶
func (p *Keyboard) RemoveEnterHandler(h KeyboardEnterHandler)
func (*Keyboard) RemoveKeyHandler ¶
func (p *Keyboard) RemoveKeyHandler(h KeyboardKeyHandler)
func (*Keyboard) RemoveKeymapHandler ¶
func (p *Keyboard) RemoveKeymapHandler(h KeyboardKeymapHandler)
func (*Keyboard) RemoveLeaveHandler ¶
func (p *Keyboard) RemoveLeaveHandler(h KeyboardLeaveHandler)
func (*Keyboard) RemoveModifiersHandler ¶
func (p *Keyboard) RemoveModifiersHandler(h KeyboardModifiersHandler)
func (*Keyboard) RemoveRepeatInfoHandler ¶
func (p *Keyboard) RemoveRepeatInfoHandler(h KeyboardRepeatInfoHandler)
type KeyboardEnterEvent ¶
type KeyboardEnterHandler ¶
type KeyboardEnterHandler interface {
HandleKeyboardEnter(KeyboardEnterEvent)
}
type KeyboardKeyEvent ¶
type KeyboardKeyHandler ¶
type KeyboardKeyHandler interface {
HandleKeyboardKey(KeyboardKeyEvent)
}
type KeyboardKeymapEvent ¶
type KeyboardKeymapHandler ¶
type KeyboardKeymapHandler interface {
HandleKeyboardKeymap(KeyboardKeymapEvent)
}
type KeyboardLeaveEvent ¶
type KeyboardLeaveHandler ¶
type KeyboardLeaveHandler interface {
HandleKeyboardLeave(KeyboardLeaveEvent)
}
type KeyboardModifiersEvent ¶
type KeyboardModifiersHandler ¶
type KeyboardModifiersHandler interface {
HandleKeyboardModifiers(KeyboardModifiersEvent)
}
type KeyboardRepeatInfoEvent ¶
type KeyboardRepeatInfoHandler ¶
type KeyboardRepeatInfoHandler interface {
HandleKeyboardRepeatInfo(KeyboardRepeatInfoEvent)
}
type Output ¶
type Output struct { BaseProxy // contains filtered or unexported fields }
func (*Output) AddDoneHandler ¶
func (p *Output) AddDoneHandler(h OutputDoneHandler)
func (*Output) AddGeometryHandler ¶
func (p *Output) AddGeometryHandler(h OutputGeometryHandler)
func (*Output) AddModeHandler ¶
func (p *Output) AddModeHandler(h OutputModeHandler)
func (*Output) AddScaleHandler ¶
func (p *Output) AddScaleHandler(h OutputScaleHandler)
func (*Output) Release ¶
Release will release the output object.
Using this request a client can tell the server that it is not going to use the output object anymore.
func (*Output) RemoveDoneHandler ¶
func (p *Output) RemoveDoneHandler(h OutputDoneHandler)
func (*Output) RemoveGeometryHandler ¶
func (p *Output) RemoveGeometryHandler(h OutputGeometryHandler)
func (*Output) RemoveModeHandler ¶
func (p *Output) RemoveModeHandler(h OutputModeHandler)
func (*Output) RemoveScaleHandler ¶
func (p *Output) RemoveScaleHandler(h OutputScaleHandler)
type OutputDoneEvent ¶
type OutputDoneEvent struct{}
type OutputDoneHandler ¶
type OutputDoneHandler interface {
HandleOutputDone(OutputDoneEvent)
}
type OutputGeometryEvent ¶
type OutputGeometryHandler ¶
type OutputGeometryHandler interface {
HandleOutputGeometry(OutputGeometryEvent)
}
type OutputModeEvent ¶
type OutputModeHandler ¶
type OutputModeHandler interface {
HandleOutputMode(OutputModeEvent)
}
type OutputScaleEvent ¶
type OutputScaleEvent struct {
Factor int32
}
type OutputScaleHandler ¶
type OutputScaleHandler interface {
HandleOutputScale(OutputScaleEvent)
}
type Pointer ¶
type Pointer struct { BaseProxy // contains filtered or unexported fields }
func NewPointer ¶
func (*Pointer) AddAxisDiscreteHandler ¶
func (p *Pointer) AddAxisDiscreteHandler(h PointerAxisDiscreteHandler)
func (*Pointer) AddAxisHandler ¶
func (p *Pointer) AddAxisHandler(h PointerAxisHandler)
func (*Pointer) AddAxisSourceHandler ¶
func (p *Pointer) AddAxisSourceHandler(h PointerAxisSourceHandler)
func (*Pointer) AddAxisStopHandler ¶
func (p *Pointer) AddAxisStopHandler(h PointerAxisStopHandler)
func (*Pointer) AddButtonHandler ¶
func (p *Pointer) AddButtonHandler(h PointerButtonHandler)
func (*Pointer) AddEnterHandler ¶
func (p *Pointer) AddEnterHandler(h PointerEnterHandler)
func (*Pointer) AddFrameHandler ¶
func (p *Pointer) AddFrameHandler(h PointerFrameHandler)
func (*Pointer) AddLeaveHandler ¶
func (p *Pointer) AddLeaveHandler(h PointerLeaveHandler)
func (*Pointer) AddMotionHandler ¶
func (p *Pointer) AddMotionHandler(h PointerMotionHandler)
func (*Pointer) Release ¶
Release will release the pointer object.
Using this request a client can tell the server that it is not going to use the pointer object anymore.
This request destroys the pointer proxy object, so clients must not call wl_pointer_destroy() after using this request.
func (*Pointer) RemoveAxisDiscreteHandler ¶
func (p *Pointer) RemoveAxisDiscreteHandler(h PointerAxisDiscreteHandler)
func (*Pointer) RemoveAxisHandler ¶
func (p *Pointer) RemoveAxisHandler(h PointerAxisHandler)
func (*Pointer) RemoveAxisSourceHandler ¶
func (p *Pointer) RemoveAxisSourceHandler(h PointerAxisSourceHandler)
func (*Pointer) RemoveAxisStopHandler ¶
func (p *Pointer) RemoveAxisStopHandler(h PointerAxisStopHandler)
func (*Pointer) RemoveButtonHandler ¶
func (p *Pointer) RemoveButtonHandler(h PointerButtonHandler)
func (*Pointer) RemoveEnterHandler ¶
func (p *Pointer) RemoveEnterHandler(h PointerEnterHandler)
func (*Pointer) RemoveFrameHandler ¶
func (p *Pointer) RemoveFrameHandler(h PointerFrameHandler)
func (*Pointer) RemoveLeaveHandler ¶
func (p *Pointer) RemoveLeaveHandler(h PointerLeaveHandler)
func (*Pointer) RemoveMotionHandler ¶
func (p *Pointer) RemoveMotionHandler(h PointerMotionHandler)
func (*Pointer) SetCursor ¶
SetCursor will set the pointer surface.
Set the pointer surface, i.e., the surface that contains the pointer image (cursor). This request gives the surface the role of a cursor. If the surface already has another role, it raises a protocol error.
The cursor actually changes only if the pointer focus for this device is one of the requesting client's surfaces or the surface parameter is the current pointer surface. If there was a previous surface set with this request it is replaced. If surface is NULL, the pointer image is hidden.
The parameters hotspot_x and hotspot_y define the position of the pointer surface relative to the pointer location. Its top-left corner is always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the coordinates of the pointer location, in surface-local coordinates.
On surface.attach requests to the pointer surface, hotspot_x and hotspot_y are decremented by the x and y parameters passed to the request. Attach must be confirmed by wl_surface.commit as usual.
The hotspot can also be updated by passing the currently set pointer surface to this request with new values for hotspot_x and hotspot_y.
The current and pending input regions of the wl_surface are cleared, and wl_surface.set_input_region is ignored until the wl_surface is no longer used as the cursor. When the use as a cursor ends, the current and pending input regions become undefined, and the wl_surface is unmapped.
type PointerAxisDiscreteHandler ¶
type PointerAxisDiscreteHandler interface {
HandlePointerAxisDiscrete(PointerAxisDiscreteEvent)
}
type PointerAxisEvent ¶
type PointerAxisHandler ¶
type PointerAxisHandler interface {
HandlePointerAxis(PointerAxisEvent)
}
type PointerAxisSourceEvent ¶
type PointerAxisSourceEvent struct {
AxisSource uint32
}
type PointerAxisSourceHandler ¶
type PointerAxisSourceHandler interface {
HandlePointerAxisSource(PointerAxisSourceEvent)
}
type PointerAxisStopEvent ¶
type PointerAxisStopHandler ¶
type PointerAxisStopHandler interface {
HandlePointerAxisStop(PointerAxisStopEvent)
}
type PointerButtonEvent ¶
type PointerButtonHandler ¶
type PointerButtonHandler interface {
HandlePointerButton(PointerButtonEvent)
}
type PointerEnterEvent ¶
type PointerEnterHandler ¶
type PointerEnterHandler interface {
HandlePointerEnter(PointerEnterEvent)
}
type PointerFrameEvent ¶
type PointerFrameEvent struct{}
type PointerFrameHandler ¶
type PointerFrameHandler interface {
HandlePointerFrame(PointerFrameEvent)
}
type PointerLeaveEvent ¶
type PointerLeaveHandler ¶
type PointerLeaveHandler interface {
HandlePointerLeave(PointerLeaveEvent)
}
type PointerMotionEvent ¶
type PointerMotionHandler ¶
type PointerMotionHandler interface {
HandlePointerMotion(PointerMotionEvent)
}
type Region ¶
type Region struct {
BaseProxy
}
type Registry ¶
type Registry struct { BaseProxy // contains filtered or unexported fields }
func NewRegistry ¶
func (*Registry) AddGlobalHandler ¶
func (p *Registry) AddGlobalHandler(h RegistryGlobalHandler)
func (*Registry) AddGlobalRemoveHandler ¶
func (p *Registry) AddGlobalRemoveHandler(h RegistryGlobalRemoveHandler)
func (*Registry) Bind ¶
Bind will bind an object to the display.
Binds a new, client-created object to the server using the specified name as the identifier.
func (*Registry) RemoveGlobalHandler ¶
func (p *Registry) RemoveGlobalHandler(h RegistryGlobalHandler)
func (*Registry) RemoveGlobalRemoveHandler ¶
func (p *Registry) RemoveGlobalRemoveHandler(h RegistryGlobalRemoveHandler)
type RegistryGlobalEvent ¶
type RegistryGlobalHandler ¶
type RegistryGlobalHandler interface {
HandleRegistryGlobal(RegistryGlobalEvent)
}
type RegistryGlobalRemoveEvent ¶
type RegistryGlobalRemoveEvent struct {
Name uint32
}
type RegistryGlobalRemoveHandler ¶
type RegistryGlobalRemoveHandler interface {
HandleRegistryGlobalRemove(RegistryGlobalRemoveEvent)
}
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) PutFloat32 ¶
type Seat ¶
type Seat struct { BaseProxy // contains filtered or unexported fields }
func (*Seat) AddCapabilitiesHandler ¶
func (p *Seat) AddCapabilitiesHandler(h SeatCapabilitiesHandler)
func (*Seat) AddNameHandler ¶
func (p *Seat) AddNameHandler(h SeatNameHandler)
func (*Seat) GetKeyboard ¶
GetKeyboard will return keyboard object.
The ID provided will be initialized to the wl_keyboard interface for this seat.
This request only takes effect if the seat has the keyboard capability, or has had the keyboard capability in the past. It is a protocol violation to issue this request on a seat that has never had the keyboard capability. The missing_capability error will be sent in this case.
func (*Seat) GetPointer ¶
GetPointer will return pointer object.
The ID provided will be initialized to the wl_pointer interface for this seat.
This request only takes effect if the seat has the pointer capability, or has had the pointer capability in the past. It is a protocol violation to issue this request on a seat that has never had the pointer capability. The missing_capability error will be sent in this case.
func (*Seat) GetTouch ¶
GetTouch will return touch object.
The ID provided will be initialized to the wl_touch interface for this seat.
This request only takes effect if the seat has the touch capability, or has had the touch capability in the past. It is a protocol violation to issue this request on a seat that has never had the touch capability. The missing_capability error will be sent in this case.
func (*Seat) Release ¶
Release will release the seat object.
Using this request a client can tell the server that it is not going to use the seat object anymore.
func (*Seat) RemoveCapabilitiesHandler ¶
func (p *Seat) RemoveCapabilitiesHandler(h SeatCapabilitiesHandler)
func (*Seat) RemoveNameHandler ¶
func (p *Seat) RemoveNameHandler(h SeatNameHandler)
type SeatCapabilitiesEvent ¶
type SeatCapabilitiesEvent struct {
Capabilities uint32
}
type SeatCapabilitiesHandler ¶
type SeatCapabilitiesHandler interface {
HandleSeatCapabilities(SeatCapabilitiesEvent)
}
type SeatNameEvent ¶
type SeatNameEvent struct {
Name string
}
type SeatNameHandler ¶
type SeatNameHandler interface {
HandleSeatName(SeatNameEvent)
}
type Shell ¶
type Shell struct {
BaseProxy
}
func (*Shell) GetShellSurface ¶
func (p *Shell) GetShellSurface(surface *Surface) (*ShellSurface, error)
GetShellSurface will create a shell surface from a surface.
Create a shell surface for an existing surface. This gives the wl_surface the role of a shell surface. If the wl_surface already has another role, it raises a protocol error.
Only one shell surface can be associated with a given surface.
type ShellSurface ¶
type ShellSurface struct { BaseProxy // contains filtered or unexported fields }
func NewShellSurface ¶
func NewShellSurface(ctx *Context) *ShellSurface
func (*ShellSurface) AddConfigureHandler ¶
func (p *ShellSurface) AddConfigureHandler(h ShellSurfaceConfigureHandler)
func (*ShellSurface) AddPingHandler ¶
func (p *ShellSurface) AddPingHandler(h ShellSurfacePingHandler)
func (*ShellSurface) AddPopupDoneHandler ¶
func (p *ShellSurface) AddPopupDoneHandler(h ShellSurfacePopupDoneHandler)
func (*ShellSurface) Dispatch ¶
func (p *ShellSurface) Dispatch(event *Event)
func (*ShellSurface) Move ¶
func (p *ShellSurface) Move(seat *Seat, serial uint32) error
Move will start an interactive move.
Start a pointer-driven move of the surface.
This request must be used in response to a button press event. The server may ignore move requests depending on the state of the surface (e.g. fullscreen or maximized).
func (*ShellSurface) Pong ¶
func (p *ShellSurface) Pong(serial uint32) error
Pong will respond to a ping event.
A client must respond to a ping event with a pong request or the client may be deemed unresponsive.
func (*ShellSurface) RemoveConfigureHandler ¶
func (p *ShellSurface) RemoveConfigureHandler(h ShellSurfaceConfigureHandler)
func (*ShellSurface) RemovePingHandler ¶
func (p *ShellSurface) RemovePingHandler(h ShellSurfacePingHandler)
func (*ShellSurface) RemovePopupDoneHandler ¶
func (p *ShellSurface) RemovePopupDoneHandler(h ShellSurfacePopupDoneHandler)
func (*ShellSurface) Resize ¶
func (p *ShellSurface) Resize(seat *Seat, serial, edges uint32) error
Resize will start an interactive resize.
Start a pointer-driven resizing of the surface.
This request must be used in response to a button press event. The server may ignore resize requests depending on the state of the surface (e.g. fullscreen or maximized).
func (*ShellSurface) SetClass ¶
func (p *ShellSurface) SetClass(class_ string) error
SetClass will set surface class.
Set a class for the surface.
The surface class identifies the general class of applications to which the surface belongs. A common convention is to use the file name (or the full path if it is a non-standard location) of the application's .desktop file as the class.
func (*ShellSurface) SetFullscreen ¶
func (p *ShellSurface) SetFullscreen(method, framerate uint32, output *Output) error
SetFullscreen will make the surface a fullscreen surface.
Map the surface as a fullscreen surface.
If an output parameter is given then the surface will be made fullscreen on that output. If the client does not specify the output then the compositor will apply its policy - usually choosing the output on which the surface has the biggest surface area.
The client may specify a method to resolve a size conflict between the output size and the surface size - this is provided through the method parameter.
The framerate parameter is used only when the method is set to "driver", to indicate the preferred framerate. A value of 0 indicates that the client does not care about framerate. The framerate is specified in mHz, that is framerate of 60000 is 60Hz.
A method of "scale" or "driver" implies a scaling operation of the surface, either via a direct scaling operation or a change of the output mode. This will override any kind of output scaling, so that mapping a surface with a buffer size equal to the mode can fill the screen independent of buffer_scale.
A method of "fill" means we don't scale up the buffer, however any output scale is applied. This means that you may run into an edge case where the application maps a buffer with the same size of the output mode but buffer_scale 1 (thus making a surface larger than the output). In this case it is allowed to downscale the results to fit the screen.
The compositor must reply to this request with a configure event with the dimensions for the output on which the surface will be made fullscreen.
func (*ShellSurface) SetMaximized ¶
func (p *ShellSurface) SetMaximized(output *Output) error
SetMaximized will make the surface a maximized surface.
Map the surface as a maximized surface.
If an output parameter is given then the surface will be maximized on that output. If the client does not specify the output then the compositor will apply its policy - usually choosing the output on which the surface has the biggest surface area.
The compositor will reply with a configure event telling the expected new surface size. The operation is completed on the next buffer attach to this surface.
A maximized surface typically fills the entire output it is bound to, except for desktop elements such as panels. This is the main difference between a maximized shell surface and a fullscreen shell surface.
The details depend on the compositor implementation.
func (*ShellSurface) SetPopup ¶
func (p *ShellSurface) SetPopup(seat *Seat, serial uint32, parent *Surface, x, y int32, flags uint32) error
SetPopup will make the surface a popup surface.
Map the surface as a popup.
A popup surface is a transient surface with an added pointer grab.
An existing implicit grab will be changed to owner-events mode, and the popup grab will continue after the implicit grab ends (i.e. releasing the mouse button does not cause the popup to be unmapped).
The popup grab continues until the window is destroyed or a mouse button is pressed in any other client's window. A click in any of the client's surfaces is reported as normal, however, clicks in other clients' surfaces will be discarded and trigger the callback.
The x and y arguments specify the location of the upper left corner of the surface relative to the upper left corner of the parent surface, in surface-local coordinates.
func (*ShellSurface) SetTitle ¶
func (p *ShellSurface) SetTitle(title string) error
SetTitle will set surface title.
Set a short title for the surface.
This string may be used to identify the surface in a task bar, window list, or other user interface elements provided by the compositor.
The string must be encoded in UTF-8.
func (*ShellSurface) SetToplevel ¶
func (p *ShellSurface) SetToplevel() error
SetToplevel will make the surface a toplevel surface.
Map the surface as a toplevel surface.
A toplevel surface is not fullscreen, maximized or transient.
func (*ShellSurface) SetTransient ¶
func (p *ShellSurface) SetTransient(parent *Surface, x, y int32, flags uint32) error
SetTransient will make the surface a transient surface.
Map the surface relative to an existing surface.
The x and y arguments specify the location of the upper left corner of the surface relative to the upper left corner of the parent surface, in surface-local coordinates.
The flags argument controls details of the transient behaviour.
type ShellSurfaceConfigureHandler ¶
type ShellSurfaceConfigureHandler interface {
HandleShellSurfaceConfigure(ShellSurfaceConfigureEvent)
}
type ShellSurfacePingEvent ¶
type ShellSurfacePingEvent struct {
Serial uint32
}
type ShellSurfacePingHandler ¶
type ShellSurfacePingHandler interface {
HandleShellSurfacePing(ShellSurfacePingEvent)
}
type ShellSurfacePopupDoneEvent ¶
type ShellSurfacePopupDoneEvent struct{}
type ShellSurfacePopupDoneHandler ¶
type ShellSurfacePopupDoneHandler interface {
HandleShellSurfacePopupDone(ShellSurfacePopupDoneEvent)
}
type Shm ¶
type Shm struct { BaseProxy // contains filtered or unexported fields }
func (*Shm) AddFormatHandler ¶
func (p *Shm) AddFormatHandler(h ShmFormatHandler)
func (*Shm) CreatePool ¶
CreatePool will create a shm pool.
Create a new wl_shm_pool object.
The pool can be used to create shared memory based buffer objects. The server will mmap size bytes of the passed file descriptor, to use as backing memory for the pool.
func (*Shm) RemoveFormatHandler ¶
func (p *Shm) RemoveFormatHandler(h ShmFormatHandler)
type ShmFormatEvent ¶
type ShmFormatEvent struct {
Format uint32
}
type ShmFormatHandler ¶
type ShmFormatHandler interface {
HandleShmFormat(ShmFormatEvent)
}
type ShmPool ¶
type ShmPool struct {
BaseProxy
}
func NewShmPool ¶
func (*ShmPool) CreateBuffer ¶
CreateBuffer will create a buffer from the pool.
Create a wl_buffer object from the pool.
The buffer is created offset bytes into the pool and has width and height as specified. The stride argument specifies the number of bytes from the beginning of one row to the beginning of the next. The format is the pixel format of the buffer and must be one of those advertised through the wl_shm.format event.
A buffer will keep a reference to the pool it was created from so it is valid to destroy the pool immediately after creating a buffer from it.
func (*ShmPool) Destroy ¶
Destroy will destroy the pool.
Destroy the shared memory pool.
The mmapped memory will be released when all buffers that have been created from this pool are gone.
type Subcompositor ¶
type Subcompositor struct {
BaseProxy
}
func NewSubcompositor ¶
func NewSubcompositor(ctx *Context) *Subcompositor
func (*Subcompositor) Destroy ¶
func (p *Subcompositor) Destroy() error
Destroy will unbind from the subcompositor interface.
Informs the server that the client will not be using this protocol object anymore. This does not affect any other objects, wl_subsurface objects included.
func (*Subcompositor) GetSubsurface ¶
func (p *Subcompositor) GetSubsurface(surface, parent *Surface) (*Subsurface, error)
GetSubsurface will give a surface the role sub-surface.
Create a sub-surface interface for the given surface, and associate it with the given parent surface. This turns a plain wl_surface into a sub-surface.
The to-be sub-surface must not already have another role, and it must not have an existing wl_subsurface object. Otherwise a protocol error is raised.
Adding sub-surfaces to a parent is a double-buffered operation on the parent (see wl_surface.commit). The effect of adding a sub-surface becomes visible on the next time the state of the parent surface is applied.
This request modifies the behaviour of wl_surface.commit request on the sub-surface, see the documentation on wl_subsurface interface.
type Subsurface ¶
type Subsurface struct {
BaseProxy
}
func NewSubsurface ¶
func NewSubsurface(ctx *Context) *Subsurface
func (*Subsurface) Destroy ¶
func (p *Subsurface) Destroy() error
Destroy will remove sub-surface interface.
The sub-surface interface is removed from the wl_surface object that was turned into a sub-surface with a wl_subcompositor.get_subsurface request. The wl_surface's association to the parent is deleted, and the wl_surface loses its role as a sub-surface. The wl_surface is unmapped immediately.
func (*Subsurface) PlaceAbove ¶
func (p *Subsurface) PlaceAbove(sibling *Surface) error
PlaceAbove will restack the sub-surface.
This sub-surface is taken from the stack, and put back just above the reference surface, changing the z-order of the sub-surfaces. The reference surface must be one of the sibling surfaces, or the parent surface. Using any other surface, including this sub-surface, will cause a protocol error.
The z-order is double-buffered. Requests are handled in order and applied immediately to a pending state. The final pending state is copied to the active state the next time the state of the parent surface is applied. When this happens depends on whether the parent surface is in synchronized mode or not. See wl_subsurface.set_sync and wl_subsurface.set_desync for details.
A new sub-surface is initially added as the top-most in the stack of its siblings and parent.
func (*Subsurface) PlaceBelow ¶
func (p *Subsurface) PlaceBelow(sibling *Surface) error
PlaceBelow will restack the sub-surface.
The sub-surface is placed just below the reference surface. See wl_subsurface.place_above.
func (*Subsurface) SetDesync ¶
func (p *Subsurface) SetDesync() error
SetDesync will set sub-surface to desynchronized mode.
Change the commit behaviour of the sub-surface to desynchronized mode, also described as independent or freely running mode.
In desynchronized mode, wl_surface.commit on a sub-surface will apply the pending state directly, without caching, as happens normally with a wl_surface. Calling wl_surface.commit on the parent surface has no effect on the sub-surface's wl_surface state. This mode allows a sub-surface to be updated on its own.
If cached state exists when wl_surface.commit is called in desynchronized mode, the pending state is added to the cached state, and applied as a whole. This invalidates the cache.
Note: even if a sub-surface is set to desynchronized, a parent sub-surface may override it to behave as synchronized. For details, see wl_subsurface.
If a surface's parent surface behaves as desynchronized, then the cached state is applied on set_desync.
func (*Subsurface) SetPosition ¶
func (p *Subsurface) SetPosition(x, y int32) error
SetPosition will reposition the sub-surface.
This schedules a sub-surface position change. The sub-surface will be moved so that its origin (top left corner pixel) will be at the location x, y of the parent surface coordinate system. The coordinates are not restricted to the parent surface area. Negative values are allowed.
The scheduled coordinates will take effect whenever the state of the parent surface is applied. When this happens depends on whether the parent surface is in synchronized mode or not. See wl_subsurface.set_sync and wl_subsurface.set_desync for details.
If more than one set_position request is invoked by the client before the commit of the parent surface, the position of a new request always replaces the scheduled position from any previous request.
The initial position is 0, 0.
func (*Subsurface) SetSync ¶
func (p *Subsurface) SetSync() error
SetSync will set sub-surface to synchronized mode.
Change the commit behaviour of the sub-surface to synchronized mode, also described as the parent dependent mode.
In synchronized mode, wl_surface.commit on a sub-surface will accumulate the committed state in a cache, but the state will not be applied and hence will not change the compositor output. The cached state is applied to the sub-surface immediately after the parent surface's state is applied. This ensures atomic updates of the parent and all its synchronized sub-surfaces. Applying the cached state will invalidate the cache, so further parent surface commits do not (re-)apply old state.
See wl_subsurface for the recursive effect of this mode.
type Surface ¶
type Surface struct { BaseProxy // contains filtered or unexported fields }
func NewSurface ¶
func (*Surface) AddEnterHandler ¶
func (p *Surface) AddEnterHandler(h SurfaceEnterHandler)
func (*Surface) AddLeaveHandler ¶
func (p *Surface) AddLeaveHandler(h SurfaceLeaveHandler)
func (*Surface) Attach ¶
Attach will set the surface contents.
Set a buffer as the content of this surface.
The new size of the surface is calculated based on the buffer size transformed by the inverse buffer_transform and the inverse buffer_scale. This means that at commit time the supplied buffer size must be an integer multiple of the buffer_scale. If that's not the case, an invalid_size error is sent.
The x and y arguments specify the location of the new pending buffer's upper left corner, relative to the current buffer's upper left corner, in surface-local coordinates. In other words, the x and y, combined with the new surface size define in which directions the surface's size changes.
Surface contents are double-buffered state, see wl_surface.commit.
The initial surface contents are void; there is no content. wl_surface.attach assigns the given wl_buffer as the pending wl_buffer. wl_surface.commit makes the pending wl_buffer the new surface contents, and the size of the surface becomes the size calculated from the wl_buffer, as described above. After commit, there is no pending buffer until the next attach.
Committing a pending wl_buffer allows the compositor to read the pixels in the wl_buffer. The compositor may access the pixels at any time after the wl_surface.commit request. When the compositor will not access the pixels anymore, it will send the wl_buffer.release event. Only after receiving wl_buffer.release, the client may reuse the wl_buffer. A wl_buffer that has been attached and then replaced by another attach instead of committed will not receive a release event, and is not used by the compositor.
If a pending wl_buffer has been committed to more than one wl_surface, the delivery of wl_buffer.release events becomes undefined. A well behaved client should not rely on wl_buffer.release events in this case. Alternatively, a client could create multiple wl_buffer objects from the same backing storage or use wp_linux_buffer_release.
Destroying the wl_buffer after wl_buffer.release does not change the surface contents. However, if the client destroys the wl_buffer before receiving the wl_buffer.release event, the surface contents become undefined immediately.
If wl_surface.attach is sent with a NULL wl_buffer, the following wl_surface.commit will remove the surface content.
func (*Surface) Commit ¶
Commit will commit pending surface state.
Surface state (input, opaque, and damage regions, attached buffers, etc.) is double-buffered. Protocol requests modify the pending state, as opposed to the current state in use by the compositor. A commit request atomically applies all pending state, replacing the current state. After commit, the new pending state is as documented for each related request.
On commit, a pending wl_buffer is applied first, and all other state second. This means that all coordinates in double-buffered state are relative to the new wl_buffer coming into use, except for wl_surface.attach itself. If there is no pending wl_buffer, the coordinates are relative to the current surface contents.
All requests that need a commit to become effective are documented to affect double-buffered state.
Other interfaces may add further double-buffered surface state.
func (*Surface) Damage ¶
Damage will mark part of the surface damaged.
This request is used to describe the regions where the pending buffer is different from the current surface contents, and where the surface therefore needs to be repainted. The compositor ignores the parts of the damage that fall outside of the surface.
Damage is double-buffered state, see wl_surface.commit.
The damage rectangle is specified in surface-local coordinates, where x and y specify the upper left corner of the damage rectangle.
The initial value for pending damage is empty: no damage. wl_surface.damage adds pending damage: the new pending damage is the union of old pending damage and the given rectangle.
wl_surface.commit assigns pending damage as the current damage, and clears pending damage. The server will clear the current damage as it repaints the surface.
Note! New clients should not use this request. Instead damage can be posted with wl_surface.damage_buffer which uses buffer coordinates instead of surface coordinates.
func (*Surface) DamageBuffer ¶
DamageBuffer will mark part of the surface damaged using buffer coordinates.
This request is used to describe the regions where the pending buffer is different from the current surface contents, and where the surface therefore needs to be repainted. The compositor ignores the parts of the damage that fall outside of the surface.
Damage is double-buffered state, see wl_surface.commit.
The damage rectangle is specified in buffer coordinates, where x and y specify the upper left corner of the damage rectangle.
The initial value for pending damage is empty: no damage. wl_surface.damage_buffer adds pending damage: the new pending damage is the union of old pending damage and the given rectangle.
wl_surface.commit assigns pending damage as the current damage, and clears pending damage. The server will clear the current damage as it repaints the surface.
This request differs from wl_surface.damage in only one way - it takes damage in buffer coordinates instead of surface-local coordinates. While this generally is more intuitive than surface coordinates, it is especially desirable when using wp_viewport or when a drawing library (like EGL) is unaware of buffer scale and buffer transform.
Note: Because buffer transformation changes and damage requests may be interleaved in the protocol stream, it is impossible to determine the actual mapping between surface and buffer damage until wl_surface.commit time. Therefore, compositors wishing to take both kinds of damage into account will have to accumulate damage from the two requests separately and only transform from one to the other after receiving the wl_surface.commit.
func (*Surface) Destroy ¶
Destroy will delete surface.
Deletes the surface and invalidates its object ID.
func (*Surface) Frame ¶
Frame will request a frame throttling hint.
Request a notification when it is a good time to start drawing a new frame, by creating a frame callback. This is useful for throttling redrawing operations, and driving animations.
When a client is animating on a wl_surface, it can use the 'frame' request to get notified when it is a good time to draw and commit the next frame of animation. If the client commits an update earlier than that, it is likely that some updates will not make it to the display, and the client is wasting resources by drawing too often.
The frame request will take effect on the next wl_surface.commit. The notification will only be posted for one frame unless requested again. For a wl_surface, the notifications are posted in the order the frame requests were committed.
The server must send the notifications so that a client will not send excessive updates, while still allowing the highest possible update rate for clients that wait for the reply before drawing again. The server should give some time for the client to draw and commit after sending the frame callback events to let it hit the next output refresh.
A server should avoid signaling the frame callbacks if the surface is not visible in any way, e.g. the surface is off-screen, or completely obscured by other opaque surfaces.
The object returned by this request will be destroyed by the compositor after the callback is fired and as such the client must not attempt to use it after that point.
The callback_data passed in the callback is the current time, in milliseconds, with an undefined base.
func (*Surface) RemoveEnterHandler ¶
func (p *Surface) RemoveEnterHandler(h SurfaceEnterHandler)
func (*Surface) RemoveLeaveHandler ¶
func (p *Surface) RemoveLeaveHandler(h SurfaceLeaveHandler)
func (*Surface) SetBufferScale ¶
SetBufferScale will sets the buffer scaling factor.
This request sets an optional scaling factor on how the compositor interprets the contents of the buffer attached to the window.
Buffer scale is double-buffered state, see wl_surface.commit.
A newly created surface has its buffer scale set to 1.
wl_surface.set_buffer_scale changes the pending buffer scale. wl_surface.commit copies the pending buffer scale to the current one. Otherwise, the pending and current values are never changed.
The purpose of this request is to allow clients to supply higher resolution buffer data for use on high resolution outputs. It is intended that you pick the same buffer scale as the scale of the output that the surface is displayed on. This means the compositor can avoid scaling when rendering the surface on that output.
Note that if the scale is larger than 1, then you have to attach a buffer that is larger (by a factor of scale in each dimension) than the desired surface size.
If scale is not positive the invalid_scale protocol error is raised.
func (*Surface) SetBufferTransform ¶
SetBufferTransform will sets the buffer transformation.
This request sets an optional transformation on how the compositor interprets the contents of the buffer attached to the surface. The accepted values for the transform parameter are the values for wl_output.transform.
Buffer transform is double-buffered state, see wl_surface.commit.
A newly created surface has its buffer transformation set to normal.
wl_surface.set_buffer_transform changes the pending buffer transformation. wl_surface.commit copies the pending buffer transformation to the current one. Otherwise, the pending and current values are never changed.
The purpose of this request is to allow clients to render content according to the output transform, thus permitting the compositor to use certain optimizations even if the display is rotated. Using hardware overlays and scanning out a client buffer for fullscreen surfaces are examples of such optimizations. Those optimizations are highly dependent on the compositor implementation, so the use of this request should be considered on a case-by-case basis.
Note that if the transform value includes 90 or 270 degree rotation, the width of the buffer will become the surface height and the height of the buffer will become the surface width.
If transform is not one of the values from the wl_output.transform enum the invalid_transform protocol error is raised.
func (*Surface) SetInputRegion ¶
SetInputRegion will set input region.
This request sets the region of the surface that can receive pointer and touch events.
Input events happening outside of this region will try the next surface in the server surface stack. The compositor ignores the parts of the input region that fall outside of the surface.
The input region is specified in surface-local coordinates.
Input region is double-buffered state, see wl_surface.commit.
wl_surface.set_input_region changes the pending input region. wl_surface.commit copies the pending region to the current region. Otherwise the pending and current regions are never changed, except cursor and icon surfaces are special cases, see wl_pointer.set_cursor and wl_data_device.start_drag.
The initial value for an input region is infinite. That means the whole surface will accept input. Setting the pending input region has copy semantics, and the wl_region object can be destroyed immediately. A NULL wl_region causes the input region to be set to infinite.
func (*Surface) SetOpaqueRegion ¶
SetOpaqueRegion will set opaque region.
This request sets the region of the surface that contains opaque content.
The opaque region is an optimization hint for the compositor that lets it optimize the redrawing of content behind opaque regions. Setting an opaque region is not required for correct behaviour, but marking transparent content as opaque will result in repaint artifacts.
The opaque region is specified in surface-local coordinates.
The compositor ignores the parts of the opaque region that fall outside of the surface.
Opaque region is double-buffered state, see wl_surface.commit.
wl_surface.set_opaque_region changes the pending opaque region. wl_surface.commit copies the pending region to the current region. Otherwise, the pending and current regions are never changed.
The initial value for an opaque region is empty. Setting the pending opaque region has copy semantics, and the wl_region object can be destroyed immediately. A NULL wl_region causes the pending opaque region to be set to empty.
type SurfaceEnterEvent ¶
type SurfaceEnterEvent struct {
Output *Output
}
type SurfaceEnterHandler ¶
type SurfaceEnterHandler interface {
HandleSurfaceEnter(SurfaceEnterEvent)
}
type SurfaceLeaveEvent ¶
type SurfaceLeaveEvent struct {
Output *Output
}
type SurfaceLeaveHandler ¶
type SurfaceLeaveHandler interface {
HandleSurfaceLeave(SurfaceLeaveEvent)
}
type Touch ¶
type Touch struct { BaseProxy // contains filtered or unexported fields }
func (*Touch) AddCancelHandler ¶
func (p *Touch) AddCancelHandler(h TouchCancelHandler)
func (*Touch) AddDownHandler ¶
func (p *Touch) AddDownHandler(h TouchDownHandler)
func (*Touch) AddFrameHandler ¶
func (p *Touch) AddFrameHandler(h TouchFrameHandler)
func (*Touch) AddMotionHandler ¶
func (p *Touch) AddMotionHandler(h TouchMotionHandler)
func (*Touch) AddOrientationHandler ¶
func (p *Touch) AddOrientationHandler(h TouchOrientationHandler)
func (*Touch) AddShapeHandler ¶
func (p *Touch) AddShapeHandler(h TouchShapeHandler)
func (*Touch) AddUpHandler ¶
func (p *Touch) AddUpHandler(h TouchUpHandler)
func (*Touch) RemoveCancelHandler ¶
func (p *Touch) RemoveCancelHandler(h TouchCancelHandler)
func (*Touch) RemoveDownHandler ¶
func (p *Touch) RemoveDownHandler(h TouchDownHandler)
func (*Touch) RemoveFrameHandler ¶
func (p *Touch) RemoveFrameHandler(h TouchFrameHandler)
func (*Touch) RemoveMotionHandler ¶
func (p *Touch) RemoveMotionHandler(h TouchMotionHandler)
func (*Touch) RemoveOrientationHandler ¶
func (p *Touch) RemoveOrientationHandler(h TouchOrientationHandler)
func (*Touch) RemoveShapeHandler ¶
func (p *Touch) RemoveShapeHandler(h TouchShapeHandler)
func (*Touch) RemoveUpHandler ¶
func (p *Touch) RemoveUpHandler(h TouchUpHandler)
type TouchCancelEvent ¶
type TouchCancelEvent struct{}
type TouchCancelHandler ¶
type TouchCancelHandler interface {
HandleTouchCancel(TouchCancelEvent)
}
type TouchDownEvent ¶
type TouchDownHandler ¶
type TouchDownHandler interface {
HandleTouchDown(TouchDownEvent)
}
type TouchFrameEvent ¶
type TouchFrameEvent struct{}
type TouchFrameHandler ¶
type TouchFrameHandler interface {
HandleTouchFrame(TouchFrameEvent)
}
type TouchMotionHandler ¶
type TouchMotionHandler interface {
HandleTouchMotion(TouchMotionEvent)
}
type TouchOrientationEvent ¶
type TouchOrientationHandler ¶
type TouchOrientationHandler interface {
HandleTouchOrientation(TouchOrientationEvent)
}
type TouchShapeEvent ¶
type TouchShapeHandler ¶
type TouchShapeHandler interface {
HandleTouchShape(TouchShapeEvent)
}
type TouchUpEvent ¶
type TouchUpHandler ¶
type TouchUpHandler interface {
HandleTouchUp(TouchUpEvent)
}
Directories ¶
Path | Synopsis |
---|---|
Package cursor .
|
Package cursor . |
Package dmabuf .
|
Package dmabuf . |
examples
|
|
internal
|
|
swizzle
Package swizzle provides functions for converting between RGBA pixel formats.
|
Package swizzle provides functions for converting between RGBA pixel formats. |
Package viewporter is cropping & scaling extension for surface contents
|
Package viewporter is cropping & scaling extension for surface contents |
Package xdg contains
|
Package xdg contains |
Package zxdg .
|
Package zxdg . |