Add -H command-line option to generate C header file for public API, stub
[vala-lang.git] / vapi / sdl-ttf.vapi
blob39c8cdaaf0c842343d2ef5666e35e5504a639efb
1 using GLib;
2 using SDL;
4 [CCode (cheader_filename="SDL_ttf.h")]
5 namespace SDLTTF {
6         [CCode (cname="TTF_Linked_Version")]
7         public static weak Version linked();
9         [CCode (cname="TTF_ByteSwappedUNICODE")]
10         public static void byteswap_unicode(int swapped);
12         [CCode (cname="TTF_Init")]
13         public static int init();
15         [CCode (cname="TTF_WasInit")]
16         public static int get_initialized();
18         [CCode (cname="TTF_Quit")]
19         public static void quit();
21         [CCode (cname="int", cprefix="TTF_STYLE_")]
22         public enum FontStyle {
23                 NORMAL, BOLD, ITALIC, UNDERLINE
24         }// FontStyle
26         [CCode (cname="TTF_Font", free_function="TTF_CloseFont")]
27         [Compact]
28         public class Font {
29                 [CCode (cname="TTF_OpenFont")]
30                 public Font(string file, int ptsize);
32                 [CCode (cname="TTF_OpenFontIndex")]
33                 public Font.index(string file, int ptsize, long index);
35                 [CCode (cname="TTF_OpenFontRW")]
36                 public Font.RW(RWops src, int freesrc=0, int ptsize);
38                 [CCode (cname="TTF_OpenFontIndexRW")]
39                 public Font.RWindex(RWops src, int freesrc=0, int ptsize, long index);
41                 [CCode (cname="TTF_GetFontStyle")]
42                 public FontStyle get_style();
44                 [CCode (cname="TTF_SetFontStyle")]
45                 public FontStyle set_style(FontStyle style);
47                 [CCode (cname="TTF_FontHeight")]
48                 public int height();
50                 [CCode (cname="TTF_FontAscent")]
51                 public int ascent();
53                 [CCode (cname="TTF_FontDescent")]
54                 public int descent();
56                 [CCode (cname="TTF_FontLineSkip")]
57                 public int lineskip();
59                 [CCode (cname="TTF_FontFaces")]
60                 public long faces();
62                 [CCode (cname="TTF_FontFaceIsFixedWidth")]
63                 public int is_fixed_width();
65                 [CCode (cname="TTF_FontFaceFamilyName")]
66                 public string family();
68                 [CCode (cname="TTF_FontFaceStyleName")]
69                 public string style();
71                 [CCode (cname="TTF_GlyphMetrics")]
72                 public int metrics(uint16 ch, ref int minx, ref int maxx, 
73                         ref int miny, ref int maxy, ref int advance);
75                 [CCode (cname="TTF_SizeText")]
76                 public int size(string text, ref int w, ref int h);
78                 [CCode (cname="TTF_SizeUTF8")]
79                 public int size_utf8(string text, ref int w, ref int h);
81                 [CCode (cname="TTF_SizeUNICODE")]
82                 public int size_unicode([CCode (array_length = false)] uint16[] text, ref int w, ref int h);
84                 [CCode (cname="TTF_RenderText_Solid")]
85                 public Surface? render(string text, Color fg);
87                 [CCode (cname="TTF_RenderUTF8_Solid")]
88                 public Surface? render_utf8(string text, Color fg);
90                 [CCode (cname="TTF_RenderUNICODE_Solid")]
91                 public Surface? render_unicode([CCode (array_length = false)] uint16[] text, Color fg);
93                 [CCode (cname="TTF_RenderText_Shaded")]
94                 public Surface? render_shaded(string text, Color fg, Color bg);
96                 [CCode (cname="TTF_RenderUTF8_Shaded")]
97                 public Surface? render_shaded_utf8(string text, Color fg, Color bg);
99                 [CCode (cname="TTF_RenderUNICODE_Shaded")]
100                 public Surface? render_shaded_unicode([CCode (array_length = false)] uint16[] text, Color fg, Color bg);
102                 [CCode (cname="TTF_RenderText_Blended")]
103                 public Surface? render_blended(string text, Color fg);
105                 [CCode (cname="TTF_RenderUTF8_Blended")]
106                 public Surface? render_blended_utf8(string text, Color fg);
108                 [CCode (cname="TTF_RenderUNICODE_Blended")]
109                 public Surface? render_blended_unicode([CCode (array_length = false)] uint16[] text, Color fg);
110         }// Font
111 }// SDLTTF