/usr/include/lv2dynparam1/lv2dynparam/plugin.h is in liblv2dynparam1-dev 2-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | /* -*- Mode: C ; c-basic-offset: 2 -*- */
/*****************************************************************************
*
* This file is part of lv2dynparam plugin library
*
* Copyright (C) 2006,2007,2008,2009 Nedko Arnaudov <nedko@arnaudov.name>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
*****************************************************************************/
/**
* @file plugin.h
* @brief Interface to LV2 dynparam extension plugin helper library
*/
#ifndef DYNPARAM_H__84DA2DA3_61BD_45AC_B202_6A08F27D56F5__INCLUDED
#define DYNPARAM_H__84DA2DA3_61BD_45AC_B202_6A08F27D56F5__INCLUDED
/**
* Call this function to obtain pointer to data for LV2 dynparam extension.
* This pointer must be returned by LV2 extension_data() called for LV2DYNPARAM_URI
*
* @return The extension data for LV2 dynparam extension.
*/
const void *
get_lv2dynparam_plugin_extension_data(void);
/** handle to plugin helper library instance */
typedef void * lv2dynparam_plugin_instance;
/** handle to plugin helper library representation of parameter */
typedef void * lv2dynparam_plugin_parameter;
/** handle to plugin helper library representation of group */
typedef void * lv2dynparam_plugin_group;
/**
* Call this function to instantiate LV2 dynparams extension for particular plugin.
* This function should be called from LV2 instatiate() function.
*
* @param instance Handle of LV2 plugin instance for which extension is being initialized.
* @param host_features_ptr_ptr host features as provided to LV2 instantiate() function
* @param root_group_name Name of the root group
* @param instance_ptr Pointer to variable receiving handle to plugin helper library instance.
*
* @return Success status
* @retval true - success
* @retval false - error
*/
bool
lv2dynparam_plugin_instantiate(
LV2_Handle instance,
const LV2_Feature * const * host_features_ptr_ptr,
const char * root_group_name,
lv2dynparam_plugin_instance * instance_ptr);
/**
* Call this function to cleanup previously instatiated extension for particular plugin.
* This function should be called from LV2 cleanup() function.
*
* @param instance Handle to instance received from lv2dynparam_plugin_instantiate()
*/
void
lv2dynparam_plugin_cleanup(
lv2dynparam_plugin_instance instance);
/**
* Type for callback function to be called by helper library when boolean parameter value is changed by host.
* Callee is not allowed to sleep/lock in this callback.
*
* @param context context supplied by plugin when parameter was added to helper library
* @param value new value of changed parameter
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
typedef bool
(*lv2dynparam_plugin_param_boolean_changed)(
void * context,
bool value);
/**
* Type for callback function to be called by helper library when float parameter value is changed by host.
* Callee is not allowed to sleep/lock in this callback.
*
* @param context context supplied by plugin when parameter was added to helper library
* @param value new value of changed parameter
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
typedef bool
(*lv2dynparam_plugin_param_float_changed)(
void * context,
float value);
/**
* Type for callback function to be called by helper library when enumeration parameter value is changed by host.
* Callee is not allowed to sleep/lock in this callback.
*
* @param context context supplied by plugin when parameter was added to helper library
* @param value new value of changed parameter
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
typedef bool
(*lv2dynparam_plugin_param_enum_changed)(
void * context,
const char * value,
unsigned int value_index);
/**
* Type for callback function to be called by helper library when integer parameter value is changed by host.
* Callee is not allowed to sleep/lock in this callback.
*
* @param context context supplied by plugin when parameter was added to helper library
* @param value new value of changed parameter
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
typedef bool
(*lv2dynparam_plugin_param_int_changed)(
void * context,
int value);
/**
* Call this function to add new group.
* This function will not sleep/lock. It is safe to call it from callbacks
* for parameter changes and command executions.
*
* @param instance Handle to instance received from lv2dynparam_plugin_instantiate()
* @param parent_group Parent group, NULL for root group
* @param name Human readble name of group to add
* @param hints_ptr Pointer to group hints. Can be NULL (no hints).
* @param group_ptr Pointer to variable receiving handle to plugin helper library representation of group
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
bool
lv2dynparam_plugin_group_add(
lv2dynparam_plugin_instance instance,
lv2dynparam_plugin_group parent_group,
const char * name,
const struct lv2dynparam_hints * hints_ptr,
lv2dynparam_plugin_group * group_ptr);
/**
* Call this function to add new boolean parameter.
* This function will not sleep/lock. It is safe to call it from callbacks
* for parameter changes and command executions.
*
* @param instance Handle to instance received from lv2dynparam_plugin_instantiate()
* @param group Parent group, NULL for root group
* @param name Human readble name of group to add
* @param hints_ptr Pointer to group hints. Can be NULL (no hints).
* @param value initial value of the parameter
* @param callback callback to be called when host requests value change
* @param callback_context context to be supplied as parameter to function supplied by @c callback parameter
* @param param_ptr Pointer to variable receiving handle to plugin helper library representation of parameter
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
bool
lv2dynparam_plugin_param_boolean_add(
lv2dynparam_plugin_instance instance,
lv2dynparam_plugin_group group,
const char * name,
const struct lv2dynparam_hints * hints_ptr,
int value,
lv2dynparam_plugin_param_boolean_changed callback,
void * callback_context,
lv2dynparam_plugin_parameter * param_ptr);
/**
* Call this function to add new float parameter.
* This function will not sleep/lock. It is safe to call it from callbacks
* for parameter changes and command executions.
*
* @param instance Handle to instance received from lv2dynparam_plugin_instantiate()
* @param group Parent group, NULL for root group
* @param name Human readble name of group to add
* @param hints_ptr Pointer to group hints. Can be NULL (no hints).
* @param value initial value of the parameter
* @param min minimum allowed value of the parameter
* @param max maximum allowed value of the parameter
* @param callback callback to be called when host requests value change
* @param callback_context context to be supplied as parameter to function supplied by @c callback parameter
* @param param_ptr Pointer to variable receiving handle to plugin helper library representation of parameter
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
bool
lv2dynparam_plugin_param_float_add(
lv2dynparam_plugin_instance instance,
lv2dynparam_plugin_group group,
const char * name,
const struct lv2dynparam_hints * hints_ptr,
float value,
float min,
float max,
lv2dynparam_plugin_param_float_changed callback,
void * callback_context,
lv2dynparam_plugin_parameter * param_ptr);
/**
* Call this function to add new enumeration parameter.
* This function will not sleep/lock. It is safe to call it from callbacks
* for parameter changes and command executions.
*
* @param instance Handle to instance received from lv2dynparam_plugin_instantiate()
* @param group Parent group, NULL for root group
* @param name Human readble name of group to add
* @param hints_ptr Pointer to group hints. Can be NULL (no hints).
* @param values_ptr_ptr Pointer to array of strings containing enumeration valid values.
* @param values_count Number of strings in the array pointed by the @c values_ptr_ptr parameter
* @param initial_value_index Index in array pointed by the @c values_ptr_ptr parameter, specifying initial value
* @param callback callback to be called when host requests value change
* @param callback_context context to be supplied as parameter to function supplied by @c callback parameter
* @param param_ptr Pointer to variable receiving handle to plugin helper library representation of parameter
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
bool
lv2dynparam_plugin_param_enum_add(
lv2dynparam_plugin_instance instance,
lv2dynparam_plugin_group group,
const char * name,
const struct lv2dynparam_hints * hints_ptr,
const char ** values_ptr_ptr,
unsigned int values_count,
unsigned int initial_value_index,
lv2dynparam_plugin_param_enum_changed callback,
void * callback_context,
lv2dynparam_plugin_parameter * param_ptr);
/**
* Call this function to add new integer parameter.
* This function will not sleep/lock. It is safe to call it from callbacks
* for parameter changes and command executions.
*
* @param instance Handle to instance received from lv2dynparam_plugin_instantiate()
* @param group Parent group, NULL for root group
* @param name Human readble name of group to add
* @param hints_ptr Pointer to group hints. Can be NULL (no hints).
* @param value initial value of the parameter
* @param min minimum allowed value of the parameter
* @param max maximum allowed value of the parameter
* @param callback callback to be called when host requests value change
* @param callback_context context to be supplied as parameter to function supplied by @c callback parameter
* @param param_ptr Pointer to variable receiving handle to plugin helper library representation of parameter
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
bool
lv2dynparam_plugin_param_int_add(
lv2dynparam_plugin_instance instance,
lv2dynparam_plugin_group group,
const char * name,
const struct lv2dynparam_hints * hints_ptr,
signed int value,
signed int min,
signed int max,
lv2dynparam_plugin_param_int_changed callback,
void * callback_context,
lv2dynparam_plugin_parameter * param_ptr);
/**
* Call this function to remove parameter
*
* @param instance Handle to instance received from lv2dynparam_plugin_instantiate()
* @param param handle to plugin helper library representation of parameter to remove
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
bool
lv2dynparam_plugin_param_remove(
lv2dynparam_plugin_instance instance,
lv2dynparam_plugin_parameter param);
/**
* Call this function to change boolean parameter value
*
* @param instance Handle to instance received from lv2dynparam_plugin_instantiate()
* @param param handle to plugin helper library representation of parameter to change
* @param value new value
*
* @return Success status
* @retval true - success
* @retval false - error, try later
*/
bool
lv2dynparam_plugin_param_boolean_change(
lv2dynparam_plugin_instance instance,
lv2dynparam_plugin_parameter param,
bool value);
#endif /* #ifndef DYNPARAM_H__84DA2DA3_61BD_45AC_B202_6A08F27D56F5__INCLUDED */
|