mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-09 09:40:41 +00:00
Now prints the OpenTK license and adds the [AutoGenerated] attribute to the generated bindings.
This commit is contained in:
parent
8ba07860e5
commit
01f618c00b
|
@ -11,6 +11,7 @@ using System.IO;
|
||||||
using Bind.Structures;
|
using Bind.Structures;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using Bind.Properties;
|
||||||
|
|
||||||
namespace Bind.GL2
|
namespace Bind.GL2
|
||||||
{
|
{
|
||||||
|
@ -150,10 +151,10 @@ namespace Bind.GL2
|
||||||
d.Parameters.Add(p);
|
d.Parameters.Add(p);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Version directive is not used. GetTexParameterIivEXT and GetTexParameterIuivEXT define two(!) versions (why?)
|
// GetTexParameterIivEXT and GetTexParameterIuivEXT define two(!) versions (why?)
|
||||||
//case "version": // Line denotes function version (i.e. 1.0, 1.2, 1.5)
|
case "version": // Line denotes function version (i.e. 1.0, 1.2, 1.5)
|
||||||
// d.UserData.Add("version", words[1]);
|
d.Version = words[1];
|
||||||
// break;
|
break;
|
||||||
|
|
||||||
case "category":
|
case "category":
|
||||||
d.Category = words[1];
|
d.Category = words[1];
|
||||||
|
@ -461,6 +462,7 @@ namespace Bind.GL2
|
||||||
|
|
||||||
using (BindStreamWriter sw = new BindStreamWriter(Path.Combine(Settings.OutputPath, enumsFile)))
|
using (BindStreamWriter sw = new BindStreamWriter(Path.Combine(Settings.OutputPath, enumsFile)))
|
||||||
{
|
{
|
||||||
|
WriteLicense(sw, Resources.License);
|
||||||
if ((Settings.Compatibility & Settings.Legacy.NestedEnums) != Settings.Legacy.None)
|
if ((Settings.Compatibility & Settings.Legacy.NestedEnums) != Settings.Legacy.None)
|
||||||
{
|
{
|
||||||
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
||||||
|
@ -487,6 +489,7 @@ namespace Bind.GL2
|
||||||
}
|
}
|
||||||
using (BindStreamWriter sw = new BindStreamWriter(Path.Combine(Settings.OutputPath, delegatesFile)))
|
using (BindStreamWriter sw = new BindStreamWriter(Path.Combine(Settings.OutputPath, delegatesFile)))
|
||||||
{
|
{
|
||||||
|
WriteLicense(sw, Resources.License);
|
||||||
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
||||||
sw.WriteLine("{");
|
sw.WriteLine("{");
|
||||||
sw.Indent();
|
sw.Indent();
|
||||||
|
@ -502,6 +505,7 @@ namespace Bind.GL2
|
||||||
}
|
}
|
||||||
using (BindStreamWriter sw = new BindStreamWriter(Path.Combine(Settings.OutputPath, importsFile)))
|
using (BindStreamWriter sw = new BindStreamWriter(Path.Combine(Settings.OutputPath, importsFile)))
|
||||||
{
|
{
|
||||||
|
WriteLicense(sw, Resources.License);
|
||||||
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
||||||
sw.WriteLine("{");
|
sw.WriteLine("{");
|
||||||
sw.Indent();
|
sw.Indent();
|
||||||
|
@ -516,6 +520,7 @@ namespace Bind.GL2
|
||||||
}
|
}
|
||||||
using (BindStreamWriter sw = new BindStreamWriter(Path.Combine(Settings.OutputPath, wrappersFile)))
|
using (BindStreamWriter sw = new BindStreamWriter(Path.Combine(Settings.OutputPath, wrappersFile)))
|
||||||
{
|
{
|
||||||
|
WriteLicense(sw, Resources.License);
|
||||||
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
||||||
sw.WriteLine("{");
|
sw.WriteLine("{");
|
||||||
sw.Indent();
|
sw.Indent();
|
||||||
|
@ -650,6 +655,8 @@ namespace Bind.GL2
|
||||||
{
|
{
|
||||||
sw.WriteLine("[System.CLSCompliant(false)]");
|
sw.WriteLine("[System.CLSCompliant(false)]");
|
||||||
}
|
}
|
||||||
|
sw.WriteLine("[AutoGenerated(Category = \"{0}\", Version = \"{1}\", EntryPoint = \"{2}\")]",
|
||||||
|
f.Category, f.Version, "gl" + f.WrappedDelegate.Name);
|
||||||
sw.WriteLine("public static ");
|
sw.WriteLine("public static ");
|
||||||
sw.Write(f);
|
sw.Write(f);
|
||||||
sw.WriteLine();
|
sw.WriteLine();
|
||||||
|
@ -741,6 +748,16 @@ namespace Bind.GL2
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region void WriteLicense
|
||||||
|
|
||||||
|
public void WriteLicense(BindStreamWriter sw, string license)
|
||||||
|
{
|
||||||
|
sw.WriteLine(Resources.License);
|
||||||
|
sw.WriteLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,5 +20,6 @@ namespace Bind
|
||||||
void WriteWrappers(BindStreamWriter sw, FunctionCollection wrappers, Dictionary<string, string> CSTypes);
|
void WriteWrappers(BindStreamWriter sw, FunctionCollection wrappers, Dictionary<string, string> CSTypes);
|
||||||
void WriteEnums(BindStreamWriter sw, EnumCollection enums);
|
void WriteEnums(BindStreamWriter sw, EnumCollection enums);
|
||||||
void WriteTypes(BindStreamWriter sw, Dictionary<string, string> CSTypes);
|
void WriteTypes(BindStreamWriter sw, Dictionary<string, string> CSTypes);
|
||||||
|
void WriteLicense(BindStreamWriter sw, string license);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
82
Source/Bind/Properties/Resources.Designer.cs
generated
Normal file
82
Source/Bind/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:2.0.50727.3074
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Bind.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Bind.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to #region License
|
||||||
|
/////
|
||||||
|
///// The Open Toolkit Library License
|
||||||
|
/////
|
||||||
|
///// Copyright (c) 2006 - 2008 the Open Toolkit library, except where noted.
|
||||||
|
/////
|
||||||
|
///// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
///// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
///// in the Software without restriction, including without limitation the rights to
|
||||||
|
///// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
///// the Software, and to permit person [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
internal static string License {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("License", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
148
Source/Bind/Properties/Resources.resx
Normal file
148
Source/Bind/Properties/Resources.resx
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="License" xml:space="preserve">
|
||||||
|
<value>#region License
|
||||||
|
//
|
||||||
|
// The Open Toolkit Library License
|
||||||
|
//
|
||||||
|
// Copyright (c) 2006 - 2008 the Open Toolkit library, except where noted.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
// in the Software without restriction, including without limitation the rights to
|
||||||
|
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
// the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
// so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be included in all
|
||||||
|
// copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
#endregion</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -104,7 +104,7 @@ namespace Bind.Structures
|
||||||
public string Category
|
public string Category
|
||||||
{
|
{
|
||||||
get { return _category; }
|
get { return _category; }
|
||||||
set { _category = value; }
|
set { _category = Enum.TranslateName(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -345,10 +345,6 @@ namespace Bind.Structures
|
||||||
|
|
||||||
public void CreateWrappers()
|
public void CreateWrappers()
|
||||||
{
|
{
|
||||||
if (this.Name.Contains("ReadPixels"))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Function> wrappers = new List<Function>();
|
List<Function> wrappers = new List<Function>();
|
||||||
if (!NeedsWrapper)
|
if (!NeedsWrapper)
|
||||||
{
|
{
|
||||||
|
@ -509,9 +505,6 @@ namespace Bind.Structures
|
||||||
|
|
||||||
internal void Translate()
|
internal void Translate()
|
||||||
{
|
{
|
||||||
if (Name.Contains("GetError"))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
TranslateReturnType();
|
TranslateReturnType();
|
||||||
TranslateParameters();
|
TranslateParameters();
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ namespace Bind.Structures
|
||||||
foreach (char c in name)
|
foreach (char c in name)
|
||||||
{
|
{
|
||||||
char char_to_add;
|
char char_to_add;
|
||||||
if (c == '_')
|
if (c == '_' || c == '-')
|
||||||
is_after_underscore_or_number = true;
|
is_after_underscore_or_number = true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,9 +14,11 @@ namespace Bind.Structures
|
||||||
{
|
{
|
||||||
public class Function : Delegate, IEquatable<Function>
|
public class Function : Delegate, IEquatable<Function>
|
||||||
{
|
{
|
||||||
|
#region Static Members
|
||||||
|
|
||||||
internal static FunctionCollection Wrappers;
|
internal static FunctionCollection Wrappers;
|
||||||
|
|
||||||
private static bool loaded;
|
static bool loaded;
|
||||||
|
|
||||||
#region internal static void Initialize()
|
#region internal static void Initialize()
|
||||||
|
|
||||||
|
@ -34,6 +36,14 @@ namespace Bind.Structures
|
||||||
static Regex endings = new Regex(@"((([df]|u?[isb])v?)|v)", RegexOptions.Compiled | RegexOptions.RightToLeft);
|
static Regex endings = new Regex(@"((([df]|u?[isb])v?)|v)", RegexOptions.Compiled | RegexOptions.RightToLeft);
|
||||||
static Regex endingsNotToTrim = new Regex("(ib|[tdrey]s|[eE]n[vd]|bled|Flagv|Tess|Status|Pixels)", RegexOptions.Compiled | RegexOptions.RightToLeft);
|
static Regex endingsNotToTrim = new Regex("(ib|[tdrey]s|[eE]n[vd]|bled|Flagv|Tess|Status|Pixels)", RegexOptions.Compiled | RegexOptions.RightToLeft);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Fields
|
||||||
|
|
||||||
|
Delegate wrapped_delegate;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a trailing v to functions matching this regex. Used to differntiate between overloads taking both
|
/// Add a trailing v to functions matching this regex. Used to differntiate between overloads taking both
|
||||||
/// a 'type' and a 'ref type' (such overloads are not CLS Compliant).
|
/// a 'type' and a 'ref type' (such overloads are not CLS Compliant).
|
||||||
|
@ -45,12 +55,6 @@ namespace Bind.Structures
|
||||||
|
|
||||||
#region --- Constructors ---
|
#region --- Constructors ---
|
||||||
|
|
||||||
public Function()
|
|
||||||
: base()
|
|
||||||
{
|
|
||||||
Body = new FunctionBody();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Function(Delegate d)
|
public Function(Delegate d)
|
||||||
: base(d)
|
: base(d)
|
||||||
{
|
{
|
||||||
|
@ -59,10 +63,20 @@ namespace Bind.Structures
|
||||||
else
|
else
|
||||||
this.Body = new FunctionBody();
|
this.Body = new FunctionBody();
|
||||||
this.Name = d.Name;
|
this.Name = d.Name;
|
||||||
|
|
||||||
|
WrappedDelegate = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public Delegate WrappedDelegate
|
||||||
|
{
|
||||||
|
get { return wrapped_delegate; }
|
||||||
|
set { wrapped_delegate = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#region public void TurnVoidPointersToIntPtr()
|
||||||
|
|
||||||
public void TurnVoidPointersToIntPtr()
|
public void TurnVoidPointersToIntPtr()
|
||||||
{
|
{
|
||||||
foreach (Parameter p in this.Parameters)
|
foreach (Parameter p in this.Parameters)
|
||||||
|
@ -75,6 +89,8 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region public override bool Unsafe
|
#region public override bool Unsafe
|
||||||
|
|
||||||
public override bool Unsafe
|
public override bool Unsafe
|
||||||
|
@ -134,9 +150,6 @@ namespace Bind.Structures
|
||||||
{
|
{
|
||||||
TrimmedName = Utilities.StripGL2Extension(value);
|
TrimmedName = Utilities.StripGL2Extension(value);
|
||||||
|
|
||||||
//if (Name.Contains("BooleanIndexed"))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
Match m = endingsNotToTrim.Match(TrimmedName);
|
Match m = endingsNotToTrim.Match(TrimmedName);
|
||||||
if ((m.Index + m.Length) != TrimmedName.Length)
|
if ((m.Index + m.Length) != TrimmedName.Length)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue