1 /*
2  * libInstPatch
3  * Copyright (C) 1999-2014 Element Green <element@elementsofsound.org>
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Moderal Public License
7  * as published by the Free Software Foundation; version 2.1
8  * of the License only.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Moderal Public License for more details.
14  *
15  * You should have received a copy of the GNU Moderal Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  * 02110-1301, USA or on the web at http://www.gnu.org.
19  */
20 #ifndef __IPATCH_SF2_MOD_LIST_H__
21 #define __IPATCH_SF2_MOD_LIST_H__
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 
26 #include <libinstpatch/IpatchItem.h>
27 #include <libinstpatch/IpatchSF2Mod.h>
28 
29 /* forward type declarations */
30 
31 typedef GSList IpatchSF2ModList;
32 
33 /* GSList has a glib boxed type */
34 #define IPATCH_TYPE_SF2_MOD_LIST   (ipatch_sf2_mod_list_get_type ())
35 
36 GType ipatch_sf2_mod_list_get_type(void);
37 
38 GSList *ipatch_sf2_mod_list_duplicate(const GSList *list);
39 GSList *ipatch_sf2_mod_list_override(const GSList *alist,
40                                      const GSList *blist, gboolean copy);
41 GSList *ipatch_sf2_mod_list_override_copy(const GSList *alist, const GSList *blist);
42 void ipatch_sf2_mod_list_free(GSList *list, gboolean free_mods);
43 void ipatch_sf2_mod_list_boxed_free(GSList *list);
44 GSList *ipatch_sf2_mod_list_insert(GSList *mods, const IpatchSF2Mod *modvals, int pos);
45 GSList *ipatch_sf2_mod_list_remove(GSList *mods, const IpatchSF2Mod *modvals,
46                                    gboolean *changed);
47 gboolean ipatch_sf2_mod_list_change(GSList *mods, const IpatchSF2Mod *oldvals,
48                                     const IpatchSF2Mod *newvals);
49 GSList *ipatch_sf2_mod_list_offset(const GSList *alist, const GSList *blist);
50 G_CONST_RETURN GSList *ipatch_sf2_mod_list_get_default(void);
51 
52 #endif
53