From e239bb3c68a4981a3916534203c2fbd6b96f593c Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Thu, 10 May 2012 12:47:19 -0400 Subject: make resource ids their own individual types. last commit before overhaul to sub-packages --- nexgb/auto_randr.go | 356 ++++++++++++++++++++++++++++------------------------ 1 file changed, 189 insertions(+), 167 deletions(-) (limited to 'nexgb/auto_randr.go') diff --git a/nexgb/auto_randr.go b/nexgb/auto_randr.go index e086abd..d7e68bd 100644 --- a/nexgb/auto_randr.go +++ b/nexgb/auto_randr.go @@ -1,7 +1,7 @@ package xgb /* - This file was generated by randr.xml on May 8 2012 11:03:24pm EDT. + This file was generated by randr.xml on May 10 2012 12:39:33pm EDT. This file is automatically generated. Edit at your peril! */ @@ -38,10 +38,6 @@ func init() { newExtErrorFuncs["RANDR"] = make(map[int]newErrorFun) } -// Skipping definition for base type 'Float' - -// Skipping definition for base type 'Id' - // Skipping definition for base type 'Card8' // Skipping definition for base type 'Int16' @@ -64,6 +60,8 @@ func init() { // Skipping definition for base type 'Bool' +// Skipping definition for base type 'Float' + const ( RandrRotationRotate0 = 1 RandrRotationRotate90 = 2 @@ -116,11 +114,35 @@ const ( RandrNotifyOutputProperty = 2 ) -// Skipping resource definition of 'Mode' +type RandrMode uint32 + +func (c *Conn) NewRandrModeId() (RandrMode, error) { + id, err := c.NewId() + if err != nil { + return 0, err + } + return RandrMode(id), nil +} -// Skipping resource definition of 'Crtc' +type RandrCrtc uint32 -// Skipping resource definition of 'Output' +func (c *Conn) NewRandrCrtcId() (RandrCrtc, error) { + id, err := c.NewId() + if err != nil { + return 0, err + } + return RandrCrtc(id), nil +} + +type RandrOutput uint32 + +func (c *Conn) NewRandrOutputId() (RandrOutput, error) { + id, err := c.NewId() + if err != nil { + return 0, err + } + return RandrOutput(id), nil +} // 'RandrScreenSize' struct definition // Size: 8 @@ -401,9 +423,9 @@ func RandrModeInfoListBytes(buf []byte, list []RandrModeInfo) int { // Size: 28 type RandrCrtcChange struct { Timestamp Timestamp - Window Id - Crtc Id - Mode Id + Window Window + Crtc RandrCrtc + Mode RandrMode Rotation uint16 // padding: 2 bytes X int16 @@ -419,13 +441,13 @@ func ReadRandrCrtcChange(buf []byte, v *RandrCrtcChange) int { v.Timestamp = Timestamp(Get32(buf[b:])) b += 4 - v.Window = Id(Get32(buf[b:])) + v.Window = Window(Get32(buf[b:])) b += 4 - v.Crtc = Id(Get32(buf[b:])) + v.Crtc = RandrCrtc(Get32(buf[b:])) b += 4 - v.Mode = Id(Get32(buf[b:])) + v.Mode = RandrMode(Get32(buf[b:])) b += 4 v.Rotation = Get16(buf[b:]) @@ -512,10 +534,10 @@ func RandrCrtcChangeListBytes(buf []byte, list []RandrCrtcChange) int { type RandrOutputChange struct { Timestamp Timestamp ConfigTimestamp Timestamp - Window Id - Output Id - Crtc Id - Mode Id + Window Window + Output RandrOutput + Crtc RandrCrtc + Mode RandrMode Rotation uint16 Connection byte SubpixelOrder byte @@ -531,16 +553,16 @@ func ReadRandrOutputChange(buf []byte, v *RandrOutputChange) int { v.ConfigTimestamp = Timestamp(Get32(buf[b:])) b += 4 - v.Window = Id(Get32(buf[b:])) + v.Window = Window(Get32(buf[b:])) b += 4 - v.Output = Id(Get32(buf[b:])) + v.Output = RandrOutput(Get32(buf[b:])) b += 4 - v.Crtc = Id(Get32(buf[b:])) + v.Crtc = RandrCrtc(Get32(buf[b:])) b += 4 - v.Mode = Id(Get32(buf[b:])) + v.Mode = RandrMode(Get32(buf[b:])) b += 4 v.Rotation = Get16(buf[b:]) @@ -615,9 +637,9 @@ func RandrOutputChangeListBytes(buf []byte, list []RandrOutputChange) int { // 'RandrOutputProperty' struct definition // Size: 28 type RandrOutputProperty struct { - Window Id - Output Id - Atom Id + Window Window + Output RandrOutput + Atom Atom Timestamp Timestamp Status byte // padding: 11 bytes @@ -627,13 +649,13 @@ type RandrOutputProperty struct { func ReadRandrOutputProperty(buf []byte, v *RandrOutputProperty) int { b := 0 - v.Window = Id(Get32(buf[b:])) + v.Window = Window(Get32(buf[b:])) b += 4 - v.Output = Id(Get32(buf[b:])) + v.Output = RandrOutput(Get32(buf[b:])) b += 4 - v.Atom = Id(Get32(buf[b:])) + v.Atom = Atom(Get32(buf[b:])) b += 4 v.Timestamp = Timestamp(Get32(buf[b:])) @@ -866,8 +888,8 @@ type RandrScreenChangeNotifyEvent struct { Rotation byte Timestamp Timestamp ConfigTimestamp Timestamp - Root Id - RequestWindow Id + Root Window + RequestWindow Window SizeID uint16 SubpixelOrder uint16 Width uint16 @@ -893,10 +915,10 @@ func NewRandrScreenChangeNotifyEvent(buf []byte) Event { v.ConfigTimestamp = Timestamp(Get32(buf[b:])) b += 4 - v.Root = Id(Get32(buf[b:])) + v.Root = Window(Get32(buf[b:])) b += 4 - v.RequestWindow = Id(Get32(buf[b:])) + v.RequestWindow = Window(Get32(buf[b:])) b += 4 v.SizeID = Get16(buf[b:]) @@ -1092,7 +1114,7 @@ func (err RandrBadOutputError) SequenceId() uint16 { return err.Sequence } -func (err RandrBadOutputError) BadId() Id { +func (err RandrBadOutputError) BadId() uint32 { return 0 } @@ -1137,7 +1159,7 @@ func (err RandrBadCrtcError) SequenceId() uint16 { return err.Sequence } -func (err RandrBadCrtcError) BadId() Id { +func (err RandrBadCrtcError) BadId() uint32 { return 0 } @@ -1182,7 +1204,7 @@ func (err RandrBadModeError) SequenceId() uint16 { return err.Sequence } -func (err RandrBadModeError) BadId() Id { +func (err RandrBadModeError) BadId() uint32 { return 0 } @@ -1296,13 +1318,13 @@ type RandrSetScreenConfigCookie struct { *cookie } -func (c *Conn) RandrSetScreenConfig(Window Id, Timestamp Timestamp, ConfigTimestamp Timestamp, SizeID uint16, Rotation uint16, Rate uint16) RandrSetScreenConfigCookie { +func (c *Conn) RandrSetScreenConfig(Window Window, Timestamp Timestamp, ConfigTimestamp Timestamp, SizeID uint16, Rotation uint16, Rate uint16) RandrSetScreenConfigCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrSetScreenConfigRequest(Window, Timestamp, ConfigTimestamp, SizeID, Rotation, Rate), cookie) return RandrSetScreenConfigCookie{cookie} } -func (c *Conn) RandrSetScreenConfigUnchecked(Window Id, Timestamp Timestamp, ConfigTimestamp Timestamp, SizeID uint16, Rotation uint16, Rate uint16) RandrSetScreenConfigCookie { +func (c *Conn) RandrSetScreenConfigUnchecked(Window Window, Timestamp Timestamp, ConfigTimestamp Timestamp, SizeID uint16, Rotation uint16, Rate uint16) RandrSetScreenConfigCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrSetScreenConfigRequest(Window, Timestamp, ConfigTimestamp, SizeID, Rotation, Rate), cookie) return RandrSetScreenConfigCookie{cookie} @@ -1316,7 +1338,7 @@ type RandrSetScreenConfigReply struct { Status byte NewTimestamp Timestamp ConfigTimestamp Timestamp - Root Id + Root Window SubpixelOrder uint16 // padding: 10 bytes } @@ -1353,7 +1375,7 @@ func randrSetScreenConfigReply(buf []byte) *RandrSetScreenConfigReply { v.ConfigTimestamp = Timestamp(Get32(buf[b:])) b += 4 - v.Root = Id(Get32(buf[b:])) + v.Root = Window(Get32(buf[b:])) b += 4 v.SubpixelOrder = Get16(buf[b:]) @@ -1369,7 +1391,7 @@ func (cook RandrSetScreenConfigCookie) Check() error { } // Write request to wire for RandrSetScreenConfig -func (c *Conn) randrSetScreenConfigRequest(Window Id, Timestamp Timestamp, ConfigTimestamp Timestamp, SizeID uint16, Rotation uint16, Rate uint16) []byte { +func (c *Conn) randrSetScreenConfigRequest(Window Window, Timestamp Timestamp, ConfigTimestamp Timestamp, SizeID uint16, Rotation uint16, Rate uint16) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -1413,13 +1435,13 @@ type RandrSelectInputCookie struct { } // Write request to wire for RandrSelectInput -func (c *Conn) RandrSelectInput(Window Id, Enable uint16) RandrSelectInputCookie { +func (c *Conn) RandrSelectInput(Window Window, Enable uint16) RandrSelectInputCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrSelectInputRequest(Window, Enable), cookie) return RandrSelectInputCookie{cookie} } -func (c *Conn) RandrSelectInputChecked(Window Id, Enable uint16) RandrSelectInputCookie { +func (c *Conn) RandrSelectInputChecked(Window Window, Enable uint16) RandrSelectInputCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrSelectInputRequest(Window, Enable), cookie) return RandrSelectInputCookie{cookie} @@ -1430,7 +1452,7 @@ func (cook RandrSelectInputCookie) Check() error { } // Write request to wire for RandrSelectInput -func (c *Conn) randrSelectInputRequest(Window Id, Enable uint16) []byte { +func (c *Conn) randrSelectInputRequest(Window Window, Enable uint16) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -1461,13 +1483,13 @@ type RandrGetScreenInfoCookie struct { *cookie } -func (c *Conn) RandrGetScreenInfo(Window Id) RandrGetScreenInfoCookie { +func (c *Conn) RandrGetScreenInfo(Window Window) RandrGetScreenInfoCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetScreenInfoRequest(Window), cookie) return RandrGetScreenInfoCookie{cookie} } -func (c *Conn) RandrGetScreenInfoUnchecked(Window Id) RandrGetScreenInfoCookie { +func (c *Conn) RandrGetScreenInfoUnchecked(Window Window) RandrGetScreenInfoCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetScreenInfoRequest(Window), cookie) return RandrGetScreenInfoCookie{cookie} @@ -1479,7 +1501,7 @@ type RandrGetScreenInfoReply struct { Sequence uint16 Length uint32 Rotations byte - Root Id + Root Window Timestamp Timestamp ConfigTimestamp Timestamp NSizes uint16 @@ -1518,7 +1540,7 @@ func randrGetScreenInfoReply(buf []byte) *RandrGetScreenInfoReply { v.Length = Get32(buf[b:]) // 4-byte units b += 4 - v.Root = Id(Get32(buf[b:])) + v.Root = Window(Get32(buf[b:])) b += 4 v.Timestamp = Timestamp(Get32(buf[b:])) @@ -1558,7 +1580,7 @@ func (cook RandrGetScreenInfoCookie) Check() error { } // Write request to wire for RandrGetScreenInfo -func (c *Conn) randrGetScreenInfoRequest(Window Id) []byte { +func (c *Conn) randrGetScreenInfoRequest(Window Window) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -1584,13 +1606,13 @@ type RandrGetScreenSizeRangeCookie struct { *cookie } -func (c *Conn) RandrGetScreenSizeRange(Window Id) RandrGetScreenSizeRangeCookie { +func (c *Conn) RandrGetScreenSizeRange(Window Window) RandrGetScreenSizeRangeCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetScreenSizeRangeRequest(Window), cookie) return RandrGetScreenSizeRangeCookie{cookie} } -func (c *Conn) RandrGetScreenSizeRangeUnchecked(Window Id) RandrGetScreenSizeRangeCookie { +func (c *Conn) RandrGetScreenSizeRangeUnchecked(Window Window) RandrGetScreenSizeRangeCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetScreenSizeRangeRequest(Window), cookie) return RandrGetScreenSizeRangeCookie{cookie} @@ -1656,7 +1678,7 @@ func (cook RandrGetScreenSizeRangeCookie) Check() error { } // Write request to wire for RandrGetScreenSizeRange -func (c *Conn) randrGetScreenSizeRangeRequest(Window Id) []byte { +func (c *Conn) randrGetScreenSizeRangeRequest(Window Window) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -1683,13 +1705,13 @@ type RandrSetScreenSizeCookie struct { } // Write request to wire for RandrSetScreenSize -func (c *Conn) RandrSetScreenSize(Window Id, Width uint16, Height uint16, MmWidth uint32, MmHeight uint32) RandrSetScreenSizeCookie { +func (c *Conn) RandrSetScreenSize(Window Window, Width uint16, Height uint16, MmWidth uint32, MmHeight uint32) RandrSetScreenSizeCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrSetScreenSizeRequest(Window, Width, Height, MmWidth, MmHeight), cookie) return RandrSetScreenSizeCookie{cookie} } -func (c *Conn) RandrSetScreenSizeChecked(Window Id, Width uint16, Height uint16, MmWidth uint32, MmHeight uint32) RandrSetScreenSizeCookie { +func (c *Conn) RandrSetScreenSizeChecked(Window Window, Width uint16, Height uint16, MmWidth uint32, MmHeight uint32) RandrSetScreenSizeCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrSetScreenSizeRequest(Window, Width, Height, MmWidth, MmHeight), cookie) return RandrSetScreenSizeCookie{cookie} @@ -1700,7 +1722,7 @@ func (cook RandrSetScreenSizeCookie) Check() error { } // Write request to wire for RandrSetScreenSize -func (c *Conn) randrSetScreenSizeRequest(Window Id, Width uint16, Height uint16, MmWidth uint32, MmHeight uint32) []byte { +func (c *Conn) randrSetScreenSizeRequest(Window Window, Width uint16, Height uint16, MmWidth uint32, MmHeight uint32) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -1738,13 +1760,13 @@ type RandrGetScreenResourcesCookie struct { *cookie } -func (c *Conn) RandrGetScreenResources(Window Id) RandrGetScreenResourcesCookie { +func (c *Conn) RandrGetScreenResources(Window Window) RandrGetScreenResourcesCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetScreenResourcesRequest(Window), cookie) return RandrGetScreenResourcesCookie{cookie} } -func (c *Conn) RandrGetScreenResourcesUnchecked(Window Id) RandrGetScreenResourcesCookie { +func (c *Conn) RandrGetScreenResourcesUnchecked(Window Window) RandrGetScreenResourcesCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetScreenResourcesRequest(Window), cookie) return RandrGetScreenResourcesCookie{cookie} @@ -1763,8 +1785,8 @@ type RandrGetScreenResourcesReply struct { NumModes uint16 NamesLen uint16 // padding: 8 bytes - Crtcs []Id // size: pad((int(NumCrtcs) * 4)) - Outputs []Id // size: pad((int(NumOutputs) * 4)) + Crtcs []RandrCrtc // size: pad((int(NumCrtcs) * 4)) + Outputs []RandrOutput // size: pad((int(NumOutputs) * 4)) Modes []RandrModeInfo // size: pad((int(NumModes) * 32)) Names []byte // size: pad((int(NamesLen) * 1)) } @@ -1814,16 +1836,16 @@ func randrGetScreenResourcesReply(buf []byte) *RandrGetScreenResourcesReply { b += 8 // padding - v.Crtcs = make([]Id, v.NumCrtcs) + v.Crtcs = make([]RandrCrtc, v.NumCrtcs) for i := 0; i < int(v.NumCrtcs); i++ { - v.Crtcs[i] = Id(Get32(buf[b:])) + v.Crtcs[i] = RandrCrtc(Get32(buf[b:])) b += 4 } b = pad(b) - v.Outputs = make([]Id, v.NumOutputs) + v.Outputs = make([]RandrOutput, v.NumOutputs) for i := 0; i < int(v.NumOutputs); i++ { - v.Outputs[i] = Id(Get32(buf[b:])) + v.Outputs[i] = RandrOutput(Get32(buf[b:])) b += 4 } b = pad(b) @@ -1843,7 +1865,7 @@ func (cook RandrGetScreenResourcesCookie) Check() error { } // Write request to wire for RandrGetScreenResources -func (c *Conn) randrGetScreenResourcesRequest(Window Id) []byte { +func (c *Conn) randrGetScreenResourcesRequest(Window Window) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -1869,13 +1891,13 @@ type RandrGetOutputInfoCookie struct { *cookie } -func (c *Conn) RandrGetOutputInfo(Output Id, ConfigTimestamp Timestamp) RandrGetOutputInfoCookie { +func (c *Conn) RandrGetOutputInfo(Output RandrOutput, ConfigTimestamp Timestamp) RandrGetOutputInfoCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetOutputInfoRequest(Output, ConfigTimestamp), cookie) return RandrGetOutputInfoCookie{cookie} } -func (c *Conn) RandrGetOutputInfoUnchecked(Output Id, ConfigTimestamp Timestamp) RandrGetOutputInfoCookie { +func (c *Conn) RandrGetOutputInfoUnchecked(Output RandrOutput, ConfigTimestamp Timestamp) RandrGetOutputInfoCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetOutputInfoRequest(Output, ConfigTimestamp), cookie) return RandrGetOutputInfoCookie{cookie} @@ -1888,7 +1910,7 @@ type RandrGetOutputInfoReply struct { Length uint32 Status byte Timestamp Timestamp - Crtc Id + Crtc RandrCrtc MmWidth uint32 MmHeight uint32 Connection byte @@ -1898,10 +1920,10 @@ type RandrGetOutputInfoReply struct { NumPreferred uint16 NumClones uint16 NameLen uint16 - Crtcs []Id // size: pad((int(NumCrtcs) * 4)) - Modes []Id // size: pad((int(NumModes) * 4)) - Clones []Id // size: pad((int(NumClones) * 4)) - Name []byte // size: pad((int(NameLen) * 1)) + Crtcs []RandrCrtc // size: pad((int(NumCrtcs) * 4)) + Modes []RandrMode // size: pad((int(NumModes) * 4)) + Clones []RandrOutput // size: pad((int(NumClones) * 4)) + Name []byte // size: pad((int(NameLen) * 1)) } // Waits and reads reply data from request RandrGetOutputInfo @@ -1933,7 +1955,7 @@ func randrGetOutputInfoReply(buf []byte) *RandrGetOutputInfoReply { v.Timestamp = Timestamp(Get32(buf[b:])) b += 4 - v.Crtc = Id(Get32(buf[b:])) + v.Crtc = RandrCrtc(Get32(buf[b:])) b += 4 v.MmWidth = Get32(buf[b:]) @@ -1963,23 +1985,23 @@ func randrGetOutputInfoReply(buf []byte) *RandrGetOutputInfoReply { v.NameLen = Get16(buf[b:]) b += 2 - v.Crtcs = make([]Id, v.NumCrtcs) + v.Crtcs = make([]RandrCrtc, v.NumCrtcs) for i := 0; i < int(v.NumCrtcs); i++ { - v.Crtcs[i] = Id(Get32(buf[b:])) + v.Crtcs[i] = RandrCrtc(Get32(buf[b:])) b += 4 } b = pad(b) - v.Modes = make([]Id, v.NumModes) + v.Modes = make([]RandrMode, v.NumModes) for i := 0; i < int(v.NumModes); i++ { - v.Modes[i] = Id(Get32(buf[b:])) + v.Modes[i] = RandrMode(Get32(buf[b:])) b += 4 } b = pad(b) - v.Clones = make([]Id, v.NumClones) + v.Clones = make([]RandrOutput, v.NumClones) for i := 0; i < int(v.NumClones); i++ { - v.Clones[i] = Id(Get32(buf[b:])) + v.Clones[i] = RandrOutput(Get32(buf[b:])) b += 4 } b = pad(b) @@ -1996,7 +2018,7 @@ func (cook RandrGetOutputInfoCookie) Check() error { } // Write request to wire for RandrGetOutputInfo -func (c *Conn) randrGetOutputInfoRequest(Output Id, ConfigTimestamp Timestamp) []byte { +func (c *Conn) randrGetOutputInfoRequest(Output RandrOutput, ConfigTimestamp Timestamp) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -2025,13 +2047,13 @@ type RandrListOutputPropertiesCookie struct { *cookie } -func (c *Conn) RandrListOutputProperties(Output Id) RandrListOutputPropertiesCookie { +func (c *Conn) RandrListOutputProperties(Output RandrOutput) RandrListOutputPropertiesCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrListOutputPropertiesRequest(Output), cookie) return RandrListOutputPropertiesCookie{cookie} } -func (c *Conn) RandrListOutputPropertiesUnchecked(Output Id) RandrListOutputPropertiesCookie { +func (c *Conn) RandrListOutputPropertiesUnchecked(Output RandrOutput) RandrListOutputPropertiesCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrListOutputPropertiesRequest(Output), cookie) return RandrListOutputPropertiesCookie{cookie} @@ -2045,7 +2067,7 @@ type RandrListOutputPropertiesReply struct { // padding: 1 bytes NumAtoms uint16 // padding: 22 bytes - Atoms []Id // size: pad((int(NumAtoms) * 4)) + Atoms []Atom // size: pad((int(NumAtoms) * 4)) } // Waits and reads reply data from request RandrListOutputProperties @@ -2078,9 +2100,9 @@ func randrListOutputPropertiesReply(buf []byte) *RandrListOutputPropertiesReply b += 22 // padding - v.Atoms = make([]Id, v.NumAtoms) + v.Atoms = make([]Atom, v.NumAtoms) for i := 0; i < int(v.NumAtoms); i++ { - v.Atoms[i] = Id(Get32(buf[b:])) + v.Atoms[i] = Atom(Get32(buf[b:])) b += 4 } b = pad(b) @@ -2093,7 +2115,7 @@ func (cook RandrListOutputPropertiesCookie) Check() error { } // Write request to wire for RandrListOutputProperties -func (c *Conn) randrListOutputPropertiesRequest(Output Id) []byte { +func (c *Conn) randrListOutputPropertiesRequest(Output RandrOutput) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -2119,13 +2141,13 @@ type RandrQueryOutputPropertyCookie struct { *cookie } -func (c *Conn) RandrQueryOutputProperty(Output Id, Property Id) RandrQueryOutputPropertyCookie { +func (c *Conn) RandrQueryOutputProperty(Output RandrOutput, Property Atom) RandrQueryOutputPropertyCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrQueryOutputPropertyRequest(Output, Property), cookie) return RandrQueryOutputPropertyCookie{cookie} } -func (c *Conn) RandrQueryOutputPropertyUnchecked(Output Id, Property Id) RandrQueryOutputPropertyCookie { +func (c *Conn) RandrQueryOutputPropertyUnchecked(Output RandrOutput, Property Atom) RandrQueryOutputPropertyCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrQueryOutputPropertyRequest(Output, Property), cookie) return RandrQueryOutputPropertyCookie{cookie} @@ -2207,7 +2229,7 @@ func (cook RandrQueryOutputPropertyCookie) Check() error { } // Write request to wire for RandrQueryOutputProperty -func (c *Conn) randrQueryOutputPropertyRequest(Output Id, Property Id) []byte { +func (c *Conn) randrQueryOutputPropertyRequest(Output RandrOutput, Property Atom) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -2237,13 +2259,13 @@ type RandrConfigureOutputPropertyCookie struct { } // Write request to wire for RandrConfigureOutputProperty -func (c *Conn) RandrConfigureOutputProperty(Output Id, Property Id, Pending bool, Range bool, Values []int32) RandrConfigureOutputPropertyCookie { +func (c *Conn) RandrConfigureOutputProperty(Output RandrOutput, Property Atom, Pending bool, Range bool, Values []int32) RandrConfigureOutputPropertyCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrConfigureOutputPropertyRequest(Output, Property, Pending, Range, Values), cookie) return RandrConfigureOutputPropertyCookie{cookie} } -func (c *Conn) RandrConfigureOutputPropertyChecked(Output Id, Property Id, Pending bool, Range bool, Values []int32) RandrConfigureOutputPropertyCookie { +func (c *Conn) RandrConfigureOutputPropertyChecked(Output RandrOutput, Property Atom, Pending bool, Range bool, Values []int32) RandrConfigureOutputPropertyCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrConfigureOutputPropertyRequest(Output, Property, Pending, Range, Values), cookie) return RandrConfigureOutputPropertyCookie{cookie} @@ -2254,7 +2276,7 @@ func (cook RandrConfigureOutputPropertyCookie) Check() error { } // Write request to wire for RandrConfigureOutputProperty -func (c *Conn) randrConfigureOutputPropertyRequest(Output Id, Property Id, Pending bool, Range bool, Values []int32) []byte { +func (c *Conn) randrConfigureOutputPropertyRequest(Output RandrOutput, Property Atom, Pending bool, Range bool, Values []int32) []byte { size := pad((16 + pad((len(Values) * 4)))) b := 0 buf := make([]byte, size) @@ -2306,13 +2328,13 @@ type RandrChangeOutputPropertyCookie struct { } // Write request to wire for RandrChangeOutputProperty -func (c *Conn) RandrChangeOutputProperty(Output Id, Property Id, Type Id, Format byte, Mode byte, NumUnits uint32, Data []byte) RandrChangeOutputPropertyCookie { +func (c *Conn) RandrChangeOutputProperty(Output RandrOutput, Property Atom, Type Atom, Format byte, Mode byte, NumUnits uint32, Data []byte) RandrChangeOutputPropertyCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrChangeOutputPropertyRequest(Output, Property, Type, Format, Mode, NumUnits, Data), cookie) return RandrChangeOutputPropertyCookie{cookie} } -func (c *Conn) RandrChangeOutputPropertyChecked(Output Id, Property Id, Type Id, Format byte, Mode byte, NumUnits uint32, Data []byte) RandrChangeOutputPropertyCookie { +func (c *Conn) RandrChangeOutputPropertyChecked(Output RandrOutput, Property Atom, Type Atom, Format byte, Mode byte, NumUnits uint32, Data []byte) RandrChangeOutputPropertyCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrChangeOutputPropertyRequest(Output, Property, Type, Format, Mode, NumUnits, Data), cookie) return RandrChangeOutputPropertyCookie{cookie} @@ -2323,7 +2345,7 @@ func (cook RandrChangeOutputPropertyCookie) Check() error { } // Write request to wire for RandrChangeOutputProperty -func (c *Conn) randrChangeOutputPropertyRequest(Output Id, Property Id, Type Id, Format byte, Mode byte, NumUnits uint32, Data []byte) []byte { +func (c *Conn) randrChangeOutputPropertyRequest(Output RandrOutput, Property Atom, Type Atom, Format byte, Mode byte, NumUnits uint32, Data []byte) []byte { size := pad((24 + pad((((int(NumUnits) * int(Format)) / 8) * 1)))) b := 0 buf := make([]byte, size) @@ -2370,13 +2392,13 @@ type RandrDeleteOutputPropertyCookie struct { } // Write request to wire for RandrDeleteOutputProperty -func (c *Conn) RandrDeleteOutputProperty(Output Id, Property Id) RandrDeleteOutputPropertyCookie { +func (c *Conn) RandrDeleteOutputProperty(Output RandrOutput, Property Atom) RandrDeleteOutputPropertyCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrDeleteOutputPropertyRequest(Output, Property), cookie) return RandrDeleteOutputPropertyCookie{cookie} } -func (c *Conn) RandrDeleteOutputPropertyChecked(Output Id, Property Id) RandrDeleteOutputPropertyCookie { +func (c *Conn) RandrDeleteOutputPropertyChecked(Output RandrOutput, Property Atom) RandrDeleteOutputPropertyCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrDeleteOutputPropertyRequest(Output, Property), cookie) return RandrDeleteOutputPropertyCookie{cookie} @@ -2387,7 +2409,7 @@ func (cook RandrDeleteOutputPropertyCookie) Check() error { } // Write request to wire for RandrDeleteOutputProperty -func (c *Conn) randrDeleteOutputPropertyRequest(Output Id, Property Id) []byte { +func (c *Conn) randrDeleteOutputPropertyRequest(Output RandrOutput, Property Atom) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -2416,13 +2438,13 @@ type RandrGetOutputPropertyCookie struct { *cookie } -func (c *Conn) RandrGetOutputProperty(Output Id, Property Id, Type Id, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) RandrGetOutputPropertyCookie { +func (c *Conn) RandrGetOutputProperty(Output RandrOutput, Property Atom, Type Atom, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) RandrGetOutputPropertyCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetOutputPropertyRequest(Output, Property, Type, LongOffset, LongLength, Delete, Pending), cookie) return RandrGetOutputPropertyCookie{cookie} } -func (c *Conn) RandrGetOutputPropertyUnchecked(Output Id, Property Id, Type Id, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) RandrGetOutputPropertyCookie { +func (c *Conn) RandrGetOutputPropertyUnchecked(Output RandrOutput, Property Atom, Type Atom, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) RandrGetOutputPropertyCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetOutputPropertyRequest(Output, Property, Type, LongOffset, LongLength, Delete, Pending), cookie) return RandrGetOutputPropertyCookie{cookie} @@ -2434,7 +2456,7 @@ type RandrGetOutputPropertyReply struct { Sequence uint16 Length uint32 Format byte - Type Id + Type Atom BytesAfter uint32 NumItems uint32 // padding: 12 bytes @@ -2467,7 +2489,7 @@ func randrGetOutputPropertyReply(buf []byte) *RandrGetOutputPropertyReply { v.Length = Get32(buf[b:]) // 4-byte units b += 4 - v.Type = Id(Get32(buf[b:])) + v.Type = Atom(Get32(buf[b:])) b += 4 v.BytesAfter = Get32(buf[b:]) @@ -2490,7 +2512,7 @@ func (cook RandrGetOutputPropertyCookie) Check() error { } // Write request to wire for RandrGetOutputProperty -func (c *Conn) randrGetOutputPropertyRequest(Output Id, Property Id, Type Id, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) []byte { +func (c *Conn) randrGetOutputPropertyRequest(Output RandrOutput, Property Atom, Type Atom, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) []byte { size := 28 b := 0 buf := make([]byte, size) @@ -2544,13 +2566,13 @@ type RandrCreateModeCookie struct { *cookie } -func (c *Conn) RandrCreateMode(Window Id, ModeInfo RandrModeInfo, Name string) RandrCreateModeCookie { +func (c *Conn) RandrCreateMode(Window Window, ModeInfo RandrModeInfo, Name string) RandrCreateModeCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrCreateModeRequest(Window, ModeInfo, Name), cookie) return RandrCreateModeCookie{cookie} } -func (c *Conn) RandrCreateModeUnchecked(Window Id, ModeInfo RandrModeInfo, Name string) RandrCreateModeCookie { +func (c *Conn) RandrCreateModeUnchecked(Window Window, ModeInfo RandrModeInfo, Name string) RandrCreateModeCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrCreateModeRequest(Window, ModeInfo, Name), cookie) return RandrCreateModeCookie{cookie} @@ -2562,7 +2584,7 @@ type RandrCreateModeReply struct { Sequence uint16 Length uint32 // padding: 1 bytes - Mode Id + Mode RandrMode // padding: 20 bytes } @@ -2591,7 +2613,7 @@ func randrCreateModeReply(buf []byte) *RandrCreateModeReply { v.Length = Get32(buf[b:]) // 4-byte units b += 4 - v.Mode = Id(Get32(buf[b:])) + v.Mode = RandrMode(Get32(buf[b:])) b += 4 b += 20 // padding @@ -2604,7 +2626,7 @@ func (cook RandrCreateModeCookie) Check() error { } // Write request to wire for RandrCreateMode -func (c *Conn) randrCreateModeRequest(Window Id, ModeInfo RandrModeInfo, Name string) []byte { +func (c *Conn) randrCreateModeRequest(Window Window, ModeInfo RandrModeInfo, Name string) []byte { size := pad((40 + pad((len(Name) * 1)))) b := 0 buf := make([]byte, size) @@ -2640,13 +2662,13 @@ type RandrDestroyModeCookie struct { } // Write request to wire for RandrDestroyMode -func (c *Conn) RandrDestroyMode(Mode Id) RandrDestroyModeCookie { +func (c *Conn) RandrDestroyMode(Mode RandrMode) RandrDestroyModeCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrDestroyModeRequest(Mode), cookie) return RandrDestroyModeCookie{cookie} } -func (c *Conn) RandrDestroyModeChecked(Mode Id) RandrDestroyModeCookie { +func (c *Conn) RandrDestroyModeChecked(Mode RandrMode) RandrDestroyModeCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrDestroyModeRequest(Mode), cookie) return RandrDestroyModeCookie{cookie} @@ -2657,7 +2679,7 @@ func (cook RandrDestroyModeCookie) Check() error { } // Write request to wire for RandrDestroyMode -func (c *Conn) randrDestroyModeRequest(Mode Id) []byte { +func (c *Conn) randrDestroyModeRequest(Mode RandrMode) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -2684,13 +2706,13 @@ type RandrAddOutputModeCookie struct { } // Write request to wire for RandrAddOutputMode -func (c *Conn) RandrAddOutputMode(Output Id, Mode Id) RandrAddOutputModeCookie { +func (c *Conn) RandrAddOutputMode(Output RandrOutput, Mode RandrMode) RandrAddOutputModeCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrAddOutputModeRequest(Output, Mode), cookie) return RandrAddOutputModeCookie{cookie} } -func (c *Conn) RandrAddOutputModeChecked(Output Id, Mode Id) RandrAddOutputModeCookie { +func (c *Conn) RandrAddOutputModeChecked(Output RandrOutput, Mode RandrMode) RandrAddOutputModeCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrAddOutputModeRequest(Output, Mode), cookie) return RandrAddOutputModeCookie{cookie} @@ -2701,7 +2723,7 @@ func (cook RandrAddOutputModeCookie) Check() error { } // Write request to wire for RandrAddOutputMode -func (c *Conn) randrAddOutputModeRequest(Output Id, Mode Id) []byte { +func (c *Conn) randrAddOutputModeRequest(Output RandrOutput, Mode RandrMode) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -2731,13 +2753,13 @@ type RandrDeleteOutputModeCookie struct { } // Write request to wire for RandrDeleteOutputMode -func (c *Conn) RandrDeleteOutputMode(Output Id, Mode Id) RandrDeleteOutputModeCookie { +func (c *Conn) RandrDeleteOutputMode(Output RandrOutput, Mode RandrMode) RandrDeleteOutputModeCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrDeleteOutputModeRequest(Output, Mode), cookie) return RandrDeleteOutputModeCookie{cookie} } -func (c *Conn) RandrDeleteOutputModeChecked(Output Id, Mode Id) RandrDeleteOutputModeCookie { +func (c *Conn) RandrDeleteOutputModeChecked(Output RandrOutput, Mode RandrMode) RandrDeleteOutputModeCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrDeleteOutputModeRequest(Output, Mode), cookie) return RandrDeleteOutputModeCookie{cookie} @@ -2748,7 +2770,7 @@ func (cook RandrDeleteOutputModeCookie) Check() error { } // Write request to wire for RandrDeleteOutputMode -func (c *Conn) randrDeleteOutputModeRequest(Output Id, Mode Id) []byte { +func (c *Conn) randrDeleteOutputModeRequest(Output RandrOutput, Mode RandrMode) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -2777,13 +2799,13 @@ type RandrGetCrtcInfoCookie struct { *cookie } -func (c *Conn) RandrGetCrtcInfo(Crtc Id, ConfigTimestamp Timestamp) RandrGetCrtcInfoCookie { +func (c *Conn) RandrGetCrtcInfo(Crtc RandrCrtc, ConfigTimestamp Timestamp) RandrGetCrtcInfoCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetCrtcInfoRequest(Crtc, ConfigTimestamp), cookie) return RandrGetCrtcInfoCookie{cookie} } -func (c *Conn) RandrGetCrtcInfoUnchecked(Crtc Id, ConfigTimestamp Timestamp) RandrGetCrtcInfoCookie { +func (c *Conn) RandrGetCrtcInfoUnchecked(Crtc RandrCrtc, ConfigTimestamp Timestamp) RandrGetCrtcInfoCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetCrtcInfoRequest(Crtc, ConfigTimestamp), cookie) return RandrGetCrtcInfoCookie{cookie} @@ -2800,13 +2822,13 @@ type RandrGetCrtcInfoReply struct { Y int16 Width uint16 Height uint16 - Mode Id + Mode RandrMode Rotation uint16 Rotations uint16 NumOutputs uint16 NumPossibleOutputs uint16 - Outputs []Id // size: pad((int(NumOutputs) * 4)) - Possible []Id // size: pad((int(NumPossibleOutputs) * 4)) + Outputs []RandrOutput // size: pad((int(NumOutputs) * 4)) + Possible []RandrOutput // size: pad((int(NumPossibleOutputs) * 4)) } // Waits and reads reply data from request RandrGetCrtcInfo @@ -2850,7 +2872,7 @@ func randrGetCrtcInfoReply(buf []byte) *RandrGetCrtcInfoReply { v.Height = Get16(buf[b:]) b += 2 - v.Mode = Id(Get32(buf[b:])) + v.Mode = RandrMode(Get32(buf[b:])) b += 4 v.Rotation = Get16(buf[b:]) @@ -2865,16 +2887,16 @@ func randrGetCrtcInfoReply(buf []byte) *RandrGetCrtcInfoReply { v.NumPossibleOutputs = Get16(buf[b:]) b += 2 - v.Outputs = make([]Id, v.NumOutputs) + v.Outputs = make([]RandrOutput, v.NumOutputs) for i := 0; i < int(v.NumOutputs); i++ { - v.Outputs[i] = Id(Get32(buf[b:])) + v.Outputs[i] = RandrOutput(Get32(buf[b:])) b += 4 } b = pad(b) - v.Possible = make([]Id, v.NumPossibleOutputs) + v.Possible = make([]RandrOutput, v.NumPossibleOutputs) for i := 0; i < int(v.NumPossibleOutputs); i++ { - v.Possible[i] = Id(Get32(buf[b:])) + v.Possible[i] = RandrOutput(Get32(buf[b:])) b += 4 } b = pad(b) @@ -2887,7 +2909,7 @@ func (cook RandrGetCrtcInfoCookie) Check() error { } // Write request to wire for RandrGetCrtcInfo -func (c *Conn) randrGetCrtcInfoRequest(Crtc Id, ConfigTimestamp Timestamp) []byte { +func (c *Conn) randrGetCrtcInfoRequest(Crtc RandrCrtc, ConfigTimestamp Timestamp) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -2916,13 +2938,13 @@ type RandrSetCrtcConfigCookie struct { *cookie } -func (c *Conn) RandrSetCrtcConfig(Crtc Id, Timestamp Timestamp, ConfigTimestamp Timestamp, X int16, Y int16, Mode Id, Rotation uint16, Outputs []Id) RandrSetCrtcConfigCookie { +func (c *Conn) RandrSetCrtcConfig(Crtc RandrCrtc, Timestamp Timestamp, ConfigTimestamp Timestamp, X int16, Y int16, Mode RandrMode, Rotation uint16, Outputs []RandrOutput) RandrSetCrtcConfigCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrSetCrtcConfigRequest(Crtc, Timestamp, ConfigTimestamp, X, Y, Mode, Rotation, Outputs), cookie) return RandrSetCrtcConfigCookie{cookie} } -func (c *Conn) RandrSetCrtcConfigUnchecked(Crtc Id, Timestamp Timestamp, ConfigTimestamp Timestamp, X int16, Y int16, Mode Id, Rotation uint16, Outputs []Id) RandrSetCrtcConfigCookie { +func (c *Conn) RandrSetCrtcConfigUnchecked(Crtc RandrCrtc, Timestamp Timestamp, ConfigTimestamp Timestamp, X int16, Y int16, Mode RandrMode, Rotation uint16, Outputs []RandrOutput) RandrSetCrtcConfigCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrSetCrtcConfigRequest(Crtc, Timestamp, ConfigTimestamp, X, Y, Mode, Rotation, Outputs), cookie) return RandrSetCrtcConfigCookie{cookie} @@ -2977,7 +2999,7 @@ func (cook RandrSetCrtcConfigCookie) Check() error { } // Write request to wire for RandrSetCrtcConfig -func (c *Conn) randrSetCrtcConfigRequest(Crtc Id, Timestamp Timestamp, ConfigTimestamp Timestamp, X int16, Y int16, Mode Id, Rotation uint16, Outputs []Id) []byte { +func (c *Conn) randrSetCrtcConfigRequest(Crtc RandrCrtc, Timestamp Timestamp, ConfigTimestamp Timestamp, X int16, Y int16, Mode RandrMode, Rotation uint16, Outputs []RandrOutput) []byte { size := pad((28 + pad((len(Outputs) * 4)))) b := 0 buf := make([]byte, size) @@ -3029,13 +3051,13 @@ type RandrGetCrtcGammaSizeCookie struct { *cookie } -func (c *Conn) RandrGetCrtcGammaSize(Crtc Id) RandrGetCrtcGammaSizeCookie { +func (c *Conn) RandrGetCrtcGammaSize(Crtc RandrCrtc) RandrGetCrtcGammaSizeCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetCrtcGammaSizeRequest(Crtc), cookie) return RandrGetCrtcGammaSizeCookie{cookie} } -func (c *Conn) RandrGetCrtcGammaSizeUnchecked(Crtc Id) RandrGetCrtcGammaSizeCookie { +func (c *Conn) RandrGetCrtcGammaSizeUnchecked(Crtc RandrCrtc) RandrGetCrtcGammaSizeCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetCrtcGammaSizeRequest(Crtc), cookie) return RandrGetCrtcGammaSizeCookie{cookie} @@ -3089,7 +3111,7 @@ func (cook RandrGetCrtcGammaSizeCookie) Check() error { } // Write request to wire for RandrGetCrtcGammaSize -func (c *Conn) randrGetCrtcGammaSizeRequest(Crtc Id) []byte { +func (c *Conn) randrGetCrtcGammaSizeRequest(Crtc RandrCrtc) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -3115,13 +3137,13 @@ type RandrGetCrtcGammaCookie struct { *cookie } -func (c *Conn) RandrGetCrtcGamma(Crtc Id) RandrGetCrtcGammaCookie { +func (c *Conn) RandrGetCrtcGamma(Crtc RandrCrtc) RandrGetCrtcGammaCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetCrtcGammaRequest(Crtc), cookie) return RandrGetCrtcGammaCookie{cookie} } -func (c *Conn) RandrGetCrtcGammaUnchecked(Crtc Id) RandrGetCrtcGammaCookie { +func (c *Conn) RandrGetCrtcGammaUnchecked(Crtc RandrCrtc) RandrGetCrtcGammaCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetCrtcGammaRequest(Crtc), cookie) return RandrGetCrtcGammaCookie{cookie} @@ -3199,7 +3221,7 @@ func (cook RandrGetCrtcGammaCookie) Check() error { } // Write request to wire for RandrGetCrtcGamma -func (c *Conn) randrGetCrtcGammaRequest(Crtc Id) []byte { +func (c *Conn) randrGetCrtcGammaRequest(Crtc RandrCrtc) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -3226,13 +3248,13 @@ type RandrSetCrtcGammaCookie struct { } // Write request to wire for RandrSetCrtcGamma -func (c *Conn) RandrSetCrtcGamma(Crtc Id, Size uint16, Red []uint16, Green []uint16, Blue []uint16) RandrSetCrtcGammaCookie { +func (c *Conn) RandrSetCrtcGamma(Crtc RandrCrtc, Size uint16, Red []uint16, Green []uint16, Blue []uint16) RandrSetCrtcGammaCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrSetCrtcGammaRequest(Crtc, Size, Red, Green, Blue), cookie) return RandrSetCrtcGammaCookie{cookie} } -func (c *Conn) RandrSetCrtcGammaChecked(Crtc Id, Size uint16, Red []uint16, Green []uint16, Blue []uint16) RandrSetCrtcGammaCookie { +func (c *Conn) RandrSetCrtcGammaChecked(Crtc RandrCrtc, Size uint16, Red []uint16, Green []uint16, Blue []uint16) RandrSetCrtcGammaCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrSetCrtcGammaRequest(Crtc, Size, Red, Green, Blue), cookie) return RandrSetCrtcGammaCookie{cookie} @@ -3243,7 +3265,7 @@ func (cook RandrSetCrtcGammaCookie) Check() error { } // Write request to wire for RandrSetCrtcGamma -func (c *Conn) randrSetCrtcGammaRequest(Crtc Id, Size uint16, Red []uint16, Green []uint16, Blue []uint16) []byte { +func (c *Conn) randrSetCrtcGammaRequest(Crtc RandrCrtc, Size uint16, Red []uint16, Green []uint16, Blue []uint16) []byte { size := pad((((12 + pad((int(Size) * 2))) + pad((int(Size) * 2))) + pad((int(Size) * 2)))) b := 0 buf := make([]byte, size) @@ -3292,13 +3314,13 @@ type RandrGetScreenResourcesCurrentCookie struct { *cookie } -func (c *Conn) RandrGetScreenResourcesCurrent(Window Id) RandrGetScreenResourcesCurrentCookie { +func (c *Conn) RandrGetScreenResourcesCurrent(Window Window) RandrGetScreenResourcesCurrentCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetScreenResourcesCurrentRequest(Window), cookie) return RandrGetScreenResourcesCurrentCookie{cookie} } -func (c *Conn) RandrGetScreenResourcesCurrentUnchecked(Window Id) RandrGetScreenResourcesCurrentCookie { +func (c *Conn) RandrGetScreenResourcesCurrentUnchecked(Window Window) RandrGetScreenResourcesCurrentCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetScreenResourcesCurrentRequest(Window), cookie) return RandrGetScreenResourcesCurrentCookie{cookie} @@ -3317,8 +3339,8 @@ type RandrGetScreenResourcesCurrentReply struct { NumModes uint16 NamesLen uint16 // padding: 8 bytes - Crtcs []Id // size: pad((int(NumCrtcs) * 4)) - Outputs []Id // size: pad((int(NumOutputs) * 4)) + Crtcs []RandrCrtc // size: pad((int(NumCrtcs) * 4)) + Outputs []RandrOutput // size: pad((int(NumOutputs) * 4)) Modes []RandrModeInfo // size: pad((int(NumModes) * 32)) Names []byte // size: pad((int(NamesLen) * 1)) } @@ -3368,16 +3390,16 @@ func randrGetScreenResourcesCurrentReply(buf []byte) *RandrGetScreenResourcesCur b += 8 // padding - v.Crtcs = make([]Id, v.NumCrtcs) + v.Crtcs = make([]RandrCrtc, v.NumCrtcs) for i := 0; i < int(v.NumCrtcs); i++ { - v.Crtcs[i] = Id(Get32(buf[b:])) + v.Crtcs[i] = RandrCrtc(Get32(buf[b:])) b += 4 } b = pad(b) - v.Outputs = make([]Id, v.NumOutputs) + v.Outputs = make([]RandrOutput, v.NumOutputs) for i := 0; i < int(v.NumOutputs); i++ { - v.Outputs[i] = Id(Get32(buf[b:])) + v.Outputs[i] = RandrOutput(Get32(buf[b:])) b += 4 } b = pad(b) @@ -3397,7 +3419,7 @@ func (cook RandrGetScreenResourcesCurrentCookie) Check() error { } // Write request to wire for RandrGetScreenResourcesCurrent -func (c *Conn) randrGetScreenResourcesCurrentRequest(Window Id) []byte { +func (c *Conn) randrGetScreenResourcesCurrentRequest(Window Window) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -3424,13 +3446,13 @@ type RandrSetCrtcTransformCookie struct { } // Write request to wire for RandrSetCrtcTransform -func (c *Conn) RandrSetCrtcTransform(Crtc Id, Transform RenderTransform, FilterLen uint16, FilterName string, FilterParams []RenderFixed) RandrSetCrtcTransformCookie { +func (c *Conn) RandrSetCrtcTransform(Crtc RandrCrtc, Transform RenderTransform, FilterLen uint16, FilterName string, FilterParams []RenderFixed) RandrSetCrtcTransformCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrSetCrtcTransformRequest(Crtc, Transform, FilterLen, FilterName, FilterParams), cookie) return RandrSetCrtcTransformCookie{cookie} } -func (c *Conn) RandrSetCrtcTransformChecked(Crtc Id, Transform RenderTransform, FilterLen uint16, FilterName string, FilterParams []RenderFixed) RandrSetCrtcTransformCookie { +func (c *Conn) RandrSetCrtcTransformChecked(Crtc RandrCrtc, Transform RenderTransform, FilterLen uint16, FilterName string, FilterParams []RenderFixed) RandrSetCrtcTransformCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrSetCrtcTransformRequest(Crtc, Transform, FilterLen, FilterName, FilterParams), cookie) return RandrSetCrtcTransformCookie{cookie} @@ -3441,7 +3463,7 @@ func (cook RandrSetCrtcTransformCookie) Check() error { } // Write request to wire for RandrSetCrtcTransform -func (c *Conn) randrSetCrtcTransformRequest(Crtc Id, Transform RenderTransform, FilterLen uint16, FilterName string, FilterParams []RenderFixed) []byte { +func (c *Conn) randrSetCrtcTransformRequest(Crtc RandrCrtc, Transform RenderTransform, FilterLen uint16, FilterName string, FilterParams []RenderFixed) []byte { size := pad(((48 + pad((int(FilterLen) * 1))) + pad((len(FilterParams) * 4)))) b := 0 buf := make([]byte, size) @@ -3487,13 +3509,13 @@ type RandrGetCrtcTransformCookie struct { *cookie } -func (c *Conn) RandrGetCrtcTransform(Crtc Id) RandrGetCrtcTransformCookie { +func (c *Conn) RandrGetCrtcTransform(Crtc RandrCrtc) RandrGetCrtcTransformCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetCrtcTransformRequest(Crtc), cookie) return RandrGetCrtcTransformCookie{cookie} } -func (c *Conn) RandrGetCrtcTransformUnchecked(Crtc Id) RandrGetCrtcTransformCookie { +func (c *Conn) RandrGetCrtcTransformUnchecked(Crtc RandrCrtc) RandrGetCrtcTransformCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetCrtcTransformRequest(Crtc), cookie) return RandrGetCrtcTransformCookie{cookie} @@ -3610,7 +3632,7 @@ func (cook RandrGetCrtcTransformCookie) Check() error { } // Write request to wire for RandrGetCrtcTransform -func (c *Conn) randrGetCrtcTransformRequest(Crtc Id) []byte { +func (c *Conn) randrGetCrtcTransformRequest(Crtc RandrCrtc) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -3636,13 +3658,13 @@ type RandrGetPanningCookie struct { *cookie } -func (c *Conn) RandrGetPanning(Crtc Id) RandrGetPanningCookie { +func (c *Conn) RandrGetPanning(Crtc RandrCrtc) RandrGetPanningCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetPanningRequest(Crtc), cookie) return RandrGetPanningCookie{cookie} } -func (c *Conn) RandrGetPanningUnchecked(Crtc Id) RandrGetPanningCookie { +func (c *Conn) RandrGetPanningUnchecked(Crtc RandrCrtc) RandrGetPanningCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetPanningRequest(Crtc), cookie) return RandrGetPanningCookie{cookie} @@ -3742,7 +3764,7 @@ func (cook RandrGetPanningCookie) Check() error { } // Write request to wire for RandrGetPanning -func (c *Conn) randrGetPanningRequest(Crtc Id) []byte { +func (c *Conn) randrGetPanningRequest(Crtc RandrCrtc) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -3768,13 +3790,13 @@ type RandrSetPanningCookie struct { *cookie } -func (c *Conn) RandrSetPanning(Crtc Id, Timestamp Timestamp, Left uint16, Top uint16, Width uint16, Height uint16, TrackLeft uint16, TrackTop uint16, TrackWidth uint16, TrackHeight uint16, BorderLeft int16, BorderTop int16, BorderRight int16, BorderBottom int16) RandrSetPanningCookie { +func (c *Conn) RandrSetPanning(Crtc RandrCrtc, Timestamp Timestamp, Left uint16, Top uint16, Width uint16, Height uint16, TrackLeft uint16, TrackTop uint16, TrackWidth uint16, TrackHeight uint16, BorderLeft int16, BorderTop int16, BorderRight int16, BorderBottom int16) RandrSetPanningCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrSetPanningRequest(Crtc, Timestamp, Left, Top, Width, Height, TrackLeft, TrackTop, TrackWidth, TrackHeight, BorderLeft, BorderTop, BorderRight, BorderBottom), cookie) return RandrSetPanningCookie{cookie} } -func (c *Conn) RandrSetPanningUnchecked(Crtc Id, Timestamp Timestamp, Left uint16, Top uint16, Width uint16, Height uint16, TrackLeft uint16, TrackTop uint16, TrackWidth uint16, TrackHeight uint16, BorderLeft int16, BorderTop int16, BorderRight int16, BorderBottom int16) RandrSetPanningCookie { +func (c *Conn) RandrSetPanningUnchecked(Crtc RandrCrtc, Timestamp Timestamp, Left uint16, Top uint16, Width uint16, Height uint16, TrackLeft uint16, TrackTop uint16, TrackWidth uint16, TrackHeight uint16, BorderLeft int16, BorderTop int16, BorderRight int16, BorderBottom int16) RandrSetPanningCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrSetPanningRequest(Crtc, Timestamp, Left, Top, Width, Height, TrackLeft, TrackTop, TrackWidth, TrackHeight, BorderLeft, BorderTop, BorderRight, BorderBottom), cookie) return RandrSetPanningCookie{cookie} @@ -3826,7 +3848,7 @@ func (cook RandrSetPanningCookie) Check() error { } // Write request to wire for RandrSetPanning -func (c *Conn) randrSetPanningRequest(Crtc Id, Timestamp Timestamp, Left uint16, Top uint16, Width uint16, Height uint16, TrackLeft uint16, TrackTop uint16, TrackWidth uint16, TrackHeight uint16, BorderLeft int16, BorderTop int16, BorderRight int16, BorderBottom int16) []byte { +func (c *Conn) randrSetPanningRequest(Crtc RandrCrtc, Timestamp Timestamp, Left uint16, Top uint16, Width uint16, Height uint16, TrackLeft uint16, TrackTop uint16, TrackWidth uint16, TrackHeight uint16, BorderLeft int16, BorderTop int16, BorderRight int16, BorderBottom int16) []byte { size := 36 b := 0 buf := make([]byte, size) @@ -3892,13 +3914,13 @@ type RandrSetOutputPrimaryCookie struct { } // Write request to wire for RandrSetOutputPrimary -func (c *Conn) RandrSetOutputPrimary(Window Id, Output Id) RandrSetOutputPrimaryCookie { +func (c *Conn) RandrSetOutputPrimary(Window Window, Output RandrOutput) RandrSetOutputPrimaryCookie { cookie := c.newCookie(false, false) c.newRequest(c.randrSetOutputPrimaryRequest(Window, Output), cookie) return RandrSetOutputPrimaryCookie{cookie} } -func (c *Conn) RandrSetOutputPrimaryChecked(Window Id, Output Id) RandrSetOutputPrimaryCookie { +func (c *Conn) RandrSetOutputPrimaryChecked(Window Window, Output RandrOutput) RandrSetOutputPrimaryCookie { cookie := c.newCookie(true, false) c.newRequest(c.randrSetOutputPrimaryRequest(Window, Output), cookie) return RandrSetOutputPrimaryCookie{cookie} @@ -3909,7 +3931,7 @@ func (cook RandrSetOutputPrimaryCookie) Check() error { } // Write request to wire for RandrSetOutputPrimary -func (c *Conn) randrSetOutputPrimaryRequest(Window Id, Output Id) []byte { +func (c *Conn) randrSetOutputPrimaryRequest(Window Window, Output RandrOutput) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -3938,13 +3960,13 @@ type RandrGetOutputPrimaryCookie struct { *cookie } -func (c *Conn) RandrGetOutputPrimary(Window Id) RandrGetOutputPrimaryCookie { +func (c *Conn) RandrGetOutputPrimary(Window Window) RandrGetOutputPrimaryCookie { cookie := c.newCookie(true, true) c.newRequest(c.randrGetOutputPrimaryRequest(Window), cookie) return RandrGetOutputPrimaryCookie{cookie} } -func (c *Conn) RandrGetOutputPrimaryUnchecked(Window Id) RandrGetOutputPrimaryCookie { +func (c *Conn) RandrGetOutputPrimaryUnchecked(Window Window) RandrGetOutputPrimaryCookie { cookie := c.newCookie(false, true) c.newRequest(c.randrGetOutputPrimaryRequest(Window), cookie) return RandrGetOutputPrimaryCookie{cookie} @@ -3956,7 +3978,7 @@ type RandrGetOutputPrimaryReply struct { Sequence uint16 Length uint32 // padding: 1 bytes - Output Id + Output RandrOutput } // Waits and reads reply data from request RandrGetOutputPrimary @@ -3984,7 +4006,7 @@ func randrGetOutputPrimaryReply(buf []byte) *RandrGetOutputPrimaryReply { v.Length = Get32(buf[b:]) // 4-byte units b += 4 - v.Output = Id(Get32(buf[b:])) + v.Output = RandrOutput(Get32(buf[b:])) b += 4 return v @@ -3995,7 +4017,7 @@ func (cook RandrGetOutputPrimaryCookie) Check() error { } // Write request to wire for RandrGetOutputPrimary -func (c *Conn) randrGetOutputPrimaryRequest(Window Id) []byte { +func (c *Conn) randrGetOutputPrimaryRequest(Window Window) []byte { size := 8 b := 0 buf := make([]byte, size) -- cgit v1.2.3-54-g00ecf