summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pango/pango-script.c13
-rw-r--r--pango/pango-script.h5
2 files changed, 17 insertions, 1 deletions
diff --git a/pango/pango-script.c b/pango/pango-script.c
index f7854239..fc95309f 100644
--- a/pango/pango-script.c
+++ b/pango/pango-script.c
@@ -96,6 +96,13 @@ pango_script_for_unichar (gunichar ch)
/**********************************************************************/
+static PangoScriptIter *pango_script_iter_copy (PangoScriptIter *iter);
+
+G_DEFINE_BOXED_TYPE (PangoScriptIter,
+ pango_script_iter,
+ pango_script_iter_copy,
+ pango_script_iter_free)
+
PangoScriptIter *
_pango_script_iter_init (PangoScriptIter *iter,
const char *text,
@@ -142,6 +149,12 @@ pango_script_iter_new (const char *text,
return _pango_script_iter_init (g_slice_new (PangoScriptIter), text, length);
}
+static PangoScriptIter *
+pango_script_iter_copy (PangoScriptIter *iter)
+{
+ return g_slice_dup (PangoScriptIter, iter);
+}
+
void
_pango_script_iter_fini (PangoScriptIter *iter)
{
diff --git a/pango/pango-script.h b/pango/pango-script.h
index a5c2b497..a7ec3246 100644
--- a/pango/pango-script.h
+++ b/pango/pango-script.h
@@ -22,7 +22,7 @@
#ifndef __PANGO_SCRIPT_H__
#define __PANGO_SCRIPT_H__
-#include <glib.h>
+#include <glib-object.h>
G_BEGIN_DECLS
@@ -309,6 +309,9 @@ typedef enum { /* ISO 15924 code */
PANGO_DEPRECATED_IN_1_44_FOR(g_unichar_get_script)
PangoScript pango_script_for_unichar (gunichar ch) G_GNUC_CONST;
+PANGO_AVAILABLE_IN_1_44
+GType pango_script_iter_get_type (void) G_GNUC_CONST;
+
PANGO_AVAILABLE_IN_1_4
PangoScriptIter *pango_script_iter_new (const char *text,
int length);