1 2 // Copyright Ahmet Sait Koçak 2020. 3 // Distributed under the Boost Software License, Version 1.0. 4 // (See accompanying file LICENSE_1_0.txt or copy at 5 // https://www.boost.org/LICENSE_1_0.txt) 6 7 module bindbc.hb.bind.deprecated_; 8 9 version(HB_with_deprecated): 10 11 import bindbc.hb.bind.buffer; 12 import bindbc.hb.bind.common; 13 import bindbc.hb.bind.font; 14 import bindbc.hb.bind.set; 15 import bindbc.hb.bind.unicode; 16 17 deprecated: 18 extern(C) @nogc nothrow: 19 20 /** 21 * SECTION:hb-deprecated 22 * @title: hb-deprecated 23 * @short_description: Deprecated API 24 * @include: hb.h 25 * 26 * These API have been deprecated in favor of newer API, or because they 27 * were deemed unnecessary. 28 **/ 29 30 enum HB_SCRIPT_CANADIAN_ABORIGINAL = HB_SCRIPT_CANADIAN_SYLLABICS; 31 32 enum HB_BUFFER_FLAGS_DEFAULT = HB_BUFFER_FLAG_DEFAULT; 33 enum HB_BUFFER_SERIALIZE_FLAGS_DEFAULT = HB_BUFFER_SERIALIZE_FLAG_DEFAULT; 34 35 alias hb_font_get_glyph_func_t = int function ( 36 hb_font_t* font, 37 void* font_data, 38 hb_codepoint_t unicode, 39 hb_codepoint_t variation_selector, 40 hb_codepoint_t* glyph, 41 void* user_data); 42 43 version(BindHB_Static) 44 void hb_font_funcs_set_glyph_func ( 45 hb_font_funcs_t* ffuncs, 46 hb_font_get_glyph_func_t func, 47 void* user_data, 48 hb_destroy_func_t destroy); 49 else 50 { 51 private alias fp_hb_font_funcs_set_glyph_func = void function ( 52 hb_font_funcs_t* ffuncs, 53 hb_font_get_glyph_func_t func, 54 void* user_data, 55 hb_destroy_func_t destroy); 56 __gshared fp_hb_font_funcs_set_glyph_func hb_font_funcs_set_glyph_func; 57 } 58 59 version(BindHB_Static) 60 void hb_set_invert (hb_set_t* set); 61 else 62 { 63 private alias fp_hb_set_invert = void function (hb_set_t* set); 64 __gshared fp_hb_set_invert hb_set_invert; 65 } 66 67 /** 68 * hb_unicode_eastasian_width_func_t: 69 * 70 * Deprecated: 2.0.0 71 */ 72 alias hb_unicode_eastasian_width_func_t = uint function ( 73 hb_unicode_funcs_t* ufuncs, 74 hb_codepoint_t unicode, 75 void* user_data); 76 77 /** 78 * hb_unicode_funcs_set_eastasian_width_func: 79 * @ufuncs: a Unicode function structure 80 * @func: (closure user_data) (destroy destroy) (scope notified): 81 * @user_data: 82 * @destroy: 83 * 84 * 85 * 86 * Since: 0.9.2 87 * Deprecated: 2.0.0 88 **/ 89 version(BindHB_Static) 90 void hb_unicode_funcs_set_eastasian_width_func ( 91 hb_unicode_funcs_t* ufuncs, 92 hb_unicode_eastasian_width_func_t func, 93 void* user_data, 94 hb_destroy_func_t destroy); 95 else 96 { 97 private alias fp_hb_unicode_funcs_set_eastasian_width_func = void function ( 98 hb_unicode_funcs_t* ufuncs, 99 hb_unicode_eastasian_width_func_t func, 100 void* user_data, 101 hb_destroy_func_t destroy); 102 __gshared fp_hb_unicode_funcs_set_eastasian_width_func hb_unicode_funcs_set_eastasian_width_func; 103 } 104 105 /** 106 * hb_unicode_eastasian_width: 107 * 108 * Since: 0.9.2 109 * Deprecated: 2.0.0 110 **/ 111 version(BindHB_Static) 112 uint hb_unicode_eastasian_width ( 113 hb_unicode_funcs_t* ufuncs, 114 hb_codepoint_t unicode); 115 else 116 { 117 private alias fp_hb_unicode_eastasian_width = uint function ( 118 hb_unicode_funcs_t* ufuncs, 119 hb_codepoint_t unicode); 120 __gshared fp_hb_unicode_eastasian_width hb_unicode_eastasian_width; 121 } 122 123 /** 124 * hb_unicode_decompose_compatibility_func_t: 125 * @ufuncs: a Unicode function structure 126 * @u: codepoint to decompose 127 * @decomposed: address of codepoint array (of length %HB_UNICODE_MAX_DECOMPOSITION_LEN) to write decomposition into 128 * @user_data: user data pointer as passed to hb_unicode_funcs_set_decompose_compatibility_func() 129 * 130 * Fully decompose @u to its Unicode compatibility decomposition. The codepoints of the decomposition will be written to @decomposed. 131 * The complete length of the decomposition will be returned. 132 * 133 * If @u has no compatibility decomposition, zero should be returned. 134 * 135 * The Unicode standard guarantees that a buffer of length %HB_UNICODE_MAX_DECOMPOSITION_LEN codepoints will always be sufficient for any 136 * compatibility decomposition plus an terminating value of 0. Consequently, @decompose must be allocated by the caller to be at least this length. Implementations 137 * of this function type must ensure that they do not write past the provided array. 138 * 139 * Return value: number of codepoints in the full compatibility decomposition of @u, or 0 if no decomposition available. 140 * 141 * Deprecated: 2.0.0 142 */ 143 alias hb_unicode_decompose_compatibility_func_t = uint function ( 144 hb_unicode_funcs_t* ufuncs, 145 hb_codepoint_t u, 146 hb_codepoint_t* decomposed, 147 void* user_data); 148 149 /** 150 * HB_UNICODE_MAX_DECOMPOSITION_LEN: 151 * 152 * See Unicode 6.1 for details on the maximum decomposition length. 153 * 154 * Deprecated: 2.0.0 155 */ 156 enum HB_UNICODE_MAX_DECOMPOSITION_LEN = 18 + 1; /* codepoints */ 157 158 /** 159 * hb_unicode_funcs_set_decompose_compatibility_func: 160 * @ufuncs: a Unicode function structure 161 * @func: (closure user_data) (destroy destroy) (scope notified): 162 * @user_data: 163 * @destroy: 164 * 165 * 166 * 167 * Since: 0.9.2 168 * Deprecated: 2.0.0 169 **/ 170 version(BindHB_Static) 171 void hb_unicode_funcs_set_decompose_compatibility_func ( 172 hb_unicode_funcs_t* ufuncs, 173 hb_unicode_decompose_compatibility_func_t func, 174 void* user_data, 175 hb_destroy_func_t destroy); 176 else 177 { 178 private alias fp_hb_unicode_funcs_set_decompose_compatibility_func = void function ( 179 hb_unicode_funcs_t* ufuncs, 180 hb_unicode_decompose_compatibility_func_t func, 181 void* user_data, 182 hb_destroy_func_t destroy); 183 __gshared fp_hb_unicode_funcs_set_decompose_compatibility_func hb_unicode_funcs_set_decompose_compatibility_func; 184 } 185 186 version(BindHB_Static) 187 uint hb_unicode_decompose_compatibility ( 188 hb_unicode_funcs_t* ufuncs, 189 hb_codepoint_t u, 190 hb_codepoint_t* decomposed); 191 else 192 { 193 private alias fp_hb_unicode_decompose_compatibility = uint function ( 194 hb_unicode_funcs_t* ufuncs, 195 hb_codepoint_t u, 196 hb_codepoint_t* decomposed); 197 __gshared fp_hb_unicode_decompose_compatibility hb_unicode_decompose_compatibility; 198 } 199 200 alias hb_font_get_glyph_v_kerning_func_t = int function (); 201 202 /** 203 * hb_font_funcs_set_glyph_v_kerning_func: 204 * @ffuncs: font functions. 205 * @func: (closure user_data) (destroy destroy) (scope notified): 206 * @user_data: 207 * @destroy: 208 * 209 * 210 * 211 * Since: 0.9.2 212 * Deprecated: 2.0.0 213 **/ 214 version(BindHB_Static) 215 void hb_font_funcs_set_glyph_v_kerning_func ( 216 hb_font_funcs_t* ffuncs, 217 hb_font_get_glyph_v_kerning_func_t func, 218 void* user_data, 219 hb_destroy_func_t destroy); 220 else 221 { 222 private alias fp_hb_font_funcs_set_glyph_v_kerning_func = void function ( 223 hb_font_funcs_t* ffuncs, 224 hb_font_get_glyph_v_kerning_func_t func, 225 void* user_data, 226 hb_destroy_func_t destroy); 227 __gshared fp_hb_font_funcs_set_glyph_v_kerning_func hb_font_funcs_set_glyph_v_kerning_func; 228 } 229 230 version(BindHB_Static) 231 hb_position_t hb_font_get_glyph_v_kerning ( 232 hb_font_t* font, 233 hb_codepoint_t top_glyph, 234 hb_codepoint_t bottom_glyph); 235 else 236 { 237 private alias fp_hb_font_get_glyph_v_kerning = hb_position_t function ( 238 hb_font_t* font, 239 hb_codepoint_t top_glyph, 240 hb_codepoint_t bottom_glyph); 241 __gshared fp_hb_font_get_glyph_v_kerning hb_font_get_glyph_v_kerning; 242 }