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

// (DO NOT EDIT: machine generated header) 'Fpdfview.pas' rev: 21.00

#ifndef FpdfviewHPP
#define FpdfviewHPP

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

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

namespace Fpdfview
{
//-- type declarations -------------------------------------------------------
typedef unsigned NativeUInt;

typedef unsigned 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;

#pragma option push -b
enum FPDF_DUPLEXTYPE { DuplexUndefined, Simplex, DuplexFlipShortEdge, DuplexFlipLongEdge };
#pragma option pop

typedef System::Word FPDF_WCHAR;

typedef char * FPDF_BYTESTRING;

typedef System::WideChar * FPDF_WIDESTRING;

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


typedef char * FPDF_STRING;

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


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


typedef FS_RECTF *FS_LPRECTF;

typedef FS_RECTF *FS_LPCRECTF;

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


typedef FS_SIZEF *FS_LPSIZEF;

typedef FS_SIZEF *FS_LPCSIZEF;

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


typedef FS_POINTF *FS_LPPOINTF;

typedef FS_POINTF *FS_LPCPOINTF;

struct 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;

#pragma option push -b
enum FPDF_RENDERER_TYPE { FPDF_RENDERERTYPE_AGG, FPDF_RENDERERTYPE_SKIA };
#pragma option pop

struct 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, unsigned size, char * password);

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

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


typedef FPDF_FILEACCESS *PFPDF_FILEACCESS;

struct 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 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 unsigned __cdecl (*TFPDF_VIEWERREF_GetPrintPageRangeCount)(void * pagerange);

typedef int __cdecl (*TFPDF_VIEWERREF_GetPrintPageRangeElement)(void * pagerange, unsigned 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 ShortInt FPDF_OBJECT_UNKNOWN = 0x0;
static const ShortInt FPDF_OBJECT_BOOLEAN = 0x1;
static const ShortInt FPDF_OBJECT_NUMBER = 0x2;
static const ShortInt FPDF_OBJECT_STRING = 0x3;
static const ShortInt FPDF_OBJECT_NAME = 0x4;
static const ShortInt FPDF_OBJECT_ARRAY = 0x5;
static const ShortInt FPDF_OBJECT_DICTIONARY = 0x6;
static const ShortInt FPDF_OBJECT_STREAM = 0x7;
static const ShortInt FPDF_OBJECT_NULLOBJ = 0x8;
static const ShortInt FPDF_OBJECT_REFERENCE = 0x9;
static const ShortInt FPDF_TEXTRENDERMODE_FILL = 0x0;
static const ShortInt FPDF_TEXTRENDERMODE_STROKE = 0x1;
static const ShortInt FPDF_TEXTRENDERMODE_FILL_STROKE = 0x2;
static const ShortInt FPDF_TEXTRENDERMODE_INVISIBLE = 0x3;
static const ShortInt FPDF_TEXTRENDERMODE_FILL_CLIP = 0x4;
static const ShortInt FPDF_TEXTRENDERMODE_STROKE_CLIP = 0x5;
static const ShortInt FPDF_TEXTRENDERMODE_FILL_STROKE_CLIP = 0x6;
static const ShortInt FPDF_TEXTRENDERMODE_CLIP = 0x7;
static const ShortInt FPDF_TEXTRENDERMODE_LAST = 0x7;
static const ShortInt FPDF_POLICY_MACHINETIME_ACCESS = 0x0;
static const ShortInt FPDF_ERR_SUCCESS = 0x0;
static const ShortInt FPDF_ERR_UNKNOWN = 0x1;
static const ShortInt FPDF_ERR_FILE = 0x2;
static const ShortInt FPDF_ERR_FORMAT = 0x3;
static const ShortInt FPDF_ERR_PASSWORD = 0x4;
static const ShortInt FPDF_ERR_SECURITY = 0x5;
static const ShortInt FPDF_ERR_PAGE = 0x6;
static const ShortInt FPDF_ANNOT = 0x1;
static const ShortInt FPDF_LCD_TEXT = 0x2;
static const ShortInt FPDF_NO_NATIVETEXT = 0x4;
static const ShortInt FPDF_GRAYSCALE = 0x8;
static const Byte FPDF_DEBUG_INFO = 0x80;
static const Word FPDF_NO_CATCH = 0x100;
static const Word FPDF_RENDER_LIMITEDIMAGECACHE = 0x200;
static const Word FPDF_RENDER_FORCEHALFTONE = 0x400;
static const Word FPDF_PRINTING = 0x800;
static const Word FPDF_RENDER_NO_SMOOTHTEXT = 0x1000;
static const Word FPDF_RENDER_NO_SMOOTHIMAGE = 0x2000;
static const Word FPDF_RENDER_NO_SMOOTHPATH = 0x4000;
static const ShortInt FPDF_REVERSE_BYTE_ORDER = 0x10;
static const ShortInt FPDF_CONVERT_FILL_TO_STROKE = 0x20;
static const ShortInt FPDFBitmap_Unknown = 0x0;
static const ShortInt FPDFBitmap_Gray = 0x1;
static const ShortInt FPDFBitmap_BGR = 0x2;
static const ShortInt FPDFBitmap_BGRx = 0x3;
static const ShortInt FPDFBitmap_BGRA = 0x4;

}	/* namespace Fpdfview */
using namespace Fpdfview;
#pragma pack(pop)
#pragma option pop

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