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

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

Issue 453133004: clang-format all code (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 4 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 #ifndef _FPDF_PROGRESSIVE_H_ 7 #ifndef _FPDF_PROGRESSIVE_H_
8 #define _FPDF_PROGRESSIVE_H_ 8 #define _FPDF_PROGRESSIVE_H_
9 9
10 #include "fpdfview.h" 10 #include "fpdfview.h"
11 11
12 //Flags for progressive process status. 12 // Flags for progressive process status.
13 #define FPDF_RENDER_READER» » » 0 13 #define FPDF_RENDER_READER 0
14 #define FPDF_RENDER_TOBECOUNTINUED» 1 14 #define FPDF_RENDER_TOBECOUNTINUED 1
15 #define FPDF_RENDER_DONE» » » 2 15 #define FPDF_RENDER_DONE 2
16 #define FPDF_RENDER_FAILED» » » 3 16 #define FPDF_RENDER_FAILED 3
17
18 17
19 #ifdef __cplusplus 18 #ifdef __cplusplus
20 extern "C" { 19 extern "C" {
21 #endif 20 #endif
22 21
22 // IFPDF_RENDERINFO interface.
23 typedef struct _IFSDK_PAUSE {
24 /**
25 * Version number of the interface. Currently must be 1.
26 **/
27 int version;
23 28
24 //IFPDF_RENDERINFO interface. 29 /*
25 typedef struct _IFSDK_PAUSE 30 * Method: NeedToPauseNow
26 { 31 *» » » Check if we need to pause a progressive process now.
27 » /** 32 * Interface Version:
28 » * Version number of the interface. Currently must be 1. 33 *» » » 1
29 » **/ 34 * Implementation Required:
30 » int version; 35 *» » » yes
36 * Parameters:
37 *» » » pThis» » -» Pointer to the interface structu re
38 *itself
39 * Return Value:
40 *» » » Non-zero for pause now, 0 for continue.
41 *
42 */
43 FPDF_BOOL (*NeedToPauseNow)(struct _IFSDK_PAUSE* pThis);
31 44
32 » /* 45 // A user defined data pointer, used by user's application. Can be NULL.
33 » * Method: NeedToPauseNow 46 void* user;
34 » *» » » Check if we need to pause a progressive process now.
35 » * Interface Version:
36 » *» » » 1
37 » * Implementation Required:
38 » *» » » yes
39 » * Parameters:
40 » *» » » pThis» » -» Pointer to the interface structure itself
41 » * Return Value:
42 » *» » » Non-zero for pause now, 0 for continue.
43 » *
44 » */
45 » FPDF_BOOL (*NeedToPauseNow) (struct _IFSDK_PAUSE* pThis);
46 »
47 » //A user defined data pointer, used by user's application. Can be NULL.
48 » void*» » user;
49 } IFSDK_PAUSE; 47 } IFSDK_PAUSE;
50 48
51 // Function: FPDF_RenderPageBitmap_Start 49 // Function: FPDF_RenderPageBitmap_Start
52 //» » » Start to render page contents to a device independent bi tmap progressively. 50 //» » » Start to render page contents to a device independent bi tmap
53 // Parameters: 51 //progressively.
54 //» » » bitmap» » -» Handle to the device independent bitmap (as the output buffer). 52 // Parameters:
55 //» » » » » » » Bitmap handle can be cre ated by FPDFBitmap_Create function. 53 //» » » bitmap» » -» Handle to the device independent
56 //» » » page» » -» Handle to the page. Returned by FPDF_LoadPage function. 54 //bitmap (as the output buffer).
57 //» » » start_x»» -» Left pixel position of the displ ay area in the bitmap coordinate. 55 //» » » » » » » Bitmap handle can be cre ated by
58 //» » » start_y»» -» Top pixel position of the displa y area in the bitmap coordinate. 56 //FPDFBitmap_Create function.
59 //» » » size_x» » -» Horizontal size (in pixels) for displaying the page. 57 //» » » page» » -» Handle to the page. Returned by
60 //» » » size_y» » -» Vertical size (in pixels) for di splaying the page. 58 //FPDF_LoadPage function.
61 //» » » rotate» » -» Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 59 //» » » start_x»» -» Left pixel position of the displ ay
62 //» » » » » » » » 2 (rotated 180 d egrees), 3 (rotated 90 degrees counter-clockwise). 60 //area in the bitmap coordinate.
63 //» » » flags» » -» 0 for normal display, or combina tion of flags defined above. 61 //» » » start_y»» -» Top pixel position of the displa y
64 //» » » pause» » -» The IFSDK_PAUSE interface.A call back mechanism allowing the page rendering process 62 //area in the bitmap coordinate.
63 //» » » size_x» » -» Horizontal size (in pixels) for
64 //displaying the page.
65 //» » » size_y» » -» Vertical size (in pixels) for
66 //displaying the page.
67 //» » » rotate» » -» Page orientation: 0 (normal), 1
68 //(rotated 90 degrees clockwise),
69 //» » » » » » » » 2 (rotated 180 d egrees), 3
70 //(rotated 90 degrees counter-clockwise).
71 //» » » flags» » -» 0 for normal display, or combina tion
72 //of flags defined above.
73 //» » » pause» » -» The IFSDK_PAUSE interface.A call back
74 //mechanism allowing the page rendering process
65 // Return value: 75 // Return value:
66 //» » » Rendering Status. See flags for progressive process stat us for the details. 76 //» » » Rendering Status. See flags for progressive process stat us
77 //for the details.
67 // 78 //
68 DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, int size_x, 79 DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap,
69 » » » » » » » » » » » » int size_y, int rotate, int flags,IFSDK_PAUSE * pause); 80 FPDF_PAGE page,
81 int start_x,
82 int start_y,
83 int size_x,
84 int size_y,
85 int rotate,
86 int flags,
87 IFSDK_PAUSE* pause);
70 88
71 // Function: FPDF_RenderPage_Continue 89 // Function: FPDF_RenderPage_Continue
72 // Continue rendering a PDF page. 90 // Continue rendering a PDF page.
73 // Parameters: 91 // Parameters:
74 //» » » page» » -» Handle to the page. Returned by FPDF_LoadPage function. 92 //» » » page» » -» Handle to the page. Returned by
75 //» » » pause» » -» The IFSDK_PAUSE interface.A call back mechanism allowing the page rendering process 93 //FPDF_LoadPage function.
76 //» » » » » » » to be paused before it's finished. This can be NULL if you don't want to pause. 94 //» » » pause» » -» The IFSDK_PAUSE interface.A call back
95 //mechanism allowing the page rendering process
96 //» » » » » » » to be paused before it's finished.
97 //This can be NULL if you don't want to pause.
77 // Return value: 98 // Return value:
78 //» » » The rendering status. See flags for progressive process status for the details. 99 //» » » The rendering status. See flags for progressive process
79 DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * paus e); 100 //status for the details.
101 DLLEXPORT int STDCALL
102 FPDF_RenderPage_Continue(FPDF_PAGE page, IFSDK_PAUSE* pause);
80 103
81 // Function: FPDF_RenderPage_Close 104 // Function: FPDF_RenderPage_Close
82 //» » » Release the resource allocate during page rendering. Nee d to be called after finishing rendering or 105 //» » » Release the resource allocate during page rendering. Nee d to
106 //be called after finishing rendering or
83 // cancel the rendering. 107 // cancel the rendering.
84 // Parameters: 108 // Parameters:
85 //» » » page» » -» Handle to the page. Returned by FPDF_LoadPage function. 109 //» » » page» » -» Handle to the page. Returned by
110 //FPDF_LoadPage function.
86 // Return value: 111 // Return value:
87 // NULL 112 // NULL
88 DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page); 113 DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page);
89 114
90 #ifdef __cplusplus 115 #ifdef __cplusplus
91 } 116 }
92 #endif 117 #endif
93 118
94 #endif» //_FPDF_PROGRESSIVE_H_ 119 #endif //_FPDF_PROGRESSIVE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698