aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xv
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/xv
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/xv')
-rw-r--r--nexgb/xv/xv.go130
1 files changed, 125 insertions, 5 deletions
diff --git a/nexgb/xv/xv.go b/nexgb/xv/xv.go
index c048e88..c6ba384 100644
--- a/nexgb/xv/xv.go
+++ b/nexgb/xv/xv.go
@@ -2,7 +2,7 @@
package xv
/*
- This file was generated by xv.xml on May 11 2012 1:58:37am EDT.
+ This file was generated by xv.xml on May 11 2012 11:57:20pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -41,10 +41,6 @@ func init() {
xgb.NewExtErrorFuncs["XVideo"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Double'
-
-// Skipping definition for base type 'Bool'
-
// Skipping definition for base type 'Float'
// Skipping definition for base type 'Card8'
@@ -65,6 +61,10 @@ func init() {
// Skipping definition for base type 'Card32'
+// Skipping definition for base type 'Double'
+
+// Skipping definition for base type 'Bool'
+
const (
TypeInputMask = 1
TypeOutputMask = 2
@@ -1205,6 +1205,9 @@ type QueryExtensionCookie struct {
// QueryExtension sends a checked request.
// If an error occurs, it will be returned with the reply by calling QueryExtensionCookie.Reply()
func QueryExtension(c *xgb.Conn) QueryExtensionCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryExtension' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(queryExtensionRequest(c), cookie)
return QueryExtensionCookie{cookie}
@@ -1213,6 +1216,9 @@ func QueryExtension(c *xgb.Conn) QueryExtensionCookie {
// QueryExtensionUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryExtensionUnchecked(c *xgb.Conn) QueryExtensionCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryExtension' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(queryExtensionRequest(c), cookie)
return QueryExtensionCookie{cookie}
@@ -1288,6 +1294,9 @@ type QueryAdaptorsCookie struct {
// QueryAdaptors sends a checked request.
// If an error occurs, it will be returned with the reply by calling QueryAdaptorsCookie.Reply()
func QueryAdaptors(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryAdaptors' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(queryAdaptorsRequest(c, Window), cookie)
return QueryAdaptorsCookie{cookie}
@@ -1296,6 +1305,9 @@ func QueryAdaptors(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie {
// QueryAdaptorsUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryAdaptorsUnchecked(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryAdaptors' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(queryAdaptorsRequest(c, Window), cookie)
return QueryAdaptorsCookie{cookie}
@@ -1377,6 +1389,9 @@ type QueryEncodingsCookie struct {
// QueryEncodings sends a checked request.
// If an error occurs, it will be returned with the reply by calling QueryEncodingsCookie.Reply()
func QueryEncodings(c *xgb.Conn, Port Port) QueryEncodingsCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryEncodings' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(queryEncodingsRequest(c, Port), cookie)
return QueryEncodingsCookie{cookie}
@@ -1385,6 +1400,9 @@ func QueryEncodings(c *xgb.Conn, Port Port) QueryEncodingsCookie {
// QueryEncodingsUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryEncodingsUnchecked(c *xgb.Conn, Port Port) QueryEncodingsCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryEncodings' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(queryEncodingsRequest(c, Port), cookie)
return QueryEncodingsCookie{cookie}
@@ -1466,6 +1484,9 @@ type GrabPortCookie struct {
// GrabPort sends a checked request.
// If an error occurs, it will be returned with the reply by calling GrabPortCookie.Reply()
func GrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'GrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(grabPortRequest(c, Port, Time), cookie)
return GrabPortCookie{cookie}
@@ -1474,6 +1495,9 @@ func GrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie {
// GrabPortUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GrabPortUnchecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'GrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(grabPortRequest(c, Port, Time), cookie)
return GrabPortCookie{cookie}
@@ -1548,6 +1572,9 @@ type UngrabPortCookie struct {
// UngrabPort sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UngrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'UngrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(ungrabPortRequest(c, Port, Time), cookie)
return UngrabPortCookie{cookie}
@@ -1556,6 +1583,9 @@ func UngrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie
// UngrabPortChecked sends a checked request.
// If an error occurs, it can be retrieved using UngrabPortCookie.Check()
func UngrabPortChecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'UngrabPort' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(ungrabPortRequest(c, Port, Time), cookie)
return UngrabPortCookie{cookie}
@@ -1600,6 +1630,9 @@ type PutVideoCookie struct {
// PutVideo sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PutVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutVideoCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'PutVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(putVideoRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return PutVideoCookie{cookie}
@@ -1608,6 +1641,9 @@ func PutVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gconte
// PutVideoChecked sends a checked request.
// If an error occurs, it can be retrieved using PutVideoCookie.Check()
func PutVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutVideoCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'PutVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(putVideoRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return PutVideoCookie{cookie}
@@ -1679,6 +1715,9 @@ type PutStillCookie struct {
// PutStill sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PutStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutStillCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'PutStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(putStillRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return PutStillCookie{cookie}
@@ -1687,6 +1726,9 @@ func PutStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gconte
// PutStillChecked sends a checked request.
// If an error occurs, it can be retrieved using PutStillCookie.Check()
func PutStillChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutStillCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'PutStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(putStillRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return PutStillCookie{cookie}
@@ -1758,6 +1800,9 @@ type GetVideoCookie struct {
// GetVideo sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetVideoCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'GetVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(getVideoRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return GetVideoCookie{cookie}
@@ -1766,6 +1811,9 @@ func GetVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gconte
// GetVideoChecked sends a checked request.
// If an error occurs, it can be retrieved using GetVideoCookie.Check()
func GetVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetVideoCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'GetVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(getVideoRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return GetVideoCookie{cookie}
@@ -1837,6 +1885,9 @@ type GetStillCookie struct {
// GetStill sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetStillCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'GetStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(getStillRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return GetStillCookie{cookie}
@@ -1845,6 +1896,9 @@ func GetStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gconte
// GetStillChecked sends a checked request.
// If an error occurs, it can be retrieved using GetStillCookie.Check()
func GetStillChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetStillCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'GetStill' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(getStillRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return GetStillCookie{cookie}
@@ -1916,6 +1970,9 @@ type StopVideoCookie struct {
// StopVideo sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func StopVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'StopVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(stopVideoRequest(c, Port, Drawable), cookie)
return StopVideoCookie{cookie}
@@ -1924,6 +1981,9 @@ func StopVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie
// StopVideoChecked sends a checked request.
// If an error occurs, it can be retrieved using StopVideoCookie.Check()
func StopVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'StopVideo' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(stopVideoRequest(c, Port, Drawable), cookie)
return StopVideoCookie{cookie}
@@ -1968,6 +2028,9 @@ type SelectVideoNotifyCookie struct {
// SelectVideoNotify sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectVideoNotify(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'SelectVideoNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(selectVideoNotifyRequest(c, Drawable, Onoff), cookie)
return SelectVideoNotifyCookie{cookie}
@@ -1976,6 +2039,9 @@ func SelectVideoNotify(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) Select
// SelectVideoNotifyChecked sends a checked request.
// If an error occurs, it can be retrieved using SelectVideoNotifyCookie.Check()
func SelectVideoNotifyChecked(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'SelectVideoNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(selectVideoNotifyRequest(c, Drawable, Onoff), cookie)
return SelectVideoNotifyCookie{cookie}
@@ -2026,6 +2092,9 @@ type SelectPortNotifyCookie struct {
// SelectPortNotify sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectPortNotify(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'SelectPortNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(selectPortNotifyRequest(c, Port, Onoff), cookie)
return SelectPortNotifyCookie{cookie}
@@ -2034,6 +2103,9 @@ func SelectPortNotify(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie
// SelectPortNotifyChecked sends a checked request.
// If an error occurs, it can be retrieved using SelectPortNotifyCookie.Check()
func SelectPortNotifyChecked(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'SelectPortNotify' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(selectPortNotifyRequest(c, Port, Onoff), cookie)
return SelectPortNotifyCookie{cookie}
@@ -2084,6 +2156,9 @@ type QueryBestSizeCookie struct {
// QueryBestSize sends a checked request.
// If an error occurs, it will be returned with the reply by calling QueryBestSizeCookie.Reply()
func QueryBestSize(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) QueryBestSizeCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryBestSize' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(queryBestSizeRequest(c, Port, VidW, VidH, DrwW, DrwH, Motion), cookie)
return QueryBestSizeCookie{cookie}
@@ -2092,6 +2167,9 @@ func QueryBestSize(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16
// QueryBestSizeUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryBestSizeUnchecked(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) QueryBestSizeCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryBestSize' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(queryBestSizeRequest(c, Port, VidW, VidH, DrwW, DrwH, Motion), cookie)
return QueryBestSizeCookie{cookie}
@@ -2191,6 +2269,9 @@ type SetPortAttributeCookie struct {
// SetPortAttribute sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'SetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(setPortAttributeRequest(c, Port, Attribute, Value), cookie)
return SetPortAttributeCookie{cookie}
@@ -2199,6 +2280,9 @@ func SetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32
// SetPortAttributeChecked sends a checked request.
// If an error occurs, it can be retrieved using SetPortAttributeCookie.Check()
func SetPortAttributeChecked(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'SetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(setPortAttributeRequest(c, Port, Attribute, Value), cookie)
return SetPortAttributeCookie{cookie}
@@ -2246,6 +2330,9 @@ type GetPortAttributeCookie struct {
// GetPortAttribute sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetPortAttributeCookie.Reply()
func GetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttributeCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'GetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getPortAttributeRequest(c, Port, Attribute), cookie)
return GetPortAttributeCookie{cookie}
@@ -2254,6 +2341,9 @@ func GetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttr
// GetPortAttributeUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPortAttributeUnchecked(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttributeCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'GetPortAttribute' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getPortAttributeRequest(c, Port, Attribute), cookie)
return GetPortAttributeCookie{cookie}
@@ -2331,6 +2421,9 @@ type QueryPortAttributesCookie struct {
// QueryPortAttributes sends a checked request.
// If an error occurs, it will be returned with the reply by calling QueryPortAttributesCookie.Reply()
func QueryPortAttributes(c *xgb.Conn, Port Port) QueryPortAttributesCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryPortAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(queryPortAttributesRequest(c, Port), cookie)
return QueryPortAttributesCookie{cookie}
@@ -2339,6 +2432,9 @@ func QueryPortAttributes(c *xgb.Conn, Port Port) QueryPortAttributesCookie {
// QueryPortAttributesUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryPortAttributesUnchecked(c *xgb.Conn, Port Port) QueryPortAttributesCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryPortAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(queryPortAttributesRequest(c, Port), cookie)
return QueryPortAttributesCookie{cookie}
@@ -2424,6 +2520,9 @@ type ListImageFormatsCookie struct {
// ListImageFormats sends a checked request.
// If an error occurs, it will be returned with the reply by calling ListImageFormatsCookie.Reply()
func ListImageFormats(c *xgb.Conn, Port Port) ListImageFormatsCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'ListImageFormats' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(listImageFormatsRequest(c, Port), cookie)
return ListImageFormatsCookie{cookie}
@@ -2432,6 +2531,9 @@ func ListImageFormats(c *xgb.Conn, Port Port) ListImageFormatsCookie {
// ListImageFormatsUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListImageFormatsUnchecked(c *xgb.Conn, Port Port) ListImageFormatsCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'ListImageFormats' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(listImageFormatsRequest(c, Port), cookie)
return ListImageFormatsCookie{cookie}
@@ -2513,6 +2615,9 @@ type QueryImageAttributesCookie struct {
// QueryImageAttributes sends a checked request.
// If an error occurs, it will be returned with the reply by calling QueryImageAttributesCookie.Reply()
func QueryImageAttributes(c *xgb.Conn, Port Port, Id uint32, Width uint16, Height uint16) QueryImageAttributesCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryImageAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(queryImageAttributesRequest(c, Port, Id, Width, Height), cookie)
return QueryImageAttributesCookie{cookie}
@@ -2521,6 +2626,9 @@ func QueryImageAttributes(c *xgb.Conn, Port Port, Id uint32, Width uint16, Heigh
// QueryImageAttributesUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryImageAttributesUnchecked(c *xgb.Conn, Port Port, Id uint32, Width uint16, Height uint16) QueryImageAttributesCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'QueryImageAttributes' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(queryImageAttributesRequest(c, Port, Id, Width, Height), cookie)
return QueryImageAttributesCookie{cookie}
@@ -2635,6 +2743,9 @@ type PutImageCookie struct {
// PutImage sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) PutImageCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'PutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(putImageRequest(c, Port, Drawable, Gc, Id, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, Data), cookie)
return PutImageCookie{cookie}
@@ -2643,6 +2754,9 @@ func PutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gconte
// PutImageChecked sends a checked request.
// If an error occurs, it can be retrieved using PutImageCookie.Check()
func PutImageChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) PutImageCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'PutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(putImageRequest(c, Port, Drawable, Gc, Id, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, Data), cookie)
return PutImageCookie{cookie}
@@ -2726,6 +2840,9 @@ type ShmPutImageCookie struct {
// ShmPutImage sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ShmPutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Shmseg shm.Seg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) ShmPutImageCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'ShmPutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(shmPutImageRequest(c, Port, Drawable, Gc, Shmseg, Id, Offset, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, SendEvent), cookie)
return ShmPutImageCookie{cookie}
@@ -2734,6 +2851,9 @@ func ShmPutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gco
// ShmPutImageChecked sends a checked request.
// If an error occurs, it can be retrieved using ShmPutImageCookie.Check()
func ShmPutImageChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Shmseg shm.Seg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) ShmPutImageCookie {
+ if _, ok := c.Extensions["XVIDEO"]; !ok {
+ panic("Cannot issue request 'ShmPutImage' using the uninitialized extension 'XVideo'. xv.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(shmPutImageRequest(c, Port, Drawable, Gc, Shmseg, Id, Offset, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, SendEvent), cookie)
return ShmPutImageCookie{cookie}