wl

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 12 Imported by: 3

Documentation

Overview

Package wl implements the stable Wayland protocol

Package wl implements the wayland protocol

Index

Constants

View Source
const BufferDestroySinceVersion = 1
View Source
const BufferReleaseSinceVersion = 1
View Source
const CallbackDoneSinceVersion = 1
View Source
const CompositorCreateRegionSinceVersion = 1
View Source
const CompositorCreateSurfaceSinceVersion = 1
View Source
const DataDeviceDataOfferSinceVersion = 1
View Source
const DataDeviceDropSinceVersion = 1
View Source
const DataDeviceEnterSinceVersion = 1
View Source
const DataDeviceErrorRole = 0

DataDeviceErrorRole means given wl_surface has another role

View Source
const DataDeviceErrorUsedSource = 1

DataDeviceErrorUsedSource means source has already been used

View Source
const DataDeviceLeaveSinceVersion = 1
View Source
const DataDeviceManagerCreateDataSourceSinceVersion = 1
View Source
const DataDeviceManagerDndActionAsk = 4

DataDeviceManagerDndActionAsk means ask action

View Source
const DataDeviceManagerDndActionCopy = 1

DataDeviceManagerDndActionCopy means copy action

View Source
const DataDeviceManagerDndActionMove = 2

DataDeviceManagerDndActionMove means move action

View Source
const DataDeviceManagerDndActionNone = 0

DataDeviceManagerDndActionNone means no action

View Source
const DataDeviceManagerGetDataDeviceSinceVersion = 1
View Source
const DataDeviceMotionSinceVersion = 1
View Source
const DataDeviceReleaseSinceVersion = 2
View Source
const DataDeviceSelectionSinceVersion = 1
View Source
const DataDeviceSetSelectionSinceVersion = 1
View Source
const DataDeviceStartDragSinceVersion = 1
View Source
const DataOfferAcceptSinceVersion = 1
View Source
const DataOfferActionSinceVersion = 3
View Source
const DataOfferDestroySinceVersion = 1
View Source
const DataOfferErrorInvalidAction = 2

DataOfferErrorInvalidAction means action argument has an invalid value

View Source
const DataOfferErrorInvalidActionMask = 1

DataOfferErrorInvalidActionMask means action mask contains invalid values

View Source
const DataOfferErrorInvalidFinish = 0

DataOfferErrorInvalidFinish means finish request was called untimely

View Source
const DataOfferErrorInvalidOffer = 3

DataOfferErrorInvalidOffer means offer doesn't accept this request

View Source
const DataOfferFinishSinceVersion = 3
View Source
const DataOfferOfferSinceVersion = 1
View Source
const DataOfferReceiveSinceVersion = 1
View Source
const DataOfferSetActionsSinceVersion = 3
View Source
const DataOfferSourceActionsSinceVersion = 3
View Source
const DataSourceActionSinceVersion = 3
View Source
const DataSourceCancelledSinceVersion = 1
View Source
const DataSourceDestroySinceVersion = 1
View Source
const DataSourceDndDropPerformedSinceVersion = 3
View Source
const DataSourceDndFinishedSinceVersion = 3
View Source
const DataSourceErrorInvalidActionMask = 0

DataSourceErrorInvalidActionMask means action mask contains invalid values

View Source
const DataSourceErrorInvalidSource = 1

DataSourceErrorInvalidSource means source doesn't accept this request

View Source
const DataSourceOfferSinceVersion = 1
View Source
const DataSourceSendSinceVersion = 1
View Source
const DataSourceSetActionsSinceVersion = 3
View Source
const DataSourceTargetSinceVersion = 1
View Source
const DisplayDeleteIdSinceVersion = 1
View Source
const DisplayErrorImplementation = 3

DisplayErrorImplementation means implementation error in compositor

View Source
const DisplayErrorInvalidMethod = 1

DisplayErrorInvalidMethod means method doesn't exist on the specified interface or malformed request

View Source
const DisplayErrorInvalidObject = 0

DisplayErrorInvalidObject means server couldn't find object

View Source
const DisplayErrorNoMemory = 2

DisplayErrorNoMemory means server is out of memory

View Source
const DisplayErrorSinceVersion = 1
View Source
const DisplayGetRegistrySinceVersion = 1
View Source
const DisplaySyncSinceVersion = 1
View Source
const KeyboardEnterSinceVersion = 1
View Source
const KeyboardKeySinceVersion = 1
View Source
const KeyboardKeyStatePressed = 1

KeyboardKeyStatePressed means key is pressed

View Source
const KeyboardKeyStateReleased = 0

KeyboardKeyStateReleased means key is not pressed

View Source
const KeyboardKeymapFormatNoKeymap = 0

KeyboardKeymapFormatNoKeymap means no keymap; client must understand how to interpret the raw keycode

View Source
const KeyboardKeymapFormatXkbV1 = 1

KeyboardKeymapFormatXkbV1 means libxkbcommon compatible, null-terminated string; to determine the xkb keycode, clients must add 8 to the key event keycode

View Source
const KeyboardKeymapSinceVersion = 1
View Source
const KeyboardLeaveSinceVersion = 1
View Source
const KeyboardModifiersSinceVersion = 1
View Source
const KeyboardReleaseSinceVersion = 3
View Source
const KeyboardRepeatInfoSinceVersion = 4
View Source
const OutputDoneSinceVersion = 2
View Source
const OutputGeometrySinceVersion = 1
View Source
const OutputModeCurrent = 0x1

OutputModeCurrent means indicates this is the current mode

View Source
const OutputModePreferred = 0x2

OutputModePreferred means indicates this is the preferred mode

View Source
const OutputModeSinceVersion = 1
View Source
const OutputReleaseSinceVersion = 3
View Source
const OutputScaleSinceVersion = 2
View Source
const OutputSubpixelHorizontalBgr = 3

OutputSubpixelHorizontalBgr means horizontal BGR

View Source
const OutputSubpixelHorizontalRgb = 2

OutputSubpixelHorizontalRgb means horizontal RGB

View Source
const OutputSubpixelNone = 1

OutputSubpixelNone means no geometry

View Source
const OutputSubpixelUnknown = 0

OutputSubpixelUnknown means unknown geometry

View Source
const OutputSubpixelVerticalBgr = 5

OutputSubpixelVerticalBgr means vertical BGR

View Source
const OutputSubpixelVerticalRgb = 4

OutputSubpixelVerticalRgb means vertical RGB

View Source
const OutputTransform180 = 2

OutputTransform180 means 180 degrees counter-clockwise

View Source
const OutputTransform270 = 3

OutputTransform270 means 270 degrees counter-clockwise

View Source
const OutputTransform90 = 1

OutputTransform90 means 90 degrees counter-clockwise

View Source
const OutputTransformFlipped = 4

OutputTransformFlipped means 180 degree flip around a vertical axis

View Source
const OutputTransformFlipped180 = 6

OutputTransformFlipped180 means flip and rotate 180 degrees counter-clockwise

View Source
const OutputTransformFlipped270 = 7

OutputTransformFlipped270 means flip and rotate 270 degrees counter-clockwise

View Source
const OutputTransformFlipped90 = 5

OutputTransformFlipped90 means flip and rotate 90 degrees counter-clockwise

View Source
const OutputTransformNormal = 0

OutputTransformNormal means no transform

View Source
const PointerAxisDiscreteSinceVersion = 5
View Source
const PointerAxisHorizontalScroll = 1

PointerAxisHorizontalScroll means horizontal axis

View Source
const PointerAxisRelativeDirectionIdentical = 0

PointerAxisRelativeDirectionIdentical means physical motion matches axis direction

View Source
const PointerAxisRelativeDirectionInverted = 1

PointerAxisRelativeDirectionInverted means physical motion is the inverse of the axis direction

View Source
const PointerAxisSinceVersion = 1
View Source
const PointerAxisSourceContinuous = 2

PointerAxisSourceContinuous means continuous coordinate space

View Source
const PointerAxisSourceFinger = 1

PointerAxisSourceFinger means finger on a touch surface

View Source
const PointerAxisSourceSinceVersion = 5
View Source
const PointerAxisSourceWheel = 0

PointerAxisSourceWheel means a physical wheel rotation

View Source
const PointerAxisSourceWheelTilt = 3

PointerAxisSourceWheelTilt means a physical wheel tilt

View Source
const PointerAxisSourceWheelTiltSinceVersion = 6
View Source
const PointerAxisStopSinceVersion = 5
View Source
const PointerAxisVerticalScroll = 0

PointerAxisVerticalScroll means vertical axis

View Source
const PointerButtonSinceVersion = 1
View Source
const PointerButtonStatePressed = 1

PointerButtonStatePressed means the button is pressed

View Source
const PointerButtonStateReleased = 0

PointerButtonStateReleased means the button is not pressed

View Source
const PointerEnterSinceVersion = 1
View Source
const PointerErrorRole = 0

PointerErrorRole means given wl_surface has another role

View Source
const PointerFrameSinceVersion = 5
View Source
const PointerLeaveSinceVersion = 1
View Source
const PointerMotionSinceVersion = 1
View Source
const PointerReleaseSinceVersion = 3
View Source
const PointerSetCursorSinceVersion = 1
View Source
const RegionAddSinceVersion = 1
View Source
const RegionDestroySinceVersion = 1
View Source
const RegionSubtractSinceVersion = 1
View Source
const RegistryBindSinceVersion = 1
View Source
const RegistryGlobalRemoveSinceVersion = 1
View Source
const RegistryGlobalSinceVersion = 1
View Source
const SeatCapabilitiesSinceVersion = 1
View Source
const SeatCapabilityKeyboard = 2

SeatCapabilityKeyboard means the seat has one or more keyboards

View Source
const SeatCapabilityPointer = 1

SeatCapabilityPointer means the seat has pointer devices

View Source
const SeatCapabilityTouch = 4

SeatCapabilityTouch means the seat has touch devices

View Source
const SeatErrorMissingCapability = 0

SeatErrorMissingCapability means get_pointer, get_keyboard or get_touch called on seat without the matching capability

View Source
const SeatGetKeyboardSinceVersion = 1
View Source
const SeatGetPointerSinceVersion = 1
View Source
const SeatGetTouchSinceVersion = 1
View Source
const SeatNameSinceVersion = 2
View Source
const SeatReleaseSinceVersion = 5
View Source
const ShellErrorRole = 0

ShellErrorRole means given wl_surface has another role

View Source
const ShellGetShellSurfaceSinceVersion = 1
View Source
const ShellSurfaceConfigureSinceVersion = 1
View Source
const ShellSurfaceFullscreenMethodDefault = 0

ShellSurfaceFullscreenMethodDefault means no preference, apply default policy

View Source
const ShellSurfaceFullscreenMethodDriver = 2

ShellSurfaceFullscreenMethodDriver means switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch

View Source
const ShellSurfaceFullscreenMethodFill = 3

ShellSurfaceFullscreenMethodFill means no upscaling, center on output and add black borders to compensate size mismatch

View Source
const ShellSurfaceFullscreenMethodScale = 1

ShellSurfaceFullscreenMethodScale means scale, preserve the surface's aspect ratio and center on output

View Source
const ShellSurfaceMoveSinceVersion = 1
View Source
const ShellSurfacePingSinceVersion = 1
View Source
const ShellSurfacePongSinceVersion = 1
View Source
const ShellSurfacePopupDoneSinceVersion = 1
View Source
const ShellSurfaceResizeBottom = 2

ShellSurfaceResizeBottom means bottom edge

View Source
const ShellSurfaceResizeBottomLeft = 6

ShellSurfaceResizeBottomLeft means bottom and left edges

View Source
const ShellSurfaceResizeBottomRight = 10

ShellSurfaceResizeBottomRight means bottom and right edges

View Source
const ShellSurfaceResizeLeft = 4

ShellSurfaceResizeLeft means left edge

View Source
const ShellSurfaceResizeNone = 0

ShellSurfaceResizeNone means no edge

View Source
const ShellSurfaceResizeRight = 8

ShellSurfaceResizeRight means right edge

View Source
const ShellSurfaceResizeSinceVersion = 1
View Source
const ShellSurfaceResizeTop = 1

ShellSurfaceResizeTop means top edge

View Source
const ShellSurfaceResizeTopLeft = 5

ShellSurfaceResizeTopLeft means top and left edges

View Source
const ShellSurfaceResizeTopRight = 9

ShellSurfaceResizeTopRight means top and right edges

View Source
const ShellSurfaceSetClassSinceVersion = 1
View Source
const ShellSurfaceSetFullscreenSinceVersion = 1
View Source
const ShellSurfaceSetMaximizedSinceVersion = 1
View Source
const ShellSurfaceSetPopupSinceVersion = 1
View Source
const ShellSurfaceSetTitleSinceVersion = 1
View Source
const ShellSurfaceSetToplevelSinceVersion = 1
View Source
const ShellSurfaceSetTransientSinceVersion = 1
View Source
const ShellSurfaceTransientInactive = 0x1

ShellSurfaceTransientInactive means do not set keyboard focus

View Source
const ShmCreatePoolSinceVersion = 1
View Source
const ShmErrorInvalidFd = 2

ShmErrorInvalidFd means mmapping the file descriptor failed

