The Plug-in Main Entry Point And Actions

Actions are how a host communicates with a plug-in. They are in effect generic function calls. Actions are issued via a plug-in's mainEntry function pointer found in its OfxPlugin struct. The function signature for the main entry point is...

#include "ofxCore.h"
typedef  OfxStatus (OfxPluginEntryPoint)(const char *action, const void *handle, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs); 

Where,

  • action is a C string indicating the action to be taken,
  • handle is a handle to an object appropriate to that action, cast to void * ,
  • inArgs are a set of properties used as arguments to that action,
  • outArgs are a set of properties the plug-in should modify during the action.

The OfxStatus value returned is dependant upon the action being called, however the value kOfxStatReplyDefault is returned if the plug-in does not trap the action.

The exact set of actions passed to a plug-in's entry point are dependent upon the API the plug-in implements. However, there exists a core set of generic actions that most APIs would use.