diff options
Diffstat (limited to 'nexgb/xf86vidmode/xf86vidmode.go')
-rw-r--r-- | nexgb/xf86vidmode/xf86vidmode.go | 152 |
1 files changed, 139 insertions, 13 deletions
diff --git a/nexgb/xf86vidmode/xf86vidmode.go b/nexgb/xf86vidmode/xf86vidmode.go index 01f271c..be41acd 100644 --- a/nexgb/xf86vidmode/xf86vidmode.go +++ b/nexgb/xf86vidmode/xf86vidmode.go @@ -2,7 +2,7 @@ package xf86vidmode /* - This file was generated by xf86vidmode.xml on May 11 2012 1:58:36am EDT. + This file was generated by xf86vidmode.xml on May 11 2012 11:57:19pm EDT. This file is automatically generated. Edit at your peril! */ @@ -40,18 +40,6 @@ func init() { xgb.NewExtErrorFuncs["XFree86-VidModeExtension"] = make(map[int]xgb.NewErrorFun) } -// Skipping definition for base type 'Float' - -// 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' @@ -64,6 +52,18 @@ func init() { // Skipping definition for base type 'Bool' +// Skipping definition for base type 'Float' + +// 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' + const ( ModeFlagPositiveHsync = 1 ModeFlagNegativeHsync = 2 @@ -557,6 +557,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) QueryVersionCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(queryVersionRequest(c), cookie) return QueryVersionCookie{cookie} @@ -565,6 +568,9 @@ func QueryVersion(c *xgb.Conn) QueryVersionCookie { // 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) QueryVersionCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(queryVersionRequest(c), cookie) return QueryVersionCookie{cookie} @@ -640,6 +646,9 @@ type GetModeLineCookie struct { // GetModeLine sends a checked request. // If an error occurs, it will be returned with the reply by calling GetModeLineCookie.Reply() func GetModeLine(c *xgb.Conn, Screen uint16) GetModeLineCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(getModeLineRequest(c, Screen), cookie) return GetModeLineCookie{cookie} @@ -648,6 +657,9 @@ func GetModeLine(c *xgb.Conn, Screen uint16) GetModeLineCookie { // GetModeLineUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func GetModeLineUnchecked(c *xgb.Conn, Screen uint16) GetModeLineCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(getModeLineRequest(c, Screen), cookie) return GetModeLineCookie{cookie} @@ -779,6 +791,9 @@ type ModModeLineCookie struct { // ModModeLine sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func ModModeLine(c *xgb.Conn, Screen uint32, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ModModeLineCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'ModModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, false) c.NewRequest(modModeLineRequest(c, Screen, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie) return ModModeLineCookie{cookie} @@ -787,6 +802,9 @@ func ModModeLine(c *xgb.Conn, Screen uint32, Hdisplay uint16, Hsyncstart uint16, // ModModeLineChecked sends a checked request. // If an error occurs, it can be retrieved using ModModeLineCookie.Check() func ModModeLineChecked(c *xgb.Conn, Screen uint32, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ModModeLineCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'ModModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, false) c.NewRequest(modModeLineRequest(c, Screen, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie) return ModModeLineCookie{cookie} @@ -868,6 +886,9 @@ type SwitchModeCookie struct { // SwitchMode sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func SwitchMode(c *xgb.Conn, Screen uint16, Zoom uint16) SwitchModeCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SwitchMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, false) c.NewRequest(switchModeRequest(c, Screen, Zoom), cookie) return SwitchModeCookie{cookie} @@ -876,6 +897,9 @@ func SwitchMode(c *xgb.Conn, Screen uint16, Zoom uint16) SwitchModeCookie { // SwitchModeChecked sends a checked request. // If an error occurs, it can be retrieved using SwitchModeCookie.Check() func SwitchModeChecked(c *xgb.Conn, Screen uint16, Zoom uint16) SwitchModeCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SwitchMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, false) c.NewRequest(switchModeRequest(c, Screen, Zoom), cookie) return SwitchModeCookie{cookie} @@ -920,6 +944,9 @@ type GetMonitorCookie struct { // GetMonitor sends a checked request. // If an error occurs, it will be returned with the reply by calling GetMonitorCookie.Reply() func GetMonitor(c *xgb.Conn, Screen uint16) GetMonitorCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetMonitor' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(getMonitorRequest(c, Screen), cookie) return GetMonitorCookie{cookie} @@ -928,6 +955,9 @@ func GetMonitor(c *xgb.Conn, Screen uint16) GetMonitorCookie { // GetMonitorUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func GetMonitorUnchecked(c *xgb.Conn, Screen uint16) GetMonitorCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetMonitor' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(getMonitorRequest(c, Screen), cookie) return GetMonitorCookie{cookie} @@ -1056,6 +1086,9 @@ type LockModeSwitchCookie struct { // LockModeSwitch sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func LockModeSwitch(c *xgb.Conn, Screen uint16, Lock uint16) LockModeSwitchCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'LockModeSwitch' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, false) c.NewRequest(lockModeSwitchRequest(c, Screen, Lock), cookie) return LockModeSwitchCookie{cookie} @@ -1064,6 +1097,9 @@ func LockModeSwitch(c *xgb.Conn, Screen uint16, Lock uint16) LockModeSwitchCooki // LockModeSwitchChecked sends a checked request. // If an error occurs, it can be retrieved using LockModeSwitchCookie.Check() func LockModeSwitchChecked(c *xgb.Conn, Screen uint16, Lock uint16) LockModeSwitchCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'LockModeSwitch' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, false) c.NewRequest(lockModeSwitchRequest(c, Screen, Lock), cookie) return LockModeSwitchCookie{cookie} @@ -1108,6 +1144,9 @@ type GetAllModeLinesCookie struct { // GetAllModeLines sends a checked request. // If an error occurs, it will be returned with the reply by calling GetAllModeLinesCookie.Reply() func GetAllModeLines(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetAllModeLines' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(getAllModeLinesRequest(c, Screen), cookie) return GetAllModeLinesCookie{cookie} @@ -1116,6 +1155,9 @@ func GetAllModeLines(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie { // GetAllModeLinesUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func GetAllModeLinesUnchecked(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetAllModeLines' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(getAllModeLinesRequest(c, Screen), cookie) return GetAllModeLinesCookie{cookie} @@ -1199,6 +1241,9 @@ type AddModeLineCookie struct { // AddModeLine sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func AddModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, AfterDotclock Dotclock, AfterHdisplay uint16, AfterHsyncstart uint16, AfterHsyncend uint16, AfterHtotal uint16, AfterHskew uint16, AfterVdisplay uint16, AfterVsyncstart uint16, AfterVsyncend uint16, AfterVtotal uint16, AfterFlags uint32, Private []byte) AddModeLineCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'AddModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, false) c.NewRequest(addModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, AfterDotclock, AfterHdisplay, AfterHsyncstart, AfterHsyncend, AfterHtotal, AfterHskew, AfterVdisplay, AfterVsyncstart, AfterVsyncend, AfterVtotal, AfterFlags, Private), cookie) return AddModeLineCookie{cookie} @@ -1207,6 +1252,9 @@ func AddModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, // AddModeLineChecked sends a checked request. // If an error occurs, it can be retrieved using AddModeLineCookie.Check() func AddModeLineChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, AfterDotclock Dotclock, AfterHdisplay uint16, AfterHsyncstart uint16, AfterHsyncend uint16, AfterHtotal uint16, AfterHskew uint16, AfterVdisplay uint16, AfterVsyncstart uint16, AfterVsyncend uint16, AfterVtotal uint16, AfterFlags uint32, Private []byte) AddModeLineCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'AddModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, false) c.NewRequest(addModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, AfterDotclock, AfterHdisplay, AfterHsyncstart, AfterHsyncend, AfterHtotal, AfterHskew, AfterVdisplay, AfterVsyncstart, AfterVsyncend, AfterVtotal, AfterFlags, Private), cookie) return AddModeLineCookie{cookie} @@ -1328,6 +1376,9 @@ type DeleteModeLineCookie struct { // DeleteModeLine sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func DeleteModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) DeleteModeLineCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'DeleteModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, false) c.NewRequest(deleteModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie) return DeleteModeLineCookie{cookie} @@ -1336,6 +1387,9 @@ func DeleteModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint // DeleteModeLineChecked sends a checked request. // If an error occurs, it can be retrieved using DeleteModeLineCookie.Check() func DeleteModeLineChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) DeleteModeLineCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'DeleteModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, false) c.NewRequest(deleteModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie) return DeleteModeLineCookie{cookie} @@ -1420,6 +1474,9 @@ type ValidateModeLineCookie struct { // ValidateModeLine sends a checked request. // If an error occurs, it will be returned with the reply by calling ValidateModeLineCookie.Reply() func ValidateModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ValidateModeLineCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'ValidateModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(validateModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie) return ValidateModeLineCookie{cookie} @@ -1428,6 +1485,9 @@ func ValidateModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay ui // ValidateModeLineUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func ValidateModeLineUnchecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) ValidateModeLineCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'ValidateModeLine' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(validateModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie) return ValidateModeLineCookie{cookie} @@ -1548,6 +1608,9 @@ type SwitchToModeCookie struct { // SwitchToMode sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func SwitchToMode(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) SwitchToModeCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SwitchToMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, false) c.NewRequest(switchToModeRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie) return SwitchToModeCookie{cookie} @@ -1556,6 +1619,9 @@ func SwitchToMode(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16 // SwitchToModeChecked sends a checked request. // If an error occurs, it can be retrieved using SwitchToModeCookie.Check() func SwitchToModeChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay uint16, Hsyncstart uint16, Hsyncend uint16, Htotal uint16, Hskew uint16, Vdisplay uint16, Vsyncstart uint16, Vsyncend uint16, Vtotal uint16, Flags uint32, Privsize uint32, Private []byte) SwitchToModeCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SwitchToMode' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, false) c.NewRequest(switchToModeRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie) return SwitchToModeCookie{cookie} @@ -1640,6 +1706,9 @@ type GetViewPortCookie struct { // GetViewPort sends a checked request. // If an error occurs, it will be returned with the reply by calling GetViewPortCookie.Reply() func GetViewPort(c *xgb.Conn, Screen uint16) GetViewPortCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(getViewPortRequest(c, Screen), cookie) return GetViewPortCookie{cookie} @@ -1648,6 +1717,9 @@ func GetViewPort(c *xgb.Conn, Screen uint16) GetViewPortCookie { // GetViewPortUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func GetViewPortUnchecked(c *xgb.Conn, Screen uint16) GetViewPortCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(getViewPortRequest(c, Screen), cookie) return GetViewPortCookie{cookie} @@ -1731,6 +1803,9 @@ type SetViewPortCookie struct { // SetViewPort sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func SetViewPort(c *xgb.Conn, Screen uint16, X uint32, Y uint32) SetViewPortCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, false) c.NewRequest(setViewPortRequest(c, Screen, X, Y), cookie) return SetViewPortCookie{cookie} @@ -1739,6 +1814,9 @@ func SetViewPort(c *xgb.Conn, Screen uint16, X uint32, Y uint32) SetViewPortCook // SetViewPortChecked sends a checked request. // If an error occurs, it can be retrieved using SetViewPortCookie.Check() func SetViewPortChecked(c *xgb.Conn, Screen uint16, X uint32, Y uint32) SetViewPortCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SetViewPort' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, false) c.NewRequest(setViewPortRequest(c, Screen, X, Y), cookie) return SetViewPortCookie{cookie} @@ -1788,6 +1866,9 @@ type GetDotClocksCookie struct { // GetDotClocks sends a checked request. // If an error occurs, it will be returned with the reply by calling GetDotClocksCookie.Reply() func GetDotClocks(c *xgb.Conn, Screen uint16) GetDotClocksCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetDotClocks' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(getDotClocksRequest(c, Screen), cookie) return GetDotClocksCookie{cookie} @@ -1796,6 +1877,9 @@ func GetDotClocks(c *xgb.Conn, Screen uint16) GetDotClocksCookie { // GetDotClocksUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func GetDotClocksUnchecked(c *xgb.Conn, Screen uint16) GetDotClocksCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetDotClocks' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(getDotClocksRequest(c, Screen), cookie) return GetDotClocksCookie{cookie} @@ -1891,6 +1975,9 @@ type SetClientVersionCookie struct { // SetClientVersion sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func SetClientVersion(c *xgb.Conn, Major uint16, Minor uint16) SetClientVersionCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SetClientVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, false) c.NewRequest(setClientVersionRequest(c, Major, Minor), cookie) return SetClientVersionCookie{cookie} @@ -1899,6 +1986,9 @@ func SetClientVersion(c *xgb.Conn, Major uint16, Minor uint16) SetClientVersionC // SetClientVersionChecked sends a checked request. // If an error occurs, it can be retrieved using SetClientVersionCookie.Check() func SetClientVersionChecked(c *xgb.Conn, Major uint16, Minor uint16) SetClientVersionCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SetClientVersion' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, false) c.NewRequest(setClientVersionRequest(c, Major, Minor), cookie) return SetClientVersionCookie{cookie} @@ -1943,6 +2033,9 @@ type SetGammaCookie struct { // SetGamma sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func SetGamma(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue uint32) SetGammaCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, false) c.NewRequest(setGammaRequest(c, Screen, Red, Green, Blue), cookie) return SetGammaCookie{cookie} @@ -1951,6 +2044,9 @@ func SetGamma(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue uint32) // SetGammaChecked sends a checked request. // If an error occurs, it can be retrieved using SetGammaCookie.Check() func SetGammaChecked(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue uint32) SetGammaCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, false) c.NewRequest(setGammaRequest(c, Screen, Red, Green, Blue), cookie) return SetGammaCookie{cookie} @@ -2005,6 +2101,9 @@ type GetGammaCookie struct { // GetGamma sends a checked request. // If an error occurs, it will be returned with the reply by calling GetGammaCookie.Reply() func GetGamma(c *xgb.Conn, Screen uint16) GetGammaCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(getGammaRequest(c, Screen), cookie) return GetGammaCookie{cookie} @@ -2013,6 +2112,9 @@ func GetGamma(c *xgb.Conn, Screen uint16) GetGammaCookie { // GetGammaUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func GetGammaUnchecked(c *xgb.Conn, Screen uint16) GetGammaCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetGamma' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(getGammaRequest(c, Screen), cookie) return GetGammaCookie{cookie} @@ -2100,6 +2202,9 @@ type GetGammaRampCookie struct { // GetGammaRamp sends a checked request. // If an error occurs, it will be returned with the reply by calling GetGammaRampCookie.Reply() func GetGammaRamp(c *xgb.Conn, Screen uint16, Size uint16) GetGammaRampCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(getGammaRampRequest(c, Screen, Size), cookie) return GetGammaRampCookie{cookie} @@ -2108,6 +2213,9 @@ func GetGammaRamp(c *xgb.Conn, Screen uint16, Size uint16) GetGammaRampCookie { // GetGammaRampUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func GetGammaRampUnchecked(c *xgb.Conn, Screen uint16, Size uint16) GetGammaRampCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(getGammaRampRequest(c, Screen, Size), cookie) return GetGammaRampCookie{cookie} @@ -2212,6 +2320,9 @@ type SetGammaRampCookie struct { // SetGammaRamp sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func SetGammaRamp(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16, Green []uint16, Blue []uint16) SetGammaRampCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, false) c.NewRequest(setGammaRampRequest(c, Screen, Size, Red, Green, Blue), cookie) return SetGammaRampCookie{cookie} @@ -2220,6 +2331,9 @@ func SetGammaRamp(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16, Green [ // SetGammaRampChecked sends a checked request. // If an error occurs, it can be retrieved using SetGammaRampCookie.Check() func SetGammaRampChecked(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16, Green []uint16, Blue []uint16) SetGammaRampCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'SetGammaRamp' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, false) c.NewRequest(setGammaRampRequest(c, Screen, Size, Red, Green, Blue), cookie) return SetGammaRampCookie{cookie} @@ -2282,6 +2396,9 @@ type GetGammaRampSizeCookie struct { // GetGammaRampSize sends a checked request. // If an error occurs, it will be returned with the reply by calling GetGammaRampSizeCookie.Reply() func GetGammaRampSize(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetGammaRampSize' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(getGammaRampSizeRequest(c, Screen), cookie) return GetGammaRampSizeCookie{cookie} @@ -2290,6 +2407,9 @@ func GetGammaRampSize(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie { // GetGammaRampSizeUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func GetGammaRampSizeUnchecked(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetGammaRampSize' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(getGammaRampSizeRequest(c, Screen), cookie) return GetGammaRampSizeCookie{cookie} @@ -2369,6 +2489,9 @@ type GetPermissionsCookie struct { // GetPermissions sends a checked request. // If an error occurs, it will be returned with the reply by calling GetPermissionsCookie.Reply() func GetPermissions(c *xgb.Conn, Screen uint16) GetPermissionsCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetPermissions' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(true, true) c.NewRequest(getPermissionsRequest(c, Screen), cookie) return GetPermissionsCookie{cookie} @@ -2377,6 +2500,9 @@ func GetPermissions(c *xgb.Conn, Screen uint16) GetPermissionsCookie { // GetPermissionsUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func GetPermissionsUnchecked(c *xgb.Conn, Screen uint16) GetPermissionsCookie { + if _, ok := c.Extensions["XFREE86-VIDMODEEXTENSION"]; !ok { + panic("Cannot issue request 'GetPermissions' using the uninitialized extension 'XFree86-VidModeExtension'. xf86vidmode.Init(connObj) must be called first.") + } cookie := c.NewCookie(false, true) c.NewRequest(getPermissionsRequest(c, Screen), cookie) return GetPermissionsCookie{cookie} |