View Source
const ShmErrorInvalidFormat = 0

ShmErrorInvalidFormat means buffer format is not known

View Source
const ShmErrorInvalidStride = 1

ShmErrorInvalidStride means invalid size or stride during pool or buffer creation

View Source
const ShmFormatAbgr1555 = 0x35314241

ShmFormatAbgr1555 means 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian

View Source
const ShmFormatAbgr16161616 = 0x38344241

ShmFormatAbgr16161616 means [63:0] A:B:G:R 16:16:16:16 little endian

View Source
const ShmFormatAbgr16161616f = 0x48344241

ShmFormatAbgr16161616f means [63:0] A:B:G:R 16:16:16:16 little endian

View Source
const ShmFormatAbgr2101010 = 0x30334241

ShmFormatAbgr2101010 means 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian

View Source
const ShmFormatAbgr4444 = 0x32314241

ShmFormatAbgr4444 means 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian

View Source
const ShmFormatAbgr8888 = 0x34324241

ShmFormatAbgr8888 means 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian

View Source
const ShmFormatArgb1555 = 0x35315241

ShmFormatArgb1555 means 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian

View Source
const ShmFormatArgb16161616 = 0x38345241

ShmFormatArgb16161616 means [63:0] A:R:G:B 16:16:16:16 little endian

View Source
const ShmFormatArgb16161616f = 0x48345241

ShmFormatArgb16161616f means [63:0] A:R:G:B 16:16:16:16 little endian

View Source
const ShmFormatArgb2101010 = 0x30335241

ShmFormatArgb2101010 means 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian

View Source
const ShmFormatArgb4444 = 0x32315241

ShmFormatArgb4444 means 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian

View Source
const ShmFormatArgb8888 = 0

ShmFormatArgb8888 means 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian

View Source
const ShmFormatAvuy8888 = 0x59555641

ShmFormatAvuy8888 means [31:0] A:Cr:Cb:Y 8:8:8:8 little endian

View Source
const ShmFormatAxbxgxrx106106106106 = 0x30314241

