Padding on a list is on the length of the list.

There was a bug where padding was being computed on each element of the
list. Close #5.
This commit is contained in:
Andrew Gallant 2013-08-11 20:54:15 -04:00 committed by Přemysl Janouch
parent b06a8ca976
commit 38b293e74d
Signed by: p
GPG Key ID: A0420B94F92B9493
17 changed files with 222 additions and 222 deletions

View File

@ -86,9 +86,9 @@ func AttachFormatListBytes(buf []byte, list []AttachFormat) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -291,9 +291,9 @@ func DRI2BufferListBytes(buf []byte, list []DRI2Buffer) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (

View File

@ -295,9 +295,9 @@ func CrtcChangeListBytes(buf []byte, list []CrtcChange) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Mode uint32 type Mode uint32
@ -453,11 +453,17 @@ func ModeInfoListBytes(buf []byte, list []ModeInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const (
NotifyCrtcChange = 0
NotifyOutputChange = 1
NotifyOutputProperty = 2
)
// Notify is the event number for a NotifyEvent. // Notify is the event number for a NotifyEvent.
const Notify = 1 const Notify = 1
@ -526,12 +532,6 @@ func init() {
xgb.NewExtEventFuncs["RANDR"][1] = NotifyEventNew xgb.NewExtEventFuncs["RANDR"][1] = NotifyEventNew
} }
const (
NotifyCrtcChange = 0
NotifyOutputChange = 1
NotifyOutputProperty = 2
)
// NotifyDataUnion is a represention of the NotifyDataUnion union type. // NotifyDataUnion is a represention of the NotifyDataUnion union type.
// Note that to *create* a Union, you should *never* create // Note that to *create* a Union, you should *never* create
// this struct directly (unless you know what you're doing). // this struct directly (unless you know what you're doing).
@ -809,9 +809,9 @@ func OutputChangeListBytes(buf []byte, list []OutputChange) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type OutputProperty struct { type OutputProperty struct {
@ -889,9 +889,9 @@ func OutputPropertyListBytes(buf []byte, list []OutputProperty) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type RefreshRates struct { type RefreshRates struct {
@ -950,9 +950,9 @@ func RefreshRatesListBytes(buf []byte, list []RefreshRates) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// RefreshRatesListSize computes the size (bytes) of a list of RefreshRates values. // RefreshRatesListSize computes the size (bytes) of a list of RefreshRates values.
@ -1174,9 +1174,9 @@ func ScreenSizeListBytes(buf []byte, list []ScreenSize) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (

View File

@ -143,9 +143,9 @@ func ClientInfoListBytes(buf []byte, list []ClientInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// ClientInfoListSize computes the size (bytes) of a list of ClientInfo values. // ClientInfoListSize computes the size (bytes) of a list of ClientInfo values.
@ -232,9 +232,9 @@ func ExtRangeListBytes(buf []byte, list []ExtRange) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -378,9 +378,9 @@ func RangeListBytes(buf []byte, list []Range) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Range16 struct { type Range16 struct {
@ -432,9 +432,9 @@ func Range16ListBytes(buf []byte, list []Range16) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Range8 struct { type Range8 struct {
@ -486,9 +486,9 @@ func Range8ListBytes(buf []byte, list []Range8) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'

View File

@ -86,9 +86,9 @@ func AnimcursoreltListBytes(buf []byte, list []Animcursorelt) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Color struct { type Color struct {
@ -154,9 +154,9 @@ func ColorListBytes(buf []byte, list []Color) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -266,9 +266,9 @@ func DirectformatListBytes(buf []byte, list []Directformat) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Fixed int32 type Fixed int32
@ -444,9 +444,9 @@ func GlyphinfoListBytes(buf []byte, list []Glyphinfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Glyphset uint32 type Glyphset uint32
@ -529,9 +529,9 @@ func IndexvalueListBytes(buf []byte, list []Indexvalue) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Linefix struct { type Linefix struct {
@ -589,9 +589,9 @@ func LinefixListBytes(buf []byte, list []Linefix) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// BadPictFormat is the error number for a BadPictFormat. // BadPictFormat is the error number for a BadPictFormat.
@ -812,9 +812,9 @@ func PictdepthListBytes(buf []byte, list []Pictdepth) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// PictdepthListSize computes the size (bytes) of a list of Pictdepth values. // PictdepthListSize computes the size (bytes) of a list of Pictdepth values.
@ -914,9 +914,9 @@ func PictforminfoListBytes(buf []byte, list []Pictforminfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Pictscreen struct { type Pictscreen struct {
@ -974,9 +974,9 @@ func PictscreenListBytes(buf []byte, list []Pictscreen) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// PictscreenListSize computes the size (bytes) of a list of Pictscreen values. // PictscreenListSize computes the size (bytes) of a list of Pictscreen values.
@ -1097,9 +1097,9 @@ func PictvisualListBytes(buf []byte, list []Pictvisual) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Pointfix struct { type Pointfix struct {
@ -1151,9 +1151,9 @@ func PointfixListBytes(buf []byte, list []Pointfix) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -1229,9 +1229,9 @@ func SpanfixListBytes(buf []byte, list []Spanfix) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -1341,9 +1341,9 @@ func TransformListBytes(buf []byte, list []Transform) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Trap struct { type Trap struct {
@ -1401,9 +1401,9 @@ func TrapListBytes(buf []byte, list []Trap) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Trapezoid struct { type Trapezoid struct {
@ -1475,9 +1475,9 @@ func TrapezoidListBytes(buf []byte, list []Trapezoid) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Triangle struct { type Triangle struct {
@ -1545,9 +1545,9 @@ func TriangleListBytes(buf []byte, list []Triangle) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'

View File

@ -86,9 +86,9 @@ func ClientListBytes(buf []byte, list []Client) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Type struct { type Type struct {
@ -140,9 +140,9 @@ func TypeListBytes(buf []byte, list []Type) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'

View File

@ -483,9 +483,9 @@ func Int64ListBytes(buf []byte, list []Int64) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Systemcounter struct { type Systemcounter struct {
@ -558,9 +558,9 @@ func SystemcounterListBytes(buf []byte, list []Systemcounter) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// SystemcounterListSize computes the size (bytes) of a list of Systemcounter values. // SystemcounterListSize computes the size (bytes) of a list of Systemcounter values.
@ -645,9 +645,9 @@ func TriggerListBytes(buf []byte, list []Trigger) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -710,9 +710,9 @@ func WaitconditionListBytes(buf []byte, list []Waitcondition) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'

View File

@ -82,9 +82,9 @@ func EventListBytes(buf []byte, list []Event) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'

View File

@ -100,9 +100,9 @@ func DrmClipRectListBytes(buf []byte, list []DrmClipRect) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'

View File

@ -418,9 +418,9 @@ func ModeInfoListBytes(buf []byte, list []ModeInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// BadModeUnsuitable is the error number for a BadModeUnsuitable. // BadModeUnsuitable is the error number for a BadModeUnsuitable.

View File

@ -93,9 +93,9 @@ func (s *Struct) WriteList(c *Context) {
c.Putln("for _, item := range list {") c.Putln("for _, item := range list {")
c.Putln("structBytes = item.Bytes()") c.Putln("structBytes = item.Bytes()")
c.Putln("copy(buf[b:], structBytes)") c.Putln("copy(buf[b:], structBytes)")
c.Putln("b += xgb.Pad(len(structBytes))") c.Putln("b += len(structBytes)")
c.Putln("}") c.Putln("}")
c.Putln("return b") c.Putln("return xgb.Pad(b)")
c.Putln("}") c.Putln("}")
c.Putln("") c.Putln("")
} }

View File

@ -100,9 +100,9 @@ func ScreenInfoListBytes(buf []byte, list []ScreenInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'

View File

@ -93,9 +93,9 @@ func AxisInfoListBytes(buf []byte, list []AxisInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type BellFeedbackCtl struct { type BellFeedbackCtl struct {
@ -180,9 +180,9 @@ func BellFeedbackCtlListBytes(buf []byte, list []BellFeedbackCtl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type BellFeedbackState struct { type BellFeedbackState struct {
@ -267,9 +267,9 @@ func BellFeedbackStateListBytes(buf []byte, list []BellFeedbackState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type ButtonInfo struct { type ButtonInfo struct {
@ -328,9 +328,9 @@ func ButtonInfoListBytes(buf []byte, list []ButtonInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type ButtonState struct { type ButtonState struct {
@ -402,9 +402,9 @@ func ButtonStateListBytes(buf []byte, list []ButtonState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// ButtonStateListSize computes the size (bytes) of a list of ButtonState values. // ButtonStateListSize computes the size (bytes) of a list of ButtonState values.
@ -678,9 +678,9 @@ func DeviceAbsAreaCtrlListBytes(buf []byte, list []DeviceAbsAreaCtrl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type DeviceAbsAreaState struct { type DeviceAbsAreaState struct {
@ -774,9 +774,9 @@ func DeviceAbsAreaStateListBytes(buf []byte, list []DeviceAbsAreaState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type DeviceAbsCalibCtl struct { type DeviceAbsCalibCtl struct {
@ -884,9 +884,9 @@ func DeviceAbsCalibCtlListBytes(buf []byte, list []DeviceAbsCalibCtl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type DeviceAbsCalibState struct { type DeviceAbsCalibState struct {
@ -994,9 +994,9 @@ func DeviceAbsCalibStateListBytes(buf []byte, list []DeviceAbsCalibState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// BadDeviceBusy is the error number for a BadDeviceBusy. // BadDeviceBusy is the error number for a BadDeviceBusy.
@ -1260,9 +1260,9 @@ func DeviceCoreCtrlListBytes(buf []byte, list []DeviceCoreCtrl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type DeviceCoreState struct { type DeviceCoreState struct {
@ -1333,9 +1333,9 @@ func DeviceCoreStateListBytes(buf []byte, list []DeviceCoreState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type DeviceCtl struct { type DeviceCtl struct {
@ -1387,9 +1387,9 @@ func DeviceCtlListBytes(buf []byte, list []DeviceCtl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type DeviceEnableCtrl struct { type DeviceEnableCtrl struct {
@ -1453,9 +1453,9 @@ func DeviceEnableCtrlListBytes(buf []byte, list []DeviceEnableCtrl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type DeviceEnableState struct { type DeviceEnableState struct {
@ -1519,9 +1519,9 @@ func DeviceEnableStateListBytes(buf []byte, list []DeviceEnableState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type DeviceInfo struct { type DeviceInfo struct {
@ -1592,9 +1592,9 @@ func DeviceInfoListBytes(buf []byte, list []DeviceInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -2183,9 +2183,9 @@ func DeviceResolutionCtlListBytes(buf []byte, list []DeviceResolutionCtl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// DeviceResolutionCtlListSize computes the size (bytes) of a list of DeviceResolutionCtl values. // DeviceResolutionCtlListSize computes the size (bytes) of a list of DeviceResolutionCtl values.
@ -2295,9 +2295,9 @@ func DeviceResolutionStateListBytes(buf []byte, list []DeviceResolutionState) in
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// DeviceResolutionStateListSize computes the size (bytes) of a list of DeviceResolutionState values. // DeviceResolutionStateListSize computes the size (bytes) of a list of DeviceResolutionState values.
@ -2358,9 +2358,9 @@ func DeviceStateListBytes(buf []byte, list []DeviceState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// DeviceStateNotify is the event number for a DeviceStateNotifyEvent. // DeviceStateNotify is the event number for a DeviceStateNotifyEvent.
@ -2533,9 +2533,9 @@ func DeviceTimeCoordListBytes(buf []byte, list []DeviceTimeCoord) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -2755,9 +2755,9 @@ func FeedbackCtlListBytes(buf []byte, list []FeedbackCtl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type FeedbackState struct { type FeedbackState struct {
@ -2816,9 +2816,9 @@ func FeedbackStateListBytes(buf []byte, list []FeedbackState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// FocusIn is the event number for a FocusInEvent. // FocusIn is the event number for a FocusInEvent.
@ -3012,9 +3012,9 @@ func InputClassInfoListBytes(buf []byte, list []InputClassInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type InputInfo struct { type InputInfo struct {
@ -3066,9 +3066,9 @@ func InputInfoListBytes(buf []byte, list []InputInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type InputState struct { type InputState struct {
@ -3127,9 +3127,9 @@ func InputStateListBytes(buf []byte, list []InputState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type IntegerFeedbackCtl struct { type IntegerFeedbackCtl struct {
@ -3195,9 +3195,9 @@ func IntegerFeedbackCtlListBytes(buf []byte, list []IntegerFeedbackCtl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type IntegerFeedbackState struct { type IntegerFeedbackState struct {
@ -3277,9 +3277,9 @@ func IntegerFeedbackStateListBytes(buf []byte, list []IntegerFeedbackState) int
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type KbdFeedbackCtl struct { type KbdFeedbackCtl struct {
@ -3394,9 +3394,9 @@ func KbdFeedbackCtlListBytes(buf []byte, list []KbdFeedbackCtl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type KbdFeedbackState struct { type KbdFeedbackState struct {
@ -3525,9 +3525,9 @@ func KbdFeedbackStateListBytes(buf []byte, list []KbdFeedbackState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// KbdFeedbackStateListSize computes the size (bytes) of a list of KbdFeedbackState values. // KbdFeedbackStateListSize computes the size (bytes) of a list of KbdFeedbackState values.
@ -3616,9 +3616,9 @@ func KeyInfoListBytes(buf []byte, list []KeyInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type KeyState struct { type KeyState struct {
@ -3690,9 +3690,9 @@ func KeyStateListBytes(buf []byte, list []KeyState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// KeyStateListSize computes the size (bytes) of a list of KeyState values. // KeyStateListSize computes the size (bytes) of a list of KeyState values.
@ -3774,9 +3774,9 @@ func LedFeedbackCtlListBytes(buf []byte, list []LedFeedbackCtl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type LedFeedbackState struct { type LedFeedbackState struct {
@ -3849,9 +3849,9 @@ func LedFeedbackStateListBytes(buf []byte, list []LedFeedbackState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// BadMode is the error number for a BadMode. // BadMode is the error number for a BadMode.
@ -4075,9 +4075,9 @@ func PtrFeedbackCtlListBytes(buf []byte, list []PtrFeedbackCtl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type PtrFeedbackState struct { type PtrFeedbackState struct {
@ -4162,9 +4162,9 @@ func PtrFeedbackStateListBytes(buf []byte, list []PtrFeedbackState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type StringFeedbackCtl struct { type StringFeedbackCtl struct {
@ -4249,9 +4249,9 @@ func StringFeedbackCtlListBytes(buf []byte, list []StringFeedbackCtl) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// StringFeedbackCtlListSize computes the size (bytes) of a list of StringFeedbackCtl values. // StringFeedbackCtlListSize computes the size (bytes) of a list of StringFeedbackCtl values.
@ -4347,9 +4347,9 @@ func StringFeedbackStateListBytes(buf []byte, list []StringFeedbackState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// StringFeedbackStateListSize computes the size (bytes) of a list of StringFeedbackState values. // StringFeedbackStateListSize computes the size (bytes) of a list of StringFeedbackState values.
@ -4437,9 +4437,9 @@ func ValuatorInfoListBytes(buf []byte, list []ValuatorInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// ValuatorInfoListSize computes the size (bytes) of a list of ValuatorInfo values. // ValuatorInfoListSize computes the size (bytes) of a list of ValuatorInfo values.
@ -4533,9 +4533,9 @@ func ValuatorStateListBytes(buf []byte, list []ValuatorState) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// ValuatorStateListSize computes the size (bytes) of a list of ValuatorState values. // ValuatorStateListSize computes the size (bytes) of a list of ValuatorState values.

View File

@ -394,9 +394,9 @@ func PrinterListBytes(buf []byte, list []Printer) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// PrinterListSize computes the size (bytes) of a list of Printer values. // PrinterListSize computes the size (bytes) of a list of Printer values.

View File

@ -189,9 +189,9 @@ func ArcListBytes(buf []byte, list []Arc) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -613,9 +613,9 @@ func Char2bListBytes(buf []byte, list []Char2b) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Charinfo struct { type Charinfo struct {
@ -695,9 +695,9 @@ func CharinfoListBytes(buf []byte, list []Charinfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -1199,9 +1199,9 @@ func ColoritemListBytes(buf []byte, list []Coloritem) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Colormap uint32 type Colormap uint32
@ -1918,9 +1918,9 @@ func DepthInfoListBytes(buf []byte, list []DepthInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// DepthInfoListSize computes the size (bytes) of a list of DepthInfo values. // DepthInfoListSize computes the size (bytes) of a list of DepthInfo values.
@ -2590,9 +2590,9 @@ func FontpropListBytes(buf []byte, list []Fontprop) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Format struct { type Format struct {
@ -2656,9 +2656,9 @@ func FormatListBytes(buf []byte, list []Format) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// BadGContext is the error number for a BadGContext. // BadGContext is the error number for a BadGContext.
@ -3063,9 +3063,9 @@ func HostListBytes(buf []byte, list []Host) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// HostListSize computes the size (bytes) of a list of Host values. // HostListSize computes the size (bytes) of a list of Host values.
@ -4283,9 +4283,9 @@ func PointListBytes(buf []byte, list []Point) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -4466,9 +4466,9 @@ func RectangleListBytes(buf []byte, list []Rectangle) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// ReparentNotify is the event number for a ReparentNotifyEvent. // ReparentNotify is the event number for a ReparentNotifyEvent.
@ -4791,9 +4791,9 @@ func RgbListBytes(buf []byte, list []Rgb) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type ScreenInfo struct { type ScreenInfo struct {
@ -4957,9 +4957,9 @@ func ScreenInfoListBytes(buf []byte, list []ScreenInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// ScreenInfoListSize computes the size (bytes) of a list of ScreenInfo values. // ScreenInfoListSize computes the size (bytes) of a list of ScreenInfo values.
@ -5039,9 +5039,9 @@ func SegmentListBytes(buf []byte, list []Segment) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// SelectionClear is the event number for a SelectionClearEvent. // SelectionClear is the event number for a SelectionClearEvent.
@ -5396,9 +5396,9 @@ func SetupAuthenticateListBytes(buf []byte, list []SetupAuthenticate) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// SetupAuthenticateListSize computes the size (bytes) of a list of SetupAuthenticate values. // SetupAuthenticateListSize computes the size (bytes) of a list of SetupAuthenticate values.
@ -5491,9 +5491,9 @@ func SetupFailedListBytes(buf []byte, list []SetupFailed) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// SetupFailedListSize computes the size (bytes) of a list of SetupFailed values. // SetupFailedListSize computes the size (bytes) of a list of SetupFailed values.
@ -5699,9 +5699,9 @@ func SetupInfoListBytes(buf []byte, list []SetupInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// SetupInfoListSize computes the size (bytes) of a list of SetupInfo values. // SetupInfoListSize computes the size (bytes) of a list of SetupInfo values.
@ -5815,9 +5815,9 @@ func SetupRequestListBytes(buf []byte, list []SetupRequest) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// SetupRequestListSize computes the size (bytes) of a list of SetupRequest values. // SetupRequestListSize computes the size (bytes) of a list of SetupRequest values.
@ -5890,9 +5890,9 @@ func StrListBytes(buf []byte, list []Str) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// StrListSize computes the size (bytes) of a list of Str values. // StrListSize computes the size (bytes) of a list of Str values.
@ -5969,9 +5969,9 @@ func TimecoordListBytes(buf []byte, list []Timecoord) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Timestamp uint32 type Timestamp uint32
@ -6312,9 +6312,9 @@ func VisualInfoListBytes(buf []byte, list []VisualInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
type Visualid uint32 type Visualid uint32

View File

@ -115,9 +115,9 @@ func ListItemListBytes(buf []byte, list []ListItem) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// ListItemListSize computes the size (bytes) of a list of ListItem values. // ListItemListSize computes the size (bytes) of a list of ListItem values.

View File

@ -130,9 +130,9 @@ func AdaptorInfoListBytes(buf []byte, list []AdaptorInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// AdaptorInfoListSize computes the size (bytes) of a list of AdaptorInfo values. // AdaptorInfoListSize computes the size (bytes) of a list of AdaptorInfo values.
@ -223,9 +223,9 @@ func AttributeInfoListBytes(buf []byte, list []AttributeInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// AttributeInfoListSize computes the size (bytes) of a list of AttributeInfo values. // AttributeInfoListSize computes the size (bytes) of a list of AttributeInfo values.
@ -474,9 +474,9 @@ func EncodingInfoListBytes(buf []byte, list []EncodingInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// EncodingInfoListSize computes the size (bytes) of a list of EncodingInfo values. // EncodingInfoListSize computes the size (bytes) of a list of EncodingInfo values.
@ -542,9 +542,9 @@ func FormatListBytes(buf []byte, list []Format) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (
@ -662,9 +662,9 @@ func ImageListBytes(buf []byte, list []Image) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// ImageListSize computes the size (bytes) of a list of Image values. // ImageListSize computes the size (bytes) of a list of Image values.
@ -892,9 +892,9 @@ func ImageFormatInfoListBytes(buf []byte, list []ImageFormatInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// ImageFormatInfoListSize computes the size (bytes) of a list of ImageFormatInfo values. // ImageFormatInfoListSize computes the size (bytes) of a list of ImageFormatInfo values.
@ -1062,9 +1062,9 @@ func RationalListBytes(buf []byte, list []Rational) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
const ( const (

View File

@ -166,9 +166,9 @@ func SurfaceInfoListBytes(buf []byte, list []SurfaceInfo) int {
for _, item := range list { for _, item := range list {
structBytes = item.Bytes() structBytes = item.Bytes()
copy(buf[b:], structBytes) copy(buf[b:], structBytes)
b += xgb.Pad(len(structBytes)) b += len(structBytes)
} }
return b return xgb.Pad(b)
} }
// Skipping definition for base type 'Bool' // Skipping definition for base type 'Bool'