aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xevie
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-11 23:58:52 -0400
committerAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-11 23:58:52 -0400
commit29942bf078c92fea681e42ca5029592526f00718 (patch)
treecee802ebe16e0b118c9be0f6265e26d31e8a5845 /nexgb/xevie
parentfb3128ed2a83a0f644661cedebbe5bfda3f4951e (diff)
downloadhaven-29942bf078c92fea681e42ca5029592526f00718.tar.gz
haven-29942bf078c92fea681e42ca5029592526f00718.tar.xz
haven-29942bf078c92fea681e42ca5029592526f00718.zip
panic when an extension request is issued before an extension has been initialized. but give a nice error message for the happy people.
Diffstat (limited to 'nexgb/xevie')
-rw-r--r--nexgb/xevie/xevie.go32
1 files changed, 31 insertions, 1 deletions
diff --git a/nexgb/xevie/xevie.go b/nexgb/xevie/xevie.go
index ef02e2c..0628ffd 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 May 11 2012 1:58:36am EDT.
+ This file was generated by xevie.xml on May 11 2012 11:57:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -122,6 +122,9 @@ type QueryVersionCookie struct {
// 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 'QueryVersion' 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}
@@ -130,6 +133,9 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uin
// QueryVersionUnchecked 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 {
+ if _, ok := c.Extensions["XEVIE"]; !ok {
+ panic("Cannot issue request 'QueryVersion' 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}
@@ -214,6 +220,9 @@ type StartCookie struct {
// 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 'Start' 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}
@@ -222,6 +231,9 @@ func Start(c *xgb.Conn, Screen uint32) StartCookie {
// StartUnchecked 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 {
+ if _, ok := c.Extensions["XEVIE"]; !ok {
+ panic("Cannot issue request 'Start' 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}
@@ -295,6 +307,9 @@ type EndCookie struct {
// 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 'End' 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}
@@ -303,6 +318,9 @@ func End(c *xgb.Conn, Cmap uint32) EndCookie {
// EndUnchecked 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 {
+ if _, ok := c.Extensions["XEVIE"]; !ok {
+ panic("Cannot issue request 'End' 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}
@@ -376,6 +394,9 @@ type SendCookie struct {
// Send sends a checked request.
// If an error occurs, it will be returned with the reply by calling SendCookie.Reply()
func Send(c *xgb.Conn, Event Event, DataType uint32) SendCookie {
+ if _, ok := c.Extensions["XEVIE"]; !ok {
+ panic("Cannot issue request 'Send' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(sendRequest(c, Event, DataType), cookie)
return SendCookie{cookie}
@@ -384,6 +405,9 @@ func Send(c *xgb.Conn, Event Event, DataType uint32) SendCookie {
// SendUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SendUnchecked(c *xgb.Conn, Event Event, DataType uint32) SendCookie {
+ if _, ok := c.Extensions["XEVIE"]; !ok {
+ panic("Cannot issue request 'Send' using the uninitialized extension 'XEVIE'. xevie.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(sendRequest(c, Event, DataType), cookie)
return SendCookie{cookie}
@@ -465,6 +489,9 @@ type SelectInputCookie struct {
// 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 'SelectInput' 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}
@@ -473,6 +500,9 @@ func SelectInput(c *xgb.Conn, EventMask uint32) SelectInputCookie {
// SelectInputUnchecked 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 {
+ if _, ok := c.Extensions["XEVIE"]; !ok {
+ panic("Cannot issue request 'SelectInput' 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}