Code: Select all
; CCopyright 2014 PDFium Authors. All rights reserved.
; 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
; NOTE: External docs refer to this file as "fpdfview.h", so do not rename
; despite lack of consistency with other public files.
Macro FPDF_ARGB(a, r, g, b)
((((b) & $ff) | (((g) & $ff) << 8) | (((r) & $ff) << 16) | (((a) & $ff) << 24)))
EndMacro
Macro FPDF_GetBValue(argb)
argb
EndMacro
Macro FPDF_GetGValue(argb)
((argb)) >> 8)
EndMacro
Macro FPDF_GetRValue(argb)
((argb) >> 16)
EndMacro
Macro FPDF_GetAValue(argb)
((argb) >> 24)
EndMacro
; PDF_USE_XFA is set in confirmation that this version of PDFium can support
; XFA forms as requested by the PDF_ENABLE_XFA setting.
#PDF_USE_XFA = 1
; Policy for accessing the local machine time.
#FPDF_POLICY_MACHINETIME_ACCESS = 0
#FPDF_ERR_SUCCESS = 0 ; No error.
#FPDF_ERR_UNKNOWN = 1 ; Unknown error.
#FPDF_ERR_FILE = 2 ; File not found or could not be opened.
#FPDF_ERR_FORMAT = 3 ; File not in PDF format or corrupted.
#FPDF_ERR_PASSWORD = 4 ; Password required or incorrect password.
#FPDF_ERR_SECURITY = 5 ; Unsupported security scheme.
#FPDF_ERR_PAGE = 6 ; Page not found or content error.
#FPDF_ERR_XFALOAD = 7 ; Load XFA error.
#FPDF_ERR_XFALAYOUT = 8 ; Layout XFA error.
; Page rendering flags. They can be combined with bit-wise OR.
;
; Set if annotations are to be rendered.
#FPDF_ANNOT = $01
; Set if using text rendering optimized for LCD display.
#FPDF_LCD_TEXT = $02
; Don't use the native text output available on some platforms
#FPDF_NO_NATIVETEXT = $04
; Grayscale output.
#FPDF_GRAYSCALE = $08
; Set if you want to get some debug info.
#FPDF_DEBUG_INFO = $80
; Set if you don't want to catch exceptions.
#FPDF_NO_CATCH = $100
; Limit image cache size.
#FPDF_RENDER_LIMITEDIMAGECACHE = $200
; Always use halftone for image stretching.
#FPDF_RENDER_FORCEHALFTONE = $400
; Render for printing.
#FPDF_PRINTING = $800
; Set to disable anti-aliasing on text.
#FPDF_RENDER_NO_SMOOTHTEXT = $1000
; Set to disable anti-aliasing on images.
#FPDF_RENDER_NO_SMOOTHIMAGE = $2000
; Set to disable anti-aliasing on paths.
#FPDF_RENDER_NO_SMOOTHPATH = $4000
; Set whether to render in a reverse Byte order, this flag is only used when rendering to a bitmap.
#FPDF_REVERSE_BYTE_ORDER = $10
; More DIB formats
; Gray scale bitmap, one byte per pixel.
#FPDFBitmap_Gray = 1
; 3 bytes per pixel, byte order: blue, green, red.
#FPDFBitmap_BGR = 2
; 4 bytes per pixel, byte order: blue, green, red, unused.
#FPDFBitmap_BGRx = 3
; 4 bytes per pixel, byte order: blue, green, red, alpha.
#FPDFBitmap_BGRA = 4
#PDF_LINEARIZATION_UNKNOWN = -1
#PDF_NOT_LINEARIZED = 0
#PDF_LINEARIZED = 1
#PDF_DATA_ERROR = -1
#PDF_DATA_NOTAVAIL = 0
#PDF_DATA_AVAIL = 1
#PDF_FORM_ERROR = -1
#PDF_FORM_NOTAVAIL = 0
#PDF_FORM_AVAIL = 1
#PDF_FORM_NOTEXIST = 2
; Unsupported action type.
#PDFACTION_UNSUPPORTED = 0
; Go to a destination within current document.
#PDFACTION_GOTO = 1
; Go to a destination within another document.
#PDFACTION_REMOTEGOTO = 2
; URI, including web pages and other Internet resources.
#PDFACTION_URI = 3
; Launch an application or open a file.
#PDFACTION_LAUNCH = 4
; The page object constants.
#FPDF_PAGEOBJ_TEXT = 1
#FPDF_PAGEOBJ_PATH = 2
#FPDF_PAGEOBJ_IMAGE = 3
#FPDF_PAGEOBJ_SHADING = 4
#FPDF_PAGEOBJ_FORM = 5
; Unsupported XFA form.
#FPDF_UNSP_DOC_XFAFORM = 1
; Unsupported portable collection.
#FPDF_UNSP_DOC_PORTABLECOLLECTION = 2
; Unsupported attachment.
#FPDF_UNSP_DOC_ATTACHMENT = 3
; Unsupported security.
#FPDF_UNSP_DOC_SECURITY = 4
; Unsupported shared review.
#FPDF_UNSP_DOC_SHAREDREVIEW = 5
; Unsupported shared form, acrobat.
#FPDF_UNSP_DOC_SHAREDFORM_ACROBAT = 6
; Unsupported shared form, filesystem.
#FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM = 7
; Unsupported shared form, email.
#FPDF_UNSP_DOC_SHAREDFORM_EMAIL = 8
; Unsupported 3D annotation.
#FPDF_UNSP_ANNOT_3DANNOT = 11
; Unsupported movie annotation.
#FPDF_UNSP_ANNOT_MOVIE = 12
; Unsupported sound annotation.
#FPDF_UNSP_ANNOT_SOUND = 13
; Unsupported screen media annotation.
#FPDF_UNSP_ANNOT_SCREEN_MEDIA = 14
; Unsupported screen rich media annotation.
#FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA = 15
; Unsupported attachment annotation.
#FPDF_UNSP_ANNOT_ATTACHMENT = 16
; Unsupported signature annotation.
#FPDF_UNSP_ANNOT_SIG = 17
; Unknown page mode.
#PAGEMODE_UNKNOWN = -1
; Document outline, and thumbnails hidden.
#PAGEMODE_USENONE = 0
; Document outline visible.
#PAGEMODE_USEOUTLINES = 1
; Thumbnail images visible.
#PAGEMODE_USETHUMBS = 2
; Full-screen mode, no menu bar, window controls, or other decorations visible.
#PAGEMODE_FULLSCREEN = 3
; Optional content group panel visible.
#PAGEMODE_USEOC = 4
; Attachments panel visible.
#PAGEMODE_USEATTACHMENTS = 5
; Flatten operation failed.
#FLATTEN_FAIL = 0
; Flatten operation succeed.
#FLATTEN_SUCCESS = 1
; Nothing to be flattened.
#FLATTEN_NOTHINGTODO = 2
; Flatten for normal display.
#FLAT_NORMALDISPLAY = 0
; Flatten for print.
#FLAT_PRINT = 1
#DOCTYPE_PDF = 0 ; Normal pdf Document
#DOCTYPE_DYNAMIC_XFA = 1 ; Dynamic xfa Document Type
#DOCTYPE_STATIC_XFA = 2 ; Static xfa Document Type
; Flags for Cursor type
#FXCT_ARROW = 0
#FXCT_NESW = 1
#FXCT_NWSE = 2
#FXCT_VBEAM = 3
#FXCT_HBEAM = 4
#FXCT_HAND = 5
; XFA
; Pageview event flags
; After a new pageview is added.
#FXFA_PAGEVIEWEVENT_POSTADDED = 1
; After a pageview is removed.
#FXFA_PAGEVIEWEVENT_POSTREMOVED = 3
; menu
; Macro Definitions For Right Context Menu Features Of XFA Fields
#FXFA_MENU_COPY = 1
#FXFA_MENU_CUT = 2
#FXFA_MENU_SELECTALL = 4
#FXFA_MENU_UNDO = 8
#FXFA_MENU_REDO = 16
#FXFA_MENU_PASTE = 32
; file type
; Macro Definitions For File Type.
#FXFA_SAVEAS_XML = 1
#FXFA_SAVEAS_XDP = 2
; additional actions type of document.
#FPDFDOC_AACTION_WC = $10 ; WC, before closing document, JavaScript action.
#FPDFDOC_AACTION_WS = $11 ; WS, before saving document, JavaScript action.
#FPDFDOC_AACTION_DS = $12 ; DS, after saving document, JavaScript action.
#FPDFDOC_AACTION_WP = $13 ; WP, before printing document, JavaScript action.
#FPDFDOC_AACTION_DP = $14 ; DP, after printing document, JavaScript action.
; Additional-action types of page object
#FPDFPAGE_AACTION_OPEN = 0 ; /O -- An action to be performed when the page is opened
#FPDFPAGE_AACTION_CLOSE = 1 ; /C -- An action to be performed when the page is closed
; Field Types
#FPDF_FORMFIELD_UNKNOWN = 0 ; Unknown.
#FPDF_FORMFIELD_PUSHBUTTON = 1 ; push button type.
#FPDF_FORMFIELD_CHECKBOX = 2 ; check box type.
#FPDF_FORMFIELD_RADIOBUTTON = 3 ; radio button type.
#FPDF_FORMFIELD_COMBOBOX = 4 ; combo box type.
#FPDF_FORMFIELD_LISTBOX = 5 ; list box type.
#FPDF_FORMFIELD_TEXTFIELD = 6 ; text field type.
#FPDF_FORMFIELD_XFA = 7 ; text field type.
; Flags for progressive process status.
#FPDF_RENDER_READER = 0
#FPDF_RENDER_TOBECOUNTINUED = 1
#FPDF_RENDER_DONE = 2
#FPDF_RENDER_FAILED = 3
; Incremental.
#FPDF_INCREMENTAL = 1
; No Incremental.
#FPDF_NO_INCREMENTAL = 2
; Remove security.
#FPDF_REMOVE_SECURITY = 3
; Character sets For the font
#FXFONT_ANSI_CHARSET = 0
#FXFONT_DEFAULT_CHARSET = 1
#FXFONT_SYMBOL_CHARSET = 2
#FXFONT_SHIFTJIS_CHARSET = 128
#FXFONT_HANGEUL_CHARSET = 129
#FXFONT_GB2312_CHARSET = 134
#FXFONT_CHINESEBIG5_CHARSET = 136
; Font pitch And family flags
#FXFONT_FF_FIXEDPITCH = 1
#FXFONT_FF_ROMAN = (1 << 4)
#FXFONT_FF_SCRIPT = (4 << 4)
; Typical weight values
#FXFONT_FW_NORMAL = 400
#FXFONT_FW_BOLD = 700
; Flags used by FPDFText_FindStart function.
#FPDF_MATCHCASE = $00000001 ; If not set, it will not match case by default.
#FPDF_MATCHWHOLEWORD = $00000002 ; If not set, it will not match the whole word by default.
; PDF types
; typedef void* FPDF_ACTION;
; typedef void* FPDF_BITMAP;
; typedef void* FPDF_BOOKMARK;
; typedef void* FPDF_CLIPPATH;
; typedef void* FPDF_DEST;
; typedef void* FPDF_DOCSCHHANDLE;
; typedef void* FPDF_DOCUMENT;
; typedef void* FPDF_FONT;
; typedef void* FPDF_HMODULE;
; typedef void* FPDF_LINK;
; typedef void* FPDF_MODULEMGR;
; typedef void* FPDF_PAGE;
; typedef void* FPDF_PAGELINK;
; typedef void* FPDF_PAGEOBJECT; ; Page object(text, path, etc)
; typedef void* FPDF_PAGERANGE;
; typedef void* FPDF_PATH;
; typedef void* FPDF_RECORDER;
; typedef void* FPDF_SCHHANDLE;
; typedef void* FPDF_TEXTPAGE;
; typedef void* FPDF_STRINGHANDLE;
; typedef void* FPDF_WIDGET;
; Basic data types
; typedef int FPDF_BOOL;
; typedef int FPDF_ERROR;
; typedef unsigned long FPDF_DWORD;
; typedef float FS_FLOAT;
; typedef void* FPDF_LPVOID;
; typedef void const* FPDF_LPCVOID;
; typedef char const* FPDF_LPCSTR;
; typedef int FPDF_RESULT;
; Duplex types
Enumeration FPDF_DUPLEXTYPE
#DuplexUndefined = 0
#Simplex
#DuplexFlipShortEdge
#DuplexFlipLongEdge
EndEnumeration
; String types
;typedef unsigned short FPDF_WCHAR;
;typedef unsigned char const* FPDF_LPCBYTE;
; FPDFSDK may use three types of strings: byte string, wide string (UTF-16LE
; encoded), and platform dependent string
;typedef const char* FPDF_BYTESTRING;
; FPDFSDK always uses UTF-16LE encoded wide strings, each character uses 2
; bytes (except surrogation), with the low byte first.
;typedef const unsigned short* FPDF_WIDESTRING;
; Structure for a byte string.
; Note, a byte string commonly means a UTF-16LE formated string.
Structure FPDF_BSTR
; String buffer.
*str
; Length of the string, in bytes.
len.l
EndStructure
; For Windows programmers: In most cases it's OK to treat FPDF_WIDESTRING as a
; Windows unicode string, however, special care needs to be taken if you
; expect to process Unicode larger than 0xffff.
;
; For Linux/Unix programmers: most compiler/library environments use 4 bytes
; for a Unicode character, and you have to convert between FPDF_WIDESTRING and
; system wide string by yourself.
;typedef const char* FPDF_STRING;
; Matrix for transformation.
Structure FS_MATRIX
a.f
b.f
c.f
d.f
e.f
f.f
EndStructure
; Rectangle area(float) in device or page coordinate system.
Structure FS_RECTF
; The x-coordinate of the left-top corner.
left.f
; The y-coordinate of the left-top corner.
top.f
; The x-coordinate of the right-bottom corner.
right.f
; The y-coordinate of the right-bottom corner.
bottom.f
EndStructure ;* FS_LPRECTF, FS_RECTF
; Const Pointer to FS_RECTF structure.
;typedef const FS_RECTF* FS_LPCRECTF;
; Process-wide options for initializing the library.
Structure FPDF_LIBRARY_CONFIG
; Version number of the interface. Currently must be 2.
version.l
; Array of paths to scan in place of the defaults when using built-in
; FXGE font loading code. The array is terminated by a NULL pointer.
; The Array may be NULL itself to use the default paths. May be ignored
; entirely depending upon the platform.
;*m_pUserFontPaths
; Version 2.
; pointer to the v8::Isolate to use, or NULL to force PDFium to create one.
;m_pIsolate;
; The embedder data slot to use in the v8::Isolate to store PDFium's
; per-isolate data. The value needs to be between 0 and
; v8::Internals::kNumIsolateDataLots (exclusive). Note that 0 is fine
; for most embedders.
m_v8EmbedderSlot.l;
EndStructure
Prototype.i m_GetBlock(*param, position.i, *pBuf, size.i)
; Structure for custom file access.
Structure FPDF_FILEACCESS
; File length, in bytes.
m_FileLen.i
; A function pointer for getting a block of data from a specific position.
; Position is specified by byte offset from the beginning of the file.
; The position and size will never go out of range of the file length.
; It may be possible for FPDFSDK to call this function multiple times for
; the same position.
; Return value: should be non-zero if successful, zero for error.
fptr.m_GetBlock ;Int (*m_GetBlock)(void* param, unsigned long position, unsigned char* pBuf, unsigned long size);
; A custom pointer for all implementation specific data. This pointer will
; be used as the first parameter to the m_GetBlock callback.
*m_Param;
EndStructure
Prototype Release(*clientData)
Prototype.l GetSize(*clientData)
Prototype.l ReadBlock(*clientData, offset.i, *buffer, size.i)
Prototype.l WriteBlock(*clientData, offset.i, *buffer, size.i)
Prototype.l Flush(*clientData)
Prototype.l Truncate(*clientData, size.i)
;
; Structure For file reading Or writing (I/O).
;
; This is a handler And should be implemented by callers.
;
Structure FPDF_FILEHANDLER
;
; User-defined Data.
; Callers can use this field To track controls.
;
;clientData;
;
; Callback function To release the current file stream object.
; param[in] clientData Pointer To user-defined Data.
; return None.
;
fptr0.Release ;void (*Release)(FPDF_LPVOID clientData);
;
; Callback function To retrieve the current file stream size.
; param[in] clientData Pointer To user-defined Data.
; return Size of file stream.
;
fptr1.GetSize ;FPDF_DWORD (*GetSize)(FPDF_LPVOID clientData)
;
; Callback function To Read Data from the current file stream.
; param[in] clientData Pointer To user-defined Data.
; param[in] offset Offset position starts from the beginning of file stream. This parameter indicates reading position.
; param[in] buffer Memory buffer To store Data which are Read from file stream. This parameter should Not be <b>NULL</b>.
; param[in] size Size of Data which should be Read from file stream, in bytes. The buffer indicated by the parameter <i>buffer</i>
; should be enough To store specified Data.
; return 0 For success, other value For failure.
;
fptr2.ReadBlock ;(*ReadBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPVOID buffer, FPDF_DWORD size)
;
; Callback function To write Data into the current file stream.
; param[in] clientData Pointer To user-defined Data.
; param[in] offset Offset position starts from the beginning of file stream. This parameter indicates writing position.
; param[in] buffer Memory buffer contains Data which is written into file stream. This parameter should Not be <b>NULL</b>.
; param[in] size Size of Data which should be written into file stream, in bytes.
; return 0 For success, other value For failure.
;
fptr3.WriteBlock ;FPDF_RESULT (*WriteBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPCVOID buffer, FPDF_DWORD size);
;
; Callback function To flush all internal accessing buffers.
; param[in] clientData Pointer To user-defined Data.
; return 0 For success, other value For failure.
;
fptr4.Flush ;FPDF_RESULT (*Flush)(FPDF_LPVOID clientData);
;
; Callback function To change file size. details This function is called under writing mode usually. Implementer can determine whether To realize it based on application requests.
; param[in] clientData Pointer To user-defined Data.
; param[in] size New size of file stream, in bytes.
; return 0 For success, other value For failure.
;
fptr5.Truncate ;FPDF_RESULT (*Truncate)(FPDF_LPVOID clientData, FPDF_DWORD size);
EndStructure ; FPDF_FILEHANDLER,;FPDF_LPFILEHANDLER;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; prototype.l IsDataAvail(*pThis.FX_FILEAVAIL, offset.i, size.i)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Prototype.l IsDataAvail(*pThis, offset.i, size.i)
; Interface for checking whether sections of the file are available.
Structure FX_FILEAVAIL
; Version number of the interface. Must be 1.
version.l
; Reports if the specified data section is currently available. A section is
; available if all bytes in the section are available.
;
; Interface Version: 1
; Implementation Required: Yes
;
; pThis - pointer to the interface structure.
; offset - the offset of the data section in the file.
; size - the size of the data section.
;
; Returns true if the specified data section at |offset| of |size|
; is available.
fptr.IsDataAvail ; FPDF_BOOL (*IsDataAvail)(structure _FX_FILEAVAIL* pThis, size_t offset, size_t size);
EndStructure ;FX_FILEAVAIL
;typedef void* FPDF_AVAIL;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;prototype AddSegment(*pThis.FX_DOWNLOADHINTS, offset.i, size.i)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Prototype AddSegment(*pThis, offset.i, size.i)
; Download hints interface. Used to receive hints for further downloading.
Structure FX_DOWNLOADHINTS
; Version number of the interface. Must be 1.
version.l
; Add a section to be downloaded.
;
; Interface Version: 1
; Implementation Required: Yes
;
; pThis - pointer to the interface structure.
; offset - the offset of the hint reported to be downloaded.
; size - the size of the hint reported to be downloaded.
;
; The |offset| and |size| of the section may not be unique. Part of the
; section might be already available. The download manager must deal with
; overlapping sections.
fptr.AddSegment; void (*AddSegment)(structure _FX_DOWNLOADHINTS* pThis, size_t offset, size_t size);
EndStructure
Structure FS_QUADPOINTSF
x1.f
y1.f
x2.f
y2.f
x3.f
y3.f
x4.f
y4.f
EndStructure
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;prototype FSDK_UnSupport_Handler(*pThis.UNSUPPORT_INFO, nType.l)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Prototype FSDK_UnSupport_Handler(*pThis, nType.l)
; Interface for unsupported feature notifications.
Structure UNSUPPORT_INFO
; Version number of the interface. Must be 1.
version.l
; Unsupported object notification function.
; Interface Version: 1
; Implementation Required: Yes
;
; pThis - pointer to the interface structure.
; nType - the type of unsupported object. One of the |FPDF_UNSP_*| entries.
fptr.FSDK_UnSupport_Handler ; void (*FSDK_UnSupport_Handler)(structure _UNSUPPORT_INFO* pThis, int nType);
EndStructure
;typedef void* FPDF_FORMHANDLE;
; Prototype.l app_alert(*pThis.IPDF_JsPlatform, *Msg.string, *Title.string, Type.l, Icon.l);
; Prototype app_beep(*pThis.IPDF_JsPlatform, nType.l)
; Prototype.l app_response(*pThis.IPDF_JsPlatform, *Question.string, *Title.string, *Default.string, *cLabel.string, bPassword.l, void* response, int length)
; Prototype.l Doc_getFilePath(*pThis.IPDF_JsPlatform, *filePath, length.l)
; Prototype Doc_mail(*pThis.IPDF_JsPlatform, *mailData, length.l, bUI.l, *To.string, *Subject.string, *CC.string, *BCC.string, *Msg.string)
; Prototype Doc_print(*pThis.IPDF_JsPlatform, bUI.l, nStart.l, int nEnd, bSilent.l, bShrinkToFit.l, bPrintAsImage.l, bReverse.l, bAnnotations.l);
; Prototype Doc_submitForm(*pThis.IPDF_JsPlatform, *formData, length.l, *URL.string)
; Prototype Doc_gotoPage(*pThis.IPDF_JsPlatform, nPageNum.l)
; Prototype.l Field_browse(*pThis.IPDF_JsPlatform, *filePath, length.l)
Prototype.l app_alert(*pThis, *Msg.string, *Title.string, Type.l, Icon.l);
Prototype app_beep(*pThis, nType.l)
Prototype.l app_response(*pThis, *Question.string, *Title.string, *Default.string, *cLabel.string, bPassword.l, *response, length.l)
Prototype.l Doc_getFilePath(*pThis, *filePath, length.l)
Prototype Doc_mail(*pThis, *mailData, length.l, bUI.l, *To.string, *Subject.string, *CC.string, *BCC.string, *Msg.string)
Prototype Doc_print(*pThis, bUI.l, nStart.l, nEnd.l, bSilent.l, bShrinkToFit.l, bPrintAsImage.l, bReverse.l, bAnnotations.l)
Prototype Doc_submitForm(*pThis, *formData, length.l, *URL.string)
Prototype Doc_gotoPage(*pThis, nPageNum.l)
Prototype.l Field_browse(*pThis, *filePath, length.l)
Structure IPDF_JSPLATFORM ;IPDF_JsPlatform
;
; Version number of the Interface. Currently must be 2.
;
version.l
; Version 1.
;
; Method: app_alert
; pop up a dialog To show warning Or hint.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself
; Msg - A string containing the message To be displayed.
; Title - The title of the dialog.
; Type - The stype of button group.
; 0-OK(Default);
; 1-OK,Cancel;
; 2-Yes,NO;
; 3-Yes, NO, Cancel.
; nIcon - The Icon type.
; 0-Error(Default);
; 1-Warning;
; 2-Question;
; 3-Status.
; 4-Asterisk
; Return Value:
; The Return value could be the folowing type:
; 1-OK;
; 2-Cancel;
; 3-NO;
; 4-Yes;
;
fptr.app_alert ;Int (*app_alert)(structure _IPDF_JsPlatform* pThis, FPDF_WIDESTRING Msg, FPDF_WIDESTRING Title, int Type, int Icon);
;
; Method: app_beep
; Causes the system To play a sound.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself
; nType - The sound type.
; 0 - Error
; 1 - Warning
; 2 - Question
; 3 - Status
; 4 - Default (Default value)
; Return Value:
; None
;
fptr1.app_beep ; void (*app_beep)(structure _IPDF_JsPlatform* pThis, int nType);
;
; Method: app_response
; Displays a dialog box containing a question And an entry field For
; the user To reply To the question.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself
; Question - The question To be posed To the user.
; Title - The title of the dialog box.
; Default - A Default value For the answer To the question. If
; Not specified, no Default value is presented.
; cLabel - A short string To appear in front of And on the
; same line As the edit text field.
; bPassword - If true, indicates that the user's response should
; show As asterisks (*) Or bullets (?) To mask the response, which might be
; sensitive information. The Default is false.
; response - A string buffer allocated by SDK, To receive the
; user's response.
; length - The length of the buffer, number of bytes.
; Currently, It's always be 2048.
; Return Value:
; Number of bytes the complete user input would actually require, Not
; including trailing zeros, regardless of the value of the length
; parameter Or the presence of the response buffer.
; Comments:
; No matter on what platform, the response buffer should be always
; written using UTF-16LE encoding. If a response buffer is
; present And the size of the user input exceeds the capacity of the
; buffer As specified by the length parameter, only the
; first "length" bytes of the user input are To be written To the
; buffer.
;
fptr2.app_response ; Int (*app_response)(structure _IPDF_JsPlatform* pThis, FPDF_WIDESTRING Question, FPDF_WIDESTRING Title, FPDF_WIDESTRING Default, FPDF_WIDESTRING cLabel, FPDF_BOOL bPassword, void* response, int length);
;
; Method: Doc_getFilePath
; Get the file path of the current document.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself
; filePath - The string buffer To receive the file path. Can be
; NULL.
; length - The length of the buffer, number of bytes. Can be
; 0.
; Return Value:
; Number of bytes the filePath consumes, including trailing zeros.
; Comments:
; The filePath should be always input in local encoding.
;
; The Return value always indicated number of bytes required For the
; buffer, even when there is
; no buffer specified, Or the buffer size is less then required. In this
; Case, the buffer will Not
; be modified.
;
fptr3.Doc_getFilePath ; Int (*Doc_getFilePath)(structure _IPDF_JsPlatform* pThis, void* filePath, int length);
;
; Method: Doc_mail
; Mails the Data buffer As an attachment To all recipients, With Or
; without user interaction.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself
; mailData - Pointer To the Data buffer To be sent.Can be NULL.
; length - The size,in bytes, of the buffer pointed by
; mailData parameter.Can be 0.
; bUI - If true, the rest of the parameters are used in a
; compose-new-message window that is displayed To the user. If false, the cTo
; parameter is required And all others are optional.
; To - A semicolon-delimited List of recipients For the
; message.
; Subject - The subject of the message. The length limit is 64
; KB.
; CC - A semicolon-delimited List of CC recipients For
; the message.
; BCC - A semicolon-delimited List of BCC recipients For
; the message.
; Msg - The content of the message. The length limit is 64
; KB.
; Return Value:
; None.
; Comments:
; If the parameter mailData is NULL Or length is 0, the current
; document will be mailed As an attachment To all recipients.
;
fptr4.Doc_mail ; void (*Doc_mail)(structure _IPDF_JsPlatform* pThis, void* mailData, int length, FPDF_BOOL bUI, FPDF_WIDESTRING To, FPDF_WIDESTRING Subject, FPDF_WIDESTRING CC, FPDF_WIDESTRING BCC, FPDF_WIDESTRING Msg);
;
; Method: Doc_print
; Prints all Or a specific number of pages of the document.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; bUI - If true, will cause a UI To be presented To the
; user To obtain printing information And confirm the action.
; nStart - A 0-based index that defines the start of an
; inclusive range of pages.
; nEnd - A 0-based index that defines the End of an
; inclusive page range.
; bSilent - If true, suppresses the cancel dialog box While
; the document is printing. The Default is false.
; bShrinkToFit - If true, the page is shrunk (If necessary) To
; fit within the imageable area of the printed page.
; bPrintAsImage - If true, print pages As an image.
; bReverse - If true, print from nEnd To nStart.
; bAnnotations - If true (the Default), annotations are
; printed.
;
fptr5.Doc_print ; void (*Doc_print)(structure _IPDF_JsPlatform* pThis, FPDF_BOOL bUI, int nStart, int nEnd, FPDF_BOOL bSilent, FPDF_BOOL bShrinkToFit, FPDF_BOOL bPrintAsImage, FPDF_BOOL bReverse, FPDF_BOOL bAnnotations);
;
; Method: Doc_submitForm
; Send the form Data To a specified URL.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself
; formData - Pointer To the Data buffer To be sent.
; length - The size,in bytes, of the buffer pointed by
; formData parameter.
; URL - The URL To send To.
; Return Value:
; None.
;
;
fptr6.Doc_submitForm ; void (*Doc_submitForm)(structure _IPDF_JsPlatform* pThis, void* formData, int length, FPDF_WIDESTRING URL);
;
; Method: Doc_gotoPage
; Jump To a specified page.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself
; nPageNum - The specified page number, zero For the first
; page.
; Return Value:
; None.
;
;
fptr7.Doc_gotoPage ; void (*Doc_gotoPage)(structure _IPDF_JsPlatform* pThis, int nPageNum);
;
; Method: Field_browse
; Show a file selection dialog, And Return the selected file path.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; filePath - Pointer To the Data buffer To receive the file
; path.Can be NULL.
; length - The length of the buffer, number of bytes. Can be
; 0.
; Return Value:
; Number of bytes the filePath consumes, including trailing zeros.
; Comments:
; The filePath shoule be always input in local encoding.
;
fptr8.Field_browse ; Int (*Field_browse)(structure _IPDF_JsPlatform* pThis, void* filePath, int length);
;
; pointer To FPDF_FORMFILLINFO Interface.
;
*m_pFormfillinfo;
; Version 2.
*m_isolate; ; Unused in v3, retain for compatibility.
m_v8EmbedderSlot.l ; Unused in v3, retain for compatibility.
; Version 3.
; Version 3 moves m_Isolate And m_v8EmbedderSlot To FPDF_LIBRARY_CONFIG.
EndStructure
; Declares of a structure type To the local system time.
Structure FPDF_SYSTEMTIME
wYear.l ; years since 1900
wMonth.l ; months since January - [0,11]
wDayOfWeek.l ; days since Sunday - [0,6]
wDay.l ; day of the month - [1,31]
wHour.l ; hours since midnight - [0,23]
wMinute.l ; minutes after the hour - [0,59]
wSecond.l ; seconds after the minute - [0,59]
wMilliseconds.l ; milliseconds after the second - [0,999]
EndStructure
Prototype lpTimerFunc(); TimerCallback lpTimerFunc
Prototype ReleaseFORMFILLINFO(*pThis)
Prototype FFI_Invalidate(*pThis, *page, left.d, top.d, right.d, bottom.d)
Prototype FFI_OutputSelectedRect(*pThis, *page, left.d, top.d, right.d, bottom.d)
Prototype FFI_SetCursor(*pThis, nCursorType.l)
Prototype.l FFI_SetTimer(*pThis, uElapse.l, TimerCallback.lpTimerFunc)
Prototype FFI_KillTimer(*pThis, nTimerID.l)
Prototype.i FFI_GetLocalTime(*pThis)
Prototype FFI_OnChange(*pThis)
Prototype.i FFI_GetPage(*pThis, *document, nPageIndex.l)
Prototype.i FFI_GetCurrentPage(*pThis, *document)
Prototype.l FFI_GetRotation(*pThis, *page)
Prototype FFI_ExecuteNamedAction(*pThis, *namedAction.string)
Prototype FFI_SetTextFieldFocus(*pThis, *stringvalue.string, valueLen.i, is_focus.l)
Prototype FFI_DoURIAction(*pThis, *bsURI.p-ascii)
Prototype FFI_DoGoToAction(*pThis, nPageIndex.l, zoomMode.l, *fPosArray.float, sizeofArray.l)
Prototype FFI_DisplayCaret(*pThis, *page, bVisible.l, left.d, top.d, right.d, bottom.d)
Prototype.l FFI_GetCurrentPageIndex(*pThis, *document)
Prototype FFI_SetCurrentPage(*pThis, *document, iCurPage.l)
Prototype FFI_GotoURL(*pThis, *document, *wsURL.string)
Prototype FFI_GetPageViewRect(*pThis, *page, *left.double, *top.double, *right.double, *bottom.double)
Prototype FFI_PageEvent(*pThis, page_count.l, event_type.i)
Prototype.l FFI_PopupMenu(*pThis, *page, *hWidget, menuFlag.l, x.f, y.f)
Prototype.i FFI_OpenFile(*pThis, fileFlag.l, *wsURL.string, mode.p-ascii)
Prototype FFI_EmailTo(*pThis, *fileHandler.FPDF_FILEHANDLER, *pTo.string, *pSubject.string, *pCC.string, *pBcc.string, *pMsg.string)
Prototype FFI_UploadTo(*pThis, *fileHandler.FPDF_FILEHANDLER, fileFlag.l, *uploadTo.string)
Prototype.l FFI_GetPlatform(*pThis, *platform, length.l)
Prototype.l FFI_GetLanguage(*pThis, *language, length.l)
Prototype.i FFI_DownloadFromURL(*pThis, *URL.string)
Prototype.l FFI_PostRequestURL(*pThis, *wsURL.string, *wsData.string, *wsContentType.string, *wsEncode.string, *wsHeader.string, *respone.FPDF_BSTR)
Prototype.l FFI_PutRequestURL(*pThis, *wsURL.string, *wsData.string, *wsEncode.string)
Structure FPDF_FORMFILLINFO
;
; Version number of the Interface. Currently must be 1 (when PDFium is built
; without the XFA Module) Or must be 2 (when built With the XFA Module).
;
version.l
; Version 1.
;
;Method: Release
; Give implementation a chance To release any Data after the
; Interface is no longer used
;Interface Version:
; 1
;Implementation Required:
; No
;Comments:
; Called by Foxit SDK during the final cleanup process.
;Parameters:
; pThis - Pointer To the Interface Structure itself
;Return Value:
; None
;
fptr.ReleaseFORMFILLINFO ; void (*ReleaseFORMFILLINFO)(structure _FPDF_FORMFILLINFO* pThis);
;
; Method: FFI_Invalidate
; Invalidate the client area within the specified rectangle.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; page - Handle To the page. Returned by FPDF_LoadPage
;function.
; left - Left position of the client area in PDF page
;coordinate.
; top - Top position of the client area in PDF page
;coordinate.
; right - Right position of the client area in PDF page
;coordinate.
; bottom - Bottom position of the client area in PDF page
;coordinate.
; Return Value:
; None.
;
;comments:
; All positions are measured in PDF "user space".
; Implementation should call FPDF_RenderPageBitmap() function For
;repainting a specified page area.
;
fptr1.FFI_Invalidate ; void (*FFI_Invalidate)(structure _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, double left, double top, double right, double bottom);
;
; Method: FFI_OutputSelectedRect
; When user is taking the mouse To Select texts on a form field, * this callback function will keep
; returning the selected areas To the implementation.
;
; Interface Version:
; 1
; Implementation Required:
; No
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; page - Handle To the page. Returned by FPDF_LoadPage
; function.
; left - Left position of the client area in PDF page
; coordinate.
; top - Top position of the client area in PDF page
; coordinate.
; right - Right position of the client area in PDF page
; coordinate.
; bottom - Bottom position of the client area in PDF page
; coordinate.
; Return Value:
; None.
;
; comments:
; This CALLBACK function is useful For implementing special text
; selection effect. Implementation should
; first records the returned rectangles, then draw them one by one
; at the painting period, last,remove all
; the recorded rectangles when finish painting.
;
fptr2.FFI_OutputSelectedRect ; void (*FFI_OutputSelectedRect)(structure _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, double left, double top, double right, double bottom);
;
; Method: FFI_SetCursor
; Set the Cursor shape.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; nCursorType - Cursor type. see Flags For Cursor type For the
; details.
; Return value:
; None.
;
fptr3.FFI_SetCursor ; void (*FFI_SetCursor)(structure _FPDF_FORMFILLINFO* pThis, int nCursorType);
;
; Method: FFI_SetTimer
; This method installs a system timer. An interval value is specified, * And every time that interval elapses, the system must call into the
; callback function With the timer ID As returned by this function.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; uElapse - Specifies the time-out value, in milliseconds.
; lpTimerFunc - A pointer To the callback function-TimerCallback.
; Return value:
; The timer identifier of the new timer If the function is successful.
; An application passes this value To the FFI_KillTimer method To kill
; the timer. Nonzero If it is successful; otherwise, it is zero.
;
fptr4.FFI_SetTimer ; Int (*FFI_SetTimer)(structure _FPDF_FORMFILLINFO* pThis, int uElapse, TimerCallback lpTimerFunc);
;
; Method: FFI_KillTimer
; This method uninstalls a system timer identified by nIDEvent, As
; set by an earlier call To FFI_SetTimer.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; nTimerID - The timer ID returned by FFI_SetTimer function.
; Return value:
; None.
;
fptr5.FFI_KillTimer ; void (*FFI_KillTimer)(structure _FPDF_FORMFILLINFO* pThis, int nTimerID);
;
; Method: FFI_GetLocalTime
; This method receives the current local time on the system.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; Return value:
; None.
;
fptr6.FFI_GetLocalTime ; FPDF_SYSTEMTIME (*FFI_GetLocalTime)(structure _FPDF_FORMFILLINFO* pThis);
;
; Method: FFI_OnChange
; This method will be invoked To notify implementation when the
; value of any FormField on the document had been changed.
; Interface Version:
; 1
; Implementation Required:
; no
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; Return value:
; None.
;
fptr7.FFI_OnChange ; void (*FFI_OnChange)(structure _FPDF_FORMFILLINFO* pThis);
;
; Method: FFI_GetPage
; This method receives the page pointer associated With a specified
; page index.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; document - Handle To document. Returned by FPDF_LoadDocument
; function.
; nPageIndex - Index number of the page. 0 For the first page.
; Return value:
; Handle To the page. Returned by FPDF_LoadPage function.
; Comments:
; In some cases, the document-level JavaScript action may refer To a
; page which hadn't been loaded yet.
; To successfully run the javascript action, implementation need To load
; the page For SDK.
;
fptr8.FFI_GetPage ; FPDF_PAGE (*FFI_GetPage)(structure _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document, int nPageIndex);
;
; Method: FFI_GetCurrentPage
; This method receives the current page pointer.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; document - Handle To document. Returned by FPDF_LoadDocument
; function.
; Return value:
; Handle To the page. Returned by FPDF_LoadPage function.
;
fptr9.FFI_GetCurrentPage ; FPDF_PAGE (*FFI_GetCurrentPage)(structure _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document);
;
; Method: FFI_GetRotation
; This method receives currently rotation of the page view.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; page - Handle To page. Returned by FPDF_LoadPage function.
; Return value:
; The page rotation. Should be 0(0 degree),1(90 degree),2(180
; degree),3(270 degree), in a clockwise direction.
;
; Note: Unused.
;
fptr10.FFI_GetRotation ; Int (*FFI_GetRotation)(structure _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page);
;
; Method: FFI_ExecuteNamedAction
; This method will execute an named action.
; Interface Version:
; 1
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; namedAction - A byte string which indicates the named action, * terminated by 0.
; Return value:
; None.
; Comments:
; See the named actions description of <<PDF Reference, version 1.7>>
; For more details.
;
fptr11.FFI_ExecuteNamedAction ; void (*FFI_ExecuteNamedAction)(structure _FPDF_FORMFILLINFO* pThis, FPDF_BYTESTRING namedAction);
;
; @brief This method will be called when a text field is getting Or losing a
; focus.
;
; @param[in] pThis Pointer To the Interface Structure itself.
; @param[in] value The string value of the form field, in UTF-16LE
; format.
; @param[in] valueLen The length of the string value, number of characters
; (Not bytes).
; @param[in] is_focus True If the form field is getting a focus, False For
; losing a focus.
;
; @return None.
;
; @note Currently,only support text field And combobox field.
;
fptr12.FFI_SetTextFieldFocus ; void (*FFI_SetTextFieldFocus)(structure _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING value, FPDF_DWORD valueLen, FPDF_BOOL is_focus);
;
; Method: FFI_DoURIAction
; This action resolves To a uniform resource identifier.
; Interface Version:
; 1
; Implementation Required:
; No
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; bsURI - A byte string which indicates the uniform resource
; identifier, terminated by 0.
; Return value:
; None.
; Comments:
; See the URI actions description of <<PDF Reference, version 1.7>> For
; more details.
;
fptr13.FFI_DoURIAction ; void (*FFI_DoURIAction)(structure _FPDF_FORMFILLINFO* pThis, FPDF_BYTESTRING bsURI);
;
; Method: FFI_DoGoToAction
; This action changes the view To a specified destination.
; Interface Version:
; 1
; Implementation Required:
; No
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; nPageIndex - The index of the PDF page.
; zoomMode - The zoom mode For viewing page. See below.
; fPosArray - The float Array which carries the position info.
; sizeofArray - The size of float Array.
;
; PDFZoom values:
; - XYZ = 1
; - FITPAGE = 2
; - FITHORZ = 3
; - FITVERT = 4
; - FITRECT = 5
; - FITBBOX = 6
; - FITBHORZ = 7
; - FITBVERT = 8
;
; Return value:
; None.
; Comments:
; See the Destinations description of <<PDF Reference, version 1.7>> in
;8.2.1 For more details.
;
fptr14.FFI_DoGoToAction ; void (*FFI_DoGoToAction)(structure _FPDF_FORMFILLINFO* pThis, int nPageIndex, int zoomMode, float* fPosArray, int sizeofArray);
;
; pointer To IPDF_JSPLATFORM Interface
;
*m_pJsPlatform.IPDF_JSPLATFORM;
; Version 2.
;
; Method: FFI_DisplayCaret
; This method will show the caret at specified position.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; page - Handle To page. Returned by FPDF_LoadPage
;function.
; left - Left position of the client area in PDF page
;coordinate.
; top - Top position of the client area in PDF page
;coordinate.
; right - Right position of the client area in PDF page
;coordinate.
; bottom - Bottom position of the client area in PDF page
;coordinate.
; Return value:
; None.
;
fptr15.FFI_DisplayCaret ; void (*FFI_DisplayCaret)(structure _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, FPDF_BOOL bVisible, double left, double top, double right, double bottom);
;
; Method: FFI_GetCurrentPageIndex
; This method will get the current page index.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; document - Handle To document. Returned by FPDF_LoadDocument
;function.
; Return value:
; The index of current page.
;
fptr16.FFI_GetCurrentPageIndex ; Int (*FFI_GetCurrentPageIndex)(structure _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document);
;
; Method: FFI_SetCurrentPage
; This method will set the current page.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; document - Handle To document. Returned by FPDF_LoadDocument
;function.
; iCurPage - The index of the PDF page.
; Return value:
; None.
;
fptr17.FFI_SetCurrentPage ; void (*FFI_SetCurrentPage)(structure _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document, int iCurPage);
;
; Method: FFI_GotoURL
; This method will link To the specified URL.
; Interface Version:
; 2
; Implementation Required:
; no
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; document - Handle To document. Returned by FPDF_LoadDocument
;function.
; wsURL - The string value of the URL, in UTF-16LE format.
; Return value:
; None.
;
fptr18.FFI_GotoURL ; void (*FFI_GotoURL)(structure _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document, FPDF_WIDESTRING wsURL);
;
; Method: FFI_GetPageViewRect
; This method will get the current page view rectangle.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; page - Handle To page. Returned by FPDF_LoadPage
;function.
; left - The pointer To receive left position of the page
;view area in PDF page coordinate.
; top - The pointer To receive top position of the page
;view area in PDF page coordinate.
; right - The pointer To receive right position of the
;client area in PDF page coordinate.
; bottom - The pointer To receive bottom position of the
;client area in PDF page coordinate.
; Return value:
; None.
;
fptr19.FFI_GetPageViewRect ; void (*FFI_GetPageViewRect)(structure _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, double* left, double* top, double* right, double* bottom);
;
; Method: FFI_PageEvent
; This method fires when pages have been added To Or deleted from the XFA
; document.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; page_count - The number of pages To be added To Or deleted from the
; document.
; event_type - See FXFA_PAGEVIEWEVENT_* above.
; Return value:
; None.
; Comments:
; The pages To be added Or deleted always start from the last page
; of document. This means that If parameter page_count is 2 And
; event type is FXFA_PAGEVIEWEVENT_POSTADDED, 2 new pages have been
; appended To the tail of document; If page_count is 2 and
; event type is FXFA_PAGEVIEWEVENT_POSTREMOVED, the last 2 pages
; have been deleted.
;
fptr20.FFI_PageEvent ; void (*FFI_PageEvent)(structure _FPDF_FORMFILLINFO* pThis, int page_count, FPDF_DWORD event_type);
;
; Method: FFI_PopupMenu
; This method will track the right context menu For XFA fields.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; page - Handle To page. Returned by FPDF_LoadPage
;function.
; hWidget - Handle To XFA fields.
; menuFlag - The menu flags. Please refer To Macro definition
;of FXFA_MENU_XXX And this can be one Or a combination of these macros.
; x - X position of the client area in PDF page
;coordinate.
; y - Y position of the client area in PDF page
;coordinate.
; Return value:
; TRUE indicates success; otherwise false.
;
fptr21.FFI_PopupMenu ; FPDF_BOOL (*FFI_PopupMenu)(structure _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, FPDF_WIDGET hWidget, int menuFlag, float x, float y);
;
; Method: FFI_OpenFile
; This method will open the specified file With the specified mode.
; Interface Version
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; fileFlag - The file flag.Please refer To Macro definition of
;FXFA_SAVEAS_XXX And this can be one of these macros.
; wsURL - The string value of the file URL, in UTF-16LE
;format.
; mode - The mode For open file.
; Return value:
; The handle To FPDF_FILEHANDLER.
;
fptr22.FFI_OpenFile ; FPDF_FILEHANDLER* (*FFI_OpenFile)(structure _FPDF_FORMFILLINFO* pThis, int fileFlag, FPDF_WIDESTRING wsURL, const char* mode);
;
; Method: FFI_EmailTo
; This method will email the specified file stream To the specified
;contacter.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; pFileHandler - Handle To the FPDF_FILEHANDLER.
; pTo - A semicolon-delimited List of recipients For the
;message,in UTF-16LE format.
; pSubject - The subject of the message,in UTF-16LE format.
; pCC - A semicolon-delimited List of CC recipients For
;the message,in UTF-16LE format.
; pBcc - A semicolon-delimited List of BCC recipients For
;the message,in UTF-16LE format.
; pMsg - Pointer To the Data buffer To be sent.Can be
;NULL,in UTF-16LE format.
; Return value:
; None.
;
fptr23.FFI_EmailTo ; void (*FFI_EmailTo)(structure _FPDF_FORMFILLINFO* pThis, FPDF_FILEHANDLER* fileHandler, FPDF_WIDESTRING pTo, FPDF_WIDESTRING pSubject, FPDF_WIDESTRING pCC, FPDF_WIDESTRING pBcc, FPDF_WIDESTRING pMsg);
;
; Method: FFI_UploadTo
; This method will get upload the specified file stream To the
;specified URL.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; pFileHandler - Handle To the FPDF_FILEHANDLER.
; fileFlag - The file flag.Please refer To Macro definition of
;FXFA_SAVEAS_XXX And this can be one of these macros.
; uploadTo - Pointer To the URL path, in UTF-16LE format.
; Return value:
; None.
;
fptr24.FFI_UploadTo ; void (*FFI_UploadTo)(structure _FPDF_FORMFILLINFO* pThis, FPDF_FILEHANDLER* fileHandler, int fileFlag, FPDF_WIDESTRING uploadTo);
;
; Method: FFI_GetPlatform
; This method will get the current platform.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; platform - Pointer To the Data buffer To receive the
;platform.Can be NULL,in UTF-16LE format.
; length - The length of the buffer, number of bytes. Can be
;0.
; Return value:
; The length of the buffer, number of bytes.
;
fptr25.FFI_GetPlatform ; Int (*FFI_GetPlatform)(structure _FPDF_FORMFILLINFO* pThis, void* platform, int length);
;
; Method: FFI_GetLanguage
; This method will get the current language.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; language - Pointer To the Data buffer To receive the current
;language.Can be NULL.
; length - The length of the buffer, number of bytes. Can be
;0.
; Return value:
; The length of the buffer, number of bytes.
;
fptr26.FFI_GetLanguage ; Int (*FFI_GetLanguage)(structure _FPDF_FORMFILLINFO* pThis, void* language, int length);
;
; Method: FFI_DownloadFromURL
; This method will download the specified file from the URL.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; URL - The string value of the file URL, in UTF-16LE
;format.
; Return value:
; The handle To FPDF_FILEHANDLER.
;
fptr27.FFI_DownloadFromURL ; FPDF_LPFILEHANDLER (*FFI_DownloadFromURL)(structure _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING URL);
;
; Method: FFI_PostRequestURL
; This method will post the request To the server URL.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; wsURL - The string value of the server URL, in UTF-16LE
;format.
; wsData - The post Data,in UTF-16LE format.
; wsContentType - The content type of the request Data,in UTF-16LE
;format.
; wsEncode - The encode type,in UTF-16LE format.
; wsHeader - The request header,in UTF-16LE format.
; response - Pointer To the FPDF_BSTR To receive the response
;data from server,,in UTF-16LE format.
; Return value:
; TRUE indicates success, otherwise FALSE.
;
fptr28.FFI_PostRequestURL ; FPDF_BOOL (*FFI_PostRequestURL)(structure _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsContentType, FPDF_WIDESTRING wsEncode, FPDF_WIDESTRING wsHeader, FPDF_BSTR* respone);
;
; Method: FFI_PutRequestURL
; This method will put the request To the server URL.
; Interface Version:
; 2
; Implementation Required:
; yes
; Parameters:
; pThis - Pointer To the Interface Structure itself.
; wsURL - The string value of the server URL, in UTF-16LE
;format.
; wsData - The put Data, in UTF-16LE format.
; wsEncode - The encode type, in UTR-16LE format.
; Return value:
; TRUE indicates success, otherwise FALSE.
;
fptr29.FFI_PutRequestURL ; FPDF_BOOL (*FFI_PutRequestURL)(structure _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsEncode);
EndStructure ; FPDF_FORMFILLINFO
;typedef int FPDF_INT32;
;typedef unsigned int FPDF_UINT32;
;typedef float FPDF_FLOAT;
; Event types.
Enumeration FWL_EVENTTYPE
#FWL_EVENTTYPE_Mouse = 0
#FWL_EVENTTYPE_MouseWheel
#FWL_EVENTTYPE_Key
EndEnumeration
; Key flags.
Enumeration FWL_EVENTFLAG
#FWL_EVENTFLAG_ShiftKey = 1 << 0
#FWL_EVENTFLAG_ControlKey = 1 << 1
#FWL_EVENTFLAG_AltKey = 1 << 2
#FWL_EVENTFLAG_MetaKey = 1 << 3
#FWL_EVENTFLAG_KeyPad = 1 << 4
#FWL_EVENTFLAG_AutoRepeat = 1 << 5
#FWL_EVENTFLAG_LeftButtonDown = 1 << 6
#FWL_EVENTFLAG_MiddleButtonDown = 1 << 7
#FWL_EVENTFLAG_RightButtonDown = 1 << 8
EndEnumeration
; Mouse messages.
Enumeration FWL_EVENT_MOUSECMD
#FWL_EVENTMOUSECMD_LButtonDown = 1
#FWL_EVENTMOUSECMD_LButtonUp
#FWL_EVENTMOUSECMD_LButtonDblClk
#FWL_EVENTMOUSECMD_RButtonDown
#FWL_EVENTMOUSECMD_RButtonUp
#FWL_EVENTMOUSECMD_RButtonDblClk
#FWL_EVENTMOUSECMD_MButtonDown
#FWL_EVENTMOUSECMD_MButtonUp
#FWL_EVENTMOUSECMD_MButtonDblClk
#FWL_EVENTMOUSECMD_MouseMove
#FWL_EVENTMOUSECMD_MouseEnter
#FWL_EVENTMOUSECMD_MouseHover
#FWL_EVENTMOUSECMD_MouseLeave
EndEnumeration
; Mouse events.
Structure FWL_EVENT_MOUSE
command.l;
flag.i;
x.f;
y.f;
EndStructure
; Mouse wheel events.
Structure FWL_EVENT_MOUSEWHEEL
flag.i;
x.f;
y.f;
deltaX.f;
deltaY.f;
EndStructure