1 /* 2 * Distributed under the Boost Software License, Version 1.0. 3 * (See accompanying file LICENSE_1_0.txt or copy at 4 * http://www.boost.org/LICENSE_1_0.txt) 5 */ 6 module pango.c.fontmap; 7 8 import pango.c.font; 9 import pango.c.fontmap; 10 import pango.c.context; 11 import pango.c.fontset; 12 import pango.c.language; 13 14 import glib; 15 import gobject; 16 17 extern(C): 18 19 version (Backend) {} 20 else { 21 struct PangoFontMap; 22 } 23 24 pure GType pango_font_map_get_type (); 25 PangoContext * pango_font_map_create_context (PangoFontMap *fontmap); 26 PangoFont * pango_font_map_load_font (PangoFontMap *fontmap, 27 PangoContext *context, 28 const(PangoFontDescription) *desc); 29 PangoFontset *pango_font_map_load_fontset (PangoFontMap *fontmap, 30 PangoContext *context, 31 const(PangoFontDescription) *desc, 32 PangoLanguage *language); 33 void pango_font_map_list_families (PangoFontMap *fontmap, 34 PangoFontFamily ***families, 35 int *n_families); 36 guint pango_font_map_get_serial (PangoFontMap *fontmap); 37 void pango_font_map_changed (PangoFontMap *fontmap); 38 39 40 41 version (Backend) { 42 43 /** 44 * PangoFontMap: 45 * 46 * The #PangoFontMap represents the set of fonts available for a 47 * particular rendering system. This is a virtual object with 48 * implementations being specific to particular rendering systems. To 49 * create an implementation of a #PangoFontMap, the rendering-system 50 * specific code should allocate a larger structure that contains a nested 51 * #PangoFontMap, fill in the <structfield>klass</structfield> member of the nested #PangoFontMap with a 52 * pointer to a appropriate #PangoFontMapClass, then call 53 * pango_font_map_init() on the structure. 54 * 55 * The #PangoFontMap structure contains one member which the implementation 56 * fills in. 57 */ 58 struct PangoFontMap 59 { 60 GObject parent_instance; 61 } 62 63 /** 64 * PangoFontMapClass: 65 * @parent_class: parent #GObjectClass. 66 * @load_font: a function to load a font with a given description. See 67 * pango_font_map_load_font(). 68 * @list_families: A function to list available font families. See 69 * pango_font_map_list_families(). 70 * @load_fontset: a function to load a fontset with a given given description 71 * suitable for a particular language. See pango_font_map_load_fontset(). 72 * @shape_engine_type: the type of rendering-system-dependent engines that 73 * can handle fonts of this fonts loaded with this fontmap. 74 * @get_serial: a function to get the serial number of the fontmap. 75 * See pango_font_map_get_serial(). 76 * @changed: See pango_font_map_changed() 77 * 78 * The #PangoFontMapClass structure holds the virtual functions for 79 * a particular #PangoFontMap implementation. 80 */ 81 struct PangoFontMapClass 82 { 83 GObjectClass parent_class; 84 85 /*< public >*/ 86 87 PangoFont * function (PangoFontMap *fontmap, 88 PangoContext *context, 89 const(PangoFontDescription) *desc) load_font; 90 void function (PangoFontMap *fontmap, 91 PangoFontFamily ***families, 92 int *n_families) list_families; 93 PangoFontset *function (PangoFontMap *fontmap, 94 PangoContext *context, 95 const(PangoFontDescription) *desc, 96 PangoLanguage *language) load_fontset; 97 98 const(char) *shape_engine_type; 99 100 guint function (PangoFontMap *fontmap) get_serial; 101 void function (PangoFontMap *fontmap) changed; 102 103 /*< private >*/ 104 105 /* Padding for future expansion */ 106 void function () _pango_reserved1; 107 void function () _pango_reserved2; 108 } 109 110 const(char) *pango_font_map_get_shape_engine_type (PangoFontMap *fontmap); 111 112 } 113