xgb

package
v0.0.0-...-c631f81 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: BSD-3-Clause, GooglePatentClause Imports: 8 Imported by: 0

Documentation

Overview

The XGB package implements the X11 core protocol. It is based on XCB: http://xcb.freedesktop.org/

Index

Constants

View Source
const (
	VisualClassStaticGray  = 0
	VisualClassGrayScale   = 1
	VisualClassStaticColor = 2
	VisualClassPseudoColor = 3
	VisualClassTrueColor   = 4
	VisualClassDirectColor = 5
)
View Source
const (
	EventMaskNoEvent              = 0
	EventMaskKeyPress             = 1
	EventMaskKeyRelease           = 2
	EventMaskButtonPress          = 4
	EventMaskButtonRelease        = 8
	EventMaskEnterWindow          = 16
	EventMaskLeaveWindow          = 32
	EventMaskPointerMotion        = 64
	EventMaskPointerMotionHint    = 128
	EventMaskButton1Motion        = 256
	EventMaskButton2Motion        = 512
	EventMaskButton3Motion        = 1024
	EventMaskButton4Motion        = 2048
	EventMaskButton5Motion        = 4096
	EventMaskButtonMotion         = 8192
	EventMaskKeymapState          = 16384
	EventMaskExposure             = 32768
	EventMaskVisibilityChange     = 65536
	EventMaskStructureNotify      = 131072
	EventMaskResizeRedirect       = 262144
	EventMaskSubstructureNotify   = 524288
	EventMaskSubstructureRedirect = 1048576
	EventMaskFocusChange          = 2097152
	EventMaskPropertyChange       = 4194304
	EventMaskColorMapChange       = 8388608
	EventMaskOwnerGrabButton      = 16777216
)
View Source
const (
	BackingStoreNotUseful  = 0
	BackingStoreWhenMapped = 1
	BackingStoreAlways     = 2
)
View Source
const (
	ImageOrderLSBFirst = 0
	ImageOrderMSBFirst = 1
)
View Source
const (
	ModMaskShift   = 1
	ModMaskLock    = 2
	ModMaskControl = 4
	ModMask1       = 8
	ModMask2       = 16
	ModMask3       = 32
	ModMask4       = 64
	ModMask5       = 128
	ModMaskAny     = 32768
)
View Source
const (
	KeyButMaskShift   = 1
	KeyButMaskLock    = 2
	KeyButMaskControl = 4
	KeyButMaskMod1    = 8
	KeyButMaskMod2    = 16
	KeyButMaskMod3    = 32
	KeyButMaskMod4    = 64
	KeyButMaskMod5    = 128
	KeyButMaskButton1 = 256
	KeyButMaskButton2 = 512
	KeyButMaskButton3 = 1024
	KeyButMaskButton4 = 2048
	KeyButMaskButton5 = 4096
)
View Source
const (
	ButtonMask1   = 256
	ButtonMask2   = 512
	ButtonMask3   = 1024
	ButtonMask4   = 2048
	ButtonMask5   = 4096
	ButtonMaskAny = 32768
)
View Source
const (
	MotionNormal = 0
	MotionHint   = 1
)
View Source
const (
	NotifyDetailAncestor         = 0
	NotifyDetailVirtual          = 1
	NotifyDetailInferior         = 2
	NotifyDetailNonlinear        = 3
	NotifyDetailNonlinearVirtual = 4
	NotifyDetailPointer          = 5
	NotifyDetailPointerRoot      = 6
	NotifyDetailNone             = 7
)
View Source
const (
	NotifyModeNormal       = 0
	NotifyModeGrab         = 1
	NotifyModeUngrab       = 2
	NotifyModeWhileGrabbed = 3
)
View Source
const (
	VisibilityUnobscured        = 0
	VisibilityPartiallyObscured = 1
	VisibilityFullyObscured     = 2
)
View Source
const (
	PlaceOnTop    = 0
	PlaceOnBottom = 1
)
View Source
const (
	PropertyNewValue = 0
	PropertyDelete   = 1
)
View Source
const (
	AtomNone               = 0
	AtomAny                = 0
	AtomPrimary            = 1
	AtomSecondary          = 2
	AtomArc                = 3
	AtomAtom               = 4
	AtomBitmap             = 5
	AtomCardinal           = 6
	AtomColormap           = 7
	AtomCursor             = 8
	AtomCutBuffer0         = 9
	AtomCutBuffer1         = 10
	AtomCutBuffer2         = 11
	AtomCutBuffer3         = 12
	AtomCutBuffer4         = 13
	AtomCutBuffer5         = 14
	AtomCutBuffer6         = 15
	AtomCutBuffer7         = 16
	AtomDrawable           = 17
	AtomFont               = 18
	AtomInteger            = 19
	AtomPixmap             = 20
	AtomPoint              = 21
	AtomRectangle          = 22
	AtomResourceManager    = 23
	AtomRgbColorMap        = 24
	AtomRgbBestMap         = 25
	AtomRgbBlueMap         = 26
	AtomRgbDefaultMap      = 27
	AtomRgbGrayMap         = 28
	AtomRgbGreenMap        = 29
	AtomRgbRedMap          = 30
	AtomString             = 31
	AtomVisualid           = 32
	AtomWindow             = 33
	AtomWmCommand          = 34
	AtomWmHints            = 35
	AtomWmClientMachine    = 36
	AtomWmIconName         = 37
	AtomWmIconSize         = 38
	AtomWmName             = 39
	AtomWmNormalHints      = 40
	AtomWmSizeHints        = 41
	AtomWmZoomHints        = 42
	AtomMinSpace           = 43
	AtomNormSpace          = 44
	AtomMaxSpace           = 45
	AtomEndSpace           = 46
	AtomSuperscriptX       = 47
	AtomSuperscriptY       = 48
	AtomSubscriptX         = 49
	AtomSubscriptY         = 50
	AtomUnderlinePosition  = 51
	AtomUnderlineThickness = 52
	AtomStrikeoutAscent    = 53
	AtomStrikeoutDescent   = 54
	AtomItalicAngle        = 55
	AtomXHeight            = 56
	AtomQuadWidth          = 57
	AtomWeight             = 58
	AtomPointSize          = 59
	AtomResolution         = 60
	AtomCopyright          = 61
	AtomNotice             = 62
	AtomFontName           = 63
	AtomFamilyName         = 64
	AtomFullName           = 65
	AtomCapHeight          = 66
	AtomWmClass            = 67
	AtomWmTransientFor     = 68
)
View Source
const (
	ColormapStateUninstalled = 0
	ColormapStateInstalled   = 1
)
View Source
const (
	MappingModifier = 0
	MappingKeyboard = 1
	MappingPointer  = 2
)
View Source
const (
	WindowClassCopyFromParent = 0
	WindowClassInputOutput    = 1
	WindowClassInputOnly      = 2
)
View Source
const (
	CWBackPixmap       = 1
	CWBackPixel        = 2
	CWBorderPixmap     = 4
	CWBorderPixel      = 8
	CWBitGravity       = 16
	CWWinGravity       = 32
	CWBackingStore     = 64
	CWBackingPlanes    = 128
	CWBackingPixel     = 256
	CWOverrideRedirect = 512
	CWSaveUnder        = 1024
	CWEventMask        = 2048
	CWDontPropagate    = 4096
	CWColormap         = 8192
	CWCursor           = 16384
)
View Source
const (
	BackPixmapNone           = 0
	BackPixmapParentRelative = 1
)
View Source
const (
	GravityBitForget = 0
	GravityWinUnmap  = 0
	GravityNorthWest = 1
	GravityNorth     = 2
	GravityNorthEast = 3
	GravityWest      = 4
	GravityCenter    = 5
	GravityEast      = 6
	GravitySouthWest = 7
	GravitySouth     = 8
	GravitySouthEast = 9
	GravityStatic    = 10
)
View Source
const (
	MapStateUnmapped   = 0
	MapStateUnviewable = 1
	MapStateViewable   = 2
)
View Source
const (
	SetModeInsert = 0
	SetModeDelete = 1
)
View Source
const (
	ConfigWindowX           = 1
	ConfigWindowY           = 2
	ConfigWindowWidth       = 4
	ConfigWindowHeight      = 8
	ConfigWindowBorderWidth = 16
	ConfigWindowSibling     = 32
	ConfigWindowStackMode   = 64
)
View Source
const (
	StackModeAbove    = 0
	StackModeBelow    = 1
	StackModeTopIf    = 2
	StackModeBottomIf = 3
	StackModeOpposite = 4
)
View Source
const (
	CirculateRaiseLowest  = 0
	CirculateLowerHighest = 1
)
View Source
const (
	PropModeReplace = 0
	PropModePrepend = 1
	PropModeAppend  = 2
)
View Source
const (
	SendEventDestPointerWindow = 0
	SendEventDestItemFocus     = 1
)
View Source
const (
	GrabModeSync  = 0
	GrabModeAsync = 1
)
View Source
const (
	GrabStatusSuccess        = 0
	GrabStatusAlreadyGrabbed = 1
	GrabStatusInvalidTime    = 2
	GrabStatusNotViewable    = 3
	GrabStatusFrozen         = 4
)
View Source
const (
	ButtonIndexAny = 0
	ButtonIndex1   = 1
	ButtonIndex2   = 2
	ButtonIndex3   = 3
	ButtonIndex4   = 4
	ButtonIndex5   = 5
)
View Source
const (
	AllowAsyncPointer   = 0
	AllowSyncPointer    = 1
	AllowReplayPointer  = 2
	AllowAsyncKeyboard  = 3
	AllowSyncKeyboard   = 4
	AllowReplayKeyboard = 5
	AllowAsyncBoth      = 6
	AllowSyncBoth       = 7
)
View Source
const (
	InputFocusNone           = 0
	InputFocusPointerRoot    = 1
	InputFocusParent         = 2
	InputFocusFollowKeyboard = 3
)
View Source
const (
	FontDrawLeftToRight = 0
	FontDrawRightToLeft = 1
)
View Source
const (
	GCFunction           = 1
	GCPlaneMask          = 2
	GCForeground         = 4
	GCBackground         = 8
	GCLineWidth          = 16
	GCLineStyle          = 32
	GCCapStyle           = 64
	GCJoinStyle          = 128
	GCFillStyle          = 256
	GCFillRule           = 512
	GCTile               = 1024
	GCStipple            = 2048
	GCTileStippleOriginX = 4096
	GCTileStippleOriginY = 8192
	GCFont               = 16384
	GCSubwindowMode      = 32768
	GCGraphicsExposures  = 65536
	GCClipOriginX        = 131072
	GCClipOriginY        = 262144
	GCClipMask           = 524288
	GCDashOffset         = 1048576
	GCDashList           = 2097152
	GCArcMode            = 4194304
)
View Source
const (
	GXClear        = 0
	GXAnd          = 1
	GXAndReverse   = 2
	GXCopy         = 3
	GXAndInverted  = 4
	GXNoop         = 5
	GXXor          = 6
	GXOr           = 7
	GXNor          = 8
	GXEquiv        = 9
	GXInvert       = 10
	GXOrReverse    = 11
	GXCopyInverted = 12
	GXOrInverted   = 13
	GXNand         = 14
	GXSet          = 15
)
View Source
const (
	LineStyleSolid      = 0
	LineStyleOnOffDash  = 1
	LineStyleDoubleDash = 2
)
View Source
const (
	CapStyleNotLast    = 0
	CapStyleButt       = 1
	CapStyleRound      = 2
	CapStyleProjecting = 3
)
View Source
const (
	JoinStyleMiter = 0
	JoinStyleRound = 1
	JoinStyleBevel = 2
)
View Source
const (
	FillStyleSolid          = 0
	FillStyleTiled          = 1
	FillStyleStippled       = 2
	FillStyleOpaqueStippled = 3
)
View Source
const (
	FillRuleEvenOdd = 0
	FillRuleWinding = 1
)
View Source
const (
	SubwindowModeClipByChildren   = 0
	SubwindowModeIncludeInferiors = 1
)
View Source
const (
	ArcModeChord    = 0
	ArcModePieSlice = 1
)
View Source
const (
	ClipOrderingUnsorted = 0
	ClipOrderingYSorted  = 1
	ClipOrderingYXSorted = 2
	ClipOrderingYXBanded = 3
)
View Source
const (
	CoordModeOrigin   = 0
	CoordModePrevious = 1
)
View Source
const (
	PolyShapeComplex   = 0
	PolyShapeNonconvex = 1
	PolyShapeConvex    = 2
)
View Source
const (
	ImageFormatXYBitmap = 0
	ImageFormatXYPixmap = 1
	ImageFormatZPixmap  = 2
)
View Source
const (
	ColormapAllocNone = 0
	ColormapAllocAll  = 1
)
View Source
const (
	ColorFlagRed   = 1
	ColorFlagGreen = 2
	ColorFlagBlue  = 4
)
View Source
const (
	QueryShapeOfLargestCursor  = 0
	QueryShapeOfFastestTile    = 1
	QueryShapeOfFastestStipple = 2
)
View Source
const (
	KBKeyClickPercent = 1
	KBBellPercent     = 2
	KBBellPitch       = 4
	KBBellDuration    = 8
	KBLed             = 16
	KBLedMode         = 32
	KBKey             = 64
	KBAutoRepeatMode  = 128
)
View Source
const (
	LedModeOff = 0
	LedModeOn  = 1
)
View Source
const (
	AutoRepeatModeOff     = 0
	AutoRepeatModeOn      = 1
	AutoRepeatModeDefault = 2
)
View Source
const (
	BlankingNotPreferred = 0
	BlankingPreferred    = 1
	BlankingDefault      = 2
)
View Source
const (
	ExposuresNotAllowed = 0
	ExposuresAllowed    = 1
	ExposuresDefault    = 2
)
View Source
const (
	HostModeInsert = 0
	HostModeDelete = 1
)
View Source
const (
	FamilyInternet          = 0
	FamilyDECnet            = 1
	FamilyChaos             = 2
	FamilyServerInterpreted = 5
	FamilyInternet6         = 6
)
View Source
const (
	AccessControlDisable = 0
	AccessControlEnable  = 1
)
View Source
const (
	CloseDownDestroyAll      = 0
	CloseDownRetainPermanent = 1
	CloseDownRetainTemporary = 2
)
View Source
const (
	ScreenSaverReset  = 0
	ScreenSaverActive = 1
)
View Source
const (
	MappingStatusSuccess = 0
	MappingStatusBusy    = 1
	MappingStatusFailure = 2
)
View Source
const (
	MapIndexShift   = 0
	MapIndexLock    = 1
	MapIndexControl = 2
	MapIndex1       = 3
	MapIndex2       = 4
	MapIndex3       = 5
	MapIndex4       = 6
	MapIndex5       = 7
)
View Source
const BadAccess = 10
View Source
const BadAlloc = 11
View Source
const BadAtom = 5
View Source
const BadColormap = 12
View Source
const BadCursor = 6
View Source
const BadDrawable = 9
View Source
const BadFont = 7
View Source
const BadGContext = 13
View Source
const BadIDChoice = 14
View Source
const BadImplementation = 17
View Source
const BadLength = 16
View Source
const BadMatch = 8
View Source
const BadName = 15
View Source
const BadPixmap = 4
View Source
const BadRequest = 1
View Source
const BadValue = 2
View Source
const BadWindow = 3
View Source
const ButtonPress = 4
View Source
const ButtonRelease = 5
View Source
const CirculateNotify = 26
View Source
const CirculateRequest = 27
View Source
const ClientMessage = 33
View Source
const (
	ColormapNone = 0
)
View Source
const ColormapNotify = 32
View Source
const ConfigureNotify = 22
View Source
const ConfigureRequest = 23
View Source
const CreateNotify = 16
View Source
const (
	CursorNone = 0
)
View Source
const DestroyNotify = 17
View Source
const EnterNotify = 7
View Source
const Expose = 12
View Source
const FocusIn = 9
View Source
const FocusOut = 10
View Source
const (
	FontNone = 0
)
View Source
const (
	GetPropertyTypeAny = 0
)
View Source
const (
	GrabAny = 0
)
View Source
const GraphicsExposure = 13
View Source
const GravityNotify = 24
View Source
const KeyPress = 2
View Source
const KeyRelease = 3
View Source
const KeymapNotify = 11
View Source
const (
	KillAllTemporary = 0
)
View Source
const LeaveNotify = 8
View Source
const MapNotify = 19
View Source
const MapRequest = 20
View Source
const MappingNotify = 34
View Source
const MotionNotify = 6
View Source
const NoExposure = 14
View Source
const OpcodeAllocColor = 84
View Source
const OpcodeAllocColorCells = 86
View Source
const OpcodeAllocColorPlanes = 87
View Source
const OpcodeAllocNamedColor = 85
View Source
const OpcodeAllowEvents = 35
View Source
const OpcodeBell = 104
View Source
const OpcodeChangeActivePointerGrab = 30
View Source
const OpcodeChangeGC = 56
View Source
const OpcodeChangeHosts = 109
View Source
const OpcodeChangeKeyboardControl = 102
View Source
const OpcodeChangeKeyboardMapping = 100
View Source
const OpcodeChangePointerControl = 105
View Source
const OpcodeChangeProperty = 18
View Source
const OpcodeChangeSaveSet = 6
View Source
const OpcodeChangeWindowAttributes = 2
View Source
const OpcodeCirculateWindow = 13
View Source
const OpcodeClearArea = 61
View Source
const OpcodeCloseFont = 46
View Source
const OpcodeConfigureWindow = 12
View Source
const OpcodeConvertSelection = 24
View Source
const OpcodeCopyArea = 62
View Source
const OpcodeCopyColormapAndFree = 80
View Source
const OpcodeCopyGC = 57
View Source
const OpcodeCopyPlane = 63
View Source
const OpcodeCreateColormap = 78
View Source
const OpcodeCreateCursor = 93
View Source
const OpcodeCreateGC = 55
View Source
const OpcodeCreateGlyphCursor = 94
View Source
const OpcodeCreatePixmap = 53
View Source
const OpcodeCreateWindow = 1
View Source
const OpcodeDeleteProperty = 19
View Source
const OpcodeDestroySubwindows = 5
View Source
const OpcodeDestroyWindow = 4
View Source
const OpcodeFillPoly = 69
View Source
const OpcodeForceScreenSaver = 115
View Source
const OpcodeFreeColormap = 79
View Source
const OpcodeFreeColors = 88
View Source
const OpcodeFreeCursor = 95
View Source
const OpcodeFreeGC = 60
View Source
const OpcodeFreePixmap = 54
View Source
const OpcodeGetAtomName = 17
View Source
const OpcodeGetFontPath = 52
View Source
const OpcodeGetGeometry = 14
View Source
const OpcodeGetImage = 73
View Source
const OpcodeGetInputFocus = 43
View Source
const OpcodeGetKeyboardControl = 103
View Source
const OpcodeGetKeyboardMapping = 101
View Source
const OpcodeGetModifierMapping = 119
View Source
const OpcodeGetMotionEvents = 39
View Source
const OpcodeGetPointerControl = 106
View Source
const OpcodeGetPointerMapping = 117
View Source
const OpcodeGetProperty = 20
View Source
const OpcodeGetScreenSaver = 108
View Source
const OpcodeGetSelectionOwner = 23
View Source
const OpcodeGetWindowAttributes = 3
View Source
const OpcodeGrabButton = 28
View Source
const OpcodeGrabKey = 33
View Source
const OpcodeGrabKeyboard = 31
View Source
const OpcodeGrabPointer = 26
View Source
const OpcodeGrabServer = 36
View Source
const OpcodeImageText16 = 77
View Source
const OpcodeImageText8 = 76
View Source
const OpcodeInstallColormap = 81
View Source
const OpcodeInternAtom = 16
View Source
const OpcodeKillClient = 113
View Source
const OpcodeListExtensions = 99
View Source
const OpcodeListFonts = 49
View Source
const OpcodeListFontsWithInfo = 50
View Source
const OpcodeListHosts = 110
View Source
const OpcodeListInstalledColormaps = 83
View Source
const OpcodeListProperties = 21
View Source
const OpcodeLookupColor = 92
View Source
const OpcodeMapSubwindows = 9
View Source
const OpcodeMapWindow = 8
View Source
const OpcodeNoOperation = 127
View Source
const OpcodeOpenFont = 45
View Source
const OpcodePolyArc = 68
View Source
const OpcodePolyFillArc = 71
View Source
const OpcodePolyFillRectangle = 70
View Source
const OpcodePolyLine = 65
View Source
const OpcodePolyPoint = 64
View Source
const OpcodePolyRectangle = 67
View Source
const OpcodePolySegment = 66
View Source
const OpcodePolyText16 = 75
View Source
const OpcodePolyText8 = 74
View Source
const OpcodePutImage = 72
View Source
const OpcodeQueryBestSize = 97
View Source
const OpcodeQueryColors = 91
View Source
const OpcodeQueryExtension = 98
View Source
const OpcodeQueryFont = 47
View Source
const OpcodeQueryKeymap = 44
View Source
const OpcodeQueryPointer = 38
View Source
const OpcodeQueryTextExtents = 48
View Source
const OpcodeQueryTree = 15
View Source
const OpcodeRecolorCursor = 96
View Source
const OpcodeReparentWindow = 7
View Source
const OpcodeRotateProperties = 114
View Source
const OpcodeSendEvent = 25
View Source
const OpcodeSetAccessControl = 111
View Source
const OpcodeSetClipRectangles = 59
View Source
const OpcodeSetCloseDownMode = 112
View Source
const OpcodeSetDashes = 58
View Source
const OpcodeSetFontPath = 51
View Source
const OpcodeSetInputFocus = 42
View Source
const OpcodeSetModifierMapping = 118
View Source
const OpcodeSetPointerMapping = 116
View Source
const OpcodeSetScreenSaver = 107
View Source
const OpcodeSetSelectionOwner = 22
View Source
const OpcodeStoreColors = 89
View Source
const OpcodeStoreNamedColor = 90
View Source
const OpcodeTranslateCoordinates = 40
View Source
const OpcodeUngrabButton = 29
View Source
const OpcodeUngrabKey = 34
View Source
const OpcodeUngrabKeyboard = 32
View Source
const OpcodeUngrabPointer = 27
View Source
const OpcodeUngrabServer = 37
View Source
const OpcodeUninstallColormap = 82
View Source
const OpcodeUnmapSubwindows = 11
View Source
const OpcodeUnmapWindow = 10
View Source
const OpcodeWarpPointer = 41
View Source
const (
	PixmapNone = 0
)
View Source
const PropertyNotify = 28
View Source
const ReparentNotify = 21
View Source
const ResizeRequest = 25
View Source
const SelectionClear = 29
View Source
const SelectionNotify = 31
View Source
const SelectionRequest = 30
View Source
const (
	TimeCurrentTime = 0
)
View Source
const UnmapNotify = 18
View Source
const VisibilityNotify = 15
View Source
const (
	WindowNone = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocColorCellsReply

type AllocColorCellsReply struct {
	PixelsLen uint16
	MasksLen  uint16
	Pixels    []uint32
	Masks     []uint32
}

type AllocColorPlanesReply

type AllocColorPlanesReply struct {
	PixelsLen uint16
	RedMask   uint32
	GreenMask uint32
	BlueMask  uint32
	Pixels    []uint32
}

type AllocColorReply

type AllocColorReply struct {
	Red   uint16
	Green uint16
	Blue  uint16
	Pixel uint32
}

type AllocNamedColorReply

type AllocNamedColorReply struct {
	Pixel       uint32
	ExactRed    uint16
	ExactGreen  uint16
	ExactBlue   uint16
	VisualRed   uint16
	VisualGreen uint16
	VisualBlue  uint16
}

type Arc

type Arc struct {
	X      int16
	Y      int16
	Width  uint16
	Height uint16
	Angle1 int16
	Angle2 int16
}

type ButtonPressEvent

type ButtonPressEvent struct {
	Detail     byte
	Time       Timestamp
	Root       Id
	Event      Id
	Child      Id
	RootX      int16
	RootY      int16
	EventX     int16
	EventY     int16
	State      uint16
	SameScreen bool
}

type ButtonReleaseEvent

type ButtonReleaseEvent ButtonPressEvent

type Char2b

type Char2b struct {
	Byte1 byte
	Byte2 byte
}

type Charinfo

type Charinfo struct {
	LeftSideBearing  int16
	RightSideBearing int16
	CharacterWidth   int16
	Ascent           int16
	Descent          int16
	Attributes       uint16
}

type CirculateNotifyEvent

type CirculateNotifyEvent struct {
	Event  Id
	Window Id
	Place  byte
}

type CirculateRequestEvent

type CirculateRequestEvent CirculateNotifyEvent

type ClientMessageData

type ClientMessageData struct {
	Data8  [20]byte
	Data16 [10]uint16
	Data32 [5]uint32
}

ClientMessageData holds the data from a client message, duplicated in three forms because Go doesn't have unions.

type ClientMessageEvent

type ClientMessageEvent struct {
	Format byte
	Window Id
	Type   Id
	Data   ClientMessageData
}

type Coloritem

type Coloritem struct {
	Pixel uint32
	Red   uint16
	Green uint16
	Blue  uint16
	Flags byte
}

type ColormapNotifyEvent

type ColormapNotifyEvent struct {
	Window   Id
	Colormap Id
	New      bool
	State    byte
}

type ConfigureNotifyEvent

type ConfigureNotifyEvent struct {
	Event            Id
	Window           Id
	AboveSibling     Id
	X                int16
	Y                int16
	Width            uint16
	Height           uint16
	BorderWidth      uint16
	OverrideRedirect bool
}

type ConfigureRequestEvent

type ConfigureRequestEvent struct {
	StackMode   byte
	Parent      Id
	Window      Id
	Sibling     Id
	X           int16
	Y           int16
	Width       uint16
	Height      uint16
	BorderWidth uint16
	ValueMask   uint16
}

type Conn

type Conn struct {
	Setup SetupInfo
	// contains filtered or unexported fields
}

A Conn represents a connection to an X server. Only one goroutine should use a Conn's methods at a time.

func Dial

func Dial(display string) (*Conn, error)

Dial connects to the X server given in the 'display' string. If 'display' is empty it will be taken from os.Getenv("DISPLAY").

Examples:

Dial(":1")                 // connect to net.Dial("unix", "", "/tmp/.X11-unix/X1")
Dial("/tmp/launch-123/:0") // connect to net.Dial("unix", "", "/tmp/launch-123/:0")
Dial("hostname:2.1")       // connect to net.Dial("tcp", "", "hostname:6002")
Dial("tcp/hostname:1.0")   // connect to net.Dial("tcp", "", "hostname:6001")

func (*Conn) AllocColor

func (c *Conn) AllocColor(Cmap Id, Red uint16, Green uint16, Blue uint16) (*AllocColorReply, error)

func (*Conn) AllocColorCells

func (c *Conn) AllocColorCells(Contiguous bool, Cmap Id, Colors uint16, Planes uint16) (*AllocColorCellsReply, error)

func (*Conn) AllocColorCellsReply

func (c *Conn) AllocColorCellsReply(cookie Cookie) (*AllocColorCellsReply, error)

func (*Conn) AllocColorCellsRequest

func (c *Conn) AllocColorCellsRequest(Contiguous bool, Cmap Id, Colors uint16, Planes uint16) Cookie

func (*Conn) AllocColorPlanes

func (c *Conn) AllocColorPlanes(Contiguous bool, Cmap Id, Colors uint16, Reds uint16, Greens uint16, Blues uint16) (*AllocColorPlanesReply, error)

func (*Conn) AllocColorPlanesReply

func (c *Conn) AllocColorPlanesReply(cookie Cookie) (*AllocColorPlanesReply, error)

func (*Conn) AllocColorPlanesRequest

func (c *Conn) AllocColorPlanesRequest(Contiguous bool, Cmap Id, Colors uint16, Reds uint16, Greens uint16, Blues uint16) Cookie

func (*Conn) AllocColorReply

func (c *Conn) AllocColorReply(cookie Cookie) (*AllocColorReply, error)

func (*Conn) AllocColorRequest

func (c *Conn) AllocColorRequest(Cmap Id, Red uint16, Green uint16, Blue uint16) Cookie

func (*Conn) AllocNamedColor

func (c *Conn) AllocNamedColor(Cmap Id, Name string) (*AllocNamedColorReply, error)

func (*Conn) AllocNamedColorReply

func (c *Conn) AllocNamedColorReply(cookie Cookie) (*AllocNamedColorReply, error)

func (*Conn) AllocNamedColorRequest

func (c *Conn) AllocNamedColorRequest(Cmap Id, Name string) Cookie

func (*Conn) AllowEvents

func (c *Conn) AllowEvents(Mode byte, Time Timestamp)

func (*Conn) Bell

func (c *Conn) Bell(Percent int8)

func (*Conn) ChangeActivePointerGrab

func (c *Conn) ChangeActivePointerGrab(Cursor Id, Time Timestamp, EventMask uint16)

func (*Conn) ChangeGC

func (c *Conn) ChangeGC(Gc Id, ValueMask uint32, ValueList []uint32)

func (*Conn) ChangeHosts

func (c *Conn) ChangeHosts(Mode byte, Family byte, Address []byte)

func (*Conn) ChangeKeyboardControl

func (c *Conn) ChangeKeyboardControl(ValueMask uint32, ValueList []uint32)

func (*Conn) ChangeKeyboardMapping

func (c *Conn) ChangeKeyboardMapping(KeycodeCount byte, FirstKeycode byte, KeysymsPerKeycode byte, Keysyms []Keysym)

func (*Conn) ChangePointerControl

func (c *Conn) ChangePointerControl(AccelerationNumerator int16, AccelerationDenominator int16, Threshold int16, DoAcceleration bool, DoThreshold bool)

func (*Conn) ChangeProperty

func (c *Conn) ChangeProperty(Mode byte, Window Id, Property Id, Type Id, Format byte, Data []byte)

func (*Conn) ChangeSaveSet

func (c *Conn) ChangeSaveSet(Mode byte, Window Id)

func (*Conn) ChangeWindowAttributes

func (c *Conn) ChangeWindowAttributes(Window Id, ValueMask uint32, ValueList []uint32)

func (*Conn) CirculateWindow

func (c *Conn) CirculateWindow(Direction byte, Window Id)

func (*Conn) ClearArea

func (c *Conn) ClearArea(Exposures bool, Window Id, X int16, Y int16, Width uint16, Height uint16)

func (*Conn) Close

func (c *Conn) Close()

Close closes the connection to the X server.

func (*Conn) CloseFont

func (c *Conn) CloseFont(Font Id)

func (*Conn) ConfigureWindow

func (c *Conn) ConfigureWindow(Window Id, ValueMask uint16, ValueList []uint32)

func (*Conn) ConvertSelection

func (c *Conn) ConvertSelection(Requestor Id, Selection Id, Target Id, Property Id, Time Timestamp)

func (*Conn) CopyArea

func (c *Conn) CopyArea(SrcDrawable Id, DstDrawable Id, Gc Id, SrcX int16, SrcY int16, DstX int16, DstY int16, Width uint16, Height uint16)

func (*Conn) CopyColormapAndFree

func (c *Conn) CopyColormapAndFree(Mid Id, SrcCmap Id)

func (*Conn) CopyGC

func (c *Conn) CopyGC(SrcGc Id, DstGc Id, ValueMask uint32)

func (*Conn) CopyPlane

func (c *Conn) CopyPlane(SrcDrawable Id, DstDrawable Id, Gc Id, SrcX int16, SrcY int16, DstX int16, DstY int16, Width uint16, Height uint16, BitPlane uint32)

func (*Conn) CreateColormap

func (c *Conn) CreateColormap(Alloc byte, Mid Id, Window Id, Visual Id)

func (*Conn) CreateCursor

func (c *Conn) CreateCursor(Cid Id, Source Id, Mask Id, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16, X uint16, Y uint16)

func (*Conn) CreateGC

func (c *Conn) CreateGC(Cid Id, Drawable Id, ValueMask uint32, ValueList []uint32)

func (*Conn) CreateGlyphCursor

func (c *Conn) CreateGlyphCursor(Cid Id, SourceFont Id, MaskFont Id, SourceChar uint16, MaskChar uint16, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16)

func (*Conn) CreatePixmap

func (c *Conn) CreatePixmap(Depth byte, Pid Id, Drawable Id, Width uint16, Height uint16)

func (*Conn) CreateWindow

func (c *Conn) CreateWindow(Depth byte, Wid Id, Parent Id, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class uint16, Visual Id, ValueMask uint32, ValueList []uint32)

func (*Conn) DefaultScreen

func (c *Conn) DefaultScreen() *ScreenInfo

DefaultScreen returns the Screen info for the default screen, which is 0 or the one given in the display argument to Dial.

func (*Conn) DeleteProperty

func (c *Conn) DeleteProperty(Window Id, Property Id)

func (*Conn) DestroySubwindows

func (c *Conn) DestroySubwindows(Window Id)

func (*Conn) DestroyWindow

func (c *Conn) DestroyWindow(Window Id)

func (*Conn) FillPoly

func (c *Conn) FillPoly(Drawable Id, Gc Id, Shape byte, CoordinateMode byte, Points []Point)

func (*Conn) ForceScreenSaver

func (c *Conn) ForceScreenSaver(Mode byte)

func (*Conn) FreeColormap

func (c *Conn) FreeColormap(Cmap Id)

func (*Conn) FreeColors

func (c *Conn) FreeColors(Cmap Id, PlaneMask uint32, Pixels []uint32)

func (*Conn) FreeCursor

func (c *Conn) FreeCursor(Cursor Id)

func (*Conn) FreeGC

func (c *Conn) FreeGC(Gc Id)

func (*Conn) FreePixmap

func (c *Conn) FreePixmap(Pixmap Id)

func (*Conn) GetAtomName

func (c *Conn) GetAtomName(Atom Id) (*GetAtomNameReply, error)

func (*Conn) GetAtomNameReply

func (c *Conn) GetAtomNameReply(cookie Cookie) (*GetAtomNameReply, error)

func (*Conn) GetAtomNameRequest

func (c *Conn) GetAtomNameRequest(Atom Id) Cookie

func (*Conn) GetFontPath

func (c *Conn) GetFontPath() (*GetFontPathReply, error)

func (*Conn) GetFontPathReply

func (c *Conn) GetFontPathReply(cookie Cookie) (*GetFontPathReply, error)

func (*Conn) GetFontPathRequest

func (c *Conn) GetFontPathRequest() Cookie

func (*Conn) GetGeometry

func (c *Conn) GetGeometry(Drawable Id) (*GetGeometryReply, error)

func (*Conn) GetGeometryReply

func (c *Conn) GetGeometryReply(cookie Cookie) (*GetGeometryReply, error)

func (*Conn) GetGeometryRequest

func (c *Conn) GetGeometryRequest(Drawable Id) Cookie

func (*Conn) GetImage

func (c *Conn) GetImage(Format byte, Drawable Id, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32) (*GetImageReply, error)

func (*Conn) GetImageReply

func (c *Conn) GetImageReply(cookie Cookie) (*GetImageReply, error)

func (*Conn) GetImageRequest

func (c *Conn) GetImageRequest(Format byte, Drawable Id, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32) Cookie

func (*Conn) GetInputFocus

func (c *Conn) GetInputFocus() (*GetInputFocusReply, error)

func (*Conn) GetInputFocusReply

func (c *Conn) GetInputFocusReply(cookie Cookie) (*GetInputFocusReply, error)

func (*Conn) GetInputFocusRequest

func (c *Conn) GetInputFocusRequest() Cookie

func (*Conn) GetKeyboardControl

func (c *Conn) GetKeyboardControl() (*GetKeyboardControlReply, error)

func (*Conn) GetKeyboardControlReply

func (c *Conn) GetKeyboardControlReply(cookie Cookie) (*GetKeyboardControlReply, error)

func (*Conn) GetKeyboardControlRequest

func (c *Conn) GetKeyboardControlRequest() Cookie

func (*Conn) GetKeyboardMapping

func (c *Conn) GetKeyboardMapping(FirstKeycode byte, Count byte) (*GetKeyboardMappingReply, error)

func (*Conn) GetKeyboardMappingReply

func (c *Conn) GetKeyboardMappingReply(cookie Cookie) (*GetKeyboardMappingReply, error)

func (*Conn) GetKeyboardMappingRequest

func (c *Conn) GetKeyboardMappingRequest(FirstKeycode byte, Count byte) Cookie

func (*Conn) GetModifierMapping

func (c *Conn) GetModifierMapping() (*GetModifierMappingReply, error)

func (*Conn) GetModifierMappingReply

func (c *Conn) GetModifierMappingReply(cookie Cookie) (*GetModifierMappingReply, error)

func (*Conn) GetModifierMappingRequest

func (c *Conn) GetModifierMappingRequest() Cookie

func (*Conn) GetMotionEvents

func (c *Conn) GetMotionEvents(Window Id, Start Timestamp, Stop Timestamp) (*GetMotionEventsReply, error)

func (*Conn) GetMotionEventsReply

func (c *Conn) GetMotionEventsReply(cookie Cookie) (*GetMotionEventsReply, error)

func (*Conn) GetMotionEventsRequest

func (c *Conn) GetMotionEventsRequest(Window Id, Start Timestamp, Stop Timestamp) Cookie

func (*Conn) GetPointerControl

func (c *Conn) GetPointerControl() (*GetPointerControlReply, error)

func (*Conn) GetPointerControlReply

func (c *Conn) GetPointerControlReply(cookie Cookie) (*GetPointerControlReply, error)

func (*Conn) GetPointerControlRequest

func (c *Conn) GetPointerControlRequest() Cookie

func (*Conn) GetPointerMapping

func (c *Conn) GetPointerMapping() (*GetPointerMappingReply, error)

func (*Conn) GetPointerMappingReply

func (c *Conn) GetPointerMappingReply(cookie Cookie) (*GetPointerMappingReply, error)

func (*Conn) GetPointerMappingRequest

func (c *Conn) GetPointerMappingRequest() Cookie

func (*Conn) GetProperty

func (c *Conn) GetProperty(Delete bool, Window Id, Property Id, Type Id, LongOffset uint32, LongLength uint32) (*GetPropertyReply, error)

func (*Conn) GetPropertyReply

func (c *Conn) GetPropertyReply(cookie Cookie) (*GetPropertyReply, error)

func (*Conn) GetPropertyRequest

func (c *Conn) GetPropertyRequest(Delete bool, Window Id, Property Id, Type Id, LongOffset uint32, LongLength uint32) Cookie

func (*Conn) GetScreenSaver

func (c *Conn) GetScreenSaver() (*GetScreenSaverReply, error)

func (*Conn) GetScreenSaverReply

func (c *Conn) GetScreenSaverReply(cookie Cookie) (*GetScreenSaverReply, error)

func (*Conn) GetScreenSaverRequest

func (c *Conn) GetScreenSaverRequest() Cookie

func (*Conn) GetSelectionOwner

func (c *Conn) GetSelectionOwner(Selection Id) (*GetSelectionOwnerReply, error)

func (*Conn) GetSelectionOwnerReply

func (c *Conn) GetSelectionOwnerReply(cookie Cookie) (*GetSelectionOwnerReply, error)

func (*Conn) GetSelectionOwnerRequest

func (c *Conn) GetSelectionOwnerRequest(Selection Id) Cookie

func (*Conn) GetWindowAttributes

func (c *Conn) GetWindowAttributes(Window Id) (*GetWindowAttributesReply, error)

func (*Conn) GetWindowAttributesReply

func (c *Conn) GetWindowAttributesReply(cookie Cookie) (*GetWindowAttributesReply, error)

func (*Conn) GetWindowAttributesRequest

func (c *Conn) GetWindowAttributesRequest(Window Id) Cookie

func (*Conn) GrabButton

func (c *Conn) GrabButton(OwnerEvents bool, GrabWindow Id, EventMask uint16, PointerMode byte, KeyboardMode byte, ConfineTo Id, Cursor Id, Button byte, Modifiers uint16)

func (*Conn) GrabKey

func (c *Conn) GrabKey(OwnerEvents bool, GrabWindow Id, Modifiers uint16, Key byte, PointerMode byte, KeyboardMode byte)

func (*Conn) GrabKeyboard

func (c *Conn) GrabKeyboard(OwnerEvents bool, GrabWindow Id, Time Timestamp, PointerMode byte, KeyboardMode byte) (*GrabKeyboardReply, error)

func (*Conn) GrabKeyboardReply

func (c *Conn) GrabKeyboardReply(cookie Cookie) (*GrabKeyboardReply, error)

func (*Conn) GrabKeyboardRequest

func (c *Conn) GrabKeyboardRequest(OwnerEvents bool, GrabWindow Id, Time Timestamp, PointerMode byte, KeyboardMode byte) Cookie

func (*Conn) GrabPointer

func (c *Conn) GrabPointer(OwnerEvents bool, GrabWindow Id, EventMask uint16, PointerMode byte, KeyboardMode byte, ConfineTo Id, Cursor Id, Time Timestamp) (*GrabPointerReply, error)

func (*Conn) GrabPointerReply

func (c *Conn) GrabPointerReply(cookie Cookie) (*GrabPointerReply, error)

func (*Conn) GrabPointerRequest

func (c *Conn) GrabPointerRequest(OwnerEvents bool, GrabWindow Id, EventMask uint16, PointerMode byte, KeyboardMode byte, ConfineTo Id, Cursor Id, Time Timestamp) Cookie

func (*Conn) GrabServer

func (c *Conn) GrabServer()

func (*Conn) ImageText16

func (c *Conn) ImageText16(Drawable Id, Gc Id, X int16, Y int16, String []Char2b)

func (*Conn) ImageText8

func (c *Conn) ImageText8(Drawable Id, Gc Id, X int16, Y int16, String []byte)

func (*Conn) InstallColormap

func (c *Conn) InstallColormap(Cmap Id)

func (*Conn) InternAtom

func (c *Conn) InternAtom(OnlyIfExists bool, Name string) (*InternAtomReply, error)

func (*Conn) InternAtomReply

func (c *Conn) InternAtomReply(cookie Cookie) (*InternAtomReply, error)

func (*Conn) InternAtomRequest

func (c *Conn) InternAtomRequest(OnlyIfExists bool, Name string) Cookie

func (*Conn) KillClient

func (c *Conn) KillClient(Resource uint32)

func (*Conn) ListExtensions

func (c *Conn) ListExtensions() (*ListExtensionsReply, error)

func (*Conn) ListExtensionsReply

func (c *Conn) ListExtensionsReply(cookie Cookie) (*ListExtensionsReply, error)

func (*Conn) ListExtensionsRequest

func (c *Conn) ListExtensionsRequest() Cookie

func (*Conn) ListFonts

func (c *Conn) ListFonts(MaxNames uint16, Pattern []byte) (*ListFontsReply, error)

func (*Conn) ListFontsReply

func (c *Conn) ListFontsReply(cookie Cookie) (*ListFontsReply, error)

func (*Conn) ListFontsRequest

func (c *Conn) ListFontsRequest(MaxNames uint16, Pattern []byte) Cookie

func (*Conn) ListFontsWithInfo

func (c *Conn) ListFontsWithInfo(MaxNames uint16, Pattern []byte) (*ListFontsWithInfoReply, error)

func (*Conn) ListFontsWithInfoReply

func (c *Conn) ListFontsWithInfoReply(cookie Cookie) (*ListFontsWithInfoReply, error)

func (*Conn) ListFontsWithInfoRequest

func (c *Conn) ListFontsWithInfoRequest(MaxNames uint16, Pattern []byte) Cookie

func (*Conn) ListHosts

func (c *Conn) ListHosts() (*ListHostsReply, error)

func (*Conn) ListHostsReply

func (c *Conn) ListHostsReply(cookie Cookie) (*ListHostsReply, error)

func (*Conn) ListHostsRequest

func (c *Conn) ListHostsRequest() Cookie

func (*Conn) ListInstalledColormaps

func (c *Conn) ListInstalledColormaps(Window Id) (*ListInstalledColormapsReply, error)

func (*Conn) ListInstalledColormapsReply

func (c *Conn) ListInstalledColormapsReply(cookie Cookie) (*ListInstalledColormapsReply, error)

func (*Conn) ListInstalledColormapsRequest

func (c *Conn) ListInstalledColormapsRequest(Window Id) Cookie

func (*Conn) ListProperties

func (c *Conn) ListProperties(Window Id) (*ListPropertiesReply, error)

func (*Conn) ListPropertiesReply

func (c *Conn) ListPropertiesReply(cookie Cookie) (*ListPropertiesReply, error)

func (*Conn) ListPropertiesRequest

func (c *Conn) ListPropertiesRequest(Window Id) Cookie

func (*Conn) LookupColor

func (c *Conn) LookupColor(Cmap Id, Name string) (*LookupColorReply, error)

func (*Conn) LookupColorReply

func (c *Conn) LookupColorReply(cookie Cookie) (*LookupColorReply, error)

func (*Conn) LookupColorRequest

func (c *Conn) LookupColorRequest(Cmap Id, Name string) Cookie

func (*Conn) MapSubwindows

func (c *Conn) MapSubwindows(Window Id)

func (*Conn) MapWindow

func (c *Conn) MapWindow(Window Id)

func (*Conn) NewId

func (c *Conn) NewId() Id

NewID generates a new unused ID for use with requests like CreateWindow.

func (*Conn) NoOperation

func (c *Conn) NoOperation()

func (*Conn) OpenFont

func (c *Conn) OpenFont(Fid Id, Name string)

func (*Conn) PollForEvent

func (c *Conn) PollForEvent() (Event, error)

PollForEvent returns the next event from the server if one is available in the internal queue. It will not read from the connection, so you must call WaitForEvent to receive new events. Only use this function to empty the queue without blocking.

func (*Conn) PolyArc

func (c *Conn) PolyArc(Drawable Id, Gc Id, Arcs []Arc)

func (*Conn) PolyFillArc

func (c *Conn) PolyFillArc(Drawable Id, Gc Id, Arcs []Arc)

func (*Conn) PolyFillRectangle

func (c *Conn) PolyFillRectangle(Drawable Id, Gc Id, Rectangles []Rectangle)

func (*Conn) PolyLine

func (c *Conn) PolyLine(CoordinateMode byte, Drawable Id, Gc Id, Points []Point)

func (*Conn) PolyPoint

func (c *Conn) PolyPoint(CoordinateMode byte, Drawable Id, Gc Id, Points []Point)

func (*Conn) PolyRectangle

func (c *Conn) PolyRectangle(Drawable Id, Gc Id, Rectangles []Rectangle)

func (*Conn) PolySegment

func (c *Conn) PolySegment(Drawable Id, Gc Id, Segments []Segment)

func (*Conn) PolyText16

func (c *Conn) PolyText16(Drawable Id, Gc Id, X int16, Y int16, Items []byte)

func (*Conn) PolyText8

func (c *Conn) PolyText8(Drawable Id, Gc Id, X int16, Y int16, Items []byte)

func (*Conn) PutImage

func (c *Conn) PutImage(Format byte, Drawable Id, Gc Id, Width uint16, Height uint16, DstX int16, DstY int16, LeftPad byte, Depth byte, Data []byte)

func (*Conn) QueryBestSize

func (c *Conn) QueryBestSize(Class byte, Drawable Id, Width uint16, Height uint16) (*QueryBestSizeReply, error)

func (*Conn) QueryBestSizeReply

func (c *Conn) QueryBestSizeReply(cookie Cookie) (*QueryBestSizeReply, error)

func (*Conn) QueryBestSizeRequest

func (c *Conn) QueryBestSizeRequest(Class byte, Drawable Id, Width uint16, Height uint16) Cookie

func (*Conn) QueryColors

func (c *Conn) QueryColors(Cmap Id, Pixels []uint32) (*QueryColorsReply, error)

func (*Conn) QueryColorsReply

func (c *Conn) QueryColorsReply(cookie Cookie) (*QueryColorsReply, error)

func (*Conn) QueryColorsRequest

func (c *Conn) QueryColorsRequest(Cmap Id, Pixels []uint32) Cookie

func (*Conn) QueryExtension

func (c *Conn) QueryExtension(Name string) (*QueryExtensionReply, error)

func (*Conn) QueryExtensionReply

func (c *Conn) QueryExtensionReply(cookie Cookie) (*QueryExtensionReply, error)

func (*Conn) QueryExtensionRequest

func (c *Conn) QueryExtensionRequest(Name string) Cookie

func (*Conn) QueryFont

func (c *Conn) QueryFont(Font Id) (*QueryFontReply, error)

func (*Conn) QueryFontReply

func (c *Conn) QueryFontReply(cookie Cookie) (*QueryFontReply, error)

func (*Conn) QueryFontRequest

func (c *Conn) QueryFontRequest(Font Id) Cookie

func (*Conn) QueryKeymap

func (c *Conn) QueryKeymap() (*QueryKeymapReply, error)

func (*Conn) QueryKeymapReply

func (c *Conn) QueryKeymapReply(cookie Cookie) (*QueryKeymapReply, error)

func (*Conn) QueryKeymapRequest

func (c *Conn) QueryKeymapRequest() Cookie

func (*Conn) QueryPointer

func (c *Conn) QueryPointer(Window Id) (*QueryPointerReply, error)

func (*Conn) QueryPointerReply

func (c *Conn) QueryPointerReply(cookie Cookie) (*QueryPointerReply, error)

func (*Conn) QueryPointerRequest

func (c *Conn) QueryPointerRequest(Window Id) Cookie

func (*Conn) QueryTextExtents

func (c *Conn) QueryTextExtents(Font Id, String []Char2b) (*QueryTextExtentsReply, error)

func (*Conn) QueryTextExtentsReply

func (c *Conn) QueryTextExtentsReply(cookie Cookie) (*QueryTextExtentsReply, error)

func (*Conn) QueryTextExtentsRequest

func (c *Conn) QueryTextExtentsRequest(Font Id, String []Char2b) Cookie

func (*Conn) QueryTree

func (c *Conn) QueryTree(Window Id) (*QueryTreeReply, error)

func (*Conn) QueryTreeReply

func (c *Conn) QueryTreeReply(cookie Cookie) (*QueryTreeReply, error)

func (*Conn) QueryTreeRequest

func (c *Conn) QueryTreeRequest(Window Id) Cookie

func (*Conn) RecolorCursor

func (c *Conn) RecolorCursor(Cursor Id, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16)

func (*Conn) ReparentWindow

func (c *Conn) ReparentWindow(Window Id, Parent Id, X int16, Y int16)

func (*Conn) RotateProperties

func (c *Conn) RotateProperties(Window Id, Delta int16, Atoms []Id)

func (*Conn) SendEvent

func (c *Conn) SendEvent(Propagate bool, Destination Id, EventMask uint32, Event []byte)

func (*Conn) SetAccessControl

func (c *Conn) SetAccessControl(Mode byte)

func (*Conn) SetClipRectangles

func (c *Conn) SetClipRectangles(Ordering byte, Gc Id, ClipXOrigin int16, ClipYOrigin int16, Rectangles []Rectangle)

func (*Conn) SetCloseDownMode

func (c *Conn) SetCloseDownMode(Mode byte)

func (*Conn) SetDashes

func (c *Conn) SetDashes(Gc Id, DashOffset uint16, Dashes []byte)

func (*Conn) SetFontPath

func (c *Conn) SetFontPath(FontQty uint16, Path []byte)

func (*Conn) SetInputFocus

func (c *Conn) SetInputFocus(RevertTo byte, Focus Id, Time Timestamp)

func (*Conn) SetModifierMapping

func (c *Conn) SetModifierMapping(KeycodesPerModifier byte, Keycodes []byte) (*SetModifierMappingReply, error)

func (*Conn) SetModifierMappingReply

func (c *Conn) SetModifierMappingReply(cookie Cookie) (*SetModifierMappingReply, error)

func (*Conn) SetModifierMappingRequest

func (c *Conn) SetModifierMappingRequest(KeycodesPerModifier byte, Keycodes []byte) Cookie

func (*Conn) SetPointerMapping

func (c *Conn) SetPointerMapping(Map []byte) (*SetPointerMappingReply, error)

func (*Conn) SetPointerMappingReply

func (c *Conn) SetPointerMappingReply(cookie Cookie) (*SetPointerMappingReply, error)

func (*Conn) SetPointerMappingRequest

func (c *Conn) SetPointerMappingRequest(Map []byte) Cookie

func (*Conn) SetScreenSaver

func (c *Conn) SetScreenSaver(Timeout int16, Interval int16, PreferBlanking byte, AllowExposures byte)

func (*Conn) SetSelectionOwner

func (c *Conn) SetSelectionOwner(Owner Id, Selection Id, Time Timestamp)

func (*Conn) StoreColors

func (c *Conn) StoreColors(Cmap Id, Items []Coloritem)

func (*Conn) StoreNamedColor

func (c *Conn) StoreNamedColor(Flags byte, Cmap Id, Pixel uint32, Name string)

func (*Conn) TranslateCoordinates

func (c *Conn) TranslateCoordinates(SrcWindow Id, DstWindow Id, SrcX int16, SrcY int16) (*TranslateCoordinatesReply, error)

func (*Conn) TranslateCoordinatesReply

func (c *Conn) TranslateCoordinatesReply(cookie Cookie) (*TranslateCoordinatesReply, error)

func (*Conn) TranslateCoordinatesRequest

func (c *Conn) TranslateCoordinatesRequest(SrcWindow Id, DstWindow Id, SrcX int16, SrcY int16) Cookie

func (*Conn) UngrabButton

func (c *Conn) UngrabButton(Button byte, GrabWindow Id, Modifiers uint16)

func (*Conn) UngrabKey

func (c *Conn) UngrabKey(Key byte, GrabWindow Id, Modifiers uint16)

func (*Conn) UngrabKeyboard

func (c *Conn) UngrabKeyboard(Time Timestamp)

func (*Conn) UngrabPointer

func (c *Conn) UngrabPointer(Time Timestamp)

func (*Conn) UngrabServer

func (c *Conn) UngrabServer()

func (*Conn) UninstallColormap

func (c *Conn) UninstallColormap(Cmap Id)

func (*Conn) UnmapSubwindows

func (c *Conn) UnmapSubwindows(Window Id)

func (*Conn) UnmapWindow

func (c *Conn) UnmapWindow(Window Id)

func (*Conn) WaitForEvent

func (c *Conn) WaitForEvent() (Event, error)

WaitForEvent returns the next event from the server. It will block until an event is available.

func (*Conn) WarpPointer

func (c *Conn) WarpPointer(SrcWindow Id, DstWindow Id, SrcX int16, SrcY int16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16)
type Cookie uint16

Cookies are the sequence numbers used to pair replies up with their requests

type CreateNotifyEvent

type CreateNotifyEvent struct {
	Parent           Id
	Window           Id
	X                int16
	Y                int16
	Width            uint16
	Height           uint16
	BorderWidth      uint16
	OverrideRedirect bool
}

type DepthInfo

type DepthInfo struct {
	Depth      byte
	VisualsLen uint16
	Visuals    []VisualInfo
}

type DestroyNotifyEvent

type DestroyNotifyEvent struct {
	Event  Id
	Window Id
}

type EnterNotifyEvent

type EnterNotifyEvent struct {
	Detail          byte
	Time            Timestamp
	Root            Id
	Event           Id
	Child           Id
	RootX           int16
	RootY           int16
	EventX          int16
	EventY          int16
	State           uint16
	Mode            byte
	SameScreenFocus byte
}

type Error

type Error struct {
	Detail uint8
	Major  uint8
	Minor  uint16
	Cookie Cookie
	Id     Id
}

Error contains protocol errors returned to us by the X server.

func (*Error) Error

func (e *Error) Error() string

type Event

type Event interface{}

Event is an interface that can contain any of the events returned by the server. Use a type assertion switch to extract the Event structs.

type ExposeEvent

type ExposeEvent struct {
	Window Id
	X      uint16
	Y      uint16
	Width  uint16
	Height uint16
	Count  uint16
}

type FocusInEvent

type FocusInEvent struct {
	Detail byte
	Event  Id
	Mode   byte
}

type FocusOutEvent

type FocusOutEvent FocusInEvent

type Fontprop

type Fontprop struct {
	Name  Id
	Value uint32
}

type Format

type Format struct {
	Depth        byte
	BitsPerPixel byte
	ScanlinePad  byte
}

type GetAtomNameReply

type GetAtomNameReply struct {
	NameLen uint16
	Name    []byte
}

type GetFontPathReply

type GetFontPathReply struct {
	PathLen uint16
	Path    []Str
}

type GetGeometryReply

type GetGeometryReply struct {
	Depth       byte
	Root        Id
	X           int16
	Y           int16
	Width       uint16
	Height      uint16
	BorderWidth uint16
}

type GetImageReply

type GetImageReply struct {
	Depth  byte
	Length uint32
	Visual Id
	Data   []byte
}

type GetInputFocusReply

type GetInputFocusReply struct {
	RevertTo byte
	Focus    Id
}

type GetKeyboardControlReply

type GetKeyboardControlReply struct {
	GlobalAutoRepeat byte
	LedMask          uint32
	KeyClickPercent  byte
	BellPercent      byte
	BellPitch        uint16
	BellDuration     uint16
	AutoRepeats      [32]byte
}

type GetKeyboardMappingReply

type GetKeyboardMappingReply struct {
	KeysymsPerKeycode byte
	Length            uint32
	Keysyms           []Keysym
}

type GetModifierMappingReply

type GetModifierMappingReply struct {
	KeycodesPerModifier byte
	Keycodes            []byte
}

type GetMotionEventsReply

type GetMotionEventsReply struct {
	EventsLen uint32
	Events    []Timecoord
}

type GetPointerControlReply

type GetPointerControlReply struct {
	AccelerationNumerator   uint16
	AccelerationDenominator uint16
	Threshold               uint16
}

type GetPointerMappingReply

type GetPointerMappingReply struct {
	MapLen byte
	Map    []byte
}

type GetPropertyReply

type GetPropertyReply struct {
	Format     byte
	Type       Id
	BytesAfter uint32
	ValueLen   uint32
	Value      []byte
}

type GetScreenSaverReply

type GetScreenSaverReply struct {
	Timeout        uint16
	Interval       uint16
	PreferBlanking byte
	AllowExposures byte
}

type GetSelectionOwnerReply

type GetSelectionOwnerReply struct {
	Owner Id
}

type GetWindowAttributesReply

type GetWindowAttributesReply struct {
	BackingStore       byte
	Visual             Id
	Class              uint16
	BitGravity         byte
	WinGravity         byte
	BackingPlanes      uint32
	BackingPixel       uint32
	SaveUnder          bool
	MapIsInstalled     bool
	MapState           byte
	OverrideRedirect   bool
	Colormap           Id
	AllEventMasks      uint32
	YourEventMask      uint32
	DoNotPropagateMask uint16
}

type GrabKeyboardReply

type GrabKeyboardReply struct {
	Status byte
}

type GrabPointerReply

type GrabPointerReply struct {
	Status byte
}

type GraphicsExposureEvent

type GraphicsExposureEvent struct {
	Drawable    Id
	X           uint16
	Y           uint16
	Width       uint16
	Height      uint16
	MinorOpcode uint16
	Count       uint16
	MajorOpcode byte
}

type GravityNotifyEvent

type GravityNotifyEvent struct {
	Event  Id
	Window Id
	X      int16
	Y      int16
}

type Host

type Host struct {
	Family     byte
	AddressLen uint16
	Address    []byte
}

type Id

type Id uint32

Id is used for all X identifiers, such as windows, pixmaps, and GCs.

type InternAtomReply

type InternAtomReply struct {
	Atom Id
}

type KeyPressEvent

type KeyPressEvent struct {
	Detail     byte
	Time       Timestamp
	Root       Id
	Event      Id
	Child      Id
	RootX      int16
	RootY      int16
	EventX     int16
	EventY     int16
	State      uint16
	SameScreen bool
}

type KeyReleaseEvent

type KeyReleaseEvent KeyPressEvent

type KeymapNotifyEvent

type KeymapNotifyEvent struct {
	Keys [31]byte
}

type Keysym

type Keysym uint32

type LeaveNotifyEvent

type LeaveNotifyEvent EnterNotifyEvent

type ListExtensionsReply

type ListExtensionsReply struct {
	NamesLen byte
	Names    []Str
}

type ListFontsReply

type ListFontsReply struct {
	NamesLen uint16
	Names    []Str
}

type ListFontsWithInfoReply

type ListFontsWithInfoReply struct {
	NameLen        byte
	MinBounds      Charinfo
	MaxBounds      Charinfo
	MinCharOrByte2 uint16
	MaxCharOrByte2 uint16
	DefaultChar    uint16
	PropertiesLen  uint16
	DrawDirection  byte
	MinByte1       byte
	MaxByte1       byte
	AllCharsExist  bool
	FontAscent     int16
	FontDescent    int16
	RepliesHint    uint32
	Properties     []Fontprop
	Name           []byte
}

type ListHostsReply

type ListHostsReply struct {
	Mode     byte
	HostsLen uint16
	Hosts    []Host
}

type ListInstalledColormapsReply

type ListInstalledColormapsReply struct {
	CmapsLen uint16
	Cmaps    []Id
}

type ListPropertiesReply

type ListPropertiesReply struct {
	AtomsLen uint16
	Atoms    []Id
}

type LookupColorReply

type LookupColorReply struct {
	ExactRed    uint16
	ExactGreen  uint16
	ExactBlue   uint16
	VisualRed   uint16
	VisualGreen uint16
	VisualBlue  uint16
}

type MapNotifyEvent

type MapNotifyEvent struct {
	Event            Id
	Window           Id
	OverrideRedirect bool
}

type MapRequestEvent

type MapRequestEvent struct {
	Parent Id
	Window Id
}

type MappingNotifyEvent

type MappingNotifyEvent struct {
	Request      byte
	FirstKeycode byte
	Count        byte
}

type MotionNotifyEvent

type MotionNotifyEvent struct {
	Detail     byte
	Time       Timestamp
	Root       Id
	Event      Id
	Child      Id
	RootX      int16
	RootY      int16
	EventX     int16
	EventY     int16
	State      uint16
	SameScreen bool
}

type NoExposureEvent

type NoExposureEvent struct {
	Drawable    Id
	MinorOpcode uint16
	MajorOpcode byte
}

type Point

type Point struct {
	X int16
	Y int16
}

type PropertyNotifyEvent

type PropertyNotifyEvent struct {
	Window Id
	Atom   Id
	Time   Timestamp
	State  byte
}

type QueryBestSizeReply

type QueryBestSizeReply struct {
	Width  uint16
	Height uint16
}

type QueryColorsReply

type QueryColorsReply struct {
	ColorsLen uint16
	Colors    []Rgb
}

type QueryExtensionReply

type QueryExtensionReply struct {
	Present     bool
	MajorOpcode byte
	FirstEvent  byte
	FirstError  byte
}

type QueryFontReply

type QueryFontReply struct {
	MinBounds      Charinfo
	MaxBounds      Charinfo
	MinCharOrByte2 uint16
	MaxCharOrByte2 uint16
	DefaultChar    uint16
	PropertiesLen  uint16
	DrawDirection  byte
	MinByte1       byte
	MaxByte1       byte
	AllCharsExist  bool
	FontAscent     int16
	FontDescent    int16
	CharInfosLen   uint32
	Properties     []Fontprop
	CharInfos      []Charinfo
}

type QueryKeymapReply

type QueryKeymapReply struct {
	Keys [32]byte
}

type QueryPointerReply

type QueryPointerReply struct {
	SameScreen bool
	Root       Id
	Child      Id
	RootX      int16
	RootY      int16
	WinX       int16
	WinY       int16
	Mask       uint16
}

type QueryTextExtentsReply

type QueryTextExtentsReply struct {
	DrawDirection  byte
	FontAscent     int16
	FontDescent    int16
	OverallAscent  int16
	OverallDescent int16
	OverallWidth   int32
	OverallLeft    int32
	OverallRight   int32
}

type QueryTreeReply

type QueryTreeReply struct {
	Root        Id
	Parent      Id
	ChildrenLen uint16
	Children    []Id
}

type Rectangle

type Rectangle struct {
	X      int16
	Y      int16
	Width  uint16
	Height uint16
}

type ReparentNotifyEvent

type ReparentNotifyEvent struct {
	Event            Id
	Window           Id
	Parent           Id
	X                int16
	Y                int16
	OverrideRedirect bool
}

type ResizeRequestEvent

type ResizeRequestEvent struct {
	Window Id
	Width  uint16
	Height uint16
}

type Rgb

type Rgb struct {
	Red   uint16
	Green uint16
	Blue  uint16
}

type ScreenInfo

type ScreenInfo struct {
	Root                Id
	DefaultColormap     Id
	WhitePixel          uint32
	BlackPixel          uint32
	CurrentInputMasks   uint32
	WidthInPixels       uint16
	HeightInPixels      uint16
	WidthInMillimeters  uint16
	HeightInMillimeters uint16
	MinInstalledMaps    uint16
	MaxInstalledMaps    uint16
	RootVisual          Id
	BackingStores       byte
	SaveUnders          bool
	RootDepth           byte
	AllowedDepthsLen    byte
	AllowedDepths       []DepthInfo
}

type Segment

type Segment struct {
	X1 int16
	Y1 int16
	X2 int16
	Y2 int16
}

type SelectionClearEvent

type SelectionClearEvent struct {
	Time      Timestamp
	Owner     Id
	Selection Id
}

type SelectionNotifyEvent

type SelectionNotifyEvent struct {
	Time      Timestamp
	Requestor Id
	Selection Id
	Target    Id
	Property  Id
}

type SelectionRequestEvent

type SelectionRequestEvent struct {
	Time      Timestamp
	Owner     Id
	Requestor Id
	Selection Id
	Target    Id
	Property  Id
}

type SetModifierMappingReply

type SetModifierMappingReply struct {
	Status byte
}

type SetPointerMappingReply

type SetPointerMappingReply struct {
	Status byte
}

type SetupInfo

type SetupInfo struct {
	Status                   byte
	ProtocolMajorVersion     uint16
	ProtocolMinorVersion     uint16
	Length                   uint16
	ReleaseNumber            uint32
	ResourceIdBase           uint32
	ResourceIdMask           uint32
	MotionBufferSize         uint32
	VendorLen                uint16
	MaximumRequestLength     uint16
	RootsLen                 byte
	PixmapFormatsLen         byte
	ImageByteOrder           byte
	BitmapFormatBitOrder     byte
	BitmapFormatScanlineUnit byte
	BitmapFormatScanlinePad  byte
	MinKeycode               byte
	MaxKeycode               byte
	Vendor                   []byte
	PixmapFormats            []Format
	Roots                    []ScreenInfo
}

type Str

type Str struct {
	NameLen byte
	Name    []byte
}

type Timecoord

type Timecoord struct {
	Time Timestamp
	X    int16
	Y    int16
}

type Timestamp

type Timestamp uint32

type TranslateCoordinatesReply

type TranslateCoordinatesReply struct {
	SameScreen bool
	Child      Id
	DstX       uint16
	DstY       uint16
}

type UnmapNotifyEvent

type UnmapNotifyEvent struct {
	Event         Id
	Window        Id
	FromConfigure bool
}

type VisibilityNotifyEvent

type VisibilityNotifyEvent struct {
	Window Id
	State  byte
}

type VisualInfo

type VisualInfo struct {
	VisualId        Id
	Class           byte
	BitsPerRgbValue byte
	ColormapEntries uint16
	RedMask         uint32
	GreenMask       uint32
	BlueMask        uint32
}

Jump to

Keyboard shortcuts

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