nexgb: export {Major,Minor}Version for extensions

This commit is contained in:
Přemysl Eric Janouch 2018-09-21 08:37:21 +02:00
parent 1a53c005e9
commit 28a5112532
Signed by: p
GPG Key ID: A0420B94F92B9493
26 changed files with 131 additions and 0 deletions

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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 {")

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()