Chromium Code Reviews| 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 _FPDFVIEW_H_ | 8 #ifndef _FPDFVIEW_H_ |
| 9 #define _FPDFVIEW_H_ | 9 #define _FPDFVIEW_H_ |
| 10 | 10 |
| 11 #include <string> | |
| 11 #if defined(_WIN32) && !defined(__WINDOWS__) | 12 #if defined(_WIN32) && !defined(__WINDOWS__) |
| 12 #include <windows.h> | 13 #include <windows.h> |
| 13 #endif | 14 #endif |
| 14 | 15 |
| 15 // Data types | 16 // Data types |
| 16 typedef void* FPDF_MODULEMGR; | 17 typedef void* FPDF_MODULEMGR; |
| 17 | 18 |
| 18 // PDF types | 19 // PDF types |
| 19 typedef void* FPDF_DOCUMENT; | 20 typedef void* FPDF_DOCUMENT; |
| 20 typedef void* FPDF_PAGE; | 21 typedef void* FPDF_PAGE; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 #endif | 117 #endif |
| 117 | 118 |
| 118 extern const char g_ExpireDate[]; | 119 extern const char g_ExpireDate[]; |
| 119 extern const char g_ModuleCodes[]; | 120 extern const char g_ModuleCodes[]; |
| 120 | 121 |
| 121 // Exported Functions | 122 // Exported Functions |
| 122 #ifdef __cplusplus | 123 #ifdef __cplusplus |
| 123 extern "C" { | 124 extern "C" { |
| 124 #endif | 125 #endif |
| 125 | 126 |
| 127 #ifndef _FPDF_DEF_STR_ | |
| 128 #define _FPDF_DEF_STR_ | |
| 129 // brief Structure for byte string. | |
| 130 // note In SDK, a byte string commonly means a UTF-16LE format string. | |
| 131 typedef struct | |
| 132 { | |
| 133 char* str; | |
| 134 int len; | |
| 135 } FPDF_BSTR; | |
| 136 #endif | |
| 137 | |
| 126 // Function: FPDF_InitLibrary | 138 // Function: FPDF_InitLibrary |
| 127 // Initialize the FPDFSDK library | 139 // Initialize the FPDFSDK library |
| 128 // Parameters: | 140 // Parameters: |
| 129 // None | 141 // None |
| 130 // Return value: | 142 // Return value: |
| 131 // None. | 143 // None. |
| 132 // Comments: | 144 // Comments: |
| 133 // You have to call this function before you can call any P DF processing functions. | 145 // You have to call this function before you can call any P DF processing functions. |
| 134 | 146 |
| 135 DLLEXPORT void STDCALL FPDF_InitLibrary(); | 147 DLLEXPORT void STDCALL FPDF_InitLibrary(); |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 595 | 607 |
| 596 // Function: FPDF_VIEWERREF_GetDuplex | 608 // Function: FPDF_VIEWERREF_GetDuplex |
| 597 // Returns the paper handling option to be used when printi ng from print dialog. | 609 // Returns the paper handling option to be used when printi ng from print dialog. |
| 598 // Parameters: | 610 // Parameters: |
| 599 // document - Handle to the loaded document. | 611 // document - Handle to the loaded document. |
| 600 // Return value: | 612 // Return value: |
| 601 // The paper handling option to be used when printing. | 613 // The paper handling option to be used when printing. |
| 602 // | 614 // |
| 603 DLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT documen t); | 615 DLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT documen t); |
| 604 | 616 |
| 617 // Function: FPDF_CountNamedDests | |
| 618 // Get the count of named destinations in the PDF document. | |
| 619 // Parameters: | |
| 620 // document - Handle to a document | |
| 621 // Return value: | |
| 622 // The count of named destinations. | |
| 623 DLLEXPORT FPDF_DWORD STDCALL FPDF_CountNamedDests(FPDF_DOCUMENT document); | |
| 624 | |
| 605 // Function: FPDF_GetNamedDestByName | 625 // Function: FPDF_GetNamedDestByName |
| 606 // get a special dest handle by the index. | 626 // get a special dest handle by the index. |
| 607 // Parameters: | 627 // Parameters: |
| 608 // document - Handle to the loaded document. | 628 // document - Handle to the loaded document. |
| 609 // name - The name of a special named dest . | 629 // name - The name of a special named dest . |
| 610 // Return value: | 630 // Return value: |
| 611 // The handle of the dest. | 631 // The handle of the dest. |
| 612 // | 632 // |
| 613 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_ BYTESTRING name); | 633 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_ BYTESTRING name); |
| 614 | 634 |
| 635 // Function: FPDF_GetNamedDest | |
| 636 // Get the specified named destinations of the PDF document by index. | |
| 637 // Parameters: | |
| 638 // document - Handle to a document | |
| 639 // index - The index of named destination. | |
| 640 // name - The name of the named destinatio n. | |
| 641 // Return value: | |
| 642 // The destination handle of a named destination. | |
| 643 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, std::string name); | |
|
Bo Xu
2015/01/06 18:15:56
@Tom, @raymes, should we have something like:
FPD
Tom Sepez
2015/01/06 18:25:44
Yes. But the problem is that the application does
Bo Xu
2015/01/06 23:00:20
I use the query mode in patch 4. Can you take a lo
| |
| 644 | |
| 645 | |
| 615 #ifdef __cplusplus | 646 #ifdef __cplusplus |
| 616 }; | 647 }; |
| 617 #endif | 648 #endif |
| 618 | 649 |
| 619 #endif // _FPDFVIEW_H_ | 650 #endif // _FPDFVIEW_H_ |
| OLD | NEW |