aboutsummaryrefslogtreecommitdiff
path: root/nexgb/auto_shape.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/auto_shape.go')
-rw-r--r--nexgb/auto_shape.go28
1 files changed, 26 insertions, 2 deletions
diff --git a/nexgb/auto_shape.go b/nexgb/auto_shape.go
index b5c5f04..a28836c 100644
--- a/nexgb/auto_shape.go
+++ b/nexgb/auto_shape.go
@@ -1,7 +1,7 @@
package xgb
/*
- This file was generated by shape.xml on May 6 2012 3:00:44am EDT.
+ This file was generated by shape.xml on May 6 2012 5:48:47pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -9,6 +9,30 @@ package xgb
// in one package. They are still listed here for reference.
// import "xproto"
+// ShapeInit must be called before using the SHAPE extension.
+func (c *Conn) ShapeInit() error {
+ reply, err := c.QueryExtension(5, "SHAPE").Reply()
+ switch {
+ case err != nil:
+ return err
+ case !reply.Present:
+ return newError("No extension named SHAPE could be found on on the server.")
+ }
+
+ c.extLock.Lock()
+ c.extensions["SHAPE"] = reply.MajorOpcode
+ for evNum, fun := range newExtEventFuncs["SHAPE"] {
+ newEventFuncs[int(reply.FirstEvent)+evNum] = fun
+ }
+ c.extLock.Unlock()
+
+ return nil
+}
+
+func init() {
+ newExtEventFuncs["SHAPE"] = make(map[int]newEventFun)
+}
+
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
@@ -177,7 +201,7 @@ func (v ShapeNotifyEvent) String() string {
}
func init() {
- newEventFuncs[0] = NewShapeNotifyEvent
+ newExtEventFuncs["SHAPE"][0] = NewShapeNotifyEvent
}
// Request ShapeQueryVersion