aboutsummaryrefslogtreecommitdiff
path: root/nexgb/bigreq
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/bigreq')
-rw-r--r--nexgb/bigreq/bigreq.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/nexgb/bigreq/bigreq.go b/nexgb/bigreq/bigreq.go
index 32dacba..43a15a4 100644
--- a/nexgb/bigreq/bigreq.go
+++ b/nexgb/bigreq/bigreq.go
@@ -2,7 +2,7 @@
package bigreq
/*
- This file was generated by bigreq.xml on May 11 2012 1:58:35am EDT.
+ This file was generated by bigreq.xml on May 11 2012 11:57:18pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,6 +40,10 @@ func init() {
xgb.NewExtErrorFuncs["BIG-REQUESTS"] = make(map[int]xgb.NewErrorFun)
}
+// Skipping definition for base type 'Bool'
+
+// Skipping definition for base type 'Float'
+
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
@@ -60,10 +64,6 @@ func init() {
// Skipping definition for base type 'Double'
-// Skipping definition for base type 'Bool'
-
-// Skipping definition for base type 'Float'
-
// EnableCookie is a cookie used only for Enable requests.
type EnableCookie struct {
*xgb.Cookie
@@ -72,6 +72,9 @@ type EnableCookie struct {
// Enable sends a checked request.
// If an error occurs, it will be returned with the reply by calling EnableCookie.Reply()
func Enable(c *xgb.Conn) EnableCookie {
+ if _, ok := c.Extensions["BIG-REQUESTS"]; !ok {
+ panic("Cannot issue request 'Enable' using the uninitialized extension 'BIG-REQUESTS'. bigreq.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(enableRequest(c), cookie)
return EnableCookie{cookie}
@@ -80,6 +83,9 @@ func Enable(c *xgb.Conn) EnableCookie {
// EnableUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func EnableUnchecked(c *xgb.Conn) EnableCookie {
+ if _, ok := c.Extensions["BIG-REQUESTS"]; !ok {
+ panic("Cannot issue request 'Enable' using the uninitialized extension 'BIG-REQUESTS'. bigreq.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(enableRequest(c), cookie)
return EnableCookie{cookie}