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

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

Issue 1087053002: Merge to XFA: Kill CFX_Object. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 8 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_rendercontext.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_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
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 #ifndef FX_COLORREFTOARGB 69 #ifndef FX_COLORREFTOARGB
70 /** @brief Convert a #FX_COLORREF to a #FX_ARGB. */ 70 /** @brief Convert a #FX_COLORREF to a #FX_ARGB. */
71 #define FX_COLORREFTOARGB(rgb) ((FX_DWORD)0xFF000000|(((FX_DWORD)rgb & 0x000000FF) << 16)|((FX_DWORD)rgb & 0x0000FF00)|(((FX_DWORD)rgb & 0x00FF0000) >> 16)) 71 #define FX_COLORREFTOARGB(rgb) ((FX_DWORD)0xFF000000|(((FX_DWORD)rgb & 0x000000FF) << 16)|((FX_DWORD)rgb & 0x0000FF00)|(((FX_DWORD)rgb & 0x00FF0000) >> 16))
72 #endif 72 #endif
73 73
74 typedef unsigned int FX_UINT; 74 typedef unsigned int FX_UINT;
75 75
76 #include "fpdfview.h" 76 #include "fpdfview.h"
77 77
78 class CPDF_CustomAccess FX_FINAL : public IFX_FileRead, public CFX_Object 78 class CPDF_CustomAccess FX_FINAL : public IFX_FileRead
79 { 79 {
80 public: 80 public:
81 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); 81 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess);
82 ~CPDF_CustomAccess() {} 82 ~CPDF_CustomAccess() {}
83 83
84 virtual CFX_ByteString GetFullPath() { return ""; } 84 virtual CFX_ByteString GetFullPath() { return ""; }
85 virtual FX_FILESIZE GetSize() FX_OVERRIDE { return m_FileAccess.m_Fi leLen; } 85 virtual FX_FILESIZE GetSize() FX_OVERRIDE { return m_FileAccess.m_Fi leLen; }
86 86
87 virtual FX_BOOL GetByte(FX_DWORD pos, FX_BYTE& ch); 87 virtual FX_BOOL GetByte(FX_DWORD pos, FX_BYTE& ch);
88 virtual FX_BOOL GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size); 88 virtual FX_BOOL GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size);
89 virtual void Release() FX_OVERRIDE { delete this; } 89 virtual void Release() FX_OVERRIDE { delete this; }
90 90
91 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size _t size) FX_OVERRIDE; 91 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size _t size) FX_OVERRIDE;
92 92
93 FPDF_FILEACCESS m_FileAccess; 93 FPDF_FILEACCESS m_FileAccess;
94 FX_BYTE m_Buffer[512]; 94 FX_BYTE m_Buffer[512];
95 FX_DWORD m_BufferOffset; 95 FX_DWORD m_BufferOffset;
96 }; 96 };
97 97
98 class CFPDF_FileStream : public IFX_FileStream, public CFX_Object 98 class CFPDF_FileStream : public IFX_FileStream
99 { 99 {
100 public: 100 public:
101 CFPDF_FileStream(FPDF_FILEHANDLER* pFS); 101 CFPDF_FileStream(FPDF_FILEHANDLER* pFS);
102 virtual ~CFPDF_FileStream() {} 102 virtual ~CFPDF_FileStream() {}
103 103
104 virtual IFX_FileStream* Retain(); 104 virtual IFX_FileStream* Retain();
105 virtual void Release(); 105 virtual void Release();
106 106
107 virtual FX_FILESIZE GetSize(); 107 virtual FX_FILESIZE GetSize();
108 virtual FX_BOOL IsEOF(); 108 virtual FX_BOOL IsEOF();
109 virtual FX_FILESIZE GetPosition() {return m_nCurPos; } 109 virtual FX_FILESIZE GetPosition() {return m_nCurPos; }
110 virtual void SetPosition(FX_FILESIZE pos) {m_ nCurPos = pos; } 110 virtual void SetPosition(FX_FILESIZE pos) {m_ nCurPos = pos; }
111 virtual FX_BOOL ReadBlock(void* buffer, FX_FILES IZE offset, size_t size); 111 virtual FX_BOOL ReadBlock(void* buffer, FX_FILES IZE offset, size_t size);
112 virtual size_t ReadBlock(void* buffer, size_t s ize); 112 virtual size_t ReadBlock(void* buffer, size_t s ize);
113 virtual FX_BOOL WriteBlock(const void* buffer, F X_FILESIZE offset, size_t size); 113 virtual FX_BOOL WriteBlock(const void* buffer, F X_FILESIZE offset, size_t size);
114 virtual FX_BOOL Flush(); 114 virtual FX_BOOL Flush();
115 115
116 protected: 116 protected:
117 FPDF_FILEHANDLER* m_pFS; 117 FPDF_FILEHANDLER* m_pFS;
118 FX_FILESIZE m_nCurPos; 118 FX_FILESIZE m_nCurPos;
119 }; 119 };
120 120
121 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); 121 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable);
122 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy); 122 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy);
123 123
124 124
125 #endif//_FPDFSDK_DEFINE_H 125 #endif//_FPDFSDK_DEFINE_H
OLDNEW
« no previous file with comments | « fpdfsdk/include/fsdk_baseannot.h ('k') | fpdfsdk/include/fsdk_rendercontext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698