1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-23 01:58:00 +02:00

Inital update

This commit is contained in:
Martin Cietwierkowski 2023-03-31 19:52:41 -04:00
parent 7083739120
commit 6dc1ad22f9
93 changed files with 23961 additions and 8506 deletions

View file

@ -35,8 +35,8 @@ namespace SDL2
* program!
*/
public const int32 SDL_TTF_MAJOR_VERSION = 2;
public const int32 SDL_TTF_MINOR_VERSION = 0;
public const int32 SDL_TTF_PATCHLEVEL = 12;
public const int32 SDL_TTF_MINOR_VERSION = 20;
public const int32 SDL_TTF_PATCHLEVEL = 2;
public const int32 UNICODE_BOM_NATIVE = 0xFEFF;
public const int32 UNICODE_BOM_SWAPPED = 0xFFFE;
@ -51,6 +51,12 @@ namespace SDL2
public const int32 TTF_HINTING_LIGHT = 1;
public const int32 TTF_HINTING_MONO = 2;
public const int32 TTF_HINTING_NONE = 3;
public const int32 TTF_HINTING_LIGHT_SUBPIXEL = 4;
public const int32 TTF_DIRECTION_LTR = 0;
public const int32 TTF_DIRECTION_RTL = 1;
public const int32 TTF_DIRECTION_TTB = 2;
public const int32 TTF_DIRECTION_BTT = 3;
public static void SDL_TTF_VERSION(out SDL.Version X)
{
@ -59,11 +65,17 @@ namespace SDL2
X.patch = SDL_TTF_PATCHLEVEL;
}
[LinkName("TTF_LinkedVersion")]
[LinkName("TTF_Linked_Version")]
public static extern SDL.Version LinkedVersion();
[LinkName("TTF_GetFreeTypeVersion")]
public static extern void GetFreeTypeVersion(int32* major, int32* minor, int32* patch);
[LinkName("TTF_GetHarfBuzzVersion")]
public static extern void GetHarfBuzzVersion(int32* major, int32* minor, int32* patch);
[LinkName("TTF_ByteSwappedUNICODE")]
public static extern void ByteSwappedUNICODE(int32 swapped);
public static extern void ByteSwappedUNICODE(bool swapped);
[LinkName("TTF_Init")]
public static extern int32 Init();
@ -99,6 +111,50 @@ namespace SDL2
int64 index
);
[LinkName("TTF_OpenFontDPI")]
public static extern Font* OpenFontDPI(
char* file,
int32 ptsize,
uint32 hdpi,
uint32 vdpi
);
[LinkName("TTF_OpenFontIndexDPI")]
public static extern Font* OpenFontIndexDPI(
char* file,
int32 ptsize,
int32 index,
uint32 hdpi,
uint32 vdpi
);
[LinkName("TTF_OpenFontDPIRW")]
public static extern Font* OpenFontDPIRW(
SDL.RWOps* src,
int32 freesrc,
int32 ptsize,
uint32 hdpi,
uint32 vdpi
);
[LinkName("TTF_OpenFontIndexDPIRW")]
public static extern Font* OpenFontIndexDPIRW(
SDL.RWOps* src,
int32 freesrc,
int32 ptsize,
int32 index,
uint32 hdpi,
uint32 vdpi
);
[LinkName("TTF_SetFontSizeDPI")]
public static extern int32 SetFontSizeDPI(
Font* font,
int32 ptsize,
uint32 hdpi,
uint32 vdpi
);
public struct Font;
[LinkName("TTF_GetFontStyle")]
@ -119,6 +175,14 @@ namespace SDL2
[LinkName("TTF_SetFontHinting")]
public static extern void SetFontHinting(Font* font, int32 hinting);
[LinkName("TTF_GetFontWrappedAlign")]
public static extern int32 GetFontWrappedAlign(Font* font);
[LinkName("TTF_SetFontWrappedAlign")]
public static extern void SetFontWrappedAlign(Font* font, int32 align);
[LinkName("TTF_FontHeight")]
public static extern int32 FontHeight(Font* font);
@ -152,6 +216,9 @@ namespace SDL2
[LinkName("TTF_GlyphIsProvided")]
public static extern int32 GlyphIsProvided(Font* font, uint16 ch);
[LinkName("TTF_GlyphIsProvided32")]
public static extern int32 GlyphIsProvided32(Font* font, uint32 ch);
[LinkName("TTF_GlyphMetrics")]
public static extern int32 GlyphMetrics(
Font* font,
@ -163,6 +230,17 @@ namespace SDL2
out int32 advance
);
[LinkName("TTF_GlyphMetrics32")]
public static extern int32 GlyphMetrics32(
Font* font,
uint32 ch,
out int32 minx,
out int32 maxx,
out int32 miny,
out int32 maxy,
out int32 advance
);
[LinkName("TTF_SizeText")]
public static extern int32 SizeText(
Font* font,
@ -187,6 +265,33 @@ namespace SDL2
out int32 h
);
[LinkName("TTF_MeasureText")]
public static extern int32 MeasureText(
Font* font,
char8* text,
int32 measure_width,
out int32 extent,
out int32 count
);
[LinkName("TTF_MeasureUTF8")]
public static extern int32 MeasureUTF8(
Font* font,
char8* text,
int32 measure_width,
out int32 extent,
out int32 count
);
[LinkName("TTF_MeasureUNICODE")]
public static extern int32 MeasureUNICODE(
Font* font,
char16* text,
int32 measure_width,
out int32 extent,
out int32 count
);
[LinkName("TTF_RenderText_Solid")]
public static extern SDL.Surface* RenderText_Solid(
Font* font,
@ -208,10 +313,41 @@ namespace SDL2
SDL.Color fg
);
[LinkName("TTF_RenderText_Solid_Wrapped")]
public static extern SDL.Surface* RenderText_Solid_Wrapped(
Font* font,
char8* text,
SDL.Color fg,
uint32 wrapLength
);
[LinkName("TTF_RenderUTF8_Solid_Wrapped")]
public static extern SDL.Surface* RenderUTF8_Solid_Wrapped(
Font* font,
char8* text,
SDL.Color fg,
uint32 wrapLength
);
[LinkName("TTF_RenderUNICODE_Solid_Wrapped")]
public static extern SDL.Surface* RenderUNICODE_Solid_Wrapped(
Font* font,
char16* text,
SDL.Color fg,
uint32 wrapLength
);
[LinkName("TTF_RenderGlyph_Solid")]
public static extern SDL.Surface* RenderGlyph_Solid(
Font* font,
uint16 ch,
uint ch,
SDL.Color fg
);
[LinkName("TTF_RenderGlyph32_Solid")]
public static extern SDL.Surface* RenderGlyph32_Solid(
Font* font,
uint32 ch,
SDL.Color fg
);
@ -239,6 +375,33 @@ namespace SDL2
SDL.Color bg
);
[LinkName("TTF_RenderText_Shaded_Wrapped")]
public static extern SDL.Surface* RenderText_Shaded_Wrapped(
Font* font,
char8* text,
SDL.Color fg,
SDL.Color bg,
uint32 wrappedLength
);
[LinkName("TTF_RenderUTF8_Shaded_Wrapped")]
public static extern SDL.Surface* RenderUTF8_Shaded_Wrapped(
Font* font,
char8* text,
SDL.Color fg,
SDL.Color bg,
uint32 wrappedLength
);
[LinkName("TTF_RenderUNICODE_Shaded_Wrapped")]
public static extern SDL.Surface* RenderUNICODE_Shaded_Wrapped(
Font* font,
char16* text,
SDL.Color fg,
SDL.Color bg,
uint32 wrappedLength
);
[LinkName("TTF_RenderGlyph_Shaded")]
public static extern SDL.Surface* RenderGlyph_Shaded(
Font* font,
@ -247,6 +410,14 @@ namespace SDL2
SDL.Color bg
);
[LinkName("TTF_RenderGlyph32_Shaded")]
public static extern SDL.Surface* RenderGlyph32_Shaded(
Font* font,
uint32 ch,
SDL.Color fg,
SDL.Color bg
);
[LinkName("TTF_RenderText_Blended")]
public static extern SDL.Surface* RenderText_Blended(
Font* font,
@ -299,6 +470,80 @@ namespace SDL2
SDL.Color fg
);
[LinkName("TTF_RenderGlyph32_Blended")]
public static extern SDL.Surface* RenderGlyph32_Blended(
Font* font,
uint32 ch,
SDL.Color fg
);
[LinkName("TTF_RenderText_LCD")]
public static extern SDL.Surface* RenderText_LCD(
Font* font,
char8* text,
SDL.Color fg,
SDL.Color.bg
);
[LinkName("TTF_RenderUTF8_LCD")]
public static extern SDL.Surface* RenderUTF8_LCD(
Font* font,
char8* text,
SDL.Color fg,
SDL.Color.bg
);
[LinkName("TTF_RenderUNICODE_LCD")]
public static extern SDL.Surface* RenderUNICODE_LCD(
Font* font,
char16* text,
SDL.Color fg,
SDL.Color.bg
);
[LinkName("TTF_RenderText_LCD_Wrapped")]
public static extern SDL.Surface* RenderText_LCD_Wrapped(
Font* font,
char8* text,
SDL.Color fg,
SDL.Color.bg,
uint32 wrapLength
);
[LinkName("TTF_RenderUTF8_LCD_Wrapped")]
public static extern SDL.Surface* RenderUTF8_LCD_Wrapped(
Font* font,
char8* text,
SDL.Color fg,
SDL.Color.bg,
uint32 wrapLength
);
[LinkName("TTF_RenderUNICODE_LCD_Wrapped")]
public static extern SDL.Surface* RenderUNICODE_LCD_Wrapped(
Font* font,
char16* text,
SDL.Color fg,
SDL.Color.bg,
uint32 wrapLength
);
[LinkName("TTF_RenderGlyph_LCD")]
public static extern SDL.Surface* RenderGlyph_LCD(
Font* font,
char16 ch,
SDL.Color fg,
SDL.Color.bg
);
[LinkName("TTF_RenderGlyph32_LCD")]
public static extern SDL.Surface* RenderGlyph32_LCD(
Font* font,
char32 ch,
SDL.Color fg,
SDL.Color.bg
);
[LinkName("TTF_CloseFont")]
public static extern void CloseFont(Font* font);
@ -314,5 +559,45 @@ namespace SDL2
int prev_index,
int index
);
[LinkName("TTF_GetFontKerningSizeGlyphs")]
public static extern int32 GetFontKerningSizeGlyphs(
Font* font,
char16 previous_ch,
char16 ch
);
[LinkName("TTF_SetFontSDF")]
public static extern int32 SetFontSDF(
Font* font,
bool on_off
);
[LinkName("TTF_GetFontSDF")]
public static extern bool GetFontSDF(
Font* font
);
[LinkName("TTF_SetDirection")]
public static extern int32 SetDirection(
int direction
);
[LinkName("TTF_SetScript")]
public static extern int32 SetScript(
int script
);
[LinkName("TTF_SetFontDirection")]
public static extern int32 SetFontDirection(
Font* font,
int direction
);
[LinkName("TTF_SetFontScriptName")]
public static extern int32 SetFontScriptName(
Font* font,
char8* script
);
}
}