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

Side by Side Diff: fpdfsdk/include/fsdk_define.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 _FPDFSDK_DEFINE_H 7 #ifndef _FPDFSDK_DEFINE_H
8 #define _FPDFSDK_DEFINE_H 8 #define _FPDFSDK_DEFINE_H
9 9
10 #ifdef _WIN32 10 #ifdef _WIN32
11 #include <tchar.h> 11 #include <tchar.h>
12 #include <math.h> 12 #include <math.h>
13 #endif 13 #endif
14 14
15 //#define API5 15 //#define API5
16 #define API6 16 #define API6
17 #define _FPDFAPI_ASYNC_PARSING_ 17 #define _FPDFAPI_ASYNC_PARSING_
18 #define _FXSDK_OPENSOURCE_ 18 #define _FXSDK_OPENSOURCE_
19 19
20 #ifdef _FPDFEMB_WCE_ 20 #ifdef _FPDFEMB_WCE_
21 » #include "../../core/include/fpdfapi/fpdfapi.h" 21 #include "../../core/include/fpdfapi/fpdfapi.h"
22 » #include "../../core/include/fpdfapi/fpdf_parser.h" 22 #include "../../core/include/fpdfapi/fpdf_parser.h"
23 » #include "../../core/include/fpdfapi/fpdf_module.h" 23 #include "../../core/include/fpdfapi/fpdf_module.h"
24 » #include "../../core/include/fpdfapi/fpdf_render.h" 24 #include "../../core/include/fpdfapi/fpdf_render.h"
25 » #include "../../core/include/fpdfapi/fpdf_pageobj.h" 25 #include "../../core/include/fpdfapi/fpdf_pageobj.h"
26 » #include "../../core/include/fpdfapi/fpdf_serial.h" 26 #include "../../core/include/fpdfapi/fpdf_serial.h"
27 27
28 » #include "../../core/include/fpdftext/fpdf_text.h" 28 #include "../../core/include/fpdftext/fpdf_text.h"
29 29
30 » #include "../../core/include/fxge/fx_ge_win32.h" 30 #include "../../core/include/fxge/fx_ge_win32.h"
31 » #include "../../core/include/fxge/fx_ge.h" 31 #include "../../core/include/fxge/fx_ge.h"
32 32
33 » #include "../../core/include/fxcodec/fx_codec.h" 33 #include "../../core/include/fxcodec/fx_codec.h"
34 34
35 » #include "../../core/include/fpdfdoc/fpdf_doc.h" 35 #include "../../core/include/fpdfdoc/fpdf_doc.h"
36 » #include "../../core/include/fpdfdoc/fpdf_vt.h" 36 #include "../../core/include/fpdfdoc/fpdf_vt.h"
37 37
38 » #include "../../core/include/fxcrt/fx_xml.h" 38 #include "../../core/include/fxcrt/fx_xml.h"
39 » #include "../../core/include/fxcrt/fx_crypt.h" 39 #include "../../core/include/fxcrt/fx_crypt.h"
40 40
41 #else 41 #else
42 » #ifdef API6 42 #ifdef API6
43 » » #include "../../core/include/fpdfapi/fpdf_parser.h" 43 #include "../../core/include/fpdfapi/fpdf_parser.h"
44 » » #include "../../core/include/fpdfapi/fpdfapi.h" 44 #include "../../core/include/fpdfapi/fpdfapi.h"
45 » » #include "../../core/include/fpdfapi/fpdf_parser.h" 45 #include "../../core/include/fpdfapi/fpdf_parser.h"
46 » » #include "../../core/include/fpdfapi/fpdf_module.h" 46 #include "../../core/include/fpdfapi/fpdf_module.h"
47 » » #include "../../core/include/fpdfapi/fpdf_render.h" 47 #include "../../core/include/fpdfapi/fpdf_render.h"
48 » » #include "../../core/include/fpdfapi/fpdf_pageobj.h" 48 #include "../../core/include/fpdfapi/fpdf_pageobj.h"
49 » » #include "../../core/include/fpdfapi/fpdf_serial.h" 49 #include "../../core/include/fpdfapi/fpdf_serial.h"
50 50
51 » » #include "../../core/include/fpdftext/fpdf_text.h" 51 #include "../../core/include/fpdftext/fpdf_text.h"
52 52
53 » » #include "../../core/include/fxge/fx_ge_win32.h" 53 #include "../../core/include/fxge/fx_ge_win32.h"
54 » » #include "../../core/include/fxge/fx_ge.h" 54 #include "../../core/include/fxge/fx_ge.h"
55 55
56 » » #include "../../core/include/fxcodec/fx_codec.h" 56 #include "../../core/include/fxcodec/fx_codec.h"
57 57
58 » » #include "../../core/include/fpdfdoc/fpdf_doc.h" 58 #include "../../core/include/fpdfdoc/fpdf_doc.h"
59 » » #include "../../core/include/fpdfdoc/fpdf_vt.h" 59 #include "../../core/include/fpdfdoc/fpdf_vt.h"
60 60
61 » » #include "../../core/include/fxcrt/fx_xml.h" 61 #include "../../core/include/fxcrt/fx_xml.h"
62 » //» #include "../../core/include/fdrm/fx_crypt.h" 62 //» #include "../../core/include/fdrm/fx_crypt.h"
63 » » #ifdef _LICENSED_BUILD_ 63 #ifdef _LICENSED_BUILD_
64 » » » #include "../../cryptopp/Cryptlib.h" 64 #include "../../cryptopp/Cryptlib.h"
65 » » #endif 65 #endif
66 » #endif 66 #endif
67 #endif 67 #endif
68 68
69
70 #ifndef FX_GetAValue 69 #ifndef FX_GetAValue
71 /** @brief It retrieves an intensity value for the alpha component of a #FX_ARGB value. */ 70 /** @brief It retrieves an intensity value for the alpha component of a #FX_ARGB
72 #define FX_GetAValue(argb)» » » ((argb & 0xFF000000) >> 24) 71 * value. */
72 #define FX_GetAValue(argb) ((argb & 0xFF000000) >> 24)
73 #endif 73 #endif
74 74
75 #ifndef FX_GetRValue 75 #ifndef FX_GetRValue
76 /** @brief It retrieves an intensity value for the red component of a #FX_ARGB v alue. */ 76 /** @brief It retrieves an intensity value for the red component of a #FX_ARGB
77 #define FX_GetRValue(argb)» » » ((argb & 0x00FF0000) >> 16) 77 * value. */
78 #define FX_GetRValue(argb) ((argb & 0x00FF0000) >> 16)
78 #endif 79 #endif
79 80
80 #ifndef FX_GetGValue 81 #ifndef FX_GetGValue
81 /** @brief It retrieves an intensity value for the green component of a #FX_ARGB value. */ 82 /** @brief It retrieves an intensity value for the green component of a #FX_ARGB
82 #define FX_GetGValue(argb)» » » ((argb & 0x0000FF00) >> 8) 83 * value. */
84 #define FX_GetGValue(argb) ((argb & 0x0000FF00) >> 8)
83 #endif 85 #endif
84 86
85 #ifndef FX_GetBValue 87 #ifndef FX_GetBValue
86 /** @brief It retrieves an intensity value for the blue component of a #FX_ARGB value. */ 88 /** @brief It retrieves an intensity value for the blue component of a #FX_ARGB
87 #define FX_GetBValue(argb)» » » (argb & 0x000000FF) 89 * value. */
90 #define FX_GetBValue(argb) (argb & 0x000000FF)
88 #endif 91 #endif
89 92
90 #ifndef FX_ARGBTOCOLORREF 93 #ifndef FX_ARGBTOCOLORREF
91 /** @brief Convert a #FX_ARGB to a #FX_COLORREF. */ 94 /** @brief Convert a #FX_ARGB to a #FX_COLORREF. */
92 #define FX_ARGBTOCOLORREF(argb)»» ((((FX_DWORD)argb & 0x00FF0000) >> 16)|( (FX_DWORD)argb & 0x0000FF00)|(((FX_DWORD)argb & 0x000000FF) << 16)) 95 #define FX_ARGBTOCOLORREF(argb) \
96 ((((FX_DWORD)argb & 0x00FF0000) >> 16) | ((FX_DWORD)argb & 0x0000FF00) | \
97 (((FX_DWORD)argb & 0x000000FF) << 16))
93 #endif 98 #endif
94 99
95 #ifndef FX_COLORREFTOARGB 100 #ifndef FX_COLORREFTOARGB
96 /** @brief Convert a #FX_COLORREF to a #FX_ARGB. */ 101 /** @brief Convert a #FX_COLORREF to a #FX_ARGB. */
97 #define FX_COLORREFTOARGB(rgb)» » ((FX_DWORD)0xFF000000|(((FX_DWORD)rgb & 0x000000FF) << 16)|((FX_DWORD)rgb & 0x0000FF00)|(((FX_DWORD)rgb & 0x00FF0000) >> 16)) 102 #define FX_COLORREFTOARGB(rgb) \
103 ((FX_DWORD)0xFF000000 | (((FX_DWORD)rgb & 0x000000FF) << 16) | \
104 ((FX_DWORD)rgb & 0x0000FF00) | (((FX_DWORD)rgb & 0x00FF0000) >> 16))
98 #endif 105 #endif
99 106
100 typedef unsigned int FX_UINT;» 107 typedef unsigned int FX_UINT;
101 108
102 #include "fpdfview.h" 109 #include "fpdfview.h"
103 110
104 class CPDF_CustomAccess FX_FINAL : public IFX_FileRead, public CFX_Object 111 class CPDF_CustomAccess FX_FINAL : public IFX_FileRead, public CFX_Object {
105 { 112 public:
106 public: 113 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess);
107 » CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); 114 ~CPDF_CustomAccess() {}
108 » ~CPDF_CustomAccess() {}
109 115
110 » virtual CFX_ByteString GetFullPath() { return ""; } 116 virtual CFX_ByteString GetFullPath() { return ""; }
111 » virtual FX_FILESIZE» GetSize() { return m_FileAccess.m_FileLen; } 117 virtual FX_FILESIZE GetSize() { return m_FileAccess.m_FileLen; }
112 118
113 » virtual FX_BOOL»» GetByte(FX_DWORD pos, FX_BYTE& ch); 119 virtual FX_BOOL GetByte(FX_DWORD pos, FX_BYTE& ch);
114 » virtual FX_BOOL»» GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size); 120 virtual FX_BOOL GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size);
115 » virtual void» » Release() { delete this; } 121 virtual void Release() { delete this; }
116 122
117 » virtual FX_BOOL»» ReadBlock(void* buffer, FX_FILESIZE offset, size _t size); 123 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size);
118 124
119 » FPDF_FILEACCESS»» m_FileAccess; 125 FPDF_FILEACCESS m_FileAccess;
120 » FX_BYTE»» » » m_Buffer[512]; 126 FX_BYTE m_Buffer[512];
121 » FX_DWORD» » » m_BufferOffset; 127 FX_DWORD m_BufferOffset;
122 }; 128 };
123 129
124 void» » FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); 130 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable);
125 FPDF_BOOL» FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy); 131 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy);
126 132
127 133 #endif //_FPDFSDK_DEFINE_H
128 #endif//_FPDFSDK_DEFINE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698