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
This commit is contained in:
aarzilli
2017-01-18 09:53:26 +01:00
committed by Přemysl Janouch
parent a102c4056f
commit 1c01d79ba1
9 changed files with 174 additions and 158 deletions

View File

@@ -205,10 +205,7 @@ func (r *Request) ParamNames() string {
for _, field := range r.Fields {
switch f := field.(type) {
case *ValueField:
// mofos...
if r.SrcName() != "ConfigureWindow" {
names = append(names, f.MaskName)
}
names = append(names, f.MaskName)
names = append(names, f.ListName)
case *PadField:
continue
@@ -226,17 +223,16 @@ func (r *Request) ParamNameTypes() string {
for _, field := range r.Fields {
switch f := field.(type) {
case *ValueField:
// mofos...
if r.SrcName() != "ConfigureWindow" {
nameTypes = append(nameTypes,
fmt.Sprintf("%s %s", f.MaskName, f.MaskType.SrcName()))
}
nameTypes = append(nameTypes,
fmt.Sprintf("%s %s", f.MaskName, f.MaskType.SrcName()))
nameTypes = append(nameTypes,
fmt.Sprintf("%s []uint32", f.ListName))
case *PadField:
continue
case *ExprField:
continue
case *RequiredStartAlign:
continue
default:
nameTypes = append(nameTypes,
fmt.Sprintf("%s %s", field.SrcName(), field.SrcType()))