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/bigreq/bigreq.go | 5 +- nexgb/composite/composite.go | 51 +- nexgb/damage/damage.go | 37 +- nexgb/dpms/dpms.go | 52 +- nexgb/dri2/dri2.go | 100 +-- nexgb/ge/ge.go | 11 +- nexgb/glx/glx.go | 769 +++++++--------- nexgb/randr/randr.go | 299 +++---- nexgb/record/record.go | 58 +- nexgb/render/render.go | 245 +++-- nexgb/res/res.go | 42 +- nexgb/screensaver/screensaver.go | 42 +- nexgb/shape/shape.go | 69 +- nexgb/shm/shm.go | 58 +- nexgb/xcmisc/xcmisc.go | 21 +- nexgb/xevie/xevie.go | 31 +- nexgb/xf86dri/xf86dri.go | 96 +- nexgb/xf86vidmode/xf86vidmode.go | 177 ++-- nexgb/xfixes/xfixes.go | 249 +++--- nexgb/xinerama/xinerama.go | 36 +- nexgb/xprint/xprint.go | 149 ++-- nexgb/xproto/xproto.go | 1824 +++++++++++++++++++++++++------------- nexgb/xselinux/xselinux.go | 127 ++- nexgb/xtest/xtest.go | 26 +- nexgb/xv/xv.go | 148 ++-- nexgb/xvmc/xvmc.go | 57 +- 26 files changed, 2479 insertions(+), 2300 deletions(-) (limited to 'nexgb') diff --git a/nexgb/bigreq/bigreq.go b/nexgb/bigreq/bigreq.go index b0dd1a8..237e6f3 100644 --- a/nexgb/bigreq/bigreq.go +++ b/nexgb/bigreq/bigreq.go @@ -71,7 +71,7 @@ type EnableCookie struct { } // Enable sends a checked request. -// If an error occurs, it will be returned with the reply by calling EnableCookie.Reply() +// If an error occurs, it will be returned with the reply by calling EnableCookie.Reply. func Enable(c *xgb.Conn) EnableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -135,8 +135,7 @@ func enableReply(buf []byte) *EnableReply { return v } -// Write request to wire for Enable -// enableRequest writes a Enable request to a byte slice. +// enableRequest writes a Enable request to a byte slice for transfer. func enableRequest(c *xgb.Conn) []byte { size := 4 b := 0 diff --git a/nexgb/composite/composite.go b/nexgb/composite/composite.go index cad0ce1..5e988bf 100644 --- a/nexgb/composite/composite.go +++ b/nexgb/composite/composite.go @@ -90,7 +90,7 @@ func CreateRegionFromBorderClip(c *xgb.Conn, Region xfixes.Region, Window xproto } // CreateRegionFromBorderClipChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateRegionFromBorderClipCookie.Check() +// If an error occurs, it can be retrieved using CreateRegionFromBorderClipCookie.Check. func CreateRegionFromBorderClipChecked(c *xgb.Conn, Region xfixes.Region, Window xproto.Window) CreateRegionFromBorderClipCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -108,8 +108,7 @@ func (cook CreateRegionFromBorderClipCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateRegionFromBorderClip -// createRegionFromBorderClipRequest writes a CreateRegionFromBorderClip request to a byte slice. +// createRegionFromBorderClipRequest writes a CreateRegionFromBorderClip request to a byte slice for transfer. func createRegionFromBorderClipRequest(c *xgb.Conn, Region xfixes.Region, Window xproto.Window) []byte { size := 12 b := 0 @@ -141,7 +140,7 @@ type GetOverlayWindowCookie struct { } // GetOverlayWindow sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetOverlayWindowCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetOverlayWindowCookie.Reply. func GetOverlayWindow(c *xgb.Conn, Window xproto.Window) GetOverlayWindowCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -208,8 +207,7 @@ func getOverlayWindowReply(buf []byte) *GetOverlayWindowReply { return v } -// Write request to wire for GetOverlayWindow -// getOverlayWindowRequest writes a GetOverlayWindow request to a byte slice. +// getOverlayWindowRequest writes a GetOverlayWindow request to a byte slice for transfer. func getOverlayWindowRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -251,7 +249,7 @@ func NameWindowPixmap(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) N } // NameWindowPixmapChecked sends a checked request. -// If an error occurs, it can be retrieved using NameWindowPixmapCookie.Check() +// If an error occurs, it can be retrieved using NameWindowPixmapCookie.Check. func NameWindowPixmapChecked(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) NameWindowPixmapCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -269,8 +267,7 @@ func (cook NameWindowPixmapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for NameWindowPixmap -// nameWindowPixmapRequest writes a NameWindowPixmap request to a byte slice. +// nameWindowPixmapRequest writes a NameWindowPixmap request to a byte slice for transfer. func nameWindowPixmapRequest(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) []byte { size := 12 b := 0 @@ -302,8 +299,8 @@ type QueryVersionCookie struct { } // QueryVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply() -func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["Composite"]; !ok { @@ -316,7 +313,7 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uin // QueryVersionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["Composite"]; !ok { @@ -373,9 +370,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -419,7 +415,7 @@ func RedirectSubwindows(c *xgb.Conn, Window xproto.Window, Update byte) Redirect } // RedirectSubwindowsChecked sends a checked request. -// If an error occurs, it can be retrieved using RedirectSubwindowsCookie.Check() +// If an error occurs, it can be retrieved using RedirectSubwindowsCookie.Check. func RedirectSubwindowsChecked(c *xgb.Conn, Window xproto.Window, Update byte) RedirectSubwindowsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -437,8 +433,7 @@ func (cook RedirectSubwindowsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for RedirectSubwindows -// redirectSubwindowsRequest writes a RedirectSubwindows request to a byte slice. +// redirectSubwindowsRequest writes a RedirectSubwindows request to a byte slice for transfer. func redirectSubwindowsRequest(c *xgb.Conn, Window xproto.Window, Update byte) []byte { size := 12 b := 0 @@ -485,7 +480,7 @@ func RedirectWindow(c *xgb.Conn, Window xproto.Window, Update byte) RedirectWind } // RedirectWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using RedirectWindowCookie.Check() +// If an error occurs, it can be retrieved using RedirectWindowCookie.Check. func RedirectWindowChecked(c *xgb.Conn, Window xproto.Window, Update byte) RedirectWindowCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -503,8 +498,7 @@ func (cook RedirectWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for RedirectWindow -// redirectWindowRequest writes a RedirectWindow request to a byte slice. +// redirectWindowRequest writes a RedirectWindow request to a byte slice for transfer. func redirectWindowRequest(c *xgb.Conn, Window xproto.Window, Update byte) []byte { size := 12 b := 0 @@ -551,7 +545,7 @@ func ReleaseOverlayWindow(c *xgb.Conn, Window xproto.Window) ReleaseOverlayWindo } // ReleaseOverlayWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using ReleaseOverlayWindowCookie.Check() +// If an error occurs, it can be retrieved using ReleaseOverlayWindowCookie.Check. func ReleaseOverlayWindowChecked(c *xgb.Conn, Window xproto.Window) ReleaseOverlayWindowCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -569,8 +563,7 @@ func (cook ReleaseOverlayWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ReleaseOverlayWindow -// releaseOverlayWindowRequest writes a ReleaseOverlayWindow request to a byte slice. +// releaseOverlayWindowRequest writes a ReleaseOverlayWindow request to a byte slice for transfer. func releaseOverlayWindowRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -612,7 +605,7 @@ func UnredirectSubwindows(c *xgb.Conn, Window xproto.Window, Update byte) Unredi } // UnredirectSubwindowsChecked sends a checked request. -// If an error occurs, it can be retrieved using UnredirectSubwindowsCookie.Check() +// If an error occurs, it can be retrieved using UnredirectSubwindowsCookie.Check. func UnredirectSubwindowsChecked(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectSubwindowsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -630,8 +623,7 @@ func (cook UnredirectSubwindowsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UnredirectSubwindows -// unredirectSubwindowsRequest writes a UnredirectSubwindows request to a byte slice. +// unredirectSubwindowsRequest writes a UnredirectSubwindows request to a byte slice for transfer. func unredirectSubwindowsRequest(c *xgb.Conn, Window xproto.Window, Update byte) []byte { size := 12 b := 0 @@ -678,7 +670,7 @@ func UnredirectWindow(c *xgb.Conn, Window xproto.Window, Update byte) Unredirect } // UnredirectWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using UnredirectWindowCookie.Check() +// If an error occurs, it can be retrieved using UnredirectWindowCookie.Check. func UnredirectWindowChecked(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectWindowCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -696,8 +688,7 @@ func (cook UnredirectWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UnredirectWindow -// unredirectWindowRequest writes a UnredirectWindow request to a byte slice. +// unredirectWindowRequest writes a UnredirectWindow request to a byte slice for transfer. func unredirectWindowRequest(c *xgb.Conn, Window xproto.Window, Update byte) []byte { size := 12 b := 0 diff --git a/nexgb/damage/damage.go b/nexgb/damage/damage.go index 7edccd2..d385b9e 100644 --- a/nexgb/damage/damage.go +++ b/nexgb/damage/damage.go @@ -250,7 +250,7 @@ func Add(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie } // AddChecked sends a checked request. -// If an error occurs, it can be retrieved using AddCookie.Check() +// If an error occurs, it can be retrieved using AddCookie.Check. func AddChecked(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -268,8 +268,7 @@ func (cook AddCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Add -// addRequest writes a Add request to a byte slice. +// addRequest writes a Add request to a byte slice for transfer. func addRequest(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) []byte { size := 12 b := 0 @@ -314,7 +313,7 @@ func Create(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) Cr } // CreateChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateCookie.Check() +// If an error occurs, it can be retrieved using CreateCookie.Check. func CreateChecked(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) CreateCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -332,8 +331,7 @@ func (cook CreateCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Create -// createRequest writes a Create request to a byte slice. +// createRequest writes a Create request to a byte slice for transfer. func createRequest(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) []byte { size := 16 b := 0 @@ -383,7 +381,7 @@ func Destroy(c *xgb.Conn, Damage Damage) DestroyCookie { } // DestroyChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyCookie.Check() +// If an error occurs, it can be retrieved using DestroyCookie.Check. func DestroyChecked(c *xgb.Conn, Damage Damage) DestroyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -401,8 +399,7 @@ func (cook DestroyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Destroy -// destroyRequest writes a Destroy request to a byte slice. +// destroyRequest writes a Destroy request to a byte slice for transfer. func destroyRequest(c *xgb.Conn, Damage Damage) []byte { size := 8 b := 0 @@ -431,8 +428,8 @@ type QueryVersionCookie struct { } // QueryVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply() -func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DAMAGE"]; !ok { @@ -445,7 +442,7 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uin // QueryVersionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DAMAGE"]; !ok { @@ -502,9 +499,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -536,7 +532,7 @@ type SubtractCookie struct { // Subtract sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func Subtract(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Region) SubtractCookie { +func Subtract(c *xgb.Conn, Damage Damage, Repair, Parts xfixes.Region) SubtractCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DAMAGE"]; !ok { @@ -548,8 +544,8 @@ func Subtract(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Reg } // SubtractChecked sends a checked request. -// If an error occurs, it can be retrieved using SubtractCookie.Check() -func SubtractChecked(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Region) SubtractCookie { +// If an error occurs, it can be retrieved using SubtractCookie.Check. +func SubtractChecked(c *xgb.Conn, Damage Damage, Repair, Parts xfixes.Region) SubtractCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DAMAGE"]; !ok { @@ -566,9 +562,8 @@ func (cook SubtractCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Subtract -// subtractRequest writes a Subtract request to a byte slice. -func subtractRequest(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Region) []byte { +// subtractRequest writes a Subtract request to a byte slice for transfer. +func subtractRequest(c *xgb.Conn, Damage Damage, Repair, Parts xfixes.Region) []byte { size := 16 b := 0 buf := make([]byte, size) diff --git a/nexgb/dpms/dpms.go b/nexgb/dpms/dpms.go index 3c4b7ce..e8c02e8 100644 --- a/nexgb/dpms/dpms.go +++ b/nexgb/dpms/dpms.go @@ -78,7 +78,7 @@ type CapableCookie struct { } // Capable sends a checked request. -// If an error occurs, it will be returned with the reply by calling CapableCookie.Reply() +// If an error occurs, it will be returned with the reply by calling CapableCookie.Reply. func Capable(c *xgb.Conn) CapableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -149,8 +149,7 @@ func capableReply(buf []byte) *CapableReply { return v } -// Write request to wire for Capable -// capableRequest writes a Capable request to a byte slice. +// capableRequest writes a Capable request to a byte slice for transfer. func capableRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -189,7 +188,7 @@ func Disable(c *xgb.Conn) DisableCookie { } // DisableChecked sends a checked request. -// If an error occurs, it can be retrieved using DisableCookie.Check() +// If an error occurs, it can be retrieved using DisableCookie.Check. func DisableChecked(c *xgb.Conn) DisableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -207,8 +206,7 @@ func (cook DisableCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Disable -// disableRequest writes a Disable request to a byte slice. +// disableRequest writes a Disable request to a byte slice for transfer. func disableRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -247,7 +245,7 @@ func Enable(c *xgb.Conn) EnableCookie { } // EnableChecked sends a checked request. -// If an error occurs, it can be retrieved using EnableCookie.Check() +// If an error occurs, it can be retrieved using EnableCookie.Check. func EnableChecked(c *xgb.Conn) EnableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -265,8 +263,7 @@ func (cook EnableCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Enable -// enableRequest writes a Enable request to a byte slice. +// enableRequest writes a Enable request to a byte slice for transfer. func enableRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -305,7 +302,7 @@ func ForceLevel(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie { } // ForceLevelChecked sends a checked request. -// If an error occurs, it can be retrieved using ForceLevelCookie.Check() +// If an error occurs, it can be retrieved using ForceLevelCookie.Check. func ForceLevelChecked(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -323,8 +320,7 @@ func (cook ForceLevelCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ForceLevel -// forceLevelRequest writes a ForceLevel request to a byte slice. +// forceLevelRequest writes a ForceLevel request to a byte slice for transfer. func forceLevelRequest(c *xgb.Conn, PowerLevel uint16) []byte { size := 8 b := 0 @@ -353,7 +349,7 @@ type GetTimeoutsCookie struct { } // GetTimeouts sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTimeoutsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetTimeoutsCookie.Reply. func GetTimeouts(c *xgb.Conn) GetTimeoutsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -428,8 +424,7 @@ func getTimeoutsReply(buf []byte) *GetTimeoutsReply { return v } -// Write request to wire for GetTimeouts -// getTimeoutsRequest writes a GetTimeouts request to a byte slice. +// getTimeoutsRequest writes a GetTimeouts request to a byte slice for transfer. func getTimeoutsRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -455,8 +450,8 @@ type GetVersionCookie struct { } // GetVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply() -func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie { +// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply. +func GetVersion(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) GetVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DPMS"]; !ok { @@ -469,7 +464,7 @@ func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint1 // GetVersionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie { +func GetVersionUnchecked(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) GetVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DPMS"]; !ok { @@ -523,9 +518,8 @@ func getVersionReply(buf []byte) *GetVersionReply { return v } -// Write request to wire for GetVersion -// getVersionRequest writes a GetVersion request to a byte slice. -func getVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) []byte { +// getVersionRequest writes a GetVersion request to a byte slice for transfer. +func getVersionRequest(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -556,7 +550,7 @@ type InfoCookie struct { } // Info sends a checked request. -// If an error occurs, it will be returned with the reply by calling InfoCookie.Reply() +// If an error occurs, it will be returned with the reply by calling InfoCookie.Reply. func Info(c *xgb.Conn) InfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -631,8 +625,7 @@ func infoReply(buf []byte) *InfoReply { return v } -// Write request to wire for Info -// infoRequest writes a Info request to a byte slice. +// infoRequest writes a Info request to a byte slice for transfer. func infoRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -659,7 +652,7 @@ type SetTimeoutsCookie struct { // SetTimeouts sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetTimeouts(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) SetTimeoutsCookie { +func SetTimeouts(c *xgb.Conn, StandbyTimeout, SuspendTimeout, OffTimeout uint16) SetTimeoutsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DPMS"]; !ok { @@ -671,8 +664,8 @@ func SetTimeouts(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffT } // SetTimeoutsChecked sends a checked request. -// If an error occurs, it can be retrieved using SetTimeoutsCookie.Check() -func SetTimeoutsChecked(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) SetTimeoutsCookie { +// If an error occurs, it can be retrieved using SetTimeoutsCookie.Check. +func SetTimeoutsChecked(c *xgb.Conn, StandbyTimeout, SuspendTimeout, OffTimeout uint16) SetTimeoutsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DPMS"]; !ok { @@ -689,9 +682,8 @@ func (cook SetTimeoutsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetTimeouts -// setTimeoutsRequest writes a SetTimeouts request to a byte slice. -func setTimeoutsRequest(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) []byte { +// setTimeoutsRequest writes a SetTimeouts request to a byte slice for transfer. +func setTimeoutsRequest(c *xgb.Conn, StandbyTimeout, SuspendTimeout, OffTimeout uint16) []byte { size := 12 b := 0 buf := make([]byte, size) diff --git a/nexgb/dri2/dri2.go b/nexgb/dri2/dri2.go index 5ae789d..86d0996 100644 --- a/nexgb/dri2/dri2.go +++ b/nexgb/dri2/dri2.go @@ -404,7 +404,7 @@ type AuthenticateCookie struct { } // Authenticate sends a checked request. -// If an error occurs, it will be returned with the reply by calling AuthenticateCookie.Reply() +// If an error occurs, it will be returned with the reply by calling AuthenticateCookie.Reply. func Authenticate(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -468,8 +468,7 @@ func authenticateReply(buf []byte) *AuthenticateReply { return v } -// Write request to wire for Authenticate -// authenticateRequest writes a Authenticate request to a byte slice. +// authenticateRequest writes a Authenticate request to a byte slice for transfer. func authenticateRequest(c *xgb.Conn, Window xproto.Window, Magic uint32) []byte { size := 12 b := 0 @@ -501,7 +500,7 @@ type ConnectCookie struct { } // Connect sends a checked request. -// If an error occurs, it will be returned with the reply by calling ConnectCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ConnectCookie.Reply. func Connect(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -593,8 +592,7 @@ func connectReply(buf []byte) *ConnectReply { return v } -// Write request to wire for Connect -// connectRequest writes a Connect request to a byte slice. +// connectRequest writes a Connect request to a byte slice for transfer. func connectRequest(c *xgb.Conn, Window xproto.Window, DriverType uint32) []byte { size := 12 b := 0 @@ -626,8 +624,8 @@ type CopyRegionCookie struct { } // CopyRegion sends a checked request. -// If an error occurs, it will be returned with the reply by calling CopyRegionCookie.Reply() -func CopyRegion(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) CopyRegionCookie { +// If an error occurs, it will be returned with the reply by calling CopyRegionCookie.Reply. +func CopyRegion(c *xgb.Conn, Drawable xproto.Drawable, Region, Dest, Src uint32) CopyRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DRI2"]; !ok { @@ -640,7 +638,7 @@ func CopyRegion(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint3 // CopyRegionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CopyRegionUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) CopyRegionCookie { +func CopyRegionUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Region, Dest, Src uint32) CopyRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DRI2"]; !ok { @@ -686,9 +684,8 @@ func copyRegionReply(buf []byte) *CopyRegionReply { return v } -// Write request to wire for CopyRegion -// copyRegionRequest writes a CopyRegion request to a byte slice. -func copyRegionRequest(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) []byte { +// copyRegionRequest writes a CopyRegion request to a byte slice for transfer. +func copyRegionRequest(c *xgb.Conn, Drawable xproto.Drawable, Region, Dest, Src uint32) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -738,7 +735,7 @@ func CreateDrawable(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie } // CreateDrawableChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateDrawableCookie.Check() +// If an error occurs, it can be retrieved using CreateDrawableCookie.Check. func CreateDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -756,8 +753,7 @@ func (cook CreateDrawableCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateDrawable -// createDrawableRequest writes a CreateDrawable request to a byte slice. +// createDrawableRequest writes a CreateDrawable request to a byte slice for transfer. func createDrawableRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte { size := 8 b := 0 @@ -799,7 +795,7 @@ func DestroyDrawable(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCooki } // DestroyDrawableChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyDrawableCookie.Check() +// If an error occurs, it can be retrieved using DestroyDrawableCookie.Check. func DestroyDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -817,8 +813,7 @@ func (cook DestroyDrawableCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyDrawable -// destroyDrawableRequest writes a DestroyDrawable request to a byte slice. +// destroyDrawableRequest writes a DestroyDrawable request to a byte slice for transfer. func destroyDrawableRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte { size := 8 b := 0 @@ -847,7 +842,7 @@ type GetBuffersCookie struct { } // GetBuffers sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetBuffersCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetBuffersCookie.Reply. func GetBuffers(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) GetBuffersCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -926,8 +921,7 @@ func getBuffersReply(buf []byte) *GetBuffersReply { return v } -// Write request to wire for GetBuffers -// getBuffersRequest writes a GetBuffers request to a byte slice. +// getBuffersRequest writes a GetBuffers request to a byte slice for transfer. func getBuffersRequest(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) []byte { size := xgb.Pad((12 + xgb.Pad((len(Attachments) * 4)))) b := 0 @@ -964,7 +958,7 @@ type GetBuffersWithFormatCookie struct { } // GetBuffersWithFormat sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetBuffersWithFormatCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetBuffersWithFormatCookie.Reply. func GetBuffersWithFormat(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) GetBuffersWithFormatCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1043,8 +1037,7 @@ func getBuffersWithFormatReply(buf []byte) *GetBuffersWithFormatReply { return v } -// Write request to wire for GetBuffersWithFormat -// getBuffersWithFormatRequest writes a GetBuffersWithFormat request to a byte slice. +// getBuffersWithFormatRequest writes a GetBuffersWithFormat request to a byte slice for transfer. func getBuffersWithFormatRequest(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) []byte { size := xgb.Pad((12 + xgb.Pad((len(Attachments) * 8)))) b := 0 @@ -1078,7 +1071,7 @@ type GetMSCCookie struct { } // GetMSC sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMSCCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetMSCCookie.Reply. func GetMSC(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1162,8 +1155,7 @@ func getMSCReply(buf []byte) *GetMSCReply { return v } -// Write request to wire for GetMSC -// getMSCRequest writes a GetMSC request to a byte slice. +// getMSCRequest writes a GetMSC request to a byte slice for transfer. func getMSCRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte { size := 8 b := 0 @@ -1192,7 +1184,7 @@ type GetParamCookie struct { } // GetParam sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetParamCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetParamCookie.Reply. func GetParam(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) GetParamCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1265,8 +1257,7 @@ func getParamReply(buf []byte) *GetParamReply { return v } -// Write request to wire for GetParam -// getParamRequest writes a GetParam request to a byte slice. +// getParamRequest writes a GetParam request to a byte slice for transfer. func getParamRequest(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) []byte { size := 12 b := 0 @@ -1298,8 +1289,8 @@ 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, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, MajorVersion, MinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DRI2"]; !ok { @@ -1312,7 +1303,7 @@ func QueryVersion(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) QueryVe // 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, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, MajorVersion, MinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DRI2"]; !ok { @@ -1366,9 +1357,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, MajorVersion, MinorVersion uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -1399,8 +1389,8 @@ type SwapBuffersCookie struct { } // SwapBuffers sends a checked request. -// If an error occurs, it will be returned with the reply by calling SwapBuffersCookie.Reply() -func SwapBuffers(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) SwapBuffersCookie { +// If an error occurs, it will be returned with the reply by calling SwapBuffersCookie.Reply. +func SwapBuffers(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo uint32) SwapBuffersCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DRI2"]; !ok { @@ -1413,7 +1403,7 @@ func SwapBuffers(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, Targ // SwapBuffersUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SwapBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) SwapBuffersCookie { +func SwapBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo uint32) SwapBuffersCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DRI2"]; !ok { @@ -1467,9 +1457,8 @@ func swapBuffersReply(buf []byte) *SwapBuffersReply { return v } -// Write request to wire for SwapBuffers -// swapBuffersRequest writes a SwapBuffers request to a byte slice. -func swapBuffersRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) []byte { +// swapBuffersRequest writes a SwapBuffers request to a byte slice for transfer. +func swapBuffersRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo uint32) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -1528,7 +1517,7 @@ func SwapInterval(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIn } // SwapIntervalChecked sends a checked request. -// If an error occurs, it can be retrieved using SwapIntervalCookie.Check() +// If an error occurs, it can be retrieved using SwapIntervalCookie.Check. func SwapIntervalChecked(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1546,8 +1535,7 @@ func (cook SwapIntervalCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SwapInterval -// swapIntervalRequest writes a SwapInterval request to a byte slice. +// swapIntervalRequest writes a SwapInterval request to a byte slice for transfer. func swapIntervalRequest(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) []byte { size := 12 b := 0 @@ -1579,8 +1567,8 @@ type WaitMSCCookie struct { } // WaitMSC sends a checked request. -// If an error occurs, it will be returned with the reply by calling WaitMSCCookie.Reply() -func WaitMSC(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) WaitMSCCookie { +// If an error occurs, it will be returned with the reply by calling WaitMSCCookie.Reply. +func WaitMSC(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo uint32) WaitMSCCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DRI2"]; !ok { @@ -1593,7 +1581,7 @@ func WaitMSC(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMs // WaitMSCUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func WaitMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) WaitMSCCookie { +func WaitMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo uint32) WaitMSCCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DRI2"]; !ok { @@ -1663,9 +1651,8 @@ func waitMSCReply(buf []byte) *WaitMSCReply { return v } -// Write request to wire for WaitMSC -// waitMSCRequest writes a WaitMSC request to a byte slice. -func waitMSCRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) []byte { +// waitMSCRequest writes a WaitMSC request to a byte slice for transfer. +func waitMSCRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo uint32) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -1711,8 +1698,8 @@ type WaitSBCCookie struct { } // WaitSBC sends a checked request. -// If an error occurs, it will be returned with the reply by calling WaitSBCCookie.Reply() -func WaitSBC(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) WaitSBCCookie { +// If an error occurs, it will be returned with the reply by calling WaitSBCCookie.Reply. +func WaitSBC(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi, TargetSbcLo uint32) WaitSBCCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DRI2"]; !ok { @@ -1725,7 +1712,7 @@ func WaitSBC(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSb // WaitSBCUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func WaitSBCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) WaitSBCCookie { +func WaitSBCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi, TargetSbcLo uint32) WaitSBCCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["DRI2"]; !ok { @@ -1795,9 +1782,8 @@ func waitSBCReply(buf []byte) *WaitSBCReply { return v } -// Write request to wire for WaitSBC -// waitSBCRequest writes a WaitSBC request to a byte slice. -func waitSBCRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) []byte { +// waitSBCRequest writes a WaitSBC request to a byte slice for transfer. +func waitSBCRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi, TargetSbcLo uint32) []byte { size := 16 b := 0 buf := make([]byte, size) diff --git a/nexgb/ge/ge.go b/nexgb/ge/ge.go index 676a4ed..8830a07 100644 --- a/nexgb/ge/ge.go +++ b/nexgb/ge/ge.go @@ -71,8 +71,8 @@ type QueryVersionCookie struct { } // QueryVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply() -func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["Generic Event Extension"]; !ok { @@ -85,7 +85,7 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uin // QueryVersionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["Generic Event Extension"]; !ok { @@ -142,9 +142,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) []byte { size := 8 b := 0 buf := make([]byte, size) diff --git a/nexgb/glx/glx.go b/nexgb/glx/glx.go index cba9593..07755cc 100644 --- a/nexgb/glx/glx.go +++ b/nexgb/glx/glx.go @@ -1031,7 +1031,7 @@ type AreTexturesResidentCookie struct { } // AreTexturesResident sends a checked request. -// If an error occurs, it will be returned with the reply by calling AreTexturesResidentCookie.Reply() +// If an error occurs, it will be returned with the reply by calling AreTexturesResidentCookie.Reply. func AreTexturesResident(c *xgb.Conn, ContextTag ContextTag, N int32, Textures []uint32) AreTexturesResidentCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1109,8 +1109,7 @@ func areTexturesResidentReply(buf []byte) *AreTexturesResidentReply { return v } -// Write request to wire for AreTexturesResident -// areTexturesResidentRequest writes a AreTexturesResident request to a byte slice. +// areTexturesResidentRequest writes a AreTexturesResident request to a byte slice for transfer. func areTexturesResidentRequest(c *xgb.Conn, ContextTag ContextTag, N int32, Textures []uint32) []byte { size := xgb.Pad((12 + xgb.Pad((int(N) * 4)))) b := 0 @@ -1160,7 +1159,7 @@ func ChangeDrawableAttributes(c *xgb.Conn, Drawable Drawable, NumAttribs uint32, } // ChangeDrawableAttributesChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeDrawableAttributesCookie.Check() +// If an error occurs, it can be retrieved using ChangeDrawableAttributesCookie.Check. func ChangeDrawableAttributesChecked(c *xgb.Conn, Drawable Drawable, NumAttribs uint32, Attribs []uint32) ChangeDrawableAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1178,8 +1177,7 @@ func (cook ChangeDrawableAttributesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeDrawableAttributes -// changeDrawableAttributesRequest writes a ChangeDrawableAttributes request to a byte slice. +// changeDrawableAttributesRequest writes a ChangeDrawableAttributes request to a byte slice for transfer. func changeDrawableAttributesRequest(c *xgb.Conn, Drawable Drawable, NumAttribs uint32, Attribs []uint32) []byte { size := xgb.Pad((12 + xgb.Pad(((int(NumAttribs) * 2) * 4)))) b := 0 @@ -1217,7 +1215,7 @@ type ClientInfoCookie struct { // ClientInfo sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ClientInfo(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, StrLen uint32, String string) ClientInfoCookie { +func ClientInfo(c *xgb.Conn, MajorVersion, MinorVersion, StrLen uint32, String string) ClientInfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -1229,8 +1227,8 @@ func ClientInfo(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, StrLen ui } // ClientInfoChecked sends a checked request. -// If an error occurs, it can be retrieved using ClientInfoCookie.Check() -func ClientInfoChecked(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, StrLen uint32, String string) ClientInfoCookie { +// If an error occurs, it can be retrieved using ClientInfoCookie.Check. +func ClientInfoChecked(c *xgb.Conn, MajorVersion, MinorVersion, StrLen uint32, String string) ClientInfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -1247,9 +1245,8 @@ func (cook ClientInfoCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ClientInfo -// clientInfoRequest writes a ClientInfo request to a byte slice. -func clientInfoRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, StrLen uint32, String string) []byte { +// clientInfoRequest writes a ClientInfo request to a byte slice for transfer. +func clientInfoRequest(c *xgb.Conn, MajorVersion, MinorVersion, StrLen uint32, String string) []byte { size := xgb.Pad((16 + xgb.Pad((int(StrLen) * 1)))) b := 0 buf := make([]byte, size) @@ -1287,7 +1284,7 @@ type CopyContextCookie struct { // CopyContext sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CopyContext(c *xgb.Conn, Src Context, Dest Context, Mask uint32, SrcContextTag ContextTag) CopyContextCookie { +func CopyContext(c *xgb.Conn, Src, Dest Context, Mask uint32, SrcContextTag ContextTag) CopyContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -1299,8 +1296,8 @@ func CopyContext(c *xgb.Conn, Src Context, Dest Context, Mask uint32, SrcContext } // CopyContextChecked sends a checked request. -// If an error occurs, it can be retrieved using CopyContextCookie.Check() -func CopyContextChecked(c *xgb.Conn, Src Context, Dest Context, Mask uint32, SrcContextTag ContextTag) CopyContextCookie { +// If an error occurs, it can be retrieved using CopyContextCookie.Check. +func CopyContextChecked(c *xgb.Conn, Src, Dest Context, Mask uint32, SrcContextTag ContextTag) CopyContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -1317,9 +1314,8 @@ func (cook CopyContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CopyContext -// copyContextRequest writes a CopyContext request to a byte slice. -func copyContextRequest(c *xgb.Conn, Src Context, Dest Context, Mask uint32, SrcContextTag ContextTag) []byte { +// copyContextRequest writes a CopyContext request to a byte slice for transfer. +func copyContextRequest(c *xgb.Conn, Src, Dest Context, Mask uint32, SrcContextTag ContextTag) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -1369,7 +1365,7 @@ func CreateContext(c *xgb.Conn, Context Context, Visual xproto.Visualid, Screen } // CreateContextChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateContextCookie.Check() +// If an error occurs, it can be retrieved using CreateContextCookie.Check. func CreateContextChecked(c *xgb.Conn, Context Context, Visual xproto.Visualid, Screen uint32, ShareList Context, IsDirect bool) CreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1387,8 +1383,7 @@ func (cook CreateContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateContext -// createContextRequest writes a CreateContext request to a byte slice. +// createContextRequest writes a CreateContext request to a byte slice for transfer. func createContextRequest(c *xgb.Conn, Context Context, Visual xproto.Visualid, Screen uint32, ShareList Context, IsDirect bool) []byte { size := 24 b := 0 @@ -1448,7 +1443,7 @@ func CreateContextAttribsARB(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Sc } // CreateContextAttribsARBChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateContextAttribsARBCookie.Check() +// If an error occurs, it can be retrieved using CreateContextAttribsARBCookie.Check. func CreateContextAttribsARBChecked(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Screen uint32, ShareList Context, IsDirect bool, NumAttribs uint32, Attribs []uint32) CreateContextAttribsARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1466,8 +1461,7 @@ func (cook CreateContextAttribsARBCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateContextAttribsARB -// createContextAttribsARBRequest writes a CreateContextAttribsARB request to a byte slice. +// createContextAttribsARBRequest writes a CreateContextAttribsARB request to a byte slice for transfer. func createContextAttribsARBRequest(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Screen uint32, ShareList Context, IsDirect bool, NumAttribs uint32, Attribs []uint32) []byte { size := xgb.Pad((28 + xgb.Pad(((int(NumAttribs) * 2) * 4)))) b := 0 @@ -1535,7 +1529,7 @@ func CreateGLXPixmap(c *xgb.Conn, Screen uint32, Visual xproto.Visualid, Pixmap } // CreateGLXPixmapChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateGLXPixmapCookie.Check() +// If an error occurs, it can be retrieved using CreateGLXPixmapCookie.Check. func CreateGLXPixmapChecked(c *xgb.Conn, Screen uint32, Visual xproto.Visualid, Pixmap xproto.Pixmap, GlxPixmap Pixmap) CreateGLXPixmapCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1553,8 +1547,7 @@ func (cook CreateGLXPixmapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateGLXPixmap -// createGLXPixmapRequest writes a CreateGLXPixmap request to a byte slice. +// createGLXPixmapRequest writes a CreateGLXPixmap request to a byte slice for transfer. func createGLXPixmapRequest(c *xgb.Conn, Screen uint32, Visual xproto.Visualid, Pixmap xproto.Pixmap, GlxPixmap Pixmap) []byte { size := 20 b := 0 @@ -1593,7 +1586,7 @@ type CreateNewContextCookie struct { // CreateNewContext sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateNewContext(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Screen uint32, RenderType uint32, ShareList Context, IsDirect bool) CreateNewContextCookie { +func CreateNewContext(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Screen, RenderType uint32, ShareList Context, IsDirect bool) CreateNewContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -1605,8 +1598,8 @@ func CreateNewContext(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Screen ui } // CreateNewContextChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateNewContextCookie.Check() -func CreateNewContextChecked(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Screen uint32, RenderType uint32, ShareList Context, IsDirect bool) CreateNewContextCookie { +// If an error occurs, it can be retrieved using CreateNewContextCookie.Check. +func CreateNewContextChecked(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Screen, RenderType uint32, ShareList Context, IsDirect bool) CreateNewContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -1623,9 +1616,8 @@ func (cook CreateNewContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateNewContext -// createNewContextRequest writes a CreateNewContext request to a byte slice. -func createNewContextRequest(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Screen uint32, RenderType uint32, ShareList Context, IsDirect bool) []byte { +// createNewContextRequest writes a CreateNewContext request to a byte slice for transfer. +func createNewContextRequest(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Screen, RenderType uint32, ShareList Context, IsDirect bool) []byte { size := 28 b := 0 buf := make([]byte, size) @@ -1687,7 +1679,7 @@ func CreatePbuffer(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Pbuffer Pbuffe } // CreatePbufferChecked sends a checked request. -// If an error occurs, it can be retrieved using CreatePbufferCookie.Check() +// If an error occurs, it can be retrieved using CreatePbufferCookie.Check. func CreatePbufferChecked(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Pbuffer Pbuffer, NumAttribs uint32, Attribs []uint32) CreatePbufferCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1705,8 +1697,7 @@ func (cook CreatePbufferCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreatePbuffer -// createPbufferRequest writes a CreatePbuffer request to a byte slice. +// createPbufferRequest writes a CreatePbuffer request to a byte slice for transfer. func createPbufferRequest(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Pbuffer Pbuffer, NumAttribs uint32, Attribs []uint32) []byte { size := xgb.Pad((20 + xgb.Pad(((int(NumAttribs) * 2) * 4)))) b := 0 @@ -1762,7 +1753,7 @@ func CreatePixmap(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Pixmap xproto.P } // CreatePixmapChecked sends a checked request. -// If an error occurs, it can be retrieved using CreatePixmapCookie.Check() +// If an error occurs, it can be retrieved using CreatePixmapCookie.Check. func CreatePixmapChecked(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Pixmap xproto.Pixmap, GlxPixmap Pixmap, NumAttribs uint32, Attribs []uint32) CreatePixmapCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1780,8 +1771,7 @@ func (cook CreatePixmapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreatePixmap -// createPixmapRequest writes a CreatePixmap request to a byte slice. +// createPixmapRequest writes a CreatePixmap request to a byte slice for transfer. func createPixmapRequest(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Pixmap xproto.Pixmap, GlxPixmap Pixmap, NumAttribs uint32, Attribs []uint32) []byte { size := xgb.Pad((24 + xgb.Pad(((int(NumAttribs) * 2) * 4)))) b := 0 @@ -1840,7 +1830,7 @@ func CreateWindow(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Window xproto.W } // CreateWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateWindowCookie.Check() +// If an error occurs, it can be retrieved using CreateWindowCookie.Check. func CreateWindowChecked(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Window xproto.Window, GlxWindow Window, NumAttribs uint32, Attribs []uint32) CreateWindowCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1858,8 +1848,7 @@ func (cook CreateWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateWindow -// createWindowRequest writes a CreateWindow request to a byte slice. +// createWindowRequest writes a CreateWindow request to a byte slice for transfer. func createWindowRequest(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Window xproto.Window, GlxWindow Window, NumAttribs uint32, Attribs []uint32) []byte { size := xgb.Pad((24 + xgb.Pad(((int(NumAttribs) * 2) * 4)))) b := 0 @@ -1918,7 +1907,7 @@ func DeleteLists(c *xgb.Conn, ContextTag ContextTag, List uint32, Range int32) D } // DeleteListsChecked sends a checked request. -// If an error occurs, it can be retrieved using DeleteListsCookie.Check() +// If an error occurs, it can be retrieved using DeleteListsCookie.Check. func DeleteListsChecked(c *xgb.Conn, ContextTag ContextTag, List uint32, Range int32) DeleteListsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1936,8 +1925,7 @@ func (cook DeleteListsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeleteLists -// deleteListsRequest writes a DeleteLists request to a byte slice. +// deleteListsRequest writes a DeleteLists request to a byte slice for transfer. func deleteListsRequest(c *xgb.Conn, ContextTag ContextTag, List uint32, Range int32) []byte { size := 16 b := 0 @@ -1985,7 +1973,7 @@ func DeleteQueriesARB(c *xgb.Conn, ContextTag ContextTag, N int32, Ids []uint32) } // DeleteQueriesARBChecked sends a checked request. -// If an error occurs, it can be retrieved using DeleteQueriesARBCookie.Check() +// If an error occurs, it can be retrieved using DeleteQueriesARBCookie.Check. func DeleteQueriesARBChecked(c *xgb.Conn, ContextTag ContextTag, N int32, Ids []uint32) DeleteQueriesARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2003,8 +1991,7 @@ func (cook DeleteQueriesARBCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeleteQueriesARB -// deleteQueriesARBRequest writes a DeleteQueriesARB request to a byte slice. +// deleteQueriesARBRequest writes a DeleteQueriesARB request to a byte slice for transfer. func deleteQueriesARBRequest(c *xgb.Conn, ContextTag ContextTag, N int32, Ids []uint32) []byte { size := xgb.Pad((12 + xgb.Pad((int(N) * 4)))) b := 0 @@ -2054,7 +2041,7 @@ func DeleteTextures(c *xgb.Conn, ContextTag ContextTag, N int32, Textures []uint } // DeleteTexturesChecked sends a checked request. -// If an error occurs, it can be retrieved using DeleteTexturesCookie.Check() +// If an error occurs, it can be retrieved using DeleteTexturesCookie.Check. func DeleteTexturesChecked(c *xgb.Conn, ContextTag ContextTag, N int32, Textures []uint32) DeleteTexturesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2072,8 +2059,7 @@ func (cook DeleteTexturesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeleteTextures -// deleteTexturesRequest writes a DeleteTextures request to a byte slice. +// deleteTexturesRequest writes a DeleteTextures request to a byte slice for transfer. func deleteTexturesRequest(c *xgb.Conn, ContextTag ContextTag, N int32, Textures []uint32) []byte { size := xgb.Pad((12 + xgb.Pad((int(N) * 4)))) b := 0 @@ -2123,7 +2109,7 @@ func DeleteWindow(c *xgb.Conn, Glxwindow Window) DeleteWindowCookie { } // DeleteWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using DeleteWindowCookie.Check() +// If an error occurs, it can be retrieved using DeleteWindowCookie.Check. func DeleteWindowChecked(c *xgb.Conn, Glxwindow Window) DeleteWindowCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2141,8 +2127,7 @@ func (cook DeleteWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeleteWindow -// deleteWindowRequest writes a DeleteWindow request to a byte slice. +// deleteWindowRequest writes a DeleteWindow request to a byte slice for transfer. func deleteWindowRequest(c *xgb.Conn, Glxwindow Window) []byte { size := 8 b := 0 @@ -2184,7 +2169,7 @@ func DestroyContext(c *xgb.Conn, Context Context) DestroyContextCookie { } // DestroyContextChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyContextCookie.Check() +// If an error occurs, it can be retrieved using DestroyContextCookie.Check. func DestroyContextChecked(c *xgb.Conn, Context Context) DestroyContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2202,8 +2187,7 @@ func (cook DestroyContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyContext -// destroyContextRequest writes a DestroyContext request to a byte slice. +// destroyContextRequest writes a DestroyContext request to a byte slice for transfer. func destroyContextRequest(c *xgb.Conn, Context Context) []byte { size := 8 b := 0 @@ -2245,7 +2229,7 @@ func DestroyGLXPixmap(c *xgb.Conn, GlxPixmap Pixmap) DestroyGLXPixmapCookie { } // DestroyGLXPixmapChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyGLXPixmapCookie.Check() +// If an error occurs, it can be retrieved using DestroyGLXPixmapCookie.Check. func DestroyGLXPixmapChecked(c *xgb.Conn, GlxPixmap Pixmap) DestroyGLXPixmapCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2263,8 +2247,7 @@ func (cook DestroyGLXPixmapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyGLXPixmap -// destroyGLXPixmapRequest writes a DestroyGLXPixmap request to a byte slice. +// destroyGLXPixmapRequest writes a DestroyGLXPixmap request to a byte slice for transfer. func destroyGLXPixmapRequest(c *xgb.Conn, GlxPixmap Pixmap) []byte { size := 8 b := 0 @@ -2306,7 +2289,7 @@ func DestroyPbuffer(c *xgb.Conn, Pbuffer Pbuffer) DestroyPbufferCookie { } // DestroyPbufferChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyPbufferCookie.Check() +// If an error occurs, it can be retrieved using DestroyPbufferCookie.Check. func DestroyPbufferChecked(c *xgb.Conn, Pbuffer Pbuffer) DestroyPbufferCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2324,8 +2307,7 @@ func (cook DestroyPbufferCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyPbuffer -// destroyPbufferRequest writes a DestroyPbuffer request to a byte slice. +// destroyPbufferRequest writes a DestroyPbuffer request to a byte slice for transfer. func destroyPbufferRequest(c *xgb.Conn, Pbuffer Pbuffer) []byte { size := 8 b := 0 @@ -2367,7 +2349,7 @@ func DestroyPixmap(c *xgb.Conn, GlxPixmap Pixmap) DestroyPixmapCookie { } // DestroyPixmapChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyPixmapCookie.Check() +// If an error occurs, it can be retrieved using DestroyPixmapCookie.Check. func DestroyPixmapChecked(c *xgb.Conn, GlxPixmap Pixmap) DestroyPixmapCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2385,8 +2367,7 @@ func (cook DestroyPixmapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyPixmap -// destroyPixmapRequest writes a DestroyPixmap request to a byte slice. +// destroyPixmapRequest writes a DestroyPixmap request to a byte slice for transfer. func destroyPixmapRequest(c *xgb.Conn, GlxPixmap Pixmap) []byte { size := 8 b := 0 @@ -2428,7 +2409,7 @@ func EndList(c *xgb.Conn, ContextTag ContextTag) EndListCookie { } // EndListChecked sends a checked request. -// If an error occurs, it can be retrieved using EndListCookie.Check() +// If an error occurs, it can be retrieved using EndListCookie.Check. func EndListChecked(c *xgb.Conn, ContextTag ContextTag) EndListCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2446,8 +2427,7 @@ func (cook EndListCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for EndList -// endListRequest writes a EndList request to a byte slice. +// endListRequest writes a EndList request to a byte slice for transfer. func endListRequest(c *xgb.Conn, ContextTag ContextTag) []byte { size := 8 b := 0 @@ -2477,7 +2457,7 @@ type FeedbackBufferCookie struct { // FeedbackBuffer sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func FeedbackBuffer(c *xgb.Conn, ContextTag ContextTag, Size int32, Type int32) FeedbackBufferCookie { +func FeedbackBuffer(c *xgb.Conn, ContextTag ContextTag, Size, Type int32) FeedbackBufferCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -2489,8 +2469,8 @@ func FeedbackBuffer(c *xgb.Conn, ContextTag ContextTag, Size int32, Type int32) } // FeedbackBufferChecked sends a checked request. -// If an error occurs, it can be retrieved using FeedbackBufferCookie.Check() -func FeedbackBufferChecked(c *xgb.Conn, ContextTag ContextTag, Size int32, Type int32) FeedbackBufferCookie { +// If an error occurs, it can be retrieved using FeedbackBufferCookie.Check. +func FeedbackBufferChecked(c *xgb.Conn, ContextTag ContextTag, Size, Type int32) FeedbackBufferCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -2507,9 +2487,8 @@ func (cook FeedbackBufferCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FeedbackBuffer -// feedbackBufferRequest writes a FeedbackBuffer request to a byte slice. -func feedbackBufferRequest(c *xgb.Conn, ContextTag ContextTag, Size int32, Type int32) []byte { +// feedbackBufferRequest writes a FeedbackBuffer request to a byte slice for transfer. +func feedbackBufferRequest(c *xgb.Conn, ContextTag ContextTag, Size, Type int32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -2543,7 +2522,7 @@ type FinishCookie struct { } // Finish sends a checked request. -// If an error occurs, it will be returned with the reply by calling FinishCookie.Reply() +// If an error occurs, it will be returned with the reply by calling FinishCookie.Reply. func Finish(c *xgb.Conn, ContextTag ContextTag) FinishCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2603,8 +2582,7 @@ func finishReply(buf []byte) *FinishReply { return v } -// Write request to wire for Finish -// finishRequest writes a Finish request to a byte slice. +// finishRequest writes a Finish request to a byte slice for transfer. func finishRequest(c *xgb.Conn, ContextTag ContextTag) []byte { size := 8 b := 0 @@ -2646,7 +2624,7 @@ func Flush(c *xgb.Conn, ContextTag ContextTag) FlushCookie { } // FlushChecked sends a checked request. -// If an error occurs, it can be retrieved using FlushCookie.Check() +// If an error occurs, it can be retrieved using FlushCookie.Check. func FlushChecked(c *xgb.Conn, ContextTag ContextTag) FlushCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2664,8 +2642,7 @@ func (cook FlushCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Flush -// flushRequest writes a Flush request to a byte slice. +// flushRequest writes a Flush request to a byte slice for transfer. func flushRequest(c *xgb.Conn, ContextTag ContextTag) []byte { size := 8 b := 0 @@ -2694,7 +2671,7 @@ type GenListsCookie struct { } // GenLists sends a checked request. -// If an error occurs, it will be returned with the reply by calling GenListsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GenListsCookie.Reply. func GenLists(c *xgb.Conn, ContextTag ContextTag, Range int32) GenListsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2758,8 +2735,7 @@ func genListsReply(buf []byte) *GenListsReply { return v } -// Write request to wire for GenLists -// genListsRequest writes a GenLists request to a byte slice. +// genListsRequest writes a GenLists request to a byte slice for transfer. func genListsRequest(c *xgb.Conn, ContextTag ContextTag, Range int32) []byte { size := 12 b := 0 @@ -2791,7 +2767,7 @@ type GenQueriesARBCookie struct { } // GenQueriesARB sends a checked request. -// If an error occurs, it will be returned with the reply by calling GenQueriesARBCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GenQueriesARBCookie.Reply. func GenQueriesARB(c *xgb.Conn, ContextTag ContextTag, N int32) GenQueriesARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2861,8 +2837,7 @@ func genQueriesARBReply(buf []byte) *GenQueriesARBReply { return v } -// Write request to wire for GenQueriesARB -// genQueriesARBRequest writes a GenQueriesARB request to a byte slice. +// genQueriesARBRequest writes a GenQueriesARB request to a byte slice for transfer. func genQueriesARBRequest(c *xgb.Conn, ContextTag ContextTag, N int32) []byte { size := 12 b := 0 @@ -2894,7 +2869,7 @@ type GenTexturesCookie struct { } // GenTextures sends a checked request. -// If an error occurs, it will be returned with the reply by calling GenTexturesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GenTexturesCookie.Reply. func GenTextures(c *xgb.Conn, ContextTag ContextTag, N int32) GenTexturesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2964,8 +2939,7 @@ func genTexturesReply(buf []byte) *GenTexturesReply { return v } -// Write request to wire for GenTextures -// genTexturesRequest writes a GenTextures request to a byte slice. +// genTexturesRequest writes a GenTextures request to a byte slice for transfer. func genTexturesRequest(c *xgb.Conn, ContextTag ContextTag, N int32) []byte { size := 12 b := 0 @@ -2997,7 +2971,7 @@ type GetBooleanvCookie struct { } // GetBooleanv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetBooleanvCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetBooleanvCookie.Reply. func GetBooleanv(c *xgb.Conn, ContextTag ContextTag, Pname int32) GetBooleanvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3086,8 +3060,7 @@ func getBooleanvReply(buf []byte) *GetBooleanvReply { return v } -// Write request to wire for GetBooleanv -// getBooleanvRequest writes a GetBooleanv request to a byte slice. +// getBooleanvRequest writes a GetBooleanv request to a byte slice for transfer. func getBooleanvRequest(c *xgb.Conn, ContextTag ContextTag, Pname int32) []byte { size := 12 b := 0 @@ -3119,7 +3092,7 @@ type GetClipPlaneCookie struct { } // GetClipPlane sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetClipPlaneCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetClipPlaneCookie.Reply. func GetClipPlane(c *xgb.Conn, ContextTag ContextTag, Plane int32) GetClipPlaneCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3189,8 +3162,7 @@ func getClipPlaneReply(buf []byte) *GetClipPlaneReply { return v } -// Write request to wire for GetClipPlane -// getClipPlaneRequest writes a GetClipPlane request to a byte slice. +// getClipPlaneRequest writes a GetClipPlane request to a byte slice for transfer. func getClipPlaneRequest(c *xgb.Conn, ContextTag ContextTag, Plane int32) []byte { size := 12 b := 0 @@ -3222,8 +3194,8 @@ type GetColorTableCookie struct { } // GetColorTable sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetColorTableCookie.Reply() -func GetColorTable(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool) GetColorTableCookie { +// If an error occurs, it will be returned with the reply by calling GetColorTableCookie.Reply. +func GetColorTable(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes bool) GetColorTableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3236,7 +3208,7 @@ func GetColorTable(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uin // GetColorTableUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetColorTableUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool) GetColorTableCookie { +func GetColorTableUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes bool) GetColorTableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3297,9 +3269,8 @@ func getColorTableReply(buf []byte) *GetColorTableReply { return v } -// Write request to wire for GetColorTable -// getColorTableRequest writes a GetColorTable request to a byte slice. -func getColorTableRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool) []byte { +// getColorTableRequest writes a GetColorTable request to a byte slice for transfer. +func getColorTableRequest(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes bool) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -3343,8 +3314,8 @@ type GetColorTableParameterfvCookie struct { } // GetColorTableParameterfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetColorTableParameterfvCookie.Reply() -func GetColorTableParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetColorTableParameterfvCookie { +// If an error occurs, it will be returned with the reply by calling GetColorTableParameterfvCookie.Reply. +func GetColorTableParameterfv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetColorTableParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3357,7 +3328,7 @@ func GetColorTableParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, // GetColorTableParameterfvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetColorTableParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetColorTableParameterfvCookie { +func GetColorTableParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetColorTableParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3424,9 +3395,8 @@ func getColorTableParameterfvReply(buf []byte) *GetColorTableParameterfvReply { return v } -// Write request to wire for GetColorTableParameterfv -// getColorTableParameterfvRequest writes a GetColorTableParameterfv request to a byte slice. -func getColorTableParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getColorTableParameterfvRequest writes a GetColorTableParameterfv request to a byte slice for transfer. +func getColorTableParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -3460,8 +3430,8 @@ type GetColorTableParameterivCookie struct { } // GetColorTableParameteriv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetColorTableParameterivCookie.Reply() -func GetColorTableParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetColorTableParameterivCookie { +// If an error occurs, it will be returned with the reply by calling GetColorTableParameterivCookie.Reply. +func GetColorTableParameteriv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetColorTableParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3474,7 +3444,7 @@ func GetColorTableParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32, // GetColorTableParameterivUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetColorTableParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetColorTableParameterivCookie { +func GetColorTableParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetColorTableParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3541,9 +3511,8 @@ func getColorTableParameterivReply(buf []byte) *GetColorTableParameterivReply { return v } -// Write request to wire for GetColorTableParameteriv -// getColorTableParameterivRequest writes a GetColorTableParameteriv request to a byte slice. -func getColorTableParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getColorTableParameterivRequest writes a GetColorTableParameteriv request to a byte slice for transfer. +func getColorTableParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -3577,7 +3546,7 @@ type GetCompressedTexImageARBCookie struct { } // GetCompressedTexImageARB sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetCompressedTexImageARBCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetCompressedTexImageARBCookie.Reply. func GetCompressedTexImageARB(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32) GetCompressedTexImageARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3652,8 +3621,7 @@ func getCompressedTexImageARBReply(buf []byte) *GetCompressedTexImageARBReply { return v } -// Write request to wire for GetCompressedTexImageARB -// getCompressedTexImageARBRequest writes a GetCompressedTexImageARB request to a byte slice. +// getCompressedTexImageARBRequest writes a GetCompressedTexImageARB request to a byte slice for transfer. func getCompressedTexImageARBRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32) []byte { size := 16 b := 0 @@ -3688,8 +3656,8 @@ type GetConvolutionFilterCookie struct { } // GetConvolutionFilter sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetConvolutionFilterCookie.Reply() -func GetConvolutionFilter(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool) GetConvolutionFilterCookie { +// If an error occurs, it will be returned with the reply by calling GetConvolutionFilterCookie.Reply. +func GetConvolutionFilter(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes bool) GetConvolutionFilterCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3702,7 +3670,7 @@ func GetConvolutionFilter(c *xgb.Conn, ContextTag ContextTag, Target uint32, For // GetConvolutionFilterUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetConvolutionFilterUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool) GetConvolutionFilterCookie { +func GetConvolutionFilterUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes bool) GetConvolutionFilterCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3767,9 +3735,8 @@ func getConvolutionFilterReply(buf []byte) *GetConvolutionFilterReply { return v } -// Write request to wire for GetConvolutionFilter -// getConvolutionFilterRequest writes a GetConvolutionFilter request to a byte slice. -func getConvolutionFilterRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool) []byte { +// getConvolutionFilterRequest writes a GetConvolutionFilter request to a byte slice for transfer. +func getConvolutionFilterRequest(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes bool) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -3813,8 +3780,8 @@ type GetConvolutionParameterfvCookie struct { } // GetConvolutionParameterfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetConvolutionParameterfvCookie.Reply() -func GetConvolutionParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetConvolutionParameterfvCookie { +// If an error occurs, it will be returned with the reply by calling GetConvolutionParameterfvCookie.Reply. +func GetConvolutionParameterfv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetConvolutionParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3827,7 +3794,7 @@ func GetConvolutionParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32 // GetConvolutionParameterfvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetConvolutionParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetConvolutionParameterfvCookie { +func GetConvolutionParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetConvolutionParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3894,9 +3861,8 @@ func getConvolutionParameterfvReply(buf []byte) *GetConvolutionParameterfvReply return v } -// Write request to wire for GetConvolutionParameterfv -// getConvolutionParameterfvRequest writes a GetConvolutionParameterfv request to a byte slice. -func getConvolutionParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getConvolutionParameterfvRequest writes a GetConvolutionParameterfv request to a byte slice for transfer. +func getConvolutionParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -3930,8 +3896,8 @@ type GetConvolutionParameterivCookie struct { } // GetConvolutionParameteriv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetConvolutionParameterivCookie.Reply() -func GetConvolutionParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetConvolutionParameterivCookie { +// If an error occurs, it will be returned with the reply by calling GetConvolutionParameterivCookie.Reply. +func GetConvolutionParameteriv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetConvolutionParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -3944,7 +3910,7 @@ func GetConvolutionParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32 // GetConvolutionParameterivUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetConvolutionParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetConvolutionParameterivCookie { +func GetConvolutionParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetConvolutionParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -4011,9 +3977,8 @@ func getConvolutionParameterivReply(buf []byte) *GetConvolutionParameterivReply return v } -// Write request to wire for GetConvolutionParameteriv -// getConvolutionParameterivRequest writes a GetConvolutionParameteriv request to a byte slice. -func getConvolutionParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getConvolutionParameterivRequest writes a GetConvolutionParameteriv request to a byte slice for transfer. +func getConvolutionParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -4047,7 +4012,7 @@ type GetDoublevCookie struct { } // GetDoublev sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetDoublevCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetDoublevCookie.Reply. func GetDoublev(c *xgb.Conn, ContextTag ContextTag, Pname uint32) GetDoublevCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4128,8 +4093,7 @@ func getDoublevReply(buf []byte) *GetDoublevReply { return v } -// Write request to wire for GetDoublev -// getDoublevRequest writes a GetDoublev request to a byte slice. +// getDoublevRequest writes a GetDoublev request to a byte slice for transfer. func getDoublevRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32) []byte { size := 12 b := 0 @@ -4161,7 +4125,7 @@ type GetDrawableAttributesCookie struct { } // GetDrawableAttributes sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetDrawableAttributesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetDrawableAttributesCookie.Reply. func GetDrawableAttributes(c *xgb.Conn, Drawable Drawable) GetDrawableAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4235,8 +4199,7 @@ func getDrawableAttributesReply(buf []byte) *GetDrawableAttributesReply { return v } -// Write request to wire for GetDrawableAttributes -// getDrawableAttributesRequest writes a GetDrawableAttributes request to a byte slice. +// getDrawableAttributesRequest writes a GetDrawableAttributes request to a byte slice for transfer. func getDrawableAttributesRequest(c *xgb.Conn, Drawable Drawable) []byte { size := 8 b := 0 @@ -4265,7 +4228,7 @@ type GetErrorCookie struct { } // GetError sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetErrorCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetErrorCookie.Reply. func GetError(c *xgb.Conn, ContextTag ContextTag) GetErrorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4329,8 +4292,7 @@ func getErrorReply(buf []byte) *GetErrorReply { return v } -// Write request to wire for GetError -// getErrorRequest writes a GetError request to a byte slice. +// getErrorRequest writes a GetError request to a byte slice for transfer. func getErrorRequest(c *xgb.Conn, ContextTag ContextTag) []byte { size := 8 b := 0 @@ -4359,7 +4321,7 @@ type GetFBConfigsCookie struct { } // GetFBConfigs sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetFBConfigsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetFBConfigsCookie.Reply. func GetFBConfigs(c *xgb.Conn, Screen uint32) GetFBConfigsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4437,8 +4399,7 @@ func getFBConfigsReply(buf []byte) *GetFBConfigsReply { return v } -// Write request to wire for GetFBConfigs -// getFBConfigsRequest writes a GetFBConfigs request to a byte slice. +// getFBConfigsRequest writes a GetFBConfigs request to a byte slice for transfer. func getFBConfigsRequest(c *xgb.Conn, Screen uint32) []byte { size := 8 b := 0 @@ -4467,7 +4428,7 @@ type GetFloatvCookie struct { } // GetFloatv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetFloatvCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetFloatvCookie.Reply. func GetFloatv(c *xgb.Conn, ContextTag ContextTag, Pname uint32) GetFloatvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4548,8 +4509,7 @@ func getFloatvReply(buf []byte) *GetFloatvReply { return v } -// Write request to wire for GetFloatv -// getFloatvRequest writes a GetFloatv request to a byte slice. +// getFloatvRequest writes a GetFloatv request to a byte slice for transfer. func getFloatvRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32) []byte { size := 12 b := 0 @@ -4581,8 +4541,8 @@ type GetHistogramCookie struct { } // GetHistogram sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetHistogramCookie.Reply() -func GetHistogram(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool, Reset bool) GetHistogramCookie { +// If an error occurs, it will be returned with the reply by calling GetHistogramCookie.Reply. +func GetHistogram(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes, Reset bool) GetHistogramCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -4595,7 +4555,7 @@ func GetHistogram(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint // GetHistogramUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetHistogramUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool, Reset bool) GetHistogramCookie { +func GetHistogramUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes, Reset bool) GetHistogramCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -4656,9 +4616,8 @@ func getHistogramReply(buf []byte) *GetHistogramReply { return v } -// Write request to wire for GetHistogram -// getHistogramRequest writes a GetHistogram request to a byte slice. -func getHistogramRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool, Reset bool) []byte { +// getHistogramRequest writes a GetHistogram request to a byte slice for transfer. +func getHistogramRequest(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes, Reset bool) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -4709,8 +4668,8 @@ type GetHistogramParameterfvCookie struct { } // GetHistogramParameterfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetHistogramParameterfvCookie.Reply() -func GetHistogramParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetHistogramParameterfvCookie { +// If an error occurs, it will be returned with the reply by calling GetHistogramParameterfvCookie.Reply. +func GetHistogramParameterfv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetHistogramParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -4723,7 +4682,7 @@ func GetHistogramParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, // GetHistogramParameterfvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetHistogramParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetHistogramParameterfvCookie { +func GetHistogramParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetHistogramParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -4790,9 +4749,8 @@ func getHistogramParameterfvReply(buf []byte) *GetHistogramParameterfvReply { return v } -// Write request to wire for GetHistogramParameterfv -// getHistogramParameterfvRequest writes a GetHistogramParameterfv request to a byte slice. -func getHistogramParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getHistogramParameterfvRequest writes a GetHistogramParameterfv request to a byte slice for transfer. +func getHistogramParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -4826,8 +4784,8 @@ type GetHistogramParameterivCookie struct { } // GetHistogramParameteriv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetHistogramParameterivCookie.Reply() -func GetHistogramParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetHistogramParameterivCookie { +// If an error occurs, it will be returned with the reply by calling GetHistogramParameterivCookie.Reply. +func GetHistogramParameteriv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetHistogramParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -4840,7 +4798,7 @@ func GetHistogramParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32, // GetHistogramParameterivUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetHistogramParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetHistogramParameterivCookie { +func GetHistogramParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetHistogramParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -4907,9 +4865,8 @@ func getHistogramParameterivReply(buf []byte) *GetHistogramParameterivReply { return v } -// Write request to wire for GetHistogramParameteriv -// getHistogramParameterivRequest writes a GetHistogramParameteriv request to a byte slice. -func getHistogramParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getHistogramParameterivRequest writes a GetHistogramParameteriv request to a byte slice for transfer. +func getHistogramParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -4943,7 +4900,7 @@ type GetIntegervCookie struct { } // GetIntegerv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetIntegervCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetIntegervCookie.Reply. func GetIntegerv(c *xgb.Conn, ContextTag ContextTag, Pname uint32) GetIntegervCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -5024,8 +4981,7 @@ func getIntegervReply(buf []byte) *GetIntegervReply { return v } -// Write request to wire for GetIntegerv -// getIntegervRequest writes a GetIntegerv request to a byte slice. +// getIntegervRequest writes a GetIntegerv request to a byte slice for transfer. func getIntegervRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32) []byte { size := 12 b := 0 @@ -5057,8 +5013,8 @@ type GetLightfvCookie struct { } // GetLightfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetLightfvCookie.Reply() -func GetLightfv(c *xgb.Conn, ContextTag ContextTag, Light uint32, Pname uint32) GetLightfvCookie { +// If an error occurs, it will be returned with the reply by calling GetLightfvCookie.Reply. +func GetLightfv(c *xgb.Conn, ContextTag ContextTag, Light, Pname uint32) GetLightfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5071,7 +5027,7 @@ func GetLightfv(c *xgb.Conn, ContextTag ContextTag, Light uint32, Pname uint32) // GetLightfvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetLightfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Light uint32, Pname uint32) GetLightfvCookie { +func GetLightfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Light, Pname uint32) GetLightfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5138,9 +5094,8 @@ func getLightfvReply(buf []byte) *GetLightfvReply { return v } -// Write request to wire for GetLightfv -// getLightfvRequest writes a GetLightfv request to a byte slice. -func getLightfvRequest(c *xgb.Conn, ContextTag ContextTag, Light uint32, Pname uint32) []byte { +// getLightfvRequest writes a GetLightfv request to a byte slice for transfer. +func getLightfvRequest(c *xgb.Conn, ContextTag ContextTag, Light, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -5174,8 +5129,8 @@ type GetLightivCookie struct { } // GetLightiv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetLightivCookie.Reply() -func GetLightiv(c *xgb.Conn, ContextTag ContextTag, Light uint32, Pname uint32) GetLightivCookie { +// If an error occurs, it will be returned with the reply by calling GetLightivCookie.Reply. +func GetLightiv(c *xgb.Conn, ContextTag ContextTag, Light, Pname uint32) GetLightivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5188,7 +5143,7 @@ func GetLightiv(c *xgb.Conn, ContextTag ContextTag, Light uint32, Pname uint32) // GetLightivUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetLightivUnchecked(c *xgb.Conn, ContextTag ContextTag, Light uint32, Pname uint32) GetLightivCookie { +func GetLightivUnchecked(c *xgb.Conn, ContextTag ContextTag, Light, Pname uint32) GetLightivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5255,9 +5210,8 @@ func getLightivReply(buf []byte) *GetLightivReply { return v } -// Write request to wire for GetLightiv -// getLightivRequest writes a GetLightiv request to a byte slice. -func getLightivRequest(c *xgb.Conn, ContextTag ContextTag, Light uint32, Pname uint32) []byte { +// getLightivRequest writes a GetLightiv request to a byte slice for transfer. +func getLightivRequest(c *xgb.Conn, ContextTag ContextTag, Light, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -5291,8 +5245,8 @@ type GetMapdvCookie struct { } // GetMapdv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMapdvCookie.Reply() -func GetMapdv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) GetMapdvCookie { +// If an error occurs, it will be returned with the reply by calling GetMapdvCookie.Reply. +func GetMapdv(c *xgb.Conn, ContextTag ContextTag, Target, Query uint32) GetMapdvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5305,7 +5259,7 @@ func GetMapdv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) G // GetMapdvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetMapdvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) GetMapdvCookie { +func GetMapdvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Query uint32) GetMapdvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5372,9 +5326,8 @@ func getMapdvReply(buf []byte) *GetMapdvReply { return v } -// Write request to wire for GetMapdv -// getMapdvRequest writes a GetMapdv request to a byte slice. -func getMapdvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) []byte { +// getMapdvRequest writes a GetMapdv request to a byte slice for transfer. +func getMapdvRequest(c *xgb.Conn, ContextTag ContextTag, Target, Query uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -5408,8 +5361,8 @@ type GetMapfvCookie struct { } // GetMapfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMapfvCookie.Reply() -func GetMapfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) GetMapfvCookie { +// If an error occurs, it will be returned with the reply by calling GetMapfvCookie.Reply. +func GetMapfv(c *xgb.Conn, ContextTag ContextTag, Target, Query uint32) GetMapfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5422,7 +5375,7 @@ func GetMapfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) G // GetMapfvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetMapfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) GetMapfvCookie { +func GetMapfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Query uint32) GetMapfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5489,9 +5442,8 @@ func getMapfvReply(buf []byte) *GetMapfvReply { return v } -// Write request to wire for GetMapfv -// getMapfvRequest writes a GetMapfv request to a byte slice. -func getMapfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) []byte { +// getMapfvRequest writes a GetMapfv request to a byte slice for transfer. +func getMapfvRequest(c *xgb.Conn, ContextTag ContextTag, Target, Query uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -5525,8 +5477,8 @@ type GetMapivCookie struct { } // GetMapiv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMapivCookie.Reply() -func GetMapiv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) GetMapivCookie { +// If an error occurs, it will be returned with the reply by calling GetMapivCookie.Reply. +func GetMapiv(c *xgb.Conn, ContextTag ContextTag, Target, Query uint32) GetMapivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5539,7 +5491,7 @@ func GetMapiv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) G // GetMapivUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetMapivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) GetMapivCookie { +func GetMapivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Query uint32) GetMapivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5606,9 +5558,8 @@ func getMapivReply(buf []byte) *GetMapivReply { return v } -// Write request to wire for GetMapiv -// getMapivRequest writes a GetMapiv request to a byte slice. -func getMapivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query uint32) []byte { +// getMapivRequest writes a GetMapiv request to a byte slice for transfer. +func getMapivRequest(c *xgb.Conn, ContextTag ContextTag, Target, Query uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -5642,8 +5593,8 @@ type GetMaterialfvCookie struct { } // GetMaterialfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMaterialfvCookie.Reply() -func GetMaterialfv(c *xgb.Conn, ContextTag ContextTag, Face uint32, Pname uint32) GetMaterialfvCookie { +// If an error occurs, it will be returned with the reply by calling GetMaterialfvCookie.Reply. +func GetMaterialfv(c *xgb.Conn, ContextTag ContextTag, Face, Pname uint32) GetMaterialfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5656,7 +5607,7 @@ func GetMaterialfv(c *xgb.Conn, ContextTag ContextTag, Face uint32, Pname uint32 // GetMaterialfvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetMaterialfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Face uint32, Pname uint32) GetMaterialfvCookie { +func GetMaterialfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Face, Pname uint32) GetMaterialfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5723,9 +5674,8 @@ func getMaterialfvReply(buf []byte) *GetMaterialfvReply { return v } -// Write request to wire for GetMaterialfv -// getMaterialfvRequest writes a GetMaterialfv request to a byte slice. -func getMaterialfvRequest(c *xgb.Conn, ContextTag ContextTag, Face uint32, Pname uint32) []byte { +// getMaterialfvRequest writes a GetMaterialfv request to a byte slice for transfer. +func getMaterialfvRequest(c *xgb.Conn, ContextTag ContextTag, Face, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -5759,8 +5709,8 @@ type GetMaterialivCookie struct { } // GetMaterialiv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMaterialivCookie.Reply() -func GetMaterialiv(c *xgb.Conn, ContextTag ContextTag, Face uint32, Pname uint32) GetMaterialivCookie { +// If an error occurs, it will be returned with the reply by calling GetMaterialivCookie.Reply. +func GetMaterialiv(c *xgb.Conn, ContextTag ContextTag, Face, Pname uint32) GetMaterialivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5773,7 +5723,7 @@ func GetMaterialiv(c *xgb.Conn, ContextTag ContextTag, Face uint32, Pname uint32 // GetMaterialivUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetMaterialivUnchecked(c *xgb.Conn, ContextTag ContextTag, Face uint32, Pname uint32) GetMaterialivCookie { +func GetMaterialivUnchecked(c *xgb.Conn, ContextTag ContextTag, Face, Pname uint32) GetMaterialivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5840,9 +5790,8 @@ func getMaterialivReply(buf []byte) *GetMaterialivReply { return v } -// Write request to wire for GetMaterialiv -// getMaterialivRequest writes a GetMaterialiv request to a byte slice. -func getMaterialivRequest(c *xgb.Conn, ContextTag ContextTag, Face uint32, Pname uint32) []byte { +// getMaterialivRequest writes a GetMaterialiv request to a byte slice for transfer. +func getMaterialivRequest(c *xgb.Conn, ContextTag ContextTag, Face, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -5876,8 +5825,8 @@ type GetMinmaxCookie struct { } // GetMinmax sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMinmaxCookie.Reply() -func GetMinmax(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool, Reset bool) GetMinmaxCookie { +// If an error occurs, it will be returned with the reply by calling GetMinmaxCookie.Reply. +func GetMinmax(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes, Reset bool) GetMinmaxCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5890,7 +5839,7 @@ func GetMinmax(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, // GetMinmaxUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetMinmaxUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool, Reset bool) GetMinmaxCookie { +func GetMinmaxUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes, Reset bool) GetMinmaxCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -5944,9 +5893,8 @@ func getMinmaxReply(buf []byte) *GetMinmaxReply { return v } -// Write request to wire for GetMinmax -// getMinmaxRequest writes a GetMinmax request to a byte slice. -func getMinmaxRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool, Reset bool) []byte { +// getMinmaxRequest writes a GetMinmax request to a byte slice for transfer. +func getMinmaxRequest(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes, Reset bool) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -5997,8 +5945,8 @@ type GetMinmaxParameterfvCookie struct { } // GetMinmaxParameterfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMinmaxParameterfvCookie.Reply() -func GetMinmaxParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetMinmaxParameterfvCookie { +// If an error occurs, it will be returned with the reply by calling GetMinmaxParameterfvCookie.Reply. +func GetMinmaxParameterfv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetMinmaxParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -6011,7 +5959,7 @@ func GetMinmaxParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pna // GetMinmaxParameterfvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetMinmaxParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetMinmaxParameterfvCookie { +func GetMinmaxParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetMinmaxParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -6078,9 +6026,8 @@ func getMinmaxParameterfvReply(buf []byte) *GetMinmaxParameterfvReply { return v } -// Write request to wire for GetMinmaxParameterfv -// getMinmaxParameterfvRequest writes a GetMinmaxParameterfv request to a byte slice. -func getMinmaxParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getMinmaxParameterfvRequest writes a GetMinmaxParameterfv request to a byte slice for transfer. +func getMinmaxParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -6114,8 +6061,8 @@ type GetMinmaxParameterivCookie struct { } // GetMinmaxParameteriv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMinmaxParameterivCookie.Reply() -func GetMinmaxParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetMinmaxParameterivCookie { +// If an error occurs, it will be returned with the reply by calling GetMinmaxParameterivCookie.Reply. +func GetMinmaxParameteriv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetMinmaxParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -6128,7 +6075,7 @@ func GetMinmaxParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pna // GetMinmaxParameterivUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetMinmaxParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetMinmaxParameterivCookie { +func GetMinmaxParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetMinmaxParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -6195,9 +6142,8 @@ func getMinmaxParameterivReply(buf []byte) *GetMinmaxParameterivReply { return v } -// Write request to wire for GetMinmaxParameteriv -// getMinmaxParameterivRequest writes a GetMinmaxParameteriv request to a byte slice. -func getMinmaxParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getMinmaxParameterivRequest writes a GetMinmaxParameteriv request to a byte slice for transfer. +func getMinmaxParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -6231,7 +6177,7 @@ type GetPixelMapfvCookie struct { } // GetPixelMapfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPixelMapfvCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPixelMapfvCookie.Reply. func GetPixelMapfv(c *xgb.Conn, ContextTag ContextTag, Map uint32) GetPixelMapfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -6312,8 +6258,7 @@ func getPixelMapfvReply(buf []byte) *GetPixelMapfvReply { return v } -// Write request to wire for GetPixelMapfv -// getPixelMapfvRequest writes a GetPixelMapfv request to a byte slice. +// getPixelMapfvRequest writes a GetPixelMapfv request to a byte slice for transfer. func getPixelMapfvRequest(c *xgb.Conn, ContextTag ContextTag, Map uint32) []byte { size := 12 b := 0 @@ -6345,7 +6290,7 @@ type GetPixelMapuivCookie struct { } // GetPixelMapuiv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPixelMapuivCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPixelMapuivCookie.Reply. func GetPixelMapuiv(c *xgb.Conn, ContextTag ContextTag, Map uint32) GetPixelMapuivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -6426,8 +6371,7 @@ func getPixelMapuivReply(buf []byte) *GetPixelMapuivReply { return v } -// Write request to wire for GetPixelMapuiv -// getPixelMapuivRequest writes a GetPixelMapuiv request to a byte slice. +// getPixelMapuivRequest writes a GetPixelMapuiv request to a byte slice for transfer. func getPixelMapuivRequest(c *xgb.Conn, ContextTag ContextTag, Map uint32) []byte { size := 12 b := 0 @@ -6459,7 +6403,7 @@ type GetPixelMapusvCookie struct { } // GetPixelMapusv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPixelMapusvCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPixelMapusvCookie.Reply. func GetPixelMapusv(c *xgb.Conn, ContextTag ContextTag, Map uint32) GetPixelMapusvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -6540,8 +6484,7 @@ func getPixelMapusvReply(buf []byte) *GetPixelMapusvReply { return v } -// Write request to wire for GetPixelMapusv -// getPixelMapusvRequest writes a GetPixelMapusv request to a byte slice. +// getPixelMapusvRequest writes a GetPixelMapusv request to a byte slice for transfer. func getPixelMapusvRequest(c *xgb.Conn, ContextTag ContextTag, Map uint32) []byte { size := 12 b := 0 @@ -6573,7 +6516,7 @@ type GetPolygonStippleCookie struct { } // GetPolygonStipple sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPolygonStippleCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPolygonStippleCookie.Reply. func GetPolygonStipple(c *xgb.Conn, ContextTag ContextTag, LsbFirst bool) GetPolygonStippleCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -6641,8 +6584,7 @@ func getPolygonStippleReply(buf []byte) *GetPolygonStippleReply { return v } -// Write request to wire for GetPolygonStipple -// getPolygonStippleRequest writes a GetPolygonStipple request to a byte slice. +// getPolygonStippleRequest writes a GetPolygonStipple request to a byte slice for transfer. func getPolygonStippleRequest(c *xgb.Conn, ContextTag ContextTag, LsbFirst bool) []byte { size := 12 b := 0 @@ -6678,8 +6620,8 @@ type GetQueryObjectivARBCookie struct { } // GetQueryObjectivARB sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetQueryObjectivARBCookie.Reply() -func GetQueryObjectivARB(c *xgb.Conn, ContextTag ContextTag, Id uint32, Pname uint32) GetQueryObjectivARBCookie { +// If an error occurs, it will be returned with the reply by calling GetQueryObjectivARBCookie.Reply. +func GetQueryObjectivARB(c *xgb.Conn, ContextTag ContextTag, Id, Pname uint32) GetQueryObjectivARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -6692,7 +6634,7 @@ func GetQueryObjectivARB(c *xgb.Conn, ContextTag ContextTag, Id uint32, Pname ui // GetQueryObjectivARBUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetQueryObjectivARBUnchecked(c *xgb.Conn, ContextTag ContextTag, Id uint32, Pname uint32) GetQueryObjectivARBCookie { +func GetQueryObjectivARBUnchecked(c *xgb.Conn, ContextTag ContextTag, Id, Pname uint32) GetQueryObjectivARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -6759,9 +6701,8 @@ func getQueryObjectivARBReply(buf []byte) *GetQueryObjectivARBReply { return v } -// Write request to wire for GetQueryObjectivARB -// getQueryObjectivARBRequest writes a GetQueryObjectivARB request to a byte slice. -func getQueryObjectivARBRequest(c *xgb.Conn, ContextTag ContextTag, Id uint32, Pname uint32) []byte { +// getQueryObjectivARBRequest writes a GetQueryObjectivARB request to a byte slice for transfer. +func getQueryObjectivARBRequest(c *xgb.Conn, ContextTag ContextTag, Id, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -6795,8 +6736,8 @@ type GetQueryObjectuivARBCookie struct { } // GetQueryObjectuivARB sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetQueryObjectuivARBCookie.Reply() -func GetQueryObjectuivARB(c *xgb.Conn, ContextTag ContextTag, Id uint32, Pname uint32) GetQueryObjectuivARBCookie { +// If an error occurs, it will be returned with the reply by calling GetQueryObjectuivARBCookie.Reply. +func GetQueryObjectuivARB(c *xgb.Conn, ContextTag ContextTag, Id, Pname uint32) GetQueryObjectuivARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -6809,7 +6750,7 @@ func GetQueryObjectuivARB(c *xgb.Conn, ContextTag ContextTag, Id uint32, Pname u // GetQueryObjectuivARBUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetQueryObjectuivARBUnchecked(c *xgb.Conn, ContextTag ContextTag, Id uint32, Pname uint32) GetQueryObjectuivARBCookie { +func GetQueryObjectuivARBUnchecked(c *xgb.Conn, ContextTag ContextTag, Id, Pname uint32) GetQueryObjectuivARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -6876,9 +6817,8 @@ func getQueryObjectuivARBReply(buf []byte) *GetQueryObjectuivARBReply { return v } -// Write request to wire for GetQueryObjectuivARB -// getQueryObjectuivARBRequest writes a GetQueryObjectuivARB request to a byte slice. -func getQueryObjectuivARBRequest(c *xgb.Conn, ContextTag ContextTag, Id uint32, Pname uint32) []byte { +// getQueryObjectuivARBRequest writes a GetQueryObjectuivARB request to a byte slice for transfer. +func getQueryObjectuivARBRequest(c *xgb.Conn, ContextTag ContextTag, Id, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -6912,8 +6852,8 @@ type GetQueryivARBCookie struct { } // GetQueryivARB sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetQueryivARBCookie.Reply() -func GetQueryivARB(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetQueryivARBCookie { +// If an error occurs, it will be returned with the reply by calling GetQueryivARBCookie.Reply. +func GetQueryivARB(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetQueryivARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -6926,7 +6866,7 @@ func GetQueryivARB(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint // GetQueryivARBUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetQueryivARBUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetQueryivARBCookie { +func GetQueryivARBUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetQueryivARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -6993,9 +6933,8 @@ func getQueryivARBReply(buf []byte) *GetQueryivARBReply { return v } -// Write request to wire for GetQueryivARB -// getQueryivARBRequest writes a GetQueryivARB request to a byte slice. -func getQueryivARBRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getQueryivARBRequest writes a GetQueryivARB request to a byte slice for transfer. +func getQueryivARBRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -7029,8 +6968,8 @@ type GetSeparableFilterCookie struct { } // GetSeparableFilter sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetSeparableFilterCookie.Reply() -func GetSeparableFilter(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool) GetSeparableFilterCookie { +// If an error occurs, it will be returned with the reply by calling GetSeparableFilterCookie.Reply. +func GetSeparableFilter(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes bool) GetSeparableFilterCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7043,7 +6982,7 @@ func GetSeparableFilter(c *xgb.Conn, ContextTag ContextTag, Target uint32, Forma // GetSeparableFilterUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetSeparableFilterUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool) GetSeparableFilterCookie { +func GetSeparableFilterUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes bool) GetSeparableFilterCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7108,9 +7047,8 @@ func getSeparableFilterReply(buf []byte) *GetSeparableFilterReply { return v } -// Write request to wire for GetSeparableFilter -// getSeparableFilterRequest writes a GetSeparableFilter request to a byte slice. -func getSeparableFilterRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format uint32, Type uint32, SwapBytes bool) []byte { +// getSeparableFilterRequest writes a GetSeparableFilter request to a byte slice for transfer. +func getSeparableFilterRequest(c *xgb.Conn, ContextTag ContextTag, Target, Format, Type uint32, SwapBytes bool) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -7154,7 +7092,7 @@ type GetStringCookie struct { } // GetString sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetStringCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetStringCookie.Reply. func GetString(c *xgb.Conn, ContextTag ContextTag, Name uint32) GetStringCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -7232,8 +7170,7 @@ func getStringReply(buf []byte) *GetStringReply { return v } -// Write request to wire for GetString -// getStringRequest writes a GetString request to a byte slice. +// getStringRequest writes a GetString request to a byte slice for transfer. func getStringRequest(c *xgb.Conn, ContextTag ContextTag, Name uint32) []byte { size := 12 b := 0 @@ -7265,8 +7202,8 @@ type GetTexEnvfvCookie struct { } // GetTexEnvfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTexEnvfvCookie.Reply() -func GetTexEnvfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetTexEnvfvCookie { +// If an error occurs, it will be returned with the reply by calling GetTexEnvfvCookie.Reply. +func GetTexEnvfv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetTexEnvfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7279,7 +7216,7 @@ func GetTexEnvfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32 // GetTexEnvfvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetTexEnvfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetTexEnvfvCookie { +func GetTexEnvfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetTexEnvfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7346,9 +7283,8 @@ func getTexEnvfvReply(buf []byte) *GetTexEnvfvReply { return v } -// Write request to wire for GetTexEnvfv -// getTexEnvfvRequest writes a GetTexEnvfv request to a byte slice. -func getTexEnvfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getTexEnvfvRequest writes a GetTexEnvfv request to a byte slice for transfer. +func getTexEnvfvRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -7382,8 +7318,8 @@ type GetTexEnvivCookie struct { } // GetTexEnviv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTexEnvivCookie.Reply() -func GetTexEnviv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetTexEnvivCookie { +// If an error occurs, it will be returned with the reply by calling GetTexEnvivCookie.Reply. +func GetTexEnviv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetTexEnvivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7396,7 +7332,7 @@ func GetTexEnviv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32 // GetTexEnvivUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetTexEnvivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetTexEnvivCookie { +func GetTexEnvivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetTexEnvivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7463,9 +7399,8 @@ func getTexEnvivReply(buf []byte) *GetTexEnvivReply { return v } -// Write request to wire for GetTexEnviv -// getTexEnvivRequest writes a GetTexEnviv request to a byte slice. -func getTexEnvivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getTexEnvivRequest writes a GetTexEnviv request to a byte slice for transfer. +func getTexEnvivRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -7499,8 +7434,8 @@ type GetTexGendvCookie struct { } // GetTexGendv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTexGendvCookie.Reply() -func GetTexGendv(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) GetTexGendvCookie { +// If an error occurs, it will be returned with the reply by calling GetTexGendvCookie.Reply. +func GetTexGendv(c *xgb.Conn, ContextTag ContextTag, Coord, Pname uint32) GetTexGendvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7513,7 +7448,7 @@ func GetTexGendv(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) // GetTexGendvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetTexGendvUnchecked(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) GetTexGendvCookie { +func GetTexGendvUnchecked(c *xgb.Conn, ContextTag ContextTag, Coord, Pname uint32) GetTexGendvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7580,9 +7515,8 @@ func getTexGendvReply(buf []byte) *GetTexGendvReply { return v } -// Write request to wire for GetTexGendv -// getTexGendvRequest writes a GetTexGendv request to a byte slice. -func getTexGendvRequest(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) []byte { +// getTexGendvRequest writes a GetTexGendv request to a byte slice for transfer. +func getTexGendvRequest(c *xgb.Conn, ContextTag ContextTag, Coord, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -7616,8 +7550,8 @@ type GetTexGenfvCookie struct { } // GetTexGenfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTexGenfvCookie.Reply() -func GetTexGenfv(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) GetTexGenfvCookie { +// If an error occurs, it will be returned with the reply by calling GetTexGenfvCookie.Reply. +func GetTexGenfv(c *xgb.Conn, ContextTag ContextTag, Coord, Pname uint32) GetTexGenfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7630,7 +7564,7 @@ func GetTexGenfv(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) // GetTexGenfvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetTexGenfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) GetTexGenfvCookie { +func GetTexGenfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Coord, Pname uint32) GetTexGenfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7697,9 +7631,8 @@ func getTexGenfvReply(buf []byte) *GetTexGenfvReply { return v } -// Write request to wire for GetTexGenfv -// getTexGenfvRequest writes a GetTexGenfv request to a byte slice. -func getTexGenfvRequest(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) []byte { +// getTexGenfvRequest writes a GetTexGenfv request to a byte slice for transfer. +func getTexGenfvRequest(c *xgb.Conn, ContextTag ContextTag, Coord, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -7733,8 +7666,8 @@ type GetTexGenivCookie struct { } // GetTexGeniv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTexGenivCookie.Reply() -func GetTexGeniv(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) GetTexGenivCookie { +// If an error occurs, it will be returned with the reply by calling GetTexGenivCookie.Reply. +func GetTexGeniv(c *xgb.Conn, ContextTag ContextTag, Coord, Pname uint32) GetTexGenivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7747,7 +7680,7 @@ func GetTexGeniv(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) // GetTexGenivUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetTexGenivUnchecked(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) GetTexGenivCookie { +func GetTexGenivUnchecked(c *xgb.Conn, ContextTag ContextTag, Coord, Pname uint32) GetTexGenivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7814,9 +7747,8 @@ func getTexGenivReply(buf []byte) *GetTexGenivReply { return v } -// Write request to wire for GetTexGeniv -// getTexGenivRequest writes a GetTexGeniv request to a byte slice. -func getTexGenivRequest(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname uint32) []byte { +// getTexGenivRequest writes a GetTexGeniv request to a byte slice for transfer. +func getTexGenivRequest(c *xgb.Conn, ContextTag ContextTag, Coord, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -7850,8 +7782,8 @@ type GetTexImageCookie struct { } // GetTexImage sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTexImageCookie.Reply() -func GetTexImage(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Format uint32, Type uint32, SwapBytes bool) GetTexImageCookie { +// If an error occurs, it will be returned with the reply by calling GetTexImageCookie.Reply. +func GetTexImage(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Format, Type uint32, SwapBytes bool) GetTexImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7864,7 +7796,7 @@ func GetTexImage(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, // GetTexImageUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetTexImageUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Format uint32, Type uint32, SwapBytes bool) GetTexImageCookie { +func GetTexImageUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Format, Type uint32, SwapBytes bool) GetTexImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -7933,9 +7865,8 @@ func getTexImageReply(buf []byte) *GetTexImageReply { return v } -// Write request to wire for GetTexImage -// getTexImageRequest writes a GetTexImage request to a byte slice. -func getTexImageRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Format uint32, Type uint32, SwapBytes bool) []byte { +// getTexImageRequest writes a GetTexImage request to a byte slice for transfer. +func getTexImageRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Format, Type uint32, SwapBytes bool) []byte { size := 28 b := 0 buf := make([]byte, size) @@ -7982,7 +7913,7 @@ type GetTexLevelParameterfvCookie struct { } // GetTexLevelParameterfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTexLevelParameterfvCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetTexLevelParameterfvCookie.Reply. func GetTexLevelParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Pname uint32) GetTexLevelParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -8063,8 +7994,7 @@ func getTexLevelParameterfvReply(buf []byte) *GetTexLevelParameterfvReply { return v } -// Write request to wire for GetTexLevelParameterfv -// getTexLevelParameterfvRequest writes a GetTexLevelParameterfv request to a byte slice. +// getTexLevelParameterfvRequest writes a GetTexLevelParameterfv request to a byte slice for transfer. func getTexLevelParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Pname uint32) []byte { size := 20 b := 0 @@ -8102,7 +8032,7 @@ type GetTexLevelParameterivCookie struct { } // GetTexLevelParameteriv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTexLevelParameterivCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetTexLevelParameterivCookie.Reply. func GetTexLevelParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Pname uint32) GetTexLevelParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -8183,8 +8113,7 @@ func getTexLevelParameterivReply(buf []byte) *GetTexLevelParameterivReply { return v } -// Write request to wire for GetTexLevelParameteriv -// getTexLevelParameterivRequest writes a GetTexLevelParameteriv request to a byte slice. +// getTexLevelParameterivRequest writes a GetTexLevelParameteriv request to a byte slice for transfer. func getTexLevelParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Pname uint32) []byte { size := 20 b := 0 @@ -8222,8 +8151,8 @@ type GetTexParameterfvCookie struct { } // GetTexParameterfv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTexParameterfvCookie.Reply() -func GetTexParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetTexParameterfvCookie { +// If an error occurs, it will be returned with the reply by calling GetTexParameterfvCookie.Reply. +func GetTexParameterfv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetTexParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -8236,7 +8165,7 @@ func GetTexParameterfv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname // GetTexParameterfvUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetTexParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetTexParameterfvCookie { +func GetTexParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetTexParameterfvCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -8303,9 +8232,8 @@ func getTexParameterfvReply(buf []byte) *GetTexParameterfvReply { return v } -// Write request to wire for GetTexParameterfv -// getTexParameterfvRequest writes a GetTexParameterfv request to a byte slice. -func getTexParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getTexParameterfvRequest writes a GetTexParameterfv request to a byte slice for transfer. +func getTexParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -8339,8 +8267,8 @@ type GetTexParameterivCookie struct { } // GetTexParameteriv sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetTexParameterivCookie.Reply() -func GetTexParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetTexParameterivCookie { +// If an error occurs, it will be returned with the reply by calling GetTexParameterivCookie.Reply. +func GetTexParameteriv(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetTexParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -8353,7 +8281,7 @@ func GetTexParameteriv(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname // GetTexParameterivUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetTexParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) GetTexParameterivCookie { +func GetTexParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) GetTexParameterivCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -8420,9 +8348,8 @@ func getTexParameterivReply(buf []byte) *GetTexParameterivReply { return v } -// Write request to wire for GetTexParameteriv -// getTexParameterivRequest writes a GetTexParameteriv request to a byte slice. -func getTexParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname uint32) []byte { +// getTexParameterivRequest writes a GetTexParameteriv request to a byte slice for transfer. +func getTexParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target, Pname uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -8456,7 +8383,7 @@ type GetVisualConfigsCookie struct { } // GetVisualConfigs sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetVisualConfigsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetVisualConfigsCookie.Reply. func GetVisualConfigs(c *xgb.Conn, Screen uint32) GetVisualConfigsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -8534,8 +8461,7 @@ func getVisualConfigsReply(buf []byte) *GetVisualConfigsReply { return v } -// Write request to wire for GetVisualConfigs -// getVisualConfigsRequest writes a GetVisualConfigs request to a byte slice. +// getVisualConfigsRequest writes a GetVisualConfigs request to a byte slice for transfer. func getVisualConfigsRequest(c *xgb.Conn, Screen uint32) []byte { size := 8 b := 0 @@ -8564,7 +8490,7 @@ type IsDirectCookie struct { } // IsDirect sends a checked request. -// If an error occurs, it will be returned with the reply by calling IsDirectCookie.Reply() +// If an error occurs, it will be returned with the reply by calling IsDirectCookie.Reply. func IsDirect(c *xgb.Conn, Context Context) IsDirectCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -8635,8 +8561,7 @@ func isDirectReply(buf []byte) *IsDirectReply { return v } -// Write request to wire for IsDirect -// isDirectRequest writes a IsDirect request to a byte slice. +// isDirectRequest writes a IsDirect request to a byte slice for transfer. func isDirectRequest(c *xgb.Conn, Context Context) []byte { size := 8 b := 0 @@ -8665,7 +8590,7 @@ type IsEnabledCookie struct { } // IsEnabled sends a checked request. -// If an error occurs, it will be returned with the reply by calling IsEnabledCookie.Reply() +// If an error occurs, it will be returned with the reply by calling IsEnabledCookie.Reply. func IsEnabled(c *xgb.Conn, ContextTag ContextTag, Capability uint32) IsEnabledCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -8729,8 +8654,7 @@ func isEnabledReply(buf []byte) *IsEnabledReply { return v } -// Write request to wire for IsEnabled -// isEnabledRequest writes a IsEnabled request to a byte slice. +// isEnabledRequest writes a IsEnabled request to a byte slice for transfer. func isEnabledRequest(c *xgb.Conn, ContextTag ContextTag, Capability uint32) []byte { size := 12 b := 0 @@ -8762,7 +8686,7 @@ type IsListCookie struct { } // IsList sends a checked request. -// If an error occurs, it will be returned with the reply by calling IsListCookie.Reply() +// If an error occurs, it will be returned with the reply by calling IsListCookie.Reply. func IsList(c *xgb.Conn, ContextTag ContextTag, List uint32) IsListCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -8826,8 +8750,7 @@ func isListReply(buf []byte) *IsListReply { return v } -// Write request to wire for IsList -// isListRequest writes a IsList request to a byte slice. +// isListRequest writes a IsList request to a byte slice for transfer. func isListRequest(c *xgb.Conn, ContextTag ContextTag, List uint32) []byte { size := 12 b := 0 @@ -8859,7 +8782,7 @@ type IsQueryARBCookie struct { } // IsQueryARB sends a checked request. -// If an error occurs, it will be returned with the reply by calling IsQueryARBCookie.Reply() +// If an error occurs, it will be returned with the reply by calling IsQueryARBCookie.Reply. func IsQueryARB(c *xgb.Conn, ContextTag ContextTag, Id uint32) IsQueryARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -8923,8 +8846,7 @@ func isQueryARBReply(buf []byte) *IsQueryARBReply { return v } -// Write request to wire for IsQueryARB -// isQueryARBRequest writes a IsQueryARB request to a byte slice. +// isQueryARBRequest writes a IsQueryARB request to a byte slice for transfer. func isQueryARBRequest(c *xgb.Conn, ContextTag ContextTag, Id uint32) []byte { size := 12 b := 0 @@ -8956,7 +8878,7 @@ type IsTextureCookie struct { } // IsTexture sends a checked request. -// If an error occurs, it will be returned with the reply by calling IsTextureCookie.Reply() +// If an error occurs, it will be returned with the reply by calling IsTextureCookie.Reply. func IsTexture(c *xgb.Conn, ContextTag ContextTag, Texture uint32) IsTextureCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -9020,8 +8942,7 @@ func isTextureReply(buf []byte) *IsTextureReply { return v } -// Write request to wire for IsTexture -// isTextureRequest writes a IsTexture request to a byte slice. +// isTextureRequest writes a IsTexture request to a byte slice for transfer. func isTextureRequest(c *xgb.Conn, ContextTag ContextTag, Texture uint32) []byte { size := 12 b := 0 @@ -9053,8 +8974,8 @@ type MakeContextCurrentCookie struct { } // MakeContextCurrent sends a checked request. -// If an error occurs, it will be returned with the reply by calling MakeContextCurrentCookie.Reply() -func MakeContextCurrent(c *xgb.Conn, OldContextTag ContextTag, Drawable Drawable, ReadDrawable Drawable, Context Context) MakeContextCurrentCookie { +// If an error occurs, it will be returned with the reply by calling MakeContextCurrentCookie.Reply. +func MakeContextCurrent(c *xgb.Conn, OldContextTag ContextTag, Drawable, ReadDrawable Drawable, Context Context) MakeContextCurrentCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -9067,7 +8988,7 @@ func MakeContextCurrent(c *xgb.Conn, OldContextTag ContextTag, Drawable Drawable // MakeContextCurrentUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func MakeContextCurrentUnchecked(c *xgb.Conn, OldContextTag ContextTag, Drawable Drawable, ReadDrawable Drawable, Context Context) MakeContextCurrentCookie { +func MakeContextCurrentUnchecked(c *xgb.Conn, OldContextTag ContextTag, Drawable, ReadDrawable Drawable, Context Context) MakeContextCurrentCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -9120,9 +9041,8 @@ func makeContextCurrentReply(buf []byte) *MakeContextCurrentReply { return v } -// Write request to wire for MakeContextCurrent -// makeContextCurrentRequest writes a MakeContextCurrent request to a byte slice. -func makeContextCurrentRequest(c *xgb.Conn, OldContextTag ContextTag, Drawable Drawable, ReadDrawable Drawable, Context Context) []byte { +// makeContextCurrentRequest writes a MakeContextCurrent request to a byte slice for transfer. +func makeContextCurrentRequest(c *xgb.Conn, OldContextTag ContextTag, Drawable, ReadDrawable Drawable, Context Context) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -9159,7 +9079,7 @@ type MakeCurrentCookie struct { } // MakeCurrent sends a checked request. -// If an error occurs, it will be returned with the reply by calling MakeCurrentCookie.Reply() +// If an error occurs, it will be returned with the reply by calling MakeCurrentCookie.Reply. func MakeCurrent(c *xgb.Conn, Drawable Drawable, Context Context, OldContextTag ContextTag) MakeCurrentCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -9226,8 +9146,7 @@ func makeCurrentReply(buf []byte) *MakeCurrentReply { return v } -// Write request to wire for MakeCurrent -// makeCurrentRequest writes a MakeCurrent request to a byte slice. +// makeCurrentRequest writes a MakeCurrent request to a byte slice for transfer. func makeCurrentRequest(c *xgb.Conn, Drawable Drawable, Context Context, OldContextTag ContextTag) []byte { size := 16 b := 0 @@ -9263,7 +9182,7 @@ type NewListCookie struct { // NewList sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func NewList(c *xgb.Conn, ContextTag ContextTag, List uint32, Mode uint32) NewListCookie { +func NewList(c *xgb.Conn, ContextTag ContextTag, List, Mode uint32) NewListCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -9275,8 +9194,8 @@ func NewList(c *xgb.Conn, ContextTag ContextTag, List uint32, Mode uint32) NewLi } // NewListChecked sends a checked request. -// If an error occurs, it can be retrieved using NewListCookie.Check() -func NewListChecked(c *xgb.Conn, ContextTag ContextTag, List uint32, Mode uint32) NewListCookie { +// If an error occurs, it can be retrieved using NewListCookie.Check. +func NewListChecked(c *xgb.Conn, ContextTag ContextTag, List, Mode uint32) NewListCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -9293,9 +9212,8 @@ func (cook NewListCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for NewList -// newListRequest writes a NewList request to a byte slice. -func newListRequest(c *xgb.Conn, ContextTag ContextTag, List uint32, Mode uint32) []byte { +// newListRequest writes a NewList request to a byte slice for transfer. +func newListRequest(c *xgb.Conn, ContextTag ContextTag, List, Mode uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -9342,7 +9260,7 @@ func PixelStoref(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum Float32 } // PixelStorefChecked sends a checked request. -// If an error occurs, it can be retrieved using PixelStorefCookie.Check() +// If an error occurs, it can be retrieved using PixelStorefCookie.Check. func PixelStorefChecked(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum Float32) PixelStorefCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -9360,8 +9278,7 @@ func (cook PixelStorefCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PixelStoref -// pixelStorefRequest writes a PixelStoref request to a byte slice. +// pixelStorefRequest writes a PixelStoref request to a byte slice for transfer. func pixelStorefRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum Float32) []byte { size := 16 b := 0 @@ -9409,7 +9326,7 @@ func PixelStorei(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum int32) } // PixelStoreiChecked sends a checked request. -// If an error occurs, it can be retrieved using PixelStoreiCookie.Check() +// If an error occurs, it can be retrieved using PixelStoreiCookie.Check. func PixelStoreiChecked(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum int32) PixelStoreiCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -9427,8 +9344,7 @@ func (cook PixelStoreiCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PixelStorei -// pixelStoreiRequest writes a PixelStorei request to a byte slice. +// pixelStoreiRequest writes a PixelStorei request to a byte slice for transfer. func pixelStoreiRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum int32) []byte { size := 16 b := 0 @@ -9463,7 +9379,7 @@ type QueryContextCookie struct { } // QueryContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryContextCookie.Reply. func QueryContext(c *xgb.Conn, Context Context) QueryContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -9537,8 +9453,7 @@ func queryContextReply(buf []byte) *QueryContextReply { return v } -// Write request to wire for QueryContext -// queryContextRequest writes a QueryContext request to a byte slice. +// queryContextRequest writes a QueryContext request to a byte slice for transfer. func queryContextRequest(c *xgb.Conn, Context Context) []byte { size := 8 b := 0 @@ -9567,7 +9482,7 @@ type QueryExtensionsStringCookie struct { } // QueryExtensionsString sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryExtensionsStringCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryExtensionsStringCookie.Reply. func QueryExtensionsString(c *xgb.Conn, Screen uint32) QueryExtensionsStringCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -9637,8 +9552,7 @@ func queryExtensionsStringReply(buf []byte) *QueryExtensionsStringReply { return v } -// Write request to wire for QueryExtensionsString -// queryExtensionsStringRequest writes a QueryExtensionsString request to a byte slice. +// queryExtensionsStringRequest writes a QueryExtensionsString request to a byte slice for transfer. func queryExtensionsStringRequest(c *xgb.Conn, Screen uint32) []byte { size := 8 b := 0 @@ -9667,8 +9581,8 @@ type QueryServerStringCookie struct { } // QueryServerString sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryServerStringCookie.Reply() -func QueryServerString(c *xgb.Conn, Screen uint32, Name uint32) QueryServerStringCookie { +// If an error occurs, it will be returned with the reply by calling QueryServerStringCookie.Reply. +func QueryServerString(c *xgb.Conn, Screen, Name uint32) QueryServerStringCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -9681,7 +9595,7 @@ func QueryServerString(c *xgb.Conn, Screen uint32, Name uint32) QueryServerStrin // QueryServerStringUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func QueryServerStringUnchecked(c *xgb.Conn, Screen uint32, Name uint32) QueryServerStringCookie { +func QueryServerStringUnchecked(c *xgb.Conn, Screen, Name uint32) QueryServerStringCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -9745,9 +9659,8 @@ func queryServerStringReply(buf []byte) *QueryServerStringReply { return v } -// Write request to wire for QueryServerString -// queryServerStringRequest writes a QueryServerString request to a byte slice. -func queryServerStringRequest(c *xgb.Conn, Screen uint32, Name uint32) []byte { +// queryServerStringRequest writes a QueryServerString request to a byte slice for transfer. +func queryServerStringRequest(c *xgb.Conn, Screen, Name uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -9778,8 +9691,8 @@ 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, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, MajorVersion, MinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -9792,7 +9705,7 @@ func QueryVersion(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) QueryVe // 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, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, MajorVersion, MinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -9849,9 +9762,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, MajorVersion, MinorVersion uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -9882,8 +9794,8 @@ type ReadPixelsCookie struct { } // ReadPixels sends a checked request. -// If an error occurs, it will be returned with the reply by calling ReadPixelsCookie.Reply() -func ReadPixels(c *xgb.Conn, ContextTag ContextTag, X int32, Y int32, Width int32, Height int32, Format uint32, Type uint32, SwapBytes bool, LsbFirst bool) ReadPixelsCookie { +// If an error occurs, it will be returned with the reply by calling ReadPixelsCookie.Reply. +func ReadPixels(c *xgb.Conn, ContextTag ContextTag, X, Y, Width, Height int32, Format, Type uint32, SwapBytes, LsbFirst bool) ReadPixelsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -9896,7 +9808,7 @@ func ReadPixels(c *xgb.Conn, ContextTag ContextTag, X int32, Y int32, Width int3 // ReadPixelsUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ReadPixelsUnchecked(c *xgb.Conn, ContextTag ContextTag, X int32, Y int32, Width int32, Height int32, Format uint32, Type uint32, SwapBytes bool, LsbFirst bool) ReadPixelsCookie { +func ReadPixelsUnchecked(c *xgb.Conn, ContextTag ContextTag, X, Y, Width, Height int32, Format, Type uint32, SwapBytes, LsbFirst bool) ReadPixelsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -9950,9 +9862,8 @@ func readPixelsReply(buf []byte) *ReadPixelsReply { return v } -// Write request to wire for ReadPixels -// readPixelsRequest writes a ReadPixels request to a byte slice. -func readPixelsRequest(c *xgb.Conn, ContextTag ContextTag, X int32, Y int32, Width int32, Height int32, Format uint32, Type uint32, SwapBytes bool, LsbFirst bool) []byte { +// readPixelsRequest writes a ReadPixels request to a byte slice for transfer. +func readPixelsRequest(c *xgb.Conn, ContextTag ContextTag, X, Y, Width, Height int32, Format, Type uint32, SwapBytes, LsbFirst bool) []byte { size := 36 b := 0 buf := make([]byte, size) @@ -10025,7 +9936,7 @@ func Render(c *xgb.Conn, ContextTag ContextTag, Data []byte) RenderCookie { } // RenderChecked sends a checked request. -// If an error occurs, it can be retrieved using RenderCookie.Check() +// If an error occurs, it can be retrieved using RenderCookie.Check. func RenderChecked(c *xgb.Conn, ContextTag ContextTag, Data []byte) RenderCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -10043,8 +9954,7 @@ func (cook RenderCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Render -// renderRequest writes a Render request to a byte slice. +// renderRequest writes a Render request to a byte slice for transfer. func renderRequest(c *xgb.Conn, ContextTag ContextTag, Data []byte) []byte { size := xgb.Pad((8 + xgb.Pad((len(Data) * 1)))) b := 0 @@ -10077,7 +9987,7 @@ type RenderLargeCookie struct { // RenderLarge sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func RenderLarge(c *xgb.Conn, ContextTag ContextTag, RequestNum uint16, RequestTotal uint16, DataLen uint32, Data []byte) RenderLargeCookie { +func RenderLarge(c *xgb.Conn, ContextTag ContextTag, RequestNum, RequestTotal uint16, DataLen uint32, Data []byte) RenderLargeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -10089,8 +9999,8 @@ func RenderLarge(c *xgb.Conn, ContextTag ContextTag, RequestNum uint16, RequestT } // RenderLargeChecked sends a checked request. -// If an error occurs, it can be retrieved using RenderLargeCookie.Check() -func RenderLargeChecked(c *xgb.Conn, ContextTag ContextTag, RequestNum uint16, RequestTotal uint16, DataLen uint32, Data []byte) RenderLargeCookie { +// If an error occurs, it can be retrieved using RenderLargeCookie.Check. +func RenderLargeChecked(c *xgb.Conn, ContextTag ContextTag, RequestNum, RequestTotal uint16, DataLen uint32, Data []byte) RenderLargeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -10107,9 +10017,8 @@ func (cook RenderLargeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for RenderLarge -// renderLargeRequest writes a RenderLarge request to a byte slice. -func renderLargeRequest(c *xgb.Conn, ContextTag ContextTag, RequestNum uint16, RequestTotal uint16, DataLen uint32, Data []byte) []byte { +// renderLargeRequest writes a RenderLarge request to a byte slice for transfer. +func renderLargeRequest(c *xgb.Conn, ContextTag ContextTag, RequestNum, RequestTotal uint16, DataLen uint32, Data []byte) []byte { size := xgb.Pad((16 + xgb.Pad((int(DataLen) * 1)))) b := 0 buf := make([]byte, size) @@ -10149,7 +10058,7 @@ type RenderModeCookie struct { } // RenderMode sends a checked request. -// If an error occurs, it will be returned with the reply by calling RenderModeCookie.Reply() +// If an error occurs, it will be returned with the reply by calling RenderModeCookie.Reply. func RenderMode(c *xgb.Conn, ContextTag ContextTag, Mode uint32) RenderModeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -10231,8 +10140,7 @@ func renderModeReply(buf []byte) *RenderModeReply { return v } -// Write request to wire for RenderMode -// renderModeRequest writes a RenderMode request to a byte slice. +// renderModeRequest writes a RenderMode request to a byte slice for transfer. func renderModeRequest(c *xgb.Conn, ContextTag ContextTag, Mode uint32) []byte { size := 12 b := 0 @@ -10277,7 +10185,7 @@ func SelectBuffer(c *xgb.Conn, ContextTag ContextTag, Size int32) SelectBufferCo } // SelectBufferChecked sends a checked request. -// If an error occurs, it can be retrieved using SelectBufferCookie.Check() +// If an error occurs, it can be retrieved using SelectBufferCookie.Check. func SelectBufferChecked(c *xgb.Conn, ContextTag ContextTag, Size int32) SelectBufferCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -10295,8 +10203,7 @@ func (cook SelectBufferCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SelectBuffer -// selectBufferRequest writes a SelectBuffer request to a byte slice. +// selectBufferRequest writes a SelectBuffer request to a byte slice for transfer. func selectBufferRequest(c *xgb.Conn, ContextTag ContextTag, Size int32) []byte { size := 12 b := 0 @@ -10329,7 +10236,7 @@ type SetClientInfo2ARBCookie struct { // SetClientInfo2ARB sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetClientInfo2ARB(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, NumVersions uint32, GlStrLen uint32, GlxStrLen uint32, GlVersions []uint32, GlExtensionString string, GlxExtensionString string) SetClientInfo2ARBCookie { +func SetClientInfo2ARB(c *xgb.Conn, MajorVersion, MinorVersion, NumVersions, GlStrLen, GlxStrLen uint32, GlVersions []uint32, GlExtensionString, GlxExtensionString string) SetClientInfo2ARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -10341,8 +10248,8 @@ func SetClientInfo2ARB(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, Nu } // SetClientInfo2ARBChecked sends a checked request. -// If an error occurs, it can be retrieved using SetClientInfo2ARBCookie.Check() -func SetClientInfo2ARBChecked(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, NumVersions uint32, GlStrLen uint32, GlxStrLen uint32, GlVersions []uint32, GlExtensionString string, GlxExtensionString string) SetClientInfo2ARBCookie { +// If an error occurs, it can be retrieved using SetClientInfo2ARBCookie.Check. +func SetClientInfo2ARBChecked(c *xgb.Conn, MajorVersion, MinorVersion, NumVersions, GlStrLen, GlxStrLen uint32, GlVersions []uint32, GlExtensionString, GlxExtensionString string) SetClientInfo2ARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -10359,9 +10266,8 @@ func (cook SetClientInfo2ARBCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetClientInfo2ARB -// setClientInfo2ARBRequest writes a SetClientInfo2ARB request to a byte slice. -func setClientInfo2ARBRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, NumVersions uint32, GlStrLen uint32, GlxStrLen uint32, GlVersions []uint32, GlExtensionString string, GlxExtensionString string) []byte { +// setClientInfo2ARBRequest writes a SetClientInfo2ARB request to a byte slice for transfer. +func setClientInfo2ARBRequest(c *xgb.Conn, MajorVersion, MinorVersion, NumVersions, GlStrLen, GlxStrLen uint32, GlVersions []uint32, GlExtensionString, GlxExtensionString string) []byte { size := xgb.Pad((((24 + xgb.Pad(((int(NumVersions) * 3) * 4))) + xgb.Pad((int(GlStrLen) * 1))) + xgb.Pad((int(GlxStrLen) * 1)))) b := 0 buf := make([]byte, size) @@ -10413,7 +10319,7 @@ type SetClientInfoARBCookie struct { // SetClientInfoARB sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetClientInfoARB(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, NumVersions uint32, GlStrLen uint32, GlxStrLen uint32, GlVersions []uint32, GlExtensionString string, GlxExtensionString string) SetClientInfoARBCookie { +func SetClientInfoARB(c *xgb.Conn, MajorVersion, MinorVersion, NumVersions, GlStrLen, GlxStrLen uint32, GlVersions []uint32, GlExtensionString, GlxExtensionString string) SetClientInfoARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -10425,8 +10331,8 @@ func SetClientInfoARB(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, Num } // SetClientInfoARBChecked sends a checked request. -// If an error occurs, it can be retrieved using SetClientInfoARBCookie.Check() -func SetClientInfoARBChecked(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, NumVersions uint32, GlStrLen uint32, GlxStrLen uint32, GlVersions []uint32, GlExtensionString string, GlxExtensionString string) SetClientInfoARBCookie { +// If an error occurs, it can be retrieved using SetClientInfoARBCookie.Check. +func SetClientInfoARBChecked(c *xgb.Conn, MajorVersion, MinorVersion, NumVersions, GlStrLen, GlxStrLen uint32, GlVersions []uint32, GlExtensionString, GlxExtensionString string) SetClientInfoARBCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -10443,9 +10349,8 @@ func (cook SetClientInfoARBCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetClientInfoARB -// setClientInfoARBRequest writes a SetClientInfoARB request to a byte slice. -func setClientInfoARBRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, NumVersions uint32, GlStrLen uint32, GlxStrLen uint32, GlVersions []uint32, GlExtensionString string, GlxExtensionString string) []byte { +// setClientInfoARBRequest writes a SetClientInfoARB request to a byte slice for transfer. +func setClientInfoARBRequest(c *xgb.Conn, MajorVersion, MinorVersion, NumVersions, GlStrLen, GlxStrLen uint32, GlVersions []uint32, GlExtensionString, GlxExtensionString string) []byte { size := xgb.Pad((((24 + xgb.Pad(((int(NumVersions) * 2) * 4))) + xgb.Pad((int(GlStrLen) * 1))) + xgb.Pad((int(GlxStrLen) * 1)))) b := 0 buf := make([]byte, size) @@ -10509,7 +10414,7 @@ func SwapBuffers(c *xgb.Conn, ContextTag ContextTag, Drawable Drawable) SwapBuff } // SwapBuffersChecked sends a checked request. -// If an error occurs, it can be retrieved using SwapBuffersCookie.Check() +// If an error occurs, it can be retrieved using SwapBuffersCookie.Check. func SwapBuffersChecked(c *xgb.Conn, ContextTag ContextTag, Drawable Drawable) SwapBuffersCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -10527,8 +10432,7 @@ func (cook SwapBuffersCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SwapBuffers -// swapBuffersRequest writes a SwapBuffers request to a byte slice. +// swapBuffersRequest writes a SwapBuffers request to a byte slice for transfer. func swapBuffersRequest(c *xgb.Conn, ContextTag ContextTag, Drawable Drawable) []byte { size := 12 b := 0 @@ -10561,7 +10465,7 @@ type UseXFontCookie struct { // UseXFont sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func UseXFont(c *xgb.Conn, ContextTag ContextTag, Font xproto.Font, First uint32, Count uint32, ListBase uint32) UseXFontCookie { +func UseXFont(c *xgb.Conn, ContextTag ContextTag, Font xproto.Font, First, Count, ListBase uint32) UseXFontCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -10573,8 +10477,8 @@ func UseXFont(c *xgb.Conn, ContextTag ContextTag, Font xproto.Font, First uint32 } // UseXFontChecked sends a checked request. -// If an error occurs, it can be retrieved using UseXFontCookie.Check() -func UseXFontChecked(c *xgb.Conn, ContextTag ContextTag, Font xproto.Font, First uint32, Count uint32, ListBase uint32) UseXFontCookie { +// If an error occurs, it can be retrieved using UseXFontCookie.Check. +func UseXFontChecked(c *xgb.Conn, ContextTag ContextTag, Font xproto.Font, First, Count, ListBase uint32) UseXFontCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["GLX"]; !ok { @@ -10591,9 +10495,8 @@ func (cook UseXFontCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UseXFont -// useXFontRequest writes a UseXFont request to a byte slice. -func useXFontRequest(c *xgb.Conn, ContextTag ContextTag, Font xproto.Font, First uint32, Count uint32, ListBase uint32) []byte { +// useXFontRequest writes a UseXFont request to a byte slice for transfer. +func useXFontRequest(c *xgb.Conn, ContextTag ContextTag, Font xproto.Font, First, Count, ListBase uint32) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -10646,7 +10549,7 @@ func VendorPrivate(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag, Data [ } // VendorPrivateChecked sends a checked request. -// If an error occurs, it can be retrieved using VendorPrivateCookie.Check() +// If an error occurs, it can be retrieved using VendorPrivateCookie.Check. func VendorPrivateChecked(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag, Data []byte) VendorPrivateCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -10664,8 +10567,7 @@ func (cook VendorPrivateCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for VendorPrivate -// vendorPrivateRequest writes a VendorPrivate request to a byte slice. +// vendorPrivateRequest writes a VendorPrivate request to a byte slice for transfer. func vendorPrivateRequest(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag, Data []byte) []byte { size := xgb.Pad((12 + xgb.Pad((len(Data) * 1)))) b := 0 @@ -10700,7 +10602,7 @@ type VendorPrivateWithReplyCookie struct { } // VendorPrivateWithReply sends a checked request. -// If an error occurs, it will be returned with the reply by calling VendorPrivateWithReplyCookie.Reply() +// If an error occurs, it will be returned with the reply by calling VendorPrivateWithReplyCookie.Reply. func VendorPrivateWithReply(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag, Data []byte) VendorPrivateWithReplyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -10774,8 +10676,7 @@ func vendorPrivateWithReplyReply(buf []byte) *VendorPrivateWithReplyReply { return v } -// Write request to wire for VendorPrivateWithReply -// vendorPrivateWithReplyRequest writes a VendorPrivateWithReply request to a byte slice. +// vendorPrivateWithReplyRequest writes a VendorPrivateWithReply request to a byte slice for transfer. func vendorPrivateWithReplyRequest(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag, Data []byte) []byte { size := xgb.Pad((12 + xgb.Pad((len(Data) * 1)))) b := 0 @@ -10823,7 +10724,7 @@ func WaitGL(c *xgb.Conn, ContextTag ContextTag) WaitGLCookie { } // WaitGLChecked sends a checked request. -// If an error occurs, it can be retrieved using WaitGLCookie.Check() +// If an error occurs, it can be retrieved using WaitGLCookie.Check. func WaitGLChecked(c *xgb.Conn, ContextTag ContextTag) WaitGLCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -10841,8 +10742,7 @@ func (cook WaitGLCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for WaitGL -// waitGLRequest writes a WaitGL request to a byte slice. +// waitGLRequest writes a WaitGL request to a byte slice for transfer. func waitGLRequest(c *xgb.Conn, ContextTag ContextTag) []byte { size := 8 b := 0 @@ -10884,7 +10784,7 @@ func WaitX(c *xgb.Conn, ContextTag ContextTag) WaitXCookie { } // WaitXChecked sends a checked request. -// If an error occurs, it can be retrieved using WaitXCookie.Check() +// If an error occurs, it can be retrieved using WaitXCookie.Check. func WaitXChecked(c *xgb.Conn, ContextTag ContextTag) WaitXCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -10902,8 +10802,7 @@ func (cook WaitXCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for WaitX -// waitXRequest writes a WaitX request to a byte slice. +// waitXRequest writes a WaitX request to a byte slice for transfer. func waitXRequest(c *xgb.Conn, ContextTag ContextTag) []byte { size := 8 b := 0 diff --git a/nexgb/randr/randr.go b/nexgb/randr/randr.go index 63717be..9570434 100644 --- a/nexgb/randr/randr.go +++ b/nexgb/randr/randr.go @@ -1842,7 +1842,7 @@ func AddOutputMode(c *xgb.Conn, Output Output, Mode Mode) AddOutputModeCookie { } // AddOutputModeChecked sends a checked request. -// If an error occurs, it can be retrieved using AddOutputModeCookie.Check() +// If an error occurs, it can be retrieved using AddOutputModeCookie.Check. func AddOutputModeChecked(c *xgb.Conn, Output Output, Mode Mode) AddOutputModeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1860,8 +1860,7 @@ func (cook AddOutputModeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for AddOutputMode -// addOutputModeRequest writes a AddOutputMode request to a byte slice. +// addOutputModeRequest writes a AddOutputMode request to a byte slice for transfer. func addOutputModeRequest(c *xgb.Conn, Output Output, Mode Mode) []byte { size := 12 b := 0 @@ -1894,7 +1893,7 @@ type ChangeOutputPropertyCookie struct { // ChangeOutputProperty sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ChangeOutputProperty(c *xgb.Conn, Output Output, Property xproto.Atom, Type xproto.Atom, Format byte, Mode byte, NumUnits uint32, Data []byte) ChangeOutputPropertyCookie { +func ChangeOutputProperty(c *xgb.Conn, Output Output, Property, Type xproto.Atom, Format, Mode byte, NumUnits uint32, Data []byte) ChangeOutputPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -1906,8 +1905,8 @@ func ChangeOutputProperty(c *xgb.Conn, Output Output, Property xproto.Atom, Type } // ChangeOutputPropertyChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeOutputPropertyCookie.Check() -func ChangeOutputPropertyChecked(c *xgb.Conn, Output Output, Property xproto.Atom, Type xproto.Atom, Format byte, Mode byte, NumUnits uint32, Data []byte) ChangeOutputPropertyCookie { +// If an error occurs, it can be retrieved using ChangeOutputPropertyCookie.Check. +func ChangeOutputPropertyChecked(c *xgb.Conn, Output Output, Property, Type xproto.Atom, Format, Mode byte, NumUnits uint32, Data []byte) ChangeOutputPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -1924,9 +1923,8 @@ func (cook ChangeOutputPropertyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeOutputProperty -// changeOutputPropertyRequest writes a ChangeOutputProperty request to a byte slice. -func changeOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Atom, Type xproto.Atom, Format byte, Mode byte, NumUnits uint32, Data []byte) []byte { +// changeOutputPropertyRequest writes a ChangeOutputProperty request to a byte slice for transfer. +func changeOutputPropertyRequest(c *xgb.Conn, Output Output, Property, Type xproto.Atom, Format, Mode byte, NumUnits uint32, Data []byte) []byte { size := xgb.Pad((24 + xgb.Pad((((int(NumUnits) * int(Format)) / 8) * 1)))) b := 0 buf := make([]byte, size) @@ -1975,7 +1973,7 @@ type ChangeProviderPropertyCookie struct { // ChangeProviderProperty sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ChangeProviderProperty(c *xgb.Conn, Provider Provider, Property xproto.Atom, Type xproto.Atom, Format byte, Mode byte, NumItems uint32, Data []byte) ChangeProviderPropertyCookie { +func ChangeProviderProperty(c *xgb.Conn, Provider Provider, Property, Type xproto.Atom, Format, Mode byte, NumItems uint32, Data []byte) ChangeProviderPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -1987,8 +1985,8 @@ func ChangeProviderProperty(c *xgb.Conn, Provider Provider, Property xproto.Atom } // ChangeProviderPropertyChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeProviderPropertyCookie.Check() -func ChangeProviderPropertyChecked(c *xgb.Conn, Provider Provider, Property xproto.Atom, Type xproto.Atom, Format byte, Mode byte, NumItems uint32, Data []byte) ChangeProviderPropertyCookie { +// If an error occurs, it can be retrieved using ChangeProviderPropertyCookie.Check. +func ChangeProviderPropertyChecked(c *xgb.Conn, Provider Provider, Property, Type xproto.Atom, Format, Mode byte, NumItems uint32, Data []byte) ChangeProviderPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -2005,9 +2003,8 @@ func (cook ChangeProviderPropertyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeProviderProperty -// changeProviderPropertyRequest writes a ChangeProviderProperty request to a byte slice. -func changeProviderPropertyRequest(c *xgb.Conn, Provider Provider, Property xproto.Atom, Type xproto.Atom, Format byte, Mode byte, NumItems uint32, Data []byte) []byte { +// changeProviderPropertyRequest writes a ChangeProviderProperty request to a byte slice for transfer. +func changeProviderPropertyRequest(c *xgb.Conn, Provider Provider, Property, Type xproto.Atom, Format, Mode byte, NumItems uint32, Data []byte) []byte { size := xgb.Pad((24 + xgb.Pad(((int(NumItems) * (int(Format) / 8)) * 1)))) b := 0 buf := make([]byte, size) @@ -2056,7 +2053,7 @@ type ConfigureOutputPropertyCookie struct { // ConfigureOutputProperty sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ConfigureOutputProperty(c *xgb.Conn, Output Output, Property xproto.Atom, Pending bool, Range bool, Values []int32) ConfigureOutputPropertyCookie { +func ConfigureOutputProperty(c *xgb.Conn, Output Output, Property xproto.Atom, Pending, Range bool, Values []int32) ConfigureOutputPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -2068,8 +2065,8 @@ func ConfigureOutputProperty(c *xgb.Conn, Output Output, Property xproto.Atom, P } // ConfigureOutputPropertyChecked sends a checked request. -// If an error occurs, it can be retrieved using ConfigureOutputPropertyCookie.Check() -func ConfigureOutputPropertyChecked(c *xgb.Conn, Output Output, Property xproto.Atom, Pending bool, Range bool, Values []int32) ConfigureOutputPropertyCookie { +// If an error occurs, it can be retrieved using ConfigureOutputPropertyCookie.Check. +func ConfigureOutputPropertyChecked(c *xgb.Conn, Output Output, Property xproto.Atom, Pending, Range bool, Values []int32) ConfigureOutputPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -2086,9 +2083,8 @@ func (cook ConfigureOutputPropertyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ConfigureOutputProperty -// configureOutputPropertyRequest writes a ConfigureOutputProperty request to a byte slice. -func configureOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Atom, Pending bool, Range bool, Values []int32) []byte { +// configureOutputPropertyRequest writes a ConfigureOutputProperty request to a byte slice for transfer. +func configureOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Atom, Pending, Range bool, Values []int32) []byte { size := xgb.Pad((16 + xgb.Pad((len(Values) * 4)))) b := 0 buf := make([]byte, size) @@ -2141,7 +2137,7 @@ type ConfigureProviderPropertyCookie struct { // ConfigureProviderProperty sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ConfigureProviderProperty(c *xgb.Conn, Provider Provider, Property xproto.Atom, Pending bool, Range bool, Values []int32) ConfigureProviderPropertyCookie { +func ConfigureProviderProperty(c *xgb.Conn, Provider Provider, Property xproto.Atom, Pending, Range bool, Values []int32) ConfigureProviderPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -2153,8 +2149,8 @@ func ConfigureProviderProperty(c *xgb.Conn, Provider Provider, Property xproto.A } // ConfigureProviderPropertyChecked sends a checked request. -// If an error occurs, it can be retrieved using ConfigureProviderPropertyCookie.Check() -func ConfigureProviderPropertyChecked(c *xgb.Conn, Provider Provider, Property xproto.Atom, Pending bool, Range bool, Values []int32) ConfigureProviderPropertyCookie { +// If an error occurs, it can be retrieved using ConfigureProviderPropertyCookie.Check. +func ConfigureProviderPropertyChecked(c *xgb.Conn, Provider Provider, Property xproto.Atom, Pending, Range bool, Values []int32) ConfigureProviderPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -2171,9 +2167,8 @@ func (cook ConfigureProviderPropertyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ConfigureProviderProperty -// configureProviderPropertyRequest writes a ConfigureProviderProperty request to a byte slice. -func configureProviderPropertyRequest(c *xgb.Conn, Provider Provider, Property xproto.Atom, Pending bool, Range bool, Values []int32) []byte { +// configureProviderPropertyRequest writes a ConfigureProviderProperty request to a byte slice for transfer. +func configureProviderPropertyRequest(c *xgb.Conn, Provider Provider, Property xproto.Atom, Pending, Range bool, Values []int32) []byte { size := xgb.Pad((16 + xgb.Pad((len(Values) * 4)))) b := 0 buf := make([]byte, size) @@ -2225,7 +2220,7 @@ type CreateModeCookie struct { } // CreateMode sends a checked request. -// If an error occurs, it will be returned with the reply by calling CreateModeCookie.Reply() +// If an error occurs, it will be returned with the reply by calling CreateModeCookie.Reply. func CreateMode(c *xgb.Conn, Window xproto.Window, ModeInfo ModeInfo, Name string) CreateModeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2292,8 +2287,7 @@ func createModeReply(buf []byte) *CreateModeReply { return v } -// Write request to wire for CreateMode -// createModeRequest writes a CreateMode request to a byte slice. +// createModeRequest writes a CreateMode request to a byte slice for transfer. func createModeRequest(c *xgb.Conn, Window xproto.Window, ModeInfo ModeInfo, Name string) []byte { size := xgb.Pad((40 + xgb.Pad((len(Name) * 1)))) b := 0 @@ -2344,7 +2338,7 @@ func DeleteMonitor(c *xgb.Conn, Window xproto.Window, Name xproto.Atom) DeleteMo } // DeleteMonitorChecked sends a checked request. -// If an error occurs, it can be retrieved using DeleteMonitorCookie.Check() +// If an error occurs, it can be retrieved using DeleteMonitorCookie.Check. func DeleteMonitorChecked(c *xgb.Conn, Window xproto.Window, Name xproto.Atom) DeleteMonitorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2362,8 +2356,7 @@ func (cook DeleteMonitorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeleteMonitor -// deleteMonitorRequest writes a DeleteMonitor request to a byte slice. +// deleteMonitorRequest writes a DeleteMonitor request to a byte slice for transfer. func deleteMonitorRequest(c *xgb.Conn, Window xproto.Window, Name xproto.Atom) []byte { size := 12 b := 0 @@ -2408,7 +2401,7 @@ func DeleteOutputMode(c *xgb.Conn, Output Output, Mode Mode) DeleteOutputModeCoo } // DeleteOutputModeChecked sends a checked request. -// If an error occurs, it can be retrieved using DeleteOutputModeCookie.Check() +// If an error occurs, it can be retrieved using DeleteOutputModeCookie.Check. func DeleteOutputModeChecked(c *xgb.Conn, Output Output, Mode Mode) DeleteOutputModeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2426,8 +2419,7 @@ func (cook DeleteOutputModeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeleteOutputMode -// deleteOutputModeRequest writes a DeleteOutputMode request to a byte slice. +// deleteOutputModeRequest writes a DeleteOutputMode request to a byte slice for transfer. func deleteOutputModeRequest(c *xgb.Conn, Output Output, Mode Mode) []byte { size := 12 b := 0 @@ -2472,7 +2464,7 @@ func DeleteOutputProperty(c *xgb.Conn, Output Output, Property xproto.Atom) Dele } // DeleteOutputPropertyChecked sends a checked request. -// If an error occurs, it can be retrieved using DeleteOutputPropertyCookie.Check() +// If an error occurs, it can be retrieved using DeleteOutputPropertyCookie.Check. func DeleteOutputPropertyChecked(c *xgb.Conn, Output Output, Property xproto.Atom) DeleteOutputPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2490,8 +2482,7 @@ func (cook DeleteOutputPropertyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeleteOutputProperty -// deleteOutputPropertyRequest writes a DeleteOutputProperty request to a byte slice. +// deleteOutputPropertyRequest writes a DeleteOutputProperty request to a byte slice for transfer. func deleteOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Atom) []byte { size := 12 b := 0 @@ -2536,7 +2527,7 @@ func DeleteProviderProperty(c *xgb.Conn, Provider Provider, Property xproto.Atom } // DeleteProviderPropertyChecked sends a checked request. -// If an error occurs, it can be retrieved using DeleteProviderPropertyCookie.Check() +// If an error occurs, it can be retrieved using DeleteProviderPropertyCookie.Check. func DeleteProviderPropertyChecked(c *xgb.Conn, Provider Provider, Property xproto.Atom) DeleteProviderPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2554,8 +2545,7 @@ func (cook DeleteProviderPropertyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeleteProviderProperty -// deleteProviderPropertyRequest writes a DeleteProviderProperty request to a byte slice. +// deleteProviderPropertyRequest writes a DeleteProviderProperty request to a byte slice for transfer. func deleteProviderPropertyRequest(c *xgb.Conn, Provider Provider, Property xproto.Atom) []byte { size := 12 b := 0 @@ -2600,7 +2590,7 @@ func DestroyMode(c *xgb.Conn, Mode Mode) DestroyModeCookie { } // DestroyModeChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyModeCookie.Check() +// If an error occurs, it can be retrieved using DestroyModeCookie.Check. func DestroyModeChecked(c *xgb.Conn, Mode Mode) DestroyModeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2618,8 +2608,7 @@ func (cook DestroyModeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyMode -// destroyModeRequest writes a DestroyMode request to a byte slice. +// destroyModeRequest writes a DestroyMode request to a byte slice for transfer. func destroyModeRequest(c *xgb.Conn, Mode Mode) []byte { size := 8 b := 0 @@ -2648,7 +2637,7 @@ type GetCrtcGammaCookie struct { } // GetCrtcGamma sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetCrtcGammaCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetCrtcGammaCookie.Reply. func GetCrtcGamma(c *xgb.Conn, Crtc Crtc) GetCrtcGammaCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2736,8 +2725,7 @@ func getCrtcGammaReply(buf []byte) *GetCrtcGammaReply { return v } -// Write request to wire for GetCrtcGamma -// getCrtcGammaRequest writes a GetCrtcGamma request to a byte slice. +// getCrtcGammaRequest writes a GetCrtcGamma request to a byte slice for transfer. func getCrtcGammaRequest(c *xgb.Conn, Crtc Crtc) []byte { size := 8 b := 0 @@ -2766,7 +2754,7 @@ type GetCrtcGammaSizeCookie struct { } // GetCrtcGammaSize sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetCrtcGammaSizeCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetCrtcGammaSizeCookie.Reply. func GetCrtcGammaSize(c *xgb.Conn, Crtc Crtc) GetCrtcGammaSizeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2833,8 +2821,7 @@ func getCrtcGammaSizeReply(buf []byte) *GetCrtcGammaSizeReply { return v } -// Write request to wire for GetCrtcGammaSize -// getCrtcGammaSizeRequest writes a GetCrtcGammaSize request to a byte slice. +// getCrtcGammaSizeRequest writes a GetCrtcGammaSize request to a byte slice for transfer. func getCrtcGammaSizeRequest(c *xgb.Conn, Crtc Crtc) []byte { size := 8 b := 0 @@ -2863,7 +2850,7 @@ type GetCrtcInfoCookie struct { } // GetCrtcInfo sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetCrtcInfoCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetCrtcInfoCookie.Reply. func GetCrtcInfo(c *xgb.Conn, Crtc Crtc, ConfigTimestamp xproto.Timestamp) GetCrtcInfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2978,8 +2965,7 @@ func getCrtcInfoReply(buf []byte) *GetCrtcInfoReply { return v } -// Write request to wire for GetCrtcInfo -// getCrtcInfoRequest writes a GetCrtcInfo request to a byte slice. +// getCrtcInfoRequest writes a GetCrtcInfo request to a byte slice for transfer. func getCrtcInfoRequest(c *xgb.Conn, Crtc Crtc, ConfigTimestamp xproto.Timestamp) []byte { size := 12 b := 0 @@ -3011,7 +2997,7 @@ type GetCrtcTransformCookie struct { } // GetCrtcTransform sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetCrtcTransformCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetCrtcTransformCookie.Reply. func GetCrtcTransform(c *xgb.Conn, Crtc Crtc) GetCrtcTransformCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3145,8 +3131,7 @@ func getCrtcTransformReply(buf []byte) *GetCrtcTransformReply { return v } -// Write request to wire for GetCrtcTransform -// getCrtcTransformRequest writes a GetCrtcTransform request to a byte slice. +// getCrtcTransformRequest writes a GetCrtcTransform request to a byte slice for transfer. func getCrtcTransformRequest(c *xgb.Conn, Crtc Crtc) []byte { size := 8 b := 0 @@ -3175,7 +3160,7 @@ type GetMonitorsCookie struct { } // GetMonitors sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMonitorsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetMonitorsCookie.Reply. func GetMonitors(c *xgb.Conn, Window xproto.Window, GetActive bool) GetMonitorsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3254,8 +3239,7 @@ func getMonitorsReply(buf []byte) *GetMonitorsReply { return v } -// Write request to wire for GetMonitors -// getMonitorsRequest writes a GetMonitors request to a byte slice. +// getMonitorsRequest writes a GetMonitors request to a byte slice for transfer. func getMonitorsRequest(c *xgb.Conn, Window xproto.Window, GetActive bool) []byte { size := 12 b := 0 @@ -3291,7 +3275,7 @@ type GetOutputInfoCookie struct { } // GetOutputInfo sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetOutputInfoCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetOutputInfoCookie.Reply. func GetOutputInfo(c *xgb.Conn, Output Output, ConfigTimestamp xproto.Timestamp) GetOutputInfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3422,8 +3406,7 @@ func getOutputInfoReply(buf []byte) *GetOutputInfoReply { return v } -// Write request to wire for GetOutputInfo -// getOutputInfoRequest writes a GetOutputInfo request to a byte slice. +// getOutputInfoRequest writes a GetOutputInfo request to a byte slice for transfer. func getOutputInfoRequest(c *xgb.Conn, Output Output, ConfigTimestamp xproto.Timestamp) []byte { size := 12 b := 0 @@ -3455,7 +3438,7 @@ type GetOutputPrimaryCookie struct { } // GetOutputPrimary sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetOutputPrimaryCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetOutputPrimaryCookie.Reply. func GetOutputPrimary(c *xgb.Conn, Window xproto.Window) GetOutputPrimaryCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3519,8 +3502,7 @@ func getOutputPrimaryReply(buf []byte) *GetOutputPrimaryReply { return v } -// Write request to wire for GetOutputPrimary -// getOutputPrimaryRequest writes a GetOutputPrimary request to a byte slice. +// getOutputPrimaryRequest writes a GetOutputPrimary request to a byte slice for transfer. func getOutputPrimaryRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -3549,8 +3531,8 @@ type GetOutputPropertyCookie struct { } // GetOutputProperty sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetOutputPropertyCookie.Reply() -func GetOutputProperty(c *xgb.Conn, Output Output, Property xproto.Atom, Type xproto.Atom, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) GetOutputPropertyCookie { +// If an error occurs, it will be returned with the reply by calling GetOutputPropertyCookie.Reply. +func GetOutputProperty(c *xgb.Conn, Output Output, Property, Type xproto.Atom, LongOffset, LongLength uint32, Delete, Pending bool) GetOutputPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -3563,7 +3545,7 @@ func GetOutputProperty(c *xgb.Conn, Output Output, Property xproto.Atom, Type xp // GetOutputPropertyUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetOutputPropertyUnchecked(c *xgb.Conn, Output Output, Property xproto.Atom, Type xproto.Atom, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) GetOutputPropertyCookie { +func GetOutputPropertyUnchecked(c *xgb.Conn, Output Output, Property, Type xproto.Atom, LongOffset, LongLength uint32, Delete, Pending bool) GetOutputPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -3630,9 +3612,8 @@ func getOutputPropertyReply(buf []byte) *GetOutputPropertyReply { return v } -// Write request to wire for GetOutputProperty -// getOutputPropertyRequest writes a GetOutputProperty request to a byte slice. -func getOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Atom, Type xproto.Atom, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) []byte { +// getOutputPropertyRequest writes a GetOutputProperty request to a byte slice for transfer. +func getOutputPropertyRequest(c *xgb.Conn, Output Output, Property, Type xproto.Atom, LongOffset, LongLength uint32, Delete, Pending bool) []byte { size := 28 b := 0 buf := make([]byte, size) @@ -3688,7 +3669,7 @@ type GetPanningCookie struct { } // GetPanning sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPanningCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPanningCookie.Reply. func GetPanning(c *xgb.Conn, Crtc Crtc) GetPanningCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3801,8 +3782,7 @@ func getPanningReply(buf []byte) *GetPanningReply { return v } -// Write request to wire for GetPanning -// getPanningRequest writes a GetPanning request to a byte slice. +// getPanningRequest writes a GetPanning request to a byte slice for transfer. func getPanningRequest(c *xgb.Conn, Crtc Crtc) []byte { size := 8 b := 0 @@ -3831,7 +3811,7 @@ type GetProviderInfoCookie struct { } // GetProviderInfo sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetProviderInfoCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetProviderInfoCookie.Reply. func GetProviderInfo(c *xgb.Conn, Provider Provider, ConfigTimestamp xproto.Timestamp) GetProviderInfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3955,8 +3935,7 @@ func getProviderInfoReply(buf []byte) *GetProviderInfoReply { return v } -// Write request to wire for GetProviderInfo -// getProviderInfoRequest writes a GetProviderInfo request to a byte slice. +// getProviderInfoRequest writes a GetProviderInfo request to a byte slice for transfer. func getProviderInfoRequest(c *xgb.Conn, Provider Provider, ConfigTimestamp xproto.Timestamp) []byte { size := 12 b := 0 @@ -3988,8 +3967,8 @@ type GetProviderPropertyCookie struct { } // GetProviderProperty sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetProviderPropertyCookie.Reply() -func GetProviderProperty(c *xgb.Conn, Provider Provider, Property xproto.Atom, Type xproto.Atom, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) GetProviderPropertyCookie { +// If an error occurs, it will be returned with the reply by calling GetProviderPropertyCookie.Reply. +func GetProviderProperty(c *xgb.Conn, Provider Provider, Property, Type xproto.Atom, LongOffset, LongLength uint32, Delete, Pending bool) GetProviderPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -4002,7 +3981,7 @@ func GetProviderProperty(c *xgb.Conn, Provider Provider, Property xproto.Atom, T // GetProviderPropertyUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetProviderPropertyUnchecked(c *xgb.Conn, Provider Provider, Property xproto.Atom, Type xproto.Atom, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) GetProviderPropertyCookie { +func GetProviderPropertyUnchecked(c *xgb.Conn, Provider Provider, Property, Type xproto.Atom, LongOffset, LongLength uint32, Delete, Pending bool) GetProviderPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -4069,9 +4048,8 @@ func getProviderPropertyReply(buf []byte) *GetProviderPropertyReply { return v } -// Write request to wire for GetProviderProperty -// getProviderPropertyRequest writes a GetProviderProperty request to a byte slice. -func getProviderPropertyRequest(c *xgb.Conn, Provider Provider, Property xproto.Atom, Type xproto.Atom, LongOffset uint32, LongLength uint32, Delete bool, Pending bool) []byte { +// getProviderPropertyRequest writes a GetProviderProperty request to a byte slice for transfer. +func getProviderPropertyRequest(c *xgb.Conn, Provider Provider, Property, Type xproto.Atom, LongOffset, LongLength uint32, Delete, Pending bool) []byte { size := 28 b := 0 buf := make([]byte, size) @@ -4127,7 +4105,7 @@ type GetProvidersCookie struct { } // GetProviders sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetProvidersCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetProvidersCookie.Reply. func GetProviders(c *xgb.Conn, Window xproto.Window) GetProvidersCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4205,8 +4183,7 @@ func getProvidersReply(buf []byte) *GetProvidersReply { return v } -// Write request to wire for GetProviders -// getProvidersRequest writes a GetProviders request to a byte slice. +// getProvidersRequest writes a GetProviders request to a byte slice for transfer. func getProvidersRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -4235,7 +4212,7 @@ type GetScreenInfoCookie struct { } // GetScreenInfo sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetScreenInfoCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetScreenInfoCookie.Reply. func GetScreenInfo(c *xgb.Conn, Window xproto.Window) GetScreenInfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4339,8 +4316,7 @@ func getScreenInfoReply(buf []byte) *GetScreenInfoReply { return v } -// Write request to wire for GetScreenInfo -// getScreenInfoRequest writes a GetScreenInfo request to a byte slice. +// getScreenInfoRequest writes a GetScreenInfo request to a byte slice for transfer. func getScreenInfoRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -4369,7 +4345,7 @@ type GetScreenResourcesCookie struct { } // GetScreenResources sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetScreenResourcesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetScreenResourcesCookie.Reply. func GetScreenResources(c *xgb.Conn, Window xproto.Window) GetScreenResourcesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4479,8 +4455,7 @@ func getScreenResourcesReply(buf []byte) *GetScreenResourcesReply { return v } -// Write request to wire for GetScreenResources -// getScreenResourcesRequest writes a GetScreenResources request to a byte slice. +// getScreenResourcesRequest writes a GetScreenResources request to a byte slice for transfer. func getScreenResourcesRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -4509,7 +4484,7 @@ type GetScreenResourcesCurrentCookie struct { } // GetScreenResourcesCurrent sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetScreenResourcesCurrentCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetScreenResourcesCurrentCookie.Reply. func GetScreenResourcesCurrent(c *xgb.Conn, Window xproto.Window) GetScreenResourcesCurrentCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4619,8 +4594,7 @@ func getScreenResourcesCurrentReply(buf []byte) *GetScreenResourcesCurrentReply return v } -// Write request to wire for GetScreenResourcesCurrent -// getScreenResourcesCurrentRequest writes a GetScreenResourcesCurrent request to a byte slice. +// getScreenResourcesCurrentRequest writes a GetScreenResourcesCurrent request to a byte slice for transfer. func getScreenResourcesCurrentRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -4649,7 +4623,7 @@ type GetScreenSizeRangeCookie struct { } // GetScreenSizeRange sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetScreenSizeRangeCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetScreenSizeRangeCookie.Reply. func GetScreenSizeRange(c *xgb.Conn, Window xproto.Window) GetScreenSizeRangeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4728,8 +4702,7 @@ func getScreenSizeRangeReply(buf []byte) *GetScreenSizeRangeReply { return v } -// Write request to wire for GetScreenSizeRange -// getScreenSizeRangeRequest writes a GetScreenSizeRange request to a byte slice. +// getScreenSizeRangeRequest writes a GetScreenSizeRange request to a byte slice for transfer. func getScreenSizeRangeRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -4758,7 +4731,7 @@ type ListOutputPropertiesCookie struct { } // ListOutputProperties sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListOutputPropertiesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListOutputPropertiesCookie.Reply. func ListOutputProperties(c *xgb.Conn, Output Output) ListOutputPropertiesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4832,8 +4805,7 @@ func listOutputPropertiesReply(buf []byte) *ListOutputPropertiesReply { return v } -// Write request to wire for ListOutputProperties -// listOutputPropertiesRequest writes a ListOutputProperties request to a byte slice. +// listOutputPropertiesRequest writes a ListOutputProperties request to a byte slice for transfer. func listOutputPropertiesRequest(c *xgb.Conn, Output Output) []byte { size := 8 b := 0 @@ -4862,7 +4834,7 @@ type ListProviderPropertiesCookie struct { } // ListProviderProperties sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListProviderPropertiesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListProviderPropertiesCookie.Reply. func ListProviderProperties(c *xgb.Conn, Provider Provider) ListProviderPropertiesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -4936,8 +4908,7 @@ func listProviderPropertiesReply(buf []byte) *ListProviderPropertiesReply { return v } -// Write request to wire for ListProviderProperties -// listProviderPropertiesRequest writes a ListProviderProperties request to a byte slice. +// listProviderPropertiesRequest writes a ListProviderProperties request to a byte slice for transfer. func listProviderPropertiesRequest(c *xgb.Conn, Provider Provider) []byte { size := 8 b := 0 @@ -4966,7 +4937,7 @@ type QueryOutputPropertyCookie struct { } // QueryOutputProperty sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryOutputPropertyCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryOutputPropertyCookie.Reply. func QueryOutputProperty(c *xgb.Conn, Output Output, Property xproto.Atom) QueryOutputPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -5060,8 +5031,7 @@ func queryOutputPropertyReply(buf []byte) *QueryOutputPropertyReply { return v } -// Write request to wire for QueryOutputProperty -// queryOutputPropertyRequest writes a QueryOutputProperty request to a byte slice. +// queryOutputPropertyRequest writes a QueryOutputProperty request to a byte slice for transfer. func queryOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Atom) []byte { size := 12 b := 0 @@ -5093,7 +5063,7 @@ type QueryProviderPropertyCookie struct { } // QueryProviderProperty sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryProviderPropertyCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryProviderPropertyCookie.Reply. func QueryProviderProperty(c *xgb.Conn, Provider Provider, Property xproto.Atom) QueryProviderPropertyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -5187,8 +5157,7 @@ func queryProviderPropertyReply(buf []byte) *QueryProviderPropertyReply { return v } -// Write request to wire for QueryProviderProperty -// queryProviderPropertyRequest writes a QueryProviderProperty request to a byte slice. +// queryProviderPropertyRequest writes a QueryProviderProperty request to a byte slice for transfer. func queryProviderPropertyRequest(c *xgb.Conn, Provider Provider, Property xproto.Atom) []byte { size := 12 b := 0 @@ -5220,8 +5189,8 @@ 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, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, MajorVersion, MinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -5234,7 +5203,7 @@ func QueryVersion(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) QueryVe // 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, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, MajorVersion, MinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -5291,9 +5260,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, MajorVersion, MinorVersion uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -5337,7 +5305,7 @@ func SelectInput(c *xgb.Conn, Window xproto.Window, Enable uint16) SelectInputCo } // SelectInputChecked sends a checked request. -// If an error occurs, it can be retrieved using SelectInputCookie.Check() +// If an error occurs, it can be retrieved using SelectInputCookie.Check. func SelectInputChecked(c *xgb.Conn, Window xproto.Window, Enable uint16) SelectInputCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -5355,8 +5323,7 @@ func (cook SelectInputCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SelectInput -// selectInputRequest writes a SelectInput request to a byte slice. +// selectInputRequest writes a SelectInput request to a byte slice for transfer. func selectInputRequest(c *xgb.Conn, Window xproto.Window, Enable uint16) []byte { size := 12 b := 0 @@ -5390,8 +5357,8 @@ type SetCrtcConfigCookie struct { } // SetCrtcConfig sends a checked request. -// If an error occurs, it will be returned with the reply by calling SetCrtcConfigCookie.Reply() -func SetCrtcConfig(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, ConfigTimestamp xproto.Timestamp, X int16, Y int16, Mode Mode, Rotation uint16, Outputs []Output) SetCrtcConfigCookie { +// If an error occurs, it will be returned with the reply by calling SetCrtcConfigCookie.Reply. +func SetCrtcConfig(c *xgb.Conn, Crtc Crtc, Timestamp, ConfigTimestamp xproto.Timestamp, X, Y int16, Mode Mode, Rotation uint16, Outputs []Output) SetCrtcConfigCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -5404,7 +5371,7 @@ func SetCrtcConfig(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, ConfigTim // SetCrtcConfigUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetCrtcConfigUnchecked(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, ConfigTimestamp xproto.Timestamp, X int16, Y int16, Mode Mode, Rotation uint16, Outputs []Output) SetCrtcConfigCookie { +func SetCrtcConfigUnchecked(c *xgb.Conn, Crtc Crtc, Timestamp, ConfigTimestamp xproto.Timestamp, X, Y int16, Mode Mode, Rotation uint16, Outputs []Output) SetCrtcConfigCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -5458,9 +5425,8 @@ func setCrtcConfigReply(buf []byte) *SetCrtcConfigReply { return v } -// Write request to wire for SetCrtcConfig -// setCrtcConfigRequest writes a SetCrtcConfig request to a byte slice. -func setCrtcConfigRequest(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, ConfigTimestamp xproto.Timestamp, X int16, Y int16, Mode Mode, Rotation uint16, Outputs []Output) []byte { +// setCrtcConfigRequest writes a SetCrtcConfig request to a byte slice for transfer. +func setCrtcConfigRequest(c *xgb.Conn, Crtc Crtc, Timestamp, ConfigTimestamp xproto.Timestamp, X, Y int16, Mode Mode, Rotation uint16, Outputs []Output) []byte { size := xgb.Pad((28 + xgb.Pad((len(Outputs) * 4)))) b := 0 buf := make([]byte, size) @@ -5514,7 +5480,7 @@ type SetCrtcGammaCookie struct { // SetCrtcGamma sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetCrtcGamma(c *xgb.Conn, Crtc Crtc, Size uint16, Red []uint16, Green []uint16, Blue []uint16) SetCrtcGammaCookie { +func SetCrtcGamma(c *xgb.Conn, Crtc Crtc, Size uint16, Red, Green, Blue []uint16) SetCrtcGammaCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -5526,8 +5492,8 @@ func SetCrtcGamma(c *xgb.Conn, Crtc Crtc, Size uint16, Red []uint16, Green []uin } // SetCrtcGammaChecked sends a checked request. -// If an error occurs, it can be retrieved using SetCrtcGammaCookie.Check() -func SetCrtcGammaChecked(c *xgb.Conn, Crtc Crtc, Size uint16, Red []uint16, Green []uint16, Blue []uint16) SetCrtcGammaCookie { +// If an error occurs, it can be retrieved using SetCrtcGammaCookie.Check. +func SetCrtcGammaChecked(c *xgb.Conn, Crtc Crtc, Size uint16, Red, Green, Blue []uint16) SetCrtcGammaCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -5544,9 +5510,8 @@ func (cook SetCrtcGammaCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetCrtcGamma -// setCrtcGammaRequest writes a SetCrtcGamma request to a byte slice. -func setCrtcGammaRequest(c *xgb.Conn, Crtc Crtc, Size uint16, Red []uint16, Green []uint16, Blue []uint16) []byte { +// setCrtcGammaRequest writes a SetCrtcGamma request to a byte slice for transfer. +func setCrtcGammaRequest(c *xgb.Conn, Crtc Crtc, Size uint16, Red, Green, Blue []uint16) []byte { size := xgb.Pad((((12 + xgb.Pad((int(Size) * 2))) + xgb.Pad((int(Size) * 2))) + xgb.Pad((int(Size) * 2)))) b := 0 buf := make([]byte, size) @@ -5607,7 +5572,7 @@ func SetCrtcTransform(c *xgb.Conn, Crtc Crtc, Transform render.Transform, Filter } // SetCrtcTransformChecked sends a checked request. -// If an error occurs, it can be retrieved using SetCrtcTransformCookie.Check() +// If an error occurs, it can be retrieved using SetCrtcTransformCookie.Check. func SetCrtcTransformChecked(c *xgb.Conn, Crtc Crtc, Transform render.Transform, FilterLen uint16, FilterName string, FilterParams []render.Fixed) SetCrtcTransformCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -5625,8 +5590,7 @@ func (cook SetCrtcTransformCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetCrtcTransform -// setCrtcTransformRequest writes a SetCrtcTransform request to a byte slice. +// setCrtcTransformRequest writes a SetCrtcTransform request to a byte slice for transfer. func setCrtcTransformRequest(c *xgb.Conn, Crtc Crtc, Transform render.Transform, FilterLen uint16, FilterName string, FilterParams []render.Fixed) []byte { size := xgb.Pad((((48 + xgb.Pad((int(FilterLen) * 1))) + 4) + xgb.Pad((len(FilterParams) * 4)))) b := 0 @@ -5691,7 +5655,7 @@ func SetMonitor(c *xgb.Conn, Window xproto.Window, Monitorinfo MonitorInfo) SetM } // SetMonitorChecked sends a checked request. -// If an error occurs, it can be retrieved using SetMonitorCookie.Check() +// If an error occurs, it can be retrieved using SetMonitorCookie.Check. func SetMonitorChecked(c *xgb.Conn, Window xproto.Window, Monitorinfo MonitorInfo) SetMonitorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -5709,8 +5673,7 @@ func (cook SetMonitorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetMonitor -// setMonitorRequest writes a SetMonitor request to a byte slice. +// setMonitorRequest writes a SetMonitor request to a byte slice for transfer. func setMonitorRequest(c *xgb.Conn, Window xproto.Window, Monitorinfo MonitorInfo) []byte { size := xgb.Pad((8 + (24 + xgb.Pad((int(Monitorinfo.NOutput) * 4))))) b := 0 @@ -5758,7 +5721,7 @@ func SetOutputPrimary(c *xgb.Conn, Window xproto.Window, Output Output) SetOutpu } // SetOutputPrimaryChecked sends a checked request. -// If an error occurs, it can be retrieved using SetOutputPrimaryCookie.Check() +// If an error occurs, it can be retrieved using SetOutputPrimaryCookie.Check. func SetOutputPrimaryChecked(c *xgb.Conn, Window xproto.Window, Output Output) SetOutputPrimaryCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -5776,8 +5739,7 @@ func (cook SetOutputPrimaryCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetOutputPrimary -// setOutputPrimaryRequest writes a SetOutputPrimary request to a byte slice. +// setOutputPrimaryRequest writes a SetOutputPrimary request to a byte slice for transfer. func setOutputPrimaryRequest(c *xgb.Conn, Window xproto.Window, Output Output) []byte { size := 12 b := 0 @@ -5809,8 +5771,8 @@ type SetPanningCookie struct { } // SetPanning sends a checked request. -// If an error occurs, it will be returned with the reply by calling SetPanningCookie.Reply() -func SetPanning(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, Left uint16, Top uint16, Width uint16, Height uint16, TrackLeft uint16, TrackTop uint16, TrackWidth uint16, TrackHeight uint16, BorderLeft int16, BorderTop int16, BorderRight int16, BorderBottom int16) SetPanningCookie { +// If an error occurs, it will be returned with the reply by calling SetPanningCookie.Reply. +func SetPanning(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, Left, Top, Width, Height, TrackLeft, TrackTop, TrackWidth, TrackHeight uint16, BorderLeft, BorderTop, BorderRight, BorderBottom int16) SetPanningCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -5823,7 +5785,7 @@ func SetPanning(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, Left uint16, // SetPanningUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetPanningUnchecked(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, Left uint16, Top uint16, Width uint16, Height uint16, TrackLeft uint16, TrackTop uint16, TrackWidth uint16, TrackHeight uint16, BorderLeft int16, BorderTop int16, BorderRight int16, BorderBottom int16) SetPanningCookie { +func SetPanningUnchecked(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, Left, Top, Width, Height, TrackLeft, TrackTop, TrackWidth, TrackHeight uint16, BorderLeft, BorderTop, BorderRight, BorderBottom int16) SetPanningCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -5874,9 +5836,8 @@ func setPanningReply(buf []byte) *SetPanningReply { return v } -// Write request to wire for SetPanning -// setPanningRequest writes a SetPanning request to a byte slice. -func setPanningRequest(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, Left uint16, Top uint16, Width uint16, Height uint16, TrackLeft uint16, TrackTop uint16, TrackWidth uint16, TrackHeight uint16, BorderLeft int16, BorderTop int16, BorderRight int16, BorderBottom int16) []byte { +// setPanningRequest writes a SetPanning request to a byte slice for transfer. +func setPanningRequest(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, Left, Top, Width, Height, TrackLeft, TrackTop, TrackWidth, TrackHeight uint16, BorderLeft, BorderTop, BorderRight, BorderBottom int16) []byte { size := 36 b := 0 buf := make([]byte, size) @@ -5944,7 +5905,7 @@ type SetProviderOffloadSinkCookie struct { // SetProviderOffloadSink sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetProviderOffloadSink(c *xgb.Conn, Provider Provider, SinkProvider Provider, ConfigTimestamp xproto.Timestamp) SetProviderOffloadSinkCookie { +func SetProviderOffloadSink(c *xgb.Conn, Provider, SinkProvider Provider, ConfigTimestamp xproto.Timestamp) SetProviderOffloadSinkCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -5956,8 +5917,8 @@ func SetProviderOffloadSink(c *xgb.Conn, Provider Provider, SinkProvider Provide } // SetProviderOffloadSinkChecked sends a checked request. -// If an error occurs, it can be retrieved using SetProviderOffloadSinkCookie.Check() -func SetProviderOffloadSinkChecked(c *xgb.Conn, Provider Provider, SinkProvider Provider, ConfigTimestamp xproto.Timestamp) SetProviderOffloadSinkCookie { +// If an error occurs, it can be retrieved using SetProviderOffloadSinkCookie.Check. +func SetProviderOffloadSinkChecked(c *xgb.Conn, Provider, SinkProvider Provider, ConfigTimestamp xproto.Timestamp) SetProviderOffloadSinkCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -5974,9 +5935,8 @@ func (cook SetProviderOffloadSinkCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetProviderOffloadSink -// setProviderOffloadSinkRequest writes a SetProviderOffloadSink request to a byte slice. -func setProviderOffloadSinkRequest(c *xgb.Conn, Provider Provider, SinkProvider Provider, ConfigTimestamp xproto.Timestamp) []byte { +// setProviderOffloadSinkRequest writes a SetProviderOffloadSink request to a byte slice for transfer. +func setProviderOffloadSinkRequest(c *xgb.Conn, Provider, SinkProvider Provider, ConfigTimestamp xproto.Timestamp) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -6011,7 +5971,7 @@ type SetProviderOutputSourceCookie struct { // SetProviderOutputSource sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetProviderOutputSource(c *xgb.Conn, Provider Provider, SourceProvider Provider, ConfigTimestamp xproto.Timestamp) SetProviderOutputSourceCookie { +func SetProviderOutputSource(c *xgb.Conn, Provider, SourceProvider Provider, ConfigTimestamp xproto.Timestamp) SetProviderOutputSourceCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -6023,8 +5983,8 @@ func SetProviderOutputSource(c *xgb.Conn, Provider Provider, SourceProvider Prov } // SetProviderOutputSourceChecked sends a checked request. -// If an error occurs, it can be retrieved using SetProviderOutputSourceCookie.Check() -func SetProviderOutputSourceChecked(c *xgb.Conn, Provider Provider, SourceProvider Provider, ConfigTimestamp xproto.Timestamp) SetProviderOutputSourceCookie { +// If an error occurs, it can be retrieved using SetProviderOutputSourceCookie.Check. +func SetProviderOutputSourceChecked(c *xgb.Conn, Provider, SourceProvider Provider, ConfigTimestamp xproto.Timestamp) SetProviderOutputSourceCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -6041,9 +6001,8 @@ func (cook SetProviderOutputSourceCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetProviderOutputSource -// setProviderOutputSourceRequest writes a SetProviderOutputSource request to a byte slice. -func setProviderOutputSourceRequest(c *xgb.Conn, Provider Provider, SourceProvider Provider, ConfigTimestamp xproto.Timestamp) []byte { +// setProviderOutputSourceRequest writes a SetProviderOutputSource request to a byte slice for transfer. +func setProviderOutputSourceRequest(c *xgb.Conn, Provider, SourceProvider Provider, ConfigTimestamp xproto.Timestamp) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -6077,8 +6036,8 @@ type SetScreenConfigCookie struct { } // SetScreenConfig sends a checked request. -// If an error occurs, it will be returned with the reply by calling SetScreenConfigCookie.Reply() -func SetScreenConfig(c *xgb.Conn, Window xproto.Window, Timestamp xproto.Timestamp, ConfigTimestamp xproto.Timestamp, SizeID uint16, Rotation uint16, Rate uint16) SetScreenConfigCookie { +// If an error occurs, it will be returned with the reply by calling SetScreenConfigCookie.Reply. +func SetScreenConfig(c *xgb.Conn, Window xproto.Window, Timestamp, ConfigTimestamp xproto.Timestamp, SizeID, Rotation, Rate uint16) SetScreenConfigCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -6091,7 +6050,7 @@ func SetScreenConfig(c *xgb.Conn, Window xproto.Window, Timestamp xproto.Timesta // SetScreenConfigUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetScreenConfigUnchecked(c *xgb.Conn, Window xproto.Window, Timestamp xproto.Timestamp, ConfigTimestamp xproto.Timestamp, SizeID uint16, Rotation uint16, Rate uint16) SetScreenConfigCookie { +func SetScreenConfigUnchecked(c *xgb.Conn, Window xproto.Window, Timestamp, ConfigTimestamp xproto.Timestamp, SizeID, Rotation, Rate uint16) SetScreenConfigCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -6157,9 +6116,8 @@ func setScreenConfigReply(buf []byte) *SetScreenConfigReply { return v } -// Write request to wire for SetScreenConfig -// setScreenConfigRequest writes a SetScreenConfig request to a byte slice. -func setScreenConfigRequest(c *xgb.Conn, Window xproto.Window, Timestamp xproto.Timestamp, ConfigTimestamp xproto.Timestamp, SizeID uint16, Rotation uint16, Rate uint16) []byte { +// setScreenConfigRequest writes a SetScreenConfig request to a byte slice for transfer. +func setScreenConfigRequest(c *xgb.Conn, Window xproto.Window, Timestamp, ConfigTimestamp xproto.Timestamp, SizeID, Rotation, Rate uint16) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -6205,7 +6163,7 @@ type SetScreenSizeCookie struct { // SetScreenSize sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetScreenSize(c *xgb.Conn, Window xproto.Window, Width uint16, Height uint16, MmWidth uint32, MmHeight uint32) SetScreenSizeCookie { +func SetScreenSize(c *xgb.Conn, Window xproto.Window, Width, Height uint16, MmWidth, MmHeight uint32) SetScreenSizeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -6217,8 +6175,8 @@ func SetScreenSize(c *xgb.Conn, Window xproto.Window, Width uint16, Height uint1 } // SetScreenSizeChecked sends a checked request. -// If an error occurs, it can be retrieved using SetScreenSizeCookie.Check() -func SetScreenSizeChecked(c *xgb.Conn, Window xproto.Window, Width uint16, Height uint16, MmWidth uint32, MmHeight uint32) SetScreenSizeCookie { +// If an error occurs, it can be retrieved using SetScreenSizeCookie.Check. +func SetScreenSizeChecked(c *xgb.Conn, Window xproto.Window, Width, Height uint16, MmWidth, MmHeight uint32) SetScreenSizeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RANDR"]; !ok { @@ -6235,9 +6193,8 @@ func (cook SetScreenSizeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetScreenSize -// setScreenSizeRequest writes a SetScreenSize request to a byte slice. -func setScreenSizeRequest(c *xgb.Conn, Window xproto.Window, Width uint16, Height uint16, MmWidth uint32, MmHeight uint32) []byte { +// setScreenSizeRequest writes a SetScreenSize request to a byte slice for transfer. +func setScreenSizeRequest(c *xgb.Conn, Window xproto.Window, Width, Height uint16, MmWidth, MmHeight uint32) []byte { size := 20 b := 0 buf := make([]byte, size) diff --git a/nexgb/record/record.go b/nexgb/record/record.go index c981bdd..2c34408 100644 --- a/nexgb/record/record.go +++ b/nexgb/record/record.go @@ -526,7 +526,7 @@ type CreateContextCookie struct { // CreateContext sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateContext(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) CreateContextCookie { +func CreateContext(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) CreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RECORD"]; !ok { @@ -538,8 +538,8 @@ func CreateContext(c *xgb.Conn, Context Context, ElementHeader ElementHeader, Nu } // CreateContextChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateContextCookie.Check() -func CreateContextChecked(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) CreateContextCookie { +// If an error occurs, it can be retrieved using CreateContextCookie.Check. +func CreateContextChecked(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) CreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RECORD"]; !ok { @@ -556,9 +556,8 @@ func (cook CreateContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateContext -// createContextRequest writes a CreateContext request to a byte slice. -func createContextRequest(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) []byte { +// createContextRequest writes a CreateContext request to a byte slice for transfer. +func createContextRequest(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) []byte { size := xgb.Pad(((20 + xgb.Pad((int(NumClientSpecs) * 4))) + xgb.Pad((int(NumRanges) * 24)))) b := 0 buf := make([]byte, size) @@ -617,7 +616,7 @@ func DisableContext(c *xgb.Conn, Context Context) DisableContextCookie { } // DisableContextChecked sends a checked request. -// If an error occurs, it can be retrieved using DisableContextCookie.Check() +// If an error occurs, it can be retrieved using DisableContextCookie.Check. func DisableContextChecked(c *xgb.Conn, Context Context) DisableContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -635,8 +634,7 @@ func (cook DisableContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DisableContext -// disableContextRequest writes a DisableContext request to a byte slice. +// disableContextRequest writes a DisableContext request to a byte slice for transfer. func disableContextRequest(c *xgb.Conn, Context Context) []byte { size := 8 b := 0 @@ -665,7 +663,7 @@ type EnableContextCookie struct { } // EnableContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling EnableContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling EnableContextCookie.Reply. func EnableContext(c *xgb.Conn, Context Context) EnableContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -761,8 +759,7 @@ func enableContextReply(buf []byte) *EnableContextReply { return v } -// Write request to wire for EnableContext -// enableContextRequest writes a EnableContext request to a byte slice. +// enableContextRequest writes a EnableContext request to a byte slice for transfer. func enableContextRequest(c *xgb.Conn, Context Context) []byte { size := 8 b := 0 @@ -804,7 +801,7 @@ func FreeContext(c *xgb.Conn, Context Context) FreeContextCookie { } // FreeContextChecked sends a checked request. -// If an error occurs, it can be retrieved using FreeContextCookie.Check() +// If an error occurs, it can be retrieved using FreeContextCookie.Check. func FreeContextChecked(c *xgb.Conn, Context Context) FreeContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -822,8 +819,7 @@ func (cook FreeContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FreeContext -// freeContextRequest writes a FreeContext request to a byte slice. +// freeContextRequest writes a FreeContext request to a byte slice for transfer. func freeContextRequest(c *xgb.Conn, Context Context) []byte { size := 8 b := 0 @@ -852,7 +848,7 @@ type GetContextCookie struct { } // GetContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetContextCookie.Reply. func GetContext(c *xgb.Conn, Context Context) GetContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -935,8 +931,7 @@ func getContextReply(buf []byte) *GetContextReply { return v } -// Write request to wire for GetContext -// getContextRequest writes a GetContext request to a byte slice. +// getContextRequest writes a GetContext request to a byte slice for transfer. func getContextRequest(c *xgb.Conn, Context Context) []byte { size := 8 b := 0 @@ -965,8 +960,8 @@ 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, MajorVersion uint16, MinorVersion uint16) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, MajorVersion, MinorVersion uint16) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RECORD"]; !ok { @@ -979,7 +974,7 @@ func QueryVersion(c *xgb.Conn, MajorVersion uint16, MinorVersion uint16) QueryVe // 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, MajorVersion uint16, MinorVersion uint16) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, MajorVersion, MinorVersion uint16) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RECORD"]; !ok { @@ -1033,9 +1028,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, MajorVersion uint16, MinorVersion uint16) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, MajorVersion, MinorVersion uint16) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -1067,7 +1061,7 @@ type RegisterClientsCookie struct { // RegisterClients sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func RegisterClients(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) RegisterClientsCookie { +func RegisterClients(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) RegisterClientsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RECORD"]; !ok { @@ -1079,8 +1073,8 @@ func RegisterClients(c *xgb.Conn, Context Context, ElementHeader ElementHeader, } // RegisterClientsChecked sends a checked request. -// If an error occurs, it can be retrieved using RegisterClientsCookie.Check() -func RegisterClientsChecked(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) RegisterClientsCookie { +// If an error occurs, it can be retrieved using RegisterClientsCookie.Check. +func RegisterClientsChecked(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) RegisterClientsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RECORD"]; !ok { @@ -1097,9 +1091,8 @@ func (cook RegisterClientsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for RegisterClients -// registerClientsRequest writes a RegisterClients request to a byte slice. -func registerClientsRequest(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) []byte { +// registerClientsRequest writes a RegisterClients request to a byte slice for transfer. +func registerClientsRequest(c *xgb.Conn, Context Context, ElementHeader ElementHeader, NumClientSpecs, NumRanges uint32, ClientSpecs []ClientSpec, Ranges []Range) []byte { size := xgb.Pad(((20 + xgb.Pad((int(NumClientSpecs) * 4))) + xgb.Pad((int(NumRanges) * 24)))) b := 0 buf := make([]byte, size) @@ -1158,7 +1151,7 @@ func UnregisterClients(c *xgb.Conn, Context Context, NumClientSpecs uint32, Clie } // UnregisterClientsChecked sends a checked request. -// If an error occurs, it can be retrieved using UnregisterClientsCookie.Check() +// If an error occurs, it can be retrieved using UnregisterClientsCookie.Check. func UnregisterClientsChecked(c *xgb.Conn, Context Context, NumClientSpecs uint32, ClientSpecs []ClientSpec) UnregisterClientsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1176,8 +1169,7 @@ func (cook UnregisterClientsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UnregisterClients -// unregisterClientsRequest writes a UnregisterClients request to a byte slice. +// unregisterClientsRequest writes a UnregisterClients request to a byte slice for transfer. func unregisterClientsRequest(c *xgb.Conn, Context Context, NumClientSpecs uint32, ClientSpecs []ClientSpec) []byte { size := xgb.Pad((12 + xgb.Pad((int(NumClientSpecs) * 4)))) b := 0 diff --git a/nexgb/render/render.go b/nexgb/render/render.go index 458869d..66412ef 100644 --- a/nexgb/render/render.go +++ b/nexgb/render/render.go @@ -1597,7 +1597,7 @@ func AddGlyphs(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids []uint } // AddGlyphsChecked sends a checked request. -// If an error occurs, it can be retrieved using AddGlyphsCookie.Check() +// If an error occurs, it can be retrieved using AddGlyphsCookie.Check. func AddGlyphsChecked(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids []uint32, Glyphs []Glyphinfo, Data []byte) AddGlyphsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1615,8 +1615,7 @@ func (cook AddGlyphsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for AddGlyphs -// addGlyphsRequest writes a AddGlyphs request to a byte slice. +// addGlyphsRequest writes a AddGlyphs request to a byte slice for transfer. func addGlyphsRequest(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids []uint32, Glyphs []Glyphinfo, Data []byte) []byte { size := xgb.Pad((((12 + xgb.Pad((int(GlyphsLen) * 4))) + xgb.Pad((int(GlyphsLen) * 12))) + xgb.Pad((len(Data) * 1)))) b := 0 @@ -1659,7 +1658,7 @@ type AddTrapsCookie struct { // AddTraps sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func AddTraps(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps []Trap) AddTrapsCookie { +func AddTraps(c *xgb.Conn, Picture Picture, XOff, YOff int16, Traps []Trap) AddTrapsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -1671,8 +1670,8 @@ func AddTraps(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps []Trap } // AddTrapsChecked sends a checked request. -// If an error occurs, it can be retrieved using AddTrapsCookie.Check() -func AddTrapsChecked(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps []Trap) AddTrapsCookie { +// If an error occurs, it can be retrieved using AddTrapsCookie.Check. +func AddTrapsChecked(c *xgb.Conn, Picture Picture, XOff, YOff int16, Traps []Trap) AddTrapsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -1689,9 +1688,8 @@ func (cook AddTrapsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for AddTraps -// addTrapsRequest writes a AddTraps request to a byte slice. -func addTrapsRequest(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps []Trap) []byte { +// addTrapsRequest writes a AddTraps request to a byte slice for transfer. +func addTrapsRequest(c *xgb.Conn, Picture Picture, XOff, YOff int16, Traps []Trap) []byte { size := xgb.Pad((12 + xgb.Pad((len(Traps) * 24)))) b := 0 buf := make([]byte, size) @@ -1740,7 +1738,7 @@ func ChangePicture(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []u } // ChangePictureChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangePictureCookie.Check() +// If an error occurs, it can be retrieved using ChangePictureCookie.Check. func ChangePictureChecked(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []uint32) ChangePictureCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1758,8 +1756,7 @@ func (cook ChangePictureCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangePicture -// changePictureRequest writes a ChangePicture request to a byte slice. +// changePictureRequest writes a ChangePicture request to a byte slice for transfer. func changePictureRequest(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []uint32) []byte { size := xgb.Pad((12 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))) b := 0 @@ -1798,7 +1795,7 @@ type CompositeCookie struct { // Composite sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func Composite(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Picture, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) CompositeCookie { +func Composite(c *xgb.Conn, Op byte, Src, Mask, Dst Picture, SrcX, SrcY, MaskX, MaskY, DstX, DstY int16, Width, Height uint16) CompositeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -1810,8 +1807,8 @@ func Composite(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Picture, Src } // CompositeChecked sends a checked request. -// If an error occurs, it can be retrieved using CompositeCookie.Check() -func CompositeChecked(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Picture, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) CompositeCookie { +// If an error occurs, it can be retrieved using CompositeCookie.Check. +func CompositeChecked(c *xgb.Conn, Op byte, Src, Mask, Dst Picture, SrcX, SrcY, MaskX, MaskY, DstX, DstY int16, Width, Height uint16) CompositeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -1828,9 +1825,8 @@ func (cook CompositeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Composite -// compositeRequest writes a Composite request to a byte slice. -func compositeRequest(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Picture, SrcX int16, SrcY int16, MaskX int16, MaskY int16, DstX int16, DstY int16, Width uint16, Height uint16) []byte { +// compositeRequest writes a Composite request to a byte slice for transfer. +func compositeRequest(c *xgb.Conn, Op byte, Src, Mask, Dst Picture, SrcX, SrcY, MaskX, MaskY, DstX, DstY int16, Width, Height uint16) []byte { size := 36 b := 0 buf := make([]byte, size) @@ -1894,7 +1890,7 @@ type CompositeGlyphs16Cookie struct { // CompositeGlyphs16 sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CompositeGlyphs16(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs16Cookie { +func CompositeGlyphs16(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX, SrcY int16, Glyphcmds []byte) CompositeGlyphs16Cookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -1906,8 +1902,8 @@ func CompositeGlyphs16(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskForma } // CompositeGlyphs16Checked sends a checked request. -// If an error occurs, it can be retrieved using CompositeGlyphs16Cookie.Check() -func CompositeGlyphs16Checked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs16Cookie { +// If an error occurs, it can be retrieved using CompositeGlyphs16Cookie.Check. +func CompositeGlyphs16Checked(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX, SrcY int16, Glyphcmds []byte) CompositeGlyphs16Cookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -1924,9 +1920,8 @@ func (cook CompositeGlyphs16Cookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CompositeGlyphs16 -// compositeGlyphs16Request writes a CompositeGlyphs16 request to a byte slice. -func compositeGlyphs16Request(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) []byte { +// compositeGlyphs16Request writes a CompositeGlyphs16 request to a byte slice for transfer. +func compositeGlyphs16Request(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX, SrcY int16, Glyphcmds []byte) []byte { size := xgb.Pad((28 + xgb.Pad((len(Glyphcmds) * 1)))) b := 0 buf := make([]byte, size) @@ -1978,7 +1973,7 @@ type CompositeGlyphs32Cookie struct { // CompositeGlyphs32 sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CompositeGlyphs32(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs32Cookie { +func CompositeGlyphs32(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX, SrcY int16, Glyphcmds []byte) CompositeGlyphs32Cookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -1990,8 +1985,8 @@ func CompositeGlyphs32(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskForma } // CompositeGlyphs32Checked sends a checked request. -// If an error occurs, it can be retrieved using CompositeGlyphs32Cookie.Check() -func CompositeGlyphs32Checked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs32Cookie { +// If an error occurs, it can be retrieved using CompositeGlyphs32Cookie.Check. +func CompositeGlyphs32Checked(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX, SrcY int16, Glyphcmds []byte) CompositeGlyphs32Cookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -2008,9 +2003,8 @@ func (cook CompositeGlyphs32Cookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CompositeGlyphs32 -// compositeGlyphs32Request writes a CompositeGlyphs32 request to a byte slice. -func compositeGlyphs32Request(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) []byte { +// compositeGlyphs32Request writes a CompositeGlyphs32 request to a byte slice for transfer. +func compositeGlyphs32Request(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX, SrcY int16, Glyphcmds []byte) []byte { size := xgb.Pad((28 + xgb.Pad((len(Glyphcmds) * 1)))) b := 0 buf := make([]byte, size) @@ -2062,7 +2056,7 @@ type CompositeGlyphs8Cookie struct { // CompositeGlyphs8 sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CompositeGlyphs8(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs8Cookie { +func CompositeGlyphs8(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX, SrcY int16, Glyphcmds []byte) CompositeGlyphs8Cookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -2074,8 +2068,8 @@ func CompositeGlyphs8(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat } // CompositeGlyphs8Checked sends a checked request. -// If an error occurs, it can be retrieved using CompositeGlyphs8Cookie.Check() -func CompositeGlyphs8Checked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) CompositeGlyphs8Cookie { +// If an error occurs, it can be retrieved using CompositeGlyphs8Cookie.Check. +func CompositeGlyphs8Checked(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX, SrcY int16, Glyphcmds []byte) CompositeGlyphs8Cookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -2092,9 +2086,8 @@ func (cook CompositeGlyphs8Cookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CompositeGlyphs8 -// compositeGlyphs8Request writes a CompositeGlyphs8 request to a byte slice. -func compositeGlyphs8Request(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX int16, SrcY int16, Glyphcmds []byte) []byte { +// compositeGlyphs8Request writes a CompositeGlyphs8 request to a byte slice for transfer. +func compositeGlyphs8Request(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, Glyphset Glyphset, SrcX, SrcY int16, Glyphcmds []byte) []byte { size := xgb.Pad((28 + xgb.Pad((len(Glyphcmds) * 1)))) b := 0 buf := make([]byte, size) @@ -2158,7 +2151,7 @@ func CreateAnimCursor(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) C } // CreateAnimCursorChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateAnimCursorCookie.Check() +// If an error occurs, it can be retrieved using CreateAnimCursorCookie.Check. func CreateAnimCursorChecked(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) CreateAnimCursorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2176,8 +2169,7 @@ func (cook CreateAnimCursorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateAnimCursor -// createAnimCursorRequest writes a CreateAnimCursor request to a byte slice. +// createAnimCursorRequest writes a CreateAnimCursor request to a byte slice for transfer. func createAnimCursorRequest(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) []byte { size := xgb.Pad((8 + xgb.Pad((len(Cursors) * 8)))) b := 0 @@ -2221,7 +2213,7 @@ func CreateConicalGradient(c *xgb.Conn, Picture Picture, Center Pointfix, Angle } // CreateConicalGradientChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateConicalGradientCookie.Check() +// If an error occurs, it can be retrieved using CreateConicalGradientCookie.Check. func CreateConicalGradientChecked(c *xgb.Conn, Picture Picture, Center Pointfix, Angle Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateConicalGradientCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2239,8 +2231,7 @@ func (cook CreateConicalGradientCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateConicalGradient -// createConicalGradientRequest writes a CreateConicalGradient request to a byte slice. +// createConicalGradientRequest writes a CreateConicalGradient request to a byte slice for transfer. func createConicalGradientRequest(c *xgb.Conn, Picture Picture, Center Pointfix, Angle Fixed, NumStops uint32, Stops []Fixed, Colors []Color) []byte { size := xgb.Pad(((24 + xgb.Pad((int(NumStops) * 4))) + xgb.Pad((int(NumStops) * 8)))) b := 0 @@ -2289,7 +2280,7 @@ type CreateCursorCookie struct { // CreateCursor sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateCursor(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint16, Y uint16) CreateCursorCookie { +func CreateCursor(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X, Y uint16) CreateCursorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -2301,8 +2292,8 @@ func CreateCursor(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint16, Y ui } // CreateCursorChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateCursorCookie.Check() -func CreateCursorChecked(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint16, Y uint16) CreateCursorCookie { +// If an error occurs, it can be retrieved using CreateCursorCookie.Check. +func CreateCursorChecked(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X, Y uint16) CreateCursorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -2319,9 +2310,8 @@ func (cook CreateCursorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateCursor -// createCursorRequest writes a CreateCursor request to a byte slice. -func createCursorRequest(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint16, Y uint16) []byte { +// createCursorRequest writes a CreateCursor request to a byte slice for transfer. +func createCursorRequest(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X, Y uint16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -2371,7 +2361,7 @@ func CreateGlyphSet(c *xgb.Conn, Gsid Glyphset, Format Pictformat) CreateGlyphSe } // CreateGlyphSetChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateGlyphSetCookie.Check() +// If an error occurs, it can be retrieved using CreateGlyphSetCookie.Check. func CreateGlyphSetChecked(c *xgb.Conn, Gsid Glyphset, Format Pictformat) CreateGlyphSetCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2389,8 +2379,7 @@ func (cook CreateGlyphSetCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateGlyphSet -// createGlyphSetRequest writes a CreateGlyphSet request to a byte slice. +// createGlyphSetRequest writes a CreateGlyphSet request to a byte slice for transfer. func createGlyphSetRequest(c *xgb.Conn, Gsid Glyphset, Format Pictformat) []byte { size := 12 b := 0 @@ -2423,7 +2412,7 @@ type CreateLinearGradientCookie struct { // CreateLinearGradient sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateLinearGradient(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 Pointfix, NumStops uint32, Stops []Fixed, Colors []Color) CreateLinearGradientCookie { +func CreateLinearGradient(c *xgb.Conn, Picture Picture, P1, P2 Pointfix, NumStops uint32, Stops []Fixed, Colors []Color) CreateLinearGradientCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -2435,8 +2424,8 @@ func CreateLinearGradient(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 Pointfix } // CreateLinearGradientChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateLinearGradientCookie.Check() -func CreateLinearGradientChecked(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 Pointfix, NumStops uint32, Stops []Fixed, Colors []Color) CreateLinearGradientCookie { +// If an error occurs, it can be retrieved using CreateLinearGradientCookie.Check. +func CreateLinearGradientChecked(c *xgb.Conn, Picture Picture, P1, P2 Pointfix, NumStops uint32, Stops []Fixed, Colors []Color) CreateLinearGradientCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -2453,9 +2442,8 @@ func (cook CreateLinearGradientCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateLinearGradient -// createLinearGradientRequest writes a CreateLinearGradient request to a byte slice. -func createLinearGradientRequest(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 Pointfix, NumStops uint32, Stops []Fixed, Colors []Color) []byte { +// createLinearGradientRequest writes a CreateLinearGradient request to a byte slice for transfer. +func createLinearGradientRequest(c *xgb.Conn, Picture Picture, P1, P2 Pointfix, NumStops uint32, Stops []Fixed, Colors []Color) []byte { size := xgb.Pad(((28 + xgb.Pad((int(NumStops) * 4))) + xgb.Pad((int(NumStops) * 8)))) b := 0 buf := make([]byte, size) @@ -2518,7 +2506,7 @@ func CreatePicture(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Format Pi } // CreatePictureChecked sends a checked request. -// If an error occurs, it can be retrieved using CreatePictureCookie.Check() +// If an error occurs, it can be retrieved using CreatePictureCookie.Check. func CreatePictureChecked(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Format Pictformat, ValueMask uint32, ValueList []uint32) CreatePictureCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2536,8 +2524,7 @@ func (cook CreatePictureCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreatePicture -// createPictureRequest writes a CreatePicture request to a byte slice. +// createPictureRequest writes a CreatePicture request to a byte slice for transfer. func createPictureRequest(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Format Pictformat, ValueMask uint32, ValueList []uint32) []byte { size := xgb.Pad((20 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))) b := 0 @@ -2582,7 +2569,7 @@ type CreateRadialGradientCookie struct { // CreateRadialGradient sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateRadialGradient(c *xgb.Conn, Picture Picture, Inner Pointfix, Outer Pointfix, InnerRadius Fixed, OuterRadius Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateRadialGradientCookie { +func CreateRadialGradient(c *xgb.Conn, Picture Picture, Inner, Outer Pointfix, InnerRadius, OuterRadius Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateRadialGradientCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -2594,8 +2581,8 @@ func CreateRadialGradient(c *xgb.Conn, Picture Picture, Inner Pointfix, Outer Po } // CreateRadialGradientChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateRadialGradientCookie.Check() -func CreateRadialGradientChecked(c *xgb.Conn, Picture Picture, Inner Pointfix, Outer Pointfix, InnerRadius Fixed, OuterRadius Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateRadialGradientCookie { +// If an error occurs, it can be retrieved using CreateRadialGradientCookie.Check. +func CreateRadialGradientChecked(c *xgb.Conn, Picture Picture, Inner, Outer Pointfix, InnerRadius, OuterRadius Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateRadialGradientCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -2612,9 +2599,8 @@ func (cook CreateRadialGradientCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateRadialGradient -// createRadialGradientRequest writes a CreateRadialGradient request to a byte slice. -func createRadialGradientRequest(c *xgb.Conn, Picture Picture, Inner Pointfix, Outer Pointfix, InnerRadius Fixed, OuterRadius Fixed, NumStops uint32, Stops []Fixed, Colors []Color) []byte { +// createRadialGradientRequest writes a CreateRadialGradient request to a byte slice for transfer. +func createRadialGradientRequest(c *xgb.Conn, Picture Picture, Inner, Outer Pointfix, InnerRadius, OuterRadius Fixed, NumStops uint32, Stops []Fixed, Colors []Color) []byte { size := xgb.Pad(((36 + xgb.Pad((int(NumStops) * 4))) + xgb.Pad((int(NumStops) * 8)))) b := 0 buf := make([]byte, size) @@ -2683,7 +2669,7 @@ func CreateSolidFill(c *xgb.Conn, Picture Picture, Color Color) CreateSolidFillC } // CreateSolidFillChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateSolidFillCookie.Check() +// If an error occurs, it can be retrieved using CreateSolidFillCookie.Check. func CreateSolidFillChecked(c *xgb.Conn, Picture Picture, Color Color) CreateSolidFillCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2701,8 +2687,7 @@ func (cook CreateSolidFillCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateSolidFill -// createSolidFillRequest writes a CreateSolidFill request to a byte slice. +// createSolidFillRequest writes a CreateSolidFill request to a byte slice for transfer. func createSolidFillRequest(c *xgb.Conn, Picture Picture, Color Color) []byte { size := 16 b := 0 @@ -2750,7 +2735,7 @@ func FillRectangles(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects []xpro } // FillRectanglesChecked sends a checked request. -// If an error occurs, it can be retrieved using FillRectanglesCookie.Check() +// If an error occurs, it can be retrieved using FillRectanglesCookie.Check. func FillRectanglesChecked(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects []xproto.Rectangle) FillRectanglesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2768,8 +2753,7 @@ func (cook FillRectanglesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FillRectangles -// fillRectanglesRequest writes a FillRectangles request to a byte slice. +// fillRectanglesRequest writes a FillRectangles request to a byte slice for transfer. func fillRectanglesRequest(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects []xproto.Rectangle) []byte { size := xgb.Pad((20 + xgb.Pad((len(Rects) * 8)))) b := 0 @@ -2824,7 +2808,7 @@ func FreeGlyphSet(c *xgb.Conn, Glyphset Glyphset) FreeGlyphSetCookie { } // FreeGlyphSetChecked sends a checked request. -// If an error occurs, it can be retrieved using FreeGlyphSetCookie.Check() +// If an error occurs, it can be retrieved using FreeGlyphSetCookie.Check. func FreeGlyphSetChecked(c *xgb.Conn, Glyphset Glyphset) FreeGlyphSetCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2842,8 +2826,7 @@ func (cook FreeGlyphSetCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FreeGlyphSet -// freeGlyphSetRequest writes a FreeGlyphSet request to a byte slice. +// freeGlyphSetRequest writes a FreeGlyphSet request to a byte slice for transfer. func freeGlyphSetRequest(c *xgb.Conn, Glyphset Glyphset) []byte { size := 8 b := 0 @@ -2885,7 +2868,7 @@ func FreeGlyphs(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) FreeGlyphsCookie } // FreeGlyphsChecked sends a checked request. -// If an error occurs, it can be retrieved using FreeGlyphsCookie.Check() +// If an error occurs, it can be retrieved using FreeGlyphsCookie.Check. func FreeGlyphsChecked(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) FreeGlyphsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2903,8 +2886,7 @@ func (cook FreeGlyphsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FreeGlyphs -// freeGlyphsRequest writes a FreeGlyphs request to a byte slice. +// freeGlyphsRequest writes a FreeGlyphs request to a byte slice for transfer. func freeGlyphsRequest(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) []byte { size := xgb.Pad((8 + xgb.Pad((len(Glyphs) * 4)))) b := 0 @@ -2951,7 +2933,7 @@ func FreePicture(c *xgb.Conn, Picture Picture) FreePictureCookie { } // FreePictureChecked sends a checked request. -// If an error occurs, it can be retrieved using FreePictureCookie.Check() +// If an error occurs, it can be retrieved using FreePictureCookie.Check. func FreePictureChecked(c *xgb.Conn, Picture Picture) FreePictureCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2969,8 +2951,7 @@ func (cook FreePictureCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FreePicture -// freePictureRequest writes a FreePicture request to a byte slice. +// freePictureRequest writes a FreePicture request to a byte slice for transfer. func freePictureRequest(c *xgb.Conn, Picture Picture) []byte { size := 8 b := 0 @@ -2999,7 +2980,7 @@ type QueryFiltersCookie struct { } // QueryFilters sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryFiltersCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryFiltersCookie.Reply. func QueryFilters(c *xgb.Conn, Drawable xproto.Drawable) QueryFiltersCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3081,8 +3062,7 @@ func queryFiltersReply(buf []byte) *QueryFiltersReply { return v } -// Write request to wire for QueryFilters -// queryFiltersRequest writes a QueryFilters request to a byte slice. +// queryFiltersRequest writes a QueryFilters request to a byte slice for transfer. func queryFiltersRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte { size := 8 b := 0 @@ -3111,7 +3091,7 @@ type QueryPictFormatsCookie struct { } // QueryPictFormats sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryPictFormatsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryPictFormatsCookie.Reply. func QueryPictFormats(c *xgb.Conn) QueryPictFormatsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3209,8 +3189,7 @@ func queryPictFormatsReply(buf []byte) *QueryPictFormatsReply { return v } -// Write request to wire for QueryPictFormats -// queryPictFormatsRequest writes a QueryPictFormats request to a byte slice. +// queryPictFormatsRequest writes a QueryPictFormats request to a byte slice for transfer. func queryPictFormatsRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -3236,7 +3215,7 @@ type QueryPictIndexValuesCookie struct { } // QueryPictIndexValues sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryPictIndexValuesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryPictIndexValuesCookie.Reply. func QueryPictIndexValues(c *xgb.Conn, Format Pictformat) QueryPictIndexValuesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3307,8 +3286,7 @@ func queryPictIndexValuesReply(buf []byte) *QueryPictIndexValuesReply { return v } -// Write request to wire for QueryPictIndexValues -// queryPictIndexValuesRequest writes a QueryPictIndexValues request to a byte slice. +// queryPictIndexValuesRequest writes a QueryPictIndexValues request to a byte slice for transfer. func queryPictIndexValuesRequest(c *xgb.Conn, Format Pictformat) []byte { size := 8 b := 0 @@ -3337,8 +3315,8 @@ type QueryVersionCookie struct { } // QueryVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply() -func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3351,7 +3329,7 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uin // QueryVersionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3408,9 +3386,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -3442,7 +3419,7 @@ type ReferenceGlyphSetCookie struct { // ReferenceGlyphSet sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ReferenceGlyphSet(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) ReferenceGlyphSetCookie { +func ReferenceGlyphSet(c *xgb.Conn, Gsid, Existing Glyphset) ReferenceGlyphSetCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3454,8 +3431,8 @@ func ReferenceGlyphSet(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) ReferenceG } // ReferenceGlyphSetChecked sends a checked request. -// If an error occurs, it can be retrieved using ReferenceGlyphSetCookie.Check() -func ReferenceGlyphSetChecked(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) ReferenceGlyphSetCookie { +// If an error occurs, it can be retrieved using ReferenceGlyphSetCookie.Check. +func ReferenceGlyphSetChecked(c *xgb.Conn, Gsid, Existing Glyphset) ReferenceGlyphSetCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3472,9 +3449,8 @@ func (cook ReferenceGlyphSetCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ReferenceGlyphSet -// referenceGlyphSetRequest writes a ReferenceGlyphSet request to a byte slice. -func referenceGlyphSetRequest(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) []byte { +// referenceGlyphSetRequest writes a ReferenceGlyphSet request to a byte slice for transfer. +func referenceGlyphSetRequest(c *xgb.Conn, Gsid, Existing Glyphset) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -3506,7 +3482,7 @@ type SetPictureClipRectanglesCookie struct { // SetPictureClipRectangles sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetPictureClipRectangles(c *xgb.Conn, Picture Picture, ClipXOrigin int16, ClipYOrigin int16, Rectangles []xproto.Rectangle) SetPictureClipRectanglesCookie { +func SetPictureClipRectangles(c *xgb.Conn, Picture Picture, ClipXOrigin, ClipYOrigin int16, Rectangles []xproto.Rectangle) SetPictureClipRectanglesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3518,8 +3494,8 @@ func SetPictureClipRectangles(c *xgb.Conn, Picture Picture, ClipXOrigin int16, C } // SetPictureClipRectanglesChecked sends a checked request. -// If an error occurs, it can be retrieved using SetPictureClipRectanglesCookie.Check() -func SetPictureClipRectanglesChecked(c *xgb.Conn, Picture Picture, ClipXOrigin int16, ClipYOrigin int16, Rectangles []xproto.Rectangle) SetPictureClipRectanglesCookie { +// If an error occurs, it can be retrieved using SetPictureClipRectanglesCookie.Check. +func SetPictureClipRectanglesChecked(c *xgb.Conn, Picture Picture, ClipXOrigin, ClipYOrigin int16, Rectangles []xproto.Rectangle) SetPictureClipRectanglesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3536,9 +3512,8 @@ func (cook SetPictureClipRectanglesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetPictureClipRectangles -// setPictureClipRectanglesRequest writes a SetPictureClipRectangles request to a byte slice. -func setPictureClipRectanglesRequest(c *xgb.Conn, Picture Picture, ClipXOrigin int16, ClipYOrigin int16, Rectangles []xproto.Rectangle) []byte { +// setPictureClipRectanglesRequest writes a SetPictureClipRectangles request to a byte slice for transfer. +func setPictureClipRectanglesRequest(c *xgb.Conn, Picture Picture, ClipXOrigin, ClipYOrigin int16, Rectangles []xproto.Rectangle) []byte { size := xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8)))) b := 0 buf := make([]byte, size) @@ -3587,7 +3562,7 @@ func SetPictureFilter(c *xgb.Conn, Picture Picture, FilterLen uint16, Filter str } // SetPictureFilterChecked sends a checked request. -// If an error occurs, it can be retrieved using SetPictureFilterCookie.Check() +// If an error occurs, it can be retrieved using SetPictureFilterCookie.Check. func SetPictureFilterChecked(c *xgb.Conn, Picture Picture, FilterLen uint16, Filter string, Values []Fixed) SetPictureFilterCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3605,8 +3580,7 @@ func (cook SetPictureFilterCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetPictureFilter -// setPictureFilterRequest writes a SetPictureFilter request to a byte slice. +// setPictureFilterRequest writes a SetPictureFilter request to a byte slice for transfer. func setPictureFilterRequest(c *xgb.Conn, Picture Picture, FilterLen uint16, Filter string, Values []Fixed) []byte { size := xgb.Pad((((12 + xgb.Pad((int(FilterLen) * 1))) + 4) + xgb.Pad((len(Values) * 4)))) b := 0 @@ -3665,7 +3639,7 @@ func SetPictureTransform(c *xgb.Conn, Picture Picture, Transform Transform) SetP } // SetPictureTransformChecked sends a checked request. -// If an error occurs, it can be retrieved using SetPictureTransformCookie.Check() +// If an error occurs, it can be retrieved using SetPictureTransformCookie.Check. func SetPictureTransformChecked(c *xgb.Conn, Picture Picture, Transform Transform) SetPictureTransformCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3683,8 +3657,7 @@ func (cook SetPictureTransformCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetPictureTransform -// setPictureTransformRequest writes a SetPictureTransform request to a byte slice. +// setPictureTransformRequest writes a SetPictureTransform request to a byte slice for transfer. func setPictureTransformRequest(c *xgb.Conn, Picture Picture, Transform Transform) []byte { size := 44 b := 0 @@ -3720,7 +3693,7 @@ type TrapezoidsCookie struct { // Trapezoids sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func Trapezoids(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Traps []Trapezoid) TrapezoidsCookie { +func Trapezoids(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Traps []Trapezoid) TrapezoidsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3732,8 +3705,8 @@ func Trapezoids(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictf } // TrapezoidsChecked sends a checked request. -// If an error occurs, it can be retrieved using TrapezoidsCookie.Check() -func TrapezoidsChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Traps []Trapezoid) TrapezoidsCookie { +// If an error occurs, it can be retrieved using TrapezoidsCookie.Check. +func TrapezoidsChecked(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Traps []Trapezoid) TrapezoidsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3750,9 +3723,8 @@ func (cook TrapezoidsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Trapezoids -// trapezoidsRequest writes a Trapezoids request to a byte slice. -func trapezoidsRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Traps []Trapezoid) []byte { +// trapezoidsRequest writes a Trapezoids request to a byte slice for transfer. +func trapezoidsRequest(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Traps []Trapezoid) []byte { size := xgb.Pad((24 + xgb.Pad((len(Traps) * 40)))) b := 0 buf := make([]byte, size) @@ -3800,7 +3772,7 @@ type TriFanCookie struct { // TriFan sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func TriFan(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriFanCookie { +func TriFan(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Points []Pointfix) TriFanCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3812,8 +3784,8 @@ func TriFan(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictforma } // TriFanChecked sends a checked request. -// If an error occurs, it can be retrieved using TriFanCookie.Check() -func TriFanChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriFanCookie { +// If an error occurs, it can be retrieved using TriFanCookie.Check. +func TriFanChecked(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Points []Pointfix) TriFanCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3830,9 +3802,8 @@ func (cook TriFanCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for TriFan -// triFanRequest writes a TriFan request to a byte slice. -func triFanRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) []byte { +// triFanRequest writes a TriFan request to a byte slice for transfer. +func triFanRequest(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Points []Pointfix) []byte { size := xgb.Pad((24 + xgb.Pad((len(Points) * 8)))) b := 0 buf := make([]byte, size) @@ -3880,7 +3851,7 @@ type TriStripCookie struct { // TriStrip sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func TriStrip(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriStripCookie { +func TriStrip(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Points []Pointfix) TriStripCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3892,8 +3863,8 @@ func TriStrip(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictfor } // TriStripChecked sends a checked request. -// If an error occurs, it can be retrieved using TriStripCookie.Check() -func TriStripChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) TriStripCookie { +// If an error occurs, it can be retrieved using TriStripCookie.Check. +func TriStripChecked(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Points []Pointfix) TriStripCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3910,9 +3881,8 @@ func (cook TriStripCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for TriStrip -// triStripRequest writes a TriStrip request to a byte slice. -func triStripRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Points []Pointfix) []byte { +// triStripRequest writes a TriStrip request to a byte slice for transfer. +func triStripRequest(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Points []Pointfix) []byte { size := xgb.Pad((24 + xgb.Pad((len(Points) * 8)))) b := 0 buf := make([]byte, size) @@ -3960,7 +3930,7 @@ type TrianglesCookie struct { // Triangles sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func Triangles(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Triangles []Triangle) TrianglesCookie { +func Triangles(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Triangles []Triangle) TrianglesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3972,8 +3942,8 @@ func Triangles(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictfo } // TrianglesChecked sends a checked request. -// If an error occurs, it can be retrieved using TrianglesCookie.Check() -func TrianglesChecked(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Triangles []Triangle) TrianglesCookie { +// If an error occurs, it can be retrieved using TrianglesCookie.Check. +func TrianglesChecked(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Triangles []Triangle) TrianglesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["RENDER"]; !ok { @@ -3990,9 +3960,8 @@ func (cook TrianglesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Triangles -// trianglesRequest writes a Triangles request to a byte slice. -func trianglesRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pictformat, SrcX int16, SrcY int16, Triangles []Triangle) []byte { +// trianglesRequest writes a Triangles request to a byte slice for transfer. +func trianglesRequest(c *xgb.Conn, Op byte, Src, Dst Picture, MaskFormat Pictformat, SrcX, SrcY int16, Triangles []Triangle) []byte { size := xgb.Pad((24 + xgb.Pad((len(Triangles) * 24)))) b := 0 buf := make([]byte, size) diff --git a/nexgb/res/res.go b/nexgb/res/res.go index 27f659e..6b1a807 100644 --- a/nexgb/res/res.go +++ b/nexgb/res/res.go @@ -513,7 +513,7 @@ type QueryClientIdsCookie struct { } // QueryClientIds sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryClientIdsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryClientIdsCookie.Reply. func QueryClientIds(c *xgb.Conn, NumSpecs uint32, Specs []ClientIdSpec) QueryClientIdsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -584,8 +584,7 @@ func queryClientIdsReply(buf []byte) *QueryClientIdsReply { return v } -// Write request to wire for QueryClientIds -// queryClientIdsRequest writes a QueryClientIds request to a byte slice. +// queryClientIdsRequest writes a QueryClientIds request to a byte slice for transfer. func queryClientIdsRequest(c *xgb.Conn, NumSpecs uint32, Specs []ClientIdSpec) []byte { size := xgb.Pad((8 + xgb.Pad((int(NumSpecs) * 8)))) b := 0 @@ -616,7 +615,7 @@ type QueryClientPixmapBytesCookie struct { } // QueryClientPixmapBytes sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryClientPixmapBytesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryClientPixmapBytesCookie.Reply. func QueryClientPixmapBytes(c *xgb.Conn, Xid uint32) QueryClientPixmapBytesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -684,8 +683,7 @@ func queryClientPixmapBytesReply(buf []byte) *QueryClientPixmapBytesReply { return v } -// Write request to wire for QueryClientPixmapBytes -// queryClientPixmapBytesRequest writes a QueryClientPixmapBytes request to a byte slice. +// queryClientPixmapBytesRequest writes a QueryClientPixmapBytes request to a byte slice for transfer. func queryClientPixmapBytesRequest(c *xgb.Conn, Xid uint32) []byte { size := 8 b := 0 @@ -714,7 +712,7 @@ type QueryClientResourcesCookie struct { } // QueryClientResources sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryClientResourcesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryClientResourcesCookie.Reply. func QueryClientResources(c *xgb.Conn, Xid uint32) QueryClientResourcesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -785,8 +783,7 @@ func queryClientResourcesReply(buf []byte) *QueryClientResourcesReply { return v } -// Write request to wire for QueryClientResources -// queryClientResourcesRequest writes a QueryClientResources request to a byte slice. +// queryClientResourcesRequest writes a QueryClientResources request to a byte slice for transfer. func queryClientResourcesRequest(c *xgb.Conn, Xid uint32) []byte { size := 8 b := 0 @@ -815,7 +812,7 @@ type QueryClientsCookie struct { } // QueryClients sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryClientsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryClientsCookie.Reply. func QueryClients(c *xgb.Conn) QueryClientsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -886,8 +883,7 @@ func queryClientsReply(buf []byte) *QueryClientsReply { return v } -// Write request to wire for QueryClients -// queryClientsRequest writes a QueryClients request to a byte slice. +// queryClientsRequest writes a QueryClients request to a byte slice for transfer. func queryClientsRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -913,8 +909,8 @@ type QueryResourceBytesCookie struct { } // QueryResourceBytes sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryResourceBytesCookie.Reply() -func QueryResourceBytes(c *xgb.Conn, Client uint32, NumSpecs uint32, Specs []ResourceIdSpec) QueryResourceBytesCookie { +// If an error occurs, it will be returned with the reply by calling QueryResourceBytesCookie.Reply. +func QueryResourceBytes(c *xgb.Conn, Client, NumSpecs uint32, Specs []ResourceIdSpec) QueryResourceBytesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["X-Resource"]; !ok { @@ -927,7 +923,7 @@ func QueryResourceBytes(c *xgb.Conn, Client uint32, NumSpecs uint32, Specs []Res // QueryResourceBytesUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func QueryResourceBytesUnchecked(c *xgb.Conn, Client uint32, NumSpecs uint32, Specs []ResourceIdSpec) QueryResourceBytesCookie { +func QueryResourceBytesUnchecked(c *xgb.Conn, Client, NumSpecs uint32, Specs []ResourceIdSpec) QueryResourceBytesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["X-Resource"]; !ok { @@ -984,9 +980,8 @@ func queryResourceBytesReply(buf []byte) *QueryResourceBytesReply { return v } -// Write request to wire for QueryResourceBytes -// queryResourceBytesRequest writes a QueryResourceBytes request to a byte slice. -func queryResourceBytesRequest(c *xgb.Conn, Client uint32, NumSpecs uint32, Specs []ResourceIdSpec) []byte { +// queryResourceBytesRequest writes a QueryResourceBytes request to a byte slice for transfer. +func queryResourceBytesRequest(c *xgb.Conn, Client, NumSpecs uint32, Specs []ResourceIdSpec) []byte { size := xgb.Pad((12 + xgb.Pad((int(NumSpecs) * 8)))) b := 0 buf := make([]byte, size) @@ -1019,8 +1014,8 @@ 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, ClientMajor byte, ClientMinor byte) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, ClientMajor, ClientMinor byte) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["X-Resource"]; !ok { @@ -1033,7 +1028,7 @@ func QueryVersion(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionC // 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, ClientMajor byte, ClientMinor byte) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, ClientMajor, ClientMinor byte) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["X-Resource"]; !ok { @@ -1087,9 +1082,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, ClientMajor byte, ClientMinor byte) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, ClientMajor, ClientMinor byte) []byte { size := 8 b := 0 buf := make([]byte, size) diff --git a/nexgb/screensaver/screensaver.go b/nexgb/screensaver/screensaver.go index dd31e10..9b7d1d7 100644 --- a/nexgb/screensaver/screensaver.go +++ b/nexgb/screensaver/screensaver.go @@ -200,7 +200,7 @@ type QueryInfoCookie struct { } // QueryInfo sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryInfoCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryInfoCookie.Reply. func QueryInfo(c *xgb.Conn, Drawable xproto.Drawable) QueryInfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -284,8 +284,7 @@ func queryInfoReply(buf []byte) *QueryInfoReply { return v } -// Write request to wire for QueryInfo -// queryInfoRequest writes a QueryInfo request to a byte slice. +// queryInfoRequest writes a QueryInfo request to a byte slice for transfer. func queryInfoRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte { size := 8 b := 0 @@ -314,8 +313,8 @@ type QueryVersionCookie struct { } // QueryVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply() -func QueryVersion(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion byte) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok { @@ -328,7 +327,7 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte) // QueryVersionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion byte) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok { @@ -385,9 +384,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion byte) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -433,7 +431,7 @@ func SelectInput(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) Select } // SelectInputChecked sends a checked request. -// If an error occurs, it can be retrieved using SelectInputCookie.Check() +// If an error occurs, it can be retrieved using SelectInputCookie.Check. func SelectInputChecked(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) SelectInputCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -451,8 +449,7 @@ func (cook SelectInputCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SelectInput -// selectInputRequest writes a SelectInput request to a byte slice. +// selectInputRequest writes a SelectInput request to a byte slice for transfer. func selectInputRequest(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) []byte { size := 12 b := 0 @@ -485,7 +482,7 @@ type SetAttributesCookie struct { // SetAttributes sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetAttributes(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) SetAttributesCookie { +func SetAttributes(c *xgb.Conn, Drawable xproto.Drawable, X, Y int16, Width, Height, BorderWidth uint16, Class, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) SetAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok { @@ -497,8 +494,8 @@ func SetAttributes(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Widt } // SetAttributesChecked sends a checked request. -// If an error occurs, it can be retrieved using SetAttributesCookie.Check() -func SetAttributesChecked(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) SetAttributesCookie { +// If an error occurs, it can be retrieved using SetAttributesCookie.Check. +func SetAttributesChecked(c *xgb.Conn, Drawable xproto.Drawable, X, Y int16, Width, Height, BorderWidth uint16, Class, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) SetAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["MIT-SCREEN-SAVER"]; !ok { @@ -515,9 +512,8 @@ func (cook SetAttributesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetAttributes -// setAttributesRequest writes a SetAttributes request to a byte slice. -func setAttributesRequest(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) []byte { +// setAttributesRequest writes a SetAttributes request to a byte slice for transfer. +func setAttributesRequest(c *xgb.Conn, Drawable xproto.Drawable, X, Y int16, Width, Height, BorderWidth uint16, Class, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) []byte { size := xgb.Pad((28 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))) b := 0 buf := make([]byte, size) @@ -591,7 +587,7 @@ func Suspend(c *xgb.Conn, Suspend bool) SuspendCookie { } // SuspendChecked sends a checked request. -// If an error occurs, it can be retrieved using SuspendCookie.Check() +// If an error occurs, it can be retrieved using SuspendCookie.Check. func SuspendChecked(c *xgb.Conn, Suspend bool) SuspendCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -609,8 +605,7 @@ func (cook SuspendCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Suspend -// suspendRequest writes a Suspend request to a byte slice. +// suspendRequest writes a Suspend request to a byte slice for transfer. func suspendRequest(c *xgb.Conn, Suspend bool) []byte { size := 8 b := 0 @@ -658,7 +653,7 @@ func UnsetAttributes(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCooki } // UnsetAttributesChecked sends a checked request. -// If an error occurs, it can be retrieved using UnsetAttributesCookie.Check() +// If an error occurs, it can be retrieved using UnsetAttributesCookie.Check. func UnsetAttributesChecked(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -676,8 +671,7 @@ func (cook UnsetAttributesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UnsetAttributes -// unsetAttributesRequest writes a UnsetAttributes request to a byte slice. +// unsetAttributesRequest writes a UnsetAttributes request to a byte slice for transfer. func unsetAttributesRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte { size := 8 b := 0 diff --git a/nexgb/shape/shape.go b/nexgb/shape/shape.go index 90eba07..be24fd1 100644 --- a/nexgb/shape/shape.go +++ b/nexgb/shape/shape.go @@ -217,7 +217,7 @@ type CombineCookie struct { // Combine sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func Combine(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) CombineCookie { +func Combine(c *xgb.Conn, Operation Op, DestinationKind, SourceKind Kind, DestinationWindow xproto.Window, XOffset, YOffset int16, SourceWindow xproto.Window) CombineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SHAPE"]; !ok { @@ -229,8 +229,8 @@ func Combine(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind Kind, D } // CombineChecked sends a checked request. -// If an error occurs, it can be retrieved using CombineCookie.Check() -func CombineChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) CombineCookie { +// If an error occurs, it can be retrieved using CombineCookie.Check. +func CombineChecked(c *xgb.Conn, Operation Op, DestinationKind, SourceKind Kind, DestinationWindow xproto.Window, XOffset, YOffset int16, SourceWindow xproto.Window) CombineCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SHAPE"]; !ok { @@ -247,9 +247,8 @@ func (cook CombineCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Combine -// combineRequest writes a Combine request to a byte slice. -func combineRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceWindow xproto.Window) []byte { +// combineRequest writes a Combine request to a byte slice for transfer. +func combineRequest(c *xgb.Conn, Operation Op, DestinationKind, SourceKind Kind, DestinationWindow xproto.Window, XOffset, YOffset int16, SourceWindow xproto.Window) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -297,7 +296,7 @@ type GetRectanglesCookie struct { } // GetRectangles sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetRectanglesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetRectanglesCookie.Reply. func GetRectangles(c *xgb.Conn, Window xproto.Window, SourceKind Kind) GetRectanglesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -369,8 +368,7 @@ func getRectanglesReply(buf []byte) *GetRectanglesReply { return v } -// Write request to wire for GetRectangles -// getRectanglesRequest writes a GetRectangles request to a byte slice. +// getRectanglesRequest writes a GetRectangles request to a byte slice for transfer. func getRectanglesRequest(c *xgb.Conn, Window xproto.Window, SourceKind Kind) []byte { size := 12 b := 0 @@ -404,7 +402,7 @@ type InputSelectedCookie struct { } // InputSelected sends a checked request. -// If an error occurs, it will be returned with the reply by calling InputSelectedCookie.Reply() +// If an error occurs, it will be returned with the reply by calling InputSelectedCookie.Reply. func InputSelected(c *xgb.Conn, DestinationWindow xproto.Window) InputSelectedCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -469,8 +467,7 @@ func inputSelectedReply(buf []byte) *InputSelectedReply { return v } -// Write request to wire for InputSelected -// inputSelectedRequest writes a InputSelected request to a byte slice. +// inputSelectedRequest writes a InputSelected request to a byte slice for transfer. func inputSelectedRequest(c *xgb.Conn, DestinationWindow xproto.Window) []byte { size := 8 b := 0 @@ -500,7 +497,7 @@ type MaskCookie struct { // Mask sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func Mask(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) MaskCookie { +func Mask(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset, YOffset int16, SourceBitmap xproto.Pixmap) MaskCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SHAPE"]; !ok { @@ -512,8 +509,8 @@ func Mask(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xpr } // MaskChecked sends a checked request. -// If an error occurs, it can be retrieved using MaskCookie.Check() -func MaskChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) MaskCookie { +// If an error occurs, it can be retrieved using MaskCookie.Check. +func MaskChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset, YOffset int16, SourceBitmap xproto.Pixmap) MaskCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SHAPE"]; !ok { @@ -530,9 +527,8 @@ func (cook MaskCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Mask -// maskRequest writes a Mask request to a byte slice. -func maskRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16, SourceBitmap xproto.Pixmap) []byte { +// maskRequest writes a Mask request to a byte slice for transfer. +func maskRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWindow xproto.Window, XOffset, YOffset int16, SourceBitmap xproto.Pixmap) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -578,7 +574,7 @@ type OffsetCookie struct { // Offset sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func Offset(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) OffsetCookie { +func Offset(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset, YOffset int16) OffsetCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SHAPE"]; !ok { @@ -590,8 +586,8 @@ func Offset(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, } // OffsetChecked sends a checked request. -// If an error occurs, it can be retrieved using OffsetCookie.Check() -func OffsetChecked(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) OffsetCookie { +// If an error occurs, it can be retrieved using OffsetCookie.Check. +func OffsetChecked(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset, YOffset int16) OffsetCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SHAPE"]; !ok { @@ -608,9 +604,8 @@ func (cook OffsetCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Offset -// offsetRequest writes a Offset request to a byte slice. -func offsetRequest(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset int16, YOffset int16) []byte { +// offsetRequest writes a Offset request to a byte slice for transfer. +func offsetRequest(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.Window, XOffset, YOffset int16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -649,7 +644,7 @@ type QueryExtentsCookie struct { } // QueryExtents sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryExtentsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryExtentsCookie.Reply. func QueryExtents(c *xgb.Conn, DestinationWindow xproto.Window) QueryExtentsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -760,8 +755,7 @@ func queryExtentsReply(buf []byte) *QueryExtentsReply { return v } -// Write request to wire for QueryExtents -// queryExtentsRequest writes a QueryExtents request to a byte slice. +// queryExtentsRequest writes a QueryExtents request to a byte slice for transfer. func queryExtentsRequest(c *xgb.Conn, DestinationWindow xproto.Window) []byte { size := 8 b := 0 @@ -790,7 +784,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() @@ -858,8 +852,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 @@ -886,7 +879,7 @@ type RectanglesCookie struct { // Rectangles sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func Rectangles(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) RectanglesCookie { +func Rectangles(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset, YOffset int16, Rectangles []xproto.Rectangle) RectanglesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SHAPE"]; !ok { @@ -898,8 +891,8 @@ func Rectangles(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, } // RectanglesChecked sends a checked request. -// If an error occurs, it can be retrieved using RectanglesCookie.Check() -func RectanglesChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) RectanglesCookie { +// If an error occurs, it can be retrieved using RectanglesCookie.Check. +func RectanglesChecked(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset, YOffset int16, Rectangles []xproto.Rectangle) RectanglesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SHAPE"]; !ok { @@ -916,9 +909,8 @@ func (cook RectanglesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Rectangles -// rectanglesRequest writes a Rectangles request to a byte slice. -func rectanglesRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset int16, YOffset int16, Rectangles []xproto.Rectangle) []byte { +// rectanglesRequest writes a Rectangles request to a byte slice for transfer. +func rectanglesRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering byte, DestinationWindow xproto.Window, XOffset, YOffset int16, Rectangles []xproto.Rectangle) []byte { size := xgb.Pad((16 + xgb.Pad((len(Rectangles) * 8)))) b := 0 buf := make([]byte, size) @@ -978,7 +970,7 @@ func SelectInput(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) Sele } // SelectInputChecked sends a checked request. -// If an error occurs, it can be retrieved using SelectInputCookie.Check() +// If an error occurs, it can be retrieved using SelectInputCookie.Check. func SelectInputChecked(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) SelectInputCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -996,8 +988,7 @@ func (cook SelectInputCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SelectInput -// selectInputRequest writes a SelectInput request to a byte slice. +// selectInputRequest writes a SelectInput request to a byte slice for transfer. func selectInputRequest(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) []byte { size := 12 b := 0 diff --git a/nexgb/shm/shm.go b/nexgb/shm/shm.go index 36fd043..79e12d4 100644 --- a/nexgb/shm/shm.go +++ b/nexgb/shm/shm.go @@ -232,7 +232,7 @@ func Attach(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) AttachCookie { } // AttachChecked sends a checked request. -// If an error occurs, it can be retrieved using AttachCookie.Check() +// If an error occurs, it can be retrieved using AttachCookie.Check. func AttachChecked(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) AttachCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -250,8 +250,7 @@ func (cook AttachCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Attach -// attachRequest writes a Attach request to a byte slice. +// attachRequest writes a Attach request to a byte slice for transfer. func attachRequest(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) []byte { size := 16 b := 0 @@ -305,7 +304,7 @@ func AttachFd(c *xgb.Conn, Shmseg Seg, ReadOnly bool) AttachFdCookie { } // AttachFdChecked sends a checked request. -// If an error occurs, it can be retrieved using AttachFdCookie.Check() +// If an error occurs, it can be retrieved using AttachFdCookie.Check. func AttachFdChecked(c *xgb.Conn, Shmseg Seg, ReadOnly bool) AttachFdCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -323,8 +322,7 @@ func (cook AttachFdCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for AttachFd -// attachFdRequest writes a AttachFd request to a byte slice. +// attachFdRequest writes a AttachFd request to a byte slice for transfer. func attachFdRequest(c *xgb.Conn, Shmseg Seg, ReadOnly bool) []byte { size := 12 b := 0 @@ -363,7 +361,7 @@ type CreatePixmapCookie struct { // CreatePixmap sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreatePixmap(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Width uint16, Height uint16, Depth byte, Shmseg Seg, Offset uint32) CreatePixmapCookie { +func CreatePixmap(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Width, Height uint16, Depth byte, Shmseg Seg, Offset uint32) CreatePixmapCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["MIT-SHM"]; !ok { @@ -375,8 +373,8 @@ func CreatePixmap(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Widt } // CreatePixmapChecked sends a checked request. -// If an error occurs, it can be retrieved using CreatePixmapCookie.Check() -func CreatePixmapChecked(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Width uint16, Height uint16, Depth byte, Shmseg Seg, Offset uint32) CreatePixmapCookie { +// If an error occurs, it can be retrieved using CreatePixmapCookie.Check. +func CreatePixmapChecked(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Width, Height uint16, Depth byte, Shmseg Seg, Offset uint32) CreatePixmapCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["MIT-SHM"]; !ok { @@ -393,9 +391,8 @@ func (cook CreatePixmapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreatePixmap -// createPixmapRequest writes a CreatePixmap request to a byte slice. -func createPixmapRequest(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Width uint16, Height uint16, Depth byte, Shmseg Seg, Offset uint32) []byte { +// createPixmapRequest writes a CreatePixmap request to a byte slice for transfer. +func createPixmapRequest(c *xgb.Conn, Pid xproto.Pixmap, Drawable xproto.Drawable, Width, Height uint16, Depth byte, Shmseg Seg, Offset uint32) []byte { size := 28 b := 0 buf := make([]byte, size) @@ -443,7 +440,7 @@ type CreateSegmentCookie struct { } // CreateSegment sends a checked request. -// If an error occurs, it will be returned with the reply by calling CreateSegmentCookie.Reply() +// If an error occurs, it will be returned with the reply by calling CreateSegmentCookie.Reply. func CreateSegment(c *xgb.Conn, Shmseg Seg, Size uint32, ReadOnly bool) CreateSegmentCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -507,8 +504,7 @@ func createSegmentReply(buf []byte) *CreateSegmentReply { return v } -// Write request to wire for CreateSegment -// createSegmentRequest writes a CreateSegment request to a byte slice. +// createSegmentRequest writes a CreateSegment request to a byte slice for transfer. func createSegmentRequest(c *xgb.Conn, Shmseg Seg, Size uint32, ReadOnly bool) []byte { size := 16 b := 0 @@ -562,7 +558,7 @@ func Detach(c *xgb.Conn, Shmseg Seg) DetachCookie { } // DetachChecked sends a checked request. -// If an error occurs, it can be retrieved using DetachCookie.Check() +// If an error occurs, it can be retrieved using DetachCookie.Check. func DetachChecked(c *xgb.Conn, Shmseg Seg) DetachCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -580,8 +576,7 @@ func (cook DetachCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Detach -// detachRequest writes a Detach request to a byte slice. +// detachRequest writes a Detach request to a byte slice for transfer. func detachRequest(c *xgb.Conn, Shmseg Seg) []byte { size := 8 b := 0 @@ -610,8 +605,8 @@ type GetImageCookie struct { } // GetImage sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetImageCookie.Reply() -func GetImage(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) GetImageCookie { +// If an error occurs, it will be returned with the reply by calling GetImageCookie.Reply. +func GetImage(c *xgb.Conn, Drawable xproto.Drawable, X, Y int16, Width, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) GetImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["MIT-SHM"]; !ok { @@ -624,7 +619,7 @@ func GetImage(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uin // GetImageUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetImageUnchecked(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) GetImageCookie { +func GetImageUnchecked(c *xgb.Conn, Drawable xproto.Drawable, X, Y int16, Width, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) GetImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["MIT-SHM"]; !ok { @@ -679,9 +674,8 @@ func getImageReply(buf []byte) *GetImageReply { return v } -// Write request to wire for GetImage -// getImageRequest writes a GetImage request to a byte slice. -func getImageRequest(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) []byte { +// getImageRequest writes a GetImage request to a byte slice for transfer. +func getImageRequest(c *xgb.Conn, Drawable xproto.Drawable, X, Y int16, Width, Height uint16, PlaneMask uint32, Format byte, Shmseg Seg, Offset uint32) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -736,7 +730,7 @@ 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, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg Seg, Offset uint32) PutImageCookie { +func PutImage(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWidth, TotalHeight, SrcX, SrcY, SrcWidth, SrcHeight uint16, DstX, DstY int16, Depth, Format, SendEvent byte, Shmseg Seg, Offset uint32) PutImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["MIT-SHM"]; !ok { @@ -748,8 +742,8 @@ func PutImage(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWi } // PutImageChecked sends a checked request. -// If an error occurs, it can be retrieved using PutImageCookie.Check() -func PutImageChecked(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg Seg, Offset uint32) PutImageCookie { +// If an error occurs, it can be retrieved using PutImageCookie.Check. +func PutImageChecked(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWidth, TotalHeight, SrcX, SrcY, SrcWidth, SrcHeight uint16, DstX, DstY int16, Depth, Format, SendEvent byte, Shmseg Seg, Offset uint32) PutImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["MIT-SHM"]; !ok { @@ -766,9 +760,8 @@ func (cook PutImageCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PutImage -// putImageRequest writes a PutImage request to a byte slice. -func putImageRequest(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWidth uint16, TotalHeight uint16, SrcX uint16, SrcY uint16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16, Depth byte, Format byte, SendEvent byte, Shmseg Seg, Offset uint32) []byte { +// putImageRequest writes a PutImage request to a byte slice for transfer. +func putImageRequest(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext, TotalWidth, TotalHeight, SrcX, SrcY, SrcWidth, SrcHeight uint16, DstX, DstY int16, Depth, Format, SendEvent byte, Shmseg Seg, Offset uint32) []byte { size := 40 b := 0 buf := make([]byte, size) @@ -840,7 +833,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() @@ -928,8 +921,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 diff --git a/nexgb/xcmisc/xcmisc.go b/nexgb/xcmisc/xcmisc.go index 7a9d486..d727ec4 100644 --- a/nexgb/xcmisc/xcmisc.go +++ b/nexgb/xcmisc/xcmisc.go @@ -71,8 +71,8 @@ type GetVersionCookie struct { } // GetVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply() -func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie { +// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply. +func GetVersion(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) GetVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XC-MISC"]; !ok { @@ -85,7 +85,7 @@ func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint1 // GetVersionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie { +func GetVersionUnchecked(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) GetVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XC-MISC"]; !ok { @@ -139,9 +139,8 @@ func getVersionReply(buf []byte) *GetVersionReply { return v } -// Write request to wire for GetVersion -// getVersionRequest writes a GetVersion request to a byte slice. -func getVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) []byte { +// getVersionRequest writes a GetVersion request to a byte slice for transfer. +func getVersionRequest(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -172,7 +171,7 @@ type GetXIDListCookie struct { } // GetXIDList sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetXIDListCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetXIDListCookie.Reply. func GetXIDList(c *xgb.Conn, Count uint32) GetXIDListCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -246,8 +245,7 @@ func getXIDListReply(buf []byte) *GetXIDListReply { return v } -// Write request to wire for GetXIDList -// getXIDListRequest writes a GetXIDList request to a byte slice. +// getXIDListRequest writes a GetXIDList request to a byte slice for transfer. func getXIDListRequest(c *xgb.Conn, Count uint32) []byte { size := 8 b := 0 @@ -276,7 +274,7 @@ type GetXIDRangeCookie struct { } // GetXIDRange sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetXIDRangeCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetXIDRangeCookie.Reply. func GetXIDRange(c *xgb.Conn) GetXIDRangeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -344,8 +342,7 @@ func getXIDRangeReply(buf []byte) *GetXIDRangeReply { return v } -// Write request to wire for GetXIDRange -// getXIDRangeRequest writes a GetXIDRange request to a byte slice. +// getXIDRangeRequest writes a GetXIDRange request to a byte slice for transfer. func getXIDRangeRequest(c *xgb.Conn) []byte { size := 4 b := 0 diff --git a/nexgb/xevie/xevie.go b/nexgb/xevie/xevie.go index 76b8e56..5d233ad 100644 --- a/nexgb/xevie/xevie.go +++ b/nexgb/xevie/xevie.go @@ -121,7 +121,7 @@ type EndCookie struct { } // End sends a checked request. -// If an error occurs, it will be returned with the reply by calling EndCookie.Reply() +// If an error occurs, it will be returned with the reply by calling EndCookie.Reply. func End(c *xgb.Conn, Cmap uint32) EndCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -184,8 +184,7 @@ func endReply(buf []byte) *EndReply { return v } -// Write request to wire for End -// endRequest writes a End request to a byte slice. +// endRequest writes a End request to a byte slice for transfer. func endRequest(c *xgb.Conn, Cmap uint32) []byte { size := 8 b := 0 @@ -214,8 +213,8 @@ type QueryVersionCookie struct { } // QueryVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply() -func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XEVIE"]; !ok { @@ -228,7 +227,7 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uin // QueryVersionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XEVIE"]; !ok { @@ -285,9 +284,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint16) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -318,7 +316,7 @@ type SelectInputCookie struct { } // SelectInput sends a checked request. -// If an error occurs, it will be returned with the reply by calling SelectInputCookie.Reply() +// If an error occurs, it will be returned with the reply by calling SelectInputCookie.Reply. func SelectInput(c *xgb.Conn, EventMask uint32) SelectInputCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -381,8 +379,7 @@ func selectInputReply(buf []byte) *SelectInputReply { return v } -// Write request to wire for SelectInput -// selectInputRequest writes a SelectInput request to a byte slice. +// selectInputRequest writes a SelectInput request to a byte slice for transfer. func selectInputRequest(c *xgb.Conn, EventMask uint32) []byte { size := 8 b := 0 @@ -411,7 +408,7 @@ type SendCookie struct { } // Send sends a checked request. -// If an error occurs, it will be returned with the reply by calling SendCookie.Reply() +// If an error occurs, it will be returned with the reply by calling SendCookie.Reply. func Send(c *xgb.Conn, Event Event, DataType uint32) SendCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -474,8 +471,7 @@ func sendReply(buf []byte) *SendReply { return v } -// Write request to wire for Send -// sendRequest writes a Send request to a byte slice. +// sendRequest writes a Send request to a byte slice for transfer. func sendRequest(c *xgb.Conn, Event Event, DataType uint32) []byte { size := 104 b := 0 @@ -512,7 +508,7 @@ type StartCookie struct { } // Start sends a checked request. -// If an error occurs, it will be returned with the reply by calling StartCookie.Reply() +// If an error occurs, it will be returned with the reply by calling StartCookie.Reply. func Start(c *xgb.Conn, Screen uint32) StartCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -575,8 +571,7 @@ func startReply(buf []byte) *StartReply { return v } -// Write request to wire for Start -// startRequest writes a Start request to a byte slice. +// startRequest writes a Start request to a byte slice for transfer. func startRequest(c *xgb.Conn, Screen uint32) []byte { size := 8 b := 0 diff --git a/nexgb/xf86dri/xf86dri.go b/nexgb/xf86dri/xf86dri.go index 42f04d1..6f93b7e 100644 --- a/nexgb/xf86dri/xf86dri.go +++ b/nexgb/xf86dri/xf86dri.go @@ -139,8 +139,8 @@ type AuthConnectionCookie struct { } // AuthConnection sends a checked request. -// If an error occurs, it will be returned with the reply by calling AuthConnectionCookie.Reply() -func AuthConnection(c *xgb.Conn, Screen uint32, Magic uint32) AuthConnectionCookie { +// If an error occurs, it will be returned with the reply by calling AuthConnectionCookie.Reply. +func AuthConnection(c *xgb.Conn, Screen, Magic uint32) AuthConnectionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -153,7 +153,7 @@ func AuthConnection(c *xgb.Conn, Screen uint32, Magic uint32) AuthConnectionCook // AuthConnectionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func AuthConnectionUnchecked(c *xgb.Conn, Screen uint32, Magic uint32) AuthConnectionCookie { +func AuthConnectionUnchecked(c *xgb.Conn, Screen, Magic uint32) AuthConnectionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -203,9 +203,8 @@ func authConnectionReply(buf []byte) *AuthConnectionReply { return v } -// Write request to wire for AuthConnection -// authConnectionRequest writes a AuthConnection request to a byte slice. -func authConnectionRequest(c *xgb.Conn, Screen uint32, Magic uint32) []byte { +// authConnectionRequest writes a AuthConnection request to a byte slice for transfer. +func authConnectionRequest(c *xgb.Conn, Screen, Magic uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -249,7 +248,7 @@ func CloseConnection(c *xgb.Conn, Screen uint32) CloseConnectionCookie { } // CloseConnectionChecked sends a checked request. -// If an error occurs, it can be retrieved using CloseConnectionCookie.Check() +// If an error occurs, it can be retrieved using CloseConnectionCookie.Check. func CloseConnectionChecked(c *xgb.Conn, Screen uint32) CloseConnectionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -267,8 +266,7 @@ func (cook CloseConnectionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CloseConnection -// closeConnectionRequest writes a CloseConnection request to a byte slice. +// closeConnectionRequest writes a CloseConnection request to a byte slice for transfer. func closeConnectionRequest(c *xgb.Conn, Screen uint32) []byte { size := 8 b := 0 @@ -297,8 +295,8 @@ type CreateContextCookie struct { } // CreateContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling CreateContextCookie.Reply() -func CreateContext(c *xgb.Conn, Screen uint32, Visual uint32, Context uint32) CreateContextCookie { +// If an error occurs, it will be returned with the reply by calling CreateContextCookie.Reply. +func CreateContext(c *xgb.Conn, Screen, Visual, Context uint32) CreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -311,7 +309,7 @@ func CreateContext(c *xgb.Conn, Screen uint32, Visual uint32, Context uint32) Cr // CreateContextUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateContextUnchecked(c *xgb.Conn, Screen uint32, Visual uint32, Context uint32) CreateContextCookie { +func CreateContextUnchecked(c *xgb.Conn, Screen, Visual, Context uint32) CreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -361,9 +359,8 @@ func createContextReply(buf []byte) *CreateContextReply { return v } -// Write request to wire for CreateContext -// createContextRequest writes a CreateContext request to a byte slice. -func createContextRequest(c *xgb.Conn, Screen uint32, Visual uint32, Context uint32) []byte { +// createContextRequest writes a CreateContext request to a byte slice for transfer. +func createContextRequest(c *xgb.Conn, Screen, Visual, Context uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -397,8 +394,8 @@ type CreateDrawableCookie struct { } // CreateDrawable sends a checked request. -// If an error occurs, it will be returned with the reply by calling CreateDrawableCookie.Reply() -func CreateDrawable(c *xgb.Conn, Screen uint32, Drawable uint32) CreateDrawableCookie { +// If an error occurs, it will be returned with the reply by calling CreateDrawableCookie.Reply. +func CreateDrawable(c *xgb.Conn, Screen, Drawable uint32) CreateDrawableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -411,7 +408,7 @@ func CreateDrawable(c *xgb.Conn, Screen uint32, Drawable uint32) CreateDrawableC // CreateDrawableUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateDrawableUnchecked(c *xgb.Conn, Screen uint32, Drawable uint32) CreateDrawableCookie { +func CreateDrawableUnchecked(c *xgb.Conn, Screen, Drawable uint32) CreateDrawableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -461,9 +458,8 @@ func createDrawableReply(buf []byte) *CreateDrawableReply { return v } -// Write request to wire for CreateDrawable -// createDrawableRequest writes a CreateDrawable request to a byte slice. -func createDrawableRequest(c *xgb.Conn, Screen uint32, Drawable uint32) []byte { +// createDrawableRequest writes a CreateDrawable request to a byte slice for transfer. +func createDrawableRequest(c *xgb.Conn, Screen, Drawable uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -495,7 +491,7 @@ type DestroyContextCookie struct { // DestroyContext sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func DestroyContext(c *xgb.Conn, Screen uint32, Context uint32) DestroyContextCookie { +func DestroyContext(c *xgb.Conn, Screen, Context uint32) DestroyContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -507,8 +503,8 @@ func DestroyContext(c *xgb.Conn, Screen uint32, Context uint32) DestroyContextCo } // DestroyContextChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyContextCookie.Check() -func DestroyContextChecked(c *xgb.Conn, Screen uint32, Context uint32) DestroyContextCookie { +// If an error occurs, it can be retrieved using DestroyContextCookie.Check. +func DestroyContextChecked(c *xgb.Conn, Screen, Context uint32) DestroyContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -525,9 +521,8 @@ func (cook DestroyContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyContext -// destroyContextRequest writes a DestroyContext request to a byte slice. -func destroyContextRequest(c *xgb.Conn, Screen uint32, Context uint32) []byte { +// destroyContextRequest writes a DestroyContext request to a byte slice for transfer. +func destroyContextRequest(c *xgb.Conn, Screen, Context uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -559,7 +554,7 @@ type DestroyDrawableCookie struct { // DestroyDrawable sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func DestroyDrawable(c *xgb.Conn, Screen uint32, Drawable uint32) DestroyDrawableCookie { +func DestroyDrawable(c *xgb.Conn, Screen, Drawable uint32) DestroyDrawableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -571,8 +566,8 @@ func DestroyDrawable(c *xgb.Conn, Screen uint32, Drawable uint32) DestroyDrawabl } // DestroyDrawableChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyDrawableCookie.Check() -func DestroyDrawableChecked(c *xgb.Conn, Screen uint32, Drawable uint32) DestroyDrawableCookie { +// If an error occurs, it can be retrieved using DestroyDrawableCookie.Check. +func DestroyDrawableChecked(c *xgb.Conn, Screen, Drawable uint32) DestroyDrawableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -589,9 +584,8 @@ func (cook DestroyDrawableCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyDrawable -// destroyDrawableRequest writes a DestroyDrawable request to a byte slice. -func destroyDrawableRequest(c *xgb.Conn, Screen uint32, Drawable uint32) []byte { +// destroyDrawableRequest writes a DestroyDrawable request to a byte slice for transfer. +func destroyDrawableRequest(c *xgb.Conn, Screen, Drawable uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -622,7 +616,7 @@ type GetClientDriverNameCookie struct { } // GetClientDriverName sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetClientDriverNameCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetClientDriverNameCookie.Reply. func GetClientDriverName(c *xgb.Conn, Screen uint32) GetClientDriverNameCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -709,8 +703,7 @@ func getClientDriverNameReply(buf []byte) *GetClientDriverNameReply { return v } -// Write request to wire for GetClientDriverName -// getClientDriverNameRequest writes a GetClientDriverName request to a byte slice. +// getClientDriverNameRequest writes a GetClientDriverName request to a byte slice for transfer. func getClientDriverNameRequest(c *xgb.Conn, Screen uint32) []byte { size := 8 b := 0 @@ -739,7 +732,7 @@ type GetDeviceInfoCookie struct { } // GetDeviceInfo sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetDeviceInfoCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetDeviceInfoCookie.Reply. func GetDeviceInfo(c *xgb.Conn, Screen uint32) GetDeviceInfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -830,8 +823,7 @@ func getDeviceInfoReply(buf []byte) *GetDeviceInfoReply { return v } -// Write request to wire for GetDeviceInfo -// getDeviceInfoRequest writes a GetDeviceInfo request to a byte slice. +// getDeviceInfoRequest writes a GetDeviceInfo request to a byte slice for transfer. func getDeviceInfoRequest(c *xgb.Conn, Screen uint32) []byte { size := 8 b := 0 @@ -860,8 +852,8 @@ type GetDrawableInfoCookie struct { } // GetDrawableInfo sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetDrawableInfoCookie.Reply() -func GetDrawableInfo(c *xgb.Conn, Screen uint32, Drawable uint32) GetDrawableInfoCookie { +// If an error occurs, it will be returned with the reply by calling GetDrawableInfoCookie.Reply. +func GetDrawableInfo(c *xgb.Conn, Screen, Drawable uint32) GetDrawableInfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -874,7 +866,7 @@ func GetDrawableInfo(c *xgb.Conn, Screen uint32, Drawable uint32) GetDrawableInf // GetDrawableInfoUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetDrawableInfoUnchecked(c *xgb.Conn, Screen uint32, Drawable uint32) GetDrawableInfoCookie { +func GetDrawableInfoUnchecked(c *xgb.Conn, Screen, Drawable uint32) GetDrawableInfoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFree86-DRI"]; !ok { @@ -968,9 +960,8 @@ func getDrawableInfoReply(buf []byte) *GetDrawableInfoReply { return v } -// Write request to wire for GetDrawableInfo -// getDrawableInfoRequest writes a GetDrawableInfo request to a byte slice. -func getDrawableInfoRequest(c *xgb.Conn, Screen uint32, Drawable uint32) []byte { +// getDrawableInfoRequest writes a GetDrawableInfo request to a byte slice for transfer. +func getDrawableInfoRequest(c *xgb.Conn, Screen, Drawable uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -1001,7 +992,7 @@ type OpenConnectionCookie struct { } // OpenConnection sends a checked request. -// If an error occurs, it will be returned with the reply by calling OpenConnectionCookie.Reply() +// If an error occurs, it will be returned with the reply by calling OpenConnectionCookie.Reply. func OpenConnection(c *xgb.Conn, Screen uint32) OpenConnectionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1084,8 +1075,7 @@ func openConnectionReply(buf []byte) *OpenConnectionReply { return v } -// Write request to wire for OpenConnection -// openConnectionRequest writes a OpenConnection request to a byte slice. +// openConnectionRequest writes a OpenConnection request to a byte slice for transfer. func openConnectionRequest(c *xgb.Conn, Screen uint32) []byte { size := 8 b := 0 @@ -1114,7 +1104,7 @@ type QueryDirectRenderingCapableCookie struct { } // QueryDirectRenderingCapable sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryDirectRenderingCapableCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryDirectRenderingCapableCookie.Reply. func QueryDirectRenderingCapable(c *xgb.Conn, Screen uint32) QueryDirectRenderingCapableCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1182,8 +1172,7 @@ func queryDirectRenderingCapableReply(buf []byte) *QueryDirectRenderingCapableRe return v } -// Write request to wire for QueryDirectRenderingCapable -// queryDirectRenderingCapableRequest writes a QueryDirectRenderingCapable request to a byte slice. +// queryDirectRenderingCapableRequest writes a QueryDirectRenderingCapable request to a byte slice for transfer. func queryDirectRenderingCapableRequest(c *xgb.Conn, Screen uint32) []byte { size := 8 b := 0 @@ -1212,7 +1201,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() @@ -1284,8 +1273,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 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) diff --git a/nexgb/xfixes/xfixes.go b/nexgb/xfixes/xfixes.go index 50bf40d..3a3dd15 100644 --- a/nexgb/xfixes/xfixes.go +++ b/nexgb/xfixes/xfixes.go @@ -384,7 +384,7 @@ type ChangeCursorCookie struct { // ChangeCursor sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ChangeCursor(c *xgb.Conn, Source xproto.Cursor, Destination xproto.Cursor) ChangeCursorCookie { +func ChangeCursor(c *xgb.Conn, Source, Destination xproto.Cursor) ChangeCursorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -396,8 +396,8 @@ func ChangeCursor(c *xgb.Conn, Source xproto.Cursor, Destination xproto.Cursor) } // ChangeCursorChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeCursorCookie.Check() -func ChangeCursorChecked(c *xgb.Conn, Source xproto.Cursor, Destination xproto.Cursor) ChangeCursorCookie { +// If an error occurs, it can be retrieved using ChangeCursorCookie.Check. +func ChangeCursorChecked(c *xgb.Conn, Source, Destination xproto.Cursor) ChangeCursorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -414,9 +414,8 @@ func (cook ChangeCursorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeCursor -// changeCursorRequest writes a ChangeCursor request to a byte slice. -func changeCursorRequest(c *xgb.Conn, Source xproto.Cursor, Destination xproto.Cursor) []byte { +// changeCursorRequest writes a ChangeCursor request to a byte slice for transfer. +func changeCursorRequest(c *xgb.Conn, Source, Destination xproto.Cursor) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -460,7 +459,7 @@ func ChangeCursorByName(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name stri } // ChangeCursorByNameChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeCursorByNameCookie.Check() +// If an error occurs, it can be retrieved using ChangeCursorByNameCookie.Check. func ChangeCursorByNameChecked(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name string) ChangeCursorByNameCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -478,8 +477,7 @@ func (cook ChangeCursorByNameCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeCursorByName -// changeCursorByNameRequest writes a ChangeCursorByName request to a byte slice. +// changeCursorByNameRequest writes a ChangeCursorByName request to a byte slice for transfer. func changeCursorByNameRequest(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name string) []byte { size := xgb.Pad((12 + xgb.Pad((int(Nbytes) * 1)))) b := 0 @@ -517,7 +515,7 @@ type ChangeSaveSetCookie struct { // ChangeSaveSet sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ChangeSaveSet(c *xgb.Conn, Mode byte, Target byte, Map byte, Window xproto.Window) ChangeSaveSetCookie { +func ChangeSaveSet(c *xgb.Conn, Mode, Target, Map byte, Window xproto.Window) ChangeSaveSetCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -529,8 +527,8 @@ func ChangeSaveSet(c *xgb.Conn, Mode byte, Target byte, Map byte, Window xproto. } // ChangeSaveSetChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeSaveSetCookie.Check() -func ChangeSaveSetChecked(c *xgb.Conn, Mode byte, Target byte, Map byte, Window xproto.Window) ChangeSaveSetCookie { +// If an error occurs, it can be retrieved using ChangeSaveSetCookie.Check. +func ChangeSaveSetChecked(c *xgb.Conn, Mode, Target, Map byte, Window xproto.Window) ChangeSaveSetCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -547,9 +545,8 @@ func (cook ChangeSaveSetCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeSaveSet -// changeSaveSetRequest writes a ChangeSaveSet request to a byte slice. -func changeSaveSetRequest(c *xgb.Conn, Mode byte, Target byte, Map byte, Window xproto.Window) []byte { +// changeSaveSetRequest writes a ChangeSaveSet request to a byte slice for transfer. +func changeSaveSetRequest(c *xgb.Conn, Mode, Target, Map byte, Window xproto.Window) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -589,7 +586,7 @@ type CopyRegionCookie struct { // CopyRegion sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CopyRegion(c *xgb.Conn, Source Region, Destination Region) CopyRegionCookie { +func CopyRegion(c *xgb.Conn, Source, Destination Region) CopyRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -601,8 +598,8 @@ func CopyRegion(c *xgb.Conn, Source Region, Destination Region) CopyRegionCookie } // CopyRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using CopyRegionCookie.Check() -func CopyRegionChecked(c *xgb.Conn, Source Region, Destination Region) CopyRegionCookie { +// If an error occurs, it can be retrieved using CopyRegionCookie.Check. +func CopyRegionChecked(c *xgb.Conn, Source, Destination Region) CopyRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -619,9 +616,8 @@ func (cook CopyRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CopyRegion -// copyRegionRequest writes a CopyRegion request to a byte slice. -func copyRegionRequest(c *xgb.Conn, Source Region, Destination Region) []byte { +// copyRegionRequest writes a CopyRegion request to a byte slice for transfer. +func copyRegionRequest(c *xgb.Conn, Source, Destination Region) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -653,7 +649,7 @@ type CreatePointerBarrierCookie struct { // CreatePointerBarrier sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreatePointerBarrier(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1 uint16, Y1 uint16, X2 uint16, Y2 uint16, Directions uint32, NumDevices uint16, Devices []uint16) CreatePointerBarrierCookie { +func CreatePointerBarrier(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1, Y1, X2, Y2 uint16, Directions uint32, NumDevices uint16, Devices []uint16) CreatePointerBarrierCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -665,8 +661,8 @@ func CreatePointerBarrier(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1 } // CreatePointerBarrierChecked sends a checked request. -// If an error occurs, it can be retrieved using CreatePointerBarrierCookie.Check() -func CreatePointerBarrierChecked(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1 uint16, Y1 uint16, X2 uint16, Y2 uint16, Directions uint32, NumDevices uint16, Devices []uint16) CreatePointerBarrierCookie { +// If an error occurs, it can be retrieved using CreatePointerBarrierCookie.Check. +func CreatePointerBarrierChecked(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1, Y1, X2, Y2 uint16, Directions uint32, NumDevices uint16, Devices []uint16) CreatePointerBarrierCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -683,9 +679,8 @@ func (cook CreatePointerBarrierCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreatePointerBarrier -// createPointerBarrierRequest writes a CreatePointerBarrier request to a byte slice. -func createPointerBarrierRequest(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1 uint16, Y1 uint16, X2 uint16, Y2 uint16, Directions uint32, NumDevices uint16, Devices []uint16) []byte { +// createPointerBarrierRequest writes a CreatePointerBarrier request to a byte slice for transfer. +func createPointerBarrierRequest(c *xgb.Conn, Barrier Barrier, Window xproto.Window, X1, Y1, X2, Y2 uint16, Directions uint32, NumDevices uint16, Devices []uint16) []byte { size := xgb.Pad((28 + xgb.Pad((int(NumDevices) * 2)))) b := 0 buf := make([]byte, size) @@ -754,7 +749,7 @@ func CreateRegion(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) Cre } // CreateRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateRegionCookie.Check() +// If an error occurs, it can be retrieved using CreateRegionCookie.Check. func CreateRegionChecked(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) CreateRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -772,8 +767,7 @@ func (cook CreateRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateRegion -// createRegionRequest writes a CreateRegion request to a byte slice. +// createRegionRequest writes a CreateRegion request to a byte slice for transfer. func createRegionRequest(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) []byte { size := xgb.Pad((8 + xgb.Pad((len(Rectangles) * 8)))) b := 0 @@ -817,7 +811,7 @@ func CreateRegionFromBitmap(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) Cr } // CreateRegionFromBitmapChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateRegionFromBitmapCookie.Check() +// If an error occurs, it can be retrieved using CreateRegionFromBitmapCookie.Check. func CreateRegionFromBitmapChecked(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) CreateRegionFromBitmapCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -835,8 +829,7 @@ func (cook CreateRegionFromBitmapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateRegionFromBitmap -// createRegionFromBitmapRequest writes a CreateRegionFromBitmap request to a byte slice. +// createRegionFromBitmapRequest writes a CreateRegionFromBitmap request to a byte slice for transfer. func createRegionFromBitmapRequest(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) []byte { size := 12 b := 0 @@ -881,7 +874,7 @@ func CreateRegionFromGC(c *xgb.Conn, Region Region, Gc xproto.Gcontext) CreateRe } // CreateRegionFromGCChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateRegionFromGCCookie.Check() +// If an error occurs, it can be retrieved using CreateRegionFromGCCookie.Check. func CreateRegionFromGCChecked(c *xgb.Conn, Region Region, Gc xproto.Gcontext) CreateRegionFromGCCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -899,8 +892,7 @@ func (cook CreateRegionFromGCCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateRegionFromGC -// createRegionFromGCRequest writes a CreateRegionFromGC request to a byte slice. +// createRegionFromGCRequest writes a CreateRegionFromGC request to a byte slice for transfer. func createRegionFromGCRequest(c *xgb.Conn, Region Region, Gc xproto.Gcontext) []byte { size := 12 b := 0 @@ -945,7 +937,7 @@ func CreateRegionFromPicture(c *xgb.Conn, Region Region, Picture render.Picture) } // CreateRegionFromPictureChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateRegionFromPictureCookie.Check() +// If an error occurs, it can be retrieved using CreateRegionFromPictureCookie.Check. func CreateRegionFromPictureChecked(c *xgb.Conn, Region Region, Picture render.Picture) CreateRegionFromPictureCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -963,8 +955,7 @@ func (cook CreateRegionFromPictureCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateRegionFromPicture -// createRegionFromPictureRequest writes a CreateRegionFromPicture request to a byte slice. +// createRegionFromPictureRequest writes a CreateRegionFromPicture request to a byte slice for transfer. func createRegionFromPictureRequest(c *xgb.Conn, Region Region, Picture render.Picture) []byte { size := 12 b := 0 @@ -1009,7 +1000,7 @@ func CreateRegionFromWindow(c *xgb.Conn, Region Region, Window xproto.Window, Ki } // CreateRegionFromWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateRegionFromWindowCookie.Check() +// If an error occurs, it can be retrieved using CreateRegionFromWindowCookie.Check. func CreateRegionFromWindowChecked(c *xgb.Conn, Region Region, Window xproto.Window, Kind shape.Kind) CreateRegionFromWindowCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1027,8 +1018,7 @@ func (cook CreateRegionFromWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateRegionFromWindow -// createRegionFromWindowRequest writes a CreateRegionFromWindow request to a byte slice. +// createRegionFromWindowRequest writes a CreateRegionFromWindow request to a byte slice for transfer. func createRegionFromWindowRequest(c *xgb.Conn, Region Region, Window xproto.Window, Kind shape.Kind) []byte { size := 16 b := 0 @@ -1078,7 +1068,7 @@ func DeletePointerBarrier(c *xgb.Conn, Barrier Barrier) DeletePointerBarrierCook } // DeletePointerBarrierChecked sends a checked request. -// If an error occurs, it can be retrieved using DeletePointerBarrierCookie.Check() +// If an error occurs, it can be retrieved using DeletePointerBarrierCookie.Check. func DeletePointerBarrierChecked(c *xgb.Conn, Barrier Barrier) DeletePointerBarrierCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1096,8 +1086,7 @@ func (cook DeletePointerBarrierCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeletePointerBarrier -// deletePointerBarrierRequest writes a DeletePointerBarrier request to a byte slice. +// deletePointerBarrierRequest writes a DeletePointerBarrier request to a byte slice for transfer. func deletePointerBarrierRequest(c *xgb.Conn, Barrier Barrier) []byte { size := 8 b := 0 @@ -1139,7 +1128,7 @@ func DestroyRegion(c *xgb.Conn, Region Region) DestroyRegionCookie { } // DestroyRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyRegionCookie.Check() +// If an error occurs, it can be retrieved using DestroyRegionCookie.Check. func DestroyRegionChecked(c *xgb.Conn, Region Region) DestroyRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1157,8 +1146,7 @@ func (cook DestroyRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyRegion -// destroyRegionRequest writes a DestroyRegion request to a byte slice. +// destroyRegionRequest writes a DestroyRegion request to a byte slice for transfer. func destroyRegionRequest(c *xgb.Conn, Region Region) []byte { size := 8 b := 0 @@ -1188,7 +1176,7 @@ type ExpandRegionCookie struct { // ExpandRegion sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ExpandRegion(c *xgb.Conn, Source Region, Destination Region, Left uint16, Right uint16, Top uint16, Bottom uint16) ExpandRegionCookie { +func ExpandRegion(c *xgb.Conn, Source, Destination Region, Left, Right, Top, Bottom uint16) ExpandRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -1200,8 +1188,8 @@ func ExpandRegion(c *xgb.Conn, Source Region, Destination Region, Left uint16, R } // ExpandRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using ExpandRegionCookie.Check() -func ExpandRegionChecked(c *xgb.Conn, Source Region, Destination Region, Left uint16, Right uint16, Top uint16, Bottom uint16) ExpandRegionCookie { +// If an error occurs, it can be retrieved using ExpandRegionCookie.Check. +func ExpandRegionChecked(c *xgb.Conn, Source, Destination Region, Left, Right, Top, Bottom uint16) ExpandRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -1218,9 +1206,8 @@ func (cook ExpandRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ExpandRegion -// expandRegionRequest writes a ExpandRegion request to a byte slice. -func expandRegionRequest(c *xgb.Conn, Source Region, Destination Region, Left uint16, Right uint16, Top uint16, Bottom uint16) []byte { +// expandRegionRequest writes a ExpandRegion request to a byte slice for transfer. +func expandRegionRequest(c *xgb.Conn, Source, Destination Region, Left, Right, Top, Bottom uint16) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -1263,7 +1250,7 @@ type FetchRegionCookie struct { } // FetchRegion sends a checked request. -// If an error occurs, it will be returned with the reply by calling FetchRegionCookie.Reply() +// If an error occurs, it will be returned with the reply by calling FetchRegionCookie.Reply. func FetchRegion(c *xgb.Conn, Region Region) FetchRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1334,8 +1321,7 @@ func fetchRegionReply(buf []byte) *FetchRegionReply { return v } -// Write request to wire for FetchRegion -// fetchRegionRequest writes a FetchRegion request to a byte slice. +// fetchRegionRequest writes a FetchRegion request to a byte slice for transfer. func fetchRegionRequest(c *xgb.Conn, Region Region) []byte { size := 8 b := 0 @@ -1364,7 +1350,7 @@ type GetCursorImageCookie struct { } // GetCursorImage sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetCursorImageCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetCursorImageCookie.Reply. func GetCursorImage(c *xgb.Conn) GetCursorImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1462,8 +1448,7 @@ func getCursorImageReply(buf []byte) *GetCursorImageReply { return v } -// Write request to wire for GetCursorImage -// getCursorImageRequest writes a GetCursorImage request to a byte slice. +// getCursorImageRequest writes a GetCursorImage request to a byte slice for transfer. func getCursorImageRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -1489,7 +1474,7 @@ type GetCursorImageAndNameCookie struct { } // GetCursorImageAndName sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetCursorImageAndNameCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetCursorImageAndNameCookie.Reply. func GetCursorImageAndName(c *xgb.Conn) GetCursorImageAndNameCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1603,8 +1588,7 @@ func getCursorImageAndNameReply(buf []byte) *GetCursorImageAndNameReply { return v } -// Write request to wire for GetCursorImageAndName -// getCursorImageAndNameRequest writes a GetCursorImageAndName request to a byte slice. +// getCursorImageAndNameRequest writes a GetCursorImageAndName request to a byte slice for transfer. func getCursorImageAndNameRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -1630,7 +1614,7 @@ type GetCursorNameCookie struct { } // GetCursorName sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetCursorNameCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetCursorNameCookie.Reply. func GetCursorName(c *xgb.Conn, Cursor xproto.Cursor) GetCursorNameCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1709,8 +1693,7 @@ func getCursorNameReply(buf []byte) *GetCursorNameReply { return v } -// Write request to wire for GetCursorName -// getCursorNameRequest writes a GetCursorName request to a byte slice. +// getCursorNameRequest writes a GetCursorName request to a byte slice for transfer. func getCursorNameRequest(c *xgb.Conn, Cursor xproto.Cursor) []byte { size := 8 b := 0 @@ -1752,7 +1735,7 @@ func HideCursor(c *xgb.Conn, Window xproto.Window) HideCursorCookie { } // HideCursorChecked sends a checked request. -// If an error occurs, it can be retrieved using HideCursorCookie.Check() +// If an error occurs, it can be retrieved using HideCursorCookie.Check. func HideCursorChecked(c *xgb.Conn, Window xproto.Window) HideCursorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1770,8 +1753,7 @@ func (cook HideCursorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for HideCursor -// hideCursorRequest writes a HideCursor request to a byte slice. +// hideCursorRequest writes a HideCursor request to a byte slice for transfer. func hideCursorRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -1801,7 +1783,7 @@ type IntersectRegionCookie struct { // IntersectRegion sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func IntersectRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) IntersectRegionCookie { +func IntersectRegion(c *xgb.Conn, Source1, Source2, Destination Region) IntersectRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -1813,8 +1795,8 @@ func IntersectRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Re } // IntersectRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using IntersectRegionCookie.Check() -func IntersectRegionChecked(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) IntersectRegionCookie { +// If an error occurs, it can be retrieved using IntersectRegionCookie.Check. +func IntersectRegionChecked(c *xgb.Conn, Source1, Source2, Destination Region) IntersectRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -1831,9 +1813,8 @@ func (cook IntersectRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for IntersectRegion -// intersectRegionRequest writes a IntersectRegion request to a byte slice. -func intersectRegionRequest(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) []byte { +// intersectRegionRequest writes a IntersectRegion request to a byte slice for transfer. +func intersectRegionRequest(c *xgb.Conn, Source1, Source2, Destination Region) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -1880,7 +1861,7 @@ func InvertRegion(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destinati } // InvertRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using InvertRegionCookie.Check() +// If an error occurs, it can be retrieved using InvertRegionCookie.Check. func InvertRegionChecked(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destination Region) InvertRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1898,8 +1879,7 @@ func (cook InvertRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for InvertRegion -// invertRegionRequest writes a InvertRegion request to a byte slice. +// invertRegionRequest writes a InvertRegion request to a byte slice for transfer. func invertRegionRequest(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destination Region) []byte { size := 20 b := 0 @@ -1937,8 +1917,8 @@ type QueryVersionCookie struct { } // QueryVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply() -func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -1951,7 +1931,7 @@ func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uin // QueryVersionUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2008,9 +1988,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -2042,7 +2021,7 @@ type RegionExtentsCookie struct { // RegionExtents sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func RegionExtents(c *xgb.Conn, Source Region, Destination Region) RegionExtentsCookie { +func RegionExtents(c *xgb.Conn, Source, Destination Region) RegionExtentsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2054,8 +2033,8 @@ func RegionExtents(c *xgb.Conn, Source Region, Destination Region) RegionExtents } // RegionExtentsChecked sends a checked request. -// If an error occurs, it can be retrieved using RegionExtentsCookie.Check() -func RegionExtentsChecked(c *xgb.Conn, Source Region, Destination Region) RegionExtentsCookie { +// If an error occurs, it can be retrieved using RegionExtentsCookie.Check. +func RegionExtentsChecked(c *xgb.Conn, Source, Destination Region) RegionExtentsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2072,9 +2051,8 @@ func (cook RegionExtentsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for RegionExtents -// regionExtentsRequest writes a RegionExtents request to a byte slice. -func regionExtentsRequest(c *xgb.Conn, Source Region, Destination Region) []byte { +// regionExtentsRequest writes a RegionExtents request to a byte slice for transfer. +func regionExtentsRequest(c *xgb.Conn, Source, Destination Region) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -2118,7 +2096,7 @@ func SelectCursorInput(c *xgb.Conn, Window xproto.Window, EventMask uint32) Sele } // SelectCursorInputChecked sends a checked request. -// If an error occurs, it can be retrieved using SelectCursorInputCookie.Check() +// If an error occurs, it can be retrieved using SelectCursorInputCookie.Check. func SelectCursorInputChecked(c *xgb.Conn, Window xproto.Window, EventMask uint32) SelectCursorInputCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2136,8 +2114,7 @@ func (cook SelectCursorInputCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SelectCursorInput -// selectCursorInputRequest writes a SelectCursorInput request to a byte slice. +// selectCursorInputRequest writes a SelectCursorInput request to a byte slice for transfer. func selectCursorInputRequest(c *xgb.Conn, Window xproto.Window, EventMask uint32) []byte { size := 12 b := 0 @@ -2182,7 +2159,7 @@ func SelectSelectionInput(c *xgb.Conn, Window xproto.Window, Selection xproto.At } // SelectSelectionInputChecked sends a checked request. -// If an error occurs, it can be retrieved using SelectSelectionInputCookie.Check() +// If an error occurs, it can be retrieved using SelectSelectionInputCookie.Check. func SelectSelectionInputChecked(c *xgb.Conn, Window xproto.Window, Selection xproto.Atom, EventMask uint32) SelectSelectionInputCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2200,8 +2177,7 @@ func (cook SelectSelectionInputCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SelectSelectionInput -// selectSelectionInputRequest writes a SelectSelectionInput request to a byte slice. +// selectSelectionInputRequest writes a SelectSelectionInput request to a byte slice for transfer. func selectSelectionInputRequest(c *xgb.Conn, Window xproto.Window, Selection xproto.Atom, EventMask uint32) []byte { size := 16 b := 0 @@ -2249,7 +2225,7 @@ func SetCursorName(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string } // SetCursorNameChecked sends a checked request. -// If an error occurs, it can be retrieved using SetCursorNameCookie.Check() +// If an error occurs, it can be retrieved using SetCursorNameCookie.Check. func SetCursorNameChecked(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string) SetCursorNameCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2267,8 +2243,7 @@ func (cook SetCursorNameCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetCursorName -// setCursorNameRequest writes a SetCursorName request to a byte slice. +// setCursorNameRequest writes a SetCursorName request to a byte slice for transfer. func setCursorNameRequest(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string) []byte { size := xgb.Pad((12 + xgb.Pad((int(Nbytes) * 1)))) b := 0 @@ -2306,7 +2281,7 @@ type SetGCClipRegionCookie struct { // SetGCClipRegion sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetGCClipRegion(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin int16, YOrigin int16) SetGCClipRegionCookie { +func SetGCClipRegion(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin, YOrigin int16) SetGCClipRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2318,8 +2293,8 @@ func SetGCClipRegion(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin int } // SetGCClipRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using SetGCClipRegionCookie.Check() -func SetGCClipRegionChecked(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin int16, YOrigin int16) SetGCClipRegionCookie { +// If an error occurs, it can be retrieved using SetGCClipRegionCookie.Check. +func SetGCClipRegionChecked(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin, YOrigin int16) SetGCClipRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2336,9 +2311,8 @@ func (cook SetGCClipRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetGCClipRegion -// setGCClipRegionRequest writes a SetGCClipRegion request to a byte slice. -func setGCClipRegionRequest(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin int16, YOrigin int16) []byte { +// setGCClipRegionRequest writes a SetGCClipRegion request to a byte slice for transfer. +func setGCClipRegionRequest(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOrigin, YOrigin int16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -2376,7 +2350,7 @@ type SetPictureClipRegionCookie struct { // SetPictureClipRegion sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetPictureClipRegion(c *xgb.Conn, Picture render.Picture, Region Region, XOrigin int16, YOrigin int16) SetPictureClipRegionCookie { +func SetPictureClipRegion(c *xgb.Conn, Picture render.Picture, Region Region, XOrigin, YOrigin int16) SetPictureClipRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2388,8 +2362,8 @@ func SetPictureClipRegion(c *xgb.Conn, Picture render.Picture, Region Region, XO } // SetPictureClipRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using SetPictureClipRegionCookie.Check() -func SetPictureClipRegionChecked(c *xgb.Conn, Picture render.Picture, Region Region, XOrigin int16, YOrigin int16) SetPictureClipRegionCookie { +// If an error occurs, it can be retrieved using SetPictureClipRegionCookie.Check. +func SetPictureClipRegionChecked(c *xgb.Conn, Picture render.Picture, Region Region, XOrigin, YOrigin int16) SetPictureClipRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2406,9 +2380,8 @@ func (cook SetPictureClipRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetPictureClipRegion -// setPictureClipRegionRequest writes a SetPictureClipRegion request to a byte slice. -func setPictureClipRegionRequest(c *xgb.Conn, Picture render.Picture, Region Region, XOrigin int16, YOrigin int16) []byte { +// setPictureClipRegionRequest writes a SetPictureClipRegion request to a byte slice for transfer. +func setPictureClipRegionRequest(c *xgb.Conn, Picture render.Picture, Region Region, XOrigin, YOrigin int16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -2458,7 +2431,7 @@ func SetRegion(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) SetReg } // SetRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using SetRegionCookie.Check() +// If an error occurs, it can be retrieved using SetRegionCookie.Check. func SetRegionChecked(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) SetRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2476,8 +2449,7 @@ func (cook SetRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetRegion -// setRegionRequest writes a SetRegion request to a byte slice. +// setRegionRequest writes a SetRegion request to a byte slice for transfer. func setRegionRequest(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) []byte { size := xgb.Pad((8 + xgb.Pad((len(Rectangles) * 8)))) b := 0 @@ -2509,7 +2481,7 @@ type SetWindowShapeRegionCookie struct { // SetWindowShapeRegion sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetWindowShapeRegion(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, XOffset int16, YOffset int16, Region Region) SetWindowShapeRegionCookie { +func SetWindowShapeRegion(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, XOffset, YOffset int16, Region Region) SetWindowShapeRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2521,8 +2493,8 @@ func SetWindowShapeRegion(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, } // SetWindowShapeRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using SetWindowShapeRegionCookie.Check() -func SetWindowShapeRegionChecked(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, XOffset int16, YOffset int16, Region Region) SetWindowShapeRegionCookie { +// If an error occurs, it can be retrieved using SetWindowShapeRegionCookie.Check. +func SetWindowShapeRegionChecked(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, XOffset, YOffset int16, Region Region) SetWindowShapeRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2539,9 +2511,8 @@ func (cook SetWindowShapeRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetWindowShapeRegion -// setWindowShapeRegionRequest writes a SetWindowShapeRegion request to a byte slice. -func setWindowShapeRegionRequest(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, XOffset int16, YOffset int16, Region Region) []byte { +// setWindowShapeRegionRequest writes a SetWindowShapeRegion request to a byte slice for transfer. +func setWindowShapeRegionRequest(c *xgb.Conn, Dest xproto.Window, DestKind shape.Kind, XOffset, YOffset int16, Region Region) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -2596,7 +2567,7 @@ func ShowCursor(c *xgb.Conn, Window xproto.Window) ShowCursorCookie { } // ShowCursorChecked sends a checked request. -// If an error occurs, it can be retrieved using ShowCursorCookie.Check() +// If an error occurs, it can be retrieved using ShowCursorCookie.Check. func ShowCursorChecked(c *xgb.Conn, Window xproto.Window) ShowCursorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2614,8 +2585,7 @@ func (cook ShowCursorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ShowCursor -// showCursorRequest writes a ShowCursor request to a byte slice. +// showCursorRequest writes a ShowCursor request to a byte slice for transfer. func showCursorRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -2645,7 +2615,7 @@ type SubtractRegionCookie struct { // SubtractRegion sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SubtractRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) SubtractRegionCookie { +func SubtractRegion(c *xgb.Conn, Source1, Source2, Destination Region) SubtractRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2657,8 +2627,8 @@ func SubtractRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Reg } // SubtractRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using SubtractRegionCookie.Check() -func SubtractRegionChecked(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) SubtractRegionCookie { +// If an error occurs, it can be retrieved using SubtractRegionCookie.Check. +func SubtractRegionChecked(c *xgb.Conn, Source1, Source2, Destination Region) SubtractRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2675,9 +2645,8 @@ func (cook SubtractRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SubtractRegion -// subtractRegionRequest writes a SubtractRegion request to a byte slice. -func subtractRegionRequest(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) []byte { +// subtractRegionRequest writes a SubtractRegion request to a byte slice for transfer. +func subtractRegionRequest(c *xgb.Conn, Source1, Source2, Destination Region) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -2712,7 +2681,7 @@ type TranslateRegionCookie struct { // TranslateRegion sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func TranslateRegion(c *xgb.Conn, Region Region, Dx int16, Dy int16) TranslateRegionCookie { +func TranslateRegion(c *xgb.Conn, Region Region, Dx, Dy int16) TranslateRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2724,8 +2693,8 @@ func TranslateRegion(c *xgb.Conn, Region Region, Dx int16, Dy int16) TranslateRe } // TranslateRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using TranslateRegionCookie.Check() -func TranslateRegionChecked(c *xgb.Conn, Region Region, Dx int16, Dy int16) TranslateRegionCookie { +// If an error occurs, it can be retrieved using TranslateRegionCookie.Check. +func TranslateRegionChecked(c *xgb.Conn, Region Region, Dx, Dy int16) TranslateRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2742,9 +2711,8 @@ func (cook TranslateRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for TranslateRegion -// translateRegionRequest writes a TranslateRegion request to a byte slice. -func translateRegionRequest(c *xgb.Conn, Region Region, Dx int16, Dy int16) []byte { +// translateRegionRequest writes a TranslateRegion request to a byte slice for transfer. +func translateRegionRequest(c *xgb.Conn, Region Region, Dx, Dy int16) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -2779,7 +2747,7 @@ type UnionRegionCookie struct { // UnionRegion sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func UnionRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) UnionRegionCookie { +func UnionRegion(c *xgb.Conn, Source1, Source2, Destination Region) UnionRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2791,8 +2759,8 @@ func UnionRegion(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region } // UnionRegionChecked sends a checked request. -// If an error occurs, it can be retrieved using UnionRegionCookie.Check() -func UnionRegionChecked(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) UnionRegionCookie { +// If an error occurs, it can be retrieved using UnionRegionCookie.Check. +func UnionRegionChecked(c *xgb.Conn, Source1, Source2, Destination Region) UnionRegionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XFIXES"]; !ok { @@ -2809,9 +2777,8 @@ func (cook UnionRegionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UnionRegion -// unionRegionRequest writes a UnionRegion request to a byte slice. -func unionRegionRequest(c *xgb.Conn, Source1 Region, Source2 Region, Destination Region) []byte { +// unionRegionRequest writes a UnionRegion request to a byte slice for transfer. +func unionRegionRequest(c *xgb.Conn, Source1, Source2, Destination Region) []byte { size := 16 b := 0 buf := make([]byte, size) diff --git a/nexgb/xinerama/xinerama.go b/nexgb/xinerama/xinerama.go index 31b9f8d..12902a8 100644 --- a/nexgb/xinerama/xinerama.go +++ b/nexgb/xinerama/xinerama.go @@ -139,7 +139,7 @@ type GetScreenCountCookie struct { } // GetScreenCount sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetScreenCountCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetScreenCountCookie.Reply. func GetScreenCount(c *xgb.Conn, Window xproto.Window) GetScreenCountCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -204,8 +204,7 @@ func getScreenCountReply(buf []byte) *GetScreenCountReply { return v } -// Write request to wire for GetScreenCount -// getScreenCountRequest writes a GetScreenCount request to a byte slice. +// getScreenCountRequest writes a GetScreenCount request to a byte slice for transfer. func getScreenCountRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -234,7 +233,7 @@ type GetScreenSizeCookie struct { } // GetScreenSize sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetScreenSizeCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetScreenSizeCookie.Reply. func GetScreenSize(c *xgb.Conn, Window xproto.Window, Screen uint32) GetScreenSizeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -310,8 +309,7 @@ func getScreenSizeReply(buf []byte) *GetScreenSizeReply { return v } -// Write request to wire for GetScreenSize -// getScreenSizeRequest writes a GetScreenSize request to a byte slice. +// getScreenSizeRequest writes a GetScreenSize request to a byte slice for transfer. func getScreenSizeRequest(c *xgb.Conn, Window xproto.Window, Screen uint32) []byte { size := 12 b := 0 @@ -343,7 +341,7 @@ type GetStateCookie struct { } // GetState sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetStateCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetStateCookie.Reply. func GetState(c *xgb.Conn, Window xproto.Window) GetStateCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -408,8 +406,7 @@ func getStateReply(buf []byte) *GetStateReply { return v } -// Write request to wire for GetState -// getStateRequest writes a GetState request to a byte slice. +// getStateRequest writes a GetState request to a byte slice for transfer. func getStateRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -438,7 +435,7 @@ type IsActiveCookie struct { } // IsActive sends a checked request. -// If an error occurs, it will be returned with the reply by calling IsActiveCookie.Reply() +// If an error occurs, it will be returned with the reply by calling IsActiveCookie.Reply. func IsActive(c *xgb.Conn) IsActiveCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -502,8 +499,7 @@ func isActiveReply(buf []byte) *IsActiveReply { return v } -// Write request to wire for IsActive -// isActiveRequest writes a IsActive request to a byte slice. +// isActiveRequest writes a IsActive request to a byte slice for transfer. func isActiveRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -529,7 +525,7 @@ type QueryScreensCookie struct { } // QueryScreens sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryScreensCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryScreensCookie.Reply. func QueryScreens(c *xgb.Conn) QueryScreensCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -600,8 +596,7 @@ func queryScreensReply(buf []byte) *QueryScreensReply { return v } -// Write request to wire for QueryScreens -// queryScreensRequest writes a QueryScreens request to a byte slice. +// queryScreensRequest writes a QueryScreens request to a byte slice for transfer. func queryScreensRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -627,8 +622,8 @@ 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, Major byte, Minor byte) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, Major, Minor byte) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XINERAMA"]; !ok { @@ -641,7 +636,7 @@ func QueryVersion(c *xgb.Conn, Major byte, Minor byte) 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, Major byte, Minor byte) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, Major, Minor byte) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XINERAMA"]; !ok { @@ -695,9 +690,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, Major byte, Minor byte) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, Major, Minor byte) []byte { size := 8 b := 0 buf := make([]byte, size) diff --git a/nexgb/xprint/xprint.go b/nexgb/xprint/xprint.go index 7d7d3e4..7b4da5b 100644 --- a/nexgb/xprint/xprint.go +++ b/nexgb/xprint/xprint.go @@ -451,7 +451,7 @@ type CreateContextCookie struct { // CreateContext sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateContext(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) CreateContextCookie { +func CreateContext(c *xgb.Conn, ContextId, PrinterNameLen, LocaleLen uint32, PrinterName, Locale []String8) CreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XpExtension"]; !ok { @@ -463,8 +463,8 @@ func CreateContext(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleL } // CreateContextChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateContextCookie.Check() -func CreateContextChecked(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) CreateContextCookie { +// If an error occurs, it can be retrieved using CreateContextCookie.Check. +func CreateContextChecked(c *xgb.Conn, ContextId, PrinterNameLen, LocaleLen uint32, PrinterName, Locale []String8) CreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XpExtension"]; !ok { @@ -481,9 +481,8 @@ func (cook CreateContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateContext -// createContextRequest writes a CreateContext request to a byte slice. -func createContextRequest(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) []byte { +// createContextRequest writes a CreateContext request to a byte slice for transfer. +func createContextRequest(c *xgb.Conn, ContextId, PrinterNameLen, LocaleLen uint32, PrinterName, Locale []String8) []byte { size := xgb.Pad(((16 + xgb.Pad((int(PrinterNameLen) * 1))) + xgb.Pad((int(LocaleLen) * 1)))) b := 0 buf := make([]byte, size) @@ -540,7 +539,7 @@ func PrintDestroyContext(c *xgb.Conn, Context uint32) PrintDestroyContextCookie } // PrintDestroyContextChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintDestroyContextCookie.Check() +// If an error occurs, it can be retrieved using PrintDestroyContextCookie.Check. func PrintDestroyContextChecked(c *xgb.Conn, Context uint32) PrintDestroyContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -558,8 +557,7 @@ func (cook PrintDestroyContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintDestroyContext -// printDestroyContextRequest writes a PrintDestroyContext request to a byte slice. +// printDestroyContextRequest writes a PrintDestroyContext request to a byte slice for transfer. func printDestroyContextRequest(c *xgb.Conn, Context uint32) []byte { size := 8 b := 0 @@ -601,7 +599,7 @@ func PrintEndDoc(c *xgb.Conn, Cancel bool) PrintEndDocCookie { } // PrintEndDocChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintEndDocCookie.Check() +// If an error occurs, it can be retrieved using PrintEndDocCookie.Check. func PrintEndDocChecked(c *xgb.Conn, Cancel bool) PrintEndDocCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -619,8 +617,7 @@ func (cook PrintEndDocCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintEndDoc -// printEndDocRequest writes a PrintEndDoc request to a byte slice. +// printEndDocRequest writes a PrintEndDoc request to a byte slice for transfer. func printEndDocRequest(c *xgb.Conn, Cancel bool) []byte { size := 8 b := 0 @@ -666,7 +663,7 @@ func PrintEndJob(c *xgb.Conn, Cancel bool) PrintEndJobCookie { } // PrintEndJobChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintEndJobCookie.Check() +// If an error occurs, it can be retrieved using PrintEndJobCookie.Check. func PrintEndJobChecked(c *xgb.Conn, Cancel bool) PrintEndJobCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -684,8 +681,7 @@ func (cook PrintEndJobCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintEndJob -// printEndJobRequest writes a PrintEndJob request to a byte slice. +// printEndJobRequest writes a PrintEndJob request to a byte slice for transfer. func printEndJobRequest(c *xgb.Conn, Cancel bool) []byte { size := 8 b := 0 @@ -731,7 +727,7 @@ func PrintEndPage(c *xgb.Conn, Cancel bool) PrintEndPageCookie { } // PrintEndPageChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintEndPageCookie.Check() +// If an error occurs, it can be retrieved using PrintEndPageCookie.Check. func PrintEndPageChecked(c *xgb.Conn, Cancel bool) PrintEndPageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -749,8 +745,7 @@ func (cook PrintEndPageCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintEndPage -// printEndPageRequest writes a PrintEndPage request to a byte slice. +// printEndPageRequest writes a PrintEndPage request to a byte slice for transfer. func printEndPageRequest(c *xgb.Conn, Cancel bool) []byte { size := 8 b := 0 @@ -785,7 +780,7 @@ type PrintGetAttributesCookie struct { } // PrintGetAttributes sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintGetAttributesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintGetAttributesCookie.Reply. func PrintGetAttributes(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -859,8 +854,7 @@ func printGetAttributesReply(buf []byte) *PrintGetAttributesReply { return v } -// Write request to wire for PrintGetAttributes -// printGetAttributesRequest writes a PrintGetAttributes request to a byte slice. +// printGetAttributesRequest writes a PrintGetAttributes request to a byte slice for transfer. func printGetAttributesRequest(c *xgb.Conn, Context Pcontext, Pool byte) []byte { size := 12 b := 0 @@ -894,7 +888,7 @@ type PrintGetContextCookie struct { } // PrintGetContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintGetContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintGetContextCookie.Reply. func PrintGetContext(c *xgb.Conn) PrintGetContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -958,8 +952,7 @@ func printGetContextReply(buf []byte) *PrintGetContextReply { return v } -// Write request to wire for PrintGetContext -// printGetContextRequest writes a PrintGetContext request to a byte slice. +// printGetContextRequest writes a PrintGetContext request to a byte slice for transfer. func printGetContextRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -985,7 +978,7 @@ type PrintGetDocumentDataCookie struct { } // PrintGetDocumentData sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintGetDocumentDataCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintGetDocumentDataCookie.Reply. func PrintGetDocumentData(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintGetDocumentDataCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1065,8 +1058,7 @@ func printGetDocumentDataReply(buf []byte) *PrintGetDocumentDataReply { return v } -// Write request to wire for PrintGetDocumentData -// printGetDocumentDataRequest writes a PrintGetDocumentData request to a byte slice. +// printGetDocumentDataRequest writes a PrintGetDocumentData request to a byte slice for transfer. func printGetDocumentDataRequest(c *xgb.Conn, Context Pcontext, MaxBytes uint32) []byte { size := 12 b := 0 @@ -1098,7 +1090,7 @@ type PrintGetImageResolutionCookie struct { } // PrintGetImageResolution sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintGetImageResolutionCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintGetImageResolutionCookie.Reply. func PrintGetImageResolution(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1162,8 +1154,7 @@ func printGetImageResolutionReply(buf []byte) *PrintGetImageResolutionReply { return v } -// Write request to wire for PrintGetImageResolution -// printGetImageResolutionRequest writes a PrintGetImageResolution request to a byte slice. +// printGetImageResolutionRequest writes a PrintGetImageResolution request to a byte slice for transfer. func printGetImageResolutionRequest(c *xgb.Conn, Context Pcontext) []byte { size := 8 b := 0 @@ -1192,7 +1183,7 @@ type PrintGetOneAttributesCookie struct { } // PrintGetOneAttributes sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintGetOneAttributesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintGetOneAttributesCookie.Reply. func PrintGetOneAttributes(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) PrintGetOneAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1266,8 +1257,7 @@ func printGetOneAttributesReply(buf []byte) *PrintGetOneAttributesReply { return v } -// Write request to wire for PrintGetOneAttributes -// printGetOneAttributesRequest writes a PrintGetOneAttributes request to a byte slice. +// printGetOneAttributesRequest writes a PrintGetOneAttributes request to a byte slice for transfer. func printGetOneAttributesRequest(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) []byte { size := xgb.Pad((16 + xgb.Pad((int(NameLen) * 1)))) b := 0 @@ -1309,7 +1299,7 @@ type PrintGetPageDimensionsCookie struct { } // PrintGetPageDimensions sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintGetPageDimensionsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintGetPageDimensionsCookie.Reply. func PrintGetPageDimensions(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1393,8 +1383,7 @@ func printGetPageDimensionsReply(buf []byte) *PrintGetPageDimensionsReply { return v } -// Write request to wire for PrintGetPageDimensions -// printGetPageDimensionsRequest writes a PrintGetPageDimensions request to a byte slice. +// printGetPageDimensionsRequest writes a PrintGetPageDimensions request to a byte slice for transfer. func printGetPageDimensionsRequest(c *xgb.Conn, Context Pcontext) []byte { size := 8 b := 0 @@ -1423,8 +1412,8 @@ type PrintGetPrinterListCookie struct { } // PrintGetPrinterList sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintGetPrinterListCookie.Reply() -func PrintGetPrinterList(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) PrintGetPrinterListCookie { +// If an error occurs, it will be returned with the reply by calling PrintGetPrinterListCookie.Reply. +func PrintGetPrinterList(c *xgb.Conn, PrinterNameLen, LocaleLen uint32, PrinterName, Locale []String8) PrintGetPrinterListCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XpExtension"]; !ok { @@ -1437,7 +1426,7 @@ func PrintGetPrinterList(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, P // PrintGetPrinterListUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func PrintGetPrinterListUnchecked(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) PrintGetPrinterListCookie { +func PrintGetPrinterListUnchecked(c *xgb.Conn, PrinterNameLen, LocaleLen uint32, PrinterName, Locale []String8) PrintGetPrinterListCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XpExtension"]; !ok { @@ -1494,9 +1483,8 @@ func printGetPrinterListReply(buf []byte) *PrintGetPrinterListReply { return v } -// Write request to wire for PrintGetPrinterList -// printGetPrinterListRequest writes a PrintGetPrinterList request to a byte slice. -func printGetPrinterListRequest(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) []byte { +// printGetPrinterListRequest writes a PrintGetPrinterList request to a byte slice for transfer. +func printGetPrinterListRequest(c *xgb.Conn, PrinterNameLen, LocaleLen uint32, PrinterName, Locale []String8) []byte { size := xgb.Pad(((12 + xgb.Pad((int(PrinterNameLen) * 1))) + xgb.Pad((int(LocaleLen) * 1)))) b := 0 buf := make([]byte, size) @@ -1537,7 +1525,7 @@ type PrintGetScreenOfContextCookie struct { } // PrintGetScreenOfContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintGetScreenOfContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintGetScreenOfContextCookie.Reply. func PrintGetScreenOfContext(c *xgb.Conn) PrintGetScreenOfContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1601,8 +1589,7 @@ func printGetScreenOfContextReply(buf []byte) *PrintGetScreenOfContextReply { return v } -// Write request to wire for PrintGetScreenOfContext -// printGetScreenOfContextRequest writes a PrintGetScreenOfContext request to a byte slice. +// printGetScreenOfContextRequest writes a PrintGetScreenOfContext request to a byte slice for transfer. func printGetScreenOfContextRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -1628,7 +1615,7 @@ type PrintInputSelectedCookie struct { } // PrintInputSelected sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintInputSelectedCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintInputSelectedCookie.Reply. func PrintInputSelected(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1696,8 +1683,7 @@ func printInputSelectedReply(buf []byte) *PrintInputSelectedReply { return v } -// Write request to wire for PrintInputSelected -// printInputSelectedRequest writes a PrintInputSelected request to a byte slice. +// printInputSelectedRequest writes a PrintInputSelected request to a byte slice for transfer. func printInputSelectedRequest(c *xgb.Conn, Context Pcontext) []byte { size := 8 b := 0 @@ -1727,7 +1713,7 @@ type PrintPutDocumentDataCookie struct { // PrintPutDocumentData sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func PrintPutDocumentData(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) PrintPutDocumentDataCookie { +func PrintPutDocumentData(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt, LenOptions uint16, Data []byte, DocFormat, Options []String8) PrintPutDocumentDataCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XpExtension"]; !ok { @@ -1739,8 +1725,8 @@ func PrintPutDocumentData(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, } // PrintPutDocumentDataChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintPutDocumentDataCookie.Check() -func PrintPutDocumentDataChecked(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) PrintPutDocumentDataCookie { +// If an error occurs, it can be retrieved using PrintPutDocumentDataCookie.Check. +func PrintPutDocumentDataChecked(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt, LenOptions uint16, Data []byte, DocFormat, Options []String8) PrintPutDocumentDataCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XpExtension"]; !ok { @@ -1757,9 +1743,8 @@ func (cook PrintPutDocumentDataCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintPutDocumentData -// printPutDocumentDataRequest writes a PrintPutDocumentData request to a byte slice. -func printPutDocumentDataRequest(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) []byte { +// printPutDocumentDataRequest writes a PrintPutDocumentData request to a byte slice for transfer. +func printPutDocumentDataRequest(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt, LenOptions uint16, Data []byte, DocFormat, Options []String8) []byte { size := xgb.Pad((((16 + xgb.Pad((int(LenData) * 1))) + xgb.Pad((int(LenFmt) * 1))) + xgb.Pad((int(LenOptions) * 1)))) b := 0 buf := make([]byte, size) @@ -1809,7 +1794,7 @@ type PrintQueryScreensCookie struct { } // PrintQueryScreens sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintQueryScreensCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintQueryScreensCookie.Reply. func PrintQueryScreens(c *xgb.Conn) PrintQueryScreensCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1883,8 +1868,7 @@ func printQueryScreensReply(buf []byte) *PrintQueryScreensReply { return v } -// Write request to wire for PrintQueryScreens -// printQueryScreensRequest writes a PrintQueryScreens request to a byte slice. +// printQueryScreensRequest writes a PrintQueryScreens request to a byte slice for transfer. func printQueryScreensRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -1910,7 +1894,7 @@ type PrintQueryVersionCookie struct { } // PrintQueryVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintQueryVersionCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintQueryVersionCookie.Reply. func PrintQueryVersion(c *xgb.Conn) PrintQueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1978,8 +1962,7 @@ func printQueryVersionReply(buf []byte) *PrintQueryVersionReply { return v } -// Write request to wire for PrintQueryVersion -// printQueryVersionRequest writes a PrintQueryVersion request to a byte slice. +// printQueryVersionRequest writes a PrintQueryVersion request to a byte slice for transfer. func printQueryVersionRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -2018,7 +2001,7 @@ func PrintRehashPrinterList(c *xgb.Conn) PrintRehashPrinterListCookie { } // PrintRehashPrinterListChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintRehashPrinterListCookie.Check() +// If an error occurs, it can be retrieved using PrintRehashPrinterListCookie.Check. func PrintRehashPrinterListChecked(c *xgb.Conn) PrintRehashPrinterListCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2036,8 +2019,7 @@ func (cook PrintRehashPrinterListCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintRehashPrinterList -// printRehashPrinterListRequest writes a PrintRehashPrinterList request to a byte slice. +// printRehashPrinterListRequest writes a PrintRehashPrinterList request to a byte slice for transfer. func printRehashPrinterListRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -2076,7 +2058,7 @@ func PrintSelectInput(c *xgb.Conn, Context Pcontext, EventMask uint32) PrintSele } // PrintSelectInputChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintSelectInputCookie.Check() +// If an error occurs, it can be retrieved using PrintSelectInputCookie.Check. func PrintSelectInputChecked(c *xgb.Conn, Context Pcontext, EventMask uint32) PrintSelectInputCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2094,8 +2076,7 @@ func (cook PrintSelectInputCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintSelectInput -// printSelectInputRequest writes a PrintSelectInput request to a byte slice. +// printSelectInputRequest writes a PrintSelectInput request to a byte slice for transfer. func printSelectInputRequest(c *xgb.Conn, Context Pcontext, EventMask uint32) []byte { size := 12 b := 0 @@ -2128,7 +2109,7 @@ type PrintSetAttributesCookie struct { // PrintSetAttributes sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func PrintSetAttributes(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) PrintSetAttributesCookie { +func PrintSetAttributes(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool, Rule byte, Attributes []String8) PrintSetAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XpExtension"]; !ok { @@ -2140,8 +2121,8 @@ func PrintSetAttributes(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool by } // PrintSetAttributesChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintSetAttributesCookie.Check() -func PrintSetAttributesChecked(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) PrintSetAttributesCookie { +// If an error occurs, it can be retrieved using PrintSetAttributesCookie.Check. +func PrintSetAttributesChecked(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool, Rule byte, Attributes []String8) PrintSetAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XpExtension"]; !ok { @@ -2158,9 +2139,8 @@ func (cook PrintSetAttributesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintSetAttributes -// printSetAttributesRequest writes a PrintSetAttributes request to a byte slice. -func printSetAttributesRequest(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) []byte { +// printSetAttributesRequest writes a PrintSetAttributes request to a byte slice for transfer. +func printSetAttributesRequest(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool, Rule byte, Attributes []String8) []byte { size := xgb.Pad((16 + xgb.Pad((len(Attributes) * 1)))) b := 0 buf := make([]byte, size) @@ -2217,7 +2197,7 @@ func PrintSetContext(c *xgb.Conn, Context uint32) PrintSetContextCookie { } // PrintSetContextChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintSetContextCookie.Check() +// If an error occurs, it can be retrieved using PrintSetContextCookie.Check. func PrintSetContextChecked(c *xgb.Conn, Context uint32) PrintSetContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2235,8 +2215,7 @@ func (cook PrintSetContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintSetContext -// printSetContextRequest writes a PrintSetContext request to a byte slice. +// printSetContextRequest writes a PrintSetContext request to a byte slice for transfer. func printSetContextRequest(c *xgb.Conn, Context uint32) []byte { size := 8 b := 0 @@ -2265,7 +2244,7 @@ type PrintSetImageResolutionCookie struct { } // PrintSetImageResolution sends a checked request. -// If an error occurs, it will be returned with the reply by calling PrintSetImageResolutionCookie.Reply() +// If an error occurs, it will be returned with the reply by calling PrintSetImageResolutionCookie.Reply. func PrintSetImageResolution(c *xgb.Conn, Context Pcontext, ImageResolution uint16) PrintSetImageResolutionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2334,8 +2313,7 @@ func printSetImageResolutionReply(buf []byte) *PrintSetImageResolutionReply { return v } -// Write request to wire for PrintSetImageResolution -// printSetImageResolutionRequest writes a PrintSetImageResolution request to a byte slice. +// printSetImageResolutionRequest writes a PrintSetImageResolution request to a byte slice for transfer. func printSetImageResolutionRequest(c *xgb.Conn, Context Pcontext, ImageResolution uint16) []byte { size := 12 b := 0 @@ -2380,7 +2358,7 @@ func PrintStartDoc(c *xgb.Conn, DriverMode byte) PrintStartDocCookie { } // PrintStartDocChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintStartDocCookie.Check() +// If an error occurs, it can be retrieved using PrintStartDocCookie.Check. func PrintStartDocChecked(c *xgb.Conn, DriverMode byte) PrintStartDocCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2398,8 +2376,7 @@ func (cook PrintStartDocCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintStartDoc -// printStartDocRequest writes a PrintStartDoc request to a byte slice. +// printStartDocRequest writes a PrintStartDoc request to a byte slice for transfer. func printStartDocRequest(c *xgb.Conn, DriverMode byte) []byte { size := 8 b := 0 @@ -2441,7 +2418,7 @@ func PrintStartJob(c *xgb.Conn, OutputMode byte) PrintStartJobCookie { } // PrintStartJobChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintStartJobCookie.Check() +// If an error occurs, it can be retrieved using PrintStartJobCookie.Check. func PrintStartJobChecked(c *xgb.Conn, OutputMode byte) PrintStartJobCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2459,8 +2436,7 @@ func (cook PrintStartJobCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintStartJob -// printStartJobRequest writes a PrintStartJob request to a byte slice. +// printStartJobRequest writes a PrintStartJob request to a byte slice for transfer. func printStartJobRequest(c *xgb.Conn, OutputMode byte) []byte { size := 8 b := 0 @@ -2502,7 +2478,7 @@ func PrintStartPage(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie { } // PrintStartPageChecked sends a checked request. -// If an error occurs, it can be retrieved using PrintStartPageCookie.Check() +// If an error occurs, it can be retrieved using PrintStartPageCookie.Check. func PrintStartPageChecked(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2520,8 +2496,7 @@ func (cook PrintStartPageCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PrintStartPage -// printStartPageRequest writes a PrintStartPage request to a byte slice. +// printStartPageRequest writes a PrintStartPage request to a byte slice for transfer. func printStartPageRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 diff --git a/nexgb/xproto/xproto.go b/nexgb/xproto/xproto.go index b18315f..82f893d 100644 --- a/nexgb/xproto/xproto.go +++ b/nexgb/xproto/xproto.go @@ -369,17 +369,32 @@ const ( const ButtonPress = 4 type ButtonPressEvent struct { - Sequence uint16 - Detail Button - Time Timestamp - Root Window - Event Window - Child Window - RootX int16 - RootY int16 - EventX int16 - EventY int16 - State uint16 + Sequence uint16 + // The keycode (a number representing a physical key on the keyboard) of the key + // which was pressed. + Detail Button + // Time when the event was generated (in milliseconds). + Time Timestamp + // The root window of Child. + Root Window + Event Window + Child Window + // The X coordinate of the pointer relative to the Root window at the time of + // the event. + RootX int16 + // The Y coordinate of the pointer relative to the Root window at the time of + // the event. + RootY int16 + // If SameScreen is true, this is the X coordinate relative to the Event + // window's origin. Otherwise, EventX will be set to zero. + EventX int16 + // If SameScreen is true, this is the Y coordinate relative to the Event + // window's origin. Otherwise, EventY will be set to zero. + EventY int16 + // The logical state of the pointer buttons and modifier keys just prior to the + // event. + State uint16 + // Whether the Event window is on the same screen as the Root window. SameScreen bool // padding: 1 bytes } @@ -713,7 +728,10 @@ const CirculateNotify = 26 type CirculateNotifyEvent struct { Sequence uint16 // padding: 1 bytes - Event Window + // Either the restacked window or its parent, depending on whether + // StructureNotify or SubstructureNotify was selected. + Event Window + // The restacked window. Window Window // padding: 4 bytes Place byte @@ -836,10 +854,14 @@ const ClientMessage = 33 type ClientMessageEvent struct { Sequence uint16 - Format byte - Window Window - Type Atom - Data ClientMessageDataUnion + // Specifies how to interpret Data. Can be either 8, 16 or 32. + Format byte + Window Window + // An atom which indicates how the data should be interpreted by the receiving + // client. + Type Atom + // The data itself (20 bytes max). + Data ClientMessageDataUnion } // ClientMessageEventNew constructs a ClientMessageEvent value that implements xgb.Event from a byte slice. @@ -1259,7 +1281,10 @@ const ColormapNotify = 32 type ColormapNotifyEvent struct { Sequence uint16 // padding: 1 bytes - Window Window + // The window whose associated colormap is changed, installed or uninstalled. + Window Window + // The colormap which is changed, installed or uninstalled. This is None + // when the colormap is changed by a call to FreeColormap. Colormap Colormap New bool State byte @@ -1374,14 +1399,28 @@ const ConfigureNotify = 22 type ConfigureNotifyEvent struct { Sequence uint16 // padding: 1 bytes - Event Window - Window Window - AboveSibling Window - X int16 - Y int16 - Width uint16 - Height uint16 - BorderWidth uint16 + // The reconfigured window or its parent, depending on whether StructureNotify + // or SubstructureNotify was selected. + Event Window + // The window whose size, position, border, and/or stacking order was changed. + Window Window + // If None, the Window is on the bottom of the stack with respect to + // sibling windows. However, if set to a sibling window, the Window is placed on + // top of this sibling window. + AboveSibling Window + // The X coordinate of the upper-left outside corner of Window, relative to the + // parent window's origin. + X int16 + // The Y coordinate of the upper-left outside corner of Window, relative to the + // parent window's origin. + Y int16 + // The inside width of Window, not including the border. + Width uint16 + // The inside height of Window, not including the border. + Height uint16 + // The border width of Window. + BorderWidth uint16 + // Window managers should ignore this window if OverrideRedirect is 1. OverrideRedirect bool // padding: 1 bytes } @@ -1930,7 +1969,10 @@ const DestroyNotify = 17 type DestroyNotifyEvent struct { Sequence uint16 // padding: 1 bytes - Event Window + // The reconfigured window or its parent, depending on whether StructureNotify + // or SubstructureNotify was selected. + Event Window + // The window that is destroyed. Window Window } @@ -2047,15 +2089,25 @@ func init() { const EnterNotify = 7 type EnterNotifyEvent struct { - Sequence uint16 - Detail byte - Time Timestamp - Root Window - Event Window - Child Window - RootX int16 - RootY int16 - EventX int16 + Sequence uint16 + Detail byte + Time Timestamp + // The root window for the final cursor position. + Root Window + // The window on which the event was generated. + Event Window + // If the Event window has subwindows and the final pointer position is in one + // of them, then Child is set to that subwindow, WindowNone otherwise. + Child Window + // The pointer X coordinate relative to Root's origin at the time of the event. + RootX int16 + // The pointer Y coordinate relative to Root's origin at the time of the event. + RootY int16 + // If Event is on the same screen as Root, this is the pointer X coordinate + // relative to the event window's origin. + EventX int16 + // If Event is on the same screen as Root, this is the pointer Y coordinate + // relative to the event window's origin. EventY int16 State uint16 Mode byte @@ -2224,12 +2276,23 @@ const Expose = 12 type ExposeEvent struct { Sequence uint16 // padding: 1 bytes + // The exposed (damaged) window. Window Window - X uint16 - Y uint16 - Width uint16 + // The X coordinate of the left-upper corner of the exposed rectangle, relative to + // the Window's origin. + X uint16 + // The Y coordinate of the left-upper corner of the exposed rectangle, relative to + // the Window's origin. + Y uint16 + // The width of the exposed rectangle. + Width uint16 + // The height of the exposed rectangle. Height uint16 - Count uint16 + // The amount of Expose events following this one. Simple applications that do + // not want to optimize redisplay by distinguishing between subareas of its window + // can just ignore all Expose events with nonzero counts and perform full + // redisplays on events with zero counts. + Count uint16 // padding: 2 bytes } @@ -2358,8 +2421,10 @@ const FocusIn = 9 type FocusInEvent struct { Sequence uint16 Detail byte - Event Window - Mode byte + // The window on which the focus event was generated. This is the window used by + // the X server to report the event. + Event Window + Mode byte // padding: 3 bytes } @@ -3260,17 +3325,32 @@ const ( const KeyPress = 2 type KeyPressEvent struct { - Sequence uint16 - Detail Keycode - Time Timestamp - Root Window - Event Window - Child Window - RootX int16 - RootY int16 - EventX int16 - EventY int16 - State uint16 + Sequence uint16 + // The keycode (a number representing a physical key on the keyboard) of the key + // which was pressed. + Detail Keycode + // Time when the event was generated (in milliseconds). + Time Timestamp + // The root window of Child. + Root Window + Event Window + Child Window + // The X coordinate of the pointer relative to the Root window at the time of + // the event. + RootX int16 + // The Y coordinate of the pointer relative to the Root window at the time of + // the event. + RootY int16 + // If SameScreen is true, this is the X coordinate relative to the Event + // window's origin. Otherwise, EventX will be set to zero. + EventX int16 + // If SameScreen is true, this is the Y coordinate relative to the Event + // window's origin. Otherwise, EventY will be set to zero. + EventY int16 + // The logical state of the pointer buttons and modifier keys just prior to the + // event. + State uint16 + // Whether the Event window is on the same screen as the Root window. SameScreen bool // padding: 1 bytes } @@ -3621,8 +3701,12 @@ const MapNotify = 19 type MapNotifyEvent struct { Sequence uint16 // padding: 1 bytes - Event Window - Window Window + // The window which was mapped or its parent, depending on whether + // StructureNotify or SubstructureNotify was selected. + Event Window + // The window that was mapped. + Window Window + // Window managers should ignore this window if OverrideRedirect is 1. OverrideRedirect bool // padding: 3 bytes } @@ -3713,7 +3797,9 @@ const MapRequest = 20 type MapRequestEvent struct { Sequence uint16 // padding: 1 bytes + // The parent of Window. Parent Window + // The window to be mapped. Window Window } @@ -3796,9 +3882,11 @@ const MappingNotify = 34 type MappingNotifyEvent struct { Sequence uint16 // padding: 1 bytes - Request byte + Request byte + // The first number in the range of the altered mapping. FirstKeycode Keycode - Count byte + // The number of keycodes altered. + Count byte // padding: 1 bytes } @@ -3939,17 +4027,32 @@ const ( const MotionNotify = 6 type MotionNotifyEvent struct { - Sequence uint16 - Detail byte - Time Timestamp - Root Window - Event Window - Child Window - RootX int16 - RootY int16 - EventX int16 - EventY int16 - State uint16 + Sequence uint16 + // The keycode (a number representing a physical key on the keyboard) of the key + // which was pressed. + Detail byte + // Time when the event was generated (in milliseconds). + Time Timestamp + // The root window of Child. + Root Window + Event Window + Child Window + // The X coordinate of the pointer relative to the Root window at the time of + // the event. + RootX int16 + // The Y coordinate of the pointer relative to the Root window at the time of + // the event. + RootY int16 + // If SameScreen is true, this is the X coordinate relative to the Event + // window's origin. Otherwise, EventX will be set to zero. + EventX int16 + // If SameScreen is true, this is the Y coordinate relative to the Event + // window's origin. Otherwise, EventY will be set to zero. + EventY int16 + // The logical state of the pointer buttons and modifier keys just prior to the + // event. + State uint16 + // Whether the Event window is on the same screen as the Root window. SameScreen bool // padding: 1 bytes } @@ -4360,10 +4463,13 @@ const PropertyNotify = 28 type PropertyNotifyEvent struct { Sequence uint16 // padding: 1 bytes + // The window whose associated property was changed. Window Window - Atom Atom - Time Timestamp - State byte + // The property's atom, to indicate which property was changed. + Atom Atom + // A timestamp of the server time when the property was changed. + Time Timestamp + State byte // padding: 3 bytes } @@ -6036,8 +6142,13 @@ const UnmapNotify = 18 type UnmapNotifyEvent struct { Sequence uint16 // padding: 1 bytes - Event Window - Window Window + // The reconfigured window or its parent, depending on whether StructureNotify + // or SubstructureNotify was selected. + Event Window + // The window that was unmapped. + Window Window + // Set to 1 if the event was generated as a result of a resizing of the window's + // parent when Window had a win_gravity of UnmapGravity. FromConfigure bool // padding: 3 bytes } @@ -6460,9 +6571,17 @@ type AllocColorCookie struct { *xgb.Cookie } +// Allocates a read-only colormap entry corresponding to the closest RGB value +// supported by the hardware. If you are using TrueColor, you can take a shortcut +// and directly calculate the color pixel value to avoid the round trip. But, for +// example, on 16-bit color setups (VNC), you can easily get the closest supported +// RGB value to the RGB value you are specifying. +// +// May return a Colormap error if the specified colormap Cmap does not exist. +// // AllocColor sends a checked request. -// If an error occurs, it will be returned with the reply by calling AllocColorCookie.Reply() -func AllocColor(c *xgb.Conn, Cmap Colormap, Red uint16, Green uint16, Blue uint16) AllocColorCookie { +// If an error occurs, it will be returned with the reply by calling AllocColorCookie.Reply. +func AllocColor(c *xgb.Conn, Cmap Colormap, Red, Green, Blue uint16) AllocColorCookie { cookie := c.NewCookie(true, true) c.NewRequest(allocColorRequest(c, Cmap, Red, Green, Blue), cookie) return AllocColorCookie{cookie} @@ -6470,7 +6589,7 @@ func AllocColor(c *xgb.Conn, Cmap Colormap, Red uint16, Green uint16, Blue uint1 // AllocColorUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func AllocColorUnchecked(c *xgb.Conn, Cmap Colormap, Red uint16, Green uint16, Blue uint16) AllocColorCookie { +func AllocColorUnchecked(c *xgb.Conn, Cmap Colormap, Red, Green, Blue uint16) AllocColorCookie { cookie := c.NewCookie(false, true) c.NewRequest(allocColorRequest(c, Cmap, Red, Green, Blue), cookie) return AllocColorCookie{cookie} @@ -6530,9 +6649,8 @@ func allocColorReply(buf []byte) *AllocColorReply { return v } -// Write request to wire for AllocColor -// allocColorRequest writes a AllocColor request to a byte slice. -func allocColorRequest(c *xgb.Conn, Cmap Colormap, Red uint16, Green uint16, Blue uint16) []byte { +// allocColorRequest writes a AllocColor request to a byte slice for transfer. +func allocColorRequest(c *xgb.Conn, Cmap Colormap, Red, Green, Blue uint16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -6568,8 +6686,8 @@ type AllocColorCellsCookie struct { } // AllocColorCells sends a checked request. -// If an error occurs, it will be returned with the reply by calling AllocColorCellsCookie.Reply() -func AllocColorCells(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors uint16, Planes uint16) AllocColorCellsCookie { +// If an error occurs, it will be returned with the reply by calling AllocColorCellsCookie.Reply. +func AllocColorCells(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors, Planes uint16) AllocColorCellsCookie { cookie := c.NewCookie(true, true) c.NewRequest(allocColorCellsRequest(c, Contiguous, Cmap, Colors, Planes), cookie) return AllocColorCellsCookie{cookie} @@ -6577,7 +6695,7 @@ func AllocColorCells(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors uint16, // AllocColorCellsUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func AllocColorCellsUnchecked(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors uint16, Planes uint16) AllocColorCellsCookie { +func AllocColorCellsUnchecked(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors, Planes uint16) AllocColorCellsCookie { cookie := c.NewCookie(false, true) c.NewRequest(allocColorCellsRequest(c, Contiguous, Cmap, Colors, Planes), cookie) return AllocColorCellsCookie{cookie} @@ -6643,9 +6761,8 @@ func allocColorCellsReply(buf []byte) *AllocColorCellsReply { return v } -// Write request to wire for AllocColorCells -// allocColorCellsRequest writes a AllocColorCells request to a byte slice. -func allocColorCellsRequest(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors uint16, Planes uint16) []byte { +// allocColorCellsRequest writes a AllocColorCells request to a byte slice for transfer. +func allocColorCellsRequest(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors, Planes uint16) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -6681,8 +6798,8 @@ type AllocColorPlanesCookie struct { } // AllocColorPlanes sends a checked request. -// If an error occurs, it will be returned with the reply by calling AllocColorPlanesCookie.Reply() -func AllocColorPlanes(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors uint16, Reds uint16, Greens uint16, Blues uint16) AllocColorPlanesCookie { +// If an error occurs, it will be returned with the reply by calling AllocColorPlanesCookie.Reply. +func AllocColorPlanes(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors, Reds, Greens, Blues uint16) AllocColorPlanesCookie { cookie := c.NewCookie(true, true) c.NewRequest(allocColorPlanesRequest(c, Contiguous, Cmap, Colors, Reds, Greens, Blues), cookie) return AllocColorPlanesCookie{cookie} @@ -6690,7 +6807,7 @@ func AllocColorPlanes(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors uint16 // AllocColorPlanesUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func AllocColorPlanesUnchecked(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors uint16, Reds uint16, Greens uint16, Blues uint16) AllocColorPlanesCookie { +func AllocColorPlanesUnchecked(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors, Reds, Greens, Blues uint16) AllocColorPlanesCookie { cookie := c.NewCookie(false, true) c.NewRequest(allocColorPlanesRequest(c, Contiguous, Cmap, Colors, Reds, Greens, Blues), cookie) return AllocColorPlanesCookie{cookie} @@ -6760,9 +6877,8 @@ func allocColorPlanesReply(buf []byte) *AllocColorPlanesReply { return v } -// Write request to wire for AllocColorPlanes -// allocColorPlanesRequest writes a AllocColorPlanes request to a byte slice. -func allocColorPlanesRequest(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors uint16, Reds uint16, Greens uint16, Blues uint16) []byte { +// allocColorPlanesRequest writes a AllocColorPlanes request to a byte slice for transfer. +func allocColorPlanesRequest(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors, Reds, Greens, Blues uint16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -6804,7 +6920,7 @@ type AllocNamedColorCookie struct { } // AllocNamedColor sends a checked request. -// If an error occurs, it will be returned with the reply by calling AllocNamedColorCookie.Reply() +// If an error occurs, it will be returned with the reply by calling AllocNamedColorCookie.Reply. func AllocNamedColor(c *xgb.Conn, Cmap Colormap, NameLen uint16, Name string) AllocNamedColorCookie { cookie := c.NewCookie(true, true) c.NewRequest(allocNamedColorRequest(c, Cmap, NameLen, Name), cookie) @@ -6882,8 +6998,7 @@ func allocNamedColorReply(buf []byte) *AllocNamedColorReply { return v } -// Write request to wire for AllocNamedColor -// allocNamedColorRequest writes a AllocNamedColor request to a byte slice. +// allocNamedColorRequest writes a AllocNamedColor request to a byte slice for transfer. func allocNamedColorRequest(c *xgb.Conn, Cmap Colormap, NameLen uint16, Name string) []byte { size := xgb.Pad((12 + xgb.Pad((int(NameLen) * 1)))) b := 0 @@ -6916,6 +7031,13 @@ type AllowEventsCookie struct { *xgb.Cookie } +// Releases queued events if the client has caused a device (pointer/keyboard) to +// freeze due to grabbing it actively. This request has no effect if Time is +// earlier than the last-grab time of the most recent active grab for this client +// or if Time is later than the current X server time. +// +// May return a Value error if you specified an invalid Mode. +// // AllowEvents sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func AllowEvents(c *xgb.Conn, Mode byte, Time Timestamp) AllowEventsCookie { @@ -6925,7 +7047,7 @@ func AllowEvents(c *xgb.Conn, Mode byte, Time Timestamp) AllowEventsCookie { } // AllowEventsChecked sends a checked request. -// If an error occurs, it can be retrieved using AllowEventsCookie.Check() +// If an error occurs, it can be retrieved using AllowEventsCookie.Check. func AllowEventsChecked(c *xgb.Conn, Mode byte, Time Timestamp) AllowEventsCookie { cookie := c.NewCookie(true, false) c.NewRequest(allowEventsRequest(c, Mode, Time), cookie) @@ -6938,8 +7060,7 @@ func (cook AllowEventsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for AllowEvents -// allowEventsRequest writes a AllowEvents request to a byte slice. +// allowEventsRequest writes a AllowEvents request to a byte slice for transfer. func allowEventsRequest(c *xgb.Conn, Mode byte, Time Timestamp) []byte { size := 8 b := 0 @@ -6974,7 +7095,7 @@ func Bell(c *xgb.Conn, Percent int8) BellCookie { } // BellChecked sends a checked request. -// If an error occurs, it can be retrieved using BellCookie.Check() +// If an error occurs, it can be retrieved using BellCookie.Check. func BellChecked(c *xgb.Conn, Percent int8) BellCookie { cookie := c.NewCookie(true, false) c.NewRequest(bellRequest(c, Percent), cookie) @@ -6987,8 +7108,7 @@ func (cook BellCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for Bell -// bellRequest writes a Bell request to a byte slice. +// bellRequest writes a Bell request to a byte slice for transfer. func bellRequest(c *xgb.Conn, Percent int8) []byte { size := 4 b := 0 @@ -7020,7 +7140,7 @@ func ChangeActivePointerGrab(c *xgb.Conn, Cursor Cursor, Time Timestamp, EventMa } // ChangeActivePointerGrabChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeActivePointerGrabCookie.Check() +// If an error occurs, it can be retrieved using ChangeActivePointerGrabCookie.Check. func ChangeActivePointerGrabChecked(c *xgb.Conn, Cursor Cursor, Time Timestamp, EventMask uint16) ChangeActivePointerGrabCookie { cookie := c.NewCookie(true, false) c.NewRequest(changeActivePointerGrabRequest(c, Cursor, Time, EventMask), cookie) @@ -7033,8 +7153,7 @@ func (cook ChangeActivePointerGrabCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeActivePointerGrab -// changeActivePointerGrabRequest writes a ChangeActivePointerGrab request to a byte slice. +// changeActivePointerGrabRequest writes a ChangeActivePointerGrab request to a byte slice for transfer. func changeActivePointerGrabRequest(c *xgb.Conn, Cursor Cursor, Time Timestamp, EventMask uint16) []byte { size := 16 b := 0 @@ -7067,6 +7186,12 @@ type ChangeGCCookie struct { *xgb.Cookie } +// Changes the components specified by ValueMask for the specified graphics context. +// +// May return a Alloc error if the X server could not allocate the requested resources (no memory?). +// +// May return Font, GContext, Match, Pixmap, Value errors. +// // ChangeGC sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func ChangeGC(c *xgb.Conn, Gc Gcontext, ValueMask uint32, ValueList []uint32) ChangeGCCookie { @@ -7076,7 +7201,7 @@ func ChangeGC(c *xgb.Conn, Gc Gcontext, ValueMask uint32, ValueList []uint32) Ch } // ChangeGCChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeGCCookie.Check() +// If an error occurs, it can be retrieved using ChangeGCCookie.Check. func ChangeGCChecked(c *xgb.Conn, Gc Gcontext, ValueMask uint32, ValueList []uint32) ChangeGCCookie { cookie := c.NewCookie(true, false) c.NewRequest(changeGCRequest(c, Gc, ValueMask, ValueList), cookie) @@ -7089,8 +7214,7 @@ func (cook ChangeGCCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeGC -// changeGCRequest writes a ChangeGC request to a byte slice. +// changeGCRequest writes a ChangeGC request to a byte slice for transfer. func changeGCRequest(c *xgb.Conn, Gc Gcontext, ValueMask uint32, ValueList []uint32) []byte { size := xgb.Pad((12 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))) b := 0 @@ -7126,15 +7250,15 @@ type ChangeHostsCookie struct { // ChangeHosts sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ChangeHosts(c *xgb.Conn, Mode byte, Family byte, AddressLen uint16, Address []byte) ChangeHostsCookie { +func ChangeHosts(c *xgb.Conn, Mode, Family byte, AddressLen uint16, Address []byte) ChangeHostsCookie { cookie := c.NewCookie(false, false) c.NewRequest(changeHostsRequest(c, Mode, Family, AddressLen, Address), cookie) return ChangeHostsCookie{cookie} } // ChangeHostsChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeHostsCookie.Check() -func ChangeHostsChecked(c *xgb.Conn, Mode byte, Family byte, AddressLen uint16, Address []byte) ChangeHostsCookie { +// If an error occurs, it can be retrieved using ChangeHostsCookie.Check. +func ChangeHostsChecked(c *xgb.Conn, Mode, Family byte, AddressLen uint16, Address []byte) ChangeHostsCookie { cookie := c.NewCookie(true, false) c.NewRequest(changeHostsRequest(c, Mode, Family, AddressLen, Address), cookie) return ChangeHostsCookie{cookie} @@ -7146,9 +7270,8 @@ func (cook ChangeHostsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeHosts -// changeHostsRequest writes a ChangeHosts request to a byte slice. -func changeHostsRequest(c *xgb.Conn, Mode byte, Family byte, AddressLen uint16, Address []byte) []byte { +// changeHostsRequest writes a ChangeHosts request to a byte slice for transfer. +func changeHostsRequest(c *xgb.Conn, Mode, Family byte, AddressLen uint16, Address []byte) []byte { size := xgb.Pad((8 + xgb.Pad((int(AddressLen) * 1)))) b := 0 buf := make([]byte, size) @@ -7190,7 +7313,7 @@ func ChangeKeyboardControl(c *xgb.Conn, ValueMask uint32, ValueList []uint32) Ch } // ChangeKeyboardControlChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeKeyboardControlCookie.Check() +// If an error occurs, it can be retrieved using ChangeKeyboardControlCookie.Check. func ChangeKeyboardControlChecked(c *xgb.Conn, ValueMask uint32, ValueList []uint32) ChangeKeyboardControlCookie { cookie := c.NewCookie(true, false) c.NewRequest(changeKeyboardControlRequest(c, ValueMask, ValueList), cookie) @@ -7203,8 +7326,7 @@ func (cook ChangeKeyboardControlCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeKeyboardControl -// changeKeyboardControlRequest writes a ChangeKeyboardControl request to a byte slice. +// changeKeyboardControlRequest writes a ChangeKeyboardControl request to a byte slice for transfer. func changeKeyboardControlRequest(c *xgb.Conn, ValueMask uint32, ValueList []uint32) []byte { size := xgb.Pad((8 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))) b := 0 @@ -7244,7 +7366,7 @@ func ChangeKeyboardMapping(c *xgb.Conn, KeycodeCount byte, FirstKeycode Keycode, } // ChangeKeyboardMappingChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeKeyboardMappingCookie.Check() +// If an error occurs, it can be retrieved using ChangeKeyboardMappingCookie.Check. func ChangeKeyboardMappingChecked(c *xgb.Conn, KeycodeCount byte, FirstKeycode Keycode, KeysymsPerKeycode byte, Keysyms []Keysym) ChangeKeyboardMappingCookie { cookie := c.NewCookie(true, false) c.NewRequest(changeKeyboardMappingRequest(c, KeycodeCount, FirstKeycode, KeysymsPerKeycode, Keysyms), cookie) @@ -7257,8 +7379,7 @@ func (cook ChangeKeyboardMappingCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeKeyboardMapping -// changeKeyboardMappingRequest writes a ChangeKeyboardMapping request to a byte slice. +// changeKeyboardMappingRequest writes a ChangeKeyboardMapping request to a byte slice for transfer. func changeKeyboardMappingRequest(c *xgb.Conn, KeycodeCount byte, FirstKeycode Keycode, KeysymsPerKeycode byte, Keysyms []Keysym) []byte { size := xgb.Pad((8 + xgb.Pad(((int(KeycodeCount) * int(KeysymsPerKeycode)) * 4)))) b := 0 @@ -7296,15 +7417,15 @@ type ChangePointerControlCookie struct { // ChangePointerControl sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ChangePointerControl(c *xgb.Conn, AccelerationNumerator int16, AccelerationDenominator int16, Threshold int16, DoAcceleration bool, DoThreshold bool) ChangePointerControlCookie { +func ChangePointerControl(c *xgb.Conn, AccelerationNumerator, AccelerationDenominator, Threshold int16, DoAcceleration, DoThreshold bool) ChangePointerControlCookie { cookie := c.NewCookie(false, false) c.NewRequest(changePointerControlRequest(c, AccelerationNumerator, AccelerationDenominator, Threshold, DoAcceleration, DoThreshold), cookie) return ChangePointerControlCookie{cookie} } // ChangePointerControlChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangePointerControlCookie.Check() -func ChangePointerControlChecked(c *xgb.Conn, AccelerationNumerator int16, AccelerationDenominator int16, Threshold int16, DoAcceleration bool, DoThreshold bool) ChangePointerControlCookie { +// If an error occurs, it can be retrieved using ChangePointerControlCookie.Check. +func ChangePointerControlChecked(c *xgb.Conn, AccelerationNumerator, AccelerationDenominator, Threshold int16, DoAcceleration, DoThreshold bool) ChangePointerControlCookie { cookie := c.NewCookie(true, false) c.NewRequest(changePointerControlRequest(c, AccelerationNumerator, AccelerationDenominator, Threshold, DoAcceleration, DoThreshold), cookie) return ChangePointerControlCookie{cookie} @@ -7316,9 +7437,8 @@ func (cook ChangePointerControlCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangePointerControl -// changePointerControlRequest writes a ChangePointerControl request to a byte slice. -func changePointerControlRequest(c *xgb.Conn, AccelerationNumerator int16, AccelerationDenominator int16, Threshold int16, DoAcceleration bool, DoThreshold bool) []byte { +// changePointerControlRequest writes a ChangePointerControl request to a byte slice for transfer. +func changePointerControlRequest(c *xgb.Conn, AccelerationNumerator, AccelerationDenominator, Threshold int16, DoAcceleration, DoThreshold bool) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -7362,17 +7482,30 @@ type ChangePropertyCookie struct { *xgb.Cookie } +// Sets or updates a property on the specified Window. Properties are for +// example the window title (WM_NAME) or its minimum size (WM_NORMAL_HINTS). +// Protocols such as EWMH also use properties - for example EWMH defines the +// window title, encoded as UTF-8 string, in the _NET_WM_NAME property. +// +// May return a Alloc error if the X server could not store the property (no memory?). +// +// May return a Atom error if property or Type do not refer to a valid atom. +// +// May return a Window error if the specified Window does not exist. +// +// May return Match, Value errors. +// // ChangeProperty sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ChangeProperty(c *xgb.Conn, Mode byte, Window Window, Property Atom, Type Atom, Format byte, DataLen uint32, Data []byte) ChangePropertyCookie { +func ChangeProperty(c *xgb.Conn, Mode byte, Window Window, Property, Type Atom, Format byte, DataLen uint32, Data []byte) ChangePropertyCookie { cookie := c.NewCookie(false, false) c.NewRequest(changePropertyRequest(c, Mode, Window, Property, Type, Format, DataLen, Data), cookie) return ChangePropertyCookie{cookie} } // ChangePropertyChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangePropertyCookie.Check() -func ChangePropertyChecked(c *xgb.Conn, Mode byte, Window Window, Property Atom, Type Atom, Format byte, DataLen uint32, Data []byte) ChangePropertyCookie { +// If an error occurs, it can be retrieved using ChangePropertyCookie.Check. +func ChangePropertyChecked(c *xgb.Conn, Mode byte, Window Window, Property, Type Atom, Format byte, DataLen uint32, Data []byte) ChangePropertyCookie { cookie := c.NewCookie(true, false) c.NewRequest(changePropertyRequest(c, Mode, Window, Property, Type, Format, DataLen, Data), cookie) return ChangePropertyCookie{cookie} @@ -7384,9 +7517,8 @@ func (cook ChangePropertyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeProperty -// changePropertyRequest writes a ChangeProperty request to a byte slice. -func changePropertyRequest(c *xgb.Conn, Mode byte, Window Window, Property Atom, Type Atom, Format byte, DataLen uint32, Data []byte) []byte { +// changePropertyRequest writes a ChangeProperty request to a byte slice for transfer. +func changePropertyRequest(c *xgb.Conn, Mode byte, Window Window, Property, Type Atom, Format byte, DataLen uint32, Data []byte) []byte { size := xgb.Pad((24 + xgb.Pad((((int(DataLen) * int(Format)) / 8) * 1)))) b := 0 buf := make([]byte, size) @@ -7428,6 +7560,16 @@ type ChangeSaveSetCookie struct { *xgb.Cookie } +// This function either adds or removes the specified window to the client's (your +// application's) save set. +// +// May return a Match error if you created the specified window. This does not make sense, you can only add +// windows created by other clients to your save set. +// +// May return a Value error if you specified an invalid mode. +// +// May return a Window error if the specified window does not exist. +// // ChangeSaveSet sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func ChangeSaveSet(c *xgb.Conn, Mode byte, Window Window) ChangeSaveSetCookie { @@ -7437,7 +7579,7 @@ func ChangeSaveSet(c *xgb.Conn, Mode byte, Window Window) ChangeSaveSetCookie { } // ChangeSaveSetChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeSaveSetCookie.Check() +// If an error occurs, it can be retrieved using ChangeSaveSetCookie.Check. func ChangeSaveSetChecked(c *xgb.Conn, Mode byte, Window Window) ChangeSaveSetCookie { cookie := c.NewCookie(true, false) c.NewRequest(changeSaveSetRequest(c, Mode, Window), cookie) @@ -7450,8 +7592,7 @@ func (cook ChangeSaveSetCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeSaveSet -// changeSaveSetRequest writes a ChangeSaveSet request to a byte slice. +// changeSaveSetRequest writes a ChangeSaveSet request to a byte slice for transfer. func changeSaveSetRequest(c *xgb.Conn, Mode byte, Window Window) []byte { size := 8 b := 0 @@ -7477,6 +7618,12 @@ type ChangeWindowAttributesCookie struct { *xgb.Cookie } +// Changes the attributes specified by ValueMask for the specified Window. +// +// May return a Window error if the specified Window does not exist. +// +// May return Access, Colormap, Cursor, Match, Pixmap, Value errors. +// // ChangeWindowAttributes sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func ChangeWindowAttributes(c *xgb.Conn, Window Window, ValueMask uint32, ValueList []uint32) ChangeWindowAttributesCookie { @@ -7486,7 +7633,7 @@ func ChangeWindowAttributes(c *xgb.Conn, Window Window, ValueMask uint32, ValueL } // ChangeWindowAttributesChecked sends a checked request. -// If an error occurs, it can be retrieved using ChangeWindowAttributesCookie.Check() +// If an error occurs, it can be retrieved using ChangeWindowAttributesCookie.Check. func ChangeWindowAttributesChecked(c *xgb.Conn, Window Window, ValueMask uint32, ValueList []uint32) ChangeWindowAttributesCookie { cookie := c.NewCookie(true, false) c.NewRequest(changeWindowAttributesRequest(c, Window, ValueMask, ValueList), cookie) @@ -7499,8 +7646,7 @@ func (cook ChangeWindowAttributesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ChangeWindowAttributes -// changeWindowAttributesRequest writes a ChangeWindowAttributes request to a byte slice. +// changeWindowAttributesRequest writes a ChangeWindowAttributes request to a byte slice for transfer. func changeWindowAttributesRequest(c *xgb.Conn, Window Window, ValueMask uint32, ValueList []uint32) []byte { size := xgb.Pad((12 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))) b := 0 @@ -7534,6 +7680,16 @@ type CirculateWindowCookie struct { *xgb.Cookie } +// If Direction is CirculateRaiseLowest, the lowest mapped child (if +// any) will be raised to the top of the stack. +// +// If Direction is CirculateLowerHighest, the highest mapped child will +// be lowered to the bottom of the stack. +// +// May return a Value error if the specified Direction is invalid. +// +// May return a Window error if the specified Window does not exist. +// // CirculateWindow sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func CirculateWindow(c *xgb.Conn, Direction byte, Window Window) CirculateWindowCookie { @@ -7543,7 +7699,7 @@ func CirculateWindow(c *xgb.Conn, Direction byte, Window Window) CirculateWindow } // CirculateWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using CirculateWindowCookie.Check() +// If an error occurs, it can be retrieved using CirculateWindowCookie.Check. func CirculateWindowChecked(c *xgb.Conn, Direction byte, Window Window) CirculateWindowCookie { cookie := c.NewCookie(true, false) c.NewRequest(circulateWindowRequest(c, Direction, Window), cookie) @@ -7556,8 +7712,7 @@ func (cook CirculateWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CirculateWindow -// circulateWindowRequest writes a CirculateWindow request to a byte slice. +// circulateWindowRequest writes a CirculateWindow request to a byte slice for transfer. func circulateWindowRequest(c *xgb.Conn, Direction byte, Window Window) []byte { size := 8 b := 0 @@ -7585,15 +7740,15 @@ type ClearAreaCookie struct { // ClearArea sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ClearArea(c *xgb.Conn, Exposures bool, Window Window, X int16, Y int16, Width uint16, Height uint16) ClearAreaCookie { +func ClearArea(c *xgb.Conn, Exposures bool, Window Window, X, Y int16, Width, Height uint16) ClearAreaCookie { cookie := c.NewCookie(false, false) c.NewRequest(clearAreaRequest(c, Exposures, Window, X, Y, Width, Height), cookie) return ClearAreaCookie{cookie} } // ClearAreaChecked sends a checked request. -// If an error occurs, it can be retrieved using ClearAreaCookie.Check() -func ClearAreaChecked(c *xgb.Conn, Exposures bool, Window Window, X int16, Y int16, Width uint16, Height uint16) ClearAreaCookie { +// If an error occurs, it can be retrieved using ClearAreaCookie.Check. +func ClearAreaChecked(c *xgb.Conn, Exposures bool, Window Window, X, Y int16, Width, Height uint16) ClearAreaCookie { cookie := c.NewCookie(true, false) c.NewRequest(clearAreaRequest(c, Exposures, Window, X, Y, Width, Height), cookie) return ClearAreaCookie{cookie} @@ -7605,9 +7760,8 @@ func (cook ClearAreaCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ClearArea -// clearAreaRequest writes a ClearArea request to a byte slice. -func clearAreaRequest(c *xgb.Conn, Exposures bool, Window Window, X int16, Y int16, Width uint16, Height uint16) []byte { +// clearAreaRequest writes a ClearArea request to a byte slice for transfer. +func clearAreaRequest(c *xgb.Conn, Exposures bool, Window Window, X, Y int16, Width, Height uint16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -7657,7 +7811,7 @@ func CloseFont(c *xgb.Conn, Font Font) CloseFontCookie { } // CloseFontChecked sends a checked request. -// If an error occurs, it can be retrieved using CloseFontCookie.Check() +// If an error occurs, it can be retrieved using CloseFontCookie.Check. func CloseFontChecked(c *xgb.Conn, Font Font) CloseFontCookie { cookie := c.NewCookie(true, false) c.NewRequest(closeFontRequest(c, Font), cookie) @@ -7670,8 +7824,7 @@ func (cook CloseFontCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CloseFont -// closeFontRequest writes a CloseFont request to a byte slice. +// closeFontRequest writes a CloseFont request to a byte slice for transfer. func closeFontRequest(c *xgb.Conn, Font Font) []byte { size := 8 b := 0 @@ -7696,6 +7849,15 @@ type ConfigureWindowCookie struct { *xgb.Cookie } +// Configures a window's size, position, border width and stacking order. +// +// May return a Match error if you specified a Sibling without also specifying StackMode or the window is not +// actually a Sibling. +// +// May return a Window error if the specified window does not exist. +// +// May return Value errors. +// // ConfigureWindow sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func ConfigureWindow(c *xgb.Conn, Window Window, ValueMask uint16, ValueList []uint32) ConfigureWindowCookie { @@ -7705,7 +7867,7 @@ func ConfigureWindow(c *xgb.Conn, Window Window, ValueMask uint16, ValueList []u } // ConfigureWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using ConfigureWindowCookie.Check() +// If an error occurs, it can be retrieved using ConfigureWindowCookie.Check. func ConfigureWindowChecked(c *xgb.Conn, Window Window, ValueMask uint16, ValueList []uint32) ConfigureWindowCookie { cookie := c.NewCookie(true, false) c.NewRequest(configureWindowRequest(c, Window, ValueMask, ValueList), cookie) @@ -7718,8 +7880,7 @@ func (cook ConfigureWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ConfigureWindow -// configureWindowRequest writes a ConfigureWindow request to a byte slice. +// configureWindowRequest writes a ConfigureWindow request to a byte slice for transfer. func configureWindowRequest(c *xgb.Conn, Window Window, ValueMask uint16, ValueList []uint32) []byte { size := xgb.Pad((12 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))) b := 0 @@ -7757,15 +7918,15 @@ type ConvertSelectionCookie struct { // ConvertSelection sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ConvertSelection(c *xgb.Conn, Requestor Window, Selection Atom, Target Atom, Property Atom, Time Timestamp) ConvertSelectionCookie { +func ConvertSelection(c *xgb.Conn, Requestor Window, Selection, Target, Property Atom, Time Timestamp) ConvertSelectionCookie { cookie := c.NewCookie(false, false) c.NewRequest(convertSelectionRequest(c, Requestor, Selection, Target, Property, Time), cookie) return ConvertSelectionCookie{cookie} } // ConvertSelectionChecked sends a checked request. -// If an error occurs, it can be retrieved using ConvertSelectionCookie.Check() -func ConvertSelectionChecked(c *xgb.Conn, Requestor Window, Selection Atom, Target Atom, Property Atom, Time Timestamp) ConvertSelectionCookie { +// If an error occurs, it can be retrieved using ConvertSelectionCookie.Check. +func ConvertSelectionChecked(c *xgb.Conn, Requestor Window, Selection, Target, Property Atom, Time Timestamp) ConvertSelectionCookie { cookie := c.NewCookie(true, false) c.NewRequest(convertSelectionRequest(c, Requestor, Selection, Target, Property, Time), cookie) return ConvertSelectionCookie{cookie} @@ -7777,9 +7938,8 @@ func (cook ConvertSelectionCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ConvertSelection -// convertSelectionRequest writes a ConvertSelection request to a byte slice. -func convertSelectionRequest(c *xgb.Conn, Requestor Window, Selection Atom, Target Atom, Property Atom, Time Timestamp) []byte { +// convertSelectionRequest writes a ConvertSelection request to a byte slice for transfer. +func convertSelectionRequest(c *xgb.Conn, Requestor Window, Selection, Target, Property Atom, Time Timestamp) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -7815,17 +7975,25 @@ type CopyAreaCookie struct { *xgb.Cookie } +// Copies the specified rectangle from SrcDrawable to DstDrawable. +// +// May return a Drawable error if the specified Drawable (Window or Pixmap) does not exist. +// +// May return a GContext error if the specified graphics context does not exist. +// +// May return a Match error if srcDrawable has a different root or depth than DstDrawable. +// // CopyArea sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CopyArea(c *xgb.Conn, SrcDrawable Drawable, DstDrawable Drawable, Gc Gcontext, SrcX int16, SrcY int16, DstX int16, DstY int16, Width uint16, Height uint16) CopyAreaCookie { +func CopyArea(c *xgb.Conn, SrcDrawable, DstDrawable Drawable, Gc Gcontext, SrcX, SrcY, DstX, DstY int16, Width, Height uint16) CopyAreaCookie { cookie := c.NewCookie(false, false) c.NewRequest(copyAreaRequest(c, SrcDrawable, DstDrawable, Gc, SrcX, SrcY, DstX, DstY, Width, Height), cookie) return CopyAreaCookie{cookie} } // CopyAreaChecked sends a checked request. -// If an error occurs, it can be retrieved using CopyAreaCookie.Check() -func CopyAreaChecked(c *xgb.Conn, SrcDrawable Drawable, DstDrawable Drawable, Gc Gcontext, SrcX int16, SrcY int16, DstX int16, DstY int16, Width uint16, Height uint16) CopyAreaCookie { +// If an error occurs, it can be retrieved using CopyAreaCookie.Check. +func CopyAreaChecked(c *xgb.Conn, SrcDrawable, DstDrawable Drawable, Gc Gcontext, SrcX, SrcY, DstX, DstY int16, Width, Height uint16) CopyAreaCookie { cookie := c.NewCookie(true, false) c.NewRequest(copyAreaRequest(c, SrcDrawable, DstDrawable, Gc, SrcX, SrcY, DstX, DstY, Width, Height), cookie) return CopyAreaCookie{cookie} @@ -7837,9 +8005,8 @@ func (cook CopyAreaCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CopyArea -// copyAreaRequest writes a CopyArea request to a byte slice. -func copyAreaRequest(c *xgb.Conn, SrcDrawable Drawable, DstDrawable Drawable, Gc Gcontext, SrcX int16, SrcY int16, DstX int16, DstY int16, Width uint16, Height uint16) []byte { +// copyAreaRequest writes a CopyArea request to a byte slice for transfer. +func copyAreaRequest(c *xgb.Conn, SrcDrawable, DstDrawable Drawable, Gc Gcontext, SrcX, SrcY, DstX, DstY int16, Width, Height uint16) []byte { size := 28 b := 0 buf := make([]byte, size) @@ -7889,15 +8056,15 @@ type CopyColormapAndFreeCookie struct { // CopyColormapAndFree sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CopyColormapAndFree(c *xgb.Conn, Mid Colormap, SrcCmap Colormap) CopyColormapAndFreeCookie { +func CopyColormapAndFree(c *xgb.Conn, Mid, SrcCmap Colormap) CopyColormapAndFreeCookie { cookie := c.NewCookie(false, false) c.NewRequest(copyColormapAndFreeRequest(c, Mid, SrcCmap), cookie) return CopyColormapAndFreeCookie{cookie} } // CopyColormapAndFreeChecked sends a checked request. -// If an error occurs, it can be retrieved using CopyColormapAndFreeCookie.Check() -func CopyColormapAndFreeChecked(c *xgb.Conn, Mid Colormap, SrcCmap Colormap) CopyColormapAndFreeCookie { +// If an error occurs, it can be retrieved using CopyColormapAndFreeCookie.Check. +func CopyColormapAndFreeChecked(c *xgb.Conn, Mid, SrcCmap Colormap) CopyColormapAndFreeCookie { cookie := c.NewCookie(true, false) c.NewRequest(copyColormapAndFreeRequest(c, Mid, SrcCmap), cookie) return CopyColormapAndFreeCookie{cookie} @@ -7909,9 +8076,8 @@ func (cook CopyColormapAndFreeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CopyColormapAndFree -// copyColormapAndFreeRequest writes a CopyColormapAndFree request to a byte slice. -func copyColormapAndFreeRequest(c *xgb.Conn, Mid Colormap, SrcCmap Colormap) []byte { +// copyColormapAndFreeRequest writes a CopyColormapAndFree request to a byte slice for transfer. +func copyColormapAndFreeRequest(c *xgb.Conn, Mid, SrcCmap Colormap) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -7940,15 +8106,15 @@ type CopyGCCookie struct { // CopyGC sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CopyGC(c *xgb.Conn, SrcGc Gcontext, DstGc Gcontext, ValueMask uint32) CopyGCCookie { +func CopyGC(c *xgb.Conn, SrcGc, DstGc Gcontext, ValueMask uint32) CopyGCCookie { cookie := c.NewCookie(false, false) c.NewRequest(copyGCRequest(c, SrcGc, DstGc, ValueMask), cookie) return CopyGCCookie{cookie} } // CopyGCChecked sends a checked request. -// If an error occurs, it can be retrieved using CopyGCCookie.Check() -func CopyGCChecked(c *xgb.Conn, SrcGc Gcontext, DstGc Gcontext, ValueMask uint32) CopyGCCookie { +// If an error occurs, it can be retrieved using CopyGCCookie.Check. +func CopyGCChecked(c *xgb.Conn, SrcGc, DstGc Gcontext, ValueMask uint32) CopyGCCookie { cookie := c.NewCookie(true, false) c.NewRequest(copyGCRequest(c, SrcGc, DstGc, ValueMask), cookie) return CopyGCCookie{cookie} @@ -7960,9 +8126,8 @@ func (cook CopyGCCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CopyGC -// copyGCRequest writes a CopyGC request to a byte slice. -func copyGCRequest(c *xgb.Conn, SrcGc Gcontext, DstGc Gcontext, ValueMask uint32) []byte { +// copyGCRequest writes a CopyGC request to a byte slice for transfer. +func copyGCRequest(c *xgb.Conn, SrcGc, DstGc Gcontext, ValueMask uint32) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -7994,15 +8159,15 @@ type CopyPlaneCookie struct { // CopyPlane sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CopyPlane(c *xgb.Conn, SrcDrawable Drawable, DstDrawable Drawable, Gc Gcontext, SrcX int16, SrcY int16, DstX int16, DstY int16, Width uint16, Height uint16, BitPlane uint32) CopyPlaneCookie { +func CopyPlane(c *xgb.Conn, SrcDrawable, DstDrawable Drawable, Gc Gcontext, SrcX, SrcY, DstX, DstY int16, Width, Height uint16, BitPlane uint32) CopyPlaneCookie { cookie := c.NewCookie(false, false) c.NewRequest(copyPlaneRequest(c, SrcDrawable, DstDrawable, Gc, SrcX, SrcY, DstX, DstY, Width, Height, BitPlane), cookie) return CopyPlaneCookie{cookie} } // CopyPlaneChecked sends a checked request. -// If an error occurs, it can be retrieved using CopyPlaneCookie.Check() -func CopyPlaneChecked(c *xgb.Conn, SrcDrawable Drawable, DstDrawable Drawable, Gc Gcontext, SrcX int16, SrcY int16, DstX int16, DstY int16, Width uint16, Height uint16, BitPlane uint32) CopyPlaneCookie { +// If an error occurs, it can be retrieved using CopyPlaneCookie.Check. +func CopyPlaneChecked(c *xgb.Conn, SrcDrawable, DstDrawable Drawable, Gc Gcontext, SrcX, SrcY, DstX, DstY int16, Width, Height uint16, BitPlane uint32) CopyPlaneCookie { cookie := c.NewCookie(true, false) c.NewRequest(copyPlaneRequest(c, SrcDrawable, DstDrawable, Gc, SrcX, SrcY, DstX, DstY, Width, Height, BitPlane), cookie) return CopyPlaneCookie{cookie} @@ -8014,9 +8179,8 @@ func (cook CopyPlaneCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CopyPlane -// copyPlaneRequest writes a CopyPlane request to a byte slice. -func copyPlaneRequest(c *xgb.Conn, SrcDrawable Drawable, DstDrawable Drawable, Gc Gcontext, SrcX int16, SrcY int16, DstX int16, DstY int16, Width uint16, Height uint16, BitPlane uint32) []byte { +// copyPlaneRequest writes a CopyPlane request to a byte slice for transfer. +func copyPlaneRequest(c *xgb.Conn, SrcDrawable, DstDrawable Drawable, Gc Gcontext, SrcX, SrcY, DstX, DstY int16, Width, Height uint16, BitPlane uint32) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -8076,7 +8240,7 @@ func CreateColormap(c *xgb.Conn, Alloc byte, Mid Colormap, Window Window, Visual } // CreateColormapChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateColormapCookie.Check() +// If an error occurs, it can be retrieved using CreateColormapCookie.Check. func CreateColormapChecked(c *xgb.Conn, Alloc byte, Mid Colormap, Window Window, Visual Visualid) CreateColormapCookie { cookie := c.NewCookie(true, false) c.NewRequest(createColormapRequest(c, Alloc, Mid, Window, Visual), cookie) @@ -8089,8 +8253,7 @@ func (cook CreateColormapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateColormap -// createColormapRequest writes a CreateColormap request to a byte slice. +// createColormapRequest writes a CreateColormap request to a byte slice for transfer. func createColormapRequest(c *xgb.Conn, Alloc byte, Mid Colormap, Window Window, Visual Visualid) []byte { size := 16 b := 0 @@ -8124,15 +8287,15 @@ type CreateCursorCookie struct { // CreateCursor sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateCursor(c *xgb.Conn, Cid Cursor, Source Pixmap, Mask Pixmap, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16, X uint16, Y uint16) CreateCursorCookie { +func CreateCursor(c *xgb.Conn, Cid Cursor, Source, Mask Pixmap, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue, X, Y uint16) CreateCursorCookie { cookie := c.NewCookie(false, false) c.NewRequest(createCursorRequest(c, Cid, Source, Mask, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue, X, Y), cookie) return CreateCursorCookie{cookie} } // CreateCursorChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateCursorCookie.Check() -func CreateCursorChecked(c *xgb.Conn, Cid Cursor, Source Pixmap, Mask Pixmap, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16, X uint16, Y uint16) CreateCursorCookie { +// If an error occurs, it can be retrieved using CreateCursorCookie.Check. +func CreateCursorChecked(c *xgb.Conn, Cid Cursor, Source, Mask Pixmap, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue, X, Y uint16) CreateCursorCookie { cookie := c.NewCookie(true, false) c.NewRequest(createCursorRequest(c, Cid, Source, Mask, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue, X, Y), cookie) return CreateCursorCookie{cookie} @@ -8144,9 +8307,8 @@ func (cook CreateCursorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateCursor -// createCursorRequest writes a CreateCursor request to a byte slice. -func createCursorRequest(c *xgb.Conn, Cid Cursor, Source Pixmap, Mask Pixmap, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16, X uint16, Y uint16) []byte { +// createCursorRequest writes a CreateCursor request to a byte slice for transfer. +func createCursorRequest(c *xgb.Conn, Cid Cursor, Source, Mask Pixmap, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue, X, Y uint16) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -8200,6 +8362,15 @@ type CreateGCCookie struct { *xgb.Cookie } +// Creates a graphics context. The graphics context can be used with any drawable +// that has the same root and depth as the specified drawable. +// +// May return a Alloc error if the X server could not allocate the requested resources (no memory?). +// +// May return a Drawable error if the specified Drawable (Window or Pixmap) does not exist. +// +// May return Font, Match, Pixmap, Value errors. +// // CreateGC sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func CreateGC(c *xgb.Conn, Cid Gcontext, Drawable Drawable, ValueMask uint32, ValueList []uint32) CreateGCCookie { @@ -8209,7 +8380,7 @@ func CreateGC(c *xgb.Conn, Cid Gcontext, Drawable Drawable, ValueMask uint32, Va } // CreateGCChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateGCCookie.Check() +// If an error occurs, it can be retrieved using CreateGCCookie.Check. func CreateGCChecked(c *xgb.Conn, Cid Gcontext, Drawable Drawable, ValueMask uint32, ValueList []uint32) CreateGCCookie { cookie := c.NewCookie(true, false) c.NewRequest(createGCRequest(c, Cid, Drawable, ValueMask, ValueList), cookie) @@ -8222,8 +8393,7 @@ func (cook CreateGCCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateGC -// createGCRequest writes a CreateGC request to a byte slice. +// createGCRequest writes a CreateGC request to a byte slice for transfer. func createGCRequest(c *xgb.Conn, Cid Gcontext, Drawable Drawable, ValueMask uint32, ValueList []uint32) []byte { size := xgb.Pad((16 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))) b := 0 @@ -8260,17 +8430,33 @@ type CreateGlyphCursorCookie struct { *xgb.Cookie } +// Creates a cursor from a font glyph. X provides a set of standard cursor shapes +// in a special font named cursor. Applications are encouraged to use this +// interface for their cursors because the font can be customized for the +// individual display type. +// +// All pixels which are set to 1 in the source will use the foreground color (as +// specified by ForeRed, ForeGreen and ForeBlue). All pixels set to 0 +// will use the background color (as specified by BackRed, BackGreen and +// BackBlue). +// +// May return a Alloc error if the X server could not allocate the requested resources (no memory?). +// +// May return a Font error if the specified SourceFont or MaskFont does not exist. +// +// May return a Value error if either SourceChar or MaskChar are not defined in SourceFont or MaskFont, respectively. +// // CreateGlyphCursor sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateGlyphCursor(c *xgb.Conn, Cid Cursor, SourceFont Font, MaskFont Font, SourceChar uint16, MaskChar uint16, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16) CreateGlyphCursorCookie { +func CreateGlyphCursor(c *xgb.Conn, Cid Cursor, SourceFont, MaskFont Font, SourceChar, MaskChar, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue uint16) CreateGlyphCursorCookie { cookie := c.NewCookie(false, false) c.NewRequest(createGlyphCursorRequest(c, Cid, SourceFont, MaskFont, SourceChar, MaskChar, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue), cookie) return CreateGlyphCursorCookie{cookie} } // CreateGlyphCursorChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateGlyphCursorCookie.Check() -func CreateGlyphCursorChecked(c *xgb.Conn, Cid Cursor, SourceFont Font, MaskFont Font, SourceChar uint16, MaskChar uint16, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16) CreateGlyphCursorCookie { +// If an error occurs, it can be retrieved using CreateGlyphCursorCookie.Check. +func CreateGlyphCursorChecked(c *xgb.Conn, Cid Cursor, SourceFont, MaskFont Font, SourceChar, MaskChar, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue uint16) CreateGlyphCursorCookie { cookie := c.NewCookie(true, false) c.NewRequest(createGlyphCursorRequest(c, Cid, SourceFont, MaskFont, SourceChar, MaskChar, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue), cookie) return CreateGlyphCursorCookie{cookie} @@ -8282,9 +8468,8 @@ func (cook CreateGlyphCursorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateGlyphCursor -// createGlyphCursorRequest writes a CreateGlyphCursor request to a byte slice. -func createGlyphCursorRequest(c *xgb.Conn, Cid Cursor, SourceFont Font, MaskFont Font, SourceChar uint16, MaskChar uint16, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16) []byte { +// createGlyphCursorRequest writes a CreateGlyphCursor request to a byte slice for transfer. +func createGlyphCursorRequest(c *xgb.Conn, Cid Cursor, SourceFont, MaskFont Font, SourceChar, MaskChar, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue uint16) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -8338,17 +8523,26 @@ type CreatePixmapCookie struct { *xgb.Cookie } +// Creates a pixmap. The pixmap can only be used on the same screen as Drawable +// is on and only with drawables of the same Depth. +// +// May return a Alloc error if the X server could not allocate the requested resources (no memory?). +// +// May return a Drawable error if the specified Drawable (Window or Pixmap) does not exist. +// +// May return Value errors. +// // CreatePixmap sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreatePixmap(c *xgb.Conn, Depth byte, Pid Pixmap, Drawable Drawable, Width uint16, Height uint16) CreatePixmapCookie { +func CreatePixmap(c *xgb.Conn, Depth byte, Pid Pixmap, Drawable Drawable, Width, Height uint16) CreatePixmapCookie { cookie := c.NewCookie(false, false) c.NewRequest(createPixmapRequest(c, Depth, Pid, Drawable, Width, Height), cookie) return CreatePixmapCookie{cookie} } // CreatePixmapChecked sends a checked request. -// If an error occurs, it can be retrieved using CreatePixmapCookie.Check() -func CreatePixmapChecked(c *xgb.Conn, Depth byte, Pid Pixmap, Drawable Drawable, Width uint16, Height uint16) CreatePixmapCookie { +// If an error occurs, it can be retrieved using CreatePixmapCookie.Check. +func CreatePixmapChecked(c *xgb.Conn, Depth byte, Pid Pixmap, Drawable Drawable, Width, Height uint16) CreatePixmapCookie { cookie := c.NewCookie(true, false) c.NewRequest(createPixmapRequest(c, Depth, Pid, Drawable, Width, Height), cookie) return CreatePixmapCookie{cookie} @@ -8360,9 +8554,8 @@ func (cook CreatePixmapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreatePixmap -// createPixmapRequest writes a CreatePixmap request to a byte slice. -func createPixmapRequest(c *xgb.Conn, Depth byte, Pid Pixmap, Drawable Drawable, Width uint16, Height uint16) []byte { +// createPixmapRequest writes a CreatePixmap request to a byte slice for transfer. +func createPixmapRequest(c *xgb.Conn, Depth byte, Pid Pixmap, Drawable Drawable, Width, Height uint16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -8396,17 +8589,36 @@ type CreateWindowCookie struct { *xgb.Cookie } +// Creates an unmapped window as child of the specified Parent window. A +// CreateNotify event will be generated. The new window is placed on top in the +// stacking order with respect to siblings. +// +// The coordinate system has the X axis horizontal and the Y axis vertical with +// the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms +// of pixels, and coincide with pixel centers. Each window and pixmap has its own +// coordinate system. For a window, the origin is inside the border at the inside, +// upper-left corner. +// +// The created window is not yet displayed (mapped), call MapWindow to +// display it. +// +// The created window will initially use the same cursor as its parent. +// +// May return a Alloc error if the X server could not allocate the requested resources (no memory?). +// +// May return Colormap, Cursor, Match, Pixmap, Value, Window errors. +// // CreateWindow sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateWindow(c *xgb.Conn, Depth byte, Wid Window, Parent Window, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class uint16, Visual Visualid, ValueMask uint32, ValueList []uint32) CreateWindowCookie { +func CreateWindow(c *xgb.Conn, Depth byte, Wid, Parent Window, X, Y int16, Width, Height, BorderWidth, Class uint16, Visual Visualid, ValueMask uint32, ValueList []uint32) CreateWindowCookie { cookie := c.NewCookie(false, false) c.NewRequest(createWindowRequest(c, Depth, Wid, Parent, X, Y, Width, Height, BorderWidth, Class, Visual, ValueMask, ValueList), cookie) return CreateWindowCookie{cookie} } // CreateWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using CreateWindowCookie.Check() -func CreateWindowChecked(c *xgb.Conn, Depth byte, Wid Window, Parent Window, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class uint16, Visual Visualid, ValueMask uint32, ValueList []uint32) CreateWindowCookie { +// If an error occurs, it can be retrieved using CreateWindowCookie.Check. +func CreateWindowChecked(c *xgb.Conn, Depth byte, Wid, Parent Window, X, Y int16, Width, Height, BorderWidth, Class uint16, Visual Visualid, ValueMask uint32, ValueList []uint32) CreateWindowCookie { cookie := c.NewCookie(true, false) c.NewRequest(createWindowRequest(c, Depth, Wid, Parent, X, Y, Width, Height, BorderWidth, Class, Visual, ValueMask, ValueList), cookie) return CreateWindowCookie{cookie} @@ -8418,9 +8630,8 @@ func (cook CreateWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for CreateWindow -// createWindowRequest writes a CreateWindow request to a byte slice. -func createWindowRequest(c *xgb.Conn, Depth byte, Wid Window, Parent Window, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class uint16, Visual Visualid, ValueMask uint32, ValueList []uint32) []byte { +// createWindowRequest writes a CreateWindow request to a byte slice for transfer. +func createWindowRequest(c *xgb.Conn, Depth byte, Wid, Parent Window, X, Y int16, Width, Height, BorderWidth, Class uint16, Visual Visualid, ValueMask uint32, ValueList []uint32) []byte { size := xgb.Pad((32 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))) b := 0 buf := make([]byte, size) @@ -8487,7 +8698,7 @@ func DeleteProperty(c *xgb.Conn, Window Window, Property Atom) DeletePropertyCoo } // DeletePropertyChecked sends a checked request. -// If an error occurs, it can be retrieved using DeletePropertyCookie.Check() +// If an error occurs, it can be retrieved using DeletePropertyCookie.Check. func DeletePropertyChecked(c *xgb.Conn, Window Window, Property Atom) DeletePropertyCookie { cookie := c.NewCookie(true, false) c.NewRequest(deletePropertyRequest(c, Window, Property), cookie) @@ -8500,8 +8711,7 @@ func (cook DeletePropertyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DeleteProperty -// deletePropertyRequest writes a DeleteProperty request to a byte slice. +// deletePropertyRequest writes a DeleteProperty request to a byte slice for transfer. func deletePropertyRequest(c *xgb.Conn, Window Window, Property Atom) []byte { size := 12 b := 0 @@ -8538,7 +8748,7 @@ func DestroySubwindows(c *xgb.Conn, Window Window) DestroySubwindowsCookie { } // DestroySubwindowsChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroySubwindowsCookie.Check() +// If an error occurs, it can be retrieved using DestroySubwindowsCookie.Check. func DestroySubwindowsChecked(c *xgb.Conn, Window Window) DestroySubwindowsCookie { cookie := c.NewCookie(true, false) c.NewRequest(destroySubwindowsRequest(c, Window), cookie) @@ -8551,8 +8761,7 @@ func (cook DestroySubwindowsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroySubwindows -// destroySubwindowsRequest writes a DestroySubwindows request to a byte slice. +// destroySubwindowsRequest writes a DestroySubwindows request to a byte slice for transfer. func destroySubwindowsRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -8577,6 +8786,15 @@ type DestroyWindowCookie struct { *xgb.Cookie } +// Destroys the specified window and all of its subwindows. A DestroyNotify event +// is generated for each destroyed window (a DestroyNotify event is first generated +// for any given window's inferiors). If the window was mapped, it will be +// automatically unmapped before destroying. +// +// Calling DestroyWindow on the root window will do nothing. +// +// May return a Window error if the specified window does not exist. +// // DestroyWindow sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func DestroyWindow(c *xgb.Conn, Window Window) DestroyWindowCookie { @@ -8586,7 +8804,7 @@ func DestroyWindow(c *xgb.Conn, Window Window) DestroyWindowCookie { } // DestroyWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyWindowCookie.Check() +// If an error occurs, it can be retrieved using DestroyWindowCookie.Check. func DestroyWindowChecked(c *xgb.Conn, Window Window) DestroyWindowCookie { cookie := c.NewCookie(true, false) c.NewRequest(destroyWindowRequest(c, Window), cookie) @@ -8599,8 +8817,7 @@ func (cook DestroyWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyWindow -// destroyWindowRequest writes a DestroyWindow request to a byte slice. +// destroyWindowRequest writes a DestroyWindow request to a byte slice for transfer. func destroyWindowRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -8627,15 +8844,15 @@ type FillPolyCookie struct { // FillPoly sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func FillPoly(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Shape byte, CoordinateMode byte, Points []Point) FillPolyCookie { +func FillPoly(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Shape, CoordinateMode byte, Points []Point) FillPolyCookie { cookie := c.NewCookie(false, false) c.NewRequest(fillPolyRequest(c, Drawable, Gc, Shape, CoordinateMode, Points), cookie) return FillPolyCookie{cookie} } // FillPolyChecked sends a checked request. -// If an error occurs, it can be retrieved using FillPolyCookie.Check() -func FillPolyChecked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Shape byte, CoordinateMode byte, Points []Point) FillPolyCookie { +// If an error occurs, it can be retrieved using FillPolyCookie.Check. +func FillPolyChecked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Shape, CoordinateMode byte, Points []Point) FillPolyCookie { cookie := c.NewCookie(true, false) c.NewRequest(fillPolyRequest(c, Drawable, Gc, Shape, CoordinateMode, Points), cookie) return FillPolyCookie{cookie} @@ -8647,9 +8864,8 @@ func (cook FillPolyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FillPoly -// fillPolyRequest writes a FillPoly request to a byte slice. -func fillPolyRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Shape byte, CoordinateMode byte, Points []Point) []byte { +// fillPolyRequest writes a FillPoly request to a byte slice for transfer. +func fillPolyRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Shape, CoordinateMode byte, Points []Point) []byte { size := xgb.Pad((16 + xgb.Pad((len(Points) * 4)))) b := 0 buf := make([]byte, size) @@ -8695,7 +8911,7 @@ func ForceScreenSaver(c *xgb.Conn, Mode byte) ForceScreenSaverCookie { } // ForceScreenSaverChecked sends a checked request. -// If an error occurs, it can be retrieved using ForceScreenSaverCookie.Check() +// If an error occurs, it can be retrieved using ForceScreenSaverCookie.Check. func ForceScreenSaverChecked(c *xgb.Conn, Mode byte) ForceScreenSaverCookie { cookie := c.NewCookie(true, false) c.NewRequest(forceScreenSaverRequest(c, Mode), cookie) @@ -8708,8 +8924,7 @@ func (cook ForceScreenSaverCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ForceScreenSaver -// forceScreenSaverRequest writes a ForceScreenSaver request to a byte slice. +// forceScreenSaverRequest writes a ForceScreenSaver request to a byte slice for transfer. func forceScreenSaverRequest(c *xgb.Conn, Mode byte) []byte { size := 4 b := 0 @@ -8741,7 +8956,7 @@ func FreeColormap(c *xgb.Conn, Cmap Colormap) FreeColormapCookie { } // FreeColormapChecked sends a checked request. -// If an error occurs, it can be retrieved using FreeColormapCookie.Check() +// If an error occurs, it can be retrieved using FreeColormapCookie.Check. func FreeColormapChecked(c *xgb.Conn, Cmap Colormap) FreeColormapCookie { cookie := c.NewCookie(true, false) c.NewRequest(freeColormapRequest(c, Cmap), cookie) @@ -8754,8 +8969,7 @@ func (cook FreeColormapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FreeColormap -// freeColormapRequest writes a FreeColormap request to a byte slice. +// freeColormapRequest writes a FreeColormap request to a byte slice for transfer. func freeColormapRequest(c *xgb.Conn, Cmap Colormap) []byte { size := 8 b := 0 @@ -8789,7 +9003,7 @@ func FreeColors(c *xgb.Conn, Cmap Colormap, PlaneMask uint32, Pixels []uint32) F } // FreeColorsChecked sends a checked request. -// If an error occurs, it can be retrieved using FreeColorsCookie.Check() +// If an error occurs, it can be retrieved using FreeColorsCookie.Check. func FreeColorsChecked(c *xgb.Conn, Cmap Colormap, PlaneMask uint32, Pixels []uint32) FreeColorsCookie { cookie := c.NewCookie(true, false) c.NewRequest(freeColorsRequest(c, Cmap, PlaneMask, Pixels), cookie) @@ -8802,8 +9016,7 @@ func (cook FreeColorsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FreeColors -// freeColorsRequest writes a FreeColors request to a byte slice. +// freeColorsRequest writes a FreeColors request to a byte slice for transfer. func freeColorsRequest(c *xgb.Conn, Cmap Colormap, PlaneMask uint32, Pixels []uint32) []byte { size := xgb.Pad((12 + xgb.Pad((len(Pixels) * 4)))) b := 0 @@ -8836,6 +9049,11 @@ type FreeCursorCookie struct { *xgb.Cookie } +// Deletes the association between the cursor resource ID and the specified +// cursor. The cursor is freed when no other resource references it. +// +// May return a Cursor error if the specified cursor does not exist. +// // FreeCursor sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func FreeCursor(c *xgb.Conn, Cursor Cursor) FreeCursorCookie { @@ -8845,7 +9063,7 @@ func FreeCursor(c *xgb.Conn, Cursor Cursor) FreeCursorCookie { } // FreeCursorChecked sends a checked request. -// If an error occurs, it can be retrieved using FreeCursorCookie.Check() +// If an error occurs, it can be retrieved using FreeCursorCookie.Check. func FreeCursorChecked(c *xgb.Conn, Cursor Cursor) FreeCursorCookie { cookie := c.NewCookie(true, false) c.NewRequest(freeCursorRequest(c, Cursor), cookie) @@ -8858,8 +9076,7 @@ func (cook FreeCursorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FreeCursor -// freeCursorRequest writes a FreeCursor request to a byte slice. +// freeCursorRequest writes a FreeCursor request to a byte slice for transfer. func freeCursorRequest(c *xgb.Conn, Cursor Cursor) []byte { size := 8 b := 0 @@ -8884,6 +9101,10 @@ type FreeGCCookie struct { *xgb.Cookie } +// Destroys the specified Gc and all associated storage. +// +// May return a GContext error if the specified graphics context does not exist. +// // FreeGC sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func FreeGC(c *xgb.Conn, Gc Gcontext) FreeGCCookie { @@ -8893,7 +9114,7 @@ func FreeGC(c *xgb.Conn, Gc Gcontext) FreeGCCookie { } // FreeGCChecked sends a checked request. -// If an error occurs, it can be retrieved using FreeGCCookie.Check() +// If an error occurs, it can be retrieved using FreeGCCookie.Check. func FreeGCChecked(c *xgb.Conn, Gc Gcontext) FreeGCCookie { cookie := c.NewCookie(true, false) c.NewRequest(freeGCRequest(c, Gc), cookie) @@ -8906,8 +9127,7 @@ func (cook FreeGCCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FreeGC -// freeGCRequest writes a FreeGC request to a byte slice. +// freeGCRequest writes a FreeGC request to a byte slice for transfer. func freeGCRequest(c *xgb.Conn, Gc Gcontext) []byte { size := 8 b := 0 @@ -8932,6 +9152,11 @@ type FreePixmapCookie struct { *xgb.Cookie } +// Deletes the association between the pixmap ID and the pixmap. The pixmap +// storage will be freed when there are no more references to it. +// +// May return a Pixmap error if the specified pixmap does not exist. +// // FreePixmap sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func FreePixmap(c *xgb.Conn, Pixmap Pixmap) FreePixmapCookie { @@ -8941,7 +9166,7 @@ func FreePixmap(c *xgb.Conn, Pixmap Pixmap) FreePixmapCookie { } // FreePixmapChecked sends a checked request. -// If an error occurs, it can be retrieved using FreePixmapCookie.Check() +// If an error occurs, it can be retrieved using FreePixmapCookie.Check. func FreePixmapChecked(c *xgb.Conn, Pixmap Pixmap) FreePixmapCookie { cookie := c.NewCookie(true, false) c.NewRequest(freePixmapRequest(c, Pixmap), cookie) @@ -8954,8 +9179,7 @@ func (cook FreePixmapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FreePixmap -// freePixmapRequest writes a FreePixmap request to a byte slice. +// freePixmapRequest writes a FreePixmap request to a byte slice for transfer. func freePixmapRequest(c *xgb.Conn, Pixmap Pixmap) []byte { size := 8 b := 0 @@ -8981,7 +9205,7 @@ type GetAtomNameCookie struct { } // GetAtomName sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetAtomNameCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetAtomNameCookie.Reply. func GetAtomName(c *xgb.Conn, Atom Atom) GetAtomNameCookie { cookie := c.NewCookie(true, true) c.NewRequest(getAtomNameRequest(c, Atom), cookie) @@ -9046,8 +9270,7 @@ func getAtomNameReply(buf []byte) *GetAtomNameReply { return v } -// Write request to wire for GetAtomName -// getAtomNameRequest writes a GetAtomName request to a byte slice. +// getAtomNameRequest writes a GetAtomName request to a byte slice for transfer. func getAtomNameRequest(c *xgb.Conn, Atom Atom) []byte { size := 8 b := 0 @@ -9073,7 +9296,7 @@ type GetFontPathCookie struct { } // GetFontPath sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetFontPathCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetFontPathCookie.Reply. func GetFontPath(c *xgb.Conn) GetFontPathCookie { cookie := c.NewCookie(true, true) c.NewRequest(getFontPathRequest(c), cookie) @@ -9134,8 +9357,7 @@ func getFontPathReply(buf []byte) *GetFontPathReply { return v } -// Write request to wire for GetFontPath -// getFontPathRequest writes a GetFontPath request to a byte slice. +// getFontPathRequest writes a GetFontPath request to a byte slice for transfer. func getFontPathRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -9156,8 +9378,12 @@ type GetGeometryCookie struct { *xgb.Cookie } +// Gets the current geometry of the specified drawable (either Window or Pixmap). +// +// May return Drawable, Window errors. +// // GetGeometry sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetGeometryCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetGeometryCookie.Reply. func GetGeometry(c *xgb.Conn, Drawable Drawable) GetGeometryCookie { cookie := c.NewCookie(true, true) c.NewRequest(getGeometryRequest(c, Drawable), cookie) @@ -9174,14 +9400,25 @@ func GetGeometryUnchecked(c *xgb.Conn, Drawable Drawable) GetGeometryCookie { // GetGeometryReply represents the data returned from a GetGeometry request. type GetGeometryReply struct { - Sequence uint16 // sequence number of the request for this reply - Length uint32 // number of bytes in this reply - Depth byte - Root Window - X int16 - Y int16 - Width uint16 - Height uint16 + Sequence uint16 // sequence number of the request for this reply + Length uint32 // number of bytes in this reply + // The depth of the drawable (bits per pixel for the object). + Depth byte + // Root window of the screen containing Drawable. + Root Window + // The X coordinate of Drawable. If Drawable is a window, the coordinate + // specifies the upper-left outer corner relative to its parent's origin. If + // Drawable is a pixmap, the X coordinate is always 0. + X int16 + // The Y coordinate of Drawable. If Drawable is a window, the coordinate + // specifies the upper-left outer corner relative to its parent's origin. If + // Drawable is a pixmap, the Y coordinate is always 0. + Y int16 + // The width of Drawable. + Width uint16 + // The height of Drawable. + Height uint16 + // The border width (in pixels). BorderWidth uint16 // padding: 2 bytes } @@ -9235,8 +9472,7 @@ func getGeometryReply(buf []byte) *GetGeometryReply { return v } -// Write request to wire for GetGeometry -// getGeometryRequest writes a GetGeometry request to a byte slice. +// getGeometryRequest writes a GetGeometry request to a byte slice for transfer. func getGeometryRequest(c *xgb.Conn, Drawable Drawable) []byte { size := 8 b := 0 @@ -9262,8 +9498,8 @@ type GetImageCookie struct { } // GetImage sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetImageCookie.Reply() -func GetImage(c *xgb.Conn, Format byte, Drawable Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32) GetImageCookie { +// If an error occurs, it will be returned with the reply by calling GetImageCookie.Reply. +func GetImage(c *xgb.Conn, Format byte, Drawable Drawable, X, Y int16, Width, Height uint16, PlaneMask uint32) GetImageCookie { cookie := c.NewCookie(true, true) c.NewRequest(getImageRequest(c, Format, Drawable, X, Y, Width, Height, PlaneMask), cookie) return GetImageCookie{cookie} @@ -9271,7 +9507,7 @@ func GetImage(c *xgb.Conn, Format byte, Drawable Drawable, X int16, Y int16, Wid // GetImageUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetImageUnchecked(c *xgb.Conn, Format byte, Drawable Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32) GetImageCookie { +func GetImageUnchecked(c *xgb.Conn, Format byte, Drawable Drawable, X, Y int16, Width, Height uint16, PlaneMask uint32) GetImageCookie { cookie := c.NewCookie(false, true) c.NewRequest(getImageRequest(c, Format, Drawable, X, Y, Width, Height, PlaneMask), cookie) return GetImageCookie{cookie} @@ -9325,9 +9561,8 @@ func getImageReply(buf []byte) *GetImageReply { return v } -// Write request to wire for GetImage -// getImageRequest writes a GetImage request to a byte slice. -func getImageRequest(c *xgb.Conn, Format byte, Drawable Drawable, X int16, Y int16, Width uint16, Height uint16, PlaneMask uint32) []byte { +// getImageRequest writes a GetImage request to a byte slice for transfer. +func getImageRequest(c *xgb.Conn, Format byte, Drawable Drawable, X, Y int16, Width, Height uint16, PlaneMask uint32) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -9368,7 +9603,7 @@ type GetInputFocusCookie struct { } // GetInputFocus sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetInputFocusCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetInputFocusCookie.Reply. func GetInputFocus(c *xgb.Conn) GetInputFocusCookie { cookie := c.NewCookie(true, true) c.NewRequest(getInputFocusRequest(c), cookie) @@ -9423,8 +9658,7 @@ func getInputFocusReply(buf []byte) *GetInputFocusReply { return v } -// Write request to wire for GetInputFocus -// getInputFocusRequest writes a GetInputFocus request to a byte slice. +// getInputFocusRequest writes a GetInputFocus request to a byte slice for transfer. func getInputFocusRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -9446,7 +9680,7 @@ type GetKeyboardControlCookie struct { } // GetKeyboardControl sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetKeyboardControlCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetKeyboardControlCookie.Reply. func GetKeyboardControl(c *xgb.Conn) GetKeyboardControlCookie { cookie := c.NewCookie(true, true) c.NewRequest(getKeyboardControlRequest(c), cookie) @@ -9525,8 +9759,7 @@ func getKeyboardControlReply(buf []byte) *GetKeyboardControlReply { return v } -// Write request to wire for GetKeyboardControl -// getKeyboardControlRequest writes a GetKeyboardControl request to a byte slice. +// getKeyboardControlRequest writes a GetKeyboardControl request to a byte slice for transfer. func getKeyboardControlRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -9548,7 +9781,7 @@ type GetKeyboardMappingCookie struct { } // GetKeyboardMapping sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetKeyboardMappingCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetKeyboardMappingCookie.Reply. func GetKeyboardMapping(c *xgb.Conn, FirstKeycode Keycode, Count byte) GetKeyboardMappingCookie { cookie := c.NewCookie(true, true) c.NewRequest(getKeyboardMappingRequest(c, FirstKeycode, Count), cookie) @@ -9609,8 +9842,7 @@ func getKeyboardMappingReply(buf []byte) *GetKeyboardMappingReply { return v } -// Write request to wire for GetKeyboardMapping -// getKeyboardMappingRequest writes a GetKeyboardMapping request to a byte slice. +// getKeyboardMappingRequest writes a GetKeyboardMapping request to a byte slice for transfer. func getKeyboardMappingRequest(c *xgb.Conn, FirstKeycode Keycode, Count byte) []byte { size := 8 b := 0 @@ -9639,7 +9871,7 @@ type GetModifierMappingCookie struct { } // GetModifierMapping sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetModifierMappingCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetModifierMappingCookie.Reply. func GetModifierMapping(c *xgb.Conn) GetModifierMappingCookie { cookie := c.NewCookie(true, true) c.NewRequest(getModifierMappingRequest(c), cookie) @@ -9700,8 +9932,7 @@ func getModifierMappingReply(buf []byte) *GetModifierMappingReply { return v } -// Write request to wire for GetModifierMapping -// getModifierMappingRequest writes a GetModifierMapping request to a byte slice. +// getModifierMappingRequest writes a GetModifierMapping request to a byte slice for transfer. func getModifierMappingRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -9723,8 +9954,8 @@ type GetMotionEventsCookie struct { } // GetMotionEvents sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetMotionEventsCookie.Reply() -func GetMotionEvents(c *xgb.Conn, Window Window, Start Timestamp, Stop Timestamp) GetMotionEventsCookie { +// If an error occurs, it will be returned with the reply by calling GetMotionEventsCookie.Reply. +func GetMotionEvents(c *xgb.Conn, Window Window, Start, Stop Timestamp) GetMotionEventsCookie { cookie := c.NewCookie(true, true) c.NewRequest(getMotionEventsRequest(c, Window, Start, Stop), cookie) return GetMotionEventsCookie{cookie} @@ -9732,7 +9963,7 @@ func GetMotionEvents(c *xgb.Conn, Window Window, Start Timestamp, Stop Timestamp // GetMotionEventsUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetMotionEventsUnchecked(c *xgb.Conn, Window Window, Start Timestamp, Stop Timestamp) GetMotionEventsCookie { +func GetMotionEventsUnchecked(c *xgb.Conn, Window Window, Start, Stop Timestamp) GetMotionEventsCookie { cookie := c.NewCookie(false, true) c.NewRequest(getMotionEventsRequest(c, Window, Start, Stop), cookie) return GetMotionEventsCookie{cookie} @@ -9784,9 +10015,8 @@ func getMotionEventsReply(buf []byte) *GetMotionEventsReply { return v } -// Write request to wire for GetMotionEvents -// getMotionEventsRequest writes a GetMotionEvents request to a byte slice. -func getMotionEventsRequest(c *xgb.Conn, Window Window, Start Timestamp, Stop Timestamp) []byte { +// getMotionEventsRequest writes a GetMotionEvents request to a byte slice for transfer. +func getMotionEventsRequest(c *xgb.Conn, Window Window, Start, Stop Timestamp) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -9817,7 +10047,7 @@ type GetPointerControlCookie struct { } // GetPointerControl sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPointerControlCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPointerControlCookie.Reply. func GetPointerControl(c *xgb.Conn) GetPointerControlCookie { cookie := c.NewCookie(true, true) c.NewRequest(getPointerControlRequest(c), cookie) @@ -9882,8 +10112,7 @@ func getPointerControlReply(buf []byte) *GetPointerControlReply { return v } -// Write request to wire for GetPointerControl -// getPointerControlRequest writes a GetPointerControl request to a byte slice. +// getPointerControlRequest writes a GetPointerControl request to a byte slice for transfer. func getPointerControlRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -9905,7 +10134,7 @@ type GetPointerMappingCookie struct { } // GetPointerMapping sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPointerMappingCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPointerMappingCookie.Reply. func GetPointerMapping(c *xgb.Conn) GetPointerMappingCookie { cookie := c.NewCookie(true, true) c.NewRequest(getPointerMappingRequest(c), cookie) @@ -9964,8 +10193,7 @@ func getPointerMappingReply(buf []byte) *GetPointerMappingReply { return v } -// Write request to wire for GetPointerMapping -// getPointerMappingRequest writes a GetPointerMapping request to a byte slice. +// getPointerMappingRequest writes a GetPointerMapping request to a byte slice for transfer. func getPointerMappingRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -9986,9 +10214,22 @@ type GetPropertyCookie struct { *xgb.Cookie } +// Gets the specified Property from the specified Window. Properties are for +// example the window title (WM_NAME) or its minimum size (WM_NORMAL_HINTS). +// Protocols such as EWMH also use properties - for example EWMH defines the +// window title, encoded as UTF-8 string, in the _NET_WM_NAME property. +// +// May return a Atom error if property or Type do not refer to a valid atom. +// +// May return a Value error if the specified LongOffset is beyond the actual property length (e.g. the +// property has a length of 3 bytes and you are setting LongOffset to 1, +// resulting in a byte offset of 4). +// +// May return a Window error if the specified Window does not exist. +// // GetProperty sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPropertyCookie.Reply() -func GetProperty(c *xgb.Conn, Delete bool, Window Window, Property Atom, Type Atom, LongOffset uint32, LongLength uint32) GetPropertyCookie { +// If an error occurs, it will be returned with the reply by calling GetPropertyCookie.Reply. +func GetProperty(c *xgb.Conn, Delete bool, Window Window, Property, Type Atom, LongOffset, LongLength uint32) GetPropertyCookie { cookie := c.NewCookie(true, true) c.NewRequest(getPropertyRequest(c, Delete, Window, Property, Type, LongOffset, LongLength), cookie) return GetPropertyCookie{cookie} @@ -9996,7 +10237,7 @@ func GetProperty(c *xgb.Conn, Delete bool, Window Window, Property Atom, Type At // GetPropertyUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GetPropertyUnchecked(c *xgb.Conn, Delete bool, Window Window, Property Atom, Type Atom, LongOffset uint32, LongLength uint32) GetPropertyCookie { +func GetPropertyUnchecked(c *xgb.Conn, Delete bool, Window Window, Property, Type Atom, LongOffset, LongLength uint32) GetPropertyCookie { cookie := c.NewCookie(false, true) c.NewRequest(getPropertyRequest(c, Delete, Window, Property, Type, LongOffset, LongLength), cookie) return GetPropertyCookie{cookie} @@ -10004,12 +10245,20 @@ func GetPropertyUnchecked(c *xgb.Conn, Delete bool, Window Window, Property Atom // GetPropertyReply represents the data returned from a GetProperty request. type GetPropertyReply struct { - Sequence uint16 // sequence number of the request for this reply - Length uint32 // number of bytes in this reply - Format byte - Type Atom + Sequence uint16 // sequence number of the request for this reply + Length uint32 // number of bytes in this reply + // Specifies whether the data should be viewed as a list of 8-bit, 16-bit, or + // 32-bit quantities. Possible values are 8, 16, and 32. This information allows + // the X server to correctly perform byte-swap operations as necessary. + Format byte + // The actual type of the property (an atom). + Type Atom + // The number of bytes remaining to be read in the property if a partial read was + // performed. BytesAfter uint32 - ValueLen uint32 + // The length of value. You should use the corresponding accessor instead of this + // field. + ValueLen uint32 // padding: 12 bytes Value []byte // size: xgb.Pad(((int(ValueLen) * (int(Format) / 8)) * 1)) } @@ -10058,9 +10307,8 @@ func getPropertyReply(buf []byte) *GetPropertyReply { return v } -// Write request to wire for GetProperty -// getPropertyRequest writes a GetProperty request to a byte slice. -func getPropertyRequest(c *xgb.Conn, Delete bool, Window Window, Property Atom, Type Atom, LongOffset uint32, LongLength uint32) []byte { +// getPropertyRequest writes a GetProperty request to a byte slice for transfer. +func getPropertyRequest(c *xgb.Conn, Delete bool, Window Window, Property, Type Atom, LongOffset, LongLength uint32) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -10102,7 +10350,7 @@ type GetScreenSaverCookie struct { } // GetScreenSaver sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetScreenSaverCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetScreenSaverCookie.Reply. func GetScreenSaver(c *xgb.Conn) GetScreenSaverCookie { cookie := c.NewCookie(true, true) c.NewRequest(getScreenSaverRequest(c), cookie) @@ -10171,8 +10419,7 @@ func getScreenSaverReply(buf []byte) *GetScreenSaverReply { return v } -// Write request to wire for GetScreenSaver -// getScreenSaverRequest writes a GetScreenSaver request to a byte slice. +// getScreenSaverRequest writes a GetScreenSaver request to a byte slice for transfer. func getScreenSaverRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -10193,8 +10440,12 @@ type GetSelectionOwnerCookie struct { *xgb.Cookie } +// Gets the owner of the specified selection. +// +// May return a Atom error if selection does not refer to a valid atom. +// // GetSelectionOwner sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetSelectionOwnerCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetSelectionOwnerCookie.Reply. func GetSelectionOwner(c *xgb.Conn, Selection Atom) GetSelectionOwnerCookie { cookie := c.NewCookie(true, true) c.NewRequest(getSelectionOwnerRequest(c, Selection), cookie) @@ -10214,6 +10465,7 @@ type GetSelectionOwnerReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes + // The current selection owner window. Owner Window } @@ -10248,8 +10500,7 @@ func getSelectionOwnerReply(buf []byte) *GetSelectionOwnerReply { return v } -// Write request to wire for GetSelectionOwner -// getSelectionOwnerRequest writes a GetSelectionOwner request to a byte slice. +// getSelectionOwnerRequest writes a GetSelectionOwner request to a byte slice for transfer. func getSelectionOwnerRequest(c *xgb.Conn, Selection Atom) []byte { size := 8 b := 0 @@ -10274,8 +10525,14 @@ type GetWindowAttributesCookie struct { *xgb.Cookie } +// Gets the current attributes for the specified Window. +// +// May return a Window error if the specified Window does not exist. +// +// May return Drawable errors. +// // GetWindowAttributes sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetWindowAttributesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetWindowAttributesCookie.Reply. func GetWindowAttributes(c *xgb.Conn, Window Window) GetWindowAttributesCookie { cookie := c.NewCookie(true, true) c.NewRequest(getWindowAttributesRequest(c, Window), cookie) @@ -10292,22 +10549,31 @@ func GetWindowAttributesUnchecked(c *xgb.Conn, Window Window) GetWindowAttribute // GetWindowAttributesReply represents the data returned from a GetWindowAttributes request. type GetWindowAttributesReply struct { - Sequence uint16 // sequence number of the request for this reply - Length uint32 // number of bytes in this reply - BackingStore byte - Visual Visualid - Class uint16 - BitGravity byte - WinGravity byte - BackingPlanes uint32 - BackingPixel uint32 - SaveUnder bool - MapIsInstalled bool - MapState byte - OverrideRedirect bool - Colormap Colormap - AllEventMasks uint32 - YourEventMask uint32 + Sequence uint16 // sequence number of the request for this reply + Length uint32 // number of bytes in this reply + BackingStore byte + // The associated visual structure of Window. + Visual Visualid + Class uint16 + BitGravity byte + WinGravity byte + // Planes to be preserved if possible. + BackingPlanes uint32 + // Value to be used when restoring planes. + BackingPixel uint32 + // Boolean, should bits under be saved? + SaveUnder bool + MapIsInstalled bool + MapState byte + // Window managers should ignore this window if OverrideRedirect is 1. + OverrideRedirect bool + // Color map to be associated with window. + Colormap Colormap + // Set of events all people have interest in. + AllEventMasks uint32 + // My event mask. + YourEventMask uint32 + // Set of events that should not propagate. DoNotPropagateMask uint16 // padding: 2 bytes } @@ -10397,8 +10663,7 @@ func getWindowAttributesReply(buf []byte) *GetWindowAttributesReply { return v } -// Write request to wire for GetWindowAttributes -// getWindowAttributesRequest writes a GetWindowAttributes request to a byte slice. +// getWindowAttributesRequest writes a GetWindowAttributes request to a byte slice for transfer. func getWindowAttributesRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -10423,17 +10688,62 @@ type GrabButtonCookie struct { *xgb.Cookie } +// This request establishes a passive grab. The pointer is actively grabbed as +// described in GrabPointer, the last-pointer-grab time is set to the time at +// which the button was pressed (as transmitted in the ButtonPress event), and the +// ButtonPress event is reported if all of the following conditions are true: +// +// The pointer is not grabbed and the specified button is logically pressed when +// the specified modifier keys are logically down, and no other buttons or +// modifier keys are logically down. +// +// The grab-window contains the pointer. +// +// The confine-to window (if any) is viewable. +// +// A passive grab on the same button/key combination does not exist on any +// ancestor of grab-window. +// +// The interpretation of the remaining arguments is the same as for GrabPointer. +// The active grab is terminated automatically when the logical state of the +// pointer has all buttons released, independent of the logical state of modifier +// keys. Note that the logical state of a device (as seen by means of the +// protocol) may lag the physical state if device event processing is frozen. This +// request overrides all previous passive grabs by the same client on the same +// button/key combinations on the same window. A modifier of AnyModifier is +// equivalent to issuing the request for all possible modifier combinations +// (including the combination of no modifiers). It is not required that all +// specified modifiers have currently assigned keycodes. A button of AnyButton is +// equivalent to issuing the request for all possible buttons. Otherwise, it is +// not required that the button specified currently be assigned to a physical +// button. +// +// An Access error is generated if some other client has already issued a +// GrabButton request with the same button/key combination on the same window. +// When using AnyModifier or AnyButton, the request fails completely (no grabs are +// established), and an Access error is generated if there is a conflicting grab +// for any combination. The request has no effect on an active grab. +// +// May return a Access error if another client has already issued a GrabButton with the same button/key +// combination on the same window. +// +// May return a Cursor error if the specified Cursor does not exist. +// +// May return a Window error if the specified Window does not exist. +// +// May return Value errors. +// // GrabButton sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GrabButton(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode byte, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Button byte, Modifiers uint16) GrabButtonCookie { +func GrabButton(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Button byte, Modifiers uint16) GrabButtonCookie { cookie := c.NewCookie(false, false) c.NewRequest(grabButtonRequest(c, OwnerEvents, GrabWindow, EventMask, PointerMode, KeyboardMode, ConfineTo, Cursor, Button, Modifiers), cookie) return GrabButtonCookie{cookie} } // GrabButtonChecked sends a checked request. -// If an error occurs, it can be retrieved using GrabButtonCookie.Check() -func GrabButtonChecked(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode byte, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Button byte, Modifiers uint16) GrabButtonCookie { +// If an error occurs, it can be retrieved using GrabButtonCookie.Check. +func GrabButtonChecked(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Button byte, Modifiers uint16) GrabButtonCookie { cookie := c.NewCookie(true, false) c.NewRequest(grabButtonRequest(c, OwnerEvents, GrabWindow, EventMask, PointerMode, KeyboardMode, ConfineTo, Cursor, Button, Modifiers), cookie) return GrabButtonCookie{cookie} @@ -10445,9 +10755,8 @@ func (cook GrabButtonCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for GrabButton -// grabButtonRequest writes a GrabButton request to a byte slice. -func grabButtonRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode byte, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Button byte, Modifiers uint16) []byte { +// grabButtonRequest writes a GrabButton request to a byte slice for transfer. +func grabButtonRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Button byte, Modifiers uint16) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -10499,17 +10808,55 @@ type GrabKeyCookie struct { *xgb.Cookie } +// Establishes a passive grab on the keyboard. In the future, the keyboard is +// actively grabbed (as for GrabKeyboard), the last-keyboard-grab time is set to +// the time at which the key was pressed (as transmitted in the KeyPress event), +// and the KeyPress event is reported if all of the following conditions are true: +// +// The keyboard is not grabbed and the specified key (which can itself be a +// modifier key) is logically pressed when the specified modifier keys are +// logically down, and no other modifier keys are logically down. +// +// Either the grab_window is an ancestor of (or is) the focus window, or the +// grab_window is a descendant of the focus window and contains the pointer. +// +// A passive grab on the same key combination does not exist on any ancestor of +// grab_window. +// +// The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated +// automatically when the logical state of the keyboard has the specified key released (independent of the +// logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window. +// +// Note that the logical state of a device (as seen by client applications) may lag the physical state if +// device event processing is frozen. +// +// A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified +// have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for +// all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode +// and max_keycode in the connection setup, or a BadValue error results. +// +// If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess +// error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error +// results (no grabs are established) if there is a conflicting grab for any combination. +// +// May return a Access error if another client has already issued a GrabKey with the same button/key +// combination on the same window. +// +// May return a Window error if the specified Window does not exist. +// +// May return Value errors. +// // GrabKey sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GrabKey(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Modifiers uint16, Key Keycode, PointerMode byte, KeyboardMode byte) GrabKeyCookie { +func GrabKey(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Modifiers uint16, Key Keycode, PointerMode, KeyboardMode byte) GrabKeyCookie { cookie := c.NewCookie(false, false) c.NewRequest(grabKeyRequest(c, OwnerEvents, GrabWindow, Modifiers, Key, PointerMode, KeyboardMode), cookie) return GrabKeyCookie{cookie} } // GrabKeyChecked sends a checked request. -// If an error occurs, it can be retrieved using GrabKeyCookie.Check() -func GrabKeyChecked(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Modifiers uint16, Key Keycode, PointerMode byte, KeyboardMode byte) GrabKeyCookie { +// If an error occurs, it can be retrieved using GrabKeyCookie.Check. +func GrabKeyChecked(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Modifiers uint16, Key Keycode, PointerMode, KeyboardMode byte) GrabKeyCookie { cookie := c.NewCookie(true, false) c.NewRequest(grabKeyRequest(c, OwnerEvents, GrabWindow, Modifiers, Key, PointerMode, KeyboardMode), cookie) return GrabKeyCookie{cookie} @@ -10521,9 +10868,8 @@ func (cook GrabKeyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for GrabKey -// grabKeyRequest writes a GrabKey request to a byte slice. -func grabKeyRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Modifiers uint16, Key Keycode, PointerMode byte, KeyboardMode byte) []byte { +// grabKeyRequest writes a GrabKey request to a byte slice for transfer. +func grabKeyRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Modifiers uint16, Key Keycode, PointerMode, KeyboardMode byte) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -10566,9 +10912,24 @@ type GrabKeyboardCookie struct { *xgb.Cookie } +// Actively grabs control of the keyboard and generates FocusIn and FocusOut +// events. Further key events are reported only to the grabbing client. +// +// Any active keyboard grab by this client is overridden. If the keyboard is +// actively grabbed by some other client, AlreadyGrabbed is returned. If +// GrabWindow is not viewable, GrabNotViewable is returned. If the keyboard +// is frozen by an active grab of another client, GrabFrozen is returned. If the +// specified Time is earlier than the last-keyboard-grab time or later than the +// current X server time, GrabInvalidTime is returned. Otherwise, the +// last-keyboard-grab time is set to the specified time. +// +// May return a Window error if the specified Window does not exist. +// +// May return Value errors. +// // GrabKeyboard sends a checked request. -// If an error occurs, it will be returned with the reply by calling GrabKeyboardCookie.Reply() -func GrabKeyboard(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Time Timestamp, PointerMode byte, KeyboardMode byte) GrabKeyboardCookie { +// If an error occurs, it will be returned with the reply by calling GrabKeyboardCookie.Reply. +func GrabKeyboard(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Time Timestamp, PointerMode, KeyboardMode byte) GrabKeyboardCookie { cookie := c.NewCookie(true, true) c.NewRequest(grabKeyboardRequest(c, OwnerEvents, GrabWindow, Time, PointerMode, KeyboardMode), cookie) return GrabKeyboardCookie{cookie} @@ -10576,7 +10937,7 @@ func GrabKeyboard(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Time Timesta // GrabKeyboardUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GrabKeyboardUnchecked(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Time Timestamp, PointerMode byte, KeyboardMode byte) GrabKeyboardCookie { +func GrabKeyboardUnchecked(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Time Timestamp, PointerMode, KeyboardMode byte) GrabKeyboardCookie { cookie := c.NewCookie(false, true) c.NewRequest(grabKeyboardRequest(c, OwnerEvents, GrabWindow, Time, PointerMode, KeyboardMode), cookie) return GrabKeyboardCookie{cookie} @@ -10618,9 +10979,8 @@ func grabKeyboardReply(buf []byte) *GrabKeyboardReply { return v } -// Write request to wire for GrabKeyboard -// grabKeyboardRequest writes a GrabKeyboard request to a byte slice. -func grabKeyboardRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Time Timestamp, PointerMode byte, KeyboardMode byte) []byte { +// grabKeyboardRequest writes a GrabKeyboard request to a byte slice for transfer. +func grabKeyboardRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Time Timestamp, PointerMode, KeyboardMode byte) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -10660,9 +11020,15 @@ type GrabPointerCookie struct { *xgb.Cookie } +// Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client. +// +// May return a Window error if the specified Window does not exist. +// +// May return Value errors. +// // GrabPointer sends a checked request. -// If an error occurs, it will be returned with the reply by calling GrabPointerCookie.Reply() -func GrabPointer(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode byte, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Time Timestamp) GrabPointerCookie { +// If an error occurs, it will be returned with the reply by calling GrabPointerCookie.Reply. +func GrabPointer(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Time Timestamp) GrabPointerCookie { cookie := c.NewCookie(true, true) c.NewRequest(grabPointerRequest(c, OwnerEvents, GrabWindow, EventMask, PointerMode, KeyboardMode, ConfineTo, Cursor, Time), cookie) return GrabPointerCookie{cookie} @@ -10670,7 +11036,7 @@ func GrabPointer(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uin // GrabPointerUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func GrabPointerUnchecked(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode byte, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Time Timestamp) GrabPointerCookie { +func GrabPointerUnchecked(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Time Timestamp) GrabPointerCookie { cookie := c.NewCookie(false, true) c.NewRequest(grabPointerRequest(c, OwnerEvents, GrabWindow, EventMask, PointerMode, KeyboardMode, ConfineTo, Cursor, Time), cookie) return GrabPointerCookie{cookie} @@ -10712,9 +11078,8 @@ func grabPointerReply(buf []byte) *GrabPointerReply { return v } -// Write request to wire for GrabPointer -// grabPointerRequest writes a GrabPointer request to a byte slice. -func grabPointerRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode byte, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Time Timestamp) []byte { +// grabPointerRequest writes a GrabPointer request to a byte slice for transfer. +func grabPointerRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMask uint16, PointerMode, KeyboardMode byte, ConfineTo Window, Cursor Cursor, Time Timestamp) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -10770,7 +11135,7 @@ func GrabServer(c *xgb.Conn) GrabServerCookie { } // GrabServerChecked sends a checked request. -// If an error occurs, it can be retrieved using GrabServerCookie.Check() +// If an error occurs, it can be retrieved using GrabServerCookie.Check. func GrabServerChecked(c *xgb.Conn) GrabServerCookie { cookie := c.NewCookie(true, false) c.NewRequest(grabServerRequest(c), cookie) @@ -10783,8 +11148,7 @@ func (cook GrabServerCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for GrabServer -// grabServerRequest writes a GrabServer request to a byte slice. +// grabServerRequest writes a GrabServer request to a byte slice for transfer. func grabServerRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -10805,17 +11169,32 @@ type ImageText16Cookie struct { *xgb.Cookie } +// Fills the destination rectangle with the background pixel from Gc, then +// paints the text with the foreground pixel from Gc. The upper-left corner of +// the filled rectangle is at [x, y - font-ascent]. The width is overall-width, +// the height is font-ascent + font-descent. The overall-width, font-ascent and +// font-descent are as returned by QueryTextExtents. +// +// Note that using X core fonts is deprecated (but still supported) in favor of +// client-side rendering using Xft. +// +// May return a Drawable error if the specified Drawable (Window or Pixmap) does not exist. +// +// May return a GContext error if the specified graphics context does not exist. +// +// May return Match errors. +// // ImageText16 sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ImageText16(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X int16, Y int16, String []Char2b) ImageText16Cookie { +func ImageText16(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X, Y int16, String []Char2b) ImageText16Cookie { cookie := c.NewCookie(false, false) c.NewRequest(imageText16Request(c, StringLen, Drawable, Gc, X, Y, String), cookie) return ImageText16Cookie{cookie} } // ImageText16Checked sends a checked request. -// If an error occurs, it can be retrieved using ImageText16Cookie.Check() -func ImageText16Checked(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X int16, Y int16, String []Char2b) ImageText16Cookie { +// If an error occurs, it can be retrieved using ImageText16Cookie.Check. +func ImageText16Checked(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X, Y int16, String []Char2b) ImageText16Cookie { cookie := c.NewCookie(true, false) c.NewRequest(imageText16Request(c, StringLen, Drawable, Gc, X, Y, String), cookie) return ImageText16Cookie{cookie} @@ -10827,9 +11206,8 @@ func (cook ImageText16Cookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ImageText16 -// imageText16Request writes a ImageText16 request to a byte slice. -func imageText16Request(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X int16, Y int16, String []Char2b) []byte { +// imageText16Request writes a ImageText16 request to a byte slice for transfer. +func imageText16Request(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X, Y int16, String []Char2b) []byte { size := xgb.Pad((16 + xgb.Pad((int(StringLen) * 2)))) b := 0 buf := make([]byte, size) @@ -10865,17 +11243,32 @@ type ImageText8Cookie struct { *xgb.Cookie } +// Fills the destination rectangle with the background pixel from Gc, then +// paints the text with the foreground pixel from Gc. The upper-left corner of +// the filled rectangle is at [x, y - font-ascent]. The width is overall-width, +// the height is font-ascent + font-descent. The overall-width, font-ascent and +// font-descent are as returned by QueryTextExtents. +// +// Note that using X core fonts is deprecated (but still supported) in favor of +// client-side rendering using Xft. +// +// May return a Drawable error if the specified Drawable (Window or Pixmap) does not exist. +// +// May return a GContext error if the specified graphics context does not exist. +// +// May return Match errors. +// // ImageText8 sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ImageText8(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X int16, Y int16, String string) ImageText8Cookie { +func ImageText8(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X, Y int16, String string) ImageText8Cookie { cookie := c.NewCookie(false, false) c.NewRequest(imageText8Request(c, StringLen, Drawable, Gc, X, Y, String), cookie) return ImageText8Cookie{cookie} } // ImageText8Checked sends a checked request. -// If an error occurs, it can be retrieved using ImageText8Cookie.Check() -func ImageText8Checked(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X int16, Y int16, String string) ImageText8Cookie { +// If an error occurs, it can be retrieved using ImageText8Cookie.Check. +func ImageText8Checked(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X, Y int16, String string) ImageText8Cookie { cookie := c.NewCookie(true, false) c.NewRequest(imageText8Request(c, StringLen, Drawable, Gc, X, Y, String), cookie) return ImageText8Cookie{cookie} @@ -10887,9 +11280,8 @@ func (cook ImageText8Cookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ImageText8 -// imageText8Request writes a ImageText8 request to a byte slice. -func imageText8Request(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X int16, Y int16, String string) []byte { +// imageText8Request writes a ImageText8 request to a byte slice for transfer. +func imageText8Request(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcontext, X, Y int16, String string) []byte { size := xgb.Pad((16 + xgb.Pad((int(StringLen) * 1)))) b := 0 buf := make([]byte, size) @@ -10935,7 +11327,7 @@ func InstallColormap(c *xgb.Conn, Cmap Colormap) InstallColormapCookie { } // InstallColormapChecked sends a checked request. -// If an error occurs, it can be retrieved using InstallColormapCookie.Check() +// If an error occurs, it can be retrieved using InstallColormapCookie.Check. func InstallColormapChecked(c *xgb.Conn, Cmap Colormap) InstallColormapCookie { cookie := c.NewCookie(true, false) c.NewRequest(installColormapRequest(c, Cmap), cookie) @@ -10948,8 +11340,7 @@ func (cook InstallColormapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for InstallColormap -// installColormapRequest writes a InstallColormap request to a byte slice. +// installColormapRequest writes a InstallColormap request to a byte slice for transfer. func installColormapRequest(c *xgb.Conn, Cmap Colormap) []byte { size := 8 b := 0 @@ -10974,8 +11365,20 @@ type InternAtomCookie struct { *xgb.Cookie } +// Retrieves the identifier for the atom with the specified +// name. Atoms are used in protocols like EWMH, for example to store window titles +// (_NET_WM_NAME atom) as property of a window. +// +// If OnlyIfExists is 0, the atom will be created if it does not already exist. +// If OnlyIfExists is 1, AtomNone will be returned if the atom does +// not yet exist. +// +// May return a Value error if a value other than 0 or 1 was specified for OnlyIfExists. +// +// May return Alloc errors. +// // InternAtom sends a checked request. -// If an error occurs, it will be returned with the reply by calling InternAtomCookie.Reply() +// If an error occurs, it will be returned with the reply by calling InternAtomCookie.Reply. func InternAtom(c *xgb.Conn, OnlyIfExists bool, NameLen uint16, Name string) InternAtomCookie { cookie := c.NewCookie(true, true) c.NewRequest(internAtomRequest(c, OnlyIfExists, NameLen, Name), cookie) @@ -11029,8 +11432,7 @@ func internAtomReply(buf []byte) *InternAtomReply { return v } -// Write request to wire for InternAtom -// internAtomRequest writes a InternAtom request to a byte slice. +// internAtomRequest writes a InternAtom request to a byte slice for transfer. func internAtomRequest(c *xgb.Conn, OnlyIfExists bool, NameLen uint16, Name string) []byte { size := xgb.Pad((8 + xgb.Pad((int(NameLen) * 1)))) b := 0 @@ -11065,6 +11467,10 @@ type KillClientCookie struct { *xgb.Cookie } +// Forces a close down of the client that created the specified Resource. +// +// May return a Value error if the specified Resource does not exist. +// // KillClient sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func KillClient(c *xgb.Conn, Resource uint32) KillClientCookie { @@ -11074,7 +11480,7 @@ func KillClient(c *xgb.Conn, Resource uint32) KillClientCookie { } // KillClientChecked sends a checked request. -// If an error occurs, it can be retrieved using KillClientCookie.Check() +// If an error occurs, it can be retrieved using KillClientCookie.Check. func KillClientChecked(c *xgb.Conn, Resource uint32) KillClientCookie { cookie := c.NewCookie(true, false) c.NewRequest(killClientRequest(c, Resource), cookie) @@ -11087,8 +11493,7 @@ func (cook KillClientCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for KillClient -// killClientRequest writes a KillClient request to a byte slice. +// killClientRequest writes a KillClient request to a byte slice for transfer. func killClientRequest(c *xgb.Conn, Resource uint32) []byte { size := 8 b := 0 @@ -11114,7 +11519,7 @@ type ListExtensionsCookie struct { } // ListExtensions sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListExtensionsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListExtensionsCookie.Reply. func ListExtensions(c *xgb.Conn) ListExtensionsCookie { cookie := c.NewCookie(true, true) c.NewRequest(listExtensionsRequest(c), cookie) @@ -11172,8 +11577,7 @@ func listExtensionsReply(buf []byte) *ListExtensionsReply { return v } -// Write request to wire for ListExtensions -// listExtensionsRequest writes a ListExtensions request to a byte slice. +// listExtensionsRequest writes a ListExtensions request to a byte slice for transfer. func listExtensionsRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -11194,9 +11598,11 @@ type ListFontsCookie struct { *xgb.Cookie } +// Gets a list of available font names which match the given Pattern. +// // ListFonts sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListFontsCookie.Reply() -func ListFonts(c *xgb.Conn, MaxNames uint16, PatternLen uint16, Pattern string) ListFontsCookie { +// If an error occurs, it will be returned with the reply by calling ListFontsCookie.Reply. +func ListFonts(c *xgb.Conn, MaxNames, PatternLen uint16, Pattern string) ListFontsCookie { cookie := c.NewCookie(true, true) c.NewRequest(listFontsRequest(c, MaxNames, PatternLen, Pattern), cookie) return ListFontsCookie{cookie} @@ -11204,7 +11610,7 @@ func ListFonts(c *xgb.Conn, MaxNames uint16, PatternLen uint16, Pattern string) // ListFontsUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ListFontsUnchecked(c *xgb.Conn, MaxNames uint16, PatternLen uint16, Pattern string) ListFontsCookie { +func ListFontsUnchecked(c *xgb.Conn, MaxNames, PatternLen uint16, Pattern string) ListFontsCookie { cookie := c.NewCookie(false, true) c.NewRequest(listFontsRequest(c, MaxNames, PatternLen, Pattern), cookie) return ListFontsCookie{cookie} @@ -11215,6 +11621,7 @@ type ListFontsReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes + // The number of font names. NamesLen uint16 // padding: 22 bytes Names []Str // size: StrListSize(Names) @@ -11256,9 +11663,8 @@ func listFontsReply(buf []byte) *ListFontsReply { return v } -// Write request to wire for ListFonts -// listFontsRequest writes a ListFonts request to a byte slice. -func listFontsRequest(c *xgb.Conn, MaxNames uint16, PatternLen uint16, Pattern string) []byte { +// listFontsRequest writes a ListFonts request to a byte slice for transfer. +func listFontsRequest(c *xgb.Conn, MaxNames, PatternLen uint16, Pattern string) []byte { size := xgb.Pad((8 + xgb.Pad((int(PatternLen) * 1)))) b := 0 buf := make([]byte, size) @@ -11288,9 +11694,11 @@ type ListFontsWithInfoCookie struct { *xgb.Cookie } +// Gets a list of available font names which match the given Pattern. +// // ListFontsWithInfo sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListFontsWithInfoCookie.Reply() -func ListFontsWithInfo(c *xgb.Conn, MaxNames uint16, PatternLen uint16, Pattern string) ListFontsWithInfoCookie { +// If an error occurs, it will be returned with the reply by calling ListFontsWithInfoCookie.Reply. +func ListFontsWithInfo(c *xgb.Conn, MaxNames, PatternLen uint16, Pattern string) ListFontsWithInfoCookie { cookie := c.NewCookie(true, true) c.NewRequest(listFontsWithInfoRequest(c, MaxNames, PatternLen, Pattern), cookie) return ListFontsWithInfoCookie{cookie} @@ -11298,7 +11706,7 @@ func ListFontsWithInfo(c *xgb.Conn, MaxNames uint16, PatternLen uint16, Pattern // ListFontsWithInfoUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ListFontsWithInfoUnchecked(c *xgb.Conn, MaxNames uint16, PatternLen uint16, Pattern string) ListFontsWithInfoCookie { +func ListFontsWithInfoUnchecked(c *xgb.Conn, MaxNames, PatternLen uint16, Pattern string) ListFontsWithInfoCookie { cookie := c.NewCookie(false, true) c.NewRequest(listFontsWithInfoRequest(c, MaxNames, PatternLen, Pattern), cookie) return ListFontsWithInfoCookie{cookie} @@ -11306,26 +11714,39 @@ func ListFontsWithInfoUnchecked(c *xgb.Conn, MaxNames uint16, PatternLen uint16, // ListFontsWithInfoReply represents the data returned from a ListFontsWithInfo request. type ListFontsWithInfoReply struct { - Sequence uint16 // sequence number of the request for this reply - Length uint32 // number of bytes in this reply - NameLen byte + Sequence uint16 // sequence number of the request for this reply + Length uint32 // number of bytes in this reply + // The number of matched font names. + NameLen byte + // minimum bounds over all existing char MinBounds Charinfo // padding: 4 bytes + // maximum bounds over all existing char MaxBounds Charinfo // padding: 4 bytes + // first character MinCharOrByte2 uint16 + // last character MaxCharOrByte2 uint16 - DefaultChar uint16 - PropertiesLen uint16 - DrawDirection byte - MinByte1 byte - MaxByte1 byte - AllCharsExist bool - FontAscent int16 - FontDescent int16 - RepliesHint uint32 - Properties []Fontprop // size: xgb.Pad((int(PropertiesLen) * 8)) - Name string // size: xgb.Pad((int(NameLen) * 1)) + // char to print for undefined character + DefaultChar uint16 + // how many properties there are + PropertiesLen uint16 + DrawDirection byte + MinByte1 byte + MaxByte1 byte + // flag if all characters have nonzero size + AllCharsExist bool + // baseline to top edge of raster + FontAscent int16 + // baseline to bottom edge of raster + FontDescent int16 + // An indication of how many more fonts will be returned. This is only a hint and + // may be larger or smaller than the number of fonts actually returned. A zero + // value does not guarantee that no more fonts will be returned. + RepliesHint uint32 + Properties []Fontprop // size: xgb.Pad((int(PropertiesLen) * 8)) + Name string // size: xgb.Pad((int(NameLen) * 1)) } // Reply blocks and returns the reply data for a ListFontsWithInfo request. @@ -11414,9 +11835,8 @@ func listFontsWithInfoReply(buf []byte) *ListFontsWithInfoReply { return v } -// Write request to wire for ListFontsWithInfo -// listFontsWithInfoRequest writes a ListFontsWithInfo request to a byte slice. -func listFontsWithInfoRequest(c *xgb.Conn, MaxNames uint16, PatternLen uint16, Pattern string) []byte { +// listFontsWithInfoRequest writes a ListFontsWithInfo request to a byte slice for transfer. +func listFontsWithInfoRequest(c *xgb.Conn, MaxNames, PatternLen uint16, Pattern string) []byte { size := xgb.Pad((8 + xgb.Pad((int(PatternLen) * 1)))) b := 0 buf := make([]byte, size) @@ -11447,7 +11867,7 @@ type ListHostsCookie struct { } // ListHosts sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListHostsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListHostsCookie.Reply. func ListHosts(c *xgb.Conn) ListHostsCookie { cookie := c.NewCookie(true, true) c.NewRequest(listHostsRequest(c), cookie) @@ -11509,8 +11929,7 @@ func listHostsReply(buf []byte) *ListHostsReply { return v } -// Write request to wire for ListHosts -// listHostsRequest writes a ListHosts request to a byte slice. +// listHostsRequest writes a ListHosts request to a byte slice for transfer. func listHostsRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -11532,7 +11951,7 @@ type ListInstalledColormapsCookie struct { } // ListInstalledColormaps sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListInstalledColormapsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListInstalledColormapsCookie.Reply. func ListInstalledColormaps(c *xgb.Conn, Window Window) ListInstalledColormapsCookie { cookie := c.NewCookie(true, true) c.NewRequest(listInstalledColormapsRequest(c, Window), cookie) @@ -11596,8 +12015,7 @@ func listInstalledColormapsReply(buf []byte) *ListInstalledColormapsReply { return v } -// Write request to wire for ListInstalledColormaps -// listInstalledColormapsRequest writes a ListInstalledColormaps request to a byte slice. +// listInstalledColormapsRequest writes a ListInstalledColormaps request to a byte slice for transfer. func listInstalledColormapsRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -11623,7 +12041,7 @@ type ListPropertiesCookie struct { } // ListProperties sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListPropertiesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListPropertiesCookie.Reply. func ListProperties(c *xgb.Conn, Window Window) ListPropertiesCookie { cookie := c.NewCookie(true, true) c.NewRequest(listPropertiesRequest(c, Window), cookie) @@ -11687,8 +12105,7 @@ func listPropertiesReply(buf []byte) *ListPropertiesReply { return v } -// Write request to wire for ListProperties -// listPropertiesRequest writes a ListProperties request to a byte slice. +// listPropertiesRequest writes a ListProperties request to a byte slice for transfer. func listPropertiesRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -11714,7 +12131,7 @@ type LookupColorCookie struct { } // LookupColor sends a checked request. -// If an error occurs, it will be returned with the reply by calling LookupColorCookie.Reply() +// If an error occurs, it will be returned with the reply by calling LookupColorCookie.Reply. func LookupColor(c *xgb.Conn, Cmap Colormap, NameLen uint16, Name string) LookupColorCookie { cookie := c.NewCookie(true, true) c.NewRequest(lookupColorRequest(c, Cmap, NameLen, Name), cookie) @@ -11788,8 +12205,7 @@ func lookupColorReply(buf []byte) *LookupColorReply { return v } -// Write request to wire for LookupColor -// lookupColorRequest writes a LookupColor request to a byte slice. +// lookupColorRequest writes a LookupColor request to a byte slice for transfer. func lookupColorRequest(c *xgb.Conn, Cmap Colormap, NameLen uint16, Name string) []byte { size := xgb.Pad((12 + xgb.Pad((int(NameLen) * 1)))) b := 0 @@ -11831,7 +12247,7 @@ func MapSubwindows(c *xgb.Conn, Window Window) MapSubwindowsCookie { } // MapSubwindowsChecked sends a checked request. -// If an error occurs, it can be retrieved using MapSubwindowsCookie.Check() +// If an error occurs, it can be retrieved using MapSubwindowsCookie.Check. func MapSubwindowsChecked(c *xgb.Conn, Window Window) MapSubwindowsCookie { cookie := c.NewCookie(true, false) c.NewRequest(mapSubwindowsRequest(c, Window), cookie) @@ -11844,8 +12260,7 @@ func (cook MapSubwindowsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for MapSubwindows -// mapSubwindowsRequest writes a MapSubwindows request to a byte slice. +// mapSubwindowsRequest writes a MapSubwindows request to a byte slice for transfer. func mapSubwindowsRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -11870,6 +12285,28 @@ type MapWindowCookie struct { *xgb.Cookie } +// Maps the specified window. This means making the window visible (as long as its +// parent is visible). +// +// This MapWindow request will be translated to a MapRequest request if a window +// manager is running. The window manager then decides to either map the window or +// not. Set the override-redirect window attribute to true if you want to bypass +// this mechanism. +// +// If the window manager decides to map the window (or if no window manager is +// running), a MapNotify event is generated. +// +// If the window becomes viewable and no earlier contents for it are remembered, +// the X server tiles the window with its background. If the window's background +// is undefined, the existing screen contents are not altered, and the X server +// generates zero or more Expose events. +// +// If the window type is InputOutput, an Expose event will be generated when the +// window becomes visible. The normal response to an Expose event should be to +// repaint the window. +// +// May return a Match error if the specified window does not exist. +// // MapWindow sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func MapWindow(c *xgb.Conn, Window Window) MapWindowCookie { @@ -11879,7 +12316,7 @@ func MapWindow(c *xgb.Conn, Window Window) MapWindowCookie { } // MapWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using MapWindowCookie.Check() +// If an error occurs, it can be retrieved using MapWindowCookie.Check. func MapWindowChecked(c *xgb.Conn, Window Window) MapWindowCookie { cookie := c.NewCookie(true, false) c.NewRequest(mapWindowRequest(c, Window), cookie) @@ -11892,8 +12329,7 @@ func (cook MapWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for MapWindow -// mapWindowRequest writes a MapWindow request to a byte slice. +// mapWindowRequest writes a MapWindow request to a byte slice for transfer. func mapWindowRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -11927,7 +12363,7 @@ func NoOperation(c *xgb.Conn) NoOperationCookie { } // NoOperationChecked sends a checked request. -// If an error occurs, it can be retrieved using NoOperationCookie.Check() +// If an error occurs, it can be retrieved using NoOperationCookie.Check. func NoOperationChecked(c *xgb.Conn) NoOperationCookie { cookie := c.NewCookie(true, false) c.NewRequest(noOperationRequest(c), cookie) @@ -11940,8 +12376,7 @@ func (cook NoOperationCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for NoOperation -// noOperationRequest writes a NoOperation request to a byte slice. +// noOperationRequest writes a NoOperation request to a byte slice for transfer. func noOperationRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -11962,6 +12397,13 @@ type OpenFontCookie struct { *xgb.Cookie } +// Opens any X core font matching the given Name (for example "-misc-fixed-*"). +// +// Note that X core fonts are deprecated (but still supported) in favor of +// client-side rendering using Xft. +// +// May return a Name error if no font matches the given Name. +// // OpenFont sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func OpenFont(c *xgb.Conn, Fid Font, NameLen uint16, Name string) OpenFontCookie { @@ -11971,7 +12413,7 @@ func OpenFont(c *xgb.Conn, Fid Font, NameLen uint16, Name string) OpenFontCookie } // OpenFontChecked sends a checked request. -// If an error occurs, it can be retrieved using OpenFontCookie.Check() +// If an error occurs, it can be retrieved using OpenFontCookie.Check. func OpenFontChecked(c *xgb.Conn, Fid Font, NameLen uint16, Name string) OpenFontCookie { cookie := c.NewCookie(true, false) c.NewRequest(openFontRequest(c, Fid, NameLen, Name), cookie) @@ -11984,8 +12426,7 @@ func (cook OpenFontCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for OpenFont -// openFontRequest writes a OpenFont request to a byte slice. +// openFontRequest writes a OpenFont request to a byte slice for transfer. func openFontRequest(c *xgb.Conn, Fid Font, NameLen uint16, Name string) []byte { size := xgb.Pad((12 + xgb.Pad((int(NameLen) * 1)))) b := 0 @@ -12027,7 +12468,7 @@ func PolyArc(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) PolyArcCoo } // PolyArcChecked sends a checked request. -// If an error occurs, it can be retrieved using PolyArcCookie.Check() +// If an error occurs, it can be retrieved using PolyArcCookie.Check. func PolyArcChecked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) PolyArcCookie { cookie := c.NewCookie(true, false) c.NewRequest(polyArcRequest(c, Drawable, Gc, Arcs), cookie) @@ -12040,8 +12481,7 @@ func (cook PolyArcCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PolyArc -// polyArcRequest writes a PolyArc request to a byte slice. +// polyArcRequest writes a PolyArc request to a byte slice for transfer. func polyArcRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) []byte { size := xgb.Pad((12 + xgb.Pad((len(Arcs) * 12)))) b := 0 @@ -12080,7 +12520,7 @@ func PolyFillArc(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) PolyFi } // PolyFillArcChecked sends a checked request. -// If an error occurs, it can be retrieved using PolyFillArcCookie.Check() +// If an error occurs, it can be retrieved using PolyFillArcCookie.Check. func PolyFillArcChecked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) PolyFillArcCookie { cookie := c.NewCookie(true, false) c.NewRequest(polyFillArcRequest(c, Drawable, Gc, Arcs), cookie) @@ -12093,8 +12533,7 @@ func (cook PolyFillArcCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PolyFillArc -// polyFillArcRequest writes a PolyFillArc request to a byte slice. +// polyFillArcRequest writes a PolyFillArc request to a byte slice for transfer. func polyFillArcRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) []byte { size := xgb.Pad((12 + xgb.Pad((len(Arcs) * 12)))) b := 0 @@ -12124,6 +12563,16 @@ type PolyFillRectangleCookie struct { *xgb.Cookie } +// Fills the specified rectangle(s) in the order listed in the array. For any +// given rectangle, each pixel is not drawn more than once. If rectangles +// intersect, the intersecting pixels are drawn multiple times. +// +// May return a Drawable error if the specified Drawable (Window or Pixmap) does not exist. +// +// May return a GContext error if the specified graphics context does not exist. +// +// May return Match errors. +// // PolyFillRectangle sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func PolyFillRectangle(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangles []Rectangle) PolyFillRectangleCookie { @@ -12133,7 +12582,7 @@ func PolyFillRectangle(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangles [ } // PolyFillRectangleChecked sends a checked request. -// If an error occurs, it can be retrieved using PolyFillRectangleCookie.Check() +// If an error occurs, it can be retrieved using PolyFillRectangleCookie.Check. func PolyFillRectangleChecked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangles []Rectangle) PolyFillRectangleCookie { cookie := c.NewCookie(true, false) c.NewRequest(polyFillRectangleRequest(c, Drawable, Gc, Rectangles), cookie) @@ -12146,8 +12595,7 @@ func (cook PolyFillRectangleCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PolyFillRectangle -// polyFillRectangleRequest writes a PolyFillRectangle request to a byte slice. +// polyFillRectangleRequest writes a PolyFillRectangle request to a byte slice for transfer. func polyFillRectangleRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangles []Rectangle) []byte { size := xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8)))) b := 0 @@ -12177,6 +12625,17 @@ type PolyLineCookie struct { *xgb.Cookie } +// Draws PointsLen-1 lines between each pair of points (point[i], point[i+1]) +// in the Points array. The lines are drawn in the order listed in the array. +// They join correctly at all intermediate points, and if the first and last +// points coincide, the first and last lines also join correctly. For any given +// line, a pixel is not drawn more than once. If thin (zero line-width) lines +// intersect, the intersecting pixels are drawn multiple times. If wide lines +// intersect, the intersecting pixels are drawn only once, as though the entire +// request were a single, filled shape. +// +// May return Drawable, GContext, Match, Value errors. +// // PolyLine sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func PolyLine(c *xgb.Conn, CoordinateMode byte, Drawable Drawable, Gc Gcontext, Points []Point) PolyLineCookie { @@ -12186,7 +12645,7 @@ func PolyLine(c *xgb.Conn, CoordinateMode byte, Drawable Drawable, Gc Gcontext, } // PolyLineChecked sends a checked request. -// If an error occurs, it can be retrieved using PolyLineCookie.Check() +// If an error occurs, it can be retrieved using PolyLineCookie.Check. func PolyLineChecked(c *xgb.Conn, CoordinateMode byte, Drawable Drawable, Gc Gcontext, Points []Point) PolyLineCookie { cookie := c.NewCookie(true, false) c.NewRequest(polyLineRequest(c, CoordinateMode, Drawable, Gc, Points), cookie) @@ -12199,8 +12658,7 @@ func (cook PolyLineCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PolyLine -// polyLineRequest writes a PolyLine request to a byte slice. +// polyLineRequest writes a PolyLine request to a byte slice for transfer. func polyLineRequest(c *xgb.Conn, CoordinateMode byte, Drawable Drawable, Gc Gcontext, Points []Point) []byte { size := xgb.Pad((12 + xgb.Pad((len(Points) * 4)))) b := 0 @@ -12240,7 +12698,7 @@ func PolyPoint(c *xgb.Conn, CoordinateMode byte, Drawable Drawable, Gc Gcontext, } // PolyPointChecked sends a checked request. -// If an error occurs, it can be retrieved using PolyPointCookie.Check() +// If an error occurs, it can be retrieved using PolyPointCookie.Check. func PolyPointChecked(c *xgb.Conn, CoordinateMode byte, Drawable Drawable, Gc Gcontext, Points []Point) PolyPointCookie { cookie := c.NewCookie(true, false) c.NewRequest(polyPointRequest(c, CoordinateMode, Drawable, Gc, Points), cookie) @@ -12253,8 +12711,7 @@ func (cook PolyPointCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PolyPoint -// polyPointRequest writes a PolyPoint request to a byte slice. +// polyPointRequest writes a PolyPoint request to a byte slice for transfer. func polyPointRequest(c *xgb.Conn, CoordinateMode byte, Drawable Drawable, Gc Gcontext, Points []Point) []byte { size := xgb.Pad((12 + xgb.Pad((len(Points) * 4)))) b := 0 @@ -12294,7 +12751,7 @@ func PolyRectangle(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangles []Rec } // PolyRectangleChecked sends a checked request. -// If an error occurs, it can be retrieved using PolyRectangleCookie.Check() +// If an error occurs, it can be retrieved using PolyRectangleCookie.Check. func PolyRectangleChecked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangles []Rectangle) PolyRectangleCookie { cookie := c.NewCookie(true, false) c.NewRequest(polyRectangleRequest(c, Drawable, Gc, Rectangles), cookie) @@ -12307,8 +12764,7 @@ func (cook PolyRectangleCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PolyRectangle -// polyRectangleRequest writes a PolyRectangle request to a byte slice. +// polyRectangleRequest writes a PolyRectangle request to a byte slice for transfer. func polyRectangleRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangles []Rectangle) []byte { size := xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8)))) b := 0 @@ -12338,6 +12794,18 @@ type PolySegmentCookie struct { *xgb.Cookie } +// Draws multiple, unconnected lines. For each segment, a line is drawn between +// (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of +// Segment structures and does not perform joining at coincident +// endpoints. For any given line, a pixel is not drawn more than once. If lines +// intersect, the intersecting pixels are drawn multiple times. +// +// May return a Drawable error if the specified Drawable does not exist. +// +// May return a GContext error if the specified Gc does not exist. +// +// May return Match errors. +// // PolySegment sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func PolySegment(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Segments []Segment) PolySegmentCookie { @@ -12347,7 +12815,7 @@ func PolySegment(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Segments []Segment } // PolySegmentChecked sends a checked request. -// If an error occurs, it can be retrieved using PolySegmentCookie.Check() +// If an error occurs, it can be retrieved using PolySegmentCookie.Check. func PolySegmentChecked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Segments []Segment) PolySegmentCookie { cookie := c.NewCookie(true, false) c.NewRequest(polySegmentRequest(c, Drawable, Gc, Segments), cookie) @@ -12360,8 +12828,7 @@ func (cook PolySegmentCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PolySegment -// polySegmentRequest writes a PolySegment request to a byte slice. +// polySegmentRequest writes a PolySegment request to a byte slice for transfer. func polySegmentRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Segments []Segment) []byte { size := xgb.Pad((12 + xgb.Pad((len(Segments) * 8)))) b := 0 @@ -12393,15 +12860,15 @@ type PolyText16Cookie struct { // PolyText16 sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func PolyText16(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X int16, Y int16, Items []byte) PolyText16Cookie { +func PolyText16(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X, Y int16, Items []byte) PolyText16Cookie { cookie := c.NewCookie(false, false) c.NewRequest(polyText16Request(c, Drawable, Gc, X, Y, Items), cookie) return PolyText16Cookie{cookie} } // PolyText16Checked sends a checked request. -// If an error occurs, it can be retrieved using PolyText16Cookie.Check() -func PolyText16Checked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X int16, Y int16, Items []byte) PolyText16Cookie { +// If an error occurs, it can be retrieved using PolyText16Cookie.Check. +func PolyText16Checked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X, Y int16, Items []byte) PolyText16Cookie { cookie := c.NewCookie(true, false) c.NewRequest(polyText16Request(c, Drawable, Gc, X, Y, Items), cookie) return PolyText16Cookie{cookie} @@ -12413,9 +12880,8 @@ func (cook PolyText16Cookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PolyText16 -// polyText16Request writes a PolyText16 request to a byte slice. -func polyText16Request(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X int16, Y int16, Items []byte) []byte { +// polyText16Request writes a PolyText16 request to a byte slice for transfer. +func polyText16Request(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X, Y int16, Items []byte) []byte { size := xgb.Pad((16 + xgb.Pad((len(Items) * 1)))) b := 0 buf := make([]byte, size) @@ -12453,15 +12919,15 @@ type PolyText8Cookie struct { // PolyText8 sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func PolyText8(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X int16, Y int16, Items []byte) PolyText8Cookie { +func PolyText8(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X, Y int16, Items []byte) PolyText8Cookie { cookie := c.NewCookie(false, false) c.NewRequest(polyText8Request(c, Drawable, Gc, X, Y, Items), cookie) return PolyText8Cookie{cookie} } // PolyText8Checked sends a checked request. -// If an error occurs, it can be retrieved using PolyText8Cookie.Check() -func PolyText8Checked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X int16, Y int16, Items []byte) PolyText8Cookie { +// If an error occurs, it can be retrieved using PolyText8Cookie.Check. +func PolyText8Checked(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X, Y int16, Items []byte) PolyText8Cookie { cookie := c.NewCookie(true, false) c.NewRequest(polyText8Request(c, Drawable, Gc, X, Y, Items), cookie) return PolyText8Cookie{cookie} @@ -12473,9 +12939,8 @@ func (cook PolyText8Cookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PolyText8 -// polyText8Request writes a PolyText8 request to a byte slice. -func polyText8Request(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X int16, Y int16, Items []byte) []byte { +// polyText8Request writes a PolyText8 request to a byte slice for transfer. +func polyText8Request(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X, Y int16, Items []byte) []byte { size := xgb.Pad((16 + xgb.Pad((len(Items) * 1)))) b := 0 buf := make([]byte, size) @@ -12513,15 +12978,15 @@ 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, Format byte, Drawable Drawable, Gc Gcontext, Width uint16, Height uint16, DstX int16, DstY int16, LeftPad byte, Depth byte, Data []byte) PutImageCookie { +func PutImage(c *xgb.Conn, Format byte, Drawable Drawable, Gc Gcontext, Width, Height uint16, DstX, DstY int16, LeftPad, Depth byte, Data []byte) PutImageCookie { cookie := c.NewCookie(false, false) c.NewRequest(putImageRequest(c, Format, Drawable, Gc, Width, Height, DstX, DstY, LeftPad, Depth, Data), cookie) return PutImageCookie{cookie} } // PutImageChecked sends a checked request. -// If an error occurs, it can be retrieved using PutImageCookie.Check() -func PutImageChecked(c *xgb.Conn, Format byte, Drawable Drawable, Gc Gcontext, Width uint16, Height uint16, DstX int16, DstY int16, LeftPad byte, Depth byte, Data []byte) PutImageCookie { +// If an error occurs, it can be retrieved using PutImageCookie.Check. +func PutImageChecked(c *xgb.Conn, Format byte, Drawable Drawable, Gc Gcontext, Width, Height uint16, DstX, DstY int16, LeftPad, Depth byte, Data []byte) PutImageCookie { cookie := c.NewCookie(true, false) c.NewRequest(putImageRequest(c, Format, Drawable, Gc, Width, Height, DstX, DstY, LeftPad, Depth, Data), cookie) return PutImageCookie{cookie} @@ -12533,9 +12998,8 @@ func (cook PutImageCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PutImage -// putImageRequest writes a PutImage request to a byte slice. -func putImageRequest(c *xgb.Conn, Format byte, Drawable Drawable, Gc Gcontext, Width uint16, Height uint16, DstX int16, DstY int16, LeftPad byte, Depth byte, Data []byte) []byte { +// putImageRequest writes a PutImage request to a byte slice for transfer. +func putImageRequest(c *xgb.Conn, Format byte, Drawable Drawable, Gc Gcontext, Width, Height uint16, DstX, DstY int16, LeftPad, Depth byte, Data []byte) []byte { size := xgb.Pad((24 + xgb.Pad((len(Data) * 1)))) b := 0 buf := make([]byte, size) @@ -12587,8 +13051,8 @@ 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, Class byte, Drawable Drawable, Width uint16, Height uint16) QueryBestSizeCookie { +// If an error occurs, it will be returned with the reply by calling QueryBestSizeCookie.Reply. +func QueryBestSize(c *xgb.Conn, Class byte, Drawable Drawable, Width, Height uint16) QueryBestSizeCookie { cookie := c.NewCookie(true, true) c.NewRequest(queryBestSizeRequest(c, Class, Drawable, Width, Height), cookie) return QueryBestSizeCookie{cookie} @@ -12596,7 +13060,7 @@ func QueryBestSize(c *xgb.Conn, Class byte, Drawable Drawable, Width uint16, Hei // 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, Class byte, Drawable Drawable, Width uint16, Height uint16) QueryBestSizeCookie { +func QueryBestSizeUnchecked(c *xgb.Conn, Class byte, Drawable Drawable, Width, Height uint16) QueryBestSizeCookie { cookie := c.NewCookie(false, true) c.NewRequest(queryBestSizeRequest(c, Class, Drawable, Width, Height), cookie) return QueryBestSizeCookie{cookie} @@ -12645,9 +13109,8 @@ func queryBestSizeReply(buf []byte) *QueryBestSizeReply { return v } -// Write request to wire for QueryBestSize -// queryBestSizeRequest writes a QueryBestSize request to a byte slice. -func queryBestSizeRequest(c *xgb.Conn, Class byte, Drawable Drawable, Width uint16, Height uint16) []byte { +// queryBestSizeRequest writes a QueryBestSize request to a byte slice for transfer. +func queryBestSizeRequest(c *xgb.Conn, Class byte, Drawable Drawable, Width, Height uint16) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -12679,7 +13142,7 @@ type QueryColorsCookie struct { } // QueryColors sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryColorsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryColorsCookie.Reply. func QueryColors(c *xgb.Conn, Cmap Colormap, Pixels []uint32) QueryColorsCookie { cookie := c.NewCookie(true, true) c.NewRequest(queryColorsRequest(c, Cmap, Pixels), cookie) @@ -12740,8 +13203,7 @@ func queryColorsReply(buf []byte) *QueryColorsReply { return v } -// Write request to wire for QueryColors -// queryColorsRequest writes a QueryColors request to a byte slice. +// queryColorsRequest writes a QueryColors request to a byte slice for transfer. func queryColorsRequest(c *xgb.Conn, Cmap Colormap, Pixels []uint32) []byte { size := xgb.Pad((8 + xgb.Pad((len(Pixels) * 4)))) b := 0 @@ -12771,8 +13233,18 @@ type QueryExtensionCookie struct { *xgb.Cookie } +// Determines if the specified extension is present on this X11 server. +// +// Every extension has a unique MajorOpcode to identify requests, the minor +// opcodes and request formats are extension-specific. If the extension provides +// events and errors, the FirstEvent and FirstError fields in the reply are +// set accordingly. +// +// There should rarely be a need to use this request directly, XCB provides the +// GetExtensionData function instead. +// // QueryExtension sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryExtensionCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryExtensionCookie.Reply. func QueryExtension(c *xgb.Conn, NameLen uint16, Name string) QueryExtensionCookie { cookie := c.NewCookie(true, true) c.NewRequest(queryExtensionRequest(c, NameLen, Name), cookie) @@ -12792,10 +13264,14 @@ type QueryExtensionReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes - Present bool + // Whether the extension is present on this X11 server. + Present bool + // The major opcode for requests. MajorOpcode byte - FirstEvent byte - FirstError byte + // The first event code, if any. + FirstEvent byte + // The first error code, if any. + FirstError byte } // Reply blocks and returns the reply data for a QueryExtension request. @@ -12842,8 +13318,7 @@ func queryExtensionReply(buf []byte) *QueryExtensionReply { return v } -// Write request to wire for QueryExtension -// queryExtensionRequest writes a QueryExtension request to a byte slice. +// queryExtensionRequest writes a QueryExtension request to a byte slice for transfer. func queryExtensionRequest(c *xgb.Conn, NameLen uint16, Name string) []byte { size := xgb.Pad((8 + xgb.Pad((int(NameLen) * 1)))) b := 0 @@ -12873,8 +13348,10 @@ type QueryFontCookie struct { *xgb.Cookie } +// Queries information associated with the font. +// // QueryFont sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryFontCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryFontCookie.Reply. func QueryFont(c *xgb.Conn, Font Fontable) QueryFontCookie { cookie := c.NewCookie(true, true) c.NewRequest(queryFontRequest(c, Font), cookie) @@ -12894,23 +13371,32 @@ type QueryFontReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes + // minimum bounds over all existing char MinBounds Charinfo // padding: 4 bytes + // maximum bounds over all existing char MaxBounds Charinfo // padding: 4 bytes + // first character MinCharOrByte2 uint16 + // last character MaxCharOrByte2 uint16 - DefaultChar uint16 - PropertiesLen uint16 - DrawDirection byte - MinByte1 byte - MaxByte1 byte - AllCharsExist bool - FontAscent int16 - FontDescent int16 - CharInfosLen uint32 - Properties []Fontprop // size: xgb.Pad((int(PropertiesLen) * 8)) - CharInfos []Charinfo // size: xgb.Pad((int(CharInfosLen) * 12)) + // char to print for undefined character + DefaultChar uint16 + // how many properties there are + PropertiesLen uint16 + DrawDirection byte + MinByte1 byte + MaxByte1 byte + // flag if all characters have nonzero size + AllCharsExist bool + // baseline to top edge of raster + FontAscent int16 + // baseline to bottom edge of raster + FontDescent int16 + CharInfosLen uint32 + Properties []Fontprop // size: xgb.Pad((int(PropertiesLen) * 8)) + CharInfos []Charinfo // size: xgb.Pad((int(CharInfosLen) * 12)) } // Reply blocks and returns the reply data for a QueryFont request. @@ -12994,8 +13480,7 @@ func queryFontReply(buf []byte) *QueryFontReply { return v } -// Write request to wire for QueryFont -// queryFontRequest writes a QueryFont request to a byte slice. +// queryFontRequest writes a QueryFont request to a byte slice for transfer. func queryFontRequest(c *xgb.Conn, Font Fontable) []byte { size := 8 b := 0 @@ -13021,7 +13506,7 @@ type QueryKeymapCookie struct { } // QueryKeymap sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryKeymapCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryKeymapCookie.Reply. func QueryKeymap(c *xgb.Conn) QueryKeymapCookie { cookie := c.NewCookie(true, true) c.NewRequest(queryKeymapRequest(c), cookie) @@ -13076,8 +13561,7 @@ func queryKeymapReply(buf []byte) *QueryKeymapReply { return v } -// Write request to wire for QueryKeymap -// queryKeymapRequest writes a QueryKeymap request to a byte slice. +// queryKeymapRequest writes a QueryKeymap request to a byte slice for transfer. func queryKeymapRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -13098,8 +13582,13 @@ type QueryPointerCookie struct { *xgb.Cookie } +// Gets the root window the pointer is logically on and the pointer coordinates +// relative to the root window's origin. +// +// May return a Window error if the specified Window does not exist. +// // QueryPointer sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryPointerCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryPointerCookie.Reply. func QueryPointer(c *xgb.Conn, Window Window) QueryPointerCookie { cookie := c.NewCookie(true, true) c.NewRequest(queryPointerRequest(c, Window), cookie) @@ -13116,16 +13605,33 @@ func QueryPointerUnchecked(c *xgb.Conn, Window Window) QueryPointerCookie { // QueryPointerReply represents the data returned from a QueryPointer request. type QueryPointerReply struct { - Sequence uint16 // sequence number of the request for this reply - Length uint32 // number of bytes in this reply + Sequence uint16 // sequence number of the request for this reply + Length uint32 // number of bytes in this reply + // If SameScreen is False, then the pointer is not on the same screen as the + // argument window, Child is None, and WinX and WinY are zero. If + // SameScreen is True, then WinX and WinY are the pointer coordinates + // relative to the argument window's origin, and child is the child containing the + // pointer, if any. SameScreen bool - Root Window - Child Window - RootX int16 - RootY int16 - WinX int16 - WinY int16 - Mask uint16 + // The root window the pointer is logically on. + Root Window + // The child window containing the pointer, if any, if SameScreen is true. If + // SameScreen is false, None is returned. + Child Window + // The pointer X position, relative to Root. + RootX int16 + // The pointer Y position, relative to Root. + RootY int16 + // The pointer X coordinate, relative to Child, if SameScreen is true. Zero + // otherwise. + WinX int16 + // The pointer Y coordinate, relative to Child, if SameScreen is true. Zero + // otherwise. + WinY int16 + // The current logical state of the modifier keys and the buttons. Note that the + // logical state of a device (as seen by means of the protocol) may lag the + // physical state if device event processing is frozen. + Mask uint16 // padding: 2 bytes } @@ -13185,8 +13691,7 @@ func queryPointerReply(buf []byte) *QueryPointerReply { return v } -// Write request to wire for QueryPointer -// queryPointerRequest writes a QueryPointer request to a byte slice. +// queryPointerRequest writes a QueryPointer request to a byte slice for transfer. func queryPointerRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -13211,8 +13716,34 @@ type QueryTextExtentsCookie struct { *xgb.Cookie } +// Query text extents from the X11 server. This request returns the bounding box +// of the specified 16-bit character string in the specified Font or the font +// contained in the specified graphics context. +// +// FontAscent is set to the maximum of the ascent metrics of all characters in +// the string. FontDescent is set to the maximum of the descent metrics. +// OverallWidth is set to the sum of the character-width metrics of all +// characters in the string. For each character in the string, let W be the sum of +// the character-width metrics of all characters preceding it in the string. Let L +// be the left-side-bearing metric of the character plus W. Let R be the +// right-side-bearing metric of the character plus W. The lbearing member is set +// to the minimum L of all characters in the string. The rbearing member is set to +// the maximum R. +// +// For fonts defined with linear indexing rather than 2-byte matrix indexing, each +// Char2b structure is interpreted as a 16-bit number with byte1 as the +// most significant byte. If the font has no defined default character, undefined +// characters in the string are taken to have all zero metrics. +// +// Characters with all zero metrics are ignored. If the font has no defined +// default_char, the undefined characters in the string are also ignored. +// +// May return a Font error if the specified Font does not exist. +// +// May return a GContext error if the specified graphics context does not exist. +// // QueryTextExtents sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryTextExtentsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryTextExtentsCookie.Reply. func QueryTextExtents(c *xgb.Conn, Font Fontable, String []Char2b, StringLen uint16) QueryTextExtentsCookie { cookie := c.NewCookie(true, true) c.NewRequest(queryTextExtentsRequest(c, Font, String, StringLen), cookie) @@ -13291,8 +13822,7 @@ func queryTextExtentsReply(buf []byte) *QueryTextExtentsReply { return v } -// Write request to wire for QueryTextExtents -// queryTextExtentsRequest writes a QueryTextExtents request to a byte slice. +// queryTextExtentsRequest writes a QueryTextExtents request to a byte slice for transfer. func queryTextExtentsRequest(c *xgb.Conn, Font Fontable, String []Char2b, StringLen uint16) []byte { size := xgb.Pad((8 + xgb.Pad((len(String) * 2)))) b := 0 @@ -13322,8 +13852,11 @@ type QueryTreeCookie struct { *xgb.Cookie } +// Gets the root window ID, parent window ID and list of children windows for the +// specified Window. The children are listed in bottom-to-top stacking order. +// // QueryTree sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryTreeCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryTreeCookie.Reply. func QueryTree(c *xgb.Conn, Window Window) QueryTreeCookie { cookie := c.NewCookie(true, true) c.NewRequest(queryTreeRequest(c, Window), cookie) @@ -13343,8 +13876,11 @@ type QueryTreeReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes - Root Window - Parent Window + // The root window of Window. + Root Window + // The parent window of Window. + Parent Window + // The number of child windows. ChildrenLen uint16 // padding: 14 bytes Children []Window // size: xgb.Pad((int(ChildrenLen) * 4)) @@ -13395,8 +13931,7 @@ func queryTreeReply(buf []byte) *QueryTreeReply { return v } -// Write request to wire for QueryTree -// queryTreeRequest writes a QueryTree request to a byte slice. +// queryTreeRequest writes a QueryTree request to a byte slice for transfer. func queryTreeRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -13423,15 +13958,15 @@ type RecolorCursorCookie struct { // RecolorCursor sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func RecolorCursor(c *xgb.Conn, Cursor Cursor, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16) RecolorCursorCookie { +func RecolorCursor(c *xgb.Conn, Cursor Cursor, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue uint16) RecolorCursorCookie { cookie := c.NewCookie(false, false) c.NewRequest(recolorCursorRequest(c, Cursor, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue), cookie) return RecolorCursorCookie{cookie} } // RecolorCursorChecked sends a checked request. -// If an error occurs, it can be retrieved using RecolorCursorCookie.Check() -func RecolorCursorChecked(c *xgb.Conn, Cursor Cursor, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16) RecolorCursorCookie { +// If an error occurs, it can be retrieved using RecolorCursorCookie.Check. +func RecolorCursorChecked(c *xgb.Conn, Cursor Cursor, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue uint16) RecolorCursorCookie { cookie := c.NewCookie(true, false) c.NewRequest(recolorCursorRequest(c, Cursor, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue), cookie) return RecolorCursorCookie{cookie} @@ -13443,9 +13978,8 @@ func (cook RecolorCursorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for RecolorCursor -// recolorCursorRequest writes a RecolorCursor request to a byte slice. -func recolorCursorRequest(c *xgb.Conn, Cursor Cursor, ForeRed uint16, ForeGreen uint16, ForeBlue uint16, BackRed uint16, BackGreen uint16, BackBlue uint16) []byte { +// recolorCursorRequest writes a RecolorCursor request to a byte slice for transfer. +func recolorCursorRequest(c *xgb.Conn, Cursor Cursor, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue uint16) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -13487,17 +14021,34 @@ type ReparentWindowCookie struct { *xgb.Cookie } +// Makes the specified window a child of the specified parent window. If the +// window is mapped, it will automatically be unmapped before reparenting and +// re-mapped after reparenting. The window is placed in the stacking order on top +// with respect to sibling windows. +// +// After reparenting, a ReparentNotify event is generated. +// +// May return a Match error if the new parent window is not on the same screen as the old parent window. +// +// The new parent window is the specified window or an inferior of the specified window. +// +// The new parent is InputOnly and the window is not. +// +// The specified window has a ParentRelative background and the new parent window is not the same depth as the specified window. +// +// May return a Window error if the specified window does not exist. +// // ReparentWindow sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func ReparentWindow(c *xgb.Conn, Window Window, Parent Window, X int16, Y int16) ReparentWindowCookie { +func ReparentWindow(c *xgb.Conn, Window, Parent Window, X, Y int16) ReparentWindowCookie { cookie := c.NewCookie(false, false) c.NewRequest(reparentWindowRequest(c, Window, Parent, X, Y), cookie) return ReparentWindowCookie{cookie} } // ReparentWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using ReparentWindowCookie.Check() -func ReparentWindowChecked(c *xgb.Conn, Window Window, Parent Window, X int16, Y int16) ReparentWindowCookie { +// If an error occurs, it can be retrieved using ReparentWindowCookie.Check. +func ReparentWindowChecked(c *xgb.Conn, Window, Parent Window, X, Y int16) ReparentWindowCookie { cookie := c.NewCookie(true, false) c.NewRequest(reparentWindowRequest(c, Window, Parent, X, Y), cookie) return ReparentWindowCookie{cookie} @@ -13509,9 +14060,8 @@ func (cook ReparentWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ReparentWindow -// reparentWindowRequest writes a ReparentWindow request to a byte slice. -func reparentWindowRequest(c *xgb.Conn, Window Window, Parent Window, X int16, Y int16) []byte { +// reparentWindowRequest writes a ReparentWindow request to a byte slice for transfer. +func reparentWindowRequest(c *xgb.Conn, Window, Parent Window, X, Y int16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -13553,7 +14103,7 @@ func RotateProperties(c *xgb.Conn, Window Window, AtomsLen uint16, Delta int16, } // RotatePropertiesChecked sends a checked request. -// If an error occurs, it can be retrieved using RotatePropertiesCookie.Check() +// If an error occurs, it can be retrieved using RotatePropertiesCookie.Check. func RotatePropertiesChecked(c *xgb.Conn, Window Window, AtomsLen uint16, Delta int16, Atoms []Atom) RotatePropertiesCookie { cookie := c.NewCookie(true, false) c.NewRequest(rotatePropertiesRequest(c, Window, AtomsLen, Delta, Atoms), cookie) @@ -13566,8 +14116,7 @@ func (cook RotatePropertiesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for RotateProperties -// rotatePropertiesRequest writes a RotateProperties request to a byte slice. +// rotatePropertiesRequest writes a RotateProperties request to a byte slice for transfer. func rotatePropertiesRequest(c *xgb.Conn, Window Window, AtomsLen uint16, Delta int16, Atoms []Atom) []byte { size := xgb.Pad((12 + xgb.Pad((int(AtomsLen) * 4)))) b := 0 @@ -13603,6 +14152,18 @@ type SendEventCookie struct { *xgb.Cookie } +// Identifies the Destination window, determines which clients should receive +// the specified event and ignores any active grabs. +// +// The Event must be one of the core events or an event defined by an extension, +// so that the X server can correctly byte-swap the contents as necessary. The +// contents of Event are otherwise unaltered and unchecked except for the +// SendEvent field which is forced to 'true'. +// +// May return a Value error if the given Event is neither a core event nor an event defined by an extension. +// +// May return a Window error if the specified Destination window does not exist. +// // SendEvent sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func SendEvent(c *xgb.Conn, Propagate bool, Destination Window, EventMask uint32, Event string) SendEventCookie { @@ -13612,7 +14173,7 @@ func SendEvent(c *xgb.Conn, Propagate bool, Destination Window, EventMask uint32 } // SendEventChecked sends a checked request. -// If an error occurs, it can be retrieved using SendEventCookie.Check() +// If an error occurs, it can be retrieved using SendEventCookie.Check. func SendEventChecked(c *xgb.Conn, Propagate bool, Destination Window, EventMask uint32, Event string) SendEventCookie { cookie := c.NewCookie(true, false) c.NewRequest(sendEventRequest(c, Propagate, Destination, EventMask, Event), cookie) @@ -13625,8 +14186,7 @@ func (cook SendEventCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SendEvent -// sendEventRequest writes a SendEvent request to a byte slice. +// sendEventRequest writes a SendEvent request to a byte slice for transfer. func sendEventRequest(c *xgb.Conn, Propagate bool, Destination Window, EventMask uint32, Event string) []byte { size := 44 b := 0 @@ -13671,7 +14231,7 @@ func SetAccessControl(c *xgb.Conn, Mode byte) SetAccessControlCookie { } // SetAccessControlChecked sends a checked request. -// If an error occurs, it can be retrieved using SetAccessControlCookie.Check() +// If an error occurs, it can be retrieved using SetAccessControlCookie.Check. func SetAccessControlChecked(c *xgb.Conn, Mode byte) SetAccessControlCookie { cookie := c.NewCookie(true, false) c.NewRequest(setAccessControlRequest(c, Mode), cookie) @@ -13684,8 +14244,7 @@ func (cook SetAccessControlCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetAccessControl -// setAccessControlRequest writes a SetAccessControl request to a byte slice. +// setAccessControlRequest writes a SetAccessControl request to a byte slice for transfer. func setAccessControlRequest(c *xgb.Conn, Mode byte) []byte { size := 4 b := 0 @@ -13710,15 +14269,15 @@ type SetClipRectanglesCookie struct { // SetClipRectangles sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetClipRectangles(c *xgb.Conn, Ordering byte, Gc Gcontext, ClipXOrigin int16, ClipYOrigin int16, Rectangles []Rectangle) SetClipRectanglesCookie { +func SetClipRectangles(c *xgb.Conn, Ordering byte, Gc Gcontext, ClipXOrigin, ClipYOrigin int16, Rectangles []Rectangle) SetClipRectanglesCookie { cookie := c.NewCookie(false, false) c.NewRequest(setClipRectanglesRequest(c, Ordering, Gc, ClipXOrigin, ClipYOrigin, Rectangles), cookie) return SetClipRectanglesCookie{cookie} } // SetClipRectanglesChecked sends a checked request. -// If an error occurs, it can be retrieved using SetClipRectanglesCookie.Check() -func SetClipRectanglesChecked(c *xgb.Conn, Ordering byte, Gc Gcontext, ClipXOrigin int16, ClipYOrigin int16, Rectangles []Rectangle) SetClipRectanglesCookie { +// If an error occurs, it can be retrieved using SetClipRectanglesCookie.Check. +func SetClipRectanglesChecked(c *xgb.Conn, Ordering byte, Gc Gcontext, ClipXOrigin, ClipYOrigin int16, Rectangles []Rectangle) SetClipRectanglesCookie { cookie := c.NewCookie(true, false) c.NewRequest(setClipRectanglesRequest(c, Ordering, Gc, ClipXOrigin, ClipYOrigin, Rectangles), cookie) return SetClipRectanglesCookie{cookie} @@ -13730,9 +14289,8 @@ func (cook SetClipRectanglesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetClipRectangles -// setClipRectanglesRequest writes a SetClipRectangles request to a byte slice. -func setClipRectanglesRequest(c *xgb.Conn, Ordering byte, Gc Gcontext, ClipXOrigin int16, ClipYOrigin int16, Rectangles []Rectangle) []byte { +// setClipRectanglesRequest writes a SetClipRectangles request to a byte slice for transfer. +func setClipRectanglesRequest(c *xgb.Conn, Ordering byte, Gc Gcontext, ClipXOrigin, ClipYOrigin int16, Rectangles []Rectangle) []byte { size := xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8)))) b := 0 buf := make([]byte, size) @@ -13774,7 +14332,7 @@ func SetCloseDownMode(c *xgb.Conn, Mode byte) SetCloseDownModeCookie { } // SetCloseDownModeChecked sends a checked request. -// If an error occurs, it can be retrieved using SetCloseDownModeCookie.Check() +// If an error occurs, it can be retrieved using SetCloseDownModeCookie.Check. func SetCloseDownModeChecked(c *xgb.Conn, Mode byte) SetCloseDownModeCookie { cookie := c.NewCookie(true, false) c.NewRequest(setCloseDownModeRequest(c, Mode), cookie) @@ -13787,8 +14345,7 @@ func (cook SetCloseDownModeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetCloseDownMode -// setCloseDownModeRequest writes a SetCloseDownMode request to a byte slice. +// setCloseDownModeRequest writes a SetCloseDownMode request to a byte slice for transfer. func setCloseDownModeRequest(c *xgb.Conn, Mode byte) []byte { size := 4 b := 0 @@ -13813,15 +14370,15 @@ type SetDashesCookie struct { // SetDashes sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetDashes(c *xgb.Conn, Gc Gcontext, DashOffset uint16, DashesLen uint16, Dashes []byte) SetDashesCookie { +func SetDashes(c *xgb.Conn, Gc Gcontext, DashOffset, DashesLen uint16, Dashes []byte) SetDashesCookie { cookie := c.NewCookie(false, false) c.NewRequest(setDashesRequest(c, Gc, DashOffset, DashesLen, Dashes), cookie) return SetDashesCookie{cookie} } // SetDashesChecked sends a checked request. -// If an error occurs, it can be retrieved using SetDashesCookie.Check() -func SetDashesChecked(c *xgb.Conn, Gc Gcontext, DashOffset uint16, DashesLen uint16, Dashes []byte) SetDashesCookie { +// If an error occurs, it can be retrieved using SetDashesCookie.Check. +func SetDashesChecked(c *xgb.Conn, Gc Gcontext, DashOffset, DashesLen uint16, Dashes []byte) SetDashesCookie { cookie := c.NewCookie(true, false) c.NewRequest(setDashesRequest(c, Gc, DashOffset, DashesLen, Dashes), cookie) return SetDashesCookie{cookie} @@ -13833,9 +14390,8 @@ func (cook SetDashesCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetDashes -// setDashesRequest writes a SetDashes request to a byte slice. -func setDashesRequest(c *xgb.Conn, Gc Gcontext, DashOffset uint16, DashesLen uint16, Dashes []byte) []byte { +// setDashesRequest writes a SetDashes request to a byte slice for transfer. +func setDashesRequest(c *xgb.Conn, Gc Gcontext, DashOffset, DashesLen uint16, Dashes []byte) []byte { size := xgb.Pad((12 + xgb.Pad((int(DashesLen) * 1)))) b := 0 buf := make([]byte, size) @@ -13877,7 +14433,7 @@ func SetFontPath(c *xgb.Conn, FontQty uint16, Font []Str) SetFontPathCookie { } // SetFontPathChecked sends a checked request. -// If an error occurs, it can be retrieved using SetFontPathCookie.Check() +// If an error occurs, it can be retrieved using SetFontPathCookie.Check. func SetFontPathChecked(c *xgb.Conn, FontQty uint16, Font []Str) SetFontPathCookie { cookie := c.NewCookie(true, false) c.NewRequest(setFontPathRequest(c, FontQty, Font), cookie) @@ -13890,8 +14446,7 @@ func (cook SetFontPathCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetFontPath -// setFontPathRequest writes a SetFontPath request to a byte slice. +// setFontPathRequest writes a SetFontPath request to a byte slice for transfer. func setFontPathRequest(c *xgb.Conn, FontQty uint16, Font []Str) []byte { size := xgb.Pad((8 + StrListSize(Font))) b := 0 @@ -13920,6 +14475,18 @@ type SetInputFocusCookie struct { *xgb.Cookie } +// Changes the input focus and the last-focus-change time. If the specified Time +// is earlier than the current last-focus-change time, the request is ignored (to +// avoid race conditions when running X over the network). +// +// A FocusIn and FocusOut event is generated when focus is changed. +// +// May return a Match error if the specified Focus window is not viewable. +// +// May return a Window error if the specified Focus window does not exist. +// +// May return Value errors. +// // SetInputFocus sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func SetInputFocus(c *xgb.Conn, RevertTo byte, Focus Window, Time Timestamp) SetInputFocusCookie { @@ -13929,7 +14496,7 @@ func SetInputFocus(c *xgb.Conn, RevertTo byte, Focus Window, Time Timestamp) Set } // SetInputFocusChecked sends a checked request. -// If an error occurs, it can be retrieved using SetInputFocusCookie.Check() +// If an error occurs, it can be retrieved using SetInputFocusCookie.Check. func SetInputFocusChecked(c *xgb.Conn, RevertTo byte, Focus Window, Time Timestamp) SetInputFocusCookie { cookie := c.NewCookie(true, false) c.NewRequest(setInputFocusRequest(c, RevertTo, Focus, Time), cookie) @@ -13942,8 +14509,7 @@ func (cook SetInputFocusCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetInputFocus -// setInputFocusRequest writes a SetInputFocus request to a byte slice. +// setInputFocusRequest writes a SetInputFocus request to a byte slice for transfer. func setInputFocusRequest(c *xgb.Conn, RevertTo byte, Focus Window, Time Timestamp) []byte { size := 12 b := 0 @@ -13973,7 +14539,7 @@ type SetModifierMappingCookie struct { } // SetModifierMapping sends a checked request. -// If an error occurs, it will be returned with the reply by calling SetModifierMappingCookie.Reply() +// If an error occurs, it will be returned with the reply by calling SetModifierMappingCookie.Reply. func SetModifierMapping(c *xgb.Conn, KeycodesPerModifier byte, Keycodes []Keycode) SetModifierMappingCookie { cookie := c.NewCookie(true, true) c.NewRequest(setModifierMappingRequest(c, KeycodesPerModifier, Keycodes), cookie) @@ -14024,8 +14590,7 @@ func setModifierMappingReply(buf []byte) *SetModifierMappingReply { return v } -// Write request to wire for SetModifierMapping -// setModifierMappingRequest writes a SetModifierMapping request to a byte slice. +// setModifierMappingRequest writes a SetModifierMapping request to a byte slice for transfer. func setModifierMappingRequest(c *xgb.Conn, KeycodesPerModifier byte, Keycodes []Keycode) []byte { size := xgb.Pad((4 + xgb.Pad(((int(KeycodesPerModifier) * 8) * 1)))) b := 0 @@ -14054,7 +14619,7 @@ type SetPointerMappingCookie struct { } // SetPointerMapping sends a checked request. -// If an error occurs, it will be returned with the reply by calling SetPointerMappingCookie.Reply() +// If an error occurs, it will be returned with the reply by calling SetPointerMappingCookie.Reply. func SetPointerMapping(c *xgb.Conn, MapLen byte, Map []byte) SetPointerMappingCookie { cookie := c.NewCookie(true, true) c.NewRequest(setPointerMappingRequest(c, MapLen, Map), cookie) @@ -14105,8 +14670,7 @@ func setPointerMappingReply(buf []byte) *SetPointerMappingReply { return v } -// Write request to wire for SetPointerMapping -// setPointerMappingRequest writes a SetPointerMapping request to a byte slice. +// setPointerMappingRequest writes a SetPointerMapping request to a byte slice for transfer. func setPointerMappingRequest(c *xgb.Conn, MapLen byte, Map []byte) []byte { size := xgb.Pad((4 + xgb.Pad((int(MapLen) * 1)))) b := 0 @@ -14134,15 +14698,15 @@ type SetScreenSaverCookie struct { // SetScreenSaver sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetScreenSaver(c *xgb.Conn, Timeout int16, Interval int16, PreferBlanking byte, AllowExposures byte) SetScreenSaverCookie { +func SetScreenSaver(c *xgb.Conn, Timeout, Interval int16, PreferBlanking, AllowExposures byte) SetScreenSaverCookie { cookie := c.NewCookie(false, false) c.NewRequest(setScreenSaverRequest(c, Timeout, Interval, PreferBlanking, AllowExposures), cookie) return SetScreenSaverCookie{cookie} } // SetScreenSaverChecked sends a checked request. -// If an error occurs, it can be retrieved using SetScreenSaverCookie.Check() -func SetScreenSaverChecked(c *xgb.Conn, Timeout int16, Interval int16, PreferBlanking byte, AllowExposures byte) SetScreenSaverCookie { +// If an error occurs, it can be retrieved using SetScreenSaverCookie.Check. +func SetScreenSaverChecked(c *xgb.Conn, Timeout, Interval int16, PreferBlanking, AllowExposures byte) SetScreenSaverCookie { cookie := c.NewCookie(true, false) c.NewRequest(setScreenSaverRequest(c, Timeout, Interval, PreferBlanking, AllowExposures), cookie) return SetScreenSaverCookie{cookie} @@ -14154,9 +14718,8 @@ func (cook SetScreenSaverCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetScreenSaver -// setScreenSaverRequest writes a SetScreenSaver request to a byte slice. -func setScreenSaverRequest(c *xgb.Conn, Timeout int16, Interval int16, PreferBlanking byte, AllowExposures byte) []byte { +// setScreenSaverRequest writes a SetScreenSaver request to a byte slice for transfer. +func setScreenSaverRequest(c *xgb.Conn, Timeout, Interval int16, PreferBlanking, AllowExposures byte) []byte { size := 12 b := 0 buf := make([]byte, size) @@ -14189,6 +14752,11 @@ type SetSelectionOwnerCookie struct { *xgb.Cookie } +// Makes Window the owner of the selection Selection and updates the +// last-change time of the specified selection. +// +// May return a Atom error if selection does not refer to a valid atom. +// // SetSelectionOwner sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func SetSelectionOwner(c *xgb.Conn, Owner Window, Selection Atom, Time Timestamp) SetSelectionOwnerCookie { @@ -14198,7 +14766,7 @@ func SetSelectionOwner(c *xgb.Conn, Owner Window, Selection Atom, Time Timestamp } // SetSelectionOwnerChecked sends a checked request. -// If an error occurs, it can be retrieved using SetSelectionOwnerCookie.Check() +// If an error occurs, it can be retrieved using SetSelectionOwnerCookie.Check. func SetSelectionOwnerChecked(c *xgb.Conn, Owner Window, Selection Atom, Time Timestamp) SetSelectionOwnerCookie { cookie := c.NewCookie(true, false) c.NewRequest(setSelectionOwnerRequest(c, Owner, Selection, Time), cookie) @@ -14211,8 +14779,7 @@ func (cook SetSelectionOwnerCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetSelectionOwner -// setSelectionOwnerRequest writes a SetSelectionOwner request to a byte slice. +// setSelectionOwnerRequest writes a SetSelectionOwner request to a byte slice for transfer. func setSelectionOwnerRequest(c *xgb.Conn, Owner Window, Selection Atom, Time Timestamp) []byte { size := 16 b := 0 @@ -14252,7 +14819,7 @@ func StoreColors(c *xgb.Conn, Cmap Colormap, Items []Coloritem) StoreColorsCooki } // StoreColorsChecked sends a checked request. -// If an error occurs, it can be retrieved using StoreColorsCookie.Check() +// If an error occurs, it can be retrieved using StoreColorsCookie.Check. func StoreColorsChecked(c *xgb.Conn, Cmap Colormap, Items []Coloritem) StoreColorsCookie { cookie := c.NewCookie(true, false) c.NewRequest(storeColorsRequest(c, Cmap, Items), cookie) @@ -14265,8 +14832,7 @@ func (cook StoreColorsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for StoreColors -// storeColorsRequest writes a StoreColors request to a byte slice. +// storeColorsRequest writes a StoreColors request to a byte slice for transfer. func storeColorsRequest(c *xgb.Conn, Cmap Colormap, Items []Coloritem) []byte { size := xgb.Pad((8 + xgb.Pad((len(Items) * 12)))) b := 0 @@ -14302,7 +14868,7 @@ func StoreNamedColor(c *xgb.Conn, Flags byte, Cmap Colormap, Pixel uint32, NameL } // StoreNamedColorChecked sends a checked request. -// If an error occurs, it can be retrieved using StoreNamedColorCookie.Check() +// If an error occurs, it can be retrieved using StoreNamedColorCookie.Check. func StoreNamedColorChecked(c *xgb.Conn, Flags byte, Cmap Colormap, Pixel uint32, NameLen uint16, Name string) StoreNamedColorCookie { cookie := c.NewCookie(true, false) c.NewRequest(storeNamedColorRequest(c, Flags, Cmap, Pixel, NameLen, Name), cookie) @@ -14315,8 +14881,7 @@ func (cook StoreNamedColorCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for StoreNamedColor -// storeNamedColorRequest writes a StoreNamedColor request to a byte slice. +// storeNamedColorRequest writes a StoreNamedColor request to a byte slice for transfer. func storeNamedColorRequest(c *xgb.Conn, Flags byte, Cmap Colormap, Pixel uint32, NameLen uint16, Name string) []byte { size := xgb.Pad((16 + xgb.Pad((int(NameLen) * 1)))) b := 0 @@ -14354,8 +14919,8 @@ type TranslateCoordinatesCookie struct { } // TranslateCoordinates sends a checked request. -// If an error occurs, it will be returned with the reply by calling TranslateCoordinatesCookie.Reply() -func TranslateCoordinates(c *xgb.Conn, SrcWindow Window, DstWindow Window, SrcX int16, SrcY int16) TranslateCoordinatesCookie { +// If an error occurs, it will be returned with the reply by calling TranslateCoordinatesCookie.Reply. +func TranslateCoordinates(c *xgb.Conn, SrcWindow, DstWindow Window, SrcX, SrcY int16) TranslateCoordinatesCookie { cookie := c.NewCookie(true, true) c.NewRequest(translateCoordinatesRequest(c, SrcWindow, DstWindow, SrcX, SrcY), cookie) return TranslateCoordinatesCookie{cookie} @@ -14363,7 +14928,7 @@ func TranslateCoordinates(c *xgb.Conn, SrcWindow Window, DstWindow Window, SrcX // TranslateCoordinatesUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func TranslateCoordinatesUnchecked(c *xgb.Conn, SrcWindow Window, DstWindow Window, SrcX int16, SrcY int16) TranslateCoordinatesCookie { +func TranslateCoordinatesUnchecked(c *xgb.Conn, SrcWindow, DstWindow Window, SrcX, SrcY int16) TranslateCoordinatesCookie { cookie := c.NewCookie(false, true) c.NewRequest(translateCoordinatesRequest(c, SrcWindow, DstWindow, SrcX, SrcY), cookie) return TranslateCoordinatesCookie{cookie} @@ -14421,9 +14986,8 @@ func translateCoordinatesReply(buf []byte) *TranslateCoordinatesReply { return v } -// Write request to wire for TranslateCoordinates -// translateCoordinatesRequest writes a TranslateCoordinates request to a byte slice. -func translateCoordinatesRequest(c *xgb.Conn, SrcWindow Window, DstWindow Window, SrcX int16, SrcY int16) []byte { +// translateCoordinatesRequest writes a TranslateCoordinates request to a byte slice for transfer. +func translateCoordinatesRequest(c *xgb.Conn, SrcWindow, DstWindow Window, SrcX, SrcY int16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -14465,7 +15029,7 @@ func UngrabButton(c *xgb.Conn, Button byte, GrabWindow Window, Modifiers uint16) } // UngrabButtonChecked sends a checked request. -// If an error occurs, it can be retrieved using UngrabButtonCookie.Check() +// If an error occurs, it can be retrieved using UngrabButtonCookie.Check. func UngrabButtonChecked(c *xgb.Conn, Button byte, GrabWindow Window, Modifiers uint16) UngrabButtonCookie { cookie := c.NewCookie(true, false) c.NewRequest(ungrabButtonRequest(c, Button, GrabWindow, Modifiers), cookie) @@ -14478,8 +15042,7 @@ func (cook UngrabButtonCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UngrabButton -// ungrabButtonRequest writes a UngrabButton request to a byte slice. +// ungrabButtonRequest writes a UngrabButton request to a byte slice for transfer. func ungrabButtonRequest(c *xgb.Conn, Button byte, GrabWindow Window, Modifiers uint16) []byte { size := 12 b := 0 @@ -14510,6 +15073,13 @@ type UngrabKeyCookie struct { *xgb.Cookie } +// Releases the key combination on GrabWindow if you grabbed it using +// GrabKey before. +// +// May return a Window error if the specified GrabWindow does not exist. +// +// May return Value errors. +// // UngrabKey sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func UngrabKey(c *xgb.Conn, Key Keycode, GrabWindow Window, Modifiers uint16) UngrabKeyCookie { @@ -14519,7 +15089,7 @@ func UngrabKey(c *xgb.Conn, Key Keycode, GrabWindow Window, Modifiers uint16) Un } // UngrabKeyChecked sends a checked request. -// If an error occurs, it can be retrieved using UngrabKeyCookie.Check() +// If an error occurs, it can be retrieved using UngrabKeyCookie.Check. func UngrabKeyChecked(c *xgb.Conn, Key Keycode, GrabWindow Window, Modifiers uint16) UngrabKeyCookie { cookie := c.NewCookie(true, false) c.NewRequest(ungrabKeyRequest(c, Key, GrabWindow, Modifiers), cookie) @@ -14532,8 +15102,7 @@ func (cook UngrabKeyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UngrabKey -// ungrabKeyRequest writes a UngrabKey request to a byte slice. +// ungrabKeyRequest writes a UngrabKey request to a byte slice for transfer. func ungrabKeyRequest(c *xgb.Conn, Key Keycode, GrabWindow Window, Modifiers uint16) []byte { size := 12 b := 0 @@ -14573,7 +15142,7 @@ func UngrabKeyboard(c *xgb.Conn, Time Timestamp) UngrabKeyboardCookie { } // UngrabKeyboardChecked sends a checked request. -// If an error occurs, it can be retrieved using UngrabKeyboardCookie.Check() +// If an error occurs, it can be retrieved using UngrabKeyboardCookie.Check. func UngrabKeyboardChecked(c *xgb.Conn, Time Timestamp) UngrabKeyboardCookie { cookie := c.NewCookie(true, false) c.NewRequest(ungrabKeyboardRequest(c, Time), cookie) @@ -14586,8 +15155,7 @@ func (cook UngrabKeyboardCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UngrabKeyboard -// ungrabKeyboardRequest writes a UngrabKeyboard request to a byte slice. +// ungrabKeyboardRequest writes a UngrabKeyboard request to a byte slice for transfer. func ungrabKeyboardRequest(c *xgb.Conn, Time Timestamp) []byte { size := 8 b := 0 @@ -14612,6 +15180,12 @@ type UngrabPointerCookie struct { *xgb.Cookie } +// Releases the pointer and any queued events if you actively grabbed the pointer +// before using GrabPointer, GrabButton or within a normal button +// press. +// +// EnterNotify and LeaveNotify events are generated. +// // UngrabPointer sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func UngrabPointer(c *xgb.Conn, Time Timestamp) UngrabPointerCookie { @@ -14621,7 +15195,7 @@ func UngrabPointer(c *xgb.Conn, Time Timestamp) UngrabPointerCookie { } // UngrabPointerChecked sends a checked request. -// If an error occurs, it can be retrieved using UngrabPointerCookie.Check() +// If an error occurs, it can be retrieved using UngrabPointerCookie.Check. func UngrabPointerChecked(c *xgb.Conn, Time Timestamp) UngrabPointerCookie { cookie := c.NewCookie(true, false) c.NewRequest(ungrabPointerRequest(c, Time), cookie) @@ -14634,8 +15208,7 @@ func (cook UngrabPointerCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UngrabPointer -// ungrabPointerRequest writes a UngrabPointer request to a byte slice. +// ungrabPointerRequest writes a UngrabPointer request to a byte slice for transfer. func ungrabPointerRequest(c *xgb.Conn, Time Timestamp) []byte { size := 8 b := 0 @@ -14669,7 +15242,7 @@ func UngrabServer(c *xgb.Conn) UngrabServerCookie { } // UngrabServerChecked sends a checked request. -// If an error occurs, it can be retrieved using UngrabServerCookie.Check() +// If an error occurs, it can be retrieved using UngrabServerCookie.Check. func UngrabServerChecked(c *xgb.Conn) UngrabServerCookie { cookie := c.NewCookie(true, false) c.NewRequest(ungrabServerRequest(c), cookie) @@ -14682,8 +15255,7 @@ func (cook UngrabServerCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UngrabServer -// ungrabServerRequest writes a UngrabServer request to a byte slice. +// ungrabServerRequest writes a UngrabServer request to a byte slice for transfer. func ungrabServerRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -14713,7 +15285,7 @@ func UninstallColormap(c *xgb.Conn, Cmap Colormap) UninstallColormapCookie { } // UninstallColormapChecked sends a checked request. -// If an error occurs, it can be retrieved using UninstallColormapCookie.Check() +// If an error occurs, it can be retrieved using UninstallColormapCookie.Check. func UninstallColormapChecked(c *xgb.Conn, Cmap Colormap) UninstallColormapCookie { cookie := c.NewCookie(true, false) c.NewRequest(uninstallColormapRequest(c, Cmap), cookie) @@ -14726,8 +15298,7 @@ func (cook UninstallColormapCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UninstallColormap -// uninstallColormapRequest writes a UninstallColormap request to a byte slice. +// uninstallColormapRequest writes a UninstallColormap request to a byte slice for transfer. func uninstallColormapRequest(c *xgb.Conn, Cmap Colormap) []byte { size := 8 b := 0 @@ -14761,7 +15332,7 @@ func UnmapSubwindows(c *xgb.Conn, Window Window) UnmapSubwindowsCookie { } // UnmapSubwindowsChecked sends a checked request. -// If an error occurs, it can be retrieved using UnmapSubwindowsCookie.Check() +// If an error occurs, it can be retrieved using UnmapSubwindowsCookie.Check. func UnmapSubwindowsChecked(c *xgb.Conn, Window Window) UnmapSubwindowsCookie { cookie := c.NewCookie(true, false) c.NewRequest(unmapSubwindowsRequest(c, Window), cookie) @@ -14774,8 +15345,7 @@ func (cook UnmapSubwindowsCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UnmapSubwindows -// unmapSubwindowsRequest writes a UnmapSubwindows request to a byte slice. +// unmapSubwindowsRequest writes a UnmapSubwindows request to a byte slice for transfer. func unmapSubwindowsRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -14800,6 +15370,14 @@ type UnmapWindowCookie struct { *xgb.Cookie } +// Unmaps the specified window. This means making the window invisible (and all +// its child windows). +// +// Unmapping a window leads to the UnmapNotify event being generated. Also, +// Expose events are generated for formerly obscured windows. +// +// May return a Window error if the specified window does not exist. +// // UnmapWindow sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. func UnmapWindow(c *xgb.Conn, Window Window) UnmapWindowCookie { @@ -14809,7 +15387,7 @@ func UnmapWindow(c *xgb.Conn, Window Window) UnmapWindowCookie { } // UnmapWindowChecked sends a checked request. -// If an error occurs, it can be retrieved using UnmapWindowCookie.Check() +// If an error occurs, it can be retrieved using UnmapWindowCookie.Check. func UnmapWindowChecked(c *xgb.Conn, Window Window) UnmapWindowCookie { cookie := c.NewCookie(true, false) c.NewRequest(unmapWindowRequest(c, Window), cookie) @@ -14822,8 +15400,7 @@ func (cook UnmapWindowCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UnmapWindow -// unmapWindowRequest writes a UnmapWindow request to a byte slice. +// unmapWindowRequest writes a UnmapWindow request to a byte slice for transfer. func unmapWindowRequest(c *xgb.Conn, Window Window) []byte { size := 8 b := 0 @@ -14848,17 +15425,31 @@ type WarpPointerCookie struct { *xgb.Cookie } +// Moves the mouse pointer to the specified position. +// +// If SrcWindow is not None, the move will only take place if the +// pointer is inside SrcWindow and within the rectangle specified by (SrcX, +// SrcY, SrcWidth, SrcHeight). The rectangle coordinates are relative to +// SrcWindow. +// +// If DstWindow is not None, the pointer will be moved to the +// offsets (DstX, DstY) relative to DstWindow. If DstWindow is +// None, the pointer will be moved by the offsets (DstX, DstY) +// relative to the current position of the pointer. +// +// May return Window errors. +// // WarpPointer sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func WarpPointer(c *xgb.Conn, SrcWindow Window, DstWindow Window, SrcX int16, SrcY int16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16) WarpPointerCookie { +func WarpPointer(c *xgb.Conn, SrcWindow, DstWindow Window, SrcX, SrcY int16, SrcWidth, SrcHeight uint16, DstX, DstY int16) WarpPointerCookie { cookie := c.NewCookie(false, false) c.NewRequest(warpPointerRequest(c, SrcWindow, DstWindow, SrcX, SrcY, SrcWidth, SrcHeight, DstX, DstY), cookie) return WarpPointerCookie{cookie} } // WarpPointerChecked sends a checked request. -// If an error occurs, it can be retrieved using WarpPointerCookie.Check() -func WarpPointerChecked(c *xgb.Conn, SrcWindow Window, DstWindow Window, SrcX int16, SrcY int16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16) WarpPointerCookie { +// If an error occurs, it can be retrieved using WarpPointerCookie.Check. +func WarpPointerChecked(c *xgb.Conn, SrcWindow, DstWindow Window, SrcX, SrcY int16, SrcWidth, SrcHeight uint16, DstX, DstY int16) WarpPointerCookie { cookie := c.NewCookie(true, false) c.NewRequest(warpPointerRequest(c, SrcWindow, DstWindow, SrcX, SrcY, SrcWidth, SrcHeight, DstX, DstY), cookie) return WarpPointerCookie{cookie} @@ -14870,9 +15461,8 @@ func (cook WarpPointerCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for WarpPointer -// warpPointerRequest writes a WarpPointer request to a byte slice. -func warpPointerRequest(c *xgb.Conn, SrcWindow Window, DstWindow Window, SrcX int16, SrcY int16, SrcWidth uint16, SrcHeight uint16, DstX int16, DstY int16) []byte { +// warpPointerRequest writes a WarpPointer request to a byte slice for transfer. +func warpPointerRequest(c *xgb.Conn, SrcWindow, DstWindow Window, SrcX, SrcY int16, SrcWidth, SrcHeight uint16, DstX, DstY int16) []byte { size := 24 b := 0 buf := make([]byte, size) diff --git a/nexgb/xselinux/xselinux.go b/nexgb/xselinux/xselinux.go index 5f53e2e..0a92bdd 100644 --- a/nexgb/xselinux/xselinux.go +++ b/nexgb/xselinux/xselinux.go @@ -173,7 +173,7 @@ type GetClientContextCookie struct { } // GetClientContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetClientContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetClientContextCookie.Reply. func GetClientContext(c *xgb.Conn, Resource uint32) GetClientContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -248,8 +248,7 @@ func getClientContextReply(buf []byte) *GetClientContextReply { return v } -// Write request to wire for GetClientContext -// getClientContextRequest writes a GetClientContext request to a byte slice. +// getClientContextRequest writes a GetClientContext request to a byte slice for transfer. func getClientContextRequest(c *xgb.Conn, Resource uint32) []byte { size := 8 b := 0 @@ -278,7 +277,7 @@ type GetDeviceContextCookie struct { } // GetDeviceContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetDeviceContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetDeviceContextCookie.Reply. func GetDeviceContext(c *xgb.Conn, Device uint32) GetDeviceContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -353,8 +352,7 @@ func getDeviceContextReply(buf []byte) *GetDeviceContextReply { return v } -// Write request to wire for GetDeviceContext -// getDeviceContextRequest writes a GetDeviceContext request to a byte slice. +// getDeviceContextRequest writes a GetDeviceContext request to a byte slice for transfer. func getDeviceContextRequest(c *xgb.Conn, Device uint32) []byte { size := 8 b := 0 @@ -383,7 +381,7 @@ type GetDeviceCreateContextCookie struct { } // GetDeviceCreateContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetDeviceCreateContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetDeviceCreateContextCookie.Reply. func GetDeviceCreateContext(c *xgb.Conn) GetDeviceCreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -458,8 +456,7 @@ func getDeviceCreateContextReply(buf []byte) *GetDeviceCreateContextReply { return v } -// Write request to wire for GetDeviceCreateContext -// getDeviceCreateContextRequest writes a GetDeviceCreateContext request to a byte slice. +// getDeviceCreateContextRequest writes a GetDeviceCreateContext request to a byte slice for transfer. func getDeviceCreateContextRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -485,7 +482,7 @@ type GetPropertyContextCookie struct { } // GetPropertyContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPropertyContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPropertyContextCookie.Reply. func GetPropertyContext(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -560,8 +557,7 @@ func getPropertyContextReply(buf []byte) *GetPropertyContextReply { return v } -// Write request to wire for GetPropertyContext -// getPropertyContextRequest writes a GetPropertyContext request to a byte slice. +// getPropertyContextRequest writes a GetPropertyContext request to a byte slice for transfer. func getPropertyContextRequest(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) []byte { size := 12 b := 0 @@ -593,7 +589,7 @@ type GetPropertyCreateContextCookie struct { } // GetPropertyCreateContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPropertyCreateContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPropertyCreateContextCookie.Reply. func GetPropertyCreateContext(c *xgb.Conn) GetPropertyCreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -668,8 +664,7 @@ func getPropertyCreateContextReply(buf []byte) *GetPropertyCreateContextReply { return v } -// Write request to wire for GetPropertyCreateContext -// getPropertyCreateContextRequest writes a GetPropertyCreateContext request to a byte slice. +// getPropertyCreateContextRequest writes a GetPropertyCreateContext request to a byte slice for transfer. func getPropertyCreateContextRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -695,7 +690,7 @@ type GetPropertyDataContextCookie struct { } // GetPropertyDataContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPropertyDataContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPropertyDataContextCookie.Reply. func GetPropertyDataContext(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyDataContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -770,8 +765,7 @@ func getPropertyDataContextReply(buf []byte) *GetPropertyDataContextReply { return v } -// Write request to wire for GetPropertyDataContext -// getPropertyDataContextRequest writes a GetPropertyDataContext request to a byte slice. +// getPropertyDataContextRequest writes a GetPropertyDataContext request to a byte slice for transfer. func getPropertyDataContextRequest(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) []byte { size := 12 b := 0 @@ -803,7 +797,7 @@ type GetPropertyUseContextCookie struct { } // GetPropertyUseContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPropertyUseContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetPropertyUseContextCookie.Reply. func GetPropertyUseContext(c *xgb.Conn) GetPropertyUseContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -878,8 +872,7 @@ func getPropertyUseContextReply(buf []byte) *GetPropertyUseContextReply { return v } -// Write request to wire for GetPropertyUseContext -// getPropertyUseContextRequest writes a GetPropertyUseContext request to a byte slice. +// getPropertyUseContextRequest writes a GetPropertyUseContext request to a byte slice for transfer. func getPropertyUseContextRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -905,7 +898,7 @@ type GetSelectionContextCookie struct { } // GetSelectionContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetSelectionContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetSelectionContextCookie.Reply. func GetSelectionContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -980,8 +973,7 @@ func getSelectionContextReply(buf []byte) *GetSelectionContextReply { return v } -// Write request to wire for GetSelectionContext -// getSelectionContextRequest writes a GetSelectionContext request to a byte slice. +// getSelectionContextRequest writes a GetSelectionContext request to a byte slice for transfer. func getSelectionContextRequest(c *xgb.Conn, Selection xproto.Atom) []byte { size := 8 b := 0 @@ -1010,7 +1002,7 @@ type GetSelectionCreateContextCookie struct { } // GetSelectionCreateContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetSelectionCreateContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetSelectionCreateContextCookie.Reply. func GetSelectionCreateContext(c *xgb.Conn) GetSelectionCreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1085,8 +1077,7 @@ func getSelectionCreateContextReply(buf []byte) *GetSelectionCreateContextReply return v } -// Write request to wire for GetSelectionCreateContext -// getSelectionCreateContextRequest writes a GetSelectionCreateContext request to a byte slice. +// getSelectionCreateContextRequest writes a GetSelectionCreateContext request to a byte slice for transfer. func getSelectionCreateContextRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -1112,7 +1103,7 @@ type GetSelectionDataContextCookie struct { } // GetSelectionDataContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetSelectionDataContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetSelectionDataContextCookie.Reply. func GetSelectionDataContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionDataContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1187,8 +1178,7 @@ func getSelectionDataContextReply(buf []byte) *GetSelectionDataContextReply { return v } -// Write request to wire for GetSelectionDataContext -// getSelectionDataContextRequest writes a GetSelectionDataContext request to a byte slice. +// getSelectionDataContextRequest writes a GetSelectionDataContext request to a byte slice for transfer. func getSelectionDataContextRequest(c *xgb.Conn, Selection xproto.Atom) []byte { size := 8 b := 0 @@ -1217,7 +1207,7 @@ type GetSelectionUseContextCookie struct { } // GetSelectionUseContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetSelectionUseContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetSelectionUseContextCookie.Reply. func GetSelectionUseContext(c *xgb.Conn) GetSelectionUseContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1292,8 +1282,7 @@ func getSelectionUseContextReply(buf []byte) *GetSelectionUseContextReply { return v } -// Write request to wire for GetSelectionUseContext -// getSelectionUseContextRequest writes a GetSelectionUseContext request to a byte slice. +// getSelectionUseContextRequest writes a GetSelectionUseContext request to a byte slice for transfer. func getSelectionUseContextRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -1319,7 +1308,7 @@ type GetWindowContextCookie struct { } // GetWindowContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetWindowContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetWindowContextCookie.Reply. func GetWindowContext(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1394,8 +1383,7 @@ func getWindowContextReply(buf []byte) *GetWindowContextReply { return v } -// Write request to wire for GetWindowContext -// getWindowContextRequest writes a GetWindowContext request to a byte slice. +// getWindowContextRequest writes a GetWindowContext request to a byte slice for transfer. func getWindowContextRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -1424,7 +1412,7 @@ type GetWindowCreateContextCookie struct { } // GetWindowCreateContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetWindowCreateContextCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetWindowCreateContextCookie.Reply. func GetWindowCreateContext(c *xgb.Conn) GetWindowCreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1499,8 +1487,7 @@ func getWindowCreateContextReply(buf []byte) *GetWindowCreateContextReply { return v } -// Write request to wire for GetWindowCreateContext -// getWindowCreateContextRequest writes a GetWindowCreateContext request to a byte slice. +// getWindowCreateContextRequest writes a GetWindowCreateContext request to a byte slice for transfer. func getWindowCreateContextRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -1526,7 +1513,7 @@ type ListPropertiesCookie struct { } // ListProperties sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListPropertiesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListPropertiesCookie.Reply. func ListProperties(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1597,8 +1584,7 @@ func listPropertiesReply(buf []byte) *ListPropertiesReply { return v } -// Write request to wire for ListProperties -// listPropertiesRequest writes a ListProperties request to a byte slice. +// listPropertiesRequest writes a ListProperties request to a byte slice for transfer. func listPropertiesRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -1627,7 +1613,7 @@ type ListSelectionsCookie struct { } // ListSelections sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListSelectionsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListSelectionsCookie.Reply. func ListSelections(c *xgb.Conn) ListSelectionsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1698,8 +1684,7 @@ func listSelectionsReply(buf []byte) *ListSelectionsReply { return v } -// Write request to wire for ListSelections -// listSelectionsRequest writes a ListSelections request to a byte slice. +// listSelectionsRequest writes a ListSelections request to a byte slice for transfer. func listSelectionsRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -1725,8 +1710,8 @@ 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, ClientMajor byte, ClientMinor byte) QueryVersionCookie { +// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply. +func QueryVersion(c *xgb.Conn, ClientMajor, ClientMinor byte) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SELinux"]; !ok { @@ -1739,7 +1724,7 @@ func QueryVersion(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionC // 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, ClientMajor byte, ClientMinor byte) QueryVersionCookie { +func QueryVersionUnchecked(c *xgb.Conn, ClientMajor, ClientMinor byte) QueryVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SELinux"]; !ok { @@ -1793,9 +1778,8 @@ func queryVersionReply(buf []byte) *QueryVersionReply { return v } -// Write request to wire for QueryVersion -// queryVersionRequest writes a QueryVersion request to a byte slice. -func queryVersionRequest(c *xgb.Conn, ClientMajor byte, ClientMinor byte) []byte { +// queryVersionRequest writes a QueryVersion request to a byte slice for transfer. +func queryVersionRequest(c *xgb.Conn, ClientMajor, ClientMinor byte) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -1827,7 +1811,7 @@ type SetDeviceContextCookie struct { // SetDeviceContext sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func SetDeviceContext(c *xgb.Conn, Device uint32, ContextLen uint32, Context string) SetDeviceContextCookie { +func SetDeviceContext(c *xgb.Conn, Device, ContextLen uint32, Context string) SetDeviceContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SELinux"]; !ok { @@ -1839,8 +1823,8 @@ func SetDeviceContext(c *xgb.Conn, Device uint32, ContextLen uint32, Context str } // SetDeviceContextChecked sends a checked request. -// If an error occurs, it can be retrieved using SetDeviceContextCookie.Check() -func SetDeviceContextChecked(c *xgb.Conn, Device uint32, ContextLen uint32, Context string) SetDeviceContextCookie { +// If an error occurs, it can be retrieved using SetDeviceContextCookie.Check. +func SetDeviceContextChecked(c *xgb.Conn, Device, ContextLen uint32, Context string) SetDeviceContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["SELinux"]; !ok { @@ -1857,9 +1841,8 @@ func (cook SetDeviceContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetDeviceContext -// setDeviceContextRequest writes a SetDeviceContext request to a byte slice. -func setDeviceContextRequest(c *xgb.Conn, Device uint32, ContextLen uint32, Context string) []byte { +// setDeviceContextRequest writes a SetDeviceContext request to a byte slice for transfer. +func setDeviceContextRequest(c *xgb.Conn, Device, ContextLen uint32, Context string) []byte { size := xgb.Pad((12 + xgb.Pad((int(ContextLen) * 1)))) b := 0 buf := make([]byte, size) @@ -1906,7 +1889,7 @@ func SetDeviceCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetD } // SetDeviceCreateContextChecked sends a checked request. -// If an error occurs, it can be retrieved using SetDeviceCreateContextCookie.Check() +// If an error occurs, it can be retrieved using SetDeviceCreateContextCookie.Check. func SetDeviceCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetDeviceCreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1924,8 +1907,7 @@ func (cook SetDeviceCreateContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetDeviceCreateContext -// setDeviceCreateContextRequest writes a SetDeviceCreateContext request to a byte slice. +// setDeviceCreateContextRequest writes a SetDeviceCreateContext request to a byte slice for transfer. func setDeviceCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte { size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1)))) b := 0 @@ -1970,7 +1952,7 @@ func SetPropertyCreateContext(c *xgb.Conn, ContextLen uint32, Context string) Se } // SetPropertyCreateContextChecked sends a checked request. -// If an error occurs, it can be retrieved using SetPropertyCreateContextCookie.Check() +// If an error occurs, it can be retrieved using SetPropertyCreateContextCookie.Check. func SetPropertyCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyCreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1988,8 +1970,7 @@ func (cook SetPropertyCreateContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetPropertyCreateContext -// setPropertyCreateContextRequest writes a SetPropertyCreateContext request to a byte slice. +// setPropertyCreateContextRequest writes a SetPropertyCreateContext request to a byte slice for transfer. func setPropertyCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte { size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1)))) b := 0 @@ -2034,7 +2015,7 @@ func SetPropertyUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetPr } // SetPropertyUseContextChecked sends a checked request. -// If an error occurs, it can be retrieved using SetPropertyUseContextCookie.Check() +// If an error occurs, it can be retrieved using SetPropertyUseContextCookie.Check. func SetPropertyUseContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyUseContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2052,8 +2033,7 @@ func (cook SetPropertyUseContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetPropertyUseContext -// setPropertyUseContextRequest writes a SetPropertyUseContext request to a byte slice. +// setPropertyUseContextRequest writes a SetPropertyUseContext request to a byte slice for transfer. func setPropertyUseContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte { size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1)))) b := 0 @@ -2098,7 +2078,7 @@ func SetSelectionCreateContext(c *xgb.Conn, ContextLen uint32, Context string) S } // SetSelectionCreateContextChecked sends a checked request. -// If an error occurs, it can be retrieved using SetSelectionCreateContextCookie.Check() +// If an error occurs, it can be retrieved using SetSelectionCreateContextCookie.Check. func SetSelectionCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionCreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2116,8 +2096,7 @@ func (cook SetSelectionCreateContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetSelectionCreateContext -// setSelectionCreateContextRequest writes a SetSelectionCreateContext request to a byte slice. +// setSelectionCreateContextRequest writes a SetSelectionCreateContext request to a byte slice for transfer. func setSelectionCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte { size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1)))) b := 0 @@ -2162,7 +2141,7 @@ func SetSelectionUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetS } // SetSelectionUseContextChecked sends a checked request. -// If an error occurs, it can be retrieved using SetSelectionUseContextCookie.Check() +// If an error occurs, it can be retrieved using SetSelectionUseContextCookie.Check. func SetSelectionUseContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionUseContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2180,8 +2159,7 @@ func (cook SetSelectionUseContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetSelectionUseContext -// setSelectionUseContextRequest writes a SetSelectionUseContext request to a byte slice. +// setSelectionUseContextRequest writes a SetSelectionUseContext request to a byte slice for transfer. func setSelectionUseContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte { size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1)))) b := 0 @@ -2226,7 +2204,7 @@ func SetWindowCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetW } // SetWindowCreateContextChecked sends a checked request. -// If an error occurs, it can be retrieved using SetWindowCreateContextCookie.Check() +// If an error occurs, it can be retrieved using SetWindowCreateContextCookie.Check. func SetWindowCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetWindowCreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2244,8 +2222,7 @@ func (cook SetWindowCreateContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetWindowCreateContext -// setWindowCreateContextRequest writes a SetWindowCreateContext request to a byte slice. +// setWindowCreateContextRequest writes a SetWindowCreateContext request to a byte slice for transfer. func setWindowCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte { size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1)))) b := 0 diff --git a/nexgb/xtest/xtest.go b/nexgb/xtest/xtest.go index 282f004..ce050e1 100644 --- a/nexgb/xtest/xtest.go +++ b/nexgb/xtest/xtest.go @@ -76,7 +76,7 @@ type CompareCursorCookie struct { } // CompareCursor sends a checked request. -// If an error occurs, it will be returned with the reply by calling CompareCursorCookie.Reply() +// If an error occurs, it will be returned with the reply by calling CompareCursorCookie.Reply. func CompareCursor(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) CompareCursorCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -141,8 +141,7 @@ func compareCursorReply(buf []byte) *CompareCursorReply { return v } -// Write request to wire for CompareCursor -// compareCursorRequest writes a CompareCursor request to a byte slice. +// compareCursorRequest writes a CompareCursor request to a byte slice for transfer. func compareCursorRequest(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) []byte { size := 12 b := 0 @@ -175,7 +174,7 @@ type FakeInputCookie struct { // FakeInput sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func FakeInput(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Window, RootX int16, RootY int16, Deviceid byte) FakeInputCookie { +func FakeInput(c *xgb.Conn, Type, Detail byte, Time uint32, Root xproto.Window, RootX, RootY int16, Deviceid byte) FakeInputCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XTEST"]; !ok { @@ -187,8 +186,8 @@ func FakeInput(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Win } // FakeInputChecked sends a checked request. -// If an error occurs, it can be retrieved using FakeInputCookie.Check() -func FakeInputChecked(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Window, RootX int16, RootY int16, Deviceid byte) FakeInputCookie { +// If an error occurs, it can be retrieved using FakeInputCookie.Check. +func FakeInputChecked(c *xgb.Conn, Type, Detail byte, Time uint32, Root xproto.Window, RootX, RootY int16, Deviceid byte) FakeInputCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XTEST"]; !ok { @@ -205,9 +204,8 @@ func (cook FakeInputCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for FakeInput -// fakeInputRequest writes a FakeInput request to a byte slice. -func fakeInputRequest(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xproto.Window, RootX int16, RootY int16, Deviceid byte) []byte { +// fakeInputRequest writes a FakeInput request to a byte slice for transfer. +func fakeInputRequest(c *xgb.Conn, Type, Detail byte, Time uint32, Root xproto.Window, RootX, RootY int16, Deviceid byte) []byte { size := 36 b := 0 buf := make([]byte, size) @@ -259,7 +257,7 @@ type GetVersionCookie struct { } // GetVersion sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply() +// If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply. func GetVersion(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) GetVersionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -324,8 +322,7 @@ func getVersionReply(buf []byte) *GetVersionReply { return v } -// Write request to wire for GetVersion -// getVersionRequest writes a GetVersion request to a byte slice. +// getVersionRequest writes a GetVersion request to a byte slice for transfer. func getVersionRequest(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) []byte { size := 8 b := 0 @@ -372,7 +369,7 @@ func GrabControl(c *xgb.Conn, Impervious bool) GrabControlCookie { } // GrabControlChecked sends a checked request. -// If an error occurs, it can be retrieved using GrabControlCookie.Check() +// If an error occurs, it can be retrieved using GrabControlCookie.Check. func GrabControlChecked(c *xgb.Conn, Impervious bool) GrabControlCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -390,8 +387,7 @@ func (cook GrabControlCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for GrabControl -// grabControlRequest writes a GrabControl request to a byte slice. +// grabControlRequest writes a GrabControl request to a byte slice for transfer. func grabControlRequest(c *xgb.Conn, Impervious bool) []byte { size := 8 b := 0 diff --git a/nexgb/xv/xv.go b/nexgb/xv/xv.go index 1c658c5..7f6be44 100644 --- a/nexgb/xv/xv.go +++ b/nexgb/xv/xv.go @@ -1215,7 +1215,7 @@ type GetPortAttributeCookie struct { } // GetPortAttribute sends a checked request. -// If an error occurs, it will be returned with the reply by calling GetPortAttributeCookie.Reply() +// 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 { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1279,8 +1279,7 @@ func getPortAttributeReply(buf []byte) *GetPortAttributeReply { return v } -// Write request to wire for GetPortAttribute -// getPortAttributeRequest writes a GetPortAttribute request to a byte slice. +// getPortAttributeRequest writes a GetPortAttribute request to a byte slice for transfer. func getPortAttributeRequest(c *xgb.Conn, Port Port, Attribute xproto.Atom) []byte { size := 12 b := 0 @@ -1313,7 +1312,7 @@ 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 { +func GetStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) GetStillCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -1325,8 +1324,8 @@ 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 an error occurs, it can be retrieved using GetStillCookie.Check. +func GetStillChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) GetStillCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -1343,9 +1342,8 @@ func (cook GetStillCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for GetStill -// getStillRequest writes a GetStill request to a byte slice. -func getStillRequest(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) []byte { +// getStillRequest writes a GetStill request to a byte slice for transfer. +func getStillRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -1404,7 +1402,7 @@ 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 { +func GetVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) GetVideoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -1416,8 +1414,8 @@ 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 an error occurs, it can be retrieved using GetVideoCookie.Check. +func GetVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) GetVideoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -1434,9 +1432,8 @@ func (cook GetVideoCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for GetVideo -// getVideoRequest writes a GetVideo request to a byte slice. -func getVideoRequest(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) []byte { +// getVideoRequest writes a GetVideo request to a byte slice for transfer. +func getVideoRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -1494,7 +1491,7 @@ type GrabPortCookie struct { } // GrabPort sends a checked request. -// If an error occurs, it will be returned with the reply by calling GrabPortCookie.Reply() +// 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 { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1555,8 +1552,7 @@ func grabPortReply(buf []byte) *GrabPortReply { return v } -// Write request to wire for GrabPort -// grabPortRequest writes a GrabPort request to a byte slice. +// grabPortRequest writes a GrabPort request to a byte slice for transfer. func grabPortRequest(c *xgb.Conn, Port Port, Time xproto.Timestamp) []byte { size := 12 b := 0 @@ -1588,7 +1584,7 @@ type ListImageFormatsCookie struct { } // ListImageFormats sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListImageFormatsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListImageFormatsCookie.Reply. func ListImageFormats(c *xgb.Conn, Port Port) ListImageFormatsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -1659,8 +1655,7 @@ func listImageFormatsReply(buf []byte) *ListImageFormatsReply { return v } -// Write request to wire for ListImageFormats -// listImageFormatsRequest writes a ListImageFormats request to a byte slice. +// listImageFormatsRequest writes a ListImageFormats request to a byte slice for transfer. func listImageFormatsRequest(c *xgb.Conn, Port Port) []byte { size := 8 b := 0 @@ -1690,7 +1685,7 @@ 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 { +func PutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Id uint32, SrcX, SrcY int16, SrcW, SrcH uint16, DrwX, DrwY int16, DrwW, DrwH, Width, Height uint16, Data []byte) PutImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -1702,8 +1697,8 @@ 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 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, SrcY int16, SrcW, SrcH uint16, DrwX, DrwY int16, DrwW, DrwH, Width, Height uint16, Data []byte) PutImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -1720,9 +1715,8 @@ func (cook PutImageCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PutImage -// putImageRequest writes a PutImage request to a byte slice. -func putImageRequest(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) []byte { +// putImageRequest writes a PutImage request to a byte slice for transfer. +func putImageRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Id uint32, SrcX, SrcY int16, SrcW, SrcH uint16, DrwX, DrwY int16, DrwW, DrwH, Width, Height uint16, Data []byte) []byte { size := xgb.Pad((40 + xgb.Pad((len(Data) * 1)))) b := 0 buf := make([]byte, size) @@ -1793,7 +1787,7 @@ 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 { +func PutStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) PutStillCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -1805,8 +1799,8 @@ 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 an error occurs, it can be retrieved using PutStillCookie.Check. +func PutStillChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) PutStillCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -1823,9 +1817,8 @@ func (cook PutStillCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PutStill -// putStillRequest writes a PutStill request to a byte slice. -func putStillRequest(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) []byte { +// putStillRequest writes a PutStill request to a byte slice for transfer. +func putStillRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -1884,7 +1877,7 @@ 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 { +func PutVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) PutVideoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -1896,8 +1889,8 @@ 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 an error occurs, it can be retrieved using PutVideoCookie.Check. +func PutVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) PutVideoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -1914,9 +1907,8 @@ func (cook PutVideoCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for PutVideo -// putVideoRequest writes a PutVideo request to a byte slice. -func putVideoRequest(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) []byte { +// putVideoRequest writes a PutVideo request to a byte slice for transfer. +func putVideoRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX, VidY int16, VidW, VidH uint16, DrwX, DrwY int16, DrwW, DrwH uint16) []byte { size := 32 b := 0 buf := make([]byte, size) @@ -1974,7 +1966,7 @@ type QueryAdaptorsCookie struct { } // QueryAdaptors sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryAdaptorsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryAdaptorsCookie.Reply. func QueryAdaptors(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2045,8 +2037,7 @@ func queryAdaptorsReply(buf []byte) *QueryAdaptorsReply { return v } -// Write request to wire for QueryAdaptors -// queryAdaptorsRequest writes a QueryAdaptors request to a byte slice. +// queryAdaptorsRequest writes a QueryAdaptors request to a byte slice for transfer. func queryAdaptorsRequest(c *xgb.Conn, Window xproto.Window) []byte { size := 8 b := 0 @@ -2075,8 +2066,8 @@ 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 an error occurs, it will be returned with the reply by calling QueryBestSizeCookie.Reply. +func QueryBestSize(c *xgb.Conn, Port Port, VidW, VidH, DrwW, DrwH uint16, Motion bool) QueryBestSizeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -2089,7 +2080,7 @@ 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 { +func QueryBestSizeUnchecked(c *xgb.Conn, Port Port, VidW, VidH, DrwW, DrwH uint16, Motion bool) QueryBestSizeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -2143,9 +2134,8 @@ func queryBestSizeReply(buf []byte) *QueryBestSizeReply { return v } -// Write request to wire for QueryBestSize -// queryBestSizeRequest writes a QueryBestSize request to a byte slice. -func queryBestSizeRequest(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) []byte { +// queryBestSizeRequest writes a QueryBestSize request to a byte slice for transfer. +func queryBestSizeRequest(c *xgb.Conn, Port Port, VidW, VidH, DrwW, DrwH uint16, Motion bool) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -2194,7 +2184,7 @@ type QueryEncodingsCookie struct { } // QueryEncodings sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryEncodingsCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryEncodingsCookie.Reply. func QueryEncodings(c *xgb.Conn, Port Port) QueryEncodingsCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2265,8 +2255,7 @@ func queryEncodingsReply(buf []byte) *QueryEncodingsReply { return v } -// Write request to wire for QueryEncodings -// queryEncodingsRequest writes a QueryEncodings request to a byte slice. +// queryEncodingsRequest writes a QueryEncodings request to a byte slice for transfer. func queryEncodingsRequest(c *xgb.Conn, Port Port) []byte { size := 8 b := 0 @@ -2295,7 +2284,7 @@ type QueryExtensionCookie struct { } // QueryExtension sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryExtensionCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryExtensionCookie.Reply. func QueryExtension(c *xgb.Conn) QueryExtensionCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2363,8 +2352,7 @@ func queryExtensionReply(buf []byte) *QueryExtensionReply { return v } -// Write request to wire for QueryExtension -// queryExtensionRequest writes a QueryExtension request to a byte slice. +// queryExtensionRequest writes a QueryExtension request to a byte slice for transfer. func queryExtensionRequest(c *xgb.Conn) []byte { size := 4 b := 0 @@ -2390,8 +2378,8 @@ 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 an error occurs, it will be returned with the reply by calling QueryImageAttributesCookie.Reply. +func QueryImageAttributes(c *xgb.Conn, Port Port, Id uint32, Width, Height uint16) QueryImageAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -2404,7 +2392,7 @@ 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 { +func QueryImageAttributesUnchecked(c *xgb.Conn, Port Port, Id uint32, Width, Height uint16) QueryImageAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -2483,9 +2471,8 @@ func queryImageAttributesReply(buf []byte) *QueryImageAttributesReply { return v } -// Write request to wire for QueryImageAttributes -// queryImageAttributesRequest writes a QueryImageAttributes request to a byte slice. -func queryImageAttributesRequest(c *xgb.Conn, Port Port, Id uint32, Width uint16, Height uint16) []byte { +// queryImageAttributesRequest writes a QueryImageAttributes request to a byte slice for transfer. +func queryImageAttributesRequest(c *xgb.Conn, Port Port, Id uint32, Width, Height uint16) []byte { size := 16 b := 0 buf := make([]byte, size) @@ -2522,7 +2509,7 @@ type QueryPortAttributesCookie struct { } // QueryPortAttributes sends a checked request. -// If an error occurs, it will be returned with the reply by calling QueryPortAttributesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling QueryPortAttributesCookie.Reply. func QueryPortAttributes(c *xgb.Conn, Port Port) QueryPortAttributesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2597,8 +2584,7 @@ func queryPortAttributesReply(buf []byte) *QueryPortAttributesReply { return v } -// Write request to wire for QueryPortAttributes -// queryPortAttributesRequest writes a QueryPortAttributes request to a byte slice. +// queryPortAttributesRequest writes a QueryPortAttributes request to a byte slice for transfer. func queryPortAttributesRequest(c *xgb.Conn, Port Port) []byte { size := 8 b := 0 @@ -2640,7 +2626,7 @@ 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() +// If an error occurs, it can be retrieved using SelectPortNotifyCookie.Check. func SelectPortNotifyChecked(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2658,8 +2644,7 @@ func (cook SelectPortNotifyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SelectPortNotify -// selectPortNotifyRequest writes a SelectPortNotify request to a byte slice. +// selectPortNotifyRequest writes a SelectPortNotify request to a byte slice for transfer. func selectPortNotifyRequest(c *xgb.Conn, Port Port, Onoff bool) []byte { size := 12 b := 0 @@ -2710,7 +2695,7 @@ 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() +// If an error occurs, it can be retrieved using SelectVideoNotifyCookie.Check. func SelectVideoNotifyChecked(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2728,8 +2713,7 @@ func (cook SelectVideoNotifyCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SelectVideoNotify -// selectVideoNotifyRequest writes a SelectVideoNotify request to a byte slice. +// selectVideoNotifyRequest writes a SelectVideoNotify request to a byte slice for transfer. func selectVideoNotifyRequest(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) []byte { size := 12 b := 0 @@ -2780,7 +2764,7 @@ 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() +// If an error occurs, it can be retrieved using SetPortAttributeCookie.Check. func SetPortAttributeChecked(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2798,8 +2782,7 @@ func (cook SetPortAttributeCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for SetPortAttribute -// setPortAttributeRequest writes a SetPortAttribute request to a byte slice. +// setPortAttributeRequest writes a SetPortAttribute request to a byte slice for transfer. func setPortAttributeRequest(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) []byte { size := 16 b := 0 @@ -2835,7 +2818,7 @@ 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 { +func ShmPutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Shmseg shm.Seg, Id, Offset uint32, SrcX, SrcY int16, SrcW, SrcH uint16, DrwX, DrwY int16, DrwW, DrwH, Width, Height uint16, SendEvent byte) ShmPutImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -2847,8 +2830,8 @@ 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 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, Offset uint32, SrcX, SrcY int16, SrcW, SrcH uint16, DrwX, DrwY int16, DrwW, DrwH, Width, Height uint16, SendEvent byte) ShmPutImageCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo"]; !ok { @@ -2865,9 +2848,8 @@ func (cook ShmPutImageCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for ShmPutImage -// shmPutImageRequest writes a ShmPutImage request to a byte slice. -func shmPutImageRequest(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) []byte { +// shmPutImageRequest writes a ShmPutImage request to a byte slice for transfer. +func shmPutImageRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Shmseg shm.Seg, Id, Offset uint32, SrcX, SrcY int16, SrcW, SrcH uint16, DrwX, DrwY int16, DrwW, DrwH, Width, Height uint16, SendEvent byte) []byte { size := 52 b := 0 buf := make([]byte, size) @@ -2958,7 +2940,7 @@ 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() +// If an error occurs, it can be retrieved using StopVideoCookie.Check. func StopVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -2976,8 +2958,7 @@ func (cook StopVideoCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for StopVideo -// stopVideoRequest writes a StopVideo request to a byte slice. +// stopVideoRequest writes a StopVideo request to a byte slice for transfer. func stopVideoRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable) []byte { size := 12 b := 0 @@ -3022,7 +3003,7 @@ 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() +// If an error occurs, it can be retrieved using UngrabPortCookie.Check. func UngrabPortChecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -3040,8 +3021,7 @@ func (cook UngrabPortCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for UngrabPort -// ungrabPortRequest writes a UngrabPort request to a byte slice. +// ungrabPortRequest writes a UngrabPort request to a byte slice for transfer. func ungrabPortRequest(c *xgb.Conn, Port Port, Time xproto.Timestamp) []byte { size := 12 b := 0 diff --git a/nexgb/xvmc/xvmc.go b/nexgb/xvmc/xvmc.go index ca4c831..24fd46c 100644 --- a/nexgb/xvmc/xvmc.go +++ b/nexgb/xvmc/xvmc.go @@ -205,8 +205,8 @@ type CreateContextCookie struct { } // CreateContext sends a checked request. -// If an error occurs, it will be returned with the reply by calling CreateContextCookie.Reply() -func CreateContext(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) CreateContextCookie { +// If an error occurs, it will be returned with the reply by calling CreateContextCookie.Reply. +func CreateContext(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width, Height uint16, Flags uint32) CreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok { @@ -219,7 +219,7 @@ func CreateContext(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Sur // CreateContextUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateContextUnchecked(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) CreateContextCookie { +func CreateContextUnchecked(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width, Height uint16, Flags uint32) CreateContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok { @@ -287,9 +287,8 @@ func createContextReply(buf []byte) *CreateContextReply { return v } -// Write request to wire for CreateContext -// createContextRequest writes a CreateContext request to a byte slice. -func createContextRequest(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width uint16, Height uint16, Flags uint32) []byte { +// createContextRequest writes a CreateContext request to a byte slice for transfer. +func createContextRequest(c *xgb.Conn, ContextId Context, PortId xv.Port, SurfaceId Surface, Width, Height uint16, Flags uint32) []byte { size := 24 b := 0 buf := make([]byte, size) @@ -332,8 +331,8 @@ type CreateSubpictureCookie struct { } // CreateSubpicture sends a checked request. -// If an error occurs, it will be returned with the reply by calling CreateSubpictureCookie.Reply() -func CreateSubpicture(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) CreateSubpictureCookie { +// If an error occurs, it will be returned with the reply by calling CreateSubpictureCookie.Reply. +func CreateSubpicture(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width, Height uint16) CreateSubpictureCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok { @@ -346,7 +345,7 @@ func CreateSubpicture(c *xgb.Conn, SubpictureId Subpicture, Context Context, Xvi // CreateSubpictureUnchecked sends an unchecked request. // If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent. -func CreateSubpictureUnchecked(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) CreateSubpictureCookie { +func CreateSubpictureUnchecked(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width, Height uint16) CreateSubpictureCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() if _, ok := c.Extensions["XVideo-MotionCompensation"]; !ok { @@ -423,9 +422,8 @@ func createSubpictureReply(buf []byte) *CreateSubpictureReply { return v } -// Write request to wire for CreateSubpicture -// createSubpictureRequest writes a CreateSubpicture request to a byte slice. -func createSubpictureRequest(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width uint16, Height uint16) []byte { +// createSubpictureRequest writes a CreateSubpicture request to a byte slice for transfer. +func createSubpictureRequest(c *xgb.Conn, SubpictureId Subpicture, Context Context, XvimageId uint32, Width, Height uint16) []byte { size := 20 b := 0 buf := make([]byte, size) @@ -465,7 +463,7 @@ type CreateSurfaceCookie struct { } // CreateSurface sends a checked request. -// If an error occurs, it will be returned with the reply by calling CreateSurfaceCookie.Reply() +// If an error occurs, it will be returned with the reply by calling CreateSurfaceCookie.Reply. func CreateSurface(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurfaceCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -535,8 +533,7 @@ func createSurfaceReply(buf []byte) *CreateSurfaceReply { return v } -// Write request to wire for CreateSurface -// createSurfaceRequest writes a CreateSurface request to a byte slice. +// createSurfaceRequest writes a CreateSurface request to a byte slice for transfer. func createSurfaceRequest(c *xgb.Conn, SurfaceId Surface, ContextId Context) []byte { size := 12 b := 0 @@ -581,7 +578,7 @@ func DestroyContext(c *xgb.Conn, ContextId Context) DestroyContextCookie { } // DestroyContextChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroyContextCookie.Check() +// If an error occurs, it can be retrieved using DestroyContextCookie.Check. func DestroyContextChecked(c *xgb.Conn, ContextId Context) DestroyContextCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -599,8 +596,7 @@ func (cook DestroyContextCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroyContext -// destroyContextRequest writes a DestroyContext request to a byte slice. +// destroyContextRequest writes a DestroyContext request to a byte slice for transfer. func destroyContextRequest(c *xgb.Conn, ContextId Context) []byte { size := 8 b := 0 @@ -642,7 +638,7 @@ func DestroySubpicture(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCo } // DestroySubpictureChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroySubpictureCookie.Check() +// If an error occurs, it can be retrieved using DestroySubpictureCookie.Check. func DestroySubpictureChecked(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -660,8 +656,7 @@ func (cook DestroySubpictureCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroySubpicture -// destroySubpictureRequest writes a DestroySubpicture request to a byte slice. +// destroySubpictureRequest writes a DestroySubpicture request to a byte slice for transfer. func destroySubpictureRequest(c *xgb.Conn, SubpictureId Subpicture) []byte { size := 8 b := 0 @@ -703,7 +698,7 @@ func DestroySurface(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie { } // DestroySurfaceChecked sends a checked request. -// If an error occurs, it can be retrieved using DestroySurfaceCookie.Check() +// If an error occurs, it can be retrieved using DestroySurfaceCookie.Check. func DestroySurfaceChecked(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -721,8 +716,7 @@ func (cook DestroySurfaceCookie) Check() error { return cook.Cookie.Check() } -// Write request to wire for DestroySurface -// destroySurfaceRequest writes a DestroySurface request to a byte slice. +// destroySurfaceRequest writes a DestroySurface request to a byte slice for transfer. func destroySurfaceRequest(c *xgb.Conn, SurfaceId Surface) []byte { size := 8 b := 0 @@ -751,7 +745,7 @@ type ListSubpictureTypesCookie struct { } // ListSubpictureTypes sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListSubpictureTypesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListSubpictureTypesCookie.Reply. func ListSubpictureTypes(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSubpictureTypesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -822,8 +816,7 @@ func listSubpictureTypesReply(buf []byte) *ListSubpictureTypesReply { return v } -// Write request to wire for ListSubpictureTypes -// listSubpictureTypesRequest writes a ListSubpictureTypes request to a byte slice. +// listSubpictureTypesRequest writes a ListSubpictureTypes request to a byte slice for transfer. func listSubpictureTypesRequest(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) []byte { size := 12 b := 0 @@ -855,7 +848,7 @@ type ListSurfaceTypesCookie struct { } // ListSurfaceTypes sends a checked request. -// If an error occurs, it will be returned with the reply by calling ListSurfaceTypesCookie.Reply() +// If an error occurs, it will be returned with the reply by calling ListSurfaceTypesCookie.Reply. func ListSurfaceTypes(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie { c.ExtLock.RLock() defer c.ExtLock.RUnlock() @@ -926,8 +919,7 @@ func listSurfaceTypesReply(buf []byte) *ListSurfaceTypesReply { return v } -// Write request to wire for ListSurfaceTypes -// listSurfaceTypesRequest writes a ListSurfaceTypes request to a byte slice. +// listSurfaceTypesRequest writes a ListSurfaceTypes request to a byte slice for transfer. func listSurfaceTypesRequest(c *xgb.Conn, PortId xv.Port) []byte { size := 8 b := 0 @@ -956,7 +948,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() @@ -1024,8 +1016,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 -- cgit v1.2.3-70-g09d2