diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-11-21 23:01:53 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-11-24 19:57:58 -0500 |
commit | c1f9c9f85bf9f400e44477304e5eb135f1183ac9 (patch) | |
tree | 76b58ba908a57ee66e513cf3965161ed7fe70977 /pango/pango-layout.h | |
parent | 12a46f672c5fb5c6232218f02018c30cd44a16e2 (diff) | |
download | pango-c1f9c9f85bf9f400e44477304e5eb135f1183ac9.tar.gz |
Add flags to serialize and deserialize
This gives us some room to add more things
to these apis, e.g. a way to store not just
the input part of a layout, but also the
output.
Diffstat (limited to 'pango/pango-layout.h')
-rw-r--r-- | pango/pango-layout.h | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/pango/pango-layout.h b/pango/pango-layout.h index 5e8d8784..e9b4710c 100644 --- a/pango/pango-layout.h +++ b/pango/pango-layout.h @@ -351,8 +351,28 @@ GSList * pango_layout_get_lines (PangoLayout *layout); PANGO_AVAILABLE_IN_1_16 GSList * pango_layout_get_lines_readonly (PangoLayout *layout); +/** + * PangoLayoutSerializeFlags: + * @PANGO_LAYOUT_SERIALIZE_DEFAULT: Default behavior + * + * Flags that influence the behavior of [method@Pango.Layout.serialize]. + * + * New members may be added to this enumeration over time. + */ +typedef enum { + PANGO_LAYOUT_SERIALIZE_DEFAULT = 0, +} PangoLayoutSerializeFlags; + +PANGO_AVAILABLE_IN_1_50 +GBytes * pango_layout_serialize (PangoLayout *layout, + PangoLayoutSerializeFlags flags); + PANGO_AVAILABLE_IN_1_50 -GBytes * pango_layout_serialize (PangoLayout *layout); +gboolean pango_layout_write_to_file (PangoLayout *layout, + PangoLayoutSerializeFlags flags, + + const char *filename, + GError **error); #define PANGO_LAYOUT_DESERIALIZE_ERROR (pango_layout_deserialize_error_quark ()) @@ -379,16 +399,24 @@ typedef enum { PANGO_AVAILABLE_IN_1_50 GQuark pango_layout_deserialize_error_quark (void); +/** + * PangoLayoutDeserializeFlags: + * @PANGO_LAYOUT_DESERIALIZE_DEFAULT: Default behavior + * + * Flags that influence the behavior of [method@Pango.Layout.deserialize]. + * + * New members may be added to this enumeration over time. + */ +typedef enum { + PANGO_LAYOUT_DESERIALIZE_DEFAULT = 0, +} PangoLayoutDeserializeFlags; + PANGO_AVAILABLE_IN_1_50 PangoLayout * pango_layout_deserialize (PangoContext *context, GBytes *bytes, + PangoLayoutDeserializeFlags flags, GError **error); -PANGO_AVAILABLE_IN_1_50 -gboolean pango_layout_write_to_file (PangoLayout *layout, - const char *filename, - GError **error); - #define PANGO_TYPE_LAYOUT_LINE (pango_layout_line_get_type ()) |