//////////////////////////////////////////////////////////////////////////////// // the entry point for the overlay static OfxStatus overlayMain(const char *action, const void *handle, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs) { OfxInteractHandle interact = (OfxInteractHandle ) handle; OfxPropertySetHandle props; gInteractHost->interactGetPropertySet(interact, &props); if(strcmp(action, kOfxActionDescribe) == 0) { return interactDescribe(interact); } else { // in which case handle is the interact instance // fetch the effect instance from the interact OfxImageEffectHandle pluginInstance; gPropHost->propGetPointer(props, kOfxPropEffectInstance, 0, (void **) &pluginInstance); if(strcmp(action, kOfxActionCreateInstance) == 0) { return interactCreateInstance(pluginInstance, interact); } else if(strcmp(action, kOfxActionDestroyInstance) == 0) { return interactDestroyInstance(pluginInstance, interact); } else if(strcmp(action, kOfxInteractActionDraw) == 0) { return interactDraw(pluginInstance, interact, inArgs); } else if(strcmp(action, kOfxInteractActionPenMotion) == 0) { return interactPenMotion(pluginInstance, interact, inArgs); } else if(strcmp(action, kOfxInteractActionPenDown) == 0) { return interactPenDown(pluginInstance, interact, inArgs); } else if(strcmp(action, kOfxInteractActionPenUp) == 0) { return interactPenUp(pluginInstance, interact, inArgs); } return kOfxStatReplyDefault; } }
// the entry point for the overlay OfxStatus overlayMain(const char *action, const void *handle, OfxPropertySetHandle inArgs, OfxPropertySetHandle /*outArgs*/) { OfxInteractHandle interact = (OfxInteractHandle ) handle; OfxPropertySetHandle props; gInteractHost->interactGetPropertySet(interact, &props); if(strcmp(action, kOfxActionDescribe) == 0) return interactDescribe(interact); else { // fetch the effect instance from the interact OfxImageEffectHandle effect; gPropHost->propGetPointer(props, kOfxPropEffectInstance, 0, (void **) &effect); if(strcmp(action, kOfxActionCreateInstance) == 0) return interactCreateInstance(effect, interact); else if(strcmp(action, kOfxActionDestroyInstance) == 0) return interactDestroyInstance(effect, interact); else if(strcmp(action, kOfxInteractActionDraw) == 0) return interactDraw(effect, interact, inArgs); else if(strcmp(action, kOfxInteractActionPenMotion) == 0) return interactPenMotion(effect, interact, inArgs); else if(strcmp(action, kOfxInteractActionPenDown) == 0) return interactPenDown(effect, interact, inArgs); else if(strcmp(action, kOfxInteractActionPenUp) == 0) return interactPenUp(effect, interact, inArgs); else if(strcmp(action, kOfxInteractActionKeyDown) == 0) return interactKeyDown(effect, interact, inArgs); else if(strcmp(action, kOfxInteractActionKeyUp) == 0) return interactKeyUp(effect, interact, inArgs); return kOfxStatReplyDefault; } return kOfxStatReplyDefault; }