aboutsummaryrefslogtreecommitdiff
path: root/nexgb/render/render.go
diff options
context:
space:
mode:
Diffstat (limited to 'nexgb/render/render.go')
-rw-r--r--nexgb/render/render.go597
1 files changed, 351 insertions, 246 deletions
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