[pango/more-introspection-fixes] Add a boxed type for PangoOTBuffer
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/more-introspection-fixes] Add a boxed type for PangoOTBuffer
- Date: Fri, 2 Aug 2019 13:42:48 +0000 (UTC)
commit 1cd573cbef97317a63920c22473f07184aa5a405
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Aug 2 14:41:40 2019 +0100
Add a boxed type for PangoOTBuffer
It's a deprecated type for a deprecated API, but without a GType the
introspection scanner doesn't know how to resolve the transfer rules
for a pointer to it.
pango/pango-ot-buffer.c | 17 +++++++++++++++++
pango/pango-ot.h | 2 ++
2 files changed, 19 insertions(+)
---
diff --git a/pango/pango-ot-buffer.c b/pango/pango-ot-buffer.c
index 334df746..87808e32 100644
--- a/pango/pango-ot-buffer.c
+++ b/pango/pango-ot-buffer.c
@@ -23,6 +23,13 @@
#include "pango-ot-private.h"
+static PangoOTBuffer * pango_ot_buffer_copy (PangoOTBuffer *buffer);
+
+G_DEFINE_BOXED_TYPE (PangoOTBuffer,
+ pango_ot_buffer,
+ pango_ot_buffer_copy,
+ pango_ot_buffer_destroy)
+
/**
* pango_ot_buffer_new
* @font: a #PangoFcFont
@@ -44,6 +51,16 @@ pango_ot_buffer_new (PangoFcFont *font)
return buffer;
}
+static PangoOTBuffer *
+pango_ot_buffer_copy (PangoOTBuffer *buffer)
+{
+ PangoOTBuffer *res = g_slice_dup (PangoOTBuffer, buffer);
+
+ res->buffer = hb_buffer_reference (buffer->buffer);
+
+ return res;
+}
+
/**
* pango_ot_buffer_destroy
* @buffer: a #PangoOTBuffer
diff --git a/pango/pango-ot.h b/pango/pango-ot.h
index 501ca8b6..98563096 100644
--- a/pango/pango-ot.h
+++ b/pango/pango-ot.h
@@ -247,6 +247,8 @@ struct _PangoOTRulesetDescription {
guint n_other_features;
};
+PANGO_DEPRECATED
+GType pango_ot_buffer_get_type (void) G_GNUC_CONST;
#define PANGO_TYPE_OT_INFO (pango_ot_info_get_type ())
#define PANGO_OT_INFO(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_OT_INFO,
PangoOTInfo))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]