From e178f306eb2d7405d609b075935673c03326e7b5 Mon Sep 17 00:00:00 2001 From: Stefanos A Date: Tue, 3 Dec 2013 09:09:19 +0100 Subject: [PATCH] Update WrapperTypes values for [Flags] --- Source/Bind/Utilities.cs | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/Source/Bind/Utilities.cs b/Source/Bind/Utilities.cs index 6d019396..c1f559a8 100644 --- a/Source/Bind/Utilities.cs +++ b/Source/Bind/Utilities.cs @@ -27,60 +27,68 @@ namespace Bind /// /// Function takes bool parameter - C uses Int for bools, so we have to marshal. /// - BoolParameter, + BoolParameter = 1 << 0, /// /// Function takes generic parameters - add ref/out generic and generic overloads. /// - GenericParameter, + GenericParameter = 1 << 1, /// /// Function takes arrays as parameters - add ref/out and ([Out]) array overloads. /// - ArrayParameter, + ArrayParameter = 1 << 2, /// /// Function with bitmask parameters. Bitmask parameters map to UInt, but since we can only use signed /// types (for CLS compliance), we must add the unchecked keyword. /// Usually found in bitmasks /// - UncheckedParameter, + UncheckedParameter = 1 << 3, /// /// Function that takes (in/ref/out) a naked pointer as a parameter - we pass an IntPtr. /// - PointerParameter, + PointerParameter = 1 << 4, /// /// Function that takes a reference to a struct. /// - ReferenceParameter, + ReferenceParameter = 1 << 5, /// /// Function returns string - needs manual marshalling through IntPtr to prevent the managed GC /// from freeing memory allocated on the unmanaged side (e.g. glGetString). /// - StringReturnType, + StringReturnType = 1 << 6, /// /// Function returns a void pointer - maps to IntPtr, and the user has to manually marshal the type. /// - GenericReturnType, + GenericReturnType = 1 << 7, /// /// Function returns a typed pointer - we have to copy the data to an array to protect it from the GC. /// - ArrayReturnType, + ArrayReturnType = 1 << 8, /// /// Function normally returns a value via an out parameter. /// This overload returns a single item directly. /// e.g. void GetIntegerv(enum pname, out int value) => int GetInteger(enum pname) /// - ConvenienceReturnType, + ConvenienceReturnType = 1 << 9, /// /// Function normally returns an array via an out parameter. /// This overload returns a single item directly. /// e.g. void GenBuffers(int count, int[] ids) => int GenBuffer() /// - ConvenienceArrayReturnType, + ConvenienceArrayReturnType = 1 << 10, /// /// Function normally takes an array in parameter. /// This overload takes a single item directly. /// e.g. void DeleteBuffers(int count, int[] ids) => DeleteBuffer(int id) /// - ConvenienceArrayType, + ConvenienceArrayType = 1 << 11, + /// + /// Function takes a String or StringBuilder parameter + /// + StringParameter = 1 << 12, + /// + /// Function takes a String[] parameter + /// + StringArrayParameter = 1 << 13, } #endregion