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

Side by Side Diff: public/fpdf_progressive.h

Issue 1265503005: clang-format all pdfium code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: sigh Created 5 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 PUBLIC_FPDF_PROGRESSIVE_H_ 7 #ifndef PUBLIC_FPDF_PROGRESSIVE_H_
8 #define PUBLIC_FPDF_PROGRESSIVE_H_ 8 #define PUBLIC_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 structure itself
38 * Return Value:
39 * Non-zero for pause now, 0 for continue.
40 *
41 */
42 FPDF_BOOL (*NeedToPauseNow)(struct _IFSDK_PAUSE* pThis);
31 43
32 /* 44 // A user defined data pointer, used by user's application. Can be NULL.
33 * Method: NeedToPauseNow 45 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; 46 } IFSDK_PAUSE;
50 47
51 // Function: FPDF_RenderPageBitmap_Start 48 // Function: FPDF_RenderPageBitmap_Start
52 // Start to render page contents to a device independent bitmap progres sively. 49 // Start to render page contents to a device independent bitmap
50 // progressively.
53 // Parameters: 51 // Parameters:
54 // bitmap - Handle to the device independent bitmap (as the outp ut buffer). 52 // bitmap - Handle to the device independent bitmap (as the
55 // Bitmap handle can be created by FPDFBitmap_Create fu nction. 53 // output buffer).
56 // page - Handle to the page. Returned by FPDF_LoadPage functi on. 54 // Bitmap handle can be created by FPDFBitmap_Create
57 // start_x - Left pixel position of the display area in the bitma p coordinate. 55 // function.
58 // start_y - Top pixel position of the display area in the bitmap coordinate. 56 // page - Handle to the page. Returned by FPDF_LoadPage
57 // function.
58 // start_x - Left pixel position of the display area in the
59 // bitmap coordinate.
60 // start_y - Top pixel position of the display area in the bitmap
61 // coordinate.
59 // size_x - Horizontal size (in pixels) for displaying the page. 62 // size_x - Horizontal size (in pixels) for displaying the page.
60 // size_y - Vertical size (in pixels) for displaying the page. 63 // size_y - Vertical size (in pixels) for displaying the page.
61 // rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise), 64 // rotate - Page orientation: 0 (normal), 1 (rotated 90 degrees
62 // 2 (rotated 180 degrees), 3 (rotated 90 degrees c ounter-clockwise). 65 // clockwise),
63 // flags - 0 for normal display, or combination of flags define d above. 66 // 2 (rotated 180 degrees), 3 (rotated 90 degrees
64 // pause - The IFSDK_PAUSE interface.A callback mechanism allow ing the page rendering process 67 // counter-clockwise).
68 // flags - 0 for normal display, or combination of flags
69 // defined above.
70 // pause - The IFSDK_PAUSE interface.A callback mechanism
71 // allowing the page rendering process
65 // Return value: 72 // Return value:
66 // Rendering Status. See flags for progressive process status for the d etails. 73 // Rendering Status. See flags for progressive process status for the
74 // details.
67 // 75 //
68 DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, int size_x, 76 DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap,
69 int size_y, int rotate, int f lags,IFSDK_PAUSE * pause); 77 FPDF_PAGE page,
78 int start_x,
79 int start_y,
80 int size_x,
81 int size_y,
82 int rotate,
83 int flags,
84 IFSDK_PAUSE* pause);
70 85
71 // Function: FPDF_RenderPage_Continue 86 // Function: FPDF_RenderPage_Continue
72 // Continue rendering a PDF page. 87 // Continue rendering a PDF page.
73 // Parameters: 88 // Parameters:
74 // page - Handle to the page. Returned by FPDF_LoadPage functi on. 89 // page - Handle to the page. Returned by FPDF_LoadPage
75 // pause - The IFSDK_PAUSE interface.A callback mechanism allow ing the page rendering process 90 // function.
76 // to be paused before it's finished. This can be NULL if you don't want to pause. 91 // pause - The IFSDK_PAUSE interface.A callback mechanism
92 // allowing the page rendering process
93 // to be paused before it's finished. This can be NULL
94 // if you don't want to pause.
77 // Return value: 95 // Return value:
78 // The rendering status. See flags for progressive process status for t he details. 96 // The rendering status. See flags for progressive process status for
79 DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * paus e); 97 // the details.
98 DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,
99 IFSDK_PAUSE* pause);
80 100
81 // Function: FPDF_RenderPage_Close 101 // Function: FPDF_RenderPage_Close
82 // Release the resource allocate during page rendering. Need to be call ed after finishing rendering or 102 // Release the resource allocate during page rendering. Need to be
103 // called after finishing rendering or
83 // cancel the rendering. 104 // cancel the rendering.
84 // Parameters: 105 // Parameters:
85 // page - Handle to the page. Returned by FPDF_LoadPage functi on. 106 // page - Handle to the page. Returned by FPDF_LoadPage
107 // function.
86 // Return value: 108 // Return value:
87 // NULL 109 // NULL
88 DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page); 110 DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page);
89 111
90 #ifdef __cplusplus 112 #ifdef __cplusplus
91 } 113 }
92 #endif 114 #endif
93 115
94 #endif // PUBLIC_FPDF_PROGRESSIVE_H_ 116 #endif // PUBLIC_FPDF_PROGRESSIVE_H_
OLDNEW
« fpdfsdk/src/javascript/Consts.cpp ('K') | « public/fpdf_ppo.h ('k') | public/fpdf_save.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698