make resource ids their own individual types. last commit before overhaul to sub-packages

This commit is contained in:
Andrew Gallant (Ocelot) 2012-05-10 12:47:19 -04:00
parent 00c6217ca9
commit e239bb3c68
35 changed files with 1906 additions and 1685 deletions

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by bigreq.xml on May 8 2012 11:03:23pm EDT. This file was generated by bigreq.xml on May 10 2012 12:39:33pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -33,12 +33,18 @@ func init() {
newExtErrorFuncs["BIG-REQUESTS"] = make(map[int]newErrorFun) newExtErrorFuncs["BIG-REQUESTS"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double'
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
@ -51,14 +57,6 @@ func init() {
// Skipping definition for base type 'Int8' // Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double'
// Request BigreqEnable // Request BigreqEnable
// size: 4 // size: 4
type BigreqEnableCookie struct { type BigreqEnableCookie struct {

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by composite.xml on May 8 2012 11:03:23pm EDT. This file was generated by composite.xml on May 10 2012 12:39:33pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -38,6 +38,12 @@ func init() {
newExtErrorFuncs["Composite"] = make(map[int]newErrorFun) newExtErrorFuncs["Composite"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8' // Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
@ -52,18 +58,10 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
const ( const (
CompositeRedirectAutomatic = 0 CompositeRedirectAutomatic = 0
CompositeRedirectManual = 1 CompositeRedirectManual = 1
@ -169,13 +167,13 @@ type CompositeRedirectWindowCookie struct {
} }
// Write request to wire for CompositeRedirectWindow // Write request to wire for CompositeRedirectWindow
func (c *Conn) CompositeRedirectWindow(Window Id, Update byte) CompositeRedirectWindowCookie { func (c *Conn) CompositeRedirectWindow(Window Window, Update byte) CompositeRedirectWindowCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.compositeRedirectWindowRequest(Window, Update), cookie) c.newRequest(c.compositeRedirectWindowRequest(Window, Update), cookie)
return CompositeRedirectWindowCookie{cookie} return CompositeRedirectWindowCookie{cookie}
} }
func (c *Conn) CompositeRedirectWindowChecked(Window Id, Update byte) CompositeRedirectWindowCookie { func (c *Conn) CompositeRedirectWindowChecked(Window Window, Update byte) CompositeRedirectWindowCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.compositeRedirectWindowRequest(Window, Update), cookie) c.newRequest(c.compositeRedirectWindowRequest(Window, Update), cookie)
return CompositeRedirectWindowCookie{cookie} return CompositeRedirectWindowCookie{cookie}
@ -186,7 +184,7 @@ func (cook CompositeRedirectWindowCookie) Check() error {
} }
// Write request to wire for CompositeRedirectWindow // Write request to wire for CompositeRedirectWindow
func (c *Conn) compositeRedirectWindowRequest(Window Id, Update byte) []byte { func (c *Conn) compositeRedirectWindowRequest(Window Window, Update byte) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -218,13 +216,13 @@ type CompositeRedirectSubwindowsCookie struct {
} }
// Write request to wire for CompositeRedirectSubwindows // Write request to wire for CompositeRedirectSubwindows
func (c *Conn) CompositeRedirectSubwindows(Window Id, Update byte) CompositeRedirectSubwindowsCookie { func (c *Conn) CompositeRedirectSubwindows(Window Window, Update byte) CompositeRedirectSubwindowsCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.compositeRedirectSubwindowsRequest(Window, Update), cookie) c.newRequest(c.compositeRedirectSubwindowsRequest(Window, Update), cookie)
return CompositeRedirectSubwindowsCookie{cookie} return CompositeRedirectSubwindowsCookie{cookie}
} }
func (c *Conn) CompositeRedirectSubwindowsChecked(Window Id, Update byte) CompositeRedirectSubwindowsCookie { func (c *Conn) CompositeRedirectSubwindowsChecked(Window Window, Update byte) CompositeRedirectSubwindowsCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.compositeRedirectSubwindowsRequest(Window, Update), cookie) c.newRequest(c.compositeRedirectSubwindowsRequest(Window, Update), cookie)
return CompositeRedirectSubwindowsCookie{cookie} return CompositeRedirectSubwindowsCookie{cookie}
@ -235,7 +233,7 @@ func (cook CompositeRedirectSubwindowsCookie) Check() error {
} }
// Write request to wire for CompositeRedirectSubwindows // Write request to wire for CompositeRedirectSubwindows
func (c *Conn) compositeRedirectSubwindowsRequest(Window Id, Update byte) []byte { func (c *Conn) compositeRedirectSubwindowsRequest(Window Window, Update byte) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -267,13 +265,13 @@ type CompositeUnredirectWindowCookie struct {
} }
// Write request to wire for CompositeUnredirectWindow // Write request to wire for CompositeUnredirectWindow
func (c *Conn) CompositeUnredirectWindow(Window Id, Update byte) CompositeUnredirectWindowCookie { func (c *Conn) CompositeUnredirectWindow(Window Window, Update byte) CompositeUnredirectWindowCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.compositeUnredirectWindowRequest(Window, Update), cookie) c.newRequest(c.compositeUnredirectWindowRequest(Window, Update), cookie)
return CompositeUnredirectWindowCookie{cookie} return CompositeUnredirectWindowCookie{cookie}
} }
func (c *Conn) CompositeUnredirectWindowChecked(Window Id, Update byte) CompositeUnredirectWindowCookie { func (c *Conn) CompositeUnredirectWindowChecked(Window Window, Update byte) CompositeUnredirectWindowCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.compositeUnredirectWindowRequest(Window, Update), cookie) c.newRequest(c.compositeUnredirectWindowRequest(Window, Update), cookie)
return CompositeUnredirectWindowCookie{cookie} return CompositeUnredirectWindowCookie{cookie}
@ -284,7 +282,7 @@ func (cook CompositeUnredirectWindowCookie) Check() error {
} }
// Write request to wire for CompositeUnredirectWindow // Write request to wire for CompositeUnredirectWindow
func (c *Conn) compositeUnredirectWindowRequest(Window Id, Update byte) []byte { func (c *Conn) compositeUnredirectWindowRequest(Window Window, Update byte) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -316,13 +314,13 @@ type CompositeUnredirectSubwindowsCookie struct {
} }
// Write request to wire for CompositeUnredirectSubwindows // Write request to wire for CompositeUnredirectSubwindows
func (c *Conn) CompositeUnredirectSubwindows(Window Id, Update byte) CompositeUnredirectSubwindowsCookie { func (c *Conn) CompositeUnredirectSubwindows(Window Window, Update byte) CompositeUnredirectSubwindowsCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.compositeUnredirectSubwindowsRequest(Window, Update), cookie) c.newRequest(c.compositeUnredirectSubwindowsRequest(Window, Update), cookie)
return CompositeUnredirectSubwindowsCookie{cookie} return CompositeUnredirectSubwindowsCookie{cookie}
} }
func (c *Conn) CompositeUnredirectSubwindowsChecked(Window Id, Update byte) CompositeUnredirectSubwindowsCookie { func (c *Conn) CompositeUnredirectSubwindowsChecked(Window Window, Update byte) CompositeUnredirectSubwindowsCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.compositeUnredirectSubwindowsRequest(Window, Update), cookie) c.newRequest(c.compositeUnredirectSubwindowsRequest(Window, Update), cookie)
return CompositeUnredirectSubwindowsCookie{cookie} return CompositeUnredirectSubwindowsCookie{cookie}
@ -333,7 +331,7 @@ func (cook CompositeUnredirectSubwindowsCookie) Check() error {
} }
// Write request to wire for CompositeUnredirectSubwindows // Write request to wire for CompositeUnredirectSubwindows
func (c *Conn) compositeUnredirectSubwindowsRequest(Window Id, Update byte) []byte { func (c *Conn) compositeUnredirectSubwindowsRequest(Window Window, Update byte) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -365,13 +363,13 @@ type CompositeCreateRegionFromBorderClipCookie struct {
} }
// Write request to wire for CompositeCreateRegionFromBorderClip // Write request to wire for CompositeCreateRegionFromBorderClip
func (c *Conn) CompositeCreateRegionFromBorderClip(Region Id, Window Id) CompositeCreateRegionFromBorderClipCookie { func (c *Conn) CompositeCreateRegionFromBorderClip(Region XfixesRegion, Window Window) CompositeCreateRegionFromBorderClipCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.compositeCreateRegionFromBorderClipRequest(Region, Window), cookie) c.newRequest(c.compositeCreateRegionFromBorderClipRequest(Region, Window), cookie)
return CompositeCreateRegionFromBorderClipCookie{cookie} return CompositeCreateRegionFromBorderClipCookie{cookie}
} }
func (c *Conn) CompositeCreateRegionFromBorderClipChecked(Region Id, Window Id) CompositeCreateRegionFromBorderClipCookie { func (c *Conn) CompositeCreateRegionFromBorderClipChecked(Region XfixesRegion, Window Window) CompositeCreateRegionFromBorderClipCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.compositeCreateRegionFromBorderClipRequest(Region, Window), cookie) c.newRequest(c.compositeCreateRegionFromBorderClipRequest(Region, Window), cookie)
return CompositeCreateRegionFromBorderClipCookie{cookie} return CompositeCreateRegionFromBorderClipCookie{cookie}
@ -382,7 +380,7 @@ func (cook CompositeCreateRegionFromBorderClipCookie) Check() error {
} }
// Write request to wire for CompositeCreateRegionFromBorderClip // Write request to wire for CompositeCreateRegionFromBorderClip
func (c *Conn) compositeCreateRegionFromBorderClipRequest(Region Id, Window Id) []byte { func (c *Conn) compositeCreateRegionFromBorderClipRequest(Region XfixesRegion, Window Window) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -412,13 +410,13 @@ type CompositeNameWindowPixmapCookie struct {
} }
// Write request to wire for CompositeNameWindowPixmap // Write request to wire for CompositeNameWindowPixmap
func (c *Conn) CompositeNameWindowPixmap(Window Id, Pixmap Id) CompositeNameWindowPixmapCookie { func (c *Conn) CompositeNameWindowPixmap(Window Window, Pixmap Pixmap) CompositeNameWindowPixmapCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.compositeNameWindowPixmapRequest(Window, Pixmap), cookie) c.newRequest(c.compositeNameWindowPixmapRequest(Window, Pixmap), cookie)
return CompositeNameWindowPixmapCookie{cookie} return CompositeNameWindowPixmapCookie{cookie}
} }
func (c *Conn) CompositeNameWindowPixmapChecked(Window Id, Pixmap Id) CompositeNameWindowPixmapCookie { func (c *Conn) CompositeNameWindowPixmapChecked(Window Window, Pixmap Pixmap) CompositeNameWindowPixmapCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.compositeNameWindowPixmapRequest(Window, Pixmap), cookie) c.newRequest(c.compositeNameWindowPixmapRequest(Window, Pixmap), cookie)
return CompositeNameWindowPixmapCookie{cookie} return CompositeNameWindowPixmapCookie{cookie}
@ -429,7 +427,7 @@ func (cook CompositeNameWindowPixmapCookie) Check() error {
} }
// Write request to wire for CompositeNameWindowPixmap // Write request to wire for CompositeNameWindowPixmap
func (c *Conn) compositeNameWindowPixmapRequest(Window Id, Pixmap Id) []byte { func (c *Conn) compositeNameWindowPixmapRequest(Window Window, Pixmap Pixmap) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -458,13 +456,13 @@ type CompositeGetOverlayWindowCookie struct {
*cookie *cookie
} }
func (c *Conn) CompositeGetOverlayWindow(Window Id) CompositeGetOverlayWindowCookie { func (c *Conn) CompositeGetOverlayWindow(Window Window) CompositeGetOverlayWindowCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.compositeGetOverlayWindowRequest(Window), cookie) c.newRequest(c.compositeGetOverlayWindowRequest(Window), cookie)
return CompositeGetOverlayWindowCookie{cookie} return CompositeGetOverlayWindowCookie{cookie}
} }
func (c *Conn) CompositeGetOverlayWindowUnchecked(Window Id) CompositeGetOverlayWindowCookie { func (c *Conn) CompositeGetOverlayWindowUnchecked(Window Window) CompositeGetOverlayWindowCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.compositeGetOverlayWindowRequest(Window), cookie) c.newRequest(c.compositeGetOverlayWindowRequest(Window), cookie)
return CompositeGetOverlayWindowCookie{cookie} return CompositeGetOverlayWindowCookie{cookie}
@ -476,7 +474,7 @@ type CompositeGetOverlayWindowReply struct {
Sequence uint16 Sequence uint16
Length uint32 Length uint32
// padding: 1 bytes // padding: 1 bytes
OverlayWin Id OverlayWin Window
// padding: 20 bytes // padding: 20 bytes
} }
@ -505,7 +503,7 @@ func compositeGetOverlayWindowReply(buf []byte) *CompositeGetOverlayWindowReply
v.Length = Get32(buf[b:]) // 4-byte units v.Length = Get32(buf[b:]) // 4-byte units
b += 4 b += 4
v.OverlayWin = Id(Get32(buf[b:])) v.OverlayWin = Window(Get32(buf[b:]))
b += 4 b += 4
b += 20 // padding b += 20 // padding
@ -518,7 +516,7 @@ func (cook CompositeGetOverlayWindowCookie) Check() error {
} }
// Write request to wire for CompositeGetOverlayWindow // Write request to wire for CompositeGetOverlayWindow
func (c *Conn) compositeGetOverlayWindowRequest(Window Id) []byte { func (c *Conn) compositeGetOverlayWindowRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -545,13 +543,13 @@ type CompositeReleaseOverlayWindowCookie struct {
} }
// Write request to wire for CompositeReleaseOverlayWindow // Write request to wire for CompositeReleaseOverlayWindow
func (c *Conn) CompositeReleaseOverlayWindow(Window Id) CompositeReleaseOverlayWindowCookie { func (c *Conn) CompositeReleaseOverlayWindow(Window Window) CompositeReleaseOverlayWindowCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.compositeReleaseOverlayWindowRequest(Window), cookie) c.newRequest(c.compositeReleaseOverlayWindowRequest(Window), cookie)
return CompositeReleaseOverlayWindowCookie{cookie} return CompositeReleaseOverlayWindowCookie{cookie}
} }
func (c *Conn) CompositeReleaseOverlayWindowChecked(Window Id) CompositeReleaseOverlayWindowCookie { func (c *Conn) CompositeReleaseOverlayWindowChecked(Window Window) CompositeReleaseOverlayWindowCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.compositeReleaseOverlayWindowRequest(Window), cookie) c.newRequest(c.compositeReleaseOverlayWindowRequest(Window), cookie)
return CompositeReleaseOverlayWindowCookie{cookie} return CompositeReleaseOverlayWindowCookie{cookie}
@ -562,7 +560,7 @@ func (cook CompositeReleaseOverlayWindowCookie) Check() error {
} }
// Write request to wire for CompositeReleaseOverlayWindow // Write request to wire for CompositeReleaseOverlayWindow
func (c *Conn) compositeReleaseOverlayWindowRequest(Window Id) []byte { func (c *Conn) compositeReleaseOverlayWindowRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by damage.xml on May 8 2012 11:03:23pm EDT. This file was generated by damage.xml on May 10 2012 12:39:33pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -38,10 +38,6 @@ func init() {
newExtErrorFuncs["DAMAGE"] = make(map[int]newErrorFun) newExtErrorFuncs["DAMAGE"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32' // Skipping definition for base type 'Int32'
@ -64,6 +60,8 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Card8'
const ( const (
DamageReportLevelRawRectangles = 0 DamageReportLevelRawRectangles = 0
DamageReportLevelDeltaRectangles = 1 DamageReportLevelDeltaRectangles = 1
@ -71,7 +69,15 @@ const (
DamageReportLevelNonEmpty = 3 DamageReportLevelNonEmpty = 3
) )
// Skipping resource definition of 'Damage' type DamageDamage uint32
func (c *Conn) NewDamageDamageId() (DamageDamage, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return DamageDamage(id), nil
}
// Event definition DamageNotify (0) // Event definition DamageNotify (0)
// Size: 32 // Size: 32
@ -81,8 +87,8 @@ const DamageNotify = 0
type DamageNotifyEvent struct { type DamageNotifyEvent struct {
Sequence uint16 Sequence uint16
Level byte Level byte
Drawable Id Drawable Drawable
Damage Id Damage DamageDamage
Timestamp Timestamp Timestamp Timestamp
Area Rectangle Area Rectangle
Geometry Rectangle Geometry Rectangle
@ -99,10 +105,10 @@ func NewDamageNotifyEvent(buf []byte) Event {
v.Sequence = Get16(buf[b:]) v.Sequence = Get16(buf[b:])
b += 2 b += 2
v.Drawable = Id(Get32(buf[b:])) v.Drawable = Drawable(Get32(buf[b:]))
b += 4 b += 4
v.Damage = Id(Get32(buf[b:])) v.Damage = DamageDamage(Get32(buf[b:]))
b += 4 b += 4
v.Timestamp = Timestamp(Get32(buf[b:])) v.Timestamp = Timestamp(Get32(buf[b:]))
@ -205,7 +211,7 @@ func (err DamageBadDamageError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err DamageBadDamageError) BadId() Id { func (err DamageBadDamageError) BadId() uint32 {
return 0 return 0
} }
@ -320,13 +326,13 @@ type DamageCreateCookie struct {
} }
// Write request to wire for DamageCreate // Write request to wire for DamageCreate
func (c *Conn) DamageCreate(Damage Id, Drawable Id, Level byte) DamageCreateCookie { func (c *Conn) DamageCreate(Damage DamageDamage, Drawable Drawable, Level byte) DamageCreateCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.damageCreateRequest(Damage, Drawable, Level), cookie) c.newRequest(c.damageCreateRequest(Damage, Drawable, Level), cookie)
return DamageCreateCookie{cookie} return DamageCreateCookie{cookie}
} }
func (c *Conn) DamageCreateChecked(Damage Id, Drawable Id, Level byte) DamageCreateCookie { func (c *Conn) DamageCreateChecked(Damage DamageDamage, Drawable Drawable, Level byte) DamageCreateCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.damageCreateRequest(Damage, Drawable, Level), cookie) c.newRequest(c.damageCreateRequest(Damage, Drawable, Level), cookie)
return DamageCreateCookie{cookie} return DamageCreateCookie{cookie}
@ -337,7 +343,7 @@ func (cook DamageCreateCookie) Check() error {
} }
// Write request to wire for DamageCreate // Write request to wire for DamageCreate
func (c *Conn) damageCreateRequest(Damage Id, Drawable Id, Level byte) []byte { func (c *Conn) damageCreateRequest(Damage DamageDamage, Drawable Drawable, Level byte) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -372,13 +378,13 @@ type DamageDestroyCookie struct {
} }
// Write request to wire for DamageDestroy // Write request to wire for DamageDestroy
func (c *Conn) DamageDestroy(Damage Id) DamageDestroyCookie { func (c *Conn) DamageDestroy(Damage DamageDamage) DamageDestroyCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.damageDestroyRequest(Damage), cookie) c.newRequest(c.damageDestroyRequest(Damage), cookie)
return DamageDestroyCookie{cookie} return DamageDestroyCookie{cookie}
} }
func (c *Conn) DamageDestroyChecked(Damage Id) DamageDestroyCookie { func (c *Conn) DamageDestroyChecked(Damage DamageDamage) DamageDestroyCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.damageDestroyRequest(Damage), cookie) c.newRequest(c.damageDestroyRequest(Damage), cookie)
return DamageDestroyCookie{cookie} return DamageDestroyCookie{cookie}
@ -389,7 +395,7 @@ func (cook DamageDestroyCookie) Check() error {
} }
// Write request to wire for DamageDestroy // Write request to wire for DamageDestroy
func (c *Conn) damageDestroyRequest(Damage Id) []byte { func (c *Conn) damageDestroyRequest(Damage DamageDamage) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -416,13 +422,13 @@ type DamageSubtractCookie struct {
} }
// Write request to wire for DamageSubtract // Write request to wire for DamageSubtract
func (c *Conn) DamageSubtract(Damage Id, Repair Id, Parts Id) DamageSubtractCookie { func (c *Conn) DamageSubtract(Damage DamageDamage, Repair XfixesRegion, Parts XfixesRegion) DamageSubtractCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.damageSubtractRequest(Damage, Repair, Parts), cookie) c.newRequest(c.damageSubtractRequest(Damage, Repair, Parts), cookie)
return DamageSubtractCookie{cookie} return DamageSubtractCookie{cookie}
} }
func (c *Conn) DamageSubtractChecked(Damage Id, Repair Id, Parts Id) DamageSubtractCookie { func (c *Conn) DamageSubtractChecked(Damage DamageDamage, Repair XfixesRegion, Parts XfixesRegion) DamageSubtractCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.damageSubtractRequest(Damage, Repair, Parts), cookie) c.newRequest(c.damageSubtractRequest(Damage, Repair, Parts), cookie)
return DamageSubtractCookie{cookie} return DamageSubtractCookie{cookie}
@ -433,7 +439,7 @@ func (cook DamageSubtractCookie) Check() error {
} }
// Write request to wire for DamageSubtract // Write request to wire for DamageSubtract
func (c *Conn) damageSubtractRequest(Damage Id, Repair Id, Parts Id) []byte { func (c *Conn) damageSubtractRequest(Damage DamageDamage, Repair XfixesRegion, Parts XfixesRegion) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -466,13 +472,13 @@ type DamageAddCookie struct {
} }
// Write request to wire for DamageAdd // Write request to wire for DamageAdd
func (c *Conn) DamageAdd(Drawable Id, Region Id) DamageAddCookie { func (c *Conn) DamageAdd(Drawable Drawable, Region XfixesRegion) DamageAddCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.damageAddRequest(Drawable, Region), cookie) c.newRequest(c.damageAddRequest(Drawable, Region), cookie)
return DamageAddCookie{cookie} return DamageAddCookie{cookie}
} }
func (c *Conn) DamageAddChecked(Drawable Id, Region Id) DamageAddCookie { func (c *Conn) DamageAddChecked(Drawable Drawable, Region XfixesRegion) DamageAddCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.damageAddRequest(Drawable, Region), cookie) c.newRequest(c.damageAddRequest(Drawable, Region), cookie)
return DamageAddCookie{cookie} return DamageAddCookie{cookie}
@ -483,7 +489,7 @@ func (cook DamageAddCookie) Check() error {
} }
// Write request to wire for DamageAdd // Write request to wire for DamageAdd
func (c *Conn) damageAddRequest(Drawable Id, Region Id) []byte { func (c *Conn) damageAddRequest(Drawable Drawable, Region XfixesRegion) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by dpms.xml on May 8 2012 11:03:23pm EDT. This file was generated by dpms.xml on May 10 2012 12:39:33pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -33,20 +33,8 @@ func init() {
newExtErrorFuncs["DPMS"] = make(map[int]newErrorFun) newExtErrorFuncs["DPMS"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double'
// Skipping definition for base type 'Bool'
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
@ -59,6 +47,16 @@ func init() {
// Skipping definition for base type 'Int8' // Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double'
// Skipping definition for base type 'Bool'
const ( const (
DpmsDPMSModeOn = 0 DpmsDPMSModeOn = 0
DpmsDPMSModeStandby = 1 DpmsDPMSModeStandby = 1

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by dri2.xml on May 8 2012 11:03:23pm EDT. This file was generated by dri2.xml on May 10 2012 12:39:33pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,6 +37,10 @@ func init() {
newExtErrorFuncs["DRI2"] = make(map[int]newErrorFun) newExtErrorFuncs["DRI2"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char' // Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32' // Skipping definition for base type 'Card32'
@ -47,8 +51,6 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
@ -59,10 +61,6 @@ func init() {
// Skipping definition for base type 'Byte' // Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
const ( const (
Dri2AttachmentBufferFrontLeft = 0 Dri2AttachmentBufferFrontLeft = 0
Dri2AttachmentBufferBackLeft = 1 Dri2AttachmentBufferBackLeft = 1
@ -231,7 +229,7 @@ type Dri2BufferSwapCompleteEvent struct {
// padding: 1 bytes // padding: 1 bytes
EventType uint16 EventType uint16
// padding: 2 bytes // padding: 2 bytes
Drawable Id Drawable Drawable
UstHi uint32 UstHi uint32
UstLo uint32 UstLo uint32
MscHi uint32 MscHi uint32
@ -254,7 +252,7 @@ func NewDri2BufferSwapCompleteEvent(buf []byte) Event {
b += 2 // padding b += 2 // padding
v.Drawable = Id(Get32(buf[b:])) v.Drawable = Drawable(Get32(buf[b:]))
b += 4 b += 4
v.UstHi = Get32(buf[b:]) v.UstHi = Get32(buf[b:])
@ -345,7 +343,7 @@ const Dri2InvalidateBuffers = 1
type Dri2InvalidateBuffersEvent struct { type Dri2InvalidateBuffersEvent struct {
Sequence uint16 Sequence uint16
// padding: 1 bytes // padding: 1 bytes
Drawable Id Drawable Drawable
} }
// Event read Dri2InvalidateBuffers // Event read Dri2InvalidateBuffers
@ -358,7 +356,7 @@ func NewDri2InvalidateBuffersEvent(buf []byte) Event {
v.Sequence = Get16(buf[b:]) v.Sequence = Get16(buf[b:])
b += 2 b += 2
v.Drawable = Id(Get32(buf[b:])) v.Drawable = Drawable(Get32(buf[b:]))
b += 4 b += 4
return v return v
@ -496,13 +494,13 @@ type Dri2ConnectCookie struct {
*cookie *cookie
} }
func (c *Conn) Dri2Connect(Window Id, DriverType uint32) Dri2ConnectCookie { func (c *Conn) Dri2Connect(Window Window, DriverType uint32) Dri2ConnectCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.dri2ConnectRequest(Window, DriverType), cookie) c.newRequest(c.dri2ConnectRequest(Window, DriverType), cookie)
return Dri2ConnectCookie{cookie} return Dri2ConnectCookie{cookie}
} }
func (c *Conn) Dri2ConnectUnchecked(Window Id, DriverType uint32) Dri2ConnectCookie { func (c *Conn) Dri2ConnectUnchecked(Window Window, DriverType uint32) Dri2ConnectCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.dri2ConnectRequest(Window, DriverType), cookie) c.newRequest(c.dri2ConnectRequest(Window, DriverType), cookie)
return Dri2ConnectCookie{cookie} return Dri2ConnectCookie{cookie}
@ -581,7 +579,7 @@ func (cook Dri2ConnectCookie) Check() error {
} }
// Write request to wire for Dri2Connect // Write request to wire for Dri2Connect
func (c *Conn) dri2ConnectRequest(Window Id, DriverType uint32) []byte { func (c *Conn) dri2ConnectRequest(Window Window, DriverType uint32) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -610,13 +608,13 @@ type Dri2AuthenticateCookie struct {
*cookie *cookie
} }
func (c *Conn) Dri2Authenticate(Window Id, Magic uint32) Dri2AuthenticateCookie { func (c *Conn) Dri2Authenticate(Window Window, Magic uint32) Dri2AuthenticateCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.dri2AuthenticateRequest(Window, Magic), cookie) c.newRequest(c.dri2AuthenticateRequest(Window, Magic), cookie)
return Dri2AuthenticateCookie{cookie} return Dri2AuthenticateCookie{cookie}
} }
func (c *Conn) Dri2AuthenticateUnchecked(Window Id, Magic uint32) Dri2AuthenticateCookie { func (c *Conn) Dri2AuthenticateUnchecked(Window Window, Magic uint32) Dri2AuthenticateCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.dri2AuthenticateRequest(Window, Magic), cookie) c.newRequest(c.dri2AuthenticateRequest(Window, Magic), cookie)
return Dri2AuthenticateCookie{cookie} return Dri2AuthenticateCookie{cookie}
@ -667,7 +665,7 @@ func (cook Dri2AuthenticateCookie) Check() error {
} }
// Write request to wire for Dri2Authenticate // Write request to wire for Dri2Authenticate
func (c *Conn) dri2AuthenticateRequest(Window Id, Magic uint32) []byte { func (c *Conn) dri2AuthenticateRequest(Window Window, Magic uint32) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -697,13 +695,13 @@ type Dri2CreateDrawableCookie struct {
} }
// Write request to wire for Dri2CreateDrawable // Write request to wire for Dri2CreateDrawable
func (c *Conn) Dri2CreateDrawable(Drawable Id) Dri2CreateDrawableCookie { func (c *Conn) Dri2CreateDrawable(Drawable Drawable) Dri2CreateDrawableCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.dri2CreateDrawableRequest(Drawable), cookie) c.newRequest(c.dri2CreateDrawableRequest(Drawable), cookie)
return Dri2CreateDrawableCookie{cookie} return Dri2CreateDrawableCookie{cookie}
} }
func (c *Conn) Dri2CreateDrawableChecked(Drawable Id) Dri2CreateDrawableCookie { func (c *Conn) Dri2CreateDrawableChecked(Drawable Drawable) Dri2CreateDrawableCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.dri2CreateDrawableRequest(Drawable), cookie) c.newRequest(c.dri2CreateDrawableRequest(Drawable), cookie)
return Dri2CreateDrawableCookie{cookie} return Dri2CreateDrawableCookie{cookie}
@ -714,7 +712,7 @@ func (cook Dri2CreateDrawableCookie) Check() error {
} }
// Write request to wire for Dri2CreateDrawable // Write request to wire for Dri2CreateDrawable
func (c *Conn) dri2CreateDrawableRequest(Drawable Id) []byte { func (c *Conn) dri2CreateDrawableRequest(Drawable Drawable) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -741,13 +739,13 @@ type Dri2DestroyDrawableCookie struct {
} }
// Write request to wire for Dri2DestroyDrawable // Write request to wire for Dri2DestroyDrawable
func (c *Conn) Dri2DestroyDrawable(Drawable Id) Dri2DestroyDrawableCookie { func (c *Conn) Dri2DestroyDrawable(Drawable Drawable) Dri2DestroyDrawableCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.dri2DestroyDrawableRequest(Drawable), cookie) c.newRequest(c.dri2DestroyDrawableRequest(Drawable), cookie)
return Dri2DestroyDrawableCookie{cookie} return Dri2DestroyDrawableCookie{cookie}
} }
func (c *Conn) Dri2DestroyDrawableChecked(Drawable Id) Dri2DestroyDrawableCookie { func (c *Conn) Dri2DestroyDrawableChecked(Drawable Drawable) Dri2DestroyDrawableCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.dri2DestroyDrawableRequest(Drawable), cookie) c.newRequest(c.dri2DestroyDrawableRequest(Drawable), cookie)
return Dri2DestroyDrawableCookie{cookie} return Dri2DestroyDrawableCookie{cookie}
@ -758,7 +756,7 @@ func (cook Dri2DestroyDrawableCookie) Check() error {
} }
// Write request to wire for Dri2DestroyDrawable // Write request to wire for Dri2DestroyDrawable
func (c *Conn) dri2DestroyDrawableRequest(Drawable Id) []byte { func (c *Conn) dri2DestroyDrawableRequest(Drawable Drawable) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -784,13 +782,13 @@ type Dri2GetBuffersCookie struct {
*cookie *cookie
} }
func (c *Conn) Dri2GetBuffers(Drawable Id, Count uint32, Attachments []uint32) Dri2GetBuffersCookie { func (c *Conn) Dri2GetBuffers(Drawable Drawable, Count uint32, Attachments []uint32) Dri2GetBuffersCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.dri2GetBuffersRequest(Drawable, Count, Attachments), cookie) c.newRequest(c.dri2GetBuffersRequest(Drawable, Count, Attachments), cookie)
return Dri2GetBuffersCookie{cookie} return Dri2GetBuffersCookie{cookie}
} }
func (c *Conn) Dri2GetBuffersUnchecked(Drawable Id, Count uint32, Attachments []uint32) Dri2GetBuffersCookie { func (c *Conn) Dri2GetBuffersUnchecked(Drawable Drawable, Count uint32, Attachments []uint32) Dri2GetBuffersCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.dri2GetBuffersRequest(Drawable, Count, Attachments), cookie) c.newRequest(c.dri2GetBuffersRequest(Drawable, Count, Attachments), cookie)
return Dri2GetBuffersCookie{cookie} return Dri2GetBuffersCookie{cookie}
@ -856,7 +854,7 @@ func (cook Dri2GetBuffersCookie) Check() error {
} }
// Write request to wire for Dri2GetBuffers // Write request to wire for Dri2GetBuffers
func (c *Conn) dri2GetBuffersRequest(Drawable Id, Count uint32, Attachments []uint32) []byte { func (c *Conn) dri2GetBuffersRequest(Drawable Drawable, Count uint32, Attachments []uint32) []byte {
size := pad((12 + pad((len(Attachments) * 4)))) size := pad((12 + pad((len(Attachments) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -891,13 +889,13 @@ type Dri2CopyRegionCookie struct {
*cookie *cookie
} }
func (c *Conn) Dri2CopyRegion(Drawable Id, Region uint32, Dest uint32, Src uint32) Dri2CopyRegionCookie { func (c *Conn) Dri2CopyRegion(Drawable Drawable, Region uint32, Dest uint32, Src uint32) Dri2CopyRegionCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.dri2CopyRegionRequest(Drawable, Region, Dest, Src), cookie) c.newRequest(c.dri2CopyRegionRequest(Drawable, Region, Dest, Src), cookie)
return Dri2CopyRegionCookie{cookie} return Dri2CopyRegionCookie{cookie}
} }
func (c *Conn) Dri2CopyRegionUnchecked(Drawable Id, Region uint32, Dest uint32, Src uint32) Dri2CopyRegionCookie { func (c *Conn) Dri2CopyRegionUnchecked(Drawable Drawable, Region uint32, Dest uint32, Src uint32) Dri2CopyRegionCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.dri2CopyRegionRequest(Drawable, Region, Dest, Src), cookie) c.newRequest(c.dri2CopyRegionRequest(Drawable, Region, Dest, Src), cookie)
return Dri2CopyRegionCookie{cookie} return Dri2CopyRegionCookie{cookie}
@ -944,7 +942,7 @@ func (cook Dri2CopyRegionCookie) Check() error {
} }
// Write request to wire for Dri2CopyRegion // Write request to wire for Dri2CopyRegion
func (c *Conn) dri2CopyRegionRequest(Drawable Id, Region uint32, Dest uint32, Src uint32) []byte { func (c *Conn) dri2CopyRegionRequest(Drawable Drawable, Region uint32, Dest uint32, Src uint32) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -979,13 +977,13 @@ type Dri2GetBuffersWithFormatCookie struct {
*cookie *cookie
} }
func (c *Conn) Dri2GetBuffersWithFormat(Drawable Id, Count uint32, Attachments []Dri2AttachFormat) Dri2GetBuffersWithFormatCookie { func (c *Conn) Dri2GetBuffersWithFormat(Drawable Drawable, Count uint32, Attachments []Dri2AttachFormat) Dri2GetBuffersWithFormatCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.dri2GetBuffersWithFormatRequest(Drawable, Count, Attachments), cookie) c.newRequest(c.dri2GetBuffersWithFormatRequest(Drawable, Count, Attachments), cookie)
return Dri2GetBuffersWithFormatCookie{cookie} return Dri2GetBuffersWithFormatCookie{cookie}
} }
func (c *Conn) Dri2GetBuffersWithFormatUnchecked(Drawable Id, Count uint32, Attachments []Dri2AttachFormat) Dri2GetBuffersWithFormatCookie { func (c *Conn) Dri2GetBuffersWithFormatUnchecked(Drawable Drawable, Count uint32, Attachments []Dri2AttachFormat) Dri2GetBuffersWithFormatCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.dri2GetBuffersWithFormatRequest(Drawable, Count, Attachments), cookie) c.newRequest(c.dri2GetBuffersWithFormatRequest(Drawable, Count, Attachments), cookie)
return Dri2GetBuffersWithFormatCookie{cookie} return Dri2GetBuffersWithFormatCookie{cookie}
@ -1051,7 +1049,7 @@ func (cook Dri2GetBuffersWithFormatCookie) Check() error {
} }
// Write request to wire for Dri2GetBuffersWithFormat // Write request to wire for Dri2GetBuffersWithFormat
func (c *Conn) dri2GetBuffersWithFormatRequest(Drawable Id, Count uint32, Attachments []Dri2AttachFormat) []byte { func (c *Conn) dri2GetBuffersWithFormatRequest(Drawable Drawable, Count uint32, Attachments []Dri2AttachFormat) []byte {
size := pad((12 + pad((len(Attachments) * 8)))) size := pad((12 + pad((len(Attachments) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1082,13 +1080,13 @@ type Dri2SwapBuffersCookie struct {
*cookie *cookie
} }
func (c *Conn) Dri2SwapBuffers(Drawable Id, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) Dri2SwapBuffersCookie { func (c *Conn) Dri2SwapBuffers(Drawable Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) Dri2SwapBuffersCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.dri2SwapBuffersRequest(Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie) c.newRequest(c.dri2SwapBuffersRequest(Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie)
return Dri2SwapBuffersCookie{cookie} return Dri2SwapBuffersCookie{cookie}
} }
func (c *Conn) Dri2SwapBuffersUnchecked(Drawable Id, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) Dri2SwapBuffersCookie { func (c *Conn) Dri2SwapBuffersUnchecked(Drawable Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) Dri2SwapBuffersCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.dri2SwapBuffersRequest(Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie) c.newRequest(c.dri2SwapBuffersRequest(Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie)
return Dri2SwapBuffersCookie{cookie} return Dri2SwapBuffersCookie{cookie}
@ -1143,7 +1141,7 @@ func (cook Dri2SwapBuffersCookie) Check() error {
} }
// Write request to wire for Dri2SwapBuffers // Write request to wire for Dri2SwapBuffers
func (c *Conn) dri2SwapBuffersRequest(Drawable Id, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) []byte { func (c *Conn) dri2SwapBuffersRequest(Drawable Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) []byte {
size := 32 size := 32
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1187,13 +1185,13 @@ type Dri2GetMSCCookie struct {
*cookie *cookie
} }
func (c *Conn) Dri2GetMSC(Drawable Id) Dri2GetMSCCookie { func (c *Conn) Dri2GetMSC(Drawable Drawable) Dri2GetMSCCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.dri2GetMSCRequest(Drawable), cookie) c.newRequest(c.dri2GetMSCRequest(Drawable), cookie)
return Dri2GetMSCCookie{cookie} return Dri2GetMSCCookie{cookie}
} }
func (c *Conn) Dri2GetMSCUnchecked(Drawable Id) Dri2GetMSCCookie { func (c *Conn) Dri2GetMSCUnchecked(Drawable Drawable) Dri2GetMSCCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.dri2GetMSCRequest(Drawable), cookie) c.newRequest(c.dri2GetMSCRequest(Drawable), cookie)
return Dri2GetMSCCookie{cookie} return Dri2GetMSCCookie{cookie}
@ -1264,7 +1262,7 @@ func (cook Dri2GetMSCCookie) Check() error {
} }
// Write request to wire for Dri2GetMSC // Write request to wire for Dri2GetMSC
func (c *Conn) dri2GetMSCRequest(Drawable Id) []byte { func (c *Conn) dri2GetMSCRequest(Drawable Drawable) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1290,13 +1288,13 @@ type Dri2WaitMSCCookie struct {
*cookie *cookie
} }
func (c *Conn) Dri2WaitMSC(Drawable Id, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) Dri2WaitMSCCookie { func (c *Conn) Dri2WaitMSC(Drawable Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) Dri2WaitMSCCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.dri2WaitMSCRequest(Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie) c.newRequest(c.dri2WaitMSCRequest(Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie)
return Dri2WaitMSCCookie{cookie} return Dri2WaitMSCCookie{cookie}
} }
func (c *Conn) Dri2WaitMSCUnchecked(Drawable Id, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) Dri2WaitMSCCookie { func (c *Conn) Dri2WaitMSCUnchecked(Drawable Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) Dri2WaitMSCCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.dri2WaitMSCRequest(Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie) c.newRequest(c.dri2WaitMSCRequest(Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie)
return Dri2WaitMSCCookie{cookie} return Dri2WaitMSCCookie{cookie}
@ -1367,7 +1365,7 @@ func (cook Dri2WaitMSCCookie) Check() error {
} }
// Write request to wire for Dri2WaitMSC // Write request to wire for Dri2WaitMSC
func (c *Conn) dri2WaitMSCRequest(Drawable Id, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) []byte { func (c *Conn) dri2WaitMSCRequest(Drawable Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) []byte {
size := 32 size := 32
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1411,13 +1409,13 @@ type Dri2WaitSBCCookie struct {
*cookie *cookie
} }
func (c *Conn) Dri2WaitSBC(Drawable Id, TargetSbcHi uint32, TargetSbcLo uint32) Dri2WaitSBCCookie { func (c *Conn) Dri2WaitSBC(Drawable Drawable, TargetSbcHi uint32, TargetSbcLo uint32) Dri2WaitSBCCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.dri2WaitSBCRequest(Drawable, TargetSbcHi, TargetSbcLo), cookie) c.newRequest(c.dri2WaitSBCRequest(Drawable, TargetSbcHi, TargetSbcLo), cookie)
return Dri2WaitSBCCookie{cookie} return Dri2WaitSBCCookie{cookie}
} }
func (c *Conn) Dri2WaitSBCUnchecked(Drawable Id, TargetSbcHi uint32, TargetSbcLo uint32) Dri2WaitSBCCookie { func (c *Conn) Dri2WaitSBCUnchecked(Drawable Drawable, TargetSbcHi uint32, TargetSbcLo uint32) Dri2WaitSBCCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.dri2WaitSBCRequest(Drawable, TargetSbcHi, TargetSbcLo), cookie) c.newRequest(c.dri2WaitSBCRequest(Drawable, TargetSbcHi, TargetSbcLo), cookie)
return Dri2WaitSBCCookie{cookie} return Dri2WaitSBCCookie{cookie}
@ -1488,7 +1486,7 @@ func (cook Dri2WaitSBCCookie) Check() error {
} }
// Write request to wire for Dri2WaitSBC // Write request to wire for Dri2WaitSBC
func (c *Conn) dri2WaitSBCRequest(Drawable Id, TargetSbcHi uint32, TargetSbcLo uint32) []byte { func (c *Conn) dri2WaitSBCRequest(Drawable Drawable, TargetSbcHi uint32, TargetSbcLo uint32) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1521,13 +1519,13 @@ type Dri2SwapIntervalCookie struct {
} }
// Write request to wire for Dri2SwapInterval // Write request to wire for Dri2SwapInterval
func (c *Conn) Dri2SwapInterval(Drawable Id, Interval uint32) Dri2SwapIntervalCookie { func (c *Conn) Dri2SwapInterval(Drawable Drawable, Interval uint32) Dri2SwapIntervalCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.dri2SwapIntervalRequest(Drawable, Interval), cookie) c.newRequest(c.dri2SwapIntervalRequest(Drawable, Interval), cookie)
return Dri2SwapIntervalCookie{cookie} return Dri2SwapIntervalCookie{cookie}
} }
func (c *Conn) Dri2SwapIntervalChecked(Drawable Id, Interval uint32) Dri2SwapIntervalCookie { func (c *Conn) Dri2SwapIntervalChecked(Drawable Drawable, Interval uint32) Dri2SwapIntervalCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.dri2SwapIntervalRequest(Drawable, Interval), cookie) c.newRequest(c.dri2SwapIntervalRequest(Drawable, Interval), cookie)
return Dri2SwapIntervalCookie{cookie} return Dri2SwapIntervalCookie{cookie}
@ -1538,7 +1536,7 @@ func (cook Dri2SwapIntervalCookie) Check() error {
} }
// Write request to wire for Dri2SwapInterval // Write request to wire for Dri2SwapInterval
func (c *Conn) dri2SwapIntervalRequest(Drawable Id, Interval uint32) []byte { func (c *Conn) dri2SwapIntervalRequest(Drawable Drawable, Interval uint32) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by ge.xml on May 8 2012 11:03:23pm EDT. This file was generated by ge.xml on May 10 2012 12:39:33pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -47,8 +47,6 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by glx.xml on May 8 2012 11:03:23pm EDT. This file was generated by glx.xml on May 10 2012 12:39:33pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -55,8 +55,6 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
@ -103,17 +101,65 @@ const (
GlxRmGlSelect = 7170 GlxRmGlSelect = 7170
) )
// Skipping resource definition of 'Pixmap' type GlxPixmap uint32
// Skipping resource definition of 'Context' func (c *Conn) NewGlxPixmapId() (GlxPixmap, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return GlxPixmap(id), nil
}
// Skipping resource definition of 'Pbuffer' type GlxContext uint32
// Skipping resource definition of 'Window' func (c *Conn) NewGlxContextId() (GlxContext, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return GlxContext(id), nil
}
// Skipping resource definition of 'Fbconfig' type GlxPbuffer uint32
// Skipping resource definition of 'Drawable' func (c *Conn) NewGlxPbufferId() (GlxPbuffer, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return GlxPbuffer(id), nil
}
type GlxWindow uint32
func (c *Conn) NewGlxWindowId() (GlxWindow, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return GlxWindow(id), nil
}
type GlxFbconfig uint32
func (c *Conn) NewGlxFbconfigId() (GlxFbconfig, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return GlxFbconfig(id), nil
}
type GlxDrawable uint32
func (c *Conn) NewGlxDrawableId() (GlxDrawable, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return GlxDrawable(id), nil
}
type GlxFloat32 float64 type GlxFloat32 float64
@ -133,7 +179,7 @@ type GlxPbufferClobberEvent struct {
// padding: 1 bytes // padding: 1 bytes
EventType uint16 EventType uint16
DrawType uint16 DrawType uint16
Drawable Id Drawable GlxDrawable
BMask uint32 BMask uint32
AuxBuffer uint16 AuxBuffer uint16
X uint16 X uint16
@ -160,7 +206,7 @@ func NewGlxPbufferClobberEvent(buf []byte) Event {
v.DrawType = Get16(buf[b:]) v.DrawType = Get16(buf[b:])
b += 2 b += 2
v.Drawable = Id(Get32(buf[b:])) v.Drawable = GlxDrawable(Get32(buf[b:]))
b += 4 b += 4
v.BMask = Get32(buf[b:]) v.BMask = Get32(buf[b:])
@ -308,7 +354,7 @@ func (err GlxGenericError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxGenericError) BadId() Id { func (err GlxGenericError) BadId() uint32 {
return 0 return 0
} }
@ -344,8 +390,8 @@ func (err GlxBadContextError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadContextError) BadId() Id { func (err GlxBadContextError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadContextError) Error() string { func (err GlxBadContextError) Error() string {
@ -380,8 +426,8 @@ func (err GlxBadContextStateError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadContextStateError) BadId() Id { func (err GlxBadContextStateError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadContextStateError) Error() string { func (err GlxBadContextStateError) Error() string {
@ -416,8 +462,8 @@ func (err GlxBadDrawableError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadDrawableError) BadId() Id { func (err GlxBadDrawableError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadDrawableError) Error() string { func (err GlxBadDrawableError) Error() string {
@ -452,8 +498,8 @@ func (err GlxBadPixmapError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadPixmapError) BadId() Id { func (err GlxBadPixmapError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadPixmapError) Error() string { func (err GlxBadPixmapError) Error() string {
@ -488,8 +534,8 @@ func (err GlxBadContextTagError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadContextTagError) BadId() Id { func (err GlxBadContextTagError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadContextTagError) Error() string { func (err GlxBadContextTagError) Error() string {
@ -524,8 +570,8 @@ func (err GlxBadCurrentWindowError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadCurrentWindowError) BadId() Id { func (err GlxBadCurrentWindowError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadCurrentWindowError) Error() string { func (err GlxBadCurrentWindowError) Error() string {
@ -560,8 +606,8 @@ func (err GlxBadRenderRequestError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadRenderRequestError) BadId() Id { func (err GlxBadRenderRequestError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadRenderRequestError) Error() string { func (err GlxBadRenderRequestError) Error() string {
@ -596,8 +642,8 @@ func (err GlxBadLargeRequestError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadLargeRequestError) BadId() Id { func (err GlxBadLargeRequestError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadLargeRequestError) Error() string { func (err GlxBadLargeRequestError) Error() string {
@ -632,8 +678,8 @@ func (err GlxUnsupportedPrivateRequestError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxUnsupportedPrivateRequestError) BadId() Id { func (err GlxUnsupportedPrivateRequestError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxUnsupportedPrivateRequestError) Error() string { func (err GlxUnsupportedPrivateRequestError) Error() string {
@ -668,8 +714,8 @@ func (err GlxBadFBConfigError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadFBConfigError) BadId() Id { func (err GlxBadFBConfigError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadFBConfigError) Error() string { func (err GlxBadFBConfigError) Error() string {
@ -704,8 +750,8 @@ func (err GlxBadPbufferError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadPbufferError) BadId() Id { func (err GlxBadPbufferError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadPbufferError) Error() string { func (err GlxBadPbufferError) Error() string {
@ -740,8 +786,8 @@ func (err GlxBadCurrentDrawableError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadCurrentDrawableError) BadId() Id { func (err GlxBadCurrentDrawableError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadCurrentDrawableError) Error() string { func (err GlxBadCurrentDrawableError) Error() string {
@ -776,8 +822,8 @@ func (err GlxBadWindowError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxBadWindowError) BadId() Id { func (err GlxBadWindowError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxBadWindowError) Error() string { func (err GlxBadWindowError) Error() string {
@ -812,8 +858,8 @@ func (err GlxGLXBadProfileARBError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err GlxGLXBadProfileARBError) BadId() Id { func (err GlxGLXBadProfileARBError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err GlxGLXBadProfileARBError) Error() string { func (err GlxGLXBadProfileARBError) Error() string {
@ -940,13 +986,13 @@ type GlxCreateContextCookie struct {
} }
// Write request to wire for GlxCreateContext // Write request to wire for GlxCreateContext
func (c *Conn) GlxCreateContext(Context Id, Visual Visualid, Screen uint32, ShareList Id, IsDirect bool) GlxCreateContextCookie { func (c *Conn) GlxCreateContext(Context GlxContext, Visual Visualid, Screen uint32, ShareList GlxContext, IsDirect bool) GlxCreateContextCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxCreateContextRequest(Context, Visual, Screen, ShareList, IsDirect), cookie) c.newRequest(c.glxCreateContextRequest(Context, Visual, Screen, ShareList, IsDirect), cookie)
return GlxCreateContextCookie{cookie} return GlxCreateContextCookie{cookie}
} }
func (c *Conn) GlxCreateContextChecked(Context Id, Visual Visualid, Screen uint32, ShareList Id, IsDirect bool) GlxCreateContextCookie { func (c *Conn) GlxCreateContextChecked(Context GlxContext, Visual Visualid, Screen uint32, ShareList GlxContext, IsDirect bool) GlxCreateContextCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxCreateContextRequest(Context, Visual, Screen, ShareList, IsDirect), cookie) c.newRequest(c.glxCreateContextRequest(Context, Visual, Screen, ShareList, IsDirect), cookie)
return GlxCreateContextCookie{cookie} return GlxCreateContextCookie{cookie}
@ -957,7 +1003,7 @@ func (cook GlxCreateContextCookie) Check() error {
} }
// Write request to wire for GlxCreateContext // Write request to wire for GlxCreateContext
func (c *Conn) glxCreateContextRequest(Context Id, Visual Visualid, Screen uint32, ShareList Id, IsDirect bool) []byte { func (c *Conn) glxCreateContextRequest(Context GlxContext, Visual Visualid, Screen uint32, ShareList GlxContext, IsDirect bool) []byte {
size := 24 size := 24
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1002,13 +1048,13 @@ type GlxDestroyContextCookie struct {
} }
// Write request to wire for GlxDestroyContext // Write request to wire for GlxDestroyContext
func (c *Conn) GlxDestroyContext(Context Id) GlxDestroyContextCookie { func (c *Conn) GlxDestroyContext(Context GlxContext) GlxDestroyContextCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxDestroyContextRequest(Context), cookie) c.newRequest(c.glxDestroyContextRequest(Context), cookie)
return GlxDestroyContextCookie{cookie} return GlxDestroyContextCookie{cookie}
} }
func (c *Conn) GlxDestroyContextChecked(Context Id) GlxDestroyContextCookie { func (c *Conn) GlxDestroyContextChecked(Context GlxContext) GlxDestroyContextCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxDestroyContextRequest(Context), cookie) c.newRequest(c.glxDestroyContextRequest(Context), cookie)
return GlxDestroyContextCookie{cookie} return GlxDestroyContextCookie{cookie}
@ -1019,7 +1065,7 @@ func (cook GlxDestroyContextCookie) Check() error {
} }
// Write request to wire for GlxDestroyContext // Write request to wire for GlxDestroyContext
func (c *Conn) glxDestroyContextRequest(Context Id) []byte { func (c *Conn) glxDestroyContextRequest(Context GlxContext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1045,13 +1091,13 @@ type GlxMakeCurrentCookie struct {
*cookie *cookie
} }
func (c *Conn) GlxMakeCurrent(Drawable Id, Context Id, OldContextTag GlxContextTag) GlxMakeCurrentCookie { func (c *Conn) GlxMakeCurrent(Drawable GlxDrawable, Context GlxContext, OldContextTag GlxContextTag) GlxMakeCurrentCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.glxMakeCurrentRequest(Drawable, Context, OldContextTag), cookie) c.newRequest(c.glxMakeCurrentRequest(Drawable, Context, OldContextTag), cookie)
return GlxMakeCurrentCookie{cookie} return GlxMakeCurrentCookie{cookie}
} }
func (c *Conn) GlxMakeCurrentUnchecked(Drawable Id, Context Id, OldContextTag GlxContextTag) GlxMakeCurrentCookie { func (c *Conn) GlxMakeCurrentUnchecked(Drawable GlxDrawable, Context GlxContext, OldContextTag GlxContextTag) GlxMakeCurrentCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.glxMakeCurrentRequest(Drawable, Context, OldContextTag), cookie) c.newRequest(c.glxMakeCurrentRequest(Drawable, Context, OldContextTag), cookie)
return GlxMakeCurrentCookie{cookie} return GlxMakeCurrentCookie{cookie}
@ -1105,7 +1151,7 @@ func (cook GlxMakeCurrentCookie) Check() error {
} }
// Write request to wire for GlxMakeCurrent // Write request to wire for GlxMakeCurrent
func (c *Conn) glxMakeCurrentRequest(Drawable Id, Context Id, OldContextTag GlxContextTag) []byte { func (c *Conn) glxMakeCurrentRequest(Drawable GlxDrawable, Context GlxContext, OldContextTag GlxContextTag) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1137,13 +1183,13 @@ type GlxIsDirectCookie struct {
*cookie *cookie
} }
func (c *Conn) GlxIsDirect(Context Id) GlxIsDirectCookie { func (c *Conn) GlxIsDirect(Context GlxContext) GlxIsDirectCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.glxIsDirectRequest(Context), cookie) c.newRequest(c.glxIsDirectRequest(Context), cookie)
return GlxIsDirectCookie{cookie} return GlxIsDirectCookie{cookie}
} }
func (c *Conn) GlxIsDirectUnchecked(Context Id) GlxIsDirectCookie { func (c *Conn) GlxIsDirectUnchecked(Context GlxContext) GlxIsDirectCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.glxIsDirectRequest(Context), cookie) c.newRequest(c.glxIsDirectRequest(Context), cookie)
return GlxIsDirectCookie{cookie} return GlxIsDirectCookie{cookie}
@ -1201,7 +1247,7 @@ func (cook GlxIsDirectCookie) Check() error {
} }
// Write request to wire for GlxIsDirect // Write request to wire for GlxIsDirect
func (c *Conn) glxIsDirectRequest(Context Id) []byte { func (c *Conn) glxIsDirectRequest(Context GlxContext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1409,13 +1455,13 @@ type GlxCopyContextCookie struct {
} }
// Write request to wire for GlxCopyContext // Write request to wire for GlxCopyContext
func (c *Conn) GlxCopyContext(Src Id, Dest Id, Mask uint32, SrcContextTag GlxContextTag) GlxCopyContextCookie { func (c *Conn) GlxCopyContext(Src GlxContext, Dest GlxContext, Mask uint32, SrcContextTag GlxContextTag) GlxCopyContextCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxCopyContextRequest(Src, Dest, Mask, SrcContextTag), cookie) c.newRequest(c.glxCopyContextRequest(Src, Dest, Mask, SrcContextTag), cookie)
return GlxCopyContextCookie{cookie} return GlxCopyContextCookie{cookie}
} }
func (c *Conn) GlxCopyContextChecked(Src Id, Dest Id, Mask uint32, SrcContextTag GlxContextTag) GlxCopyContextCookie { func (c *Conn) GlxCopyContextChecked(Src GlxContext, Dest GlxContext, Mask uint32, SrcContextTag GlxContextTag) GlxCopyContextCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxCopyContextRequest(Src, Dest, Mask, SrcContextTag), cookie) c.newRequest(c.glxCopyContextRequest(Src, Dest, Mask, SrcContextTag), cookie)
return GlxCopyContextCookie{cookie} return GlxCopyContextCookie{cookie}
@ -1426,7 +1472,7 @@ func (cook GlxCopyContextCookie) Check() error {
} }
// Write request to wire for GlxCopyContext // Write request to wire for GlxCopyContext
func (c *Conn) glxCopyContextRequest(Src Id, Dest Id, Mask uint32, SrcContextTag GlxContextTag) []byte { func (c *Conn) glxCopyContextRequest(Src GlxContext, Dest GlxContext, Mask uint32, SrcContextTag GlxContextTag) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1462,13 +1508,13 @@ type GlxSwapBuffersCookie struct {
} }
// Write request to wire for GlxSwapBuffers // Write request to wire for GlxSwapBuffers
func (c *Conn) GlxSwapBuffers(ContextTag GlxContextTag, Drawable Id) GlxSwapBuffersCookie { func (c *Conn) GlxSwapBuffers(ContextTag GlxContextTag, Drawable GlxDrawable) GlxSwapBuffersCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxSwapBuffersRequest(ContextTag, Drawable), cookie) c.newRequest(c.glxSwapBuffersRequest(ContextTag, Drawable), cookie)
return GlxSwapBuffersCookie{cookie} return GlxSwapBuffersCookie{cookie}
} }
func (c *Conn) GlxSwapBuffersChecked(ContextTag GlxContextTag, Drawable Id) GlxSwapBuffersCookie { func (c *Conn) GlxSwapBuffersChecked(ContextTag GlxContextTag, Drawable GlxDrawable) GlxSwapBuffersCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxSwapBuffersRequest(ContextTag, Drawable), cookie) c.newRequest(c.glxSwapBuffersRequest(ContextTag, Drawable), cookie)
return GlxSwapBuffersCookie{cookie} return GlxSwapBuffersCookie{cookie}
@ -1479,7 +1525,7 @@ func (cook GlxSwapBuffersCookie) Check() error {
} }
// Write request to wire for GlxSwapBuffers // Write request to wire for GlxSwapBuffers
func (c *Conn) glxSwapBuffersRequest(ContextTag GlxContextTag, Drawable Id) []byte { func (c *Conn) glxSwapBuffersRequest(ContextTag GlxContextTag, Drawable GlxDrawable) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1509,13 +1555,13 @@ type GlxUseXFontCookie struct {
} }
// Write request to wire for GlxUseXFont // Write request to wire for GlxUseXFont
func (c *Conn) GlxUseXFont(ContextTag GlxContextTag, Font Id, First uint32, Count uint32, ListBase uint32) GlxUseXFontCookie { func (c *Conn) GlxUseXFont(ContextTag GlxContextTag, Font Font, First uint32, Count uint32, ListBase uint32) GlxUseXFontCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxUseXFontRequest(ContextTag, Font, First, Count, ListBase), cookie) c.newRequest(c.glxUseXFontRequest(ContextTag, Font, First, Count, ListBase), cookie)
return GlxUseXFontCookie{cookie} return GlxUseXFontCookie{cookie}
} }
func (c *Conn) GlxUseXFontChecked(ContextTag GlxContextTag, Font Id, First uint32, Count uint32, ListBase uint32) GlxUseXFontCookie { func (c *Conn) GlxUseXFontChecked(ContextTag GlxContextTag, Font Font, First uint32, Count uint32, ListBase uint32) GlxUseXFontCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxUseXFontRequest(ContextTag, Font, First, Count, ListBase), cookie) c.newRequest(c.glxUseXFontRequest(ContextTag, Font, First, Count, ListBase), cookie)
return GlxUseXFontCookie{cookie} return GlxUseXFontCookie{cookie}
@ -1526,7 +1572,7 @@ func (cook GlxUseXFontCookie) Check() error {
} }
// Write request to wire for GlxUseXFont // Write request to wire for GlxUseXFont
func (c *Conn) glxUseXFontRequest(ContextTag GlxContextTag, Font Id, First uint32, Count uint32, ListBase uint32) []byte { func (c *Conn) glxUseXFontRequest(ContextTag GlxContextTag, Font Font, First uint32, Count uint32, ListBase uint32) []byte {
size := 24 size := 24
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1565,13 +1611,13 @@ type GlxCreateGLXPixmapCookie struct {
} }
// Write request to wire for GlxCreateGLXPixmap // Write request to wire for GlxCreateGLXPixmap
func (c *Conn) GlxCreateGLXPixmap(Screen uint32, Visual Visualid, Pixmap Id, GlxPixmap Id) GlxCreateGLXPixmapCookie { func (c *Conn) GlxCreateGLXPixmap(Screen uint32, Visual Visualid, Pixmap Pixmap, GlxPixmap GlxPixmap) GlxCreateGLXPixmapCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxCreateGLXPixmapRequest(Screen, Visual, Pixmap, GlxPixmap), cookie) c.newRequest(c.glxCreateGLXPixmapRequest(Screen, Visual, Pixmap, GlxPixmap), cookie)
return GlxCreateGLXPixmapCookie{cookie} return GlxCreateGLXPixmapCookie{cookie}
} }
func (c *Conn) GlxCreateGLXPixmapChecked(Screen uint32, Visual Visualid, Pixmap Id, GlxPixmap Id) GlxCreateGLXPixmapCookie { func (c *Conn) GlxCreateGLXPixmapChecked(Screen uint32, Visual Visualid, Pixmap Pixmap, GlxPixmap GlxPixmap) GlxCreateGLXPixmapCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxCreateGLXPixmapRequest(Screen, Visual, Pixmap, GlxPixmap), cookie) c.newRequest(c.glxCreateGLXPixmapRequest(Screen, Visual, Pixmap, GlxPixmap), cookie)
return GlxCreateGLXPixmapCookie{cookie} return GlxCreateGLXPixmapCookie{cookie}
@ -1582,7 +1628,7 @@ func (cook GlxCreateGLXPixmapCookie) Check() error {
} }
// Write request to wire for GlxCreateGLXPixmap // Write request to wire for GlxCreateGLXPixmap
func (c *Conn) glxCreateGLXPixmapRequest(Screen uint32, Visual Visualid, Pixmap Id, GlxPixmap Id) []byte { func (c *Conn) glxCreateGLXPixmapRequest(Screen uint32, Visual Visualid, Pixmap Pixmap, GlxPixmap GlxPixmap) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1716,13 +1762,13 @@ type GlxDestroyGLXPixmapCookie struct {
} }
// Write request to wire for GlxDestroyGLXPixmap // Write request to wire for GlxDestroyGLXPixmap
func (c *Conn) GlxDestroyGLXPixmap(GlxPixmap Id) GlxDestroyGLXPixmapCookie { func (c *Conn) GlxDestroyGLXPixmap(GlxPixmap GlxPixmap) GlxDestroyGLXPixmapCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxDestroyGLXPixmapRequest(GlxPixmap), cookie) c.newRequest(c.glxDestroyGLXPixmapRequest(GlxPixmap), cookie)
return GlxDestroyGLXPixmapCookie{cookie} return GlxDestroyGLXPixmapCookie{cookie}
} }
func (c *Conn) GlxDestroyGLXPixmapChecked(GlxPixmap Id) GlxDestroyGLXPixmapCookie { func (c *Conn) GlxDestroyGLXPixmapChecked(GlxPixmap GlxPixmap) GlxDestroyGLXPixmapCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxDestroyGLXPixmapRequest(GlxPixmap), cookie) c.newRequest(c.glxDestroyGLXPixmapRequest(GlxPixmap), cookie)
return GlxDestroyGLXPixmapCookie{cookie} return GlxDestroyGLXPixmapCookie{cookie}
@ -1733,7 +1779,7 @@ func (cook GlxDestroyGLXPixmapCookie) Check() error {
} }
// Write request to wire for GlxDestroyGLXPixmap // Write request to wire for GlxDestroyGLXPixmap
func (c *Conn) glxDestroyGLXPixmapRequest(GlxPixmap Id) []byte { func (c *Conn) glxDestroyGLXPixmapRequest(GlxPixmap GlxPixmap) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2249,13 +2295,13 @@ type GlxCreatePixmapCookie struct {
} }
// Write request to wire for GlxCreatePixmap // Write request to wire for GlxCreatePixmap
func (c *Conn) GlxCreatePixmap(Screen uint32, Fbconfig Id, Pixmap Id, GlxPixmap Id, NumAttribs uint32, Attribs []uint32) GlxCreatePixmapCookie { func (c *Conn) GlxCreatePixmap(Screen uint32, Fbconfig GlxFbconfig, Pixmap Pixmap, GlxPixmap GlxPixmap, NumAttribs uint32, Attribs []uint32) GlxCreatePixmapCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxCreatePixmapRequest(Screen, Fbconfig, Pixmap, GlxPixmap, NumAttribs, Attribs), cookie) c.newRequest(c.glxCreatePixmapRequest(Screen, Fbconfig, Pixmap, GlxPixmap, NumAttribs, Attribs), cookie)
return GlxCreatePixmapCookie{cookie} return GlxCreatePixmapCookie{cookie}
} }
func (c *Conn) GlxCreatePixmapChecked(Screen uint32, Fbconfig Id, Pixmap Id, GlxPixmap Id, NumAttribs uint32, Attribs []uint32) GlxCreatePixmapCookie { func (c *Conn) GlxCreatePixmapChecked(Screen uint32, Fbconfig GlxFbconfig, Pixmap Pixmap, GlxPixmap GlxPixmap, NumAttribs uint32, Attribs []uint32) GlxCreatePixmapCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxCreatePixmapRequest(Screen, Fbconfig, Pixmap, GlxPixmap, NumAttribs, Attribs), cookie) c.newRequest(c.glxCreatePixmapRequest(Screen, Fbconfig, Pixmap, GlxPixmap, NumAttribs, Attribs), cookie)
return GlxCreatePixmapCookie{cookie} return GlxCreatePixmapCookie{cookie}
@ -2266,7 +2312,7 @@ func (cook GlxCreatePixmapCookie) Check() error {
} }
// Write request to wire for GlxCreatePixmap // Write request to wire for GlxCreatePixmap
func (c *Conn) glxCreatePixmapRequest(Screen uint32, Fbconfig Id, Pixmap Id, GlxPixmap Id, NumAttribs uint32, Attribs []uint32) []byte { func (c *Conn) glxCreatePixmapRequest(Screen uint32, Fbconfig GlxFbconfig, Pixmap Pixmap, GlxPixmap GlxPixmap, NumAttribs uint32, Attribs []uint32) []byte {
size := pad((24 + pad(((int(NumAttribs) * 2) * 4)))) size := pad((24 + pad(((int(NumAttribs) * 2) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2311,13 +2357,13 @@ type GlxDestroyPixmapCookie struct {
} }
// Write request to wire for GlxDestroyPixmap // Write request to wire for GlxDestroyPixmap
func (c *Conn) GlxDestroyPixmap(GlxPixmap Id) GlxDestroyPixmapCookie { func (c *Conn) GlxDestroyPixmap(GlxPixmap GlxPixmap) GlxDestroyPixmapCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxDestroyPixmapRequest(GlxPixmap), cookie) c.newRequest(c.glxDestroyPixmapRequest(GlxPixmap), cookie)
return GlxDestroyPixmapCookie{cookie} return GlxDestroyPixmapCookie{cookie}
} }
func (c *Conn) GlxDestroyPixmapChecked(GlxPixmap Id) GlxDestroyPixmapCookie { func (c *Conn) GlxDestroyPixmapChecked(GlxPixmap GlxPixmap) GlxDestroyPixmapCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxDestroyPixmapRequest(GlxPixmap), cookie) c.newRequest(c.glxDestroyPixmapRequest(GlxPixmap), cookie)
return GlxDestroyPixmapCookie{cookie} return GlxDestroyPixmapCookie{cookie}
@ -2328,7 +2374,7 @@ func (cook GlxDestroyPixmapCookie) Check() error {
} }
// Write request to wire for GlxDestroyPixmap // Write request to wire for GlxDestroyPixmap
func (c *Conn) glxDestroyPixmapRequest(GlxPixmap Id) []byte { func (c *Conn) glxDestroyPixmapRequest(GlxPixmap GlxPixmap) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2355,13 +2401,13 @@ type GlxCreateNewContextCookie struct {
} }
// Write request to wire for GlxCreateNewContext // Write request to wire for GlxCreateNewContext
func (c *Conn) GlxCreateNewContext(Context Id, Fbconfig Id, Screen uint32, RenderType uint32, ShareList Id, IsDirect bool) GlxCreateNewContextCookie { func (c *Conn) GlxCreateNewContext(Context GlxContext, Fbconfig GlxFbconfig, Screen uint32, RenderType uint32, ShareList GlxContext, IsDirect bool) GlxCreateNewContextCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxCreateNewContextRequest(Context, Fbconfig, Screen, RenderType, ShareList, IsDirect), cookie) c.newRequest(c.glxCreateNewContextRequest(Context, Fbconfig, Screen, RenderType, ShareList, IsDirect), cookie)
return GlxCreateNewContextCookie{cookie} return GlxCreateNewContextCookie{cookie}
} }
func (c *Conn) GlxCreateNewContextChecked(Context Id, Fbconfig Id, Screen uint32, RenderType uint32, ShareList Id, IsDirect bool) GlxCreateNewContextCookie { func (c *Conn) GlxCreateNewContextChecked(Context GlxContext, Fbconfig GlxFbconfig, Screen uint32, RenderType uint32, ShareList GlxContext, IsDirect bool) GlxCreateNewContextCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxCreateNewContextRequest(Context, Fbconfig, Screen, RenderType, ShareList, IsDirect), cookie) c.newRequest(c.glxCreateNewContextRequest(Context, Fbconfig, Screen, RenderType, ShareList, IsDirect), cookie)
return GlxCreateNewContextCookie{cookie} return GlxCreateNewContextCookie{cookie}
@ -2372,7 +2418,7 @@ func (cook GlxCreateNewContextCookie) Check() error {
} }
// Write request to wire for GlxCreateNewContext // Write request to wire for GlxCreateNewContext
func (c *Conn) glxCreateNewContextRequest(Context Id, Fbconfig Id, Screen uint32, RenderType uint32, ShareList Id, IsDirect bool) []byte { func (c *Conn) glxCreateNewContextRequest(Context GlxContext, Fbconfig GlxFbconfig, Screen uint32, RenderType uint32, ShareList GlxContext, IsDirect bool) []byte {
size := 28 size := 28
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2419,13 +2465,13 @@ type GlxQueryContextCookie struct {
*cookie *cookie
} }
func (c *Conn) GlxQueryContext(Context Id) GlxQueryContextCookie { func (c *Conn) GlxQueryContext(Context GlxContext) GlxQueryContextCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.glxQueryContextRequest(Context), cookie) c.newRequest(c.glxQueryContextRequest(Context), cookie)
return GlxQueryContextCookie{cookie} return GlxQueryContextCookie{cookie}
} }
func (c *Conn) GlxQueryContextUnchecked(Context Id) GlxQueryContextCookie { func (c *Conn) GlxQueryContextUnchecked(Context GlxContext) GlxQueryContextCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.glxQueryContextRequest(Context), cookie) c.newRequest(c.glxQueryContextRequest(Context), cookie)
return GlxQueryContextCookie{cookie} return GlxQueryContextCookie{cookie}
@ -2487,7 +2533,7 @@ func (cook GlxQueryContextCookie) Check() error {
} }
// Write request to wire for GlxQueryContext // Write request to wire for GlxQueryContext
func (c *Conn) glxQueryContextRequest(Context Id) []byte { func (c *Conn) glxQueryContextRequest(Context GlxContext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2513,13 +2559,13 @@ type GlxMakeContextCurrentCookie struct {
*cookie *cookie
} }
func (c *Conn) GlxMakeContextCurrent(OldContextTag GlxContextTag, Drawable Id, ReadDrawable Id, Context Id) GlxMakeContextCurrentCookie { func (c *Conn) GlxMakeContextCurrent(OldContextTag GlxContextTag, Drawable GlxDrawable, ReadDrawable GlxDrawable, Context GlxContext) GlxMakeContextCurrentCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.glxMakeContextCurrentRequest(OldContextTag, Drawable, ReadDrawable, Context), cookie) c.newRequest(c.glxMakeContextCurrentRequest(OldContextTag, Drawable, ReadDrawable, Context), cookie)
return GlxMakeContextCurrentCookie{cookie} return GlxMakeContextCurrentCookie{cookie}
} }
func (c *Conn) GlxMakeContextCurrentUnchecked(OldContextTag GlxContextTag, Drawable Id, ReadDrawable Id, Context Id) GlxMakeContextCurrentCookie { func (c *Conn) GlxMakeContextCurrentUnchecked(OldContextTag GlxContextTag, Drawable GlxDrawable, ReadDrawable GlxDrawable, Context GlxContext) GlxMakeContextCurrentCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.glxMakeContextCurrentRequest(OldContextTag, Drawable, ReadDrawable, Context), cookie) c.newRequest(c.glxMakeContextCurrentRequest(OldContextTag, Drawable, ReadDrawable, Context), cookie)
return GlxMakeContextCurrentCookie{cookie} return GlxMakeContextCurrentCookie{cookie}
@ -2573,7 +2619,7 @@ func (cook GlxMakeContextCurrentCookie) Check() error {
} }
// Write request to wire for GlxMakeContextCurrent // Write request to wire for GlxMakeContextCurrent
func (c *Conn) glxMakeContextCurrentRequest(OldContextTag GlxContextTag, Drawable Id, ReadDrawable Id, Context Id) []byte { func (c *Conn) glxMakeContextCurrentRequest(OldContextTag GlxContextTag, Drawable GlxDrawable, ReadDrawable GlxDrawable, Context GlxContext) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2609,13 +2655,13 @@ type GlxCreatePbufferCookie struct {
} }
// Write request to wire for GlxCreatePbuffer // Write request to wire for GlxCreatePbuffer
func (c *Conn) GlxCreatePbuffer(Screen uint32, Fbconfig Id, Pbuffer Id, NumAttribs uint32, Attribs []uint32) GlxCreatePbufferCookie { func (c *Conn) GlxCreatePbuffer(Screen uint32, Fbconfig GlxFbconfig, Pbuffer GlxPbuffer, NumAttribs uint32, Attribs []uint32) GlxCreatePbufferCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxCreatePbufferRequest(Screen, Fbconfig, Pbuffer, NumAttribs, Attribs), cookie) c.newRequest(c.glxCreatePbufferRequest(Screen, Fbconfig, Pbuffer, NumAttribs, Attribs), cookie)
return GlxCreatePbufferCookie{cookie} return GlxCreatePbufferCookie{cookie}
} }
func (c *Conn) GlxCreatePbufferChecked(Screen uint32, Fbconfig Id, Pbuffer Id, NumAttribs uint32, Attribs []uint32) GlxCreatePbufferCookie { func (c *Conn) GlxCreatePbufferChecked(Screen uint32, Fbconfig GlxFbconfig, Pbuffer GlxPbuffer, NumAttribs uint32, Attribs []uint32) GlxCreatePbufferCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxCreatePbufferRequest(Screen, Fbconfig, Pbuffer, NumAttribs, Attribs), cookie) c.newRequest(c.glxCreatePbufferRequest(Screen, Fbconfig, Pbuffer, NumAttribs, Attribs), cookie)
return GlxCreatePbufferCookie{cookie} return GlxCreatePbufferCookie{cookie}
@ -2626,7 +2672,7 @@ func (cook GlxCreatePbufferCookie) Check() error {
} }
// Write request to wire for GlxCreatePbuffer // Write request to wire for GlxCreatePbuffer
func (c *Conn) glxCreatePbufferRequest(Screen uint32, Fbconfig Id, Pbuffer Id, NumAttribs uint32, Attribs []uint32) []byte { func (c *Conn) glxCreatePbufferRequest(Screen uint32, Fbconfig GlxFbconfig, Pbuffer GlxPbuffer, NumAttribs uint32, Attribs []uint32) []byte {
size := pad((20 + pad(((int(NumAttribs) * 2) * 4)))) size := pad((20 + pad(((int(NumAttribs) * 2) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2668,13 +2714,13 @@ type GlxDestroyPbufferCookie struct {
} }
// Write request to wire for GlxDestroyPbuffer // Write request to wire for GlxDestroyPbuffer
func (c *Conn) GlxDestroyPbuffer(Pbuffer Id) GlxDestroyPbufferCookie { func (c *Conn) GlxDestroyPbuffer(Pbuffer GlxPbuffer) GlxDestroyPbufferCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxDestroyPbufferRequest(Pbuffer), cookie) c.newRequest(c.glxDestroyPbufferRequest(Pbuffer), cookie)
return GlxDestroyPbufferCookie{cookie} return GlxDestroyPbufferCookie{cookie}
} }
func (c *Conn) GlxDestroyPbufferChecked(Pbuffer Id) GlxDestroyPbufferCookie { func (c *Conn) GlxDestroyPbufferChecked(Pbuffer GlxPbuffer) GlxDestroyPbufferCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxDestroyPbufferRequest(Pbuffer), cookie) c.newRequest(c.glxDestroyPbufferRequest(Pbuffer), cookie)
return GlxDestroyPbufferCookie{cookie} return GlxDestroyPbufferCookie{cookie}
@ -2685,7 +2731,7 @@ func (cook GlxDestroyPbufferCookie) Check() error {
} }
// Write request to wire for GlxDestroyPbuffer // Write request to wire for GlxDestroyPbuffer
func (c *Conn) glxDestroyPbufferRequest(Pbuffer Id) []byte { func (c *Conn) glxDestroyPbufferRequest(Pbuffer GlxPbuffer) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2711,13 +2757,13 @@ type GlxGetDrawableAttributesCookie struct {
*cookie *cookie
} }
func (c *Conn) GlxGetDrawableAttributes(Drawable Id) GlxGetDrawableAttributesCookie { func (c *Conn) GlxGetDrawableAttributes(Drawable GlxDrawable) GlxGetDrawableAttributesCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.glxGetDrawableAttributesRequest(Drawable), cookie) c.newRequest(c.glxGetDrawableAttributesRequest(Drawable), cookie)
return GlxGetDrawableAttributesCookie{cookie} return GlxGetDrawableAttributesCookie{cookie}
} }
func (c *Conn) GlxGetDrawableAttributesUnchecked(Drawable Id) GlxGetDrawableAttributesCookie { func (c *Conn) GlxGetDrawableAttributesUnchecked(Drawable GlxDrawable) GlxGetDrawableAttributesCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.glxGetDrawableAttributesRequest(Drawable), cookie) c.newRequest(c.glxGetDrawableAttributesRequest(Drawable), cookie)
return GlxGetDrawableAttributesCookie{cookie} return GlxGetDrawableAttributesCookie{cookie}
@ -2779,7 +2825,7 @@ func (cook GlxGetDrawableAttributesCookie) Check() error {
} }
// Write request to wire for GlxGetDrawableAttributes // Write request to wire for GlxGetDrawableAttributes
func (c *Conn) glxGetDrawableAttributesRequest(Drawable Id) []byte { func (c *Conn) glxGetDrawableAttributesRequest(Drawable GlxDrawable) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2806,13 +2852,13 @@ type GlxChangeDrawableAttributesCookie struct {
} }
// Write request to wire for GlxChangeDrawableAttributes // Write request to wire for GlxChangeDrawableAttributes
func (c *Conn) GlxChangeDrawableAttributes(Drawable Id, NumAttribs uint32, Attribs []uint32) GlxChangeDrawableAttributesCookie { func (c *Conn) GlxChangeDrawableAttributes(Drawable GlxDrawable, NumAttribs uint32, Attribs []uint32) GlxChangeDrawableAttributesCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxChangeDrawableAttributesRequest(Drawable, NumAttribs, Attribs), cookie) c.newRequest(c.glxChangeDrawableAttributesRequest(Drawable, NumAttribs, Attribs), cookie)
return GlxChangeDrawableAttributesCookie{cookie} return GlxChangeDrawableAttributesCookie{cookie}
} }
func (c *Conn) GlxChangeDrawableAttributesChecked(Drawable Id, NumAttribs uint32, Attribs []uint32) GlxChangeDrawableAttributesCookie { func (c *Conn) GlxChangeDrawableAttributesChecked(Drawable GlxDrawable, NumAttribs uint32, Attribs []uint32) GlxChangeDrawableAttributesCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxChangeDrawableAttributesRequest(Drawable, NumAttribs, Attribs), cookie) c.newRequest(c.glxChangeDrawableAttributesRequest(Drawable, NumAttribs, Attribs), cookie)
return GlxChangeDrawableAttributesCookie{cookie} return GlxChangeDrawableAttributesCookie{cookie}
@ -2823,7 +2869,7 @@ func (cook GlxChangeDrawableAttributesCookie) Check() error {
} }
// Write request to wire for GlxChangeDrawableAttributes // Write request to wire for GlxChangeDrawableAttributes
func (c *Conn) glxChangeDrawableAttributesRequest(Drawable Id, NumAttribs uint32, Attribs []uint32) []byte { func (c *Conn) glxChangeDrawableAttributesRequest(Drawable GlxDrawable, NumAttribs uint32, Attribs []uint32) []byte {
size := pad((12 + pad(((int(NumAttribs) * 2) * 4)))) size := pad((12 + pad(((int(NumAttribs) * 2) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2859,13 +2905,13 @@ type GlxCreateWindowCookie struct {
} }
// Write request to wire for GlxCreateWindow // Write request to wire for GlxCreateWindow
func (c *Conn) GlxCreateWindow(Screen uint32, Fbconfig Id, Window Id, GlxWindow Id, NumAttribs uint32, Attribs []uint32) GlxCreateWindowCookie { func (c *Conn) GlxCreateWindow(Screen uint32, Fbconfig GlxFbconfig, Window Window, GlxWindow GlxWindow, NumAttribs uint32, Attribs []uint32) GlxCreateWindowCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxCreateWindowRequest(Screen, Fbconfig, Window, GlxWindow, NumAttribs, Attribs), cookie) c.newRequest(c.glxCreateWindowRequest(Screen, Fbconfig, Window, GlxWindow, NumAttribs, Attribs), cookie)
return GlxCreateWindowCookie{cookie} return GlxCreateWindowCookie{cookie}
} }
func (c *Conn) GlxCreateWindowChecked(Screen uint32, Fbconfig Id, Window Id, GlxWindow Id, NumAttribs uint32, Attribs []uint32) GlxCreateWindowCookie { func (c *Conn) GlxCreateWindowChecked(Screen uint32, Fbconfig GlxFbconfig, Window Window, GlxWindow GlxWindow, NumAttribs uint32, Attribs []uint32) GlxCreateWindowCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxCreateWindowRequest(Screen, Fbconfig, Window, GlxWindow, NumAttribs, Attribs), cookie) c.newRequest(c.glxCreateWindowRequest(Screen, Fbconfig, Window, GlxWindow, NumAttribs, Attribs), cookie)
return GlxCreateWindowCookie{cookie} return GlxCreateWindowCookie{cookie}
@ -2876,7 +2922,7 @@ func (cook GlxCreateWindowCookie) Check() error {
} }
// Write request to wire for GlxCreateWindow // Write request to wire for GlxCreateWindow
func (c *Conn) glxCreateWindowRequest(Screen uint32, Fbconfig Id, Window Id, GlxWindow Id, NumAttribs uint32, Attribs []uint32) []byte { func (c *Conn) glxCreateWindowRequest(Screen uint32, Fbconfig GlxFbconfig, Window Window, GlxWindow GlxWindow, NumAttribs uint32, Attribs []uint32) []byte {
size := pad((24 + pad(((int(NumAttribs) * 2) * 4)))) size := pad((24 + pad(((int(NumAttribs) * 2) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2921,13 +2967,13 @@ type GlxDeleteWindowCookie struct {
} }
// Write request to wire for GlxDeleteWindow // Write request to wire for GlxDeleteWindow
func (c *Conn) GlxDeleteWindow(Glxwindow Id) GlxDeleteWindowCookie { func (c *Conn) GlxDeleteWindow(Glxwindow GlxWindow) GlxDeleteWindowCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxDeleteWindowRequest(Glxwindow), cookie) c.newRequest(c.glxDeleteWindowRequest(Glxwindow), cookie)
return GlxDeleteWindowCookie{cookie} return GlxDeleteWindowCookie{cookie}
} }
func (c *Conn) GlxDeleteWindowChecked(Glxwindow Id) GlxDeleteWindowCookie { func (c *Conn) GlxDeleteWindowChecked(Glxwindow GlxWindow) GlxDeleteWindowCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxDeleteWindowRequest(Glxwindow), cookie) c.newRequest(c.glxDeleteWindowRequest(Glxwindow), cookie)
return GlxDeleteWindowCookie{cookie} return GlxDeleteWindowCookie{cookie}
@ -2938,7 +2984,7 @@ func (cook GlxDeleteWindowCookie) Check() error {
} }
// Write request to wire for GlxDeleteWindow // Write request to wire for GlxDeleteWindow
func (c *Conn) glxDeleteWindowRequest(Glxwindow Id) []byte { func (c *Conn) glxDeleteWindowRequest(Glxwindow GlxWindow) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -3033,13 +3079,13 @@ type GlxCreateContextAttribsARBCookie struct {
} }
// Write request to wire for GlxCreateContextAttribsARB // Write request to wire for GlxCreateContextAttribsARB
func (c *Conn) GlxCreateContextAttribsARB(Context Id, Fbconfig Id, Screen uint32, ShareList Id, IsDirect bool, NumAttribs uint32, Attribs []uint32) GlxCreateContextAttribsARBCookie { func (c *Conn) GlxCreateContextAttribsARB(Context GlxContext, Fbconfig GlxFbconfig, Screen uint32, ShareList GlxContext, IsDirect bool, NumAttribs uint32, Attribs []uint32) GlxCreateContextAttribsARBCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.glxCreateContextAttribsARBRequest(Context, Fbconfig, Screen, ShareList, IsDirect, NumAttribs, Attribs), cookie) c.newRequest(c.glxCreateContextAttribsARBRequest(Context, Fbconfig, Screen, ShareList, IsDirect, NumAttribs, Attribs), cookie)
return GlxCreateContextAttribsARBCookie{cookie} return GlxCreateContextAttribsARBCookie{cookie}
} }
func (c *Conn) GlxCreateContextAttribsARBChecked(Context Id, Fbconfig Id, Screen uint32, ShareList Id, IsDirect bool, NumAttribs uint32, Attribs []uint32) GlxCreateContextAttribsARBCookie { func (c *Conn) GlxCreateContextAttribsARBChecked(Context GlxContext, Fbconfig GlxFbconfig, Screen uint32, ShareList GlxContext, IsDirect bool, NumAttribs uint32, Attribs []uint32) GlxCreateContextAttribsARBCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.glxCreateContextAttribsARBRequest(Context, Fbconfig, Screen, ShareList, IsDirect, NumAttribs, Attribs), cookie) c.newRequest(c.glxCreateContextAttribsARBRequest(Context, Fbconfig, Screen, ShareList, IsDirect, NumAttribs, Attribs), cookie)
return GlxCreateContextAttribsARBCookie{cookie} return GlxCreateContextAttribsARBCookie{cookie}
@ -3050,7 +3096,7 @@ func (cook GlxCreateContextAttribsARBCookie) Check() error {
} }
// Write request to wire for GlxCreateContextAttribsARB // Write request to wire for GlxCreateContextAttribsARB
func (c *Conn) glxCreateContextAttribsARBRequest(Context Id, Fbconfig Id, Screen uint32, ShareList Id, IsDirect bool, NumAttribs uint32, Attribs []uint32) []byte { func (c *Conn) glxCreateContextAttribsARBRequest(Context GlxContext, Fbconfig GlxFbconfig, Screen uint32, ShareList GlxContext, IsDirect bool, NumAttribs uint32, Attribs []uint32) []byte {
size := pad((28 + pad(((int(NumAttribs) * 2) * 4)))) size := pad((28 + pad(((int(NumAttribs) * 2) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by record.xml on May 8 2012 11:03:24pm EDT. This file was generated by record.xml on May 10 2012 12:39:33pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -33,20 +33,6 @@ func init() {
newExtErrorFuncs["RECORD"] = make(map[int]newErrorFun) newExtErrorFuncs["RECORD"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double'
// Skipping definition for base type 'Bool'
// Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
@ -59,6 +45,18 @@ func init() {
// Skipping definition for base type 'Int8' // Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double'
// Skipping definition for base type 'Bool'
// Skipping definition for base type 'Float'
const ( const (
RecordHTypeFromServerTime = 1 RecordHTypeFromServerTime = 1
RecordHTypeFromClientTime = 2 RecordHTypeFromClientTime = 2
@ -71,7 +69,15 @@ const (
RecordCsAllClients = 3 RecordCsAllClients = 3
) )
// Skipping resource definition of 'Context' type RecordContext uint32
func (c *Conn) NewRecordContextId() (RecordContext, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return RecordContext(id), nil
}
type RecordElementHeader byte type RecordElementHeader byte
@ -498,7 +504,7 @@ func (err RecordBadContextError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err RecordBadContextError) BadId() Id { func (err RecordBadContextError) BadId() uint32 {
return 0 return 0
} }
@ -611,13 +617,13 @@ type RecordCreateContextCookie struct {
} }
// Write request to wire for RecordCreateContext // Write request to wire for RecordCreateContext
func (c *Conn) RecordCreateContext(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordCreateContextCookie { func (c *Conn) RecordCreateContext(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordCreateContextCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.recordCreateContextRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie) c.newRequest(c.recordCreateContextRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie)
return RecordCreateContextCookie{cookie} return RecordCreateContextCookie{cookie}
} }
func (c *Conn) RecordCreateContextChecked(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordCreateContextCookie { func (c *Conn) RecordCreateContextChecked(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordCreateContextCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.recordCreateContextRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie) c.newRequest(c.recordCreateContextRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie)
return RecordCreateContextCookie{cookie} return RecordCreateContextCookie{cookie}
@ -628,7 +634,7 @@ func (cook RecordCreateContextCookie) Check() error {
} }
// Write request to wire for RecordCreateContext // Write request to wire for RecordCreateContext
func (c *Conn) recordCreateContextRequest(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) []byte { func (c *Conn) recordCreateContextRequest(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) []byte {
size := pad(((20 + pad((int(NumClientSpecs) * 4))) + pad((int(NumRanges) * 24)))) size := pad(((20 + pad((int(NumClientSpecs) * 4))) + pad((int(NumRanges) * 24))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -674,13 +680,13 @@ type RecordRegisterClientsCookie struct {
} }
// Write request to wire for RecordRegisterClients // Write request to wire for RecordRegisterClients
func (c *Conn) RecordRegisterClients(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordRegisterClientsCookie { func (c *Conn) RecordRegisterClients(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordRegisterClientsCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.recordRegisterClientsRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie) c.newRequest(c.recordRegisterClientsRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie)
return RecordRegisterClientsCookie{cookie} return RecordRegisterClientsCookie{cookie}
} }
func (c *Conn) RecordRegisterClientsChecked(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordRegisterClientsCookie { func (c *Conn) RecordRegisterClientsChecked(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordRegisterClientsCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.recordRegisterClientsRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie) c.newRequest(c.recordRegisterClientsRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie)
return RecordRegisterClientsCookie{cookie} return RecordRegisterClientsCookie{cookie}
@ -691,7 +697,7 @@ func (cook RecordRegisterClientsCookie) Check() error {
} }
// Write request to wire for RecordRegisterClients // Write request to wire for RecordRegisterClients
func (c *Conn) recordRegisterClientsRequest(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) []byte { func (c *Conn) recordRegisterClientsRequest(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) []byte {
size := pad(((20 + pad((int(NumClientSpecs) * 4))) + pad((int(NumRanges) * 24)))) size := pad(((20 + pad((int(NumClientSpecs) * 4))) + pad((int(NumRanges) * 24))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -737,13 +743,13 @@ type RecordUnregisterClientsCookie struct {
} }
// Write request to wire for RecordUnregisterClients // Write request to wire for RecordUnregisterClients
func (c *Conn) RecordUnregisterClients(Context Id, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) RecordUnregisterClientsCookie { func (c *Conn) RecordUnregisterClients(Context RecordContext, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) RecordUnregisterClientsCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.recordUnregisterClientsRequest(Context, NumClientSpecs, ClientSpecs), cookie) c.newRequest(c.recordUnregisterClientsRequest(Context, NumClientSpecs, ClientSpecs), cookie)
return RecordUnregisterClientsCookie{cookie} return RecordUnregisterClientsCookie{cookie}
} }
func (c *Conn) RecordUnregisterClientsChecked(Context Id, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) RecordUnregisterClientsCookie { func (c *Conn) RecordUnregisterClientsChecked(Context RecordContext, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) RecordUnregisterClientsCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.recordUnregisterClientsRequest(Context, NumClientSpecs, ClientSpecs), cookie) c.newRequest(c.recordUnregisterClientsRequest(Context, NumClientSpecs, ClientSpecs), cookie)
return RecordUnregisterClientsCookie{cookie} return RecordUnregisterClientsCookie{cookie}
@ -754,7 +760,7 @@ func (cook RecordUnregisterClientsCookie) Check() error {
} }
// Write request to wire for RecordUnregisterClients // Write request to wire for RecordUnregisterClients
func (c *Conn) recordUnregisterClientsRequest(Context Id, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) []byte { func (c *Conn) recordUnregisterClientsRequest(Context RecordContext, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) []byte {
size := pad((12 + pad((int(NumClientSpecs) * 4)))) size := pad((12 + pad((int(NumClientSpecs) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -789,13 +795,13 @@ type RecordGetContextCookie struct {
*cookie *cookie
} }
func (c *Conn) RecordGetContext(Context Id) RecordGetContextCookie { func (c *Conn) RecordGetContext(Context RecordContext) RecordGetContextCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.recordGetContextRequest(Context), cookie) c.newRequest(c.recordGetContextRequest(Context), cookie)
return RecordGetContextCookie{cookie} return RecordGetContextCookie{cookie}
} }
func (c *Conn) RecordGetContextUnchecked(Context Id) RecordGetContextCookie { func (c *Conn) RecordGetContextUnchecked(Context RecordContext) RecordGetContextCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.recordGetContextRequest(Context), cookie) c.newRequest(c.recordGetContextRequest(Context), cookie)
return RecordGetContextCookie{cookie} return RecordGetContextCookie{cookie}
@ -865,7 +871,7 @@ func (cook RecordGetContextCookie) Check() error {
} }
// Write request to wire for RecordGetContext // Write request to wire for RecordGetContext
func (c *Conn) recordGetContextRequest(Context Id) []byte { func (c *Conn) recordGetContextRequest(Context RecordContext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -891,13 +897,13 @@ type RecordEnableContextCookie struct {
*cookie *cookie
} }
func (c *Conn) RecordEnableContext(Context Id) RecordEnableContextCookie { func (c *Conn) RecordEnableContext(Context RecordContext) RecordEnableContextCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.recordEnableContextRequest(Context), cookie) c.newRequest(c.recordEnableContextRequest(Context), cookie)
return RecordEnableContextCookie{cookie} return RecordEnableContextCookie{cookie}
} }
func (c *Conn) RecordEnableContextUnchecked(Context Id) RecordEnableContextCookie { func (c *Conn) RecordEnableContextUnchecked(Context RecordContext) RecordEnableContextCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.recordEnableContextRequest(Context), cookie) c.newRequest(c.recordEnableContextRequest(Context), cookie)
return RecordEnableContextCookie{cookie} return RecordEnableContextCookie{cookie}
@ -980,7 +986,7 @@ func (cook RecordEnableContextCookie) Check() error {
} }
// Write request to wire for RecordEnableContext // Write request to wire for RecordEnableContext
func (c *Conn) recordEnableContextRequest(Context Id) []byte { func (c *Conn) recordEnableContextRequest(Context RecordContext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1007,13 +1013,13 @@ type RecordDisableContextCookie struct {
} }
// Write request to wire for RecordDisableContext // Write request to wire for RecordDisableContext
func (c *Conn) RecordDisableContext(Context Id) RecordDisableContextCookie { func (c *Conn) RecordDisableContext(Context RecordContext) RecordDisableContextCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.recordDisableContextRequest(Context), cookie) c.newRequest(c.recordDisableContextRequest(Context), cookie)
return RecordDisableContextCookie{cookie} return RecordDisableContextCookie{cookie}
} }
func (c *Conn) RecordDisableContextChecked(Context Id) RecordDisableContextCookie { func (c *Conn) RecordDisableContextChecked(Context RecordContext) RecordDisableContextCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.recordDisableContextRequest(Context), cookie) c.newRequest(c.recordDisableContextRequest(Context), cookie)
return RecordDisableContextCookie{cookie} return RecordDisableContextCookie{cookie}
@ -1024,7 +1030,7 @@ func (cook RecordDisableContextCookie) Check() error {
} }
// Write request to wire for RecordDisableContext // Write request to wire for RecordDisableContext
func (c *Conn) recordDisableContextRequest(Context Id) []byte { func (c *Conn) recordDisableContextRequest(Context RecordContext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1051,13 +1057,13 @@ type RecordFreeContextCookie struct {
} }
// Write request to wire for RecordFreeContext // Write request to wire for RecordFreeContext
func (c *Conn) RecordFreeContext(Context Id) RecordFreeContextCookie { func (c *Conn) RecordFreeContext(Context RecordContext) RecordFreeContextCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.recordFreeContextRequest(Context), cookie) c.newRequest(c.recordFreeContextRequest(Context), cookie)
return RecordFreeContextCookie{cookie} return RecordFreeContextCookie{cookie}
} }
func (c *Conn) RecordFreeContextChecked(Context Id) RecordFreeContextCookie { func (c *Conn) RecordFreeContextChecked(Context RecordContext) RecordFreeContextCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.recordFreeContextRequest(Context), cookie) c.newRequest(c.recordFreeContextRequest(Context), cookie)
return RecordFreeContextCookie{cookie} return RecordFreeContextCookie{cookie}
@ -1068,7 +1074,7 @@ func (cook RecordFreeContextCookie) Check() error {
} }
// Write request to wire for RecordFreeContext // Write request to wire for RecordFreeContext
func (c *Conn) recordFreeContextRequest(Context Id) []byte { func (c *Conn) recordFreeContextRequest(Context RecordContext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by render.xml on May 8 2012 11:03:24pm EDT. This file was generated by render.xml on May 10 2012 12:39:33pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,6 +37,12 @@ func init() {
newExtErrorFuncs["RENDER"] = make(map[int]newErrorFun) newExtErrorFuncs["RENDER"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32' // Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double' // Skipping definition for base type 'Double'
@ -45,8 +51,6 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
@ -57,12 +61,6 @@ func init() {
// Skipping definition for base type 'Byte' // Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
const ( const (
RenderPictTypeIndexed = 0 RenderPictTypeIndexed = 0
RenderPictTypeDirect = 1 RenderPictTypeDirect = 1
@ -170,11 +168,35 @@ const (
RenderRepeatReflect = 3 RenderRepeatReflect = 3
) )
// Skipping resource definition of 'Glyphset' type RenderGlyphset uint32
// Skipping resource definition of 'Picture' func (c *Conn) NewRenderGlyphsetId() (RenderGlyphset, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return RenderGlyphset(id), nil
}
// Skipping resource definition of 'Pictformat' type RenderPicture uint32
func (c *Conn) NewRenderPictureId() (RenderPicture, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return RenderPicture(id), nil
}
type RenderPictformat uint32
func (c *Conn) NewRenderPictformatId() (RenderPictformat, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return RenderPictformat(id), nil
}
type RenderGlyph uint32 type RenderGlyph uint32
@ -281,19 +303,19 @@ func RenderDirectformatListBytes(buf []byte, list []RenderDirectformat) int {
// 'RenderPictforminfo' struct definition // 'RenderPictforminfo' struct definition
// Size: 28 // Size: 28
type RenderPictforminfo struct { type RenderPictforminfo struct {
Id Id Id RenderPictformat
Type byte Type byte
Depth byte Depth byte
// padding: 2 bytes // padding: 2 bytes
Direct RenderDirectformat Direct RenderDirectformat
Colormap Id Colormap Colormap
} }
// Struct read RenderPictforminfo // Struct read RenderPictforminfo
func ReadRenderPictforminfo(buf []byte, v *RenderPictforminfo) int { func ReadRenderPictforminfo(buf []byte, v *RenderPictforminfo) int {
b := 0 b := 0
v.Id = Id(Get32(buf[b:])) v.Id = RenderPictformat(Get32(buf[b:]))
b += 4 b += 4
v.Type = buf[b] v.Type = buf[b]
@ -307,7 +329,7 @@ func ReadRenderPictforminfo(buf []byte, v *RenderPictforminfo) int {
v.Direct = RenderDirectformat{} v.Direct = RenderDirectformat{}
b += ReadRenderDirectformat(buf[b:], &v.Direct) b += ReadRenderDirectformat(buf[b:], &v.Direct)
v.Colormap = Id(Get32(buf[b:])) v.Colormap = Colormap(Get32(buf[b:]))
b += 4 b += 4
return b return b
@ -367,7 +389,7 @@ func RenderPictforminfoListBytes(buf []byte, list []RenderPictforminfo) int {
// Size: 8 // Size: 8
type RenderPictvisual struct { type RenderPictvisual struct {
Visual Visualid Visual Visualid
Format Id Format RenderPictformat
} }
// Struct read RenderPictvisual // Struct read RenderPictvisual
@ -377,7 +399,7 @@ func ReadRenderPictvisual(buf []byte, v *RenderPictvisual) int {
v.Visual = Visualid(Get32(buf[b:])) v.Visual = Visualid(Get32(buf[b:]))
b += 4 b += 4
v.Format = Id(Get32(buf[b:])) v.Format = RenderPictformat(Get32(buf[b:]))
b += 4 b += 4
return b return b
@ -504,7 +526,7 @@ func RenderPictdepthListSize(list []RenderPictdepth) int {
// Size: (8 + RenderPictdepthListSize(Depths)) // Size: (8 + RenderPictdepthListSize(Depths))
type RenderPictscreen struct { type RenderPictscreen struct {
NumDepths uint32 NumDepths uint32
Fallback Id Fallback RenderPictformat
Depths []RenderPictdepth // size: RenderPictdepthListSize(Depths) Depths []RenderPictdepth // size: RenderPictdepthListSize(Depths)
} }
@ -515,7 +537,7 @@ func ReadRenderPictscreen(buf []byte, v *RenderPictscreen) int {
v.NumDepths = Get32(buf[b:]) v.NumDepths = Get32(buf[b:])
b += 4 b += 4
v.Fallback = Id(Get32(buf[b:])) v.Fallback = RenderPictformat(Get32(buf[b:]))
b += 4 b += 4
v.Depths = make([]RenderPictdepth, v.NumDepths) v.Depths = make([]RenderPictdepth, v.NumDepths)
@ -1176,7 +1198,7 @@ func RenderTransformListBytes(buf []byte, list []RenderTransform) int {
// 'RenderAnimcursorelt' struct definition // 'RenderAnimcursorelt' struct definition
// Size: 8 // Size: 8
type RenderAnimcursorelt struct { type RenderAnimcursorelt struct {
Cursor Id Cursor Cursor
Delay uint32 Delay uint32
} }
@ -1184,7 +1206,7 @@ type RenderAnimcursorelt struct {
func ReadRenderAnimcursorelt(buf []byte, v *RenderAnimcursorelt) int { func ReadRenderAnimcursorelt(buf []byte, v *RenderAnimcursorelt) int {
b := 0 b := 0
v.Cursor = Id(Get32(buf[b:])) v.Cursor = Cursor(Get32(buf[b:]))
b += 4 b += 4
v.Delay = Get32(buf[b:]) v.Delay = Get32(buf[b:])
@ -1384,7 +1406,7 @@ func (err RenderPictFormatError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err RenderPictFormatError) BadId() Id { func (err RenderPictFormatError) BadId() uint32 {
return 0 return 0
} }
@ -1429,7 +1451,7 @@ func (err RenderPictureError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err RenderPictureError) BadId() Id { func (err RenderPictureError) BadId() uint32 {
return 0 return 0
} }
@ -1474,7 +1496,7 @@ func (err RenderPictOpError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err RenderPictOpError) BadId() Id { func (err RenderPictOpError) BadId() uint32 {
return 0 return 0
} }
@ -1519,7 +1541,7 @@ func (err RenderGlyphSetError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err RenderGlyphSetError) BadId() Id { func (err RenderGlyphSetError) BadId() uint32 {
return 0 return 0
} }
@ -1564,7 +1586,7 @@ func (err RenderGlyphError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err RenderGlyphError) BadId() Id { func (err RenderGlyphError) BadId() uint32 {
return 0 return 0
} }
@ -1793,13 +1815,13 @@ type RenderQueryPictIndexValuesCookie struct {
*cookie *cookie
} }
func (c *Conn) RenderQueryPictIndexValues(Format Id) RenderQueryPictIndexValuesCookie { func (c *Conn) RenderQueryPictIndexValues(Format RenderPictformat) RenderQueryPictIndexValuesCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.renderQueryPictIndexValuesRequest(Format), cookie) c.newRequest(c.renderQueryPictIndexValuesRequest(Format), cookie)
return RenderQueryPictIndexValuesCookie{cookie} return RenderQueryPictIndexValuesCookie{cookie}
} }
func (c *Conn) RenderQueryPictIndexValuesUnchecked(Format Id) RenderQueryPictIndexValuesCookie { func (c *Conn) RenderQueryPictIndexValuesUnchecked(Format RenderPictformat) RenderQueryPictIndexValuesCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.renderQueryPictIndexValuesRequest(Format), cookie) c.newRequest(c.renderQueryPictIndexValuesRequest(Format), cookie)
return RenderQueryPictIndexValuesCookie{cookie} return RenderQueryPictIndexValuesCookie{cookie}
@ -1857,7 +1879,7 @@ func (cook RenderQueryPictIndexValuesCookie) Check() error {
} }
// Write request to wire for RenderQueryPictIndexValues // Write request to wire for RenderQueryPictIndexValues
func (c *Conn) renderQueryPictIndexValuesRequest(Format Id) []byte { func (c *Conn) renderQueryPictIndexValuesRequest(Format RenderPictformat) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1884,13 +1906,13 @@ type RenderCreatePictureCookie struct {
} }
// Write request to wire for RenderCreatePicture // Write request to wire for RenderCreatePicture
func (c *Conn) RenderCreatePicture(Pid Id, Drawable Id, Format Id, ValueMask uint32, ValueList []uint32) RenderCreatePictureCookie { func (c *Conn) RenderCreatePicture(Pid RenderPicture, Drawable Drawable, Format RenderPictformat, ValueMask uint32, ValueList []uint32) RenderCreatePictureCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCreatePictureRequest(Pid, Drawable, Format, ValueMask, ValueList), cookie) c.newRequest(c.renderCreatePictureRequest(Pid, Drawable, Format, ValueMask, ValueList), cookie)
return RenderCreatePictureCookie{cookie} return RenderCreatePictureCookie{cookie}
} }
func (c *Conn) RenderCreatePictureChecked(Pid Id, Drawable Id, Format Id, ValueMask uint32, ValueList []uint32) RenderCreatePictureCookie { func (c *Conn) RenderCreatePictureChecked(Pid RenderPicture, Drawable Drawable, Format RenderPictformat, ValueMask uint32, ValueList []uint32) RenderCreatePictureCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCreatePictureRequest(Pid, Drawable, Format, ValueMask, ValueList), cookie) c.newRequest(c.renderCreatePictureRequest(Pid, Drawable, Format, ValueMask, ValueList), cookie)
return RenderCreatePictureCookie{cookie} return RenderCreatePictureCookie{cookie}
@ -1901,7 +1923,7 @@ func (cook RenderCreatePictureCookie) Check() error {
} }
// Write request to wire for RenderCreatePicture // Write request to wire for RenderCreatePicture
func (c *Conn) renderCreatePictureRequest(Pid Id, Drawable Id, Format Id, ValueMask uint32, ValueList []uint32) []byte { func (c *Conn) renderCreatePictureRequest(Pid RenderPicture, Drawable Drawable, Format RenderPictformat, ValueMask uint32, ValueList []uint32) []byte {
size := pad((16 + (4 + pad((4 * popCount(int(ValueMask))))))) size := pad((16 + (4 + pad((4 * popCount(int(ValueMask)))))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1942,13 +1964,13 @@ type RenderChangePictureCookie struct {
} }
// Write request to wire for RenderChangePicture // Write request to wire for RenderChangePicture
func (c *Conn) RenderChangePicture(Picture Id, ValueMask uint32, ValueList []uint32) RenderChangePictureCookie { func (c *Conn) RenderChangePicture(Picture RenderPicture, ValueMask uint32, ValueList []uint32) RenderChangePictureCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderChangePictureRequest(Picture, ValueMask, ValueList), cookie) c.newRequest(c.renderChangePictureRequest(Picture, ValueMask, ValueList), cookie)
return RenderChangePictureCookie{cookie} return RenderChangePictureCookie{cookie}
} }
func (c *Conn) RenderChangePictureChecked(Picture Id, ValueMask uint32, ValueList []uint32) RenderChangePictureCookie { func (c *Conn) RenderChangePictureChecked(Picture RenderPicture, ValueMask uint32, ValueList []uint32) RenderChangePictureCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderChangePictureRequest(Picture, ValueMask, ValueList), cookie) c.newRequest(c.renderChangePictureRequest(Picture, ValueMask, ValueList), cookie)
return RenderChangePictureCookie{cookie} return RenderChangePictureCookie{cookie}
@ -1959,7 +1981,7 @@ func (cook RenderChangePictureCookie) Check() error {
} }
// Write request to wire for RenderChangePicture // Write request to wire for RenderChangePicture
func (c *Conn) renderChangePictureRequest(Picture Id, ValueMask uint32, ValueList []uint32) []byte { func (c *Conn) renderChangePictureRequest(Picture RenderPicture, ValueMask uint32, ValueList []uint32) []byte {
size := pad((8 + (4 + pad((4 * popCount(int(ValueMask))))))) size := pad((8 + (4 + pad((4 * popCount(int(ValueMask)))))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1994,13 +2016,13 @@ type RenderSetPictureClipRectanglesCookie struct {
} }
// Write request to wire for RenderSetPictureClipRectangles // Write request to wire for RenderSetPictureClipRectangles
func (c *Conn) RenderSetPictureClipRectangles(Picture Id, ClipXOrigin int16, ClipYOrigin int16, Rectangles []Rectangle) RenderSetPictureClipRectanglesCookie { func (c *Conn) RenderSetPictureClipRectangles(Picture RenderPicture, ClipXOrigin int16, ClipYOrigin int16, Rectangles []Rectangle) RenderSetPictureClipRectanglesCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderSetPictureClipRectanglesRequest(Picture, ClipXOrigin, ClipYOrigin, Rectangles), cookie) c.newRequest(c.renderSetPictureClipRectanglesRequest(Picture, ClipXOrigin, ClipYOrigin, Rectangles), cookie)
return RenderSetPictureClipRectanglesCookie{cookie} return RenderSetPictureClipRectanglesCookie{cookie}
} }
func (c *Conn) RenderSetPictureClipRectanglesChecked(Picture Id, ClipXOrigin int16, ClipYOrigin int16, Rectangles []Rectangle) RenderSetPictureClipRectanglesCookie { func (c *Conn) RenderSetPictureClipRectanglesChecked(Picture RenderPicture, ClipXOrigin int16, ClipYOrigin int16, Rectangles []Rectangle) RenderSetPictureClipRectanglesCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderSetPictureClipRectanglesRequest(Picture, ClipXOrigin, ClipYOrigin, Rectangles), cookie) c.newRequest(c.renderSetPictureClipRectanglesRequest(Picture, ClipXOrigin, ClipYOrigin, Rectangles), cookie)
return RenderSetPictureClipRectanglesCookie{cookie} return RenderSetPictureClipRectanglesCookie{cookie}
@ -2011,7 +2033,7 @@ func (cook RenderSetPictureClipRectanglesCookie) Check() error {
} }
// Write request to wire for RenderSetPictureClipRectangles // Write request to wire for RenderSetPictureClipRectangles
func (c *Conn) renderSetPictureClipRectanglesRequest(Picture Id, ClipXOrigin int16, ClipYOrigin int16, Rectangles []Rectangle) []byte { func (c *Conn) renderSetPictureClipRectanglesRequest(Picture RenderPicture, ClipXOrigin int16, ClipYOrigin int16, Rectangles []Rectangle) []byte {
size := pad((12 + pad((len(Rectangles) * 8)))) size := pad((12 + pad((len(Rectangles) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2046,13 +2068,13 @@ type RenderFreePictureCookie struct {
} }
// Write request to wire for RenderFreePicture // Write request to wire for RenderFreePicture
func (c *Conn) RenderFreePicture(Picture Id) RenderFreePictureCookie { func (c *Conn) RenderFreePicture(Picture RenderPicture) RenderFreePictureCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderFreePictureRequest(Picture), cookie) c.newRequest(c.renderFreePictureRequest(Picture), cookie)
return RenderFreePictureCookie{cookie} return RenderFreePictureCookie{cookie}
} }
func (c *Conn) RenderFreePictureChecked(Picture Id) RenderFreePictureCookie { func (c *Conn) RenderFreePictureChecked(Picture RenderPicture) RenderFreePictureCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderFreePictureRequest(Picture), cookie) c.newRequest(c.renderFreePictureRequest(Picture), cookie)
return RenderFreePictureCookie{cookie} return RenderFreePictureCookie{cookie}
@ -2063,7 +2085,7 @@ func (cook RenderFreePictureCookie) Check() error {
} }
// Write request to wire for RenderFreePicture // Write request to wire for RenderFreePicture
func (c *Conn) renderFreePictureRequest(Picture Id) []byte { func (c *Conn) renderFreePictureRequest(Picture RenderPicture) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2090,13 +2112,13 @@ type RenderCompositeCookie struct {
} }
// Write request to wire for RenderComposite // Write request to wire for RenderComposite
func (c *Conn) RenderComposite(Op byte, Src Id, Mask Id, Dst Id, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) RenderCompositeCookie { func (c *Conn) RenderComposite(Op byte, Src RenderPicture, Mask RenderPicture, Dst RenderPicture, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) RenderCompositeCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCompositeRequest(Op, Src, Mask, Dst, SrcX, SrcY, MaskX, MaskY, DstX, DstY, Width, Height), cookie) c.newRequest(c.renderCompositeRequest(Op, Src, Mask, Dst, SrcX, SrcY, MaskX, MaskY, DstX, DstY, Width, Height), cookie)
return RenderCompositeCookie{cookie} return RenderCompositeCookie{cookie}
} }
func (c *Conn) RenderCompositeChecked(Op byte, Src Id, Mask Id, Dst Id, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) RenderCompositeCookie { func (c *Conn) RenderCompositeChecked(Op byte, Src RenderPicture, Mask RenderPicture, Dst RenderPicture, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) RenderCompositeCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCompositeRequest(Op, Src, Mask, Dst, SrcX, SrcY, MaskX, MaskY, DstX, DstY, Width, Height), cookie) c.newRequest(c.renderCompositeRequest(Op, Src, Mask, Dst, SrcX, SrcY, MaskX, MaskY, DstX, DstY, Width, Height), cookie)
return RenderCompositeCookie{cookie} return RenderCompositeCookie{cookie}
@ -2107,7 +2129,7 @@ func (cook RenderCompositeCookie) Check() error {
} }
// Write request to wire for RenderComposite // Write request to wire for RenderComposite
func (c *Conn) renderCompositeRequest(Op byte, Src Id, Mask Id, Dst Id, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) []byte { func (c *Conn) renderCompositeRequest(Op byte, Src RenderPicture, Mask RenderPicture, Dst RenderPicture, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) []byte {
size := 36 size := 36
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2169,13 +2191,13 @@ type RenderTrapezoidsCookie struct {
} }
// Write request to wire for RenderTrapezoids // Write request to wire for RenderTrapezoids
func (c *Conn) RenderTrapezoids(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Traps []RenderTrapezoid) RenderTrapezoidsCookie { func (c *Conn) RenderTrapezoids(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Traps []RenderTrapezoid) RenderTrapezoidsCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderTrapezoidsRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Traps), cookie) c.newRequest(c.renderTrapezoidsRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Traps), cookie)
return RenderTrapezoidsCookie{cookie} return RenderTrapezoidsCookie{cookie}
} }
func (c *Conn) RenderTrapezoidsChecked(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Traps []RenderTrapezoid) RenderTrapezoidsCookie { func (c *Conn) RenderTrapezoidsChecked(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Traps []RenderTrapezoid) RenderTrapezoidsCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderTrapezoidsRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Traps), cookie) c.newRequest(c.renderTrapezoidsRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Traps), cookie)
return RenderTrapezoidsCookie{cookie} return RenderTrapezoidsCookie{cookie}
@ -2186,7 +2208,7 @@ func (cook RenderTrapezoidsCookie) Check() error {
} }
// Write request to wire for RenderTrapezoids // Write request to wire for RenderTrapezoids
func (c *Conn) renderTrapezoidsRequest(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Traps []RenderTrapezoid) []byte { func (c *Conn) renderTrapezoidsRequest(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Traps []RenderTrapezoid) []byte {
size := pad((24 + pad((len(Traps) * 40)))) size := pad((24 + pad((len(Traps) * 40))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2232,13 +2254,13 @@ type RenderTrianglesCookie struct {
} }
// Write request to wire for RenderTriangles // Write request to wire for RenderTriangles
func (c *Conn) RenderTriangles(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Triangles []RenderTriangle) RenderTrianglesCookie { func (c *Conn) RenderTriangles(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Triangles []RenderTriangle) RenderTrianglesCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderTrianglesRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Triangles), cookie) c.newRequest(c.renderTrianglesRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Triangles), cookie)
return RenderTrianglesCookie{cookie} return RenderTrianglesCookie{cookie}
} }
func (c *Conn) RenderTrianglesChecked(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Triangles []RenderTriangle) RenderTrianglesCookie { func (c *Conn) RenderTrianglesChecked(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Triangles []RenderTriangle) RenderTrianglesCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderTrianglesRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Triangles), cookie) c.newRequest(c.renderTrianglesRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Triangles), cookie)
return RenderTrianglesCookie{cookie} return RenderTrianglesCookie{cookie}
@ -2249,7 +2271,7 @@ func (cook RenderTrianglesCookie) Check() error {
} }
// Write request to wire for RenderTriangles // Write request to wire for RenderTriangles
func (c *Conn) renderTrianglesRequest(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Triangles []RenderTriangle) []byte { func (c *Conn) renderTrianglesRequest(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Triangles []RenderTriangle) []byte {
size := pad((24 + pad((len(Triangles) * 24)))) size := pad((24 + pad((len(Triangles) * 24))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2295,13 +2317,13 @@ type RenderTriStripCookie struct {
} }
// Write request to wire for RenderTriStrip // Write request to wire for RenderTriStrip
func (c *Conn) RenderTriStrip(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Points []RenderPointfix) RenderTriStripCookie { func (c *Conn) RenderTriStrip(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Points []RenderPointfix) RenderTriStripCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderTriStripRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie) c.newRequest(c.renderTriStripRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie)
return RenderTriStripCookie{cookie} return RenderTriStripCookie{cookie}
} }
func (c *Conn) RenderTriStripChecked(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Points []RenderPointfix) RenderTriStripCookie { func (c *Conn) RenderTriStripChecked(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Points []RenderPointfix) RenderTriStripCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderTriStripRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie) c.newRequest(c.renderTriStripRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie)
return RenderTriStripCookie{cookie} return RenderTriStripCookie{cookie}
@ -2312,7 +2334,7 @@ func (cook RenderTriStripCookie) Check() error {
} }
// Write request to wire for RenderTriStrip // Write request to wire for RenderTriStrip
func (c *Conn) renderTriStripRequest(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Points []RenderPointfix) []byte { func (c *Conn) renderTriStripRequest(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Points []RenderPointfix) []byte {
size := pad((24 + pad((len(Points) * 8)))) size := pad((24 + pad((len(Points) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2358,13 +2380,13 @@ type RenderTriFanCookie struct {
} }
// Write request to wire for RenderTriFan // Write request to wire for RenderTriFan
func (c *Conn) RenderTriFan(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Points []RenderPointfix) RenderTriFanCookie { func (c *Conn) RenderTriFan(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Points []RenderPointfix) RenderTriFanCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderTriFanRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie) c.newRequest(c.renderTriFanRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie)
return RenderTriFanCookie{cookie} return RenderTriFanCookie{cookie}
} }
func (c *Conn) RenderTriFanChecked(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Points []RenderPointfix) RenderTriFanCookie { func (c *Conn) RenderTriFanChecked(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Points []RenderPointfix) RenderTriFanCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderTriFanRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie) c.newRequest(c.renderTriFanRequest(Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie)
return RenderTriFanCookie{cookie} return RenderTriFanCookie{cookie}
@ -2375,7 +2397,7 @@ func (cook RenderTriFanCookie) Check() error {
} }
// Write request to wire for RenderTriFan // Write request to wire for RenderTriFan
func (c *Conn) renderTriFanRequest(Op byte, Src Id, Dst Id, MaskFormat Id, SrcX int16, SrcY int16, Points []RenderPointfix) []byte { func (c *Conn) renderTriFanRequest(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, SrcX int16, SrcY int16, Points []RenderPointfix) []byte {
size := pad((24 + pad((len(Points) * 8)))) size := pad((24 + pad((len(Points) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2421,13 +2443,13 @@ type RenderCreateGlyphSetCookie struct {
} }
// Write request to wire for RenderCreateGlyphSet // Write request to wire for RenderCreateGlyphSet
func (c *Conn) RenderCreateGlyphSet(Gsid Id, Format Id) RenderCreateGlyphSetCookie { func (c *Conn) RenderCreateGlyphSet(Gsid RenderGlyphset, Format RenderPictformat) RenderCreateGlyphSetCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCreateGlyphSetRequest(Gsid, Format), cookie) c.newRequest(c.renderCreateGlyphSetRequest(Gsid, Format), cookie)
return RenderCreateGlyphSetCookie{cookie} return RenderCreateGlyphSetCookie{cookie}
} }
func (c *Conn) RenderCreateGlyphSetChecked(Gsid Id, Format Id) RenderCreateGlyphSetCookie { func (c *Conn) RenderCreateGlyphSetChecked(Gsid RenderGlyphset, Format RenderPictformat) RenderCreateGlyphSetCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCreateGlyphSetRequest(Gsid, Format), cookie) c.newRequest(c.renderCreateGlyphSetRequest(Gsid, Format), cookie)
return RenderCreateGlyphSetCookie{cookie} return RenderCreateGlyphSetCookie{cookie}
@ -2438,7 +2460,7 @@ func (cook RenderCreateGlyphSetCookie) Check() error {
} }
// Write request to wire for RenderCreateGlyphSet // Write request to wire for RenderCreateGlyphSet
func (c *Conn) renderCreateGlyphSetRequest(Gsid Id, Format Id) []byte { func (c *Conn) renderCreateGlyphSetRequest(Gsid RenderGlyphset, Format RenderPictformat) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2468,13 +2490,13 @@ type RenderReferenceGlyphSetCookie struct {
} }
// Write request to wire for RenderReferenceGlyphSet // Write request to wire for RenderReferenceGlyphSet
func (c *Conn) RenderReferenceGlyphSet(Gsid Id, Existing Id) RenderReferenceGlyphSetCookie { func (c *Conn) RenderReferenceGlyphSet(Gsid RenderGlyphset, Existing RenderGlyphset) RenderReferenceGlyphSetCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderReferenceGlyphSetRequest(Gsid, Existing), cookie) c.newRequest(c.renderReferenceGlyphSetRequest(Gsid, Existing), cookie)
return RenderReferenceGlyphSetCookie{cookie} return RenderReferenceGlyphSetCookie{cookie}
} }
func (c *Conn) RenderReferenceGlyphSetChecked(Gsid Id, Existing Id) RenderReferenceGlyphSetCookie { func (c *Conn) RenderReferenceGlyphSetChecked(Gsid RenderGlyphset, Existing RenderGlyphset) RenderReferenceGlyphSetCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderReferenceGlyphSetRequest(Gsid, Existing), cookie) c.newRequest(c.renderReferenceGlyphSetRequest(Gsid, Existing), cookie)
return RenderReferenceGlyphSetCookie{cookie} return RenderReferenceGlyphSetCookie{cookie}
@ -2485,7 +2507,7 @@ func (cook RenderReferenceGlyphSetCookie) Check() error {
} }
// Write request to wire for RenderReferenceGlyphSet // Write request to wire for RenderReferenceGlyphSet
func (c *Conn) renderReferenceGlyphSetRequest(Gsid Id, Existing Id) []byte { func (c *Conn) renderReferenceGlyphSetRequest(Gsid RenderGlyphset, Existing RenderGlyphset) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2515,13 +2537,13 @@ type RenderFreeGlyphSetCookie struct {
} }
// Write request to wire for RenderFreeGlyphSet // Write request to wire for RenderFreeGlyphSet
func (c *Conn) RenderFreeGlyphSet(Glyphset Id) RenderFreeGlyphSetCookie { func (c *Conn) RenderFreeGlyphSet(Glyphset RenderGlyphset) RenderFreeGlyphSetCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderFreeGlyphSetRequest(Glyphset), cookie) c.newRequest(c.renderFreeGlyphSetRequest(Glyphset), cookie)
return RenderFreeGlyphSetCookie{cookie} return RenderFreeGlyphSetCookie{cookie}
} }
func (c *Conn) RenderFreeGlyphSetChecked(Glyphset Id) RenderFreeGlyphSetCookie { func (c *Conn) RenderFreeGlyphSetChecked(Glyphset RenderGlyphset) RenderFreeGlyphSetCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderFreeGlyphSetRequest(Glyphset), cookie) c.newRequest(c.renderFreeGlyphSetRequest(Glyphset), cookie)
return RenderFreeGlyphSetCookie{cookie} return RenderFreeGlyphSetCookie{cookie}
@ -2532,7 +2554,7 @@ func (cook RenderFreeGlyphSetCookie) Check() error {
} }
// Write request to wire for RenderFreeGlyphSet // Write request to wire for RenderFreeGlyphSet
func (c *Conn) renderFreeGlyphSetRequest(Glyphset Id) []byte { func (c *Conn) renderFreeGlyphSetRequest(Glyphset RenderGlyphset) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2559,13 +2581,13 @@ type RenderAddGlyphsCookie struct {
} }
// Write request to wire for RenderAddGlyphs // Write request to wire for RenderAddGlyphs
func (c *Conn) RenderAddGlyphs(Glyphset Id, GlyphsLen uint32, Glyphids []uint32, Glyphs []RenderGlyphinfo, Data []byte) RenderAddGlyphsCookie { func (c *Conn) RenderAddGlyphs(Glyphset RenderGlyphset, GlyphsLen uint32, Glyphids []uint32, Glyphs []RenderGlyphinfo, Data []byte) RenderAddGlyphsCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderAddGlyphsRequest(Glyphset, GlyphsLen, Glyphids, Glyphs, Data), cookie) c.newRequest(c.renderAddGlyphsRequest(Glyphset, GlyphsLen, Glyphids, Glyphs, Data), cookie)
return RenderAddGlyphsCookie{cookie} return RenderAddGlyphsCookie{cookie}
} }
func (c *Conn) RenderAddGlyphsChecked(Glyphset Id, GlyphsLen uint32, Glyphids []uint32, Glyphs []RenderGlyphinfo, Data []byte) RenderAddGlyphsCookie { func (c *Conn) RenderAddGlyphsChecked(Glyphset RenderGlyphset, GlyphsLen uint32, Glyphids []uint32, Glyphs []RenderGlyphinfo, Data []byte) RenderAddGlyphsCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderAddGlyphsRequest(Glyphset, GlyphsLen, Glyphids, Glyphs, Data), cookie) c.newRequest(c.renderAddGlyphsRequest(Glyphset, GlyphsLen, Glyphids, Glyphs, Data), cookie)
return RenderAddGlyphsCookie{cookie} return RenderAddGlyphsCookie{cookie}
@ -2576,7 +2598,7 @@ func (cook RenderAddGlyphsCookie) Check() error {
} }
// Write request to wire for RenderAddGlyphs // Write request to wire for RenderAddGlyphs
func (c *Conn) renderAddGlyphsRequest(Glyphset Id, GlyphsLen uint32, Glyphids []uint32, Glyphs []RenderGlyphinfo, Data []byte) []byte { func (c *Conn) renderAddGlyphsRequest(Glyphset RenderGlyphset, GlyphsLen uint32, Glyphids []uint32, Glyphs []RenderGlyphinfo, Data []byte) []byte {
size := pad((((12 + pad((int(GlyphsLen) * 4))) + pad((int(GlyphsLen) * 12))) + pad((len(Data) * 1)))) size := pad((((12 + pad((int(GlyphsLen) * 4))) + pad((int(GlyphsLen) * 12))) + pad((len(Data) * 1))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2617,13 +2639,13 @@ type RenderFreeGlyphsCookie struct {
} }
// Write request to wire for RenderFreeGlyphs // Write request to wire for RenderFreeGlyphs
func (c *Conn) RenderFreeGlyphs(Glyphset Id, Glyphs []RenderGlyph) RenderFreeGlyphsCookie { func (c *Conn) RenderFreeGlyphs(Glyphset RenderGlyphset, Glyphs []RenderGlyph) RenderFreeGlyphsCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderFreeGlyphsRequest(Glyphset, Glyphs), cookie) c.newRequest(c.renderFreeGlyphsRequest(Glyphset, Glyphs), cookie)
return RenderFreeGlyphsCookie{cookie} return RenderFreeGlyphsCookie{cookie}
} }
func (c *Conn) RenderFreeGlyphsChecked(Glyphset Id, Glyphs []RenderGlyph) RenderFreeGlyphsCookie { func (c *Conn) RenderFreeGlyphsChecked(Glyphset RenderGlyphset, Glyphs []RenderGlyph) RenderFreeGlyphsCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderFreeGlyphsRequest(Glyphset, Glyphs), cookie) c.newRequest(c.renderFreeGlyphsRequest(Glyphset, Glyphs), cookie)
return RenderFreeGlyphsCookie{cookie} return RenderFreeGlyphsCookie{cookie}
@ -2634,7 +2656,7 @@ func (cook RenderFreeGlyphsCookie) Check() error {
} }
// Write request to wire for RenderFreeGlyphs // Write request to wire for RenderFreeGlyphs
func (c *Conn) renderFreeGlyphsRequest(Glyphset Id, Glyphs []RenderGlyph) []byte { func (c *Conn) renderFreeGlyphsRequest(Glyphset RenderGlyphset, Glyphs []RenderGlyph) []byte {
size := pad((8 + pad((len(Glyphs) * 4)))) size := pad((8 + pad((len(Glyphs) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2667,13 +2689,13 @@ type RenderCompositeGlyphs8Cookie struct {
} }
// Write request to wire for RenderCompositeGlyphs8 // Write request to wire for RenderCompositeGlyphs8
func (c *Conn) RenderCompositeGlyphs8(Op byte, Src Id, Dst Id, MaskFormat Id, Glyphset Id, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs8Cookie { func (c *Conn) RenderCompositeGlyphs8(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, Glyphset RenderGlyphset, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs8Cookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCompositeGlyphs8Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie) c.newRequest(c.renderCompositeGlyphs8Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return RenderCompositeGlyphs8Cookie{cookie} return RenderCompositeGlyphs8Cookie{cookie}
} }
func (c *Conn) RenderCompositeGlyphs8Checked(Op byte, Src Id, Dst Id, MaskFormat Id, Glyphset Id, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs8Cookie { func (c *Conn) RenderCompositeGlyphs8Checked(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, Glyphset RenderGlyphset, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs8Cookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCompositeGlyphs8Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie) c.newRequest(c.renderCompositeGlyphs8Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return RenderCompositeGlyphs8Cookie{cookie} return RenderCompositeGlyphs8Cookie{cookie}
@ -2684,7 +2706,7 @@ func (cook RenderCompositeGlyphs8Cookie) Check() error {
} }
// Write request to wire for RenderCompositeGlyphs8 // Write request to wire for RenderCompositeGlyphs8
func (c *Conn) renderCompositeGlyphs8Request(Op byte, Src Id, Dst Id, MaskFormat Id, Glyphset Id, SrcX int16, SrcY int16, Glyphcmds []byte) []byte { func (c *Conn) renderCompositeGlyphs8Request(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, Glyphset RenderGlyphset, SrcX int16, SrcY int16, Glyphcmds []byte) []byte {
size := pad((28 + pad((len(Glyphcmds) * 1)))) size := pad((28 + pad((len(Glyphcmds) * 1))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2734,13 +2756,13 @@ type RenderCompositeGlyphs16Cookie struct {
} }
// Write request to wire for RenderCompositeGlyphs16 // Write request to wire for RenderCompositeGlyphs16
func (c *Conn) RenderCompositeGlyphs16(Op byte, Src Id, Dst Id, MaskFormat Id, Glyphset Id, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs16Cookie { func (c *Conn) RenderCompositeGlyphs16(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, Glyphset RenderGlyphset, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs16Cookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCompositeGlyphs16Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie) c.newRequest(c.renderCompositeGlyphs16Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return RenderCompositeGlyphs16Cookie{cookie} return RenderCompositeGlyphs16Cookie{cookie}
} }
func (c *Conn) RenderCompositeGlyphs16Checked(Op byte, Src Id, Dst Id, MaskFormat Id, Glyphset Id, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs16Cookie { func (c *Conn) RenderCompositeGlyphs16Checked(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, Glyphset RenderGlyphset, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs16Cookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCompositeGlyphs16Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie) c.newRequest(c.renderCompositeGlyphs16Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return RenderCompositeGlyphs16Cookie{cookie} return RenderCompositeGlyphs16Cookie{cookie}
@ -2751,7 +2773,7 @@ func (cook RenderCompositeGlyphs16Cookie) Check() error {
} }
// Write request to wire for RenderCompositeGlyphs16 // Write request to wire for RenderCompositeGlyphs16
func (c *Conn) renderCompositeGlyphs16Request(Op byte, Src Id, Dst Id, MaskFormat Id, Glyphset Id, SrcX int16, SrcY int16, Glyphcmds []byte) []byte { func (c *Conn) renderCompositeGlyphs16Request(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, Glyphset RenderGlyphset, SrcX int16, SrcY int16, Glyphcmds []byte) []byte {
size := pad((28 + pad((len(Glyphcmds) * 1)))) size := pad((28 + pad((len(Glyphcmds) * 1))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2801,13 +2823,13 @@ type RenderCompositeGlyphs32Cookie struct {
} }
// Write request to wire for RenderCompositeGlyphs32 // Write request to wire for RenderCompositeGlyphs32
func (c *Conn) RenderCompositeGlyphs32(Op byte, Src Id, Dst Id, MaskFormat Id, Glyphset Id, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs32Cookie { func (c *Conn) RenderCompositeGlyphs32(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, Glyphset RenderGlyphset, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs32Cookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCompositeGlyphs32Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie) c.newRequest(c.renderCompositeGlyphs32Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return RenderCompositeGlyphs32Cookie{cookie} return RenderCompositeGlyphs32Cookie{cookie}
} }
func (c *Conn) RenderCompositeGlyphs32Checked(Op byte, Src Id, Dst Id, MaskFormat Id, Glyphset Id, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs32Cookie { func (c *Conn) RenderCompositeGlyphs32Checked(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, Glyphset RenderGlyphset, SrcX int16, SrcY int16, Glyphcmds []byte) RenderCompositeGlyphs32Cookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCompositeGlyphs32Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie) c.newRequest(c.renderCompositeGlyphs32Request(Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return RenderCompositeGlyphs32Cookie{cookie} return RenderCompositeGlyphs32Cookie{cookie}
@ -2818,7 +2840,7 @@ func (cook RenderCompositeGlyphs32Cookie) Check() error {
} }
// Write request to wire for RenderCompositeGlyphs32 // Write request to wire for RenderCompositeGlyphs32
func (c *Conn) renderCompositeGlyphs32Request(Op byte, Src Id, Dst Id, MaskFormat Id, Glyphset Id, SrcX int16, SrcY int16, Glyphcmds []byte) []byte { func (c *Conn) renderCompositeGlyphs32Request(Op byte, Src RenderPicture, Dst RenderPicture, MaskFormat RenderPictformat, Glyphset RenderGlyphset, SrcX int16, SrcY int16, Glyphcmds []byte) []byte {
size := pad((28 + pad((len(Glyphcmds) * 1)))) size := pad((28 + pad((len(Glyphcmds) * 1))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2868,13 +2890,13 @@ type RenderFillRectanglesCookie struct {
} }
// Write request to wire for RenderFillRectangles // Write request to wire for RenderFillRectangles
func (c *Conn) RenderFillRectangles(Op byte, Dst Id, Color RenderColor, Rects []Rectangle) RenderFillRectanglesCookie { func (c *Conn) RenderFillRectangles(Op byte, Dst RenderPicture, Color RenderColor, Rects []Rectangle) RenderFillRectanglesCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderFillRectanglesRequest(Op, Dst, Color, Rects), cookie) c.newRequest(c.renderFillRectanglesRequest(Op, Dst, Color, Rects), cookie)
return RenderFillRectanglesCookie{cookie} return RenderFillRectanglesCookie{cookie}
} }
func (c *Conn) RenderFillRectanglesChecked(Op byte, Dst Id, Color RenderColor, Rects []Rectangle) RenderFillRectanglesCookie { func (c *Conn) RenderFillRectanglesChecked(Op byte, Dst RenderPicture, Color RenderColor, Rects []Rectangle) RenderFillRectanglesCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderFillRectanglesRequest(Op, Dst, Color, Rects), cookie) c.newRequest(c.renderFillRectanglesRequest(Op, Dst, Color, Rects), cookie)
return RenderFillRectanglesCookie{cookie} return RenderFillRectanglesCookie{cookie}
@ -2885,7 +2907,7 @@ func (cook RenderFillRectanglesCookie) Check() error {
} }
// Write request to wire for RenderFillRectangles // Write request to wire for RenderFillRectangles
func (c *Conn) renderFillRectanglesRequest(Op byte, Dst Id, Color RenderColor, Rects []Rectangle) []byte { func (c *Conn) renderFillRectanglesRequest(Op byte, Dst RenderPicture, Color RenderColor, Rects []Rectangle) []byte {
size := pad((20 + pad((len(Rects) * 8)))) size := pad((20 + pad((len(Rects) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2925,13 +2947,13 @@ type RenderCreateCursorCookie struct {
} }
// Write request to wire for RenderCreateCursor // Write request to wire for RenderCreateCursor
func (c *Conn) RenderCreateCursor(Cid Id, Source Id, X uint16, Y uint16) RenderCreateCursorCookie { func (c *Conn) RenderCreateCursor(Cid Cursor, Source RenderPicture, X uint16, Y uint16) RenderCreateCursorCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCreateCursorRequest(Cid, Source, X, Y), cookie) c.newRequest(c.renderCreateCursorRequest(Cid, Source, X, Y), cookie)
return RenderCreateCursorCookie{cookie} return RenderCreateCursorCookie{cookie}
} }
func (c *Conn) RenderCreateCursorChecked(Cid Id, Source Id, X uint16, Y uint16) RenderCreateCursorCookie { func (c *Conn) RenderCreateCursorChecked(Cid Cursor, Source RenderPicture, X uint16, Y uint16) RenderCreateCursorCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCreateCursorRequest(Cid, Source, X, Y), cookie) c.newRequest(c.renderCreateCursorRequest(Cid, Source, X, Y), cookie)
return RenderCreateCursorCookie{cookie} return RenderCreateCursorCookie{cookie}
@ -2942,7 +2964,7 @@ func (cook RenderCreateCursorCookie) Check() error {
} }
// Write request to wire for RenderCreateCursor // Write request to wire for RenderCreateCursor
func (c *Conn) renderCreateCursorRequest(Cid Id, Source Id, X uint16, Y uint16) []byte { func (c *Conn) renderCreateCursorRequest(Cid Cursor, Source RenderPicture, X uint16, Y uint16) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2978,13 +3000,13 @@ type RenderSetPictureTransformCookie struct {
} }
// Write request to wire for RenderSetPictureTransform // Write request to wire for RenderSetPictureTransform
func (c *Conn) RenderSetPictureTransform(Picture Id, Transform RenderTransform) RenderSetPictureTransformCookie { func (c *Conn) RenderSetPictureTransform(Picture RenderPicture, Transform RenderTransform) RenderSetPictureTransformCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderSetPictureTransformRequest(Picture, Transform), cookie) c.newRequest(c.renderSetPictureTransformRequest(Picture, Transform), cookie)
return RenderSetPictureTransformCookie{cookie} return RenderSetPictureTransformCookie{cookie}
} }
func (c *Conn) RenderSetPictureTransformChecked(Picture Id, Transform RenderTransform) RenderSetPictureTransformCookie { func (c *Conn) RenderSetPictureTransformChecked(Picture RenderPicture, Transform RenderTransform) RenderSetPictureTransformCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderSetPictureTransformRequest(Picture, Transform), cookie) c.newRequest(c.renderSetPictureTransformRequest(Picture, Transform), cookie)
return RenderSetPictureTransformCookie{cookie} return RenderSetPictureTransformCookie{cookie}
@ -2995,7 +3017,7 @@ func (cook RenderSetPictureTransformCookie) Check() error {
} }
// Write request to wire for RenderSetPictureTransform // Write request to wire for RenderSetPictureTransform
func (c *Conn) renderSetPictureTransformRequest(Picture Id, Transform RenderTransform) []byte { func (c *Conn) renderSetPictureTransformRequest(Picture RenderPicture, Transform RenderTransform) []byte {
size := 44 size := 44
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -3027,13 +3049,13 @@ type RenderQueryFiltersCookie struct {
*cookie *cookie
} }
func (c *Conn) RenderQueryFilters(Drawable Id) RenderQueryFiltersCookie { func (c *Conn) RenderQueryFilters(Drawable Drawable) RenderQueryFiltersCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.renderQueryFiltersRequest(Drawable), cookie) c.newRequest(c.renderQueryFiltersRequest(Drawable), cookie)
return RenderQueryFiltersCookie{cookie} return RenderQueryFiltersCookie{cookie}
} }
func (c *Conn) RenderQueryFiltersUnchecked(Drawable Id) RenderQueryFiltersCookie { func (c *Conn) RenderQueryFiltersUnchecked(Drawable Drawable) RenderQueryFiltersCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.renderQueryFiltersRequest(Drawable), cookie) c.newRequest(c.renderQueryFiltersRequest(Drawable), cookie)
return RenderQueryFiltersCookie{cookie} return RenderQueryFiltersCookie{cookie}
@ -3103,7 +3125,7 @@ func (cook RenderQueryFiltersCookie) Check() error {
} }
// Write request to wire for RenderQueryFilters // Write request to wire for RenderQueryFilters
func (c *Conn) renderQueryFiltersRequest(Drawable Id) []byte { func (c *Conn) renderQueryFiltersRequest(Drawable Drawable) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -3130,13 +3152,13 @@ type RenderSetPictureFilterCookie struct {
} }
// Write request to wire for RenderSetPictureFilter // Write request to wire for RenderSetPictureFilter
func (c *Conn) RenderSetPictureFilter(Picture Id, FilterLen uint16, Filter string, Values []RenderFixed) RenderSetPictureFilterCookie { func (c *Conn) RenderSetPictureFilter(Picture RenderPicture, FilterLen uint16, Filter string, Values []RenderFixed) RenderSetPictureFilterCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderSetPictureFilterRequest(Picture, FilterLen, Filter, Values), cookie) c.newRequest(c.renderSetPictureFilterRequest(Picture, FilterLen, Filter, Values), cookie)
return RenderSetPictureFilterCookie{cookie} return RenderSetPictureFilterCookie{cookie}
} }
func (c *Conn) RenderSetPictureFilterChecked(Picture Id, FilterLen uint16, Filter string, Values []RenderFixed) RenderSetPictureFilterCookie { func (c *Conn) RenderSetPictureFilterChecked(Picture RenderPicture, FilterLen uint16, Filter string, Values []RenderFixed) RenderSetPictureFilterCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderSetPictureFilterRequest(Picture, FilterLen, Filter, Values), cookie) c.newRequest(c.renderSetPictureFilterRequest(Picture, FilterLen, Filter, Values), cookie)
return RenderSetPictureFilterCookie{cookie} return RenderSetPictureFilterCookie{cookie}
@ -3147,7 +3169,7 @@ func (cook RenderSetPictureFilterCookie) Check() error {
} }
// Write request to wire for RenderSetPictureFilter // Write request to wire for RenderSetPictureFilter
func (c *Conn) renderSetPictureFilterRequest(Picture Id, FilterLen uint16, Filter string, Values []RenderFixed) []byte { func (c *Conn) renderSetPictureFilterRequest(Picture RenderPicture, FilterLen uint16, Filter string, Values []RenderFixed) []byte {
size := pad(((12 + pad((int(FilterLen) * 1))) + pad((len(Values) * 4)))) size := pad(((12 + pad((int(FilterLen) * 1))) + pad((len(Values) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -3188,13 +3210,13 @@ type RenderCreateAnimCursorCookie struct {
} }
// Write request to wire for RenderCreateAnimCursor // Write request to wire for RenderCreateAnimCursor
func (c *Conn) RenderCreateAnimCursor(Cid Id, Cursors []RenderAnimcursorelt) RenderCreateAnimCursorCookie { func (c *Conn) RenderCreateAnimCursor(Cid Cursor, Cursors []RenderAnimcursorelt) RenderCreateAnimCursorCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCreateAnimCursorRequest(Cid, Cursors), cookie) c.newRequest(c.renderCreateAnimCursorRequest(Cid, Cursors), cookie)
return RenderCreateAnimCursorCookie{cookie} return RenderCreateAnimCursorCookie{cookie}
} }
func (c *Conn) RenderCreateAnimCursorChecked(Cid Id, Cursors []RenderAnimcursorelt) RenderCreateAnimCursorCookie { func (c *Conn) RenderCreateAnimCursorChecked(Cid Cursor, Cursors []RenderAnimcursorelt) RenderCreateAnimCursorCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCreateAnimCursorRequest(Cid, Cursors), cookie) c.newRequest(c.renderCreateAnimCursorRequest(Cid, Cursors), cookie)
return RenderCreateAnimCursorCookie{cookie} return RenderCreateAnimCursorCookie{cookie}
@ -3205,7 +3227,7 @@ func (cook RenderCreateAnimCursorCookie) Check() error {
} }
// Write request to wire for RenderCreateAnimCursor // Write request to wire for RenderCreateAnimCursor
func (c *Conn) renderCreateAnimCursorRequest(Cid Id, Cursors []RenderAnimcursorelt) []byte { func (c *Conn) renderCreateAnimCursorRequest(Cid Cursor, Cursors []RenderAnimcursorelt) []byte {
size := pad((8 + pad((len(Cursors) * 8)))) size := pad((8 + pad((len(Cursors) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -3234,13 +3256,13 @@ type RenderAddTrapsCookie struct {
} }
// Write request to wire for RenderAddTraps // Write request to wire for RenderAddTraps
func (c *Conn) RenderAddTraps(Picture Id, XOff int16, YOff int16, Traps []RenderTrap) RenderAddTrapsCookie { func (c *Conn) RenderAddTraps(Picture RenderPicture, XOff int16, YOff int16, Traps []RenderTrap) RenderAddTrapsCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderAddTrapsRequest(Picture, XOff, YOff, Traps), cookie) c.newRequest(c.renderAddTrapsRequest(Picture, XOff, YOff, Traps), cookie)
return RenderAddTrapsCookie{cookie} return RenderAddTrapsCookie{cookie}
} }
func (c *Conn) RenderAddTrapsChecked(Picture Id, XOff int16, YOff int16, Traps []RenderTrap) RenderAddTrapsCookie { func (c *Conn) RenderAddTrapsChecked(Picture RenderPicture, XOff int16, YOff int16, Traps []RenderTrap) RenderAddTrapsCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderAddTrapsRequest(Picture, XOff, YOff, Traps), cookie) c.newRequest(c.renderAddTrapsRequest(Picture, XOff, YOff, Traps), cookie)
return RenderAddTrapsCookie{cookie} return RenderAddTrapsCookie{cookie}
@ -3251,7 +3273,7 @@ func (cook RenderAddTrapsCookie) Check() error {
} }
// Write request to wire for RenderAddTraps // Write request to wire for RenderAddTraps
func (c *Conn) renderAddTrapsRequest(Picture Id, XOff int16, YOff int16, Traps []RenderTrap) []byte { func (c *Conn) renderAddTrapsRequest(Picture RenderPicture, XOff int16, YOff int16, Traps []RenderTrap) []byte {
size := pad((12 + pad((len(Traps) * 24)))) size := pad((12 + pad((len(Traps) * 24))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -3286,13 +3308,13 @@ type RenderCreateSolidFillCookie struct {
} }
// Write request to wire for RenderCreateSolidFill // Write request to wire for RenderCreateSolidFill
func (c *Conn) RenderCreateSolidFill(Picture Id, Color RenderColor) RenderCreateSolidFillCookie { func (c *Conn) RenderCreateSolidFill(Picture RenderPicture, Color RenderColor) RenderCreateSolidFillCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCreateSolidFillRequest(Picture, Color), cookie) c.newRequest(c.renderCreateSolidFillRequest(Picture, Color), cookie)
return RenderCreateSolidFillCookie{cookie} return RenderCreateSolidFillCookie{cookie}
} }
func (c *Conn) RenderCreateSolidFillChecked(Picture Id, Color RenderColor) RenderCreateSolidFillCookie { func (c *Conn) RenderCreateSolidFillChecked(Picture RenderPicture, Color RenderColor) RenderCreateSolidFillCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCreateSolidFillRequest(Picture, Color), cookie) c.newRequest(c.renderCreateSolidFillRequest(Picture, Color), cookie)
return RenderCreateSolidFillCookie{cookie} return RenderCreateSolidFillCookie{cookie}
@ -3303,7 +3325,7 @@ func (cook RenderCreateSolidFillCookie) Check() error {
} }
// Write request to wire for RenderCreateSolidFill // Write request to wire for RenderCreateSolidFill
func (c *Conn) renderCreateSolidFillRequest(Picture Id, Color RenderColor) []byte { func (c *Conn) renderCreateSolidFillRequest(Picture RenderPicture, Color RenderColor) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -3336,13 +3358,13 @@ type RenderCreateLinearGradientCookie struct {
} }
// Write request to wire for RenderCreateLinearGradient // Write request to wire for RenderCreateLinearGradient
func (c *Conn) RenderCreateLinearGradient(Picture Id, P1 RenderPointfix, P2 RenderPointfix, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateLinearGradientCookie { func (c *Conn) RenderCreateLinearGradient(Picture RenderPicture, P1 RenderPointfix, P2 RenderPointfix, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateLinearGradientCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCreateLinearGradientRequest(Picture, P1, P2, NumStops, Stops, Colors), cookie) c.newRequest(c.renderCreateLinearGradientRequest(Picture, P1, P2, NumStops, Stops, Colors), cookie)
return RenderCreateLinearGradientCookie{cookie} return RenderCreateLinearGradientCookie{cookie}
} }
func (c *Conn) RenderCreateLinearGradientChecked(Picture Id, P1 RenderPointfix, P2 RenderPointfix, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateLinearGradientCookie { func (c *Conn) RenderCreateLinearGradientChecked(Picture RenderPicture, P1 RenderPointfix, P2 RenderPointfix, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateLinearGradientCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCreateLinearGradientRequest(Picture, P1, P2, NumStops, Stops, Colors), cookie) c.newRequest(c.renderCreateLinearGradientRequest(Picture, P1, P2, NumStops, Stops, Colors), cookie)
return RenderCreateLinearGradientCookie{cookie} return RenderCreateLinearGradientCookie{cookie}
@ -3353,7 +3375,7 @@ func (cook RenderCreateLinearGradientCookie) Check() error {
} }
// Write request to wire for RenderCreateLinearGradient // Write request to wire for RenderCreateLinearGradient
func (c *Conn) renderCreateLinearGradientRequest(Picture Id, P1 RenderPointfix, P2 RenderPointfix, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) []byte { func (c *Conn) renderCreateLinearGradientRequest(Picture RenderPicture, P1 RenderPointfix, P2 RenderPointfix, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) []byte {
size := pad(((28 + pad((int(NumStops) * 4))) + pad((int(NumStops) * 8)))) size := pad(((28 + pad((int(NumStops) * 4))) + pad((int(NumStops) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -3403,13 +3425,13 @@ type RenderCreateRadialGradientCookie struct {
} }
// Write request to wire for RenderCreateRadialGradient // Write request to wire for RenderCreateRadialGradient
func (c *Conn) RenderCreateRadialGradient(Picture Id, Inner RenderPointfix, Outer RenderPointfix, InnerRadius RenderFixed, OuterRadius RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateRadialGradientCookie { func (c *Conn) RenderCreateRadialGradient(Picture RenderPicture, Inner RenderPointfix, Outer RenderPointfix, InnerRadius RenderFixed, OuterRadius RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateRadialGradientCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCreateRadialGradientRequest(Picture, Inner, Outer, InnerRadius, OuterRadius, NumStops, Stops, Colors), cookie) c.newRequest(c.renderCreateRadialGradientRequest(Picture, Inner, Outer, InnerRadius, OuterRadius, NumStops, Stops, Colors), cookie)
return RenderCreateRadialGradientCookie{cookie} return RenderCreateRadialGradientCookie{cookie}
} }
func (c *Conn) RenderCreateRadialGradientChecked(Picture Id, Inner RenderPointfix, Outer RenderPointfix, InnerRadius RenderFixed, OuterRadius RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateRadialGradientCookie { func (c *Conn) RenderCreateRadialGradientChecked(Picture RenderPicture, Inner RenderPointfix, Outer RenderPointfix, InnerRadius RenderFixed, OuterRadius RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateRadialGradientCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCreateRadialGradientRequest(Picture, Inner, Outer, InnerRadius, OuterRadius, NumStops, Stops, Colors), cookie) c.newRequest(c.renderCreateRadialGradientRequest(Picture, Inner, Outer, InnerRadius, OuterRadius, NumStops, Stops, Colors), cookie)
return RenderCreateRadialGradientCookie{cookie} return RenderCreateRadialGradientCookie{cookie}
@ -3420,7 +3442,7 @@ func (cook RenderCreateRadialGradientCookie) Check() error {
} }
// Write request to wire for RenderCreateRadialGradient // Write request to wire for RenderCreateRadialGradient
func (c *Conn) renderCreateRadialGradientRequest(Picture Id, Inner RenderPointfix, Outer RenderPointfix, InnerRadius RenderFixed, OuterRadius RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) []byte { func (c *Conn) renderCreateRadialGradientRequest(Picture RenderPicture, Inner RenderPointfix, Outer RenderPointfix, InnerRadius RenderFixed, OuterRadius RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) []byte {
size := pad(((36 + pad((int(NumStops) * 4))) + pad((int(NumStops) * 8)))) size := pad(((36 + pad((int(NumStops) * 4))) + pad((int(NumStops) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -3476,13 +3498,13 @@ type RenderCreateConicalGradientCookie struct {
} }
// Write request to wire for RenderCreateConicalGradient // Write request to wire for RenderCreateConicalGradient
func (c *Conn) RenderCreateConicalGradient(Picture Id, Center RenderPointfix, Angle RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateConicalGradientCookie { func (c *Conn) RenderCreateConicalGradient(Picture RenderPicture, Center RenderPointfix, Angle RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateConicalGradientCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.renderCreateConicalGradientRequest(Picture, Center, Angle, NumStops, Stops, Colors), cookie) c.newRequest(c.renderCreateConicalGradientRequest(Picture, Center, Angle, NumStops, Stops, Colors), cookie)
return RenderCreateConicalGradientCookie{cookie} return RenderCreateConicalGradientCookie{cookie}
} }
func (c *Conn) RenderCreateConicalGradientChecked(Picture Id, Center RenderPointfix, Angle RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateConicalGradientCookie { func (c *Conn) RenderCreateConicalGradientChecked(Picture RenderPicture, Center RenderPointfix, Angle RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) RenderCreateConicalGradientCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.renderCreateConicalGradientRequest(Picture, Center, Angle, NumStops, Stops, Colors), cookie) c.newRequest(c.renderCreateConicalGradientRequest(Picture, Center, Angle, NumStops, Stops, Colors), cookie)
return RenderCreateConicalGradientCookie{cookie} return RenderCreateConicalGradientCookie{cookie}
@ -3493,7 +3515,7 @@ func (cook RenderCreateConicalGradientCookie) Check() error {
} }
// Write request to wire for RenderCreateConicalGradient // Write request to wire for RenderCreateConicalGradient
func (c *Conn) renderCreateConicalGradientRequest(Picture Id, Center RenderPointfix, Angle RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) []byte { func (c *Conn) renderCreateConicalGradientRequest(Picture RenderPicture, Center RenderPointfix, Angle RenderFixed, NumStops uint32, Stops []RenderFixed, Colors []RenderColor) []byte {
size := pad(((24 + pad((int(NumStops) * 4))) + pad((int(NumStops) * 8)))) size := pad(((24 + pad((int(NumStops) * 4))) + pad((int(NumStops) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by res.xml on May 8 2012 11:03:24pm EDT. This file was generated by res.xml on May 10 2012 12:39:33pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,12 +37,20 @@ func init() {
newExtErrorFuncs["X-Resource"] = make(map[int]newErrorFun) newExtErrorFuncs["X-Resource"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double'
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
@ -53,16 +61,6 @@ func init() {
// Skipping definition for base type 'Byte' // Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double'
// 'ResClient' struct definition // 'ResClient' struct definition
// Size: 8 // Size: 8
type ResClient struct { type ResClient struct {
@ -122,7 +120,7 @@ func ResClientListBytes(buf []byte, list []ResClient) int {
// 'ResType' struct definition // 'ResType' struct definition
// Size: 8 // Size: 8
type ResType struct { type ResType struct {
ResourceType Id ResourceType Atom
Count uint32 Count uint32
} }
@ -130,7 +128,7 @@ type ResType struct {
func ReadResType(buf []byte, v *ResType) int { func ReadResType(buf []byte, v *ResType) int {
b := 0 b := 0
v.ResourceType = Id(Get32(buf[b:])) v.ResourceType = Atom(Get32(buf[b:]))
b += 4 b += 4
v.Count = Get32(buf[b:]) v.Count = Get32(buf[b:])

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by screensaver.xml on May 8 2012 11:03:24pm EDT. This file was generated by screensaver.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,6 +37,16 @@ func init() {
newExtErrorFuncs["MIT-SCREEN-SAVER"] = make(map[int]newErrorFun) newExtErrorFuncs["MIT-SCREEN-SAVER"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8' // Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
@ -51,18 +61,6 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
const ( const (
ScreensaverKindBlanked = 0 ScreensaverKindBlanked = 0
ScreensaverKindInternal = 1 ScreensaverKindInternal = 1
@ -93,8 +91,8 @@ type ScreensaverNotifyEvent struct {
// padding: 1 bytes // padding: 1 bytes
SequenceNumber uint16 SequenceNumber uint16
Time Timestamp Time Timestamp
Root Id Root Window
Window Id Window Window
Kind byte Kind byte
Forced bool Forced bool
// padding: 14 bytes // padding: 14 bytes
@ -122,10 +120,10 @@ func NewScreensaverNotifyEvent(buf []byte) Event {
v.Time = Timestamp(Get32(buf[b:])) v.Time = Timestamp(Get32(buf[b:]))
b += 4 b += 4
v.Root = Id(Get32(buf[b:])) v.Root = Window(Get32(buf[b:]))
b += 4 b += 4
v.Window = Id(Get32(buf[b:])) v.Window = Window(Get32(buf[b:]))
b += 4 b += 4
v.Kind = buf[b] v.Kind = buf[b]
@ -314,13 +312,13 @@ type ScreensaverQueryInfoCookie struct {
*cookie *cookie
} }
func (c *Conn) ScreensaverQueryInfo(Drawable Id) ScreensaverQueryInfoCookie { func (c *Conn) ScreensaverQueryInfo(Drawable Drawable) ScreensaverQueryInfoCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.screensaverQueryInfoRequest(Drawable), cookie) c.newRequest(c.screensaverQueryInfoRequest(Drawable), cookie)
return ScreensaverQueryInfoCookie{cookie} return ScreensaverQueryInfoCookie{cookie}
} }
func (c *Conn) ScreensaverQueryInfoUnchecked(Drawable Id) ScreensaverQueryInfoCookie { func (c *Conn) ScreensaverQueryInfoUnchecked(Drawable Drawable) ScreensaverQueryInfoCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.screensaverQueryInfoRequest(Drawable), cookie) c.newRequest(c.screensaverQueryInfoRequest(Drawable), cookie)
return ScreensaverQueryInfoCookie{cookie} return ScreensaverQueryInfoCookie{cookie}
@ -332,7 +330,7 @@ type ScreensaverQueryInfoReply struct {
Sequence uint16 Sequence uint16
Length uint32 Length uint32
State byte State byte
SaverWindow Id SaverWindow Window
MsUntilServer uint32 MsUntilServer uint32
MsSinceUserInput uint32 MsSinceUserInput uint32
EventMask uint32 EventMask uint32
@ -366,7 +364,7 @@ func screensaverQueryInfoReply(buf []byte) *ScreensaverQueryInfoReply {
v.Length = Get32(buf[b:]) // 4-byte units v.Length = Get32(buf[b:]) // 4-byte units
b += 4 b += 4
v.SaverWindow = Id(Get32(buf[b:])) v.SaverWindow = Window(Get32(buf[b:]))
b += 4 b += 4
v.MsUntilServer = Get32(buf[b:]) v.MsUntilServer = Get32(buf[b:])
@ -391,7 +389,7 @@ func (cook ScreensaverQueryInfoCookie) Check() error {
} }
// Write request to wire for ScreensaverQueryInfo // Write request to wire for ScreensaverQueryInfo
func (c *Conn) screensaverQueryInfoRequest(Drawable Id) []byte { func (c *Conn) screensaverQueryInfoRequest(Drawable Drawable) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -418,13 +416,13 @@ type ScreensaverSelectInputCookie struct {
} }
// Write request to wire for ScreensaverSelectInput // Write request to wire for ScreensaverSelectInput
func (c *Conn) ScreensaverSelectInput(Drawable Id, EventMask uint32) ScreensaverSelectInputCookie { func (c *Conn) ScreensaverSelectInput(Drawable Drawable, EventMask uint32) ScreensaverSelectInputCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.screensaverSelectInputRequest(Drawable, EventMask), cookie) c.newRequest(c.screensaverSelectInputRequest(Drawable, EventMask), cookie)
return ScreensaverSelectInputCookie{cookie} return ScreensaverSelectInputCookie{cookie}
} }
func (c *Conn) ScreensaverSelectInputChecked(Drawable Id, EventMask uint32) ScreensaverSelectInputCookie { func (c *Conn) ScreensaverSelectInputChecked(Drawable Drawable, EventMask uint32) ScreensaverSelectInputCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.screensaverSelectInputRequest(Drawable, EventMask), cookie) c.newRequest(c.screensaverSelectInputRequest(Drawable, EventMask), cookie)
return ScreensaverSelectInputCookie{cookie} return ScreensaverSelectInputCookie{cookie}
@ -435,7 +433,7 @@ func (cook ScreensaverSelectInputCookie) Check() error {
} }
// Write request to wire for ScreensaverSelectInput // Write request to wire for ScreensaverSelectInput
func (c *Conn) screensaverSelectInputRequest(Drawable Id, EventMask uint32) []byte { func (c *Conn) screensaverSelectInputRequest(Drawable Drawable, EventMask uint32) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -465,13 +463,13 @@ type ScreensaverSetAttributesCookie struct {
} }
// Write request to wire for ScreensaverSetAttributes // Write request to wire for ScreensaverSetAttributes
func (c *Conn) ScreensaverSetAttributes(Drawable Id, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual Visualid, ValueMask uint32, ValueList []uint32) ScreensaverSetAttributesCookie { func (c *Conn) ScreensaverSetAttributes(Drawable Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual Visualid, ValueMask uint32, ValueList []uint32) ScreensaverSetAttributesCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.screensaverSetAttributesRequest(Drawable, X, Y, Width, Height, BorderWidth, Class, Depth, Visual, ValueMask, ValueList), cookie) c.newRequest(c.screensaverSetAttributesRequest(Drawable, X, Y, Width, Height, BorderWidth, Class, Depth, Visual, ValueMask, ValueList), cookie)
return ScreensaverSetAttributesCookie{cookie} return ScreensaverSetAttributesCookie{cookie}
} }
func (c *Conn) ScreensaverSetAttributesChecked(Drawable Id, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual Visualid, ValueMask uint32, ValueList []uint32) ScreensaverSetAttributesCookie { func (c *Conn) ScreensaverSetAttributesChecked(Drawable Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual Visualid, ValueMask uint32, ValueList []uint32) ScreensaverSetAttributesCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.screensaverSetAttributesRequest(Drawable, X, Y, Width, Height, BorderWidth, Class, Depth, Visual, ValueMask, ValueList), cookie) c.newRequest(c.screensaverSetAttributesRequest(Drawable, X, Y, Width, Height, BorderWidth, Class, Depth, Visual, ValueMask, ValueList), cookie)
return ScreensaverSetAttributesCookie{cookie} return ScreensaverSetAttributesCookie{cookie}
@ -482,7 +480,7 @@ func (cook ScreensaverSetAttributesCookie) Check() error {
} }
// Write request to wire for ScreensaverSetAttributes // Write request to wire for ScreensaverSetAttributes
func (c *Conn) screensaverSetAttributesRequest(Drawable Id, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual Visualid, ValueMask uint32, ValueList []uint32) []byte { func (c *Conn) screensaverSetAttributesRequest(Drawable Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual Visualid, ValueMask uint32, ValueList []uint32) []byte {
size := pad((24 + (4 + pad((4 * popCount(int(ValueMask))))))) size := pad((24 + (4 + pad((4 * popCount(int(ValueMask)))))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -541,13 +539,13 @@ type ScreensaverUnsetAttributesCookie struct {
} }
// Write request to wire for ScreensaverUnsetAttributes // Write request to wire for ScreensaverUnsetAttributes
func (c *Conn) ScreensaverUnsetAttributes(Drawable Id) ScreensaverUnsetAttributesCookie { func (c *Conn) ScreensaverUnsetAttributes(Drawable Drawable) ScreensaverUnsetAttributesCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.screensaverUnsetAttributesRequest(Drawable), cookie) c.newRequest(c.screensaverUnsetAttributesRequest(Drawable), cookie)
return ScreensaverUnsetAttributesCookie{cookie} return ScreensaverUnsetAttributesCookie{cookie}
} }
func (c *Conn) ScreensaverUnsetAttributesChecked(Drawable Id) ScreensaverUnsetAttributesCookie { func (c *Conn) ScreensaverUnsetAttributesChecked(Drawable Drawable) ScreensaverUnsetAttributesCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.screensaverUnsetAttributesRequest(Drawable), cookie) c.newRequest(c.screensaverUnsetAttributesRequest(Drawable), cookie)
return ScreensaverUnsetAttributesCookie{cookie} return ScreensaverUnsetAttributesCookie{cookie}
@ -558,7 +556,7 @@ func (cook ScreensaverUnsetAttributesCookie) Check() error {
} }
// Write request to wire for ScreensaverUnsetAttributes // Write request to wire for ScreensaverUnsetAttributes
func (c *Conn) screensaverUnsetAttributesRequest(Drawable Id) []byte { func (c *Conn) screensaverUnsetAttributesRequest(Drawable Drawable) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by shape.xml on May 8 2012 11:03:24pm EDT. This file was generated by shape.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,6 +37,14 @@ func init() {
newExtErrorFuncs["SHAPE"] = make(map[int]newErrorFun) newExtErrorFuncs["SHAPE"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8' // Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
@ -51,18 +59,8 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
const ( const (
ShapeSoSet = 0 ShapeSoSet = 0
ShapeSoUnion = 1 ShapeSoUnion = 1
@ -89,7 +87,7 @@ const ShapeNotify = 0
type ShapeNotifyEvent struct { type ShapeNotifyEvent struct {
Sequence uint16 Sequence uint16
ShapeKind ShapeKind ShapeKind ShapeKind
AffectedWindow Id AffectedWindow Window
ExtentsX int16 ExtentsX int16
ExtentsY int16 ExtentsY int16
ExtentsWidth uint16 ExtentsWidth uint16
@ -110,7 +108,7 @@ func NewShapeNotifyEvent(buf []byte) Event {
v.Sequence = Get16(buf[b:]) v.Sequence = Get16(buf[b:])
b += 2 b += 2
v.AffectedWindow = Id(Get32(buf[b:])) v.AffectedWindow = Window(Get32(buf[b:]))
b += 4 b += 4
v.ExtentsX = int16(Get16(buf[b:])) v.ExtentsX = int16(Get16(buf[b:]))
@ -299,13 +297,13 @@ type ShapeRectanglesCookie struct {
} }
// Write request to wire for ShapeRectangles // Write request to wire for ShapeRectangles
func (c *Conn) ShapeRectangles(Operation ShapeOp, DestinationKind ShapeKind, Ordering byte, DestinationWindow Id, XOffset int16, YOffset int16, Rectangles []Rectangle) ShapeRectanglesCookie { func (c *Conn) ShapeRectangles(Operation ShapeOp, DestinationKind ShapeKind, Ordering byte, DestinationWindow Window, XOffset int16, YOffset int16, Rectangles []Rectangle) ShapeRectanglesCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.shapeRectanglesRequest(Operation, DestinationKind, Ordering, DestinationWindow, XOffset, YOffset, Rectangles), cookie) c.newRequest(c.shapeRectanglesRequest(Operation, DestinationKind, Ordering, DestinationWindow, XOffset, YOffset, Rectangles), cookie)
return ShapeRectanglesCookie{cookie} return ShapeRectanglesCookie{cookie}
} }
func (c *Conn) ShapeRectanglesChecked(Operation ShapeOp, DestinationKind ShapeKind, Ordering byte, DestinationWindow Id, XOffset int16, YOffset int16, Rectangles []Rectangle) ShapeRectanglesCookie { func (c *Conn) ShapeRectanglesChecked(Operation ShapeOp, DestinationKind ShapeKind, Ordering byte, DestinationWindow Window, XOffset int16, YOffset int16, Rectangles []Rectangle) ShapeRectanglesCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.shapeRectanglesRequest(Operation, DestinationKind, Ordering, DestinationWindow, XOffset, YOffset, Rectangles), cookie) c.newRequest(c.shapeRectanglesRequest(Operation, DestinationKind, Ordering, DestinationWindow, XOffset, YOffset, Rectangles), cookie)
return ShapeRectanglesCookie{cookie} return ShapeRectanglesCookie{cookie}
@ -316,7 +314,7 @@ func (cook ShapeRectanglesCookie) Check() error {
} }
// Write request to wire for ShapeRectangles // Write request to wire for ShapeRectangles
func (c *Conn) shapeRectanglesRequest(Operation ShapeOp, DestinationKind ShapeKind, Ordering byte, DestinationWindow Id, XOffset int16, YOffset int16, Rectangles []Rectangle) []byte { func (c *Conn) shapeRectanglesRequest(Operation ShapeOp, DestinationKind ShapeKind, Ordering byte, DestinationWindow Window, XOffset int16, YOffset int16, Rectangles []Rectangle) []byte {
size := pad((16 + pad((len(Rectangles) * 8)))) size := pad((16 + pad((len(Rectangles) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -362,13 +360,13 @@ type ShapeMaskCookie struct {
} }
// Write request to wire for ShapeMask // Write request to wire for ShapeMask
func (c *Conn) ShapeMask(Operation ShapeOp, DestinationKind ShapeKind, DestinationWindow Id, XOffset int16, YOffset int16, SourceBitmap Id) ShapeMaskCookie { func (c *Conn) ShapeMask(Operation ShapeOp, DestinationKind ShapeKind, DestinationWindow Window, XOffset int16, YOffset int16, SourceBitmap Pixmap) ShapeMaskCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.shapeMaskRequest(Operation, DestinationKind, DestinationWindow, XOffset, YOffset, SourceBitmap), cookie) c.newRequest(c.shapeMaskRequest(Operation, DestinationKind, DestinationWindow, XOffset, YOffset, SourceBitmap), cookie)
return ShapeMaskCookie{cookie} return ShapeMaskCookie{cookie}
} }
func (c *Conn) ShapeMaskChecked(Operation ShapeOp, DestinationKind ShapeKind, DestinationWindow Id, XOffset int16, YOffset int16, SourceBitmap Id) ShapeMaskCookie { func (c *Conn) ShapeMaskChecked(Operation ShapeOp, DestinationKind ShapeKind, DestinationWindow Window, XOffset int16, YOffset int16, SourceBitmap Pixmap) ShapeMaskCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.shapeMaskRequest(Operation, DestinationKind, DestinationWindow, XOffset, YOffset, SourceBitmap), cookie) c.newRequest(c.shapeMaskRequest(Operation, DestinationKind, DestinationWindow, XOffset, YOffset, SourceBitmap), cookie)
return ShapeMaskCookie{cookie} return ShapeMaskCookie{cookie}
@ -379,7 +377,7 @@ func (cook ShapeMaskCookie) Check() error {
} }
// Write request to wire for ShapeMask // Write request to wire for ShapeMask
func (c *Conn) shapeMaskRequest(Operation ShapeOp, DestinationKind ShapeKind, DestinationWindow Id, XOffset int16, YOffset int16, SourceBitmap Id) []byte { func (c *Conn) shapeMaskRequest(Operation ShapeOp, DestinationKind ShapeKind, DestinationWindow Window, XOffset int16, YOffset int16, SourceBitmap Pixmap) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -423,13 +421,13 @@ type ShapeCombineCookie struct {
} }
// Write request to wire for ShapeCombine // Write request to wire for ShapeCombine
func (c *Conn) ShapeCombine(Operation ShapeOp, DestinationKind ShapeKind, SourceKind ShapeKind, DestinationWindow Id, XOffset int16, YOffset int16, SourceWindow Id) ShapeCombineCookie { func (c *Conn) ShapeCombine(Operation ShapeOp, DestinationKind ShapeKind, SourceKind ShapeKind, DestinationWindow Window, XOffset int16, YOffset int16, SourceWindow Window) ShapeCombineCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.shapeCombineRequest(Operation, DestinationKind, SourceKind, DestinationWindow, XOffset, YOffset, SourceWindow), cookie) c.newRequest(c.shapeCombineRequest(Operation, DestinationKind, SourceKind, DestinationWindow, XOffset, YOffset, SourceWindow), cookie)
return ShapeCombineCookie{cookie} return ShapeCombineCookie{cookie}
} }
func (c *Conn) ShapeCombineChecked(Operation ShapeOp, DestinationKind ShapeKind, SourceKind ShapeKind, DestinationWindow Id, XOffset int16, YOffset int16, SourceWindow Id) ShapeCombineCookie { func (c *Conn) ShapeCombineChecked(Operation ShapeOp, DestinationKind ShapeKind, SourceKind ShapeKind, DestinationWindow Window, XOffset int16, YOffset int16, SourceWindow Window) ShapeCombineCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.shapeCombineRequest(Operation, DestinationKind, SourceKind, DestinationWindow, XOffset, YOffset, SourceWindow), cookie) c.newRequest(c.shapeCombineRequest(Operation, DestinationKind, SourceKind, DestinationWindow, XOffset, YOffset, SourceWindow), cookie)
return ShapeCombineCookie{cookie} return ShapeCombineCookie{cookie}
@ -440,7 +438,7 @@ func (cook ShapeCombineCookie) Check() error {
} }
// Write request to wire for ShapeCombine // Write request to wire for ShapeCombine
func (c *Conn) shapeCombineRequest(Operation ShapeOp, DestinationKind ShapeKind, SourceKind ShapeKind, DestinationWindow Id, XOffset int16, YOffset int16, SourceWindow Id) []byte { func (c *Conn) shapeCombineRequest(Operation ShapeOp, DestinationKind ShapeKind, SourceKind ShapeKind, DestinationWindow Window, XOffset int16, YOffset int16, SourceWindow Window) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -487,13 +485,13 @@ type ShapeOffsetCookie struct {
} }
// Write request to wire for ShapeOffset // Write request to wire for ShapeOffset
func (c *Conn) ShapeOffset(DestinationKind ShapeKind, DestinationWindow Id, XOffset int16, YOffset int16) ShapeOffsetCookie { func (c *Conn) ShapeOffset(DestinationKind ShapeKind, DestinationWindow Window, XOffset int16, YOffset int16) ShapeOffsetCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.shapeOffsetRequest(DestinationKind, DestinationWindow, XOffset, YOffset), cookie) c.newRequest(c.shapeOffsetRequest(DestinationKind, DestinationWindow, XOffset, YOffset), cookie)
return ShapeOffsetCookie{cookie} return ShapeOffsetCookie{cookie}
} }
func (c *Conn) ShapeOffsetChecked(DestinationKind ShapeKind, DestinationWindow Id, XOffset int16, YOffset int16) ShapeOffsetCookie { func (c *Conn) ShapeOffsetChecked(DestinationKind ShapeKind, DestinationWindow Window, XOffset int16, YOffset int16) ShapeOffsetCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.shapeOffsetRequest(DestinationKind, DestinationWindow, XOffset, YOffset), cookie) c.newRequest(c.shapeOffsetRequest(DestinationKind, DestinationWindow, XOffset, YOffset), cookie)
return ShapeOffsetCookie{cookie} return ShapeOffsetCookie{cookie}
@ -504,7 +502,7 @@ func (cook ShapeOffsetCookie) Check() error {
} }
// Write request to wire for ShapeOffset // Write request to wire for ShapeOffset
func (c *Conn) shapeOffsetRequest(DestinationKind ShapeKind, DestinationWindow Id, XOffset int16, YOffset int16) []byte { func (c *Conn) shapeOffsetRequest(DestinationKind ShapeKind, DestinationWindow Window, XOffset int16, YOffset int16) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -541,13 +539,13 @@ type ShapeQueryExtentsCookie struct {
*cookie *cookie
} }
func (c *Conn) ShapeQueryExtents(DestinationWindow Id) ShapeQueryExtentsCookie { func (c *Conn) ShapeQueryExtents(DestinationWindow Window) ShapeQueryExtentsCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.shapeQueryExtentsRequest(DestinationWindow), cookie) c.newRequest(c.shapeQueryExtentsRequest(DestinationWindow), cookie)
return ShapeQueryExtentsCookie{cookie} return ShapeQueryExtentsCookie{cookie}
} }
func (c *Conn) ShapeQueryExtentsUnchecked(DestinationWindow Id) ShapeQueryExtentsCookie { func (c *Conn) ShapeQueryExtentsUnchecked(DestinationWindow Window) ShapeQueryExtentsCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.shapeQueryExtentsRequest(DestinationWindow), cookie) c.newRequest(c.shapeQueryExtentsRequest(DestinationWindow), cookie)
return ShapeQueryExtentsCookie{cookie} return ShapeQueryExtentsCookie{cookie}
@ -645,7 +643,7 @@ func (cook ShapeQueryExtentsCookie) Check() error {
} }
// Write request to wire for ShapeQueryExtents // Write request to wire for ShapeQueryExtents
func (c *Conn) shapeQueryExtentsRequest(DestinationWindow Id) []byte { func (c *Conn) shapeQueryExtentsRequest(DestinationWindow Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -672,13 +670,13 @@ type ShapeSelectInputCookie struct {
} }
// Write request to wire for ShapeSelectInput // Write request to wire for ShapeSelectInput
func (c *Conn) ShapeSelectInput(DestinationWindow Id, Enable bool) ShapeSelectInputCookie { func (c *Conn) ShapeSelectInput(DestinationWindow Window, Enable bool) ShapeSelectInputCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.shapeSelectInputRequest(DestinationWindow, Enable), cookie) c.newRequest(c.shapeSelectInputRequest(DestinationWindow, Enable), cookie)
return ShapeSelectInputCookie{cookie} return ShapeSelectInputCookie{cookie}
} }
func (c *Conn) ShapeSelectInputChecked(DestinationWindow Id, Enable bool) ShapeSelectInputCookie { func (c *Conn) ShapeSelectInputChecked(DestinationWindow Window, Enable bool) ShapeSelectInputCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.shapeSelectInputRequest(DestinationWindow, Enable), cookie) c.newRequest(c.shapeSelectInputRequest(DestinationWindow, Enable), cookie)
return ShapeSelectInputCookie{cookie} return ShapeSelectInputCookie{cookie}
@ -689,7 +687,7 @@ func (cook ShapeSelectInputCookie) Check() error {
} }
// Write request to wire for ShapeSelectInput // Write request to wire for ShapeSelectInput
func (c *Conn) shapeSelectInputRequest(DestinationWindow Id, Enable bool) []byte { func (c *Conn) shapeSelectInputRequest(DestinationWindow Window, Enable bool) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -724,13 +722,13 @@ type ShapeInputSelectedCookie struct {
*cookie *cookie
} }
func (c *Conn) ShapeInputSelected(DestinationWindow Id) ShapeInputSelectedCookie { func (c *Conn) ShapeInputSelected(DestinationWindow Window) ShapeInputSelectedCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.shapeInputSelectedRequest(DestinationWindow), cookie) c.newRequest(c.shapeInputSelectedRequest(DestinationWindow), cookie)
return ShapeInputSelectedCookie{cookie} return ShapeInputSelectedCookie{cookie}
} }
func (c *Conn) ShapeInputSelectedUnchecked(DestinationWindow Id) ShapeInputSelectedCookie { func (c *Conn) ShapeInputSelectedUnchecked(DestinationWindow Window) ShapeInputSelectedCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.shapeInputSelectedRequest(DestinationWindow), cookie) c.newRequest(c.shapeInputSelectedRequest(DestinationWindow), cookie)
return ShapeInputSelectedCookie{cookie} return ShapeInputSelectedCookie{cookie}
@ -782,7 +780,7 @@ func (cook ShapeInputSelectedCookie) Check() error {
} }
// Write request to wire for ShapeInputSelected // Write request to wire for ShapeInputSelected
func (c *Conn) shapeInputSelectedRequest(DestinationWindow Id) []byte { func (c *Conn) shapeInputSelectedRequest(DestinationWindow Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -808,13 +806,13 @@ type ShapeGetRectanglesCookie struct {
*cookie *cookie
} }
func (c *Conn) ShapeGetRectangles(Window Id, SourceKind ShapeKind) ShapeGetRectanglesCookie { func (c *Conn) ShapeGetRectangles(Window Window, SourceKind ShapeKind) ShapeGetRectanglesCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.shapeGetRectanglesRequest(Window, SourceKind), cookie) c.newRequest(c.shapeGetRectanglesRequest(Window, SourceKind), cookie)
return ShapeGetRectanglesCookie{cookie} return ShapeGetRectanglesCookie{cookie}
} }
func (c *Conn) ShapeGetRectanglesUnchecked(Window Id, SourceKind ShapeKind) ShapeGetRectanglesCookie { func (c *Conn) ShapeGetRectanglesUnchecked(Window Window, SourceKind ShapeKind) ShapeGetRectanglesCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.shapeGetRectanglesRequest(Window, SourceKind), cookie) c.newRequest(c.shapeGetRectanglesRequest(Window, SourceKind), cookie)
return ShapeGetRectanglesCookie{cookie} return ShapeGetRectanglesCookie{cookie}
@ -873,7 +871,7 @@ func (cook ShapeGetRectanglesCookie) Check() error {
} }
// Write request to wire for ShapeGetRectangles // Write request to wire for ShapeGetRectangles
func (c *Conn) shapeGetRectanglesRequest(Window Id, SourceKind ShapeKind) []byte { func (c *Conn) shapeGetRectanglesRequest(Window Window, SourceKind ShapeKind) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by shm.xml on May 8 2012 11:03:24pm EDT. This file was generated by shm.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,18 +37,6 @@ func init() {
newExtErrorFuncs["MIT-SHM"] = make(map[int]newErrorFun) newExtErrorFuncs["MIT-SHM"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char' // Skipping definition for base type 'Char'
@ -61,9 +49,27 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id' // Skipping definition for base type 'Card8'
// Skipping resource definition of 'Seg' // Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
type ShmSeg uint32
func (c *Conn) NewShmSegId() (ShmSeg, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return ShmSeg(id), nil
}
// Event definition ShmCompletion (0) // Event definition ShmCompletion (0)
// Size: 32 // Size: 32
@ -73,11 +79,11 @@ const ShmCompletion = 0
type ShmCompletionEvent struct { type ShmCompletionEvent struct {
Sequence uint16 Sequence uint16
// padding: 1 bytes // padding: 1 bytes
Drawable Id Drawable Drawable
MinorEvent uint16 MinorEvent uint16
MajorEvent byte MajorEvent byte
// padding: 1 bytes // padding: 1 bytes
Shmseg Id Shmseg ShmSeg
Offset uint32 Offset uint32
} }
@ -91,7 +97,7 @@ func NewShmCompletionEvent(buf []byte) Event {
v.Sequence = Get16(buf[b:]) v.Sequence = Get16(buf[b:])
b += 2 b += 2
v.Drawable = Id(Get32(buf[b:])) v.Drawable = Drawable(Get32(buf[b:]))
b += 4 b += 4
v.MinorEvent = Get16(buf[b:]) v.MinorEvent = Get16(buf[b:])
@ -102,7 +108,7 @@ func NewShmCompletionEvent(buf []byte) Event {
b += 1 // padding b += 1 // padding
v.Shmseg = Id(Get32(buf[b:])) v.Shmseg = ShmSeg(Get32(buf[b:]))
b += 4 b += 4
v.Offset = Get32(buf[b:]) v.Offset = Get32(buf[b:])
@ -183,8 +189,8 @@ func (err ShmBadSegError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err ShmBadSegError) BadId() Id { func (err ShmBadSegError) BadId() uint32 {
return Id(err.BadValue) return 0
} }
func (err ShmBadSegError) Error() string { func (err ShmBadSegError) Error() string {
@ -312,13 +318,13 @@ type ShmAttachCookie struct {
} }
// Write request to wire for ShmAttach // Write request to wire for ShmAttach
func (c *Conn) ShmAttach(Shmseg Id, Shmid uint32, ReadOnly bool) ShmAttachCookie { func (c *Conn) ShmAttach(Shmseg ShmSeg, Shmid uint32, ReadOnly bool) ShmAttachCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.shmAttachRequest(Shmseg, Shmid, ReadOnly), cookie) c.newRequest(c.shmAttachRequest(Shmseg, Shmid, ReadOnly), cookie)
return ShmAttachCookie{cookie} return ShmAttachCookie{cookie}
} }
func (c *Conn) ShmAttachChecked(Shmseg Id, Shmid uint32, ReadOnly bool) ShmAttachCookie { func (c *Conn) ShmAttachChecked(Shmseg ShmSeg, Shmid uint32, ReadOnly bool) ShmAttachCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.shmAttachRequest(Shmseg, Shmid, ReadOnly), cookie) c.newRequest(c.shmAttachRequest(Shmseg, Shmid, ReadOnly), cookie)
return ShmAttachCookie{cookie} return ShmAttachCookie{cookie}
@ -329,7 +335,7 @@ func (cook ShmAttachCookie) Check() error {
} }
// Write request to wire for ShmAttach // Write request to wire for ShmAttach
func (c *Conn) shmAttachRequest(Shmseg Id, Shmid uint32, ReadOnly bool) []byte { func (c *Conn) shmAttachRequest(Shmseg ShmSeg, Shmid uint32, ReadOnly bool) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -368,13 +374,13 @@ type ShmDetachCookie struct {
} }
// Write request to wire for ShmDetach // Write request to wire for ShmDetach
func (c *Conn) ShmDetach(Shmseg Id) ShmDetachCookie { func (c *Conn) ShmDetach(Shmseg ShmSeg) ShmDetachCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.shmDetachRequest(Shmseg), cookie) c.newRequest(c.shmDetachRequest(Shmseg), cookie)
return ShmDetachCookie{cookie} return ShmDetachCookie{cookie}
} }
func (c *Conn) ShmDetachChecked(Shmseg Id) ShmDetachCookie { func (c *Conn) ShmDetachChecked(Shmseg ShmSeg) ShmDetachCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.shmDetachRequest(Shmseg), cookie) c.newRequest(c.shmDetachRequest(Shmseg), cookie)
return ShmDetachCookie{cookie} return ShmDetachCookie{cookie}
@ -385,7 +391,7 @@ func (cook ShmDetachCookie) Check() error {
} }
// Write request to wire for ShmDetach // Write request to wire for ShmDetach
func (c *Conn) shmDetachRequest(Shmseg Id) []byte { func (c *Conn) shmDetachRequest(Shmseg ShmSeg) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -412,13 +418,13 @@ type ShmPutImageCookie struct {
} }
// Write request to wire for ShmPutImage // Write request to wire for ShmPutImage
func (c *Conn) ShmPutImage(Drawable Id, Gc Id, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg Id, Offset uint32) ShmPutImageCookie { func (c *Conn) ShmPutImage(Drawable Drawable, Gc Gcontext, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg ShmSeg, Offset uint32) ShmPutImageCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.shmPutImageRequest(Drawable, Gc, TotalWidth, TotalHeight, SrcX, SrcY, SrcWidth, SrcHeight, DstX, DstY, Depth, Format, SendEvent, Shmseg, Offset), cookie) c.newRequest(c.shmPutImageRequest(Drawable, Gc, TotalWidth, TotalHeight, SrcX, SrcY, SrcWidth, SrcHeight, DstX, DstY, Depth, Format, SendEvent, Shmseg, Offset), cookie)
return ShmPutImageCookie{cookie} return ShmPutImageCookie{cookie}
} }
func (c *Conn) ShmPutImageChecked(Drawable Id, Gc Id, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg Id, Offset uint32) ShmPutImageCookie { func (c *Conn) ShmPutImageChecked(Drawable Drawable, Gc Gcontext, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg ShmSeg, Offset uint32) ShmPutImageCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.shmPutImageRequest(Drawable, Gc, TotalWidth, TotalHeight, SrcX, SrcY, SrcWidth, SrcHeight, DstX, DstY, Depth, Format, SendEvent, Shmseg, Offset), cookie) c.newRequest(c.shmPutImageRequest(Drawable, Gc, TotalWidth, TotalHeight, SrcX, SrcY, SrcWidth, SrcHeight, DstX, DstY, Depth, Format, SendEvent, Shmseg, Offset), cookie)
return ShmPutImageCookie{cookie} return ShmPutImageCookie{cookie}
@ -429,7 +435,7 @@ func (cook ShmPutImageCookie) Check() error {
} }
// Write request to wire for ShmPutImage // Write request to wire for ShmPutImage
func (c *Conn) shmPutImageRequest(Drawable Id, Gc Id, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg Id, Offset uint32) []byte { func (c *Conn) shmPutImageRequest(Drawable Drawable, Gc Gcontext, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg ShmSeg, Offset uint32) []byte {
size := 40 size := 40
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -499,13 +505,13 @@ type ShmGetImageCookie struct {
*cookie *cookie
} }
func (c *Conn) ShmGetImage(Drawable Id, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Id, Offset uint32) ShmGetImageCookie { func (c *Conn) ShmGetImage(Drawable Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg ShmSeg, Offset uint32) ShmGetImageCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.shmGetImageRequest(Drawable, X, Y, Width, Height, PlaneMask, Format, Shmseg, Offset), cookie) c.newRequest(c.shmGetImageRequest(Drawable, X, Y, Width, Height, PlaneMask, Format, Shmseg, Offset), cookie)
return ShmGetImageCookie{cookie} return ShmGetImageCookie{cookie}
} }
func (c *Conn) ShmGetImageUnchecked(Drawable Id, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Id, Offset uint32) ShmGetImageCookie { func (c *Conn) ShmGetImageUnchecked(Drawable Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg ShmSeg, Offset uint32) ShmGetImageCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.shmGetImageRequest(Drawable, X, Y, Width, Height, PlaneMask, Format, Shmseg, Offset), cookie) c.newRequest(c.shmGetImageRequest(Drawable, X, Y, Width, Height, PlaneMask, Format, Shmseg, Offset), cookie)
return ShmGetImageCookie{cookie} return ShmGetImageCookie{cookie}
@ -561,7 +567,7 @@ func (cook ShmGetImageCookie) Check() error {
} }
// Write request to wire for ShmGetImage // Write request to wire for ShmGetImage
func (c *Conn) shmGetImageRequest(Drawable Id, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Id, Offset uint32) []byte { func (c *Conn) shmGetImageRequest(Drawable Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg ShmSeg, Offset uint32) []byte {
size := 32 size := 32
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -614,13 +620,13 @@ type ShmCreatePixmapCookie struct {
} }
// Write request to wire for ShmCreatePixmap // Write request to wire for ShmCreatePixmap
func (c *Conn) ShmCreatePixmap(Pid Id, Drawable Id, Width uint16, Height uint16, Depth byte, Shmseg Id, Offset uint32) ShmCreatePixmapCookie { func (c *Conn) ShmCreatePixmap(Pid Pixmap, Drawable Drawable, Width uint16, Height uint16, Depth byte, Shmseg ShmSeg, Offset uint32) ShmCreatePixmapCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.shmCreatePixmapRequest(Pid, Drawable, Width, Height, Depth, Shmseg, Offset), cookie) c.newRequest(c.shmCreatePixmapRequest(Pid, Drawable, Width, Height, Depth, Shmseg, Offset), cookie)
return ShmCreatePixmapCookie{cookie} return ShmCreatePixmapCookie{cookie}
} }
func (c *Conn) ShmCreatePixmapChecked(Pid Id, Drawable Id, Width uint16, Height uint16, Depth byte, Shmseg Id, Offset uint32) ShmCreatePixmapCookie { func (c *Conn) ShmCreatePixmapChecked(Pid Pixmap, Drawable Drawable, Width uint16, Height uint16, Depth byte, Shmseg ShmSeg, Offset uint32) ShmCreatePixmapCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.shmCreatePixmapRequest(Pid, Drawable, Width, Height, Depth, Shmseg, Offset), cookie) c.newRequest(c.shmCreatePixmapRequest(Pid, Drawable, Width, Height, Depth, Shmseg, Offset), cookie)
return ShmCreatePixmapCookie{cookie} return ShmCreatePixmapCookie{cookie}
@ -631,7 +637,7 @@ func (cook ShmCreatePixmapCookie) Check() error {
} }
// Write request to wire for ShmCreatePixmap // Write request to wire for ShmCreatePixmap
func (c *Conn) shmCreatePixmapRequest(Pid Id, Drawable Id, Width uint16, Height uint16, Depth byte, Shmseg Id, Offset uint32) []byte { func (c *Conn) shmCreatePixmapRequest(Pid Pixmap, Drawable Drawable, Width uint16, Height uint16, Depth byte, Shmseg ShmSeg, Offset uint32) []byte {
size := 28 size := 28
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by sync.xml on May 8 2012 11:03:24pm EDT. This file was generated by sync.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,18 +37,6 @@ func init() {
newExtErrorFuncs["SYNC"] = make(map[int]newErrorFun) newExtErrorFuncs["SYNC"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char' // Skipping definition for base type 'Char'
@ -61,7 +49,17 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
const ( const (
SyncAlarmstateActive = 0 SyncAlarmstateActive = 0
@ -90,11 +88,35 @@ const (
SyncCaEvents = 32 SyncCaEvents = 32
) )
// Skipping resource definition of 'Alarm' type SyncAlarm uint32
// Skipping resource definition of 'Counter' func (c *Conn) NewSyncAlarmId() (SyncAlarm, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return SyncAlarm(id), nil
}
// Skipping resource definition of 'Fence' type SyncCounter uint32
func (c *Conn) NewSyncCounterId() (SyncCounter, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return SyncCounter(id), nil
}
type SyncFence uint32
func (c *Conn) NewSyncFenceId() (SyncFence, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return SyncFence(id), nil
}
// 'SyncInt64' struct definition // 'SyncInt64' struct definition
// Size: 8 // Size: 8
@ -155,7 +177,7 @@ func SyncInt64ListBytes(buf []byte, list []SyncInt64) int {
// 'SyncSystemcounter' struct definition // 'SyncSystemcounter' struct definition
// Size: (14 + pad((int(NameLen) * 1))) // Size: (14 + pad((int(NameLen) * 1)))
type SyncSystemcounter struct { type SyncSystemcounter struct {
Counter Id Counter SyncCounter
Resolution SyncInt64 Resolution SyncInt64
NameLen uint16 NameLen uint16
Name string // size: pad((int(NameLen) * 1)) Name string // size: pad((int(NameLen) * 1))
@ -165,7 +187,7 @@ type SyncSystemcounter struct {
func ReadSyncSystemcounter(buf []byte, v *SyncSystemcounter) int { func ReadSyncSystemcounter(buf []byte, v *SyncSystemcounter) int {
b := 0 b := 0
v.Counter = Id(Get32(buf[b:])) v.Counter = SyncCounter(Get32(buf[b:]))
b += 4 b += 4
v.Resolution = SyncInt64{} v.Resolution = SyncInt64{}
@ -241,7 +263,7 @@ func SyncSystemcounterListSize(list []SyncSystemcounter) int {
// 'SyncTrigger' struct definition // 'SyncTrigger' struct definition
// Size: 20 // Size: 20
type SyncTrigger struct { type SyncTrigger struct {
Counter Id Counter SyncCounter
WaitType uint32 WaitType uint32
WaitValue SyncInt64 WaitValue SyncInt64
TestType uint32 TestType uint32
@ -251,7 +273,7 @@ type SyncTrigger struct {
func ReadSyncTrigger(buf []byte, v *SyncTrigger) int { func ReadSyncTrigger(buf []byte, v *SyncTrigger) int {
b := 0 b := 0
v.Counter = Id(Get32(buf[b:])) v.Counter = SyncCounter(Get32(buf[b:]))
b += 4 b += 4
v.WaitType = Get32(buf[b:]) v.WaitType = Get32(buf[b:])
@ -381,7 +403,7 @@ const SyncCounterNotify = 0
type SyncCounterNotifyEvent struct { type SyncCounterNotifyEvent struct {
Sequence uint16 Sequence uint16
Kind byte Kind byte
Counter Id Counter SyncCounter
WaitValue SyncInt64 WaitValue SyncInt64
CounterValue SyncInt64 CounterValue SyncInt64
Timestamp Timestamp Timestamp Timestamp
@ -401,7 +423,7 @@ func NewSyncCounterNotifyEvent(buf []byte) Event {
v.Sequence = Get16(buf[b:]) v.Sequence = Get16(buf[b:])
b += 2 b += 2
v.Counter = Id(Get32(buf[b:])) v.Counter = SyncCounter(Get32(buf[b:]))
b += 4 b += 4
v.WaitValue = SyncInt64{} v.WaitValue = SyncInt64{}
@ -504,7 +526,7 @@ const SyncAlarmNotify = 1
type SyncAlarmNotifyEvent struct { type SyncAlarmNotifyEvent struct {
Sequence uint16 Sequence uint16
Kind byte Kind byte
Alarm Id Alarm SyncAlarm
CounterValue SyncInt64 CounterValue SyncInt64
AlarmValue SyncInt64 AlarmValue SyncInt64
Timestamp Timestamp Timestamp Timestamp
@ -523,7 +545,7 @@ func NewSyncAlarmNotifyEvent(buf []byte) Event {
v.Sequence = Get16(buf[b:]) v.Sequence = Get16(buf[b:])
b += 2 b += 2
v.Alarm = Id(Get32(buf[b:])) v.Alarm = SyncAlarm(Get32(buf[b:]))
b += 4 b += 4
v.CounterValue = SyncInt64{} v.CounterValue = SyncInt64{}
@ -645,7 +667,7 @@ func (err SyncCounterError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err SyncCounterError) BadId() Id { func (err SyncCounterError) BadId() uint32 {
return 0 return 0
} }
@ -705,7 +727,7 @@ func (err SyncAlarmError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err SyncAlarmError) BadId() Id { func (err SyncAlarmError) BadId() uint32 {
return 0 return 0
} }
@ -910,13 +932,13 @@ type SyncCreateCounterCookie struct {
} }
// Write request to wire for SyncCreateCounter // Write request to wire for SyncCreateCounter
func (c *Conn) SyncCreateCounter(Id Id, InitialValue SyncInt64) SyncCreateCounterCookie { func (c *Conn) SyncCreateCounter(Id SyncCounter, InitialValue SyncInt64) SyncCreateCounterCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncCreateCounterRequest(Id, InitialValue), cookie) c.newRequest(c.syncCreateCounterRequest(Id, InitialValue), cookie)
return SyncCreateCounterCookie{cookie} return SyncCreateCounterCookie{cookie}
} }
func (c *Conn) SyncCreateCounterChecked(Id Id, InitialValue SyncInt64) SyncCreateCounterCookie { func (c *Conn) SyncCreateCounterChecked(Id SyncCounter, InitialValue SyncInt64) SyncCreateCounterCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncCreateCounterRequest(Id, InitialValue), cookie) c.newRequest(c.syncCreateCounterRequest(Id, InitialValue), cookie)
return SyncCreateCounterCookie{cookie} return SyncCreateCounterCookie{cookie}
@ -927,7 +949,7 @@ func (cook SyncCreateCounterCookie) Check() error {
} }
// Write request to wire for SyncCreateCounter // Write request to wire for SyncCreateCounter
func (c *Conn) syncCreateCounterRequest(Id Id, InitialValue SyncInt64) []byte { func (c *Conn) syncCreateCounterRequest(Id SyncCounter, InitialValue SyncInt64) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -960,13 +982,13 @@ type SyncDestroyCounterCookie struct {
} }
// Write request to wire for SyncDestroyCounter // Write request to wire for SyncDestroyCounter
func (c *Conn) SyncDestroyCounter(Counter Id) SyncDestroyCounterCookie { func (c *Conn) SyncDestroyCounter(Counter SyncCounter) SyncDestroyCounterCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncDestroyCounterRequest(Counter), cookie) c.newRequest(c.syncDestroyCounterRequest(Counter), cookie)
return SyncDestroyCounterCookie{cookie} return SyncDestroyCounterCookie{cookie}
} }
func (c *Conn) SyncDestroyCounterChecked(Counter Id) SyncDestroyCounterCookie { func (c *Conn) SyncDestroyCounterChecked(Counter SyncCounter) SyncDestroyCounterCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncDestroyCounterRequest(Counter), cookie) c.newRequest(c.syncDestroyCounterRequest(Counter), cookie)
return SyncDestroyCounterCookie{cookie} return SyncDestroyCounterCookie{cookie}
@ -977,7 +999,7 @@ func (cook SyncDestroyCounterCookie) Check() error {
} }
// Write request to wire for SyncDestroyCounter // Write request to wire for SyncDestroyCounter
func (c *Conn) syncDestroyCounterRequest(Counter Id) []byte { func (c *Conn) syncDestroyCounterRequest(Counter SyncCounter) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1003,13 +1025,13 @@ type SyncQueryCounterCookie struct {
*cookie *cookie
} }
func (c *Conn) SyncQueryCounter(Counter Id) SyncQueryCounterCookie { func (c *Conn) SyncQueryCounter(Counter SyncCounter) SyncQueryCounterCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.syncQueryCounterRequest(Counter), cookie) c.newRequest(c.syncQueryCounterRequest(Counter), cookie)
return SyncQueryCounterCookie{cookie} return SyncQueryCounterCookie{cookie}
} }
func (c *Conn) SyncQueryCounterUnchecked(Counter Id) SyncQueryCounterCookie { func (c *Conn) SyncQueryCounterUnchecked(Counter SyncCounter) SyncQueryCounterCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.syncQueryCounterRequest(Counter), cookie) c.newRequest(c.syncQueryCounterRequest(Counter), cookie)
return SyncQueryCounterCookie{cookie} return SyncQueryCounterCookie{cookie}
@ -1060,7 +1082,7 @@ func (cook SyncQueryCounterCookie) Check() error {
} }
// Write request to wire for SyncQueryCounter // Write request to wire for SyncQueryCounter
func (c *Conn) syncQueryCounterRequest(Counter Id) []byte { func (c *Conn) syncQueryCounterRequest(Counter SyncCounter) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1130,13 +1152,13 @@ type SyncChangeCounterCookie struct {
} }
// Write request to wire for SyncChangeCounter // Write request to wire for SyncChangeCounter
func (c *Conn) SyncChangeCounter(Counter Id, Amount SyncInt64) SyncChangeCounterCookie { func (c *Conn) SyncChangeCounter(Counter SyncCounter, Amount SyncInt64) SyncChangeCounterCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncChangeCounterRequest(Counter, Amount), cookie) c.newRequest(c.syncChangeCounterRequest(Counter, Amount), cookie)
return SyncChangeCounterCookie{cookie} return SyncChangeCounterCookie{cookie}
} }
func (c *Conn) SyncChangeCounterChecked(Counter Id, Amount SyncInt64) SyncChangeCounterCookie { func (c *Conn) SyncChangeCounterChecked(Counter SyncCounter, Amount SyncInt64) SyncChangeCounterCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncChangeCounterRequest(Counter, Amount), cookie) c.newRequest(c.syncChangeCounterRequest(Counter, Amount), cookie)
return SyncChangeCounterCookie{cookie} return SyncChangeCounterCookie{cookie}
@ -1147,7 +1169,7 @@ func (cook SyncChangeCounterCookie) Check() error {
} }
// Write request to wire for SyncChangeCounter // Write request to wire for SyncChangeCounter
func (c *Conn) syncChangeCounterRequest(Counter Id, Amount SyncInt64) []byte { func (c *Conn) syncChangeCounterRequest(Counter SyncCounter, Amount SyncInt64) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1180,13 +1202,13 @@ type SyncSetCounterCookie struct {
} }
// Write request to wire for SyncSetCounter // Write request to wire for SyncSetCounter
func (c *Conn) SyncSetCounter(Counter Id, Value SyncInt64) SyncSetCounterCookie { func (c *Conn) SyncSetCounter(Counter SyncCounter, Value SyncInt64) SyncSetCounterCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncSetCounterRequest(Counter, Value), cookie) c.newRequest(c.syncSetCounterRequest(Counter, Value), cookie)
return SyncSetCounterCookie{cookie} return SyncSetCounterCookie{cookie}
} }
func (c *Conn) SyncSetCounterChecked(Counter Id, Value SyncInt64) SyncSetCounterCookie { func (c *Conn) SyncSetCounterChecked(Counter SyncCounter, Value SyncInt64) SyncSetCounterCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncSetCounterRequest(Counter, Value), cookie) c.newRequest(c.syncSetCounterRequest(Counter, Value), cookie)
return SyncSetCounterCookie{cookie} return SyncSetCounterCookie{cookie}
@ -1197,7 +1219,7 @@ func (cook SyncSetCounterCookie) Check() error {
} }
// Write request to wire for SyncSetCounter // Write request to wire for SyncSetCounter
func (c *Conn) syncSetCounterRequest(Counter Id, Value SyncInt64) []byte { func (c *Conn) syncSetCounterRequest(Counter SyncCounter, Value SyncInt64) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1230,13 +1252,13 @@ type SyncCreateAlarmCookie struct {
} }
// Write request to wire for SyncCreateAlarm // Write request to wire for SyncCreateAlarm
func (c *Conn) SyncCreateAlarm(Id Id, ValueMask uint32, ValueList []uint32) SyncCreateAlarmCookie { func (c *Conn) SyncCreateAlarm(Id SyncAlarm, ValueMask uint32, ValueList []uint32) SyncCreateAlarmCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncCreateAlarmRequest(Id, ValueMask, ValueList), cookie) c.newRequest(c.syncCreateAlarmRequest(Id, ValueMask, ValueList), cookie)
return SyncCreateAlarmCookie{cookie} return SyncCreateAlarmCookie{cookie}
} }
func (c *Conn) SyncCreateAlarmChecked(Id Id, ValueMask uint32, ValueList []uint32) SyncCreateAlarmCookie { func (c *Conn) SyncCreateAlarmChecked(Id SyncAlarm, ValueMask uint32, ValueList []uint32) SyncCreateAlarmCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncCreateAlarmRequest(Id, ValueMask, ValueList), cookie) c.newRequest(c.syncCreateAlarmRequest(Id, ValueMask, ValueList), cookie)
return SyncCreateAlarmCookie{cookie} return SyncCreateAlarmCookie{cookie}
@ -1247,7 +1269,7 @@ func (cook SyncCreateAlarmCookie) Check() error {
} }
// Write request to wire for SyncCreateAlarm // Write request to wire for SyncCreateAlarm
func (c *Conn) syncCreateAlarmRequest(Id Id, ValueMask uint32, ValueList []uint32) []byte { func (c *Conn) syncCreateAlarmRequest(Id SyncAlarm, ValueMask uint32, ValueList []uint32) []byte {
size := pad((8 + (4 + pad((4 * popCount(int(ValueMask))))))) size := pad((8 + (4 + pad((4 * popCount(int(ValueMask)))))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1282,13 +1304,13 @@ type SyncChangeAlarmCookie struct {
} }
// Write request to wire for SyncChangeAlarm // Write request to wire for SyncChangeAlarm
func (c *Conn) SyncChangeAlarm(Id Id, ValueMask uint32, ValueList []uint32) SyncChangeAlarmCookie { func (c *Conn) SyncChangeAlarm(Id SyncAlarm, ValueMask uint32, ValueList []uint32) SyncChangeAlarmCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncChangeAlarmRequest(Id, ValueMask, ValueList), cookie) c.newRequest(c.syncChangeAlarmRequest(Id, ValueMask, ValueList), cookie)
return SyncChangeAlarmCookie{cookie} return SyncChangeAlarmCookie{cookie}
} }
func (c *Conn) SyncChangeAlarmChecked(Id Id, ValueMask uint32, ValueList []uint32) SyncChangeAlarmCookie { func (c *Conn) SyncChangeAlarmChecked(Id SyncAlarm, ValueMask uint32, ValueList []uint32) SyncChangeAlarmCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncChangeAlarmRequest(Id, ValueMask, ValueList), cookie) c.newRequest(c.syncChangeAlarmRequest(Id, ValueMask, ValueList), cookie)
return SyncChangeAlarmCookie{cookie} return SyncChangeAlarmCookie{cookie}
@ -1299,7 +1321,7 @@ func (cook SyncChangeAlarmCookie) Check() error {
} }
// Write request to wire for SyncChangeAlarm // Write request to wire for SyncChangeAlarm
func (c *Conn) syncChangeAlarmRequest(Id Id, ValueMask uint32, ValueList []uint32) []byte { func (c *Conn) syncChangeAlarmRequest(Id SyncAlarm, ValueMask uint32, ValueList []uint32) []byte {
size := pad((8 + (4 + pad((4 * popCount(int(ValueMask))))))) size := pad((8 + (4 + pad((4 * popCount(int(ValueMask)))))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1334,13 +1356,13 @@ type SyncDestroyAlarmCookie struct {
} }
// Write request to wire for SyncDestroyAlarm // Write request to wire for SyncDestroyAlarm
func (c *Conn) SyncDestroyAlarm(Alarm Id) SyncDestroyAlarmCookie { func (c *Conn) SyncDestroyAlarm(Alarm SyncAlarm) SyncDestroyAlarmCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncDestroyAlarmRequest(Alarm), cookie) c.newRequest(c.syncDestroyAlarmRequest(Alarm), cookie)
return SyncDestroyAlarmCookie{cookie} return SyncDestroyAlarmCookie{cookie}
} }
func (c *Conn) SyncDestroyAlarmChecked(Alarm Id) SyncDestroyAlarmCookie { func (c *Conn) SyncDestroyAlarmChecked(Alarm SyncAlarm) SyncDestroyAlarmCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncDestroyAlarmRequest(Alarm), cookie) c.newRequest(c.syncDestroyAlarmRequest(Alarm), cookie)
return SyncDestroyAlarmCookie{cookie} return SyncDestroyAlarmCookie{cookie}
@ -1351,7 +1373,7 @@ func (cook SyncDestroyAlarmCookie) Check() error {
} }
// Write request to wire for SyncDestroyAlarm // Write request to wire for SyncDestroyAlarm
func (c *Conn) syncDestroyAlarmRequest(Alarm Id) []byte { func (c *Conn) syncDestroyAlarmRequest(Alarm SyncAlarm) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1377,13 +1399,13 @@ type SyncQueryAlarmCookie struct {
*cookie *cookie
} }
func (c *Conn) SyncQueryAlarm(Alarm Id) SyncQueryAlarmCookie { func (c *Conn) SyncQueryAlarm(Alarm SyncAlarm) SyncQueryAlarmCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.syncQueryAlarmRequest(Alarm), cookie) c.newRequest(c.syncQueryAlarmRequest(Alarm), cookie)
return SyncQueryAlarmCookie{cookie} return SyncQueryAlarmCookie{cookie}
} }
func (c *Conn) SyncQueryAlarmUnchecked(Alarm Id) SyncQueryAlarmCookie { func (c *Conn) SyncQueryAlarmUnchecked(Alarm SyncAlarm) SyncQueryAlarmCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.syncQueryAlarmRequest(Alarm), cookie) c.newRequest(c.syncQueryAlarmRequest(Alarm), cookie)
return SyncQueryAlarmCookie{cookie} return SyncQueryAlarmCookie{cookie}
@ -1453,7 +1475,7 @@ func (cook SyncQueryAlarmCookie) Check() error {
} }
// Write request to wire for SyncQueryAlarm // Write request to wire for SyncQueryAlarm
func (c *Conn) syncQueryAlarmRequest(Alarm Id) []byte { func (c *Conn) syncQueryAlarmRequest(Alarm SyncAlarm) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1610,13 +1632,13 @@ type SyncCreateFenceCookie struct {
} }
// Write request to wire for SyncCreateFence // Write request to wire for SyncCreateFence
func (c *Conn) SyncCreateFence(Drawable Id, Fence Id, InitiallyTriggered bool) SyncCreateFenceCookie { func (c *Conn) SyncCreateFence(Drawable Drawable, Fence SyncFence, InitiallyTriggered bool) SyncCreateFenceCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncCreateFenceRequest(Drawable, Fence, InitiallyTriggered), cookie) c.newRequest(c.syncCreateFenceRequest(Drawable, Fence, InitiallyTriggered), cookie)
return SyncCreateFenceCookie{cookie} return SyncCreateFenceCookie{cookie}
} }
func (c *Conn) SyncCreateFenceChecked(Drawable Id, Fence Id, InitiallyTriggered bool) SyncCreateFenceCookie { func (c *Conn) SyncCreateFenceChecked(Drawable Drawable, Fence SyncFence, InitiallyTriggered bool) SyncCreateFenceCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncCreateFenceRequest(Drawable, Fence, InitiallyTriggered), cookie) c.newRequest(c.syncCreateFenceRequest(Drawable, Fence, InitiallyTriggered), cookie)
return SyncCreateFenceCookie{cookie} return SyncCreateFenceCookie{cookie}
@ -1627,7 +1649,7 @@ func (cook SyncCreateFenceCookie) Check() error {
} }
// Write request to wire for SyncCreateFence // Write request to wire for SyncCreateFence
func (c *Conn) syncCreateFenceRequest(Drawable Id, Fence Id, InitiallyTriggered bool) []byte { func (c *Conn) syncCreateFenceRequest(Drawable Drawable, Fence SyncFence, InitiallyTriggered bool) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1664,13 +1686,13 @@ type SyncTriggerFenceCookie struct {
} }
// Write request to wire for SyncTriggerFence // Write request to wire for SyncTriggerFence
func (c *Conn) SyncTriggerFence(Fence Id) SyncTriggerFenceCookie { func (c *Conn) SyncTriggerFence(Fence SyncFence) SyncTriggerFenceCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncTriggerFenceRequest(Fence), cookie) c.newRequest(c.syncTriggerFenceRequest(Fence), cookie)
return SyncTriggerFenceCookie{cookie} return SyncTriggerFenceCookie{cookie}
} }
func (c *Conn) SyncTriggerFenceChecked(Fence Id) SyncTriggerFenceCookie { func (c *Conn) SyncTriggerFenceChecked(Fence SyncFence) SyncTriggerFenceCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncTriggerFenceRequest(Fence), cookie) c.newRequest(c.syncTriggerFenceRequest(Fence), cookie)
return SyncTriggerFenceCookie{cookie} return SyncTriggerFenceCookie{cookie}
@ -1681,7 +1703,7 @@ func (cook SyncTriggerFenceCookie) Check() error {
} }
// Write request to wire for SyncTriggerFence // Write request to wire for SyncTriggerFence
func (c *Conn) syncTriggerFenceRequest(Fence Id) []byte { func (c *Conn) syncTriggerFenceRequest(Fence SyncFence) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1708,13 +1730,13 @@ type SyncResetFenceCookie struct {
} }
// Write request to wire for SyncResetFence // Write request to wire for SyncResetFence
func (c *Conn) SyncResetFence(Fence Id) SyncResetFenceCookie { func (c *Conn) SyncResetFence(Fence SyncFence) SyncResetFenceCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncResetFenceRequest(Fence), cookie) c.newRequest(c.syncResetFenceRequest(Fence), cookie)
return SyncResetFenceCookie{cookie} return SyncResetFenceCookie{cookie}
} }
func (c *Conn) SyncResetFenceChecked(Fence Id) SyncResetFenceCookie { func (c *Conn) SyncResetFenceChecked(Fence SyncFence) SyncResetFenceCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncResetFenceRequest(Fence), cookie) c.newRequest(c.syncResetFenceRequest(Fence), cookie)
return SyncResetFenceCookie{cookie} return SyncResetFenceCookie{cookie}
@ -1725,7 +1747,7 @@ func (cook SyncResetFenceCookie) Check() error {
} }
// Write request to wire for SyncResetFence // Write request to wire for SyncResetFence
func (c *Conn) syncResetFenceRequest(Fence Id) []byte { func (c *Conn) syncResetFenceRequest(Fence SyncFence) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1752,13 +1774,13 @@ type SyncDestroyFenceCookie struct {
} }
// Write request to wire for SyncDestroyFence // Write request to wire for SyncDestroyFence
func (c *Conn) SyncDestroyFence(Fence Id) SyncDestroyFenceCookie { func (c *Conn) SyncDestroyFence(Fence SyncFence) SyncDestroyFenceCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncDestroyFenceRequest(Fence), cookie) c.newRequest(c.syncDestroyFenceRequest(Fence), cookie)
return SyncDestroyFenceCookie{cookie} return SyncDestroyFenceCookie{cookie}
} }
func (c *Conn) SyncDestroyFenceChecked(Fence Id) SyncDestroyFenceCookie { func (c *Conn) SyncDestroyFenceChecked(Fence SyncFence) SyncDestroyFenceCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncDestroyFenceRequest(Fence), cookie) c.newRequest(c.syncDestroyFenceRequest(Fence), cookie)
return SyncDestroyFenceCookie{cookie} return SyncDestroyFenceCookie{cookie}
@ -1769,7 +1791,7 @@ func (cook SyncDestroyFenceCookie) Check() error {
} }
// Write request to wire for SyncDestroyFence // Write request to wire for SyncDestroyFence
func (c *Conn) syncDestroyFenceRequest(Fence Id) []byte { func (c *Conn) syncDestroyFenceRequest(Fence SyncFence) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1795,13 +1817,13 @@ type SyncQueryFenceCookie struct {
*cookie *cookie
} }
func (c *Conn) SyncQueryFence(Fence Id) SyncQueryFenceCookie { func (c *Conn) SyncQueryFence(Fence SyncFence) SyncQueryFenceCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.syncQueryFenceRequest(Fence), cookie) c.newRequest(c.syncQueryFenceRequest(Fence), cookie)
return SyncQueryFenceCookie{cookie} return SyncQueryFenceCookie{cookie}
} }
func (c *Conn) SyncQueryFenceUnchecked(Fence Id) SyncQueryFenceCookie { func (c *Conn) SyncQueryFenceUnchecked(Fence SyncFence) SyncQueryFenceCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.syncQueryFenceRequest(Fence), cookie) c.newRequest(c.syncQueryFenceRequest(Fence), cookie)
return SyncQueryFenceCookie{cookie} return SyncQueryFenceCookie{cookie}
@ -1859,7 +1881,7 @@ func (cook SyncQueryFenceCookie) Check() error {
} }
// Write request to wire for SyncQueryFence // Write request to wire for SyncQueryFence
func (c *Conn) syncQueryFenceRequest(Fence Id) []byte { func (c *Conn) syncQueryFenceRequest(Fence SyncFence) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1886,13 +1908,13 @@ type SyncAwaitFenceCookie struct {
} }
// Write request to wire for SyncAwaitFence // Write request to wire for SyncAwaitFence
func (c *Conn) SyncAwaitFence(FenceList []Id) SyncAwaitFenceCookie { func (c *Conn) SyncAwaitFence(FenceList []SyncFence) SyncAwaitFenceCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.syncAwaitFenceRequest(FenceList), cookie) c.newRequest(c.syncAwaitFenceRequest(FenceList), cookie)
return SyncAwaitFenceCookie{cookie} return SyncAwaitFenceCookie{cookie}
} }
func (c *Conn) SyncAwaitFenceChecked(FenceList []Id) SyncAwaitFenceCookie { func (c *Conn) SyncAwaitFenceChecked(FenceList []SyncFence) SyncAwaitFenceCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.syncAwaitFenceRequest(FenceList), cookie) c.newRequest(c.syncAwaitFenceRequest(FenceList), cookie)
return SyncAwaitFenceCookie{cookie} return SyncAwaitFenceCookie{cookie}
@ -1903,7 +1925,7 @@ func (cook SyncAwaitFenceCookie) Check() error {
} }
// Write request to wire for SyncAwaitFence // Write request to wire for SyncAwaitFence
func (c *Conn) syncAwaitFenceRequest(FenceList []Id) []byte { func (c *Conn) syncAwaitFenceRequest(FenceList []SyncFence) []byte {
size := pad((4 + pad((len(FenceList) * 4)))) size := pad((4 + pad((len(FenceList) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xc_misc.xml on May 8 2012 11:03:24pm EDT. This file was generated by xc_misc.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -33,6 +33,10 @@ func init() {
newExtErrorFuncs["XC-MISC"] = make(map[int]newErrorFun) newExtErrorFuncs["XC-MISC"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Float'
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32' // Skipping definition for base type 'Int32'
@ -53,12 +57,6 @@ func init() {
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'
// Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8'
// Request Xc_miscGetVersion // Request Xc_miscGetVersion
// size: 8 // size: 8
type Xc_miscGetVersionCookie struct { type Xc_miscGetVersionCookie struct {

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xevie.xml on May 8 2012 11:03:24pm EDT. This file was generated by xevie.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -47,8 +47,6 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xf86dri.xml on May 8 2012 11:03:24pm EDT. This file was generated by xf86dri.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -33,6 +33,8 @@ func init() {
newExtErrorFuncs["XFree86-DRI"] = make(map[int]newErrorFun) newExtErrorFuncs["XFree86-DRI"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Float'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
@ -55,10 +57,6 @@ func init() {
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'
// Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// 'Xf86driDrmClipRect' struct definition // 'Xf86driDrmClipRect' struct definition
// Size: 8 // Size: 8
type Xf86driDrmClipRect struct { type Xf86driDrmClipRect struct {

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xf86vidmode.xml on May 8 2012 11:03:24pm EDT. This file was generated by xf86vidmode.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -33,8 +33,6 @@ func init() {
newExtErrorFuncs["XFree86-VidModeExtension"] = make(map[int]newErrorFun) newExtErrorFuncs["XFree86-VidModeExtension"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char' // Skipping definition for base type 'Char'
@ -47,8 +45,6 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
@ -59,6 +55,8 @@ func init() {
// Skipping definition for base type 'Byte' // Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
const ( const (
Xf86vidmodeModeFlagPositiveHsync = 1 Xf86vidmodeModeFlagPositiveHsync = 1
Xf86vidmodeModeFlagNegativeHsync = 2 Xf86vidmodeModeFlagNegativeHsync = 2
@ -254,7 +252,7 @@ func (err Xf86vidmodeBadClockError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err Xf86vidmodeBadClockError) BadId() Id { func (err Xf86vidmodeBadClockError) BadId() uint32 {
return 0 return 0
} }
@ -299,7 +297,7 @@ func (err Xf86vidmodeBadHTimingsError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err Xf86vidmodeBadHTimingsError) BadId() Id { func (err Xf86vidmodeBadHTimingsError) BadId() uint32 {
return 0 return 0
} }
@ -344,7 +342,7 @@ func (err Xf86vidmodeBadVTimingsError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err Xf86vidmodeBadVTimingsError) BadId() Id { func (err Xf86vidmodeBadVTimingsError) BadId() uint32 {
return 0 return 0
} }
@ -389,7 +387,7 @@ func (err Xf86vidmodeModeUnsuitableError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err Xf86vidmodeModeUnsuitableError) BadId() Id { func (err Xf86vidmodeModeUnsuitableError) BadId() uint32 {
return 0 return 0
} }
@ -434,7 +432,7 @@ func (err Xf86vidmodeExtensionDisabledError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err Xf86vidmodeExtensionDisabledError) BadId() Id { func (err Xf86vidmodeExtensionDisabledError) BadId() uint32 {
return 0 return 0
} }
@ -479,7 +477,7 @@ func (err Xf86vidmodeClientNotLocalError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err Xf86vidmodeClientNotLocalError) BadId() Id { func (err Xf86vidmodeClientNotLocalError) BadId() uint32 {
return 0 return 0
} }
@ -524,7 +522,7 @@ func (err Xf86vidmodeZoomLockedError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err Xf86vidmodeZoomLockedError) BadId() Id { func (err Xf86vidmodeZoomLockedError) BadId() uint32 {
return 0 return 0
} }

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xfixes.xml on May 8 2012 11:03:24pm EDT. This file was generated by xfixes.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -39,14 +39,6 @@ func init() {
newExtErrorFuncs["XFIXES"] = make(map[int]newErrorFun) newExtErrorFuncs["XFIXES"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void' // Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte' // Skipping definition for base type 'Byte'
@ -65,6 +57,12 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
const ( const (
XfixesSaveSetModeInsert = 0 XfixesSaveSetModeInsert = 0
XfixesSaveSetModeDelete = 1 XfixesSaveSetModeDelete = 1
@ -104,7 +102,15 @@ const (
XfixesRegionNone = 0 XfixesRegionNone = 0
) )
// Skipping resource definition of 'Region' type XfixesRegion uint32
func (c *Conn) NewXfixesRegionId() (XfixesRegion, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return XfixesRegion(id), nil
}
// Event definition XfixesSelectionNotify (0) // Event definition XfixesSelectionNotify (0)
// Size: 32 // Size: 32
@ -114,9 +120,9 @@ const XfixesSelectionNotify = 0
type XfixesSelectionNotifyEvent struct { type XfixesSelectionNotifyEvent struct {
Sequence uint16 Sequence uint16
Subtype byte Subtype byte
Window Id Window Window
Owner Id Owner Window
Selection Id Selection Atom
Timestamp Timestamp Timestamp Timestamp
SelectionTimestamp Timestamp SelectionTimestamp Timestamp
// padding: 8 bytes // padding: 8 bytes
@ -133,13 +139,13 @@ func NewXfixesSelectionNotifyEvent(buf []byte) Event {
v.Sequence = Get16(buf[b:]) v.Sequence = Get16(buf[b:])
b += 2 b += 2
v.Window = Id(Get32(buf[b:])) v.Window = Window(Get32(buf[b:]))
b += 4 b += 4
v.Owner = Id(Get32(buf[b:])) v.Owner = Window(Get32(buf[b:]))
b += 4 b += 4
v.Selection = Id(Get32(buf[b:])) v.Selection = Atom(Get32(buf[b:]))
b += 4 b += 4
v.Timestamp = Timestamp(Get32(buf[b:])) v.Timestamp = Timestamp(Get32(buf[b:]))
@ -217,10 +223,10 @@ const XfixesCursorNotify = 1
type XfixesCursorNotifyEvent struct { type XfixesCursorNotifyEvent struct {
Sequence uint16 Sequence uint16
Subtype byte Subtype byte
Window Id Window Window
CursorSerial uint32 CursorSerial uint32
Timestamp Timestamp Timestamp Timestamp
Name Id Name Atom
// padding: 12 bytes // padding: 12 bytes
} }
@ -235,7 +241,7 @@ func NewXfixesCursorNotifyEvent(buf []byte) Event {
v.Sequence = Get16(buf[b:]) v.Sequence = Get16(buf[b:])
b += 2 b += 2
v.Window = Id(Get32(buf[b:])) v.Window = Window(Get32(buf[b:]))
b += 4 b += 4
v.CursorSerial = Get32(buf[b:]) v.CursorSerial = Get32(buf[b:])
@ -244,7 +250,7 @@ func NewXfixesCursorNotifyEvent(buf []byte) Event {
v.Timestamp = Timestamp(Get32(buf[b:])) v.Timestamp = Timestamp(Get32(buf[b:]))
b += 4 b += 4
v.Name = Id(Get32(buf[b:])) v.Name = Atom(Get32(buf[b:]))
b += 4 b += 4
b += 12 // padding b += 12 // padding
@ -334,7 +340,7 @@ func (err XfixesBadRegionError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XfixesBadRegionError) BadId() Id { func (err XfixesBadRegionError) BadId() uint32 {
return 0 return 0
} }
@ -449,13 +455,13 @@ type XfixesChangeSaveSetCookie struct {
} }
// Write request to wire for XfixesChangeSaveSet // Write request to wire for XfixesChangeSaveSet
func (c *Conn) XfixesChangeSaveSet(Mode byte, Target byte, Map byte, Window Id) XfixesChangeSaveSetCookie { func (c *Conn) XfixesChangeSaveSet(Mode byte, Target byte, Map byte, Window Window) XfixesChangeSaveSetCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesChangeSaveSetRequest(Mode, Target, Map, Window), cookie) c.newRequest(c.xfixesChangeSaveSetRequest(Mode, Target, Map, Window), cookie)
return XfixesChangeSaveSetCookie{cookie} return XfixesChangeSaveSetCookie{cookie}
} }
func (c *Conn) XfixesChangeSaveSetChecked(Mode byte, Target byte, Map byte, Window Id) XfixesChangeSaveSetCookie { func (c *Conn) XfixesChangeSaveSetChecked(Mode byte, Target byte, Map byte, Window Window) XfixesChangeSaveSetCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesChangeSaveSetRequest(Mode, Target, Map, Window), cookie) c.newRequest(c.xfixesChangeSaveSetRequest(Mode, Target, Map, Window), cookie)
return XfixesChangeSaveSetCookie{cookie} return XfixesChangeSaveSetCookie{cookie}
@ -466,7 +472,7 @@ func (cook XfixesChangeSaveSetCookie) Check() error {
} }
// Write request to wire for XfixesChangeSaveSet // Write request to wire for XfixesChangeSaveSet
func (c *Conn) xfixesChangeSaveSetRequest(Mode byte, Target byte, Map byte, Window Id) []byte { func (c *Conn) xfixesChangeSaveSetRequest(Mode byte, Target byte, Map byte, Window Window) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -504,13 +510,13 @@ type XfixesSelectSelectionInputCookie struct {
} }
// Write request to wire for XfixesSelectSelectionInput // Write request to wire for XfixesSelectSelectionInput
func (c *Conn) XfixesSelectSelectionInput(Window Id, Selection Id, EventMask uint32) XfixesSelectSelectionInputCookie { func (c *Conn) XfixesSelectSelectionInput(Window Window, Selection Atom, EventMask uint32) XfixesSelectSelectionInputCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesSelectSelectionInputRequest(Window, Selection, EventMask), cookie) c.newRequest(c.xfixesSelectSelectionInputRequest(Window, Selection, EventMask), cookie)
return XfixesSelectSelectionInputCookie{cookie} return XfixesSelectSelectionInputCookie{cookie}
} }
func (c *Conn) XfixesSelectSelectionInputChecked(Window Id, Selection Id, EventMask uint32) XfixesSelectSelectionInputCookie { func (c *Conn) XfixesSelectSelectionInputChecked(Window Window, Selection Atom, EventMask uint32) XfixesSelectSelectionInputCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesSelectSelectionInputRequest(Window, Selection, EventMask), cookie) c.newRequest(c.xfixesSelectSelectionInputRequest(Window, Selection, EventMask), cookie)
return XfixesSelectSelectionInputCookie{cookie} return XfixesSelectSelectionInputCookie{cookie}
@ -521,7 +527,7 @@ func (cook XfixesSelectSelectionInputCookie) Check() error {
} }
// Write request to wire for XfixesSelectSelectionInput // Write request to wire for XfixesSelectSelectionInput
func (c *Conn) xfixesSelectSelectionInputRequest(Window Id, Selection Id, EventMask uint32) []byte { func (c *Conn) xfixesSelectSelectionInputRequest(Window Window, Selection Atom, EventMask uint32) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -554,13 +560,13 @@ type XfixesSelectCursorInputCookie struct {
} }
// Write request to wire for XfixesSelectCursorInput // Write request to wire for XfixesSelectCursorInput
func (c *Conn) XfixesSelectCursorInput(Window Id, EventMask uint32) XfixesSelectCursorInputCookie { func (c *Conn) XfixesSelectCursorInput(Window Window, EventMask uint32) XfixesSelectCursorInputCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesSelectCursorInputRequest(Window, EventMask), cookie) c.newRequest(c.xfixesSelectCursorInputRequest(Window, EventMask), cookie)
return XfixesSelectCursorInputCookie{cookie} return XfixesSelectCursorInputCookie{cookie}
} }
func (c *Conn) XfixesSelectCursorInputChecked(Window Id, EventMask uint32) XfixesSelectCursorInputCookie { func (c *Conn) XfixesSelectCursorInputChecked(Window Window, EventMask uint32) XfixesSelectCursorInputCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesSelectCursorInputRequest(Window, EventMask), cookie) c.newRequest(c.xfixesSelectCursorInputRequest(Window, EventMask), cookie)
return XfixesSelectCursorInputCookie{cookie} return XfixesSelectCursorInputCookie{cookie}
@ -571,7 +577,7 @@ func (cook XfixesSelectCursorInputCookie) Check() error {
} }
// Write request to wire for XfixesSelectCursorInput // Write request to wire for XfixesSelectCursorInput
func (c *Conn) xfixesSelectCursorInputRequest(Window Id, EventMask uint32) []byte { func (c *Conn) xfixesSelectCursorInputRequest(Window Window, EventMask uint32) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -716,13 +722,13 @@ type XfixesCreateRegionCookie struct {
} }
// Write request to wire for XfixesCreateRegion // Write request to wire for XfixesCreateRegion
func (c *Conn) XfixesCreateRegion(Region Id, Rectangles []Rectangle) XfixesCreateRegionCookie { func (c *Conn) XfixesCreateRegion(Region XfixesRegion, Rectangles []Rectangle) XfixesCreateRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesCreateRegionRequest(Region, Rectangles), cookie) c.newRequest(c.xfixesCreateRegionRequest(Region, Rectangles), cookie)
return XfixesCreateRegionCookie{cookie} return XfixesCreateRegionCookie{cookie}
} }
func (c *Conn) XfixesCreateRegionChecked(Region Id, Rectangles []Rectangle) XfixesCreateRegionCookie { func (c *Conn) XfixesCreateRegionChecked(Region XfixesRegion, Rectangles []Rectangle) XfixesCreateRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesCreateRegionRequest(Region, Rectangles), cookie) c.newRequest(c.xfixesCreateRegionRequest(Region, Rectangles), cookie)
return XfixesCreateRegionCookie{cookie} return XfixesCreateRegionCookie{cookie}
@ -733,7 +739,7 @@ func (cook XfixesCreateRegionCookie) Check() error {
} }
// Write request to wire for XfixesCreateRegion // Write request to wire for XfixesCreateRegion
func (c *Conn) xfixesCreateRegionRequest(Region Id, Rectangles []Rectangle) []byte { func (c *Conn) xfixesCreateRegionRequest(Region XfixesRegion, Rectangles []Rectangle) []byte {
size := pad((8 + pad((len(Rectangles) * 8)))) size := pad((8 + pad((len(Rectangles) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -762,13 +768,13 @@ type XfixesCreateRegionFromBitmapCookie struct {
} }
// Write request to wire for XfixesCreateRegionFromBitmap // Write request to wire for XfixesCreateRegionFromBitmap
func (c *Conn) XfixesCreateRegionFromBitmap(Region Id, Bitmap Id) XfixesCreateRegionFromBitmapCookie { func (c *Conn) XfixesCreateRegionFromBitmap(Region XfixesRegion, Bitmap Pixmap) XfixesCreateRegionFromBitmapCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesCreateRegionFromBitmapRequest(Region, Bitmap), cookie) c.newRequest(c.xfixesCreateRegionFromBitmapRequest(Region, Bitmap), cookie)
return XfixesCreateRegionFromBitmapCookie{cookie} return XfixesCreateRegionFromBitmapCookie{cookie}
} }
func (c *Conn) XfixesCreateRegionFromBitmapChecked(Region Id, Bitmap Id) XfixesCreateRegionFromBitmapCookie { func (c *Conn) XfixesCreateRegionFromBitmapChecked(Region XfixesRegion, Bitmap Pixmap) XfixesCreateRegionFromBitmapCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesCreateRegionFromBitmapRequest(Region, Bitmap), cookie) c.newRequest(c.xfixesCreateRegionFromBitmapRequest(Region, Bitmap), cookie)
return XfixesCreateRegionFromBitmapCookie{cookie} return XfixesCreateRegionFromBitmapCookie{cookie}
@ -779,7 +785,7 @@ func (cook XfixesCreateRegionFromBitmapCookie) Check() error {
} }
// Write request to wire for XfixesCreateRegionFromBitmap // Write request to wire for XfixesCreateRegionFromBitmap
func (c *Conn) xfixesCreateRegionFromBitmapRequest(Region Id, Bitmap Id) []byte { func (c *Conn) xfixesCreateRegionFromBitmapRequest(Region XfixesRegion, Bitmap Pixmap) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -809,13 +815,13 @@ type XfixesCreateRegionFromWindowCookie struct {
} }
// Write request to wire for XfixesCreateRegionFromWindow // Write request to wire for XfixesCreateRegionFromWindow
func (c *Conn) XfixesCreateRegionFromWindow(Region Id, Window Id, Kind ShapeKind) XfixesCreateRegionFromWindowCookie { func (c *Conn) XfixesCreateRegionFromWindow(Region XfixesRegion, Window Window, Kind ShapeKind) XfixesCreateRegionFromWindowCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesCreateRegionFromWindowRequest(Region, Window, Kind), cookie) c.newRequest(c.xfixesCreateRegionFromWindowRequest(Region, Window, Kind), cookie)
return XfixesCreateRegionFromWindowCookie{cookie} return XfixesCreateRegionFromWindowCookie{cookie}
} }
func (c *Conn) XfixesCreateRegionFromWindowChecked(Region Id, Window Id, Kind ShapeKind) XfixesCreateRegionFromWindowCookie { func (c *Conn) XfixesCreateRegionFromWindowChecked(Region XfixesRegion, Window Window, Kind ShapeKind) XfixesCreateRegionFromWindowCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesCreateRegionFromWindowRequest(Region, Window, Kind), cookie) c.newRequest(c.xfixesCreateRegionFromWindowRequest(Region, Window, Kind), cookie)
return XfixesCreateRegionFromWindowCookie{cookie} return XfixesCreateRegionFromWindowCookie{cookie}
@ -826,7 +832,7 @@ func (cook XfixesCreateRegionFromWindowCookie) Check() error {
} }
// Write request to wire for XfixesCreateRegionFromWindow // Write request to wire for XfixesCreateRegionFromWindow
func (c *Conn) xfixesCreateRegionFromWindowRequest(Region Id, Window Id, Kind ShapeKind) []byte { func (c *Conn) xfixesCreateRegionFromWindowRequest(Region XfixesRegion, Window Window, Kind ShapeKind) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -861,13 +867,13 @@ type XfixesCreateRegionFromGCCookie struct {
} }
// Write request to wire for XfixesCreateRegionFromGC // Write request to wire for XfixesCreateRegionFromGC
func (c *Conn) XfixesCreateRegionFromGC(Region Id, Gc Id) XfixesCreateRegionFromGCCookie { func (c *Conn) XfixesCreateRegionFromGC(Region XfixesRegion, Gc Gcontext) XfixesCreateRegionFromGCCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesCreateRegionFromGCRequest(Region, Gc), cookie) c.newRequest(c.xfixesCreateRegionFromGCRequest(Region, Gc), cookie)
return XfixesCreateRegionFromGCCookie{cookie} return XfixesCreateRegionFromGCCookie{cookie}
} }
func (c *Conn) XfixesCreateRegionFromGCChecked(Region Id, Gc Id) XfixesCreateRegionFromGCCookie { func (c *Conn) XfixesCreateRegionFromGCChecked(Region XfixesRegion, Gc Gcontext) XfixesCreateRegionFromGCCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesCreateRegionFromGCRequest(Region, Gc), cookie) c.newRequest(c.xfixesCreateRegionFromGCRequest(Region, Gc), cookie)
return XfixesCreateRegionFromGCCookie{cookie} return XfixesCreateRegionFromGCCookie{cookie}
@ -878,7 +884,7 @@ func (cook XfixesCreateRegionFromGCCookie) Check() error {
} }
// Write request to wire for XfixesCreateRegionFromGC // Write request to wire for XfixesCreateRegionFromGC
func (c *Conn) xfixesCreateRegionFromGCRequest(Region Id, Gc Id) []byte { func (c *Conn) xfixesCreateRegionFromGCRequest(Region XfixesRegion, Gc Gcontext) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -908,13 +914,13 @@ type XfixesCreateRegionFromPictureCookie struct {
} }
// Write request to wire for XfixesCreateRegionFromPicture // Write request to wire for XfixesCreateRegionFromPicture
func (c *Conn) XfixesCreateRegionFromPicture(Region Id, Picture Id) XfixesCreateRegionFromPictureCookie { func (c *Conn) XfixesCreateRegionFromPicture(Region XfixesRegion, Picture RenderPicture) XfixesCreateRegionFromPictureCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesCreateRegionFromPictureRequest(Region, Picture), cookie) c.newRequest(c.xfixesCreateRegionFromPictureRequest(Region, Picture), cookie)
return XfixesCreateRegionFromPictureCookie{cookie} return XfixesCreateRegionFromPictureCookie{cookie}
} }
func (c *Conn) XfixesCreateRegionFromPictureChecked(Region Id, Picture Id) XfixesCreateRegionFromPictureCookie { func (c *Conn) XfixesCreateRegionFromPictureChecked(Region XfixesRegion, Picture RenderPicture) XfixesCreateRegionFromPictureCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesCreateRegionFromPictureRequest(Region, Picture), cookie) c.newRequest(c.xfixesCreateRegionFromPictureRequest(Region, Picture), cookie)
return XfixesCreateRegionFromPictureCookie{cookie} return XfixesCreateRegionFromPictureCookie{cookie}
@ -925,7 +931,7 @@ func (cook XfixesCreateRegionFromPictureCookie) Check() error {
} }
// Write request to wire for XfixesCreateRegionFromPicture // Write request to wire for XfixesCreateRegionFromPicture
func (c *Conn) xfixesCreateRegionFromPictureRequest(Region Id, Picture Id) []byte { func (c *Conn) xfixesCreateRegionFromPictureRequest(Region XfixesRegion, Picture RenderPicture) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -955,13 +961,13 @@ type XfixesDestroyRegionCookie struct {
} }
// Write request to wire for XfixesDestroyRegion // Write request to wire for XfixesDestroyRegion
func (c *Conn) XfixesDestroyRegion(Region Id) XfixesDestroyRegionCookie { func (c *Conn) XfixesDestroyRegion(Region XfixesRegion) XfixesDestroyRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesDestroyRegionRequest(Region), cookie) c.newRequest(c.xfixesDestroyRegionRequest(Region), cookie)
return XfixesDestroyRegionCookie{cookie} return XfixesDestroyRegionCookie{cookie}
} }
func (c *Conn) XfixesDestroyRegionChecked(Region Id) XfixesDestroyRegionCookie { func (c *Conn) XfixesDestroyRegionChecked(Region XfixesRegion) XfixesDestroyRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesDestroyRegionRequest(Region), cookie) c.newRequest(c.xfixesDestroyRegionRequest(Region), cookie)
return XfixesDestroyRegionCookie{cookie} return XfixesDestroyRegionCookie{cookie}
@ -972,7 +978,7 @@ func (cook XfixesDestroyRegionCookie) Check() error {
} }
// Write request to wire for XfixesDestroyRegion // Write request to wire for XfixesDestroyRegion
func (c *Conn) xfixesDestroyRegionRequest(Region Id) []byte { func (c *Conn) xfixesDestroyRegionRequest(Region XfixesRegion) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -999,13 +1005,13 @@ type XfixesSetRegionCookie struct {
} }
// Write request to wire for XfixesSetRegion // Write request to wire for XfixesSetRegion
func (c *Conn) XfixesSetRegion(Region Id, Rectangles []Rectangle) XfixesSetRegionCookie { func (c *Conn) XfixesSetRegion(Region XfixesRegion, Rectangles []Rectangle) XfixesSetRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesSetRegionRequest(Region, Rectangles), cookie) c.newRequest(c.xfixesSetRegionRequest(Region, Rectangles), cookie)
return XfixesSetRegionCookie{cookie} return XfixesSetRegionCookie{cookie}
} }
func (c *Conn) XfixesSetRegionChecked(Region Id, Rectangles []Rectangle) XfixesSetRegionCookie { func (c *Conn) XfixesSetRegionChecked(Region XfixesRegion, Rectangles []Rectangle) XfixesSetRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesSetRegionRequest(Region, Rectangles), cookie) c.newRequest(c.xfixesSetRegionRequest(Region, Rectangles), cookie)
return XfixesSetRegionCookie{cookie} return XfixesSetRegionCookie{cookie}
@ -1016,7 +1022,7 @@ func (cook XfixesSetRegionCookie) Check() error {
} }
// Write request to wire for XfixesSetRegion // Write request to wire for XfixesSetRegion
func (c *Conn) xfixesSetRegionRequest(Region Id, Rectangles []Rectangle) []byte { func (c *Conn) xfixesSetRegionRequest(Region XfixesRegion, Rectangles []Rectangle) []byte {
size := pad((8 + pad((len(Rectangles) * 8)))) size := pad((8 + pad((len(Rectangles) * 8))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1045,13 +1051,13 @@ type XfixesCopyRegionCookie struct {
} }
// Write request to wire for XfixesCopyRegion // Write request to wire for XfixesCopyRegion
func (c *Conn) XfixesCopyRegion(Source Id, Destination Id) XfixesCopyRegionCookie { func (c *Conn) XfixesCopyRegion(Source XfixesRegion, Destination XfixesRegion) XfixesCopyRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesCopyRegionRequest(Source, Destination), cookie) c.newRequest(c.xfixesCopyRegionRequest(Source, Destination), cookie)
return XfixesCopyRegionCookie{cookie} return XfixesCopyRegionCookie{cookie}
} }
func (c *Conn) XfixesCopyRegionChecked(Source Id, Destination Id) XfixesCopyRegionCookie { func (c *Conn) XfixesCopyRegionChecked(Source XfixesRegion, Destination XfixesRegion) XfixesCopyRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesCopyRegionRequest(Source, Destination), cookie) c.newRequest(c.xfixesCopyRegionRequest(Source, Destination), cookie)
return XfixesCopyRegionCookie{cookie} return XfixesCopyRegionCookie{cookie}
@ -1062,7 +1068,7 @@ func (cook XfixesCopyRegionCookie) Check() error {
} }
// Write request to wire for XfixesCopyRegion // Write request to wire for XfixesCopyRegion
func (c *Conn) xfixesCopyRegionRequest(Source Id, Destination Id) []byte { func (c *Conn) xfixesCopyRegionRequest(Source XfixesRegion, Destination XfixesRegion) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1092,13 +1098,13 @@ type XfixesUnionRegionCookie struct {
} }
// Write request to wire for XfixesUnionRegion // Write request to wire for XfixesUnionRegion
func (c *Conn) XfixesUnionRegion(Source1 Id, Source2 Id, Destination Id) XfixesUnionRegionCookie { func (c *Conn) XfixesUnionRegion(Source1 XfixesRegion, Source2 XfixesRegion, Destination XfixesRegion) XfixesUnionRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesUnionRegionRequest(Source1, Source2, Destination), cookie) c.newRequest(c.xfixesUnionRegionRequest(Source1, Source2, Destination), cookie)
return XfixesUnionRegionCookie{cookie} return XfixesUnionRegionCookie{cookie}
} }
func (c *Conn) XfixesUnionRegionChecked(Source1 Id, Source2 Id, Destination Id) XfixesUnionRegionCookie { func (c *Conn) XfixesUnionRegionChecked(Source1 XfixesRegion, Source2 XfixesRegion, Destination XfixesRegion) XfixesUnionRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesUnionRegionRequest(Source1, Source2, Destination), cookie) c.newRequest(c.xfixesUnionRegionRequest(Source1, Source2, Destination), cookie)
return XfixesUnionRegionCookie{cookie} return XfixesUnionRegionCookie{cookie}
@ -1109,7 +1115,7 @@ func (cook XfixesUnionRegionCookie) Check() error {
} }
// Write request to wire for XfixesUnionRegion // Write request to wire for XfixesUnionRegion
func (c *Conn) xfixesUnionRegionRequest(Source1 Id, Source2 Id, Destination Id) []byte { func (c *Conn) xfixesUnionRegionRequest(Source1 XfixesRegion, Source2 XfixesRegion, Destination XfixesRegion) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1142,13 +1148,13 @@ type XfixesIntersectRegionCookie struct {
} }
// Write request to wire for XfixesIntersectRegion // Write request to wire for XfixesIntersectRegion
func (c *Conn) XfixesIntersectRegion(Source1 Id, Source2 Id, Destination Id) XfixesIntersectRegionCookie { func (c *Conn) XfixesIntersectRegion(Source1 XfixesRegion, Source2 XfixesRegion, Destination XfixesRegion) XfixesIntersectRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesIntersectRegionRequest(Source1, Source2, Destination), cookie) c.newRequest(c.xfixesIntersectRegionRequest(Source1, Source2, Destination), cookie)
return XfixesIntersectRegionCookie{cookie} return XfixesIntersectRegionCookie{cookie}
} }
func (c *Conn) XfixesIntersectRegionChecked(Source1 Id, Source2 Id, Destination Id) XfixesIntersectRegionCookie { func (c *Conn) XfixesIntersectRegionChecked(Source1 XfixesRegion, Source2 XfixesRegion, Destination XfixesRegion) XfixesIntersectRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesIntersectRegionRequest(Source1, Source2, Destination), cookie) c.newRequest(c.xfixesIntersectRegionRequest(Source1, Source2, Destination), cookie)
return XfixesIntersectRegionCookie{cookie} return XfixesIntersectRegionCookie{cookie}
@ -1159,7 +1165,7 @@ func (cook XfixesIntersectRegionCookie) Check() error {
} }
// Write request to wire for XfixesIntersectRegion // Write request to wire for XfixesIntersectRegion
func (c *Conn) xfixesIntersectRegionRequest(Source1 Id, Source2 Id, Destination Id) []byte { func (c *Conn) xfixesIntersectRegionRequest(Source1 XfixesRegion, Source2 XfixesRegion, Destination XfixesRegion) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1192,13 +1198,13 @@ type XfixesSubtractRegionCookie struct {
} }
// Write request to wire for XfixesSubtractRegion // Write request to wire for XfixesSubtractRegion
func (c *Conn) XfixesSubtractRegion(Source1 Id, Source2 Id, Destination Id) XfixesSubtractRegionCookie { func (c *Conn) XfixesSubtractRegion(Source1 XfixesRegion, Source2 XfixesRegion, Destination XfixesRegion) XfixesSubtractRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesSubtractRegionRequest(Source1, Source2, Destination), cookie) c.newRequest(c.xfixesSubtractRegionRequest(Source1, Source2, Destination), cookie)
return XfixesSubtractRegionCookie{cookie} return XfixesSubtractRegionCookie{cookie}
} }
func (c *Conn) XfixesSubtractRegionChecked(Source1 Id, Source2 Id, Destination Id) XfixesSubtractRegionCookie { func (c *Conn) XfixesSubtractRegionChecked(Source1 XfixesRegion, Source2 XfixesRegion, Destination XfixesRegion) XfixesSubtractRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesSubtractRegionRequest(Source1, Source2, Destination), cookie) c.newRequest(c.xfixesSubtractRegionRequest(Source1, Source2, Destination), cookie)
return XfixesSubtractRegionCookie{cookie} return XfixesSubtractRegionCookie{cookie}
@ -1209,7 +1215,7 @@ func (cook XfixesSubtractRegionCookie) Check() error {
} }
// Write request to wire for XfixesSubtractRegion // Write request to wire for XfixesSubtractRegion
func (c *Conn) xfixesSubtractRegionRequest(Source1 Id, Source2 Id, Destination Id) []byte { func (c *Conn) xfixesSubtractRegionRequest(Source1 XfixesRegion, Source2 XfixesRegion, Destination XfixesRegion) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1242,13 +1248,13 @@ type XfixesInvertRegionCookie struct {
} }
// Write request to wire for XfixesInvertRegion // Write request to wire for XfixesInvertRegion
func (c *Conn) XfixesInvertRegion(Source Id, Bounds Rectangle, Destination Id) XfixesInvertRegionCookie { func (c *Conn) XfixesInvertRegion(Source XfixesRegion, Bounds Rectangle, Destination XfixesRegion) XfixesInvertRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesInvertRegionRequest(Source, Bounds, Destination), cookie) c.newRequest(c.xfixesInvertRegionRequest(Source, Bounds, Destination), cookie)
return XfixesInvertRegionCookie{cookie} return XfixesInvertRegionCookie{cookie}
} }
func (c *Conn) XfixesInvertRegionChecked(Source Id, Bounds Rectangle, Destination Id) XfixesInvertRegionCookie { func (c *Conn) XfixesInvertRegionChecked(Source XfixesRegion, Bounds Rectangle, Destination XfixesRegion) XfixesInvertRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesInvertRegionRequest(Source, Bounds, Destination), cookie) c.newRequest(c.xfixesInvertRegionRequest(Source, Bounds, Destination), cookie)
return XfixesInvertRegionCookie{cookie} return XfixesInvertRegionCookie{cookie}
@ -1259,7 +1265,7 @@ func (cook XfixesInvertRegionCookie) Check() error {
} }
// Write request to wire for XfixesInvertRegion // Write request to wire for XfixesInvertRegion
func (c *Conn) xfixesInvertRegionRequest(Source Id, Bounds Rectangle, Destination Id) []byte { func (c *Conn) xfixesInvertRegionRequest(Source XfixesRegion, Bounds Rectangle, Destination XfixesRegion) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1295,13 +1301,13 @@ type XfixesTranslateRegionCookie struct {
} }
// Write request to wire for XfixesTranslateRegion // Write request to wire for XfixesTranslateRegion
func (c *Conn) XfixesTranslateRegion(Region Id, Dx int16, Dy int16) XfixesTranslateRegionCookie { func (c *Conn) XfixesTranslateRegion(Region XfixesRegion, Dx int16, Dy int16) XfixesTranslateRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesTranslateRegionRequest(Region, Dx, Dy), cookie) c.newRequest(c.xfixesTranslateRegionRequest(Region, Dx, Dy), cookie)
return XfixesTranslateRegionCookie{cookie} return XfixesTranslateRegionCookie{cookie}
} }
func (c *Conn) XfixesTranslateRegionChecked(Region Id, Dx int16, Dy int16) XfixesTranslateRegionCookie { func (c *Conn) XfixesTranslateRegionChecked(Region XfixesRegion, Dx int16, Dy int16) XfixesTranslateRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesTranslateRegionRequest(Region, Dx, Dy), cookie) c.newRequest(c.xfixesTranslateRegionRequest(Region, Dx, Dy), cookie)
return XfixesTranslateRegionCookie{cookie} return XfixesTranslateRegionCookie{cookie}
@ -1312,7 +1318,7 @@ func (cook XfixesTranslateRegionCookie) Check() error {
} }
// Write request to wire for XfixesTranslateRegion // Write request to wire for XfixesTranslateRegion
func (c *Conn) xfixesTranslateRegionRequest(Region Id, Dx int16, Dy int16) []byte { func (c *Conn) xfixesTranslateRegionRequest(Region XfixesRegion, Dx int16, Dy int16) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1345,13 +1351,13 @@ type XfixesRegionExtentsCookie struct {
} }
// Write request to wire for XfixesRegionExtents // Write request to wire for XfixesRegionExtents
func (c *Conn) XfixesRegionExtents(Source Id, Destination Id) XfixesRegionExtentsCookie { func (c *Conn) XfixesRegionExtents(Source XfixesRegion, Destination XfixesRegion) XfixesRegionExtentsCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesRegionExtentsRequest(Source, Destination), cookie) c.newRequest(c.xfixesRegionExtentsRequest(Source, Destination), cookie)
return XfixesRegionExtentsCookie{cookie} return XfixesRegionExtentsCookie{cookie}
} }
func (c *Conn) XfixesRegionExtentsChecked(Source Id, Destination Id) XfixesRegionExtentsCookie { func (c *Conn) XfixesRegionExtentsChecked(Source XfixesRegion, Destination XfixesRegion) XfixesRegionExtentsCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesRegionExtentsRequest(Source, Destination), cookie) c.newRequest(c.xfixesRegionExtentsRequest(Source, Destination), cookie)
return XfixesRegionExtentsCookie{cookie} return XfixesRegionExtentsCookie{cookie}
@ -1362,7 +1368,7 @@ func (cook XfixesRegionExtentsCookie) Check() error {
} }
// Write request to wire for XfixesRegionExtents // Write request to wire for XfixesRegionExtents
func (c *Conn) xfixesRegionExtentsRequest(Source Id, Destination Id) []byte { func (c *Conn) xfixesRegionExtentsRequest(Source XfixesRegion, Destination XfixesRegion) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1391,13 +1397,13 @@ type XfixesFetchRegionCookie struct {
*cookie *cookie
} }
func (c *Conn) XfixesFetchRegion(Region Id) XfixesFetchRegionCookie { func (c *Conn) XfixesFetchRegion(Region XfixesRegion) XfixesFetchRegionCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xfixesFetchRegionRequest(Region), cookie) c.newRequest(c.xfixesFetchRegionRequest(Region), cookie)
return XfixesFetchRegionCookie{cookie} return XfixesFetchRegionCookie{cookie}
} }
func (c *Conn) XfixesFetchRegionUnchecked(Region Id) XfixesFetchRegionCookie { func (c *Conn) XfixesFetchRegionUnchecked(Region XfixesRegion) XfixesFetchRegionCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xfixesFetchRegionRequest(Region), cookie) c.newRequest(c.xfixesFetchRegionRequest(Region), cookie)
return XfixesFetchRegionCookie{cookie} return XfixesFetchRegionCookie{cookie}
@ -1455,7 +1461,7 @@ func (cook XfixesFetchRegionCookie) Check() error {
} }
// Write request to wire for XfixesFetchRegion // Write request to wire for XfixesFetchRegion
func (c *Conn) xfixesFetchRegionRequest(Region Id) []byte { func (c *Conn) xfixesFetchRegionRequest(Region XfixesRegion) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1482,13 +1488,13 @@ type XfixesSetGCClipRegionCookie struct {
} }
// Write request to wire for XfixesSetGCClipRegion // Write request to wire for XfixesSetGCClipRegion
func (c *Conn) XfixesSetGCClipRegion(Gc Id, Region Id, XOrigin int16, YOrigin int16) XfixesSetGCClipRegionCookie { func (c *Conn) XfixesSetGCClipRegion(Gc Gcontext, Region XfixesRegion, XOrigin int16, YOrigin int16) XfixesSetGCClipRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesSetGCClipRegionRequest(Gc, Region, XOrigin, YOrigin), cookie) c.newRequest(c.xfixesSetGCClipRegionRequest(Gc, Region, XOrigin, YOrigin), cookie)
return XfixesSetGCClipRegionCookie{cookie} return XfixesSetGCClipRegionCookie{cookie}
} }
func (c *Conn) XfixesSetGCClipRegionChecked(Gc Id, Region Id, XOrigin int16, YOrigin int16) XfixesSetGCClipRegionCookie { func (c *Conn) XfixesSetGCClipRegionChecked(Gc Gcontext, Region XfixesRegion, XOrigin int16, YOrigin int16) XfixesSetGCClipRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesSetGCClipRegionRequest(Gc, Region, XOrigin, YOrigin), cookie) c.newRequest(c.xfixesSetGCClipRegionRequest(Gc, Region, XOrigin, YOrigin), cookie)
return XfixesSetGCClipRegionCookie{cookie} return XfixesSetGCClipRegionCookie{cookie}
@ -1499,7 +1505,7 @@ func (cook XfixesSetGCClipRegionCookie) Check() error {
} }
// Write request to wire for XfixesSetGCClipRegion // Write request to wire for XfixesSetGCClipRegion
func (c *Conn) xfixesSetGCClipRegionRequest(Gc Id, Region Id, XOrigin int16, YOrigin int16) []byte { func (c *Conn) xfixesSetGCClipRegionRequest(Gc Gcontext, Region XfixesRegion, XOrigin int16, YOrigin int16) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1535,13 +1541,13 @@ type XfixesSetWindowShapeRegionCookie struct {
} }
// Write request to wire for XfixesSetWindowShapeRegion // Write request to wire for XfixesSetWindowShapeRegion
func (c *Conn) XfixesSetWindowShapeRegion(Dest Id, DestKind ShapeKind, XOffset int16, YOffset int16, Region Id) XfixesSetWindowShapeRegionCookie { func (c *Conn) XfixesSetWindowShapeRegion(Dest Window, DestKind ShapeKind, XOffset int16, YOffset int16, Region XfixesRegion) XfixesSetWindowShapeRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesSetWindowShapeRegionRequest(Dest, DestKind, XOffset, YOffset, Region), cookie) c.newRequest(c.xfixesSetWindowShapeRegionRequest(Dest, DestKind, XOffset, YOffset, Region), cookie)
return XfixesSetWindowShapeRegionCookie{cookie} return XfixesSetWindowShapeRegionCookie{cookie}
} }
func (c *Conn) XfixesSetWindowShapeRegionChecked(Dest Id, DestKind ShapeKind, XOffset int16, YOffset int16, Region Id) XfixesSetWindowShapeRegionCookie { func (c *Conn) XfixesSetWindowShapeRegionChecked(Dest Window, DestKind ShapeKind, XOffset int16, YOffset int16, Region XfixesRegion) XfixesSetWindowShapeRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesSetWindowShapeRegionRequest(Dest, DestKind, XOffset, YOffset, Region), cookie) c.newRequest(c.xfixesSetWindowShapeRegionRequest(Dest, DestKind, XOffset, YOffset, Region), cookie)
return XfixesSetWindowShapeRegionCookie{cookie} return XfixesSetWindowShapeRegionCookie{cookie}
@ -1552,7 +1558,7 @@ func (cook XfixesSetWindowShapeRegionCookie) Check() error {
} }
// Write request to wire for XfixesSetWindowShapeRegion // Write request to wire for XfixesSetWindowShapeRegion
func (c *Conn) xfixesSetWindowShapeRegionRequest(Dest Id, DestKind ShapeKind, XOffset int16, YOffset int16, Region Id) []byte { func (c *Conn) xfixesSetWindowShapeRegionRequest(Dest Window, DestKind ShapeKind, XOffset int16, YOffset int16, Region XfixesRegion) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1593,13 +1599,13 @@ type XfixesSetPictureClipRegionCookie struct {
} }
// Write request to wire for XfixesSetPictureClipRegion // Write request to wire for XfixesSetPictureClipRegion
func (c *Conn) XfixesSetPictureClipRegion(Picture Id, Region Id, XOrigin int16, YOrigin int16) XfixesSetPictureClipRegionCookie { func (c *Conn) XfixesSetPictureClipRegion(Picture RenderPicture, Region XfixesRegion, XOrigin int16, YOrigin int16) XfixesSetPictureClipRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesSetPictureClipRegionRequest(Picture, Region, XOrigin, YOrigin), cookie) c.newRequest(c.xfixesSetPictureClipRegionRequest(Picture, Region, XOrigin, YOrigin), cookie)
return XfixesSetPictureClipRegionCookie{cookie} return XfixesSetPictureClipRegionCookie{cookie}
} }
func (c *Conn) XfixesSetPictureClipRegionChecked(Picture Id, Region Id, XOrigin int16, YOrigin int16) XfixesSetPictureClipRegionCookie { func (c *Conn) XfixesSetPictureClipRegionChecked(Picture RenderPicture, Region XfixesRegion, XOrigin int16, YOrigin int16) XfixesSetPictureClipRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesSetPictureClipRegionRequest(Picture, Region, XOrigin, YOrigin), cookie) c.newRequest(c.xfixesSetPictureClipRegionRequest(Picture, Region, XOrigin, YOrigin), cookie)
return XfixesSetPictureClipRegionCookie{cookie} return XfixesSetPictureClipRegionCookie{cookie}
@ -1610,7 +1616,7 @@ func (cook XfixesSetPictureClipRegionCookie) Check() error {
} }
// Write request to wire for XfixesSetPictureClipRegion // Write request to wire for XfixesSetPictureClipRegion
func (c *Conn) xfixesSetPictureClipRegionRequest(Picture Id, Region Id, XOrigin int16, YOrigin int16) []byte { func (c *Conn) xfixesSetPictureClipRegionRequest(Picture RenderPicture, Region XfixesRegion, XOrigin int16, YOrigin int16) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1646,13 +1652,13 @@ type XfixesSetCursorNameCookie struct {
} }
// Write request to wire for XfixesSetCursorName // Write request to wire for XfixesSetCursorName
func (c *Conn) XfixesSetCursorName(Cursor Id, Nbytes uint16, Name string) XfixesSetCursorNameCookie { func (c *Conn) XfixesSetCursorName(Cursor Cursor, Nbytes uint16, Name string) XfixesSetCursorNameCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesSetCursorNameRequest(Cursor, Nbytes, Name), cookie) c.newRequest(c.xfixesSetCursorNameRequest(Cursor, Nbytes, Name), cookie)
return XfixesSetCursorNameCookie{cookie} return XfixesSetCursorNameCookie{cookie}
} }
func (c *Conn) XfixesSetCursorNameChecked(Cursor Id, Nbytes uint16, Name string) XfixesSetCursorNameCookie { func (c *Conn) XfixesSetCursorNameChecked(Cursor Cursor, Nbytes uint16, Name string) XfixesSetCursorNameCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesSetCursorNameRequest(Cursor, Nbytes, Name), cookie) c.newRequest(c.xfixesSetCursorNameRequest(Cursor, Nbytes, Name), cookie)
return XfixesSetCursorNameCookie{cookie} return XfixesSetCursorNameCookie{cookie}
@ -1663,7 +1669,7 @@ func (cook XfixesSetCursorNameCookie) Check() error {
} }
// Write request to wire for XfixesSetCursorName // Write request to wire for XfixesSetCursorName
func (c *Conn) xfixesSetCursorNameRequest(Cursor Id, Nbytes uint16, Name string) []byte { func (c *Conn) xfixesSetCursorNameRequest(Cursor Cursor, Nbytes uint16, Name string) []byte {
size := pad((12 + pad((int(Nbytes) * 1)))) size := pad((12 + pad((int(Nbytes) * 1))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1697,13 +1703,13 @@ type XfixesGetCursorNameCookie struct {
*cookie *cookie
} }
func (c *Conn) XfixesGetCursorName(Cursor Id) XfixesGetCursorNameCookie { func (c *Conn) XfixesGetCursorName(Cursor Cursor) XfixesGetCursorNameCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xfixesGetCursorNameRequest(Cursor), cookie) c.newRequest(c.xfixesGetCursorNameRequest(Cursor), cookie)
return XfixesGetCursorNameCookie{cookie} return XfixesGetCursorNameCookie{cookie}
} }
func (c *Conn) XfixesGetCursorNameUnchecked(Cursor Id) XfixesGetCursorNameCookie { func (c *Conn) XfixesGetCursorNameUnchecked(Cursor Cursor) XfixesGetCursorNameCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xfixesGetCursorNameRequest(Cursor), cookie) c.newRequest(c.xfixesGetCursorNameRequest(Cursor), cookie)
return XfixesGetCursorNameCookie{cookie} return XfixesGetCursorNameCookie{cookie}
@ -1715,7 +1721,7 @@ type XfixesGetCursorNameReply struct {
Sequence uint16 Sequence uint16
Length uint32 Length uint32
// padding: 1 bytes // padding: 1 bytes
Atom Id Atom Atom
Nbytes uint16 Nbytes uint16
// padding: 18 bytes // padding: 18 bytes
Name string // size: pad((int(Nbytes) * 1)) Name string // size: pad((int(Nbytes) * 1))
@ -1746,7 +1752,7 @@ func xfixesGetCursorNameReply(buf []byte) *XfixesGetCursorNameReply {
v.Length = Get32(buf[b:]) // 4-byte units v.Length = Get32(buf[b:]) // 4-byte units
b += 4 b += 4
v.Atom = Id(Get32(buf[b:])) v.Atom = Atom(Get32(buf[b:]))
b += 4 b += 4
v.Nbytes = Get16(buf[b:]) v.Nbytes = Get16(buf[b:])
@ -1769,7 +1775,7 @@ func (cook XfixesGetCursorNameCookie) Check() error {
} }
// Write request to wire for XfixesGetCursorName // Write request to wire for XfixesGetCursorName
func (c *Conn) xfixesGetCursorNameRequest(Cursor Id) []byte { func (c *Conn) xfixesGetCursorNameRequest(Cursor Cursor) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1820,7 +1826,7 @@ type XfixesGetCursorImageAndNameReply struct {
Xhot uint16 Xhot uint16
Yhot uint16 Yhot uint16
CursorSerial uint32 CursorSerial uint32
CursorAtom Id CursorAtom Atom
Nbytes uint16 Nbytes uint16
// padding: 2 bytes // padding: 2 bytes
Name string // size: pad((int(Nbytes) * 1)) Name string // size: pad((int(Nbytes) * 1))
@ -1873,7 +1879,7 @@ func xfixesGetCursorImageAndNameReply(buf []byte) *XfixesGetCursorImageAndNameRe
v.CursorSerial = Get32(buf[b:]) v.CursorSerial = Get32(buf[b:])
b += 4 b += 4
v.CursorAtom = Id(Get32(buf[b:])) v.CursorAtom = Atom(Get32(buf[b:]))
b += 4 b += 4
v.Nbytes = Get16(buf[b:]) v.Nbytes = Get16(buf[b:])
@ -1927,13 +1933,13 @@ type XfixesChangeCursorCookie struct {
} }
// Write request to wire for XfixesChangeCursor // Write request to wire for XfixesChangeCursor
func (c *Conn) XfixesChangeCursor(Source Id, Destination Id) XfixesChangeCursorCookie { func (c *Conn) XfixesChangeCursor(Source Cursor, Destination Cursor) XfixesChangeCursorCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesChangeCursorRequest(Source, Destination), cookie) c.newRequest(c.xfixesChangeCursorRequest(Source, Destination), cookie)
return XfixesChangeCursorCookie{cookie} return XfixesChangeCursorCookie{cookie}
} }
func (c *Conn) XfixesChangeCursorChecked(Source Id, Destination Id) XfixesChangeCursorCookie { func (c *Conn) XfixesChangeCursorChecked(Source Cursor, Destination Cursor) XfixesChangeCursorCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesChangeCursorRequest(Source, Destination), cookie) c.newRequest(c.xfixesChangeCursorRequest(Source, Destination), cookie)
return XfixesChangeCursorCookie{cookie} return XfixesChangeCursorCookie{cookie}
@ -1944,7 +1950,7 @@ func (cook XfixesChangeCursorCookie) Check() error {
} }
// Write request to wire for XfixesChangeCursor // Write request to wire for XfixesChangeCursor
func (c *Conn) xfixesChangeCursorRequest(Source Id, Destination Id) []byte { func (c *Conn) xfixesChangeCursorRequest(Source Cursor, Destination Cursor) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1974,13 +1980,13 @@ type XfixesChangeCursorByNameCookie struct {
} }
// Write request to wire for XfixesChangeCursorByName // Write request to wire for XfixesChangeCursorByName
func (c *Conn) XfixesChangeCursorByName(Src Id, Nbytes uint16, Name string) XfixesChangeCursorByNameCookie { func (c *Conn) XfixesChangeCursorByName(Src Cursor, Nbytes uint16, Name string) XfixesChangeCursorByNameCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesChangeCursorByNameRequest(Src, Nbytes, Name), cookie) c.newRequest(c.xfixesChangeCursorByNameRequest(Src, Nbytes, Name), cookie)
return XfixesChangeCursorByNameCookie{cookie} return XfixesChangeCursorByNameCookie{cookie}
} }
func (c *Conn) XfixesChangeCursorByNameChecked(Src Id, Nbytes uint16, Name string) XfixesChangeCursorByNameCookie { func (c *Conn) XfixesChangeCursorByNameChecked(Src Cursor, Nbytes uint16, Name string) XfixesChangeCursorByNameCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesChangeCursorByNameRequest(Src, Nbytes, Name), cookie) c.newRequest(c.xfixesChangeCursorByNameRequest(Src, Nbytes, Name), cookie)
return XfixesChangeCursorByNameCookie{cookie} return XfixesChangeCursorByNameCookie{cookie}
@ -1991,7 +1997,7 @@ func (cook XfixesChangeCursorByNameCookie) Check() error {
} }
// Write request to wire for XfixesChangeCursorByName // Write request to wire for XfixesChangeCursorByName
func (c *Conn) xfixesChangeCursorByNameRequest(Src Id, Nbytes uint16, Name string) []byte { func (c *Conn) xfixesChangeCursorByNameRequest(Src Cursor, Nbytes uint16, Name string) []byte {
size := pad((12 + pad((int(Nbytes) * 1)))) size := pad((12 + pad((int(Nbytes) * 1))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2026,13 +2032,13 @@ type XfixesExpandRegionCookie struct {
} }
// Write request to wire for XfixesExpandRegion // Write request to wire for XfixesExpandRegion
func (c *Conn) XfixesExpandRegion(Source Id, Destination Id, Left uint16, Right uint16, Top uint16, Bottom uint16) XfixesExpandRegionCookie { func (c *Conn) XfixesExpandRegion(Source XfixesRegion, Destination XfixesRegion, Left uint16, Right uint16, Top uint16, Bottom uint16) XfixesExpandRegionCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesExpandRegionRequest(Source, Destination, Left, Right, Top, Bottom), cookie) c.newRequest(c.xfixesExpandRegionRequest(Source, Destination, Left, Right, Top, Bottom), cookie)
return XfixesExpandRegionCookie{cookie} return XfixesExpandRegionCookie{cookie}
} }
func (c *Conn) XfixesExpandRegionChecked(Source Id, Destination Id, Left uint16, Right uint16, Top uint16, Bottom uint16) XfixesExpandRegionCookie { func (c *Conn) XfixesExpandRegionChecked(Source XfixesRegion, Destination XfixesRegion, Left uint16, Right uint16, Top uint16, Bottom uint16) XfixesExpandRegionCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesExpandRegionRequest(Source, Destination, Left, Right, Top, Bottom), cookie) c.newRequest(c.xfixesExpandRegionRequest(Source, Destination, Left, Right, Top, Bottom), cookie)
return XfixesExpandRegionCookie{cookie} return XfixesExpandRegionCookie{cookie}
@ -2043,7 +2049,7 @@ func (cook XfixesExpandRegionCookie) Check() error {
} }
// Write request to wire for XfixesExpandRegion // Write request to wire for XfixesExpandRegion
func (c *Conn) xfixesExpandRegionRequest(Source Id, Destination Id, Left uint16, Right uint16, Top uint16, Bottom uint16) []byte { func (c *Conn) xfixesExpandRegionRequest(Source XfixesRegion, Destination XfixesRegion, Left uint16, Right uint16, Top uint16, Bottom uint16) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2085,13 +2091,13 @@ type XfixesHideCursorCookie struct {
} }
// Write request to wire for XfixesHideCursor // Write request to wire for XfixesHideCursor
func (c *Conn) XfixesHideCursor(Window Id) XfixesHideCursorCookie { func (c *Conn) XfixesHideCursor(Window Window) XfixesHideCursorCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesHideCursorRequest(Window), cookie) c.newRequest(c.xfixesHideCursorRequest(Window), cookie)
return XfixesHideCursorCookie{cookie} return XfixesHideCursorCookie{cookie}
} }
func (c *Conn) XfixesHideCursorChecked(Window Id) XfixesHideCursorCookie { func (c *Conn) XfixesHideCursorChecked(Window Window) XfixesHideCursorCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesHideCursorRequest(Window), cookie) c.newRequest(c.xfixesHideCursorRequest(Window), cookie)
return XfixesHideCursorCookie{cookie} return XfixesHideCursorCookie{cookie}
@ -2102,7 +2108,7 @@ func (cook XfixesHideCursorCookie) Check() error {
} }
// Write request to wire for XfixesHideCursor // Write request to wire for XfixesHideCursor
func (c *Conn) xfixesHideCursorRequest(Window Id) []byte { func (c *Conn) xfixesHideCursorRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2129,13 +2135,13 @@ type XfixesShowCursorCookie struct {
} }
// Write request to wire for XfixesShowCursor // Write request to wire for XfixesShowCursor
func (c *Conn) XfixesShowCursor(Window Id) XfixesShowCursorCookie { func (c *Conn) XfixesShowCursor(Window Window) XfixesShowCursorCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xfixesShowCursorRequest(Window), cookie) c.newRequest(c.xfixesShowCursorRequest(Window), cookie)
return XfixesShowCursorCookie{cookie} return XfixesShowCursorCookie{cookie}
} }
func (c *Conn) XfixesShowCursorChecked(Window Id) XfixesShowCursorCookie { func (c *Conn) XfixesShowCursorChecked(Window Window) XfixesShowCursorCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xfixesShowCursorRequest(Window), cookie) c.newRequest(c.xfixesShowCursorRequest(Window), cookie)
return XfixesShowCursorCookie{cookie} return XfixesShowCursorCookie{cookie}
@ -2146,7 +2152,7 @@ func (cook XfixesShowCursorCookie) Check() error {
} }
// Write request to wire for XfixesShowCursor // Write request to wire for XfixesShowCursor
func (c *Conn) xfixesShowCursorRequest(Window Id) []byte { func (c *Conn) xfixesShowCursorRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xinerama.xml on May 8 2012 11:03:24pm EDT. This file was generated by xinerama.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,14 +37,6 @@ func init() {
newExtErrorFuncs["XINERAMA"] = make(map[int]newErrorFun) newExtErrorFuncs["XINERAMA"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8' // Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
@ -59,10 +51,16 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// 'XineramaScreenInfo' struct definition // 'XineramaScreenInfo' struct definition
// Size: 8 // Size: 8
type XineramaScreenInfo struct { type XineramaScreenInfo struct {
@ -229,13 +227,13 @@ type XineramaGetStateCookie struct {
*cookie *cookie
} }
func (c *Conn) XineramaGetState(Window Id) XineramaGetStateCookie { func (c *Conn) XineramaGetState(Window Window) XineramaGetStateCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xineramaGetStateRequest(Window), cookie) c.newRequest(c.xineramaGetStateRequest(Window), cookie)
return XineramaGetStateCookie{cookie} return XineramaGetStateCookie{cookie}
} }
func (c *Conn) XineramaGetStateUnchecked(Window Id) XineramaGetStateCookie { func (c *Conn) XineramaGetStateUnchecked(Window Window) XineramaGetStateCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xineramaGetStateRequest(Window), cookie) c.newRequest(c.xineramaGetStateRequest(Window), cookie)
return XineramaGetStateCookie{cookie} return XineramaGetStateCookie{cookie}
@ -247,7 +245,7 @@ type XineramaGetStateReply struct {
Sequence uint16 Sequence uint16
Length uint32 Length uint32
State byte State byte
Window Id Window Window
} }
// Waits and reads reply data from request XineramaGetState // Waits and reads reply data from request XineramaGetState
@ -276,7 +274,7 @@ func xineramaGetStateReply(buf []byte) *XineramaGetStateReply {
v.Length = Get32(buf[b:]) // 4-byte units v.Length = Get32(buf[b:]) // 4-byte units
b += 4 b += 4
v.Window = Id(Get32(buf[b:])) v.Window = Window(Get32(buf[b:]))
b += 4 b += 4
return v return v
@ -287,7 +285,7 @@ func (cook XineramaGetStateCookie) Check() error {
} }
// Write request to wire for XineramaGetState // Write request to wire for XineramaGetState
func (c *Conn) xineramaGetStateRequest(Window Id) []byte { func (c *Conn) xineramaGetStateRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -313,13 +311,13 @@ type XineramaGetScreenCountCookie struct {
*cookie *cookie
} }
func (c *Conn) XineramaGetScreenCount(Window Id) XineramaGetScreenCountCookie { func (c *Conn) XineramaGetScreenCount(Window Window) XineramaGetScreenCountCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xineramaGetScreenCountRequest(Window), cookie) c.newRequest(c.xineramaGetScreenCountRequest(Window), cookie)
return XineramaGetScreenCountCookie{cookie} return XineramaGetScreenCountCookie{cookie}
} }
func (c *Conn) XineramaGetScreenCountUnchecked(Window Id) XineramaGetScreenCountCookie { func (c *Conn) XineramaGetScreenCountUnchecked(Window Window) XineramaGetScreenCountCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xineramaGetScreenCountRequest(Window), cookie) c.newRequest(c.xineramaGetScreenCountRequest(Window), cookie)
return XineramaGetScreenCountCookie{cookie} return XineramaGetScreenCountCookie{cookie}
@ -331,7 +329,7 @@ type XineramaGetScreenCountReply struct {
Sequence uint16 Sequence uint16
Length uint32 Length uint32
ScreenCount byte ScreenCount byte
Window Id Window Window
} }
// Waits and reads reply data from request XineramaGetScreenCount // Waits and reads reply data from request XineramaGetScreenCount
@ -360,7 +358,7 @@ func xineramaGetScreenCountReply(buf []byte) *XineramaGetScreenCountReply {
v.Length = Get32(buf[b:]) // 4-byte units v.Length = Get32(buf[b:]) // 4-byte units
b += 4 b += 4
v.Window = Id(Get32(buf[b:])) v.Window = Window(Get32(buf[b:]))
b += 4 b += 4
return v return v
@ -371,7 +369,7 @@ func (cook XineramaGetScreenCountCookie) Check() error {
} }
// Write request to wire for XineramaGetScreenCount // Write request to wire for XineramaGetScreenCount
func (c *Conn) xineramaGetScreenCountRequest(Window Id) []byte { func (c *Conn) xineramaGetScreenCountRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -397,13 +395,13 @@ type XineramaGetScreenSizeCookie struct {
*cookie *cookie
} }
func (c *Conn) XineramaGetScreenSize(Window Id, Screen uint32) XineramaGetScreenSizeCookie { func (c *Conn) XineramaGetScreenSize(Window Window, Screen uint32) XineramaGetScreenSizeCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xineramaGetScreenSizeRequest(Window, Screen), cookie) c.newRequest(c.xineramaGetScreenSizeRequest(Window, Screen), cookie)
return XineramaGetScreenSizeCookie{cookie} return XineramaGetScreenSizeCookie{cookie}
} }
func (c *Conn) XineramaGetScreenSizeUnchecked(Window Id, Screen uint32) XineramaGetScreenSizeCookie { func (c *Conn) XineramaGetScreenSizeUnchecked(Window Window, Screen uint32) XineramaGetScreenSizeCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xineramaGetScreenSizeRequest(Window, Screen), cookie) c.newRequest(c.xineramaGetScreenSizeRequest(Window, Screen), cookie)
return XineramaGetScreenSizeCookie{cookie} return XineramaGetScreenSizeCookie{cookie}
@ -417,7 +415,7 @@ type XineramaGetScreenSizeReply struct {
// padding: 1 bytes // padding: 1 bytes
Width uint32 Width uint32
Height uint32 Height uint32
Window Id Window Window
Screen uint32 Screen uint32
} }
@ -452,7 +450,7 @@ func xineramaGetScreenSizeReply(buf []byte) *XineramaGetScreenSizeReply {
v.Height = Get32(buf[b:]) v.Height = Get32(buf[b:])
b += 4 b += 4
v.Window = Id(Get32(buf[b:])) v.Window = Window(Get32(buf[b:]))
b += 4 b += 4
v.Screen = Get32(buf[b:]) v.Screen = Get32(buf[b:])
@ -466,7 +464,7 @@ func (cook XineramaGetScreenSizeCookie) Check() error {
} }
// Write request to wire for XineramaGetScreenSize // Write request to wire for XineramaGetScreenSize
func (c *Conn) xineramaGetScreenSizeRequest(Window Id, Screen uint32) []byte { func (c *Conn) xineramaGetScreenSizeRequest(Window Window, Screen uint32) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xinput.xml on May 8 2012 11:03:24pm EDT. This file was generated by xinput.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,6 +37,10 @@ func init() {
newExtErrorFuncs["XInputExtension"] = make(map[int]newErrorFun) newExtErrorFuncs["XInputExtension"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void' // Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte' // Skipping definition for base type 'Byte'
@ -55,14 +59,8 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
const ( const (
XinputValuatorModeRelative = 0 XinputValuatorModeRelative = 0
XinputValuatorModeAbsolute = 1 XinputValuatorModeAbsolute = 1
@ -116,7 +114,7 @@ type XinputEventClass uint32
// 'XinputDeviceInfo' struct definition // 'XinputDeviceInfo' struct definition
// Size: 8 // Size: 8
type XinputDeviceInfo struct { type XinputDeviceInfo struct {
DeviceType Id DeviceType Atom
DeviceId byte DeviceId byte
NumClassInfo byte NumClassInfo byte
DeviceUse byte DeviceUse byte
@ -127,7 +125,7 @@ type XinputDeviceInfo struct {
func ReadXinputDeviceInfo(buf []byte, v *XinputDeviceInfo) int { func ReadXinputDeviceInfo(buf []byte, v *XinputDeviceInfo) int {
b := 0 b := 0
v.DeviceType = Id(Get32(buf[b:])) v.DeviceType = Atom(Get32(buf[b:]))
b += 4 b += 4
v.DeviceId = buf[b] v.DeviceId = buf[b]
@ -3347,9 +3345,9 @@ type XinputDeviceKeyPressEvent struct {
Sequence uint16 Sequence uint16
Detail byte Detail byte
Time Timestamp Time Timestamp
Root Id Root Window
Event Id Event Window
Child Id Child Window
RootX int16 RootX int16
RootY int16 RootY int16
EventX int16 EventX int16
@ -3373,13 +3371,13 @@ func NewXinputDeviceKeyPressEvent(buf []byte) Event {
v.Time = Timestamp(Get32(buf[b:])) v.Time = Timestamp(Get32(buf[b:]))
b += 4 b += 4
v.Root = Id(Get32(buf[b:])) v.Root = Window(Get32(buf[b:]))
b += 4 b += 4
v.Event = Id(Get32(buf[b:])) v.Event = Window(Get32(buf[b:]))
b += 4 b += 4
v.Child = Id(Get32(buf[b:])) v.Child = Window(Get32(buf[b:]))
b += 4 b += 4
v.RootX = int16(Get16(buf[b:])) v.RootX = int16(Get16(buf[b:]))
@ -3501,7 +3499,7 @@ type XinputFocusInEvent struct {
Sequence uint16 Sequence uint16
Detail byte Detail byte
Time Timestamp Time Timestamp
Window Id Window Window
Mode byte Mode byte
DeviceId byte DeviceId byte
// padding: 18 bytes // padding: 18 bytes
@ -3521,7 +3519,7 @@ func NewXinputFocusInEvent(buf []byte) Event {
v.Time = Timestamp(Get32(buf[b:])) v.Time = Timestamp(Get32(buf[b:]))
b += 4 b += 4
v.Window = Id(Get32(buf[b:])) v.Window = Window(Get32(buf[b:]))
b += 4 b += 4
v.Mode = buf[b] v.Mode = buf[b]
@ -4435,7 +4433,7 @@ func (err XinputDeviceError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XinputDeviceError) BadId() Id { func (err XinputDeviceError) BadId() uint32 {
return 0 return 0
} }
@ -4480,7 +4478,7 @@ func (err XinputEventError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XinputEventError) BadId() Id { func (err XinputEventError) BadId() uint32 {
return 0 return 0
} }
@ -4525,7 +4523,7 @@ func (err XinputModeError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XinputModeError) BadId() Id { func (err XinputModeError) BadId() uint32 {
return 0 return 0
} }
@ -4570,7 +4568,7 @@ func (err XinputDeviceBusyError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XinputDeviceBusyError) BadId() Id { func (err XinputDeviceBusyError) BadId() uint32 {
return 0 return 0
} }
@ -4615,7 +4613,7 @@ func (err XinputClassError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XinputClassError) BadId() Id { func (err XinputClassError) BadId() uint32 {
return 0 return 0
} }
@ -5056,13 +5054,13 @@ type XinputSelectExtensionEventCookie struct {
} }
// Write request to wire for XinputSelectExtensionEvent // Write request to wire for XinputSelectExtensionEvent
func (c *Conn) XinputSelectExtensionEvent(Window Id, NumClasses uint16, Classes []XinputEventClass) XinputSelectExtensionEventCookie { func (c *Conn) XinputSelectExtensionEvent(Window Window, NumClasses uint16, Classes []XinputEventClass) XinputSelectExtensionEventCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xinputSelectExtensionEventRequest(Window, NumClasses, Classes), cookie) c.newRequest(c.xinputSelectExtensionEventRequest(Window, NumClasses, Classes), cookie)
return XinputSelectExtensionEventCookie{cookie} return XinputSelectExtensionEventCookie{cookie}
} }
func (c *Conn) XinputSelectExtensionEventChecked(Window Id, NumClasses uint16, Classes []XinputEventClass) XinputSelectExtensionEventCookie { func (c *Conn) XinputSelectExtensionEventChecked(Window Window, NumClasses uint16, Classes []XinputEventClass) XinputSelectExtensionEventCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xinputSelectExtensionEventRequest(Window, NumClasses, Classes), cookie) c.newRequest(c.xinputSelectExtensionEventRequest(Window, NumClasses, Classes), cookie)
return XinputSelectExtensionEventCookie{cookie} return XinputSelectExtensionEventCookie{cookie}
@ -5073,7 +5071,7 @@ func (cook XinputSelectExtensionEventCookie) Check() error {
} }
// Write request to wire for XinputSelectExtensionEvent // Write request to wire for XinputSelectExtensionEvent
func (c *Conn) xinputSelectExtensionEventRequest(Window Id, NumClasses uint16, Classes []XinputEventClass) []byte { func (c *Conn) xinputSelectExtensionEventRequest(Window Window, NumClasses uint16, Classes []XinputEventClass) []byte {
size := pad((12 + pad((int(NumClasses) * 4)))) size := pad((12 + pad((int(NumClasses) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -5110,13 +5108,13 @@ type XinputGetSelectedExtensionEventsCookie struct {
*cookie *cookie
} }
func (c *Conn) XinputGetSelectedExtensionEvents(Window Id) XinputGetSelectedExtensionEventsCookie { func (c *Conn) XinputGetSelectedExtensionEvents(Window Window) XinputGetSelectedExtensionEventsCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xinputGetSelectedExtensionEventsRequest(Window), cookie) c.newRequest(c.xinputGetSelectedExtensionEventsRequest(Window), cookie)
return XinputGetSelectedExtensionEventsCookie{cookie} return XinputGetSelectedExtensionEventsCookie{cookie}
} }
func (c *Conn) XinputGetSelectedExtensionEventsUnchecked(Window Id) XinputGetSelectedExtensionEventsCookie { func (c *Conn) XinputGetSelectedExtensionEventsUnchecked(Window Window) XinputGetSelectedExtensionEventsCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xinputGetSelectedExtensionEventsRequest(Window), cookie) c.newRequest(c.xinputGetSelectedExtensionEventsRequest(Window), cookie)
return XinputGetSelectedExtensionEventsCookie{cookie} return XinputGetSelectedExtensionEventsCookie{cookie}
@ -5190,7 +5188,7 @@ func (cook XinputGetSelectedExtensionEventsCookie) Check() error {
} }
// Write request to wire for XinputGetSelectedExtensionEvents // Write request to wire for XinputGetSelectedExtensionEvents
func (c *Conn) xinputGetSelectedExtensionEventsRequest(Window Id) []byte { func (c *Conn) xinputGetSelectedExtensionEventsRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -5217,13 +5215,13 @@ type XinputChangeDeviceDontPropagateListCookie struct {
} }
// Write request to wire for XinputChangeDeviceDontPropagateList // Write request to wire for XinputChangeDeviceDontPropagateList
func (c *Conn) XinputChangeDeviceDontPropagateList(Window Id, NumClasses uint16, Mode byte, Classes []XinputEventClass) XinputChangeDeviceDontPropagateListCookie { func (c *Conn) XinputChangeDeviceDontPropagateList(Window Window, NumClasses uint16, Mode byte, Classes []XinputEventClass) XinputChangeDeviceDontPropagateListCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xinputChangeDeviceDontPropagateListRequest(Window, NumClasses, Mode, Classes), cookie) c.newRequest(c.xinputChangeDeviceDontPropagateListRequest(Window, NumClasses, Mode, Classes), cookie)
return XinputChangeDeviceDontPropagateListCookie{cookie} return XinputChangeDeviceDontPropagateListCookie{cookie}
} }
func (c *Conn) XinputChangeDeviceDontPropagateListChecked(Window Id, NumClasses uint16, Mode byte, Classes []XinputEventClass) XinputChangeDeviceDontPropagateListCookie { func (c *Conn) XinputChangeDeviceDontPropagateListChecked(Window Window, NumClasses uint16, Mode byte, Classes []XinputEventClass) XinputChangeDeviceDontPropagateListCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xinputChangeDeviceDontPropagateListRequest(Window, NumClasses, Mode, Classes), cookie) c.newRequest(c.xinputChangeDeviceDontPropagateListRequest(Window, NumClasses, Mode, Classes), cookie)
return XinputChangeDeviceDontPropagateListCookie{cookie} return XinputChangeDeviceDontPropagateListCookie{cookie}
@ -5234,7 +5232,7 @@ func (cook XinputChangeDeviceDontPropagateListCookie) Check() error {
} }
// Write request to wire for XinputChangeDeviceDontPropagateList // Write request to wire for XinputChangeDeviceDontPropagateList
func (c *Conn) xinputChangeDeviceDontPropagateListRequest(Window Id, NumClasses uint16, Mode byte, Classes []XinputEventClass) []byte { func (c *Conn) xinputChangeDeviceDontPropagateListRequest(Window Window, NumClasses uint16, Mode byte, Classes []XinputEventClass) []byte {
size := pad((12 + pad((int(NumClasses) * 4)))) size := pad((12 + pad((int(NumClasses) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -5274,13 +5272,13 @@ type XinputGetDeviceDontPropagateListCookie struct {
*cookie *cookie
} }
func (c *Conn) XinputGetDeviceDontPropagateList(Window Id) XinputGetDeviceDontPropagateListCookie { func (c *Conn) XinputGetDeviceDontPropagateList(Window Window) XinputGetDeviceDontPropagateListCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xinputGetDeviceDontPropagateListRequest(Window), cookie) c.newRequest(c.xinputGetDeviceDontPropagateListRequest(Window), cookie)
return XinputGetDeviceDontPropagateListCookie{cookie} return XinputGetDeviceDontPropagateListCookie{cookie}
} }
func (c *Conn) XinputGetDeviceDontPropagateListUnchecked(Window Id) XinputGetDeviceDontPropagateListCookie { func (c *Conn) XinputGetDeviceDontPropagateListUnchecked(Window Window) XinputGetDeviceDontPropagateListCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xinputGetDeviceDontPropagateListRequest(Window), cookie) c.newRequest(c.xinputGetDeviceDontPropagateListRequest(Window), cookie)
return XinputGetDeviceDontPropagateListCookie{cookie} return XinputGetDeviceDontPropagateListCookie{cookie}
@ -5342,7 +5340,7 @@ func (cook XinputGetDeviceDontPropagateListCookie) Check() error {
} }
// Write request to wire for XinputGetDeviceDontPropagateList // Write request to wire for XinputGetDeviceDontPropagateList
func (c *Conn) xinputGetDeviceDontPropagateListRequest(Window Id) []byte { func (c *Conn) xinputGetDeviceDontPropagateListRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -5650,13 +5648,13 @@ type XinputGrabDeviceCookie struct {
*cookie *cookie
} }
func (c *Conn) XinputGrabDevice(GrabWindow Id, Time Timestamp, NumClasses uint16, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, DeviceId byte, Classes []XinputEventClass) XinputGrabDeviceCookie { func (c *Conn) XinputGrabDevice(GrabWindow Window, Time Timestamp, NumClasses uint16, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, DeviceId byte, Classes []XinputEventClass) XinputGrabDeviceCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xinputGrabDeviceRequest(GrabWindow, Time, NumClasses, ThisDeviceMode, OtherDeviceMode, OwnerEvents, DeviceId, Classes), cookie) c.newRequest(c.xinputGrabDeviceRequest(GrabWindow, Time, NumClasses, ThisDeviceMode, OtherDeviceMode, OwnerEvents, DeviceId, Classes), cookie)
return XinputGrabDeviceCookie{cookie} return XinputGrabDeviceCookie{cookie}
} }
func (c *Conn) XinputGrabDeviceUnchecked(GrabWindow Id, Time Timestamp, NumClasses uint16, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, DeviceId byte, Classes []XinputEventClass) XinputGrabDeviceCookie { func (c *Conn) XinputGrabDeviceUnchecked(GrabWindow Window, Time Timestamp, NumClasses uint16, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, DeviceId byte, Classes []XinputEventClass) XinputGrabDeviceCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xinputGrabDeviceRequest(GrabWindow, Time, NumClasses, ThisDeviceMode, OtherDeviceMode, OwnerEvents, DeviceId, Classes), cookie) c.newRequest(c.xinputGrabDeviceRequest(GrabWindow, Time, NumClasses, ThisDeviceMode, OtherDeviceMode, OwnerEvents, DeviceId, Classes), cookie)
return XinputGrabDeviceCookie{cookie} return XinputGrabDeviceCookie{cookie}
@ -5710,7 +5708,7 @@ func (cook XinputGrabDeviceCookie) Check() error {
} }
// Write request to wire for XinputGrabDevice // Write request to wire for XinputGrabDevice
func (c *Conn) xinputGrabDeviceRequest(GrabWindow Id, Time Timestamp, NumClasses uint16, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, DeviceId byte, Classes []XinputEventClass) []byte { func (c *Conn) xinputGrabDeviceRequest(GrabWindow Window, Time Timestamp, NumClasses uint16, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, DeviceId byte, Classes []XinputEventClass) []byte {
size := pad((20 + pad((int(NumClasses) * 4)))) size := pad((20 + pad((int(NumClasses) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -5814,13 +5812,13 @@ type XinputGrabDeviceKeyCookie struct {
} }
// Write request to wire for XinputGrabDeviceKey // Write request to wire for XinputGrabDeviceKey
func (c *Conn) XinputGrabDeviceKey(GrabWindow Id, NumClasses uint16, Modifiers uint16, ModifierDevice byte, GrabbedDevice byte, Key byte, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, Classes []XinputEventClass) XinputGrabDeviceKeyCookie { func (c *Conn) XinputGrabDeviceKey(GrabWindow Window, NumClasses uint16, Modifiers uint16, ModifierDevice byte, GrabbedDevice byte, Key byte, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, Classes []XinputEventClass) XinputGrabDeviceKeyCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xinputGrabDeviceKeyRequest(GrabWindow, NumClasses, Modifiers, ModifierDevice, GrabbedDevice, Key, ThisDeviceMode, OtherDeviceMode, OwnerEvents, Classes), cookie) c.newRequest(c.xinputGrabDeviceKeyRequest(GrabWindow, NumClasses, Modifiers, ModifierDevice, GrabbedDevice, Key, ThisDeviceMode, OtherDeviceMode, OwnerEvents, Classes), cookie)
return XinputGrabDeviceKeyCookie{cookie} return XinputGrabDeviceKeyCookie{cookie}
} }
func (c *Conn) XinputGrabDeviceKeyChecked(GrabWindow Id, NumClasses uint16, Modifiers uint16, ModifierDevice byte, GrabbedDevice byte, Key byte, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, Classes []XinputEventClass) XinputGrabDeviceKeyCookie { func (c *Conn) XinputGrabDeviceKeyChecked(GrabWindow Window, NumClasses uint16, Modifiers uint16, ModifierDevice byte, GrabbedDevice byte, Key byte, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, Classes []XinputEventClass) XinputGrabDeviceKeyCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xinputGrabDeviceKeyRequest(GrabWindow, NumClasses, Modifiers, ModifierDevice, GrabbedDevice, Key, ThisDeviceMode, OtherDeviceMode, OwnerEvents, Classes), cookie) c.newRequest(c.xinputGrabDeviceKeyRequest(GrabWindow, NumClasses, Modifiers, ModifierDevice, GrabbedDevice, Key, ThisDeviceMode, OtherDeviceMode, OwnerEvents, Classes), cookie)
return XinputGrabDeviceKeyCookie{cookie} return XinputGrabDeviceKeyCookie{cookie}
@ -5831,7 +5829,7 @@ func (cook XinputGrabDeviceKeyCookie) Check() error {
} }
// Write request to wire for XinputGrabDeviceKey // Write request to wire for XinputGrabDeviceKey
func (c *Conn) xinputGrabDeviceKeyRequest(GrabWindow Id, NumClasses uint16, Modifiers uint16, ModifierDevice byte, GrabbedDevice byte, Key byte, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, Classes []XinputEventClass) []byte { func (c *Conn) xinputGrabDeviceKeyRequest(GrabWindow Window, NumClasses uint16, Modifiers uint16, ModifierDevice byte, GrabbedDevice byte, Key byte, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, Classes []XinputEventClass) []byte {
size := pad((20 + pad((int(NumClasses) * 4)))) size := pad((20 + pad((int(NumClasses) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -5894,13 +5892,13 @@ type XinputUngrabDeviceKeyCookie struct {
} }
// Write request to wire for XinputUngrabDeviceKey // Write request to wire for XinputUngrabDeviceKey
func (c *Conn) XinputUngrabDeviceKey(GrabWindow Id, Modifiers uint16, ModifierDevice byte, Key byte, GrabbedDevice byte) XinputUngrabDeviceKeyCookie { func (c *Conn) XinputUngrabDeviceKey(GrabWindow Window, Modifiers uint16, ModifierDevice byte, Key byte, GrabbedDevice byte) XinputUngrabDeviceKeyCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xinputUngrabDeviceKeyRequest(GrabWindow, Modifiers, ModifierDevice, Key, GrabbedDevice), cookie) c.newRequest(c.xinputUngrabDeviceKeyRequest(GrabWindow, Modifiers, ModifierDevice, Key, GrabbedDevice), cookie)
return XinputUngrabDeviceKeyCookie{cookie} return XinputUngrabDeviceKeyCookie{cookie}
} }
func (c *Conn) XinputUngrabDeviceKeyChecked(GrabWindow Id, Modifiers uint16, ModifierDevice byte, Key byte, GrabbedDevice byte) XinputUngrabDeviceKeyCookie { func (c *Conn) XinputUngrabDeviceKeyChecked(GrabWindow Window, Modifiers uint16, ModifierDevice byte, Key byte, GrabbedDevice byte) XinputUngrabDeviceKeyCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xinputUngrabDeviceKeyRequest(GrabWindow, Modifiers, ModifierDevice, Key, GrabbedDevice), cookie) c.newRequest(c.xinputUngrabDeviceKeyRequest(GrabWindow, Modifiers, ModifierDevice, Key, GrabbedDevice), cookie)
return XinputUngrabDeviceKeyCookie{cookie} return XinputUngrabDeviceKeyCookie{cookie}
@ -5911,7 +5909,7 @@ func (cook XinputUngrabDeviceKeyCookie) Check() error {
} }
// Write request to wire for XinputUngrabDeviceKey // Write request to wire for XinputUngrabDeviceKey
func (c *Conn) xinputUngrabDeviceKeyRequest(GrabWindow Id, Modifiers uint16, ModifierDevice byte, Key byte, GrabbedDevice byte) []byte { func (c *Conn) xinputUngrabDeviceKeyRequest(GrabWindow Window, Modifiers uint16, ModifierDevice byte, Key byte, GrabbedDevice byte) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -5950,13 +5948,13 @@ type XinputGrabDeviceButtonCookie struct {
} }
// Write request to wire for XinputGrabDeviceButton // Write request to wire for XinputGrabDeviceButton
func (c *Conn) XinputGrabDeviceButton(GrabWindow Id, GrabbedDevice byte, ModifierDevice byte, NumClasses uint16, Modifiers uint16, ThisDeviceMode byte, OtherDeviceMode byte, Button byte, OwnerEvents byte, Classes []XinputEventClass) XinputGrabDeviceButtonCookie { func (c *Conn) XinputGrabDeviceButton(GrabWindow Window, GrabbedDevice byte, ModifierDevice byte, NumClasses uint16, Modifiers uint16, ThisDeviceMode byte, OtherDeviceMode byte, Button byte, OwnerEvents byte, Classes []XinputEventClass) XinputGrabDeviceButtonCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xinputGrabDeviceButtonRequest(GrabWindow, GrabbedDevice, ModifierDevice, NumClasses, Modifiers, ThisDeviceMode, OtherDeviceMode, Button, OwnerEvents, Classes), cookie) c.newRequest(c.xinputGrabDeviceButtonRequest(GrabWindow, GrabbedDevice, ModifierDevice, NumClasses, Modifiers, ThisDeviceMode, OtherDeviceMode, Button, OwnerEvents, Classes), cookie)
return XinputGrabDeviceButtonCookie{cookie} return XinputGrabDeviceButtonCookie{cookie}
} }
func (c *Conn) XinputGrabDeviceButtonChecked(GrabWindow Id, GrabbedDevice byte, ModifierDevice byte, NumClasses uint16, Modifiers uint16, ThisDeviceMode byte, OtherDeviceMode byte, Button byte, OwnerEvents byte, Classes []XinputEventClass) XinputGrabDeviceButtonCookie { func (c *Conn) XinputGrabDeviceButtonChecked(GrabWindow Window, GrabbedDevice byte, ModifierDevice byte, NumClasses uint16, Modifiers uint16, ThisDeviceMode byte, OtherDeviceMode byte, Button byte, OwnerEvents byte, Classes []XinputEventClass) XinputGrabDeviceButtonCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xinputGrabDeviceButtonRequest(GrabWindow, GrabbedDevice, ModifierDevice, NumClasses, Modifiers, ThisDeviceMode, OtherDeviceMode, Button, OwnerEvents, Classes), cookie) c.newRequest(c.xinputGrabDeviceButtonRequest(GrabWindow, GrabbedDevice, ModifierDevice, NumClasses, Modifiers, ThisDeviceMode, OtherDeviceMode, Button, OwnerEvents, Classes), cookie)
return XinputGrabDeviceButtonCookie{cookie} return XinputGrabDeviceButtonCookie{cookie}
@ -5967,7 +5965,7 @@ func (cook XinputGrabDeviceButtonCookie) Check() error {
} }
// Write request to wire for XinputGrabDeviceButton // Write request to wire for XinputGrabDeviceButton
func (c *Conn) xinputGrabDeviceButtonRequest(GrabWindow Id, GrabbedDevice byte, ModifierDevice byte, NumClasses uint16, Modifiers uint16, ThisDeviceMode byte, OtherDeviceMode byte, Button byte, OwnerEvents byte, Classes []XinputEventClass) []byte { func (c *Conn) xinputGrabDeviceButtonRequest(GrabWindow Window, GrabbedDevice byte, ModifierDevice byte, NumClasses uint16, Modifiers uint16, ThisDeviceMode byte, OtherDeviceMode byte, Button byte, OwnerEvents byte, Classes []XinputEventClass) []byte {
size := pad((20 + pad((int(NumClasses) * 4)))) size := pad((20 + pad((int(NumClasses) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -6026,13 +6024,13 @@ type XinputUngrabDeviceButtonCookie struct {
} }
// Write request to wire for XinputUngrabDeviceButton // Write request to wire for XinputUngrabDeviceButton
func (c *Conn) XinputUngrabDeviceButton(GrabWindow Id, Modifiers uint16, ModifierDevice byte, Button byte, GrabbedDevice byte) XinputUngrabDeviceButtonCookie { func (c *Conn) XinputUngrabDeviceButton(GrabWindow Window, Modifiers uint16, ModifierDevice byte, Button byte, GrabbedDevice byte) XinputUngrabDeviceButtonCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xinputUngrabDeviceButtonRequest(GrabWindow, Modifiers, ModifierDevice, Button, GrabbedDevice), cookie) c.newRequest(c.xinputUngrabDeviceButtonRequest(GrabWindow, Modifiers, ModifierDevice, Button, GrabbedDevice), cookie)
return XinputUngrabDeviceButtonCookie{cookie} return XinputUngrabDeviceButtonCookie{cookie}
} }
func (c *Conn) XinputUngrabDeviceButtonChecked(GrabWindow Id, Modifiers uint16, ModifierDevice byte, Button byte, GrabbedDevice byte) XinputUngrabDeviceButtonCookie { func (c *Conn) XinputUngrabDeviceButtonChecked(GrabWindow Window, Modifiers uint16, ModifierDevice byte, Button byte, GrabbedDevice byte) XinputUngrabDeviceButtonCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xinputUngrabDeviceButtonRequest(GrabWindow, Modifiers, ModifierDevice, Button, GrabbedDevice), cookie) c.newRequest(c.xinputUngrabDeviceButtonRequest(GrabWindow, Modifiers, ModifierDevice, Button, GrabbedDevice), cookie)
return XinputUngrabDeviceButtonCookie{cookie} return XinputUngrabDeviceButtonCookie{cookie}
@ -6043,7 +6041,7 @@ func (cook XinputUngrabDeviceButtonCookie) Check() error {
} }
// Write request to wire for XinputUngrabDeviceButton // Write request to wire for XinputUngrabDeviceButton
func (c *Conn) xinputUngrabDeviceButtonRequest(GrabWindow Id, Modifiers uint16, ModifierDevice byte, Button byte, GrabbedDevice byte) []byte { func (c *Conn) xinputUngrabDeviceButtonRequest(GrabWindow Window, Modifiers uint16, ModifierDevice byte, Button byte, GrabbedDevice byte) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -6149,7 +6147,7 @@ type XinputGetDeviceFocusReply struct {
Sequence uint16 Sequence uint16
Length uint32 Length uint32
// padding: 1 bytes // padding: 1 bytes
Focus Id Focus Window
Time Timestamp Time Timestamp
RevertTo byte RevertTo byte
// padding: 15 bytes // padding: 15 bytes
@ -6180,7 +6178,7 @@ func xinputGetDeviceFocusReply(buf []byte) *XinputGetDeviceFocusReply {
v.Length = Get32(buf[b:]) // 4-byte units v.Length = Get32(buf[b:]) // 4-byte units
b += 4 b += 4
v.Focus = Id(Get32(buf[b:])) v.Focus = Window(Get32(buf[b:]))
b += 4 b += 4
v.Time = Timestamp(Get32(buf[b:])) v.Time = Timestamp(Get32(buf[b:]))
@ -6228,13 +6226,13 @@ type XinputSetDeviceFocusCookie struct {
} }
// Write request to wire for XinputSetDeviceFocus // Write request to wire for XinputSetDeviceFocus
func (c *Conn) XinputSetDeviceFocus(Focus Id, Time Timestamp, RevertTo byte, DeviceId byte) XinputSetDeviceFocusCookie { func (c *Conn) XinputSetDeviceFocus(Focus Window, Time Timestamp, RevertTo byte, DeviceId byte) XinputSetDeviceFocusCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xinputSetDeviceFocusRequest(Focus, Time, RevertTo, DeviceId), cookie) c.newRequest(c.xinputSetDeviceFocusRequest(Focus, Time, RevertTo, DeviceId), cookie)
return XinputSetDeviceFocusCookie{cookie} return XinputSetDeviceFocusCookie{cookie}
} }
func (c *Conn) XinputSetDeviceFocusChecked(Focus Id, Time Timestamp, RevertTo byte, DeviceId byte) XinputSetDeviceFocusCookie { func (c *Conn) XinputSetDeviceFocusChecked(Focus Window, Time Timestamp, RevertTo byte, DeviceId byte) XinputSetDeviceFocusCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xinputSetDeviceFocusRequest(Focus, Time, RevertTo, DeviceId), cookie) c.newRequest(c.xinputSetDeviceFocusRequest(Focus, Time, RevertTo, DeviceId), cookie)
return XinputSetDeviceFocusCookie{cookie} return XinputSetDeviceFocusCookie{cookie}
@ -6245,7 +6243,7 @@ func (cook XinputSetDeviceFocusCookie) Check() error {
} }
// Write request to wire for XinputSetDeviceFocus // Write request to wire for XinputSetDeviceFocus
func (c *Conn) xinputSetDeviceFocusRequest(Focus Id, Time Timestamp, RevertTo byte, DeviceId byte) []byte { func (c *Conn) xinputSetDeviceFocusRequest(Focus Window, Time Timestamp, RevertTo byte, DeviceId byte) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -6990,13 +6988,13 @@ type XinputSendExtensionEventCookie struct {
} }
// Write request to wire for XinputSendExtensionEvent // Write request to wire for XinputSendExtensionEvent
func (c *Conn) XinputSendExtensionEvent(Destination Id, DeviceId byte, Propagate bool, NumClasses uint16, NumEvents byte, Events string, Classes []XinputEventClass) XinputSendExtensionEventCookie { func (c *Conn) XinputSendExtensionEvent(Destination Window, DeviceId byte, Propagate bool, NumClasses uint16, NumEvents byte, Events string, Classes []XinputEventClass) XinputSendExtensionEventCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xinputSendExtensionEventRequest(Destination, DeviceId, Propagate, NumClasses, NumEvents, Events, Classes), cookie) c.newRequest(c.xinputSendExtensionEventRequest(Destination, DeviceId, Propagate, NumClasses, NumEvents, Events, Classes), cookie)
return XinputSendExtensionEventCookie{cookie} return XinputSendExtensionEventCookie{cookie}
} }
func (c *Conn) XinputSendExtensionEventChecked(Destination Id, DeviceId byte, Propagate bool, NumClasses uint16, NumEvents byte, Events string, Classes []XinputEventClass) XinputSendExtensionEventCookie { func (c *Conn) XinputSendExtensionEventChecked(Destination Window, DeviceId byte, Propagate bool, NumClasses uint16, NumEvents byte, Events string, Classes []XinputEventClass) XinputSendExtensionEventCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xinputSendExtensionEventRequest(Destination, DeviceId, Propagate, NumClasses, NumEvents, Events, Classes), cookie) c.newRequest(c.xinputSendExtensionEventRequest(Destination, DeviceId, Propagate, NumClasses, NumEvents, Events, Classes), cookie)
return XinputSendExtensionEventCookie{cookie} return XinputSendExtensionEventCookie{cookie}
@ -7007,7 +7005,7 @@ func (cook XinputSendExtensionEventCookie) Check() error {
} }
// Write request to wire for XinputSendExtensionEvent // Write request to wire for XinputSendExtensionEvent
func (c *Conn) xinputSendExtensionEventRequest(Destination Id, DeviceId byte, Propagate bool, NumClasses uint16, NumEvents byte, Events string, Classes []XinputEventClass) []byte { func (c *Conn) xinputSendExtensionEventRequest(Destination Window, DeviceId byte, Propagate bool, NumClasses uint16, NumEvents byte, Events string, Classes []XinputEventClass) []byte {
size := pad(((16 + pad(((int(NumEvents) * 32) * 1))) + pad((int(NumClasses) * 4)))) size := pad(((16 + pad(((int(NumEvents) * 32) * 1))) + pad((int(NumClasses) * 4))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xprint.xml on May 8 2012 11:03:25pm EDT. This file was generated by xprint.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,8 +37,6 @@ func init() {
newExtErrorFuncs["XpExtension"] = make(map[int]newErrorFun) newExtErrorFuncs["XpExtension"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32' // Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void' // Skipping definition for base type 'Void'
@ -59,10 +57,10 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
const ( const (
XprintGetDocFinished = 0 XprintGetDocFinished = 0
XprintGetDocSecondConsumer = 1 XprintGetDocSecondConsumer = 1
@ -93,7 +91,15 @@ const (
XprintAttrSpoolerAttr = 7 XprintAttrSpoolerAttr = 7
) )
// Skipping resource definition of 'Pcontext' type XprintPcontext uint32
func (c *Conn) NewXprintPcontextId() (XprintPcontext, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return XprintPcontext(id), nil
}
type XprintString8 byte type XprintString8 byte
@ -198,7 +204,7 @@ const XprintNotify = 0
type XprintNotifyEvent struct { type XprintNotifyEvent struct {
Sequence uint16 Sequence uint16
Detail byte Detail byte
Context Id Context XprintPcontext
Cancel bool Cancel bool
} }
@ -213,7 +219,7 @@ func NewXprintNotifyEvent(buf []byte) Event {
v.Sequence = Get16(buf[b:]) v.Sequence = Get16(buf[b:])
b += 2 b += 2
v.Context = Id(Get32(buf[b:])) v.Context = XprintPcontext(Get32(buf[b:]))
b += 4 b += 4
if buf[b] == 1 { if buf[b] == 1 {
@ -280,7 +286,7 @@ const XprintAttributNotify = 1
type XprintAttributNotifyEvent struct { type XprintAttributNotifyEvent struct {
Sequence uint16 Sequence uint16
Detail byte Detail byte
Context Id Context XprintPcontext
} }
// Event read XprintAttributNotify // Event read XprintAttributNotify
@ -294,7 +300,7 @@ func NewXprintAttributNotifyEvent(buf []byte) Event {
v.Sequence = Get16(buf[b:]) v.Sequence = Get16(buf[b:])
b += 2 b += 2
v.Context = Id(Get32(buf[b:])) v.Context = XprintPcontext(Get32(buf[b:]))
b += 4 b += 4
return v return v
@ -368,7 +374,7 @@ func (err XprintBadContextError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XprintBadContextError) BadId() Id { func (err XprintBadContextError) BadId() uint32 {
return 0 return 0
} }
@ -413,7 +419,7 @@ func (err XprintBadSequenceError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XprintBadSequenceError) BadId() Id { func (err XprintBadSequenceError) BadId() uint32 {
return 0 return 0
} }
@ -912,7 +918,7 @@ type XprintPrintGetScreenOfContextReply struct {
Sequence uint16 Sequence uint16
Length uint32 Length uint32
// padding: 1 bytes // padding: 1 bytes
Root Id Root Window
} }
// Waits and reads reply data from request XprintPrintGetScreenOfContext // Waits and reads reply data from request XprintPrintGetScreenOfContext
@ -940,7 +946,7 @@ func xprintPrintGetScreenOfContextReply(buf []byte) *XprintPrintGetScreenOfConte
v.Length = Get32(buf[b:]) // 4-byte units v.Length = Get32(buf[b:]) // 4-byte units
b += 4 b += 4
v.Root = Id(Get32(buf[b:])) v.Root = Window(Get32(buf[b:]))
b += 4 b += 4
return v return v
@ -1159,13 +1165,13 @@ type XprintPrintPutDocumentDataCookie struct {
} }
// Write request to wire for XprintPrintPutDocumentData // Write request to wire for XprintPrintPutDocumentData
func (c *Conn) XprintPrintPutDocumentData(Drawable Id, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []XprintString8, Options []XprintString8) XprintPrintPutDocumentDataCookie { func (c *Conn) XprintPrintPutDocumentData(Drawable Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []XprintString8, Options []XprintString8) XprintPrintPutDocumentDataCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xprintPrintPutDocumentDataRequest(Drawable, LenData, LenFmt, LenOptions, Data, DocFormat, Options), cookie) c.newRequest(c.xprintPrintPutDocumentDataRequest(Drawable, LenData, LenFmt, LenOptions, Data, DocFormat, Options), cookie)
return XprintPrintPutDocumentDataCookie{cookie} return XprintPrintPutDocumentDataCookie{cookie}
} }
func (c *Conn) XprintPrintPutDocumentDataChecked(Drawable Id, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []XprintString8, Options []XprintString8) XprintPrintPutDocumentDataCookie { func (c *Conn) XprintPrintPutDocumentDataChecked(Drawable Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []XprintString8, Options []XprintString8) XprintPrintPutDocumentDataCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xprintPrintPutDocumentDataRequest(Drawable, LenData, LenFmt, LenOptions, Data, DocFormat, Options), cookie) c.newRequest(c.xprintPrintPutDocumentDataRequest(Drawable, LenData, LenFmt, LenOptions, Data, DocFormat, Options), cookie)
return XprintPrintPutDocumentDataCookie{cookie} return XprintPrintPutDocumentDataCookie{cookie}
@ -1176,7 +1182,7 @@ func (cook XprintPrintPutDocumentDataCookie) Check() error {
} }
// Write request to wire for XprintPrintPutDocumentData // Write request to wire for XprintPrintPutDocumentData
func (c *Conn) xprintPrintPutDocumentDataRequest(Drawable Id, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []XprintString8, Options []XprintString8) []byte { func (c *Conn) xprintPrintPutDocumentDataRequest(Drawable Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []XprintString8, Options []XprintString8) []byte {
size := pad((((16 + pad((int(LenData) * 1))) + pad((len(DocFormat) * 1))) + pad((len(Options) * 1)))) size := pad((((16 + pad((int(LenData) * 1))) + pad((len(DocFormat) * 1))) + pad((len(Options) * 1))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1226,13 +1232,13 @@ type XprintPrintGetDocumentDataCookie struct {
*cookie *cookie
} }
func (c *Conn) XprintPrintGetDocumentData(Context Id, MaxBytes uint32) XprintPrintGetDocumentDataCookie { func (c *Conn) XprintPrintGetDocumentData(Context XprintPcontext, MaxBytes uint32) XprintPrintGetDocumentDataCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xprintPrintGetDocumentDataRequest(Context, MaxBytes), cookie) c.newRequest(c.xprintPrintGetDocumentDataRequest(Context, MaxBytes), cookie)
return XprintPrintGetDocumentDataCookie{cookie} return XprintPrintGetDocumentDataCookie{cookie}
} }
func (c *Conn) XprintPrintGetDocumentDataUnchecked(Context Id, MaxBytes uint32) XprintPrintGetDocumentDataCookie { func (c *Conn) XprintPrintGetDocumentDataUnchecked(Context XprintPcontext, MaxBytes uint32) XprintPrintGetDocumentDataCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xprintPrintGetDocumentDataRequest(Context, MaxBytes), cookie) c.newRequest(c.xprintPrintGetDocumentDataRequest(Context, MaxBytes), cookie)
return XprintPrintGetDocumentDataCookie{cookie} return XprintPrintGetDocumentDataCookie{cookie}
@ -1299,7 +1305,7 @@ func (cook XprintPrintGetDocumentDataCookie) Check() error {
} }
// Write request to wire for XprintPrintGetDocumentData // Write request to wire for XprintPrintGetDocumentData
func (c *Conn) xprintPrintGetDocumentDataRequest(Context Id, MaxBytes uint32) []byte { func (c *Conn) xprintPrintGetDocumentDataRequest(Context XprintPcontext, MaxBytes uint32) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1329,13 +1335,13 @@ type XprintPrintStartPageCookie struct {
} }
// Write request to wire for XprintPrintStartPage // Write request to wire for XprintPrintStartPage
func (c *Conn) XprintPrintStartPage(Window Id) XprintPrintStartPageCookie { func (c *Conn) XprintPrintStartPage(Window Window) XprintPrintStartPageCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xprintPrintStartPageRequest(Window), cookie) c.newRequest(c.xprintPrintStartPageRequest(Window), cookie)
return XprintPrintStartPageCookie{cookie} return XprintPrintStartPageCookie{cookie}
} }
func (c *Conn) XprintPrintStartPageChecked(Window Id) XprintPrintStartPageCookie { func (c *Conn) XprintPrintStartPageChecked(Window Window) XprintPrintStartPageCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xprintPrintStartPageRequest(Window), cookie) c.newRequest(c.xprintPrintStartPageRequest(Window), cookie)
return XprintPrintStartPageCookie{cookie} return XprintPrintStartPageCookie{cookie}
@ -1346,7 +1352,7 @@ func (cook XprintPrintStartPageCookie) Check() error {
} }
// Write request to wire for XprintPrintStartPage // Write request to wire for XprintPrintStartPage
func (c *Conn) xprintPrintStartPageRequest(Window Id) []byte { func (c *Conn) xprintPrintStartPageRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1423,13 +1429,13 @@ type XprintPrintSelectInputCookie struct {
} }
// Write request to wire for XprintPrintSelectInput // Write request to wire for XprintPrintSelectInput
func (c *Conn) XprintPrintSelectInput(Context Id, EventMask uint32, EventList []uint32) XprintPrintSelectInputCookie { func (c *Conn) XprintPrintSelectInput(Context XprintPcontext, EventMask uint32, EventList []uint32) XprintPrintSelectInputCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xprintPrintSelectInputRequest(Context, EventMask, EventList), cookie) c.newRequest(c.xprintPrintSelectInputRequest(Context, EventMask, EventList), cookie)
return XprintPrintSelectInputCookie{cookie} return XprintPrintSelectInputCookie{cookie}
} }
func (c *Conn) XprintPrintSelectInputChecked(Context Id, EventMask uint32, EventList []uint32) XprintPrintSelectInputCookie { func (c *Conn) XprintPrintSelectInputChecked(Context XprintPcontext, EventMask uint32, EventList []uint32) XprintPrintSelectInputCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xprintPrintSelectInputRequest(Context, EventMask, EventList), cookie) c.newRequest(c.xprintPrintSelectInputRequest(Context, EventMask, EventList), cookie)
return XprintPrintSelectInputCookie{cookie} return XprintPrintSelectInputCookie{cookie}
@ -1440,7 +1446,7 @@ func (cook XprintPrintSelectInputCookie) Check() error {
} }
// Write request to wire for XprintPrintSelectInput // Write request to wire for XprintPrintSelectInput
func (c *Conn) xprintPrintSelectInputRequest(Context Id, EventMask uint32, EventList []uint32) []byte { func (c *Conn) xprintPrintSelectInputRequest(Context XprintPcontext, EventMask uint32, EventList []uint32) []byte {
size := pad((8 + (4 + pad((4 * popCount(int(EventMask))))))) size := pad((8 + (4 + pad((4 * popCount(int(EventMask)))))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1474,13 +1480,13 @@ type XprintPrintInputSelectedCookie struct {
*cookie *cookie
} }
func (c *Conn) XprintPrintInputSelected(Context Id) XprintPrintInputSelectedCookie { func (c *Conn) XprintPrintInputSelected(Context XprintPcontext) XprintPrintInputSelectedCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xprintPrintInputSelectedRequest(Context), cookie) c.newRequest(c.xprintPrintInputSelectedRequest(Context), cookie)
return XprintPrintInputSelectedCookie{cookie} return XprintPrintInputSelectedCookie{cookie}
} }
func (c *Conn) XprintPrintInputSelectedUnchecked(Context Id) XprintPrintInputSelectedCookie { func (c *Conn) XprintPrintInputSelectedUnchecked(Context XprintPcontext) XprintPrintInputSelectedCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xprintPrintInputSelectedRequest(Context), cookie) c.newRequest(c.xprintPrintInputSelectedRequest(Context), cookie)
return XprintPrintInputSelectedCookie{cookie} return XprintPrintInputSelectedCookie{cookie}
@ -1551,7 +1557,7 @@ func (cook XprintPrintInputSelectedCookie) Check() error {
} }
// Write request to wire for XprintPrintInputSelected // Write request to wire for XprintPrintInputSelected
func (c *Conn) xprintPrintInputSelectedRequest(Context Id) []byte { func (c *Conn) xprintPrintInputSelectedRequest(Context XprintPcontext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1577,13 +1583,13 @@ type XprintPrintGetAttributesCookie struct {
*cookie *cookie
} }
func (c *Conn) XprintPrintGetAttributes(Context Id, Pool byte) XprintPrintGetAttributesCookie { func (c *Conn) XprintPrintGetAttributes(Context XprintPcontext, Pool byte) XprintPrintGetAttributesCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xprintPrintGetAttributesRequest(Context, Pool), cookie) c.newRequest(c.xprintPrintGetAttributesRequest(Context, Pool), cookie)
return XprintPrintGetAttributesCookie{cookie} return XprintPrintGetAttributesCookie{cookie}
} }
func (c *Conn) XprintPrintGetAttributesUnchecked(Context Id, Pool byte) XprintPrintGetAttributesCookie { func (c *Conn) XprintPrintGetAttributesUnchecked(Context XprintPcontext, Pool byte) XprintPrintGetAttributesCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xprintPrintGetAttributesRequest(Context, Pool), cookie) c.newRequest(c.xprintPrintGetAttributesRequest(Context, Pool), cookie)
return XprintPrintGetAttributesCookie{cookie} return XprintPrintGetAttributesCookie{cookie}
@ -1641,7 +1647,7 @@ func (cook XprintPrintGetAttributesCookie) Check() error {
} }
// Write request to wire for XprintPrintGetAttributes // Write request to wire for XprintPrintGetAttributes
func (c *Conn) xprintPrintGetAttributesRequest(Context Id, Pool byte) []byte { func (c *Conn) xprintPrintGetAttributesRequest(Context XprintPcontext, Pool byte) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1672,13 +1678,13 @@ type XprintPrintGetOneAttributesCookie struct {
*cookie *cookie
} }
func (c *Conn) XprintPrintGetOneAttributes(Context Id, NameLen uint32, Pool byte, Name []XprintString8) XprintPrintGetOneAttributesCookie { func (c *Conn) XprintPrintGetOneAttributes(Context XprintPcontext, NameLen uint32, Pool byte, Name []XprintString8) XprintPrintGetOneAttributesCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xprintPrintGetOneAttributesRequest(Context, NameLen, Pool, Name), cookie) c.newRequest(c.xprintPrintGetOneAttributesRequest(Context, NameLen, Pool, Name), cookie)
return XprintPrintGetOneAttributesCookie{cookie} return XprintPrintGetOneAttributesCookie{cookie}
} }
func (c *Conn) XprintPrintGetOneAttributesUnchecked(Context Id, NameLen uint32, Pool byte, Name []XprintString8) XprintPrintGetOneAttributesCookie { func (c *Conn) XprintPrintGetOneAttributesUnchecked(Context XprintPcontext, NameLen uint32, Pool byte, Name []XprintString8) XprintPrintGetOneAttributesCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xprintPrintGetOneAttributesRequest(Context, NameLen, Pool, Name), cookie) c.newRequest(c.xprintPrintGetOneAttributesRequest(Context, NameLen, Pool, Name), cookie)
return XprintPrintGetOneAttributesCookie{cookie} return XprintPrintGetOneAttributesCookie{cookie}
@ -1740,7 +1746,7 @@ func (cook XprintPrintGetOneAttributesCookie) Check() error {
} }
// Write request to wire for XprintPrintGetOneAttributes // Write request to wire for XprintPrintGetOneAttributes
func (c *Conn) xprintPrintGetOneAttributesRequest(Context Id, NameLen uint32, Pool byte, Name []XprintString8) []byte { func (c *Conn) xprintPrintGetOneAttributesRequest(Context XprintPcontext, NameLen uint32, Pool byte, Name []XprintString8) []byte {
size := pad((16 + pad((int(NameLen) * 1)))) size := pad((16 + pad((int(NameLen) * 1))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1781,13 +1787,13 @@ type XprintPrintSetAttributesCookie struct {
} }
// Write request to wire for XprintPrintSetAttributes // Write request to wire for XprintPrintSetAttributes
func (c *Conn) XprintPrintSetAttributes(Context Id, StringLen uint32, Pool byte, Rule byte, Attributes []XprintString8) XprintPrintSetAttributesCookie { func (c *Conn) XprintPrintSetAttributes(Context XprintPcontext, StringLen uint32, Pool byte, Rule byte, Attributes []XprintString8) XprintPrintSetAttributesCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xprintPrintSetAttributesRequest(Context, StringLen, Pool, Rule, Attributes), cookie) c.newRequest(c.xprintPrintSetAttributesRequest(Context, StringLen, Pool, Rule, Attributes), cookie)
return XprintPrintSetAttributesCookie{cookie} return XprintPrintSetAttributesCookie{cookie}
} }
func (c *Conn) XprintPrintSetAttributesChecked(Context Id, StringLen uint32, Pool byte, Rule byte, Attributes []XprintString8) XprintPrintSetAttributesCookie { func (c *Conn) XprintPrintSetAttributesChecked(Context XprintPcontext, StringLen uint32, Pool byte, Rule byte, Attributes []XprintString8) XprintPrintSetAttributesCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xprintPrintSetAttributesRequest(Context, StringLen, Pool, Rule, Attributes), cookie) c.newRequest(c.xprintPrintSetAttributesRequest(Context, StringLen, Pool, Rule, Attributes), cookie)
return XprintPrintSetAttributesCookie{cookie} return XprintPrintSetAttributesCookie{cookie}
@ -1798,7 +1804,7 @@ func (cook XprintPrintSetAttributesCookie) Check() error {
} }
// Write request to wire for XprintPrintSetAttributes // Write request to wire for XprintPrintSetAttributes
func (c *Conn) xprintPrintSetAttributesRequest(Context Id, StringLen uint32, Pool byte, Rule byte, Attributes []XprintString8) []byte { func (c *Conn) xprintPrintSetAttributesRequest(Context XprintPcontext, StringLen uint32, Pool byte, Rule byte, Attributes []XprintString8) []byte {
size := pad((16 + pad((len(Attributes) * 1)))) size := pad((16 + pad((len(Attributes) * 1))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1841,13 +1847,13 @@ type XprintPrintGetPageDimensionsCookie struct {
*cookie *cookie
} }
func (c *Conn) XprintPrintGetPageDimensions(Context Id) XprintPrintGetPageDimensionsCookie { func (c *Conn) XprintPrintGetPageDimensions(Context XprintPcontext) XprintPrintGetPageDimensionsCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xprintPrintGetPageDimensionsRequest(Context), cookie) c.newRequest(c.xprintPrintGetPageDimensionsRequest(Context), cookie)
return XprintPrintGetPageDimensionsCookie{cookie} return XprintPrintGetPageDimensionsCookie{cookie}
} }
func (c *Conn) XprintPrintGetPageDimensionsUnchecked(Context Id) XprintPrintGetPageDimensionsCookie { func (c *Conn) XprintPrintGetPageDimensionsUnchecked(Context XprintPcontext) XprintPrintGetPageDimensionsCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xprintPrintGetPageDimensionsRequest(Context), cookie) c.newRequest(c.xprintPrintGetPageDimensionsRequest(Context), cookie)
return XprintPrintGetPageDimensionsCookie{cookie} return XprintPrintGetPageDimensionsCookie{cookie}
@ -1918,7 +1924,7 @@ func (cook XprintPrintGetPageDimensionsCookie) Check() error {
} }
// Write request to wire for XprintPrintGetPageDimensions // Write request to wire for XprintPrintGetPageDimensions
func (c *Conn) xprintPrintGetPageDimensionsRequest(Context Id) []byte { func (c *Conn) xprintPrintGetPageDimensionsRequest(Context XprintPcontext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1964,7 +1970,7 @@ type XprintPrintQueryScreensReply struct {
// padding: 1 bytes // padding: 1 bytes
ListCount uint32 ListCount uint32
// padding: 20 bytes // padding: 20 bytes
Roots []Id // size: pad((int(ListCount) * 4)) Roots []Window // size: pad((int(ListCount) * 4))
} }
// Waits and reads reply data from request XprintPrintQueryScreens // Waits and reads reply data from request XprintPrintQueryScreens
@ -1997,9 +2003,9 @@ func xprintPrintQueryScreensReply(buf []byte) *XprintPrintQueryScreensReply {
b += 20 // padding b += 20 // padding
v.Roots = make([]Id, v.ListCount) v.Roots = make([]Window, v.ListCount)
for i := 0; i < int(v.ListCount); i++ { for i := 0; i < int(v.ListCount); i++ {
v.Roots[i] = Id(Get32(buf[b:])) v.Roots[i] = Window(Get32(buf[b:]))
b += 4 b += 4
} }
b = pad(b) b = pad(b)
@ -2035,13 +2041,13 @@ type XprintPrintSetImageResolutionCookie struct {
*cookie *cookie
} }
func (c *Conn) XprintPrintSetImageResolution(Context Id, ImageResolution uint16) XprintPrintSetImageResolutionCookie { func (c *Conn) XprintPrintSetImageResolution(Context XprintPcontext, ImageResolution uint16) XprintPrintSetImageResolutionCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xprintPrintSetImageResolutionRequest(Context, ImageResolution), cookie) c.newRequest(c.xprintPrintSetImageResolutionRequest(Context, ImageResolution), cookie)
return XprintPrintSetImageResolutionCookie{cookie} return XprintPrintSetImageResolutionCookie{cookie}
} }
func (c *Conn) XprintPrintSetImageResolutionUnchecked(Context Id, ImageResolution uint16) XprintPrintSetImageResolutionCookie { func (c *Conn) XprintPrintSetImageResolutionUnchecked(Context XprintPcontext, ImageResolution uint16) XprintPrintSetImageResolutionCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xprintPrintSetImageResolutionRequest(Context, ImageResolution), cookie) c.newRequest(c.xprintPrintSetImageResolutionRequest(Context, ImageResolution), cookie)
return XprintPrintSetImageResolutionCookie{cookie} return XprintPrintSetImageResolutionCookie{cookie}
@ -2097,7 +2103,7 @@ func (cook XprintPrintSetImageResolutionCookie) Check() error {
} }
// Write request to wire for XprintPrintSetImageResolution // Write request to wire for XprintPrintSetImageResolution
func (c *Conn) xprintPrintSetImageResolutionRequest(Context Id, ImageResolution uint16) []byte { func (c *Conn) xprintPrintSetImageResolutionRequest(Context XprintPcontext, ImageResolution uint16) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2126,13 +2132,13 @@ type XprintPrintGetImageResolutionCookie struct {
*cookie *cookie
} }
func (c *Conn) XprintPrintGetImageResolution(Context Id) XprintPrintGetImageResolutionCookie { func (c *Conn) XprintPrintGetImageResolution(Context XprintPcontext) XprintPrintGetImageResolutionCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xprintPrintGetImageResolutionRequest(Context), cookie) c.newRequest(c.xprintPrintGetImageResolutionRequest(Context), cookie)
return XprintPrintGetImageResolutionCookie{cookie} return XprintPrintGetImageResolutionCookie{cookie}
} }
func (c *Conn) XprintPrintGetImageResolutionUnchecked(Context Id) XprintPrintGetImageResolutionCookie { func (c *Conn) XprintPrintGetImageResolutionUnchecked(Context XprintPcontext) XprintPrintGetImageResolutionCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xprintPrintGetImageResolutionRequest(Context), cookie) c.newRequest(c.xprintPrintGetImageResolutionRequest(Context), cookie)
return XprintPrintGetImageResolutionCookie{cookie} return XprintPrintGetImageResolutionCookie{cookie}
@ -2183,7 +2189,7 @@ func (cook XprintPrintGetImageResolutionCookie) Check() error {
} }
// Write request to wire for XprintPrintGetImageResolution // Write request to wire for XprintPrintGetImageResolution
func (c *Conn) xprintPrintGetImageResolutionRequest(Context Id) []byte { func (c *Conn) xprintPrintGetImageResolutionRequest(Context XprintPcontext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xselinux.xml on May 8 2012 11:03:25pm EDT. This file was generated by xselinux.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,6 +37,16 @@ func init() {
newExtErrorFuncs["SELinux"] = make(map[int]newErrorFun) newExtErrorFuncs["SELinux"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8' // Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
@ -51,22 +61,10 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// 'XselinuxListItem' struct definition // 'XselinuxListItem' struct definition
// Size: ((12 + pad((int(ObjectContextLen) * 1))) + pad((int(DataContextLen) * 1))) // Size: ((12 + pad((int(ObjectContextLen) * 1))) + pad((int(DataContextLen) * 1)))
type XselinuxListItem struct { type XselinuxListItem struct {
Name Id Name Atom
ObjectContextLen uint32 ObjectContextLen uint32
DataContextLen uint32 DataContextLen uint32
ObjectContext string // size: pad((int(ObjectContextLen) * 1)) ObjectContext string // size: pad((int(ObjectContextLen) * 1))
@ -77,7 +75,7 @@ type XselinuxListItem struct {
func ReadXselinuxListItem(buf []byte, v *XselinuxListItem) int { func ReadXselinuxListItem(buf []byte, v *XselinuxListItem) int {
b := 0 b := 0
v.Name = Id(Get32(buf[b:])) v.Name = Atom(Get32(buf[b:]))
b += 4 b += 4
v.ObjectContextLen = Get32(buf[b:]) v.ObjectContextLen = Get32(buf[b:])
@ -673,13 +671,13 @@ type XselinuxGetWindowContextCookie struct {
*cookie *cookie
} }
func (c *Conn) XselinuxGetWindowContext(Window Id) XselinuxGetWindowContextCookie { func (c *Conn) XselinuxGetWindowContext(Window Window) XselinuxGetWindowContextCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xselinuxGetWindowContextRequest(Window), cookie) c.newRequest(c.xselinuxGetWindowContextRequest(Window), cookie)
return XselinuxGetWindowContextCookie{cookie} return XselinuxGetWindowContextCookie{cookie}
} }
func (c *Conn) XselinuxGetWindowContextUnchecked(Window Id) XselinuxGetWindowContextCookie { func (c *Conn) XselinuxGetWindowContextUnchecked(Window Window) XselinuxGetWindowContextCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xselinuxGetWindowContextRequest(Window), cookie) c.newRequest(c.xselinuxGetWindowContextRequest(Window), cookie)
return XselinuxGetWindowContextCookie{cookie} return XselinuxGetWindowContextCookie{cookie}
@ -741,7 +739,7 @@ func (cook XselinuxGetWindowContextCookie) Check() error {
} }
// Write request to wire for XselinuxGetWindowContext // Write request to wire for XselinuxGetWindowContext
func (c *Conn) xselinuxGetWindowContextRequest(Window Id) []byte { func (c *Conn) xselinuxGetWindowContextRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1043,13 +1041,13 @@ type XselinuxGetPropertyContextCookie struct {
*cookie *cookie
} }
func (c *Conn) XselinuxGetPropertyContext(Window Id, Property Id) XselinuxGetPropertyContextCookie { func (c *Conn) XselinuxGetPropertyContext(Window Window, Property Atom) XselinuxGetPropertyContextCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xselinuxGetPropertyContextRequest(Window, Property), cookie) c.newRequest(c.xselinuxGetPropertyContextRequest(Window, Property), cookie)
return XselinuxGetPropertyContextCookie{cookie} return XselinuxGetPropertyContextCookie{cookie}
} }
func (c *Conn) XselinuxGetPropertyContextUnchecked(Window Id, Property Id) XselinuxGetPropertyContextCookie { func (c *Conn) XselinuxGetPropertyContextUnchecked(Window Window, Property Atom) XselinuxGetPropertyContextCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xselinuxGetPropertyContextRequest(Window, Property), cookie) c.newRequest(c.xselinuxGetPropertyContextRequest(Window, Property), cookie)
return XselinuxGetPropertyContextCookie{cookie} return XselinuxGetPropertyContextCookie{cookie}
@ -1111,7 +1109,7 @@ func (cook XselinuxGetPropertyContextCookie) Check() error {
} }
// Write request to wire for XselinuxGetPropertyContext // Write request to wire for XselinuxGetPropertyContext
func (c *Conn) xselinuxGetPropertyContextRequest(Window Id, Property Id) []byte { func (c *Conn) xselinuxGetPropertyContextRequest(Window Window, Property Atom) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1140,13 +1138,13 @@ type XselinuxGetPropertyDataContextCookie struct {
*cookie *cookie
} }
func (c *Conn) XselinuxGetPropertyDataContext(Window Id, Property Id) XselinuxGetPropertyDataContextCookie { func (c *Conn) XselinuxGetPropertyDataContext(Window Window, Property Atom) XselinuxGetPropertyDataContextCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xselinuxGetPropertyDataContextRequest(Window, Property), cookie) c.newRequest(c.xselinuxGetPropertyDataContextRequest(Window, Property), cookie)
return XselinuxGetPropertyDataContextCookie{cookie} return XselinuxGetPropertyDataContextCookie{cookie}
} }
func (c *Conn) XselinuxGetPropertyDataContextUnchecked(Window Id, Property Id) XselinuxGetPropertyDataContextCookie { func (c *Conn) XselinuxGetPropertyDataContextUnchecked(Window Window, Property Atom) XselinuxGetPropertyDataContextCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xselinuxGetPropertyDataContextRequest(Window, Property), cookie) c.newRequest(c.xselinuxGetPropertyDataContextRequest(Window, Property), cookie)
return XselinuxGetPropertyDataContextCookie{cookie} return XselinuxGetPropertyDataContextCookie{cookie}
@ -1208,7 +1206,7 @@ func (cook XselinuxGetPropertyDataContextCookie) Check() error {
} }
// Write request to wire for XselinuxGetPropertyDataContext // Write request to wire for XselinuxGetPropertyDataContext
func (c *Conn) xselinuxGetPropertyDataContextRequest(Window Id, Property Id) []byte { func (c *Conn) xselinuxGetPropertyDataContextRequest(Window Window, Property Atom) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1237,13 +1235,13 @@ type XselinuxListPropertiesCookie struct {
*cookie *cookie
} }
func (c *Conn) XselinuxListProperties(Window Id) XselinuxListPropertiesCookie { func (c *Conn) XselinuxListProperties(Window Window) XselinuxListPropertiesCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xselinuxListPropertiesRequest(Window), cookie) c.newRequest(c.xselinuxListPropertiesRequest(Window), cookie)
return XselinuxListPropertiesCookie{cookie} return XselinuxListPropertiesCookie{cookie}
} }
func (c *Conn) XselinuxListPropertiesUnchecked(Window Id) XselinuxListPropertiesCookie { func (c *Conn) XselinuxListPropertiesUnchecked(Window Window) XselinuxListPropertiesCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xselinuxListPropertiesRequest(Window), cookie) c.newRequest(c.xselinuxListPropertiesRequest(Window), cookie)
return XselinuxListPropertiesCookie{cookie} return XselinuxListPropertiesCookie{cookie}
@ -1301,7 +1299,7 @@ func (cook XselinuxListPropertiesCookie) Check() error {
} }
// Write request to wire for XselinuxListProperties // Write request to wire for XselinuxListProperties
func (c *Conn) xselinuxListPropertiesRequest(Window Id) []byte { func (c *Conn) xselinuxListPropertiesRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1603,13 +1601,13 @@ type XselinuxGetSelectionContextCookie struct {
*cookie *cookie
} }
func (c *Conn) XselinuxGetSelectionContext(Selection Id) XselinuxGetSelectionContextCookie { func (c *Conn) XselinuxGetSelectionContext(Selection Atom) XselinuxGetSelectionContextCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xselinuxGetSelectionContextRequest(Selection), cookie) c.newRequest(c.xselinuxGetSelectionContextRequest(Selection), cookie)
return XselinuxGetSelectionContextCookie{cookie} return XselinuxGetSelectionContextCookie{cookie}
} }
func (c *Conn) XselinuxGetSelectionContextUnchecked(Selection Id) XselinuxGetSelectionContextCookie { func (c *Conn) XselinuxGetSelectionContextUnchecked(Selection Atom) XselinuxGetSelectionContextCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xselinuxGetSelectionContextRequest(Selection), cookie) c.newRequest(c.xselinuxGetSelectionContextRequest(Selection), cookie)
return XselinuxGetSelectionContextCookie{cookie} return XselinuxGetSelectionContextCookie{cookie}
@ -1671,7 +1669,7 @@ func (cook XselinuxGetSelectionContextCookie) Check() error {
} }
// Write request to wire for XselinuxGetSelectionContext // Write request to wire for XselinuxGetSelectionContext
func (c *Conn) xselinuxGetSelectionContextRequest(Selection Id) []byte { func (c *Conn) xselinuxGetSelectionContextRequest(Selection Atom) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1697,13 +1695,13 @@ type XselinuxGetSelectionDataContextCookie struct {
*cookie *cookie
} }
func (c *Conn) XselinuxGetSelectionDataContext(Selection Id) XselinuxGetSelectionDataContextCookie { func (c *Conn) XselinuxGetSelectionDataContext(Selection Atom) XselinuxGetSelectionDataContextCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xselinuxGetSelectionDataContextRequest(Selection), cookie) c.newRequest(c.xselinuxGetSelectionDataContextRequest(Selection), cookie)
return XselinuxGetSelectionDataContextCookie{cookie} return XselinuxGetSelectionDataContextCookie{cookie}
} }
func (c *Conn) XselinuxGetSelectionDataContextUnchecked(Selection Id) XselinuxGetSelectionDataContextCookie { func (c *Conn) XselinuxGetSelectionDataContextUnchecked(Selection Atom) XselinuxGetSelectionDataContextCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xselinuxGetSelectionDataContextRequest(Selection), cookie) c.newRequest(c.xselinuxGetSelectionDataContextRequest(Selection), cookie)
return XselinuxGetSelectionDataContextCookie{cookie} return XselinuxGetSelectionDataContextCookie{cookie}
@ -1765,7 +1763,7 @@ func (cook XselinuxGetSelectionDataContextCookie) Check() error {
} }
// Write request to wire for XselinuxGetSelectionDataContext // Write request to wire for XselinuxGetSelectionDataContext
func (c *Conn) xselinuxGetSelectionDataContextRequest(Selection Id) []byte { func (c *Conn) xselinuxGetSelectionDataContextRequest(Selection Atom) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xtest.xml on May 8 2012 11:03:25pm EDT. This file was generated by xtest.xml on May 10 2012 12:39:34pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,6 +37,16 @@ func init() {
newExtErrorFuncs["XTEST"] = make(map[int]newErrorFun) newExtErrorFuncs["XTEST"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char' // Skipping definition for base type 'Char'
@ -49,20 +59,8 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
const ( const (
XtestCursorNone = 0 XtestCursorNone = 0
XtestCursorCurrent = 1 XtestCursorCurrent = 1
@ -163,13 +161,13 @@ type XtestCompareCursorCookie struct {
*cookie *cookie
} }
func (c *Conn) XtestCompareCursor(Window Id, Cursor Id) XtestCompareCursorCookie { func (c *Conn) XtestCompareCursor(Window Window, Cursor Cursor) XtestCompareCursorCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xtestCompareCursorRequest(Window, Cursor), cookie) c.newRequest(c.xtestCompareCursorRequest(Window, Cursor), cookie)
return XtestCompareCursorCookie{cookie} return XtestCompareCursorCookie{cookie}
} }
func (c *Conn) XtestCompareCursorUnchecked(Window Id, Cursor Id) XtestCompareCursorCookie { func (c *Conn) XtestCompareCursorUnchecked(Window Window, Cursor Cursor) XtestCompareCursorCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xtestCompareCursorRequest(Window, Cursor), cookie) c.newRequest(c.xtestCompareCursorRequest(Window, Cursor), cookie)
return XtestCompareCursorCookie{cookie} return XtestCompareCursorCookie{cookie}
@ -221,7 +219,7 @@ func (cook XtestCompareCursorCookie) Check() error {
} }
// Write request to wire for XtestCompareCursor // Write request to wire for XtestCompareCursor
func (c *Conn) xtestCompareCursorRequest(Window Id, Cursor Id) []byte { func (c *Conn) xtestCompareCursorRequest(Window Window, Cursor Cursor) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -251,13 +249,13 @@ type XtestFakeInputCookie struct {
} }
// Write request to wire for XtestFakeInput // Write request to wire for XtestFakeInput
func (c *Conn) XtestFakeInput(Type byte, Detail byte, Time uint32, Root Id, RootX int16, RootY int16, Deviceid byte) XtestFakeInputCookie { func (c *Conn) XtestFakeInput(Type byte, Detail byte, Time uint32, Root Window, RootX int16, RootY int16, Deviceid byte) XtestFakeInputCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xtestFakeInputRequest(Type, Detail, Time, Root, RootX, RootY, Deviceid), cookie) c.newRequest(c.xtestFakeInputRequest(Type, Detail, Time, Root, RootX, RootY, Deviceid), cookie)
return XtestFakeInputCookie{cookie} return XtestFakeInputCookie{cookie}
} }
func (c *Conn) XtestFakeInputChecked(Type byte, Detail byte, Time uint32, Root Id, RootX int16, RootY int16, Deviceid byte) XtestFakeInputCookie { func (c *Conn) XtestFakeInputChecked(Type byte, Detail byte, Time uint32, Root Window, RootX int16, RootY int16, Deviceid byte) XtestFakeInputCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xtestFakeInputRequest(Type, Detail, Time, Root, RootX, RootY, Deviceid), cookie) c.newRequest(c.xtestFakeInputRequest(Type, Detail, Time, Root, RootX, RootY, Deviceid), cookie)
return XtestFakeInputCookie{cookie} return XtestFakeInputCookie{cookie}
@ -268,7 +266,7 @@ func (cook XtestFakeInputCookie) Check() error {
} }
// Write request to wire for XtestFakeInput // Write request to wire for XtestFakeInput
func (c *Conn) xtestFakeInputRequest(Type byte, Detail byte, Time uint32, Root Id, RootX int16, RootY int16, Deviceid byte) []byte { func (c *Conn) xtestFakeInputRequest(Type byte, Detail byte, Time uint32, Root Window, RootX int16, RootY int16, Deviceid byte) []byte {
size := 36 size := 36
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xv.xml on May 8 2012 11:03:25pm EDT. This file was generated by xv.xml on May 10 2012 12:39:35pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -38,18 +38,8 @@ func init() {
newExtErrorFuncs["XVideo"] = make(map[int]newErrorFun) newExtErrorFuncs["XVideo"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double'
// Skipping definition for base type 'Bool'
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16' // Skipping definition for base type 'Int16'
@ -64,6 +54,14 @@ func init() {
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
// Skipping definition for base type 'Double'
// Skipping definition for base type 'Bool'
const ( const (
XvTypeInputMask = 1 XvTypeInputMask = 1
XvTypeOutputMask = 2 XvTypeOutputMask = 2
@ -109,9 +107,25 @@ const (
XvGrabPortStatusBadAlloc = 5 XvGrabPortStatusBadAlloc = 5
) )
// Skipping resource definition of 'Port' type XvPort uint32
// Skipping resource definition of 'Encoding' func (c *Conn) NewXvPortId() (XvPort, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return XvPort(id), nil
}
type XvEncoding uint32
func (c *Conn) NewXvEncodingId() (XvEncoding, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return XvEncoding(id), nil
}
// 'XvRational' struct definition // 'XvRational' struct definition
// Size: 8 // Size: 8
@ -233,7 +247,7 @@ func XvFormatListBytes(buf []byte, list []XvFormat) int {
// 'XvAdaptorInfo' struct definition // 'XvAdaptorInfo' struct definition
// Size: ((12 + pad((int(NameSize) * 1))) + pad((int(NumFormats) * 8))) // Size: ((12 + pad((int(NameSize) * 1))) + pad((int(NumFormats) * 8)))
type XvAdaptorInfo struct { type XvAdaptorInfo struct {
BaseId Id BaseId XvPort
NameSize uint16 NameSize uint16
NumPorts uint16 NumPorts uint16
NumFormats uint16 NumFormats uint16
@ -247,7 +261,7 @@ type XvAdaptorInfo struct {
func ReadXvAdaptorInfo(buf []byte, v *XvAdaptorInfo) int { func ReadXvAdaptorInfo(buf []byte, v *XvAdaptorInfo) int {
b := 0 b := 0
v.BaseId = Id(Get32(buf[b:])) v.BaseId = XvPort(Get32(buf[b:]))
b += 4 b += 4
v.NameSize = Get16(buf[b:]) v.NameSize = Get16(buf[b:])
@ -341,7 +355,7 @@ func XvAdaptorInfoListSize(list []XvAdaptorInfo) int {
// 'XvEncodingInfo' struct definition // 'XvEncodingInfo' struct definition
// Size: (20 + pad((int(NameSize) * 1))) // Size: (20 + pad((int(NameSize) * 1)))
type XvEncodingInfo struct { type XvEncodingInfo struct {
Encoding Id Encoding XvEncoding
NameSize uint16 NameSize uint16
Width uint16 Width uint16
Height uint16 Height uint16
@ -354,7 +368,7 @@ type XvEncodingInfo struct {
func ReadXvEncodingInfo(buf []byte, v *XvEncodingInfo) int { func ReadXvEncodingInfo(buf []byte, v *XvEncodingInfo) int {
b := 0 b := 0
v.Encoding = Id(Get32(buf[b:])) v.Encoding = XvEncoding(Get32(buf[b:]))
b += 4 b += 4
v.NameSize = Get16(buf[b:]) v.NameSize = Get16(buf[b:])
@ -896,8 +910,8 @@ type XvVideoNotifyEvent struct {
Sequence uint16 Sequence uint16
Reason byte Reason byte
Time Timestamp Time Timestamp
Drawable Id Drawable Drawable
Port Id Port XvPort
} }
// Event read XvVideoNotify // Event read XvVideoNotify
@ -914,10 +928,10 @@ func NewXvVideoNotifyEvent(buf []byte) Event {
v.Time = Timestamp(Get32(buf[b:])) v.Time = Timestamp(Get32(buf[b:]))
b += 4 b += 4
v.Drawable = Id(Get32(buf[b:])) v.Drawable = Drawable(Get32(buf[b:]))
b += 4 b += 4
v.Port = Id(Get32(buf[b:])) v.Port = XvPort(Get32(buf[b:]))
b += 4 b += 4
return v return v
@ -978,8 +992,8 @@ type XvPortNotifyEvent struct {
Sequence uint16 Sequence uint16
// padding: 1 bytes // padding: 1 bytes
Time Timestamp Time Timestamp
Port Id Port XvPort
Attribute Id Attribute Atom
Value int32 Value int32
} }
@ -996,10 +1010,10 @@ func NewXvPortNotifyEvent(buf []byte) Event {
v.Time = Timestamp(Get32(buf[b:])) v.Time = Timestamp(Get32(buf[b:]))
b += 4 b += 4
v.Port = Id(Get32(buf[b:])) v.Port = XvPort(Get32(buf[b:]))
b += 4 b += 4
v.Attribute = Id(Get32(buf[b:])) v.Attribute = Atom(Get32(buf[b:]))
b += 4 b += 4
v.Value = int32(Get32(buf[b:])) v.Value = int32(Get32(buf[b:]))
@ -1086,7 +1100,7 @@ func (err XvBadPortError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XvBadPortError) BadId() Id { func (err XvBadPortError) BadId() uint32 {
return 0 return 0
} }
@ -1131,7 +1145,7 @@ func (err XvBadEncodingError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XvBadEncodingError) BadId() Id { func (err XvBadEncodingError) BadId() uint32 {
return 0 return 0
} }
@ -1176,7 +1190,7 @@ func (err XvBadControlError) SequenceId() uint16 {
return err.Sequence return err.Sequence
} }
func (err XvBadControlError) BadId() Id { func (err XvBadControlError) BadId() uint32 {
return 0 return 0
} }
@ -1281,13 +1295,13 @@ type XvQueryAdaptorsCookie struct {
*cookie *cookie
} }
func (c *Conn) XvQueryAdaptors(Window Id) XvQueryAdaptorsCookie { func (c *Conn) XvQueryAdaptors(Window Window) XvQueryAdaptorsCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvQueryAdaptorsRequest(Window), cookie) c.newRequest(c.xvQueryAdaptorsRequest(Window), cookie)
return XvQueryAdaptorsCookie{cookie} return XvQueryAdaptorsCookie{cookie}
} }
func (c *Conn) XvQueryAdaptorsUnchecked(Window Id) XvQueryAdaptorsCookie { func (c *Conn) XvQueryAdaptorsUnchecked(Window Window) XvQueryAdaptorsCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvQueryAdaptorsRequest(Window), cookie) c.newRequest(c.xvQueryAdaptorsRequest(Window), cookie)
return XvQueryAdaptorsCookie{cookie} return XvQueryAdaptorsCookie{cookie}
@ -1345,7 +1359,7 @@ func (cook XvQueryAdaptorsCookie) Check() error {
} }
// Write request to wire for XvQueryAdaptors // Write request to wire for XvQueryAdaptors
func (c *Conn) xvQueryAdaptorsRequest(Window Id) []byte { func (c *Conn) xvQueryAdaptorsRequest(Window Window) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1371,13 +1385,13 @@ type XvQueryEncodingsCookie struct {
*cookie *cookie
} }
func (c *Conn) XvQueryEncodings(Port Id) XvQueryEncodingsCookie { func (c *Conn) XvQueryEncodings(Port XvPort) XvQueryEncodingsCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvQueryEncodingsRequest(Port), cookie) c.newRequest(c.xvQueryEncodingsRequest(Port), cookie)
return XvQueryEncodingsCookie{cookie} return XvQueryEncodingsCookie{cookie}
} }
func (c *Conn) XvQueryEncodingsUnchecked(Port Id) XvQueryEncodingsCookie { func (c *Conn) XvQueryEncodingsUnchecked(Port XvPort) XvQueryEncodingsCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvQueryEncodingsRequest(Port), cookie) c.newRequest(c.xvQueryEncodingsRequest(Port), cookie)
return XvQueryEncodingsCookie{cookie} return XvQueryEncodingsCookie{cookie}
@ -1435,7 +1449,7 @@ func (cook XvQueryEncodingsCookie) Check() error {
} }
// Write request to wire for XvQueryEncodings // Write request to wire for XvQueryEncodings
func (c *Conn) xvQueryEncodingsRequest(Port Id) []byte { func (c *Conn) xvQueryEncodingsRequest(Port XvPort) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1461,13 +1475,13 @@ type XvGrabPortCookie struct {
*cookie *cookie
} }
func (c *Conn) XvGrabPort(Port Id, Time Timestamp) XvGrabPortCookie { func (c *Conn) XvGrabPort(Port XvPort, Time Timestamp) XvGrabPortCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvGrabPortRequest(Port, Time), cookie) c.newRequest(c.xvGrabPortRequest(Port, Time), cookie)
return XvGrabPortCookie{cookie} return XvGrabPortCookie{cookie}
} }
func (c *Conn) XvGrabPortUnchecked(Port Id, Time Timestamp) XvGrabPortCookie { func (c *Conn) XvGrabPortUnchecked(Port XvPort, Time Timestamp) XvGrabPortCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvGrabPortRequest(Port, Time), cookie) c.newRequest(c.xvGrabPortRequest(Port, Time), cookie)
return XvGrabPortCookie{cookie} return XvGrabPortCookie{cookie}
@ -1515,7 +1529,7 @@ func (cook XvGrabPortCookie) Check() error {
} }
// Write request to wire for XvGrabPort // Write request to wire for XvGrabPort
func (c *Conn) xvGrabPortRequest(Port Id, Time Timestamp) []byte { func (c *Conn) xvGrabPortRequest(Port XvPort, Time Timestamp) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1545,13 +1559,13 @@ type XvUngrabPortCookie struct {
} }
// Write request to wire for XvUngrabPort // Write request to wire for XvUngrabPort
func (c *Conn) XvUngrabPort(Port Id, Time Timestamp) XvUngrabPortCookie { func (c *Conn) XvUngrabPort(Port XvPort, Time Timestamp) XvUngrabPortCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvUngrabPortRequest(Port, Time), cookie) c.newRequest(c.xvUngrabPortRequest(Port, Time), cookie)
return XvUngrabPortCookie{cookie} return XvUngrabPortCookie{cookie}
} }
func (c *Conn) XvUngrabPortChecked(Port Id, Time Timestamp) XvUngrabPortCookie { func (c *Conn) XvUngrabPortChecked(Port XvPort, Time Timestamp) XvUngrabPortCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvUngrabPortRequest(Port, Time), cookie) c.newRequest(c.xvUngrabPortRequest(Port, Time), cookie)
return XvUngrabPortCookie{cookie} return XvUngrabPortCookie{cookie}
@ -1562,7 +1576,7 @@ func (cook XvUngrabPortCookie) Check() error {
} }
// Write request to wire for XvUngrabPort // Write request to wire for XvUngrabPort
func (c *Conn) xvUngrabPortRequest(Port Id, Time Timestamp) []byte { func (c *Conn) xvUngrabPortRequest(Port XvPort, Time Timestamp) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1592,13 +1606,13 @@ type XvPutVideoCookie struct {
} }
// Write request to wire for XvPutVideo // Write request to wire for XvPutVideo
func (c *Conn) XvPutVideo(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvPutVideoCookie { func (c *Conn) XvPutVideo(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvPutVideoCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvPutVideoRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie) c.newRequest(c.xvPutVideoRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return XvPutVideoCookie{cookie} return XvPutVideoCookie{cookie}
} }
func (c *Conn) XvPutVideoChecked(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvPutVideoCookie { func (c *Conn) XvPutVideoChecked(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvPutVideoCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvPutVideoRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie) c.newRequest(c.xvPutVideoRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return XvPutVideoCookie{cookie} return XvPutVideoCookie{cookie}
@ -1609,7 +1623,7 @@ func (cook XvPutVideoCookie) Check() error {
} }
// Write request to wire for XvPutVideo // Write request to wire for XvPutVideo
func (c *Conn) xvPutVideoRequest(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) []byte { func (c *Conn) xvPutVideoRequest(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) []byte {
size := 32 size := 32
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1666,13 +1680,13 @@ type XvPutStillCookie struct {
} }
// Write request to wire for XvPutStill // Write request to wire for XvPutStill
func (c *Conn) XvPutStill(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvPutStillCookie { func (c *Conn) XvPutStill(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvPutStillCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvPutStillRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie) c.newRequest(c.xvPutStillRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return XvPutStillCookie{cookie} return XvPutStillCookie{cookie}
} }
func (c *Conn) XvPutStillChecked(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvPutStillCookie { func (c *Conn) XvPutStillChecked(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvPutStillCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvPutStillRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie) c.newRequest(c.xvPutStillRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return XvPutStillCookie{cookie} return XvPutStillCookie{cookie}
@ -1683,7 +1697,7 @@ func (cook XvPutStillCookie) Check() error {
} }
// Write request to wire for XvPutStill // Write request to wire for XvPutStill
func (c *Conn) xvPutStillRequest(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) []byte { func (c *Conn) xvPutStillRequest(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) []byte {
size := 32 size := 32
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1740,13 +1754,13 @@ type XvGetVideoCookie struct {
} }
// Write request to wire for XvGetVideo // Write request to wire for XvGetVideo
func (c *Conn) XvGetVideo(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvGetVideoCookie { func (c *Conn) XvGetVideo(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvGetVideoCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvGetVideoRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie) c.newRequest(c.xvGetVideoRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return XvGetVideoCookie{cookie} return XvGetVideoCookie{cookie}
} }
func (c *Conn) XvGetVideoChecked(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvGetVideoCookie { func (c *Conn) XvGetVideoChecked(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvGetVideoCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvGetVideoRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie) c.newRequest(c.xvGetVideoRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return XvGetVideoCookie{cookie} return XvGetVideoCookie{cookie}
@ -1757,7 +1771,7 @@ func (cook XvGetVideoCookie) Check() error {
} }
// Write request to wire for XvGetVideo // Write request to wire for XvGetVideo
func (c *Conn) xvGetVideoRequest(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) []byte { func (c *Conn) xvGetVideoRequest(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) []byte {
size := 32 size := 32
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1814,13 +1828,13 @@ type XvGetStillCookie struct {
} }
// Write request to wire for XvGetStill // Write request to wire for XvGetStill
func (c *Conn) XvGetStill(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvGetStillCookie { func (c *Conn) XvGetStill(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvGetStillCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvGetStillRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie) c.newRequest(c.xvGetStillRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return XvGetStillCookie{cookie} return XvGetStillCookie{cookie}
} }
func (c *Conn) XvGetStillChecked(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvGetStillCookie { func (c *Conn) XvGetStillChecked(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) XvGetStillCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvGetStillRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie) c.newRequest(c.xvGetStillRequest(Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return XvGetStillCookie{cookie} return XvGetStillCookie{cookie}
@ -1831,7 +1845,7 @@ func (cook XvGetStillCookie) Check() error {
} }
// Write request to wire for XvGetStill // Write request to wire for XvGetStill
func (c *Conn) xvGetStillRequest(Port Id, Drawable Id, Gc Id, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) []byte { func (c *Conn) xvGetStillRequest(Port XvPort, Drawable Drawable, Gc Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) []byte {
size := 32 size := 32
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1888,13 +1902,13 @@ type XvStopVideoCookie struct {
} }
// Write request to wire for XvStopVideo // Write request to wire for XvStopVideo
func (c *Conn) XvStopVideo(Port Id, Drawable Id) XvStopVideoCookie { func (c *Conn) XvStopVideo(Port XvPort, Drawable Drawable) XvStopVideoCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvStopVideoRequest(Port, Drawable), cookie) c.newRequest(c.xvStopVideoRequest(Port, Drawable), cookie)
return XvStopVideoCookie{cookie} return XvStopVideoCookie{cookie}
} }
func (c *Conn) XvStopVideoChecked(Port Id, Drawable Id) XvStopVideoCookie { func (c *Conn) XvStopVideoChecked(Port XvPort, Drawable Drawable) XvStopVideoCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvStopVideoRequest(Port, Drawable), cookie) c.newRequest(c.xvStopVideoRequest(Port, Drawable), cookie)
return XvStopVideoCookie{cookie} return XvStopVideoCookie{cookie}
@ -1905,7 +1919,7 @@ func (cook XvStopVideoCookie) Check() error {
} }
// Write request to wire for XvStopVideo // Write request to wire for XvStopVideo
func (c *Conn) xvStopVideoRequest(Port Id, Drawable Id) []byte { func (c *Conn) xvStopVideoRequest(Port XvPort, Drawable Drawable) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1935,13 +1949,13 @@ type XvSelectVideoNotifyCookie struct {
} }
// Write request to wire for XvSelectVideoNotify // Write request to wire for XvSelectVideoNotify
func (c *Conn) XvSelectVideoNotify(Drawable Id, Onoff bool) XvSelectVideoNotifyCookie { func (c *Conn) XvSelectVideoNotify(Drawable Drawable, Onoff bool) XvSelectVideoNotifyCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvSelectVideoNotifyRequest(Drawable, Onoff), cookie) c.newRequest(c.xvSelectVideoNotifyRequest(Drawable, Onoff), cookie)
return XvSelectVideoNotifyCookie{cookie} return XvSelectVideoNotifyCookie{cookie}
} }
func (c *Conn) XvSelectVideoNotifyChecked(Drawable Id, Onoff bool) XvSelectVideoNotifyCookie { func (c *Conn) XvSelectVideoNotifyChecked(Drawable Drawable, Onoff bool) XvSelectVideoNotifyCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvSelectVideoNotifyRequest(Drawable, Onoff), cookie) c.newRequest(c.xvSelectVideoNotifyRequest(Drawable, Onoff), cookie)
return XvSelectVideoNotifyCookie{cookie} return XvSelectVideoNotifyCookie{cookie}
@ -1952,7 +1966,7 @@ func (cook XvSelectVideoNotifyCookie) Check() error {
} }
// Write request to wire for XvSelectVideoNotify // Write request to wire for XvSelectVideoNotify
func (c *Conn) xvSelectVideoNotifyRequest(Drawable Id, Onoff bool) []byte { func (c *Conn) xvSelectVideoNotifyRequest(Drawable Drawable, Onoff bool) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -1988,13 +2002,13 @@ type XvSelectPortNotifyCookie struct {
} }
// Write request to wire for XvSelectPortNotify // Write request to wire for XvSelectPortNotify
func (c *Conn) XvSelectPortNotify(Port Id, Onoff bool) XvSelectPortNotifyCookie { func (c *Conn) XvSelectPortNotify(Port XvPort, Onoff bool) XvSelectPortNotifyCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvSelectPortNotifyRequest(Port, Onoff), cookie) c.newRequest(c.xvSelectPortNotifyRequest(Port, Onoff), cookie)
return XvSelectPortNotifyCookie{cookie} return XvSelectPortNotifyCookie{cookie}
} }
func (c *Conn) XvSelectPortNotifyChecked(Port Id, Onoff bool) XvSelectPortNotifyCookie { func (c *Conn) XvSelectPortNotifyChecked(Port XvPort, Onoff bool) XvSelectPortNotifyCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvSelectPortNotifyRequest(Port, Onoff), cookie) c.newRequest(c.xvSelectPortNotifyRequest(Port, Onoff), cookie)
return XvSelectPortNotifyCookie{cookie} return XvSelectPortNotifyCookie{cookie}
@ -2005,7 +2019,7 @@ func (cook XvSelectPortNotifyCookie) Check() error {
} }
// Write request to wire for XvSelectPortNotify // Write request to wire for XvSelectPortNotify
func (c *Conn) xvSelectPortNotifyRequest(Port Id, Onoff bool) []byte { func (c *Conn) xvSelectPortNotifyRequest(Port XvPort, Onoff bool) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2040,13 +2054,13 @@ type XvQueryBestSizeCookie struct {
*cookie *cookie
} }
func (c *Conn) XvQueryBestSize(Port Id, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) XvQueryBestSizeCookie { func (c *Conn) XvQueryBestSize(Port XvPort, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) XvQueryBestSizeCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvQueryBestSizeRequest(Port, VidW, VidH, DrwW, DrwH, Motion), cookie) c.newRequest(c.xvQueryBestSizeRequest(Port, VidW, VidH, DrwW, DrwH, Motion), cookie)
return XvQueryBestSizeCookie{cookie} return XvQueryBestSizeCookie{cookie}
} }
func (c *Conn) XvQueryBestSizeUnchecked(Port Id, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) XvQueryBestSizeCookie { func (c *Conn) XvQueryBestSizeUnchecked(Port XvPort, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) XvQueryBestSizeCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvQueryBestSizeRequest(Port, VidW, VidH, DrwW, DrwH, Motion), cookie) c.newRequest(c.xvQueryBestSizeRequest(Port, VidW, VidH, DrwW, DrwH, Motion), cookie)
return XvQueryBestSizeCookie{cookie} return XvQueryBestSizeCookie{cookie}
@ -2101,7 +2115,7 @@ func (cook XvQueryBestSizeCookie) Check() error {
} }
// Write request to wire for XvQueryBestSize // Write request to wire for XvQueryBestSize
func (c *Conn) xvQueryBestSizeRequest(Port Id, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) []byte { func (c *Conn) xvQueryBestSizeRequest(Port XvPort, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2149,13 +2163,13 @@ type XvSetPortAttributeCookie struct {
} }
// Write request to wire for XvSetPortAttribute // Write request to wire for XvSetPortAttribute
func (c *Conn) XvSetPortAttribute(Port Id, Attribute Id, Value int32) XvSetPortAttributeCookie { func (c *Conn) XvSetPortAttribute(Port XvPort, Attribute Atom, Value int32) XvSetPortAttributeCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvSetPortAttributeRequest(Port, Attribute, Value), cookie) c.newRequest(c.xvSetPortAttributeRequest(Port, Attribute, Value), cookie)
return XvSetPortAttributeCookie{cookie} return XvSetPortAttributeCookie{cookie}
} }
func (c *Conn) XvSetPortAttributeChecked(Port Id, Attribute Id, Value int32) XvSetPortAttributeCookie { func (c *Conn) XvSetPortAttributeChecked(Port XvPort, Attribute Atom, Value int32) XvSetPortAttributeCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvSetPortAttributeRequest(Port, Attribute, Value), cookie) c.newRequest(c.xvSetPortAttributeRequest(Port, Attribute, Value), cookie)
return XvSetPortAttributeCookie{cookie} return XvSetPortAttributeCookie{cookie}
@ -2166,7 +2180,7 @@ func (cook XvSetPortAttributeCookie) Check() error {
} }
// Write request to wire for XvSetPortAttribute // Write request to wire for XvSetPortAttribute
func (c *Conn) xvSetPortAttributeRequest(Port Id, Attribute Id, Value int32) []byte { func (c *Conn) xvSetPortAttributeRequest(Port XvPort, Attribute Atom, Value int32) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2198,13 +2212,13 @@ type XvGetPortAttributeCookie struct {
*cookie *cookie
} }
func (c *Conn) XvGetPortAttribute(Port Id, Attribute Id) XvGetPortAttributeCookie { func (c *Conn) XvGetPortAttribute(Port XvPort, Attribute Atom) XvGetPortAttributeCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvGetPortAttributeRequest(Port, Attribute), cookie) c.newRequest(c.xvGetPortAttributeRequest(Port, Attribute), cookie)
return XvGetPortAttributeCookie{cookie} return XvGetPortAttributeCookie{cookie}
} }
func (c *Conn) XvGetPortAttributeUnchecked(Port Id, Attribute Id) XvGetPortAttributeCookie { func (c *Conn) XvGetPortAttributeUnchecked(Port XvPort, Attribute Atom) XvGetPortAttributeCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvGetPortAttributeRequest(Port, Attribute), cookie) c.newRequest(c.xvGetPortAttributeRequest(Port, Attribute), cookie)
return XvGetPortAttributeCookie{cookie} return XvGetPortAttributeCookie{cookie}
@ -2255,7 +2269,7 @@ func (cook XvGetPortAttributeCookie) Check() error {
} }
// Write request to wire for XvGetPortAttribute // Write request to wire for XvGetPortAttribute
func (c *Conn) xvGetPortAttributeRequest(Port Id, Attribute Id) []byte { func (c *Conn) xvGetPortAttributeRequest(Port XvPort, Attribute Atom) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2284,13 +2298,13 @@ type XvQueryPortAttributesCookie struct {
*cookie *cookie
} }
func (c *Conn) XvQueryPortAttributes(Port Id) XvQueryPortAttributesCookie { func (c *Conn) XvQueryPortAttributes(Port XvPort) XvQueryPortAttributesCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvQueryPortAttributesRequest(Port), cookie) c.newRequest(c.xvQueryPortAttributesRequest(Port), cookie)
return XvQueryPortAttributesCookie{cookie} return XvQueryPortAttributesCookie{cookie}
} }
func (c *Conn) XvQueryPortAttributesUnchecked(Port Id) XvQueryPortAttributesCookie { func (c *Conn) XvQueryPortAttributesUnchecked(Port XvPort) XvQueryPortAttributesCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvQueryPortAttributesRequest(Port), cookie) c.newRequest(c.xvQueryPortAttributesRequest(Port), cookie)
return XvQueryPortAttributesCookie{cookie} return XvQueryPortAttributesCookie{cookie}
@ -2352,7 +2366,7 @@ func (cook XvQueryPortAttributesCookie) Check() error {
} }
// Write request to wire for XvQueryPortAttributes // Write request to wire for XvQueryPortAttributes
func (c *Conn) xvQueryPortAttributesRequest(Port Id) []byte { func (c *Conn) xvQueryPortAttributesRequest(Port XvPort) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2378,13 +2392,13 @@ type XvListImageFormatsCookie struct {
*cookie *cookie
} }
func (c *Conn) XvListImageFormats(Port Id) XvListImageFormatsCookie { func (c *Conn) XvListImageFormats(Port XvPort) XvListImageFormatsCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvListImageFormatsRequest(Port), cookie) c.newRequest(c.xvListImageFormatsRequest(Port), cookie)
return XvListImageFormatsCookie{cookie} return XvListImageFormatsCookie{cookie}
} }
func (c *Conn) XvListImageFormatsUnchecked(Port Id) XvListImageFormatsCookie { func (c *Conn) XvListImageFormatsUnchecked(Port XvPort) XvListImageFormatsCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvListImageFormatsRequest(Port), cookie) c.newRequest(c.xvListImageFormatsRequest(Port), cookie)
return XvListImageFormatsCookie{cookie} return XvListImageFormatsCookie{cookie}
@ -2442,7 +2456,7 @@ func (cook XvListImageFormatsCookie) Check() error {
} }
// Write request to wire for XvListImageFormats // Write request to wire for XvListImageFormats
func (c *Conn) xvListImageFormatsRequest(Port Id) []byte { func (c *Conn) xvListImageFormatsRequest(Port XvPort) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2468,13 +2482,13 @@ type XvQueryImageAttributesCookie struct {
*cookie *cookie
} }
func (c *Conn) XvQueryImageAttributes(Port Id, Id uint32, Width uint16, Height uint16) XvQueryImageAttributesCookie { func (c *Conn) XvQueryImageAttributes(Port XvPort, Id uint32, Width uint16, Height uint16) XvQueryImageAttributesCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvQueryImageAttributesRequest(Port, Id, Width, Height), cookie) c.newRequest(c.xvQueryImageAttributesRequest(Port, Id, Width, Height), cookie)
return XvQueryImageAttributesCookie{cookie} return XvQueryImageAttributesCookie{cookie}
} }
func (c *Conn) XvQueryImageAttributesUnchecked(Port Id, Id uint32, Width uint16, Height uint16) XvQueryImageAttributesCookie { func (c *Conn) XvQueryImageAttributesUnchecked(Port XvPort, Id uint32, Width uint16, Height uint16) XvQueryImageAttributesCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvQueryImageAttributesRequest(Port, Id, Width, Height), cookie) c.newRequest(c.xvQueryImageAttributesRequest(Port, Id, Width, Height), cookie)
return XvQueryImageAttributesCookie{cookie} return XvQueryImageAttributesCookie{cookie}
@ -2556,7 +2570,7 @@ func (cook XvQueryImageAttributesCookie) Check() error {
} }
// Write request to wire for XvQueryImageAttributes // Write request to wire for XvQueryImageAttributes
func (c *Conn) xvQueryImageAttributesRequest(Port Id, Id uint32, Width uint16, Height uint16) []byte { func (c *Conn) xvQueryImageAttributesRequest(Port XvPort, Id uint32, Width uint16, Height uint16) []byte {
size := 16 size := 16
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2592,13 +2606,13 @@ type XvPutImageCookie struct {
} }
// Write request to wire for XvPutImage // Write request to wire for XvPutImage
func (c *Conn) XvPutImage(Port Id, Drawable Id, Gc Id, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) XvPutImageCookie { func (c *Conn) XvPutImage(Port XvPort, Drawable Drawable, Gc Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) XvPutImageCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvPutImageRequest(Port, Drawable, Gc, Id, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, Data), cookie) c.newRequest(c.xvPutImageRequest(Port, Drawable, Gc, Id, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, Data), cookie)
return XvPutImageCookie{cookie} return XvPutImageCookie{cookie}
} }
func (c *Conn) XvPutImageChecked(Port Id, Drawable Id, Gc Id, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) XvPutImageCookie { func (c *Conn) XvPutImageChecked(Port XvPort, Drawable Drawable, Gc Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) XvPutImageCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvPutImageRequest(Port, Drawable, Gc, Id, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, Data), cookie) c.newRequest(c.xvPutImageRequest(Port, Drawable, Gc, Id, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, Data), cookie)
return XvPutImageCookie{cookie} return XvPutImageCookie{cookie}
@ -2609,7 +2623,7 @@ func (cook XvPutImageCookie) Check() error {
} }
// Write request to wire for XvPutImage // Write request to wire for XvPutImage
func (c *Conn) xvPutImageRequest(Port Id, Drawable Id, Gc Id, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) []byte { func (c *Conn) xvPutImageRequest(Port XvPort, Drawable Drawable, Gc Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) []byte {
size := pad((40 + pad((len(Data) * 1)))) size := pad((40 + pad((len(Data) * 1))))
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -2678,13 +2692,13 @@ type XvShmPutImageCookie struct {
} }
// Write request to wire for XvShmPutImage // Write request to wire for XvShmPutImage
func (c *Conn) XvShmPutImage(Port Id, Drawable Id, Gc Id, Shmseg Id, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) XvShmPutImageCookie { func (c *Conn) XvShmPutImage(Port XvPort, Drawable Drawable, Gc Gcontext, Shmseg ShmSeg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) XvShmPutImageCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvShmPutImageRequest(Port, Drawable, Gc, Shmseg, Id, Offset, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, SendEvent), cookie) c.newRequest(c.xvShmPutImageRequest(Port, Drawable, Gc, Shmseg, Id, Offset, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, SendEvent), cookie)
return XvShmPutImageCookie{cookie} return XvShmPutImageCookie{cookie}
} }
func (c *Conn) XvShmPutImageChecked(Port Id, Drawable Id, Gc Id, Shmseg Id, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) XvShmPutImageCookie { func (c *Conn) XvShmPutImageChecked(Port XvPort, Drawable Drawable, Gc Gcontext, Shmseg ShmSeg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) XvShmPutImageCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvShmPutImageRequest(Port, Drawable, Gc, Shmseg, Id, Offset, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, SendEvent), cookie) c.newRequest(c.xvShmPutImageRequest(Port, Drawable, Gc, Shmseg, Id, Offset, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, SendEvent), cookie)
return XvShmPutImageCookie{cookie} return XvShmPutImageCookie{cookie}
@ -2695,7 +2709,7 @@ func (cook XvShmPutImageCookie) Check() error {
} }
// Write request to wire for XvShmPutImage // Write request to wire for XvShmPutImage
func (c *Conn) xvShmPutImageRequest(Port Id, Drawable Id, Gc Id, Shmseg Id, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) []byte { func (c *Conn) xvShmPutImageRequest(Port XvPort, Drawable Drawable, Gc Gcontext, Shmseg ShmSeg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) []byte {
size := 52 size := 52
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -1,7 +1,7 @@
package xgb package xgb
/* /*
This file was generated by xvmc.xml on May 8 2012 11:03:25pm EDT. This file was generated by xvmc.xml on May 10 2012 12:39:35pm EDT.
This file is automatically generated. Edit at your peril! This file is automatically generated. Edit at your peril!
*/ */
@ -37,14 +37,6 @@ func init() {
newExtErrorFuncs["XVideo-MotionCompensation"] = make(map[int]newErrorFun) newExtErrorFuncs["XVideo-MotionCompensation"] = make(map[int]newErrorFun)
} }
// Skipping definition for base type 'Int16'
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8' // Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16' // Skipping definition for base type 'Card16'
@ -59,20 +51,50 @@ func init() {
// Skipping definition for base type 'Float' // Skipping definition for base type 'Float'
// Skipping definition for base type 'Id'
// Skipping definition for base type 'Card8' // Skipping definition for base type 'Card8'
// Skipping resource definition of 'Context' // Skipping definition for base type 'Int16'
// Skipping resource definition of 'Surface' // Skipping definition for base type 'Int32'
// Skipping resource definition of 'Subpicture' // Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
type XvmcContext uint32
func (c *Conn) NewXvmcContextId() (XvmcContext, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return XvmcContext(id), nil
}
type XvmcSurface uint32
func (c *Conn) NewXvmcSurfaceId() (XvmcSurface, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return XvmcSurface(id), nil
}
type XvmcSubpicture uint32
func (c *Conn) NewXvmcSubpictureId() (XvmcSubpicture, error) {
id, err := c.NewId()
if err != nil {
return 0, err
}
return XvmcSubpicture(id), nil
}
// 'XvmcSurfaceInfo' struct definition // 'XvmcSurfaceInfo' struct definition
// Size: 24 // Size: 24
type XvmcSurfaceInfo struct { type XvmcSurfaceInfo struct {
Id Id Id XvmcSurface
ChromaFormat uint16 ChromaFormat uint16
Pad0 uint16 Pad0 uint16
MaxWidth uint16 MaxWidth uint16
@ -87,7 +109,7 @@ type XvmcSurfaceInfo struct {
func ReadXvmcSurfaceInfo(buf []byte, v *XvmcSurfaceInfo) int { func ReadXvmcSurfaceInfo(buf []byte, v *XvmcSurfaceInfo) int {
b := 0 b := 0
v.Id = Id(Get32(buf[b:])) v.Id = XvmcSurface(Get32(buf[b:]))
b += 4 b += 4
v.ChromaFormat = Get16(buf[b:]) v.ChromaFormat = Get16(buf[b:])
@ -264,13 +286,13 @@ type XvmcListSurfaceTypesCookie struct {
*cookie *cookie
} }
func (c *Conn) XvmcListSurfaceTypes(PortId Id) XvmcListSurfaceTypesCookie { func (c *Conn) XvmcListSurfaceTypes(PortId XvPort) XvmcListSurfaceTypesCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvmcListSurfaceTypesRequest(PortId), cookie) c.newRequest(c.xvmcListSurfaceTypesRequest(PortId), cookie)
return XvmcListSurfaceTypesCookie{cookie} return XvmcListSurfaceTypesCookie{cookie}
} }
func (c *Conn) XvmcListSurfaceTypesUnchecked(PortId Id) XvmcListSurfaceTypesCookie { func (c *Conn) XvmcListSurfaceTypesUnchecked(PortId XvPort) XvmcListSurfaceTypesCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvmcListSurfaceTypesRequest(PortId), cookie) c.newRequest(c.xvmcListSurfaceTypesRequest(PortId), cookie)
return XvmcListSurfaceTypesCookie{cookie} return XvmcListSurfaceTypesCookie{cookie}
@ -328,7 +350,7 @@ func (cook XvmcListSurfaceTypesCookie) Check() error {
} }
// Write request to wire for XvmcListSurfaceTypes // Write request to wire for XvmcListSurfaceTypes
func (c *Conn) xvmcListSurfaceTypesRequest(PortId Id) []byte { func (c *Conn) xvmcListSurfaceTypesRequest(PortId XvPort) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -354,13 +376,13 @@ type XvmcCreateContextCookie struct {
*cookie *cookie
} }
func (c *Conn) XvmcCreateContext(ContextId Id, PortId Id, SurfaceId Id, Width uint16, Height uint16, Flags uint32) XvmcCreateContextCookie { func (c *Conn) XvmcCreateContext(ContextId XvmcContext, PortId XvPort, SurfaceId XvmcSurface, Width uint16, Height uint16, Flags uint32) XvmcCreateContextCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvmcCreateContextRequest(ContextId, PortId, SurfaceId, Width, Height, Flags), cookie) c.newRequest(c.xvmcCreateContextRequest(ContextId, PortId, SurfaceId, Width, Height, Flags), cookie)
return XvmcCreateContextCookie{cookie} return XvmcCreateContextCookie{cookie}
} }
func (c *Conn) XvmcCreateContextUnchecked(ContextId Id, PortId Id, SurfaceId Id, Width uint16, Height uint16, Flags uint32) XvmcCreateContextCookie { func (c *Conn) XvmcCreateContextUnchecked(ContextId XvmcContext, PortId XvPort, SurfaceId XvmcSurface, Width uint16, Height uint16, Flags uint32) XvmcCreateContextCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvmcCreateContextRequest(ContextId, PortId, SurfaceId, Width, Height, Flags), cookie) c.newRequest(c.xvmcCreateContextRequest(ContextId, PortId, SurfaceId, Width, Height, Flags), cookie)
return XvmcCreateContextCookie{cookie} return XvmcCreateContextCookie{cookie}
@ -430,7 +452,7 @@ func (cook XvmcCreateContextCookie) Check() error {
} }
// Write request to wire for XvmcCreateContext // Write request to wire for XvmcCreateContext
func (c *Conn) xvmcCreateContextRequest(ContextId Id, PortId Id, SurfaceId Id, Width uint16, Height uint16, Flags uint32) []byte { func (c *Conn) xvmcCreateContextRequest(ContextId XvmcContext, PortId XvPort, SurfaceId XvmcSurface, Width uint16, Height uint16, Flags uint32) []byte {
size := 24 size := 24
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -472,13 +494,13 @@ type XvmcDestroyContextCookie struct {
} }
// Write request to wire for XvmcDestroyContext // Write request to wire for XvmcDestroyContext
func (c *Conn) XvmcDestroyContext(ContextId Id) XvmcDestroyContextCookie { func (c *Conn) XvmcDestroyContext(ContextId XvmcContext) XvmcDestroyContextCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvmcDestroyContextRequest(ContextId), cookie) c.newRequest(c.xvmcDestroyContextRequest(ContextId), cookie)
return XvmcDestroyContextCookie{cookie} return XvmcDestroyContextCookie{cookie}
} }
func (c *Conn) XvmcDestroyContextChecked(ContextId Id) XvmcDestroyContextCookie { func (c *Conn) XvmcDestroyContextChecked(ContextId XvmcContext) XvmcDestroyContextCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvmcDestroyContextRequest(ContextId), cookie) c.newRequest(c.xvmcDestroyContextRequest(ContextId), cookie)
return XvmcDestroyContextCookie{cookie} return XvmcDestroyContextCookie{cookie}
@ -489,7 +511,7 @@ func (cook XvmcDestroyContextCookie) Check() error {
} }
// Write request to wire for XvmcDestroyContext // Write request to wire for XvmcDestroyContext
func (c *Conn) xvmcDestroyContextRequest(ContextId Id) []byte { func (c *Conn) xvmcDestroyContextRequest(ContextId XvmcContext) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -515,13 +537,13 @@ type XvmcCreateSurfaceCookie struct {
*cookie *cookie
} }
func (c *Conn) XvmcCreateSurface(SurfaceId Id, ContextId Id) XvmcCreateSurfaceCookie { func (c *Conn) XvmcCreateSurface(SurfaceId XvmcSurface, ContextId XvmcContext) XvmcCreateSurfaceCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvmcCreateSurfaceRequest(SurfaceId, ContextId), cookie) c.newRequest(c.xvmcCreateSurfaceRequest(SurfaceId, ContextId), cookie)
return XvmcCreateSurfaceCookie{cookie} return XvmcCreateSurfaceCookie{cookie}
} }
func (c *Conn) XvmcCreateSurfaceUnchecked(SurfaceId Id, ContextId Id) XvmcCreateSurfaceCookie { func (c *Conn) XvmcCreateSurfaceUnchecked(SurfaceId XvmcSurface, ContextId XvmcContext) XvmcCreateSurfaceCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvmcCreateSurfaceRequest(SurfaceId, ContextId), cookie) c.newRequest(c.xvmcCreateSurfaceRequest(SurfaceId, ContextId), cookie)
return XvmcCreateSurfaceCookie{cookie} return XvmcCreateSurfaceCookie{cookie}
@ -579,7 +601,7 @@ func (cook XvmcCreateSurfaceCookie) Check() error {
} }
// Write request to wire for XvmcCreateSurface // Write request to wire for XvmcCreateSurface
func (c *Conn) xvmcCreateSurfaceRequest(SurfaceId Id, ContextId Id) []byte { func (c *Conn) xvmcCreateSurfaceRequest(SurfaceId XvmcSurface, ContextId XvmcContext) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -609,13 +631,13 @@ type XvmcDestroySurfaceCookie struct {
} }
// Write request to wire for XvmcDestroySurface // Write request to wire for XvmcDestroySurface
func (c *Conn) XvmcDestroySurface(SurfaceId Id) XvmcDestroySurfaceCookie { func (c *Conn) XvmcDestroySurface(SurfaceId XvmcSurface) XvmcDestroySurfaceCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvmcDestroySurfaceRequest(SurfaceId), cookie) c.newRequest(c.xvmcDestroySurfaceRequest(SurfaceId), cookie)
return XvmcDestroySurfaceCookie{cookie} return XvmcDestroySurfaceCookie{cookie}
} }
func (c *Conn) XvmcDestroySurfaceChecked(SurfaceId Id) XvmcDestroySurfaceCookie { func (c *Conn) XvmcDestroySurfaceChecked(SurfaceId XvmcSurface) XvmcDestroySurfaceCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvmcDestroySurfaceRequest(SurfaceId), cookie) c.newRequest(c.xvmcDestroySurfaceRequest(SurfaceId), cookie)
return XvmcDestroySurfaceCookie{cookie} return XvmcDestroySurfaceCookie{cookie}
@ -626,7 +648,7 @@ func (cook XvmcDestroySurfaceCookie) Check() error {
} }
// Write request to wire for XvmcDestroySurface // Write request to wire for XvmcDestroySurface
func (c *Conn) xvmcDestroySurfaceRequest(SurfaceId Id) []byte { func (c *Conn) xvmcDestroySurfaceRequest(SurfaceId XvmcSurface) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -652,13 +674,13 @@ type XvmcCreateSubpictureCookie struct {
*cookie *cookie
} }
func (c *Conn) XvmcCreateSubpicture(SubpictureId Id, Context Id, XvimageId uint32, Width uint16, Height uint16) XvmcCreateSubpictureCookie { func (c *Conn) XvmcCreateSubpicture(SubpictureId XvmcSubpicture, Context XvmcContext, XvimageId uint32, Width uint16, Height uint16) XvmcCreateSubpictureCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvmcCreateSubpictureRequest(SubpictureId, Context, XvimageId, Width, Height), cookie) c.newRequest(c.xvmcCreateSubpictureRequest(SubpictureId, Context, XvimageId, Width, Height), cookie)
return XvmcCreateSubpictureCookie{cookie} return XvmcCreateSubpictureCookie{cookie}
} }
func (c *Conn) XvmcCreateSubpictureUnchecked(SubpictureId Id, Context Id, XvimageId uint32, Width uint16, Height uint16) XvmcCreateSubpictureCookie { func (c *Conn) XvmcCreateSubpictureUnchecked(SubpictureId XvmcSubpicture, Context XvmcContext, XvimageId uint32, Width uint16, Height uint16) XvmcCreateSubpictureCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvmcCreateSubpictureRequest(SubpictureId, Context, XvimageId, Width, Height), cookie) c.newRequest(c.xvmcCreateSubpictureRequest(SubpictureId, Context, XvimageId, Width, Height), cookie)
return XvmcCreateSubpictureCookie{cookie} return XvmcCreateSubpictureCookie{cookie}
@ -737,7 +759,7 @@ func (cook XvmcCreateSubpictureCookie) Check() error {
} }
// Write request to wire for XvmcCreateSubpicture // Write request to wire for XvmcCreateSubpicture
func (c *Conn) xvmcCreateSubpictureRequest(SubpictureId Id, Context Id, XvimageId uint32, Width uint16, Height uint16) []byte { func (c *Conn) xvmcCreateSubpictureRequest(SubpictureId XvmcSubpicture, Context XvmcContext, XvimageId uint32, Width uint16, Height uint16) []byte {
size := 20 size := 20
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -776,13 +798,13 @@ type XvmcDestroySubpictureCookie struct {
} }
// Write request to wire for XvmcDestroySubpicture // Write request to wire for XvmcDestroySubpicture
func (c *Conn) XvmcDestroySubpicture(SubpictureId Id) XvmcDestroySubpictureCookie { func (c *Conn) XvmcDestroySubpicture(SubpictureId XvmcSubpicture) XvmcDestroySubpictureCookie {
cookie := c.newCookie(false, false) cookie := c.newCookie(false, false)
c.newRequest(c.xvmcDestroySubpictureRequest(SubpictureId), cookie) c.newRequest(c.xvmcDestroySubpictureRequest(SubpictureId), cookie)
return XvmcDestroySubpictureCookie{cookie} return XvmcDestroySubpictureCookie{cookie}
} }
func (c *Conn) XvmcDestroySubpictureChecked(SubpictureId Id) XvmcDestroySubpictureCookie { func (c *Conn) XvmcDestroySubpictureChecked(SubpictureId XvmcSubpicture) XvmcDestroySubpictureCookie {
cookie := c.newCookie(true, false) cookie := c.newCookie(true, false)
c.newRequest(c.xvmcDestroySubpictureRequest(SubpictureId), cookie) c.newRequest(c.xvmcDestroySubpictureRequest(SubpictureId), cookie)
return XvmcDestroySubpictureCookie{cookie} return XvmcDestroySubpictureCookie{cookie}
@ -793,7 +815,7 @@ func (cook XvmcDestroySubpictureCookie) Check() error {
} }
// Write request to wire for XvmcDestroySubpicture // Write request to wire for XvmcDestroySubpicture
func (c *Conn) xvmcDestroySubpictureRequest(SubpictureId Id) []byte { func (c *Conn) xvmcDestroySubpictureRequest(SubpictureId XvmcSubpicture) []byte {
size := 8 size := 8
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)
@ -819,13 +841,13 @@ type XvmcListSubpictureTypesCookie struct {
*cookie *cookie
} }
func (c *Conn) XvmcListSubpictureTypes(PortId Id, SurfaceId Id) XvmcListSubpictureTypesCookie { func (c *Conn) XvmcListSubpictureTypes(PortId XvPort, SurfaceId XvmcSurface) XvmcListSubpictureTypesCookie {
cookie := c.newCookie(true, true) cookie := c.newCookie(true, true)
c.newRequest(c.xvmcListSubpictureTypesRequest(PortId, SurfaceId), cookie) c.newRequest(c.xvmcListSubpictureTypesRequest(PortId, SurfaceId), cookie)
return XvmcListSubpictureTypesCookie{cookie} return XvmcListSubpictureTypesCookie{cookie}
} }
func (c *Conn) XvmcListSubpictureTypesUnchecked(PortId Id, SurfaceId Id) XvmcListSubpictureTypesCookie { func (c *Conn) XvmcListSubpictureTypesUnchecked(PortId XvPort, SurfaceId XvmcSurface) XvmcListSubpictureTypesCookie {
cookie := c.newCookie(false, true) cookie := c.newCookie(false, true)
c.newRequest(c.xvmcListSubpictureTypesRequest(PortId, SurfaceId), cookie) c.newRequest(c.xvmcListSubpictureTypesRequest(PortId, SurfaceId), cookie)
return XvmcListSubpictureTypesCookie{cookie} return XvmcListSubpictureTypesCookie{cookie}
@ -883,7 +905,7 @@ func (cook XvmcListSubpictureTypesCookie) Check() error {
} }
// Write request to wire for XvmcListSubpictureTypes // Write request to wire for XvmcListSubpictureTypes
func (c *Conn) xvmcListSubpictureTypesRequest(PortId Id, SurfaceId Id) []byte { func (c *Conn) xvmcListSubpictureTypesRequest(PortId XvPort, SurfaceId XvmcSurface) []byte {
size := 12 size := 12
b := 0 b := 0
buf := make([]byte, size) buf := make([]byte, size)

View File

@ -110,9 +110,6 @@ func (c *Conn) DefaultScreen() *ScreenInfo {
return &c.Setup.Roots[c.defaultScreen] return &c.Setup.Roots[c.defaultScreen]
} }
// Id is used for all X identifiers, such as windows, pixmaps, and GCs.
type Id uint32
// Event is an interface that can contain any of the events returned by the // 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. // server. Use a type assertion switch to extract the Event structs.
type Event interface { type Event interface {
@ -137,7 +134,7 @@ var newExtEventFuncs = make(map[string]map[int]newEventFun)
type Error interface { type Error interface {
ImplementsError() ImplementsError()
SequenceId() uint16 SequenceId() uint16
BadId() Id BadId() uint32
Error() string Error() string
} }
@ -158,7 +155,9 @@ type eventOrError interface{}
// NewID generates a new unused ID for use with requests like CreateWindow. // NewID generates a new unused ID for use with requests like CreateWindow.
// If no new ids can be generated, the id returned is 0 and error is non-nil. // If no new ids can be generated, the id returned is 0 and error is non-nil.
func (c *Conn) NewId() (Id, error) { // Note that the value returned will need to be converted to the proper
// type. i.e., xproto.Window(id).
func (c *Conn) NewId() (uint32, error) {
xid := <-c.xidChan xid := <-c.xidChan
if xid.err != nil { if xid.err != nil {
return 0, xid.err return 0, xid.err
@ -170,7 +169,7 @@ func (c *Conn) NewId() (Id, error) {
// channel. If no new resource id can be generated, id is set to 0 and a // channel. If no new resource id can be generated, id is set to 0 and a
// non-nil error is set in xid.err. // non-nil error is set in xid.err.
type xid struct { type xid struct {
id Id id uint32
err error err error
} }
@ -202,7 +201,7 @@ func (conn *Conn) generateXIds() {
// TODO: Use the XC Misc extension to look for released ids. // TODO: Use the XC Misc extension to look for released ids.
if last > 0 && last >= max-inc+1 { if last > 0 && last >= max-inc+1 {
conn.xidChan <- xid{ conn.xidChan <- xid{
id: Id(0), id: 0,
err: errors.New("There are no more available resource" + err: errors.New("There are no more available resource" +
"identifiers."), "identifiers."),
} }
@ -210,7 +209,7 @@ func (conn *Conn) generateXIds() {
last += inc last += inc
conn.xidChan <- xid{ conn.xidChan <- xid{
id: Id(last | conn.Setup.ResourceIdBase), id: last | conn.Setup.ResourceIdBase,
err: nil, err: nil,
} }
} }

View File

@ -127,7 +127,7 @@ func TestWindowEvents(t *testing.T) {
// The geometry to set the window. // The geometry to set the window.
gx, gy, gw, gh := 200, 400, 1000, 300 gx, gy, gw, gh := 200, 400, 1000, 300
wid, err := X.NewId() wid, err := X.NewWindowId()
if err != nil { if err != nil {
t.Fatalf("NewId: %s", err) t.Fatalf("NewId: %s", err)
} }

View File

@ -4,10 +4,6 @@ import (
"fmt" "fmt"
) )
// xgbResourceIdName is the name of the type used for all resource identifiers.
// As of right now, it needs to be declared somewhere manually.
var xgbGenResourceIdName = "Id"
// BaseTypeMap is a map from X base types to Go types. // BaseTypeMap is a map from X base types to Go types.
// X base types should correspond to the smallest set of X types // X base types should correspond to the smallest set of X types
// that can be used to rewrite ALL X types in terms of Go types. // that can be used to rewrite ALL X types in terms of Go types.
@ -27,7 +23,6 @@ var BaseTypeMap = map[string]string{
"double": "float64", "double": "float64",
"char": "byte", "char": "byte",
"void": "byte", "void": "byte",
"Id": "Id",
} }
// BaseTypeSizes should have precisely the same keys as in BaseTypeMap, // BaseTypeSizes should have precisely the same keys as in BaseTypeMap,
@ -45,7 +40,10 @@ var BaseTypeSizes = map[string]uint{
"double": 8, "double": 8,
"char": 1, "char": 1,
"void": 1, "void": 1,
"Id": 4,
// Id is a special type used to determine the size of all Xid types.
// "Id" is not actually written in the source.
"Id": 4,
} }
// TypeMap is a map from types in the XML to type names that is used // TypeMap is a map from types in the XML to type names that is used
@ -82,8 +80,16 @@ func (enum *Enum) Define(c *Context) {
// Resource types // Resource types
func (res *Resource) Define(c *Context) { func (res *Resource) Define(c *Context) {
c.Putln("// Skipping resource definition of '%s'", c.Putln("type %s uint32", res.SrcName())
SrcName(c.protocol, res.XmlName())) c.Putln("")
c.Putln("func (c *Conn) New%sId() (%s, error) {",
res.SrcName(), res.SrcName())
c.Putln("id, err := c.NewId()")
c.Putln("if err != nil {")
c.Putln("return 0, err")
c.Putln("}")
c.Putln("return %s(id), nil", res.SrcName())
c.Putln("}")
c.Putln("") c.Putln("")
} }

View File

@ -68,9 +68,9 @@ func (e *Error) ImplementsError(c *Context) {
c.Putln("return err.Sequence") c.Putln("return err.Sequence")
c.Putln("}") c.Putln("}")
c.Putln("") c.Putln("")
c.Putln("func (err %s) BadId() Id {", e.ErrType()) c.Putln("func (err %s) BadId() uint32 {", e.ErrType())
if !c.protocol.isExt() { if !c.protocol.isExt() {
c.Putln("return Id(err.BadValue)") c.Putln("return err.BadValue")
} else { } else {
c.Putln("return 0") c.Putln("return 0")
} }
@ -128,8 +128,12 @@ func (e *ErrorCopy) ImplementsError(c *Context) {
c.Putln("return err.Sequence") c.Putln("return err.Sequence")
c.Putln("}") c.Putln("}")
c.Putln("") c.Putln("")
c.Putln("func (err %s) BadId() Id {", e.ErrType()) c.Putln("func (err %s) BadId() uint32 {", e.ErrType())
c.Putln("return Id(err.BadValue)") if !c.protocol.isExt() {
c.Putln("return err.BadValue")
} else {
c.Putln("return 0")
}
c.Putln("}") c.Putln("}")
c.Putln("") c.Putln("")
c.Putln("func (err %s) Error() string {", e.ErrType()) c.Putln("func (err %s) Error() string {", e.ErrType())

View File

@ -16,7 +16,8 @@ func (f *ListField) Read(c *Context, prefix string) {
switch t := f.Type.(type) { switch t := f.Type.(type) {
case *Resource: case *Resource:
length := f.LengthExpr.Reduce(prefix) length := f.LengthExpr.Reduce(prefix)
c.Putln("%s%s = make([]Id, %s)", prefix, f.SrcName(), length) c.Putln("%s%s = make([]%s, %s)",
prefix, f.SrcName(), t.SrcName(), length)
c.Putln("for i := 0; i < int(%s); i++ {", length) c.Putln("for i := 0; i < int(%s); i++ {", length)
ReadSimpleSingleField(c, fmt.Sprintf("%s%s[i]", prefix, f.SrcName()), t) ReadSimpleSingleField(c, fmt.Sprintf("%s%s[i]", prefix, f.SrcName()), t)
c.Putln("}") c.Putln("}")

View File

@ -12,7 +12,7 @@ func (f *SingleField) Define(c *Context) {
func ReadSimpleSingleField(c *Context, name string, typ Type) { func ReadSimpleSingleField(c *Context, name string, typ Type) {
switch t := typ.(type) { switch t := typ.(type) {
case *Resource: case *Resource:
c.Putln("%s = Id(Get32(buf[b:]))", name) c.Putln("%s = %s(Get32(buf[b:]))", name, t.SrcName())
case *TypeDef: case *TypeDef:
switch t.Size().Eval() { switch t.Size().Eval() {
case 1: case 1:

View File

@ -395,11 +395,6 @@ func TypeSrcName(p *Protocol, typ Type) string {
return newt return newt
} }
// If it's a resource type, just use 'Id'.
if _, ok := typ.(*Resource); ok {
return xgbGenResourceIdName
}
// If there's a namespace to this type, just use it and be done. // If there's a namespace to this type, just use it and be done.
if colon := strings.Index(t, ":"); colon > -1 { if colon := strings.Index(t, ":"); colon > -1 {
namespace := t[:colon] namespace := t[:colon]