summaryrefslogtreecommitdiff
path: root/core/include/fxge/fx_ge_win32.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-04 12:19:10 -0700
committerNico Weber <thakis@chromium.org>2015-08-04 12:19:10 -0700
commitb048f791a15f2da781a01eba5b09eb9d389f9c11 (patch)
tree6850a73c18bbc41eaf4b1fdc6b3c96646d45587b /core/include/fxge/fx_ge_win32.h
parentc8eeed31f217d99a706b0cbf5e4ce0bcc12beb64 (diff)
downloadpdfium-b048f791a15f2da781a01eba5b09eb9d389f9c11.tar.xz
clang-format all pdfium code.
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163' | \ xargs ../../buildtools/mac/clang-format -i See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1265503005 .
Diffstat (limited to 'core/include/fxge/fx_ge_win32.h')
-rw-r--r--core/include/fxge/fx_ge_win32.h111
1 files changed, 51 insertions, 60 deletions
diff --git a/core/include/fxge/fx_ge_win32.h b/core/include/fxge/fx_ge_win32.h
index 5b16146b6a..149c46d40b 100644
--- a/core/include/fxge/fx_ge_win32.h
+++ b/core/include/fxge/fx_ge_win32.h
@@ -11,96 +11,87 @@
#ifndef _WINDOWS_
#include <windows.h>
#endif
-#define WINDIB_OPEN_MEMORY 0x1
-#define WINDIB_OPEN_PATHNAME 0x2
-typedef struct WINDIB_Open_Args_ {
+#define WINDIB_OPEN_MEMORY 0x1
+#define WINDIB_OPEN_PATHNAME 0x2
+typedef struct WINDIB_Open_Args_ {
+ int flags;
- int flags;
+ const uint8_t* memory_base;
- const uint8_t* memory_base;
+ size_t memory_size;
- size_t memory_size;
-
- const FX_WCHAR* path_name;
+ const FX_WCHAR* path_name;
} WINDIB_Open_Args_;
-class CFX_WindowsDIB : public CFX_DIBitmap
-{
-public:
-
- static CFX_ByteString GetBitmapInfo(const CFX_DIBitmap* pBitmap);
+class CFX_WindowsDIB : public CFX_DIBitmap {
+ public:
+ static CFX_ByteString GetBitmapInfo(const CFX_DIBitmap* pBitmap);
- static CFX_DIBitmap* LoadFromBuf(BITMAPINFO* pbmi, void* pData);
+ static CFX_DIBitmap* LoadFromBuf(BITMAPINFO* pbmi, void* pData);
- static HBITMAP GetDDBitmap(const CFX_DIBitmap* pBitmap, HDC hDC);
+ static HBITMAP GetDDBitmap(const CFX_DIBitmap* pBitmap, HDC hDC);
- static CFX_DIBitmap* LoadFromDDB(HDC hDC, HBITMAP hBitmap, FX_DWORD* pPalette = NULL, FX_DWORD size = 256);
+ static CFX_DIBitmap* LoadFromDDB(HDC hDC,
+ HBITMAP hBitmap,
+ FX_DWORD* pPalette = NULL,
+ FX_DWORD size = 256);
- static CFX_DIBitmap* LoadFromFile(const FX_WCHAR* filename);
+ static CFX_DIBitmap* LoadFromFile(const FX_WCHAR* filename);
- static CFX_DIBitmap* LoadFromFile(const FX_CHAR* filename)
- {
- return LoadFromFile(CFX_WideString::FromLocal(filename).c_str());
- }
+ static CFX_DIBitmap* LoadFromFile(const FX_CHAR* filename) {
+ return LoadFromFile(CFX_WideString::FromLocal(filename).c_str());
+ }
- static CFX_DIBitmap* LoadDIBitmap(WINDIB_Open_Args_ args);
+ static CFX_DIBitmap* LoadDIBitmap(WINDIB_Open_Args_ args);
- CFX_WindowsDIB(HDC hDC, int width, int height);
+ CFX_WindowsDIB(HDC hDC, int width, int height);
- ~CFX_WindowsDIB();
+ ~CFX_WindowsDIB();
- HDC GetDC() const
- {
- return m_hMemDC;
- }
+ HDC GetDC() const { return m_hMemDC; }
- HBITMAP GetWindowsBitmap() const
- {
- return m_hBitmap;
- }
+ HBITMAP GetWindowsBitmap() const { return m_hBitmap; }
- void LoadFromDevice(HDC hDC, int left, int top);
+ void LoadFromDevice(HDC hDC, int left, int top);
- void SetToDevice(HDC hDC, int left, int top);
-protected:
+ void SetToDevice(HDC hDC, int left, int top);
- HDC m_hMemDC;
+ protected:
+ HDC m_hMemDC;
- HBITMAP m_hBitmap;
+ HBITMAP m_hBitmap;
- HBITMAP m_hOldBitmap;
+ HBITMAP m_hOldBitmap;
};
-class CFX_WindowsDevice : public CFX_RenderDevice
-{
-public:
- static IFX_RenderDeviceDriver* CreateDriver(HDC hDC, FX_BOOL bCmykOutput = FALSE);
+class CFX_WindowsDevice : public CFX_RenderDevice {
+ public:
+ static IFX_RenderDeviceDriver* CreateDriver(HDC hDC,
+ FX_BOOL bCmykOutput = FALSE);
- CFX_WindowsDevice(HDC hDC, FX_BOOL bCmykOutput = FALSE, FX_BOOL bForcePSOutput = FALSE, int psLevel = 2);
+ CFX_WindowsDevice(HDC hDC,
+ FX_BOOL bCmykOutput = FALSE,
+ FX_BOOL bForcePSOutput = FALSE,
+ int psLevel = 2);
- HDC GetDC() const;
+ HDC GetDC() const;
- FX_BOOL m_bForcePSOutput;
+ FX_BOOL m_bForcePSOutput;
- static int m_psLevel;
+ static int m_psLevel;
};
-class CFX_WinBitmapDevice : public CFX_RenderDevice
-{
-public:
-
- CFX_WinBitmapDevice(int width, int height, FXDIB_Format format);
+class CFX_WinBitmapDevice : public CFX_RenderDevice {
+ public:
+ CFX_WinBitmapDevice(int width, int height, FXDIB_Format format);
- ~CFX_WinBitmapDevice();
+ ~CFX_WinBitmapDevice();
- HDC GetDC()
- {
- return m_hDC;
- }
-protected:
+ HDC GetDC() { return m_hDC; }
- HBITMAP m_hBitmap;
+ protected:
+ HBITMAP m_hBitmap;
- HBITMAP m_hOldBitmap;
+ HBITMAP m_hOldBitmap;
- HDC m_hDC;
+ HDC m_hDC;
};
#endif