Imported Upstream version 0.9.12
[platform/upstream/harfbuzz.git] / src / hb-set.h
index 1838889..291e249 100644 (file)
@@ -65,16 +65,16 @@ hb_set_get_user_data (hb_set_t           *set,
 
 /* Returns false if allocation has failed before */
 hb_bool_t
-hb_set_allocation_successful (hb_set_t  *set);
+hb_set_allocation_successful (const hb_set_t *set);
 
 void
 hb_set_clear (hb_set_t *set);
 
 hb_bool_t
-hb_set_empty (hb_set_t *set);
+hb_set_is_empty (const hb_set_t *set);
 
 hb_bool_t
-hb_set_has (hb_set_t       *set,
+hb_set_has (const hb_set_t *set,
            hb_codepoint_t  codepoint);
 
 /* Right now limited to 16-bit integers.  Eventually will do full codepoint range, sans -1
@@ -84,47 +84,67 @@ hb_set_add (hb_set_t       *set,
            hb_codepoint_t  codepoint);
 
 void
+hb_set_add_range (hb_set_t       *set,
+                 hb_codepoint_t  first,
+                 hb_codepoint_t  last);
+
+void
 hb_set_del (hb_set_t       *set,
            hb_codepoint_t  codepoint);
 
+void
+hb_set_del_range (hb_set_t       *set,
+                 hb_codepoint_t  first,
+                 hb_codepoint_t  last);
+
 hb_bool_t
-hb_set_equal (hb_set_t *set,
-             hb_set_t *other);
+hb_set_is_equal (const hb_set_t *set,
+                const hb_set_t *other);
 
 void
-hb_set_set (hb_set_t *set,
-           hb_set_t *other);
+hb_set_set (hb_set_t       *set,
+           const hb_set_t *other);
 
 void
-hb_set_union (hb_set_t *set,
-             hb_set_t *other);
+hb_set_union (hb_set_t       *set,
+             const hb_set_t *other);
 
 void
-hb_set_intersect (hb_set_t *set,
-                 hb_set_t *other);
+hb_set_intersect (hb_set_t       *set,
+                 const hb_set_t *other);
 
 void
-hb_set_subtract (hb_set_t *set,
-                hb_set_t *other);
+hb_set_subtract (hb_set_t       *set,
+                const hb_set_t *other);
 
 void
-hb_set_symmetric_difference (hb_set_t *set,
-                            hb_set_t *other);
+hb_set_symmetric_difference (hb_set_t       *set,
+                            const hb_set_t *other);
+
+void
+hb_set_invert (hb_set_t *set);
+
+unsigned int
+hb_set_get_population (const hb_set_t *set);
 
 /* Returns -1 if set empty. */
 hb_codepoint_t
-hb_set_min (hb_set_t *set);
+hb_set_get_min (const hb_set_t *set);
 
 /* Returns -1 if set empty. */
 hb_codepoint_t
-hb_set_max (hb_set_t *set);
+hb_set_get_max (const hb_set_t *set);
 
 /* Pass -1 in to get started. */
 hb_bool_t
-hb_set_next (hb_set_t       *set,
+hb_set_next (const hb_set_t *set,
             hb_codepoint_t *codepoint);
 
-/* TODO: Add faster iteration API? */
+/* Pass -1 for first and last to get started. */
+hb_bool_t
+hb_set_next_range (const hb_set_t *set,
+                  hb_codepoint_t *first,
+                  hb_codepoint_t *last);
 
 
 HB_END_DECLS