ShmFormatAxbxgxrx106106106106 means [63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian

View Source
const ShmFormatAyuv = 0x56555941

ShmFormatAyuv means packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian

View Source
const ShmFormatBgr233 = 0x38524742

ShmFormatBgr233 means 8-bit BGR format, [7:0] B:G:R 2:3:3

View Source
const ShmFormatBgr565 = 0x36314742

ShmFormatBgr565 means 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian

View Source
const ShmFormatBgr565A8 = 0x38413542

ShmFormatBgr565A8

View Source
const ShmFormatBgr888 = 0x34324742

ShmFormatBgr888 means 24-bit BGR format, [23:0] B:G:R little endian

View Source
const ShmFormatBgr888A8 = 0x38413842

ShmFormatBgr888A8

View Source
const ShmFormatBgra1010102 = 0x30334142

ShmFormatBgra1010102 means 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian

View Source
const ShmFormatBgra4444 = 0x32314142

ShmFormatBgra4444 means 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian

View Source
const ShmFormatBgra5551 = 0x35314142

ShmFormatBgra5551 means 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian

View Source
const ShmFormatBgra8888 = 0x34324142

ShmFormatBgra8888 means 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian

View Source
const ShmFormatBgrx1010102 = 0x30335842

ShmFormatBgrx1010102 means 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian

View Source
const ShmFormatBgrx4444 = 0x32315842

ShmFormatBgrx4444 means 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian

View Source
const ShmFormatBgrx5551 = 0x35315842

ShmFormatBgrx5551 means 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian

View Source
const ShmFormatBgrx8888 = 0x34325842

ShmFormatBgrx8888 means 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian

View Source
const ShmFormatBgrx8888A8 = 0x38415842

ShmFormatBgrx8888A8

View Source
const ShmFormatC1 = 0x20203143

ShmFormatC1 means [7:0] C0:C1:C2:C3:C4:C5:C6:C7 1:1:1:1:1:1:1:1 eight pixels/byte

View Source
const ShmFormatC2 = 0x20203243

ShmFormatC2 means [7:0] C0:C1:C2:C3 2:2:2:2 four pixels/byte

View Source
const ShmFormatC4 = 0x20203443

ShmFormatC4 means [7:0] C0:C1 4:4 two pixels/byte

View Source
const ShmFormatC8 = 0x20203843

ShmFormatC8 means 8-bit color index format, [7:0] C

View Source
const ShmFormatD1 = 0x20203144

ShmFormatD1 means [7:0] D0:D1:D2:D3:D4:D5:D6:D7 1:1:1:1:1:1:1:1 eight pixels/byte

View Source
const ShmFormatD2 = 0x20203244

ShmFormatD2 means [7:0] D0:D1:D2:D3 2:2:2:2 four pixels/byte

View Source
const ShmFormatD4 = 0x20203444

ShmFormatD4 means [7:0] D0:D1 4:4 two pixels/byte

View Source
const ShmFormatD8 = 0x20203844

ShmFormatD8 means [7:0] D

View Source
const ShmFormatGr1616 = 0x32335247

ShmFormatGr1616 means [31:0] G:R 16:16 little endian

View Source
const ShmFormatGr88 = 0x38385247

ShmFormatGr88 means [15:0] G:R 8:8 little endian

View Source
const ShmFormatNv12 = 0x3231564e

ShmFormatNv12 means 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane

View Source
const ShmFormatNv15 = 0x3531564e

ShmFormatNv15 means 2x2 subsampled Cr:Cb plane

View Source
const ShmFormatNv16 = 0x3631564e

ShmFormatNv16 means 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane

View Source
const ShmFormatNv21 = 0x3132564e

ShmFormatNv21 means 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane

View Source
const ShmFormatNv24 = 0x3432564e

ShmFormatNv24 means non-subsampled Cr:Cb plane

View Source
const ShmFormatNv42 = 0x3234564e

ShmFormatNv42 means non-subsampled Cb:Cr plane

View Source
const ShmFormatNv61 = 0x3136564e

ShmFormatNv61 means 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane

View Source
const ShmFormatP010 = 0x30313050

ShmFormatP010 means 2x2 subsampled Cr:Cb plane 10 bits per channel

View Source
const ShmFormatP012 = 0x32313050

ShmFormatP012 means 2x2 subsampled Cr:Cb plane 12 bits per channel

View Source
const ShmFormatP016 = 0x36313050

ShmFormatP016 means 2x2 subsampled Cr:Cb plane 16 bits per channel

View Source
const ShmFormatP030 = 0x30333050

ShmFormatP030 means 2x2 subsampled Cr:Cb plane 10 bits per channel packed

View Source
const ShmFormatP210 = 0x30313250

ShmFormatP210 means 2x1 subsampled Cr:Cb plane, 10 bit per channel

View Source
const ShmFormatQ401 = 0x31303451

ShmFormatQ401

View Source
const ShmFormatQ410 = 0x30313451

ShmFormatQ410

View Source
const ShmFormatR1 = 0x20203152

ShmFormatR1 means [7:0] R0:R1:R2:R3:R4:R5:R6:R7 1:1:1:1:1:1:1:1 eight pixels/byte

View Source
const ShmFormatR10 = 0x20303152

ShmFormatR10 means [15:0] x:R 6:10 little endian

View Source
const ShmFormatR12 = 0x20323152

ShmFormatR12 means [15:0] x:R 4:12 little endian

View Source
const ShmFormatR16 = 0x20363152

ShmFormatR16 means [15:0] R little endian

View Source
const ShmFormatR2 = 0x20203252

ShmFormatR2 means [7:0] R0:R1:R2:R3 2:2:2:2 four pixels/byte

View Source
const ShmFormatR4 = 0x20203452

ShmFormatR4 means [7:0] R0:R1 4:4 two pixels/byte

View Source
const ShmFormatR8 = 0x20203852

ShmFormatR8 means [7:0] R

View Source
const ShmFormatRg1616 = 0x32334752

ShmFormatRg1616 means [31:0] R:G 16:16 little endian

View Source
const ShmFormatRg88 = 0x38384752

ShmFormatRg88 means [15:0] R:G 8:8 little endian

View Source
const ShmFormatRgb332 = 0x38424752

ShmFormatRgb332 means 8-bit RGB format, [7:0] R:G:B 3:3:2

View Source
const ShmFormatRgb565 = 0x36314752

ShmFormatRgb565 means 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian

View Source
const ShmFormatRgb565A8 = 0x38413552

ShmFormatRgb565A8

View Source
const ShmFormatRgb888 = 0x34324752

ShmFormatRgb888 means 24-bit RGB format, [23:0] R:G:B little endian

View Source
const ShmFormatRgb888A8 = 0x38413852

ShmFormatRgb888A8

View Source
const ShmFormatRgba1010102 = 0x30334152

ShmFormatRgba1010102 means 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian

View Source
const ShmFormatRgba4444 = 0x32314152

ShmFormatRgba4444 means 16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian

View Source
const ShmFormatRgba5551 = 0x35314152

ShmFormatRgba5551 means 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian

View Source
const ShmFormatRgba8888 = 0x34324152

ShmFormatRgba8888 means 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian

View Source
const ShmFormatRgbx1010102 = 0x30335852

ShmFormatRgbx1010102 means 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian

View Source
const ShmFormatRgbx4444 = 0x32315852

ShmFormatRgbx4444 means 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian

View Source
const ShmFormatRgbx5551 = 0x35315852

ShmFormatRgbx5551 means 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian

View Source
const ShmFormatRgbx8888 = 0x34325852

ShmFormatRgbx8888 means 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian

View Source
const ShmFormatRgbx8888A8 = 0x38415852

ShmFormatRgbx8888A8

View Source
const ShmFormatSinceVersion = 1
View Source
const ShmFormatUyvy = 0x59565955

ShmFormatUyvy means packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian

View Source
const ShmFormatVuy101010 = 0x30335556

ShmFormatVuy101010 means Y followed by U then V, 10:10:10. Non-linear modifier only

View Source
const ShmFormatVuy888 = 0x34325556

ShmFormatVuy888 means [23:0] Cr:Cb:Y 8:8:8 little endian

View Source
const ShmFormatVyuy = 0x59555956

ShmFormatVyuy means packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian

View Source
const ShmFormatX0l0 = 0x304c3058

ShmFormatX0l0 means [63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian

View Source
const ShmFormatX0l2 = 0x324c3058

ShmFormatX0l2 means [63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian

View Source
const ShmFormatXbgr1555 = 0x35314258

ShmFormatXbgr1555 means 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian

View Source
const ShmFormatXbgr16161616 = 0x38344258

ShmFormatXbgr16161616 means [63:0] x:B:G:R 16:16:16:16 little endian

View Source
const ShmFormatXbgr16161616f = 0x48344258

ShmFormatXbgr16161616f means [63:0] x:B:G:R 16:16:16:16 little endian

View Source
const ShmFormatXbgr2101010 = 0x30334258

ShmFormatXbgr2101010 means 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian

View Source
const ShmFormatXbgr4444 = 0x32314258

ShmFormatXbgr4444 means 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian

View Source
const ShmFormatXbgr8888 = 0x34324258

ShmFormatXbgr8888 means 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian

View Source
const ShmFormatXbgr8888A8 = 0x38414258

ShmFormatXbgr8888A8

View Source
const ShmFormatXrgb1555 = 0x35315258

ShmFormatXrgb1555 means 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian

View Source
const ShmFormatXrgb16161616 = 0x38345258

ShmFormatXrgb16161616 means [63:0] x:R:G:B 16:16:16:16 little endian

View Source
const ShmFormatXrgb16161616f = 0x48345258

ShmFormatXrgb16161616f means [63:0] x:R:G:B 16:16:16:16 little endian

View Source
const ShmFormatXrgb2101010 = 0x30335258

ShmFormatXrgb2101010 means 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian

View Source
const ShmFormatXrgb4444 = 0x32315258

ShmFormatXrgb4444 means 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian

View Source
const ShmFormatXrgb8888 = 1

ShmFormatXrgb8888 means 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian

View Source
const ShmFormatXrgb8888A8 = 0x38415258

ShmFormatXrgb8888A8

View Source
const ShmFormatXvuy8888 = 0x59555658

ShmFormatXvuy8888 means [31:0] X:Cr:Cb:Y 8:8:8:8 little endian

View Source
const ShmFormatXvyu1216161616 = 0x36335658

ShmFormatXvyu1216161616 means [63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian

View Source
const ShmFormatXvyu16161616 = 0x38345658

ShmFormatXvyu16161616 means [63:0] X:Cr:Y:Cb 16:16:16:16 little endian

View Source
const ShmFormatXvyu2101010 = 0x30335658

ShmFormatXvyu2101010 means [31:0] X:Cr:Y:Cb 2:10:10:10 little endian

View Source
const ShmFormatXyuv8888 = 0x56555958

ShmFormatXyuv8888 means [31:0] X:Y:Cb:Cr 8:8:8:8 little endian

View Source
const ShmFormatY0l0 = 0x304c3059

ShmFormatY0l0 means [63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian

View Source
const ShmFormatY0l2 = 0x324c3059

ShmFormatY0l2 means [63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian

View Source
const ShmFormatY210 = 0x30313259

ShmFormatY210 means [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels

View Source
const ShmFormatY212 = 0x32313259

ShmFormatY212 means [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels

View Source
const ShmFormatY216 = 0x36313259

ShmFormatY216 means [63:0] Cr0:Y1:Cb0:Y0 16:16:16:16 little endian per 2 Y pixels

View Source
const ShmFormatY410 = 0x30313459

ShmFormatY410 means [31:0] A:Cr:Y:Cb 2:10:10:10 little endian

View Source
const ShmFormatY412 = 0x32313459

ShmFormatY412 means [63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian

View Source
const ShmFormatY416 = 0x36313459

ShmFormatY416 means [63:0] A:Cr:Y:Cb 16:16:16:16 little endian

View Source
const ShmFormatYuv410 = 0x39565559

ShmFormatYuv410 means 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes

View Source
const ShmFormatYuv411 = 0x31315559

ShmFormatYuv411 means 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes

View Source
const ShmFormatYuv420 = 0x32315559

ShmFormatYuv420 means 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes

View Source
const ShmFormatYuv42010bit = 0x30315559

ShmFormatYuv42010bit

View Source
const ShmFormatYuv4208bit = 0x38305559

ShmFormatYuv4208bit

View Source
const ShmFormatYuv422 = 0x36315559

ShmFormatYuv422 means 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes

View Source
const ShmFormatYuv444 = 0x34325559

ShmFormatYuv444 means 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes

View Source
const ShmFormatYuyv = 0x56595559

ShmFormatYuyv means packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian

View Source
const ShmFormatYvu410 = 0x39555659

ShmFormatYvu410 means 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes

View Source
const ShmFormatYvu411 = 0x31315659

ShmFormatYvu411 means 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes

View Source
const ShmFormatYvu420 = 0x32315659

ShmFormatYvu420 means 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes

View Source
const ShmFormatYvu422 = 0x36315659

ShmFormatYvu422 means 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes

View Source
const ShmFormatYvu444 = 0x34325659

ShmFormatYvu444 means 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes

View Source
const ShmFormatYvyu = 0x55595659

ShmFormatYvyu means packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian

View Source
const ShmPoolCreateBufferSinceVersion = 1
View Source
const ShmPoolDestroySinceVersion = 1
View Source
const ShmPoolResizeSinceVersion = 1
View Source
const SubcompositorDestroySinceVersion = 1
View Source
const SubcompositorErrorBadParent = 1

SubcompositorErrorBadParent means the to-be sub-surface parent is invalid

View Source
const SubcompositorErrorBadSurface = 0

SubcompositorErrorBadSurface means the to-be sub-surface is invalid

View Source
const SubcompositorGetSubsurfaceSinceVersion = 1
View Source
const SubsurfaceDestroySinceVersion = 1
View Source
const SubsurfaceErrorBadSurface = 0

SubsurfaceErrorBadSurface means wl_surface is not a sibling or the parent

View Source
const SubsurfacePlaceAboveSinceVersion = 1
View Source
const SubsurfacePlaceBelowSinceVersion = 1
View Source
const SubsurfaceSetDesyncSinceVersion = 1
View Source
const SubsurfaceSetPositionSinceVersion = 1
View Source
const SubsurfaceSetSyncSinceVersion = 1
View Source
const SurfaceAttachSinceVersion = 1
View Source
const SurfaceCommitSinceVersion = 1
View Source
const SurfaceDamageBufferSinceVersion = 4
View Source
const SurfaceDamageSinceVersion = 1
View Source
const SurfaceDestroySinceVersion = 1
View Source
const SurfaceEnterSinceVersion = 1
View Source
const SurfaceErrorDefunctRoleObject = 4

SurfaceErrorDefunctRoleObject means surface was destroyed before its role object

View Source
const SurfaceErrorInvalidOffset = 3

SurfaceErrorInvalidOffset means buffer offset is invalid

View Source
const SurfaceErrorInvalidScale = 0

SurfaceErrorInvalidScale means buffer scale value is invalid

View Source
const SurfaceErrorInvalidSize = 2

SurfaceErrorInvalidSize means buffer size is invalid

View Source
const SurfaceErrorInvalidTransform = 1

SurfaceErrorInvalidTransform means buffer transform value is invalid

View Source
const SurfaceFrameSinceVersion = 1
View Source
const SurfaceLeaveSinceVersion = 1
View Source
const SurfaceSetBufferScaleSinceVersion = 3
View Source
const SurfaceSetBufferTransformSinceVersion = 2
View Source
const SurfaceSetInputRegionSinceVersion = 1
View Source
const SurfaceSetOpaqueRegionSinceVersion = 1
View Source
const TouchCancelSinceVersion = 1
View Source
const TouchDownSinceVersion = 1
View Source
const TouchFrameSinceVersion = 1
View Source
const TouchMotionSinceVersion = 1
View Source
const TouchOrientationSinceVersion = 6
View Source
const TouchReleaseSinceVersion = 3
View Source
const TouchShapeSinceVersion = 6
View Source
const TouchUpSinceVersion = 1

Variables

View Source
var ErrContextConnNil = errors.New("context conn is nil")

ErrContextConnNil (Error context conn is nil) occurs if the thread closes context and then it wants to run, another thread probably cannot close it safely

View Source
var ErrContextNil = errors.New("context is nil")

ErrContextNil (Error context is nil) occurs if the thread closes context and then it wants to run, another thread probably cannot close it safely

View Source
var ErrContextRunConnectionClosed = errors.New("connection closed")

ErrContextRunConnectionClosed (Context Run connection closed)

View Source
var ErrContextRunEventReadingError = errors.New("event reading error")

ErrContextRunEventReadingError (Context Run event reading error), use InternalError to get the underlying cause

View Source
var ErrContextRunNotDispatched = errors.New("not dispatched")

ErrContextRunNotDispatched (Context Run not dispatched)

View Source
var ErrContextRunProtocolError = errors.New("protocol error")

ErrContextRunProtocolError (Context Run protocol error), use InternalError to get the underlying cause

View Source
var ErrContextRunProxyNil = errors.New("proxy nil")

ErrContextRunProxyNil (Context Run proxy nil)

View Source
var ErrContextRunTimeout = errors.New("timeout error")

ErrContextRunTimeout (Context Run timeout error)

View Source
var ErrContextSendRequestConn = errors.New("unable to send request using conn")

ErrContextSendRequestConn is raised in case sending wl request fails

View Source
var ErrContextSendRequestNotPossible = errors.New("no write request means")

ErrContextSendRequestNotPossible is raised in case sending wl request could not be done

View Source
var ErrContextSendRequestUnix = errors.New("unable to send request using unix")

ErrContextSendRequestUnix is raised in case sending wl request fails

View Source
var ErrContextSendRequestUnixLength = errors.New("unable to send request using unix, WriteMsgUnix length check failed")

ErrContextSendRequestUnixLength is raised in case sending wl request fails

View Source
var ErrControlMsgBuffer = errors.New("insufficient control msg buffer")

ErrControlMsgBuffer (Error insufficient control msg buffer) is returned when the oobn is bigger than the control message buffer

View Source
var ErrControlMsgParseError = errors.New("control message parse error")

ErrControlMsgParseError (Error control message parse error) is returned when the unix socket control message cannot be parsed, use Unwrap() to get the underlying cause and GetExternal to get this cause

View Source
var ErrInvalidMsgSize = errors.New("invalid message size")

ErrInvalidMsgSize (Error invalid message size) is returned when the payload message size read from the unix socket is incorrect

View Source
var ErrNoControlMsgs = errors.New("no socket control messages")

ErrNoControlMsgs (Error no socket control messages)

View Source
var ErrReadHeader = errors.New("unable to read message header")

ErrReadHeader (Error unable to read message header) is returned when it is not possible to read enough bytes from the unix socket, use Unwrap() to get the underlying cause and GetExternal to get this cause

View Source
var ErrReadPayload = errors.New("cannot read message")

ErrReadPayload (Error cannot read message) is returned when the payload message cannot be read, use Unwrap() to get the underlying cause and GetExternal to get this cause

View Source
var ErrSizeOfHeaderWrong = errors.New("size of message header is wrong")

ErrSizeOfHeaderWrong (Error size of message header is wrong) is returned when the returned size of message heaer is not 8 bytes

View Source
var ErrUnableToParseString = errors.New("unable to parse string")

ErrUnableToParseString (Error unable to parse string) is returned when the buffer is too short to contain a specific string

View Source
var ErrUnableToParseUint32 = errors.New("unable to read unsigned int")

ErrUnableToParseUint32 (Error unable to read unsigned int) is returned when the buffer is too short to contain a specific unsigned int

View Source
var ErrUnableToParseUnixRights = errors.New("unable to parse unix rights")

ErrUnableToParseUnixRights (Error unable to parse unix rights)

View Source
var ErrXdgRuntimeDirNotSet = errors.New("variable XDG_RUNTIME_DIR not set in the environment")

ErrXdgRuntimeDirNotSet is returned by Connect when the operating system does not provide the required XDG_RUNTIME_DIR environment variable

Functions

func DeleteUserData

func DeleteUserData(key Proxy)

func FixedToFloat

func FixedToFloat(fixed int32) float64

FixedToFloat converts a fixed precision Wayland decimal encoded as int32 to a float64

func FloatToFixed

func FloatToFixed(v float64) int32

FloatToFixed converts a float64 to a fixed precision Wayland decimal encoded as int32

func GetUserData

func GetUserData[T any](key Proxy) (found *T, exists bool)

func SafeCast added in v0.1.1

func SafeCast[T any](p Proxy) (out T)

SafeCast casts to any type, it doesn't panic if proxy is nil

func SetUserData

func SetUserData[T any](key Proxy, value *T)

Types

type BaseProxy

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

BaseProxy (Base Proxy) is a struct that stores Context and ProxyId explicitly

func (*BaseProxy) Context

func (p *BaseProxy) Context() *Context

Context BaseProxy implements Context to get Context

func (*BaseProxy) Id

func (p *BaseProxy) Id() ProxyId

Id BaseProxy implements Id to get ProxyId

func (*BaseProxy) SetContext

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

SetContext BaseProxy implements SetContext to set Context

func (*BaseProxy) SetId

func (p *BaseProxy) SetId(id ProxyId)

SetId BaseProxy implements SetId to set ProxyId

func (*BaseProxy) Unregister

func (p *BaseProxy) Unregister()

Unregister BaseProxy Unregister removes this BaseProxy from the map of all Context objects

type Buffer

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

Buffer content for a wl_surface

func NewBuffer

func NewBuffer(ctx *Context) *Buffer

NewBuffer is a constructor for the Buffer object

func (*Buffer) AddReleaseHandler

func (p *Buffer) AddReleaseHandler(h BufferReleaseHandler)

AddReleaseHandler removes the Release handler

func (*Buffer) Destroy

func (p *Buffer) Destroy() error

Destroy destroy a buffer

func (*Buffer) Dispatch

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

Dispatch dispatches event for object Buffer

func (*Buffer) RemoveReleaseHandler

func (p *Buffer) RemoveReleaseHandler(h BufferReleaseHandler)

RemoveReleaseHandler adds the Release handler

type BufferReleaseEvent

type BufferReleaseEvent struct {
	B *Buffer
}

BufferReleaseEvent is the compositor releases buffer

type BufferReleaseHandler

type BufferReleaseHandler interface {
	HandleBufferRelease(BufferReleaseEvent)
}

BufferReleaseHandler is the handler interface for BufferReleaseEvent

type BytePool

type BytePool struct {
	sync.Pool
}

BytePool is a sync pool for byte buffers

func (*BytePool) Give

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

Give (BytePool Give) returns a specific number of bytes to the pool

func (*BytePool) Take

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

Take (BytePool Take) takes a specific number of bytes from the pool

type Callback

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

Callback callback object

func NewCallback

func NewCallback(ctx *Context) *Callback

NewCallback is a constructor for the Callback object

func (*Callback) AddDoneHandler

func (p *Callback) AddDoneHandler(h CallbackDoneHandler)

AddDoneHandler removes the Done handler

func (*Callback) Dispatch

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

Dispatch dispatches event for object Callback

func (*Callback) RemoveDoneHandler

func (p *Callback) RemoveDoneHandler(h CallbackDoneHandler)

RemoveDoneHandler adds the Done handler

type CallbackDoneEvent

type CallbackDoneEvent struct {
	// CallbackData is the request-specific data for the callback
	CallbackData uint32
	C            *Callback
}

CallbackDoneEvent is the done event

type CallbackDoneHandler

type CallbackDoneHandler interface {
	HandleCallbackDone(CallbackDoneEvent)
}

CallbackDoneHandler is the handler interface for CallbackDoneEvent

type Compositor

type Compositor struct {
	BaseProxy
}

Compositor the compositor singleton

func NewCompositor

func NewCompositor(ctx *Context) *Compositor

NewCompositor is a constructor for the Compositor object

func (*Compositor) CreateRegion

func (p *Compositor) CreateRegion() (*Region, error)

CreateRegion create new region

func (*Compositor) CreateSurface

func (p *Compositor) CreateSurface() (*Surface, error)

CreateSurface create new surface

func (*Compositor) Dispatch

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

Dispatch dispatches event for object Compositor

type Context

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

Context wraps the wayland connection together with the map of all Context objects (proxies)

func (*Context) Close

func (ctx *Context) Close() (err error)

Close (Context Close) closes Wayland connection

func (*Context) LookupProxy

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

LookupProxy looks up a specific proxy by it's Id in the map of all Context objects (proxies)

func (*Context) Register

func (ctx *Context) Register(proxy Proxy)

Register registers a proxy in the map of all Context objects (proxies)

func (*Context) RegisterMapped

func (ctx *Context) RegisterMapped(proxy Proxy, num uint32)

func (*Context) Run

func (ctx *Context) Run() error

Run (Context Run) reads and processes one event, a specific ErrContextRunXXX error may be returned in case of failure

func (*Context) RunTill

func (ctx *Context) RunTill(cb *Callback) (err error)

RunTill (Context RunTill) runs until a specific callback or an error occurs, see Context Run for a description of a likely errors

func (*Context) SendRequest

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

SendRequest (Context SendRequest) sends a specific request with arguments to the compositor

func (*Context) Unregister

func (ctx *Context) Unregister(id ProxyId)

Unregister unregisters a proxy in the map of all Context objects (proxies)

type DataDevice

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

DataDevice data transfer device

func NewDataDevice

func NewDataDevice(ctx *Context) *DataDevice

NewDataDevice is a constructor for the DataDevice object

func (*DataDevice) AddDataOfferHandler

func (p *DataDevice) AddDataOfferHandler(h DataDeviceDataOfferHandler)

AddDataOfferHandler removes the DataOffer handler

func (*DataDevice) AddDropHandler

func (p *DataDevice) AddDropHandler(h DataDeviceDropHandler)

AddDropHandler removes the Drop handler

func (*DataDevice) AddEnterHandler

func (p *DataDevice) AddEnterHandler(h DataDeviceEnterHandler)

AddEnterHandler removes the Enter handler

func (*DataDevice) AddLeaveHandler

func (p *DataDevice) AddLeaveHandler(h DataDeviceLeaveHandler)

AddLeaveHandler removes the Leave handler

func (*DataDevice) AddMotionHandler

func (p *DataDevice) AddMotionHandler(h DataDeviceMotionHandler)

AddMotionHandler removes the Motion handler

func (*DataDevice) AddSelectionHandler

func (p *DataDevice) AddSelectionHandler(h DataDeviceSelectionHandler)

AddSelectionHandler removes the Selection handler

func (*DataDevice) Dispatch

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

Dispatch dispatches event for object DataDevice

func (*DataDevice) Release

func (p *DataDevice) Release() error

Release destroy data device

func (*DataDevice) RemoveDataOfferHandler

func (p *DataDevice) RemoveDataOfferHandler(h DataDeviceDataOfferHandler)

RemoveDataOfferHandler adds the DataOffer handler

func (*DataDevice) RemoveDropHandler

func (p *DataDevice) RemoveDropHandler(h DataDeviceDropHandler)

RemoveDropHandler adds the Drop handler

func (*DataDevice) RemoveEnterHandler

func (p *DataDevice) RemoveEnterHandler(h DataDeviceEnterHandler)

RemoveEnterHandler adds the Enter handler

func (*DataDevice) RemoveLeaveHandler

func (p *DataDevice) RemoveLeaveHandler(h DataDeviceLeaveHandler)

RemoveLeaveHandler adds the Leave handler

func (*DataDevice) RemoveMotionHandler

func (p *DataDevice) RemoveMotionHandler(h DataDeviceMotionHandler)

RemoveMotionHandler adds the Motion handler

func (*DataDevice) RemoveSelectionHandler

func (p *DataDevice) RemoveSelectionHandler(h DataDeviceSelectionHandler)

RemoveSelectionHandler adds the Selection handler

func (*DataDevice) SetSelection

func (p *DataDevice) SetSelection(Source *DataSource, Serial uint32) error

SetSelection copy data to the selection

func (*DataDevice) StartDrag

func (p *DataDevice) StartDrag(Source *DataSource, Origin *Surface, Icon *Surface, Serial uint32) error

StartDrag start drag-and-drop operation

type DataDeviceDataOfferEvent

type DataDeviceDataOfferEvent struct {
	// Id is the the new data_offer object
	Id *DataOffer
}

DataDeviceDataOfferEvent is the introduce a new wl_data_offer

type DataDeviceDataOfferHandler

type DataDeviceDataOfferHandler interface {
	HandleDataDeviceDataOffer(DataDeviceDataOfferEvent)
}

DataDeviceDataOfferHandler is the handler interface for DataDeviceDataOfferEvent

type DataDeviceDropEvent

type DataDeviceDropEvent struct {
}

DataDeviceDropEvent is the end drag-and-drop session successfully

type DataDeviceDropHandler

type DataDeviceDropHandler interface {
	HandleDataDeviceDrop(DataDeviceDropEvent)
}

DataDeviceDropHandler is the handler interface for DataDeviceDropEvent

type DataDeviceEnterEvent

type DataDeviceEnterEvent struct {
	// Serial is the serial number of the enter event
	Serial uint32
	// Surface is the client surface entered
	Surface *Surface
	// X is the surface-local x coordinate
	X float32
	// Y is the surface-local y coordinate
	Y float32
	// Id is the source data_offer object
	Id *DataOffer
}

DataDeviceEnterEvent is the initiate drag-and-drop session

type DataDeviceEnterHandler

type DataDeviceEnterHandler interface {
	HandleDataDeviceEnter(DataDeviceEnterEvent)
}

DataDeviceEnterHandler is the handler interface for DataDeviceEnterEvent

type DataDeviceLeaveEvent

type DataDeviceLeaveEvent struct {
}

DataDeviceLeaveEvent is the end drag-and-drop session

type DataDeviceLeaveHandler

type DataDeviceLeaveHandler interface {
	HandleDataDeviceLeave(DataDeviceLeaveEvent)
}

DataDeviceLeaveHandler is the handler interface for DataDeviceLeaveEvent

type DataDeviceManager

type DataDeviceManager struct {
	BaseProxy
}

DataDeviceManager data transfer interface

func NewDataDeviceManager

func NewDataDeviceManager(ctx *Context) *DataDeviceManager

NewDataDeviceManager is a constructor for the DataDeviceManager object

func (*DataDeviceManager) CreateDataSource

func (p *DataDeviceManager) CreateDataSource() (*DataSource, error)

CreateDataSource create a new data source

func (*DataDeviceManager) Dispatch

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

Dispatch dispatches event for object DataDeviceManager

func (*DataDeviceManager) GetDataDevice

func (p *DataDeviceManager) GetDataDevice(Seat *Seat) (*DataDevice, error)

GetDataDevice create a new data device

type DataDeviceMotionEvent

type DataDeviceMotionEvent struct {
	// Time is the timestamp with millisecond granularity
	Time uint32
	// X is the surface-local x coordinate
	X float32
	// Y is the surface-local y coordinate
	Y float32
}

DataDeviceMotionEvent is the drag-and-drop session motion

type DataDeviceMotionHandler

type DataDeviceMotionHandler interface {
	HandleDataDeviceMotion(DataDeviceMotionEvent)
}

DataDeviceMotionHandler is the handler interface for DataDeviceMotionEvent

type DataDeviceSelectionEvent

type DataDeviceSelectionEvent struct {
	// Id is the selection data_offer object
	Id *DataOffer
}

DataDeviceSelectionEvent is the advertise new selection

type DataDeviceSelectionHandler

type DataDeviceSelectionHandler interface {
	HandleDataDeviceSelection(DataDeviceSelectionEvent)
}

DataDeviceSelectionHandler is the handler interface for DataDeviceSelectionEvent

type DataOffer

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

DataOffer offer to transfer data

func NewDataOffer

func NewDataOffer(ctx *Context) *DataOffer

NewDataOffer is a constructor for the DataOffer object

func (*DataOffer) Accept

func (p *DataOffer) Accept(Serial uint32, MimeType string) error

Accept accept one of the offered mime types

func (*DataOffer) AddActionHandler

func (p *DataOffer) AddActionHandler(h DataOfferActionHandler)

AddActionHandler removes the Action handler

func (*DataOffer) AddOfferHandler

func (p *DataOffer) AddOfferHandler(h DataOfferOfferHandler)

AddOfferHandler removes the Offer handler

func (*DataOffer) AddSourceActionsHandler

func (p *DataOffer) AddSourceActionsHandler(h DataOfferSourceActionsHandler)

AddSourceActionsHandler removes the SourceActions handler

func (*DataOffer) Destroy

func (p *DataOffer) Destroy() error

Destroy destroy data offer

func (*DataOffer) Dispatch

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

Dispatch dispatches event for object DataOffer

func (*DataOffer) Finish

func (p *DataOffer) Finish() error

Finish the offer will no longer be used

func (*DataOffer) Receive

func (p *DataOffer) Receive(MimeType string, Fd uintptr) error

Receive request that the data is transferred

func (*DataOffer) RemoveActionHandler

func (p *DataOffer) RemoveActionHandler(h DataOfferActionHandler)

RemoveActionHandler adds the Action handler

func (*DataOffer) RemoveOfferHandler

func (p *DataOffer) RemoveOfferHandler(h DataOfferOfferHandler)

RemoveOfferHandler adds the Offer handler

func (*DataOffer) RemoveSourceActionsHandler

func (p *DataOffer) RemoveSourceActionsHandler(h DataOfferSourceActionsHandler)

RemoveSourceActionsHandler adds the SourceActions handler

func (*DataOffer) SetActions

func (p *DataOffer) SetActions(DndActions uint32, PreferredAction uint32) error

SetActions set the available/preferred drag-and-drop actions

type DataOfferActionEvent

type DataOfferActionEvent struct {
	// DndAction is the action selected by the compositor
	DndAction uint32
}

DataOfferActionEvent is the notify the selected action

type DataOfferActionHandler

type DataOfferActionHandler interface {
	HandleDataOfferAction(DataOfferActionEvent)
}

DataOfferActionHandler is the handler interface for DataOfferActionEvent

type DataOfferOfferEvent

type DataOfferOfferEvent struct {
	// MimeType is the offered mime type
	MimeType string
}

DataOfferOfferEvent is the advertise offered mime type

type DataOfferOfferHandler

type DataOfferOfferHandler interface {
	HandleDataOfferOffer(DataOfferOfferEvent)
}

DataOfferOfferHandler is the handler interface for DataOfferOfferEvent

type DataOfferSourceActionsEvent

type DataOfferSourceActionsEvent struct {
	// SourceActions is the actions offered by the data source
	SourceActions uint32
}

DataOfferSourceActionsEvent is the notify the source-side available actions

type DataOfferSourceActionsHandler

type DataOfferSourceActionsHandler interface {
	HandleDataOfferSourceActions(DataOfferSourceActionsEvent)
}

DataOfferSourceActionsHandler is the handler interface for DataOfferSourceActionsEvent

type DataSource

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

DataSource offer to transfer data

func NewDataSource

func NewDataSource(ctx *Context) *DataSource

NewDataSource is a constructor for the DataSource object

func (*DataSource) AddActionHandler

func (p *DataSource) AddActionHandler(h DataSourceActionHandler)

AddActionHandler removes the Action handler

func (*DataSource) AddCancelledHandler

func (p *DataSource) AddCancelledHandler(h DataSourceCancelledHandler)

AddCancelledHandler removes the Cancelled handler

func (*DataSource) AddDndDropPerformedHandler

func (p *DataSource) AddDndDropPerformedHandler(h DataSourceDndDropPerformedHandler)

AddDndDropPerformedHandler removes the DndDropPerformed handler

func (*DataSource) AddDndFinishedHandler

func (p *DataSource) AddDndFinishedHandler(h DataSourceDndFinishedHandler)

AddDndFinishedHandler removes the DndFinished handler

func (*DataSource) AddSendHandler

func (p *DataSource) AddSendHandler(h DataSourceSendHandler)

AddSendHandler removes the Send handler

func (*DataSource) AddTargetHandler

func (p *DataSource) AddTargetHandler(h DataSourceTargetHandler)

AddTargetHandler removes the Target handler

func (*DataSource) Destroy

func (p *DataSource) Destroy() error

Destroy destroy the data source

func (*DataSource) Dispatch

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

Dispatch dispatches event for object DataSource

func (*DataSource) Offer

func (p *DataSource) Offer(MimeType string) error

Offer add an offered mime type

func (*DataSource) RemoveActionHandler

func (p *DataSource) RemoveActionHandler(h DataSourceActionHandler)

RemoveActionHandler adds the Action handler

func (*DataSource) RemoveCancelledHandler

func (p *DataSource) RemoveCancelledHandler(h DataSourceCancelledHandler)

RemoveCancelledHandler adds the Cancelled handler

func (*DataSource) RemoveDndDropPerformedHandler

func (p *DataSource) RemoveDndDropPerformedHandler(h DataSourceDndDropPerformedHandler)

RemoveDndDropPerformedHandler adds the DndDropPerformed handler

func (*DataSource) RemoveDndFinishedHandler

func (p *DataSource) RemoveDndFinishedHandler(h DataSourceDndFinishedHandler)

RemoveDndFinishedHandler adds the DndFinished handler

func (*DataSource) RemoveSendHandler

func (p *DataSource) RemoveSendHandler(h DataSourceSendHandler)

RemoveSendHandler adds the Send handler

func (*DataSource) RemoveTargetHandler

func (p *DataSource) RemoveTargetHandler(h DataSourceTargetHandler)

RemoveTargetHandler adds the Target handler

func (*DataSource) SetActions

func (p *DataSource) SetActions(DndActions uint32) error

SetActions set the available drag-and-drop actions

type DataSourceActionEvent

type DataSourceActionEvent struct {
	// DndAction is the action selected by the compositor
	DndAction uint32
}

DataSourceActionEvent is the notify the selected action

type DataSourceActionHandler

type DataSourceActionHandler interface {
	HandleDataSourceAction(DataSourceActionEvent)
}

DataSourceActionHandler is the handler interface for DataSourceActionEvent

type DataSourceCancelledEvent

type DataSourceCancelledEvent struct {
}

DataSourceCancelledEvent is the selection was cancelled

type DataSourceCancelledHandler

type DataSourceCancelledHandler interface {
	HandleDataSourceCancelled(DataSourceCancelledEvent)
}

DataSourceCancelledHandler is the handler interface for DataSourceCancelledEvent

type DataSourceDndDropPerformedEvent

type DataSourceDndDropPerformedEvent struct {
}

DataSourceDndDropPerformedEvent is the the drag-and-drop operation physically finished

type DataSourceDndDropPerformedHandler

type DataSourceDndDropPerformedHandler interface {
	HandleDataSourceDndDropPerformed(DataSourceDndDropPerformedEvent)
}

DataSourceDndDropPerformedHandler is the handler interface for DataSourceDndDropPerformedEvent

type DataSourceDndFinishedEvent

type DataSourceDndFinishedEvent struct {
}

DataSourceDndFinishedEvent is the the drag-and-drop operation concluded

type DataSourceDndFinishedHandler

type DataSourceDndFinishedHandler interface {
	HandleDataSourceDndFinished(DataSourceDndFinishedEvent)
}

DataSourceDndFinishedHandler is the handler interface for DataSourceDndFinishedEvent

type DataSourceSendEvent

type DataSourceSendEvent struct {
	// MimeType is the mime type for the data
	MimeType string
	// Fd is the file descriptor for the data
	Fd uintptr
	// FdError is the file descriptor for the data (error)
	FdError error
}

DataSourceSendEvent is the send the data

type DataSourceSendHandler

type DataSourceSendHandler interface {
	HandleDataSourceSend(DataSourceSendEvent)
}

DataSourceSendHandler is the handler interface for DataSourceSendEvent

type DataSourceTargetEvent

type DataSourceTargetEvent struct {
	// MimeType is the mime type accepted by the target
	MimeType string
}

DataSourceTargetEvent is the a target accepts an offered mime type

type DataSourceTargetHandler

type DataSourceTargetHandler interface {
	HandleDataSourceTarget(DataSourceTargetEvent)
}

DataSourceTargetHandler is the handler interface for DataSourceTargetEvent

type Dispatcher

type Dispatcher interface {
	Dispatch(*Event)
}

Dispatcher is anything that can process an Event

type Display

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

Display core global object

func Connect

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

Connect connects to a Wayland compositor running on a specific wayland unix socket

func NewDisplay

func NewDisplay(ctx *Context) *Display

NewDisplay is a constructor for the Display object

func (*Display) AddDeleteIdHandler

func (p *Display) AddDeleteIdHandler(h DisplayDeleteIdHandler)

AddDeleteIdHandler removes the DeleteId handler

func (*Display) AddErrorHandler

func (p *Display) AddErrorHandler(h DisplayErrorHandler)

AddErrorHandler removes the Error handler

func (*Display) Dispatch

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

Dispatch dispatches event for object Display

func (*Display) GetRegistry

func (p *Display) GetRegistry() (*Registry, error)

GetRegistry get global registry object

func (*Display) RemoveDeleteIdHandler

func (p *Display) RemoveDeleteIdHandler(h DisplayDeleteIdHandler)

RemoveDeleteIdHandler adds the DeleteId handler

func (*Display) RemoveErrorHandler

func (p *Display) RemoveErrorHandler(h DisplayErrorHandler)

RemoveErrorHandler adds the Error handler

func (*Display) Sync

func (p *Display) Sync() (*Callback, error)

Sync asynchronous roundtrip

type DisplayDeleteIdEvent

type DisplayDeleteIdEvent struct {
	// Id is the deleted object ID
	Id uint32
}

DisplayDeleteIdEvent is the acknowledge object ID deletion

type DisplayDeleteIdHandler

type DisplayDeleteIdHandler interface {
	HandleDisplayDeleteId(DisplayDeleteIdEvent)
}

DisplayDeleteIdHandler is the handler interface for DisplayDeleteIdEvent

type DisplayErrorEvent

type DisplayErrorEvent struct {
	// ObjectId is the object where the error occurred
	ObjectId Proxy
	// Code is the error code
	Code uint32
	// Message is the error description
	Message string
}

DisplayErrorEvent is the fatal error event

type DisplayErrorHandler

type DisplayErrorHandler interface {
	HandleDisplayError(DisplayErrorEvent)
}

DisplayErrorHandler is the handler interface for DisplayErrorEvent

type Event

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

Event is the Wayland event (e.g. a response) from the compositor

func (*Event) Array

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

Array (Event Array) decodes an Array from the Event

func (*Event) FD

func (ev *Event) FD() (uintptr, error)

FD (Event FD) extracts the file descriptor and an optional error

func (*Event) Float32

func (ev *Event) Float32() float32

Float32 (Event Float32) decodes a Float32 from the Event

func (*Event) Int32

func (ev *Event) Int32() int32

Int32 (Event Int32) decodes an Int32 from the Event

func (*Event) NewId

func (ev *Event) NewId(i Proxy, c *Context) Proxy

func (*Event) Proxy

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

Proxy (Event Proxy) decodes Proxy by it's Id from the Event

func (*Event) String

func (ev *Event) String() string

String (Event String) decodes a string from the Event

func (*Event) Uint32

func (ev *Event) Uint32() uint32

Uint32 (Event Uint32) decodes an Uint32 from the Event

type Fixed

type Fixed = int32

Fixed is a fraction type

type Keyboard

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

Keyboard keyboard input device

func NewKeyboard

func NewKeyboard(ctx *Context) *Keyboard

NewKeyboard is a constructor for the Keyboard object

func (*Keyboard) AddEnterHandler

func (p *Keyboard) AddEnterHandler(h KeyboardEnterHandler)

AddEnterHandler removes the Enter handler

func (*Keyboard) AddKeyHandler

func (p *Keyboard) AddKeyHandler(h KeyboardKeyHandler)

AddKeyHandler removes the Key handler

func (*Keyboard) AddKeymapHandler

func (p *Keyboard) AddKeymapHandler(h KeyboardKeymapHandler)

AddKeymapHandler removes the Keymap handler

func (*Keyboard) AddLeaveHandler

func (p *Keyboard) AddLeaveHandler(h KeyboardLeaveHandler)

AddLeaveHandler removes the Leave handler

func (*Keyboard) AddModifiersHandler

func (p *Keyboard) AddModifiersHandler(h KeyboardModifiersHandler)

AddModifiersHandler removes the Modifiers handler

func (*Keyboard) AddRepeatInfoHandler

func (p *Keyboard) AddRepeatInfoHandler(h KeyboardRepeatInfoHandler)

AddRepeatInfoHandler removes the RepeatInfo handler

func (*Keyboard) Dispatch

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

Dispatch dispatches event for object Keyboard

func (*Keyboard) Release

func (p *Keyboard) Release() error

Release release the keyboard object

func (*Keyboard) RemoveEnterHandler

func (p *Keyboard) RemoveEnterHandler(h KeyboardEnterHandler)

RemoveEnterHandler adds the Enter handler

func (*Keyboard) RemoveKeyHandler

func (p *Keyboard) RemoveKeyHandler(h KeyboardKeyHandler)

RemoveKeyHandler adds the Key handler

func (*Keyboard) RemoveKeymapHandler

func (p *Keyboard) RemoveKeymapHandler(h KeyboardKeymapHandler)

RemoveKeymapHandler adds the Keymap handler

func (*Keyboard) RemoveLeaveHandler

func (p *Keyboard) RemoveLeaveHandler(h KeyboardLeaveHandler)

RemoveLeaveHandler adds the Leave handler

func (*Keyboard) RemoveModifiersHandler

func (p *Keyboard) RemoveModifiersHandler(h KeyboardModifiersHandler)

RemoveModifiersHandler adds the Modifiers handler

func (*Keyboard) RemoveRepeatInfoHandler

func (p *Keyboard) RemoveRepeatInfoHandler(h KeyboardRepeatInfoHandler)

RemoveRepeatInfoHandler adds the RepeatInfo handler

type KeyboardEnterEvent

type KeyboardEnterEvent struct {
	// Serial is the serial number of the enter event
	Serial uint32
	// Surface is the surface gaining keyboard focus
	Surface *Surface
	// Keys is the the currently pressed keys
	Keys []int32
}

KeyboardEnterEvent is the enter event

type KeyboardEnterHandler

type KeyboardEnterHandler interface {
	HandleKeyboardEnter(KeyboardEnterEvent)
}

KeyboardEnterHandler is the handler interface for KeyboardEnterEvent

type KeyboardKeyEvent

type KeyboardKeyEvent struct {
	// Serial is the serial number of the key event
	Serial uint32
	// Time is the timestamp with millisecond granularity
	Time uint32
	// Key is the key that produced the event
	Key uint32
	// State is the physical state of the key
	State uint32
}

KeyboardKeyEvent is the key event

type KeyboardKeyHandler

type KeyboardKeyHandler interface {
	HandleKeyboardKey(KeyboardKeyEvent)
}

KeyboardKeyHandler is the handler interface for KeyboardKeyEvent

type KeyboardKeyState

type KeyboardKeyState int

KeyboardKeyState (Keyboard Key State)

type KeyboardKeymapEvent

type KeyboardKeymapEvent struct {
	// Format is the keymap format
	Format uint32
	// Fd is the keymap file descriptor
	Fd uintptr
	// FdError is the keymap file descriptor (error)
	FdError error
	// Size is the keymap size, in bytes
	Size uint32
}

KeyboardKeymapEvent is the keyboard mapping

type KeyboardKeymapHandler

type KeyboardKeymapHandler interface {
	HandleKeyboardKeymap(KeyboardKeymapEvent)
}

KeyboardKeymapHandler is the handler interface for KeyboardKeymapEvent

type KeyboardLeaveEvent

type KeyboardLeaveEvent struct {
	// Serial is the serial number of the leave event
	Serial uint32
	// Surface is the surface that lost keyboard focus
	Surface *Surface
}

KeyboardLeaveEvent is the leave event

type KeyboardLeaveHandler

type KeyboardLeaveHandler interface {
	HandleKeyboardLeave(KeyboardLeaveEvent)
}

KeyboardLeaveHandler is the handler interface for KeyboardLeaveEvent

type KeyboardModifiersEvent

type KeyboardModifiersEvent struct {
	// Serial is the serial number of the modifiers event
	Serial uint32
	// ModsDepressed is the depressed modifiers
	ModsDepressed uint32
	// ModsLatched is the latched modifiers
	ModsLatched uint32
	// ModsLocked is the locked modifiers
	ModsLocked uint32
	// Group is the keyboard layout
	Group uint32
}

KeyboardModifiersEvent is the modifier and group state

type KeyboardModifiersHandler

type KeyboardModifiersHandler interface {
	HandleKeyboardModifiers(KeyboardModifiersEvent)
}

KeyboardModifiersHandler is the handler interface for KeyboardModifiersEvent

type KeyboardRepeatInfoEvent

type KeyboardRepeatInfoEvent struct {
	// Rate is the the rate of repeating keys in characters per second
	Rate int32
	// Delay is the delay in milliseconds since key down until repeating starts
	Delay int32
}

KeyboardRepeatInfoEvent is the repeat rate and delay

type KeyboardRepeatInfoHandler

type KeyboardRepeatInfoHandler interface {
	HandleKeyboardRepeatInfo(KeyboardRepeatInfoEvent)
}

KeyboardRepeatInfoHandler is the handler interface for KeyboardRepeatInfoEvent

type Output

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

Output compositor output region

func NewOutput

func NewOutput(ctx *Context) *Output

NewOutput is a constructor for the Output object

func (*Output) AddDescriptionHandler

func (p *Output) AddDescriptionHandler(h OutputDescriptionHandler)

AddDescriptionHandler removes the Description handler

func (*Output) AddDoneHandler

func (p *Output) AddDoneHandler(h OutputDoneHandler)

AddDoneHandler removes the Done handler

func (*Output) AddGeometryHandler

func (p *Output) AddGeometryHandler(h OutputGeometryHandler)

AddGeometryHandler removes the Geometry handler

func (*Output) AddModeHandler

func (p *Output) AddModeHandler(h OutputModeHandler)

AddModeHandler removes the Mode handler

func (*Output) AddNameHandler

func (p *Output) AddNameHandler(h OutputNameHandler)

AddNameHandler removes the Name handler

func (*Output) AddScaleHandler

func (p *Output) AddScaleHandler(h OutputScaleHandler)

AddScaleHandler removes the Scale handler

func (*Output) Dispatch

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

Dispatch dispatches event for object Output

func (*Output) Release

func (p *Output) Release() error

Release release the output object

func (*Output) RemoveDescriptionHandler

func (p *Output) RemoveDescriptionHandler(h OutputDescriptionHandler)

RemoveDescriptionHandler adds the Description handler

func (*Output) RemoveDoneHandler

func (p *Output) RemoveDoneHandler(h OutputDoneHandler)

RemoveDoneHandler adds the Done handler

func (*Output) RemoveGeometryHandler

func (p *Output) RemoveGeometryHandler(h OutputGeometryHandler)

RemoveGeometryHandler adds the Geometry handler

func (*Output) RemoveModeHandler

func (p *Output) RemoveModeHandler(h OutputModeHandler)

RemoveModeHandler adds the Mode handler

func (*Output) RemoveNameHandler

func (p *Output) RemoveNameHandler(h OutputNameHandler)

RemoveNameHandler adds the Name handler

func (*Output) RemoveScaleHandler

func (p *Output) RemoveScaleHandler(h OutputScaleHandler)

RemoveScaleHandler adds the Scale handler

type OutputDescriptionEvent

type OutputDescriptionEvent struct {
	// Description is the output description
	Description string
}

OutputDescriptionEvent is the human-readable description of this output

type OutputDescriptionHandler

type OutputDescriptionHandler interface {
	HandleOutputDescription(OutputDescriptionEvent)
}

OutputDescriptionHandler is the handler interface for OutputDescriptionEvent

type OutputDoneEvent

type OutputDoneEvent struct {
}

OutputDoneEvent is the sent all information about output

type OutputDoneHandler

type OutputDoneHandler interface {
	HandleOutputDone(OutputDoneEvent)
}

OutputDoneHandler is the handler interface for OutputDoneEvent

type OutputGeometryEvent

type OutputGeometryEvent struct {
	// X is the x position within the global compositor space
	X int32
	// Y is the y position within the global compositor space
	Y int32
	// PhysicalWidth is the width in millimeters of the output
	PhysicalWidth int32
	// PhysicalHeight is the height in millimeters of the output
	PhysicalHeight int32
	// Subpixel is the subpixel orientation of the output
	Subpixel int32
	// Make is the textual description of the manufacturer
	Make string
	// Model is the textual description of the model
	Model string
	// Transform is the transform that maps framebuffer to output
	Transform int32
}

OutputGeometryEvent is the properties of the output

type OutputGeometryHandler

type OutputGeometryHandler interface {
	HandleOutputGeometry(OutputGeometryEvent)
}

OutputGeometryHandler is the handler interface for OutputGeometryEvent

type OutputModeEvent

type OutputModeEvent struct {
	// Flags is the bitfield of mode flags
	Flags uint32
	// Width is the width of the mode in hardware units
	Width int32
	// Height is the height of the mode in hardware units
	Height int32
	// Refresh is the vertical refresh rate in mHz
	Refresh int32
}

OutputModeEvent is the advertise available modes for the output

type OutputModeHandler

type OutputModeHandler interface {
	HandleOutputMode(OutputModeEvent)
}

OutputModeHandler is the handler interface for OutputModeEvent

type OutputNameEvent

type OutputNameEvent struct {
	// Name is the output name
	Name string
}

OutputNameEvent is the name of this output

type OutputNameHandler

type OutputNameHandler interface {
	HandleOutputName(OutputNameEvent)
}

OutputNameHandler is the handler interface for OutputNameEvent

type OutputScaleEvent

type OutputScaleEvent struct {
	// Factor is the scaling factor of output
	Factor int32
}

OutputScaleEvent is the output scaling properties

type OutputScaleHandler

type OutputScaleHandler interface {
	HandleOutputScale(OutputScaleEvent)
}

OutputScaleHandler is the handler interface for OutputScaleEvent

type Pointer

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

Pointer pointer input device

func NewPointer

func NewPointer(ctx *Context) *Pointer

NewPointer is a constructor for the Pointer object

func (*Pointer) AddAxisDiscreteHandler

func (p *Pointer) AddAxisDiscreteHandler(h PointerAxisDiscreteHandler)

AddAxisDiscreteHandler removes the AxisDiscrete handler

func (*Pointer) AddAxisHandler

func (p *Pointer) AddAxisHandler(h PointerAxisHandler)

AddAxisHandler removes the Axis handler

func (*Pointer) AddAxisRelativeDirectionHandler

func (p *Pointer) AddAxisRelativeDirectionHandler(h PointerAxisRelativeDirectionHandler)

AddAxisRelativeDirectionHandler removes the AxisRelativeDirection handler

func (*Pointer) AddAxisSourceHandler

func (p *Pointer) AddAxisSourceHandler(h PointerAxisSourceHandler)

AddAxisSourceHandler removes the AxisSource handler

func (*Pointer) AddAxisStopHandler

func (p *Pointer) AddAxisStopHandler(h PointerAxisStopHandler)

AddAxisStopHandler removes the AxisStop handler

func (*Pointer) AddAxisValue120Handler

func (p *Pointer) AddAxisValue120Handler(h PointerAxisValue120Handler)

AddAxisValue120Handler removes the AxisValue120 handler

func (*Pointer) AddButtonHandler

func (p *Pointer) AddButtonHandler(h PointerButtonHandler)

AddButtonHandler removes the Button handler

func (*Pointer) AddEnterHandler

func (p *Pointer) AddEnterHandler(h PointerEnterHandler)

AddEnterHandler removes the Enter handler

func (*Pointer) AddFrameHandler

func (p *Pointer) AddFrameHandler(h PointerFrameHandler)

AddFrameHandler removes the Frame handler

func (*Pointer) AddLeaveHandler

func (p *Pointer) AddLeaveHandler(h PointerLeaveHandler)

AddLeaveHandler removes the Leave handler

func (*Pointer) AddMotionHandler

func (p *Pointer) AddMotionHandler(h PointerMotionHandler)

AddMotionHandler removes the Motion handler

func (*Pointer) Dispatch

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

Dispatch dispatches event for object Pointer

func (*Pointer) Release

func (p *Pointer) Release() error

Release release the pointer object

func (*Pointer) RemoveAxisDiscreteHandler

func (p *Pointer) RemoveAxisDiscreteHandler(h PointerAxisDiscreteHandler)

RemoveAxisDiscreteHandler adds the AxisDiscrete handler

func (*Pointer) RemoveAxisHandler

func (p *Pointer) RemoveAxisHandler(h PointerAxisHandler)

RemoveAxisHandler adds the Axis handler

func (*Pointer) RemoveAxisRelativeDirectionHandler

func (p *Pointer) RemoveAxisRelativeDirectionHandler(h PointerAxisRelativeDirectionHandler)

RemoveAxisRelativeDirectionHandler adds the AxisRelativeDirection handler

func (*Pointer) RemoveAxisSourceHandler

func (p *Pointer) RemoveAxisSourceHandler(h PointerAxisSourceHandler)

RemoveAxisSourceHandler adds the AxisSource handler

func (*Pointer) RemoveAxisStopHandler

func (p *Pointer) RemoveAxisStopHandler(h PointerAxisStopHandler)

RemoveAxisStopHandler adds the AxisStop handler

func (*Pointer) RemoveAxisValue120Handler

func (p *Pointer) RemoveAxisValue120Handler(h PointerAxisValue120Handler)

RemoveAxisValue120Handler adds the AxisValue120 handler

func (*Pointer) RemoveButtonHandler

func (p *Pointer) RemoveButtonHandler(h PointerButtonHandler)

RemoveButtonHandler adds the Button handler

func (*Pointer) RemoveEnterHandler

func (p *Pointer) RemoveEnterHandler(h PointerEnterHandler)

RemoveEnterHandler adds the Enter handler

func (*Pointer) RemoveFrameHandler

func (p *Pointer) RemoveFrameHandler(h PointerFrameHandler)

RemoveFrameHandler adds the Frame handler

func (*Pointer) RemoveLeaveHandler

func (p *Pointer) RemoveLeaveHandler(h PointerLeaveHandler)

RemoveLeaveHandler adds the Leave handler

func (*Pointer) RemoveMotionHandler

func (p *Pointer) RemoveMotionHandler(h PointerMotionHandler)

RemoveMotionHandler adds the Motion handler

func (*Pointer) SetCursor

func (p *Pointer) SetCursor(Serial uint32, Surface *Surface, HotspotX int32, HotspotY int32) error

SetCursor set the pointer surface

type PointerAxisDiscreteEvent

type PointerAxisDiscreteEvent struct {
	// Axis is the axis type
	Axis uint32
	// Discrete is the number of steps
	Discrete int32
}

PointerAxisDiscreteEvent is the axis click event

type PointerAxisDiscreteHandler

type PointerAxisDiscreteHandler interface {
	HandlePointerAxisDiscrete(PointerAxisDiscreteEvent)
}

PointerAxisDiscreteHandler is the handler interface for PointerAxisDiscreteEvent

type PointerAxisEvent

type PointerAxisEvent struct {
	// Time is the timestamp with millisecond granularity
	Time uint32
	// Axis is the axis type
	Axis uint32
	// Value is the length of vector in surface-local coordinate space
	Value float32
}

PointerAxisEvent is the axis event

type PointerAxisHandler

type PointerAxisHandler interface {
	HandlePointerAxis(PointerAxisEvent)
}

PointerAxisHandler is the handler interface for PointerAxisEvent

type PointerAxisRelativeDirectionEvent

type PointerAxisRelativeDirectionEvent struct {
	// Axis is the axis type
	Axis uint32
	// Direction is the physical direction relative to axis motion
	Direction uint32
}

PointerAxisRelativeDirectionEvent is the axis relative physical direction event

type PointerAxisRelativeDirectionHandler

type PointerAxisRelativeDirectionHandler interface {
	HandlePointerAxisRelativeDirection(PointerAxisRelativeDirectionEvent)
}

PointerAxisRelativeDirectionHandler is the handler interface for PointerAxisRelativeDirectionEvent

type PointerAxisSourceEvent

type PointerAxisSourceEvent struct {
	// AxisSource is the source of the axis event
	AxisSource uint32
}

PointerAxisSourceEvent is the axis source event

type PointerAxisSourceHandler

type PointerAxisSourceHandler interface {
	HandlePointerAxisSource(PointerAxisSourceEvent)
}

PointerAxisSourceHandler is the handler interface for PointerAxisSourceEvent

type PointerAxisStopEvent

type PointerAxisStopEvent struct {
	// Time is the timestamp with millisecond granularity
	Time uint32
	// Axis is the the axis stopped with this event
	Axis uint32
}

PointerAxisStopEvent is the axis stop event

type PointerAxisStopHandler

type PointerAxisStopHandler interface {
	HandlePointerAxisStop(PointerAxisStopEvent)
}

PointerAxisStopHandler is the handler interface for PointerAxisStopEvent

type PointerAxisValue120Event

type PointerAxisValue120Event struct {
	// Axis is the axis type
	Axis uint32
	// Value120 is the scroll distance as fraction of 120
	Value120 int32
}

PointerAxisValue120Event is the axis high-resolution scroll event

type PointerAxisValue120Handler

type PointerAxisValue120Handler interface {
	HandlePointerAxisValue120(PointerAxisValue120Event)
}

PointerAxisValue120Handler is the handler interface for PointerAxisValue120Event

type PointerButtonEvent

type PointerButtonEvent struct {
	// Serial is the serial number of the button event
	Serial uint32
	// Time is the timestamp with millisecond granularity
	Time uint32
	// Button is the button that produced the event
	Button uint32
	// State is the physical state of the button
	State uint32
	P     *Pointer
}

PointerButtonEvent is the pointer button event

type PointerButtonHandler

type PointerButtonHandler interface {
	HandlePointerButton(PointerButtonEvent)
}

PointerButtonHandler is the handler interface for PointerButtonEvent

type PointerButtonState

type PointerButtonState int

PointerButtonState (Pointer Button State)

type PointerEnterEvent

type PointerEnterEvent struct {
	// Serial is the serial number of the enter event
	Serial uint32
	// Surface is the surface entered by the pointer
	Surface *Surface
	// SurfaceX is the surface-local x coordinate
	SurfaceX float32
	// SurfaceY is the surface-local y coordinate
	SurfaceY float32
}

PointerEnterEvent is the enter event

type PointerEnterHandler

type PointerEnterHandler interface {
	HandlePointerEnter(PointerEnterEvent)
}

PointerEnterHandler is the handler interface for PointerEnterEvent

type PointerFrameEvent

type PointerFrameEvent struct {
}

PointerFrameEvent is the end of a pointer event sequence

type PointerFrameHandler

type PointerFrameHandler interface {
	HandlePointerFrame(PointerFrameEvent)
}

PointerFrameHandler is the handler interface for PointerFrameEvent

type PointerLeaveEvent

type PointerLeaveEvent struct {
	// Serial is the serial number of the leave event
	Serial uint32
	// Surface is the surface left by the pointer
	Surface *Surface
}

PointerLeaveEvent is the leave event

type PointerLeaveHandler

type PointerLeaveHandler interface {
	HandlePointerLeave(PointerLeaveEvent)
}

PointerLeaveHandler is the handler interface for PointerLeaveEvent

type PointerMotionEvent

type PointerMotionEvent struct {
	// Time is the timestamp with millisecond granularity
	Time uint32
	// SurfaceX is the surface-local x coordinate
	SurfaceX float32
	// SurfaceY is the surface-local y coordinate
	SurfaceY float32
	P        *Pointer
}

PointerMotionEvent is the pointer motion event

type PointerMotionHandler

type PointerMotionHandler interface {
	HandlePointerMotion(PointerMotionEvent)
}

PointerMotionHandler is the handler interface for PointerMotionEvent

type Proxy

type Proxy interface {
	Context() *Context
	SetContext(c *Context)
	Id() ProxyId
	SetId(id ProxyId)
	//	Name() uint32
	//	SetName(name uint32)
	Unregister()
}

Proxy object

type ProxyId

type ProxyId uint32

ProxyId is a Proxy identifier that is sent to compositor over the wayland socket

type Region

type Region struct {
	BaseProxy
}

Region region interface

func NewRegion

func NewRegion(ctx *Context) *Region

NewRegion is a constructor for the Region object

func (*Region) Add

func (p *Region) Add(X int32, Y int32, Width int32, Height int32) error

Add add rectangle to region

func (*Region) Destroy

func (p *Region) Destroy() error

Destroy destroy region

func (*Region) Dispatch

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

Dispatch dispatches event for object Region

func (*Region) Subtract

func (p *Region) Subtract(X int32, Y int32, Width int32, Height int32) error

Subtract subtract rectangle from region

type Registry

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

Registry global registry object

func NewRegistry

func NewRegistry(ctx *Context) *Registry

NewRegistry is a constructor for the Registry object

func (*Registry) AddGlobalHandler

func (p *Registry) AddGlobalHandler(h RegistryGlobalHandler)

AddGlobalHandler removes the Global handler

func (*Registry) AddGlobalRemoveHandler

func (p *Registry) AddGlobalRemoveHandler(h RegistryGlobalRemoveHandler)

AddGlobalRemoveHandler removes the GlobalRemove handler

func (*Registry) Bind

func (p *Registry) Bind(Name uint32, Iface string, Version uint32, Id Proxy) error

Bind bind an object to the display

func (*Registry) Dispatch

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

Dispatch dispatches event for object Registry

func (*Registry) RemoveGlobalHandler

func (p *Registry) RemoveGlobalHandler(h RegistryGlobalHandler)

RemoveGlobalHandler adds the Global handler

func (*Registry) RemoveGlobalRemoveHandler

func (p *Registry) RemoveGlobalRemoveHandler(h RegistryGlobalRemoveHandler)

RemoveGlobalRemoveHandler adds the GlobalRemove handler

type RegistryGlobalEvent

type RegistryGlobalEvent struct {
	// Name is the numeric name of the global object
	Name uint32
	// Interface is the interface implemented by the object
	Interface string
	// Version is the interface version
	Version uint32
}

RegistryGlobalEvent is the announce global object

type RegistryGlobalHandler

type RegistryGlobalHandler interface {
	HandleRegistryGlobal(RegistryGlobalEvent)
}

RegistryGlobalHandler is the handler interface for RegistryGlobalEvent

type RegistryGlobalRemoveEvent

type RegistryGlobalRemoveEvent struct {
	// Name is the numeric name of the global object
	Name uint32
}

RegistryGlobalRemoveEvent is the announce removal of global object

type RegistryGlobalRemoveHandler

type RegistryGlobalRemoveHandler interface {
	HandleRegistryGlobalRemove(RegistryGlobalRemoveEvent)
}

RegistryGlobalRemoveHandler is the handler interface for RegistryGlobalRemoveEvent

type Request

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

Request is the request message from your program to the Wayland compositor

func (*Request) PutArray

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

PutArray (Request PutArray) writes an array argument to the compositor

func (*Request) PutFd

func (r *Request) PutFd(fd uintptr)

PutFd (Request PutFd) writes a file descriptor argument to the compositor

func (*Request) PutFloat32

func (r *Request) PutFloat32(f float32)

PutFloat32 (Request PutFloat32) writes a float32 argument to the compositor

func (*Request) PutInt32

func (r *Request) PutInt32(i int32)

PutInt32 (Request PutInt32) writes an int32 argument to the compositor

func (*Request) PutProxy

func (r *Request) PutProxy(p Proxy)

PutProxy (Request PutProxy) writes a proxy argument to the compositor

func (*Request) PutString

func (r *Request) PutString(s string)

PutString (Request PutString) writes a string argument to the compositor

func (*Request) PutUint32

func (r *Request) PutUint32(u uint32)

PutUint32 (Request PutUint32) writes an uint32 argument to the compositor

func (*Request) Write

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

Write (Request Write) writes a specific request argument to the compositor

type Seat

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

Seat group of input devices

func NewSeat

func NewSeat(ctx *Context) *Seat

NewSeat is a constructor for the Seat object

func (*Seat) AddCapabilitiesHandler

func (p *Seat) AddCapabilitiesHandler(h SeatCapabilitiesHandler)

AddCapabilitiesHandler removes the Capabilities handler

func (*Seat) AddNameHandler

func (p *Seat) AddNameHandler(h SeatNameHandler)

AddNameHandler removes the Name handler

func (*Seat) Dispatch

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

Dispatch dispatches event for object Seat

func (*Seat) GetKeyboard

func (p *Seat) GetKeyboard() (*Keyboard, error)

GetKeyboard return keyboard object

func (*Seat) GetPointer

func (p *Seat) GetPointer() (*Pointer, error)

GetPointer return pointer object

func (*Seat) GetTouch

func (p *Seat) GetTouch() (*Touch, error)

GetTouch return touch object

func (*Seat) Release

func (p *Seat) Release() error

Release release the seat object

func (*Seat) RemoveCapabilitiesHandler

func (p *Seat) RemoveCapabilitiesHandler(h SeatCapabilitiesHandler)

RemoveCapabilitiesHandler adds the Capabilities handler

func (*Seat) RemoveNameHandler

func (p *Seat) RemoveNameHandler(h SeatNameHandler)

RemoveNameHandler adds the Name handler

type SeatCapabilitiesEvent

type SeatCapabilitiesEvent struct {
	// Capabilities is the capabilities of the seat
	Capabilities uint32
}

SeatCapabilitiesEvent is the seat capabilities changed

type SeatCapabilitiesHandler

type SeatCapabilitiesHandler interface {
	HandleSeatCapabilities(SeatCapabilitiesEvent)
}

SeatCapabilitiesHandler is the handler interface for SeatCapabilitiesEvent

type SeatNameEvent

type SeatNameEvent struct {
	// Name is the seat identifier
	Name string
}

SeatNameEvent is the unique identifier for this seat

type SeatNameHandler

type SeatNameHandler interface {
	HandleSeatName(SeatNameEvent)
}

SeatNameHandler is the handler interface for SeatNameEvent

type Shell

type Shell struct {
	BaseProxy
}

Shell create desktop-style surfaces

func NewShell

func NewShell(ctx *Context) *Shell

NewShell is a constructor for the Shell object

func (*Shell) Dispatch

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

Dispatch dispatches event for object Shell

func (*Shell) GetShellSurface

func (p *Shell) GetShellSurface(Surface *Surface) (*ShellSurface, error)

GetShellSurface create a shell surface from a surface

type ShellSurface

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

ShellSurface desktop-style metadata interface

func NewShellSurface

func NewShellSurface(ctx *Context) *ShellSurface

NewShellSurface is a constructor for the ShellSurface object

func (*ShellSurface) AddConfigureHandler

func (p *ShellSurface) AddConfigureHandler(h ShellSurfaceConfigureHandler)

AddConfigureHandler removes the Configure handler

func (*ShellSurface) AddPingHandler

func (p *ShellSurface) AddPingHandler(h ShellSurfacePingHandler)

AddPingHandler removes the Ping handler

func (*ShellSurface) AddPopupDoneHandler

func (p *ShellSurface) AddPopupDoneHandler(h ShellSurfacePopupDoneHandler)

AddPopupDoneHandler removes the PopupDone handler

func (*ShellSurface) Dispatch

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

Dispatch dispatches event for object ShellSurface

func (*ShellSurface) Move

func (p *ShellSurface) Move(Seat *Seat, Serial uint32) error

Move start an interactive move

func (*ShellSurface) Pong

func (p *ShellSurface) Pong(Serial uint32) error

Pong respond to a ping event

func (*ShellSurface) RemoveConfigureHandler

func (p *ShellSurface) RemoveConfigureHandler(h ShellSurfaceConfigureHandler)

RemoveConfigureHandler adds the Configure handler

func (*ShellSurface) RemovePingHandler

func (p *ShellSurface) RemovePingHandler(h ShellSurfacePingHandler)

RemovePingHandler adds the Ping handler

func (*ShellSurface) RemovePopupDoneHandler

func (p *ShellSurface) RemovePopupDoneHandler(h ShellSurfacePopupDoneHandler)

RemovePopupDoneHandler adds the PopupDone handler

func (*ShellSurface) Resize

func (p *ShellSurface) Resize(Seat *Seat, Serial uint32, Edges uint32) error

Resize start an interactive resize

func (*ShellSurface) SetClass

func (p *ShellSurface) SetClass(Class string) error

SetClass set surface class

func (*ShellSurface) SetFullscreen

func (p *ShellSurface) SetFullscreen(Method uint32, Framerate uint32, Output *Output) error

SetFullscreen make the surface a fullscreen surface

func (*ShellSurface) SetMaximized

func (p *ShellSurface) SetMaximized(Output *Output) error

SetMaximized make the surface a maximized surface

func (*ShellSurface) SetPopup

func (p *ShellSurface) SetPopup(Seat *Seat, Serial uint32, Parent *Surface, X int32, Y int32, Flags uint32) error

SetPopup make the surface a popup surface

func (*ShellSurface) SetTitle

func (p *ShellSurface) SetTitle(Title string) error

SetTitle set surface title

func (*ShellSurface) SetToplevel

func (p *ShellSurface) SetToplevel() error

SetToplevel make the surface a toplevel surface

func (*ShellSurface) SetTransient

func (p *ShellSurface) SetTransient(Parent *Surface, X int32, Y int32, Flags uint32) error

SetTransient make the surface a transient surface

type ShellSurfaceConfigureEvent

type ShellSurfaceConfigureEvent struct {
	// Edges is the how the surface was resized
	Edges uint32
	// Width is the new width of the surface
	Width int32
	// Height is the new height of the surface
	Height int32
}

ShellSurfaceConfigureEvent is the suggest resize

type ShellSurfaceConfigureHandler

type ShellSurfaceConfigureHandler interface {
	HandleShellSurfaceConfigure(ShellSurfaceConfigureEvent)
}

ShellSurfaceConfigureHandler is the handler interface for ShellSurfaceConfigureEvent

type ShellSurfacePingEvent

type ShellSurfacePingEvent struct {
	// Serial is the serial number of the ping
	Serial uint32
}

ShellSurfacePingEvent is the ping client

type ShellSurfacePingHandler

type ShellSurfacePingHandler interface {
	HandleShellSurfacePing(ShellSurfacePingEvent)
}

ShellSurfacePingHandler is the handler interface for ShellSurfacePingEvent

type ShellSurfacePopupDoneEvent

type ShellSurfacePopupDoneEvent struct {
}

ShellSurfacePopupDoneEvent is the popup interaction is done

type ShellSurfacePopupDoneHandler

type ShellSurfacePopupDoneHandler interface {
	HandleShellSurfacePopupDone(ShellSurfacePopupDoneEvent)
}

ShellSurfacePopupDoneHandler is the handler interface for ShellSurfacePopupDoneEvent

type Shm

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

Shm shared memory support

func NewShm

func NewShm(ctx *Context) *Shm

NewShm is a constructor for the Shm object

func (*Shm) AddFormatHandler

func (p *Shm) AddFormatHandler(h ShmFormatHandler)

AddFormatHandler removes the Format handler

func (*Shm) CreatePool

func (p *Shm) CreatePool(Fd uintptr, Size int32) (*ShmPool, error)

CreatePool create a shm pool

func (*Shm) Dispatch

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

Dispatch dispatches event for object Shm

func (*Shm) Release

func (p *Shm) Release() error

Release release the shm object

func (*Shm) RemoveFormatHandler

func (p *Shm) RemoveFormatHandler(h ShmFormatHandler)

RemoveFormatHandler adds the Format handler

type ShmFormatEvent

type ShmFormatEvent struct {
	// Format is the buffer pixel format
	Format uint32
}

ShmFormatEvent is the pixel format description

type ShmFormatHandler

type ShmFormatHandler interface {
	HandleShmFormat(ShmFormatEvent)
}

ShmFormatHandler is the handler interface for ShmFormatEvent

type ShmPool

type ShmPool struct {
	BaseProxy
}

ShmPool a shared memory pool

func NewShmPool

func NewShmPool(ctx *Context) *ShmPool

NewShmPool is a constructor for the ShmPool object

func (*ShmPool) CreateBuffer

func (p *ShmPool) CreateBuffer(Offset int32, Width int32, Height int32, Stride int32, Format uint32) (*Buffer, error)

CreateBuffer create a buffer from the pool

func (*ShmPool) Destroy

func (p *ShmPool) Destroy() error

Destroy destroy the pool

func (*ShmPool) Dispatch

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

Dispatch dispatches event for object ShmPool

func (*ShmPool) Resize

func (p *ShmPool) Resize(Size int32) error

Resize change the size of the pool mapping

type Subcompositor

type Subcompositor struct {
	BaseProxy
}

Subcompositor sub-surface compositing

func NewSubcompositor

func NewSubcompositor(ctx *Context) *Subcompositor

NewSubcompositor is a constructor for the Subcompositor object

func (*Subcompositor) Destroy

func (p *Subcompositor) Destroy() error

Destroy unbind from the subcompositor interface

func (*Subcompositor) Dispatch

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

Dispatch dispatches event for object Subcompositor

func (*Subcompositor) GetSubsurface

func (p *Subcompositor) GetSubsurface(Surface *Surface, Parent *Surface) (*Subsurface, error)

GetSubsurface give a surface the role sub-surface

type Subsurface

type Subsurface struct {
	BaseProxy
}

Subsurface sub-surface interface to a wl_surface

func NewSubsurface

func NewSubsurface(ctx *Context) *Subsurface

NewSubsurface is a constructor for the Subsurface object

func (*Subsurface) Destroy

func (p *Subsurface) Destroy() error

Destroy remove sub-surface interface

func (*Subsurface) Dispatch

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

Dispatch dispatches event for object Subsurface

func (*Subsurface) PlaceAbove

func (p *Subsurface) PlaceAbove(Sibling *Surface) error

PlaceAbove restack the sub-surface

func (*Subsurface) PlaceBelow

func (p *Subsurface) PlaceBelow(Sibling *Surface) error

PlaceBelow restack the sub-surface

func (*Subsurface) SetDesync

func (p *Subsurface) SetDesync() error

SetDesync set sub-surface to desynchronized mode

func (*Subsurface) SetPosition

func (p *Subsurface) SetPosition(X int32, Y int32) error

SetPosition reposition the sub-surface

func (*Subsurface) SetSync

func (p *Subsurface) SetSync() error

SetSync set sub-surface to synchronized mode

type Surface

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

Surface an onscreen surface

func NewSurface

func NewSurface(ctx *Context) *Surface

NewSurface is a constructor for the Surface object

func (*Surface) AddEnterHandler

func (p *Surface) AddEnterHandler(h SurfaceEnterHandler)

AddEnterHandler removes the Enter handler

func (*Surface) AddLeaveHandler

func (p *Surface) AddLeaveHandler(h SurfaceLeaveHandler)

AddLeaveHandler removes the Leave handler

func (*Surface) AddPreferredBufferScaleHandler

func (p *Surface) AddPreferredBufferScaleHandler(h SurfacePreferredBufferScaleHandler)

AddPreferredBufferScaleHandler removes the PreferredBufferScale handler

func (*Surface) AddPreferredBufferTransformHandler

func (p *Surface) AddPreferredBufferTransformHandler(h SurfacePreferredBufferTransformHandler)

AddPreferredBufferTransformHandler removes the PreferredBufferTransform handler

func (*Surface) Attach

func (p *Surface) Attach(Buffer *Buffer, X int32, Y int32) error

Attach set the surface contents

func (*Surface) Commit

func (p *Surface) Commit() error

Commit commit pending surface state

func (*Surface) Damage

func (p *Surface) Damage(X int32, Y int32, Width int32, Height int32) error

Damage mark part of the surface damaged

func (*Surface) DamageBuffer

func (p *Surface) DamageBuffer(X int32, Y int32, Width int32, Height int32) error

DamageBuffer mark part of the surface damaged using buffer coordinates

func (*Surface) Destroy

func (p *Surface) Destroy() error

Destroy delete surface

func (*Surface) Dispatch

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

Dispatch dispatches event for object Surface

func (*Surface) Frame

func (p *Surface) Frame() (*Callback, error)

Frame request a frame throttling hint

func (*Surface) Offset

func (p *Surface) Offset(X int32, Y int32) error

Offset set the surface contents offset

func (*Surface) RemoveEnterHandler

func (p *Surface) RemoveEnterHandler(h SurfaceEnterHandler)

RemoveEnterHandler adds the Enter handler

func (*Surface) RemoveLeaveHandler

func (p *Surface) RemoveLeaveHandler(h SurfaceLeaveHandler)

RemoveLeaveHandler adds the Leave handler

func (*Surface) RemovePreferredBufferScaleHandler

func (p *Surface) RemovePreferredBufferScaleHandler(h SurfacePreferredBufferScaleHandler)

RemovePreferredBufferScaleHandler adds the PreferredBufferScale handler

func (*Surface) RemovePreferredBufferTransformHandler

func (p *Surface) RemovePreferredBufferTransformHandler(h SurfacePreferredBufferTransformHandler)

RemovePreferredBufferTransformHandler adds the PreferredBufferTransform handler

func (*Surface) SetBufferScale

func (p *Surface) SetBufferScale(Scale int32) error

SetBufferScale sets the buffer scaling factor

func (*Surface) SetBufferTransform

func (p *Surface) SetBufferTransform(Transform int32) error

SetBufferTransform sets the buffer transformation

func (*Surface) SetInputRegion

func (p *Surface) SetInputRegion(Region *Region) error

SetInputRegion set input region

func (*Surface) SetOpaqueRegion

func (p *Surface) SetOpaqueRegion(Region *Region) error

SetOpaqueRegion set opaque region

type SurfaceEnterEvent

type SurfaceEnterEvent struct {
	// Output is the output entered by the surface
	Output *Output
}

SurfaceEnterEvent is the surface enters an output

type SurfaceEnterHandler

type SurfaceEnterHandler interface {
	HandleSurfaceEnter(SurfaceEnterEvent)
}

SurfaceEnterHandler is the handler interface for SurfaceEnterEvent

type SurfaceLeaveEvent

type SurfaceLeaveEvent struct {
	// Output is the output left by the surface
	Output *Output
}

SurfaceLeaveEvent is the surface leaves an output

type SurfaceLeaveHandler

type SurfaceLeaveHandler interface {
	HandleSurfaceLeave(SurfaceLeaveEvent)
}

SurfaceLeaveHandler is the handler interface for SurfaceLeaveEvent

type SurfacePreferredBufferScaleEvent

type SurfacePreferredBufferScaleEvent struct {
	// Factor is the preferred scaling factor
	Factor int32
}

SurfacePreferredBufferScaleEvent is the preferred buffer scale for the surface

type SurfacePreferredBufferScaleHandler

type SurfacePreferredBufferScaleHandler interface {
	HandleSurfacePreferredBufferScale(SurfacePreferredBufferScaleEvent)
}

SurfacePreferredBufferScaleHandler is the handler interface for SurfacePreferredBufferScaleEvent

type SurfacePreferredBufferTransformEvent

type SurfacePreferredBufferTransformEvent struct {
	// Transform is the preferred transform
	Transform uint32
}

SurfacePreferredBufferTransformEvent is the preferred buffer transform for the surface

type SurfacePreferredBufferTransformHandler

type SurfacePreferredBufferTransformHandler interface {
	HandleSurfacePreferredBufferTransform(SurfacePreferredBufferTransformEvent)
}

SurfacePreferredBufferTransformHandler is the handler interface for SurfacePreferredBufferTransformEvent

type Touch

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

Touch touchscreen input device

func NewTouch

func NewTouch(ctx *Context) *Touch

NewTouch is a constructor for the Touch object

func (*Touch) AddCancelHandler

func (p *Touch) AddCancelHandler(h TouchCancelHandler)

AddCancelHandler removes the Cancel handler

func (*Touch) AddDownHandler

func (p *Touch) AddDownHandler(h TouchDownHandler)

AddDownHandler removes the Down handler

func (*Touch) AddFrameHandler

func (p *Touch) AddFrameHandler(h TouchFrameHandler)

AddFrameHandler removes the Frame handler

func (*Touch) AddMotionHandler

func (p *Touch) AddMotionHandler(h TouchMotionHandler)

AddMotionHandler removes the Motion handler

func (*Touch) AddOrientationHandler

func (p *Touch) AddOrientationHandler(h TouchOrientationHandler)

AddOrientationHandler removes the Orientation handler

func (*Touch) AddShapeHandler

func (p *Touch) AddShapeHandler(h TouchShapeHandler)

AddShapeHandler removes the Shape handler

func (*Touch) AddUpHandler

func (p *Touch) AddUpHandler(h TouchUpHandler)

AddUpHandler removes the Up handler

func (*Touch) Dispatch

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

Dispatch dispatches event for object Touch

func (*Touch) Release

func (p *Touch) Release() error

Release release the touch object

func (*Touch) RemoveCancelHandler

func (p *Touch) RemoveCancelHandler(h TouchCancelHandler)

RemoveCancelHandler adds the Cancel handler

func (*Touch) RemoveDownHandler

func (p *Touch) RemoveDownHandler(h TouchDownHandler)

RemoveDownHandler adds the Down handler

func (*Touch) RemoveFrameHandler

func (p *Touch) RemoveFrameHandler(h TouchFrameHandler)

RemoveFrameHandler adds the Frame handler

func (*Touch) RemoveMotionHandler

func (p *Touch) RemoveMotionHandler(h TouchMotionHandler)

RemoveMotionHandler adds the Motion handler

func (*Touch) RemoveOrientationHandler

func (p *Touch) RemoveOrientationHandler(h TouchOrientationHandler)

RemoveOrientationHandler adds the Orientation handler

func (*Touch) RemoveShapeHandler

func (p *Touch) RemoveShapeHandler(h TouchShapeHandler)

RemoveShapeHandler adds the Shape handler

func (*Touch) RemoveUpHandler

func (p *Touch) RemoveUpHandler(h TouchUpHandler)

RemoveUpHandler adds the Up handler

type TouchCancelEvent

type TouchCancelEvent struct {
}

TouchCancelEvent is the touch session cancelled

type TouchCancelHandler

type TouchCancelHandler interface {
	HandleTouchCancel(TouchCancelEvent)
}

TouchCancelHandler is the handler interface for TouchCancelEvent

type TouchDownEvent

type TouchDownEvent struct {
	// Serial is the serial number of the touch down event
	Serial uint32
	// Time is the timestamp with millisecond granularity
	Time uint32
	// Surface is the surface touched
	Surface *Surface
	// Id is the the unique ID of this touch point
	Id int32
	// X is the surface-local x coordinate
	X float32
	// Y is the surface-local y coordinate
	Y float32
}

TouchDownEvent is the touch down event and beginning of a touch sequence

type TouchDownHandler

type TouchDownHandler interface {
	HandleTouchDown(TouchDownEvent)
}

TouchDownHandler is the handler interface for TouchDownEvent

type TouchFrameEvent

type TouchFrameEvent struct {
}

TouchFrameEvent is the end of touch frame event

type TouchFrameHandler

type TouchFrameHandler interface {
	HandleTouchFrame(TouchFrameEvent)
}

TouchFrameHandler is the handler interface for TouchFrameEvent

type TouchMotionEvent

type TouchMotionEvent struct {
	// Time is the timestamp with millisecond granularity
	Time uint32
	// Id is the the unique ID of this touch point
	Id int32
	// X is the surface-local x coordinate
	X float32
	// Y is the surface-local y coordinate
	Y float32
}

TouchMotionEvent is the update of touch point coordinates

type TouchMotionHandler

type TouchMotionHandler interface {
	HandleTouchMotion(TouchMotionEvent)
}

TouchMotionHandler is the handler interface for TouchMotionEvent

type TouchOrientationEvent

type TouchOrientationEvent struct {
	// Id is the the unique ID of this touch point
	Id int32
	// Orientation is the angle between major axis and positive surface y-axis in degrees
	Orientation float32
}

TouchOrientationEvent is the update orientation of touch point

type TouchOrientationHandler

type TouchOrientationHandler interface {
	HandleTouchOrientation(TouchOrientationEvent)
}

TouchOrientationHandler is the handler interface for TouchOrientationEvent

type TouchShapeEvent

type TouchShapeEvent struct {
	// Id is the the unique ID of this touch point
	Id int32
	// Major is the length of the major axis in surface-local coordinates
	Major float32
	// Minor is the length of the minor axis in surface-local coordinates
	Minor float32
}

TouchShapeEvent is the update shape of touch point

type TouchShapeHandler

type TouchShapeHandler interface {
	HandleTouchShape(TouchShapeEvent)
}

TouchShapeHandler is the handler interface for TouchShapeEvent

type TouchUpEvent

type TouchUpEvent struct {
	// Serial is the serial number of the touch up event
	Serial uint32
	// Time is the timestamp with millisecond granularity
	Time uint32
	// Id is the the unique ID of this touch point
	Id int32
}

TouchUpEvent is the end of a touch event sequence

type TouchUpHandler

type TouchUpHandler interface {
	HandleTouchUp(TouchUpEvent)
}

TouchUpHandler is the handler interface for TouchUpEvent

Jump to

Keyboard shortcuts

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