blob: 8016d2ebc4eea76fccb58028c9a7f6e4877db65f [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" {
14#endif
15
16//flags for type of unsupport object.
Tom Sepez9857e202015-05-13 17:09:26 -070017#define FPDF_UNSP_DOC_XFAFORM 1
18#define FPDF_UNSP_DOC_PORTABLECOLLECTION 2
19#define FPDF_UNSP_DOC_ATTACHMENT 3
20#define FPDF_UNSP_DOC_SECURITY 4
21#define FPDF_UNSP_DOC_SHAREDREVIEW 5
22#define FPDF_UNSP_DOC_SHAREDFORM_ACROBAT 6
23#define FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM 7
24#define FPDF_UNSP_DOC_SHAREDFORM_EMAIL 8
25#define FPDF_UNSP_ANNOT_3DANNOT 11
26#define FPDF_UNSP_ANNOT_MOVIE 12
27#define FPDF_UNSP_ANNOT_SOUND 13
28#define FPDF_UNSP_ANNOT_SCREEN_MEDIA 14
29#define FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA 15
30#define FPDF_UNSP_ANNOT_ATTACHMENT 16
31#define FPDF_UNSP_ANNOT_SIG 17
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070032
Tom Sepez9857e202015-05-13 17:09:26 -070033typedef struct _UNSUPPORT_INFO
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070034{
Tom Sepez9857e202015-05-13 17:09:26 -070035 /**
36 * Version number of the interface. Currently must be 1.
37 **/
38 int version;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070039
Tom Sepez9857e202015-05-13 17:09:26 -070040 /**
41 * Method: FSDK_UnSupport_Handler
42 * UnSupport Object process handling function.
43 * Interface Version:
44 * 1
45 * Implementation Required:
46 * Yes
47 * Parameters:
48 * pThis - Pointer to the interface structure itself.
49 * nType - The type of unsupportObject
50 * Return value:
51 * None.
52 * */
53
54 void(*FSDK_UnSupport_Handler)(struct _UNSUPPORT_INFO* pThis, int nType);
Tom Sepezcf22eb82015-05-12 17:28:08 -070055} UNSUPPORT_INFO;
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070056
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070057/**
58 * Function: FSDK_SetUnSpObjProcessHandler
Tom Sepez9857e202015-05-13 17:09:26 -070059 * Setup A UnSupport Object process handler for foxit sdk.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070060 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -070061 * unsp_info - Pointer to a UNSUPPORT_INFO structure.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070062 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -070063 * TRUE means successful. FALSE means fails.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070064 **/
65
66DLLEXPORT FPDF_BOOL STDCALL FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info);
67
Tom Sepez9857e202015-05-13 17:09:26 -070068//flags for page mode.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070069
70//Unknown value
Tom Sepez9857e202015-05-13 17:09:26 -070071#define PAGEMODE_UNKNOWN -1
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070072
73//Neither document outline nor thumbnail images visible
Tom Sepez9857e202015-05-13 17:09:26 -070074#define PAGEMODE_USENONE 0
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070075
76//Document outline visible
Tom Sepez9857e202015-05-13 17:09:26 -070077#define PAGEMODE_USEOUTLINES 1
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070078
79//Thumbnial images visible
Tom Sepez9857e202015-05-13 17:09:26 -070080#define PAGEMODE_USETHUMBS 2
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070081
82//Full-screen mode, with no menu bar, window controls, or any other window visible
Tom Sepez9857e202015-05-13 17:09:26 -070083#define PAGEMODE_FULLSCREEN 3
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070084
85//Optional content group panel visible
Tom Sepez9857e202015-05-13 17:09:26 -070086#define PAGEMODE_USEOC 4
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070087
88//Attachments panel visible
Tom Sepez9857e202015-05-13 17:09:26 -070089#define PAGEMODE_USEATTACHMENTS 5
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070090
91
92/**
93 * Function: FPDFDoc_GetPageMode
Tom Sepez9857e202015-05-13 17:09:26 -070094 * Get the document's PageMode(How the document should be displayed when opened)
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070095 * Parameters:
Tom Sepez9857e202015-05-13 17:09:26 -070096 * doc - Handle to document. Returned by FPDF_LoadDocument function.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070097 * Return Value:
Tom Sepez9857e202015-05-13 17:09:26 -070098 * The flags for page mode.
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070099 **/
100DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document);
101
102#ifdef __cplusplus
Tom Sepez9857e202015-05-13 17:09:26 -0700103}
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -0700104#endif
Tom Sepez9857e202015-05-13 17:09:26 -0700105
106#endif // PUBLIC_FPDF_EXT_H_