Blame doc/xkb_issues

Packit 071ada
Packit 071ada
There are a number of problematic special cases in XKB. The issues 
Packit 071ada
mentioned here are at most partly resolved.
Packit 071ada
 
Packit 071ada
1. The are several XxxDoodad structures defined in xkb.xml. They are used
Packit 071ada
   in a few lists, but in a rather special way: 
Packit 071ada
   The struct "CommonDoodad" is supposed to be a rather generic data type, 
Packit 071ada
   combining the most basic Doodad fields that are common in all these structures. 
Packit 071ada
   All Doodads are encapsulated in a union type simply called "Doodad". 
Packit 071ada
   Now this union is used in subsequent list definitions, aiming at a kind of 
Packit 071ada
   'polymorphism': From inspection of the protocol and Xlib, the Doodads are to 
Packit 071ada
   be discriminated based on their type field.
Packit 071ada
   However the special meaning of the type field is not encoded in the protocol. 
Packit 071ada
   Furthermore the TextDoodad and the LogoDoodad are variable size types due to
Packit 071ada
   some fields of type CountedString16, thereby turning the union into a 
Packit 071ada
   possibly variable size type as well. 
Packit 071ada
   However, for lists with variable size elements, special sizeof functions are 
Packit 071ada
   required. These cannot be autogenerated as it cannot be referred which 
Packit 071ada
   Doodad type to use for the union. 
Packit 071ada
   Therefore, the Doodad type structures are unsupported at the moment. 
Packit 071ada
Packit 071ada
2. There are still some bugs in xkb.xml: Either certain fields are missing
Packit 071ada
   that are required by the protocol, or Xlib simply has another understanding
Packit 071ada
   of the protocol. 
Packit 071ada
Packit 071ada
3. The interface for accessors should be reviewed. 
Packit 071ada
Packit 071ada
4. Currently some bitcases carry 'name' attributes. These could be avoided if 
Packit 071ada
   the data within would consist of a singe struct field only. 
Packit 071ada
Packit 071ada
5. switch could get a 'fixed_size' attribute, so when rewriting valueparam to switch, 
Packit 071ada
   an uint32_t * pointer could be used instead of void *. 
Packit 071ada
Packit 071ada
6. The automatic inclusion of padding requires some complicated coding in the 
Packit 071ada
   generator. This is errorprone and could be avoided if all padding is explicitly
Packit 071ada
   given in the protocol definition. For variable size fields that require padding, 
Packit 071ada
   the pad tag could get a 'fieldref' attribute. That way padding could be handled
Packit 071ada
   a lot easier in the autogenerator.