aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xprint/xprint.go
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-11 23:58:52 -0400
committerAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-11 23:58:52 -0400
commit29942bf078c92fea681e42ca5029592526f00718 (patch)
treecee802ebe16e0b118c9be0f6265e26d31e8a5845 /nexgb/xprint/xprint.go
parentfb3128ed2a83a0f644661cedebbe5bfda3f4951e (diff)
downloadhaven-29942bf078c92fea681e42ca5029592526f00718.tar.gz
haven-29942bf078c92fea681e42ca5029592526f00718.tar.xz
haven-29942bf078c92fea681e42ca5029592526f00718.zip
panic when an extension request is issued before an extension has been initialized. but give a nice error message for the happy people.
Diffstat (limited to 'nexgb/xprint/xprint.go')
-rw-r--r--nexgb/xprint/xprint.go172
1 files changed, 161 insertions, 11 deletions
diff --git a/nexgb/xprint/xprint.go b/nexgb/xprint/xprint.go
index 9f4bd6b..8e6f470 100644
--- a/nexgb/xprint/xprint.go
+++ b/nexgb/xprint/xprint.go
@@ -2,7 +2,7 @@
package xprint
/*
- This file was generated by xprint.xml on May 11 2012 1:58:37am EDT.
+ This file was generated by xprint.xml on May 11 2012 11:57:20pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,6 +40,16 @@ func init() {
xgb.NewExtErrorFuncs["XpExtension"] = make(map[int]xgb.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 'Card8'
// Skipping definition for base type 'Int16'
@@ -54,16 +64,6 @@ func init() {
// 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 (
GetDocFinished = 0
GetDocSecondConsumer = 1
@@ -445,6 +445,9 @@ type PrintQueryVersionCookie struct {
// PrintQueryVersion sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintQueryVersionCookie.Reply()
func PrintQueryVersion(c *xgb.Conn) PrintQueryVersionCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintQueryVersion' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printQueryVersionRequest(c), cookie)
return PrintQueryVersionCookie{cookie}
@@ -453,6 +456,9 @@ func PrintQueryVersion(c *xgb.Conn) PrintQueryVersionCookie {
// PrintQueryVersionUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintQueryVersionUnchecked(c *xgb.Conn) PrintQueryVersionCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintQueryVersion' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printQueryVersionRequest(c), cookie)
return PrintQueryVersionCookie{cookie}
@@ -528,6 +534,9 @@ type PrintGetPrinterListCookie struct {
// PrintGetPrinterList sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintGetPrinterListCookie.Reply()
func PrintGetPrinterList(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) PrintGetPrinterListCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printGetPrinterListRequest(c, PrinterNameLen, LocaleLen, PrinterName, Locale), cookie)
return PrintGetPrinterListCookie{cookie}
@@ -536,6 +545,9 @@ func PrintGetPrinterList(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, P
// PrintGetPrinterListUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetPrinterListUnchecked(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) PrintGetPrinterListCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printGetPrinterListRequest(c, PrinterNameLen, LocaleLen, PrinterName, Locale), cookie)
return PrintGetPrinterListCookie{cookie}
@@ -632,6 +644,9 @@ type PrintRehashPrinterListCookie struct {
// PrintRehashPrinterList sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintRehashPrinterList(c *xgb.Conn) PrintRehashPrinterListCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintRehashPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printRehashPrinterListRequest(c), cookie)
return PrintRehashPrinterListCookie{cookie}
@@ -640,6 +655,9 @@ func PrintRehashPrinterList(c *xgb.Conn) PrintRehashPrinterListCookie {
// PrintRehashPrinterListChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintRehashPrinterListCookie.Check()
func PrintRehashPrinterListChecked(c *xgb.Conn) PrintRehashPrinterListCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintRehashPrinterList' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printRehashPrinterListRequest(c), cookie)
return PrintRehashPrinterListCookie{cookie}
@@ -678,6 +696,9 @@ type CreateContextCookie struct {
// CreateContext sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateContext(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) CreateContextCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(createContextRequest(c, ContextId, PrinterNameLen, LocaleLen, PrinterName, Locale), cookie)
return CreateContextCookie{cookie}
@@ -686,6 +707,9 @@ func CreateContext(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleL
// CreateContextChecked sends a checked request.
// If an error occurs, it can be retrieved using CreateContextCookie.Check()
func CreateContextChecked(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) CreateContextCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'CreateContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(createContextRequest(c, ContextId, PrinterNameLen, LocaleLen, PrinterName, Locale), cookie)
return CreateContextCookie{cookie}
@@ -745,6 +769,9 @@ type PrintSetContextCookie struct {
// PrintSetContext sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintSetContext(c *xgb.Conn, Context uint32) PrintSetContextCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintSetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printSetContextRequest(c, Context), cookie)
return PrintSetContextCookie{cookie}
@@ -753,6 +780,9 @@ func PrintSetContext(c *xgb.Conn, Context uint32) PrintSetContextCookie {
// PrintSetContextChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintSetContextCookie.Check()
func PrintSetContextChecked(c *xgb.Conn, Context uint32) PrintSetContextCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintSetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printSetContextRequest(c, Context), cookie)
return PrintSetContextCookie{cookie}
@@ -794,6 +824,9 @@ type PrintGetContextCookie struct {
// PrintGetContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintGetContextCookie.Reply()
func PrintGetContext(c *xgb.Conn) PrintGetContextCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printGetContextRequest(c), cookie)
return PrintGetContextCookie{cookie}
@@ -802,6 +835,9 @@ func PrintGetContext(c *xgb.Conn) PrintGetContextCookie {
// PrintGetContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetContextUnchecked(c *xgb.Conn) PrintGetContextCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printGetContextRequest(c), cookie)
return PrintGetContextCookie{cookie}
@@ -873,6 +909,9 @@ type PrintDestroyContextCookie struct {
// PrintDestroyContext sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintDestroyContext(c *xgb.Conn, Context uint32) PrintDestroyContextCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintDestroyContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printDestroyContextRequest(c, Context), cookie)
return PrintDestroyContextCookie{cookie}
@@ -881,6 +920,9 @@ func PrintDestroyContext(c *xgb.Conn, Context uint32) PrintDestroyContextCookie
// PrintDestroyContextChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintDestroyContextCookie.Check()
func PrintDestroyContextChecked(c *xgb.Conn, Context uint32) PrintDestroyContextCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintDestroyContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printDestroyContextRequest(c, Context), cookie)
return PrintDestroyContextCookie{cookie}
@@ -922,6 +964,9 @@ type PrintGetScreenOfContextCookie struct {
// PrintGetScreenOfContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintGetScreenOfContextCookie.Reply()
func PrintGetScreenOfContext(c *xgb.Conn) PrintGetScreenOfContextCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetScreenOfContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printGetScreenOfContextRequest(c), cookie)
return PrintGetScreenOfContextCookie{cookie}
@@ -930,6 +975,9 @@ func PrintGetScreenOfContext(c *xgb.Conn) PrintGetScreenOfContextCookie {
// PrintGetScreenOfContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetScreenOfContextUnchecked(c *xgb.Conn) PrintGetScreenOfContextCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetScreenOfContext' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printGetScreenOfContextRequest(c), cookie)
return PrintGetScreenOfContextCookie{cookie}
@@ -1001,6 +1049,9 @@ type PrintStartJobCookie struct {
// PrintStartJob sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintStartJob(c *xgb.Conn, OutputMode byte) PrintStartJobCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintStartJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printStartJobRequest(c, OutputMode), cookie)
return PrintStartJobCookie{cookie}
@@ -1009,6 +1060,9 @@ func PrintStartJob(c *xgb.Conn, OutputMode byte) PrintStartJobCookie {
// PrintStartJobChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintStartJobCookie.Check()
func PrintStartJobChecked(c *xgb.Conn, OutputMode byte) PrintStartJobCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintStartJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printStartJobRequest(c, OutputMode), cookie)
return PrintStartJobCookie{cookie}
@@ -1050,6 +1104,9 @@ type PrintEndJobCookie struct {
// PrintEndJob sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintEndJob(c *xgb.Conn, Cancel bool) PrintEndJobCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintEndJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printEndJobRequest(c, Cancel), cookie)
return PrintEndJobCookie{cookie}
@@ -1058,6 +1115,9 @@ func PrintEndJob(c *xgb.Conn, Cancel bool) PrintEndJobCookie {
// PrintEndJobChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintEndJobCookie.Check()
func PrintEndJobChecked(c *xgb.Conn, Cancel bool) PrintEndJobCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintEndJob' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printEndJobRequest(c, Cancel), cookie)
return PrintEndJobCookie{cookie}
@@ -1103,6 +1163,9 @@ type PrintStartDocCookie struct {
// PrintStartDoc sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintStartDoc(c *xgb.Conn, DriverMode byte) PrintStartDocCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintStartDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printStartDocRequest(c, DriverMode), cookie)
return PrintStartDocCookie{cookie}
@@ -1111,6 +1174,9 @@ func PrintStartDoc(c *xgb.Conn, DriverMode byte) PrintStartDocCookie {
// PrintStartDocChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintStartDocCookie.Check()
func PrintStartDocChecked(c *xgb.Conn, DriverMode byte) PrintStartDocCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintStartDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printStartDocRequest(c, DriverMode), cookie)
return PrintStartDocCookie{cookie}
@@ -1152,6 +1218,9 @@ type PrintEndDocCookie struct {
// PrintEndDoc sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintEndDoc(c *xgb.Conn, Cancel bool) PrintEndDocCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintEndDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printEndDocRequest(c, Cancel), cookie)
return PrintEndDocCookie{cookie}
@@ -1160,6 +1229,9 @@ func PrintEndDoc(c *xgb.Conn, Cancel bool) PrintEndDocCookie {
// PrintEndDocChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintEndDocCookie.Check()
func PrintEndDocChecked(c *xgb.Conn, Cancel bool) PrintEndDocCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintEndDoc' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printEndDocRequest(c, Cancel), cookie)
return PrintEndDocCookie{cookie}
@@ -1205,6 +1277,9 @@ type PrintPutDocumentDataCookie struct {
// PrintPutDocumentData sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintPutDocumentData(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) PrintPutDocumentDataCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintPutDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printPutDocumentDataRequest(c, Drawable, LenData, LenFmt, LenOptions, Data, DocFormat, Options), cookie)
return PrintPutDocumentDataCookie{cookie}
@@ -1213,6 +1288,9 @@ func PrintPutDocumentData(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32,
// PrintPutDocumentDataChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintPutDocumentDataCookie.Check()
func PrintPutDocumentDataChecked(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) PrintPutDocumentDataCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintPutDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printPutDocumentDataRequest(c, Drawable, LenData, LenFmt, LenOptions, Data, DocFormat, Options), cookie)
return PrintPutDocumentDataCookie{cookie}
@@ -1278,6 +1356,9 @@ type PrintGetDocumentDataCookie struct {
// PrintGetDocumentData sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintGetDocumentDataCookie.Reply()
func PrintGetDocumentData(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintGetDocumentDataCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printGetDocumentDataRequest(c, Context, MaxBytes), cookie)
return PrintGetDocumentDataCookie{cookie}
@@ -1286,6 +1367,9 @@ func PrintGetDocumentData(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintG
// PrintGetDocumentDataUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetDocumentDataUnchecked(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintGetDocumentDataCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetDocumentData' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printGetDocumentDataRequest(c, Context, MaxBytes), cookie)
return PrintGetDocumentDataCookie{cookie}
@@ -1379,6 +1463,9 @@ type PrintStartPageCookie struct {
// PrintStartPage sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintStartPage(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintStartPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printStartPageRequest(c, Window), cookie)
return PrintStartPageCookie{cookie}
@@ -1387,6 +1474,9 @@ func PrintStartPage(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie {
// PrintStartPageChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintStartPageCookie.Check()
func PrintStartPageChecked(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintStartPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printStartPageRequest(c, Window), cookie)
return PrintStartPageCookie{cookie}
@@ -1428,6 +1518,9 @@ type PrintEndPageCookie struct {
// PrintEndPage sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintEndPage(c *xgb.Conn, Cancel bool) PrintEndPageCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintEndPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printEndPageRequest(c, Cancel), cookie)
return PrintEndPageCookie{cookie}
@@ -1436,6 +1529,9 @@ func PrintEndPage(c *xgb.Conn, Cancel bool) PrintEndPageCookie {
// PrintEndPageChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintEndPageCookie.Check()
func PrintEndPageChecked(c *xgb.Conn, Cancel bool) PrintEndPageCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintEndPage' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printEndPageRequest(c, Cancel), cookie)
return PrintEndPageCookie{cookie}
@@ -1483,6 +1579,9 @@ type PrintSelectInputCookie struct {
// PrintSelectInput sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintSelectInput(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList []uint32) PrintSelectInputCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintSelectInput' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printSelectInputRequest(c, Context, EventMask, EventList), cookie)
return PrintSelectInputCookie{cookie}
@@ -1491,6 +1590,9 @@ func PrintSelectInput(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList
// PrintSelectInputChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintSelectInputCookie.Check()
func PrintSelectInputChecked(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList []uint32) PrintSelectInputCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintSelectInput' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printSelectInputRequest(c, Context, EventMask, EventList), cookie)
return PrintSelectInputCookie{cookie}
@@ -1540,6 +1642,9 @@ type PrintInputSelectedCookie struct {
// PrintInputSelected sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintInputSelectedCookie.Reply()
func PrintInputSelected(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintInputSelected' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printInputSelectedRequest(c, Context), cookie)
return PrintInputSelectedCookie{cookie}
@@ -1548,6 +1653,9 @@ func PrintInputSelected(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie
// PrintInputSelectedUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintInputSelectedUnchecked(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintInputSelected' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printInputSelectedRequest(c, Context), cookie)
return PrintInputSelectedCookie{cookie}
@@ -1642,6 +1750,9 @@ type PrintGetAttributesCookie struct {
// PrintGetAttributes sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintGetAttributesCookie.Reply()
func PrintGetAttributes(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttributesCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printGetAttributesRequest(c, Context, Pool), cookie)
return PrintGetAttributesCookie{cookie}
@@ -1650,6 +1761,9 @@ func PrintGetAttributes(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttrib
// PrintGetAttributesUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetAttributesUnchecked(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttributesCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printGetAttributesRequest(c, Context, Pool), cookie)
return PrintGetAttributesCookie{cookie}
@@ -1736,6 +1850,9 @@ type PrintGetOneAttributesCookie struct {
// PrintGetOneAttributes sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintGetOneAttributesCookie.Reply()
func PrintGetOneAttributes(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) PrintGetOneAttributesCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetOneAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printGetOneAttributesRequest(c, Context, NameLen, Pool, Name), cookie)
return PrintGetOneAttributesCookie{cookie}
@@ -1744,6 +1861,9 @@ func PrintGetOneAttributes(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool b
// PrintGetOneAttributesUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetOneAttributesUnchecked(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) PrintGetOneAttributesCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetOneAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printGetOneAttributesRequest(c, Context, NameLen, Pool, Name), cookie)
return PrintGetOneAttributesCookie{cookie}
@@ -1843,6 +1963,9 @@ type PrintSetAttributesCookie struct {
// PrintSetAttributes sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintSetAttributes(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) PrintSetAttributesCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintSetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(printSetAttributesRequest(c, Context, StringLen, Pool, Rule, Attributes), cookie)
return PrintSetAttributesCookie{cookie}
@@ -1851,6 +1974,9 @@ func PrintSetAttributes(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool by
// PrintSetAttributesChecked sends a checked request.
// If an error occurs, it can be retrieved using PrintSetAttributesCookie.Check()
func PrintSetAttributesChecked(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) PrintSetAttributesCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintSetAttributes' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(printSetAttributesRequest(c, Context, StringLen, Pool, Rule, Attributes), cookie)
return PrintSetAttributesCookie{cookie}
@@ -1909,6 +2035,9 @@ type PrintGetPageDimensionsCookie struct {
// PrintGetPageDimensions sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintGetPageDimensionsCookie.Reply()
func PrintGetPageDimensions(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetPageDimensions' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printGetPageDimensionsRequest(c, Context), cookie)
return PrintGetPageDimensionsCookie{cookie}
@@ -1917,6 +2046,9 @@ func PrintGetPageDimensions(c *xgb.Conn, Context Pcontext) PrintGetPageDimension
// PrintGetPageDimensionsUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetPageDimensionsUnchecked(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetPageDimensions' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printGetPageDimensionsRequest(c, Context), cookie)
return PrintGetPageDimensionsCookie{cookie}
@@ -2011,6 +2143,9 @@ type PrintQueryScreensCookie struct {
// PrintQueryScreens sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintQueryScreensCookie.Reply()
func PrintQueryScreens(c *xgb.Conn) PrintQueryScreensCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintQueryScreens' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printQueryScreensRequest(c), cookie)
return PrintQueryScreensCookie{cookie}
@@ -2019,6 +2154,9 @@ func PrintQueryScreens(c *xgb.Conn) PrintQueryScreensCookie {
// PrintQueryScreensUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintQueryScreensUnchecked(c *xgb.Conn) PrintQueryScreensCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintQueryScreens' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printQueryScreensRequest(c), cookie)
return PrintQueryScreensCookie{cookie}
@@ -2101,6 +2239,9 @@ type PrintSetImageResolutionCookie struct {
// PrintSetImageResolution sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintSetImageResolutionCookie.Reply()
func PrintSetImageResolution(c *xgb.Conn, Context Pcontext, ImageResolution uint16) PrintSetImageResolutionCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintSetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printSetImageResolutionRequest(c, Context, ImageResolution), cookie)
return PrintSetImageResolutionCookie{cookie}
@@ -2109,6 +2250,9 @@ func PrintSetImageResolution(c *xgb.Conn, Context Pcontext, ImageResolution uint
// PrintSetImageResolutionUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintSetImageResolutionUnchecked(c *xgb.Conn, Context Pcontext, ImageResolution uint16) PrintSetImageResolutionCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintSetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printSetImageResolutionRequest(c, Context, ImageResolution), cookie)
return PrintSetImageResolutionCookie{cookie}
@@ -2191,6 +2335,9 @@ type PrintGetImageResolutionCookie struct {
// PrintGetImageResolution sends a checked request.
// If an error occurs, it will be returned with the reply by calling PrintGetImageResolutionCookie.Reply()
func PrintGetImageResolution(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(printGetImageResolutionRequest(c, Context), cookie)
return PrintGetImageResolutionCookie{cookie}
@@ -2199,6 +2346,9 @@ func PrintGetImageResolution(c *xgb.Conn, Context Pcontext) PrintGetImageResolut
// PrintGetImageResolutionUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetImageResolutionUnchecked(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie {
+ if _, ok := c.Extensions["XPEXTENSION"]; !ok {
+ panic("Cannot issue request 'PrintGetImageResolution' using the uninitialized extension 'XpExtension'. xprint.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(printGetImageResolutionRequest(c, Context), cookie)
return PrintGetImageResolutionCookie{cookie}