summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/fsdk_define.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-04 13:00:21 -0700
committerNico Weber <thakis@chromium.org>2015-08-04 13:00:21 -0700
commit9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f (patch)
treec97037f398d714665aefccb6eb54d0969ad7030c /fpdfsdk/include/fsdk_define.h
parent780cee82236d1b3b0f9b01a22424e4b8ec9a6f12 (diff)
downloadpdfium-9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f.tar.xz
XFA: clang-format all pdfium code.
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
Diffstat (limited to 'fpdfsdk/include/fsdk_define.h')
-rw-r--r--fpdfsdk/include/fsdk_define.h97
1 files changed, 54 insertions, 43 deletions
diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h
index e1ab1769a7..f208c05dab 100644
--- a/fpdfsdk/include/fsdk_define.h
+++ b/fpdfsdk/include/fsdk_define.h
@@ -31,66 +31,77 @@
#ifndef FX_ARGBTOCOLORREF
/** @brief Convert a #FX_ARGB to a #FX_COLORREF. */
-#define FX_ARGBTOCOLORREF(argb) ((((FX_DWORD)argb & 0x00FF0000) >> 16)|((FX_DWORD)argb & 0x0000FF00)|(((FX_DWORD)argb & 0x000000FF) << 16))
+#define FX_ARGBTOCOLORREF(argb) \
+ ((((FX_DWORD)argb & 0x00FF0000) >> 16) | ((FX_DWORD)argb & 0x0000FF00) | \
+ (((FX_DWORD)argb & 0x000000FF) << 16))
#endif
#ifndef FX_COLORREFTOARGB
/** @brief Convert a #FX_COLORREF to a #FX_ARGB. */
-#define FX_COLORREFTOARGB(rgb) ((FX_DWORD)0xFF000000|(((FX_DWORD)rgb & 0x000000FF) << 16)|((FX_DWORD)rgb & 0x0000FF00)|(((FX_DWORD)rgb & 0x00FF0000) >> 16))
+#define FX_COLORREFTOARGB(rgb) \
+ ((FX_DWORD)0xFF000000 | (((FX_DWORD)rgb & 0x000000FF) << 16) | \
+ ((FX_DWORD)rgb & 0x0000FF00) | (((FX_DWORD)rgb & 0x00FF0000) >> 16))
#endif
typedef unsigned int FX_UINT;
class CRenderContext;
class IFSDK_PAUSE_Adapter;
-class CPDF_CustomAccess final : public IFX_FileRead
-{
-public:
- CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess);
- ~CPDF_CustomAccess() {}
-
-
- virtual CFX_ByteString GetFullPath() { return ""; }
- virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; }
- virtual FX_BOOL GetByte(FX_DWORD pos, uint8_t& ch);
- virtual FX_BOOL GetBlock(FX_DWORD pos, uint8_t* pBuf, FX_DWORD size);
- virtual void Release() override { delete this; }
- virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
-
- FPDF_FILEACCESS m_FileAccess;
- uint8_t m_Buffer[512];
- FX_DWORD m_BufferOffset;
+class CPDF_CustomAccess final : public IFX_FileRead {
+ public:
+ CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess);
+ ~CPDF_CustomAccess() {}
+
+ virtual CFX_ByteString GetFullPath() { return ""; }
+ virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; }
+ virtual FX_BOOL GetByte(FX_DWORD pos, uint8_t& ch);
+ virtual FX_BOOL GetBlock(FX_DWORD pos, uint8_t* pBuf, FX_DWORD size);
+ virtual void Release() override { delete this; }
+ virtual FX_BOOL ReadBlock(void* buffer,
+ FX_FILESIZE offset,
+ size_t size) override;
+
+ FPDF_FILEACCESS m_FileAccess;
+ uint8_t m_Buffer[512];
+ FX_DWORD m_BufferOffset;
};
-class CFPDF_FileStream : public IFX_FileStream
-{
-public:
- CFPDF_FileStream(FPDF_FILEHANDLER* pFS);
- virtual ~CFPDF_FileStream() {}
-
- virtual IFX_FileStream* Retain();
- virtual void Release();
-
- virtual FX_FILESIZE GetSize();
- virtual FX_BOOL IsEOF();
- virtual FX_FILESIZE GetPosition() {return m_nCurPos;}
- virtual void SetPosition(FX_FILESIZE pos) {m_nCurPos = pos; }
- virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size);
- virtual size_t ReadBlock(void* buffer, size_t size);
- virtual FX_BOOL WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size);
- virtual FX_BOOL Flush();
-
-protected:
- FPDF_FILEHANDLER* m_pFS;
- FX_FILESIZE m_nCurPos;
+class CFPDF_FileStream : public IFX_FileStream {
+ public:
+ CFPDF_FileStream(FPDF_FILEHANDLER* pFS);
+ virtual ~CFPDF_FileStream() {}
+
+ virtual IFX_FileStream* Retain();
+ virtual void Release();
+
+ virtual FX_FILESIZE GetSize();
+ virtual FX_BOOL IsEOF();
+ virtual FX_FILESIZE GetPosition() { return m_nCurPos; }
+ virtual void SetPosition(FX_FILESIZE pos) { m_nCurPos = pos; }
+ virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size);
+ virtual size_t ReadBlock(void* buffer, size_t size);
+ virtual FX_BOOL WriteBlock(const void* buffer,
+ FX_FILESIZE offset,
+ size_t size);
+ virtual FX_BOOL Flush();
+
+ protected:
+ FPDF_FILEHANDLER* m_pFS;
+ FX_FILESIZE m_nCurPos;
};
void DropContext(void* data);
void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable);
FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy);
-void FPDF_RenderPage_Retail(CRenderContext* pContext, FPDF_PAGE page,
- int start_x, int start_y, int size_x, int size_y,
- int rotate, int flags, FX_BOOL bNeedToRestore,
+void FPDF_RenderPage_Retail(CRenderContext* pContext,
+ FPDF_PAGE page,
+ int start_x,
+ int start_y,
+ int size_x,
+ int size_y,
+ int rotate,
+ int flags,
+ FX_BOOL bNeedToRestore,
IFSDK_PAUSE_Adapter* pause);
#endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_