Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -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. |
| 4 | |
| 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
| 7 | #ifndef PUBLIC_FPDF_EXT_H_ |
| 8 | #define PUBLIC_FPDF_EXT_H_ |
| 9 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 10 | // NOLINTNEXTLINE(build/include) |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 11 | #include "fpdfview.h" |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 15 | #endif // __cplusplus |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 16 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 17 | // Unsupported XFA form. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 18 | #define FPDF_UNSP_DOC_XFAFORM 1 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 19 | // Unsupported portable collection. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 20 | #define FPDF_UNSP_DOC_PORTABLECOLLECTION 2 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 21 | // Unsupported attachment. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 22 | #define FPDF_UNSP_DOC_ATTACHMENT 3 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 23 | // Unsupported security. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 24 | #define FPDF_UNSP_DOC_SECURITY 4 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 25 | // Unsupported shared review. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 26 | #define FPDF_UNSP_DOC_SHAREDREVIEW 5 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 27 | // Unsupported shared form, acrobat. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 28 | #define FPDF_UNSP_DOC_SHAREDFORM_ACROBAT 6 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 29 | // Unsupported shared form, filesystem. |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 30 | #define FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM 7 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 31 | // Unsupported shared form, email. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 32 | #define FPDF_UNSP_DOC_SHAREDFORM_EMAIL 8 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 33 | // Unsupported 3D annotation. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 34 | #define FPDF_UNSP_ANNOT_3DANNOT 11 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 35 | // Unsupported movie annotation. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 36 | #define FPDF_UNSP_ANNOT_MOVIE 12 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 37 | // Unsupported sound annotation. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 38 | #define FPDF_UNSP_ANNOT_SOUND 13 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 39 | // Unsupported screen media annotation. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 40 | #define FPDF_UNSP_ANNOT_SCREEN_MEDIA 14 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 41 | // Unsupported screen rich media annotation. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 42 | #define FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA 15 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 43 | // Unsupported attachment annotation. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 44 | #define FPDF_UNSP_ANNOT_ATTACHMENT 16 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 45 | // Unsupported signature annotation. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 46 | #define FPDF_UNSP_ANNOT_SIG 17 |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 47 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 48 | // Interface for unsupported feature notifications. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 49 | typedef struct _UNSUPPORT_INFO { |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 50 | // Version number of the interface. Must be 1. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 51 | int version; |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 52 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -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. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 59 | void (*FSDK_UnSupport_Handler)(struct _UNSUPPORT_INFO* pThis, int nType); |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 60 | } UNSUPPORT_INFO; |
| 61 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -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. |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 67 | FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 68 | FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info); |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 69 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 70 | // Unknown page mode. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 71 | #define PAGEMODE_UNKNOWN -1 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 72 | // Document outline, and thumbnails hidden. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 73 | #define PAGEMODE_USENONE 0 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 74 | // Document outline visible. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 75 | #define PAGEMODE_USEOUTLINES 1 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 76 | // Thumbnail images visible. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 77 | #define PAGEMODE_USETHUMBS 2 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 78 | // Full-screen mode, no menu bar, window controls, or other decorations visible. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 79 | #define PAGEMODE_FULLSCREEN 3 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 80 | // Optional content group panel visible. |
Philip P. Moltmann | ac3d58c | 2016-03-04 15:19:21 -0800 | [diff] [blame] | 81 | #define PAGEMODE_USEOC 4 |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 82 | // Attachments panel visible. |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 83 | #define PAGEMODE_USEATTACHMENTS 5 |
| 84 | |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -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. |
Philip P. Moltmann | d904c1e | 2018-03-19 09:26:45 -0700 | [diff] [blame] | 92 | FPDF_EXPORT int FPDF_CALLCONV FPDFDoc_GetPageMode(FPDF_DOCUMENT document); |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 93 | |
| 94 | #ifdef __cplusplus |
Philip P. Moltmann | 4d3acf4 | 2017-03-20 11:05:52 -0700 | [diff] [blame] | 95 | } // extern "C" |
| 96 | #endif // __cplusplus |
Svet Ganov | e6986e1 | 2015-06-04 14:52:15 -0700 | [diff] [blame] | 97 | |
| 98 | #endif // PUBLIC_FPDF_EXT_H_ |