aboutsummaryrefslogtreecommitdiff
path: root/nexgb/auto_xprint.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/auto_xprint.go')
-rw-r--r--nexgb/auto_xprint.go42
1 files changed, 33 insertions, 9 deletions
diff --git a/nexgb/auto_xprint.go b/nexgb/auto_xprint.go
index 6790a86..6c9be85 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 6 2012 3:00:45am EDT.
+ This file was generated by xprint.xml on May 6 2012 5:48:48pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -9,15 +9,29 @@ package xgb
// in one package. They are still listed here for reference.
// import "xproto"
-// Skipping definition for base type 'Card16'
-
-// Skipping definition for base type 'Char'
+// XprintInit must be called before using the XpExtension extension.
+func (c *Conn) XprintInit() error {
+ reply, err := c.QueryExtension(11, "XpExtension").Reply()
+ switch {
+ case err != nil:
+ return err
+ case !reply.Present:
+ return newError("No extension named XpExtension could be found on on the server.")
+ }
-// Skipping definition for base type 'Card32'
+ c.extLock.Lock()
+ c.extensions["XpExtension"] = reply.MajorOpcode
+ for evNum, fun := range newExtEventFuncs["XpExtension"] {
+ newEventFuncs[int(reply.FirstEvent)+evNum] = fun
+ }
+ c.extLock.Unlock()
-// Skipping definition for base type 'Double'
+ return nil
+}
-// Skipping definition for base type 'Bool'
+func init() {
+ newExtEventFuncs["XpExtension"] = make(map[int]newEventFun)
+}
// Skipping definition for base type 'Float'
@@ -35,6 +49,16 @@ package xgb
// 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 (
XprintGetDocFinished = 0
XprintGetDocSecondConsumer = 1
@@ -241,7 +265,7 @@ func (v XprintNotifyEvent) String() string {
}
func init() {
- newEventFuncs[0] = NewXprintNotifyEvent
+ newExtEventFuncs["XpExtension"][0] = NewXprintNotifyEvent
}
// Event definition XprintAttributNotify (1)
@@ -307,7 +331,7 @@ func (v XprintAttributNotifyEvent) String() string {
}
func init() {
- newEventFuncs[1] = NewXprintAttributNotifyEvent
+ newExtEventFuncs["XpExtension"][1] = NewXprintAttributNotifyEvent
}
// Error definition XprintBadContext (0)