+ Monosynth: add inertia for pitch wheel
[calf.git] / src / calf / lv2_polymorphic_port.h
blob231c219a1f9eb004d07d1df9dc9b4bb62cef3b6a
1 /* lv2_data_access.h - C header file for the LV2 Data Access extension.
2 * Copyright (C) 2008 Dave Robillard <dave@drobilla.net>
3 *
4 * This header is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This header 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 Lesser General Public
12 * License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this header; if not, write to the Free Software Foundation,
16 * Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA
19 #ifndef LV2_POLYMORPHIC_PORT_H
20 #define LV2_POLYMORPHIC_PORT_H
22 #define LV2_POLYMORPHIC_PORT_URI "http://lv2plug.in/ns/dev/polymorphic-port"
25 /** @file
26 * This header defines the LV2 Polymorphic Port extension with the URI
27 * <http://lv2plug.in/ns/dev/polymorphic-port>.
29 * This extension defines a buffer format for ports that can take on
30 * various types dynamically at runtime.
34 /** The data field of the LV2_Feature for this extension.
36 * To support this feature the host must pass an LV2_Feature struct to the
37 * instantiate method with URI "http://lv2plug.in/ns/dev/polymorphic-port"
38 * and data pointed to an instance of this struct.
40 typedef struct {
42 /** Set the type of a polymorphic port.
43 * If the plugin specifies constraints on port types, the host MUST NOT
44 * call the run method until all port types have been set to a valid
45 * configuration. Whenever the type for a port is changed, the host
46 * MUST call connect_port before the next call to the run method.
47 * The return value of this function SHOULD be ignored by hosts at this
48 * time (future revisions of this extension may specify return values).
49 * Plugins which do not know of any future revision or extension that
50 * dictates otherwise MUST return 0 from this function.
51 * @param port Index of the port to connect (same as LV2 connect_port)
52 * @param type Mapped URI for the type of data being connected
53 * @param type_data Type specific data defined by type URI (may be NULL)
54 * @return Unused at this time
56 uint32_t (*set_type)(LV2_Handle instance,
57 uint32_t port,
58 uint32_t type,
59 void* type_data);
61 } LV2_Polymorphic_Feature;
64 #endif // LV2_POLYMORPHIC_PORT_H