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

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

Issue 1233203004: Kill Func_Renderpage global function pointer, it never changes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: tabs. Created 5 years, 5 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
« no previous file with comments | « no previous file | fpdfsdk/src/fpdf_progressive.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 FPDFSDK_INCLUDE_FSDK_DEFINE_H_ 7 #ifndef FPDFSDK_INCLUDE_FSDK_DEFINE_H_
8 #define FPDFSDK_INCLUDE_FSDK_DEFINE_H_ 8 #define FPDFSDK_INCLUDE_FSDK_DEFINE_H_
9 9
10 #ifdef _WIN32
11 #include <tchar.h>
12 #include <math.h>
13 #endif
14
15 #include "../../core/include/fpdfapi/fpdf_module.h" 10 #include "../../core/include/fpdfapi/fpdf_module.h"
16 #include "../../core/include/fpdfapi/fpdf_pageobj.h" 11 #include "../../core/include/fpdfapi/fpdf_pageobj.h"
17 #include "../../core/include/fpdfapi/fpdf_parser.h" 12 #include "../../core/include/fpdfapi/fpdf_parser.h"
18 #include "../../core/include/fpdfapi/fpdf_parser.h" 13 #include "../../core/include/fpdfapi/fpdf_parser.h"
19 #include "../../core/include/fpdfapi/fpdf_render.h" 14 #include "../../core/include/fpdfapi/fpdf_render.h"
20 #include "../../core/include/fpdfapi/fpdf_serial.h" 15 #include "../../core/include/fpdfapi/fpdf_serial.h"
21 #include "../../core/include/fpdfapi/fpdfapi.h" 16 #include "../../core/include/fpdfapi/fpdfapi.h"
22 #include "../../core/include/fpdfdoc/fpdf_doc.h" 17 #include "../../core/include/fpdfdoc/fpdf_doc.h"
23 #include "../../core/include/fpdfdoc/fpdf_vt.h" 18 #include "../../core/include/fpdfdoc/fpdf_vt.h"
24 #include "../../core/include/fxge/fx_ge.h" 19 #include "../../core/include/fxge/fx_ge.h"
25 #include "../../core/include/fxge/fx_ge_win32.h" 20 #include "../../core/include/fxge/fx_ge_win32.h"
21 #include "../../public/fpdfview.h"
26 22
27 23 #ifdef _WIN32
28 #ifndef FX_GetAValue 24 #include <tchar.h>
29 /** @brief It retrieves an intensity value for the alpha component of a #FX_ARGB value. */ 25 #include <math.h>
30 #define FX_GetAValue(argb)» » » ((argb & 0xFF000000) >> 24)
31 #endif
32
33 #ifndef FX_GetRValue
34 /** @brief It retrieves an intensity value for the red component of a #FX_ARGB v alue. */
35 #define FX_GetRValue(argb)» » » ((argb & 0x00FF0000) >> 16)
36 #endif
37
38 #ifndef FX_GetGValue
39 /** @brief It retrieves an intensity value for the green component of a #FX_ARGB value. */
40 #define FX_GetGValue(argb)» » » ((argb & 0x0000FF00) >> 8)
41 #endif
42
43 #ifndef FX_GetBValue
44 /** @brief It retrieves an intensity value for the blue component of a #FX_ARGB value. */
45 #define FX_GetBValue(argb)» » » (argb & 0x000000FF)
46 #endif 26 #endif
47 27
48 #ifndef FX_ARGBTOCOLORREF 28 #ifndef FX_ARGBTOCOLORREF
49 /** @brief Convert a #FX_ARGB to a #FX_COLORREF. */ 29 /** @brief Convert a #FX_ARGB to a #FX_COLORREF. */
50 #define FX_ARGBTOCOLORREF(argb) ((((FX_DWORD)argb & 0x00FF0000) >> 16)|( (FX_DWORD)argb & 0x0000FF00)|(((FX_DWORD)argb & 0x000000FF) << 16)) 30 #define FX_ARGBTOCOLORREF(argb) ((((FX_DWORD)argb & 0x00FF0000) >> 16)|( (FX_DWORD)argb & 0x0000FF00)|(((FX_DWORD)argb & 0x000000FF) << 16))
51 #endif 31 #endif
52 32
53 #ifndef FX_COLORREFTOARGB 33 #ifndef FX_COLORREFTOARGB
54 /** @brief Convert a #FX_COLORREF to a #FX_ARGB. */ 34 /** @brief Convert a #FX_COLORREF to a #FX_ARGB. */
55 #define FX_COLORREFTOARGB(rgb) ((FX_DWORD)0xFF000000|(((FX_DWORD)rgb & 0x000000FF) << 16)|((FX_DWORD)rgb & 0x0000FF00)|(((FX_DWORD)rgb & 0x00FF0000) >> 16)) 35 #define FX_COLORREFTOARGB(rgb) ((FX_DWORD)0xFF000000|(((FX_DWORD)rgb & 0x000000FF) << 16)|((FX_DWORD)rgb & 0x0000FF00)|(((FX_DWORD)rgb & 0x00FF0000) >> 16))
56 #endif 36 #endif
57 37
58 typedef unsigned int FX_UINT; 38 typedef unsigned int FX_UINT;
59 39 class CRenderContext;
60 #include "../../public/fpdfview.h" 40 class IFSDK_PAUSE_Adapter;
61 41
62 class CPDF_CustomAccess final : public IFX_FileRead 42 class CPDF_CustomAccess final : public IFX_FileRead
63 { 43 {
64 public: 44 public:
65 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); 45 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess);
66 ~CPDF_CustomAccess() {} 46 ~CPDF_CustomAccess() {}
67 47
68 virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileL en; } 48 virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileL en; }
69 49
70 virtual void Release() override { delete this; } 50 virtual void Release() override { delete this; }
71 51
72 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size _t size) override; 52 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size _t size) override;
73 53
74 private: 54 private:
75 FPDF_FILEACCESS m_FileAccess; 55 FPDF_FILEACCESS m_FileAccess;
76 }; 56 };
77 57
78 void» » FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); 58 void DropContext(void* data);
79 FPDF_BOOL» FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy); 59 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable);
80 60 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy);
61 void FPDF_RenderPage_Retail(CRenderContext* pContext, FPDF_PAGE page,
62 int start_x, int start_y, int size_x, int size_y,
63 int rotate, int flags, FX_BOOL bNeedToRestore,
64 IFSDK_PAUSE_Adapter* pause);
81 65
82 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ 66 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/fpdf_progressive.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698