diff options
author | aarzilli <alessandro.arzilli@gmail.com> | 2017-01-18 09:53:26 +0100 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2018-09-08 16:49:26 +0200 |
commit | 1c01d79ba14a802c603ca2e5bbd35156e3363b85 (patch) | |
tree | 5ba818deb4c33dd44df9b5c66dc9d45f3b1672e5 /nexgb/xgbgen/translation.go | |
parent | a102c4056f6b01035772cf79060012ff800c9669 (diff) | |
download | haven-1c01d79ba14a802c603ca2e5bbd35156e3363b85.tar.gz haven-1c01d79ba14a802c603ca2e5bbd35156e3363b85.tar.xz haven-1c01d79ba14a802c603ca2e5bbd35156e3363b85.zip |
Changed xgbgen to support xcb-proto 1.12
* Added minimal support for switch fields.
* Changed the way Size is calculated to accomodate for lists inside structs
(added to randr)
* Removed heuristic to place alignment gaps, they are now explicitly
described in xml
Diffstat (limited to 'nexgb/xgbgen/translation.go')
-rw-r--r-- | nexgb/xgbgen/translation.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nexgb/xgbgen/translation.go b/nexgb/xgbgen/translation.go index f595e5f..d35fa88 100644 --- a/nexgb/xgbgen/translation.go +++ b/nexgb/xgbgen/translation.go @@ -325,12 +325,14 @@ func (x *XMLField) Translate(parent interface{}) Field { case "pad": return &PadField{ Bytes: x.Bytes, + Align: x.Align, } case "field": - return &SingleField{ + s := &SingleField{ xmlName: x.Name, Type: newTranslation(x.Type), } + return s case "list": return &ListField{ xmlName: x.Name, @@ -365,6 +367,8 @@ func (x *XMLField) Translate(parent interface{}) Field { swtch.Bitcases[i] = bitcase.Translate() } return swtch + case "required_start_align": + return &RequiredStartAlign{} } log.Panicf("Unrecognized field element: %s", x.XMLName.Local) |