3 Boost Software License - Version 1.0 - August 17th, 2003
5 Permission is hereby granted, free of charge, to any person or organization
6 obtaining a copy of the software and accompanying documentation covered by
7 this license (the "Software") to use, reproduce, display, distribute,
8 execute, and transmit the Software, and to prepare derivative works of the
9 Software, and to permit third-parties to whom the Software is furnished to
10 do so, all subject to the following:
12 The copyright notices in the Software and this entire statement, including
13 the above license grant, this restriction and the following disclaimer,
14 must be included in all copies of the Software, in whole or in part, and
15 all derivative works of the Software, unless such copies or derivative
16 works are solely in the form of machine-executable object code generated by
17 a source language processor.
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
28 module iv
.sdl2
.ttf
/*is aliced*/;
29 pragma(lib
, "SDL2_ttf");
31 import core
.stdc
.config
; // c_long
35 SDL_TTF_MAJOR_VERSION
= 2,
36 SDL_TTF_MINOR_VERSION
= 0,
37 SDL_TTF_PATCHLEVEL
= 12,
39 alias TTF_MAJOR_VERSION
= SDL_TTF_MAJOR_VERSION
;
40 alias TTF_MINOR_VERSION
= SDL_TTF_MINOR_VERSION
;
41 alias TTF_PATCHLEVEL
= SDL_TTF_PATCHLEVEL
;
44 UNICODE_BOM_NATIVE
= 0xFEFF,
45 UNICODE_BOM_SWAPPED
= 0xFFFE,
46 TTF_STYLE_NORMAL
= 0x00,
47 TTF_STYLE_BOLD
= 0x01,
48 TTF_STYLE_ITALIC
= 0x02,
49 TTF_STYLE_UNDERLINE
= 0x04,
50 TTF_STYLE_STRIKETHROUGH
= 0x08,
54 TTF_HINTING_NORMAL
= 0,
55 TTF_HINTING_LIGHT
= 1,
60 alias TTF_SetError
= SDL_SetError
;
61 alias TTF_GetError
= SDL_GetError
;
65 void SDL_TTF_VERSION() (ref SDL_version x
) {
66 x
.major
= SDL_TTF_MAJOR_VERSION
;
67 x
.minor
= SDL_TTF_MINOR_VERSION
;
68 x
.patch
= SDL_TTF_PATCHLEVEL
;
71 void TTF_VERSION() (ref SDL_version x
) { return SDL_TTF_VERSION(x
); }
73 extern (C
) nothrow @nogc {
74 SDL_version
* TTF_Linked_Version ();
75 void TTF_ByteSwappedUNICODE (int);
77 TTF_Font
* TTF_OpenFont (const(char)*, int);
78 TTF_Font
* TTF_OpenFontIndex (const(char)*, int, c_long
);
79 TTF_Font
* TTF_OpenFontRW (SDL_RWops
*, int, int);
80 TTF_Font
* TTF_OpenFontIndexRW (SDL_RWops
*, int, int, c_long
);
81 int TTF_GetFontStyle (const(TTF_Font
)*);
82 void TTF_SetFontStyle (const(TTF_Font
)*, int style
);
83 int TTF_GetFontOutline (const(TTF_Font
)*);
84 void TTF_SetFontOutline (TTF_Font
*, int);
85 int TTF_GetFontHinting (const(TTF_Font
)*);
86 void TTF_SetFontHinting (TTF_Font
*, int);
87 int TTF_FontHeight (const(TTF_Font
)*);
88 int TTF_FontAscent (const(TTF_Font
)*);
89 int TTF_FontDescent (const(TTF_Font
)*);
90 int TTF_FontLineSkip (const(TTF_Font
)*);
91 int TTF_GetFontKerning (const(TTF_Font
)*);
92 void TTF_SetFontKerning (TTF_Font
*, int);
93 int TTF_FontFaces (const(TTF_Font
)*);
94 int TTF_FontFaceIsFixedWidth (const(TTF_Font
)*);
95 char* TTF_FontFaceFamilyName (const(TTF_Font
)*);
96 char* TTF_FontFaceStyleName (const(TTF_Font
)*);
97 int TTF_GlyphIsProvided (const(TTF_Font
)*, ushort);
98 int TTF_GlyphMetrics (TTF_Font
*, ushort, int*, int*, int*, int*, int*);
99 int TTF_SizeText (TTF_Font
*, const(char)*, int*, int*);
100 int TTF_SizeUTF8 (TTF_Font
*, const(char)*, int*, int*);
101 int TTF_SizeUNICODE (TTF_Font
*, ushort*, int*, int*);
102 SDL_Surface
* TTF_RenderText_Solid (TTF_Font
*, const(char)*, SDL_Color
);
103 SDL_Surface
* TTF_RenderUTF8_Solid (TTF_Font
*, const(char)*, SDL_Color
);
104 SDL_Surface
* TTF_RenderUNICODE_Solid (TTF_Font
*, const(ushort)*, SDL_Color
);
105 SDL_Surface
* TTF_RenderGlyph_Solid (TTF_Font
*, ushort, SDL_Color
);
106 SDL_Surface
* TTF_RenderText_Shaded (TTF_Font
*, const(char)*, SDL_Color
, SDL_Color
);
107 SDL_Surface
* TTF_RenderUTF8_Shaded (TTF_Font
*, const(char)*, SDL_Color
, SDL_Color
);
108 SDL_Surface
* TTF_RenderUNICODE_Shaded (TTF_Font
*, const(ushort)*, SDL_Color
, SDL_Color
);
109 SDL_Surface
* TTF_RenderGlyph_Shaded (TTF_Font
*, ushort, SDL_Color
, SDL_Color
);
110 SDL_Surface
* TTF_RenderText_Blended (TTF_Font
*, const(char)*, SDL_Color
);
111 SDL_Surface
* TTF_RenderUTF8_Blended (TTF_Font
*, const(char)*, SDL_Color
);
112 SDL_Surface
* TTF_RenderUNICODE_Blended (TTF_Font
*, const(ushort)*, SDL_Color
);
113 SDL_Surface
* TTF_RenderText_Blended_Wrapped (TTF_Font
*, const(char)*, SDL_Color
, uint);
114 SDL_Surface
* TTF_RenderUTF8_Blended_Wrapped (TTF_Font
*, const(char)*, SDL_Color
, uint);
115 SDL_Surface
* TTF_RenderUNICODE_Blended_Wrapped (TTF_Font
*, const(ushort)*, SDL_Color
, uint);
116 SDL_Surface
* TTF_RenderGlyph_Blended (TTF_Font
*, ushort, SDL_Color
);
117 void TTF_CloseFont (TTF_Font
*);
120 int TTF_GetFontKerningSize (TTF_Font
*, int, int);
123 alias TTF_RenderText
= TTF_RenderText_Shaded
;
124 alias TTF_RenderUTF8
= TTF_RenderUTF8_Shaded
;
125 alias TTF_RenderUNICODE
= TTF_RenderUNICODE_Shaded
;