| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2012 Google, Inc. | 2 * Copyright © 2012 Google, 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. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 | 38 |
| 39 /* | 39 /* |
| 40 * Since: 0.9.21 | 40 * Since: 0.9.21 |
| 41 */ | 41 */ |
| 42 #define HB_SET_VALUE_INVALID ((hb_codepoint_t) -1) | 42 #define HB_SET_VALUE_INVALID ((hb_codepoint_t) -1) |
| 43 | 43 |
| 44 typedef struct hb_set_t hb_set_t; | 44 typedef struct hb_set_t hb_set_t; |
| 45 | 45 |
| 46 | 46 |
| 47 hb_set_t * | 47 HB_EXTERN hb_set_t * |
| 48 hb_set_create (void); | 48 hb_set_create (void); |
| 49 | 49 |
| 50 hb_set_t * | 50 HB_EXTERN hb_set_t * |
| 51 hb_set_get_empty (void); | 51 hb_set_get_empty (void); |
| 52 | 52 |
| 53 hb_set_t * | 53 HB_EXTERN hb_set_t * |
| 54 hb_set_reference (hb_set_t *set); | 54 hb_set_reference (hb_set_t *set); |
| 55 | 55 |
| 56 void | 56 HB_EXTERN void |
| 57 hb_set_destroy (hb_set_t *set); | 57 hb_set_destroy (hb_set_t *set); |
| 58 | 58 |
| 59 hb_bool_t | 59 HB_EXTERN hb_bool_t |
| 60 hb_set_set_user_data (hb_set_t *set, | 60 hb_set_set_user_data (hb_set_t *set, |
| 61 hb_user_data_key_t *key, | 61 hb_user_data_key_t *key, |
| 62 void * data, | 62 void * data, |
| 63 hb_destroy_func_t destroy, | 63 hb_destroy_func_t destroy, |
| 64 hb_bool_t replace); | 64 hb_bool_t replace); |
| 65 | 65 |
| 66 void * | 66 HB_EXTERN void * |
| 67 hb_set_get_user_data (hb_set_t *set, | 67 hb_set_get_user_data (hb_set_t *set, |
| 68 hb_user_data_key_t *key); | 68 hb_user_data_key_t *key); |
| 69 | 69 |
| 70 | 70 |
| 71 /* Returns false if allocation has failed before */ | 71 /* Returns false if allocation has failed before */ |
| 72 hb_bool_t | 72 HB_EXTERN hb_bool_t |
| 73 hb_set_allocation_successful (const hb_set_t *set); | 73 hb_set_allocation_successful (const hb_set_t *set); |
| 74 | 74 |
| 75 void | 75 HB_EXTERN void |
| 76 hb_set_clear (hb_set_t *set); | 76 hb_set_clear (hb_set_t *set); |
| 77 | 77 |
| 78 hb_bool_t | 78 HB_EXTERN hb_bool_t |
| 79 hb_set_is_empty (const hb_set_t *set); | 79 hb_set_is_empty (const hb_set_t *set); |
| 80 | 80 |
| 81 hb_bool_t | 81 HB_EXTERN hb_bool_t |
| 82 hb_set_has (const hb_set_t *set, | 82 hb_set_has (const hb_set_t *set, |
| 83 hb_codepoint_t codepoint); | 83 hb_codepoint_t codepoint); |
| 84 | 84 |
| 85 /* Right now limited to 16-bit integers. Eventually will do full codepoint rang
e, sans -1 | 85 /* Right now limited to 16-bit integers. Eventually will do full codepoint rang
e, sans -1 |
| 86 * which we will use as a sentinel. */ | 86 * which we will use as a sentinel. */ |
| 87 void | 87 HB_EXTERN void |
| 88 hb_set_add (hb_set_t *set, | 88 hb_set_add (hb_set_t *set, |
| 89 hb_codepoint_t codepoint); | 89 hb_codepoint_t codepoint); |
| 90 | 90 |
| 91 void | 91 HB_EXTERN void |
| 92 hb_set_add_range (hb_set_t *set, | 92 hb_set_add_range (hb_set_t *set, |
| 93 hb_codepoint_t first, | 93 hb_codepoint_t first, |
| 94 hb_codepoint_t last); | 94 hb_codepoint_t last); |
| 95 | 95 |
| 96 void | 96 HB_EXTERN void |
| 97 hb_set_del (hb_set_t *set, | 97 hb_set_del (hb_set_t *set, |
| 98 hb_codepoint_t codepoint); | 98 hb_codepoint_t codepoint); |
| 99 | 99 |
| 100 void | 100 HB_EXTERN void |
| 101 hb_set_del_range (hb_set_t *set, | 101 hb_set_del_range (hb_set_t *set, |
| 102 hb_codepoint_t first, | 102 hb_codepoint_t first, |
| 103 hb_codepoint_t last); | 103 hb_codepoint_t last); |
| 104 | 104 |
| 105 hb_bool_t | 105 HB_EXTERN hb_bool_t |
| 106 hb_set_is_equal (const hb_set_t *set, | 106 hb_set_is_equal (const hb_set_t *set, |
| 107 const hb_set_t *other); | 107 const hb_set_t *other); |
| 108 | 108 |
| 109 void | 109 HB_EXTERN void |
| 110 hb_set_set (hb_set_t *set, | 110 hb_set_set (hb_set_t *set, |
| 111 const hb_set_t *other); | 111 const hb_set_t *other); |
| 112 | 112 |
| 113 void | 113 HB_EXTERN void |
| 114 hb_set_union (hb_set_t *set, | 114 hb_set_union (hb_set_t *set, |
| 115 const hb_set_t *other); | 115 const hb_set_t *other); |
| 116 | 116 |
| 117 void | 117 HB_EXTERN void |
| 118 hb_set_intersect (hb_set_t *set, | 118 hb_set_intersect (hb_set_t *set, |
| 119 const hb_set_t *other); | 119 const hb_set_t *other); |
| 120 | 120 |
| 121 void | 121 HB_EXTERN void |
| 122 hb_set_subtract (hb_set_t *set, | 122 hb_set_subtract (hb_set_t *set, |
| 123 const hb_set_t *other); | 123 const hb_set_t *other); |
| 124 | 124 |
| 125 void | 125 HB_EXTERN void |
| 126 hb_set_symmetric_difference (hb_set_t *set, | 126 hb_set_symmetric_difference (hb_set_t *set, |
| 127 const hb_set_t *other); | 127 const hb_set_t *other); |
| 128 | 128 |
| 129 void | 129 HB_EXTERN void |
| 130 hb_set_invert (hb_set_t *set); | 130 hb_set_invert (hb_set_t *set); |
| 131 | 131 |
| 132 unsigned int | 132 HB_EXTERN unsigned int |
| 133 hb_set_get_population (const hb_set_t *set); | 133 hb_set_get_population (const hb_set_t *set); |
| 134 | 134 |
| 135 /* Returns -1 if set empty. */ | 135 /* Returns -1 if set empty. */ |
| 136 hb_codepoint_t | 136 HB_EXTERN hb_codepoint_t |
| 137 hb_set_get_min (const hb_set_t *set); | 137 hb_set_get_min (const hb_set_t *set); |
| 138 | 138 |
| 139 /* Returns -1 if set empty. */ | 139 /* Returns -1 if set empty. */ |
| 140 hb_codepoint_t | 140 HB_EXTERN hb_codepoint_t |
| 141 hb_set_get_max (const hb_set_t *set); | 141 hb_set_get_max (const hb_set_t *set); |
| 142 | 142 |
| 143 /* Pass -1 in to get started. */ | 143 /* Pass -1 in to get started. */ |
| 144 hb_bool_t | 144 HB_EXTERN hb_bool_t |
| 145 hb_set_next (const hb_set_t *set, | 145 hb_set_next (const hb_set_t *set, |
| 146 hb_codepoint_t *codepoint); | 146 hb_codepoint_t *codepoint); |
| 147 | 147 |
| 148 /* Pass -1 for first and last to get started. */ | 148 /* Pass -1 for first and last to get started. */ |
| 149 hb_bool_t | 149 HB_EXTERN hb_bool_t |
| 150 hb_set_next_range (const hb_set_t *set, | 150 hb_set_next_range (const hb_set_t *set, |
| 151 hb_codepoint_t *first, | 151 hb_codepoint_t *first, |
| 152 hb_codepoint_t *last); | 152 hb_codepoint_t *last); |
| 153 | 153 |
| 154 | 154 |
| 155 HB_END_DECLS | 155 HB_END_DECLS |
| 156 | 156 |
| 157 #endif /* HB_SET_H */ | 157 #endif /* HB_SET_H */ |
| OLD | NEW |