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:
25 * inFile = cairo-Font-Options.html
27 * outFile = FontOption
28 * strct = cairo_font_options_t
39 * - cairo_font_options_
48 module cairoLib
.FontOption
;
50 private import cairoLib
.cairoLibtypes
;
52 private import lib
.cairoLib
;
58 public class FontOption
61 /** the main Gtk struct */
62 protected cairo_font_options_t
* cairo_font_options
;
65 public cairo_font_options_t
* getFontOptionStruct()
67 return cairo_font_options
;
71 /** the main Gtk struct as a void* */
72 protected void* getStruct()
74 return cast(void*)cairo_font_options
;
78 * Sets our main struct and passes it to the parent class
80 public this (cairo_font_options_t
* cairo_font_options
)
82 this.cairo_font_options
= cairo_font_options
;
90 * Allocates a new font options object with all options initialized
93 * a newly allocated cairo_font_options_t. Free with
94 * cairo_font_options_destroy(). This function always returns a
95 * valid pointer; if memory cannot be allocated, then a special
96 * error object is returned where all operations on the object do nothing.
97 * You can check for this with cairo_font_options_status().
99 public static cairo_font_options_t
* create()
101 // cairo_font_options_t* cairo_font_options_create (void);
102 return cairo_font_options_create();
106 * Allocates a new font options object copying the option values from
109 * a cairo_font_options_t
111 * a newly allocated cairo_font_options_t. Free with
112 * cairo_font_options_destroy(). This function always returns a
113 * valid pointer; if memory cannot be allocated, then a special
114 * error object is returned where all operations on the object do nothing.
115 * You can check for this with cairo_font_options_status().
117 public cairo_font_options_t
* copy()
119 // cairo_font_options_t* cairo_font_options_copy (const cairo_font_options_t *original);
120 return cairo_font_options_copy(cairo_font_options
);
124 * Destroys a cairo_font_options_t object created with with
125 * cairo_font_options_create() or cairo_font_options_copy().
127 * a cairo_font_options_t
129 public void destroy()
131 // void cairo_font_options_destroy (cairo_font_options_t *options);
132 cairo_font_options_destroy(cairo_font_options
);
136 * Checks whether an error has previously occurred for this
137 * font options object
139 * a cairo_font_options_t
141 * CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY
143 public cairo_status_t
status()
145 // cairo_status_t cairo_font_options_status (cairo_font_options_t *options);
146 return cairo_font_options_status(cairo_font_options
);
150 * Merges non-default options from other into options, replacing
151 * existing values. This operation can be thought of as somewhat
152 * similar to compositing other onto options with the operation
153 * of CAIRO_OPERATION_OVER.
155 * a cairo_font_options_t
157 * another cairo_font_options_t
159 public void merge(cairo_font_options_t
* other
)
161 // void cairo_font_options_merge (cairo_font_options_t *options, const cairo_font_options_t *other);
162 cairo_font_options_merge(cairo_font_options
, other
);
166 * Compute a hash for the font options object; this value will
167 * be useful when storing an object containing a cairo_font_options_t
170 * a cairo_font_options_t
172 * the hash value for the font options object.
173 * The return value can be cast to a 32-bit type if a
174 * 32-bit hash value is needed.
178 // unsigned long cairo_font_options_hash (const cairo_font_options_t *options);
179 return cairo_font_options_hash(cairo_font_options
);
183 * Compares two font options objects for equality.
185 * a cairo_font_options_t
187 * another cairo_font_options_t
189 * TRUE if all fields of the two font options objects match
191 public cairo_bool_t
equal(cairo_font_options_t
* other
)
193 // cairo_bool_t cairo_font_options_equal (const cairo_font_options_t *options, const cairo_font_options_t *other);
194 return cairo_font_options_equal(cairo_font_options
, other
);
198 * Sets the antiliasing mode for the font options object. This
199 * specifies the type of antialiasing to do when rendering text.
201 * a cairo_font_options_t
203 * the new antialiasing mode
205 public void setAntialias(cairo_antialias_t antialias
)
207 // void cairo_font_options_set_antialias (cairo_font_options_t *options, cairo_antialias_t antialias);
208 cairo_font_options_set_antialias(cairo_font_options
, antialias
);
212 * Gets the antialising mode for the font options object.
214 * a cairo_font_options_t
216 * the antialiasing mode
218 public cairo_antialias_t
getAntialias()
220 // cairo_antialias_t cairo_font_options_get_antialias (const cairo_font_options_t *options);
221 return cairo_font_options_get_antialias(cairo_font_options
);
226 * Sets the subpixel order for the font options object. The subpixel
227 * order specifies the order of color elements within each pixel on
228 * the display device when rendering with an antialiasing mode of
229 * CAIRO_ANTIALIAS_SUBPIXEL. See the documentation for
230 * cairo_subpixel_order_t for full details.
232 * a cairo_font_options_t
234 * the new subpixel order
236 public void setSubpixelOrder(cairo_subpixel_order_t subpixelOrder
)
238 // void cairo_font_options_set_subpixel_order (cairo_font_options_t *options, cairo_subpixel_order_t subpixel_order);
239 cairo_font_options_set_subpixel_order(cairo_font_options
, subpixelOrder
);
243 * Gets the subpixel order for the font options object.
244 * See the documentation for cairo_subpixel_order_t for full details.
246 * a cairo_font_options_t
248 * the subpixel order for the font options object
250 public cairo_subpixel_order_t
getSubpixelOrder()
252 // cairo_subpixel_order_t cairo_font_options_get_subpixel_order (const cairo_font_options_t *options);
253 return cairo_font_options_get_subpixel_order(cairo_font_options
);
258 * Sets the hint style for font outlines for the font options object.
259 * This controls whether to fit font outlines to the pixel grid,
260 * and if so, whether to optimize for fidelity or contrast.
261 * See the documentation for cairo_hint_style_t for full details.
263 * a cairo_font_options_t
267 public void setHintStyle(cairo_hint_style_t hintStyle
)
269 // void cairo_font_options_set_hint_style (cairo_font_options_t *options, cairo_hint_style_t hint_style);
270 cairo_font_options_set_hint_style(cairo_font_options
, hintStyle
);
274 * Gets the hint style for font outlines for the font options object.
275 * See the documentation for cairo_hint_style_t for full details.
277 * a cairo_font_options_t
279 * the hint style for the font options object
281 public cairo_hint_style_t
getHintStyle()
283 // cairo_hint_style_t cairo_font_options_get_hint_style (const cairo_font_options_t *options);
284 return cairo_font_options_get_hint_style(cairo_font_options
);
289 * Sets the metrics hinting mode for the font options object. This
290 * controls whether metrics are quantized to integer values in
292 * See the documentation for cairo_hint_metrics_t for full details.
294 * a cairo_font_options_t
296 * the new metrics hinting mode
298 public void setHintMetrics(cairo_hint_metrics_t hintMetrics
)
300 // void cairo_font_options_set_hint_metrics (cairo_font_options_t *options, cairo_hint_metrics_t hint_metrics);
301 cairo_font_options_set_hint_metrics(cairo_font_options
, hintMetrics
);
305 * Gets the metrics hinting mode for the font options object.
306 * See the documentation for cairo_hint_metrics_t for full details.
308 * a cairo_font_options_t
310 * the metrics hinting mode for the font options object
312 public cairo_hint_metrics_t
getHintMetrics()
314 // cairo_hint_metrics_t cairo_font_options_get_hint_metrics (const cairo_font_options_t *options);
315 return cairo_font_options_get_hint_metrics(cairo_font_options
);