OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef PUBLIC_FPDF_FORMFILL_H_ | 7 #ifndef PUBLIC_FPDF_FORMFILL_H_ |
8 #define PUBLIC_FPDF_FORMFILL_H_ | 8 #define PUBLIC_FPDF_FORMFILL_H_ |
9 | 9 |
10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
11 | 11 |
12 typedef void* FPDF_FORMHANDLE; | 12 typedef void* FPDF_FORMHANDLE; |
13 | 13 |
| 14 #ifdef PDF_ENABLE_XFA |
14 #define DOCTYPE_PDF 0 // Normal pdf Document | 15 #define DOCTYPE_PDF 0 // Normal pdf Document |
15 #define DOCTYPE_DYNAMIC_XFA 1 // Dynamic xfa Document Type | 16 #define DOCTYPE_DYNAMIC_XFA 1 // Dynamic xfa Document Type |
16 #define DOCTYPE_STATIC_XFA 2 // Static xfa Document Type | 17 #define DOCTYPE_STATIC_XFA 2 // Static xfa Document Type |
| 18 #endif // PDF_ENABLE_XFA |
17 | 19 |
18 // Exported Functions | 20 // Exported Functions |
19 #ifdef __cplusplus | 21 #ifdef __cplusplus |
20 extern "C" { | 22 extern "C" { |
21 #endif | 23 #endif |
22 | 24 |
23 typedef struct _IPDF_JsPlatform { | 25 typedef struct _IPDF_JsPlatform { |
24 /** | 26 /** |
25 * Version number of the interface. Currently must be 2. | 27 * Version number of the interface. Currently must be 2. |
26 **/ | 28 **/ |
(...skipping 16 matching lines...) Expand all Loading... |
43 * 0-OK(default); | 45 * 0-OK(default); |
44 * 1-OK,Cancel; | 46 * 1-OK,Cancel; |
45 * 2-Yes,NO; | 47 * 2-Yes,NO; |
46 * 3-Yes, NO, Cancel. | 48 * 3-Yes, NO, Cancel. |
47 * nIcon - The Icon type. | 49 * nIcon - The Icon type. |
48 * 0-Error(default); | 50 * 0-Error(default); |
49 * 1-Warning; | 51 * 1-Warning; |
50 * 2-Question; | 52 * 2-Question; |
51 * 3-Status. | 53 * 3-Status. |
52 * 4-Asterisk | 54 * 4-Asterisk |
53 | |
54 * Return Value: | 55 * Return Value: |
55 * The return value could be the folowing type: | 56 * The return value could be the folowing type: |
56 * 1-OK; | 57 * 1-OK; |
57 * 2-Cancel; | 58 * 2-Cancel; |
58 * 3-NO; | 59 * 3-NO; |
59 * 4-Yes; | 60 * 4-Yes; |
60 */ | 61 */ |
61 int (*app_alert)(struct _IPDF_JsPlatform* pThis, | 62 int (*app_alert)(struct _IPDF_JsPlatform* pThis, |
62 FPDF_WIDESTRING Msg, | 63 FPDF_WIDESTRING Msg, |
63 FPDF_WIDESTRING Title, | 64 FPDF_WIDESTRING Title, |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 unsigned short wYear; /* years since 1900 */ | 333 unsigned short wYear; /* years since 1900 */ |
333 unsigned short wMonth; /* months since January - [0,11] */ | 334 unsigned short wMonth; /* months since January - [0,11] */ |
334 unsigned short wDayOfWeek; /* days since Sunday - [0,6] */ | 335 unsigned short wDayOfWeek; /* days since Sunday - [0,6] */ |
335 unsigned short wDay; /* day of the month - [1,31] */ | 336 unsigned short wDay; /* day of the month - [1,31] */ |
336 unsigned short wHour; /* hours since midnight - [0,23] */ | 337 unsigned short wHour; /* hours since midnight - [0,23] */ |
337 unsigned short wMinute; /* minutes after the hour - [0,59] */ | 338 unsigned short wMinute; /* minutes after the hour - [0,59] */ |
338 unsigned short wSecond; /* seconds after the minute - [0,59] */ | 339 unsigned short wSecond; /* seconds after the minute - [0,59] */ |
339 unsigned short wMilliseconds; /* milliseconds after the second - [0,999] */ | 340 unsigned short wMilliseconds; /* milliseconds after the second - [0,999] */ |
340 } FPDF_SYSTEMTIME; | 341 } FPDF_SYSTEMTIME; |
341 | 342 |
| 343 #ifdef PDF_ENABLE_XFA |
342 // XFA | 344 // XFA |
343 /** | 345 /** |
344 * @name Pageview event flags | 346 * @name Pageview event flags |
345 */ | 347 */ |
346 /*@{*/ | 348 /*@{*/ |
347 /** @brief After a new pageview is added. */ | 349 /** @brief After a new pageview is added. */ |
348 #define FXFA_PAGEVIEWEVENT_POSTADDED 1 | 350 #define FXFA_PAGEVIEWEVENT_POSTADDED 1 |
349 /** @brief After a pageview is removed. */ | 351 /** @brief After a pageview is removed. */ |
350 #define FXFA_PAGEVIEWEVENT_POSTREMOVED 3 | 352 #define FXFA_PAGEVIEWEVENT_POSTREMOVED 3 |
351 /*@}*/ | 353 /*@}*/ |
(...skipping 12 matching lines...) Expand all Loading... |
364 /*@}*/ | 366 /*@}*/ |
365 | 367 |
366 // file type | 368 // file type |
367 /** | 369 /** |
368 * @name Macro Definitions for File Type. | 370 * @name Macro Definitions for File Type. |
369 */ | 371 */ |
370 /*@{*/ | 372 /*@{*/ |
371 #define FXFA_SAVEAS_XML 1 | 373 #define FXFA_SAVEAS_XML 1 |
372 #define FXFA_SAVEAS_XDP 2 | 374 #define FXFA_SAVEAS_XDP 2 |
373 /*@}*/ | 375 /*@}*/ |
| 376 #endif // PDF_ENABLE_XFA |
374 | 377 |
375 typedef struct _FPDF_FORMFILLINFO { | 378 typedef struct _FPDF_FORMFILLINFO { |
376 /** | 379 /** |
377 * Version number of the interface. Currently must be 2 (with XFA module). | 380 * Version number of the interface. Currently must be 1 (when PDFium is built |
| 381 * without the XFA module) or must be 2 (when built with the XFA module). |
378 **/ | 382 **/ |
379 int version; | 383 int version; |
380 | 384 |
| 385 /* Version 1. */ |
381 /** | 386 /** |
382 *Method: Release | 387 *Method: Release |
383 * Give implementation a chance to release any data after the interface | 388 * Give implementation a chance to release any data after the |
384 * is no longer used | 389 * interface is no longer used |
385 *Interface Version: | 390 *Interface Version: |
386 * 1 | 391 * 1 |
387 *Implementation Required: | 392 *Implementation Required: |
388 * No | 393 * No |
389 *Comments: | 394 *Comments: |
390 * Called by Foxit SDK during the final cleanup process. | 395 * Called by Foxit SDK during the final cleanup process. |
391 *Parameters: | 396 *Parameters: |
392 * pThis - Pointer to the interface structure itself | 397 * pThis - Pointer to the interface structure itself |
393 *Return Value: | 398 *Return Value: |
394 * None | 399 * None |
395 */ | 400 */ |
396 | |
397 void (*Release)(struct _FPDF_FORMFILLINFO* pThis); | 401 void (*Release)(struct _FPDF_FORMFILLINFO* pThis); |
398 | 402 |
399 /** | 403 /** |
400 * Method: FFI_Invalidate | 404 * Method: FFI_Invalidate |
401 * Invalidate the client area within the specified rectangle. | 405 * Invalidate the client area within the specified rectangle. |
402 * Interface Version: | 406 * Interface Version: |
403 * 1 | 407 * 1 |
404 * Implementation Required: | 408 * Implementation Required: |
405 * yes | 409 * yes |
406 * Parameters: | 410 * Parameters: |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 int nPageIndex, | 696 int nPageIndex, |
693 int zoomMode, | 697 int zoomMode, |
694 float* fPosArray, | 698 float* fPosArray, |
695 int sizeofArray); | 699 int sizeofArray); |
696 | 700 |
697 /** | 701 /** |
698 * pointer to IPDF_JSPLATFORM interface | 702 * pointer to IPDF_JSPLATFORM interface |
699 **/ | 703 **/ |
700 IPDF_JSPLATFORM* m_pJsPlatform; | 704 IPDF_JSPLATFORM* m_pJsPlatform; |
701 | 705 |
| 706 #ifdef PDF_ENABLE_XFA |
| 707 /* Version 2. */ |
702 /** | 708 /** |
703 * Method: FFI_DisplayCaret | 709 * Method: FFI_DisplayCaret |
704 * This method will show the caret at specified position. | 710 * This method will show the caret at specified position. |
705 * Interface Version: | 711 * Interface Version: |
706 * 1 | 712 * 1 |
707 * Implementation Required: | 713 * Implementation Required: |
708 * yes | 714 * yes |
709 * Parameters: | 715 * Parameters: |
710 * pThis - Pointer to the interface structure itself. | 716 * pThis - Pointer to the interface structure itself. |
711 * page - Handle to page. Returned by FPDF_LoadPage | 717 * page - Handle to page. Returned by FPDF_LoadPage |
712 *function. | 718 *function. |
713 * left - Left position of the client area in PDF page | 719 * left - Left position of the client area in PDF page |
714 *coordinate. | 720 *coordinate. |
715 * top - Top position of the client area in PDF page | 721 * top - Top position of the client area in PDF page |
716 *coordinate. | 722 *coordinate. |
717 * right - Right position of the client area in PDF page | 723 * right - Right position of the client area in PDF page |
718 *coordinate. | 724 *coordinate. |
719 * bottom - Bottom position of the client area in PDF page | 725 * bottom - Bottom position of the client area in PDF page |
720 *coordinate. | 726 *coordinate. |
721 * Return value: | 727 * Return value: |
722 * None. | 728 * None. |
723 **/ | 729 **/ |
724 void (*FFI_DisplayCaret)(struct _FPDF_FORMFILLINFO* pThis, | 730 void (*FFI_DisplayCaret)(struct _FPDF_FORMFILLINFO* pThis, |
725 FPDF_PAGE page, | 731 FPDF_PAGE page, |
726 FPDF_BOOL bVisible, | 732 FPDF_BOOL bVisible, |
727 double left, | 733 double left, |
728 double top, | 734 double top, |
729 double right, | 735 double right, |
730 double bottom); | 736 double bottom); |
| 737 |
731 /** | 738 /** |
732 * Method: FFI_GetCurrentPageIndex | 739 * Method: FFI_GetCurrentPageIndex |
733 * This method will get the current page index. | 740 * This method will get the current page index. |
734 * Interface Version: | 741 * Interface Version: |
735 * 1 | 742 * 1 |
736 * Implementation Required: | 743 * Implementation Required: |
737 * yes | 744 * yes |
738 * Parameters: | 745 * Parameters: |
739 * pThis - Pointer to the interface structure itself. | 746 * pThis - Pointer to the interface structure itself. |
740 * document - Handle to document. Returned by FPDF_LoadDocument | 747 * document - Handle to document. Returned by FPDF_LoadDocument |
741 *function. | 748 *function. |
742 * Return value: | 749 * Return value: |
743 * The index of current page. | 750 * The index of current page. |
744 **/ | 751 **/ |
745 int (*FFI_GetCurrentPageIndex)(struct _FPDF_FORMFILLINFO* pThis, | 752 int (*FFI_GetCurrentPageIndex)(struct _FPDF_FORMFILLINFO* pThis, |
746 FPDF_DOCUMENT document); | 753 FPDF_DOCUMENT document); |
| 754 |
747 /** | 755 /** |
748 * Method: FFI_SetCurrentPage | 756 * Method: FFI_SetCurrentPage |
749 * This method will set the current page. | 757 * This method will set the current page. |
750 * Interface Version: | 758 * Interface Version: |
751 * 1 | 759 * 1 |
752 * Implementation Required: | 760 * Implementation Required: |
753 * yes | 761 * yes |
754 * Parameters: | 762 * Parameters: |
755 * pThis - Pointer to the interface structure itself. | 763 * pThis - Pointer to the interface structure itself. |
756 * document - Handle to document. Returned by FPDF_LoadDocument | 764 * document - Handle to document. Returned by FPDF_LoadDocument |
757 *function. | 765 *function. |
758 * iCurPage - The index of the PDF page. | 766 * iCurPage - The index of the PDF page. |
759 * Return value: | 767 * Return value: |
760 * None. | 768 * None. |
761 **/ | 769 **/ |
762 void (*FFI_SetCurrentPage)(struct _FPDF_FORMFILLINFO* pThis, | 770 void (*FFI_SetCurrentPage)(struct _FPDF_FORMFILLINFO* pThis, |
763 FPDF_DOCUMENT document, | 771 FPDF_DOCUMENT document, |
764 int iCurPage); | 772 int iCurPage); |
| 773 |
765 /** | 774 /** |
766 * Method: FFI_GotoURL | 775 * Method: FFI_GotoURL |
767 * This method will link to the specified URL. | 776 * This method will link to the specified URL. |
768 * Interface Version: | 777 * Interface Version: |
769 * 1 | 778 * 1 |
770 * Implementation Required: | 779 * Implementation Required: |
771 * no | 780 * no |
772 * Parameters: | 781 * Parameters: |
773 * pThis - Pointer to the interface structure itself. | 782 * pThis - Pointer to the interface structure itself. |
774 * document - Handle to document. Returned by FPDF_LoadDocument | 783 * document - Handle to document. Returned by FPDF_LoadDocument |
775 *function. | 784 *function. |
776 * wsURL - The string value of the URL, in UTF-16LE format. | 785 * wsURL - The string value of the URL, in UTF-16LE format. |
777 * Return value: | 786 * Return value: |
778 * None. | 787 * None. |
779 **/ | 788 **/ |
780 void (*FFI_GotoURL)(struct _FPDF_FORMFILLINFO* pThis, | 789 void (*FFI_GotoURL)(struct _FPDF_FORMFILLINFO* pThis, |
781 FPDF_DOCUMENT document, | 790 FPDF_DOCUMENT document, |
782 FPDF_WIDESTRING wsURL); | 791 FPDF_WIDESTRING wsURL); |
| 792 |
783 /** | 793 /** |
784 * Method: FFI_GetPageViewRect | 794 * Method: FFI_GetPageViewRect |
785 * This method will get the current page view rectangle. | 795 * This method will get the current page view rectangle. |
786 * Interface Version: | 796 * Interface Version: |
787 * 1 | 797 * 1 |
788 * Implementation Required: | 798 * Implementation Required: |
789 * yes | 799 * yes |
790 * Parameters: | 800 * Parameters: |
791 * pThis - Pointer to the interface structure itself. | 801 * pThis - Pointer to the interface structure itself. |
792 * page - Handle to page. Returned by FPDF_LoadPage | 802 * page - Handle to page. Returned by FPDF_LoadPage |
(...skipping 30 matching lines...) Expand all Loading... |
823 * menuFlag - The menu flags. Please refer to macro definition | 833 * menuFlag - The menu flags. Please refer to macro definition |
824 *of FXFA_MEMU_XXX and this can be one or a combination of these macros. | 834 *of FXFA_MEMU_XXX and this can be one or a combination of these macros. |
825 * x - X position of the client area in PDF page | 835 * x - X position of the client area in PDF page |
826 *coordinate. | 836 *coordinate. |
827 * y - Y position of the client area in PDF page | 837 * y - Y position of the client area in PDF page |
828 *coordinate. | 838 *coordinate. |
829 * Return value: | 839 * Return value: |
830 * TRUE indicates success; otherwise false. | 840 * TRUE indicates success; otherwise false. |
831 **/ | 841 **/ |
832 FPDF_BOOL (*FFI_PopupMenu)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, F
PDF_WIDGET hWidget, int menuFlag, float x, float y); | 842 FPDF_BOOL (*FFI_PopupMenu)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, F
PDF_WIDGET hWidget, int menuFlag, float x, float y); |
| 843 |
833 /** | 844 /** |
834 * Method: FFI_OpenFile | 845 * Method: FFI_OpenFile |
835 * This method will open the specified file with the specified mode. | 846 * This method will open the specified file with the specified mode. |
836 * Interface Version | 847 * Interface Version |
837 * 1 | 848 * 1 |
838 * Implementation Required: | 849 * Implementation Required: |
839 * yes | 850 * yes |
840 * Parameters: | 851 * Parameters: |
841 * pThis - Pointer to the interface structure itself. | 852 * pThis - Pointer to the interface structure itself. |
842 * fileFlag - The file flag.Please refer to macro definition of | 853 * fileFlag - The file flag.Please refer to macro definition of |
843 *FXFA_SAVEAS_XXX and this can be one of these macros. | 854 *FXFA_SAVEAS_XXX and this can be one of these macros. |
844 * wsURL - The string value of the file URL, in UTF-16LE | 855 * wsURL - The string value of the file URL, in UTF-16LE |
845 *format. | 856 *format. |
846 * mode - The mode for open file. | 857 * mode - The mode for open file. |
847 * Return value: | 858 * Return value: |
848 * The handle to FPDF_FILEHANDLER. | 859 * The handle to FPDF_FILEHANDLER. |
849 **/ | 860 **/ |
850 FPDF_FILEHANDLER* (*FFI_OpenFile)(struct _FPDF_FORMFILLINFO* pThis, | 861 FPDF_FILEHANDLER* (*FFI_OpenFile)(struct _FPDF_FORMFILLINFO* pThis, |
851 int fileFlag, | 862 int fileFlag, |
852 FPDF_WIDESTRING wsURL, | 863 FPDF_WIDESTRING wsURL, |
853 const char* mode); | 864 const char* mode); |
| 865 |
854 /** | 866 /** |
855 * Method: FFI_EmailTo | 867 * Method: FFI_EmailTo |
856 * This method will email the specified file stream to the specified | 868 * This method will email the specified file stream to the specified |
857 *contacter. | 869 *contacter. |
858 * Interface Version: | 870 * Interface Version: |
859 * 1 | 871 * 1 |
860 * Implementation Required: | 872 * Implementation Required: |
861 * yes | 873 * yes |
862 * Parameters: | 874 * Parameters: |
863 * pThis - Pointer to the interface structure itself. | 875 * pThis - Pointer to the interface structure itself. |
(...skipping 10 matching lines...) Expand all Loading... |
874 * Return value: | 886 * Return value: |
875 * None. | 887 * None. |
876 **/ | 888 **/ |
877 void (*FFI_EmailTo)(struct _FPDF_FORMFILLINFO* pThis, | 889 void (*FFI_EmailTo)(struct _FPDF_FORMFILLINFO* pThis, |
878 FPDF_FILEHANDLER* fileHandler, | 890 FPDF_FILEHANDLER* fileHandler, |
879 FPDF_WIDESTRING pTo, | 891 FPDF_WIDESTRING pTo, |
880 FPDF_WIDESTRING pSubject, | 892 FPDF_WIDESTRING pSubject, |
881 FPDF_WIDESTRING pCC, | 893 FPDF_WIDESTRING pCC, |
882 FPDF_WIDESTRING pBcc, | 894 FPDF_WIDESTRING pBcc, |
883 FPDF_WIDESTRING pMsg); | 895 FPDF_WIDESTRING pMsg); |
| 896 |
884 /** | 897 /** |
885 * Method: FFI_UploadTo | 898 * Method: FFI_UploadTo |
886 * This method will get upload the specified file stream to the | 899 * This method will get upload the specified file stream to the |
887 *specified URL. | 900 *specified URL. |
888 * Interface Version: | 901 * Interface Version: |
889 * 1 | 902 * 1 |
890 * Implementation Required: | 903 * Implementation Required: |
891 * yes | 904 * yes |
892 * Parameters: | 905 * Parameters: |
893 * pThis - Pointer to the interface structure itself. | 906 * pThis - Pointer to the interface structure itself. |
(...skipping 21 matching lines...) Expand all Loading... |
915 * platform - Pointer to the data buffer to receive the | 928 * platform - Pointer to the data buffer to receive the |
916 *platform.Can be NULL,in UTF-16LE format. | 929 *platform.Can be NULL,in UTF-16LE format. |
917 * length - The length of the buffer, number of bytes. Can be | 930 * length - The length of the buffer, number of bytes. Can be |
918 *0. | 931 *0. |
919 * Return value: | 932 * Return value: |
920 * The length of the buffer, number of bytes. | 933 * The length of the buffer, number of bytes. |
921 **/ | 934 **/ |
922 int (*FFI_GetPlatform)(struct _FPDF_FORMFILLINFO* pThis, | 935 int (*FFI_GetPlatform)(struct _FPDF_FORMFILLINFO* pThis, |
923 void* platform, | 936 void* platform, |
924 int length); | 937 int length); |
| 938 |
925 /** | 939 /** |
926 * Method: FFI_GetLanguage | 940 * Method: FFI_GetLanguage |
927 * This method will get the current language. | 941 * This method will get the current language. |
928 * Interface Version: | 942 * Interface Version: |
929 * 1 | 943 * 1 |
930 * Implementation Required: | 944 * Implementation Required: |
931 * yes | 945 * yes |
932 * Parameters: | 946 * Parameters: |
933 * pThis - Pointer to the interface structure itself. | 947 * pThis - Pointer to the interface structure itself. |
934 * language - Pointer to the data buffer to receive the current | 948 * language - Pointer to the data buffer to receive the current |
935 *language.Can be NULL. | 949 *language.Can be NULL. |
936 * length - The length of the buffer, number of bytes. Can be | 950 * length - The length of the buffer, number of bytes. Can be |
937 *0. | 951 *0. |
938 * Return value: | 952 * Return value: |
939 * The length of the buffer, number of bytes. | 953 * The length of the buffer, number of bytes. |
940 **/ | 954 **/ |
941 int (*FFI_GetLanguage)(struct _FPDF_FORMFILLINFO* pThis, | 955 int (*FFI_GetLanguage)(struct _FPDF_FORMFILLINFO* pThis, |
942 void* language, | 956 void* language, |
943 int length); | 957 int length); |
| 958 |
944 /** | 959 /** |
945 * Method: FFI_DownloadFromURL | 960 * Method: FFI_DownloadFromURL |
946 * This method will download the specified file from the URL. | 961 * This method will download the specified file from the URL. |
947 * Interface Version: | 962 * Interface Version: |
948 * 1 | 963 * 1 |
949 * Implementation Required: | 964 * Implementation Required: |
950 * yes | 965 * yes |
951 * Parameters: | 966 * Parameters: |
952 * pThis - Pointer to the interface structure itself. | 967 * pThis - Pointer to the interface structure itself. |
953 * URL - The string value of the file URL, in UTF-16LE | 968 * URL - The string value of the file URL, in UTF-16LE |
(...skipping 17 matching lines...) Expand all Loading... |
971 * wsContentType - The content type of the request data,in UTF-16LE | 986 * wsContentType - The content type of the request data,in UTF-16LE |
972 *format. | 987 *format. |
973 * wsEncode - The encode type,in UTF-16LE format. | 988 * wsEncode - The encode type,in UTF-16LE format. |
974 * wsHeader - The request header,in UTF-16LE format. | 989 * wsHeader - The request header,in UTF-16LE format. |
975 * response - Pointer to the FPDF_BSTR to receive the response | 990 * response - Pointer to the FPDF_BSTR to receive the response |
976 *data from server,,in UTF-16LE format. | 991 *data from server,,in UTF-16LE format. |
977 * Return value: | 992 * Return value: |
978 * TRUE indicates success, otherwise FALSE. | 993 * TRUE indicates success, otherwise FALSE. |
979 **/ | 994 **/ |
980 FPDF_BOOL (*FFI_PostRequestURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDES
TRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsContentType, FPDF_WIDESTR
ING wsEncode, FPDF_WIDESTRING wsHeader, FPDF_BSTR* respone); | 995 FPDF_BOOL (*FFI_PostRequestURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDES
TRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsContentType, FPDF_WIDESTR
ING wsEncode, FPDF_WIDESTRING wsHeader, FPDF_BSTR* respone); |
| 996 |
981 /** | 997 /** |
982 * Method: FFI_PutRequestURL | 998 * Method: FFI_PutRequestURL |
983 * This method will put the request to the server URL. | 999 * This method will put the request to the server URL. |
984 * Interface Version: | 1000 * Interface Version: |
985 * 1 | 1001 * 1 |
986 * Implementation Required: | 1002 * Implementation Required: |
987 * yes | 1003 * yes |
988 * Parameters: | 1004 * Parameters: |
989 * pThis - Pointer to the interface structure itself. | 1005 * pThis - Pointer to the interface structure itself. |
990 * wsURL - The string value of the server URL, in UTF-16LE | 1006 * wsURL - The string value of the server URL, in UTF-16LE |
991 *format. | 1007 *format. |
992 * wsData - The put data, in UTF-16LE format. | 1008 * wsData - The put data, in UTF-16LE format. |
993 * wsEncode - The encode type, in UTR-16LE format. | 1009 * wsEncode - The encode type, in UTR-16LE format. |
994 * Return value: | 1010 * Return value: |
995 * TRUE indicates success, otherwise FALSE. | 1011 * TRUE indicates success, otherwise FALSE. |
996 **/ | 1012 **/ |
997 FPDF_BOOL (*FFI_PutRequestURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDEST
RING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsEncode); | 1013 FPDF_BOOL (*FFI_PutRequestURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDEST
RING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsEncode); |
| 1014 #endif // PDF_ENABLE_XFA |
998 | 1015 |
999 } FPDF_FORMFILLINFO; | 1016 } FPDF_FORMFILLINFO; |
1000 | 1017 |
1001 /** | 1018 /** |
1002 * Function: FPDFDOC_InitFormFillEnvironment | 1019 * Function: FPDFDOC_InitFormFillEnvironment |
1003 * Init form fill environment. | 1020 * Init form fill environment. |
1004 * Comments: | 1021 * Comments: |
1005 * This function should be called before any form fill operation. | 1022 * This function should be called before any form fill operation. |
1006 * Parameters: | 1023 * Parameters: |
1007 * document - Handle to document. Returned by | 1024 * document - Handle to document. Returned by |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 * page_y - Specifies the y-coordinate of the cursor in device. | 1222 * page_y - Specifies the y-coordinate of the cursor in device. |
1206 * Return Value: | 1223 * Return Value: |
1207 * TRUE indicates success; otherwise false. | 1224 * TRUE indicates success; otherwise false. |
1208 **/ | 1225 **/ |
1209 DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle, | 1226 DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle, |
1210 FPDF_PAGE page, | 1227 FPDF_PAGE page, |
1211 int modifier, | 1228 int modifier, |
1212 double page_x, | 1229 double page_x, |
1213 double page_y); | 1230 double page_y); |
1214 | 1231 |
| 1232 #ifdef PDF_ENABLE_XFA |
1215 DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonDown(FPDF_FORMHANDLE hHandle, | 1233 DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonDown(FPDF_FORMHANDLE hHandle, |
1216 FPDF_PAGE page, | 1234 FPDF_PAGE page, |
1217 int modifier, | 1235 int modifier, |
1218 double page_x, | 1236 double page_x, |
1219 double page_y); | 1237 double page_y); |
1220 DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonUp(FPDF_FORMHANDLE hHandle, | 1238 DLLEXPORT FPDF_BOOL STDCALL FORM_OnRButtonUp(FPDF_FORMHANDLE hHandle, |
1221 FPDF_PAGE page, | 1239 FPDF_PAGE page, |
1222 int modifier, | 1240 int modifier, |
1223 double page_x, | 1241 double page_x, |
1224 double page_y); | 1242 double page_y); |
| 1243 #endif // PDF_ENABLE_XFA |
1225 | 1244 |
1226 /** | 1245 /** |
1227 * Function: FORM_OnKeyDown | 1246 * Function: FORM_OnKeyDown |
1228 * You can call this member function when a nonsystem key is pressed. | 1247 * You can call this member function when a nonsystem key is pressed. |
1229 * Parameters: | 1248 * Parameters: |
1230 * hHandle - Handle to the form fill module. Returned by | 1249 * hHandle - Handle to the form fill module. Returned by |
1231 *FPDFDOC_InitFormFillEnvironment. | 1250 *FPDFDOC_InitFormFillEnvironment. |
1232 * page - Handle to the page. Returned by FPDF_LoadPage | 1251 * page - Handle to the page. Returned by FPDF_LoadPage |
1233 *function. | 1252 *function. |
1234 * nKeyCode - Indicates whether various virtual keys are down. | 1253 * nKeyCode - Indicates whether various virtual keys are down. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle); | 1315 DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle); |
1297 | 1316 |
1298 // Field Types | 1317 // Field Types |
1299 #define FPDF_FORMFIELD_UNKNOWN 0 // Unknown. | 1318 #define FPDF_FORMFIELD_UNKNOWN 0 // Unknown. |
1300 #define FPDF_FORMFIELD_PUSHBUTTON 1 // push button type. | 1319 #define FPDF_FORMFIELD_PUSHBUTTON 1 // push button type. |
1301 #define FPDF_FORMFIELD_CHECKBOX 2 // check box type. | 1320 #define FPDF_FORMFIELD_CHECKBOX 2 // check box type. |
1302 #define FPDF_FORMFIELD_RADIOBUTTON 3 // radio button type. | 1321 #define FPDF_FORMFIELD_RADIOBUTTON 3 // radio button type. |
1303 #define FPDF_FORMFIELD_COMBOBOX 4 // combo box type. | 1322 #define FPDF_FORMFIELD_COMBOBOX 4 // combo box type. |
1304 #define FPDF_FORMFIELD_LISTBOX 5 // list box type. | 1323 #define FPDF_FORMFIELD_LISTBOX 5 // list box type. |
1305 #define FPDF_FORMFIELD_TEXTFIELD 6 // text field type. | 1324 #define FPDF_FORMFIELD_TEXTFIELD 6 // text field type. |
| 1325 #ifdef PDF_ENABLE_XFA |
1306 #define FPDF_FORMFIELD_XFA 7 // text field type. | 1326 #define FPDF_FORMFIELD_XFA 7 // text field type. |
| 1327 #endif // PDF_ENABLE_XFA |
1307 | 1328 |
1308 /** | 1329 /** |
1309 * Function: FPDFPage_HasFormFieldAtPoint | 1330 * Function: FPDFPage_HasFormFieldAtPoint |
1310 * Get the form field type by point. | 1331 * Get the form field type by point. |
1311 * Parameters: | 1332 * Parameters: |
1312 * hHandle - Handle to the form fill module. Returned by | 1333 * hHandle - Handle to the form fill module. Returned by |
1313 * FPDFDOC_InitFormFillEnvironment(). | 1334 * FPDFDOC_InitFormFillEnvironment(). |
1314 * page - Handle to the page. Returned by FPDF_LoadPage(). | 1335 * page - Handle to the page. Returned by FPDF_LoadPage(). |
1315 * page_x - X position in PDF "user space". | 1336 * page_x - X position in PDF "user space". |
1316 * page_y - Y position in PDF "user space". | 1337 * page_y - Y position in PDF "user space". |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 **/ | 1465 **/ |
1445 DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, | 1466 DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, |
1446 FPDF_BITMAP bitmap, | 1467 FPDF_BITMAP bitmap, |
1447 FPDF_PAGE page, | 1468 FPDF_PAGE page, |
1448 int start_x, | 1469 int start_x, |
1449 int start_y, | 1470 int start_y, |
1450 int size_x, | 1471 int size_x, |
1451 int size_y, | 1472 int size_y, |
1452 int rotate, | 1473 int rotate, |
1453 int flags); | 1474 int flags); |
| 1475 |
| 1476 #ifdef PDF_ENABLE_XFA |
1454 /** | 1477 /** |
1455 * Function: FPDF_HasXFAField | 1478 * Function: FPDF_HasXFAField |
1456 * This method is designed to check whether a pdf document | 1479 * This method is designed to check whether a pdf document |
1457 *has XFA fields. | 1480 *has XFA fields. |
1458 * Parameters: | 1481 * Parameters: |
1459 * document - Handle to document. | 1482 * document - Handle to document. |
1460 *Returned by FPDF_LoadDocument function. | 1483 *Returned by FPDF_LoadDocument function. |
1461 * docType - Document type defined as | 1484 * docType - Document type defined as |
1462 *DOCTYPE_xxx. | 1485 *DOCTYPE_xxx. |
1463 * Return Value: | 1486 * Return Value: |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1656 * bsText - Pointer to data buffer of the text buffer, in | 1679 * bsText - Pointer to data buffer of the text buffer, in |
1657 *UTF-16LE format. | 1680 *UTF-16LE format. |
1658 * size - The byte size of data buffer. | 1681 * size - The byte size of data buffer. |
1659 * Return Value: | 1682 * Return Value: |
1660 * TRUE indicates success, otherwise FALSE. | 1683 * TRUE indicates success, otherwise FALSE. |
1661 **/ | 1684 **/ |
1662 DLLEXPORT FPDF_BOOL STDCALL | 1685 DLLEXPORT FPDF_BOOL STDCALL |
1663 FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringHandle, | 1686 FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringHandle, |
1664 FPDF_BYTESTRING bsText, | 1687 FPDF_BYTESTRING bsText, |
1665 FPDF_DWORD size); | 1688 FPDF_DWORD size); |
| 1689 #endif // PDF_ENABLE_XFA |
1666 | 1690 |
1667 #ifdef __cplusplus | 1691 #ifdef __cplusplus |
1668 } | 1692 } |
1669 #endif | 1693 #endif |
1670 | 1694 |
1671 #endif // PUBLIC_FPDF_FORMFILL_H_ | 1695 #endif // PUBLIC_FPDF_FORMFILL_H_ |
OLD | NEW |