John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1 | // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 4 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 7 | #ifndef PUBLIC_FPDF_EXT_H_ |
| 8 | #define PUBLIC_FPDF_EXT_H_ |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 9 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 10 | #include "fpdfview.h" |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 11 | |
| 12 | #ifdef __cplusplus |
| 13 | extern "C" { |
| 14 | #endif |
| 15 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 16 | // flags for type of unsupport object. |
| 17 | #define FPDF_UNSP_DOC_XFAFORM 1 |
| 18 | #define FPDF_UNSP_DOC_PORTABLECOLLECTION 2 |
| 19 | #define FPDF_UNSP_DOC_ATTACHMENT 3 |
| 20 | #define FPDF_UNSP_DOC_SECURITY 4 |
| 21 | #define FPDF_UNSP_DOC_SHAREDREVIEW 5 |
| 22 | #define FPDF_UNSP_DOC_SHAREDFORM_ACROBAT 6 |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 23 | #define FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM 7 |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 24 | #define FPDF_UNSP_DOC_SHAREDFORM_EMAIL 8 |
| 25 | #define FPDF_UNSP_ANNOT_3DANNOT 11 |
| 26 | #define FPDF_UNSP_ANNOT_MOVIE 12 |
| 27 | #define FPDF_UNSP_ANNOT_SOUND 13 |
| 28 | #define FPDF_UNSP_ANNOT_SCREEN_MEDIA 14 |
| 29 | #define FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA 15 |
| 30 | #define FPDF_UNSP_ANNOT_ATTACHMENT 16 |
| 31 | #define FPDF_UNSP_ANNOT_SIG 17 |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 32 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 33 | typedef struct _UNSUPPORT_INFO { |
| 34 | /** |
| 35 | * Version number of the interface. Currently must be 1. |
| 36 | **/ |
| 37 | int version; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 38 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 39 | /** |
| 40 | * Method: FSDK_UnSupport_Handler |
| 41 | * UnSupport Object process handling function. |
| 42 | * Interface Version: |
| 43 | * 1 |
| 44 | * Implementation Required: |
| 45 | * Yes |
| 46 | * Parameters: |
| 47 | * pThis - Pointer to the interface structure itself. |
| 48 | * nType - The type of unsupportObject |
| 49 | * Return value: |
| 50 | * None. |
| 51 | * */ |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 52 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 53 | void (*FSDK_UnSupport_Handler)(struct _UNSUPPORT_INFO* pThis, int nType); |
Tom Sepez | cf22eb8 | 2015-05-12 17:28:08 -0700 | [diff] [blame] | 54 | } UNSUPPORT_INFO; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 55 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 56 | /** |
| 57 | * Function: FSDK_SetUnSpObjProcessHandler |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 58 | * Setup A UnSupport Object process handler for foxit sdk. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 59 | * Parameters: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 60 | * unsp_info - Pointer to a UNSUPPORT_INFO structure. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 61 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 62 | * TRUE means successful. FALSE means fails. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 63 | **/ |
| 64 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 65 | DLLEXPORT FPDF_BOOL STDCALL |
| 66 | FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 67 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 68 | // flags for page mode. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 69 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 70 | // Unknown value |
| 71 | #define PAGEMODE_UNKNOWN -1 |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 72 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 73 | // Neither document outline nor thumbnail images visible |
| 74 | #define PAGEMODE_USENONE 0 |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 75 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 76 | // Document outline visible |
| 77 | #define PAGEMODE_USEOUTLINES 1 |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 78 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 79 | // Thumbnial images visible |
| 80 | #define PAGEMODE_USETHUMBS 2 |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 81 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 82 | // Full-screen mode, with no menu bar, window controls, or any other window |
| 83 | // visible |
| 84 | #define PAGEMODE_FULLSCREEN 3 |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 85 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 86 | // Optional content group panel visible |
| 87 | #define PAGEMODE_USEOC 4 |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 88 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 89 | // Attachments panel visible |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 90 | #define PAGEMODE_USEATTACHMENTS 5 |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 91 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 92 | /** |
| 93 | * Function: FPDFDoc_GetPageMode |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 94 | * Get the document's PageMode(How the document should be displayed |
| 95 | *when opened) |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 96 | * Parameters: |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame^] | 97 | * doc - Handle to document. Returned by FPDF_LoadDocument |
| 98 | *function. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 99 | * Return Value: |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 100 | * The flags for page mode. |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 101 | **/ |
| 102 | DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document); |
| 103 | |
| 104 | #ifdef __cplusplus |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 105 | } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 106 | #endif |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 107 | |
| 108 | #endif // PUBLIC_FPDF_EXT_H_ |