mirror of
https://github.com/clockworkpi/Menu.git
synced 2026-03-30 16:53:00 +02:00
gcores ~/apps/Menu branch first commit
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,73 +0,0 @@
|
||||
|
||||
// 2.0.4.0
|
||||
|
||||
module lib+ {
|
||||
|
||||
module sdl2_image+ {
|
||||
|
||||
module so {
|
||||
|
||||
struct struct {
|
||||
IMG_Init void;
|
||||
IMG_Quit void;
|
||||
IMG_Load void;
|
||||
IMG_LoadTexture void;
|
||||
IMG_SavePNG void;
|
||||
}
|
||||
|
||||
var fn struct;
|
||||
|
||||
func init() bool {
|
||||
import rt::c;
|
||||
return dlsyms(dlopen("libSDL2_image-2.0.so.0", RTLD_LAZY), &fn,
|
||||
"IMG_Init",
|
||||
"IMG_Quit",
|
||||
"IMG_Load",
|
||||
"IMG_LoadTexture",
|
||||
"IMG_SavePNG"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module sdl2_image+ {
|
||||
|
||||
import sdl2;
|
||||
|
||||
enum IMG_InitFlags;
|
||||
enum {
|
||||
IMG_INIT_JPG = 0x00000001,
|
||||
IMG_INIT_PNG = 0x00000002,
|
||||
IMG_INIT_TIF = 0x00000004,
|
||||
IMG_INIT_WEBP = 0x00000008
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module sdl2_image+ {
|
||||
|
||||
inline IMG_Init(flags int) int {
|
||||
return call1<int>(so::fn.IMG_Init, flags);
|
||||
}
|
||||
|
||||
inline IMG_Quit() {
|
||||
call<void>(so::fn.IMG_Quit);
|
||||
}
|
||||
|
||||
inline IMG_Load(file. char) .SDL_Surface {
|
||||
return call1<void>(so::fn.IMG_Load, file);
|
||||
}
|
||||
|
||||
inline IMG_LoadTexture(renderer+ SDL_Renderer, file. char) +SDL_Texture {
|
||||
return call2<void>(so::fn.IMG_LoadTexture, renderer, file);
|
||||
}
|
||||
|
||||
inline IMG_SavePNG(surface. SDL_Surface, file. char) int {
|
||||
return call2<int>(so::fn.IMG_SavePNG, surface, file);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,441 +0,0 @@
|
||||
|
||||
// 2.0.4.0
|
||||
|
||||
module lib+ {
|
||||
|
||||
module sdl2_mixer+ {
|
||||
|
||||
module so {
|
||||
|
||||
struct struct {
|
||||
Mix_Init void;
|
||||
Mix_Quit void;
|
||||
Mix_OpenAudio void;
|
||||
Mix_AllocateChannels void;
|
||||
Mix_QuerySpec void;
|
||||
Mix_LoadWAV_RW void;
|
||||
Mix_LoadMUS void;
|
||||
Mix_FreeChunk void;
|
||||
Mix_FreeMusic void;
|
||||
Mix_GetNumChunkDecoders void;
|
||||
Mix_GetChunkDecoder void;
|
||||
Mix_GetNumMusicDecoders void;
|
||||
Mix_GetMusicDecoder void;
|
||||
Mix_GetMusicType void;
|
||||
Mix_SetPanning void;
|
||||
Mix_SetPosition void;
|
||||
Mix_SetDistance void;
|
||||
Mix_SetReverseStereo void;
|
||||
Mix_ReserveChannels void;
|
||||
Mix_GroupChannel void;
|
||||
Mix_GroupChannels void;
|
||||
Mix_GroupAvailable void;
|
||||
Mix_GroupCount void;
|
||||
Mix_GroupOldest void;
|
||||
Mix_GroupNewer void;
|
||||
Mix_PlayChannelTimed void;
|
||||
Mix_PlayMusic void;
|
||||
Mix_FadeInMusic void;
|
||||
Mix_FadeInMusicPos void;
|
||||
Mix_FadeInChannelTimed void;
|
||||
Mix_Volume void;
|
||||
Mix_VolumeChunk void;
|
||||
Mix_VolumeMusic void;
|
||||
Mix_HaltChannel void;
|
||||
Mix_HaltGroup void;
|
||||
Mix_HaltMusic void;
|
||||
Mix_ExpireChannel void;
|
||||
Mix_FadeOutChannel void;
|
||||
Mix_FadeOutGroup void;
|
||||
Mix_FadeOutMusic void;
|
||||
Mix_FadingMusic void;
|
||||
Mix_FadingChannel void;
|
||||
Mix_Pause void;
|
||||
Mix_Resume void;
|
||||
Mix_Paused void;
|
||||
Mix_PauseMusic void;
|
||||
Mix_ResumeMusic void;
|
||||
Mix_RewindMusic void;
|
||||
Mix_PausedMusic void;
|
||||
Mix_SetMusicPosition void;
|
||||
Mix_Playing void;
|
||||
Mix_PlayingMusic void;
|
||||
Mix_SetMusicCMD void;
|
||||
Mix_SetSynchroValue void;
|
||||
Mix_GetSynchroValue void;
|
||||
Mix_GetChunk void;
|
||||
Mix_CloseAudio void;
|
||||
}
|
||||
|
||||
var fn struct;
|
||||
|
||||
func init() bool {
|
||||
import rt::c;
|
||||
return dlsyms(dlopen("libSDL2_mixer-2.0.so.0", RTLD_LAZY), &fn,
|
||||
"Mix_Init",
|
||||
"Mix_Quit",
|
||||
"Mix_OpenAudio",
|
||||
"Mix_AllocateChannels",
|
||||
"Mix_QuerySpec",
|
||||
"Mix_LoadWAV_RW",
|
||||
"Mix_LoadMUS",
|
||||
"Mix_FreeChunk",
|
||||
"Mix_FreeMusic",
|
||||
"Mix_GetNumChunkDecoders",
|
||||
"Mix_GetChunkDecoder",
|
||||
"Mix_GetNumMusicDecoders",
|
||||
"Mix_GetMusicDecoder",
|
||||
"Mix_GetMusicType",
|
||||
"Mix_SetPanning",
|
||||
"Mix_SetPosition",
|
||||
"Mix_SetDistance",
|
||||
"Mix_SetReverseStereo",
|
||||
"Mix_ReserveChannels",
|
||||
"Mix_GroupChannel",
|
||||
"Mix_GroupChannels",
|
||||
"Mix_GroupAvailable",
|
||||
"Mix_GroupCount",
|
||||
"Mix_GroupOldest",
|
||||
"Mix_GroupNewer",
|
||||
"Mix_PlayChannelTimed",
|
||||
"Mix_PlayMusic",
|
||||
"Mix_FadeInMusic",
|
||||
"Mix_FadeInMusicPos",
|
||||
"Mix_FadeInChannelTimed",
|
||||
"Mix_Volume",
|
||||
"Mix_VolumeChunk",
|
||||
"Mix_VolumeMusic",
|
||||
"Mix_HaltChannel",
|
||||
"Mix_HaltGroup",
|
||||
"Mix_HaltMusic",
|
||||
"Mix_ExpireChannel",
|
||||
"Mix_FadeOutChannel",
|
||||
"Mix_FadeOutGroup",
|
||||
"Mix_FadeOutMusic",
|
||||
"Mix_FadingMusic",
|
||||
"Mix_FadingChannel",
|
||||
"Mix_Pause",
|
||||
"Mix_Resume",
|
||||
"Mix_Paused",
|
||||
"Mix_PauseMusic",
|
||||
"Mix_ResumeMusic",
|
||||
"Mix_RewindMusic",
|
||||
"Mix_PausedMusic",
|
||||
"Mix_SetMusicPosition",
|
||||
"Mix_Playing",
|
||||
"Mix_PlayingMusic",
|
||||
"Mix_SetMusicCMD",
|
||||
"Mix_SetSynchroValue",
|
||||
"Mix_GetSynchroValue",
|
||||
"Mix_GetChunk",
|
||||
"Mix_CloseAudio"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module sdl2_mixer+ {
|
||||
|
||||
import sdl2;
|
||||
|
||||
enum MIX_InitFlags;
|
||||
enum {
|
||||
MIX_INIT_FLAC = 0x00000001,
|
||||
MIX_INIT_MOD = 0x00000002,
|
||||
MIX_INIT_MP3 = 0x00000008,
|
||||
MIX_INIT_OGG = 0x00000010,
|
||||
MIX_INIT_MID = 0x00000020,
|
||||
MIX_INIT_OPUS = 0x00000040
|
||||
}
|
||||
|
||||
// SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
define {
|
||||
MIX_CHANNELS = 8;
|
||||
MIX_DEFAULT_FREQUENCY = 22050;
|
||||
MIX_DEFAULT_FORMAT = AUDIO_S16LSB;
|
||||
MIX_DEFAULT_CHANNELS = 2;
|
||||
MIX_MAX_VOLUME = SDL_MIX_MAXVOLUME;
|
||||
}
|
||||
|
||||
struct Mix_Chunk {
|
||||
allocated int;
|
||||
abuf. uint8;
|
||||
alen uint32;
|
||||
volume uint8; /* Per-sample volume, 0-128 */
|
||||
}
|
||||
|
||||
enum Mix_Fading;
|
||||
enum {
|
||||
MIX_NO_FADING,
|
||||
MIX_FADING_OUT,
|
||||
MIX_FADING_IN
|
||||
}
|
||||
|
||||
enum Mix_MusicType;
|
||||
enum {
|
||||
MUS_NONE,
|
||||
MUS_CMD,
|
||||
MUS_WAV,
|
||||
MUS_MOD,
|
||||
MUS_MID,
|
||||
MUS_OGG,
|
||||
MUS_MP3,
|
||||
MUS_MP3_MAD_UNUSED,
|
||||
MUS_FLAC,
|
||||
MUS_MODPLUG_UNUSED,
|
||||
MUS_OPUS
|
||||
}
|
||||
|
||||
define {
|
||||
MIX_CHANNEL_POST = -2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module sdl2_mixer+ {
|
||||
|
||||
inline Mix_Init(flags int) int {
|
||||
return call1<int>(so::fn.Mix_Init, flags);
|
||||
}
|
||||
|
||||
inline Mix_Quit() {
|
||||
call<void>(so::fn.Mix_Quit);
|
||||
}
|
||||
|
||||
inline Mix_OpenAudio(frequency int, format uint16, channels int, chunksize int) int {
|
||||
return call4<int>(so::fn.Mix_OpenAudio, frequency, format, channels, chunksize);
|
||||
}
|
||||
|
||||
inline Mix_AllocateChannels(numchans int) int {
|
||||
return call1<int>(so::fn.Mix_AllocateChannels, numchans);
|
||||
}
|
||||
|
||||
inline Mix_QuerySpec(frequency. int, format. uint16, channels. int) int {
|
||||
return call3<int>(so::fn.Mix_QuerySpec, frequency, format, channels);
|
||||
}
|
||||
|
||||
inline Mix_LoadWAV(file. char) .Mix_Chunk {
|
||||
return Mix_LoadWAV_RW(SDL_RWFromFile(file, "rb"), 1);
|
||||
}
|
||||
|
||||
inline Mix_LoadWAV_RW(src. SDL_RWops, freesrc int) .Mix_Chunk {
|
||||
return call2<void>(so::fn.Mix_LoadWAV_RW, src, freesrc);
|
||||
}
|
||||
|
||||
inline Mix_LoadMUS(file. char) +Mix_Music {
|
||||
return call1<void>(so::fn.Mix_LoadMUS, file);
|
||||
}
|
||||
|
||||
inline Mix_FreeChunk(chunk. Mix_Chunk) {
|
||||
call1<void>(so::fn.Mix_FreeChunk, chunk);
|
||||
}
|
||||
|
||||
inline Mix_FreeMusic(music+ Mix_Music) {
|
||||
call1<void>(so::fn.Mix_FreeMusic, music);
|
||||
}
|
||||
|
||||
inline Mix_GetNumChunkDecoders() int {
|
||||
return call1<int>(so::fn.Mix_GetNumChunkDecoders);
|
||||
}
|
||||
|
||||
inline Mix_GetChunkDecoder(index int) .char {
|
||||
return call1<char*>(so::fn.Mix_GetChunkDecoder, index);
|
||||
}
|
||||
|
||||
inline Mix_GetNumMusicDecoders() int {
|
||||
return call<int>(so::fn.Mix_GetNumMusicDecoders);
|
||||
}
|
||||
|
||||
inline Mix_GetMusicDecoder(index int) .char {
|
||||
return call1<char*>(so::fn.Mix_GetMusicDecoder, index);
|
||||
}
|
||||
|
||||
inline Mix_GetMusicType(music+ Mix_Music) Mix_MusicType {
|
||||
return call1<Mix_MusicType>(so::fn.Mix_GetMusicType, music);
|
||||
}
|
||||
|
||||
inline Mix_SetPanning(channel int, left uint8, right uint8) int {
|
||||
return call3<int>(so::fn.Mix_SetPanning, channel, left, right);
|
||||
}
|
||||
|
||||
inline Mix_SetPosition(channel int, angle int16, distance uint8) int {
|
||||
return call3<int>(so::fn.Mix_SetPosition, channel, angle, distance);
|
||||
}
|
||||
|
||||
inline Mix_SetDistance(channel int, distance uint8) int {
|
||||
return call2<int>(so::fn.Mix_SetDistance, channel, distance);
|
||||
}
|
||||
|
||||
inline Mix_SetReverseStereo(channel int, flip int) int {
|
||||
return call2<int>(so::fn.Mix_SetReverseStereo, channel, flip);
|
||||
}
|
||||
|
||||
inline Mix_ReserveChannels(num int) int {
|
||||
return call1<int>(so::fn.Mix_ReserveChannels, num);
|
||||
}
|
||||
|
||||
inline Mix_GroupChannel(which int, tag int) int {
|
||||
return call2<int>(so::fn.Mix_GroupChannel, which, tag);
|
||||
}
|
||||
|
||||
inline Mix_GroupChannels(from int, to int, tag int) int {
|
||||
return call3<int>(so::fn.Mix_GroupChannels, from, to, tag);
|
||||
}
|
||||
|
||||
inline Mix_GroupAvailable(tag int) int {
|
||||
return call1<int>(so::fn.Mix_GroupAvailable, tag);
|
||||
}
|
||||
|
||||
inline Mix_GroupCount(tag int) int {
|
||||
return call1<int>(so::fn.Mix_GroupCount, tag);
|
||||
}
|
||||
|
||||
inline Mix_GroupOldest(tag int) int {
|
||||
return call1<int>(so::fn.Mix_GroupOldest, tag);
|
||||
}
|
||||
|
||||
inline Mix_GroupNewer(tag int) int {
|
||||
return call1<int>(so::fn.Mix_GroupNewer, tag);
|
||||
}
|
||||
|
||||
inline Mix_PlayChannel(channel int, chunk. Mix_Chunk, loops int) int {
|
||||
return Mix_PlayChannelTimed(channel, chunk, loops, -1);
|
||||
}
|
||||
|
||||
inline Mix_PlayChannelTimed(channel int, chunk. Mix_Chunk, loops int, ticks int) int {
|
||||
return call4<int>(so::fn.Mix_PlayChannelTimed, channel, chunk, loops, ticks);
|
||||
}
|
||||
|
||||
inline Mix_PlayMusic(music+ Mix_Music, loops int) int {
|
||||
return call2<int>(so::fn.Mix_PlayMusic, music, loops);
|
||||
}
|
||||
|
||||
inline Mix_FadeInMusic(music+ Mix_Music, loops int, ms int) int {
|
||||
return call3<int>(so::fn.Mix_FadeInMusic, music, loops, ms);
|
||||
}
|
||||
|
||||
inline Mix_FadeInMusicPos(music+ Mix_Music, loops int, ms int, position double) int {
|
||||
return call_rrrd<int>(so::fn.Mix_FadeInMusicPos, music, loops, ms, position);
|
||||
}
|
||||
|
||||
inline Mix_FadeInChannel(channel int, chunk. Mix_Chunk, loops int, ms int) int {
|
||||
return Mix_FadeInChannelTimed(channel, chunk, loops, ms, -1);
|
||||
}
|
||||
|
||||
inline Mix_FadeInChannelTimed(channel int, chunk. Mix_Chunk, loops int, ms int, ticks int) int {
|
||||
return call5<int>(so::fn.Mix_FadeInChannelTimed, channel, chunk, loops, ms, ticks);
|
||||
}
|
||||
|
||||
inline Mix_Volume(channel int, volume int) int {
|
||||
return call2<int>(so::fn.Mix_Volume, channel, volume);
|
||||
}
|
||||
|
||||
inline Mix_VolumeChunk(chunk. Mix_Chunk, volume int) int {
|
||||
return call2<int>(so::fn.Mix_VolumeChunk, chunk, volume);
|
||||
}
|
||||
|
||||
inline Mix_VolumeMusic(volume int) int {
|
||||
return call1<int>(so::fn.Mix_VolumeMusic, volume);
|
||||
}
|
||||
|
||||
inline Mix_HaltChannel(channel int) int {
|
||||
return call1<int>(so::fn.Mix_HaltChannel, channel);
|
||||
}
|
||||
|
||||
inline Mix_HaltGroup(tag int) int {
|
||||
return call1<int>(so::fn.Mix_HaltGroup, tag);
|
||||
}
|
||||
|
||||
inline Mix_HaltMusic() int {
|
||||
return call<int>(so::fn.Mix_HaltMusic);
|
||||
}
|
||||
|
||||
inline Mix_ExpireChannel(channel int, ticks int) int {
|
||||
return call2<int>(so::fn.Mix_ExpireChannel, channel, ticks);
|
||||
}
|
||||
|
||||
inline Mix_FadeOutChannel(which int, ms int) int {
|
||||
return call2<int>(so::fn.Mix_FadeOutChannel, which, ms);
|
||||
}
|
||||
|
||||
inline Mix_FadeOutGroup(tag int, ms int) int {
|
||||
return call2<int>(so::fn.Mix_FadeOutGroup, tag, ms);
|
||||
}
|
||||
|
||||
inline Mix_FadeOutMusic(ms int) int {
|
||||
return call1<int>(so::fn.Mix_FadeOutMusic, ms);
|
||||
}
|
||||
|
||||
inline Mix_FadingMusic() Mix_Fading {
|
||||
return call<Mix_Fading>(so::fn.Mix_FadingMusic);
|
||||
}
|
||||
|
||||
inline Mix_FadingChannel(which int) Mix_Fading {
|
||||
return call1<Mix_Fading>(so::fn.Mix_FadingChannel, which);
|
||||
}
|
||||
|
||||
inline Mix_Pause(channel int) {
|
||||
call1<void>(so::fn.Mix_Pause, channel);
|
||||
}
|
||||
|
||||
inline Mix_Resume(channel int) {
|
||||
call1<void>(so::fn.Mix_Resume, channel);
|
||||
}
|
||||
|
||||
inline Mix_Paused(channel int) int {
|
||||
return call1<int>(so::fn.Mix_Paused, channel);
|
||||
}
|
||||
|
||||
inline Mix_PauseMusic() {
|
||||
call<void>(so::fn.Mix_PauseMusic);
|
||||
}
|
||||
|
||||
inline Mix_ResumeMusic() {
|
||||
call<void>(so::fn.Mix_ResumeMusic);
|
||||
}
|
||||
|
||||
inline Mix_RewindMusic() {
|
||||
call<void>(so::fn.Mix_RewindMusic);
|
||||
}
|
||||
|
||||
inline Mix_PausedMusic() int {
|
||||
return call<int>(so::fn.Mix_PausedMusic);
|
||||
}
|
||||
|
||||
inline Mix_SetMusicPosition(position double) int {
|
||||
return call_d<int>(so::fn.Mix_SetMusicPosition, position);
|
||||
}
|
||||
|
||||
inline Mix_Playing(channel int) int {
|
||||
return call1<int>(so::fn.Mix_Playing, channel);
|
||||
}
|
||||
|
||||
inline Mix_PlayingMusic() int {
|
||||
return call<int>(so::fn.Mix_PlayingMusic);
|
||||
}
|
||||
|
||||
inline Mix_SetMusicCMD(command. char) int {
|
||||
return call1<int>(so::fn.Mix_SetMusicCMD, command);
|
||||
}
|
||||
|
||||
inline Mix_SetSynchroValue(value int) int {
|
||||
return call1<int>(so::fn.Mix_SetSynchroValue, value);
|
||||
}
|
||||
|
||||
inline Mix_GetSynchroValue() int {
|
||||
return call<int>(so::fn.Mix_GetSynchroValue);
|
||||
}
|
||||
|
||||
inline Mix_GetChunk(channel int) .Mix_Chunk {
|
||||
return call1<void>(so::fn.Mix_GetChunk, channel);
|
||||
}
|
||||
|
||||
inline Mix_CloseAudio() {
|
||||
call<void>(so::fn.Mix_CloseAudio);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,319 +0,0 @@
|
||||
|
||||
// 2.0.15.0
|
||||
|
||||
module lib+ {
|
||||
|
||||
module sdl2_ttf+ {
|
||||
|
||||
module so {
|
||||
|
||||
struct struct {
|
||||
TTF_ByteSwappedUNICODE void;
|
||||
TTF_Init void;
|
||||
TTF_OpenFont void;
|
||||
TTF_OpenFontIndex void;
|
||||
TTF_GetFontStyle void;
|
||||
TTF_SetFontStyle void;
|
||||
TTF_GetFontOutline void;
|
||||
TTF_SetFontOutline void;
|
||||
TTF_GetFontHinting void;
|
||||
TTF_SetFontHinting void;
|
||||
TTF_FontHeight void;
|
||||
TTF_FontAscent void;
|
||||
TTF_FontDescent void;
|
||||
TTF_FontLineSkip void;
|
||||
TTF_GetFontKerning void;
|
||||
TTF_SetFontKerning void;
|
||||
TTF_FontFaces void;
|
||||
TTF_FontFaceIsFixedWidth void;
|
||||
TTF_FontFaceFamilyName void;
|
||||
TTF_FontFaceStyleName void;
|
||||
TTF_GlyphIsProvided void;
|
||||
TTF_GlyphMetrics void;
|
||||
TTF_SizeText void;
|
||||
TTF_SizeUTF8 void;
|
||||
TTF_SizeUNICODE void;
|
||||
TTF_RenderText_Solid void;
|
||||
TTF_RenderUTF8_Solid void;
|
||||
TTF_RenderUNICODE_Solid void;
|
||||
TTF_RenderGlyph_Solid void;
|
||||
TTF_RenderText_Shaded void;
|
||||
TTF_RenderUTF8_Shaded void;
|
||||
TTF_RenderUNICODE_Shaded void;
|
||||
TTF_RenderGlyph_Shaded void;
|
||||
TTF_RenderText_Blended void;
|
||||
TTF_RenderUTF8_Blended void;
|
||||
TTF_RenderUNICODE_Blended void;
|
||||
TTF_RenderText_Blended_Wrapped void;
|
||||
TTF_RenderUTF8_Blended_Wrapped void;
|
||||
TTF_RenderUNICODE_Blended_Wrapped void;
|
||||
TTF_RenderGlyph_Blended void;
|
||||
TTF_CloseFont void;
|
||||
TTF_Quit void;
|
||||
TTF_WasInit void;
|
||||
TTF_GetFontKerningSizeGlyphs void;
|
||||
}
|
||||
|
||||
var fn struct;
|
||||
|
||||
func init() bool {
|
||||
import rt::c;
|
||||
return dlsyms(dlopen("libSDL2_ttf-2.0.so.0", RTLD_LAZY), &fn,
|
||||
"TTF_ByteSwappedUNICODE",
|
||||
"TTF_Init",
|
||||
"TTF_OpenFont",
|
||||
"TTF_OpenFontIndex",
|
||||
"TTF_GetFontStyle",
|
||||
"TTF_SetFontStyle",
|
||||
"TTF_GetFontOutline",
|
||||
"TTF_SetFontOutline",
|
||||
"TTF_GetFontHinting",
|
||||
"TTF_SetFontHinting",
|
||||
"TTF_FontHeight",
|
||||
"TTF_FontAscent",
|
||||
"TTF_FontDescent",
|
||||
"TTF_FontLineSkip",
|
||||
"TTF_GetFontKerning",
|
||||
"TTF_SetFontKerning",
|
||||
"TTF_FontFaces",
|
||||
"TTF_FontFaceIsFixedWidth",
|
||||
"TTF_FontFaceFamilyName",
|
||||
"TTF_FontFaceStyleName",
|
||||
"TTF_GlyphIsProvided",
|
||||
"TTF_GlyphMetrics",
|
||||
"TTF_SizeText",
|
||||
"TTF_SizeUTF8",
|
||||
"TTF_SizeUNICODE",
|
||||
"TTF_RenderText_Solid",
|
||||
"TTF_RenderUTF8_Solid",
|
||||
"TTF_RenderUNICODE_Solid",
|
||||
"TTF_RenderGlyph_Solid",
|
||||
"TTF_RenderText_Shaded",
|
||||
"TTF_RenderUTF8_Shaded",
|
||||
"TTF_RenderUNICODE_Shaded",
|
||||
"TTF_RenderGlyph_Shaded",
|
||||
"TTF_RenderText_Blended",
|
||||
"TTF_RenderUTF8_Blended",
|
||||
"TTF_RenderUNICODE_Blended",
|
||||
"TTF_RenderText_Blended_Wrapped",
|
||||
"TTF_RenderUTF8_Blended_Wrapped",
|
||||
"TTF_RenderUNICODE_Blended_Wrapped",
|
||||
"TTF_RenderGlyph_Blended",
|
||||
"TTF_CloseFont",
|
||||
"TTF_Quit",
|
||||
"TTF_WasInit",
|
||||
"TTF_GetFontKerningSizeGlyphs"
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module sdl2_ttf+ {
|
||||
|
||||
import sdl2;
|
||||
|
||||
define {
|
||||
UNICODE_BOM_NATIVE = 0xFEFF;
|
||||
UNICODE_BOM_SWAPPED = 0xFFFE;
|
||||
}
|
||||
|
||||
define {
|
||||
TTF_STYLE_NORMAL = 0x00;
|
||||
TTF_STYLE_BOLD = 0x01;
|
||||
TTF_STYLE_ITALIC = 0x02;
|
||||
TTF_STYLE_UNDERLINE = 0x04;
|
||||
TTF_STYLE_STRIKETHROUGH = 0x08;
|
||||
}
|
||||
|
||||
define {
|
||||
TTF_HINTING_NORMAL = 0;
|
||||
TTF_HINTING_LIGHT = 1;
|
||||
TTF_HINTING_MONO = 2;
|
||||
TTF_HINTING_NONE = 3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module sdl2_ttf+ {
|
||||
|
||||
inline TTF_ByteSwappedUNICODE(swapped int) {
|
||||
call1<void>(so::fn.TTF_ByteSwappedUNICODE, swapped);
|
||||
}
|
||||
|
||||
inline TTF_Init() int {
|
||||
return call<int>(so::fn.TTF_Init);
|
||||
}
|
||||
|
||||
inline TTF_OpenFont(file. char, ptsize int) +TTF_Font {
|
||||
return call2<void>(so::fn.TTF_OpenFont, file, ptsize);
|
||||
}
|
||||
|
||||
inline TTF_OpenFontIndex(file. char, ptsize int, index long) +TTF_Font {
|
||||
return call3<void>(so::fn.TTF_OpenFontIndex, file, ptsize, index);
|
||||
}
|
||||
|
||||
inline TTF_GetFontStyle(font+ TTF_Font) int {
|
||||
return call1<int>(so::fn.TTF_GetFontStyle, font);
|
||||
}
|
||||
|
||||
inline TTF_SetFontStyle(font+ TTF_Font, style int) {
|
||||
call2<void>(so::fn.TTF_SetFontStyle, font, style);
|
||||
}
|
||||
|
||||
inline TTF_GetFontOutline(font+ TTF_Font) int {
|
||||
return call1<int>(so::fn.TTF_GetFontOutline, font);
|
||||
}
|
||||
|
||||
inline TTF_SetFontOutline(font+ TTF_Font, outline int) {
|
||||
call2<void>(so::fn.TTF_SetFontOutline, font, outline);
|
||||
}
|
||||
|
||||
inline TTF_GetFontHinting(font+ TTF_Font) int {
|
||||
return call1<int>(so::fn.TTF_GetFontHinting, font);
|
||||
}
|
||||
|
||||
inline TTF_SetFontHinting(font+ TTF_Font, hinting int) {
|
||||
call2<void>(so::fn.TTF_SetFontHinting, font, hinting);
|
||||
}
|
||||
|
||||
inline TTF_FontHeight(font+ TTF_Font) int {
|
||||
return call1<int>(so::fn.TTF_FontHeight, font);
|
||||
}
|
||||
|
||||
inline TTF_FontAscent(font+ TTF_Font) int {
|
||||
return call1<int>(so::fn.TTF_FontAscent, font);
|
||||
}
|
||||
|
||||
inline TTF_FontDescent(font+ TTF_Font) int {
|
||||
return call1<int>(so::fn.TTF_FontDescent, font);
|
||||
}
|
||||
|
||||
inline TTF_FontLineSkip(font+ TTF_Font) int {
|
||||
return call1<int>(so::fn.TTF_FontLineSkip, font);
|
||||
}
|
||||
|
||||
inline TTF_GetFontKerning(font+ TTF_Font) int {
|
||||
return call1<int>(so::fn.TTF_GetFontKerning, font);
|
||||
}
|
||||
|
||||
inline TTF_SetFontKerning(font+ TTF_Font, allowed int) {
|
||||
call2<void>(so::fn.TTF_SetFontKerning, font, allowed);
|
||||
}
|
||||
|
||||
inline TTF_FontFaces(font+ TTF_Font) long {
|
||||
return call1<long>(so::fn.TTF_FontFaces, font);
|
||||
}
|
||||
|
||||
inline TTF_FontFaceIsFixedWidth(font+ TTF_Font) int {
|
||||
return call1<int>(so::fn.TTF_FontFaceIsFixedWidth, font);
|
||||
}
|
||||
|
||||
inline TTF_FontFaceFamilyName(font+ TTF_Font) .char {
|
||||
return call1<char*>(so::fn.TTF_FontFaceFamilyName, font);
|
||||
}
|
||||
|
||||
inline TTF_FontFaceStyleName(font+ TTF_Font) .char {
|
||||
return call1<char*>(so::fn.TTF_FontFaceStyleName, font);
|
||||
}
|
||||
|
||||
inline TTF_GlyphIsProvided(font+ TTF_Font, ch uint16) int {
|
||||
return call2<int>(so::fn.TTF_GlyphIsProvided, font, ch);
|
||||
}
|
||||
|
||||
inline TTF_GlyphMetrics(font+ TTF_Font, ch uint16, minx. int, maxx. int, miny. int, maxy. int, advance. int) int {
|
||||
return call7<int>(so::fn.TTF_GlyphMetrics, font, ch, minx, maxx, miny, maxy, advance);
|
||||
}
|
||||
|
||||
inline TTF_SizeText(font+ TTF_Font, text. char, w. int, h. int) int {
|
||||
return call4<int>(so::fn.TTF_SizeText, font, text, w, h);
|
||||
}
|
||||
|
||||
inline TTF_SizeUTF8(font+ TTF_Font, text. char, w. int, h. int) int {
|
||||
return call4<int>(so::fn.TTF_SizeUTF8, font, text, w, h);
|
||||
}
|
||||
|
||||
inline TTF_SizeUNICODE(font+ TTF_Font, text. uint16, w. int, h. int) int {
|
||||
return call4<int>(so::fn.TTF_SizeUNICODE, font, text, w, h);
|
||||
}
|
||||
|
||||
inline TTF_RenderText_Solid(font+ TTF_Font, text. char, fg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call3<void>(so::fn.TTF_RenderText_Solid, font, text, fg);
|
||||
}
|
||||
|
||||
inline TTF_RenderUTF8_Solid(font+ TTF_Font, text. char, fg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call3<void>(so::fn.TTF_RenderUTF8_Solid, font, text, fg);
|
||||
}
|
||||
|
||||
inline TTF_RenderUNICODE_Solid(font+ TTF_Font, text. uint16, fg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call3<void>(so::fn.TTF_RenderUNICODE_Solid, font, text, fg);
|
||||
}
|
||||
|
||||
inline TTF_RenderGlyph_Solid(font+ TTF_Font, ch uint16, fg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call3<void>(so::fn.TTF_RenderGlyph_Solid, font, ch, fg);
|
||||
}
|
||||
|
||||
inline TTF_RenderText_Shaded(font+ TTF_Font, text. char, fg uint32 /* SDL_Color */, bg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call4<void>(so::fn.TTF_RenderText_Shaded, font, text, fg, bg);
|
||||
}
|
||||
|
||||
inline TTF_RenderUTF8_Shaded(font+ TTF_Font, text. char, fg uint32 /* SDL_Color */, bg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call4<void>(so::fn.TTF_RenderUTF8_Shaded, font, text, fg, bg);
|
||||
}
|
||||
|
||||
inline TTF_RenderUNICODE_Shaded(font+ TTF_Font, text. uint16, fg uint32 /* SDL_Color */, bg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call4<void>(so::fn.TTF_RenderUNICODE_Shaded, font, text, fg, bg);
|
||||
}
|
||||
|
||||
inline TTF_RenderGlyph_Shaded(font+ TTF_Font, ch uint16, fg uint32 /* SDL_Color */, bg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call4<void>(so::fn.TTF_RenderGlyph_Shaded, font, ch, fg, bg);
|
||||
}
|
||||
|
||||
inline TTF_RenderText_Blended(font+ TTF_Font, text. char, fg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call3<void>(so::fn.TTF_RenderText_Blended, font, text, fg);
|
||||
}
|
||||
|
||||
inline TTF_RenderUTF8_Blended(font+ TTF_Font, text. char, fg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call3<void>(so::fn.TTF_RenderUTF8_Blended, font, text, fg);
|
||||
}
|
||||
|
||||
inline TTF_RenderUNICODE_Blended(font+ TTF_Font, text. uint16, fg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call3<void>(so::fn.TTF_RenderUNICODE_Blended, font, text, fg);
|
||||
}
|
||||
|
||||
inline TTF_RenderText_Blended_Wrapped(font+ TTF_Font, text. char, fg uint32 /* SDL_Color */, wrapLength uint32) .SDL_Surface {
|
||||
return call4<void>(so::fn.TTF_RenderText_Blended_Wrapped, font, text, fg, wrapLength);
|
||||
}
|
||||
|
||||
inline TTF_RenderUTF8_Blended_Wrapped(font+ TTF_Font, text. char, fg uint32 /* SDL_Color */, wrapLength uint32) .SDL_Surface {
|
||||
return call4<void>(so::fn.TTF_RenderUTF8_Blended_Wrapped, font, text, fg, wrapLength);
|
||||
}
|
||||
|
||||
inline TTF_RenderUNICODE_Blended_Wrapped(font+ TTF_Font, text. uint16, fg uint32 /* SDL_Color */, wrapLength uint32) .SDL_Surface {
|
||||
return call4<void>(so::fn.TTF_RenderUNICODE_Blended_Wrapped, font, text, fg, wrapLength);
|
||||
}
|
||||
|
||||
inline TTF_RenderGlyph_Blended(font+ TTF_Font, ch uint16, fg uint32 /* SDL_Color */) .SDL_Surface {
|
||||
return call3<void>(so::fn.TTF_RenderGlyph_Blended, font, ch, fg);
|
||||
}
|
||||
|
||||
inline TTF_CloseFont(font+ TTF_Font) {
|
||||
call1<void>(so::fn.TTF_CloseFont, font);
|
||||
}
|
||||
|
||||
inline TTF_Quit() {
|
||||
call<void>(so::fn.TTF_Quit);
|
||||
}
|
||||
|
||||
inline TTF_WasInit() int {
|
||||
return call<int>(so::fn.TTF_WasInit);
|
||||
}
|
||||
|
||||
inline TTF_GetFontKerningSizeGlyphs(font+ TTF_Font, previous_ch uint16, ch uint16) int {
|
||||
return call3<int>(so::fn.TTF_GetFontKerningSizeGlyphs, font, previous_ch, ch);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user