// Code generated by xtgen; DO NOT EDIT. package xproto import "encoding/binary" type Char2b struct { Byte1 uint8 Byte2 uint8 } const Char2bSize = 2 func (v Char2b) Put(p []byte) { clear(p[:2]); p[0:][0] = byte(v.Byte1); p[1:][0] = byte(v.Byte2) } func GetChar2b(p []byte) (v Char2b) { _ = p[1] v.Byte1 = uint8(p[0:][0]) v.Byte2 = uint8(p[1:][0]) return } type Window uint32 type Pixmap uint32 type Cursor uint32 type Font uint32 type Gcontext uint32 type Colormap uint32 type Atom uint32 type Drawable uint32 type Fontable uint32 type Bool32 uint32 type Visualid uint32 type Timestamp uint32 type Keysym uint32 type Keycode uint8 type Keycode32 uint32 type Button uint8 type Point struct { X int16 Y int16 } const PointSize = 4 func (v Point) Put(p []byte) { clear(p[:4]) binary.LittleEndian.PutUint16(p[0:], uint16(v.X)) binary.LittleEndian.PutUint16(p[2:], uint16(v.Y)) } func GetPoint(p []byte) (v Point) { _ = p[3] v.X = int16(binary.LittleEndian.Uint16(p[0:])) v.Y = int16(binary.LittleEndian.Uint16(p[2:])) return } type Rectangle struct { X int16 Y int16 Width uint16 Height uint16 } const RectangleSize = 8 func (v Rectangle) Put(p []byte) { clear(p[:8]) binary.LittleEndian.PutUint16(p[0:], uint16(v.X)) binary.LittleEndian.PutUint16(p[2:], uint16(v.Y)) binary.LittleEndian.PutUint16(p[4:], uint16(v.Width)) binary.LittleEndian.PutUint16(p[6:], uint16(v.Height)) } func GetRectangle(p []byte) (v Rectangle) { _ = p[7] v.X = int16(binary.LittleEndian.Uint16(p[0:])) v.Y = int16(binary.LittleEndian.Uint16(p[2:])) v.Width = uint16(binary.LittleEndian.Uint16(p[4:])) v.Height = uint16(binary.LittleEndian.Uint16(p[6:])) return } type Arc struct { X int16 Y int16 Width uint16 Height uint16 Angle1 int16 Angle2 int16 } const ArcSize = 12 func (v Arc) Put(p []byte) { clear(p[:12]) binary.LittleEndian.PutUint16(p[0:], uint16(v.X)) binary.LittleEndian.PutUint16(p[2:], uint16(v.Y)) binary.LittleEndian.PutUint16(p[4:], uint16(v.Width)) binary.LittleEndian.PutUint16(p[6:], uint16(v.Height)) binary.LittleEndian.PutUint16(p[8:], uint16(v.Angle1)) binary.LittleEndian.PutUint16(p[10:], uint16(v.Angle2)) } func GetArc(p []byte) (v Arc) { _ = p[11] v.X = int16(binary.LittleEndian.Uint16(p[0:])) v.Y = int16(binary.LittleEndian.Uint16(p[2:])) v.Width = uint16(binary.LittleEndian.Uint16(p[4:])) v.Height = uint16(binary.LittleEndian.Uint16(p[6:])) v.Angle1 = int16(binary.LittleEndian.Uint16(p[8:])) v.Angle2 = int16(binary.LittleEndian.Uint16(p[10:])) return } type Format struct { Depth uint8 BitsPerPixel uint8 ScanlinePad uint8 } const FormatSize = 8 func (v Format) Put(p []byte) { clear(p[:8]) p[0:][0] = byte(v.Depth) p[1:][0] = byte(v.BitsPerPixel) p[2:][0] = byte(v.ScanlinePad) } func GetFormat(p []byte) (v Format) { _ = p[7] v.Depth = uint8(p[0:][0]) v.BitsPerPixel = uint8(p[1:][0]) v.ScanlinePad = uint8(p[2:][0]) return } type Visualtype struct { VisualId Visualid Class VisualClass BitsPerRgbValue uint8 ColormapEntries uint16 RedMask uint32 GreenMask uint32 BlueMask uint32 } const VisualtypeSize = 24 func (v Visualtype) Put(p []byte) { clear(p[:24]) binary.LittleEndian.PutUint32(p[0:], uint32(v.VisualId)) p[4:][0] = byte(v.Class) p[5:][0] = byte(v.BitsPerRgbValue) binary.LittleEndian.PutUint16(p[6:], uint16(v.ColormapEntries)) binary.LittleEndian.PutUint32(p[8:], uint32(v.RedMask)) binary.LittleEndian.PutUint32(p[12:], uint32(v.GreenMask)) binary.LittleEndian.PutUint32(p[16:], uint32(v.BlueMask)) } func GetVisualtype(p []byte) (v Visualtype) { _ = p[23] v.VisualId = Visualid(binary.LittleEndian.Uint32(p[0:])) v.Class = VisualClass(p[4:][0]) v.BitsPerRgbValue = uint8(p[5:][0]) v.ColormapEntries = uint16(binary.LittleEndian.Uint16(p[6:])) v.RedMask = uint32(binary.LittleEndian.Uint32(p[8:])) v.GreenMask = uint32(binary.LittleEndian.Uint32(p[12:])) v.BlueMask = uint32(binary.LittleEndian.Uint32(p[16:])) return } type Depth struct { Depth uint8 VisualsLen uint16 Visuals []Visualtype } const DepthSize = 8 func (v Depth) Size() int { off := 0 off += 1 off += 1 off += 2 off += 4 off += len(v.Visuals) * 24 return off } func (v Depth) Put(p []byte) { off := 0 p[off:][0] = byte(v.Depth) off += 1 clear(p[off : off+1]) off += 1 binary.LittleEndian.PutUint16(p[off:], uint16(v.VisualsLen)) off += 2 clear(p[off : off+4]) off += 4 for i := range v.Visuals { v.Visuals[i].Put(p[off+i*24:]) } off += len(v.Visuals) * 24 } type Screen struct { Root Window DefaultColormap Colormap WhitePixel uint32 BlackPixel uint32 CurrentInputMasks EventMask WidthInPixels uint16 HeightInPixels uint16 WidthInMillimeters uint16 HeightInMillimeters uint16 MinInstalledMaps uint16 MaxInstalledMaps uint16 RootVisual Visualid BackingStores BackingStore SaveUnders bool RootDepth uint8 AllowedDepthsLen uint8 AllowedDepths []Depth } const ScreenSize = 40 func (v Screen) Size() int { off := 0 off += 4 off += 4 off += 4 off += 4 off += 4 off += 2 off += 2 off += 2 off += 2 off += 2 off += 2 off += 4 off += 1 off += 1 off += 1 off += 1 for i := range v.AllowedDepths { off += v.AllowedDepths[i].Size() } return off } func (v Screen) Put(p []byte) { off := 0 binary.LittleEndian.PutUint32(p[off:], uint32(v.Root)) off += 4 binary.LittleEndian.PutUint32(p[off:], uint32(v.DefaultColormap)) off += 4 binary.LittleEndian.PutUint32(p[off:], uint32(v.WhitePixel)) off += 4 binary.LittleEndian.PutUint32(p[off:], uint32(v.BlackPixel)) off += 4 binary.LittleEndian.PutUint32(p[off:], uint32(v.CurrentInputMasks)) off += 4 binary.LittleEndian.PutUint16(p[off:], uint16(v.WidthInPixels)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.HeightInPixels)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.WidthInMillimeters)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.HeightInMillimeters)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.MinInstalledMaps)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.MaxInstalledMaps)) off += 2 binary.LittleEndian.PutUint32(p[off:], uint32(v.RootVisual)) off += 4 p[off:][0] = byte(v.BackingStores) off += 1 if v.SaveUnders { p[off:][0] = 1 } else { p[off:][0] = 0 } off += 1 p[off:][0] = byte(v.RootDepth) off += 1 p[off:][0] = byte(v.AllowedDepthsLen) off += 1 for i := range v.AllowedDepths { v.AllowedDepths[i].Put(p[off:]) off += v.AllowedDepths[i].Size() } } type SetupRequest struct { ByteOrder uint8 ProtocolMajorVersion uint16 ProtocolMinorVersion uint16 AuthorizationProtocolNameLen uint16 AuthorizationProtocolDataLen uint16 AuthorizationProtocolName string AuthorizationProtocolData string } const SetupRequestSize = 12 func (v SetupRequest) Size() int { off := 0 off += 1 off += 1 off += 2 off += 2 off += 2 off += 2 off += 2 off += len(v.AuthorizationProtocolName) * 1 off = (off + 3) &^ 3 off += len(v.AuthorizationProtocolData) * 1 off = (off + 3) &^ 3 return off } func (v SetupRequest) Put(p []byte) { off := 0 p[off:][0] = byte(v.ByteOrder) off += 1 clear(p[off : off+1]) off += 1 binary.LittleEndian.PutUint16(p[off:], uint16(v.ProtocolMajorVersion)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.ProtocolMinorVersion)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.AuthorizationProtocolNameLen)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.AuthorizationProtocolDataLen)) off += 2 clear(p[off : off+2]) off += 2 for i := range v.AuthorizationProtocolName { p[off+i*1:][0] = byte(v.AuthorizationProtocolName[i]) } off += len(v.AuthorizationProtocolName) * 1 { next := (off + 3) &^ 3 clear(p[off:next]) off = next } for i := range v.AuthorizationProtocolData { p[off+i*1:][0] = byte(v.AuthorizationProtocolData[i]) } off += len(v.AuthorizationProtocolData) * 1 { next := (off + 3) &^ 3 clear(p[off:next]) off = next } } type SetupFailed struct { Status uint8 ReasonLen uint8 ProtocolMajorVersion uint16 ProtocolMinorVersion uint16 Length uint16 Reason string } const SetupFailedSize = 8 func (v SetupFailed) Size() int { off := 0 off += 1 off += 1 off += 2 off += 2 off += 2 off += len(v.Reason) * 1 return off } func (v SetupFailed) Put(p []byte) { off := 0 p[off:][0] = byte(v.Status) off += 1 p[off:][0] = byte(v.ReasonLen) off += 1 binary.LittleEndian.PutUint16(p[off:], uint16(v.ProtocolMajorVersion)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.ProtocolMinorVersion)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.Length)) off += 2 for i := range v.Reason { p[off+i*1:][0] = byte(v.Reason[i]) } off += len(v.Reason) * 1 } type SetupAuthenticate struct { Status uint8 Length uint16 Reason string } const SetupAuthenticateSize = 8 func (v SetupAuthenticate) Size() int { off := 0 off += 1 off += 5 off += 2 off += len(v.Reason) * 1 return off } func (v SetupAuthenticate) Put(p []byte) { off := 0 p[off:][0] = byte(v.Status) off += 1 clear(p[off : off+5]) off += 5 binary.LittleEndian.PutUint16(p[off:], uint16(v.Length)) off += 2 for i := range v.Reason { p[off+i*1:][0] = byte(v.Reason[i]) } off += len(v.Reason) * 1 } type Setup struct { Status uint8 ProtocolMajorVersion uint16 ProtocolMinorVersion uint16 Length uint16 ReleaseNumber uint32 ResourceIdBase uint32 ResourceIdMask uint32 MotionBufferSize uint32 VendorLen uint16 MaximumRequestLength uint16 RootsLen uint8 PixmapFormatsLen uint8 ImageByteOrder ImageOrder BitmapFormatBitOrder ImageOrder BitmapFormatScanlineUnit uint8 BitmapFormatScanlinePad uint8 MinKeycode Keycode MaxKeycode Keycode Vendor string PixmapFormats []Format Roots []Screen } const SetupSize = 40 func (v Setup) Size() int { off := 0 off += 1 off += 1 off += 2 off += 2 off += 2 off += 4 off += 4 off += 4 off += 4 off += 2 off += 2 off += 1 off += 1 off += 1 off += 1 off += 1 off += 1 off += 1 off += 1 off += 4 off += len(v.Vendor) * 1 off = (off + 3) &^ 3 off += len(v.PixmapFormats) * 8 for i := range v.Roots { off += v.Roots[i].Size() } return off } func (v Setup) Put(p []byte) { off := 0 p[off:][0] = byte(v.Status) off += 1 clear(p[off : off+1]) off += 1 binary.LittleEndian.PutUint16(p[off:], uint16(v.ProtocolMajorVersion)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.ProtocolMinorVersion)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.Length)) off += 2 binary.LittleEndian.PutUint32(p[off:], uint32(v.ReleaseNumber)) off += 4 binary.LittleEndian.PutUint32(p[off:], uint32(v.ResourceIdBase)) off += 4 binary.LittleEndian.PutUint32(p[off:], uint32(v.ResourceIdMask)) off += 4 binary.LittleEndian.PutUint32(p[off:], uint32(v.MotionBufferSize)) off += 4 binary.LittleEndian.PutUint16(p[off:], uint16(v.VendorLen)) off += 2 binary.LittleEndian.PutUint16(p[off:], uint16(v.MaximumRequestLength)) off += 2 p[off:][0] = byte(v.RootsLen) off += 1 p[off:][0] = byte(v.PixmapFormatsLen) off += 1 p[off:][0] = byte(v.ImageByteOrder) off += 1 p[off:][0] = byte(v.BitmapFormatBitOrder) off += 1 p[off:][0] = byte(v.BitmapFormatScanlineUnit) off += 1 p[off:][0] = byte(v.BitmapFormatScanlinePad) off += 1 p[off:][0] = byte(v.MinKeycode) off += 1 p[off:][0] = byte(v.MaxKeycode) off += 1 clear(p[off : off+4]) off += 4 for i := range v.Vendor { p[off+i*1:][0] = byte(v.Vendor[i]) } off += len(v.Vendor) * 1 { next := (off + 3) &^ 3 clear(p[off:next]) off = next } for i := range v.PixmapFormats { v.PixmapFormats[i].Put(p[off+i*8:]) } off += len(v.PixmapFormats) * 8 for i := range v.Roots { v.Roots[i].Put(p[off:]) off += v.Roots[i].Size() } } type ClientMessageData struct{ raw []byte } const ClientMessageDataSize = 20 func GetClientMessageData(p []byte) ClientMessageData { return ClientMessageData{raw: p[:20]} } func (v ClientMessageData) Put(p []byte) { copy(p[:20], v.raw) } func (v ClientMessageData) Data8() (out [20]uint8) { for i := range out { out[i] = uint8(v.raw[i*1:][0]) } return } func (v ClientMessageData) Data16() (out [10]uint16) { for i := range out { out[i] = uint16(binary.LittleEndian.Uint16(v.raw[i*2:])) } return } func (v ClientMessageData) Data32() (out [5]uint32) { for i := range out { out[i] = uint32(binary.LittleEndian.Uint32(v.raw[i*4:])) } return } type Timecoord struct { Time Timestamp X int16 Y int16 } const TimecoordSize = 8 func (v Timecoord) Put(p []byte) { clear(p[:8]) binary.LittleEndian.PutUint32(p[0:], uint32(v.Time)) binary.LittleEndian.PutUint16(p[4:], uint16(v.X)) binary.LittleEndian.PutUint16(p[6:], uint16(v.Y)) } func GetTimecoord(p []byte) (v Timecoord) { _ = p[7] v.Time = Timestamp(binary.LittleEndian.Uint32(p[0:])) v.X = int16(binary.LittleEndian.Uint16(p[4:])) v.Y = int16(binary.LittleEndian.Uint16(p[6:])) return } type Fontprop struct { Name Atom Value uint32 } const FontpropSize = 8 func (v Fontprop) Put(p []byte) { clear(p[:8]) binary.LittleEndian.PutUint32(p[0:], uint32(v.Name)) binary.LittleEndian.PutUint32(p[4:], uint32(v.Value)) } func GetFontprop(p []byte) (v Fontprop) { _ = p[7] v.Name = Atom(binary.LittleEndian.Uint32(p[0:])) v.Value = uint32(binary.LittleEndian.Uint32(p[4:])) return } type Charinfo struct { LeftSideBearing int16 RightSideBearing int16 CharacterWidth int16 Ascent int16 Descent int16 Attributes uint16 } const CharinfoSize = 12 func (v Charinfo) Put(p []byte) { clear(p[:12]) binary.LittleEndian.PutUint16(p[0:], uint16(v.LeftSideBearing)) binary.LittleEndian.PutUint16(p[2:], uint16(v.RightSideBearing)) binary.LittleEndian.PutUint16(p[4:], uint16(v.CharacterWidth)) binary.LittleEndian.PutUint16(p[6:], uint16(v.Ascent)) binary.LittleEndian.PutUint16(p[8:], uint16(v.Descent)) binary.LittleEndian.PutUint16(p[10:], uint16(v.Attributes)) } func GetCharinfo(p []byte) (v Charinfo) { _ = p[11] v.LeftSideBearing = int16(binary.LittleEndian.Uint16(p[0:])) v.RightSideBearing = int16(binary.LittleEndian.Uint16(p[2:])) v.CharacterWidth = int16(binary.LittleEndian.Uint16(p[4:])) v.Ascent = int16(binary.LittleEndian.Uint16(p[6:])) v.Descent = int16(binary.LittleEndian.Uint16(p[8:])) v.Attributes = uint16(binary.LittleEndian.Uint16(p[10:])) return } type Str struct { NameLen uint8 Name string } const StrSize = 1 func (v Str) Size() int { off := 0; off += 1; off += len(v.Name) * 1; return off } func (v Str) Put(p []byte) { off := 0 p[off:][0] = byte(v.NameLen) off += 1 for i := range v.Name { p[off+i*1:][0] = byte(v.Name[i]) } off += len(v.Name) * 1 } type Segment struct { X1 int16 Y1 int16 X2 int16 Y2 int16 } const SegmentSize = 8 func (v Segment) Put(p []byte) { clear(p[:8]) binary.LittleEndian.PutUint16(p[0:], uint16(v.X1)) binary.LittleEndian.PutUint16(p[2:], uint16(v.Y1)) binary.LittleEndian.PutUint16(p[4:], uint16(v.X2)) binary.LittleEndian.PutUint16(p[6:], uint16(v.Y2)) } func GetSegment(p []byte) (v Segment) { _ = p[7] v.X1 = int16(binary.LittleEndian.Uint16(p[0:])) v.Y1 = int16(binary.LittleEndian.Uint16(p[2:])) v.X2 = int16(binary.LittleEndian.Uint16(p[4:])) v.Y2 = int16(binary.LittleEndian.Uint16(p[6:])) return } type Coloritem struct { Pixel uint32 Red uint16 Green uint16 Blue uint16 Flags ColorFlag } const ColoritemSize = 12 func (v Coloritem) Put(p []byte) { clear(p[:12]) binary.LittleEndian.PutUint32(p[0:], uint32(v.Pixel)) binary.LittleEndian.PutUint16(p[4:], uint16(v.Red)) binary.LittleEndian.PutUint16(p[6:], uint16(v.Green)) binary.LittleEndian.PutUint16(p[8:], uint16(v.Blue)) p[10:][0] = byte(v.Flags) } func GetColoritem(p []byte) (v Coloritem) { _ = p[11] v.Pixel = uint32(binary.LittleEndian.Uint32(p[0:])) v.Red = uint16(binary.LittleEndian.Uint16(p[4:])) v.Green = uint16(binary.LittleEndian.Uint16(p[6:])) v.Blue = uint16(binary.LittleEndian.Uint16(p[8:])) v.Flags = ColorFlag(p[10:][0]) return } type Rgb struct { Red uint16 Green uint16 Blue uint16 } const RgbSize = 8 func (v Rgb) Put(p []byte) { clear(p[:8]) binary.LittleEndian.PutUint16(p[0:], uint16(v.Red)) binary.LittleEndian.PutUint16(p[2:], uint16(v.Green)) binary.LittleEndian.PutUint16(p[4:], uint16(v.Blue)) } func GetRgb(p []byte) (v Rgb) { _ = p[7] v.Red = uint16(binary.LittleEndian.Uint16(p[0:])) v.Green = uint16(binary.LittleEndian.Uint16(p[2:])) v.Blue = uint16(binary.LittleEndian.Uint16(p[4:])) return } type Host struct { Family Family AddressLen uint16 Address []byte } const HostSize = 4 func (v Host) Size() int { off := 0 off += 1 off += 1 off += 2 off += len(v.Address) * 1 off = (off + 3) &^ 3 return off } func (v Host) Put(p []byte) { off := 0 p[off:][0] = byte(v.Family) off += 1 clear(p[off : off+1]) off += 1 binary.LittleEndian.PutUint16(p[off:], uint16(v.AddressLen)) off += 2 for i := range v.Address { p[off+i*1:][0] = byte(v.Address[i]) } off += len(v.Address) * 1 { next := (off + 3) &^ 3 clear(p[off:next]) off = next } } type VisualClass uint8 const VisualClassStaticGray VisualClass = 0 const VisualClassGrayScale VisualClass = 1 const VisualClassStaticColor VisualClass = 2 const VisualClassPseudoColor VisualClass = 3 const VisualClassTrueColor VisualClass = 4 const VisualClassDirectColor VisualClass = 5 type EventMask uint32 const EventMaskNoEvent EventMask = 0 const EventMaskKeyPress EventMask = 1 const EventMaskKeyRelease EventMask = 2 const EventMaskButtonPress EventMask = 4 const EventMaskButtonRelease EventMask = 8 const EventMaskEnterWindow EventMask = 16 const EventMaskLeaveWindow EventMask = 32 const EventMaskPointerMotion EventMask = 64 const EventMaskPointerMotionHint EventMask = 128 const EventMaskButton1Motion EventMask = 256 const EventMaskButton2Motion EventMask = 512 const EventMaskButton3Motion EventMask = 1024 const EventMaskButton4Motion EventMask = 2048 const EventMaskButton5Motion EventMask = 4096 const EventMaskButtonMotion EventMask = 8192 const EventMaskKeymapState EventMask = 16384 const EventMaskExposure EventMask = 32768 const EventMaskVisibilityChange EventMask = 65536 const EventMaskStructureNotify EventMask = 131072 const EventMaskResizeRedirect EventMask = 262144 const EventMaskSubstructureNotify EventMask = 524288 const EventMaskSubstructureRedirect EventMask = 1048576 const EventMaskFocusChange EventMask = 2097152 const EventMaskPropertyChange EventMask = 4194304 const EventMaskColorMapChange EventMask = 8388608 const EventMaskOwnerGrabButton EventMask = 16777216 type BackingStore uint32 const BackingStoreNotUseful BackingStore = 0 const BackingStoreWhenMapped BackingStore = 1 const BackingStoreAlways BackingStore = 2 type ImageOrder uint8 const ImageOrderLSBFirst ImageOrder = 0 const ImageOrderMSBFirst ImageOrder = 1 type ModMask uint16 const ModMaskShift ModMask = 1 const ModMaskLock ModMask = 2 const ModMaskControl ModMask = 4 const ModMaskX1 ModMask = 8 const ModMaskX2 ModMask = 16 const ModMaskX3 ModMask = 32 const ModMaskX4 ModMask = 64 const ModMaskX5 ModMask = 128 const ModMaskAny ModMask = 32768 type KeyButMask uint16 const KeyButMaskShift KeyButMask = 1 const KeyButMaskLock KeyButMask = 2 const KeyButMaskControl KeyButMask = 4 const KeyButMaskMod1 KeyButMask = 8 const KeyButMaskMod2 KeyButMask = 16 const KeyButMaskMod3 KeyButMask = 32 const KeyButMaskMod4 KeyButMask = 64 const KeyButMaskMod5 KeyButMask = 128 const KeyButMaskButton1 KeyButMask = 256 const KeyButMaskButton2 KeyButMask = 512 const KeyButMaskButton3 KeyButMask = 1024 const KeyButMaskButton4 KeyButMask = 2048 const KeyButMaskButton5 KeyButMask = 4096 const WindowNone Window = 0 type ButtonMask uint32 const ButtonMaskX1 ButtonMask = 256 const ButtonMaskX2 ButtonMask = 512 const ButtonMaskX3 ButtonMask = 1024 const ButtonMaskX4 ButtonMask = 2048 const ButtonMaskX5 ButtonMask = 4096 const ButtonMaskAny ButtonMask = 32768 type Motion uint8 const MotionNormal Motion = 0 const MotionHint Motion = 1 type NotifyDetail uint8 const NotifyDetailAncestor NotifyDetail = 0 const NotifyDetailVirtual NotifyDetail = 1 const NotifyDetailInferior NotifyDetail = 2 const NotifyDetailNonlinear NotifyDetail = 3 const NotifyDetailNonlinearVirtual NotifyDetail = 4 const NotifyDetailPointer NotifyDetail = 5 const NotifyDetailPointerRoot NotifyDetail = 6 const NotifyDetailNone NotifyDetail = 7 type NotifyMode uint8 const NotifyModeNormal NotifyMode = 0 const NotifyModeGrab NotifyMode = 1 const NotifyModeUngrab NotifyMode = 2 const NotifyModeWhileGrabbed NotifyMode = 3 type Visibility uint8 const VisibilityUnobscured Visibility = 0 const VisibilityPartiallyObscured Visibility = 1 const VisibilityFullyObscured Visibility = 2 type Place uint8 const PlaceOnTop Place = 0 const PlaceOnBottom Place = 1 type Property uint8 const PropertyNewValue Property = 0 const PropertyDelete Property = 1 type Time uint32 const TimeCurrentTime Time = 0 const AtomNone Atom = 0 const AtomAny Atom = 0 const AtomPrimary Atom = 1 const AtomSecondary Atom = 2 const AtomArc Atom = 3 const AtomAtom Atom = 4 const AtomBitmap Atom = 5 const AtomCardinal Atom = 6 const AtomColormap Atom = 7 const AtomCursor Atom = 8 const AtomCutBuffer0 Atom = 9 const AtomCutBuffer1 Atom = 10 const AtomCutBuffer2 Atom = 11 const AtomCutBuffer3 Atom = 12 const AtomCutBuffer4 Atom = 13 const AtomCutBuffer5 Atom = 14 const AtomCutBuffer6 Atom = 15 const AtomCutBuffer7 Atom = 16 const AtomDrawable Atom = 17 const AtomFont Atom = 18 const AtomInteger Atom = 19 const AtomPixmap Atom = 20 const AtomPoint Atom = 21 const AtomRectangle Atom = 22 const AtomResourceManager Atom = 23 const AtomRgbColorMap Atom = 24 const AtomRgbBestMap Atom = 25 const AtomRgbBlueMap Atom = 26 const AtomRgbDefaultMap Atom = 27 const AtomRgbGrayMap Atom = 28 const AtomRgbGreenMap Atom = 29 const AtomRgbRedMap Atom = 30 const AtomString Atom = 31 const AtomVisualid Atom = 32 const AtomWindow Atom = 33 const AtomWmCommand Atom = 34 const AtomWmHints Atom = 35 const AtomWmClientMachine Atom = 36 const AtomWmIconName Atom = 37 const AtomWmIconSize Atom = 38 const AtomWmName Atom = 39 const AtomWmNormalHints Atom = 40 const AtomWmSizeHints Atom = 41 const AtomWmZoomHints Atom = 42 const AtomMinSpace Atom = 43 const AtomNormSpace Atom = 44 const AtomMaxSpace Atom = 45 const AtomEndSpace Atom = 46 const AtomSuperscriptX Atom = 47 const AtomSuperscriptY Atom = 48 const AtomSubscriptX Atom = 49 const AtomSubscriptY Atom = 50 const AtomUnderlinePosition Atom = 51 const AtomUnderlineThickness Atom = 52 const AtomStrikeoutAscent Atom = 53 const AtomStrikeoutDescent Atom = 54 const AtomItalicAngle Atom = 55 const AtomXHeight Atom = 56 const AtomQuadWidth Atom = 57 const AtomWeight Atom = 58 const AtomPointSize Atom = 59 const AtomResolution Atom = 60 const AtomCopyright Atom = 61 const AtomNotice Atom = 62 const AtomFontName Atom = 63 const AtomFamilyName Atom = 64 const AtomFullName Atom = 65 const AtomCapHeight Atom = 66 const AtomWmClass Atom = 67 const AtomWmTransientFor Atom = 68 type ColormapState uint8 const ColormapStateUninstalled ColormapState = 0 const ColormapStateInstalled ColormapState = 1 const ColormapNone Colormap = 0 type Mapping uint8 const MappingModifier Mapping = 0 const MappingKeyboard Mapping = 1 const MappingPointer Mapping = 2 type WindowClass uint16 const WindowClassCopyFromParent WindowClass = 0 const WindowClassInputOutput WindowClass = 1 const WindowClassInputOnly WindowClass = 2 type Cw uint32 const CwBackPixmap Cw = 1 const CwBackPixel Cw = 2 const CwBorderPixmap Cw = 4 const CwBorderPixel Cw = 8 const CwBitGravity Cw = 16 const CwWinGravity Cw = 32 const CwBackingStore Cw = 64 const CwBackingPlanes Cw = 128 const CwBackingPixel Cw = 256 const CwOverrideRedirect Cw = 512 const CwSaveUnder Cw = 1024 const CwEventMask Cw = 2048 const CwDontPropagate Cw = 4096 const CwColormap Cw = 8192 const CwCursor Cw = 16384 type BackPixmap uint32 const BackPixmapNone BackPixmap = 0 const BackPixmapParentRelative BackPixmap = 1 type Gravity uint32 const GravityBitForget Gravity = 0 const GravityWinUnmap Gravity = 0 const GravityNorthWest Gravity = 1 const GravityNorth Gravity = 2 const GravityNorthEast Gravity = 3 const GravityWest Gravity = 4 const GravityCenter Gravity = 5 const GravityEast Gravity = 6 const GravitySouthWest Gravity = 7 const GravitySouth Gravity = 8 const GravitySouthEast Gravity = 9 const GravityStatic Gravity = 10 type MapState uint8 const MapStateUnmapped MapState = 0 const MapStateUnviewable MapState = 1 const MapStateViewable MapState = 2 type SetMode uint8 const SetModeInsert SetMode = 0 const SetModeDelete SetMode = 1 type ConfigWindow uint16 const ConfigWindowX ConfigWindow = 1 const ConfigWindowY ConfigWindow = 2 const ConfigWindowWidth ConfigWindow = 4 const ConfigWindowHeight ConfigWindow = 8 const ConfigWindowBorderWidth ConfigWindow = 16 const ConfigWindowSibling ConfigWindow = 32 const ConfigWindowStackMode ConfigWindow = 64 type StackMode uint32 const StackModeAbove StackMode = 0 const StackModeBelow StackMode = 1 const StackModeTopIf StackMode = 2 const StackModeBottomIf StackMode = 3 const StackModeOpposite StackMode = 4 type Circulate uint8 const CirculateRaiseLowest Circulate = 0 const CirculateLowerHighest Circulate = 1 type PropMode uint8 const PropModeReplace PropMode = 0 const PropModePrepend PropMode = 1 const PropModeAppend PropMode = 2 type GetPropertyType uint32 const GetPropertyTypeAny GetPropertyType = 0 type SendEventDest uint32 const SendEventDestPointerWindow SendEventDest = 0 const SendEventDestItemFocus SendEventDest = 1 type GrabMode uint8 const GrabModeSync GrabMode = 0 const GrabModeAsync GrabMode = 1 type GrabStatus uint8 const GrabStatusSuccess GrabStatus = 0 const GrabStatusAlreadyGrabbed GrabStatus = 1 const GrabStatusInvalidTime GrabStatus = 2 const GrabStatusNotViewable GrabStatus = 3 const GrabStatusFrozen GrabStatus = 4 const CursorNone Cursor = 0 type ButtonIndex uint8 const ButtonIndexAny ButtonIndex = 0 const ButtonIndexX1 ButtonIndex = 1 const ButtonIndexX2 ButtonIndex = 2 const ButtonIndexX3 ButtonIndex = 3 const ButtonIndexX4 ButtonIndex = 4 const ButtonIndexX5 ButtonIndex = 5 type Grab uint8 const GrabAny Grab = 0 type Allow uint8 const AllowAsyncPointer Allow = 0 const AllowSyncPointer Allow = 1 const AllowReplayPointer Allow = 2 const AllowAsyncKeyboard Allow = 3 const AllowSyncKeyboard Allow = 4 const AllowReplayKeyboard Allow = 5 const AllowAsyncBoth Allow = 6 const AllowSyncBoth Allow = 7 type InputFocus uint32 const InputFocusNone InputFocus = 0 const InputFocusPointerRoot InputFocus = 1 const InputFocusParent InputFocus = 2 const InputFocusFollowKeyboard InputFocus = 3 type FontDraw uint8 const FontDrawLeftToRight FontDraw = 0 const FontDrawRightToLeft FontDraw = 1 type Gc uint32 const GcFunction Gc = 1 const GcPlaneMask Gc = 2 const GcForeground Gc = 4 const GcBackground Gc = 8 const GcLineWidth Gc = 16 const GcLineStyle Gc = 32 const GcCapStyle Gc = 64 const GcJoinStyle Gc = 128 const GcFillStyle Gc = 256 const GcFillRule Gc = 512 const GcTile Gc = 1024 const GcStipple Gc = 2048 const GcTileStippleOriginX Gc = 4096 const GcTileStippleOriginY Gc = 8192 const GcFont Gc = 16384 const GcSubwindowMode Gc = 32768 const GcGraphicsExposures Gc = 65536 const GcClipOriginX Gc = 131072 const GcClipOriginY Gc = 262144 const GcClipMask Gc = 524288 const GcDashOffset Gc = 1048576 const GcDashList Gc = 2097152 const GcArcMode Gc = 4194304 type Gx uint32 const GxClear Gx = 0 const GxAnd Gx = 1 const GxAndReverse Gx = 2 const GxCopy Gx = 3 const GxAndInverted Gx = 4 const GxNoop Gx = 5 const GxXor Gx = 6 const GxOr Gx = 7 const GxNor Gx = 8 const GxEquiv Gx = 9 const GxInvert Gx = 10 const GxOrReverse Gx = 11 const GxCopyInverted Gx = 12 const GxOrInverted Gx = 13 const GxNand Gx = 14 const GxSet Gx = 15 type LineStyle uint32 const LineStyleSolid LineStyle = 0 const LineStyleOnOffDash LineStyle = 1 const LineStyleDoubleDash LineStyle = 2 type CapStyle uint32 const CapStyleNotLast CapStyle = 0 const CapStyleButt CapStyle = 1 const CapStyleRound CapStyle = 2 const CapStyleProjecting CapStyle = 3 type JoinStyle uint32 const JoinStyleMiter JoinStyle = 0 const JoinStyleRound JoinStyle = 1 const JoinStyleBevel JoinStyle = 2 type FillStyle uint32 const FillStyleSolid FillStyle = 0 const FillStyleTiled FillStyle = 1 const FillStyleStippled FillStyle = 2 const FillStyleOpaqueStippled FillStyle = 3 type FillRule uint32 const FillRuleEvenOdd FillRule = 0 const FillRuleWinding FillRule = 1 type SubwindowMode uint32 const SubwindowModeClipByChildren SubwindowMode = 0 const SubwindowModeIncludeInferiors SubwindowMode = 1 type ArcMode uint32 const ArcModeChord ArcMode = 0 const ArcModePieSlice ArcMode = 1 type ClipOrdering uint8 const ClipOrderingUnsorted ClipOrdering = 0 const ClipOrderingYSorted ClipOrdering = 1 const ClipOrderingYXSorted ClipOrdering = 2 const ClipOrderingYXBanded ClipOrdering = 3 type CoordMode uint8 const CoordModeOrigin CoordMode = 0 const CoordModePrevious CoordMode = 1 type PolyShape uint8 const PolyShapeComplex PolyShape = 0 const PolyShapeNonconvex PolyShape = 1 const PolyShapeConvex PolyShape = 2 type ImageFormat uint8 const ImageFormatXYBitmap ImageFormat = 0 const ImageFormatXYPixmap ImageFormat = 1 const ImageFormatZPixmap ImageFormat = 2 type ColormapAlloc uint8 const ColormapAllocNone ColormapAlloc = 0 const ColormapAllocAll ColormapAlloc = 1 type ColorFlag uint8 const ColorFlagRed ColorFlag = 1 const ColorFlagGreen ColorFlag = 2 const ColorFlagBlue ColorFlag = 4 const PixmapNone Pixmap = 0 const FontNone Font = 0 type QueryShapeOf uint8 const QueryShapeOfLargestCursor QueryShapeOf = 0 const QueryShapeOfFastestTile QueryShapeOf = 1 const QueryShapeOfFastestStipple QueryShapeOf = 2 type Kb uint32 const KbKeyClickPercent Kb = 1 const KbBellPercent Kb = 2 const KbBellPitch Kb = 4 const KbBellDuration Kb = 8 const KbLed Kb = 16 const KbLedMode Kb = 32 const KbKey Kb = 64 const KbAutoRepeatMode Kb = 128 type LedMode uint32 const LedModeOff LedMode = 0 const LedModeOn LedMode = 1 type AutoRepeatMode uint32 const AutoRepeatModeOff AutoRepeatMode = 0 const AutoRepeatModeOn AutoRepeatMode = 1 const AutoRepeatModeDefault AutoRepeatMode = 2 type Blanking uint8 const BlankingNotPreferred Blanking = 0 const BlankingPreferred Blanking = 1 const BlankingDefault Blanking = 2 type Exposures uint8 const ExposuresNotAllowed Exposures = 0 const ExposuresAllowed Exposures = 1 const ExposuresDefault Exposures = 2 type HostMode uint8 const HostModeInsert HostMode = 0 const HostModeDelete HostMode = 1 type Family uint8 const FamilyInternet Family = 0 const FamilyDECnet Family = 1 const FamilyChaos Family = 2 const FamilyServerInterpreted Family = 5 const FamilyInternet6 Family = 6 type AccessControl uint8 const AccessControlDisable AccessControl = 0 const AccessControlEnable AccessControl = 1 type CloseDown uint8 const CloseDownDestroyAll CloseDown = 0 const CloseDownRetainPermanent CloseDown = 1 const CloseDownRetainTemporary CloseDown = 2 type Kill uint32 const KillAllTemporary Kill = 0 type ScreenSaver uint8 const ScreenSaverReset ScreenSaver = 0 const ScreenSaverActive ScreenSaver = 1 type MappingStatus uint8 const MappingStatusSuccess MappingStatus = 0 const MappingStatusBusy MappingStatus = 1 const MappingStatusFailure MappingStatus = 2 type MapIndex uint32 const MapIndexShift MapIndex = 0 const MapIndexLock MapIndex = 1 const MapIndexControl MapIndex = 2 const MapIndexX1 MapIndex = 3 const MapIndexX2 MapIndex = 4 const MapIndexX3 MapIndex = 5 const MapIndexX4 MapIndex = 6 const MapIndexX5 MapIndex = 7