Applet Callbacks Structure
When you instantiate an applet using the JMNewAppletViewer function, you must pass a data structure that supplies callback information for the applet. This data structure is defined by the JMAppletViewerCallbacks data type.
struct JMAppletViewerCallbacks {
UInt32 fVersion;
JMShowDocumentProcPtr fShowDocument;
JMSetStatusMsgProcPtr fSetStatusMsg;
};
Field Description
fVersion
- The version of JManager. You should set this field to
kJMVersion.
- fShowDocument
- A pointer to a function that displays the contents of a URL passed to it, possibly in a new window. This callback function has the following type definition:
typedef void (*JMShowDocumentProcPtr) (
JMAppletViewerRef viewer, const char* urlString,
Boolean inNewWindow);
-
- For more information, see the description of the application-defined function
MyShowDocument (page 68).
fSetStatusMsg
- A pointer to a function that handles messages from the applet. The client application can display the message (in a status bar, for example) or ignore it. This callback function has the following type definition:
typedef void (*JMSetStatusMsgProcPtr) (
JMAppletViewerRef viewer, const char* statusMsg);
-
- For more information, see the description of the application-defined function
MySetStatusMsg (page 69).