SLV2  0.6.6
collections.h
1 /* SLV2
2  * Copyright (C) 2008-2009 Dave Robillard <http://drobilla.net>
3  *
4  * This library is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the Free
6  * Software Foundation; either version 2 of the License, or (at your option)
7  * any later version.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12  * for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __SLV2_PLUGINS_H__
20 #define __SLV2_PLUGINS_H__
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #include "slv2/types.h"
27 #include "slv2/value.h"
28 
38 /* **** GENERIC COLLECTION FUNCTIONS **** */
39 
40 #define SLV2_COLLECTION(CollType, ElemType, prefix) \
41 \
42  \
46 void \
47 prefix ## _free(CollType collection); \
48 \
49 \
50  \
54 unsigned \
55 prefix ## _size(CollType collection); \
56 \
57 \
58  \
69 ElemType \
70 prefix ## _get_at(CollType collection, \
71  unsigned index);
72 
73 SLV2_COLLECTION(SLV2PluginClasses, SLV2PluginClass, slv2_plugin_classes)
74 SLV2_COLLECTION(SLV2ScalePoints, SLV2ScalePoint, slv2_scale_points)
75 SLV2_COLLECTION(SLV2Values, SLV2Value, slv2_values)
76 SLV2_COLLECTION(SLV2UIs, SLV2UI, slv2_uis)
77 
78 
79 
80 /* **** PLUGINS **** */
81 
82 
88 void
89 slv2_plugins_free(SLV2World world,
90  SLV2Plugins plugins);
91 
92 
96 unsigned
97 slv2_plugins_size(SLV2Plugins plugins);
98 
99 
109 SLV2Plugin
110 slv2_plugins_get_by_uri(SLV2Plugins plugins,
111  SLV2Value uri);
112 
113 
125 SLV2Plugin
126 slv2_plugins_get_at(SLV2Plugins plugins,
127  unsigned index);
128 
129 
130 
131 /* **** PLUGIN CLASSES **** */
132 
142 SLV2PluginClass
143 slv2_plugin_classes_get_by_uri(SLV2PluginClasses classes,
144  SLV2Value uri);
145 
146 
147 
148 /* **** SCALE POINTS **** */
149 
152 SLV2ScalePoints
154 
155 
156 
157 /* **** VALUES **** */
158 
161 SLV2Values
163 
164 
169 bool
170 slv2_values_contains(SLV2Values values, SLV2Value value);
171 
172 
173 
174 /* **** PLUGIN UIS **** */
175 
185 SLV2UI
186 slv2_uis_get_by_uri(SLV2UIs list,
187  SLV2Value uri);
188 
189 
192 #ifdef __cplusplus
193 } /* extern "C" */
194 #endif
195 
196 #endif /* __SLV2_COLLECTIONS_H__ */
SLV2PluginClass slv2_plugin_classes_get_by_uri(SLV2PluginClasses classes, SLV2Value uri)
Get a plugin class from the collection by URI.
void slv2_plugins_free(SLV2World world, SLV2Plugins plugins)
Free a plugin collection.
bool slv2_values_contains(SLV2Values values, SLV2Value value)
Return whether values contains value.
unsigned slv2_plugins_size(SLV2Plugins plugins)
Get the number of plugins in the collection.
SLV2Plugin slv2_plugins_get_by_uri(SLV2Plugins plugins, SLV2Value uri)
Get a plugin from the collection by URI.
SLV2ScalePoints slv2_scale_points_new()
Allocate a new, empty SLV2ScalePoints.
SLV2UI slv2_uis_get_by_uri(SLV2UIs list, SLV2Value uri)
Get a plugin from the list by URI.
SLV2Values slv2_values_new()
Allocate a new, empty SLV2Values.
SLV2Plugin slv2_plugins_get_at(SLV2Plugins plugins, unsigned index)
Get a plugin from the plugins by index.

Generated for SLV2 by doxygen 1.9.1