Plutonium framework API 0.3.0
UI framework libraries for libnx
Loading...
Searching...
No Matches
sdl2_CustomTtf.h File Reference
#include <SDL2/SDL.h>
#include <SDL2/begin_code.h>
#include <switch.h>
#include <SDL2/close_code.h>

Go to the source code of this file.

Macros

#define SDL_TTF_MAJOR_VERSION   2
 
#define SDL_TTF_MINOR_VERSION   0
 
#define SDL_TTF_PATCHLEVEL   12
 
#define SDL_TTF_VERSION(X)
 
#define TTF_MAJOR_VERSION   SDL_TTF_MAJOR_VERSION
 
#define TTF_MINOR_VERSION   SDL_TTF_MINOR_VERSION
 
#define TTF_PATCHLEVEL   SDL_TTF_PATCHLEVEL
 
#define TTF_VERSION(X)   SDL_TTF_VERSION(X)
 
#define UNICODE_BOM_NATIVE   0xFEFF
 
#define UNICODE_BOM_SWAPPED   0xFFFE
 
#define TTF_STYLE_NORMAL   0x00
 
#define TTF_STYLE_BOLD   0x01
 
#define TTF_STYLE_ITALIC   0x02
 
#define TTF_STYLE_UNDERLINE   0x04
 
#define TTF_STYLE_STRIKETHROUGH   0x08
 
#define TTF_HINTING_NORMAL   0
 
#define TTF_HINTING_LIGHT   1
 
#define TTF_HINTING_MONO   2
 
#define TTF_HINTING_NONE   3
 
#define TTF_RenderText(font, text, fg, bg)    TTF_RenderText_Shaded(font, text, fg, bg)
 
#define TTF_RenderUTF8(font, text, fg, bg)    TTF_RenderUTF8_Shaded(font, text, fg, bg)
 
#define TTF_RenderUNICODE(font, text, fg, bg)    TTF_RenderUNICODE_Shaded(font, text, fg, bg)
 
#define TTF_SetError   SDL_SetError
 
#define TTF_GetError   SDL_GetError
 
#define TMP_LOG(str)   { const char *cstr = str; svcOutputDebugString(cstr, strlen(cstr)); }
 

Typedefs

typedef struct _TTF_Font TTF_Font
 

Functions

DECLSPEC const SDL_version *SDLCALL TTF_Linked_Version (void)
 
DECLSPEC void SDLCALL TTF_ByteSwappedUNICODE (int swapped)
 
DECLSPEC int SDLCALL TTF_Init (void)
 
DECLSPEC TTF_Font *SDLCALL TTF_OpenFont (const char *file, int ptsize)
 
DECLSPEC TTF_Font *SDLCALL TTF_OpenFontIndex (const char *file, int ptsize, long index)
 
DECLSPEC TTF_Font *SDLCALL TTF_OpenFontRW (SDL_RWops *src, int freesrc, int ptsize)
 
DECLSPEC TTF_Font *SDLCALL TTF_OpenFontIndexRW (SDL_RWops *src, int freesrc, int ptsize, long index)
 
DECLSPEC int SDLCALL TTF_GetFontStyle (const TTF_Font *font)
 
DECLSPEC void SDLCALL TTF_SetFontStyle (TTF_Font *font, int style)
 
DECLSPEC int SDLCALL TTF_GetFontOutline (const TTF_Font *font)
 
DECLSPEC void SDLCALL TTF_SetFontOutline (TTF_Font *font, int outline)
 
DECLSPEC int SDLCALL TTF_GetFontHinting (const TTF_Font *font)
 
DECLSPEC void SDLCALL TTF_SetFontHinting (TTF_Font *font, int hinting)
 
DECLSPEC int SDLCALL TTF_FontHeight (const TTF_Font *font)
 
DECLSPEC int SDLCALL TTF_FontAscent (const TTF_Font *font)
 
DECLSPEC int SDLCALL TTF_FontDescent (const TTF_Font *font)
 
DECLSPEC int SDLCALL TTF_FontLineSkip (const TTF_Font *font)
 
DECLSPEC int SDLCALL TTF_GetFontKerning (const TTF_Font *font)
 
DECLSPEC void SDLCALL TTF_SetFontKerning (TTF_Font *font, int allowed)
 
DECLSPEC long SDLCALL TTF_FontFaces (const TTF_Font *font)
 
DECLSPEC int SDLCALL TTF_FontFaceIsFixedWidth (const TTF_Font *font)
 
DECLSPEC char *SDLCALL TTF_FontFaceFamilyName (const TTF_Font *font)
 
DECLSPEC char *SDLCALL TTF_FontFaceStyleName (const TTF_Font *font)
 
