mirror of https://github.com/ppy/SDL3-CS.git
657 lines
37 KiB
C#
657 lines
37 KiB
C#
/*
|
|
<auto-generated/>
|
|
C# bindings for Simple DirectMedia Layer.
|
|
Original copyright notice of input files:
|
|
|
|
Simple DirectMedia Layer
|
|
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
|
|
|
This software is provided 'as-is', without any express or implied
|
|
warranty. In no event will the authors be held liable for any damages
|
|
arising from the use of this software.
|
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
including commercial applications, and to alter it and redistribute it
|
|
freely, subject to the following restrictions:
|
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
claim that you wrote the original software. If you use this software
|
|
in a product, an acknowledgment in the product documentation would be
|
|
appreciated but is not required.
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
misrepresented as being the original software.
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
*/
|
|
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace SDL
|
|
{
|
|
public partial struct TTF_Font
|
|
{
|
|
}
|
|
|
|
public enum TTF_HintingFlags
|
|
{
|
|
TTF_HINTING_INVALID = -1,
|
|
TTF_HINTING_NORMAL,
|
|
TTF_HINTING_LIGHT,
|
|
TTF_HINTING_MONO,
|
|
TTF_HINTING_NONE,
|
|
TTF_HINTING_LIGHT_SUBPIXEL,
|
|
}
|
|
|
|
public enum TTF_HorizontalAlignment
|
|
{
|
|
TTF_HORIZONTAL_ALIGN_INVALID = -1,
|
|
TTF_HORIZONTAL_ALIGN_LEFT,
|
|
TTF_HORIZONTAL_ALIGN_CENTER,
|
|
TTF_HORIZONTAL_ALIGN_RIGHT,
|
|
}
|
|
|
|
public enum TTF_Direction
|
|
{
|
|
TTF_DIRECTION_INVALID = 0,
|
|
TTF_DIRECTION_LTR = 4,
|
|
TTF_DIRECTION_RTL,
|
|
TTF_DIRECTION_TTB,
|
|
TTF_DIRECTION_BTT,
|
|
}
|
|
|
|
public enum TTF_ImageType
|
|
{
|
|
TTF_IMAGE_INVALID,
|
|
TTF_IMAGE_ALPHA,
|
|
TTF_IMAGE_COLOR,
|
|
TTF_IMAGE_SDF,
|
|
}
|
|
|
|
public partial struct TTF_TextEngine
|
|
{
|
|
}
|
|
|
|
public partial struct TTF_TextData
|
|
{
|
|
}
|
|
|
|
public unsafe partial struct TTF_Text
|
|
{
|
|
[NativeTypeName("char *")]
|
|
public byte* text;
|
|
|
|
public int num_lines;
|
|
|
|
public int refcount;
|
|
|
|
public TTF_TextData* @internal;
|
|
}
|
|
|
|
public unsafe partial struct TTF_GPUAtlasDrawSequence
|
|
{
|
|
public SDL_GPUTexture* atlas_texture;
|
|
|
|
public SDL_FPoint* xy;
|
|
|
|
public SDL_FPoint* uv;
|
|
|
|
public int num_vertices;
|
|
|
|
public int* indices;
|
|
|
|
public int num_indices;
|
|
|
|
public TTF_ImageType image_type;
|
|
|
|
[NativeTypeName("struct TTF_GPUAtlasDrawSequence *")]
|
|
public TTF_GPUAtlasDrawSequence* next;
|
|
}
|
|
|
|
public enum TTF_GPUTextEngineWinding
|
|
{
|
|
TTF_GPU_TEXTENGINE_WINDING_INVALID = -1,
|
|
TTF_GPU_TEXTENGINE_WINDING_CLOCKWISE,
|
|
TTF_GPU_TEXTENGINE_WINDING_COUNTER_CLOCKWISE,
|
|
}
|
|
|
|
public partial struct TTF_SubString
|
|
{
|
|
public TTF_SubStringFlags flags;
|
|
|
|
public int offset;
|
|
|
|
public int length;
|
|
|
|
public int line_index;
|
|
|
|
public int cluster_index;
|
|
|
|
public SDL_Rect rect;
|
|
}
|
|
|
|
public static unsafe partial class SDL3_ttf
|
|
{
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int TTF_Version();
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_GetFreeTypeVersion(int* major, int* minor, int* patch);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_GetHarfBuzzVersion(int* major, int* minor, int* patch);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_Init();
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_Font* TTF_OpenFont([NativeTypeName("const char *")] byte* file, float ptsize);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_Font* TTF_OpenFontIO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, float ptsize);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_Font* TTF_OpenFontWithProperties(SDL_PropertiesID props);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_Font* TTF_CopyFont(TTF_Font* existing_font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_PropertiesID TTF_GetFontProperties(TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("Uint32")]
|
|
public static extern uint TTF_GetFontGeneration(TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_AddFallbackFont(TTF_Font* font, TTF_Font* fallback);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_RemoveFallbackFont(TTF_Font* font, TTF_Font* fallback);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_ClearFallbackFonts(TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetFontSize(TTF_Font* font, float ptsize);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetFontSizeDPI(TTF_Font* font, float ptsize, int hdpi, int vdpi);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern float TTF_GetFontSize(TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetFontDPI(TTF_Font* font, int* hdpi, int* vdpi);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_SetFontStyle(TTF_Font* font, TTF_FontStyleFlags style);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_FontStyleFlags TTF_GetFontStyle([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetFontOutline(TTF_Font* font, int outline);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int TTF_GetFontOutline([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_SetFontHinting(TTF_Font* font, TTF_HintingFlags hinting);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int TTF_GetNumFontFaces([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_HintingFlags TTF_GetFontHinting([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetFontSDF(TTF_Font* font, [NativeTypeName("bool")] SDLBool enabled);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetFontSDF([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int TTF_GetFontWeight([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_SetFontWrapAlignment(TTF_Font* font, TTF_HorizontalAlignment align);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_HorizontalAlignment TTF_GetFontWrapAlignment([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int TTF_GetFontHeight([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int TTF_GetFontAscent([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int TTF_GetFontDescent([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_SetFontLineSkip(TTF_Font* font, int lineskip);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int TTF_GetFontLineSkip([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_SetFontKerning(TTF_Font* font, [NativeTypeName("bool")] SDLBool enabled);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetFontKerning([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_FontIsFixedWidth([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_FontIsScalable([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, EntryPoint = "TTF_GetFontFamilyName", ExactSpelling = true)]
|
|
[return: NativeTypeName("const char *")]
|
|
public static extern byte* Unsafe_TTF_GetFontFamilyName([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, EntryPoint = "TTF_GetFontStyleName", ExactSpelling = true)]
|
|
[return: NativeTypeName("const char *")]
|
|
public static extern byte* Unsafe_TTF_GetFontStyleName([NativeTypeName("const TTF_Font *")] TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetFontDirection(TTF_Font* font, TTF_Direction direction);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_Direction TTF_GetFontDirection(TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("Uint32")]
|
|
public static extern uint TTF_StringToTag([NativeTypeName("const char *")] byte* @string);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_TagToString([NativeTypeName("Uint32")] uint tag, [NativeTypeName("char *")] byte* @string, [NativeTypeName("size_t")] nuint size);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetFontScript(TTF_Font* font, [NativeTypeName("Uint32")] uint script);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("Uint32")]
|
|
public static extern uint TTF_GetFontScript(TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("Uint32")]
|
|
public static extern uint TTF_GetGlyphScript([NativeTypeName("Uint32")] uint ch);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetFontLanguage(TTF_Font* font, [NativeTypeName("const char *")] byte* language_bcp47);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_FontHasGlyph(TTF_Font* font, [NativeTypeName("Uint32")] uint ch);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_GetGlyphImage(TTF_Font* font, [NativeTypeName("Uint32")] uint ch, TTF_ImageType* image_type);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_GetGlyphImageForIndex(TTF_Font* font, [NativeTypeName("Uint32")] uint glyph_index, TTF_ImageType* image_type);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetGlyphMetrics(TTF_Font* font, [NativeTypeName("Uint32")] uint ch, int* minx, int* maxx, int* miny, int* maxy, int* advance);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetGlyphKerning(TTF_Font* font, [NativeTypeName("Uint32")] uint previous_ch, [NativeTypeName("Uint32")] uint ch, int* kerning);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetStringSize(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, int* w, int* h);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetStringSizeWrapped(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, int wrap_width, int* w, int* h);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_MeasureString(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, int max_width, int* measured_width, [NativeTypeName("size_t *")] nuint* measured_length);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderText_Solid(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, SDL_Color fg);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderText_Solid_Wrapped(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, SDL_Color fg, int wrapLength);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderGlyph_Solid(TTF_Font* font, [NativeTypeName("Uint32")] uint ch, SDL_Color fg);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderText_Shaded(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, SDL_Color fg, SDL_Color bg);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderText_Shaded_Wrapped(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, SDL_Color fg, SDL_Color bg, int wrap_width);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderGlyph_Shaded(TTF_Font* font, [NativeTypeName("Uint32")] uint ch, SDL_Color fg, SDL_Color bg);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderText_Blended(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, SDL_Color fg);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderText_Blended_Wrapped(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, SDL_Color fg, int wrap_width);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderGlyph_Blended(TTF_Font* font, [NativeTypeName("Uint32")] uint ch, SDL_Color fg);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderText_LCD(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, SDL_Color fg, SDL_Color bg);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderText_LCD_Wrapped(TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length, SDL_Color fg, SDL_Color bg, int wrap_width);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_Surface* TTF_RenderGlyph_LCD(TTF_Font* font, [NativeTypeName("Uint32")] uint ch, SDL_Color fg, SDL_Color bg);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_TextEngine* TTF_CreateSurfaceTextEngine();
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_DrawSurfaceText(TTF_Text* text, int x, int y, SDL_Surface* surface);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_DestroySurfaceTextEngine(TTF_TextEngine* engine);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_TextEngine* TTF_CreateRendererTextEngine(SDL_Renderer* renderer);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_TextEngine* TTF_CreateRendererTextEngineWithProperties(SDL_PropertiesID props);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_DrawRendererText(TTF_Text* text, float x, float y);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_DestroyRendererTextEngine(TTF_TextEngine* engine);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_TextEngine* TTF_CreateGPUTextEngine(SDL_GPUDevice* device);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_TextEngine* TTF_CreateGPUTextEngineWithProperties(SDL_PropertiesID props);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_GPUAtlasDrawSequence* TTF_GetGPUTextDrawData(TTF_Text* text);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_DestroyGPUTextEngine(TTF_TextEngine* engine);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_SetGPUTextEngineWinding(TTF_TextEngine* engine, TTF_GPUTextEngineWinding winding);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_GPUTextEngineWinding TTF_GetGPUTextEngineWinding([NativeTypeName("const TTF_TextEngine *")] TTF_TextEngine* engine);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_Text* TTF_CreateText(TTF_TextEngine* engine, TTF_Font* font, [NativeTypeName("const char *")] byte* text, [NativeTypeName("size_t")] nuint length);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern SDL_PropertiesID TTF_GetTextProperties(TTF_Text* text);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetTextEngine(TTF_Text* text, TTF_TextEngine* engine);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_TextEngine* TTF_GetTextEngine(TTF_Text* text);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetTextFont(TTF_Text* text, TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_Font* TTF_GetTextFont(TTF_Text* text);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetTextDirection(TTF_Text* text, TTF_Direction direction);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_Direction TTF_GetTextDirection(TTF_Text* text);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetTextScript(TTF_Text* text, [NativeTypeName("Uint32")] uint script);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("Uint32")]
|
|
public static extern uint TTF_GetTextScript(TTF_Text* text);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetTextColor(TTF_Text* text, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b, [NativeTypeName("Uint8")] byte a);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetTextColorFloat(TTF_Text* text, float r, float g, float b, float a);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetTextColor(TTF_Text* text, [NativeTypeName("Uint8 *")] byte* r, [NativeTypeName("Uint8 *")] byte* g, [NativeTypeName("Uint8 *")] byte* b, [NativeTypeName("Uint8 *")] byte* a);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetTextColorFloat(TTF_Text* text, float* r, float* g, float* b, float* a);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetTextPosition(TTF_Text* text, int x, int y);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetTextPosition(TTF_Text* text, int* x, int* y);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetTextWrapWidth(TTF_Text* text, int wrap_width);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetTextWrapWidth(TTF_Text* text, int* wrap_width);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetTextWrapWhitespaceVisible(TTF_Text* text, [NativeTypeName("bool")] SDLBool visible);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_TextWrapWhitespaceVisible(TTF_Text* text);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_SetTextString(TTF_Text* text, [NativeTypeName("const char *")] byte* @string, [NativeTypeName("size_t")] nuint length);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_InsertTextString(TTF_Text* text, int offset, [NativeTypeName("const char *")] byte* @string, [NativeTypeName("size_t")] nuint length);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_AppendTextString(TTF_Text* text, [NativeTypeName("const char *")] byte* @string, [NativeTypeName("size_t")] nuint length);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_DeleteTextString(TTF_Text* text, int offset, int length);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetTextSize(TTF_Text* text, int* w, int* h);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetTextSubString(TTF_Text* text, int offset, TTF_SubString* substring);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetTextSubStringForLine(TTF_Text* text, int line, TTF_SubString* substring);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern TTF_SubString** TTF_GetTextSubStringsForRange(TTF_Text* text, int offset, int length, int* count);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetTextSubStringForPoint(TTF_Text* text, int x, int y, TTF_SubString* substring);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetPreviousTextSubString(TTF_Text* text, [NativeTypeName("const TTF_SubString *")] TTF_SubString* substring, TTF_SubString* previous);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_GetNextTextSubString(TTF_Text* text, [NativeTypeName("const TTF_SubString *")] TTF_SubString* substring, TTF_SubString* next);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
[return: NativeTypeName("bool")]
|
|
public static extern SDLBool TTF_UpdateText(TTF_Text* text);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_DestroyText(TTF_Text* text);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_CloseFont(TTF_Font* font);
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern void TTF_Quit();
|
|
|
|
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
public static extern int TTF_WasInit();
|
|
|
|
[NativeTypeName("#define SDL_TTF_MAJOR_VERSION 3")]
|
|
public const int SDL_TTF_MAJOR_VERSION = 3;
|
|
|
|
[NativeTypeName("#define SDL_TTF_MINOR_VERSION 3")]
|
|
public const int SDL_TTF_MINOR_VERSION = 3;
|
|
|
|
[NativeTypeName("#define SDL_TTF_MICRO_VERSION 0")]
|
|
public const int SDL_TTF_MICRO_VERSION = 0;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_CREATE_FILENAME_STRING \"SDL_ttf.font.create.filename\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_CREATE_FILENAME_STRING => "SDL_ttf.font.create.filename"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_CREATE_IOSTREAM_POINTER \"SDL_ttf.font.create.iostream\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_CREATE_IOSTREAM_POINTER => "SDL_ttf.font.create.iostream"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_CREATE_IOSTREAM_OFFSET_NUMBER \"SDL_ttf.font.create.iostream.offset\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_CREATE_IOSTREAM_OFFSET_NUMBER => "SDL_ttf.font.create.iostream.offset"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN \"SDL_ttf.font.create.iostream.autoclose\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN => "SDL_ttf.font.create.iostream.autoclose"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_CREATE_SIZE_FLOAT \"SDL_ttf.font.create.size\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_CREATE_SIZE_FLOAT => "SDL_ttf.font.create.size"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_CREATE_FACE_NUMBER \"SDL_ttf.font.create.face\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_CREATE_FACE_NUMBER => "SDL_ttf.font.create.face"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_CREATE_HORIZONTAL_DPI_NUMBER \"SDL_ttf.font.create.hdpi\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_CREATE_HORIZONTAL_DPI_NUMBER => "SDL_ttf.font.create.hdpi"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_CREATE_VERTICAL_DPI_NUMBER \"SDL_ttf.font.create.vdpi\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_CREATE_VERTICAL_DPI_NUMBER => "SDL_ttf.font.create.vdpi"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_CREATE_EXISTING_FONT_POINTER \"SDL_ttf.font.create.existing_font\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_CREATE_EXISTING_FONT_POINTER => "SDL_ttf.font.create.existing_font"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_OUTLINE_LINE_CAP_NUMBER \"SDL_ttf.font.outline.line_cap\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_OUTLINE_LINE_CAP_NUMBER => "SDL_ttf.font.outline.line_cap"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_OUTLINE_LINE_JOIN_NUMBER \"SDL_ttf.font.outline.line_join\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_OUTLINE_LINE_JOIN_NUMBER => "SDL_ttf.font.outline.line_join"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_FONT_OUTLINE_MITER_LIMIT_NUMBER \"SDL_ttf.font.outline.miter_limit\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_FONT_OUTLINE_MITER_LIMIT_NUMBER => "SDL_ttf.font.outline.miter_limit"u8;
|
|
|
|
[NativeTypeName("#define TTF_STYLE_NORMAL 0x00")]
|
|
public const int TTF_STYLE_NORMAL = 0x00;
|
|
|
|
[NativeTypeName("#define TTF_STYLE_BOLD 0x01")]
|
|
public const int TTF_STYLE_BOLD = 0x01;
|
|
|
|
[NativeTypeName("#define TTF_STYLE_ITALIC 0x02")]
|
|
public const int TTF_STYLE_ITALIC = 0x02;
|
|
|
|
[NativeTypeName("#define TTF_STYLE_UNDERLINE 0x04")]
|
|
public const int TTF_STYLE_UNDERLINE = 0x04;
|
|
|
|
[NativeTypeName("#define TTF_STYLE_STRIKETHROUGH 0x08")]
|
|
public const int TTF_STYLE_STRIKETHROUGH = 0x08;
|
|
|
|
[NativeTypeName("#define TTF_FONT_WEIGHT_THIN 100")]
|
|
public const int TTF_FONT_WEIGHT_THIN = 100;
|
|
|
|
[NativeTypeName("#define TTF_FONT_WEIGHT_EXTRA_LIGHT 200")]
|
|
public const int TTF_FONT_WEIGHT_EXTRA_LIGHT = 200;
|
|
|
|
[NativeTypeName("#define TTF_FONT_WEIGHT_LIGHT 300")]
|
|
public const int TTF_FONT_WEIGHT_LIGHT = 300;
|
|
|
|
[NativeTypeName("#define TTF_FONT_WEIGHT_NORMAL 400")]
|
|
public const int TTF_FONT_WEIGHT_NORMAL = 400;
|
|
|
|
[NativeTypeName("#define TTF_FONT_WEIGHT_MEDIUM 500")]
|
|
public const int TTF_FONT_WEIGHT_MEDIUM = 500;
|
|
|
|
[NativeTypeName("#define TTF_FONT_WEIGHT_SEMI_BOLD 600")]
|
|
public const int TTF_FONT_WEIGHT_SEMI_BOLD = 600;
|
|
|
|
[NativeTypeName("#define TTF_FONT_WEIGHT_BOLD 700")]
|
|
public const int TTF_FONT_WEIGHT_BOLD = 700;
|
|
|
|
[NativeTypeName("#define TTF_FONT_WEIGHT_EXTRA_BOLD 800")]
|
|
public const int TTF_FONT_WEIGHT_EXTRA_BOLD = 800;
|
|
|
|
[NativeTypeName("#define TTF_FONT_WEIGHT_BLACK 900")]
|
|
public const int TTF_FONT_WEIGHT_BLACK = 900;
|
|
|
|
[NativeTypeName("#define TTF_FONT_WEIGHT_EXTRA_BLACK 950")]
|
|
public const int TTF_FONT_WEIGHT_EXTRA_BLACK = 950;
|
|
|
|
[NativeTypeName("#define TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER_POINTER \"SDL_ttf.renderer_text_engine.create.renderer\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER_POINTER => "SDL_ttf.renderer_text_engine.create.renderer"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER \"SDL_ttf.renderer_text_engine.create.atlas_texture_size\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER => "SDL_ttf.renderer_text_engine.create.atlas_texture_size"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_GPU_TEXT_ENGINE_DEVICE_POINTER \"SDL_ttf.gpu_text_engine.create.device\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_GPU_TEXT_ENGINE_DEVICE_POINTER => "SDL_ttf.gpu_text_engine.create.device"u8;
|
|
|
|
[NativeTypeName("#define TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER \"SDL_ttf.gpu_text_engine.create.atlas_texture_size\"")]
|
|
public static ReadOnlySpan<byte> TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER => "SDL_ttf.gpu_text_engine.create.atlas_texture_size"u8;
|
|
|
|
[NativeTypeName("#define TTF_SUBSTRING_DIRECTION_MASK 0x000000FF")]
|
|
public const int TTF_SUBSTRING_DIRECTION_MASK = 0x000000FF;
|
|
|
|
[NativeTypeName("#define TTF_SUBSTRING_TEXT_START 0x00000100")]
|
|
public const int TTF_SUBSTRING_TEXT_START = 0x00000100;
|
|
|
|
[NativeTypeName("#define TTF_SUBSTRING_LINE_START 0x00000200")]
|
|
public const int TTF_SUBSTRING_LINE_START = 0x00000200;
|
|
|
|
[NativeTypeName("#define TTF_SUBSTRING_LINE_END 0x00000400")]
|
|
public const int TTF_SUBSTRING_LINE_END = 0x00000400;
|
|
|
|
[NativeTypeName("#define TTF_SUBSTRING_TEXT_END 0x00000800")]
|
|
public const int TTF_SUBSTRING_TEXT_END = 0x00000800;
|
|
}
|
|
}
|