chromium/third_party/pdfium/public/fpdf_ext.h

// Copyright 2014 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#ifndef PUBLIC_FPDF_EXT_H_
#define PUBLIC_FPDF_EXT_H_

#include <time.h>

// NOLINTNEXTLINE(build/include)
#include "fpdfview.h"

#ifdef __cplusplus
extern "C" {
#endif  // __cplusplus

// Unsupported XFA form.
#define FPDF_UNSP_DOC_XFAFORM
// Unsupported portable collection.
#define FPDF_UNSP_DOC_PORTABLECOLLECTION
// Unsupported attachment.
#define FPDF_UNSP_DOC_ATTACHMENT
// Unsupported security.
#define FPDF_UNSP_DOC_SECURITY
// Unsupported shared review.
#define FPDF_UNSP_DOC_SHAREDREVIEW
// Unsupported shared form, acrobat.
#define FPDF_UNSP_DOC_SHAREDFORM_ACROBAT
// Unsupported shared form, filesystem.
#define FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM
// Unsupported shared form, email.
#define FPDF_UNSP_DOC_SHAREDFORM_EMAIL
// Unsupported 3D annotation.
#define FPDF_UNSP_ANNOT_3DANNOT
// Unsupported movie annotation.
#define FPDF_UNSP_ANNOT_MOVIE
// Unsupported sound annotation.
#define FPDF_UNSP_ANNOT_SOUND
// Unsupported screen media annotation.
#define FPDF_UNSP_ANNOT_SCREEN_MEDIA
// Unsupported screen rich media annotation.
#define FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA
// Unsupported attachment annotation.
#define FPDF_UNSP_ANNOT_ATTACHMENT
// Unsupported signature annotation.
#define FPDF_UNSP_ANNOT_SIG

// Interface for unsupported feature notifications.
UNSUPPORT_INFO;

// Setup an unsupported object handler.
//
//   unsp_info - Pointer to an UNSUPPORT_INFO structure.
//
// Returns TRUE on success.
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info);

// Set replacement function for calls to time().
//
// This API is intended to be used only for testing, thus may cause PDFium to
// behave poorly in production environments.
//
//   func - Function pointer to alternate implementation of time(), or
//          NULL to restore to actual time() call itself.
FPDF_EXPORT void FPDF_CALLCONV FSDK_SetTimeFunction(time_t (*func)());

// Set replacement function for calls to localtime().
//
// This API is intended to be used only for testing, thus may cause PDFium to
// behave poorly in production environments.
//
//   func - Function pointer to alternate implementation of localtime(), or
//          NULL to restore to actual localtime() call itself.
FPDF_EXPORT void FPDF_CALLCONV
FSDK_SetLocaltimeFunction(struct tm* (*func)(const time_t*));

// Unknown page mode.
#define PAGEMODE_UNKNOWN
// Document outline, and thumbnails hidden.
#define PAGEMODE_USENONE
// Document outline visible.
#define PAGEMODE_USEOUTLINES
// Thumbnail images visible.
#define PAGEMODE_USETHUMBS
// Full-screen mode, no menu bar, window controls, or other decorations visible.
#define PAGEMODE_FULLSCREEN
// Optional content group panel visible.
#define PAGEMODE_USEOC
// Attachments panel visible.
#define PAGEMODE_USEATTACHMENTS

// Get the document's PageMode.
//
//   doc - Handle to document.
//
// Returns one of the |PAGEMODE_*| flags defined above.
//
// The page mode defines how the document should be initially displayed.
FPDF_EXPORT int FPDF_CALLCONV FPDFDoc_GetPageMode(FPDF_DOCUMENT document);

#ifdef __cplusplus
}  // extern "C"
#endif  // __cplusplus

#endif  // PUBLIC_FPDF_EXT_H_