Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
chord_preset.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2022 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __SETTINGS_CHORD_PRESET_H__
11#define __SETTINGS_CHORD_PRESET_H__
12
13#include "zrythm-config.h"
14
15#include <stdbool.h>
16
18#include "utils/yaml.h"
19
20typedef struct ChordPresetPack ChordPresetPack;
21
28#define CHORD_PRESET_SCHEMA_VERSION 1
29
33typedef struct ChordPreset
34{
35 int schema_version;
36
38 char * name;
39
42
46
47static const cyaml_schema_field_t chord_preset_fields_schema[] = {
48 YAML_FIELD_INT (ChordPreset, schema_version),
49 YAML_FIELD_FIXED_SIZE_PTR_ARRAY (ChordPreset, descr, chord_descriptor_schema, 12),
50 YAML_FIELD_STRING_PTR (ChordPreset, name),
51
52 CYAML_FIELD_END
53};
54
55static const cyaml_schema_value_t chord_preset_schema = {
56 YAML_VALUE_PTR (ChordPreset, chord_preset_fields_schema),
57};
58
60chord_preset_new (const char * name);
61
62NONNULL ChordPreset *
63chord_preset_clone (const ChordPreset * src);
64
70char *
72
73const char *
74chord_preset_get_name (const ChordPreset * self);
75
76void
77chord_preset_set_name (ChordPreset * self, const char * name);
78
79GMenuModel *
80chord_preset_generate_context_menu (const ChordPreset * self);
81
85NONNULL void
87
92#endif
Descriptors for chords.
char * chord_preset_get_info_text(const ChordPreset *self)
Gets informational text.
NONNULL void chord_preset_free(ChordPreset *self)
Frees the plugin setting.
#define YAML_FIELD_FIXED_SIZE_PTR_ARRAY(owner, member, schema, size)
Fixed-width array of pointers with fixed count.
Definition yaml.h:67
#define YAML_VALUE_PTR(cc, fields_schema)
Schema to be used as a pointer.
Definition yaml.h:202
A ChordDescriptor describes a chord and is not linked to any specific object by itself.
Chord preset pack.
A preset of chord descriptors.
char * name
Preset name.
ChordPresetPack * pack
Pointer to owner pack.
ChordDescriptor * descr[12]
Chord descriptors.
YAML utils.