Remove trailing whitespaces in core.
[pdfium.git] / core / include / fxge / fx_ge_win32.h
index 0b421db..5b16146 100644 (file)
-// Copyright 2014 PDFium Authors. All rights reserved.\r
-// Use of this source code is governed by a BSD-style license that can be\r
-// found in the LICENSE file.\r
\r
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
-\r
-#ifndef _FX_GE_WIN32_H_\r
-#define _FX_GE_WIN32_H_\r
-#ifdef _WIN32\r
-#ifndef _WINDOWS_\r
-#include <windows.h>\r
-#endif\r
-#define WINDIB_OPEN_MEMORY    0x1\r
-#define WINDIB_OPEN_PATHNAME  0x2\r
-typedef struct  WINDIB_Open_Args_ {\r
-\r
-    int         flags;\r
-\r
-    const FX_BYTE*  memory_base;\r
-\r
-    size_t    memory_size;\r
-\r
-    FX_LPCWSTR  path_name;\r
-} WINDIB_Open_Args_;\r
-class CFX_WindowsDIB : public CFX_DIBitmap\r
-{\r
-public:\r
-\r
-    static CFX_ByteString      GetBitmapInfo(const CFX_DIBitmap* pBitmap);\r
-\r
-    static CFX_DIBitmap* LoadFromBuf(BITMAPINFO* pbmi, void* pData);\r
-\r
-    static HBITMAP             GetDDBitmap(const CFX_DIBitmap* pBitmap, HDC hDC);\r
-\r
-    static CFX_DIBitmap* LoadFromDDB(HDC hDC, HBITMAP hBitmap, FX_DWORD* pPalette = NULL, FX_DWORD size = 256);\r
-\r
-    static CFX_DIBitmap* LoadFromFile(FX_LPCWSTR filename);\r
-\r
-    static CFX_DIBitmap* LoadFromFile(FX_LPCSTR filename)\r
-    {\r
-        return LoadFromFile(CFX_WideString::FromLocal(filename));\r
-    }\r
-\r
-    static CFX_DIBitmap* LoadDIBitmap(WINDIB_Open_Args_ args);\r
-\r
-    CFX_WindowsDIB(HDC hDC, int width, int height);\r
-\r
-    ~CFX_WindowsDIB();\r
-\r
-    HDC                                        GetDC() const\r
-    {\r
-        return m_hMemDC;\r
-    }\r
-\r
-    HBITMAP                            GetWindowsBitmap() const\r
-    {\r
-        return m_hBitmap;\r
-    }\r
-\r
-    void                               LoadFromDevice(HDC hDC, int left, int top);\r
-\r
-    void                               SetToDevice(HDC hDC, int left, int top);\r
-protected:\r
-\r
-    HDC                                        m_hMemDC;\r
-\r
-    HBITMAP                            m_hBitmap;\r
-\r
-    HBITMAP                            m_hOldBitmap;\r
-};\r
-class CFX_WindowsDevice : public CFX_RenderDevice\r
-{\r
-public:\r
-    static IFX_RenderDeviceDriver*     CreateDriver(HDC hDC, FX_BOOL bCmykOutput = FALSE);\r
-\r
-    CFX_WindowsDevice(HDC hDC, FX_BOOL bCmykOutput = FALSE, FX_BOOL bForcePSOutput = FALSE, int psLevel = 2);\r
-\r
-    HDC                GetDC() const;\r
-\r
-    FX_BOOL m_bForcePSOutput;\r
-\r
-    static int m_psLevel;\r
-};\r
-class CFX_WinBitmapDevice : public CFX_RenderDevice\r
-{\r
-public:\r
-\r
-    CFX_WinBitmapDevice(int width, int height, FXDIB_Format format);\r
-\r
-    ~CFX_WinBitmapDevice();\r
-\r
-    HDC                GetDC()\r
-    {\r
-        return m_hDC;\r
-    }\r
-protected:\r
-\r
-    HBITMAP    m_hBitmap;\r
-\r
-    HBITMAP m_hOldBitmap;\r
-\r
-    HDC                m_hDC;\r
-};\r
-#endif\r
-#endif\r
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_INCLUDE_FXGE_FX_GE_WIN32_H_
+#define CORE_INCLUDE_FXGE_FX_GE_WIN32_H_
+
+#ifdef _WIN32
+#ifndef _WINDOWS_
+#include <windows.h>
+#endif
+#define WINDIB_OPEN_MEMORY    0x1
+#define WINDIB_OPEN_PATHNAME  0x2
+typedef struct  WINDIB_Open_Args_ {
+
+    int         flags;
+
+    const uint8_t*  memory_base;
+
+    size_t    memory_size;
+
+    const FX_WCHAR*  path_name;
+} WINDIB_Open_Args_;
+class CFX_WindowsDIB : public CFX_DIBitmap
+{
+public:
+
+    static CFX_ByteString      GetBitmapInfo(const CFX_DIBitmap* pBitmap);
+
+    static CFX_DIBitmap* LoadFromBuf(BITMAPINFO* pbmi, void* pData);
+
+    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* LoadFromFile(const FX_WCHAR* filename);
+
+    static CFX_DIBitmap* LoadFromFile(const FX_CHAR* filename)
+    {
+        return LoadFromFile(CFX_WideString::FromLocal(filename).c_str());
+    }
+
+    static CFX_DIBitmap* LoadDIBitmap(WINDIB_Open_Args_ args);
+
+    CFX_WindowsDIB(HDC hDC, int width, int height);
+
+    ~CFX_WindowsDIB();
+
+    HDC                                        GetDC() const
+    {
+        return m_hMemDC;
+    }
+
+    HBITMAP                            GetWindowsBitmap() const
+    {
+        return m_hBitmap;
+    }
+
+    void                               LoadFromDevice(HDC hDC, int left, int top);
+
+    void                               SetToDevice(HDC hDC, int left, int top);
+protected:
+
+    HDC                                        m_hMemDC;
+
+    HBITMAP                            m_hBitmap;
+
+    HBITMAP                            m_hOldBitmap;
+};
+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);
+
+    HDC                GetDC() const;
+
+    FX_BOOL m_bForcePSOutput;
+
+    static int m_psLevel;
+};
+class CFX_WinBitmapDevice : public CFX_RenderDevice
+{
+public:
+
+    CFX_WinBitmapDevice(int width, int height, FXDIB_Format format);
+
+    ~CFX_WinBitmapDevice();
+
+    HDC                GetDC()
+    {
+        return m_hDC;
+    }
+protected:
+
+    HBITMAP    m_hBitmap;
+
+    HBITMAP m_hOldBitmap;
+
+    HDC                m_hDC;
+};
+#endif
+
+#endif  // CORE_INCLUDE_FXGE_FX_GE_WIN32_H_