summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-03-07 22:32:14 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-03-07 22:32:14 +0000
commitef9282421b00185a4962b7d22b96e979687258e2 (patch)
treeb6d0d8c700086d3141e228187693a26b102c971f /Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
parent55fbdeae2498166ec7c7301fd48d990fc9010058 (diff)
harfbuzz-1.7.6
git-svn-id: svn://tug.org/texlive/trunk@46877 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc63
1 files changed, 55 insertions, 8 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
index 0b4f871e852..07cf9d09b55 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-set.cc
@@ -50,6 +50,13 @@ hb_set_create (void)
return set;
}
+static const hb_set_t _hb_set_nil = {
+ HB_OBJECT_HEADER_STATIC,
+ true, /* in_error */
+
+ {0} /* elts */
+};
+
/**
* hb_set_get_empty:
*
@@ -60,13 +67,6 @@ hb_set_create (void)
hb_set_t *
hb_set_get_empty (void)
{
- static const hb_set_t _hb_set_nil = {
- HB_OBJECT_HEADER_STATIC,
- true, /* in_error */
-
- {0} /* elts */
- };
-
return const_cast<hb_set_t *> (&_hb_set_nil);
}
@@ -437,7 +437,9 @@ hb_set_get_max (const hb_set_t *set)
* @set: a set.
* @codepoint: (inout):
*
- *
+ * Gets the next number in @set that is greater than current value of @codepoint.
+ *
+ * Set @codepoint to %HB_SET_VALUE_INVALID to get started.
*
* Return value: whether there was a next value.
*
@@ -451,6 +453,26 @@ hb_set_next (const hb_set_t *set,
}
/**
+ * hb_set_previous:
+ * @set: a set.
+ * @codepoint: (inout):
+ *
+ * Gets the previous number in @set that is slower than current value of @codepoint.
+ *
+ * Set @codepoint to %HB_SET_VALUE_INVALID to get started.
+ *
+ * Return value: whether there was a previous value.
+ *
+ * Since: 1.8.0
+ **/
+hb_bool_t
+hb_set_previous (const hb_set_t *set,
+ hb_codepoint_t *codepoint)
+{
+ return set->previous (codepoint);
+}
+
+/**
* hb_set_next_range:
* @set: a set.
* @first: (out): output first codepoint in the range.
@@ -459,6 +481,8 @@ hb_set_next (const hb_set_t *set,
* Gets the next consecutive range of numbers in @set that
* are greater than current value of @last.
*
+ * Set @last to %HB_SET_VALUE_INVALID to get started.
+ *
* Return value: whether there was a next range.
*
* Since: 0.9.7
@@ -470,3 +494,26 @@ hb_set_next_range (const hb_set_t *set,
{
return set->next_range (first, last);
}
+
+/**
+ * hb_set_previous_range:
+ * @set: a set.
+ * @first: (inout): input current first and output first codepoint in the range.
+ * @last: (out): output last codepoint in the range.
+ *
+ * Gets the previous consecutive range of numbers in @set that
+ * are greater than current value of @last.
+ *
+ * Set @first to %HB_SET_VALUE_INVALID to get started.
+ *
+ * Return value: whether there was a previous range.
+ *
+ * Since: 1.8.0
+ **/
+hb_bool_t
+hb_set_previous_range (const hb_set_t *set,
+ hb_codepoint_t *first,
+ hb_codepoint_t *last)
+{
+ return set->previous_range (first, last);
+}