diff options
| author | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-05-10 12:47:19 -0400 | 
|---|---|---|
| committer | Andrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu> | 2012-05-10 12:47:19 -0400 | 
| commit | e239bb3c68a4981a3916534203c2fbd6b96f593c (patch) | |
| tree | ebb9b1a4a4659d09edaf57ec39a744ff4bc15ff0 /nexgb/auto_xprint.go | |
| parent | 00c6217ca905b08ce0acda9a90492b5c1dc358e8 (diff) | |
| download | haven-e239bb3c68a4981a3916534203c2fbd6b96f593c.tar.gz haven-e239bb3c68a4981a3916534203c2fbd6b96f593c.tar.xz haven-e239bb3c68a4981a3916534203c2fbd6b96f593c.zip | |
make resource ids their own individual types. last commit before overhaul to sub-packages
Diffstat (limited to 'nexgb/auto_xprint.go')
| -rw-r--r-- | nexgb/auto_xprint.go | 106 | 
1 files changed, 56 insertions, 50 deletions
| diff --git a/nexgb/auto_xprint.go b/nexgb/auto_xprint.go index 5cd086a..cab145e 100644 --- a/nexgb/auto_xprint.go +++ b/nexgb/auto_xprint.go @@ -1,7 +1,7 @@  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!  */ @@ -37,8 +37,6 @@ func init() {  	newExtErrorFuncs["XpExtension"] = make(map[int]newErrorFun)  } -// Skipping definition for base type 'Int16' -  // Skipping definition for base type 'Int32'  // Skipping definition for base type 'Void' @@ -59,10 +57,10 @@ func init() {  // Skipping definition for base type 'Float' -// Skipping definition for base type 'Id' -  // Skipping definition for base type 'Card8' +// Skipping definition for base type 'Int16' +  const (  	XprintGetDocFinished       = 0  	XprintGetDocSecondConsumer = 1 @@ -93,7 +91,15 @@ const (  	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 @@ -198,7 +204,7 @@ const XprintNotify = 0  type XprintNotifyEvent struct {  	Sequence uint16  	Detail   byte -	Context  Id +	Context  XprintPcontext  	Cancel   bool  } @@ -213,7 +219,7 @@ func NewXprintNotifyEvent(buf []byte) Event {  	v.Sequence = Get16(buf[b:])  	b += 2 -	v.Context = Id(Get32(buf[b:])) +	v.Context = XprintPcontext(Get32(buf[b:]))  	b += 4  	if buf[b] == 1 { @@ -280,7 +286,7 @@ const XprintAttributNotify = 1  type XprintAttributNotifyEvent struct {  	Sequence uint16  	Detail   byte -	Context  Id +	Context  XprintPcontext  }  // Event read XprintAttributNotify @@ -294,7 +300,7 @@ func NewXprintAttributNotifyEvent(buf []byte) Event {  	v.Sequence = Get16(buf[b:])  	b += 2 -	v.Context = Id(Get32(buf[b:])) +	v.Context = XprintPcontext(Get32(buf[b:]))  	b += 4  	return v @@ -368,7 +374,7 @@ func (err XprintBadContextError) SequenceId() uint16 {  	return err.Sequence  } -func (err XprintBadContextError) BadId() Id { +func (err XprintBadContextError) BadId() uint32 {  	return 0  } @@ -413,7 +419,7 @@ func (err XprintBadSequenceError) SequenceId() uint16 {  	return err.Sequence  } -func (err XprintBadSequenceError) BadId() Id { +func (err XprintBadSequenceError) BadId() uint32 {  	return 0  } @@ -912,7 +918,7 @@ type XprintPrintGetScreenOfContextReply struct {  	Sequence uint16  	Length   uint32  	// padding: 1 bytes -	Root Id +	Root Window  }  // 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  	b += 4 -	v.Root = Id(Get32(buf[b:])) +	v.Root = Window(Get32(buf[b:]))  	b += 4  	return v @@ -1159,13 +1165,13 @@ type XprintPrintPutDocumentDataCookie struct {  }  // 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)  	c.newRequest(c.xprintPrintPutDocumentDataRequest(Drawable, LenData, LenFmt, LenOptions, Data, DocFormat, Options), 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)  	c.newRequest(c.xprintPrintPutDocumentDataRequest(Drawable, LenData, LenFmt, LenOptions, Data, DocFormat, Options), cookie)  	return XprintPrintPutDocumentDataCookie{cookie} @@ -1176,7 +1182,7 @@ func (cook XprintPrintPutDocumentDataCookie) Check() error {  }  // 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))))  	b := 0  	buf := make([]byte, size) @@ -1226,13 +1232,13 @@ type XprintPrintGetDocumentDataCookie struct {  	*cookie  } -func (c *Conn) XprintPrintGetDocumentData(Context Id, MaxBytes uint32) XprintPrintGetDocumentDataCookie { +func (c *Conn) XprintPrintGetDocumentData(Context XprintPcontext, MaxBytes uint32) XprintPrintGetDocumentDataCookie {  	cookie := c.newCookie(true, true)  	c.newRequest(c.xprintPrintGetDocumentDataRequest(Context, MaxBytes), 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)  	c.newRequest(c.xprintPrintGetDocumentDataRequest(Context, MaxBytes), cookie)  	return XprintPrintGetDocumentDataCookie{cookie} @@ -1299,7 +1305,7 @@ func (cook XprintPrintGetDocumentDataCookie) Check() error {  }  // 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  	b := 0  	buf := make([]byte, size) @@ -1329,13 +1335,13 @@ type XprintPrintStartPageCookie struct {  }  // 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)  	c.newRequest(c.xprintPrintStartPageRequest(Window), cookie)  	return XprintPrintStartPageCookie{cookie}  } -func (c *Conn) XprintPrintStartPageChecked(Window Id) XprintPrintStartPageCookie { +func (c *Conn) XprintPrintStartPageChecked(Window Window) XprintPrintStartPageCookie {  	cookie := c.newCookie(true, false)  	c.newRequest(c.xprintPrintStartPageRequest(Window), cookie)  	return XprintPrintStartPageCookie{cookie} @@ -1346,7 +1352,7 @@ func (cook XprintPrintStartPageCookie) Check() error {  }  // Write request to wire for XprintPrintStartPage -func (c *Conn) xprintPrintStartPageRequest(Window Id) []byte { +func (c *Conn) xprintPrintStartPageRequest(Window Window) []byte {  	size := 8  	b := 0  	buf := make([]byte, size) @@ -1423,13 +1429,13 @@ type XprintPrintSelectInputCookie struct {  }  // 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)  	c.newRequest(c.xprintPrintSelectInputRequest(Context, EventMask, EventList), 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)  	c.newRequest(c.xprintPrintSelectInputRequest(Context, EventMask, EventList), cookie)  	return XprintPrintSelectInputCookie{cookie} @@ -1440,7 +1446,7 @@ func (cook XprintPrintSelectInputCookie) Check() error {  }  // 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)))))))  	b := 0  	buf := make([]byte, size) @@ -1474,13 +1480,13 @@ type XprintPrintInputSelectedCookie struct {  	*cookie  } -func (c *Conn) XprintPrintInputSelected(Context Id) XprintPrintInputSelectedCookie { +func (c *Conn) XprintPrintInputSelected(Context XprintPcontext) XprintPrintInputSelectedCookie {  	cookie := c.newCookie(true, true)  	c.newRequest(c.xprintPrintInputSelectedRequest(Context), cookie)  	return XprintPrintInputSelectedCookie{cookie}  } -func (c *Conn) XprintPrintInputSelectedUnchecked(Context Id) XprintPrintInputSelectedCookie { +func (c *Conn) XprintPrintInputSelectedUnchecked(Context XprintPcontext) XprintPrintInputSelectedCookie {  	cookie := c.newCookie(false, true)  	c.newRequest(c.xprintPrintInputSelectedRequest(Context), cookie)  	return XprintPrintInputSelectedCookie{cookie} @@ -1551,7 +1557,7 @@ func (cook XprintPrintInputSelectedCookie) Check() error {  }  // Write request to wire for XprintPrintInputSelected -func (c *Conn) xprintPrintInputSelectedRequest(Context Id) []byte { +func (c *Conn) xprintPrintInputSelectedRequest(Context XprintPcontext) []byte {  	size := 8  	b := 0  	buf := make([]byte, size) @@ -1577,13 +1583,13 @@ type XprintPrintGetAttributesCookie struct {  	*cookie  } -func (c *Conn) XprintPrintGetAttributes(Context Id, Pool byte) XprintPrintGetAttributesCookie { +func (c *Conn) XprintPrintGetAttributes(Context XprintPcontext, Pool byte) XprintPrintGetAttributesCookie {  	cookie := c.newCookie(true, true)  	c.newRequest(c.xprintPrintGetAttributesRequest(Context, Pool), 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)  	c.newRequest(c.xprintPrintGetAttributesRequest(Context, Pool), cookie)  	return XprintPrintGetAttributesCookie{cookie} @@ -1641,7 +1647,7 @@ func (cook XprintPrintGetAttributesCookie) Check() error {  }  // 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  	b := 0  	buf := make([]byte, size) @@ -1672,13 +1678,13 @@ type XprintPrintGetOneAttributesCookie struct {  	*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)  	c.newRequest(c.xprintPrintGetOneAttributesRequest(Context, NameLen, Pool, Name), 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)  	c.newRequest(c.xprintPrintGetOneAttributesRequest(Context, NameLen, Pool, Name), cookie)  	return XprintPrintGetOneAttributesCookie{cookie} @@ -1740,7 +1746,7 @@ func (cook XprintPrintGetOneAttributesCookie) Check() error {  }  // 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))))  	b := 0  	buf := make([]byte, size) @@ -1781,13 +1787,13 @@ type XprintPrintSetAttributesCookie struct {  }  // 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)  	c.newRequest(c.xprintPrintSetAttributesRequest(Context, StringLen, Pool, Rule, Attributes), 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)  	c.newRequest(c.xprintPrintSetAttributesRequest(Context, StringLen, Pool, Rule, Attributes), cookie)  	return XprintPrintSetAttributesCookie{cookie} @@ -1798,7 +1804,7 @@ func (cook XprintPrintSetAttributesCookie) Check() error {  }  // 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))))  	b := 0  	buf := make([]byte, size) @@ -1841,13 +1847,13 @@ type XprintPrintGetPageDimensionsCookie struct {  	*cookie  } -func (c *Conn) XprintPrintGetPageDimensions(Context Id) XprintPrintGetPageDimensionsCookie { +func (c *Conn) XprintPrintGetPageDimensions(Context XprintPcontext) XprintPrintGetPageDimensionsCookie {  	cookie := c.newCookie(true, true)  	c.newRequest(c.xprintPrintGetPageDimensionsRequest(Context), cookie)  	return XprintPrintGetPageDimensionsCookie{cookie}  } -func (c *Conn) XprintPrintGetPageDimensionsUnchecked(Context Id) XprintPrintGetPageDimensionsCookie { +func (c *Conn) XprintPrintGetPageDimensionsUnchecked(Context XprintPcontext) XprintPrintGetPageDimensionsCookie {  	cookie := c.newCookie(false, true)  	c.newRequest(c.xprintPrintGetPageDimensionsRequest(Context), cookie)  	return XprintPrintGetPageDimensionsCookie{cookie} @@ -1918,7 +1924,7 @@ func (cook XprintPrintGetPageDimensionsCookie) Check() error {  }  // Write request to wire for XprintPrintGetPageDimensions -func (c *Conn) xprintPrintGetPageDimensionsRequest(Context Id) []byte { +func (c *Conn) xprintPrintGetPageDimensionsRequest(Context XprintPcontext) []byte {  	size := 8  	b := 0  	buf := make([]byte, size) @@ -1964,7 +1970,7 @@ type XprintPrintQueryScreensReply struct {  	// padding: 1 bytes  	ListCount uint32  	// 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 @@ -1997,9 +2003,9 @@ func xprintPrintQueryScreensReply(buf []byte) *XprintPrintQueryScreensReply {  	b += 20 // padding -	v.Roots = make([]Id, v.ListCount) +	v.Roots = make([]Window, v.ListCount)  	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 = pad(b) @@ -2035,13 +2041,13 @@ type XprintPrintSetImageResolutionCookie struct {  	*cookie  } -func (c *Conn) XprintPrintSetImageResolution(Context Id, ImageResolution uint16) XprintPrintSetImageResolutionCookie { +func (c *Conn) XprintPrintSetImageResolution(Context XprintPcontext, ImageResolution uint16) XprintPrintSetImageResolutionCookie {  	cookie := c.newCookie(true, true)  	c.newRequest(c.xprintPrintSetImageResolutionRequest(Context, ImageResolution), 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)  	c.newRequest(c.xprintPrintSetImageResolutionRequest(Context, ImageResolution), cookie)  	return XprintPrintSetImageResolutionCookie{cookie} @@ -2097,7 +2103,7 @@ func (cook XprintPrintSetImageResolutionCookie) Check() error {  }  // 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  	b := 0  	buf := make([]byte, size) @@ -2126,13 +2132,13 @@ type XprintPrintGetImageResolutionCookie struct {  	*cookie  } -func (c *Conn) XprintPrintGetImageResolution(Context Id) XprintPrintGetImageResolutionCookie { +func (c *Conn) XprintPrintGetImageResolution(Context XprintPcontext) XprintPrintGetImageResolutionCookie {  	cookie := c.newCookie(true, true)  	c.newRequest(c.xprintPrintGetImageResolutionRequest(Context), cookie)  	return XprintPrintGetImageResolutionCookie{cookie}  } -func (c *Conn) XprintPrintGetImageResolutionUnchecked(Context Id) XprintPrintGetImageResolutionCookie { +func (c *Conn) XprintPrintGetImageResolutionUnchecked(Context XprintPcontext) XprintPrintGetImageResolutionCookie {  	cookie := c.newCookie(false, true)  	c.newRequest(c.xprintPrintGetImageResolutionRequest(Context), cookie)  	return XprintPrintGetImageResolutionCookie{cookie} @@ -2183,7 +2189,7 @@ func (cook XprintPrintGetImageResolutionCookie) Check() error {  }  // Write request to wire for XprintPrintGetImageResolution -func (c *Conn) xprintPrintGetImageResolutionRequest(Context Id) []byte { +func (c *Conn) xprintPrintGetImageResolutionRequest(Context XprintPcontext) []byte {  	size := 8  	b := 0  	buf := make([]byte, size) | 
