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 | |
Dan Sinclair | 85c8e7f | 2016-11-21 13:50:32 -0500 | [diff] [blame] | 10 | // NOLINTNEXTLINE(build/include) |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 11 | #include "fpdfview.h" |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 15 | #endif // __cplusplus |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 16 | |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 17 | // Unsupported XFA form. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 18 | #define FPDF_UNSP_DOC_XFAFORM 1 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 19 | // Unsupported portable collection. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 20 | #define FPDF_UNSP_DOC_PORTABLECOLLECTION 2 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 21 | // Unsupported attachment. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 22 | #define FPDF_UNSP_DOC_ATTACHMENT 3 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 23 | // Unsupported security. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 24 | #define FPDF_UNSP_DOC_SECURITY 4 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 25 | // Unsupported shared review. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 26 | #define FPDF_UNSP_DOC_SHAREDREVIEW 5 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 27 | // Unsupported shared form, acrobat. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 28 | #define FPDF_UNSP_DOC_SHAREDFORM_ACROBAT 6 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 29 | // Unsupported shared form, filesystem. |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 30 | #define FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM 7 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 31 | // Unsupported shared form, email. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 32 | #define FPDF_UNSP_DOC_SHAREDFORM_EMAIL 8 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 33 | // Unsupported 3D annotation. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 34 | #define FPDF_UNSP_ANNOT_3DANNOT 11 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 35 | // Unsupported movie annotation. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 36 | #define FPDF_UNSP_ANNOT_MOVIE 12 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 37 | // Unsupported sound annotation. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 38 | #define FPDF_UNSP_ANNOT_SOUND 13 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 39 | // Unsupported screen media annotation. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 40 | #define FPDF_UNSP_ANNOT_SCREEN_MEDIA 14 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 41 | // Unsupported screen rich media annotation. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 42 | #define FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA 15 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 43 | // Unsupported attachment annotation. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 44 | #define FPDF_UNSP_ANNOT_ATTACHMENT 16 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 45 | // Unsupported signature annotation. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 46 | #define FPDF_UNSP_ANNOT_SIG 17 |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 47 | |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 48 | // Interface for unsupported feature notifications. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 49 | typedef struct _UNSUPPORT_INFO { |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 50 | // Version number of the interface. Must be 1. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 51 | int version; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 52 | |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 53 | // Unsupported object notification function. |
| 54 | // Interface Version: 1 |
| 55 | // Implementation Required: Yes |
| 56 | // |
| 57 | // pThis - pointer to the interface structure. |
| 58 | // nType - the type of unsupported object. One of the |FPDF_UNSP_*| entries. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 59 | void (*FSDK_UnSupport_Handler)(struct _UNSUPPORT_INFO* pThis, int nType); |
Tom Sepez | cf22eb8 | 2015-05-12 17:28:08 -0700 | [diff] [blame] | 60 | } UNSUPPORT_INFO; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 61 | |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 62 | // Setup an unsupported object handler. |
| 63 | // |
| 64 | // unsp_info - Pointer to an UNSUPPORT_INFO structure. |
| 65 | // |
| 66 | // Returns TRUE on success. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 67 | DLLEXPORT FPDF_BOOL STDCALL |
| 68 | FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 69 | |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 70 | // Unknown page mode. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 71 | #define PAGEMODE_UNKNOWN -1 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 72 | // Document outline, and thumbnails hidden. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 73 | #define PAGEMODE_USENONE 0 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 74 | // Document outline visible. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 75 | #define PAGEMODE_USEOUTLINES 1 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 76 | // Thumbnail images visible. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 77 | #define PAGEMODE_USETHUMBS 2 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 78 | // Full-screen mode, no menu bar, window controls, or other decorations visible. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 79 | #define PAGEMODE_FULLSCREEN 3 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 80 | // Optional content group panel visible. |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 81 | #define PAGEMODE_USEOC 4 |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 82 | // Attachments panel visible. |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 83 | #define PAGEMODE_USEATTACHMENTS 5 |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 84 | |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 85 | // Get the document's PageMode. |
| 86 | // |
| 87 | // doc - Handle to document. |
| 88 | // |
| 89 | // Returns one of the |PAGEMODE_*| flags defined above. |
| 90 | // |
| 91 | // The page mode defines how the document should be initially displayed. |
thestig | a55880d | 2016-05-23 09:11:54 -0700 | [diff] [blame] | 92 | DLLEXPORT int STDCALL FPDFDoc_GetPageMode(FPDF_DOCUMENT document); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 93 | |
| 94 | #ifdef __cplusplus |
dsinclair | 860193b | 2016-04-25 19:44:20 -0700 | [diff] [blame] | 95 | } // extern "C" |
| 96 | #endif // __cplusplus |
Tom Sepez | 9857e20 | 2015-05-13 17:09:26 -0700 | [diff] [blame] | 97 | |
| 98 | #endif // PUBLIC_FPDF_EXT_H_ |