Regenerated from xcb-proto 1.12

This commit is contained in:
aarzilli
2017-01-18 10:52:16 +01:00
committed by Přemysl Janouch
parent 1c01d79ba1
commit 3906399e7c
13 changed files with 667 additions and 264 deletions

View File

@@ -1524,9 +1524,8 @@ type GetCursorImageAndNameReply struct {
CursorAtom xproto.Atom
Nbytes uint16
// padding: 2 bytes
Name string // size: xgb.Pad((int(Nbytes) * 1))
// alignment gap to multiple of 4
CursorImage []uint32 // size: xgb.Pad(((int(Width) * int(Height)) * 4))
Name string // size: xgb.Pad((int(Nbytes) * 1))
}
// Reply blocks and returns the reply data for a GetCursorImageAndName request.
@@ -1583,6 +1582,12 @@ func getCursorImageAndNameReply(buf []byte) *GetCursorImageAndNameReply {
b += 2 // padding
v.CursorImage = make([]uint32, (int(v.Width) * int(v.Height)))
for i := 0; i < int((int(v.Width) * int(v.Height))); i++ {
v.CursorImage[i] = xgb.Get32(buf[b:])
b += 4
}
{
byteString := make([]byte, v.Nbytes)
copy(byteString[:v.Nbytes], buf[b:])
@@ -1590,14 +1595,6 @@ func getCursorImageAndNameReply(buf []byte) *GetCursorImageAndNameReply {
b += int(v.Nbytes)
}
b = (b + 3) & ^3 // alignment gap
v.CursorImage = make([]uint32, (int(v.Width) * int(v.Height)))
for i := 0; i < int((int(v.Width) * int(v.Height))); i++ {
v.CursorImage[i] = xgb.Get32(buf[b:])
b += 4
}
return v
}