TuttleOFX
1
|
00001 #ifndef _ofxGraphAPI_h_ 00002 #define _ofxGraphAPI_h_ 00003 00004 #include "ofxCore.h" 00005 #include "ofxAttribute.h" 00006 #include "ofxParam.h" 00007 #include "ofxClip.h" 00008 00009 #ifdef __cplusplus 00010 extern "C" { 00011 #endif 00012 00013 /** 00014 * @brief String used to label OFX Graph Plug-ins 00015 * 00016 * Set the pluginApi member of the OfxPluginHeader inside any OfxGraphPluginStruct 00017 * to be this so that the host knows the plugin is a subgraph node. 00018 */ 00019 #define kOfxGraphPluginApi "OfxGraphPluginAPI" 00020 00021 /** 00022 * @brief The current version of the Graph API 00023 */ 00024 #define kOfxGraphPluginApiVersion 1 00025 00026 00027 /** 00028 * @defgroup PropertiesGraphAPI Properties Graph API 00029 */ 00030 ///@{ 00031 00032 #define kOfxPluginsNeeded "ofxPluginsNeeded" 00033 00034 ///@} 00035 00036 typedef struct OfxGraphSuiteV1 00037 { 00038 // plugins from core ( not the one instantiated in the Graph ) 00039 00040 OfxStatus ( *getNumberOfPlugins )( int* ); 00041 OfxStatus ( *getPluginDescriptor )( int id, OfxPluginHandle* pluginDescriptor ); 00042 OfxStatus ( *getPluginDescriptorFromName )( char* id, OfxPluginHandle* pluginDescriptor ); 00043 00044 OfxStatus ( *createNode )( OfxPluginHandle pluginDescriptor, OfxPluginHandle* node ); 00045 00046 OfxStatus ( *getPropertySet )( OfxGraphHandle graph, OfxPropertySetHandle* propHandle ); 00047 00048 // An attribute are input/ouput elements of the OfxPlugin ( can be clip, image clip, sound clip, params... ) 00049 OfxStatus ( *getAttributeSet )( OfxGraphHandle graph, OfxAttributeSetHandle* attributeSet ); 00050 OfxStatus ( *attributeGetHandle )( OfxAttributeSetHandle attributeSet, const char* name, OfxAttributeHandle* attribute, OfxPropertySetHandle* propertySet ); 00051 OfxStatus ( *attributeGetPropertySet )( OfxAttributeHandle attribute, OfxPropertySetHandle* propHandle ); 00052 00053 OfxStatus ( *connectNodes )( OfxNodeHandle fromNode, OfxAttributeHandle fromAttribute, OfxNodeHandle toNode, OfxAttributeHandle toAttribute ); 00054 OfxStatus ( *unconnectNodes )( OfxNodeHandle fromNode, OfxAttributeHandle fromAttribute, OfxNodeHandle toNode, OfxAttributeHandle toAttribute ); 00055 // the exposed attribute is an output if the attribute from the inner node is itself an ouput, an input if the attribute from the inner node is itself an input 00056 OfxStatus ( *exposeAttribute )( OfxNodeHandle node, OfxAttributeHandle attribute, OfxPropertySetHandle propertySet ); 00057 OfxStatus ( *unexposeAttribute )( OfxNodeHandle node, OfxAttributeHandle attribute, OfxPropertySetHandle propertySet ); 00058 00059 } OfxGraphSuiteV1; 00060 00061 /* 00062 -------------------------------------------------------------------------------- 00063 ______________ 00064 | | 00065 | Attribute | 00066 |_____________| 00067 / \ 00068 ______/____ _\______ 00069 | | | | 00070 | Param | | Clip | 00071 |_________| |_______| 00072 00073 -------------------------------------------------------------------------------- 00074 _______________________ 00075 | | 00076 | Node | attributeList 00077 |______________________| 00078 / | \ 00079 _______/___ ____|______ _\________________ 00080 | | | | | | 00081 | ParamNode | | GraphNode | | ImageEffectNode | clipList 00082 |___________| |___________| |_________________| paramList 00083 00084 -------------------------------------------------------------------------------- 00085 */ 00086 00087 #ifdef __cplusplus 00088 } 00089 #endif 00090 00091 #endif 00092