Added a new Settings.Legacy option: do not turn bools into ints. Changed the default Tao options to not turn bools into ints and use nested enums. Added documentation to these options.

This commit is contained in:
the_fiddler 2007-11-10 10:27:19 +00:00
parent e05d99d622
commit 61f17b5e7c

View file

@ -83,17 +83,63 @@ namespace Bind
[Flags] [Flags]
public enum Legacy public enum Legacy
{ {
/// <summary>
/// Default value.
/// </summary>
None = 0x00, None = 0x00,
/// <summary>
/// Leave enums as plain const ints.
/// </summary>
ConstIntEnums = 0x01, ConstIntEnums = 0x01,
/// <summary>
/// Leave enums in the default STRANGE_capitalization.ALL_CAPS form.
/// </summary>
NoAdvancedEnumProcessing = 0x02, NoAdvancedEnumProcessing = 0x02,
/// <summary>
/// Don't allow unsafe wrappers in the interface.
/// </summary>
NoPublicUnsafeFunctions = 0x04, NoPublicUnsafeFunctions = 0x04,
/// <summary>
/// Don't trim the [fdisub]v? endings from functions.
/// </summary>
NoTrimFunctionEnding = NoPublicUnsafeFunctions, NoTrimFunctionEnding = NoPublicUnsafeFunctions,
/// <summary>
/// Don't trim the [gl|wgl|glx|glu] prefixes from functions.
/// </summary>
NoTrimFunctionPrefix = 0x08, NoTrimFunctionPrefix = 0x08,
/// <summary>
/// Don't spearate functions in different namespaces, according to their extension category
/// (e.g. GL.Arb, GL.Ext etc).
/// </summary>
NoSeparateFunctionNamespaces = 0x10, NoSeparateFunctionNamespaces = 0x10,
/// <summary>
/// No public void* parameters (should always be enabled. Disable at your own risk. Disabling
/// means that BitmapData.Scan0 and other .Net properties/functions must be cast to (void*)
/// explicitly, to avoid the 'object' overload from being called.)
/// </summary>
TurnVoidPointersToIntPtr = 0x20, TurnVoidPointersToIntPtr = 0x20,
/// <summary>
/// Generate all possible permutations for ref/array/pointer parameters.
/// </summary>
GenerateAllPermutations = 0x40, GenerateAllPermutations = 0x40,
/// <summary>
/// Nest enums inside the GL class.
/// </summary>
NestedEnums = 0x80, NestedEnums = 0x80,
Tao = ConstIntEnums | NoAdvancedEnumProcessing | NoPublicUnsafeFunctions | NoTrimFunctionEnding | NoTrimFunctionPrefix | NoSeparateFunctionNamespaces | TurnVoidPointersToIntPtr | GenerateAllPermutations, /// <summary>
/// Turn GLboolean to int (Boolean enum), not bool.
/// </summary>
NoBoolParameters = 0100,
Tao = ConstIntEnums |
NoAdvancedEnumProcessing |
NoPublicUnsafeFunctions |
NoTrimFunctionEnding |
NoTrimFunctionPrefix |
NoSeparateFunctionNamespaces |
TurnVoidPointersToIntPtr |
NestedEnums |
NoBoolParameters,
/*GenerateAllPermutations,*/
} }
public static string WindowsGDI = "OpenTK.Platform.Windows.API"; public static string WindowsGDI = "OpenTK.Platform.Windows.API";