Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: fpdfsdk/include/fpdfview.h

Issue 834703002: Add APIs for getting bookmarks and named destinations. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: use C style query mode for destination name Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
raymes 2015/01/08 03:55:44 nit: we don't need this now
Bo Xu 2015/01/09 19:35:21 Done.
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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 596
596 // Function: FPDF_VIEWERREF_GetDuplex 597 // Function: FPDF_VIEWERREF_GetDuplex
597 // Returns the paper handling option to be used when printi ng from print dialog. 598 // Returns the paper handling option to be used when printi ng from print dialog.
598 // Parameters: 599 // Parameters:
599 // document - Handle to the loaded document. 600 // document - Handle to the loaded document.
600 // Return value: 601 // Return value:
601 // The paper handling option to be used when printing. 602 // The paper handling option to be used when printing.
602 // 603 //
603 DLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT documen t); 604 DLLEXPORT FPDF_DUPLEXTYPE STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT documen t);
604 605
606 // Function: FPDF_CountNamedDests
607 // Get the count of named destinations in the PDF document.
608 // Parameters:
609 // document - Handle to a document
610 // Return value:
611 // The count of named destinations.
612 DLLEXPORT FPDF_DWORD STDCALL FPDF_CountNamedDests(FPDF_DOCUMENT document);
613
605 // Function: FPDF_GetNamedDestByName 614 // Function: FPDF_GetNamedDestByName
606 // get a special dest handle by the index. 615 // get a special dest handle by the index.
607 // Parameters: 616 // Parameters:
608 // document - Handle to the loaded document. 617 // document - Handle to the loaded document.
609 // name - The name of a special named dest . 618 // name - The name of a special named dest .
610 // Return value: 619 // Return value:
611 // The handle of the dest. 620 // The handle of the dest.
612 // 621 //
613 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_ BYTESTRING name); 622 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_ BYTESTRING name);
614 623
624 // Function: FPDF_GetNamedDest
625 // Get the specified named destinations of the PDF document by index.
626 // Parameters:
627 // document - Handle to a document
628 // index - The index of named destination.
629 // name - The name of the named destinatio n.
630 // len - The length of name.
631 // Return value:
632 // The destination handle of a named destination, NULL when retrieving the length.
633 // Comments:
634 // Call this function twice to get the name of the named de stination:
635 // 1) First time pass in |name| as NULL and retrieve length of |name|, including the trailing '\0'.
636 // 2) Second time pass in allocated |name| and its length t o retrieve |name|.
637 //
638 DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, char* name, unsigned int& len);
639
640
615 #ifdef __cplusplus 641 #ifdef __cplusplus
616 }; 642 };
617 #endif 643 #endif
618 644
619 #endif // _FPDFVIEW_H_ 645 #endif // _FPDFVIEW_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fpdfdoc.h ('k') | fpdfsdk/src/fpdfdoc.cpp » ('j') | fpdfsdk/src/fpdfdoc.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698