TuttleOFX
1
|
00001 #ifndef _ofxParamAPI_h_ 00002 #define _ofxParamAPI_h_ 00003 00004 #include "ofxCore.h" 00005 #include "ofxAttribute.h" 00006 #include "ofxParam.h" 00007 00008 #ifdef __cplusplus 00009 extern "C" { 00010 #endif 00011 00012 /** 00013 * @brief String used to label OFX Param manipulation Plug-ins 00014 * 00015 * Set the pluginApi member of the OfxPluginHeader inside any OfxParamNodePluginStruct 00016 * to be this so that the host knows the plugin is an param node. 00017 */ 00018 #define kOfxParamPluginApi "OfxParamPluginAPI" 00019 00020 /** 00021 * @brief The current version of the Param API 00022 */ 00023 #define kOfxParamPluginApiVersion 1 00024 00025 /** @brief Blind declaration of an OFX param node 00026 */ 00027 typedef struct OfxParamNodeStruct* OfxParamNodeHandle; 00028 00029 00030 /** @brief Used as a value for ::kOfxPropType on param node host handles */ 00031 #define kOfxTypeParameterNodeHost "OfxTypeParameterNodeHost" 00032 00033 /** @brief Used as a value for ::kOfxPropType on param node plugin handles */ 00034 #define kOfxTypeParameterNode "OfxTypeParameterNode" 00035 00036 /** @brief Used as a value for ::kOfxPropType on image effect instance handles */ 00037 #define kOfxTypeParameterNodeInstance "OfxTypeParameterNodeInstance" 00038 00039 00040 00041 /** 00042 * @defgroup ActionsParamNode Actions Param Node 00043 */ 00044 ///@{ 00045 00046 #define kOfxParamNodeActionGetTimeDomain "OfxParamNodeActionGetTimeDomain" 00047 /// GetTimeRangeNeeded is similar to the function GetFramesNeeded in ImageEffectNode 00048 #define kOfxParamNodeActionGetTimeRangeNeeded "OfxParamNodeActionGetTimeRangeNeeded" 00049 #define kOfxParamNodeActionProcess "OfxParamNodeActionProcess" 00050 #define kOfxParamNodeActionBeginSequenceProcess "OfxParamNodeActionBeginSequenceProcess" 00051 #define kOfxParamNodeActionEndSequenceProcess "OfxParamNodeActionEndSequenceProcess" 00052 00053 ///@} 00054 00055 /** @brief the string that names image effect suites, passed to OfxHost::fetchSuite */ 00056 #define kOfxParamNodeSuite "OfxParamNodeSuite" 00057 00058 00059 /** @brief The OFX suite for param manipulation 00060 * 00061 * This suite provides the functions needed by a plugin to defined and use a param manipulation plugin. 00062 */ 00063 typedef struct OfxParamNodeSuiteV1 00064 { 00065 /** @brief Retrieves the property set for the given param node 00066 * 00067 * \arg paramNode param node to get the property set for 00068 * \arg propHandle pointer to a the property set pointer, value is returned here 00069 * 00070 * The property handle is for the duration of the param node handle. 00071 * 00072 * @returns 00073 * - ::kOfxStatOK - the property set was found and returned 00074 * - ::kOfxStatErrBadHandle - if the paramter handle was invalid 00075 * - ::kOfxStatErrUnknown - if the type is unknown 00076 */ 00077 OfxStatus ( *getPropertySet )( OfxParamNodeHandle paramNode, 00078 OfxPropertySetHandle* propHandle ); 00079 00080 /** @brief Retrieves the parameter set for the given param node 00081 * 00082 * \arg paramNode param node to get the property set for 00083 * \arg paramSet pointer to a the parameter set, value is returned here 00084 * 00085 * The param set handle is valid for the lifetime of the param node handle. 00086 * 00087 * @returns 00088 * - ::kOfxStatOK - the property set was found and returned 00089 * - ::kOfxStatErrBadHandle - if the paramter handle was invalid 00090 * - ::kOfxStatErrUnknown - if the type is unknown 00091 */ 00092 OfxStatus ( *getParamSet )( OfxParamNodeHandle paramNode, 00093 OfxParamSetHandle* paramSet ); 00094 00095 /** @brief Returns whether to abort processing or not. 00096 * 00097 * \arg paramNode - instance of the param node 00098 * 00099 * A host may want to signal to a plugin that it should stop whatever rendering it is doing and start again. 00100 * Generally this is done in interactive threads in response to users tweaking some parameter. 00101 * 00102 * This function indicates whether a plugin should stop whatever processing it is doing. 00103 * 00104 * @returns 00105 * - 0 if the effect should continue whatever processing it is doing 00106 * - 1 if the effect should abort whatever processing it is doing 00107 */ 00108 int ( *abort )( OfxParamNodeHandle paramNode ); 00109 00110 00111 } OfxParamNodeSuiteV1; 00112 00113 00114 00115 #ifdef __cplusplus 00116 } 00117 #endif 00118 00119 #endif 00120