Plutonium framework API  0.3
Simple UI framework for libnx and SDL2
ttf_SDL_ttf.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

#define SDL_TTF_MAJOR_VERSION   2
#define SDL_TTF_MINOR_VERSION   0
#define SDL_TTF_PATCHLEVEL   12
#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_MINOR_VERSION
Definition: ttf_SDL_ttf.h:43
#define SDL_TTF_MAJOR_VERSION
Definition: ttf_SDL_ttf.h:42
#define SDL_TTF_PATCHLEVEL
Definition: ttf_SDL_ttf.h:44
#define TMP_LOG (   str)    { const char *cstr = str; svcOutputDebugString(cstr, strlen(cstr)); }
#define TTF_GetError   SDL_GetError
#define TTF_HINTING_LIGHT   1
#define TTF_HINTING_MONO   2
#define TTF_HINTING_NONE   3
#define TTF_HINTING_NORMAL   0
#define TTF_MAJOR_VERSION   SDL_TTF_MAJOR_VERSION
#define TTF_MINOR_VERSION   SDL_TTF_MINOR_VERSION
#define TTF_PATCHLEVEL   SDL_TTF_PATCHLEVEL
#define TTF_RenderText (   font,
  text,
  fg,
  bg 
)    TTF_RenderText_Shaded(font, text, fg, bg)
#define TTF_RenderUNICODE (   font,
  text,
  fg,
  bg 
)    TTF_RenderUNICODE_Shaded(font, text, fg, bg)
#define TTF_RenderUTF8 (   font,
  text,
  fg,
  bg 
)    TTF_RenderUTF8_Shaded(font, text, fg, bg)
#define TTF_SetError   SDL_SetError
#define TTF_STYLE_BOLD   0x01
#define TTF_STYLE_ITALIC   0x02
#define TTF_STYLE_NORMAL   0x00
#define TTF_STYLE_STRIKETHROUGH   0x08
#define TTF_STYLE_UNDERLINE   0x04
#define TTF_VERSION (   X)    SDL_TTF_VERSION(X)
#define UNICODE_BOM_NATIVE   0xFEFF
#define UNICODE_BOM_SWAPPED   0xFFFE

Typedef Documentation

typedef struct _TTF_Font TTF_Font

Function Documentation

DECLSPEC void SDLCALL TTF_ByteSwappedUNICODE ( int  swapped)
DECLSPEC void SDLCALL TTF_CloseFont ( TTF_Font font)
TTF_Font* TTF_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 
)
DECLSPEC int SDLCALL TTF_FontAscent ( const TTF_Font font)
DECLSPEC int SDLCALL TTF_FontDescent ( const TTF_Font font)
DECLSPEC char* SDLCALL TTF_FontFaceFamilyName ( const TTF_Font font)
DECLSPEC int SDLCALL TTF_FontFaceIsFixedWidth ( const TTF_Font font)
DECLSPEC long SDLCALL TTF_FontFaces ( const TTF_Font font)
DECLSPEC char* SDLCALL TTF_FontFaceStyleName ( const TTF_Font font)
DECLSPEC int SDLCALL TTF_FontHeight ( const TTF_Font font)
DECLSPEC int SDLCALL TTF_FontLineSkip ( const TTF_Font font)
DECLSPEC int SDLCALL TTF_GetFontHinting ( const TTF_Font font)
DECLSPEC int SDLCALL TTF_GetFontKerning ( const TTF_Font font)
DECLSPEC int TTF_GetFontKerningSize ( TTF_Font font,
int  prev_index,
int  index 
)
DECLSPEC int SDLCALL TTF_GetFontOutline ( const TTF_Font font)
DECLSPEC int SDLCALL TTF_GetFontStyle ( 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_Init ( void  )
DECLSPEC const SDL_version* SDLCALL TTF_Linked_Version ( 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_OpenFontIndexRW ( SDL_RWops *  src,
int  freesrc,
int  ptsize,
long  index 
)
DECLSPEC TTF_Font* SDLCALL TTF_OpenFontRW ( SDL_RWops *  src,
int  freesrc,
int  ptsize 
)
DECLSPEC void SDLCALL TTF_Quit ( void  )
DECLSPEC SDL_Surface* SDLCALL TTF_RenderGlyph_Blended ( TTF_Font font,
Uint16  ch,
SDL_Color  fg 
)
DECLSPEC SDL_Surface* SDLCALL TTF_RenderGlyph_Shaded ( TTF_Font font,
Uint16  ch,
SDL_Color  fg,
SDL_Color  bg 
)
DECLSPEC SDL_Surface* SDLCALL TTF_RenderGlyph_Solid ( TTF_Font font,
Uint16  ch,
SDL_Color  fg 
)
DECLSPEC SDL_Surface* SDLCALL TTF_RenderText_Blended ( TTF_Font font,
const char *  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_RenderText_Shaded ( TTF_Font font,
const char *  text,
SDL_Color  fg,
SDL_Color  bg 
)
DECLSPEC SDL_Surface* SDLCALL TTF_RenderText_Solid ( 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_RenderUNICODE_Blended_Wrapped ( TTF_Font font,
const Uint16 *  text,
SDL_Color  fg,
Uint32  wrapLength 
)
DECLSPEC SDL_Surface* SDLCALL TTF_RenderUNICODE_Shaded ( TTF_Font font,
const Uint16 *  text,
SDL_Color  fg,
SDL_Color  bg 
)
DECLSPEC SDL_Surface* SDLCALL TTF_RenderUNICODE_Solid ( TTF_Font font,
const Uint16 *  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_RenderUTF8_Blended_Wrapped ( TTF_Font font,
const char *  text,
SDL_Color  fg,
Uint32  wrapLength 
)
DECLSPEC SDL_Surface* SDLCALL TTF_RenderUTF8_Shaded ( TTF_Font font,
const char *  text,
SDL_Color  fg,
SDL_Color  bg 
)
DECLSPEC SDL_Surface* SDLCALL TTF_RenderUTF8_Solid ( TTF_Font font,
const char *  text,
SDL_Color  fg 
)
DECLSPEC void SDLCALL TTF_SetFontHinting ( TTF_Font font,
int  hinting 
)
DECLSPEC void SDLCALL TTF_SetFontKerning ( TTF_Font font,
int  allowed 
)
DECLSPEC void SDLCALL TTF_SetFontOutline ( TTF_Font font,
int  outline 
)
DECLSPEC void SDLCALL TTF_SetFontStyle ( TTF_Font font,
int  style 
)
DECLSPEC int SDLCALL TTF_SizeText ( 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 int SDLCALL TTF_SizeUTF8 ( TTF_Font font,
const char *  text,
int *  w,
int *  h 
)
DECLSPEC int SDLCALL TTF_WasInit ( void  )