summaryrefslogtreecommitdiff
path: root/pango/pango-layout.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-21 22:46:55 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-11-24 19:57:58 -0500
commit6349912d021a8f2cf0c963952736baed72a6aa83 (patch)
treee7026c1247f0b282190a0856b38a0e722dfbd46e /pango/pango-layout.h
parentc33714521a0139529d1c3fa7223d72108f157b95 (diff)
downloadpango-6349912d021a8f2cf0c963952736baed72a6aa83.tar.gz
Rename the serialize errors
They are produced by deserialization, so call them that.
Diffstat (limited to 'pango/pango-layout.h')
-rw-r--r--pango/pango-layout.h39
1 files changed, 26 insertions, 13 deletions
diff --git a/pango/pango-layout.h b/pango/pango-layout.h
index 3b725adc..5e8d8784 100644
--- a/pango/pango-layout.h
+++ b/pango/pango-layout.h
@@ -351,25 +351,38 @@ GSList * pango_layout_get_lines (PangoLayout *layout);
PANGO_AVAILABLE_IN_1_16
GSList * pango_layout_get_lines_readonly (PangoLayout *layout);
-#define PANGO_LAYOUT_SERIALIZE_ERROR (pango_layout_serialize_error_quark ())
+PANGO_AVAILABLE_IN_1_50
+GBytes * pango_layout_serialize (PangoLayout *layout);
-typedef enum {
- PANGO_LAYOUT_SERIALIZE_INVALID,
- PANGO_LAYOUT_SERIALIZE_INVALID_SYNTAX,
- PANGO_LAYOUT_SERIALIZE_INVALID_VALUE,
- PANGO_LAYOUT_SERIALIZE_MISSING_VALUE,
-} PangoLayoutSerializeError;
+#define PANGO_LAYOUT_DESERIALIZE_ERROR (pango_layout_deserialize_error_quark ())
-PANGO_AVAILABLE_IN_1_50
-GQuark pango_layout_serialize_error_quark (void);
+/**
+ * PangoLayoutDeserializeError:
+ * @PANGO_LAYOUT_SERIALIZE_INVALID: Unspecified error
+ * @PANGO_LAYOUT_SERIALIZE_INVALID_SYNTAX: The serialized data had
+ * the wrong structure (e.g. a member was expected to be a JSon object,
+ * but was an array)
+ * @PANGO_LAYOUT_SERIALIZE_INVALID_VALUE: A JSon value could not be
+ * interpreted
+ * @PANGO_LAYOUT_SERIALIZE_MISSING_VALUE: A required JSon member was
+ * not found
+ *
+ * Errors that can be returned by [func@Pango.Layout.deserialize].
+ */
+typedef enum {
+ PANGO_LAYOUT_DESERIALIZE_INVALID,
+ PANGO_LAYOUT_DESERIALIZE_INVALID_SYNTAX,
+ PANGO_LAYOUT_DESERIALIZE_INVALID_VALUE,
+ PANGO_LAYOUT_DESERIALIZE_MISSING_VALUE,
+} PangoLayoutDeserializeError;
PANGO_AVAILABLE_IN_1_50
-GBytes * pango_layout_serialize (PangoLayout *layout);
+GQuark pango_layout_deserialize_error_quark (void);
PANGO_AVAILABLE_IN_1_50
-PangoLayout * pango_layout_deserialize (PangoContext *context,
- GBytes *bytes,
- GError **error);
+PangoLayout * pango_layout_deserialize (PangoContext *context,
+ GBytes *bytes,
+ GError **error);
PANGO_AVAILABLE_IN_1_50
gboolean pango_layout_write_to_file (PangoLayout *layout,