SLV2 0.6.6
collections.h
00001 /* SLV2
00002  * Copyright (C) 2008-2009 Dave Robillard <http://drobilla.net>
00003  *
00004  * This library is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU General Public License as published by the Free
00006  * Software Foundation; either version 2 of the License, or (at your option)
00007  * any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00012  * for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License along
00015  * with this program; if not, write to the Free Software Foundation, Inc.,
00016  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
00017  */
00018 
00019 #ifndef __SLV2_PLUGINS_H__
00020 #define __SLV2_PLUGINS_H__
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026 #include "slv2/types.h"
00027 #include "slv2/value.h"
00028 
00038 /* **** GENERIC COLLECTION FUNCTIONS **** */
00039 
00040 #define SLV2_COLLECTION(CollType, ElemType, prefix) \
00041 \
00042  \
00046 void \
00047 prefix ## _free(CollType collection); \
00048 \
00049 \
00050  \
00054 unsigned \
00055 prefix ## _size(CollType collection); \
00056 \
00057 \
00058  \
00069 ElemType \
00070 prefix ## _get_at(CollType collection, \
00071                   unsigned    index);
00072 
00073 SLV2_COLLECTION(SLV2PluginClasses, SLV2PluginClass, slv2_plugin_classes)
00074 SLV2_COLLECTION(SLV2ScalePoints, SLV2ScalePoint, slv2_scale_points)
00075 SLV2_COLLECTION(SLV2Values, SLV2Value, slv2_values)
00076 SLV2_COLLECTION(SLV2UIs, SLV2UI, slv2_uis)
00077 
00078 
00079 
00080 /* **** PLUGINS **** */
00081 
00088 void
00089 slv2_plugins_free(SLV2World   world,
00090                   SLV2Plugins plugins);
00091 
00092 
00096 unsigned
00097 slv2_plugins_size(SLV2Plugins plugins);
00098 
00099 
00109 SLV2Plugin
00110 slv2_plugins_get_by_uri(SLV2Plugins plugins,
00111                         SLV2Value   uri);
00112 
00113 
00125 SLV2Plugin
00126 slv2_plugins_get_at(SLV2Plugins plugins,
00127                     unsigned    index);
00128 
00129 
00130 
00131 /* **** PLUGIN CLASSES **** */
00132 
00142 SLV2PluginClass
00143 slv2_plugin_classes_get_by_uri(SLV2PluginClasses classes,
00144                                SLV2Value         uri);
00145 
00146 
00147 
00148 /* **** SCALE POINTS **** */
00149 
00152 SLV2ScalePoints
00153 slv2_scale_points_new();
00154 
00155 
00156 
00157 /* **** VALUES **** */
00158 
00161 SLV2Values
00162 slv2_values_new();
00163 
00164 
00169 bool
00170 slv2_values_contains(SLV2Values values, SLV2Value value);
00171 
00172 
00173 
00174 /* **** PLUGIN UIS **** */
00175 
00185 SLV2UI
00186 slv2_uis_get_by_uri(SLV2UIs   list,
00187                     SLV2Value uri);
00188 
00189 
00192 #ifdef __cplusplus
00193 } /* extern "C" */
00194 #endif
00195 
00196 #endif /* __SLV2_COLLECTIONS_H__ */

Generated for SLV2 by doxygen 1.7.4