DECLSPEC int SDLCALL TTF_GlyphIsProvided (const TTF_Font *font, Uint16 ch)
 
DECLSPEC int SDLCALL TTF_GlyphMetrics (TTF_Font *font, Uint16 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance)
 
DECLSPEC int SDLCALL TTF_SizeText (TTF_Font *font, const char *text, int *w, int *h)
 
DECLSPEC int SDLCALL TTF_SizeUTF8 (TTF_Font *font, const char *text, int *w, int *h)
 
DECLSPEC int SDLCALL TTF_SizeUNICODE (TTF_Font *font, const Uint16 *text, int *w, int *h)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Solid (TTF_Font *font, const char *text, SDL_Color fg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Solid (TTF_Font *font, const char *text, SDL_Color fg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Solid (TTF_Font *font, const Uint16 *text, SDL_Color fg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph_Solid (TTF_Font *font, Uint16 ch, SDL_Color fg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Shaded (TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Shaded (TTF_Font *font, const char *text, SDL_Color fg, SDL_Color bg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Shaded (TTF_Font *font, const Uint16 *text, SDL_Color fg, SDL_Color bg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph_Shaded (TTF_Font *font, Uint16 ch, SDL_Color fg, SDL_Color bg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Blended (TTF_Font *font, const char *text, SDL_Color fg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Blended (TTF_Font *font, const char *text, SDL_Color fg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Blended (TTF_Font *font, const Uint16 *text, SDL_Color fg)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Blended_Wrapped (TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Blended_Wrapped (TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Blended_Wrapped (TTF_Font *font, const Uint16 *text, SDL_Color fg, Uint32 wrapLength)
 
DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph_Blended (TTF_Font *font, Uint16 ch, SDL_Color fg)
 
DECLSPEC void SDLCALL TTF_CloseFont (TTF_Font *font)
 
DECLSPEC void SDLCALL TTF_Quit (void)
 
DECLSPEC int SDLCALL TTF_WasInit (void)
 
DECLSPEC int TTF_GetFontKerningSize (TTF_Font *font, int prev_index, int index)
 
TTF_FontTTF_CppWrap_FindValidFont (TTF_Font *font, Uint16 ch)
 
void * TTF_CppWrap_GetCppPtrRef (TTF_Font *font)
 
void TTF_CppWrap_SetCppPtrRef (TTF_Font *font, void *cpp_ptr_ref)
 

Macro Definition Documentation

◆ SDL_TTF_MAJOR_VERSION

#define SDL_TTF_MAJOR_VERSION   2

◆ SDL_TTF_MINOR_VERSION

#define SDL_TTF_MINOR_VERSION   0

◆ SDL_TTF_PATCHLEVEL

#define SDL_TTF_PATCHLEVEL   12

◆ SDL_TTF_VERSION

#define SDL_TTF_VERSION ( X)
Value:
{ \
(X)->major = SDL_TTF_MAJOR_VERSION; \
(X)->minor = SDL_TTF_MINOR_VERSION; \
(X)->patch = SDL_TTF_PATCHLEVEL; \
}
#define SDL_TTF_PATCHLEVEL
Definition sdl2_CustomTtf.h:44
#define SDL_TTF_MAJOR_VERSION
Definition sdl2_CustomTtf.h:42
#define SDL_TTF_MINOR_VERSION
Definition sdl2_CustomTtf.h:43

◆ TMP_LOG

#define TMP_LOG ( str)    { const char *cstr = str; svcOutputDebugString(cstr, strlen(cstr)); }

◆ TTF_GetError

#define TTF_GetError   SDL_GetError

◆ TTF_HINTING_LIGHT

#define TTF_HINTING_LIGHT   1

◆ TTF_HINTING_MONO

#define TTF_HINTING_MONO   2

◆ TTF_HINTING_NONE

#define TTF_HINTING_NONE   3

◆ TTF_HINTING_NORMAL

#define TTF_HINTING_NORMAL   0

◆ TTF_MAJOR_VERSION

#define TTF_MAJOR_VERSION   SDL_TTF_MAJOR_VERSION

◆ TTF_MINOR_VERSION

#define TTF_MINOR_VERSION   SDL_TTF_MINOR_VERSION

◆ TTF_PATCHLEVEL

#define TTF_PATCHLEVEL   SDL_TTF_PATCHLEVEL

◆ TTF_RenderText

#define TTF_RenderText ( font,
text,
fg,
bg )    TTF_RenderText_Shaded(font, text, fg, bg)

◆ TTF_RenderUNICODE

#define TTF_RenderUNICODE ( font,
text,
fg,
bg )    TTF_RenderUNICODE_Shaded(font, text, fg, bg)

◆ TTF_RenderUTF8

#define TTF_RenderUTF8 ( font,
text,
fg,
bg )    TTF_RenderUTF8_Shaded(font, text, fg, bg)

◆ TTF_SetError

#define TTF_SetError   SDL_SetError

◆ TTF_STYLE_BOLD

#define TTF_STYLE_BOLD   0x01

◆ TTF_STYLE_ITALIC

#define TTF_STYLE_ITALIC   0x02

◆ TTF_STYLE_NORMAL

#define TTF_STYLE_NORMAL   0x00

◆ TTF_STYLE_STRIKETHROUGH

#define TTF_STYLE_STRIKETHROUGH   0x08

◆ TTF_STYLE_UNDERLINE

#define TTF_STYLE_UNDERLINE   0x04

◆ TTF_VERSION

#define TTF_VERSION ( X)    SDL_TTF_VERSION(X)

◆ UNICODE_BOM_NATIVE

#define UNICODE_BOM_NATIVE   0xFEFF

◆ UNICODE_BOM_SWAPPED

#define UNICODE_BOM_SWAPPED   0xFFFE

Typedef Documentation

◆ TTF_Font

typedef struct _TTF_Font TTF_Font

Function Documentation

◆ TTF_ByteSwappedUNICODE()

DECLSPEC void SDLCALL TTF_ByteSwappedUNICODE ( int swapped)
extern

◆ TTF_CloseFont()

DECLSPEC void SDLCALL TTF_CloseFont ( TTF_Font * font)
extern

◆ TTF_CppWrap_FindValidFont()

TTF_Font * TTF_CppWrap_FindValidFont ( TTF_Font * font,
Uint16 ch )

◆ TTF_CppWrap_GetCppPtrRef()

void * TTF_CppWrap_GetCppPtrRef ( TTF_Font * font)

◆ TTF_CppWrap_SetCppPtrRef()

void TTF_CppWrap_SetCppPtrRef ( TTF_Font * font,
void * cpp_ptr_ref )

◆ TTF_FontAscent()

DECLSPEC int SDLCALL TTF_FontAscent ( const TTF_Font * font)
extern

◆ TTF_FontDescent()

DECLSPEC int SDLCALL TTF_FontDescent ( const TTF_Font * font)
extern

◆ TTF_FontFaceFamilyName()

DECLSPEC char *SDLCALL TTF_FontFaceFamilyName ( const TTF_Font * font)
extern

◆ TTF_FontFaceIsFixedWidth()

DECLSPEC int SDLCALL TTF_FontFaceIsFixedWidth ( const TTF_Font * font)
extern

◆ TTF_FontFaces()

DECLSPEC long SDLCALL TTF_FontFaces ( const TTF_Font * font)
extern

◆ TTF_FontFaceStyleName()

DECLSPEC char *SDLCALL TTF_FontFaceStyleName ( const TTF_Font * font)
extern

◆ TTF_FontHeight()

DECLSPEC int SDLCALL TTF_FontHeight ( const TTF_Font * font)
extern

◆ TTF_FontLineSkip()

DECLSPEC int SDLCALL TTF_FontLineSkip ( const TTF_Font * font)
extern

◆ TTF_GetFontHinting()

DECLSPEC int SDLCALL TTF_GetFontHinting ( const TTF_Font * font)
extern

◆ TTF_GetFontKerning()

DECLSPEC int SDLCALL TTF_GetFontKerning ( const TTF_Font * font)
extern

◆ TTF_GetFontKerningSize()

DECLSPEC int TTF_GetFontKerningSize ( TTF_Font * font,
int prev_index,
int index )
extern

◆ TTF_GetFontOutline()

DECLSPEC int SDLCALL TTF_GetFontOutline ( const TTF_Font * font)
extern

◆ TTF_GetFontStyle()

DECLSPEC int SDLCALL TTF_GetFontStyle ( const TTF_Font * font)
extern

◆ TTF_GlyphIsProvided()

DECLSPEC int SDLCALL TTF_GlyphIsProvided ( const TTF_Font * font,
Uint16 ch )
extern

◆ TTF_GlyphMetrics()

DECLSPEC int SDLCALL TTF_GlyphMetrics ( TTF_Font * font,
Uint16 ch,
int * minx,
int * maxx,
int * miny,
int * maxy,
int * advance )
extern

◆ TTF_Init()

DECLSPEC int SDLCALL TTF_Init ( void )
extern

◆ TTF_Linked_Version()

DECLSPEC const SDL_version *SDLCALL TTF_Linked_Version ( void )
extern

◆ TTF_OpenFont()

DECLSPEC TTF_Font *SDLCALL TTF_OpenFont ( const char * file,
int ptsize )
extern

◆ TTF_OpenFontIndex()

DECLSPEC TTF_Font *SDLCALL TTF_OpenFontIndex ( const char * file,
int ptsize,
long index )
extern

◆ TTF_OpenFontIndexRW()

DECLSPEC TTF_Font *SDLCALL TTF_OpenFontIndexRW ( SDL_RWops * src,
int freesrc,
int ptsize,
long index )
extern

◆ TTF_OpenFontRW()

DECLSPEC TTF_Font *SDLCALL TTF_OpenFontRW ( SDL_RWops * src,
int freesrc,
int ptsize )
extern

◆ TTF_Quit()

DECLSPEC void SDLCALL TTF_Quit ( void )
extern

◆ TTF_RenderGlyph_Blended()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph_Blended ( TTF_Font * font,
Uint16 ch,
SDL_Color fg )
extern

◆ TTF_RenderGlyph_Shaded()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph_Shaded ( TTF_Font * font,
Uint16 ch,
SDL_Color fg,
SDL_Color bg )
extern

◆ TTF_RenderGlyph_Solid()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderGlyph_Solid ( TTF_Font * font,
Uint16 ch,
SDL_Color fg )
extern

◆ TTF_RenderText_Blended()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Blended ( TTF_Font * font,
const char * text,
SDL_Color fg )
extern

◆ TTF_RenderText_Blended_Wrapped()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Blended_Wrapped ( TTF_Font * font,
const char * text,
SDL_Color fg,
Uint32 wrapLength )
extern

◆ TTF_RenderText_Shaded()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Shaded ( TTF_Font * font,
const char * text,
SDL_Color fg,
SDL_Color bg )
extern

◆ TTF_RenderText_Solid()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderText_Solid ( TTF_Font * font,
const char * text,
SDL_Color fg )
extern

◆ TTF_RenderUNICODE_Blended()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Blended ( TTF_Font * font,
const Uint16 * text,
SDL_Color fg )
extern

◆ TTF_RenderUNICODE_Blended_Wrapped()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Blended_Wrapped ( TTF_Font * font,
const Uint16 * text,
SDL_Color fg,
Uint32 wrapLength )
extern

◆ TTF_RenderUNICODE_Shaded()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Shaded ( TTF_Font * font,
const Uint16 * text,
SDL_Color fg,
SDL_Color bg )
extern

◆ TTF_RenderUNICODE_Solid()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderUNICODE_Solid ( TTF_Font * font,
const Uint16 * text,
SDL_Color fg )
extern

◆ TTF_RenderUTF8_Blended()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Blended ( TTF_Font * font,
const char * text,
SDL_Color fg )
extern

◆ TTF_RenderUTF8_Blended_Wrapped()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Blended_Wrapped ( TTF_Font * font,
const char * text,
SDL_Color fg,
Uint32 wrapLength )
extern

◆ TTF_RenderUTF8_Shaded()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Shaded ( TTF_Font * font,
const char * text,
SDL_Color fg,
SDL_Color bg )
extern

◆ TTF_RenderUTF8_Solid()

DECLSPEC SDL_Surface *SDLCALL TTF_RenderUTF8_Solid ( TTF_Font * font,
const char * text,
SDL_Color fg )
extern

◆ TTF_SetFontHinting()

DECLSPEC void SDLCALL TTF_SetFontHinting ( TTF_Font * font,
int hinting )
extern

◆ TTF_SetFontKerning()

DECLSPEC void SDLCALL TTF_SetFontKerning ( TTF_Font * font,
int allowed )
extern

◆ TTF_SetFontOutline()

DECLSPEC void SDLCALL TTF_SetFontOutline ( TTF_Font * font,
int outline )
extern

◆ TTF_SetFontStyle()

DECLSPEC void SDLCALL TTF_SetFontStyle ( TTF_Font * font,
int style )
extern

◆ TTF_SizeText()

DECLSPEC int SDLCALL TTF_SizeText ( TTF_Font * font,
const char * text,
int * w,
int * h )
extern

◆ TTF_SizeUNICODE()

DECLSPEC int SDLCALL TTF_SizeUNICODE ( TTF_Font * font,
const Uint16 * text,
int * w,
int * h )
extern

◆ TTF_SizeUTF8()

DECLSPEC int SDLCALL TTF_SizeUTF8 ( TTF_Font * font,
const char * text,
int * w,
int * h )
extern

◆ TTF_WasInit()

DECLSPEC int SDLCALL TTF_WasInit ( void )
extern