aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nexgb/bigreq/bigreq.go5
-rw-r--r--nexgb/composite/composite.go5
-rw-r--r--nexgb/damage/damage.go5
-rw-r--r--nexgb/dpms/dpms.go5
-rw-r--r--nexgb/dri2/dri2.go5
-rw-r--r--nexgb/ge/ge.go5
-rw-r--r--nexgb/glx/glx.go5
-rw-r--r--nexgb/randr/randr.go5
-rw-r--r--nexgb/record/record.go5
-rw-r--r--nexgb/render/render.go5
-rw-r--r--nexgb/res/res.go5
-rw-r--r--nexgb/screensaver/screensaver.go5
-rw-r--r--nexgb/shape/shape.go5
-rw-r--r--nexgb/shm/shm.go5
-rw-r--r--nexgb/xcmisc/xcmisc.go5
-rw-r--r--nexgb/xevie/xevie.go5
-rw-r--r--nexgb/xf86dri/xf86dri.go5
-rw-r--r--nexgb/xf86vidmode/xf86vidmode.go5
-rw-r--r--nexgb/xfixes/xfixes.go5
-rw-r--r--nexgb/xgbgen/context.go6
-rw-r--r--nexgb/xinerama/xinerama.go5
-rw-r--r--nexgb/xprint/xprint.go5
-rw-r--r--nexgb/xselinux/xselinux.go5
-rw-r--r--nexgb/xtest/xtest.go5
-rw-r--r--nexgb/xv/xv.go5
-rw-r--r--nexgb/xvmc/xvmc.go5
26 files changed, 131 insertions, 0 deletions
diff --git a/nexgb/bigreq/bigreq.go b/nexgb/bigreq/bigreq.go
index d045d7f..b0dd1a8 100644
--- a/nexgb/bigreq/bigreq.go
+++ b/nexgb/bigreq/bigreq.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 0
+ MinorVersion = 0
+)
+
// Init must be called before using the BIG-REQUESTS extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 12, "BIG-REQUESTS").Reply()
diff --git a/nexgb/composite/composite.go b/nexgb/composite/composite.go
index a7047d0..cad0ce1 100644
--- a/nexgb/composite/composite.go
+++ b/nexgb/composite/composite.go
@@ -10,6 +10,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 0
+ MinorVersion = 4
+)
+
// Init must be called before using the Composite extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 9, "Composite").Reply()
diff --git a/nexgb/damage/damage.go b/nexgb/damage/damage.go
index d83246c..7edccd2 100644
--- a/nexgb/damage/damage.go
+++ b/nexgb/damage/damage.go
@@ -10,6 +10,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 1
+)
+
// Init must be called before using the DAMAGE extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 6, "DAMAGE").Reply()
diff --git a/nexgb/dpms/dpms.go b/nexgb/dpms/dpms.go
index 64aa176..3c4b7ce 100644
--- a/nexgb/dpms/dpms.go
+++ b/nexgb/dpms/dpms.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 0
+ MinorVersion = 0
+)
+
// Init must be called before using the DPMS extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 4, "DPMS").Reply()
diff --git a/nexgb/dri2/dri2.go b/nexgb/dri2/dri2.go
index 30dd60c..5ae789d 100644
--- a/nexgb/dri2/dri2.go
+++ b/nexgb/dri2/dri2.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 4
+)
+
// Init must be called before using the DRI2 extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 4, "DRI2").Reply()
diff --git a/nexgb/ge/ge.go b/nexgb/ge/ge.go
index b2bffdd..676a4ed 100644
--- a/nexgb/ge/ge.go
+++ b/nexgb/ge/ge.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 0
+)
+
// Init must be called before using the Generic Event Extension extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 23, "Generic Event Extension").Reply()
diff --git a/nexgb/glx/glx.go b/nexgb/glx/glx.go
index 9a03429..cba9593 100644
--- a/nexgb/glx/glx.go
+++ b/nexgb/glx/glx.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 4
+)
+
// Init must be called before using the GLX extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 3, "GLX").Reply()
diff --git a/nexgb/randr/randr.go b/nexgb/randr/randr.go
index bb7bc61..63717be 100644
--- a/nexgb/randr/randr.go
+++ b/nexgb/randr/randr.go
@@ -10,6 +10,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 5
+)
+
// Init must be called before using the RANDR extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 5, "RANDR").Reply()
diff --git a/nexgb/record/record.go b/nexgb/record/record.go
index fd04dc7..c981bdd 100644
--- a/nexgb/record/record.go
+++ b/nexgb/record/record.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 13
+)
+
// Init must be called before using the RECORD extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 6, "RECORD").Reply()
diff --git a/nexgb/render/render.go b/nexgb/render/render.go
index fdd9d41..458869d 100644
--- a/nexgb/render/render.go
+++ b/nexgb/render/render.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 0
+ MinorVersion = 11
+)
+
// Init must be called before using the RENDER extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 6, "RENDER").Reply()
diff --git a/nexgb/res/res.go b/nexgb/res/res.go
index b97f562..27f659e 100644
--- a/nexgb/res/res.go
+++ b/nexgb/res/res.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 2
+)
+
// Init must be called before using the X-Resource extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 10, "X-Resource").Reply()
diff --git a/nexgb/screensaver/screensaver.go b/nexgb/screensaver/screensaver.go
index eb128cf..dd31e10 100644
--- a/nexgb/screensaver/screensaver.go
+++ b/nexgb/screensaver/screensaver.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 1
+)
+
// Init must be called before using the MIT-SCREEN-SAVER extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 16, "MIT-SCREEN-SAVER").Reply()
diff --git a/nexgb/shape/shape.go b/nexgb/shape/shape.go
index 3a4af24..90eba07 100644
--- a/nexgb/shape/shape.go
+++ b/nexgb/shape/shape.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 1
+)
+
// Init must be called before using the SHAPE extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 5, "SHAPE").Reply()
diff --git a/nexgb/shm/shm.go b/nexgb/shm/shm.go
index cad726a..36fd043 100644
--- a/nexgb/shm/shm.go
+++ b/nexgb/shm/shm.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 2
+)
+
// Init must be called before using the MIT-SHM extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 7, "MIT-SHM").Reply()
diff --git a/nexgb/xcmisc/xcmisc.go b/nexgb/xcmisc/xcmisc.go
index 71cc078..7a9d486 100644
--- a/nexgb/xcmisc/xcmisc.go
+++ b/nexgb/xcmisc/xcmisc.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 1
+)
+
// Init must be called before using the XC-MISC extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 7, "XC-MISC").Reply()
diff --git a/nexgb/xevie/xevie.go b/nexgb/xevie/xevie.go
index 6a3637d..76b8e56 100644
--- a/nexgb/xevie/xevie.go
+++ b/nexgb/xevie/xevie.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 0
+)
+
// Init must be called before using the XEVIE extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 5, "XEVIE").Reply()
diff --git a/nexgb/xf86dri/xf86dri.go b/nexgb/xf86dri/xf86dri.go
index dec6b37..42f04d1 100644
--- a/nexgb/xf86dri/xf86dri.go
+++ b/nexgb/xf86dri/xf86dri.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 4
+ MinorVersion = 1
+)
+
// Init must be called before using the XFree86-DRI extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 11, "XFree86-DRI").Reply()
diff --git a/nexgb/xf86vidmode/xf86vidmode.go b/nexgb/xf86vidmode/xf86vidmode.go
index fd9d70f..7529c5a 100644
--- a/nexgb/xf86vidmode/xf86vidmode.go
+++ b/nexgb/xf86vidmode/xf86vidmode.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 2
+ MinorVersion = 2
+)
+
// Init must be called before using the XFree86-VidModeExtension extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 24, "XFree86-VidModeExtension").Reply()
diff --git a/nexgb/xfixes/xfixes.go b/nexgb/xfixes/xfixes.go
index 7716d09..50bf40d 100644
--- a/nexgb/xfixes/xfixes.go
+++ b/nexgb/xfixes/xfixes.go
@@ -11,6 +11,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 5
+ MinorVersion = 0
+)
+
// Init must be called before using the XFIXES extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 6, "XFIXES").Reply()
diff --git a/nexgb/xgbgen/context.go b/nexgb/xgbgen/context.go
index 579c480..32dee58 100644
--- a/nexgb/xgbgen/context.go
+++ b/nexgb/xgbgen/context.go
@@ -101,6 +101,12 @@ func (c *Context) Morph(xmlBytes []byte) {
if c.protocol.isExt() {
xname := c.protocol.ExtXName
+ c.Putln("const (")
+ c.Putln("MajorVersion = %s", c.protocol.MajorVersion)
+ c.Putln("MinorVersion = %s", c.protocol.MinorVersion)
+ c.Putln(")")
+ c.Putln("")
+
c.Putln("// Init must be called before using the %s extension.",
xname)
c.Putln("func Init(c *xgb.Conn) error {")
diff --git a/nexgb/xinerama/xinerama.go b/nexgb/xinerama/xinerama.go
index fe4f164..31b9f8d 100644
--- a/nexgb/xinerama/xinerama.go
+++ b/nexgb/xinerama/xinerama.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 1
+)
+
// Init must be called before using the XINERAMA extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 8, "XINERAMA").Reply()
diff --git a/nexgb/xprint/xprint.go b/nexgb/xprint/xprint.go
index 7616845..7d7d3e4 100644
--- a/nexgb/xprint/xprint.go
+++ b/nexgb/xprint/xprint.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 0
+)
+
// Init must be called before using the XpExtension extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 11, "XpExtension").Reply()
diff --git a/nexgb/xselinux/xselinux.go b/nexgb/xselinux/xselinux.go
index 7265c26..5f53e2e 100644
--- a/nexgb/xselinux/xselinux.go
+++ b/nexgb/xselinux/xselinux.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 0
+)
+
// Init must be called before using the SELinux extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 7, "SELinux").Reply()
diff --git a/nexgb/xtest/xtest.go b/nexgb/xtest/xtest.go
index bf961f7..282f004 100644
--- a/nexgb/xtest/xtest.go
+++ b/nexgb/xtest/xtest.go
@@ -9,6 +9,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 2
+ MinorVersion = 2
+)
+
// Init must be called before using the XTEST extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 5, "XTEST").Reply()
diff --git a/nexgb/xv/xv.go b/nexgb/xv/xv.go
index df81bac..1c658c5 100644
--- a/nexgb/xv/xv.go
+++ b/nexgb/xv/xv.go
@@ -10,6 +10,11 @@ import (
"janouch.name/haven/nexgb/xproto"
)
+const (
+ MajorVersion = 2
+ MinorVersion = 2
+)
+
// Init must be called before using the XVideo extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 6, "XVideo").Reply()
diff --git a/nexgb/xvmc/xvmc.go b/nexgb/xvmc/xvmc.go
index b05f952..ca4c831 100644
--- a/nexgb/xvmc/xvmc.go
+++ b/nexgb/xvmc/xvmc.go
@@ -10,6 +10,11 @@ import (
"janouch.name/haven/nexgb/xv"
)
+const (
+ MajorVersion = 1
+ MinorVersion = 1
+)
+
// Init must be called before using the XVideo-MotionCompensation extension.
func Init(c *xgb.Conn) error {
reply, err := xproto.QueryExtension(c, 25, "XVideo-MotionCompensation").Reply()