mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Minor style changes for sdl3 and sdl3/ttf
This commit is contained in:
Vendored
+29
-15
@@ -46,7 +46,7 @@ GPUIndexElementSize :: enum c.int {
|
|||||||
GPUTextureFormat :: enum c.int {
|
GPUTextureFormat :: enum c.int {
|
||||||
INVALID,
|
INVALID,
|
||||||
|
|
||||||
/* Unsigned Normalized Float Color Formats */
|
/* Unsigned Normalized Float Color Formats */
|
||||||
A8_UNORM,
|
A8_UNORM,
|
||||||
R8_UNORM,
|
R8_UNORM,
|
||||||
R8G8_UNORM,
|
R8G8_UNORM,
|
||||||
@@ -59,34 +59,41 @@ GPUTextureFormat :: enum c.int {
|
|||||||
B5G5R5A1_UNORM,
|
B5G5R5A1_UNORM,
|
||||||
B4G4R4A4_UNORM,
|
B4G4R4A4_UNORM,
|
||||||
B8G8R8A8_UNORM,
|
B8G8R8A8_UNORM,
|
||||||
/* Compressed Unsigned Normalized Float Color Formats */
|
|
||||||
|
/* Compressed Unsigned Normalized Float Color Formats */
|
||||||
BC1_RGBA_UNORM,
|
BC1_RGBA_UNORM,
|
||||||
BC2_RGBA_UNORM,
|
BC2_RGBA_UNORM,
|
||||||
BC3_RGBA_UNORM,
|
BC3_RGBA_UNORM,
|
||||||
BC4_R_UNORM,
|
BC4_R_UNORM,
|
||||||
BC5_RG_UNORM,
|
BC5_RG_UNORM,
|
||||||
BC7_RGBA_UNORM,
|
BC7_RGBA_UNORM,
|
||||||
/* Compressed Signed Float Color Formats */
|
|
||||||
|
/* Compressed Signed Float Color Formats */
|
||||||
BC6H_RGB_FLOAT,
|
BC6H_RGB_FLOAT,
|
||||||
/* Compressed Unsigned Float Color Formats */
|
|
||||||
|
/* Compressed Unsigned Float Color Formats */
|
||||||
BC6H_RGB_UFLOAT,
|
BC6H_RGB_UFLOAT,
|
||||||
/* Signed Normalized Float Color Formats */
|
|
||||||
|
/* Signed Normalized Float Color Formats */
|
||||||
R8_SNORM,
|
R8_SNORM,
|
||||||
R8G8_SNORM,
|
R8G8_SNORM,
|
||||||
R8G8B8A8_SNORM,
|
R8G8B8A8_SNORM,
|
||||||
R16_SNORM,
|
R16_SNORM,
|
||||||
R16G16_SNORM,
|
R16G16_SNORM,
|
||||||
R16G16B16A16_SNORM,
|
R16G16B16A16_SNORM,
|
||||||
/* Signed Float Color Formats */
|
|
||||||
|
/* Signed Float Color Formats */
|
||||||
R16_FLOAT,
|
R16_FLOAT,
|
||||||
R16G16_FLOAT,
|
R16G16_FLOAT,
|
||||||
R16G16B16A16_FLOAT,
|
R16G16B16A16_FLOAT,
|
||||||
R32_FLOAT,
|
R32_FLOAT,
|
||||||
R32G32_FLOAT,
|
R32G32_FLOAT,
|
||||||
R32G32B32A32_FLOAT,
|
R32G32B32A32_FLOAT,
|
||||||
/* Unsigned Float Color Formats */
|
|
||||||
|
/* Unsigned Float Color Formats */
|
||||||
R11G11B10_UFLOAT,
|
R11G11B10_UFLOAT,
|
||||||
/* Unsigned Integer Color Formats */
|
|
||||||
|
/* Unsigned Integer Color Formats */
|
||||||
R8_UINT,
|
R8_UINT,
|
||||||
R8G8_UINT,
|
R8G8_UINT,
|
||||||
R8G8B8A8_UINT,
|
R8G8B8A8_UINT,
|
||||||
@@ -96,7 +103,8 @@ GPUTextureFormat :: enum c.int {
|
|||||||
R32_UINT,
|
R32_UINT,
|
||||||
R32G32_UINT,
|
R32G32_UINT,
|
||||||
R32G32B32A32_UINT,
|
R32G32B32A32_UINT,
|
||||||
/* Signed Integer Color Formats */
|
|
||||||
|
/* Signed Integer Color Formats */
|
||||||
R8_INT,
|
R8_INT,
|
||||||
R8G8_INT,
|
R8G8_INT,
|
||||||
R8G8B8A8_INT,
|
R8G8B8A8_INT,
|
||||||
@@ -106,21 +114,25 @@ GPUTextureFormat :: enum c.int {
|
|||||||
R32_INT,
|
R32_INT,
|
||||||
R32G32_INT,
|
R32G32_INT,
|
||||||
R32G32B32A32_INT,
|
R32G32B32A32_INT,
|
||||||
/* SRGB Unsigned Normalized Color Formats */
|
|
||||||
|
/* SRGB Unsigned Normalized Color Formats */
|
||||||
R8G8B8A8_UNORM_SRGB,
|
R8G8B8A8_UNORM_SRGB,
|
||||||
B8G8R8A8_UNORM_SRGB,
|
B8G8R8A8_UNORM_SRGB,
|
||||||
/* Compressed SRGB Unsigned Normalized Color Formats */
|
|
||||||
|
/* Compressed SRGB Unsigned Normalized Color Formats */
|
||||||
BC1_RGBA_UNORM_SRGB,
|
BC1_RGBA_UNORM_SRGB,
|
||||||
BC2_RGBA_UNORM_SRGB,
|
BC2_RGBA_UNORM_SRGB,
|
||||||
BC3_RGBA_UNORM_SRGB,
|
BC3_RGBA_UNORM_SRGB,
|
||||||
BC7_RGBA_UNORM_SRGB,
|
BC7_RGBA_UNORM_SRGB,
|
||||||
/* Depth Formats */
|
|
||||||
|
/* Depth Formats */
|
||||||
D16_UNORM,
|
D16_UNORM,
|
||||||
D24_UNORM,
|
D24_UNORM,
|
||||||
D32_FLOAT,
|
D32_FLOAT,
|
||||||
D24_UNORM_S8_UINT,
|
D24_UNORM_S8_UINT,
|
||||||
D32_FLOAT_S8_UINT,
|
D32_FLOAT_S8_UINT,
|
||||||
/* Compressed ASTC Normalized Float Color Formats*/
|
|
||||||
|
/* Compressed ASTC Normalized Float Color Formats*/
|
||||||
ASTC_4x4_UNORM,
|
ASTC_4x4_UNORM,
|
||||||
ASTC_5x4_UNORM,
|
ASTC_5x4_UNORM,
|
||||||
ASTC_5x5_UNORM,
|
ASTC_5x5_UNORM,
|
||||||
@@ -135,7 +147,8 @@ GPUTextureFormat :: enum c.int {
|
|||||||
ASTC_10x10_UNORM,
|
ASTC_10x10_UNORM,
|
||||||
ASTC_12x10_UNORM,
|
ASTC_12x10_UNORM,
|
||||||
ASTC_12x12_UNORM,
|
ASTC_12x12_UNORM,
|
||||||
/* Compressed SRGB ASTC Normalized Float Color Formats*/
|
|
||||||
|
/* Compressed SRGB ASTC Normalized Float Color Formats*/
|
||||||
ASTC_4x4_UNORM_SRGB,
|
ASTC_4x4_UNORM_SRGB,
|
||||||
ASTC_5x4_UNORM_SRGB,
|
ASTC_5x4_UNORM_SRGB,
|
||||||
ASTC_5x5_UNORM_SRGB,
|
ASTC_5x5_UNORM_SRGB,
|
||||||
@@ -150,7 +163,8 @@ GPUTextureFormat :: enum c.int {
|
|||||||
ASTC_10x10_UNORM_SRGB,
|
ASTC_10x10_UNORM_SRGB,
|
||||||
ASTC_12x10_UNORM_SRGB,
|
ASTC_12x10_UNORM_SRGB,
|
||||||
ASTC_12x12_UNORM_SRGB,
|
ASTC_12x12_UNORM_SRGB,
|
||||||
/* Compressed ASTC Signed Float Color Formats*/
|
|
||||||
|
/* Compressed ASTC Signed Float Color Formats*/
|
||||||
ASTC_4x4_FLOAT,
|
ASTC_4x4_FLOAT,
|
||||||
ASTC_5x4_FLOAT,
|
ASTC_5x4_FLOAT,
|
||||||
ASTC_5x5_FLOAT,
|
ASTC_5x5_FLOAT,
|
||||||
|
|||||||
Vendored
+5
-6
@@ -18,7 +18,7 @@ CopyOperation :: struct {
|
|||||||
cmd: DrawCommand,
|
cmd: DrawCommand,
|
||||||
text_offset: c.int,
|
text_offset: c.int,
|
||||||
glyph_font: ^Font,
|
glyph_font: ^Font,
|
||||||
glyph_index: SDL.Uint32,
|
glyph_index: u32,
|
||||||
src: SDL.Rect,
|
src: SDL.Rect,
|
||||||
dst: SDL.Rect,
|
dst: SDL.Rect,
|
||||||
reserved: rawptr,
|
reserved: rawptr,
|
||||||
@@ -30,8 +30,7 @@ DrawOperation :: struct #raw_union {
|
|||||||
copy: CopyOperation,
|
copy: CopyOperation,
|
||||||
}
|
}
|
||||||
|
|
||||||
TextLayout :: struct {
|
TextLayout :: struct {}
|
||||||
}
|
|
||||||
|
|
||||||
TextData :: struct {
|
TextData :: struct {
|
||||||
font: ^Font,
|
font: ^Font,
|
||||||
@@ -41,9 +40,9 @@ TextData :: struct {
|
|||||||
x, y: c.int,
|
x, y: c.int,
|
||||||
w, h: c.int,
|
w, h: c.int,
|
||||||
num_ops: c.int,
|
num_ops: c.int,
|
||||||
ops: [^]DrawOperation,
|
ops: [^]DrawOperation `fmt:"v,num_ops"`,
|
||||||
num_clusters: c.int,
|
num_clusters: c.int,
|
||||||
clusters: [^]SubString,
|
clusters: [^]SubString `fmt:"v,num_clusters"`,
|
||||||
props: SDL.PropertiesID,
|
props: SDL.PropertiesID,
|
||||||
needs_engine_update: bool,
|
needs_engine_update: bool,
|
||||||
engine: ^TextEngine,
|
engine: ^TextEngine,
|
||||||
@@ -51,7 +50,7 @@ TextData :: struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TextEngine :: struct {
|
TextEngine :: struct {
|
||||||
version: SDL.Uint32,
|
version: u32,
|
||||||
userdata: rawptr,
|
userdata: rawptr,
|
||||||
CreateText: proc "c" (userdata: rawptr, text: ^Text) -> bool,
|
CreateText: proc "c" (userdata: rawptr, text: ^Text) -> bool,
|
||||||
DestroyText: proc "c" (userdata: rawptr, Textext: ^Text),
|
DestroyText: proc "c" (userdata: rawptr, Textext: ^Text),
|
||||||
|
|||||||
Vendored
+100
-101
@@ -10,48 +10,47 @@ when ODIN_OS == .Windows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PROP_FONT_CREATE_FILENAME_STRING :: "SDL_ttf.font.create.filename"
|
PROP_FONT_CREATE_FILENAME_STRING :: "SDL_ttf.font.create.filename"
|
||||||
PROP_FONT_CREATE_IOSTREAM_POINTER :: "SDL_ttf.font.create.iostream"
|
PROP_FONT_CREATE_IOSTREAM_POINTER :: "SDL_ttf.font.create.iostream"
|
||||||
PROP_FONT_CREATE_IOSTREAM_OFFSET_NUMBER :: "SDL_ttf.font.create.iostream.offset"
|
PROP_FONT_CREATE_IOSTREAM_OFFSET_NUMBER :: "SDL_ttf.font.create.iostream.offset"
|
||||||
PROP_FONT_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN :: "SDL_ttf.font.create.iostream.autoclose"
|
PROP_FONT_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN :: "SDL_ttf.font.create.iostream.autoclose"
|
||||||
PROP_FONT_CREATE_SIZE_FLOAT :: "SDL_ttf.font.create.size"
|
PROP_FONT_CREATE_SIZE_FLOAT :: "SDL_ttf.font.create.size"
|
||||||
PROP_FONT_CREATE_FACE_NUMBER :: "SDL_ttf.font.create.face"
|
PROP_FONT_CREATE_FACE_NUMBER :: "SDL_ttf.font.create.face"
|
||||||
PROP_FONT_CREATE_HORIZONTAL_DPI_NUMBER :: "SDL_ttf.font.create.hdpi"
|
PROP_FONT_CREATE_HORIZONTAL_DPI_NUMBER :: "SDL_ttf.font.create.hdpi"
|
||||||
PROP_FONT_CREATE_VERTICAL_DPI_NUMBER :: "SDL_ttf.font.create.vdpi"
|
PROP_FONT_CREATE_VERTICAL_DPI_NUMBER :: "SDL_ttf.font.create.vdpi"
|
||||||
PROP_FONT_CREATE_EXISTING_FONT :: "SDL_ttf.font.create.existing_font"
|
PROP_FONT_CREATE_EXISTING_FONT :: "SDL_ttf.font.create.existing_font"
|
||||||
|
|
||||||
FONT_WEIGHT_THIN :: 100 /**< Thin (100) named font weight value */
|
FONT_WEIGHT_THIN :: 100 /**< Thin (100) named font weight value */
|
||||||
FONT_WEIGHT_EXTRA_LIGHT :: 200 /**< ExtraLight (200) named font weight value */
|
FONT_WEIGHT_EXTRA_LIGHT :: 200 /**< ExtraLight (200) named font weight value */
|
||||||
FONT_WEIGHT_LIGHT :: 300 /**< Light (300) named font weight value */
|
FONT_WEIGHT_LIGHT :: 300 /**< Light (300) named font weight value */
|
||||||
FONT_WEIGHT_NORMAL :: 400 /**< Normal (400) named font weight value */
|
FONT_WEIGHT_NORMAL :: 400 /**< Normal (400) named font weight value */
|
||||||
FONT_WEIGHT_MEDIUM :: 500 /**< Medium (500) named font weight value */
|
FONT_WEIGHT_MEDIUM :: 500 /**< Medium (500) named font weight value */
|
||||||
FONT_WEIGHT_SEMI_BOLD :: 600 /**< SemiBold (600) named font weight value */
|
FONT_WEIGHT_SEMI_BOLD :: 600 /**< SemiBold (600) named font weight value */
|
||||||
FONT_WEIGHT_BOLD :: 700 /**< Bold (700) named font weight value */
|
FONT_WEIGHT_BOLD :: 700 /**< Bold (700) named font weight value */
|
||||||
FONT_WEIGHT_EXTRA_BOLD :: 800 /**< ExtraBold (800) named font weight value */
|
FONT_WEIGHT_EXTRA_BOLD :: 800 /**< ExtraBold (800) named font weight value */
|
||||||
FONT_WEIGHT_BLACK :: 900 /**< Black (900) named font weight value */
|
FONT_WEIGHT_BLACK :: 900 /**< Black (900) named font weight value */
|
||||||
FONT_WEIGHT_EXTRA_BLACK :: 950 /**< ExtraBlack (950) named font weight value */
|
FONT_WEIGHT_EXTRA_BLACK :: 950 /**< ExtraBlack (950) named font weight value */
|
||||||
|
|
||||||
PROP_RENDERER_TEXT_ENGINE_RENDERER :: "SDL_ttf.renderer_text_engine.create.renderer"
|
PROP_RENDERER_TEXT_ENGINE_RENDERER :: "SDL_ttf.renderer_text_engine.create.renderer"
|
||||||
PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE :: "SDL_ttf.renderer_text_engine.create.atlas_texture_size"
|
PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE :: "SDL_ttf.renderer_text_engine.create.atlas_texture_size"
|
||||||
|
|
||||||
PROP_GPU_TEXT_ENGINE_DEVICE :: "SDL_ttf.gpu_text_engine.create.device"
|
PROP_GPU_TEXT_ENGINE_DEVICE :: "SDL_ttf.gpu_text_engine.create.device"
|
||||||
PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE :: "SDL_ttf.gpu_text_engine.create.atlas_texture_size"
|
PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE :: "SDL_ttf.gpu_text_engine.create.atlas_texture_size"
|
||||||
|
|
||||||
MAJOR_VERSION :: 3
|
MAJOR_VERSION :: 3
|
||||||
MINOR_VERSION :: 2
|
MINOR_VERSION :: 2
|
||||||
PATCHLEVEL :: 2
|
PATCHLEVEL :: 2
|
||||||
|
|
||||||
Font :: struct {
|
Font :: struct {}
|
||||||
}
|
|
||||||
|
|
||||||
Text :: struct {
|
Text :: struct {
|
||||||
text: ^c.char,
|
text: [^]u8,
|
||||||
num_lines: c.int,
|
num_lines: c.int,
|
||||||
refcount: c.int,
|
refcount: c.int,
|
||||||
internal: ^TextData,
|
internal: ^TextData,
|
||||||
}
|
}
|
||||||
|
|
||||||
FontStyle :: enum SDL.Uint32 {
|
FontStyle :: enum u32 {
|
||||||
NORMAL,
|
NORMAL,
|
||||||
BOLD,
|
BOLD,
|
||||||
ITALIC,
|
ITALIC,
|
||||||
@@ -59,7 +58,7 @@ FontStyle :: enum SDL.Uint32 {
|
|||||||
STRIKETHROUGH,
|
STRIKETHROUGH,
|
||||||
}
|
}
|
||||||
|
|
||||||
FontStyleFlags :: bit_set[FontStyle;SDL.Uint32]
|
FontStyleFlags :: distinct bit_set[FontStyle; u32]
|
||||||
|
|
||||||
// NOTE: This is called TTF_HintingFlags but its not a bit_set so
|
// NOTE: This is called TTF_HintingFlags but its not a bit_set so
|
||||||
// the "flags" doesnt really make sense, its just the hinting.
|
// the "flags" doesnt really make sense, its just the hinting.
|
||||||
@@ -96,21 +95,21 @@ ImageType :: enum c.int {
|
|||||||
|
|
||||||
GPUAtlasDrawSequence :: struct {
|
GPUAtlasDrawSequence :: struct {
|
||||||
atlas_texture: ^SDL.GPUTexture,
|
atlas_texture: ^SDL.GPUTexture,
|
||||||
xy, uv: [^]SDL.FPoint,
|
xy, uv: [^]SDL.FPoint `fmt:"v,num_vertices"`,
|
||||||
num_vertices: c.int,
|
num_vertices: c.int,
|
||||||
indices: [^]c.int,
|
indices: [^]c.int `fmt:"v,num_indices"`,
|
||||||
num_indices: c.int,
|
num_indices: c.int,
|
||||||
image_type: ImageType,
|
image_type: ImageType,
|
||||||
next: ^GPUAtlasDrawSequence,
|
next: ^GPUAtlasDrawSequence,
|
||||||
}
|
}
|
||||||
|
|
||||||
GPUTextEngineWinding :: enum c.int {
|
GPUTextEngineWinding :: enum c.int {
|
||||||
INVALID = -1,
|
INVALID = -1,
|
||||||
CLOCKWISE,
|
CLOCKWISE = 0,
|
||||||
COUNTER_CLOCKWISE,
|
COUNTER_CLOCKWISE = +1,
|
||||||
}
|
}
|
||||||
|
|
||||||
SubStringFlags :: bit_field SDL.Uint32 {
|
SubStringFlags :: bit_field u32 {
|
||||||
direction: u8 | 8,
|
direction: u8 | 8,
|
||||||
text_start: bool | 1,
|
text_start: bool | 1,
|
||||||
line_start: bool | 1,
|
line_start: bool | 1,
|
||||||
@@ -125,31 +124,31 @@ SubString :: struct {
|
|||||||
rect: SDL.Rect,
|
rect: SDL.Rect,
|
||||||
}
|
}
|
||||||
|
|
||||||
@(default_calling_convention = "c", link_prefix = "TTF_", require_results)
|
@(default_calling_convention="c", link_prefix="TTF_", require_results)
|
||||||
foreign lib {
|
foreign lib {
|
||||||
Version :: proc() -> c.int ---
|
Version :: proc() -> c.int ---
|
||||||
GetFreeTypeVersion :: proc(major, minor, patch: ^c.int) ---
|
GetFreeTypeVersion :: proc(major, minor, patch: ^c.int) ---
|
||||||
GetHarfBuzzVersion :: proc(major, minor, patch: ^c.int) ---
|
GetHarfBuzzVersion :: proc(major, minor, patch: ^c.int) ---
|
||||||
|
|
||||||
Init :: proc() -> bool ---
|
Init :: proc() -> bool ---
|
||||||
|
|
||||||
OpenFont :: proc(file: cstring, ptsize: f32) -> ^Font ---
|
OpenFont :: proc(file: cstring, ptsize: f32) -> ^Font ---
|
||||||
OpenFontIO :: proc(src: ^SDL.IOStream, closeio: bool, ptsize: f32) -> ^Font ---
|
OpenFontIO :: proc(src: ^SDL.IOStream, closeio: bool, ptsize: f32) -> ^Font ---
|
||||||
OpenFontWithProperties :: proc(props: SDL.PropertiesID) -> ^Font ---
|
OpenFontWithProperties :: proc(props: SDL.PropertiesID) -> ^Font ---
|
||||||
|
|
||||||
CopyFont :: proc(existing_font: ^Font) -> ^Font ---
|
CopyFont :: proc(existing_font: ^Font) -> ^Font ---
|
||||||
|
|
||||||
GetFontProperties :: proc(font: ^Font) -> SDL.PropertiesID ---
|
GetFontProperties :: proc(font: ^Font) -> SDL.PropertiesID ---
|
||||||
GetFontGeneration :: proc(font: ^Font) -> SDL.Uint32 ---
|
GetFontGeneration :: proc(font: ^Font) -> u32 ---
|
||||||
|
|
||||||
AddFallbackFont :: proc(font: ^Font, fallback: ^Font) -> bool ---
|
AddFallbackFont :: proc(font: ^Font, fallback: ^Font) -> bool ---
|
||||||
RemoveFallbackFont :: proc(font: ^Font, fallback: ^Font) ---
|
RemoveFallbackFont :: proc(font: ^Font, fallback: ^Font) ---
|
||||||
ClearFallbackFonts :: proc(font: ^Font) ---
|
ClearFallbackFonts :: proc(font: ^Font) ---
|
||||||
|
|
||||||
SetFontSize :: proc(font: ^Font, ptsize: f32) -> bool ---
|
SetFontSize :: proc(font: ^Font, ptsize: f32) -> bool ---
|
||||||
SetFontSizeDPI :: proc(font: ^Font, ptsize: f32, hdpi: c.int, vdpi: c.int) -> bool ---
|
SetFontSizeDPI :: proc(font: ^Font, ptsize: f32, hdpi: c.int, vdpi: c.int) -> bool ---
|
||||||
GetFontSize :: proc(font: ^Font) -> f32 ---
|
GetFontSize :: proc(font: ^Font) -> f32 ---
|
||||||
GetFontDPI :: proc(font: ^Font, hdpi: ^c.int, vdpi: ^c.int) -> bool ---
|
GetFontDPI :: proc(font: ^Font, hdpi: ^c.int, vdpi: ^c.int) -> bool ---
|
||||||
|
|
||||||
SetFontStyle :: proc(font: ^Font, style: FontStyleFlags) ---
|
SetFontStyle :: proc(font: ^Font, style: FontStyleFlags) ---
|
||||||
GetFontStyle :: proc(#by_ptr font: Font) -> FontStyleFlags ---
|
GetFontStyle :: proc(#by_ptr font: Font) -> FontStyleFlags ---
|
||||||
@@ -189,92 +188,92 @@ foreign lib {
|
|||||||
SetFontDirection :: proc(font: ^Font, direction: Direction) -> bool ---
|
SetFontDirection :: proc(font: ^Font, direction: Direction) -> bool ---
|
||||||
GetFontDirection :: proc(#by_ptr font: Font) -> Direction ---
|
GetFontDirection :: proc(#by_ptr font: Font) -> Direction ---
|
||||||
|
|
||||||
StringToTag :: proc(string: cstring) -> SDL.Uint32 ---
|
StringToTag :: proc(string: cstring) -> u32 ---
|
||||||
TagToString :: proc(tag: SDL.Uint32, string: [^]c.char, size: c.size_t) ---
|
TagToString :: proc(tag: u32, string: [^]c.char, size: c.size_t) ---
|
||||||
|
|
||||||
SetFontScript :: proc(font: ^Font, script: SDL.Uint32) -> bool ---
|
SetFontScript :: proc(font: ^Font, script: u32) -> bool ---
|
||||||
GetFontScript :: proc(font: ^Font) -> SDL.Uint32 ---
|
GetFontScript :: proc(font: ^Font) -> u32 ---
|
||||||
|
|
||||||
SetFontLanguage :: proc(font: ^Font, language_bcp47: cstring) -> bool ---
|
SetFontLanguage :: proc(font: ^Font, language_bcp47: cstring) -> bool ---
|
||||||
|
|
||||||
GetGlyphScript :: proc(ch: SDL.Uint32) -> SDL.Uint32 ---
|
GetGlyphScript :: proc(ch: u32) -> u32 ---
|
||||||
FontHasGlyph :: proc(font: ^Font, ch: SDL.Uint32) -> bool ---
|
FontHasGlyph :: proc(font: ^Font, ch: u32) -> bool ---
|
||||||
GetGlyphImage :: proc(font: ^Font, ch: SDL.Uint32, image_type: ^ImageType) -> ^SDL.Surface ---
|
GetGlyphImage :: proc(font: ^Font, ch: u32, image_type: ^ImageType) -> ^SDL.Surface ---
|
||||||
GetGlyphImageForIndex :: proc(font: ^Font, glyph_index: SDL.Uint32, image_type: ^ImageType) -> ^SDL.Surface ---
|
GetGlyphImageForIndex :: proc(font: ^Font, glyph_index: u32, image_type: ^ImageType) -> ^SDL.Surface ---
|
||||||
GetGlyphMetrics :: proc(font: ^Font, ch: SDL.Uint32, minx, maxx, miny, maxy, advance: ^c.int) -> bool ---
|
GetGlyphMetrics :: proc(font: ^Font, ch: u32, minx, maxx, miny, maxy, advance: ^c.int) -> bool ---
|
||||||
GetGlyphKerning :: proc(font: ^Font, previous_ch: SDL.Uint32, ch: SDL.Uint32, kerning: ^c.int) -> bool ---
|
GetGlyphKerning :: proc(font: ^Font, previous_ch: u32, ch: u32, kerning: ^c.int) -> bool ---
|
||||||
|
|
||||||
GetStringSize :: proc(font: ^Font, text: cstring, length: c.size_t, w, h: ^c.int) -> bool ---
|
GetStringSize :: proc(font: ^Font, text: cstring, length: c.size_t, w, h: ^c.int) -> bool ---
|
||||||
GetStringSizeWrapped :: proc(font: ^Font, text: cstring, length: c.size_t, wrap_width: c.int, w, h: ^c.int) -> bool ---
|
GetStringSizeWrapped :: proc(font: ^Font, text: cstring, length: c.size_t, wrap_width: c.int, w, h: ^c.int) -> bool ---
|
||||||
MeasureString :: proc(font: ^Font, text: cstring, length: c.size_t, max_width: c.int, measured_width: ^c.int, measured_length: ^c.size_t) -> bool ---
|
MeasureString :: proc(font: ^Font, text: cstring, length: c.size_t, max_width: c.int, measured_width: ^c.int, measured_length: ^c.size_t) -> bool ---
|
||||||
|
|
||||||
RenderText_Solid :: proc(font: ^Font, text: cstring, length: c.size_t, fg: SDL.Color) -> ^SDL.Surface ---
|
RenderText_Solid :: proc(font: ^Font, text: cstring, length: c.size_t, fg: SDL.Color) -> ^SDL.Surface ---
|
||||||
RenderText_Solid_Wrapped :: proc(font: ^Font, text: cstring, length: c.size_t, fg: SDL.Color, wrap_Length: c.int) -> ^SDL.Surface ---
|
RenderText_Solid_Wrapped :: proc(font: ^Font, text: cstring, length: c.size_t, fg: SDL.Color, wrap_Length: c.int) -> ^SDL.Surface ---
|
||||||
RenderGylph_Solid :: proc(font: ^Font, ch: SDL.Uint32, fg: SDL.Color) -> ^SDL.Surface ---
|
RenderGylph_Solid :: proc(font: ^Font, ch: u32, fg: SDL.Color) -> ^SDL.Surface ---
|
||||||
RenderText_Shaded :: proc(font: ^Font, text: cstring, length: c.size_t, fg, bg: SDL.Color) -> ^SDL.Surface ---
|
RenderText_Shaded :: proc(font: ^Font, text: cstring, length: c.size_t, fg, bg: SDL.Color) -> ^SDL.Surface ---
|
||||||
RenderText_Shaded_Wrapped :: proc(font: ^Font, text: cstring, length: c.size_t, fg, bg: SDL.Color, wrap_width: c.int) -> ^SDL.Surface ---
|
RenderText_Shaded_Wrapped :: proc(font: ^Font, text: cstring, length: c.size_t, fg, bg: SDL.Color, wrap_width: c.int) -> ^SDL.Surface ---
|
||||||
RenderGlyph_Shaded :: proc(font: ^Font, ch: SDL.Uint32, fg, bg: SDL.Color) -> ^SDL.Surface ---
|
RenderGlyph_Shaded :: proc(font: ^Font, ch: u32, fg, bg: SDL.Color) -> ^SDL.Surface ---
|
||||||
RenderText_Blended :: proc(font: ^Font, text: cstring, length: c.size_t, fg: SDL.Color) -> ^SDL.Surface ---
|
RenderText_Blended :: proc(font: ^Font, text: cstring, length: c.size_t, fg: SDL.Color) -> ^SDL.Surface ---
|
||||||
RnederText_Blended_Wrapped :: proc(font: ^Font, text: cstring, length: c.size_t, fg: SDL.Color, wrap_width: c.int) -> ^SDL.Surface ---
|
RnederText_Blended_Wrapped :: proc(font: ^Font, text: cstring, length: c.size_t, fg: SDL.Color, wrap_width: c.int) -> ^SDL.Surface ---
|
||||||
RenderGlyph_Blended :: proc(font: ^Font, ch: SDL.Uint32, fg: SDL.Color) -> ^SDL.Surface ---
|
RenderGlyph_Blended :: proc(font: ^Font, ch: u32, fg: SDL.Color) -> ^SDL.Surface ---
|
||||||
RenderText_LCD :: proc(font: ^Font, text: cstring, length: c.size_t, fg, bg: SDL.Color) -> ^SDL.Surface ---
|
RenderText_LCD :: proc(font: ^Font, text: cstring, length: c.size_t, fg, bg: SDL.Color) -> ^SDL.Surface ---
|
||||||
RenderText_LCD_Wrapped :: proc(font: ^Font, text: cstring, length: c.size_t, fg, bg: SDL.Color, wrap_width: c.int) -> ^SDL.Surface ---
|
RenderText_LCD_Wrapped :: proc(font: ^Font, text: cstring, length: c.size_t, fg, bg: SDL.Color, wrap_width: c.int) -> ^SDL.Surface ---
|
||||||
RenderGlyph_LCD :: proc(font: ^Font, ch: SDL.Uint32, fg, bg: SDL.Color) -> ^SDL.Surface ---
|
RenderGlyph_LCD :: proc(font: ^Font, ch: u32, fg, bg: SDL.Color) -> ^SDL.Surface ---
|
||||||
|
|
||||||
CreateSurfaceTextEngine :: proc() -> ^TextEngine ---
|
CreateSurfaceTextEngine :: proc() -> ^TextEngine ---
|
||||||
DrawSurfaceText :: proc(text: ^Text, x, y: int, surface: ^SDL.Surface) -> bool ---
|
DrawSurfaceText :: proc(text: ^Text, x, y: c.int, surface: ^SDL.Surface) -> bool ---
|
||||||
DestroySurfaceTextEngine :: proc(engine: ^TextEngine) ---
|
DestroySurfaceTextEngine :: proc(engine: ^TextEngine) ---
|
||||||
|
|
||||||
CreateRendererTextEngine :: proc(renderer: ^SDL.Renderer) -> ^TextEngine ---
|
CreateRendererTextEngine :: proc(renderer: ^SDL.Renderer) -> ^TextEngine ---
|
||||||
CreateRendererTextEngineWithProperties :: proc(props: SDL.PropertiesID) -> ^TextEngine ---
|
CreateRendererTextEngineWithProperties :: proc(props: SDL.PropertiesID) -> ^TextEngine ---
|
||||||
DrawRendererText :: proc(text: ^Text, x, y: f32) -> bool ---
|
DrawRendererText :: proc(text: ^Text, x, y: f32) -> bool ---
|
||||||
DestroyRendererTextEngine :: proc(engine: ^TextEngine) ---
|
DestroyRendererTextEngine :: proc(engine: ^TextEngine) ---
|
||||||
|
|
||||||
CreateGPUTextEngine :: proc(device: ^SDL.GPUDevice) -> ^TextEngine ---
|
CreateGPUTextEngine :: proc(device: ^SDL.GPUDevice) -> ^TextEngine ---
|
||||||
CreateGPUTextEngineWithProperties :: proc(props: SDL.PropertiesID) -> ^TextEngine ---
|
CreateGPUTextEngineWithProperties :: proc(props: SDL.PropertiesID) -> ^TextEngine ---
|
||||||
GetGPUTextDrawData :: proc(text: ^Text) -> ^GPUAtlasDrawSequence ---
|
GetGPUTextDrawData :: proc(text: ^Text) -> ^GPUAtlasDrawSequence ---
|
||||||
DestroyGPUTextEngine :: proc(engine: ^TextEngine) ---
|
DestroyGPUTextEngine :: proc(engine: ^TextEngine) ---
|
||||||
SetGPUTextEngineWinding :: proc(engine: ^TextEngine, winding: GPUTextEngineWinding) ---
|
SetGPUTextEngineWinding :: proc(engine: ^TextEngine, winding: GPUTextEngineWinding) ---
|
||||||
GetGPUTextEngineWinding :: proc(#by_ptr engine: TextEngine) -> GPUTextEngineWinding ---
|
GetGPUTextEngineWinding :: proc(#by_ptr engine: TextEngine) -> GPUTextEngineWinding ---
|
||||||
|
|
||||||
CreateText :: proc(engine: ^TextEngine, font: ^Font, text: cstring, length: c.size_t) -> ^Text ---
|
CreateText :: proc(engine: ^TextEngine, font: ^Font, text: cstring, length: c.size_t) -> ^Text ---
|
||||||
GetTextProperties :: proc(text: ^Text) -> SDL.PropertiesID ---
|
GetTextProperties :: proc(text: ^Text) -> SDL.PropertiesID ---
|
||||||
SetTextEngine :: proc(text: ^Text, engine: ^TextEngine) -> bool ---
|
SetTextEngine :: proc(text: ^Text, engine: ^TextEngine) -> bool ---
|
||||||
GetTextEngine :: proc(text: ^Text) -> ^TextEngine ---
|
GetTextEngine :: proc(text: ^Text) -> ^TextEngine ---
|
||||||
SetTextFont :: proc(text: ^Text, font: ^Font) -> bool ---
|
SetTextFont :: proc(text: ^Text, font: ^Font) -> bool ---
|
||||||
GetTextFont :: proc(text: ^Text) -> ^Font ---
|
GetTextFont :: proc(text: ^Text) -> ^Font ---
|
||||||
SetTextDirection :: proc(text: ^Text, direction: Direction) -> bool ---
|
SetTextDirection :: proc(text: ^Text, direction: Direction) -> bool ---
|
||||||
GetTextDirection :: proc(text: ^Text) -> Direction ---
|
GetTextDirection :: proc(text: ^Text) -> Direction ---
|
||||||
SetTextScript :: proc(text: ^Text, script: SDL.Uint32) -> bool ---
|
SetTextScript :: proc(text: ^Text, script: u32) -> bool ---
|
||||||
GetTextScript :: proc(text: ^Text) -> SDL.Uint32 ---
|
GetTextScript :: proc(text: ^Text) -> u32 ---
|
||||||
SetTextColor :: proc(text: ^Text, r, g, b, a: SDL.Uint8) -> bool ---
|
SetTextColor :: proc(text: ^Text, r, g, b, a: u8) -> bool ---
|
||||||
SetTextColorFloat :: proc(text: ^Text, r, g, b, a: f32) -> bool ---
|
SetTextColorFloat :: proc(text: ^Text, r, g, b, a: f32) -> bool ---
|
||||||
GetTextColor :: proc(text: ^Text, r, g, b, a: ^SDL.Uint8) -> bool ---
|
GetTextColor :: proc(text: ^Text, r, g, b, a: ^u8) -> bool ---
|
||||||
GetTextColorFloat :: proc(text: ^Text, r, g, b, a: ^f32) -> bool ---
|
GetTextColorFloat :: proc(text: ^Text, r, g, b, a: ^f32) -> bool ---
|
||||||
SetTextPosition :: proc(text: ^Text, x, y: c.int) -> bool ---
|
SetTextPosition :: proc(text: ^Text, x, y: c.int) -> bool ---
|
||||||
GetTextPosition :: proc(text: ^Text, x, y: ^c.int) -> bool ---
|
GetTextPosition :: proc(text: ^Text, x, y: ^c.int) -> bool ---
|
||||||
SetTextWrapWidth :: proc(text: ^Text, wrap_width: c.int) -> bool ---
|
SetTextWrapWidth :: proc(text: ^Text, wrap_width: c.int) -> bool ---
|
||||||
GetTextWrapWidth :: proc(text: ^Text, wrap_width: ^c.int) -> bool ---
|
GetTextWrapWidth :: proc(text: ^Text, wrap_width: ^c.int) -> bool ---
|
||||||
SetTextWrapWhitespaceVisible :: proc(text: ^Text, visible: bool) -> bool ---
|
SetTextWrapWhitespaceVisible :: proc(text: ^Text, visible: bool) -> bool ---
|
||||||
TextWrapWhitespaceVisible :: proc(text: ^Text) -> bool ---
|
TextWrapWhitespaceVisible :: proc(text: ^Text) -> bool ---
|
||||||
|
|
||||||
SetTextString :: proc(text: ^Text, string: cstring, length: c.size_t) -> bool ---
|
SetTextString :: proc(text: ^Text, string: cstring, length: c.size_t) -> bool ---
|
||||||
InsertTextString :: proc(text: ^Text, offset: c.int, string: cstring, length: c.size_t) -> bool ---
|
InsertTextString :: proc(text: ^Text, offset: c.int, string: cstring, length: c.size_t) -> bool ---
|
||||||
AppendTextString :: proc(text: ^Text, string: cstring, length: c.size_t) -> bool ---
|
AppendTextString :: proc(text: ^Text, string: cstring, length: c.size_t) -> bool ---
|
||||||
DeleteTextString :: proc(text: ^Text, offset, length: c.int) -> bool ---
|
DeleteTextString :: proc(text: ^Text, offset, length: c.int) -> bool ---
|
||||||
|
|
||||||
GetTextSize :: proc(text: ^Text, w, h: ^c.int) -> bool ---
|
GetTextSize :: proc(text: ^Text, w, h: ^c.int) -> bool ---
|
||||||
|
|
||||||
GetTextSubString :: proc(text: ^Text, offset: c.int, substring: ^SubString) -> bool ---
|
GetTextSubString :: proc(text: ^Text, offset: c.int, substring: ^SubString) -> bool ---
|
||||||
GetTextSubStringForLine :: proc(text: ^Text, line: c.int, substring: ^SubString) -> bool ---
|
GetTextSubStringForLine :: proc(text: ^Text, line: c.int, substring: ^SubString) -> bool ---
|
||||||
GetTextSubStringsForRange :: proc(text: ^Text, offset, length: c.int, count: ^c.int) -> [^]^SubString ---
|
GetTextSubStringsForRange :: proc(text: ^Text, offset, length: c.int, count: ^c.int) -> [^]^SubString ---
|
||||||
GetTextSubStringForPoint :: proc(text: ^Text, x, y: c.int, substring: ^SubString) -> bool ---
|
GetTextSubStringForPoint :: proc(text: ^Text, x, y: c.int, substring: ^SubString) -> bool ---
|
||||||
GetPreviousTextSubString :: proc(text: ^Text, #by_ptr substring: SubString, previous: ^SubString) -> bool ---
|
GetPreviousTextSubString :: proc(text: ^Text, #by_ptr substring: SubString, previous: ^SubString) -> bool ---
|
||||||
GetNextTextSubString :: proc(text: ^Text, #by_ptr substring: SubString, next: ^SubString) -> bool ---
|
GetNextTextSubString :: proc(text: ^Text, #by_ptr substring: SubString, next: ^SubString) -> bool ---
|
||||||
|
|
||||||
UpdateText :: proc(text: ^Text) -> bool ---
|
UpdateText :: proc(text: ^Text) -> bool ---
|
||||||
DestroyText :: proc(text: ^Text) ---
|
DestroyText :: proc(text: ^Text) ---
|
||||||
CloseFont :: proc(font: ^Font) ---
|
CloseFont :: proc(font: ^Font) ---
|
||||||
Quit :: proc() ---
|
Quit :: proc() ---
|
||||||
WasInit :: proc() -> c.int ---
|
WasInit :: proc() -> c.int ---
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user