QtBase  v6.3.1
hb-set.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 Google, Inc.
3  *
4  * This is part of HarfBuzz, a text shaping library.
5  *
6  * Permission is hereby granted, without written agreement and without
7  * license or royalty fees, to use, copy, modify, and distribute this
8  * software and its documentation for any purpose, provided that the
9  * above copyright notice and the following two paragraphs appear in
10  * all copies of this software.
11  *
12  * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15  * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
16  * DAMAGE.
17  *
18  * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21  * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
23  *
24  * Google Author(s): Behdad Esfahbod
25  */
26 
27 #if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
28 #error "Include <hb.h> instead."
29 #endif
30 
31 #ifndef HB_SET_H
32 #define HB_SET_H
33 
34 #include "hb-common.h"
35 
37 
38 
46 #define HB_SET_VALUE_INVALID ((hb_codepoint_t) -1)
47 
57 typedef struct hb_set_t hb_set_t;
58 
59 
61 hb_set_create (void);
62 
64 hb_set_get_empty (void);
65 
68 
69 HB_EXTERN void
71 
75  void * data,
77  hb_bool_t replace);
78 
79 HB_EXTERN void *
82 
83 
84 /* Returns false if allocation has failed before */
87 
89 hb_set_copy (const hb_set_t *set);
90 
91 HB_EXTERN void
93 
96 
97 HB_EXTERN void
99 
101 hb_set_has (const hb_set_t *set,
102  hb_codepoint_t codepoint);
103 
104 HB_EXTERN void
106  hb_codepoint_t codepoint);
107 
108 HB_EXTERN void
111  hb_codepoint_t last);
112 
113 HB_EXTERN void
115  const hb_codepoint_t *sorted_codepoints,
116  unsigned int num_codepoints);
117 
118 HB_EXTERN void
120  hb_codepoint_t codepoint);
121 
122 HB_EXTERN void
125  hb_codepoint_t last);
126 
129  const hb_set_t *other);
130 
133  const hb_set_t *larger_set);
134 
135 HB_EXTERN void
137  const hb_set_t *other);
138 
139 HB_EXTERN void
141  const hb_set_t *other);
142 
143 HB_EXTERN void
145  const hb_set_t *other);
146 
147 HB_EXTERN void
149  const hb_set_t *other);
150 
151 HB_EXTERN void
153  const hb_set_t *other);
154 
155 HB_EXTERN unsigned int
157 
158 /* Returns HB_SET_VALUE_INVALID if set empty. */
160 hb_set_get_min (const hb_set_t *set);
161 
162 /* Returns HB_SET_VALUE_INVALID if set empty. */
164 hb_set_get_max (const hb_set_t *set);
165 
166 /* Pass HB_SET_VALUE_INVALID in to get started. */
168 hb_set_next (const hb_set_t *set,
169  hb_codepoint_t *codepoint);
170 
171 /* Pass HB_SET_VALUE_INVALID in to get started. */
174  hb_codepoint_t *codepoint);
175 
176 /* Pass HB_SET_VALUE_INVALID for first and last to get started. */
180  hb_codepoint_t *last);
181 
182 /* Pass HB_SET_VALUE_INVALID for first and last to get started. */
186  hb_codepoint_t *last);
187 
188 /* Pass HB_SET_VALUE_INVALID in to get started. */
189 HB_EXTERN unsigned int
191  hb_codepoint_t codepoint,
193  unsigned int size);
194 
196 
197 #endif /* HB_SET_H */
GLuint64 key
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint first
void(* hb_destroy_func_t)(void *user_data)
Definition: hb-common.h:771
HB_BEGIN_DECLS typedef int hb_bool_t
Definition: hb-common.h:97
uint32_t hb_codepoint_t
Definition: hb-common.h:106
#define HB_BEGIN_DECLS
Definition: hb-common.h:45
#define HB_END_DECLS
Definition: hb-common.h:46
#define HB_EXTERN
Definition: hb-common.h:37
HB_EXTERN hb_font_get_glyph_func_t void hb_destroy_func_t destroy
HB_EXTERN hb_bool_t hb_set_previous_range(const hb_set_t *set, hb_codepoint_t *first, hb_codepoint_t *last)
Definition: hb-set.cc:611
HB_EXTERN hb_bool_t hb_set_previous(const hb_set_t *set, hb_codepoint_t *codepoint)
Definition: hb-set.cc:564
HB_EXTERN hb_set_t * hb_set_get_empty(void)
Definition: hb-set.cc:74
HB_EXTERN hb_set_t * hb_set_reference(hb_set_t *set)
Definition: hb-set.cc:90
HB_EXTERN void hb_set_del(hb_set_t *set, hb_codepoint_t codepoint)
Definition: hb-set.cc:312
HB_EXTERN void hb_set_invert(hb_set_t *set)
Definition: hb-set.cc:474
HB_EXTERN hb_bool_t hb_set_has(const hb_set_t *set, hb_codepoint_t codepoint)
Definition: hb-set.cc:236
HB_EXTERN void hb_set_add_sorted_array(hb_set_t *set, const hb_codepoint_t *sorted_codepoints, unsigned int num_codepoints)
Definition: hb-set.cc:272
HB_EXTERN hb_bool_t hb_set_is_subset(const hb_set_t *set, const hb_set_t *larger_set)
Definition: hb-set.cc:373
HB_EXTERN hb_bool_t hb_set_next(const hb_set_t *set, hb_codepoint_t *codepoint)
Definition: hb-set.cc:543
HB_EXTERN void hb_set_destroy(hb_set_t *set)
Definition: hb-set.cc:106
HB_EXTERN hb_bool_t hb_set_next_range(const hb_set_t *set, hb_codepoint_t *first, hb_codepoint_t *last)
Definition: hb-set.cc:587
HB_EXTERN hb_bool_t hb_set_is_empty(const hb_set_t *set)
Definition: hb-set.cc:219
HB_EXTERN void hb_set_clear(hb_set_t *set)
Definition: hb-set.cc:202
HB_EXTERN hb_codepoint_t hb_set_get_max(const hb_set_t *set)
Definition: hb-set.cc:523
HB_EXTERN hb_bool_t hb_set_set_user_data(hb_set_t *set, hb_user_data_key_t *key, void *data, hb_destroy_func_t destroy, hb_bool_t replace)
Definition: hb-set.cc:130
HB_EXTERN hb_codepoint_t hb_set_get_min(const hb_set_t *set)
Definition: hb-set.cc:507
HB_EXTERN hb_bool_t hb_set_is_equal(const hb_set_t *set, const hb_set_t *other)
Definition: hb-set.cc:355
HB_EXTERN void hb_set_subtract(hb_set_t *set, const hb_set_t *other)
Definition: hb-set.cc:440
HB_EXTERN void hb_set_del_range(hb_set_t *set, hb_codepoint_t first, hb_codepoint_t last)
Definition: hb-set.cc:334
HB_EXTERN unsigned int hb_set_get_population(const hb_set_t *set)
Definition: hb-set.cc:491
HB_EXTERN hb_bool_t hb_set_allocation_successful(const hb_set_t *set)
Definition: hb-set.cc:170
HB_EXTERN void hb_set_symmetric_difference(hb_set_t *set, const hb_set_t *other)
Definition: hb-set.cc:458
HB_EXTERN unsigned int hb_set_next_many(const hb_set_t *set, hb_codepoint_t codepoint, hb_codepoint_t *out, unsigned int size)
Definition: hb-set.cc:635
HB_EXTERN void hb_set_add_range(hb_set_t *set, hb_codepoint_t first, hb_codepoint_t last)
Definition: hb-set.cc:294
HB_EXTERN void hb_set_intersect(hb_set_t *set, const hb_set_t *other)
Definition: hb-set.cc:423
HB_EXTERN void hb_set_union(hb_set_t *set, const hb_set_t *other)
Definition: hb-set.cc:406
HB_EXTERN void * hb_set_get_user_data(hb_set_t *set, hb_user_data_key_t *key)
Definition: hb-set.cc:152
HB_EXTERN hb_set_t * hb_set_copy(const hb_set_t *set)
Definition: hb-set.cc:186
HB_EXTERN void hb_set_add(hb_set_t *set, hb_codepoint_t codepoint)
Definition: hb-set.cc:252
HB_EXTERN hb_set_t * hb_set_create(void)
Definition: hb-set.cc:52
HB_EXTERN void hb_set_set(hb_set_t *set, const hb_set_t *other)
Definition: hb-set.cc:389
QFuture< QSet< QChar > > set
[10]
QTextStream out(stdout)
[7]
QSharedPointer< T > other(t)
[5]