Merge to XFA: Fix a bunch of -Wunused-but-set-variable warnings.
[pdfium.git] / fpdfsdk / include / fpdf_progressive.h
index d590f78..69bbfba 100644 (file)
-// Copyright 2014 PDFium Authors. All rights reserved.\r
-// Use of this source code is governed by a BSD-style license that can be\r
-// found in the LICENSE file.\r
\r
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
-\r
-#ifndef _FPDF_PROGRESSIVE_H_\r
-#define _FPDF_PROGRESSIVE_H_\r
-\r
-#include "fpdfview.h"\r
-\r
-//Flags for progressive process status.\r
-#define FPDF_RENDER_READER                     0\r
-#define FPDF_RENDER_TOBECOUNTINUED     1\r
-#define FPDF_RENDER_DONE                       2\r
-#define FPDF_RENDER_FAILED                     3\r
-\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-\r
-//IFPDF_RENDERINFO interface.\r
-typedef struct _IFSDK_PAUSE\r
-{\r
-       /**\r
-       * Version number of the interface. Currently must be 1.\r
-       **/\r
-       int version;\r
-\r
-       /*\r
-       * Method: NeedToPauseNow\r
-       *                       Check if we need to pause a progressive process now.\r
-       * Interface Version:\r
-       *                       1\r
-       * Implementation Required:\r
-       *                       yes\r
-       * Parameters:\r
-       *                       pThis           -       Pointer to the interface structure itself\r
-       * Return Value:\r
-       *                        Non-zero for pause now, 0 for continue.\r
-       *\r
-       */\r
-       FPDF_BOOL (*NeedToPauseNow) (struct _IFSDK_PAUSE* pThis);\r
-       \r
-       //A user defined data pointer, used by user's application. Can be NULL.\r
-       void*           user;\r
-} IFSDK_PAUSE;\r
-\r
-// Function: FPDF_RenderPageBitmap_Start\r
-//                     Start to render page contents to a device independent bitmap progressively.\r
-// Parameters: \r
-//                     bitmap          -       Handle to the device independent bitmap (as the output buffer).\r
-//                                                     Bitmap handle can be created by FPDFBitmap_Create function.\r
-//                     page            -       Handle to the page. Returned by FPDF_LoadPage function.\r
-//                     start_x         -       Left pixel position of the display area in the bitmap coordinate.\r
-//                     start_y         -       Top pixel position of the display area in the bitmap coordinate.\r
-//                     size_x          -       Horizontal size (in pixels) for displaying the page.\r
-//                     size_y          -       Vertical size (in pixels) for displaying the page.\r
-//                     rotate          -       Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise),\r
-//                                                             2 (rotated 180 degrees), 3 (rotated 90 degrees counter-clockwise).\r
-//                     flags           -       0 for normal display, or combination of flags defined above.\r
-//                     pause           -       The IFSDK_PAUSE interface.A callback mechanism allowing the page rendering process\r
-// Return value:\r
-//                     Rendering Status. See flags for progressive process status for the details.\r
-//\r
-DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, int size_x,\r
-                                                                                                  int size_y, int rotate, int flags,IFSDK_PAUSE * pause);\r
-\r
-// Function: FPDF_RenderPage_Continue\r
-//                     Continue rendering a PDF page.\r
-// Parameters: \r
-//                     page            -       Handle to the page. Returned by FPDF_LoadPage function.\r
-//                     pause           -       The IFSDK_PAUSE interface.A callback mechanism allowing the page rendering process\r
-//                                                     to be paused before it's finished. This can be NULL if you don't want to pause.\r
-// Return value:\r
-//                     The rendering status. See flags for progressive process status for the details.\r
-DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * pause);\r
-\r
-// Function: FPDF_RenderPage_Close\r
-//                     Release the resource allocate during page rendering. Need to be called after finishing rendering or\r
-//                     cancel the rendering.\r
-// Parameters: \r
-//                     page            -       Handle to the page. Returned by FPDF_LoadPage function.\r
-// Return value:\r
-//                     NULL\r
-DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page);\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif //_FPDF_PROGRESSIVE_H_\r
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FPDF_PROGRESSIVE_H_
+#define _FPDF_PROGRESSIVE_H_
+
+#include "fpdfview.h"
+
+//Flags for progressive process status.
+#define FPDF_RENDER_READER                     0
+#define FPDF_RENDER_TOBECOUNTINUED     1
+#define FPDF_RENDER_DONE                       2
+#define FPDF_RENDER_FAILED                     3
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+//IFPDF_RENDERINFO interface.
+typedef struct _IFSDK_PAUSE
+{
+       /**
+       * Version number of the interface. Currently must be 1.
+       **/
+       int version;
+
+       /*
+       * Method: NeedToPauseNow
+       *                       Check if we need to pause a progressive process now.
+       * Interface Version:
+       *                       1
+       * Implementation Required:
+       *                       yes
+       * Parameters:
+       *                       pThis           -       Pointer to the interface structure itself
+       * Return Value:
+       *                        Non-zero for pause now, 0 for continue.
+       *
+       */
+       FPDF_BOOL (*NeedToPauseNow) (struct _IFSDK_PAUSE* pThis);
+       
+       //A user defined data pointer, used by user's application. Can be NULL.
+       void*           user;
+} IFSDK_PAUSE;
+
+// Function: FPDF_RenderPageBitmap_Start
+//                     Start to render page contents to a device independent bitmap progressively.
+// Parameters: 
+//                     bitmap          -       Handle to the device independent bitmap (as the output buffer).
+//                                                     Bitmap handle can be created by FPDFBitmap_Create function.
+//                     page            -       Handle to the page. Returned by FPDF_LoadPage function.
+//                     start_x         -       Left pixel position of the display area in the bitmap coordinate.
+//                     start_y         -       Top pixel position of the display area in the bitmap coordinate.
+//                     size_x          -       Horizontal size (in pixels) for displaying the page.
+//                     size_y          -       Vertical size (in pixels) for displaying the page.
+//                     rotate          -       Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise),
+//                                                             2 (rotated 180 degrees), 3 (rotated 90 degrees counter-clockwise).
+//                     flags           -       0 for normal display, or combination of flags defined above.
+//                     pause           -       The IFSDK_PAUSE interface.A callback mechanism allowing the page rendering process
+// Return value:
+//                     Rendering Status. See flags for progressive process status for the details.
+// Notes:
+//                     The method cannot not support to render page which the document consists of dynamic XFA fields.
+//
+DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y, int size_x,
+                                                                                                  int size_y, int rotate, int flags,IFSDK_PAUSE * pause);
+
+// Function: FPDF_RenderPage_Continue
+//                     Continue rendering a PDF page.
+// Parameters: 
+//                     page            -       Handle to the page. Returned by FPDF_LoadPage function.
+//                     pause           -       The IFSDK_PAUSE interface.A callback mechanism allowing the page rendering process
+//                                                     to be paused before it's finished. This can be NULL if you don't want to pause.
+// Return value:
+//                     The rendering status. See flags for progressive process status for the details.
+// Notes:
+//                     The method cannot not support to render page which the document consists of dynamic XFA fields.
+//
+DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * pause);
+
+// Function: FPDF_RenderPage_Close
+//                     Release the resource allocate during page rendering. Need to be called after finishing rendering or
+//                     cancel the rendering.
+// Parameters: 
+//                     page            -       Handle to the page. Returned by FPDF_LoadPage function.
+// Return value:
+//                     NULL
+// Notes:
+//                     The method cannot not support to render page which the document consists of dynamic XFA fields.
+//
+DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_FPDF_PROGRESSIVE_H_