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