00001 #ifndef _VAPI_OPERATION_H_ 00002 #define _VAPI_OPERATION_H_ 00003 #include "vapiTypes.h" 00004 #include "vapiImages.h" 00005 #include "vapiOptions.h" 00006 #include "vapiResult.h" 00007 #include <stdarg.h> 00008 00010 typedef struct _vEffectOptions 00011 { 00013 vBoolean original; 00015 int times; 00017 IplImage *Template; 00018 void (*Macros); 00019 } vEffectOptions; 00020 00022 typedef struct _vEffectSettings 00023 { 00025 vBoolean repeatInside; 00027 vBoolean runSeveralTimes; 00029 vBoolean HasOriginalOption; 00031 int NeedOfAuxImage; 00033 int MacrosNumber; 00034 } vEffectSettings; 00035 00041 typedef void (*vOperationFunction) (vImages * Images, vOptions * options, 00042 vMacroResult * PreviousResult); 00043 00045 typedef struct _vEffect 00046 { 00048 char *name; 00050 char *Group; 00052 char *briefDescription; 00054 char *longDescription; 00056 vOperationFunction func; 00058 vOptionsSettings *OptionsSettings; 00059 } vEffect; 00060 00067 vEffect *vapiOperationInit (const char *name, const char *Group, 00068 vOperationFunction func); 00069 00079 void vapiOperationSettingsSetFloat (vEffect * Operation, const char *name, 00080 const char *description, double min, 00081 double max, double defaultValue, 00082 double scale, 00083 vInterfaceType interfaceType); 00089 void vapiOperationSettingsSetBoolean (vEffect * Operation, const char *name, 00090 const char *description, 00091 vBoolean defaultValue); 00099 void 00100 vapiOperationSettingsSetChoose (vEffect * Operation, 00101 const char *name, const char *description, 00102 int numberOfChoices, int defaultOption, ...); 00107 void vapiOperationSettingsSetChar (vEffect * Operation, const char *name, 00108 const char *description); 00109 00111 void vapiOperationSettingsSetNeedOfAuxImage (vEffect * Operation, 00112 int NeedOfAuxImage); 00113 00115 void vapiOperationSettingsSetRepeatInside (vEffect * Operation); 00116 00118 void vapiOperationSettingsSetRunSeveralTimes (vEffect * Operation); 00119 00121 void vapiOperationSettingsSetMacros (vEffect * Operation, int MacrosNumber); 00122 00132 void 00133 vapiOperationSettingsSetInt (vEffect * Operation, const char *name, 00134 const char *description, int min, int max, 00135 int defaultValue, int scale, 00136 vInterfaceType interfaceType); 00137 00139 void vapiOperationSettingsSetHasOriginalOption (vEffect * Operation); 00140 00142 void vapiOperationSettingsSetOperationBriefDescription (vEffect * Operation, 00143 const char 00144 *briefDescription); 00145 00147 void vapiOperationSettingsSetOperationLongDescription (vEffect * Operation, 00148 const char 00149 *longDescription); 00150 #endif