// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'FPdfView.pas' rev: 30.00 (Windows)

#ifndef FpdfviewHPP
#define FpdfviewHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>

//-- user supplied -----------------------------------------------------------
#pragma link "PDFiumVcl.a"

namespace Fpdfview
{
//-- forward type declarations -----------------------------------------------
struct FPDF_BSTR;
struct FS_MATRIX;
struct FS_RECTF;
struct FS_SIZEF;
struct FS_POINTF;
struct FS_QUADPOINTSF;
struct FPDF_LIBRARY_CONFIG;
struct FPDF_FILEACCESS;
struct FPDF_FILEHANDLER;
struct FPDF_COLORSCHEME;
//-- type declarations -------------------------------------------------------
typedef NativeUInt size_t;

typedef int FPDF_TEXT_RENDERMODE;

typedef void * FPDF_ACTION;

typedef void * FPDF_ANNOTATION;

typedef void * FPDF_ATTACHMENT;

typedef void * FPDF_AVAIL;

typedef void * FPDF_BITMAP;

typedef void * FPDF_BOOKMARK;

typedef void * FPDF_CLIPPATH;

typedef void * FPDF_DEST;

typedef void * FPDF_DOCUMENT;

typedef void * FPDF_FONT;

typedef void * FPDF_FORMHANDLE;

typedef void * FPDF_GLYPHPATH;

typedef void * FPDF_LINK;

typedef void * FPDF_PAGE;

typedef void * FPDF_PAGELINK;

typedef void * FPDF_PAGEOBJECT;

typedef void * FPDF_PAGEOBJECTMARK;

typedef void * FPDF_PAGERANGE;

typedef void * FPDF_SCHHANDLE;

typedef void * FPDF_SIGNATURE;

typedef void * FPDF_SKIA_CANVAS;

typedef void * FPDF_STRUCTELEMENT;

typedef void * FPDF_STRUCTELEMENT_ATTR;

typedef void * FPDF_STRUCTELEMENT_ATTR_VALUE;

typedef void * FPDF_STRUCTTREE;

typedef void * FPDF_TEXTPAGE;

typedef void * FPDF_PATHSEGMENT;

typedef void * FPDF_WIDGET;

typedef void * FPDF_XOBJECT;

typedef int FPDF_BOOL;

typedef int FPDF_RESULT;

typedef unsigned FPDF_DWORD;

typedef float FS_FLOAT;

enum DECLSPEC_DENUM FPDF_DUPLEXTYPE : unsigned int { DuplexUndefined, Simplex, DuplexFlipShortEdge, DuplexFlipLongEdge };

typedef System::Word FPDF_WCHAR;

typedef char * FPDF_BYTESTRING;

typedef System::WideChar * FPDF_WIDESTRING;

struct DECLSPEC_DRECORD FPDF_BSTR
{
public:
	char *str;
	int len;
};


typedef char * FPDF_STRING;

struct DECLSPEC_DRECORD FS_MATRIX
{
public:
	float a;
	float b;
	float c;
	float d;
	float e;
	float f;
};


struct DECLSPEC_DRECORD FS_RECTF
{
public:
	float left;
	float top;
	float right;
	float bottom;
};


typedef FS_RECTF *FS_LPRECTF;

typedef FS_RECTF *FS_LPCRECTF;

struct DECLSPEC_DRECORD FS_SIZEF
{
public:
	float width;
	float height;
};


typedef FS_SIZEF *FS_LPSIZEF;

typedef FS_SIZEF *FS_LPCSIZEF;

struct DECLSPEC_DRECORD FS_POINTF
{
public:
	float x;
	float y;
};


typedef FS_POINTF *FS_LPPOINTF;

typedef FS_POINTF *FS_LPCPOINTF;

struct DECLSPEC_DRECORD FS_QUADPOINTSF
{
public:
	float x1;
	float y1;
	float x2;
	float y2;
	float x3;
	float y3;
	float x4;
	float y4;
};


typedef int FPDF_ANNOTATION_SUBTYPE;

typedef int FPDF_ANNOT_APPEARANCEMODE;

typedef int FPDF_OBJECT_TYPE;

enum DECLSPEC_DENUM FPDF_RENDERER_TYPE : unsigned int { FPDF_RENDERERTYPE_AGG, FPDF_RENDERERTYPE_SKIA };

struct DECLSPEC_DRECORD FPDF_LIBRARY_CONFIG
{
public:
	int Version;
	char * *m_pUserFontPaths;
	void *m_pIsolate;
	unsigned m_v8EmbedderSlot;
	void *m_pPlatform;
	FPDF_RENDERER_TYPE m_RendererType;
};


typedef void __cdecl (*TFPDF_InitLibraryWithConfig)(FPDF_LIBRARY_CONFIG &Config);

typedef void __cdecl (*TFPDF_InitLibrary)(void);

typedef void __cdecl (*TFPDF_DestroyLibrary)(void);

typedef void __cdecl (*TFPDF_SetSandBoxPolicy)(unsigned policy, int enable);

typedef void * __cdecl (*TFPDF_LoadDocument)(char * file_path, char * password);

typedef void * __cdecl (*TFPDF_LoadMemDocument)(void * data_buf, int size, char * password);

typedef void * __cdecl (*TFPDF_LoadMemDocument64)(const void * data_buf, NativeUInt size, char * password);

typedef int __cdecl (*m_GetBlock)(void * param, unsigned position, System::PByte pBuf, unsigned size);

struct DECLSPEC_DRECORD FPDF_FILEACCESS
{
public:
	unsigned m_FileLen;
	m_GetBlock m_GetBlock;
	void *m_Param;
};


typedef FPDF_FILEACCESS *PFPDF_FILEACCESS;

struct DECLSPEC_DRECORD FPDF_FILEHANDLER
{
public:
	void *clientData;
};


typedef FPDF_FILEHANDLER *PFPDF_FILEHANDLER;

typedef void * __cdecl (*TFPDF_LoadCustomDocument)(PFPDF_FILEACCESS pFileAccess, char * password);

typedef int __cdecl (*TFPDF_GetFileVersion)(void * doc, int &fileVersion);

typedef unsigned __cdecl (*TFPDF_GetLastError)(void);

typedef int __cdecl (*TFPDF_DocumentHasValidCrossReferenceTable)(void * document);

typedef unsigned __cdecl (*TFPDF_GetTrailerEnds)(void * document, /* out */ unsigned &buffer, unsigned length);

typedef unsigned __cdecl (*TFPDF_GetDocPermissions)(void * document);

typedef unsigned __cdecl (*TFPDF_GetDocUserPermissions)(void * document);

typedef int __cdecl (*TFPDF_GetSecurityHandlerRevision)(void * document);

typedef int __cdecl (*TFPDF_GetPageCount)(void * document);

typedef void * __cdecl (*TFPDF_LoadPage)(void * document, int page_index);

typedef float __cdecl (*TFPDF_GetPageWidthF)(void * page);

typedef double __cdecl (*TFPDF_GetPageWidth)(void * page);

typedef float __cdecl (*TFPDF_GetPageHeightF)(void * page);

typedef double __cdecl (*TFPDF_GetPageHeight)(void * page);

typedef int __cdecl (*TFPDF_GetPageBoundingBox)(void * page, FS_RECTF &rect);

typedef int __cdecl (*TFPDF_GetPageSizeByIndexF)(void * document, int page_index, /* out */ FS_SIZEF &size);

typedef int __cdecl (*TFPDF_GetPageSizeByIndex)(void * document, int page_index, double &width, double &height);

struct DECLSPEC_DRECORD FPDF_COLORSCHEME
{
public:
	unsigned path_fill_color;
	unsigned path_stroke_color;
	unsigned text_fill_color;
	unsigned text_stroke_color;
};


typedef FPDF_COLORSCHEME *PFPDF_COLORSCHEME;

typedef void __cdecl (*TFPDF_RenderPage)(HDC dc, void * page, int start_x, int start_y, int size_x, int size_y, int rotate, int flags);

typedef void __cdecl (*TFPDF_RenderPageBitmap)(void * bitmap, void * page, int start_x, int start_y, int size_x, int size_y, int rotate, int flags);

typedef void __cdecl (*TFPDF_RenderPageBitmapWithMatrix)(void * bitmap, void * page, FS_MATRIX &matrix, FS_RECTF &clipping, int flags);

typedef void __cdecl (*TFPDF_ClosePage)(void * page);

typedef void __cdecl (*TFPDF_CloseDocument)(void * document);

typedef int __cdecl (*TFPDF_DeviceToPage)(void * page, int start_x, int start_y, int size_x, int size_y, int rotate, int device_x, int device_y, /* out */ double &page_x, /* out */ double &page_y);

typedef int __cdecl (*TFPDF_PageToDevice)(void * page, int start_x, int start_y, int size_x, int size_y, int rotate, double page_x, double page_y, /* out */ int &device_x, /* out */ int &device_y);

typedef void * __cdecl (*TFPDFBitmap_Create)(int width, int height, int alpha);

typedef void * __cdecl (*TFPDFBitmap_CreateEx)(int width, int height, int format, void * first_scan, int stride);

typedef int __cdecl (*TFPDFBitmap_GetFormat)(void * bitmap);

typedef void __cdecl (*TFPDFBitmap_FillRect)(void * bitmap, unsigned left, unsigned top, unsigned width, unsigned height, unsigned color);

typedef void * __cdecl (*TFPDFBitmap_GetBuffer)(void * bitmap);

typedef int __cdecl (*TFPDFBitmap_GetWidth)(void * bitmap);

typedef int __cdecl (*TFPDFBitmap_GetHeight)(void * bitmap);

typedef int __cdecl (*TFPDFBitmap_GetStride)(void * bitmap);

typedef void __cdecl (*TFPDFBitmap_Destroy)(void * bitmap);

typedef int __cdecl (*TFPDF_VIEWERREF_GetPrintScaling)(void * document);

typedef int __cdecl (*TFPDF_VIEWERREF_GetNumCopies)(void * document);

typedef void * __cdecl (*TFPDF_VIEWERREF_GetPrintPageRange)(void * document);

typedef NativeUInt __cdecl (*TFPDF_VIEWERREF_GetPrintPageRangeCount)(void * pagerange);

typedef int __cdecl (*TFPDF_VIEWERREF_GetPrintPageRangeElement)(void * pagerange, NativeUInt index);

typedef FPDF_DUPLEXTYPE __cdecl (*TFPDF_VIEWERREF_GetDuplex)(void * document);

typedef unsigned __cdecl (*TFPDF_VIEWERREF_GetName)(void * document, char * key, char * buffer, unsigned length);

typedef unsigned __cdecl (*TFPDF_CountNamedDests)(void * document);

typedef void * __cdecl (*TFPDF_GetNamedDestByName)(void * document, char * name);

typedef void * __cdecl (*TFPDF_GetNamedDest)(void * document, int index, void * buffer, unsigned &buflen);

typedef int __cdecl (*TFPDF_GetXFAPacketCount)(void * document);

typedef unsigned __cdecl (*TFPDF_GetXFAPacketName)(void * document, int index, void * buffer, unsigned buflen);

typedef int __cdecl (*TFPDF_GetXFAPacketContent)(void * document, int index, void * buffer, unsigned buflen, /* out */ unsigned &out_buflen);

//-- var, const, procedure ---------------------------------------------------
static const System::Int8 FPDF_OBJECT_UNKNOWN = System::Int8(0x0);
static const System::Int8 FPDF_OBJECT_BOOLEAN = System::Int8(0x1);
static const System::Int8 FPDF_OBJECT_NUMBER = System::Int8(0x2);
static const System::Int8 FPDF_OBJECT_STRING = System::Int8(0x3);
static const System::Int8 FPDF_OBJECT_NAME = System::Int8(0x4);
static const System::Int8 FPDF_OBJECT_ARRAY = System::Int8(0x5);
static const System::Int8 FPDF_OBJECT_DICTIONARY = System::Int8(0x6);
static const System::Int8 FPDF_OBJECT_STREAM = System::Int8(0x7);
static const System::Int8 FPDF_OBJECT_NULLOBJ = System::Int8(0x8);
static const System::Int8 FPDF_OBJECT_REFERENCE = System::Int8(0x9);
static const System::Int8 FPDF_TEXTRENDERMODE_FILL = System::Int8(0x0);
static const System::Int8 FPDF_TEXTRENDERMODE_STROKE = System::Int8(0x1);
static const System::Int8 FPDF_TEXTRENDERMODE_FILL_STROKE = System::Int8(0x2);
static const System::Int8 FPDF_TEXTRENDERMODE_INVISIBLE = System::Int8(0x3);
static const System::Int8 FPDF_TEXTRENDERMODE_FILL_CLIP = System::Int8(0x4);
static const System::Int8 FPDF_TEXTRENDERMODE_STROKE_CLIP = System::Int8(0x5);
static const System::Int8 FPDF_TEXTRENDERMODE_FILL_STROKE_CLIP = System::Int8(0x6);
static const System::Int8 FPDF_TEXTRENDERMODE_CLIP = System::Int8(0x7);
static const System::Int8 FPDF_TEXTRENDERMODE_LAST = System::Int8(0x7);
static const System::Int8 FPDF_POLICY_MACHINETIME_ACCESS = System::Int8(0x0);
static const System::Int8 FPDF_ERR_SUCCESS = System::Int8(0x0);
static const System::Int8 FPDF_ERR_UNKNOWN = System::Int8(0x1);
static const System::Int8 FPDF_ERR_FILE = System::Int8(0x2);
static const System::Int8 FPDF_ERR_FORMAT = System::Int8(0x3);
static const System::Int8 FPDF_ERR_PASSWORD = System::Int8(0x4);
static const System::Int8 FPDF_ERR_SECURITY = System::Int8(0x5);
static const System::Int8 FPDF_ERR_PAGE = System::Int8(0x6);
static const System::Int8 FPDF_ANNOT = System::Int8(0x1);
static const System::Int8 FPDF_LCD_TEXT = System::Int8(0x2);
static const System::Int8 FPDF_NO_NATIVETEXT = System::Int8(0x4);
static const System::Int8 FPDF_GRAYSCALE = System::Int8(0x8);
static const System::Byte FPDF_DEBUG_INFO = System::Byte(0x80);
static const System::Word FPDF_NO_CATCH = System::Word(0x100);
static const System::Word FPDF_RENDER_LIMITEDIMAGECACHE = System::Word(0x200);
static const System::Word FPDF_RENDER_FORCEHALFTONE = System::Word(0x400);
static const System::Word FPDF_PRINTING = System::Word(0x800);
static const System::Word FPDF_RENDER_NO_SMOOTHTEXT = System::Word(0x1000);
static const System::Word FPDF_RENDER_NO_SMOOTHIMAGE = System::Word(0x2000);
static const System::Word FPDF_RENDER_NO_SMOOTHPATH = System::Word(0x4000);
static const System::Int8 FPDF_REVERSE_BYTE_ORDER = System::Int8(0x10);
static const System::Int8 FPDF_CONVERT_FILL_TO_STROKE = System::Int8(0x20);
static const System::Int8 FPDFBitmap_Unknown = System::Int8(0x0);
static const System::Int8 FPDFBitmap_Gray = System::Int8(0x1);
static const System::Int8 FPDFBitmap_BGR = System::Int8(0x2);
static const System::Int8 FPDFBitmap_BGRx = System::Int8(0x3);
static const System::Int8 FPDFBitmap_BGRA = System::Int8(0x4);
}	/* namespace Fpdfview */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FPDFVIEW)
using namespace Fpdfview;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// FpdfviewHPP
