aboutsummaryrefslogtreecommitdiff
path: root/nexgb
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-10 23:57:34 -0400
committerAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-10 23:57:34 -0400
commitc00652934e4ec68016a152b9bea10273b0be8726 (patch)
tree069dc287fa76dcec2d6240e1afdfe5652118a88a /nexgb
parenta3363755cdfdafdf02d5a772bd47a462e99af057 (diff)
downloadhaven-c00652934e4ec68016a152b9bea10273b0be8726.tar.gz
haven-c00652934e4ec68016a152b9bea10273b0be8726.tar.xz
haven-c00652934e4ec68016a152b9bea10273b0be8726.zip
better docs
Diffstat (limited to 'nexgb')
-rw-r--r--nexgb/bigreq/bigreq.go25
-rw-r--r--nexgb/composite/composite.go137
-rw-r--r--nexgb/damage/damage.go89
-rw-r--r--nexgb/dpms/dpms.go138
-rw-r--r--nexgb/dri2/dri2.go289
-rw-r--r--nexgb/ge/ge.go29
-rw-r--r--nexgb/glx/glx.go1778
-rw-r--r--nexgb/randr/randr.go632
-rw-r--r--nexgb/record/record.go176
-rw-r--r--nexgb/render/render.go597
-rw-r--r--nexgb/res/res.go98
-rw-r--r--nexgb/screensaver/screensaver.go106
-rw-r--r--nexgb/shape/shape.go147
-rw-r--r--nexgb/shm/shm.go110
-rw-r--r--nexgb/sync/sync.go368
-rw-r--r--nexgb/xcmisc/xcmisc.go59
-rw-r--r--nexgb/xevie/xevie.go127
-rw-r--r--nexgb/xf86dri/xf86dri.go240
-rw-r--r--nexgb/xf86vidmode/xf86vidmode.go425
-rw-r--r--nexgb/xfixes/xfixes.go441
-rw-r--r--nexgb/xgb.go2
-rw-r--r--nexgb/xgbgen/go_error.go22
-rw-r--r--nexgb/xgbgen/go_event.go29
-rw-r--r--nexgb/xgbgen/go_request_reply.go37
-rw-r--r--nexgb/xgbgen/go_struct.go17
-rw-r--r--nexgb/xgbgen/go_union.go20
-rw-r--r--nexgb/xinerama/xinerama.go126
-rw-r--r--nexgb/xinput/xinput.go1169
-rw-r--r--nexgb/xprint/xprint.go437
-rw-r--r--nexgb/xproto/xproto.go2476
-rw-r--r--nexgb/xselinux/xselinux.go395
-rw-r--r--nexgb/xtest/xtest.go62
-rw-r--r--nexgb/xv/xv.go440
-rw-r--r--nexgb/xvmc/xvmc.go179
34 files changed, 6734 insertions, 4688 deletions
diff --git a/nexgb/bigreq/bigreq.go b/nexgb/bigreq/bigreq.go
index c2263a0..3913c5f 100644
--- a/nexgb/bigreq/bigreq.go
+++ b/nexgb/bigreq/bigreq.go
@@ -2,7 +2,7 @@
package bigreq
/*
- This file was generated by bigreq.xml on May 10 2012 8:04:31pm EDT.
+ This file was generated by bigreq.xml on May 10 2012 11:56:18pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,6 +40,8 @@ func init() {
xgb.NewExtErrorFuncs["BIG-REQUESTS"] = make(map[int]xgb.NewErrorFun)
}
+// Skipping definition for base type 'Float'
+
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
@@ -62,36 +64,36 @@ func init() {
// Skipping definition for base type 'Bool'
-// Skipping definition for base type 'Float'
-
-// Request Enable
-// size: 4
+// EnableCookie is a cookie used only for Enable requests.
type EnableCookie struct {
*xgb.Cookie
}
+// Enable sends a checked request.
+// If an error occurs, it will be returned with the reply by calling EnableCookie.Reply()
func Enable(c *xgb.Conn) EnableCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(enableRequest(c), cookie)
return EnableCookie{cookie}
}
+// EnableUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func EnableUnchecked(c *xgb.Conn) EnableCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(enableRequest(c), cookie)
return EnableCookie{cookie}
}
-// Request reply for Enable
-// size: 12
+// EnableReply represents the data returned from a Enable request.
type EnableReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MaximumRequestLength uint32
}
-// Waits and reads reply data from request Enable
+// Reply blocks and returns the reply data for a Enable request.
func (cook EnableCookie) Reply() (*EnableReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -103,7 +105,7 @@ func (cook EnableCookie) Reply() (*EnableReply, error) {
return enableReply(buf), nil
}
-// Read reply into structure from buffer for Enable
+// enableReply reads a byte slice into a EnableReply value.
func enableReply(buf []byte) *EnableReply {
v := new(EnableReply)
b := 1 // skip reply determinant
@@ -123,6 +125,7 @@ func enableReply(buf []byte) *EnableReply {
}
// Write request to wire for Enable
+// enableRequest writes a Enable request to a byte slice.
func enableRequest(c *xgb.Conn) []byte {
size := 4
b := 0
diff --git a/nexgb/composite/composite.go b/nexgb/composite/composite.go
index 5a3d7c4..be56807 100644
--- a/nexgb/composite/composite.go
+++ b/nexgb/composite/composite.go
@@ -2,7 +2,7 @@
package composite
/*
- This file was generated by composite.xml on May 10 2012 8:04:31pm EDT.
+ This file was generated by composite.xml on May 10 2012 11:56:18pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -41,16 +41,6 @@ func init() {
xgb.NewExtErrorFuncs["Composite"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Card8'
-
-// Skipping definition for base type 'Int16'
-
-// Skipping definition for base type 'Int32'
-
-// Skipping definition for base type 'Void'
-
-// Skipping definition for base type 'Byte'
-
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
@@ -65,41 +55,53 @@ func init() {
// Skipping definition for base type 'Float'
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Int16'
+
+// Skipping definition for base type 'Int32'
+
+// Skipping definition for base type 'Void'
+
+// Skipping definition for base type 'Byte'
+
const (
RedirectAutomatic = 0
RedirectManual = 1
)
-// Request QueryVersion
-// size: 12
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 32
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint32
MinorVersion uint32
// padding: 16 bytes
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -111,7 +113,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -136,6 +138,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 12
b := 0
@@ -159,30 +162,35 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVers
return buf
}
-// Request RedirectWindow
-// size: 12
+// RedirectWindowCookie is a cookie used only for RedirectWindow requests.
type RedirectWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for RedirectWindow
+// RedirectWindow sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func RedirectWindow(c *xgb.Conn, Window xproto.Window, Update byte) RedirectWindowCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(redirectWindowRequest(c, Window, Update), cookie)
return RedirectWindowCookie{cookie}
}
+// RedirectWindowChecked sends a checked request.
+// If an error occurs, it can be retrieved using RedirectWindowCookie.Check()
func RedirectWindowChecked(c *xgb.Conn, Window xproto.Window, Update byte) RedirectWindowCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(redirectWindowRequest(c, Window, Update), cookie)
return RedirectWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook RedirectWindowCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for RedirectWindow
+// redirectWindowRequest writes a RedirectWindow request to a byte slice.
func redirectWindowRequest(c *xgb.Conn, Window xproto.Window, Update byte) []byte {
size := 12
b := 0
@@ -208,30 +216,35 @@ func redirectWindowRequest(c *xgb.Conn, Window xproto.Window, Update byte) []byt
return buf
}
-// Request RedirectSubwindows
-// size: 12
+// RedirectSubwindowsCookie is a cookie used only for RedirectSubwindows requests.
type RedirectSubwindowsCookie struct {
*xgb.Cookie
}
-// Write request to wire for RedirectSubwindows
+// RedirectSubwindows sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func RedirectSubwindows(c *xgb.Conn, Window xproto.Window, Update byte) RedirectSubwindowsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(redirectSubwindowsRequest(c, Window, Update), cookie)
return RedirectSubwindowsCookie{cookie}
}
+// RedirectSubwindowsChecked sends a checked request.
+// If an error occurs, it can be retrieved using RedirectSubwindowsCookie.Check()
func RedirectSubwindowsChecked(c *xgb.Conn, Window xproto.Window, Update byte) RedirectSubwindowsCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(redirectSubwindowsRequest(c, Window, Update), cookie)
return RedirectSubwindowsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook RedirectSubwindowsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for RedirectSubwindows
+// redirectSubwindowsRequest writes a RedirectSubwindows request to a byte slice.
func redirectSubwindowsRequest(c *xgb.Conn, Window xproto.Window, Update byte) []byte {
size := 12
b := 0
@@ -257,30 +270,35 @@ func redirectSubwindowsRequest(c *xgb.Conn, Window xproto.Window, Update byte) [
return buf
}
-// Request UnredirectWindow
-// size: 12
+// UnredirectWindowCookie is a cookie used only for UnredirectWindow requests.
type UnredirectWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for UnredirectWindow
+// UnredirectWindow sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UnredirectWindow(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectWindowCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(unredirectWindowRequest(c, Window, Update), cookie)
return UnredirectWindowCookie{cookie}
}
+// UnredirectWindowChecked sends a checked request.
+// If an error occurs, it can be retrieved using UnredirectWindowCookie.Check()
func UnredirectWindowChecked(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectWindowCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(unredirectWindowRequest(c, Window, Update), cookie)
return UnredirectWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UnredirectWindowCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UnredirectWindow
+// unredirectWindowRequest writes a UnredirectWindow request to a byte slice.
func unredirectWindowRequest(c *xgb.Conn, Window xproto.Window, Update byte) []byte {
size := 12
b := 0
@@ -306,30 +324,35 @@ func unredirectWindowRequest(c *xgb.Conn, Window xproto.Window, Update byte) []b
return buf
}
-// Request UnredirectSubwindows
-// size: 12
+// UnredirectSubwindowsCookie is a cookie used only for UnredirectSubwindows requests.
type UnredirectSubwindowsCookie struct {
*xgb.Cookie
}
-// Write request to wire for UnredirectSubwindows
+// UnredirectSubwindows sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UnredirectSubwindows(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectSubwindowsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(unredirectSubwindowsRequest(c, Window, Update), cookie)
return UnredirectSubwindowsCookie{cookie}
}
+// UnredirectSubwindowsChecked sends a checked request.
+// If an error occurs, it can be retrieved using UnredirectSubwindowsCookie.Check()
func UnredirectSubwindowsChecked(c *xgb.Conn, Window xproto.Window, Update byte) UnredirectSubwindowsCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(unredirectSubwindowsRequest(c, Window, Update), cookie)
return UnredirectSubwindowsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UnredirectSubwindowsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UnredirectSubwindows
+// unredirectSubwindowsRequest writes a UnredirectSubwindows request to a byte slice.
func unredirectSubwindowsRequest(c *xgb.Conn, Window xproto.Window, Update byte) []byte {
size := 12
b := 0
@@ -355,30 +378,35 @@ func unredirectSubwindowsRequest(c *xgb.Conn, Window xproto.Window, Update byte)
return buf
}
-// Request CreateRegionFromBorderClip
-// size: 12
+// CreateRegionFromBorderClipCookie is a cookie used only for CreateRegionFromBorderClip requests.
type CreateRegionFromBorderClipCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateRegionFromBorderClip
+// CreateRegionFromBorderClip sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateRegionFromBorderClip(c *xgb.Conn, Region xfixes.Region, Window xproto.Window) CreateRegionFromBorderClipCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createRegionFromBorderClipRequest(c, Region, Window), cookie)
return CreateRegionFromBorderClipCookie{cookie}
}
+// CreateRegionFromBorderClipChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateRegionFromBorderClipCookie.Check()
func CreateRegionFromBorderClipChecked(c *xgb.Conn, Region xfixes.Region, Window xproto.Window) CreateRegionFromBorderClipCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createRegionFromBorderClipRequest(c, Region, Window), cookie)
return CreateRegionFromBorderClipCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateRegionFromBorderClipCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateRegionFromBorderClip
+// createRegionFromBorderClipRequest writes a CreateRegionFromBorderClip request to a byte slice.
func createRegionFromBorderClipRequest(c *xgb.Conn, Region xfixes.Region, Window xproto.Window) []byte {
size := 12
b := 0
@@ -402,30 +430,35 @@ func createRegionFromBorderClipRequest(c *xgb.Conn, Region xfixes.Region, Window
return buf
}
-// Request NameWindowPixmap
-// size: 12
+// NameWindowPixmapCookie is a cookie used only for NameWindowPixmap requests.
type NameWindowPixmapCookie struct {
*xgb.Cookie
}
-// Write request to wire for NameWindowPixmap
+// NameWindowPixmap sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func NameWindowPixmap(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) NameWindowPixmapCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(nameWindowPixmapRequest(c, Window, Pixmap), cookie)
return NameWindowPixmapCookie{cookie}
}
+// NameWindowPixmapChecked sends a checked request.
+// If an error occurs, it can be retrieved using NameWindowPixmapCookie.Check()
func NameWindowPixmapChecked(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) NameWindowPixmapCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(nameWindowPixmapRequest(c, Window, Pixmap), cookie)
return NameWindowPixmapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook NameWindowPixmapCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for NameWindowPixmap
+// nameWindowPixmapRequest writes a NameWindowPixmap request to a byte slice.
func nameWindowPixmapRequest(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pixmap) []byte {
size := 12
b := 0
@@ -449,35 +482,37 @@ func nameWindowPixmapRequest(c *xgb.Conn, Window xproto.Window, Pixmap xproto.Pi
return buf
}
-// Request GetOverlayWindow
-// size: 8
+// GetOverlayWindowCookie is a cookie used only for GetOverlayWindow requests.
type GetOverlayWindowCookie struct {
*xgb.Cookie
}
+// GetOverlayWindow sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetOverlayWindowCookie.Reply()
func GetOverlayWindow(c *xgb.Conn, Window xproto.Window) GetOverlayWindowCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getOverlayWindowRequest(c, Window), cookie)
return GetOverlayWindowCookie{cookie}
}
+// GetOverlayWindowUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetOverlayWindowUnchecked(c *xgb.Conn, Window xproto.Window) GetOverlayWindowCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getOverlayWindowRequest(c, Window), cookie)
return GetOverlayWindowCookie{cookie}
}
-// Request reply for GetOverlayWindow
-// size: 32
+// GetOverlayWindowReply represents the data returned from a GetOverlayWindow request.
type GetOverlayWindowReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
OverlayWin xproto.Window
// padding: 20 bytes
}
-// Waits and reads reply data from request GetOverlayWindow
+// Reply blocks and returns the reply data for a GetOverlayWindow request.
func (cook GetOverlayWindowCookie) Reply() (*GetOverlayWindowReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -489,7 +524,7 @@ func (cook GetOverlayWindowCookie) Reply() (*GetOverlayWindowReply, error) {
return getOverlayWindowReply(buf), nil
}
-// Read reply into structure from buffer for GetOverlayWindow
+// getOverlayWindowReply reads a byte slice into a GetOverlayWindowReply value.
func getOverlayWindowReply(buf []byte) *GetOverlayWindowReply {
v := new(GetOverlayWindowReply)
b := 1 // skip reply determinant
@@ -511,6 +546,7 @@ func getOverlayWindowReply(buf []byte) *GetOverlayWindowReply {
}
// Write request to wire for GetOverlayWindow
+// getOverlayWindowRequest writes a GetOverlayWindow request to a byte slice.
func getOverlayWindowRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -531,30 +567,35 @@ func getOverlayWindowRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request ReleaseOverlayWindow
-// size: 8
+// ReleaseOverlayWindowCookie is a cookie used only for ReleaseOverlayWindow requests.
type ReleaseOverlayWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for ReleaseOverlayWindow
+// ReleaseOverlayWindow sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ReleaseOverlayWindow(c *xgb.Conn, Window xproto.Window) ReleaseOverlayWindowCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(releaseOverlayWindowRequest(c, Window), cookie)
return ReleaseOverlayWindowCookie{cookie}
}
+// ReleaseOverlayWindowChecked sends a checked request.
+// If an error occurs, it can be retrieved using ReleaseOverlayWindowCookie.Check()
func ReleaseOverlayWindowChecked(c *xgb.Conn, Window xproto.Window) ReleaseOverlayWindowCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(releaseOverlayWindowRequest(c, Window), cookie)
return ReleaseOverlayWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ReleaseOverlayWindowCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ReleaseOverlayWindow
+// releaseOverlayWindowRequest writes a ReleaseOverlayWindow request to a byte slice.
func releaseOverlayWindowRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
diff --git a/nexgb/damage/damage.go b/nexgb/damage/damage.go
index 8c59f55..1c17501 100644
--- a/nexgb/damage/damage.go
+++ b/nexgb/damage/damage.go
@@ -2,7 +2,7 @@
package damage
/*
- This file was generated by damage.xml on May 10 2012 8:04:31pm EDT.
+ This file was generated by damage.xml on May 10 2012 11:56:18pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -82,9 +82,7 @@ func NewDamageId(c *xgb.Conn) (Damage, error) {
return Damage(id), nil
}
-// Event definition Notify (0)
-// Size: 32
-
+// Notify is the event number for a NotifyEvent.
const Notify = 0
type NotifyEvent struct {
@@ -97,7 +95,7 @@ type NotifyEvent struct {
Geometry xproto.Rectangle
}
-// Event read Notify
+// NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.
func NotifyEventNew(buf []byte) xgb.Event {
v := NotifyEvent{}
b := 1 // don't read event number
@@ -126,7 +124,7 @@ func NotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write Notify
+// Bytes writes a NotifyEvent value to a byte slice.
func (v NotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -164,12 +162,14 @@ func (v NotifyEvent) Bytes() []byte {
return buf
}
-func (v NotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the Notify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v NotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of NotifyEvent.
func (v NotifyEvent) String() string {
fieldVals := make([]string, 0, 6)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -184,9 +184,7 @@ func init() {
xgb.NewExtEventFuncs["DAMAGE"][0] = NotifyEventNew
}
-// Error definition BadDamage (0)
-// Size: 32
-
+// BadBadDamage is the error number for a BadBadDamage.
const BadBadDamage = 0
type BadDamageError struct {
@@ -194,7 +192,7 @@ type BadDamageError struct {
NiceName string
}
-// Error read BadDamage
+// BadDamageErrorNew constructs a BadDamageError value that implements xgb.Error from a byte slice.
func BadDamageErrorNew(buf []byte) xgb.Error {
v := BadDamageError{}
v.NiceName = "BadDamage"
@@ -208,8 +206,8 @@ func BadDamageErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadDamageError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadDamage error.
+// This is mostly used internally.
func (err BadDamageError) SequenceId() uint16 {
return err.Sequence
}
@@ -229,36 +227,38 @@ func init() {
xgb.NewExtErrorFuncs["DAMAGE"][0] = BadDamageErrorNew
}
-// Request QueryVersion
-// size: 12
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 32
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint32
MinorVersion uint32
// padding: 16 bytes
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -270,7 +270,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -295,6 +295,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 12
b := 0
@@ -318,30 +319,35 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVers
return buf
}
-// Request Create
-// size: 16
+// CreateCookie is a cookie used only for Create requests.
type CreateCookie struct {
*xgb.Cookie
}
-// Write request to wire for Create
+// Create sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Create(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) CreateCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createRequest(c, Damage, Drawable, Level), cookie)
return CreateCookie{cookie}
}
+// CreateChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateCookie.Check()
func CreateChecked(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) CreateCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createRequest(c, Damage, Drawable, Level), cookie)
return CreateCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Create
+// createRequest writes a Create request to a byte slice.
func createRequest(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) []byte {
size := 16
b := 0
@@ -370,30 +376,35 @@ func createRequest(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level b
return buf
}
-// Request Destroy
-// size: 8
+// DestroyCookie is a cookie used only for Destroy requests.
type DestroyCookie struct {
*xgb.Cookie
}
-// Write request to wire for Destroy
+// Destroy sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Destroy(c *xgb.Conn, Damage Damage) DestroyCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyRequest(c, Damage), cookie)
return DestroyCookie{cookie}
}
+// DestroyChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyCookie.Check()
func DestroyChecked(c *xgb.Conn, Damage Damage) DestroyCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyRequest(c, Damage), cookie)
return DestroyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroyCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Destroy
+// destroyRequest writes a Destroy request to a byte slice.
func destroyRequest(c *xgb.Conn, Damage Damage) []byte {
size := 8
b := 0
@@ -414,30 +425,35 @@ func destroyRequest(c *xgb.Conn, Damage Damage) []byte {
return buf
}
-// Request Subtract
-// size: 16
+// SubtractCookie is a cookie used only for Subtract requests.
type SubtractCookie struct {
*xgb.Cookie
}
-// Write request to wire for Subtract
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(subtractRequest(c, Damage, Repair, Parts), cookie)
return SubtractCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(subtractRequest(c, Damage, Repair, Parts), cookie)
return SubtractCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -464,30 +480,35 @@ func subtractRequest(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfi
return buf
}
-// Request Add
-// size: 12
+// AddCookie is a cookie used only for Add requests.
type AddCookie struct {
*xgb.Cookie
}
-// Write request to wire for Add
+// Add sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Add(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(addRequest(c, Drawable, Region), cookie)
return AddCookie{cookie}
}
+// AddChecked sends a checked request.
+// If an error occurs, it can be retrieved using AddCookie.Check()
func AddChecked(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(addRequest(c, Drawable, Region), cookie)
return AddCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook AddCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Add
+// addRequest writes a Add request to a byte slice.
func addRequest(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) []byte {
size := 12
b := 0
diff --git a/nexgb/dpms/dpms.go b/nexgb/dpms/dpms.go
index de748e4..e3e095a 100644
--- a/nexgb/dpms/dpms.go
+++ b/nexgb/dpms/dpms.go
@@ -2,7 +2,7 @@
package dpms
/*
- This file was generated by dpms.xml on May 10 2012 8:04:31pm EDT.
+ This file was generated by dpms.xml on May 10 2012 11:56:18pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,6 +40,14 @@ func init() {
xgb.NewExtErrorFuncs["DPMS"] = make(map[int]xgb.NewErrorFun)
}
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Int16'
+
+// Skipping definition for base type 'Int32'
+
+// Skipping definition for base type 'Void'
+
// Skipping definition for base type 'Byte'
// Skipping definition for base type 'Int8'
@@ -56,14 +64,6 @@ func init() {
// Skipping definition for base type 'Float'
-// Skipping definition for base type 'Card8'
-
-// Skipping definition for base type 'Int16'
-
-// Skipping definition for base type 'Int32'
-
-// Skipping definition for base type 'Void'
-
const (
DPMSModeOn = 0
DPMSModeStandby = 1
@@ -71,35 +71,37 @@ const (
DPMSModeOff = 3
)
-// Request GetVersion
-// size: 8
+// GetVersionCookie is a cookie used only for GetVersion requests.
type GetVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return GetVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return GetVersionCookie{cookie}
}
-// Request reply for GetVersion
-// size: 12
+// GetVersionReply represents the data returned from a GetVersion request.
type GetVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ServerMajorVersion uint16
ServerMinorVersion uint16
}
-// Waits and reads reply data from request GetVersion
+// Reply blocks and returns the reply data for a GetVersion request.
func (cook GetVersionCookie) Reply() (*GetVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -111,7 +113,7 @@ func (cook GetVersionCookie) Reply() (*GetVersionReply, error) {
return getVersionReply(buf), nil
}
-// Read reply into structure from buffer for GetVersion
+// getVersionReply reads a byte slice into a GetVersionReply value.
func getVersionReply(buf []byte) *GetVersionReply {
v := new(GetVersionReply)
b := 1 // skip reply determinant
@@ -134,6 +136,7 @@ func getVersionReply(buf []byte) *GetVersionReply {
}
// 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 {
size := 8
b := 0
@@ -157,35 +160,37 @@ func getVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersio
return buf
}
-// Request Capable
-// size: 4
+// CapableCookie is a cookie used only for Capable requests.
type CapableCookie struct {
*xgb.Cookie
}
+// Capable sends a checked request.
+// If an error occurs, it will be returned with the reply by calling CapableCookie.Reply()
func Capable(c *xgb.Conn) CapableCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(capableRequest(c), cookie)
return CapableCookie{cookie}
}
+// CapableUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CapableUnchecked(c *xgb.Conn) CapableCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(capableRequest(c), cookie)
return CapableCookie{cookie}
}
-// Request reply for Capable
-// size: 32
+// CapableReply represents the data returned from a Capable request.
type CapableReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Capable bool
// padding: 23 bytes
}
-// Waits and reads reply data from request Capable
+// Reply blocks and returns the reply data for a Capable request.
func (cook CapableCookie) Reply() (*CapableReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -197,7 +202,7 @@ func (cook CapableCookie) Reply() (*CapableReply, error) {
return capableReply(buf), nil
}
-// Read reply into structure from buffer for Capable
+// capableReply reads a byte slice into a CapableReply value.
func capableReply(buf []byte) *CapableReply {
v := new(CapableReply)
b := 1 // skip reply determinant
@@ -223,6 +228,7 @@ func capableReply(buf []byte) *CapableReply {
}
// Write request to wire for Capable
+// capableRequest writes a Capable request to a byte slice.
func capableRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -240,29 +246,31 @@ func capableRequest(c *xgb.Conn) []byte {
return buf
}
-// Request GetTimeouts
-// size: 4
+// GetTimeoutsCookie is a cookie used only for GetTimeouts requests.
type GetTimeoutsCookie struct {
*xgb.Cookie
}
+// GetTimeouts sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetTimeoutsCookie.Reply()
func GetTimeouts(c *xgb.Conn) GetTimeoutsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getTimeoutsRequest(c), cookie)
return GetTimeoutsCookie{cookie}
}
+// GetTimeoutsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetTimeoutsUnchecked(c *xgb.Conn) GetTimeoutsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getTimeoutsRequest(c), cookie)
return GetTimeoutsCookie{cookie}
}
-// Request reply for GetTimeouts
-// size: 32
+// GetTimeoutsReply represents the data returned from a GetTimeouts request.
type GetTimeoutsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
StandbyTimeout uint16
SuspendTimeout uint16
@@ -270,7 +278,7 @@ type GetTimeoutsReply struct {
// padding: 18 bytes
}
-// Waits and reads reply data from request GetTimeouts
+// Reply blocks and returns the reply data for a GetTimeouts request.
func (cook GetTimeoutsCookie) Reply() (*GetTimeoutsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -282,7 +290,7 @@ func (cook GetTimeoutsCookie) Reply() (*GetTimeoutsReply, error) {
return getTimeoutsReply(buf), nil
}
-// Read reply into structure from buffer for GetTimeouts
+// getTimeoutsReply reads a byte slice into a GetTimeoutsReply value.
func getTimeoutsReply(buf []byte) *GetTimeoutsReply {
v := new(GetTimeoutsReply)
b := 1 // skip reply determinant
@@ -310,6 +318,7 @@ func getTimeoutsReply(buf []byte) *GetTimeoutsReply {
}
// Write request to wire for GetTimeouts
+// getTimeoutsRequest writes a GetTimeouts request to a byte slice.
func getTimeoutsRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -327,30 +336,35 @@ func getTimeoutsRequest(c *xgb.Conn) []byte {
return buf
}
-// Request SetTimeouts
-// size: 12
+// SetTimeoutsCookie is a cookie used only for SetTimeouts requests.
type SetTimeoutsCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetTimeouts
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setTimeoutsRequest(c, StandbyTimeout, SuspendTimeout, OffTimeout), cookie)
return SetTimeoutsCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setTimeoutsRequest(c, StandbyTimeout, SuspendTimeout, OffTimeout), cookie)
return SetTimeoutsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -377,30 +391,35 @@ func setTimeoutsRequest(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint1
return buf
}
-// Request Enable
-// size: 4
+// EnableCookie is a cookie used only for Enable requests.
type EnableCookie struct {
*xgb.Cookie
}
-// Write request to wire for Enable
+// Enable sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Enable(c *xgb.Conn) EnableCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(enableRequest(c), cookie)
return EnableCookie{cookie}
}
+// EnableChecked sends a checked request.
+// If an error occurs, it can be retrieved using EnableCookie.Check()
func EnableChecked(c *xgb.Conn) EnableCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(enableRequest(c), cookie)
return EnableCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook EnableCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Enable
+// enableRequest writes a Enable request to a byte slice.
func enableRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -418,30 +437,35 @@ func enableRequest(c *xgb.Conn) []byte {
return buf
}
-// Request Disable
-// size: 4
+// DisableCookie is a cookie used only for Disable requests.
type DisableCookie struct {
*xgb.Cookie
}
-// Write request to wire for Disable
+// Disable sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Disable(c *xgb.Conn) DisableCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(disableRequest(c), cookie)
return DisableCookie{cookie}
}
+// DisableChecked sends a checked request.
+// If an error occurs, it can be retrieved using DisableCookie.Check()
func DisableChecked(c *xgb.Conn) DisableCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(disableRequest(c), cookie)
return DisableCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DisableCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Disable
+// disableRequest writes a Disable request to a byte slice.
func disableRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -459,30 +483,35 @@ func disableRequest(c *xgb.Conn) []byte {
return buf
}
-// Request ForceLevel
-// size: 8
+// ForceLevelCookie is a cookie used only for ForceLevel requests.
type ForceLevelCookie struct {
*xgb.Cookie
}
-// Write request to wire for ForceLevel
+// ForceLevel sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ForceLevel(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(forceLevelRequest(c, PowerLevel), cookie)
return ForceLevelCookie{cookie}
}
+// ForceLevelChecked sends a checked request.
+// If an error occurs, it can be retrieved using ForceLevelCookie.Check()
func ForceLevelChecked(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(forceLevelRequest(c, PowerLevel), cookie)
return ForceLevelCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ForceLevelCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ForceLevel
+// forceLevelRequest writes a ForceLevel request to a byte slice.
func forceLevelRequest(c *xgb.Conn, PowerLevel uint16) []byte {
size := 8
b := 0
@@ -503,36 +532,38 @@ func forceLevelRequest(c *xgb.Conn, PowerLevel uint16) []byte {
return buf
}
-// Request Info
-// size: 4
+// InfoCookie is a cookie used only for Info requests.
type InfoCookie struct {
*xgb.Cookie
}
+// Info sends a checked request.
+// If an error occurs, it will be returned with the reply by calling InfoCookie.Reply()
func Info(c *xgb.Conn) InfoCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(infoRequest(c), cookie)
return InfoCookie{cookie}
}
+// InfoUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func InfoUnchecked(c *xgb.Conn) InfoCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(infoRequest(c), cookie)
return InfoCookie{cookie}
}
-// Request reply for Info
-// size: 32
+// InfoReply represents the data returned from a Info request.
type InfoReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
PowerLevel uint16
State bool
// padding: 21 bytes
}
-// Waits and reads reply data from request Info
+// Reply blocks and returns the reply data for a Info request.
func (cook InfoCookie) Reply() (*InfoReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -544,7 +575,7 @@ func (cook InfoCookie) Reply() (*InfoReply, error) {
return infoReply(buf), nil
}
-// Read reply into structure from buffer for Info
+// infoReply reads a byte slice into a InfoReply value.
func infoReply(buf []byte) *InfoReply {
v := new(InfoReply)
b := 1 // skip reply determinant
@@ -573,6 +604,7 @@ func infoReply(buf []byte) *InfoReply {
}
// Write request to wire for Info
+// infoRequest writes a Info request to a byte slice.
func infoRequest(c *xgb.Conn) []byte {
size := 4
b := 0
diff --git a/nexgb/dri2/dri2.go b/nexgb/dri2/dri2.go
index c875111..b6398e1 100644
--- a/nexgb/dri2/dri2.go
+++ b/nexgb/dri2/dri2.go
@@ -2,7 +2,7 @@
package dri2
/*
- This file was generated by dri2.xml on May 10 2012 8:04:31pm EDT.
+ This file was generated by dri2.xml on May 10 2012 11:56:18pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,14 +40,6 @@ func init() {
xgb.NewExtErrorFuncs["DRI2"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Char'
-
-// Skipping definition for base type 'Card32'
-
-// Skipping definition for base type 'Double'
-
-// Skipping definition for base type 'Bool'
-
// Skipping definition for base type 'Float'
// Skipping definition for base type 'Card8'
@@ -64,6 +56,14 @@ func init() {
// Skipping definition for base type 'Card16'
+// Skipping definition for base type 'Char'
+
+// Skipping definition for base type 'Card32'
+
+// Skipping definition for base type 'Double'
+
+// Skipping definition for base type 'Bool'
+
const (
AttachmentBufferFrontLeft = 0
AttachmentBufferBackLeft = 1
@@ -89,8 +89,6 @@ const (
EventTypeFlipComplete = 3
)
-// 'DRI2Buffer' struct definition
-// Size: 20
type DRI2Buffer struct {
Attachment uint32
Name uint32
@@ -99,7 +97,7 @@ type DRI2Buffer struct {
Flags uint32
}
-// Struct read DRI2Buffer
+// DRI2BufferRead reads a byte slice into a DRI2Buffer value.
func DRI2BufferRead(buf []byte, v *DRI2Buffer) int {
b := 0
@@ -121,7 +119,7 @@ func DRI2BufferRead(buf []byte, v *DRI2Buffer) int {
return b
}
-// Struct list read DRI2Buffer
+// DRI2BufferReadList reads a byte slice into a list of DRI2Buffer values.
func DRI2BufferReadList(buf []byte, dest []DRI2Buffer) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -131,7 +129,7 @@ func DRI2BufferReadList(buf []byte, dest []DRI2Buffer) int {
return xgb.Pad(b)
}
-// Struct write DRI2Buffer
+// Bytes writes a DRI2Buffer value to a byte slice.
func (v DRI2Buffer) Bytes() []byte {
buf := make([]byte, 20)
b := 0
@@ -154,7 +152,7 @@ func (v DRI2Buffer) Bytes() []byte {
return buf
}
-// Write struct list DRI2Buffer
+// DRI2BufferListBytes writes a list of %s(MISSING) values to a byte slice.
func DRI2BufferListBytes(buf []byte, list []DRI2Buffer) int {
b := 0
var structBytes []byte
@@ -166,14 +164,12 @@ func DRI2BufferListBytes(buf []byte, list []DRI2Buffer) int {
return b
}
-// 'AttachFormat' struct definition
-// Size: 8
type AttachFormat struct {
Attachment uint32
Format uint32
}
-// Struct read AttachFormat
+// AttachFormatRead reads a byte slice into a AttachFormat value.
func AttachFormatRead(buf []byte, v *AttachFormat) int {
b := 0
@@ -186,7 +182,7 @@ func AttachFormatRead(buf []byte, v *AttachFormat) int {
return b
}
-// Struct list read AttachFormat
+// AttachFormatReadList reads a byte slice into a list of AttachFormat values.
func AttachFormatReadList(buf []byte, dest []AttachFormat) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -196,7 +192,7 @@ func AttachFormatReadList(buf []byte, dest []AttachFormat) int {
return xgb.Pad(b)
}
-// Struct write AttachFormat
+// Bytes writes a AttachFormat value to a byte slice.
func (v AttachFormat) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -210,7 +206,7 @@ func (v AttachFormat) Bytes() []byte {
return buf
}
-// Write struct list AttachFormat
+// AttachFormatListBytes writes a list of %s(MISSING) values to a byte slice.
func AttachFormatListBytes(buf []byte, list []AttachFormat) int {
b := 0
var structBytes []byte
@@ -222,9 +218,7 @@ func AttachFormatListBytes(buf []byte, list []AttachFormat) int {
return b
}
-// Event definition BufferSwapComplete (0)
-// Size: 32
-
+// BufferSwapComplete is the event number for a BufferSwapCompleteEvent.
const BufferSwapComplete = 0
type BufferSwapCompleteEvent struct {
@@ -240,7 +234,7 @@ type BufferSwapCompleteEvent struct {
Sbc uint32
}
-// Event read BufferSwapComplete
+// BufferSwapCompleteEventNew constructs a BufferSwapCompleteEvent value that implements xgb.Event from a byte slice.
func BufferSwapCompleteEventNew(buf []byte) xgb.Event {
v := BufferSwapCompleteEvent{}
b := 1 // don't read event number
@@ -276,7 +270,7 @@ func BufferSwapCompleteEventNew(buf []byte) xgb.Event {
return v
}
-// Event write BufferSwapComplete
+// Bytes writes a BufferSwapCompleteEvent value to a byte slice.
func (v BufferSwapCompleteEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -315,12 +309,14 @@ func (v BufferSwapCompleteEvent) Bytes() []byte {
return buf
}
-func (v BufferSwapCompleteEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the BufferSwapComplete event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v BufferSwapCompleteEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of BufferSwapCompleteEvent.
func (v BufferSwapCompleteEvent) String() string {
fieldVals := make([]string, 0, 9)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -338,9 +334,7 @@ func init() {
xgb.NewExtEventFuncs["DRI2"][0] = BufferSwapCompleteEventNew
}
-// Event definition InvalidateBuffers (1)
-// Size: 32
-
+// InvalidateBuffers is the event number for a InvalidateBuffersEvent.
const InvalidateBuffers = 1
type InvalidateBuffersEvent struct {
@@ -349,7 +343,7 @@ type InvalidateBuffersEvent struct {
Drawable xproto.Drawable
}
-// Event read InvalidateBuffers
+// InvalidateBuffersEventNew constructs a InvalidateBuffersEvent value that implements xgb.Event from a byte slice.
func InvalidateBuffersEventNew(buf []byte) xgb.Event {
v := InvalidateBuffersEvent{}
b := 1 // don't read event number
@@ -365,7 +359,7 @@ func InvalidateBuffersEventNew(buf []byte) xgb.Event {
return v
}
-// Event write InvalidateBuffers
+// Bytes writes a InvalidateBuffersEvent value to a byte slice.
func (v InvalidateBuffersEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -384,12 +378,14 @@ func (v InvalidateBuffersEvent) Bytes() []byte {
return buf
}
-func (v InvalidateBuffersEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the InvalidateBuffers event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v InvalidateBuffersEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of InvalidateBuffersEvent.
func (v InvalidateBuffersEvent) String() string {
fieldVals := make([]string, 0, 2)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -401,35 +397,37 @@ func init() {
xgb.NewExtEventFuncs["DRI2"][1] = InvalidateBuffersEventNew
}
-// Request QueryVersion
-// size: 12
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, MajorVersion, MinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, MajorVersion, MinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 16
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint32
MinorVersion uint32
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -441,7 +439,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -464,6 +462,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 12
b := 0
@@ -487,29 +486,31 @@ func queryVersionRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32)
return buf
}
-// Request Connect
-// size: 12
+// ConnectCookie is a cookie used only for Connect requests.
type ConnectCookie struct {
*xgb.Cookie
}
+// Connect sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(connectRequest(c, Window, DriverType), cookie)
return ConnectCookie{cookie}
}
+// ConnectUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ConnectUnchecked(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(connectRequest(c, Window, DriverType), cookie)
return ConnectCookie{cookie}
}
-// Request reply for Connect
-// size: (((32 + xgb.Pad((int(DriverNameLength) * 1))) + xgb.Pad(((((int(DriverNameLength) + 3) & -4) - int(DriverNameLength)) * 1))) + xgb.Pad((int(DeviceNameLength) * 1)))
+// ConnectReply represents the data returned from a Connect request.
type ConnectReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
DriverNameLength uint32
DeviceNameLength uint32
@@ -519,7 +520,7 @@ type ConnectReply struct {
DeviceName string // size: xgb.Pad((int(DeviceNameLength) * 1))
}
-// Waits and reads reply data from request Connect
+// Reply blocks and returns the reply data for a Connect request.
func (cook ConnectCookie) Reply() (*ConnectReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -531,7 +532,7 @@ func (cook ConnectCookie) Reply() (*ConnectReply, error) {
return connectReply(buf), nil
}
-// Read reply into structure from buffer for Connect
+// connectReply reads a byte slice into a ConnectReply value.
func connectReply(buf []byte) *ConnectReply {
v := new(ConnectReply)
b := 1 // skip reply determinant
@@ -574,6 +575,7 @@ func connectReply(buf []byte) *ConnectReply {
}
// Write request to wire for Connect
+// connectRequest writes a Connect request to a byte slice.
func connectRequest(c *xgb.Conn, Window xproto.Window, DriverType uint32) []byte {
size := 12
b := 0
@@ -597,34 +599,36 @@ func connectRequest(c *xgb.Conn, Window xproto.Window, DriverType uint32) []byte
return buf
}
-// Request Authenticate
-// size: 12
+// AuthenticateCookie is a cookie used only for Authenticate requests.
type AuthenticateCookie struct {
*xgb.Cookie
}
+// Authenticate sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(authenticateRequest(c, Window, Magic), cookie)
return AuthenticateCookie{cookie}
}
+// AuthenticateUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func AuthenticateUnchecked(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(authenticateRequest(c, Window, Magic), cookie)
return AuthenticateCookie{cookie}
}
-// Request reply for Authenticate
-// size: 12
+// AuthenticateReply represents the data returned from a Authenticate request.
type AuthenticateReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Authenticated uint32
}
-// Waits and reads reply data from request Authenticate
+// Reply blocks and returns the reply data for a Authenticate request.
func (cook AuthenticateCookie) Reply() (*AuthenticateReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -636,7 +640,7 @@ func (cook AuthenticateCookie) Reply() (*AuthenticateReply, error) {
return authenticateReply(buf), nil
}
-// Read reply into structure from buffer for Authenticate
+// authenticateReply reads a byte slice into a AuthenticateReply value.
func authenticateReply(buf []byte) *AuthenticateReply {
v := new(AuthenticateReply)
b := 1 // skip reply determinant
@@ -656,6 +660,7 @@ func authenticateReply(buf []byte) *AuthenticateReply {
}
// Write request to wire for Authenticate
+// authenticateRequest writes a Authenticate request to a byte slice.
func authenticateRequest(c *xgb.Conn, Window xproto.Window, Magic uint32) []byte {
size := 12
b := 0
@@ -679,30 +684,35 @@ func authenticateRequest(c *xgb.Conn, Window xproto.Window, Magic uint32) []byte
return buf
}
-// Request CreateDrawable
-// size: 8
+// CreateDrawableCookie is a cookie used only for CreateDrawable requests.
type CreateDrawableCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateDrawable
+// CreateDrawable sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateDrawable(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createDrawableRequest(c, Drawable), cookie)
return CreateDrawableCookie{cookie}
}
+// CreateDrawableChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateDrawableCookie.Check()
func CreateDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createDrawableRequest(c, Drawable), cookie)
return CreateDrawableCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateDrawableCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateDrawable
+// createDrawableRequest writes a CreateDrawable request to a byte slice.
func createDrawableRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
size := 8
b := 0
@@ -723,30 +733,35 @@ func createDrawableRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
return buf
}
-// Request DestroyDrawable
-// size: 8
+// DestroyDrawableCookie is a cookie used only for DestroyDrawable requests.
type DestroyDrawableCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyDrawable
+// 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, Drawable xproto.Drawable) DestroyDrawableCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyDrawableRequest(c, Drawable), cookie)
return DestroyDrawableCookie{cookie}
}
+// DestroyDrawableChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyDrawableCookie.Check()
func DestroyDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyDrawableRequest(c, Drawable), cookie)
return DestroyDrawableCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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, Drawable xproto.Drawable) []byte {
size := 8
b := 0
@@ -767,29 +782,31 @@ func destroyDrawableRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
return buf
}
-// Request GetBuffers
-// size: xgb.Pad((12 + xgb.Pad((len(Attachments) * 4))))
+// GetBuffersCookie is a cookie used only for GetBuffers requests.
type GetBuffersCookie struct {
*xgb.Cookie
}
+// GetBuffers sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getBuffersRequest(c, Drawable, Count, Attachments), cookie)
return GetBuffersCookie{cookie}
}
+// GetBuffersUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) GetBuffersCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getBuffersRequest(c, Drawable, Count, Attachments), cookie)
return GetBuffersCookie{cookie}
}
-// Request reply for GetBuffers
-// size: (32 + xgb.Pad((int(Count) * 20)))
+// GetBuffersReply represents the data returned from a GetBuffers request.
type GetBuffersReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Width uint32
Height uint32
@@ -798,7 +815,7 @@ type GetBuffersReply struct {
Buffers []DRI2Buffer // size: xgb.Pad((int(Count) * 20))
}
-// Waits and reads reply data from request GetBuffers
+// Reply blocks and returns the reply data for a GetBuffers request.
func (cook GetBuffersCookie) Reply() (*GetBuffersReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -810,7 +827,7 @@ func (cook GetBuffersCookie) Reply() (*GetBuffersReply, error) {
return getBuffersReply(buf), nil
}
-// Read reply into structure from buffer for GetBuffers
+// getBuffersReply reads a byte slice into a GetBuffersReply value.
func getBuffersReply(buf []byte) *GetBuffersReply {
v := new(GetBuffersReply)
b := 1 // skip reply determinant
@@ -841,6 +858,7 @@ func getBuffersReply(buf []byte) *GetBuffersReply {
}
// Write request to wire for GetBuffers
+// getBuffersRequest writes a GetBuffers request to a byte slice.
func getBuffersRequest(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) []byte {
size := xgb.Pad((12 + xgb.Pad((len(Attachments) * 4))))
b := 0
@@ -870,33 +888,35 @@ func getBuffersRequest(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Atta
return buf
}
-// Request CopyRegion
-// size: 20
+// CopyRegionCookie is a cookie used only for CopyRegion requests.
type CopyRegionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(copyRegionRequest(c, Drawable, Region, Dest, Src), cookie)
return CopyRegionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(copyRegionRequest(c, Drawable, Region, Dest, Src), cookie)
return CopyRegionCookie{cookie}
}
-// Request reply for CopyRegion
-// size: 8
+// CopyRegionReply represents the data returned from a CopyRegion request.
type CopyRegionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
}
-// Waits and reads reply data from request CopyRegion
+// Reply blocks and returns the reply data for a CopyRegion request.
func (cook CopyRegionCookie) Reply() (*CopyRegionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -908,7 +928,7 @@ func (cook CopyRegionCookie) Reply() (*CopyRegionReply, error) {
return copyRegionReply(buf), nil
}
-// Read reply into structure from buffer for CopyRegion
+// copyRegionReply reads a byte slice into a CopyRegionReply value.
func copyRegionReply(buf []byte) *CopyRegionReply {
v := new(CopyRegionReply)
b := 1 // skip reply determinant
@@ -925,6 +945,7 @@ func copyRegionReply(buf []byte) *CopyRegionReply {
}
// 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 {
size := 20
b := 0
@@ -954,29 +975,31 @@ func copyRegionRequest(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Des
return buf
}
-// Request GetBuffersWithFormat
-// size: xgb.Pad((12 + xgb.Pad((len(Attachments) * 8))))
+// GetBuffersWithFormatCookie is a cookie used only for GetBuffersWithFormat requests.
type GetBuffersWithFormatCookie struct {
*xgb.Cookie
}
+// GetBuffersWithFormat sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getBuffersWithFormatRequest(c, Drawable, Count, Attachments), cookie)
return GetBuffersWithFormatCookie{cookie}
}
+// GetBuffersWithFormatUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetBuffersWithFormatUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) GetBuffersWithFormatCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getBuffersWithFormatRequest(c, Drawable, Count, Attachments), cookie)
return GetBuffersWithFormatCookie{cookie}
}
-// Request reply for GetBuffersWithFormat
-// size: (32 + xgb.Pad((int(Count) * 20)))
+// GetBuffersWithFormatReply represents the data returned from a GetBuffersWithFormat request.
type GetBuffersWithFormatReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Width uint32
Height uint32
@@ -985,7 +1008,7 @@ type GetBuffersWithFormatReply struct {
Buffers []DRI2Buffer // size: xgb.Pad((int(Count) * 20))
}
-// Waits and reads reply data from request GetBuffersWithFormat
+// Reply blocks and returns the reply data for a GetBuffersWithFormat request.
func (cook GetBuffersWithFormatCookie) Reply() (*GetBuffersWithFormatReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -997,7 +1020,7 @@ func (cook GetBuffersWithFormatCookie) Reply() (*GetBuffersWithFormatReply, erro
return getBuffersWithFormatReply(buf), nil
}
-// Read reply into structure from buffer for GetBuffersWithFormat
+// getBuffersWithFormatReply reads a byte slice into a GetBuffersWithFormatReply value.
func getBuffersWithFormatReply(buf []byte) *GetBuffersWithFormatReply {
v := new(GetBuffersWithFormatReply)
b := 1 // skip reply determinant
@@ -1028,6 +1051,7 @@ func getBuffersWithFormatReply(buf []byte) *GetBuffersWithFormatReply {
}
// Write request to wire for GetBuffersWithFormat
+// getBuffersWithFormatRequest writes a GetBuffersWithFormat request to a byte slice.
func getBuffersWithFormatRequest(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) []byte {
size := xgb.Pad((12 + xgb.Pad((len(Attachments) * 8))))
b := 0
@@ -1053,35 +1077,37 @@ func getBuffersWithFormatRequest(c *xgb.Conn, Drawable xproto.Drawable, Count ui
return buf
}
-// Request SwapBuffers
-// size: 32
+// SwapBuffersCookie is a cookie used only for SwapBuffers requests.
type SwapBuffersCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(swapBuffersRequest(c, Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie)
return SwapBuffersCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(swapBuffersRequest(c, Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie)
return SwapBuffersCookie{cookie}
}
-// Request reply for SwapBuffers
-// size: 16
+// SwapBuffersReply represents the data returned from a SwapBuffers request.
type SwapBuffersReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
SwapHi uint32
SwapLo uint32
}
-// Waits and reads reply data from request SwapBuffers
+// Reply blocks and returns the reply data for a SwapBuffers request.
func (cook SwapBuffersCookie) Reply() (*SwapBuffersReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1093,7 +1119,7 @@ func (cook SwapBuffersCookie) Reply() (*SwapBuffersReply, error) {
return swapBuffersReply(buf), nil
}
-// Read reply into structure from buffer for SwapBuffers
+// swapBuffersReply reads a byte slice into a SwapBuffersReply value.
func swapBuffersReply(buf []byte) *SwapBuffersReply {
v := new(SwapBuffersReply)
b := 1 // skip reply determinant
@@ -1116,6 +1142,7 @@ func swapBuffersReply(buf []byte) *SwapBuffersReply {
}
// 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 {
size := 32
b := 0
@@ -1154,29 +1181,31 @@ func swapBuffersRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint3
return buf
}
-// Request GetMSC
-// size: 8
+// GetMSCCookie is a cookie used only for GetMSC requests.
type GetMSCCookie struct {
*xgb.Cookie
}
+// GetMSC sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetMSCCookie.Reply()
func GetMSC(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getMSCRequest(c, Drawable), cookie)
return GetMSCCookie{cookie}
}
+// GetMSCUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getMSCRequest(c, Drawable), cookie)
return GetMSCCookie{cookie}
}
-// Request reply for GetMSC
-// size: 32
+// GetMSCReply represents the data returned from a GetMSC request.
type GetMSCReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
UstHi uint32
UstLo uint32
@@ -1186,7 +1215,7 @@ type GetMSCReply struct {
SbcLo uint32
}
-// Waits and reads reply data from request GetMSC
+// Reply blocks and returns the reply data for a GetMSC request.
func (cook GetMSCCookie) Reply() (*GetMSCReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1198,7 +1227,7 @@ func (cook GetMSCCookie) Reply() (*GetMSCReply, error) {
return getMSCReply(buf), nil
}
-// Read reply into structure from buffer for GetMSC
+// getMSCReply reads a byte slice into a GetMSCReply value.
func getMSCReply(buf []byte) *GetMSCReply {
v := new(GetMSCReply)
b := 1 // skip reply determinant
@@ -1233,6 +1262,7 @@ func getMSCReply(buf []byte) *GetMSCReply {
}
// Write request to wire for GetMSC
+// getMSCRequest writes a GetMSC request to a byte slice.
func getMSCRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
size := 8
b := 0
@@ -1253,29 +1283,31 @@ func getMSCRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
return buf
}
-// Request WaitMSC
-// size: 32
+// WaitMSCCookie is a cookie used only for WaitMSC requests.
type WaitMSCCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(waitMSCRequest(c, Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie)
return WaitMSCCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(waitMSCRequest(c, Drawable, TargetMscHi, TargetMscLo, DivisorHi, DivisorLo, RemainderHi, RemainderLo), cookie)
return WaitMSCCookie{cookie}
}
-// Request reply for WaitMSC
-// size: 32
+// WaitMSCReply represents the data returned from a WaitMSC request.
type WaitMSCReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
UstHi uint32
UstLo uint32
@@ -1285,7 +1317,7 @@ type WaitMSCReply struct {
SbcLo uint32
}
-// Waits and reads reply data from request WaitMSC
+// Reply blocks and returns the reply data for a WaitMSC request.
func (cook WaitMSCCookie) Reply() (*WaitMSCReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1297,7 +1329,7 @@ func (cook WaitMSCCookie) Reply() (*WaitMSCReply, error) {
return waitMSCReply(buf), nil
}
-// Read reply into structure from buffer for WaitMSC
+// waitMSCReply reads a byte slice into a WaitMSCReply value.
func waitMSCReply(buf []byte) *WaitMSCReply {
v := new(WaitMSCReply)
b := 1 // skip reply determinant
@@ -1332,6 +1364,7 @@ func waitMSCReply(buf []byte) *WaitMSCReply {
}
// 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 {
size := 32
b := 0
@@ -1370,29 +1403,31 @@ func waitMSCRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, T
return buf
}
-// Request WaitSBC
-// size: 16
+// WaitSBCCookie is a cookie used only for WaitSBC requests.
type WaitSBCCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(waitSBCRequest(c, Drawable, TargetSbcHi, TargetSbcLo), cookie)
return WaitSBCCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(waitSBCRequest(c, Drawable, TargetSbcHi, TargetSbcLo), cookie)
return WaitSBCCookie{cookie}
}
-// Request reply for WaitSBC
-// size: 32
+// WaitSBCReply represents the data returned from a WaitSBC request.
type WaitSBCReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
UstHi uint32
UstLo uint32
@@ -1402,7 +1437,7 @@ type WaitSBCReply struct {
SbcLo uint32
}
-// Waits and reads reply data from request WaitSBC
+// Reply blocks and returns the reply data for a WaitSBC request.
func (cook WaitSBCCookie) Reply() (*WaitSBCReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1414,7 +1449,7 @@ func (cook WaitSBCCookie) Reply() (*WaitSBCReply, error) {
return waitSBCReply(buf), nil
}
-// Read reply into structure from buffer for WaitSBC
+// waitSBCReply reads a byte slice into a WaitSBCReply value.
func waitSBCReply(buf []byte) *WaitSBCReply {
v := new(WaitSBCReply)
b := 1 // skip reply determinant
@@ -1449,6 +1484,7 @@ func waitSBCReply(buf []byte) *WaitSBCReply {
}
// 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 {
size := 16
b := 0
@@ -1475,30 +1511,35 @@ func waitSBCRequest(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, T
return buf
}
-// Request SwapInterval
-// size: 12
+// SwapIntervalCookie is a cookie used only for SwapInterval requests.
type SwapIntervalCookie struct {
*xgb.Cookie
}
-// Write request to wire for SwapInterval
+// SwapInterval sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SwapInterval(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(swapIntervalRequest(c, Drawable, Interval), cookie)
return SwapIntervalCookie{cookie}
}
+// SwapIntervalChecked sends a checked request.
+// If an error occurs, it can be retrieved using SwapIntervalCookie.Check()
func SwapIntervalChecked(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(swapIntervalRequest(c, Drawable, Interval), cookie)
return SwapIntervalCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SwapIntervalCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SwapInterval
+// swapIntervalRequest writes a SwapInterval request to a byte slice.
func swapIntervalRequest(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) []byte {
size := 12
b := 0
diff --git a/nexgb/ge/ge.go b/nexgb/ge/ge.go
index 5bb11fa..21fdb4b 100644
--- a/nexgb/ge/ge.go
+++ b/nexgb/ge/ge.go
@@ -2,7 +2,7 @@
package ge
/*
- This file was generated by ge.xml on May 10 2012 8:04:31pm EDT.
+ This file was generated by ge.xml on May 10 2012 11:56:18pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,10 +40,6 @@ func init() {
xgb.NewExtErrorFuncs["Generic Event Extension"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Card8'
-
-// Skipping definition for base type 'Int16'
-
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
@@ -64,36 +60,42 @@ func init() {
// Skipping definition for base type 'Float'
-// Request QueryVersion
-// size: 8
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Int16'
+
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 32
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint16
MinorVersion uint16
// padding: 20 bytes
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -105,7 +107,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -130,6 +132,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 8
b := 0
diff --git a/nexgb/glx/glx.go b/nexgb/glx/glx.go
index 887d96b..d351137 100644
--- a/nexgb/glx/glx.go
+++ b/nexgb/glx/glx.go
@@ -2,7 +2,7 @@
package glx
/*
- This file was generated by glx.xml on May 10 2012 8:04:31pm EDT.
+ This file was generated by glx.xml on May 10 2012 11:56:18pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,6 +40,12 @@ func init() {
xgb.NewExtErrorFuncs["GLX"] = make(map[int]xgb.NewErrorFun)
}
+// Skipping definition for base type 'Card32'
+
+// Skipping definition for base type 'Double'
+
+// Skipping definition for base type 'Bool'
+
// Skipping definition for base type 'Float'
// Skipping definition for base type 'Card8'
@@ -58,12 +64,6 @@ func init() {
// Skipping definition for base type 'Char'
-// Skipping definition for base type 'Card32'
-
-// Skipping definition for base type 'Double'
-
-// Skipping definition for base type 'Bool'
-
const (
PbcetDamaged = 32791
PbcetSaved = 32792
@@ -172,9 +172,7 @@ type Bool32 uint32
type ContextTag uint32
-// Event definition PbufferClobber (0)
-// Size: 32
-
+// PbufferClobber is the event number for a PbufferClobberEvent.
const PbufferClobber = 0
type PbufferClobberEvent struct {
@@ -193,7 +191,7 @@ type PbufferClobberEvent struct {
// padding: 4 bytes
}
-// Event read PbufferClobber
+// PbufferClobberEventNew constructs a PbufferClobberEvent value that implements xgb.Event from a byte slice.
func PbufferClobberEventNew(buf []byte) xgb.Event {
v := PbufferClobberEvent{}
b := 1 // don't read event number
@@ -238,7 +236,7 @@ func PbufferClobberEventNew(buf []byte) xgb.Event {
return v
}
-// Event write PbufferClobber
+// Bytes writes a PbufferClobberEvent value to a byte slice.
func (v PbufferClobberEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -286,12 +284,14 @@ func (v PbufferClobberEvent) Bytes() []byte {
return buf
}
-func (v PbufferClobberEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the PbufferClobber event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v PbufferClobberEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of PbufferClobberEvent.
func (v PbufferClobberEvent) String() string {
fieldVals := make([]string, 0, 12)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -312,9 +312,7 @@ func init() {
xgb.NewExtEventFuncs["GLX"][0] = PbufferClobberEventNew
}
-// Error definition Generic (-1)
-// Size: 32
-
+// BadGeneric is the error number for a BadGeneric.
const BadGeneric = -1
type GenericError struct {
@@ -326,7 +324,7 @@ type GenericError struct {
// padding: 21 bytes
}
-// Error read Generic
+// GenericErrorNew constructs a GenericError value that implements xgb.Error from a byte slice.
func GenericErrorNew(buf []byte) xgb.Error {
v := GenericError{}
v.NiceName = "Generic"
@@ -351,8 +349,8 @@ func GenericErrorNew(buf []byte) xgb.Error {
return v
}
-func (err GenericError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadGeneric error.
+// This is mostly used internally.
func (err GenericError) SequenceId() uint16 {
return err.Sequence
}
@@ -375,20 +373,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][-1] = GenericErrorNew
}
-// ErrorCopy definition BadContext (0)
-
+// BadBadContext is the error number for a BadBadContext.
const BadBadContext = 0
type BadContextError GenericError
+// BadContextErrorNew constructs a BadContextError value that implements xgb.Error from a byte slice.
func BadContextErrorNew(buf []byte) xgb.Error {
v := BadContextError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadContext"
return v
}
-func (err BadContextError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadContext error.
+// This is mostly used internally.
func (err BadContextError) SequenceId() uint16 {
return err.Sequence
}
@@ -411,20 +409,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][0] = BadContextErrorNew
}
-// ErrorCopy definition BadContextState (1)
-
+// BadBadContextState is the error number for a BadBadContextState.
const BadBadContextState = 1
type BadContextStateError GenericError
+// BadContextStateErrorNew constructs a BadContextStateError value that implements xgb.Error from a byte slice.
func BadContextStateErrorNew(buf []byte) xgb.Error {
v := BadContextStateError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadContextState"
return v
}
-func (err BadContextStateError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadContextState error.
+// This is mostly used internally.
func (err BadContextStateError) SequenceId() uint16 {
return err.Sequence
}
@@ -447,20 +445,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][1] = BadContextStateErrorNew
}
-// ErrorCopy definition BadDrawable (2)
-
+// BadBadDrawable is the error number for a BadBadDrawable.
const BadBadDrawable = 2
type BadDrawableError GenericError
+// BadDrawableErrorNew constructs a BadDrawableError value that implements xgb.Error from a byte slice.
func BadDrawableErrorNew(buf []byte) xgb.Error {
v := BadDrawableError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadDrawable"
return v
}
-func (err BadDrawableError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadDrawable error.
+// This is mostly used internally.
func (err BadDrawableError) SequenceId() uint16 {
return err.Sequence
}
@@ -483,20 +481,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][2] = BadDrawableErrorNew
}
-// ErrorCopy definition BadPixmap (3)
-
+// BadBadPixmap is the error number for a BadBadPixmap.
const BadBadPixmap = 3
type BadPixmapError GenericError
+// BadPixmapErrorNew constructs a BadPixmapError value that implements xgb.Error from a byte slice.
func BadPixmapErrorNew(buf []byte) xgb.Error {
v := BadPixmapError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadPixmap"
return v
}
-func (err BadPixmapError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadPixmap error.
+// This is mostly used internally.
func (err BadPixmapError) SequenceId() uint16 {
return err.Sequence
}
@@ -519,20 +517,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][3] = BadPixmapErrorNew
}
-// ErrorCopy definition BadContextTag (4)
-
+// BadBadContextTag is the error number for a BadBadContextTag.
const BadBadContextTag = 4
type BadContextTagError GenericError
+// BadContextTagErrorNew constructs a BadContextTagError value that implements xgb.Error from a byte slice.
func BadContextTagErrorNew(buf []byte) xgb.Error {
v := BadContextTagError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadContextTag"
return v
}
-func (err BadContextTagError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadContextTag error.
+// This is mostly used internally.
func (err BadContextTagError) SequenceId() uint16 {
return err.Sequence
}
@@ -555,20 +553,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][4] = BadContextTagErrorNew
}
-// ErrorCopy definition BadCurrentWindow (5)
-
+// BadBadCurrentWindow is the error number for a BadBadCurrentWindow.
const BadBadCurrentWindow = 5
type BadCurrentWindowError GenericError
+// BadCurrentWindowErrorNew constructs a BadCurrentWindowError value that implements xgb.Error from a byte slice.
func BadCurrentWindowErrorNew(buf []byte) xgb.Error {
v := BadCurrentWindowError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadCurrentWindow"
return v
}
-func (err BadCurrentWindowError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadCurrentWindow error.
+// This is mostly used internally.
func (err BadCurrentWindowError) SequenceId() uint16 {
return err.Sequence
}
@@ -591,20 +589,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][5] = BadCurrentWindowErrorNew
}
-// ErrorCopy definition BadRenderRequest (6)
-
+// BadBadRenderRequest is the error number for a BadBadRenderRequest.
const BadBadRenderRequest = 6
type BadRenderRequestError GenericError
+// BadRenderRequestErrorNew constructs a BadRenderRequestError value that implements xgb.Error from a byte slice.
func BadRenderRequestErrorNew(buf []byte) xgb.Error {
v := BadRenderRequestError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadRenderRequest"
return v
}
-func (err BadRenderRequestError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadRenderRequest error.
+// This is mostly used internally.
func (err BadRenderRequestError) SequenceId() uint16 {
return err.Sequence
}
@@ -627,20 +625,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][6] = BadRenderRequestErrorNew
}
-// ErrorCopy definition BadLargeRequest (7)
-
+// BadBadLargeRequest is the error number for a BadBadLargeRequest.
const BadBadLargeRequest = 7
type BadLargeRequestError GenericError
+// BadLargeRequestErrorNew constructs a BadLargeRequestError value that implements xgb.Error from a byte slice.
func BadLargeRequestErrorNew(buf []byte) xgb.Error {
v := BadLargeRequestError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadLargeRequest"
return v
}
-func (err BadLargeRequestError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadLargeRequest error.
+// This is mostly used internally.
func (err BadLargeRequestError) SequenceId() uint16 {
return err.Sequence
}
@@ -663,20 +661,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][7] = BadLargeRequestErrorNew
}
-// ErrorCopy definition UnsupportedPrivateRequest (8)
-
+// BadUnsupportedPrivateRequest is the error number for a BadUnsupportedPrivateRequest.
const BadUnsupportedPrivateRequest = 8
type UnsupportedPrivateRequestError GenericError
+// UnsupportedPrivateRequestErrorNew constructs a UnsupportedPrivateRequestError value that implements xgb.Error from a byte slice.
func UnsupportedPrivateRequestErrorNew(buf []byte) xgb.Error {
v := UnsupportedPrivateRequestError(GenericErrorNew(buf).(GenericError))
v.NiceName = "UnsupportedPrivateRequest"
return v
}
-func (err UnsupportedPrivateRequestError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadUnsupportedPrivateRequest error.
+// This is mostly used internally.
func (err UnsupportedPrivateRequestError) SequenceId() uint16 {
return err.Sequence
}
@@ -699,20 +697,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][8] = UnsupportedPrivateRequestErrorNew
}
-// ErrorCopy definition BadFBConfig (9)
-
+// BadBadFBConfig is the error number for a BadBadFBConfig.
const BadBadFBConfig = 9
type BadFBConfigError GenericError
+// BadFBConfigErrorNew constructs a BadFBConfigError value that implements xgb.Error from a byte slice.
func BadFBConfigErrorNew(buf []byte) xgb.Error {
v := BadFBConfigError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadFBConfig"
return v
}
-func (err BadFBConfigError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadFBConfig error.
+// This is mostly used internally.
func (err BadFBConfigError) SequenceId() uint16 {
return err.Sequence
}
@@ -735,20 +733,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][9] = BadFBConfigErrorNew
}
-// ErrorCopy definition BadPbuffer (10)
-
+// BadBadPbuffer is the error number for a BadBadPbuffer.
const BadBadPbuffer = 10
type BadPbufferError GenericError
+// BadPbufferErrorNew constructs a BadPbufferError value that implements xgb.Error from a byte slice.
func BadPbufferErrorNew(buf []byte) xgb.Error {
v := BadPbufferError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadPbuffer"
return v
}
-func (err BadPbufferError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadPbuffer error.
+// This is mostly used internally.
func (err BadPbufferError) SequenceId() uint16 {
return err.Sequence
}
@@ -771,20 +769,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][10] = BadPbufferErrorNew
}
-// ErrorCopy definition BadCurrentDrawable (11)
-
+// BadBadCurrentDrawable is the error number for a BadBadCurrentDrawable.
const BadBadCurrentDrawable = 11
type BadCurrentDrawableError GenericError
+// BadCurrentDrawableErrorNew constructs a BadCurrentDrawableError value that implements xgb.Error from a byte slice.
func BadCurrentDrawableErrorNew(buf []byte) xgb.Error {
v := BadCurrentDrawableError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadCurrentDrawable"
return v
}
-func (err BadCurrentDrawableError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadCurrentDrawable error.
+// This is mostly used internally.
func (err BadCurrentDrawableError) SequenceId() uint16 {
return err.Sequence
}
@@ -807,20 +805,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][11] = BadCurrentDrawableErrorNew
}
-// ErrorCopy definition BadWindow (12)
-
+// BadBadWindow is the error number for a BadBadWindow.
const BadBadWindow = 12
type BadWindowError GenericError
+// BadWindowErrorNew constructs a BadWindowError value that implements xgb.Error from a byte slice.
func BadWindowErrorNew(buf []byte) xgb.Error {
v := BadWindowError(GenericErrorNew(buf).(GenericError))
v.NiceName = "BadWindow"
return v
}
-func (err BadWindowError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadWindow error.
+// This is mostly used internally.
func (err BadWindowError) SequenceId() uint16 {
return err.Sequence
}
@@ -843,20 +841,20 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][12] = BadWindowErrorNew
}
-// ErrorCopy definition GLXBadProfileARB (13)
-
+// BadGLXBadProfileARB is the error number for a BadGLXBadProfileARB.
const BadGLXBadProfileARB = 13
type GLXBadProfileARBError GenericError
+// GLXBadProfileARBErrorNew constructs a GLXBadProfileARBError value that implements xgb.Error from a byte slice.
func GLXBadProfileARBErrorNew(buf []byte) xgb.Error {
v := GLXBadProfileARBError(GenericErrorNew(buf).(GenericError))
v.NiceName = "GLXBadProfileARB"
return v
}
-func (err GLXBadProfileARBError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadGLXBadProfileARB error.
+// This is mostly used internally.
func (err GLXBadProfileARBError) SequenceId() uint16 {
return err.Sequence
}
@@ -879,30 +877,35 @@ func init() {
xgb.NewExtErrorFuncs["GLX"][13] = GLXBadProfileARBErrorNew
}
-// Request Render
-// size: xgb.Pad((8 + xgb.Pad((len(Data) * 1))))
+// RenderCookie is a cookie used only for Render requests.
type RenderCookie struct {
*xgb.Cookie
}
-// Write request to wire for Render
+// Render sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Render(c *xgb.Conn, ContextTag ContextTag, Data []byte) RenderCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(renderRequest(c, ContextTag, Data), cookie)
return RenderCookie{cookie}
}
+// RenderChecked sends a checked request.
+// If an error occurs, it can be retrieved using RenderCookie.Check()
func RenderChecked(c *xgb.Conn, ContextTag ContextTag, Data []byte) RenderCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(renderRequest(c, ContextTag, Data), cookie)
return RenderCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook RenderCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Render
+// renderRequest writes a Render request to a byte slice.
func renderRequest(c *xgb.Conn, ContextTag ContextTag, Data []byte) []byte {
size := xgb.Pad((8 + xgb.Pad((len(Data) * 1))))
b := 0
@@ -926,30 +929,35 @@ func renderRequest(c *xgb.Conn, ContextTag ContextTag, Data []byte) []byte {
return buf
}
-// Request RenderLarge
-// size: xgb.Pad((16 + xgb.Pad((int(DataLen) * 1))))
+// RenderLargeCookie is a cookie used only for RenderLarge requests.
type RenderLargeCookie struct {
*xgb.Cookie
}
-// Write request to wire for RenderLarge
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(renderLargeRequest(c, ContextTag, RequestNum, RequestTotal, DataLen, Data), cookie)
return RenderLargeCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(renderLargeRequest(c, ContextTag, RequestNum, RequestTotal, DataLen, Data), cookie)
return RenderLargeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((16 + xgb.Pad((int(DataLen) * 1))))
b := 0
@@ -982,30 +990,35 @@ func renderLargeRequest(c *xgb.Conn, ContextTag ContextTag, RequestNum uint16, R
return buf
}
-// Request CreateContext
-// size: 24
+// CreateContextCookie is a cookie used only for CreateContext requests.
type CreateContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateContext
+// 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, Visual xproto.Visualid, Screen uint32, ShareList Context, IsDirect bool) CreateContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createContextRequest(c, Context, Visual, Screen, ShareList, IsDirect), cookie)
return CreateContextCookie{cookie}
}
+// CreateContextChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createContextRequest(c, Context, Visual, Screen, ShareList, IsDirect), cookie)
return CreateContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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, Visual xproto.Visualid, Screen uint32, ShareList Context, IsDirect bool) []byte {
size := 24
b := 0
@@ -1044,30 +1057,35 @@ func createContextRequest(c *xgb.Conn, Context Context, Visual xproto.Visualid,
return buf
}
-// Request DestroyContext
-// size: 8
+// DestroyContextCookie is a cookie used only for DestroyContext requests.
type DestroyContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyContext
+// 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, Context Context) DestroyContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyContextRequest(c, Context), cookie)
return DestroyContextCookie{cookie}
}
+// DestroyContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyContextCookie.Check()
func DestroyContextChecked(c *xgb.Conn, Context Context) DestroyContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyContextRequest(c, Context), cookie)
return DestroyContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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, Context Context) []byte {
size := 8
b := 0
@@ -1088,35 +1106,37 @@ func destroyContextRequest(c *xgb.Conn, Context Context) []byte {
return buf
}
-// Request MakeCurrent
-// size: 16
+// MakeCurrentCookie is a cookie used only for MakeCurrent requests.
type MakeCurrentCookie struct {
*xgb.Cookie
}
+// MakeCurrent sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(makeCurrentRequest(c, Drawable, Context, OldContextTag), cookie)
return MakeCurrentCookie{cookie}
}
+// MakeCurrentUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func MakeCurrentUnchecked(c *xgb.Conn, Drawable Drawable, Context Context, OldContextTag ContextTag) MakeCurrentCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(makeCurrentRequest(c, Drawable, Context, OldContextTag), cookie)
return MakeCurrentCookie{cookie}
}
-// Request reply for MakeCurrent
-// size: 32
+// MakeCurrentReply represents the data returned from a MakeCurrent request.
type MakeCurrentReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextTag ContextTag
// padding: 20 bytes
}
-// Waits and reads reply data from request MakeCurrent
+// Reply blocks and returns the reply data for a MakeCurrent request.
func (cook MakeCurrentCookie) Reply() (*MakeCurrentReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1128,7 +1148,7 @@ func (cook MakeCurrentCookie) Reply() (*MakeCurrentReply, error) {
return makeCurrentReply(buf), nil
}
-// Read reply into structure from buffer for MakeCurrent
+// makeCurrentReply reads a byte slice into a MakeCurrentReply value.
func makeCurrentReply(buf []byte) *MakeCurrentReply {
v := new(MakeCurrentReply)
b := 1 // skip reply determinant
@@ -1150,6 +1170,7 @@ func makeCurrentReply(buf []byte) *MakeCurrentReply {
}
// Write request to wire for MakeCurrent
+// makeCurrentRequest writes a MakeCurrent request to a byte slice.
func makeCurrentRequest(c *xgb.Conn, Drawable Drawable, Context Context, OldContextTag ContextTag) []byte {
size := 16
b := 0
@@ -1176,35 +1197,37 @@ func makeCurrentRequest(c *xgb.Conn, Drawable Drawable, Context Context, OldCont
return buf
}
-// Request IsDirect
-// size: 8
+// IsDirectCookie is a cookie used only for IsDirect requests.
type IsDirectCookie struct {
*xgb.Cookie
}
+// IsDirect sends a checked request.
+// If an error occurs, it will be returned with the reply by calling IsDirectCookie.Reply()
func IsDirect(c *xgb.Conn, Context Context) IsDirectCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(isDirectRequest(c, Context), cookie)
return IsDirectCookie{cookie}
}
+// IsDirectUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func IsDirectUnchecked(c *xgb.Conn, Context Context) IsDirectCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(isDirectRequest(c, Context), cookie)
return IsDirectCookie{cookie}
}
-// Request reply for IsDirect
-// size: 32
+// IsDirectReply represents the data returned from a IsDirect request.
type IsDirectReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
IsDirect bool
// padding: 23 bytes
}
-// Waits and reads reply data from request IsDirect
+// Reply blocks and returns the reply data for a IsDirect request.
func (cook IsDirectCookie) Reply() (*IsDirectReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1216,7 +1239,7 @@ func (cook IsDirectCookie) Reply() (*IsDirectReply, error) {
return isDirectReply(buf), nil
}
-// Read reply into structure from buffer for IsDirect
+// isDirectReply reads a byte slice into a IsDirectReply value.
func isDirectReply(buf []byte) *IsDirectReply {
v := new(IsDirectReply)
b := 1 // skip reply determinant
@@ -1242,6 +1265,7 @@ func isDirectReply(buf []byte) *IsDirectReply {
}
// Write request to wire for IsDirect
+// isDirectRequest writes a IsDirect request to a byte slice.
func isDirectRequest(c *xgb.Conn, Context Context) []byte {
size := 8
b := 0
@@ -1262,36 +1286,38 @@ func isDirectRequest(c *xgb.Conn, Context Context) []byte {
return buf
}
-// Request QueryVersion
-// size: 12
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, MajorVersion, MinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, MajorVersion, MinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 32
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint32
MinorVersion uint32
// padding: 16 bytes
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1303,7 +1329,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -1328,6 +1354,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 12
b := 0
@@ -1351,30 +1378,35 @@ func queryVersionRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32)
return buf
}
-// Request WaitGL
-// size: 8
+// WaitGLCookie is a cookie used only for WaitGL requests.
type WaitGLCookie struct {
*xgb.Cookie
}
-// Write request to wire for WaitGL
+// WaitGL sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func WaitGL(c *xgb.Conn, ContextTag ContextTag) WaitGLCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(waitGLRequest(c, ContextTag), cookie)
return WaitGLCookie{cookie}
}
+// WaitGLChecked sends a checked request.
+// If an error occurs, it can be retrieved using WaitGLCookie.Check()
func WaitGLChecked(c *xgb.Conn, ContextTag ContextTag) WaitGLCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(waitGLRequest(c, ContextTag), cookie)
return WaitGLCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook WaitGLCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for WaitGL
+// waitGLRequest writes a WaitGL request to a byte slice.
func waitGLRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
size := 8
b := 0
@@ -1395,30 +1427,35 @@ func waitGLRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
return buf
}
-// Request WaitX
-// size: 8
+// WaitXCookie is a cookie used only for WaitX requests.
type WaitXCookie struct {
*xgb.Cookie
}
-// Write request to wire for WaitX
+// WaitX sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func WaitX(c *xgb.Conn, ContextTag ContextTag) WaitXCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(waitXRequest(c, ContextTag), cookie)
return WaitXCookie{cookie}
}
+// WaitXChecked sends a checked request.
+// If an error occurs, it can be retrieved using WaitXCookie.Check()
func WaitXChecked(c *xgb.Conn, ContextTag ContextTag) WaitXCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(waitXRequest(c, ContextTag), cookie)
return WaitXCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook WaitXCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for WaitX
+// waitXRequest writes a WaitX request to a byte slice.
func waitXRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
size := 8
b := 0
@@ -1439,30 +1476,35 @@ func waitXRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
return buf
}
-// Request CopyContext
-// size: 20
+// CopyContextCookie is a cookie used only for CopyContext requests.
type CopyContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for CopyContext
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(copyContextRequest(c, Src, Dest, Mask, SrcContextTag), cookie)
return CopyContextCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(copyContextRequest(c, Src, Dest, Mask, SrcContextTag), cookie)
return CopyContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 20
b := 0
@@ -1492,30 +1534,35 @@ func copyContextRequest(c *xgb.Conn, Src Context, Dest Context, Mask uint32, Src
return buf
}
-// Request SwapBuffers
-// size: 12
+// SwapBuffersCookie is a cookie used only for SwapBuffers requests.
type SwapBuffersCookie struct {
*xgb.Cookie
}
-// Write request to wire for SwapBuffers
+// SwapBuffers sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SwapBuffers(c *xgb.Conn, ContextTag ContextTag, Drawable Drawable) SwapBuffersCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(swapBuffersRequest(c, ContextTag, Drawable), cookie)
return SwapBuffersCookie{cookie}
}
+// SwapBuffersChecked sends a checked request.
+// If an error occurs, it can be retrieved using SwapBuffersCookie.Check()
func SwapBuffersChecked(c *xgb.Conn, ContextTag ContextTag, Drawable Drawable) SwapBuffersCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(swapBuffersRequest(c, ContextTag, Drawable), cookie)
return SwapBuffersCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SwapBuffersCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SwapBuffers
+// swapBuffersRequest writes a SwapBuffers request to a byte slice.
func swapBuffersRequest(c *xgb.Conn, ContextTag ContextTag, Drawable Drawable) []byte {
size := 12
b := 0
@@ -1539,30 +1586,35 @@ func swapBuffersRequest(c *xgb.Conn, ContextTag ContextTag, Drawable Drawable) [
return buf
}
-// Request UseXFont
-// size: 24
+// UseXFontCookie is a cookie used only for UseXFont requests.
type UseXFontCookie struct {
*xgb.Cookie
}
-// Write request to wire for UseXFont
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(useXFontRequest(c, ContextTag, Font, First, Count, ListBase), cookie)
return UseXFontCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(useXFontRequest(c, ContextTag, Font, First, Count, ListBase), cookie)
return UseXFontCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 24
b := 0
@@ -1595,30 +1647,35 @@ func useXFontRequest(c *xgb.Conn, ContextTag ContextTag, Font xproto.Font, First
return buf
}
-// Request CreateGLXPixmap
-// size: 20
+// CreateGLXPixmapCookie is a cookie used only for CreateGLXPixmap requests.
type CreateGLXPixmapCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateGLXPixmap
+// CreateGLXPixmap sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateGLXPixmap(c *xgb.Conn, Screen uint32, Visual xproto.Visualid, Pixmap xproto.Pixmap, GlxPixmap Pixmap) CreateGLXPixmapCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createGLXPixmapRequest(c, Screen, Visual, Pixmap, GlxPixmap), cookie)
return CreateGLXPixmapCookie{cookie}
}
+// CreateGLXPixmapChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createGLXPixmapRequest(c, Screen, Visual, Pixmap, GlxPixmap), cookie)
return CreateGLXPixmapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateGLXPixmapCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateGLXPixmap
+// createGLXPixmapRequest writes a CreateGLXPixmap request to a byte slice.
func createGLXPixmapRequest(c *xgb.Conn, Screen uint32, Visual xproto.Visualid, Pixmap xproto.Pixmap, GlxPixmap Pixmap) []byte {
size := 20
b := 0
@@ -1648,29 +1705,31 @@ func createGLXPixmapRequest(c *xgb.Conn, Screen uint32, Visual xproto.Visualid,
return buf
}
-// Request GetVisualConfigs
-// size: 8
+// GetVisualConfigsCookie is a cookie used only for GetVisualConfigs requests.
type GetVisualConfigsCookie struct {
*xgb.Cookie
}
+// GetVisualConfigs sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetVisualConfigsCookie.Reply()
func GetVisualConfigs(c *xgb.Conn, Screen uint32) GetVisualConfigsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getVisualConfigsRequest(c, Screen), cookie)
return GetVisualConfigsCookie{cookie}
}
+// GetVisualConfigsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetVisualConfigsUnchecked(c *xgb.Conn, Screen uint32) GetVisualConfigsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getVisualConfigsRequest(c, Screen), cookie)
return GetVisualConfigsCookie{cookie}
}
-// Request reply for GetVisualConfigs
-// size: (32 + xgb.Pad((int(Length) * 4)))
+// GetVisualConfigsReply represents the data returned from a GetVisualConfigs request.
type GetVisualConfigsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumVisuals uint32
NumProperties uint32
@@ -1678,7 +1737,7 @@ type GetVisualConfigsReply struct {
PropertyList []uint32 // size: xgb.Pad((int(Length) * 4))
}
-// Waits and reads reply data from request GetVisualConfigs
+// Reply blocks and returns the reply data for a GetVisualConfigs request.
func (cook GetVisualConfigsCookie) Reply() (*GetVisualConfigsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1690,7 +1749,7 @@ func (cook GetVisualConfigsCookie) Reply() (*GetVisualConfigsReply, error) {
return getVisualConfigsReply(buf), nil
}
-// Read reply into structure from buffer for GetVisualConfigs
+// getVisualConfigsReply reads a byte slice into a GetVisualConfigsReply value.
func getVisualConfigsReply(buf []byte) *GetVisualConfigsReply {
v := new(GetVisualConfigsReply)
b := 1 // skip reply determinant
@@ -1722,6 +1781,7 @@ func getVisualConfigsReply(buf []byte) *GetVisualConfigsReply {
}
// Write request to wire for GetVisualConfigs
+// getVisualConfigsRequest writes a GetVisualConfigs request to a byte slice.
func getVisualConfigsRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
@@ -1742,30 +1802,35 @@ func getVisualConfigsRequest(c *xgb.Conn, Screen uint32) []byte {
return buf
}
-// Request DestroyGLXPixmap
-// size: 8
+// DestroyGLXPixmapCookie is a cookie used only for DestroyGLXPixmap requests.
type DestroyGLXPixmapCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyGLXPixmap
+// DestroyGLXPixmap sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroyGLXPixmap(c *xgb.Conn, GlxPixmap Pixmap) DestroyGLXPixmapCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyGLXPixmapRequest(c, GlxPixmap), cookie)
return DestroyGLXPixmapCookie{cookie}
}
+// DestroyGLXPixmapChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyGLXPixmapCookie.Check()
func DestroyGLXPixmapChecked(c *xgb.Conn, GlxPixmap Pixmap) DestroyGLXPixmapCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyGLXPixmapRequest(c, GlxPixmap), cookie)
return DestroyGLXPixmapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroyGLXPixmapCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroyGLXPixmap
+// destroyGLXPixmapRequest writes a DestroyGLXPixmap request to a byte slice.
func destroyGLXPixmapRequest(c *xgb.Conn, GlxPixmap Pixmap) []byte {
size := 8
b := 0
@@ -1786,30 +1851,35 @@ func destroyGLXPixmapRequest(c *xgb.Conn, GlxPixmap Pixmap) []byte {
return buf
}
-// Request VendorPrivate
-// size: xgb.Pad((12 + xgb.Pad((len(Data) * 1))))
+// VendorPrivateCookie is a cookie used only for VendorPrivate requests.
type VendorPrivateCookie struct {
*xgb.Cookie
}
-// Write request to wire for VendorPrivate
+// VendorPrivate sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func VendorPrivate(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag, Data []byte) VendorPrivateCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(vendorPrivateRequest(c, VendorCode, ContextTag, Data), cookie)
return VendorPrivateCookie{cookie}
}
+// VendorPrivateChecked sends a checked request.
+// If an error occurs, it can be retrieved using VendorPrivateCookie.Check()
func VendorPrivateChecked(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag, Data []byte) VendorPrivateCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(vendorPrivateRequest(c, VendorCode, ContextTag, Data), cookie)
return VendorPrivateCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook VendorPrivateCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for VendorPrivate
+// vendorPrivateRequest writes a VendorPrivate request to a byte slice.
func vendorPrivateRequest(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag, Data []byte) []byte {
size := xgb.Pad((12 + xgb.Pad((len(Data) * 1))))
b := 0
@@ -1836,36 +1906,38 @@ func vendorPrivateRequest(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag,
return buf
}
-// Request VendorPrivateWithReply
-// size: xgb.Pad((12 + xgb.Pad((len(Data) * 1))))
+// VendorPrivateWithReplyCookie is a cookie used only for VendorPrivateWithReply requests.
type VendorPrivateWithReplyCookie struct {
*xgb.Cookie
}
+// VendorPrivateWithReply sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(vendorPrivateWithReplyRequest(c, VendorCode, ContextTag, Data), cookie)
return VendorPrivateWithReplyCookie{cookie}
}
+// VendorPrivateWithReplyUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func VendorPrivateWithReplyUnchecked(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag, Data []byte) VendorPrivateWithReplyCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(vendorPrivateWithReplyRequest(c, VendorCode, ContextTag, Data), cookie)
return VendorPrivateWithReplyCookie{cookie}
}
-// Request reply for VendorPrivateWithReply
-// size: (36 + xgb.Pad(((int(Length) * 4) * 1)))
+// VendorPrivateWithReplyReply represents the data returned from a VendorPrivateWithReply request.
type VendorPrivateWithReplyReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Retval uint32
Data1 []byte // size: 24
Data2 []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request VendorPrivateWithReply
+// Reply blocks and returns the reply data for a VendorPrivateWithReply request.
func (cook VendorPrivateWithReplyCookie) Reply() (*VendorPrivateWithReplyReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1877,7 +1949,7 @@ func (cook VendorPrivateWithReplyCookie) Reply() (*VendorPrivateWithReplyReply,
return vendorPrivateWithReplyReply(buf), nil
}
-// Read reply into structure from buffer for VendorPrivateWithReply
+// vendorPrivateWithReplyReply reads a byte slice into a VendorPrivateWithReplyReply value.
func vendorPrivateWithReplyReply(buf []byte) *VendorPrivateWithReplyReply {
v := new(VendorPrivateWithReplyReply)
b := 1 // skip reply determinant
@@ -1905,6 +1977,7 @@ func vendorPrivateWithReplyReply(buf []byte) *VendorPrivateWithReplyReply {
}
// Write request to wire for VendorPrivateWithReply
+// vendorPrivateWithReplyRequest writes a VendorPrivateWithReply request to a byte slice.
func vendorPrivateWithReplyRequest(c *xgb.Conn, VendorCode uint32, ContextTag ContextTag, Data []byte) []byte {
size := xgb.Pad((12 + xgb.Pad((len(Data) * 1))))
b := 0
@@ -1931,36 +2004,38 @@ func vendorPrivateWithReplyRequest(c *xgb.Conn, VendorCode uint32, ContextTag Co
return buf
}
-// Request QueryExtensionsString
-// size: 8
+// QueryExtensionsStringCookie is a cookie used only for QueryExtensionsString requests.
type QueryExtensionsStringCookie struct {
*xgb.Cookie
}
+// QueryExtensionsString sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryExtensionsStringCookie.Reply()
func QueryExtensionsString(c *xgb.Conn, Screen uint32) QueryExtensionsStringCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryExtensionsStringRequest(c, Screen), cookie)
return QueryExtensionsStringCookie{cookie}
}
+// QueryExtensionsStringUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryExtensionsStringUnchecked(c *xgb.Conn, Screen uint32) QueryExtensionsStringCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryExtensionsStringRequest(c, Screen), cookie)
return QueryExtensionsStringCookie{cookie}
}
-// Request reply for QueryExtensionsString
-// size: 32
+// QueryExtensionsStringReply represents the data returned from a QueryExtensionsString request.
type QueryExtensionsStringReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
// padding: 16 bytes
}
-// Waits and reads reply data from request QueryExtensionsString
+// Reply blocks and returns the reply data for a QueryExtensionsString request.
func (cook QueryExtensionsStringCookie) Reply() (*QueryExtensionsStringReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1972,7 +2047,7 @@ func (cook QueryExtensionsStringCookie) Reply() (*QueryExtensionsStringReply, er
return queryExtensionsStringReply(buf), nil
}
-// Read reply into structure from buffer for QueryExtensionsString
+// queryExtensionsStringReply reads a byte slice into a QueryExtensionsStringReply value.
func queryExtensionsStringReply(buf []byte) *QueryExtensionsStringReply {
v := new(QueryExtensionsStringReply)
b := 1 // skip reply determinant
@@ -1996,6 +2071,7 @@ func queryExtensionsStringReply(buf []byte) *QueryExtensionsStringReply {
}
// Write request to wire for QueryExtensionsString
+// queryExtensionsStringRequest writes a QueryExtensionsString request to a byte slice.
func queryExtensionsStringRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
@@ -2016,29 +2092,31 @@ func queryExtensionsStringRequest(c *xgb.Conn, Screen uint32) []byte {
return buf
}
-// Request QueryServerString
-// size: 12
+// QueryServerStringCookie is a cookie used only for QueryServerString requests.
type QueryServerStringCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryServerStringRequest(c, Screen, Name), cookie)
return QueryServerStringCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryServerStringRequest(c, Screen, Name), cookie)
return QueryServerStringCookie{cookie}
}
-// Request reply for QueryServerString
-// size: (32 + xgb.Pad((int(StrLen) * 1)))
+// QueryServerStringReply represents the data returned from a QueryServerString request.
type QueryServerStringReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
StrLen uint32
@@ -2046,7 +2124,7 @@ type QueryServerStringReply struct {
String string // size: xgb.Pad((int(StrLen) * 1))
}
-// Waits and reads reply data from request QueryServerString
+// Reply blocks and returns the reply data for a QueryServerString request.
func (cook QueryServerStringCookie) Reply() (*QueryServerStringReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2058,7 +2136,7 @@ func (cook QueryServerStringCookie) Reply() (*QueryServerStringReply, error) {
return queryServerStringReply(buf), nil
}
-// Read reply into structure from buffer for QueryServerString
+// queryServerStringReply reads a byte slice into a QueryServerStringReply value.
func queryServerStringReply(buf []byte) *QueryServerStringReply {
v := new(QueryServerStringReply)
b := 1 // skip reply determinant
@@ -2089,6 +2167,7 @@ func queryServerStringReply(buf []byte) *QueryServerStringReply {
}
// 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 {
size := 12
b := 0
@@ -2112,30 +2191,35 @@ func queryServerStringRequest(c *xgb.Conn, Screen uint32, Name uint32) []byte {
return buf
}
-// Request ClientInfo
-// size: xgb.Pad((16 + xgb.Pad((int(StrLen) * 1))))
+// ClientInfoCookie is a cookie used only for ClientInfo requests.
type ClientInfoCookie struct {
*xgb.Cookie
}
-// Write request to wire for ClientInfo
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(clientInfoRequest(c, MajorVersion, MinorVersion, StrLen, String), cookie)
return ClientInfoCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(clientInfoRequest(c, MajorVersion, MinorVersion, StrLen, String), cookie)
return ClientInfoCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((16 + xgb.Pad((int(StrLen) * 1))))
b := 0
@@ -2165,29 +2249,31 @@ func clientInfoRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32, St
return buf
}
-// Request GetFBConfigs
-// size: 8
+// GetFBConfigsCookie is a cookie used only for GetFBConfigs requests.
type GetFBConfigsCookie struct {
*xgb.Cookie
}
+// GetFBConfigs sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetFBConfigsCookie.Reply()
func GetFBConfigs(c *xgb.Conn, Screen uint32) GetFBConfigsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getFBConfigsRequest(c, Screen), cookie)
return GetFBConfigsCookie{cookie}
}
+// GetFBConfigsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetFBConfigsUnchecked(c *xgb.Conn, Screen uint32) GetFBConfigsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getFBConfigsRequest(c, Screen), cookie)
return GetFBConfigsCookie{cookie}
}
-// Request reply for GetFBConfigs
-// size: (32 + xgb.Pad((int(Length) * 4)))
+// GetFBConfigsReply represents the data returned from a GetFBConfigs request.
type GetFBConfigsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumFbConfigs uint32
NumProperties uint32
@@ -2195,7 +2281,7 @@ type GetFBConfigsReply struct {
PropertyList []uint32 // size: xgb.Pad((int(Length) * 4))
}
-// Waits and reads reply data from request GetFBConfigs
+// Reply blocks and returns the reply data for a GetFBConfigs request.
func (cook GetFBConfigsCookie) Reply() (*GetFBConfigsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2207,7 +2293,7 @@ func (cook GetFBConfigsCookie) Reply() (*GetFBConfigsReply, error) {
return getFBConfigsReply(buf), nil
}
-// Read reply into structure from buffer for GetFBConfigs
+// getFBConfigsReply reads a byte slice into a GetFBConfigsReply value.
func getFBConfigsReply(buf []byte) *GetFBConfigsReply {
v := new(GetFBConfigsReply)
b := 1 // skip reply determinant
@@ -2239,6 +2325,7 @@ func getFBConfigsReply(buf []byte) *GetFBConfigsReply {
}
// Write request to wire for GetFBConfigs
+// getFBConfigsRequest writes a GetFBConfigs request to a byte slice.
func getFBConfigsRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
@@ -2259,30 +2346,35 @@ func getFBConfigsRequest(c *xgb.Conn, Screen uint32) []byte {
return buf
}
-// Request CreatePixmap
-// size: xgb.Pad((24 + xgb.Pad(((int(NumAttribs) * 2) * 4))))
+// CreatePixmapCookie is a cookie used only for CreatePixmap requests.
type CreatePixmapCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreatePixmap
+// 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, Screen uint32, Fbconfig Fbconfig, Pixmap xproto.Pixmap, GlxPixmap Pixmap, NumAttribs uint32, Attribs []uint32) CreatePixmapCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createPixmapRequest(c, Screen, Fbconfig, Pixmap, GlxPixmap, NumAttribs, Attribs), 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, Screen uint32, Fbconfig Fbconfig, Pixmap xproto.Pixmap, GlxPixmap Pixmap, NumAttribs uint32, Attribs []uint32) CreatePixmapCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createPixmapRequest(c, Screen, Fbconfig, Pixmap, GlxPixmap, NumAttribs, Attribs), cookie)
return CreatePixmapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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, 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
@@ -2321,30 +2413,35 @@ func createPixmapRequest(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Pixmap x
return buf
}
-// Request DestroyPixmap
-// size: 8
+// DestroyPixmapCookie is a cookie used only for DestroyPixmap requests.
type DestroyPixmapCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyPixmap
+// DestroyPixmap sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroyPixmap(c *xgb.Conn, GlxPixmap Pixmap) DestroyPixmapCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyPixmapRequest(c, GlxPixmap), cookie)
return DestroyPixmapCookie{cookie}
}
+// DestroyPixmapChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyPixmapCookie.Check()
func DestroyPixmapChecked(c *xgb.Conn, GlxPixmap Pixmap) DestroyPixmapCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyPixmapRequest(c, GlxPixmap), cookie)
return DestroyPixmapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroyPixmapCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroyPixmap
+// destroyPixmapRequest writes a DestroyPixmap request to a byte slice.
func destroyPixmapRequest(c *xgb.Conn, GlxPixmap Pixmap) []byte {
size := 8
b := 0
@@ -2365,30 +2462,35 @@ func destroyPixmapRequest(c *xgb.Conn, GlxPixmap Pixmap) []byte {
return buf
}
-// Request CreateNewContext
-// size: 28
+// CreateNewContextCookie is a cookie used only for CreateNewContext requests.
type CreateNewContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateNewContext
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(createNewContextRequest(c, Context, Fbconfig, Screen, RenderType, ShareList, IsDirect), cookie)
return CreateNewContextCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createNewContextRequest(c, Context, Fbconfig, Screen, RenderType, ShareList, IsDirect), cookie)
return CreateNewContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 28
b := 0
@@ -2430,36 +2532,38 @@ func createNewContextRequest(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Sc
return buf
}
-// Request QueryContext
-// size: 8
+// QueryContextCookie is a cookie used only for QueryContext requests.
type QueryContextCookie struct {
*xgb.Cookie
}
+// QueryContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryContextCookie.Reply()
func QueryContext(c *xgb.Conn, Context Context) QueryContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryContextRequest(c, Context), cookie)
return QueryContextCookie{cookie}
}
+// QueryContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryContextUnchecked(c *xgb.Conn, Context Context) QueryContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryContextRequest(c, Context), cookie)
return QueryContextCookie{cookie}
}
-// Request reply for QueryContext
-// size: (32 + xgb.Pad(((int(NumAttribs) * 2) * 4)))
+// QueryContextReply represents the data returned from a QueryContext request.
type QueryContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumAttribs uint32
// padding: 20 bytes
Attribs []uint32 // size: xgb.Pad(((int(NumAttribs) * 2) * 4))
}
-// Waits and reads reply data from request QueryContext
+// Reply blocks and returns the reply data for a QueryContext request.
func (cook QueryContextCookie) Reply() (*QueryContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2471,7 +2575,7 @@ func (cook QueryContextCookie) Reply() (*QueryContextReply, error) {
return queryContextReply(buf), nil
}
-// Read reply into structure from buffer for QueryContext
+// queryContextReply reads a byte slice into a QueryContextReply value.
func queryContextReply(buf []byte) *QueryContextReply {
v := new(QueryContextReply)
b := 1 // skip reply determinant
@@ -2500,6 +2604,7 @@ func queryContextReply(buf []byte) *QueryContextReply {
}
// Write request to wire for QueryContext
+// queryContextRequest writes a QueryContext request to a byte slice.
func queryContextRequest(c *xgb.Conn, Context Context) []byte {
size := 8
b := 0
@@ -2520,35 +2625,37 @@ func queryContextRequest(c *xgb.Conn, Context Context) []byte {
return buf
}
-// Request MakeContextCurrent
-// size: 20
+// MakeContextCurrentCookie is a cookie used only for MakeContextCurrent requests.
type MakeContextCurrentCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(makeContextCurrentRequest(c, OldContextTag, Drawable, ReadDrawable, Context), cookie)
return MakeContextCurrentCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(makeContextCurrentRequest(c, OldContextTag, Drawable, ReadDrawable, Context), cookie)
return MakeContextCurrentCookie{cookie}
}
-// Request reply for MakeContextCurrent
-// size: 32
+// MakeContextCurrentReply represents the data returned from a MakeContextCurrent request.
type MakeContextCurrentReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextTag ContextTag
// padding: 20 bytes
}
-// Waits and reads reply data from request MakeContextCurrent
+// Reply blocks and returns the reply data for a MakeContextCurrent request.
func (cook MakeContextCurrentCookie) Reply() (*MakeContextCurrentReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2560,7 +2667,7 @@ func (cook MakeContextCurrentCookie) Reply() (*MakeContextCurrentReply, error) {
return makeContextCurrentReply(buf), nil
}
-// Read reply into structure from buffer for MakeContextCurrent
+// makeContextCurrentReply reads a byte slice into a MakeContextCurrentReply value.
func makeContextCurrentReply(buf []byte) *MakeContextCurrentReply {
v := new(MakeContextCurrentReply)
b := 1 // skip reply determinant
@@ -2582,6 +2689,7 @@ func makeContextCurrentReply(buf []byte) *MakeContextCurrentReply {
}
// 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 {
size := 20
b := 0
@@ -2611,30 +2719,35 @@ func makeContextCurrentRequest(c *xgb.Conn, OldContextTag ContextTag, Drawable D
return buf
}
-// Request CreatePbuffer
-// size: xgb.Pad((20 + xgb.Pad(((int(NumAttribs) * 2) * 4))))
+// CreatePbufferCookie is a cookie used only for CreatePbuffer requests.
type CreatePbufferCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreatePbuffer
+// CreatePbuffer sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreatePbuffer(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Pbuffer Pbuffer, NumAttribs uint32, Attribs []uint32) CreatePbufferCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createPbufferRequest(c, Screen, Fbconfig, Pbuffer, NumAttribs, Attribs), cookie)
return CreatePbufferCookie{cookie}
}
+// CreatePbufferChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createPbufferRequest(c, Screen, Fbconfig, Pbuffer, NumAttribs, Attribs), cookie)
return CreatePbufferCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreatePbufferCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreatePbuffer
+// createPbufferRequest writes a CreatePbuffer request to a byte slice.
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
@@ -2670,30 +2783,35 @@ func createPbufferRequest(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Pbuffer
return buf
}
-// Request DestroyPbuffer
-// size: 8
+// DestroyPbufferCookie is a cookie used only for DestroyPbuffer requests.
type DestroyPbufferCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyPbuffer
+// DestroyPbuffer sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroyPbuffer(c *xgb.Conn, Pbuffer Pbuffer) DestroyPbufferCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyPbufferRequest(c, Pbuffer), cookie)
return DestroyPbufferCookie{cookie}
}
+// DestroyPbufferChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyPbufferCookie.Check()
func DestroyPbufferChecked(c *xgb.Conn, Pbuffer Pbuffer) DestroyPbufferCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyPbufferRequest(c, Pbuffer), cookie)
return DestroyPbufferCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroyPbufferCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroyPbuffer
+// destroyPbufferRequest writes a DestroyPbuffer request to a byte slice.
func destroyPbufferRequest(c *xgb.Conn, Pbuffer Pbuffer) []byte {
size := 8
b := 0
@@ -2714,36 +2832,38 @@ func destroyPbufferRequest(c *xgb.Conn, Pbuffer Pbuffer) []byte {
return buf
}
-// Request GetDrawableAttributes
-// size: 8
+// GetDrawableAttributesCookie is a cookie used only for GetDrawableAttributes requests.
type GetDrawableAttributesCookie struct {
*xgb.Cookie
}
+// GetDrawableAttributes sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDrawableAttributesCookie.Reply()
func GetDrawableAttributes(c *xgb.Conn, Drawable Drawable) GetDrawableAttributesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDrawableAttributesRequest(c, Drawable), cookie)
return GetDrawableAttributesCookie{cookie}
}
+// GetDrawableAttributesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDrawableAttributesUnchecked(c *xgb.Conn, Drawable Drawable) GetDrawableAttributesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDrawableAttributesRequest(c, Drawable), cookie)
return GetDrawableAttributesCookie{cookie}
}
-// Request reply for GetDrawableAttributes
-// size: (32 + xgb.Pad(((int(NumAttribs) * 2) * 4)))
+// GetDrawableAttributesReply represents the data returned from a GetDrawableAttributes request.
type GetDrawableAttributesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumAttribs uint32
// padding: 20 bytes
Attribs []uint32 // size: xgb.Pad(((int(NumAttribs) * 2) * 4))
}
-// Waits and reads reply data from request GetDrawableAttributes
+// Reply blocks and returns the reply data for a GetDrawableAttributes request.
func (cook GetDrawableAttributesCookie) Reply() (*GetDrawableAttributesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2755,7 +2875,7 @@ func (cook GetDrawableAttributesCookie) Reply() (*GetDrawableAttributesReply, er
return getDrawableAttributesReply(buf), nil
}
-// Read reply into structure from buffer for GetDrawableAttributes
+// getDrawableAttributesReply reads a byte slice into a GetDrawableAttributesReply value.
func getDrawableAttributesReply(buf []byte) *GetDrawableAttributesReply {
v := new(GetDrawableAttributesReply)
b := 1 // skip reply determinant
@@ -2784,6 +2904,7 @@ func getDrawableAttributesReply(buf []byte) *GetDrawableAttributesReply {
}
// Write request to wire for GetDrawableAttributes
+// getDrawableAttributesRequest writes a GetDrawableAttributes request to a byte slice.
func getDrawableAttributesRequest(c *xgb.Conn, Drawable Drawable) []byte {
size := 8
b := 0
@@ -2804,30 +2925,35 @@ func getDrawableAttributesRequest(c *xgb.Conn, Drawable Drawable) []byte {
return buf
}
-// Request ChangeDrawableAttributes
-// size: xgb.Pad((12 + xgb.Pad(((int(NumAttribs) * 2) * 4))))
+// ChangeDrawableAttributesCookie is a cookie used only for ChangeDrawableAttributes requests.
type ChangeDrawableAttributesCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeDrawableAttributes
+// ChangeDrawableAttributes sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangeDrawableAttributes(c *xgb.Conn, Drawable Drawable, NumAttribs uint32, Attribs []uint32) ChangeDrawableAttributesCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(changeDrawableAttributesRequest(c, Drawable, NumAttribs, Attribs), cookie)
return ChangeDrawableAttributesCookie{cookie}
}
+// ChangeDrawableAttributesChecked sends a checked request.
+// If an error occurs, it can be retrieved using ChangeDrawableAttributesCookie.Check()
func ChangeDrawableAttributesChecked(c *xgb.Conn, Drawable Drawable, NumAttribs uint32, Attribs []uint32) ChangeDrawableAttributesCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(changeDrawableAttributesRequest(c, Drawable, NumAttribs, Attribs), cookie)
return ChangeDrawableAttributesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeDrawableAttributesCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeDrawableAttributes
+// changeDrawableAttributesRequest writes a ChangeDrawableAttributes request to a byte slice.
func changeDrawableAttributesRequest(c *xgb.Conn, Drawable Drawable, NumAttribs uint32, Attribs []uint32) []byte {
size := xgb.Pad((12 + xgb.Pad(((int(NumAttribs) * 2) * 4))))
b := 0
@@ -2857,30 +2983,35 @@ func changeDrawableAttributesRequest(c *xgb.Conn, Drawable Drawable, NumAttribs
return buf
}
-// Request CreateWindow
-// size: xgb.Pad((24 + xgb.Pad(((int(NumAttribs) * 2) * 4))))
+// CreateWindowCookie is a cookie used only for CreateWindow requests.
type CreateWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateWindow
+// 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, Screen uint32, Fbconfig Fbconfig, Window xproto.Window, GlxWindow Window, NumAttribs uint32, Attribs []uint32) CreateWindowCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createWindowRequest(c, Screen, Fbconfig, Window, GlxWindow, NumAttribs, Attribs), 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, Screen uint32, Fbconfig Fbconfig, Window xproto.Window, GlxWindow Window, NumAttribs uint32, Attribs []uint32) CreateWindowCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createWindowRequest(c, Screen, Fbconfig, Window, GlxWindow, NumAttribs, Attribs), cookie)
return CreateWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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, 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
@@ -2919,30 +3050,35 @@ func createWindowRequest(c *xgb.Conn, Screen uint32, Fbconfig Fbconfig, Window x
return buf
}
-// Request DeleteWindow
-// size: 8
+// DeleteWindowCookie is a cookie used only for DeleteWindow requests.
type DeleteWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for DeleteWindow
+// DeleteWindow sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DeleteWindow(c *xgb.Conn, Glxwindow Window) DeleteWindowCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(deleteWindowRequest(c, Glxwindow), cookie)
return DeleteWindowCookie{cookie}
}
+// DeleteWindowChecked sends a checked request.
+// If an error occurs, it can be retrieved using DeleteWindowCookie.Check()
func DeleteWindowChecked(c *xgb.Conn, Glxwindow Window) DeleteWindowCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(deleteWindowRequest(c, Glxwindow), cookie)
return DeleteWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DeleteWindowCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DeleteWindow
+// deleteWindowRequest writes a DeleteWindow request to a byte slice.
func deleteWindowRequest(c *xgb.Conn, Glxwindow Window) []byte {
size := 8
b := 0
@@ -2963,30 +3099,35 @@ func deleteWindowRequest(c *xgb.Conn, Glxwindow Window) []byte {
return buf
}
-// Request SetClientInfoARB
-// size: xgb.Pad((((24 + xgb.Pad(((int(NumVersions) * 2) * 4))) + xgb.Pad((int(GlStrLen) * 1))) + xgb.Pad((int(GlxStrLen) * 1))))
+// SetClientInfoARBCookie is a cookie used only for SetClientInfoARB requests.
type SetClientInfoARBCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetClientInfoARB
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setClientInfoARBRequest(c, MajorVersion, MinorVersion, NumVersions, GlStrLen, GlxStrLen, GlVersions, GlExtensionString, GlxExtensionString), cookie)
return SetClientInfoARBCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setClientInfoARBRequest(c, MajorVersion, MinorVersion, NumVersions, GlStrLen, GlxStrLen, GlVersions, GlExtensionString, GlxExtensionString), cookie)
return SetClientInfoARBCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((((24 + xgb.Pad(((int(NumVersions) * 2) * 4))) + xgb.Pad((int(GlStrLen) * 1))) + xgb.Pad((int(GlxStrLen) * 1))))
b := 0
@@ -3031,30 +3172,35 @@ func setClientInfoARBRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint
return buf
}
-// Request CreateContextAttribsARB
-// size: xgb.Pad((28 + xgb.Pad(((int(NumAttribs) * 2) * 4))))
+// CreateContextAttribsARBCookie is a cookie used only for CreateContextAttribsARB requests.
type CreateContextAttribsARBCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateContextAttribsARB
+// CreateContextAttribsARB sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateContextAttribsARB(c *xgb.Conn, Context Context, Fbconfig Fbconfig, Screen uint32, ShareList Context, IsDirect bool, NumAttribs uint32, Attribs []uint32) CreateContextAttribsARBCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createContextAttribsARBRequest(c, Context, Fbconfig, Screen, ShareList, IsDirect, NumAttribs, Attribs), cookie)
return CreateContextAttribsARBCookie{cookie}
}
+// CreateContextAttribsARBChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createContextAttribsARBRequest(c, Context, Fbconfig, Screen, ShareList, IsDirect, NumAttribs, Attribs), cookie)
return CreateContextAttribsARBCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateContextAttribsARBCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateContextAttribsARB
+// createContextAttribsARBRequest writes a CreateContextAttribsARB request to a byte slice.
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
@@ -3102,30 +3248,35 @@ func createContextAttribsARBRequest(c *xgb.Conn, Context Context, Fbconfig Fbcon
return buf
}
-// Request SetClientInfo2ARB
-// size: xgb.Pad((((24 + xgb.Pad(((int(NumVersions) * 3) * 4))) + xgb.Pad((int(GlStrLen) * 1))) + xgb.Pad((int(GlxStrLen) * 1))))
+// SetClientInfo2ARBCookie is a cookie used only for SetClientInfo2ARB requests.
type SetClientInfo2ARBCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetClientInfo2ARB
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setClientInfo2ARBRequest(c, MajorVersion, MinorVersion, NumVersions, GlStrLen, GlxStrLen, GlVersions, GlExtensionString, GlxExtensionString), cookie)
return SetClientInfo2ARBCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setClientInfo2ARBRequest(c, MajorVersion, MinorVersion, NumVersions, GlStrLen, GlxStrLen, GlVersions, GlExtensionString, GlxExtensionString), cookie)
return SetClientInfo2ARBCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((((24 + xgb.Pad(((int(NumVersions) * 3) * 4))) + xgb.Pad((int(GlStrLen) * 1))) + xgb.Pad((int(GlxStrLen) * 1))))
b := 0
@@ -3170,30 +3321,35 @@ func setClientInfo2ARBRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uin
return buf
}
-// Request NewList
-// size: 16
+// NewListCookie is a cookie used only for NewList requests.
type NewListCookie struct {
*xgb.Cookie
}
-// Write request to wire for NewList
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(newListRequest(c, ContextTag, List, Mode), cookie)
return NewListCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(newListRequest(c, ContextTag, List, Mode), cookie)
return NewListCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -3220,30 +3376,35 @@ func newListRequest(c *xgb.Conn, ContextTag ContextTag, List uint32, Mode uint32
return buf
}
-// Request EndList
-// size: 8
+// EndListCookie is a cookie used only for EndList requests.
type EndListCookie struct {
*xgb.Cookie
}
-// Write request to wire for EndList
+// EndList sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func EndList(c *xgb.Conn, ContextTag ContextTag) EndListCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(endListRequest(c, ContextTag), cookie)
return EndListCookie{cookie}
}
+// EndListChecked sends a checked request.
+// If an error occurs, it can be retrieved using EndListCookie.Check()
func EndListChecked(c *xgb.Conn, ContextTag ContextTag) EndListCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(endListRequest(c, ContextTag), cookie)
return EndListCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook EndListCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for EndList
+// endListRequest writes a EndList request to a byte slice.
func endListRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
size := 8
b := 0
@@ -3264,30 +3425,35 @@ func endListRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
return buf
}
-// Request DeleteLists
-// size: 16
+// DeleteListsCookie is a cookie used only for DeleteLists requests.
type DeleteListsCookie struct {
*xgb.Cookie
}
-// Write request to wire for DeleteLists
+// DeleteLists sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DeleteLists(c *xgb.Conn, ContextTag ContextTag, List uint32, Range int32) DeleteListsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(deleteListsRequest(c, ContextTag, List, Range), cookie)
return DeleteListsCookie{cookie}
}
+// DeleteListsChecked sends a checked request.
+// If an error occurs, it can be retrieved using DeleteListsCookie.Check()
func DeleteListsChecked(c *xgb.Conn, ContextTag ContextTag, List uint32, Range int32) DeleteListsCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(deleteListsRequest(c, ContextTag, List, Range), cookie)
return DeleteListsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DeleteListsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DeleteLists
+// deleteListsRequest writes a DeleteLists request to a byte slice.
func deleteListsRequest(c *xgb.Conn, ContextTag ContextTag, List uint32, Range int32) []byte {
size := 16
b := 0
@@ -3314,34 +3480,36 @@ func deleteListsRequest(c *xgb.Conn, ContextTag ContextTag, List uint32, Range i
return buf
}
-// Request GenLists
-// size: 12
+// GenListsCookie is a cookie used only for GenLists requests.
type GenListsCookie struct {
*xgb.Cookie
}
+// GenLists sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(genListsRequest(c, ContextTag, Range), cookie)
return GenListsCookie{cookie}
}
+// GenListsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GenListsUnchecked(c *xgb.Conn, ContextTag ContextTag, Range int32) GenListsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(genListsRequest(c, ContextTag, Range), cookie)
return GenListsCookie{cookie}
}
-// Request reply for GenLists
-// size: 12
+// GenListsReply represents the data returned from a GenLists request.
type GenListsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
RetVal uint32
}
-// Waits and reads reply data from request GenLists
+// Reply blocks and returns the reply data for a GenLists request.
func (cook GenListsCookie) Reply() (*GenListsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3353,7 +3521,7 @@ func (cook GenListsCookie) Reply() (*GenListsReply, error) {
return genListsReply(buf), nil
}
-// Read reply into structure from buffer for GenLists
+// genListsReply reads a byte slice into a GenListsReply value.
func genListsReply(buf []byte) *GenListsReply {
v := new(GenListsReply)
b := 1 // skip reply determinant
@@ -3373,6 +3541,7 @@ func genListsReply(buf []byte) *GenListsReply {
}
// Write request to wire for GenLists
+// genListsRequest writes a GenLists request to a byte slice.
func genListsRequest(c *xgb.Conn, ContextTag ContextTag, Range int32) []byte {
size := 12
b := 0
@@ -3396,30 +3565,35 @@ func genListsRequest(c *xgb.Conn, ContextTag ContextTag, Range int32) []byte {
return buf
}
-// Request FeedbackBuffer
-// size: 16
+// FeedbackBufferCookie is a cookie used only for FeedbackBuffer requests.
type FeedbackBufferCookie struct {
*xgb.Cookie
}
-// Write request to wire for FeedbackBuffer
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(feedbackBufferRequest(c, ContextTag, Size, Type), cookie)
return FeedbackBufferCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(feedbackBufferRequest(c, ContextTag, Size, Type), cookie)
return FeedbackBufferCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -3446,30 +3620,35 @@ func feedbackBufferRequest(c *xgb.Conn, ContextTag ContextTag, Size int32, Type
return buf
}
-// Request SelectBuffer
-// size: 12
+// SelectBufferCookie is a cookie used only for SelectBuffer requests.
type SelectBufferCookie struct {
*xgb.Cookie
}
-// Write request to wire for SelectBuffer
+// SelectBuffer sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectBuffer(c *xgb.Conn, ContextTag ContextTag, Size int32) SelectBufferCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(selectBufferRequest(c, ContextTag, Size), cookie)
return SelectBufferCookie{cookie}
}
+// SelectBufferChecked sends a checked request.
+// If an error occurs, it can be retrieved using SelectBufferCookie.Check()
func SelectBufferChecked(c *xgb.Conn, ContextTag ContextTag, Size int32) SelectBufferCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(selectBufferRequest(c, ContextTag, Size), cookie)
return SelectBufferCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SelectBufferCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SelectBuffer
+// selectBufferRequest writes a SelectBuffer request to a byte slice.
func selectBufferRequest(c *xgb.Conn, ContextTag ContextTag, Size int32) []byte {
size := 12
b := 0
@@ -3493,29 +3672,31 @@ func selectBufferRequest(c *xgb.Conn, ContextTag ContextTag, Size int32) []byte
return buf
}
-// Request RenderMode
-// size: 12
+// RenderModeCookie is a cookie used only for RenderMode requests.
type RenderModeCookie struct {
*xgb.Cookie
}
+// RenderMode sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(renderModeRequest(c, ContextTag, Mode), cookie)
return RenderModeCookie{cookie}
}
+// RenderModeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func RenderModeUnchecked(c *xgb.Conn, ContextTag ContextTag, Mode uint32) RenderModeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(renderModeRequest(c, ContextTag, Mode), cookie)
return RenderModeCookie{cookie}
}
-// Request reply for RenderMode
-// size: (32 + xgb.Pad((int(N) * 4)))
+// RenderModeReply represents the data returned from a RenderMode request.
type RenderModeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
RetVal uint32
N uint32
@@ -3524,7 +3705,7 @@ type RenderModeReply struct {
Data []uint32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request RenderMode
+// Reply blocks and returns the reply data for a RenderMode request.
func (cook RenderModeCookie) Reply() (*RenderModeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3536,7 +3717,7 @@ func (cook RenderModeCookie) Reply() (*RenderModeReply, error) {
return renderModeReply(buf), nil
}
-// Read reply into structure from buffer for RenderMode
+// renderModeReply reads a byte slice into a RenderModeReply value.
func renderModeReply(buf []byte) *RenderModeReply {
v := new(RenderModeReply)
b := 1 // skip reply determinant
@@ -3571,6 +3752,7 @@ func renderModeReply(buf []byte) *RenderModeReply {
}
// Write request to wire for RenderMode
+// renderModeRequest writes a RenderMode request to a byte slice.
func renderModeRequest(c *xgb.Conn, ContextTag ContextTag, Mode uint32) []byte {
size := 12
b := 0
@@ -3594,33 +3776,35 @@ func renderModeRequest(c *xgb.Conn, ContextTag ContextTag, Mode uint32) []byte {
return buf
}
-// Request Finish
-// size: 8
+// FinishCookie is a cookie used only for Finish requests.
type FinishCookie struct {
*xgb.Cookie
}
+// Finish sends a checked request.
+// If an error occurs, it will be returned with the reply by calling FinishCookie.Reply()
func Finish(c *xgb.Conn, ContextTag ContextTag) FinishCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(finishRequest(c, ContextTag), cookie)
return FinishCookie{cookie}
}
+// FinishUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func FinishUnchecked(c *xgb.Conn, ContextTag ContextTag) FinishCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(finishRequest(c, ContextTag), cookie)
return FinishCookie{cookie}
}
-// Request reply for Finish
-// size: 8
+// FinishReply represents the data returned from a Finish request.
type FinishReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
}
-// Waits and reads reply data from request Finish
+// Reply blocks and returns the reply data for a Finish request.
func (cook FinishCookie) Reply() (*FinishReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3632,7 +3816,7 @@ func (cook FinishCookie) Reply() (*FinishReply, error) {
return finishReply(buf), nil
}
-// Read reply into structure from buffer for Finish
+// finishReply reads a byte slice into a FinishReply value.
func finishReply(buf []byte) *FinishReply {
v := new(FinishReply)
b := 1 // skip reply determinant
@@ -3649,6 +3833,7 @@ func finishReply(buf []byte) *FinishReply {
}
// Write request to wire for Finish
+// finishRequest writes a Finish request to a byte slice.
func finishRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
size := 8
b := 0
@@ -3669,30 +3854,35 @@ func finishRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
return buf
}
-// Request PixelStoref
-// size: 16
+// PixelStorefCookie is a cookie used only for PixelStoref requests.
type PixelStorefCookie struct {
*xgb.Cookie
}
-// Write request to wire for PixelStoref
+// PixelStoref sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PixelStoref(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum Float32) PixelStorefCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(pixelStorefRequest(c, ContextTag, Pname, Datum), cookie)
return PixelStorefCookie{cookie}
}
+// PixelStorefChecked sends a checked request.
+// If an error occurs, it can be retrieved using PixelStorefCookie.Check()
func PixelStorefChecked(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum Float32) PixelStorefCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(pixelStorefRequest(c, ContextTag, Pname, Datum), cookie)
return PixelStorefCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PixelStorefCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PixelStoref
+// pixelStorefRequest writes a PixelStoref request to a byte slice.
func pixelStorefRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum Float32) []byte {
size := 16
b := 0
@@ -3719,30 +3909,35 @@ func pixelStorefRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum
return buf
}
-// Request PixelStorei
-// size: 16
+// PixelStoreiCookie is a cookie used only for PixelStorei requests.
type PixelStoreiCookie struct {
*xgb.Cookie
}
-// Write request to wire for PixelStorei
+// PixelStorei sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PixelStorei(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum int32) PixelStoreiCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(pixelStoreiRequest(c, ContextTag, Pname, Datum), cookie)
return PixelStoreiCookie{cookie}
}
+// PixelStoreiChecked sends a checked request.
+// If an error occurs, it can be retrieved using PixelStoreiCookie.Check()
func PixelStoreiChecked(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum int32) PixelStoreiCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(pixelStoreiRequest(c, ContextTag, Pname, Datum), cookie)
return PixelStoreiCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PixelStoreiCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PixelStorei
+// pixelStoreiRequest writes a PixelStorei request to a byte slice.
func pixelStoreiRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum int32) []byte {
size := 16
b := 0
@@ -3769,35 +3964,37 @@ func pixelStoreiRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32, Datum
return buf
}
-// Request ReadPixels
-// size: 36
+// ReadPixelsCookie is a cookie used only for ReadPixels requests.
type ReadPixelsCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(readPixelsRequest(c, ContextTag, X, Y, Width, Height, Format, Type, SwapBytes, LsbFirst), cookie)
return ReadPixelsCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(readPixelsRequest(c, ContextTag, X, Y, Width, Height, Format, Type, SwapBytes, LsbFirst), cookie)
return ReadPixelsCookie{cookie}
}
-// Request reply for ReadPixels
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// ReadPixelsReply represents the data returned from a ReadPixels request.
type ReadPixelsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
Data []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request ReadPixels
+// Reply blocks and returns the reply data for a ReadPixels request.
func (cook ReadPixelsCookie) Reply() (*ReadPixelsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3809,7 +4006,7 @@ func (cook ReadPixelsCookie) Reply() (*ReadPixelsReply, error) {
return readPixelsReply(buf), nil
}
-// Read reply into structure from buffer for ReadPixels
+// readPixelsReply reads a byte slice into a ReadPixelsReply value.
func readPixelsReply(buf []byte) *ReadPixelsReply {
v := new(ReadPixelsReply)
b := 1 // skip reply determinant
@@ -3832,6 +4029,7 @@ func readPixelsReply(buf []byte) *ReadPixelsReply {
}
// 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 {
size := 36
b := 0
@@ -3884,29 +4082,31 @@ func readPixelsRequest(c *xgb.Conn, ContextTag ContextTag, X int32, Y int32, Wid
return buf
}
-// Request GetBooleanv
-// size: 12
+// GetBooleanvCookie is a cookie used only for GetBooleanv requests.
type GetBooleanvCookie struct {
*xgb.Cookie
}
+// GetBooleanv sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getBooleanvRequest(c, ContextTag, Pname), cookie)
return GetBooleanvCookie{cookie}
}
+// GetBooleanvUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetBooleanvUnchecked(c *xgb.Conn, ContextTag ContextTag, Pname int32) GetBooleanvCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getBooleanvRequest(c, ContextTag, Pname), cookie)
return GetBooleanvCookie{cookie}
}
-// Request reply for GetBooleanv
-// size: (32 + xgb.Pad((int(N) * 1)))
+// GetBooleanvReply represents the data returned from a GetBooleanv request.
type GetBooleanvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -3915,7 +4115,7 @@ type GetBooleanvReply struct {
Data []bool // size: xgb.Pad((int(N) * 1))
}
-// Waits and reads reply data from request GetBooleanv
+// Reply blocks and returns the reply data for a GetBooleanv request.
func (cook GetBooleanvCookie) Reply() (*GetBooleanvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3927,7 +4127,7 @@ func (cook GetBooleanvCookie) Reply() (*GetBooleanvReply, error) {
return getBooleanvReply(buf), nil
}
-// Read reply into structure from buffer for GetBooleanv
+// getBooleanvReply reads a byte slice into a GetBooleanvReply value.
func getBooleanvReply(buf []byte) *GetBooleanvReply {
v := new(GetBooleanvReply)
b := 1 // skip reply determinant
@@ -3969,6 +4169,7 @@ func getBooleanvReply(buf []byte) *GetBooleanvReply {
}
// Write request to wire for GetBooleanv
+// getBooleanvRequest writes a GetBooleanv request to a byte slice.
func getBooleanvRequest(c *xgb.Conn, ContextTag ContextTag, Pname int32) []byte {
size := 12
b := 0
@@ -3992,35 +4193,37 @@ func getBooleanvRequest(c *xgb.Conn, ContextTag ContextTag, Pname int32) []byte
return buf
}
-// Request GetClipPlane
-// size: 12
+// GetClipPlaneCookie is a cookie used only for GetClipPlane requests.
type GetClipPlaneCookie struct {
*xgb.Cookie
}
+// GetClipPlane sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getClipPlaneRequest(c, ContextTag, Plane), cookie)
return GetClipPlaneCookie{cookie}
}
+// GetClipPlaneUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetClipPlaneUnchecked(c *xgb.Conn, ContextTag ContextTag, Plane int32) GetClipPlaneCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getClipPlaneRequest(c, ContextTag, Plane), cookie)
return GetClipPlaneCookie{cookie}
}
-// Request reply for GetClipPlane
-// size: (32 + xgb.Pad(((int(Length) / 2) * 8)))
+// GetClipPlaneReply represents the data returned from a GetClipPlane request.
type GetClipPlaneReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
Data []Float64 // size: xgb.Pad(((int(Length) / 2) * 8))
}
-// Waits and reads reply data from request GetClipPlane
+// Reply blocks and returns the reply data for a GetClipPlane request.
func (cook GetClipPlaneCookie) Reply() (*GetClipPlaneReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4032,7 +4235,7 @@ func (cook GetClipPlaneCookie) Reply() (*GetClipPlaneReply, error) {
return getClipPlaneReply(buf), nil
}
-// Read reply into structure from buffer for GetClipPlane
+// getClipPlaneReply reads a byte slice into a GetClipPlaneReply value.
func getClipPlaneReply(buf []byte) *GetClipPlaneReply {
v := new(GetClipPlaneReply)
b := 1 // skip reply determinant
@@ -4058,6 +4261,7 @@ func getClipPlaneReply(buf []byte) *GetClipPlaneReply {
}
// Write request to wire for GetClipPlane
+// getClipPlaneRequest writes a GetClipPlane request to a byte slice.
func getClipPlaneRequest(c *xgb.Conn, ContextTag ContextTag, Plane int32) []byte {
size := 12
b := 0
@@ -4081,29 +4285,31 @@ func getClipPlaneRequest(c *xgb.Conn, ContextTag ContextTag, Plane int32) []byte
return buf
}
-// Request GetDoublev
-// size: 12
+// GetDoublevCookie is a cookie used only for GetDoublev requests.
type GetDoublevCookie struct {
*xgb.Cookie
}
+// GetDoublev sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getDoublevRequest(c, ContextTag, Pname), cookie)
return GetDoublevCookie{cookie}
}
+// GetDoublevUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDoublevUnchecked(c *xgb.Conn, ContextTag ContextTag, Pname uint32) GetDoublevCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDoublevRequest(c, ContextTag, Pname), cookie)
return GetDoublevCookie{cookie}
}
-// Request reply for GetDoublev
-// size: (32 + xgb.Pad((int(N) * 8)))
+// GetDoublevReply represents the data returned from a GetDoublev request.
type GetDoublevReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -4112,7 +4318,7 @@ type GetDoublevReply struct {
Data []Float64 // size: xgb.Pad((int(N) * 8))
}
-// Waits and reads reply data from request GetDoublev
+// Reply blocks and returns the reply data for a GetDoublev request.
func (cook GetDoublevCookie) Reply() (*GetDoublevReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4124,7 +4330,7 @@ func (cook GetDoublevCookie) Reply() (*GetDoublevReply, error) {
return getDoublevReply(buf), nil
}
-// Read reply into structure from buffer for GetDoublev
+// getDoublevReply reads a byte slice into a GetDoublevReply value.
func getDoublevReply(buf []byte) *GetDoublevReply {
v := new(GetDoublevReply)
b := 1 // skip reply determinant
@@ -4158,6 +4364,7 @@ func getDoublevReply(buf []byte) *GetDoublevReply {
}
// Write request to wire for GetDoublev
+// getDoublevRequest writes a GetDoublev request to a byte slice.
func getDoublevRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32) []byte {
size := 12
b := 0
@@ -4181,34 +4388,36 @@ func getDoublevRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32) []byte
return buf
}
-// Request GetError
-// size: 8
+// GetErrorCookie is a cookie used only for GetError requests.
type GetErrorCookie struct {
*xgb.Cookie
}
+// GetError sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetErrorCookie.Reply()
func GetError(c *xgb.Conn, ContextTag ContextTag) GetErrorCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getErrorRequest(c, ContextTag), cookie)
return GetErrorCookie{cookie}
}
+// GetErrorUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetErrorUnchecked(c *xgb.Conn, ContextTag ContextTag) GetErrorCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getErrorRequest(c, ContextTag), cookie)
return GetErrorCookie{cookie}
}
-// Request reply for GetError
-// size: 12
+// GetErrorReply represents the data returned from a GetError request.
type GetErrorReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Error int32
}
-// Waits and reads reply data from request GetError
+// Reply blocks and returns the reply data for a GetError request.
func (cook GetErrorCookie) Reply() (*GetErrorReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4220,7 +4429,7 @@ func (cook GetErrorCookie) Reply() (*GetErrorReply, error) {
return getErrorReply(buf), nil
}
-// Read reply into structure from buffer for GetError
+// getErrorReply reads a byte slice into a GetErrorReply value.
func getErrorReply(buf []byte) *GetErrorReply {
v := new(GetErrorReply)
b := 1 // skip reply determinant
@@ -4240,6 +4449,7 @@ func getErrorReply(buf []byte) *GetErrorReply {
}
// Write request to wire for GetError
+// getErrorRequest writes a GetError request to a byte slice.
func getErrorRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
size := 8
b := 0
@@ -4260,29 +4470,31 @@ func getErrorRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
return buf
}
-// Request GetFloatv
-// size: 12
+// GetFloatvCookie is a cookie used only for GetFloatv requests.
type GetFloatvCookie struct {
*xgb.Cookie
}
+// GetFloatv sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getFloatvRequest(c, ContextTag, Pname), cookie)
return GetFloatvCookie{cookie}
}
+// GetFloatvUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetFloatvUnchecked(c *xgb.Conn, ContextTag ContextTag, Pname uint32) GetFloatvCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getFloatvRequest(c, ContextTag, Pname), cookie)
return GetFloatvCookie{cookie}
}
-// Request reply for GetFloatv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetFloatvReply represents the data returned from a GetFloatv request.
type GetFloatvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -4291,7 +4503,7 @@ type GetFloatvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetFloatv
+// Reply blocks and returns the reply data for a GetFloatv request.
func (cook GetFloatvCookie) Reply() (*GetFloatvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4303,7 +4515,7 @@ func (cook GetFloatvCookie) Reply() (*GetFloatvReply, error) {
return getFloatvReply(buf), nil
}
-// Read reply into structure from buffer for GetFloatv
+// getFloatvReply reads a byte slice into a GetFloatvReply value.
func getFloatvReply(buf []byte) *GetFloatvReply {
v := new(GetFloatvReply)
b := 1 // skip reply determinant
@@ -4337,6 +4549,7 @@ func getFloatvReply(buf []byte) *GetFloatvReply {
}
// Write request to wire for GetFloatv
+// getFloatvRequest writes a GetFloatv request to a byte slice.
func getFloatvRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32) []byte {
size := 12
b := 0
@@ -4360,29 +4573,31 @@ func getFloatvRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32) []byte {
return buf
}
-// Request GetIntegerv
-// size: 12
+// GetIntegervCookie is a cookie used only for GetIntegerv requests.
type GetIntegervCookie struct {
*xgb.Cookie
}
+// GetIntegerv sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getIntegervRequest(c, ContextTag, Pname), cookie)
return GetIntegervCookie{cookie}
}
+// GetIntegervUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetIntegervUnchecked(c *xgb.Conn, ContextTag ContextTag, Pname uint32) GetIntegervCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getIntegervRequest(c, ContextTag, Pname), cookie)
return GetIntegervCookie{cookie}
}
-// Request reply for GetIntegerv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetIntegervReply represents the data returned from a GetIntegerv request.
type GetIntegervReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -4391,7 +4606,7 @@ type GetIntegervReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetIntegerv
+// Reply blocks and returns the reply data for a GetIntegerv request.
func (cook GetIntegervCookie) Reply() (*GetIntegervReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4403,7 +4618,7 @@ func (cook GetIntegervCookie) Reply() (*GetIntegervReply, error) {
return getIntegervReply(buf), nil
}
-// Read reply into structure from buffer for GetIntegerv
+// getIntegervReply reads a byte slice into a GetIntegervReply value.
func getIntegervReply(buf []byte) *GetIntegervReply {
v := new(GetIntegervReply)
b := 1 // skip reply determinant
@@ -4437,6 +4652,7 @@ func getIntegervReply(buf []byte) *GetIntegervReply {
}
// Write request to wire for GetIntegerv
+// getIntegervRequest writes a GetIntegerv request to a byte slice.
func getIntegervRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32) []byte {
size := 12
b := 0
@@ -4460,29 +4676,31 @@ func getIntegervRequest(c *xgb.Conn, ContextTag ContextTag, Pname uint32) []byte
return buf
}
-// Request GetLightfv
-// size: 16
+// GetLightfvCookie is a cookie used only for GetLightfv requests.
type GetLightfvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getLightfvRequest(c, ContextTag, Light, Pname), cookie)
return GetLightfvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getLightfvRequest(c, ContextTag, Light, Pname), cookie)
return GetLightfvCookie{cookie}
}
-// Request reply for GetLightfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetLightfvReply represents the data returned from a GetLightfv request.
type GetLightfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -4491,7 +4709,7 @@ type GetLightfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetLightfv
+// Reply blocks and returns the reply data for a GetLightfv request.
func (cook GetLightfvCookie) Reply() (*GetLightfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4503,7 +4721,7 @@ func (cook GetLightfvCookie) Reply() (*GetLightfvReply, error) {
return getLightfvReply(buf), nil
}
-// Read reply into structure from buffer for GetLightfv
+// getLightfvReply reads a byte slice into a GetLightfvReply value.
func getLightfvReply(buf []byte) *GetLightfvReply {
v := new(GetLightfvReply)
b := 1 // skip reply determinant
@@ -4537,6 +4755,7 @@ func getLightfvReply(buf []byte) *GetLightfvReply {
}
// 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 {
size := 16
b := 0
@@ -4563,29 +4782,31 @@ func getLightfvRequest(c *xgb.Conn, ContextTag ContextTag, Light uint32, Pname u
return buf
}
-// Request GetLightiv
-// size: 16
+// GetLightivCookie is a cookie used only for GetLightiv requests.
type GetLightivCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getLightivRequest(c, ContextTag, Light, Pname), cookie)
return GetLightivCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getLightivRequest(c, ContextTag, Light, Pname), cookie)
return GetLightivCookie{cookie}
}
-// Request reply for GetLightiv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetLightivReply represents the data returned from a GetLightiv request.
type GetLightivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -4594,7 +4815,7 @@ type GetLightivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetLightiv
+// Reply blocks and returns the reply data for a GetLightiv request.
func (cook GetLightivCookie) Reply() (*GetLightivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4606,7 +4827,7 @@ func (cook GetLightivCookie) Reply() (*GetLightivReply, error) {
return getLightivReply(buf), nil
}
-// Read reply into structure from buffer for GetLightiv
+// getLightivReply reads a byte slice into a GetLightivReply value.
func getLightivReply(buf []byte) *GetLightivReply {
v := new(GetLightivReply)
b := 1 // skip reply determinant
@@ -4640,6 +4861,7 @@ func getLightivReply(buf []byte) *GetLightivReply {
}
// 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 {
size := 16
b := 0
@@ -4666,29 +4888,31 @@ func getLightivRequest(c *xgb.Conn, ContextTag ContextTag, Light uint32, Pname u
return buf
}
-// Request GetMapdv
-// size: 16
+// GetMapdvCookie is a cookie used only for GetMapdv requests.
type GetMapdvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getMapdvRequest(c, ContextTag, Target, Query), cookie)
return GetMapdvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getMapdvRequest(c, ContextTag, Target, Query), cookie)
return GetMapdvCookie{cookie}
}
-// Request reply for GetMapdv
-// size: (32 + xgb.Pad((int(N) * 8)))
+// GetMapdvReply represents the data returned from a GetMapdv request.
type GetMapdvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -4697,7 +4921,7 @@ type GetMapdvReply struct {
Data []Float64 // size: xgb.Pad((int(N) * 8))
}
-// Waits and reads reply data from request GetMapdv
+// Reply blocks and returns the reply data for a GetMapdv request.
func (cook GetMapdvCookie) Reply() (*GetMapdvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4709,7 +4933,7 @@ func (cook GetMapdvCookie) Reply() (*GetMapdvReply, error) {
return getMapdvReply(buf), nil
}
-// Read reply into structure from buffer for GetMapdv
+// getMapdvReply reads a byte slice into a GetMapdvReply value.
func getMapdvReply(buf []byte) *GetMapdvReply {
v := new(GetMapdvReply)
b := 1 // skip reply determinant
@@ -4743,6 +4967,7 @@ func getMapdvReply(buf []byte) *GetMapdvReply {
}
// 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 {
size := 16
b := 0
@@ -4769,29 +4994,31 @@ func getMapdvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query ui
return buf
}
-// Request GetMapfv
-// size: 16
+// GetMapfvCookie is a cookie used only for GetMapfv requests.
type GetMapfvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getMapfvRequest(c, ContextTag, Target, Query), cookie)
return GetMapfvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getMapfvRequest(c, ContextTag, Target, Query), cookie)
return GetMapfvCookie{cookie}
}
-// Request reply for GetMapfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetMapfvReply represents the data returned from a GetMapfv request.
type GetMapfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -4800,7 +5027,7 @@ type GetMapfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetMapfv
+// Reply blocks and returns the reply data for a GetMapfv request.
func (cook GetMapfvCookie) Reply() (*GetMapfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4812,7 +5039,7 @@ func (cook GetMapfvCookie) Reply() (*GetMapfvReply, error) {
return getMapfvReply(buf), nil
}
-// Read reply into structure from buffer for GetMapfv
+// getMapfvReply reads a byte slice into a GetMapfvReply value.
func getMapfvReply(buf []byte) *GetMapfvReply {
v := new(GetMapfvReply)
b := 1 // skip reply determinant
@@ -4846,6 +5073,7 @@ func getMapfvReply(buf []byte) *GetMapfvReply {
}
// 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 {
size := 16
b := 0
@@ -4872,29 +5100,31 @@ func getMapfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query ui
return buf
}
-// Request GetMapiv
-// size: 16
+// GetMapivCookie is a cookie used only for GetMapiv requests.
type GetMapivCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getMapivRequest(c, ContextTag, Target, Query), cookie)
return GetMapivCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getMapivRequest(c, ContextTag, Target, Query), cookie)
return GetMapivCookie{cookie}
}
-// Request reply for GetMapiv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetMapivReply represents the data returned from a GetMapiv request.
type GetMapivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -4903,7 +5133,7 @@ type GetMapivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetMapiv
+// Reply blocks and returns the reply data for a GetMapiv request.
func (cook GetMapivCookie) Reply() (*GetMapivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4915,7 +5145,7 @@ func (cook GetMapivCookie) Reply() (*GetMapivReply, error) {
return getMapivReply(buf), nil
}
-// Read reply into structure from buffer for GetMapiv
+// getMapivReply reads a byte slice into a GetMapivReply value.
func getMapivReply(buf []byte) *GetMapivReply {
v := new(GetMapivReply)
b := 1 // skip reply determinant
@@ -4949,6 +5179,7 @@ func getMapivReply(buf []byte) *GetMapivReply {
}
// 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 {
size := 16
b := 0
@@ -4975,29 +5206,31 @@ func getMapivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Query ui
return buf
}
-// Request GetMaterialfv
-// size: 16
+// GetMaterialfvCookie is a cookie used only for GetMaterialfv requests.
type GetMaterialfvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getMaterialfvRequest(c, ContextTag, Face, Pname), cookie)
return GetMaterialfvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getMaterialfvRequest(c, ContextTag, Face, Pname), cookie)
return GetMaterialfvCookie{cookie}
}
-// Request reply for GetMaterialfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetMaterialfvReply represents the data returned from a GetMaterialfv request.
type GetMaterialfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -5006,7 +5239,7 @@ type GetMaterialfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetMaterialfv
+// Reply blocks and returns the reply data for a GetMaterialfv request.
func (cook GetMaterialfvCookie) Reply() (*GetMaterialfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5018,7 +5251,7 @@ func (cook GetMaterialfvCookie) Reply() (*GetMaterialfvReply, error) {
return getMaterialfvReply(buf), nil
}
-// Read reply into structure from buffer for GetMaterialfv
+// getMaterialfvReply reads a byte slice into a GetMaterialfvReply value.
func getMaterialfvReply(buf []byte) *GetMaterialfvReply {
v := new(GetMaterialfvReply)
b := 1 // skip reply determinant
@@ -5052,6 +5285,7 @@ func getMaterialfvReply(buf []byte) *GetMaterialfvReply {
}
// 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 {
size := 16
b := 0
@@ -5078,29 +5312,31 @@ func getMaterialfvRequest(c *xgb.Conn, ContextTag ContextTag, Face uint32, Pname
return buf
}
-// Request GetMaterialiv
-// size: 16
+// GetMaterialivCookie is a cookie used only for GetMaterialiv requests.
type GetMaterialivCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getMaterialivRequest(c, ContextTag, Face, Pname), cookie)
return GetMaterialivCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getMaterialivRequest(c, ContextTag, Face, Pname), cookie)
return GetMaterialivCookie{cookie}
}
-// Request reply for GetMaterialiv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetMaterialivReply represents the data returned from a GetMaterialiv request.
type GetMaterialivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -5109,7 +5345,7 @@ type GetMaterialivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetMaterialiv
+// Reply blocks and returns the reply data for a GetMaterialiv request.
func (cook GetMaterialivCookie) Reply() (*GetMaterialivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5121,7 +5357,7 @@ func (cook GetMaterialivCookie) Reply() (*GetMaterialivReply, error) {
return getMaterialivReply(buf), nil
}
-// Read reply into structure from buffer for GetMaterialiv
+// getMaterialivReply reads a byte slice into a GetMaterialivReply value.
func getMaterialivReply(buf []byte) *GetMaterialivReply {
v := new(GetMaterialivReply)
b := 1 // skip reply determinant
@@ -5155,6 +5391,7 @@ func getMaterialivReply(buf []byte) *GetMaterialivReply {
}
// 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 {
size := 16
b := 0
@@ -5181,29 +5418,31 @@ func getMaterialivRequest(c *xgb.Conn, ContextTag ContextTag, Face uint32, Pname
return buf
}
-// Request GetPixelMapfv
-// size: 12
+// GetPixelMapfvCookie is a cookie used only for GetPixelMapfv requests.
type GetPixelMapfvCookie struct {
*xgb.Cookie
}
+// GetPixelMapfv sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getPixelMapfvRequest(c, ContextTag, Map), cookie)
return GetPixelMapfvCookie{cookie}
}
+// GetPixelMapfvUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPixelMapfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Map uint32) GetPixelMapfvCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPixelMapfvRequest(c, ContextTag, Map), cookie)
return GetPixelMapfvCookie{cookie}
}
-// Request reply for GetPixelMapfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetPixelMapfvReply represents the data returned from a GetPixelMapfv request.
type GetPixelMapfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -5212,7 +5451,7 @@ type GetPixelMapfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetPixelMapfv
+// Reply blocks and returns the reply data for a GetPixelMapfv request.
func (cook GetPixelMapfvCookie) Reply() (*GetPixelMapfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5224,7 +5463,7 @@ func (cook GetPixelMapfvCookie) Reply() (*GetPixelMapfvReply, error) {
return getPixelMapfvReply(buf), nil
}
-// Read reply into structure from buffer for GetPixelMapfv
+// getPixelMapfvReply reads a byte slice into a GetPixelMapfvReply value.
func getPixelMapfvReply(buf []byte) *GetPixelMapfvReply {
v := new(GetPixelMapfvReply)
b := 1 // skip reply determinant
@@ -5258,6 +5497,7 @@ func getPixelMapfvReply(buf []byte) *GetPixelMapfvReply {
}
// Write request to wire for GetPixelMapfv
+// getPixelMapfvRequest writes a GetPixelMapfv request to a byte slice.
func getPixelMapfvRequest(c *xgb.Conn, ContextTag ContextTag, Map uint32) []byte {
size := 12
b := 0
@@ -5281,29 +5521,31 @@ func getPixelMapfvRequest(c *xgb.Conn, ContextTag ContextTag, Map uint32) []byte
return buf
}
-// Request GetPixelMapuiv
-// size: 12
+// GetPixelMapuivCookie is a cookie used only for GetPixelMapuiv requests.
type GetPixelMapuivCookie struct {
*xgb.Cookie
}
+// GetPixelMapuiv sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getPixelMapuivRequest(c, ContextTag, Map), cookie)
return GetPixelMapuivCookie{cookie}
}
+// GetPixelMapuivUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPixelMapuivUnchecked(c *xgb.Conn, ContextTag ContextTag, Map uint32) GetPixelMapuivCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPixelMapuivRequest(c, ContextTag, Map), cookie)
return GetPixelMapuivCookie{cookie}
}
-// Request reply for GetPixelMapuiv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetPixelMapuivReply represents the data returned from a GetPixelMapuiv request.
type GetPixelMapuivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -5312,7 +5554,7 @@ type GetPixelMapuivReply struct {
Data []uint32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetPixelMapuiv
+// Reply blocks and returns the reply data for a GetPixelMapuiv request.
func (cook GetPixelMapuivCookie) Reply() (*GetPixelMapuivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5324,7 +5566,7 @@ func (cook GetPixelMapuivCookie) Reply() (*GetPixelMapuivReply, error) {
return getPixelMapuivReply(buf), nil
}
-// Read reply into structure from buffer for GetPixelMapuiv
+// getPixelMapuivReply reads a byte slice into a GetPixelMapuivReply value.
func getPixelMapuivReply(buf []byte) *GetPixelMapuivReply {
v := new(GetPixelMapuivReply)
b := 1 // skip reply determinant
@@ -5358,6 +5600,7 @@ func getPixelMapuivReply(buf []byte) *GetPixelMapuivReply {
}
// Write request to wire for GetPixelMapuiv
+// getPixelMapuivRequest writes a GetPixelMapuiv request to a byte slice.
func getPixelMapuivRequest(c *xgb.Conn, ContextTag ContextTag, Map uint32) []byte {
size := 12
b := 0
@@ -5381,29 +5624,31 @@ func getPixelMapuivRequest(c *xgb.Conn, ContextTag ContextTag, Map uint32) []byt
return buf
}
-// Request GetPixelMapusv
-// size: 12
+// GetPixelMapusvCookie is a cookie used only for GetPixelMapusv requests.
type GetPixelMapusvCookie struct {
*xgb.Cookie
}
+// GetPixelMapusv sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getPixelMapusvRequest(c, ContextTag, Map), cookie)
return GetPixelMapusvCookie{cookie}
}
+// GetPixelMapusvUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPixelMapusvUnchecked(c *xgb.Conn, ContextTag ContextTag, Map uint32) GetPixelMapusvCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPixelMapusvRequest(c, ContextTag, Map), cookie)
return GetPixelMapusvCookie{cookie}
}
-// Request reply for GetPixelMapusv
-// size: (34 + xgb.Pad((int(N) * 2)))
+// GetPixelMapusvReply represents the data returned from a GetPixelMapusv request.
type GetPixelMapusvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -5412,7 +5657,7 @@ type GetPixelMapusvReply struct {
Data []uint16 // size: xgb.Pad((int(N) * 2))
}
-// Waits and reads reply data from request GetPixelMapusv
+// Reply blocks and returns the reply data for a GetPixelMapusv request.
func (cook GetPixelMapusvCookie) Reply() (*GetPixelMapusvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5424,7 +5669,7 @@ func (cook GetPixelMapusvCookie) Reply() (*GetPixelMapusvReply, error) {
return getPixelMapusvReply(buf), nil
}
-// Read reply into structure from buffer for GetPixelMapusv
+// getPixelMapusvReply reads a byte slice into a GetPixelMapusvReply value.
func getPixelMapusvReply(buf []byte) *GetPixelMapusvReply {
v := new(GetPixelMapusvReply)
b := 1 // skip reply determinant
@@ -5458,6 +5703,7 @@ func getPixelMapusvReply(buf []byte) *GetPixelMapusvReply {
}
// Write request to wire for GetPixelMapusv
+// getPixelMapusvRequest writes a GetPixelMapusv request to a byte slice.
func getPixelMapusvRequest(c *xgb.Conn, ContextTag ContextTag, Map uint32) []byte {
size := 12
b := 0
@@ -5481,35 +5727,37 @@ func getPixelMapusvRequest(c *xgb.Conn, ContextTag ContextTag, Map uint32) []byt
return buf
}
-// Request GetPolygonStipple
-// size: 12
+// GetPolygonStippleCookie is a cookie used only for GetPolygonStipple requests.
type GetPolygonStippleCookie struct {
*xgb.Cookie
}
+// GetPolygonStipple sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getPolygonStippleRequest(c, ContextTag, LsbFirst), cookie)
return GetPolygonStippleCookie{cookie}
}
+// GetPolygonStippleUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPolygonStippleUnchecked(c *xgb.Conn, ContextTag ContextTag, LsbFirst bool) GetPolygonStippleCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPolygonStippleRequest(c, ContextTag, LsbFirst), cookie)
return GetPolygonStippleCookie{cookie}
}
-// Request reply for GetPolygonStipple
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// GetPolygonStippleReply represents the data returned from a GetPolygonStipple request.
type GetPolygonStippleReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
Data []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request GetPolygonStipple
+// Reply blocks and returns the reply data for a GetPolygonStipple request.
func (cook GetPolygonStippleCookie) Reply() (*GetPolygonStippleReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5521,7 +5769,7 @@ func (cook GetPolygonStippleCookie) Reply() (*GetPolygonStippleReply, error) {
return getPolygonStippleReply(buf), nil
}
-// Read reply into structure from buffer for GetPolygonStipple
+// getPolygonStippleReply reads a byte slice into a GetPolygonStippleReply value.
func getPolygonStippleReply(buf []byte) *GetPolygonStippleReply {
v := new(GetPolygonStippleReply)
b := 1 // skip reply determinant
@@ -5544,6 +5792,7 @@ func getPolygonStippleReply(buf []byte) *GetPolygonStippleReply {
}
// Write request to wire for GetPolygonStipple
+// getPolygonStippleRequest writes a GetPolygonStipple request to a byte slice.
func getPolygonStippleRequest(c *xgb.Conn, ContextTag ContextTag, LsbFirst bool) []byte {
size := 12
b := 0
@@ -5571,29 +5820,31 @@ func getPolygonStippleRequest(c *xgb.Conn, ContextTag ContextTag, LsbFirst bool)
return buf
}
-// Request GetString
-// size: 12
+// GetStringCookie is a cookie used only for GetString requests.
type GetStringCookie struct {
*xgb.Cookie
}
+// GetString sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getStringRequest(c, ContextTag, Name), cookie)
return GetStringCookie{cookie}
}
+// GetStringUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetStringUnchecked(c *xgb.Conn, ContextTag ContextTag, Name uint32) GetStringCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getStringRequest(c, ContextTag, Name), cookie)
return GetStringCookie{cookie}
}
-// Request reply for GetString
-// size: (32 + xgb.Pad((int(N) * 1)))
+// GetStringReply represents the data returned from a GetString request.
type GetStringReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -5601,7 +5852,7 @@ type GetStringReply struct {
String string // size: xgb.Pad((int(N) * 1))
}
-// Waits and reads reply data from request GetString
+// Reply blocks and returns the reply data for a GetString request.
func (cook GetStringCookie) Reply() (*GetStringReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5613,7 +5864,7 @@ func (cook GetStringCookie) Reply() (*GetStringReply, error) {
return getStringReply(buf), nil
}
-// Read reply into structure from buffer for GetString
+// getStringReply reads a byte slice into a GetStringReply value.
func getStringReply(buf []byte) *GetStringReply {
v := new(GetStringReply)
b := 1 // skip reply determinant
@@ -5644,6 +5895,7 @@ func getStringReply(buf []byte) *GetStringReply {
}
// Write request to wire for GetString
+// getStringRequest writes a GetString request to a byte slice.
func getStringRequest(c *xgb.Conn, ContextTag ContextTag, Name uint32) []byte {
size := 12
b := 0
@@ -5667,29 +5919,31 @@ func getStringRequest(c *xgb.Conn, ContextTag ContextTag, Name uint32) []byte {
return buf
}
-// Request GetTexEnvfv
-// size: 16
+// GetTexEnvfvCookie is a cookie used only for GetTexEnvfv requests.
type GetTexEnvfvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getTexEnvfvRequest(c, ContextTag, Target, Pname), cookie)
return GetTexEnvfvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getTexEnvfvRequest(c, ContextTag, Target, Pname), cookie)
return GetTexEnvfvCookie{cookie}
}
-// Request reply for GetTexEnvfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetTexEnvfvReply represents the data returned from a GetTexEnvfv request.
type GetTexEnvfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -5698,7 +5952,7 @@ type GetTexEnvfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetTexEnvfv
+// Reply blocks and returns the reply data for a GetTexEnvfv request.
func (cook GetTexEnvfvCookie) Reply() (*GetTexEnvfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5710,7 +5964,7 @@ func (cook GetTexEnvfvCookie) Reply() (*GetTexEnvfvReply, error) {
return getTexEnvfvReply(buf), nil
}
-// Read reply into structure from buffer for GetTexEnvfv
+// getTexEnvfvReply reads a byte slice into a GetTexEnvfvReply value.
func getTexEnvfvReply(buf []byte) *GetTexEnvfvReply {
v := new(GetTexEnvfvReply)
b := 1 // skip reply determinant
@@ -5744,6 +5998,7 @@ func getTexEnvfvReply(buf []byte) *GetTexEnvfvReply {
}
// 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 {
size := 16
b := 0
@@ -5770,29 +6025,31 @@ func getTexEnvfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname
return buf
}
-// Request GetTexEnviv
-// size: 16
+// GetTexEnvivCookie is a cookie used only for GetTexEnviv requests.
type GetTexEnvivCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getTexEnvivRequest(c, ContextTag, Target, Pname), cookie)
return GetTexEnvivCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getTexEnvivRequest(c, ContextTag, Target, Pname), cookie)
return GetTexEnvivCookie{cookie}
}
-// Request reply for GetTexEnviv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetTexEnvivReply represents the data returned from a GetTexEnviv request.
type GetTexEnvivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -5801,7 +6058,7 @@ type GetTexEnvivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetTexEnviv
+// Reply blocks and returns the reply data for a GetTexEnviv request.
func (cook GetTexEnvivCookie) Reply() (*GetTexEnvivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5813,7 +6070,7 @@ func (cook GetTexEnvivCookie) Reply() (*GetTexEnvivReply, error) {
return getTexEnvivReply(buf), nil
}
-// Read reply into structure from buffer for GetTexEnviv
+// getTexEnvivReply reads a byte slice into a GetTexEnvivReply value.
func getTexEnvivReply(buf []byte) *GetTexEnvivReply {
v := new(GetTexEnvivReply)
b := 1 // skip reply determinant
@@ -5847,6 +6104,7 @@ func getTexEnvivReply(buf []byte) *GetTexEnvivReply {
}
// 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 {
size := 16
b := 0
@@ -5873,29 +6131,31 @@ func getTexEnvivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pname
return buf
}
-// Request GetTexGendv
-// size: 16
+// GetTexGendvCookie is a cookie used only for GetTexGendv requests.
type GetTexGendvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getTexGendvRequest(c, ContextTag, Coord, Pname), cookie)
return GetTexGendvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getTexGendvRequest(c, ContextTag, Coord, Pname), cookie)
return GetTexGendvCookie{cookie}
}
-// Request reply for GetTexGendv
-// size: (32 + xgb.Pad((int(N) * 8)))
+// GetTexGendvReply represents the data returned from a GetTexGendv request.
type GetTexGendvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -5904,7 +6164,7 @@ type GetTexGendvReply struct {
Data []Float64 // size: xgb.Pad((int(N) * 8))
}
-// Waits and reads reply data from request GetTexGendv
+// Reply blocks and returns the reply data for a GetTexGendv request.
func (cook GetTexGendvCookie) Reply() (*GetTexGendvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5916,7 +6176,7 @@ func (cook GetTexGendvCookie) Reply() (*GetTexGendvReply, error) {
return getTexGendvReply(buf), nil
}
-// Read reply into structure from buffer for GetTexGendv
+// getTexGendvReply reads a byte slice into a GetTexGendvReply value.
func getTexGendvReply(buf []byte) *GetTexGendvReply {
v := new(GetTexGendvReply)
b := 1 // skip reply determinant
@@ -5950,6 +6210,7 @@ func getTexGendvReply(buf []byte) *GetTexGendvReply {
}
// 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 {
size := 16
b := 0
@@ -5976,29 +6237,31 @@ func getTexGendvRequest(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname
return buf
}
-// Request GetTexGenfv
-// size: 16
+// GetTexGenfvCookie is a cookie used only for GetTexGenfv requests.
type GetTexGenfvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getTexGenfvRequest(c, ContextTag, Coord, Pname), cookie)
return GetTexGenfvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getTexGenfvRequest(c, ContextTag, Coord, Pname), cookie)
return GetTexGenfvCookie{cookie}
}
-// Request reply for GetTexGenfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetTexGenfvReply represents the data returned from a GetTexGenfv request.
type GetTexGenfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -6007,7 +6270,7 @@ type GetTexGenfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetTexGenfv
+// Reply blocks and returns the reply data for a GetTexGenfv request.
func (cook GetTexGenfvCookie) Reply() (*GetTexGenfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6019,7 +6282,7 @@ func (cook GetTexGenfvCookie) Reply() (*GetTexGenfvReply, error) {
return getTexGenfvReply(buf), nil
}
-// Read reply into structure from buffer for GetTexGenfv
+// getTexGenfvReply reads a byte slice into a GetTexGenfvReply value.
func getTexGenfvReply(buf []byte) *GetTexGenfvReply {
v := new(GetTexGenfvReply)
b := 1 // skip reply determinant
@@ -6053,6 +6316,7 @@ func getTexGenfvReply(buf []byte) *GetTexGenfvReply {
}
// 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 {
size := 16
b := 0
@@ -6079,29 +6343,31 @@ func getTexGenfvRequest(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname
return buf
}
-// Request GetTexGeniv
-// size: 16
+// GetTexGenivCookie is a cookie used only for GetTexGeniv requests.
type GetTexGenivCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getTexGenivRequest(c, ContextTag, Coord, Pname), cookie)
return GetTexGenivCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getTexGenivRequest(c, ContextTag, Coord, Pname), cookie)
return GetTexGenivCookie{cookie}
}
-// Request reply for GetTexGeniv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetTexGenivReply represents the data returned from a GetTexGeniv request.
type GetTexGenivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -6110,7 +6376,7 @@ type GetTexGenivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetTexGeniv
+// Reply blocks and returns the reply data for a GetTexGeniv request.
func (cook GetTexGenivCookie) Reply() (*GetTexGenivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6122,7 +6388,7 @@ func (cook GetTexGenivCookie) Reply() (*GetTexGenivReply, error) {
return getTexGenivReply(buf), nil
}
-// Read reply into structure from buffer for GetTexGeniv
+// getTexGenivReply reads a byte slice into a GetTexGenivReply value.
func getTexGenivReply(buf []byte) *GetTexGenivReply {
v := new(GetTexGenivReply)
b := 1 // skip reply determinant
@@ -6156,6 +6422,7 @@ func getTexGenivReply(buf []byte) *GetTexGenivReply {
}
// 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 {
size := 16
b := 0
@@ -6182,29 +6449,31 @@ func getTexGenivRequest(c *xgb.Conn, ContextTag ContextTag, Coord uint32, Pname
return buf
}
-// Request GetTexImage
-// size: 28
+// GetTexImageCookie is a cookie used only for GetTexImage requests.
type GetTexImageCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getTexImageRequest(c, ContextTag, Target, Level, Format, Type, SwapBytes), cookie)
return GetTexImageCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getTexImageRequest(c, ContextTag, Target, Level, Format, Type, SwapBytes), cookie)
return GetTexImageCookie{cookie}
}
-// Request reply for GetTexImage
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// GetTexImageReply represents the data returned from a GetTexImage request.
type GetTexImageReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 8 bytes
Width int32
@@ -6214,7 +6483,7 @@ type GetTexImageReply struct {
Data []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request GetTexImage
+// Reply blocks and returns the reply data for a GetTexImage request.
func (cook GetTexImageCookie) Reply() (*GetTexImageReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6226,7 +6495,7 @@ func (cook GetTexImageCookie) Reply() (*GetTexImageReply, error) {
return getTexImageReply(buf), nil
}
-// Read reply into structure from buffer for GetTexImage
+// getTexImageReply reads a byte slice into a GetTexImageReply value.
func getTexImageReply(buf []byte) *GetTexImageReply {
v := new(GetTexImageReply)
b := 1 // skip reply determinant
@@ -6260,6 +6529,7 @@ func getTexImageReply(buf []byte) *GetTexImageReply {
}
// 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 {
size := 28
b := 0
@@ -6299,29 +6569,31 @@ func getTexImageRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level
return buf
}
-// Request GetTexParameterfv
-// size: 16
+// GetTexParameterfvCookie is a cookie used only for GetTexParameterfv requests.
type GetTexParameterfvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getTexParameterfvRequest(c, ContextTag, Target, Pname), cookie)
return GetTexParameterfvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getTexParameterfvRequest(c, ContextTag, Target, Pname), cookie)
return GetTexParameterfvCookie{cookie}
}
-// Request reply for GetTexParameterfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetTexParameterfvReply represents the data returned from a GetTexParameterfv request.
type GetTexParameterfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -6330,7 +6602,7 @@ type GetTexParameterfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetTexParameterfv
+// Reply blocks and returns the reply data for a GetTexParameterfv request.
func (cook GetTexParameterfvCookie) Reply() (*GetTexParameterfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6342,7 +6614,7 @@ func (cook GetTexParameterfvCookie) Reply() (*GetTexParameterfvReply, error) {
return getTexParameterfvReply(buf), nil
}
-// Read reply into structure from buffer for GetTexParameterfv
+// getTexParameterfvReply reads a byte slice into a GetTexParameterfvReply value.
func getTexParameterfvReply(buf []byte) *GetTexParameterfvReply {
v := new(GetTexParameterfvReply)
b := 1 // skip reply determinant
@@ -6376,6 +6648,7 @@ func getTexParameterfvReply(buf []byte) *GetTexParameterfvReply {
}
// 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 {
size := 16
b := 0
@@ -6402,29 +6675,31 @@ func getTexParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32,
return buf
}
-// Request GetTexParameteriv
-// size: 16
+// GetTexParameterivCookie is a cookie used only for GetTexParameteriv requests.
type GetTexParameterivCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getTexParameterivRequest(c, ContextTag, Target, Pname), cookie)
return GetTexParameterivCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getTexParameterivRequest(c, ContextTag, Target, Pname), cookie)
return GetTexParameterivCookie{cookie}
}
-// Request reply for GetTexParameteriv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetTexParameterivReply represents the data returned from a GetTexParameteriv request.
type GetTexParameterivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -6433,7 +6708,7 @@ type GetTexParameterivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetTexParameteriv
+// Reply blocks and returns the reply data for a GetTexParameteriv request.
func (cook GetTexParameterivCookie) Reply() (*GetTexParameterivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6445,7 +6720,7 @@ func (cook GetTexParameterivCookie) Reply() (*GetTexParameterivReply, error) {
return getTexParameterivReply(buf), nil
}
-// Read reply into structure from buffer for GetTexParameteriv
+// getTexParameterivReply reads a byte slice into a GetTexParameterivReply value.
func getTexParameterivReply(buf []byte) *GetTexParameterivReply {
v := new(GetTexParameterivReply)
b := 1 // skip reply determinant
@@ -6479,6 +6754,7 @@ func getTexParameterivReply(buf []byte) *GetTexParameterivReply {
}
// 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 {
size := 16
b := 0
@@ -6505,29 +6781,31 @@ func getTexParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32,
return buf
}
-// Request GetTexLevelParameterfv
-// size: 20
+// GetTexLevelParameterfvCookie is a cookie used only for GetTexLevelParameterfv requests.
type GetTexLevelParameterfvCookie struct {
*xgb.Cookie
}
+// GetTexLevelParameterfv sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getTexLevelParameterfvRequest(c, ContextTag, Target, Level, Pname), cookie)
return GetTexLevelParameterfvCookie{cookie}
}
+// GetTexLevelParameterfvUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetTexLevelParameterfvUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Pname uint32) GetTexLevelParameterfvCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getTexLevelParameterfvRequest(c, ContextTag, Target, Level, Pname), cookie)
return GetTexLevelParameterfvCookie{cookie}
}
-// Request reply for GetTexLevelParameterfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetTexLevelParameterfvReply represents the data returned from a GetTexLevelParameterfv request.
type GetTexLevelParameterfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -6536,7 +6814,7 @@ type GetTexLevelParameterfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetTexLevelParameterfv
+// Reply blocks and returns the reply data for a GetTexLevelParameterfv request.
func (cook GetTexLevelParameterfvCookie) Reply() (*GetTexLevelParameterfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6548,7 +6826,7 @@ func (cook GetTexLevelParameterfvCookie) Reply() (*GetTexLevelParameterfvReply,
return getTexLevelParameterfvReply(buf), nil
}
-// Read reply into structure from buffer for GetTexLevelParameterfv
+// getTexLevelParameterfvReply reads a byte slice into a GetTexLevelParameterfvReply value.
func getTexLevelParameterfvReply(buf []byte) *GetTexLevelParameterfvReply {
v := new(GetTexLevelParameterfvReply)
b := 1 // skip reply determinant
@@ -6582,6 +6860,7 @@ func getTexLevelParameterfvReply(buf []byte) *GetTexLevelParameterfvReply {
}
// Write request to wire for GetTexLevelParameterfv
+// getTexLevelParameterfvRequest writes a GetTexLevelParameterfv request to a byte slice.
func getTexLevelParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Pname uint32) []byte {
size := 20
b := 0
@@ -6611,29 +6890,31 @@ func getTexLevelParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target ui
return buf
}
-// Request GetTexLevelParameteriv
-// size: 20
+// GetTexLevelParameterivCookie is a cookie used only for GetTexLevelParameteriv requests.
type GetTexLevelParameterivCookie struct {
*xgb.Cookie
}
+// GetTexLevelParameteriv sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getTexLevelParameterivRequest(c, ContextTag, Target, Level, Pname), cookie)
return GetTexLevelParameterivCookie{cookie}
}
+// GetTexLevelParameterivUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetTexLevelParameterivUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Pname uint32) GetTexLevelParameterivCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getTexLevelParameterivRequest(c, ContextTag, Target, Level, Pname), cookie)
return GetTexLevelParameterivCookie{cookie}
}
-// Request reply for GetTexLevelParameteriv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetTexLevelParameterivReply represents the data returned from a GetTexLevelParameteriv request.
type GetTexLevelParameterivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -6642,7 +6923,7 @@ type GetTexLevelParameterivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetTexLevelParameteriv
+// Reply blocks and returns the reply data for a GetTexLevelParameteriv request.
func (cook GetTexLevelParameterivCookie) Reply() (*GetTexLevelParameterivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6654,7 +6935,7 @@ func (cook GetTexLevelParameterivCookie) Reply() (*GetTexLevelParameterivReply,
return getTexLevelParameterivReply(buf), nil
}
-// Read reply into structure from buffer for GetTexLevelParameteriv
+// getTexLevelParameterivReply reads a byte slice into a GetTexLevelParameterivReply value.
func getTexLevelParameterivReply(buf []byte) *GetTexLevelParameterivReply {
v := new(GetTexLevelParameterivReply)
b := 1 // skip reply determinant
@@ -6688,6 +6969,7 @@ func getTexLevelParameterivReply(buf []byte) *GetTexLevelParameterivReply {
}
// Write request to wire for GetTexLevelParameteriv
+// getTexLevelParameterivRequest writes a GetTexLevelParameteriv request to a byte slice.
func getTexLevelParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32, Pname uint32) []byte {
size := 20
b := 0
@@ -6717,34 +6999,36 @@ func getTexLevelParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target ui
return buf
}
-// Request IsList
-// size: 12
+// IsListCookie is a cookie used only for IsList requests.
type IsListCookie struct {
*xgb.Cookie
}
+// IsList sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(isListRequest(c, ContextTag, List), cookie)
return IsListCookie{cookie}
}
+// IsListUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func IsListUnchecked(c *xgb.Conn, ContextTag ContextTag, List uint32) IsListCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(isListRequest(c, ContextTag, List), cookie)
return IsListCookie{cookie}
}
-// Request reply for IsList
-// size: 12
+// IsListReply represents the data returned from a IsList request.
type IsListReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
RetVal Bool32
}
-// Waits and reads reply data from request IsList
+// Reply blocks and returns the reply data for a IsList request.
func (cook IsListCookie) Reply() (*IsListReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6756,7 +7040,7 @@ func (cook IsListCookie) Reply() (*IsListReply, error) {
return isListReply(buf), nil
}
-// Read reply into structure from buffer for IsList
+// isListReply reads a byte slice into a IsListReply value.
func isListReply(buf []byte) *IsListReply {
v := new(IsListReply)
b := 1 // skip reply determinant
@@ -6776,6 +7060,7 @@ func isListReply(buf []byte) *IsListReply {
}
// Write request to wire for IsList
+// isListRequest writes a IsList request to a byte slice.
func isListRequest(c *xgb.Conn, ContextTag ContextTag, List uint32) []byte {
size := 12
b := 0
@@ -6799,30 +7084,35 @@ func isListRequest(c *xgb.Conn, ContextTag ContextTag, List uint32) []byte {
return buf
}
-// Request Flush
-// size: 8
+// FlushCookie is a cookie used only for Flush requests.
type FlushCookie struct {
*xgb.Cookie
}
-// Write request to wire for Flush
+// Flush sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Flush(c *xgb.Conn, ContextTag ContextTag) FlushCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(flushRequest(c, ContextTag), cookie)
return FlushCookie{cookie}
}
+// FlushChecked sends a checked request.
+// If an error occurs, it can be retrieved using FlushCookie.Check()
func FlushChecked(c *xgb.Conn, ContextTag ContextTag) FlushCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(flushRequest(c, ContextTag), cookie)
return FlushCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FlushCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Flush
+// flushRequest writes a Flush request to a byte slice.
func flushRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
size := 8
b := 0
@@ -6843,36 +7133,38 @@ func flushRequest(c *xgb.Conn, ContextTag ContextTag) []byte {
return buf
}
-// Request AreTexturesResident
-// size: xgb.Pad((12 + xgb.Pad((int(N) * 4))))
+// AreTexturesResidentCookie is a cookie used only for AreTexturesResident requests.
type AreTexturesResidentCookie struct {
*xgb.Cookie
}
+// AreTexturesResident sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(areTexturesResidentRequest(c, ContextTag, N, Textures), cookie)
return AreTexturesResidentCookie{cookie}
}
+// AreTexturesResidentUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func AreTexturesResidentUnchecked(c *xgb.Conn, ContextTag ContextTag, N int32, Textures []uint32) AreTexturesResidentCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(areTexturesResidentRequest(c, ContextTag, N, Textures), cookie)
return AreTexturesResidentCookie{cookie}
}
-// Request reply for AreTexturesResident
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// AreTexturesResidentReply represents the data returned from a AreTexturesResident request.
type AreTexturesResidentReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
RetVal Bool32
// padding: 20 bytes
Data []bool // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request AreTexturesResident
+// Reply blocks and returns the reply data for a AreTexturesResident request.
func (cook AreTexturesResidentCookie) Reply() (*AreTexturesResidentReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6884,7 +7176,7 @@ func (cook AreTexturesResidentCookie) Reply() (*AreTexturesResidentReply, error)
return areTexturesResidentReply(buf), nil
}
-// Read reply into structure from buffer for AreTexturesResident
+// areTexturesResidentReply reads a byte slice into a AreTexturesResidentReply value.
func areTexturesResidentReply(buf []byte) *AreTexturesResidentReply {
v := new(AreTexturesResidentReply)
b := 1 // skip reply determinant
@@ -6917,6 +7209,7 @@ func areTexturesResidentReply(buf []byte) *AreTexturesResidentReply {
}
// Write request to wire for AreTexturesResident
+// areTexturesResidentRequest writes a AreTexturesResident request to a byte slice.
func areTexturesResidentRequest(c *xgb.Conn, ContextTag ContextTag, N int32, Textures []uint32) []byte {
size := xgb.Pad((12 + xgb.Pad((int(N) * 4))))
b := 0
@@ -6946,30 +7239,35 @@ func areTexturesResidentRequest(c *xgb.Conn, ContextTag ContextTag, N int32, Tex
return buf
}
-// Request DeleteTextures
-// size: xgb.Pad((12 + xgb.Pad((int(N) * 4))))
+// DeleteTexturesCookie is a cookie used only for DeleteTextures requests.
type DeleteTexturesCookie struct {
*xgb.Cookie
}
-// Write request to wire for DeleteTextures
+// DeleteTextures sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DeleteTextures(c *xgb.Conn, ContextTag ContextTag, N int32, Textures []uint32) DeleteTexturesCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(deleteTexturesRequest(c, ContextTag, N, Textures), cookie)
return DeleteTexturesCookie{cookie}
}
+// DeleteTexturesChecked sends a checked request.
+// If an error occurs, it can be retrieved using DeleteTexturesCookie.Check()
func DeleteTexturesChecked(c *xgb.Conn, ContextTag ContextTag, N int32, Textures []uint32) DeleteTexturesCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(deleteTexturesRequest(c, ContextTag, N, Textures), cookie)
return DeleteTexturesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DeleteTexturesCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DeleteTextures
+// deleteTexturesRequest writes a DeleteTextures request to a byte slice.
func deleteTexturesRequest(c *xgb.Conn, ContextTag ContextTag, N int32, Textures []uint32) []byte {
size := xgb.Pad((12 + xgb.Pad((int(N) * 4))))
b := 0
@@ -6999,35 +7297,37 @@ func deleteTexturesRequest(c *xgb.Conn, ContextTag ContextTag, N int32, Textures
return buf
}
-// Request GenTextures
-// size: 12
+// GenTexturesCookie is a cookie used only for GenTextures requests.
type GenTexturesCookie struct {
*xgb.Cookie
}
+// GenTextures sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(genTexturesRequest(c, ContextTag, N), cookie)
return GenTexturesCookie{cookie}
}
+// GenTexturesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GenTexturesUnchecked(c *xgb.Conn, ContextTag ContextTag, N int32) GenTexturesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(genTexturesRequest(c, ContextTag, N), cookie)
return GenTexturesCookie{cookie}
}
-// Request reply for GenTextures
-// size: (32 + xgb.Pad((int(Length) * 4)))
+// GenTexturesReply represents the data returned from a GenTextures request.
type GenTexturesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
Data []uint32 // size: xgb.Pad((int(Length) * 4))
}
-// Waits and reads reply data from request GenTextures
+// Reply blocks and returns the reply data for a GenTextures request.
func (cook GenTexturesCookie) Reply() (*GenTexturesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7039,7 +7339,7 @@ func (cook GenTexturesCookie) Reply() (*GenTexturesReply, error) {
return genTexturesReply(buf), nil
}
-// Read reply into structure from buffer for GenTextures
+// genTexturesReply reads a byte slice into a GenTexturesReply value.
func genTexturesReply(buf []byte) *GenTexturesReply {
v := new(GenTexturesReply)
b := 1 // skip reply determinant
@@ -7065,6 +7365,7 @@ func genTexturesReply(buf []byte) *GenTexturesReply {
}
// Write request to wire for GenTextures
+// genTexturesRequest writes a GenTextures request to a byte slice.
func genTexturesRequest(c *xgb.Conn, ContextTag ContextTag, N int32) []byte {
size := 12
b := 0
@@ -7088,34 +7389,36 @@ func genTexturesRequest(c *xgb.Conn, ContextTag ContextTag, N int32) []byte {
return buf
}
-// Request IsTexture
-// size: 12
+// IsTextureCookie is a cookie used only for IsTexture requests.
type IsTextureCookie struct {
*xgb.Cookie
}
+// IsTexture sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(isTextureRequest(c, ContextTag, Texture), cookie)
return IsTextureCookie{cookie}
}
+// IsTextureUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func IsTextureUnchecked(c *xgb.Conn, ContextTag ContextTag, Texture uint32) IsTextureCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(isTextureRequest(c, ContextTag, Texture), cookie)
return IsTextureCookie{cookie}
}
-// Request reply for IsTexture
-// size: 12
+// IsTextureReply represents the data returned from a IsTexture request.
type IsTextureReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
RetVal Bool32
}
-// Waits and reads reply data from request IsTexture
+// Reply blocks and returns the reply data for a IsTexture request.
func (cook IsTextureCookie) Reply() (*IsTextureReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7127,7 +7430,7 @@ func (cook IsTextureCookie) Reply() (*IsTextureReply, error) {
return isTextureReply(buf), nil
}
-// Read reply into structure from buffer for IsTexture
+// isTextureReply reads a byte slice into a IsTextureReply value.
func isTextureReply(buf []byte) *IsTextureReply {
v := new(IsTextureReply)
b := 1 // skip reply determinant
@@ -7147,6 +7450,7 @@ func isTextureReply(buf []byte) *IsTextureReply {
}
// Write request to wire for IsTexture
+// isTextureRequest writes a IsTexture request to a byte slice.
func isTextureRequest(c *xgb.Conn, ContextTag ContextTag, Texture uint32) []byte {
size := 12
b := 0
@@ -7170,29 +7474,31 @@ func isTextureRequest(c *xgb.Conn, ContextTag ContextTag, Texture uint32) []byte
return buf
}
-// Request GetColorTable
-// size: 24
+// GetColorTableCookie is a cookie used only for GetColorTable requests.
type GetColorTableCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getColorTableRequest(c, ContextTag, Target, Format, Type, SwapBytes), cookie)
return GetColorTableCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getColorTableRequest(c, ContextTag, Target, Format, Type, SwapBytes), cookie)
return GetColorTableCookie{cookie}
}
-// Request reply for GetColorTable
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// GetColorTableReply represents the data returned from a GetColorTable request.
type GetColorTableReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 8 bytes
Width int32
@@ -7200,7 +7506,7 @@ type GetColorTableReply struct {
Data []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request GetColorTable
+// Reply blocks and returns the reply data for a GetColorTable request.
func (cook GetColorTableCookie) Reply() (*GetColorTableReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7212,7 +7518,7 @@ func (cook GetColorTableCookie) Reply() (*GetColorTableReply, error) {
return getColorTableReply(buf), nil
}
-// Read reply into structure from buffer for GetColorTable
+// getColorTableReply reads a byte slice into a GetColorTableReply value.
func getColorTableReply(buf []byte) *GetColorTableReply {
v := new(GetColorTableReply)
b := 1 // skip reply determinant
@@ -7240,6 +7546,7 @@ func getColorTableReply(buf []byte) *GetColorTableReply {
}
// 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 {
size := 24
b := 0
@@ -7276,29 +7583,31 @@ func getColorTableRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, For
return buf
}
-// Request GetColorTableParameterfv
-// size: 16
+// GetColorTableParameterfvCookie is a cookie used only for GetColorTableParameterfv requests.
type GetColorTableParameterfvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getColorTableParameterfvRequest(c, ContextTag, Target, Pname), cookie)
return GetColorTableParameterfvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getColorTableParameterfvRequest(c, ContextTag, Target, Pname), cookie)
return GetColorTableParameterfvCookie{cookie}
}
-// Request reply for GetColorTableParameterfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetColorTableParameterfvReply represents the data returned from a GetColorTableParameterfv request.
type GetColorTableParameterfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -7307,7 +7616,7 @@ type GetColorTableParameterfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetColorTableParameterfv
+// Reply blocks and returns the reply data for a GetColorTableParameterfv request.
func (cook GetColorTableParameterfvCookie) Reply() (*GetColorTableParameterfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7319,7 +7628,7 @@ func (cook GetColorTableParameterfvCookie) Reply() (*GetColorTableParameterfvRep
return getColorTableParameterfvReply(buf), nil
}
-// Read reply into structure from buffer for GetColorTableParameterfv
+// getColorTableParameterfvReply reads a byte slice into a GetColorTableParameterfvReply value.
func getColorTableParameterfvReply(buf []byte) *GetColorTableParameterfvReply {
v := new(GetColorTableParameterfvReply)
b := 1 // skip reply determinant
@@ -7353,6 +7662,7 @@ func getColorTableParameterfvReply(buf []byte) *GetColorTableParameterfvReply {
}
// 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 {
size := 16
b := 0
@@ -7379,29 +7689,31 @@ func getColorTableParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target
return buf
}
-// Request GetColorTableParameteriv
-// size: 16
+// GetColorTableParameterivCookie is a cookie used only for GetColorTableParameteriv requests.
type GetColorTableParameterivCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getColorTableParameterivRequest(c, ContextTag, Target, Pname), cookie)
return GetColorTableParameterivCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getColorTableParameterivRequest(c, ContextTag, Target, Pname), cookie)
return GetColorTableParameterivCookie{cookie}
}
-// Request reply for GetColorTableParameteriv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetColorTableParameterivReply represents the data returned from a GetColorTableParameteriv request.
type GetColorTableParameterivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -7410,7 +7722,7 @@ type GetColorTableParameterivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetColorTableParameteriv
+// Reply blocks and returns the reply data for a GetColorTableParameteriv request.
func (cook GetColorTableParameterivCookie) Reply() (*GetColorTableParameterivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7422,7 +7734,7 @@ func (cook GetColorTableParameterivCookie) Reply() (*GetColorTableParameterivRep
return getColorTableParameterivReply(buf), nil
}
-// Read reply into structure from buffer for GetColorTableParameteriv
+// getColorTableParameterivReply reads a byte slice into a GetColorTableParameterivReply value.
func getColorTableParameterivReply(buf []byte) *GetColorTableParameterivReply {
v := new(GetColorTableParameterivReply)
b := 1 // skip reply determinant
@@ -7456,6 +7768,7 @@ func getColorTableParameterivReply(buf []byte) *GetColorTableParameterivReply {
}
// 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 {
size := 16
b := 0
@@ -7482,29 +7795,31 @@ func getColorTableParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target
return buf
}
-// Request GetConvolutionFilter
-// size: 24
+// GetConvolutionFilterCookie is a cookie used only for GetConvolutionFilter requests.
type GetConvolutionFilterCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getConvolutionFilterRequest(c, ContextTag, Target, Format, Type, SwapBytes), cookie)
return GetConvolutionFilterCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getConvolutionFilterRequest(c, ContextTag, Target, Format, Type, SwapBytes), cookie)
return GetConvolutionFilterCookie{cookie}
}
-// Request reply for GetConvolutionFilter
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// GetConvolutionFilterReply represents the data returned from a GetConvolutionFilter request.
type GetConvolutionFilterReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 8 bytes
Width int32
@@ -7513,7 +7828,7 @@ type GetConvolutionFilterReply struct {
Data []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request GetConvolutionFilter
+// Reply blocks and returns the reply data for a GetConvolutionFilter request.
func (cook GetConvolutionFilterCookie) Reply() (*GetConvolutionFilterReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7525,7 +7840,7 @@ func (cook GetConvolutionFilterCookie) Reply() (*GetConvolutionFilterReply, erro
return getConvolutionFilterReply(buf), nil
}
-// Read reply into structure from buffer for GetConvolutionFilter
+// getConvolutionFilterReply reads a byte slice into a GetConvolutionFilterReply value.
func getConvolutionFilterReply(buf []byte) *GetConvolutionFilterReply {
v := new(GetConvolutionFilterReply)
b := 1 // skip reply determinant
@@ -7556,6 +7871,7 @@ func getConvolutionFilterReply(buf []byte) *GetConvolutionFilterReply {
}
// 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 {
size := 24
b := 0
@@ -7592,29 +7908,31 @@ func getConvolutionFilterRequest(c *xgb.Conn, ContextTag ContextTag, Target uint
return buf
}
-// Request GetConvolutionParameterfv
-// size: 16
+// GetConvolutionParameterfvCookie is a cookie used only for GetConvolutionParameterfv requests.
type GetConvolutionParameterfvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getConvolutionParameterfvRequest(c, ContextTag, Target, Pname), cookie)
return GetConvolutionParameterfvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getConvolutionParameterfvRequest(c, ContextTag, Target, Pname), cookie)
return GetConvolutionParameterfvCookie{cookie}
}
-// Request reply for GetConvolutionParameterfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetConvolutionParameterfvReply represents the data returned from a GetConvolutionParameterfv request.
type GetConvolutionParameterfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -7623,7 +7941,7 @@ type GetConvolutionParameterfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetConvolutionParameterfv
+// Reply blocks and returns the reply data for a GetConvolutionParameterfv request.
func (cook GetConvolutionParameterfvCookie) Reply() (*GetConvolutionParameterfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7635,7 +7953,7 @@ func (cook GetConvolutionParameterfvCookie) Reply() (*GetConvolutionParameterfvR
return getConvolutionParameterfvReply(buf), nil
}
-// Read reply into structure from buffer for GetConvolutionParameterfv
+// getConvolutionParameterfvReply reads a byte slice into a GetConvolutionParameterfvReply value.
func getConvolutionParameterfvReply(buf []byte) *GetConvolutionParameterfvReply {
v := new(GetConvolutionParameterfvReply)
b := 1 // skip reply determinant
@@ -7669,6 +7987,7 @@ func getConvolutionParameterfvReply(buf []byte) *GetConvolutionParameterfvReply
}
// 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 {
size := 16
b := 0
@@ -7695,29 +8014,31 @@ func getConvolutionParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target
return buf
}
-// Request GetConvolutionParameteriv
-// size: 16
+// GetConvolutionParameterivCookie is a cookie used only for GetConvolutionParameteriv requests.
type GetConvolutionParameterivCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getConvolutionParameterivRequest(c, ContextTag, Target, Pname), cookie)
return GetConvolutionParameterivCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getConvolutionParameterivRequest(c, ContextTag, Target, Pname), cookie)
return GetConvolutionParameterivCookie{cookie}
}
-// Request reply for GetConvolutionParameteriv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetConvolutionParameterivReply represents the data returned from a GetConvolutionParameteriv request.
type GetConvolutionParameterivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -7726,7 +8047,7 @@ type GetConvolutionParameterivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetConvolutionParameteriv
+// Reply blocks and returns the reply data for a GetConvolutionParameteriv request.
func (cook GetConvolutionParameterivCookie) Reply() (*GetConvolutionParameterivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7738,7 +8059,7 @@ func (cook GetConvolutionParameterivCookie) Reply() (*GetConvolutionParameterivR
return getConvolutionParameterivReply(buf), nil
}
-// Read reply into structure from buffer for GetConvolutionParameteriv
+// getConvolutionParameterivReply reads a byte slice into a GetConvolutionParameterivReply value.
func getConvolutionParameterivReply(buf []byte) *GetConvolutionParameterivReply {
v := new(GetConvolutionParameterivReply)
b := 1 // skip reply determinant
@@ -7772,6 +8093,7 @@ func getConvolutionParameterivReply(buf []byte) *GetConvolutionParameterivReply
}
// 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 {
size := 16
b := 0
@@ -7798,29 +8120,31 @@ func getConvolutionParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target
return buf
}
-// Request GetSeparableFilter
-// size: 24
+// GetSeparableFilterCookie is a cookie used only for GetSeparableFilter requests.
type GetSeparableFilterCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getSeparableFilterRequest(c, ContextTag, Target, Format, Type, SwapBytes), cookie)
return GetSeparableFilterCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getSeparableFilterRequest(c, ContextTag, Target, Format, Type, SwapBytes), cookie)
return GetSeparableFilterCookie{cookie}
}
-// Request reply for GetSeparableFilter
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// GetSeparableFilterReply represents the data returned from a GetSeparableFilter request.
type GetSeparableFilterReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 8 bytes
RowW int32
@@ -7829,7 +8153,7 @@ type GetSeparableFilterReply struct {
RowsAndCols []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request GetSeparableFilter
+// Reply blocks and returns the reply data for a GetSeparableFilter request.
func (cook GetSeparableFilterCookie) Reply() (*GetSeparableFilterReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7841,7 +8165,7 @@ func (cook GetSeparableFilterCookie) Reply() (*GetSeparableFilterReply, error) {
return getSeparableFilterReply(buf), nil
}
-// Read reply into structure from buffer for GetSeparableFilter
+// getSeparableFilterReply reads a byte slice into a GetSeparableFilterReply value.
func getSeparableFilterReply(buf []byte) *GetSeparableFilterReply {
v := new(GetSeparableFilterReply)
b := 1 // skip reply determinant
@@ -7872,6 +8196,7 @@ func getSeparableFilterReply(buf []byte) *GetSeparableFilterReply {
}
// 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 {
size := 24
b := 0
@@ -7908,29 +8233,31 @@ func getSeparableFilterRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32
return buf
}
-// Request GetHistogram
-// size: 24
+// GetHistogramCookie is a cookie used only for GetHistogram requests.
type GetHistogramCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getHistogramRequest(c, ContextTag, Target, Format, Type, SwapBytes, Reset), cookie)
return GetHistogramCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getHistogramRequest(c, ContextTag, Target, Format, Type, SwapBytes, Reset), cookie)
return GetHistogramCookie{cookie}
}
-// Request reply for GetHistogram
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// GetHistogramReply represents the data returned from a GetHistogram request.
type GetHistogramReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 8 bytes
Width int32
@@ -7938,7 +8265,7 @@ type GetHistogramReply struct {
Data []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request GetHistogram
+// Reply blocks and returns the reply data for a GetHistogram request.
func (cook GetHistogramCookie) Reply() (*GetHistogramReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7950,7 +8277,7 @@ func (cook GetHistogramCookie) Reply() (*GetHistogramReply, error) {
return getHistogramReply(buf), nil
}
-// Read reply into structure from buffer for GetHistogram
+// getHistogramReply reads a byte slice into a GetHistogramReply value.
func getHistogramReply(buf []byte) *GetHistogramReply {
v := new(GetHistogramReply)
b := 1 // skip reply determinant
@@ -7978,6 +8305,7 @@ func getHistogramReply(buf []byte) *GetHistogramReply {
}
// 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 {
size := 24
b := 0
@@ -8021,29 +8349,31 @@ func getHistogramRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Form
return buf
}
-// Request GetHistogramParameterfv
-// size: 16
+// GetHistogramParameterfvCookie is a cookie used only for GetHistogramParameterfv requests.
type GetHistogramParameterfvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getHistogramParameterfvRequest(c, ContextTag, Target, Pname), cookie)
return GetHistogramParameterfvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getHistogramParameterfvRequest(c, ContextTag, Target, Pname), cookie)
return GetHistogramParameterfvCookie{cookie}
}
-// Request reply for GetHistogramParameterfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetHistogramParameterfvReply represents the data returned from a GetHistogramParameterfv request.
type GetHistogramParameterfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -8052,7 +8382,7 @@ type GetHistogramParameterfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetHistogramParameterfv
+// Reply blocks and returns the reply data for a GetHistogramParameterfv request.
func (cook GetHistogramParameterfvCookie) Reply() (*GetHistogramParameterfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8064,7 +8394,7 @@ func (cook GetHistogramParameterfvCookie) Reply() (*GetHistogramParameterfvReply
return getHistogramParameterfvReply(buf), nil
}
-// Read reply into structure from buffer for GetHistogramParameterfv
+// getHistogramParameterfvReply reads a byte slice into a GetHistogramParameterfvReply value.
func getHistogramParameterfvReply(buf []byte) *GetHistogramParameterfvReply {
v := new(GetHistogramParameterfvReply)
b := 1 // skip reply determinant
@@ -8098,6 +8428,7 @@ func getHistogramParameterfvReply(buf []byte) *GetHistogramParameterfvReply {
}
// 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 {
size := 16
b := 0
@@ -8124,29 +8455,31 @@ func getHistogramParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target u
return buf
}
-// Request GetHistogramParameteriv
-// size: 16
+// GetHistogramParameterivCookie is a cookie used only for GetHistogramParameteriv requests.
type GetHistogramParameterivCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getHistogramParameterivRequest(c, ContextTag, Target, Pname), cookie)
return GetHistogramParameterivCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getHistogramParameterivRequest(c, ContextTag, Target, Pname), cookie)
return GetHistogramParameterivCookie{cookie}
}
-// Request reply for GetHistogramParameteriv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetHistogramParameterivReply represents the data returned from a GetHistogramParameteriv request.
type GetHistogramParameterivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -8155,7 +8488,7 @@ type GetHistogramParameterivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetHistogramParameteriv
+// Reply blocks and returns the reply data for a GetHistogramParameteriv request.
func (cook GetHistogramParameterivCookie) Reply() (*GetHistogramParameterivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8167,7 +8500,7 @@ func (cook GetHistogramParameterivCookie) Reply() (*GetHistogramParameterivReply
return getHistogramParameterivReply(buf), nil
}
-// Read reply into structure from buffer for GetHistogramParameteriv
+// getHistogramParameterivReply reads a byte slice into a GetHistogramParameterivReply value.
func getHistogramParameterivReply(buf []byte) *GetHistogramParameterivReply {
v := new(GetHistogramParameterivReply)
b := 1 // skip reply determinant
@@ -8201,6 +8534,7 @@ func getHistogramParameterivReply(buf []byte) *GetHistogramParameterivReply {
}
// 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 {
size := 16
b := 0
@@ -8227,35 +8561,37 @@ func getHistogramParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target u
return buf
}
-// Request GetMinmax
-// size: 24
+// GetMinmaxCookie is a cookie used only for GetMinmax requests.
type GetMinmaxCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getMinmaxRequest(c, ContextTag, Target, Format, Type, SwapBytes, Reset), cookie)
return GetMinmaxCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getMinmaxRequest(c, ContextTag, Target, Format, Type, SwapBytes, Reset), cookie)
return GetMinmaxCookie{cookie}
}
-// Request reply for GetMinmax
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// GetMinmaxReply represents the data returned from a GetMinmax request.
type GetMinmaxReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
Data []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request GetMinmax
+// Reply blocks and returns the reply data for a GetMinmax request.
func (cook GetMinmaxCookie) Reply() (*GetMinmaxReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8267,7 +8603,7 @@ func (cook GetMinmaxCookie) Reply() (*GetMinmaxReply, error) {
return getMinmaxReply(buf), nil
}
-// Read reply into structure from buffer for GetMinmax
+// getMinmaxReply reads a byte slice into a GetMinmaxReply value.
func getMinmaxReply(buf []byte) *GetMinmaxReply {
v := new(GetMinmaxReply)
b := 1 // skip reply determinant
@@ -8290,6 +8626,7 @@ func getMinmaxReply(buf []byte) *GetMinmaxReply {
}
// 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 {
size := 24
b := 0
@@ -8333,29 +8670,31 @@ func getMinmaxRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Format
return buf
}
-// Request GetMinmaxParameterfv
-// size: 16
+// GetMinmaxParameterfvCookie is a cookie used only for GetMinmaxParameterfv requests.
type GetMinmaxParameterfvCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getMinmaxParameterfvRequest(c, ContextTag, Target, Pname), cookie)
return GetMinmaxParameterfvCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getMinmaxParameterfvRequest(c, ContextTag, Target, Pname), cookie)
return GetMinmaxParameterfvCookie{cookie}
}
-// Request reply for GetMinmaxParameterfv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetMinmaxParameterfvReply represents the data returned from a GetMinmaxParameterfv request.
type GetMinmaxParameterfvReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -8364,7 +8703,7 @@ type GetMinmaxParameterfvReply struct {
Data []Float32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetMinmaxParameterfv
+// Reply blocks and returns the reply data for a GetMinmaxParameterfv request.
func (cook GetMinmaxParameterfvCookie) Reply() (*GetMinmaxParameterfvReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8376,7 +8715,7 @@ func (cook GetMinmaxParameterfvCookie) Reply() (*GetMinmaxParameterfvReply, erro
return getMinmaxParameterfvReply(buf), nil
}
-// Read reply into structure from buffer for GetMinmaxParameterfv
+// getMinmaxParameterfvReply reads a byte slice into a GetMinmaxParameterfvReply value.
func getMinmaxParameterfvReply(buf []byte) *GetMinmaxParameterfvReply {
v := new(GetMinmaxParameterfvReply)
b := 1 // skip reply determinant
@@ -8410,6 +8749,7 @@ func getMinmaxParameterfvReply(buf []byte) *GetMinmaxParameterfvReply {
}
// 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 {
size := 16
b := 0
@@ -8436,29 +8776,31 @@ func getMinmaxParameterfvRequest(c *xgb.Conn, ContextTag ContextTag, Target uint
return buf
}
-// Request GetMinmaxParameteriv
-// size: 16
+// GetMinmaxParameterivCookie is a cookie used only for GetMinmaxParameteriv requests.
type GetMinmaxParameterivCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getMinmaxParameterivRequest(c, ContextTag, Target, Pname), cookie)
return GetMinmaxParameterivCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getMinmaxParameterivRequest(c, ContextTag, Target, Pname), cookie)
return GetMinmaxParameterivCookie{cookie}
}
-// Request reply for GetMinmaxParameteriv
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetMinmaxParameterivReply represents the data returned from a GetMinmaxParameteriv request.
type GetMinmaxParameterivReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -8467,7 +8809,7 @@ type GetMinmaxParameterivReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetMinmaxParameteriv
+// Reply blocks and returns the reply data for a GetMinmaxParameteriv request.
func (cook GetMinmaxParameterivCookie) Reply() (*GetMinmaxParameterivReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8479,7 +8821,7 @@ func (cook GetMinmaxParameterivCookie) Reply() (*GetMinmaxParameterivReply, erro
return getMinmaxParameterivReply(buf), nil
}
-// Read reply into structure from buffer for GetMinmaxParameteriv
+// getMinmaxParameterivReply reads a byte slice into a GetMinmaxParameterivReply value.
func getMinmaxParameterivReply(buf []byte) *GetMinmaxParameterivReply {
v := new(GetMinmaxParameterivReply)
b := 1 // skip reply determinant
@@ -8513,6 +8855,7 @@ func getMinmaxParameterivReply(buf []byte) *GetMinmaxParameterivReply {
}
// 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 {
size := 16
b := 0
@@ -8539,29 +8882,31 @@ func getMinmaxParameterivRequest(c *xgb.Conn, ContextTag ContextTag, Target uint
return buf
}
-// Request GetCompressedTexImageARB
-// size: 16
+// GetCompressedTexImageARBCookie is a cookie used only for GetCompressedTexImageARB requests.
type GetCompressedTexImageARBCookie struct {
*xgb.Cookie
}
+// GetCompressedTexImageARB sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getCompressedTexImageARBRequest(c, ContextTag, Target, Level), cookie)
return GetCompressedTexImageARBCookie{cookie}
}
+// GetCompressedTexImageARBUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetCompressedTexImageARBUnchecked(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32) GetCompressedTexImageARBCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getCompressedTexImageARBRequest(c, ContextTag, Target, Level), cookie)
return GetCompressedTexImageARBCookie{cookie}
}
-// Request reply for GetCompressedTexImageARB
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// GetCompressedTexImageARBReply represents the data returned from a GetCompressedTexImageARB request.
type GetCompressedTexImageARBReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 8 bytes
Size int32
@@ -8569,7 +8914,7 @@ type GetCompressedTexImageARBReply struct {
Data []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request GetCompressedTexImageARB
+// Reply blocks and returns the reply data for a GetCompressedTexImageARB request.
func (cook GetCompressedTexImageARBCookie) Reply() (*GetCompressedTexImageARBReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8581,7 +8926,7 @@ func (cook GetCompressedTexImageARBCookie) Reply() (*GetCompressedTexImageARBRep
return getCompressedTexImageARBReply(buf), nil
}
-// Read reply into structure from buffer for GetCompressedTexImageARB
+// getCompressedTexImageARBReply reads a byte slice into a GetCompressedTexImageARBReply value.
func getCompressedTexImageARBReply(buf []byte) *GetCompressedTexImageARBReply {
v := new(GetCompressedTexImageARBReply)
b := 1 // skip reply determinant
@@ -8609,6 +8954,7 @@ func getCompressedTexImageARBReply(buf []byte) *GetCompressedTexImageARBReply {
}
// Write request to wire for GetCompressedTexImageARB
+// getCompressedTexImageARBRequest writes a GetCompressedTexImageARB request to a byte slice.
func getCompressedTexImageARBRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Level int32) []byte {
size := 16
b := 0
@@ -8635,30 +8981,35 @@ func getCompressedTexImageARBRequest(c *xgb.Conn, ContextTag ContextTag, Target
return buf
}
-// Request DeleteQueriesARB
-// size: xgb.Pad((12 + xgb.Pad((int(N) * 4))))
+// DeleteQueriesARBCookie is a cookie used only for DeleteQueriesARB requests.
type DeleteQueriesARBCookie struct {
*xgb.Cookie
}
-// Write request to wire for DeleteQueriesARB
+// DeleteQueriesARB sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DeleteQueriesARB(c *xgb.Conn, ContextTag ContextTag, N int32, Ids []uint32) DeleteQueriesARBCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(deleteQueriesARBRequest(c, ContextTag, N, Ids), cookie)
return DeleteQueriesARBCookie{cookie}
}
+// DeleteQueriesARBChecked sends a checked request.
+// If an error occurs, it can be retrieved using DeleteQueriesARBCookie.Check()
func DeleteQueriesARBChecked(c *xgb.Conn, ContextTag ContextTag, N int32, Ids []uint32) DeleteQueriesARBCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(deleteQueriesARBRequest(c, ContextTag, N, Ids), cookie)
return DeleteQueriesARBCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DeleteQueriesARBCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DeleteQueriesARB
+// deleteQueriesARBRequest writes a DeleteQueriesARB request to a byte slice.
func deleteQueriesARBRequest(c *xgb.Conn, ContextTag ContextTag, N int32, Ids []uint32) []byte {
size := xgb.Pad((12 + xgb.Pad((int(N) * 4))))
b := 0
@@ -8688,35 +9039,37 @@ func deleteQueriesARBRequest(c *xgb.Conn, ContextTag ContextTag, N int32, Ids []
return buf
}
-// Request GenQueriesARB
-// size: 12
+// GenQueriesARBCookie is a cookie used only for GenQueriesARB requests.
type GenQueriesARBCookie struct {
*xgb.Cookie
}
+// GenQueriesARB sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(genQueriesARBRequest(c, ContextTag, N), cookie)
return GenQueriesARBCookie{cookie}
}
+// GenQueriesARBUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GenQueriesARBUnchecked(c *xgb.Conn, ContextTag ContextTag, N int32) GenQueriesARBCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(genQueriesARBRequest(c, ContextTag, N), cookie)
return GenQueriesARBCookie{cookie}
}
-// Request reply for GenQueriesARB
-// size: (32 + xgb.Pad((int(Length) * 4)))
+// GenQueriesARBReply represents the data returned from a GenQueriesARB request.
type GenQueriesARBReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
Data []uint32 // size: xgb.Pad((int(Length) * 4))
}
-// Waits and reads reply data from request GenQueriesARB
+// Reply blocks and returns the reply data for a GenQueriesARB request.
func (cook GenQueriesARBCookie) Reply() (*GenQueriesARBReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8728,7 +9081,7 @@ func (cook GenQueriesARBCookie) Reply() (*GenQueriesARBReply, error) {
return genQueriesARBReply(buf), nil
}
-// Read reply into structure from buffer for GenQueriesARB
+// genQueriesARBReply reads a byte slice into a GenQueriesARBReply value.
func genQueriesARBReply(buf []byte) *GenQueriesARBReply {
v := new(GenQueriesARBReply)
b := 1 // skip reply determinant
@@ -8754,6 +9107,7 @@ func genQueriesARBReply(buf []byte) *GenQueriesARBReply {
}
// Write request to wire for GenQueriesARB
+// genQueriesARBRequest writes a GenQueriesARB request to a byte slice.
func genQueriesARBRequest(c *xgb.Conn, ContextTag ContextTag, N int32) []byte {
size := 12
b := 0
@@ -8777,34 +9131,36 @@ func genQueriesARBRequest(c *xgb.Conn, ContextTag ContextTag, N int32) []byte {
return buf
}
-// Request IsQueryARB
-// size: 12
+// IsQueryARBCookie is a cookie used only for IsQueryARB requests.
type IsQueryARBCookie struct {
*xgb.Cookie
}
+// IsQueryARB sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(isQueryARBRequest(c, ContextTag, Id), cookie)
return IsQueryARBCookie{cookie}
}
+// IsQueryARBUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func IsQueryARBUnchecked(c *xgb.Conn, ContextTag ContextTag, Id uint32) IsQueryARBCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(isQueryARBRequest(c, ContextTag, Id), cookie)
return IsQueryARBCookie{cookie}
}
-// Request reply for IsQueryARB
-// size: 12
+// IsQueryARBReply represents the data returned from a IsQueryARB request.
type IsQueryARBReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
RetVal Bool32
}
-// Waits and reads reply data from request IsQueryARB
+// Reply blocks and returns the reply data for a IsQueryARB request.
func (cook IsQueryARBCookie) Reply() (*IsQueryARBReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8816,7 +9172,7 @@ func (cook IsQueryARBCookie) Reply() (*IsQueryARBReply, error) {
return isQueryARBReply(buf), nil
}
-// Read reply into structure from buffer for IsQueryARB
+// isQueryARBReply reads a byte slice into a IsQueryARBReply value.
func isQueryARBReply(buf []byte) *IsQueryARBReply {
v := new(IsQueryARBReply)
b := 1 // skip reply determinant
@@ -8836,6 +9192,7 @@ func isQueryARBReply(buf []byte) *IsQueryARBReply {
}
// Write request to wire for IsQueryARB
+// isQueryARBRequest writes a IsQueryARB request to a byte slice.
func isQueryARBRequest(c *xgb.Conn, ContextTag ContextTag, Id uint32) []byte {
size := 12
b := 0
@@ -8859,29 +9216,31 @@ func isQueryARBRequest(c *xgb.Conn, ContextTag ContextTag, Id uint32) []byte {
return buf
}
-// Request GetQueryivARB
-// size: 16
+// GetQueryivARBCookie is a cookie used only for GetQueryivARB requests.
type GetQueryivARBCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getQueryivARBRequest(c, ContextTag, Target, Pname), cookie)
return GetQueryivARBCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getQueryivARBRequest(c, ContextTag, Target, Pname), cookie)
return GetQueryivARBCookie{cookie}
}
-// Request reply for GetQueryivARB
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetQueryivARBReply represents the data returned from a GetQueryivARB request.
type GetQueryivARBReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -8890,7 +9249,7 @@ type GetQueryivARBReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetQueryivARB
+// Reply blocks and returns the reply data for a GetQueryivARB request.
func (cook GetQueryivARBCookie) Reply() (*GetQueryivARBReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8902,7 +9261,7 @@ func (cook GetQueryivARBCookie) Reply() (*GetQueryivARBReply, error) {
return getQueryivARBReply(buf), nil
}
-// Read reply into structure from buffer for GetQueryivARB
+// getQueryivARBReply reads a byte slice into a GetQueryivARBReply value.
func getQueryivARBReply(buf []byte) *GetQueryivARBReply {
v := new(GetQueryivARBReply)
b := 1 // skip reply determinant
@@ -8936,6 +9295,7 @@ func getQueryivARBReply(buf []byte) *GetQueryivARBReply {
}
// 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 {
size := 16
b := 0
@@ -8962,29 +9322,31 @@ func getQueryivARBRequest(c *xgb.Conn, ContextTag ContextTag, Target uint32, Pna
return buf
}
-// Request GetQueryObjectivARB
-// size: 16
+// GetQueryObjectivARBCookie is a cookie used only for GetQueryObjectivARB requests.
type GetQueryObjectivARBCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getQueryObjectivARBRequest(c, ContextTag, Id, Pname), cookie)
return GetQueryObjectivARBCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getQueryObjectivARBRequest(c, ContextTag, Id, Pname), cookie)
return GetQueryObjectivARBCookie{cookie}
}
-// Request reply for GetQueryObjectivARB
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetQueryObjectivARBReply represents the data returned from a GetQueryObjectivARB request.
type GetQueryObjectivARBReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -8993,7 +9355,7 @@ type GetQueryObjectivARBReply struct {
Data []int32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetQueryObjectivARB
+// Reply blocks and returns the reply data for a GetQueryObjectivARB request.
func (cook GetQueryObjectivARBCookie) Reply() (*GetQueryObjectivARBReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -9005,7 +9367,7 @@ func (cook GetQueryObjectivARBCookie) Reply() (*GetQueryObjectivARBReply, error)
return getQueryObjectivARBReply(buf), nil
}
-// Read reply into structure from buffer for GetQueryObjectivARB
+// getQueryObjectivARBReply reads a byte slice into a GetQueryObjectivARBReply value.
func getQueryObjectivARBReply(buf []byte) *GetQueryObjectivARBReply {
v := new(GetQueryObjectivARBReply)
b := 1 // skip reply determinant
@@ -9039,6 +9401,7 @@ func getQueryObjectivARBReply(buf []byte) *GetQueryObjectivARBReply {
}
// 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 {
size := 16
b := 0
@@ -9065,29 +9428,31 @@ func getQueryObjectivARBRequest(c *xgb.Conn, ContextTag ContextTag, Id uint32, P
return buf
}
-// Request GetQueryObjectuivARB
-// size: 16
+// GetQueryObjectuivARBCookie is a cookie used only for GetQueryObjectuivARB requests.
type GetQueryObjectuivARBCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getQueryObjectuivARBRequest(c, ContextTag, Id, Pname), cookie)
return GetQueryObjectuivARBCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getQueryObjectuivARBRequest(c, ContextTag, Id, Pname), cookie)
return GetQueryObjectuivARBCookie{cookie}
}
-// Request reply for GetQueryObjectuivARB
-// size: (32 + xgb.Pad((int(N) * 4)))
+// GetQueryObjectuivARBReply represents the data returned from a GetQueryObjectuivARB request.
type GetQueryObjectuivARBReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 4 bytes
N uint32
@@ -9096,7 +9461,7 @@ type GetQueryObjectuivARBReply struct {
Data []uint32 // size: xgb.Pad((int(N) * 4))
}
-// Waits and reads reply data from request GetQueryObjectuivARB
+// Reply blocks and returns the reply data for a GetQueryObjectuivARB request.
func (cook GetQueryObjectuivARBCookie) Reply() (*GetQueryObjectuivARBReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -9108,7 +9473,7 @@ func (cook GetQueryObjectuivARBCookie) Reply() (*GetQueryObjectuivARBReply, erro
return getQueryObjectuivARBReply(buf), nil
}
-// Read reply into structure from buffer for GetQueryObjectuivARB
+// getQueryObjectuivARBReply reads a byte slice into a GetQueryObjectuivARBReply value.
func getQueryObjectuivARBReply(buf []byte) *GetQueryObjectuivARBReply {
v := new(GetQueryObjectuivARBReply)
b := 1 // skip reply determinant
@@ -9142,6 +9507,7 @@ func getQueryObjectuivARBReply(buf []byte) *GetQueryObjectuivARBReply {
}
// 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 {
size := 16
b := 0
diff --git a/nexgb/randr/randr.go b/nexgb/randr/randr.go
index ba8c0f2..35de3bf 100644
--- a/nexgb/randr/randr.go
+++ b/nexgb/randr/randr.go
@@ -2,7 +2,7 @@
package randr
/*
- This file was generated by randr.xml on May 10 2012 8:04:31pm EDT.
+ This file was generated by randr.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -41,6 +41,12 @@ func init() {
xgb.NewExtErrorFuncs["RANDR"] = make(map[int]xgb.NewErrorFun)
}
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Int16'
+
+// Skipping definition for base type 'Int32'
+
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
@@ -59,12 +65,6 @@ func init() {
// Skipping definition for base type 'Float'
-// Skipping definition for base type 'Card8'
-
-// Skipping definition for base type 'Int16'
-
-// Skipping definition for base type 'Int32'
-
const (
RotationRotate0 = 1
RotationRotate90 = 2
@@ -147,8 +147,6 @@ func NewOutputId(c *xgb.Conn) (Output, error) {
return Output(id), nil
}
-// 'ScreenSize' struct definition
-// Size: 8
type ScreenSize struct {
Width uint16
Height uint16
@@ -156,7 +154,7 @@ type ScreenSize struct {
Mheight uint16
}
-// Struct read ScreenSize
+// ScreenSizeRead reads a byte slice into a ScreenSize value.
func ScreenSizeRead(buf []byte, v *ScreenSize) int {
b := 0
@@ -175,7 +173,7 @@ func ScreenSizeRead(buf []byte, v *ScreenSize) int {
return b
}
-// Struct list read ScreenSize
+// ScreenSizeReadList reads a byte slice into a list of ScreenSize values.
func ScreenSizeReadList(buf []byte, dest []ScreenSize) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -185,7 +183,7 @@ func ScreenSizeReadList(buf []byte, dest []ScreenSize) int {
return xgb.Pad(b)
}
-// Struct write ScreenSize
+// Bytes writes a ScreenSize value to a byte slice.
func (v ScreenSize) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -205,7 +203,7 @@ func (v ScreenSize) Bytes() []byte {
return buf
}
-// Write struct list ScreenSize
+// ScreenSizeListBytes writes a list of %s(MISSING) values to a byte slice.
func ScreenSizeListBytes(buf []byte, list []ScreenSize) int {
b := 0
var structBytes []byte
@@ -217,14 +215,12 @@ func ScreenSizeListBytes(buf []byte, list []ScreenSize) int {
return b
}
-// 'RefreshRates' struct definition
-// Size: (2 + xgb.Pad((int(NRates) * 2)))
type RefreshRates struct {
NRates uint16
Rates []uint16 // size: xgb.Pad((int(NRates) * 2))
}
-// Struct read RefreshRates
+// RefreshRatesRead reads a byte slice into a RefreshRates value.
func RefreshRatesRead(buf []byte, v *RefreshRates) int {
b := 0
@@ -241,7 +237,7 @@ func RefreshRatesRead(buf []byte, v *RefreshRates) int {
return b
}
-// Struct list read RefreshRates
+// RefreshRatesReadList reads a byte slice into a list of RefreshRates values.
func RefreshRatesReadList(buf []byte, dest []RefreshRates) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -251,7 +247,7 @@ func RefreshRatesReadList(buf []byte, dest []RefreshRates) int {
return xgb.Pad(b)
}
-// Struct write RefreshRates
+// Bytes writes a RefreshRates value to a byte slice.
func (v RefreshRates) Bytes() []byte {
buf := make([]byte, (2 + xgb.Pad((int(v.NRates) * 2))))
b := 0
@@ -268,7 +264,7 @@ func (v RefreshRates) Bytes() []byte {
return buf
}
-// Write struct list RefreshRates
+// RefreshRatesListBytes writes a list of %s(MISSING) values to a byte slice.
func RefreshRatesListBytes(buf []byte, list []RefreshRates) int {
b := 0
var structBytes []byte
@@ -280,7 +276,7 @@ func RefreshRatesListBytes(buf []byte, list []RefreshRates) int {
return b
}
-// Struct list size RefreshRates
+// RefreshRatesListSize computes the size (bytes) of a list of RefreshRates values.
func RefreshRatesListSize(list []RefreshRates) int {
size := 0
for _, item := range list {
@@ -289,8 +285,6 @@ func RefreshRatesListSize(list []RefreshRates) int {
return size
}
-// 'ModeInfo' struct definition
-// Size: 32
type ModeInfo struct {
Id uint32
Width uint16
@@ -307,7 +301,7 @@ type ModeInfo struct {
ModeFlags uint32
}
-// Struct read ModeInfo
+// ModeInfoRead reads a byte slice into a ModeInfo value.
func ModeInfoRead(buf []byte, v *ModeInfo) int {
b := 0
@@ -353,7 +347,7 @@ func ModeInfoRead(buf []byte, v *ModeInfo) int {
return b
}
-// Struct list read ModeInfo
+// ModeInfoReadList reads a byte slice into a list of ModeInfo values.
func ModeInfoReadList(buf []byte, dest []ModeInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -363,7 +357,7 @@ func ModeInfoReadList(buf []byte, dest []ModeInfo) int {
return xgb.Pad(b)
}
-// Struct write ModeInfo
+// Bytes writes a ModeInfo value to a byte slice.
func (v ModeInfo) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -410,7 +404,7 @@ func (v ModeInfo) Bytes() []byte {
return buf
}
-// Write struct list ModeInfo
+// ModeInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func ModeInfoListBytes(buf []byte, list []ModeInfo) int {
b := 0
var structBytes []byte
@@ -422,8 +416,6 @@ func ModeInfoListBytes(buf []byte, list []ModeInfo) int {
return b
}
-// 'CrtcChange' struct definition
-// Size: 28
type CrtcChange struct {
Timestamp xproto.Timestamp
Window xproto.Window
@@ -437,7 +429,7 @@ type CrtcChange struct {
Height uint16
}
-// Struct read CrtcChange
+// CrtcChangeRead reads a byte slice into a CrtcChange value.
func CrtcChangeRead(buf []byte, v *CrtcChange) int {
b := 0
@@ -473,7 +465,7 @@ func CrtcChangeRead(buf []byte, v *CrtcChange) int {
return b
}
-// Struct list read CrtcChange
+// CrtcChangeReadList reads a byte slice into a list of CrtcChange values.
func CrtcChangeReadList(buf []byte, dest []CrtcChange) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -483,7 +475,7 @@ func CrtcChangeReadList(buf []byte, dest []CrtcChange) int {
return xgb.Pad(b)
}
-// Struct write CrtcChange
+// Bytes writes a CrtcChange value to a byte slice.
func (v CrtcChange) Bytes() []byte {
buf := make([]byte, 28)
b := 0
@@ -520,7 +512,7 @@ func (v CrtcChange) Bytes() []byte {
return buf
}
-// Write struct list CrtcChange
+// CrtcChangeListBytes writes a list of %s(MISSING) values to a byte slice.
func CrtcChangeListBytes(buf []byte, list []CrtcChange) int {
b := 0
var structBytes []byte
@@ -532,8 +524,6 @@ func CrtcChangeListBytes(buf []byte, list []CrtcChange) int {
return b
}
-// 'OutputChange' struct definition
-// Size: 28
type OutputChange struct {
Timestamp xproto.Timestamp
ConfigTimestamp xproto.Timestamp
@@ -546,7 +536,7 @@ type OutputChange struct {
SubpixelOrder byte
}
-// Struct read OutputChange
+// OutputChangeRead reads a byte slice into a OutputChange value.
func OutputChangeRead(buf []byte, v *OutputChange) int {
b := 0
@@ -580,7 +570,7 @@ func OutputChangeRead(buf []byte, v *OutputChange) int {
return b
}
-// Struct list read OutputChange
+// OutputChangeReadList reads a byte slice into a list of OutputChange values.
func OutputChangeReadList(buf []byte, dest []OutputChange) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -590,7 +580,7 @@ func OutputChangeReadList(buf []byte, dest []OutputChange) int {
return xgb.Pad(b)
}
-// Struct write OutputChange
+// Bytes writes a OutputChange value to a byte slice.
func (v OutputChange) Bytes() []byte {
buf := make([]byte, 28)
b := 0
@@ -625,7 +615,7 @@ func (v OutputChange) Bytes() []byte {
return buf
}
-// Write struct list OutputChange
+// OutputChangeListBytes writes a list of %s(MISSING) values to a byte slice.
func OutputChangeListBytes(buf []byte, list []OutputChange) int {
b := 0
var structBytes []byte
@@ -637,8 +627,6 @@ func OutputChangeListBytes(buf []byte, list []OutputChange) int {
return b
}
-// 'OutputProperty' struct definition
-// Size: 28
type OutputProperty struct {
Window xproto.Window
Output Output
@@ -648,7 +636,7 @@ type OutputProperty struct {
// padding: 11 bytes
}
-// Struct read OutputProperty
+// OutputPropertyRead reads a byte slice into a OutputProperty value.
func OutputPropertyRead(buf []byte, v *OutputProperty) int {
b := 0
@@ -672,7 +660,7 @@ func OutputPropertyRead(buf []byte, v *OutputProperty) int {
return b
}
-// Struct list read OutputProperty
+// OutputPropertyReadList reads a byte slice into a list of OutputProperty values.
func OutputPropertyReadList(buf []byte, dest []OutputProperty) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -682,7 +670,7 @@ func OutputPropertyReadList(buf []byte, dest []OutputProperty) int {
return xgb.Pad(b)
}
-// Struct write OutputProperty
+// Bytes writes a OutputProperty value to a byte slice.
func (v OutputProperty) Bytes() []byte {
buf := make([]byte, 28)
b := 0
@@ -707,7 +695,7 @@ func (v OutputProperty) Bytes() []byte {
return buf
}
-// Write struct list OutputProperty
+// OutputPropertyListBytes writes a list of %s(MISSING) values to a byte slice.
func OutputPropertyListBytes(buf []byte, list []OutputProperty) int {
b := 0
var structBytes []byte
@@ -719,7 +707,7 @@ func OutputPropertyListBytes(buf []byte, list []OutputProperty) int {
return b
}
-// Union definition NotifyDataUnion
+// NotifyDataUnion is a represention of the NotifyDataUnion union type.
// Note that to *create* a Union, you should *never* create
// this struct directly (unless you know what you're doing).
// Instead use one of the following constructors for 'NotifyDataUnion':
@@ -732,7 +720,7 @@ type NotifyDataUnion struct {
Op OutputProperty
}
-// Union constructor for NotifyDataUnion for field Cc.
+// NotifyDataUnionCcNew constructs a new NotifyDataUnion union type with the Cc field.
func NotifyDataUnionCcNew(Cc CrtcChange) NotifyDataUnion {
var b int
buf := make([]byte, 28)
@@ -763,7 +751,7 @@ func NotifyDataUnionCcNew(Cc CrtcChange) NotifyDataUnion {
return v
}
-// Union constructor for NotifyDataUnion for field Oc.
+// NotifyDataUnionOcNew constructs a new NotifyDataUnion union type with the Oc field.
func NotifyDataUnionOcNew(Oc OutputChange) NotifyDataUnion {
var b int
buf := make([]byte, 28)
@@ -794,7 +782,7 @@ func NotifyDataUnionOcNew(Oc OutputChange) NotifyDataUnion {
return v
}
-// Union constructor for NotifyDataUnion for field Op.
+// NotifyDataUnionOpNew constructs a new NotifyDataUnion union type with the Op field.
func NotifyDataUnionOpNew(Op OutputProperty) NotifyDataUnion {
var b int
buf := make([]byte, 28)
@@ -825,7 +813,7 @@ func NotifyDataUnionOpNew(Op OutputProperty) NotifyDataUnion {
return v
}
-// Union read NotifyDataUnion
+// NotifyDataUnionRead reads a byte slice into a NotifyDataUnion value.
func NotifyDataUnionRead(buf []byte, v *NotifyDataUnion) int {
var b int
@@ -844,7 +832,7 @@ func NotifyDataUnionRead(buf []byte, v *NotifyDataUnion) int {
return 28
}
-// Union list read NotifyDataUnion
+// NotifyDataUnionReadList reads a byte slice into a list of NotifyDataUnion values.
func NotifyDataUnionReadList(buf []byte, dest []NotifyDataUnion) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -854,7 +842,7 @@ func NotifyDataUnionReadList(buf []byte, dest []NotifyDataUnion) int {
return xgb.Pad(b)
}
-// Union write NotifyDataUnion
+// Bytes writes a NotifyDataUnion value to a byte slice.
// Each field in a union must contain the same data.
// So simply pick the first field and write that to the wire.
func (v NotifyDataUnion) Bytes() []byte {
@@ -869,7 +857,7 @@ func (v NotifyDataUnion) Bytes() []byte {
return buf
}
-// Union list write NotifyDataUnion
+// NotifyDataUnionListBytes writes a list of %s(MISSING) values to a byte slice.
func NotifyDataUnionListBytes(buf []byte, list []NotifyDataUnion) int {
b := 0
var unionBytes []byte
@@ -881,9 +869,7 @@ func NotifyDataUnionListBytes(buf []byte, list []NotifyDataUnion) int {
return b
}
-// Event definition ScreenChangeNotify (0)
-// Size: 32
-
+// ScreenChangeNotify is the event number for a ScreenChangeNotifyEvent.
const ScreenChangeNotify = 0
type ScreenChangeNotifyEvent struct {
@@ -901,7 +887,7 @@ type ScreenChangeNotifyEvent struct {
Mheight uint16
}
-// Event read ScreenChangeNotify
+// ScreenChangeNotifyEventNew constructs a ScreenChangeNotifyEvent value that implements xgb.Event from a byte slice.
func ScreenChangeNotifyEventNew(buf []byte) xgb.Event {
v := ScreenChangeNotifyEvent{}
b := 1 // don't read event number
@@ -945,7 +931,7 @@ func ScreenChangeNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write ScreenChangeNotify
+// Bytes writes a ScreenChangeNotifyEvent value to a byte slice.
func (v ScreenChangeNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -992,12 +978,14 @@ func (v ScreenChangeNotifyEvent) Bytes() []byte {
return buf
}
-func (v ScreenChangeNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ScreenChangeNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ScreenChangeNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of ScreenChangeNotifyEvent.
func (v ScreenChangeNotifyEvent) String() string {
fieldVals := make([]string, 0, 11)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -1019,9 +1007,7 @@ func init() {
xgb.NewExtEventFuncs["RANDR"][0] = ScreenChangeNotifyEventNew
}
-// Event definition Notify (1)
-// Size: 32
-
+// Notify is the event number for a NotifyEvent.
const Notify = 1
type NotifyEvent struct {
@@ -1030,7 +1016,7 @@ type NotifyEvent struct {
U NotifyDataUnion
}
-// Event read Notify
+// NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.
func NotifyEventNew(buf []byte) xgb.Event {
v := NotifyEvent{}
b := 1 // don't read event number
@@ -1047,7 +1033,7 @@ func NotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write Notify
+// Bytes writes a NotifyEvent value to a byte slice.
func (v NotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -1070,12 +1056,14 @@ func (v NotifyEvent) Bytes() []byte {
return buf
}
-func (v NotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the Notify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v NotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of NotifyEvent.
func (v NotifyEvent) String() string {
fieldVals := make([]string, 0, 2)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -1087,9 +1075,7 @@ func init() {
xgb.NewExtEventFuncs["RANDR"][1] = NotifyEventNew
}
-// Error definition BadOutput (0)
-// Size: 32
-
+// BadBadOutput is the error number for a BadBadOutput.
const BadBadOutput = 0
type BadOutputError struct {
@@ -1097,7 +1083,7 @@ type BadOutputError struct {
NiceName string
}
-// Error read BadOutput
+// BadOutputErrorNew constructs a BadOutputError value that implements xgb.Error from a byte slice.
func BadOutputErrorNew(buf []byte) xgb.Error {
v := BadOutputError{}
v.NiceName = "BadOutput"
@@ -1111,8 +1097,8 @@ func BadOutputErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadOutputError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadOutput error.
+// This is mostly used internally.
func (err BadOutputError) SequenceId() uint16 {
return err.Sequence
}
@@ -1132,9 +1118,7 @@ func init() {
xgb.NewExtErrorFuncs["RANDR"][0] = BadOutputErrorNew
}
-// Error definition BadCrtc (1)
-// Size: 32
-
+// BadBadCrtc is the error number for a BadBadCrtc.
const BadBadCrtc = 1
type BadCrtcError struct {
@@ -1142,7 +1126,7 @@ type BadCrtcError struct {
NiceName string
}
-// Error read BadCrtc
+// BadCrtcErrorNew constructs a BadCrtcError value that implements xgb.Error from a byte slice.
func BadCrtcErrorNew(buf []byte) xgb.Error {
v := BadCrtcError{}
v.NiceName = "BadCrtc"
@@ -1156,8 +1140,8 @@ func BadCrtcErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadCrtcError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadCrtc error.
+// This is mostly used internally.
func (err BadCrtcError) SequenceId() uint16 {
return err.Sequence
}
@@ -1177,9 +1161,7 @@ func init() {
xgb.NewExtErrorFuncs["RANDR"][1] = BadCrtcErrorNew
}
-// Error definition BadMode (2)
-// Size: 32
-
+// BadBadMode is the error number for a BadBadMode.
const BadBadMode = 2
type BadModeError struct {
@@ -1187,7 +1169,7 @@ type BadModeError struct {
NiceName string
}
-// Error read BadMode
+// BadModeErrorNew constructs a BadModeError value that implements xgb.Error from a byte slice.
func BadModeErrorNew(buf []byte) xgb.Error {
v := BadModeError{}
v.NiceName = "BadMode"
@@ -1201,8 +1183,8 @@ func BadModeErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadModeError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadMode error.
+// This is mostly used internally.
func (err BadModeError) SequenceId() uint16 {
return err.Sequence
}
@@ -1222,36 +1204,38 @@ func init() {
xgb.NewExtErrorFuncs["RANDR"][2] = BadModeErrorNew
}
-// Request QueryVersion
-// size: 12
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, MajorVersion, MinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, MajorVersion, MinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 32
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint32
MinorVersion uint32
// padding: 16 bytes
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1263,7 +1247,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -1288,6 +1272,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 12
b := 0
@@ -1311,29 +1296,31 @@ func queryVersionRequest(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32)
return buf
}
-// Request SetScreenConfig
-// size: 24
+// SetScreenConfigCookie is a cookie used only for SetScreenConfig requests.
type SetScreenConfigCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(setScreenConfigRequest(c, Window, Timestamp, ConfigTimestamp, SizeID, Rotation, Rate), cookie)
return SetScreenConfigCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(setScreenConfigRequest(c, Window, Timestamp, ConfigTimestamp, SizeID, Rotation, Rate), cookie)
return SetScreenConfigCookie{cookie}
}
-// Request reply for SetScreenConfig
-// size: 32
+// SetScreenConfigReply represents the data returned from a SetScreenConfig request.
type SetScreenConfigReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status byte
NewTimestamp xproto.Timestamp
ConfigTimestamp xproto.Timestamp
@@ -1342,7 +1329,7 @@ type SetScreenConfigReply struct {
// padding: 10 bytes
}
-// Waits and reads reply data from request SetScreenConfig
+// Reply blocks and returns the reply data for a SetScreenConfig request.
func (cook SetScreenConfigCookie) Reply() (*SetScreenConfigReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1354,7 +1341,7 @@ func (cook SetScreenConfigCookie) Reply() (*SetScreenConfigReply, error) {
return setScreenConfigReply(buf), nil
}
-// Read reply into structure from buffer for SetScreenConfig
+// setScreenConfigReply reads a byte slice into a SetScreenConfigReply value.
func setScreenConfigReply(buf []byte) *SetScreenConfigReply {
v := new(SetScreenConfigReply)
b := 1 // skip reply determinant
@@ -1386,6 +1373,7 @@ func setScreenConfigReply(buf []byte) *SetScreenConfigReply {
}
// 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 {
size := 24
b := 0
@@ -1423,30 +1411,35 @@ func setScreenConfigRequest(c *xgb.Conn, Window xproto.Window, Timestamp xproto.
return buf
}
-// Request SelectInput
-// size: 12
+// SelectInputCookie is a cookie used only for SelectInput requests.
type SelectInputCookie struct {
*xgb.Cookie
}
-// Write request to wire for SelectInput
+// SelectInput sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectInput(c *xgb.Conn, Window xproto.Window, Enable uint16) SelectInputCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(selectInputRequest(c, Window, Enable), cookie)
return SelectInputCookie{cookie}
}
+// SelectInputChecked sends a checked request.
+// If an error occurs, it can be retrieved using SelectInputCookie.Check()
func SelectInputChecked(c *xgb.Conn, Window xproto.Window, Enable uint16) SelectInputCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(selectInputRequest(c, Window, Enable), cookie)
return SelectInputCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SelectInputCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SelectInput
+// selectInputRequest writes a SelectInput request to a byte slice.
func selectInputRequest(c *xgb.Conn, Window xproto.Window, Enable uint16) []byte {
size := 12
b := 0
@@ -1472,29 +1465,31 @@ func selectInputRequest(c *xgb.Conn, Window xproto.Window, Enable uint16) []byte
return buf
}
-// Request GetScreenInfo
-// size: 8
+// GetScreenInfoCookie is a cookie used only for GetScreenInfo requests.
type GetScreenInfoCookie struct {
*xgb.Cookie
}
+// GetScreenInfo sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetScreenInfoCookie.Reply()
func GetScreenInfo(c *xgb.Conn, Window xproto.Window) GetScreenInfoCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getScreenInfoRequest(c, Window), cookie)
return GetScreenInfoCookie{cookie}
}
+// GetScreenInfoUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetScreenInfoUnchecked(c *xgb.Conn, Window xproto.Window) GetScreenInfoCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getScreenInfoRequest(c, Window), cookie)
return GetScreenInfoCookie{cookie}
}
-// Request reply for GetScreenInfo
-// size: ((32 + xgb.Pad((int(NSizes) * 8))) + RefreshRatesListSize(Rates))
+// GetScreenInfoReply represents the data returned from a GetScreenInfo request.
type GetScreenInfoReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Rotations byte
Root xproto.Window
Timestamp xproto.Timestamp
@@ -1509,7 +1504,7 @@ type GetScreenInfoReply struct {
Rates []RefreshRates // size: RefreshRatesListSize(Rates)
}
-// Waits and reads reply data from request GetScreenInfo
+// Reply blocks and returns the reply data for a GetScreenInfo request.
func (cook GetScreenInfoCookie) Reply() (*GetScreenInfoReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1521,7 +1516,7 @@ func (cook GetScreenInfoCookie) Reply() (*GetScreenInfoReply, error) {
return getScreenInfoReply(buf), nil
}
-// Read reply into structure from buffer for GetScreenInfo
+// getScreenInfoReply reads a byte slice into a GetScreenInfoReply value.
func getScreenInfoReply(buf []byte) *GetScreenInfoReply {
v := new(GetScreenInfoReply)
b := 1 // skip reply determinant
@@ -1571,6 +1566,7 @@ func getScreenInfoReply(buf []byte) *GetScreenInfoReply {
}
// Write request to wire for GetScreenInfo
+// getScreenInfoRequest writes a GetScreenInfo request to a byte slice.
func getScreenInfoRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -1591,29 +1587,31 @@ func getScreenInfoRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request GetScreenSizeRange
-// size: 8
+// GetScreenSizeRangeCookie is a cookie used only for GetScreenSizeRange requests.
type GetScreenSizeRangeCookie struct {
*xgb.Cookie
}
+// GetScreenSizeRange sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetScreenSizeRangeCookie.Reply()
func GetScreenSizeRange(c *xgb.Conn, Window xproto.Window) GetScreenSizeRangeCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getScreenSizeRangeRequest(c, Window), cookie)
return GetScreenSizeRangeCookie{cookie}
}
+// GetScreenSizeRangeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetScreenSizeRangeUnchecked(c *xgb.Conn, Window xproto.Window) GetScreenSizeRangeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getScreenSizeRangeRequest(c, Window), cookie)
return GetScreenSizeRangeCookie{cookie}
}
-// Request reply for GetScreenSizeRange
-// size: 32
+// GetScreenSizeRangeReply represents the data returned from a GetScreenSizeRange request.
type GetScreenSizeRangeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MinWidth uint16
MinHeight uint16
@@ -1622,7 +1620,7 @@ type GetScreenSizeRangeReply struct {
// padding: 16 bytes
}
-// Waits and reads reply data from request GetScreenSizeRange
+// Reply blocks and returns the reply data for a GetScreenSizeRange request.
func (cook GetScreenSizeRangeCookie) Reply() (*GetScreenSizeRangeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1634,7 +1632,7 @@ func (cook GetScreenSizeRangeCookie) Reply() (*GetScreenSizeRangeReply, error) {
return getScreenSizeRangeReply(buf), nil
}
-// Read reply into structure from buffer for GetScreenSizeRange
+// getScreenSizeRangeReply reads a byte slice into a GetScreenSizeRangeReply value.
func getScreenSizeRangeReply(buf []byte) *GetScreenSizeRangeReply {
v := new(GetScreenSizeRangeReply)
b := 1 // skip reply determinant
@@ -1665,6 +1663,7 @@ func getScreenSizeRangeReply(buf []byte) *GetScreenSizeRangeReply {
}
// Write request to wire for GetScreenSizeRange
+// getScreenSizeRangeRequest writes a GetScreenSizeRange request to a byte slice.
func getScreenSizeRangeRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -1685,30 +1684,35 @@ func getScreenSizeRangeRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request SetScreenSize
-// size: 20
+// SetScreenSizeCookie is a cookie used only for SetScreenSize requests.
type SetScreenSizeCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetScreenSize
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setScreenSizeRequest(c, Window, Width, Height, MmWidth, MmHeight), cookie)
return SetScreenSizeCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setScreenSizeRequest(c, Window, Width, Height, MmWidth, MmHeight), cookie)
return SetScreenSizeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 20
b := 0
@@ -1741,29 +1745,31 @@ func setScreenSizeRequest(c *xgb.Conn, Window xproto.Window, Width uint16, Heigh
return buf
}
-// Request GetScreenResources
-// size: 8
+// GetScreenResourcesCookie is a cookie used only for GetScreenResources requests.
type GetScreenResourcesCookie struct {
*xgb.Cookie
}
+// GetScreenResources sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetScreenResourcesCookie.Reply()
func GetScreenResources(c *xgb.Conn, Window xproto.Window) GetScreenResourcesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getScreenResourcesRequest(c, Window), cookie)
return GetScreenResourcesCookie{cookie}
}
+// GetScreenResourcesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetScreenResourcesUnchecked(c *xgb.Conn, Window xproto.Window) GetScreenResourcesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getScreenResourcesRequest(c, Window), cookie)
return GetScreenResourcesCookie{cookie}
}
-// Request reply for GetScreenResources
-// size: ((((32 + xgb.Pad((int(NumCrtcs) * 4))) + xgb.Pad((int(NumOutputs) * 4))) + xgb.Pad((int(NumModes) * 32))) + xgb.Pad((int(NamesLen) * 1)))
+// GetScreenResourcesReply represents the data returned from a GetScreenResources request.
type GetScreenResourcesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Timestamp xproto.Timestamp
ConfigTimestamp xproto.Timestamp
@@ -1778,7 +1784,7 @@ type GetScreenResourcesReply struct {
Names []byte // size: xgb.Pad((int(NamesLen) * 1))
}
-// Waits and reads reply data from request GetScreenResources
+// Reply blocks and returns the reply data for a GetScreenResources request.
func (cook GetScreenResourcesCookie) Reply() (*GetScreenResourcesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1790,7 +1796,7 @@ func (cook GetScreenResourcesCookie) Reply() (*GetScreenResourcesReply, error) {
return getScreenResourcesReply(buf), nil
}
-// Read reply into structure from buffer for GetScreenResources
+// getScreenResourcesReply reads a byte slice into a GetScreenResourcesReply value.
func getScreenResourcesReply(buf []byte) *GetScreenResourcesReply {
v := new(GetScreenResourcesReply)
b := 1 // skip reply determinant
@@ -1848,6 +1854,7 @@ func getScreenResourcesReply(buf []byte) *GetScreenResourcesReply {
}
// Write request to wire for GetScreenResources
+// getScreenResourcesRequest writes a GetScreenResources request to a byte slice.
func getScreenResourcesRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -1868,29 +1875,31 @@ func getScreenResourcesRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request GetOutputInfo
-// size: 12
+// GetOutputInfoCookie is a cookie used only for GetOutputInfo requests.
type GetOutputInfoCookie struct {
*xgb.Cookie
}
+// GetOutputInfo sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getOutputInfoRequest(c, Output, ConfigTimestamp), cookie)
return GetOutputInfoCookie{cookie}
}
+// GetOutputInfoUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetOutputInfoUnchecked(c *xgb.Conn, Output Output, ConfigTimestamp xproto.Timestamp) GetOutputInfoCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getOutputInfoRequest(c, Output, ConfigTimestamp), cookie)
return GetOutputInfoCookie{cookie}
}
-// Request reply for GetOutputInfo
-// size: ((((36 + xgb.Pad((int(NumCrtcs) * 4))) + xgb.Pad((int(NumModes) * 4))) + xgb.Pad((int(NumClones) * 4))) + xgb.Pad((int(NameLen) * 1)))
+// GetOutputInfoReply represents the data returned from a GetOutputInfo request.
type GetOutputInfoReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status byte
Timestamp xproto.Timestamp
Crtc Crtc
@@ -1909,7 +1918,7 @@ type GetOutputInfoReply struct {
Name []byte // size: xgb.Pad((int(NameLen) * 1))
}
-// Waits and reads reply data from request GetOutputInfo
+// Reply blocks and returns the reply data for a GetOutputInfo request.
func (cook GetOutputInfoCookie) Reply() (*GetOutputInfoReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1921,7 +1930,7 @@ func (cook GetOutputInfoCookie) Reply() (*GetOutputInfoReply, error) {
return getOutputInfoReply(buf), nil
}
-// Read reply into structure from buffer for GetOutputInfo
+// getOutputInfoReply reads a byte slice into a GetOutputInfoReply value.
func getOutputInfoReply(buf []byte) *GetOutputInfoReply {
v := new(GetOutputInfoReply)
b := 1 // skip reply determinant
@@ -1997,6 +2006,7 @@ func getOutputInfoReply(buf []byte) *GetOutputInfoReply {
}
// Write request to wire for GetOutputInfo
+// getOutputInfoRequest writes a GetOutputInfo request to a byte slice.
func getOutputInfoRequest(c *xgb.Conn, Output Output, ConfigTimestamp xproto.Timestamp) []byte {
size := 12
b := 0
@@ -2020,36 +2030,38 @@ func getOutputInfoRequest(c *xgb.Conn, Output Output, ConfigTimestamp xproto.Tim
return buf
}
-// Request ListOutputProperties
-// size: 8
+// ListOutputPropertiesCookie is a cookie used only for ListOutputProperties requests.
type ListOutputPropertiesCookie struct {
*xgb.Cookie
}
+// ListOutputProperties sends a checked request.
+// If an error occurs, it will be returned with the reply by calling ListOutputPropertiesCookie.Reply()
func ListOutputProperties(c *xgb.Conn, Output Output) ListOutputPropertiesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(listOutputPropertiesRequest(c, Output), cookie)
return ListOutputPropertiesCookie{cookie}
}
+// ListOutputPropertiesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListOutputPropertiesUnchecked(c *xgb.Conn, Output Output) ListOutputPropertiesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listOutputPropertiesRequest(c, Output), cookie)
return ListOutputPropertiesCookie{cookie}
}
-// Request reply for ListOutputProperties
-// size: (32 + xgb.Pad((int(NumAtoms) * 4)))
+// ListOutputPropertiesReply represents the data returned from a ListOutputProperties request.
type ListOutputPropertiesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumAtoms uint16
// padding: 22 bytes
Atoms []xproto.Atom // size: xgb.Pad((int(NumAtoms) * 4))
}
-// Waits and reads reply data from request ListOutputProperties
+// Reply blocks and returns the reply data for a ListOutputProperties request.
func (cook ListOutputPropertiesCookie) Reply() (*ListOutputPropertiesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2061,7 +2073,7 @@ func (cook ListOutputPropertiesCookie) Reply() (*ListOutputPropertiesReply, erro
return listOutputPropertiesReply(buf), nil
}
-// Read reply into structure from buffer for ListOutputProperties
+// listOutputPropertiesReply reads a byte slice into a ListOutputPropertiesReply value.
func listOutputPropertiesReply(buf []byte) *ListOutputPropertiesReply {
v := new(ListOutputPropertiesReply)
b := 1 // skip reply determinant
@@ -2090,6 +2102,7 @@ func listOutputPropertiesReply(buf []byte) *ListOutputPropertiesReply {
}
// Write request to wire for ListOutputProperties
+// listOutputPropertiesRequest writes a ListOutputProperties request to a byte slice.
func listOutputPropertiesRequest(c *xgb.Conn, Output Output) []byte {
size := 8
b := 0
@@ -2110,29 +2123,31 @@ func listOutputPropertiesRequest(c *xgb.Conn, Output Output) []byte {
return buf
}
-// Request QueryOutputProperty
-// size: 12
+// QueryOutputPropertyCookie is a cookie used only for QueryOutputProperty requests.
type QueryOutputPropertyCookie struct {
*xgb.Cookie
}
+// QueryOutputProperty sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryOutputPropertyRequest(c, Output, Property), cookie)
return QueryOutputPropertyCookie{cookie}
}
+// QueryOutputPropertyUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryOutputPropertyUnchecked(c *xgb.Conn, Output Output, Property xproto.Atom) QueryOutputPropertyCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryOutputPropertyRequest(c, Output, Property), cookie)
return QueryOutputPropertyCookie{cookie}
}
-// Request reply for QueryOutputProperty
-// size: (32 + xgb.Pad((int(Length) * 4)))
+// QueryOutputPropertyReply represents the data returned from a QueryOutputProperty request.
type QueryOutputPropertyReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Pending bool
Range bool
@@ -2141,7 +2156,7 @@ type QueryOutputPropertyReply struct {
ValidValues []int32 // size: xgb.Pad((int(Length) * 4))
}
-// Waits and reads reply data from request QueryOutputProperty
+// Reply blocks and returns the reply data for a QueryOutputProperty request.
func (cook QueryOutputPropertyCookie) Reply() (*QueryOutputPropertyReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2153,7 +2168,7 @@ func (cook QueryOutputPropertyCookie) Reply() (*QueryOutputPropertyReply, error)
return queryOutputPropertyReply(buf), nil
}
-// Read reply into structure from buffer for QueryOutputProperty
+// queryOutputPropertyReply reads a byte slice into a QueryOutputPropertyReply value.
func queryOutputPropertyReply(buf []byte) *QueryOutputPropertyReply {
v := new(QueryOutputPropertyReply)
b := 1 // skip reply determinant
@@ -2200,6 +2215,7 @@ func queryOutputPropertyReply(buf []byte) *QueryOutputPropertyReply {
}
// Write request to wire for QueryOutputProperty
+// queryOutputPropertyRequest writes a QueryOutputProperty request to a byte slice.
func queryOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Atom) []byte {
size := 12
b := 0
@@ -2223,30 +2239,35 @@ func queryOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Atom
return buf
}
-// Request ConfigureOutputProperty
-// size: xgb.Pad((16 + xgb.Pad((len(Values) * 4))))
+// ConfigureOutputPropertyCookie is a cookie used only for ConfigureOutputProperty requests.
type ConfigureOutputPropertyCookie struct {
*xgb.Cookie
}
-// Write request to wire for ConfigureOutputProperty
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(configureOutputPropertyRequest(c, Output, Property, Pending, Range, Values), cookie)
return ConfigureOutputPropertyCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(configureOutputPropertyRequest(c, Output, Property, Pending, Range, Values), cookie)
return ConfigureOutputPropertyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((16 + xgb.Pad((len(Values) * 4))))
b := 0
@@ -2292,30 +2313,35 @@ func configureOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.
return buf
}
-// Request ChangeOutputProperty
-// size: xgb.Pad((24 + xgb.Pad((((int(NumUnits) * int(Format)) / 8) * 1))))
+// ChangeOutputPropertyCookie is a cookie used only for ChangeOutputProperty requests.
type ChangeOutputPropertyCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeOutputProperty
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(changeOutputPropertyRequest(c, Output, Property, Type, Format, Mode, NumUnits, Data), cookie)
return ChangeOutputPropertyCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(changeOutputPropertyRequest(c, Output, Property, Type, Format, Mode, NumUnits, Data), cookie)
return ChangeOutputPropertyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((24 + xgb.Pad((((int(NumUnits) * int(Format)) / 8) * 1))))
b := 0
@@ -2356,30 +2382,35 @@ func changeOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Ato
return buf
}
-// Request DeleteOutputProperty
-// size: 12
+// DeleteOutputPropertyCookie is a cookie used only for DeleteOutputProperty requests.
type DeleteOutputPropertyCookie struct {
*xgb.Cookie
}
-// Write request to wire for DeleteOutputProperty
+// DeleteOutputProperty sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DeleteOutputProperty(c *xgb.Conn, Output Output, Property xproto.Atom) DeleteOutputPropertyCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(deleteOutputPropertyRequest(c, Output, Property), cookie)
return DeleteOutputPropertyCookie{cookie}
}
+// DeleteOutputPropertyChecked sends a checked request.
+// If an error occurs, it can be retrieved using DeleteOutputPropertyCookie.Check()
func DeleteOutputPropertyChecked(c *xgb.Conn, Output Output, Property xproto.Atom) DeleteOutputPropertyCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(deleteOutputPropertyRequest(c, Output, Property), cookie)
return DeleteOutputPropertyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DeleteOutputPropertyCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DeleteOutputProperty
+// deleteOutputPropertyRequest writes a DeleteOutputProperty request to a byte slice.
func deleteOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Atom) []byte {
size := 12
b := 0
@@ -2403,29 +2434,31 @@ func deleteOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Ato
return buf
}
-// Request GetOutputProperty
-// size: 28
+// GetOutputPropertyCookie is a cookie used only for GetOutputProperty requests.
type GetOutputPropertyCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getOutputPropertyRequest(c, Output, Property, Type, LongOffset, LongLength, Delete, Pending), cookie)
return GetOutputPropertyCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getOutputPropertyRequest(c, Output, Property, Type, LongOffset, LongLength, Delete, Pending), cookie)
return GetOutputPropertyCookie{cookie}
}
-// Request reply for GetOutputProperty
-// size: (32 + xgb.Pad(((int(NumItems) * (int(Format) / 8)) * 1)))
+// GetOutputPropertyReply represents the data returned from a GetOutputProperty request.
type GetOutputPropertyReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Format byte
Type xproto.Atom
BytesAfter uint32
@@ -2434,7 +2467,7 @@ type GetOutputPropertyReply struct {
Data []byte // size: xgb.Pad(((int(NumItems) * (int(Format) / 8)) * 1))
}
-// Waits and reads reply data from request GetOutputProperty
+// Reply blocks and returns the reply data for a GetOutputProperty request.
func (cook GetOutputPropertyCookie) Reply() (*GetOutputPropertyReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2446,7 +2479,7 @@ func (cook GetOutputPropertyCookie) Reply() (*GetOutputPropertyReply, error) {
return getOutputPropertyReply(buf), nil
}
-// Read reply into structure from buffer for GetOutputProperty
+// getOutputPropertyReply reads a byte slice into a GetOutputPropertyReply value.
func getOutputPropertyReply(buf []byte) *GetOutputPropertyReply {
v := new(GetOutputPropertyReply)
b := 1 // skip reply determinant
@@ -2479,6 +2512,7 @@ func getOutputPropertyReply(buf []byte) *GetOutputPropertyReply {
}
// 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 {
size := 28
b := 0
@@ -2527,35 +2561,37 @@ func getOutputPropertyRequest(c *xgb.Conn, Output Output, Property xproto.Atom,
return buf
}
-// Request CreateMode
-// size: xgb.Pad((40 + xgb.Pad((len(Name) * 1))))
+// CreateModeCookie is a cookie used only for CreateMode requests.
type CreateModeCookie struct {
*xgb.Cookie
}
+// CreateMode sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(createModeRequest(c, Window, ModeInfo, Name), cookie)
return CreateModeCookie{cookie}
}
+// CreateModeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateModeUnchecked(c *xgb.Conn, Window xproto.Window, ModeInfo ModeInfo, Name string) CreateModeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(createModeRequest(c, Window, ModeInfo, Name), cookie)
return CreateModeCookie{cookie}
}
-// Request reply for CreateMode
-// size: 32
+// CreateModeReply represents the data returned from a CreateMode request.
type CreateModeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Mode Mode
// padding: 20 bytes
}
-// Waits and reads reply data from request CreateMode
+// Reply blocks and returns the reply data for a CreateMode request.
func (cook CreateModeCookie) Reply() (*CreateModeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2567,7 +2603,7 @@ func (cook CreateModeCookie) Reply() (*CreateModeReply, error) {
return createModeReply(buf), nil
}
-// Read reply into structure from buffer for CreateMode
+// createModeReply reads a byte slice into a CreateModeReply value.
func createModeReply(buf []byte) *CreateModeReply {
v := new(CreateModeReply)
b := 1 // skip reply determinant
@@ -2589,6 +2625,7 @@ func createModeReply(buf []byte) *CreateModeReply {
}
// Write request to wire for CreateMode
+// createModeRequest writes a CreateMode request to a byte slice.
func createModeRequest(c *xgb.Conn, Window xproto.Window, ModeInfo ModeInfo, Name string) []byte {
size := xgb.Pad((40 + xgb.Pad((len(Name) * 1))))
b := 0
@@ -2618,30 +2655,35 @@ func createModeRequest(c *xgb.Conn, Window xproto.Window, ModeInfo ModeInfo, Nam
return buf
}
-// Request DestroyMode
-// size: 8
+// DestroyModeCookie is a cookie used only for DestroyMode requests.
type DestroyModeCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyMode
+// DestroyMode sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroyMode(c *xgb.Conn, Mode Mode) DestroyModeCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyModeRequest(c, Mode), cookie)
return DestroyModeCookie{cookie}
}
+// DestroyModeChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyModeCookie.Check()
func DestroyModeChecked(c *xgb.Conn, Mode Mode) DestroyModeCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyModeRequest(c, Mode), cookie)
return DestroyModeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroyModeCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroyMode
+// destroyModeRequest writes a DestroyMode request to a byte slice.
func destroyModeRequest(c *xgb.Conn, Mode Mode) []byte {
size := 8
b := 0
@@ -2662,30 +2704,35 @@ func destroyModeRequest(c *xgb.Conn, Mode Mode) []byte {
return buf
}
-// Request AddOutputMode
-// size: 12
+// AddOutputModeCookie is a cookie used only for AddOutputMode requests.
type AddOutputModeCookie struct {
*xgb.Cookie
}
-// Write request to wire for AddOutputMode
+// AddOutputMode sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func AddOutputMode(c *xgb.Conn, Output Output, Mode Mode) AddOutputModeCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(addOutputModeRequest(c, Output, Mode), cookie)
return AddOutputModeCookie{cookie}
}
+// AddOutputModeChecked sends a checked request.
+// If an error occurs, it can be retrieved using AddOutputModeCookie.Check()
func AddOutputModeChecked(c *xgb.Conn, Output Output, Mode Mode) AddOutputModeCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(addOutputModeRequest(c, Output, Mode), cookie)
return AddOutputModeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook AddOutputModeCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for AddOutputMode
+// addOutputModeRequest writes a AddOutputMode request to a byte slice.
func addOutputModeRequest(c *xgb.Conn, Output Output, Mode Mode) []byte {
size := 12
b := 0
@@ -2709,30 +2756,35 @@ func addOutputModeRequest(c *xgb.Conn, Output Output, Mode Mode) []byte {
return buf
}
-// Request DeleteOutputMode
-// size: 12
+// DeleteOutputModeCookie is a cookie used only for DeleteOutputMode requests.
type DeleteOutputModeCookie struct {
*xgb.Cookie
}
-// Write request to wire for DeleteOutputMode
+// DeleteOutputMode sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DeleteOutputMode(c *xgb.Conn, Output Output, Mode Mode) DeleteOutputModeCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(deleteOutputModeRequest(c, Output, Mode), cookie)
return DeleteOutputModeCookie{cookie}
}
+// DeleteOutputModeChecked sends a checked request.
+// If an error occurs, it can be retrieved using DeleteOutputModeCookie.Check()
func DeleteOutputModeChecked(c *xgb.Conn, Output Output, Mode Mode) DeleteOutputModeCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(deleteOutputModeRequest(c, Output, Mode), cookie)
return DeleteOutputModeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DeleteOutputModeCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DeleteOutputMode
+// deleteOutputModeRequest writes a DeleteOutputMode request to a byte slice.
func deleteOutputModeRequest(c *xgb.Conn, Output Output, Mode Mode) []byte {
size := 12
b := 0
@@ -2756,29 +2808,31 @@ func deleteOutputModeRequest(c *xgb.Conn, Output Output, Mode Mode) []byte {
return buf
}
-// Request GetCrtcInfo
-// size: 12
+// GetCrtcInfoCookie is a cookie used only for GetCrtcInfo requests.
type GetCrtcInfoCookie struct {
*xgb.Cookie
}
+// GetCrtcInfo sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getCrtcInfoRequest(c, Crtc, ConfigTimestamp), cookie)
return GetCrtcInfoCookie{cookie}
}
+// GetCrtcInfoUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetCrtcInfoUnchecked(c *xgb.Conn, Crtc Crtc, ConfigTimestamp xproto.Timestamp) GetCrtcInfoCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getCrtcInfoRequest(c, Crtc, ConfigTimestamp), cookie)
return GetCrtcInfoCookie{cookie}
}
-// Request reply for GetCrtcInfo
-// size: ((32 + xgb.Pad((int(NumOutputs) * 4))) + xgb.Pad((int(NumPossibleOutputs) * 4)))
+// GetCrtcInfoReply represents the data returned from a GetCrtcInfo request.
type GetCrtcInfoReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status byte
Timestamp xproto.Timestamp
X int16
@@ -2794,7 +2848,7 @@ type GetCrtcInfoReply struct {
Possible []Output // size: xgb.Pad((int(NumPossibleOutputs) * 4))
}
-// Waits and reads reply data from request GetCrtcInfo
+// Reply blocks and returns the reply data for a GetCrtcInfo request.
func (cook GetCrtcInfoCookie) Reply() (*GetCrtcInfoReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2806,7 +2860,7 @@ func (cook GetCrtcInfoCookie) Reply() (*GetCrtcInfoReply, error) {
return getCrtcInfoReply(buf), nil
}
-// Read reply into structure from buffer for GetCrtcInfo
+// getCrtcInfoReply reads a byte slice into a GetCrtcInfoReply value.
func getCrtcInfoReply(buf []byte) *GetCrtcInfoReply {
v := new(GetCrtcInfoReply)
b := 1 // skip reply determinant
@@ -2868,6 +2922,7 @@ func getCrtcInfoReply(buf []byte) *GetCrtcInfoReply {
}
// Write request to wire for GetCrtcInfo
+// getCrtcInfoRequest writes a GetCrtcInfo request to a byte slice.
func getCrtcInfoRequest(c *xgb.Conn, Crtc Crtc, ConfigTimestamp xproto.Timestamp) []byte {
size := 12
b := 0
@@ -2891,35 +2946,37 @@ func getCrtcInfoRequest(c *xgb.Conn, Crtc Crtc, ConfigTimestamp xproto.Timestamp
return buf
}
-// Request SetCrtcConfig
-// size: xgb.Pad((28 + xgb.Pad((len(Outputs) * 4))))
+// SetCrtcConfigCookie is a cookie used only for SetCrtcConfig requests.
type SetCrtcConfigCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(setCrtcConfigRequest(c, Crtc, Timestamp, ConfigTimestamp, X, Y, Mode, Rotation, Outputs), cookie)
return SetCrtcConfigCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(setCrtcConfigRequest(c, Crtc, Timestamp, ConfigTimestamp, X, Y, Mode, Rotation, Outputs), cookie)
return SetCrtcConfigCookie{cookie}
}
-// Request reply for SetCrtcConfig
-// size: 32
+// SetCrtcConfigReply represents the data returned from a SetCrtcConfig request.
type SetCrtcConfigReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status byte
Timestamp xproto.Timestamp
// padding: 20 bytes
}
-// Waits and reads reply data from request SetCrtcConfig
+// Reply blocks and returns the reply data for a SetCrtcConfig request.
func (cook SetCrtcConfigCookie) Reply() (*SetCrtcConfigReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2931,7 +2988,7 @@ func (cook SetCrtcConfigCookie) Reply() (*SetCrtcConfigReply, error) {
return setCrtcConfigReply(buf), nil
}
-// Read reply into structure from buffer for SetCrtcConfig
+// setCrtcConfigReply reads a byte slice into a SetCrtcConfigReply value.
func setCrtcConfigReply(buf []byte) *SetCrtcConfigReply {
v := new(SetCrtcConfigReply)
b := 1 // skip reply determinant
@@ -2954,6 +3011,7 @@ func setCrtcConfigReply(buf []byte) *SetCrtcConfigReply {
}
// 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 {
size := xgb.Pad((28 + xgb.Pad((len(Outputs) * 4))))
b := 0
@@ -3000,35 +3058,37 @@ func setCrtcConfigRequest(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, Co
return buf
}
-// Request GetCrtcGammaSize
-// size: 8
+// GetCrtcGammaSizeCookie is a cookie used only for GetCrtcGammaSize requests.
type GetCrtcGammaSizeCookie struct {
*xgb.Cookie
}
+// GetCrtcGammaSize sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetCrtcGammaSizeCookie.Reply()
func GetCrtcGammaSize(c *xgb.Conn, Crtc Crtc) GetCrtcGammaSizeCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getCrtcGammaSizeRequest(c, Crtc), cookie)
return GetCrtcGammaSizeCookie{cookie}
}
+// GetCrtcGammaSizeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetCrtcGammaSizeUnchecked(c *xgb.Conn, Crtc Crtc) GetCrtcGammaSizeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getCrtcGammaSizeRequest(c, Crtc), cookie)
return GetCrtcGammaSizeCookie{cookie}
}
-// Request reply for GetCrtcGammaSize
-// size: 32
+// GetCrtcGammaSizeReply represents the data returned from a GetCrtcGammaSize request.
type GetCrtcGammaSizeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Size uint16
// padding: 22 bytes
}
-// Waits and reads reply data from request GetCrtcGammaSize
+// Reply blocks and returns the reply data for a GetCrtcGammaSize request.
func (cook GetCrtcGammaSizeCookie) Reply() (*GetCrtcGammaSizeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3040,7 +3100,7 @@ func (cook GetCrtcGammaSizeCookie) Reply() (*GetCrtcGammaSizeReply, error) {
return getCrtcGammaSizeReply(buf), nil
}
-// Read reply into structure from buffer for GetCrtcGammaSize
+// getCrtcGammaSizeReply reads a byte slice into a GetCrtcGammaSizeReply value.
func getCrtcGammaSizeReply(buf []byte) *GetCrtcGammaSizeReply {
v := new(GetCrtcGammaSizeReply)
b := 1 // skip reply determinant
@@ -3062,6 +3122,7 @@ func getCrtcGammaSizeReply(buf []byte) *GetCrtcGammaSizeReply {
}
// Write request to wire for GetCrtcGammaSize
+// getCrtcGammaSizeRequest writes a GetCrtcGammaSize request to a byte slice.
func getCrtcGammaSizeRequest(c *xgb.Conn, Crtc Crtc) []byte {
size := 8
b := 0
@@ -3082,29 +3143,31 @@ func getCrtcGammaSizeRequest(c *xgb.Conn, Crtc Crtc) []byte {
return buf
}
-// Request GetCrtcGamma
-// size: 8
+// GetCrtcGammaCookie is a cookie used only for GetCrtcGamma requests.
type GetCrtcGammaCookie struct {
*xgb.Cookie
}
+// GetCrtcGamma sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetCrtcGammaCookie.Reply()
func GetCrtcGamma(c *xgb.Conn, Crtc Crtc) GetCrtcGammaCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getCrtcGammaRequest(c, Crtc), cookie)
return GetCrtcGammaCookie{cookie}
}
+// GetCrtcGammaUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetCrtcGammaUnchecked(c *xgb.Conn, Crtc Crtc) GetCrtcGammaCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getCrtcGammaRequest(c, Crtc), cookie)
return GetCrtcGammaCookie{cookie}
}
-// Request reply for GetCrtcGamma
-// size: (((32 + xgb.Pad((int(Size) * 2))) + xgb.Pad((int(Size) * 2))) + xgb.Pad((int(Size) * 2)))
+// GetCrtcGammaReply represents the data returned from a GetCrtcGamma request.
type GetCrtcGammaReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Size uint16
// padding: 22 bytes
@@ -3113,7 +3176,7 @@ type GetCrtcGammaReply struct {
Blue []uint16 // size: xgb.Pad((int(Size) * 2))
}
-// Waits and reads reply data from request GetCrtcGamma
+// Reply blocks and returns the reply data for a GetCrtcGamma request.
func (cook GetCrtcGammaCookie) Reply() (*GetCrtcGammaReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3125,7 +3188,7 @@ func (cook GetCrtcGammaCookie) Reply() (*GetCrtcGammaReply, error) {
return getCrtcGammaReply(buf), nil
}
-// Read reply into structure from buffer for GetCrtcGamma
+// getCrtcGammaReply reads a byte slice into a GetCrtcGammaReply value.
func getCrtcGammaReply(buf []byte) *GetCrtcGammaReply {
v := new(GetCrtcGammaReply)
b := 1 // skip reply determinant
@@ -3168,6 +3231,7 @@ func getCrtcGammaReply(buf []byte) *GetCrtcGammaReply {
}
// Write request to wire for GetCrtcGamma
+// getCrtcGammaRequest writes a GetCrtcGamma request to a byte slice.
func getCrtcGammaRequest(c *xgb.Conn, Crtc Crtc) []byte {
size := 8
b := 0
@@ -3188,30 +3252,35 @@ func getCrtcGammaRequest(c *xgb.Conn, Crtc Crtc) []byte {
return buf
}
-// Request SetCrtcGamma
-// size: xgb.Pad((((12 + xgb.Pad((int(Size) * 2))) + xgb.Pad((int(Size) * 2))) + xgb.Pad((int(Size) * 2))))
+// SetCrtcGammaCookie is a cookie used only for SetCrtcGamma requests.
type SetCrtcGammaCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetCrtcGamma
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setCrtcGammaRequest(c, Crtc, Size, Red, Green, Blue), cookie)
return SetCrtcGammaCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setCrtcGammaRequest(c, Crtc, Size, Red, Green, Blue), cookie)
return SetCrtcGammaCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((((12 + xgb.Pad((int(Size) * 2))) + xgb.Pad((int(Size) * 2))) + xgb.Pad((int(Size) * 2))))
b := 0
@@ -3255,29 +3324,31 @@ func setCrtcGammaRequest(c *xgb.Conn, Crtc Crtc, Size uint16, Red []uint16, Gree
return buf
}
-// Request GetScreenResourcesCurrent
-// size: 8
+// GetScreenResourcesCurrentCookie is a cookie used only for GetScreenResourcesCurrent requests.
type GetScreenResourcesCurrentCookie struct {
*xgb.Cookie
}
+// GetScreenResourcesCurrent sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetScreenResourcesCurrentCookie.Reply()
func GetScreenResourcesCurrent(c *xgb.Conn, Window xproto.Window) GetScreenResourcesCurrentCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getScreenResourcesCurrentRequest(c, Window), cookie)
return GetScreenResourcesCurrentCookie{cookie}
}
+// GetScreenResourcesCurrentUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetScreenResourcesCurrentUnchecked(c *xgb.Conn, Window xproto.Window) GetScreenResourcesCurrentCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getScreenResourcesCurrentRequest(c, Window), cookie)
return GetScreenResourcesCurrentCookie{cookie}
}
-// Request reply for GetScreenResourcesCurrent
-// size: ((((32 + xgb.Pad((int(NumCrtcs) * 4))) + xgb.Pad((int(NumOutputs) * 4))) + xgb.Pad((int(NumModes) * 32))) + xgb.Pad((int(NamesLen) * 1)))
+// GetScreenResourcesCurrentReply represents the data returned from a GetScreenResourcesCurrent request.
type GetScreenResourcesCurrentReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Timestamp xproto.Timestamp
ConfigTimestamp xproto.Timestamp
@@ -3292,7 +3363,7 @@ type GetScreenResourcesCurrentReply struct {
Names []byte // size: xgb.Pad((int(NamesLen) * 1))
}
-// Waits and reads reply data from request GetScreenResourcesCurrent
+// Reply blocks and returns the reply data for a GetScreenResourcesCurrent request.
func (cook GetScreenResourcesCurrentCookie) Reply() (*GetScreenResourcesCurrentReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3304,7 +3375,7 @@ func (cook GetScreenResourcesCurrentCookie) Reply() (*GetScreenResourcesCurrentR
return getScreenResourcesCurrentReply(buf), nil
}
-// Read reply into structure from buffer for GetScreenResourcesCurrent
+// getScreenResourcesCurrentReply reads a byte slice into a GetScreenResourcesCurrentReply value.
func getScreenResourcesCurrentReply(buf []byte) *GetScreenResourcesCurrentReply {
v := new(GetScreenResourcesCurrentReply)
b := 1 // skip reply determinant
@@ -3362,6 +3433,7 @@ func getScreenResourcesCurrentReply(buf []byte) *GetScreenResourcesCurrentReply
}
// Write request to wire for GetScreenResourcesCurrent
+// getScreenResourcesCurrentRequest writes a GetScreenResourcesCurrent request to a byte slice.
func getScreenResourcesCurrentRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -3382,30 +3454,35 @@ func getScreenResourcesCurrentRequest(c *xgb.Conn, Window xproto.Window) []byte
return buf
}
-// Request SetCrtcTransform
-// size: xgb.Pad(((48 + xgb.Pad((int(FilterLen) * 1))) + xgb.Pad((len(FilterParams) * 4))))
+// SetCrtcTransformCookie is a cookie used only for SetCrtcTransform requests.
type SetCrtcTransformCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetCrtcTransform
+// SetCrtcTransform sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetCrtcTransform(c *xgb.Conn, Crtc Crtc, Transform render.Transform, FilterLen uint16, FilterName string, FilterParams []render.Fixed) SetCrtcTransformCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setCrtcTransformRequest(c, Crtc, Transform, FilterLen, FilterName, FilterParams), cookie)
return SetCrtcTransformCookie{cookie}
}
+// SetCrtcTransformChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setCrtcTransformRequest(c, Crtc, Transform, FilterLen, FilterName, FilterParams), cookie)
return SetCrtcTransformCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetCrtcTransformCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetCrtcTransform
+// setCrtcTransformRequest writes a SetCrtcTransform request to a byte slice.
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))) + xgb.Pad((len(FilterParams) * 4))))
b := 0
@@ -3446,29 +3523,31 @@ func setCrtcTransformRequest(c *xgb.Conn, Crtc Crtc, Transform render.Transform,
return buf
}
-// Request GetCrtcTransform
-// size: 8
+// GetCrtcTransformCookie is a cookie used only for GetCrtcTransform requests.
type GetCrtcTransformCookie struct {
*xgb.Cookie
}
+// GetCrtcTransform sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetCrtcTransformCookie.Reply()
func GetCrtcTransform(c *xgb.Conn, Crtc Crtc) GetCrtcTransformCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getCrtcTransformRequest(c, Crtc), cookie)
return GetCrtcTransformCookie{cookie}
}
+// GetCrtcTransformUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetCrtcTransformUnchecked(c *xgb.Conn, Crtc Crtc) GetCrtcTransformCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getCrtcTransformRequest(c, Crtc), cookie)
return GetCrtcTransformCookie{cookie}
}
-// Request reply for GetCrtcTransform
-// size: ((((96 + xgb.Pad((int(PendingLen) * 1))) + xgb.Pad((int(PendingNparams) * 4))) + xgb.Pad((int(CurrentLen) * 1))) + xgb.Pad((int(CurrentNparams) * 4)))
+// GetCrtcTransformReply represents the data returned from a GetCrtcTransform request.
type GetCrtcTransformReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
PendingTransform render.Transform
HasTransforms bool
@@ -3485,7 +3564,7 @@ type GetCrtcTransformReply struct {
CurrentParams []render.Fixed // size: xgb.Pad((int(CurrentNparams) * 4))
}
-// Waits and reads reply data from request GetCrtcTransform
+// Reply blocks and returns the reply data for a GetCrtcTransform request.
func (cook GetCrtcTransformCookie) Reply() (*GetCrtcTransformReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3497,7 +3576,7 @@ func (cook GetCrtcTransformCookie) Reply() (*GetCrtcTransformReply, error) {
return getCrtcTransformReply(buf), nil
}
-// Read reply into structure from buffer for GetCrtcTransform
+// getCrtcTransformReply reads a byte slice into a GetCrtcTransformReply value.
func getCrtcTransformReply(buf []byte) *GetCrtcTransformReply {
v := new(GetCrtcTransformReply)
b := 1 // skip reply determinant
@@ -3571,6 +3650,7 @@ func getCrtcTransformReply(buf []byte) *GetCrtcTransformReply {
}
// Write request to wire for GetCrtcTransform
+// getCrtcTransformRequest writes a GetCrtcTransform request to a byte slice.
func getCrtcTransformRequest(c *xgb.Conn, Crtc Crtc) []byte {
size := 8
b := 0
@@ -3591,29 +3671,31 @@ func getCrtcTransformRequest(c *xgb.Conn, Crtc Crtc) []byte {
return buf
}
-// Request GetPanning
-// size: 8
+// GetPanningCookie is a cookie used only for GetPanning requests.
type GetPanningCookie struct {
*xgb.Cookie
}
+// GetPanning sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetPanningCookie.Reply()
func GetPanning(c *xgb.Conn, Crtc Crtc) GetPanningCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getPanningRequest(c, Crtc), cookie)
return GetPanningCookie{cookie}
}
+// GetPanningUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPanningUnchecked(c *xgb.Conn, Crtc Crtc) GetPanningCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPanningRequest(c, Crtc), cookie)
return GetPanningCookie{cookie}
}
-// Request reply for GetPanning
-// size: 36
+// GetPanningReply represents the data returned from a GetPanning request.
type GetPanningReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status byte
Timestamp xproto.Timestamp
Left uint16
@@ -3630,7 +3712,7 @@ type GetPanningReply struct {
BorderBottom int16
}
-// Waits and reads reply data from request GetPanning
+// Reply blocks and returns the reply data for a GetPanning request.
func (cook GetPanningCookie) Reply() (*GetPanningReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3642,7 +3724,7 @@ func (cook GetPanningCookie) Reply() (*GetPanningReply, error) {
return getPanningReply(buf), nil
}
-// Read reply into structure from buffer for GetPanning
+// getPanningReply reads a byte slice into a GetPanningReply value.
func getPanningReply(buf []byte) *GetPanningReply {
v := new(GetPanningReply)
b := 1 // skip reply determinant
@@ -3699,6 +3781,7 @@ func getPanningReply(buf []byte) *GetPanningReply {
}
// Write request to wire for GetPanning
+// getPanningRequest writes a GetPanning request to a byte slice.
func getPanningRequest(c *xgb.Conn, Crtc Crtc) []byte {
size := 8
b := 0
@@ -3719,34 +3802,36 @@ func getPanningRequest(c *xgb.Conn, Crtc Crtc) []byte {
return buf
}
-// Request SetPanning
-// size: 36
+// SetPanningCookie is a cookie used only for SetPanning requests.
type SetPanningCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(setPanningRequest(c, Crtc, Timestamp, Left, Top, Width, Height, TrackLeft, TrackTop, TrackWidth, TrackHeight, BorderLeft, BorderTop, BorderRight, BorderBottom), cookie)
return SetPanningCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(setPanningRequest(c, Crtc, Timestamp, Left, Top, Width, Height, TrackLeft, TrackTop, TrackWidth, TrackHeight, BorderLeft, BorderTop, BorderRight, BorderBottom), cookie)
return SetPanningCookie{cookie}
}
-// Request reply for SetPanning
-// size: 12
+// SetPanningReply represents the data returned from a SetPanning request.
type SetPanningReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status byte
Timestamp xproto.Timestamp
}
-// Waits and reads reply data from request SetPanning
+// Reply blocks and returns the reply data for a SetPanning request.
func (cook SetPanningCookie) Reply() (*SetPanningReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3758,7 +3843,7 @@ func (cook SetPanningCookie) Reply() (*SetPanningReply, error) {
return setPanningReply(buf), nil
}
-// Read reply into structure from buffer for SetPanning
+// setPanningReply reads a byte slice into a SetPanningReply value.
func setPanningReply(buf []byte) *SetPanningReply {
v := new(SetPanningReply)
b := 1 // skip reply determinant
@@ -3779,6 +3864,7 @@ func setPanningReply(buf []byte) *SetPanningReply {
}
// 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 {
size := 36
b := 0
@@ -3838,30 +3924,35 @@ func setPanningRequest(c *xgb.Conn, Crtc Crtc, Timestamp xproto.Timestamp, Left
return buf
}
-// Request SetOutputPrimary
-// size: 12
+// SetOutputPrimaryCookie is a cookie used only for SetOutputPrimary requests.
type SetOutputPrimaryCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetOutputPrimary
+// SetOutputPrimary sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetOutputPrimary(c *xgb.Conn, Window xproto.Window, Output Output) SetOutputPrimaryCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setOutputPrimaryRequest(c, Window, Output), cookie)
return SetOutputPrimaryCookie{cookie}
}
+// SetOutputPrimaryChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetOutputPrimaryCookie.Check()
func SetOutputPrimaryChecked(c *xgb.Conn, Window xproto.Window, Output Output) SetOutputPrimaryCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setOutputPrimaryRequest(c, Window, Output), cookie)
return SetOutputPrimaryCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetOutputPrimaryCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetOutputPrimary
+// setOutputPrimaryRequest writes a SetOutputPrimary request to a byte slice.
func setOutputPrimaryRequest(c *xgb.Conn, Window xproto.Window, Output Output) []byte {
size := 12
b := 0
@@ -3885,34 +3976,36 @@ func setOutputPrimaryRequest(c *xgb.Conn, Window xproto.Window, Output Output) [
return buf
}
-// Request GetOutputPrimary
-// size: 8
+// GetOutputPrimaryCookie is a cookie used only for GetOutputPrimary requests.
type GetOutputPrimaryCookie struct {
*xgb.Cookie
}
+// GetOutputPrimary sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetOutputPrimaryCookie.Reply()
func GetOutputPrimary(c *xgb.Conn, Window xproto.Window) GetOutputPrimaryCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getOutputPrimaryRequest(c, Window), cookie)
return GetOutputPrimaryCookie{cookie}
}
+// GetOutputPrimaryUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetOutputPrimaryUnchecked(c *xgb.Conn, Window xproto.Window) GetOutputPrimaryCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getOutputPrimaryRequest(c, Window), cookie)
return GetOutputPrimaryCookie{cookie}
}
-// Request reply for GetOutputPrimary
-// size: 12
+// GetOutputPrimaryReply represents the data returned from a GetOutputPrimary request.
type GetOutputPrimaryReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Output Output
}
-// Waits and reads reply data from request GetOutputPrimary
+// Reply blocks and returns the reply data for a GetOutputPrimary request.
func (cook GetOutputPrimaryCookie) Reply() (*GetOutputPrimaryReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3924,7 +4017,7 @@ func (cook GetOutputPrimaryCookie) Reply() (*GetOutputPrimaryReply, error) {
return getOutputPrimaryReply(buf), nil
}
-// Read reply into structure from buffer for GetOutputPrimary
+// getOutputPrimaryReply reads a byte slice into a GetOutputPrimaryReply value.
func getOutputPrimaryReply(buf []byte) *GetOutputPrimaryReply {
v := new(GetOutputPrimaryReply)
b := 1 // skip reply determinant
@@ -3944,6 +4037,7 @@ func getOutputPrimaryReply(buf []byte) *GetOutputPrimaryReply {
}
// Write request to wire for GetOutputPrimary
+// getOutputPrimaryRequest writes a GetOutputPrimary request to a byte slice.
func getOutputPrimaryRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
diff --git a/nexgb/record/record.go b/nexgb/record/record.go
index 740353d..28b268e 100644
--- a/nexgb/record/record.go
+++ b/nexgb/record/record.go
@@ -2,7 +2,7 @@
package record
/*
- This file was generated by record.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by record.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -90,14 +90,12 @@ type ElementHeader byte
type ClientSpec uint32
-// 'Range8' struct definition
-// Size: 2
type Range8 struct {
First byte
Last byte
}
-// Struct read Range8
+// Range8Read reads a byte slice into a Range8 value.
func Range8Read(buf []byte, v *Range8) int {
b := 0
@@ -110,7 +108,7 @@ func Range8Read(buf []byte, v *Range8) int {
return b
}
-// Struct list read Range8
+// Range8ReadList reads a byte slice into a list of Range8 values.
func Range8ReadList(buf []byte, dest []Range8) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -120,7 +118,7 @@ func Range8ReadList(buf []byte, dest []Range8) int {
return xgb.Pad(b)
}
-// Struct write Range8
+// Bytes writes a Range8 value to a byte slice.
func (v Range8) Bytes() []byte {
buf := make([]byte, 2)
b := 0
@@ -134,7 +132,7 @@ func (v Range8) Bytes() []byte {
return buf
}
-// Write struct list Range8
+// Range8ListBytes writes a list of %s(MISSING) values to a byte slice.
func Range8ListBytes(buf []byte, list []Range8) int {
b := 0
var structBytes []byte
@@ -146,14 +144,12 @@ func Range8ListBytes(buf []byte, list []Range8) int {
return b
}
-// 'Range16' struct definition
-// Size: 4
type Range16 struct {
First uint16
Last uint16
}
-// Struct read Range16
+// Range16Read reads a byte slice into a Range16 value.
func Range16Read(buf []byte, v *Range16) int {
b := 0
@@ -166,7 +162,7 @@ func Range16Read(buf []byte, v *Range16) int {
return b
}
-// Struct list read Range16
+// Range16ReadList reads a byte slice into a list of Range16 values.
func Range16ReadList(buf []byte, dest []Range16) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -176,7 +172,7 @@ func Range16ReadList(buf []byte, dest []Range16) int {
return xgb.Pad(b)
}
-// Struct write Range16
+// Bytes writes a Range16 value to a byte slice.
func (v Range16) Bytes() []byte {
buf := make([]byte, 4)
b := 0
@@ -190,7 +186,7 @@ func (v Range16) Bytes() []byte {
return buf
}
-// Write struct list Range16
+// Range16ListBytes writes a list of %s(MISSING) values to a byte slice.
func Range16ListBytes(buf []byte, list []Range16) int {
b := 0
var structBytes []byte
@@ -202,14 +198,12 @@ func Range16ListBytes(buf []byte, list []Range16) int {
return b
}
-// 'ExtRange' struct definition
-// Size: 6
type ExtRange struct {
Major Range8
Minor Range16
}
-// Struct read ExtRange
+// ExtRangeRead reads a byte slice into a ExtRange value.
func ExtRangeRead(buf []byte, v *ExtRange) int {
b := 0
@@ -222,7 +216,7 @@ func ExtRangeRead(buf []byte, v *ExtRange) int {
return b
}
-// Struct list read ExtRange
+// ExtRangeReadList reads a byte slice into a list of ExtRange values.
func ExtRangeReadList(buf []byte, dest []ExtRange) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -232,7 +226,7 @@ func ExtRangeReadList(buf []byte, dest []ExtRange) int {
return xgb.Pad(b)
}
-// Struct write ExtRange
+// Bytes writes a ExtRange value to a byte slice.
func (v ExtRange) Bytes() []byte {
buf := make([]byte, 6)
b := 0
@@ -252,7 +246,7 @@ func (v ExtRange) Bytes() []byte {
return buf
}
-// Write struct list ExtRange
+// ExtRangeListBytes writes a list of %s(MISSING) values to a byte slice.
func ExtRangeListBytes(buf []byte, list []ExtRange) int {
b := 0
var structBytes []byte
@@ -264,8 +258,6 @@ func ExtRangeListBytes(buf []byte, list []ExtRange) int {
return b
}
-// 'Range' struct definition
-// Size: 24
type Range struct {
CoreRequests Range8
CoreReplies Range8
@@ -278,7 +270,7 @@ type Range struct {
ClientDied bool
}
-// Struct read Range
+// RangeRead reads a byte slice into a Range value.
func RangeRead(buf []byte, v *Range) int {
b := 0
@@ -320,7 +312,7 @@ func RangeRead(buf []byte, v *Range) int {
return b
}
-// Struct list read Range
+// RangeReadList reads a byte slice into a list of Range values.
func RangeReadList(buf []byte, dest []Range) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -330,7 +322,7 @@ func RangeReadList(buf []byte, dest []Range) int {
return xgb.Pad(b)
}
-// Struct write Range
+// Bytes writes a Range value to a byte slice.
func (v Range) Bytes() []byte {
buf := make([]byte, 24)
b := 0
@@ -394,7 +386,7 @@ func (v Range) Bytes() []byte {
return buf
}
-// Write struct list Range
+// RangeListBytes writes a list of %s(MISSING) values to a byte slice.
func RangeListBytes(buf []byte, list []Range) int {
b := 0
var structBytes []byte
@@ -406,15 +398,13 @@ func RangeListBytes(buf []byte, list []Range) int {
return b
}
-// 'ClientInfo' struct definition
-// Size: (8 + xgb.Pad((int(NumRanges) * 24)))
type ClientInfo struct {
ClientResource ClientSpec
NumRanges uint32
Ranges []Range // size: xgb.Pad((int(NumRanges) * 24))
}
-// Struct read ClientInfo
+// ClientInfoRead reads a byte slice into a ClientInfo value.
func ClientInfoRead(buf []byte, v *ClientInfo) int {
b := 0
@@ -430,7 +420,7 @@ func ClientInfoRead(buf []byte, v *ClientInfo) int {
return b
}
-// Struct list read ClientInfo
+// ClientInfoReadList reads a byte slice into a list of ClientInfo values.
func ClientInfoReadList(buf []byte, dest []ClientInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -440,7 +430,7 @@ func ClientInfoReadList(buf []byte, dest []ClientInfo) int {
return xgb.Pad(b)
}
-// Struct write ClientInfo
+// Bytes writes a ClientInfo value to a byte slice.
func (v ClientInfo) Bytes() []byte {
buf := make([]byte, (8 + xgb.Pad((int(v.NumRanges) * 24))))
b := 0
@@ -456,7 +446,7 @@ func (v ClientInfo) Bytes() []byte {
return buf
}
-// Write struct list ClientInfo
+// ClientInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func ClientInfoListBytes(buf []byte, list []ClientInfo) int {
b := 0
var structBytes []byte
@@ -468,7 +458,7 @@ func ClientInfoListBytes(buf []byte, list []ClientInfo) int {
return b
}
-// Struct list size ClientInfo
+// ClientInfoListSize computes the size (bytes) of a list of ClientInfo values.
func ClientInfoListSize(list []ClientInfo) int {
size := 0
for _, item := range list {
@@ -477,9 +467,7 @@ func ClientInfoListSize(list []ClientInfo) int {
return size
}
-// Error definition BadContext (0)
-// Size: 32
-
+// BadBadContext is the error number for a BadBadContext.
const BadBadContext = 0
type BadContextError struct {
@@ -488,7 +476,7 @@ type BadContextError struct {
InvalidRecord uint32
}
-// Error read BadContext
+// BadContextErrorNew constructs a BadContextError value that implements xgb.Error from a byte slice.
func BadContextErrorNew(buf []byte) xgb.Error {
v := BadContextError{}
v.NiceName = "BadContext"
@@ -505,8 +493,8 @@ func BadContextErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadContextError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadContext error.
+// This is mostly used internally.
func (err BadContextError) SequenceId() uint16 {
return err.Sequence
}
@@ -527,35 +515,37 @@ func init() {
xgb.NewExtErrorFuncs["RECORD"][0] = BadContextErrorNew
}
-// Request QueryVersion
-// size: 8
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, MajorVersion, MinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, MajorVersion, MinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 12
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint16
MinorVersion uint16
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -567,7 +557,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -590,6 +580,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 8
b := 0
@@ -613,30 +604,35 @@ func queryVersionRequest(c *xgb.Conn, MajorVersion uint16, MinorVersion uint16)
return buf
}
-// Request CreateContext
-// size: xgb.Pad(((20 + xgb.Pad((int(NumClientSpecs) * 4))) + xgb.Pad((int(NumRanges) * 24))))
+// CreateContextCookie is a cookie used only for CreateContext requests.
type CreateContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateContext
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(createContextRequest(c, Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie)
return CreateContextCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createContextRequest(c, Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie)
return CreateContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad(((20 + xgb.Pad((int(NumClientSpecs) * 4))) + xgb.Pad((int(NumRanges) * 24))))
b := 0
@@ -676,30 +672,35 @@ func createContextRequest(c *xgb.Conn, Context Context, ElementHeader ElementHea
return buf
}
-// Request RegisterClients
-// size: xgb.Pad(((20 + xgb.Pad((int(NumClientSpecs) * 4))) + xgb.Pad((int(NumRanges) * 24))))
+// RegisterClientsCookie is a cookie used only for RegisterClients requests.
type RegisterClientsCookie struct {
*xgb.Cookie
}
-// Write request to wire for RegisterClients
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(registerClientsRequest(c, Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie)
return RegisterClientsCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(registerClientsRequest(c, Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie)
return RegisterClientsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad(((20 + xgb.Pad((int(NumClientSpecs) * 4))) + xgb.Pad((int(NumRanges) * 24))))
b := 0
@@ -739,30 +740,35 @@ func registerClientsRequest(c *xgb.Conn, Context Context, ElementHeader ElementH
return buf
}
-// Request UnregisterClients
-// size: xgb.Pad((12 + xgb.Pad((int(NumClientSpecs) * 4))))
+// UnregisterClientsCookie is a cookie used only for UnregisterClients requests.
type UnregisterClientsCookie struct {
*xgb.Cookie
}
-// Write request to wire for UnregisterClients
+// UnregisterClients sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UnregisterClients(c *xgb.Conn, Context Context, NumClientSpecs uint32, ClientSpecs []ClientSpec) UnregisterClientsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(unregisterClientsRequest(c, Context, NumClientSpecs, ClientSpecs), cookie)
return UnregisterClientsCookie{cookie}
}
+// UnregisterClientsChecked sends a checked request.
+// If an error occurs, it can be retrieved using UnregisterClientsCookie.Check()
func UnregisterClientsChecked(c *xgb.Conn, Context Context, NumClientSpecs uint32, ClientSpecs []ClientSpec) UnregisterClientsCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(unregisterClientsRequest(c, Context, NumClientSpecs, ClientSpecs), cookie)
return UnregisterClientsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UnregisterClientsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UnregisterClients
+// unregisterClientsRequest writes a UnregisterClients request to a byte slice.
func unregisterClientsRequest(c *xgb.Conn, Context Context, NumClientSpecs uint32, ClientSpecs []ClientSpec) []byte {
size := xgb.Pad((12 + xgb.Pad((int(NumClientSpecs) * 4))))
b := 0
@@ -792,29 +798,31 @@ func unregisterClientsRequest(c *xgb.Conn, Context Context, NumClientSpecs uint3
return buf
}
-// Request GetContext
-// size: 8
+// GetContextCookie is a cookie used only for GetContext requests.
type GetContextCookie struct {
*xgb.Cookie
}
+// GetContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetContextCookie.Reply()
func GetContext(c *xgb.Conn, Context Context) GetContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getContextRequest(c, Context), cookie)
return GetContextCookie{cookie}
}
+// GetContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetContextUnchecked(c *xgb.Conn, Context Context) GetContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getContextRequest(c, Context), cookie)
return GetContextCookie{cookie}
}
-// Request reply for GetContext
-// size: (32 + ClientInfoListSize(InterceptedClients))
+// GetContextReply represents the data returned from a GetContext request.
type GetContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Enabled bool
ElementHeader ElementHeader
// padding: 3 bytes
@@ -823,7 +831,7 @@ type GetContextReply struct {
InterceptedClients []ClientInfo // size: ClientInfoListSize(InterceptedClients)
}
-// Waits and reads reply data from request GetContext
+// Reply blocks and returns the reply data for a GetContext request.
func (cook GetContextCookie) Reply() (*GetContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -835,7 +843,7 @@ func (cook GetContextCookie) Reply() (*GetContextReply, error) {
return getContextReply(buf), nil
}
-// Read reply into structure from buffer for GetContext
+// getContextReply reads a byte slice into a GetContextReply value.
func getContextReply(buf []byte) *GetContextReply {
v := new(GetContextReply)
b := 1 // skip reply determinant
@@ -870,6 +878,7 @@ func getContextReply(buf []byte) *GetContextReply {
}
// Write request to wire for GetContext
+// getContextRequest writes a GetContext request to a byte slice.
func getContextRequest(c *xgb.Conn, Context Context) []byte {
size := 8
b := 0
@@ -890,29 +899,31 @@ func getContextRequest(c *xgb.Conn, Context Context) []byte {
return buf
}
-// Request EnableContext
-// size: 8
+// EnableContextCookie is a cookie used only for EnableContext requests.
type EnableContextCookie struct {
*xgb.Cookie
}
+// EnableContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling EnableContextCookie.Reply()
func EnableContext(c *xgb.Conn, Context Context) EnableContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(enableContextRequest(c, Context), cookie)
return EnableContextCookie{cookie}
}
+// EnableContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func EnableContextUnchecked(c *xgb.Conn, Context Context) EnableContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(enableContextRequest(c, Context), cookie)
return EnableContextCookie{cookie}
}
-// Request reply for EnableContext
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// EnableContextReply represents the data returned from a EnableContext request.
type EnableContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Category byte
ElementHeader ElementHeader
ClientSwapped bool
@@ -924,7 +935,7 @@ type EnableContextReply struct {
Data []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request EnableContext
+// Reply blocks and returns the reply data for a EnableContext request.
func (cook EnableContextCookie) Reply() (*EnableContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -936,7 +947,7 @@ func (cook EnableContextCookie) Reply() (*EnableContextReply, error) {
return enableContextReply(buf), nil
}
-// Read reply into structure from buffer for EnableContext
+// enableContextReply reads a byte slice into a EnableContextReply value.
func enableContextReply(buf []byte) *EnableContextReply {
v := new(EnableContextReply)
b := 1 // skip reply determinant
@@ -981,6 +992,7 @@ func enableContextReply(buf []byte) *EnableContextReply {
}
// Write request to wire for EnableContext
+// enableContextRequest writes a EnableContext request to a byte slice.
func enableContextRequest(c *xgb.Conn, Context Context) []byte {
size := 8
b := 0
@@ -1001,30 +1013,35 @@ func enableContextRequest(c *xgb.Conn, Context Context) []byte {
return buf
}
-// Request DisableContext
-// size: 8
+// DisableContextCookie is a cookie used only for DisableContext requests.
type DisableContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for DisableContext
+// DisableContext sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DisableContext(c *xgb.Conn, Context Context) DisableContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(disableContextRequest(c, Context), cookie)
return DisableContextCookie{cookie}
}
+// DisableContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using DisableContextCookie.Check()
func DisableContextChecked(c *xgb.Conn, Context Context) DisableContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(disableContextRequest(c, Context), cookie)
return DisableContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DisableContextCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DisableContext
+// disableContextRequest writes a DisableContext request to a byte slice.
func disableContextRequest(c *xgb.Conn, Context Context) []byte {
size := 8
b := 0
@@ -1045,30 +1062,35 @@ func disableContextRequest(c *xgb.Conn, Context Context) []byte {
return buf
}
-// Request FreeContext
-// size: 8
+// FreeContextCookie is a cookie used only for FreeContext requests.
type FreeContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for FreeContext
+// FreeContext sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func FreeContext(c *xgb.Conn, Context Context) FreeContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(freeContextRequest(c, Context), cookie)
return FreeContextCookie{cookie}
}
+// FreeContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using FreeContextCookie.Check()
func FreeContextChecked(c *xgb.Conn, Context Context) FreeContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(freeContextRequest(c, Context), cookie)
return FreeContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FreeContextCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for FreeContext
+// freeContextRequest writes a FreeContext request to a byte slice.
func freeContextRequest(c *xgb.Conn, Context Context) []byte {
size := 8
b := 0
diff --git a/nexgb/render/render.go b/nexgb/render/render.go
index ca3f9bd..61f0b96 100644
--- a/nexgb/render/render.go
+++ b/nexgb/render/render.go
@@ -2,7 +2,7 @@
package render
/*
- This file was generated by render.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by render.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,10 +40,6 @@ func init() {
xgb.NewExtErrorFuncs["RENDER"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Card8'
-
-// Skipping definition for base type 'Int16'
-
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
@@ -64,6 +60,10 @@ func init() {
// Skipping definition for base type 'Float'
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Int16'
+
const (
PictTypeIndexed = 0
PictTypeDirect = 1
@@ -205,8 +205,6 @@ type Glyph uint32
type Fixed int32
-// 'Directformat' struct definition
-// Size: 16
type Directformat struct {
RedShift uint16
RedMask uint16
@@ -218,7 +216,7 @@ type Directformat struct {
AlphaMask uint16
}
-// Struct read Directformat
+// DirectformatRead reads a byte slice into a Directformat value.
func DirectformatRead(buf []byte, v *Directformat) int {
b := 0
@@ -249,7 +247,7 @@ func DirectformatRead(buf []byte, v *Directformat) int {
return b
}
-// Struct list read Directformat
+// DirectformatReadList reads a byte slice into a list of Directformat values.
func DirectformatReadList(buf []byte, dest []Directformat) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -259,7 +257,7 @@ func DirectformatReadList(buf []byte, dest []Directformat) int {
return xgb.Pad(b)
}
-// Struct write Directformat
+// Bytes writes a Directformat value to a byte slice.
func (v Directformat) Bytes() []byte {
buf := make([]byte, 16)
b := 0
@@ -291,7 +289,7 @@ func (v Directformat) Bytes() []byte {
return buf
}
-// Write struct list Directformat
+// DirectformatListBytes writes a list of %s(MISSING) values to a byte slice.
func DirectformatListBytes(buf []byte, list []Directformat) int {
b := 0
var structBytes []byte
@@ -303,8 +301,6 @@ func DirectformatListBytes(buf []byte, list []Directformat) int {
return b
}
-// 'Pictforminfo' struct definition
-// Size: 28
type Pictforminfo struct {
Id Pictformat
Type byte
@@ -314,7 +310,7 @@ type Pictforminfo struct {
Colormap xproto.Colormap
}
-// Struct read Pictforminfo
+// PictforminfoRead reads a byte slice into a Pictforminfo value.
func PictforminfoRead(buf []byte, v *Pictforminfo) int {
b := 0
@@ -338,7 +334,7 @@ func PictforminfoRead(buf []byte, v *Pictforminfo) int {
return b
}
-// Struct list read Pictforminfo
+// PictforminfoReadList reads a byte slice into a list of Pictforminfo values.
func PictforminfoReadList(buf []byte, dest []Pictforminfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -348,7 +344,7 @@ func PictforminfoReadList(buf []byte, dest []Pictforminfo) int {
return xgb.Pad(b)
}
-// Struct write Pictforminfo
+// Bytes writes a Pictforminfo value to a byte slice.
func (v Pictforminfo) Bytes() []byte {
buf := make([]byte, 28)
b := 0
@@ -376,7 +372,7 @@ func (v Pictforminfo) Bytes() []byte {
return buf
}
-// Write struct list Pictforminfo
+// PictforminfoListBytes writes a list of %s(MISSING) values to a byte slice.
func PictforminfoListBytes(buf []byte, list []Pictforminfo) int {
b := 0
var structBytes []byte
@@ -388,14 +384,12 @@ func PictforminfoListBytes(buf []byte, list []Pictforminfo) int {
return b
}
-// 'Pictvisual' struct definition
-// Size: 8
type Pictvisual struct {
Visual xproto.Visualid
Format Pictformat
}
-// Struct read Pictvisual
+// PictvisualRead reads a byte slice into a Pictvisual value.
func PictvisualRead(buf []byte, v *Pictvisual) int {
b := 0
@@ -408,7 +402,7 @@ func PictvisualRead(buf []byte, v *Pictvisual) int {
return b
}
-// Struct list read Pictvisual
+// PictvisualReadList reads a byte slice into a list of Pictvisual values.
func PictvisualReadList(buf []byte, dest []Pictvisual) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -418,7 +412,7 @@ func PictvisualReadList(buf []byte, dest []Pictvisual) int {
return xgb.Pad(b)
}
-// Struct write Pictvisual
+// Bytes writes a Pictvisual value to a byte slice.
func (v Pictvisual) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -432,7 +426,7 @@ func (v Pictvisual) Bytes() []byte {
return buf
}
-// Write struct list Pictvisual
+// PictvisualListBytes writes a list of %s(MISSING) values to a byte slice.
func PictvisualListBytes(buf []byte, list []Pictvisual) int {
b := 0
var structBytes []byte
@@ -444,8 +438,6 @@ func PictvisualListBytes(buf []byte, list []Pictvisual) int {
return b
}
-// 'Pictdepth' struct definition
-// Size: (8 + xgb.Pad((int(NumVisuals) * 8)))
type Pictdepth struct {
Depth byte
// padding: 1 bytes
@@ -454,7 +446,7 @@ type Pictdepth struct {
Visuals []Pictvisual // size: xgb.Pad((int(NumVisuals) * 8))
}
-// Struct read Pictdepth
+// PictdepthRead reads a byte slice into a Pictdepth value.
func PictdepthRead(buf []byte, v *Pictdepth) int {
b := 0
@@ -474,7 +466,7 @@ func PictdepthRead(buf []byte, v *Pictdepth) int {
return b
}
-// Struct list read Pictdepth
+// PictdepthReadList reads a byte slice into a list of Pictdepth values.
func PictdepthReadList(buf []byte, dest []Pictdepth) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -484,7 +476,7 @@ func PictdepthReadList(buf []byte, dest []Pictdepth) int {
return xgb.Pad(b)
}
-// Struct write Pictdepth
+// Bytes writes a Pictdepth value to a byte slice.
func (v Pictdepth) Bytes() []byte {
buf := make([]byte, (8 + xgb.Pad((int(v.NumVisuals) * 8))))
b := 0
@@ -504,7 +496,7 @@ func (v Pictdepth) Bytes() []byte {
return buf
}
-// Write struct list Pictdepth
+// PictdepthListBytes writes a list of %s(MISSING) values to a byte slice.
func PictdepthListBytes(buf []byte, list []Pictdepth) int {
b := 0
var structBytes []byte
@@ -516,7 +508,7 @@ func PictdepthListBytes(buf []byte, list []Pictdepth) int {
return b
}
-// Struct list size Pictdepth
+// PictdepthListSize computes the size (bytes) of a list of Pictdepth values.
func PictdepthListSize(list []Pictdepth) int {
size := 0
for _, item := range list {
@@ -525,15 +517,13 @@ func PictdepthListSize(list []Pictdepth) int {
return size
}
-// 'Pictscreen' struct definition
-// Size: (8 + PictdepthListSize(Depths))
type Pictscreen struct {
NumDepths uint32
Fallback Pictformat
Depths []Pictdepth // size: PictdepthListSize(Depths)
}
-// Struct read Pictscreen
+// PictscreenRead reads a byte slice into a Pictscreen value.
func PictscreenRead(buf []byte, v *Pictscreen) int {
b := 0
@@ -549,7 +539,7 @@ func PictscreenRead(buf []byte, v *Pictscreen) int {
return b
}
-// Struct list read Pictscreen
+// PictscreenReadList reads a byte slice into a list of Pictscreen values.
func PictscreenReadList(buf []byte, dest []Pictscreen) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -559,7 +549,7 @@ func PictscreenReadList(buf []byte, dest []Pictscreen) int {
return xgb.Pad(b)
}
-// Struct write Pictscreen
+// Bytes writes a Pictscreen value to a byte slice.
func (v Pictscreen) Bytes() []byte {
buf := make([]byte, (8 + PictdepthListSize(v.Depths)))
b := 0
@@ -575,7 +565,7 @@ func (v Pictscreen) Bytes() []byte {
return buf
}
-// Write struct list Pictscreen
+// PictscreenListBytes writes a list of %s(MISSING) values to a byte slice.
func PictscreenListBytes(buf []byte, list []Pictscreen) int {
b := 0
var structBytes []byte
@@ -587,7 +577,7 @@ func PictscreenListBytes(buf []byte, list []Pictscreen) int {
return b
}
-// Struct list size Pictscreen
+// PictscreenListSize computes the size (bytes) of a list of Pictscreen values.
func PictscreenListSize(list []Pictscreen) int {
size := 0
for _, item := range list {
@@ -596,8 +586,6 @@ func PictscreenListSize(list []Pictscreen) int {
return size
}
-// 'Indexvalue' struct definition
-// Size: 12
type Indexvalue struct {
Pixel uint32
Red uint16
@@ -606,7 +594,7 @@ type Indexvalue struct {
Alpha uint16
}
-// Struct read Indexvalue
+// IndexvalueRead reads a byte slice into a Indexvalue value.
func IndexvalueRead(buf []byte, v *Indexvalue) int {
b := 0
@@ -628,7 +616,7 @@ func IndexvalueRead(buf []byte, v *Indexvalue) int {
return b
}
-// Struct list read Indexvalue
+// IndexvalueReadList reads a byte slice into a list of Indexvalue values.
func IndexvalueReadList(buf []byte, dest []Indexvalue) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -638,7 +626,7 @@ func IndexvalueReadList(buf []byte, dest []Indexvalue) int {
return xgb.Pad(b)
}
-// Struct write Indexvalue
+// Bytes writes a Indexvalue value to a byte slice.
func (v Indexvalue) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -661,7 +649,7 @@ func (v Indexvalue) Bytes() []byte {
return buf
}
-// Write struct list Indexvalue
+// IndexvalueListBytes writes a list of %s(MISSING) values to a byte slice.
func IndexvalueListBytes(buf []byte, list []Indexvalue) int {
b := 0
var structBytes []byte
@@ -673,8 +661,6 @@ func IndexvalueListBytes(buf []byte, list []Indexvalue) int {
return b
}
-// 'Color' struct definition
-// Size: 8
type Color struct {
Red uint16
Green uint16
@@ -682,7 +668,7 @@ type Color struct {
Alpha uint16
}
-// Struct read Color
+// ColorRead reads a byte slice into a Color value.
func ColorRead(buf []byte, v *Color) int {
b := 0
@@ -701,7 +687,7 @@ func ColorRead(buf []byte, v *Color) int {
return b
}
-// Struct list read Color
+// ColorReadList reads a byte slice into a list of Color values.
func ColorReadList(buf []byte, dest []Color) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -711,7 +697,7 @@ func ColorReadList(buf []byte, dest []Color) int {
return xgb.Pad(b)
}
-// Struct write Color
+// Bytes writes a Color value to a byte slice.
func (v Color) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -731,7 +717,7 @@ func (v Color) Bytes() []byte {
return buf
}
-// Write struct list Color
+// ColorListBytes writes a list of %s(MISSING) values to a byte slice.
func ColorListBytes(buf []byte, list []Color) int {
b := 0
var structBytes []byte
@@ -743,14 +729,12 @@ func ColorListBytes(buf []byte, list []Color) int {
return b
}
-// 'Pointfix' struct definition
-// Size: 8
type Pointfix struct {
X Fixed
Y Fixed
}
-// Struct read Pointfix
+// PointfixRead reads a byte slice into a Pointfix value.
func PointfixRead(buf []byte, v *Pointfix) int {
b := 0
@@ -763,7 +747,7 @@ func PointfixRead(buf []byte, v *Pointfix) int {
return b
}
-// Struct list read Pointfix
+// PointfixReadList reads a byte slice into a list of Pointfix values.
func PointfixReadList(buf []byte, dest []Pointfix) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -773,7 +757,7 @@ func PointfixReadList(buf []byte, dest []Pointfix) int {
return xgb.Pad(b)
}
-// Struct write Pointfix
+// Bytes writes a Pointfix value to a byte slice.
func (v Pointfix) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -787,7 +771,7 @@ func (v Pointfix) Bytes() []byte {
return buf
}
-// Write struct list Pointfix
+// PointfixListBytes writes a list of %s(MISSING) values to a byte slice.
func PointfixListBytes(buf []byte, list []Pointfix) int {
b := 0
var structBytes []byte
@@ -799,14 +783,12 @@ func PointfixListBytes(buf []byte, list []Pointfix) int {
return b
}
-// 'Linefix' struct definition
-// Size: 16
type Linefix struct {
P1 Pointfix
P2 Pointfix
}
-// Struct read Linefix
+// LinefixRead reads a byte slice into a Linefix value.
func LinefixRead(buf []byte, v *Linefix) int {
b := 0
@@ -819,7 +801,7 @@ func LinefixRead(buf []byte, v *Linefix) int {
return b
}
-// Struct list read Linefix
+// LinefixReadList reads a byte slice into a list of Linefix values.
func LinefixReadList(buf []byte, dest []Linefix) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -829,7 +811,7 @@ func LinefixReadList(buf []byte, dest []Linefix) int {
return xgb.Pad(b)
}
-// Struct write Linefix
+// Bytes writes a Linefix value to a byte slice.
func (v Linefix) Bytes() []byte {
buf := make([]byte, 16)
b := 0
@@ -849,7 +831,7 @@ func (v Linefix) Bytes() []byte {
return buf
}
-// Write struct list Linefix
+// LinefixListBytes writes a list of %s(MISSING) values to a byte slice.
func LinefixListBytes(buf []byte, list []Linefix) int {
b := 0
var structBytes []byte
@@ -861,15 +843,13 @@ func LinefixListBytes(buf []byte, list []Linefix) int {
return b
}
-// 'Triangle' struct definition
-// Size: 24
type Triangle struct {
P1 Pointfix
P2 Pointfix
P3 Pointfix
}
-// Struct read Triangle
+// TriangleRead reads a byte slice into a Triangle value.
func TriangleRead(buf []byte, v *Triangle) int {
b := 0
@@ -885,7 +865,7 @@ func TriangleRead(buf []byte, v *Triangle) int {
return b
}
-// Struct list read Triangle
+// TriangleReadList reads a byte slice into a list of Triangle values.
func TriangleReadList(buf []byte, dest []Triangle) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -895,7 +875,7 @@ func TriangleReadList(buf []byte, dest []Triangle) int {
return xgb.Pad(b)
}
-// Struct write Triangle
+// Bytes writes a Triangle value to a byte slice.
func (v Triangle) Bytes() []byte {
buf := make([]byte, 24)
b := 0
@@ -921,7 +901,7 @@ func (v Triangle) Bytes() []byte {
return buf
}
-// Write struct list Triangle
+// TriangleListBytes writes a list of %s(MISSING) values to a byte slice.
func TriangleListBytes(buf []byte, list []Triangle) int {
b := 0
var structBytes []byte
@@ -933,8 +913,6 @@ func TriangleListBytes(buf []byte, list []Triangle) int {
return b
}
-// 'Trapezoid' struct definition
-// Size: 40
type Trapezoid struct {
Top Fixed
Bottom Fixed
@@ -942,7 +920,7 @@ type Trapezoid struct {
Right Linefix
}
-// Struct read Trapezoid
+// TrapezoidRead reads a byte slice into a Trapezoid value.
func TrapezoidRead(buf []byte, v *Trapezoid) int {
b := 0
@@ -961,7 +939,7 @@ func TrapezoidRead(buf []byte, v *Trapezoid) int {
return b
}
-// Struct list read Trapezoid
+// TrapezoidReadList reads a byte slice into a list of Trapezoid values.
func TrapezoidReadList(buf []byte, dest []Trapezoid) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -971,7 +949,7 @@ func TrapezoidReadList(buf []byte, dest []Trapezoid) int {
return xgb.Pad(b)
}
-// Struct write Trapezoid
+// Bytes writes a Trapezoid value to a byte slice.
func (v Trapezoid) Bytes() []byte {
buf := make([]byte, 40)
b := 0
@@ -997,7 +975,7 @@ func (v Trapezoid) Bytes() []byte {
return buf
}
-// Write struct list Trapezoid
+// TrapezoidListBytes writes a list of %s(MISSING) values to a byte slice.
func TrapezoidListBytes(buf []byte, list []Trapezoid) int {
b := 0
var structBytes []byte
@@ -1009,8 +987,6 @@ func TrapezoidListBytes(buf []byte, list []Trapezoid) int {
return b
}
-// 'Glyphinfo' struct definition
-// Size: 12
type Glyphinfo struct {
Width uint16
Height uint16
@@ -1020,7 +996,7 @@ type Glyphinfo struct {
YOff int16
}
-// Struct read Glyphinfo
+// GlyphinfoRead reads a byte slice into a Glyphinfo value.
func GlyphinfoRead(buf []byte, v *Glyphinfo) int {
b := 0
@@ -1045,7 +1021,7 @@ func GlyphinfoRead(buf []byte, v *Glyphinfo) int {
return b
}
-// Struct list read Glyphinfo
+// GlyphinfoReadList reads a byte slice into a list of Glyphinfo values.
func GlyphinfoReadList(buf []byte, dest []Glyphinfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1055,7 +1031,7 @@ func GlyphinfoReadList(buf []byte, dest []Glyphinfo) int {
return xgb.Pad(b)
}
-// Struct write Glyphinfo
+// Bytes writes a Glyphinfo value to a byte slice.
func (v Glyphinfo) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -1081,7 +1057,7 @@ func (v Glyphinfo) Bytes() []byte {
return buf
}
-// Write struct list Glyphinfo
+// GlyphinfoListBytes writes a list of %s(MISSING) values to a byte slice.
func GlyphinfoListBytes(buf []byte, list []Glyphinfo) int {
b := 0
var structBytes []byte
@@ -1093,8 +1069,6 @@ func GlyphinfoListBytes(buf []byte, list []Glyphinfo) int {
return b
}
-// 'Transform' struct definition
-// Size: 36
type Transform struct {
Matrix11 Fixed
Matrix12 Fixed
@@ -1107,7 +1081,7 @@ type Transform struct {
Matrix33 Fixed
}
-// Struct read Transform
+// TransformRead reads a byte slice into a Transform value.
func TransformRead(buf []byte, v *Transform) int {
b := 0
@@ -1141,7 +1115,7 @@ func TransformRead(buf []byte, v *Transform) int {
return b
}
-// Struct list read Transform
+// TransformReadList reads a byte slice into a list of Transform values.
func TransformReadList(buf []byte, dest []Transform) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1151,7 +1125,7 @@ func TransformReadList(buf []byte, dest []Transform) int {
return xgb.Pad(b)
}
-// Struct write Transform
+// Bytes writes a Transform value to a byte slice.
func (v Transform) Bytes() []byte {
buf := make([]byte, 36)
b := 0
@@ -1186,7 +1160,7 @@ func (v Transform) Bytes() []byte {
return buf
}
-// Write struct list Transform
+// TransformListBytes writes a list of %s(MISSING) values to a byte slice.
func TransformListBytes(buf []byte, list []Transform) int {
b := 0
var structBytes []byte
@@ -1198,14 +1172,12 @@ func TransformListBytes(buf []byte, list []Transform) int {
return b
}
-// 'Animcursorelt' struct definition
-// Size: 8
type Animcursorelt struct {
Cursor xproto.Cursor
Delay uint32
}
-// Struct read Animcursorelt
+// AnimcursoreltRead reads a byte slice into a Animcursorelt value.
func AnimcursoreltRead(buf []byte, v *Animcursorelt) int {
b := 0
@@ -1218,7 +1190,7 @@ func AnimcursoreltRead(buf []byte, v *Animcursorelt) int {
return b
}
-// Struct list read Animcursorelt
+// AnimcursoreltReadList reads a byte slice into a list of Animcursorelt values.
func AnimcursoreltReadList(buf []byte, dest []Animcursorelt) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1228,7 +1200,7 @@ func AnimcursoreltReadList(buf []byte, dest []Animcursorelt) int {
return xgb.Pad(b)
}
-// Struct write Animcursorelt
+// Bytes writes a Animcursorelt value to a byte slice.
func (v Animcursorelt) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -1242,7 +1214,7 @@ func (v Animcursorelt) Bytes() []byte {
return buf
}
-// Write struct list Animcursorelt
+// AnimcursoreltListBytes writes a list of %s(MISSING) values to a byte slice.
func AnimcursoreltListBytes(buf []byte, list []Animcursorelt) int {
b := 0
var structBytes []byte
@@ -1254,15 +1226,13 @@ func AnimcursoreltListBytes(buf []byte, list []Animcursorelt) int {
return b
}
-// 'Spanfix' struct definition
-// Size: 12
type Spanfix struct {
L Fixed
R Fixed
Y Fixed
}
-// Struct read Spanfix
+// SpanfixRead reads a byte slice into a Spanfix value.
func SpanfixRead(buf []byte, v *Spanfix) int {
b := 0
@@ -1278,7 +1248,7 @@ func SpanfixRead(buf []byte, v *Spanfix) int {
return b
}
-// Struct list read Spanfix
+// SpanfixReadList reads a byte slice into a list of Spanfix values.
func SpanfixReadList(buf []byte, dest []Spanfix) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1288,7 +1258,7 @@ func SpanfixReadList(buf []byte, dest []Spanfix) int {
return xgb.Pad(b)
}
-// Struct write Spanfix
+// Bytes writes a Spanfix value to a byte slice.
func (v Spanfix) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -1305,7 +1275,7 @@ func (v Spanfix) Bytes() []byte {
return buf
}
-// Write struct list Spanfix
+// SpanfixListBytes writes a list of %s(MISSING) values to a byte slice.
func SpanfixListBytes(buf []byte, list []Spanfix) int {
b := 0
var structBytes []byte
@@ -1317,14 +1287,12 @@ func SpanfixListBytes(buf []byte, list []Spanfix) int {
return b
}
-// 'Trap' struct definition
-// Size: 24
type Trap struct {
Top Spanfix
Bot Spanfix
}
-// Struct read Trap
+// TrapRead reads a byte slice into a Trap value.
func TrapRead(buf []byte, v *Trap) int {
b := 0
@@ -1337,7 +1305,7 @@ func TrapRead(buf []byte, v *Trap) int {
return b
}
-// Struct list read Trap
+// TrapReadList reads a byte slice into a list of Trap values.
func TrapReadList(buf []byte, dest []Trap) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1347,7 +1315,7 @@ func TrapReadList(buf []byte, dest []Trap) int {
return xgb.Pad(b)
}
-// Struct write Trap
+// Bytes writes a Trap value to a byte slice.
func (v Trap) Bytes() []byte {
buf := make([]byte, 24)
b := 0
@@ -1367,7 +1335,7 @@ func (v Trap) Bytes() []byte {
return buf
}
-// Write struct list Trap
+// TrapListBytes writes a list of %s(MISSING) values to a byte slice.
func TrapListBytes(buf []byte, list []Trap) int {
b := 0
var structBytes []byte
@@ -1379,9 +1347,7 @@ func TrapListBytes(buf []byte, list []Trap) int {
return b
}
-// Error definition PictFormat (0)
-// Size: 32
-
+// BadPictFormat is the error number for a BadPictFormat.
const BadPictFormat = 0
type PictFormatError struct {
@@ -1389,7 +1355,7 @@ type PictFormatError struct {
NiceName string
}
-// Error read PictFormat
+// PictFormatErrorNew constructs a PictFormatError value that implements xgb.Error from a byte slice.
func PictFormatErrorNew(buf []byte) xgb.Error {
v := PictFormatError{}
v.NiceName = "PictFormat"
@@ -1403,8 +1369,8 @@ func PictFormatErrorNew(buf []byte) xgb.Error {
return v
}
-func (err PictFormatError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadPictFormat error.
+// This is mostly used internally.
func (err PictFormatError) SequenceId() uint16 {
return err.Sequence
}
@@ -1424,9 +1390,7 @@ func init() {
xgb.NewExtErrorFuncs["RENDER"][0] = PictFormatErrorNew
}
-// Error definition Picture (1)
-// Size: 32
-
+// BadPicture is the error number for a BadPicture.
const BadPicture = 1
type PictureError struct {
@@ -1434,7 +1398,7 @@ type PictureError struct {
NiceName string
}
-// Error read Picture
+// PictureErrorNew constructs a PictureError value that implements xgb.Error from a byte slice.
func PictureErrorNew(buf []byte) xgb.Error {
v := PictureError{}
v.NiceName = "Picture"
@@ -1448,8 +1412,8 @@ func PictureErrorNew(buf []byte) xgb.Error {
return v
}
-func (err PictureError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadPicture error.
+// This is mostly used internally.
func (err PictureError) SequenceId() uint16 {
return err.Sequence
}
@@ -1469,9 +1433,7 @@ func init() {
xgb.NewExtErrorFuncs["RENDER"][1] = PictureErrorNew
}
-// Error definition PictOp (2)
-// Size: 32
-
+// BadPictOp is the error number for a BadPictOp.
const BadPictOp = 2
type PictOpError struct {
@@ -1479,7 +1441,7 @@ type PictOpError struct {
NiceName string
}
-// Error read PictOp
+// PictOpErrorNew constructs a PictOpError value that implements xgb.Error from a byte slice.
func PictOpErrorNew(buf []byte) xgb.Error {
v := PictOpError{}
v.NiceName = "PictOp"
@@ -1493,8 +1455,8 @@ func PictOpErrorNew(buf []byte) xgb.Error {
return v
}
-func (err PictOpError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadPictOp error.
+// This is mostly used internally.
func (err PictOpError) SequenceId() uint16 {
return err.Sequence
}
@@ -1514,9 +1476,7 @@ func init() {
xgb.NewExtErrorFuncs["RENDER"][2] = PictOpErrorNew
}
-// Error definition GlyphSet (3)
-// Size: 32
-
+// BadGlyphSet is the error number for a BadGlyphSet.
const BadGlyphSet = 3
type GlyphSetError struct {
@@ -1524,7 +1484,7 @@ type GlyphSetError struct {
NiceName string
}
-// Error read GlyphSet
+// GlyphSetErrorNew constructs a GlyphSetError value that implements xgb.Error from a byte slice.
func GlyphSetErrorNew(buf []byte) xgb.Error {
v := GlyphSetError{}
v.NiceName = "GlyphSet"
@@ -1538,8 +1498,8 @@ func GlyphSetErrorNew(buf []byte) xgb.Error {
return v
}
-func (err GlyphSetError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadGlyphSet error.
+// This is mostly used internally.
func (err GlyphSetError) SequenceId() uint16 {
return err.Sequence
}
@@ -1559,9 +1519,7 @@ func init() {
xgb.NewExtErrorFuncs["RENDER"][3] = GlyphSetErrorNew
}
-// Error definition Glyph (4)
-// Size: 32
-
+// BadGlyph is the error number for a BadGlyph.
const BadGlyph = 4
type GlyphError struct {
@@ -1569,7 +1527,7 @@ type GlyphError struct {
NiceName string
}
-// Error read Glyph
+// GlyphErrorNew constructs a GlyphError value that implements xgb.Error from a byte slice.
func GlyphErrorNew(buf []byte) xgb.Error {
v := GlyphError{}
v.NiceName = "Glyph"
@@ -1583,8 +1541,8 @@ func GlyphErrorNew(buf []byte) xgb.Error {
return v
}
-func (err GlyphError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadGlyph error.
+// This is mostly used internally.
func (err GlyphError) SequenceId() uint16 {
return err.Sequence
}
@@ -1604,36 +1562,38 @@ func init() {
xgb.NewExtErrorFuncs["RENDER"][4] = GlyphErrorNew
}
-// Request QueryVersion
-// size: 12
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 32
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint32
MinorVersion uint32
// padding: 16 bytes
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1645,7 +1605,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -1670,6 +1630,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 12
b := 0
@@ -1693,29 +1654,31 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVers
return buf
}
-// Request QueryPictFormats
-// size: 4
+// QueryPictFormatsCookie is a cookie used only for QueryPictFormats requests.
type QueryPictFormatsCookie struct {
*xgb.Cookie
}
+// QueryPictFormats sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryPictFormatsCookie.Reply()
func QueryPictFormats(c *xgb.Conn) QueryPictFormatsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryPictFormatsRequest(c), cookie)
return QueryPictFormatsCookie{cookie}
}
+// QueryPictFormatsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryPictFormatsUnchecked(c *xgb.Conn) QueryPictFormatsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryPictFormatsRequest(c), cookie)
return QueryPictFormatsCookie{cookie}
}
-// Request reply for QueryPictFormats
-// size: (((32 + xgb.Pad((int(NumFormats) * 28))) + PictscreenListSize(Screens)) + xgb.Pad((int(NumSubpixel) * 4)))
+// QueryPictFormatsReply represents the data returned from a QueryPictFormats request.
type QueryPictFormatsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumFormats uint32
NumScreens uint32
@@ -1728,7 +1691,7 @@ type QueryPictFormatsReply struct {
Subpixels []uint32 // size: xgb.Pad((int(NumSubpixel) * 4))
}
-// Waits and reads reply data from request QueryPictFormats
+// Reply blocks and returns the reply data for a QueryPictFormats request.
func (cook QueryPictFormatsCookie) Reply() (*QueryPictFormatsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1740,7 +1703,7 @@ func (cook QueryPictFormatsCookie) Reply() (*QueryPictFormatsReply, error) {
return queryPictFormatsReply(buf), nil
}
-// Read reply into structure from buffer for QueryPictFormats
+// queryPictFormatsReply reads a byte slice into a QueryPictFormatsReply value.
func queryPictFormatsReply(buf []byte) *QueryPictFormatsReply {
v := new(QueryPictFormatsReply)
b := 1 // skip reply determinant
@@ -1787,6 +1750,7 @@ func queryPictFormatsReply(buf []byte) *QueryPictFormatsReply {
}
// Write request to wire for QueryPictFormats
+// queryPictFormatsRequest writes a QueryPictFormats request to a byte slice.
func queryPictFormatsRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -1804,36 +1768,38 @@ func queryPictFormatsRequest(c *xgb.Conn) []byte {
return buf
}
-// Request QueryPictIndexValues
-// size: 8
+// QueryPictIndexValuesCookie is a cookie used only for QueryPictIndexValues requests.
type QueryPictIndexValuesCookie struct {
*xgb.Cookie
}
+// QueryPictIndexValues sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryPictIndexValuesCookie.Reply()
func QueryPictIndexValues(c *xgb.Conn, Format Pictformat) QueryPictIndexValuesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryPictIndexValuesRequest(c, Format), cookie)
return QueryPictIndexValuesCookie{cookie}
}
+// QueryPictIndexValuesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryPictIndexValuesUnchecked(c *xgb.Conn, Format Pictformat) QueryPictIndexValuesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryPictIndexValuesRequest(c, Format), cookie)
return QueryPictIndexValuesCookie{cookie}
}
-// Request reply for QueryPictIndexValues
-// size: (32 + xgb.Pad((int(NumValues) * 12)))
+// QueryPictIndexValuesReply represents the data returned from a QueryPictIndexValues request.
type QueryPictIndexValuesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumValues uint32
// padding: 20 bytes
Values []Indexvalue // size: xgb.Pad((int(NumValues) * 12))
}
-// Waits and reads reply data from request QueryPictIndexValues
+// Reply blocks and returns the reply data for a QueryPictIndexValues request.
func (cook QueryPictIndexValuesCookie) Reply() (*QueryPictIndexValuesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1845,7 +1811,7 @@ func (cook QueryPictIndexValuesCookie) Reply() (*QueryPictIndexValuesReply, erro
return queryPictIndexValuesReply(buf), nil
}
-// Read reply into structure from buffer for QueryPictIndexValues
+// queryPictIndexValuesReply reads a byte slice into a QueryPictIndexValuesReply value.
func queryPictIndexValuesReply(buf []byte) *QueryPictIndexValuesReply {
v := new(QueryPictIndexValuesReply)
b := 1 // skip reply determinant
@@ -1870,6 +1836,7 @@ func queryPictIndexValuesReply(buf []byte) *QueryPictIndexValuesReply {
}
// Write request to wire for QueryPictIndexValues
+// queryPictIndexValuesRequest writes a QueryPictIndexValues request to a byte slice.
func queryPictIndexValuesRequest(c *xgb.Conn, Format Pictformat) []byte {
size := 8
b := 0
@@ -1890,30 +1857,35 @@ func queryPictIndexValuesRequest(c *xgb.Conn, Format Pictformat) []byte {
return buf
}
-// Request CreatePicture
-// size: xgb.Pad((16 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// CreatePictureCookie is a cookie used only for CreatePicture requests.
type CreatePictureCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreatePicture
+// CreatePicture sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreatePicture(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Format Pictformat, ValueMask uint32, ValueList []uint32) CreatePictureCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createPictureRequest(c, Pid, Drawable, Format, ValueMask, ValueList), cookie)
return CreatePictureCookie{cookie}
}
+// CreatePictureChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createPictureRequest(c, Pid, Drawable, Format, ValueMask, ValueList), cookie)
return CreatePictureCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreatePictureCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreatePicture
+// createPictureRequest writes a CreatePicture request to a byte slice.
func createPictureRequest(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Format Pictformat, ValueMask uint32, ValueList []uint32) []byte {
size := xgb.Pad((16 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -1948,30 +1920,35 @@ func createPictureRequest(c *xgb.Conn, Pid Picture, Drawable xproto.Drawable, Fo
return buf
}
-// Request ChangePicture
-// size: xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// ChangePictureCookie is a cookie used only for ChangePicture requests.
type ChangePictureCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangePicture
+// ChangePicture sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangePicture(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []uint32) ChangePictureCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(changePictureRequest(c, Picture, ValueMask, ValueList), cookie)
return ChangePictureCookie{cookie}
}
+// ChangePictureChecked sends a checked request.
+// If an error occurs, it can be retrieved using ChangePictureCookie.Check()
func ChangePictureChecked(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []uint32) ChangePictureCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(changePictureRequest(c, Picture, ValueMask, ValueList), cookie)
return ChangePictureCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangePictureCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangePicture
+// changePictureRequest writes a ChangePicture request to a byte slice.
func changePictureRequest(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueList []uint32) []byte {
size := xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -2000,30 +1977,35 @@ func changePictureRequest(c *xgb.Conn, Picture Picture, ValueMask uint32, ValueL
return buf
}
-// Request SetPictureClipRectangles
-// size: xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8))))
+// SetPictureClipRectanglesCookie is a cookie used only for SetPictureClipRectangles requests.
type SetPictureClipRectanglesCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetPictureClipRectangles
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setPictureClipRectanglesRequest(c, Picture, ClipXOrigin, ClipYOrigin, Rectangles), cookie)
return SetPictureClipRectanglesCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setPictureClipRectanglesRequest(c, Picture, ClipXOrigin, ClipYOrigin, Rectangles), cookie)
return SetPictureClipRectanglesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8))))
b := 0
@@ -2052,30 +2034,35 @@ func setPictureClipRectanglesRequest(c *xgb.Conn, Picture Picture, ClipXOrigin i
return buf
}
-// Request FreePicture
-// size: 8
+// FreePictureCookie is a cookie used only for FreePicture requests.
type FreePictureCookie struct {
*xgb.Cookie
}
-// Write request to wire for FreePicture
+// FreePicture sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func FreePicture(c *xgb.Conn, Picture Picture) FreePictureCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(freePictureRequest(c, Picture), cookie)
return FreePictureCookie{cookie}
}
+// FreePictureChecked sends a checked request.
+// If an error occurs, it can be retrieved using FreePictureCookie.Check()
func FreePictureChecked(c *xgb.Conn, Picture Picture) FreePictureCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(freePictureRequest(c, Picture), cookie)
return FreePictureCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FreePictureCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for FreePicture
+// freePictureRequest writes a FreePicture request to a byte slice.
func freePictureRequest(c *xgb.Conn, Picture Picture) []byte {
size := 8
b := 0
@@ -2096,30 +2083,35 @@ func freePictureRequest(c *xgb.Conn, Picture Picture) []byte {
return buf
}
-// Request Composite
-// size: 36
+// CompositeCookie is a cookie used only for Composite requests.
type CompositeCookie struct {
*xgb.Cookie
}
-// Write request to wire for Composite
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(compositeRequest(c, Op, Src, Mask, Dst, SrcX, SrcY, MaskX, MaskY, DstX, DstY, Width, Height), cookie)
return CompositeCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(compositeRequest(c, Op, Src, Mask, Dst, SrcX, SrcY, MaskX, MaskY, DstX, DstY, Width, Height), cookie)
return CompositeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 36
b := 0
@@ -2175,30 +2167,35 @@ func compositeRequest(c *xgb.Conn, Op byte, Src Picture, Mask Picture, Dst Pictu
return buf
}
-// Request Trapezoids
-// size: xgb.Pad((24 + xgb.Pad((len(Traps) * 40))))
+// TrapezoidsCookie is a cookie used only for Trapezoids requests.
type TrapezoidsCookie struct {
*xgb.Cookie
}
-// Write request to wire for Trapezoids
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(trapezoidsRequest(c, Op, Src, Dst, MaskFormat, SrcX, SrcY, Traps), cookie)
return TrapezoidsCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(trapezoidsRequest(c, Op, Src, Dst, MaskFormat, SrcX, SrcY, Traps), cookie)
return TrapezoidsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((24 + xgb.Pad((len(Traps) * 40))))
b := 0
@@ -2238,30 +2235,35 @@ func trapezoidsRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskForma
return buf
}
-// Request Triangles
-// size: xgb.Pad((24 + xgb.Pad((len(Triangles) * 24))))
+// TrianglesCookie is a cookie used only for Triangles requests.
type TrianglesCookie struct {
*xgb.Cookie
}
-// Write request to wire for Triangles
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(trianglesRequest(c, Op, Src, Dst, MaskFormat, SrcX, SrcY, Triangles), cookie)
return TrianglesCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(trianglesRequest(c, Op, Src, Dst, MaskFormat, SrcX, SrcY, Triangles), cookie)
return TrianglesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((24 + xgb.Pad((len(Triangles) * 24))))
b := 0
@@ -2301,30 +2303,35 @@ func trianglesRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat
return buf
}
-// Request TriStrip
-// size: xgb.Pad((24 + xgb.Pad((len(Points) * 8))))
+// TriStripCookie is a cookie used only for TriStrip requests.
type TriStripCookie struct {
*xgb.Cookie
}
-// Write request to wire for TriStrip
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(triStripRequest(c, Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie)
return TriStripCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(triStripRequest(c, Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie)
return TriStripCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((24 + xgb.Pad((len(Points) * 8))))
b := 0
@@ -2364,30 +2371,35 @@ func triStripRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat
return buf
}
-// Request TriFan
-// size: xgb.Pad((24 + xgb.Pad((len(Points) * 8))))
+// TriFanCookie is a cookie used only for TriFan requests.
type TriFanCookie struct {
*xgb.Cookie
}
-// Write request to wire for TriFan
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(triFanRequest(c, Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie)
return TriFanCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(triFanRequest(c, Op, Src, Dst, MaskFormat, SrcX, SrcY, Points), cookie)
return TriFanCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((24 + xgb.Pad((len(Points) * 8))))
b := 0
@@ -2427,30 +2439,35 @@ func triFanRequest(c *xgb.Conn, Op byte, Src Picture, Dst Picture, MaskFormat Pi
return buf
}
-// Request CreateGlyphSet
-// size: 12
+// CreateGlyphSetCookie is a cookie used only for CreateGlyphSet requests.
type CreateGlyphSetCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateGlyphSet
+// CreateGlyphSet sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateGlyphSet(c *xgb.Conn, Gsid Glyphset, Format Pictformat) CreateGlyphSetCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createGlyphSetRequest(c, Gsid, Format), cookie)
return CreateGlyphSetCookie{cookie}
}
+// CreateGlyphSetChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateGlyphSetCookie.Check()
func CreateGlyphSetChecked(c *xgb.Conn, Gsid Glyphset, Format Pictformat) CreateGlyphSetCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createGlyphSetRequest(c, Gsid, Format), cookie)
return CreateGlyphSetCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateGlyphSetCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateGlyphSet
+// createGlyphSetRequest writes a CreateGlyphSet request to a byte slice.
func createGlyphSetRequest(c *xgb.Conn, Gsid Glyphset, Format Pictformat) []byte {
size := 12
b := 0
@@ -2474,30 +2491,35 @@ func createGlyphSetRequest(c *xgb.Conn, Gsid Glyphset, Format Pictformat) []byte
return buf
}
-// Request ReferenceGlyphSet
-// size: 12
+// ReferenceGlyphSetCookie is a cookie used only for ReferenceGlyphSet requests.
type ReferenceGlyphSetCookie struct {
*xgb.Cookie
}
-// Write request to wire for ReferenceGlyphSet
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(referenceGlyphSetRequest(c, Gsid, Existing), cookie)
return ReferenceGlyphSetCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(referenceGlyphSetRequest(c, Gsid, Existing), cookie)
return ReferenceGlyphSetCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -2521,30 +2543,35 @@ func referenceGlyphSetRequest(c *xgb.Conn, Gsid Glyphset, Existing Glyphset) []b
return buf
}
-// Request FreeGlyphSet
-// size: 8
+// FreeGlyphSetCookie is a cookie used only for FreeGlyphSet requests.
type FreeGlyphSetCookie struct {
*xgb.Cookie
}
-// Write request to wire for FreeGlyphSet
+// FreeGlyphSet sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func FreeGlyphSet(c *xgb.Conn, Glyphset Glyphset) FreeGlyphSetCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(freeGlyphSetRequest(c, Glyphset), cookie)
return FreeGlyphSetCookie{cookie}
}
+// FreeGlyphSetChecked sends a checked request.
+// If an error occurs, it can be retrieved using FreeGlyphSetCookie.Check()
func FreeGlyphSetChecked(c *xgb.Conn, Glyphset Glyphset) FreeGlyphSetCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(freeGlyphSetRequest(c, Glyphset), cookie)
return FreeGlyphSetCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FreeGlyphSetCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for FreeGlyphSet
+// freeGlyphSetRequest writes a FreeGlyphSet request to a byte slice.
func freeGlyphSetRequest(c *xgb.Conn, Glyphset Glyphset) []byte {
size := 8
b := 0
@@ -2565,30 +2592,35 @@ func freeGlyphSetRequest(c *xgb.Conn, Glyphset Glyphset) []byte {
return buf
}
-// Request AddGlyphs
-// size: xgb.Pad((((12 + xgb.Pad((int(GlyphsLen) * 4))) + xgb.Pad((int(GlyphsLen) * 12))) + xgb.Pad((len(Data) * 1))))
+// AddGlyphsCookie is a cookie used only for AddGlyphs requests.
type AddGlyphsCookie struct {
*xgb.Cookie
}
-// Write request to wire for AddGlyphs
+// AddGlyphs sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func AddGlyphs(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids []uint32, Glyphs []Glyphinfo, Data []byte) AddGlyphsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(addGlyphsRequest(c, Glyphset, GlyphsLen, Glyphids, Glyphs, Data), cookie)
return AddGlyphsCookie{cookie}
}
+// AddGlyphsChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(addGlyphsRequest(c, Glyphset, GlyphsLen, Glyphids, Glyphs, Data), cookie)
return AddGlyphsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook AddGlyphsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for AddGlyphs
+// addGlyphsRequest writes a AddGlyphs request to a byte slice.
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
@@ -2623,30 +2655,35 @@ func addGlyphsRequest(c *xgb.Conn, Glyphset Glyphset, GlyphsLen uint32, Glyphids
return buf
}
-// Request FreeGlyphs
-// size: xgb.Pad((8 + xgb.Pad((len(Glyphs) * 4))))
+// FreeGlyphsCookie is a cookie used only for FreeGlyphs requests.
type FreeGlyphsCookie struct {
*xgb.Cookie
}
-// Write request to wire for FreeGlyphs
+// FreeGlyphs sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func FreeGlyphs(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) FreeGlyphsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(freeGlyphsRequest(c, Glyphset, Glyphs), cookie)
return FreeGlyphsCookie{cookie}
}
+// FreeGlyphsChecked sends a checked request.
+// If an error occurs, it can be retrieved using FreeGlyphsCookie.Check()
func FreeGlyphsChecked(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) FreeGlyphsCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(freeGlyphsRequest(c, Glyphset, Glyphs), cookie)
return FreeGlyphsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FreeGlyphsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for FreeGlyphs
+// freeGlyphsRequest writes a FreeGlyphs request to a byte slice.
func freeGlyphsRequest(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) []byte {
size := xgb.Pad((8 + xgb.Pad((len(Glyphs) * 4))))
b := 0
@@ -2673,30 +2710,35 @@ func freeGlyphsRequest(c *xgb.Conn, Glyphset Glyphset, Glyphs []Glyph) []byte {
return buf
}
-// Request CompositeGlyphs8
-// size: xgb.Pad((28 + xgb.Pad((len(Glyphcmds) * 1))))
+// CompositeGlyphs8Cookie is a cookie used only for CompositeGlyphs8 requests.
type CompositeGlyphs8Cookie struct {
*xgb.Cookie
}
-// Write request to wire for CompositeGlyphs8
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(compositeGlyphs8Request(c, Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return CompositeGlyphs8Cookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(compositeGlyphs8Request(c, Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return CompositeGlyphs8Cookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((28 + xgb.Pad((len(Glyphcmds) * 1))))
b := 0
@@ -2740,30 +2782,35 @@ func compositeGlyphs8Request(c *xgb.Conn, Op byte, Src Picture, Dst Picture, Mas
return buf
}
-// Request CompositeGlyphs16
-// size: xgb.Pad((28 + xgb.Pad((len(Glyphcmds) * 1))))
+// CompositeGlyphs16Cookie is a cookie used only for CompositeGlyphs16 requests.
type CompositeGlyphs16Cookie struct {
*xgb.Cookie
}
-// Write request to wire for CompositeGlyphs16
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(compositeGlyphs16Request(c, Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return CompositeGlyphs16Cookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(compositeGlyphs16Request(c, Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return CompositeGlyphs16Cookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((28 + xgb.Pad((len(Glyphcmds) * 1))))
b := 0
@@ -2807,30 +2854,35 @@ func compositeGlyphs16Request(c *xgb.Conn, Op byte, Src Picture, Dst Picture, Ma
return buf
}
-// Request CompositeGlyphs32
-// size: xgb.Pad((28 + xgb.Pad((len(Glyphcmds) * 1))))
+// CompositeGlyphs32Cookie is a cookie used only for CompositeGlyphs32 requests.
type CompositeGlyphs32Cookie struct {
*xgb.Cookie
}
-// Write request to wire for CompositeGlyphs32
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(compositeGlyphs32Request(c, Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return CompositeGlyphs32Cookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(compositeGlyphs32Request(c, Op, Src, Dst, MaskFormat, Glyphset, SrcX, SrcY, Glyphcmds), cookie)
return CompositeGlyphs32Cookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((28 + xgb.Pad((len(Glyphcmds) * 1))))
b := 0
@@ -2874,30 +2926,35 @@ func compositeGlyphs32Request(c *xgb.Conn, Op byte, Src Picture, Dst Picture, Ma
return buf
}
-// Request FillRectangles
-// size: xgb.Pad((20 + xgb.Pad((len(Rects) * 8))))
+// FillRectanglesCookie is a cookie used only for FillRectangles requests.
type FillRectanglesCookie struct {
*xgb.Cookie
}
-// Write request to wire for FillRectangles
+// FillRectangles sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func FillRectangles(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects []xproto.Rectangle) FillRectanglesCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(fillRectanglesRequest(c, Op, Dst, Color, Rects), cookie)
return FillRectanglesCookie{cookie}
}
+// FillRectanglesChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(fillRectanglesRequest(c, Op, Dst, Color, Rects), cookie)
return FillRectanglesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FillRectanglesCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for FillRectangles
+// fillRectanglesRequest writes a FillRectangles request to a byte slice.
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
@@ -2931,30 +2988,35 @@ func fillRectanglesRequest(c *xgb.Conn, Op byte, Dst Picture, Color Color, Rects
return buf
}
-// Request CreateCursor
-// size: 16
+// CreateCursorCookie is a cookie used only for CreateCursor requests.
type CreateCursorCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateCursor
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(createCursorRequest(c, Cid, Source, 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 xproto.Cursor, Source Picture, X uint16, Y uint16) CreateCursorCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createCursorRequest(c, Cid, Source, X, Y), cookie)
return CreateCursorCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -2984,30 +3046,35 @@ func createCursorRequest(c *xgb.Conn, Cid xproto.Cursor, Source Picture, X uint1
return buf
}
-// Request SetPictureTransform
-// size: 44
+// SetPictureTransformCookie is a cookie used only for SetPictureTransform requests.
type SetPictureTransformCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetPictureTransform
+// SetPictureTransform sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetPictureTransform(c *xgb.Conn, Picture Picture, Transform Transform) SetPictureTransformCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setPictureTransformRequest(c, Picture, Transform), cookie)
return SetPictureTransformCookie{cookie}
}
+// SetPictureTransformChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetPictureTransformCookie.Check()
func SetPictureTransformChecked(c *xgb.Conn, Picture Picture, Transform Transform) SetPictureTransformCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setPictureTransformRequest(c, Picture, Transform), cookie)
return SetPictureTransformCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetPictureTransformCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetPictureTransform
+// setPictureTransformRequest writes a SetPictureTransform request to a byte slice.
func setPictureTransformRequest(c *xgb.Conn, Picture Picture, Transform Transform) []byte {
size := 44
b := 0
@@ -3034,29 +3101,31 @@ func setPictureTransformRequest(c *xgb.Conn, Picture Picture, Transform Transfor
return buf
}
-// Request QueryFilters
-// size: 8
+// QueryFiltersCookie is a cookie used only for QueryFilters requests.
type QueryFiltersCookie struct {
*xgb.Cookie
}
+// QueryFilters sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryFiltersCookie.Reply()
func QueryFilters(c *xgb.Conn, Drawable xproto.Drawable) QueryFiltersCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryFiltersRequest(c, Drawable), cookie)
return QueryFiltersCookie{cookie}
}
+// QueryFiltersUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryFiltersUnchecked(c *xgb.Conn, Drawable xproto.Drawable) QueryFiltersCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryFiltersRequest(c, Drawable), cookie)
return QueryFiltersCookie{cookie}
}
-// Request reply for QueryFilters
-// size: ((32 + xgb.Pad((int(NumAliases) * 2))) + xproto.StrListSize(Filters))
+// QueryFiltersReply represents the data returned from a QueryFilters request.
type QueryFiltersReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumAliases uint32
NumFilters uint32
@@ -3065,7 +3134,7 @@ type QueryFiltersReply struct {
Filters []xproto.Str // size: xproto.StrListSize(Filters)
}
-// Waits and reads reply data from request QueryFilters
+// Reply blocks and returns the reply data for a QueryFilters request.
func (cook QueryFiltersCookie) Reply() (*QueryFiltersReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -3077,7 +3146,7 @@ func (cook QueryFiltersCookie) Reply() (*QueryFiltersReply, error) {
return queryFiltersReply(buf), nil
}
-// Read reply into structure from buffer for QueryFilters
+// queryFiltersReply reads a byte slice into a QueryFiltersReply value.
func queryFiltersReply(buf []byte) *QueryFiltersReply {
v := new(QueryFiltersReply)
b := 1 // skip reply determinant
@@ -3112,6 +3181,7 @@ func queryFiltersReply(buf []byte) *QueryFiltersReply {
}
// Write request to wire for QueryFilters
+// queryFiltersRequest writes a QueryFilters request to a byte slice.
func queryFiltersRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
size := 8
b := 0
@@ -3132,30 +3202,35 @@ func queryFiltersRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
return buf
}
-// Request SetPictureFilter
-// size: xgb.Pad(((12 + xgb.Pad((int(FilterLen) * 1))) + xgb.Pad((len(Values) * 4))))
+// SetPictureFilterCookie is a cookie used only for SetPictureFilter requests.
type SetPictureFilterCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetPictureFilter
+// SetPictureFilter sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetPictureFilter(c *xgb.Conn, Picture Picture, FilterLen uint16, Filter string, Values []Fixed) SetPictureFilterCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setPictureFilterRequest(c, Picture, FilterLen, Filter, Values), cookie)
return SetPictureFilterCookie{cookie}
}
+// SetPictureFilterChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setPictureFilterRequest(c, Picture, FilterLen, Filter, Values), cookie)
return SetPictureFilterCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetPictureFilterCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetPictureFilter
+// setPictureFilterRequest writes a SetPictureFilter request to a byte slice.
func setPictureFilterRequest(c *xgb.Conn, Picture Picture, FilterLen uint16, Filter string, Values []Fixed) []byte {
size := xgb.Pad(((12 + xgb.Pad((int(FilterLen) * 1))) + xgb.Pad((len(Values) * 4))))
b := 0
@@ -3190,30 +3265,35 @@ func setPictureFilterRequest(c *xgb.Conn, Picture Picture, FilterLen uint16, Fil
return buf
}
-// Request CreateAnimCursor
-// size: xgb.Pad((8 + xgb.Pad((len(Cursors) * 8))))
+// CreateAnimCursorCookie is a cookie used only for CreateAnimCursor requests.
type CreateAnimCursorCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateAnimCursor
+// CreateAnimCursor sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateAnimCursor(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) CreateAnimCursorCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createAnimCursorRequest(c, Cid, Cursors), cookie)
return CreateAnimCursorCookie{cookie}
}
+// CreateAnimCursorChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateAnimCursorCookie.Check()
func CreateAnimCursorChecked(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) CreateAnimCursorCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createAnimCursorRequest(c, Cid, Cursors), cookie)
return CreateAnimCursorCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateAnimCursorCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateAnimCursor
+// createAnimCursorRequest writes a CreateAnimCursor request to a byte slice.
func createAnimCursorRequest(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcursorelt) []byte {
size := xgb.Pad((8 + xgb.Pad((len(Cursors) * 8))))
b := 0
@@ -3236,30 +3316,35 @@ func createAnimCursorRequest(c *xgb.Conn, Cid xproto.Cursor, Cursors []Animcurso
return buf
}
-// Request AddTraps
-// size: xgb.Pad((12 + xgb.Pad((len(Traps) * 24))))
+// AddTrapsCookie is a cookie used only for AddTraps requests.
type AddTrapsCookie struct {
*xgb.Cookie
}
-// Write request to wire for AddTraps
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(addTrapsRequest(c, Picture, XOff, YOff, Traps), cookie)
return AddTrapsCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(addTrapsRequest(c, Picture, XOff, YOff, Traps), cookie)
return AddTrapsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((12 + xgb.Pad((len(Traps) * 24))))
b := 0
@@ -3288,30 +3373,35 @@ func addTrapsRequest(c *xgb.Conn, Picture Picture, XOff int16, YOff int16, Traps
return buf
}
-// Request CreateSolidFill
-// size: 16
+// CreateSolidFillCookie is a cookie used only for CreateSolidFill requests.
type CreateSolidFillCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateSolidFill
+// CreateSolidFill sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateSolidFill(c *xgb.Conn, Picture Picture, Color Color) CreateSolidFillCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createSolidFillRequest(c, Picture, Color), cookie)
return CreateSolidFillCookie{cookie}
}
+// CreateSolidFillChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateSolidFillCookie.Check()
func CreateSolidFillChecked(c *xgb.Conn, Picture Picture, Color Color) CreateSolidFillCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createSolidFillRequest(c, Picture, Color), cookie)
return CreateSolidFillCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateSolidFillCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateSolidFill
+// createSolidFillRequest writes a CreateSolidFill request to a byte slice.
func createSolidFillRequest(c *xgb.Conn, Picture Picture, Color Color) []byte {
size := 16
b := 0
@@ -3338,30 +3428,35 @@ func createSolidFillRequest(c *xgb.Conn, Picture Picture, Color Color) []byte {
return buf
}
-// Request CreateLinearGradient
-// size: xgb.Pad(((28 + xgb.Pad((int(NumStops) * 4))) + xgb.Pad((int(NumStops) * 8))))
+// CreateLinearGradientCookie is a cookie used only for CreateLinearGradient requests.
type CreateLinearGradientCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateLinearGradient
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(createLinearGradientRequest(c, Picture, P1, P2, NumStops, Stops, Colors), cookie)
return CreateLinearGradientCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createLinearGradientRequest(c, Picture, P1, P2, NumStops, Stops, Colors), cookie)
return CreateLinearGradientCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad(((28 + xgb.Pad((int(NumStops) * 4))) + xgb.Pad((int(NumStops) * 8))))
b := 0
@@ -3405,30 +3500,35 @@ func createLinearGradientRequest(c *xgb.Conn, Picture Picture, P1 Pointfix, P2 P
return buf
}
-// Request CreateRadialGradient
-// size: xgb.Pad(((36 + xgb.Pad((int(NumStops) * 4))) + xgb.Pad((int(NumStops) * 8))))
+// CreateRadialGradientCookie is a cookie used only for CreateRadialGradient requests.
type CreateRadialGradientCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateRadialGradient
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(createRadialGradientRequest(c, Picture, Inner, Outer, InnerRadius, OuterRadius, NumStops, Stops, Colors), cookie)
return CreateRadialGradientCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createRadialGradientRequest(c, Picture, Inner, Outer, InnerRadius, OuterRadius, NumStops, Stops, Colors), cookie)
return CreateRadialGradientCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad(((36 + xgb.Pad((int(NumStops) * 4))) + xgb.Pad((int(NumStops) * 8))))
b := 0
@@ -3478,30 +3578,35 @@ func createRadialGradientRequest(c *xgb.Conn, Picture Picture, Inner Pointfix, O
return buf
}
-// Request CreateConicalGradient
-// size: xgb.Pad(((24 + xgb.Pad((int(NumStops) * 4))) + xgb.Pad((int(NumStops) * 8))))
+// CreateConicalGradientCookie is a cookie used only for CreateConicalGradient requests.
type CreateConicalGradientCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateConicalGradient
+// CreateConicalGradient sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateConicalGradient(c *xgb.Conn, Picture Picture, Center Pointfix, Angle Fixed, NumStops uint32, Stops []Fixed, Colors []Color) CreateConicalGradientCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createConicalGradientRequest(c, Picture, Center, Angle, NumStops, Stops, Colors), cookie)
return CreateConicalGradientCookie{cookie}
}
+// CreateConicalGradientChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createConicalGradientRequest(c, Picture, Center, Angle, NumStops, Stops, Colors), cookie)
return CreateConicalGradientCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateConicalGradientCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateConicalGradient
+// createConicalGradientRequest writes a CreateConicalGradient request to a byte slice.
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
diff --git a/nexgb/res/res.go b/nexgb/res/res.go
index e81fa96..ccc6192 100644
--- a/nexgb/res/res.go
+++ b/nexgb/res/res.go
@@ -2,7 +2,7 @@
package res
/*
- This file was generated by res.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by res.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -64,14 +64,12 @@ func init() {
// Skipping definition for base type 'Char'
-// 'Client' struct definition
-// Size: 8
type Client struct {
ResourceBase uint32
ResourceMask uint32
}
-// Struct read Client
+// ClientRead reads a byte slice into a Client value.
func ClientRead(buf []byte, v *Client) int {
b := 0
@@ -84,7 +82,7 @@ func ClientRead(buf []byte, v *Client) int {
return b
}
-// Struct list read Client
+// ClientReadList reads a byte slice into a list of Client values.
func ClientReadList(buf []byte, dest []Client) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -94,7 +92,7 @@ func ClientReadList(buf []byte, dest []Client) int {
return xgb.Pad(b)
}
-// Struct write Client
+// Bytes writes a Client value to a byte slice.
func (v Client) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -108,7 +106,7 @@ func (v Client) Bytes() []byte {
return buf
}
-// Write struct list Client
+// ClientListBytes writes a list of %s(MISSING) values to a byte slice.
func ClientListBytes(buf []byte, list []Client) int {
b := 0
var structBytes []byte
@@ -120,14 +118,12 @@ func ClientListBytes(buf []byte, list []Client) int {
return b
}
-// 'Type' struct definition
-// Size: 8
type Type struct {
ResourceType xproto.Atom
Count uint32
}
-// Struct read Type
+// TypeRead reads a byte slice into a Type value.
func TypeRead(buf []byte, v *Type) int {
b := 0
@@ -140,7 +136,7 @@ func TypeRead(buf []byte, v *Type) int {
return b
}
-// Struct list read Type
+// TypeReadList reads a byte slice into a list of Type values.
func TypeReadList(buf []byte, dest []Type) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -150,7 +146,7 @@ func TypeReadList(buf []byte, dest []Type) int {
return xgb.Pad(b)
}
-// Struct write Type
+// Bytes writes a Type value to a byte slice.
func (v Type) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -164,7 +160,7 @@ func (v Type) Bytes() []byte {
return buf
}
-// Write struct list Type
+// TypeListBytes writes a list of %s(MISSING) values to a byte slice.
func TypeListBytes(buf []byte, list []Type) int {
b := 0
var structBytes []byte
@@ -176,35 +172,37 @@ func TypeListBytes(buf []byte, list []Type) int {
return b
}
-// Request QueryVersion
-// size: 8
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, ClientMajor, ClientMinor), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, ClientMajor, ClientMinor), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 12
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ServerMajor uint16
ServerMinor uint16
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -216,7 +214,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -239,6 +237,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 8
b := 0
@@ -262,36 +261,38 @@ func queryVersionRequest(c *xgb.Conn, ClientMajor byte, ClientMinor byte) []byte
return buf
}
-// Request QueryClients
-// size: 4
+// QueryClientsCookie is a cookie used only for QueryClients requests.
type QueryClientsCookie struct {
*xgb.Cookie
}
+// QueryClients sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryClientsCookie.Reply()
func QueryClients(c *xgb.Conn) QueryClientsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryClientsRequest(c), cookie)
return QueryClientsCookie{cookie}
}
+// QueryClientsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryClientsUnchecked(c *xgb.Conn) QueryClientsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryClientsRequest(c), cookie)
return QueryClientsCookie{cookie}
}
-// Request reply for QueryClients
-// size: (32 + xgb.Pad((int(NumClients) * 8)))
+// QueryClientsReply represents the data returned from a QueryClients request.
type QueryClientsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumClients uint32
// padding: 20 bytes
Clients []Client // size: xgb.Pad((int(NumClients) * 8))
}
-// Waits and reads reply data from request QueryClients
+// Reply blocks and returns the reply data for a QueryClients request.
func (cook QueryClientsCookie) Reply() (*QueryClientsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -303,7 +304,7 @@ func (cook QueryClientsCookie) Reply() (*QueryClientsReply, error) {
return queryClientsReply(buf), nil
}
-// Read reply into structure from buffer for QueryClients
+// queryClientsReply reads a byte slice into a QueryClientsReply value.
func queryClientsReply(buf []byte) *QueryClientsReply {
v := new(QueryClientsReply)
b := 1 // skip reply determinant
@@ -328,6 +329,7 @@ func queryClientsReply(buf []byte) *QueryClientsReply {
}
// Write request to wire for QueryClients
+// queryClientsRequest writes a QueryClients request to a byte slice.
func queryClientsRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -345,36 +347,38 @@ func queryClientsRequest(c *xgb.Conn) []byte {
return buf
}
-// Request QueryClientResources
-// size: 8
+// QueryClientResourcesCookie is a cookie used only for QueryClientResources requests.
type QueryClientResourcesCookie struct {
*xgb.Cookie
}
+// QueryClientResources sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryClientResourcesCookie.Reply()
func QueryClientResources(c *xgb.Conn, Xid uint32) QueryClientResourcesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryClientResourcesRequest(c, Xid), cookie)
return QueryClientResourcesCookie{cookie}
}
+// QueryClientResourcesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryClientResourcesUnchecked(c *xgb.Conn, Xid uint32) QueryClientResourcesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryClientResourcesRequest(c, Xid), cookie)
return QueryClientResourcesCookie{cookie}
}
-// Request reply for QueryClientResources
-// size: (32 + xgb.Pad((int(NumTypes) * 8)))
+// QueryClientResourcesReply represents the data returned from a QueryClientResources request.
type QueryClientResourcesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumTypes uint32
// padding: 20 bytes
Types []Type // size: xgb.Pad((int(NumTypes) * 8))
}
-// Waits and reads reply data from request QueryClientResources
+// Reply blocks and returns the reply data for a QueryClientResources request.
func (cook QueryClientResourcesCookie) Reply() (*QueryClientResourcesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -386,7 +390,7 @@ func (cook QueryClientResourcesCookie) Reply() (*QueryClientResourcesReply, erro
return queryClientResourcesReply(buf), nil
}
-// Read reply into structure from buffer for QueryClientResources
+// queryClientResourcesReply reads a byte slice into a QueryClientResourcesReply value.
func queryClientResourcesReply(buf []byte) *QueryClientResourcesReply {
v := new(QueryClientResourcesReply)
b := 1 // skip reply determinant
@@ -411,6 +415,7 @@ func queryClientResourcesReply(buf []byte) *QueryClientResourcesReply {
}
// Write request to wire for QueryClientResources
+// queryClientResourcesRequest writes a QueryClientResources request to a byte slice.
func queryClientResourcesRequest(c *xgb.Conn, Xid uint32) []byte {
size := 8
b := 0
@@ -431,35 +436,37 @@ func queryClientResourcesRequest(c *xgb.Conn, Xid uint32) []byte {
return buf
}
-// Request QueryClientPixmapBytes
-// size: 8
+// QueryClientPixmapBytesCookie is a cookie used only for QueryClientPixmapBytes requests.
type QueryClientPixmapBytesCookie struct {
*xgb.Cookie
}
+// QueryClientPixmapBytes sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryClientPixmapBytesCookie.Reply()
func QueryClientPixmapBytes(c *xgb.Conn, Xid uint32) QueryClientPixmapBytesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryClientPixmapBytesRequest(c, Xid), cookie)
return QueryClientPixmapBytesCookie{cookie}
}
+// QueryClientPixmapBytesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryClientPixmapBytesUnchecked(c *xgb.Conn, Xid uint32) QueryClientPixmapBytesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryClientPixmapBytesRequest(c, Xid), cookie)
return QueryClientPixmapBytesCookie{cookie}
}
-// Request reply for QueryClientPixmapBytes
-// size: 16
+// QueryClientPixmapBytesReply represents the data returned from a QueryClientPixmapBytes request.
type QueryClientPixmapBytesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Bytes uint32
BytesOverflow uint32
}
-// Waits and reads reply data from request QueryClientPixmapBytes
+// Reply blocks and returns the reply data for a QueryClientPixmapBytes request.
func (cook QueryClientPixmapBytesCookie) Reply() (*QueryClientPixmapBytesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -471,7 +478,7 @@ func (cook QueryClientPixmapBytesCookie) Reply() (*QueryClientPixmapBytesReply,
return queryClientPixmapBytesReply(buf), nil
}
-// Read reply into structure from buffer for QueryClientPixmapBytes
+// queryClientPixmapBytesReply reads a byte slice into a QueryClientPixmapBytesReply value.
func queryClientPixmapBytesReply(buf []byte) *QueryClientPixmapBytesReply {
v := new(QueryClientPixmapBytesReply)
b := 1 // skip reply determinant
@@ -494,6 +501,7 @@ func queryClientPixmapBytesReply(buf []byte) *QueryClientPixmapBytesReply {
}
// Write request to wire for QueryClientPixmapBytes
+// queryClientPixmapBytesRequest writes a QueryClientPixmapBytes request to a byte slice.
func queryClientPixmapBytesRequest(c *xgb.Conn, Xid uint32) []byte {
size := 8
b := 0
diff --git a/nexgb/screensaver/screensaver.go b/nexgb/screensaver/screensaver.go
index f11113e..0b6ef23 100644
--- a/nexgb/screensaver/screensaver.go
+++ b/nexgb/screensaver/screensaver.go
@@ -2,7 +2,7 @@
package screensaver
/*
- This file was generated by screensaver.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by screensaver.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,6 +40,10 @@ func init() {
xgb.NewExtErrorFuncs["MIT-SCREEN-SAVER"] = make(map[int]xgb.NewErrorFun)
}
+// Skipping definition for base type 'Card32'
+
+// Skipping definition for base type 'Double'
+
// Skipping definition for base type 'Bool'
// Skipping definition for base type 'Float'
@@ -60,10 +64,6 @@ func init() {
// Skipping definition for base type 'Char'
-// Skipping definition for base type 'Card32'
-
-// Skipping definition for base type 'Double'
-
const (
KindBlanked = 0
KindInternal = 1
@@ -82,9 +82,7 @@ const (
StateDisabled = 3
)
-// Event definition Notify (0)
-// Size: 32
-
+// Notify is the event number for a NotifyEvent.
const Notify = 0
type NotifyEvent struct {
@@ -101,7 +99,7 @@ type NotifyEvent struct {
// padding: 14 bytes
}
-// Event read Notify
+// NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.
func NotifyEventNew(buf []byte) xgb.Event {
v := NotifyEvent{}
b := 1 // don't read event number
@@ -144,7 +142,7 @@ func NotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write Notify
+// Bytes writes a NotifyEvent value to a byte slice.
func (v NotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -190,12 +188,14 @@ func (v NotifyEvent) Bytes() []byte {
return buf
}
-func (v NotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the Notify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v NotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of NotifyEvent.
func (v NotifyEvent) String() string {
fieldVals := make([]string, 0, 10)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -214,36 +214,38 @@ func init() {
xgb.NewExtEventFuncs["MIT-SCREEN-SAVER"][0] = NotifyEventNew
}
-// Request QueryVersion
-// size: 8
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 32
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ServerMajorVersion uint16
ServerMinorVersion uint16
// padding: 20 bytes
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -255,7 +257,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -280,6 +282,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 8
b := 0
@@ -305,29 +308,31 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersio
return buf
}
-// Request QueryInfo
-// size: 8
+// QueryInfoCookie is a cookie used only for QueryInfo requests.
type QueryInfoCookie struct {
*xgb.Cookie
}
+// QueryInfo sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryInfoCookie.Reply()
func QueryInfo(c *xgb.Conn, Drawable xproto.Drawable) QueryInfoCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryInfoRequest(c, Drawable), cookie)
return QueryInfoCookie{cookie}
}
+// QueryInfoUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryInfoUnchecked(c *xgb.Conn, Drawable xproto.Drawable) QueryInfoCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryInfoRequest(c, Drawable), cookie)
return QueryInfoCookie{cookie}
}
-// Request reply for QueryInfo
-// size: 32
+// QueryInfoReply represents the data returned from a QueryInfo request.
type QueryInfoReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
State byte
SaverWindow xproto.Window
MsUntilServer uint32
@@ -337,7 +342,7 @@ type QueryInfoReply struct {
// padding: 7 bytes
}
-// Waits and reads reply data from request QueryInfo
+// Reply blocks and returns the reply data for a QueryInfo request.
func (cook QueryInfoCookie) Reply() (*QueryInfoReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -349,7 +354,7 @@ func (cook QueryInfoCookie) Reply() (*QueryInfoReply, error) {
return queryInfoReply(buf), nil
}
-// Read reply into structure from buffer for QueryInfo
+// queryInfoReply reads a byte slice into a QueryInfoReply value.
func queryInfoReply(buf []byte) *QueryInfoReply {
v := new(QueryInfoReply)
b := 1 // skip reply determinant
@@ -384,6 +389,7 @@ func queryInfoReply(buf []byte) *QueryInfoReply {
}
// Write request to wire for QueryInfo
+// queryInfoRequest writes a QueryInfo request to a byte slice.
func queryInfoRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
size := 8
b := 0
@@ -404,30 +410,35 @@ func queryInfoRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
return buf
}
-// Request SelectInput
-// size: 12
+// SelectInputCookie is a cookie used only for SelectInput requests.
type SelectInputCookie struct {
*xgb.Cookie
}
-// Write request to wire for SelectInput
+// SelectInput sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectInput(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) SelectInputCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(selectInputRequest(c, Drawable, EventMask), cookie)
return SelectInputCookie{cookie}
}
+// SelectInputChecked sends a checked request.
+// If an error occurs, it can be retrieved using SelectInputCookie.Check()
func SelectInputChecked(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) SelectInputCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(selectInputRequest(c, Drawable, EventMask), cookie)
return SelectInputCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SelectInputCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SelectInput
+// selectInputRequest writes a SelectInput request to a byte slice.
func selectInputRequest(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) []byte {
size := 12
b := 0
@@ -451,30 +462,35 @@ func selectInputRequest(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32)
return buf
}
-// Request SetAttributes
-// size: xgb.Pad((24 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// SetAttributesCookie is a cookie used only for SetAttributes requests.
type SetAttributesCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetAttributes
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setAttributesRequest(c, Drawable, X, Y, Width, Height, BorderWidth, Class, Depth, Visual, ValueMask, ValueList), cookie)
return SetAttributesCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setAttributesRequest(c, Drawable, X, Y, Width, Height, BorderWidth, Class, Depth, Visual, ValueMask, ValueList), cookie)
return SetAttributesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((24 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -527,30 +543,35 @@ func setAttributesRequest(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int1
return buf
}
-// Request UnsetAttributes
-// size: 8
+// UnsetAttributesCookie is a cookie used only for UnsetAttributes requests.
type UnsetAttributesCookie struct {
*xgb.Cookie
}
-// Write request to wire for UnsetAttributes
+// UnsetAttributes sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UnsetAttributes(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(unsetAttributesRequest(c, Drawable), cookie)
return UnsetAttributesCookie{cookie}
}
+// UnsetAttributesChecked sends a checked request.
+// If an error occurs, it can be retrieved using UnsetAttributesCookie.Check()
func UnsetAttributesChecked(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(unsetAttributesRequest(c, Drawable), cookie)
return UnsetAttributesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UnsetAttributesCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UnsetAttributes
+// unsetAttributesRequest writes a UnsetAttributes request to a byte slice.
func unsetAttributesRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
size := 8
b := 0
@@ -571,30 +592,35 @@ func unsetAttributesRequest(c *xgb.Conn, Drawable xproto.Drawable) []byte {
return buf
}
-// Request Suspend
-// size: 8
+// SuspendCookie is a cookie used only for Suspend requests.
type SuspendCookie struct {
*xgb.Cookie
}
-// Write request to wire for Suspend
+// Suspend sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Suspend(c *xgb.Conn, Suspend bool) SuspendCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(suspendRequest(c, Suspend), cookie)
return SuspendCookie{cookie}
}
+// SuspendChecked sends a checked request.
+// If an error occurs, it can be retrieved using SuspendCookie.Check()
func SuspendChecked(c *xgb.Conn, Suspend bool) SuspendCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(suspendRequest(c, Suspend), cookie)
return SuspendCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SuspendCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Suspend
+// suspendRequest writes a Suspend request to a byte slice.
func suspendRequest(c *xgb.Conn, Suspend bool) []byte {
size := 8
b := 0
diff --git a/nexgb/shape/shape.go b/nexgb/shape/shape.go
index 97be0f7..664c5f4 100644
--- a/nexgb/shape/shape.go
+++ b/nexgb/shape/shape.go
@@ -2,7 +2,7 @@
package shape
/*
- This file was generated by shape.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by shape.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -82,9 +82,7 @@ type Op byte
type Kind byte
-// Event definition Notify (0)
-// Size: 32
-
+// Notify is the event number for a NotifyEvent.
const Notify = 0
type NotifyEvent struct {
@@ -100,7 +98,7 @@ type NotifyEvent struct {
// padding: 11 bytes
}
-// Event read Notify
+// NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.
func NotifyEventNew(buf []byte) xgb.Event {
v := NotifyEvent{}
b := 1 // don't read event number
@@ -141,7 +139,7 @@ func NotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write Notify
+// Bytes writes a NotifyEvent value to a byte slice.
func (v NotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -185,12 +183,14 @@ func (v NotifyEvent) Bytes() []byte {
return buf
}
-func (v NotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the Notify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v NotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of NotifyEvent.
func (v NotifyEvent) String() string {
fieldVals := make([]string, 0, 9)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -209,35 +209,37 @@ func init() {
xgb.NewExtEventFuncs["SHAPE"][0] = NotifyEventNew
}
-// Request QueryVersion
-// size: 4
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// QueryVersion sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c), cookie)
return QueryVersionCookie{cookie}
}
+// QueryVersionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 12
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint16
MinorVersion uint16
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -249,7 +251,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -272,6 +274,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// Write request to wire for QueryVersion
+// queryVersionRequest writes a QueryVersion request to a byte slice.
func queryVersionRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -289,30 +292,35 @@ func queryVersionRequest(c *xgb.Conn) []byte {
return buf
}
-// Request Rectangles
-// size: xgb.Pad((16 + xgb.Pad((len(Rectangles) * 8))))
+// RectanglesCookie is a cookie used only for Rectangles requests.
type RectanglesCookie struct {
*xgb.Cookie
}
-// Write request to wire for Rectangles
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(rectanglesRequest(c, Operation, DestinationKind, Ordering, DestinationWindow, XOffset, YOffset, Rectangles), cookie)
return RectanglesCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(rectanglesRequest(c, Operation, DestinationKind, Ordering, DestinationWindow, XOffset, YOffset, Rectangles), cookie)
return RectanglesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((16 + xgb.Pad((len(Rectangles) * 8))))
b := 0
@@ -352,30 +360,35 @@ func rectanglesRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, Ordering
return buf
}
-// Request Mask
-// size: 20
+// MaskCookie is a cookie used only for Mask requests.
type MaskCookie struct {
*xgb.Cookie
}
-// Write request to wire for Mask
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(maskRequest(c, Operation, DestinationKind, DestinationWindow, XOffset, YOffset, SourceBitmap), cookie)
return MaskCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(maskRequest(c, Operation, DestinationKind, DestinationWindow, XOffset, YOffset, SourceBitmap), cookie)
return MaskCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 20
b := 0
@@ -413,30 +426,35 @@ func maskRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, DestinationWin
return buf
}
-// Request Combine
-// size: 20
+// CombineCookie is a cookie used only for Combine requests.
type CombineCookie struct {
*xgb.Cookie
}
-// Write request to wire for Combine
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(combineRequest(c, Operation, DestinationKind, SourceKind, DestinationWindow, XOffset, YOffset, SourceWindow), cookie)
return CombineCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(combineRequest(c, Operation, DestinationKind, SourceKind, DestinationWindow, XOffset, YOffset, SourceWindow), cookie)
return CombineCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 20
b := 0
@@ -477,30 +495,35 @@ func combineRequest(c *xgb.Conn, Operation Op, DestinationKind Kind, SourceKind
return buf
}
-// Request Offset
-// size: 16
+// OffsetCookie is a cookie used only for Offset requests.
type OffsetCookie struct {
*xgb.Cookie
}
-// Write request to wire for Offset
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(offsetRequest(c, DestinationKind, DestinationWindow, XOffset, YOffset), cookie)
return OffsetCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(offsetRequest(c, DestinationKind, DestinationWindow, XOffset, YOffset), cookie)
return OffsetCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -532,29 +555,31 @@ func offsetRequest(c *xgb.Conn, DestinationKind Kind, DestinationWindow xproto.W
return buf
}
-// Request QueryExtents
-// size: 8
+// QueryExtentsCookie is a cookie used only for QueryExtents requests.
type QueryExtentsCookie struct {
*xgb.Cookie
}
+// QueryExtents sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryExtentsCookie.Reply()
func QueryExtents(c *xgb.Conn, DestinationWindow xproto.Window) QueryExtentsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryExtentsRequest(c, DestinationWindow), cookie)
return QueryExtentsCookie{cookie}
}
+// QueryExtentsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryExtentsUnchecked(c *xgb.Conn, DestinationWindow xproto.Window) QueryExtentsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryExtentsRequest(c, DestinationWindow), cookie)
return QueryExtentsCookie{cookie}
}
-// Request reply for QueryExtents
-// size: 28
+// QueryExtentsReply represents the data returned from a QueryExtents request.
type QueryExtentsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
BoundingShaped bool
ClipShaped bool
@@ -569,7 +594,7 @@ type QueryExtentsReply struct {
ClipShapeExtentsHeight uint16
}
-// Waits and reads reply data from request QueryExtents
+// Reply blocks and returns the reply data for a QueryExtents request.
func (cook QueryExtentsCookie) Reply() (*QueryExtentsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -581,7 +606,7 @@ func (cook QueryExtentsCookie) Reply() (*QueryExtentsReply, error) {
return queryExtentsReply(buf), nil
}
-// Read reply into structure from buffer for QueryExtents
+// queryExtentsReply reads a byte slice into a QueryExtentsReply value.
func queryExtentsReply(buf []byte) *QueryExtentsReply {
v := new(QueryExtentsReply)
b := 1 // skip reply determinant
@@ -638,6 +663,7 @@ func queryExtentsReply(buf []byte) *QueryExtentsReply {
}
// Write request to wire for QueryExtents
+// queryExtentsRequest writes a QueryExtents request to a byte slice.
func queryExtentsRequest(c *xgb.Conn, DestinationWindow xproto.Window) []byte {
size := 8
b := 0
@@ -658,30 +684,35 @@ func queryExtentsRequest(c *xgb.Conn, DestinationWindow xproto.Window) []byte {
return buf
}
-// Request SelectInput
-// size: 12
+// SelectInputCookie is a cookie used only for SelectInput requests.
type SelectInputCookie struct {
*xgb.Cookie
}
-// Write request to wire for SelectInput
+// SelectInput sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectInput(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) SelectInputCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(selectInputRequest(c, DestinationWindow, Enable), cookie)
return SelectInputCookie{cookie}
}
+// SelectInputChecked sends a checked request.
+// If an error occurs, it can be retrieved using SelectInputCookie.Check()
func SelectInputChecked(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) SelectInputCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(selectInputRequest(c, DestinationWindow, Enable), cookie)
return SelectInputCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SelectInputCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SelectInput
+// selectInputRequest writes a SelectInput request to a byte slice.
func selectInputRequest(c *xgb.Conn, DestinationWindow xproto.Window, Enable bool) []byte {
size := 12
b := 0
@@ -711,33 +742,35 @@ func selectInputRequest(c *xgb.Conn, DestinationWindow xproto.Window, Enable boo
return buf
}
-// Request InputSelected
-// size: 8
+// InputSelectedCookie is a cookie used only for InputSelected requests.
type InputSelectedCookie struct {
*xgb.Cookie
}
+// InputSelected sends a checked request.
+// If an error occurs, it will be returned with the reply by calling InputSelectedCookie.Reply()
func InputSelected(c *xgb.Conn, DestinationWindow xproto.Window) InputSelectedCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(inputSelectedRequest(c, DestinationWindow), cookie)
return InputSelectedCookie{cookie}
}
+// InputSelectedUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func InputSelectedUnchecked(c *xgb.Conn, DestinationWindow xproto.Window) InputSelectedCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(inputSelectedRequest(c, DestinationWindow), cookie)
return InputSelectedCookie{cookie}
}
-// Request reply for InputSelected
-// size: 8
+// InputSelectedReply represents the data returned from a InputSelected request.
type InputSelectedReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Enabled bool
}
-// Waits and reads reply data from request InputSelected
+// Reply blocks and returns the reply data for a InputSelected request.
func (cook InputSelectedCookie) Reply() (*InputSelectedReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -749,7 +782,7 @@ func (cook InputSelectedCookie) Reply() (*InputSelectedReply, error) {
return inputSelectedReply(buf), nil
}
-// Read reply into structure from buffer for InputSelected
+// inputSelectedReply reads a byte slice into a InputSelectedReply value.
func inputSelectedReply(buf []byte) *InputSelectedReply {
v := new(InputSelectedReply)
b := 1 // skip reply determinant
@@ -771,6 +804,7 @@ func inputSelectedReply(buf []byte) *InputSelectedReply {
}
// Write request to wire for InputSelected
+// inputSelectedRequest writes a InputSelected request to a byte slice.
func inputSelectedRequest(c *xgb.Conn, DestinationWindow xproto.Window) []byte {
size := 8
b := 0
@@ -791,36 +825,38 @@ func inputSelectedRequest(c *xgb.Conn, DestinationWindow xproto.Window) []byte {
return buf
}
-// Request GetRectangles
-// size: 12
+// GetRectanglesCookie is a cookie used only for GetRectangles requests.
type GetRectanglesCookie struct {
*xgb.Cookie
}
+// GetRectangles sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getRectanglesRequest(c, Window, SourceKind), cookie)
return GetRectanglesCookie{cookie}
}
+// GetRectanglesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetRectanglesUnchecked(c *xgb.Conn, Window xproto.Window, SourceKind Kind) GetRectanglesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getRectanglesRequest(c, Window, SourceKind), cookie)
return GetRectanglesCookie{cookie}
}
-// Request reply for GetRectangles
-// size: (32 + xgb.Pad((int(RectanglesLen) * 8)))
+// GetRectanglesReply represents the data returned from a GetRectangles request.
type GetRectanglesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Ordering byte
RectanglesLen uint32
// padding: 20 bytes
Rectangles []xproto.Rectangle // size: xgb.Pad((int(RectanglesLen) * 8))
}
-// Waits and reads reply data from request GetRectangles
+// Reply blocks and returns the reply data for a GetRectangles request.
func (cook GetRectanglesCookie) Reply() (*GetRectanglesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -832,7 +868,7 @@ func (cook GetRectanglesCookie) Reply() (*GetRectanglesReply, error) {
return getRectanglesReply(buf), nil
}
-// Read reply into structure from buffer for GetRectangles
+// getRectanglesReply reads a byte slice into a GetRectanglesReply value.
func getRectanglesReply(buf []byte) *GetRectanglesReply {
v := new(GetRectanglesReply)
b := 1 // skip reply determinant
@@ -858,6 +894,7 @@ func getRectanglesReply(buf []byte) *GetRectanglesReply {
}
// Write request to wire for GetRectangles
+// getRectanglesRequest writes a GetRectangles request to a byte slice.
func getRectanglesRequest(c *xgb.Conn, Window xproto.Window, SourceKind Kind) []byte {
size := 12
b := 0
diff --git a/nexgb/shm/shm.go b/nexgb/shm/shm.go
index d262667..b24be97 100644
--- a/nexgb/shm/shm.go
+++ b/nexgb/shm/shm.go
@@ -2,7 +2,7 @@
package shm
/*
- This file was generated by shm.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by shm.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,6 +40,8 @@ func init() {
xgb.NewExtErrorFuncs["MIT-SHM"] = make(map[int]xgb.NewErrorFun)
}
+// Skipping definition for base type 'Int32'
+
// Skipping definition for base type 'Void'
// Skipping definition for base type 'Byte'
@@ -62,8 +64,6 @@ func init() {
// Skipping definition for base type 'Int16'
-// Skipping definition for base type 'Int32'
-
type Seg uint32
func NewSegId(c *xgb.Conn) (Seg, error) {
@@ -74,9 +74,7 @@ func NewSegId(c *xgb.Conn) (Seg, error) {
return Seg(id), nil
}
-// Event definition Completion (0)
-// Size: 32
-
+// Completion is the event number for a CompletionEvent.
const Completion = 0
type CompletionEvent struct {
@@ -90,7 +88,7 @@ type CompletionEvent struct {
Offset uint32
}
-// Event read Completion
+// CompletionEventNew constructs a CompletionEvent value that implements xgb.Event from a byte slice.
func CompletionEventNew(buf []byte) xgb.Event {
v := CompletionEvent{}
b := 1 // don't read event number
@@ -120,7 +118,7 @@ func CompletionEventNew(buf []byte) xgb.Event {
return v
}
-// Event write Completion
+// Bytes writes a CompletionEvent value to a byte slice.
func (v CompletionEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -153,12 +151,14 @@ func (v CompletionEvent) Bytes() []byte {
return buf
}
-func (v CompletionEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the Completion event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v CompletionEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of CompletionEvent.
func (v CompletionEvent) String() string {
fieldVals := make([]string, 0, 7)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -174,20 +174,20 @@ func init() {
xgb.NewExtEventFuncs["MIT-SHM"][0] = CompletionEventNew
}
-// ErrorCopy definition BadSeg (0)
-
+// BadBadSeg is the error number for a BadBadSeg.
const BadBadSeg = 0
type BadSegError xproto.ValueError
+// BadSegErrorNew constructs a BadSegError value that implements xgb.Error from a byte slice.
func BadSegErrorNew(buf []byte) xgb.Error {
v := BadSegError(xproto.ValueErrorNew(buf).(xproto.ValueError))
v.NiceName = "BadSeg"
return v
}
-func (err BadSegError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadSeg error.
+// This is mostly used internally.
func (err BadSegError) SequenceId() uint16 {
return err.Sequence
}
@@ -210,29 +210,31 @@ func init() {
xgb.NewExtErrorFuncs["MIT-SHM"][0] = BadSegErrorNew
}
-// Request QueryVersion
-// size: 4
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// QueryVersion sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c), cookie)
return QueryVersionCookie{cookie}
}
+// QueryVersionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 32
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
SharedPixmaps bool
MajorVersion uint16
MinorVersion uint16
@@ -242,7 +244,7 @@ type QueryVersionReply struct {
// padding: 15 bytes
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -254,7 +256,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -293,6 +295,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// Write request to wire for QueryVersion
+// queryVersionRequest writes a QueryVersion request to a byte slice.
func queryVersionRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -310,30 +313,35 @@ func queryVersionRequest(c *xgb.Conn) []byte {
return buf
}
-// Request Attach
-// size: 16
+// AttachCookie is a cookie used only for Attach requests.
type AttachCookie struct {
*xgb.Cookie
}
-// Write request to wire for Attach
+// Attach sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Attach(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) AttachCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(attachRequest(c, Shmseg, Shmid, ReadOnly), cookie)
return AttachCookie{cookie}
}
+// AttachChecked sends a checked request.
+// If an error occurs, it can be retrieved using AttachCookie.Check()
func AttachChecked(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) AttachCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(attachRequest(c, Shmseg, Shmid, ReadOnly), cookie)
return AttachCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook AttachCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Attach
+// attachRequest writes a Attach request to a byte slice.
func attachRequest(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) []byte {
size := 16
b := 0
@@ -366,30 +374,35 @@ func attachRequest(c *xgb.Conn, Shmseg Seg, Shmid uint32, ReadOnly bool) []byte
return buf
}
-// Request Detach
-// size: 8
+// DetachCookie is a cookie used only for Detach requests.
type DetachCookie struct {
*xgb.Cookie
}
-// Write request to wire for Detach
+// Detach sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Detach(c *xgb.Conn, Shmseg Seg) DetachCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(detachRequest(c, Shmseg), cookie)
return DetachCookie{cookie}
}
+// DetachChecked sends a checked request.
+// If an error occurs, it can be retrieved using DetachCookie.Check()
func DetachChecked(c *xgb.Conn, Shmseg Seg) DetachCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(detachRequest(c, Shmseg), cookie)
return DetachCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DetachCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Detach
+// detachRequest writes a Detach request to a byte slice.
func detachRequest(c *xgb.Conn, Shmseg Seg) []byte {
size := 8
b := 0
@@ -410,30 +423,35 @@ func detachRequest(c *xgb.Conn, Shmseg Seg) []byte {
return buf
}
-// Request PutImage
-// size: 40
+// PutImageCookie is a cookie used only for PutImage requests.
type PutImageCookie struct {
*xgb.Cookie
}
-// Write request to wire for PutImage
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(putImageRequest(c, Drawable, Gc, TotalWidth, TotalHeight, SrcX, SrcY, SrcWidth, SrcHeight, DstX, DstY, Depth, Format, SendEvent, Shmseg, Offset), 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, 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(putImageRequest(c, Drawable, Gc, TotalWidth, TotalHeight, SrcX, SrcY, SrcWidth, SrcHeight, DstX, DstY, Depth, Format, SendEvent, Shmseg, Offset), cookie)
return PutImageCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 40
b := 0
@@ -498,35 +516,37 @@ func putImageRequest(c *xgb.Conn, Drawable xproto.Drawable, Gc xproto.Gcontext,
return buf
}
-// Request GetImage
-// size: 32
+// GetImageCookie is a cookie used only for GetImage requests.
type GetImageCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getImageRequest(c, Drawable, X, Y, Width, Height, PlaneMask, Format, Shmseg, Offset), cookie)
return GetImageCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getImageRequest(c, Drawable, X, Y, Width, Height, PlaneMask, Format, Shmseg, Offset), cookie)
return GetImageCookie{cookie}
}
-// Request reply for GetImage
-// size: 16
+// GetImageReply represents the data returned from a GetImage request.
type GetImageReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Depth byte
Visual xproto.Visualid
Size uint32
}
-// Waits and reads reply data from request GetImage
+// Reply blocks and returns the reply data for a GetImage request.
func (cook GetImageCookie) Reply() (*GetImageReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -538,7 +558,7 @@ func (cook GetImageCookie) Reply() (*GetImageReply, error) {
return getImageReply(buf), nil
}
-// Read reply into structure from buffer for GetImage
+// getImageReply reads a byte slice into a GetImageReply value.
func getImageReply(buf []byte) *GetImageReply {
v := new(GetImageReply)
b := 1 // skip reply determinant
@@ -562,6 +582,7 @@ func getImageReply(buf []byte) *GetImageReply {
}
// 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 {
size := 32
b := 0
@@ -608,30 +629,35 @@ func getImageRequest(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Wi
return buf
}
-// Request CreatePixmap
-// size: 28
+// CreatePixmapCookie is a cookie used only for CreatePixmap requests.
type CreatePixmapCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreatePixmap
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(createPixmapRequest(c, Pid, Drawable, Width, Height, Depth, Shmseg, Offset), 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, Pid xproto.Pixmap, Drawable xproto.Drawable, Width uint16, Height uint16, Depth byte, Shmseg Seg, Offset uint32) CreatePixmapCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createPixmapRequest(c, Pid, Drawable, Width, Height, Depth, Shmseg, Offset), cookie)
return CreatePixmapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 28
b := 0
diff --git a/nexgb/sync/sync.go b/nexgb/sync/sync.go
index cde5cab..7a32bc4 100644
--- a/nexgb/sync/sync.go
+++ b/nexgb/sync/sync.go
@@ -2,7 +2,7 @@
package sync
/*
- This file was generated by sync.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by sync.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,6 +40,10 @@ func init() {
xgb.NewExtErrorFuncs["SYNC"] = make(map[int]xgb.NewErrorFun)
}
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Int16'
+
// Skipping definition for base type 'Int32'
// Skipping definition for base type 'Void'
@@ -60,10 +64,6 @@ func init() {
// Skipping definition for base type 'Float'
-// Skipping definition for base type 'Card8'
-
-// Skipping definition for base type 'Int16'
-
const (
AlarmstateActive = 0
AlarmstateInactive = 1
@@ -121,14 +121,12 @@ func NewFenceId(c *xgb.Conn) (Fence, error) {
return Fence(id), nil
}
-// 'Int64' struct definition
-// Size: 8
type Int64 struct {
Hi int32
Lo uint32
}
-// Struct read Int64
+// Int64Read reads a byte slice into a Int64 value.
func Int64Read(buf []byte, v *Int64) int {
b := 0
@@ -141,7 +139,7 @@ func Int64Read(buf []byte, v *Int64) int {
return b
}
-// Struct list read Int64
+// Int64ReadList reads a byte slice into a list of Int64 values.
func Int64ReadList(buf []byte, dest []Int64) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -151,7 +149,7 @@ func Int64ReadList(buf []byte, dest []Int64) int {
return xgb.Pad(b)
}
-// Struct write Int64
+// Bytes writes a Int64 value to a byte slice.
func (v Int64) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -165,7 +163,7 @@ func (v Int64) Bytes() []byte {
return buf
}
-// Write struct list Int64
+// Int64ListBytes writes a list of %s(MISSING) values to a byte slice.
func Int64ListBytes(buf []byte, list []Int64) int {
b := 0
var structBytes []byte
@@ -177,8 +175,6 @@ func Int64ListBytes(buf []byte, list []Int64) int {
return b
}
-// 'Systemcounter' struct definition
-// Size: (14 + xgb.Pad((int(NameLen) * 1)))
type Systemcounter struct {
Counter Counter
Resolution Int64
@@ -186,7 +182,7 @@ type Systemcounter struct {
Name string // size: xgb.Pad((int(NameLen) * 1))
}
-// Struct read Systemcounter
+// SystemcounterRead reads a byte slice into a Systemcounter value.
func SystemcounterRead(buf []byte, v *Systemcounter) int {
b := 0
@@ -209,7 +205,7 @@ func SystemcounterRead(buf []byte, v *Systemcounter) int {
return b
}
-// Struct list read Systemcounter
+// SystemcounterReadList reads a byte slice into a list of Systemcounter values.
func SystemcounterReadList(buf []byte, dest []Systemcounter) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -219,7 +215,7 @@ func SystemcounterReadList(buf []byte, dest []Systemcounter) int {
return xgb.Pad(b)
}
-// Struct write Systemcounter
+// Bytes writes a Systemcounter value to a byte slice.
func (v Systemcounter) Bytes() []byte {
buf := make([]byte, (14 + xgb.Pad((int(v.NameLen) * 1))))
b := 0
@@ -242,7 +238,7 @@ func (v Systemcounter) Bytes() []byte {
return buf
}
-// Write struct list Systemcounter
+// SystemcounterListBytes writes a list of %s(MISSING) values to a byte slice.
func SystemcounterListBytes(buf []byte, list []Systemcounter) int {
b := 0
var structBytes []byte
@@ -254,7 +250,7 @@ func SystemcounterListBytes(buf []byte, list []Systemcounter) int {
return b
}
-// Struct list size Systemcounter
+// SystemcounterListSize computes the size (bytes) of a list of Systemcounter values.
func SystemcounterListSize(list []Systemcounter) int {
size := 0
for _, item := range list {
@@ -263,8 +259,6 @@ func SystemcounterListSize(list []Systemcounter) int {
return size
}
-// 'Trigger' struct definition
-// Size: 20
type Trigger struct {
Counter Counter
WaitType uint32
@@ -272,7 +266,7 @@ type Trigger struct {
TestType uint32
}
-// Struct read Trigger
+// TriggerRead reads a byte slice into a Trigger value.
func TriggerRead(buf []byte, v *Trigger) int {
b := 0
@@ -291,7 +285,7 @@ func TriggerRead(buf []byte, v *Trigger) int {
return b
}
-// Struct list read Trigger
+// TriggerReadList reads a byte slice into a list of Trigger values.
func TriggerReadList(buf []byte, dest []Trigger) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -301,7 +295,7 @@ func TriggerReadList(buf []byte, dest []Trigger) int {
return xgb.Pad(b)
}
-// Struct write Trigger
+// Bytes writes a Trigger value to a byte slice.
func (v Trigger) Bytes() []byte {
buf := make([]byte, 20)
b := 0
@@ -324,7 +318,7 @@ func (v Trigger) Bytes() []byte {
return buf
}
-// Write struct list Trigger
+// TriggerListBytes writes a list of %s(MISSING) values to a byte slice.
func TriggerListBytes(buf []byte, list []Trigger) int {
b := 0
var structBytes []byte
@@ -336,14 +330,12 @@ func TriggerListBytes(buf []byte, list []Trigger) int {
return b
}
-// 'Waitcondition' struct definition
-// Size: 28
type Waitcondition struct {
Trigger Trigger
EventThreshold Int64
}
-// Struct read Waitcondition
+// WaitconditionRead reads a byte slice into a Waitcondition value.
func WaitconditionRead(buf []byte, v *Waitcondition) int {
b := 0
@@ -356,7 +348,7 @@ func WaitconditionRead(buf []byte, v *Waitcondition) int {
return b
}
-// Struct list read Waitcondition
+// WaitconditionReadList reads a byte slice into a list of Waitcondition values.
func WaitconditionReadList(buf []byte, dest []Waitcondition) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -366,7 +358,7 @@ func WaitconditionReadList(buf []byte, dest []Waitcondition) int {
return xgb.Pad(b)
}
-// Struct write Waitcondition
+// Bytes writes a Waitcondition value to a byte slice.
func (v Waitcondition) Bytes() []byte {
buf := make([]byte, 28)
b := 0
@@ -386,7 +378,7 @@ func (v Waitcondition) Bytes() []byte {
return buf
}
-// Write struct list Waitcondition
+// WaitconditionListBytes writes a list of %s(MISSING) values to a byte slice.
func WaitconditionListBytes(buf []byte, list []Waitcondition) int {
b := 0
var structBytes []byte
@@ -398,9 +390,7 @@ func WaitconditionListBytes(buf []byte, list []Waitcondition) int {
return b
}
-// Event definition CounterNotify (0)
-// Size: 32
-
+// CounterNotify is the event number for a CounterNotifyEvent.
const CounterNotify = 0
type CounterNotifyEvent struct {
@@ -415,7 +405,7 @@ type CounterNotifyEvent struct {
// padding: 1 bytes
}
-// Event read CounterNotify
+// CounterNotifyEventNew constructs a CounterNotifyEvent value that implements xgb.Event from a byte slice.
func CounterNotifyEventNew(buf []byte) xgb.Event {
v := CounterNotifyEvent{}
b := 1 // don't read event number
@@ -453,7 +443,7 @@ func CounterNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write CounterNotify
+// Bytes writes a CounterNotifyEvent value to a byte slice.
func (v CounterNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -500,12 +490,14 @@ func (v CounterNotifyEvent) Bytes() []byte {
return buf
}
-func (v CounterNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the CounterNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v CounterNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of CounterNotifyEvent.
func (v CounterNotifyEvent) String() string {
fieldVals := make([]string, 0, 8)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -521,9 +513,7 @@ func init() {
xgb.NewExtEventFuncs["SYNC"][0] = CounterNotifyEventNew
}
-// Event definition AlarmNotify (1)
-// Size: 32
-
+// AlarmNotify is the event number for a AlarmNotifyEvent.
const AlarmNotify = 1
type AlarmNotifyEvent struct {
@@ -537,7 +527,7 @@ type AlarmNotifyEvent struct {
// padding: 3 bytes
}
-// Event read AlarmNotify
+// AlarmNotifyEventNew constructs a AlarmNotifyEvent value that implements xgb.Event from a byte slice.
func AlarmNotifyEventNew(buf []byte) xgb.Event {
v := AlarmNotifyEvent{}
b := 1 // don't read event number
@@ -568,7 +558,7 @@ func AlarmNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write AlarmNotify
+// Bytes writes a AlarmNotifyEvent value to a byte slice.
func (v AlarmNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -608,12 +598,14 @@ func (v AlarmNotifyEvent) Bytes() []byte {
return buf
}
-func (v AlarmNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the AlarmNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v AlarmNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of AlarmNotifyEvent.
func (v AlarmNotifyEvent) String() string {
fieldVals := make([]string, 0, 7)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -628,9 +620,7 @@ func init() {
xgb.NewExtEventFuncs["SYNC"][1] = AlarmNotifyEventNew
}
-// Error definition Counter (0)
-// Size: 32
-
+// BadCounter is the error number for a BadCounter.
const BadCounter = 0
type CounterError struct {
@@ -641,7 +631,7 @@ type CounterError struct {
MajorOpcode byte
}
-// Error read Counter
+// CounterErrorNew constructs a CounterError value that implements xgb.Error from a byte slice.
func CounterErrorNew(buf []byte) xgb.Error {
v := CounterError{}
v.NiceName = "Counter"
@@ -664,8 +654,8 @@ func CounterErrorNew(buf []byte) xgb.Error {
return v
}
-func (err CounterError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadCounter error.
+// This is mostly used internally.
func (err CounterError) SequenceId() uint16 {
return err.Sequence
}
@@ -688,9 +678,7 @@ func init() {
xgb.NewExtErrorFuncs["SYNC"][0] = CounterErrorNew
}
-// Error definition Alarm (1)
-// Size: 32
-
+// BadAlarm is the error number for a BadAlarm.
const BadAlarm = 1
type AlarmError struct {
@@ -701,7 +689,7 @@ type AlarmError struct {
MajorOpcode byte
}
-// Error read Alarm
+// AlarmErrorNew constructs a AlarmError value that implements xgb.Error from a byte slice.
func AlarmErrorNew(buf []byte) xgb.Error {
v := AlarmError{}
v.NiceName = "Alarm"
@@ -724,8 +712,8 @@ func AlarmErrorNew(buf []byte) xgb.Error {
return v
}
-func (err AlarmError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadAlarm error.
+// This is mostly used internally.
func (err AlarmError) SequenceId() uint16 {
return err.Sequence
}
@@ -748,36 +736,38 @@ func init() {
xgb.NewExtErrorFuncs["SYNC"][1] = AlarmErrorNew
}
-// Request Initialize
-// size: 8
+// InitializeCookie is a cookie used only for Initialize requests.
type InitializeCookie struct {
*xgb.Cookie
}
+// Initialize sends a checked request.
+// If an error occurs, it will be returned with the reply by calling InitializeCookie.Reply()
func Initialize(c *xgb.Conn, DesiredMajorVersion byte, DesiredMinorVersion byte) InitializeCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(initializeRequest(c, DesiredMajorVersion, DesiredMinorVersion), cookie)
return InitializeCookie{cookie}
}
+// InitializeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func InitializeUnchecked(c *xgb.Conn, DesiredMajorVersion byte, DesiredMinorVersion byte) InitializeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(initializeRequest(c, DesiredMajorVersion, DesiredMinorVersion), cookie)
return InitializeCookie{cookie}
}
-// Request reply for Initialize
-// size: 32
+// InitializeReply represents the data returned from a Initialize request.
type InitializeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion byte
MinorVersion byte
// padding: 22 bytes
}
-// Waits and reads reply data from request Initialize
+// Reply blocks and returns the reply data for a Initialize request.
func (cook InitializeCookie) Reply() (*InitializeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -789,7 +779,7 @@ func (cook InitializeCookie) Reply() (*InitializeReply, error) {
return initializeReply(buf), nil
}
-// Read reply into structure from buffer for Initialize
+// initializeReply reads a byte slice into a InitializeReply value.
func initializeReply(buf []byte) *InitializeReply {
v := new(InitializeReply)
b := 1 // skip reply determinant
@@ -814,6 +804,7 @@ func initializeReply(buf []byte) *InitializeReply {
}
// Write request to wire for Initialize
+// initializeRequest writes a Initialize request to a byte slice.
func initializeRequest(c *xgb.Conn, DesiredMajorVersion byte, DesiredMinorVersion byte) []byte {
size := 8
b := 0
@@ -837,36 +828,38 @@ func initializeRequest(c *xgb.Conn, DesiredMajorVersion byte, DesiredMinorVersio
return buf
}
-// Request ListSystemCounters
-// size: 4
+// ListSystemCountersCookie is a cookie used only for ListSystemCounters requests.
type ListSystemCountersCookie struct {
*xgb.Cookie
}
+// ListSystemCounters sends a checked request.
+// If an error occurs, it will be returned with the reply by calling ListSystemCountersCookie.Reply()
func ListSystemCounters(c *xgb.Conn) ListSystemCountersCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(listSystemCountersRequest(c), cookie)
return ListSystemCountersCookie{cookie}
}
+// ListSystemCountersUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListSystemCountersUnchecked(c *xgb.Conn) ListSystemCountersCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listSystemCountersRequest(c), cookie)
return ListSystemCountersCookie{cookie}
}
-// Request reply for ListSystemCounters
-// size: (32 + SystemcounterListSize(Counters))
+// ListSystemCountersReply represents the data returned from a ListSystemCounters request.
type ListSystemCountersReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
CountersLen uint32
// padding: 20 bytes
Counters []Systemcounter // size: SystemcounterListSize(Counters)
}
-// Waits and reads reply data from request ListSystemCounters
+// Reply blocks and returns the reply data for a ListSystemCounters request.
func (cook ListSystemCountersCookie) Reply() (*ListSystemCountersReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -878,7 +871,7 @@ func (cook ListSystemCountersCookie) Reply() (*ListSystemCountersReply, error) {
return listSystemCountersReply(buf), nil
}
-// Read reply into structure from buffer for ListSystemCounters
+// listSystemCountersReply reads a byte slice into a ListSystemCountersReply value.
func listSystemCountersReply(buf []byte) *ListSystemCountersReply {
v := new(ListSystemCountersReply)
b := 1 // skip reply determinant
@@ -903,6 +896,7 @@ func listSystemCountersReply(buf []byte) *ListSystemCountersReply {
}
// Write request to wire for ListSystemCounters
+// listSystemCountersRequest writes a ListSystemCounters request to a byte slice.
func listSystemCountersRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -920,30 +914,35 @@ func listSystemCountersRequest(c *xgb.Conn) []byte {
return buf
}
-// Request CreateCounter
-// size: 16
+// CreateCounterCookie is a cookie used only for CreateCounter requests.
type CreateCounterCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateCounter
+// CreateCounter sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateCounter(c *xgb.Conn, Id Counter, InitialValue Int64) CreateCounterCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createCounterRequest(c, Id, InitialValue), cookie)
return CreateCounterCookie{cookie}
}
+// CreateCounterChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateCounterCookie.Check()
func CreateCounterChecked(c *xgb.Conn, Id Counter, InitialValue Int64) CreateCounterCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createCounterRequest(c, Id, InitialValue), cookie)
return CreateCounterCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateCounterCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateCounter
+// createCounterRequest writes a CreateCounter request to a byte slice.
func createCounterRequest(c *xgb.Conn, Id Counter, InitialValue Int64) []byte {
size := 16
b := 0
@@ -970,30 +969,35 @@ func createCounterRequest(c *xgb.Conn, Id Counter, InitialValue Int64) []byte {
return buf
}
-// Request DestroyCounter
-// size: 8
+// DestroyCounterCookie is a cookie used only for DestroyCounter requests.
type DestroyCounterCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyCounter
+// DestroyCounter sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroyCounter(c *xgb.Conn, Counter Counter) DestroyCounterCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyCounterRequest(c, Counter), cookie)
return DestroyCounterCookie{cookie}
}
+// DestroyCounterChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyCounterCookie.Check()
func DestroyCounterChecked(c *xgb.Conn, Counter Counter) DestroyCounterCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyCounterRequest(c, Counter), cookie)
return DestroyCounterCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroyCounterCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroyCounter
+// destroyCounterRequest writes a DestroyCounter request to a byte slice.
func destroyCounterRequest(c *xgb.Conn, Counter Counter) []byte {
size := 8
b := 0
@@ -1014,34 +1018,36 @@ func destroyCounterRequest(c *xgb.Conn, Counter Counter) []byte {
return buf
}
-// Request QueryCounter
-// size: 8
+// QueryCounterCookie is a cookie used only for QueryCounter requests.
type QueryCounterCookie struct {
*xgb.Cookie
}
+// QueryCounter sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryCounterCookie.Reply()
func QueryCounter(c *xgb.Conn, Counter Counter) QueryCounterCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryCounterRequest(c, Counter), cookie)
return QueryCounterCookie{cookie}
}
+// QueryCounterUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryCounterUnchecked(c *xgb.Conn, Counter Counter) QueryCounterCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryCounterRequest(c, Counter), cookie)
return QueryCounterCookie{cookie}
}
-// Request reply for QueryCounter
-// size: 16
+// QueryCounterReply represents the data returned from a QueryCounter request.
type QueryCounterReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
CounterValue Int64
}
-// Waits and reads reply data from request QueryCounter
+// Reply blocks and returns the reply data for a QueryCounter request.
func (cook QueryCounterCookie) Reply() (*QueryCounterReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1053,7 +1059,7 @@ func (cook QueryCounterCookie) Reply() (*QueryCounterReply, error) {
return queryCounterReply(buf), nil
}
-// Read reply into structure from buffer for QueryCounter
+// queryCounterReply reads a byte slice into a QueryCounterReply value.
func queryCounterReply(buf []byte) *QueryCounterReply {
v := new(QueryCounterReply)
b := 1 // skip reply determinant
@@ -1073,6 +1079,7 @@ func queryCounterReply(buf []byte) *QueryCounterReply {
}
// Write request to wire for QueryCounter
+// queryCounterRequest writes a QueryCounter request to a byte slice.
func queryCounterRequest(c *xgb.Conn, Counter Counter) []byte {
size := 8
b := 0
@@ -1093,30 +1100,35 @@ func queryCounterRequest(c *xgb.Conn, Counter Counter) []byte {
return buf
}
-// Request Await
-// size: xgb.Pad((4 + xgb.Pad((len(WaitList) * 28))))
+// AwaitCookie is a cookie used only for Await requests.
type AwaitCookie struct {
*xgb.Cookie
}
-// Write request to wire for Await
+// Await sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Await(c *xgb.Conn, WaitList []Waitcondition) AwaitCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(awaitRequest(c, WaitList), cookie)
return AwaitCookie{cookie}
}
+// AwaitChecked sends a checked request.
+// If an error occurs, it can be retrieved using AwaitCookie.Check()
func AwaitChecked(c *xgb.Conn, WaitList []Waitcondition) AwaitCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(awaitRequest(c, WaitList), cookie)
return AwaitCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook AwaitCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Await
+// awaitRequest writes a Await request to a byte slice.
func awaitRequest(c *xgb.Conn, WaitList []Waitcondition) []byte {
size := xgb.Pad((4 + xgb.Pad((len(WaitList) * 28))))
b := 0
@@ -1136,30 +1148,35 @@ func awaitRequest(c *xgb.Conn, WaitList []Waitcondition) []byte {
return buf
}
-// Request ChangeCounter
-// size: 16
+// ChangeCounterCookie is a cookie used only for ChangeCounter requests.
type ChangeCounterCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeCounter
+// ChangeCounter sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangeCounter(c *xgb.Conn, Counter Counter, Amount Int64) ChangeCounterCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(changeCounterRequest(c, Counter, Amount), cookie)
return ChangeCounterCookie{cookie}
}
+// ChangeCounterChecked sends a checked request.
+// If an error occurs, it can be retrieved using ChangeCounterCookie.Check()
func ChangeCounterChecked(c *xgb.Conn, Counter Counter, Amount Int64) ChangeCounterCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(changeCounterRequest(c, Counter, Amount), cookie)
return ChangeCounterCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeCounterCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeCounter
+// changeCounterRequest writes a ChangeCounter request to a byte slice.
func changeCounterRequest(c *xgb.Conn, Counter Counter, Amount Int64) []byte {
size := 16
b := 0
@@ -1186,30 +1203,35 @@ func changeCounterRequest(c *xgb.Conn, Counter Counter, Amount Int64) []byte {
return buf
}
-// Request SetCounter
-// size: 16
+// SetCounterCookie is a cookie used only for SetCounter requests.
type SetCounterCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetCounter
+// SetCounter sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetCounter(c *xgb.Conn, Counter Counter, Value Int64) SetCounterCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setCounterRequest(c, Counter, Value), cookie)
return SetCounterCookie{cookie}
}
+// SetCounterChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetCounterCookie.Check()
func SetCounterChecked(c *xgb.Conn, Counter Counter, Value Int64) SetCounterCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setCounterRequest(c, Counter, Value), cookie)
return SetCounterCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetCounterCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetCounter
+// setCounterRequest writes a SetCounter request to a byte slice.
func setCounterRequest(c *xgb.Conn, Counter Counter, Value Int64) []byte {
size := 16
b := 0
@@ -1236,30 +1258,35 @@ func setCounterRequest(c *xgb.Conn, Counter Counter, Value Int64) []byte {
return buf
}
-// Request CreateAlarm
-// size: xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// CreateAlarmCookie is a cookie used only for CreateAlarm requests.
type CreateAlarmCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateAlarm
+// CreateAlarm sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateAlarm(c *xgb.Conn, Id Alarm, ValueMask uint32, ValueList []uint32) CreateAlarmCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createAlarmRequest(c, Id, ValueMask, ValueList), cookie)
return CreateAlarmCookie{cookie}
}
+// CreateAlarmChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateAlarmCookie.Check()
func CreateAlarmChecked(c *xgb.Conn, Id Alarm, ValueMask uint32, ValueList []uint32) CreateAlarmCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createAlarmRequest(c, Id, ValueMask, ValueList), cookie)
return CreateAlarmCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateAlarmCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateAlarm
+// createAlarmRequest writes a CreateAlarm request to a byte slice.
func createAlarmRequest(c *xgb.Conn, Id Alarm, ValueMask uint32, ValueList []uint32) []byte {
size := xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -1288,30 +1315,35 @@ func createAlarmRequest(c *xgb.Conn, Id Alarm, ValueMask uint32, ValueList []uin
return buf
}
-// Request ChangeAlarm
-// size: xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// ChangeAlarmCookie is a cookie used only for ChangeAlarm requests.
type ChangeAlarmCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeAlarm
+// ChangeAlarm sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangeAlarm(c *xgb.Conn, Id Alarm, ValueMask uint32, ValueList []uint32) ChangeAlarmCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(changeAlarmRequest(c, Id, ValueMask, ValueList), cookie)
return ChangeAlarmCookie{cookie}
}
+// ChangeAlarmChecked sends a checked request.
+// If an error occurs, it can be retrieved using ChangeAlarmCookie.Check()
func ChangeAlarmChecked(c *xgb.Conn, Id Alarm, ValueMask uint32, ValueList []uint32) ChangeAlarmCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(changeAlarmRequest(c, Id, ValueMask, ValueList), cookie)
return ChangeAlarmCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeAlarmCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeAlarm
+// changeAlarmRequest writes a ChangeAlarm request to a byte slice.
func changeAlarmRequest(c *xgb.Conn, Id Alarm, ValueMask uint32, ValueList []uint32) []byte {
size := xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -1340,30 +1372,35 @@ func changeAlarmRequest(c *xgb.Conn, Id Alarm, ValueMask uint32, ValueList []uin
return buf
}
-// Request DestroyAlarm
-// size: 8
+// DestroyAlarmCookie is a cookie used only for DestroyAlarm requests.
type DestroyAlarmCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyAlarm
+// DestroyAlarm sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroyAlarm(c *xgb.Conn, Alarm Alarm) DestroyAlarmCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyAlarmRequest(c, Alarm), cookie)
return DestroyAlarmCookie{cookie}
}
+// DestroyAlarmChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyAlarmCookie.Check()
func DestroyAlarmChecked(c *xgb.Conn, Alarm Alarm) DestroyAlarmCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyAlarmRequest(c, Alarm), cookie)
return DestroyAlarmCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroyAlarmCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroyAlarm
+// destroyAlarmRequest writes a DestroyAlarm request to a byte slice.
func destroyAlarmRequest(c *xgb.Conn, Alarm Alarm) []byte {
size := 8
b := 0
@@ -1384,29 +1421,31 @@ func destroyAlarmRequest(c *xgb.Conn, Alarm Alarm) []byte {
return buf
}
-// Request QueryAlarm
-// size: 8
+// QueryAlarmCookie is a cookie used only for QueryAlarm requests.
type QueryAlarmCookie struct {
*xgb.Cookie
}
+// QueryAlarm sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryAlarmCookie.Reply()
func QueryAlarm(c *xgb.Conn, Alarm Alarm) QueryAlarmCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryAlarmRequest(c, Alarm), cookie)
return QueryAlarmCookie{cookie}
}
+// QueryAlarmUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryAlarmUnchecked(c *xgb.Conn, Alarm Alarm) QueryAlarmCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryAlarmRequest(c, Alarm), cookie)
return QueryAlarmCookie{cookie}
}
-// Request reply for QueryAlarm
-// size: 40
+// QueryAlarmReply represents the data returned from a QueryAlarm request.
type QueryAlarmReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Trigger Trigger
Delta Int64
@@ -1415,7 +1454,7 @@ type QueryAlarmReply struct {
// padding: 2 bytes
}
-// Waits and reads reply data from request QueryAlarm
+// Reply blocks and returns the reply data for a QueryAlarm request.
func (cook QueryAlarmCookie) Reply() (*QueryAlarmReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1427,7 +1466,7 @@ func (cook QueryAlarmCookie) Reply() (*QueryAlarmReply, error) {
return queryAlarmReply(buf), nil
}
-// Read reply into structure from buffer for QueryAlarm
+// queryAlarmReply reads a byte slice into a QueryAlarmReply value.
func queryAlarmReply(buf []byte) *QueryAlarmReply {
v := new(QueryAlarmReply)
b := 1 // skip reply determinant
@@ -1462,6 +1501,7 @@ func queryAlarmReply(buf []byte) *QueryAlarmReply {
}
// Write request to wire for QueryAlarm
+// queryAlarmRequest writes a QueryAlarm request to a byte slice.
func queryAlarmRequest(c *xgb.Conn, Alarm Alarm) []byte {
size := 8
b := 0
@@ -1482,30 +1522,35 @@ func queryAlarmRequest(c *xgb.Conn, Alarm Alarm) []byte {
return buf
}
-// Request SetPriority
-// size: 12
+// SetPriorityCookie is a cookie used only for SetPriority requests.
type SetPriorityCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetPriority
+// SetPriority sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetPriority(c *xgb.Conn, Id uint32, Priority int32) SetPriorityCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setPriorityRequest(c, Id, Priority), cookie)
return SetPriorityCookie{cookie}
}
+// SetPriorityChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetPriorityCookie.Check()
func SetPriorityChecked(c *xgb.Conn, Id uint32, Priority int32) SetPriorityCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setPriorityRequest(c, Id, Priority), cookie)
return SetPriorityCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetPriorityCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetPriority
+// setPriorityRequest writes a SetPriority request to a byte slice.
func setPriorityRequest(c *xgb.Conn, Id uint32, Priority int32) []byte {
size := 12
b := 0
@@ -1529,34 +1574,36 @@ func setPriorityRequest(c *xgb.Conn, Id uint32, Priority int32) []byte {
return buf
}
-// Request GetPriority
-// size: 8
+// GetPriorityCookie is a cookie used only for GetPriority requests.
type GetPriorityCookie struct {
*xgb.Cookie
}
+// GetPriority sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetPriorityCookie.Reply()
func GetPriority(c *xgb.Conn, Id uint32) GetPriorityCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getPriorityRequest(c, Id), cookie)
return GetPriorityCookie{cookie}
}
+// GetPriorityUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPriorityUnchecked(c *xgb.Conn, Id uint32) GetPriorityCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPriorityRequest(c, Id), cookie)
return GetPriorityCookie{cookie}
}
-// Request reply for GetPriority
-// size: 12
+// GetPriorityReply represents the data returned from a GetPriority request.
type GetPriorityReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Priority int32
}
-// Waits and reads reply data from request GetPriority
+// Reply blocks and returns the reply data for a GetPriority request.
func (cook GetPriorityCookie) Reply() (*GetPriorityReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1568,7 +1615,7 @@ func (cook GetPriorityCookie) Reply() (*GetPriorityReply, error) {
return getPriorityReply(buf), nil
}
-// Read reply into structure from buffer for GetPriority
+// getPriorityReply reads a byte slice into a GetPriorityReply value.
func getPriorityReply(buf []byte) *GetPriorityReply {
v := new(GetPriorityReply)
b := 1 // skip reply determinant
@@ -1588,6 +1635,7 @@ func getPriorityReply(buf []byte) *GetPriorityReply {
}
// Write request to wire for GetPriority
+// getPriorityRequest writes a GetPriority request to a byte slice.
func getPriorityRequest(c *xgb.Conn, Id uint32) []byte {
size := 8
b := 0
@@ -1608,30 +1656,35 @@ func getPriorityRequest(c *xgb.Conn, Id uint32) []byte {
return buf
}
-// Request CreateFence
-// size: 16
+// CreateFenceCookie is a cookie used only for CreateFence requests.
type CreateFenceCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateFence
+// CreateFence sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateFence(c *xgb.Conn, Drawable xproto.Drawable, Fence Fence, InitiallyTriggered bool) CreateFenceCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createFenceRequest(c, Drawable, Fence, InitiallyTriggered), cookie)
return CreateFenceCookie{cookie}
}
+// CreateFenceChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateFenceCookie.Check()
func CreateFenceChecked(c *xgb.Conn, Drawable xproto.Drawable, Fence Fence, InitiallyTriggered bool) CreateFenceCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createFenceRequest(c, Drawable, Fence, InitiallyTriggered), cookie)
return CreateFenceCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateFenceCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateFence
+// createFenceRequest writes a CreateFence request to a byte slice.
func createFenceRequest(c *xgb.Conn, Drawable xproto.Drawable, Fence Fence, InitiallyTriggered bool) []byte {
size := 16
b := 0
@@ -1662,30 +1715,35 @@ func createFenceRequest(c *xgb.Conn, Drawable xproto.Drawable, Fence Fence, Init
return buf
}
-// Request TriggerFence
-// size: 8
+// TriggerFenceCookie is a cookie used only for TriggerFence requests.
type TriggerFenceCookie struct {
*xgb.Cookie
}
-// Write request to wire for TriggerFence
+// TriggerFence sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func TriggerFence(c *xgb.Conn, Fence Fence) TriggerFenceCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(triggerFenceRequest(c, Fence), cookie)
return TriggerFenceCookie{cookie}
}
+// TriggerFenceChecked sends a checked request.
+// If an error occurs, it can be retrieved using TriggerFenceCookie.Check()
func TriggerFenceChecked(c *xgb.Conn, Fence Fence) TriggerFenceCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(triggerFenceRequest(c, Fence), cookie)
return TriggerFenceCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook TriggerFenceCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for TriggerFence
+// triggerFenceRequest writes a TriggerFence request to a byte slice.
func triggerFenceRequest(c *xgb.Conn, Fence Fence) []byte {
size := 8
b := 0
@@ -1706,30 +1764,35 @@ func triggerFenceRequest(c *xgb.Conn, Fence Fence) []byte {
return buf
}
-// Request ResetFence
-// size: 8
+// ResetFenceCookie is a cookie used only for ResetFence requests.
type ResetFenceCookie struct {
*xgb.Cookie
}
-// Write request to wire for ResetFence
+// ResetFence sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ResetFence(c *xgb.Conn, Fence Fence) ResetFenceCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(resetFenceRequest(c, Fence), cookie)
return ResetFenceCookie{cookie}
}
+// ResetFenceChecked sends a checked request.
+// If an error occurs, it can be retrieved using ResetFenceCookie.Check()
func ResetFenceChecked(c *xgb.Conn, Fence Fence) ResetFenceCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(resetFenceRequest(c, Fence), cookie)
return ResetFenceCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ResetFenceCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ResetFence
+// resetFenceRequest writes a ResetFence request to a byte slice.
func resetFenceRequest(c *xgb.Conn, Fence Fence) []byte {
size := 8
b := 0
@@ -1750,30 +1813,35 @@ func resetFenceRequest(c *xgb.Conn, Fence Fence) []byte {
return buf
}
-// Request DestroyFence
-// size: 8
+// DestroyFenceCookie is a cookie used only for DestroyFence requests.
type DestroyFenceCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyFence
+// DestroyFence sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroyFence(c *xgb.Conn, Fence Fence) DestroyFenceCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyFenceRequest(c, Fence), cookie)
return DestroyFenceCookie{cookie}
}
+// DestroyFenceChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyFenceCookie.Check()
func DestroyFenceChecked(c *xgb.Conn, Fence Fence) DestroyFenceCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyFenceRequest(c, Fence), cookie)
return DestroyFenceCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroyFenceCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroyFence
+// destroyFenceRequest writes a DestroyFence request to a byte slice.
func destroyFenceRequest(c *xgb.Conn, Fence Fence) []byte {
size := 8
b := 0
@@ -1794,35 +1862,37 @@ func destroyFenceRequest(c *xgb.Conn, Fence Fence) []byte {
return buf
}
-// Request QueryFence
-// size: 8
+// QueryFenceCookie is a cookie used only for QueryFence requests.
type QueryFenceCookie struct {
*xgb.Cookie
}
+// QueryFence sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryFenceCookie.Reply()
func QueryFence(c *xgb.Conn, Fence Fence) QueryFenceCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryFenceRequest(c, Fence), cookie)
return QueryFenceCookie{cookie}
}
+// QueryFenceUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryFenceUnchecked(c *xgb.Conn, Fence Fence) QueryFenceCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryFenceRequest(c, Fence), cookie)
return QueryFenceCookie{cookie}
}
-// Request reply for QueryFence
-// size: 32
+// QueryFenceReply represents the data returned from a QueryFence request.
type QueryFenceReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Triggered bool
// padding: 23 bytes
}
-// Waits and reads reply data from request QueryFence
+// Reply blocks and returns the reply data for a QueryFence request.
func (cook QueryFenceCookie) Reply() (*QueryFenceReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1834,7 +1904,7 @@ func (cook QueryFenceCookie) Reply() (*QueryFenceReply, error) {
return queryFenceReply(buf), nil
}
-// Read reply into structure from buffer for QueryFence
+// queryFenceReply reads a byte slice into a QueryFenceReply value.
func queryFenceReply(buf []byte) *QueryFenceReply {
v := new(QueryFenceReply)
b := 1 // skip reply determinant
@@ -1860,6 +1930,7 @@ func queryFenceReply(buf []byte) *QueryFenceReply {
}
// Write request to wire for QueryFence
+// queryFenceRequest writes a QueryFence request to a byte slice.
func queryFenceRequest(c *xgb.Conn, Fence Fence) []byte {
size := 8
b := 0
@@ -1880,30 +1951,35 @@ func queryFenceRequest(c *xgb.Conn, Fence Fence) []byte {
return buf
}
-// Request AwaitFence
-// size: xgb.Pad((4 + xgb.Pad((len(FenceList) * 4))))
+// AwaitFenceCookie is a cookie used only for AwaitFence requests.
type AwaitFenceCookie struct {
*xgb.Cookie
}
-// Write request to wire for AwaitFence
+// AwaitFence sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func AwaitFence(c *xgb.Conn, FenceList []Fence) AwaitFenceCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(awaitFenceRequest(c, FenceList), cookie)
return AwaitFenceCookie{cookie}
}
+// AwaitFenceChecked sends a checked request.
+// If an error occurs, it can be retrieved using AwaitFenceCookie.Check()
func AwaitFenceChecked(c *xgb.Conn, FenceList []Fence) AwaitFenceCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(awaitFenceRequest(c, FenceList), cookie)
return AwaitFenceCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook AwaitFenceCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for AwaitFence
+// awaitFenceRequest writes a AwaitFence request to a byte slice.
func awaitFenceRequest(c *xgb.Conn, FenceList []Fence) []byte {
size := xgb.Pad((4 + xgb.Pad((len(FenceList) * 4))))
b := 0
diff --git a/nexgb/xcmisc/xcmisc.go b/nexgb/xcmisc/xcmisc.go
index d4f7b0d..5157119 100644
--- a/nexgb/xcmisc/xcmisc.go
+++ b/nexgb/xcmisc/xcmisc.go
@@ -2,7 +2,7 @@
package xcmisc
/*
- This file was generated by xc_misc.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by xc_misc.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -64,35 +64,37 @@ func init() {
// Skipping definition for base type 'Bool'
-// Request GetVersion
-// size: 8
+// GetVersionCookie is a cookie used only for GetVersion requests.
type GetVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return GetVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return GetVersionCookie{cookie}
}
-// Request reply for GetVersion
-// size: 12
+// GetVersionReply represents the data returned from a GetVersion request.
type GetVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ServerMajorVersion uint16
ServerMinorVersion uint16
}
-// Waits and reads reply data from request GetVersion
+// Reply blocks and returns the reply data for a GetVersion request.
func (cook GetVersionCookie) Reply() (*GetVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -104,7 +106,7 @@ func (cook GetVersionCookie) Reply() (*GetVersionReply, error) {
return getVersionReply(buf), nil
}
-// Read reply into structure from buffer for GetVersion
+// getVersionReply reads a byte slice into a GetVersionReply value.
func getVersionReply(buf []byte) *GetVersionReply {
v := new(GetVersionReply)
b := 1 // skip reply determinant
@@ -127,6 +129,7 @@ func getVersionReply(buf []byte) *GetVersionReply {
}
// 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 {
size := 8
b := 0
@@ -150,35 +153,37 @@ func getVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersio
return buf
}
-// Request GetXIDRange
-// size: 4
+// GetXIDRangeCookie is a cookie used only for GetXIDRange requests.
type GetXIDRangeCookie struct {
*xgb.Cookie
}
+// GetXIDRange sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetXIDRangeCookie.Reply()
func GetXIDRange(c *xgb.Conn) GetXIDRangeCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getXIDRangeRequest(c), cookie)
return GetXIDRangeCookie{cookie}
}
+// GetXIDRangeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetXIDRangeUnchecked(c *xgb.Conn) GetXIDRangeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getXIDRangeRequest(c), cookie)
return GetXIDRangeCookie{cookie}
}
-// Request reply for GetXIDRange
-// size: 16
+// GetXIDRangeReply represents the data returned from a GetXIDRange request.
type GetXIDRangeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
StartId uint32
Count uint32
}
-// Waits and reads reply data from request GetXIDRange
+// Reply blocks and returns the reply data for a GetXIDRange request.
func (cook GetXIDRangeCookie) Reply() (*GetXIDRangeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -190,7 +195,7 @@ func (cook GetXIDRangeCookie) Reply() (*GetXIDRangeReply, error) {
return getXIDRangeReply(buf), nil
}
-// Read reply into structure from buffer for GetXIDRange
+// getXIDRangeReply reads a byte slice into a GetXIDRangeReply value.
func getXIDRangeReply(buf []byte) *GetXIDRangeReply {
v := new(GetXIDRangeReply)
b := 1 // skip reply determinant
@@ -213,6 +218,7 @@ func getXIDRangeReply(buf []byte) *GetXIDRangeReply {
}
// Write request to wire for GetXIDRange
+// getXIDRangeRequest writes a GetXIDRange request to a byte slice.
func getXIDRangeRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -230,36 +236,38 @@ func getXIDRangeRequest(c *xgb.Conn) []byte {
return buf
}
-// Request GetXIDList
-// size: 8
+// GetXIDListCookie is a cookie used only for GetXIDList requests.
type GetXIDListCookie struct {
*xgb.Cookie
}
+// GetXIDList sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetXIDListCookie.Reply()
func GetXIDList(c *xgb.Conn, Count uint32) GetXIDListCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getXIDListRequest(c, Count), cookie)
return GetXIDListCookie{cookie}
}
+// GetXIDListUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetXIDListUnchecked(c *xgb.Conn, Count uint32) GetXIDListCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getXIDListRequest(c, Count), cookie)
return GetXIDListCookie{cookie}
}
-// Request reply for GetXIDList
-// size: (32 + xgb.Pad((int(IdsLen) * 4)))
+// GetXIDListReply represents the data returned from a GetXIDList request.
type GetXIDListReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
IdsLen uint32
// padding: 20 bytes
Ids []uint32 // size: xgb.Pad((int(IdsLen) * 4))
}
-// Waits and reads reply data from request GetXIDList
+// Reply blocks and returns the reply data for a GetXIDList request.
func (cook GetXIDListCookie) Reply() (*GetXIDListReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -271,7 +279,7 @@ func (cook GetXIDListCookie) Reply() (*GetXIDListReply, error) {
return getXIDListReply(buf), nil
}
-// Read reply into structure from buffer for GetXIDList
+// getXIDListReply reads a byte slice into a GetXIDListReply value.
func getXIDListReply(buf []byte) *GetXIDListReply {
v := new(GetXIDListReply)
b := 1 // skip reply determinant
@@ -300,6 +308,7 @@ func getXIDListReply(buf []byte) *GetXIDListReply {
}
// Write request to wire for GetXIDList
+// getXIDListRequest writes a GetXIDList request to a byte slice.
func getXIDListRequest(c *xgb.Conn, Count uint32) []byte {
size := 8
b := 0
diff --git a/nexgb/xevie/xevie.go b/nexgb/xevie/xevie.go
index 47d9146..3076680 100644
--- a/nexgb/xevie/xevie.go
+++ b/nexgb/xevie/xevie.go
@@ -2,7 +2,7 @@
package xevie
/*
- This file was generated by xevie.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by xevie.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,16 +40,6 @@ func init() {
xgb.NewExtErrorFuncs["XEVIE"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Card8'
-
-// Skipping definition for base type 'Int16'
-
-// Skipping definition for base type 'Int32'
-
-// Skipping definition for base type 'Void'
-
-// Skipping definition for base type 'Byte'
-
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
@@ -64,18 +54,26 @@ func init() {
// Skipping definition for base type 'Float'
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Int16'
+
+// Skipping definition for base type 'Int32'
+
+// Skipping definition for base type 'Void'
+
+// Skipping definition for base type 'Byte'
+
const (
DatatypeUnmodified = 0
DatatypeModified = 1
)
-// 'Event' struct definition
-// Size: 32
type Event struct {
// padding: 32 bytes
}
-// Struct read Event
+// EventRead reads a byte slice into a Event value.
func EventRead(buf []byte, v *Event) int {
b := 0
@@ -84,7 +82,7 @@ func EventRead(buf []byte, v *Event) int {
return b
}
-// Struct list read Event
+// EventReadList reads a byte slice into a list of Event values.
func EventReadList(buf []byte, dest []Event) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -94,7 +92,7 @@ func EventReadList(buf []byte, dest []Event) int {
return xgb.Pad(b)
}
-// Struct write Event
+// Bytes writes a Event value to a byte slice.
func (v Event) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -104,7 +102,7 @@ func (v Event) Bytes() []byte {
return buf
}
-// Write struct list Event
+// EventListBytes writes a list of %s(MISSING) values to a byte slice.
func EventListBytes(buf []byte, list []Event) int {
b := 0
var structBytes []byte
@@ -116,36 +114,38 @@ func EventListBytes(buf []byte, list []Event) int {
return b
}
-// Request QueryVersion
-// size: 8
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 32
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ServerMajorVersion uint16
ServerMinorVersion uint16
// padding: 20 bytes
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -157,7 +157,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -182,6 +182,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 8
b := 0
@@ -205,34 +206,36 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVers
return buf
}
-// Request Start
-// size: 8
+// StartCookie is a cookie used only for Start requests.
type StartCookie struct {
*xgb.Cookie
}
+// Start sends a checked request.
+// If an error occurs, it will be returned with the reply by calling StartCookie.Reply()
func Start(c *xgb.Conn, Screen uint32) StartCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(startRequest(c, Screen), cookie)
return StartCookie{cookie}
}
+// StartUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func StartUnchecked(c *xgb.Conn, Screen uint32) StartCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(startRequest(c, Screen), cookie)
return StartCookie{cookie}
}
-// Request reply for Start
-// size: 32
+// StartReply represents the data returned from a Start request.
type StartReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
}
-// Waits and reads reply data from request Start
+// Reply blocks and returns the reply data for a Start request.
func (cook StartCookie) Reply() (*StartReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -244,7 +247,7 @@ func (cook StartCookie) Reply() (*StartReply, error) {
return startReply(buf), nil
}
-// Read reply into structure from buffer for Start
+// startReply reads a byte slice into a StartReply value.
func startReply(buf []byte) *StartReply {
v := new(StartReply)
b := 1 // skip reply determinant
@@ -263,6 +266,7 @@ func startReply(buf []byte) *StartReply {
}
// Write request to wire for Start
+// startRequest writes a Start request to a byte slice.
func startRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
@@ -283,34 +287,36 @@ func startRequest(c *xgb.Conn, Screen uint32) []byte {
return buf
}
-// Request End
-// size: 8
+// EndCookie is a cookie used only for End requests.
type EndCookie struct {
*xgb.Cookie
}
+// End sends a checked request.
+// If an error occurs, it will be returned with the reply by calling EndCookie.Reply()
func End(c *xgb.Conn, Cmap uint32) EndCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(endRequest(c, Cmap), cookie)
return EndCookie{cookie}
}
+// EndUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func EndUnchecked(c *xgb.Conn, Cmap uint32) EndCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(endRequest(c, Cmap), cookie)
return EndCookie{cookie}
}
-// Request reply for End
-// size: 32
+// EndReply represents the data returned from a End request.
type EndReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
}
-// Waits and reads reply data from request End
+// Reply blocks and returns the reply data for a End request.
func (cook EndCookie) Reply() (*EndReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -322,7 +328,7 @@ func (cook EndCookie) Reply() (*EndReply, error) {
return endReply(buf), nil
}
-// Read reply into structure from buffer for End
+// endReply reads a byte slice into a EndReply value.
func endReply(buf []byte) *EndReply {
v := new(EndReply)
b := 1 // skip reply determinant
@@ -341,6 +347,7 @@ func endReply(buf []byte) *EndReply {
}
// Write request to wire for End
+// endRequest writes a End request to a byte slice.
func endRequest(c *xgb.Conn, Cmap uint32) []byte {
size := 8
b := 0
@@ -361,34 +368,36 @@ func endRequest(c *xgb.Conn, Cmap uint32) []byte {
return buf
}
-// Request Send
-// size: 104
+// SendCookie is a cookie used only for Send requests.
type SendCookie struct {
*xgb.Cookie
}
+// Send sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(sendRequest(c, Event, DataType), cookie)
return SendCookie{cookie}
}
+// SendUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SendUnchecked(c *xgb.Conn, Event Event, DataType uint32) SendCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(sendRequest(c, Event, DataType), cookie)
return SendCookie{cookie}
}
-// Request reply for Send
-// size: 32
+// SendReply represents the data returned from a Send request.
type SendReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
}
-// Waits and reads reply data from request Send
+// Reply blocks and returns the reply data for a Send request.
func (cook SendCookie) Reply() (*SendReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -400,7 +409,7 @@ func (cook SendCookie) Reply() (*SendReply, error) {
return sendReply(buf), nil
}
-// Read reply into structure from buffer for Send
+// sendReply reads a byte slice into a SendReply value.
func sendReply(buf []byte) *SendReply {
v := new(SendReply)
b := 1 // skip reply determinant
@@ -419,6 +428,7 @@ func sendReply(buf []byte) *SendReply {
}
// Write request to wire for Send
+// sendRequest writes a Send request to a byte slice.
func sendRequest(c *xgb.Conn, Event Event, DataType uint32) []byte {
size := 104
b := 0
@@ -447,34 +457,36 @@ func sendRequest(c *xgb.Conn, Event Event, DataType uint32) []byte {
return buf
}
-// Request SelectInput
-// size: 8
+// SelectInputCookie is a cookie used only for SelectInput requests.
type SelectInputCookie struct {
*xgb.Cookie
}
+// SelectInput sends a checked request.
+// If an error occurs, it will be returned with the reply by calling SelectInputCookie.Reply()
func SelectInput(c *xgb.Conn, EventMask uint32) SelectInputCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(selectInputRequest(c, EventMask), cookie)
return SelectInputCookie{cookie}
}
+// SelectInputUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectInputUnchecked(c *xgb.Conn, EventMask uint32) SelectInputCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(selectInputRequest(c, EventMask), cookie)
return SelectInputCookie{cookie}
}
-// Request reply for SelectInput
-// size: 32
+// SelectInputReply represents the data returned from a SelectInput request.
type SelectInputReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
}
-// Waits and reads reply data from request SelectInput
+// Reply blocks and returns the reply data for a SelectInput request.
func (cook SelectInputCookie) Reply() (*SelectInputReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -486,7 +498,7 @@ func (cook SelectInputCookie) Reply() (*SelectInputReply, error) {
return selectInputReply(buf), nil
}
-// Read reply into structure from buffer for SelectInput
+// selectInputReply reads a byte slice into a SelectInputReply value.
func selectInputReply(buf []byte) *SelectInputReply {
v := new(SelectInputReply)
b := 1 // skip reply determinant
@@ -505,6 +517,7 @@ func selectInputReply(buf []byte) *SelectInputReply {
}
// Write request to wire for SelectInput
+// selectInputRequest writes a SelectInput request to a byte slice.
func selectInputRequest(c *xgb.Conn, EventMask uint32) []byte {
size := 8
b := 0
diff --git a/nexgb/xf86dri/xf86dri.go b/nexgb/xf86dri/xf86dri.go
index ac87c0a..cd3ff35 100644
--- a/nexgb/xf86dri/xf86dri.go
+++ b/nexgb/xf86dri/xf86dri.go
@@ -2,7 +2,7 @@
package xf86dri
/*
- This file was generated by xf86dri.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by xf86dri.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,18 +40,6 @@ func init() {
xgb.NewExtErrorFuncs["XFree86-DRI"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Int8'
-
-// Skipping definition for base type 'Card16'
-
-// Skipping definition for base type 'Char'
-
-// Skipping definition for base type 'Card32'
-
-// Skipping definition for base type 'Double'
-
-// Skipping definition for base type 'Bool'
-
// Skipping definition for base type 'Float'
// Skipping definition for base type 'Card8'
@@ -64,8 +52,18 @@ func init() {
// Skipping definition for base type 'Byte'
-// 'DrmClipRect' struct definition
-// Size: 8
+// Skipping definition for base type 'Int8'
+
+// Skipping definition for base type 'Card16'
+
+// Skipping definition for base type 'Char'
+
+// Skipping definition for base type 'Card32'
+
+// Skipping definition for base type 'Double'
+
+// Skipping definition for base type 'Bool'
+
type DrmClipRect struct {
X1 int16
Y1 int16
@@ -73,7 +71,7 @@ type DrmClipRect struct {
X3 int16
}
-// Struct read DrmClipRect
+// DrmClipRectRead reads a byte slice into a DrmClipRect value.
func DrmClipRectRead(buf []byte, v *DrmClipRect) int {
b := 0
@@ -92,7 +90,7 @@ func DrmClipRectRead(buf []byte, v *DrmClipRect) int {
return b
}
-// Struct list read DrmClipRect
+// DrmClipRectReadList reads a byte slice into a list of DrmClipRect values.
func DrmClipRectReadList(buf []byte, dest []DrmClipRect) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -102,7 +100,7 @@ func DrmClipRectReadList(buf []byte, dest []DrmClipRect) int {
return xgb.Pad(b)
}
-// Struct write DrmClipRect
+// Bytes writes a DrmClipRect value to a byte slice.
func (v DrmClipRect) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -122,7 +120,7 @@ func (v DrmClipRect) Bytes() []byte {
return buf
}
-// Write struct list DrmClipRect
+// DrmClipRectListBytes writes a list of %s(MISSING) values to a byte slice.
func DrmClipRectListBytes(buf []byte, list []DrmClipRect) int {
b := 0
var structBytes []byte
@@ -134,36 +132,38 @@ func DrmClipRectListBytes(buf []byte, list []DrmClipRect) int {
return b
}
-// Request QueryVersion
-// size: 4
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// QueryVersion sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c), cookie)
return QueryVersionCookie{cookie}
}
+// QueryVersionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 16
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
DriMajorVersion uint16
DriMinorVersion uint16
DriMinorPatch uint32
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -175,7 +175,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -201,6 +201,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// Write request to wire for QueryVersion
+// queryVersionRequest writes a QueryVersion request to a byte slice.
func queryVersionRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -218,34 +219,36 @@ func queryVersionRequest(c *xgb.Conn) []byte {
return buf
}
-// Request QueryDirectRenderingCapable
-// size: 8
+// QueryDirectRenderingCapableCookie is a cookie used only for QueryDirectRenderingCapable requests.
type QueryDirectRenderingCapableCookie struct {
*xgb.Cookie
}
+// QueryDirectRenderingCapable sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryDirectRenderingCapableCookie.Reply()
func QueryDirectRenderingCapable(c *xgb.Conn, Screen uint32) QueryDirectRenderingCapableCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryDirectRenderingCapableRequest(c, Screen), cookie)
return QueryDirectRenderingCapableCookie{cookie}
}
+// QueryDirectRenderingCapableUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryDirectRenderingCapableUnchecked(c *xgb.Conn, Screen uint32) QueryDirectRenderingCapableCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryDirectRenderingCapableRequest(c, Screen), cookie)
return QueryDirectRenderingCapableCookie{cookie}
}
-// Request reply for QueryDirectRenderingCapable
-// size: 9
+// QueryDirectRenderingCapableReply represents the data returned from a QueryDirectRenderingCapable request.
type QueryDirectRenderingCapableReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
IsCapable bool
}
-// Waits and reads reply data from request QueryDirectRenderingCapable
+// Reply blocks and returns the reply data for a QueryDirectRenderingCapable request.
func (cook QueryDirectRenderingCapableCookie) Reply() (*QueryDirectRenderingCapableReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -257,7 +260,7 @@ func (cook QueryDirectRenderingCapableCookie) Reply() (*QueryDirectRenderingCapa
return queryDirectRenderingCapableReply(buf), nil
}
-// Read reply into structure from buffer for QueryDirectRenderingCapable
+// queryDirectRenderingCapableReply reads a byte slice into a QueryDirectRenderingCapableReply value.
func queryDirectRenderingCapableReply(buf []byte) *QueryDirectRenderingCapableReply {
v := new(QueryDirectRenderingCapableReply)
b := 1 // skip reply determinant
@@ -281,6 +284,7 @@ func queryDirectRenderingCapableReply(buf []byte) *QueryDirectRenderingCapableRe
}
// Write request to wire for QueryDirectRenderingCapable
+// queryDirectRenderingCapableRequest writes a QueryDirectRenderingCapable request to a byte slice.
func queryDirectRenderingCapableRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
@@ -301,29 +305,31 @@ func queryDirectRenderingCapableRequest(c *xgb.Conn, Screen uint32) []byte {
return buf
}
-// Request OpenConnection
-// size: 8
+// OpenConnectionCookie is a cookie used only for OpenConnection requests.
type OpenConnectionCookie struct {
*xgb.Cookie
}
+// OpenConnection sends a checked request.
+// If an error occurs, it will be returned with the reply by calling OpenConnectionCookie.Reply()
func OpenConnection(c *xgb.Conn, Screen uint32) OpenConnectionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(openConnectionRequest(c, Screen), cookie)
return OpenConnectionCookie{cookie}
}
+// OpenConnectionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func OpenConnectionUnchecked(c *xgb.Conn, Screen uint32) OpenConnectionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(openConnectionRequest(c, Screen), cookie)
return OpenConnectionCookie{cookie}
}
-// Request reply for OpenConnection
-// size: (32 + xgb.Pad((int(BusIdLen) * 1)))
+// OpenConnectionReply represents the data returned from a OpenConnection request.
type OpenConnectionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
SareaHandleLow uint32
SareaHandleHigh uint32
@@ -332,7 +338,7 @@ type OpenConnectionReply struct {
BusId string // size: xgb.Pad((int(BusIdLen) * 1))
}
-// Waits and reads reply data from request OpenConnection
+// Reply blocks and returns the reply data for a OpenConnection request.
func (cook OpenConnectionCookie) Reply() (*OpenConnectionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -344,7 +350,7 @@ func (cook OpenConnectionCookie) Reply() (*OpenConnectionReply, error) {
return openConnectionReply(buf), nil
}
-// Read reply into structure from buffer for OpenConnection
+// openConnectionReply reads a byte slice into a OpenConnectionReply value.
func openConnectionReply(buf []byte) *OpenConnectionReply {
v := new(OpenConnectionReply)
b := 1 // skip reply determinant
@@ -379,6 +385,7 @@ func openConnectionReply(buf []byte) *OpenConnectionReply {
}
// Write request to wire for OpenConnection
+// openConnectionRequest writes a OpenConnection request to a byte slice.
func openConnectionRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
@@ -399,30 +406,35 @@ func openConnectionRequest(c *xgb.Conn, Screen uint32) []byte {
return buf
}
-// Request CloseConnection
-// size: 8
+// CloseConnectionCookie is a cookie used only for CloseConnection requests.
type CloseConnectionCookie struct {
*xgb.Cookie
}
-// Write request to wire for CloseConnection
+// CloseConnection sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CloseConnection(c *xgb.Conn, Screen uint32) CloseConnectionCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(closeConnectionRequest(c, Screen), cookie)
return CloseConnectionCookie{cookie}
}
+// CloseConnectionChecked sends a checked request.
+// If an error occurs, it can be retrieved using CloseConnectionCookie.Check()
func CloseConnectionChecked(c *xgb.Conn, Screen uint32) CloseConnectionCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(closeConnectionRequest(c, Screen), cookie)
return CloseConnectionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CloseConnectionCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CloseConnection
+// closeConnectionRequest writes a CloseConnection request to a byte slice.
func closeConnectionRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
@@ -443,29 +455,31 @@ func closeConnectionRequest(c *xgb.Conn, Screen uint32) []byte {
return buf
}
-// Request GetClientDriverName
-// size: 8
+// GetClientDriverNameCookie is a cookie used only for GetClientDriverName requests.
type GetClientDriverNameCookie struct {
*xgb.Cookie
}
+// GetClientDriverName sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetClientDriverNameCookie.Reply()
func GetClientDriverName(c *xgb.Conn, Screen uint32) GetClientDriverNameCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getClientDriverNameRequest(c, Screen), cookie)
return GetClientDriverNameCookie{cookie}
}
+// GetClientDriverNameUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetClientDriverNameUnchecked(c *xgb.Conn, Screen uint32) GetClientDriverNameCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getClientDriverNameRequest(c, Screen), cookie)
return GetClientDriverNameCookie{cookie}
}
-// Request reply for GetClientDriverName
-// size: (32 + xgb.Pad((int(ClientDriverNameLen) * 1)))
+// GetClientDriverNameReply represents the data returned from a GetClientDriverName request.
type GetClientDriverNameReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ClientDriverMajorVersion uint32
ClientDriverMinorVersion uint32
@@ -475,7 +489,7 @@ type GetClientDriverNameReply struct {
ClientDriverName string // size: xgb.Pad((int(ClientDriverNameLen) * 1))
}
-// Waits and reads reply data from request GetClientDriverName
+// Reply blocks and returns the reply data for a GetClientDriverName request.
func (cook GetClientDriverNameCookie) Reply() (*GetClientDriverNameReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -487,7 +501,7 @@ func (cook GetClientDriverNameCookie) Reply() (*GetClientDriverNameReply, error)
return getClientDriverNameReply(buf), nil
}
-// Read reply into structure from buffer for GetClientDriverName
+// getClientDriverNameReply reads a byte slice into a GetClientDriverNameReply value.
func getClientDriverNameReply(buf []byte) *GetClientDriverNameReply {
v := new(GetClientDriverNameReply)
b := 1 // skip reply determinant
@@ -525,6 +539,7 @@ func getClientDriverNameReply(buf []byte) *GetClientDriverNameReply {
}
// Write request to wire for GetClientDriverName
+// getClientDriverNameRequest writes a GetClientDriverName request to a byte slice.
func getClientDriverNameRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
@@ -545,34 +560,36 @@ func getClientDriverNameRequest(c *xgb.Conn, Screen uint32) []byte {
return buf
}
-// Request CreateContext
-// size: 16
+// CreateContextCookie is a cookie used only for CreateContext requests.
type CreateContextCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(createContextRequest(c, Screen, Visual, Context), cookie)
return CreateContextCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(createContextRequest(c, Screen, Visual, Context), cookie)
return CreateContextCookie{cookie}
}
-// Request reply for CreateContext
-// size: 12
+// CreateContextReply represents the data returned from a CreateContext request.
type CreateContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
HwContext uint32
}
-// Waits and reads reply data from request CreateContext
+// Reply blocks and returns the reply data for a CreateContext request.
func (cook CreateContextCookie) Reply() (*CreateContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -584,7 +601,7 @@ func (cook CreateContextCookie) Reply() (*CreateContextReply, error) {
return createContextReply(buf), nil
}
-// Read reply into structure from buffer for CreateContext
+// createContextReply reads a byte slice into a CreateContextReply value.
func createContextReply(buf []byte) *CreateContextReply {
v := new(CreateContextReply)
b := 1 // skip reply determinant
@@ -604,6 +621,7 @@ func createContextReply(buf []byte) *CreateContextReply {
}
// 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 {
size := 16
b := 0
@@ -630,30 +648,35 @@ func createContextRequest(c *xgb.Conn, Screen uint32, Visual uint32, Context uin
return buf
}
-// Request DestroyContext
-// size: 12
+// DestroyContextCookie is a cookie used only for DestroyContext requests.
type DestroyContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyContext
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyContextRequest(c, Screen, Context), cookie)
return DestroyContextCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyContextRequest(c, Screen, Context), cookie)
return DestroyContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -677,34 +700,36 @@ func destroyContextRequest(c *xgb.Conn, Screen uint32, Context uint32) []byte {
return buf
}
-// Request CreateDrawable
-// size: 12
+// CreateDrawableCookie is a cookie used only for CreateDrawable requests.
type CreateDrawableCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(createDrawableRequest(c, Screen, Drawable), cookie)
return CreateDrawableCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(createDrawableRequest(c, Screen, Drawable), cookie)
return CreateDrawableCookie{cookie}
}
-// Request reply for CreateDrawable
-// size: 12
+// CreateDrawableReply represents the data returned from a CreateDrawable request.
type CreateDrawableReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
HwDrawableHandle uint32
}
-// Waits and reads reply data from request CreateDrawable
+// Reply blocks and returns the reply data for a CreateDrawable request.
func (cook CreateDrawableCookie) Reply() (*CreateDrawableReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -716,7 +741,7 @@ func (cook CreateDrawableCookie) Reply() (*CreateDrawableReply, error) {
return createDrawableReply(buf), nil
}
-// Read reply into structure from buffer for CreateDrawable
+// createDrawableReply reads a byte slice into a CreateDrawableReply value.
func createDrawableReply(buf []byte) *CreateDrawableReply {
v := new(CreateDrawableReply)
b := 1 // skip reply determinant
@@ -736,6 +761,7 @@ func createDrawableReply(buf []byte) *CreateDrawableReply {
}
// 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 {
size := 12
b := 0
@@ -759,30 +785,35 @@ func createDrawableRequest(c *xgb.Conn, Screen uint32, Drawable uint32) []byte {
return buf
}
-// Request DestroyDrawable
-// size: 12
+// DestroyDrawableCookie is a cookie used only for DestroyDrawable requests.
type DestroyDrawableCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyDrawable
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyDrawableRequest(c, Screen, Drawable), cookie)
return DestroyDrawableCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyDrawableRequest(c, Screen, Drawable), cookie)
return DestroyDrawableCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -806,29 +837,31 @@ func destroyDrawableRequest(c *xgb.Conn, Screen uint32, Drawable uint32) []byte
return buf
}
-// Request GetDrawableInfo
-// size: 12
+// GetDrawableInfoCookie is a cookie used only for GetDrawableInfo requests.
type GetDrawableInfoCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getDrawableInfoRequest(c, Screen, Drawable), cookie)
return GetDrawableInfoCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getDrawableInfoRequest(c, Screen, Drawable), cookie)
return GetDrawableInfoCookie{cookie}
}
-// Request reply for GetDrawableInfo
-// size: ((36 + xgb.Pad((int(NumClipRects) * 8))) + xgb.Pad((int(NumBackClipRects) * 8)))
+// GetDrawableInfoReply represents the data returned from a GetDrawableInfo request.
type GetDrawableInfoReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
DrawableTableIndex uint32
DrawableTableStamp uint32
@@ -844,7 +877,7 @@ type GetDrawableInfoReply struct {
BackClipRects []DrmClipRect // size: xgb.Pad((int(NumBackClipRects) * 8))
}
-// Waits and reads reply data from request GetDrawableInfo
+// Reply blocks and returns the reply data for a GetDrawableInfo request.
func (cook GetDrawableInfoCookie) Reply() (*GetDrawableInfoReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -856,7 +889,7 @@ func (cook GetDrawableInfoCookie) Reply() (*GetDrawableInfoReply, error) {
return getDrawableInfoReply(buf), nil
}
-// Read reply into structure from buffer for GetDrawableInfo
+// getDrawableInfoReply reads a byte slice into a GetDrawableInfoReply value.
func getDrawableInfoReply(buf []byte) *GetDrawableInfoReply {
v := new(GetDrawableInfoReply)
b := 1 // skip reply determinant
@@ -909,6 +942,7 @@ func getDrawableInfoReply(buf []byte) *GetDrawableInfoReply {
}
// 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 {
size := 12
b := 0
@@ -932,29 +966,31 @@ func getDrawableInfoRequest(c *xgb.Conn, Screen uint32, Drawable uint32) []byte
return buf
}
-// Request GetDeviceInfo
-// size: 8
+// GetDeviceInfoCookie is a cookie used only for GetDeviceInfo requests.
type GetDeviceInfoCookie struct {
*xgb.Cookie
}
+// GetDeviceInfo sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDeviceInfoCookie.Reply()
func GetDeviceInfo(c *xgb.Conn, Screen uint32) GetDeviceInfoCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceInfoRequest(c, Screen), cookie)
return GetDeviceInfoCookie{cookie}
}
+// GetDeviceInfoUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceInfoUnchecked(c *xgb.Conn, Screen uint32) GetDeviceInfoCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceInfoRequest(c, Screen), cookie)
return GetDeviceInfoCookie{cookie}
}
-// Request reply for GetDeviceInfo
-// size: (32 + xgb.Pad((int(DevicePrivateSize) * 4)))
+// GetDeviceInfoReply represents the data returned from a GetDeviceInfo request.
type GetDeviceInfoReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
FramebufferHandleLow uint32
FramebufferHandleHigh uint32
@@ -965,7 +1001,7 @@ type GetDeviceInfoReply struct {
DevicePrivate []uint32 // size: xgb.Pad((int(DevicePrivateSize) * 4))
}
-// Waits and reads reply data from request GetDeviceInfo
+// Reply blocks and returns the reply data for a GetDeviceInfo request.
func (cook GetDeviceInfoCookie) Reply() (*GetDeviceInfoReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -977,7 +1013,7 @@ func (cook GetDeviceInfoCookie) Reply() (*GetDeviceInfoReply, error) {
return getDeviceInfoReply(buf), nil
}
-// Read reply into structure from buffer for GetDeviceInfo
+// getDeviceInfoReply reads a byte slice into a GetDeviceInfoReply value.
func getDeviceInfoReply(buf []byte) *GetDeviceInfoReply {
v := new(GetDeviceInfoReply)
b := 1 // skip reply determinant
@@ -1019,6 +1055,7 @@ func getDeviceInfoReply(buf []byte) *GetDeviceInfoReply {
}
// Write request to wire for GetDeviceInfo
+// getDeviceInfoRequest writes a GetDeviceInfo request to a byte slice.
func getDeviceInfoRequest(c *xgb.Conn, Screen uint32) []byte {
size := 8
b := 0
@@ -1039,34 +1076,36 @@ func getDeviceInfoRequest(c *xgb.Conn, Screen uint32) []byte {
return buf
}
-// Request AuthConnection
-// size: 12
+// AuthConnectionCookie is a cookie used only for AuthConnection requests.
type AuthConnectionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(authConnectionRequest(c, Screen, Magic), cookie)
return AuthConnectionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(authConnectionRequest(c, Screen, Magic), cookie)
return AuthConnectionCookie{cookie}
}
-// Request reply for AuthConnection
-// size: 12
+// AuthConnectionReply represents the data returned from a AuthConnection request.
type AuthConnectionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Authenticated uint32
}
-// Waits and reads reply data from request AuthConnection
+// Reply blocks and returns the reply data for a AuthConnection request.
func (cook AuthConnectionCookie) Reply() (*AuthConnectionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1078,7 +1117,7 @@ func (cook AuthConnectionCookie) Reply() (*AuthConnectionReply, error) {
return authConnectionReply(buf), nil
}
-// Read reply into structure from buffer for AuthConnection
+// authConnectionReply reads a byte slice into a AuthConnectionReply value.
func authConnectionReply(buf []byte) *AuthConnectionReply {
v := new(AuthConnectionReply)
b := 1 // skip reply determinant
@@ -1098,6 +1137,7 @@ func authConnectionReply(buf []byte) *AuthConnectionReply {
}
// 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 {
size := 12
b := 0
diff --git a/nexgb/xf86vidmode/xf86vidmode.go b/nexgb/xf86vidmode/xf86vidmode.go
index d32f601..15daeb2 100644
--- a/nexgb/xf86vidmode/xf86vidmode.go
+++ b/nexgb/xf86vidmode/xf86vidmode.go
@@ -2,7 +2,7 @@
package xf86vidmode
/*
- This file was generated by xf86vidmode.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by xf86vidmode.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,18 +40,6 @@ func init() {
xgb.NewExtErrorFuncs["XFree86-VidModeExtension"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Card8'
-
-// Skipping definition for base type 'Int16'
-
-// Skipping definition for base type 'Int32'
-
-// Skipping definition for base type 'Void'
-
-// Skipping definition for base type 'Byte'
-
-// Skipping definition for base type 'Int8'
-
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
@@ -64,6 +52,18 @@ func init() {
// Skipping definition for base type 'Float'
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Int16'
+
+// Skipping definition for base type 'Int32'
+
+// Skipping definition for base type 'Void'
+
+// Skipping definition for base type 'Byte'
+
+// Skipping definition for base type 'Int8'
+
const (
ModeFlagPositiveHsync = 1
ModeFlagNegativeHsync = 2
@@ -93,8 +93,6 @@ type Syncrange uint32
type Dotclock uint32
-// 'ModeInfo' struct definition
-// Size: 48
type ModeInfo struct {
Dotclock Dotclock
Hdisplay uint16
@@ -112,7 +110,7 @@ type ModeInfo struct {
Privsize uint32
}
-// Struct read ModeInfo
+// ModeInfoRead reads a byte slice into a ModeInfo value.
func ModeInfoRead(buf []byte, v *ModeInfo) int {
b := 0
@@ -159,7 +157,7 @@ func ModeInfoRead(buf []byte, v *ModeInfo) int {
return b
}
-// Struct list read ModeInfo
+// ModeInfoReadList reads a byte slice into a list of ModeInfo values.
func ModeInfoReadList(buf []byte, dest []ModeInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -169,7 +167,7 @@ func ModeInfoReadList(buf []byte, dest []ModeInfo) int {
return xgb.Pad(b)
}
-// Struct write ModeInfo
+// Bytes writes a ModeInfo value to a byte slice.
func (v ModeInfo) Bytes() []byte {
buf := make([]byte, 48)
b := 0
@@ -217,7 +215,7 @@ func (v ModeInfo) Bytes() []byte {
return buf
}
-// Write struct list ModeInfo
+// ModeInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func ModeInfoListBytes(buf []byte, list []ModeInfo) int {
b := 0
var structBytes []byte
@@ -229,9 +227,7 @@ func ModeInfoListBytes(buf []byte, list []ModeInfo) int {
return b
}
-// Error definition BadClock (0)
-// Size: 32
-
+// BadBadClock is the error number for a BadBadClock.
const BadBadClock = 0
type BadClockError struct {
@@ -239,7 +235,7 @@ type BadClockError struct {
NiceName string
}
-// Error read BadClock
+// BadClockErrorNew constructs a BadClockError value that implements xgb.Error from a byte slice.
func BadClockErrorNew(buf []byte) xgb.Error {
v := BadClockError{}
v.NiceName = "BadClock"
@@ -253,8 +249,8 @@ func BadClockErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadClockError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadClock error.
+// This is mostly used internally.
func (err BadClockError) SequenceId() uint16 {
return err.Sequence
}
@@ -274,9 +270,7 @@ func init() {
xgb.NewExtErrorFuncs["XFree86-VidModeExtension"][0] = BadClockErrorNew
}
-// Error definition BadHTimings (1)
-// Size: 32
-
+// BadBadHTimings is the error number for a BadBadHTimings.
const BadBadHTimings = 1
type BadHTimingsError struct {
@@ -284,7 +278,7 @@ type BadHTimingsError struct {
NiceName string
}
-// Error read BadHTimings
+// BadHTimingsErrorNew constructs a BadHTimingsError value that implements xgb.Error from a byte slice.
func BadHTimingsErrorNew(buf []byte) xgb.Error {
v := BadHTimingsError{}
v.NiceName = "BadHTimings"
@@ -298,8 +292,8 @@ func BadHTimingsErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadHTimingsError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadHTimings error.
+// This is mostly used internally.
func (err BadHTimingsError) SequenceId() uint16 {
return err.Sequence
}
@@ -319,9 +313,7 @@ func init() {
xgb.NewExtErrorFuncs["XFree86-VidModeExtension"][1] = BadHTimingsErrorNew
}
-// Error definition BadVTimings (2)
-// Size: 32
-
+// BadBadVTimings is the error number for a BadBadVTimings.
const BadBadVTimings = 2
type BadVTimingsError struct {
@@ -329,7 +321,7 @@ type BadVTimingsError struct {
NiceName string
}
-// Error read BadVTimings
+// BadVTimingsErrorNew constructs a BadVTimingsError value that implements xgb.Error from a byte slice.
func BadVTimingsErrorNew(buf []byte) xgb.Error {
v := BadVTimingsError{}
v.NiceName = "BadVTimings"
@@ -343,8 +335,8 @@ func BadVTimingsErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadVTimingsError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadVTimings error.
+// This is mostly used internally.
func (err BadVTimingsError) SequenceId() uint16 {
return err.Sequence
}
@@ -364,9 +356,7 @@ func init() {
xgb.NewExtErrorFuncs["XFree86-VidModeExtension"][2] = BadVTimingsErrorNew
}
-// Error definition ModeUnsuitable (3)
-// Size: 32
-
+// BadModeUnsuitable is the error number for a BadModeUnsuitable.
const BadModeUnsuitable = 3
type ModeUnsuitableError struct {
@@ -374,7 +364,7 @@ type ModeUnsuitableError struct {
NiceName string
}
-// Error read ModeUnsuitable
+// ModeUnsuitableErrorNew constructs a ModeUnsuitableError value that implements xgb.Error from a byte slice.
func ModeUnsuitableErrorNew(buf []byte) xgb.Error {
v := ModeUnsuitableError{}
v.NiceName = "ModeUnsuitable"
@@ -388,8 +378,8 @@ func ModeUnsuitableErrorNew(buf []byte) xgb.Error {
return v
}
-func (err ModeUnsuitableError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadModeUnsuitable error.
+// This is mostly used internally.
func (err ModeUnsuitableError) SequenceId() uint16 {
return err.Sequence
}
@@ -409,9 +399,7 @@ func init() {
xgb.NewExtErrorFuncs["XFree86-VidModeExtension"][3] = ModeUnsuitableErrorNew
}
-// Error definition ExtensionDisabled (4)
-// Size: 32
-
+// BadExtensionDisabled is the error number for a BadExtensionDisabled.
const BadExtensionDisabled = 4
type ExtensionDisabledError struct {
@@ -419,7 +407,7 @@ type ExtensionDisabledError struct {
NiceName string
}
-// Error read ExtensionDisabled
+// ExtensionDisabledErrorNew constructs a ExtensionDisabledError value that implements xgb.Error from a byte slice.
func ExtensionDisabledErrorNew(buf []byte) xgb.Error {
v := ExtensionDisabledError{}
v.NiceName = "ExtensionDisabled"
@@ -433,8 +421,8 @@ func ExtensionDisabledErrorNew(buf []byte) xgb.Error {
return v
}
-func (err ExtensionDisabledError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadExtensionDisabled error.
+// This is mostly used internally.
func (err ExtensionDisabledError) SequenceId() uint16 {
return err.Sequence
}
@@ -454,9 +442,7 @@ func init() {
xgb.NewExtErrorFuncs["XFree86-VidModeExtension"][4] = ExtensionDisabledErrorNew
}
-// Error definition ClientNotLocal (5)
-// Size: 32
-
+// BadClientNotLocal is the error number for a BadClientNotLocal.
const BadClientNotLocal = 5
type ClientNotLocalError struct {
@@ -464,7 +450,7 @@ type ClientNotLocalError struct {
NiceName string
}
-// Error read ClientNotLocal
+// ClientNotLocalErrorNew constructs a ClientNotLocalError value that implements xgb.Error from a byte slice.
func ClientNotLocalErrorNew(buf []byte) xgb.Error {
v := ClientNotLocalError{}
v.NiceName = "ClientNotLocal"
@@ -478,8 +464,8 @@ func ClientNotLocalErrorNew(buf []byte) xgb.Error {
return v
}
-func (err ClientNotLocalError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadClientNotLocal error.
+// This is mostly used internally.
func (err ClientNotLocalError) SequenceId() uint16 {
return err.Sequence
}
@@ -499,9 +485,7 @@ func init() {
xgb.NewExtErrorFuncs["XFree86-VidModeExtension"][5] = ClientNotLocalErrorNew
}
-// Error definition ZoomLocked (6)
-// Size: 32
-
+// BadZoomLocked is the error number for a BadZoomLocked.
const BadZoomLocked = 6
type ZoomLockedError struct {
@@ -509,7 +493,7 @@ type ZoomLockedError struct {
NiceName string
}
-// Error read ZoomLocked
+// ZoomLockedErrorNew constructs a ZoomLockedError value that implements xgb.Error from a byte slice.
func ZoomLockedErrorNew(buf []byte) xgb.Error {
v := ZoomLockedError{}
v.NiceName = "ZoomLocked"
@@ -523,8 +507,8 @@ func ZoomLockedErrorNew(buf []byte) xgb.Error {
return v
}
-func (err ZoomLockedError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadZoomLocked error.
+// This is mostly used internally.
func (err ZoomLockedError) SequenceId() uint16 {
return err.Sequence
}
@@ -544,35 +528,37 @@ func init() {
xgb.NewExtErrorFuncs["XFree86-VidModeExtension"][6] = ZoomLockedErrorNew
}
-// Request QueryVersion
-// size: 4
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// QueryVersion sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c), cookie)
return QueryVersionCookie{cookie}
}
+// QueryVersionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 12
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint16
MinorVersion uint16
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -584,7 +570,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -607,6 +593,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// Write request to wire for QueryVersion
+// queryVersionRequest writes a QueryVersion request to a byte slice.
func queryVersionRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -624,29 +611,31 @@ func queryVersionRequest(c *xgb.Conn) []byte {
return buf
}
-// Request GetModeLine
-// size: 8
+// GetModeLineCookie is a cookie used only for GetModeLine requests.
type GetModeLineCookie struct {
*xgb.Cookie
}
+// GetModeLine sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetModeLineCookie.Reply()
func GetModeLine(c *xgb.Conn, Screen uint16) GetModeLineCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getModeLineRequest(c, Screen), cookie)
return GetModeLineCookie{cookie}
}
+// GetModeLineUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetModeLineUnchecked(c *xgb.Conn, Screen uint16) GetModeLineCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getModeLineRequest(c, Screen), cookie)
return GetModeLineCookie{cookie}
}
-// Request reply for GetModeLine
-// size: (52 + xgb.Pad((int(Privsize) * 1)))
+// GetModeLineReply represents the data returned from a GetModeLine request.
type GetModeLineReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Dotclock Dotclock
Hdisplay uint16
@@ -665,7 +654,7 @@ type GetModeLineReply struct {
Private []byte // size: xgb.Pad((int(Privsize) * 1))
}
-// Waits and reads reply data from request GetModeLine
+// Reply blocks and returns the reply data for a GetModeLine request.
func (cook GetModeLineCookie) Reply() (*GetModeLineReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -677,7 +666,7 @@ func (cook GetModeLineCookie) Reply() (*GetModeLineReply, error) {
return getModeLineReply(buf), nil
}
-// Read reply into structure from buffer for GetModeLine
+// getModeLineReply reads a byte slice into a GetModeLineReply value.
func getModeLineReply(buf []byte) *GetModeLineReply {
v := new(GetModeLineReply)
b := 1 // skip reply determinant
@@ -738,6 +727,7 @@ func getModeLineReply(buf []byte) *GetModeLineReply {
}
// Write request to wire for GetModeLine
+// getModeLineRequest writes a GetModeLine request to a byte slice.
func getModeLineRequest(c *xgb.Conn, Screen uint16) []byte {
size := 8
b := 0
@@ -760,30 +750,35 @@ func getModeLineRequest(c *xgb.Conn, Screen uint16) []byte {
return buf
}
-// Request ModModeLine
-// size: xgb.Pad((48 + xgb.Pad((int(Privsize) * 1))))
+// ModModeLineCookie is a cookie used only for ModModeLine requests.
type ModModeLineCookie struct {
*xgb.Cookie
}
-// Write request to wire for ModModeLine
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(modModeLineRequest(c, Screen, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie)
return ModModeLineCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(modModeLineRequest(c, Screen, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie)
return ModModeLineCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((48 + xgb.Pad((int(Privsize) * 1))))
b := 0
@@ -844,30 +839,35 @@ func modModeLineRequest(c *xgb.Conn, Screen uint32, Hdisplay uint16, Hsyncstart
return buf
}
-// Request SwitchMode
-// size: 8
+// SwitchModeCookie is a cookie used only for SwitchMode requests.
type SwitchModeCookie struct {
*xgb.Cookie
}
-// Write request to wire for SwitchMode
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(switchModeRequest(c, Screen, Zoom), cookie)
return SwitchModeCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(switchModeRequest(c, Screen, Zoom), cookie)
return SwitchModeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 8
b := 0
@@ -891,29 +891,31 @@ func switchModeRequest(c *xgb.Conn, Screen uint16, Zoom uint16) []byte {
return buf
}
-// Request GetMonitor
-// size: 8
+// GetMonitorCookie is a cookie used only for GetMonitor requests.
type GetMonitorCookie struct {
*xgb.Cookie
}
+// GetMonitor sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetMonitorCookie.Reply()
func GetMonitor(c *xgb.Conn, Screen uint16) GetMonitorCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getMonitorRequest(c, Screen), cookie)
return GetMonitorCookie{cookie}
}
+// GetMonitorUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetMonitorUnchecked(c *xgb.Conn, Screen uint16) GetMonitorCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getMonitorRequest(c, Screen), cookie)
return GetMonitorCookie{cookie}
}
-// Request reply for GetMonitor
-// size: (((((32 + xgb.Pad((int(NumHsync) * 4))) + xgb.Pad((int(NumVsync) * 4))) + xgb.Pad((int(VendorLength) * 1))) + xgb.Pad(((((int(VendorLength) + 3) & -4) - int(VendorLength)) * 1))) + xgb.Pad((int(ModelLength) * 1)))
+// GetMonitorReply represents the data returned from a GetMonitor request.
type GetMonitorReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
VendorLength byte
ModelLength byte
@@ -927,7 +929,7 @@ type GetMonitorReply struct {
Model string // size: xgb.Pad((int(ModelLength) * 1))
}
-// Waits and reads reply data from request GetMonitor
+// Reply blocks and returns the reply data for a GetMonitor request.
func (cook GetMonitorCookie) Reply() (*GetMonitorReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -939,7 +941,7 @@ func (cook GetMonitorCookie) Reply() (*GetMonitorReply, error) {
return getMonitorReply(buf), nil
}
-// Read reply into structure from buffer for GetMonitor
+// getMonitorReply reads a byte slice into a GetMonitorReply value.
func getMonitorReply(buf []byte) *GetMonitorReply {
v := new(GetMonitorReply)
b := 1 // skip reply determinant
@@ -1002,6 +1004,7 @@ func getMonitorReply(buf []byte) *GetMonitorReply {
}
// Write request to wire for GetMonitor
+// getMonitorRequest writes a GetMonitor request to a byte slice.
func getMonitorRequest(c *xgb.Conn, Screen uint16) []byte {
size := 8
b := 0
@@ -1024,30 +1027,35 @@ func getMonitorRequest(c *xgb.Conn, Screen uint16) []byte {
return buf
}
-// Request LockModeSwitch
-// size: 8
+// LockModeSwitchCookie is a cookie used only for LockModeSwitch requests.
type LockModeSwitchCookie struct {
*xgb.Cookie
}
-// Write request to wire for LockModeSwitch
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(lockModeSwitchRequest(c, Screen, Lock), cookie)
return LockModeSwitchCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(lockModeSwitchRequest(c, Screen, Lock), cookie)
return LockModeSwitchCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 8
b := 0
@@ -1071,36 +1079,38 @@ func lockModeSwitchRequest(c *xgb.Conn, Screen uint16, Lock uint16) []byte {
return buf
}
-// Request GetAllModeLines
-// size: 8
+// GetAllModeLinesCookie is a cookie used only for GetAllModeLines requests.
type GetAllModeLinesCookie struct {
*xgb.Cookie
}
+// GetAllModeLines sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetAllModeLinesCookie.Reply()
func GetAllModeLines(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getAllModeLinesRequest(c, Screen), cookie)
return GetAllModeLinesCookie{cookie}
}
+// GetAllModeLinesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetAllModeLinesUnchecked(c *xgb.Conn, Screen uint16) GetAllModeLinesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getAllModeLinesRequest(c, Screen), cookie)
return GetAllModeLinesCookie{cookie}
}
-// Request reply for GetAllModeLines
-// size: (32 + xgb.Pad((int(Modecount) * 48)))
+// GetAllModeLinesReply represents the data returned from a GetAllModeLines request.
type GetAllModeLinesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Modecount uint32
// padding: 20 bytes
Modeinfo []ModeInfo // size: xgb.Pad((int(Modecount) * 48))
}
-// Waits and reads reply data from request GetAllModeLines
+// Reply blocks and returns the reply data for a GetAllModeLines request.
func (cook GetAllModeLinesCookie) Reply() (*GetAllModeLinesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1112,7 +1122,7 @@ func (cook GetAllModeLinesCookie) Reply() (*GetAllModeLinesReply, error) {
return getAllModeLinesReply(buf), nil
}
-// Read reply into structure from buffer for GetAllModeLines
+// getAllModeLinesReply reads a byte slice into a GetAllModeLinesReply value.
func getAllModeLinesReply(buf []byte) *GetAllModeLinesReply {
v := new(GetAllModeLinesReply)
b := 1 // skip reply determinant
@@ -1137,6 +1147,7 @@ func getAllModeLinesReply(buf []byte) *GetAllModeLinesReply {
}
// Write request to wire for GetAllModeLines
+// getAllModeLinesRequest writes a GetAllModeLines request to a byte slice.
func getAllModeLinesRequest(c *xgb.Conn, Screen uint16) []byte {
size := 8
b := 0
@@ -1159,30 +1170,35 @@ func getAllModeLinesRequest(c *xgb.Conn, Screen uint16) []byte {
return buf
}
-// Request AddModeLine
-// size: xgb.Pad((92 + xgb.Pad((int(Privsize) * 1))))
+// AddModeLineCookie is a cookie used only for AddModeLine requests.
type AddModeLineCookie struct {
*xgb.Cookie
}
-// Write request to wire for AddModeLine
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(addModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, AfterDotclock, AfterHdisplay, AfterHsyncstart, AfterHsyncend, AfterHtotal, AfterHskew, AfterVdisplay, AfterVsyncstart, AfterVsyncend, AfterVtotal, AfterFlags, Private), cookie)
return AddModeLineCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(addModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, AfterDotclock, AfterHdisplay, AfterHsyncstart, AfterHsyncend, AfterHtotal, AfterHskew, AfterVdisplay, AfterVsyncstart, AfterVsyncend, AfterVtotal, AfterFlags, Private), cookie)
return AddModeLineCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((92 + xgb.Pad((int(Privsize) * 1))))
b := 0
@@ -1283,30 +1299,35 @@ func addModeLineRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay
return buf
}
-// Request DeleteModeLine
-// size: xgb.Pad((52 + xgb.Pad((int(Privsize) * 1))))
+// DeleteModeLineCookie is a cookie used only for DeleteModeLine requests.
type DeleteModeLineCookie struct {
*xgb.Cookie
}
-// Write request to wire for DeleteModeLine
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(deleteModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie)
return DeleteModeLineCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(deleteModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie)
return DeleteModeLineCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((52 + xgb.Pad((int(Privsize) * 1))))
b := 0
@@ -1370,35 +1391,37 @@ func deleteModeLineRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdispl
return buf
}
-// Request ValidateModeLine
-// size: xgb.Pad((52 + xgb.Pad((int(Privsize) * 1))))
+// ValidateModeLineCookie is a cookie used only for ValidateModeLine requests.
type ValidateModeLineCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(validateModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie)
return ValidateModeLineCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(validateModeLineRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie)
return ValidateModeLineCookie{cookie}
}
-// Request reply for ValidateModeLine
-// size: 32
+// ValidateModeLineReply represents the data returned from a ValidateModeLine request.
type ValidateModeLineReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Status uint32
// padding: 20 bytes
}
-// Waits and reads reply data from request ValidateModeLine
+// Reply blocks and returns the reply data for a ValidateModeLine request.
func (cook ValidateModeLineCookie) Reply() (*ValidateModeLineReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1410,7 +1433,7 @@ func (cook ValidateModeLineCookie) Reply() (*ValidateModeLineReply, error) {
return validateModeLineReply(buf), nil
}
-// Read reply into structure from buffer for ValidateModeLine
+// validateModeLineReply reads a byte slice into a ValidateModeLineReply value.
func validateModeLineReply(buf []byte) *ValidateModeLineReply {
v := new(ValidateModeLineReply)
b := 1 // skip reply determinant
@@ -1432,6 +1455,7 @@ func validateModeLineReply(buf []byte) *ValidateModeLineReply {
}
// 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 {
size := xgb.Pad((52 + xgb.Pad((int(Privsize) * 1))))
b := 0
@@ -1495,30 +1519,35 @@ func validateModeLineRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdis
return buf
}
-// Request SwitchToMode
-// size: xgb.Pad((52 + xgb.Pad((int(Privsize) * 1))))
+// SwitchToModeCookie is a cookie used only for SwitchToMode requests.
type SwitchToModeCookie struct {
*xgb.Cookie
}
-// Write request to wire for SwitchToMode
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(switchToModeRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie)
return SwitchToModeCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(switchToModeRequest(c, Screen, Dotclock, Hdisplay, Hsyncstart, Hsyncend, Htotal, Hskew, Vdisplay, Vsyncstart, Vsyncend, Vtotal, Flags, Privsize, Private), cookie)
return SwitchToModeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((52 + xgb.Pad((int(Privsize) * 1))))
b := 0
@@ -1582,36 +1611,38 @@ func switchToModeRequest(c *xgb.Conn, Screen uint32, Dotclock Dotclock, Hdisplay
return buf
}
-// Request GetViewPort
-// size: 8
+// GetViewPortCookie is a cookie used only for GetViewPort requests.
type GetViewPortCookie struct {
*xgb.Cookie
}
+// GetViewPort sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetViewPortCookie.Reply()
func GetViewPort(c *xgb.Conn, Screen uint16) GetViewPortCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getViewPortRequest(c, Screen), cookie)
return GetViewPortCookie{cookie}
}
+// GetViewPortUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetViewPortUnchecked(c *xgb.Conn, Screen uint16) GetViewPortCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getViewPortRequest(c, Screen), cookie)
return GetViewPortCookie{cookie}
}
-// Request reply for GetViewPort
-// size: 32
+// GetViewPortReply represents the data returned from a GetViewPort request.
type GetViewPortReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
X uint32
Y uint32
// padding: 16 bytes
}
-// Waits and reads reply data from request GetViewPort
+// Reply blocks and returns the reply data for a GetViewPort request.
func (cook GetViewPortCookie) Reply() (*GetViewPortReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1623,7 +1654,7 @@ func (cook GetViewPortCookie) Reply() (*GetViewPortReply, error) {
return getViewPortReply(buf), nil
}
-// Read reply into structure from buffer for GetViewPort
+// getViewPortReply reads a byte slice into a GetViewPortReply value.
func getViewPortReply(buf []byte) *GetViewPortReply {
v := new(GetViewPortReply)
b := 1 // skip reply determinant
@@ -1648,6 +1679,7 @@ func getViewPortReply(buf []byte) *GetViewPortReply {
}
// Write request to wire for GetViewPort
+// getViewPortRequest writes a GetViewPort request to a byte slice.
func getViewPortRequest(c *xgb.Conn, Screen uint16) []byte {
size := 8
b := 0
@@ -1670,30 +1702,35 @@ func getViewPortRequest(c *xgb.Conn, Screen uint16) []byte {
return buf
}
-// Request SetViewPort
-// size: 16
+// SetViewPortCookie is a cookie used only for SetViewPort requests.
type SetViewPortCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetViewPort
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setViewPortRequest(c, Screen, X, Y), cookie)
return SetViewPortCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setViewPortRequest(c, Screen, X, Y), cookie)
return SetViewPortCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -1722,29 +1759,31 @@ func setViewPortRequest(c *xgb.Conn, Screen uint16, X uint32, Y uint32) []byte {
return buf
}
-// Request GetDotClocks
-// size: 8
+// GetDotClocksCookie is a cookie used only for GetDotClocks requests.
type GetDotClocksCookie struct {
*xgb.Cookie
}
+// GetDotClocks sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDotClocksCookie.Reply()
func GetDotClocks(c *xgb.Conn, Screen uint16) GetDotClocksCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDotClocksRequest(c, Screen), cookie)
return GetDotClocksCookie{cookie}
}
+// GetDotClocksUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDotClocksUnchecked(c *xgb.Conn, Screen uint16) GetDotClocksCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDotClocksRequest(c, Screen), cookie)
return GetDotClocksCookie{cookie}
}
-// Request reply for GetDotClocks
-// size: (32 + xgb.Pad((((1 - (int(Flags) & 1)) * int(Clocks)) * 4)))
+// GetDotClocksReply represents the data returned from a GetDotClocks request.
type GetDotClocksReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Flags uint32
Clocks uint32
@@ -1753,7 +1792,7 @@ type GetDotClocksReply struct {
Clock []uint32 // size: xgb.Pad((((1 - (int(Flags) & 1)) * int(Clocks)) * 4))
}
-// Waits and reads reply data from request GetDotClocks
+// Reply blocks and returns the reply data for a GetDotClocks request.
func (cook GetDotClocksCookie) Reply() (*GetDotClocksReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1765,7 +1804,7 @@ func (cook GetDotClocksCookie) Reply() (*GetDotClocksReply, error) {
return getDotClocksReply(buf), nil
}
-// Read reply into structure from buffer for GetDotClocks
+// getDotClocksReply reads a byte slice into a GetDotClocksReply value.
func getDotClocksReply(buf []byte) *GetDotClocksReply {
v := new(GetDotClocksReply)
b := 1 // skip reply determinant
@@ -1800,6 +1839,7 @@ func getDotClocksReply(buf []byte) *GetDotClocksReply {
}
// Write request to wire for GetDotClocks
+// getDotClocksRequest writes a GetDotClocks request to a byte slice.
func getDotClocksRequest(c *xgb.Conn, Screen uint16) []byte {
size := 8
b := 0
@@ -1822,30 +1862,35 @@ func getDotClocksRequest(c *xgb.Conn, Screen uint16) []byte {
return buf
}
-// Request SetClientVersion
-// size: 8
+// SetClientVersionCookie is a cookie used only for SetClientVersion requests.
type SetClientVersionCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetClientVersion
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setClientVersionRequest(c, Major, Minor), cookie)
return SetClientVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setClientVersionRequest(c, Major, Minor), cookie)
return SetClientVersionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 8
b := 0
@@ -1869,30 +1914,35 @@ func setClientVersionRequest(c *xgb.Conn, Major uint16, Minor uint16) []byte {
return buf
}
-// Request SetGamma
-// size: 32
+// SetGammaCookie is a cookie used only for SetGamma requests.
type SetGammaCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetGamma
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setGammaRequest(c, Screen, Red, Green, Blue), cookie)
return SetGammaCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setGammaRequest(c, Screen, Red, Green, Blue), cookie)
return SetGammaCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 32
b := 0
@@ -1926,29 +1976,31 @@ func setGammaRequest(c *xgb.Conn, Screen uint16, Red uint32, Green uint32, Blue
return buf
}
-// Request GetGamma
-// size: 32
+// GetGammaCookie is a cookie used only for GetGamma requests.
type GetGammaCookie struct {
*xgb.Cookie
}
+// GetGamma sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetGammaCookie.Reply()
func GetGamma(c *xgb.Conn, Screen uint16) GetGammaCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getGammaRequest(c, Screen), cookie)
return GetGammaCookie{cookie}
}
+// GetGammaUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetGammaUnchecked(c *xgb.Conn, Screen uint16) GetGammaCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getGammaRequest(c, Screen), cookie)
return GetGammaCookie{cookie}
}
-// Request reply for GetGamma
-// size: 32
+// GetGammaReply represents the data returned from a GetGamma request.
type GetGammaReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Red uint32
Green uint32
@@ -1956,7 +2008,7 @@ type GetGammaReply struct {
// padding: 12 bytes
}
-// Waits and reads reply data from request GetGamma
+// Reply blocks and returns the reply data for a GetGamma request.
func (cook GetGammaCookie) Reply() (*GetGammaReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1968,7 +2020,7 @@ func (cook GetGammaCookie) Reply() (*GetGammaReply, error) {
return getGammaReply(buf), nil
}
-// Read reply into structure from buffer for GetGamma
+// getGammaReply reads a byte slice into a GetGammaReply value.
func getGammaReply(buf []byte) *GetGammaReply {
v := new(GetGammaReply)
b := 1 // skip reply determinant
@@ -1996,6 +2048,7 @@ func getGammaReply(buf []byte) *GetGammaReply {
}
// Write request to wire for GetGamma
+// getGammaRequest writes a GetGamma request to a byte slice.
func getGammaRequest(c *xgb.Conn, Screen uint16) []byte {
size := 32
b := 0
@@ -2018,29 +2071,31 @@ func getGammaRequest(c *xgb.Conn, Screen uint16) []byte {
return buf
}
-// Request GetGammaRamp
-// size: 8
+// GetGammaRampCookie is a cookie used only for GetGammaRamp requests.
type GetGammaRampCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getGammaRampRequest(c, Screen, Size), cookie)
return GetGammaRampCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getGammaRampRequest(c, Screen, Size), cookie)
return GetGammaRampCookie{cookie}
}
-// Request reply for GetGammaRamp
-// size: (((32 + xgb.Pad((((int(Size) + 1) & -2) * 2))) + xgb.Pad((((int(Size) + 1) & -2) * 2))) + xgb.Pad((((int(Size) + 1) & -2) * 2)))
+// GetGammaRampReply represents the data returned from a GetGammaRamp request.
type GetGammaRampReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Size uint16
// padding: 22 bytes
@@ -2049,7 +2104,7 @@ type GetGammaRampReply struct {
Blue []uint16 // size: xgb.Pad((((int(Size) + 1) & -2) * 2))
}
-// Waits and reads reply data from request GetGammaRamp
+// Reply blocks and returns the reply data for a GetGammaRamp request.
func (cook GetGammaRampCookie) Reply() (*GetGammaRampReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2061,7 +2116,7 @@ func (cook GetGammaRampCookie) Reply() (*GetGammaRampReply, error) {
return getGammaRampReply(buf), nil
}
-// Read reply into structure from buffer for GetGammaRamp
+// getGammaRampReply reads a byte slice into a GetGammaRampReply value.
func getGammaRampReply(buf []byte) *GetGammaRampReply {
v := new(GetGammaRampReply)
b := 1 // skip reply determinant
@@ -2104,6 +2159,7 @@ func getGammaRampReply(buf []byte) *GetGammaRampReply {
}
// 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 {
size := 8
b := 0
@@ -2127,30 +2183,35 @@ func getGammaRampRequest(c *xgb.Conn, Screen uint16, Size uint16) []byte {
return buf
}
-// Request SetGammaRamp
-// 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))))
+// SetGammaRampCookie is a cookie used only for SetGammaRamp requests.
type SetGammaRampCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetGammaRamp
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setGammaRampRequest(c, Screen, Size, Red, Green, Blue), cookie)
return SetGammaRampCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setGammaRampRequest(c, Screen, Size, Red, Green, Blue), cookie)
return SetGammaRampCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
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
@@ -2192,35 +2253,37 @@ func setGammaRampRequest(c *xgb.Conn, Screen uint16, Size uint16, Red []uint16,
return buf
}
-// Request GetGammaRampSize
-// size: 8
+// GetGammaRampSizeCookie is a cookie used only for GetGammaRampSize requests.
type GetGammaRampSizeCookie struct {
*xgb.Cookie
}
+// GetGammaRampSize sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetGammaRampSizeCookie.Reply()
func GetGammaRampSize(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getGammaRampSizeRequest(c, Screen), cookie)
return GetGammaRampSizeCookie{cookie}
}
+// GetGammaRampSizeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetGammaRampSizeUnchecked(c *xgb.Conn, Screen uint16) GetGammaRampSizeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getGammaRampSizeRequest(c, Screen), cookie)
return GetGammaRampSizeCookie{cookie}
}
-// Request reply for GetGammaRampSize
-// size: 32
+// GetGammaRampSizeReply represents the data returned from a GetGammaRampSize request.
type GetGammaRampSizeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Size uint16
// padding: 22 bytes
}
-// Waits and reads reply data from request GetGammaRampSize
+// Reply blocks and returns the reply data for a GetGammaRampSize request.
func (cook GetGammaRampSizeCookie) Reply() (*GetGammaRampSizeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2232,7 +2295,7 @@ func (cook GetGammaRampSizeCookie) Reply() (*GetGammaRampSizeReply, error) {
return getGammaRampSizeReply(buf), nil
}
-// Read reply into structure from buffer for GetGammaRampSize
+// getGammaRampSizeReply reads a byte slice into a GetGammaRampSizeReply value.
func getGammaRampSizeReply(buf []byte) *GetGammaRampSizeReply {
v := new(GetGammaRampSizeReply)
b := 1 // skip reply determinant
@@ -2254,6 +2317,7 @@ func getGammaRampSizeReply(buf []byte) *GetGammaRampSizeReply {
}
// Write request to wire for GetGammaRampSize
+// getGammaRampSizeRequest writes a GetGammaRampSize request to a byte slice.
func getGammaRampSizeRequest(c *xgb.Conn, Screen uint16) []byte {
size := 8
b := 0
@@ -2276,35 +2340,37 @@ func getGammaRampSizeRequest(c *xgb.Conn, Screen uint16) []byte {
return buf
}
-// Request GetPermissions
-// size: 8
+// GetPermissionsCookie is a cookie used only for GetPermissions requests.
type GetPermissionsCookie struct {
*xgb.Cookie
}
+// GetPermissions sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetPermissionsCookie.Reply()
func GetPermissions(c *xgb.Conn, Screen uint16) GetPermissionsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getPermissionsRequest(c, Screen), cookie)
return GetPermissionsCookie{cookie}
}
+// GetPermissionsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPermissionsUnchecked(c *xgb.Conn, Screen uint16) GetPermissionsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPermissionsRequest(c, Screen), cookie)
return GetPermissionsCookie{cookie}
}
-// Request reply for GetPermissions
-// size: 32
+// GetPermissionsReply represents the data returned from a GetPermissions request.
type GetPermissionsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Permissions uint32
// padding: 20 bytes
}
-// Waits and reads reply data from request GetPermissions
+// Reply blocks and returns the reply data for a GetPermissions request.
func (cook GetPermissionsCookie) Reply() (*GetPermissionsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2316,7 +2382,7 @@ func (cook GetPermissionsCookie) Reply() (*GetPermissionsReply, error) {
return getPermissionsReply(buf), nil
}
-// Read reply into structure from buffer for GetPermissions
+// getPermissionsReply reads a byte slice into a GetPermissionsReply value.
func getPermissionsReply(buf []byte) *GetPermissionsReply {
v := new(GetPermissionsReply)
b := 1 // skip reply determinant
@@ -2338,6 +2404,7 @@ func getPermissionsReply(buf []byte) *GetPermissionsReply {
}
// Write request to wire for GetPermissions
+// getPermissionsRequest writes a GetPermissions request to a byte slice.
func getPermissionsRequest(c *xgb.Conn, Screen uint16) []byte {
size := 8
b := 0
diff --git a/nexgb/xfixes/xfixes.go b/nexgb/xfixes/xfixes.go
index 3b6bbea..b5d9c14 100644
--- a/nexgb/xfixes/xfixes.go
+++ b/nexgb/xfixes/xfixes.go
@@ -2,7 +2,7 @@
package xfixes
/*
- This file was generated by xfixes.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by xfixes.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -42,16 +42,6 @@ func init() {
xgb.NewExtErrorFuncs["XFIXES"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Card8'
-
-// Skipping definition for base type 'Int16'
-
-// Skipping definition for base type 'Int32'
-
-// Skipping definition for base type 'Void'
-
-// Skipping definition for base type 'Byte'
-
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
@@ -66,6 +56,16 @@ func init() {
// Skipping definition for base type 'Float'
+// Skipping definition for base type 'Card8'
+
+// Skipping definition for base type 'Int16'
+
+// Skipping definition for base type 'Int32'
+
+// Skipping definition for base type 'Void'
+
+// Skipping definition for base type 'Byte'
+
const (
SaveSetModeInsert = 0
SaveSetModeDelete = 1
@@ -115,9 +115,7 @@ func NewRegionId(c *xgb.Conn) (Region, error) {
return Region(id), nil
}
-// Event definition SelectionNotify (0)
-// Size: 32
-
+// SelectionNotify is the event number for a SelectionNotifyEvent.
const SelectionNotify = 0
type SelectionNotifyEvent struct {
@@ -131,7 +129,7 @@ type SelectionNotifyEvent struct {
// padding: 8 bytes
}
-// Event read SelectionNotify
+// SelectionNotifyEventNew constructs a SelectionNotifyEvent value that implements xgb.Event from a byte slice.
func SelectionNotifyEventNew(buf []byte) xgb.Event {
v := SelectionNotifyEvent{}
b := 1 // don't read event number
@@ -162,7 +160,7 @@ func SelectionNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write SelectionNotify
+// Bytes writes a SelectionNotifyEvent value to a byte slice.
func (v SelectionNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -196,12 +194,14 @@ func (v SelectionNotifyEvent) Bytes() []byte {
return buf
}
-func (v SelectionNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the SelectionNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v SelectionNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of SelectionNotifyEvent.
func (v SelectionNotifyEvent) String() string {
fieldVals := make([]string, 0, 7)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -218,9 +218,7 @@ func init() {
xgb.NewExtEventFuncs["XFIXES"][0] = SelectionNotifyEventNew
}
-// Event definition CursorNotify (1)
-// Size: 32
-
+// CursorNotify is the event number for a CursorNotifyEvent.
const CursorNotify = 1
type CursorNotifyEvent struct {
@@ -233,7 +231,7 @@ type CursorNotifyEvent struct {
// padding: 12 bytes
}
-// Event read CursorNotify
+// CursorNotifyEventNew constructs a CursorNotifyEvent value that implements xgb.Event from a byte slice.
func CursorNotifyEventNew(buf []byte) xgb.Event {
v := CursorNotifyEvent{}
b := 1 // don't read event number
@@ -261,7 +259,7 @@ func CursorNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write CursorNotify
+// Bytes writes a CursorNotifyEvent value to a byte slice.
func (v CursorNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -292,12 +290,14 @@ func (v CursorNotifyEvent) Bytes() []byte {
return buf
}
-func (v CursorNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the CursorNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v CursorNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of CursorNotifyEvent.
func (v CursorNotifyEvent) String() string {
fieldVals := make([]string, 0, 6)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -313,9 +313,7 @@ func init() {
xgb.NewExtEventFuncs["XFIXES"][1] = CursorNotifyEventNew
}
-// Error definition BadRegion (0)
-// Size: 32
-
+// BadBadRegion is the error number for a BadBadRegion.
const BadBadRegion = 0
type BadRegionError struct {
@@ -323,7 +321,7 @@ type BadRegionError struct {
NiceName string
}
-// Error read BadRegion
+// BadRegionErrorNew constructs a BadRegionError value that implements xgb.Error from a byte slice.
func BadRegionErrorNew(buf []byte) xgb.Error {
v := BadRegionError{}
v.NiceName = "BadRegion"
@@ -337,8 +335,8 @@ func BadRegionErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadRegionError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadRegion error.
+// This is mostly used internally.
func (err BadRegionError) SequenceId() uint16 {
return err.Sequence
}
@@ -358,36 +356,38 @@ func init() {
xgb.NewExtErrorFuncs["XFIXES"][0] = BadRegionErrorNew
}
-// Request QueryVersion
-// size: 12
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, ClientMajorVersion, ClientMinorVersion), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 32
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint32
MinorVersion uint32
// padding: 16 bytes
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -399,7 +399,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -424,6 +424,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 12
b := 0
@@ -447,30 +448,35 @@ func queryVersionRequest(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVers
return buf
}
-// Request ChangeSaveSet
-// size: 12
+// ChangeSaveSetCookie is a cookie used only for ChangeSaveSet requests.
type ChangeSaveSetCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeSaveSet
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(changeSaveSetRequest(c, Mode, Target, Map, Window), cookie)
return ChangeSaveSetCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(changeSaveSetRequest(c, Mode, Target, Map, Window), cookie)
return ChangeSaveSetCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -502,30 +508,35 @@ func changeSaveSetRequest(c *xgb.Conn, Mode byte, Target byte, Map byte, Window
return buf
}
-// Request SelectSelectionInput
-// size: 16
+// SelectSelectionInputCookie is a cookie used only for SelectSelectionInput requests.
type SelectSelectionInputCookie struct {
*xgb.Cookie
}
-// Write request to wire for SelectSelectionInput
+// SelectSelectionInput sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectSelectionInput(c *xgb.Conn, Window xproto.Window, Selection xproto.Atom, EventMask uint32) SelectSelectionInputCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(selectSelectionInputRequest(c, Window, Selection, EventMask), cookie)
return SelectSelectionInputCookie{cookie}
}
+// SelectSelectionInputChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(selectSelectionInputRequest(c, Window, Selection, EventMask), cookie)
return SelectSelectionInputCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SelectSelectionInputCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SelectSelectionInput
+// selectSelectionInputRequest writes a SelectSelectionInput request to a byte slice.
func selectSelectionInputRequest(c *xgb.Conn, Window xproto.Window, Selection xproto.Atom, EventMask uint32) []byte {
size := 16
b := 0
@@ -552,30 +563,35 @@ func selectSelectionInputRequest(c *xgb.Conn, Window xproto.Window, Selection xp
return buf
}
-// Request SelectCursorInput
-// size: 12
+// SelectCursorInputCookie is a cookie used only for SelectCursorInput requests.
type SelectCursorInputCookie struct {
*xgb.Cookie
}
-// Write request to wire for SelectCursorInput
+// SelectCursorInput sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectCursorInput(c *xgb.Conn, Window xproto.Window, EventMask uint32) SelectCursorInputCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(selectCursorInputRequest(c, Window, EventMask), cookie)
return SelectCursorInputCookie{cookie}
}
+// SelectCursorInputChecked sends a checked request.
+// If an error occurs, it can be retrieved using SelectCursorInputCookie.Check()
func SelectCursorInputChecked(c *xgb.Conn, Window xproto.Window, EventMask uint32) SelectCursorInputCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(selectCursorInputRequest(c, Window, EventMask), cookie)
return SelectCursorInputCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SelectCursorInputCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SelectCursorInput
+// selectCursorInputRequest writes a SelectCursorInput request to a byte slice.
func selectCursorInputRequest(c *xgb.Conn, Window xproto.Window, EventMask uint32) []byte {
size := 12
b := 0
@@ -599,29 +615,31 @@ func selectCursorInputRequest(c *xgb.Conn, Window xproto.Window, EventMask uint3
return buf
}
-// Request GetCursorImage
-// size: 4
+// GetCursorImageCookie is a cookie used only for GetCursorImage requests.
type GetCursorImageCookie struct {
*xgb.Cookie
}
+// GetCursorImage sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetCursorImageCookie.Reply()
func GetCursorImage(c *xgb.Conn) GetCursorImageCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getCursorImageRequest(c), cookie)
return GetCursorImageCookie{cookie}
}
+// GetCursorImageUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetCursorImageUnchecked(c *xgb.Conn) GetCursorImageCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getCursorImageRequest(c), cookie)
return GetCursorImageCookie{cookie}
}
-// Request reply for GetCursorImage
-// size: (32 + xgb.Pad(((int(Width) * int(Height)) * 4)))
+// GetCursorImageReply represents the data returned from a GetCursorImage request.
type GetCursorImageReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
X int16
Y int16
@@ -634,7 +652,7 @@ type GetCursorImageReply struct {
CursorImage []uint32 // size: xgb.Pad(((int(Width) * int(Height)) * 4))
}
-// Waits and reads reply data from request GetCursorImage
+// Reply blocks and returns the reply data for a GetCursorImage request.
func (cook GetCursorImageCookie) Reply() (*GetCursorImageReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -646,7 +664,7 @@ func (cook GetCursorImageCookie) Reply() (*GetCursorImageReply, error) {
return getCursorImageReply(buf), nil
}
-// Read reply into structure from buffer for GetCursorImage
+// getCursorImageReply reads a byte slice into a GetCursorImageReply value.
func getCursorImageReply(buf []byte) *GetCursorImageReply {
v := new(GetCursorImageReply)
b := 1 // skip reply determinant
@@ -693,6 +711,7 @@ func getCursorImageReply(buf []byte) *GetCursorImageReply {
}
// Write request to wire for GetCursorImage
+// getCursorImageRequest writes a GetCursorImage request to a byte slice.
func getCursorImageRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -710,30 +729,35 @@ func getCursorImageRequest(c *xgb.Conn) []byte {
return buf
}
-// Request CreateRegion
-// size: xgb.Pad((8 + xgb.Pad((len(Rectangles) * 8))))
+// CreateRegionCookie is a cookie used only for CreateRegion requests.
type CreateRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateRegion
+// CreateRegion sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateRegion(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) CreateRegionCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createRegionRequest(c, Region, Rectangles), cookie)
return CreateRegionCookie{cookie}
}
+// CreateRegionChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateRegionCookie.Check()
func CreateRegionChecked(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) CreateRegionCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createRegionRequest(c, Region, Rectangles), cookie)
return CreateRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateRegionCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateRegion
+// createRegionRequest writes a CreateRegion request to a byte slice.
func createRegionRequest(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) []byte {
size := xgb.Pad((8 + xgb.Pad((len(Rectangles) * 8))))
b := 0
@@ -756,30 +780,35 @@ func createRegionRequest(c *xgb.Conn, Region Region, Rectangles []xproto.Rectang
return buf
}
-// Request CreateRegionFromBitmap
-// size: 12
+// CreateRegionFromBitmapCookie is a cookie used only for CreateRegionFromBitmap requests.
type CreateRegionFromBitmapCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateRegionFromBitmap
+// CreateRegionFromBitmap sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateRegionFromBitmap(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) CreateRegionFromBitmapCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createRegionFromBitmapRequest(c, Region, Bitmap), cookie)
return CreateRegionFromBitmapCookie{cookie}
}
+// CreateRegionFromBitmapChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateRegionFromBitmapCookie.Check()
func CreateRegionFromBitmapChecked(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) CreateRegionFromBitmapCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createRegionFromBitmapRequest(c, Region, Bitmap), cookie)
return CreateRegionFromBitmapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateRegionFromBitmapCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateRegionFromBitmap
+// createRegionFromBitmapRequest writes a CreateRegionFromBitmap request to a byte slice.
func createRegionFromBitmapRequest(c *xgb.Conn, Region Region, Bitmap xproto.Pixmap) []byte {
size := 12
b := 0
@@ -803,30 +832,35 @@ func createRegionFromBitmapRequest(c *xgb.Conn, Region Region, Bitmap xproto.Pix
return buf
}
-// Request CreateRegionFromWindow
-// size: 16
+// CreateRegionFromWindowCookie is a cookie used only for CreateRegionFromWindow requests.
type CreateRegionFromWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateRegionFromWindow
+// CreateRegionFromWindow sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateRegionFromWindow(c *xgb.Conn, Region Region, Window xproto.Window, Kind shape.Kind) CreateRegionFromWindowCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createRegionFromWindowRequest(c, Region, Window, Kind), cookie)
return CreateRegionFromWindowCookie{cookie}
}
+// CreateRegionFromWindowChecked sends a checked request.
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createRegionFromWindowRequest(c, Region, Window, Kind), cookie)
return CreateRegionFromWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateRegionFromWindowCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateRegionFromWindow
+// createRegionFromWindowRequest writes a CreateRegionFromWindow request to a byte slice.
func createRegionFromWindowRequest(c *xgb.Conn, Region Region, Window xproto.Window, Kind shape.Kind) []byte {
size := 16
b := 0
@@ -855,30 +889,35 @@ func createRegionFromWindowRequest(c *xgb.Conn, Region Region, Window xproto.Win
return buf
}
-// Request CreateRegionFromGC
-// size: 12
+// CreateRegionFromGCCookie is a cookie used only for CreateRegionFromGC requests.
type CreateRegionFromGCCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateRegionFromGC
+// CreateRegionFromGC sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateRegionFromGC(c *xgb.Conn, Region Region, Gc xproto.Gcontext) CreateRegionFromGCCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createRegionFromGCRequest(c, Region, Gc), cookie)
return CreateRegionFromGCCookie{cookie}
}
+// CreateRegionFromGCChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateRegionFromGCCookie.Check()
func CreateRegionFromGCChecked(c *xgb.Conn, Region Region, Gc xproto.Gcontext) CreateRegionFromGCCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createRegionFromGCRequest(c, Region, Gc), cookie)
return CreateRegionFromGCCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateRegionFromGCCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateRegionFromGC
+// createRegionFromGCRequest writes a CreateRegionFromGC request to a byte slice.
func createRegionFromGCRequest(c *xgb.Conn, Region Region, Gc xproto.Gcontext) []byte {
size := 12
b := 0
@@ -902,30 +941,35 @@ func createRegionFromGCRequest(c *xgb.Conn, Region Region, Gc xproto.Gcontext) [
return buf
}
-// Request CreateRegionFromPicture
-// size: 12
+// CreateRegionFromPictureCookie is a cookie used only for CreateRegionFromPicture requests.
type CreateRegionFromPictureCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateRegionFromPicture
+// CreateRegionFromPicture sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateRegionFromPicture(c *xgb.Conn, Region Region, Picture render.Picture) CreateRegionFromPictureCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createRegionFromPictureRequest(c, Region, Picture), cookie)
return CreateRegionFromPictureCookie{cookie}
}
+// CreateRegionFromPictureChecked sends a checked request.
+// If an error occurs, it can be retrieved using CreateRegionFromPictureCookie.Check()
func CreateRegionFromPictureChecked(c *xgb.Conn, Region Region, Picture render.Picture) CreateRegionFromPictureCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(createRegionFromPictureRequest(c, Region, Picture), cookie)
return CreateRegionFromPictureCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateRegionFromPictureCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateRegionFromPicture
+// createRegionFromPictureRequest writes a CreateRegionFromPicture request to a byte slice.
func createRegionFromPictureRequest(c *xgb.Conn, Region Region, Picture render.Picture) []byte {
size := 12
b := 0
@@ -949,30 +993,35 @@ func createRegionFromPictureRequest(c *xgb.Conn, Region Region, Picture render.P
return buf
}
-// Request DestroyRegion
-// size: 8
+// DestroyRegionCookie is a cookie used only for DestroyRegion requests.
type DestroyRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyRegion
+// DestroyRegion sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroyRegion(c *xgb.Conn, Region Region) DestroyRegionCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyRegionRequest(c, Region), cookie)
return DestroyRegionCookie{cookie}
}
+// DestroyRegionChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyRegionCookie.Check()
func DestroyRegionChecked(c *xgb.Conn, Region Region) DestroyRegionCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyRegionRequest(c, Region), cookie)
return DestroyRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroyRegionCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroyRegion
+// destroyRegionRequest writes a DestroyRegion request to a byte slice.
func destroyRegionRequest(c *xgb.Conn, Region Region) []byte {
size := 8
b := 0
@@ -993,30 +1042,35 @@ func destroyRegionRequest(c *xgb.Conn, Region Region) []byte {
return buf
}
-// Request SetRegion
-// size: xgb.Pad((8 + xgb.Pad((len(Rectangles) * 8))))
+// SetRegionCookie is a cookie used only for SetRegion requests.
type SetRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetRegion
+// SetRegion sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetRegion(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) SetRegionCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setRegionRequest(c, Region, Rectangles), cookie)
return SetRegionCookie{cookie}
}
+// SetRegionChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetRegionCookie.Check()
func SetRegionChecked(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) SetRegionCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setRegionRequest(c, Region, Rectangles), cookie)
return SetRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetRegionCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetRegion
+// setRegionRequest writes a SetRegion request to a byte slice.
func setRegionRequest(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle) []byte {
size := xgb.Pad((8 + xgb.Pad((len(Rectangles) * 8))))
b := 0
@@ -1039,30 +1093,35 @@ func setRegionRequest(c *xgb.Conn, Region Region, Rectangles []xproto.Rectangle)
return buf
}
-// Request CopyRegion
-// size: 12
+// CopyRegionCookie is a cookie used only for CopyRegion requests.
type CopyRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for CopyRegion
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(copyRegionRequest(c, Source, Destination), cookie)
return CopyRegionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(copyRegionRequest(c, Source, Destination), cookie)
return CopyRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -1086,30 +1145,35 @@ func copyRegionRequest(c *xgb.Conn, Source Region, Destination Region) []byte {
return buf
}
-// Request UnionRegion
-// size: 16
+// UnionRegionCookie is a cookie used only for UnionRegion requests.
type UnionRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for UnionRegion
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(unionRegionRequest(c, Source1, Source2, Destination), cookie)
return UnionRegionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(unionRegionRequest(c, Source1, Source2, Destination), cookie)
return UnionRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -1136,30 +1200,35 @@ func unionRegionRequest(c *xgb.Conn, Source1 Region, Source2 Region, Destination
return buf
}
-// Request IntersectRegion
-// size: 16
+// IntersectRegionCookie is a cookie used only for IntersectRegion requests.
type IntersectRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for IntersectRegion
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(intersectRegionRequest(c, Source1, Source2, Destination), cookie)
return IntersectRegionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(intersectRegionRequest(c, Source1, Source2, Destination), cookie)
return IntersectRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -1186,30 +1255,35 @@ func intersectRegionRequest(c *xgb.Conn, Source1 Region, Source2 Region, Destina
return buf
}
-// Request SubtractRegion
-// size: 16
+// SubtractRegionCookie is a cookie used only for SubtractRegion requests.
type SubtractRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for SubtractRegion
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(subtractRegionRequest(c, Source1, Source2, Destination), cookie)
return SubtractRegionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(subtractRegionRequest(c, Source1, Source2, Destination), cookie)
return SubtractRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -1236,30 +1310,35 @@ func subtractRegionRequest(c *xgb.Conn, Source1 Region, Source2 Region, Destinat
return buf
}
-// Request InvertRegion
-// size: 20
+// InvertRegionCookie is a cookie used only for InvertRegion requests.
type InvertRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for InvertRegion
+// InvertRegion sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func InvertRegion(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destination Region) InvertRegionCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(invertRegionRequest(c, Source, Bounds, Destination), cookie)
return InvertRegionCookie{cookie}
}
+// InvertRegionChecked sends a checked request.
+// If an error occurs, it can be retrieved using InvertRegionCookie.Check()
func InvertRegionChecked(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destination Region) InvertRegionCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(invertRegionRequest(c, Source, Bounds, Destination), cookie)
return InvertRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook InvertRegionCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for InvertRegion
+// invertRegionRequest writes a InvertRegion request to a byte slice.
func invertRegionRequest(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, Destination Region) []byte {
size := 20
b := 0
@@ -1289,30 +1368,35 @@ func invertRegionRequest(c *xgb.Conn, Source Region, Bounds xproto.Rectangle, De
return buf
}
-// Request TranslateRegion
-// size: 12
+// TranslateRegionCookie is a cookie used only for TranslateRegion requests.
type TranslateRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for TranslateRegion
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(translateRegionRequest(c, Region, Dx, Dy), cookie)
return TranslateRegionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(translateRegionRequest(c, Region, Dx, Dy), cookie)
return TranslateRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -1339,30 +1423,35 @@ func translateRegionRequest(c *xgb.Conn, Region Region, Dx int16, Dy int16) []by
return buf
}
-// Request RegionExtents
-// size: 12
+// RegionExtentsCookie is a cookie used only for RegionExtents requests.
type RegionExtentsCookie struct {
*xgb.Cookie
}
-// Write request to wire for RegionExtents
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(regionExtentsRequest(c, Source, Destination), cookie)
return RegionExtentsCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(regionExtentsRequest(c, Source, Destination), cookie)
return RegionExtentsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -1386,36 +1475,38 @@ func regionExtentsRequest(c *xgb.Conn, Source Region, Destination Region) []byte
return buf
}
-// Request FetchRegion
-// size: 8
+// FetchRegionCookie is a cookie used only for FetchRegion requests.
type FetchRegionCookie struct {
*xgb.Cookie
}
+// FetchRegion sends a checked request.
+// If an error occurs, it will be returned with the reply by calling FetchRegionCookie.Reply()
func FetchRegion(c *xgb.Conn, Region Region) FetchRegionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(fetchRegionRequest(c, Region), cookie)
return FetchRegionCookie{cookie}
}
+// FetchRegionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func FetchRegionUnchecked(c *xgb.Conn, Region Region) FetchRegionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(fetchRegionRequest(c, Region), cookie)
return FetchRegionCookie{cookie}
}
-// Request reply for FetchRegion
-// size: (32 + xgb.Pad(((int(Length) / 2) * 8)))
+// FetchRegionReply represents the data returned from a FetchRegion request.
type FetchRegionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Extents xproto.Rectangle
// padding: 16 bytes
Rectangles []xproto.Rectangle // size: xgb.Pad(((int(Length) / 2) * 8))
}
-// Waits and reads reply data from request FetchRegion
+// Reply blocks and returns the reply data for a FetchRegion request.
func (cook FetchRegionCookie) Reply() (*FetchRegionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1427,7 +1518,7 @@ func (cook FetchRegionCookie) Reply() (*FetchRegionReply, error) {
return fetchRegionReply(buf), nil
}
-// Read reply into structure from buffer for FetchRegion
+// fetchRegionReply reads a byte slice into a FetchRegionReply value.
func fetchRegionReply(buf []byte) *FetchRegionReply {
v := new(FetchRegionReply)
b := 1 // skip reply determinant
@@ -1452,6 +1543,7 @@ func fetchRegionReply(buf []byte) *FetchRegionReply {
}
// Write request to wire for FetchRegion
+// fetchRegionRequest writes a FetchRegion request to a byte slice.
func fetchRegionRequest(c *xgb.Conn, Region Region) []byte {
size := 8
b := 0
@@ -1472,30 +1564,35 @@ func fetchRegionRequest(c *xgb.Conn, Region Region) []byte {
return buf
}
-// Request SetGCClipRegion
-// size: 16
+// SetGCClipRegionCookie is a cookie used only for SetGCClipRegion requests.
type SetGCClipRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetGCClipRegion
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setGCClipRegionRequest(c, Gc, Region, XOrigin, YOrigin), cookie)
return SetGCClipRegionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setGCClipRegionRequest(c, Gc, Region, XOrigin, YOrigin), cookie)
return SetGCClipRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -1525,30 +1622,35 @@ func setGCClipRegionRequest(c *xgb.Conn, Gc xproto.Gcontext, Region Region, XOri
return buf
}
-// Request SetWindowShapeRegion
-// size: 20
+// SetWindowShapeRegionCookie is a cookie used only for SetWindowShapeRegion requests.
type SetWindowShapeRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetWindowShapeRegion
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setWindowShapeRegionRequest(c, Dest, DestKind, XOffset, YOffset, Region), cookie)
return SetWindowShapeRegionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setWindowShapeRegionRequest(c, Dest, DestKind, XOffset, YOffset, Region), cookie)
return SetWindowShapeRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 20
b := 0
@@ -1583,30 +1685,35 @@ func setWindowShapeRegionRequest(c *xgb.Conn, Dest xproto.Window, DestKind shape
return buf
}
-// Request SetPictureClipRegion
-// size: 16
+// SetPictureClipRegionCookie is a cookie used only for SetPictureClipRegion requests.
type SetPictureClipRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetPictureClipRegion
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setPictureClipRegionRequest(c, Picture, Region, XOrigin, YOrigin), cookie)
return SetPictureClipRegionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setPictureClipRegionRequest(c, Picture, Region, XOrigin, YOrigin), cookie)
return SetPictureClipRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -1636,30 +1743,35 @@ func setPictureClipRegionRequest(c *xgb.Conn, Picture render.Picture, Region Reg
return buf
}
-// Request SetCursorName
-// size: xgb.Pad((12 + xgb.Pad((int(Nbytes) * 1))))
+// SetCursorNameCookie is a cookie used only for SetCursorName requests.
type SetCursorNameCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetCursorName
+// SetCursorName sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetCursorName(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string) SetCursorNameCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setCursorNameRequest(c, Cursor, Nbytes, Name), cookie)
return SetCursorNameCookie{cookie}
}
+// SetCursorNameChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetCursorNameCookie.Check()
func SetCursorNameChecked(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string) SetCursorNameCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setCursorNameRequest(c, Cursor, Nbytes, Name), cookie)
return SetCursorNameCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetCursorNameCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetCursorName
+// setCursorNameRequest writes a SetCursorName request to a byte slice.
func setCursorNameRequest(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name string) []byte {
size := xgb.Pad((12 + xgb.Pad((int(Nbytes) * 1))))
b := 0
@@ -1688,29 +1800,31 @@ func setCursorNameRequest(c *xgb.Conn, Cursor xproto.Cursor, Nbytes uint16, Name
return buf
}
-// Request GetCursorName
-// size: 8
+// GetCursorNameCookie is a cookie used only for GetCursorName requests.
type GetCursorNameCookie struct {
*xgb.Cookie
}
+// GetCursorName sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetCursorNameCookie.Reply()
func GetCursorName(c *xgb.Conn, Cursor xproto.Cursor) GetCursorNameCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getCursorNameRequest(c, Cursor), cookie)
return GetCursorNameCookie{cookie}
}
+// GetCursorNameUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetCursorNameUnchecked(c *xgb.Conn, Cursor xproto.Cursor) GetCursorNameCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getCursorNameRequest(c, Cursor), cookie)
return GetCursorNameCookie{cookie}
}
-// Request reply for GetCursorName
-// size: (32 + xgb.Pad((int(Nbytes) * 1)))
+// GetCursorNameReply represents the data returned from a GetCursorName request.
type GetCursorNameReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Atom xproto.Atom
Nbytes uint16
@@ -1718,7 +1832,7 @@ type GetCursorNameReply struct {
Name string // size: xgb.Pad((int(Nbytes) * 1))
}
-// Waits and reads reply data from request GetCursorName
+// Reply blocks and returns the reply data for a GetCursorName request.
func (cook GetCursorNameCookie) Reply() (*GetCursorNameReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1730,7 +1844,7 @@ func (cook GetCursorNameCookie) Reply() (*GetCursorNameReply, error) {
return getCursorNameReply(buf), nil
}
-// Read reply into structure from buffer for GetCursorName
+// getCursorNameReply reads a byte slice into a GetCursorNameReply value.
func getCursorNameReply(buf []byte) *GetCursorNameReply {
v := new(GetCursorNameReply)
b := 1 // skip reply determinant
@@ -1762,6 +1876,7 @@ func getCursorNameReply(buf []byte) *GetCursorNameReply {
}
// Write request to wire for GetCursorName
+// getCursorNameRequest writes a GetCursorName request to a byte slice.
func getCursorNameRequest(c *xgb.Conn, Cursor xproto.Cursor) []byte {
size := 8
b := 0
@@ -1782,29 +1897,31 @@ func getCursorNameRequest(c *xgb.Conn, Cursor xproto.Cursor) []byte {
return buf
}
-// Request GetCursorImageAndName
-// size: 4
+// GetCursorImageAndNameCookie is a cookie used only for GetCursorImageAndName requests.
type GetCursorImageAndNameCookie struct {
*xgb.Cookie
}
+// GetCursorImageAndName sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetCursorImageAndNameCookie.Reply()
func GetCursorImageAndName(c *xgb.Conn) GetCursorImageAndNameCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getCursorImageAndNameRequest(c), cookie)
return GetCursorImageAndNameCookie{cookie}
}
+// GetCursorImageAndNameUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetCursorImageAndNameUnchecked(c *xgb.Conn) GetCursorImageAndNameCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getCursorImageAndNameRequest(c), cookie)
return GetCursorImageAndNameCookie{cookie}
}
-// Request reply for GetCursorImageAndName
-// size: ((32 + xgb.Pad((int(Nbytes) * 1))) + xgb.Pad(((int(Width) * int(Height)) * 4)))
+// GetCursorImageAndNameReply represents the data returned from a GetCursorImageAndName request.
type GetCursorImageAndNameReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
X int16
Y int16
@@ -1820,7 +1937,7 @@ type GetCursorImageAndNameReply struct {
CursorImage []uint32 // size: xgb.Pad(((int(Width) * int(Height)) * 4))
}
-// Waits and reads reply data from request GetCursorImageAndName
+// Reply blocks and returns the reply data for a GetCursorImageAndName request.
func (cook GetCursorImageAndNameCookie) Reply() (*GetCursorImageAndNameReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1832,7 +1949,7 @@ func (cook GetCursorImageAndNameCookie) Reply() (*GetCursorImageAndNameReply, er
return getCursorImageAndNameReply(buf), nil
}
-// Read reply into structure from buffer for GetCursorImageAndName
+// getCursorImageAndNameReply reads a byte slice into a GetCursorImageAndNameReply value.
func getCursorImageAndNameReply(buf []byte) *GetCursorImageAndNameReply {
v := new(GetCursorImageAndNameReply)
b := 1 // skip reply determinant
@@ -1892,6 +2009,7 @@ func getCursorImageAndNameReply(buf []byte) *GetCursorImageAndNameReply {
}
// Write request to wire for GetCursorImageAndName
+// getCursorImageAndNameRequest writes a GetCursorImageAndName request to a byte slice.
func getCursorImageAndNameRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -1909,30 +2027,35 @@ func getCursorImageAndNameRequest(c *xgb.Conn) []byte {
return buf
}
-// Request ChangeCursor
-// size: 12
+// ChangeCursorCookie is a cookie used only for ChangeCursor requests.
type ChangeCursorCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeCursor
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(changeCursorRequest(c, Source, Destination), cookie)
return ChangeCursorCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(changeCursorRequest(c, Source, Destination), cookie)
return ChangeCursorCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -1956,30 +2079,35 @@ func changeCursorRequest(c *xgb.Conn, Source xproto.Cursor, Destination xproto.C
return buf
}
-// Request ChangeCursorByName
-// size: xgb.Pad((12 + xgb.Pad((int(Nbytes) * 1))))
+// ChangeCursorByNameCookie is a cookie used only for ChangeCursorByName requests.
type ChangeCursorByNameCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeCursorByName
+// ChangeCursorByName sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangeCursorByName(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name string) ChangeCursorByNameCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(changeCursorByNameRequest(c, Src, Nbytes, Name), cookie)
return ChangeCursorByNameCookie{cookie}
}
+// ChangeCursorByNameChecked sends a checked request.
+// If an error occurs, it can be retrieved using ChangeCursorByNameCookie.Check()
func ChangeCursorByNameChecked(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name string) ChangeCursorByNameCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(changeCursorByNameRequest(c, Src, Nbytes, Name), cookie)
return ChangeCursorByNameCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeCursorByNameCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeCursorByName
+// changeCursorByNameRequest writes a ChangeCursorByName request to a byte slice.
func changeCursorByNameRequest(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Name string) []byte {
size := xgb.Pad((12 + xgb.Pad((int(Nbytes) * 1))))
b := 0
@@ -2008,30 +2136,35 @@ func changeCursorByNameRequest(c *xgb.Conn, Src xproto.Cursor, Nbytes uint16, Na
return buf
}
-// Request ExpandRegion
-// size: 20
+// ExpandRegionCookie is a cookie used only for ExpandRegion requests.
type ExpandRegionCookie struct {
*xgb.Cookie
}
-// Write request to wire for ExpandRegion
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(expandRegionRequest(c, Source, Destination, Left, Right, Top, Bottom), cookie)
return ExpandRegionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(expandRegionRequest(c, Source, Destination, Left, Right, Top, Bottom), cookie)
return ExpandRegionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 20
b := 0
@@ -2067,30 +2200,35 @@ func expandRegionRequest(c *xgb.Conn, Source Region, Destination Region, Left ui
return buf
}
-// Request HideCursor
-// size: 8
+// HideCursorCookie is a cookie used only for HideCursor requests.
type HideCursorCookie struct {
*xgb.Cookie
}
-// Write request to wire for HideCursor
+// HideCursor sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func HideCursor(c *xgb.Conn, Window xproto.Window) HideCursorCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(hideCursorRequest(c, Window), cookie)
return HideCursorCookie{cookie}
}
+// HideCursorChecked sends a checked request.
+// If an error occurs, it can be retrieved using HideCursorCookie.Check()
func HideCursorChecked(c *xgb.Conn, Window xproto.Window) HideCursorCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(hideCursorRequest(c, Window), cookie)
return HideCursorCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook HideCursorCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for HideCursor
+// hideCursorRequest writes a HideCursor request to a byte slice.
func hideCursorRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -2111,30 +2249,35 @@ func hideCursorRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request ShowCursor
-// size: 8
+// ShowCursorCookie is a cookie used only for ShowCursor requests.
type ShowCursorCookie struct {
*xgb.Cookie
}
-// Write request to wire for ShowCursor
+// ShowCursor sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ShowCursor(c *xgb.Conn, Window xproto.Window) ShowCursorCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(showCursorRequest(c, Window), cookie)
return ShowCursorCookie{cookie}
}
+// ShowCursorChecked sends a checked request.
+// If an error occurs, it can be retrieved using ShowCursorCookie.Check()
func ShowCursorChecked(c *xgb.Conn, Window xproto.Window) ShowCursorCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(showCursorRequest(c, Window), cookie)
return ShowCursorCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ShowCursorCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ShowCursor
+// showCursorRequest writes a ShowCursor request to a byte slice.
func showCursorRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
diff --git a/nexgb/xgb.go b/nexgb/xgb.go
index 75af854..50cfdba 100644
--- a/nexgb/xgb.go
+++ b/nexgb/xgb.go
@@ -118,7 +118,6 @@ func (c *Conn) Close() {
// Event is an interface that can contain any of the events returned by the
// server. Use a type assertion switch to extract the Event structs.
type Event interface {
- ImplementsEvent()
Bytes() []byte
String() string
}
@@ -141,7 +140,6 @@ var NewExtEventFuncs = make(map[string]map[int]NewEventFun)
// Error is an interface that can contain any of the errors returned by
// the server. Use a type assertion switch to extract the Error structs.
type Error interface {
- ImplementsError()
SequenceId() uint16
BadId() uint32
Error() string
diff --git a/nexgb/xgbgen/go_error.go b/nexgb/xgbgen/go_error.go
index b7721be..81a017b 100644
--- a/nexgb/xgbgen/go_error.go
+++ b/nexgb/xgbgen/go_error.go
@@ -6,9 +6,7 @@ import (
// Error types
func (e *Error) Define(c *Context) {
- c.Putln("// Error definition %s (%d)", e.SrcName(), e.Number)
- c.Putln("// Size: %s", e.Size())
- c.Putln("")
+ c.Putln("// %s is the error number for a %s.", e.ErrConst(), e.ErrConst())
c.Putln("const %s = %d", e.ErrConst(), e.Number)
c.Putln("")
c.Putln("type %s struct {", e.ErrType())
@@ -40,7 +38,8 @@ func (e *Error) Define(c *Context) {
}
func (e *Error) Read(c *Context) {
- c.Putln("// Error read %s", e.SrcName())
+ c.Putln("// %sNew constructs a %s value that implements xgb.Error from "+
+ "a byte slice.", e.ErrType(), e.ErrType())
c.Putln("func %sNew(buf []byte) xgb.Error {", e.ErrType())
c.Putln("v := %s{}", e.ErrType())
c.Putln("v.NiceName = \"%s\"", e.SrcName())
@@ -62,8 +61,9 @@ func (e *Error) Read(c *Context) {
// ImplementsError writes functions to implement the XGB Error interface.
func (e *Error) ImplementsError(c *Context) {
- c.Putln("func (err %s) ImplementsError() { }", e.ErrType())
- c.Putln("")
+ c.Putln("// SequenceId returns the sequence id attached to the %s error.",
+ e.ErrConst())
+ c.Putln("// This is mostly used internally.")
c.Putln("func (err %s) SequenceId() uint16 {", e.ErrType())
c.Putln("return err.Sequence")
c.Putln("}")
@@ -84,8 +84,7 @@ func (e *Error) ImplementsError(c *Context) {
// ErrorCopy types
func (e *ErrorCopy) Define(c *Context) {
- c.Putln("// ErrorCopy definition %s (%d)", e.SrcName(), e.Number)
- c.Putln("")
+ c.Putln("// %s is the error number for a %s.", e.ErrConst(), e.ErrConst())
c.Putln("const %s = %d", e.ErrConst(), e.Number)
c.Putln("")
c.Putln("type %s %s", e.ErrType(), e.Old.(*Error).ErrType())
@@ -111,6 +110,8 @@ func (e *ErrorCopy) Define(c *Context) {
}
func (e *ErrorCopy) Read(c *Context) {
+ c.Putln("// %sNew constructs a %s value that implements xgb.Error from "+
+ "a byte slice.", e.ErrType(), e.ErrType())
c.Putln("func %sNew(buf []byte) xgb.Error {", e.ErrType())
c.Putln("v := %s(%sNew(buf).(%s))",
e.ErrType(), e.Old.(*Error).ErrType(), e.Old.(*Error).ErrType())
@@ -122,8 +123,9 @@ func (e *ErrorCopy) Read(c *Context) {
// ImplementsError writes functions to implement the XGB Error interface.
func (e *ErrorCopy) ImplementsError(c *Context) {
- c.Putln("func (err %s) ImplementsError() { }", e.ErrType())
- c.Putln("")
+ c.Putln("// SequenceId returns the sequence id attached to the %s error.",
+ e.ErrConst())
+ c.Putln("// This is mostly used internally.")
c.Putln("func (err %s) SequenceId() uint16 {", e.ErrType())
c.Putln("return err.Sequence")
c.Putln("}")
diff --git a/nexgb/xgbgen/go_event.go b/nexgb/xgbgen/go_event.go
index d7ef109..9b5e748 100644
--- a/nexgb/xgbgen/go_event.go
+++ b/nexgb/xgbgen/go_event.go
@@ -6,9 +6,7 @@ import (
// Event types
func (e *Event) Define(c *Context) {
- c.Putln("// Event definition %s (%d)", e.SrcName(), e.Number)
- c.Putln("// Size: %s", e.Size())
- c.Putln("")
+ c.Putln("// %s is the event number for a %s.", e.SrcName(), e.EvType())
c.Putln("const %s = %d", e.SrcName(), e.Number)
c.Putln("")
c.Putln("type %s struct {", e.EvType())
@@ -30,8 +28,10 @@ func (e *Event) Define(c *Context) {
e.Write(c)
// Makes sure that this event type is an Event interface.
- c.Putln("func (v %s) ImplementsEvent() { }", e.EvType())
- c.Putln("")
+ c.Putln("// SequenceId returns the sequence id attached to the %s event.",
+ e.SrcName())
+ c.Putln("// Events without a sequence number (KeymapNotify) return 0.")
+ c.Putln("// This is mostly used internally.")
c.Putln("func (v %s) SequenceId() uint16 {", e.EvType())
if e.NoSequence {
c.Putln("return uint16(0)")
@@ -40,6 +40,8 @@ func (e *Event) Define(c *Context) {
}
c.Putln("}")
c.Putln("")
+ c.Putln("// String is a rudimentary string representation of %s.",
+ e.EvType())
c.Putln("func (v %s) String() string {", e.EvType())
EventFieldString(c, e.Fields, e.SrcName())
c.Putln("}")
@@ -58,7 +60,8 @@ func (e *Event) Define(c *Context) {
}
func (e *Event) Read(c *Context) {
- c.Putln("// Event read %s", e.SrcName())
+ c.Putln("// %sNew constructs a %s value that implements xgb.Event from "+
+ "a byte slice.", e.EvType(), e.EvType())
c.Putln("func %sNew(buf []byte) xgb.Event {", e.EvType())
c.Putln("v := %s{}", e.EvType())
c.Putln("b := 1 // don't read event number")
@@ -78,7 +81,7 @@ func (e *Event) Read(c *Context) {
}
func (e *Event) Write(c *Context) {
- c.Putln("// Event write %s", e.SrcName())
+ c.Putln("// Bytes writes a %s value to a byte slice.", e.EvType())
c.Putln("func (v %s) Bytes() []byte {", e.EvType())
c.Putln("buf := make([]byte, %s)", e.Size())
c.Putln("b := 0")
@@ -102,8 +105,7 @@ func (e *Event) Write(c *Context) {
// EventCopy types
func (e *EventCopy) Define(c *Context) {
- c.Putln("// EventCopy definition %s (%d)", e.SrcName(), e.Number)
- c.Putln("")
+ c.Putln("// %s is the event number for a %s.", e.SrcName(), e.EvType())
c.Putln("const %s = %d", e.SrcName(), e.Number)
c.Putln("")
c.Putln("type %s %s", e.EvType(), e.Old.(*Event).EvType())
@@ -118,8 +120,10 @@ func (e *EventCopy) Define(c *Context) {
e.Write(c)
// Makes sure that this event type is an Event interface.
- c.Putln("func (v %s) ImplementsEvent() { }", e.EvType())
- c.Putln("")
+ c.Putln("// SequenceId returns the sequence id attached to the %s event.",
+ e.SrcName())
+ c.Putln("// Events without a sequence number (KeymapNotify) return 0.")
+ c.Putln("// This is mostly used internally.")
c.Putln("func (v %s) SequenceId() uint16 {", e.EvType())
if e.Old.(*Event).NoSequence {
c.Putln("return uint16(0)")
@@ -146,6 +150,8 @@ func (e *EventCopy) Define(c *Context) {
}
func (e *EventCopy) Read(c *Context) {
+ c.Putln("// %sNew constructs a %s value that implements xgb.Event from "+
+ "a byte slice.", e.EvType(), e.EvType())
c.Putln("func %sNew(buf []byte) xgb.Event {", e.EvType())
c.Putln("return %s(%sNew(buf).(%s))",
e.EvType(), e.Old.(*Event).EvType(), e.Old.(*Event).EvType())
@@ -154,6 +160,7 @@ func (e *EventCopy) Read(c *Context) {
}
func (e *EventCopy) Write(c *Context) {
+ c.Putln("// Bytes writes a %s value to a byte slice.", e.EvType())
c.Putln("func (v %s) Bytes() []byte {", e.EvType())
c.Putln("return %s(v).Bytes()", e.Old.(*Event).EvType())
c.Putln("}")
diff --git a/nexgb/xgbgen/go_request_reply.go b/nexgb/xgbgen/go_request_reply.go
index 200260c..eca0c10 100644
--- a/nexgb/xgbgen/go_request_reply.go
+++ b/nexgb/xgbgen/go_request_reply.go
@@ -6,13 +6,16 @@ import (
)
func (r *Request) Define(c *Context) {
- c.Putln("// Request %s", r.SrcName())
- c.Putln("// size: %s", r.Size(c))
+ c.Putln("// %s is a cookie used only for %s requests.",
+ r.CookieName(), r.SrcName())
c.Putln("type %s struct {", r.CookieName())
c.Putln("*xgb.Cookie")
c.Putln("}")
c.Putln("")
if r.Reply != nil {
+ c.Putln("// %s sends a checked request.", r.SrcName())
+ c.Putln("// If an error occurs, it will be returned with the reply "+
+ "by calling %s.Reply()", r.CookieName())
c.Putln("func %s(c *xgb.Conn, %s) %s {",
r.SrcName(), r.ParamNameTypes(), r.CookieName())
c.Putln("cookie := c.NewCookie(true, true)")
@@ -21,6 +24,9 @@ func (r *Request) Define(c *Context) {
c.Putln("}")
c.Putln("")
+ c.Putln("// %sUnchecked sends an unchecked request.", r.SrcName())
+ c.Putln("// If an error occurs, it can only be retrieved using " +
+ "xgb.WaitForEvent or xgb.PollForEvent.")
c.Putln("func %sUnchecked(c *xgb.Conn, %s) %s {",
r.SrcName(), r.ParamNameTypes(), r.CookieName())
c.Putln("cookie := c.NewCookie(false, true)")
@@ -31,7 +37,9 @@ func (r *Request) Define(c *Context) {
r.ReadReply(c)
} else {
- c.Putln("// Write request to wire for %s", r.SrcName())
+ c.Putln("// %s sends an unchecked request.", r.SrcName())
+ c.Putln("// If an error occurs, it can only be retrieved using " +
+ "xgb.WaitForEvent or xgb.PollForEvent.")
c.Putln("func %s(c *xgb.Conn, %s) %s {",
r.SrcName(), r.ParamNameTypes(), r.CookieName())
c.Putln("cookie := c.NewCookie(false, false)")
@@ -40,6 +48,9 @@ func (r *Request) Define(c *Context) {
c.Putln("}")
c.Putln("")
+ c.Putln("// %sChecked sends a checked request.", r.SrcName())
+ c.Putln("// If an error occurs, it can be retrieved using "+
+ "%s.Check()", r.CookieName())
c.Putln("func %sChecked(c *xgb.Conn, %s) %s {",
r.SrcName(), r.ParamNameTypes(), r.CookieName())
c.Putln("cookie := c.NewCookie(true, false)")
@@ -48,6 +59,10 @@ func (r *Request) Define(c *Context) {
c.Putln("}")
c.Putln("")
+ c.Putln("// Check returns an error if one occurred for checked " +
+ "requests that are not expecting a reply.")
+ c.Putln("// This cannot be called for requests expecting a reply, " +
+ "nor for unchecked requests.")
c.Putln("func (cook %s) Check() error {", r.CookieName())
c.Putln("return cook.Cookie.Check()")
c.Putln("}")
@@ -57,18 +72,19 @@ func (r *Request) Define(c *Context) {
}
func (r *Request) ReadReply(c *Context) {
- c.Putln("// Request reply for %s", r.SrcName())
- c.Putln("// size: %s", r.Reply.Size())
+ c.Putln("// %s represents the data returned from a %s request.",
+ r.ReplyTypeName(), r.SrcName())
c.Putln("type %s struct {", r.ReplyTypeName())
- c.Putln("Sequence uint16")
- c.Putln("Length uint32")
+ c.Putln("Sequence uint16 // sequence number of the request for this reply")
+ c.Putln("Length uint32 // number of bytes in this reply")
for _, field := range r.Reply.Fields {
field.Define(c)
}
c.Putln("}")
c.Putln("")
- c.Putln("// Waits and reads reply data from request %s", r.SrcName())
+ c.Putln("// Reply blocks and returns the reply data for a %s request.",
+ r.SrcName())
c.Putln("func (cook %s) Reply() (*%s, error) {",
r.CookieName(), r.ReplyTypeName())
c.Putln("buf, err := cook.Cookie.Reply()")
@@ -82,7 +98,8 @@ func (r *Request) ReadReply(c *Context) {
c.Putln("}")
c.Putln("")
- c.Putln("// Read reply into structure from buffer for %s", r.SrcName())
+ c.Putln("// %s reads a byte slice into a %s value.",
+ r.ReplyName(), r.ReplyTypeName())
c.Putln("func %s(buf []byte) *%s {",
r.ReplyName(), r.ReplyTypeName())
c.Putln("v := new(%s)", r.ReplyTypeName())
@@ -113,6 +130,8 @@ func (r *Request) WriteRequest(c *Context) {
c.Putln("")
}
c.Putln("// Write request to wire for %s", r.SrcName())
+ c.Putln("// %s writes a %s request to a byte slice.",
+ r.ReqName(), r.SrcName())
c.Putln("func %s(c *xgb.Conn, %s) []byte {",
r.ReqName(), r.ParamNameTypes())
c.Putln("size := %s", r.Size(c))
diff --git a/nexgb/xgbgen/go_struct.go b/nexgb/xgbgen/go_struct.go
index 7f33b21..a988893 100644
--- a/nexgb/xgbgen/go_struct.go
+++ b/nexgb/xgbgen/go_struct.go
@@ -1,8 +1,6 @@
package main
func (s *Struct) Define(c *Context) {
- c.Putln("// '%s' struct definition", s.SrcName())
- c.Putln("// Size: %s", s.Size())
c.Putln("type %s struct {", s.SrcName())
for _, field := range s.Fields {
field.Define(c)
@@ -34,7 +32,8 @@ func (s *Struct) Define(c *Context) {
// the number of bytes read off the buffer.
// 'ReadStructName' should only be used to read raw reply data from the wire.
func (s *Struct) Read(c *Context) {
- c.Putln("// Struct read %s", s.SrcName())
+ c.Putln("// %sRead reads a byte slice into a %s value.",
+ s.SrcName(), s.SrcName())
c.Putln("func %sRead(buf []byte, v *%s) int {", s.SrcName(), s.SrcName())
c.Putln("b := 0")
@@ -53,10 +52,10 @@ func (s *Struct) Read(c *Context) {
// a source (i.e., the buffer) byte slice, and a destination slice and returns
// the number of bytes read from the byte slice.
func (s *Struct) ReadList(c *Context) {
- c.Putln("// Struct list read %s", s.SrcName())
+ c.Putln("// %sReadList reads a byte slice into a list of %s values.",
+ s.SrcName(), s.SrcName())
c.Putln("func %sReadList(buf []byte, dest []%s) int {",
s.SrcName(), s.SrcName())
-
c.Putln("b := 0")
c.Putln("for i := 0; i < len(dest); i++ {")
c.Putln("dest[i] = %s{}", s.SrcName())
@@ -70,7 +69,7 @@ func (s *Struct) ReadList(c *Context) {
}
func (s *Struct) Write(c *Context) {
- c.Putln("// Struct write %s", s.SrcName())
+ c.Putln("// Bytes writes a %s value to a byte slice.", s.SrcName())
c.Putln("func (v %s) Bytes() []byte {", s.SrcName())
c.Putln("buf := make([]byte, %s)", s.Size().Reduce("v."))
c.Putln("b := 0")
@@ -85,7 +84,8 @@ func (s *Struct) Write(c *Context) {
}
func (s *Struct) WriteList(c *Context) {
- c.Putln("// Write struct list %s", s.SrcName())
+ c.Putln("// %sListBytes writes a list of %s values to a byte slice.",
+ s.SrcName())
c.Putln("func %sListBytes(buf []byte, list []%s) int {",
s.SrcName(), s.SrcName())
c.Putln("b := 0")
@@ -101,7 +101,8 @@ func (s *Struct) WriteList(c *Context) {
}
func (s *Struct) WriteListSize(c *Context) {
- c.Putln("// Struct list size %s", s.SrcName())
+ c.Putln("// %sListSize computes the size (bytes) of a list of %s values.",
+ s.SrcName(), s.SrcName())
c.Putln("func %sListSize(list []%s) int {", s.SrcName(), s.SrcName())
c.Putln("size := 0")
if s.Size().Expression.Concrete() {
diff --git a/nexgb/xgbgen/go_union.go b/nexgb/xgbgen/go_union.go
index 91300a2..1a8684c 100644
--- a/nexgb/xgbgen/go_union.go
+++ b/nexgb/xgbgen/go_union.go
@@ -2,7 +2,8 @@ package main
// Union types
func (u *Union) Define(c *Context) {
- c.Putln("// Union definition %s", u.SrcName())
+ c.Putln("// %s is a represention of the %s union type.",
+ u.SrcName(), u.SrcName())
c.Putln("// Note that to *create* a Union, you should *never* create")
c.Putln("// this struct directly (unless you know what you're doing).")
c.Putln("// Instead use one of the following constructors for '%s':",
@@ -38,8 +39,8 @@ func (u *Union) Define(c *Context) {
func (u *Union) New(c *Context) {
for _, field := range u.Fields {
- c.Putln("// Union constructor for %s for field %s.",
- u.SrcName(), field.SrcName())
+ c.Putln("// %s%sNew constructs a new %s union type with the %s field.",
+ u.SrcName(), field.SrcName(), u.SrcName(), field.SrcName())
c.Putln("func %s%sNew(%s %s) %s {",
u.SrcName(), field.SrcName(), field.SrcName(),
field.SrcType(), u.SrcName())
@@ -65,7 +66,8 @@ func (u *Union) New(c *Context) {
}
func (u *Union) Read(c *Context) {
- c.Putln("// Union read %s", u.SrcName())
+ c.Putln("// %sRead reads a byte slice into a %s value.",
+ u.SrcName(), u.SrcName())
c.Putln("func %sRead(buf []byte, v *%s) int {", u.SrcName(), u.SrcName())
c.Putln("var b int")
c.Putln("")
@@ -80,7 +82,8 @@ func (u *Union) Read(c *Context) {
}
func (u *Union) ReadList(c *Context) {
- c.Putln("// Union list read %s", u.SrcName())
+ c.Putln("// %sReadList reads a byte slice into a list of %s values.",
+ u.SrcName(), u.SrcName())
c.Putln("func %sReadList(buf []byte, dest []%s) int {",
u.SrcName(), u.SrcName())
c.Putln("b := 0")
@@ -99,7 +102,7 @@ func (u *Union) ReadList(c *Context) {
// *same* *fixed* size. Thus, we make sure to always read bytes into
// every field which allows us to simply pick the first field and write it.
func (u *Union) Write(c *Context) {
- c.Putln("// Union write %s", u.SrcName())
+ c.Putln("// Bytes writes a %s value to a byte slice.", u.SrcName())
c.Putln("// Each field in a union must contain the same data.")
c.Putln("// So simply pick the first field and write that to the wire.")
c.Putln("func (v %s) Bytes() []byte {", u.SrcName())
@@ -113,7 +116,8 @@ func (u *Union) Write(c *Context) {
}
func (u *Union) WriteList(c *Context) {
- c.Putln("// Union list write %s", u.SrcName())
+ c.Putln("// %sListBytes writes a list of %s values to a byte slice.",
+ u.SrcName())
c.Putln("func %sListBytes(buf []byte, list []%s) int {",
u.SrcName(), u.SrcName())
c.Putln("b := 0")
@@ -130,6 +134,8 @@ func (u *Union) WriteList(c *Context) {
func (u *Union) WriteListSize(c *Context) {
c.Putln("// Union list size %s", u.SrcName())
+ c.Putln("// %sListSize computes the size (bytes) of a list of %s values.",
+ u.SrcName())
c.Putln("func %sListSize(list []%s) int {", u.SrcName(), u.SrcName())
c.Putln("size := 0")
c.Putln("for _, item := range list {")
diff --git a/nexgb/xinerama/xinerama.go b/nexgb/xinerama/xinerama.go
index 587b628..cc4eaaa 100644
--- a/nexgb/xinerama/xinerama.go
+++ b/nexgb/xinerama/xinerama.go
@@ -2,7 +2,7 @@
package xinerama
/*
- This file was generated by xinerama.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by xinerama.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -64,8 +64,6 @@ func init() {
// Skipping definition for base type 'Card8'
-// 'ScreenInfo' struct definition
-// Size: 8
type ScreenInfo struct {
XOrg int16
YOrg int16
@@ -73,7 +71,7 @@ type ScreenInfo struct {
Height uint16
}
-// Struct read ScreenInfo
+// ScreenInfoRead reads a byte slice into a ScreenInfo value.
func ScreenInfoRead(buf []byte, v *ScreenInfo) int {
b := 0
@@ -92,7 +90,7 @@ func ScreenInfoRead(buf []byte, v *ScreenInfo) int {
return b
}
-// Struct list read ScreenInfo
+// ScreenInfoReadList reads a byte slice into a list of ScreenInfo values.
func ScreenInfoReadList(buf []byte, dest []ScreenInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -102,7 +100,7 @@ func ScreenInfoReadList(buf []byte, dest []ScreenInfo) int {
return xgb.Pad(b)
}
-// Struct write ScreenInfo
+// Bytes writes a ScreenInfo value to a byte slice.
func (v ScreenInfo) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -122,7 +120,7 @@ func (v ScreenInfo) Bytes() []byte {
return buf
}
-// Write struct list ScreenInfo
+// ScreenInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func ScreenInfoListBytes(buf []byte, list []ScreenInfo) int {
b := 0
var structBytes []byte
@@ -134,35 +132,37 @@ func ScreenInfoListBytes(buf []byte, list []ScreenInfo) int {
return b
}
-// Request QueryVersion
-// size: 8
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, Major, Minor), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, Major, Minor), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 12
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Major uint16
Minor uint16
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -174,7 +174,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -197,6 +197,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 8
b := 0
@@ -220,34 +221,36 @@ func queryVersionRequest(c *xgb.Conn, Major byte, Minor byte) []byte {
return buf
}
-// Request GetState
-// size: 8
+// GetStateCookie is a cookie used only for GetState requests.
type GetStateCookie struct {
*xgb.Cookie
}
+// GetState sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetStateCookie.Reply()
func GetState(c *xgb.Conn, Window xproto.Window) GetStateCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getStateRequest(c, Window), cookie)
return GetStateCookie{cookie}
}
+// GetStateUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetStateUnchecked(c *xgb.Conn, Window xproto.Window) GetStateCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getStateRequest(c, Window), cookie)
return GetStateCookie{cookie}
}
-// Request reply for GetState
-// size: 12
+// GetStateReply represents the data returned from a GetState request.
type GetStateReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
State byte
Window xproto.Window
}
-// Waits and reads reply data from request GetState
+// Reply blocks and returns the reply data for a GetState request.
func (cook GetStateCookie) Reply() (*GetStateReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -259,7 +262,7 @@ func (cook GetStateCookie) Reply() (*GetStateReply, error) {
return getStateReply(buf), nil
}
-// Read reply into structure from buffer for GetState
+// getStateReply reads a byte slice into a GetStateReply value.
func getStateReply(buf []byte) *GetStateReply {
v := new(GetStateReply)
b := 1 // skip reply determinant
@@ -280,6 +283,7 @@ func getStateReply(buf []byte) *GetStateReply {
}
// Write request to wire for GetState
+// getStateRequest writes a GetState request to a byte slice.
func getStateRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -300,34 +304,36 @@ func getStateRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request GetScreenCount
-// size: 8
+// GetScreenCountCookie is a cookie used only for GetScreenCount requests.
type GetScreenCountCookie struct {
*xgb.Cookie
}
+// GetScreenCount sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetScreenCountCookie.Reply()
func GetScreenCount(c *xgb.Conn, Window xproto.Window) GetScreenCountCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getScreenCountRequest(c, Window), cookie)
return GetScreenCountCookie{cookie}
}
+// GetScreenCountUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetScreenCountUnchecked(c *xgb.Conn, Window xproto.Window) GetScreenCountCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getScreenCountRequest(c, Window), cookie)
return GetScreenCountCookie{cookie}
}
-// Request reply for GetScreenCount
-// size: 12
+// GetScreenCountReply represents the data returned from a GetScreenCount request.
type GetScreenCountReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
ScreenCount byte
Window xproto.Window
}
-// Waits and reads reply data from request GetScreenCount
+// Reply blocks and returns the reply data for a GetScreenCount request.
func (cook GetScreenCountCookie) Reply() (*GetScreenCountReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -339,7 +345,7 @@ func (cook GetScreenCountCookie) Reply() (*GetScreenCountReply, error) {
return getScreenCountReply(buf), nil
}
-// Read reply into structure from buffer for GetScreenCount
+// getScreenCountReply reads a byte slice into a GetScreenCountReply value.
func getScreenCountReply(buf []byte) *GetScreenCountReply {
v := new(GetScreenCountReply)
b := 1 // skip reply determinant
@@ -360,6 +366,7 @@ func getScreenCountReply(buf []byte) *GetScreenCountReply {
}
// Write request to wire for GetScreenCount
+// getScreenCountRequest writes a GetScreenCount request to a byte slice.
func getScreenCountRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -380,29 +387,31 @@ func getScreenCountRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request GetScreenSize
-// size: 12
+// GetScreenSizeCookie is a cookie used only for GetScreenSize requests.
type GetScreenSizeCookie struct {
*xgb.Cookie
}
+// GetScreenSize sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getScreenSizeRequest(c, Window, Screen), cookie)
return GetScreenSizeCookie{cookie}
}
+// GetScreenSizeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetScreenSizeUnchecked(c *xgb.Conn, Window xproto.Window, Screen uint32) GetScreenSizeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getScreenSizeRequest(c, Window, Screen), cookie)
return GetScreenSizeCookie{cookie}
}
-// Request reply for GetScreenSize
-// size: 24
+// GetScreenSizeReply represents the data returned from a GetScreenSize request.
type GetScreenSizeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Width uint32
Height uint32
@@ -410,7 +419,7 @@ type GetScreenSizeReply struct {
Screen uint32
}
-// Waits and reads reply data from request GetScreenSize
+// Reply blocks and returns the reply data for a GetScreenSize request.
func (cook GetScreenSizeCookie) Reply() (*GetScreenSizeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -422,7 +431,7 @@ func (cook GetScreenSizeCookie) Reply() (*GetScreenSizeReply, error) {
return getScreenSizeReply(buf), nil
}
-// Read reply into structure from buffer for GetScreenSize
+// getScreenSizeReply reads a byte slice into a GetScreenSizeReply value.
func getScreenSizeReply(buf []byte) *GetScreenSizeReply {
v := new(GetScreenSizeReply)
b := 1 // skip reply determinant
@@ -451,6 +460,7 @@ func getScreenSizeReply(buf []byte) *GetScreenSizeReply {
}
// Write request to wire for GetScreenSize
+// getScreenSizeRequest writes a GetScreenSize request to a byte slice.
func getScreenSizeRequest(c *xgb.Conn, Window xproto.Window, Screen uint32) []byte {
size := 12
b := 0
@@ -474,34 +484,36 @@ func getScreenSizeRequest(c *xgb.Conn, Window xproto.Window, Screen uint32) []by
return buf
}
-// Request IsActive
-// size: 4
+// IsActiveCookie is a cookie used only for IsActive requests.
type IsActiveCookie struct {
*xgb.Cookie
}
+// IsActive sends a checked request.
+// If an error occurs, it will be returned with the reply by calling IsActiveCookie.Reply()
func IsActive(c *xgb.Conn) IsActiveCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(isActiveRequest(c), cookie)
return IsActiveCookie{cookie}
}
+// IsActiveUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func IsActiveUnchecked(c *xgb.Conn) IsActiveCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(isActiveRequest(c), cookie)
return IsActiveCookie{cookie}
}
-// Request reply for IsActive
-// size: 12
+// IsActiveReply represents the data returned from a IsActive request.
type IsActiveReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
State uint32
}
-// Waits and reads reply data from request IsActive
+// Reply blocks and returns the reply data for a IsActive request.
func (cook IsActiveCookie) Reply() (*IsActiveReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -513,7 +525,7 @@ func (cook IsActiveCookie) Reply() (*IsActiveReply, error) {
return isActiveReply(buf), nil
}
-// Read reply into structure from buffer for IsActive
+// isActiveReply reads a byte slice into a IsActiveReply value.
func isActiveReply(buf []byte) *IsActiveReply {
v := new(IsActiveReply)
b := 1 // skip reply determinant
@@ -533,6 +545,7 @@ func isActiveReply(buf []byte) *IsActiveReply {
}
// Write request to wire for IsActive
+// isActiveRequest writes a IsActive request to a byte slice.
func isActiveRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -550,36 +563,38 @@ func isActiveRequest(c *xgb.Conn) []byte {
return buf
}
-// Request QueryScreens
-// size: 4
+// QueryScreensCookie is a cookie used only for QueryScreens requests.
type QueryScreensCookie struct {
*xgb.Cookie
}
+// QueryScreens sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryScreensCookie.Reply()
func QueryScreens(c *xgb.Conn) QueryScreensCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryScreensRequest(c), cookie)
return QueryScreensCookie{cookie}
}
+// QueryScreensUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryScreensUnchecked(c *xgb.Conn) QueryScreensCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryScreensRequest(c), cookie)
return QueryScreensCookie{cookie}
}
-// Request reply for QueryScreens
-// size: (32 + xgb.Pad((int(Number) * 8)))
+// QueryScreensReply represents the data returned from a QueryScreens request.
type QueryScreensReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Number uint32
// padding: 20 bytes
ScreenInfo []ScreenInfo // size: xgb.Pad((int(Number) * 8))
}
-// Waits and reads reply data from request QueryScreens
+// Reply blocks and returns the reply data for a QueryScreens request.
func (cook QueryScreensCookie) Reply() (*QueryScreensReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -591,7 +606,7 @@ func (cook QueryScreensCookie) Reply() (*QueryScreensReply, error) {
return queryScreensReply(buf), nil
}
-// Read reply into structure from buffer for QueryScreens
+// queryScreensReply reads a byte slice into a QueryScreensReply value.
func queryScreensReply(buf []byte) *QueryScreensReply {
v := new(QueryScreensReply)
b := 1 // skip reply determinant
@@ -616,6 +631,7 @@ func queryScreensReply(buf []byte) *QueryScreensReply {
}
// Write request to wire for QueryScreens
+// queryScreensRequest writes a QueryScreens request to a byte slice.
func queryScreensRequest(c *xgb.Conn) []byte {
size := 4
b := 0
diff --git a/nexgb/xinput/xinput.go b/nexgb/xinput/xinput.go
index cdb0fec..2c2247c 100644
--- a/nexgb/xinput/xinput.go
+++ b/nexgb/xinput/xinput.go
@@ -2,7 +2,7 @@
package xinput
/*
- This file was generated by xinput.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by xinput.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -114,8 +114,6 @@ type KeyCode byte
type EventClass uint32
-// 'DeviceInfo' struct definition
-// Size: 8
type DeviceInfo struct {
DeviceType xproto.Atom
DeviceId byte
@@ -124,7 +122,7 @@ type DeviceInfo struct {
// padding: 1 bytes
}
-// Struct read DeviceInfo
+// DeviceInfoRead reads a byte slice into a DeviceInfo value.
func DeviceInfoRead(buf []byte, v *DeviceInfo) int {
b := 0
@@ -145,7 +143,7 @@ func DeviceInfoRead(buf []byte, v *DeviceInfo) int {
return b
}
-// Struct list read DeviceInfo
+// DeviceInfoReadList reads a byte slice into a list of DeviceInfo values.
func DeviceInfoReadList(buf []byte, dest []DeviceInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -155,7 +153,7 @@ func DeviceInfoReadList(buf []byte, dest []DeviceInfo) int {
return xgb.Pad(b)
}
-// Struct write DeviceInfo
+// Bytes writes a DeviceInfo value to a byte slice.
func (v DeviceInfo) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -177,7 +175,7 @@ func (v DeviceInfo) Bytes() []byte {
return buf
}
-// Write struct list DeviceInfo
+// DeviceInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceInfoListBytes(buf []byte, list []DeviceInfo) int {
b := 0
var structBytes []byte
@@ -189,14 +187,12 @@ func DeviceInfoListBytes(buf []byte, list []DeviceInfo) int {
return b
}
-// 'InputInfo' struct definition
-// Size: 2
type InputInfo struct {
ClassId byte
Len byte
}
-// Struct read InputInfo
+// InputInfoRead reads a byte slice into a InputInfo value.
func InputInfoRead(buf []byte, v *InputInfo) int {
b := 0
@@ -209,7 +205,7 @@ func InputInfoRead(buf []byte, v *InputInfo) int {
return b
}
-// Struct list read InputInfo
+// InputInfoReadList reads a byte slice into a list of InputInfo values.
func InputInfoReadList(buf []byte, dest []InputInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -219,7 +215,7 @@ func InputInfoReadList(buf []byte, dest []InputInfo) int {
return xgb.Pad(b)
}
-// Struct write InputInfo
+// Bytes writes a InputInfo value to a byte slice.
func (v InputInfo) Bytes() []byte {
buf := make([]byte, 2)
b := 0
@@ -233,7 +229,7 @@ func (v InputInfo) Bytes() []byte {
return buf
}
-// Write struct list InputInfo
+// InputInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func InputInfoListBytes(buf []byte, list []InputInfo) int {
b := 0
var structBytes []byte
@@ -245,8 +241,6 @@ func InputInfoListBytes(buf []byte, list []InputInfo) int {
return b
}
-// 'KeyInfo' struct definition
-// Size: 8
type KeyInfo struct {
ClassId byte
Len byte
@@ -256,7 +250,7 @@ type KeyInfo struct {
// padding: 2 bytes
}
-// Struct read KeyInfo
+// KeyInfoRead reads a byte slice into a KeyInfo value.
func KeyInfoRead(buf []byte, v *KeyInfo) int {
b := 0
@@ -280,7 +274,7 @@ func KeyInfoRead(buf []byte, v *KeyInfo) int {
return b
}
-// Struct list read KeyInfo
+// KeyInfoReadList reads a byte slice into a list of KeyInfo values.
func KeyInfoReadList(buf []byte, dest []KeyInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -290,7 +284,7 @@ func KeyInfoReadList(buf []byte, dest []KeyInfo) int {
return xgb.Pad(b)
}
-// Struct write KeyInfo
+// Bytes writes a KeyInfo value to a byte slice.
func (v KeyInfo) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -315,7 +309,7 @@ func (v KeyInfo) Bytes() []byte {
return buf
}
-// Write struct list KeyInfo
+// KeyInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func KeyInfoListBytes(buf []byte, list []KeyInfo) int {
b := 0
var structBytes []byte
@@ -327,15 +321,13 @@ func KeyInfoListBytes(buf []byte, list []KeyInfo) int {
return b
}
-// 'ButtonInfo' struct definition
-// Size: 4
type ButtonInfo struct {
ClassId byte
Len byte
NumButtons uint16
}
-// Struct read ButtonInfo
+// ButtonInfoRead reads a byte slice into a ButtonInfo value.
func ButtonInfoRead(buf []byte, v *ButtonInfo) int {
b := 0
@@ -351,7 +343,7 @@ func ButtonInfoRead(buf []byte, v *ButtonInfo) int {
return b
}
-// Struct list read ButtonInfo
+// ButtonInfoReadList reads a byte slice into a list of ButtonInfo values.
func ButtonInfoReadList(buf []byte, dest []ButtonInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -361,7 +353,7 @@ func ButtonInfoReadList(buf []byte, dest []ButtonInfo) int {
return xgb.Pad(b)
}
-// Struct write ButtonInfo
+// Bytes writes a ButtonInfo value to a byte slice.
func (v ButtonInfo) Bytes() []byte {
buf := make([]byte, 4)
b := 0
@@ -378,7 +370,7 @@ func (v ButtonInfo) Bytes() []byte {
return buf
}
-// Write struct list ButtonInfo
+// ButtonInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func ButtonInfoListBytes(buf []byte, list []ButtonInfo) int {
b := 0
var structBytes []byte
@@ -390,15 +382,13 @@ func ButtonInfoListBytes(buf []byte, list []ButtonInfo) int {
return b
}
-// 'AxisInfo' struct definition
-// Size: 12
type AxisInfo struct {
Resolution uint32
Minimum int32
Maximum int32
}
-// Struct read AxisInfo
+// AxisInfoRead reads a byte slice into a AxisInfo value.
func AxisInfoRead(buf []byte, v *AxisInfo) int {
b := 0
@@ -414,7 +404,7 @@ func AxisInfoRead(buf []byte, v *AxisInfo) int {
return b
}
-// Struct list read AxisInfo
+// AxisInfoReadList reads a byte slice into a list of AxisInfo values.
func AxisInfoReadList(buf []byte, dest []AxisInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -424,7 +414,7 @@ func AxisInfoReadList(buf []byte, dest []AxisInfo) int {
return xgb.Pad(b)
}
-// Struct write AxisInfo
+// Bytes writes a AxisInfo value to a byte slice.
func (v AxisInfo) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -441,7 +431,7 @@ func (v AxisInfo) Bytes() []byte {
return buf
}
-// Write struct list AxisInfo
+// AxisInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func AxisInfoListBytes(buf []byte, list []AxisInfo) int {
b := 0
var structBytes []byte
@@ -453,8 +443,6 @@ func AxisInfoListBytes(buf []byte, list []AxisInfo) int {
return b
}
-// 'ValuatorInfo' struct definition
-// Size: (8 + xgb.Pad((int(AxesLen) * 12)))
type ValuatorInfo struct {
ClassId byte
Len byte
@@ -464,7 +452,7 @@ type ValuatorInfo struct {
Axes []AxisInfo // size: xgb.Pad((int(AxesLen) * 12))
}
-// Struct read ValuatorInfo
+// ValuatorInfoRead reads a byte slice into a ValuatorInfo value.
func ValuatorInfoRead(buf []byte, v *ValuatorInfo) int {
b := 0
@@ -489,7 +477,7 @@ func ValuatorInfoRead(buf []byte, v *ValuatorInfo) int {
return b
}
-// Struct list read ValuatorInfo
+// ValuatorInfoReadList reads a byte slice into a list of ValuatorInfo values.
func ValuatorInfoReadList(buf []byte, dest []ValuatorInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -499,7 +487,7 @@ func ValuatorInfoReadList(buf []byte, dest []ValuatorInfo) int {
return xgb.Pad(b)
}
-// Struct write ValuatorInfo
+// Bytes writes a ValuatorInfo value to a byte slice.
func (v ValuatorInfo) Bytes() []byte {
buf := make([]byte, (8 + xgb.Pad((int(v.AxesLen) * 12))))
b := 0
@@ -524,7 +512,7 @@ func (v ValuatorInfo) Bytes() []byte {
return buf
}
-// Write struct list ValuatorInfo
+// ValuatorInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func ValuatorInfoListBytes(buf []byte, list []ValuatorInfo) int {
b := 0
var structBytes []byte
@@ -536,7 +524,7 @@ func ValuatorInfoListBytes(buf []byte, list []ValuatorInfo) int {
return b
}
-// Struct list size ValuatorInfo
+// ValuatorInfoListSize computes the size (bytes) of a list of ValuatorInfo values.
func ValuatorInfoListSize(list []ValuatorInfo) int {
size := 0
for _, item := range list {
@@ -545,14 +533,12 @@ func ValuatorInfoListSize(list []ValuatorInfo) int {
return size
}
-// 'InputClassInfo' struct definition
-// Size: 2
type InputClassInfo struct {
ClassId byte
EventTypeBase byte
}
-// Struct read InputClassInfo
+// InputClassInfoRead reads a byte slice into a InputClassInfo value.
func InputClassInfoRead(buf []byte, v *InputClassInfo) int {
b := 0
@@ -565,7 +551,7 @@ func InputClassInfoRead(buf []byte, v *InputClassInfo) int {
return b
}
-// Struct list read InputClassInfo
+// InputClassInfoReadList reads a byte slice into a list of InputClassInfo values.
func InputClassInfoReadList(buf []byte, dest []InputClassInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -575,7 +561,7 @@ func InputClassInfoReadList(buf []byte, dest []InputClassInfo) int {
return xgb.Pad(b)
}
-// Struct write InputClassInfo
+// Bytes writes a InputClassInfo value to a byte slice.
func (v InputClassInfo) Bytes() []byte {
buf := make([]byte, 2)
b := 0
@@ -589,7 +575,7 @@ func (v InputClassInfo) Bytes() []byte {
return buf
}
-// Write struct list InputClassInfo
+// InputClassInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func InputClassInfoListBytes(buf []byte, list []InputClassInfo) int {
b := 0
var structBytes []byte
@@ -601,13 +587,11 @@ func InputClassInfoListBytes(buf []byte, list []InputClassInfo) int {
return b
}
-// 'DeviceTimeCoord' struct definition
-// Size: 4
type DeviceTimeCoord struct {
Time xproto.Timestamp
}
-// Struct read DeviceTimeCoord
+// DeviceTimeCoordRead reads a byte slice into a DeviceTimeCoord value.
func DeviceTimeCoordRead(buf []byte, v *DeviceTimeCoord) int {
b := 0
@@ -617,7 +601,7 @@ func DeviceTimeCoordRead(buf []byte, v *DeviceTimeCoord) int {
return b
}
-// Struct list read DeviceTimeCoord
+// DeviceTimeCoordReadList reads a byte slice into a list of DeviceTimeCoord values.
func DeviceTimeCoordReadList(buf []byte, dest []DeviceTimeCoord) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -627,7 +611,7 @@ func DeviceTimeCoordReadList(buf []byte, dest []DeviceTimeCoord) int {
return xgb.Pad(b)
}
-// Struct write DeviceTimeCoord
+// Bytes writes a DeviceTimeCoord value to a byte slice.
func (v DeviceTimeCoord) Bytes() []byte {
buf := make([]byte, 4)
b := 0
@@ -638,7 +622,7 @@ func (v DeviceTimeCoord) Bytes() []byte {
return buf
}
-// Write struct list DeviceTimeCoord
+// DeviceTimeCoordListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceTimeCoordListBytes(buf []byte, list []DeviceTimeCoord) int {
b := 0
var structBytes []byte
@@ -650,15 +634,13 @@ func DeviceTimeCoordListBytes(buf []byte, list []DeviceTimeCoord) int {
return b
}
-// 'FeedbackState' struct definition
-// Size: 4
type FeedbackState struct {
ClassId byte
Id byte
Len uint16
}
-// Struct read FeedbackState
+// FeedbackStateRead reads a byte slice into a FeedbackState value.
func FeedbackStateRead(buf []byte, v *FeedbackState) int {
b := 0
@@ -674,7 +656,7 @@ func FeedbackStateRead(buf []byte, v *FeedbackState) int {
return b
}
-// Struct list read FeedbackState
+// FeedbackStateReadList reads a byte slice into a list of FeedbackState values.
func FeedbackStateReadList(buf []byte, dest []FeedbackState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -684,7 +666,7 @@ func FeedbackStateReadList(buf []byte, dest []FeedbackState) int {
return xgb.Pad(b)
}
-// Struct write FeedbackState
+// Bytes writes a FeedbackState value to a byte slice.
func (v FeedbackState) Bytes() []byte {
buf := make([]byte, 4)
b := 0
@@ -701,7 +683,7 @@ func (v FeedbackState) Bytes() []byte {
return buf
}
-// Write struct list FeedbackState
+// FeedbackStateListBytes writes a list of %s(MISSING) values to a byte slice.
func FeedbackStateListBytes(buf []byte, list []FeedbackState) int {
b := 0
var structBytes []byte
@@ -713,8 +695,6 @@ func FeedbackStateListBytes(buf []byte, list []FeedbackState) int {
return b
}
-// 'KbdFeedbackState' struct definition
-// Size: 52
type KbdFeedbackState struct {
ClassId byte
Id byte
@@ -730,7 +710,7 @@ type KbdFeedbackState struct {
AutoRepeats []byte // size: 32
}
-// Struct read KbdFeedbackState
+// KbdFeedbackStateRead reads a byte slice into a KbdFeedbackState value.
func KbdFeedbackStateRead(buf []byte, v *KbdFeedbackState) int {
b := 0
@@ -777,7 +757,7 @@ func KbdFeedbackStateRead(buf []byte, v *KbdFeedbackState) int {
return b
}
-// Struct list read KbdFeedbackState
+// KbdFeedbackStateReadList reads a byte slice into a list of KbdFeedbackState values.
func KbdFeedbackStateReadList(buf []byte, dest []KbdFeedbackState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -787,7 +767,7 @@ func KbdFeedbackStateReadList(buf []byte, dest []KbdFeedbackState) int {
return xgb.Pad(b)
}
-// Struct write KbdFeedbackState
+// Bytes writes a KbdFeedbackState value to a byte slice.
func (v KbdFeedbackState) Bytes() []byte {
buf := make([]byte, 52)
b := 0
@@ -834,7 +814,7 @@ func (v KbdFeedbackState) Bytes() []byte {
return buf
}
-// Write struct list KbdFeedbackState
+// KbdFeedbackStateListBytes writes a list of %s(MISSING) values to a byte slice.
func KbdFeedbackStateListBytes(buf []byte, list []KbdFeedbackState) int {
b := 0
var structBytes []byte
@@ -846,7 +826,7 @@ func KbdFeedbackStateListBytes(buf []byte, list []KbdFeedbackState) int {
return b
}
-// Struct list size KbdFeedbackState
+// KbdFeedbackStateListSize computes the size (bytes) of a list of KbdFeedbackState values.
func KbdFeedbackStateListSize(list []KbdFeedbackState) int {
size := 0
for _ = range list {
@@ -855,8 +835,6 @@ func KbdFeedbackStateListSize(list []KbdFeedbackState) int {
return size
}
-// 'PtrFeedbackState' struct definition
-// Size: 12
type PtrFeedbackState struct {
ClassId byte
Id byte
@@ -867,7 +845,7 @@ type PtrFeedbackState struct {
Threshold uint16
}
-// Struct read PtrFeedbackState
+// PtrFeedbackStateRead reads a byte slice into a PtrFeedbackState value.
func PtrFeedbackStateRead(buf []byte, v *PtrFeedbackState) int {
b := 0
@@ -894,7 +872,7 @@ func PtrFeedbackStateRead(buf []byte, v *PtrFeedbackState) int {
return b
}
-// Struct list read PtrFeedbackState
+// PtrFeedbackStateReadList reads a byte slice into a list of PtrFeedbackState values.
func PtrFeedbackStateReadList(buf []byte, dest []PtrFeedbackState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -904,7 +882,7 @@ func PtrFeedbackStateReadList(buf []byte, dest []PtrFeedbackState) int {
return xgb.Pad(b)
}
-// Struct write PtrFeedbackState
+// Bytes writes a PtrFeedbackState value to a byte slice.
func (v PtrFeedbackState) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -932,7 +910,7 @@ func (v PtrFeedbackState) Bytes() []byte {
return buf
}
-// Write struct list PtrFeedbackState
+// PtrFeedbackStateListBytes writes a list of %s(MISSING) values to a byte slice.
func PtrFeedbackStateListBytes(buf []byte, list []PtrFeedbackState) int {
b := 0
var structBytes []byte
@@ -944,8 +922,6 @@ func PtrFeedbackStateListBytes(buf []byte, list []PtrFeedbackState) int {
return b
}
-// 'IntegerFeedbackState' struct definition
-// Size: 16
type IntegerFeedbackState struct {
ClassId byte
Id byte
@@ -955,7 +931,7 @@ type IntegerFeedbackState struct {
MaxValue int32
}
-// Struct read IntegerFeedbackState
+// IntegerFeedbackStateRead reads a byte slice into a IntegerFeedbackState value.
func IntegerFeedbackStateRead(buf []byte, v *IntegerFeedbackState) int {
b := 0
@@ -980,7 +956,7 @@ func IntegerFeedbackStateRead(buf []byte, v *IntegerFeedbackState) int {
return b
}
-// Struct list read IntegerFeedbackState
+// IntegerFeedbackStateReadList reads a byte slice into a list of IntegerFeedbackState values.
func IntegerFeedbackStateReadList(buf []byte, dest []IntegerFeedbackState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -990,7 +966,7 @@ func IntegerFeedbackStateReadList(buf []byte, dest []IntegerFeedbackState) int {
return xgb.Pad(b)
}
-// Struct write IntegerFeedbackState
+// Bytes writes a IntegerFeedbackState value to a byte slice.
func (v IntegerFeedbackState) Bytes() []byte {
buf := make([]byte, 16)
b := 0
@@ -1016,7 +992,7 @@ func (v IntegerFeedbackState) Bytes() []byte {
return buf
}
-// Write struct list IntegerFeedbackState
+// IntegerFeedbackStateListBytes writes a list of %s(MISSING) values to a byte slice.
func IntegerFeedbackStateListBytes(buf []byte, list []IntegerFeedbackState) int {
b := 0
var structBytes []byte
@@ -1028,8 +1004,6 @@ func IntegerFeedbackStateListBytes(buf []byte, list []IntegerFeedbackState) int
return b
}
-// 'StringFeedbackState' struct definition
-// Size: (8 + xgb.Pad((int(NumKeysyms) * 4)))
type StringFeedbackState struct {
ClassId byte
Id byte
@@ -1039,7 +1013,7 @@ type StringFeedbackState struct {
Keysyms []xproto.Keysym // size: xgb.Pad((int(NumKeysyms) * 4))
}
-// Struct read StringFeedbackState
+// StringFeedbackStateRead reads a byte slice into a StringFeedbackState value.
func StringFeedbackStateRead(buf []byte, v *StringFeedbackState) int {
b := 0
@@ -1068,7 +1042,7 @@ func StringFeedbackStateRead(buf []byte, v *StringFeedbackState) int {
return b
}
-// Struct list read StringFeedbackState
+// StringFeedbackStateReadList reads a byte slice into a list of StringFeedbackState values.
func StringFeedbackStateReadList(buf []byte, dest []StringFeedbackState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1078,7 +1052,7 @@ func StringFeedbackStateReadList(buf []byte, dest []StringFeedbackState) int {
return xgb.Pad(b)
}
-// Struct write StringFeedbackState
+// Bytes writes a StringFeedbackState value to a byte slice.
func (v StringFeedbackState) Bytes() []byte {
buf := make([]byte, (8 + xgb.Pad((int(v.NumKeysyms) * 4))))
b := 0
@@ -1107,7 +1081,7 @@ func (v StringFeedbackState) Bytes() []byte {
return buf
}
-// Write struct list StringFeedbackState
+// StringFeedbackStateListBytes writes a list of %s(MISSING) values to a byte slice.
func StringFeedbackStateListBytes(buf []byte, list []StringFeedbackState) int {
b := 0
var structBytes []byte
@@ -1119,7 +1093,7 @@ func StringFeedbackStateListBytes(buf []byte, list []StringFeedbackState) int {
return b
}
-// Struct list size StringFeedbackState
+// StringFeedbackStateListSize computes the size (bytes) of a list of StringFeedbackState values.
func StringFeedbackStateListSize(list []StringFeedbackState) int {
size := 0
for _, item := range list {
@@ -1128,8 +1102,6 @@ func StringFeedbackStateListSize(list []StringFeedbackState) int {
return size
}
-// 'BellFeedbackState' struct definition
-// Size: 12
type BellFeedbackState struct {
ClassId byte
Id byte
@@ -1140,7 +1112,7 @@ type BellFeedbackState struct {
Duration uint16
}
-// Struct read BellFeedbackState
+// BellFeedbackStateRead reads a byte slice into a BellFeedbackState value.
func BellFeedbackStateRead(buf []byte, v *BellFeedbackState) int {
b := 0
@@ -1167,7 +1139,7 @@ func BellFeedbackStateRead(buf []byte, v *BellFeedbackState) int {
return b
}
-// Struct list read BellFeedbackState
+// BellFeedbackStateReadList reads a byte slice into a list of BellFeedbackState values.
func BellFeedbackStateReadList(buf []byte, dest []BellFeedbackState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1177,7 +1149,7 @@ func BellFeedbackStateReadList(buf []byte, dest []BellFeedbackState) int {
return xgb.Pad(b)
}
-// Struct write BellFeedbackState
+// Bytes writes a BellFeedbackState value to a byte slice.
func (v BellFeedbackState) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -1205,7 +1177,7 @@ func (v BellFeedbackState) Bytes() []byte {
return buf
}
-// Write struct list BellFeedbackState
+// BellFeedbackStateListBytes writes a list of %s(MISSING) values to a byte slice.
func BellFeedbackStateListBytes(buf []byte, list []BellFeedbackState) int {
b := 0
var structBytes []byte
@@ -1217,8 +1189,6 @@ func BellFeedbackStateListBytes(buf []byte, list []BellFeedbackState) int {
return b
}
-// 'LedFeedbackState' struct definition
-// Size: 12
type LedFeedbackState struct {
ClassId byte
Id byte
@@ -1227,7 +1197,7 @@ type LedFeedbackState struct {
LedValues uint32
}
-// Struct read LedFeedbackState
+// LedFeedbackStateRead reads a byte slice into a LedFeedbackState value.
func LedFeedbackStateRead(buf []byte, v *LedFeedbackState) int {
b := 0
@@ -1249,7 +1219,7 @@ func LedFeedbackStateRead(buf []byte, v *LedFeedbackState) int {
return b
}
-// Struct list read LedFeedbackState
+// LedFeedbackStateReadList reads a byte slice into a list of LedFeedbackState values.
func LedFeedbackStateReadList(buf []byte, dest []LedFeedbackState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1259,7 +1229,7 @@ func LedFeedbackStateReadList(buf []byte, dest []LedFeedbackState) int {
return xgb.Pad(b)
}
-// Struct write LedFeedbackState
+// Bytes writes a LedFeedbackState value to a byte slice.
func (v LedFeedbackState) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -1282,7 +1252,7 @@ func (v LedFeedbackState) Bytes() []byte {
return buf
}
-// Write struct list LedFeedbackState
+// LedFeedbackStateListBytes writes a list of %s(MISSING) values to a byte slice.
func LedFeedbackStateListBytes(buf []byte, list []LedFeedbackState) int {
b := 0
var structBytes []byte
@@ -1294,15 +1264,13 @@ func LedFeedbackStateListBytes(buf []byte, list []LedFeedbackState) int {
return b
}
-// 'FeedbackCtl' struct definition
-// Size: 4
type FeedbackCtl struct {
ClassId byte
Id byte
Len uint16
}
-// Struct read FeedbackCtl
+// FeedbackCtlRead reads a byte slice into a FeedbackCtl value.
func FeedbackCtlRead(buf []byte, v *FeedbackCtl) int {
b := 0
@@ -1318,7 +1286,7 @@ func FeedbackCtlRead(buf []byte, v *FeedbackCtl) int {
return b
}
-// Struct list read FeedbackCtl
+// FeedbackCtlReadList reads a byte slice into a list of FeedbackCtl values.
func FeedbackCtlReadList(buf []byte, dest []FeedbackCtl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1328,7 +1296,7 @@ func FeedbackCtlReadList(buf []byte, dest []FeedbackCtl) int {
return xgb.Pad(b)
}
-// Struct write FeedbackCtl
+// Bytes writes a FeedbackCtl value to a byte slice.
func (v FeedbackCtl) Bytes() []byte {
buf := make([]byte, 4)
b := 0
@@ -1345,7 +1313,7 @@ func (v FeedbackCtl) Bytes() []byte {
return buf
}
-// Write struct list FeedbackCtl
+// FeedbackCtlListBytes writes a list of %s(MISSING) values to a byte slice.
func FeedbackCtlListBytes(buf []byte, list []FeedbackCtl) int {
b := 0
var structBytes []byte
@@ -1357,8 +1325,6 @@ func FeedbackCtlListBytes(buf []byte, list []FeedbackCtl) int {
return b
}
-// 'KbdFeedbackCtl' struct definition
-// Size: 20
type KbdFeedbackCtl struct {
ClassId byte
Id byte
@@ -1373,7 +1339,7 @@ type KbdFeedbackCtl struct {
LedValues uint32
}
-// Struct read KbdFeedbackCtl
+// KbdFeedbackCtlRead reads a byte slice into a KbdFeedbackCtl value.
func KbdFeedbackCtlRead(buf []byte, v *KbdFeedbackCtl) int {
b := 0
@@ -1413,7 +1379,7 @@ func KbdFeedbackCtlRead(buf []byte, v *KbdFeedbackCtl) int {
return b
}
-// Struct list read KbdFeedbackCtl
+// KbdFeedbackCtlReadList reads a byte slice into a list of KbdFeedbackCtl values.
func KbdFeedbackCtlReadList(buf []byte, dest []KbdFeedbackCtl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1423,7 +1389,7 @@ func KbdFeedbackCtlReadList(buf []byte, dest []KbdFeedbackCtl) int {
return xgb.Pad(b)
}
-// Struct write KbdFeedbackCtl
+// Bytes writes a KbdFeedbackCtl value to a byte slice.
func (v KbdFeedbackCtl) Bytes() []byte {
buf := make([]byte, 20)
b := 0
@@ -1464,7 +1430,7 @@ func (v KbdFeedbackCtl) Bytes() []byte {
return buf
}
-// Write struct list KbdFeedbackCtl
+// KbdFeedbackCtlListBytes writes a list of %s(MISSING) values to a byte slice.
func KbdFeedbackCtlListBytes(buf []byte, list []KbdFeedbackCtl) int {
b := 0
var structBytes []byte
@@ -1476,8 +1442,6 @@ func KbdFeedbackCtlListBytes(buf []byte, list []KbdFeedbackCtl) int {
return b
}
-// 'PtrFeedbackCtl' struct definition
-// Size: 12
type PtrFeedbackCtl struct {
ClassId byte
Id byte
@@ -1488,7 +1452,7 @@ type PtrFeedbackCtl struct {
Threshold int16
}
-// Struct read PtrFeedbackCtl
+// PtrFeedbackCtlRead reads a byte slice into a PtrFeedbackCtl value.
func PtrFeedbackCtlRead(buf []byte, v *PtrFeedbackCtl) int {
b := 0
@@ -1515,7 +1479,7 @@ func PtrFeedbackCtlRead(buf []byte, v *PtrFeedbackCtl) int {
return b
}
-// Struct list read PtrFeedbackCtl
+// PtrFeedbackCtlReadList reads a byte slice into a list of PtrFeedbackCtl values.
func PtrFeedbackCtlReadList(buf []byte, dest []PtrFeedbackCtl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1525,7 +1489,7 @@ func PtrFeedbackCtlReadList(buf []byte, dest []PtrFeedbackCtl) int {
return xgb.Pad(b)
}
-// Struct write PtrFeedbackCtl
+// Bytes writes a PtrFeedbackCtl value to a byte slice.
func (v PtrFeedbackCtl) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -1553,7 +1517,7 @@ func (v PtrFeedbackCtl) Bytes() []byte {
return buf
}
-// Write struct list PtrFeedbackCtl
+// PtrFeedbackCtlListBytes writes a list of %s(MISSING) values to a byte slice.
func PtrFeedbackCtlListBytes(buf []byte, list []PtrFeedbackCtl) int {
b := 0
var structBytes []byte
@@ -1565,8 +1529,6 @@ func PtrFeedbackCtlListBytes(buf []byte, list []PtrFeedbackCtl) int {
return b
}
-// 'IntegerFeedbackCtl' struct definition
-// Size: 8
type IntegerFeedbackCtl struct {
ClassId byte
Id byte
@@ -1574,7 +1536,7 @@ type IntegerFeedbackCtl struct {
IntToDisplay int32
}
-// Struct read IntegerFeedbackCtl
+// IntegerFeedbackCtlRead reads a byte slice into a IntegerFeedbackCtl value.
func IntegerFeedbackCtlRead(buf []byte, v *IntegerFeedbackCtl) int {
b := 0
@@ -1593,7 +1555,7 @@ func IntegerFeedbackCtlRead(buf []byte, v *IntegerFeedbackCtl) int {
return b
}
-// Struct list read IntegerFeedbackCtl
+// IntegerFeedbackCtlReadList reads a byte slice into a list of IntegerFeedbackCtl values.
func IntegerFeedbackCtlReadList(buf []byte, dest []IntegerFeedbackCtl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1603,7 +1565,7 @@ func IntegerFeedbackCtlReadList(buf []byte, dest []IntegerFeedbackCtl) int {
return xgb.Pad(b)
}
-// Struct write IntegerFeedbackCtl
+// Bytes writes a IntegerFeedbackCtl value to a byte slice.
func (v IntegerFeedbackCtl) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -1623,7 +1585,7 @@ func (v IntegerFeedbackCtl) Bytes() []byte {
return buf
}
-// Write struct list IntegerFeedbackCtl
+// IntegerFeedbackCtlListBytes writes a list of %s(MISSING) values to a byte slice.
func IntegerFeedbackCtlListBytes(buf []byte, list []IntegerFeedbackCtl) int {
b := 0
var structBytes []byte
@@ -1635,8 +1597,6 @@ func IntegerFeedbackCtlListBytes(buf []byte, list []IntegerFeedbackCtl) int {
return b
}
-// 'StringFeedbackCtl' struct definition
-// Size: (8 + xgb.Pad((int(NumKeysyms) * 4)))
type StringFeedbackCtl struct {
ClassId byte
Id byte
@@ -1646,7 +1606,7 @@ type StringFeedbackCtl struct {
Keysyms []xproto.Keysym // size: xgb.Pad((int(NumKeysyms) * 4))
}
-// Struct read StringFeedbackCtl
+// StringFeedbackCtlRead reads a byte slice into a StringFeedbackCtl value.
func StringFeedbackCtlRead(buf []byte, v *StringFeedbackCtl) int {
b := 0
@@ -1674,7 +1634,7 @@ func StringFeedbackCtlRead(buf []byte, v *StringFeedbackCtl) int {
return b
}
-// Struct list read StringFeedbackCtl
+// StringFeedbackCtlReadList reads a byte slice into a list of StringFeedbackCtl values.
func StringFeedbackCtlReadList(buf []byte, dest []StringFeedbackCtl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1684,7 +1644,7 @@ func StringFeedbackCtlReadList(buf []byte, dest []StringFeedbackCtl) int {
return xgb.Pad(b)
}
-// Struct write StringFeedbackCtl
+// Bytes writes a StringFeedbackCtl value to a byte slice.
func (v StringFeedbackCtl) Bytes() []byte {
buf := make([]byte, (8 + xgb.Pad((int(v.NumKeysyms) * 4))))
b := 0
@@ -1712,7 +1672,7 @@ func (v StringFeedbackCtl) Bytes() []byte {
return buf
}
-// Write struct list StringFeedbackCtl
+// StringFeedbackCtlListBytes writes a list of %s(MISSING) values to a byte slice.
func StringFeedbackCtlListBytes(buf []byte, list []StringFeedbackCtl) int {
b := 0
var structBytes []byte
@@ -1724,7 +1684,7 @@ func StringFeedbackCtlListBytes(buf []byte, list []StringFeedbackCtl) int {
return b
}
-// Struct list size StringFeedbackCtl
+// StringFeedbackCtlListSize computes the size (bytes) of a list of StringFeedbackCtl values.
func StringFeedbackCtlListSize(list []StringFeedbackCtl) int {
size := 0
for _, item := range list {
@@ -1733,8 +1693,6 @@ func StringFeedbackCtlListSize(list []StringFeedbackCtl) int {
return size
}
-// 'BellFeedbackCtl' struct definition
-// Size: 12
type BellFeedbackCtl struct {
ClassId byte
Id byte
@@ -1745,7 +1703,7 @@ type BellFeedbackCtl struct {
Duration int16
}
-// Struct read BellFeedbackCtl
+// BellFeedbackCtlRead reads a byte slice into a BellFeedbackCtl value.
func BellFeedbackCtlRead(buf []byte, v *BellFeedbackCtl) int {
b := 0
@@ -1772,7 +1730,7 @@ func BellFeedbackCtlRead(buf []byte, v *BellFeedbackCtl) int {
return b
}
-// Struct list read BellFeedbackCtl
+// BellFeedbackCtlReadList reads a byte slice into a list of BellFeedbackCtl values.
func BellFeedbackCtlReadList(buf []byte, dest []BellFeedbackCtl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1782,7 +1740,7 @@ func BellFeedbackCtlReadList(buf []byte, dest []BellFeedbackCtl) int {
return xgb.Pad(b)
}
-// Struct write BellFeedbackCtl
+// Bytes writes a BellFeedbackCtl value to a byte slice.
func (v BellFeedbackCtl) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -1810,7 +1768,7 @@ func (v BellFeedbackCtl) Bytes() []byte {
return buf
}
-// Write struct list BellFeedbackCtl
+// BellFeedbackCtlListBytes writes a list of %s(MISSING) values to a byte slice.
func BellFeedbackCtlListBytes(buf []byte, list []BellFeedbackCtl) int {
b := 0
var structBytes []byte
@@ -1822,8 +1780,6 @@ func BellFeedbackCtlListBytes(buf []byte, list []BellFeedbackCtl) int {
return b
}
-// 'LedFeedbackCtl' struct definition
-// Size: 12
type LedFeedbackCtl struct {
ClassId byte
Id byte
@@ -1832,7 +1788,7 @@ type LedFeedbackCtl struct {
LedValues uint32
}
-// Struct read LedFeedbackCtl
+// LedFeedbackCtlRead reads a byte slice into a LedFeedbackCtl value.
func LedFeedbackCtlRead(buf []byte, v *LedFeedbackCtl) int {
b := 0
@@ -1854,7 +1810,7 @@ func LedFeedbackCtlRead(buf []byte, v *LedFeedbackCtl) int {
return b
}
-// Struct list read LedFeedbackCtl
+// LedFeedbackCtlReadList reads a byte slice into a list of LedFeedbackCtl values.
func LedFeedbackCtlReadList(buf []byte, dest []LedFeedbackCtl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1864,7 +1820,7 @@ func LedFeedbackCtlReadList(buf []byte, dest []LedFeedbackCtl) int {
return xgb.Pad(b)
}
-// Struct write LedFeedbackCtl
+// Bytes writes a LedFeedbackCtl value to a byte slice.
func (v LedFeedbackCtl) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -1887,7 +1843,7 @@ func (v LedFeedbackCtl) Bytes() []byte {
return buf
}
-// Write struct list LedFeedbackCtl
+// LedFeedbackCtlListBytes writes a list of %s(MISSING) values to a byte slice.
func LedFeedbackCtlListBytes(buf []byte, list []LedFeedbackCtl) int {
b := 0
var structBytes []byte
@@ -1899,15 +1855,13 @@ func LedFeedbackCtlListBytes(buf []byte, list []LedFeedbackCtl) int {
return b
}
-// 'InputState' struct definition
-// Size: 3
type InputState struct {
ClassId byte
Len byte
NumItems byte
}
-// Struct read InputState
+// InputStateRead reads a byte slice into a InputState value.
func InputStateRead(buf []byte, v *InputState) int {
b := 0
@@ -1923,7 +1877,7 @@ func InputStateRead(buf []byte, v *InputState) int {
return b
}
-// Struct list read InputState
+// InputStateReadList reads a byte slice into a list of InputState values.
func InputStateReadList(buf []byte, dest []InputState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1933,7 +1887,7 @@ func InputStateReadList(buf []byte, dest []InputState) int {
return xgb.Pad(b)
}
-// Struct write InputState
+// Bytes writes a InputState value to a byte slice.
func (v InputState) Bytes() []byte {
buf := make([]byte, 3)
b := 0
@@ -1950,7 +1904,7 @@ func (v InputState) Bytes() []byte {
return buf
}
-// Write struct list InputState
+// InputStateListBytes writes a list of %s(MISSING) values to a byte slice.
func InputStateListBytes(buf []byte, list []InputState) int {
b := 0
var structBytes []byte
@@ -1962,8 +1916,6 @@ func InputStateListBytes(buf []byte, list []InputState) int {
return b
}
-// 'KeyState' struct definition
-// Size: 36
type KeyState struct {
ClassId byte
Len byte
@@ -1972,7 +1924,7 @@ type KeyState struct {
Keys []byte // size: 32
}
-// Struct read KeyState
+// KeyStateRead reads a byte slice into a KeyState value.
func KeyStateRead(buf []byte, v *KeyState) int {
b := 0
@@ -1994,7 +1946,7 @@ func KeyStateRead(buf []byte, v *KeyState) int {
return b
}
-// Struct list read KeyState
+// KeyStateReadList reads a byte slice into a list of KeyState values.
func KeyStateReadList(buf []byte, dest []KeyState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2004,7 +1956,7 @@ func KeyStateReadList(buf []byte, dest []KeyState) int {
return xgb.Pad(b)
}
-// Struct write KeyState
+// Bytes writes a KeyState value to a byte slice.
func (v KeyState) Bytes() []byte {
buf := make([]byte, 36)
b := 0
@@ -2026,7 +1978,7 @@ func (v KeyState) Bytes() []byte {
return buf
}
-// Write struct list KeyState
+// KeyStateListBytes writes a list of %s(MISSING) values to a byte slice.
func KeyStateListBytes(buf []byte, list []KeyState) int {
b := 0
var structBytes []byte
@@ -2038,7 +1990,7 @@ func KeyStateListBytes(buf []byte, list []KeyState) int {
return b
}
-// Struct list size KeyState
+// KeyStateListSize computes the size (bytes) of a list of KeyState values.
func KeyStateListSize(list []KeyState) int {
size := 0
for _ = range list {
@@ -2047,8 +1999,6 @@ func KeyStateListSize(list []KeyState) int {
return size
}
-// 'ButtonState' struct definition
-// Size: 36
type ButtonState struct {
ClassId byte
Len byte
@@ -2057,7 +2007,7 @@ type ButtonState struct {
Buttons []byte // size: 32
}
-// Struct read ButtonState
+// ButtonStateRead reads a byte slice into a ButtonState value.
func ButtonStateRead(buf []byte, v *ButtonState) int {
b := 0
@@ -2079,7 +2029,7 @@ func ButtonStateRead(buf []byte, v *ButtonState) int {
return b
}
-// Struct list read ButtonState
+// ButtonStateReadList reads a byte slice into a list of ButtonState values.
func ButtonStateReadList(buf []byte, dest []ButtonState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2089,7 +2039,7 @@ func ButtonStateReadList(buf []byte, dest []ButtonState) int {
return xgb.Pad(b)
}
-// Struct write ButtonState
+// Bytes writes a ButtonState value to a byte slice.
func (v ButtonState) Bytes() []byte {
buf := make([]byte, 36)
b := 0
@@ -2111,7 +2061,7 @@ func (v ButtonState) Bytes() []byte {
return buf
}
-// Write struct list ButtonState
+// ButtonStateListBytes writes a list of %s(MISSING) values to a byte slice.
func ButtonStateListBytes(buf []byte, list []ButtonState) int {
b := 0
var structBytes []byte
@@ -2123,7 +2073,7 @@ func ButtonStateListBytes(buf []byte, list []ButtonState) int {
return b
}
-// Struct list size ButtonState
+// ButtonStateListSize computes the size (bytes) of a list of ButtonState values.
func ButtonStateListSize(list []ButtonState) int {
size := 0
for _ = range list {
@@ -2132,8 +2082,6 @@ func ButtonStateListSize(list []ButtonState) int {
return size
}
-// 'ValuatorState' struct definition
-// Size: (4 + xgb.Pad((int(NumValuators) * 4)))
type ValuatorState struct {
ClassId byte
Len byte
@@ -2142,7 +2090,7 @@ type ValuatorState struct {
Valuators []uint32 // size: xgb.Pad((int(NumValuators) * 4))
}
-// Struct read ValuatorState
+// ValuatorStateRead reads a byte slice into a ValuatorState value.
func ValuatorStateRead(buf []byte, v *ValuatorState) int {
b := 0
@@ -2168,7 +2116,7 @@ func ValuatorStateRead(buf []byte, v *ValuatorState) int {
return b
}
-// Struct list read ValuatorState
+// ValuatorStateReadList reads a byte slice into a list of ValuatorState values.
func ValuatorStateReadList(buf []byte, dest []ValuatorState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2178,7 +2126,7 @@ func ValuatorStateReadList(buf []byte, dest []ValuatorState) int {
return xgb.Pad(b)
}
-// Struct write ValuatorState
+// Bytes writes a ValuatorState value to a byte slice.
func (v ValuatorState) Bytes() []byte {
buf := make([]byte, (4 + xgb.Pad((int(v.NumValuators) * 4))))
b := 0
@@ -2204,7 +2152,7 @@ func (v ValuatorState) Bytes() []byte {
return buf
}
-// Write struct list ValuatorState
+// ValuatorStateListBytes writes a list of %s(MISSING) values to a byte slice.
func ValuatorStateListBytes(buf []byte, list []ValuatorState) int {
b := 0
var structBytes []byte
@@ -2216,7 +2164,7 @@ func ValuatorStateListBytes(buf []byte, list []ValuatorState) int {
return b
}
-// Struct list size ValuatorState
+// ValuatorStateListSize computes the size (bytes) of a list of ValuatorState values.
func ValuatorStateListSize(list []ValuatorState) int {
size := 0
for _, item := range list {
@@ -2225,14 +2173,12 @@ func ValuatorStateListSize(list []ValuatorState) int {
return size
}
-// 'DeviceState' struct definition
-// Size: 4
type DeviceState struct {
ControlId uint16
Len uint16
}
-// Struct read DeviceState
+// DeviceStateRead reads a byte slice into a DeviceState value.
func DeviceStateRead(buf []byte, v *DeviceState) int {
b := 0
@@ -2245,7 +2191,7 @@ func DeviceStateRead(buf []byte, v *DeviceState) int {
return b
}
-// Struct list read DeviceState
+// DeviceStateReadList reads a byte slice into a list of DeviceState values.
func DeviceStateReadList(buf []byte, dest []DeviceState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2255,7 +2201,7 @@ func DeviceStateReadList(buf []byte, dest []DeviceState) int {
return xgb.Pad(b)
}
-// Struct write DeviceState
+// Bytes writes a DeviceState value to a byte slice.
func (v DeviceState) Bytes() []byte {
buf := make([]byte, 4)
b := 0
@@ -2269,7 +2215,7 @@ func (v DeviceState) Bytes() []byte {
return buf
}
-// Write struct list DeviceState
+// DeviceStateListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceStateListBytes(buf []byte, list []DeviceState) int {
b := 0
var structBytes []byte
@@ -2281,8 +2227,6 @@ func DeviceStateListBytes(buf []byte, list []DeviceState) int {
return b
}
-// 'DeviceResolutionState' struct definition
-// Size: (((8 + xgb.Pad((int(NumValuators) * 4))) + xgb.Pad((int(NumValuators) * 4))) + xgb.Pad((int(NumValuators) * 4)))
type DeviceResolutionState struct {
ControlId uint16
Len uint16
@@ -2292,7 +2236,7 @@ type DeviceResolutionState struct {
ResolutionMax []uint32 // size: xgb.Pad((int(NumValuators) * 4))
}
-// Struct read DeviceResolutionState
+// DeviceResolutionStateRead reads a byte slice into a DeviceResolutionState value.
func DeviceResolutionStateRead(buf []byte, v *DeviceResolutionState) int {
b := 0
@@ -2329,7 +2273,7 @@ func DeviceResolutionStateRead(buf []byte, v *DeviceResolutionState) int {
return b
}
-// Struct list read DeviceResolutionState
+// DeviceResolutionStateReadList reads a byte slice into a list of DeviceResolutionState values.
func DeviceResolutionStateReadList(buf []byte, dest []DeviceResolutionState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2339,7 +2283,7 @@ func DeviceResolutionStateReadList(buf []byte, dest []DeviceResolutionState) int
return xgb.Pad(b)
}
-// Struct write DeviceResolutionState
+// Bytes writes a DeviceResolutionState value to a byte slice.
func (v DeviceResolutionState) Bytes() []byte {
buf := make([]byte, (((8 + xgb.Pad((int(v.NumValuators) * 4))) + xgb.Pad((int(v.NumValuators) * 4))) + xgb.Pad((int(v.NumValuators) * 4))))
b := 0
@@ -2374,7 +2318,7 @@ func (v DeviceResolutionState) Bytes() []byte {
return buf
}
-// Write struct list DeviceResolutionState
+// DeviceResolutionStateListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceResolutionStateListBytes(buf []byte, list []DeviceResolutionState) int {
b := 0
var structBytes []byte
@@ -2386,7 +2330,7 @@ func DeviceResolutionStateListBytes(buf []byte, list []DeviceResolutionState) in
return b
}
-// Struct list size DeviceResolutionState
+// DeviceResolutionStateListSize computes the size (bytes) of a list of DeviceResolutionState values.
func DeviceResolutionStateListSize(list []DeviceResolutionState) int {
size := 0
for _, item := range list {
@@ -2395,8 +2339,6 @@ func DeviceResolutionStateListSize(list []DeviceResolutionState) int {
return size
}
-// 'DeviceAbsCalibState' struct definition
-// Size: 36
type DeviceAbsCalibState struct {
ControlId uint16
Len uint16
@@ -2410,7 +2352,7 @@ type DeviceAbsCalibState struct {
ButtonThreshold uint32
}
-// Struct read DeviceAbsCalibState
+// DeviceAbsCalibStateRead reads a byte slice into a DeviceAbsCalibState value.
func DeviceAbsCalibStateRead(buf []byte, v *DeviceAbsCalibState) int {
b := 0
@@ -2447,7 +2389,7 @@ func DeviceAbsCalibStateRead(buf []byte, v *DeviceAbsCalibState) int {
return b
}
-// Struct list read DeviceAbsCalibState
+// DeviceAbsCalibStateReadList reads a byte slice into a list of DeviceAbsCalibState values.
func DeviceAbsCalibStateReadList(buf []byte, dest []DeviceAbsCalibState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2457,7 +2399,7 @@ func DeviceAbsCalibStateReadList(buf []byte, dest []DeviceAbsCalibState) int {
return xgb.Pad(b)
}
-// Struct write DeviceAbsCalibState
+// Bytes writes a DeviceAbsCalibState value to a byte slice.
func (v DeviceAbsCalibState) Bytes() []byte {
buf := make([]byte, 36)
b := 0
@@ -2495,7 +2437,7 @@ func (v DeviceAbsCalibState) Bytes() []byte {
return buf
}
-// Write struct list DeviceAbsCalibState
+// DeviceAbsCalibStateListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceAbsCalibStateListBytes(buf []byte, list []DeviceAbsCalibState) int {
b := 0
var structBytes []byte
@@ -2507,8 +2449,6 @@ func DeviceAbsCalibStateListBytes(buf []byte, list []DeviceAbsCalibState) int {
return b
}
-// 'DeviceAbsAreaState' struct definition
-// Size: 28
type DeviceAbsAreaState struct {
ControlId uint16
Len uint16
@@ -2520,7 +2460,7 @@ type DeviceAbsAreaState struct {
Following uint32
}
-// Struct read DeviceAbsAreaState
+// DeviceAbsAreaStateRead reads a byte slice into a DeviceAbsAreaState value.
func DeviceAbsAreaStateRead(buf []byte, v *DeviceAbsAreaState) int {
b := 0
@@ -2551,7 +2491,7 @@ func DeviceAbsAreaStateRead(buf []byte, v *DeviceAbsAreaState) int {
return b
}
-// Struct list read DeviceAbsAreaState
+// DeviceAbsAreaStateReadList reads a byte slice into a list of DeviceAbsAreaState values.
func DeviceAbsAreaStateReadList(buf []byte, dest []DeviceAbsAreaState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2561,7 +2501,7 @@ func DeviceAbsAreaStateReadList(buf []byte, dest []DeviceAbsAreaState) int {
return xgb.Pad(b)
}
-// Struct write DeviceAbsAreaState
+// Bytes writes a DeviceAbsAreaState value to a byte slice.
func (v DeviceAbsAreaState) Bytes() []byte {
buf := make([]byte, 28)
b := 0
@@ -2593,7 +2533,7 @@ func (v DeviceAbsAreaState) Bytes() []byte {
return buf
}
-// Write struct list DeviceAbsAreaState
+// DeviceAbsAreaStateListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceAbsAreaStateListBytes(buf []byte, list []DeviceAbsAreaState) int {
b := 0
var structBytes []byte
@@ -2605,8 +2545,6 @@ func DeviceAbsAreaStateListBytes(buf []byte, list []DeviceAbsAreaState) int {
return b
}
-// 'DeviceCoreState' struct definition
-// Size: 8
type DeviceCoreState struct {
ControlId uint16
Len uint16
@@ -2615,7 +2553,7 @@ type DeviceCoreState struct {
// padding: 2 bytes
}
-// Struct read DeviceCoreState
+// DeviceCoreStateRead reads a byte slice into a DeviceCoreState value.
func DeviceCoreStateRead(buf []byte, v *DeviceCoreState) int {
b := 0
@@ -2636,7 +2574,7 @@ func DeviceCoreStateRead(buf []byte, v *DeviceCoreState) int {
return b
}
-// Struct list read DeviceCoreState
+// DeviceCoreStateReadList reads a byte slice into a list of DeviceCoreState values.
func DeviceCoreStateReadList(buf []byte, dest []DeviceCoreState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2646,7 +2584,7 @@ func DeviceCoreStateReadList(buf []byte, dest []DeviceCoreState) int {
return xgb.Pad(b)
}
-// Struct write DeviceCoreState
+// Bytes writes a DeviceCoreState value to a byte slice.
func (v DeviceCoreState) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -2668,7 +2606,7 @@ func (v DeviceCoreState) Bytes() []byte {
return buf
}
-// Write struct list DeviceCoreState
+// DeviceCoreStateListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceCoreStateListBytes(buf []byte, list []DeviceCoreState) int {
b := 0
var structBytes []byte
@@ -2680,8 +2618,6 @@ func DeviceCoreStateListBytes(buf []byte, list []DeviceCoreState) int {
return b
}
-// 'DeviceEnableState' struct definition
-// Size: 8
type DeviceEnableState struct {
ControlId uint16
Len uint16
@@ -2689,7 +2625,7 @@ type DeviceEnableState struct {
// padding: 3 bytes
}
-// Struct read DeviceEnableState
+// DeviceEnableStateRead reads a byte slice into a DeviceEnableState value.
func DeviceEnableStateRead(buf []byte, v *DeviceEnableState) int {
b := 0
@@ -2707,7 +2643,7 @@ func DeviceEnableStateRead(buf []byte, v *DeviceEnableState) int {
return b
}
-// Struct list read DeviceEnableState
+// DeviceEnableStateReadList reads a byte slice into a list of DeviceEnableState values.
func DeviceEnableStateReadList(buf []byte, dest []DeviceEnableState) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2717,7 +2653,7 @@ func DeviceEnableStateReadList(buf []byte, dest []DeviceEnableState) int {
return xgb.Pad(b)
}
-// Struct write DeviceEnableState
+// Bytes writes a DeviceEnableState value to a byte slice.
func (v DeviceEnableState) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -2736,7 +2672,7 @@ func (v DeviceEnableState) Bytes() []byte {
return buf
}
-// Write struct list DeviceEnableState
+// DeviceEnableStateListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceEnableStateListBytes(buf []byte, list []DeviceEnableState) int {
b := 0
var structBytes []byte
@@ -2748,14 +2684,12 @@ func DeviceEnableStateListBytes(buf []byte, list []DeviceEnableState) int {
return b
}
-// 'DeviceCtl' struct definition
-// Size: 4
type DeviceCtl struct {
ControlId uint16
Len uint16
}
-// Struct read DeviceCtl
+// DeviceCtlRead reads a byte slice into a DeviceCtl value.
func DeviceCtlRead(buf []byte, v *DeviceCtl) int {
b := 0
@@ -2768,7 +2702,7 @@ func DeviceCtlRead(buf []byte, v *DeviceCtl) int {
return b
}
-// Struct list read DeviceCtl
+// DeviceCtlReadList reads a byte slice into a list of DeviceCtl values.
func DeviceCtlReadList(buf []byte, dest []DeviceCtl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2778,7 +2712,7 @@ func DeviceCtlReadList(buf []byte, dest []DeviceCtl) int {
return xgb.Pad(b)
}
-// Struct write DeviceCtl
+// Bytes writes a DeviceCtl value to a byte slice.
func (v DeviceCtl) Bytes() []byte {
buf := make([]byte, 4)
b := 0
@@ -2792,7 +2726,7 @@ func (v DeviceCtl) Bytes() []byte {
return buf
}
-// Write struct list DeviceCtl
+// DeviceCtlListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceCtlListBytes(buf []byte, list []DeviceCtl) int {
b := 0
var structBytes []byte
@@ -2804,8 +2738,6 @@ func DeviceCtlListBytes(buf []byte, list []DeviceCtl) int {
return b
}
-// 'DeviceResolutionCtl' struct definition
-// Size: (6 + xgb.Pad((int(NumValuators) * 4)))
type DeviceResolutionCtl struct {
ControlId uint16
Len uint16
@@ -2814,7 +2746,7 @@ type DeviceResolutionCtl struct {
ResolutionValues []uint32 // size: xgb.Pad((int(NumValuators) * 4))
}
-// Struct read DeviceResolutionCtl
+// DeviceResolutionCtlRead reads a byte slice into a DeviceResolutionCtl value.
func DeviceResolutionCtlRead(buf []byte, v *DeviceResolutionCtl) int {
b := 0
@@ -2840,7 +2772,7 @@ func DeviceResolutionCtlRead(buf []byte, v *DeviceResolutionCtl) int {
return b
}
-// Struct list read DeviceResolutionCtl
+// DeviceResolutionCtlReadList reads a byte slice into a list of DeviceResolutionCtl values.
func DeviceResolutionCtlReadList(buf []byte, dest []DeviceResolutionCtl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2850,7 +2782,7 @@ func DeviceResolutionCtlReadList(buf []byte, dest []DeviceResolutionCtl) int {
return xgb.Pad(b)
}
-// Struct write DeviceResolutionCtl
+// Bytes writes a DeviceResolutionCtl value to a byte slice.
func (v DeviceResolutionCtl) Bytes() []byte {
buf := make([]byte, (6 + xgb.Pad((int(v.NumValuators) * 4))))
b := 0
@@ -2876,7 +2808,7 @@ func (v DeviceResolutionCtl) Bytes() []byte {
return buf
}
-// Write struct list DeviceResolutionCtl
+// DeviceResolutionCtlListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceResolutionCtlListBytes(buf []byte, list []DeviceResolutionCtl) int {
b := 0
var structBytes []byte
@@ -2888,7 +2820,7 @@ func DeviceResolutionCtlListBytes(buf []byte, list []DeviceResolutionCtl) int {
return b
}
-// Struct list size DeviceResolutionCtl
+// DeviceResolutionCtlListSize computes the size (bytes) of a list of DeviceResolutionCtl values.
func DeviceResolutionCtlListSize(list []DeviceResolutionCtl) int {
size := 0
for _, item := range list {
@@ -2897,8 +2829,6 @@ func DeviceResolutionCtlListSize(list []DeviceResolutionCtl) int {
return size
}
-// 'DeviceAbsCalibCtl' struct definition
-// Size: 36
type DeviceAbsCalibCtl struct {
ControlId uint16
Len uint16
@@ -2912,7 +2842,7 @@ type DeviceAbsCalibCtl struct {
ButtonThreshold uint32
}
-// Struct read DeviceAbsCalibCtl
+// DeviceAbsCalibCtlRead reads a byte slice into a DeviceAbsCalibCtl value.
func DeviceAbsCalibCtlRead(buf []byte, v *DeviceAbsCalibCtl) int {
b := 0
@@ -2949,7 +2879,7 @@ func DeviceAbsCalibCtlRead(buf []byte, v *DeviceAbsCalibCtl) int {
return b
}
-// Struct list read DeviceAbsCalibCtl
+// DeviceAbsCalibCtlReadList reads a byte slice into a list of DeviceAbsCalibCtl values.
func DeviceAbsCalibCtlReadList(buf []byte, dest []DeviceAbsCalibCtl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2959,7 +2889,7 @@ func DeviceAbsCalibCtlReadList(buf []byte, dest []DeviceAbsCalibCtl) int {
return xgb.Pad(b)
}
-// Struct write DeviceAbsCalibCtl
+// Bytes writes a DeviceAbsCalibCtl value to a byte slice.
func (v DeviceAbsCalibCtl) Bytes() []byte {
buf := make([]byte, 36)
b := 0
@@ -2997,7 +2927,7 @@ func (v DeviceAbsCalibCtl) Bytes() []byte {
return buf
}
-// Write struct list DeviceAbsCalibCtl
+// DeviceAbsCalibCtlListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceAbsCalibCtlListBytes(buf []byte, list []DeviceAbsCalibCtl) int {
b := 0
var structBytes []byte
@@ -3009,8 +2939,6 @@ func DeviceAbsCalibCtlListBytes(buf []byte, list []DeviceAbsCalibCtl) int {
return b
}
-// 'DeviceAbsAreaCtrl' struct definition
-// Size: 28
type DeviceAbsAreaCtrl struct {
ControlId uint16
Len uint16
@@ -3022,7 +2950,7 @@ type DeviceAbsAreaCtrl struct {
Following uint32
}
-// Struct read DeviceAbsAreaCtrl
+// DeviceAbsAreaCtrlRead reads a byte slice into a DeviceAbsAreaCtrl value.
func DeviceAbsAreaCtrlRead(buf []byte, v *DeviceAbsAreaCtrl) int {
b := 0
@@ -3053,7 +2981,7 @@ func DeviceAbsAreaCtrlRead(buf []byte, v *DeviceAbsAreaCtrl) int {
return b
}
-// Struct list read DeviceAbsAreaCtrl
+// DeviceAbsAreaCtrlReadList reads a byte slice into a list of DeviceAbsAreaCtrl values.
func DeviceAbsAreaCtrlReadList(buf []byte, dest []DeviceAbsAreaCtrl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -3063,7 +2991,7 @@ func DeviceAbsAreaCtrlReadList(buf []byte, dest []DeviceAbsAreaCtrl) int {
return xgb.Pad(b)
}
-// Struct write DeviceAbsAreaCtrl
+// Bytes writes a DeviceAbsAreaCtrl value to a byte slice.
func (v DeviceAbsAreaCtrl) Bytes() []byte {
buf := make([]byte, 28)
b := 0
@@ -3095,7 +3023,7 @@ func (v DeviceAbsAreaCtrl) Bytes() []byte {
return buf
}
-// Write struct list DeviceAbsAreaCtrl
+// DeviceAbsAreaCtrlListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceAbsAreaCtrlListBytes(buf []byte, list []DeviceAbsAreaCtrl) int {
b := 0
var structBytes []byte
@@ -3107,8 +3035,6 @@ func DeviceAbsAreaCtrlListBytes(buf []byte, list []DeviceAbsAreaCtrl) int {
return b
}
-// 'DeviceCoreCtrl' struct definition
-// Size: 8
type DeviceCoreCtrl struct {
ControlId uint16
Len uint16
@@ -3116,7 +3042,7 @@ type DeviceCoreCtrl struct {
// padding: 3 bytes
}
-// Struct read DeviceCoreCtrl
+// DeviceCoreCtrlRead reads a byte slice into a DeviceCoreCtrl value.
func DeviceCoreCtrlRead(buf []byte, v *DeviceCoreCtrl) int {
b := 0
@@ -3134,7 +3060,7 @@ func DeviceCoreCtrlRead(buf []byte, v *DeviceCoreCtrl) int {
return b
}
-// Struct list read DeviceCoreCtrl
+// DeviceCoreCtrlReadList reads a byte slice into a list of DeviceCoreCtrl values.
func DeviceCoreCtrlReadList(buf []byte, dest []DeviceCoreCtrl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -3144,7 +3070,7 @@ func DeviceCoreCtrlReadList(buf []byte, dest []DeviceCoreCtrl) int {
return xgb.Pad(b)
}
-// Struct write DeviceCoreCtrl
+// Bytes writes a DeviceCoreCtrl value to a byte slice.
func (v DeviceCoreCtrl) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -3163,7 +3089,7 @@ func (v DeviceCoreCtrl) Bytes() []byte {
return buf
}
-// Write struct list DeviceCoreCtrl
+// DeviceCoreCtrlListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceCoreCtrlListBytes(buf []byte, list []DeviceCoreCtrl) int {
b := 0
var structBytes []byte
@@ -3175,8 +3101,6 @@ func DeviceCoreCtrlListBytes(buf []byte, list []DeviceCoreCtrl) int {
return b
}
-// 'DeviceEnableCtrl' struct definition
-// Size: 8
type DeviceEnableCtrl struct {
ControlId uint16
Len uint16
@@ -3184,7 +3108,7 @@ type DeviceEnableCtrl struct {
// padding: 3 bytes
}
-// Struct read DeviceEnableCtrl
+// DeviceEnableCtrlRead reads a byte slice into a DeviceEnableCtrl value.
func DeviceEnableCtrlRead(buf []byte, v *DeviceEnableCtrl) int {
b := 0
@@ -3202,7 +3126,7 @@ func DeviceEnableCtrlRead(buf []byte, v *DeviceEnableCtrl) int {
return b
}
-// Struct list read DeviceEnableCtrl
+// DeviceEnableCtrlReadList reads a byte slice into a list of DeviceEnableCtrl values.
func DeviceEnableCtrlReadList(buf []byte, dest []DeviceEnableCtrl) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -3212,7 +3136,7 @@ func DeviceEnableCtrlReadList(buf []byte, dest []DeviceEnableCtrl) int {
return xgb.Pad(b)
}
-// Struct write DeviceEnableCtrl
+// Bytes writes a DeviceEnableCtrl value to a byte slice.
func (v DeviceEnableCtrl) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -3231,7 +3155,7 @@ func (v DeviceEnableCtrl) Bytes() []byte {
return buf
}
-// Write struct list DeviceEnableCtrl
+// DeviceEnableCtrlListBytes writes a list of %s(MISSING) values to a byte slice.
func DeviceEnableCtrlListBytes(buf []byte, list []DeviceEnableCtrl) int {
b := 0
var structBytes []byte
@@ -3243,9 +3167,7 @@ func DeviceEnableCtrlListBytes(buf []byte, list []DeviceEnableCtrl) int {
return b
}
-// Event definition DeviceValuator (0)
-// Size: 32
-
+// DeviceValuator is the event number for a DeviceValuatorEvent.
const DeviceValuator = 0
type DeviceValuatorEvent struct {
@@ -3257,7 +3179,7 @@ type DeviceValuatorEvent struct {
Valuators []int32 // size: 24
}
-// Event read DeviceValuator
+// DeviceValuatorEventNew constructs a DeviceValuatorEvent value that implements xgb.Event from a byte slice.
func DeviceValuatorEventNew(buf []byte) xgb.Event {
v := DeviceValuatorEvent{}
b := 1 // don't read event number
@@ -3287,7 +3209,7 @@ func DeviceValuatorEventNew(buf []byte) xgb.Event {
return v
}
-// Event write DeviceValuator
+// Bytes writes a DeviceValuatorEvent value to a byte slice.
func (v DeviceValuatorEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3319,12 +3241,14 @@ func (v DeviceValuatorEvent) Bytes() []byte {
return buf
}
-func (v DeviceValuatorEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DeviceValuator event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DeviceValuatorEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of DeviceValuatorEvent.
func (v DeviceValuatorEvent) String() string {
fieldVals := make([]string, 0, 5)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3339,9 +3263,7 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][0] = DeviceValuatorEventNew
}
-// Event definition DeviceKeyPress (1)
-// Size: 32
-
+// DeviceKeyPress is the event number for a DeviceKeyPressEvent.
const DeviceKeyPress = 1
type DeviceKeyPressEvent struct {
@@ -3360,7 +3282,7 @@ type DeviceKeyPressEvent struct {
DeviceId byte
}
-// Event read DeviceKeyPress
+// DeviceKeyPressEventNew constructs a DeviceKeyPressEvent value that implements xgb.Event from a byte slice.
func DeviceKeyPressEventNew(buf []byte) xgb.Event {
v := DeviceKeyPressEvent{}
b := 1 // don't read event number
@@ -3411,7 +3333,7 @@ func DeviceKeyPressEventNew(buf []byte) xgb.Event {
return v
}
-// Event write DeviceKeyPress
+// Bytes writes a DeviceKeyPressEvent value to a byte slice.
func (v DeviceKeyPressEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3465,12 +3387,14 @@ func (v DeviceKeyPressEvent) Bytes() []byte {
return buf
}
-func (v DeviceKeyPressEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DeviceKeyPress event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DeviceKeyPressEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of DeviceKeyPressEvent.
func (v DeviceKeyPressEvent) String() string {
fieldVals := make([]string, 0, 12)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3493,9 +3417,7 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][1] = DeviceKeyPressEventNew
}
-// Event definition FocusIn (6)
-// Size: 32
-
+// FocusIn is the event number for a FocusInEvent.
const FocusIn = 6
type FocusInEvent struct {
@@ -3508,7 +3430,7 @@ type FocusInEvent struct {
// padding: 18 bytes
}
-// Event read FocusIn
+// FocusInEventNew constructs a FocusInEvent value that implements xgb.Event from a byte slice.
func FocusInEventNew(buf []byte) xgb.Event {
v := FocusInEvent{}
b := 1 // don't read event number
@@ -3536,7 +3458,7 @@ func FocusInEventNew(buf []byte) xgb.Event {
return v
}
-// Event write FocusIn
+// Bytes writes a FocusInEvent value to a byte slice.
func (v FocusInEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3567,12 +3489,14 @@ func (v FocusInEvent) Bytes() []byte {
return buf
}
-func (v FocusInEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the FocusIn event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v FocusInEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of FocusInEvent.
func (v FocusInEvent) String() string {
fieldVals := make([]string, 0, 6)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3588,9 +3512,7 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][6] = FocusInEventNew
}
-// Event definition DeviceStateNotify (10)
-// Size: 32
-
+// DeviceStateNotify is the event number for a DeviceStateNotifyEvent.
const DeviceStateNotify = 10
type DeviceStateNotifyEvent struct {
@@ -3606,7 +3528,7 @@ type DeviceStateNotifyEvent struct {
Valuators []uint32 // size: 12
}
-// Event read DeviceStateNotify
+// DeviceStateNotifyEventNew constructs a DeviceStateNotifyEvent value that implements xgb.Event from a byte slice.
func DeviceStateNotifyEventNew(buf []byte) xgb.Event {
v := DeviceStateNotifyEvent{}
b := 1 // don't read event number
@@ -3650,7 +3572,7 @@ func DeviceStateNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write DeviceStateNotify
+// Bytes writes a DeviceStateNotifyEvent value to a byte slice.
func (v DeviceStateNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3694,12 +3616,14 @@ func (v DeviceStateNotifyEvent) Bytes() []byte {
return buf
}
-func (v DeviceStateNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DeviceStateNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DeviceStateNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of DeviceStateNotifyEvent.
func (v DeviceStateNotifyEvent) String() string {
fieldVals := make([]string, 0, 9)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3716,9 +3640,7 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][10] = DeviceStateNotifyEventNew
}
-// Event definition DeviceMappingNotify (11)
-// Size: 32
-
+// DeviceMappingNotify is the event number for a DeviceMappingNotifyEvent.
const DeviceMappingNotify = 11
type DeviceMappingNotifyEvent struct {
@@ -3732,7 +3654,7 @@ type DeviceMappingNotifyEvent struct {
// padding: 20 bytes
}
-// Event read DeviceMappingNotify
+// DeviceMappingNotifyEventNew constructs a DeviceMappingNotifyEvent value that implements xgb.Event from a byte slice.
func DeviceMappingNotifyEventNew(buf []byte) xgb.Event {
v := DeviceMappingNotifyEvent{}
b := 1 // don't read event number
@@ -3762,7 +3684,7 @@ func DeviceMappingNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write DeviceMappingNotify
+// Bytes writes a DeviceMappingNotifyEvent value to a byte slice.
func (v DeviceMappingNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3795,12 +3717,14 @@ func (v DeviceMappingNotifyEvent) Bytes() []byte {
return buf
}
-func (v DeviceMappingNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DeviceMappingNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DeviceMappingNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of DeviceMappingNotifyEvent.
func (v DeviceMappingNotifyEvent) String() string {
fieldVals := make([]string, 0, 7)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3816,9 +3740,7 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][11] = DeviceMappingNotifyEventNew
}
-// Event definition ChangeDeviceNotify (12)
-// Size: 32
-
+// ChangeDeviceNotify is the event number for a ChangeDeviceNotifyEvent.
const ChangeDeviceNotify = 12
type ChangeDeviceNotifyEvent struct {
@@ -3829,7 +3751,7 @@ type ChangeDeviceNotifyEvent struct {
// padding: 23 bytes
}
-// Event read ChangeDeviceNotify
+// ChangeDeviceNotifyEventNew constructs a ChangeDeviceNotifyEvent value that implements xgb.Event from a byte slice.
func ChangeDeviceNotifyEventNew(buf []byte) xgb.Event {
v := ChangeDeviceNotifyEvent{}
b := 1 // don't read event number
@@ -3851,7 +3773,7 @@ func ChangeDeviceNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write ChangeDeviceNotify
+// Bytes writes a ChangeDeviceNotifyEvent value to a byte slice.
func (v ChangeDeviceNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3876,12 +3798,14 @@ func (v ChangeDeviceNotifyEvent) Bytes() []byte {
return buf
}
-func (v ChangeDeviceNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ChangeDeviceNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ChangeDeviceNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of ChangeDeviceNotifyEvent.
func (v ChangeDeviceNotifyEvent) String() string {
fieldVals := make([]string, 0, 4)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3895,9 +3819,7 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][12] = ChangeDeviceNotifyEventNew
}
-// Event definition DeviceKeyStateNotify (13)
-// Size: 32
-
+// DeviceKeyStateNotify is the event number for a DeviceKeyStateNotifyEvent.
const DeviceKeyStateNotify = 13
type DeviceKeyStateNotifyEvent struct {
@@ -3906,7 +3828,7 @@ type DeviceKeyStateNotifyEvent struct {
Keys []byte // size: 28
}
-// Event read DeviceKeyStateNotify
+// DeviceKeyStateNotifyEventNew constructs a DeviceKeyStateNotifyEvent value that implements xgb.Event from a byte slice.
func DeviceKeyStateNotifyEventNew(buf []byte) xgb.Event {
v := DeviceKeyStateNotifyEvent{}
b := 1 // don't read event number
@@ -3924,7 +3846,7 @@ func DeviceKeyStateNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write DeviceKeyStateNotify
+// Bytes writes a DeviceKeyStateNotifyEvent value to a byte slice.
func (v DeviceKeyStateNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3944,12 +3866,14 @@ func (v DeviceKeyStateNotifyEvent) Bytes() []byte {
return buf
}
-func (v DeviceKeyStateNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DeviceKeyStateNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DeviceKeyStateNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of DeviceKeyStateNotifyEvent.
func (v DeviceKeyStateNotifyEvent) String() string {
fieldVals := make([]string, 0, 2)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3961,9 +3885,7 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][13] = DeviceKeyStateNotifyEventNew
}
-// Event definition DeviceButtonStateNotify (14)
-// Size: 32
-
+// DeviceButtonStateNotify is the event number for a DeviceButtonStateNotifyEvent.
const DeviceButtonStateNotify = 14
type DeviceButtonStateNotifyEvent struct {
@@ -3972,7 +3894,7 @@ type DeviceButtonStateNotifyEvent struct {
Buttons []byte // size: 28
}
-// Event read DeviceButtonStateNotify
+// DeviceButtonStateNotifyEventNew constructs a DeviceButtonStateNotifyEvent value that implements xgb.Event from a byte slice.
func DeviceButtonStateNotifyEventNew(buf []byte) xgb.Event {
v := DeviceButtonStateNotifyEvent{}
b := 1 // don't read event number
@@ -3990,7 +3912,7 @@ func DeviceButtonStateNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write DeviceButtonStateNotify
+// Bytes writes a DeviceButtonStateNotifyEvent value to a byte slice.
func (v DeviceButtonStateNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4010,12 +3932,14 @@ func (v DeviceButtonStateNotifyEvent) Bytes() []byte {
return buf
}
-func (v DeviceButtonStateNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DeviceButtonStateNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DeviceButtonStateNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of DeviceButtonStateNotifyEvent.
func (v DeviceButtonStateNotifyEvent) String() string {
fieldVals := make([]string, 0, 2)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4027,9 +3951,7 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][14] = DeviceButtonStateNotifyEventNew
}
-// Event definition DevicePresenceNotify (15)
-// Size: 32
-
+// DevicePresenceNotify is the event number for a DevicePresenceNotifyEvent.
const DevicePresenceNotify = 15
type DevicePresenceNotifyEvent struct {
@@ -4042,7 +3964,7 @@ type DevicePresenceNotifyEvent struct {
// padding: 20 bytes
}
-// Event read DevicePresenceNotify
+// DevicePresenceNotifyEventNew constructs a DevicePresenceNotifyEvent value that implements xgb.Event from a byte slice.
func DevicePresenceNotifyEventNew(buf []byte) xgb.Event {
v := DevicePresenceNotifyEvent{}
b := 1 // don't read event number
@@ -4069,7 +3991,7 @@ func DevicePresenceNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write DevicePresenceNotify
+// Bytes writes a DevicePresenceNotifyEvent value to a byte slice.
func (v DevicePresenceNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4099,12 +4021,14 @@ func (v DevicePresenceNotifyEvent) Bytes() []byte {
return buf
}
-func (v DevicePresenceNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DevicePresenceNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DevicePresenceNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of DevicePresenceNotifyEvent.
func (v DevicePresenceNotifyEvent) String() string {
fieldVals := make([]string, 0, 6)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4119,22 +4043,24 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][15] = DevicePresenceNotifyEventNew
}
-// EventCopy definition DeviceKeyRelease (2)
-
+// DeviceKeyRelease is the event number for a DeviceKeyReleaseEvent.
const DeviceKeyRelease = 2
type DeviceKeyReleaseEvent DeviceKeyPressEvent
+// DeviceKeyReleaseEventNew constructs a DeviceKeyReleaseEvent value that implements xgb.Event from a byte slice.
func DeviceKeyReleaseEventNew(buf []byte) xgb.Event {
return DeviceKeyReleaseEvent(DeviceKeyPressEventNew(buf).(DeviceKeyPressEvent))
}
+// Bytes writes a DeviceKeyReleaseEvent value to a byte slice.
func (v DeviceKeyReleaseEvent) Bytes() []byte {
return DeviceKeyPressEvent(v).Bytes()
}
-func (v DeviceKeyReleaseEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DeviceKeyRelease event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DeviceKeyReleaseEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -4161,22 +4087,24 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][2] = DeviceKeyReleaseEventNew
}
-// EventCopy definition DeviceButtonPress (3)
-
+// DeviceButtonPress is the event number for a DeviceButtonPressEvent.
const DeviceButtonPress = 3
type DeviceButtonPressEvent DeviceKeyPressEvent
+// DeviceButtonPressEventNew constructs a DeviceButtonPressEvent value that implements xgb.Event from a byte slice.
func DeviceButtonPressEventNew(buf []byte) xgb.Event {
return DeviceButtonPressEvent(DeviceKeyPressEventNew(buf).(DeviceKeyPressEvent))
}
+// Bytes writes a DeviceButtonPressEvent value to a byte slice.
func (v DeviceButtonPressEvent) Bytes() []byte {
return DeviceKeyPressEvent(v).Bytes()
}
-func (v DeviceButtonPressEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DeviceButtonPress event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DeviceButtonPressEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -4203,22 +4131,24 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][3] = DeviceButtonPressEventNew
}
-// EventCopy definition DeviceButtonRelease (4)
-
+// DeviceButtonRelease is the event number for a DeviceButtonReleaseEvent.
const DeviceButtonRelease = 4
type DeviceButtonReleaseEvent DeviceKeyPressEvent
+// DeviceButtonReleaseEventNew constructs a DeviceButtonReleaseEvent value that implements xgb.Event from a byte slice.
func DeviceButtonReleaseEventNew(buf []byte) xgb.Event {
return DeviceButtonReleaseEvent(DeviceKeyPressEventNew(buf).(DeviceKeyPressEvent))
}
+// Bytes writes a DeviceButtonReleaseEvent value to a byte slice.
func (v DeviceButtonReleaseEvent) Bytes() []byte {
return DeviceKeyPressEvent(v).Bytes()
}
-func (v DeviceButtonReleaseEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DeviceButtonRelease event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DeviceButtonReleaseEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -4245,22 +4175,24 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][4] = DeviceButtonReleaseEventNew
}
-// EventCopy definition DeviceMotionNotify (5)
-
+// DeviceMotionNotify is the event number for a DeviceMotionNotifyEvent.
const DeviceMotionNotify = 5
type DeviceMotionNotifyEvent DeviceKeyPressEvent
+// DeviceMotionNotifyEventNew constructs a DeviceMotionNotifyEvent value that implements xgb.Event from a byte slice.
func DeviceMotionNotifyEventNew(buf []byte) xgb.Event {
return DeviceMotionNotifyEvent(DeviceKeyPressEventNew(buf).(DeviceKeyPressEvent))
}
+// Bytes writes a DeviceMotionNotifyEvent value to a byte slice.
func (v DeviceMotionNotifyEvent) Bytes() []byte {
return DeviceKeyPressEvent(v).Bytes()
}
-func (v DeviceMotionNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DeviceMotionNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DeviceMotionNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -4287,22 +4219,24 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][5] = DeviceMotionNotifyEventNew
}
-// EventCopy definition ProximityIn (8)
-
+// ProximityIn is the event number for a ProximityInEvent.
const ProximityIn = 8
type ProximityInEvent DeviceKeyPressEvent
+// ProximityInEventNew constructs a ProximityInEvent value that implements xgb.Event from a byte slice.
func ProximityInEventNew(buf []byte) xgb.Event {
return ProximityInEvent(DeviceKeyPressEventNew(buf).(DeviceKeyPressEvent))
}
+// Bytes writes a ProximityInEvent value to a byte slice.
func (v ProximityInEvent) Bytes() []byte {
return DeviceKeyPressEvent(v).Bytes()
}
-func (v ProximityInEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ProximityIn event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ProximityInEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -4329,22 +4263,24 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][8] = ProximityInEventNew
}
-// EventCopy definition ProximityOut (9)
-
+// ProximityOut is the event number for a ProximityOutEvent.
const ProximityOut = 9
type ProximityOutEvent DeviceKeyPressEvent
+// ProximityOutEventNew constructs a ProximityOutEvent value that implements xgb.Event from a byte slice.
func ProximityOutEventNew(buf []byte) xgb.Event {
return ProximityOutEvent(DeviceKeyPressEventNew(buf).(DeviceKeyPressEvent))
}
+// Bytes writes a ProximityOutEvent value to a byte slice.
func (v ProximityOutEvent) Bytes() []byte {
return DeviceKeyPressEvent(v).Bytes()
}
-func (v ProximityOutEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ProximityOut event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ProximityOutEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -4371,22 +4307,24 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][9] = ProximityOutEventNew
}
-// EventCopy definition FocusOut (7)
-
+// FocusOut is the event number for a FocusOutEvent.
const FocusOut = 7
type FocusOutEvent FocusInEvent
+// FocusOutEventNew constructs a FocusOutEvent value that implements xgb.Event from a byte slice.
func FocusOutEventNew(buf []byte) xgb.Event {
return FocusOutEvent(FocusInEventNew(buf).(FocusInEvent))
}
+// Bytes writes a FocusOutEvent value to a byte slice.
func (v FocusOutEvent) Bytes() []byte {
return FocusInEvent(v).Bytes()
}
-func (v FocusOutEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the FocusOut event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v FocusOutEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -4406,9 +4344,7 @@ func init() {
xgb.NewExtEventFuncs["XInputExtension"][7] = FocusOutEventNew
}
-// Error definition Device (0)
-// Size: 32
-
+// BadDevice is the error number for a BadDevice.
const BadDevice = 0
type DeviceError struct {
@@ -4416,7 +4352,7 @@ type DeviceError struct {
NiceName string
}
-// Error read Device
+// DeviceErrorNew constructs a DeviceError value that implements xgb.Error from a byte slice.
func DeviceErrorNew(buf []byte) xgb.Error {
v := DeviceError{}
v.NiceName = "Device"
@@ -4430,8 +4366,8 @@ func DeviceErrorNew(buf []byte) xgb.Error {
return v
}
-func (err DeviceError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadDevice error.
+// This is mostly used internally.
func (err DeviceError) SequenceId() uint16 {
return err.Sequence
}
@@ -4451,9 +4387,7 @@ func init() {
xgb.NewExtErrorFuncs["XInputExtension"][0] = DeviceErrorNew
}
-// Error definition Event (1)
-// Size: 32
-
+// BadEvent is the error number for a BadEvent.
const BadEvent = 1
type EventError struct {
@@ -4461,7 +4395,7 @@ type EventError struct {
NiceName string
}
-// Error read Event
+// EventErrorNew constructs a EventError value that implements xgb.Error from a byte slice.
func EventErrorNew(buf []byte) xgb.Error {
v := EventError{}
v.NiceName = "Event"
@@ -4475,8 +4409,8 @@ func EventErrorNew(buf []byte) xgb.Error {
return v
}
-func (err EventError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadEvent error.
+// This is mostly used internally.
func (err EventError) SequenceId() uint16 {
return err.Sequence
}
@@ -4496,9 +4430,7 @@ func init() {
xgb.NewExtErrorFuncs["XInputExtension"][1] = EventErrorNew
}
-// Error definition Mode (2)
-// Size: 32
-
+// BadMode is the error number for a BadMode.
const BadMode = 2
type ModeError struct {
@@ -4506,7 +4438,7 @@ type ModeError struct {
NiceName string
}
-// Error read Mode
+// ModeErrorNew constructs a ModeError value that implements xgb.Error from a byte slice.
func ModeErrorNew(buf []byte) xgb.Error {
v := ModeError{}
v.NiceName = "Mode"
@@ -4520,8 +4452,8 @@ func ModeErrorNew(buf []byte) xgb.Error {
return v
}
-func (err ModeError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadMode error.
+// This is mostly used internally.
func (err ModeError) SequenceId() uint16 {
return err.Sequence
}
@@ -4541,9 +4473,7 @@ func init() {
xgb.NewExtErrorFuncs["XInputExtension"][2] = ModeErrorNew
}
-// Error definition DeviceBusy (3)
-// Size: 32
-
+// BadDeviceBusy is the error number for a BadDeviceBusy.
const BadDeviceBusy = 3
type DeviceBusyError struct {
@@ -4551,7 +4481,7 @@ type DeviceBusyError struct {
NiceName string
}
-// Error read DeviceBusy
+// DeviceBusyErrorNew constructs a DeviceBusyError value that implements xgb.Error from a byte slice.
func DeviceBusyErrorNew(buf []byte) xgb.Error {
v := DeviceBusyError{}
v.NiceName = "DeviceBusy"
@@ -4565,8 +4495,8 @@ func DeviceBusyErrorNew(buf []byte) xgb.Error {
return v
}
-func (err DeviceBusyError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadDeviceBusy error.
+// This is mostly used internally.
func (err DeviceBusyError) SequenceId() uint16 {
return err.Sequence
}
@@ -4586,9 +4516,7 @@ func init() {
xgb.NewExtErrorFuncs["XInputExtension"][3] = DeviceBusyErrorNew
}
-// Error definition Class (4)
-// Size: 32
-
+// BadClass is the error number for a BadClass.
const BadClass = 4
type ClassError struct {
@@ -4596,7 +4524,7 @@ type ClassError struct {
NiceName string
}
-// Error read Class
+// ClassErrorNew constructs a ClassError value that implements xgb.Error from a byte slice.
func ClassErrorNew(buf []byte) xgb.Error {
v := ClassError{}
v.NiceName = "Class"
@@ -4610,8 +4538,8 @@ func ClassErrorNew(buf []byte) xgb.Error {
return v
}
-func (err ClassError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadClass error.
+// This is mostly used internally.
func (err ClassError) SequenceId() uint16 {
return err.Sequence
}
@@ -4631,29 +4559,31 @@ func init() {
xgb.NewExtErrorFuncs["XInputExtension"][4] = ClassErrorNew
}
-// Request GetExtensionVersion
-// size: xgb.Pad((8 + xgb.Pad((int(NameLen) * 1))))
+// GetExtensionVersionCookie is a cookie used only for GetExtensionVersion requests.
type GetExtensionVersionCookie struct {
*xgb.Cookie
}
+// GetExtensionVersion sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetExtensionVersionCookie.Reply()
func GetExtensionVersion(c *xgb.Conn, NameLen uint16, Name string) GetExtensionVersionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getExtensionVersionRequest(c, NameLen, Name), cookie)
return GetExtensionVersionCookie{cookie}
}
+// GetExtensionVersionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetExtensionVersionUnchecked(c *xgb.Conn, NameLen uint16, Name string) GetExtensionVersionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getExtensionVersionRequest(c, NameLen, Name), cookie)
return GetExtensionVersionCookie{cookie}
}
-// Request reply for GetExtensionVersion
-// size: 32
+// GetExtensionVersionReply represents the data returned from a GetExtensionVersion request.
type GetExtensionVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ServerMajor uint16
ServerMinor uint16
@@ -4661,7 +4591,7 @@ type GetExtensionVersionReply struct {
// padding: 19 bytes
}
-// Waits and reads reply data from request GetExtensionVersion
+// Reply blocks and returns the reply data for a GetExtensionVersion request.
func (cook GetExtensionVersionCookie) Reply() (*GetExtensionVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4673,7 +4603,7 @@ func (cook GetExtensionVersionCookie) Reply() (*GetExtensionVersionReply, error)
return getExtensionVersionReply(buf), nil
}
-// Read reply into structure from buffer for GetExtensionVersion
+// getExtensionVersionReply reads a byte slice into a GetExtensionVersionReply value.
func getExtensionVersionReply(buf []byte) *GetExtensionVersionReply {
v := new(GetExtensionVersionReply)
b := 1 // skip reply determinant
@@ -4705,6 +4635,7 @@ func getExtensionVersionReply(buf []byte) *GetExtensionVersionReply {
}
// Write request to wire for GetExtensionVersion
+// getExtensionVersionRequest writes a GetExtensionVersion request to a byte slice.
func getExtensionVersionRequest(c *xgb.Conn, NameLen uint16, Name string) []byte {
size := xgb.Pad((8 + xgb.Pad((int(NameLen) * 1))))
b := 0
@@ -4730,36 +4661,38 @@ func getExtensionVersionRequest(c *xgb.Conn, NameLen uint16, Name string) []byte
return buf
}
-// Request ListInputDevices
-// size: 4
+// ListInputDevicesCookie is a cookie used only for ListInputDevices requests.
type ListInputDevicesCookie struct {
*xgb.Cookie
}
+// ListInputDevices sends a checked request.
+// If an error occurs, it will be returned with the reply by calling ListInputDevicesCookie.Reply()
func ListInputDevices(c *xgb.Conn) ListInputDevicesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(listInputDevicesRequest(c), cookie)
return ListInputDevicesCookie{cookie}
}
+// ListInputDevicesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListInputDevicesUnchecked(c *xgb.Conn) ListInputDevicesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listInputDevicesRequest(c), cookie)
return ListInputDevicesCookie{cookie}
}
-// Request reply for ListInputDevices
-// size: (32 + xgb.Pad((int(DevicesLen) * 8)))
+// ListInputDevicesReply represents the data returned from a ListInputDevices request.
type ListInputDevicesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
DevicesLen byte
// padding: 23 bytes
Devices []DeviceInfo // size: xgb.Pad((int(DevicesLen) * 8))
}
-// Waits and reads reply data from request ListInputDevices
+// Reply blocks and returns the reply data for a ListInputDevices request.
func (cook ListInputDevicesCookie) Reply() (*ListInputDevicesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4771,7 +4704,7 @@ func (cook ListInputDevicesCookie) Reply() (*ListInputDevicesReply, error) {
return listInputDevicesReply(buf), nil
}
-// Read reply into structure from buffer for ListInputDevices
+// listInputDevicesReply reads a byte slice into a ListInputDevicesReply value.
func listInputDevicesReply(buf []byte) *ListInputDevicesReply {
v := new(ListInputDevicesReply)
b := 1 // skip reply determinant
@@ -4796,6 +4729,7 @@ func listInputDevicesReply(buf []byte) *ListInputDevicesReply {
}
// Write request to wire for ListInputDevices
+// listInputDevicesRequest writes a ListInputDevices request to a byte slice.
func listInputDevicesRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -4813,36 +4747,38 @@ func listInputDevicesRequest(c *xgb.Conn) []byte {
return buf
}
-// Request OpenDevice
-// size: 8
+// OpenDeviceCookie is a cookie used only for OpenDevice requests.
type OpenDeviceCookie struct {
*xgb.Cookie
}
+// OpenDevice sends a checked request.
+// If an error occurs, it will be returned with the reply by calling OpenDeviceCookie.Reply()
func OpenDevice(c *xgb.Conn, DeviceId byte) OpenDeviceCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(openDeviceRequest(c, DeviceId), cookie)
return OpenDeviceCookie{cookie}
}
+// OpenDeviceUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func OpenDeviceUnchecked(c *xgb.Conn, DeviceId byte) OpenDeviceCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(openDeviceRequest(c, DeviceId), cookie)
return OpenDeviceCookie{cookie}
}
-// Request reply for OpenDevice
-// size: (32 + xgb.Pad((int(NumClasses) * 2)))
+// OpenDeviceReply represents the data returned from a OpenDevice request.
type OpenDeviceReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumClasses byte
// padding: 23 bytes
ClassInfo []InputClassInfo // size: xgb.Pad((int(NumClasses) * 2))
}
-// Waits and reads reply data from request OpenDevice
+// Reply blocks and returns the reply data for a OpenDevice request.
func (cook OpenDeviceCookie) Reply() (*OpenDeviceReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4854,7 +4790,7 @@ func (cook OpenDeviceCookie) Reply() (*OpenDeviceReply, error) {
return openDeviceReply(buf), nil
}
-// Read reply into structure from buffer for OpenDevice
+// openDeviceReply reads a byte slice into a OpenDeviceReply value.
func openDeviceReply(buf []byte) *OpenDeviceReply {
v := new(OpenDeviceReply)
b := 1 // skip reply determinant
@@ -4879,6 +4815,7 @@ func openDeviceReply(buf []byte) *OpenDeviceReply {
}
// Write request to wire for OpenDevice
+// openDeviceRequest writes a OpenDevice request to a byte slice.
func openDeviceRequest(c *xgb.Conn, DeviceId byte) []byte {
size := 8
b := 0
@@ -4901,30 +4838,35 @@ func openDeviceRequest(c *xgb.Conn, DeviceId byte) []byte {
return buf
}
-// Request CloseDevice
-// size: 8
+// CloseDeviceCookie is a cookie used only for CloseDevice requests.
type CloseDeviceCookie struct {
*xgb.Cookie
}
-// Write request to wire for CloseDevice
+// CloseDevice sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CloseDevice(c *xgb.Conn, DeviceId byte) CloseDeviceCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(closeDeviceRequest(c, DeviceId), cookie)
return CloseDeviceCookie{cookie}
}
+// CloseDeviceChecked sends a checked request.
+// If an error occurs, it can be retrieved using CloseDeviceCookie.Check()
func CloseDeviceChecked(c *xgb.Conn, DeviceId byte) CloseDeviceCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(closeDeviceRequest(c, DeviceId), cookie)
return CloseDeviceCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CloseDeviceCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CloseDevice
+// closeDeviceRequest writes a CloseDevice request to a byte slice.
func closeDeviceRequest(c *xgb.Conn, DeviceId byte) []byte {
size := 8
b := 0
@@ -4947,35 +4889,37 @@ func closeDeviceRequest(c *xgb.Conn, DeviceId byte) []byte {
return buf
}
-// Request SetDeviceMode
-// size: 8
+// SetDeviceModeCookie is a cookie used only for SetDeviceMode requests.
type SetDeviceModeCookie struct {
*xgb.Cookie
}
+// SetDeviceMode sends a checked request.
+// If an error occurs, it will be returned with the reply by calling SetDeviceModeCookie.Reply()
func SetDeviceMode(c *xgb.Conn, DeviceId byte, Mode byte) SetDeviceModeCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(setDeviceModeRequest(c, DeviceId, Mode), cookie)
return SetDeviceModeCookie{cookie}
}
+// SetDeviceModeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetDeviceModeUnchecked(c *xgb.Conn, DeviceId byte, Mode byte) SetDeviceModeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(setDeviceModeRequest(c, DeviceId, Mode), cookie)
return SetDeviceModeCookie{cookie}
}
-// Request reply for SetDeviceMode
-// size: 32
+// SetDeviceModeReply represents the data returned from a SetDeviceMode request.
type SetDeviceModeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Status byte
// padding: 23 bytes
}
-// Waits and reads reply data from request SetDeviceMode
+// Reply blocks and returns the reply data for a SetDeviceMode request.
func (cook SetDeviceModeCookie) Reply() (*SetDeviceModeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -4987,7 +4931,7 @@ func (cook SetDeviceModeCookie) Reply() (*SetDeviceModeReply, error) {
return setDeviceModeReply(buf), nil
}
-// Read reply into structure from buffer for SetDeviceMode
+// setDeviceModeReply reads a byte slice into a SetDeviceModeReply value.
func setDeviceModeReply(buf []byte) *SetDeviceModeReply {
v := new(SetDeviceModeReply)
b := 1 // skip reply determinant
@@ -5009,6 +4953,7 @@ func setDeviceModeReply(buf []byte) *SetDeviceModeReply {
}
// Write request to wire for SetDeviceMode
+// setDeviceModeRequest writes a SetDeviceMode request to a byte slice.
func setDeviceModeRequest(c *xgb.Conn, DeviceId byte, Mode byte) []byte {
size := 8
b := 0
@@ -5034,30 +4979,35 @@ func setDeviceModeRequest(c *xgb.Conn, DeviceId byte, Mode byte) []byte {
return buf
}
-// Request SelectExtensionEvent
-// size: xgb.Pad((12 + xgb.Pad((int(NumClasses) * 4))))
+// SelectExtensionEventCookie is a cookie used only for SelectExtensionEvent requests.
type SelectExtensionEventCookie struct {
*xgb.Cookie
}
-// Write request to wire for SelectExtensionEvent
+// SelectExtensionEvent sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectExtensionEvent(c *xgb.Conn, Window xproto.Window, NumClasses uint16, Classes []EventClass) SelectExtensionEventCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(selectExtensionEventRequest(c, Window, NumClasses, Classes), cookie)
return SelectExtensionEventCookie{cookie}
}
+// SelectExtensionEventChecked sends a checked request.
+// If an error occurs, it can be retrieved using SelectExtensionEventCookie.Check()
func SelectExtensionEventChecked(c *xgb.Conn, Window xproto.Window, NumClasses uint16, Classes []EventClass) SelectExtensionEventCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(selectExtensionEventRequest(c, Window, NumClasses, Classes), cookie)
return SelectExtensionEventCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SelectExtensionEventCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SelectExtensionEvent
+// selectExtensionEventRequest writes a SelectExtensionEvent request to a byte slice.
func selectExtensionEventRequest(c *xgb.Conn, Window xproto.Window, NumClasses uint16, Classes []EventClass) []byte {
size := xgb.Pad((12 + xgb.Pad((int(NumClasses) * 4))))
b := 0
@@ -5089,29 +5039,31 @@ func selectExtensionEventRequest(c *xgb.Conn, Window xproto.Window, NumClasses u
return buf
}
-// Request GetSelectedExtensionEvents
-// size: 8
+// GetSelectedExtensionEventsCookie is a cookie used only for GetSelectedExtensionEvents requests.
type GetSelectedExtensionEventsCookie struct {
*xgb.Cookie
}
+// GetSelectedExtensionEvents sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetSelectedExtensionEventsCookie.Reply()
func GetSelectedExtensionEvents(c *xgb.Conn, Window xproto.Window) GetSelectedExtensionEventsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getSelectedExtensionEventsRequest(c, Window), cookie)
return GetSelectedExtensionEventsCookie{cookie}
}
+// GetSelectedExtensionEventsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetSelectedExtensionEventsUnchecked(c *xgb.Conn, Window xproto.Window) GetSelectedExtensionEventsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getSelectedExtensionEventsRequest(c, Window), cookie)
return GetSelectedExtensionEventsCookie{cookie}
}
-// Request reply for GetSelectedExtensionEvents
-// size: ((32 + xgb.Pad((int(NumThisClasses) * 4))) + xgb.Pad((int(NumAllClasses) * 4)))
+// GetSelectedExtensionEventsReply represents the data returned from a GetSelectedExtensionEvents request.
type GetSelectedExtensionEventsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumThisClasses uint16
NumAllClasses uint16
@@ -5120,7 +5072,7 @@ type GetSelectedExtensionEventsReply struct {
AllClasses []EventClass // size: xgb.Pad((int(NumAllClasses) * 4))
}
-// Waits and reads reply data from request GetSelectedExtensionEvents
+// Reply blocks and returns the reply data for a GetSelectedExtensionEvents request.
func (cook GetSelectedExtensionEventsCookie) Reply() (*GetSelectedExtensionEventsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5132,7 +5084,7 @@ func (cook GetSelectedExtensionEventsCookie) Reply() (*GetSelectedExtensionEvent
return getSelectedExtensionEventsReply(buf), nil
}
-// Read reply into structure from buffer for GetSelectedExtensionEvents
+// getSelectedExtensionEventsReply reads a byte slice into a GetSelectedExtensionEventsReply value.
func getSelectedExtensionEventsReply(buf []byte) *GetSelectedExtensionEventsReply {
v := new(GetSelectedExtensionEventsReply)
b := 1 // skip reply determinant
@@ -5171,6 +5123,7 @@ func getSelectedExtensionEventsReply(buf []byte) *GetSelectedExtensionEventsRepl
}
// Write request to wire for GetSelectedExtensionEvents
+// getSelectedExtensionEventsRequest writes a GetSelectedExtensionEvents request to a byte slice.
func getSelectedExtensionEventsRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -5191,30 +5144,35 @@ func getSelectedExtensionEventsRequest(c *xgb.Conn, Window xproto.Window) []byte
return buf
}
-// Request ChangeDeviceDontPropagateList
-// size: xgb.Pad((12 + xgb.Pad((int(NumClasses) * 4))))
+// ChangeDeviceDontPropagateListCookie is a cookie used only for ChangeDeviceDontPropagateList requests.
type ChangeDeviceDontPropagateListCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeDeviceDontPropagateList
+// ChangeDeviceDontPropagateList sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangeDeviceDontPropagateList(c *xgb.Conn, Window xproto.Window, NumClasses uint16, Mode byte, Classes []EventClass) ChangeDeviceDontPropagateListCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(changeDeviceDontPropagateListRequest(c, Window, NumClasses, Mode, Classes), cookie)
return ChangeDeviceDontPropagateListCookie{cookie}
}
+// ChangeDeviceDontPropagateListChecked sends a checked request.
+// If an error occurs, it can be retrieved using ChangeDeviceDontPropagateListCookie.Check()
func ChangeDeviceDontPropagateListChecked(c *xgb.Conn, Window xproto.Window, NumClasses uint16, Mode byte, Classes []EventClass) ChangeDeviceDontPropagateListCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(changeDeviceDontPropagateListRequest(c, Window, NumClasses, Mode, Classes), cookie)
return ChangeDeviceDontPropagateListCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeDeviceDontPropagateListCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeDeviceDontPropagateList
+// changeDeviceDontPropagateListRequest writes a ChangeDeviceDontPropagateList request to a byte slice.
func changeDeviceDontPropagateListRequest(c *xgb.Conn, Window xproto.Window, NumClasses uint16, Mode byte, Classes []EventClass) []byte {
size := xgb.Pad((12 + xgb.Pad((int(NumClasses) * 4))))
b := 0
@@ -5249,36 +5207,38 @@ func changeDeviceDontPropagateListRequest(c *xgb.Conn, Window xproto.Window, Num
return buf
}
-// Request GetDeviceDontPropagateList
-// size: 8
+// GetDeviceDontPropagateListCookie is a cookie used only for GetDeviceDontPropagateList requests.
type GetDeviceDontPropagateListCookie struct {
*xgb.Cookie
}
+// GetDeviceDontPropagateList sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDeviceDontPropagateListCookie.Reply()
func GetDeviceDontPropagateList(c *xgb.Conn, Window xproto.Window) GetDeviceDontPropagateListCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceDontPropagateListRequest(c, Window), cookie)
return GetDeviceDontPropagateListCookie{cookie}
}
+// GetDeviceDontPropagateListUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceDontPropagateListUnchecked(c *xgb.Conn, Window xproto.Window) GetDeviceDontPropagateListCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceDontPropagateListRequest(c, Window), cookie)
return GetDeviceDontPropagateListCookie{cookie}
}
-// Request reply for GetDeviceDontPropagateList
-// size: (32 + xgb.Pad((int(NumClasses) * 4)))
+// GetDeviceDontPropagateListReply represents the data returned from a GetDeviceDontPropagateList request.
type GetDeviceDontPropagateListReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumClasses uint16
// padding: 22 bytes
Classes []EventClass // size: xgb.Pad((int(NumClasses) * 4))
}
-// Waits and reads reply data from request GetDeviceDontPropagateList
+// Reply blocks and returns the reply data for a GetDeviceDontPropagateList request.
func (cook GetDeviceDontPropagateListCookie) Reply() (*GetDeviceDontPropagateListReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5290,7 +5250,7 @@ func (cook GetDeviceDontPropagateListCookie) Reply() (*GetDeviceDontPropagateLis
return getDeviceDontPropagateListReply(buf), nil
}
-// Read reply into structure from buffer for GetDeviceDontPropagateList
+// getDeviceDontPropagateListReply reads a byte slice into a GetDeviceDontPropagateListReply value.
func getDeviceDontPropagateListReply(buf []byte) *GetDeviceDontPropagateListReply {
v := new(GetDeviceDontPropagateListReply)
b := 1 // skip reply determinant
@@ -5319,6 +5279,7 @@ func getDeviceDontPropagateListReply(buf []byte) *GetDeviceDontPropagateListRepl
}
// Write request to wire for GetDeviceDontPropagateList
+// getDeviceDontPropagateListRequest writes a GetDeviceDontPropagateList request to a byte slice.
func getDeviceDontPropagateListRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -5339,29 +5300,31 @@ func getDeviceDontPropagateListRequest(c *xgb.Conn, Window xproto.Window) []byte
return buf
}
-// Request GetDeviceMotionEvents
-// size: 16
+// GetDeviceMotionEventsCookie is a cookie used only for GetDeviceMotionEvents requests.
type GetDeviceMotionEventsCookie struct {
*xgb.Cookie
}
+// GetDeviceMotionEvents sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDeviceMotionEventsCookie.Reply()
func GetDeviceMotionEvents(c *xgb.Conn, Start xproto.Timestamp, Stop xproto.Timestamp, DeviceId byte) GetDeviceMotionEventsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceMotionEventsRequest(c, Start, Stop, DeviceId), cookie)
return GetDeviceMotionEventsCookie{cookie}
}
+// GetDeviceMotionEventsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceMotionEventsUnchecked(c *xgb.Conn, Start xproto.Timestamp, Stop xproto.Timestamp, DeviceId byte) GetDeviceMotionEventsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceMotionEventsRequest(c, Start, Stop, DeviceId), cookie)
return GetDeviceMotionEventsCookie{cookie}
}
-// Request reply for GetDeviceMotionEvents
-// size: 32
+// GetDeviceMotionEventsReply represents the data returned from a GetDeviceMotionEvents request.
type GetDeviceMotionEventsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumCoords uint32
NumAxes byte
@@ -5369,7 +5332,7 @@ type GetDeviceMotionEventsReply struct {
// padding: 18 bytes
}
-// Waits and reads reply data from request GetDeviceMotionEvents
+// Reply blocks and returns the reply data for a GetDeviceMotionEvents request.
func (cook GetDeviceMotionEventsCookie) Reply() (*GetDeviceMotionEventsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5381,7 +5344,7 @@ func (cook GetDeviceMotionEventsCookie) Reply() (*GetDeviceMotionEventsReply, er
return getDeviceMotionEventsReply(buf), nil
}
-// Read reply into structure from buffer for GetDeviceMotionEvents
+// getDeviceMotionEventsReply reads a byte slice into a GetDeviceMotionEventsReply value.
func getDeviceMotionEventsReply(buf []byte) *GetDeviceMotionEventsReply {
v := new(GetDeviceMotionEventsReply)
b := 1 // skip reply determinant
@@ -5409,6 +5372,7 @@ func getDeviceMotionEventsReply(buf []byte) *GetDeviceMotionEventsReply {
}
// Write request to wire for GetDeviceMotionEvents
+// getDeviceMotionEventsRequest writes a GetDeviceMotionEvents request to a byte slice.
func getDeviceMotionEventsRequest(c *xgb.Conn, Start xproto.Timestamp, Stop xproto.Timestamp, DeviceId byte) []byte {
size := 16
b := 0
@@ -5435,35 +5399,37 @@ func getDeviceMotionEventsRequest(c *xgb.Conn, Start xproto.Timestamp, Stop xpro
return buf
}
-// Request ChangeKeyboardDevice
-// size: 8
+// ChangeKeyboardDeviceCookie is a cookie used only for ChangeKeyboardDevice requests.
type ChangeKeyboardDeviceCookie struct {
*xgb.Cookie
}
+// ChangeKeyboardDevice sends a checked request.
+// If an error occurs, it will be returned with the reply by calling ChangeKeyboardDeviceCookie.Reply()
func ChangeKeyboardDevice(c *xgb.Conn, DeviceId byte) ChangeKeyboardDeviceCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(changeKeyboardDeviceRequest(c, DeviceId), cookie)
return ChangeKeyboardDeviceCookie{cookie}
}
+// ChangeKeyboardDeviceUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangeKeyboardDeviceUnchecked(c *xgb.Conn, DeviceId byte) ChangeKeyboardDeviceCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(changeKeyboardDeviceRequest(c, DeviceId), cookie)
return ChangeKeyboardDeviceCookie{cookie}
}
-// Request reply for ChangeKeyboardDevice
-// size: 32
+// ChangeKeyboardDeviceReply represents the data returned from a ChangeKeyboardDevice request.
type ChangeKeyboardDeviceReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Status byte
// padding: 23 bytes
}
-// Waits and reads reply data from request ChangeKeyboardDevice
+// Reply blocks and returns the reply data for a ChangeKeyboardDevice request.
func (cook ChangeKeyboardDeviceCookie) Reply() (*ChangeKeyboardDeviceReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5475,7 +5441,7 @@ func (cook ChangeKeyboardDeviceCookie) Reply() (*ChangeKeyboardDeviceReply, erro
return changeKeyboardDeviceReply(buf), nil
}
-// Read reply into structure from buffer for ChangeKeyboardDevice
+// changeKeyboardDeviceReply reads a byte slice into a ChangeKeyboardDeviceReply value.
func changeKeyboardDeviceReply(buf []byte) *ChangeKeyboardDeviceReply {
v := new(ChangeKeyboardDeviceReply)
b := 1 // skip reply determinant
@@ -5497,6 +5463,7 @@ func changeKeyboardDeviceReply(buf []byte) *ChangeKeyboardDeviceReply {
}
// Write request to wire for ChangeKeyboardDevice
+// changeKeyboardDeviceRequest writes a ChangeKeyboardDevice request to a byte slice.
func changeKeyboardDeviceRequest(c *xgb.Conn, DeviceId byte) []byte {
size := 8
b := 0
@@ -5519,35 +5486,37 @@ func changeKeyboardDeviceRequest(c *xgb.Conn, DeviceId byte) []byte {
return buf
}
-// Request ChangePointerDevice
-// size: 8
+// ChangePointerDeviceCookie is a cookie used only for ChangePointerDevice requests.
type ChangePointerDeviceCookie struct {
*xgb.Cookie
}
+// ChangePointerDevice sends a checked request.
+// If an error occurs, it will be returned with the reply by calling ChangePointerDeviceCookie.Reply()
func ChangePointerDevice(c *xgb.Conn, XAxis byte, YAxis byte, DeviceId byte) ChangePointerDeviceCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(changePointerDeviceRequest(c, XAxis, YAxis, DeviceId), cookie)
return ChangePointerDeviceCookie{cookie}
}
+// ChangePointerDeviceUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangePointerDeviceUnchecked(c *xgb.Conn, XAxis byte, YAxis byte, DeviceId byte) ChangePointerDeviceCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(changePointerDeviceRequest(c, XAxis, YAxis, DeviceId), cookie)
return ChangePointerDeviceCookie{cookie}
}
-// Request reply for ChangePointerDevice
-// size: 32
+// ChangePointerDeviceReply represents the data returned from a ChangePointerDevice request.
type ChangePointerDeviceReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Status byte
// padding: 23 bytes
}
-// Waits and reads reply data from request ChangePointerDevice
+// Reply blocks and returns the reply data for a ChangePointerDevice request.
func (cook ChangePointerDeviceCookie) Reply() (*ChangePointerDeviceReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5559,7 +5528,7 @@ func (cook ChangePointerDeviceCookie) Reply() (*ChangePointerDeviceReply, error)
return changePointerDeviceReply(buf), nil
}
-// Read reply into structure from buffer for ChangePointerDevice
+// changePointerDeviceReply reads a byte slice into a ChangePointerDeviceReply value.
func changePointerDeviceReply(buf []byte) *ChangePointerDeviceReply {
v := new(ChangePointerDeviceReply)
b := 1 // skip reply determinant
@@ -5581,6 +5550,7 @@ func changePointerDeviceReply(buf []byte) *ChangePointerDeviceReply {
}
// Write request to wire for ChangePointerDevice
+// changePointerDeviceRequest writes a ChangePointerDevice request to a byte slice.
func changePointerDeviceRequest(c *xgb.Conn, XAxis byte, YAxis byte, DeviceId byte) []byte {
size := 8
b := 0
@@ -5609,35 +5579,37 @@ func changePointerDeviceRequest(c *xgb.Conn, XAxis byte, YAxis byte, DeviceId by
return buf
}
-// Request GrabDevice
-// size: xgb.Pad((20 + xgb.Pad((int(NumClasses) * 4))))
+// GrabDeviceCookie is a cookie used only for GrabDevice requests.
type GrabDeviceCookie struct {
*xgb.Cookie
}
+// GrabDevice sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GrabDeviceCookie.Reply()
func GrabDevice(c *xgb.Conn, GrabWindow xproto.Window, Time xproto.Timestamp, NumClasses uint16, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, DeviceId byte, Classes []EventClass) GrabDeviceCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(grabDeviceRequest(c, GrabWindow, Time, NumClasses, ThisDeviceMode, OtherDeviceMode, OwnerEvents, DeviceId, Classes), cookie)
return GrabDeviceCookie{cookie}
}
+// GrabDeviceUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GrabDeviceUnchecked(c *xgb.Conn, GrabWindow xproto.Window, Time xproto.Timestamp, NumClasses uint16, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, DeviceId byte, Classes []EventClass) GrabDeviceCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(grabDeviceRequest(c, GrabWindow, Time, NumClasses, ThisDeviceMode, OtherDeviceMode, OwnerEvents, DeviceId, Classes), cookie)
return GrabDeviceCookie{cookie}
}
-// Request reply for GrabDevice
-// size: 32
+// GrabDeviceReply represents the data returned from a GrabDevice request.
type GrabDeviceReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Status byte
// padding: 23 bytes
}
-// Waits and reads reply data from request GrabDevice
+// Reply blocks and returns the reply data for a GrabDevice request.
func (cook GrabDeviceCookie) Reply() (*GrabDeviceReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -5649,7 +5621,7 @@ func (cook GrabDeviceCookie) Reply() (*GrabDeviceReply, error) {
return grabDeviceReply(buf), nil
}
-// Read reply into structure from buffer for GrabDevice
+// grabDeviceReply reads a byte slice into a GrabDeviceReply value.
func grabDeviceReply(buf []byte) *GrabDeviceReply {
v := new(GrabDeviceReply)
b := 1 // skip reply determinant
@@ -5671,6 +5643,7 @@ func grabDeviceReply(buf []byte) *GrabDeviceReply {
}
// Write request to wire for GrabDevice
+// grabDeviceRequest writes a GrabDevice request to a byte slice.
func grabDeviceRequest(c *xgb.Conn, GrabWindow xproto.Window, Time xproto.Timestamp, NumClasses uint16, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, DeviceId byte, Classes []EventClass) []byte {
size := xgb.Pad((20 + xgb.Pad((int(NumClasses) * 4))))
b := 0
@@ -5721,30 +5694,35 @@ func grabDeviceRequest(c *xgb.Conn, GrabWindow xproto.Window, Time xproto.Timest
return buf
}
-// Request UngrabDevice
-// size: 12
+// UngrabDeviceCookie is a cookie used only for UngrabDevice requests.
type UngrabDeviceCookie struct {
*xgb.Cookie
}
-// Write request to wire for UngrabDevice
+// UngrabDevice sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UngrabDevice(c *xgb.Conn, Time xproto.Timestamp, DeviceId byte) UngrabDeviceCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(ungrabDeviceRequest(c, Time, DeviceId), cookie)
return UngrabDeviceCookie{cookie}
}
+// UngrabDeviceChecked sends a checked request.
+// If an error occurs, it can be retrieved using UngrabDeviceCookie.Check()
func UngrabDeviceChecked(c *xgb.Conn, Time xproto.Timestamp, DeviceId byte) UngrabDeviceCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(ungrabDeviceRequest(c, Time, DeviceId), cookie)
return UngrabDeviceCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UngrabDeviceCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UngrabDevice
+// ungrabDeviceRequest writes a UngrabDevice request to a byte slice.
func ungrabDeviceRequest(c *xgb.Conn, Time xproto.Timestamp, DeviceId byte) []byte {
size := 12
b := 0
@@ -5768,30 +5746,35 @@ func ungrabDeviceRequest(c *xgb.Conn, Time xproto.Timestamp, DeviceId byte) []by
return buf
}
-// Request GrabDeviceKey
-// size: xgb.Pad((20 + xgb.Pad((int(NumClasses) * 4))))
+// GrabDeviceKeyCookie is a cookie used only for GrabDeviceKey requests.
type GrabDeviceKeyCookie struct {
*xgb.Cookie
}
-// Write request to wire for GrabDeviceKey
+// GrabDeviceKey sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GrabDeviceKey(c *xgb.Conn, GrabWindow xproto.Window, NumClasses uint16, Modifiers uint16, ModifierDevice byte, GrabbedDevice byte, Key byte, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, Classes []EventClass) GrabDeviceKeyCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(grabDeviceKeyRequest(c, GrabWindow, NumClasses, Modifiers, ModifierDevice, GrabbedDevice, Key, ThisDeviceMode, OtherDeviceMode, OwnerEvents, Classes), cookie)
return GrabDeviceKeyCookie{cookie}
}
+// GrabDeviceKeyChecked sends a checked request.
+// If an error occurs, it can be retrieved using GrabDeviceKeyCookie.Check()
func GrabDeviceKeyChecked(c *xgb.Conn, GrabWindow xproto.Window, NumClasses uint16, Modifiers uint16, ModifierDevice byte, GrabbedDevice byte, Key byte, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, Classes []EventClass) GrabDeviceKeyCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(grabDeviceKeyRequest(c, GrabWindow, NumClasses, Modifiers, ModifierDevice, GrabbedDevice, Key, ThisDeviceMode, OtherDeviceMode, OwnerEvents, Classes), cookie)
return GrabDeviceKeyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook GrabDeviceKeyCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for GrabDeviceKey
+// grabDeviceKeyRequest writes a GrabDeviceKey request to a byte slice.
func grabDeviceKeyRequest(c *xgb.Conn, GrabWindow xproto.Window, NumClasses uint16, Modifiers uint16, ModifierDevice byte, GrabbedDevice byte, Key byte, ThisDeviceMode byte, OtherDeviceMode byte, OwnerEvents bool, Classes []EventClass) []byte {
size := xgb.Pad((20 + xgb.Pad((int(NumClasses) * 4))))
b := 0
@@ -5848,30 +5831,35 @@ func grabDeviceKeyRequest(c *xgb.Conn, GrabWindow xproto.Window, NumClasses uint
return buf
}
-// Request UngrabDeviceKey
-// size: 16
+// UngrabDeviceKeyCookie is a cookie used only for UngrabDeviceKey requests.
type UngrabDeviceKeyCookie struct {
*xgb.Cookie
}
-// Write request to wire for UngrabDeviceKey
+// UngrabDeviceKey sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UngrabDeviceKey(c *xgb.Conn, GrabWindow xproto.Window, Modifiers uint16, ModifierDevice byte, Key byte, GrabbedDevice byte) UngrabDeviceKeyCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(ungrabDeviceKeyRequest(c, GrabWindow, Modifiers, ModifierDevice, Key, GrabbedDevice), cookie)
return UngrabDeviceKeyCookie{cookie}
}
+// UngrabDeviceKeyChecked sends a checked request.
+// If an error occurs, it can be retrieved using UngrabDeviceKeyCookie.Check()
func UngrabDeviceKeyChecked(c *xgb.Conn, GrabWindow xproto.Window, Modifiers uint16, ModifierDevice byte, Key byte, GrabbedDevice byte) UngrabDeviceKeyCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(ungrabDeviceKeyRequest(c, GrabWindow, Modifiers, ModifierDevice, Key, GrabbedDevice), cookie)
return UngrabDeviceKeyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UngrabDeviceKeyCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UngrabDeviceKey
+// ungrabDeviceKeyRequest writes a UngrabDeviceKey request to a byte slice.
func ungrabDeviceKeyRequest(c *xgb.Conn, GrabWindow xproto.Window, Modifiers uint16, ModifierDevice byte, Key byte, GrabbedDevice byte) []byte {
size := 16
b := 0
@@ -5904,30 +5892,35 @@ func ungrabDeviceKeyRequest(c *xgb.Conn, GrabWindow xproto.Window, Modifiers uin
return buf
}
-// Request GrabDeviceButton
-// size: xgb.Pad((20 + xgb.Pad((int(NumClasses) * 4))))
+// GrabDeviceButtonCookie is a cookie used only for GrabDeviceButton requests.
type GrabDeviceButtonCookie struct {
*xgb.Cookie
}
-// Write request to wire for GrabDeviceButton
+// GrabDeviceButton sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GrabDeviceButton(c *xgb.Conn, GrabWindow xproto.Window, GrabbedDevice byte, ModifierDevice byte, NumClasses uint16, Modifiers uint16, ThisDeviceMode byte, OtherDeviceMode byte, Button byte, OwnerEvents byte, Classes []EventClass) GrabDeviceButtonCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(grabDeviceButtonRequest(c, GrabWindow, GrabbedDevice, ModifierDevice, NumClasses, Modifiers, ThisDeviceMode, OtherDeviceMode, Button, OwnerEvents, Classes), cookie)
return GrabDeviceButtonCookie{cookie}
}
+// GrabDeviceButtonChecked sends a checked request.
+// If an error occurs, it can be retrieved using GrabDeviceButtonCookie.Check()
func GrabDeviceButtonChecked(c *xgb.Conn, GrabWindow xproto.Window, GrabbedDevice byte, ModifierDevice byte, NumClasses uint16, Modifiers uint16, ThisDeviceMode byte, OtherDeviceMode byte, Button byte, OwnerEvents byte, Classes []EventClass) GrabDeviceButtonCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(grabDeviceButtonRequest(c, GrabWindow, GrabbedDevice, ModifierDevice, NumClasses, Modifiers, ThisDeviceMode, OtherDeviceMode, Button, OwnerEvents, Classes), cookie)
return GrabDeviceButtonCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook GrabDeviceButtonCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for GrabDeviceButton
+// grabDeviceButtonRequest writes a GrabDeviceButton request to a byte slice.
func grabDeviceButtonRequest(c *xgb.Conn, GrabWindow xproto.Window, GrabbedDevice byte, ModifierDevice byte, NumClasses uint16, Modifiers uint16, ThisDeviceMode byte, OtherDeviceMode byte, Button byte, OwnerEvents byte, Classes []EventClass) []byte {
size := xgb.Pad((20 + xgb.Pad((int(NumClasses) * 4))))
b := 0
@@ -5980,30 +5973,35 @@ func grabDeviceButtonRequest(c *xgb.Conn, GrabWindow xproto.Window, GrabbedDevic
return buf
}
-// Request UngrabDeviceButton
-// size: 16
+// UngrabDeviceButtonCookie is a cookie used only for UngrabDeviceButton requests.
type UngrabDeviceButtonCookie struct {
*xgb.Cookie
}
-// Write request to wire for UngrabDeviceButton
+// UngrabDeviceButton sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UngrabDeviceButton(c *xgb.Conn, GrabWindow xproto.Window, Modifiers uint16, ModifierDevice byte, Button byte, GrabbedDevice byte) UngrabDeviceButtonCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(ungrabDeviceButtonRequest(c, GrabWindow, Modifiers, ModifierDevice, Button, GrabbedDevice), cookie)
return UngrabDeviceButtonCookie{cookie}
}
+// UngrabDeviceButtonChecked sends a checked request.
+// If an error occurs, it can be retrieved using UngrabDeviceButtonCookie.Check()
func UngrabDeviceButtonChecked(c *xgb.Conn, GrabWindow xproto.Window, Modifiers uint16, ModifierDevice byte, Button byte, GrabbedDevice byte) UngrabDeviceButtonCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(ungrabDeviceButtonRequest(c, GrabWindow, Modifiers, ModifierDevice, Button, GrabbedDevice), cookie)
return UngrabDeviceButtonCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UngrabDeviceButtonCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UngrabDeviceButton
+// ungrabDeviceButtonRequest writes a UngrabDeviceButton request to a byte slice.
func ungrabDeviceButtonRequest(c *xgb.Conn, GrabWindow xproto.Window, Modifiers uint16, ModifierDevice byte, Button byte, GrabbedDevice byte) []byte {
size := 16
b := 0
@@ -6036,30 +6034,35 @@ func ungrabDeviceButtonRequest(c *xgb.Conn, GrabWindow xproto.Window, Modifiers
return buf
}
-// Request AllowDeviceEvents
-// size: 12
+// AllowDeviceEventsCookie is a cookie used only for AllowDeviceEvents requests.
type AllowDeviceEventsCookie struct {
*xgb.Cookie
}
-// Write request to wire for AllowDeviceEvents
+// AllowDeviceEvents sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func AllowDeviceEvents(c *xgb.Conn, Time xproto.Timestamp, Mode byte, DeviceId byte) AllowDeviceEventsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(allowDeviceEventsRequest(c, Time, Mode, DeviceId), cookie)
return AllowDeviceEventsCookie{cookie}
}
+// AllowDeviceEventsChecked sends a checked request.
+// If an error occurs, it can be retrieved using AllowDeviceEventsCookie.Check()
func AllowDeviceEventsChecked(c *xgb.Conn, Time xproto.Timestamp, Mode byte, DeviceId byte) AllowDeviceEventsCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(allowDeviceEventsRequest(c, Time, Mode, DeviceId), cookie)
return AllowDeviceEventsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook AllowDeviceEventsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for AllowDeviceEvents
+// allowDeviceEventsRequest writes a AllowDeviceEvents request to a byte slice.
func allowDeviceEventsRequest(c *xgb.Conn, Time xproto.Timestamp, Mode byte, DeviceId byte) []byte {
size := 12
b := 0
@@ -6086,29 +6089,31 @@ func allowDeviceEventsRequest(c *xgb.Conn, Time xproto.Timestamp, Mode byte, Dev
return buf
}
-// Request GetDeviceFocus
-// size: 8
+// GetDeviceFocusCookie is a cookie used only for GetDeviceFocus requests.
type GetDeviceFocusCookie struct {
*xgb.Cookie
}
+// GetDeviceFocus sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDeviceFocusCookie.Reply()
func GetDeviceFocus(c *xgb.Conn, DeviceId byte) GetDeviceFocusCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceFocusRequest(c, DeviceId), cookie)
return GetDeviceFocusCookie{cookie}
}
+// GetDeviceFocusUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceFocusUnchecked(c *xgb.Conn, DeviceId byte) GetDeviceFocusCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceFocusRequest(c, DeviceId), cookie)
return GetDeviceFocusCookie{cookie}
}
-// Request reply for GetDeviceFocus
-// size: 32
+// GetDeviceFocusReply represents the data returned from a GetDeviceFocus request.
type GetDeviceFocusReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Focus xproto.Window
Time xproto.Timestamp
@@ -6116,7 +6121,7 @@ type GetDeviceFocusReply struct {
// padding: 15 bytes
}
-// Waits and reads reply data from request GetDeviceFocus
+// Reply blocks and returns the reply data for a GetDeviceFocus request.
func (cook GetDeviceFocusCookie) Reply() (*GetDeviceFocusReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6128,7 +6133,7 @@ func (cook GetDeviceFocusCookie) Reply() (*GetDeviceFocusReply, error) {
return getDeviceFocusReply(buf), nil
}
-// Read reply into structure from buffer for GetDeviceFocus
+// getDeviceFocusReply reads a byte slice into a GetDeviceFocusReply value.
func getDeviceFocusReply(buf []byte) *GetDeviceFocusReply {
v := new(GetDeviceFocusReply)
b := 1 // skip reply determinant
@@ -6156,6 +6161,7 @@ func getDeviceFocusReply(buf []byte) *GetDeviceFocusReply {
}
// Write request to wire for GetDeviceFocus
+// getDeviceFocusRequest writes a GetDeviceFocus request to a byte slice.
func getDeviceFocusRequest(c *xgb.Conn, DeviceId byte) []byte {
size := 8
b := 0
@@ -6178,30 +6184,35 @@ func getDeviceFocusRequest(c *xgb.Conn, DeviceId byte) []byte {
return buf
}
-// Request SetDeviceFocus
-// size: 16
+// SetDeviceFocusCookie is a cookie used only for SetDeviceFocus requests.
type SetDeviceFocusCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetDeviceFocus
+// SetDeviceFocus sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetDeviceFocus(c *xgb.Conn, Focus xproto.Window, Time xproto.Timestamp, RevertTo byte, DeviceId byte) SetDeviceFocusCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setDeviceFocusRequest(c, Focus, Time, RevertTo, DeviceId), cookie)
return SetDeviceFocusCookie{cookie}
}
+// SetDeviceFocusChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetDeviceFocusCookie.Check()
func SetDeviceFocusChecked(c *xgb.Conn, Focus xproto.Window, Time xproto.Timestamp, RevertTo byte, DeviceId byte) SetDeviceFocusCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setDeviceFocusRequest(c, Focus, Time, RevertTo, DeviceId), cookie)
return SetDeviceFocusCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetDeviceFocusCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetDeviceFocus
+// setDeviceFocusRequest writes a SetDeviceFocus request to a byte slice.
func setDeviceFocusRequest(c *xgb.Conn, Focus xproto.Window, Time xproto.Timestamp, RevertTo byte, DeviceId byte) []byte {
size := 16
b := 0
@@ -6231,35 +6242,37 @@ func setDeviceFocusRequest(c *xgb.Conn, Focus xproto.Window, Time xproto.Timesta
return buf
}
-// Request GetFeedbackControl
-// size: 8
+// GetFeedbackControlCookie is a cookie used only for GetFeedbackControl requests.
type GetFeedbackControlCookie struct {
*xgb.Cookie
}
+// GetFeedbackControl sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetFeedbackControlCookie.Reply()
func GetFeedbackControl(c *xgb.Conn, DeviceId byte) GetFeedbackControlCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getFeedbackControlRequest(c, DeviceId), cookie)
return GetFeedbackControlCookie{cookie}
}
+// GetFeedbackControlUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetFeedbackControlUnchecked(c *xgb.Conn, DeviceId byte) GetFeedbackControlCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getFeedbackControlRequest(c, DeviceId), cookie)
return GetFeedbackControlCookie{cookie}
}
-// Request reply for GetFeedbackControl
-// size: 32
+// GetFeedbackControlReply represents the data returned from a GetFeedbackControl request.
type GetFeedbackControlReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumFeedback uint16
// padding: 22 bytes
}
-// Waits and reads reply data from request GetFeedbackControl
+// Reply blocks and returns the reply data for a GetFeedbackControl request.
func (cook GetFeedbackControlCookie) Reply() (*GetFeedbackControlReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6271,7 +6284,7 @@ func (cook GetFeedbackControlCookie) Reply() (*GetFeedbackControlReply, error) {
return getFeedbackControlReply(buf), nil
}
-// Read reply into structure from buffer for GetFeedbackControl
+// getFeedbackControlReply reads a byte slice into a GetFeedbackControlReply value.
func getFeedbackControlReply(buf []byte) *GetFeedbackControlReply {
v := new(GetFeedbackControlReply)
b := 1 // skip reply determinant
@@ -6293,6 +6306,7 @@ func getFeedbackControlReply(buf []byte) *GetFeedbackControlReply {
}
// Write request to wire for GetFeedbackControl
+// getFeedbackControlRequest writes a GetFeedbackControl request to a byte slice.
func getFeedbackControlRequest(c *xgb.Conn, DeviceId byte) []byte {
size := 8
b := 0
@@ -6315,36 +6329,38 @@ func getFeedbackControlRequest(c *xgb.Conn, DeviceId byte) []byte {
return buf
}
-// Request GetDeviceKeyMapping
-// size: 8
+// GetDeviceKeyMappingCookie is a cookie used only for GetDeviceKeyMapping requests.
type GetDeviceKeyMappingCookie struct {
*xgb.Cookie
}
+// GetDeviceKeyMapping sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDeviceKeyMappingCookie.Reply()
func GetDeviceKeyMapping(c *xgb.Conn, DeviceId byte, FirstKeycode KeyCode, Count byte) GetDeviceKeyMappingCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceKeyMappingRequest(c, DeviceId, FirstKeycode, Count), cookie)
return GetDeviceKeyMappingCookie{cookie}
}
+// GetDeviceKeyMappingUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceKeyMappingUnchecked(c *xgb.Conn, DeviceId byte, FirstKeycode KeyCode, Count byte) GetDeviceKeyMappingCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceKeyMappingRequest(c, DeviceId, FirstKeycode, Count), cookie)
return GetDeviceKeyMappingCookie{cookie}
}
-// Request reply for GetDeviceKeyMapping
-// size: (32 + xgb.Pad((int(Length) * 4)))
+// GetDeviceKeyMappingReply represents the data returned from a GetDeviceKeyMapping request.
type GetDeviceKeyMappingReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
KeysymsPerKeycode byte
// padding: 23 bytes
Keysyms []xproto.Keysym // size: xgb.Pad((int(Length) * 4))
}
-// Waits and reads reply data from request GetDeviceKeyMapping
+// Reply blocks and returns the reply data for a GetDeviceKeyMapping request.
func (cook GetDeviceKeyMappingCookie) Reply() (*GetDeviceKeyMappingReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6356,7 +6372,7 @@ func (cook GetDeviceKeyMappingCookie) Reply() (*GetDeviceKeyMappingReply, error)
return getDeviceKeyMappingReply(buf), nil
}
-// Read reply into structure from buffer for GetDeviceKeyMapping
+// getDeviceKeyMappingReply reads a byte slice into a GetDeviceKeyMappingReply value.
func getDeviceKeyMappingReply(buf []byte) *GetDeviceKeyMappingReply {
v := new(GetDeviceKeyMappingReply)
b := 1 // skip reply determinant
@@ -6385,6 +6401,7 @@ func getDeviceKeyMappingReply(buf []byte) *GetDeviceKeyMappingReply {
}
// Write request to wire for GetDeviceKeyMapping
+// getDeviceKeyMappingRequest writes a GetDeviceKeyMapping request to a byte slice.
func getDeviceKeyMappingRequest(c *xgb.Conn, DeviceId byte, FirstKeycode KeyCode, Count byte) []byte {
size := 8
b := 0
@@ -6411,30 +6428,35 @@ func getDeviceKeyMappingRequest(c *xgb.Conn, DeviceId byte, FirstKeycode KeyCode
return buf
}
-// Request ChangeDeviceKeyMapping
-// size: xgb.Pad((8 + xgb.Pad(((int(KeycodeCount) * int(KeysymsPerKeycode)) * 4))))
+// ChangeDeviceKeyMappingCookie is a cookie used only for ChangeDeviceKeyMapping requests.
type ChangeDeviceKeyMappingCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeDeviceKeyMapping
+// ChangeDeviceKeyMapping sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangeDeviceKeyMapping(c *xgb.Conn, DeviceId byte, FirstKeycode KeyCode, KeysymsPerKeycode byte, KeycodeCount byte, Keysyms []xproto.Keysym) ChangeDeviceKeyMappingCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(changeDeviceKeyMappingRequest(c, DeviceId, FirstKeycode, KeysymsPerKeycode, KeycodeCount, Keysyms), cookie)
return ChangeDeviceKeyMappingCookie{cookie}
}
+// ChangeDeviceKeyMappingChecked sends a checked request.
+// If an error occurs, it can be retrieved using ChangeDeviceKeyMappingCookie.Check()
func ChangeDeviceKeyMappingChecked(c *xgb.Conn, DeviceId byte, FirstKeycode KeyCode, KeysymsPerKeycode byte, KeycodeCount byte, Keysyms []xproto.Keysym) ChangeDeviceKeyMappingCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(changeDeviceKeyMappingRequest(c, DeviceId, FirstKeycode, KeysymsPerKeycode, KeycodeCount, Keysyms), cookie)
return ChangeDeviceKeyMappingCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeDeviceKeyMappingCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeDeviceKeyMapping
+// changeDeviceKeyMappingRequest writes a ChangeDeviceKeyMapping request to a byte slice.
func changeDeviceKeyMappingRequest(c *xgb.Conn, DeviceId byte, FirstKeycode KeyCode, KeysymsPerKeycode byte, KeycodeCount byte, Keysyms []xproto.Keysym) []byte {
size := xgb.Pad((8 + xgb.Pad(((int(KeycodeCount) * int(KeysymsPerKeycode)) * 4))))
b := 0
@@ -6470,36 +6492,38 @@ func changeDeviceKeyMappingRequest(c *xgb.Conn, DeviceId byte, FirstKeycode KeyC
return buf
}
-// Request GetDeviceModifierMapping
-// size: 8
+// GetDeviceModifierMappingCookie is a cookie used only for GetDeviceModifierMapping requests.
type GetDeviceModifierMappingCookie struct {
*xgb.Cookie
}
+// GetDeviceModifierMapping sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDeviceModifierMappingCookie.Reply()
func GetDeviceModifierMapping(c *xgb.Conn, DeviceId byte) GetDeviceModifierMappingCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceModifierMappingRequest(c, DeviceId), cookie)
return GetDeviceModifierMappingCookie{cookie}
}
+// GetDeviceModifierMappingUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceModifierMappingUnchecked(c *xgb.Conn, DeviceId byte) GetDeviceModifierMappingCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceModifierMappingRequest(c, DeviceId), cookie)
return GetDeviceModifierMappingCookie{cookie}
}
-// Request reply for GetDeviceModifierMapping
-// size: (32 + xgb.Pad(((int(KeycodesPerModifier) * 8) * 1)))
+// GetDeviceModifierMappingReply represents the data returned from a GetDeviceModifierMapping request.
type GetDeviceModifierMappingReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
KeycodesPerModifier byte
// padding: 23 bytes
Keymaps []byte // size: xgb.Pad(((int(KeycodesPerModifier) * 8) * 1))
}
-// Waits and reads reply data from request GetDeviceModifierMapping
+// Reply blocks and returns the reply data for a GetDeviceModifierMapping request.
func (cook GetDeviceModifierMappingCookie) Reply() (*GetDeviceModifierMappingReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6511,7 +6535,7 @@ func (cook GetDeviceModifierMappingCookie) Reply() (*GetDeviceModifierMappingRep
return getDeviceModifierMappingReply(buf), nil
}
-// Read reply into structure from buffer for GetDeviceModifierMapping
+// getDeviceModifierMappingReply reads a byte slice into a GetDeviceModifierMappingReply value.
func getDeviceModifierMappingReply(buf []byte) *GetDeviceModifierMappingReply {
v := new(GetDeviceModifierMappingReply)
b := 1 // skip reply determinant
@@ -6537,6 +6561,7 @@ func getDeviceModifierMappingReply(buf []byte) *GetDeviceModifierMappingReply {
}
// Write request to wire for GetDeviceModifierMapping
+// getDeviceModifierMappingRequest writes a GetDeviceModifierMapping request to a byte slice.
func getDeviceModifierMappingRequest(c *xgb.Conn, DeviceId byte) []byte {
size := 8
b := 0
@@ -6559,35 +6584,37 @@ func getDeviceModifierMappingRequest(c *xgb.Conn, DeviceId byte) []byte {
return buf
}
-// Request SetDeviceModifierMapping
-// size: xgb.Pad((7 + xgb.Pad(((int(KeycodesPerModifier) * 8) * 1))))
+// SetDeviceModifierMappingCookie is a cookie used only for SetDeviceModifierMapping requests.
type SetDeviceModifierMappingCookie struct {
*xgb.Cookie
}
+// SetDeviceModifierMapping sends a checked request.
+// If an error occurs, it will be returned with the reply by calling SetDeviceModifierMappingCookie.Reply()
func SetDeviceModifierMapping(c *xgb.Conn, DeviceId byte, KeycodesPerModifier byte, Keymaps []byte) SetDeviceModifierMappingCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(setDeviceModifierMappingRequest(c, DeviceId, KeycodesPerModifier, Keymaps), cookie)
return SetDeviceModifierMappingCookie{cookie}
}
+// SetDeviceModifierMappingUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetDeviceModifierMappingUnchecked(c *xgb.Conn, DeviceId byte, KeycodesPerModifier byte, Keymaps []byte) SetDeviceModifierMappingCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(setDeviceModifierMappingRequest(c, DeviceId, KeycodesPerModifier, Keymaps), cookie)
return SetDeviceModifierMappingCookie{cookie}
}
-// Request reply for SetDeviceModifierMapping
-// size: 32
+// SetDeviceModifierMappingReply represents the data returned from a SetDeviceModifierMapping request.
type SetDeviceModifierMappingReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Status byte
// padding: 23 bytes
}
-// Waits and reads reply data from request SetDeviceModifierMapping
+// Reply blocks and returns the reply data for a SetDeviceModifierMapping request.
func (cook SetDeviceModifierMappingCookie) Reply() (*SetDeviceModifierMappingReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6599,7 +6626,7 @@ func (cook SetDeviceModifierMappingCookie) Reply() (*SetDeviceModifierMappingRep
return setDeviceModifierMappingReply(buf), nil
}
-// Read reply into structure from buffer for SetDeviceModifierMapping
+// setDeviceModifierMappingReply reads a byte slice into a SetDeviceModifierMappingReply value.
func setDeviceModifierMappingReply(buf []byte) *SetDeviceModifierMappingReply {
v := new(SetDeviceModifierMappingReply)
b := 1 // skip reply determinant
@@ -6621,6 +6648,7 @@ func setDeviceModifierMappingReply(buf []byte) *SetDeviceModifierMappingReply {
}
// Write request to wire for SetDeviceModifierMapping
+// setDeviceModifierMappingRequest writes a SetDeviceModifierMapping request to a byte slice.
func setDeviceModifierMappingRequest(c *xgb.Conn, DeviceId byte, KeycodesPerModifier byte, Keymaps []byte) []byte {
size := xgb.Pad((7 + xgb.Pad(((int(KeycodesPerModifier) * 8) * 1))))
b := 0
@@ -6649,36 +6677,38 @@ func setDeviceModifierMappingRequest(c *xgb.Conn, DeviceId byte, KeycodesPerModi
return buf
}
-// Request GetDeviceButtonMapping
-// size: 8
+// GetDeviceButtonMappingCookie is a cookie used only for GetDeviceButtonMapping requests.
type GetDeviceButtonMappingCookie struct {
*xgb.Cookie
}
+// GetDeviceButtonMapping sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDeviceButtonMappingCookie.Reply()
func GetDeviceButtonMapping(c *xgb.Conn, DeviceId byte) GetDeviceButtonMappingCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceButtonMappingRequest(c, DeviceId), cookie)
return GetDeviceButtonMappingCookie{cookie}
}
+// GetDeviceButtonMappingUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceButtonMappingUnchecked(c *xgb.Conn, DeviceId byte) GetDeviceButtonMappingCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceButtonMappingRequest(c, DeviceId), cookie)
return GetDeviceButtonMappingCookie{cookie}
}
-// Request reply for GetDeviceButtonMapping
-// size: (32 + xgb.Pad((int(MapSize) * 1)))
+// GetDeviceButtonMappingReply represents the data returned from a GetDeviceButtonMapping request.
type GetDeviceButtonMappingReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MapSize byte
// padding: 23 bytes
Map []byte // size: xgb.Pad((int(MapSize) * 1))
}
-// Waits and reads reply data from request GetDeviceButtonMapping
+// Reply blocks and returns the reply data for a GetDeviceButtonMapping request.
func (cook GetDeviceButtonMappingCookie) Reply() (*GetDeviceButtonMappingReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6690,7 +6720,7 @@ func (cook GetDeviceButtonMappingCookie) Reply() (*GetDeviceButtonMappingReply,
return getDeviceButtonMappingReply(buf), nil
}
-// Read reply into structure from buffer for GetDeviceButtonMapping
+// getDeviceButtonMappingReply reads a byte slice into a GetDeviceButtonMappingReply value.
func getDeviceButtonMappingReply(buf []byte) *GetDeviceButtonMappingReply {
v := new(GetDeviceButtonMappingReply)
b := 1 // skip reply determinant
@@ -6716,6 +6746,7 @@ func getDeviceButtonMappingReply(buf []byte) *GetDeviceButtonMappingReply {
}
// Write request to wire for GetDeviceButtonMapping
+// getDeviceButtonMappingRequest writes a GetDeviceButtonMapping request to a byte slice.
func getDeviceButtonMappingRequest(c *xgb.Conn, DeviceId byte) []byte {
size := 8
b := 0
@@ -6738,35 +6769,37 @@ func getDeviceButtonMappingRequest(c *xgb.Conn, DeviceId byte) []byte {
return buf
}
-// Request SetDeviceButtonMapping
-// size: xgb.Pad((8 + xgb.Pad((int(MapSize) * 1))))
+// SetDeviceButtonMappingCookie is a cookie used only for SetDeviceButtonMapping requests.
type SetDeviceButtonMappingCookie struct {
*xgb.Cookie
}
+// SetDeviceButtonMapping sends a checked request.
+// If an error occurs, it will be returned with the reply by calling SetDeviceButtonMappingCookie.Reply()
func SetDeviceButtonMapping(c *xgb.Conn, DeviceId byte, MapSize byte, Map []byte) SetDeviceButtonMappingCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(setDeviceButtonMappingRequest(c, DeviceId, MapSize, Map), cookie)
return SetDeviceButtonMappingCookie{cookie}
}
+// SetDeviceButtonMappingUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetDeviceButtonMappingUnchecked(c *xgb.Conn, DeviceId byte, MapSize byte, Map []byte) SetDeviceButtonMappingCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(setDeviceButtonMappingRequest(c, DeviceId, MapSize, Map), cookie)
return SetDeviceButtonMappingCookie{cookie}
}
-// Request reply for SetDeviceButtonMapping
-// size: 32
+// SetDeviceButtonMappingReply represents the data returned from a SetDeviceButtonMapping request.
type SetDeviceButtonMappingReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Status byte
// padding: 23 bytes
}
-// Waits and reads reply data from request SetDeviceButtonMapping
+// Reply blocks and returns the reply data for a SetDeviceButtonMapping request.
func (cook SetDeviceButtonMappingCookie) Reply() (*SetDeviceButtonMappingReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6778,7 +6811,7 @@ func (cook SetDeviceButtonMappingCookie) Reply() (*SetDeviceButtonMappingReply,
return setDeviceButtonMappingReply(buf), nil
}
-// Read reply into structure from buffer for SetDeviceButtonMapping
+// setDeviceButtonMappingReply reads a byte slice into a SetDeviceButtonMappingReply value.
func setDeviceButtonMappingReply(buf []byte) *SetDeviceButtonMappingReply {
v := new(SetDeviceButtonMappingReply)
b := 1 // skip reply determinant
@@ -6800,6 +6833,7 @@ func setDeviceButtonMappingReply(buf []byte) *SetDeviceButtonMappingReply {
}
// Write request to wire for SetDeviceButtonMapping
+// setDeviceButtonMappingRequest writes a SetDeviceButtonMapping request to a byte slice.
func setDeviceButtonMappingRequest(c *xgb.Conn, DeviceId byte, MapSize byte, Map []byte) []byte {
size := xgb.Pad((8 + xgb.Pad((int(MapSize) * 1))))
b := 0
@@ -6828,35 +6862,37 @@ func setDeviceButtonMappingRequest(c *xgb.Conn, DeviceId byte, MapSize byte, Map
return buf
}
-// Request QueryDeviceState
-// size: 8
+// QueryDeviceStateCookie is a cookie used only for QueryDeviceState requests.
type QueryDeviceStateCookie struct {
*xgb.Cookie
}
+// QueryDeviceState sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryDeviceStateCookie.Reply()
func QueryDeviceState(c *xgb.Conn, DeviceId byte) QueryDeviceStateCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryDeviceStateRequest(c, DeviceId), cookie)
return QueryDeviceStateCookie{cookie}
}
+// QueryDeviceStateUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryDeviceStateUnchecked(c *xgb.Conn, DeviceId byte) QueryDeviceStateCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryDeviceStateRequest(c, DeviceId), cookie)
return QueryDeviceStateCookie{cookie}
}
-// Request reply for QueryDeviceState
-// size: 32
+// QueryDeviceStateReply represents the data returned from a QueryDeviceState request.
type QueryDeviceStateReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumClasses byte
// padding: 23 bytes
}
-// Waits and reads reply data from request QueryDeviceState
+// Reply blocks and returns the reply data for a QueryDeviceState request.
func (cook QueryDeviceStateCookie) Reply() (*QueryDeviceStateReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6868,7 +6904,7 @@ func (cook QueryDeviceStateCookie) Reply() (*QueryDeviceStateReply, error) {
return queryDeviceStateReply(buf), nil
}
-// Read reply into structure from buffer for QueryDeviceState
+// queryDeviceStateReply reads a byte slice into a QueryDeviceStateReply value.
func queryDeviceStateReply(buf []byte) *QueryDeviceStateReply {
v := new(QueryDeviceStateReply)
b := 1 // skip reply determinant
@@ -6890,6 +6926,7 @@ func queryDeviceStateReply(buf []byte) *QueryDeviceStateReply {
}
// Write request to wire for QueryDeviceState
+// queryDeviceStateRequest writes a QueryDeviceState request to a byte slice.
func queryDeviceStateRequest(c *xgb.Conn, DeviceId byte) []byte {
size := 8
b := 0
@@ -6912,30 +6949,35 @@ func queryDeviceStateRequest(c *xgb.Conn, DeviceId byte) []byte {
return buf
}
-// Request SendExtensionEvent
-// size: xgb.Pad(((16 + xgb.Pad(((int(NumEvents) * 32) * 1))) + xgb.Pad((int(NumClasses) * 4))))
+// SendExtensionEventCookie is a cookie used only for SendExtensionEvent requests.
type SendExtensionEventCookie struct {
*xgb.Cookie
}
-// Write request to wire for SendExtensionEvent
+// SendExtensionEvent sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SendExtensionEvent(c *xgb.Conn, Destination xproto.Window, DeviceId byte, Propagate bool, NumClasses uint16, NumEvents byte, Events string, Classes []EventClass) SendExtensionEventCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(sendExtensionEventRequest(c, Destination, DeviceId, Propagate, NumClasses, NumEvents, Events, Classes), cookie)
return SendExtensionEventCookie{cookie}
}
+// SendExtensionEventChecked sends a checked request.
+// If an error occurs, it can be retrieved using SendExtensionEventCookie.Check()
func SendExtensionEventChecked(c *xgb.Conn, Destination xproto.Window, DeviceId byte, Propagate bool, NumClasses uint16, NumEvents byte, Events string, Classes []EventClass) SendExtensionEventCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(sendExtensionEventRequest(c, Destination, DeviceId, Propagate, NumClasses, NumEvents, Events, Classes), cookie)
return SendExtensionEventCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SendExtensionEventCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SendExtensionEvent
+// sendExtensionEventRequest writes a SendExtensionEvent request to a byte slice.
func sendExtensionEventRequest(c *xgb.Conn, Destination xproto.Window, DeviceId byte, Propagate bool, NumClasses uint16, NumEvents byte, Events string, Classes []EventClass) []byte {
size := xgb.Pad(((16 + xgb.Pad(((int(NumEvents) * 32) * 1))) + xgb.Pad((int(NumClasses) * 4))))
b := 0
@@ -6983,30 +7025,35 @@ func sendExtensionEventRequest(c *xgb.Conn, Destination xproto.Window, DeviceId
return buf
}
-// Request DeviceBell
-// size: 8
+// DeviceBellCookie is a cookie used only for DeviceBell requests.
type DeviceBellCookie struct {
*xgb.Cookie
}
-// Write request to wire for DeviceBell
+// DeviceBell sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DeviceBell(c *xgb.Conn, DeviceId byte, FeedbackId byte, FeedbackClass byte, Percent int8) DeviceBellCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(deviceBellRequest(c, DeviceId, FeedbackId, FeedbackClass, Percent), cookie)
return DeviceBellCookie{cookie}
}
+// DeviceBellChecked sends a checked request.
+// If an error occurs, it can be retrieved using DeviceBellCookie.Check()
func DeviceBellChecked(c *xgb.Conn, DeviceId byte, FeedbackId byte, FeedbackClass byte, Percent int8) DeviceBellCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(deviceBellRequest(c, DeviceId, FeedbackId, FeedbackClass, Percent), cookie)
return DeviceBellCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DeviceBellCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DeviceBell
+// deviceBellRequest writes a DeviceBell request to a byte slice.
func deviceBellRequest(c *xgb.Conn, DeviceId byte, FeedbackId byte, FeedbackClass byte, Percent int8) []byte {
size := 8
b := 0
@@ -7036,35 +7083,37 @@ func deviceBellRequest(c *xgb.Conn, DeviceId byte, FeedbackId byte, FeedbackClas
return buf
}
-// Request SetDeviceValuators
-// size: xgb.Pad((8 + xgb.Pad((int(NumValuators) * 4))))
+// SetDeviceValuatorsCookie is a cookie used only for SetDeviceValuators requests.
type SetDeviceValuatorsCookie struct {
*xgb.Cookie
}
+// SetDeviceValuators sends a checked request.
+// If an error occurs, it will be returned with the reply by calling SetDeviceValuatorsCookie.Reply()
func SetDeviceValuators(c *xgb.Conn, DeviceId byte, FirstValuator byte, NumValuators byte, Valuators []int32) SetDeviceValuatorsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(setDeviceValuatorsRequest(c, DeviceId, FirstValuator, NumValuators, Valuators), cookie)
return SetDeviceValuatorsCookie{cookie}
}
+// SetDeviceValuatorsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetDeviceValuatorsUnchecked(c *xgb.Conn, DeviceId byte, FirstValuator byte, NumValuators byte, Valuators []int32) SetDeviceValuatorsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(setDeviceValuatorsRequest(c, DeviceId, FirstValuator, NumValuators, Valuators), cookie)
return SetDeviceValuatorsCookie{cookie}
}
-// Request reply for SetDeviceValuators
-// size: 32
+// SetDeviceValuatorsReply represents the data returned from a SetDeviceValuators request.
type SetDeviceValuatorsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Status byte
// padding: 23 bytes
}
-// Waits and reads reply data from request SetDeviceValuators
+// Reply blocks and returns the reply data for a SetDeviceValuators request.
func (cook SetDeviceValuatorsCookie) Reply() (*SetDeviceValuatorsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7076,7 +7125,7 @@ func (cook SetDeviceValuatorsCookie) Reply() (*SetDeviceValuatorsReply, error) {
return setDeviceValuatorsReply(buf), nil
}
-// Read reply into structure from buffer for SetDeviceValuators
+// setDeviceValuatorsReply reads a byte slice into a SetDeviceValuatorsReply value.
func setDeviceValuatorsReply(buf []byte) *SetDeviceValuatorsReply {
v := new(SetDeviceValuatorsReply)
b := 1 // skip reply determinant
@@ -7098,6 +7147,7 @@ func setDeviceValuatorsReply(buf []byte) *SetDeviceValuatorsReply {
}
// Write request to wire for SetDeviceValuators
+// setDeviceValuatorsRequest writes a SetDeviceValuators request to a byte slice.
func setDeviceValuatorsRequest(c *xgb.Conn, DeviceId byte, FirstValuator byte, NumValuators byte, Valuators []int32) []byte {
size := xgb.Pad((8 + xgb.Pad((int(NumValuators) * 4))))
b := 0
@@ -7132,35 +7182,37 @@ func setDeviceValuatorsRequest(c *xgb.Conn, DeviceId byte, FirstValuator byte, N
return buf
}
-// Request GetDeviceControl
-// size: 8
+// GetDeviceControlCookie is a cookie used only for GetDeviceControl requests.
type GetDeviceControlCookie struct {
*xgb.Cookie
}
+// GetDeviceControl sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDeviceControlCookie.Reply()
func GetDeviceControl(c *xgb.Conn, ControlId uint16, DeviceId byte) GetDeviceControlCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceControlRequest(c, ControlId, DeviceId), cookie)
return GetDeviceControlCookie{cookie}
}
+// GetDeviceControlUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceControlUnchecked(c *xgb.Conn, ControlId uint16, DeviceId byte) GetDeviceControlCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceControlRequest(c, ControlId, DeviceId), cookie)
return GetDeviceControlCookie{cookie}
}
-// Request reply for GetDeviceControl
-// size: 32
+// GetDeviceControlReply represents the data returned from a GetDeviceControl request.
type GetDeviceControlReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Status byte
// padding: 23 bytes
}
-// Waits and reads reply data from request GetDeviceControl
+// Reply blocks and returns the reply data for a GetDeviceControl request.
func (cook GetDeviceControlCookie) Reply() (*GetDeviceControlReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7172,7 +7224,7 @@ func (cook GetDeviceControlCookie) Reply() (*GetDeviceControlReply, error) {
return getDeviceControlReply(buf), nil
}
-// Read reply into structure from buffer for GetDeviceControl
+// getDeviceControlReply reads a byte slice into a GetDeviceControlReply value.
func getDeviceControlReply(buf []byte) *GetDeviceControlReply {
v := new(GetDeviceControlReply)
b := 1 // skip reply determinant
@@ -7194,6 +7246,7 @@ func getDeviceControlReply(buf []byte) *GetDeviceControlReply {
}
// Write request to wire for GetDeviceControl
+// getDeviceControlRequest writes a GetDeviceControl request to a byte slice.
func getDeviceControlRequest(c *xgb.Conn, ControlId uint16, DeviceId byte) []byte {
size := 8
b := 0
diff --git a/nexgb/xprint/xprint.go b/nexgb/xprint/xprint.go
index 0037a22..237b6b5 100644
--- a/nexgb/xprint/xprint.go
+++ b/nexgb/xprint/xprint.go
@@ -2,7 +2,7 @@
package xprint
/*
- This file was generated by xprint.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by xprint.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,8 +40,6 @@ func init() {
xgb.NewExtErrorFuncs["XpExtension"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Int8'
-
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
@@ -64,6 +62,8 @@ func init() {
// Skipping definition for base type 'Byte'
+// Skipping definition for base type 'Int8'
+
const (
GetDocFinished = 0
GetDocSecondConsumer = 1
@@ -106,8 +106,6 @@ func NewPcontextId(c *xgb.Conn) (Pcontext, error) {
type String8 byte
-// 'Printer' struct definition
-// Size: (((4 + xgb.Pad((int(NameLen) * 1))) + 4) + xgb.Pad((int(DescLen) * 1)))
type Printer struct {
NameLen uint32
Name []String8 // size: xgb.Pad((int(NameLen) * 1))
@@ -115,7 +113,7 @@ type Printer struct {
Description []String8 // size: xgb.Pad((int(DescLen) * 1))
}
-// Struct read Printer
+// PrinterRead reads a byte slice into a Printer value.
func PrinterRead(buf []byte, v *Printer) int {
b := 0
@@ -142,7 +140,7 @@ func PrinterRead(buf []byte, v *Printer) int {
return b
}
-// Struct list read Printer
+// PrinterReadList reads a byte slice into a list of Printer values.
func PrinterReadList(buf []byte, dest []Printer) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -152,7 +150,7 @@ func PrinterReadList(buf []byte, dest []Printer) int {
return xgb.Pad(b)
}
-// Struct write Printer
+// Bytes writes a Printer value to a byte slice.
func (v Printer) Bytes() []byte {
buf := make([]byte, (((4 + xgb.Pad((int(v.NameLen) * 1))) + 4) + xgb.Pad((int(v.DescLen) * 1))))
b := 0
@@ -178,7 +176,7 @@ func (v Printer) Bytes() []byte {
return buf
}
-// Write struct list Printer
+// PrinterListBytes writes a list of %s(MISSING) values to a byte slice.
func PrinterListBytes(buf []byte, list []Printer) int {
b := 0
var structBytes []byte
@@ -190,7 +188,7 @@ func PrinterListBytes(buf []byte, list []Printer) int {
return b
}
-// Struct list size Printer
+// PrinterListSize computes the size (bytes) of a list of Printer values.
func PrinterListSize(list []Printer) int {
size := 0
for _, item := range list {
@@ -199,9 +197,7 @@ func PrinterListSize(list []Printer) int {
return size
}
-// Event definition Notify (0)
-// Size: 32
-
+// Notify is the event number for a NotifyEvent.
const Notify = 0
type NotifyEvent struct {
@@ -211,7 +207,7 @@ type NotifyEvent struct {
Cancel bool
}
-// Event read Notify
+// NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.
func NotifyEventNew(buf []byte) xgb.Event {
v := NotifyEvent{}
b := 1 // don't read event number
@@ -235,7 +231,7 @@ func NotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write Notify
+// Bytes writes a NotifyEvent value to a byte slice.
func (v NotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -262,12 +258,14 @@ func (v NotifyEvent) Bytes() []byte {
return buf
}
-func (v NotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the Notify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v NotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of NotifyEvent.
func (v NotifyEvent) String() string {
fieldVals := make([]string, 0, 3)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -281,9 +279,7 @@ func init() {
xgb.NewExtEventFuncs["XpExtension"][0] = NotifyEventNew
}
-// Event definition AttributNotify (1)
-// Size: 32
-
+// AttributNotify is the event number for a AttributNotifyEvent.
const AttributNotify = 1
type AttributNotifyEvent struct {
@@ -292,7 +288,7 @@ type AttributNotifyEvent struct {
Context Pcontext
}
-// Event read AttributNotify
+// AttributNotifyEventNew constructs a AttributNotifyEvent value that implements xgb.Event from a byte slice.
func AttributNotifyEventNew(buf []byte) xgb.Event {
v := AttributNotifyEvent{}
b := 1 // don't read event number
@@ -309,7 +305,7 @@ func AttributNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write AttributNotify
+// Bytes writes a AttributNotifyEvent value to a byte slice.
func (v AttributNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -329,12 +325,14 @@ func (v AttributNotifyEvent) Bytes() []byte {
return buf
}
-func (v AttributNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the AttributNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v AttributNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of AttributNotifyEvent.
func (v AttributNotifyEvent) String() string {
fieldVals := make([]string, 0, 2)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -347,9 +345,7 @@ func init() {
xgb.NewExtEventFuncs["XpExtension"][1] = AttributNotifyEventNew
}
-// Error definition BadContext (0)
-// Size: 32
-
+// BadBadContext is the error number for a BadBadContext.
const BadBadContext = 0
type BadContextError struct {
@@ -357,7 +353,7 @@ type BadContextError struct {
NiceName string
}
-// Error read BadContext
+// BadContextErrorNew constructs a BadContextError value that implements xgb.Error from a byte slice.
func BadContextErrorNew(buf []byte) xgb.Error {
v := BadContextError{}
v.NiceName = "BadContext"
@@ -371,8 +367,8 @@ func BadContextErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadContextError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadContext error.
+// This is mostly used internally.
func (err BadContextError) SequenceId() uint16 {
return err.Sequence
}
@@ -392,9 +388,7 @@ func init() {
xgb.NewExtErrorFuncs["XpExtension"][0] = BadContextErrorNew
}
-// Error definition BadSequence (1)
-// Size: 32
-
+// BadBadSequence is the error number for a BadBadSequence.
const BadBadSequence = 1
type BadSequenceError struct {
@@ -402,7 +396,7 @@ type BadSequenceError struct {
NiceName string
}
-// Error read BadSequence
+// BadSequenceErrorNew constructs a BadSequenceError value that implements xgb.Error from a byte slice.
func BadSequenceErrorNew(buf []byte) xgb.Error {
v := BadSequenceError{}
v.NiceName = "BadSequence"
@@ -416,8 +410,8 @@ func BadSequenceErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadSequenceError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadSequence error.
+// This is mostly used internally.
func (err BadSequenceError) SequenceId() uint16 {
return err.Sequence
}
@@ -437,35 +431,37 @@ func init() {
xgb.NewExtErrorFuncs["XpExtension"][1] = BadSequenceErrorNew
}
-// Request PrintQueryVersion
-// size: 4
+// PrintQueryVersionCookie is a cookie used only for PrintQueryVersion requests.
type PrintQueryVersionCookie struct {
*xgb.Cookie
}
+// PrintQueryVersion sends a checked request.
+// If an error occurs, it will be returned with the reply by calling PrintQueryVersionCookie.Reply()
func PrintQueryVersion(c *xgb.Conn) PrintQueryVersionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(printQueryVersionRequest(c), cookie)
return PrintQueryVersionCookie{cookie}
}
+// PrintQueryVersionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintQueryVersionUnchecked(c *xgb.Conn) PrintQueryVersionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printQueryVersionRequest(c), cookie)
return PrintQueryVersionCookie{cookie}
}
-// Request reply for PrintQueryVersion
-// size: 12
+// PrintQueryVersionReply represents the data returned from a PrintQueryVersion request.
type PrintQueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MajorVersion uint16
MinorVersion uint16
}
-// Waits and reads reply data from request PrintQueryVersion
+// Reply blocks and returns the reply data for a PrintQueryVersion request.
func (cook PrintQueryVersionCookie) Reply() (*PrintQueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -477,7 +473,7 @@ func (cook PrintQueryVersionCookie) Reply() (*PrintQueryVersionReply, error) {
return printQueryVersionReply(buf), nil
}
-// Read reply into structure from buffer for PrintQueryVersion
+// printQueryVersionReply reads a byte slice into a PrintQueryVersionReply value.
func printQueryVersionReply(buf []byte) *PrintQueryVersionReply {
v := new(PrintQueryVersionReply)
b := 1 // skip reply determinant
@@ -500,6 +496,7 @@ func printQueryVersionReply(buf []byte) *PrintQueryVersionReply {
}
// Write request to wire for PrintQueryVersion
+// printQueryVersionRequest writes a PrintQueryVersion request to a byte slice.
func printQueryVersionRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -517,36 +514,38 @@ func printQueryVersionRequest(c *xgb.Conn) []byte {
return buf
}
-// Request PrintGetPrinterList
-// size: xgb.Pad(((12 + xgb.Pad((int(PrinterNameLen) * 1))) + xgb.Pad((int(LocaleLen) * 1))))
+// PrintGetPrinterListCookie is a cookie used only for PrintGetPrinterList requests.
type PrintGetPrinterListCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(printGetPrinterListRequest(c, PrinterNameLen, LocaleLen, PrinterName, Locale), cookie)
return PrintGetPrinterListCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(printGetPrinterListRequest(c, PrinterNameLen, LocaleLen, PrinterName, Locale), cookie)
return PrintGetPrinterListCookie{cookie}
}
-// Request reply for PrintGetPrinterList
-// size: (32 + PrinterListSize(Printers))
+// PrintGetPrinterListReply represents the data returned from a PrintGetPrinterList request.
type PrintGetPrinterListReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ListCount uint32
// padding: 20 bytes
Printers []Printer // size: PrinterListSize(Printers)
}
-// Waits and reads reply data from request PrintGetPrinterList
+// Reply blocks and returns the reply data for a PrintGetPrinterList request.
func (cook PrintGetPrinterListCookie) Reply() (*PrintGetPrinterListReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -558,7 +557,7 @@ func (cook PrintGetPrinterListCookie) Reply() (*PrintGetPrinterListReply, error)
return printGetPrinterListReply(buf), nil
}
-// Read reply into structure from buffer for PrintGetPrinterList
+// printGetPrinterListReply reads a byte slice into a PrintGetPrinterListReply value.
func printGetPrinterListReply(buf []byte) *PrintGetPrinterListReply {
v := new(PrintGetPrinterListReply)
b := 1 // skip reply determinant
@@ -583,6 +582,7 @@ func printGetPrinterListReply(buf []byte) *PrintGetPrinterListReply {
}
// 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 {
size := xgb.Pad(((12 + xgb.Pad((int(PrinterNameLen) * 1))) + xgb.Pad((int(LocaleLen) * 1))))
b := 0
@@ -618,30 +618,35 @@ func printGetPrinterListRequest(c *xgb.Conn, PrinterNameLen uint32, LocaleLen ui
return buf
}
-// Request PrintRehashPrinterList
-// size: 4
+// PrintRehashPrinterListCookie is a cookie used only for PrintRehashPrinterList requests.
type PrintRehashPrinterListCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintRehashPrinterList
+// PrintRehashPrinterList sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintRehashPrinterList(c *xgb.Conn) PrintRehashPrinterListCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(printRehashPrinterListRequest(c), cookie)
return PrintRehashPrinterListCookie{cookie}
}
+// PrintRehashPrinterListChecked sends a checked request.
+// If an error occurs, it can be retrieved using PrintRehashPrinterListCookie.Check()
func PrintRehashPrinterListChecked(c *xgb.Conn) PrintRehashPrinterListCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(printRehashPrinterListRequest(c), cookie)
return PrintRehashPrinterListCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PrintRehashPrinterListCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PrintRehashPrinterList
+// printRehashPrinterListRequest writes a PrintRehashPrinterList request to a byte slice.
func printRehashPrinterListRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -659,30 +664,35 @@ func printRehashPrinterListRequest(c *xgb.Conn) []byte {
return buf
}
-// Request CreateContext
-// size: xgb.Pad(((16 + xgb.Pad((int(PrinterNameLen) * 1))) + xgb.Pad((int(LocaleLen) * 1))))
+// CreateContextCookie is a cookie used only for CreateContext requests.
type CreateContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateContext
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(createContextRequest(c, ContextId, PrinterNameLen, LocaleLen, PrinterName, Locale), cookie)
return CreateContextCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createContextRequest(c, ContextId, PrinterNameLen, LocaleLen, PrinterName, Locale), cookie)
return CreateContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad(((16 + xgb.Pad((int(PrinterNameLen) * 1))) + xgb.Pad((int(LocaleLen) * 1))))
b := 0
@@ -721,30 +731,35 @@ func createContextRequest(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32,
return buf
}
-// Request PrintSetContext
-// size: 8
+// PrintSetContextCookie is a cookie used only for PrintSetContext requests.
type PrintSetContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintSetContext
+// PrintSetContext sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintSetContext(c *xgb.Conn, Context uint32) PrintSetContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(printSetContextRequest(c, Context), cookie)
return PrintSetContextCookie{cookie}
}
+// PrintSetContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using PrintSetContextCookie.Check()
func PrintSetContextChecked(c *xgb.Conn, Context uint32) PrintSetContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(printSetContextRequest(c, Context), cookie)
return PrintSetContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PrintSetContextCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PrintSetContext
+// printSetContextRequest writes a PrintSetContext request to a byte slice.
func printSetContextRequest(c *xgb.Conn, Context uint32) []byte {
size := 8
b := 0
@@ -765,34 +780,36 @@ func printSetContextRequest(c *xgb.Conn, Context uint32) []byte {
return buf
}
-// Request PrintGetContext
-// size: 4
+// PrintGetContextCookie is a cookie used only for PrintGetContext requests.
type PrintGetContextCookie struct {
*xgb.Cookie
}
+// PrintGetContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling PrintGetContextCookie.Reply()
func PrintGetContext(c *xgb.Conn) PrintGetContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(printGetContextRequest(c), cookie)
return PrintGetContextCookie{cookie}
}
+// PrintGetContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetContextUnchecked(c *xgb.Conn) PrintGetContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printGetContextRequest(c), cookie)
return PrintGetContextCookie{cookie}
}
-// Request reply for PrintGetContext
-// size: 12
+// PrintGetContextReply represents the data returned from a PrintGetContext request.
type PrintGetContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Context uint32
}
-// Waits and reads reply data from request PrintGetContext
+// Reply blocks and returns the reply data for a PrintGetContext request.
func (cook PrintGetContextCookie) Reply() (*PrintGetContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -804,7 +821,7 @@ func (cook PrintGetContextCookie) Reply() (*PrintGetContextReply, error) {
return printGetContextReply(buf), nil
}
-// Read reply into structure from buffer for PrintGetContext
+// printGetContextReply reads a byte slice into a PrintGetContextReply value.
func printGetContextReply(buf []byte) *PrintGetContextReply {
v := new(PrintGetContextReply)
b := 1 // skip reply determinant
@@ -824,6 +841,7 @@ func printGetContextReply(buf []byte) *PrintGetContextReply {
}
// Write request to wire for PrintGetContext
+// printGetContextRequest writes a PrintGetContext request to a byte slice.
func printGetContextRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -841,30 +859,35 @@ func printGetContextRequest(c *xgb.Conn) []byte {
return buf
}
-// Request PrintDestroyContext
-// size: 8
+// PrintDestroyContextCookie is a cookie used only for PrintDestroyContext requests.
type PrintDestroyContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintDestroyContext
+// PrintDestroyContext sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintDestroyContext(c *xgb.Conn, Context uint32) PrintDestroyContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(printDestroyContextRequest(c, Context), cookie)
return PrintDestroyContextCookie{cookie}
}
+// PrintDestroyContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using PrintDestroyContextCookie.Check()
func PrintDestroyContextChecked(c *xgb.Conn, Context uint32) PrintDestroyContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(printDestroyContextRequest(c, Context), cookie)
return PrintDestroyContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PrintDestroyContextCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PrintDestroyContext
+// printDestroyContextRequest writes a PrintDestroyContext request to a byte slice.
func printDestroyContextRequest(c *xgb.Conn, Context uint32) []byte {
size := 8
b := 0
@@ -885,34 +908,36 @@ func printDestroyContextRequest(c *xgb.Conn, Context uint32) []byte {
return buf
}
-// Request PrintGetScreenOfContext
-// size: 4
+// PrintGetScreenOfContextCookie is a cookie used only for PrintGetScreenOfContext requests.
type PrintGetScreenOfContextCookie struct {
*xgb.Cookie
}
+// PrintGetScreenOfContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling PrintGetScreenOfContextCookie.Reply()
func PrintGetScreenOfContext(c *xgb.Conn) PrintGetScreenOfContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(printGetScreenOfContextRequest(c), cookie)
return PrintGetScreenOfContextCookie{cookie}
}
+// PrintGetScreenOfContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetScreenOfContextUnchecked(c *xgb.Conn) PrintGetScreenOfContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printGetScreenOfContextRequest(c), cookie)
return PrintGetScreenOfContextCookie{cookie}
}
-// Request reply for PrintGetScreenOfContext
-// size: 12
+// PrintGetScreenOfContextReply represents the data returned from a PrintGetScreenOfContext request.
type PrintGetScreenOfContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Root xproto.Window
}
-// Waits and reads reply data from request PrintGetScreenOfContext
+// Reply blocks and returns the reply data for a PrintGetScreenOfContext request.
func (cook PrintGetScreenOfContextCookie) Reply() (*PrintGetScreenOfContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -924,7 +949,7 @@ func (cook PrintGetScreenOfContextCookie) Reply() (*PrintGetScreenOfContextReply
return printGetScreenOfContextReply(buf), nil
}
-// Read reply into structure from buffer for PrintGetScreenOfContext
+// printGetScreenOfContextReply reads a byte slice into a PrintGetScreenOfContextReply value.
func printGetScreenOfContextReply(buf []byte) *PrintGetScreenOfContextReply {
v := new(PrintGetScreenOfContextReply)
b := 1 // skip reply determinant
@@ -944,6 +969,7 @@ func printGetScreenOfContextReply(buf []byte) *PrintGetScreenOfContextReply {
}
// Write request to wire for PrintGetScreenOfContext
+// printGetScreenOfContextRequest writes a PrintGetScreenOfContext request to a byte slice.
func printGetScreenOfContextRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -961,30 +987,35 @@ func printGetScreenOfContextRequest(c *xgb.Conn) []byte {
return buf
}
-// Request PrintStartJob
-// size: 8
+// PrintStartJobCookie is a cookie used only for PrintStartJob requests.
type PrintStartJobCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintStartJob
+// PrintStartJob sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintStartJob(c *xgb.Conn, OutputMode byte) PrintStartJobCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(printStartJobRequest(c, OutputMode), cookie)
return PrintStartJobCookie{cookie}
}
+// PrintStartJobChecked sends a checked request.
+// If an error occurs, it can be retrieved using PrintStartJobCookie.Check()
func PrintStartJobChecked(c *xgb.Conn, OutputMode byte) PrintStartJobCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(printStartJobRequest(c, OutputMode), cookie)
return PrintStartJobCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PrintStartJobCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PrintStartJob
+// printStartJobRequest writes a PrintStartJob request to a byte slice.
func printStartJobRequest(c *xgb.Conn, OutputMode byte) []byte {
size := 8
b := 0
@@ -1005,30 +1036,35 @@ func printStartJobRequest(c *xgb.Conn, OutputMode byte) []byte {
return buf
}
-// Request PrintEndJob
-// size: 8
+// PrintEndJobCookie is a cookie used only for PrintEndJob requests.
type PrintEndJobCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintEndJob
+// PrintEndJob sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintEndJob(c *xgb.Conn, Cancel bool) PrintEndJobCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(printEndJobRequest(c, Cancel), cookie)
return PrintEndJobCookie{cookie}
}
+// PrintEndJobChecked sends a checked request.
+// If an error occurs, it can be retrieved using PrintEndJobCookie.Check()
func PrintEndJobChecked(c *xgb.Conn, Cancel bool) PrintEndJobCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(printEndJobRequest(c, Cancel), cookie)
return PrintEndJobCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PrintEndJobCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PrintEndJob
+// printEndJobRequest writes a PrintEndJob request to a byte slice.
func printEndJobRequest(c *xgb.Conn, Cancel bool) []byte {
size := 8
b := 0
@@ -1053,30 +1089,35 @@ func printEndJobRequest(c *xgb.Conn, Cancel bool) []byte {
return buf
}
-// Request PrintStartDoc
-// size: 8
+// PrintStartDocCookie is a cookie used only for PrintStartDoc requests.
type PrintStartDocCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintStartDoc
+// PrintStartDoc sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintStartDoc(c *xgb.Conn, DriverMode byte) PrintStartDocCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(printStartDocRequest(c, DriverMode), cookie)
return PrintStartDocCookie{cookie}
}
+// PrintStartDocChecked sends a checked request.
+// If an error occurs, it can be retrieved using PrintStartDocCookie.Check()
func PrintStartDocChecked(c *xgb.Conn, DriverMode byte) PrintStartDocCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(printStartDocRequest(c, DriverMode), cookie)
return PrintStartDocCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PrintStartDocCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PrintStartDoc
+// printStartDocRequest writes a PrintStartDoc request to a byte slice.
func printStartDocRequest(c *xgb.Conn, DriverMode byte) []byte {
size := 8
b := 0
@@ -1097,30 +1138,35 @@ func printStartDocRequest(c *xgb.Conn, DriverMode byte) []byte {
return buf
}
-// Request PrintEndDoc
-// size: 8
+// PrintEndDocCookie is a cookie used only for PrintEndDoc requests.
type PrintEndDocCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintEndDoc
+// PrintEndDoc sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintEndDoc(c *xgb.Conn, Cancel bool) PrintEndDocCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(printEndDocRequest(c, Cancel), cookie)
return PrintEndDocCookie{cookie}
}
+// PrintEndDocChecked sends a checked request.
+// If an error occurs, it can be retrieved using PrintEndDocCookie.Check()
func PrintEndDocChecked(c *xgb.Conn, Cancel bool) PrintEndDocCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(printEndDocRequest(c, Cancel), cookie)
return PrintEndDocCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PrintEndDocCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PrintEndDoc
+// printEndDocRequest writes a PrintEndDoc request to a byte slice.
func printEndDocRequest(c *xgb.Conn, Cancel bool) []byte {
size := 8
b := 0
@@ -1145,30 +1191,35 @@ func printEndDocRequest(c *xgb.Conn, Cancel bool) []byte {
return buf
}
-// Request PrintPutDocumentData
-// size: xgb.Pad((((16 + xgb.Pad((int(LenData) * 1))) + xgb.Pad((len(DocFormat) * 1))) + xgb.Pad((len(Options) * 1))))
+// PrintPutDocumentDataCookie is a cookie used only for PrintPutDocumentData requests.
type PrintPutDocumentDataCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintPutDocumentData
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(printPutDocumentDataRequest(c, Drawable, LenData, LenFmt, LenOptions, Data, DocFormat, Options), cookie)
return PrintPutDocumentDataCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(printPutDocumentDataRequest(c, Drawable, LenData, LenFmt, LenOptions, Data, DocFormat, Options), cookie)
return PrintPutDocumentDataCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((((16 + xgb.Pad((int(LenData) * 1))) + xgb.Pad((len(DocFormat) * 1))) + xgb.Pad((len(Options) * 1))))
b := 0
@@ -1213,29 +1264,31 @@ func printPutDocumentDataRequest(c *xgb.Conn, Drawable xproto.Drawable, LenData
return buf
}
-// Request PrintGetDocumentData
-// size: 12
+// PrintGetDocumentDataCookie is a cookie used only for PrintGetDocumentData requests.
type PrintGetDocumentDataCookie struct {
*xgb.Cookie
}
+// PrintGetDocumentData sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(printGetDocumentDataRequest(c, Context, MaxBytes), cookie)
return PrintGetDocumentDataCookie{cookie}
}
+// PrintGetDocumentDataUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetDocumentDataUnchecked(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintGetDocumentDataCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printGetDocumentDataRequest(c, Context, MaxBytes), cookie)
return PrintGetDocumentDataCookie{cookie}
}
-// Request reply for PrintGetDocumentData
-// size: (32 + xgb.Pad((int(DataLen) * 1)))
+// PrintGetDocumentDataReply represents the data returned from a PrintGetDocumentData request.
type PrintGetDocumentDataReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
StatusCode uint32
FinishedFlag uint32
@@ -1244,7 +1297,7 @@ type PrintGetDocumentDataReply struct {
Data []byte // size: xgb.Pad((int(DataLen) * 1))
}
-// Waits and reads reply data from request PrintGetDocumentData
+// Reply blocks and returns the reply data for a PrintGetDocumentData request.
func (cook PrintGetDocumentDataCookie) Reply() (*PrintGetDocumentDataReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1256,7 +1309,7 @@ func (cook PrintGetDocumentDataCookie) Reply() (*PrintGetDocumentDataReply, erro
return printGetDocumentDataReply(buf), nil
}
-// Read reply into structure from buffer for PrintGetDocumentData
+// printGetDocumentDataReply reads a byte slice into a PrintGetDocumentDataReply value.
func printGetDocumentDataReply(buf []byte) *PrintGetDocumentDataReply {
v := new(PrintGetDocumentDataReply)
b := 1 // skip reply determinant
@@ -1288,6 +1341,7 @@ func printGetDocumentDataReply(buf []byte) *PrintGetDocumentDataReply {
}
// Write request to wire for PrintGetDocumentData
+// printGetDocumentDataRequest writes a PrintGetDocumentData request to a byte slice.
func printGetDocumentDataRequest(c *xgb.Conn, Context Pcontext, MaxBytes uint32) []byte {
size := 12
b := 0
@@ -1311,30 +1365,35 @@ func printGetDocumentDataRequest(c *xgb.Conn, Context Pcontext, MaxBytes uint32)
return buf
}
-// Request PrintStartPage
-// size: 8
+// PrintStartPageCookie is a cookie used only for PrintStartPage requests.
type PrintStartPageCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintStartPage
+// PrintStartPage sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintStartPage(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(printStartPageRequest(c, Window), cookie)
return PrintStartPageCookie{cookie}
}
+// PrintStartPageChecked sends a checked request.
+// If an error occurs, it can be retrieved using PrintStartPageCookie.Check()
func PrintStartPageChecked(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(printStartPageRequest(c, Window), cookie)
return PrintStartPageCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PrintStartPageCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PrintStartPage
+// printStartPageRequest writes a PrintStartPage request to a byte slice.
func printStartPageRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -1355,30 +1414,35 @@ func printStartPageRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request PrintEndPage
-// size: 8
+// PrintEndPageCookie is a cookie used only for PrintEndPage requests.
type PrintEndPageCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintEndPage
+// PrintEndPage sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintEndPage(c *xgb.Conn, Cancel bool) PrintEndPageCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(printEndPageRequest(c, Cancel), cookie)
return PrintEndPageCookie{cookie}
}
+// PrintEndPageChecked sends a checked request.
+// If an error occurs, it can be retrieved using PrintEndPageCookie.Check()
func PrintEndPageChecked(c *xgb.Conn, Cancel bool) PrintEndPageCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(printEndPageRequest(c, Cancel), cookie)
return PrintEndPageCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PrintEndPageCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PrintEndPage
+// printEndPageRequest writes a PrintEndPage request to a byte slice.
func printEndPageRequest(c *xgb.Conn, Cancel bool) []byte {
size := 8
b := 0
@@ -1405,30 +1469,35 @@ func printEndPageRequest(c *xgb.Conn, Cancel bool) []byte {
return buf
}
-// Request PrintSelectInput
-// size: xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(EventMask)))))))
+// PrintSelectInputCookie is a cookie used only for PrintSelectInput requests.
type PrintSelectInputCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintSelectInput
+// PrintSelectInput sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintSelectInput(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList []uint32) PrintSelectInputCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(printSelectInputRequest(c, Context, EventMask, EventList), cookie)
return PrintSelectInputCookie{cookie}
}
+// PrintSelectInputChecked sends a checked request.
+// If an error occurs, it can be retrieved using PrintSelectInputCookie.Check()
func PrintSelectInputChecked(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList []uint32) PrintSelectInputCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(printSelectInputRequest(c, Context, EventMask, EventList), cookie)
return PrintSelectInputCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PrintSelectInputCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PrintSelectInput
+// printSelectInputRequest writes a PrintSelectInput request to a byte slice.
func printSelectInputRequest(c *xgb.Conn, Context Pcontext, EventMask uint32, EventList []uint32) []byte {
size := xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(EventMask)))))))
b := 0
@@ -1457,29 +1526,31 @@ func printSelectInputRequest(c *xgb.Conn, Context Pcontext, EventMask uint32, Ev
return buf
}
-// Request PrintInputSelected
-// size: 8
+// PrintInputSelectedCookie is a cookie used only for PrintInputSelected requests.
type PrintInputSelectedCookie struct {
*xgb.Cookie
}
+// PrintInputSelected sends a checked request.
+// If an error occurs, it will be returned with the reply by calling PrintInputSelectedCookie.Reply()
func PrintInputSelected(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(printInputSelectedRequest(c, Context), cookie)
return PrintInputSelectedCookie{cookie}
}
+// PrintInputSelectedUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintInputSelectedUnchecked(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printInputSelectedRequest(c, Context), cookie)
return PrintInputSelectedCookie{cookie}
}
-// Request reply for PrintInputSelected
-// size: ((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(EventMask)))))) + (4 + xgb.Pad((4 * xgb.PopCount(int(AllEventsMask))))))
+// PrintInputSelectedReply represents the data returned from a PrintInputSelected request.
type PrintInputSelectedReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
EventMask uint32
EventList []uint32
@@ -1487,7 +1558,7 @@ type PrintInputSelectedReply struct {
AllEventsList []uint32
}
-// Waits and reads reply data from request PrintInputSelected
+// Reply blocks and returns the reply data for a PrintInputSelected request.
func (cook PrintInputSelectedCookie) Reply() (*PrintInputSelectedReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1499,7 +1570,7 @@ func (cook PrintInputSelectedCookie) Reply() (*PrintInputSelectedReply, error) {
return printInputSelectedReply(buf), nil
}
-// Read reply into structure from buffer for PrintInputSelected
+// printInputSelectedReply reads a byte slice into a PrintInputSelectedReply value.
func printInputSelectedReply(buf []byte) *PrintInputSelectedReply {
v := new(PrintInputSelectedReply)
b := 1 // skip reply determinant
@@ -1536,6 +1607,7 @@ func printInputSelectedReply(buf []byte) *PrintInputSelectedReply {
}
// Write request to wire for PrintInputSelected
+// printInputSelectedRequest writes a PrintInputSelected request to a byte slice.
func printInputSelectedRequest(c *xgb.Conn, Context Pcontext) []byte {
size := 8
b := 0
@@ -1556,36 +1628,38 @@ func printInputSelectedRequest(c *xgb.Conn, Context Pcontext) []byte {
return buf
}
-// Request PrintGetAttributes
-// size: 12
+// PrintGetAttributesCookie is a cookie used only for PrintGetAttributes requests.
type PrintGetAttributesCookie struct {
*xgb.Cookie
}
+// PrintGetAttributes sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(printGetAttributesRequest(c, Context, Pool), cookie)
return PrintGetAttributesCookie{cookie}
}
+// PrintGetAttributesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetAttributesUnchecked(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttributesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printGetAttributesRequest(c, Context, Pool), cookie)
return PrintGetAttributesCookie{cookie}
}
-// Request reply for PrintGetAttributes
-// size: 33
+// PrintGetAttributesReply represents the data returned from a PrintGetAttributes request.
type PrintGetAttributesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
StringLen uint32
// padding: 20 bytes
Attributes String8
}
-// Waits and reads reply data from request PrintGetAttributes
+// Reply blocks and returns the reply data for a PrintGetAttributes request.
func (cook PrintGetAttributesCookie) Reply() (*PrintGetAttributesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1597,7 +1671,7 @@ func (cook PrintGetAttributesCookie) Reply() (*PrintGetAttributesReply, error) {
return printGetAttributesReply(buf), nil
}
-// Read reply into structure from buffer for PrintGetAttributes
+// printGetAttributesReply reads a byte slice into a PrintGetAttributesReply value.
func printGetAttributesReply(buf []byte) *PrintGetAttributesReply {
v := new(PrintGetAttributesReply)
b := 1 // skip reply determinant
@@ -1622,6 +1696,7 @@ func printGetAttributesReply(buf []byte) *PrintGetAttributesReply {
}
// Write request to wire for PrintGetAttributes
+// printGetAttributesRequest writes a PrintGetAttributes request to a byte slice.
func printGetAttributesRequest(c *xgb.Conn, Context Pcontext, Pool byte) []byte {
size := 12
b := 0
@@ -1647,36 +1722,38 @@ func printGetAttributesRequest(c *xgb.Conn, Context Pcontext, Pool byte) []byte
return buf
}
-// Request PrintGetOneAttributes
-// size: xgb.Pad((16 + xgb.Pad((int(NameLen) * 1))))
+// PrintGetOneAttributesCookie is a cookie used only for PrintGetOneAttributes requests.
type PrintGetOneAttributesCookie struct {
*xgb.Cookie
}
+// PrintGetOneAttributes sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(printGetOneAttributesRequest(c, Context, NameLen, Pool, Name), cookie)
return PrintGetOneAttributesCookie{cookie}
}
+// PrintGetOneAttributesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetOneAttributesUnchecked(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) PrintGetOneAttributesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printGetOneAttributesRequest(c, Context, NameLen, Pool, Name), cookie)
return PrintGetOneAttributesCookie{cookie}
}
-// Request reply for PrintGetOneAttributes
-// size: (32 + xgb.Pad((int(ValueLen) * 1)))
+// PrintGetOneAttributesReply represents the data returned from a PrintGetOneAttributes request.
type PrintGetOneAttributesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ValueLen uint32
// padding: 20 bytes
Value []String8 // size: xgb.Pad((int(ValueLen) * 1))
}
-// Waits and reads reply data from request PrintGetOneAttributes
+// Reply blocks and returns the reply data for a PrintGetOneAttributes request.
func (cook PrintGetOneAttributesCookie) Reply() (*PrintGetOneAttributesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1688,7 +1765,7 @@ func (cook PrintGetOneAttributesCookie) Reply() (*PrintGetOneAttributesReply, er
return printGetOneAttributesReply(buf), nil
}
-// Read reply into structure from buffer for PrintGetOneAttributes
+// printGetOneAttributesReply reads a byte slice into a PrintGetOneAttributesReply value.
func printGetOneAttributesReply(buf []byte) *PrintGetOneAttributesReply {
v := new(PrintGetOneAttributesReply)
b := 1 // skip reply determinant
@@ -1717,6 +1794,7 @@ func printGetOneAttributesReply(buf []byte) *PrintGetOneAttributesReply {
}
// Write request to wire for PrintGetOneAttributes
+// printGetOneAttributesRequest writes a PrintGetOneAttributes request to a byte slice.
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
@@ -1751,30 +1829,35 @@ func printGetOneAttributesRequest(c *xgb.Conn, Context Pcontext, NameLen uint32,
return buf
}
-// Request PrintSetAttributes
-// size: xgb.Pad((16 + xgb.Pad((len(Attributes) * 1))))
+// PrintSetAttributesCookie is a cookie used only for PrintSetAttributes requests.
type PrintSetAttributesCookie struct {
*xgb.Cookie
}
-// Write request to wire for PrintSetAttributes
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(printSetAttributesRequest(c, Context, StringLen, Pool, Rule, Attributes), cookie)
return PrintSetAttributesCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(printSetAttributesRequest(c, Context, StringLen, Pool, Rule, Attributes), cookie)
return PrintSetAttributesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((16 + xgb.Pad((len(Attributes) * 1))))
b := 0
@@ -1812,29 +1895,31 @@ func printSetAttributesRequest(c *xgb.Conn, Context Pcontext, StringLen uint32,
return buf
}
-// Request PrintGetPageDimensions
-// size: 8
+// PrintGetPageDimensionsCookie is a cookie used only for PrintGetPageDimensions requests.
type PrintGetPageDimensionsCookie struct {
*xgb.Cookie
}
+// PrintGetPageDimensions sends a checked request.
+// If an error occurs, it will be returned with the reply by calling PrintGetPageDimensionsCookie.Reply()
func PrintGetPageDimensions(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(printGetPageDimensionsRequest(c, Context), cookie)
return PrintGetPageDimensionsCookie{cookie}
}
+// PrintGetPageDimensionsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetPageDimensionsUnchecked(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printGetPageDimensionsRequest(c, Context), cookie)
return PrintGetPageDimensionsCookie{cookie}
}
-// Request reply for PrintGetPageDimensions
-// size: 20
+// PrintGetPageDimensionsReply represents the data returned from a PrintGetPageDimensions request.
type PrintGetPageDimensionsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Width uint16
Height uint16
@@ -1844,7 +1929,7 @@ type PrintGetPageDimensionsReply struct {
ReproducibleHeight uint16
}
-// Waits and reads reply data from request PrintGetPageDimensions
+// Reply blocks and returns the reply data for a PrintGetPageDimensions request.
func (cook PrintGetPageDimensionsCookie) Reply() (*PrintGetPageDimensionsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1856,7 +1941,7 @@ func (cook PrintGetPageDimensionsCookie) Reply() (*PrintGetPageDimensionsReply,
return printGetPageDimensionsReply(buf), nil
}
-// Read reply into structure from buffer for PrintGetPageDimensions
+// printGetPageDimensionsReply reads a byte slice into a PrintGetPageDimensionsReply value.
func printGetPageDimensionsReply(buf []byte) *PrintGetPageDimensionsReply {
v := new(PrintGetPageDimensionsReply)
b := 1 // skip reply determinant
@@ -1891,6 +1976,7 @@ func printGetPageDimensionsReply(buf []byte) *PrintGetPageDimensionsReply {
}
// Write request to wire for PrintGetPageDimensions
+// printGetPageDimensionsRequest writes a PrintGetPageDimensions request to a byte slice.
func printGetPageDimensionsRequest(c *xgb.Conn, Context Pcontext) []byte {
size := 8
b := 0
@@ -1911,36 +1997,38 @@ func printGetPageDimensionsRequest(c *xgb.Conn, Context Pcontext) []byte {
return buf
}
-// Request PrintQueryScreens
-// size: 4
+// PrintQueryScreensCookie is a cookie used only for PrintQueryScreens requests.
type PrintQueryScreensCookie struct {
*xgb.Cookie
}
+// PrintQueryScreens sends a checked request.
+// If an error occurs, it will be returned with the reply by calling PrintQueryScreensCookie.Reply()
func PrintQueryScreens(c *xgb.Conn) PrintQueryScreensCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(printQueryScreensRequest(c), cookie)
return PrintQueryScreensCookie{cookie}
}
+// PrintQueryScreensUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintQueryScreensUnchecked(c *xgb.Conn) PrintQueryScreensCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printQueryScreensRequest(c), cookie)
return PrintQueryScreensCookie{cookie}
}
-// Request reply for PrintQueryScreens
-// size: (32 + xgb.Pad((int(ListCount) * 4)))
+// PrintQueryScreensReply represents the data returned from a PrintQueryScreens request.
type PrintQueryScreensReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ListCount uint32
// padding: 20 bytes
Roots []xproto.Window // size: xgb.Pad((int(ListCount) * 4))
}
-// Waits and reads reply data from request PrintQueryScreens
+// Reply blocks and returns the reply data for a PrintQueryScreens request.
func (cook PrintQueryScreensCookie) Reply() (*PrintQueryScreensReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1952,7 +2040,7 @@ func (cook PrintQueryScreensCookie) Reply() (*PrintQueryScreensReply, error) {
return printQueryScreensReply(buf), nil
}
-// Read reply into structure from buffer for PrintQueryScreens
+// printQueryScreensReply reads a byte slice into a PrintQueryScreensReply value.
func printQueryScreensReply(buf []byte) *PrintQueryScreensReply {
v := new(PrintQueryScreensReply)
b := 1 // skip reply determinant
@@ -1981,6 +2069,7 @@ func printQueryScreensReply(buf []byte) *PrintQueryScreensReply {
}
// Write request to wire for PrintQueryScreens
+// printQueryScreensRequest writes a PrintQueryScreens request to a byte slice.
func printQueryScreensRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -1998,34 +2087,36 @@ func printQueryScreensRequest(c *xgb.Conn) []byte {
return buf
}
-// Request PrintSetImageResolution
-// size: 12
+// PrintSetImageResolutionCookie is a cookie used only for PrintSetImageResolution requests.
type PrintSetImageResolutionCookie struct {
*xgb.Cookie
}
+// PrintSetImageResolution sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(printSetImageResolutionRequest(c, Context, ImageResolution), cookie)
return PrintSetImageResolutionCookie{cookie}
}
+// PrintSetImageResolutionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintSetImageResolutionUnchecked(c *xgb.Conn, Context Pcontext, ImageResolution uint16) PrintSetImageResolutionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printSetImageResolutionRequest(c, Context, ImageResolution), cookie)
return PrintSetImageResolutionCookie{cookie}
}
-// Request reply for PrintSetImageResolution
-// size: 10
+// PrintSetImageResolutionReply represents the data returned from a PrintSetImageResolution request.
type PrintSetImageResolutionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status bool
PreviousResolutions uint16
}
-// Waits and reads reply data from request PrintSetImageResolution
+// Reply blocks and returns the reply data for a PrintSetImageResolution request.
func (cook PrintSetImageResolutionCookie) Reply() (*PrintSetImageResolutionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2037,7 +2128,7 @@ func (cook PrintSetImageResolutionCookie) Reply() (*PrintSetImageResolutionReply
return printSetImageResolutionReply(buf), nil
}
-// Read reply into structure from buffer for PrintSetImageResolution
+// printSetImageResolutionReply reads a byte slice into a PrintSetImageResolutionReply value.
func printSetImageResolutionReply(buf []byte) *PrintSetImageResolutionReply {
v := new(PrintSetImageResolutionReply)
b := 1 // skip reply determinant
@@ -2062,6 +2153,7 @@ func printSetImageResolutionReply(buf []byte) *PrintSetImageResolutionReply {
}
// Write request to wire for PrintSetImageResolution
+// printSetImageResolutionRequest writes a PrintSetImageResolution request to a byte slice.
func printSetImageResolutionRequest(c *xgb.Conn, Context Pcontext, ImageResolution uint16) []byte {
size := 12
b := 0
@@ -2085,34 +2177,36 @@ func printSetImageResolutionRequest(c *xgb.Conn, Context Pcontext, ImageResoluti
return buf
}
-// Request PrintGetImageResolution
-// size: 8
+// PrintGetImageResolutionCookie is a cookie used only for PrintGetImageResolution requests.
type PrintGetImageResolutionCookie struct {
*xgb.Cookie
}
+// PrintGetImageResolution sends a checked request.
+// If an error occurs, it will be returned with the reply by calling PrintGetImageResolutionCookie.Reply()
func PrintGetImageResolution(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(printGetImageResolutionRequest(c, Context), cookie)
return PrintGetImageResolutionCookie{cookie}
}
+// PrintGetImageResolutionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PrintGetImageResolutionUnchecked(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(printGetImageResolutionRequest(c, Context), cookie)
return PrintGetImageResolutionCookie{cookie}
}
-// Request reply for PrintGetImageResolution
-// size: 10
+// PrintGetImageResolutionReply represents the data returned from a PrintGetImageResolution request.
type PrintGetImageResolutionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ImageResolution uint16
}
-// Waits and reads reply data from request PrintGetImageResolution
+// Reply blocks and returns the reply data for a PrintGetImageResolution request.
func (cook PrintGetImageResolutionCookie) Reply() (*PrintGetImageResolutionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2124,7 +2218,7 @@ func (cook PrintGetImageResolutionCookie) Reply() (*PrintGetImageResolutionReply
return printGetImageResolutionReply(buf), nil
}
-// Read reply into structure from buffer for PrintGetImageResolution
+// printGetImageResolutionReply reads a byte slice into a PrintGetImageResolutionReply value.
func printGetImageResolutionReply(buf []byte) *PrintGetImageResolutionReply {
v := new(PrintGetImageResolutionReply)
b := 1 // skip reply determinant
@@ -2144,6 +2238,7 @@ func printGetImageResolutionReply(buf []byte) *PrintGetImageResolutionReply {
}
// Write request to wire for PrintGetImageResolution
+// printGetImageResolutionRequest writes a PrintGetImageResolution request to a byte slice.
func printGetImageResolutionRequest(c *xgb.Conn, Context Pcontext) []byte {
size := 8
b := 0
diff --git a/nexgb/xproto/xproto.go b/nexgb/xproto/xproto.go
index 39956f1..6b0fb6b 100644
--- a/nexgb/xproto/xproto.go
+++ b/nexgb/xproto/xproto.go
@@ -2,7 +2,7 @@
package xproto
/*
- This file was generated by xproto.xml on May 10 2012 8:04:32pm EDT.
+ This file was generated by xproto.xml on May 10 2012 11:56:19pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -23,16 +23,6 @@ func (s *SetupInfo) DefaultScreen(c *xgb.Conn) *ScreenInfo {
return &s.Roots[c.DefaultScreen]
}
-// Skipping definition for base type 'Char'
-
-// Skipping definition for base type 'Card32'
-
-// Skipping definition for base type 'Double'
-
-// Skipping definition for base type 'Bool'
-
-// Skipping definition for base type 'Float'
-
// Skipping definition for base type 'Card8'
// Skipping definition for base type 'Int16'
@@ -47,6 +37,16 @@ func (s *SetupInfo) DefaultScreen(c *xgb.Conn) *ScreenInfo {
// Skipping definition for base type 'Card16'
+// Skipping definition for base type 'Char'
+
+// Skipping definition for base type 'Card32'
+
+// Skipping definition for base type 'Double'
+
+// Skipping definition for base type 'Bool'
+
+// Skipping definition for base type 'Float'
+
const (
VisualClassStaticGray = 0
VisualClassGrayScale = 1
@@ -733,14 +733,12 @@ type Keycode byte
type Button byte
-// 'Char2b' struct definition
-// Size: 2
type Char2b struct {
Byte1 byte
Byte2 byte
}
-// Struct read Char2b
+// Char2bRead reads a byte slice into a Char2b value.
func Char2bRead(buf []byte, v *Char2b) int {
b := 0
@@ -753,7 +751,7 @@ func Char2bRead(buf []byte, v *Char2b) int {
return b
}
-// Struct list read Char2b
+// Char2bReadList reads a byte slice into a list of Char2b values.
func Char2bReadList(buf []byte, dest []Char2b) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -763,7 +761,7 @@ func Char2bReadList(buf []byte, dest []Char2b) int {
return xgb.Pad(b)
}
-// Struct write Char2b
+// Bytes writes a Char2b value to a byte slice.
func (v Char2b) Bytes() []byte {
buf := make([]byte, 2)
b := 0
@@ -777,7 +775,7 @@ func (v Char2b) Bytes() []byte {
return buf
}
-// Write struct list Char2b
+// Char2bListBytes writes a list of %s(MISSING) values to a byte slice.
func Char2bListBytes(buf []byte, list []Char2b) int {
b := 0
var structBytes []byte
@@ -789,14 +787,12 @@ func Char2bListBytes(buf []byte, list []Char2b) int {
return b
}
-// 'Point' struct definition
-// Size: 4
type Point struct {
X int16
Y int16
}
-// Struct read Point
+// PointRead reads a byte slice into a Point value.
func PointRead(buf []byte, v *Point) int {
b := 0
@@ -809,7 +805,7 @@ func PointRead(buf []byte, v *Point) int {
return b
}
-// Struct list read Point
+// PointReadList reads a byte slice into a list of Point values.
func PointReadList(buf []byte, dest []Point) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -819,7 +815,7 @@ func PointReadList(buf []byte, dest []Point) int {
return xgb.Pad(b)
}
-// Struct write Point
+// Bytes writes a Point value to a byte slice.
func (v Point) Bytes() []byte {
buf := make([]byte, 4)
b := 0
@@ -833,7 +829,7 @@ func (v Point) Bytes() []byte {
return buf
}
-// Write struct list Point
+// PointListBytes writes a list of %s(MISSING) values to a byte slice.
func PointListBytes(buf []byte, list []Point) int {
b := 0
var structBytes []byte
@@ -845,8 +841,6 @@ func PointListBytes(buf []byte, list []Point) int {
return b
}
-// 'Rectangle' struct definition
-// Size: 8
type Rectangle struct {
X int16
Y int16
@@ -854,7 +848,7 @@ type Rectangle struct {
Height uint16
}
-// Struct read Rectangle
+// RectangleRead reads a byte slice into a Rectangle value.
func RectangleRead(buf []byte, v *Rectangle) int {
b := 0
@@ -873,7 +867,7 @@ func RectangleRead(buf []byte, v *Rectangle) int {
return b
}
-// Struct list read Rectangle
+// RectangleReadList reads a byte slice into a list of Rectangle values.
func RectangleReadList(buf []byte, dest []Rectangle) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -883,7 +877,7 @@ func RectangleReadList(buf []byte, dest []Rectangle) int {
return xgb.Pad(b)
}
-// Struct write Rectangle
+// Bytes writes a Rectangle value to a byte slice.
func (v Rectangle) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -903,7 +897,7 @@ func (v Rectangle) Bytes() []byte {
return buf
}
-// Write struct list Rectangle
+// RectangleListBytes writes a list of %s(MISSING) values to a byte slice.
func RectangleListBytes(buf []byte, list []Rectangle) int {
b := 0
var structBytes []byte
@@ -915,8 +909,6 @@ func RectangleListBytes(buf []byte, list []Rectangle) int {
return b
}
-// 'Arc' struct definition
-// Size: 12
type Arc struct {
X int16
Y int16
@@ -926,7 +918,7 @@ type Arc struct {
Angle2 int16
}
-// Struct read Arc
+// ArcRead reads a byte slice into a Arc value.
func ArcRead(buf []byte, v *Arc) int {
b := 0
@@ -951,7 +943,7 @@ func ArcRead(buf []byte, v *Arc) int {
return b
}
-// Struct list read Arc
+// ArcReadList reads a byte slice into a list of Arc values.
func ArcReadList(buf []byte, dest []Arc) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -961,7 +953,7 @@ func ArcReadList(buf []byte, dest []Arc) int {
return xgb.Pad(b)
}
-// Struct write Arc
+// Bytes writes a Arc value to a byte slice.
func (v Arc) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -987,7 +979,7 @@ func (v Arc) Bytes() []byte {
return buf
}
-// Write struct list Arc
+// ArcListBytes writes a list of %s(MISSING) values to a byte slice.
func ArcListBytes(buf []byte, list []Arc) int {
b := 0
var structBytes []byte
@@ -999,8 +991,6 @@ func ArcListBytes(buf []byte, list []Arc) int {
return b
}
-// 'Format' struct definition
-// Size: 8
type Format struct {
Depth byte
BitsPerPixel byte
@@ -1008,7 +998,7 @@ type Format struct {
// padding: 5 bytes
}
-// Struct read Format
+// FormatRead reads a byte slice into a Format value.
func FormatRead(buf []byte, v *Format) int {
b := 0
@@ -1026,7 +1016,7 @@ func FormatRead(buf []byte, v *Format) int {
return b
}
-// Struct list read Format
+// FormatReadList reads a byte slice into a list of Format values.
func FormatReadList(buf []byte, dest []Format) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1036,7 +1026,7 @@ func FormatReadList(buf []byte, dest []Format) int {
return xgb.Pad(b)
}
-// Struct write Format
+// Bytes writes a Format value to a byte slice.
func (v Format) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -1055,7 +1045,7 @@ func (v Format) Bytes() []byte {
return buf
}
-// Write struct list Format
+// FormatListBytes writes a list of %s(MISSING) values to a byte slice.
func FormatListBytes(buf []byte, list []Format) int {
b := 0
var structBytes []byte
@@ -1067,8 +1057,6 @@ func FormatListBytes(buf []byte, list []Format) int {
return b
}
-// 'VisualInfo' struct definition
-// Size: 24
type VisualInfo struct {
VisualId Visualid
Class byte
@@ -1080,7 +1068,7 @@ type VisualInfo struct {
// padding: 4 bytes
}
-// Struct read VisualInfo
+// VisualInfoRead reads a byte slice into a VisualInfo value.
func VisualInfoRead(buf []byte, v *VisualInfo) int {
b := 0
@@ -1110,7 +1098,7 @@ func VisualInfoRead(buf []byte, v *VisualInfo) int {
return b
}
-// Struct list read VisualInfo
+// VisualInfoReadList reads a byte slice into a list of VisualInfo values.
func VisualInfoReadList(buf []byte, dest []VisualInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1120,7 +1108,7 @@ func VisualInfoReadList(buf []byte, dest []VisualInfo) int {
return xgb.Pad(b)
}
-// Struct write VisualInfo
+// Bytes writes a VisualInfo value to a byte slice.
func (v VisualInfo) Bytes() []byte {
buf := make([]byte, 24)
b := 0
@@ -1151,7 +1139,7 @@ func (v VisualInfo) Bytes() []byte {
return buf
}
-// Write struct list VisualInfo
+// VisualInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func VisualInfoListBytes(buf []byte, list []VisualInfo) int {
b := 0
var structBytes []byte
@@ -1163,8 +1151,6 @@ func VisualInfoListBytes(buf []byte, list []VisualInfo) int {
return b
}
-// 'DepthInfo' struct definition
-// Size: (8 + xgb.Pad((int(VisualsLen) * 24)))
type DepthInfo struct {
Depth byte
// padding: 1 bytes
@@ -1173,7 +1159,7 @@ type DepthInfo struct {
Visuals []VisualInfo // size: xgb.Pad((int(VisualsLen) * 24))
}
-// Struct read DepthInfo
+// DepthInfoRead reads a byte slice into a DepthInfo value.
func DepthInfoRead(buf []byte, v *DepthInfo) int {
b := 0
@@ -1193,7 +1179,7 @@ func DepthInfoRead(buf []byte, v *DepthInfo) int {
return b
}
-// Struct list read DepthInfo
+// DepthInfoReadList reads a byte slice into a list of DepthInfo values.
func DepthInfoReadList(buf []byte, dest []DepthInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1203,7 +1189,7 @@ func DepthInfoReadList(buf []byte, dest []DepthInfo) int {
return xgb.Pad(b)
}
-// Struct write DepthInfo
+// Bytes writes a DepthInfo value to a byte slice.
func (v DepthInfo) Bytes() []byte {
buf := make([]byte, (8 + xgb.Pad((int(v.VisualsLen) * 24))))
b := 0
@@ -1223,7 +1209,7 @@ func (v DepthInfo) Bytes() []byte {
return buf
}
-// Write struct list DepthInfo
+// DepthInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func DepthInfoListBytes(buf []byte, list []DepthInfo) int {
b := 0
var structBytes []byte
@@ -1235,7 +1221,7 @@ func DepthInfoListBytes(buf []byte, list []DepthInfo) int {
return b
}
-// Struct list size DepthInfo
+// DepthInfoListSize computes the size (bytes) of a list of DepthInfo values.
func DepthInfoListSize(list []DepthInfo) int {
size := 0
for _, item := range list {
@@ -1244,8 +1230,6 @@ func DepthInfoListSize(list []DepthInfo) int {
return size
}
-// 'ScreenInfo' struct definition
-// Size: (40 + DepthInfoListSize(AllowedDepths))
type ScreenInfo struct {
Root Window
DefaultColormap Colormap
@@ -1266,7 +1250,7 @@ type ScreenInfo struct {
AllowedDepths []DepthInfo // size: DepthInfoListSize(AllowedDepths)
}
-// Struct read ScreenInfo
+// ScreenInfoRead reads a byte slice into a ScreenInfo value.
func ScreenInfoRead(buf []byte, v *ScreenInfo) int {
b := 0
@@ -1328,7 +1312,7 @@ func ScreenInfoRead(buf []byte, v *ScreenInfo) int {
return b
}
-// Struct list read ScreenInfo
+// ScreenInfoReadList reads a byte slice into a list of ScreenInfo values.
func ScreenInfoReadList(buf []byte, dest []ScreenInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1338,7 +1322,7 @@ func ScreenInfoReadList(buf []byte, dest []ScreenInfo) int {
return xgb.Pad(b)
}
-// Struct write ScreenInfo
+// Bytes writes a ScreenInfo value to a byte slice.
func (v ScreenInfo) Bytes() []byte {
buf := make([]byte, (40 + DepthInfoListSize(v.AllowedDepths)))
b := 0
@@ -1400,7 +1384,7 @@ func (v ScreenInfo) Bytes() []byte {
return buf
}
-// Write struct list ScreenInfo
+// ScreenInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func ScreenInfoListBytes(buf []byte, list []ScreenInfo) int {
b := 0
var structBytes []byte
@@ -1412,7 +1396,7 @@ func ScreenInfoListBytes(buf []byte, list []ScreenInfo) int {
return b
}
-// Struct list size ScreenInfo
+// ScreenInfoListSize computes the size (bytes) of a list of ScreenInfo values.
func ScreenInfoListSize(list []ScreenInfo) int {
size := 0
for _, item := range list {
@@ -1421,8 +1405,6 @@ func ScreenInfoListSize(list []ScreenInfo) int {
return size
}
-// 'SetupRequest' struct definition
-// Size: ((12 + xgb.Pad((int(AuthorizationProtocolNameLen) * 1))) + xgb.Pad((int(AuthorizationProtocolDataLen) * 1)))
type SetupRequest struct {
ByteOrder byte
// padding: 1 bytes
@@ -1435,7 +1417,7 @@ type SetupRequest struct {
AuthorizationProtocolData string // size: xgb.Pad((int(AuthorizationProtocolDataLen) * 1))
}
-// Struct read SetupRequest
+// SetupRequestRead reads a byte slice into a SetupRequest value.
func SetupRequestRead(buf []byte, v *SetupRequest) int {
b := 0
@@ -1475,7 +1457,7 @@ func SetupRequestRead(buf []byte, v *SetupRequest) int {
return b
}
-// Struct list read SetupRequest
+// SetupRequestReadList reads a byte slice into a list of SetupRequest values.
func SetupRequestReadList(buf []byte, dest []SetupRequest) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1485,7 +1467,7 @@ func SetupRequestReadList(buf []byte, dest []SetupRequest) int {
return xgb.Pad(b)
}
-// Struct write SetupRequest
+// Bytes writes a SetupRequest value to a byte slice.
func (v SetupRequest) Bytes() []byte {
buf := make([]byte, ((12 + xgb.Pad((int(v.AuthorizationProtocolNameLen) * 1))) + xgb.Pad((int(v.AuthorizationProtocolDataLen) * 1))))
b := 0
@@ -1518,7 +1500,7 @@ func (v SetupRequest) Bytes() []byte {
return buf
}
-// Write struct list SetupRequest
+// SetupRequestListBytes writes a list of %s(MISSING) values to a byte slice.
func SetupRequestListBytes(buf []byte, list []SetupRequest) int {
b := 0
var structBytes []byte
@@ -1530,7 +1512,7 @@ func SetupRequestListBytes(buf []byte, list []SetupRequest) int {
return b
}
-// Struct list size SetupRequest
+// SetupRequestListSize computes the size (bytes) of a list of SetupRequest values.
func SetupRequestListSize(list []SetupRequest) int {
size := 0
for _, item := range list {
@@ -1539,8 +1521,6 @@ func SetupRequestListSize(list []SetupRequest) int {
return size
}
-// 'SetupFailed' struct definition
-// Size: (8 + xgb.Pad((int(ReasonLen) * 1)))
type SetupFailed struct {
Status byte
ReasonLen byte
@@ -1550,7 +1530,7 @@ type SetupFailed struct {
Reason string // size: xgb.Pad((int(ReasonLen) * 1))
}
-// Struct read SetupFailed
+// SetupFailedRead reads a byte slice into a SetupFailed value.
func SetupFailedRead(buf []byte, v *SetupFailed) int {
b := 0
@@ -1579,7 +1559,7 @@ func SetupFailedRead(buf []byte, v *SetupFailed) int {
return b
}
-// Struct list read SetupFailed
+// SetupFailedReadList reads a byte slice into a list of SetupFailed values.
func SetupFailedReadList(buf []byte, dest []SetupFailed) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1589,7 +1569,7 @@ func SetupFailedReadList(buf []byte, dest []SetupFailed) int {
return xgb.Pad(b)
}
-// Struct write SetupFailed
+// Bytes writes a SetupFailed value to a byte slice.
func (v SetupFailed) Bytes() []byte {
buf := make([]byte, (8 + xgb.Pad((int(v.ReasonLen) * 1))))
b := 0
@@ -1615,7 +1595,7 @@ func (v SetupFailed) Bytes() []byte {
return buf
}
-// Write struct list SetupFailed
+// SetupFailedListBytes writes a list of %s(MISSING) values to a byte slice.
func SetupFailedListBytes(buf []byte, list []SetupFailed) int {
b := 0
var structBytes []byte
@@ -1627,7 +1607,7 @@ func SetupFailedListBytes(buf []byte, list []SetupFailed) int {
return b
}
-// Struct list size SetupFailed
+// SetupFailedListSize computes the size (bytes) of a list of SetupFailed values.
func SetupFailedListSize(list []SetupFailed) int {
size := 0
for _, item := range list {
@@ -1636,8 +1616,6 @@ func SetupFailedListSize(list []SetupFailed) int {
return size
}
-// 'SetupAuthenticate' struct definition
-// Size: (8 + xgb.Pad(((int(Length) * 4) * 1)))
type SetupAuthenticate struct {
Status byte
// padding: 5 bytes
@@ -1645,7 +1623,7 @@ type SetupAuthenticate struct {
Reason string // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Struct read SetupAuthenticate
+// SetupAuthenticateRead reads a byte slice into a SetupAuthenticate value.
func SetupAuthenticateRead(buf []byte, v *SetupAuthenticate) int {
b := 0
@@ -1667,7 +1645,7 @@ func SetupAuthenticateRead(buf []byte, v *SetupAuthenticate) int {
return b
}
-// Struct list read SetupAuthenticate
+// SetupAuthenticateReadList reads a byte slice into a list of SetupAuthenticate values.
func SetupAuthenticateReadList(buf []byte, dest []SetupAuthenticate) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1677,7 +1655,7 @@ func SetupAuthenticateReadList(buf []byte, dest []SetupAuthenticate) int {
return xgb.Pad(b)
}
-// Struct write SetupAuthenticate
+// Bytes writes a SetupAuthenticate value to a byte slice.
func (v SetupAuthenticate) Bytes() []byte {
buf := make([]byte, (8 + xgb.Pad(((int(v.Length) * 4) * 1))))
b := 0
@@ -1696,7 +1674,7 @@ func (v SetupAuthenticate) Bytes() []byte {
return buf
}
-// Write struct list SetupAuthenticate
+// SetupAuthenticateListBytes writes a list of %s(MISSING) values to a byte slice.
func SetupAuthenticateListBytes(buf []byte, list []SetupAuthenticate) int {
b := 0
var structBytes []byte
@@ -1708,7 +1686,7 @@ func SetupAuthenticateListBytes(buf []byte, list []SetupAuthenticate) int {
return b
}
-// Struct list size SetupAuthenticate
+// SetupAuthenticateListSize computes the size (bytes) of a list of SetupAuthenticate values.
func SetupAuthenticateListSize(list []SetupAuthenticate) int {
size := 0
for _, item := range list {
@@ -1717,8 +1695,6 @@ func SetupAuthenticateListSize(list []SetupAuthenticate) int {
return size
}
-// 'SetupInfo' struct definition
-// Size: (((40 + xgb.Pad((int(VendorLen) * 1))) + xgb.Pad((int(PixmapFormatsLen) * 8))) + ScreenInfoListSize(Roots))
type SetupInfo struct {
Status byte
// padding: 1 bytes
@@ -1745,7 +1721,7 @@ type SetupInfo struct {
Roots []ScreenInfo // size: ScreenInfoListSize(Roots)
}
-// Struct read SetupInfo
+// SetupInfoRead reads a byte slice into a SetupInfo value.
func SetupInfoRead(buf []byte, v *SetupInfo) int {
b := 0
@@ -1823,7 +1799,7 @@ func SetupInfoRead(buf []byte, v *SetupInfo) int {
return b
}
-// Struct list read SetupInfo
+// SetupInfoReadList reads a byte slice into a list of SetupInfo values.
func SetupInfoReadList(buf []byte, dest []SetupInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1833,7 +1809,7 @@ func SetupInfoReadList(buf []byte, dest []SetupInfo) int {
return xgb.Pad(b)
}
-// Struct write SetupInfo
+// Bytes writes a SetupInfo value to a byte slice.
func (v SetupInfo) Bytes() []byte {
buf := make([]byte, (((40 + xgb.Pad((int(v.VendorLen) * 1))) + xgb.Pad((int(v.PixmapFormatsLen) * 8))) + ScreenInfoListSize(v.Roots)))
b := 0
@@ -1906,7 +1882,7 @@ func (v SetupInfo) Bytes() []byte {
return buf
}
-// Write struct list SetupInfo
+// SetupInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func SetupInfoListBytes(buf []byte, list []SetupInfo) int {
b := 0
var structBytes []byte
@@ -1918,7 +1894,7 @@ func SetupInfoListBytes(buf []byte, list []SetupInfo) int {
return b
}
-// Struct list size SetupInfo
+// SetupInfoListSize computes the size (bytes) of a list of SetupInfo values.
func SetupInfoListSize(list []SetupInfo) int {
size := 0
for _, item := range list {
@@ -1927,15 +1903,13 @@ func SetupInfoListSize(list []SetupInfo) int {
return size
}
-// 'Timecoord' struct definition
-// Size: 8
type Timecoord struct {
Time Timestamp
X int16
Y int16
}
-// Struct read Timecoord
+// TimecoordRead reads a byte slice into a Timecoord value.
func TimecoordRead(buf []byte, v *Timecoord) int {
b := 0
@@ -1951,7 +1925,7 @@ func TimecoordRead(buf []byte, v *Timecoord) int {
return b
}
-// Struct list read Timecoord
+// TimecoordReadList reads a byte slice into a list of Timecoord values.
func TimecoordReadList(buf []byte, dest []Timecoord) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -1961,7 +1935,7 @@ func TimecoordReadList(buf []byte, dest []Timecoord) int {
return xgb.Pad(b)
}
-// Struct write Timecoord
+// Bytes writes a Timecoord value to a byte slice.
func (v Timecoord) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -1978,7 +1952,7 @@ func (v Timecoord) Bytes() []byte {
return buf
}
-// Write struct list Timecoord
+// TimecoordListBytes writes a list of %s(MISSING) values to a byte slice.
func TimecoordListBytes(buf []byte, list []Timecoord) int {
b := 0
var structBytes []byte
@@ -1990,14 +1964,12 @@ func TimecoordListBytes(buf []byte, list []Timecoord) int {
return b
}
-// 'Fontprop' struct definition
-// Size: 8
type Fontprop struct {
Name Atom
Value uint32
}
-// Struct read Fontprop
+// FontpropRead reads a byte slice into a Fontprop value.
func FontpropRead(buf []byte, v *Fontprop) int {
b := 0
@@ -2010,7 +1982,7 @@ func FontpropRead(buf []byte, v *Fontprop) int {
return b
}
-// Struct list read Fontprop
+// FontpropReadList reads a byte slice into a list of Fontprop values.
func FontpropReadList(buf []byte, dest []Fontprop) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2020,7 +1992,7 @@ func FontpropReadList(buf []byte, dest []Fontprop) int {
return xgb.Pad(b)
}
-// Struct write Fontprop
+// Bytes writes a Fontprop value to a byte slice.
func (v Fontprop) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -2034,7 +2006,7 @@ func (v Fontprop) Bytes() []byte {
return buf
}
-// Write struct list Fontprop
+// FontpropListBytes writes a list of %s(MISSING) values to a byte slice.
func FontpropListBytes(buf []byte, list []Fontprop) int {
b := 0
var structBytes []byte
@@ -2046,8 +2018,6 @@ func FontpropListBytes(buf []byte, list []Fontprop) int {
return b
}
-// 'Charinfo' struct definition
-// Size: 12
type Charinfo struct {
LeftSideBearing int16
RightSideBearing int16
@@ -2057,7 +2027,7 @@ type Charinfo struct {
Attributes uint16
}
-// Struct read Charinfo
+// CharinfoRead reads a byte slice into a Charinfo value.
func CharinfoRead(buf []byte, v *Charinfo) int {
b := 0
@@ -2082,7 +2052,7 @@ func CharinfoRead(buf []byte, v *Charinfo) int {
return b
}
-// Struct list read Charinfo
+// CharinfoReadList reads a byte slice into a list of Charinfo values.
func CharinfoReadList(buf []byte, dest []Charinfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2092,7 +2062,7 @@ func CharinfoReadList(buf []byte, dest []Charinfo) int {
return xgb.Pad(b)
}
-// Struct write Charinfo
+// Bytes writes a Charinfo value to a byte slice.
func (v Charinfo) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -2118,7 +2088,7 @@ func (v Charinfo) Bytes() []byte {
return buf
}
-// Write struct list Charinfo
+// CharinfoListBytes writes a list of %s(MISSING) values to a byte slice.
func CharinfoListBytes(buf []byte, list []Charinfo) int {
b := 0
var structBytes []byte
@@ -2130,14 +2100,12 @@ func CharinfoListBytes(buf []byte, list []Charinfo) int {
return b
}
-// 'Str' struct definition
-// Size: (1 + xgb.Pad((int(NameLen) * 1)))
type Str struct {
NameLen byte
Name string // size: xgb.Pad((int(NameLen) * 1))
}
-// Struct read Str
+// StrRead reads a byte slice into a Str value.
func StrRead(buf []byte, v *Str) int {
b := 0
@@ -2154,7 +2122,7 @@ func StrRead(buf []byte, v *Str) int {
return b
}
-// Struct list read Str
+// StrReadList reads a byte slice into a list of Str values.
func StrReadList(buf []byte, dest []Str) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2164,7 +2132,7 @@ func StrReadList(buf []byte, dest []Str) int {
return xgb.Pad(b)
}
-// Struct write Str
+// Bytes writes a Str value to a byte slice.
func (v Str) Bytes() []byte {
buf := make([]byte, (1 + xgb.Pad((int(v.NameLen) * 1))))
b := 0
@@ -2178,7 +2146,7 @@ func (v Str) Bytes() []byte {
return buf
}
-// Write struct list Str
+// StrListBytes writes a list of %s(MISSING) values to a byte slice.
func StrListBytes(buf []byte, list []Str) int {
b := 0
var structBytes []byte
@@ -2190,7 +2158,7 @@ func StrListBytes(buf []byte, list []Str) int {
return b
}
-// Struct list size Str
+// StrListSize computes the size (bytes) of a list of Str values.
func StrListSize(list []Str) int {
size := 0
for _, item := range list {
@@ -2199,8 +2167,6 @@ func StrListSize(list []Str) int {
return size
}
-// 'Segment' struct definition
-// Size: 8
type Segment struct {
X1 int16
Y1 int16
@@ -2208,7 +2174,7 @@ type Segment struct {
Y2 int16
}
-// Struct read Segment
+// SegmentRead reads a byte slice into a Segment value.
func SegmentRead(buf []byte, v *Segment) int {
b := 0
@@ -2227,7 +2193,7 @@ func SegmentRead(buf []byte, v *Segment) int {
return b
}
-// Struct list read Segment
+// SegmentReadList reads a byte slice into a list of Segment values.
func SegmentReadList(buf []byte, dest []Segment) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2237,7 +2203,7 @@ func SegmentReadList(buf []byte, dest []Segment) int {
return xgb.Pad(b)
}
-// Struct write Segment
+// Bytes writes a Segment value to a byte slice.
func (v Segment) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -2257,7 +2223,7 @@ func (v Segment) Bytes() []byte {
return buf
}
-// Write struct list Segment
+// SegmentListBytes writes a list of %s(MISSING) values to a byte slice.
func SegmentListBytes(buf []byte, list []Segment) int {
b := 0
var structBytes []byte
@@ -2269,8 +2235,6 @@ func SegmentListBytes(buf []byte, list []Segment) int {
return b
}
-// 'Coloritem' struct definition
-// Size: 12
type Coloritem struct {
Pixel uint32
Red uint16
@@ -2280,7 +2244,7 @@ type Coloritem struct {
// padding: 1 bytes
}
-// Struct read Coloritem
+// ColoritemRead reads a byte slice into a Coloritem value.
func ColoritemRead(buf []byte, v *Coloritem) int {
b := 0
@@ -2304,7 +2268,7 @@ func ColoritemRead(buf []byte, v *Coloritem) int {
return b
}
-// Struct list read Coloritem
+// ColoritemReadList reads a byte slice into a list of Coloritem values.
func ColoritemReadList(buf []byte, dest []Coloritem) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2314,7 +2278,7 @@ func ColoritemReadList(buf []byte, dest []Coloritem) int {
return xgb.Pad(b)
}
-// Struct write Coloritem
+// Bytes writes a Coloritem value to a byte slice.
func (v Coloritem) Bytes() []byte {
buf := make([]byte, 12)
b := 0
@@ -2339,7 +2303,7 @@ func (v Coloritem) Bytes() []byte {
return buf
}
-// Write struct list Coloritem
+// ColoritemListBytes writes a list of %s(MISSING) values to a byte slice.
func ColoritemListBytes(buf []byte, list []Coloritem) int {
b := 0
var structBytes []byte
@@ -2351,8 +2315,6 @@ func ColoritemListBytes(buf []byte, list []Coloritem) int {
return b
}
-// 'Rgb' struct definition
-// Size: 8
type Rgb struct {
Red uint16
Green uint16
@@ -2360,7 +2322,7 @@ type Rgb struct {
// padding: 2 bytes
}
-// Struct read Rgb
+// RgbRead reads a byte slice into a Rgb value.
func RgbRead(buf []byte, v *Rgb) int {
b := 0
@@ -2378,7 +2340,7 @@ func RgbRead(buf []byte, v *Rgb) int {
return b
}
-// Struct list read Rgb
+// RgbReadList reads a byte slice into a list of Rgb values.
func RgbReadList(buf []byte, dest []Rgb) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2388,7 +2350,7 @@ func RgbReadList(buf []byte, dest []Rgb) int {
return xgb.Pad(b)
}
-// Struct write Rgb
+// Bytes writes a Rgb value to a byte slice.
func (v Rgb) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -2407,7 +2369,7 @@ func (v Rgb) Bytes() []byte {
return buf
}
-// Write struct list Rgb
+// RgbListBytes writes a list of %s(MISSING) values to a byte slice.
func RgbListBytes(buf []byte, list []Rgb) int {
b := 0
var structBytes []byte
@@ -2419,8 +2381,6 @@ func RgbListBytes(buf []byte, list []Rgb) int {
return b
}
-// 'Host' struct definition
-// Size: (4 + xgb.Pad((int(AddressLen) * 1)))
type Host struct {
Family byte
// padding: 1 bytes
@@ -2428,7 +2388,7 @@ type Host struct {
Address []byte // size: xgb.Pad((int(AddressLen) * 1))
}
-// Struct read Host
+// HostRead reads a byte slice into a Host value.
func HostRead(buf []byte, v *Host) int {
b := 0
@@ -2447,7 +2407,7 @@ func HostRead(buf []byte, v *Host) int {
return b
}
-// Struct list read Host
+// HostReadList reads a byte slice into a list of Host values.
func HostReadList(buf []byte, dest []Host) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2457,7 +2417,7 @@ func HostReadList(buf []byte, dest []Host) int {
return xgb.Pad(b)
}
-// Struct write Host
+// Bytes writes a Host value to a byte slice.
func (v Host) Bytes() []byte {
buf := make([]byte, (4 + xgb.Pad((int(v.AddressLen) * 1))))
b := 0
@@ -2476,7 +2436,7 @@ func (v Host) Bytes() []byte {
return buf
}
-// Write struct list Host
+// HostListBytes writes a list of %s(MISSING) values to a byte slice.
func HostListBytes(buf []byte, list []Host) int {
b := 0
var structBytes []byte
@@ -2488,7 +2448,7 @@ func HostListBytes(buf []byte, list []Host) int {
return b
}
-// Struct list size Host
+// HostListSize computes the size (bytes) of a list of Host values.
func HostListSize(list []Host) int {
size := 0
for _, item := range list {
@@ -2497,7 +2457,7 @@ func HostListSize(list []Host) int {
return size
}
-// Union definition ClientMessageDataUnion
+// ClientMessageDataUnion is a represention of the ClientMessageDataUnion union type.
// Note that to *create* a Union, you should *never* create
// this struct directly (unless you know what you're doing).
// Instead use one of the following constructors for 'ClientMessageDataUnion':
@@ -2510,7 +2470,7 @@ type ClientMessageDataUnion struct {
Data32 []uint32 // size: 20
}
-// Union constructor for ClientMessageDataUnion for field Data8.
+// ClientMessageDataUnionData8New constructs a new ClientMessageDataUnion union type with the Data8 field.
func ClientMessageDataUnionData8New(Data8 []byte) ClientMessageDataUnion {
var b int
buf := make([]byte, 20)
@@ -2547,7 +2507,7 @@ func ClientMessageDataUnionData8New(Data8 []byte) ClientMessageDataUnion {
return v
}
-// Union constructor for ClientMessageDataUnion for field Data16.
+// ClientMessageDataUnionData16New constructs a new ClientMessageDataUnion union type with the Data16 field.
func ClientMessageDataUnionData16New(Data16 []uint16) ClientMessageDataUnion {
var b int
buf := make([]byte, 20)
@@ -2587,7 +2547,7 @@ func ClientMessageDataUnionData16New(Data16 []uint16) ClientMessageDataUnion {
return v
}
-// Union constructor for ClientMessageDataUnion for field Data32.
+// ClientMessageDataUnionData32New constructs a new ClientMessageDataUnion union type with the Data32 field.
func ClientMessageDataUnionData32New(Data32 []uint32) ClientMessageDataUnion {
var b int
buf := make([]byte, 20)
@@ -2627,7 +2587,7 @@ func ClientMessageDataUnionData32New(Data32 []uint32) ClientMessageDataUnion {
return v
}
-// Union read ClientMessageDataUnion
+// ClientMessageDataUnionRead reads a byte slice into a ClientMessageDataUnion value.
func ClientMessageDataUnionRead(buf []byte, v *ClientMessageDataUnion) int {
var b int
@@ -2655,7 +2615,7 @@ func ClientMessageDataUnionRead(buf []byte, v *ClientMessageDataUnion) int {
return 20
}
-// Union list read ClientMessageDataUnion
+// ClientMessageDataUnionReadList reads a byte slice into a list of ClientMessageDataUnion values.
func ClientMessageDataUnionReadList(buf []byte, dest []ClientMessageDataUnion) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -2665,7 +2625,7 @@ func ClientMessageDataUnionReadList(buf []byte, dest []ClientMessageDataUnion) i
return xgb.Pad(b)
}
-// Union write ClientMessageDataUnion
+// Bytes writes a ClientMessageDataUnion value to a byte slice.
// Each field in a union must contain the same data.
// So simply pick the first field and write that to the wire.
func (v ClientMessageDataUnion) Bytes() []byte {
@@ -2677,7 +2637,7 @@ func (v ClientMessageDataUnion) Bytes() []byte {
return buf
}
-// Union list write ClientMessageDataUnion
+// ClientMessageDataUnionListBytes writes a list of %s(MISSING) values to a byte slice.
func ClientMessageDataUnionListBytes(buf []byte, list []ClientMessageDataUnion) int {
b := 0
var unionBytes []byte
@@ -2689,9 +2649,7 @@ func ClientMessageDataUnionListBytes(buf []byte, list []ClientMessageDataUnion)
return b
}
-// Event definition KeyPress (2)
-// Size: 32
-
+// KeyPress is the event number for a KeyPressEvent.
const KeyPress = 2
type KeyPressEvent struct {
@@ -2710,7 +2668,7 @@ type KeyPressEvent struct {
// padding: 1 bytes
}
-// Event read KeyPress
+// KeyPressEventNew constructs a KeyPressEvent value that implements xgb.Event from a byte slice.
func KeyPressEventNew(buf []byte) xgb.Event {
v := KeyPressEvent{}
b := 1 // don't read event number
@@ -2760,7 +2718,7 @@ func KeyPressEventNew(buf []byte) xgb.Event {
return v
}
-// Event write KeyPress
+// Bytes writes a KeyPressEvent value to a byte slice.
func (v KeyPressEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -2813,12 +2771,14 @@ func (v KeyPressEvent) Bytes() []byte {
return buf
}
-func (v KeyPressEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the KeyPress event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v KeyPressEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of KeyPressEvent.
func (v KeyPressEvent) String() string {
fieldVals := make([]string, 0, 12)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -2840,9 +2800,7 @@ func init() {
xgb.NewEventFuncs[2] = KeyPressEventNew
}
-// Event definition ButtonPress (4)
-// Size: 32
-
+// ButtonPress is the event number for a ButtonPressEvent.
const ButtonPress = 4
type ButtonPressEvent struct {
@@ -2861,7 +2819,7 @@ type ButtonPressEvent struct {
// padding: 1 bytes
}
-// Event read ButtonPress
+// ButtonPressEventNew constructs a ButtonPressEvent value that implements xgb.Event from a byte slice.
func ButtonPressEventNew(buf []byte) xgb.Event {
v := ButtonPressEvent{}
b := 1 // don't read event number
@@ -2911,7 +2869,7 @@ func ButtonPressEventNew(buf []byte) xgb.Event {
return v
}
-// Event write ButtonPress
+// Bytes writes a ButtonPressEvent value to a byte slice.
func (v ButtonPressEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -2964,12 +2922,14 @@ func (v ButtonPressEvent) Bytes() []byte {
return buf
}
-func (v ButtonPressEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ButtonPress event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ButtonPressEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of ButtonPressEvent.
func (v ButtonPressEvent) String() string {
fieldVals := make([]string, 0, 12)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -2991,9 +2951,7 @@ func init() {
xgb.NewEventFuncs[4] = ButtonPressEventNew
}
-// Event definition MotionNotify (6)
-// Size: 32
-
+// MotionNotify is the event number for a MotionNotifyEvent.
const MotionNotify = 6
type MotionNotifyEvent struct {
@@ -3012,7 +2970,7 @@ type MotionNotifyEvent struct {
// padding: 1 bytes
}
-// Event read MotionNotify
+// MotionNotifyEventNew constructs a MotionNotifyEvent value that implements xgb.Event from a byte slice.
func MotionNotifyEventNew(buf []byte) xgb.Event {
v := MotionNotifyEvent{}
b := 1 // don't read event number
@@ -3062,7 +3020,7 @@ func MotionNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write MotionNotify
+// Bytes writes a MotionNotifyEvent value to a byte slice.
func (v MotionNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3115,12 +3073,14 @@ func (v MotionNotifyEvent) Bytes() []byte {
return buf
}
-func (v MotionNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the MotionNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v MotionNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of MotionNotifyEvent.
func (v MotionNotifyEvent) String() string {
fieldVals := make([]string, 0, 12)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3142,9 +3102,7 @@ func init() {
xgb.NewEventFuncs[6] = MotionNotifyEventNew
}
-// Event definition EnterNotify (7)
-// Size: 32
-
+// EnterNotify is the event number for a EnterNotifyEvent.
const EnterNotify = 7
type EnterNotifyEvent struct {
@@ -3163,7 +3121,7 @@ type EnterNotifyEvent struct {
SameScreenFocus byte
}
-// Event read EnterNotify
+// EnterNotifyEventNew constructs a EnterNotifyEvent value that implements xgb.Event from a byte slice.
func EnterNotifyEventNew(buf []byte) xgb.Event {
v := EnterNotifyEvent{}
b := 1 // don't read event number
@@ -3210,7 +3168,7 @@ func EnterNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write EnterNotify
+// Bytes writes a EnterNotifyEvent value to a byte slice.
func (v EnterNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3260,12 +3218,14 @@ func (v EnterNotifyEvent) Bytes() []byte {
return buf
}
-func (v EnterNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the EnterNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v EnterNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of EnterNotifyEvent.
func (v EnterNotifyEvent) String() string {
fieldVals := make([]string, 0, 12)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3288,9 +3248,7 @@ func init() {
xgb.NewEventFuncs[7] = EnterNotifyEventNew
}
-// Event definition FocusIn (9)
-// Size: 32
-
+// FocusIn is the event number for a FocusInEvent.
const FocusIn = 9
type FocusInEvent struct {
@@ -3301,7 +3259,7 @@ type FocusInEvent struct {
// padding: 3 bytes
}
-// Event read FocusIn
+// FocusInEventNew constructs a FocusInEvent value that implements xgb.Event from a byte slice.
func FocusInEventNew(buf []byte) xgb.Event {
v := FocusInEvent{}
b := 1 // don't read event number
@@ -3323,7 +3281,7 @@ func FocusInEventNew(buf []byte) xgb.Event {
return v
}
-// Event write FocusIn
+// Bytes writes a FocusInEvent value to a byte slice.
func (v FocusInEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3348,12 +3306,14 @@ func (v FocusInEvent) Bytes() []byte {
return buf
}
-func (v FocusInEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the FocusIn event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v FocusInEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of FocusInEvent.
func (v FocusInEvent) String() string {
fieldVals := make([]string, 0, 4)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3367,16 +3327,14 @@ func init() {
xgb.NewEventFuncs[9] = FocusInEventNew
}
-// Event definition KeymapNotify (11)
-// Size: 32
-
+// KeymapNotify is the event number for a KeymapNotifyEvent.
const KeymapNotify = 11
type KeymapNotifyEvent struct {
Keys []byte // size: 32
}
-// Event read KeymapNotify
+// KeymapNotifyEventNew constructs a KeymapNotifyEvent value that implements xgb.Event from a byte slice.
func KeymapNotifyEventNew(buf []byte) xgb.Event {
v := KeymapNotifyEvent{}
b := 1 // don't read event number
@@ -3388,7 +3346,7 @@ func KeymapNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write KeymapNotify
+// Bytes writes a KeymapNotifyEvent value to a byte slice.
func (v KeymapNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3403,12 +3361,14 @@ func (v KeymapNotifyEvent) Bytes() []byte {
return buf
}
-func (v KeymapNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the KeymapNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v KeymapNotifyEvent) SequenceId() uint16 {
return uint16(0)
}
+// String is a rudimentary string representation of KeymapNotifyEvent.
func (v KeymapNotifyEvent) String() string {
fieldVals := make([]string, 0, 1)
return "KeymapNotify {" + xgb.StringsJoin(fieldVals, ", ") + "}"
@@ -3418,9 +3378,7 @@ func init() {
xgb.NewEventFuncs[11] = KeymapNotifyEventNew
}
-// Event definition Expose (12)
-// Size: 32
-
+// Expose is the event number for a ExposeEvent.
const Expose = 12
type ExposeEvent struct {
@@ -3435,7 +3393,7 @@ type ExposeEvent struct {
// padding: 2 bytes
}
-// Event read Expose
+// ExposeEventNew constructs a ExposeEvent value that implements xgb.Event from a byte slice.
func ExposeEventNew(buf []byte) xgb.Event {
v := ExposeEvent{}
b := 1 // don't read event number
@@ -3468,7 +3426,7 @@ func ExposeEventNew(buf []byte) xgb.Event {
return v
}
-// Event write Expose
+// Bytes writes a ExposeEvent value to a byte slice.
func (v ExposeEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3504,12 +3462,14 @@ func (v ExposeEvent) Bytes() []byte {
return buf
}
-func (v ExposeEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the Expose event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ExposeEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of ExposeEvent.
func (v ExposeEvent) String() string {
fieldVals := make([]string, 0, 8)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3526,9 +3486,7 @@ func init() {
xgb.NewEventFuncs[12] = ExposeEventNew
}
-// Event definition GraphicsExposure (13)
-// Size: 32
-
+// GraphicsExposure is the event number for a GraphicsExposureEvent.
const GraphicsExposure = 13
type GraphicsExposureEvent struct {
@@ -3545,7 +3503,7 @@ type GraphicsExposureEvent struct {
// padding: 3 bytes
}
-// Event read GraphicsExposure
+// GraphicsExposureEventNew constructs a GraphicsExposureEvent value that implements xgb.Event from a byte slice.
func GraphicsExposureEventNew(buf []byte) xgb.Event {
v := GraphicsExposureEvent{}
b := 1 // don't read event number
@@ -3584,7 +3542,7 @@ func GraphicsExposureEventNew(buf []byte) xgb.Event {
return v
}
-// Event write GraphicsExposure
+// Bytes writes a GraphicsExposureEvent value to a byte slice.
func (v GraphicsExposureEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3626,12 +3584,14 @@ func (v GraphicsExposureEvent) Bytes() []byte {
return buf
}
-func (v GraphicsExposureEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the GraphicsExposure event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v GraphicsExposureEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of GraphicsExposureEvent.
func (v GraphicsExposureEvent) String() string {
fieldVals := make([]string, 0, 10)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3650,9 +3610,7 @@ func init() {
xgb.NewEventFuncs[13] = GraphicsExposureEventNew
}
-// Event definition NoExposure (14)
-// Size: 32
-
+// NoExposure is the event number for a NoExposureEvent.
const NoExposure = 14
type NoExposureEvent struct {
@@ -3664,7 +3622,7 @@ type NoExposureEvent struct {
// padding: 1 bytes
}
-// Event read NoExposure
+// NoExposureEventNew constructs a NoExposureEvent value that implements xgb.Event from a byte slice.
func NoExposureEventNew(buf []byte) xgb.Event {
v := NoExposureEvent{}
b := 1 // don't read event number
@@ -3688,7 +3646,7 @@ func NoExposureEventNew(buf []byte) xgb.Event {
return v
}
-// Event write NoExposure
+// Bytes writes a NoExposureEvent value to a byte slice.
func (v NoExposureEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3715,12 +3673,14 @@ func (v NoExposureEvent) Bytes() []byte {
return buf
}
-func (v NoExposureEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the NoExposure event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v NoExposureEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of NoExposureEvent.
func (v NoExposureEvent) String() string {
fieldVals := make([]string, 0, 5)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3734,9 +3694,7 @@ func init() {
xgb.NewEventFuncs[14] = NoExposureEventNew
}
-// Event definition VisibilityNotify (15)
-// Size: 32
-
+// VisibilityNotify is the event number for a VisibilityNotifyEvent.
const VisibilityNotify = 15
type VisibilityNotifyEvent struct {
@@ -3747,7 +3705,7 @@ type VisibilityNotifyEvent struct {
// padding: 3 bytes
}
-// Event read VisibilityNotify
+// VisibilityNotifyEventNew constructs a VisibilityNotifyEvent value that implements xgb.Event from a byte slice.
func VisibilityNotifyEventNew(buf []byte) xgb.Event {
v := VisibilityNotifyEvent{}
b := 1 // don't read event number
@@ -3768,7 +3726,7 @@ func VisibilityNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write VisibilityNotify
+// Bytes writes a VisibilityNotifyEvent value to a byte slice.
func (v VisibilityNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3792,12 +3750,14 @@ func (v VisibilityNotifyEvent) Bytes() []byte {
return buf
}
-func (v VisibilityNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the VisibilityNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v VisibilityNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of VisibilityNotifyEvent.
func (v VisibilityNotifyEvent) String() string {
fieldVals := make([]string, 0, 4)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3810,9 +3770,7 @@ func init() {
xgb.NewEventFuncs[15] = VisibilityNotifyEventNew
}
-// Event definition CreateNotify (16)
-// Size: 32
-
+// CreateNotify is the event number for a CreateNotifyEvent.
const CreateNotify = 16
type CreateNotifyEvent struct {
@@ -3829,7 +3787,7 @@ type CreateNotifyEvent struct {
// padding: 1 bytes
}
-// Event read CreateNotify
+// CreateNotifyEventNew constructs a CreateNotifyEvent value that implements xgb.Event from a byte slice.
func CreateNotifyEventNew(buf []byte) xgb.Event {
v := CreateNotifyEvent{}
b := 1 // don't read event number
@@ -3872,7 +3830,7 @@ func CreateNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write CreateNotify
+// Bytes writes a CreateNotifyEvent value to a byte slice.
func (v CreateNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3918,12 +3876,14 @@ func (v CreateNotifyEvent) Bytes() []byte {
return buf
}
-func (v CreateNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the CreateNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v CreateNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of CreateNotifyEvent.
func (v CreateNotifyEvent) String() string {
fieldVals := make([]string, 0, 10)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -3942,9 +3902,7 @@ func init() {
xgb.NewEventFuncs[16] = CreateNotifyEventNew
}
-// Event definition DestroyNotify (17)
-// Size: 32
-
+// DestroyNotify is the event number for a DestroyNotifyEvent.
const DestroyNotify = 17
type DestroyNotifyEvent struct {
@@ -3954,7 +3912,7 @@ type DestroyNotifyEvent struct {
Window Window
}
-// Event read DestroyNotify
+// DestroyNotifyEventNew constructs a DestroyNotifyEvent value that implements xgb.Event from a byte slice.
func DestroyNotifyEventNew(buf []byte) xgb.Event {
v := DestroyNotifyEvent{}
b := 1 // don't read event number
@@ -3973,7 +3931,7 @@ func DestroyNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write DestroyNotify
+// Bytes writes a DestroyNotifyEvent value to a byte slice.
func (v DestroyNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -3995,12 +3953,14 @@ func (v DestroyNotifyEvent) Bytes() []byte {
return buf
}
-func (v DestroyNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the DestroyNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v DestroyNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of DestroyNotifyEvent.
func (v DestroyNotifyEvent) String() string {
fieldVals := make([]string, 0, 3)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4013,9 +3973,7 @@ func init() {
xgb.NewEventFuncs[17] = DestroyNotifyEventNew
}
-// Event definition UnmapNotify (18)
-// Size: 32
-
+// UnmapNotify is the event number for a UnmapNotifyEvent.
const UnmapNotify = 18
type UnmapNotifyEvent struct {
@@ -4027,7 +3985,7 @@ type UnmapNotifyEvent struct {
// padding: 3 bytes
}
-// Event read UnmapNotify
+// UnmapNotifyEventNew constructs a UnmapNotifyEvent value that implements xgb.Event from a byte slice.
func UnmapNotifyEventNew(buf []byte) xgb.Event {
v := UnmapNotifyEvent{}
b := 1 // don't read event number
@@ -4055,7 +4013,7 @@ func UnmapNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write UnmapNotify
+// Bytes writes a UnmapNotifyEvent value to a byte slice.
func (v UnmapNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4086,12 +4044,14 @@ func (v UnmapNotifyEvent) Bytes() []byte {
return buf
}
-func (v UnmapNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the UnmapNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v UnmapNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of UnmapNotifyEvent.
func (v UnmapNotifyEvent) String() string {
fieldVals := make([]string, 0, 5)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4105,9 +4065,7 @@ func init() {
xgb.NewEventFuncs[18] = UnmapNotifyEventNew
}
-// Event definition MapNotify (19)
-// Size: 32
-
+// MapNotify is the event number for a MapNotifyEvent.
const MapNotify = 19
type MapNotifyEvent struct {
@@ -4119,7 +4077,7 @@ type MapNotifyEvent struct {
// padding: 3 bytes
}
-// Event read MapNotify
+// MapNotifyEventNew constructs a MapNotifyEvent value that implements xgb.Event from a byte slice.
func MapNotifyEventNew(buf []byte) xgb.Event {
v := MapNotifyEvent{}
b := 1 // don't read event number
@@ -4147,7 +4105,7 @@ func MapNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write MapNotify
+// Bytes writes a MapNotifyEvent value to a byte slice.
func (v MapNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4178,12 +4136,14 @@ func (v MapNotifyEvent) Bytes() []byte {
return buf
}
-func (v MapNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the MapNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v MapNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of MapNotifyEvent.
func (v MapNotifyEvent) String() string {
fieldVals := make([]string, 0, 5)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4197,9 +4157,7 @@ func init() {
xgb.NewEventFuncs[19] = MapNotifyEventNew
}
-// Event definition MapRequest (20)
-// Size: 32
-
+// MapRequest is the event number for a MapRequestEvent.
const MapRequest = 20
type MapRequestEvent struct {
@@ -4209,7 +4167,7 @@ type MapRequestEvent struct {
Window Window
}
-// Event read MapRequest
+// MapRequestEventNew constructs a MapRequestEvent value that implements xgb.Event from a byte slice.
func MapRequestEventNew(buf []byte) xgb.Event {
v := MapRequestEvent{}
b := 1 // don't read event number
@@ -4228,7 +4186,7 @@ func MapRequestEventNew(buf []byte) xgb.Event {
return v
}
-// Event write MapRequest
+// Bytes writes a MapRequestEvent value to a byte slice.
func (v MapRequestEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4250,12 +4208,14 @@ func (v MapRequestEvent) Bytes() []byte {
return buf
}
-func (v MapRequestEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the MapRequest event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v MapRequestEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of MapRequestEvent.
func (v MapRequestEvent) String() string {
fieldVals := make([]string, 0, 3)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4268,9 +4228,7 @@ func init() {
xgb.NewEventFuncs[20] = MapRequestEventNew
}
-// Event definition ReparentNotify (21)
-// Size: 32
-
+// ReparentNotify is the event number for a ReparentNotifyEvent.
const ReparentNotify = 21
type ReparentNotifyEvent struct {
@@ -4285,7 +4243,7 @@ type ReparentNotifyEvent struct {
// padding: 3 bytes
}
-// Event read ReparentNotify
+// ReparentNotifyEventNew constructs a ReparentNotifyEvent value that implements xgb.Event from a byte slice.
func ReparentNotifyEventNew(buf []byte) xgb.Event {
v := ReparentNotifyEvent{}
b := 1 // don't read event number
@@ -4322,7 +4280,7 @@ func ReparentNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write ReparentNotify
+// Bytes writes a ReparentNotifyEvent value to a byte slice.
func (v ReparentNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4362,12 +4320,14 @@ func (v ReparentNotifyEvent) Bytes() []byte {
return buf
}
-func (v ReparentNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ReparentNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ReparentNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of ReparentNotifyEvent.
func (v ReparentNotifyEvent) String() string {
fieldVals := make([]string, 0, 8)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4384,9 +4344,7 @@ func init() {
xgb.NewEventFuncs[21] = ReparentNotifyEventNew
}
-// Event definition ConfigureNotify (22)
-// Size: 32
-
+// ConfigureNotify is the event number for a ConfigureNotifyEvent.
const ConfigureNotify = 22
type ConfigureNotifyEvent struct {
@@ -4404,7 +4362,7 @@ type ConfigureNotifyEvent struct {
// padding: 1 bytes
}
-// Event read ConfigureNotify
+// ConfigureNotifyEventNew constructs a ConfigureNotifyEvent value that implements xgb.Event from a byte slice.
func ConfigureNotifyEventNew(buf []byte) xgb.Event {
v := ConfigureNotifyEvent{}
b := 1 // don't read event number
@@ -4450,7 +4408,7 @@ func ConfigureNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write ConfigureNotify
+// Bytes writes a ConfigureNotifyEvent value to a byte slice.
func (v ConfigureNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4499,12 +4457,14 @@ func (v ConfigureNotifyEvent) Bytes() []byte {
return buf
}
-func (v ConfigureNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ConfigureNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ConfigureNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of ConfigureNotifyEvent.
func (v ConfigureNotifyEvent) String() string {
fieldVals := make([]string, 0, 11)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4524,9 +4484,7 @@ func init() {
xgb.NewEventFuncs[22] = ConfigureNotifyEventNew
}
-// Event definition ConfigureRequest (23)
-// Size: 32
-
+// ConfigureRequest is the event number for a ConfigureRequestEvent.
const ConfigureRequest = 23
type ConfigureRequestEvent struct {
@@ -4543,7 +4501,7 @@ type ConfigureRequestEvent struct {
ValueMask uint16
}
-// Event read ConfigureRequest
+// ConfigureRequestEventNew constructs a ConfigureRequestEvent value that implements xgb.Event from a byte slice.
func ConfigureRequestEventNew(buf []byte) xgb.Event {
v := ConfigureRequestEvent{}
b := 1 // don't read event number
@@ -4584,7 +4542,7 @@ func ConfigureRequestEventNew(buf []byte) xgb.Event {
return v
}
-// Event write ConfigureRequest
+// Bytes writes a ConfigureRequestEvent value to a byte slice.
func (v ConfigureRequestEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4628,12 +4586,14 @@ func (v ConfigureRequestEvent) Bytes() []byte {
return buf
}
-func (v ConfigureRequestEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ConfigureRequest event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ConfigureRequestEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of ConfigureRequestEvent.
func (v ConfigureRequestEvent) String() string {
fieldVals := make([]string, 0, 10)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4654,9 +4614,7 @@ func init() {
xgb.NewEventFuncs[23] = ConfigureRequestEventNew
}
-// Event definition GravityNotify (24)
-// Size: 32
-
+// GravityNotify is the event number for a GravityNotifyEvent.
const GravityNotify = 24
type GravityNotifyEvent struct {
@@ -4668,7 +4626,7 @@ type GravityNotifyEvent struct {
Y int16
}
-// Event read GravityNotify
+// GravityNotifyEventNew constructs a GravityNotifyEvent value that implements xgb.Event from a byte slice.
func GravityNotifyEventNew(buf []byte) xgb.Event {
v := GravityNotifyEvent{}
b := 1 // don't read event number
@@ -4693,7 +4651,7 @@ func GravityNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write GravityNotify
+// Bytes writes a GravityNotifyEvent value to a byte slice.
func (v GravityNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4721,12 +4679,14 @@ func (v GravityNotifyEvent) Bytes() []byte {
return buf
}
-func (v GravityNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the GravityNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v GravityNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of GravityNotifyEvent.
func (v GravityNotifyEvent) String() string {
fieldVals := make([]string, 0, 5)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4741,9 +4701,7 @@ func init() {
xgb.NewEventFuncs[24] = GravityNotifyEventNew
}
-// Event definition ResizeRequest (25)
-// Size: 32
-
+// ResizeRequest is the event number for a ResizeRequestEvent.
const ResizeRequest = 25
type ResizeRequestEvent struct {
@@ -4754,7 +4712,7 @@ type ResizeRequestEvent struct {
Height uint16
}
-// Event read ResizeRequest
+// ResizeRequestEventNew constructs a ResizeRequestEvent value that implements xgb.Event from a byte slice.
func ResizeRequestEventNew(buf []byte) xgb.Event {
v := ResizeRequestEvent{}
b := 1 // don't read event number
@@ -4776,7 +4734,7 @@ func ResizeRequestEventNew(buf []byte) xgb.Event {
return v
}
-// Event write ResizeRequest
+// Bytes writes a ResizeRequestEvent value to a byte slice.
func (v ResizeRequestEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4801,12 +4759,14 @@ func (v ResizeRequestEvent) Bytes() []byte {
return buf
}
-func (v ResizeRequestEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ResizeRequest event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ResizeRequestEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of ResizeRequestEvent.
func (v ResizeRequestEvent) String() string {
fieldVals := make([]string, 0, 4)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4820,9 +4780,7 @@ func init() {
xgb.NewEventFuncs[25] = ResizeRequestEventNew
}
-// Event definition CirculateNotify (26)
-// Size: 32
-
+// CirculateNotify is the event number for a CirculateNotifyEvent.
const CirculateNotify = 26
type CirculateNotifyEvent struct {
@@ -4835,7 +4793,7 @@ type CirculateNotifyEvent struct {
// padding: 3 bytes
}
-// Event read CirculateNotify
+// CirculateNotifyEventNew constructs a CirculateNotifyEvent value that implements xgb.Event from a byte slice.
func CirculateNotifyEventNew(buf []byte) xgb.Event {
v := CirculateNotifyEvent{}
b := 1 // don't read event number
@@ -4861,7 +4819,7 @@ func CirculateNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write CirculateNotify
+// Bytes writes a CirculateNotifyEvent value to a byte slice.
func (v CirculateNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4890,12 +4848,14 @@ func (v CirculateNotifyEvent) Bytes() []byte {
return buf
}
-func (v CirculateNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the CirculateNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v CirculateNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of CirculateNotifyEvent.
func (v CirculateNotifyEvent) String() string {
fieldVals := make([]string, 0, 6)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -4909,9 +4869,7 @@ func init() {
xgb.NewEventFuncs[26] = CirculateNotifyEventNew
}
-// Event definition PropertyNotify (28)
-// Size: 32
-
+// PropertyNotify is the event number for a PropertyNotifyEvent.
const PropertyNotify = 28
type PropertyNotifyEvent struct {
@@ -4924,7 +4882,7 @@ type PropertyNotifyEvent struct {
// padding: 3 bytes
}
-// Event read PropertyNotify
+// PropertyNotifyEventNew constructs a PropertyNotifyEvent value that implements xgb.Event from a byte slice.
func PropertyNotifyEventNew(buf []byte) xgb.Event {
v := PropertyNotifyEvent{}
b := 1 // don't read event number
@@ -4951,7 +4909,7 @@ func PropertyNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write PropertyNotify
+// Bytes writes a PropertyNotifyEvent value to a byte slice.
func (v PropertyNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -4981,12 +4939,14 @@ func (v PropertyNotifyEvent) Bytes() []byte {
return buf
}
-func (v PropertyNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the PropertyNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v PropertyNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of PropertyNotifyEvent.
func (v PropertyNotifyEvent) String() string {
fieldVals := make([]string, 0, 6)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -5001,9 +4961,7 @@ func init() {
xgb.NewEventFuncs[28] = PropertyNotifyEventNew
}
-// Event definition SelectionClear (29)
-// Size: 32
-
+// SelectionClear is the event number for a SelectionClearEvent.
const SelectionClear = 29
type SelectionClearEvent struct {
@@ -5014,7 +4972,7 @@ type SelectionClearEvent struct {
Selection Atom
}
-// Event read SelectionClear
+// SelectionClearEventNew constructs a SelectionClearEvent value that implements xgb.Event from a byte slice.
func SelectionClearEventNew(buf []byte) xgb.Event {
v := SelectionClearEvent{}
b := 1 // don't read event number
@@ -5036,7 +4994,7 @@ func SelectionClearEventNew(buf []byte) xgb.Event {
return v
}
-// Event write SelectionClear
+// Bytes writes a SelectionClearEvent value to a byte slice.
func (v SelectionClearEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -5061,12 +5019,14 @@ func (v SelectionClearEvent) Bytes() []byte {
return buf
}
-func (v SelectionClearEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the SelectionClear event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v SelectionClearEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of SelectionClearEvent.
func (v SelectionClearEvent) String() string {
fieldVals := make([]string, 0, 4)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -5080,9 +5040,7 @@ func init() {
xgb.NewEventFuncs[29] = SelectionClearEventNew
}
-// Event definition SelectionRequest (30)
-// Size: 32
-
+// SelectionRequest is the event number for a SelectionRequestEvent.
const SelectionRequest = 30
type SelectionRequestEvent struct {
@@ -5096,7 +5054,7 @@ type SelectionRequestEvent struct {
Property Atom
}
-// Event read SelectionRequest
+// SelectionRequestEventNew constructs a SelectionRequestEvent value that implements xgb.Event from a byte slice.
func SelectionRequestEventNew(buf []byte) xgb.Event {
v := SelectionRequestEvent{}
b := 1 // don't read event number
@@ -5127,7 +5085,7 @@ func SelectionRequestEventNew(buf []byte) xgb.Event {
return v
}
-// Event write SelectionRequest
+// Bytes writes a SelectionRequestEvent value to a byte slice.
func (v SelectionRequestEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -5161,12 +5119,14 @@ func (v SelectionRequestEvent) Bytes() []byte {
return buf
}
-func (v SelectionRequestEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the SelectionRequest event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v SelectionRequestEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of SelectionRequestEvent.
func (v SelectionRequestEvent) String() string {
fieldVals := make([]string, 0, 7)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -5183,9 +5143,7 @@ func init() {
xgb.NewEventFuncs[30] = SelectionRequestEventNew
}
-// Event definition SelectionNotify (31)
-// Size: 32
-
+// SelectionNotify is the event number for a SelectionNotifyEvent.
const SelectionNotify = 31
type SelectionNotifyEvent struct {
@@ -5198,7 +5156,7 @@ type SelectionNotifyEvent struct {
Property Atom
}
-// Event read SelectionNotify
+// SelectionNotifyEventNew constructs a SelectionNotifyEvent value that implements xgb.Event from a byte slice.
func SelectionNotifyEventNew(buf []byte) xgb.Event {
v := SelectionNotifyEvent{}
b := 1 // don't read event number
@@ -5226,7 +5184,7 @@ func SelectionNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write SelectionNotify
+// Bytes writes a SelectionNotifyEvent value to a byte slice.
func (v SelectionNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -5257,12 +5215,14 @@ func (v SelectionNotifyEvent) Bytes() []byte {
return buf
}
-func (v SelectionNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the SelectionNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v SelectionNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of SelectionNotifyEvent.
func (v SelectionNotifyEvent) String() string {
fieldVals := make([]string, 0, 6)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -5278,9 +5238,7 @@ func init() {
xgb.NewEventFuncs[31] = SelectionNotifyEventNew
}
-// Event definition ColormapNotify (32)
-// Size: 32
-
+// ColormapNotify is the event number for a ColormapNotifyEvent.
const ColormapNotify = 32
type ColormapNotifyEvent struct {
@@ -5293,7 +5251,7 @@ type ColormapNotifyEvent struct {
// padding: 2 bytes
}
-// Event read ColormapNotify
+// ColormapNotifyEventNew constructs a ColormapNotifyEvent value that implements xgb.Event from a byte slice.
func ColormapNotifyEventNew(buf []byte) xgb.Event {
v := ColormapNotifyEvent{}
b := 1 // don't read event number
@@ -5324,7 +5282,7 @@ func ColormapNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write ColormapNotify
+// Bytes writes a ColormapNotifyEvent value to a byte slice.
func (v ColormapNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -5358,12 +5316,14 @@ func (v ColormapNotifyEvent) Bytes() []byte {
return buf
}
-func (v ColormapNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ColormapNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ColormapNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of ColormapNotifyEvent.
func (v ColormapNotifyEvent) String() string {
fieldVals := make([]string, 0, 6)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -5378,9 +5338,7 @@ func init() {
xgb.NewEventFuncs[32] = ColormapNotifyEventNew
}
-// Event definition ClientMessage (33)
-// Size: 32
-
+// ClientMessage is the event number for a ClientMessageEvent.
const ClientMessage = 33
type ClientMessageEvent struct {
@@ -5391,7 +5349,7 @@ type ClientMessageEvent struct {
Data ClientMessageDataUnion
}
-// Event read ClientMessage
+// ClientMessageEventNew constructs a ClientMessageEvent value that implements xgb.Event from a byte slice.
func ClientMessageEventNew(buf []byte) xgb.Event {
v := ClientMessageEvent{}
b := 1 // don't read event number
@@ -5414,7 +5372,7 @@ func ClientMessageEventNew(buf []byte) xgb.Event {
return v
}
-// Event write ClientMessage
+// Bytes writes a ClientMessageEvent value to a byte slice.
func (v ClientMessageEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -5443,12 +5401,14 @@ func (v ClientMessageEvent) Bytes() []byte {
return buf
}
-func (v ClientMessageEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ClientMessage event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ClientMessageEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of ClientMessageEvent.
func (v ClientMessageEvent) String() string {
fieldVals := make([]string, 0, 4)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -5462,9 +5422,7 @@ func init() {
xgb.NewEventFuncs[33] = ClientMessageEventNew
}
-// Event definition MappingNotify (34)
-// Size: 32
-
+// MappingNotify is the event number for a MappingNotifyEvent.
const MappingNotify = 34
type MappingNotifyEvent struct {
@@ -5476,7 +5434,7 @@ type MappingNotifyEvent struct {
// padding: 1 bytes
}
-// Event read MappingNotify
+// MappingNotifyEventNew constructs a MappingNotifyEvent value that implements xgb.Event from a byte slice.
func MappingNotifyEventNew(buf []byte) xgb.Event {
v := MappingNotifyEvent{}
b := 1 // don't read event number
@@ -5500,7 +5458,7 @@ func MappingNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write MappingNotify
+// Bytes writes a MappingNotifyEvent value to a byte slice.
func (v MappingNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -5527,12 +5485,14 @@ func (v MappingNotifyEvent) Bytes() []byte {
return buf
}
-func (v MappingNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the MappingNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v MappingNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of MappingNotifyEvent.
func (v MappingNotifyEvent) String() string {
fieldVals := make([]string, 0, 5)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -5546,22 +5506,24 @@ func init() {
xgb.NewEventFuncs[34] = MappingNotifyEventNew
}
-// EventCopy definition KeyRelease (3)
-
+// KeyRelease is the event number for a KeyReleaseEvent.
const KeyRelease = 3
type KeyReleaseEvent KeyPressEvent
+// KeyReleaseEventNew constructs a KeyReleaseEvent value that implements xgb.Event from a byte slice.
func KeyReleaseEventNew(buf []byte) xgb.Event {
return KeyReleaseEvent(KeyPressEventNew(buf).(KeyPressEvent))
}
+// Bytes writes a KeyReleaseEvent value to a byte slice.
func (v KeyReleaseEvent) Bytes() []byte {
return KeyPressEvent(v).Bytes()
}
-func (v KeyReleaseEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the KeyRelease event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v KeyReleaseEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -5587,22 +5549,24 @@ func init() {
xgb.NewEventFuncs[3] = KeyReleaseEventNew
}
-// EventCopy definition ButtonRelease (5)
-
+// ButtonRelease is the event number for a ButtonReleaseEvent.
const ButtonRelease = 5
type ButtonReleaseEvent ButtonPressEvent
+// ButtonReleaseEventNew constructs a ButtonReleaseEvent value that implements xgb.Event from a byte slice.
func ButtonReleaseEventNew(buf []byte) xgb.Event {
return ButtonReleaseEvent(ButtonPressEventNew(buf).(ButtonPressEvent))
}
+// Bytes writes a ButtonReleaseEvent value to a byte slice.
func (v ButtonReleaseEvent) Bytes() []byte {
return ButtonPressEvent(v).Bytes()
}
-func (v ButtonReleaseEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the ButtonRelease event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v ButtonReleaseEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -5628,22 +5592,24 @@ func init() {
xgb.NewEventFuncs[5] = ButtonReleaseEventNew
}
-// EventCopy definition LeaveNotify (8)
-
+// LeaveNotify is the event number for a LeaveNotifyEvent.
const LeaveNotify = 8
type LeaveNotifyEvent EnterNotifyEvent
+// LeaveNotifyEventNew constructs a LeaveNotifyEvent value that implements xgb.Event from a byte slice.
func LeaveNotifyEventNew(buf []byte) xgb.Event {
return LeaveNotifyEvent(EnterNotifyEventNew(buf).(EnterNotifyEvent))
}
+// Bytes writes a LeaveNotifyEvent value to a byte slice.
func (v LeaveNotifyEvent) Bytes() []byte {
return EnterNotifyEvent(v).Bytes()
}
-func (v LeaveNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the LeaveNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v LeaveNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -5670,22 +5636,24 @@ func init() {
xgb.NewEventFuncs[8] = LeaveNotifyEventNew
}
-// EventCopy definition FocusOut (10)
-
+// FocusOut is the event number for a FocusOutEvent.
const FocusOut = 10
type FocusOutEvent FocusInEvent
+// FocusOutEventNew constructs a FocusOutEvent value that implements xgb.Event from a byte slice.
func FocusOutEventNew(buf []byte) xgb.Event {
return FocusOutEvent(FocusInEventNew(buf).(FocusInEvent))
}
+// Bytes writes a FocusOutEvent value to a byte slice.
func (v FocusOutEvent) Bytes() []byte {
return FocusInEvent(v).Bytes()
}
-func (v FocusOutEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the FocusOut event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v FocusOutEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -5703,22 +5671,24 @@ func init() {
xgb.NewEventFuncs[10] = FocusOutEventNew
}
-// EventCopy definition CirculateRequest (27)
-
+// CirculateRequest is the event number for a CirculateRequestEvent.
const CirculateRequest = 27
type CirculateRequestEvent CirculateNotifyEvent
+// CirculateRequestEventNew constructs a CirculateRequestEvent value that implements xgb.Event from a byte slice.
func CirculateRequestEventNew(buf []byte) xgb.Event {
return CirculateRequestEvent(CirculateNotifyEventNew(buf).(CirculateNotifyEvent))
}
+// Bytes writes a CirculateRequestEvent value to a byte slice.
func (v CirculateRequestEvent) Bytes() []byte {
return CirculateNotifyEvent(v).Bytes()
}
-func (v CirculateRequestEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the CirculateRequest event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v CirculateRequestEvent) SequenceId() uint16 {
return v.Sequence
}
@@ -5736,9 +5706,7 @@ func init() {
xgb.NewEventFuncs[27] = CirculateRequestEventNew
}
-// Error definition Request (1)
-// Size: 32
-
+// BadRequest is the error number for a BadRequest.
const BadRequest = 1
type RequestError struct {
@@ -5750,7 +5718,7 @@ type RequestError struct {
// padding: 1 bytes
}
-// Error read Request
+// RequestErrorNew constructs a RequestError value that implements xgb.Error from a byte slice.
func RequestErrorNew(buf []byte) xgb.Error {
v := RequestError{}
v.NiceName = "Request"
@@ -5775,8 +5743,8 @@ func RequestErrorNew(buf []byte) xgb.Error {
return v
}
-func (err RequestError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadRequest error.
+// This is mostly used internally.
func (err RequestError) SequenceId() uint16 {
return err.Sequence
}
@@ -5799,9 +5767,7 @@ func init() {
xgb.NewErrorFuncs[1] = RequestErrorNew
}
-// Error definition Value (2)
-// Size: 32
-
+// BadValue is the error number for a BadValue.
const BadValue = 2
type ValueError struct {
@@ -5813,7 +5779,7 @@ type ValueError struct {
// padding: 1 bytes
}
-// Error read Value
+// ValueErrorNew constructs a ValueError value that implements xgb.Error from a byte slice.
func ValueErrorNew(buf []byte) xgb.Error {
v := ValueError{}
v.NiceName = "Value"
@@ -5838,8 +5804,8 @@ func ValueErrorNew(buf []byte) xgb.Error {
return v
}
-func (err ValueError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadValue error.
+// This is mostly used internally.
func (err ValueError) SequenceId() uint16 {
return err.Sequence
}
@@ -5862,20 +5828,20 @@ func init() {
xgb.NewErrorFuncs[2] = ValueErrorNew
}
-// ErrorCopy definition Window (3)
-
+// BadWindow is the error number for a BadWindow.
const BadWindow = 3
type WindowError ValueError
+// WindowErrorNew constructs a WindowError value that implements xgb.Error from a byte slice.
func WindowErrorNew(buf []byte) xgb.Error {
v := WindowError(ValueErrorNew(buf).(ValueError))
v.NiceName = "Window"
return v
}
-func (err WindowError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadWindow error.
+// This is mostly used internally.
func (err WindowError) SequenceId() uint16 {
return err.Sequence
}
@@ -5898,20 +5864,20 @@ func init() {
xgb.NewErrorFuncs[3] = WindowErrorNew
}
-// ErrorCopy definition Pixmap (4)
-
+// BadPixmap is the error number for a BadPixmap.
const BadPixmap = 4
type PixmapError ValueError
+// PixmapErrorNew constructs a PixmapError value that implements xgb.Error from a byte slice.
func PixmapErrorNew(buf []byte) xgb.Error {
v := PixmapError(ValueErrorNew(buf).(ValueError))
v.NiceName = "Pixmap"
return v
}
-func (err PixmapError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadPixmap error.
+// This is mostly used internally.
func (err PixmapError) SequenceId() uint16 {
return err.Sequence
}
@@ -5934,20 +5900,20 @@ func init() {
xgb.NewErrorFuncs[4] = PixmapErrorNew
}
-// ErrorCopy definition Atom (5)
-
+// BadAtom is the error number for a BadAtom.
const BadAtom = 5
type AtomError ValueError
+// AtomErrorNew constructs a AtomError value that implements xgb.Error from a byte slice.
func AtomErrorNew(buf []byte) xgb.Error {
v := AtomError(ValueErrorNew(buf).(ValueError))
v.NiceName = "Atom"
return v
}
-func (err AtomError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadAtom error.
+// This is mostly used internally.
func (err AtomError) SequenceId() uint16 {
return err.Sequence
}
@@ -5970,20 +5936,20 @@ func init() {
xgb.NewErrorFuncs[5] = AtomErrorNew
}
-// ErrorCopy definition Cursor (6)
-
+// BadCursor is the error number for a BadCursor.
const BadCursor = 6
type CursorError ValueError
+// CursorErrorNew constructs a CursorError value that implements xgb.Error from a byte slice.
func CursorErrorNew(buf []byte) xgb.Error {
v := CursorError(ValueErrorNew(buf).(ValueError))
v.NiceName = "Cursor"
return v
}
-func (err CursorError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadCursor error.
+// This is mostly used internally.
func (err CursorError) SequenceId() uint16 {
return err.Sequence
}
@@ -6006,20 +5972,20 @@ func init() {
xgb.NewErrorFuncs[6] = CursorErrorNew
}
-// ErrorCopy definition Font (7)
-
+// BadFont is the error number for a BadFont.
const BadFont = 7
type FontError ValueError
+// FontErrorNew constructs a FontError value that implements xgb.Error from a byte slice.
func FontErrorNew(buf []byte) xgb.Error {
v := FontError(ValueErrorNew(buf).(ValueError))
v.NiceName = "Font"
return v
}
-func (err FontError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadFont error.
+// This is mostly used internally.
func (err FontError) SequenceId() uint16 {
return err.Sequence
}
@@ -6042,20 +6008,20 @@ func init() {
xgb.NewErrorFuncs[7] = FontErrorNew
}
-// ErrorCopy definition Match (8)
-
+// BadMatch is the error number for a BadMatch.
const BadMatch = 8
type MatchError RequestError
+// MatchErrorNew constructs a MatchError value that implements xgb.Error from a byte slice.
func MatchErrorNew(buf []byte) xgb.Error {
v := MatchError(RequestErrorNew(buf).(RequestError))
v.NiceName = "Match"
return v
}
-func (err MatchError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadMatch error.
+// This is mostly used internally.
func (err MatchError) SequenceId() uint16 {
return err.Sequence
}
@@ -6078,20 +6044,20 @@ func init() {
xgb.NewErrorFuncs[8] = MatchErrorNew
}
-// ErrorCopy definition Drawable (9)
-
+// BadDrawable is the error number for a BadDrawable.
const BadDrawable = 9
type DrawableError ValueError
+// DrawableErrorNew constructs a DrawableError value that implements xgb.Error from a byte slice.
func DrawableErrorNew(buf []byte) xgb.Error {
v := DrawableError(ValueErrorNew(buf).(ValueError))
v.NiceName = "Drawable"
return v
}
-func (err DrawableError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadDrawable error.
+// This is mostly used internally.
func (err DrawableError) SequenceId() uint16 {
return err.Sequence
}
@@ -6114,20 +6080,20 @@ func init() {
xgb.NewErrorFuncs[9] = DrawableErrorNew
}
-// ErrorCopy definition Access (10)
-
+// BadAccess is the error number for a BadAccess.
const BadAccess = 10
type AccessError RequestError
+// AccessErrorNew constructs a AccessError value that implements xgb.Error from a byte slice.
func AccessErrorNew(buf []byte) xgb.Error {
v := AccessError(RequestErrorNew(buf).(RequestError))
v.NiceName = "Access"
return v
}
-func (err AccessError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadAccess error.
+// This is mostly used internally.
func (err AccessError) SequenceId() uint16 {
return err.Sequence
}
@@ -6150,20 +6116,20 @@ func init() {
xgb.NewErrorFuncs[10] = AccessErrorNew
}
-// ErrorCopy definition Alloc (11)
-
+// BadAlloc is the error number for a BadAlloc.
const BadAlloc = 11
type AllocError RequestError
+// AllocErrorNew constructs a AllocError value that implements xgb.Error from a byte slice.
func AllocErrorNew(buf []byte) xgb.Error {
v := AllocError(RequestErrorNew(buf).(RequestError))
v.NiceName = "Alloc"
return v
}
-func (err AllocError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadAlloc error.
+// This is mostly used internally.
func (err AllocError) SequenceId() uint16 {
return err.Sequence
}
@@ -6186,20 +6152,20 @@ func init() {
xgb.NewErrorFuncs[11] = AllocErrorNew
}
-// ErrorCopy definition Colormap (12)
-
+// BadColormap is the error number for a BadColormap.
const BadColormap = 12
type ColormapError ValueError
+// ColormapErrorNew constructs a ColormapError value that implements xgb.Error from a byte slice.
func ColormapErrorNew(buf []byte) xgb.Error {
v := ColormapError(ValueErrorNew(buf).(ValueError))
v.NiceName = "Colormap"
return v
}
-func (err ColormapError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadColormap error.
+// This is mostly used internally.
func (err ColormapError) SequenceId() uint16 {
return err.Sequence
}
@@ -6222,20 +6188,20 @@ func init() {
xgb.NewErrorFuncs[12] = ColormapErrorNew
}
-// ErrorCopy definition GContext (13)
-
+// BadGContext is the error number for a BadGContext.
const BadGContext = 13
type GContextError ValueError
+// GContextErrorNew constructs a GContextError value that implements xgb.Error from a byte slice.
func GContextErrorNew(buf []byte) xgb.Error {
v := GContextError(ValueErrorNew(buf).(ValueError))
v.NiceName = "GContext"
return v
}
-func (err GContextError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadGContext error.
+// This is mostly used internally.
func (err GContextError) SequenceId() uint16 {
return err.Sequence
}
@@ -6258,20 +6224,20 @@ func init() {
xgb.NewErrorFuncs[13] = GContextErrorNew
}
-// ErrorCopy definition IDChoice (14)
-
+// BadIDChoice is the error number for a BadIDChoice.
const BadIDChoice = 14
type IDChoiceError ValueError
+// IDChoiceErrorNew constructs a IDChoiceError value that implements xgb.Error from a byte slice.
func IDChoiceErrorNew(buf []byte) xgb.Error {
v := IDChoiceError(ValueErrorNew(buf).(ValueError))
v.NiceName = "IDChoice"
return v
}
-func (err IDChoiceError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadIDChoice error.
+// This is mostly used internally.
func (err IDChoiceError) SequenceId() uint16 {
return err.Sequence
}
@@ -6294,20 +6260,20 @@ func init() {
xgb.NewErrorFuncs[14] = IDChoiceErrorNew
}
-// ErrorCopy definition Name (15)
-
+// BadName is the error number for a BadName.
const BadName = 15
type NameError RequestError
+// NameErrorNew constructs a NameError value that implements xgb.Error from a byte slice.
func NameErrorNew(buf []byte) xgb.Error {
v := NameError(RequestErrorNew(buf).(RequestError))
v.NiceName = "Name"
return v
}
-func (err NameError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadName error.
+// This is mostly used internally.
func (err NameError) SequenceId() uint16 {
return err.Sequence
}
@@ -6330,20 +6296,20 @@ func init() {
xgb.NewErrorFuncs[15] = NameErrorNew
}
-// ErrorCopy definition Length (16)
-
+// BadLength is the error number for a BadLength.
const BadLength = 16
type LengthError RequestError
+// LengthErrorNew constructs a LengthError value that implements xgb.Error from a byte slice.
func LengthErrorNew(buf []byte) xgb.Error {
v := LengthError(RequestErrorNew(buf).(RequestError))
v.NiceName = "Length"
return v
}
-func (err LengthError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadLength error.
+// This is mostly used internally.
func (err LengthError) SequenceId() uint16 {
return err.Sequence
}
@@ -6366,20 +6332,20 @@ func init() {
xgb.NewErrorFuncs[16] = LengthErrorNew
}
-// ErrorCopy definition Implementation (17)
-
+// BadImplementation is the error number for a BadImplementation.
const BadImplementation = 17
type ImplementationError RequestError
+// ImplementationErrorNew constructs a ImplementationError value that implements xgb.Error from a byte slice.
func ImplementationErrorNew(buf []byte) xgb.Error {
v := ImplementationError(RequestErrorNew(buf).(RequestError))
v.NiceName = "Implementation"
return v
}
-func (err ImplementationError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadImplementation error.
+// This is mostly used internally.
func (err ImplementationError) SequenceId() uint16 {
return err.Sequence
}
@@ -6402,30 +6368,35 @@ func init() {
xgb.NewErrorFuncs[17] = ImplementationErrorNew
}
-// Request CreateWindow
-// size: xgb.Pad((28 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// CreateWindowCookie is a cookie used only for CreateWindow requests.
type CreateWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateWindow
+// 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 {
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 {
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}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((28 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -6478,30 +6449,35 @@ func createWindowRequest(c *xgb.Conn, Depth byte, Wid Window, Parent Window, X i
return buf
}
-// Request ChangeWindowAttributes
-// size: xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// ChangeWindowAttributesCookie is a cookie used only for ChangeWindowAttributes requests.
type ChangeWindowAttributesCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeWindowAttributes
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(changeWindowAttributesRequest(c, Window, ValueMask, ValueList), cookie)
return ChangeWindowAttributesCookie{cookie}
}
+// ChangeWindowAttributesChecked sends a checked request.
+// 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)
return ChangeWindowAttributesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeWindowAttributesCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeWindowAttributes
+// changeWindowAttributesRequest writes a ChangeWindowAttributes request to a byte slice.
func changeWindowAttributesRequest(c *xgb.Conn, Window Window, ValueMask uint32, ValueList []uint32) []byte {
size := xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -6529,29 +6505,31 @@ func changeWindowAttributesRequest(c *xgb.Conn, Window Window, ValueMask uint32,
return buf
}
-// Request GetWindowAttributes
-// size: 8
+// GetWindowAttributesCookie is a cookie used only for GetWindowAttributes requests.
type GetWindowAttributesCookie struct {
*xgb.Cookie
}
+// GetWindowAttributes sends a checked request.
+// 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)
return GetWindowAttributesCookie{cookie}
}
+// GetWindowAttributesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetWindowAttributesUnchecked(c *xgb.Conn, Window Window) GetWindowAttributesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getWindowAttributesRequest(c, Window), cookie)
return GetWindowAttributesCookie{cookie}
}
-// Request reply for GetWindowAttributes
-// size: 44
+// GetWindowAttributesReply represents the data returned from a GetWindowAttributes request.
type GetWindowAttributesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
BackingStore byte
Visual Visualid
Class uint16
@@ -6570,7 +6548,7 @@ type GetWindowAttributesReply struct {
// padding: 2 bytes
}
-// Waits and reads reply data from request GetWindowAttributes
+// Reply blocks and returns the reply data for a GetWindowAttributes request.
func (cook GetWindowAttributesCookie) Reply() (*GetWindowAttributesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -6582,7 +6560,7 @@ func (cook GetWindowAttributesCookie) Reply() (*GetWindowAttributesReply, error)
return getWindowAttributesReply(buf), nil
}
-// Read reply into structure from buffer for GetWindowAttributes
+// getWindowAttributesReply reads a byte slice into a GetWindowAttributesReply value.
func getWindowAttributesReply(buf []byte) *GetWindowAttributesReply {
v := new(GetWindowAttributesReply)
b := 1 // skip reply determinant
@@ -6656,6 +6634,7 @@ func getWindowAttributesReply(buf []byte) *GetWindowAttributesReply {
}
// Write request to wire for GetWindowAttributes
+// getWindowAttributesRequest writes a GetWindowAttributes request to a byte slice.
func getWindowAttributesRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -6675,30 +6654,35 @@ func getWindowAttributesRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request DestroyWindow
-// size: 8
+// DestroyWindowCookie is a cookie used only for DestroyWindow requests.
type DestroyWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyWindow
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyWindowRequest(c, Window), cookie)
return DestroyWindowCookie{cookie}
}
+// DestroyWindowChecked sends a checked request.
+// 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)
return DestroyWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroyWindowCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroyWindow
+// destroyWindowRequest writes a DestroyWindow request to a byte slice.
func destroyWindowRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -6718,30 +6702,35 @@ func destroyWindowRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request DestroySubwindows
-// size: 8
+// DestroySubwindowsCookie is a cookie used only for DestroySubwindows requests.
type DestroySubwindowsCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroySubwindows
+// DestroySubwindows sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroySubwindows(c *xgb.Conn, Window Window) DestroySubwindowsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroySubwindowsRequest(c, Window), cookie)
return DestroySubwindowsCookie{cookie}
}
+// DestroySubwindowsChecked sends a checked request.
+// 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)
return DestroySubwindowsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroySubwindowsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroySubwindows
+// destroySubwindowsRequest writes a DestroySubwindows request to a byte slice.
func destroySubwindowsRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -6761,30 +6750,35 @@ func destroySubwindowsRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request ChangeSaveSet
-// size: 8
+// ChangeSaveSetCookie is a cookie used only for ChangeSaveSet requests.
type ChangeSaveSetCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeSaveSet
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(changeSaveSetRequest(c, Mode, Window), cookie)
return ChangeSaveSetCookie{cookie}
}
+// ChangeSaveSetChecked sends a checked request.
+// 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)
return ChangeSaveSetCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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, Window Window) []byte {
size := 8
b := 0
@@ -6805,30 +6799,35 @@ func changeSaveSetRequest(c *xgb.Conn, Mode byte, Window Window) []byte {
return buf
}
-// Request ReparentWindow
-// size: 16
+// ReparentWindowCookie is a cookie used only for ReparentWindow requests.
type ReparentWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for ReparentWindow
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(reparentWindowRequest(c, Window, Parent, X, Y), cookie)
return ReparentWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -6857,30 +6856,35 @@ func reparentWindowRequest(c *xgb.Conn, Window Window, Parent Window, X int16, Y
return buf
}
-// Request MapWindow
-// size: 8
+// MapWindowCookie is a cookie used only for MapWindow requests.
type MapWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for MapWindow
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(mapWindowRequest(c, Window), cookie)
return MapWindowCookie{cookie}
}
+// MapWindowChecked sends a checked request.
+// 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)
return MapWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook MapWindowCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for MapWindow
+// mapWindowRequest writes a MapWindow request to a byte slice.
func mapWindowRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -6900,30 +6904,35 @@ func mapWindowRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request MapSubwindows
-// size: 8
+// MapSubwindowsCookie is a cookie used only for MapSubwindows requests.
type MapSubwindowsCookie struct {
*xgb.Cookie
}
-// Write request to wire for MapSubwindows
+// MapSubwindows sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func MapSubwindows(c *xgb.Conn, Window Window) MapSubwindowsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(mapSubwindowsRequest(c, Window), cookie)
return MapSubwindowsCookie{cookie}
}
+// MapSubwindowsChecked sends a checked request.
+// 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)
return MapSubwindowsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook MapSubwindowsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for MapSubwindows
+// mapSubwindowsRequest writes a MapSubwindows request to a byte slice.
func mapSubwindowsRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -6943,30 +6952,35 @@ func mapSubwindowsRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request UnmapWindow
-// size: 8
+// UnmapWindowCookie is a cookie used only for UnmapWindow requests.
type UnmapWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for UnmapWindow
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(unmapWindowRequest(c, Window), cookie)
return UnmapWindowCookie{cookie}
}
+// UnmapWindowChecked sends a checked request.
+// 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)
return UnmapWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UnmapWindowCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UnmapWindow
+// unmapWindowRequest writes a UnmapWindow request to a byte slice.
func unmapWindowRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -6986,30 +7000,35 @@ func unmapWindowRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request UnmapSubwindows
-// size: 8
+// UnmapSubwindowsCookie is a cookie used only for UnmapSubwindows requests.
type UnmapSubwindowsCookie struct {
*xgb.Cookie
}
-// Write request to wire for UnmapSubwindows
+// UnmapSubwindows sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UnmapSubwindows(c *xgb.Conn, Window Window) UnmapSubwindowsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(unmapSubwindowsRequest(c, Window), cookie)
return UnmapSubwindowsCookie{cookie}
}
+// UnmapSubwindowsChecked sends a checked request.
+// 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)
return UnmapSubwindowsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UnmapSubwindowsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UnmapSubwindows
+// unmapSubwindowsRequest writes a UnmapSubwindows request to a byte slice.
func unmapSubwindowsRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -7029,30 +7048,35 @@ func unmapSubwindowsRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request ConfigureWindow
-// size: xgb.Pad((10 + (2 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// ConfigureWindowCookie is a cookie used only for ConfigureWindow requests.
type ConfigureWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for ConfigureWindow
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(configureWindowRequest(c, Window, ValueMask, ValueList), cookie)
return ConfigureWindowCookie{cookie}
}
+// ConfigureWindowChecked sends a checked request.
+// 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)
return ConfigureWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ConfigureWindowCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ConfigureWindow
+// configureWindowRequest writes a ConfigureWindow request to a byte slice.
func configureWindowRequest(c *xgb.Conn, Window Window, ValueMask uint16, ValueList []uint32) []byte {
size := xgb.Pad((10 + (2 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -7083,30 +7107,35 @@ func configureWindowRequest(c *xgb.Conn, Window Window, ValueMask uint16, ValueL
return buf
}
-// Request CirculateWindow
-// size: 8
+// CirculateWindowCookie is a cookie used only for CirculateWindow requests.
type CirculateWindowCookie struct {
*xgb.Cookie
}
-// Write request to wire for CirculateWindow
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(circulateWindowRequest(c, Direction, Window), cookie)
return CirculateWindowCookie{cookie}
}
+// CirculateWindowChecked sends a checked request.
+// 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)
return CirculateWindowCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CirculateWindowCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CirculateWindow
+// circulateWindowRequest writes a CirculateWindow request to a byte slice.
func circulateWindowRequest(c *xgb.Conn, Direction byte, Window Window) []byte {
size := 8
b := 0
@@ -7127,29 +7156,31 @@ func circulateWindowRequest(c *xgb.Conn, Direction byte, Window Window) []byte {
return buf
}
-// Request GetGeometry
-// size: 8
+// GetGeometryCookie is a cookie used only for GetGeometry requests.
type GetGeometryCookie struct {
*xgb.Cookie
}
+// GetGeometry sends a checked request.
+// 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)
return GetGeometryCookie{cookie}
}
+// GetGeometryUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetGeometryUnchecked(c *xgb.Conn, Drawable Drawable) GetGeometryCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getGeometryRequest(c, Drawable), cookie)
return GetGeometryCookie{cookie}
}
-// Request reply for GetGeometry
-// size: 24
+// GetGeometryReply represents the data returned from a GetGeometry request.
type GetGeometryReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Depth byte
Root Window
X int16
@@ -7160,7 +7191,7 @@ type GetGeometryReply struct {
// padding: 2 bytes
}
-// Waits and reads reply data from request GetGeometry
+// Reply blocks and returns the reply data for a GetGeometry request.
func (cook GetGeometryCookie) Reply() (*GetGeometryReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7172,7 +7203,7 @@ func (cook GetGeometryCookie) Reply() (*GetGeometryReply, error) {
return getGeometryReply(buf), nil
}
-// Read reply into structure from buffer for GetGeometry
+// getGeometryReply reads a byte slice into a GetGeometryReply value.
func getGeometryReply(buf []byte) *GetGeometryReply {
v := new(GetGeometryReply)
b := 1 // skip reply determinant
@@ -7210,6 +7241,7 @@ func getGeometryReply(buf []byte) *GetGeometryReply {
}
// Write request to wire for GetGeometry
+// getGeometryRequest writes a GetGeometry request to a byte slice.
func getGeometryRequest(c *xgb.Conn, Drawable Drawable) []byte {
size := 8
b := 0
@@ -7229,29 +7261,31 @@ func getGeometryRequest(c *xgb.Conn, Drawable Drawable) []byte {
return buf
}
-// Request QueryTree
-// size: 8
+// QueryTreeCookie is a cookie used only for QueryTree requests.
type QueryTreeCookie struct {
*xgb.Cookie
}
+// QueryTree sends a checked request.
+// 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)
return QueryTreeCookie{cookie}
}
+// QueryTreeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryTreeUnchecked(c *xgb.Conn, Window Window) QueryTreeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryTreeRequest(c, Window), cookie)
return QueryTreeCookie{cookie}
}
-// Request reply for QueryTree
-// size: (32 + xgb.Pad((int(ChildrenLen) * 4)))
+// QueryTreeReply represents the data returned from a QueryTree request.
type QueryTreeReply struct {
- Sequence uint16
- Length uint32
+ 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
@@ -7260,7 +7294,7 @@ type QueryTreeReply struct {
Children []Window // size: xgb.Pad((int(ChildrenLen) * 4))
}
-// Waits and reads reply data from request QueryTree
+// Reply blocks and returns the reply data for a QueryTree request.
func (cook QueryTreeCookie) Reply() (*QueryTreeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7272,7 +7306,7 @@ func (cook QueryTreeCookie) Reply() (*QueryTreeReply, error) {
return queryTreeReply(buf), nil
}
-// Read reply into structure from buffer for QueryTree
+// queryTreeReply reads a byte slice into a QueryTreeReply value.
func queryTreeReply(buf []byte) *QueryTreeReply {
v := new(QueryTreeReply)
b := 1 // skip reply determinant
@@ -7307,6 +7341,7 @@ func queryTreeReply(buf []byte) *QueryTreeReply {
}
// Write request to wire for QueryTree
+// queryTreeRequest writes a QueryTree request to a byte slice.
func queryTreeRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -7326,34 +7361,36 @@ func queryTreeRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request InternAtom
-// size: xgb.Pad((8 + xgb.Pad((int(NameLen) * 1))))
+// InternAtomCookie is a cookie used only for InternAtom requests.
type InternAtomCookie struct {
*xgb.Cookie
}
+// InternAtom sends a checked request.
+// 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)
return InternAtomCookie{cookie}
}
+// InternAtomUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func InternAtomUnchecked(c *xgb.Conn, OnlyIfExists bool, NameLen uint16, Name string) InternAtomCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(internAtomRequest(c, OnlyIfExists, NameLen, Name), cookie)
return InternAtomCookie{cookie}
}
-// Request reply for InternAtom
-// size: 12
+// InternAtomReply represents the data returned from a InternAtom request.
type InternAtomReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Atom Atom
}
-// Waits and reads reply data from request InternAtom
+// Reply blocks and returns the reply data for a InternAtom request.
func (cook InternAtomCookie) Reply() (*InternAtomReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7365,7 +7402,7 @@ func (cook InternAtomCookie) Reply() (*InternAtomReply, error) {
return internAtomReply(buf), nil
}
-// Read reply into structure from buffer for InternAtom
+// internAtomReply reads a byte slice into a InternAtomReply value.
func internAtomReply(buf []byte) *InternAtomReply {
v := new(InternAtomReply)
b := 1 // skip reply determinant
@@ -7385,6 +7422,7 @@ func internAtomReply(buf []byte) *InternAtomReply {
}
// Write request to wire for InternAtom
+// internAtomRequest writes a InternAtom request to a byte slice.
func internAtomRequest(c *xgb.Conn, OnlyIfExists bool, NameLen uint16, Name string) []byte {
size := xgb.Pad((8 + xgb.Pad((int(NameLen) * 1))))
b := 0
@@ -7414,36 +7452,38 @@ func internAtomRequest(c *xgb.Conn, OnlyIfExists bool, NameLen uint16, Name stri
return buf
}
-// Request GetAtomName
-// size: 8
+// GetAtomNameCookie is a cookie used only for GetAtomName requests.
type GetAtomNameCookie struct {
*xgb.Cookie
}
+// GetAtomName sends a checked request.
+// 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)
return GetAtomNameCookie{cookie}
}
+// GetAtomNameUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetAtomNameUnchecked(c *xgb.Conn, Atom Atom) GetAtomNameCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getAtomNameRequest(c, Atom), cookie)
return GetAtomNameCookie{cookie}
}
-// Request reply for GetAtomName
-// size: (32 + xgb.Pad((int(NameLen) * 1)))
+// GetAtomNameReply represents the data returned from a GetAtomName request.
type GetAtomNameReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NameLen uint16
// padding: 22 bytes
Name string // size: xgb.Pad((int(NameLen) * 1))
}
-// Waits and reads reply data from request GetAtomName
+// Reply blocks and returns the reply data for a GetAtomName request.
func (cook GetAtomNameCookie) Reply() (*GetAtomNameReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7455,7 +7495,7 @@ func (cook GetAtomNameCookie) Reply() (*GetAtomNameReply, error) {
return getAtomNameReply(buf), nil
}
-// Read reply into structure from buffer for GetAtomName
+// getAtomNameReply reads a byte slice into a GetAtomNameReply value.
func getAtomNameReply(buf []byte) *GetAtomNameReply {
v := new(GetAtomNameReply)
b := 1 // skip reply determinant
@@ -7484,6 +7524,7 @@ func getAtomNameReply(buf []byte) *GetAtomNameReply {
}
// Write request to wire for GetAtomName
+// getAtomNameRequest writes a GetAtomName request to a byte slice.
func getAtomNameRequest(c *xgb.Conn, Atom Atom) []byte {
size := 8
b := 0
@@ -7503,30 +7544,35 @@ func getAtomNameRequest(c *xgb.Conn, Atom Atom) []byte {
return buf
}
-// Request ChangeProperty
-// size: xgb.Pad((24 + xgb.Pad((((int(DataLen) * int(Format)) / 8) * 1))))
+// ChangePropertyCookie is a cookie used only for ChangeProperty requests.
type ChangePropertyCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeProperty
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(changePropertyRequest(c, Mode, Window, Property, Type, Format, DataLen, Data), cookie)
return ChangePropertyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((24 + xgb.Pad((((int(DataLen) * int(Format)) / 8) * 1))))
b := 0
@@ -7564,30 +7610,35 @@ func changePropertyRequest(c *xgb.Conn, Mode byte, Window Window, Property Atom,
return buf
}
-// Request DeleteProperty
-// size: 12
+// DeletePropertyCookie is a cookie used only for DeleteProperty requests.
type DeletePropertyCookie struct {
*xgb.Cookie
}
-// Write request to wire for DeleteProperty
+// DeleteProperty sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DeleteProperty(c *xgb.Conn, Window Window, Property Atom) DeletePropertyCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(deletePropertyRequest(c, Window, Property), cookie)
return DeletePropertyCookie{cookie}
}
+// DeletePropertyChecked sends a checked request.
+// 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)
return DeletePropertyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DeletePropertyCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DeleteProperty
+// deletePropertyRequest writes a DeleteProperty request to a byte slice.
func deletePropertyRequest(c *xgb.Conn, Window Window, Property Atom) []byte {
size := 12
b := 0
@@ -7610,29 +7661,31 @@ func deletePropertyRequest(c *xgb.Conn, Window Window, Property Atom) []byte {
return buf
}
-// Request GetProperty
-// size: 24
+// GetPropertyCookie is a cookie used only for GetProperty requests.
type GetPropertyCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getPropertyRequest(c, Delete, Window, Property, Type, LongOffset, LongLength), cookie)
return GetPropertyCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getPropertyRequest(c, Delete, Window, Property, Type, LongOffset, LongLength), cookie)
return GetPropertyCookie{cookie}
}
-// Request reply for GetProperty
-// size: (32 + xgb.Pad(((int(ValueLen) * (int(Format) / 8)) * 1)))
+// GetPropertyReply represents the data returned from a GetProperty request.
type GetPropertyReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Format byte
Type Atom
BytesAfter uint32
@@ -7641,7 +7694,7 @@ type GetPropertyReply struct {
Value []byte // size: xgb.Pad(((int(ValueLen) * (int(Format) / 8)) * 1))
}
-// Waits and reads reply data from request GetProperty
+// Reply blocks and returns the reply data for a GetProperty request.
func (cook GetPropertyCookie) Reply() (*GetPropertyReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7653,7 +7706,7 @@ func (cook GetPropertyCookie) Reply() (*GetPropertyReply, error) {
return getPropertyReply(buf), nil
}
-// Read reply into structure from buffer for GetProperty
+// getPropertyReply reads a byte slice into a GetPropertyReply value.
func getPropertyReply(buf []byte) *GetPropertyReply {
v := new(GetPropertyReply)
b := 1 // skip reply determinant
@@ -7686,6 +7739,7 @@ func getPropertyReply(buf []byte) *GetPropertyReply {
}
// 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 {
size := 24
b := 0
@@ -7722,36 +7776,38 @@ func getPropertyRequest(c *xgb.Conn, Delete bool, Window Window, Property Atom,
return buf
}
-// Request ListProperties
-// size: 8
+// ListPropertiesCookie is a cookie used only for ListProperties requests.
type ListPropertiesCookie struct {
*xgb.Cookie
}
+// ListProperties sends a checked request.
+// 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)
return ListPropertiesCookie{cookie}
}
+// ListPropertiesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListPropertiesUnchecked(c *xgb.Conn, Window Window) ListPropertiesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listPropertiesRequest(c, Window), cookie)
return ListPropertiesCookie{cookie}
}
-// Request reply for ListProperties
-// size: (32 + xgb.Pad((int(AtomsLen) * 4)))
+// ListPropertiesReply represents the data returned from a ListProperties request.
type ListPropertiesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
AtomsLen uint16
// padding: 22 bytes
Atoms []Atom // size: xgb.Pad((int(AtomsLen) * 4))
}
-// Waits and reads reply data from request ListProperties
+// Reply blocks and returns the reply data for a ListProperties request.
func (cook ListPropertiesCookie) Reply() (*ListPropertiesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7763,7 +7819,7 @@ func (cook ListPropertiesCookie) Reply() (*ListPropertiesReply, error) {
return listPropertiesReply(buf), nil
}
-// Read reply into structure from buffer for ListProperties
+// listPropertiesReply reads a byte slice into a ListPropertiesReply value.
func listPropertiesReply(buf []byte) *ListPropertiesReply {
v := new(ListPropertiesReply)
b := 1 // skip reply determinant
@@ -7792,6 +7848,7 @@ func listPropertiesReply(buf []byte) *ListPropertiesReply {
}
// Write request to wire for ListProperties
+// listPropertiesRequest writes a ListProperties request to a byte slice.
func listPropertiesRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -7811,30 +7868,35 @@ func listPropertiesRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request SetSelectionOwner
-// size: 16
+// SetSelectionOwnerCookie is a cookie used only for SetSelectionOwner requests.
type SetSelectionOwnerCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetSelectionOwner
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setSelectionOwnerRequest(c, Owner, Selection, Time), cookie)
return SetSelectionOwnerCookie{cookie}
}
+// SetSelectionOwnerChecked sends a checked request.
+// 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)
return SetSelectionOwnerCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetSelectionOwnerCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetSelectionOwner
+// setSelectionOwnerRequest writes a SetSelectionOwner request to a byte slice.
func setSelectionOwnerRequest(c *xgb.Conn, Owner Window, Selection Atom, Time Timestamp) []byte {
size := 16
b := 0
@@ -7860,34 +7922,36 @@ func setSelectionOwnerRequest(c *xgb.Conn, Owner Window, Selection Atom, Time Ti
return buf
}
-// Request GetSelectionOwner
-// size: 8
+// GetSelectionOwnerCookie is a cookie used only for GetSelectionOwner requests.
type GetSelectionOwnerCookie struct {
*xgb.Cookie
}
+// GetSelectionOwner sends a checked request.
+// 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)
return GetSelectionOwnerCookie{cookie}
}
+// GetSelectionOwnerUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetSelectionOwnerUnchecked(c *xgb.Conn, Selection Atom) GetSelectionOwnerCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getSelectionOwnerRequest(c, Selection), cookie)
return GetSelectionOwnerCookie{cookie}
}
-// Request reply for GetSelectionOwner
-// size: 12
+// GetSelectionOwnerReply represents the data returned from a GetSelectionOwner request.
type GetSelectionOwnerReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Owner Window
}
-// Waits and reads reply data from request GetSelectionOwner
+// Reply blocks and returns the reply data for a GetSelectionOwner request.
func (cook GetSelectionOwnerCookie) Reply() (*GetSelectionOwnerReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -7899,7 +7963,7 @@ func (cook GetSelectionOwnerCookie) Reply() (*GetSelectionOwnerReply, error) {
return getSelectionOwnerReply(buf), nil
}
-// Read reply into structure from buffer for GetSelectionOwner
+// getSelectionOwnerReply reads a byte slice into a GetSelectionOwnerReply value.
func getSelectionOwnerReply(buf []byte) *GetSelectionOwnerReply {
v := new(GetSelectionOwnerReply)
b := 1 // skip reply determinant
@@ -7919,6 +7983,7 @@ func getSelectionOwnerReply(buf []byte) *GetSelectionOwnerReply {
}
// Write request to wire for GetSelectionOwner
+// getSelectionOwnerRequest writes a GetSelectionOwner request to a byte slice.
func getSelectionOwnerRequest(c *xgb.Conn, Selection Atom) []byte {
size := 8
b := 0
@@ -7938,30 +8003,35 @@ func getSelectionOwnerRequest(c *xgb.Conn, Selection Atom) []byte {
return buf
}
-// Request ConvertSelection
-// size: 24
+// ConvertSelectionCookie is a cookie used only for ConvertSelection requests.
type ConvertSelectionCookie struct {
*xgb.Cookie
}
-// Write request to wire for ConvertSelection
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(convertSelectionRequest(c, Requestor, Selection, Target, Property, Time), cookie)
return ConvertSelectionCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 24
b := 0
@@ -7993,30 +8063,35 @@ func convertSelectionRequest(c *xgb.Conn, Requestor Window, Selection Atom, Targ
return buf
}
-// Request SendEvent
-// size: 44
+// SendEventCookie is a cookie used only for SendEvent requests.
type SendEventCookie struct {
*xgb.Cookie
}
-// Write request to wire for SendEvent
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(sendEventRequest(c, Propagate, Destination, EventMask, Event), cookie)
return SendEventCookie{cookie}
}
+// SendEventChecked sends a checked request.
+// 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)
return SendEventCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SendEventCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SendEvent
+// sendEventRequest writes a SendEvent request to a byte slice.
func sendEventRequest(c *xgb.Conn, Propagate bool, Destination Window, EventMask uint32, Event string) []byte {
size := 44
b := 0
@@ -8047,33 +8122,35 @@ func sendEventRequest(c *xgb.Conn, Propagate bool, Destination Window, EventMask
return buf
}
-// Request GrabPointer
-// size: 24
+// GrabPointerCookie is a cookie used only for GrabPointer requests.
type GrabPointerCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(grabPointerRequest(c, OwnerEvents, GrabWindow, EventMask, PointerMode, KeyboardMode, ConfineTo, Cursor, Time), cookie)
return GrabPointerCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(grabPointerRequest(c, OwnerEvents, GrabWindow, EventMask, PointerMode, KeyboardMode, ConfineTo, Cursor, Time), cookie)
return GrabPointerCookie{cookie}
}
-// Request reply for GrabPointer
-// size: 8
+// GrabPointerReply represents the data returned from a GrabPointer request.
type GrabPointerReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status byte
}
-// Waits and reads reply data from request GrabPointer
+// Reply blocks and returns the reply data for a GrabPointer request.
func (cook GrabPointerCookie) Reply() (*GrabPointerReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8085,7 +8162,7 @@ func (cook GrabPointerCookie) Reply() (*GrabPointerReply, error) {
return grabPointerReply(buf), nil
}
-// Read reply into structure from buffer for GrabPointer
+// grabPointerReply reads a byte slice into a GrabPointerReply value.
func grabPointerReply(buf []byte) *GrabPointerReply {
v := new(GrabPointerReply)
b := 1 // skip reply determinant
@@ -8103,6 +8180,7 @@ func grabPointerReply(buf []byte) *GrabPointerReply {
}
// 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 {
size := 24
b := 0
@@ -8145,30 +8223,35 @@ func grabPointerRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventM
return buf
}
-// Request UngrabPointer
-// size: 8
+// UngrabPointerCookie is a cookie used only for UngrabPointer requests.
type UngrabPointerCookie struct {
*xgb.Cookie
}
-// Write request to wire for UngrabPointer
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(ungrabPointerRequest(c, Time), cookie)
return UngrabPointerCookie{cookie}
}
+// UngrabPointerChecked sends a checked request.
+// 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)
return UngrabPointerCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UngrabPointerCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UngrabPointer
+// ungrabPointerRequest writes a UngrabPointer request to a byte slice.
func ungrabPointerRequest(c *xgb.Conn, Time Timestamp) []byte {
size := 8
b := 0
@@ -8188,30 +8271,35 @@ func ungrabPointerRequest(c *xgb.Conn, Time Timestamp) []byte {
return buf
}
-// Request GrabButton
-// size: 24
+// GrabButtonCookie is a cookie used only for GrabButton requests.
type GrabButtonCookie struct {
*xgb.Cookie
}
-// Write request to wire for GrabButton
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(grabButtonRequest(c, OwnerEvents, GrabWindow, EventMask, PointerMode, KeyboardMode, ConfineTo, Cursor, Button, Modifiers), cookie)
return GrabButtonCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 24
b := 0
@@ -8259,30 +8347,35 @@ func grabButtonRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, EventMa
return buf
}
-// Request UngrabButton
-// size: 12
+// UngrabButtonCookie is a cookie used only for UngrabButton requests.
type UngrabButtonCookie struct {
*xgb.Cookie
}
-// Write request to wire for UngrabButton
+// UngrabButton sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UngrabButton(c *xgb.Conn, Button byte, GrabWindow Window, Modifiers uint16) UngrabButtonCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(ungrabButtonRequest(c, Button, GrabWindow, Modifiers), cookie)
return UngrabButtonCookie{cookie}
}
+// UngrabButtonChecked sends a checked request.
+// 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)
return UngrabButtonCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UngrabButtonCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UngrabButton
+// ungrabButtonRequest writes a UngrabButton request to a byte slice.
func ungrabButtonRequest(c *xgb.Conn, Button byte, GrabWindow Window, Modifiers uint16) []byte {
size := 12
b := 0
@@ -8308,30 +8401,35 @@ func ungrabButtonRequest(c *xgb.Conn, Button byte, GrabWindow Window, Modifiers
return buf
}
-// Request ChangeActivePointerGrab
-// size: 16
+// ChangeActivePointerGrabCookie is a cookie used only for ChangeActivePointerGrab requests.
type ChangeActivePointerGrabCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeActivePointerGrab
+// ChangeActivePointerGrab sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangeActivePointerGrab(c *xgb.Conn, Cursor Cursor, Time Timestamp, EventMask uint16) ChangeActivePointerGrabCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(changeActivePointerGrabRequest(c, Cursor, Time, EventMask), cookie)
return ChangeActivePointerGrabCookie{cookie}
}
+// ChangeActivePointerGrabChecked sends a checked request.
+// 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)
return ChangeActivePointerGrabCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeActivePointerGrabCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeActivePointerGrab
+// changeActivePointerGrabRequest writes a ChangeActivePointerGrab request to a byte slice.
func changeActivePointerGrabRequest(c *xgb.Conn, Cursor Cursor, Time Timestamp, EventMask uint16) []byte {
size := 16
b := 0
@@ -8359,33 +8457,35 @@ func changeActivePointerGrabRequest(c *xgb.Conn, Cursor Cursor, Time Timestamp,
return buf
}
-// Request GrabKeyboard
-// size: 16
+// GrabKeyboardCookie is a cookie used only for GrabKeyboard requests.
type GrabKeyboardCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(grabKeyboardRequest(c, OwnerEvents, GrabWindow, Time, PointerMode, KeyboardMode), cookie)
return GrabKeyboardCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(grabKeyboardRequest(c, OwnerEvents, GrabWindow, Time, PointerMode, KeyboardMode), cookie)
return GrabKeyboardCookie{cookie}
}
-// Request reply for GrabKeyboard
-// size: 8
+// GrabKeyboardReply represents the data returned from a GrabKeyboard request.
type GrabKeyboardReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status byte
}
-// Waits and reads reply data from request GrabKeyboard
+// Reply blocks and returns the reply data for a GrabKeyboard request.
func (cook GrabKeyboardCookie) Reply() (*GrabKeyboardReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8397,7 +8497,7 @@ func (cook GrabKeyboardCookie) Reply() (*GrabKeyboardReply, error) {
return grabKeyboardReply(buf), nil
}
-// Read reply into structure from buffer for GrabKeyboard
+// grabKeyboardReply reads a byte slice into a GrabKeyboardReply value.
func grabKeyboardReply(buf []byte) *GrabKeyboardReply {
v := new(GrabKeyboardReply)
b := 1 // skip reply determinant
@@ -8415,6 +8515,7 @@ func grabKeyboardReply(buf []byte) *GrabKeyboardReply {
}
// 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 {
size := 16
b := 0
@@ -8450,30 +8551,35 @@ func grabKeyboardRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Time
return buf
}
-// Request UngrabKeyboard
-// size: 8
+// UngrabKeyboardCookie is a cookie used only for UngrabKeyboard requests.
type UngrabKeyboardCookie struct {
*xgb.Cookie
}
-// Write request to wire for UngrabKeyboard
+// UngrabKeyboard sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UngrabKeyboard(c *xgb.Conn, Time Timestamp) UngrabKeyboardCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(ungrabKeyboardRequest(c, Time), cookie)
return UngrabKeyboardCookie{cookie}
}
+// UngrabKeyboardChecked sends a checked request.
+// 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)
return UngrabKeyboardCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UngrabKeyboardCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UngrabKeyboard
+// ungrabKeyboardRequest writes a UngrabKeyboard request to a byte slice.
func ungrabKeyboardRequest(c *xgb.Conn, Time Timestamp) []byte {
size := 8
b := 0
@@ -8493,30 +8599,35 @@ func ungrabKeyboardRequest(c *xgb.Conn, Time Timestamp) []byte {
return buf
}
-// Request GrabKey
-// size: 16
+// GrabKeyCookie is a cookie used only for GrabKey requests.
type GrabKeyCookie struct {
*xgb.Cookie
}
-// Write request to wire for GrabKey
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(grabKeyRequest(c, OwnerEvents, GrabWindow, Modifiers, Key, PointerMode, KeyboardMode), cookie)
return GrabKeyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -8555,30 +8666,35 @@ func grabKeyRequest(c *xgb.Conn, OwnerEvents bool, GrabWindow Window, Modifiers
return buf
}
-// Request UngrabKey
-// size: 12
+// UngrabKeyCookie is a cookie used only for UngrabKey requests.
type UngrabKeyCookie struct {
*xgb.Cookie
}
-// Write request to wire for UngrabKey
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(ungrabKeyRequest(c, Key, GrabWindow, Modifiers), cookie)
return UngrabKeyCookie{cookie}
}
+// UngrabKeyChecked sends a checked request.
+// 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)
return UngrabKeyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UngrabKeyCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UngrabKey
+// ungrabKeyRequest writes a UngrabKey request to a byte slice.
func ungrabKeyRequest(c *xgb.Conn, Key Keycode, GrabWindow Window, Modifiers uint16) []byte {
size := 12
b := 0
@@ -8604,30 +8720,35 @@ func ungrabKeyRequest(c *xgb.Conn, Key Keycode, GrabWindow Window, Modifiers uin
return buf
}
-// Request AllowEvents
-// size: 8
+// AllowEventsCookie is a cookie used only for AllowEvents requests.
type AllowEventsCookie struct {
*xgb.Cookie
}
-// Write request to wire for AllowEvents
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(allowEventsRequest(c, Mode, Time), cookie)
return AllowEventsCookie{cookie}
}
+// AllowEventsChecked sends a checked request.
+// 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)
return AllowEventsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook AllowEventsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for AllowEvents
+// allowEventsRequest writes a AllowEvents request to a byte slice.
func allowEventsRequest(c *xgb.Conn, Mode byte, Time Timestamp) []byte {
size := 8
b := 0
@@ -8648,30 +8769,35 @@ func allowEventsRequest(c *xgb.Conn, Mode byte, Time Timestamp) []byte {
return buf
}
-// Request GrabServer
-// size: 4
+// GrabServerCookie is a cookie used only for GrabServer requests.
type GrabServerCookie struct {
*xgb.Cookie
}
-// Write request to wire for GrabServer
+// GrabServer sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GrabServer(c *xgb.Conn) GrabServerCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(grabServerRequest(c), cookie)
return GrabServerCookie{cookie}
}
+// GrabServerChecked sends a checked request.
+// 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)
return GrabServerCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook GrabServerCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for GrabServer
+// grabServerRequest writes a GrabServer request to a byte slice.
func grabServerRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -8687,30 +8813,35 @@ func grabServerRequest(c *xgb.Conn) []byte {
return buf
}
-// Request UngrabServer
-// size: 4
+// UngrabServerCookie is a cookie used only for UngrabServer requests.
type UngrabServerCookie struct {
*xgb.Cookie
}
-// Write request to wire for UngrabServer
+// UngrabServer sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UngrabServer(c *xgb.Conn) UngrabServerCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(ungrabServerRequest(c), cookie)
return UngrabServerCookie{cookie}
}
+// UngrabServerChecked sends a checked request.
+// 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)
return UngrabServerCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UngrabServerCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UngrabServer
+// ungrabServerRequest writes a UngrabServer request to a byte slice.
func ungrabServerRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -8726,29 +8857,31 @@ func ungrabServerRequest(c *xgb.Conn) []byte {
return buf
}
-// Request QueryPointer
-// size: 8
+// QueryPointerCookie is a cookie used only for QueryPointer requests.
type QueryPointerCookie struct {
*xgb.Cookie
}
+// QueryPointer sends a checked request.
+// 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)
return QueryPointerCookie{cookie}
}
+// QueryPointerUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryPointerUnchecked(c *xgb.Conn, Window Window) QueryPointerCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryPointerRequest(c, Window), cookie)
return QueryPointerCookie{cookie}
}
-// Request reply for QueryPointer
-// size: 28
+// QueryPointerReply represents the data returned from a QueryPointer request.
type QueryPointerReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
SameScreen bool
Root Window
Child Window
@@ -8760,7 +8893,7 @@ type QueryPointerReply struct {
// padding: 2 bytes
}
-// Waits and reads reply data from request QueryPointer
+// Reply blocks and returns the reply data for a QueryPointer request.
func (cook QueryPointerCookie) Reply() (*QueryPointerReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8772,7 +8905,7 @@ func (cook QueryPointerCookie) Reply() (*QueryPointerReply, error) {
return queryPointerReply(buf), nil
}
-// Read reply into structure from buffer for QueryPointer
+// queryPointerReply reads a byte slice into a QueryPointerReply value.
func queryPointerReply(buf []byte) *QueryPointerReply {
v := new(QueryPointerReply)
b := 1 // skip reply determinant
@@ -8817,6 +8950,7 @@ func queryPointerReply(buf []byte) *QueryPointerReply {
}
// Write request to wire for QueryPointer
+// queryPointerRequest writes a QueryPointer request to a byte slice.
func queryPointerRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -8836,36 +8970,38 @@ func queryPointerRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request GetMotionEvents
-// size: 16
+// GetMotionEventsCookie is a cookie used only for GetMotionEvents requests.
type GetMotionEventsCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getMotionEventsRequest(c, Window, Start, Stop), cookie)
return GetMotionEventsCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getMotionEventsRequest(c, Window, Start, Stop), cookie)
return GetMotionEventsCookie{cookie}
}
-// Request reply for GetMotionEvents
-// size: (32 + xgb.Pad((int(EventsLen) * 8)))
+// GetMotionEventsReply represents the data returned from a GetMotionEvents request.
type GetMotionEventsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
EventsLen uint32
// padding: 20 bytes
Events []Timecoord // size: xgb.Pad((int(EventsLen) * 8))
}
-// Waits and reads reply data from request GetMotionEvents
+// Reply blocks and returns the reply data for a GetMotionEvents request.
func (cook GetMotionEventsCookie) Reply() (*GetMotionEventsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8877,7 +9013,7 @@ func (cook GetMotionEventsCookie) Reply() (*GetMotionEventsReply, error) {
return getMotionEventsReply(buf), nil
}
-// Read reply into structure from buffer for GetMotionEvents
+// getMotionEventsReply reads a byte slice into a GetMotionEventsReply value.
func getMotionEventsReply(buf []byte) *GetMotionEventsReply {
v := new(GetMotionEventsReply)
b := 1 // skip reply determinant
@@ -8902,6 +9038,7 @@ func getMotionEventsReply(buf []byte) *GetMotionEventsReply {
}
// 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 {
size := 16
b := 0
@@ -8927,36 +9064,38 @@ func getMotionEventsRequest(c *xgb.Conn, Window Window, Start Timestamp, Stop Ti
return buf
}
-// Request TranslateCoordinates
-// size: 16
+// TranslateCoordinatesCookie is a cookie used only for TranslateCoordinates requests.
type TranslateCoordinatesCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(translateCoordinatesRequest(c, SrcWindow, DstWindow, SrcX, SrcY), cookie)
return TranslateCoordinatesCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(translateCoordinatesRequest(c, SrcWindow, DstWindow, SrcX, SrcY), cookie)
return TranslateCoordinatesCookie{cookie}
}
-// Request reply for TranslateCoordinates
-// size: 16
+// TranslateCoordinatesReply represents the data returned from a TranslateCoordinates request.
type TranslateCoordinatesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
SameScreen bool
Child Window
DstX int16
DstY int16
}
-// Waits and reads reply data from request TranslateCoordinates
+// Reply blocks and returns the reply data for a TranslateCoordinates request.
func (cook TranslateCoordinatesCookie) Reply() (*TranslateCoordinatesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -8968,7 +9107,7 @@ func (cook TranslateCoordinatesCookie) Reply() (*TranslateCoordinatesReply, erro
return translateCoordinatesReply(buf), nil
}
-// Read reply into structure from buffer for TranslateCoordinates
+// translateCoordinatesReply reads a byte slice into a TranslateCoordinatesReply value.
func translateCoordinatesReply(buf []byte) *TranslateCoordinatesReply {
v := new(TranslateCoordinatesReply)
b := 1 // skip reply determinant
@@ -8999,6 +9138,7 @@ func translateCoordinatesReply(buf []byte) *TranslateCoordinatesReply {
}
// 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 {
size := 16
b := 0
@@ -9027,30 +9167,35 @@ func translateCoordinatesRequest(c *xgb.Conn, SrcWindow Window, DstWindow Window
return buf
}
-// Request WarpPointer
-// size: 24
+// WarpPointerCookie is a cookie used only for WarpPointer requests.
type WarpPointerCookie struct {
*xgb.Cookie
}
-// Write request to wire for WarpPointer
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(warpPointerRequest(c, SrcWindow, DstWindow, SrcX, SrcY, SrcWidth, SrcHeight, DstX, DstY), cookie)
return WarpPointerCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 24
b := 0
@@ -9091,30 +9236,35 @@ func warpPointerRequest(c *xgb.Conn, SrcWindow Window, DstWindow Window, SrcX in
return buf
}
-// Request SetInputFocus
-// size: 12
+// SetInputFocusCookie is a cookie used only for SetInputFocus requests.
type SetInputFocusCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetInputFocus
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setInputFocusRequest(c, RevertTo, Focus, Time), cookie)
return SetInputFocusCookie{cookie}
}
+// SetInputFocusChecked sends a checked request.
+// 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)
return SetInputFocusCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetInputFocusCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetInputFocus
+// setInputFocusRequest writes a SetInputFocus request to a byte slice.
func setInputFocusRequest(c *xgb.Conn, RevertTo byte, Focus Window, Time Timestamp) []byte {
size := 12
b := 0
@@ -9138,34 +9288,36 @@ func setInputFocusRequest(c *xgb.Conn, RevertTo byte, Focus Window, Time Timesta
return buf
}
-// Request GetInputFocus
-// size: 4
+// GetInputFocusCookie is a cookie used only for GetInputFocus requests.
type GetInputFocusCookie struct {
*xgb.Cookie
}
+// GetInputFocus sends a checked request.
+// 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)
return GetInputFocusCookie{cookie}
}
+// GetInputFocusUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetInputFocusUnchecked(c *xgb.Conn) GetInputFocusCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getInputFocusRequest(c), cookie)
return GetInputFocusCookie{cookie}
}
-// Request reply for GetInputFocus
-// size: 12
+// GetInputFocusReply represents the data returned from a GetInputFocus request.
type GetInputFocusReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
RevertTo byte
Focus Window
}
-// Waits and reads reply data from request GetInputFocus
+// Reply blocks and returns the reply data for a GetInputFocus request.
func (cook GetInputFocusCookie) Reply() (*GetInputFocusReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -9177,7 +9329,7 @@ func (cook GetInputFocusCookie) Reply() (*GetInputFocusReply, error) {
return getInputFocusReply(buf), nil
}
-// Read reply into structure from buffer for GetInputFocus
+// getInputFocusReply reads a byte slice into a GetInputFocusReply value.
func getInputFocusReply(buf []byte) *GetInputFocusReply {
v := new(GetInputFocusReply)
b := 1 // skip reply determinant
@@ -9198,6 +9350,7 @@ func getInputFocusReply(buf []byte) *GetInputFocusReply {
}
// Write request to wire for GetInputFocus
+// getInputFocusRequest writes a GetInputFocus request to a byte slice.
func getInputFocusRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -9213,34 +9366,36 @@ func getInputFocusRequest(c *xgb.Conn) []byte {
return buf
}
-// Request QueryKeymap
-// size: 4
+// QueryKeymapCookie is a cookie used only for QueryKeymap requests.
type QueryKeymapCookie struct {
*xgb.Cookie
}
+// QueryKeymap sends a checked request.
+// 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)
return QueryKeymapCookie{cookie}
}
+// QueryKeymapUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryKeymapUnchecked(c *xgb.Conn) QueryKeymapCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryKeymapRequest(c), cookie)
return QueryKeymapCookie{cookie}
}
-// Request reply for QueryKeymap
-// size: 40
+// QueryKeymapReply represents the data returned from a QueryKeymap request.
type QueryKeymapReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Keys []byte // size: 32
}
-// Waits and reads reply data from request QueryKeymap
+// Reply blocks and returns the reply data for a QueryKeymap request.
func (cook QueryKeymapCookie) Reply() (*QueryKeymapReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -9252,7 +9407,7 @@ func (cook QueryKeymapCookie) Reply() (*QueryKeymapReply, error) {
return queryKeymapReply(buf), nil
}
-// Read reply into structure from buffer for QueryKeymap
+// queryKeymapReply reads a byte slice into a QueryKeymapReply value.
func queryKeymapReply(buf []byte) *QueryKeymapReply {
v := new(QueryKeymapReply)
b := 1 // skip reply determinant
@@ -9273,6 +9428,7 @@ func queryKeymapReply(buf []byte) *QueryKeymapReply {
}
// Write request to wire for QueryKeymap
+// queryKeymapRequest writes a QueryKeymap request to a byte slice.
func queryKeymapRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -9288,30 +9444,35 @@ func queryKeymapRequest(c *xgb.Conn) []byte {
return buf
}
-// Request OpenFont
-// size: xgb.Pad((12 + xgb.Pad((int(NameLen) * 1))))
+// OpenFontCookie is a cookie used only for OpenFont requests.
type OpenFontCookie struct {
*xgb.Cookie
}
-// Write request to wire for OpenFont
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(openFontRequest(c, Fid, NameLen, Name), cookie)
return OpenFontCookie{cookie}
}
+// OpenFontChecked sends a checked request.
+// 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)
return OpenFontCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook OpenFontCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for OpenFont
+// openFontRequest writes a OpenFont request to a byte slice.
func openFontRequest(c *xgb.Conn, Fid Font, NameLen uint16, Name string) []byte {
size := xgb.Pad((12 + xgb.Pad((int(NameLen) * 1))))
b := 0
@@ -9339,30 +9500,35 @@ func openFontRequest(c *xgb.Conn, Fid Font, NameLen uint16, Name string) []byte
return buf
}
-// Request CloseFont
-// size: 8
+// CloseFontCookie is a cookie used only for CloseFont requests.
type CloseFontCookie struct {
*xgb.Cookie
}
-// Write request to wire for CloseFont
+// CloseFont sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CloseFont(c *xgb.Conn, Font Font) CloseFontCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(closeFontRequest(c, Font), cookie)
return CloseFontCookie{cookie}
}
+// CloseFontChecked sends a checked request.
+// 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)
return CloseFontCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CloseFontCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CloseFont
+// closeFontRequest writes a CloseFont request to a byte slice.
func closeFontRequest(c *xgb.Conn, Font Font) []byte {
size := 8
b := 0
@@ -9382,29 +9548,31 @@ func closeFontRequest(c *xgb.Conn, Font Font) []byte {
return buf
}
-// Request QueryFont
-// size: 8
+// QueryFontCookie is a cookie used only for QueryFont requests.
type QueryFontCookie struct {
*xgb.Cookie
}
+// QueryFont sends a checked request.
+// 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)
return QueryFontCookie{cookie}
}
+// QueryFontUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryFontUnchecked(c *xgb.Conn, Font Fontable) QueryFontCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryFontRequest(c, Font), cookie)
return QueryFontCookie{cookie}
}
-// Request reply for QueryFont
-// size: ((60 + xgb.Pad((int(PropertiesLen) * 8))) + xgb.Pad((int(CharInfosLen) * 12)))
+// QueryFontReply represents the data returned from a QueryFont request.
type QueryFontReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
MinBounds Charinfo
// padding: 4 bytes
@@ -9425,7 +9593,7 @@ type QueryFontReply struct {
CharInfos []Charinfo // size: xgb.Pad((int(CharInfosLen) * 12))
}
-// Waits and reads reply data from request QueryFont
+// Reply blocks and returns the reply data for a QueryFont request.
func (cook QueryFontCookie) Reply() (*QueryFontReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -9437,7 +9605,7 @@ func (cook QueryFontCookie) Reply() (*QueryFontReply, error) {
return queryFontReply(buf), nil
}
-// Read reply into structure from buffer for QueryFont
+// queryFontReply reads a byte slice into a QueryFontReply value.
func queryFontReply(buf []byte) *QueryFontReply {
v := new(QueryFontReply)
b := 1 // skip reply determinant
@@ -9507,6 +9675,7 @@ func queryFontReply(buf []byte) *QueryFontReply {
}
// Write request to wire for QueryFont
+// queryFontRequest writes a QueryFont request to a byte slice.
func queryFontRequest(c *xgb.Conn, Font Fontable) []byte {
size := 8
b := 0
@@ -9526,29 +9695,31 @@ func queryFontRequest(c *xgb.Conn, Font Fontable) []byte {
return buf
}
-// Request QueryTextExtents
-// size: xgb.Pad((8 + xgb.Pad((len(String) * 2))))
+// QueryTextExtentsCookie is a cookie used only for QueryTextExtents requests.
type QueryTextExtentsCookie struct {
*xgb.Cookie
}
+// QueryTextExtents sends a checked request.
+// 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)
return QueryTextExtentsCookie{cookie}
}
+// QueryTextExtentsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryTextExtentsUnchecked(c *xgb.Conn, Font Fontable, String []Char2b, StringLen uint16) QueryTextExtentsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryTextExtentsRequest(c, Font, String, StringLen), cookie)
return QueryTextExtentsCookie{cookie}
}
-// Request reply for QueryTextExtents
-// size: 28
+// QueryTextExtentsReply represents the data returned from a QueryTextExtents request.
type QueryTextExtentsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
DrawDirection byte
FontAscent int16
FontDescent int16
@@ -9559,7 +9730,7 @@ type QueryTextExtentsReply struct {
OverallRight int32
}
-// Waits and reads reply data from request QueryTextExtents
+// Reply blocks and returns the reply data for a QueryTextExtents request.
func (cook QueryTextExtentsCookie) Reply() (*QueryTextExtentsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -9571,7 +9742,7 @@ func (cook QueryTextExtentsCookie) Reply() (*QueryTextExtentsReply, error) {
return queryTextExtentsReply(buf), nil
}
-// Read reply into structure from buffer for QueryTextExtents
+// queryTextExtentsReply reads a byte slice into a QueryTextExtentsReply value.
func queryTextExtentsReply(buf []byte) *QueryTextExtentsReply {
v := new(QueryTextExtentsReply)
b := 1 // skip reply determinant
@@ -9610,6 +9781,7 @@ func queryTextExtentsReply(buf []byte) *QueryTextExtentsReply {
}
// Write request to wire for QueryTextExtents
+// queryTextExtentsRequest writes a QueryTextExtents request to a byte slice.
func queryTextExtentsRequest(c *xgb.Conn, Font Fontable, String []Char2b, StringLen uint16) []byte {
size := xgb.Pad((8 + xgb.Pad((len(String) * 2))))
b := 0
@@ -9634,36 +9806,38 @@ func queryTextExtentsRequest(c *xgb.Conn, Font Fontable, String []Char2b, String
return buf
}
-// Request ListFonts
-// size: xgb.Pad((8 + xgb.Pad((int(PatternLen) * 1))))
+// ListFontsCookie is a cookie used only for ListFonts requests.
type ListFontsCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(listFontsRequest(c, MaxNames, PatternLen, Pattern), cookie)
return ListFontsCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(listFontsRequest(c, MaxNames, PatternLen, Pattern), cookie)
return ListFontsCookie{cookie}
}
-// Request reply for ListFonts
-// size: (32 + StrListSize(Names))
+// ListFontsReply represents the data returned from a ListFonts request.
type ListFontsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NamesLen uint16
// padding: 22 bytes
Names []Str // size: StrListSize(Names)
}
-// Waits and reads reply data from request ListFonts
+// Reply blocks and returns the reply data for a ListFonts request.
func (cook ListFontsCookie) Reply() (*ListFontsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -9675,7 +9849,7 @@ func (cook ListFontsCookie) Reply() (*ListFontsReply, error) {
return listFontsReply(buf), nil
}
-// Read reply into structure from buffer for ListFonts
+// listFontsReply reads a byte slice into a ListFontsReply value.
func listFontsReply(buf []byte) *ListFontsReply {
v := new(ListFontsReply)
b := 1 // skip reply determinant
@@ -9700,6 +9874,7 @@ func listFontsReply(buf []byte) *ListFontsReply {
}
// 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 {
size := xgb.Pad((8 + xgb.Pad((int(PatternLen) * 1))))
b := 0
@@ -9725,29 +9900,31 @@ func listFontsRequest(c *xgb.Conn, MaxNames uint16, PatternLen uint16, Pattern s
return buf
}
-// Request ListFontsWithInfo
-// size: xgb.Pad((8 + xgb.Pad((int(PatternLen) * 1))))
+// ListFontsWithInfoCookie is a cookie used only for ListFontsWithInfo requests.
type ListFontsWithInfoCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(listFontsWithInfoRequest(c, MaxNames, PatternLen, Pattern), cookie)
return ListFontsWithInfoCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(listFontsWithInfoRequest(c, MaxNames, PatternLen, Pattern), cookie)
return ListFontsWithInfoCookie{cookie}
}
-// Request reply for ListFontsWithInfo
-// size: ((60 + xgb.Pad((int(PropertiesLen) * 8))) + xgb.Pad((int(NameLen) * 1)))
+// ListFontsWithInfoReply represents the data returned from a ListFontsWithInfo request.
type ListFontsWithInfoReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
NameLen byte
MinBounds Charinfo
// padding: 4 bytes
@@ -9768,7 +9945,7 @@ type ListFontsWithInfoReply struct {
Name string // size: xgb.Pad((int(NameLen) * 1))
}
-// Waits and reads reply data from request ListFontsWithInfo
+// Reply blocks and returns the reply data for a ListFontsWithInfo request.
func (cook ListFontsWithInfoCookie) Reply() (*ListFontsWithInfoReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -9780,7 +9957,7 @@ func (cook ListFontsWithInfoCookie) Reply() (*ListFontsWithInfoReply, error) {
return listFontsWithInfoReply(buf), nil
}
-// Read reply into structure from buffer for ListFontsWithInfo
+// listFontsWithInfoReply reads a byte slice into a ListFontsWithInfoReply value.
func listFontsWithInfoReply(buf []byte) *ListFontsWithInfoReply {
v := new(ListFontsWithInfoReply)
b := 1 // skip reply determinant
@@ -9855,6 +10032,7 @@ func listFontsWithInfoReply(buf []byte) *ListFontsWithInfoReply {
}
// 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 {
size := xgb.Pad((8 + xgb.Pad((int(PatternLen) * 1))))
b := 0
@@ -9880,30 +10058,35 @@ func listFontsWithInfoRequest(c *xgb.Conn, MaxNames uint16, PatternLen uint16, P
return buf
}
-// Request SetFontPath
-// size: xgb.Pad((8 + StrListSize(Font)))
+// SetFontPathCookie is a cookie used only for SetFontPath requests.
type SetFontPathCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetFontPath
+// SetFontPath sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetFontPath(c *xgb.Conn, FontQty uint16, Font []Str) SetFontPathCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setFontPathRequest(c, FontQty, Font), cookie)
return SetFontPathCookie{cookie}
}
+// SetFontPathChecked sends a checked request.
+// 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)
return SetFontPathCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetFontPathCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetFontPath
+// setFontPathRequest writes a SetFontPath request to a byte slice.
func setFontPathRequest(c *xgb.Conn, FontQty uint16, Font []Str) []byte {
size := xgb.Pad((8 + StrListSize(Font)))
b := 0
@@ -9927,36 +10110,38 @@ func setFontPathRequest(c *xgb.Conn, FontQty uint16, Font []Str) []byte {
return buf
}
-// Request GetFontPath
-// size: 4
+// GetFontPathCookie is a cookie used only for GetFontPath requests.
type GetFontPathCookie struct {
*xgb.Cookie
}
+// GetFontPath sends a checked request.
+// 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)
return GetFontPathCookie{cookie}
}
+// GetFontPathUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetFontPathUnchecked(c *xgb.Conn) GetFontPathCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getFontPathRequest(c), cookie)
return GetFontPathCookie{cookie}
}
-// Request reply for GetFontPath
-// size: (32 + StrListSize(Path))
+// GetFontPathReply represents the data returned from a GetFontPath request.
type GetFontPathReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
PathLen uint16
// padding: 22 bytes
Path []Str // size: StrListSize(Path)
}
-// Waits and reads reply data from request GetFontPath
+// Reply blocks and returns the reply data for a GetFontPath request.
func (cook GetFontPathCookie) Reply() (*GetFontPathReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -9968,7 +10153,7 @@ func (cook GetFontPathCookie) Reply() (*GetFontPathReply, error) {
return getFontPathReply(buf), nil
}
-// Read reply into structure from buffer for GetFontPath
+// getFontPathReply reads a byte slice into a GetFontPathReply value.
func getFontPathReply(buf []byte) *GetFontPathReply {
v := new(GetFontPathReply)
b := 1 // skip reply determinant
@@ -9993,6 +10178,7 @@ func getFontPathReply(buf []byte) *GetFontPathReply {
}
// Write request to wire for GetFontPath
+// getFontPathRequest writes a GetFontPath request to a byte slice.
func getFontPathRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -10008,30 +10194,35 @@ func getFontPathRequest(c *xgb.Conn) []byte {
return buf
}
-// Request CreatePixmap
-// size: 16
+// CreatePixmapCookie is a cookie used only for CreatePixmap requests.
type CreatePixmapCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreatePixmap
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createPixmapRequest(c, Depth, Pid, Drawable, Width, Height), cookie)
return CreatePixmapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -10061,30 +10252,35 @@ func createPixmapRequest(c *xgb.Conn, Depth byte, Pid Pixmap, Drawable Drawable,
return buf
}
-// Request FreePixmap
-// size: 8
+// FreePixmapCookie is a cookie used only for FreePixmap requests.
type FreePixmapCookie struct {
*xgb.Cookie
}
-// Write request to wire for FreePixmap
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(freePixmapRequest(c, Pixmap), cookie)
return FreePixmapCookie{cookie}
}
+// FreePixmapChecked sends a checked request.
+// 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)
return FreePixmapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FreePixmapCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for FreePixmap
+// freePixmapRequest writes a FreePixmap request to a byte slice.
func freePixmapRequest(c *xgb.Conn, Pixmap Pixmap) []byte {
size := 8
b := 0
@@ -10104,30 +10300,35 @@ func freePixmapRequest(c *xgb.Conn, Pixmap Pixmap) []byte {
return buf
}
-// Request CreateGC
-// size: xgb.Pad((12 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// CreateGCCookie is a cookie used only for CreateGC requests.
type CreateGCCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateGC
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(createGCRequest(c, Cid, Drawable, ValueMask, ValueList), cookie)
return CreateGCCookie{cookie}
}
+// CreateGCChecked sends a checked request.
+// 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)
return CreateGCCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateGCCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateGC
+// createGCRequest writes a CreateGC request to a byte slice.
func createGCRequest(c *xgb.Conn, Cid Gcontext, Drawable Drawable, ValueMask uint32, ValueList []uint32) []byte {
size := xgb.Pad((12 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -10158,30 +10359,35 @@ func createGCRequest(c *xgb.Conn, Cid Gcontext, Drawable Drawable, ValueMask uin
return buf
}
-// Request ChangeGC
-// size: xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// ChangeGCCookie is a cookie used only for ChangeGC requests.
type ChangeGCCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeGC
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(changeGCRequest(c, Gc, ValueMask, ValueList), cookie)
return ChangeGCCookie{cookie}
}
+// ChangeGCChecked sends a checked request.
+// 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)
return ChangeGCCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeGCCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeGC
+// changeGCRequest writes a ChangeGC request to a byte slice.
func changeGCRequest(c *xgb.Conn, Gc Gcontext, ValueMask uint32, ValueList []uint32) []byte {
size := xgb.Pad((8 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -10209,30 +10415,35 @@ func changeGCRequest(c *xgb.Conn, Gc Gcontext, ValueMask uint32, ValueList []uin
return buf
}
-// Request CopyGC
-// size: 16
+// CopyGCCookie is a cookie used only for CopyGC requests.
type CopyGCCookie struct {
*xgb.Cookie
}
-// Write request to wire for CopyGC
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(copyGCRequest(c, SrcGc, DstGc, ValueMask), cookie)
return CopyGCCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -10258,30 +10469,35 @@ func copyGCRequest(c *xgb.Conn, SrcGc Gcontext, DstGc Gcontext, ValueMask uint32
return buf
}
-// Request SetDashes
-// size: xgb.Pad((12 + xgb.Pad((int(DashesLen) * 1))))
+// SetDashesCookie is a cookie used only for SetDashes requests.
type SetDashesCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetDashes
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setDashesRequest(c, Gc, DashOffset, DashesLen, Dashes), cookie)
return SetDashesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((12 + xgb.Pad((int(DashesLen) * 1))))
b := 0
@@ -10310,30 +10526,35 @@ func setDashesRequest(c *xgb.Conn, Gc Gcontext, DashOffset uint16, DashesLen uin
return buf
}
-// Request SetClipRectangles
-// size: xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8))))
+// SetClipRectanglesCookie is a cookie used only for SetClipRectangles requests.
type SetClipRectanglesCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetClipRectangles
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setClipRectanglesRequest(c, Ordering, Gc, ClipXOrigin, ClipYOrigin, Rectangles), cookie)
return SetClipRectanglesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8))))
b := 0
@@ -10362,30 +10583,35 @@ func setClipRectanglesRequest(c *xgb.Conn, Ordering byte, Gc Gcontext, ClipXOrig
return buf
}
-// Request FreeGC
-// size: 8
+// FreeGCCookie is a cookie used only for FreeGC requests.
type FreeGCCookie struct {
*xgb.Cookie
}
-// Write request to wire for FreeGC
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(freeGCRequest(c, Gc), cookie)
return FreeGCCookie{cookie}
}
+// FreeGCChecked sends a checked request.
+// 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)
return FreeGCCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FreeGCCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for FreeGC
+// freeGCRequest writes a FreeGC request to a byte slice.
func freeGCRequest(c *xgb.Conn, Gc Gcontext) []byte {
size := 8
b := 0
@@ -10405,30 +10631,35 @@ func freeGCRequest(c *xgb.Conn, Gc Gcontext) []byte {
return buf
}
-// Request ClearArea
-// size: 16
+// ClearAreaCookie is a cookie used only for ClearArea requests.
type ClearAreaCookie struct {
*xgb.Cookie
}
-// Write request to wire for ClearArea
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(clearAreaRequest(c, Exposures, Window, X, Y, Width, Height), cookie)
return ClearAreaCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 16
b := 0
@@ -10465,30 +10696,35 @@ func clearAreaRequest(c *xgb.Conn, Exposures bool, Window Window, X int16, Y int
return buf
}
-// Request CopyArea
-// size: 28
+// CopyAreaCookie is a cookie used only for CopyArea requests.
type CopyAreaCookie struct {
*xgb.Cookie
}
-// Write request to wire for CopyArea
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(copyAreaRequest(c, SrcDrawable, DstDrawable, Gc, SrcX, SrcY, DstX, DstY, Width, Height), cookie)
return CopyAreaCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 28
b := 0
@@ -10532,30 +10768,35 @@ func copyAreaRequest(c *xgb.Conn, SrcDrawable Drawable, DstDrawable Drawable, Gc
return buf
}
-// Request CopyPlane
-// size: 32
+// CopyPlaneCookie is a cookie used only for CopyPlane requests.
type CopyPlaneCookie struct {
*xgb.Cookie
}
-// Write request to wire for CopyPlane
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(copyPlaneRequest(c, SrcDrawable, DstDrawable, Gc, SrcX, SrcY, DstX, DstY, Width, Height, BitPlane), cookie)
return CopyPlaneCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 32
b := 0
@@ -10602,30 +10843,35 @@ func copyPlaneRequest(c *xgb.Conn, SrcDrawable Drawable, DstDrawable Drawable, G
return buf
}
-// Request PolyPoint
-// size: xgb.Pad((12 + xgb.Pad((len(Points) * 4))))
+// PolyPointCookie is a cookie used only for PolyPoint requests.
type PolyPointCookie struct {
*xgb.Cookie
}
-// Write request to wire for PolyPoint
+// PolyPoint sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PolyPoint(c *xgb.Conn, CoordinateMode byte, Drawable Drawable, Gc Gcontext, Points []Point) PolyPointCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(polyPointRequest(c, CoordinateMode, Drawable, Gc, Points), cookie)
return PolyPointCookie{cookie}
}
+// PolyPointChecked sends a checked request.
+// 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)
return PolyPointCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PolyPointCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PolyPoint
+// polyPointRequest writes a PolyPoint request to a byte slice.
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
@@ -10651,30 +10897,35 @@ func polyPointRequest(c *xgb.Conn, CoordinateMode byte, Drawable Drawable, Gc Gc
return buf
}
-// Request PolyLine
-// size: xgb.Pad((12 + xgb.Pad((len(Points) * 4))))
+// PolyLineCookie is a cookie used only for PolyLine requests.
type PolyLineCookie struct {
*xgb.Cookie
}
-// Write request to wire for PolyLine
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(polyLineRequest(c, CoordinateMode, Drawable, Gc, Points), cookie)
return PolyLineCookie{cookie}
}
+// PolyLineChecked sends a checked request.
+// 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)
return PolyLineCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PolyLineCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PolyLine
+// polyLineRequest writes a PolyLine request to a byte slice.
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
@@ -10700,30 +10951,35 @@ func polyLineRequest(c *xgb.Conn, CoordinateMode byte, Drawable Drawable, Gc Gco
return buf
}
-// Request PolySegment
-// size: xgb.Pad((12 + xgb.Pad((len(Segments) * 8))))
+// PolySegmentCookie is a cookie used only for PolySegment requests.
type PolySegmentCookie struct {
*xgb.Cookie
}
-// Write request to wire for PolySegment
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(polySegmentRequest(c, Drawable, Gc, Segments), cookie)
return PolySegmentCookie{cookie}
}
+// PolySegmentChecked sends a checked request.
+// 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)
return PolySegmentCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PolySegmentCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PolySegment
+// polySegmentRequest writes a PolySegment request to a byte slice.
func polySegmentRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Segments []Segment) []byte {
size := xgb.Pad((12 + xgb.Pad((len(Segments) * 8))))
b := 0
@@ -10748,30 +11004,35 @@ func polySegmentRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Segments []
return buf
}
-// Request PolyRectangle
-// size: xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8))))
+// PolyRectangleCookie is a cookie used only for PolyRectangle requests.
type PolyRectangleCookie struct {
*xgb.Cookie
}
-// Write request to wire for PolyRectangle
+// PolyRectangle sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PolyRectangle(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangles []Rectangle) PolyRectangleCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(polyRectangleRequest(c, Drawable, Gc, Rectangles), cookie)
return PolyRectangleCookie{cookie}
}
+// PolyRectangleChecked sends a checked request.
+// 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)
return PolyRectangleCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PolyRectangleCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PolyRectangle
+// polyRectangleRequest writes a PolyRectangle request to a byte slice.
func polyRectangleRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangles []Rectangle) []byte {
size := xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8))))
b := 0
@@ -10796,30 +11057,35 @@ func polyRectangleRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangle
return buf
}
-// Request PolyArc
-// size: xgb.Pad((12 + xgb.Pad((len(Arcs) * 12))))
+// PolyArcCookie is a cookie used only for PolyArc requests.
type PolyArcCookie struct {
*xgb.Cookie
}
-// Write request to wire for PolyArc
+// PolyArc sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PolyArc(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) PolyArcCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(polyArcRequest(c, Drawable, Gc, Arcs), cookie)
return PolyArcCookie{cookie}
}
+// PolyArcChecked sends a checked request.
+// 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)
return PolyArcCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PolyArcCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PolyArc
+// polyArcRequest writes a PolyArc request to a byte slice.
func polyArcRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) []byte {
size := xgb.Pad((12 + xgb.Pad((len(Arcs) * 12))))
b := 0
@@ -10844,30 +11110,35 @@ func polyArcRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) []b
return buf
}
-// Request FillPoly
-// size: xgb.Pad((16 + xgb.Pad((len(Points) * 4))))
+// FillPolyCookie is a cookie used only for FillPoly requests.
type FillPolyCookie struct {
*xgb.Cookie
}
-// Write request to wire for FillPoly
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(fillPolyRequest(c, Drawable, Gc, Shape, CoordinateMode, Points), cookie)
return FillPolyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((16 + xgb.Pad((len(Points) * 4))))
b := 0
@@ -10900,30 +11171,35 @@ func fillPolyRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Shape byte, Co
return buf
}
-// Request PolyFillRectangle
-// size: xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8))))
+// PolyFillRectangleCookie is a cookie used only for PolyFillRectangle requests.
type PolyFillRectangleCookie struct {
*xgb.Cookie
}
-// Write request to wire for PolyFillRectangle
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(polyFillRectangleRequest(c, Drawable, Gc, Rectangles), cookie)
return PolyFillRectangleCookie{cookie}
}
+// PolyFillRectangleChecked sends a checked request.
+// 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)
return PolyFillRectangleCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PolyFillRectangleCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PolyFillRectangle
+// polyFillRectangleRequest writes a PolyFillRectangle request to a byte slice.
func polyFillRectangleRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Rectangles []Rectangle) []byte {
size := xgb.Pad((12 + xgb.Pad((len(Rectangles) * 8))))
b := 0
@@ -10948,30 +11224,35 @@ func polyFillRectangleRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Recta
return buf
}
-// Request PolyFillArc
-// size: xgb.Pad((12 + xgb.Pad((len(Arcs) * 12))))
+// PolyFillArcCookie is a cookie used only for PolyFillArc requests.
type PolyFillArcCookie struct {
*xgb.Cookie
}
-// Write request to wire for PolyFillArc
+// PolyFillArc sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func PolyFillArc(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) PolyFillArcCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(polyFillArcRequest(c, Drawable, Gc, Arcs), cookie)
return PolyFillArcCookie{cookie}
}
+// PolyFillArcChecked sends a checked request.
+// 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)
return PolyFillArcCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook PolyFillArcCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for PolyFillArc
+// polyFillArcRequest writes a PolyFillArc request to a byte slice.
func polyFillArcRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc) []byte {
size := xgb.Pad((12 + xgb.Pad((len(Arcs) * 12))))
b := 0
@@ -10996,30 +11277,35 @@ func polyFillArcRequest(c *xgb.Conn, Drawable Drawable, Gc Gcontext, Arcs []Arc)
return buf
}
-// Request PutImage
-// size: xgb.Pad((24 + xgb.Pad((len(Data) * 1))))
+// PutImageCookie is a cookie used only for PutImage requests.
type PutImageCookie struct {
*xgb.Cookie
}
-// Write request to wire for PutImage
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(putImageRequest(c, Format, Drawable, Gc, Width, Height, DstX, DstY, LeftPad, Depth, Data), cookie)
return PutImageCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((24 + xgb.Pad((len(Data) * 1))))
b := 0
@@ -11066,36 +11352,38 @@ func putImageRequest(c *xgb.Conn, Format byte, Drawable Drawable, Gc Gcontext, W
return buf
}
-// Request GetImage
-// size: 20
+// GetImageCookie is a cookie used only for GetImage requests.
type GetImageCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getImageRequest(c, Format, Drawable, X, Y, Width, Height, PlaneMask), cookie)
return GetImageCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(getImageRequest(c, Format, Drawable, X, Y, Width, Height, PlaneMask), cookie)
return GetImageCookie{cookie}
}
-// Request reply for GetImage
-// size: (32 + xgb.Pad(((int(Length) * 4) * 1)))
+// GetImageReply represents the data returned from a GetImage request.
type GetImageReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Depth byte
Visual Visualid
// padding: 20 bytes
Data []byte // size: xgb.Pad(((int(Length) * 4) * 1))
}
-// Waits and reads reply data from request GetImage
+// Reply blocks and returns the reply data for a GetImage request.
func (cook GetImageCookie) Reply() (*GetImageReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -11107,7 +11395,7 @@ func (cook GetImageCookie) Reply() (*GetImageReply, error) {
return getImageReply(buf), nil
}
-// Read reply into structure from buffer for GetImage
+// getImageReply reads a byte slice into a GetImageReply value.
func getImageReply(buf []byte) *GetImageReply {
v := new(GetImageReply)
b := 1 // skip reply determinant
@@ -11134,6 +11422,7 @@ func getImageReply(buf []byte) *GetImageReply {
}
// 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 {
size := 20
b := 0
@@ -11169,30 +11458,35 @@ func getImageRequest(c *xgb.Conn, Format byte, Drawable Drawable, X int16, Y int
return buf
}
-// Request PolyText8
-// size: xgb.Pad((16 + xgb.Pad((len(Items) * 1))))
+// PolyText8Cookie is a cookie used only for PolyText8 requests.
type PolyText8Cookie struct {
*xgb.Cookie
}
-// Write request to wire for PolyText8
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(polyText8Request(c, Drawable, Gc, X, Y, Items), cookie)
return PolyText8Cookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((16 + xgb.Pad((len(Items) * 1))))
b := 0
@@ -11224,30 +11518,35 @@ func polyText8Request(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X int16, Y in
return buf
}
-// Request PolyText16
-// size: xgb.Pad((16 + xgb.Pad((len(Items) * 1))))
+// PolyText16Cookie is a cookie used only for PolyText16 requests.
type PolyText16Cookie struct {
*xgb.Cookie
}
-// Write request to wire for PolyText16
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(polyText16Request(c, Drawable, Gc, X, Y, Items), cookie)
return PolyText16Cookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((16 + xgb.Pad((len(Items) * 1))))
b := 0
@@ -11279,30 +11578,35 @@ func polyText16Request(c *xgb.Conn, Drawable Drawable, Gc Gcontext, X int16, Y i
return buf
}
-// Request ImageText8
-// size: xgb.Pad((16 + xgb.Pad((int(StringLen) * 1))))
+// ImageText8Cookie is a cookie used only for ImageText8 requests.
type ImageText8Cookie struct {
*xgb.Cookie
}
-// Write request to wire for ImageText8
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(imageText8Request(c, StringLen, Drawable, Gc, X, Y, String), cookie)
return ImageText8Cookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((16 + xgb.Pad((int(StringLen) * 1))))
b := 0
@@ -11335,30 +11639,35 @@ func imageText8Request(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gconte
return buf
}
-// Request ImageText16
-// size: xgb.Pad((16 + xgb.Pad((int(StringLen) * 2))))
+// ImageText16Cookie is a cookie used only for ImageText16 requests.
type ImageText16Cookie struct {
*xgb.Cookie
}
-// Write request to wire for ImageText16
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(imageText16Request(c, StringLen, Drawable, Gc, X, Y, String), cookie)
return ImageText16Cookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((16 + xgb.Pad((int(StringLen) * 2))))
b := 0
@@ -11390,30 +11699,35 @@ func imageText16Request(c *xgb.Conn, StringLen byte, Drawable Drawable, Gc Gcont
return buf
}
-// Request CreateColormap
-// size: 16
+// CreateColormapCookie is a cookie used only for CreateColormap requests.
type CreateColormapCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateColormap
+// CreateColormap sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateColormap(c *xgb.Conn, Alloc byte, Mid Colormap, Window Window, Visual Visualid) CreateColormapCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(createColormapRequest(c, Alloc, Mid, Window, Visual), cookie)
return CreateColormapCookie{cookie}
}
+// CreateColormapChecked sends a checked request.
+// 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)
return CreateColormapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook CreateColormapCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for CreateColormap
+// createColormapRequest writes a CreateColormap request to a byte slice.
func createColormapRequest(c *xgb.Conn, Alloc byte, Mid Colormap, Window Window, Visual Visualid) []byte {
size := 16
b := 0
@@ -11440,30 +11754,35 @@ func createColormapRequest(c *xgb.Conn, Alloc byte, Mid Colormap, Window Window,
return buf
}
-// Request FreeColormap
-// size: 8
+// FreeColormapCookie is a cookie used only for FreeColormap requests.
type FreeColormapCookie struct {
*xgb.Cookie
}
-// Write request to wire for FreeColormap
+// FreeColormap sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func FreeColormap(c *xgb.Conn, Cmap Colormap) FreeColormapCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(freeColormapRequest(c, Cmap), cookie)
return FreeColormapCookie{cookie}
}
+// FreeColormapChecked sends a checked request.
+// 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)
return FreeColormapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FreeColormapCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for FreeColormap
+// freeColormapRequest writes a FreeColormap request to a byte slice.
func freeColormapRequest(c *xgb.Conn, Cmap Colormap) []byte {
size := 8
b := 0
@@ -11483,30 +11802,35 @@ func freeColormapRequest(c *xgb.Conn, Cmap Colormap) []byte {
return buf
}
-// Request CopyColormapAndFree
-// size: 12
+// CopyColormapAndFreeCookie is a cookie used only for CopyColormapAndFree requests.
type CopyColormapAndFreeCookie struct {
*xgb.Cookie
}
-// Write request to wire for CopyColormapAndFree
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(copyColormapAndFreeRequest(c, Mid, SrcCmap), cookie)
return CopyColormapAndFreeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -11529,30 +11853,35 @@ func copyColormapAndFreeRequest(c *xgb.Conn, Mid Colormap, SrcCmap Colormap) []b
return buf
}
-// Request InstallColormap
-// size: 8
+// InstallColormapCookie is a cookie used only for InstallColormap requests.
type InstallColormapCookie struct {
*xgb.Cookie
}
-// Write request to wire for InstallColormap
+// InstallColormap sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func InstallColormap(c *xgb.Conn, Cmap Colormap) InstallColormapCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(installColormapRequest(c, Cmap), cookie)
return InstallColormapCookie{cookie}
}
+// InstallColormapChecked sends a checked request.
+// 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)
return InstallColormapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook InstallColormapCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for InstallColormap
+// installColormapRequest writes a InstallColormap request to a byte slice.
func installColormapRequest(c *xgb.Conn, Cmap Colormap) []byte {
size := 8
b := 0
@@ -11572,30 +11901,35 @@ func installColormapRequest(c *xgb.Conn, Cmap Colormap) []byte {
return buf
}
-// Request UninstallColormap
-// size: 8
+// UninstallColormapCookie is a cookie used only for UninstallColormap requests.
type UninstallColormapCookie struct {
*xgb.Cookie
}
-// Write request to wire for UninstallColormap
+// UninstallColormap sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UninstallColormap(c *xgb.Conn, Cmap Colormap) UninstallColormapCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(uninstallColormapRequest(c, Cmap), cookie)
return UninstallColormapCookie{cookie}
}
+// UninstallColormapChecked sends a checked request.
+// 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)
return UninstallColormapCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UninstallColormapCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UninstallColormap
+// uninstallColormapRequest writes a UninstallColormap request to a byte slice.
func uninstallColormapRequest(c *xgb.Conn, Cmap Colormap) []byte {
size := 8
b := 0
@@ -11615,36 +11949,38 @@ func uninstallColormapRequest(c *xgb.Conn, Cmap Colormap) []byte {
return buf
}
-// Request ListInstalledColormaps
-// size: 8
+// ListInstalledColormapsCookie is a cookie used only for ListInstalledColormaps requests.
type ListInstalledColormapsCookie struct {
*xgb.Cookie
}
+// ListInstalledColormaps sends a checked request.
+// 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)
return ListInstalledColormapsCookie{cookie}
}
+// ListInstalledColormapsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListInstalledColormapsUnchecked(c *xgb.Conn, Window Window) ListInstalledColormapsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listInstalledColormapsRequest(c, Window), cookie)
return ListInstalledColormapsCookie{cookie}
}
-// Request reply for ListInstalledColormaps
-// size: (32 + xgb.Pad((int(CmapsLen) * 4)))
+// ListInstalledColormapsReply represents the data returned from a ListInstalledColormaps request.
type ListInstalledColormapsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
CmapsLen uint16
// padding: 22 bytes
Cmaps []Colormap // size: xgb.Pad((int(CmapsLen) * 4))
}
-// Waits and reads reply data from request ListInstalledColormaps
+// Reply blocks and returns the reply data for a ListInstalledColormaps request.
func (cook ListInstalledColormapsCookie) Reply() (*ListInstalledColormapsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -11656,7 +11992,7 @@ func (cook ListInstalledColormapsCookie) Reply() (*ListInstalledColormapsReply,
return listInstalledColormapsReply(buf), nil
}
-// Read reply into structure from buffer for ListInstalledColormaps
+// listInstalledColormapsReply reads a byte slice into a ListInstalledColormapsReply value.
func listInstalledColormapsReply(buf []byte) *ListInstalledColormapsReply {
v := new(ListInstalledColormapsReply)
b := 1 // skip reply determinant
@@ -11685,6 +12021,7 @@ func listInstalledColormapsReply(buf []byte) *ListInstalledColormapsReply {
}
// Write request to wire for ListInstalledColormaps
+// listInstalledColormapsRequest writes a ListInstalledColormaps request to a byte slice.
func listInstalledColormapsRequest(c *xgb.Conn, Window Window) []byte {
size := 8
b := 0
@@ -11704,29 +12041,31 @@ func listInstalledColormapsRequest(c *xgb.Conn, Window Window) []byte {
return buf
}
-// Request AllocColor
-// size: 16
+// AllocColorCookie is a cookie used only for AllocColor requests.
type AllocColorCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(allocColorRequest(c, Cmap, Red, Green, Blue), cookie)
return AllocColorCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(allocColorRequest(c, Cmap, Red, Green, Blue), cookie)
return AllocColorCookie{cookie}
}
-// Request reply for AllocColor
-// size: 20
+// AllocColorReply represents the data returned from a AllocColor request.
type AllocColorReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Red uint16
Green uint16
@@ -11735,7 +12074,7 @@ type AllocColorReply struct {
Pixel uint32
}
-// Waits and reads reply data from request AllocColor
+// Reply blocks and returns the reply data for a AllocColor request.
func (cook AllocColorCookie) Reply() (*AllocColorReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -11747,7 +12086,7 @@ func (cook AllocColorCookie) Reply() (*AllocColorReply, error) {
return allocColorReply(buf), nil
}
-// Read reply into structure from buffer for AllocColor
+// allocColorReply reads a byte slice into a AllocColorReply value.
func allocColorReply(buf []byte) *AllocColorReply {
v := new(AllocColorReply)
b := 1 // skip reply determinant
@@ -11778,6 +12117,7 @@ func allocColorReply(buf []byte) *AllocColorReply {
}
// 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 {
size := 16
b := 0
@@ -11808,29 +12148,31 @@ func allocColorRequest(c *xgb.Conn, Cmap Colormap, Red uint16, Green uint16, Blu
return buf
}
-// Request AllocNamedColor
-// size: xgb.Pad((12 + xgb.Pad((int(NameLen) * 1))))
+// AllocNamedColorCookie is a cookie used only for AllocNamedColor requests.
type AllocNamedColorCookie struct {
*xgb.Cookie
}
+// AllocNamedColor sends a checked request.
+// 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)
return AllocNamedColorCookie{cookie}
}
+// AllocNamedColorUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func AllocNamedColorUnchecked(c *xgb.Conn, Cmap Colormap, NameLen uint16, Name string) AllocNamedColorCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(allocNamedColorRequest(c, Cmap, NameLen, Name), cookie)
return AllocNamedColorCookie{cookie}
}
-// Request reply for AllocNamedColor
-// size: 24
+// AllocNamedColorReply represents the data returned from a AllocNamedColor request.
type AllocNamedColorReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Pixel uint32
ExactRed uint16
@@ -11841,7 +12183,7 @@ type AllocNamedColorReply struct {
VisualBlue uint16
}
-// Waits and reads reply data from request AllocNamedColor
+// Reply blocks and returns the reply data for a AllocNamedColor request.
func (cook AllocNamedColorCookie) Reply() (*AllocNamedColorReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -11853,7 +12195,7 @@ func (cook AllocNamedColorCookie) Reply() (*AllocNamedColorReply, error) {
return allocNamedColorReply(buf), nil
}
-// Read reply into structure from buffer for AllocNamedColor
+// allocNamedColorReply reads a byte slice into a AllocNamedColorReply value.
func allocNamedColorReply(buf []byte) *AllocNamedColorReply {
v := new(AllocNamedColorReply)
b := 1 // skip reply determinant
@@ -11891,6 +12233,7 @@ func allocNamedColorReply(buf []byte) *AllocNamedColorReply {
}
// Write request to wire for AllocNamedColor
+// allocNamedColorRequest writes a AllocNamedColor request to a byte slice.
func allocNamedColorRequest(c *xgb.Conn, Cmap Colormap, NameLen uint16, Name string) []byte {
size := xgb.Pad((12 + xgb.Pad((int(NameLen) * 1))))
b := 0
@@ -11918,29 +12261,31 @@ func allocNamedColorRequest(c *xgb.Conn, Cmap Colormap, NameLen uint16, Name str
return buf
}
-// Request AllocColorCells
-// size: 12
+// AllocColorCellsCookie is a cookie used only for AllocColorCells requests.
type AllocColorCellsCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(allocColorCellsRequest(c, Contiguous, Cmap, Colors, Planes), cookie)
return AllocColorCellsCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(allocColorCellsRequest(c, Contiguous, Cmap, Colors, Planes), cookie)
return AllocColorCellsCookie{cookie}
}
-// Request reply for AllocColorCells
-// size: ((32 + xgb.Pad((int(PixelsLen) * 4))) + xgb.Pad((int(MasksLen) * 4)))
+// AllocColorCellsReply represents the data returned from a AllocColorCells request.
type AllocColorCellsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
PixelsLen uint16
MasksLen uint16
@@ -11949,7 +12294,7 @@ type AllocColorCellsReply struct {
Masks []uint32 // size: xgb.Pad((int(MasksLen) * 4))
}
-// Waits and reads reply data from request AllocColorCells
+// Reply blocks and returns the reply data for a AllocColorCells request.
func (cook AllocColorCellsCookie) Reply() (*AllocColorCellsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -11961,7 +12306,7 @@ func (cook AllocColorCellsCookie) Reply() (*AllocColorCellsReply, error) {
return allocColorCellsReply(buf), nil
}
-// Read reply into structure from buffer for AllocColorCells
+// allocColorCellsReply reads a byte slice into a AllocColorCellsReply value.
func allocColorCellsReply(buf []byte) *AllocColorCellsReply {
v := new(AllocColorCellsReply)
b := 1 // skip reply determinant
@@ -12000,6 +12345,7 @@ func allocColorCellsReply(buf []byte) *AllocColorCellsReply {
}
// 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 {
size := 12
b := 0
@@ -12030,29 +12376,31 @@ func allocColorCellsRequest(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors
return buf
}
-// Request AllocColorPlanes
-// size: 16
+// AllocColorPlanesCookie is a cookie used only for AllocColorPlanes requests.
type AllocColorPlanesCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(allocColorPlanesRequest(c, Contiguous, Cmap, Colors, Reds, Greens, Blues), cookie)
return AllocColorPlanesCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(allocColorPlanesRequest(c, Contiguous, Cmap, Colors, Reds, Greens, Blues), cookie)
return AllocColorPlanesCookie{cookie}
}
-// Request reply for AllocColorPlanes
-// size: (32 + xgb.Pad((int(PixelsLen) * 4)))
+// AllocColorPlanesReply represents the data returned from a AllocColorPlanes request.
type AllocColorPlanesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
PixelsLen uint16
// padding: 2 bytes
@@ -12063,7 +12411,7 @@ type AllocColorPlanesReply struct {
Pixels []uint32 // size: xgb.Pad((int(PixelsLen) * 4))
}
-// Waits and reads reply data from request AllocColorPlanes
+// Reply blocks and returns the reply data for a AllocColorPlanes request.
func (cook AllocColorPlanesCookie) Reply() (*AllocColorPlanesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -12075,7 +12423,7 @@ func (cook AllocColorPlanesCookie) Reply() (*AllocColorPlanesReply, error) {
return allocColorPlanesReply(buf), nil
}
-// Read reply into structure from buffer for AllocColorPlanes
+// allocColorPlanesReply reads a byte slice into a AllocColorPlanesReply value.
func allocColorPlanesReply(buf []byte) *AllocColorPlanesReply {
v := new(AllocColorPlanesReply)
b := 1 // skip reply determinant
@@ -12115,6 +12463,7 @@ func allocColorPlanesReply(buf []byte) *AllocColorPlanesReply {
}
// 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 {
size := 16
b := 0
@@ -12151,30 +12500,35 @@ func allocColorPlanesRequest(c *xgb.Conn, Contiguous bool, Cmap Colormap, Colors
return buf
}
-// Request FreeColors
-// size: xgb.Pad((12 + xgb.Pad((len(Pixels) * 4))))
+// FreeColorsCookie is a cookie used only for FreeColors requests.
type FreeColorsCookie struct {
*xgb.Cookie
}
-// Write request to wire for FreeColors
+// FreeColors sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func FreeColors(c *xgb.Conn, Cmap Colormap, PlaneMask uint32, Pixels []uint32) FreeColorsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(freeColorsRequest(c, Cmap, PlaneMask, Pixels), cookie)
return FreeColorsCookie{cookie}
}
+// FreeColorsChecked sends a checked request.
+// 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)
return FreeColorsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FreeColorsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for FreeColors
+// freeColorsRequest writes a FreeColors request to a byte slice.
func freeColorsRequest(c *xgb.Conn, Cmap Colormap, PlaneMask uint32, Pixels []uint32) []byte {
size := xgb.Pad((12 + xgb.Pad((len(Pixels) * 4))))
b := 0
@@ -12203,30 +12557,35 @@ func freeColorsRequest(c *xgb.Conn, Cmap Colormap, PlaneMask uint32, Pixels []ui
return buf
}
-// Request StoreColors
-// size: xgb.Pad((8 + xgb.Pad((len(Items) * 12))))
+// StoreColorsCookie is a cookie used only for StoreColors requests.
type StoreColorsCookie struct {
*xgb.Cookie
}
-// Write request to wire for StoreColors
+// StoreColors sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func StoreColors(c *xgb.Conn, Cmap Colormap, Items []Coloritem) StoreColorsCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(storeColorsRequest(c, Cmap, Items), cookie)
return StoreColorsCookie{cookie}
}
+// StoreColorsChecked sends a checked request.
+// 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)
return StoreColorsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook StoreColorsCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for StoreColors
+// storeColorsRequest writes a StoreColors request to a byte slice.
func storeColorsRequest(c *xgb.Conn, Cmap Colormap, Items []Coloritem) []byte {
size := xgb.Pad((8 + xgb.Pad((len(Items) * 12))))
b := 0
@@ -12248,30 +12607,35 @@ func storeColorsRequest(c *xgb.Conn, Cmap Colormap, Items []Coloritem) []byte {
return buf
}
-// Request StoreNamedColor
-// size: xgb.Pad((16 + xgb.Pad((int(NameLen) * 1))))
+// StoreNamedColorCookie is a cookie used only for StoreNamedColor requests.
type StoreNamedColorCookie struct {
*xgb.Cookie
}
-// Write request to wire for StoreNamedColor
+// StoreNamedColor sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func StoreNamedColor(c *xgb.Conn, Flags byte, Cmap Colormap, Pixel uint32, NameLen uint16, Name string) StoreNamedColorCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(storeNamedColorRequest(c, Flags, Cmap, Pixel, NameLen, Name), cookie)
return StoreNamedColorCookie{cookie}
}
+// StoreNamedColorChecked sends a checked request.
+// 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)
return StoreNamedColorCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook StoreNamedColorCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for StoreNamedColor
+// storeNamedColorRequest writes a StoreNamedColor request to a byte slice.
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
@@ -12303,36 +12667,38 @@ func storeNamedColorRequest(c *xgb.Conn, Flags byte, Cmap Colormap, Pixel uint32
return buf
}
-// Request QueryColors
-// size: xgb.Pad((8 + xgb.Pad((len(Pixels) * 4))))
+// QueryColorsCookie is a cookie used only for QueryColors requests.
type QueryColorsCookie struct {
*xgb.Cookie
}
+// QueryColors sends a checked request.
+// 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)
return QueryColorsCookie{cookie}
}
+// QueryColorsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryColorsUnchecked(c *xgb.Conn, Cmap Colormap, Pixels []uint32) QueryColorsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryColorsRequest(c, Cmap, Pixels), cookie)
return QueryColorsCookie{cookie}
}
-// Request reply for QueryColors
-// size: (32 + xgb.Pad((int(ColorsLen) * 8)))
+// QueryColorsReply represents the data returned from a QueryColors request.
type QueryColorsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ColorsLen uint16
// padding: 22 bytes
Colors []Rgb // size: xgb.Pad((int(ColorsLen) * 8))
}
-// Waits and reads reply data from request QueryColors
+// Reply blocks and returns the reply data for a QueryColors request.
func (cook QueryColorsCookie) Reply() (*QueryColorsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -12344,7 +12710,7 @@ func (cook QueryColorsCookie) Reply() (*QueryColorsReply, error) {
return queryColorsReply(buf), nil
}
-// Read reply into structure from buffer for QueryColors
+// queryColorsReply reads a byte slice into a QueryColorsReply value.
func queryColorsReply(buf []byte) *QueryColorsReply {
v := new(QueryColorsReply)
b := 1 // skip reply determinant
@@ -12369,6 +12735,7 @@ func queryColorsReply(buf []byte) *QueryColorsReply {
}
// Write request to wire for QueryColors
+// queryColorsRequest writes a QueryColors request to a byte slice.
func queryColorsRequest(c *xgb.Conn, Cmap Colormap, Pixels []uint32) []byte {
size := xgb.Pad((8 + xgb.Pad((len(Pixels) * 4))))
b := 0
@@ -12394,29 +12761,31 @@ func queryColorsRequest(c *xgb.Conn, Cmap Colormap, Pixels []uint32) []byte {
return buf
}
-// Request LookupColor
-// size: xgb.Pad((12 + xgb.Pad((int(NameLen) * 1))))
+// LookupColorCookie is a cookie used only for LookupColor requests.
type LookupColorCookie struct {
*xgb.Cookie
}
+// LookupColor sends a checked request.
+// 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)
return LookupColorCookie{cookie}
}
+// LookupColorUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func LookupColorUnchecked(c *xgb.Conn, Cmap Colormap, NameLen uint16, Name string) LookupColorCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(lookupColorRequest(c, Cmap, NameLen, Name), cookie)
return LookupColorCookie{cookie}
}
-// Request reply for LookupColor
-// size: 20
+// LookupColorReply represents the data returned from a LookupColor request.
type LookupColorReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ExactRed uint16
ExactGreen uint16
@@ -12426,7 +12795,7 @@ type LookupColorReply struct {
VisualBlue uint16
}
-// Waits and reads reply data from request LookupColor
+// Reply blocks and returns the reply data for a LookupColor request.
func (cook LookupColorCookie) Reply() (*LookupColorReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -12438,7 +12807,7 @@ func (cook LookupColorCookie) Reply() (*LookupColorReply, error) {
return lookupColorReply(buf), nil
}
-// Read reply into structure from buffer for LookupColor
+// lookupColorReply reads a byte slice into a LookupColorReply value.
func lookupColorReply(buf []byte) *LookupColorReply {
v := new(LookupColorReply)
b := 1 // skip reply determinant
@@ -12473,6 +12842,7 @@ func lookupColorReply(buf []byte) *LookupColorReply {
}
// Write request to wire for LookupColor
+// lookupColorRequest writes a LookupColor request to a byte slice.
func lookupColorRequest(c *xgb.Conn, Cmap Colormap, NameLen uint16, Name string) []byte {
size := xgb.Pad((12 + xgb.Pad((int(NameLen) * 1))))
b := 0
@@ -12500,30 +12870,35 @@ func lookupColorRequest(c *xgb.Conn, Cmap Colormap, NameLen uint16, Name string)
return buf
}
-// Request CreateCursor
-// size: 32
+// CreateCursorCookie is a cookie used only for CreateCursor requests.
type CreateCursorCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateCursor
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createCursorRequest(c, Cid, Source, Mask, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue, X, Y), cookie)
return CreateCursorCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 32
b := 0
@@ -12573,30 +12948,35 @@ func createCursorRequest(c *xgb.Conn, Cid Cursor, Source Pixmap, Mask Pixmap, Fo
return buf
}
-// Request CreateGlyphCursor
-// size: 32
+// CreateGlyphCursorCookie is a cookie used only for CreateGlyphCursor requests.
type CreateGlyphCursorCookie struct {
*xgb.Cookie
}
-// Write request to wire for CreateGlyphCursor
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(createGlyphCursorRequest(c, Cid, SourceFont, MaskFont, SourceChar, MaskChar, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue), cookie)
return CreateGlyphCursorCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 32
b := 0
@@ -12646,30 +13026,35 @@ func createGlyphCursorRequest(c *xgb.Conn, Cid Cursor, SourceFont Font, MaskFont
return buf
}
-// Request FreeCursor
-// size: 8
+// FreeCursorCookie is a cookie used only for FreeCursor requests.
type FreeCursorCookie struct {
*xgb.Cookie
}
-// Write request to wire for FreeCursor
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(freeCursorRequest(c, Cursor), cookie)
return FreeCursorCookie{cookie}
}
+// FreeCursorChecked sends a checked request.
+// 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)
return FreeCursorCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook FreeCursorCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for FreeCursor
+// freeCursorRequest writes a FreeCursor request to a byte slice.
func freeCursorRequest(c *xgb.Conn, Cursor Cursor) []byte {
size := 8
b := 0
@@ -12689,30 +13074,35 @@ func freeCursorRequest(c *xgb.Conn, Cursor Cursor) []byte {
return buf
}
-// Request RecolorCursor
-// size: 20
+// RecolorCursorCookie is a cookie used only for RecolorCursor requests.
type RecolorCursorCookie struct {
*xgb.Cookie
}
-// Write request to wire for RecolorCursor
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(recolorCursorRequest(c, Cursor, ForeRed, ForeGreen, ForeBlue, BackRed, BackGreen, BackBlue), cookie)
return RecolorCursorCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 20
b := 0
@@ -12750,35 +13140,37 @@ func recolorCursorRequest(c *xgb.Conn, Cursor Cursor, ForeRed uint16, ForeGreen
return buf
}
-// Request QueryBestSize
-// size: 12
+// QueryBestSizeCookie is a cookie used only for QueryBestSize requests.
type QueryBestSizeCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryBestSizeRequest(c, Class, Drawable, Width, Height), cookie)
return QueryBestSizeCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryBestSizeRequest(c, Class, Drawable, Width, Height), cookie)
return QueryBestSizeCookie{cookie}
}
-// Request reply for QueryBestSize
-// size: 12
+// QueryBestSizeReply represents the data returned from a QueryBestSize request.
type QueryBestSizeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Width uint16
Height uint16
}
-// Waits and reads reply data from request QueryBestSize
+// Reply blocks and returns the reply data for a QueryBestSize request.
func (cook QueryBestSizeCookie) Reply() (*QueryBestSizeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -12790,7 +13182,7 @@ func (cook QueryBestSizeCookie) Reply() (*QueryBestSizeReply, error) {
return queryBestSizeReply(buf), nil
}
-// Read reply into structure from buffer for QueryBestSize
+// queryBestSizeReply reads a byte slice into a QueryBestSizeReply value.
func queryBestSizeReply(buf []byte) *QueryBestSizeReply {
v := new(QueryBestSizeReply)
b := 1 // skip reply determinant
@@ -12813,6 +13205,7 @@ func queryBestSizeReply(buf []byte) *QueryBestSizeReply {
}
// 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 {
size := 12
b := 0
@@ -12839,29 +13232,31 @@ func queryBestSizeRequest(c *xgb.Conn, Class byte, Drawable Drawable, Width uint
return buf
}
-// Request QueryExtension
-// size: xgb.Pad((8 + xgb.Pad((int(NameLen) * 1))))
+// QueryExtensionCookie is a cookie used only for QueryExtension requests.
type QueryExtensionCookie struct {
*xgb.Cookie
}
+// QueryExtension sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryExtensionCookie.Reply()
func QueryExtension(c *xgb.Conn, NameLen uint16, Name string) QueryExtensionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryExtensionRequest(c, NameLen, Name), cookie)
return QueryExtensionCookie{cookie}
}
+// QueryExtensionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryExtensionUnchecked(c *xgb.Conn, NameLen uint16, Name string) QueryExtensionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryExtensionRequest(c, NameLen, Name), cookie)
return QueryExtensionCookie{cookie}
}
-// Request reply for QueryExtension
-// size: 12
+// QueryExtensionReply represents the data returned from a QueryExtension request.
type QueryExtensionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Present bool
MajorOpcode byte
@@ -12869,7 +13264,7 @@ type QueryExtensionReply struct {
FirstError byte
}
-// Waits and reads reply data from request QueryExtension
+// Reply blocks and returns the reply data for a QueryExtension request.
func (cook QueryExtensionCookie) Reply() (*QueryExtensionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -12881,7 +13276,7 @@ func (cook QueryExtensionCookie) Reply() (*QueryExtensionReply, error) {
return queryExtensionReply(buf), nil
}
-// Read reply into structure from buffer for QueryExtension
+// queryExtensionReply reads a byte slice into a QueryExtensionReply value.
func queryExtensionReply(buf []byte) *QueryExtensionReply {
v := new(QueryExtensionReply)
b := 1 // skip reply determinant
@@ -12914,6 +13309,7 @@ func queryExtensionReply(buf []byte) *QueryExtensionReply {
}
// Write request to wire for QueryExtension
+// queryExtensionRequest writes a QueryExtension request to a byte slice.
func queryExtensionRequest(c *xgb.Conn, NameLen uint16, Name string) []byte {
size := xgb.Pad((8 + xgb.Pad((int(NameLen) * 1))))
b := 0
@@ -12938,35 +13334,37 @@ func queryExtensionRequest(c *xgb.Conn, NameLen uint16, Name string) []byte {
return buf
}
-// Request ListExtensions
-// size: 4
+// ListExtensionsCookie is a cookie used only for ListExtensions requests.
type ListExtensionsCookie struct {
*xgb.Cookie
}
+// ListExtensions sends a checked request.
+// 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)
return ListExtensionsCookie{cookie}
}
+// ListExtensionsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListExtensionsUnchecked(c *xgb.Conn) ListExtensionsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listExtensionsRequest(c), cookie)
return ListExtensionsCookie{cookie}
}
-// Request reply for ListExtensions
-// size: (32 + StrListSize(Names))
+// ListExtensionsReply represents the data returned from a ListExtensions request.
type ListExtensionsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
NamesLen byte
// padding: 24 bytes
Names []Str // size: StrListSize(Names)
}
-// Waits and reads reply data from request ListExtensions
+// Reply blocks and returns the reply data for a ListExtensions request.
func (cook ListExtensionsCookie) Reply() (*ListExtensionsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -12978,7 +13376,7 @@ func (cook ListExtensionsCookie) Reply() (*ListExtensionsReply, error) {
return listExtensionsReply(buf), nil
}
-// Read reply into structure from buffer for ListExtensions
+// listExtensionsReply reads a byte slice into a ListExtensionsReply value.
func listExtensionsReply(buf []byte) *ListExtensionsReply {
v := new(ListExtensionsReply)
b := 1 // skip reply determinant
@@ -13001,6 +13399,7 @@ func listExtensionsReply(buf []byte) *ListExtensionsReply {
}
// Write request to wire for ListExtensions
+// listExtensionsRequest writes a ListExtensions request to a byte slice.
func listExtensionsRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -13016,30 +13415,35 @@ func listExtensionsRequest(c *xgb.Conn) []byte {
return buf
}
-// Request ChangeKeyboardMapping
-// size: xgb.Pad((8 + xgb.Pad(((int(KeycodeCount) * int(KeysymsPerKeycode)) * 4))))
+// ChangeKeyboardMappingCookie is a cookie used only for ChangeKeyboardMapping requests.
type ChangeKeyboardMappingCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeKeyboardMapping
+// ChangeKeyboardMapping sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangeKeyboardMapping(c *xgb.Conn, KeycodeCount byte, FirstKeycode Keycode, KeysymsPerKeycode byte, Keysyms []Keysym) ChangeKeyboardMappingCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(changeKeyboardMappingRequest(c, KeycodeCount, FirstKeycode, KeysymsPerKeycode, Keysyms), cookie)
return ChangeKeyboardMappingCookie{cookie}
}
+// ChangeKeyboardMappingChecked sends a checked request.
+// 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)
return ChangeKeyboardMappingCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeKeyboardMappingCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeKeyboardMapping
+// changeKeyboardMappingRequest writes a ChangeKeyboardMapping request to a byte slice.
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
@@ -13071,35 +13475,37 @@ func changeKeyboardMappingRequest(c *xgb.Conn, KeycodeCount byte, FirstKeycode K
return buf
}
-// Request GetKeyboardMapping
-// size: 8
+// GetKeyboardMappingCookie is a cookie used only for GetKeyboardMapping requests.
type GetKeyboardMappingCookie struct {
*xgb.Cookie
}
+// GetKeyboardMapping sends a checked request.
+// 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)
return GetKeyboardMappingCookie{cookie}
}
+// GetKeyboardMappingUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetKeyboardMappingUnchecked(c *xgb.Conn, FirstKeycode Keycode, Count byte) GetKeyboardMappingCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getKeyboardMappingRequest(c, FirstKeycode, Count), cookie)
return GetKeyboardMappingCookie{cookie}
}
-// Request reply for GetKeyboardMapping
-// size: (32 + xgb.Pad((int(Length) * 4)))
+// GetKeyboardMappingReply represents the data returned from a GetKeyboardMapping request.
type GetKeyboardMappingReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
KeysymsPerKeycode byte
// padding: 24 bytes
Keysyms []Keysym // size: xgb.Pad((int(Length) * 4))
}
-// Waits and reads reply data from request GetKeyboardMapping
+// Reply blocks and returns the reply data for a GetKeyboardMapping request.
func (cook GetKeyboardMappingCookie) Reply() (*GetKeyboardMappingReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -13111,7 +13517,7 @@ func (cook GetKeyboardMappingCookie) Reply() (*GetKeyboardMappingReply, error) {
return getKeyboardMappingReply(buf), nil
}
-// Read reply into structure from buffer for GetKeyboardMapping
+// getKeyboardMappingReply reads a byte slice into a GetKeyboardMappingReply value.
func getKeyboardMappingReply(buf []byte) *GetKeyboardMappingReply {
v := new(GetKeyboardMappingReply)
b := 1 // skip reply determinant
@@ -13138,6 +13544,7 @@ func getKeyboardMappingReply(buf []byte) *GetKeyboardMappingReply {
}
// Write request to wire for GetKeyboardMapping
+// getKeyboardMappingRequest writes a GetKeyboardMapping request to a byte slice.
func getKeyboardMappingRequest(c *xgb.Conn, FirstKeycode Keycode, Count byte) []byte {
size := 8
b := 0
@@ -13160,30 +13567,35 @@ func getKeyboardMappingRequest(c *xgb.Conn, FirstKeycode Keycode, Count byte) []
return buf
}
-// Request ChangeKeyboardControl
-// size: xgb.Pad((4 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
+// ChangeKeyboardControlCookie is a cookie used only for ChangeKeyboardControl requests.
type ChangeKeyboardControlCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeKeyboardControl
+// ChangeKeyboardControl sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ChangeKeyboardControl(c *xgb.Conn, ValueMask uint32, ValueList []uint32) ChangeKeyboardControlCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(changeKeyboardControlRequest(c, ValueMask, ValueList), cookie)
return ChangeKeyboardControlCookie{cookie}
}
+// ChangeKeyboardControlChecked sends a checked request.
+// 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)
return ChangeKeyboardControlCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ChangeKeyboardControlCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ChangeKeyboardControl
+// changeKeyboardControlRequest writes a ChangeKeyboardControl request to a byte slice.
func changeKeyboardControlRequest(c *xgb.Conn, ValueMask uint32, ValueList []uint32) []byte {
size := xgb.Pad((4 + (4 + xgb.Pad((4 * xgb.PopCount(int(ValueMask)))))))
b := 0
@@ -13208,29 +13620,31 @@ func changeKeyboardControlRequest(c *xgb.Conn, ValueMask uint32, ValueList []uin
return buf
}
-// Request GetKeyboardControl
-// size: 4
+// GetKeyboardControlCookie is a cookie used only for GetKeyboardControl requests.
type GetKeyboardControlCookie struct {
*xgb.Cookie
}
+// GetKeyboardControl sends a checked request.
+// 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)
return GetKeyboardControlCookie{cookie}
}
+// GetKeyboardControlUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetKeyboardControlUnchecked(c *xgb.Conn) GetKeyboardControlCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getKeyboardControlRequest(c), cookie)
return GetKeyboardControlCookie{cookie}
}
-// Request reply for GetKeyboardControl
-// size: 52
+// GetKeyboardControlReply represents the data returned from a GetKeyboardControl request.
type GetKeyboardControlReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
GlobalAutoRepeat byte
LedMask uint32
KeyClickPercent byte
@@ -13241,7 +13655,7 @@ type GetKeyboardControlReply struct {
AutoRepeats []byte // size: 32
}
-// Waits and reads reply data from request GetKeyboardControl
+// Reply blocks and returns the reply data for a GetKeyboardControl request.
func (cook GetKeyboardControlCookie) Reply() (*GetKeyboardControlReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -13253,7 +13667,7 @@ func (cook GetKeyboardControlCookie) Reply() (*GetKeyboardControlReply, error) {
return getKeyboardControlReply(buf), nil
}
-// Read reply into structure from buffer for GetKeyboardControl
+// getKeyboardControlReply reads a byte slice into a GetKeyboardControlReply value.
func getKeyboardControlReply(buf []byte) *GetKeyboardControlReply {
v := new(GetKeyboardControlReply)
b := 1 // skip reply determinant
@@ -13292,6 +13706,7 @@ func getKeyboardControlReply(buf []byte) *GetKeyboardControlReply {
}
// Write request to wire for GetKeyboardControl
+// getKeyboardControlRequest writes a GetKeyboardControl request to a byte slice.
func getKeyboardControlRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -13307,30 +13722,35 @@ func getKeyboardControlRequest(c *xgb.Conn) []byte {
return buf
}
-// Request Bell
-// size: 4
+// BellCookie is a cookie used only for Bell requests.
type BellCookie struct {
*xgb.Cookie
}
-// Write request to wire for Bell
+// Bell sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func Bell(c *xgb.Conn, Percent int8) BellCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(bellRequest(c, Percent), cookie)
return BellCookie{cookie}
}
+// BellChecked sends a checked request.
+// 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)
return BellCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook BellCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for Bell
+// bellRequest writes a Bell request to a byte slice.
func bellRequest(c *xgb.Conn, Percent int8) []byte {
size := 4
b := 0
@@ -13348,30 +13768,35 @@ func bellRequest(c *xgb.Conn, Percent int8) []byte {
return buf
}
-// Request ChangePointerControl
-// size: 12
+// ChangePointerControlCookie is a cookie used only for ChangePointerControl requests.
type ChangePointerControlCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangePointerControl
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(changePointerControlRequest(c, AccelerationNumerator, AccelerationDenominator, Threshold, DoAcceleration, DoThreshold), cookie)
return ChangePointerControlCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -13411,29 +13836,31 @@ func changePointerControlRequest(c *xgb.Conn, AccelerationNumerator int16, Accel
return buf
}
-// Request GetPointerControl
-// size: 4
+// GetPointerControlCookie is a cookie used only for GetPointerControl requests.
type GetPointerControlCookie struct {
*xgb.Cookie
}
+// GetPointerControl sends a checked request.
+// 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)
return GetPointerControlCookie{cookie}
}
+// GetPointerControlUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPointerControlUnchecked(c *xgb.Conn) GetPointerControlCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPointerControlRequest(c), cookie)
return GetPointerControlCookie{cookie}
}
-// Request reply for GetPointerControl
-// size: 32
+// GetPointerControlReply represents the data returned from a GetPointerControl request.
type GetPointerControlReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
AccelerationNumerator uint16
AccelerationDenominator uint16
@@ -13441,7 +13868,7 @@ type GetPointerControlReply struct {
// padding: 18 bytes
}
-// Waits and reads reply data from request GetPointerControl
+// Reply blocks and returns the reply data for a GetPointerControl request.
func (cook GetPointerControlCookie) Reply() (*GetPointerControlReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -13453,7 +13880,7 @@ func (cook GetPointerControlCookie) Reply() (*GetPointerControlReply, error) {
return getPointerControlReply(buf), nil
}
-// Read reply into structure from buffer for GetPointerControl
+// getPointerControlReply reads a byte slice into a GetPointerControlReply value.
func getPointerControlReply(buf []byte) *GetPointerControlReply {
v := new(GetPointerControlReply)
b := 1 // skip reply determinant
@@ -13481,6 +13908,7 @@ func getPointerControlReply(buf []byte) *GetPointerControlReply {
}
// Write request to wire for GetPointerControl
+// getPointerControlRequest writes a GetPointerControl request to a byte slice.
func getPointerControlRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -13496,30 +13924,35 @@ func getPointerControlRequest(c *xgb.Conn) []byte {
return buf
}
-// Request SetScreenSaver
-// size: 12
+// SetScreenSaverCookie is a cookie used only for SetScreenSaver requests.
type SetScreenSaverCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetScreenSaver
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setScreenSaverRequest(c, Timeout, Interval, PreferBlanking, AllowExposures), cookie)
return SetScreenSaverCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 12
b := 0
@@ -13548,29 +13981,31 @@ func setScreenSaverRequest(c *xgb.Conn, Timeout int16, Interval int16, PreferBla
return buf
}
-// Request GetScreenSaver
-// size: 4
+// GetScreenSaverCookie is a cookie used only for GetScreenSaver requests.
type GetScreenSaverCookie struct {
*xgb.Cookie
}
+// GetScreenSaver sends a checked request.
+// 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)
return GetScreenSaverCookie{cookie}
}
+// GetScreenSaverUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetScreenSaverUnchecked(c *xgb.Conn) GetScreenSaverCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getScreenSaverRequest(c), cookie)
return GetScreenSaverCookie{cookie}
}
-// Request reply for GetScreenSaver
-// size: 32
+// GetScreenSaverReply represents the data returned from a GetScreenSaver request.
type GetScreenSaverReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Timeout uint16
Interval uint16
@@ -13579,7 +14014,7 @@ type GetScreenSaverReply struct {
// padding: 18 bytes
}
-// Waits and reads reply data from request GetScreenSaver
+// Reply blocks and returns the reply data for a GetScreenSaver request.
func (cook GetScreenSaverCookie) Reply() (*GetScreenSaverReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -13591,7 +14026,7 @@ func (cook GetScreenSaverCookie) Reply() (*GetScreenSaverReply, error) {
return getScreenSaverReply(buf), nil
}
-// Read reply into structure from buffer for GetScreenSaver
+// getScreenSaverReply reads a byte slice into a GetScreenSaverReply value.
func getScreenSaverReply(buf []byte) *GetScreenSaverReply {
v := new(GetScreenSaverReply)
b := 1 // skip reply determinant
@@ -13622,6 +14057,7 @@ func getScreenSaverReply(buf []byte) *GetScreenSaverReply {
}
// Write request to wire for GetScreenSaver
+// getScreenSaverRequest writes a GetScreenSaver request to a byte slice.
func getScreenSaverRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -13637,30 +14073,35 @@ func getScreenSaverRequest(c *xgb.Conn) []byte {
return buf
}
-// Request ChangeHosts
-// size: xgb.Pad((8 + xgb.Pad((int(AddressLen) * 1))))
+// ChangeHostsCookie is a cookie used only for ChangeHosts requests.
type ChangeHostsCookie struct {
*xgb.Cookie
}
-// Write request to wire for ChangeHosts
+// 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 {
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 {
cookie := c.NewCookie(true, false)
c.NewRequest(changeHostsRequest(c, Mode, Family, AddressLen, Address), cookie)
return ChangeHostsCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((8 + xgb.Pad((int(AddressLen) * 1))))
b := 0
@@ -13689,36 +14130,38 @@ func changeHostsRequest(c *xgb.Conn, Mode byte, Family byte, AddressLen uint16,
return buf
}
-// Request ListHosts
-// size: 4
+// ListHostsCookie is a cookie used only for ListHosts requests.
type ListHostsCookie struct {
*xgb.Cookie
}
+// ListHosts sends a checked request.
+// 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)
return ListHostsCookie{cookie}
}
+// ListHostsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListHostsUnchecked(c *xgb.Conn) ListHostsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listHostsRequest(c), cookie)
return ListHostsCookie{cookie}
}
-// Request reply for ListHosts
-// size: (32 + HostListSize(Hosts))
+// ListHostsReply represents the data returned from a ListHosts request.
type ListHostsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Mode byte
HostsLen uint16
// padding: 22 bytes
Hosts []Host // size: HostListSize(Hosts)
}
-// Waits and reads reply data from request ListHosts
+// Reply blocks and returns the reply data for a ListHosts request.
func (cook ListHostsCookie) Reply() (*ListHostsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -13730,7 +14173,7 @@ func (cook ListHostsCookie) Reply() (*ListHostsReply, error) {
return listHostsReply(buf), nil
}
-// Read reply into structure from buffer for ListHosts
+// listHostsReply reads a byte slice into a ListHostsReply value.
func listHostsReply(buf []byte) *ListHostsReply {
v := new(ListHostsReply)
b := 1 // skip reply determinant
@@ -13756,6 +14199,7 @@ func listHostsReply(buf []byte) *ListHostsReply {
}
// Write request to wire for ListHosts
+// listHostsRequest writes a ListHosts request to a byte slice.
func listHostsRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -13771,30 +14215,35 @@ func listHostsRequest(c *xgb.Conn) []byte {
return buf
}
-// Request SetAccessControl
-// size: 4
+// SetAccessControlCookie is a cookie used only for SetAccessControl requests.
type SetAccessControlCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetAccessControl
+// SetAccessControl sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetAccessControl(c *xgb.Conn, Mode byte) SetAccessControlCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setAccessControlRequest(c, Mode), cookie)
return SetAccessControlCookie{cookie}
}
+// SetAccessControlChecked sends a checked request.
+// 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)
return SetAccessControlCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetAccessControlCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetAccessControl
+// setAccessControlRequest writes a SetAccessControl request to a byte slice.
func setAccessControlRequest(c *xgb.Conn, Mode byte) []byte {
size := 4
b := 0
@@ -13812,30 +14261,35 @@ func setAccessControlRequest(c *xgb.Conn, Mode byte) []byte {
return buf
}
-// Request SetCloseDownMode
-// size: 4
+// SetCloseDownModeCookie is a cookie used only for SetCloseDownMode requests.
type SetCloseDownModeCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetCloseDownMode
+// SetCloseDownMode sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetCloseDownMode(c *xgb.Conn, Mode byte) SetCloseDownModeCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setCloseDownModeRequest(c, Mode), cookie)
return SetCloseDownModeCookie{cookie}
}
+// SetCloseDownModeChecked sends a checked request.
+// 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)
return SetCloseDownModeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetCloseDownModeCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetCloseDownMode
+// setCloseDownModeRequest writes a SetCloseDownMode request to a byte slice.
func setCloseDownModeRequest(c *xgb.Conn, Mode byte) []byte {
size := 4
b := 0
@@ -13853,30 +14307,35 @@ func setCloseDownModeRequest(c *xgb.Conn, Mode byte) []byte {
return buf
}
-// Request KillClient
-// size: 8
+// KillClientCookie is a cookie used only for KillClient requests.
type KillClientCookie struct {
*xgb.Cookie
}
-// Write request to wire for KillClient
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(killClientRequest(c, Resource), cookie)
return KillClientCookie{cookie}
}
+// KillClientChecked sends a checked request.
+// 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)
return KillClientCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook KillClientCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for KillClient
+// killClientRequest writes a KillClient request to a byte slice.
func killClientRequest(c *xgb.Conn, Resource uint32) []byte {
size := 8
b := 0
@@ -13896,30 +14355,35 @@ func killClientRequest(c *xgb.Conn, Resource uint32) []byte {
return buf
}
-// Request RotateProperties
-// size: xgb.Pad((12 + xgb.Pad((int(AtomsLen) * 4))))
+// RotatePropertiesCookie is a cookie used only for RotateProperties requests.
type RotatePropertiesCookie struct {
*xgb.Cookie
}
-// Write request to wire for RotateProperties
+// RotateProperties sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func RotateProperties(c *xgb.Conn, Window Window, AtomsLen uint16, Delta int16, Atoms []Atom) RotatePropertiesCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(rotatePropertiesRequest(c, Window, AtomsLen, Delta, Atoms), cookie)
return RotatePropertiesCookie{cookie}
}
+// RotatePropertiesChecked sends a checked request.
+// 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)
return RotatePropertiesCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook RotatePropertiesCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for RotateProperties
+// rotatePropertiesRequest writes a RotateProperties request to a byte slice.
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
@@ -13951,30 +14415,35 @@ func rotatePropertiesRequest(c *xgb.Conn, Window Window, AtomsLen uint16, Delta
return buf
}
-// Request ForceScreenSaver
-// size: 4
+// ForceScreenSaverCookie is a cookie used only for ForceScreenSaver requests.
type ForceScreenSaverCookie struct {
*xgb.Cookie
}
-// Write request to wire for ForceScreenSaver
+// ForceScreenSaver sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ForceScreenSaver(c *xgb.Conn, Mode byte) ForceScreenSaverCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(forceScreenSaverRequest(c, Mode), cookie)
return ForceScreenSaverCookie{cookie}
}
+// ForceScreenSaverChecked sends a checked request.
+// 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)
return ForceScreenSaverCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook ForceScreenSaverCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for ForceScreenSaver
+// forceScreenSaverRequest writes a ForceScreenSaver request to a byte slice.
func forceScreenSaverRequest(c *xgb.Conn, Mode byte) []byte {
size := 4
b := 0
@@ -13992,33 +14461,35 @@ func forceScreenSaverRequest(c *xgb.Conn, Mode byte) []byte {
return buf
}
-// Request SetPointerMapping
-// size: xgb.Pad((4 + xgb.Pad((int(MapLen) * 1))))
+// SetPointerMappingCookie is a cookie used only for SetPointerMapping requests.
type SetPointerMappingCookie struct {
*xgb.Cookie
}
+// SetPointerMapping sends a checked request.
+// 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)
return SetPointerMappingCookie{cookie}
}
+// SetPointerMappingUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetPointerMappingUnchecked(c *xgb.Conn, MapLen byte, Map []byte) SetPointerMappingCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(setPointerMappingRequest(c, MapLen, Map), cookie)
return SetPointerMappingCookie{cookie}
}
-// Request reply for SetPointerMapping
-// size: 8
+// SetPointerMappingReply represents the data returned from a SetPointerMapping request.
type SetPointerMappingReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status byte
}
-// Waits and reads reply data from request SetPointerMapping
+// Reply blocks and returns the reply data for a SetPointerMapping request.
func (cook SetPointerMappingCookie) Reply() (*SetPointerMappingReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -14030,7 +14501,7 @@ func (cook SetPointerMappingCookie) Reply() (*SetPointerMappingReply, error) {
return setPointerMappingReply(buf), nil
}
-// Read reply into structure from buffer for SetPointerMapping
+// setPointerMappingReply reads a byte slice into a SetPointerMappingReply value.
func setPointerMappingReply(buf []byte) *SetPointerMappingReply {
v := new(SetPointerMappingReply)
b := 1 // skip reply determinant
@@ -14048,6 +14519,7 @@ func setPointerMappingReply(buf []byte) *SetPointerMappingReply {
}
// Write request to wire for SetPointerMapping
+// setPointerMappingRequest writes a SetPointerMapping request to a byte slice.
func setPointerMappingRequest(c *xgb.Conn, MapLen byte, Map []byte) []byte {
size := xgb.Pad((4 + xgb.Pad((int(MapLen) * 1))))
b := 0
@@ -14068,35 +14540,37 @@ func setPointerMappingRequest(c *xgb.Conn, MapLen byte, Map []byte) []byte {
return buf
}
-// Request GetPointerMapping
-// size: 4
+// GetPointerMappingCookie is a cookie used only for GetPointerMapping requests.
type GetPointerMappingCookie struct {
*xgb.Cookie
}
+// GetPointerMapping sends a checked request.
+// 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)
return GetPointerMappingCookie{cookie}
}
+// GetPointerMappingUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPointerMappingUnchecked(c *xgb.Conn) GetPointerMappingCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPointerMappingRequest(c), cookie)
return GetPointerMappingCookie{cookie}
}
-// Request reply for GetPointerMapping
-// size: (32 + xgb.Pad((int(MapLen) * 1)))
+// GetPointerMappingReply represents the data returned from a GetPointerMapping request.
type GetPointerMappingReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
MapLen byte
// padding: 24 bytes
Map []byte // size: xgb.Pad((int(MapLen) * 1))
}
-// Waits and reads reply data from request GetPointerMapping
+// Reply blocks and returns the reply data for a GetPointerMapping request.
func (cook GetPointerMappingCookie) Reply() (*GetPointerMappingReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -14108,7 +14582,7 @@ func (cook GetPointerMappingCookie) Reply() (*GetPointerMappingReply, error) {
return getPointerMappingReply(buf), nil
}
-// Read reply into structure from buffer for GetPointerMapping
+// getPointerMappingReply reads a byte slice into a GetPointerMappingReply value.
func getPointerMappingReply(buf []byte) *GetPointerMappingReply {
v := new(GetPointerMappingReply)
b := 1 // skip reply determinant
@@ -14132,6 +14606,7 @@ func getPointerMappingReply(buf []byte) *GetPointerMappingReply {
}
// Write request to wire for GetPointerMapping
+// getPointerMappingRequest writes a GetPointerMapping request to a byte slice.
func getPointerMappingRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -14147,33 +14622,35 @@ func getPointerMappingRequest(c *xgb.Conn) []byte {
return buf
}
-// Request SetModifierMapping
-// size: xgb.Pad((4 + xgb.Pad(((int(KeycodesPerModifier) * 8) * 1))))
+// SetModifierMappingCookie is a cookie used only for SetModifierMapping requests.
type SetModifierMappingCookie struct {
*xgb.Cookie
}
+// SetModifierMapping sends a checked request.
+// 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)
return SetModifierMappingCookie{cookie}
}
+// SetModifierMappingUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetModifierMappingUnchecked(c *xgb.Conn, KeycodesPerModifier byte, Keycodes []Keycode) SetModifierMappingCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(setModifierMappingRequest(c, KeycodesPerModifier, Keycodes), cookie)
return SetModifierMappingCookie{cookie}
}
-// Request reply for SetModifierMapping
-// size: 8
+// SetModifierMappingReply represents the data returned from a SetModifierMapping request.
type SetModifierMappingReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Status byte
}
-// Waits and reads reply data from request SetModifierMapping
+// Reply blocks and returns the reply data for a SetModifierMapping request.
func (cook SetModifierMappingCookie) Reply() (*SetModifierMappingReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -14185,7 +14662,7 @@ func (cook SetModifierMappingCookie) Reply() (*SetModifierMappingReply, error) {
return setModifierMappingReply(buf), nil
}
-// Read reply into structure from buffer for SetModifierMapping
+// setModifierMappingReply reads a byte slice into a SetModifierMappingReply value.
func setModifierMappingReply(buf []byte) *SetModifierMappingReply {
v := new(SetModifierMappingReply)
b := 1 // skip reply determinant
@@ -14203,6 +14680,7 @@ func setModifierMappingReply(buf []byte) *SetModifierMappingReply {
}
// Write request to wire for SetModifierMapping
+// setModifierMappingRequest writes a SetModifierMapping request to a byte slice.
func setModifierMappingRequest(c *xgb.Conn, KeycodesPerModifier byte, Keycodes []Keycode) []byte {
size := xgb.Pad((4 + xgb.Pad(((int(KeycodesPerModifier) * 8) * 1))))
b := 0
@@ -14226,35 +14704,37 @@ func setModifierMappingRequest(c *xgb.Conn, KeycodesPerModifier byte, Keycodes [
return buf
}
-// Request GetModifierMapping
-// size: 4
+// GetModifierMappingCookie is a cookie used only for GetModifierMapping requests.
type GetModifierMappingCookie struct {
*xgb.Cookie
}
+// GetModifierMapping sends a checked request.
+// 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)
return GetModifierMappingCookie{cookie}
}
+// GetModifierMappingUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetModifierMappingUnchecked(c *xgb.Conn) GetModifierMappingCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getModifierMappingRequest(c), cookie)
return GetModifierMappingCookie{cookie}
}
-// Request reply for GetModifierMapping
-// size: (32 + xgb.Pad(((int(KeycodesPerModifier) * 8) * 1)))
+// GetModifierMappingReply represents the data returned from a GetModifierMapping request.
type GetModifierMappingReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
KeycodesPerModifier byte
// padding: 24 bytes
Keycodes []Keycode // size: xgb.Pad(((int(KeycodesPerModifier) * 8) * 1))
}
-// Waits and reads reply data from request GetModifierMapping
+// Reply blocks and returns the reply data for a GetModifierMapping request.
func (cook GetModifierMappingCookie) Reply() (*GetModifierMappingReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -14266,7 +14746,7 @@ func (cook GetModifierMappingCookie) Reply() (*GetModifierMappingReply, error) {
return getModifierMappingReply(buf), nil
}
-// Read reply into structure from buffer for GetModifierMapping
+// getModifierMappingReply reads a byte slice into a GetModifierMappingReply value.
func getModifierMappingReply(buf []byte) *GetModifierMappingReply {
v := new(GetModifierMappingReply)
b := 1 // skip reply determinant
@@ -14293,6 +14773,7 @@ func getModifierMappingReply(buf []byte) *GetModifierMappingReply {
}
// Write request to wire for GetModifierMapping
+// getModifierMappingRequest writes a GetModifierMapping request to a byte slice.
func getModifierMappingRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -14308,30 +14789,35 @@ func getModifierMappingRequest(c *xgb.Conn) []byte {
return buf
}
-// Request NoOperation
-// size: 4
+// NoOperationCookie is a cookie used only for NoOperation requests.
type NoOperationCookie struct {
*xgb.Cookie
}
-// Write request to wire for NoOperation
+// NoOperation sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func NoOperation(c *xgb.Conn) NoOperationCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(noOperationRequest(c), cookie)
return NoOperationCookie{cookie}
}
+// NoOperationChecked sends a checked request.
+// 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)
return NoOperationCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook NoOperationCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for NoOperation
+// noOperationRequest writes a NoOperation request to a byte slice.
func noOperationRequest(c *xgb.Conn) []byte {
size := 4
b := 0
diff --git a/nexgb/xselinux/xselinux.go b/nexgb/xselinux/xselinux.go
index cb0532f..ac11a77 100644
--- a/nexgb/xselinux/xselinux.go
+++ b/nexgb/xselinux/xselinux.go
@@ -2,7 +2,7 @@
package xselinux
/*
- This file was generated by xselinux.xml on May 10 2012 8:04:33pm EDT.
+ This file was generated by xselinux.xml on May 10 2012 11:56:20pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -64,8 +64,6 @@ func init() {
// Skipping definition for base type 'Byte'
-// 'ListItem' struct definition
-// Size: ((12 + xgb.Pad((int(ObjectContextLen) * 1))) + xgb.Pad((int(DataContextLen) * 1)))
type ListItem struct {
Name xproto.Atom
ObjectContextLen uint32
@@ -74,7 +72,7 @@ type ListItem struct {
DataContext string // size: xgb.Pad((int(DataContextLen) * 1))
}
-// Struct read ListItem
+// ListItemRead reads a byte slice into a ListItem value.
func ListItemRead(buf []byte, v *ListItem) int {
b := 0
@@ -104,7 +102,7 @@ func ListItemRead(buf []byte, v *ListItem) int {
return b
}
-// Struct list read ListItem
+// ListItemReadList reads a byte slice into a list of ListItem values.
func ListItemReadList(buf []byte, dest []ListItem) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -114,7 +112,7 @@ func ListItemReadList(buf []byte, dest []ListItem) int {
return xgb.Pad(b)
}
-// Struct write ListItem
+// Bytes writes a ListItem value to a byte slice.
func (v ListItem) Bytes() []byte {
buf := make([]byte, ((12 + xgb.Pad((int(v.ObjectContextLen) * 1))) + xgb.Pad((int(v.DataContextLen) * 1))))
b := 0
@@ -137,7 +135,7 @@ func (v ListItem) Bytes() []byte {
return buf
}
-// Write struct list ListItem
+// ListItemListBytes writes a list of %s(MISSING) values to a byte slice.
func ListItemListBytes(buf []byte, list []ListItem) int {
b := 0
var structBytes []byte
@@ -149,7 +147,7 @@ func ListItemListBytes(buf []byte, list []ListItem) int {
return b
}
-// Struct list size ListItem
+// ListItemListSize computes the size (bytes) of a list of ListItem values.
func ListItemListSize(list []ListItem) int {
size := 0
for _, item := range list {
@@ -158,35 +156,37 @@ func ListItemListSize(list []ListItem) int {
return size
}
-// Request QueryVersion
-// size: 8
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, ClientMajor, ClientMinor), cookie)
return QueryVersionCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, ClientMajor, ClientMinor), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 12
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ServerMajor uint16
ServerMinor uint16
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -198,7 +198,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -221,6 +221,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// 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 {
size := 8
b := 0
@@ -244,30 +245,35 @@ func queryVersionRequest(c *xgb.Conn, ClientMajor byte, ClientMinor byte) []byte
return buf
}
-// Request SetDeviceCreateContext
-// size: xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
+// SetDeviceCreateContextCookie is a cookie used only for SetDeviceCreateContext requests.
type SetDeviceCreateContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetDeviceCreateContext
+// SetDeviceCreateContext sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetDeviceCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetDeviceCreateContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setDeviceCreateContextRequest(c, ContextLen, Context), cookie)
return SetDeviceCreateContextCookie{cookie}
}
+// SetDeviceCreateContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetDeviceCreateContextCookie.Check()
func SetDeviceCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetDeviceCreateContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setDeviceCreateContextRequest(c, ContextLen, Context), cookie)
return SetDeviceCreateContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetDeviceCreateContextCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetDeviceCreateContext
+// setDeviceCreateContextRequest writes a SetDeviceCreateContext request to a byte slice.
func setDeviceCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte {
size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
b := 0
@@ -291,36 +297,38 @@ func setDeviceCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context strin
return buf
}
-// Request GetDeviceCreateContext
-// size: 4
+// GetDeviceCreateContextCookie is a cookie used only for GetDeviceCreateContext requests.
type GetDeviceCreateContextCookie struct {
*xgb.Cookie
}
+// GetDeviceCreateContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDeviceCreateContextCookie.Reply()
func GetDeviceCreateContext(c *xgb.Conn) GetDeviceCreateContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceCreateContextRequest(c), cookie)
return GetDeviceCreateContextCookie{cookie}
}
+// GetDeviceCreateContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceCreateContextUnchecked(c *xgb.Conn) GetDeviceCreateContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceCreateContextRequest(c), cookie)
return GetDeviceCreateContextCookie{cookie}
}
-// Request reply for GetDeviceCreateContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetDeviceCreateContextReply represents the data returned from a GetDeviceCreateContext request.
type GetDeviceCreateContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetDeviceCreateContext
+// Reply blocks and returns the reply data for a GetDeviceCreateContext request.
func (cook GetDeviceCreateContextCookie) Reply() (*GetDeviceCreateContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -332,7 +340,7 @@ func (cook GetDeviceCreateContextCookie) Reply() (*GetDeviceCreateContextReply,
return getDeviceCreateContextReply(buf), nil
}
-// Read reply into structure from buffer for GetDeviceCreateContext
+// getDeviceCreateContextReply reads a byte slice into a GetDeviceCreateContextReply value.
func getDeviceCreateContextReply(buf []byte) *GetDeviceCreateContextReply {
v := new(GetDeviceCreateContextReply)
b := 1 // skip reply determinant
@@ -361,6 +369,7 @@ func getDeviceCreateContextReply(buf []byte) *GetDeviceCreateContextReply {
}
// Write request to wire for GetDeviceCreateContext
+// getDeviceCreateContextRequest writes a GetDeviceCreateContext request to a byte slice.
func getDeviceCreateContextRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -378,30 +387,35 @@ func getDeviceCreateContextRequest(c *xgb.Conn) []byte {
return buf
}
-// Request SetDeviceContext
-// size: xgb.Pad((12 + xgb.Pad((int(ContextLen) * 1))))
+// SetDeviceContextCookie is a cookie used only for SetDeviceContext requests.
type SetDeviceContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetDeviceContext
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(setDeviceContextRequest(c, Device, ContextLen, Context), cookie)
return SetDeviceContextCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(setDeviceContextRequest(c, Device, ContextLen, Context), cookie)
return SetDeviceContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((12 + xgb.Pad((int(ContextLen) * 1))))
b := 0
@@ -428,36 +442,38 @@ func setDeviceContextRequest(c *xgb.Conn, Device uint32, ContextLen uint32, Cont
return buf
}
-// Request GetDeviceContext
-// size: 8
+// GetDeviceContextCookie is a cookie used only for GetDeviceContext requests.
type GetDeviceContextCookie struct {
*xgb.Cookie
}
+// GetDeviceContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetDeviceContextCookie.Reply()
func GetDeviceContext(c *xgb.Conn, Device uint32) GetDeviceContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceContextRequest(c, Device), cookie)
return GetDeviceContextCookie{cookie}
}
+// GetDeviceContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceContextUnchecked(c *xgb.Conn, Device uint32) GetDeviceContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceContextRequest(c, Device), cookie)
return GetDeviceContextCookie{cookie}
}
-// Request reply for GetDeviceContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetDeviceContextReply represents the data returned from a GetDeviceContext request.
type GetDeviceContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetDeviceContext
+// Reply blocks and returns the reply data for a GetDeviceContext request.
func (cook GetDeviceContextCookie) Reply() (*GetDeviceContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -469,7 +485,7 @@ func (cook GetDeviceContextCookie) Reply() (*GetDeviceContextReply, error) {
return getDeviceContextReply(buf), nil
}
-// Read reply into structure from buffer for GetDeviceContext
+// getDeviceContextReply reads a byte slice into a GetDeviceContextReply value.
func getDeviceContextReply(buf []byte) *GetDeviceContextReply {
v := new(GetDeviceContextReply)
b := 1 // skip reply determinant
@@ -498,6 +514,7 @@ func getDeviceContextReply(buf []byte) *GetDeviceContextReply {
}
// Write request to wire for GetDeviceContext
+// getDeviceContextRequest writes a GetDeviceContext request to a byte slice.
func getDeviceContextRequest(c *xgb.Conn, Device uint32) []byte {
size := 8
b := 0
@@ -518,30 +535,35 @@ func getDeviceContextRequest(c *xgb.Conn, Device uint32) []byte {
return buf
}
-// Request SetWindowCreateContext
-// size: xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
+// SetWindowCreateContextCookie is a cookie used only for SetWindowCreateContext requests.
type SetWindowCreateContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetWindowCreateContext
+// SetWindowCreateContext sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetWindowCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetWindowCreateContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setWindowCreateContextRequest(c, ContextLen, Context), cookie)
return SetWindowCreateContextCookie{cookie}
}
+// SetWindowCreateContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetWindowCreateContextCookie.Check()
func SetWindowCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetWindowCreateContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setWindowCreateContextRequest(c, ContextLen, Context), cookie)
return SetWindowCreateContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetWindowCreateContextCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetWindowCreateContext
+// setWindowCreateContextRequest writes a SetWindowCreateContext request to a byte slice.
func setWindowCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte {
size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
b := 0
@@ -565,36 +587,38 @@ func setWindowCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context strin
return buf
}
-// Request GetWindowCreateContext
-// size: 4
+// GetWindowCreateContextCookie is a cookie used only for GetWindowCreateContext requests.
type GetWindowCreateContextCookie struct {
*xgb.Cookie
}
+// GetWindowCreateContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetWindowCreateContextCookie.Reply()
func GetWindowCreateContext(c *xgb.Conn) GetWindowCreateContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getWindowCreateContextRequest(c), cookie)
return GetWindowCreateContextCookie{cookie}
}
+// GetWindowCreateContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetWindowCreateContextUnchecked(c *xgb.Conn) GetWindowCreateContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getWindowCreateContextRequest(c), cookie)
return GetWindowCreateContextCookie{cookie}
}
-// Request reply for GetWindowCreateContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetWindowCreateContextReply represents the data returned from a GetWindowCreateContext request.
type GetWindowCreateContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetWindowCreateContext
+// Reply blocks and returns the reply data for a GetWindowCreateContext request.
func (cook GetWindowCreateContextCookie) Reply() (*GetWindowCreateContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -606,7 +630,7 @@ func (cook GetWindowCreateContextCookie) Reply() (*GetWindowCreateContextReply,
return getWindowCreateContextReply(buf), nil
}
-// Read reply into structure from buffer for GetWindowCreateContext
+// getWindowCreateContextReply reads a byte slice into a GetWindowCreateContextReply value.
func getWindowCreateContextReply(buf []byte) *GetWindowCreateContextReply {
v := new(GetWindowCreateContextReply)
b := 1 // skip reply determinant
@@ -635,6 +659,7 @@ func getWindowCreateContextReply(buf []byte) *GetWindowCreateContextReply {
}
// Write request to wire for GetWindowCreateContext
+// getWindowCreateContextRequest writes a GetWindowCreateContext request to a byte slice.
func getWindowCreateContextRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -652,36 +677,38 @@ func getWindowCreateContextRequest(c *xgb.Conn) []byte {
return buf
}
-// Request GetWindowContext
-// size: 8
+// GetWindowContextCookie is a cookie used only for GetWindowContext requests.
type GetWindowContextCookie struct {
*xgb.Cookie
}
+// GetWindowContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetWindowContextCookie.Reply()
func GetWindowContext(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getWindowContextRequest(c, Window), cookie)
return GetWindowContextCookie{cookie}
}
+// GetWindowContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetWindowContextUnchecked(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getWindowContextRequest(c, Window), cookie)
return GetWindowContextCookie{cookie}
}
-// Request reply for GetWindowContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetWindowContextReply represents the data returned from a GetWindowContext request.
type GetWindowContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetWindowContext
+// Reply blocks and returns the reply data for a GetWindowContext request.
func (cook GetWindowContextCookie) Reply() (*GetWindowContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -693,7 +720,7 @@ func (cook GetWindowContextCookie) Reply() (*GetWindowContextReply, error) {
return getWindowContextReply(buf), nil
}
-// Read reply into structure from buffer for GetWindowContext
+// getWindowContextReply reads a byte slice into a GetWindowContextReply value.
func getWindowContextReply(buf []byte) *GetWindowContextReply {
v := new(GetWindowContextReply)
b := 1 // skip reply determinant
@@ -722,6 +749,7 @@ func getWindowContextReply(buf []byte) *GetWindowContextReply {
}
// Write request to wire for GetWindowContext
+// getWindowContextRequest writes a GetWindowContext request to a byte slice.
func getWindowContextRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -742,30 +770,35 @@ func getWindowContextRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request SetPropertyCreateContext
-// size: xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
+// SetPropertyCreateContextCookie is a cookie used only for SetPropertyCreateContext requests.
type SetPropertyCreateContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetPropertyCreateContext
+// SetPropertyCreateContext sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetPropertyCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyCreateContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setPropertyCreateContextRequest(c, ContextLen, Context), cookie)
return SetPropertyCreateContextCookie{cookie}
}
+// SetPropertyCreateContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetPropertyCreateContextCookie.Check()
func SetPropertyCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyCreateContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setPropertyCreateContextRequest(c, ContextLen, Context), cookie)
return SetPropertyCreateContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetPropertyCreateContextCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetPropertyCreateContext
+// setPropertyCreateContextRequest writes a SetPropertyCreateContext request to a byte slice.
func setPropertyCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte {
size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
b := 0
@@ -789,36 +822,38 @@ func setPropertyCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context str
return buf
}
-// Request GetPropertyCreateContext
-// size: 4
+// GetPropertyCreateContextCookie is a cookie used only for GetPropertyCreateContext requests.
type GetPropertyCreateContextCookie struct {
*xgb.Cookie
}
+// GetPropertyCreateContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetPropertyCreateContextCookie.Reply()
func GetPropertyCreateContext(c *xgb.Conn) GetPropertyCreateContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getPropertyCreateContextRequest(c), cookie)
return GetPropertyCreateContextCookie{cookie}
}
+// GetPropertyCreateContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPropertyCreateContextUnchecked(c *xgb.Conn) GetPropertyCreateContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPropertyCreateContextRequest(c), cookie)
return GetPropertyCreateContextCookie{cookie}
}
-// Request reply for GetPropertyCreateContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetPropertyCreateContextReply represents the data returned from a GetPropertyCreateContext request.
type GetPropertyCreateContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetPropertyCreateContext
+// Reply blocks and returns the reply data for a GetPropertyCreateContext request.
func (cook GetPropertyCreateContextCookie) Reply() (*GetPropertyCreateContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -830,7 +865,7 @@ func (cook GetPropertyCreateContextCookie) Reply() (*GetPropertyCreateContextRep
return getPropertyCreateContextReply(buf), nil
}
-// Read reply into structure from buffer for GetPropertyCreateContext
+// getPropertyCreateContextReply reads a byte slice into a GetPropertyCreateContextReply value.
func getPropertyCreateContextReply(buf []byte) *GetPropertyCreateContextReply {
v := new(GetPropertyCreateContextReply)
b := 1 // skip reply determinant
@@ -859,6 +894,7 @@ func getPropertyCreateContextReply(buf []byte) *GetPropertyCreateContextReply {
}
// Write request to wire for GetPropertyCreateContext
+// getPropertyCreateContextRequest writes a GetPropertyCreateContext request to a byte slice.
func getPropertyCreateContextRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -876,30 +912,35 @@ func getPropertyCreateContextRequest(c *xgb.Conn) []byte {
return buf
}
-// Request SetPropertyUseContext
-// size: xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
+// SetPropertyUseContextCookie is a cookie used only for SetPropertyUseContext requests.
type SetPropertyUseContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetPropertyUseContext
+// SetPropertyUseContext sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetPropertyUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyUseContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setPropertyUseContextRequest(c, ContextLen, Context), cookie)
return SetPropertyUseContextCookie{cookie}
}
+// SetPropertyUseContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetPropertyUseContextCookie.Check()
func SetPropertyUseContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyUseContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setPropertyUseContextRequest(c, ContextLen, Context), cookie)
return SetPropertyUseContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetPropertyUseContextCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetPropertyUseContext
+// setPropertyUseContextRequest writes a SetPropertyUseContext request to a byte slice.
func setPropertyUseContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte {
size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
b := 0
@@ -923,36 +964,38 @@ func setPropertyUseContextRequest(c *xgb.Conn, ContextLen uint32, Context string
return buf
}
-// Request GetPropertyUseContext
-// size: 4
+// GetPropertyUseContextCookie is a cookie used only for GetPropertyUseContext requests.
type GetPropertyUseContextCookie struct {
*xgb.Cookie
}
+// GetPropertyUseContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetPropertyUseContextCookie.Reply()
func GetPropertyUseContext(c *xgb.Conn) GetPropertyUseContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getPropertyUseContextRequest(c), cookie)
return GetPropertyUseContextCookie{cookie}
}
+// GetPropertyUseContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPropertyUseContextUnchecked(c *xgb.Conn) GetPropertyUseContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPropertyUseContextRequest(c), cookie)
return GetPropertyUseContextCookie{cookie}
}
-// Request reply for GetPropertyUseContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetPropertyUseContextReply represents the data returned from a GetPropertyUseContext request.
type GetPropertyUseContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetPropertyUseContext
+// Reply blocks and returns the reply data for a GetPropertyUseContext request.
func (cook GetPropertyUseContextCookie) Reply() (*GetPropertyUseContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -964,7 +1007,7 @@ func (cook GetPropertyUseContextCookie) Reply() (*GetPropertyUseContextReply, er
return getPropertyUseContextReply(buf), nil
}
-// Read reply into structure from buffer for GetPropertyUseContext
+// getPropertyUseContextReply reads a byte slice into a GetPropertyUseContextReply value.
func getPropertyUseContextReply(buf []byte) *GetPropertyUseContextReply {
v := new(GetPropertyUseContextReply)
b := 1 // skip reply determinant
@@ -993,6 +1036,7 @@ func getPropertyUseContextReply(buf []byte) *GetPropertyUseContextReply {
}
// Write request to wire for GetPropertyUseContext
+// getPropertyUseContextRequest writes a GetPropertyUseContext request to a byte slice.
func getPropertyUseContextRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -1010,36 +1054,38 @@ func getPropertyUseContextRequest(c *xgb.Conn) []byte {
return buf
}
-// Request GetPropertyContext
-// size: 12
+// GetPropertyContextCookie is a cookie used only for GetPropertyContext requests.
type GetPropertyContextCookie struct {
*xgb.Cookie
}
+// GetPropertyContext sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getPropertyContextRequest(c, Window, Property), cookie)
return GetPropertyContextCookie{cookie}
}
+// GetPropertyContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPropertyContextUnchecked(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPropertyContextRequest(c, Window, Property), cookie)
return GetPropertyContextCookie{cookie}
}
-// Request reply for GetPropertyContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetPropertyContextReply represents the data returned from a GetPropertyContext request.
type GetPropertyContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetPropertyContext
+// Reply blocks and returns the reply data for a GetPropertyContext request.
func (cook GetPropertyContextCookie) Reply() (*GetPropertyContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1051,7 +1097,7 @@ func (cook GetPropertyContextCookie) Reply() (*GetPropertyContextReply, error) {
return getPropertyContextReply(buf), nil
}
-// Read reply into structure from buffer for GetPropertyContext
+// getPropertyContextReply reads a byte slice into a GetPropertyContextReply value.
func getPropertyContextReply(buf []byte) *GetPropertyContextReply {
v := new(GetPropertyContextReply)
b := 1 // skip reply determinant
@@ -1080,6 +1126,7 @@ func getPropertyContextReply(buf []byte) *GetPropertyContextReply {
}
// Write request to wire for GetPropertyContext
+// getPropertyContextRequest writes a GetPropertyContext request to a byte slice.
func getPropertyContextRequest(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) []byte {
size := 12
b := 0
@@ -1103,36 +1150,38 @@ func getPropertyContextRequest(c *xgb.Conn, Window xproto.Window, Property xprot
return buf
}
-// Request GetPropertyDataContext
-// size: 12
+// GetPropertyDataContextCookie is a cookie used only for GetPropertyDataContext requests.
type GetPropertyDataContextCookie struct {
*xgb.Cookie
}
+// GetPropertyDataContext sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(getPropertyDataContextRequest(c, Window, Property), cookie)
return GetPropertyDataContextCookie{cookie}
}
+// GetPropertyDataContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPropertyDataContextUnchecked(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyDataContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPropertyDataContextRequest(c, Window, Property), cookie)
return GetPropertyDataContextCookie{cookie}
}
-// Request reply for GetPropertyDataContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetPropertyDataContextReply represents the data returned from a GetPropertyDataContext request.
type GetPropertyDataContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetPropertyDataContext
+// Reply blocks and returns the reply data for a GetPropertyDataContext request.
func (cook GetPropertyDataContextCookie) Reply() (*GetPropertyDataContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1144,7 +1193,7 @@ func (cook GetPropertyDataContextCookie) Reply() (*GetPropertyDataContextReply,
return getPropertyDataContextReply(buf), nil
}
-// Read reply into structure from buffer for GetPropertyDataContext
+// getPropertyDataContextReply reads a byte slice into a GetPropertyDataContextReply value.
func getPropertyDataContextReply(buf []byte) *GetPropertyDataContextReply {
v := new(GetPropertyDataContextReply)
b := 1 // skip reply determinant
@@ -1173,6 +1222,7 @@ func getPropertyDataContextReply(buf []byte) *GetPropertyDataContextReply {
}
// Write request to wire for GetPropertyDataContext
+// getPropertyDataContextRequest writes a GetPropertyDataContext request to a byte slice.
func getPropertyDataContextRequest(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) []byte {
size := 12
b := 0
@@ -1196,36 +1246,38 @@ func getPropertyDataContextRequest(c *xgb.Conn, Window xproto.Window, Property x
return buf
}
-// Request ListProperties
-// size: 8
+// ListPropertiesCookie is a cookie used only for ListProperties requests.
type ListPropertiesCookie struct {
*xgb.Cookie
}
+// ListProperties sends a checked request.
+// If an error occurs, it will be returned with the reply by calling ListPropertiesCookie.Reply()
func ListProperties(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(listPropertiesRequest(c, Window), cookie)
return ListPropertiesCookie{cookie}
}
+// ListPropertiesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListPropertiesUnchecked(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listPropertiesRequest(c, Window), cookie)
return ListPropertiesCookie{cookie}
}
-// Request reply for ListProperties
-// size: (32 + ListItemListSize(Properties))
+// ListPropertiesReply represents the data returned from a ListProperties request.
type ListPropertiesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
PropertiesLen uint32
// padding: 20 bytes
Properties []ListItem // size: ListItemListSize(Properties)
}
-// Waits and reads reply data from request ListProperties
+// Reply blocks and returns the reply data for a ListProperties request.
func (cook ListPropertiesCookie) Reply() (*ListPropertiesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1237,7 +1289,7 @@ func (cook ListPropertiesCookie) Reply() (*ListPropertiesReply, error) {
return listPropertiesReply(buf), nil
}
-// Read reply into structure from buffer for ListProperties
+// listPropertiesReply reads a byte slice into a ListPropertiesReply value.
func listPropertiesReply(buf []byte) *ListPropertiesReply {
v := new(ListPropertiesReply)
b := 1 // skip reply determinant
@@ -1262,6 +1314,7 @@ func listPropertiesReply(buf []byte) *ListPropertiesReply {
}
// Write request to wire for ListProperties
+// listPropertiesRequest writes a ListProperties request to a byte slice.
func listPropertiesRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -1282,30 +1335,35 @@ func listPropertiesRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request SetSelectionCreateContext
-// size: xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
+// SetSelectionCreateContextCookie is a cookie used only for SetSelectionCreateContext requests.
type SetSelectionCreateContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetSelectionCreateContext
+// SetSelectionCreateContext sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetSelectionCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionCreateContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setSelectionCreateContextRequest(c, ContextLen, Context), cookie)
return SetSelectionCreateContextCookie{cookie}
}
+// SetSelectionCreateContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetSelectionCreateContextCookie.Check()
func SetSelectionCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionCreateContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setSelectionCreateContextRequest(c, ContextLen, Context), cookie)
return SetSelectionCreateContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetSelectionCreateContextCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetSelectionCreateContext
+// setSelectionCreateContextRequest writes a SetSelectionCreateContext request to a byte slice.
func setSelectionCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte {
size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
b := 0
@@ -1329,36 +1387,38 @@ func setSelectionCreateContextRequest(c *xgb.Conn, ContextLen uint32, Context st
return buf
}
-// Request GetSelectionCreateContext
-// size: 4
+// GetSelectionCreateContextCookie is a cookie used only for GetSelectionCreateContext requests.
type GetSelectionCreateContextCookie struct {
*xgb.Cookie
}
+// GetSelectionCreateContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetSelectionCreateContextCookie.Reply()
func GetSelectionCreateContext(c *xgb.Conn) GetSelectionCreateContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getSelectionCreateContextRequest(c), cookie)
return GetSelectionCreateContextCookie{cookie}
}
+// GetSelectionCreateContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetSelectionCreateContextUnchecked(c *xgb.Conn) GetSelectionCreateContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getSelectionCreateContextRequest(c), cookie)
return GetSelectionCreateContextCookie{cookie}
}
-// Request reply for GetSelectionCreateContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetSelectionCreateContextReply represents the data returned from a GetSelectionCreateContext request.
type GetSelectionCreateContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetSelectionCreateContext
+// Reply blocks and returns the reply data for a GetSelectionCreateContext request.
func (cook GetSelectionCreateContextCookie) Reply() (*GetSelectionCreateContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1370,7 +1430,7 @@ func (cook GetSelectionCreateContextCookie) Reply() (*GetSelectionCreateContextR
return getSelectionCreateContextReply(buf), nil
}
-// Read reply into structure from buffer for GetSelectionCreateContext
+// getSelectionCreateContextReply reads a byte slice into a GetSelectionCreateContextReply value.
func getSelectionCreateContextReply(buf []byte) *GetSelectionCreateContextReply {
v := new(GetSelectionCreateContextReply)
b := 1 // skip reply determinant
@@ -1399,6 +1459,7 @@ func getSelectionCreateContextReply(buf []byte) *GetSelectionCreateContextReply
}
// Write request to wire for GetSelectionCreateContext
+// getSelectionCreateContextRequest writes a GetSelectionCreateContext request to a byte slice.
func getSelectionCreateContextRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -1416,30 +1477,35 @@ func getSelectionCreateContextRequest(c *xgb.Conn) []byte {
return buf
}
-// Request SetSelectionUseContext
-// size: xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
+// SetSelectionUseContextCookie is a cookie used only for SetSelectionUseContext requests.
type SetSelectionUseContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetSelectionUseContext
+// SetSelectionUseContext sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetSelectionUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionUseContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setSelectionUseContextRequest(c, ContextLen, Context), cookie)
return SetSelectionUseContextCookie{cookie}
}
+// SetSelectionUseContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetSelectionUseContextCookie.Check()
func SetSelectionUseContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionUseContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setSelectionUseContextRequest(c, ContextLen, Context), cookie)
return SetSelectionUseContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetSelectionUseContextCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetSelectionUseContext
+// setSelectionUseContextRequest writes a SetSelectionUseContext request to a byte slice.
func setSelectionUseContextRequest(c *xgb.Conn, ContextLen uint32, Context string) []byte {
size := xgb.Pad((8 + xgb.Pad((int(ContextLen) * 1))))
b := 0
@@ -1463,36 +1529,38 @@ func setSelectionUseContextRequest(c *xgb.Conn, ContextLen uint32, Context strin
return buf
}
-// Request GetSelectionUseContext
-// size: 4
+// GetSelectionUseContextCookie is a cookie used only for GetSelectionUseContext requests.
type GetSelectionUseContextCookie struct {
*xgb.Cookie
}
+// GetSelectionUseContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetSelectionUseContextCookie.Reply()
func GetSelectionUseContext(c *xgb.Conn) GetSelectionUseContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getSelectionUseContextRequest(c), cookie)
return GetSelectionUseContextCookie{cookie}
}
+// GetSelectionUseContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetSelectionUseContextUnchecked(c *xgb.Conn) GetSelectionUseContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getSelectionUseContextRequest(c), cookie)
return GetSelectionUseContextCookie{cookie}
}
-// Request reply for GetSelectionUseContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetSelectionUseContextReply represents the data returned from a GetSelectionUseContext request.
type GetSelectionUseContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetSelectionUseContext
+// Reply blocks and returns the reply data for a GetSelectionUseContext request.
func (cook GetSelectionUseContextCookie) Reply() (*GetSelectionUseContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1504,7 +1572,7 @@ func (cook GetSelectionUseContextCookie) Reply() (*GetSelectionUseContextReply,
return getSelectionUseContextReply(buf), nil
}
-// Read reply into structure from buffer for GetSelectionUseContext
+// getSelectionUseContextReply reads a byte slice into a GetSelectionUseContextReply value.
func getSelectionUseContextReply(buf []byte) *GetSelectionUseContextReply {
v := new(GetSelectionUseContextReply)
b := 1 // skip reply determinant
@@ -1533,6 +1601,7 @@ func getSelectionUseContextReply(buf []byte) *GetSelectionUseContextReply {
}
// Write request to wire for GetSelectionUseContext
+// getSelectionUseContextRequest writes a GetSelectionUseContext request to a byte slice.
func getSelectionUseContextRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -1550,36 +1619,38 @@ func getSelectionUseContextRequest(c *xgb.Conn) []byte {
return buf
}
-// Request GetSelectionContext
-// size: 8
+// GetSelectionContextCookie is a cookie used only for GetSelectionContext requests.
type GetSelectionContextCookie struct {
*xgb.Cookie
}
+// GetSelectionContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetSelectionContextCookie.Reply()
func GetSelectionContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getSelectionContextRequest(c, Selection), cookie)
return GetSelectionContextCookie{cookie}
}
+// GetSelectionContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetSelectionContextUnchecked(c *xgb.Conn, Selection xproto.Atom) GetSelectionContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getSelectionContextRequest(c, Selection), cookie)
return GetSelectionContextCookie{cookie}
}
-// Request reply for GetSelectionContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetSelectionContextReply represents the data returned from a GetSelectionContext request.
type GetSelectionContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetSelectionContext
+// Reply blocks and returns the reply data for a GetSelectionContext request.
func (cook GetSelectionContextCookie) Reply() (*GetSelectionContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1591,7 +1662,7 @@ func (cook GetSelectionContextCookie) Reply() (*GetSelectionContextReply, error)
return getSelectionContextReply(buf), nil
}
-// Read reply into structure from buffer for GetSelectionContext
+// getSelectionContextReply reads a byte slice into a GetSelectionContextReply value.
func getSelectionContextReply(buf []byte) *GetSelectionContextReply {
v := new(GetSelectionContextReply)
b := 1 // skip reply determinant
@@ -1620,6 +1691,7 @@ func getSelectionContextReply(buf []byte) *GetSelectionContextReply {
}
// Write request to wire for GetSelectionContext
+// getSelectionContextRequest writes a GetSelectionContext request to a byte slice.
func getSelectionContextRequest(c *xgb.Conn, Selection xproto.Atom) []byte {
size := 8
b := 0
@@ -1640,36 +1712,38 @@ func getSelectionContextRequest(c *xgb.Conn, Selection xproto.Atom) []byte {
return buf
}
-// Request GetSelectionDataContext
-// size: 8
+// GetSelectionDataContextCookie is a cookie used only for GetSelectionDataContext requests.
type GetSelectionDataContextCookie struct {
*xgb.Cookie
}
+// GetSelectionDataContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetSelectionDataContextCookie.Reply()
func GetSelectionDataContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionDataContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getSelectionDataContextRequest(c, Selection), cookie)
return GetSelectionDataContextCookie{cookie}
}
+// GetSelectionDataContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetSelectionDataContextUnchecked(c *xgb.Conn, Selection xproto.Atom) GetSelectionDataContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getSelectionDataContextRequest(c, Selection), cookie)
return GetSelectionDataContextCookie{cookie}
}
-// Request reply for GetSelectionDataContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetSelectionDataContextReply represents the data returned from a GetSelectionDataContext request.
type GetSelectionDataContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetSelectionDataContext
+// Reply blocks and returns the reply data for a GetSelectionDataContext request.
func (cook GetSelectionDataContextCookie) Reply() (*GetSelectionDataContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1681,7 +1755,7 @@ func (cook GetSelectionDataContextCookie) Reply() (*GetSelectionDataContextReply
return getSelectionDataContextReply(buf), nil
}
-// Read reply into structure from buffer for GetSelectionDataContext
+// getSelectionDataContextReply reads a byte slice into a GetSelectionDataContextReply value.
func getSelectionDataContextReply(buf []byte) *GetSelectionDataContextReply {
v := new(GetSelectionDataContextReply)
b := 1 // skip reply determinant
@@ -1710,6 +1784,7 @@ func getSelectionDataContextReply(buf []byte) *GetSelectionDataContextReply {
}
// Write request to wire for GetSelectionDataContext
+// getSelectionDataContextRequest writes a GetSelectionDataContext request to a byte slice.
func getSelectionDataContextRequest(c *xgb.Conn, Selection xproto.Atom) []byte {
size := 8
b := 0
@@ -1730,36 +1805,38 @@ func getSelectionDataContextRequest(c *xgb.Conn, Selection xproto.Atom) []byte {
return buf
}
-// Request ListSelections
-// size: 4
+// ListSelectionsCookie is a cookie used only for ListSelections requests.
type ListSelectionsCookie struct {
*xgb.Cookie
}
+// ListSelections sends a checked request.
+// If an error occurs, it will be returned with the reply by calling ListSelectionsCookie.Reply()
func ListSelections(c *xgb.Conn) ListSelectionsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(listSelectionsRequest(c), cookie)
return ListSelectionsCookie{cookie}
}
+// ListSelectionsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListSelectionsUnchecked(c *xgb.Conn) ListSelectionsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listSelectionsRequest(c), cookie)
return ListSelectionsCookie{cookie}
}
-// Request reply for ListSelections
-// size: (32 + ListItemListSize(Selections))
+// ListSelectionsReply represents the data returned from a ListSelections request.
type ListSelectionsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
SelectionsLen uint32
// padding: 20 bytes
Selections []ListItem // size: ListItemListSize(Selections)
}
-// Waits and reads reply data from request ListSelections
+// Reply blocks and returns the reply data for a ListSelections request.
func (cook ListSelectionsCookie) Reply() (*ListSelectionsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1771,7 +1848,7 @@ func (cook ListSelectionsCookie) Reply() (*ListSelectionsReply, error) {
return listSelectionsReply(buf), nil
}
-// Read reply into structure from buffer for ListSelections
+// listSelectionsReply reads a byte slice into a ListSelectionsReply value.
func listSelectionsReply(buf []byte) *ListSelectionsReply {
v := new(ListSelectionsReply)
b := 1 // skip reply determinant
@@ -1796,6 +1873,7 @@ func listSelectionsReply(buf []byte) *ListSelectionsReply {
}
// Write request to wire for ListSelections
+// listSelectionsRequest writes a ListSelections request to a byte slice.
func listSelectionsRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -1813,36 +1891,38 @@ func listSelectionsRequest(c *xgb.Conn) []byte {
return buf
}
-// Request GetClientContext
-// size: 8
+// GetClientContextCookie is a cookie used only for GetClientContext requests.
type GetClientContextCookie struct {
*xgb.Cookie
}
+// GetClientContext sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetClientContextCookie.Reply()
func GetClientContext(c *xgb.Conn, Resource uint32) GetClientContextCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getClientContextRequest(c, Resource), cookie)
return GetClientContextCookie{cookie}
}
+// GetClientContextUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetClientContextUnchecked(c *xgb.Conn, Resource uint32) GetClientContextCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getClientContextRequest(c, Resource), cookie)
return GetClientContextCookie{cookie}
}
-// Request reply for GetClientContext
-// size: (32 + xgb.Pad((int(ContextLen) * 1)))
+// GetClientContextReply represents the data returned from a GetClientContext request.
type GetClientContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ContextLen uint32
// padding: 20 bytes
Context string // size: xgb.Pad((int(ContextLen) * 1))
}
-// Waits and reads reply data from request GetClientContext
+// Reply blocks and returns the reply data for a GetClientContext request.
func (cook GetClientContextCookie) Reply() (*GetClientContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1854,7 +1934,7 @@ func (cook GetClientContextCookie) Reply() (*GetClientContextReply, error) {
return getClientContextReply(buf), nil
}
-// Read reply into structure from buffer for GetClientContext
+// getClientContextReply reads a byte slice into a GetClientContextReply value.
func getClientContextReply(buf []byte) *GetClientContextReply {
v := new(GetClientContextReply)
b := 1 // skip reply determinant
@@ -1883,6 +1963,7 @@ func getClientContextReply(buf []byte) *GetClientContextReply {
}
// Write request to wire for GetClientContext
+// getClientContextRequest writes a GetClientContext request to a byte slice.
func getClientContextRequest(c *xgb.Conn, Resource uint32) []byte {
size := 8
b := 0
diff --git a/nexgb/xtest/xtest.go b/nexgb/xtest/xtest.go
index 357b325..e2a2d80 100644
--- a/nexgb/xtest/xtest.go
+++ b/nexgb/xtest/xtest.go
@@ -2,7 +2,7 @@
package xtest
/*
- This file was generated by xtest.xml on May 10 2012 8:04:33pm EDT.
+ This file was generated by xtest.xml on May 10 2012 11:56:20pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -69,34 +69,36 @@ const (
CursorCurrent = 1
)
-// Request GetVersion
-// size: 8
+// GetVersionCookie is a cookie used only for GetVersion requests.
type GetVersionCookie struct {
*xgb.Cookie
}
+// 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, MajorVersion byte, MinorVersion uint16) GetVersionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getVersionRequest(c, MajorVersion, MinorVersion), cookie)
return GetVersionCookie{cookie}
}
+// 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, MajorVersion byte, MinorVersion uint16) GetVersionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getVersionRequest(c, MajorVersion, MinorVersion), cookie)
return GetVersionCookie{cookie}
}
-// Request reply for GetVersion
-// size: 10
+// GetVersionReply represents the data returned from a GetVersion request.
type GetVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
MajorVersion byte
MinorVersion uint16
}
-// Waits and reads reply data from request GetVersion
+// Reply blocks and returns the reply data for a GetVersion request.
func (cook GetVersionCookie) Reply() (*GetVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -108,7 +110,7 @@ func (cook GetVersionCookie) Reply() (*GetVersionReply, error) {
return getVersionReply(buf), nil
}
-// Read reply into structure from buffer for GetVersion
+// getVersionReply reads a byte slice into a GetVersionReply value.
func getVersionReply(buf []byte) *GetVersionReply {
v := new(GetVersionReply)
b := 1 // skip reply determinant
@@ -129,6 +131,7 @@ func getVersionReply(buf []byte) *GetVersionReply {
}
// Write request to wire for GetVersion
+// getVersionRequest writes a GetVersion request to a byte slice.
func getVersionRequest(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) []byte {
size := 8
b := 0
@@ -154,33 +157,35 @@ func getVersionRequest(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) []by
return buf
}
-// Request CompareCursor
-// size: 12
+// CompareCursorCookie is a cookie used only for CompareCursor requests.
type CompareCursorCookie struct {
*xgb.Cookie
}
+// CompareCursor sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(compareCursorRequest(c, Window, Cursor), cookie)
return CompareCursorCookie{cookie}
}
+// CompareCursorUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CompareCursorUnchecked(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) CompareCursorCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(compareCursorRequest(c, Window, Cursor), cookie)
return CompareCursorCookie{cookie}
}
-// Request reply for CompareCursor
-// size: 8
+// CompareCursorReply represents the data returned from a CompareCursor request.
type CompareCursorReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Same bool
}
-// Waits and reads reply data from request CompareCursor
+// Reply blocks and returns the reply data for a CompareCursor request.
func (cook CompareCursorCookie) Reply() (*CompareCursorReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -192,7 +197,7 @@ func (cook CompareCursorCookie) Reply() (*CompareCursorReply, error) {
return compareCursorReply(buf), nil
}
-// Read reply into structure from buffer for CompareCursor
+// compareCursorReply reads a byte slice into a CompareCursorReply value.
func compareCursorReply(buf []byte) *CompareCursorReply {
v := new(CompareCursorReply)
b := 1 // skip reply determinant
@@ -214,6 +219,7 @@ func compareCursorReply(buf []byte) *CompareCursorReply {
}
// Write request to wire for CompareCursor
+// compareCursorRequest writes a CompareCursor request to a byte slice.
func compareCursorRequest(c *xgb.Conn, Window xproto.Window, Cursor xproto.Cursor) []byte {
size := 12
b := 0
@@ -237,30 +243,35 @@ func compareCursorRequest(c *xgb.Conn, Window xproto.Window, Cursor xproto.Curso
return buf
}
-// Request FakeInput
-// size: 36
+// FakeInputCookie is a cookie used only for FakeInput requests.
type FakeInputCookie struct {
*xgb.Cookie
}
-// Write request to wire for FakeInput
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(fakeInputRequest(c, Type, Detail, Time, Root, RootX, RootY, Deviceid), cookie)
return FakeInputCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(fakeInputRequest(c, Type, Detail, Time, Root, RootX, RootY, Deviceid), cookie)
return FakeInputCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 36
b := 0
@@ -305,30 +316,35 @@ func fakeInputRequest(c *xgb.Conn, Type byte, Detail byte, Time uint32, Root xpr
return buf
}
-// Request GrabControl
-// size: 8
+// GrabControlCookie is a cookie used only for GrabControl requests.
type GrabControlCookie struct {
*xgb.Cookie
}
-// Write request to wire for GrabControl
+// GrabControl sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GrabControl(c *xgb.Conn, Impervious bool) GrabControlCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(grabControlRequest(c, Impervious), cookie)
return GrabControlCookie{cookie}
}
+// GrabControlChecked sends a checked request.
+// If an error occurs, it can be retrieved using GrabControlCookie.Check()
func GrabControlChecked(c *xgb.Conn, Impervious bool) GrabControlCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(grabControlRequest(c, Impervious), cookie)
return GrabControlCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook GrabControlCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for GrabControl
+// grabControlRequest writes a GrabControl request to a byte slice.
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 4e495cf..041b082 100644
--- a/nexgb/xv/xv.go
+++ b/nexgb/xv/xv.go
@@ -2,7 +2,7 @@
package xv
/*
- This file was generated by xv.xml on May 10 2012 8:04:33pm EDT.
+ This file was generated by xv.xml on May 10 2012 11:56:20pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -41,10 +41,6 @@ func init() {
xgb.NewExtErrorFuncs["XVideo"] = make(map[int]xgb.NewErrorFun)
}
-// Skipping definition for base type 'Int8'
-
-// Skipping definition for base type 'Card16'
-
// Skipping definition for base type 'Char'
// Skipping definition for base type 'Card32'
@@ -65,6 +61,10 @@ func init() {
// Skipping definition for base type 'Byte'
+// Skipping definition for base type 'Int8'
+
+// Skipping definition for base type 'Card16'
+
const (
TypeInputMask = 1
TypeOutputMask = 2
@@ -130,14 +130,12 @@ func NewEncodingId(c *xgb.Conn) (Encoding, error) {
return Encoding(id), nil
}
-// 'Rational' struct definition
-// Size: 8
type Rational struct {
Numerator int32
Denominator int32
}
-// Struct read Rational
+// RationalRead reads a byte slice into a Rational value.
func RationalRead(buf []byte, v *Rational) int {
b := 0
@@ -150,7 +148,7 @@ func RationalRead(buf []byte, v *Rational) int {
return b
}
-// Struct list read Rational
+// RationalReadList reads a byte slice into a list of Rational values.
func RationalReadList(buf []byte, dest []Rational) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -160,7 +158,7 @@ func RationalReadList(buf []byte, dest []Rational) int {
return xgb.Pad(b)
}
-// Struct write Rational
+// Bytes writes a Rational value to a byte slice.
func (v Rational) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -174,7 +172,7 @@ func (v Rational) Bytes() []byte {
return buf
}
-// Write struct list Rational
+// RationalListBytes writes a list of %s(MISSING) values to a byte slice.
func RationalListBytes(buf []byte, list []Rational) int {
b := 0
var structBytes []byte
@@ -186,15 +184,13 @@ func RationalListBytes(buf []byte, list []Rational) int {
return b
}
-// 'Format' struct definition
-// Size: 8
type Format struct {
Visual xproto.Visualid
Depth byte
// padding: 3 bytes
}
-// Struct read Format
+// FormatRead reads a byte slice into a Format value.
func FormatRead(buf []byte, v *Format) int {
b := 0
@@ -209,7 +205,7 @@ func FormatRead(buf []byte, v *Format) int {
return b
}
-// Struct list read Format
+// FormatReadList reads a byte slice into a list of Format values.
func FormatReadList(buf []byte, dest []Format) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -219,7 +215,7 @@ func FormatReadList(buf []byte, dest []Format) int {
return xgb.Pad(b)
}
-// Struct write Format
+// Bytes writes a Format value to a byte slice.
func (v Format) Bytes() []byte {
buf := make([]byte, 8)
b := 0
@@ -235,7 +231,7 @@ func (v Format) Bytes() []byte {
return buf
}
-// Write struct list Format
+// FormatListBytes writes a list of %s(MISSING) values to a byte slice.
func FormatListBytes(buf []byte, list []Format) int {
b := 0
var structBytes []byte
@@ -247,8 +243,6 @@ func FormatListBytes(buf []byte, list []Format) int {
return b
}
-// 'AdaptorInfo' struct definition
-// Size: ((12 + xgb.Pad((int(NameSize) * 1))) + xgb.Pad((int(NumFormats) * 8)))
type AdaptorInfo struct {
BaseId Port
NameSize uint16
@@ -260,7 +254,7 @@ type AdaptorInfo struct {
Formats []Format // size: xgb.Pad((int(NumFormats) * 8))
}
-// Struct read AdaptorInfo
+// AdaptorInfoRead reads a byte slice into a AdaptorInfo value.
func AdaptorInfoRead(buf []byte, v *AdaptorInfo) int {
b := 0
@@ -294,7 +288,7 @@ func AdaptorInfoRead(buf []byte, v *AdaptorInfo) int {
return b
}
-// Struct list read AdaptorInfo
+// AdaptorInfoReadList reads a byte slice into a list of AdaptorInfo values.
func AdaptorInfoReadList(buf []byte, dest []AdaptorInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -304,7 +298,7 @@ func AdaptorInfoReadList(buf []byte, dest []AdaptorInfo) int {
return xgb.Pad(b)
}
-// Struct write AdaptorInfo
+// Bytes writes a AdaptorInfo value to a byte slice.
func (v AdaptorInfo) Bytes() []byte {
buf := make([]byte, ((12 + xgb.Pad((int(v.NameSize) * 1))) + xgb.Pad((int(v.NumFormats) * 8))))
b := 0
@@ -334,7 +328,7 @@ func (v AdaptorInfo) Bytes() []byte {
return buf
}
-// Write struct list AdaptorInfo
+// AdaptorInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func AdaptorInfoListBytes(buf []byte, list []AdaptorInfo) int {
b := 0
var structBytes []byte
@@ -346,7 +340,7 @@ func AdaptorInfoListBytes(buf []byte, list []AdaptorInfo) int {
return b
}
-// Struct list size AdaptorInfo
+// AdaptorInfoListSize computes the size (bytes) of a list of AdaptorInfo values.
func AdaptorInfoListSize(list []AdaptorInfo) int {
size := 0
for _, item := range list {
@@ -355,8 +349,6 @@ func AdaptorInfoListSize(list []AdaptorInfo) int {
return size
}
-// 'EncodingInfo' struct definition
-// Size: (20 + xgb.Pad((int(NameSize) * 1)))
type EncodingInfo struct {
Encoding Encoding
NameSize uint16
@@ -367,7 +359,7 @@ type EncodingInfo struct {
Name string // size: xgb.Pad((int(NameSize) * 1))
}
-// Struct read EncodingInfo
+// EncodingInfoRead reads a byte slice into a EncodingInfo value.
func EncodingInfoRead(buf []byte, v *EncodingInfo) int {
b := 0
@@ -398,7 +390,7 @@ func EncodingInfoRead(buf []byte, v *EncodingInfo) int {
return b
}
-// Struct list read EncodingInfo
+// EncodingInfoReadList reads a byte slice into a list of EncodingInfo values.
func EncodingInfoReadList(buf []byte, dest []EncodingInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -408,7 +400,7 @@ func EncodingInfoReadList(buf []byte, dest []EncodingInfo) int {
return xgb.Pad(b)
}
-// Struct write EncodingInfo
+// Bytes writes a EncodingInfo value to a byte slice.
func (v EncodingInfo) Bytes() []byte {
buf := make([]byte, (20 + xgb.Pad((int(v.NameSize) * 1))))
b := 0
@@ -439,7 +431,7 @@ func (v EncodingInfo) Bytes() []byte {
return buf
}
-// Write struct list EncodingInfo
+// EncodingInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func EncodingInfoListBytes(buf []byte, list []EncodingInfo) int {
b := 0
var structBytes []byte
@@ -451,7 +443,7 @@ func EncodingInfoListBytes(buf []byte, list []EncodingInfo) int {
return b
}
-// Struct list size EncodingInfo
+// EncodingInfoListSize computes the size (bytes) of a list of EncodingInfo values.
func EncodingInfoListSize(list []EncodingInfo) int {
size := 0
for _, item := range list {
@@ -460,8 +452,6 @@ func EncodingInfoListSize(list []EncodingInfo) int {
return size
}
-// 'Image' struct definition
-// Size: (((16 + xgb.Pad((int(NumPlanes) * 4))) + xgb.Pad((int(NumPlanes) * 4))) + xgb.Pad((int(DataSize) * 1)))
type Image struct {
Id uint32
Width uint16
@@ -473,7 +463,7 @@ type Image struct {
Data []byte // size: xgb.Pad((int(DataSize) * 1))
}
-// Struct read Image
+// ImageRead reads a byte slice into a Image value.
func ImageRead(buf []byte, v *Image) int {
b := 0
@@ -513,7 +503,7 @@ func ImageRead(buf []byte, v *Image) int {
return b
}
-// Struct list read Image
+// ImageReadList reads a byte slice into a list of Image values.
func ImageReadList(buf []byte, dest []Image) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -523,7 +513,7 @@ func ImageReadList(buf []byte, dest []Image) int {
return xgb.Pad(b)
}
-// Struct write Image
+// Bytes writes a Image value to a byte slice.
func (v Image) Bytes() []byte {
buf := make([]byte, (((16 + xgb.Pad((int(v.NumPlanes) * 4))) + xgb.Pad((int(v.NumPlanes) * 4))) + xgb.Pad((int(v.DataSize) * 1))))
b := 0
@@ -561,7 +551,7 @@ func (v Image) Bytes() []byte {
return buf
}
-// Write struct list Image
+// ImageListBytes writes a list of %s(MISSING) values to a byte slice.
func ImageListBytes(buf []byte, list []Image) int {
b := 0
var structBytes []byte
@@ -573,7 +563,7 @@ func ImageListBytes(buf []byte, list []Image) int {
return b
}
-// Struct list size Image
+// ImageListSize computes the size (bytes) of a list of Image values.
func ImageListSize(list []Image) int {
size := 0
for _, item := range list {
@@ -582,8 +572,6 @@ func ImageListSize(list []Image) int {
return size
}
-// 'AttributeInfo' struct definition
-// Size: (16 + xgb.Pad((int(Size) * 1)))
type AttributeInfo struct {
Flags uint32
Min int32
@@ -592,7 +580,7 @@ type AttributeInfo struct {
Name string // size: xgb.Pad((int(Size) * 1))
}
-// Struct read AttributeInfo
+// AttributeInfoRead reads a byte slice into a AttributeInfo value.
func AttributeInfoRead(buf []byte, v *AttributeInfo) int {
b := 0
@@ -618,7 +606,7 @@ func AttributeInfoRead(buf []byte, v *AttributeInfo) int {
return b
}
-// Struct list read AttributeInfo
+// AttributeInfoReadList reads a byte slice into a list of AttributeInfo values.
func AttributeInfoReadList(buf []byte, dest []AttributeInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -628,7 +616,7 @@ func AttributeInfoReadList(buf []byte, dest []AttributeInfo) int {
return xgb.Pad(b)
}
-// Struct write AttributeInfo
+// Bytes writes a AttributeInfo value to a byte slice.
func (v AttributeInfo) Bytes() []byte {
buf := make([]byte, (16 + xgb.Pad((int(v.Size) * 1))))
b := 0
@@ -651,7 +639,7 @@ func (v AttributeInfo) Bytes() []byte {
return buf
}
-// Write struct list AttributeInfo
+// AttributeInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func AttributeInfoListBytes(buf []byte, list []AttributeInfo) int {
b := 0
var structBytes []byte
@@ -663,7 +651,7 @@ func AttributeInfoListBytes(buf []byte, list []AttributeInfo) int {
return b
}
-// Struct list size AttributeInfo
+// AttributeInfoListSize computes the size (bytes) of a list of AttributeInfo values.
func AttributeInfoListSize(list []AttributeInfo) int {
size := 0
for _, item := range list {
@@ -672,8 +660,6 @@ func AttributeInfoListSize(list []AttributeInfo) int {
return size
}
-// 'ImageFormatInfo' struct definition
-// Size: 128
type ImageFormatInfo struct {
Id uint32
Type byte
@@ -704,7 +690,7 @@ type ImageFormatInfo struct {
// padding: 11 bytes
}
-// Struct read ImageFormatInfo
+// ImageFormatInfoRead reads a byte slice into a ImageFormatInfo value.
func ImageFormatInfoRead(buf []byte, v *ImageFormatInfo) int {
b := 0
@@ -789,7 +775,7 @@ func ImageFormatInfoRead(buf []byte, v *ImageFormatInfo) int {
return b
}
-// Struct list read ImageFormatInfo
+// ImageFormatInfoReadList reads a byte slice into a list of ImageFormatInfo values.
func ImageFormatInfoReadList(buf []byte, dest []ImageFormatInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -799,7 +785,7 @@ func ImageFormatInfoReadList(buf []byte, dest []ImageFormatInfo) int {
return xgb.Pad(b)
}
-// Struct write ImageFormatInfo
+// Bytes writes a ImageFormatInfo value to a byte slice.
func (v ImageFormatInfo) Bytes() []byte {
buf := make([]byte, 128)
b := 0
@@ -883,7 +869,7 @@ func (v ImageFormatInfo) Bytes() []byte {
return buf
}
-// Write struct list ImageFormatInfo
+// ImageFormatInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func ImageFormatInfoListBytes(buf []byte, list []ImageFormatInfo) int {
b := 0
var structBytes []byte
@@ -895,7 +881,7 @@ func ImageFormatInfoListBytes(buf []byte, list []ImageFormatInfo) int {
return b
}
-// Struct list size ImageFormatInfo
+// ImageFormatInfoListSize computes the size (bytes) of a list of ImageFormatInfo values.
func ImageFormatInfoListSize(list []ImageFormatInfo) int {
size := 0
for _ = range list {
@@ -904,9 +890,7 @@ func ImageFormatInfoListSize(list []ImageFormatInfo) int {
return size
}
-// Event definition VideoNotify (0)
-// Size: 32
-
+// VideoNotify is the event number for a VideoNotifyEvent.
const VideoNotify = 0
type VideoNotifyEvent struct {
@@ -917,7 +901,7 @@ type VideoNotifyEvent struct {
Port Port
}
-// Event read VideoNotify
+// VideoNotifyEventNew constructs a VideoNotifyEvent value that implements xgb.Event from a byte slice.
func VideoNotifyEventNew(buf []byte) xgb.Event {
v := VideoNotifyEvent{}
b := 1 // don't read event number
@@ -940,7 +924,7 @@ func VideoNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write VideoNotify
+// Bytes writes a VideoNotifyEvent value to a byte slice.
func (v VideoNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -966,12 +950,14 @@ func (v VideoNotifyEvent) Bytes() []byte {
return buf
}
-func (v VideoNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the VideoNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v VideoNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of VideoNotifyEvent.
func (v VideoNotifyEvent) String() string {
fieldVals := make([]string, 0, 4)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -986,9 +972,7 @@ func init() {
xgb.NewExtEventFuncs["XVideo"][0] = VideoNotifyEventNew
}
-// Event definition PortNotify (1)
-// Size: 32
-
+// PortNotify is the event number for a PortNotifyEvent.
const PortNotify = 1
type PortNotifyEvent struct {
@@ -1000,7 +984,7 @@ type PortNotifyEvent struct {
Value int32
}
-// Event read PortNotify
+// PortNotifyEventNew constructs a PortNotifyEvent value that implements xgb.Event from a byte slice.
func PortNotifyEventNew(buf []byte) xgb.Event {
v := PortNotifyEvent{}
b := 1 // don't read event number
@@ -1025,7 +1009,7 @@ func PortNotifyEventNew(buf []byte) xgb.Event {
return v
}
-// Event write PortNotify
+// Bytes writes a PortNotifyEvent value to a byte slice.
func (v PortNotifyEvent) Bytes() []byte {
buf := make([]byte, 32)
b := 0
@@ -1053,12 +1037,14 @@ func (v PortNotifyEvent) Bytes() []byte {
return buf
}
-func (v PortNotifyEvent) ImplementsEvent() {}
-
+// SequenceId returns the sequence id attached to the PortNotify event.
+// Events without a sequence number (KeymapNotify) return 0.
+// This is mostly used internally.
func (v PortNotifyEvent) SequenceId() uint16 {
return v.Sequence
}
+// String is a rudimentary string representation of PortNotifyEvent.
func (v PortNotifyEvent) String() string {
fieldVals := make([]string, 0, 5)
fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence))
@@ -1073,9 +1059,7 @@ func init() {
xgb.NewExtEventFuncs["XVideo"][1] = PortNotifyEventNew
}
-// Error definition BadPort (0)
-// Size: 32
-
+// BadBadPort is the error number for a BadBadPort.
const BadBadPort = 0
type BadPortError struct {
@@ -1083,7 +1067,7 @@ type BadPortError struct {
NiceName string
}
-// Error read BadPort
+// BadPortErrorNew constructs a BadPortError value that implements xgb.Error from a byte slice.
func BadPortErrorNew(buf []byte) xgb.Error {
v := BadPortError{}
v.NiceName = "BadPort"
@@ -1097,8 +1081,8 @@ func BadPortErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadPortError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadPort error.
+// This is mostly used internally.
func (err BadPortError) SequenceId() uint16 {
return err.Sequence
}
@@ -1118,9 +1102,7 @@ func init() {
xgb.NewExtErrorFuncs["XVideo"][0] = BadPortErrorNew
}
-// Error definition BadEncoding (1)
-// Size: 32
-
+// BadBadEncoding is the error number for a BadBadEncoding.
const BadBadEncoding = 1
type BadEncodingError struct {
@@ -1128,7 +1110,7 @@ type BadEncodingError struct {
NiceName string
}
-// Error read BadEncoding
+// BadEncodingErrorNew constructs a BadEncodingError value that implements xgb.Error from a byte slice.
func BadEncodingErrorNew(buf []byte) xgb.Error {
v := BadEncodingError{}
v.NiceName = "BadEncoding"
@@ -1142,8 +1124,8 @@ func BadEncodingErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadEncodingError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadEncoding error.
+// This is mostly used internally.
func (err BadEncodingError) SequenceId() uint16 {
return err.Sequence
}
@@ -1163,9 +1145,7 @@ func init() {
xgb.NewExtErrorFuncs["XVideo"][1] = BadEncodingErrorNew
}
-// Error definition BadControl (2)
-// Size: 32
-
+// BadBadControl is the error number for a BadBadControl.
const BadBadControl = 2
type BadControlError struct {
@@ -1173,7 +1153,7 @@ type BadControlError struct {
NiceName string
}
-// Error read BadControl
+// BadControlErrorNew constructs a BadControlError value that implements xgb.Error from a byte slice.
func BadControlErrorNew(buf []byte) xgb.Error {
v := BadControlError{}
v.NiceName = "BadControl"
@@ -1187,8 +1167,8 @@ func BadControlErrorNew(buf []byte) xgb.Error {
return v
}
-func (err BadControlError) ImplementsError() {}
-
+// SequenceId returns the sequence id attached to the BadBadControl error.
+// This is mostly used internally.
func (err BadControlError) SequenceId() uint16 {
return err.Sequence
}
@@ -1208,35 +1188,37 @@ func init() {
xgb.NewExtErrorFuncs["XVideo"][2] = BadControlErrorNew
}
-// Request QueryExtension
-// size: 4
+// QueryExtensionCookie is a cookie used only for QueryExtension requests.
type QueryExtensionCookie struct {
*xgb.Cookie
}
+// QueryExtension sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryExtensionCookie.Reply()
func QueryExtension(c *xgb.Conn) QueryExtensionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryExtensionRequest(c), cookie)
return QueryExtensionCookie{cookie}
}
+// QueryExtensionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryExtensionUnchecked(c *xgb.Conn) QueryExtensionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryExtensionRequest(c), cookie)
return QueryExtensionCookie{cookie}
}
-// Request reply for QueryExtension
-// size: 12
+// QueryExtensionReply represents the data returned from a QueryExtension request.
type QueryExtensionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Major uint16
Minor uint16
}
-// Waits and reads reply data from request QueryExtension
+// Reply blocks and returns the reply data for a QueryExtension request.
func (cook QueryExtensionCookie) Reply() (*QueryExtensionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1248,7 +1230,7 @@ func (cook QueryExtensionCookie) Reply() (*QueryExtensionReply, error) {
return queryExtensionReply(buf), nil
}
-// Read reply into structure from buffer for QueryExtension
+// queryExtensionReply reads a byte slice into a QueryExtensionReply value.
func queryExtensionReply(buf []byte) *QueryExtensionReply {
v := new(QueryExtensionReply)
b := 1 // skip reply determinant
@@ -1271,6 +1253,7 @@ func queryExtensionReply(buf []byte) *QueryExtensionReply {
}
// Write request to wire for QueryExtension
+// queryExtensionRequest writes a QueryExtension request to a byte slice.
func queryExtensionRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -1288,36 +1271,38 @@ func queryExtensionRequest(c *xgb.Conn) []byte {
return buf
}
-// Request QueryAdaptors
-// size: 8
+// QueryAdaptorsCookie is a cookie used only for QueryAdaptors requests.
type QueryAdaptorsCookie struct {
*xgb.Cookie
}
+// QueryAdaptors sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryAdaptorsCookie.Reply()
func QueryAdaptors(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryAdaptorsRequest(c, Window), cookie)
return QueryAdaptorsCookie{cookie}
}
+// QueryAdaptorsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryAdaptorsUnchecked(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryAdaptorsRequest(c, Window), cookie)
return QueryAdaptorsCookie{cookie}
}
-// Request reply for QueryAdaptors
-// size: (32 + AdaptorInfoListSize(Info))
+// QueryAdaptorsReply represents the data returned from a QueryAdaptors request.
type QueryAdaptorsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumAdaptors uint16
// padding: 22 bytes
Info []AdaptorInfo // size: AdaptorInfoListSize(Info)
}
-// Waits and reads reply data from request QueryAdaptors
+// Reply blocks and returns the reply data for a QueryAdaptors request.
func (cook QueryAdaptorsCookie) Reply() (*QueryAdaptorsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1329,7 +1314,7 @@ func (cook QueryAdaptorsCookie) Reply() (*QueryAdaptorsReply, error) {
return queryAdaptorsReply(buf), nil
}
-// Read reply into structure from buffer for QueryAdaptors
+// queryAdaptorsReply reads a byte slice into a QueryAdaptorsReply value.
func queryAdaptorsReply(buf []byte) *QueryAdaptorsReply {
v := new(QueryAdaptorsReply)
b := 1 // skip reply determinant
@@ -1354,6 +1339,7 @@ func queryAdaptorsReply(buf []byte) *QueryAdaptorsReply {
}
// Write request to wire for QueryAdaptors
+// queryAdaptorsRequest writes a QueryAdaptors request to a byte slice.
func queryAdaptorsRequest(c *xgb.Conn, Window xproto.Window) []byte {
size := 8
b := 0
@@ -1374,36 +1360,38 @@ func queryAdaptorsRequest(c *xgb.Conn, Window xproto.Window) []byte {
return buf
}
-// Request QueryEncodings
-// size: 8
+// QueryEncodingsCookie is a cookie used only for QueryEncodings requests.
type QueryEncodingsCookie struct {
*xgb.Cookie
}
+// QueryEncodings sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryEncodingsCookie.Reply()
func QueryEncodings(c *xgb.Conn, Port Port) QueryEncodingsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryEncodingsRequest(c, Port), cookie)
return QueryEncodingsCookie{cookie}
}
+// QueryEncodingsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryEncodingsUnchecked(c *xgb.Conn, Port Port) QueryEncodingsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryEncodingsRequest(c, Port), cookie)
return QueryEncodingsCookie{cookie}
}
-// Request reply for QueryEncodings
-// size: (32 + EncodingInfoListSize(Info))
+// QueryEncodingsReply represents the data returned from a QueryEncodings request.
type QueryEncodingsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumEncodings uint16
// padding: 22 bytes
Info []EncodingInfo // size: EncodingInfoListSize(Info)
}
-// Waits and reads reply data from request QueryEncodings
+// Reply blocks and returns the reply data for a QueryEncodings request.
func (cook QueryEncodingsCookie) Reply() (*QueryEncodingsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1415,7 +1403,7 @@ func (cook QueryEncodingsCookie) Reply() (*QueryEncodingsReply, error) {
return queryEncodingsReply(buf), nil
}
-// Read reply into structure from buffer for QueryEncodings
+// queryEncodingsReply reads a byte slice into a QueryEncodingsReply value.
func queryEncodingsReply(buf []byte) *QueryEncodingsReply {
v := new(QueryEncodingsReply)
b := 1 // skip reply determinant
@@ -1440,6 +1428,7 @@ func queryEncodingsReply(buf []byte) *QueryEncodingsReply {
}
// Write request to wire for QueryEncodings
+// queryEncodingsRequest writes a QueryEncodings request to a byte slice.
func queryEncodingsRequest(c *xgb.Conn, Port Port) []byte {
size := 8
b := 0
@@ -1460,33 +1449,35 @@ func queryEncodingsRequest(c *xgb.Conn, Port Port) []byte {
return buf
}
-// Request GrabPort
-// size: 12
+// GrabPortCookie is a cookie used only for GrabPort requests.
type GrabPortCookie struct {
*xgb.Cookie
}
+// GrabPort sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GrabPortCookie.Reply()
func GrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(grabPortRequest(c, Port, Time), cookie)
return GrabPortCookie{cookie}
}
+// GrabPortUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GrabPortUnchecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(grabPortRequest(c, Port, Time), cookie)
return GrabPortCookie{cookie}
}
-// Request reply for GrabPort
-// size: 8
+// GrabPortReply represents the data returned from a GrabPort request.
type GrabPortReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
Result byte
}
-// Waits and reads reply data from request GrabPort
+// Reply blocks and returns the reply data for a GrabPort request.
func (cook GrabPortCookie) Reply() (*GrabPortReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -1498,7 +1489,7 @@ func (cook GrabPortCookie) Reply() (*GrabPortReply, error) {
return grabPortReply(buf), nil
}
-// Read reply into structure from buffer for GrabPort
+// grabPortReply reads a byte slice into a GrabPortReply value.
func grabPortReply(buf []byte) *GrabPortReply {
v := new(GrabPortReply)
b := 1 // skip reply determinant
@@ -1516,6 +1507,7 @@ func grabPortReply(buf []byte) *GrabPortReply {
}
// Write request to wire for GrabPort
+// grabPortRequest writes a GrabPort request to a byte slice.
func grabPortRequest(c *xgb.Conn, Port Port, Time xproto.Timestamp) []byte {
size := 12
b := 0
@@ -1539,30 +1531,35 @@ func grabPortRequest(c *xgb.Conn, Port Port, Time xproto.Timestamp) []byte {
return buf
}
-// Request UngrabPort
-// size: 12
+// UngrabPortCookie is a cookie used only for UngrabPort requests.
type UngrabPortCookie struct {
*xgb.Cookie
}
-// Write request to wire for UngrabPort
+// UngrabPort sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func UngrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(ungrabPortRequest(c, Port, Time), cookie)
return UngrabPortCookie{cookie}
}
+// UngrabPortChecked sends a checked request.
+// If an error occurs, it can be retrieved using UngrabPortCookie.Check()
func UngrabPortChecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(ungrabPortRequest(c, Port, Time), cookie)
return UngrabPortCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook UngrabPortCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for UngrabPort
+// ungrabPortRequest writes a UngrabPort request to a byte slice.
func ungrabPortRequest(c *xgb.Conn, Port Port, Time xproto.Timestamp) []byte {
size := 12
b := 0
@@ -1586,30 +1583,35 @@ func ungrabPortRequest(c *xgb.Conn, Port Port, Time xproto.Timestamp) []byte {
return buf
}
-// Request PutVideo
-// size: 32
+// PutVideoCookie is a cookie used only for PutVideo requests.
type PutVideoCookie struct {
*xgb.Cookie
}
-// Write request to wire for PutVideo
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(putVideoRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return PutVideoCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(putVideoRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return PutVideoCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 32
b := 0
@@ -1660,30 +1662,35 @@ func putVideoRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto
return buf
}
-// Request PutStill
-// size: 32
+// PutStillCookie is a cookie used only for PutStill requests.
type PutStillCookie struct {
*xgb.Cookie
}
-// Write request to wire for PutStill
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(putStillRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return PutStillCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(putStillRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return PutStillCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 32
b := 0
@@ -1734,30 +1741,35 @@ func putStillRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto
return buf
}
-// Request GetVideo
-// size: 32
+// GetVideoCookie is a cookie used only for GetVideo requests.
type GetVideoCookie struct {
*xgb.Cookie
}
-// Write request to wire for GetVideo
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(getVideoRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return GetVideoCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(getVideoRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return GetVideoCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 32
b := 0
@@ -1808,30 +1820,35 @@ func getVideoRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto
return buf
}
-// Request GetStill
-// size: 32
+// GetStillCookie is a cookie used only for GetStill requests.
type GetStillCookie struct {
*xgb.Cookie
}
-// Write request to wire for GetStill
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(getStillRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return GetStillCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(getStillRequest(c, Port, Drawable, Gc, VidX, VidY, VidW, VidH, DrwX, DrwY, DrwW, DrwH), cookie)
return GetStillCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 32
b := 0
@@ -1882,30 +1899,35 @@ func getStillRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto
return buf
}
-// Request StopVideo
-// size: 12
+// StopVideoCookie is a cookie used only for StopVideo requests.
type StopVideoCookie struct {
*xgb.Cookie
}
-// Write request to wire for StopVideo
+// StopVideo sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func StopVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(stopVideoRequest(c, Port, Drawable), cookie)
return StopVideoCookie{cookie}
}
+// StopVideoChecked sends a checked request.
+// If an error occurs, it can be retrieved using StopVideoCookie.Check()
func StopVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(stopVideoRequest(c, Port, Drawable), cookie)
return StopVideoCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook StopVideoCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for StopVideo
+// stopVideoRequest writes a StopVideo request to a byte slice.
func stopVideoRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable) []byte {
size := 12
b := 0
@@ -1929,30 +1951,35 @@ func stopVideoRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable) []byte {
return buf
}
-// Request SelectVideoNotify
-// size: 12
+// SelectVideoNotifyCookie is a cookie used only for SelectVideoNotify requests.
type SelectVideoNotifyCookie struct {
*xgb.Cookie
}
-// Write request to wire for SelectVideoNotify
+// SelectVideoNotify sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectVideoNotify(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(selectVideoNotifyRequest(c, Drawable, Onoff), cookie)
return SelectVideoNotifyCookie{cookie}
}
+// SelectVideoNotifyChecked sends a checked request.
+// If an error occurs, it can be retrieved using SelectVideoNotifyCookie.Check()
func SelectVideoNotifyChecked(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(selectVideoNotifyRequest(c, Drawable, Onoff), cookie)
return SelectVideoNotifyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SelectVideoNotifyCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SelectVideoNotify
+// selectVideoNotifyRequest writes a SelectVideoNotify request to a byte slice.
func selectVideoNotifyRequest(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) []byte {
size := 12
b := 0
@@ -1982,30 +2009,35 @@ func selectVideoNotifyRequest(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool)
return buf
}
-// Request SelectPortNotify
-// size: 12
+// SelectPortNotifyCookie is a cookie used only for SelectPortNotify requests.
type SelectPortNotifyCookie struct {
*xgb.Cookie
}
-// Write request to wire for SelectPortNotify
+// SelectPortNotify sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectPortNotify(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(selectPortNotifyRequest(c, Port, Onoff), cookie)
return SelectPortNotifyCookie{cookie}
}
+// SelectPortNotifyChecked sends a checked request.
+// If an error occurs, it can be retrieved using SelectPortNotifyCookie.Check()
func SelectPortNotifyChecked(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(selectPortNotifyRequest(c, Port, Onoff), cookie)
return SelectPortNotifyCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SelectPortNotifyCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SelectPortNotify
+// selectPortNotifyRequest writes a SelectPortNotify request to a byte slice.
func selectPortNotifyRequest(c *xgb.Conn, Port Port, Onoff bool) []byte {
size := 12
b := 0
@@ -2035,35 +2067,37 @@ func selectPortNotifyRequest(c *xgb.Conn, Port Port, Onoff bool) []byte {
return buf
}
-// Request QueryBestSize
-// size: 20
+// QueryBestSizeCookie is a cookie used only for QueryBestSize requests.
type QueryBestSizeCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryBestSizeRequest(c, Port, VidW, VidH, DrwW, DrwH, Motion), cookie)
return QueryBestSizeCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryBestSizeRequest(c, Port, VidW, VidH, DrwW, DrwH, Motion), cookie)
return QueryBestSizeCookie{cookie}
}
-// Request reply for QueryBestSize
-// size: 12
+// QueryBestSizeReply represents the data returned from a QueryBestSize request.
type QueryBestSizeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
ActualWidth uint16
ActualHeight uint16
}
-// Waits and reads reply data from request QueryBestSize
+// Reply blocks and returns the reply data for a QueryBestSize request.
func (cook QueryBestSizeCookie) Reply() (*QueryBestSizeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2075,7 +2109,7 @@ func (cook QueryBestSizeCookie) Reply() (*QueryBestSizeReply, error) {
return queryBestSizeReply(buf), nil
}
-// Read reply into structure from buffer for QueryBestSize
+// queryBestSizeReply reads a byte slice into a QueryBestSizeReply value.
func queryBestSizeReply(buf []byte) *QueryBestSizeReply {
v := new(QueryBestSizeReply)
b := 1 // skip reply determinant
@@ -2098,6 +2132,7 @@ func queryBestSizeReply(buf []byte) *QueryBestSizeReply {
}
// 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 {
size := 20
b := 0
@@ -2139,30 +2174,35 @@ func queryBestSizeRequest(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW
return buf
}
-// Request SetPortAttribute
-// size: 16
+// SetPortAttributeCookie is a cookie used only for SetPortAttribute requests.
type SetPortAttributeCookie struct {
*xgb.Cookie
}
-// Write request to wire for SetPortAttribute
+// SetPortAttribute sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(setPortAttributeRequest(c, Port, Attribute, Value), cookie)
return SetPortAttributeCookie{cookie}
}
+// SetPortAttributeChecked sends a checked request.
+// If an error occurs, it can be retrieved using SetPortAttributeCookie.Check()
func SetPortAttributeChecked(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(setPortAttributeRequest(c, Port, Attribute, Value), cookie)
return SetPortAttributeCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook SetPortAttributeCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for SetPortAttribute
+// setPortAttributeRequest writes a SetPortAttribute request to a byte slice.
func setPortAttributeRequest(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) []byte {
size := 16
b := 0
@@ -2189,34 +2229,36 @@ func setPortAttributeRequest(c *xgb.Conn, Port Port, Attribute xproto.Atom, Valu
return buf
}
-// Request GetPortAttribute
-// size: 12
+// GetPortAttributeCookie is a cookie used only for GetPortAttribute requests.
type GetPortAttributeCookie struct {
*xgb.Cookie
}
+// GetPortAttribute sends a checked request.
+// If an error occurs, it will be returned with the reply by calling GetPortAttributeCookie.Reply()
func GetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttributeCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(getPortAttributeRequest(c, Port, Attribute), cookie)
return GetPortAttributeCookie{cookie}
}
+// GetPortAttributeUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPortAttributeUnchecked(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttributeCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(getPortAttributeRequest(c, Port, Attribute), cookie)
return GetPortAttributeCookie{cookie}
}
-// Request reply for GetPortAttribute
-// size: 12
+// GetPortAttributeReply represents the data returned from a GetPortAttribute request.
type GetPortAttributeReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Value int32
}
-// Waits and reads reply data from request GetPortAttribute
+// Reply blocks and returns the reply data for a GetPortAttribute request.
func (cook GetPortAttributeCookie) Reply() (*GetPortAttributeReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2228,7 +2270,7 @@ func (cook GetPortAttributeCookie) Reply() (*GetPortAttributeReply, error) {
return getPortAttributeReply(buf), nil
}
-// Read reply into structure from buffer for GetPortAttribute
+// getPortAttributeReply reads a byte slice into a GetPortAttributeReply value.
func getPortAttributeReply(buf []byte) *GetPortAttributeReply {
v := new(GetPortAttributeReply)
b := 1 // skip reply determinant
@@ -2248,6 +2290,7 @@ func getPortAttributeReply(buf []byte) *GetPortAttributeReply {
}
// Write request to wire for GetPortAttribute
+// getPortAttributeRequest writes a GetPortAttribute request to a byte slice.
func getPortAttributeRequest(c *xgb.Conn, Port Port, Attribute xproto.Atom) []byte {
size := 12
b := 0
@@ -2271,29 +2314,31 @@ func getPortAttributeRequest(c *xgb.Conn, Port Port, Attribute xproto.Atom) []by
return buf
}
-// Request QueryPortAttributes
-// size: 8
+// QueryPortAttributesCookie is a cookie used only for QueryPortAttributes requests.
type QueryPortAttributesCookie struct {
*xgb.Cookie
}
+// QueryPortAttributes sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryPortAttributesCookie.Reply()
func QueryPortAttributes(c *xgb.Conn, Port Port) QueryPortAttributesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryPortAttributesRequest(c, Port), cookie)
return QueryPortAttributesCookie{cookie}
}
+// QueryPortAttributesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryPortAttributesUnchecked(c *xgb.Conn, Port Port) QueryPortAttributesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryPortAttributesRequest(c, Port), cookie)
return QueryPortAttributesCookie{cookie}
}
-// Request reply for QueryPortAttributes
-// size: (32 + AttributeInfoListSize(Attributes))
+// QueryPortAttributesReply represents the data returned from a QueryPortAttributes request.
type QueryPortAttributesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumAttributes uint32
TextSize uint32
@@ -2301,7 +2346,7 @@ type QueryPortAttributesReply struct {
Attributes []AttributeInfo // size: AttributeInfoListSize(Attributes)
}
-// Waits and reads reply data from request QueryPortAttributes
+// Reply blocks and returns the reply data for a QueryPortAttributes request.
func (cook QueryPortAttributesCookie) Reply() (*QueryPortAttributesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2313,7 +2358,7 @@ func (cook QueryPortAttributesCookie) Reply() (*QueryPortAttributesReply, error)
return queryPortAttributesReply(buf), nil
}
-// Read reply into structure from buffer for QueryPortAttributes
+// queryPortAttributesReply reads a byte slice into a QueryPortAttributesReply value.
func queryPortAttributesReply(buf []byte) *QueryPortAttributesReply {
v := new(QueryPortAttributesReply)
b := 1 // skip reply determinant
@@ -2341,6 +2386,7 @@ func queryPortAttributesReply(buf []byte) *QueryPortAttributesReply {
}
// Write request to wire for QueryPortAttributes
+// queryPortAttributesRequest writes a QueryPortAttributes request to a byte slice.
func queryPortAttributesRequest(c *xgb.Conn, Port Port) []byte {
size := 8
b := 0
@@ -2361,36 +2407,38 @@ func queryPortAttributesRequest(c *xgb.Conn, Port Port) []byte {
return buf
}
-// Request ListImageFormats
-// size: 8
+// ListImageFormatsCookie is a cookie used only for ListImageFormats requests.
type ListImageFormatsCookie struct {
*xgb.Cookie
}
+// ListImageFormats sends a checked request.
+// If an error occurs, it will be returned with the reply by calling ListImageFormatsCookie.Reply()
func ListImageFormats(c *xgb.Conn, Port Port) ListImageFormatsCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(listImageFormatsRequest(c, Port), cookie)
return ListImageFormatsCookie{cookie}
}
+// ListImageFormatsUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListImageFormatsUnchecked(c *xgb.Conn, Port Port) ListImageFormatsCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listImageFormatsRequest(c, Port), cookie)
return ListImageFormatsCookie{cookie}
}
-// Request reply for ListImageFormats
-// size: (32 + ImageFormatInfoListSize(Format))
+// ListImageFormatsReply represents the data returned from a ListImageFormats request.
type ListImageFormatsReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumFormats uint32
// padding: 20 bytes
Format []ImageFormatInfo // size: ImageFormatInfoListSize(Format)
}
-// Waits and reads reply data from request ListImageFormats
+// Reply blocks and returns the reply data for a ListImageFormats request.
func (cook ListImageFormatsCookie) Reply() (*ListImageFormatsReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2402,7 +2450,7 @@ func (cook ListImageFormatsCookie) Reply() (*ListImageFormatsReply, error) {
return listImageFormatsReply(buf), nil
}
-// Read reply into structure from buffer for ListImageFormats
+// listImageFormatsReply reads a byte slice into a ListImageFormatsReply value.
func listImageFormatsReply(buf []byte) *ListImageFormatsReply {
v := new(ListImageFormatsReply)
b := 1 // skip reply determinant
@@ -2427,6 +2475,7 @@ func listImageFormatsReply(buf []byte) *ListImageFormatsReply {
}
// Write request to wire for ListImageFormats
+// listImageFormatsRequest writes a ListImageFormats request to a byte slice.
func listImageFormatsRequest(c *xgb.Conn, Port Port) []byte {
size := 8
b := 0
@@ -2447,29 +2496,31 @@ func listImageFormatsRequest(c *xgb.Conn, Port Port) []byte {
return buf
}
-// Request QueryImageAttributes
-// size: 16
+// QueryImageAttributesCookie is a cookie used only for QueryImageAttributes requests.
type QueryImageAttributesCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(queryImageAttributesRequest(c, Port, Id, Width, Height), cookie)
return QueryImageAttributesCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(queryImageAttributesRequest(c, Port, Id, Width, Height), cookie)
return QueryImageAttributesCookie{cookie}
}
-// Request reply for QueryImageAttributes
-// size: ((32 + xgb.Pad((int(NumPlanes) * 4))) + xgb.Pad((int(NumPlanes) * 4)))
+// QueryImageAttributesReply represents the data returned from a QueryImageAttributes request.
type QueryImageAttributesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
NumPlanes uint32
DataSize uint32
@@ -2480,7 +2531,7 @@ type QueryImageAttributesReply struct {
Offsets []uint32 // size: xgb.Pad((int(NumPlanes) * 4))
}
-// Waits and reads reply data from request QueryImageAttributes
+// Reply blocks and returns the reply data for a QueryImageAttributes request.
func (cook QueryImageAttributesCookie) Reply() (*QueryImageAttributesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -2492,7 +2543,7 @@ func (cook QueryImageAttributesCookie) Reply() (*QueryImageAttributesReply, erro
return queryImageAttributesReply(buf), nil
}
-// Read reply into structure from buffer for QueryImageAttributes
+// queryImageAttributesReply reads a byte slice into a QueryImageAttributesReply value.
func queryImageAttributesReply(buf []byte) *QueryImageAttributesReply {
v := new(QueryImageAttributesReply)
b := 1 // skip reply determinant
@@ -2537,6 +2588,7 @@ func queryImageAttributesReply(buf []byte) *QueryImageAttributesReply {
}
// 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 {
size := 16
b := 0
@@ -2566,30 +2618,35 @@ func queryImageAttributesRequest(c *xgb.Conn, Port Port, Id uint32, Width uint16
return buf
}
-// Request PutImage
-// size: xgb.Pad((40 + xgb.Pad((len(Data) * 1))))
+// PutImageCookie is a cookie used only for PutImage requests.
type PutImageCookie struct {
*xgb.Cookie
}
-// Write request to wire for PutImage
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(putImageRequest(c, Port, Drawable, Gc, Id, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, Data), cookie)
return PutImageCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(putImageRequest(c, Port, Drawable, Gc, Id, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, Data), cookie)
return PutImageCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := xgb.Pad((40 + xgb.Pad((len(Data) * 1))))
b := 0
@@ -2652,30 +2709,35 @@ func putImageRequest(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto
return buf
}
-// Request ShmPutImage
-// size: 52
+// ShmPutImageCookie is a cookie used only for ShmPutImage requests.
type ShmPutImageCookie struct {
*xgb.Cookie
}
-// Write request to wire for ShmPutImage
+// 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 {
cookie := c.NewCookie(false, false)
c.NewRequest(shmPutImageRequest(c, Port, Drawable, Gc, Shmseg, Id, Offset, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, SendEvent), cookie)
return ShmPutImageCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(true, false)
c.NewRequest(shmPutImageRequest(c, Port, Drawable, Gc, Shmseg, Id, Offset, SrcX, SrcY, SrcW, SrcH, DrwX, DrwY, DrwW, DrwH, Width, Height, SendEvent), cookie)
return ShmPutImageCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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 {
size := 52
b := 0
diff --git a/nexgb/xvmc/xvmc.go b/nexgb/xvmc/xvmc.go
index 60fcb2e..dc9c220 100644
--- a/nexgb/xvmc/xvmc.go
+++ b/nexgb/xvmc/xvmc.go
@@ -2,7 +2,7 @@
package xvmc
/*
- This file was generated by xvmc.xml on May 10 2012 8:04:33pm EDT.
+ This file was generated by xvmc.xml on May 10 2012 11:56:20pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -41,6 +41,16 @@ func init() {
xgb.NewExtErrorFuncs["XVideo-MotionCompensation"] = make(map[int]xgb.NewErrorFun)
}
+// Skipping definition for base type 'Card16'
+
+// Skipping definition for base type 'Char'
+
+// Skipping definition for base type 'Card32'
+
+// Skipping definition for base type 'Double'
+
+// Skipping definition for base type 'Bool'
+
// Skipping definition for base type 'Float'
// Skipping definition for base type 'Card8'
@@ -55,16 +65,6 @@ func init() {
// Skipping definition for base type 'Int8'
-// Skipping definition for base type 'Card16'
-
-// Skipping definition for base type 'Char'
-
-// Skipping definition for base type 'Card32'
-
-// Skipping definition for base type 'Double'
-
-// Skipping definition for base type 'Bool'
-
type Context uint32
func NewContextId(c *xgb.Conn) (Context, error) {
@@ -95,8 +95,6 @@ func NewSubpictureId(c *xgb.Conn) (Subpicture, error) {
return Subpicture(id), nil
}
-// 'SurfaceInfo' struct definition
-// Size: 24
type SurfaceInfo struct {
Id Surface
ChromaFormat uint16
@@ -109,7 +107,7 @@ type SurfaceInfo struct {
Flags uint32
}
-// Struct read SurfaceInfo
+// SurfaceInfoRead reads a byte slice into a SurfaceInfo value.
func SurfaceInfoRead(buf []byte, v *SurfaceInfo) int {
b := 0
@@ -143,7 +141,7 @@ func SurfaceInfoRead(buf []byte, v *SurfaceInfo) int {
return b
}
-// Struct list read SurfaceInfo
+// SurfaceInfoReadList reads a byte slice into a list of SurfaceInfo values.
func SurfaceInfoReadList(buf []byte, dest []SurfaceInfo) int {
b := 0
for i := 0; i < len(dest); i++ {
@@ -153,7 +151,7 @@ func SurfaceInfoReadList(buf []byte, dest []SurfaceInfo) int {
return xgb.Pad(b)
}
-// Struct write SurfaceInfo
+// Bytes writes a SurfaceInfo value to a byte slice.
func (v SurfaceInfo) Bytes() []byte {
buf := make([]byte, 24)
b := 0
@@ -188,7 +186,7 @@ func (v SurfaceInfo) Bytes() []byte {
return buf
}
-// Write struct list SurfaceInfo
+// SurfaceInfoListBytes writes a list of %s(MISSING) values to a byte slice.
func SurfaceInfoListBytes(buf []byte, list []SurfaceInfo) int {
b := 0
var structBytes []byte
@@ -200,35 +198,37 @@ func SurfaceInfoListBytes(buf []byte, list []SurfaceInfo) int {
return b
}
-// Request QueryVersion
-// size: 4
+// QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct {
*xgb.Cookie
}
+// QueryVersion sends a checked request.
+// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
func QueryVersion(c *xgb.Conn) QueryVersionCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c), cookie)
return QueryVersionCookie{cookie}
}
+// QueryVersionUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryVersionUnchecked(c *xgb.Conn) QueryVersionCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c), cookie)
return QueryVersionCookie{cookie}
}
-// Request reply for QueryVersion
-// size: 16
+// QueryVersionReply represents the data returned from a QueryVersion request.
type QueryVersionReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Major uint32
Minor uint32
}
-// Waits and reads reply data from request QueryVersion
+// Reply blocks and returns the reply data for a QueryVersion request.
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -240,7 +240,7 @@ func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error) {
return queryVersionReply(buf), nil
}
-// Read reply into structure from buffer for QueryVersion
+// queryVersionReply reads a byte slice into a QueryVersionReply value.
func queryVersionReply(buf []byte) *QueryVersionReply {
v := new(QueryVersionReply)
b := 1 // skip reply determinant
@@ -263,6 +263,7 @@ func queryVersionReply(buf []byte) *QueryVersionReply {
}
// Write request to wire for QueryVersion
+// queryVersionRequest writes a QueryVersion request to a byte slice.
func queryVersionRequest(c *xgb.Conn) []byte {
size := 4
b := 0
@@ -280,36 +281,38 @@ func queryVersionRequest(c *xgb.Conn) []byte {
return buf
}
-// Request ListSurfaceTypes
-// size: 8
+// ListSurfaceTypesCookie is a cookie used only for ListSurfaceTypes requests.
type ListSurfaceTypesCookie struct {
*xgb.Cookie
}
+// ListSurfaceTypes sends a checked request.
+// If an error occurs, it will be returned with the reply by calling ListSurfaceTypesCookie.Reply()
func ListSurfaceTypes(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie {
cookie := c.NewCookie(true, true)
c.NewRequest(listSurfaceTypesRequest(c, PortId), cookie)
return ListSurfaceTypesCookie{cookie}
}
+// ListSurfaceTypesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListSurfaceTypesUnchecked(c *xgb.Conn, PortId xv.Port) ListSurfaceTypesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listSurfaceTypesRequest(c, PortId), cookie)
return ListSurfaceTypesCookie{cookie}
}
-// Request reply for ListSurfaceTypes
-// size: (32 + xgb.Pad((int(Num) * 24)))
+// ListSurfaceTypesReply represents the data returned from a ListSurfaceTypes request.
type ListSurfaceTypesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Num uint32
// padding: 20 bytes
Surfaces []SurfaceInfo // size: xgb.Pad((int(Num) * 24))
}
-// Waits and reads reply data from request ListSurfaceTypes
+// Reply blocks and returns the reply data for a ListSurfaceTypes request.
func (cook ListSurfaceTypesCookie) Reply() (*ListSurfaceTypesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -321,7 +324,7 @@ func (cook ListSurfaceTypesCookie) Reply() (*ListSurfaceTypesReply, error) {
return listSurfaceTypesReply(buf), nil
}
-// Read reply into structure from buffer for ListSurfaceTypes
+// listSurfaceTypesReply reads a byte slice into a ListSurfaceTypesReply value.
func listSurfaceTypesReply(buf []byte) *ListSurfaceTypesReply {
v := new(ListSurfaceTypesReply)
b := 1 // skip reply determinant
@@ -346,6 +349,7 @@ func listSurfaceTypesReply(buf []byte) *ListSurfaceTypesReply {
}
// Write request to wire for ListSurfaceTypes
+// listSurfaceTypesRequest writes a ListSurfaceTypes request to a byte slice.
func listSurfaceTypesRequest(c *xgb.Conn, PortId xv.Port) []byte {
size := 8
b := 0
@@ -366,29 +370,31 @@ func listSurfaceTypesRequest(c *xgb.Conn, PortId xv.Port) []byte {
return buf
}
-// Request CreateContext
-// size: 24
+// CreateContextCookie is a cookie used only for CreateContext requests.
type CreateContextCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(createContextRequest(c, ContextId, PortId, SurfaceId, Width, Height, Flags), cookie)
return CreateContextCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(createContextRequest(c, ContextId, PortId, SurfaceId, Width, Height, Flags), cookie)
return CreateContextCookie{cookie}
}
-// Request reply for CreateContext
-// size: (36 + xgb.Pad((int(Length) * 4)))
+// CreateContextReply represents the data returned from a CreateContext request.
type CreateContextReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
WidthActual uint16
HeightActual uint16
@@ -397,7 +403,7 @@ type CreateContextReply struct {
PrivData []uint32 // size: xgb.Pad((int(Length) * 4))
}
-// Waits and reads reply data from request CreateContext
+// Reply blocks and returns the reply data for a CreateContext request.
func (cook CreateContextCookie) Reply() (*CreateContextReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -409,7 +415,7 @@ func (cook CreateContextCookie) Reply() (*CreateContextReply, error) {
return createContextReply(buf), nil
}
-// Read reply into structure from buffer for CreateContext
+// createContextReply reads a byte slice into a CreateContextReply value.
func createContextReply(buf []byte) *CreateContextReply {
v := new(CreateContextReply)
b := 1 // skip reply determinant
@@ -444,6 +450,7 @@ func createContextReply(buf []byte) *CreateContextReply {
}
// 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 {
size := 24
b := 0
@@ -479,30 +486,35 @@ func createContextRequest(c *xgb.Conn, ContextId Context, PortId xv.Port, Surfac
return buf
}
-// Request DestroyContext
-// size: 8
+// DestroyContextCookie is a cookie used only for DestroyContext requests.
type DestroyContextCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroyContext
+// 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, ContextId Context) DestroyContextCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroyContextRequest(c, ContextId), cookie)
return DestroyContextCookie{cookie}
}
+// DestroyContextChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroyContextCookie.Check()
func DestroyContextChecked(c *xgb.Conn, ContextId Context) DestroyContextCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroyContextRequest(c, ContextId), cookie)
return DestroyContextCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
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, ContextId Context) []byte {
size := 8
b := 0
@@ -523,35 +535,37 @@ func destroyContextRequest(c *xgb.Conn, ContextId Context) []byte {
return buf
}
-// Request CreateSurface
-// size: 12
+// CreateSurfaceCookie is a cookie used only for CreateSurface requests.
type CreateSurfaceCookie struct {
*xgb.Cookie
}
+// CreateSurface sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(createSurfaceRequest(c, SurfaceId, ContextId), cookie)
return CreateSurfaceCookie{cookie}
}
+// CreateSurfaceUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateSurfaceUnchecked(c *xgb.Conn, SurfaceId Surface, ContextId Context) CreateSurfaceCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(createSurfaceRequest(c, SurfaceId, ContextId), cookie)
return CreateSurfaceCookie{cookie}
}
-// Request reply for CreateSurface
-// size: (32 + xgb.Pad((int(Length) * 4)))
+// CreateSurfaceReply represents the data returned from a CreateSurface request.
type CreateSurfaceReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
// padding: 24 bytes
PrivData []uint32 // size: xgb.Pad((int(Length) * 4))
}
-// Waits and reads reply data from request CreateSurface
+// Reply blocks and returns the reply data for a CreateSurface request.
func (cook CreateSurfaceCookie) Reply() (*CreateSurfaceReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -563,7 +577,7 @@ func (cook CreateSurfaceCookie) Reply() (*CreateSurfaceReply, error) {
return createSurfaceReply(buf), nil
}
-// Read reply into structure from buffer for CreateSurface
+// createSurfaceReply reads a byte slice into a CreateSurfaceReply value.
func createSurfaceReply(buf []byte) *CreateSurfaceReply {
v := new(CreateSurfaceReply)
b := 1 // skip reply determinant
@@ -589,6 +603,7 @@ func createSurfaceReply(buf []byte) *CreateSurfaceReply {
}
// Write request to wire for CreateSurface
+// createSurfaceRequest writes a CreateSurface request to a byte slice.
func createSurfaceRequest(c *xgb.Conn, SurfaceId Surface, ContextId Context) []byte {
size := 12
b := 0
@@ -612,30 +627,35 @@ func createSurfaceRequest(c *xgb.Conn, SurfaceId Surface, ContextId Context) []b
return buf
}
-// Request DestroySurface
-// size: 8
+// DestroySurfaceCookie is a cookie used only for DestroySurface requests.
type DestroySurfaceCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroySurface
+// DestroySurface sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroySurface(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroySurfaceRequest(c, SurfaceId), cookie)
return DestroySurfaceCookie{cookie}
}
+// DestroySurfaceChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroySurfaceCookie.Check()
func DestroySurfaceChecked(c *xgb.Conn, SurfaceId Surface) DestroySurfaceCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroySurfaceRequest(c, SurfaceId), cookie)
return DestroySurfaceCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroySurfaceCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroySurface
+// destroySurfaceRequest writes a DestroySurface request to a byte slice.
func destroySurfaceRequest(c *xgb.Conn, SurfaceId Surface) []byte {
size := 8
b := 0
@@ -656,29 +676,31 @@ func destroySurfaceRequest(c *xgb.Conn, SurfaceId Surface) []byte {
return buf
}
-// Request CreateSubpicture
-// size: 20
+// CreateSubpictureCookie is a cookie used only for CreateSubpicture requests.
type CreateSubpictureCookie struct {
*xgb.Cookie
}
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(createSubpictureRequest(c, SubpictureId, Context, XvimageId, Width, Height), cookie)
return CreateSubpictureCookie{cookie}
}
+// 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 {
cookie := c.NewCookie(false, true)
c.NewRequest(createSubpictureRequest(c, SubpictureId, Context, XvimageId, Width, Height), cookie)
return CreateSubpictureCookie{cookie}
}
-// Request reply for CreateSubpicture
-// size: (32 + xgb.Pad((int(Length) * 4)))
+// CreateSubpictureReply represents the data returned from a CreateSubpicture request.
type CreateSubpictureReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
WidthActual uint16
HeightActual uint16
@@ -689,7 +711,7 @@ type CreateSubpictureReply struct {
PrivData []uint32 // size: xgb.Pad((int(Length) * 4))
}
-// Waits and reads reply data from request CreateSubpicture
+// Reply blocks and returns the reply data for a CreateSubpicture request.
func (cook CreateSubpictureCookie) Reply() (*CreateSubpictureReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -701,7 +723,7 @@ func (cook CreateSubpictureCookie) Reply() (*CreateSubpictureReply, error) {
return createSubpictureReply(buf), nil
}
-// Read reply into structure from buffer for CreateSubpicture
+// createSubpictureReply reads a byte slice into a CreateSubpictureReply value.
func createSubpictureReply(buf []byte) *CreateSubpictureReply {
v := new(CreateSubpictureReply)
b := 1 // skip reply determinant
@@ -743,6 +765,7 @@ func createSubpictureReply(buf []byte) *CreateSubpictureReply {
}
// 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 {
size := 20
b := 0
@@ -775,30 +798,35 @@ func createSubpictureRequest(c *xgb.Conn, SubpictureId Subpicture, Context Conte
return buf
}
-// Request DestroySubpicture
-// size: 8
+// DestroySubpictureCookie is a cookie used only for DestroySubpicture requests.
type DestroySubpictureCookie struct {
*xgb.Cookie
}
-// Write request to wire for DestroySubpicture
+// DestroySubpicture sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroySubpicture(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie {
cookie := c.NewCookie(false, false)
c.NewRequest(destroySubpictureRequest(c, SubpictureId), cookie)
return DestroySubpictureCookie{cookie}
}
+// DestroySubpictureChecked sends a checked request.
+// If an error occurs, it can be retrieved using DestroySubpictureCookie.Check()
func DestroySubpictureChecked(c *xgb.Conn, SubpictureId Subpicture) DestroySubpictureCookie {
cookie := c.NewCookie(true, false)
c.NewRequest(destroySubpictureRequest(c, SubpictureId), cookie)
return DestroySubpictureCookie{cookie}
}
+// Check returns an error if one occurred for checked requests that are not expecting a reply.
+// This cannot be called for requests expecting a reply, nor for unchecked requests.
func (cook DestroySubpictureCookie) Check() error {
return cook.Cookie.Check()
}
// Write request to wire for DestroySubpicture
+// destroySubpictureRequest writes a DestroySubpicture request to a byte slice.
func destroySubpictureRequest(c *xgb.Conn, SubpictureId Subpicture) []byte {
size := 8
b := 0
@@ -819,36 +847,38 @@ func destroySubpictureRequest(c *xgb.Conn, SubpictureId Subpicture) []byte {
return buf
}
-// Request ListSubpictureTypes
-// size: 12
+// ListSubpictureTypesCookie is a cookie used only for ListSubpictureTypes requests.
type ListSubpictureTypesCookie struct {
*xgb.Cookie
}
+// ListSubpictureTypes sends a checked request.
+// 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 {
cookie := c.NewCookie(true, true)
c.NewRequest(listSubpictureTypesRequest(c, PortId, SurfaceId), cookie)
return ListSubpictureTypesCookie{cookie}
}
+// ListSubpictureTypesUnchecked sends an unchecked request.
+// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListSubpictureTypesUnchecked(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) ListSubpictureTypesCookie {
cookie := c.NewCookie(false, true)
c.NewRequest(listSubpictureTypesRequest(c, PortId, SurfaceId), cookie)
return ListSubpictureTypesCookie{cookie}
}
-// Request reply for ListSubpictureTypes
-// size: (32 + xv.ImageFormatInfoListSize(Types))
+// ListSubpictureTypesReply represents the data returned from a ListSubpictureTypes request.
type ListSubpictureTypesReply struct {
- Sequence uint16
- Length uint32
+ Sequence uint16 // sequence number of the request for this reply
+ Length uint32 // number of bytes in this reply
// padding: 1 bytes
Num uint32
// padding: 20 bytes
Types []xv.ImageFormatInfo // size: xv.ImageFormatInfoListSize(Types)
}
-// Waits and reads reply data from request ListSubpictureTypes
+// Reply blocks and returns the reply data for a ListSubpictureTypes request.
func (cook ListSubpictureTypesCookie) Reply() (*ListSubpictureTypesReply, error) {
buf, err := cook.Cookie.Reply()
if err != nil {
@@ -860,7 +890,7 @@ func (cook ListSubpictureTypesCookie) Reply() (*ListSubpictureTypesReply, error)
return listSubpictureTypesReply(buf), nil
}
-// Read reply into structure from buffer for ListSubpictureTypes
+// listSubpictureTypesReply reads a byte slice into a ListSubpictureTypesReply value.
func listSubpictureTypesReply(buf []byte) *ListSubpictureTypesReply {
v := new(ListSubpictureTypesReply)
b := 1 // skip reply determinant
@@ -885,6 +915,7 @@ func listSubpictureTypesReply(buf []byte) *ListSubpictureTypesReply {
}
// Write request to wire for ListSubpictureTypes
+// listSubpictureTypesRequest writes a ListSubpictureTypes request to a byte slice.
func listSubpictureTypesRequest(c *xgb.Conn, PortId xv.Port, SurfaceId Surface) []byte {
size := 12
b := 0