blob: 3465878990180d12ac488a2ddf3222957da18c4f [file] [log] [blame]
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -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.
Tom Sepez9857e202015-05-13 17:09:26 -07004
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07005// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
Tom Sepez9857e202015-05-13 17:09:26 -07007#ifndef PUBLIC_FPDF_EXT_H_
8#define PUBLIC_FPDF_EXT_H_
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07009
Dan Sinclair85c8e7f2016-11-21 13:50:32 -050010// NOLINTNEXTLINE(build/include)
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070011#include "fpdfview.h"
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070012
13#ifdef __cplusplus
14extern "C" {
dsinclair860193b2016-04-25 19:44:20 -070015#endif // __cplusplus
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070016
dsinclair860193b2016-04-25 19:44:20 -070017// Unsupported XFA form.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070018#define FPDF_UNSP_DOC_XFAFORM 1
dsinclair860193b2016-04-25 19:44:20 -070019// Unsupported portable collection.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070020#define FPDF_UNSP_DOC_PORTABLECOLLECTION 2
dsinclair860193b2016-04-25 19:44:20 -070021// Unsupported attachment.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070022#define FPDF_UNSP_DOC_ATTACHMENT 3
dsinclair860193b2016-04-25 19:44:20 -070023// Unsupported security.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070024#define FPDF_UNSP_DOC_SECURITY 4
dsinclair860193b2016-04-25 19:44:20 -070025// Unsupported shared review.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070026#define FPDF_UNSP_DOC_SHAREDREVIEW 5
dsinclair860193b2016-04-25 19:44:20 -070027// Unsupported shared form, acrobat.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070028#define FPDF_UNSP_DOC_SHAREDFORM_ACROBAT 6
dsinclair860193b2016-04-25 19:44:20 -070029// Unsupported shared form, filesystem.
Tom Sepez9857e202015-05-13 17:09:26 -070030#define FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM 7
dsinclair860193b2016-04-25 19:44:20 -070031// Unsupported shared form, email.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070032#define FPDF_UNSP_DOC_SHAREDFORM_EMAIL 8
dsinclair860193b2016-04-25 19:44:20 -070033// Unsupported 3D annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070034#define FPDF_UNSP_ANNOT_3DANNOT 11
dsinclair860193b2016-04-25 19:44:20 -070035// Unsupported movie annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070036#define FPDF_UNSP_ANNOT_MOVIE 12
dsinclair860193b2016-04-25 19:44:20 -070037// Unsupported sound annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070038#define FPDF_UNSP_ANNOT_SOUND 13
dsinclair860193b2016-04-25 19:44:20 -070039// Unsupported screen media annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070040#define FPDF_UNSP_ANNOT_SCREEN_MEDIA 14
dsinclair860193b2016-04-25 19:44:20 -070041// Unsupported screen rich media annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070042#define FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA 15
dsinclair860193b2016-04-25 19:44:20 -070043// Unsupported attachment annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070044#define FPDF_UNSP_ANNOT_ATTACHMENT 16
dsinclair860193b2016-04-25 19:44:20 -070045// Unsupported signature annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070046#define FPDF_UNSP_ANNOT_SIG 17
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070047
dsinclair860193b2016-04-25 19:44:20 -070048// Interface for unsupported feature notifications.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070049typedef struct _UNSUPPORT_INFO {
dsinclair860193b2016-04-25 19:44:20 -070050 // Version number of the interface. Must be 1.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070051 int version;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070052
dsinclair860193b2016-04-25 19:44:20 -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.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070059 void (*FSDK_UnSupport_Handler)(struct _UNSUPPORT_INFO* pThis, int nType);
Tom Sepezcf22eb82015-05-12 17:28:08 -070060} UNSUPPORT_INFO;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070061
dsinclair860193b2016-04-25 19:44:20 -070062// Setup an unsupported object handler.
63//
64// unsp_info - Pointer to an UNSUPPORT_INFO structure.
65//
66// Returns TRUE on success.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070067DLLEXPORT FPDF_BOOL STDCALL
68FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070069
dsinclair860193b2016-04-25 19:44:20 -070070// Unknown page mode.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070071#define PAGEMODE_UNKNOWN -1
dsinclair860193b2016-04-25 19:44:20 -070072// Document outline, and thumbnails hidden.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070073#define PAGEMODE_USENONE 0
dsinclair860193b2016-04-25 19:44:20 -070074// Document outline visible.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070075#define PAGEMODE_USEOUTLINES 1
dsinclair860193b2016-04-25 19:44:20 -070076// Thumbnail images visible.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070077#define PAGEMODE_USETHUMBS 2
dsinclair860193b2016-04-25 19:44:20 -070078// Full-screen mode, no menu bar, window controls, or other decorations visible.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070079#define PAGEMODE_FULLSCREEN 3
dsinclair860193b2016-04-25 19:44:20 -070080// Optional content group panel visible.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070081#define PAGEMODE_USEOC 4
dsinclair860193b2016-04-25 19:44:20 -070082// Attachments panel visible.
Tom Sepez9857e202015-05-13 17:09:26 -070083#define PAGEMODE_USEATTACHMENTS 5
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070084
dsinclair860193b2016-04-25 19:44:20 -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.
thestiga55880d2016-05-23 09:11:54 -070092DLLEXPORT int STDCALL FPDFDoc_GetPageMode(FPDF_DOCUMENT document);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070093
94#ifdef __cplusplus
dsinclair860193b2016-04-25 19:44:20 -070095} // extern "C"
96#endif // __cplusplus
Tom Sepez9857e202015-05-13 17:09:26 -070097
98#endif // PUBLIC_FPDF_EXT_H_