Initial commit.
[pdfium.git] / fpdfsdk / include / fpdf_ext.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4  \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _FPDF_EXT_H_\r
8 #define _FPDF_EXT_H_\r
9 \r
10 #ifndef _FPDFVIEW_H_\r
11 #include "fpdfview.h"\r
12 #endif\r
13 \r
14 #ifdef __cplusplus\r
15 extern "C" {\r
16 #endif\r
17 \r
18 //flags for type of unsupport object.\r
19 #define FPDF_UNSP_DOC_XFAFORM                           1\r
20 #define FPDF_UNSP_DOC_PORTABLECOLLECTION        2\r
21 #define FPDF_UNSP_DOC_ATTACHMENT                        3\r
22 #define FPDF_UNSP_DOC_SECURITY                          4\r
23 #define FPDF_UNSP_DOC_SHAREDREVIEW                      5\r
24 #define FPDF_UNSP_DOC_SHAREDFORM_ACROBAT        6\r
25 #define FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM     7\r
26 #define FPDF_UNSP_DOC_SHAREDFORM_EMAIL          8\r
27 #define FPDF_UNSP_ANNOT_3DANNOT                         11\r
28 #define FPDF_UNSP_ANNOT_MOVIE                           12\r
29 #define FPDF_UNSP_ANNOT_SOUND                           13\r
30 #define FPDF_UNSP_ANNOT_SCREEN_MEDIA            14\r
31 #define FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA        15\r
32 #define FPDF_UNSP_ANNOT_ATTACHMENT                      16\r
33 #define FPDF_UNSP_ANNOT_SIG                                     17\r
34 \r
35 typedef struct _UNSUPPORT_INFO\r
36 {\r
37         /**\r
38         * Version number of the interface. Currently must be 1.\r
39         **/\r
40         int version;\r
41         \r
42         /** \r
43         * Method: FSDK_UnSupport_Handler\r
44         *                        UnSupport Object process handling function.\r
45         * Interface Version:\r
46         *                       1\r
47         * Implementation Required:\r
48         *                       Yes\r
49         * Parameters:\r
50         *               pThis           -       Pointer to the interface structure itself.\r
51         *               nType           -       The type of unsupportObject\r
52         *       Return value:\r
53         *               None.\r
54         * */\r
55 \r
56         void(*FSDK_UnSupport_Handler)(_UNSUPPORT_INFO* pThis,int nType);\r
57 }UNSUPPORT_INFO;\r
58 \r
59 \r
60 /**\r
61  * Function: FSDK_SetUnSpObjProcessHandler\r
62  *                       Setup A UnSupport Object process handler for foxit sdk. \r
63  * Parameters:\r
64  *                      unsp_info               -       Pointer to a UNSUPPORT_INFO structure.\r
65  * Return Value:\r
66  *                      TRUE means successful. FALSE means fails. \r
67  **/\r
68 \r
69 DLLEXPORT FPDF_BOOL STDCALL FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info);\r
70 \r
71 //flags for page mode. \r
72 \r
73 //Unknown value\r
74 #define PAGEMODE_UNKONOWN               -1\r
75 \r
76 //Neither document outline nor thumbnail images visible\r
77 #define PAGEMODE_USENONE                0\r
78 \r
79 //Document outline visible\r
80 #define PAGEMODE_USEOUTLINES    1\r
81 \r
82 //Thumbnial images visible\r
83 #define PAGEMODE_USETHUMBS              2\r
84 \r
85 //Full-screen mode, with no menu bar, window controls, or any other window visible\r
86 #define PAGEMODE_FULLSCREEN             3\r
87 \r
88 //Optional content group panel visible\r
89 #define PAGEMODE_USEOC                  4\r
90 \r
91 //Attachments panel visible\r
92 #define PAGEMODE_USEATTACHMENTS 5\r
93 \r
94 \r
95 /**\r
96  * Function: FPDFDoc_GetPageMode\r
97  *                       Get the document's PageMode(How the document should be displayed when opened) \r
98  * Parameters:\r
99  *                      doc             -       Handle to document. Returned by FPDF_LoadDocument function.\r
100  * Return Value:\r
101  *                      The flags for page mode.\r
102  **/\r
103 DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document);\r
104 \r
105 #ifdef __cplusplus\r
106 };\r
107 #endif\r
108 #endif\r