00001 //------------------------------------------------------------------------ 00002 // Project : VST SDK 00003 // Version : 3.0 00004 // 00005 // Category : Interfaces 00006 // Filename : ivsteditcontroller.h 00007 // Created by : Steinberg, 09/2005 00008 // Modified : $Date: 2008/01/09 12:51:44 $ 00009 // Description : VST Edit Controller Interfaces 00010 // 00011 //----------------------------------------------------------------------------- 00012 // LICENSE 00013 // © 2008, Steinberg Media Technologies GmbH, All Rights Reserved 00014 //----------------------------------------------------------------------------- 00015 // This Software Development Kit may not be distributed in parts or its entirety 00016 // without prior written agreement by Steinberg Media Technologies GmbH. 00017 // This SDK must not be used to re-engineer or manipulate any technology used 00018 // in any Steinberg or Third-party application or software module, 00019 // unless permitted by law. 00020 // Neither the name of the Steinberg Media Technologies nor the names of its 00021 // contributors may be used to endorse or promote products derived from this 00022 // software without specific prior written permission. 00023 // 00024 // THIS SDK IS PROVIDED BY STEINBERG MEDIA TECHNOLOGIES GMBH "AS IS" AND 00025 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00026 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00027 // IN NO EVENT SHALL STEINBERG MEDIA TECHNOLOGIES GMBH BE LIABLE FOR ANY DIRECT, 00028 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00029 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00030 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00031 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 00032 // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 00033 // OF THE POSSIBILITY OF SUCH DAMAGE. 00034 //---------------------------------------------------------------------------------- 00035 00036 #ifndef __ivsteditcontroller__ 00037 #define __ivsteditcontroller__ 00038 00039 #include "pluginterfaces/base/ipluginbase.h" 00040 #include "vsttypes.h" 00041 00042 //------------------------------------------------------------------------ 00043 #include "pluginterfaces/base/falignpush.h" 00044 //------------------------------------------------------------------------ 00045 00046 namespace Steinberg { 00047 00048 class IPlugView; 00049 class IBStream; 00050 00051 //------------------------------------------------------------------------ 00052 // Class Categories 00053 //------------------------------------------------------------------------ 00054 #ifndef kVstComponentControllerClass 00055 #define kVstComponentControllerClass "Component Controller Class" 00056 #endif 00057 00058 //------------------------------------------------------------------------ 00059 namespace Vst { 00060 00061 //------------------------------------------------------------------------ 00063 //------------------------------------------------------------------------ 00064 struct ParameterInfo 00065 { 00066 //------------------------------------------------------------------------ 00067 ParamID id; 00068 String128 title; 00069 String128 shortTitle; 00070 String128 units; 00071 int32 stepCount; 00072 ParamValue defaultNormalizedValue; 00073 UnitID unitId; 00074 00075 int32 flags; 00076 enum ParameterFlags 00077 { 00078 kCanAutomate = 1 << 0, 00079 kIsReadOnly = 1 << 1, 00080 00081 kIsProgramChange = 1 << 15, 00082 kIsBypass = 1 << 16 00083 }; 00084 //------------------------------------------------------------------------ 00085 }; 00086 00087 00088 //------------------------------------------------------------------------ 00089 // IComponentHandler Interface 00090 //------------------------------------------------------------------------ 00095 class IComponentHandler: public FUnknown 00096 { 00097 public: 00098 //------------------------------------------------------------------------ 00101 virtual tresult PLUGIN_API beginEdit (ParamID tag) = 0; 00102 00104 virtual tresult PLUGIN_API performEdit (ParamID tag, ParamValue valueNormalized) = 0; 00105 00107 virtual tresult PLUGIN_API endEdit (ParamID tag) = 0; 00108 00110 virtual tresult PLUGIN_API restartComponent (int32 flags) = 0; 00111 //------------------------------------------------------------------------ 00112 static const FUID iid; 00113 }; 00114 00115 DECLARE_CLASS_IID (IComponentHandler, 0x93A0BEA3, 0x0BD045DB, 0x8E890B0C, 0xC1E46AC6) 00116 00117 00118 //------------------------------------------------------------------------ 00119 // IEditController Interface 00120 //------------------------------------------------------------------------ 00121 class IEditController: public IPluginBase 00122 { 00123 public: 00124 //------------------------------------------------------------------------ 00126 virtual tresult PLUGIN_API setComponentState (IBStream* state) = 0; 00127 00129 virtual tresult PLUGIN_API setState (IBStream* state) = 0; 00131 virtual tresult PLUGIN_API getState (IBStream* state) = 0; 00132 00133 // parameters ------------------------- 00135 virtual int32 PLUGIN_API getParameterCount () = 0; 00137 virtual tresult PLUGIN_API getParameterInfo (int32 paramIndex, ParameterInfo& info /*out*/) = 0; 00138 00140 virtual tresult PLUGIN_API getParamStringByValue (ParamID tag, ParamValue valueNormalized /*in*/, String128 string /*out*/) = 0; 00142 virtual tresult PLUGIN_API getParamValueByString (ParamID tag, TChar* string /*in*/, ParamValue& valueNormalized /*out*/) = 0; 00143 00145 virtual ParamValue PLUGIN_API normalizedParamToPlain (ParamID tag, ParamValue valueNormalized) = 0; 00147 virtual ParamValue PLUGIN_API plainParamToNormalized (ParamID tag, ParamValue plainValue) = 0; 00148 00150 virtual ParamValue PLUGIN_API getParamNormalized (ParamID tag) = 0; 00152 virtual tresult PLUGIN_API setParamNormalized (ParamID tag, ParamValue value) = 0; 00153 00154 // handler ---------------------------- 00156 virtual tresult PLUGIN_API setComponentHandler (IComponentHandler* handler) = 0; 00157 00158 // view ------------------------------- 00160 virtual IPlugView* PLUGIN_API createView (const char* name) = 0; 00161 00162 //------------------------------------------------------------------------ 00163 static const FUID iid; 00164 }; 00165 00166 DECLARE_CLASS_IID (IEditController, 0xDCD7BBE3, 0x7742448D, 0xA874AACC, 0x979C759E) 00167 00168 //------------------------------------------------------------------------ 00169 } // namespace Vst 00170 } // namespace Steinberg 00171 00172 //------------------------------------------------------------------------ 00173 #include "pluginterfaces/base/falignpop.h" 00174 //------------------------------------------------------------------------ 00175 00176 #endif // __ivsteditcontroller__