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

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

#ifndef FpdfformfillHPP
#define FpdfformfillHPP

#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 <FPdfView.hpp>

//-- user supplied -----------------------------------------------------------

namespace Fpdfformfill
{
//-- forward type declarations -----------------------------------------------
struct IPDF_JsPlatform;
struct FPDF_SYSTEMTIME;
struct FPDF_FORMFILLINFO;
//-- type declarations -------------------------------------------------------
typedef IPDF_JsPlatform *PIPDF_JsPlatform;

typedef int __cdecl (*app_alert)(PIPDF_JsPlatform pThis, System::WideChar * Msg, System::WideChar * Title, int Type_, int Icon);

typedef void __cdecl (*app_beep)(PIPDF_JsPlatform pThis, int nType);

typedef int __cdecl (*app_response)(PIPDF_JsPlatform pThis, System::WideChar * Question, System::WideChar * Title, System::WideChar * Default, System::WideChar * cLabel, int bPassword, void * response, int length);

typedef int __cdecl (*Doc_getFilePath)(PIPDF_JsPlatform pThis, void * filePath, int length);

typedef void __cdecl (*Doc_mail)(PIPDF_JsPlatform pThis, void * mailData, int length, int bUI, System::WideChar * To_, System::WideChar * Subject, System::WideChar * CC, System::WideChar * BCC, System::WideChar * Msg);

typedef void __cdecl (*Doc_print)(PIPDF_JsPlatform pThis, int bUI, int nStart, int nEnd, int bSilent, int bShrinkToFit, int bPrintAsImage, int bReverse, int bAnnotations);

typedef void __cdecl (*Doc_submitForm)(PIPDF_JsPlatform pThis, void * formData, int length, System::WideChar * URL);

typedef void __cdecl (*Doc_gotoPage)(PIPDF_JsPlatform pThis, int nPageNum);

typedef int __cdecl (*Field_browse)(PIPDF_JsPlatform pThis, void * filePath, int length);

struct DECLSPEC_DRECORD IPDF_JsPlatform
{
public:
	int version;
	app_alert app_alert;
	app_beep app_beep;
	app_response app_response;
	Doc_getFilePath Doc_getFilePath;
	Doc_mail Doc_mail;
	Doc_print Doc_print;
	Doc_submitForm Doc_submitForm;
	Doc_gotoPage Doc_gotoPage;
	Field_browse Field_browse;
	void *m_pFormfillinfo;
	void *m_isolate;
	unsigned m_v8EmbedderSlot;
};


typedef void __cdecl (*TimerCallback)(int idEvent);

struct DECLSPEC_DRECORD FPDF_SYSTEMTIME
{
public:
	System::Word wYear;
	System::Word wMonth;
	System::Word wDayOfWeek;
	System::Word wDay;
	System::Word wHour;
	System::Word wMinute;
	System::Word wSecond;
	System::Word wMilliseconds;
};


typedef FPDF_FORMFILLINFO *PFPDF_FORMFILLINFO;

typedef void __cdecl (*Release)(PFPDF_FORMFILLINFO pThis);

typedef void __cdecl (*FFI_Invalidate)(PFPDF_FORMFILLINFO pThis, void * page, double left, double top, double right, double bottom);

typedef void __cdecl (*FFI_OutputSelectedRect)(PFPDF_FORMFILLINFO pThis, void * page, double left, double top, double right, double bottom);

typedef void __cdecl (*FFI_SetCursor)(PFPDF_FORMFILLINFO pThis, int nCursorType);

typedef int __cdecl (*FFI_SetTimer)(PFPDF_FORMFILLINFO pThis, int uElapse, TimerCallback lpTimerFunc);

typedef void __cdecl (*FFI_KillTimer)(PFPDF_FORMFILLINFO pThis, int nTimerID);

typedef FPDF_SYSTEMTIME __cdecl (*FFI_GetLocalTime)(PFPDF_FORMFILLINFO pThis);

typedef void __cdecl (*FFI_OnChange)(PFPDF_FORMFILLINFO pThis);

typedef void * __cdecl (*FFI_GetPage)(PFPDF_FORMFILLINFO pThis, void * document, int nPageIndex);

typedef void * __cdecl (*FFI_GetCurrentPage)(PFPDF_FORMFILLINFO pThis, void * document);

typedef int __cdecl (*FFI_GetRotation)(PFPDF_FORMFILLINFO pThis, void * page);

typedef void __cdecl (*FFI_ExecuteNamedAction)(PFPDF_FORMFILLINFO pThis, char * namedAction);

typedef void __cdecl (*FFI_SetTextFieldFocus)(PFPDF_FORMFILLINFO pThis, System::WideChar * value, unsigned valueLen, int is_focus);

typedef void __cdecl (*FFI_DoURIAction)(PFPDF_FORMFILLINFO pThis, char * bsURI);

typedef void __cdecl (*FFI_DoGoToAction)(PFPDF_FORMFILLINFO pThis, int nPageIndex, int zoomMode, float &fPosArray, int sizeofArray);

typedef void __cdecl (*FFI_DisplayCaret)(PFPDF_FORMFILLINFO pThis, void * page, int bVisible, double left, double top, double right, double bottom);

typedef int __cdecl (*FFI_GetCurrentPageIndex)(PFPDF_FORMFILLINFO pThis, void * document);

typedef void __cdecl (*FFI_SetCurrentPage)(PFPDF_FORMFILLINFO pThis, void * document, int iCurPage);

typedef void __cdecl (*FFI_GotoURL)(PFPDF_FORMFILLINFO pThis, void * document, System::WideChar * wsURL);

typedef void __cdecl (*FFI_GetPageViewRect)(PFPDF_FORMFILLINFO pThis, void * page, /* out */ double &left, /* out */ double &top, /* out */ double &right, /* out */ double &bottom);

typedef void __cdecl (*FFI_PageEvent)(PFPDF_FORMFILLINFO pThis, int page_count, unsigned event_type);

typedef int __cdecl (*FFI_PopupMenu)(PFPDF_FORMFILLINFO pThis, void * page, void * hWidget, int menuFlag, float x, float y);

typedef Fpdfview::PFPDF_FILEHANDLER __fastcall (*FFI_OpenFile)(PFPDF_FORMFILLINFO pThis, int fileFlag, System::WideChar * wsURL, char * mode);

typedef void __cdecl (*FFI_EmailTo)(PFPDF_FORMFILLINFO pThis, Fpdfview::PFPDF_FILEHANDLER fileHandler, System::WideChar * pTo, System::WideChar * pSubject, System::WideChar * pCC, System::WideChar * pBcc, System::WideChar * pMsg);

typedef void __cdecl (*FFI_UploadTo)(PFPDF_FORMFILLINFO pThis, Fpdfview::PFPDF_FILEHANDLER fileHandler, int fileFlag, System::WideChar * uploadTo);

typedef int __cdecl (*FFI_GetPlatform)(PFPDF_FORMFILLINFO pThis, void * platform, int length);

typedef int __cdecl (*FFI_GetLanguage)(PFPDF_FORMFILLINFO pThis, void * language, int length);

typedef Fpdfview::PFPDF_FILEHANDLER __cdecl (*FFI_DownloadFromURL)(PFPDF_FORMFILLINFO pThis, System::WideChar * URL);

typedef int __cdecl (*FFI_PostRequestURL)(PFPDF_FORMFILLINFO pThis, System::WideChar * wsURL, System::WideChar * wsData, System::WideChar * wsContentType, System::WideChar * wsEncode, System::WideChar * wsHeader, /* out */ Fpdfview::FPDF_BSTR &response);

typedef int __cdecl (*FFI_PutRequestURL)(PFPDF_FORMFILLINFO pThis, System::WideChar * wsURL, System::WideChar * wsData, System::WideChar * wsEncode);

typedef void __cdecl (*FFI_OnFocusChange)(PFPDF_FORMFILLINFO param, void * annot, int page_index);

typedef void __cdecl (*FFI_DoURIActionWithKeyboardModifier)(PFPDF_FORMFILLINFO param, char * uri, int modifiers);

struct DECLSPEC_DRECORD FPDF_FORMFILLINFO
{
public:
	int version;
	Release Release;
	FFI_Invalidate FFI_Invalidate;
	FFI_OutputSelectedRect FFI_OutputSelectedRect;
	FFI_SetCursor FFI_SetCursor;
	FFI_SetTimer FFI_SetTimer;
	FFI_KillTimer FFI_KillTimer;
	FFI_GetLocalTime FFI_GetLocalTime;
	FFI_OnChange FFI_OnChange;
	FFI_GetPage FFI_GetPage;
	FFI_GetCurrentPage FFI_GetCurrentPage;
	FFI_GetRotation FFI_GetRotation;
	FFI_ExecuteNamedAction FFI_ExecuteNamedAction;
	FFI_SetTextFieldFocus FFI_SetTextFieldFocus;
	FFI_DoURIAction FFI_DoURIAction;
	FFI_DoGoToAction FFI_DoGoToAction;
	IPDF_JsPlatform *m_pJsPlatform;
	int xfa_disabled;
	FFI_DisplayCaret FFI_DisplayCaret;
	FFI_GetCurrentPageIndex FFI_GetCurrentPageIndex;
	FFI_SetCurrentPage FFI_SetCurrentPage;
	FFI_GotoURL FFI_GotoURL;
	FFI_GetPageViewRect FFI_GetPageViewRect;
	FFI_PageEvent FFI_PageEvent;
	FFI_PopupMenu FFI_PopupMenu;
	FFI_OpenFile FFI_OpenFile;
	FFI_EmailTo FFI_EmailTo;
	FFI_UploadTo FFI_UploadTo;
	FFI_GetPlatform FFI_GetPlatform;
	FFI_GetLanguage FFI_GetLanguage;
	FFI_DownloadFromURL FFI_DownloadFromURL;
	FFI_PostRequestURL FFI_PostRequestURL;
	FFI_PutRequestURL FFI_PutRequestURL;
	FFI_OnFocusChange FFI_OnFocusChange;
	FFI_DoURIActionWithKeyboardModifier FFI_DoURIActionWithKeyboardModifier;
};


typedef void * __cdecl (*TFPDFDOC_InitFormFillEnvironment)(void * document, FPDF_FORMFILLINFO &formInfo);

typedef void __cdecl (*TFPDFDOC_ExitFormFillEnvironment)(void * hHandle);

typedef void __cdecl (*TFORM_OnAfterLoadPage)(void * page, void * hHandle);

typedef void __cdecl (*TFORM_OnBeforeClosePage)(void * page, void * hHandle);

typedef void __cdecl (*TFORM_DoDocumentJSAction)(void * hHandle);

typedef void __cdecl (*TFORM_DoDocumentOpenAction)(void * hHandle);

typedef void __cdecl (*TFORM_DoDocumentAAction)(void * hHandle, int aaType);

typedef void __cdecl (*TFORM_DoPageAAction)(void * page, void * hHandle, int aaType);

typedef int __cdecl (*TFORM_OnMouseMove)(void * hHandle, void * page, int modifier, double page_x, double page_y);

typedef int __cdecl (*TFORM_OnMouseWheel)(void * hHandle, void * page, int modifier, const Fpdfview::FS_LPCPOINTF page_coord, int delta_x, int delta_y);

typedef int __cdecl (*TFORM_OnFocus)(void * hHandle, void * page, int modifier, double page_x, double page_y);

typedef int __cdecl (*TFORM_OnLButtonDown)(void * hHandle, void * page, int modifier, double page_x, double page_y);

typedef int __cdecl (*TFORM_OnRButtonDown)(void * hHandle, void * page, int modifier, double page_x, double page_y);

typedef int __cdecl (*TFORM_OnLButtonUp)(void * hHandle, void * page, int modifier, double page_x, double page_y);

typedef int __cdecl (*TFORM_OnRButtonUp)(void * hHandle, void * page, int modifier, double page_x, double page_y);

typedef int __cdecl (*TFORM_OnLButtonDoubleClick)(void * hHandle, void * page, int modifier, double page_x, double page_y);

typedef int __cdecl (*TFORM_OnKeyDown)(void * hHandle, void * page, int nKeyCode, int modifier);

typedef int __cdecl (*TFORM_OnKeyUp)(void * hHandle, void * page, int nKeyCode, int modifier);

typedef int __cdecl (*TFORM_OnChar)(void * hHandle, void * page, int nChar, int modifier);

typedef unsigned __cdecl (*TFORM_GetFocusedText)(void * hHandle, void * page, void * buffer, unsigned buflen);

typedef unsigned __cdecl (*TFORM_GetSelectedText)(void * hHandle, void * page, void * buffer, unsigned buflen);

typedef void __cdecl (*TFORM_ReplaceAndKeepSelection)(void * hHandle, void * page, System::WideChar * wsText);

typedef void __cdecl (*TFORM_ReplaceSelection)(void * hHandle, void * page, System::WideChar * wsText);

typedef int __cdecl (*TFORM_SelectAllText)(void * hHandle, void * page);

typedef int __cdecl (*TFORM_CanUndo)(void * hHandle, void * page);

typedef int __cdecl (*TFORM_CanRedo)(void * hHandle, void * page);

typedef int __cdecl (*TFORM_Undo)(void * hHandle, void * page);

typedef int __cdecl (*TFORM_Redo)(void * hHandle, void * page);

typedef int __cdecl (*TFORM_ForceToKillFocus)(void * hHandle);

typedef int __cdecl (*TFORM_GetFocusedAnnot)(void * handle, /* out */ int &page_index, /* out */ void * &annot);

typedef int __cdecl (*TFORM_SetFocusedAnnot)(void * handle, void * annot);

typedef int __cdecl (*TFPDFPage_HasFormFieldAtPoint)(void * hHandle, void * page, double page_x, double page_y);

typedef int __cdecl (*TFPDFPage_FormFieldZOrderAtPoint)(void * hHandle, void * page, double page_x, double page_y);

typedef void __cdecl (*TFPDF_SetFormFieldHighlightColor)(void * hHandle, int fieldType, unsigned color);

typedef void __cdecl (*TFPDF_SetFormFieldHighlightAlpha)(void * hHandle, System::Byte alpha);

typedef void __cdecl (*TFPDF_RemoveFormFieldHighlight)(void * hHandle);

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

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

typedef int __cdecl (*TFORM_SetIndexSelected)(void * hHandle, void * page, int index, int selected);

typedef int __cdecl (*TFORM_IsIndexSelected)(void * hHandle, void * page, int index);

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

//-- var, const, procedure ---------------------------------------------------
static const System::Int8 FORMTYPE_NONE = System::Int8(0x0);
static const System::Int8 FORMTYPE_ACRO_FORM = System::Int8(0x1);
static const System::Int8 FORMTYPE_XFA_FULL = System::Int8(0x2);
static const System::Int8 FORMTYPE_XFA_FOREGROUND = System::Int8(0x3);
static const System::Int8 FORMTYPE_COUNT = System::Int8(0x4);
static const System::Int8 JSPLATFORM_ALERT_BUTTON_OK = System::Int8(0x0);
static const System::Int8 JSPLATFORM_ALERT_BUTTON_OKCANCEL = System::Int8(0x1);
static const System::Int8 JSPLATFORM_ALERT_BUTTON_YESNO = System::Int8(0x2);
static const System::Int8 JSPLATFORM_ALERT_BUTTON_YESNOCANCEL = System::Int8(0x3);
static const System::Int8 JSPLATFORM_ALERT_BUTTON_DEFAULT = System::Int8(0x0);
static const System::Int8 JSPLATFORM_ALERT_ICON_ERROR = System::Int8(0x0);
static const System::Int8 JSPLATFORM_ALERT_ICON_WARNING = System::Int8(0x1);
static const System::Int8 JSPLATFORM_ALERT_ICON_QUESTION = System::Int8(0x2);
static const System::Int8 JSPLATFORM_ALERT_ICON_STATUS = System::Int8(0x3);
static const System::Int8 JSPLATFORM_ALERT_ICON_ASTERISK = System::Int8(0x4);
static const System::Int8 JSPLATFORM_ALERT_ICON_DEFAULT = System::Int8(0x0);
static const System::Int8 JSPLATFORM_ALERT_RETURN_OK = System::Int8(0x1);
static const System::Int8 JSPLATFORM_ALERT_RETURN_CANCEL = System::Int8(0x2);
static const System::Int8 JSPLATFORM_ALERT_RETURN_NO = System::Int8(0x3);
static const System::Int8 JSPLATFORM_ALERT_RETURN_YES = System::Int8(0x4);
static const System::Int8 JSPLATFORM_BEEP_ERROR = System::Int8(0x0);
static const System::Int8 JSPLATFORM_BEEP_WARNING = System::Int8(0x1);
static const System::Int8 JSPLATFORM_BEEP_QUESTION = System::Int8(0x2);
static const System::Int8 JSPLATFORM_BEEP_STATUS = System::Int8(0x3);
static const System::Int8 JSPLATFORM_BEEP_DEFAULT = System::Int8(0x4);
static const System::Int8 FXCT_ARROW = System::Int8(0x0);
static const System::Int8 FXCT_NESW = System::Int8(0x1);
static const System::Int8 FXCT_NWSE = System::Int8(0x2);
static const System::Int8 FXCT_VBEAM = System::Int8(0x3);
static const System::Int8 FXCT_HBEAM = System::Int8(0x4);
static const System::Int8 FXCT_HAND = System::Int8(0x5);
static const System::Int8 FPDFDOC_AACTION_WC = System::Int8(0x10);
static const System::Int8 FPDFDOC_AACTION_WS = System::Int8(0x11);
static const System::Int8 FPDFDOC_AACTION_DS = System::Int8(0x12);
static const System::Int8 FPDFDOC_AACTION_WP = System::Int8(0x13);
static const System::Int8 FPDFDOC_AACTION_DP = System::Int8(0x14);
static const System::Int8 FPDFPAGE_AACTION_OPEN = System::Int8(0x0);
static const System::Int8 FPDFPAGE_AACTION_CLOSE = System::Int8(0x1);
static const System::Int8 FPDF_FORMFIELD_UNKNOWN = System::Int8(0x0);
static const System::Int8 FPDF_FORMFIELD_PUSHBUTTON = System::Int8(0x1);
static const System::Int8 FPDF_FORMFIELD_CHECKBOX = System::Int8(0x2);
static const System::Int8 FPDF_FORMFIELD_RADIOBUTTON = System::Int8(0x3);
static const System::Int8 FPDF_FORMFIELD_COMBOBOX = System::Int8(0x4);
static const System::Int8 FPDF_FORMFIELD_LISTBOX = System::Int8(0x5);
static const System::Int8 FPDF_FORMFIELD_TEXTFIELD = System::Int8(0x6);
static const System::Int8 FPDF_FORMFIELD_SIGNATURE = System::Int8(0x7);
static const System::Int8 FPDF_FORMFIELD_COUNT = System::Int8(0x8);
}	/* namespace Fpdfformfill */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FPDFFORMFILL)
using namespace Fpdfformfill;
#endif
#pragma pack(pop)
#pragma option pop

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