FSCRT_APPHANDLER Struct Reference

Structure for a application handler. More...

#include <fs_app_r.h>

Public Attributes

FS_LPVOID clientData
 User-defined data. More...
 
FS_RESULT(* CallFunction )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_INT32 function, FSCRT_VAR *parameters, FS_INT32 count, FSCRT_VAR *ret)
 Callback functions to expand functions of Foxit PDF SDK, unsupported now. More...
 
FS_RESULT(* OnEvent )(FS_LPVOID clientData, FS_LPVOID senderObject, FS_DWORD senderObjectType, FS_DWORD eventType, FS_LPVOID eventData)
 Callback functions to events from Foxit PDF SDK. More...
 
void(* OnOutOfMemory )(FS_LPVOID clientData)
 Callback functions indicate that Foxit PDF SDK is out of memory. More...
 
FS_RESULT(* OnRecover )(FS_LPVOID clientData, FS_LPVOID senderObject, FS_DWORD senderObjectType)
 Callback functions to recover the previous operation when Foxit PDF SDK is out of memory. More...
 

Detailed Description

Structure for a application handler.

Note
This is a handler implemented by callers. It is used to expand functions of Foxit PDF SDK, or get events from Foxit PDF SDK.
It is specially designed for higher-level control in Foxit PDF SDK.

Member Data Documentation

FS_RESULT(* FSCRT_APPHANDLER::CallFunction) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_INT32 function, FSCRT_VAR *parameters, FS_INT32 count, FSCRT_VAR *ret)

Callback functions to expand functions of Foxit PDF SDK, unsupported now.

Parameters
[in]clientDataPointer to user-defined data.
[in]documentHandle to a FSCRT_DOCUMENT object which is a document object.
[in]functionFunction ID to expand functions of Foxit PDF SDK.
[in]parametersPointer to parameter list for functions. It could be NULL if count equals zero.
[in]countCount of the parameter parameters, it could be zero if the expanded functions have no parameters.
[out]retPointer to a FSCRT_VAR structure that receives the return value of function. It shall not be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if the parameter ret is NULL.
FSCRT_ERRCODE_UNSUPPORTED if the expandeding function is not supported by applications. For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
FS_LPVOID FSCRT_APPHANDLER::clientData

User-defined data.

Note
Callers can use this field to track control.
FS_RESULT(* FSCRT_APPHANDLER::OnEvent) (FS_LPVOID clientData, FS_LPVOID senderObject, FS_DWORD senderObjectType, FS_DWORD eventType, FS_LPVOID eventData)

Callback functions to events from Foxit PDF SDK.

Data type of the parameter senderObject depends on the parameter senderObjectType, as follows:
Format: object type - object data type

Parameters
[in]clientDataPointer to user-defined data.
[in]senderObjectPointer to a sender object, related to the parameter senderObjectType.
[in]senderObjectTypeObject type of the parameter senderObject. Currently available value is FSCRT_OBJECTTYPE_PSI.
[in]eventTypeThe event type of parameter eventData. Currently available value is FSCRT_EVENT_PSI_INVALIDATE.
[in]eventDataThe event data, related to the parameter eventType.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if the parameter senderObject or eventData is NULL.
FSCRT_ERRCODE_UNSUPPORTED if the expanding function is not supported by applications. For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
void(* FSCRT_APPHANDLER::OnOutOfMemory) (FS_LPVOID clientData)

Callback functions indicate that Foxit PDF SDK is out of memory.

Parameters
[in]clientDataPointer to the user-defined data.
Returns
None.
Note
This function is called when memory is insufficient. Typically applications will get a return value FSCRT_ERRCODE_OUTOFMEMORY after this callback.
FS_RESULT(* FSCRT_APPHANDLER::OnRecover) (FS_LPVOID clientData, FS_LPVOID senderObject, FS_DWORD senderObjectType)

Callback functions to recover the previous operation when Foxit PDF SDK is out of memory.

Data type of the parameter senderObject depends on the parameter senderObjectType, as following:
Format: object type - object data type

Parameters
[in]clientDataPointer to user-defined data.
[in]senderObjectPointer to a sender object, related to the parameter senderObjectType. Valid values are mentioned in details part.
[in]senderObjectTypeObject type of the parameter senderObject. Valid values are mentioned in details part.
Returns
None.
Note
This function will be called when Foxit PDF SDK meets error but cannot recover. Typically applications will get a return value FSCRT_ERRCODE_UNRECOVERABLE after this callback.

The documentation for this struct was generated from the following file:

Foxit Corporation