Remove 2 from class names to prevent namespace ambiguity.

This commit is contained in:
Ethan Lee 2013-04-08 12:09:41 -04:00
parent 29d299fa41
commit 281ce130e0
4 changed files with 130 additions and 105 deletions

View file

@ -36,7 +36,7 @@ using System.Runtime.InteropServices;
namespace SDL2 namespace SDL2
{ {
public static class SDL2 public static class SDL
{ {
#region SDL2# Variables #region SDL2# Variables
@ -451,6 +451,31 @@ namespace SDL2
SDL_WINDOW_FOREIGN = 0x00000800, SDL_WINDOW_FOREIGN = 0x00000800,
} }
public const int SDL_WINDOWPOS_UNDEFINED_MASK = 0x1FFF0000;
public const int SDL_WINDOWPOS_CENTERED_MASK = 0x2FFF0000;
public const int SDL_WINDOWPOS_UNDEFINED = 0x1FFF0000;
public const int SDL_WINDOWPOS_CENTERED = 0x2FFF0000;
public static int SDL_WINDOWPOS_UNDEFINED_DISPLAY(int X)
{
return (SDL_WINDOWPOS_UNDEFINED_MASK | X);
}
public static bool SDL_WINDOWPOS_ISUNDEFINED(int X)
{
return (X & 0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK;
}
public static int SDL_WINDOWPOS_CENTERED_DISPLAY(int X)
{
return (SDL_WINDOWPOS_CENTERED_MASK | X);
}
public static bool SDL_WINDOWPOS_ISCENTERED(int X)
{
return (X & 0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK;
}
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct SDL_DisplayMode public struct SDL_DisplayMode
{ {

View file

@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
namespace SDL2 namespace SDL2
{ {
public static class SDL2_image public static class SDL_image
{ {
#region SDL2# Variables #region SDL2# Variables
@ -55,11 +55,11 @@ namespace SDL2
[DllImport(nativeLibName, EntryPoint = "IMG_LinkedVersion")] [DllImport(nativeLibName, EntryPoint = "IMG_LinkedVersion")]
private static extern IntPtr INTERNAL_IMG_LinkedVersion(); private static extern IntPtr INTERNAL_IMG_LinkedVersion();
public static SDL2.SDL_version IMG_LinkedVersion() public static SDL.SDL_version IMG_LinkedVersion()
{ {
SDL2.SDL_version result; SDL.SDL_version result;
IntPtr result_ptr = INTERNAL_IMG_LinkedVersion(); IntPtr result_ptr = INTERNAL_IMG_LinkedVersion();
result = (SDL2.SDL_version) Marshal.PtrToStructure( result = (SDL.SDL_version) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -77,11 +77,11 @@ namespace SDL2
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string file string file
); );
public static SDL2.SDL_Surface IMG_Load(string file) public static SDL.SDL_Surface IMG_Load(string file)
{ {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_IMG_Load(file); IntPtr result_ptr = INTERNAL_IMG_Load(file);
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -103,11 +103,11 @@ namespace SDL2
private static extern IntPtr INTERNAL_IMG_ReadXPMFromArray( private static extern IntPtr INTERNAL_IMG_ReadXPMFromArray(
ref char[] xpm ref char[] xpm
); );
public static SDL2.SDL_Surface IMG_ReadXPMFromArray(ref char[] xpm) public static SDL.SDL_Surface IMG_ReadXPMFromArray(ref char[] xpm)
{ {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_IMG_ReadXPMFromArray(ref xpm); IntPtr result_ptr = INTERNAL_IMG_ReadXPMFromArray(ref xpm);
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );

View file

@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
namespace SDL2 namespace SDL2
{ {
public static class SDL2_mixer public static class SDL_mixer
{ {
#region SDL2# Variables #region SDL2# Variables
@ -48,8 +48,8 @@ namespace SDL2
public const int MIX_CHANNELS = 8; public const int MIX_CHANNELS = 8;
public const int MIX_DEFAULT_FREQUENCY = 22050; public const int MIX_DEFAULT_FREQUENCY = 22050;
// FIXME: ASSUMING LITTLE ENDIAN!!! Big endian: SDL2.AUDIO_S16MSB // FIXME: ASSUMING LITTLE ENDIAN!!! Big endian: SDL.AUDIO_S16MSB
public const ushort MIX_DEFAULT_FORMAT = SDL2.AUDIO_S16LSB; public const ushort MIX_DEFAULT_FORMAT = SDL.AUDIO_S16LSB;
public const int MIX_DEFAULT_CHANNELS = 2; public const int MIX_DEFAULT_CHANNELS = 2;
public const byte MIX_MAX_VOLUME = 128; public const byte MIX_MAX_VOLUME = 128;
@ -122,11 +122,11 @@ namespace SDL2
[DllImport(nativeLibName, EntryPoint = "MIX_Linked_Version")] [DllImport(nativeLibName, EntryPoint = "MIX_Linked_Version")]
private static extern IntPtr INTERNAL_MIX_Linked_Version(); private static extern IntPtr INTERNAL_MIX_Linked_Version();
public static SDL2.SDL_version MIX_Linked_Version() public static SDL.SDL_version MIX_Linked_Version()
{ {
SDL2.SDL_version result; SDL.SDL_version result;
IntPtr result_ptr = INTERNAL_MIX_Linked_Version(); IntPtr result_ptr = INTERNAL_MIX_Linked_Version();
result = (SDL2.SDL_version) Marshal.PtrToStructure( result = (SDL.SDL_version) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -168,7 +168,7 @@ namespace SDL2
public static Mix_Chunk Mix_LoadWAV(string file) public static Mix_Chunk Mix_LoadWAV(string file)
{ {
Mix_Chunk result; Mix_Chunk result;
IntPtr rwops = SDL2.INTERNAL_SDL_RWFromFile(file, "rb"); IntPtr rwops = SDL.INTERNAL_SDL_RWFromFile(file, "rb");
IntPtr result_ptr = INTERNAL_Mix_LoadWAV_RW(rwops, 1); IntPtr result_ptr = INTERNAL_Mix_LoadWAV_RW(rwops, 1);
result = (Mix_Chunk) Marshal.PtrToStructure( result = (Mix_Chunk) Marshal.PtrToStructure(
result_ptr, result_ptr,

View file

@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
namespace SDL2 namespace SDL2
{ {
public static class SDL2_ttf public static class SDL_ttf
{ {
#region SDL2# Variables #region SDL2# Variables
@ -60,11 +60,11 @@ namespace SDL2
[DllImport(nativeLibName, EntryPoint = "TTF_LinkedVersion")] [DllImport(nativeLibName, EntryPoint = "TTF_LinkedVersion")]
private static extern IntPtr INTERNAL_TTF_LinkedVersion(); private static extern IntPtr INTERNAL_TTF_LinkedVersion();
public static SDL2.SDL_version TTF_LinkedVersion() public static SDL.SDL_version TTF_LinkedVersion()
{ {
SDL2.SDL_version result; SDL.SDL_version result;
IntPtr result_ptr = INTERNAL_TTF_LinkedVersion(); IntPtr result_ptr = INTERNAL_TTF_LinkedVersion();
result = (SDL2.SDL_version) Marshal.PtrToStructure( result = (SDL.SDL_version) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -225,20 +225,20 @@ namespace SDL2
IntPtr font, IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text, string text,
SDL2.SDL_Color fg SDL.SDL_Color fg
); );
public static SDL2.SDL_Surface TTF_RenderText_Solid( public static SDL.SDL_Surface TTF_RenderText_Solid(
IntPtr font, IntPtr font,
string text, string text,
SDL2.SDL_Color fg SDL.SDL_Color fg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderText_Solid( IntPtr result_ptr = INTERNAL_TTF_RenderText_Solid(
font, font,
text, text,
fg fg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -251,20 +251,20 @@ namespace SDL2
IntPtr font, IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text, string text,
SDL2.SDL_Color fg SDL.SDL_Color fg
); );
public static SDL2.SDL_Surface TTF_RenderUTF8_Solid( public static SDL.SDL_Surface TTF_RenderUTF8_Solid(
IntPtr font, IntPtr font,
string text, string text,
SDL2.SDL_Color fg SDL.SDL_Color fg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderUTF8_Solid( IntPtr result_ptr = INTERNAL_TTF_RenderUTF8_Solid(
font, font,
text, text,
fg fg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -276,20 +276,20 @@ namespace SDL2
private static extern IntPtr INTERNAL_TTF_RenderUNICODE_Solid( private static extern IntPtr INTERNAL_TTF_RenderUNICODE_Solid(
IntPtr font, IntPtr font,
ushort[] text, ushort[] text,
SDL2.SDL_Color fg SDL.SDL_Color fg
); );
public static SDL2.SDL_Surface TTF_RenderUNICODE_Solid( public static SDL.SDL_Surface TTF_RenderUNICODE_Solid(
IntPtr font, IntPtr font,
ushort[] text, ushort[] text,
SDL2.SDL_Color fg SDL.SDL_Color fg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderUNICODE_Solid( IntPtr result_ptr = INTERNAL_TTF_RenderUNICODE_Solid(
font, font,
text, text,
fg fg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -301,20 +301,20 @@ namespace SDL2
private static extern IntPtr INTERNAL_TTF_RenderGlyph_Solid( private static extern IntPtr INTERNAL_TTF_RenderGlyph_Solid(
IntPtr font, IntPtr font,
ushort ch, ushort ch,
SDL2.SDL_Color fg SDL.SDL_Color fg
); );
public static SDL2.SDL_Surface TTF_RenderGlyph_Solid( public static SDL.SDL_Surface TTF_RenderGlyph_Solid(
IntPtr font, IntPtr font,
ushort ch, ushort ch,
SDL2.SDL_Color fg SDL.SDL_Color fg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderGlyph_Solid( IntPtr result_ptr = INTERNAL_TTF_RenderGlyph_Solid(
font, font,
ch, ch,
fg fg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -327,23 +327,23 @@ namespace SDL2
IntPtr font, IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text, string text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
SDL2.SDL_Color bg SDL.SDL_Color bg
); );
public static SDL2.SDL_Surface TTF_RenderText_Shaded( public static SDL.SDL_Surface TTF_RenderText_Shaded(
IntPtr font, IntPtr font,
string text, string text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
SDL2.SDL_Color bg SDL.SDL_Color bg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderText_Shaded( IntPtr result_ptr = INTERNAL_TTF_RenderText_Shaded(
font, font,
text, text,
fg, fg,
bg bg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -356,23 +356,23 @@ namespace SDL2
IntPtr font, IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text, string text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
SDL2.SDL_Color bg SDL.SDL_Color bg
); );
public static SDL2.SDL_Surface TTF_RenderUTF8_Shaded( public static SDL.SDL_Surface TTF_RenderUTF8_Shaded(
IntPtr font, IntPtr font,
string text, string text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
SDL2.SDL_Color bg SDL.SDL_Color bg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderUTF8_Shaded( IntPtr result_ptr = INTERNAL_TTF_RenderUTF8_Shaded(
font, font,
text, text,
fg, fg,
bg bg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -384,23 +384,23 @@ namespace SDL2
private static extern IntPtr INTERNAL_TTF_RenderUNICODE_Shaded( private static extern IntPtr INTERNAL_TTF_RenderUNICODE_Shaded(
IntPtr font, IntPtr font,
ushort[] text, ushort[] text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
SDL2.SDL_Color bg SDL.SDL_Color bg
); );
public static SDL2.SDL_Surface TTF_RenderUNICODE_Shaded( public static SDL.SDL_Surface TTF_RenderUNICODE_Shaded(
IntPtr font, IntPtr font,
ushort[] text, ushort[] text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
SDL2.SDL_Color bg SDL.SDL_Color bg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderUNICODE_Shaded( IntPtr result_ptr = INTERNAL_TTF_RenderUNICODE_Shaded(
font, font,
text, text,
fg, fg,
bg bg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -412,23 +412,23 @@ namespace SDL2
private static extern IntPtr INTERNAL_TTF_RenderGlyph_Shaded( private static extern IntPtr INTERNAL_TTF_RenderGlyph_Shaded(
IntPtr font, IntPtr font,
ushort ch, ushort ch,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
SDL2.SDL_Color bg SDL.SDL_Color bg
); );
public static SDL2.SDL_Surface TTF_RenderGlyph_Shaded( public static SDL.SDL_Surface TTF_RenderGlyph_Shaded(
IntPtr font, IntPtr font,
ushort ch, ushort ch,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
SDL2.SDL_Color bg SDL.SDL_Color bg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderGlyph_Shaded( IntPtr result_ptr = INTERNAL_TTF_RenderGlyph_Shaded(
font, font,
ch, ch,
fg, fg,
bg bg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -441,20 +441,20 @@ namespace SDL2
IntPtr font, IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text, string text,
SDL2.SDL_Color fg SDL.SDL_Color fg
); );
public static SDL2.SDL_Surface TTF_RenderText_Blended( public static SDL.SDL_Surface TTF_RenderText_Blended(
IntPtr font, IntPtr font,
string text, string text,
SDL2.SDL_Color fg SDL.SDL_Color fg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderText_Blended( IntPtr result_ptr = INTERNAL_TTF_RenderText_Blended(
font, font,
text, text,
fg fg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -467,20 +467,20 @@ namespace SDL2
IntPtr font, IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text, string text,
SDL2.SDL_Color fg SDL.SDL_Color fg
); );
public static SDL2.SDL_Surface TTF_RenderUTF8_Blended( public static SDL.SDL_Surface TTF_RenderUTF8_Blended(
IntPtr font, IntPtr font,
string text, string text,
SDL2.SDL_Color fg SDL.SDL_Color fg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderUTF8_Blended( IntPtr result_ptr = INTERNAL_TTF_RenderUTF8_Blended(
font, font,
text, text,
fg fg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -492,20 +492,20 @@ namespace SDL2
private static extern IntPtr INTERNAL_TTF_RenderUNICODE_Blended( private static extern IntPtr INTERNAL_TTF_RenderUNICODE_Blended(
IntPtr font, IntPtr font,
ushort[] text, ushort[] text,
SDL2.SDL_Color fg SDL.SDL_Color fg
); );
public static SDL2.SDL_Surface TTF_RenderUNICODE_Blended( public static SDL.SDL_Surface TTF_RenderUNICODE_Blended(
IntPtr font, IntPtr font,
ushort[] text, ushort[] text,
SDL2.SDL_Color fg SDL.SDL_Color fg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderUNICODE_Blended( IntPtr result_ptr = INTERNAL_TTF_RenderUNICODE_Blended(
font, font,
text, text,
fg fg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -518,23 +518,23 @@ namespace SDL2
IntPtr font, IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text, string text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
uint wrapped uint wrapped
); );
public static SDL2.SDL_Surface TTF_RenderText_Blended_Wrapped( public static SDL.SDL_Surface TTF_RenderText_Blended_Wrapped(
IntPtr font, IntPtr font,
string text, string text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
uint wrapped uint wrapped
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderText_Blended_Wrapped( IntPtr result_ptr = INTERNAL_TTF_RenderText_Blended_Wrapped(
font, font,
text, text,
fg, fg,
wrapped wrapped
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -547,23 +547,23 @@ namespace SDL2
IntPtr font, IntPtr font,
[InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)] [InAttribute()] [MarshalAsAttribute(UnmanagedType.LPStr)]
string text, string text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
uint wrapped uint wrapped
); );
public static SDL2.SDL_Surface TTF_RenderUTF8_Blended_Wrapped( public static SDL.SDL_Surface TTF_RenderUTF8_Blended_Wrapped(
IntPtr font, IntPtr font,
string text, string text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
uint wrapped uint wrapped
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderUTF8_Blended_Wrapped( IntPtr result_ptr = INTERNAL_TTF_RenderUTF8_Blended_Wrapped(
font, font,
text, text,
fg, fg,
wrapped wrapped
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -575,23 +575,23 @@ namespace SDL2
private static extern IntPtr INTERNAL_TTF_RenderUNICODE_Blended_Wrapped( private static extern IntPtr INTERNAL_TTF_RenderUNICODE_Blended_Wrapped(
IntPtr font, IntPtr font,
ushort[] text, ushort[] text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
uint wrapped uint wrapped
); );
public static SDL2.SDL_Surface TTF_RenderUNICODE_Blended_Wrapped( public static SDL.SDL_Surface TTF_RenderUNICODE_Blended_Wrapped(
IntPtr font, IntPtr font,
ushort[] text, ushort[] text,
SDL2.SDL_Color fg, SDL.SDL_Color fg,
uint wrapped uint wrapped
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderUNICODE_Blended_Wrapped( IntPtr result_ptr = INTERNAL_TTF_RenderUNICODE_Blended_Wrapped(
font, font,
text, text,
fg, fg,
wrapped wrapped
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );
@ -603,20 +603,20 @@ namespace SDL2
private static extern IntPtr INTERNAL_TTF_RenderGlyph_Blended( private static extern IntPtr INTERNAL_TTF_RenderGlyph_Blended(
IntPtr font, IntPtr font,
ushort ch, ushort ch,
SDL2.SDL_Color fg SDL.SDL_Color fg
); );
public static SDL2.SDL_Surface TTF_RenderGlyph_Blended( public static SDL.SDL_Surface TTF_RenderGlyph_Blended(
IntPtr font, IntPtr font,
ushort ch, ushort ch,
SDL2.SDL_Color fg SDL.SDL_Color fg
) { ) {
SDL2.SDL_Surface result; SDL.SDL_Surface result;
IntPtr result_ptr = INTERNAL_TTF_RenderGlyph_Blended( IntPtr result_ptr = INTERNAL_TTF_RenderGlyph_Blended(
font, font,
ch, ch,
fg fg
); );
result = (SDL2.SDL_Surface) Marshal.PtrToStructure( result = (SDL.SDL_Surface) Marshal.PtrToStructure(
result_ptr, result_ptr,
result.GetType() result.GetType()
); );