/usr/include/d/gtkd-3/cairo/UserFontFace.d is in libgtkd-3-dev 3.7.5-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | /*
* This file is part of gtkD.
*
* gtkD is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version, with
* some exceptions, please read the COPYING file.
*
* gtkD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with gtkD; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
*/
// generated automatically - do not change
// find conversion definition on APILookup.txt
// implement new conversion functionalities on the wrap.utils pakage
/*
* Conversion parameters:
* inFile = cairo-User-Fonts.html
* outPack = cairo
* outFile = UserFontFace
* strct = cairo_font_face_t
* realStrct=
* ctorStrct=
* clss = UserFontFace
* interf =
* class Code: No
* interface Code: No
* template for:
* extend =
* implements:
* prefixes:
* - cairo_user_font_face_
* omit structs:
* omit prefixes:
* omit code:
* omit signals:
* imports:
* structWrap:
* - cairo_font_face_t* -> UserFontFace
* module aliases:
* local aliases:
* overrides:
*/
module cairo.UserFontFace;
public import cairo.c.types;
private import cairo.c.functions;
private import glib.ConstructionException;
/**
* The user-font feature allows the cairo user to provide drawings for glyphs
* in a font. This is most useful in implementing fonts in non-standard
* formats, like SVG fonts and Flash fonts, but can also be used by games and
* other application to draw "funky" fonts.
*/
public class UserFontFace
{
/** the main Gtk struct */
protected cairo_font_face_t* cairo_font_face;
/** Get the main Gtk struct */
public cairo_font_face_t* getUserFontFaceStruct()
{
return cairo_font_face;
}
/** the main Gtk struct as a void* */
protected void* getStruct()
{
return cast(void*)cairo_font_face;
}
/**
* Sets our main struct and passes it to the parent class
*/
public this (cairo_font_face_t* cairo_font_face)
{
this.cairo_font_face = cairo_font_face;
}
/**
*/
/**
* Creates a new user font-face.
* Use the setter functions to associate callbacks with the returned
* user font. The only mandatory callback is render_glyph.
* After the font-face is created, the user can attach arbitrary data
* (the actual font data) to it using cairo_font_face_set_user_data()
* and access it from the user-font callbacks by using
* cairo_scaled_font_get_font_face() followed by
* cairo_font_face_get_user_data().
* Since 1.8
* Returns: a newly created cairo_font_face_t. Free with cairo_font_face_destroy() when you are done using it.
*/
public static UserFontFace create()
{
// cairo_font_face_t * cairo_user_font_face_create (void);
auto p = cairo_user_font_face_create();
if(p is null)
{
return null;
}
return new UserFontFace(cast(cairo_font_face_t*) p);
}
/**
* Sets the scaled-font initialization function of a user-font.
* See cairo_user_scaled_font_init_func_t for details of how the callback
* works.
* The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE
* error will occur. A user font-face is immutable as soon as a scaled-font
* is created from it.
* Since 1.8
* Params:
* initFunc = The init callback, or NULL
*/
public void setInitFunc(cairo_user_scaled_font_init_func_t initFunc)
{
// void cairo_user_font_face_set_init_func (cairo_font_face_t *font_face, cairo_user_scaled_font_init_func_t init_func);
cairo_user_font_face_set_init_func(cairo_font_face, initFunc);
}
/**
* Gets the scaled-font initialization function of a user-font.
* Since 1.8
* Returns: The init callback of font_face or NULL if none set or an error has occurred.
*/
public cairo_user_scaled_font_init_func_t getInitFunc()
{
// cairo_user_scaled_font_init_func_t cairo_user_font_face_get_init_func (cairo_font_face_t *font_face);
return cairo_user_font_face_get_init_func(cairo_font_face);
}
/**
* Sets the glyph rendering function of a user-font.
* See cairo_user_scaled_font_render_glyph_func_t for details of how the callback
* works.
* The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE
* error will occur. A user font-face is immutable as soon as a scaled-font
* is created from it.
* The render_glyph callback is the only mandatory callback of a user-font.
* If the callback is NULL and a glyph is tried to be rendered using
* font_face, a CAIRO_STATUS_USER_FONT_ERROR will occur.
* Since 1.8
* Params:
* renderGlyphFunc = The render_glyph callback, or NULL
*/
public void setRenderGlyphFunc(cairo_user_scaled_font_render_glyph_func_t renderGlyphFunc)
{
// void cairo_user_font_face_set_render_glyph_func (cairo_font_face_t *font_face, cairo_user_scaled_font_render_glyph_func_t render_glyph_func);
cairo_user_font_face_set_render_glyph_func(cairo_font_face, renderGlyphFunc);
}
/**
* Gets the glyph rendering function of a user-font.
* Since 1.8
* Returns: The render_glyph callback of font_face or NULL if none set or an error has occurred.
*/
public cairo_user_scaled_font_render_glyph_func_t getRenderGlyphFunc()
{
// cairo_user_scaled_font_render_glyph_func_t cairo_user_font_face_get_render_glyph_func (cairo_font_face_t *font_face);
return cairo_user_font_face_get_render_glyph_func(cairo_font_face);
}
/**
* Sets the unicode-to-glyph conversion function of a user-font.
* See cairo_user_scaled_font_unicode_to_glyph_func_t for details of how the callback
* works.
* The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE
* error will occur. A user font-face is immutable as soon as a scaled-font
* is created from it.
* Since 1.8
* Params:
* unicodeToGlyphFunc = The unicode_to_glyph callback, or NULL
*/
public void setUnicodeToGlyphFunc(cairo_user_scaled_font_unicode_to_glyph_func_t unicodeToGlyphFunc)
{
// void cairo_user_font_face_set_unicode_to_glyph_func (cairo_font_face_t *font_face, cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func);
cairo_user_font_face_set_unicode_to_glyph_func(cairo_font_face, unicodeToGlyphFunc);
}
/**
* Gets the unicode-to-glyph conversion function of a user-font.
* Since 1.8
* Returns: The unicode_to_glyph callback of font_face or NULL if none set or an error occurred.
*/
public cairo_user_scaled_font_unicode_to_glyph_func_t getUnicodeToGlyphFunc()
{
// cairo_user_scaled_font_unicode_to_glyph_func_t cairo_user_font_face_get_unicode_to_glyph_func (cairo_font_face_t *font_face);
return cairo_user_font_face_get_unicode_to_glyph_func(cairo_font_face);
}
/**
* Sets th text-to-glyphs conversion function of a user-font.
* See cairo_user_scaled_font_text_to_glyphs_func_t for details of how the callback
* works.
* The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE
* error will occur. A user font-face is immutable as soon as a scaled-font
* is created from it.
* Since 1.8
* Params:
* textToGlyphsFunc = The text_to_glyphs callback, or NULL
*/
public void setTextToGlyphsFunc(cairo_user_scaled_font_text_to_glyphs_func_t textToGlyphsFunc)
{
// void cairo_user_font_face_set_text_to_glyphs_func (cairo_font_face_t *font_face, cairo_user_scaled_font_text_to_glyphs_func_t text_to_glyphs_func);
cairo_user_font_face_set_text_to_glyphs_func(cairo_font_face, textToGlyphsFunc);
}
/**
* Gets the text-to-glyphs conversion function of a user-font.
* Since 1.8
* Returns: The text_to_glyphs callback of font_face or NULL if none set or an error occurred.
*/
public cairo_user_scaled_font_text_to_glyphs_func_t getTextToGlyphsFunc()
{
// cairo_user_scaled_font_text_to_glyphs_func_t cairo_user_font_face_get_text_to_glyphs_func (cairo_font_face_t *font_face);
return cairo_user_font_face_get_text_to_glyphs_func(cairo_font_face);
}
}
|