aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xgbgen
diff options
context:
space:
mode:
authoraarzilli <alessandro.arzilli@gmail.com>2017-01-18 10:52:16 +0100
committerPřemysl Janouch <p@janouch.name>2018-09-08 16:49:27 +0200
commit3906399e7c2a40fbaf355de572cf50a314083f64 (patch)
treefcdcca7da60cc3c7c7e87faa5dcc4898d1671514 /nexgb/xgbgen
parent1c01d79ba14a802c603ca2e5bbd35156e3363b85 (diff)
downloadhaven-3906399e7c2a40fbaf355de572cf50a314083f64.tar.gz
haven-3906399e7c2a40fbaf355de572cf50a314083f64.tar.xz
haven-3906399e7c2a40fbaf355de572cf50a314083f64.zip
Regenerated from xcb-proto 1.12
Diffstat (limited to 'nexgb/xgbgen')
-rw-r--r--nexgb/xgbgen/field.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/nexgb/xgbgen/field.go b/nexgb/xgbgen/field.go
index 58f54c8..d6957b7 100644
--- a/nexgb/xgbgen/field.go
+++ b/nexgb/xgbgen/field.go
@@ -76,7 +76,7 @@ func (p *PadField) Size() Size {
type RequiredStartAlign struct {
}
-func (f *RequiredStartAlign) Initialize(p *Protocol) { }
+func (f *RequiredStartAlign) Initialize(p *Protocol) {}
func (f *RequiredStartAlign) SrcName() string {
panic("illegal to take source name of a required_start_align field")
@@ -94,10 +94,10 @@ func (f *RequiredStartAlign) Size() Size {
return newFixedSize(0, true)
}
-func (f *RequiredStartAlign) Define(c *Context) { }
+func (f *RequiredStartAlign) Define(c *Context) {}
-func (f *RequiredStartAlign) Read(c *Context, prefix string) { }
-func (f *RequiredStartAlign) Write(c *Context, prefix string) { }
+func (f *RequiredStartAlign) Read(c *Context, prefix string) {}
+func (f *RequiredStartAlign) Write(c *Context, prefix string) {}
// SingleField represents most of the fields in an XML protocol description.
// It corresponds to any single value.
@@ -317,9 +317,9 @@ func (f *ValueField) Initialize(p *Protocol) {
// SwitchField represents a 'switch' element in the XML protocol description
// file.
// Currently we translate this to a slice of uint32 and let the user sort
-// through it.
+// through it.
type SwitchField struct {
- xmlName string
+ xmlName string
Name string
MaskName string
Expr Expression
@@ -342,6 +342,7 @@ func (f *SwitchField) Size() Size {
// TODO: size expression used here is not correct unless every element of
// the switch is 32 bit long. This assumption holds for xproto but may not
// hold for other protocols (xkb?)
+
listSize := newExpressionSize(&Function{
Name: "xgb.Pad",
Expr: &BinaryOp{
@@ -357,7 +358,7 @@ func (f *SwitchField) Size() Size {
},
},
}, true)
-
+
return listSize
}