Documentation
¶
Overview ¶
Package core contains canonical Wayland core protocol bindings generated from pinned wayland.xml. Bind globals with display.Registry().Bind and the corresponding New* constructor. Client-created and server-created children are registered with their concrete generated types; never replace them with transport wrappers. On* handlers receive typed values. Received OwnedFDs are closed after the event unless a handler calls Take; request FDs are transferred (and closed locally) only after a complete successful send.
Index ¶
- Constants
- type Buffer
- type Callback
- type Compositor
- type DataDevice
- func (o *DataDevice) Dispatch(event *wl.Event)
- func (o *DataDevice) EventSignature(opcode uint16) (string, bool)
- func (o *DataDevice) OnDataOffer(handler func(idObject *DataOffer))
- func (o *DataDevice) OnDrop(handler func())
- func (o *DataDevice) OnEnter(...)
- func (o *DataDevice) OnLeave(handler func())
- func (o *DataDevice) OnMotion(handler func(time uint32, x wl.Fixed, y wl.Fixed))
- func (o *DataDevice) OnSelection(handler func(idID uint32))
- func (o *DataDevice) Release() error
- func (o *DataDevice) SetSelection(source *DataSource, serial uint32) error
- func (o *DataDevice) StartDrag(source *DataSource, origin *Surface, icon *Surface, serial uint32) error
- type DataDeviceManager
- func (o *DataDeviceManager) CreateDataSource() (*DataSource, error)
- func (o *DataDeviceManager) Dispatch(event *wl.Event)
- func (o *DataDeviceManager) EventSignature(opcode uint16) (string, bool)
- func (o *DataDeviceManager) GetDataDevice(seat *Seat) (*DataDevice, error)
- func (o *DataDeviceManager) Release() error
- type DataOffer
- func (o *DataOffer) Accept(serial uint32, mimeType string) error
- func (o *DataOffer) Destroy() error
- func (o *DataOffer) Dispatch(event *wl.Event)
- func (o *DataOffer) EventSignature(opcode uint16) (string, bool)
- func (o *DataOffer) Finish() error
- func (o *DataOffer) OnAction(handler func(dndAction uint32))
- func (o *DataOffer) OnOffer(handler func(mimeType string))
- func (o *DataOffer) OnSourceActions(handler func(sourceActions uint32))
- func (o *DataOffer) Receive(mimeType string, fd int) error
- func (o *DataOffer) SetActions(dndActions uint32, preferredAction uint32) error
- type DataSource
- func (o *DataSource) Destroy() error
- func (o *DataSource) Dispatch(event *wl.Event)
- func (o *DataSource) EventSignature(opcode uint16) (string, bool)
- func (o *DataSource) Offer(mimeType string) error
- func (o *DataSource) OnAction(handler func(dndAction uint32))
- func (o *DataSource) OnCancelled(handler func())
- func (o *DataSource) OnDndDropPerformed(handler func())
- func (o *DataSource) OnDndFinished(handler func())
- func (o *DataSource) OnSend(handler func(mimeType string, fd *wl.OwnedFD))
- func (o *DataSource) OnTarget(handler func(mimeType string))
- func (o *DataSource) SetActions(dndActions uint32) error
- type Fixes
- type Keyboard
- func (o *Keyboard) Dispatch(event *wl.Event)
- func (o *Keyboard) EventSignature(opcode uint16) (string, bool)
- func (o *Keyboard) OnEnter(handler func(serial uint32, surfaceID uint32, keys []byte))
- func (o *Keyboard) OnKey(handler func(serial uint32, time uint32, key uint32, state uint32))
- func (o *Keyboard) OnKeymap(handler func(format uint32, fd *wl.OwnedFD, size uint32))
- func (o *Keyboard) OnLeave(handler func(serial uint32, surfaceID uint32))
- func (o *Keyboard) OnModifiers(...)
- func (o *Keyboard) OnRepeatInfo(handler func(rate int32, delay int32))
- func (o *Keyboard) Release() error
- type Output
- func (o *Output) Dispatch(event *wl.Event)
- func (o *Output) EventSignature(opcode uint16) (string, bool)
- func (o *Output) OnDescription(handler func(description string))
- func (o *Output) OnDone(handler func())
- func (o *Output) OnGeometry(...)
- func (o *Output) OnMode(handler func(flags uint32, width int32, height int32, refresh int32))
- func (o *Output) OnName(handler func(name string))
- func (o *Output) OnScale(handler func(factor int32))
- func (o *Output) Release() error
- type Pointer
- func (o *Pointer) Dispatch(event *wl.Event)
- func (o *Pointer) EventSignature(opcode uint16) (string, bool)
- func (o *Pointer) OnAxis(handler func(time uint32, axis uint32, value wl.Fixed))
- func (o *Pointer) OnAxisDiscrete(handler func(axis uint32, discrete int32))
- func (o *Pointer) OnAxisRelativeDirection(handler func(axis uint32, direction uint32))
- func (o *Pointer) OnAxisSource(handler func(axisSource uint32))
- func (o *Pointer) OnAxisStop(handler func(time uint32, axis uint32))
- func (o *Pointer) OnAxisValue120(handler func(axis uint32, value120 int32))
- func (o *Pointer) OnButton(handler func(serial uint32, time uint32, button uint32, state uint32))
- func (o *Pointer) OnEnter(...)
- func (o *Pointer) OnFrame(handler func())
- func (o *Pointer) OnLeave(handler func(serial uint32, surfaceID uint32))
- func (o *Pointer) OnMotion(handler func(time uint32, surfaceX wl.Fixed, surfaceY wl.Fixed))
- func (o *Pointer) OnWarp(handler func(surfaceX wl.Fixed, surfaceY wl.Fixed))
- func (o *Pointer) Release() error
- func (o *Pointer) SetCursor(serial uint32, surface *Surface, hotspotX int32, hotspotY int32) error
- type Region
- type Seat
- func (o *Seat) Dispatch(event *wl.Event)
- func (o *Seat) EventSignature(opcode uint16) (string, bool)
- func (o *Seat) GetKeyboard() (*Keyboard, error)
- func (o *Seat) GetPointer() (*Pointer, error)
- func (o *Seat) GetTouch() (*Touch, error)
- func (o *Seat) OnCapabilities(handler func(capabilities uint32))
- func (o *Seat) OnName(handler func(name string))
- func (o *Seat) Release() error
- type Shell
- type ShellSurface
- func (o *ShellSurface) Dispatch(event *wl.Event)
- func (o *ShellSurface) EventSignature(opcode uint16) (string, bool)
- func (o *ShellSurface) Move(seat *Seat, serial uint32) error
- func (o *ShellSurface) OnConfigure(handler func(edges uint32, width int32, height int32))
- func (o *ShellSurface) OnPing(handler func(serial uint32))
- func (o *ShellSurface) OnPopupDone(handler func())
- func (o *ShellSurface) Pong(serial uint32) error
- func (o *ShellSurface) Resize(seat *Seat, serial uint32, edges uint32) error
- func (o *ShellSurface) SetClass(class string) error
- func (o *ShellSurface) SetFullscreen(method uint32, framerate uint32, output *Output) error
- func (o *ShellSurface) SetMaximized(output *Output) error
- func (o *ShellSurface) SetPopup(seat *Seat, serial uint32, parent *Surface, x int32, y int32, flags uint32) error
- func (o *ShellSurface) SetTitle(title string) error
- func (o *ShellSurface) SetToplevel() error
- func (o *ShellSurface) SetTransient(parent *Surface, x int32, y int32, flags uint32) error
- type Shm
- type ShmPool
- func (o *ShmPool) CreateBuffer(offset int32, width int32, height int32, stride int32, format uint32) (*Buffer, error)
- func (o *ShmPool) Destroy() error
- func (o *ShmPool) Dispatch(event *wl.Event)
- func (o *ShmPool) EventSignature(opcode uint16) (string, bool)
- func (o *ShmPool) Resize(size int32) error
- type Subcompositor
- type Subsurface
- func (o *Subsurface) Destroy() error
- func (o *Subsurface) Dispatch(event *wl.Event)
- func (o *Subsurface) EventSignature(opcode uint16) (string, bool)
- func (o *Subsurface) PlaceAbove(sibling *Surface) error
- func (o *Subsurface) PlaceBelow(sibling *Surface) error
- func (o *Subsurface) SetDesync() error
- func (o *Subsurface) SetPosition(x int32, y int32) error
- func (o *Subsurface) SetSync() error
- type Surface
- func (o *Surface) Attach(buffer *Buffer, x int32, y int32) error
- func (o *Surface) Commit() error
- func (o *Surface) Damage(x int32, y int32, width int32, height int32) error
- func (o *Surface) DamageBuffer(x int32, y int32, width int32, height int32) error
- func (o *Surface) Destroy() error
- func (o *Surface) Dispatch(event *wl.Event)
- func (o *Surface) EventSignature(opcode uint16) (string, bool)
- func (o *Surface) Frame() (*Callback, error)
- func (o *Surface) GetRelease() (*Callback, error)
- func (o *Surface) Offset(x int32, y int32) error
- func (o *Surface) OnEnter(handler func(outputID uint32))
- func (o *Surface) OnLeave(handler func(outputID uint32))
- func (o *Surface) OnPreferredBufferScale(handler func(factor int32))
- func (o *Surface) OnPreferredBufferTransform(handler func(transform uint32))
- func (o *Surface) SetBufferScale(scale int32) error
- func (o *Surface) SetBufferTransform(transform int32) error
- func (o *Surface) SetInputRegion(region *Region) error
- func (o *Surface) SetOpaqueRegion(region *Region) error
- type Touch
- func (o *Touch) Dispatch(event *wl.Event)
- func (o *Touch) EventSignature(opcode uint16) (string, bool)
- func (o *Touch) OnCancel(handler func())
- func (o *Touch) OnDown(...)
- func (o *Touch) OnFrame(handler func())
- func (o *Touch) OnMotion(handler func(time uint32, id int32, x wl.Fixed, y wl.Fixed))
- func (o *Touch) OnOrientation(handler func(id int32, orientation wl.Fixed))
- func (o *Touch) OnShape(handler func(id int32, major wl.Fixed, minor wl.Fixed))
- func (o *Touch) OnUp(handler func(serial uint32, time uint32, id int32))
- func (o *Touch) Release() error
Constants ¶
const AXIS_HORIZONTAL_SCROLL = 1
AXIS_HORIZONTAL_SCROLL is the axis horizontal_scroll value.
const AXIS_RELATIVE_DIRECTION_IDENTICAL = 0
AXIS_RELATIVE_DIRECTION_IDENTICAL is the axis_relative_direction identical value.
const AXIS_RELATIVE_DIRECTION_INVERTED = 1
AXIS_RELATIVE_DIRECTION_INVERTED is the axis_relative_direction inverted value.
const AXIS_SOURCE_CONTINUOUS = 2
AXIS_SOURCE_CONTINUOUS is the axis_source continuous value.
const AXIS_SOURCE_FINGER = 1
AXIS_SOURCE_FINGER is the axis_source finger value.
const AXIS_SOURCE_WHEEL = 0
AXIS_SOURCE_WHEEL is the axis_source wheel value.
const AXIS_SOURCE_WHEEL_TILT = 3
AXIS_SOURCE_WHEEL_TILT is the axis_source wheel_tilt value.
const AXIS_VERTICAL_SCROLL = 0
AXIS_VERTICAL_SCROLL is the axis vertical_scroll value.
const BUTTON_STATE_PRESSED = 1
BUTTON_STATE_PRESSED is the button_state pressed value.
const BUTTON_STATE_RELEASED = 0
BUTTON_STATE_RELEASED is the button_state released value.
const BufferInterface = "wl_buffer"
BufferInterface is the protocol interface name.
const CAPABILITY_KEYBOARD = 2
CAPABILITY_KEYBOARD is the capability keyboard value.
const CAPABILITY_POINTER = 1
CAPABILITY_POINTER is the capability pointer value.
const CAPABILITY_TOUCH = 4
CAPABILITY_TOUCH is the capability touch value.
const CallbackInterface = "wl_callback"
CallbackInterface is the protocol interface name.
const CompositorInterface = "wl_compositor"
CompositorInterface is the protocol interface name.
const DND_ACTION_ASK = 4
DND_ACTION_ASK is the dnd_action ask value.
const DND_ACTION_COPY = 1
DND_ACTION_COPY is the dnd_action copy value.
const DND_ACTION_MOVE = 2
DND_ACTION_MOVE is the dnd_action move value.
const DND_ACTION_NONE = 0
DND_ACTION_NONE is the dnd_action none value.
const DataDeviceInterface = "wl_data_device"
DataDeviceInterface is the protocol interface name.
const DataDeviceManagerInterface = "wl_data_device_manager"
DataDeviceManagerInterface is the protocol interface name.
const DataOfferInterface = "wl_data_offer"
DataOfferInterface is the protocol interface name.
const DataSourceInterface = "wl_data_source"
DataSourceInterface is the protocol interface name.
const ERROR_BAD_PARENT = 1
ERROR_BAD_PARENT is the error bad_parent value.
const ERROR_DEFUNCT_ROLE_OBJECT = 4
ERROR_DEFUNCT_ROLE_OBJECT is the error defunct_role_object value.
const ERROR_INVALID_ACK_REMOVE = 0
ERROR_INVALID_ACK_REMOVE is the error invalid_ack_remove value.
const ERROR_INVALID_ACTION = 2
ERROR_INVALID_ACTION is the error invalid_action value.
const ERROR_INVALID_FD = 2
ERROR_INVALID_FD is the error invalid_fd value.
const ERROR_INVALID_FINISH = 0
ERROR_INVALID_FINISH is the error invalid_finish value.
const ERROR_INVALID_OFFER = 3
ERROR_INVALID_OFFER is the error invalid_offer value.
const ERROR_INVALID_OFFSET = 3
ERROR_INVALID_OFFSET is the error invalid_offset value.
const ERROR_INVALID_SCALE = 0
ERROR_INVALID_SCALE is the error invalid_scale value.
const ERROR_INVALID_SIZE = 2
ERROR_INVALID_SIZE is the error invalid_size value.
const ERROR_INVALID_SOURCE = 1
ERROR_INVALID_SOURCE is the error invalid_source value.
const ERROR_INVALID_TRANSFORM = 1
ERROR_INVALID_TRANSFORM is the error invalid_transform value.
const ERROR_MISSING_CAPABILITY = 0
ERROR_MISSING_CAPABILITY is the error missing_capability value.
const ERROR_NO_BUFFER = 5
ERROR_NO_BUFFER is the error no_buffer value.
const ERROR_USED_SOURCE = 1
ERROR_USED_SOURCE is the error used_source value.
const FORMAT_ABGR1555 = 0x35314241
FORMAT_ABGR1555 is the format abgr1555 value.
const FORMAT_ABGR16161616 = 0x38344241
FORMAT_ABGR16161616 is the format abgr16161616 value.
const FORMAT_ABGR16161616F = 0x48344241
FORMAT_ABGR16161616F is the format abgr16161616f value.
const FORMAT_ABGR2101010 = 0x30334241
FORMAT_ABGR2101010 is the format abgr2101010 value.
const FORMAT_ABGR32323232F = 0x46384241
FORMAT_ABGR32323232F is the format abgr32323232f value.
const FORMAT_ABGR4444 = 0x32314241
FORMAT_ABGR4444 is the format abgr4444 value.
const FORMAT_ABGR8888 = 0x34324241
FORMAT_ABGR8888 is the format abgr8888 value.
const FORMAT_ARGB1555 = 0x35315241
FORMAT_ARGB1555 is the format argb1555 value.
const FORMAT_ARGB16161616 = 0x38345241
FORMAT_ARGB16161616 is the format argb16161616 value.
const FORMAT_ARGB16161616F = 0x48345241
FORMAT_ARGB16161616F is the format argb16161616f value.
const FORMAT_ARGB2101010 = 0x30335241
FORMAT_ARGB2101010 is the format argb2101010 value.
const FORMAT_ARGB4444 = 0x32315241
FORMAT_ARGB4444 is the format argb4444 value.
const FORMAT_ARGB8888 = 0
FORMAT_ARGB8888 is the format argb8888 value.
const FORMAT_AVUY8888 = 0x59555641
FORMAT_AVUY8888 is the format avuy8888 value.
const FORMAT_AXBXGXRX106106106106 = 0x30314241
FORMAT_AXBXGXRX106106106106 is the format axbxgxrx106106106106 value.
const FORMAT_AYUV = 0x56555941
FORMAT_AYUV is the format ayuv value.
const FORMAT_BGR161616 = 0x38344742
FORMAT_BGR161616 is the format bgr161616 value.
const FORMAT_BGR161616F = 0x48524742
FORMAT_BGR161616F is the format bgr161616f value.
const FORMAT_BGR233 = 0x38524742
FORMAT_BGR233 is the format bgr233 value.
const FORMAT_BGR323232F = 0x46524742
FORMAT_BGR323232F is the format bgr323232f value.
const FORMAT_BGR565 = 0x36314742
FORMAT_BGR565 is the format bgr565 value.
const FORMAT_BGR565_A8 = 0x38413542
FORMAT_BGR565_A8 is the format bgr565_a8 value.
const FORMAT_BGR888 = 0x34324742
FORMAT_BGR888 is the format bgr888 value.
const FORMAT_BGR888_A8 = 0x38413842
FORMAT_BGR888_A8 is the format bgr888_a8 value.
const FORMAT_BGRA1010102 = 0x30334142
FORMAT_BGRA1010102 is the format bgra1010102 value.
const FORMAT_BGRA4444 = 0x32314142
FORMAT_BGRA4444 is the format bgra4444 value.
const FORMAT_BGRA5551 = 0x35314142
FORMAT_BGRA5551 is the format bgra5551 value.
const FORMAT_BGRA8888 = 0x34324142
FORMAT_BGRA8888 is the format bgra8888 value.
const FORMAT_BGRX1010102 = 0x30335842
FORMAT_BGRX1010102 is the format bgrx1010102 value.
const FORMAT_BGRX4444 = 0x32315842
FORMAT_BGRX4444 is the format bgrx4444 value.
const FORMAT_BGRX5551 = 0x35315842
FORMAT_BGRX5551 is the format bgrx5551 value.
const FORMAT_BGRX8888 = 0x34325842
FORMAT_BGRX8888 is the format bgrx8888 value.
const FORMAT_BGRX8888_A8 = 0x38415842
FORMAT_BGRX8888_A8 is the format bgrx8888_a8 value.
const FORMAT_C1 = 0x20203143
FORMAT_C1 is the format c1 value.
const FORMAT_C2 = 0x20203243
FORMAT_C2 is the format c2 value.
const FORMAT_C4 = 0x20203443
FORMAT_C4 is the format c4 value.
const FORMAT_C8 = 0x20203843
FORMAT_C8 is the format c8 value.
const FORMAT_D1 = 0x20203144
FORMAT_D1 is the format d1 value.
const FORMAT_D2 = 0x20203244
FORMAT_D2 is the format d2 value.
const FORMAT_D4 = 0x20203444
FORMAT_D4 is the format d4 value.
const FORMAT_D8 = 0x20203844
FORMAT_D8 is the format d8 value.
const FORMAT_GR1616 = 0x32335247
FORMAT_GR1616 is the format gr1616 value.
const FORMAT_GR1616F = 0x48205247
FORMAT_GR1616F is the format gr1616f value.
const FORMAT_GR3232F = 0x46205247
FORMAT_GR3232F is the format gr3232f value.
const FORMAT_GR88 = 0x38385247
FORMAT_GR88 is the format gr88 value.
const FORMAT_NV12 = 0x3231564e
FORMAT_NV12 is the format nv12 value.
const FORMAT_NV15 = 0x3531564e
FORMAT_NV15 is the format nv15 value.
const FORMAT_NV16 = 0x3631564e
FORMAT_NV16 is the format nv16 value.
const FORMAT_NV20 = 0x3032564e
FORMAT_NV20 is the format nv20 value.
const FORMAT_NV21 = 0x3132564e
FORMAT_NV21 is the format nv21 value.
const FORMAT_NV24 = 0x3432564e
FORMAT_NV24 is the format nv24 value.
const FORMAT_NV30 = 0x3033564e
FORMAT_NV30 is the format nv30 value.
const FORMAT_NV42 = 0x3234564e
FORMAT_NV42 is the format nv42 value.
const FORMAT_NV61 = 0x3136564e
FORMAT_NV61 is the format nv61 value.
const FORMAT_P010 = 0x30313050
FORMAT_P010 is the format p010 value.
const FORMAT_P012 = 0x32313050
FORMAT_P012 is the format p012 value.
const FORMAT_P016 = 0x36313050
FORMAT_P016 is the format p016 value.
const FORMAT_P030 = 0x30333050
FORMAT_P030 is the format p030 value.
const FORMAT_P210 = 0x30313250
FORMAT_P210 is the format p210 value.
const FORMAT_P230 = 0x30333250
FORMAT_P230 is the format p230 value.
const FORMAT_Q401 = 0x31303451
FORMAT_Q401 is the format q401 value.
const FORMAT_Q410 = 0x30313451
FORMAT_Q410 is the format q410 value.
const FORMAT_R1 = 0x20203152
FORMAT_R1 is the format r1 value.
const FORMAT_R10 = 0x20303152
FORMAT_R10 is the format r10 value.
const FORMAT_R12 = 0x20323152
FORMAT_R12 is the format r12 value.
const FORMAT_R16 = 0x20363152
FORMAT_R16 is the format r16 value.
const FORMAT_R16F = 0x48202052
FORMAT_R16F is the format r16f value.
const FORMAT_R2 = 0x20203252
FORMAT_R2 is the format r2 value.
const FORMAT_R32F = 0x46202052
FORMAT_R32F is the format r32f value.
const FORMAT_R4 = 0x20203452
FORMAT_R4 is the format r4 value.
const FORMAT_R8 = 0x20203852
FORMAT_R8 is the format r8 value.
const FORMAT_RG1616 = 0x32334752
FORMAT_RG1616 is the format rg1616 value.
const FORMAT_RG88 = 0x38384752
FORMAT_RG88 is the format rg88 value.
const FORMAT_RGB161616 = 0x38344752
FORMAT_RGB161616 is the format rgb161616 value.
const FORMAT_RGB332 = 0x38424752
FORMAT_RGB332 is the format rgb332 value.
const FORMAT_RGB565 = 0x36314752
FORMAT_RGB565 is the format rgb565 value.
const FORMAT_RGB565_A8 = 0x38413552
FORMAT_RGB565_A8 is the format rgb565_a8 value.
const FORMAT_RGB888 = 0x34324752
FORMAT_RGB888 is the format rgb888 value.
const FORMAT_RGB888_A8 = 0x38413852
FORMAT_RGB888_A8 is the format rgb888_a8 value.
const FORMAT_RGBA1010102 = 0x30334152
FORMAT_RGBA1010102 is the format rgba1010102 value.
const FORMAT_RGBA4444 = 0x32314152
FORMAT_RGBA4444 is the format rgba4444 value.
const FORMAT_RGBA5551 = 0x35314152
FORMAT_RGBA5551 is the format rgba5551 value.
const FORMAT_RGBA8888 = 0x34324152
FORMAT_RGBA8888 is the format rgba8888 value.
const FORMAT_RGBX1010102 = 0x30335852
FORMAT_RGBX1010102 is the format rgbx1010102 value.
const FORMAT_RGBX4444 = 0x32315852
FORMAT_RGBX4444 is the format rgbx4444 value.
const FORMAT_RGBX5551 = 0x35315852
FORMAT_RGBX5551 is the format rgbx5551 value.
const FORMAT_RGBX8888 = 0x34325852
FORMAT_RGBX8888 is the format rgbx8888 value.
const FORMAT_RGBX8888_A8 = 0x38415852
FORMAT_RGBX8888_A8 is the format rgbx8888_a8 value.
const FORMAT_S010 = 0x30313053
FORMAT_S010 is the format s010 value.
const FORMAT_S012 = 0x32313053
FORMAT_S012 is the format s012 value.
const FORMAT_S016 = 0x36313053
FORMAT_S016 is the format s016 value.
const FORMAT_S210 = 0x30313253
FORMAT_S210 is the format s210 value.
const FORMAT_S212 = 0x32313253
FORMAT_S212 is the format s212 value.
const FORMAT_S216 = 0x36313253
FORMAT_S216 is the format s216 value.
const FORMAT_S410 = 0x30313453
FORMAT_S410 is the format s410 value.
const FORMAT_S412 = 0x32313453
FORMAT_S412 is the format s412 value.
const FORMAT_S416 = 0x36313453
FORMAT_S416 is the format s416 value.
const FORMAT_T430 = 0x30333454
FORMAT_T430 is the format t430 value.
const FORMAT_UYVY = 0x59565955
FORMAT_UYVY is the format uyvy value.
const FORMAT_VUY101010 = 0x30335556
FORMAT_VUY101010 is the format vuy101010 value.
const FORMAT_VUY888 = 0x34325556
FORMAT_VUY888 is the format vuy888 value.
const FORMAT_VYUY = 0x59555956
FORMAT_VYUY is the format vyuy value.
const FORMAT_X0L0 = 0x304c3058
FORMAT_X0L0 is the format x0l0 value.
const FORMAT_X0L2 = 0x324c3058
FORMAT_X0L2 is the format x0l2 value.
const FORMAT_XBGR1555 = 0x35314258
FORMAT_XBGR1555 is the format xbgr1555 value.
const FORMAT_XBGR16161616 = 0x38344258
FORMAT_XBGR16161616 is the format xbgr16161616 value.
const FORMAT_XBGR16161616F = 0x48344258
FORMAT_XBGR16161616F is the format xbgr16161616f value.
const FORMAT_XBGR2101010 = 0x30334258
FORMAT_XBGR2101010 is the format xbgr2101010 value.
const FORMAT_XBGR4444 = 0x32314258
FORMAT_XBGR4444 is the format xbgr4444 value.
const FORMAT_XBGR8888 = 0x34324258
FORMAT_XBGR8888 is the format xbgr8888 value.
const FORMAT_XBGR8888_A8 = 0x38414258
FORMAT_XBGR8888_A8 is the format xbgr8888_a8 value.
const FORMAT_XRGB1555 = 0x35315258
FORMAT_XRGB1555 is the format xrgb1555 value.
const FORMAT_XRGB16161616 = 0x38345258
FORMAT_XRGB16161616 is the format xrgb16161616 value.
const FORMAT_XRGB16161616F = 0x48345258
FORMAT_XRGB16161616F is the format xrgb16161616f value.
const FORMAT_XRGB2101010 = 0x30335258
FORMAT_XRGB2101010 is the format xrgb2101010 value.
const FORMAT_XRGB4444 = 0x32315258
FORMAT_XRGB4444 is the format xrgb4444 value.
const FORMAT_XRGB8888 = 1
FORMAT_XRGB8888 is the format xrgb8888 value.
const FORMAT_XRGB8888_A8 = 0x38415258
FORMAT_XRGB8888_A8 is the format xrgb8888_a8 value.
const FORMAT_XVUY2101010 = 0x30335958
FORMAT_XVUY2101010 is the format xvuy2101010 value.
const FORMAT_XVUY8888 = 0x59555658
FORMAT_XVUY8888 is the format xvuy8888 value.
const FORMAT_XVYU12_16161616 = 0x36335658
FORMAT_XVYU12_16161616 is the format xvyu12_16161616 value.
const FORMAT_XVYU16161616 = 0x38345658
FORMAT_XVYU16161616 is the format xvyu16161616 value.
const FORMAT_XVYU2101010 = 0x30335658
FORMAT_XVYU2101010 is the format xvyu2101010 value.
const FORMAT_XYUV8888 = 0x56555958
FORMAT_XYUV8888 is the format xyuv8888 value.
const FORMAT_XYYY2101010 = 0x34415059
FORMAT_XYYY2101010 is the format xyyy2101010 value.
const FORMAT_Y0L0 = 0x304c3059
FORMAT_Y0L0 is the format y0l0 value.
const FORMAT_Y0L2 = 0x324c3059
FORMAT_Y0L2 is the format y0l2 value.
const FORMAT_Y210 = 0x30313259
FORMAT_Y210 is the format y210 value.
const FORMAT_Y212 = 0x32313259
FORMAT_Y212 is the format y212 value.
const FORMAT_Y216 = 0x36313259
FORMAT_Y216 is the format y216 value.
const FORMAT_Y410 = 0x30313459
FORMAT_Y410 is the format y410 value.
const FORMAT_Y412 = 0x32313459
FORMAT_Y412 is the format y412 value.
const FORMAT_Y416 = 0x36313459
FORMAT_Y416 is the format y416 value.
const FORMAT_Y8 = 0x59455247
FORMAT_Y8 is the format y8 value.
const FORMAT_YUV410 = 0x39565559
FORMAT_YUV410 is the format yuv410 value.
const FORMAT_YUV411 = 0x31315559
FORMAT_YUV411 is the format yuv411 value.
const FORMAT_YUV420 = 0x32315559
FORMAT_YUV420 is the format yuv420 value.
const FORMAT_YUV420_10BIT = 0x30315559
FORMAT_YUV420_10BIT is the format yuv420_10bit value.
const FORMAT_YUV420_8BIT = 0x38305559
FORMAT_YUV420_8BIT is the format yuv420_8bit value.
const FORMAT_YUV422 = 0x36315559
FORMAT_YUV422 is the format yuv422 value.
const FORMAT_YUV444 = 0x34325559
FORMAT_YUV444 is the format yuv444 value.
const FORMAT_YUYV = 0x56595559
FORMAT_YUYV is the format yuyv value.
const FORMAT_YVU410 = 0x39555659
FORMAT_YVU410 is the format yvu410 value.
const FORMAT_YVU411 = 0x31315659
FORMAT_YVU411 is the format yvu411 value.
const FORMAT_YVU420 = 0x32315659
FORMAT_YVU420 is the format yvu420 value.
const FORMAT_YVU422 = 0x36315659
FORMAT_YVU422 is the format yvu422 value.
const FORMAT_YVU444 = 0x34325659
FORMAT_YVU444 is the format yvu444 value.
const FORMAT_YVYU = 0x55595659
FORMAT_YVYU is the format yvyu value.
const FULLSCREEN_METHOD_DEFAULT = 0
FULLSCREEN_METHOD_DEFAULT is the fullscreen_method default value.
const FULLSCREEN_METHOD_DRIVER = 2
FULLSCREEN_METHOD_DRIVER is the fullscreen_method driver value.
const FULLSCREEN_METHOD_FILL = 3
FULLSCREEN_METHOD_FILL is the fullscreen_method fill value.
const FULLSCREEN_METHOD_SCALE = 1
FULLSCREEN_METHOD_SCALE is the fullscreen_method scale value.
const FixesInterface = "wl_fixes"
FixesInterface is the protocol interface name.
const KEYMAP_FORMAT_NO_KEYMAP = 0
KEYMAP_FORMAT_NO_KEYMAP is the keymap_format no_keymap value.
const KEYMAP_FORMAT_XKB_V1 = 1
KEYMAP_FORMAT_XKB_V1 is the keymap_format xkb_v1 value.
const KEY_STATE_PRESSED = 1
KEY_STATE_PRESSED is the key_state pressed value.
const KEY_STATE_RELEASED = 0
KEY_STATE_RELEASED is the key_state released value.
const KEY_STATE_REPEATED = 2
KEY_STATE_REPEATED is the key_state repeated value.
const KeyboardInterface = "wl_keyboard"
KeyboardInterface is the protocol interface name.
const MODE_CURRENT = 0x1
MODE_CURRENT is the mode current value.
const MODE_PREFERRED = 0x2
MODE_PREFERRED is the mode preferred value.
const OutputInterface = "wl_output"
OutputInterface is the protocol interface name.
const PointerInterface = "wl_pointer"
PointerInterface is the protocol interface name.
const RESIZE_BOTTOM = 2
RESIZE_BOTTOM is the resize bottom value.
const RESIZE_BOTTOM_LEFT = 6
RESIZE_BOTTOM_LEFT is the resize bottom_left value.
const RESIZE_BOTTOM_RIGHT = 10
RESIZE_BOTTOM_RIGHT is the resize bottom_right value.
const RESIZE_LEFT = 4
RESIZE_LEFT is the resize left value.
const RESIZE_NONE = 0
RESIZE_NONE is the resize none value.
const RESIZE_RIGHT = 8
RESIZE_RIGHT is the resize right value.
const RESIZE_TOP = 1
RESIZE_TOP is the resize top value.
const RESIZE_TOP_LEFT = 5
RESIZE_TOP_LEFT is the resize top_left value.
const RESIZE_TOP_RIGHT = 9
RESIZE_TOP_RIGHT is the resize top_right value.
const RegionInterface = "wl_region"
RegionInterface is the protocol interface name.
const SUBPIXEL_HORIZONTAL_BGR = 3
SUBPIXEL_HORIZONTAL_BGR is the subpixel horizontal_bgr value.
const SUBPIXEL_HORIZONTAL_RGB = 2
SUBPIXEL_HORIZONTAL_RGB is the subpixel horizontal_rgb value.
const SUBPIXEL_NONE = 1
SUBPIXEL_NONE is the subpixel none value.
const SUBPIXEL_UNKNOWN = 0
SUBPIXEL_UNKNOWN is the subpixel unknown value.
const SUBPIXEL_VERTICAL_BGR = 5
SUBPIXEL_VERTICAL_BGR is the subpixel vertical_bgr value.
const SUBPIXEL_VERTICAL_RGB = 4
SUBPIXEL_VERTICAL_RGB is the subpixel vertical_rgb value.
const SeatInterface = "wl_seat"
SeatInterface is the protocol interface name.
const ShellInterface = "wl_shell"
ShellInterface is the protocol interface name.
const ShellSurfaceInterface = "wl_shell_surface"
ShellSurfaceInterface is the protocol interface name.
const ShmInterface = "wl_shm"
ShmInterface is the protocol interface name.
const ShmPoolInterface = "wl_shm_pool"
ShmPoolInterface is the protocol interface name.
const SubcompositorInterface = "wl_subcompositor"
SubcompositorInterface is the protocol interface name.
const SubsurfaceInterface = "wl_subsurface"
SubsurfaceInterface is the protocol interface name.
const SurfaceInterface = "wl_surface"
SurfaceInterface is the protocol interface name.
const TRANSFORM_180 = 2
TRANSFORM_180 is the transform 180 value.
const TRANSFORM_270 = 3
TRANSFORM_270 is the transform 270 value.
const TRANSFORM_90 = 1
TRANSFORM_90 is the transform 90 value.
const TRANSFORM_FLIPPED = 4
TRANSFORM_FLIPPED is the transform flipped value.
const TRANSFORM_FLIPPED_180 = 6
TRANSFORM_FLIPPED_180 is the transform flipped_180 value.
const TRANSFORM_FLIPPED_270 = 7
TRANSFORM_FLIPPED_270 is the transform flipped_270 value.
const TRANSFORM_FLIPPED_90 = 5
TRANSFORM_FLIPPED_90 is the transform flipped_90 value.
const TRANSFORM_NORMAL = 0
TRANSFORM_NORMAL is the transform normal value.
const TRANSIENT_INACTIVE = 0x1
TRANSIENT_INACTIVE is the transient inactive value.
const TouchInterface = "wl_touch"
TouchInterface is the protocol interface name.
const WL_DATA_DEVICE_ERROR_ROLE = 0
WL_DATA_DEVICE_ERROR_ROLE is the error role value.
const WL_DATA_OFFER_ERROR_INVALID_ACTION_MASK = 1
WL_DATA_OFFER_ERROR_INVALID_ACTION_MASK is the error invalid_action_mask value.
const WL_DATA_SOURCE_ERROR_INVALID_ACTION_MASK = 0
WL_DATA_SOURCE_ERROR_INVALID_ACTION_MASK is the error invalid_action_mask value.
const WL_POINTER_ERROR_ROLE = 0
WL_POINTER_ERROR_ROLE is the error role value.
const WL_SHELL_ERROR_ROLE = 0
WL_SHELL_ERROR_ROLE is the error role value.
const WL_SHM_ERROR_INVALID_FORMAT = 0
WL_SHM_ERROR_INVALID_FORMAT is the error invalid_format value.
const WL_SHM_ERROR_INVALID_STRIDE = 1
WL_SHM_ERROR_INVALID_STRIDE is the error invalid_stride value.
const WL_SHM_POOL_ERROR_INVALID_FORMAT = 0
WL_SHM_POOL_ERROR_INVALID_FORMAT is the error invalid_format value.
const WL_SHM_POOL_ERROR_INVALID_STRIDE = 1
WL_SHM_POOL_ERROR_INVALID_STRIDE is the error invalid_stride value.
const WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE = 0
WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE is the error bad_surface value.
const WL_SUBSURFACE_ERROR_BAD_SURFACE = 0
WL_SUBSURFACE_ERROR_BAD_SURFACE is the error bad_surface value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
Buffer is the generated binding for wl_buffer version 1.
func (*Buffer) Destroy ¶
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) Dispatch ¶
Dispatch decodes one event on wl_buffer and calls the registered handlers.
func (*Buffer) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
type Callback ¶
Callback is the generated binding for wl_callback version 1.
func NewCallback ¶
NewCallback returns an unbound Callback.
func (*Callback) Dispatch ¶
Dispatch decodes one event on wl_callback and calls the registered handlers.
func (*Callback) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
type Compositor ¶
Compositor is the generated binding for wl_compositor version 7.
func NewCompositor ¶
func NewCompositor(ctx *wl.Context) *Compositor
NewCompositor returns an unbound Compositor.
func (*Compositor) CreateRegion ¶
func (o *Compositor) CreateRegion() (*Region, error)
Ask the compositor to create a new region.
func (*Compositor) CreateSurface ¶
func (o *Compositor) CreateSurface() (*Surface, error)
Ask the compositor to create a new surface.
func (*Compositor) Dispatch ¶
func (o *Compositor) Dispatch(event *wl.Event)
Dispatch decodes one event on wl_compositor and calls the registered handlers.
func (*Compositor) EventSignature ¶
func (o *Compositor) EventSignature(opcode uint16) (string, bool)
EventSignature returns the declared event argument types in wire order.
func (*Compositor) Release ¶
func (o *Compositor) Release() error
This request destroys the wl_compositor. This has no effect on any other objects.
type DataDevice ¶
DataDevice is the generated binding for wl_data_device version 4.
func NewDataDevice ¶
func NewDataDevice(ctx *wl.Context) *DataDevice
NewDataDevice returns an unbound DataDevice.
func (*DataDevice) Dispatch ¶
func (o *DataDevice) Dispatch(event *wl.Event)
Dispatch decodes one event on wl_data_device and calls the registered handlers.
func (*DataDevice) EventSignature ¶
func (o *DataDevice) EventSignature(opcode uint16) (string, bool)
EventSignature returns the declared event argument types in wire order.
func (*DataDevice) OnDataOffer ¶
func (o *DataDevice) OnDataOffer(handler func(idObject *DataOffer))
OnDataOffer registers a handler for the data_offer event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataDevice) OnDrop ¶
func (o *DataDevice) OnDrop(handler func())
OnDrop registers a handler for the drop event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataDevice) OnEnter ¶
func (o *DataDevice) OnEnter(handler func(serial uint32, surfaceID uint32, x wl.Fixed, y wl.Fixed, idID uint32))
OnEnter registers a handler for the enter event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataDevice) OnLeave ¶
func (o *DataDevice) OnLeave(handler func())
OnLeave registers a handler for the leave event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataDevice) OnMotion ¶
OnMotion registers a handler for the motion event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataDevice) OnSelection ¶
func (o *DataDevice) OnSelection(handler func(idID uint32))
OnSelection registers a handler for the selection event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataDevice) Release ¶
func (o *DataDevice) Release() error
This request destroys the data device.
func (*DataDevice) SetSelection ¶
func (o *DataDevice) SetSelection(source *DataSource, serial uint32) error
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. The given source may not be used in any further set_selection or start_drag requests. Attempting to reuse a previously-used source may send a used_source error.
func (*DataDevice) StartDrag ¶
func (o *DataDevice) StartDrag(source *DataSource, origin *Surface, icon *Surface, serial uint32) error
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.offset requests 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 input region is ignored for wl_surfaces with the role of a drag-and-drop icon. The given source may not be used in any further set_selection or start_drag requests. Attempting to reuse a previously-used source may send a used_source error.
type DataDeviceManager ¶
DataDeviceManager is the generated binding for wl_data_device_manager version 4.
func NewDataDeviceManager ¶
func NewDataDeviceManager(ctx *wl.Context) *DataDeviceManager
NewDataDeviceManager returns an unbound DataDeviceManager.
func (*DataDeviceManager) CreateDataSource ¶
func (o *DataDeviceManager) CreateDataSource() (*DataSource, error)
Create a new data source.
func (*DataDeviceManager) Dispatch ¶
func (o *DataDeviceManager) Dispatch(event *wl.Event)
Dispatch decodes one event on wl_data_device_manager and calls the registered handlers.
func (*DataDeviceManager) EventSignature ¶
func (o *DataDeviceManager) EventSignature(opcode uint16) (string, bool)
EventSignature returns the declared event argument types in wire order.
func (*DataDeviceManager) GetDataDevice ¶
func (o *DataDeviceManager) GetDataDevice(seat *Seat) (*DataDevice, error)
Create a new data device for a given seat.
func (*DataDeviceManager) Release ¶
func (o *DataDeviceManager) Release() error
This request destroys the wl_data_device_manager. This has no effect on any other objects.
type DataOffer ¶
DataOffer is the generated binding for wl_data_offer version 4.
func NewDataOffer ¶
NewDataOffer returns an unbound DataOffer.
func (*DataOffer) Accept ¶
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) Dispatch ¶
Dispatch decodes one event on wl_data_offer and calls the registered handlers.
func (*DataOffer) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
func (*DataOffer) Finish ¶
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) OnAction ¶
OnAction registers a handler for the action event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataOffer) OnOffer ¶
OnOffer registers a handler for the offer event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataOffer) OnSourceActions ¶
OnSourceActions registers a handler for the source_actions event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataOffer) Receive ¶
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) SetActions ¶
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 DataSource ¶
DataSource is the generated binding for wl_data_source version 4.
func NewDataSource ¶
func NewDataSource(ctx *wl.Context) *DataSource
NewDataSource returns an unbound DataSource.
func (*DataSource) Dispatch ¶
func (o *DataSource) Dispatch(event *wl.Event)
Dispatch decodes one event on wl_data_source and calls the registered handlers.
func (*DataSource) EventSignature ¶
func (o *DataSource) EventSignature(opcode uint16) (string, bool)
EventSignature returns the declared event argument types in wire order.
func (*DataSource) Offer ¶
func (o *DataSource) Offer(mimeType string) error
This request adds a mime type to the set of mime types advertised to targets. Can be called several times to offer multiple types.
func (*DataSource) OnAction ¶
func (o *DataSource) OnAction(handler func(dndAction uint32))
OnAction registers a handler for the action event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataSource) OnCancelled ¶
func (o *DataSource) OnCancelled(handler func())
OnCancelled registers a handler for the cancelled event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataSource) OnDndDropPerformed ¶
func (o *DataSource) OnDndDropPerformed(handler func())
OnDndDropPerformed registers a handler for the dnd_drop_performed event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataSource) OnDndFinished ¶
func (o *DataSource) OnDndFinished(handler func())
OnDndFinished registers a handler for the dnd_finished event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataSource) OnSend ¶
func (o *DataSource) OnSend(handler func(mimeType string, fd *wl.OwnedFD))
OnSend registers a handler for the send event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataSource) OnTarget ¶
func (o *DataSource) OnTarget(handler func(mimeType string))
OnTarget registers a handler for the target event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*DataSource) SetActions ¶
func (o *DataSource) SetActions(dndActions uint32) error
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 Fixes ¶
Fixes is the generated binding for wl_fixes version 2.
func (*Fixes) AckGlobalRemove ¶
Acknowledge the removal of the specified global. If no global with the specified name exists or the global is not removed, the wl_fixes.invalid_ack_remove protocol error will be posted. Due to the Wayland protocol being asynchronous, the wl_global objects cannot be destroyed immediately. For example, if a wl_global is removed and a client attempts to bind that global around same time, it can result in a protocol error due to an unknown global name in the bind request. In order to avoid crashing clients, the compositor should remove the wl_global once it is guaranteed that no more bind requests will come. The wl_fixes.ack_global_remove() request is used to signal to the compositor that the client will not bind the given global anymore. After all clients acknowledge the removal of the global, the compositor can safely destroy it. The client must call the wl_fixes.ack_global_remove() request in response to a wl_registry.global_remove() event even if it did not bind the corresponding global.
func (*Fixes) DestroyRegistry ¶
This request destroys a wl_registry object. The client should no longer use the wl_registry after making this request. The compositor will emit a wl_display.delete_id event with the object ID of the registry and will no longer emit any events on the registry. The client should re-use the object ID once it receives the wl_display.delete_id event.
type Keyboard ¶
Keyboard is the generated binding for wl_keyboard version 11.
func NewKeyboard ¶
NewKeyboard returns an unbound Keyboard.
func (*Keyboard) Dispatch ¶
Dispatch decodes one event on wl_keyboard and calls the registered handlers.
func (*Keyboard) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
func (*Keyboard) OnEnter ¶
OnEnter registers a handler for the enter event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Keyboard) OnKey ¶
OnKey registers a handler for the key event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Keyboard) OnKeymap ¶
OnKeymap registers a handler for the keymap event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Keyboard) OnLeave ¶
OnLeave registers a handler for the leave event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Keyboard) OnModifiers ¶
func (o *Keyboard) OnModifiers(handler func(serial uint32, modsDepressed uint32, modsLatched uint32, modsLocked uint32, group uint32))
OnModifiers registers a handler for the modifiers event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Keyboard) OnRepeatInfo ¶
OnRepeatInfo registers a handler for the repeat_info event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
type Output ¶
Output is the generated binding for wl_output version 4.
func (*Output) Dispatch ¶
Dispatch decodes one event on wl_output and calls the registered handlers.
func (*Output) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
func (*Output) OnDescription ¶
OnDescription registers a handler for the description event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Output) OnDone ¶
func (o *Output) OnDone(handler func())
OnDone registers a handler for the done event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Output) OnGeometry ¶
func (o *Output) OnGeometry(handler func(x int32, y int32, physicalWidth int32, physicalHeight int32, subpixel int32, make string, model string, transform int32))
OnGeometry registers a handler for the geometry event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Output) OnMode ¶
OnMode registers a handler for the mode event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Output) OnName ¶
OnName registers a handler for the name event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
type Pointer ¶
Pointer is the generated binding for wl_pointer version 11.
func (*Pointer) Dispatch ¶
Dispatch decodes one event on wl_pointer and calls the registered handlers.
func (*Pointer) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
func (*Pointer) OnAxis ¶
OnAxis registers a handler for the axis event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnAxisDiscrete ¶
OnAxisDiscrete registers a handler for the axis_discrete event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnAxisRelativeDirection ¶
OnAxisRelativeDirection registers a handler for the axis_relative_direction event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnAxisSource ¶
OnAxisSource registers a handler for the axis_source event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnAxisStop ¶
OnAxisStop registers a handler for the axis_stop event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnAxisValue120 ¶
OnAxisValue120 registers a handler for the axis_value120 event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnButton ¶
OnButton registers a handler for the button event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnEnter ¶
func (o *Pointer) OnEnter(handler func(serial uint32, surfaceID uint32, surfaceX wl.Fixed, surfaceY wl.Fixed))
OnEnter registers a handler for the enter event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnFrame ¶
func (o *Pointer) OnFrame(handler func())
OnFrame registers a handler for the frame event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnLeave ¶
OnLeave registers a handler for the leave event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnMotion ¶
OnMotion registers a handler for the motion event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) OnWarp ¶
OnWarp registers a handler for the warp event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Pointer) Release ¶
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) SetCursor ¶
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 wl_surface.offset requests to the pointer surface, hotspot_x and hotspot_y are decremented by the x and y parameters passed to the request. The offset must be applied 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 input region is ignored for wl_surfaces with the role of a cursor. When the use as a cursor ends, the wl_surface is unmapped. The serial parameter must match the latest wl_pointer.enter serial number sent to the client. Otherwise the request will be ignored.
type Region ¶
Region is the generated binding for wl_region version 7.
func (*Region) Dispatch ¶
Dispatch decodes one event on wl_region and calls the registered handlers.
func (*Region) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
type Seat ¶
Seat is the generated binding for wl_seat version 11.
func (*Seat) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
func (*Seat) GetKeyboard ¶
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 ¶
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 ¶
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) OnCapabilities ¶
OnCapabilities registers a handler for the capabilities event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
type Shell ¶
Shell is the generated binding for wl_shell version 1.
func (*Shell) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
func (*Shell) GetShellSurface ¶
func (o *Shell) GetShellSurface(surface *Surface) (*ShellSurface, error)
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 ¶
ShellSurface is the generated binding for wl_shell_surface version 1.
func NewShellSurface ¶
func NewShellSurface(ctx *wl.Context) *ShellSurface
NewShellSurface returns an unbound ShellSurface.
func (*ShellSurface) Dispatch ¶
func (o *ShellSurface) Dispatch(event *wl.Event)
Dispatch decodes one event on wl_shell_surface and calls the registered handlers.
func (*ShellSurface) EventSignature ¶
func (o *ShellSurface) EventSignature(opcode uint16) (string, bool)
EventSignature returns the declared event argument types in wire order.
func (*ShellSurface) Move ¶
func (o *ShellSurface) Move(seat *Seat, serial uint32) error
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) OnConfigure ¶
func (o *ShellSurface) OnConfigure(handler func(edges uint32, width int32, height int32))
OnConfigure registers a handler for the configure event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*ShellSurface) OnPing ¶
func (o *ShellSurface) OnPing(handler func(serial uint32))
OnPing registers a handler for the ping event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*ShellSurface) OnPopupDone ¶
func (o *ShellSurface) OnPopupDone(handler func())
OnPopupDone registers a handler for the popup_done event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*ShellSurface) Pong ¶
func (o *ShellSurface) Pong(serial uint32) error
A client must respond to a ping event with a pong request or the client may be deemed unresponsive.
func (*ShellSurface) Resize ¶
func (o *ShellSurface) Resize(seat *Seat, serial uint32, edges uint32) error
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 (o *ShellSurface) SetClass(class string) error
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 (o *ShellSurface) SetFullscreen(method uint32, framerate uint32, output *Output) error
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 (o *ShellSurface) SetMaximized(output *Output) error
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 (o *ShellSurface) SetPopup(seat *Seat, serial uint32, parent *Surface, x int32, y int32, flags uint32) error
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 (o *ShellSurface) SetTitle(title string) error
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 (o *ShellSurface) SetToplevel() error
Map the surface as a toplevel surface. A toplevel surface is not fullscreen, maximized or transient.
func (*ShellSurface) SetTransient ¶
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 Shm ¶
Shm is the generated binding for wl_shm version 3.
func (*Shm) CreatePool ¶
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) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
type ShmPool ¶
ShmPool is the generated binding for wl_shm_pool version 3.
func (*ShmPool) CreateBuffer ¶
func (o *ShmPool) CreateBuffer(offset int32, width int32, height int32, stride int32, format uint32) (*Buffer, error)
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 the shared memory pool. The mmapped memory will be released when all buffers that have been created from this pool are gone.
func (*ShmPool) Dispatch ¶
Dispatch decodes one event on wl_shm_pool and calls the registered handlers.
func (*ShmPool) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
func (*ShmPool) Resize ¶
This request will cause the server to remap the backing memory for the pool from the file descriptor passed when the pool was created, but using the new size. This request can only be used to make the pool bigger. This request only changes the amount of bytes that are mmapped by the server and does not touch the file corresponding to the file descriptor passed at creation time. It is the client's responsibility to ensure that the file is at least as big as the new pool size.
type Subcompositor ¶
Subcompositor is the generated binding for wl_subcompositor version 1.
func NewSubcompositor ¶
func NewSubcompositor(ctx *wl.Context) *Subcompositor
NewSubcompositor returns an unbound Subcompositor.
func (*Subcompositor) Destroy ¶
func (o *Subcompositor) Destroy() error
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) Dispatch ¶
func (o *Subcompositor) Dispatch(event *wl.Event)
Dispatch decodes one event on wl_subcompositor and calls the registered handlers.
func (*Subcompositor) EventSignature ¶
func (o *Subcompositor) EventSignature(opcode uint16) (string, bool)
EventSignature returns the declared event argument types in wire order.
func (*Subcompositor) GetSubsurface ¶
func (o *Subcompositor) GetSubsurface(surface *Surface, parent *Surface) (*Subsurface, error)
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 the bad_surface 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. The parent surface must not be one of the child surface's descendants, and the parent must be different from the child surface, otherwise the bad_parent protocol error is raised. This request modifies the behaviour of wl_surface.commit request on the sub-surface, see the documentation on wl_subsurface interface.
type Subsurface ¶
Subsurface is the generated binding for wl_subsurface version 1.
func NewSubsurface ¶
func NewSubsurface(ctx *wl.Context) *Subsurface
NewSubsurface returns an unbound Subsurface.
func (*Subsurface) Destroy ¶
func (o *Subsurface) Destroy() error
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. The wl_surface is unmapped immediately.
func (*Subsurface) Dispatch ¶
func (o *Subsurface) Dispatch(event *wl.Event)
Dispatch decodes one event on wl_subsurface and calls the registered handlers.
func (*Subsurface) EventSignature ¶
func (o *Subsurface) EventSignature(opcode uint16) (string, bool)
EventSignature returns the declared event argument types in wire order.
func (*Subsurface) PlaceAbove ¶
func (o *Subsurface) PlaceAbove(sibling *Surface) error
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. A new sub-surface is initially added as the top-most in the stack of its siblings and parent. Z-order is double-buffered state on the parent surface, see wl_subsurface and wl_surface.commit for more information.
func (*Subsurface) PlaceBelow ¶
func (o *Subsurface) PlaceBelow(sibling *Surface) error
The sub-surface is placed just below the reference surface. See wl_subsurface.place_above.
func (*Subsurface) SetDesync ¶
func (o *Subsurface) SetDesync() error
Change the commit behaviour of the sub-surface to desynchronized mode. See wl_subsurface and wl_surface.commit for more information.
func (*Subsurface) SetPosition ¶
func (o *Subsurface) SetPosition(x int32, y int32) error
This sets the position of the sub-surface, relative to the parent surface. 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 initial position is 0, 0. Position is double-buffered state on the parent surface, see wl_subsurface and wl_surface.commit for more information.
func (*Subsurface) SetSync ¶
func (o *Subsurface) SetSync() error
Change the commit behaviour of the sub-surface to synchronized mode. See wl_subsurface and wl_surface.commit for more information.
type Surface ¶
Surface is the generated binding for wl_surface version 7.
func (*Surface) Attach ¶
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. Setting anything other than 0 as x and y arguments is discouraged, and should instead be replaced with using the separate wl_surface.offset request. When the bound wl_surface version is 5 or higher, passing any non-zero x or y is a protocol violation, and will result in an 'invalid_offset' error being raised. The x and y arguments are ignored and do not change the pending state. To achieve equivalent semantics, use wl_surface.offset. 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. Instead, clients hitting this case should use wl_surface.get_release or use a protocol extension providing per-commit release notifications (if none of these options are available, a fallback can be implemented by creating multiple wl_buffer objects from the same backing storage). Destroying the wl_buffer after wl_buffer.release does not change the surface contents. Destroying the wl_buffer before wl_buffer.release is allowed as long as the underlying buffer storage isn't re-used (this can happen e.g. on client process termination). However, if the client destroys the wl_buffer before receiving the wl_buffer.release event and mutates the underlying buffer storage, 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. If a pending wl_buffer has been destroyed, the result is not specified. Many compositors are known to remove the surface content on the following wl_surface.commit, but this behaviour is not universal. Clients seeking to maximise compatibility should not destroy pending buffers and should ensure that they explicitly remove content from surfaces, even after destroying buffers.
func (*Surface) Commit ¶
Surface state (input, opaque, and damage regions, attached buffers, etc.) is double-buffered. Protocol requests modify the pending state, as opposed to the active state in use by the compositor. 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. A commit request atomically creates a Content Update (CU) from the pending state, even if the pending state has not been touched. The content update is placed at the end of a per-surface queue until it becomes active. After commit, the new pending state is as documented for each related request. A CU is either a Desync Content Update (DCU) or a Sync Content Update (SCU). If the surface is effectively synchronized at the commit request, it is a SCU, otherwise a DCU. When a surface transitions from effectively synchronized to effectively desynchronized, all SCUs in its queue which are not reachable by any DCU become DCUs and dependency edges from outside the queue to these CUs are removed. See wl_subsurface for the definition of 'effectively synchronized' and 'effectively desynchronized'. When a CU is placed in the queue, the CU has a dependency on the CU in front of it and to the SCU at end of the queue of every direct child surface if that SCU exists and does not have another dependent. This can form a directed acyclic graph of CUs with dependencies as edges. In addition to surface state, the CU can have constraints that must be satisfied before it can be applied. Other interfaces may add CU constraints. All DCUs which do not have a SCU in front of themselves in their queue, are candidates. If the graph that's reachable by a candidate does not have any unsatisfied constraints, the entire graph must be applied atomically. When a CU is applied, the wl_buffer is applied before all other state. This means that all coordinates in double-buffered state are relative to the newly attached wl_buffers, except for wl_surface.attach itself. If there is no newly attached wl_buffer, the coordinates are relative to the previous content update.
func (*Surface) Damage ¶
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 ¶
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) Dispatch ¶
Dispatch decodes one event on wl_surface and calls the registered handlers.
func (*Surface) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
func (*Surface) Frame ¶
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) GetRelease ¶
Create a callback for the release of the buffer attached by the client with wl_surface.attach. The compositor will release the buffer when it has finished its usage of the underlying storage for the relevant commit. Once the client receives this event, and assuming the associated buffer is not pending release from other wl_surface.commit requests, the client can safely re-use the buffer. Release callbacks are double-buffered state, and will be associated with the pending buffer at wl_surface.commit time. The callback_data passed in the wl_callback.done event is unused and is always zero. Sending this request without attaching a non-null buffer in the same content update is a protocol error. The compositor will send the no_buffer error in this case.
func (*Surface) Offset ¶
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. The exact semantics of wl_surface.offset are role-specific. Refer to the documentation of specific roles for more information. Surface location offset is double-buffered state, see wl_surface.commit. This request is semantically equivalent to and the replaces the x and y arguments in the wl_surface.attach request in wl_surface versions prior to 5. See wl_surface.attach for details.
func (*Surface) OnEnter ¶
OnEnter registers a handler for the enter event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Surface) OnLeave ¶
OnLeave registers a handler for the leave event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Surface) OnPreferredBufferScale ¶
OnPreferredBufferScale registers a handler for the preferred_buffer_scale event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Surface) OnPreferredBufferTransform ¶
OnPreferredBufferTransform registers a handler for the preferred_buffer_transform event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Surface) SetBufferScale ¶
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 greater than 0 the invalid_scale protocol error is raised.
func (*Surface) SetBufferTransform ¶
This request sets the transformation that the client has already applied to the content of the buffer. The accepted values for the transform parameter are the values for wl_output.transform. The compositor applies the inverse of this transformation whenever it uses the buffer contents. 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 ¶
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 ¶
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 Touch ¶
Touch is the generated binding for wl_touch version 11.
func (*Touch) EventSignature ¶
EventSignature returns the declared event argument types in wire order.
func (*Touch) OnCancel ¶
func (o *Touch) OnCancel(handler func())
OnCancel registers a handler for the cancel event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Touch) OnDown ¶
func (o *Touch) OnDown(handler func(serial uint32, time uint32, surfaceID uint32, id int32, x wl.Fixed, y wl.Fixed))
OnDown registers a handler for the down event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Touch) OnFrame ¶
func (o *Touch) OnFrame(handler func())
OnFrame registers a handler for the frame event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Touch) OnMotion ¶
OnMotion registers a handler for the motion event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Touch) OnOrientation ¶
OnOrientation registers a handler for the orientation event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.
func (*Touch) OnShape ¶
OnShape registers a handler for the shape event.
Handlers are appended, so a second call adds another handler rather than replacing the first. Registration is safe while another goroutine dispatches.