blob: e488c5283bb4b293cf5763ddd639e6147e84d9ec [file] [log] [blame]
Svet Ganove6986e12015-06-04 14:52:15 -07001// 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. Moltmann4d3acf42017-03-20 11:05:52 -070010// NOLINTNEXTLINE(build/include)
Svet Ganove6986e12015-06-04 14:52:15 -070011#include "fpdfview.h"
12
13#ifdef __cplusplus
14extern "C" {
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070015#endif // __cplusplus
Svet Ganove6986e12015-06-04 14:52:15 -070016
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070017// Unsupported XFA form.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080018#define FPDF_UNSP_DOC_XFAFORM 1
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070019// Unsupported portable collection.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080020#define FPDF_UNSP_DOC_PORTABLECOLLECTION 2
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070021// Unsupported attachment.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080022#define FPDF_UNSP_DOC_ATTACHMENT 3
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070023// Unsupported security.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080024#define FPDF_UNSP_DOC_SECURITY 4
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070025// Unsupported shared review.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080026#define FPDF_UNSP_DOC_SHAREDREVIEW 5
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070027// Unsupported shared form, acrobat.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080028#define FPDF_UNSP_DOC_SHAREDFORM_ACROBAT 6
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070029// Unsupported shared form, filesystem.
Svet Ganove6986e12015-06-04 14:52:15 -070030#define FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM 7
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070031// Unsupported shared form, email.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080032#define FPDF_UNSP_DOC_SHAREDFORM_EMAIL 8
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070033// Unsupported 3D annotation.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080034#define FPDF_UNSP_ANNOT_3DANNOT 11
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070035// Unsupported movie annotation.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080036#define FPDF_UNSP_ANNOT_MOVIE 12
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070037// Unsupported sound annotation.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080038#define FPDF_UNSP_ANNOT_SOUND 13
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070039// Unsupported screen media annotation.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080040#define FPDF_UNSP_ANNOT_SCREEN_MEDIA 14
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070041// Unsupported screen rich media annotation.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080042#define FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA 15
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070043// Unsupported attachment annotation.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080044#define FPDF_UNSP_ANNOT_ATTACHMENT 16
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070045// Unsupported signature annotation.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080046#define FPDF_UNSP_ANNOT_SIG 17
Svet Ganove6986e12015-06-04 14:52:15 -070047
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070048// Interface for unsupported feature notifications.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080049typedef struct _UNSUPPORT_INFO {
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070050 // Version number of the interface. Must be 1.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080051 int version;
Svet Ganove6986e12015-06-04 14:52:15 -070052
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070053 // 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. Moltmannac3d58c2016-03-04 15:19:21 -080059 void (*FSDK_UnSupport_Handler)(struct _UNSUPPORT_INFO* pThis, int nType);
Svet Ganove6986e12015-06-04 14:52:15 -070060} UNSUPPORT_INFO;
61
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070062// Setup an unsupported object handler.
63//
64// unsp_info - Pointer to an UNSUPPORT_INFO structure.
65//
66// Returns TRUE on success.
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070067FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080068FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info);
Svet Ganove6986e12015-06-04 14:52:15 -070069
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070070// Unknown page mode.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080071#define PAGEMODE_UNKNOWN -1
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070072// Document outline, and thumbnails hidden.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080073#define PAGEMODE_USENONE 0
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070074// Document outline visible.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080075#define PAGEMODE_USEOUTLINES 1
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070076// Thumbnail images visible.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080077#define PAGEMODE_USETHUMBS 2
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070078// Full-screen mode, no menu bar, window controls, or other decorations visible.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080079#define PAGEMODE_FULLSCREEN 3
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070080// Optional content group panel visible.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080081#define PAGEMODE_USEOC 4
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070082// Attachments panel visible.
Svet Ganove6986e12015-06-04 14:52:15 -070083#define PAGEMODE_USEATTACHMENTS 5
84
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070085// 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. Moltmannd904c1e2018-03-19 09:26:45 -070092FPDF_EXPORT int FPDF_CALLCONV FPDFDoc_GetPageMode(FPDF_DOCUMENT document);
Svet Ganove6986e12015-06-04 14:52:15 -070093
94#ifdef __cplusplus
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070095} // extern "C"
96#endif // __cplusplus
Svet Ganove6986e12015-06-04 14:52:15 -070097
98#endif // PUBLIC_FPDF_EXT_H_