| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef _FPDF_PROGRESSIVE_H_ | |
| 8 #define _FPDF_PROGRESSIVE_H_ | |
| 9 | |
| 10 #include "fpdfview.h" | |
| 11 | |
| 12 //Flags for progressive process status. | |
| 13 #define FPDF_RENDER_READER 0 | |
| 14 #define FPDF_RENDER_TOBECOUNTINUED 1 | |
| 15 #define FPDF_RENDER_DONE 2 | |
| 16 #define FPDF_RENDER_FAILED 3 | |
| 17 | |
| 18 | |
| 19 #ifdef __cplusplus | |
| 20 extern "C" { | |
| 21 #endif | |
| 22 | |
| 23 | |
| 24 //IFPDF_RENDERINFO interface. | |
| 25 typedef struct _IFSDK_PAUSE | |
| 26 { | |
| 27 /** | |
| 28 * Version number of the interface. Currently must be 1. | |
| 29 **/ | |
| 30 int version; | |
| 31 | |
| 32 /* | |
| 33 * Method: NeedToPauseNow | |
| 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; | |
| 50 | |
| 51 // Function: FPDF_RenderPageBitmap_Start | |
| 52 // Start to render page contents to a device independent bi
tmap progressively. | |
| 53 // Parameters: | |
| 54 // bitmap - Handle to the device independent
bitmap (as the output buffer). | |
| 55 // Bitmap handle can be cre
ated by FPDFBitmap_Create function. | |
| 56 // page - Handle to the page. Returned by
FPDF_LoadPage function. | |
| 57 // start_x - Left pixel position of the displ
ay area in the bitmap coordinate. | |
| 58 // start_y - Top pixel position of the displa
y area in the bitmap coordinate. | |
| 59 // size_x - Horizontal size (in pixels) for
displaying the page. | |
| 60 // size_y - Vertical size (in pixels) for di
splaying the page. | |
| 61 // rotate - Page orientation: 0 (normal), 1
(rotated 90 degrees clockwise), | |
| 62 // 2 (rotated 180 d
egrees), 3 (rotated 90 degrees counter-clockwise). | |
| 63 // flags - 0 for normal display, or combina
tion of flags defined above. | |
| 64 // pause - The IFSDK_PAUSE interface.A call
back mechanism allowing the page rendering process | |
| 65 // Return value: | |
| 66 // Rendering Status. See flags for progressive process stat
us for the details. | |
| 67 // Notes: | |
| 68 // The method cannot not support to render page which the d
ocument consists of dynamic XFA fields. | |
| 69 // | |
| 70 DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap, FPDF_PAGE
page, int start_x, int start_y, int size_x, | |
| 71
int size_y, int rotate, int flags,IFSDK_PAUSE * pause); | |
| 72 | |
| 73 // Function: FPDF_RenderPage_Continue | |
| 74 // Continue rendering a PDF page. | |
| 75 // Parameters: | |
| 76 // page - Handle to the page. Returned by
FPDF_LoadPage function. | |
| 77 // pause - The IFSDK_PAUSE interface.A call
back mechanism allowing the page rendering process | |
| 78 // to be paused before it's
finished. This can be NULL if you don't want to pause. | |
| 79 // Return value: | |
| 80 // The rendering status. See flags for progressive process
status for the details. | |
| 81 // Notes: | |
| 82 // The method cannot not support to render page which the d
ocument consists of dynamic XFA fields. | |
| 83 // | |
| 84 DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * paus
e); | |
| 85 | |
| 86 // Function: FPDF_RenderPage_Close | |
| 87 // Release the resource allocate during page rendering. Nee
d to be called after finishing rendering or | |
| 88 // cancel the rendering. | |
| 89 // Parameters: | |
| 90 // page - Handle to the page. Returned by
FPDF_LoadPage function. | |
| 91 // Return value: | |
| 92 // NULL | |
| 93 // Notes: | |
| 94 // The method cannot not support to render page which the d
ocument consists of dynamic XFA fields. | |
| 95 // | |
| 96 DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page); | |
| 97 | |
| 98 #ifdef __cplusplus | |
| 99 } | |
| 100 #endif | |
| 101 | |
| 102 #endif //_FPDF_PROGRESSIVE_H_ | |
| OLD | NEW |