From e6e4e9443661bab3bb69a6c32dacfaf0e54f32ef Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sun, 30 Sep 2018 16:32:47 +0200 Subject: nexgb: regenerate from xcb-proto 1.12 To refresh documentation. --- nexgb/xf86vidmode/xf86vidmode.go | 177 +++++++++++++++++---------------------- 1 file changed, 78 insertions(+), 99 deletions(-) (limited to 'nexgb/xf86vidmode') diff --git a/nexgb/xf86vidmode/xf86vidmode.go b/nexgb/xf86vidmode/xf86vidmode.go index 7529c5a..5f52ea6 100644 --- a/nexgb/xf86vidmode/xf86vidmode.go +++ b/nexgb/xf86vidmode/xf86vidmode.go @@ -557,7 +557,7 @@ 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 { +func AddModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, AfterDotclock Dotclock, AfterHdisplay, AfterHsyncstart, AfterHsyncend, AfterHtotal, AfterHskew, AfterVdisplay, AfterVsyncstart, AfterVsyncend, AfterVtotal uint16, AfterFlags uint32, Private []byte) AddModeLineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -569,8 +569,8 @@ 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 an error occurs, it can be retrieved using AddModeLineCookie.Check. +func AddModeLineChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, AfterDotclock Dotclock, AfterHdisplay, AfterHsyncstart, AfterHsyncend, AfterHtotal, AfterHskew, AfterVdisplay, AfterVsyncstart, AfterVsyncend, AfterVtotal uint16, AfterFlags uint32, Private []byte) AddModeLineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -587,9 +587,8 @@ func (cook AddModeLineCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for AddModeLine -// addModeLineRequest writes a AddModeLine request to a byte slice. -func addModeLineRequest(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) []byte { +// addModeLineRequest writes a AddModeLine request to a byte slice for transfer. +func addModeLineRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, AfterDotclock Dotclock, AfterHdisplay, AfterHsyncstart, AfterHsyncend, AfterHtotal, AfterHskew, AfterVdisplay, AfterVsyncstart, AfterVsyncend, AfterVtotal uint16, AfterFlags uint32, Private []byte) []byte { size := xgb.Pad((92 + xgb.Pad((int(Privsize) * 1)))) b := 0 buf := make([]byte, size) @@ -698,7 +697,7 @@ 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 { +func DeleteModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) DeleteModeLineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -710,8 +709,8 @@ 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 an error occurs, it can be retrieved using DeleteModeLineCookie.Check. +func DeleteModeLineChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) DeleteModeLineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -728,9 +727,8 @@ func (cook DeleteModeLineCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeleteModeLine -// deleteModeLineRequest writes a DeleteModeLine request to a byte slice. -func deleteModeLineRequest(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) []byte { +// deleteModeLineRequest writes a DeleteModeLine request to a byte slice for transfer. +func deleteModeLineRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) []byte { size := xgb.Pad((52 + xgb.Pad((int(Privsize) * 1)))) b := 0 buf := make([]byte, size) @@ -801,7 +799,7 @@ type GetAllModeLinesCookie struct { } // GetAllModeLines sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetAllModeLinesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetAllModeLinesCookie.Reply. func GetAllModeLines(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -872,8 +870,7 @@ func getAllModeLinesReply(buf []byte) *GetAllModeLinesReply { return v } -// Write request to wire for GetAllModeLines -// getAllModeLinesRequest writes a GetAllModeLines request to a byte slice. +// getAllModeLinesRequest writes a GetAllModeLines request to a byte slice for transfer. func getAllModeLinesRequest(c *xgb.Conn, Screen uint16) []byte { size := 8 b := 0 @@ -904,7 +901,7 @@ type GetDotClocksCookie struct { } // GetDotClocks sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetDotClocksCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetDotClocksCookie.Reply. func GetDotClocks(c *xgb.Conn, Screen uint16) GetDotClocksCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -986,8 +983,7 @@ func getDotClocksReply(buf []byte) *GetDotClocksReply { return v } -// Write request to wire for GetDotClocks -// getDotClocksRequest writes a GetDotClocks request to a byte slice. +// getDotClocksRequest writes a GetDotClocks request to a byte slice for transfer. func getDotClocksRequest(c *xgb.Conn, Screen uint16) []byte { size := 8 b := 0 @@ -1018,7 +1014,7 @@ type GetGammaCookie struct { } // GetGamma sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetGammaCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetGammaCookie.Reply. func GetGamma(c *xgb.Conn, Screen uint16) GetGammaCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1093,8 +1089,7 @@ func getGammaReply(buf []byte) *GetGammaReply { return v } -// Write request to wire for GetGamma -// getGammaRequest writes a GetGamma request to a byte slice. +// getGammaRequest writes a GetGamma request to a byte slice for transfer. func getGammaRequest(c *xgb.Conn, Screen uint16) []byte { size := 32 b := 0 @@ -1125,8 +1120,8 @@ 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 an error occurs, it will be returned with the reply by calling GetGammaRampCookie.Reply. +func GetGammaRamp(c *xgb.Conn, Screen, Size uint16) GetGammaRampCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -1139,7 +1134,7 @@ 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 { +func GetGammaRampUnchecked(c *xgb.Conn, Screen, Size uint16) GetGammaRampCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -1213,9 +1208,8 @@ func getGammaRampReply(buf []byte) *GetGammaRampReply { return v } -// Write request to wire for GetGammaRamp -// getGammaRampRequest writes a GetGammaRamp request to a byte slice. -func getGammaRampRequest(c *xgb.Conn, Screen uint16, Size uint16) []byte { +// getGammaRampRequest writes a GetGammaRamp request to a byte slice for transfer. +func getGammaRampRequest(c *xgb.Conn, Screen, Size uint16) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -1246,7 +1240,7 @@ type GetGammaRampSizeCookie struct { } // GetGammaRampSize sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetGammaRampSizeCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetGammaRampSizeCookie.Reply. func GetGammaRampSize(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1313,8 +1307,7 @@ func getGammaRampSizeReply(buf []byte) *GetGammaRampSizeReply { return v } -// Write request to wire for GetGammaRampSize -// getGammaRampSizeRequest writes a GetGammaRampSize request to a byte slice. +// getGammaRampSizeRequest writes a GetGammaRampSize request to a byte slice for transfer. func getGammaRampSizeRequest(c *xgb.Conn, Screen uint16) []byte { size := 8 b := 0 @@ -1345,7 +1338,7 @@ type GetModeLineCookie struct { } // GetModeLine sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetModeLineCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetModeLineCookie.Reply. func GetModeLine(c *xgb.Conn, Screen uint16) GetModeLineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1464,8 +1457,7 @@ func getModeLineReply(buf []byte) *GetModeLineReply { return v } -// Write request to wire for GetModeLine -// getModeLineRequest writes a GetModeLine request to a byte slice. +// getModeLineRequest writes a GetModeLine request to a byte slice for transfer. func getModeLineRequest(c *xgb.Conn, Screen uint16) []byte { size := 8 b := 0 @@ -1496,7 +1488,7 @@ type GetMonitorCookie struct { } // GetMonitor sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMonitorCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetMonitorCookie.Reply. func GetMonitor(c *xgb.Conn, Screen uint16) GetMonitorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1610,8 +1602,7 @@ func getMonitorReply(buf []byte) *GetMonitorReply { return v } -// Write request to wire for GetMonitor -// getMonitorRequest writes a GetMonitor request to a byte slice. +// getMonitorRequest writes a GetMonitor request to a byte slice for transfer. func getMonitorRequest(c *xgb.Conn, Screen uint16) []byte { size := 8 b := 0 @@ -1642,7 +1633,7 @@ type GetPermissionsCookie struct { } // GetPermissions sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPermissionsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPermissionsCookie.Reply. func GetPermissions(c *xgb.Conn, Screen uint16) GetPermissionsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1709,8 +1700,7 @@ func getPermissionsReply(buf []byte) *GetPermissionsReply { return v } -// Write request to wire for GetPermissions -// getPermissionsRequest writes a GetPermissions request to a byte slice. +// getPermissionsRequest writes a GetPermissions request to a byte slice for transfer. func getPermissionsRequest(c *xgb.Conn, Screen uint16) []byte { size := 8 b := 0 @@ -1741,7 +1731,7 @@ type GetViewPortCookie struct { } // GetViewPort sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetViewPortCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetViewPortCookie.Reply. func GetViewPort(c *xgb.Conn, Screen uint16) GetViewPortCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1812,8 +1802,7 @@ func getViewPortReply(buf []byte) *GetViewPortReply { return v } -// Write request to wire for GetViewPort -// getViewPortRequest writes a GetViewPort request to a byte slice. +// getViewPortRequest writes a GetViewPort request to a byte slice for transfer. func getViewPortRequest(c *xgb.Conn, Screen uint16) []byte { size := 8 b := 0 @@ -1845,7 +1834,7 @@ 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 { +func LockModeSwitch(c *xgb.Conn, Screen, Lock uint16) LockModeSwitchCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -1857,8 +1846,8 @@ 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 an error occurs, it can be retrieved using LockModeSwitchCookie.Check. +func LockModeSwitchChecked(c *xgb.Conn, Screen, Lock uint16) LockModeSwitchCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -1875,9 +1864,8 @@ func (cook LockModeSwitchCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for LockModeSwitch -// lockModeSwitchRequest writes a LockModeSwitch request to a byte slice. -func lockModeSwitchRequest(c *xgb.Conn, Screen uint16, Lock uint16) []byte { +// lockModeSwitchRequest writes a LockModeSwitch request to a byte slice for transfer. +func lockModeSwitchRequest(c *xgb.Conn, Screen, Lock uint16) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -1909,7 +1897,7 @@ 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 { +func ModModeLine(c *xgb.Conn, Screen uint32, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) ModModeLineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -1921,8 +1909,8 @@ 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 an error occurs, it can be retrieved using ModModeLineCookie.Check. +func ModModeLineChecked(c *xgb.Conn, Screen uint32, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) ModModeLineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -1939,9 +1927,8 @@ func (cook ModModeLineCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ModModeLine -// modModeLineRequest writes a ModModeLine request to a byte slice. -func modModeLineRequest(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) []byte { +// modModeLineRequest writes a ModModeLine request to a byte slice for transfer. +func modModeLineRequest(c *xgb.Conn, Screen uint32, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) []byte { size := xgb.Pad((48 + xgb.Pad((int(Privsize) * 1)))) b := 0 buf := make([]byte, size) @@ -2009,7 +1996,7 @@ type QueryVersionCookie struct { } // QueryVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. func QueryVersion(c *xgb.Conn) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2077,8 +2064,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. func queryVersionRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -2105,7 +2091,7 @@ 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 { +func SetClientVersion(c *xgb.Conn, Major, Minor uint16) SetClientVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2117,8 +2103,8 @@ 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 an error occurs, it can be retrieved using SetClientVersionCookie.Check. +func SetClientVersionChecked(c *xgb.Conn, Major, Minor uint16) SetClientVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2135,9 +2121,8 @@ func (cook SetClientVersionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetClientVersion -// setClientVersionRequest writes a SetClientVersion request to a byte slice. -func setClientVersionRequest(c *xgb.Conn, Major uint16, Minor uint16) []byte { +// setClientVersionRequest writes a SetClientVersion request to a byte slice for transfer. +func setClientVersionRequest(c *xgb.Conn, Major, Minor uint16) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -2169,7 +2154,7 @@ 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 { +func SetGamma(c *xgb.Conn, Screen uint16, Red, Green, Blue uint32) SetGammaCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2181,8 +2166,8 @@ 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 an error occurs, it can be retrieved using SetGammaCookie.Check. +func SetGammaChecked(c *xgb.Conn, Screen uint16, Red, Green, Blue uint32) SetGammaCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2199,9 +2184,8 @@ func (cook SetGammaCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetGamma -// setGammaRequest writes a SetGamma request to a byte slice. -func setGammaRequest(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue uint32) []byte { +// setGammaRequest writes a SetGamma request to a byte slice for transfer. +func setGammaRequest(c *xgb.Conn, Screen uint16, Red, Green, Blue uint32) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -2243,7 +2227,7 @@ 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 { +func SetGammaRamp(c *xgb.Conn, Screen, Size uint16, Red, Green, Blue []uint16) SetGammaRampCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2255,8 +2239,8 @@ 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 an error occurs, it can be retrieved using SetGammaRampCookie.Check. +func SetGammaRampChecked(c *xgb.Conn, Screen, Size uint16, Red, Green, Blue []uint16) SetGammaRampCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2273,9 +2257,8 @@ func (cook SetGammaRampCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetGammaRamp -// setGammaRampRequest writes a SetGammaRamp request to a byte slice. -func setGammaRampRequest(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16, Green []uint16, Blue []uint16) []byte { +// setGammaRampRequest writes a SetGammaRamp request to a byte slice for transfer. +func setGammaRampRequest(c *xgb.Conn, Screen, Size uint16, Red, Green, Blue []uint16) []byte { size := xgb.Pad((((8 + xgb.Pad((((int(Size) + 1) & -2) * 2))) + xgb.Pad((((int(Size) + 1) & -2) * 2))) + xgb.Pad((((int(Size) + 1) & -2) * 2)))) b := 0 buf := make([]byte, size) @@ -2322,7 +2305,7 @@ 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 { +func SetViewPort(c *xgb.Conn, Screen uint16, X, Y uint32) SetViewPortCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2334,8 +2317,8 @@ 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 an error occurs, it can be retrieved using SetViewPortCookie.Check. +func SetViewPortChecked(c *xgb.Conn, Screen uint16, X, Y uint32) SetViewPortCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2352,9 +2335,8 @@ func (cook SetViewPortCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetViewPort -// setViewPortRequest writes a SetViewPort request to a byte slice. -func setViewPortRequest(c *xgb.Conn, Screen uint16, X uint32, Y uint32) []byte { +// setViewPortRequest writes a SetViewPort request to a byte slice for transfer. +func setViewPortRequest(c *xgb.Conn, Screen uint16, X, Y uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -2391,7 +2373,7 @@ 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 { +func SwitchMode(c *xgb.Conn, Screen, Zoom uint16) SwitchModeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2403,8 +2385,8 @@ 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 an error occurs, it can be retrieved using SwitchModeCookie.Check. +func SwitchModeChecked(c *xgb.Conn, Screen, Zoom uint16) SwitchModeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2421,9 +2403,8 @@ func (cook SwitchModeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SwitchMode -// switchModeRequest writes a SwitchMode request to a byte slice. -func switchModeRequest(c *xgb.Conn, Screen uint16, Zoom uint16) []byte { +// switchModeRequest writes a SwitchMode request to a byte slice for transfer. +func switchModeRequest(c *xgb.Conn, Screen, Zoom uint16) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -2455,7 +2436,7 @@ 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 { +func SwitchToMode(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) SwitchToModeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2467,8 +2448,8 @@ 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 an error occurs, it can be retrieved using SwitchToModeCookie.Check. +func SwitchToModeChecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) SwitchToModeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2485,9 +2466,8 @@ func (cook SwitchToModeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SwitchToMode -// switchToModeRequest writes a SwitchToMode request to a byte slice. -func switchToModeRequest(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) []byte { +// switchToModeRequest writes a SwitchToMode request to a byte slice for transfer. +func switchToModeRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) []byte { size := xgb.Pad((52 + xgb.Pad((int(Privsize) * 1)))) b := 0 buf := make([]byte, size) @@ -2558,8 +2538,8 @@ 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 an error occurs, it will be returned with the reply by calling ValidateModeLineCookie.Reply. +func ValidateModeLine(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) ValidateModeLineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2572,7 +2552,7 @@ 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 { +func ValidateModeLineUnchecked(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) ValidateModeLineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-VidModeExtension"]; !ok { @@ -2625,9 +2605,8 @@ func validateModeLineReply(buf []byte) *ValidateModeLineReply { return v } -// Write request to wire for ValidateModeLine -// validateModeLineRequest writes a ValidateModeLine request to a byte slice. -func validateModeLineRequest(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) []byte { +// validateModeLineRequest writes a ValidateModeLine request to a byte slice for transfer. +func validateModeLineRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal uint16, Flags, Privsize uint32, Private []byte) []byte { size := xgb.Pad((52 + xgb.Pad((int(Privsize) * 1)))) b := 0 buf := make([]byte, size) -- cgit v1.2.3-70-g09d2