Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
region_link_group_manager.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020-2021 Alexandros Theodotou <alex at zrythm dot org>
3 *
4 * This file is part of Zrythm
5 *
6 * Zrythm is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Zrythm is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
18 */
19
26#ifndef __AUDIO_REGION_LINK_GROUP_MANAGER_H__
27#define __AUDIO_REGION_LINK_GROUP_MANAGER_H__
28
30#include "utils/yaml.h"
31
38#define REGION_LINK_GROUP_MANAGER_SCHEMA_VERSION 1
39
40#define REGION_LINK_GROUP_MANAGER \
41 (PROJECT->region_link_group_manager)
42
47{
48 int schema_version;
49
52 int num_groups;
53 size_t groups_size;
55
56static const cyaml_schema_field_t
57 region_link_group_manager_fields_schema[] = {
58 YAML_FIELD_INT (RegionLinkGroupManager, schema_version),
61 groups,
62 region_link_group_schema),
63
64 CYAML_FIELD_END
65 };
66
67static const cyaml_schema_value_t
68 region_link_group_manager_schema = {
71 region_link_group_manager_fields_schema),
72 };
73
74void
75region_link_group_manager_init_loaded (
77
79region_link_group_manager_new (void);
80
84int
87
89region_link_group_manager_get_group (
91 int group_id);
92
96void
99 int group_id);
100
101NONNULL bool
102region_link_group_manager_validate (
104
105NONNULL void
106region_link_group_manager_print (
108
110region_link_group_manager_clone (RegionLinkGroupManager * src);
111
112NONNULL void
113region_link_group_manager_free (RegionLinkGroupManager * self);
114
119#endif
int region_link_group_manager_add_group(RegionLinkGroupManager *self)
Adds a group and returns its index.
void region_link_group_manager_remove_group(RegionLinkGroupManager *self, int group_id)
Removes the group.
#define YAML_VALUE_PTR(cc, fields_schema)
Schema to be used as a pointer.
Definition yaml.h:221
#define YAML_FIELD_DYN_PTR_ARRAY_VAR_COUNT_OPT(owner, member, schema)
Dynamic-width (reallocated) array of pointers with variable count, nullable.
Definition yaml.h:138
Manager of region link groups.
RegionLinkGroup ** groups
Region link groups.
A group of linked regions.
YAML utils.