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

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

Issue 1835693002: Remove FX_DWORD from fpdfsdk/ and testing/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 | « fpdfsdk/include/fsdk_baseannot.h ('k') | fpdfsdk/include/fsdk_mgr.h » ('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 #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_parser.h"
11 #include "core/include/fpdfdoc/fpdf_doc.h" 11 #include "core/include/fpdfdoc/fpdf_doc.h"
12 #include "core/include/fpdfdoc/fpdf_vt.h" 12 #include "core/include/fpdfdoc/fpdf_vt.h"
13 #include "core/include/fxge/fx_ge.h" 13 #include "core/include/fxge/fx_ge.h"
14 #include "core/include/fxge/fx_ge_win32.h" 14 #include "core/include/fxge/fx_ge_win32.h"
15 #include "public/fpdfview.h" 15 #include "public/fpdfview.h"
16 16
17 #ifdef PDF_ENABLE_XFA 17 #ifdef PDF_ENABLE_XFA
18 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" 18 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h"
19 #endif // PDF_ENABLE_XFA 19 #endif // PDF_ENABLE_XFA
20 20
21 #ifdef _WIN32 21 #ifdef _WIN32
22 #include <math.h> 22 #include <math.h>
23 #include <tchar.h> 23 #include <tchar.h>
24 #endif 24 #endif
25 25
26 // Convert a #FX_ARGB to a #FX_COLORREF. 26 // Convert a #FX_ARGB to a #FX_COLORREF.
27 #define FX_ARGBTOCOLORREF(argb) \ 27 #define FX_ARGBTOCOLORREF(argb) \
28 ((((FX_DWORD)argb & 0x00FF0000) >> 16) | ((FX_DWORD)argb & 0x0000FF00) | \ 28 ((((uint32_t)argb & 0x00FF0000) >> 16) | ((uint32_t)argb & 0x0000FF00) | \
29 (((FX_DWORD)argb & 0x000000FF) << 16)) 29 (((uint32_t)argb & 0x000000FF) << 16))
30 30
31 // Convert a #FX_COLORREF to a #FX_ARGB. 31 // Convert a #FX_COLORREF to a #FX_ARGB.
32 #define FX_COLORREFTOARGB(rgb) \ 32 #define FX_COLORREFTOARGB(rgb) \
33 ((FX_DWORD)0xFF000000 | (((FX_DWORD)rgb & 0x000000FF) << 16) | \ 33 ((uint32_t)0xFF000000 | (((uint32_t)rgb & 0x000000FF) << 16) | \
34 ((FX_DWORD)rgb & 0x0000FF00) | (((FX_DWORD)rgb & 0x00FF0000) >> 16)) 34 ((uint32_t)rgb & 0x0000FF00) | (((uint32_t)rgb & 0x00FF0000) >> 16))
35 35
36 typedef unsigned int FX_UINT; 36 typedef unsigned int FX_UINT;
37 class CRenderContext; 37 class CRenderContext;
38 class IFSDK_PAUSE_Adapter; 38 class IFSDK_PAUSE_Adapter;
39 39
40 class CPDF_CustomAccess final : public IFX_FileRead { 40 class CPDF_CustomAccess final : public IFX_FileRead {
41 public: 41 public:
42 explicit CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); 42 explicit CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess);
43 ~CPDF_CustomAccess() override {} 43 ~CPDF_CustomAccess() override {}
44 44
45 // IFX_FileRead 45 // IFX_FileRead
46 FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; } 46 FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; }
47 void Release() override { delete this; } 47 void Release() override { delete this; }
48 FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; 48 FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
49 49
50 #ifdef PDF_ENABLE_XFA 50 #ifdef PDF_ENABLE_XFA
51 virtual CFX_ByteString GetFullPath() { return ""; } 51 virtual CFX_ByteString GetFullPath() { return ""; }
52 virtual FX_BOOL GetByte(FX_DWORD pos, uint8_t& ch); 52 virtual FX_BOOL GetByte(uint32_t pos, uint8_t& ch);
53 virtual FX_BOOL GetBlock(FX_DWORD pos, uint8_t* pBuf, FX_DWORD size); 53 virtual FX_BOOL GetBlock(uint32_t pos, uint8_t* pBuf, uint32_t size);
54 #endif // PDF_ENABLE_XFA 54 #endif // PDF_ENABLE_XFA
55 55
56 private: 56 private:
57 FPDF_FILEACCESS m_FileAccess; 57 FPDF_FILEACCESS m_FileAccess;
58 #ifdef PDF_ENABLE_XFA 58 #ifdef PDF_ENABLE_XFA
59 uint8_t m_Buffer[512]; 59 uint8_t m_Buffer[512];
60 FX_DWORD m_BufferOffset; 60 uint32_t m_BufferOffset;
61 #endif // PDF_ENABLE_XFA 61 #endif // PDF_ENABLE_XFA
62 }; 62 };
63 63
64 #ifdef PDF_ENABLE_XFA 64 #ifdef PDF_ENABLE_XFA
65 class CFPDF_FileStream : public IFX_FileStream { 65 class CFPDF_FileStream : public IFX_FileStream {
66 public: 66 public:
67 CFPDF_FileStream(FPDF_FILEHANDLER* pFS); 67 CFPDF_FileStream(FPDF_FILEHANDLER* pFS);
68 virtual ~CFPDF_FileStream() {} 68 virtual ~CFPDF_FileStream() {}
69 69
70 virtual IFX_FileStream* Retain(); 70 virtual IFX_FileStream* Retain();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 FPDF_PAGE page, 117 FPDF_PAGE page,
118 int start_x, 118 int start_x,
119 int start_y, 119 int start_y,
120 int size_x, 120 int size_x,
121 int size_y, 121 int size_y,
122 int rotate, 122 int rotate,
123 int flags, 123 int flags,
124 FX_BOOL bNeedToRestore, 124 FX_BOOL bNeedToRestore,
125 IFSDK_PAUSE_Adapter* pause); 125 IFSDK_PAUSE_Adapter* pause);
126 126
127 void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code); 127 void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code);
128 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot); 128 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot);
129 void ProcessParseError(CPDF_Parser::Error err); 129 void ProcessParseError(CPDF_Parser::Error err);
130 130
131 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ 131 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_baseannot.h ('k') | fpdfsdk/include/fsdk_mgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698