Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
collections.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2020-2021 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __PLUGINS_PLUGIN_COLLECTIONS_H__
11#define __PLUGINS_PLUGIN_COLLECTIONS_H__
12
13#include "plugins/collection.h"
14#include "utils/yaml.h"
15
22#define PLUGIN_COLLECTIONS_SCHEMA_VERSION 1
23
27typedef struct PluginCollections
28{
31
34 int num_collections;
36
37static const cyaml_schema_field_t plugin_collections_fields_schema[] = {
38 YAML_FIELD_INT (PluginCollections, schema_version),
41 collections,
42 plugin_collection_schema),
43
44 CYAML_FIELD_END
45};
46
47static const cyaml_schema_value_t plugin_collections_schema = {
48 YAML_VALUE_PTR (PluginCollections, plugin_collections_fields_schema),
49};
50
56
57void
58plugin_collections_serialize_to_file (PluginCollections * self);
59
68void
70 PluginCollections * self,
71 const PluginCollection * collection,
72 bool serialize);
73
77const PluginCollection *
78plugin_collections_find_from_name (
79 const PluginCollections * self,
80 const char * name);
81
88void
90 PluginCollections * self,
91 PluginCollection * collection,
92 bool serialize);
93
94void
95plugin_collections_free (PluginCollections * self);
96
101#endif
Plugin collection.
void plugin_collections_add(PluginCollections *self, const PluginCollection *collection, bool serialize)
Appends a collection.
PluginCollections * plugin_collections_new(void)
Reads the file and fills up the object.
void plugin_collections_remove(PluginCollections *self, PluginCollection *collection, bool serialize)
Removes the given collection.
#define YAML_VALUE_PTR(cc, fields_schema)
Schema to be used as a pointer.
Definition yaml.h:202
#define YAML_FIELD_FIXED_SIZE_PTR_ARRAY_VAR_COUNT(owner, member, schema)
Fixed-width array of pointers with variable count.
Definition yaml.h:55
Plugin collection used in the plugin browser.
Definition collection.h:28
Serializable plugin collections.
Definition collections.h:28
PluginCollection * collections[9000]
Plugin collections.
Definition collections.h:33
int schema_version
Version of the file.
Definition collections.h:30
YAML utils.