aboutsummaryrefslogtreecommitdiff
path: root/nexgb/auto_glx.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/auto_glx.go')
-rw-r--r--nexgb/auto_glx.go40
1 files changed, 32 insertions, 8 deletions
diff --git a/nexgb/auto_glx.go b/nexgb/auto_glx.go
index 4b6b2c5..1b88e6c 100644
--- a/nexgb/auto_glx.go
+++ b/nexgb/auto_glx.go
@@ -1,7 +1,7 @@
package xgb
/*
- This file was generated by glx.xml on May 6 2012 3:00:44am EDT.
+ This file was generated by glx.xml on May 6 2012 5:48:47pm 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'
+// GlxInit must be called before using the GLX extension.
+func (c *Conn) GlxInit() error {
+ reply, err := c.QueryExtension(3, "GLX").Reply()
+ switch {
+ case err != nil:
+ return err
+ case !reply.Present:
+ return newError("No extension named GLX could be found on on the server.")
+ }
-// Skipping definition for base type 'Card32'
+ c.extLock.Lock()
+ c.extensions["GLX"] = reply.MajorOpcode
+ for evNum, fun := range newExtEventFuncs["GLX"] {
+ 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["GLX"] = 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 (
GlxPbcetDamaged = 32791
GlxPbcetSaved = 32792
@@ -232,7 +256,7 @@ func (v GlxPbufferClobberEvent) String() string {
}
func init() {
- newEventFuncs[0] = NewGlxPbufferClobberEvent
+ newExtEventFuncs["GLX"][0] = NewGlxPbufferClobberEvent
}
// Error definition GlxGeneric (-1)