Hi,

I promised more details about a new option type "enum" in the
configuration scheme. Basically it is jut a special case of an integer
that _requires_ a "valid" attribute in the driver's XML document in
order to guarantee enumerability. Furthermore individual values _can_
(but don't need to) be described inside the description elements. This
means:

- the description element is no longer empty it can contain enum elements
- enum value descriptions are internationalized
- enum value descriptions are only documentation
- in the configuration files integer values are stored for enum options

A realistic example:

In a driver's XML document:
...
<option name="vsync" type="enum" valid="0:3" default="3">
    <description lang="en" text="Synchronization with vertical blanks">
        <enum value="0" text="Never, FPS rulez ;-)"/>
        <enum value="1" text="Application preference, default off"/>
        <enum value="2" text="Application preference, default on"/>
        <enum value="3" text="Application preference, always at least 1"/>
    </description>
    <description lang="de" text="Synchronisation mit vertikalen 
Kathodenstrahlrückläufen">
        <enum value="0" text="Niemals; immer die maximale Framerate"/>
        ...
    </description>
</option>
...

In a configuration file:
...
<option name="vsync" value="2"/>
...

I believe this solution is very flexible and keeps the implementation
complexity small as the drivers don't need to parse symbolic values from
configuration files. Comments?

Regards,
  Felix

------------    __\|/__    ___     ___       -------------------------
 Felix       ___\_e -_/___/ __\___/ __\_____   You can do anything,
   Kühling  (_____\Ä/____/ /_____/ /________)  just not everything
 [EMAIL PROTECTED]       \___/   \___/   U        at the same time.


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to