Browse Source

Update the SDL example.

pull/13/merge
triton 12 years ago
parent
commit
1f35639ff2
  1. 9
      examples/SDL/SDL.cs
  2. 2
      examples/SDL/premake4.lua

9
examples/SDL/SDL.cs

@ -1,11 +1,8 @@
using CppSharp.Generators; using CppSharp.AST;
using CppSharp.Passes; using CppSharp.Passes;
namespace CppSharp namespace CppSharp
{ {
/// <summary>
/// Transform the SDL library declarations to something more .NET friendly.
/// </summary>
class SDL : ILibrary class SDL : ILibrary
{ {
public void Setup(Driver driver) public void Setup(Driver driver)
@ -47,7 +44,7 @@ namespace CppSharp
lib.IgnoreHeadersWithName("SDL_main*"); lib.IgnoreHeadersWithName("SDL_main*");
lib.IgnoreHeadersWithName("SDL_mutex*"); lib.IgnoreHeadersWithName("SDL_mutex*");
lib.IgnoreHeadersWithName("SDL_stdinc*"); lib.IgnoreHeadersWithName("SDL_stdinc*");
//lib.IgnoreModuleWithName("SDL_error"); lib.IgnoreHeadersWithName("SDL_error");
lib.IgnoreEnumWithMatchingItem("SDL_ENOMEM"); lib.IgnoreEnumWithMatchingItem("SDL_ENOMEM");
lib.IgnoreFunctionWithName("SDL_Error"); lib.IgnoreFunctionWithName("SDL_Error");
@ -64,7 +61,7 @@ namespace CppSharp
lib.SetNameOfEnumWithName("assert_state", "AssertState"); lib.SetNameOfEnumWithName("assert_state", "AssertState");
lib.SetClassBindName("assert_data", "AssertData"); lib.SetClassBindName("assert_data", "AssertData");
lib.SetNameOfEnumWithName("eventaction", "EventAction"); lib.SetNameOfEnumWithName("eventaction", "EventAction");
//lib.SetNameOfEnumWithName("LOG_CATEGORY", "LogCategory"); lib.SetNameOfEnumWithName("LOG_CATEGORY", "LogCategory");
} }
static class Program static class Program

2
examples/SDL/premake4.lua

@ -7,7 +7,7 @@ project "SDL"
files { "**.cs", "./*.lua" } files { "**.cs", "./*.lua" }
links { "Bridge", "Generator" } links { "CppSharp.AST", "CppSharp.Generator" }
project "SDL.Tests" project "SDL.Tests"

Loading…
Cancel
Save