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 = PgFontMetrics
28 * strct = PangoFontMetrics
31 * clss = PgFontMetrics
39 * - pango_font_metrics_
47 * - pango.PgFontDescription
48 * - pango.PgFontFamily
51 * - pango.PgFontsetSimple
53 * - pango.PgAttributeList
57 * - pango.PgLayoutIter
58 * - pango.PgScriptIter
60 * - PangoAttribute* -> PgAttribute
61 * - PangoAttributeList* -> PgAttributeList
62 * - PangoContext* -> PgContext
63 * - PangoFontDescription* -> PgFontDescription
64 * - PangoFontFace* -> PgFontFace
65 * - PangoFontFamily* -> PgFontFamily
66 * - PangoFontMap* -> PgFontMap
67 * - PangoFontsetSimple* -> PgFontsetSimple
68 * - PangoItem* -> PgItem
69 * - PangoLanguage* -> PgLanguage
70 * - PangoLayout* -> PgLayout
71 * - PangoLayoutIter* -> PgLayoutIter
72 * - PangoScriptIter* -> PgScriptIter
73 * - PangoTabArray* -> PgTabArray
77 module pango
.PgFontMetrics
;
79 private import pango
.pangotypes
;
81 private import lib
.pango
;
83 private import pango
.PgContext
;
84 private import pango
.PgItem
;
85 private import pango
.PgLayout
;
86 private import pango
.PgFontDescription
;
87 private import pango
.PgFontFamily
;
88 private import pango
.PgFontFace
;
89 private import pango
.PgFontMap
;
90 private import pango
.PgFontsetSimple
;
91 private import pango
.PgAttribute
;
92 private import pango
.PgAttributeList
;
93 private import pango
.PgLanguage
;
94 private import pango
.PgTabArray
;
95 private import pango
.PgLayout
;
96 private import pango
.PgLayoutIter
;
97 private import pango
.PgScriptIter
;
101 * Pango supports a flexible architecture where a
102 * particular rendering architecture can supply an
103 * implementation of fonts. The PangoFont structure
104 * represents an abstract rendering-system-indepent font.
105 * Pango provides routines to list available fonts, and
106 * to load a font of a given description.
108 public class PgFontMetrics
111 /** the main Gtk struct */
112 protected PangoFontMetrics
* pangoFontMetrics
;
115 public PangoFontMetrics
* getPgFontMetricsStruct()
117 return pangoFontMetrics
;
121 /** the main Gtk struct as a void* */
122 protected void* getStruct()
124 return cast(void*)pangoFontMetrics
;
128 * Sets our main struct and passes it to the parent class
130 public this (PangoFontMetrics
* pangoFontMetrics
)
132 this.pangoFontMetrics
= pangoFontMetrics
;
185 * Increase the reference count of a font metrics structure by one.
187 * a PangoFontMetrics structure
191 public PangoFontMetrics
* ref()
193 // PangoFontMetrics* pango_font_metrics_ref (PangoFontMetrics *metrics);
194 return pango_font_metrics_ref(pangoFontMetrics
);
198 * Decrease the reference count of a font metrics structure by one. If
199 * the result is zero, frees the structure and any associated
202 * a PangoFontMetrics structure
206 // void pango_font_metrics_unref (PangoFontMetrics *metrics);
207 pango_font_metrics_unref(pangoFontMetrics
);
211 * Gets the ascent from a font metrics structure. The ascent is
212 * the distance from the baseline to the logical top of a line
213 * of text. (The logical top may be above or below the top of the
214 * actual drawn ink. It is necessary to lay out the text to figure
215 * where the ink will be.)
217 * a PangoFontMetrics structure
219 * the ascent, in Pango units. (1 point == PANGO_SCALE Pango units.)
221 public int getAscent()
223 // int pango_font_metrics_get_ascent (PangoFontMetrics *metrics);
224 return pango_font_metrics_get_ascent(pangoFontMetrics
);
228 * Gets the descent from a font metrics structure. The descent is
229 * the distance from the baseline to the logical bottom of a line
230 * of text. (The logical bottom may be above or below the bottom of the
231 * actual drawn ink. It is necessary to lay out the text to figure
232 * where the ink will be.)
234 * a PangoFontMetrics structure
236 * the descent, in Pango units. (1 point == PANGO_SCALE Pango units.)
238 public int getDescent()
240 // int pango_font_metrics_get_descent (PangoFontMetrics *metrics);
241 return pango_font_metrics_get_descent(pangoFontMetrics
);
245 * Gets the approximate character width for a font metrics structure.
246 * This is merely a representative value useful, for example, for
247 * determining the initial size for a window. Actual characters in
248 * text will be wider and narrower than this.
250 * a PangoFontMetrics structure
252 * the character width, in Pango units. (1 point == PANGO_SCALE Pango units.)
254 public int getApproximateCharWidth()
256 // int pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics);
257 return pango_font_metrics_get_approximate_char_width(pangoFontMetrics
);
261 * Gets the approximate digit width for a font metrics structure.
262 * This is merely a representative value useful, for example, for
263 * determining the initial size for a window. Actual digits in
264 * text can be wider or narrower than this, though this value
265 * is generally somewhat more accurate than the result of
266 * pango_font_metrics_get_approximate_char_width() for digits.
268 * a PangoFontMetrics structure
270 * the digit width, in Pango units. (1 point == PANGO_SCALE Pango units.)
272 public int getApproximateDigitWidth()
274 // int pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics);
275 return pango_font_metrics_get_approximate_digit_width(pangoFontMetrics
);
279 * Gets the suggested thickness to draw for the underline.
281 * a PangoFontMetrics structure
283 * the suggested underline thickness, in Pango units.
286 public int getUnderlineThickness()
288 // int pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics);
289 return pango_font_metrics_get_underline_thickness(pangoFontMetrics
);
293 * Gets the suggested position to draw the underline.
294 * The value returned is the distance above the
295 * baseline of the top of the underline. Since most fonts have
296 * underline positions beneath the baseline, this value is typically
299 * a PangoFontMetrics structure
301 * the suggested underline position, in Pango units.
304 public int getUnderlinePosition()
306 // int pango_font_metrics_get_underline_position (PangoFontMetrics *metrics);
307 return pango_font_metrics_get_underline_position(pangoFontMetrics
);
311 * Gets the suggested thickness to draw for the strikethrough.
313 * a PangoFontMetrics structure
315 * the suggested strikethrough thickness, in Pango units.
318 public int getStrikethroughThickness()
320 // int pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics);
321 return pango_font_metrics_get_strikethrough_thickness(pangoFontMetrics
);
325 * Gets the suggested position to draw the strikethrough.
326 * The value returned is the distance above the
327 * baseline of the top of the strikethrough.
329 * a PangoFontMetrics structure
331 * the suggested strikethrough position, in Pango units.
334 public int getStrikethroughPosition()
336 // int pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics);
337 return pango_font_metrics_get_strikethrough_position(pangoFontMetrics
);