Main Page | Modules | Class List | File List | Class Members | File Members

ofxCore.h

Go to the documentation of this file.
00001 #ifndef _ofxCore_h_
00002 #define _ofxCore_h_
00003 
00004 /*
00005 Software License :
00006 
00007 Copyright (c) 2003-2004, The Foundry Visionmongers 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 Foundry Visionmongers 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 
00034 #include "stddef.h" // for size_t
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00050 #if defined(WIN32) || defined(WIN64)
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

Copyright 2003-2004 The Foundry Visonmongers Ltd. All rights reserved.
Copying and redistribution with or without modification, is permitted provided that the following conditions are met:
  1. Redistributions of the document must retain the above copyright notice and this list of conditions.
  2. Neither the name of The Foundry Visonmongers Ltd nor names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
Automatic documentation generated by DOxygen.