[gegl] gegl: add documentation for serialization functions
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl: add documentation for serialization functions
- Date: Wed, 19 Apr 2017 21:57:08 +0000 (UTC)
commit 456ad7d8ec4bbbb9f74fc824102259e3fe55ab10
Author: Øyvind Kolås <pippin gimp org>
Date: Wed Apr 19 23:55:37 2017 +0200
gegl: add documentation for serialization functions
gegl/gegl-serialize.c | 4 +-
gegl/gegl-utils.h | 63 ++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 59 insertions(+), 8 deletions(-)
---
diff --git a/gegl/gegl-serialize.c b/gegl/gegl-serialize.c
index edfffc1..e39570b 100644
--- a/gegl/gegl-serialize.c
+++ b/gegl/gegl-serialize.c
@@ -896,7 +896,7 @@ gegl_serialize (GeglNode *start,
}
GeglNode *
-gegl_node_new_from_serialized (const gchar *xmldata,
+gegl_node_new_from_serialized (const gchar *chaindata,
const gchar *path_root)
{
GeglNode *ret;
@@ -908,7 +908,7 @@ gegl_node_new_from_serialized (const gchar *xmldata,
gegl_node_set (foo, "operation", "gegl:nop", NULL);
gegl_node_link_many (foo, ret, NULL);
- gegl_create_chain (xmldata, foo, ret, 0, 1024, NULL);
+ gegl_create_chain (chaindata, foo, ret, 0, 1024, NULL);
return ret;
}
diff --git a/gegl/gegl-utils.h b/gegl/gegl-utils.h
index d087d00..213574d 100644
--- a/gegl/gegl-utils.h
+++ b/gegl/gegl-utils.h
@@ -254,7 +254,7 @@ void gegl_memset_pattern (void * dst_ptr,
#define GEGL_FLOAT_IS_ZERO(value) (_gegl_float_epsilon_zero ((value)))
#define GEGL_FLOAT_EQUAL(v1, v2) (_gegl_float_epsilon_equal ((v1), (v2)))
-/***
+/**
*/
gint _gegl_float_epsilon_zero (float value);
gint _gegl_float_epsilon_equal (float v1,
@@ -267,11 +267,62 @@ typedef enum GeglSerializeFlag {
} GeglSerializeFlag;
/**
- */
-void gegl_create_chain_argv (char **ops, GeglNode *start, GeglNode *proxy, double time, int rel_dim, GError
**error);
-void gegl_create_chain (const char *str, GeglNode *op_start, GeglNode *op_end, double time, int rel_dim,
GError **error);
-gchar *gegl_serialize (GeglNode *start, GeglNode *end, const char *basepath, GeglSerializeFlag
serialize_flags);
-GeglNode *gegl_node_new_from_serialized (const gchar *xmldata,
+ * gegl_create_chain_argv:
+ * @ops: an argv style, NULL terminated array of arguments
+ * @op_start: node to pass in as input of chain
+ * @op_end: node to get processed data
+ * @time: the time to use for interpolatino of keyframed values
+ * @rel_dim: relative dimension to scale rel suffixed values by
+ * @error: error for signalling parsing errors
+ *
+ * Create a node chain from argv style list of op data.
+ */
+void gegl_create_chain_argv (char **ops,
+ GeglNode *op_start,
+ GeglNode *op_end,
+ double time,
+ int rel_dim,
+ GError **error);
+/**
+ * gegl_create_chain:
+ * @ops: an argv style, NULL terminated array of arguments
+ * @op_start: node to pass in as input of chain
+ * @op_end: node to get processed data
+ * @time: the time to use for interpolatino of keyframed values
+ * @rel_dim: relative dimension to scale rel suffixed values by
+ * @error: error for signalling parsing errors
+ *
+ * Create a node chain from an unparsed commandline string.
+ */
+void gegl_create_chain (const char *str,
+ GeglNode *op_start,
+ GeglNode *op_end,
+ double time,
+ int rel_dim,
+ GError **error);
+
+/**
+ * gegl_serialize:
+ * @start: first node in chain to serialize
+ * @end: last node in chain to serialize
+ * @basepath: top-level absolute path to turn into relative root
+ * @serialize_flags: anded together combination of:
+ * GEGL_SERIALIZE_TRIM_DEFAULTS, GEGL_SERIALIZE_VERSION, GEGL_SERIALIZE_INDENT.
+ */
+
+gchar *gegl_serialize (GeglNode *start,
+ GeglNode *end,
+ const char *basepath,
+ GeglSerializeFlag serialize_flags);
+
+/* gegl_node_new_from_serialized:
+ * @chaindata: string of chain serialized to parse.
+ * @path_root: absolute file system root to use as root for relative paths.
+ *
+ * create a composition from chain serialization, creating end-points for
+ * chain as/if needed.
+ */
+GeglNode *gegl_node_new_from_serialized (const gchar *chaindata,
const gchar *path_root);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]