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 | 7 |
8 #ifndef _FPDFORMFILL_H | 8 #ifndef _FPDFORMFILL_H |
9 #define _FPDFORMFILL_H | 9 #define _FPDFORMFILL_H |
10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 /** | 528 /** |
529 * pointer to IPDF_JSPLATFORM interface | 529 * pointer to IPDF_JSPLATFORM interface |
530 **/ | 530 **/ |
531 IPDF_JSPLATFORM* m_pJsPlatform; | 531 IPDF_JSPLATFORM* m_pJsPlatform; |
532 | 532 |
533 } FPDF_FORMFILLINFO; | 533 } FPDF_FORMFILLINFO; |
534 | 534 |
535 | 535 |
536 | 536 |
537 /** | 537 /** |
538 * Function: FPDFDOC_InitFormFillEnviroument | 538 * Function: FPDFDOC_InitFormFillEnvironment |
539 * Init form fill environment. | 539 * Init form fill environment. |
540 * Comments: | 540 * Comments: |
541 * This function should be called before any form fill oper
ation. | 541 * This function should be called before any form fill oper
ation. |
542 * Parameters: | 542 * Parameters: |
543 * document - Handle to document. Retu
rned by FPDF_LoadDocument function. | 543 * document - Handle to document. Retu
rned by FPDF_LoadDocument function. |
544 * pFormFillInfo - Pointer to a FPDF_FORMFILLINFO s
tructure. | 544 * pFormFillInfo - Pointer to a FPDF_FORMFILLINFO s
tructure. |
545 * Return Value: | 545 * Return Value: |
546 * Return handler to the form fill module. NULL means fails
. | 546 * Return handler to the form fill module. NULL means fails
. |
547 **/ | 547 **/ |
548 DLLEXPORT FPDF_FORMHANDLE STDCALL FPDFDOC_InitFormFillEnviroument(FPDF_DOCUMENT
document, FPDF_FORMFILLINFO* formInfo); | 548 DLLEXPORT FPDF_FORMHANDLE STDCALL FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT
document, FPDF_FORMFILLINFO* formInfo); |
549 | 549 |
550 /** | 550 /** |
551 * Function: FPDFDOC_ExitFormFillEnviroument | 551 * Function: FPDFDOC_ExitFormFillEnvironment |
552 * Exit form fill environment. | 552 * Exit form fill environment. |
553 * Parameters: | 553 * Parameters: |
554 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 554 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
555 * Return Value: | 555 * Return Value: |
556 * NULL. | 556 * NULL. |
557 **/ | 557 **/ |
558 DLLEXPORT void STDCALL FPDFDOC_ExitFormFillEnviroument(FPDF_FORMHANDLE hHandle); | 558 DLLEXPORT void STDCALL FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle); |
559 | 559 |
560 /** | 560 /** |
561 * Function: FORM_OnAfterLoadPage | 561 * Function: FORM_OnAfterLoadPage |
562 * This method is required for implementing all the form re
lated functions. Should be invoked after user | 562 * This method is required for implementing all the form re
lated functions. Should be invoked after user |
563 *» » » successfully loaded a PDF page, and method FPDFDOC_InitF
ormFillEnviroument had been invoked. | 563 *» » » successfully loaded a PDF page, and method FPDFDOC_InitF
ormFillEnvironment had been invoked. |
564 * Parameters: | 564 * Parameters: |
565 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 565 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
566 * Return Value: | 566 * Return Value: |
567 * NONE. | 567 * NONE. |
568 **/ | 568 **/ |
569 DLLEXPORT void STDCALL FORM_OnAfterLoadPage(FPDF_PAGE page, FPDF_FORMHANDLE hHan
dle); | 569 DLLEXPORT void STDCALL FORM_OnAfterLoadPage(FPDF_PAGE page, FPDF_FORMHANDLE hHan
dle); |
570 | 570 |
571 /** | 571 /** |
572 * Function: FORM_OnBeforeClosePage | 572 * Function: FORM_OnBeforeClosePage |
573 * This method is required for implementing all the form re
lated functions. Should be invoked before user | 573 * This method is required for implementing all the form re
lated functions. Should be invoked before user |
574 * close the PDF page. | 574 * close the PDF page. |
575 * Parameters: | 575 * Parameters: |
576 * page - Handle to the page. Returned by
FPDF_LoadPage function. | 576 * page - Handle to the page. Returned by
FPDF_LoadPage function. |
577 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 577 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
578 * Return Value: | 578 * Return Value: |
579 * NONE. | 579 * NONE. |
580 **/ | 580 **/ |
581 DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page, FPDF_FORMHANDLE hH
andle); | 581 DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page, FPDF_FORMHANDLE hH
andle); |
582 | 582 |
583 /** | 583 /** |
584 * Function: FORM_DoDocumentJSAction | 584 * Function: FORM_DoDocumentJSAction |
585 * This method is required for performing Document-level Ja
vaScript action. It should be invoked after the PDF document | 585 * This method is required for performing Document-level Ja
vaScript action. It should be invoked after the PDF document |
586 * had been loaded. | 586 * had been loaded. |
587 * Parameters: | 587 * Parameters: |
588 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 588 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
589 * Return Value: | 589 * Return Value: |
590 * NONE | 590 * NONE |
591 * Comments: | 591 * Comments: |
592 * If there is Document-level JavaScript action embedded in
the document, this method will execute the javascript action; | 592 * If there is Document-level JavaScript action embedded in
the document, this method will execute the javascript action; |
593 * otherwise, the method will do nothing. | 593 * otherwise, the method will do nothing. |
594 **/ | 594 **/ |
595 DLLEXPORT void STDCALL FORM_DoDocumentJSAction(FPDF_FORMHANDLE hHandle); | 595 DLLEXPORT void STDCALL FORM_DoDocumentJSAction(FPDF_FORMHANDLE hHandle); |
596 | 596 |
597 | 597 |
598 /** | 598 /** |
599 * Function: FORM_DoDocumentOpenAction | 599 * Function: FORM_DoDocumentOpenAction |
600 * This method is required for performing open-action when
the document is opened. | 600 * This method is required for performing open-action when
the document is opened. |
601 * Parameters: | 601 * Parameters: |
602 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 602 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
603 * Return Value: | 603 * Return Value: |
604 * NONE | 604 * NONE |
605 * Comments: | 605 * Comments: |
606 * This method will do nothing if there is no open-actions
embedded in the document. | 606 * This method will do nothing if there is no open-actions
embedded in the document. |
607 **/ | 607 **/ |
608 DLLEXPORT void STDCALL FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle); | 608 DLLEXPORT void STDCALL FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle); |
609 | 609 |
610 | 610 |
611 // additional actions type of document. | 611 // additional actions type of document. |
612 #define FPDFDOC_AACTION_WC 0x10 //WC, before closing doc
ument, JavaScript action. | 612 #define FPDFDOC_AACTION_WC 0x10 //WC, before closing doc
ument, JavaScript action. |
613 #define FPDFDOC_AACTION_WS 0x11 //WS, before saving docu
ment, JavaScript action. | 613 #define FPDFDOC_AACTION_WS 0x11 //WS, before saving docu
ment, JavaScript action. |
614 #define FPDFDOC_AACTION_DS 0x12 //DS, after saving docum
ent, JavaScript action. | 614 #define FPDFDOC_AACTION_DS 0x12 //DS, after saving docum
ent, JavaScript action. |
615 #define FPDFDOC_AACTION_WP 0x13 //WP, before printing do
cument, JavaScript action. | 615 #define FPDFDOC_AACTION_WP 0x13 //WP, before printing do
cument, JavaScript action. |
616 #define FPDFDOC_AACTION_DP 0x14 //DP, after printing doc
ument, JavaScript action. | 616 #define FPDFDOC_AACTION_DP 0x14 //DP, after printing doc
ument, JavaScript action. |
617 /** | 617 /** |
618 * Function: FORM_DoDocumentAAction | 618 * Function: FORM_DoDocumentAAction |
619 * This method is required for performing the document's ad
ditional-action. | 619 * This method is required for performing the document's ad
ditional-action. |
620 * Parameters: | 620 * Parameters: |
621 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 621 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
622 * aaType - The type of the additional-actions which
defined above. | 622 * aaType - The type of the additional-actions which
defined above. |
623 * Return Value: | 623 * Return Value: |
624 * NONE | 624 * NONE |
625 * Comments: | 625 * Comments: |
626 * This method will do nothing if there is no document addi
tional-action corresponding to the specified aaType. | 626 * This method will do nothing if there is no document addi
tional-action corresponding to the specified aaType. |
627 **/ | 627 **/ |
628 | 628 |
629 DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle, int aaTyp
e); | 629 DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle, int aaTyp
e); |
630 | 630 |
631 // Additional-action types of page object | 631 // Additional-action types of page object |
632 #define FPDFPAGE_AACTION_OPEN 0 // /O -- An action to be
performed when the page is opened | 632 #define FPDFPAGE_AACTION_OPEN 0 // /O -- An action to be
performed when the page is opened |
633 #define FPDFPAGE_AACTION_CLOSE 1 // /C -- An action to be
performed when the page is closed | 633 #define FPDFPAGE_AACTION_CLOSE 1 // /C -- An action to be
performed when the page is closed |
634 | 634 |
635 /** | 635 /** |
636 * Function: FORM_DoPageAAction | 636 * Function: FORM_DoPageAAction |
637 * This method is required for performing the page object's
additional-action when opened or closed. | 637 * This method is required for performing the page object's
additional-action when opened or closed. |
638 * Parameters: | 638 * Parameters: |
639 * page - Handle to the page. Returned by
FPDF_LoadPage function. | 639 * page - Handle to the page. Returned by
FPDF_LoadPage function. |
640 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 640 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
641 * aaType - The type of the page object's additional
-actions which defined above. | 641 * aaType - The type of the page object's additional
-actions which defined above. |
642 * Return Value: | 642 * Return Value: |
643 * NONE | 643 * NONE |
644 * Comments: | 644 * Comments: |
645 * This method will do nothing if no additional-action corr
esponding to the specified aaType exists. | 645 * This method will do nothing if no additional-action corr
esponding to the specified aaType exists. |
646 **/ | 646 **/ |
647 DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, FPDF_FORMHANDLE hHandl
e, int aaType); | 647 DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, FPDF_FORMHANDLE hHandl
e, int aaType); |
648 | 648 |
649 /** | 649 /** |
650 * Function: FORM_OnMouseMove | 650 * Function: FORM_OnMouseMove |
651 * You can call this member function when the mouse cursor
moves. | 651 * You can call this member function when the mouse cursor
moves. |
652 * Parameters: | 652 * Parameters: |
653 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 653 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
654 * page - Handle to the page. Returned by
FPDF_LoadPage function. | 654 * page - Handle to the page. Returned by
FPDF_LoadPage function. |
655 * modifier - Indicates whether variou
s virtual keys are down. | 655 * modifier - Indicates whether variou
s virtual keys are down. |
656 * page_x - Specifies the x-coordinate of th
e cursor in PDF user space. | 656 * page_x - Specifies the x-coordinate of th
e cursor in PDF user space. |
657 * page_y - Specifies the y-coordinate of th
e cursor in PDF user space. | 657 * page_y - Specifies the y-coordinate of th
e cursor in PDF user space. |
658 * Return Value: | 658 * Return Value: |
659 * TRUE indicates success; otherwise false. | 659 * TRUE indicates success; otherwise false. |
660 **/ | 660 **/ |
661 DLLEXPORT FPDF_BOOL STDCALL FORM_OnMouseMove(FPDF_FORMHANDLE hHandle,FPDF_PAGE p
age, int modifier, double page_x, double page_y); | 661 DLLEXPORT FPDF_BOOL STDCALL FORM_OnMouseMove(FPDF_FORMHANDLE hHandle,FPDF_PAGE p
age, int modifier, double page_x, double page_y); |
662 | 662 |
663 /** | 663 /** |
664 * Function: FORM_OnLButtonDown | 664 * Function: FORM_OnLButtonDown |
665 * You can call this member function when the user presses
the left mouse button. | 665 * You can call this member function when the user presses
the left mouse button. |
666 * Parameters: | 666 * Parameters: |
667 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 667 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
668 * page - Handle to the page. Returned by
FPDF_LoadPage function. | 668 * page - Handle to the page. Returned by
FPDF_LoadPage function. |
669 * modifier - Indicates whether variou
s virtual keys are down. | 669 * modifier - Indicates whether variou
s virtual keys are down. |
670 * page_x - Specifies the x-coordinate of th
e cursor in PDF user space. | 670 * page_x - Specifies the x-coordinate of th
e cursor in PDF user space. |
671 * page_y - Specifies the y-coordinate of th
e cursor in PDF user space. | 671 * page_y - Specifies the y-coordinate of th
e cursor in PDF user space. |
672 * Return Value: | 672 * Return Value: |
673 * TRUE indicates success; otherwise false. | 673 * TRUE indicates success; otherwise false. |
674 **/ | 674 **/ |
675 DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonDown(FPDF_FORMHANDLE hHandle,FPDF_PAGE
page, int modifier, double page_x, double page_y); | 675 DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonDown(FPDF_FORMHANDLE hHandle,FPDF_PAGE
page, int modifier, double page_x, double page_y); |
676 | 676 |
677 /** | 677 /** |
678 * Function: FORM_OnLButtonUp | 678 * Function: FORM_OnLButtonUp |
679 * You can call this member function when the user releases
the left mouse button. | 679 * You can call this member function when the user releases
the left mouse button. |
680 * Parameters: | 680 * Parameters: |
681 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 681 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
682 * page - Handle to the page. Returned by
FPDF_LoadPage function. | 682 * page - Handle to the page. Returned by
FPDF_LoadPage function. |
683 * modifier - Indicates whether various virtua
l keys are down. | 683 * modifier - Indicates whether various virtua
l keys are down. |
684 * page_x - Specifies the x-coordinate of th
e cursor in device. | 684 * page_x - Specifies the x-coordinate of th
e cursor in device. |
685 * page_y - Specifies the y-coordinate of th
e cursor in device. | 685 * page_y - Specifies the y-coordinate of th
e cursor in device. |
686 * Return Value: | 686 * Return Value: |
687 * TRUE indicates success; otherwise false. | 687 * TRUE indicates success; otherwise false. |
688 **/ | 688 **/ |
689 DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,FPDF_PAGE p
age, int modifier, double page_x, double page_y); | 689 DLLEXPORT FPDF_BOOL STDCALL FORM_OnLButtonUp(FPDF_FORMHANDLE hHandle,FPDF_PAGE p
age, int modifier, double page_x, double page_y); |
690 | 690 |
691 /** | 691 /** |
692 * Function: FORM_OnKeyDown | 692 * Function: FORM_OnKeyDown |
693 * You can call this member function when a nonsystem key i
s pressed. | 693 * You can call this member function when a nonsystem key i
s pressed. |
694 * Parameters: | 694 * Parameters: |
695 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 695 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
696 * page - Handle to the page. Returned by
FPDF_LoadPage function. | 696 * page - Handle to the page. Returned by
FPDF_LoadPage function. |
697 * nKeyCode - Indicates whether various virtua
l keys are down. | 697 * nKeyCode - Indicates whether various virtua
l keys are down. |
698 * modifier - Contains the scan code, key-tran
sition code, previous key state, and context code. | 698 * modifier - Contains the scan code, key-tran
sition code, previous key state, and context code. |
699 * Return Value: | 699 * Return Value: |
700 * TRUE indicates success; otherwise false. | 700 * TRUE indicates success; otherwise false. |
701 **/ | 701 **/ |
702 DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyDown(FPDF_FORMHANDLE hHandle,FPDF_PAGE pag
e, int nKeyCode, int modifier); | 702 DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyDown(FPDF_FORMHANDLE hHandle,FPDF_PAGE pag
e, int nKeyCode, int modifier); |
703 | 703 |
704 /** | 704 /** |
705 * Function: FORM_OnKeyUp | 705 * Function: FORM_OnKeyUp |
706 * You can call this member function when a nonsystem key i
s released. | 706 * You can call this member function when a nonsystem key i
s released. |
707 * Parameters: | 707 * Parameters: |
708 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 708 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
709 * page - Handle to the page. Returned by
FPDF_LoadPage function. | 709 * page - Handle to the page. Returned by
FPDF_LoadPage function. |
710 * nKeyCode - The virtual-key code of the give
n key. | 710 * nKeyCode - The virtual-key code of the give
n key. |
711 * modifier - Contains the scan code, key-tran
sition code, previous key state, and context code. | 711 * modifier - Contains the scan code, key-tran
sition code, previous key state, and context code. |
712 * Return Value: | 712 * Return Value: |
713 * TRUE indicates success; otherwise false. | 713 * TRUE indicates success; otherwise false. |
714 **/ | 714 **/ |
715 DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyUp(FPDF_FORMHANDLE hHandle,FPDF_PAGE page,
int nKeyCode, int modifier); | 715 DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyUp(FPDF_FORMHANDLE hHandle,FPDF_PAGE page,
int nKeyCode, int modifier); |
716 | 716 |
717 /** | 717 /** |
718 * Function: FORM_OnChar | 718 * Function: FORM_OnChar |
719 * You can call this member function when a keystroke trans
lates to a nonsystem character. | 719 * You can call this member function when a keystroke trans
lates to a nonsystem character. |
720 * Parameters: | 720 * Parameters: |
721 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 721 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
722 * page - Handle to the page. Returned by
FPDF_LoadPage function. | 722 * page - Handle to the page. Returned by
FPDF_LoadPage function. |
723 * nChar - The character code value of the
key. | 723 * nChar - The character code value of the
key. |
724 * modifier - Contains the scan code, key-tran
sition code, previous key state, and context code. | 724 * modifier - Contains the scan code, key-tran
sition code, previous key state, and context code. |
725 * Return Value: | 725 * Return Value: |
726 * TRUE indicates success; otherwise false. | 726 * TRUE indicates success; otherwise false. |
727 **/ | 727 **/ |
728 DLLEXPORT FPDF_BOOL STDCALL FORM_OnChar(FPDF_FORMHANDLE hHandle,FPDF_PAGE page,
int nChar, int modifier); | 728 DLLEXPORT FPDF_BOOL STDCALL FORM_OnChar(FPDF_FORMHANDLE hHandle,FPDF_PAGE page,
int nChar, int modifier); |
729 | 729 |
730 /** | 730 /** |
731 * Function: FORM_ForceToKillFocus. | 731 * Function: FORM_ForceToKillFocus. |
732 * You can call this member function to force to kill the f
ocus of the form field which got focus. | 732 * You can call this member function to force to kill the f
ocus of the form field which got focus. |
733 * It would kill the focus on the form field, save the valu
e of form field if it's changed by user. | 733 * It would kill the focus on the form field, save the valu
e of form field if it's changed by user. |
734 * Parameters: | 734 * Parameters: |
735 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 735 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
736 * Return Value: | 736 * Return Value: |
737 * TRUE indicates success; otherwise false. | 737 * TRUE indicates success; otherwise false. |
738 **/ | 738 **/ |
739 DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle); | 739 DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle); |
740 | 740 |
741 // Field Types | 741 // Field Types |
742 #define FPDF_FORMFIELD_UNKNOWN 0 // Unknown. | 742 #define FPDF_FORMFIELD_UNKNOWN 0 // Unknown. |
743 #define FPDF_FORMFIELD_PUSHBUTTON 1 // push button type. | 743 #define FPDF_FORMFIELD_PUSHBUTTON 1 // push button type. |
744 #define FPDF_FORMFIELD_CHECKBOX 2 // check box type. | 744 #define FPDF_FORMFIELD_CHECKBOX 2 // check box type. |
745 #define FPDF_FORMFIELD_RADIOBUTTON 3 // radio button type. | 745 #define FPDF_FORMFIELD_RADIOBUTTON 3 // radio button type. |
746 #define FPDF_FORMFIELD_COMBOBOX 4 // combo box type. | 746 #define FPDF_FORMFIELD_COMBOBOX 4 // combo box type. |
747 #define FPDF_FORMFIELD_LISTBOX 5 // list box type. | 747 #define FPDF_FORMFIELD_LISTBOX 5 // list box type. |
748 #define FPDF_FORMFIELD_TEXTFIELD 6 // text field type. | 748 #define FPDF_FORMFIELD_TEXTFIELD 6 // text field type. |
749 | 749 |
750 /** | 750 /** |
751 * Function: FPDPage_HasFormFieldAtPoint | 751 * Function: FPDPage_HasFormFieldAtPoint |
752 * Check the form filed position by point. | 752 * Check the form filed position by point. |
753 * Parameters: | 753 * Parameters: |
754 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 754 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
755 * page - Handle to the page. Returned by
FPDF_LoadPage function. | 755 * page - Handle to the page. Returned by
FPDF_LoadPage function. |
756 * page_x - X position in PDF "user space". | 756 * page_x - X position in PDF "user space". |
757 * page_y - Y position in PDF "user space". | 757 * page_y - Y position in PDF "user space". |
758 * Return Value: | 758 * Return Value: |
759 * Return the type of the formfiled; -1 indicates no fields
. | 759 * Return the type of the formfiled; -1 indicates no fields
. |
760 **/ | 760 **/ |
761 DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,FPDF_P
AGE page,double page_x, double page_y); | 761 DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,FPDF_P
AGE page,double page_x, double page_y); |
762 | 762 |
763 /** | 763 /** |
764 * Function: FPDF_SetFormFieldHighlightColor | 764 * Function: FPDF_SetFormFieldHighlightColor |
765 * Set the highlight color of specified or all the form fie
lds in the document. | 765 * Set the highlight color of specified or all the form fie
lds in the document. |
766 * Parameters: | 766 * Parameters: |
767 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 767 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
768 * doc - Handle to the document.
Returned by FPDF_LoadDocument function. | 768 * doc - Handle to the document.
Returned by FPDF_LoadDocument function. |
769 * fieldType - A 32-bit integer indicating the
type of a form field(defined above). | 769 * fieldType - A 32-bit integer indicating the
type of a form field(defined above). |
770 * color - The highlight color of the form
field.Constructed by 0xxxrrggbb. | 770 * color - The highlight color of the form
field.Constructed by 0xxxrrggbb. |
771 * Return Value: | 771 * Return Value: |
772 * NONE. | 772 * NONE. |
773 * Comments: | 773 * Comments: |
774 * When the parameter fieldType is set to zero, the highlig
ht color will be applied to all the form fields in the | 774 * When the parameter fieldType is set to zero, the highlig
ht color will be applied to all the form fields in the |
775 * document. | 775 * document. |
776 * Please refresh the client window to show the highlight i
mmediately if necessary. | 776 * Please refresh the client window to show the highlight i
mmediately if necessary. |
777 **/ | 777 **/ |
778 DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightColor(FPDF_FORMHANDLE hHandle,
int fieldType, unsigned long color); | 778 DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightColor(FPDF_FORMHANDLE hHandle,
int fieldType, unsigned long color); |
779 | 779 |
780 /** | 780 /** |
781 * Function: FPDF_SetFormFieldHighlightAlpha | 781 * Function: FPDF_SetFormFieldHighlightAlpha |
782 * Set the transparency of the form field highlight color i
n the document. | 782 * Set the transparency of the form field highlight color i
n the document. |
783 * Parameters: | 783 * Parameters: |
784 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 784 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
785 * doc - Handle to the document.
Returned by FPDF_LoadDocument function. | 785 * doc - Handle to the document.
Returned by FPDF_LoadDocument function. |
786 * alpha - The transparency of the form fie
ld highlight color. between 0-255. | 786 * alpha - The transparency of the form fie
ld highlight color. between 0-255. |
787 * Return Value: | 787 * Return Value: |
788 * NONE. | 788 * NONE. |
789 **/ | 789 **/ |
790 DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightAlpha(FPDF_FORMHANDLE hHandle,
unsigned char alpha); | 790 DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightAlpha(FPDF_FORMHANDLE hHandle,
unsigned char alpha); |
791 | 791 |
792 | 792 |
793 /** | 793 /** |
794 * Function: FPDF_RemoveFormFieldHighlight | 794 * Function: FPDF_RemoveFormFieldHighlight |
795 * Remove the form field highlight color in the document. | 795 * Remove the form field highlight color in the document. |
796 * Parameters: | 796 * Parameters: |
797 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 797 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
798 * Return Value: | 798 * Return Value: |
799 * NONE. | 799 * NONE. |
800 * Comments: | 800 * Comments: |
801 * Please refresh the client window to remove the highlight
immediately if necessary. | 801 * Please refresh the client window to remove the highlight
immediately if necessary. |
802 **/ | 802 **/ |
803 DLLEXPORT void STDCALL FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle); | 803 DLLEXPORT void STDCALL FPDF_RemoveFormFieldHighlight(FPDF_FORMHANDLE hHandle); |
804 | 804 |
805 /** | 805 /** |
806 * Function: FPDF_FFLDraw | 806 * Function: FPDF_FFLDraw |
807 * Render FormFeilds on a page to a device independent bitm
ap. | 807 * Render FormFeilds on a page to a device independent bitm
ap. |
808 * Parameters: | 808 * Parameters: |
809 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnviroument. | 809 *» » » hHandle»» -» Handle to the form fill module.
Returned by FPDFDOC_InitFormFillEnvironment. |
810 * bitmap - Handle to the device independent
bitmap (as the output buffer). | 810 * bitmap - Handle to the device independent
bitmap (as the output buffer). |
811 * Bitmap handle can be cre
ated by FPDFBitmap_Create function. | 811 * Bitmap handle can be cre
ated by FPDFBitmap_Create function. |
812 * page - Handle to the page. Returned by
FPDF_LoadPage function. | 812 * page - Handle to the page. Returned by
FPDF_LoadPage function. |
813 * start_x - Left pixel position of the displ
ay area in the device coordinate. | 813 * start_x - Left pixel position of the displ
ay area in the device coordinate. |
814 * start_y - Top pixel position of the displa
y area in the device coordinate. | 814 * start_y - Top pixel position of the displa
y area in the device coordinate. |
815 * size_x - Horizontal size (in pixels) for
displaying the page. | 815 * size_x - Horizontal size (in pixels) for
displaying the page. |
816 * size_y - Vertical size (in pixels) for di
splaying the page. | 816 * size_y - Vertical size (in pixels) for di
splaying the page. |
817 * rotate - Page orientation: 0 (normal), 1
(rotated 90 degrees clockwise), | 817 * rotate - Page orientation: 0 (normal), 1
(rotated 90 degrees clockwise), |
818 * 2 (rotated 180 d
egrees), 3 (rotated 90 degrees counter-clockwise). | 818 * 2 (rotated 180 d
egrees), 3 (rotated 90 degrees counter-clockwise). |
819 * flags - 0 for normal display, or combina
tion of flags defined above. | 819 * flags - 0 for normal display, or combina
tion of flags defined above. |
820 * Return Value: | 820 * Return Value: |
821 * None. | 821 * None. |
822 * Comments: | 822 * Comments: |
823 * This method is designed to only render annotations and F
ormFields on the page. | 823 * This method is designed to only render annotations and F
ormFields on the page. |
824 * Without FPDF_ANNOT specified for flags, Rendering functi
ons such as FPDF_RenderPageBitmap or FPDF_RenderPageBitmap_Start will only rende
r page contents(without annotations) to a bitmap. | 824 * Without FPDF_ANNOT specified for flags, Rendering functi
ons such as FPDF_RenderPageBitmap or FPDF_RenderPageBitmap_Start will only rende
r page contents(without annotations) to a bitmap. |
825 * In order to implement the FormFill functions,Implementat
ion should call this method after rendering functions finish rendering the page
contents. | 825 * In order to implement the FormFill functions,Implementat
ion should call this method after rendering functions finish rendering the page
contents. |
826 **/ | 826 **/ |
827 DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,FPDF_BITMAP bitmap,
FPDF_PAGE page, int start_x, int start_y, | 827 DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,FPDF_BITMAP bitmap,
FPDF_PAGE page, int start_x, int start_y, |
828 int size_x, int size_y, int rota
te, int flags); | 828 int size_x, int size_y, int rota
te, int flags); |
829 | 829 |
830 | 830 |
831 | 831 |
832 #ifdef __cplusplus | 832 #ifdef __cplusplus |
833 }; | 833 }; |
834 #endif | 834 #endif |
835 | 835 |
836 #endif //_FPDFORMFILL_H | 836 #endif //_FPDFORMFILL_H |
837 | 837 |
OLD | NEW |