| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2009 Red Hat, Inc. | 2 * Copyright © 2009 Red Hat, Inc. |
| 3 * Copyright © 2011 Codethink Limited | 3 * Copyright © 2011 Codethink Limited |
| 4 * Copyright © 2011,2012 Google, Inc. | 4 * Copyright © 2011,2012 Google, Inc. |
| 5 * | 5 * |
| 6 * This is part of HarfBuzz, a text shaping library. | 6 * This is part of HarfBuzz, a text shaping library. |
| 7 * | 7 * |
| 8 * Permission is hereby granted, without written agreement and without | 8 * Permission is hereby granted, without written agreement and without |
| 9 * license or royalty fees, to use, copy, modify, and distribute this | 9 * license or royalty fees, to use, copy, modify, and distribute this |
| 10 * software and its documentation for any purpose, provided that the | 10 * software and its documentation for any purpose, provided that the |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 /* | 167 /* |
| 168 * hb_unicode_funcs_t | 168 * hb_unicode_funcs_t |
| 169 */ | 169 */ |
| 170 | 170 |
| 171 typedef struct hb_unicode_funcs_t hb_unicode_funcs_t; | 171 typedef struct hb_unicode_funcs_t hb_unicode_funcs_t; |
| 172 | 172 |
| 173 | 173 |
| 174 /* | 174 /* |
| 175 * just give me the best implementation you've got there. | 175 * just give me the best implementation you've got there. |
| 176 */ | 176 */ |
| 177 hb_unicode_funcs_t * | 177 HB_EXTERN hb_unicode_funcs_t * |
| 178 hb_unicode_funcs_get_default (void); | 178 hb_unicode_funcs_get_default (void); |
| 179 | 179 |
| 180 | 180 |
| 181 hb_unicode_funcs_t * | 181 HB_EXTERN hb_unicode_funcs_t * |
| 182 hb_unicode_funcs_create (hb_unicode_funcs_t *parent); | 182 hb_unicode_funcs_create (hb_unicode_funcs_t *parent); |
| 183 | 183 |
| 184 hb_unicode_funcs_t * | 184 HB_EXTERN hb_unicode_funcs_t * |
| 185 hb_unicode_funcs_get_empty (void); | 185 hb_unicode_funcs_get_empty (void); |
| 186 | 186 |
| 187 hb_unicode_funcs_t * | 187 HB_EXTERN hb_unicode_funcs_t * |
| 188 hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs); | 188 hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs); |
| 189 | 189 |
| 190 void | 190 HB_EXTERN void |
| 191 hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs); | 191 hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs); |
| 192 | 192 |
| 193 hb_bool_t | 193 HB_EXTERN hb_bool_t |
| 194 hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs, | 194 hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs, |
| 195 hb_user_data_key_t *key, | 195 hb_user_data_key_t *key, |
| 196 void * data, | 196 void * data, |
| 197 hb_destroy_func_t destroy, | 197 hb_destroy_func_t destroy, |
| 198 hb_bool_t replace); | 198 hb_bool_t replace); |
| 199 | 199 |
| 200 | 200 |
| 201 void * | 201 HB_EXTERN void * |
| 202 hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs, | 202 hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs, |
| 203 hb_user_data_key_t *key); | 203 hb_user_data_key_t *key); |
| 204 | 204 |
| 205 | 205 |
| 206 void | 206 HB_EXTERN void |
| 207 hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs); | 207 hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs); |
| 208 | 208 |
| 209 hb_bool_t | 209 HB_EXTERN hb_bool_t |
| 210 hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs); | 210 hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs); |
| 211 | 211 |
| 212 hb_unicode_funcs_t * | 212 HB_EXTERN hb_unicode_funcs_t * |
| 213 hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs); | 213 hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs); |
| 214 | 214 |
| 215 | 215 |
| 216 /* | 216 /* |
| 217 * funcs | 217 * funcs |
| 218 */ | 218 */ |
| 219 | 219 |
| 220 /* typedefs */ | 220 /* typedefs */ |
| 221 | 221 |
| 222 typedef hb_unicode_combining_class_t (*hb_unicode_combining_class_func_t)
(hb_unicode_funcs_t *ufuncs, | 222 typedef hb_unicode_combining_class_t (*hb_unicode_combining_class_func_t)
(hb_unicode_funcs_t *ufuncs, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 * hb_unicode_funcs_set_combining_class_func: | 278 * hb_unicode_funcs_set_combining_class_func: |
| 279 * @ufuncs: a Unicode function structure | 279 * @ufuncs: a Unicode function structure |
| 280 * @func: (closure user_data) (destroy destroy) (scope notified): | 280 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 281 * @user_data: | 281 * @user_data: |
| 282 * @destroy: | 282 * @destroy: |
| 283 * | 283 * |
| 284 * | 284 * |
| 285 * | 285 * |
| 286 * Since: 0.9.2 | 286 * Since: 0.9.2 |
| 287 **/ | 287 **/ |
| 288 void | 288 HB_EXTERN void |
| 289 hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs, | 289 hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs, |
| 290 hb_unicode_combining_class_func_t fun
c, | 290 hb_unicode_combining_class_func_t fun
c, |
| 291 void *user_data, hb_destroy_func_t de
stroy); | 291 void *user_data, hb_destroy_func_t de
stroy); |
| 292 | 292 |
| 293 /** | 293 /** |
| 294 * hb_unicode_funcs_set_eastasian_width_func: | 294 * hb_unicode_funcs_set_eastasian_width_func: |
| 295 * @ufuncs: a Unicode function structure | 295 * @ufuncs: a Unicode function structure |
| 296 * @func: (closure user_data) (destroy destroy) (scope notified): | 296 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 297 * @user_data: | 297 * @user_data: |
| 298 * @destroy: | 298 * @destroy: |
| 299 * | 299 * |
| 300 * | 300 * |
| 301 * | 301 * |
| 302 * Since: 0.9.2 | 302 * Since: 0.9.2 |
| 303 **/ | 303 **/ |
| 304 void | 304 HB_EXTERN void |
| 305 hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs, | 305 hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs, |
| 306 hb_unicode_eastasian_width_func_t fun
c, | 306 hb_unicode_eastasian_width_func_t fun
c, |
| 307 void *user_data, hb_destroy_func_t de
stroy); | 307 void *user_data, hb_destroy_func_t de
stroy); |
| 308 | 308 |
| 309 /** | 309 /** |
| 310 * hb_unicode_funcs_set_general_category_func: | 310 * hb_unicode_funcs_set_general_category_func: |
| 311 * @ufuncs: a Unicode function structure | 311 * @ufuncs: a Unicode function structure |
| 312 * @func: (closure user_data) (destroy destroy) (scope notified): | 312 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 313 * @user_data: | 313 * @user_data: |
| 314 * @destroy: | 314 * @destroy: |
| 315 * | 315 * |
| 316 * | 316 * |
| 317 * | 317 * |
| 318 * Since: 0.9.2 | 318 * Since: 0.9.2 |
| 319 **/ | 319 **/ |
| 320 void | 320 HB_EXTERN void |
| 321 hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs, | 321 hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs, |
| 322 hb_unicode_general_category_func_t f
unc, | 322 hb_unicode_general_category_func_t f
unc, |
| 323 void *user_data, hb_destroy_func_t d
estroy); | 323 void *user_data, hb_destroy_func_t d
estroy); |
| 324 | 324 |
| 325 /** | 325 /** |
| 326 * hb_unicode_funcs_set_mirroring_func: | 326 * hb_unicode_funcs_set_mirroring_func: |
| 327 * @ufuncs: a Unicode function structure | 327 * @ufuncs: a Unicode function structure |
| 328 * @func: (closure user_data) (destroy destroy) (scope notified): | 328 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 329 * @user_data: | 329 * @user_data: |
| 330 * @destroy: | 330 * @destroy: |
| 331 * | 331 * |
| 332 * | 332 * |
| 333 * | 333 * |
| 334 * Since: 0.9.2 | 334 * Since: 0.9.2 |
| 335 **/ | 335 **/ |
| 336 void | 336 HB_EXTERN void |
| 337 hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs, | 337 hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs, |
| 338 hb_unicode_mirroring_func_t func, | 338 hb_unicode_mirroring_func_t func, |
| 339 void *user_data, hb_destroy_func_t destroy)
; | 339 void *user_data, hb_destroy_func_t destroy)
; |
| 340 | 340 |
| 341 /** | 341 /** |
| 342 * hb_unicode_funcs_set_script_func: | 342 * hb_unicode_funcs_set_script_func: |
| 343 * @ufuncs: a Unicode function structure | 343 * @ufuncs: a Unicode function structure |
| 344 * @func: (closure user_data) (destroy destroy) (scope notified): | 344 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 345 * @user_data: | 345 * @user_data: |
| 346 * @destroy: | 346 * @destroy: |
| 347 * | 347 * |
| 348 * | 348 * |
| 349 * | 349 * |
| 350 * Since: 0.9.2 | 350 * Since: 0.9.2 |
| 351 **/ | 351 **/ |
| 352 void | 352 HB_EXTERN void |
| 353 hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs, | 353 hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs, |
| 354 hb_unicode_script_func_t func, | 354 hb_unicode_script_func_t func, |
| 355 void *user_data, hb_destroy_func_t destroy); | 355 void *user_data, hb_destroy_func_t destroy); |
| 356 | 356 |
| 357 /** | 357 /** |
| 358 * hb_unicode_funcs_set_compose_func: | 358 * hb_unicode_funcs_set_compose_func: |
| 359 * @ufuncs: a Unicode function structure | 359 * @ufuncs: a Unicode function structure |
| 360 * @func: (closure user_data) (destroy destroy) (scope notified): | 360 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 361 * @user_data: | 361 * @user_data: |
| 362 * @destroy: | 362 * @destroy: |
| 363 * | 363 * |
| 364 * | 364 * |
| 365 * | 365 * |
| 366 * Since: 0.9.2 | 366 * Since: 0.9.2 |
| 367 **/ | 367 **/ |
| 368 void | 368 HB_EXTERN void |
| 369 hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs, | 369 hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs, |
| 370 hb_unicode_compose_func_t func, | 370 hb_unicode_compose_func_t func, |
| 371 void *user_data, hb_destroy_func_t destroy); | 371 void *user_data, hb_destroy_func_t destroy); |
| 372 | 372 |
| 373 /** | 373 /** |
| 374 * hb_unicode_funcs_set_decompose_func: | 374 * hb_unicode_funcs_set_decompose_func: |
| 375 * @ufuncs: a Unicode function structure | 375 * @ufuncs: a Unicode function structure |
| 376 * @func: (closure user_data) (destroy destroy) (scope notified): | 376 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 377 * @user_data: | 377 * @user_data: |
| 378 * @destroy: | 378 * @destroy: |
| 379 * | 379 * |
| 380 * | 380 * |
| 381 * | 381 * |
| 382 * Since: 0.9.2 | 382 * Since: 0.9.2 |
| 383 **/ | 383 **/ |
| 384 void | 384 HB_EXTERN void |
| 385 hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs, | 385 hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs, |
| 386 hb_unicode_decompose_func_t func, | 386 hb_unicode_decompose_func_t func, |
| 387 void *user_data, hb_destroy_func_t destroy)
; | 387 void *user_data, hb_destroy_func_t destroy)
; |
| 388 | 388 |
| 389 /** | 389 /** |
| 390 * hb_unicode_funcs_set_decompose_compatibility_func: | 390 * hb_unicode_funcs_set_decompose_compatibility_func: |
| 391 * @ufuncs: a Unicode function structure | 391 * @ufuncs: a Unicode function structure |
| 392 * @func: (closure user_data) (destroy destroy) (scope notified): | 392 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 393 * @user_data: | 393 * @user_data: |
| 394 * @destroy: | 394 * @destroy: |
| 395 * | 395 * |
| 396 * | 396 * |
| 397 * | 397 * |
| 398 * Since: 0.9.2 | 398 * Since: 0.9.2 |
| 399 **/ | 399 **/ |
| 400 void | 400 HB_EXTERN void |
| 401 hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs, | 401 hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs, |
| 402 hb_unicode_decompose_compatib
ility_func_t func, | 402 hb_unicode_decompose_compatib
ility_func_t func, |
| 403 void *user_data, hb_destroy_f
unc_t destroy); | 403 void *user_data, hb_destroy_f
unc_t destroy); |
| 404 | 404 |
| 405 /* accessors */ | 405 /* accessors */ |
| 406 | 406 |
| 407 /** | 407 /** |
| 408 * hb_unicode_combining_class: |
| 409 * |
| 408 * Since: 0.9.2 | 410 * Since: 0.9.2 |
| 409 **/ | 411 **/ |
| 410 hb_unicode_combining_class_t | 412 HB_EXTERN hb_unicode_combining_class_t |
| 411 hb_unicode_combining_class (hb_unicode_funcs_t *ufuncs, | 413 hb_unicode_combining_class (hb_unicode_funcs_t *ufuncs, |
| 412 hb_codepoint_t unicode); | 414 hb_codepoint_t unicode); |
| 413 | 415 |
| 414 /** | 416 /** |
| 417 * hb_unicode_eastasian_width: |
| 418 * |
| 415 * Since: 0.9.2 | 419 * Since: 0.9.2 |
| 416 **/ | 420 **/ |
| 417 unsigned int | 421 HB_EXTERN unsigned int |
| 418 hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs, | 422 hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs, |
| 419 hb_codepoint_t unicode); | 423 hb_codepoint_t unicode); |
| 420 | 424 |
| 421 /** | 425 /** |
| 426 * hb_unicode_general_category: |
| 427 * |
| 422 * Since: 0.9.2 | 428 * Since: 0.9.2 |
| 423 **/ | 429 **/ |
| 424 hb_unicode_general_category_t | 430 HB_EXTERN hb_unicode_general_category_t |
| 425 hb_unicode_general_category (hb_unicode_funcs_t *ufuncs, | 431 hb_unicode_general_category (hb_unicode_funcs_t *ufuncs, |
| 426 hb_codepoint_t unicode); | 432 hb_codepoint_t unicode); |
| 427 | 433 |
| 428 /** | 434 /** |
| 435 * hb_unicode_mirroring: |
| 436 * |
| 429 * Since: 0.9.2 | 437 * Since: 0.9.2 |
| 430 **/ | 438 **/ |
| 431 hb_codepoint_t | 439 HB_EXTERN hb_codepoint_t |
| 432 hb_unicode_mirroring (hb_unicode_funcs_t *ufuncs, | 440 hb_unicode_mirroring (hb_unicode_funcs_t *ufuncs, |
| 433 hb_codepoint_t unicode); | 441 hb_codepoint_t unicode); |
| 434 | 442 |
| 435 /** | 443 /** |
| 444 * hb_unicode_script: |
| 445 * |
| 436 * Since: 0.9.2 | 446 * Since: 0.9.2 |
| 437 **/ | 447 **/ |
| 438 hb_script_t | 448 HB_EXTERN hb_script_t |
| 439 hb_unicode_script (hb_unicode_funcs_t *ufuncs, | 449 hb_unicode_script (hb_unicode_funcs_t *ufuncs, |
| 440 hb_codepoint_t unicode); | 450 hb_codepoint_t unicode); |
| 441 | 451 |
| 442 /** | 452 /** |
| 453 * hb_unicode_compose: |
| 454 * |
| 443 * Since: 0.9.2 | 455 * Since: 0.9.2 |
| 444 **/ | 456 **/ |
| 445 hb_bool_t | 457 HB_EXTERN hb_bool_t |
| 446 hb_unicode_compose (hb_unicode_funcs_t *ufuncs, | 458 hb_unicode_compose (hb_unicode_funcs_t *ufuncs, |
| 447 hb_codepoint_t a, | 459 hb_codepoint_t a, |
| 448 hb_codepoint_t b, | 460 hb_codepoint_t b, |
| 449 hb_codepoint_t *ab); | 461 hb_codepoint_t *ab); |
| 450 | 462 |
| 451 /** | 463 /** |
| 464 * hb_unicode_decompose: |
| 465 * |
| 452 * Since: 0.9.2 | 466 * Since: 0.9.2 |
| 453 **/ | 467 **/ |
| 454 hb_bool_t | 468 HB_EXTERN hb_bool_t |
| 455 hb_unicode_decompose (hb_unicode_funcs_t *ufuncs, | 469 hb_unicode_decompose (hb_unicode_funcs_t *ufuncs, |
| 456 hb_codepoint_t ab, | 470 hb_codepoint_t ab, |
| 457 hb_codepoint_t *a, | 471 hb_codepoint_t *a, |
| 458 hb_codepoint_t *b); | 472 hb_codepoint_t *b); |
| 459 | 473 |
| 460 /** | 474 /** |
| 475 * hb_unicode_decompose_compatibility: |
| 476 * |
| 461 * Since: 0.9.2 | 477 * Since: 0.9.2 |
| 462 **/ | 478 **/ |
| 463 unsigned int | 479 HB_EXTERN unsigned int |
| 464 hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs, | 480 hb_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs, |
| 465 hb_codepoint_t u, | 481 hb_codepoint_t u, |
| 466 hb_codepoint_t *decomposed); | 482 hb_codepoint_t *decomposed); |
| 467 | 483 |
| 468 HB_END_DECLS | 484 HB_END_DECLS |
| 469 | 485 |
| 470 #endif /* HB_UNICODE_H */ | 486 #endif /* HB_UNICODE_H */ |
| OLD | NEW |