From f0385db3a71c33f19d27dafb2a5d158a8a875200 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sat, 28 Dec 2013 09:25:18 -0500 Subject: Regenerate xgb with latest XML descriptions. --- nexgb/xproto/xproto.go | 58 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 4 deletions(-) (limited to 'nexgb/xproto/xproto.go') diff --git a/nexgb/xproto/xproto.go b/nexgb/xproto/xproto.go index 0de64fd..9b33030 100644 --- a/nexgb/xproto/xproto.go +++ b/nexgb/xproto/xproto.go @@ -2484,10 +2484,6 @@ func NewFontId(c *xgb.Conn) (Font, error) { return Font(id), nil } -const ( - FontNone = 0 -) - // BadFont is the error number for a BadFont. const BadFont = 7 @@ -2526,6 +2522,10 @@ func init() { xgb.NewErrorFuncs[7] = FontErrorNew } +const ( + FontNone = 0 +) + const ( FontDrawLeftToRight = 0 FontDrawRightToLeft = 1 @@ -2735,6 +2735,56 @@ func NewGcontextId(c *xgb.Conn) (Gcontext, error) { return Gcontext(id), nil } +// GeGeneric is the event number for a GeGenericEvent. +const GeGeneric = 35 + +type GeGenericEvent struct { + Sequence uint16 + // padding: 22 bytes +} + +// GeGenericEventNew constructs a GeGenericEvent value that implements xgb.Event from a byte slice. +func GeGenericEventNew(buf []byte) xgb.Event { + v := GeGenericEvent{} + b := 1 // don't read event number + + b += 22 // padding + + return v +} + +// Bytes writes a GeGenericEvent value to a byte slice. +func (v GeGenericEvent) Bytes() []byte { + buf := make([]byte, 32) + b := 0 + + // write event number + buf[b] = 35 + b += 1 + + b += 22 // padding + + return buf +} + +// SequenceId returns the sequence id attached to the GeGeneric event. +// Events without a sequence number (KeymapNotify) return 0. +// This is mostly used internally. +func (v GeGenericEvent) SequenceId() uint16 { + return v.Sequence +} + +// String is a rudimentary string representation of GeGenericEvent. +func (v GeGenericEvent) String() string { + fieldVals := make([]string, 0, 1) + fieldVals = append(fieldVals, xgb.Sprintf("Sequence: %d", v.Sequence)) + return "GeGeneric {" + xgb.StringsJoin(fieldVals, ", ") + "}" +} + +func init() { + xgb.NewEventFuncs[35] = GeGenericEventNew +} + const ( GetPropertyTypeAny = 0 ) -- cgit v1.2.3-70-g09d2