Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
chord_preset_pack_manager.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2022-2023 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
10#ifndef __SETTINGS_CHORD_PRESET_PACK_MANAGERH__
11#define __SETTINGS_CHORD_PRESET_PACK_MANAGERH__
12
13#include "zrythm-config.h"
14
15#include <stdbool.h>
16
18
25#define CHORD_PRESET_PACK_MANAGER (ZRYTHM->chord_preset_pack_manager)
26
31{
35 GPtrArray * pset_packs;
37
45chord_preset_pack_manager_new (bool scan_for_packs);
46
47int
48chord_preset_pack_manager_get_num_packs (const ChordPresetPackManager * self);
49
51chord_preset_pack_manager_get_pack_at (
52 const ChordPresetPackManager * self,
53 int idx);
54
55NONNULL ChordPresetPack *
56chord_preset_pack_manager_get_pack_for_preset (
58 const ChordPreset * pset);
59
60int
61chord_preset_pack_manager_get_pack_index (
63 ChordPresetPack * pack);
64
68int
71 ChordPreset * pset);
72
76void
79 ChordPresetPack * pack,
80 const ChordPreset * pset,
81 bool serialize);
82
86void
89 const ChordPresetPack * pack,
90 bool serialize);
91
92void
93chord_preset_pack_manager_delete_pack (
95 ChordPresetPack * pack,
96 bool serialize);
97
98void
99chord_preset_pack_manager_delete_preset (
101 ChordPreset * pset,
102 bool serialize);
103
109WARN_UNUSED_RESULT bool
112 GError ** error);
113
114void
115chord_preset_pack_manager_free (const ChordPresetPackManager * self);
116
121#endif
Chord preset pack.
void chord_preset_pack_manager_add_preset(ChordPresetPackManager *self, ChordPresetPack *pack, const ChordPreset *pset, bool serialize)
Add a copy of the given preset.
WARN_UNUSED_RESULT bool chord_preset_pack_manager_serialize(ChordPresetPackManager *self, GError **error)
Serializes the chord presets.
int chord_preset_pack_manager_get_pset_index(ChordPresetPackManager *self, ChordPreset *pset)
Returns the preset index in its pack.
ChordPresetPackManager * chord_preset_pack_manager_new(bool scan_for_packs)
Creates a new chord preset pack manager.
void chord_preset_pack_manager_add_pack(ChordPresetPackManager *self, const ChordPresetPack *pack, bool serialize)
Add a copy of the given pack.
Chord preset pack manager.
GPtrArray * pset_packs
Scanned preset packs.
Chord preset pack.
A preset of chord descriptors.