SDL2 compatibility fixes.

This commit is contained in:
Ethan Lee 2013-04-17 18:08:38 -04:00
parent 2a2bdc2884
commit 5440f8ad22
4 changed files with 469 additions and 460 deletions

File diff suppressed because it is too large Load diff

View file

@ -53,7 +53,7 @@ namespace SDL2
IMG_INIT_WEBP = 0x00000008
}
[DllImport(nativeLibName, EntryPoint = "IMG_LinkedVersion")]
[DllImport(nativeLibName, EntryPoint = "IMG_LinkedVersion", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_IMG_LinkedVersion();
public static SDL.SDL_version IMG_LinkedVersion()
{
@ -61,37 +61,37 @@ namespace SDL2
IntPtr result_ptr = INTERNAL_IMG_LinkedVersion();
result = (SDL.SDL_version) Marshal.PtrToStructure(
result_ptr,
result.GetType()
typeof(SDL.SDL_version)
);
return result;
}
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int IMG_Init(IMG_InitFlags flags);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void IMG_Quit();
/* IntPtr refers to an SDL_Surface* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IMG_Load(
[In()] [MarshalAs(UnmanagedType.LPStr)]
string file
);
/* IntPtr refers to an SDL_Texture*, renderer to an SDL_Renderer* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IMG_LoadTexture(
IntPtr renderer,
[In()] [MarshalAs(UnmanagedType.LPStr)]
string file
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int IMG_InvertAlpha(int on);
/* IntPtr refers to an SDL_Surface* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr IMG_ReadXPMFromArray(ref char[] xpm);
#endregion

View file

@ -96,12 +96,14 @@ namespace SDL2
public byte volume;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void MixFuncDelegate(
IntPtr udata, // void*
IntPtr stream, // Uint8*
int len
);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void Mix_EffectFunc_t(
int chan,
IntPtr stream, // void*
@ -109,21 +111,25 @@ namespace SDL2
IntPtr udata // void*
);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void Mix_EffectDone_t(
int chan,
IntPtr udata // void*
);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void MusicFinishedDelegate();
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ChannelFinishedDelegate(int channel);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int SoundFontDelegate(
IntPtr a, // const char*
IntPtr b // void*
);
[DllImport(nativeLibName, EntryPoint = "MIX_Linked_Version")]
[DllImport(nativeLibName, EntryPoint = "MIX_Linked_Version", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_MIX_Linked_Version();
public static SDL.SDL_version MIX_Linked_Version()
{
@ -131,18 +137,18 @@ namespace SDL2
IntPtr result_ptr = INTERNAL_MIX_Linked_Version();
result = (SDL.SDL_version) Marshal.PtrToStructure(
result_ptr,
result.GetType()
typeof(SDL.SDL_version)
);
return result;
}
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_Init(MIX_InitFlags flags);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_Quit();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_OpenAudio(
int frequency,
ushort format,
@ -150,10 +156,10 @@ namespace SDL2
int chunksize
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_AllocateChannels(int numchans);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_QuerySpec(
ref int frequency,
ref ushort format,
@ -164,7 +170,7 @@ namespace SDL2
* THIS IS AN RWops FUNCTION!
*/
/* IntPtr refers to a Mix_Chunk* */
[DllImport(nativeLibName, EntryPoint = "Mix_LoadWAV_RW")]
[DllImport(nativeLibName, EntryPoint = "Mix_LoadWAV_RW", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_Mix_LoadWAV_RW(
IntPtr src,
int freesrc
@ -176,32 +182,32 @@ namespace SDL2
}
/* IntPtr refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Mix_LoadMUS(
[In()] [MarshalAs(UnmanagedType.LPStr)]
string file
);
/* IntPtr refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Mix_QuickLoad_WAV(byte[] mem);
/* IntPtr refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mix_Chunk Mix_QuickLoad_RAW(byte[] mem, uint len);
/* chunk refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_FreeChunk(IntPtr chunk);
/* music refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_FreeMusic(IntPtr music);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GetNumChunkDecoders();
[DllImport(nativeLibName, EntryPoint = "Mix_GetChunkDecoder")]
[DllImport(nativeLibName, EntryPoint = "Mix_GetChunkDecoder", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_Mix_GetChunkDecoder(int index);
public static string Mix_GetChunkDecoder(int index)
{
@ -210,10 +216,10 @@ namespace SDL2
);
}
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GetNumMusicDecoders();
[DllImport(nativeLibName, EntryPoint = "Mix_GetMusicDecoder")]
[DllImport(nativeLibName, EntryPoint = "Mix_GetMusicDecoder", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_Mix_GetMusicDecoder(int index);
public static string Mix_GetMusicDecoder(int index)
{
@ -223,36 +229,36 @@ namespace SDL2
}
/* music refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mix_MusicType Mix_GetMusicType(IntPtr music);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_SetPostMix(
MixFuncDelegate mix_func,
IntPtr arg // void*
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_HookMusic(
MixFuncDelegate mix_func,
IntPtr arg // void*
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_HookMusicFinished(
MusicFinishedDelegate music_finished
);
/* IntPtr refers to a void* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Mix_GetMusicHookData();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_ChannelFinished(
ChannelFinishedDelegate channel_finished
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_RegisterEffect(
int chan,
Mix_EffectFunc_t f,
@ -260,54 +266,54 @@ namespace SDL2
IntPtr arg // void*
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_UnregisterEffect(
int channel,
Mix_EffectFunc_t f
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_UnregisterAllEffects(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetPanning(
int channel,
byte left,
byte right
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetPosition(
int channel,
short angle,
byte distance
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetDistance(int channel, byte distance);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetReverseStereo(int channel, int flip);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_ReserveChannels(int num);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupChannel(int which, int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupChannels(int from, int to, int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupAvailable(int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupCount(int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupOldest(int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GroupNewer(int tag);
/* chunk refers to a Mix_Chunk* */
@ -320,7 +326,7 @@ namespace SDL2
}
/* chunk refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_PlayChannelTimed(
int channel,
IntPtr chunk,
@ -329,11 +335,11 @@ namespace SDL2
);
/* music refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_PlayMusic(IntPtr music, int loops);
/* music refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeInMusic(
IntPtr music,
int loops,
@ -341,7 +347,7 @@ namespace SDL2
);
/* music refers to a Mix_Music* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeInMusicPos(
IntPtr music,
int loops,
@ -360,7 +366,7 @@ namespace SDL2
}
/* chunk refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeInChannelTimed(
int channel,
IntPtr chunk,
@ -369,112 +375,112 @@ namespace SDL2
int ticks
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_Volume(int channel, int volume);
/* chunk refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_VolumeChunk(
IntPtr chunk,
int volume
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_VolumeMusic(int volume);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_HaltChannel(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_HaltGroup(int tag);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_HaltMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_ExpireChannel(int channel, int ticks);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeOutChannel(int which, int ms);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeOutGroup(int tag, int ms);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_FadeOutMusic(int ms);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mix_Fading Mix_FadingMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern Mix_Fading Mix_FadingChannel(int which);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_Pause(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_Resume(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_Paused(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_PauseMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_ResumeMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_RewindMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_PausedMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetMusicPosition(double position);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_Playing(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_PlayingMusic();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetMusicCMD(
[In()] [MarshalAs(UnmanagedType.LPStr)]
string command
);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetSynchroValue(int value);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_GetSynchroValue();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_SetSoundFonts(
[In()] [MarshalAs(UnmanagedType.LPStr)]
string paths
);
[DllImport(nativeLibName, EntryPoint = "Mix_GetSoundFonts")]
[DllImport(nativeLibName, EntryPoint = "Mix_GetSoundFonts", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_Mix_GetSoundFonts();
public static string Mix_GetSoundFonts()
{
return Marshal.PtrToStringAnsi(INTERNAL_Mix_GetSoundFonts());
}
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Mix_EachSoundFont(
SoundFontDelegate function,
IntPtr data // void*
);
/* IntPtr refers to a Mix_Chunk* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Mix_GetChunk(int channel);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Mix_CloseAudio();
#endregion

View file

@ -58,7 +58,7 @@ namespace SDL2
public const int TTF_HINTING_MONO = 2;
public const int TTF_HINTING_NONE = 3;
[DllImport(nativeLibName, EntryPoint = "TTF_LinkedVersion")]
[DllImport(nativeLibName, EntryPoint = "TTF_LinkedVersion", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_TTF_LinkedVersion();
public static SDL.SDL_version TTF_LinkedVersion()
{
@ -66,19 +66,19 @@ namespace SDL2
IntPtr result_ptr = INTERNAL_TTF_LinkedVersion();
result = (SDL.SDL_version) Marshal.PtrToStructure(
result_ptr,
result.GetType()
typeof(SDL.SDL_version)
);
return result;
}
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_ByteSwappedUNICODE(int swapped);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_Init();
/* IntPtr refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_OpenFont(
[In()] [MarshalAs(UnmanagedType.LPStr)]
string file,
@ -86,7 +86,7 @@ namespace SDL2
);
/* IntPtr refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_OpenFontIndex(
[In()] [MarshalAs(UnmanagedType.LPStr)]
string file,
@ -95,63 +95,63 @@ namespace SDL2
);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GetFontStyle(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_SetFontStyle(IntPtr font, int style);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GetFontOutline(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_SetFontOutline(IntPtr font, int outline);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GetFontHinting(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_SetFontHinting(IntPtr font, int hinting);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_FontHeight(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_FontAscent(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_FontDescent(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_FontLineSkip(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GetFontKerning(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_SetFontKerning(IntPtr font, int allowed);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern long TTF_FontFaces(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_FontFaceIsFixedWidth(IntPtr font);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName, EntryPoint = "TTF_FontFaceFamilyName")]
[DllImport(nativeLibName, EntryPoint = "TTF_FontFaceFamilyName", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_TTF_FontFaceFamilyName(
IntPtr font
);
@ -163,7 +163,7 @@ namespace SDL2
}
/* font refers to a TTF_Font* */
[DllImport(nativeLibName, EntryPoint = "TTF_FontFaceStyleName")]
[DllImport(nativeLibName, EntryPoint = "TTF_FontFaceStyleName", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr INTERNAL_TTF_FontFaceStyleName(
IntPtr font
);
@ -175,11 +175,11 @@ namespace SDL2
}
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GlyphIsProvided(IntPtr font, ushort ch);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_GlyphMetrics(
IntPtr font,
ushort ch,
@ -191,7 +191,7 @@ namespace SDL2
);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_SizeText(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
@ -201,7 +201,7 @@ namespace SDL2
);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_SizeUTF8(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
@ -211,7 +211,7 @@ namespace SDL2
);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_SizeUNICODE(
IntPtr font,
ushort[] text,
@ -220,7 +220,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderText_Solid(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
@ -229,7 +229,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUTF8_Solid(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
@ -238,7 +238,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUNICODE_Solid(
IntPtr font,
ushort[] text,
@ -246,7 +246,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderGlyph_Solid(
IntPtr font,
ushort ch,
@ -254,7 +254,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderText_Shaded(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
@ -264,7 +264,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUTF8_Shaded(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
@ -274,7 +274,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUNICODE_Shaded(
IntPtr font,
ushort[] text,
@ -283,7 +283,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderGlyph_Shaded(
IntPtr font,
ushort ch,
@ -292,7 +292,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderText_Blended(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
@ -301,7 +301,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUTF8_Blended(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
@ -310,7 +310,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUNICODE_Blended(
IntPtr font,
ushort[] text,
@ -318,7 +318,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderText_Blended_Wrapped(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
@ -328,7 +328,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUTF8_Blended_Wrapped(
IntPtr font,
[In()] [MarshalAs(UnmanagedType.LPStr)]
@ -338,7 +338,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderUNICODE_Blended_Wrapped(
IntPtr font,
ushort[] text,
@ -347,7 +347,7 @@ namespace SDL2
);
/* IntPtr refers to an SDL_Surface*, font to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr TTF_RenderGlyph_Blended(
IntPtr font,
ushort ch,
@ -355,17 +355,17 @@ namespace SDL2
);
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_CloseFont(IntPtr font);
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void TTF_Quit();
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int TTF_WasInit();
/* font refers to a TTF_Font* */
[DllImport(nativeLibName)]
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_GetFontKerningSize(
IntPtr font,
int prev_index,