Structure for action handler information. More...
#include <fs_obsolete.h>
Public Attributes | |
FS_LPVOID | clientData |
User-defined data. More... | |
FS_RESULT(* | Release )(FS_LPVOID clientData) |
Optional callback function to release data. More... | |
FS_RESULT(* | InvalidateRect )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_INT32 pageIndex, FSCRT_RECTF *pdfRect) |
Required callback function to invalidate the client area within the specified rectangle. More... | |
FS_RESULT(* | GetCurrentPageIndex )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_INT32 *pageIndex) |
Optional callback function to receives the current page index. More... | |
FS_RESULT(* | SetCurrentPageIndex )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_INT32 pageIndex) |
Optional callback function to set the current page index. More... | |
FS_RESULT(* | GetRotation )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_INT32 pageIndex, FS_INT32 *rotation) |
Optional callback function to receive current rotation of the page view. More... | |
FS_RESULT(* | ExecuteNamedAction )(FS_LPVOID clientData, FSCRT_DOCUMENT document, const FSCRT_BSTR *namedAction) |
Optional callback function to execute a named action. More... | |
FS_RESULT(* | SetChangeMark )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_BOOL changeMark) |
Optional callback function to set the change mark which indicates whether the content of document is changed or not. More... | |
FS_RESULT(* | GetChangeMark )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_BOOL *changeMark) |
Optional callback function to receive the change mark which indicates whether the content of document is changed or not. More... | |
FS_RESULT(* | GetOpenedDocs )(FS_LPVOID clientData, FSCRT_DOCUMENT *docs, FS_INT32 *count) |
Optional callback function to receives handles of all documents which are opened now. More... | |
FS_RESULT(* | Alert )(FS_LPVOID clientData, const FSCRT_BSTR *msg, const FSCRT_BSTR *title, FS_INT32 type, FS_INT32 icon, FS_INT32 *retCode) |
Optional callback function to pop up a dialogue to show warnings or hints. More... | |
FS_RESULT(* | Beep )(FS_LPVOID clientData, FS_INT32 type) |
Optional callback function to cause the system to play a sound. More... | |
FS_RESULT(* | Response )(FS_LPVOID clientData, const FSCRT_BSTR *question, const FSCRT_BSTR *title, const FSCRT_BSTR *defaultValue, const FSCRT_BSTR *label, FS_BOOL isPassword, FSCRT_BSTR *response) |
Optional callback function to display a dialogue box containing a question and an entry field for the user to reply to the question. More... | |
FS_RESULT(* | GetFilePath )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FSCRT_BSTR *filePath) |
Optional callback function to get the file path of current document. More... | |
FS_RESULT(* | Mail )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_BOOL bUI, const FSCRT_BSTR *To, const FSCRT_BSTR *Subject, const FSCRT_BSTR *CC, const FSCRT_BSTR *BCC, const FSCRT_BSTR *Msg) |
Optional callback function to mail current PDF document as an attachment to all recipients, with or without user interaction. More... | |
FS_RESULT(* | Print )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_BOOL isUI, FS_INT32 start, FS_INT32 end, FS_BOOL isSilent, FS_BOOL isShrinkToFit, FS_BOOL isPrintAsImage, FS_BOOL isReverse, FS_BOOL isAnnotations) |
Optional callback function to print all or a specific number of pages of the document. More... | |
FS_RESULT(* | SubmitForm )(FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_LPVOID formData, FS_DWORD length, const FSCRT_BSTR *URL) |
Optional callback function to submit the form data to a specified URL. More... | |
FS_RESULT(* | LaunchURL )(FS_LPVOID clientData, const FSCRT_BSTR *URL) |
Optional callback function to launch to a specified URL. More... | |
FS_RESULT(* | BrowseFile )(FS_LPVOID clientData, FSCRT_BSTR *filePath) |
Optional callback function to show a file selection dialogue, and return the selected file path. More... | |
FS_RESULT(* | GetLanguage )(FS_LPVOID clientData, FS_INT32 *language) |
Optional callback function to get the language of the running viewer application. More... | |
FS_RESULT(* | PopupMenu )(FS_LPVOID clientData, const FSPDF_MENULIST *menus, FS_INT32 count, FSCRT_BSTR *seletedMenu) |
Optional callback function to pop up a menu window. More... | |
Structure for action handler information.
This is a handler and should be implemented by caller.
Action handler provides a number of interfaces to implement the actions.
FS_RESULT(* FSPDF_ACTION_HANDLER::Alert) (FS_LPVOID clientData, const FSCRT_BSTR *msg, const FSCRT_BSTR *title, FS_INT32 type, FS_INT32 icon, FS_INT32 *retCode) |
Optional callback function to pop up a dialogue to show warnings or hints.
[in] | clientData | Pointer to the interface structure itself. |
[in] | msg | Pointer to a FSCRT_BSTR structure to specify the message to be displayed. It should be a UTF-8 string. |
[in] | title | Pointer to a FSCRT_BSTR structure to specify the title of the dialogue. It should be a UTF-8 string. |
[in] | type | Type of button group. Its value can be:
|
[in] | icon | Icon type. Its value can be:
|
[out] | retCode | Pointer to a FS_INT32 object. It can be:
|
FS_RESULT(* FSPDF_ACTION_HANDLER::Beep) (FS_LPVOID clientData, FS_INT32 type) |
Optional callback function to cause the system to play a sound.
[in] | clientData | Pointer to the interface structure itself. |
[in] | type | Sound type. Its value can be:
|
FS_RESULT(* FSPDF_ACTION_HANDLER::BrowseFile) (FS_LPVOID clientData, FSCRT_BSTR *filePath) |
Optional callback function to show a file selection dialogue, and return the selected file path.
[in] | clientData | The user-supplied data. |
[out] | filePath | Pointer to a FSCRT_BSTR structure that receives the file path. It can be NULL And it should be a UTF-8 string if it is not NULL. |
FS_LPVOID FSPDF_ACTION_HANDLER::clientData |
User-defined data.
FS_RESULT(* FSPDF_ACTION_HANDLER::ExecuteNamedAction) (FS_LPVOID clientData, FSCRT_DOCUMENT document, const FSCRT_BSTR *namedAction) |
Optional callback function to execute a named action.
Please refer to description of named actions description in PDF Reference 1.7 for more details.
[in] | clientData | Pointer to the interface structure itself. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | namedAction | Pointer to a FSCRT_BSTR structure to specify the named action. It would be a UTF-8 string. |
FS_RESULT(* FSPDF_ACTION_HANDLER::GetChangeMark) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_BOOL *changeMark) |
Optional callback function to receive the change mark which indicates whether the content of document is changed or not.
[in] | clientData | Pointer to the interface structure itself. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[out] | changeMark | Pointer to a FS_BOOL object that receives the change mark. |
FS_RESULT(* FSPDF_ACTION_HANDLER::GetCurrentPageIndex) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_INT32 *pageIndex) |
Optional callback function to receives the current page index.
[in] | clientData | Pointer to user-defined data. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[out] | pageIndex | Pointer to a FS_INT32 object that receive the index of current PDF page. This should be stared from 0 and less than page count of current document. |
FS_RESULT(* FSPDF_ACTION_HANDLER::GetFilePath) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FSCRT_BSTR *filePath) |
Optional callback function to get the file path of current document.
[in] | clientData | The user-supplied data. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[out] | filePath | Pointer to a FSCRT_BSTR structure that receives the file path. It can be NULL And it should be a UTF-8 string if it is not NULL. |
FS_RESULT(* FSPDF_ACTION_HANDLER::GetLanguage) (FS_LPVOID clientData, FS_INT32 *language) |
Optional callback function to get the language of the running viewer application.
[in] | clientData | The user-supplied data. |
[out] | language | Pointer to a FS_INT32 object that receives the language. Please refer to macro definitions FSCRT_LANGUAGE_XXX and this would be one of these macros. |
FS_RESULT(* FSPDF_ACTION_HANDLER::GetOpenedDocs) (FS_LPVOID clientData, FSCRT_DOCUMENT *docs, FS_INT32 *count) |
Optional callback function to receives handles of all documents which are opened now.
This function would be called by Foxit PDF SDK twice to get handles of opened document:
For the first time, set parameter docs to NULL to get the actual count of opened document. The count value will be set to parameter count as a result returned by first calling. Then use count to allocate docs.
For the second time, input the allocated docs and its size count. When this function returns successfully, docs will get an array of opened documents and count will get the actual count.
The size of the input array should not be less than the actual count.
[in] | clientData | Pointer to the interface structure itself. |
[in,out] | docs | Pointer to a FSCRT_DOCUMENT handle that receives a array storing handles of all opened documents. This can be NULL for getting actual count of opened documents before allocate this array. Please see detail description about how this callback function will be used. |
[in,out] | count | Pointer to a FS_INT32 object. When this function is called, it should be the size of array docs if the parameter docs is not NULL. When this function returns, it will receive actual count of opened documents which are got. Please see detail description about how this callback function will be used. |
FS_RESULT(* FSPDF_ACTION_HANDLER::GetRotation) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_INT32 pageIndex, FS_INT32 *rotation) |
Optional callback function to receive current rotation of the page view.
[in] | clientData | Pointer to the interface structure itself. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | pageIndex | The page index which starts from 0. |
[out] | rotation | The rotation of the page being displayed. Please refer to macro definitions FSCRT_PAGEROTATION_XXX and this would be one of these macros. |
FS_RESULT(* FSPDF_ACTION_HANDLER::InvalidateRect) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_INT32 pageIndex, FSCRT_RECTF *pdfRect) |
Required callback function to invalidate the client area within the specified rectangle.
All positions are measured in PDF "user space". Implementation should call function FSPDF_RenderContext_StartPage for repainting a specified page area.
[in] | clientData | Pointer to user-defined data. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | pageIndex | The page index which start from 0. |
[in] | pdfRect | Pointer to a FSCRT_RECTF structure, which specify the page area in PDF page coordinate. |
FS_RESULT(* FSPDF_ACTION_HANDLER::LaunchURL) (FS_LPVOID clientData, const FSCRT_BSTR *URL) |
Optional callback function to launch to a specified URL.
[in] | clientData | The user-supplied data. |
[in] | URL | Pointer to a FSCRT_BSTR structure to specify a URL. It should be a UTF-8 string. |
FS_RESULT(* FSPDF_ACTION_HANDLER::Mail) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_BOOL bUI, const FSCRT_BSTR *To, const FSCRT_BSTR *Subject, const FSCRT_BSTR *CC, const FSCRT_BSTR *BCC, const FSCRT_BSTR *Msg) |
Optional callback function to mail current PDF document as an attachment to all recipients, with or without user interaction.
[in] | clientData | The user-supplied data. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | bUI | A boolean value: TRUE means that the rest of the parameters are used in a compose-new-message window which is displayed to the user. FALSE means that the parameter To is required and all others are optional. |
[in] | To | Pointer to a FSCRT_BSTR structure to specify a semicolon-delimited list of recipients for the message. It should be a UTF-8 string. |
[in] | Subject | Pointer to a FSCRT_BSTR structure to specify the subject of the message. It should be a UTF-8 string. The limit of its length is 64 KB. |
[in] | CC | Pointer to a FSCRT_BSTR structure to specify a semicolon-delimited list of CC recipients for the message. It should be a UTF-8 string. |
[in] | BCC | Pointer to a FSCRT_BSTR structure to specify a semicolon-delimited list of BCC recipients for the message. It should be a UTF-8 string. |
[in] | Msg | Pointer to a FSCRT_BSTR structure to specify the content of the message. It should be a UTF-8 string. The limit of its length is 64 KB. |
FS_RESULT(* FSPDF_ACTION_HANDLER::PopupMenu) (FS_LPVOID clientData, const FSPDF_MENULIST *menus, FS_INT32 count, FSCRT_BSTR *seletedMenu) |
Optional callback function to pop up a menu window.
Application should call function FSCRT_BStr_Set to set the value of seletedMenu, and do not call function FSCRT_BStr_Clear to free seletedMenu. The position of menu window is same as cursor's.
[in] | clientData | The user-supplied data. |
[in] | menus | Pointer to an array of FSPDF_MENULIST object which is the menus. |
[in] | count | The size of menus. |
[out] | seletedMenu | Pointer to a FSCRT_BSTR structure that receives selected menu. |
FS_RESULT(* FSPDF_ACTION_HANDLER::Print) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_BOOL isUI, FS_INT32 start, FS_INT32 end, FS_BOOL isSilent, FS_BOOL isShrinkToFit, FS_BOOL isPrintAsImage, FS_BOOL isReverse, FS_BOOL isAnnotations) |
Optional callback function to print all or a specific number of pages of the document.
[in] | clientData | The user-supplied data. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | isUI | TRUE means that a UI will be presented to the user to obtain printing information and confirm the action. |
[in] | start | A zero-based index of the start of an inclusive range of pages. |
[in] | end | A zero-based index of the end of an inclusive page range. |
[in] | isSilent | TRUE means that the cancel dialogue box will be suppressed while the document is printing. The default is FALSE. |
[in] | isShrinkToFit | TRUE means that the page is shrunk (if necessary) to fit within the area of the printed page. |
[in] | isPrintAsImage | TRUE means that it will print pages as an image. |
[in] | isReverse | TRUE means that it will print from nEnd to nStart. |
[in] | isAnnotations | TRUE means that annotations will be printed.The default is TRUE. |
FS_RESULT(* FSPDF_ACTION_HANDLER::Release) (FS_LPVOID clientData) |
Optional callback function to release data.
This callback function gives the implementation a chance to release any data after the interface is no longer used. An this will be called by Foxit PDF SDK during the final cleanup process.
[in] | clientData | Pointer to user-defined data. |
FS_RESULT(* FSPDF_ACTION_HANDLER::Response) (FS_LPVOID clientData, const FSCRT_BSTR *question, const FSCRT_BSTR *title, const FSCRT_BSTR *defaultValue, const FSCRT_BSTR *label, FS_BOOL isPassword, FSCRT_BSTR *response) |
Optional callback function to display a dialogue box containing a question and an entry field for the user to reply to the question.
[in] | clientData | The user-supplied data. |
[in] | question | Pointer to a FSCRT_BSTR structure to specify the question to be posed to the user. It should be a UTF-8 string. |
[in] | title | Pointer to a FSCRT_BSTR structure to specify the title of the dialogue box. It should be a UTF-8 string. |
[in] | defaultValue | Pointer to a FSCRT_BSTR structure to specify a default value for the answer to the question. It should be a UTF-8 string. If the answer is not specified, no default value is presented. |
[in] | label | Pointer to a FSCRT_BSTR structure to specify a short string to appear in front of the edit text field. It should be a UTF-8 string. |
[in] | isPassword | A boolean value that indicates whether user's response should be masked to show: TRUE means that the user's response should show as asterisks (*) or bullets (?) to mask the response, which might be sensitive information. Default: FALSE. |
[out] | response | Pointer to a FSCRT_BSTR structure that receives the user's response. It can be NULL. And it should be a UTF-8 string if it is not NULL. |
FS_RESULT(* FSPDF_ACTION_HANDLER::SetChangeMark) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_BOOL changeMark) |
Optional callback function to set the change mark which indicates whether the content of document is changed or not.
[in] | clientData | Pointer to the interface structure itself. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | changeMark | A boolean value that indicates whether the content of document is changed or not. |
FS_RESULT(* FSPDF_ACTION_HANDLER::SetCurrentPageIndex) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_INT32 pageIndex) |
Optional callback function to set the current page index.
[in] | clientData | Pointer to the interface structure itself. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | pageIndex | Index of page index which is to be set to current PDF page, starting from 0. |
FS_RESULT(* FSPDF_ACTION_HANDLER::SubmitForm) (FS_LPVOID clientData, FSCRT_DOCUMENT document, FS_LPVOID formData, FS_DWORD length, const FSCRT_BSTR *URL) |
Optional callback function to submit the form data to a specified URL.
[in] | clientData | The user-supplied data. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | formData | Pointer to a data buffer which is to be submit. |
[in] | length | The size(in bytes) of the buffer parameterformData. |
[in] | URL | Pointer to a FSCRT_BSTR structure to specify a URL, to which the form data will be submit. It should be a UTF-8 string. |