aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xevie
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2013-08-11 20:43:26 -0400
committerPřemysl Janouch <p@janouch.name>2018-09-08 16:49:17 +0200
commit0685fb57e14104ee4ad9f70ec94f787a9a22c028 (patch)
treec52429c82379c154c95dbfafcfc52460ec9168c0 /nexgb/xevie
parent4b20ffaf4f4cc756832a6d064d5dfe182f16b0e9 (diff)
downloadhaven-0685fb57e14104ee4ad9f70ec94f787a9a22c028.tar.gz
haven-0685fb57e14104ee4ad9f70ec94f787a9a22c028.tar.xz
haven-0685fb57e14104ee4ad9f70ec94f787a9a22c028.zip
Update to latest xproto XML.
Diffstat (limited to 'nexgb/xevie')
-rw-r--r--nexgb/xevie/xevie.go292
1 files changed, 146 insertions, 146 deletions
diff --git a/nexgb/xevie/xevie.go b/nexgb/xevie/xevie.go
index 83dadef..0dd5aca 100644
--- a/nexgb/xevie/xevie.go
+++ b/nexgb/xevie/xevie.go
@@ -2,7 +2,7 @@
package xevie
/*
- This file was generated by xevie.xml on Jun 5 2012 12:11:59am EDT.
+ This file was generated by xevie.xml on Aug 11 2013 8:39:43pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,30 +40,6 @@ func init() {
xgb.NewExtErrorFuncs["XEVIE"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Card8'
-
-// Skipping definition for base type 'Int16'
-
-// Skipping definition for base type 'Int32'
-
-// Skipping definition for base type 'Void'
-
-// Skipping definition for base type 'Byte'
-
-// 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'
-
-// Skipping definition for base type 'Float'
-
const (
DatatypeUnmodified = 0
DatatypeModified = 1
@@ -114,45 +90,67 @@ func EventListBytes(buf []byte, list []Event) int {
return b
}
-// QueryVersionCookie is a cookie used only for QueryVersion requests.
-type QueryVersionCookie struct {
+// Skipping definition for base type 'Bool'
+
+// Skipping definition for base type 'Byte'
+
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Char'
+
+// Skipping definition for base type 'Void'
+
+// Skipping definition for base type 'Double'
+
+// Skipping definition for base type 'Float'
+
+// Skipping definition for base type 'Int16'
+
+// Skipping definition for base type 'Int32'
+
+// Skipping definition for base type 'Int8'
+
+// Skipping definition for base type 'Card16'
+
+// Skipping definition for base type 'Card32'
+
+// EndCookie is a cookie used only for End requests.
+type EndCookie struct {
*xgb.Cookie
}
-// QueryVersion sends a checked request.
-// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
-func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie {
+// End sends a checked request.
+// If an error occurs, it will be returned with the reply by calling EndCookie.Reply()
+func End(c *xgb.Conn, Cmap uint32) EndCookie {
if _, ok := c.Extensions["XEVIE"]; !ok {
- panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
+ panic("Cannot issue request 'End' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
}
cookie := c.NewCookie(true, true)
- c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
- return QueryVersionCookie{cookie}
+ c.NewRequest(endRequest(c, Cmap), cookie)
+ return EndCookie{cookie}
}
-// QueryVersionUnchecked sends an unchecked request.
+// EndUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
-func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie {
+func EndUnchecked(c *xgb.Conn, Cmap uint32) EndCookie {
if _, ok := c.Extensions["XEVIE"]; !ok {
- panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
+ panic("Cannot issue request 'End' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
}
cookie := c.NewCookie(false, true)
- c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
- return QueryVersionCookie{cookie}
+ c.NewRequest(endRequest(c, Cmap), cookie)
+ return EndCookie{cookie}
}
-// QueryVersionReply represents the data returned from a QueryVersion request.
-type QueryVersionReply struct {
+// EndReply represents the data returned from a End request.
+type EndReply struct {
Sequence uint16 // sequence number of the request for this reply
Length uint32 // number of bytes in this reply
// padding: 1 bytes
- ServerMajorVersion uint16
- ServerMinorVersion uint16
- // padding: 20 bytes
+ // padding: 24 bytes
}
-// Reply blocks and returns the reply data for a QueryVersion request.
-func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
+// Reply blocks and returns the reply data for a End request.
+func (cook EndCookie) Reply() (*EndReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
return nil, err
@@ -160,12 +158,12 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
if buf == nil {
return nil, nil
}
- return queryVersionReply(buf), nil
+ return endReply(buf), nil
}
-// queryVersionReply reads a byte slice into a QueryVersionReply value.
-func queryVersionReply(buf []byte) *QueryVersionReply {
- v := new(QueryVersionReply)
+// endReply reads a byte slice into a EndReply value.
+func endReply(buf []byte) *EndReply {
+ v := new(EndReply)
b := 1 // skip reply determinant
b += 1 // padding
@@ -176,20 +174,14 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
v.Length = xgb.Get32(buf[b:]) // 4-byte units
b += 4
- v.ServerMajorVersion = xgb.Get16(buf[b:])
- b += 2
-
- v.ServerMinorVersion = xgb.Get16(buf[b:])
- b += 2
-
- b += 20 // padding
+ b += 24 // padding
return v
}
-// Write request to wire for QueryVersion
-// queryVersionRequest writes a QueryVersion request to a byte slice.
-func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) []byte {
+// Write request to wire for End
+// endRequest writes a End request to a byte slice.
+func endRequest(c *xgb.Conn, Cmap uint32) []byte {
size := 8
b := 0
buf := make([]byte, size)
@@ -197,58 +189,57 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVers
buf[b] = c.Extensions["XEVIE"]
b += 1
- buf[b] = 0 // request opcode
+ buf[b] = 2 // request opcode
b += 1
xgb.Put16(buf[b:], uint16(size/4)) // write request size in 4-byte units
b += 2
- xgb.Put16(buf[b:], ClientMajorVersion)
- b += 2
-
- xgb.Put16(buf[b:], ClientMinorVersion)
- b += 2
+ xgb.Put32(buf[b:], Cmap)
+ b += 4
return buf
}
-// StartCookie is a cookie used only for Start requests.
-type StartCookie struct {
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
+type QueryVersionCookie struct {
*xgb.Cookie
}
-// Start sends a checked request.
-// If an error occurs, it will be returned with the reply by calling StartCookie.Reply()
-func Start(c *xgb.Conn, Screen uint32) StartCookie {
+// QueryVersion sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
+func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie {
if _, ok := c.Extensions["XEVIE"]; !ok {
- panic("Cannot issue request 'Start' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
+ panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
}
cookie := c.NewCookie(true, true)
- c.NewRequest(startRequest(c, Screen), cookie)
- return StartCookie{cookie}
+ c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
+ return QueryVersionCookie{cookie}
}
-// StartUnchecked sends an unchecked request.
+// QueryVersionUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
-func StartUnchecked(c *xgb.Conn, Screen uint32) StartCookie {
+func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie {
if _, ok := c.Extensions["XEVIE"]; !ok {
- panic("Cannot issue request 'Start' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
+ panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
}
cookie := c.NewCookie(false, true)
- c.NewRequest(startRequest(c, Screen), cookie)
- return StartCookie{cookie}
+ c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
+ return QueryVersionCookie{cookie}
}
-// StartReply represents the data returned from a Start request.
-type StartReply struct {
+// QueryVersionReply represents the data returned from a QueryVersion request.
+type QueryVersionReply struct {
Sequence uint16 // sequence number of the request for this reply
Length uint32 // number of bytes in this reply
// padding: 1 bytes
- // padding: 24 bytes
+ ServerMajorVersion uint16
+ ServerMinorVersion uint16
+ // padding: 20 bytes
}
-// Reply blocks and returns the reply data for a Start request.
-func (cook StartCookie) Reply() (*StartReply, error) {
+// Reply blocks and returns the reply data for a QueryVersion request.
+func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
return nil, err
@@ -256,12 +247,12 @@ func (cook StartCookie) Reply() (*StartReply, error) {
if buf == nil {
return nil, nil
}
- return startReply(buf), nil
+ return queryVersionReply(buf), nil
}
-// startReply reads a byte slice into a StartReply value.
-func startReply(buf []byte) *StartReply {
- v := new(StartReply)
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
+func queryVersionReply(buf []byte) *QueryVersionReply {
+ v := new(QueryVersionReply)
b := 1 // skip reply determinant
b += 1 // padding
@@ -272,14 +263,20 @@ func startReply(buf []byte) *StartReply {
v.Length = xgb.Get32(buf[b:]) // 4-byte units
b += 4
- b += 24 // padding
+ v.ServerMajorVersion = xgb.Get16(buf[b:])
+ b += 2
+
+ v.ServerMinorVersion = xgb.Get16(buf[b:])
+ b += 2
+
+ b += 20 // padding
return v
}
-// Write request to wire for Start
-// startRequest writes a Start request to a byte slice.
-func startRequest(c *xgb.Conn, Screen uint32) []byte {
+// Write request to wire for QueryVersion
+// queryVersionRequest writes a QueryVersion request to a byte slice.
+func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) []byte {
size := 8
b := 0
buf := make([]byte, size)
@@ -287,55 +284,58 @@ func startRequest(c *xgb.Conn, Screen uint32) []byte {
buf[b] = c.Extensions["XEVIE"]
b += 1
- buf[b] = 1 // request opcode
+ buf[b] = 0 // request opcode
b += 1
xgb.Put16(buf[b:], uint16(size/4)) // write request size in 4-byte units
b += 2
- xgb.Put32(buf[b:], Screen)
- b += 4
+ xgb.Put16(buf[b:], ClientMajorVersion)
+ b += 2
+
+ xgb.Put16(buf[b:], ClientMinorVersion)
+ b += 2
return buf
}
-// EndCookie is a cookie used only for End requests.
-type EndCookie struct {
+// SelectInputCookie is a cookie used only for SelectInput requests.
+type SelectInputCookie struct {
*xgb.Cookie
}
-// End sends a checked request.
-// If an error occurs, it will be returned with the reply by calling EndCookie.Reply()
-func End(c *xgb.Conn, Cmap uint32) EndCookie {
+// SelectInput sends a checked request.
+// If an error occurs, it will be returned with the reply by calling SelectInputCookie.Reply()
+func SelectInput(c *xgb.Conn, EventMask uint32) SelectInputCookie {
if _, ok := c.Extensions["XEVIE"]; !ok {
- panic("Cannot issue request 'End' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
+ panic("Cannot issue request 'SelectInput' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
}
cookie := c.NewCookie(true, true)
- c.NewRequest(endRequest(c, Cmap), cookie)
- return EndCookie{cookie}
+ c.NewRequest(selectInputRequest(c, EventMask), cookie)
+ return SelectInputCookie{cookie}
}
-// EndUnchecked sends an unchecked request.
+// SelectInputUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
-func EndUnchecked(c *xgb.Conn, Cmap uint32) EndCookie {
+func SelectInputUnchecked(c *xgb.Conn, EventMask uint32) SelectInputCookie {
if _, ok := c.Extensions["XEVIE"]; !ok {
- panic("Cannot issue request 'End' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
+ panic("Cannot issue request 'SelectInput' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
}
cookie := c.NewCookie(false, true)
- c.NewRequest(endRequest(c, Cmap), cookie)
- return EndCookie{cookie}
+ c.NewRequest(selectInputRequest(c, EventMask), cookie)
+ return SelectInputCookie{cookie}
}
-// EndReply represents the data returned from a End request.
-type EndReply struct {
+// SelectInputReply represents the data returned from a SelectInput request.
+type SelectInputReply struct {
Sequence uint16 // sequence number of the request for this reply
Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
}
-// Reply blocks and returns the reply data for a End request.
-func (cook EndCookie) Reply() (*EndReply, error) {
+// Reply blocks and returns the reply data for a SelectInput request.
+func (cook SelectInputCookie) Reply() (*SelectInputReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
return nil, err
@@ -343,12 +343,12 @@ func (cook EndCookie) Reply() (*EndReply, error) {
if buf == nil {
return nil, nil
}
- return endReply(buf), nil
+ return selectInputReply(buf), nil
}
-// endReply reads a byte slice into a EndReply value.
-func endReply(buf []byte) *EndReply {
- v := new(EndReply)
+// selectInputReply reads a byte slice into a SelectInputReply value.
+func selectInputReply(buf []byte) *SelectInputReply {
+ v := new(SelectInputReply)
b := 1 // skip reply determinant
b += 1 // padding
@@ -364,9 +364,9 @@ func endReply(buf []byte) *EndReply {
return v
}
-// Write request to wire for End
-// endRequest writes a End request to a byte slice.
-func endRequest(c *xgb.Conn, Cmap uint32) []byte {
+// Write request to wire for SelectInput
+// selectInputRequest writes a SelectInput request to a byte slice.
+func selectInputRequest(c *xgb.Conn, EventMask uint32) []byte {
size := 8
b := 0
buf := make([]byte, size)
@@ -374,13 +374,13 @@ func endRequest(c *xgb.Conn, Cmap uint32) []byte {
buf[b] = c.Extensions["XEVIE"]
b += 1
- buf[b] = 2 // request opcode
+ buf[b] = 4 // request opcode
b += 1
xgb.Put16(buf[b:], uint16(size/4)) // write request size in 4-byte units
b += 2
- xgb.Put32(buf[b:], Cmap)
+ xgb.Put32(buf[b:], EventMask)
b += 4
return buf
@@ -481,43 +481,43 @@ func sendRequest(c *xgb.Conn, Event Event, DataType uint32) []byte {
return buf
}
-// SelectInputCookie is a cookie used only for SelectInput requests.
-type SelectInputCookie struct {
+// StartCookie is a cookie used only for Start requests.
+type StartCookie struct {
*xgb.Cookie
}
-// SelectInput sends a checked request.
-// If an error occurs, it will be returned with the reply by calling SelectInputCookie.Reply()
-func SelectInput(c *xgb.Conn, EventMask uint32) SelectInputCookie {
+// Start sends a checked request.
+// If an error occurs, it will be returned with the reply by calling StartCookie.Reply()
+func Start(c *xgb.Conn, Screen uint32) StartCookie {
if _, ok := c.Extensions["XEVIE"]; !ok {
- panic("Cannot issue request 'SelectInput' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
+ panic("Cannot issue request 'Start' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
}
cookie := c.NewCookie(true, true)
- c.NewRequest(selectInputRequest(c, EventMask), cookie)
- return SelectInputCookie{cookie}
+ c.NewRequest(startRequest(c, Screen), cookie)
+ return StartCookie{cookie}
}
-// SelectInputUnchecked sends an unchecked request.
+// StartUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
-func SelectInputUnchecked(c *xgb.Conn, EventMask uint32) SelectInputCookie {
+func StartUnchecked(c *xgb.Conn, Screen uint32) StartCookie {
if _, ok := c.Extensions["XEVIE"]; !ok {
- panic("Cannot issue request 'SelectInput' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
+ panic("Cannot issue request 'Start' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
}
cookie := c.NewCookie(false, true)
- c.NewRequest(selectInputRequest(c, EventMask), cookie)
- return SelectInputCookie{cookie}
+ c.NewRequest(startRequest(c, Screen), cookie)
+ return StartCookie{cookie}
}
-// SelectInputReply represents the data returned from a SelectInput request.
-type SelectInputReply struct {
+// StartReply represents the data returned from a Start request.
+type StartReply struct {
Sequence uint16 // sequence number of the request for this reply
Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
}
-// Reply blocks and returns the reply data for a SelectInput request.
-func (cook SelectInputCookie) Reply() (*SelectInputReply, error) {
+// Reply blocks and returns the reply data for a Start request.
+func (cook StartCookie) Reply() (*StartReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
return nil, err
@@ -525,12 +525,12 @@ func (cook SelectInputCookie) Reply() (*SelectInputReply, error) {
if buf == nil {
return nil, nil
}
- return selectInputReply(buf), nil
+ return startReply(buf), nil
}
-// selectInputReply reads a byte slice into a SelectInputReply value.
-func selectInputReply(buf []byte) *SelectInputReply {
- v := new(SelectInputReply)
+// startReply reads a byte slice into a StartReply value.
+func startReply(buf []byte) *StartReply {
+ v := new(StartReply)
b := 1 // skip reply determinant
b += 1 // padding
@@ -546,9 +546,9 @@ func selectInputReply(buf []byte) *SelectInputReply {
return v
}
-// Write request to wire for SelectInput
-// selectInputRequest writes a SelectInput request to a byte slice.
-func selectInputRequest(c *xgb.Conn, EventMask uint32) []byte {
+// Write request to wire for Start
+// startRequest writes a Start request to a byte slice.
+func startRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
buf := make([]byte, size)
@@ -556,13 +556,13 @@ func selectInputRequest(c *xgb.Conn, EventMask uint32) []byte {
buf[b] = c.Extensions["XEVIE"]
b += 1
- buf[b] = 4 // request opcode
+ buf[b] = 1 // request opcode
b += 1
xgb.Put16(buf[b:], uint16(size/4)) // write request size in 4-byte units
b += 2
- xgb.Put32(buf[b:], EventMask)
+ xgb.Put32(buf[b:], Screen)
b += 4
return buf