OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Red Hat, Inc. | 2 * Copyright © 2009 Red Hat, Inc. |
3 * | 3 * |
4 * This is part of HarfBuzz, a text shaping library. | 4 * This is part of HarfBuzz, a text shaping library. |
5 * | 5 * |
6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
10 * all copies of this software. | 10 * all copies of this software. |
11 * | 11 * |
12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR | 12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR |
(...skipping 25 matching lines...) Expand all Loading... |
38 HB_MEMORY_MODE_WRITABLE, | 38 HB_MEMORY_MODE_WRITABLE, |
39 HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE | 39 HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE |
40 } hb_memory_mode_t; | 40 } hb_memory_mode_t; |
41 | 41 |
42 typedef struct _hb_blob_t hb_blob_t; | 42 typedef struct _hb_blob_t hb_blob_t; |
43 | 43 |
44 hb_blob_t * | 44 hb_blob_t * |
45 hb_blob_create (const char *data, | 45 hb_blob_create (const char *data, |
46 unsigned int length, | 46 unsigned int length, |
47 hb_memory_mode_t mode, | 47 hb_memory_mode_t mode, |
48 » » hb_destroy_func_t destroy, | 48 » » void *user_data, |
49 » » void *user_data); | 49 » » hb_destroy_func_t destroy); |
50 | 50 |
51 hb_blob_t * | 51 hb_blob_t * |
52 hb_blob_create_sub_blob (hb_blob_t *parent, | 52 hb_blob_create_sub_blob (hb_blob_t *parent, |
53 unsigned int offset, | 53 unsigned int offset, |
54 unsigned int length); | 54 unsigned int length); |
55 | 55 |
56 hb_blob_t * | 56 hb_blob_t * |
57 hb_blob_create_empty (void); | 57 hb_blob_get_empty (void); |
58 | 58 |
59 hb_blob_t * | 59 hb_blob_t * |
60 hb_blob_reference (hb_blob_t *blob); | 60 hb_blob_reference (hb_blob_t *blob); |
61 | 61 |
62 unsigned int | 62 void |
63 hb_blob_get_reference_count (hb_blob_t *blob); | 63 hb_blob_destroy (hb_blob_t *blob); |
| 64 |
| 65 hb_bool_t |
| 66 hb_blob_set_user_data (hb_blob_t *blob, |
| 67 » » hb_user_data_key_t *key, |
| 68 » » void * data, |
| 69 » » hb_destroy_func_t destroy, |
| 70 » » hb_bool_t replace); |
| 71 |
| 72 |
| 73 void * |
| 74 hb_blob_get_user_data (hb_blob_t *blob, |
| 75 » » hb_user_data_key_t *key); |
| 76 |
64 | 77 |
65 void | 78 void |
66 hb_blob_destroy (hb_blob_t *blob); | 79 hb_blob_make_immutable (hb_blob_t *blob); |
| 80 |
| 81 hb_bool_t |
| 82 hb_blob_is_immutable (hb_blob_t *blob); |
| 83 |
67 | 84 |
68 unsigned int | 85 unsigned int |
69 hb_blob_get_length (hb_blob_t *blob); | 86 hb_blob_get_length (hb_blob_t *blob); |
70 | 87 |
71 const char * | 88 const char * |
72 hb_blob_lock (hb_blob_t *blob); | 89 hb_blob_get_data (hb_blob_t *blob, unsigned int *length); |
73 | 90 |
74 void | 91 char * |
75 hb_blob_unlock (hb_blob_t *blob); | 92 hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length); |
76 | |
77 hb_bool_t | |
78 hb_blob_is_writable (hb_blob_t *blob); | |
79 | |
80 hb_bool_t | |
81 hb_blob_try_writable_inplace (hb_blob_t *blob); | |
82 | |
83 hb_bool_t | |
84 hb_blob_try_writable (hb_blob_t *blob); | |
85 | 93 |
86 | 94 |
87 HB_END_DECLS | 95 HB_END_DECLS |
88 | 96 |
89 #endif /* HB_BLOB_H */ | 97 #endif /* HB_BLOB_H */ |
OLD | NEW |