2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
27 * outFile = PgFontFace
28 * strct = PangoFontFace
47 * - pango.PgFontDescription
48 * - pango.PgFontMetrics
49 * - pango.PgFontFamily
51 * - pango.PgFontsetSimple
53 * - pango.PgAttributeList
57 * - pango.PgLayoutIter
58 * - pango.PgScriptIter
61 * - PangoAttribute* -> PgAttribute
62 * - PangoAttributeList* -> PgAttributeList
63 * - PangoContext* -> PgContext
64 * - PangoFontDescription* -> PgFontDescription
65 * - PangoFontFamily* -> PgFontFamily
66 * - PangoFontMap* -> PgFontMap
67 * - PangoFontMetrics* -> PgFontMetrics
68 * - PangoFontsetSimple* -> PgFontsetSimple
69 * - PangoItem* -> PgItem
70 * - PangoLanguage* -> PgLanguage
71 * - PangoLayout* -> PgLayout
72 * - PangoLayoutIter* -> PgLayoutIter
73 * - PangoScriptIter* -> PgScriptIter
74 * - PangoTabArray* -> PgTabArray
78 module pango
.PgFontFace
;
80 private import pango
.pangotypes
;
82 private import lib
.pango
;
84 private import pango
.PgContext
;
85 private import pango
.PgItem
;
86 private import pango
.PgLayout
;
87 private import pango
.PgFontDescription
;
88 private import pango
.PgFontMetrics
;
89 private import pango
.PgFontFamily
;
90 private import pango
.PgFontMap
;
91 private import pango
.PgFontsetSimple
;
92 private import pango
.PgAttribute
;
93 private import pango
.PgAttributeList
;
94 private import pango
.PgLanguage
;
95 private import pango
.PgTabArray
;
96 private import pango
.PgLayout
;
97 private import pango
.PgLayoutIter
;
98 private import pango
.PgScriptIter
;
99 private import glib
.Str
;
103 * Pango supports a flexible architecture where a
104 * particular rendering architecture can supply an
105 * implementation of fonts. The PangoFont structure
106 * represents an abstract rendering-system-indepent font.
107 * Pango provides routines to list available fonts, and
108 * to load a font of a given description.
110 public class PgFontFace
113 /** the main Gtk struct */
114 protected PangoFontFace
* pangoFontFace
;
117 public PangoFontFace
* getPgFontFaceStruct()
119 return pangoFontFace
;
123 /** the main Gtk struct as a void* */
124 protected void* getStruct()
126 return cast(void*)pangoFontFace
;
130 * Sets our main struct and passes it to the parent class
132 public this (PangoFontFace
* pangoFontFace
)
134 this.pangoFontFace
= pangoFontFace
;
219 * Gets a name representing the style of this face among the
220 * different faces in the PangoFontFamily for the face. This
221 * name is unique among all faces in the family and is suitable
222 * for displaying to users.
226 * the face name for the face. This string is
227 * owned by the face object and must not be modified or freed.
229 public char[] getFaceName()
231 // const char* pango_font_face_get_face_name (PangoFontFace *face);
232 return Str
.toString(pango_font_face_get_face_name(pangoFontFace
) );
236 * List the available sizes for a font. This is only applicable to bitmap
237 * fonts. For scalable fonts, stores NULL at the location pointed to by
238 * sizes and 0 at the location pointed to by n_sizes. The sizes returned
239 * are in Pango units and are sorted in ascending order.
243 * location to store a pointer to an array of int. This array
244 * should be freed with g_free().
246 * location to store the number of elements in sizes
249 public void listSizes(int** sizes
, int* nSizes
)
251 // void pango_font_face_list_sizes (PangoFontFace *face, int **sizes, int *n_sizes);
252 pango_font_face_list_sizes(pangoFontFace
, sizes
, nSizes
);
256 * Returns the family, style, variant, weight and stretch of
257 * a PangoFontFace. The size field of the resulting font description
262 * a newly-created PangoFontDescription structure
263 * holding the description of the face. Use pango_font_description_free()
264 * to free the result.
266 public PgFontDescription
describe()
268 // PangoFontDescription* pango_font_face_describe (PangoFontFace *face);
269 return new PgFontDescription( pango_font_face_describe(pangoFontFace
) );