00001 #ifndef _ofxCore_h_
00002 #define _ofxCore_h_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #include "stddef.h"
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00050 #ifdef WIN32
00051 #define OfxExport extern __declspec(dllexport)
00052 #else
00053 #define OfxExport extern
00054 #endif
00055
00057 typedef struct OfxPropertySetStruct *OfxPropertySetHandle;
00058
00060 typedef int OfxStatus;
00061
00067 typedef struct OfxHost {
00071 OfxPropertySetHandle host;
00072
00087 void *(*fetchSuite)(OfxPropertySetHandle host, const char *suiteName, int suiteVersion);
00088 } OfxHost;
00089
00090
00104 typedef OfxStatus (OfxPluginEntryPoint)(const char *action, const void *handle, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs);
00105
00116 typedef struct OfxPlugin {
00120 const char *pluginApi;
00121
00123 int apiVersion;
00124
00132 const char *pluginIdentifier;
00133
00135 unsigned int pluginVersionMajor;
00136
00139 unsigned int pluginVersionMinor;
00140
00155 void (*setHost)(OfxHost *host);
00156
00167 OfxPluginEntryPoint *mainEntry;
00168 } OfxPlugin;
00169
00176
00178 #define kOfxActionLoad "OfxActionLoad"
00179
00181 #define kOfxActionDescribe "OfxActionDescribe"
00182
00184 #define kOfxActionUnload "OfxActionUnload"
00185
00187 #define kOfxActionPurgeCaches "OfxActionPurgeCaches"
00188
00190 #define kOfxActionSyncPrivateData "OfxActionSyncPrivateData"
00191
00193 #define kOfxActionCreateInstance "OfxActionCreateInstance"
00194
00196 #define kOfxActionDestroyInstance "OfxActionDestroyInstance"
00197
00199 #define kOfxActionInstanceChanged "OfxActionInstanceChanged"
00200
00202 #define kOfxActionBeginInstanceChanged "OfxActionBeginInstanceChanged"
00203
00205 #define kOfxActionEndInstanceChanged "OfxActionEndInstanceChanged"
00206
00208 #define kOfxActionBeginInstanceEdit "OfxActionBeginInstanceEdit"
00209
00211 #define kOfxActionEndInstanceEdit "OfxActionEndInstanceEdit"
00212
00220 OfxExport OfxPlugin *OfxGetPlugin(int nth);
00221
00228 OfxExport int OfxGetNumberOfPlugins(void);
00229
00236
00243
00250 #define kOfxPropTime "OfxPropTime"
00251
00262 #define kOfxPropIsInteractive "OfxPropIsInteractive"
00263
00275 #define kOfxPluginPropFilePath "OfxPluginPropFilePath"
00276
00285 #define kOfxPropInstanceData "OfxPropInstanceData"
00286
00300 #define kOfxPropType "OfxPropType"
00301
00309 #define kOfxPropName "OfxPropName"
00310
00321 #define kOfxPropLabel "OfxPropLabel"
00322
00323
00332 #define kOfxPropShortLabel "OfxPropShortLabel"
00333
00342 #define kOfxPropLongLabel "OfxPropLongLabel"
00343
00355 #define kOfxPropChangeReason "OfxPropChangeReason"
00356
00365 #define kOfxPropEffectInstance "OfxPropEffectInstance"
00366
00369
00371 #define kOfxChangeUserEdited "OfxChangeUserEdited"
00372
00374 #define kOfxChangePluginEdited "OfxChangePluginEdited"
00375
00377 #define kOfxChangeTime "OfxChangeTime"
00378
00380 typedef double OfxTime;
00381
00383 typedef struct OfxRangeI {
00384 int min, max;
00385 } OfxRangeI;
00386
00388 typedef struct OfxRangeD {
00389 double min, max;
00390 } OfxRangeD;
00391
00393 typedef struct OfxPointI {
00394 int x, y;
00395 } OfxPointI;
00396
00398 typedef struct OfxPointD {
00399 double x, y;
00400 } OfxPointD;
00401
00406 #define kOfxFlagInfiniteMax ((int)((1 << (sizeof(int)*8 - 1)) - 1))
00407
00412 #define kOfxFlagInfiniteMin ((int)(-kOfxFlagInfiniteMax - 1))
00413
00425 typedef struct OfxRectI {
00426 int x1, y1, x2, y2;
00427 } OfxRectI;
00428
00440 typedef struct OfxRectD {
00441 double x1, y1, x2, y2;
00442 } OfxRectD;
00443
00445 typedef struct OfxRGBAColourB {
00446 unsigned char r, g, b, a;
00447 }OfxRGBAColourB;
00448
00450 typedef struct OfxRGBAColourS {
00451 unsigned short r, g, b, a;
00452 }OfxRGBAColourS;
00453
00455 typedef struct OfxRGBAColourF {
00456 float r, g, b, a;
00457 }OfxRGBAColourF;
00458
00459
00461 typedef struct OfxRGBAColourD {
00462 double r, g, b, a;
00463 }OfxRGBAColourD;
00464
00465
00467 typedef struct OfxYUVAColourB {
00468 unsigned char y, u, v, a;
00469 }OfxYUVAColourB;
00470
00472 typedef struct OfxYUVAColourS {
00473 unsigned short y, u, v, a;
00474 }OfxYUVAColourS;
00475
00477 typedef struct OfxYUVAColourF {
00478 float y, u, v, a;
00479 }OfxYUVAColourF;
00480
00481
00483 #define kOfxBitDepthNone "OfxBitDepthNone"
00484
00486 #define kOfxBitDepthByte "OfxBitDepthByte"
00487
00489 #define kOfxBitDepthShort "OfxBitDepthShort"
00490
00492 #define kOfxBitDepthFloat "OfxBitDepthFloat"
00493
00502
00510
00512 #define kOfxStatOK 0
00513
00515 #define kOfxStatFailed ((int)1)
00516
00521 #define kOfxStatErrFatal ((int)2)
00522
00524 #define kOfxStatErrUnknown ((int)3)
00525
00530 #define kOfxStatErrMissingHostFeature ((int) 4)
00531
00533 #define kOfxStatErrUnsupported ((int) 5)
00534
00536 #define kOfxStatErrExists ((int) 6)
00537
00539 #define kOfxStatErrFormat ((int) 7)
00540
00542 #define kOfxStatErrMemory ((int) 8)
00543
00545 #define kOfxStatErrBadHandle ((int) 9)
00546
00548 #define kOfxStatErrBadIndex ((int)10)
00549
00551 #define kOfxStatErrValue ((int) 11)
00552
00554 #define kOfxStatReplyYes ((int) 12)
00555
00557 #define kOfxStatReplyNo ((int) 13)
00558
00560 #define kOfxStatReplyDefault ((int) 14)
00561
00565
00566 #ifdef __cplusplus
00567 }
00568 #endif
00569
00578 #endif