Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
extra.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __IO_SERIALIZATION_EXTRA_H__
11#define __IO_SERIALIZATION_EXTRA_H__
12
13#include "utils/types.h"
14
15#include <glib.h>
16
17#include <yyjson.h>
18
19TYPEDEF_STRUCT_UNDERSCORED (GdkRGBA);
20TYPEDEF_STRUCT (Position);
21TYPEDEF_STRUCT (CurveOptions);
22TYPEDEF_STRUCT (ChordDescriptor);
23TYPEDEF_STRUCT (Stack);
24
25bool
26gdk_rgba_serialize_to_json (
27 yyjson_mut_doc * doc,
28 yyjson_mut_val * rgba_obj,
29 const GdkRGBA * rgba,
30 GError ** error);
31
32bool
33position_serialize_to_json (
34 yyjson_mut_doc * doc,
35 yyjson_mut_val * pos_obj,
36 const Position * pos,
37 GError ** error);
38
39bool
40curve_options_serialize_to_json (
41 yyjson_mut_doc * doc,
42 yyjson_mut_val * opts_obj,
43 const CurveOptions * opts,
44 GError ** error);
45
46bool
47stack_serialize_to_json (
48 yyjson_mut_doc * doc,
49 yyjson_mut_val * stack_obj,
50 const Stack * stack,
51 GError ** error);
52
53bool
54gdk_rgba_deserialize_from_json (
55 yyjson_doc * doc,
56 yyjson_val * rgba_obj,
57 GdkRGBA * rgba,
58 GError ** error);
59
60bool
61position_deserialize_from_json (
62 yyjson_doc * doc,
63 yyjson_val * pos_obj,
64 Position * pos,
65 GError ** error);
66
67bool
68curve_options_deserialize_from_json (
69 yyjson_doc * doc,
70 yyjson_val * opts_obj,
71 CurveOptions * opts,
72 GError ** error);
73
74bool
75stack_deserialize_from_json (
76 yyjson_doc * doc,
77 yyjson_val * stack_obj,
78 Stack * stack,
79 GError ** error);
80
81#endif // __IO_SERIALIZATION_EXTRA_H__
A ChordDescriptor describes a chord and is not linked to any specific object by itself.
Curve options.
Definition curve.h:105
A Position is made up of bars.beats.sixteenths.ticks.
Definition position.h:124
Stack implementation.
Definition stack.h:32
Custom types.