Home | History | Annotate | Download | only in public
      1 // 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 
     10 // NOLINTNEXTLINE(build/include)
     11 #include "fpdfview.h"
     12 
     13 #ifdef __cplusplus
     14 extern "C" {
     15 #endif  // __cplusplus
     16 
     17 // Unsupported XFA form.
     18 #define FPDF_UNSP_DOC_XFAFORM 1
     19 // Unsupported portable collection.
     20 #define FPDF_UNSP_DOC_PORTABLECOLLECTION 2
     21 // Unsupported attachment.
     22 #define FPDF_UNSP_DOC_ATTACHMENT 3
     23 // Unsupported security.
     24 #define FPDF_UNSP_DOC_SECURITY 4
     25 // Unsupported shared review.
     26 #define FPDF_UNSP_DOC_SHAREDREVIEW 5
     27 // Unsupported shared form, acrobat.
     28 #define FPDF_UNSP_DOC_SHAREDFORM_ACROBAT 6
     29 // Unsupported shared form, filesystem.
     30 #define FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM 7
     31 // Unsupported shared form, email.
     32 #define FPDF_UNSP_DOC_SHAREDFORM_EMAIL 8
     33 // Unsupported 3D annotation.
     34 #define FPDF_UNSP_ANNOT_3DANNOT 11
     35 // Unsupported movie annotation.
     36 #define FPDF_UNSP_ANNOT_MOVIE 12
     37 // Unsupported sound annotation.
     38 #define FPDF_UNSP_ANNOT_SOUND 13
     39 // Unsupported screen media annotation.
     40 #define FPDF_UNSP_ANNOT_SCREEN_MEDIA 14
     41 // Unsupported screen rich media annotation.
     42 #define FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA 15
     43 // Unsupported attachment annotation.
     44 #define FPDF_UNSP_ANNOT_ATTACHMENT 16
     45 // Unsupported signature annotation.
     46 #define FPDF_UNSP_ANNOT_SIG 17
     47 
     48 // Interface for unsupported feature notifications.
     49 typedef struct _UNSUPPORT_INFO {
     50   // Version number of the interface. Must be 1.
     51   int version;
     52 
     53   // 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.
     59   void (*FSDK_UnSupport_Handler)(struct _UNSUPPORT_INFO* pThis, int nType);
     60 } UNSUPPORT_INFO;
     61 
     62 // Setup an unsupported object handler.
     63 //
     64 //   unsp_info - Pointer to an UNSUPPORT_INFO structure.
     65 //
     66 // Returns TRUE on success.
     67 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
     68 FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info);
     69 
     70 // Unknown page mode.
     71 #define PAGEMODE_UNKNOWN -1
     72 // Document outline, and thumbnails hidden.
     73 #define PAGEMODE_USENONE 0
     74 // Document outline visible.
     75 #define PAGEMODE_USEOUTLINES 1
     76 // Thumbnail images visible.
     77 #define PAGEMODE_USETHUMBS 2
     78 // Full-screen mode, no menu bar, window controls, or other decorations visible.
     79 #define PAGEMODE_FULLSCREEN 3
     80 // Optional content group panel visible.
     81 #define PAGEMODE_USEOC 4
     82 // Attachments panel visible.
     83 #define PAGEMODE_USEATTACHMENTS 5
     84 
     85 // 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.
     92 FPDF_EXPORT int FPDF_CALLCONV FPDFDoc_GetPageMode(FPDF_DOCUMENT document);
     93 
     94 #ifdef __cplusplus
     95 }  // extern "C"
     96 #endif  // __cplusplus
     97 
     98 #endif  // PUBLIC_FPDF_EXT_H_
     99