TuttleOFX  1
ofxParam.h
Go to the documentation of this file.
00001 #ifndef _ofxParam_h_
00002 #define _ofxParam_h_
00003 
00004 /*
00005  * Software License :
00006  *
00007  * Copyright (c) 2003-2009, The Open Effects Association Ltd. All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions are met:
00011  *
00012  * Redistributions of source code must retain the above copyright notice,
00013  *    this list of conditions and the following disclaimer.
00014  * Redistributions in binary form must reproduce the above copyright notice,
00015  *    this list of conditions and the following disclaimer in the documentation
00016  *    and/or other materials provided with the distribution.
00017  * Neither the name The Open Effects Association Ltd, nor the names of its
00018  *    contributors may be used to endorse or promote products derived from this
00019  *    software without specific prior written permission.
00020  *
00021  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
00022  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00023  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00024  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
00025  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00026  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00027  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
00028  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00029  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00030  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  */
00032 
00033 #include "ofxCore.h"
00034 #include "ofxProperty.h"
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00040 /** @brief string value to the ::kOfxPropType property for all parameters */
00041 #define kOfxParameterSuite "OfxParameterSuite"
00042 
00043 /** @brief string value on the ::kOfxPropType property for all parameter definitions (ie: the handle returned in describe) */
00044 #define kOfxTypeParameter "OfxTypeParameter"
00045 
00046 /** @brief string value on the ::kOfxPropType property for all parameter instances */
00047 #define kOfxTypeParameterInstance "OfxTypeParameterInstance"
00048 
00049 /** @brief Blind declaration of an OFX param
00050  *
00051  */
00052 typedef struct OfxParamStruct* OfxParamHandle;
00053 
00054 /** @brief Blind declaration of an OFX parameter set
00055  *
00056  */
00057 typedef struct OfxParamSetStruct* OfxParamSetHandle;
00058 
00059 
00060 /**
00061  * \defgroup ParamTypeDefines Parameter Type definitions
00062  *
00063  * These strings are used to identify the type of the parameter when it is defined, they are also on the ::kOfxParamPropType in any parameter instance.
00064  */
00065 /*@{*/
00066 
00067 /** @brief String to identify a param as a single valued integer */
00068 #define kOfxParamTypeInteger "OfxParamTypeInteger"
00069 /** @brief String to identify a param as a Single valued floating point parameter  */
00070 #define kOfxParamTypeDouble "OfxParamTypeDouble"
00071 /** @brief String to identify a param as a Single valued boolean parameter */
00072 #define kOfxParamTypeBoolean "OfxParamTypeBoolean"
00073 /** @brief String to identify a param as a Single valued, 'one-of-many' parameter */
00074 #define kOfxParamTypeChoice "OfxParamTypeChoice"
00075 /** @brief String to identify a param as a Red, Green, Blue and Alpha colour parameter */
00076 #define kOfxParamTypeRGBA "OfxParamTypeRGBA"
00077 /** @brief String to identify a param as a Red, Green and Blue colour parameter */
00078 #define kOfxParamTypeRGB "OfxParamTypeRGB"
00079 /** @brief String to identify a param as a Two dimensional floating point parameter */
00080 #define kOfxParamTypeDouble2D "OfxParamTypeDouble2D"
00081 /** @brief String to identify a param as a Two dimensional integer point parameter */
00082 #define kOfxParamTypeInteger2D "OfxParamTypeInteger2D"
00083 /** @brief String to identify a param as a Three dimensional floating point parameter */
00084 #define kOfxParamTypeDouble3D "OfxParamTypeDouble3D"
00085 /** @brief String to identify a param as a Three dimensional integer parameter */
00086 #define kOfxParamTypeInteger3D "OfxParamTypeInteger3D"
00087 /** @brief String to identify a param as a String (UTF8) parameter */
00088 #define kOfxParamTypeString "OfxParamTypeString"
00089 /** @brief String to identify a param as a Plug-in defined parameter */
00090 #define kOfxParamTypeCustom "OfxParamTypeCustom"
00091 /** @brief String to identify a param as a Grouping parameter */
00092 #define kOfxParamTypeGroup "OfxParamTypeGroup"
00093 /** @brief String to identify a param as a page parameter */
00094 #define kOfxParamTypePage "OfxParamTypePage"
00095 /** @brief String to identify a param as a PushButton parameter */
00096 #define kOfxParamTypePushButton "OfxParamTypePushButton"
00097 /*@}*/
00098 
00099 /**
00100  * \addtogroup PropertiesAll
00101  */
00102 /*@{*/
00103 /**
00104  * \defgroup ParamPropDefines Parameter Property Definitions
00105  *
00106  * These are the list of properties used by the parameters suite.
00107  */
00108 /*@{*/
00109 
00110 /** @brief Indicates if the host supports animation of custom parameters
00111  *
00112  *  - Type - int X 1
00113  *  - Property Set - host descriptor (read only)
00114  *  - Value Values - 0 or 1
00115  */
00116 #define kOfxParamHostPropSupportsCustomAnimation "OfxParamHostPropSupportsCustomAnimation"
00117 
00118 /** @brief Indicates if the host supports animation of string params
00119  *
00120  *  - Type - int X 1
00121  *  - Property Set - host descriptor (read only)
00122  *  - Valid Values - 0 or 1
00123  */
00124 #define kOfxParamHostPropSupportsStringAnimation "OfxParamHostPropSupportsStringAnimation"
00125 
00126 /** @brief Indicates if the host supports animation of boolean params
00127  *
00128  *  - Type - int X 1
00129  *  - Property Set - host descriptor (read only)
00130  *  - Valid Values - 0 or 1
00131  */
00132 #define kOfxParamHostPropSupportsBooleanAnimation "OfxParamHostPropSupportsBooleanAnimation"
00133 
00134 /** @brief Indicates if the host supports animation of choice params
00135  *
00136  *  - Type - int X 1
00137  *  - Property Set - host descriptor (read only)
00138  *  - Valid Values - 0 or 1
00139  */
00140 #define kOfxParamHostPropSupportsChoiceAnimation "OfxParamHostPropSupportsChoiceAnimation"
00141 
00142 /** @brief Indicates if the host supports custom interacts for parameters
00143  *
00144  *  - Type - int X 1
00145  *  - Property Set - host descriptor (read only)
00146  *  - Valid Values - 0 or 1
00147  */
00148 #define kOfxParamHostPropSupportsCustomInteract "OfxParamHostPropSupportsCustomInteract"
00149 
00150 /** @brief Indicates the maximum numbers of parameters available on the host.
00151  *
00152  *  - Type - int X 1
00153  *  - Property Set - host descriptor (read only)
00154  *
00155  * If set to -1 it implies unlimited number of parameters.
00156  */
00157 #define kOfxParamHostPropMaxParameters "OfxParamHostPropMaxParameters"
00158 
00159 /** @brief Indicates the maximum number of parameter pages.
00160  *
00161  *  - Type - int X 1
00162  *  - Property Set - host descriptor (read only)
00163  *
00164  *  If there is no limit to the number of pages on a host, set this to -1.
00165  *
00166  * Hosts that do not support paged parameter layout should set this to zero.
00167  */
00168 #define kOfxParamHostPropMaxPages "OfxParamHostPropMaxPages"
00169 
00170 /** @brief This indicates the number of parameter rows and coloumns on a page.
00171  *
00172  *  - Type - int X 2
00173  *  - Property Set - host descriptor (read only)
00174  *
00175  * If the host has supports paged parameter layout, used dimension 0 as the number of columns per page and dimension 1 as the number of rows per page.
00176  */
00177 #define kOfxParamHostPropPageRowColumnCount "OfxParamHostPropPageRowColumnCount"
00178 
00179 /** @brief Pseudo parameter name used to skip a row in a page layout.
00180  *
00181  * Passed as a value to the \ref kOfxParamPropPageChild property.
00182  *
00183  * See \ref ParametersInterfacesPagedLayouts for more details.
00184  */
00185 #define kOfxParamPageSkipRow "OfxParamPageSkipRow"
00186 
00187 /** @brief Pseudo parameter name used to skip a row in a page layout.
00188  *
00189  * Passed as a value to the \ref kOfxParamPropPageChild property.
00190  *
00191  * See \ref ParametersInterfacesPagedLayouts for more details.
00192  */
00193 #define kOfxParamPageSkipColumn "OfxParamPageSkipColumn"
00194 
00195 /** @brief Overrides the parameter's standard user interface with the given interact.
00196  *
00197  *  - Type - pointer X 1
00198  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00199  *  - Default - NULL
00200  *  - Valid Values -  must point to a OfxPluginEntryPoint
00201  *
00202  * If set, the parameter's normal interface is replaced completely by the interact gui.
00203  */
00204 #define kOfxParamPropInteractV1 "OfxParamPropInteractV1"
00205 
00206 /** @brief The size of a parameter instance's custom interface in screen pixels.
00207  *
00208  * - Type - double x 2
00209  * - Property Set - plugin parameter instance (read only)
00210  *
00211  * This is set by a host to indicate the current size of a custom interface if the plug-in has one. If not this is set to (0,0).
00212  */
00213 #define kOfxParamPropInteractSize "OfxParamPropInteractSize"
00214 
00215 /** @brief The preferred aspect ratio of a parameter's custom interface.
00216  *
00217  *  - Type - double x 1
00218  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00219  *  - Default - 1.0
00220  *  - Valid Values - greater than or equal to 0.0
00221  *
00222  * If set to anything other than 0.0, the custom interface for this parameter will be of a size with this aspect ratio (x size/y size).
00223  */
00224 #define kOfxParamPropInteractSizeAspect "OfxParamPropInteractSizeAspect"
00225 
00226 /** @brief The minimum size of a parameter's custom interface, in screen pixels.
00227  *
00228  *  - Type - int x 2
00229  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00230  *  - Default - 10,10
00231  *  - Valid Values - greater than (0, 0)
00232  *
00233  * Any custom interface will not be less than this size.
00234  */
00235 #define kOfxParamPropInteractMinimumSize "OfxParamPropInteractMinimumSize"
00236 
00237 /** @brief The preferred size of a parameter's custom interface.
00238  *
00239  *  - Type - int x 2
00240  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00241  *  - Default - 10,10
00242  *  - Valid Values - greater than (0, 0)
00243  *
00244  * A host should attempt to set a parameter's custom interface on a parameter to be this size if possible, otherwise it will be of ::kOfxParamPropInteractSizeAspect aspect but larger than ::kOfxParamPropInteractMinimumSize.
00245  */
00246 #define kOfxParamPropInteractPreferedSize "OfxParamPropInteractPreferedSize"
00247 
00248 /** @brief The type of a parameter.
00249  *
00250  * - Type - C string X 1
00251  * - Property Set - plugin parameter descriptor (read only) and instance (read only)
00252  *
00253  * This string will be set to the type that the parameter was create with.
00254  */
00255 #define kOfxParamPropType "OfxParamPropType"
00256 
00257 /** @brief Flags whether a parameter can animate.
00258  *
00259  *  - Type - int x 1
00260  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00261  *  - Default - 1
00262  *  - Valid Values - 0 or 1
00263  *
00264  * A plug-in uses this property to indicate if a parameter is able to animate.
00265  */
00266 #define kOfxParamPropAnimates "OfxParamPropAnimates"
00267 
00268 /** @brief Flags whether changes to a parameter should be put on the undo/redo stack
00269  *
00270  *  - Type - int x 1
00271  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00272  *  - Default - 1
00273  *  - Valid Values - 0 or 1
00274  */
00275 #define kOfxParamPropCanUndo "OfxParamPropCanUndo"
00276 
00277 /** @brief States whether the plugin needs to resync its private data
00278  *
00279  *   - Type - int X 1
00280  *   - Property Set - param set instance (read/write)
00281  *   - Default - 0
00282  *   - Valid Values - 
00283  *       - 0 - no need to sync
00284  *       - 1 - paramset is not synced
00285  *
00286  * The plugin should set this flag to true whenever any internal state has not
00287  * been flushed to the set of params.
00288  * 
00289  * The host will examine this property each time it does a copy or save
00290  * operation on the instance.
00291  *  * If it is set to 1, the host will call SyncPrivateData and then set
00292  *    it to zero before doing the copy/save.
00293  *  * If it is set to 0, the host will assume that the param data
00294  *    correctly represents the private state, and will not call
00295  *    SyncPrivateData before copying/saving.
00296  *  * If this property is not set, the host will always call
00297  *    SyncPrivateData before copying or saving the effect (as if the
00298  *    property were set to 1 -- but the host will not create or
00299  *    modify the property).
00300  */
00301 #define kOfxPropParamSetNeedsSyncing "OfxPropParamSetNeedsSyncing"
00302  
00303 /** @brief Flags whether a parameter is currently animating.
00304  * 
00305  *  - Type - int x 1
00306  *  - Property Set - plugin parameter instance (read only)
00307  *  - Valid Values - 0 or 1
00308  * 
00309  * Set by a host on a parameter instance to indicate if the parameter has a non-constant value set on it. This can
00310  * be as a consequence of animation or of scripting modifying the value.
00311  */
00312 #define kOfxParamPropIsAnimating "OfxParamPropIsAnimating"
00313 
00314 /** @brief Flags whether the plugin will attempt to set the value of a parameter in some callback or analysis pass
00315  *
00316  *  - Type - int x 1
00317  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00318  *  - Default - 0
00319  *  - Valid Values - 0 or 1
00320  *
00321  * This is used to tell the host whether the plug-in is going to attempt to set the value of the parameter.
00322  */
00323 #define kOfxParamPropPluginMayWrite "OfxParamPropPluginMayWrite"
00324 
00325 /** @brief Flags whether the value of a parameter should persist.
00326  *
00327  *  - Type - int x 1
00328  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00329  *  - Default - 1
00330  *  - Valid Values - 0 or 1
00331  *
00332  * This is used to tell the host whether the value of the parameter is important and should be save in any description of the plug-in.
00333  */
00334 #define kOfxParamPropPersistant "OfxParamPropPersistant"
00335 
00336 /** @brief Flags whether changing a parameter's value forces an evalution (ie: render),
00337  * 
00338  *  - Type - int x 1
00339  *  - Property Set - plugin parameter descriptor (read/write) and instance (read/write only)
00340  *  - Default - 1
00341  *  - Valid Values - 0 or 1
00342  *
00343  * This is used to indicate if the value of a parameter has any affect on an effect's output, eg: the parameter may be purely for GUI purposes, and so changing its value should not trigger a re-render.
00344  */
00345 #define kOfxParamPropEvaluateOnChange "OfxParamPropEvaluateOnChange"
00346 
00347 /** @brief Flags whether a parameter should be exposed to a user,
00348  *
00349  *  - Type - int x 1
00350  *  - Property Set - plugin parameter descriptor (read/write) and instance (read/write)
00351  *  - Default - 0
00352  *  - Valid Values - 0 or 1
00353  *
00354  * If secret, a parameter is not exposed to a user in any interface, but should otherwise behave as a normal parameter.
00355  *
00356  * Secret params are typically used to hide important state detail that would otherwise be unintelligible to a user, for example the result of a statical analysis that might need many parameters to store.
00357  */
00358 #define kOfxParamPropSecret "OfxParamPropSecret"
00359 
00360 /** @brief The value to be used as the id of the parameter in a host scripting language.
00361  *
00362  *  - Type - ASCII C string X 1,
00363  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only),
00364  *  - Default - the unique name the parameter was created with.
00365  *  - Valid Values - ASCII string unique to all parameters in the plug-in.
00366  *
00367  * Many hosts have a scripting language that they use to set values of parameters and more. If so, this is the name of a parameter in such scripts.
00368  */
00369 #define kOfxParamPropScriptName "OfxParamPropScriptName"
00370 
00371 /** @brief Specifies how modifying the value of a param will affect any output of an effect over time.
00372  *
00373  * - Type - C string X 1
00374  * - Property Set - plugin parameter descriptor (read/write) and instance (read only),
00375  * - Default - ::kOfxParamInvalidateValueChange
00376  * - Valid Values - This must be one of
00377  *     - ::kOfxParamInvalidateValueChange
00378  *     - ::kOfxParamInvalidateValueChangeToEnd
00379  *     - ::kOfxParamInvalidateAll
00380  *
00381  * Imagine an effect with an animating parameter in a host that caches
00382  * rendered output. Think of the what happens when you add a new key frame.
00383  * -If the parameter represents something like an absolute position, the cache will only need to be invalidated for the range of frames that keyframe affects.
00384  * - If the parameter represents something like a speed which is integrated, the cache will be invalidated from the keyframe until the end of the clip.
00385  * - There are potentially other situations where the entire cache will need to be invalidated (though I can't think of one off the top of my head).
00386  */
00387 #define kOfxParamPropCacheInvalidation "OfxParamPropCacheInvalidation"
00388 
00389 /** @brief Used as a value for the ::kOfxParamPropCacheInvalidation property */
00390 #define kOfxParamInvalidateValueChange "OfxParamInvalidateValueChange"
00391 
00392 /** @brief Used as a value for the ::kOfxParamPropCacheInvalidation property */
00393 #define kOfxParamInvalidateValueChangeToEnd "OfxParamInvalidateValueChangeToEnd"
00394 
00395 /** @brief Used as a value for the ::kOfxParamPropCacheInvalidation property */
00396 #define kOfxParamInvalidateAll "OfxParamInvalidateAll"
00397 
00398 /** @brief A hint to the user as to how the parameter is to be used.
00399  *
00400  * - Type - UTF8 C string X 1
00401  * - Property Set - plugin parameter descriptor (read/write) and instance (read/write),
00402  * - Default - ""
00403  */
00404 #define kOfxParamPropHint "OfxParamPropHint"
00405 
00406 /** @brief The default value of a parameter.
00407  *
00408  * - Type - The type is dependant on the parameter type as is the dimension.
00409  * - Property Set - plugin parameter descriptor (read/write) and instance (read/write only),
00410  * - Default - 0 cast to the relevant type (or "" for strings and custom parameters)
00411  *
00412  * The exact type and dimension is dependant on the type of the parameter. These are....
00413  * - ::kOfxParamTypeInteger - integer property of one dimension
00414  * - ::kOfxParamTypeDouble - double property of one dimension
00415  * - ::kOfxParamTypeBoolean - integer property of one dimension
00416  * - ::kOfxParamTypeChoice - integer property of one dimension
00417  * - ::kOfxParamTypeRGBA - double property of four dimensions
00418  * - ::kOfxParamTypeRGB - double property of three dimensions
00419  * - ::kOfxParamTypeDouble2D - double property of two dimensions
00420  * - ::kOfxParamTypeInteger2D - integer property of two dimensions
00421  * - ::kOfxParamTypeDouble3D - double property of three dimensions
00422  * - ::kOfxParamTypeInteger3D - integer property of three dimensions
00423  * - ::kOfxParamTypeString - string property of one dimension
00424  * - ::kOfxParamTypeCustom - string property of one dimension
00425  * - ::kOfxParamTypeGroup - does not have this property
00426  * - ::kOfxParamTypePage - does not have this property
00427  * - ::kOfxParamTypePushButton - does not have this property
00428  */
00429 #define kOfxParamPropDefault "OfxParamPropDefault"
00430 
00431 /** @brief Describes how the double parameter should be interpreted by a host. 
00432  * 
00433  * - Type - C string X 1
00434  * - Default - ::kOfxParamDoubleTypePlain
00435  * - Property Set - 1D, 2D and 3D float plugin parameter descriptor (read/write) and instance (read only),
00436  * - Valid Values -This must be one of
00437  *    - ::kOfxParamDoubleTypePlain - parameter has no special interpretation,
00438  *    - ::kOfxParamDoubleTypeAngle - parameter is to be interpretted as an angle,
00439  *    - ::kOfxParamDoubleTypeScale - parameter is to be interpretted as a scale factor,
00440  *    - ::kOfxParamDoubleTypeTime  - parameter represents a time value (1D only),
00441  *    - ::kOfxParamDoubleTypeAbsoluteTime  - parameter represents an absolute time value (1D only),
00442  *
00443  *    - ::kOfxParamDoubleTypeNormalisedX - normalised size wrt to the project's X dimension (1D only),
00444  *    - ::kOfxParamDoubleTypeNormalisedXAbsolute - normalised absolute position on the X axis (1D only)
00445  *    - ::kOfxParamDoubleTypeNormalisedY - normalised size wrt to the project's Y dimension(1D only),
00446  *    - ::kOfxParamDoubleTypeNormalisedYAbsolute - normalised absolute position on the Y axis (1D only)
00447  *    - ::kOfxParamDoubleTypeNormalisedXY - normalised to the project's X and Y size (2D only),
00448  *    - ::kOfxParamDoubleTypeNormalisedXYAbsolute - normalised to the projects X and Y size, and is an absolute position on the image plane,
00449  *
00450  *    - ::kOfxParamDoubleTypeX - size wrt to the project's X dimension (1D only), in canonical coordinates,
00451  *    - ::kOfxParamDoubleTypeXAbsolute - absolute position on the X axis (1D only), in canonical coordinates,
00452  *    - ::kOfxParamDoubleTypeY - size wrt to the project's Y dimension(1D only), in canonical coordinates,
00453  *    - ::kOfxParamDoubleTypeYAbsolute - absolute position on the Y axis (1D only), in canonical coordinates,
00454  *    - ::kOfxParamDoubleTypeXY - size in 2D (2D only), in canonical coordinates,
00455  *    - ::kOfxParamDoubleTypeXYAbsolute - an absolute position on the image plane, in canonical coordinates.
00456  *
00457  * Double parameters can be interpreted in several different ways, this property tells the host how to do so and thus gives hints
00458  * as to the interface of the parameter.
00459  */
00460 #define kOfxParamPropDoubleType "OfxParamPropDoubleType"
00461 
00462 /** @brief value for the ::kOfxParamPropDoubleType property, indicating the parameter has no special interpretation and should be interpretted as a raw numeric value. */
00463 #define kOfxParamDoubleTypePlain "OfxParamDoubleTypePlain"
00464 
00465 /** @brief value for the ::kOfxParamPropDoubleType property, indicating the parameter is to be interpreted as a scale factor. See \ref ParameterPropertiesDoubleTypes. */
00466 #define kOfxParamDoubleTypeScale "OfxParamDoubleTypeScale"
00467 
00468 /** @brief value for the ::kOfxParamDoubleTypeAngle property, indicating the parameter is to be interpreted as an angle. See \ref ParameterPropertiesDoubleTypes.  */
00469 #define kOfxParamDoubleTypeAngle "OfxParamDoubleTypeAngle"
00470 
00471 /** @brief value for the ::kOfxParamDoubleTypeAngle property, indicating the parameter is to be interpreted as a time. See \ref ParameterPropertiesDoubleTypes. */
00472 #define kOfxParamDoubleTypeTime "OfxParamDoubleTypeTime"
00473 
00474 /** @brief value for the ::kOfxParamDoubleTypeAngle property, indicating the parameter is to be interpreted as an absolute time from the start of the effect. See \ref ParameterPropertiesDoubleTypes. */
00475 #define kOfxParamDoubleTypeAbsoluteTime "OfxParamDoubleTypeAbsoluteTime"
00476 
00477 /** @brief value for the ::kOfxParamPropDoubleType property, indicating a size normalised to the X dimension. See \ref ParameterPropertiesDoubleTypes.
00478  * 
00479  * Deprecated in favour of ::OfxParamDoubleTypeX
00480  */
00481 #define kOfxParamDoubleTypeNormalisedX  "OfxParamDoubleTypeNormalisedX"
00482 
00483 /** @brief value for the ::kOfxParamPropDoubleType property, indicating a size normalised to the Y dimension. See \ref ParameterPropertiesDoubleTypes.
00484  * 
00485  * Deprecated in favour of ::OfxParamDoubleTypeY
00486  */
00487 #define kOfxParamDoubleTypeNormalisedY  "OfxParamDoubleTypeNormalisedY"
00488 
00489 /** @brief value for the ::kOfxParamPropDoubleType property, indicating an absolute position normalised to the X dimension. See \ref ParameterPropertiesDoubleTypes. 
00490  * 
00491  * Deprecated in favour of ::OfxParamDoubleTypeXAbsolute
00492 */
00493 #define kOfxParamDoubleTypeNormalisedXAbsolute  "OfxParamDoubleTypeNormalisedXAbsolute"
00494 
00495 /** @brief value for the ::kOfxParamPropDoubleType property, indicating an absolute position  normalised to the Y dimension. See \ref ParameterPropertiesDoubleTypes.
00496  * 
00497  * Deprecated in favour of ::OfxParamDoubleTypeYAbsolute
00498  */
00499 #define kOfxParamDoubleTypeNormalisedYAbsolute  "OfxParamDoubleTypeNormalisedYAbsolute"
00500 
00501 /** @brief value for the ::kOfxParamPropDoubleType property, indicating normalisation to the X and Y dimension for 2D params. See \ref ParameterPropertiesDoubleTypes. 
00502  * 
00503  * Deprecated in favour of ::OfxParamDoubleTypeXY
00504 */
00505 #define kOfxParamDoubleTypeNormalisedXY  "OfxParamDoubleTypeNormalisedXY"
00506 
00507 /** @brief value for the ::kOfxParamPropDoubleType property, indicating normalisation to the X and Y dimension for a 2D param that can be interpretted as an absolute spatial position. See \ref ParameterPropertiesDoubleTypes. 
00508  * 
00509  * Deprecated in favour of ::kOfxParamDoubleTypeXYAbsolute 
00510 */
00511 #define kOfxParamDoubleTypeNormalisedXYAbsolute  "OfxParamDoubleTypeNormalisedXYAbsolute"
00512 
00513 
00514 
00515 /** @brief value for the ::kOfxParamPropDoubleType property, indicating a size in canonical coords in the X dimension. See \ref ParameterPropertiesDoubleTypes. */
00516 #define kOfxParamDoubleTypeX  "OfxParamDoubleTypeX"
00517 
00518 /** @brief value for the ::kOfxParamPropDoubleType property, indicating a size in canonical coords in the Y dimension. See \ref ParameterPropertiesDoubleTypes. */
00519 #define kOfxParamDoubleTypeY  "OfxParamDoubleTypeY"
00520 
00521 /** @brief value for the ::kOfxParamPropDoubleType property, indicating an absolute position in canonical coords in the X dimension. See \ref ParameterPropertiesDoubleTypes. */
00522 #define kOfxParamDoubleTypeXAbsolute  "OfxParamDoubleTypeXAbsolute"
00523 
00524 /** @brief value for the ::kOfxParamPropDoubleType property, indicating an absolute position in canonical coords in the Y dimension. See \ref ParameterPropertiesDoubleTypes. */
00525 #define kOfxParamDoubleTypeYAbsolute  "OfxParamDoubleTypeYAbsolute"
00526 
00527 /** @brief value for the ::kOfxParamPropDoubleType property, indicating a 2D size in canonical coords. See \ref ParameterPropertiesDoubleTypes. */
00528 #define kOfxParamDoubleTypeXY  "OfxParamDoubleTypeXY"
00529 
00530 /** @brief value for the ::kOfxParamPropDoubleType property, indicating a 2D position in canonical coords. See \ref ParameterPropertiesDoubleTypes. */
00531 #define kOfxParamDoubleTypeXYAbsolute  "OfxParamDoubleTypeXYAbsolute"
00532 
00533 /** @brief Describes in which coordinate system a spatial double parameter's default value is specified.
00534  * 
00535  * - Type - C string X 1
00536  * - Default - kOfxParamCoordinatesCanonical
00537  * - Property Set - Non normalised spatial double parameters, ie: any double param who's ::kOfxParamPropDoubleType is set to one of...
00538  *    - kOfxParamDoubleTypeX 
00539  *    - kOfxParamDoubleTypeXAbsolute 
00540  *    - kOfxParamDoubleTypeY 
00541  *    - kOfxParamDoubleTypeYAbsolute 
00542  *    - kOfxParamDoubleTypeXY 
00543  *    - kOfxParamDoubleTypeXYAbsolute 
00544  * - Valid Values - This must be one of
00545  *    - kOfxParamCoordinatesCanonical - the default is in canonical coords
00546  *    - kOfxParamCoordinatesNormalised - the default is in normalised coordinates
00547  *
00548  * This allows a spatial param to specify what its default is, so by saying normalised and "0.5" it would be in the 'middle', by saying canonical and 100 it would be at value 100 independent of the size of the image being applied to.
00549  */
00550 #define kOfxParamPropDefaultCoordinateSystem "OfxParamPropDefaultCoordinateSystem"
00551 
00552 /** @brief Define the canonical coordinate system */
00553 #define kOfxParamCoordinatesCanonical "OfxParamCoordinatesCanonical"
00554 
00555 /** @brief Define the normalised coordinate system */
00556 #define kOfxParamCoordinatesNormalised "OfxParamCoordinatesNormalised"
00557 
00558 /** @brief A flag to indicate if there is a host overlay UI handle for the given parameter.
00559  * 
00560  * - Type - int x 1
00561  * - Property Set - plugin parameter descriptor (read only) 
00562  * - Valid Values - 0 or 1
00563  * 
00564  * If set to 1, then the host is flagging that there is some sort of native user overlay interface handle available for the given parameter.
00565  */
00566 #define kOfxParamPropHasHostOverlayHandle "OfxParamPropHasHostOverlayHandle"
00567 
00568 /** @brief A flag to indicate that the host should use a native UI overlay handle for the given parameter.
00569  *
00570  * - Type - int x 1
00571  * - Property Set - plugin parameter descriptor (read/write only) and instance (read only)
00572  * - Default - 0
00573  * - Valid Values - 0 or 1
00574  *
00575  * If set to 1, then a plugin is flaging to the host that the host should use a native UI overlay handle for the given parameter. A plugin can use this to keep a native look and feel for parameter handles. A plugin can use ::kOfxParamPropHasHostOverlayHandle to see if handles are available on the given parameter.
00576  */
00577 #define kOfxParamPropUseHostOverlayHandle "kOfxParamPropUseHostOverlayHandle"
00578 
00579 
00580 /** @brief Enables the display of a time marker on the host's time line to indicate the value of the absolute time param.
00581  *
00582  *  - Type - int x 1
00583  *  - Property Set - plugin parameter descriptor (read/write) and instance (read/write)
00584  *  - Default - 0
00585  *  - Valid Values - 0 or 1
00586  *
00587  * If a double parameter is has ::kOfxParamPropDoubleType set to ::kOfxParamDoubleTypeAbsoluteTime, then this indicates whether
00588  * any marker should be made visible on the host's time line.
00589  *
00590  */
00591 #define kOfxParamPropShowTimeMarker "OfxParamPropShowTimeMarker"
00592 
00593 /** @brief Sets the parameter pages and order of pages.
00594  *
00595  *  - Type - C string X N
00596  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00597  *  - Default - ""
00598  *  - Valid Values - the names of any page param in the plugin
00599  *
00600  * This property sets the preferred order of parameter pages on a host. If this is never set, the preferred order is the order the parameters were declared in.
00601  */
00602 #define kOfxPluginPropParamPageOrder "OfxPluginPropParamPageOrder"
00603 
00604 /** @brief The names of the parameters included in a page parameter.
00605  *
00606  *  - Type - C string X N
00607  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00608  *  - Default - ""
00609  *  - Valid Values - the names of any parameter that is not a group or page, as well as ::kOfxParamPageSkipRow and ::kOfxParamPageSkipColumn
00610  *
00611  * This is a property on parameters of type ::kOfxParamTypePage, and tells the page what parameters it contains. The parameters are added to the page from the top left, filling in columns as we go. The two pseudo param names ::kOfxParamPageSkipRow and ::kOfxParamPageSkipColumn are used to control layout.
00612  *
00613  * Note parameters can appear in more than one page.
00614  */
00615 #define kOfxParamPropPageChild "OfxParamPropPageChild"
00616 
00617 /** @brief The name of a parameter's parent group.
00618  *
00619  *  - Type - C string X 1
00620  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only),
00621  *  - Default - "", which implies the "root" of the hierarchy,
00622  *  - Valid Values - the name of a parameter with type of ::kOfxParamTypeGroup
00623  *
00624  * Hosts that have hierarchical layouts of their params use this to recursively group parameter.
00625  *
00626  * By default parameters are added in order of declaration to the 'root' hierarchy. This property is used to reparent params to a predefined param of type ::kOfxParamTypeGroup.
00627  */
00628 #define kOfxParamPropParent "OfxParamPropParent"
00629 
00630 /** @brief Whether the initial state of a group is open or closed in a hierarchical layout. 
00631  *
00632  * - Type - int X 1
00633  * - Property Set - plugin parameter descriptor (read/write) and instance (read only)
00634  * - Default - 1
00635  * - Valid Values - 0 or 1
00636  *
00637  * This is a property on parameters of type ::kOfxParamTypeGroup, and tells the group whether it should be open or closed by default.
00638  * 
00639  */
00640 #define kOfxParamPropGroupOpen "OfxParamPropGroupOpen"
00641 
00642 /** @brief Used to enable a parameter in the user interface.
00643  *
00644  *  - Type - int X 1
00645  *  - Property Set - plugin parameter descriptor (read/write) and instance (read/write),
00646  *  - Default - 1
00647  *  - Valid Values - 0 or 1
00648  *
00649  * When set to 0 a user should not be able to modify the value of the parameter. Note that the plug-in itself can still change the value of a disabled parameter.
00650  */
00651 #define kOfxParamPropEnabled "OfxParamPropEnabled"
00652 
00653 /** @brief A private data pointer that the plug-in can store its own data behind.
00654  *
00655  * - Type - pointer X 1
00656  * - Property Set - plugin parameter instance (read/write),
00657  * - Default - NULL
00658  *
00659  * This data pointer is unique to each parameter instance, so two instances of the same parameter do not share the same data pointer. Use it to hang any needed private data structures.
00660  */
00661 #define kOfxParamPropDataPtr "OfxParamPropDataPtr"
00662 
00663 /** @brief Set an option in a choice parameter.
00664  *
00665  *  - Type - UTF8 C string X N
00666  *  - Property Set - plugin parameter descriptor (read/write) and instance (read/write),
00667  *  - Default - the property is empty with no options set.
00668  *
00669  * This property contains the set of options that will be presented to a user from a choice parameter. See @ref ParametersChoice for more details.
00670  */
00671 #define kOfxParamPropChoiceOption "OfxParamPropChoiceOption"
00672 
00673 /** @brief The minimum value for a numeric parameter.
00674  *
00675  *  - Type - int or double X N
00676  *  - Property Set - plugin parameter descriptor (read/write) and instance (read/write),
00677  *  - Default - the smallest possible value corresponding to the parameter type (eg: INT_MIN for an integer, -DBL_MAX for a double parameter)
00678  *
00679  * Setting this will also reset ::kOfxParamPropDisplayMin.
00680  */
00681 #define kOfxParamPropMin "OfxParamPropMin"
00682 
00683 /** @brief The maximum value for a numeric parameter.
00684  *
00685  *  - Type - int or double X N
00686  *  - Property Set - plugin parameter descriptor (read/write) and instance (read/write),
00687  *  - Default - the largest possible value corresponding to the parameter type (eg: INT_MAX for an integer, DBL_MAX for a double parameter)
00688  *
00689  * Setting this will also reset :;kOfxParamPropDisplayMax.
00690  */
00691 #define kOfxParamPropMax "OfxParamPropMax"
00692 
00693 /** @brief The minimum value for a numeric parameter on any user interface.
00694  *
00695  *  - Type - int or double X N
00696  *  - Property Set - plugin parameter descriptor (read/write) and instance (read/write),
00697  *  - Default - the smallest possible value corresponding to the parameter type (eg: INT_MIN for an integer, -DBL_MAX for a double parameter)
00698  *
00699  * If a user interface represents a parameter with a slider or similar, this should be the minumum bound on that slider.
00700  */
00701 #define kOfxParamPropDisplayMin "OfxParamPropDisplayMin"
00702 
00703 /** @brief The maximum value for a numeric parameter on any user interface.
00704  *
00705  *  - Type - int or double X N
00706  *  - Property Set - plugin parameter descriptor (read/write) and instance (read/write),
00707  *  - Default - the largest possible value corresponding to the parameter type (eg: INT_MIN for an integer, -DBL_MAX for a double parameter)
00708  *
00709  * If a user interface represents a parameter with a slider or similar, this should be the maximum bound on that slider.
00710  */
00711 #define kOfxParamPropDisplayMax "OfxParamPropDisplayMax"
00712 
00713 /** @brief The granularity of a slider used to represent a numeric parameter.
00714  * 
00715  * - Type - double X 1
00716  * - Property Set - plugin parameter descriptor (read/write) and instance (read/write),
00717  * - Default - 1
00718  * - Valid Values - any greater than 0.
00719  * 
00720  * This value is always in canonical coordinates for double parameters that are normalised.
00721  */
00722 #define kOfxParamPropIncrement "OfxParamPropIncrement"
00723 
00724 /** @brief How many digits after a decimal point to display for a double param in a GUI.
00725  *
00726  *  - Type - int X 1
00727  *  - Property Set - plugin parameter descriptor (read/write) and instance (read/write),
00728  *  - Default - 2
00729  *  - Valid Values - any greater than 0.
00730  *
00731  * This applies to double params of any dimension.
00732  */
00733 #define kOfxParamPropDigits "OfxParamPropDigits"
00734 
00735 /** @brief Label for individual dimensions on a multidimensional numeric parameter.
00736  *
00737  *  - Type - UTF8 C string X 1
00738  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only),
00739  *  - Default - "x", "y" and "z"
00740  *  - Valid Values - any
00741  *
00742  * Use this on 2D and 3D double and integer parameters to change the label on an individual dimension in any GUI for that parameter.
00743  */
00744 #define kOfxParamPropDimensionLabel "OfxParamPropDimensionLabel"
00745 
00746 /** @brief Will a value change on the parameter add automatic keyframes.
00747  *
00748  *  - Type - int X 1
00749  *  - Property Set - plugin parameter instance (read only),
00750  *  - Valid Values - 0 or 1
00751  *
00752  * This is set by the host simply to indicate the state of the property.
00753  */
00754 #define kOfxParamPropIsAutoKeying "OfxParamPropIsAutoKeying"
00755 
00756 /** @brief A pointer to a custom parameter's interpolation function.
00757  *
00758  *  - Type - pointer X 1
00759  *  - Property Set - plugin parameter descriptor (read/write) and instance (read only),
00760  *  - Default - NULL
00761  *  - Valid Values - must point to a ::OfxCustomParamInterpFuncV1
00762  *
00763  * It is an error not to set this property in a custom parameter during a plugin's define call if the custom parameter declares itself to be an animating parameter.
00764  */
00765 #define kOfxParamPropCustomInterpCallbackV1 "OfxParamPropCustomCallbackV1"
00766 
00767 /** @brief Used to indicate the type of a string parameter.
00768  *
00769  *  - Type - C string X 1
00770  *  - Property Set - plugin string parameter descriptor (read/write) and instance (read only),
00771  *  - Default - ::kOfxParamStringIsSingleLine
00772  *  - Valid Values - This must be one of the following
00773  *      - ::kOfxParamStringIsSingleLine
00774  *      - ::kOfxParamStringIsMultiLine
00775  *      - ::kOfxParamStringIsFilePath
00776  *      - ::kOfxParamStringIsDirectoryPath
00777  *      - ::kOfxParamStringIsLabel
00778  *
00779  */
00780 #define kOfxParamPropStringMode "OfxParamPropStringMode"
00781 
00782 /** @brief Indicates string parameters of file or directory type need that file to exist already.
00783  *
00784  *  - Type - int X 1
00785  *  - Property Set - plugin string parameter descriptor (read/write) and instance (read only),
00786  *  - Default - 1
00787  *  - Valid Values - 0 or 1
00788  *
00789  * If set to 0, it implies the user can specify a new file name, not just a pre-existing one.
00790  */
00791 #define kOfxParamPropStringFilePathExists    "OfxParamPropStringFilePathExists"
00792 
00793 /** @brief Used to set a string parameter to be single line,
00794  *  value to be passed to a kOfxParamPropStringMode property */
00795 #define kOfxParamStringIsSingleLine    "OfxParamStringIsSingleLine"
00796 
00797 /** @brief Used to set a string parameter to be multiple line,
00798 *  value to be passed to a kOfxParamPropStringMode property */
00799 #define kOfxParamStringIsMultiLine     "OfxParamStringIsMultiLine"
00800 
00801 /** @brief Used to set a string parameter to be a file path,
00802  *  value to be passed to a kOfxParamPropStringMode property */
00803 #define kOfxParamStringIsFilePath      "OfxParamStringIsFilePath"
00804 
00805 /** @brief Used to set a string parameter to be a directory path,
00806  *  value to be passed to a kOfxParamPropStringMode property */
00807 #define kOfxParamStringIsDirectoryPath "OfxParamStringIsDirectoryPath"
00808 
00809 /** @brief Use to set a string parameter to be a simple label,
00810  *  value to be passed to a kOfxParamPropStringMode property  */
00811 #define kOfxParamStringIsLabel         "OfxParamStringIsLabel"
00812 
00813 
00814 /** @brief Used by interpolating custom parameters to get and set interpolated values.
00815  *  - Type - C string X 1 or 2
00816  *
00817  * This property is on the \e inArgs property and \e outArgs property of a ::OfxCustomParamInterpFuncV1 and in both cases contains the encoded value of a custom parameter. As an \e inArgs property it will have two values, being the two keyframes to interpolate. As an \e outArgs property it will have a single value and the plugin should fill this with the encoded interpolated value of the parameter.
00818  */
00819 #define kOfxParamPropCustomValue "OfxParamPropCustomValue"
00820 
00821 /** @brief Used by interpolating custom parameters to indicate the time a key occurs at.
00822  *
00823  * - Type - double X 2
00824  * - Property Set - the inArgs parameter of a ::OfxCustomParamInterpFuncV1 (read only)
00825  *
00826  * The two values indicate the absolute times the surrounding keyframes occur at. The keyframes are encoded in a ::kOfxParamPropCustomValue property.
00827  *
00828  */
00829 #define kOfxParamPropInterpolationTime "OfxParamPropInterpolationTime"
00830 
00831 /** @brief Property used by ::OfxCustomParamInterpFuncV1 to indicate the amount of interpolation to perform
00832  *
00833  * - Type - double X 1
00834  * - Property Set - the inArgs parameter of a ::OfxCustomParamInterpFuncV1 (read only)
00835  * - Valid Values - from 0 to 1
00836  *
00837  * This property indicates how far between the two ::kOfxParamPropCustomValue keys to interpolate.
00838  */
00839 #define kOfxParamPropInterpolationAmount "OfxParamPropInterpolationAmount"
00840 
00841 /*@}*/
00842 /*@}*/
00843 
00844 /** @brief Function prototype for custom parameter interpolation callback functions
00845  *
00846  * \arg instance   the plugin instance that this parameter occurs in
00847  * \arg inArgs     handle holding the following properties...
00848  *  - kOfxPropName - the name of the custom parameter to interpolate
00849  *  - kOfxPropTime - absolute time the interpolation is ocurring at
00850  *  - kOfxParamPropCustomValue - string property that gives the value of the two keyframes to interpolate, in this case 2D
00851  *  - kOfxParamPropInterpolationTime - 2D double property that gives the time of the two keyframes we are interpolating
00852  *  - kOfxParamPropInterpolationAmount - 1D double property indicating how much to interpolate between the two keyframes
00853  *
00854  * \arg outArgs handle holding the following properties to be set
00855  *  - kOfxParamPropCustomValue - the value of the interpolated custom parameter, in this case 1D
00856  *
00857  * This function allows custom parameters to animate by performing interpolation between keys.
00858  *
00859  * The plugin needs to parse the two strings encoding keyframes on either side of the time
00860  * we need a value for. It should then interpolate a new value for it, encode it into a string and set
00861  * the ::kOfxParamPropCustomValue property with this on the outArgs handle.
00862  *
00863  * The interp value is a linear interpolation amount, however his may be derived from a cubic (or other) curve.
00864  */
00865 typedef OfxStatus ( OfxCustomParamInterpFuncV1 )( OfxParamSetHandle    instance,
00866                                                   OfxPropertySetHandle inArgs,
00867                                                   OfxPropertySetHandle outArgs );
00868 
00869 
00870 /** @brief The OFX suite used to define and manipulate user visible parameters
00871  */
00872 typedef struct OfxParameterSuiteV1
00873 {
00874         /** @brief Defines a new parameter of the given type in a describe action
00875          *
00876          * \arg paramSet   handle to the parameter set descriptor that will hold this parameter
00877          * \arg paramType   type of the parameter to create, one of the kOfxParamType* #defines
00878          * \arg name        unique name of the parameter
00879          * \arg propertySet  if not null, a pointer to the parameter descriptor's property set will be placed here.
00880          *
00881          * This function defines a parameter in a parameter set and returns a property set which is used to describe that parameter.
00882          *
00883          * This function does not actually create a parameter, it only says that one should exist in any subsequent instances. To fetch an
00884          * parameter instance paramGetHandle must be called on an instance.
00885          *
00886          * This function can always be called in one of a plug-in's 'describe' functions which defines the parameter sets common to all instances of a plugin.
00887          *
00888          * @returns
00889          * - ::kOfxStatOK             - the parameter was created correctly
00890          * - ::kOfxStatErrBadHandle   - if the plugin handle was invalid
00891          * - ::kOfxStatErrExists      - if a parameter of that name exists already in this plugin
00892          * - ::kOfxStatErrUnknown     - if the type is unknown
00893          * - ::kOfxStatErrUnsupported - if the type is known but unsupported
00894          */
00895         OfxStatus ( *paramDefine )( OfxParamSetHandle     paramSet,
00896                                     const char*           paramType,
00897                                     const char*           name,
00898                                     OfxPropertySetHandle* propertySet );
00899 
00900         /** @brief Retrieves the handle for a parameter in a given parameter set
00901          *
00902          * \arg paramSet    instance of the plug-in to fetch the property handle from
00903          * \arg name        parameter to ask about
00904          * \arg param       pointer to a param handle, the value is returned here
00905          * \arg propertySet  if not null, a pointer to the parameter's property set will be placed here.
00906          *
00907          * Parameter handles retrieved from an instance are always distinct in each instance. The paramter handle is valid for the life-time of the instance. Parameter handles in instances are distinct from paramter handles in plugins. You cannot call this in a plugin's describe function, as it needs an instance to work on.
00908          *
00909          * @returns
00910          * - ::kOfxStatOK       - the parameter was found and returned
00911          * - ::kOfxStatErrBadHandle  - if the plugin handle was invalid
00912          * - ::kOfxStatErrUnknown    - if the type is unknown
00913          */
00914         OfxStatus ( *paramGetHandle )( OfxParamSetHandle     paramSet,
00915                                        const char*           name,
00916                                        OfxParamHandle*       param,
00917                                        OfxPropertySetHandle* propertySet );
00918 
00919         /** @brief Retrieves the property set handle for the given parameter set
00920          *
00921          * \arg paramSet      parameter set to get the property set for
00922          * \arg propHandle    pointer to a the property set handle, value is returedn her
00923          *
00924          * \note The property handle belonging to a parameter set is the same as the property handle belonging to the plugin instance.
00925          *
00926          * @returns
00927          * - ::kOfxStatOK       - the property set was found and returned
00928          * - ::kOfxStatErrBadHandle  - if the paramter handle was invalid
00929          * - ::kOfxStatErrUnknown    - if the type is unknown
00930          */
00931         OfxStatus ( *paramSetGetPropertySet )( OfxParamSetHandle     paramSet,
00932                                                OfxPropertySetHandle* propHandle );
00933 
00934         /** @brief Retrieves the property set handle for the given parameter
00935          *
00936          * \arg param         parameter to get the property set for
00937          * \arg propHandle    pointer to a the property set handle, value is returedn her
00938          *
00939          * The property handle is valid for the lifetime of the parameter, which is the lifetime of the instance that owns the parameter
00940          *
00941          * @returns
00942          * - ::kOfxStatOK       - the property set was found and returned
00943          * - ::kOfxStatErrBadHandle  - if the paramter handle was invalid
00944          * - ::kOfxStatErrUnknown    - if the type is unknown
00945          */
00946         OfxStatus ( *paramGetPropertySet )( OfxParamHandle        param,
00947                                             OfxPropertySetHandle* propHandle );
00948 
00949         /** @brief Gets the current value of a parameter,
00950          *
00951          * \arg paramHandle parameter handle to fetch value from
00952          * \arg ...         one or more pointers to variables of the relevant type to hold the parameter's value
00953          *
00954          * This gets the current value of a parameter. The varargs ... argument needs to be pointer to C variables
00955          * of the relevant type for this parameter. Note that params with multiple values (eg Colour) take
00956          * multiple args here. For example...
00957          *
00958          * @verbatim
00959          * OfxParamHandle myDoubleParam, *myColourParam;
00960          * ofxHost->paramGetHandle(instance, "myDoubleParam", &myDoubleParam);
00961          * double myDoubleValue;
00962          * ofxHost->paramGetValue(myDoubleParam, &myDoubleValue);
00963          * ofxHost->paramGetHandle(instance, "myColourParam", &myColourParam);
00964          * double myR, myG, myB;
00965          * ofxHost->paramGetValue(myColourParam, &myR, &myG, &myB);
00966          * @endverbatim
00967          *
00968          * @returns
00969          * - ::kOfxStatOK       - all was OK
00970          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
00971          */
00972         OfxStatus ( *paramGetValue )( OfxParamHandle paramHandle,
00973                                       ... );
00974 
00975 
00976         /** @brief Gets the value of a parameter at a specific time.
00977          *
00978          * \arg paramHandle parameter handle to fetch value from
00979          * \arg time       at what point in time to look up the parameter
00980          * \arg ...        one or more pointers to variables of the relevant type to hold the parameter's value
00981          *
00982          * This gets the current value of a parameter. The varargs needs to be pointer to C variables
00983          * of the relevant type for this parameter. See OfxParameterSuiteV1::paramGetValue for notes on
00984          * the varags list
00985          *
00986          * @returns
00987          * - ::kOfxStatOK       - all was OK
00988          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
00989          */
00990         OfxStatus ( *paramGetValueAtTime )( OfxParamHandle paramHandle,
00991                                             OfxTime        time,
00992                                             ... );
00993 
00994         /** @brief Gets the derivative of a parameter at a specific time.
00995          *
00996          * \arg paramHandle parameter handle to fetch value from
00997          * \arg time       at what point in time to look up the parameter
00998          * \arg ...        one or more pointers to variables of the relevant type to hold the parameter's derivative
00999          *
01000          * This gets the derivative of the parameter at the indicated time.
01001          *
01002          * The varargs needs to be pointer to C variables
01003          * of the relevant type for this parameter. See OfxParameterSuiteV1::paramGetValue for notes on
01004          * the varags list.
01005          *
01006          * Only double and colour params can have their derivatives found.
01007          *
01008          * @returns
01009          * - ::kOfxStatOK       - all was OK
01010          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
01011          */
01012         OfxStatus ( *paramGetDerivative )( OfxParamHandle paramHandle,
01013                                            OfxTime        time,
01014                                            ... );
01015 
01016         /** @brief Gets the integral of a parameter over a specific time range,
01017          *
01018          * \arg paramHandle parameter handle to fetch integral from
01019          * \arg time1      where to start evaluating the integral
01020          * \arg time2      where to stop evaluating the integral
01021          * \arg ...        one or more pointers to variables of the relevant type to hold the parameter's integral
01022          *
01023          * This gets the integral of the parameter over the specified time range.
01024          *
01025          * The varargs needs to be pointer to C variables
01026          * of the relevant type for this parameter. See OfxParameterSuiteV1::paramGetValue for notes on
01027          * the varags list.
01028          *
01029          * Only double and colour params can be integrated.
01030          *
01031          * @returns
01032          * - ::kOfxStatOK       - all was OK
01033          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
01034          */
01035         OfxStatus ( *paramGetIntegral )( OfxParamHandle paramHandle,
01036                                          OfxTime time1, OfxTime time2,
01037                                          ... );
01038 
01039         /** @brief Sets the current value of a parameter
01040          *
01041          * \arg paramHandle parameter handle to set value in
01042          * \arg ...        one or more variables of the relevant type to hold the parameter's value
01043          *
01044          * This sets the current value of a parameter. The varargs ... argument needs to be values
01045          * of the relevant type for this parameter. Note that params with multiple values (eg Colour) take
01046          * multiple args here. For example...
01047          * @verbatim
01048          * ofxHost->paramSetValue(instance, "myDoubleParam", double(10));
01049          * ofxHost->paramSetValue(instance, "myColourParam", double(pix.r), double(pix.g), double(pix.b));
01050          * @endverbatim
01051          *
01052          * @returns
01053          * - ::kOfxStatOK       - all was OK
01054          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
01055          */
01056         OfxStatus ( *paramSetValue )( OfxParamHandle paramHandle,
01057                                       ... );
01058 
01059         /** @brief Keyframes the value of a parameter at a specific time.
01060          *
01061          * \arg paramHandle parameter handle to set value in
01062          * \arg time       at what point in time to set the keyframe
01063          * \arg ...        one or more variables of the relevant type to hold the parameter's value
01064          *
01065          * This sets a keyframe in the parameter at the indicated time to have the indicated value.
01066          * The varargs ... argument needs to be values of the relevant type for this parameter. See the note on
01067          * OfxParameterSuiteV1::paramSetValue for more detail
01068          *
01069          * This function can be called the ::kOfxActionInstanceChanged action and during image effect analysis render passes.
01070          *
01071          * @returns
01072          * - ::kOfxStatOK       - all was OK
01073          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
01074          */
01075         OfxStatus ( *paramSetValueAtTime )( OfxParamHandle paramHandle,
01076                                             OfxTime        time, // time in frames
01077                                             ... );
01078 
01079 
01080         /** @brief Returns the number of keyframes in the parameter
01081          *
01082          * \arg paramHandle parameter handle to interogate
01083          * \arg numberOfKeys  pointer to integer where the return value is placed
01084          *
01085          * This function can be called the ::kOfxActionInstanceChanged action and during image effect analysis render passes.
01086          *
01087          * Returns the number of keyframes in the parameter.
01088          *
01089          * @returns
01090          * - ::kOfxStatOK       - all was OK
01091          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
01092          */
01093         OfxStatus ( *paramGetNumKeys )( OfxParamHandle paramHandle,
01094                                         unsigned int*  numberOfKeys );
01095 
01096         /** @brief Returns the time of the nth key
01097          *
01098          * \arg paramHandle parameter handle to interogate
01099          * \arg nthKey      which key to ask about (0 to paramGetNumKeys -1), ordered by time
01100          * \arg time      pointer to OfxTime where the return value is placed
01101          *
01102          * @returns
01103          * - ::kOfxStatOK       - all was OK
01104          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
01105          * - ::kOfxStatErrBadIndex   - the nthKey does not exist
01106          */
01107         OfxStatus ( *paramGetKeyTime )( OfxParamHandle paramHandle,
01108                                         unsigned int   nthKey,
01109                                         OfxTime*       time );
01110 
01111 
01112         /** @brief Finds the index of a keyframe at/before/after a specified time.
01113          *
01114          * \arg paramHandle parameter handle to search
01115          * \arg time          what time to search from
01116          * \arg direction
01117          * - == 0 indicates search for a key at the indicated time (some small delta)
01118          * - > 0 indicates search for the next key after the indicated time
01119          * - < 0 indicates search for the previous key before the indicated time
01120          * \arg index      pointer to an integer which in which the index is returned set to -1 if no key was found
01121          *
01122          * @returns
01123          * - ::kOfxStatOK            - all was OK
01124          * - ::kOfxStatFailed        - if the search failed to find a key
01125          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
01126          */
01127         OfxStatus ( *paramGetKeyIndex )( OfxParamHandle paramHandle,
01128                                          OfxTime        time,
01129                                          int            direction,
01130                                          int*           index );
01131 
01132         /** @brief Deletes a keyframe if one exists at the given time.
01133          *
01134          * \arg paramHandle parameter handle to delete the key from
01135          * \arg time      time at which a keyframe is
01136          *
01137          * @returns
01138          * - ::kOfxStatOK       - all was OK
01139          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
01140          * - ::kOfxStatErrBadIndex   - no key at the given time
01141          */
01142         OfxStatus ( *paramDeleteKey )( OfxParamHandle paramHandle,
01143                                        OfxTime        time );
01144 
01145         /** @brief Deletes all keyframes from a parameter.
01146          *
01147          * \arg paramHandle parameter handle to delete the keys from
01148          * \arg name      parameter to delete the keyframes frome is
01149          *
01150          * This function can be called the ::kOfxActionInstanceChanged action and during image effect analysis render passes.
01151          *
01152          * @returns
01153          * - ::kOfxStatOK       - all was OK
01154          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
01155          */
01156         OfxStatus ( *paramDeleteAllKeys )( OfxParamHandle paramHandle );
01157 
01158         /** @brief Copies one parameter to another, including any animation etc...
01159          *
01160          * \arg paramTo  parameter to set
01161          * \arg paramFrom parameter to copy from
01162          * \arg dstOffset temporal offset to apply to keys when writing to the paramTo
01163          * \arg frameRange if paramFrom has animation, and frameRange is not null, only this range of keys will be copied
01164          *
01165          * This copies the value of \e paramFrom to \e paramTo, including any animation it may have. All the previous values in \e paramTo will be lost.
01166          *
01167          * To choose all animation in \e paramFrom set \e frameRange to [0, 0]
01168          *
01169          * This function can be called the ::kOfxActionInstanceChanged action and during image effect analysis render passes.
01170          *
01171          * \pre
01172          * - Both parameters must be of the same type.
01173          *
01174          * \return
01175          * - ::kOfxStatOK       - all was OK
01176          * - ::kOfxStatErrBadHandle  - if the parameter handle was invalid
01177          */
01178         OfxStatus ( *paramCopy )( OfxParamHandle paramTo, OfxParamHandle paramFrom, OfxTime dstOffset, OfxRangeD* frameRange );
01179 
01180 
01181         /** @brief Used to group any parameter changes for undo/redo purposes
01182          *
01183          * \arg paramSet   the parameter set in which this is happening
01184          * \arg name       label to attach to any undo/redo string UTF8
01185          *
01186          * If a plugin calls paramSetValue/paramSetValueAtTime on one or more parameters, either from custom GUI interaction
01187          * or some analysis of imagery etc.. this is used to indicate the start of a set of a parameter
01188          * changes that should be considered part of a single undo/redo block.
01189          *
01190          * See also OfxParameterSuiteV1::paramEditEnd
01191          *
01192          * \return
01193          * - ::kOfxStatOK       - all was OK
01194          * - ::kOfxStatErrBadHandle  - if the instance handle was invalid
01195          *
01196          */
01197         OfxStatus ( *paramEditBegin )( OfxParamSetHandle paramSet, const char* name );
01198 
01199         /** @brief Used to group any parameter changes for undo/redo purposes
01200          *
01201          * \arg paramSet   the parameter set in which this is happening
01202          *
01203          * If a plugin calls paramSetValue/paramSetValueAtTime on one or more parameters, either from custom GUI interaction
01204          * or some analysis of imagery etc.. this is used to indicate the end of a set of parameter
01205          * changes that should be considerred part of a single undo/redo block
01206          *
01207          * See also OfxParameterSuiteV1::paramEditBegin
01208          *
01209          * @returns
01210          * - ::kOfxStatOK       - all was OK
01211          * - ::kOfxStatErrBadHandle  - if the instance handle was invalid
01212          *
01213          */
01214         OfxStatus ( *paramEditEnd )( OfxParamSetHandle paramSet );
01215 } OfxParameterSuiteV1;
01216 
01217 #ifdef __cplusplus
01218 }
01219 #endif
01220 
01221 
01222 /** @file ofxParam.h
01223  *
01224  * This header contains the suite definition to manipulate host side parameters.
01225  *
01226  * For more details go see @ref ParametersPage
01227  */
01228 
01229 
01230 #endif