blob: 2f7d7ddf645ac11bd2f156379604b567a20e2190 [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
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070010#include "fpdfview.h"
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070011
12#ifdef __cplusplus
13extern "C" {
dsinclair860193b2016-04-25 19:44:20 -070014#endif // __cplusplus
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070015
dsinclair860193b2016-04-25 19:44:20 -070016// Unsupported XFA form.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070017#define FPDF_UNSP_DOC_XFAFORM 1
dsinclair860193b2016-04-25 19:44:20 -070018// Unsupported portable collection.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070019#define FPDF_UNSP_DOC_PORTABLECOLLECTION 2
dsinclair860193b2016-04-25 19:44:20 -070020// Unsupported attachment.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070021#define FPDF_UNSP_DOC_ATTACHMENT 3
dsinclair860193b2016-04-25 19:44:20 -070022// Unsupported security.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070023#define FPDF_UNSP_DOC_SECURITY 4
dsinclair860193b2016-04-25 19:44:20 -070024// Unsupported shared review.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070025#define FPDF_UNSP_DOC_SHAREDREVIEW 5
dsinclair860193b2016-04-25 19:44:20 -070026// Unsupported shared form, acrobat.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070027#define FPDF_UNSP_DOC_SHAREDFORM_ACROBAT 6
dsinclair860193b2016-04-25 19:44:20 -070028// Unsupported shared form, filesystem.
Tom Sepez9857e202015-05-13 17:09:26 -070029#define FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM 7
dsinclair860193b2016-04-25 19:44:20 -070030// Unsupported shared form, email.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070031#define FPDF_UNSP_DOC_SHAREDFORM_EMAIL 8
dsinclair860193b2016-04-25 19:44:20 -070032// Unsupported 3D annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070033#define FPDF_UNSP_ANNOT_3DANNOT 11
dsinclair860193b2016-04-25 19:44:20 -070034// Unsupported movie annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070035#define FPDF_UNSP_ANNOT_MOVIE 12
dsinclair860193b2016-04-25 19:44:20 -070036// Unsupported sound annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070037#define FPDF_UNSP_ANNOT_SOUND 13
dsinclair860193b2016-04-25 19:44:20 -070038// Unsupported screen media annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070039#define FPDF_UNSP_ANNOT_SCREEN_MEDIA 14
dsinclair860193b2016-04-25 19:44:20 -070040// Unsupported screen rich media annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070041#define FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA 15
dsinclair860193b2016-04-25 19:44:20 -070042// Unsupported attachment annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070043#define FPDF_UNSP_ANNOT_ATTACHMENT 16
dsinclair860193b2016-04-25 19:44:20 -070044// Unsupported signature annotation.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070045#define FPDF_UNSP_ANNOT_SIG 17
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070046
dsinclair860193b2016-04-25 19:44:20 -070047// Interface for unsupported feature notifications.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070048typedef struct _UNSUPPORT_INFO {
dsinclair860193b2016-04-25 19:44:20 -070049 // Version number of the interface. Must be 1.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070050 int version;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070051
dsinclair860193b2016-04-25 19:44:20 -070052 // Unsupported object notification function.
53 // Interface Version: 1
54 // Implementation Required: Yes
55 //
56 // pThis - pointer to the interface structure.
57 // nType - the type of unsupported object. One of the |FPDF_UNSP_*| entries.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070058 void (*FSDK_UnSupport_Handler)(struct _UNSUPPORT_INFO* pThis, int nType);
Tom Sepezcf22eb82015-05-12 17:28:08 -070059} UNSUPPORT_INFO;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070060
dsinclair860193b2016-04-25 19:44:20 -070061// Setup an unsupported object handler.
62//
63// unsp_info - Pointer to an UNSUPPORT_INFO structure.
64//
65// Returns TRUE on success.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070066DLLEXPORT FPDF_BOOL STDCALL
67FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070068
dsinclair860193b2016-04-25 19:44:20 -070069// Unknown page mode.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070070#define PAGEMODE_UNKNOWN -1
dsinclair860193b2016-04-25 19:44:20 -070071// Document outline, and thumbnails hidden.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070072#define PAGEMODE_USENONE 0
dsinclair860193b2016-04-25 19:44:20 -070073// Document outline visible.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070074#define PAGEMODE_USEOUTLINES 1
dsinclair860193b2016-04-25 19:44:20 -070075// Thumbnail images visible.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070076#define PAGEMODE_USETHUMBS 2
dsinclair860193b2016-04-25 19:44:20 -070077// Full-screen mode, no menu bar, window controls, or other decorations visible.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070078#define PAGEMODE_FULLSCREEN 3
dsinclair860193b2016-04-25 19:44:20 -070079// Optional content group panel visible.
Nico Weber9d8ec5a2015-08-04 13:00:21 -070080#define PAGEMODE_USEOC 4
dsinclair860193b2016-04-25 19:44:20 -070081// Attachments panel visible.
Tom Sepez9857e202015-05-13 17:09:26 -070082#define PAGEMODE_USEATTACHMENTS 5
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070083
dsinclair860193b2016-04-25 19:44:20 -070084// Get the document's PageMode.
85//
86// doc - Handle to document.
87//
88// Returns one of the |PAGEMODE_*| flags defined above.
89//
90// The page mode defines how the document should be initially displayed.
thestiga55880d2016-05-23 09:11:54 -070091DLLEXPORT int STDCALL FPDFDoc_GetPageMode(FPDF_DOCUMENT document);
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070092
93#ifdef __cplusplus
dsinclair860193b2016-04-25 19:44:20 -070094} // extern "C"
95#endif // __cplusplus
Tom Sepez9857e202015-05-13 17:09:26 -070096
97#endif // PUBLIC_FPDF_EXT_H_