// Code generated by xtgen; DO NOT EDIT. package composite import "bnema.dev/xturbo/xproto" import "encoding/binary" // QueryVersionReply is a zero-copy view over a QueryVersion reply; offsets count from reply byte 0. // It borrows the reply bytes: valid only until the Handler callback returns, because the read ring is reused. Copy what you keep. type QueryVersionReply struct{ raw []byte } // ParseQueryVersionReply validates raw (the whole reply, 32+4*length bytes) once; getters do not re-check. func ParseQueryVersionReply(raw []byte) (QueryVersionReply, bool) { if len(raw) < 32 { return QueryVersionReply{}, false } r := QueryVersionReply{raw: raw} return r, true } func (r QueryVersionReply) Raw() []byte { return r.raw } func (r QueryVersionReply) MajorVersion() uint32 { return uint32(binary.LittleEndian.Uint32(r.raw[8:])) } func (r QueryVersionReply) MinorVersion() uint32 { return uint32(binary.LittleEndian.Uint32(r.raw[12:])) } // GetOverlayWindowReply is a zero-copy view over a GetOverlayWindow reply; offsets count from reply byte 0. // It borrows the reply bytes: valid only until the Handler callback returns, because the read ring is reused. Copy what you keep. type GetOverlayWindowReply struct{ raw []byte } // ParseGetOverlayWindowReply validates raw (the whole reply, 32+4*length bytes) once; getters do not re-check. func ParseGetOverlayWindowReply(raw []byte) (GetOverlayWindowReply, bool) { if len(raw) < 32 { return GetOverlayWindowReply{}, false } r := GetOverlayWindowReply{raw: raw} return r, true } func (r GetOverlayWindowReply) Raw() []byte { return r.raw } func (r GetOverlayWindowReply) OverlayWin() xproto.Window { return xproto.Window(binary.LittleEndian.Uint32(r.raw[8:])) }