#include <ShapeUpAPI.h>
Public Attributes | |
SUHookData | hd |
const char * | name |
DWORD | flags |
size_t | argc |
const SUJavaScriptArgument * | args |
size_t | retc |
SUJavaScriptArgument * | rets |
// Let's return 2 values, a shape and a string, to the calling JavaScript // (Error handling omitted for simplicity) SUJavaScriptInvokeHookData *args; // From the hook function SUHANDLE hWorkspace; // From the hook function args->retc = 2; ShapeUp_Allocate(sizeof(SUJavaScriptArgument) * args->retc, (void**)&args->rets); args->rets[0].type = DT_SUHANDLE; args->rets[0].handleVal = SUWorkspace(hWorkspace).GetTheme(0).GetShape(0); args->rets[1].type = DT_STRING; args->rets[1].stringVal = ShapeUp_DuplicateString("A string");
The following return values are supported:
const char* tagSUJavaScriptInvokeHookData::name |
Contains the name of the property or method being invoked.
See JavaScriptInvokeHookDataFlags for appropriate values.
Count of the arguments pointed to by args.
Argument array containing the data sent to the plug-in.
Count of the return values pointed to by rets. Filled in by the GPI.
Return array containing the data sent back to the JavaScript. Filled in by the GPI.