diff options
author | Neil <nyamatongwe@gmail.com> | 2014-01-12 15:19:45 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-01-12 15:19:45 +1100 |
commit | e08d12e3d6c71ad4dde001998f3479cfd40ec61a (patch) | |
tree | 689c1465303beb61e82264a6999cf69204781787 | |
parent | d41e29df4604d56a8455fc99c40977fda4e31760 (diff) | |
download | scintilla-mirror-e08d12e3d6c71ad4dde001998f3479cfd40ec61a.tar.gz |
Remove old workarounds for system headers missing elements.
-rw-r--r-- | win32/PlatWin.cxx | 31 | ||||
-rw-r--r-- | win32/ScintillaWin.cxx | 27 |
2 files changed, 3 insertions, 55 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 90deb44e3..f67bcf7fb 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -49,42 +49,13 @@ #define SPI_GETFONTSMOOTHINGCONTRAST 0x200C #endif -// Take care of 32/64 bit pointers -#ifdef GetWindowLongPtr static void *PointerFromWindow(HWND hWnd) { return reinterpret_cast<void *>(::GetWindowLongPtr(hWnd, 0)); } + static void SetWindowPointer(HWND hWnd, void *ptr) { ::SetWindowLongPtr(hWnd, 0, reinterpret_cast<LONG_PTR>(ptr)); } -#else -static void *PointerFromWindow(HWND hWnd) { - return reinterpret_cast<void *>(::GetWindowLong(hWnd, 0)); -} -static void SetWindowPointer(HWND hWnd, void *ptr) { - ::SetWindowLong(hWnd, 0, reinterpret_cast<LONG>(ptr)); -} - -#ifndef GWLP_USERDATA -#define GWLP_USERDATA GWL_USERDATA -#endif - -#ifndef GWLP_WNDPROC -#define GWLP_WNDPROC GWL_WNDPROC -#endif - -#ifndef LONG_PTR -#define LONG_PTR LONG -#endif - -static LONG_PTR SetWindowLongPtr(HWND hWnd, int nIndex, LONG_PTR dwNewLong) { - return ::SetWindowLong(hWnd, nIndex, dwNewLong); -} - -static LONG_PTR GetWindowLongPtr(HWND hWnd, int nIndex) { - return ::GetWindowLong(hWnd, nIndex); -} -#endif extern UINT CodePageFromCharSet(DWORD characterSet, UINT documentCodePage); diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 8d5af5815..8794c9613 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -88,10 +88,6 @@ #define UNICODE_NOCHAR 0xFFFF #endif -#ifndef WM_IME_STARTCOMPOSITION -#include <imm.h> -#endif - #include <commctrl.h> #include <zmouse.h> #include <ole2.h> @@ -113,28 +109,17 @@ const TCHAR callClassName[] = TEXT("CallTip"); using namespace Scintilla; #endif -// Take care of 32/64 bit pointers -#ifdef GetWindowLongPtr static void *PointerFromWindow(HWND hWnd) { return reinterpret_cast<void *>(::GetWindowLongPtr(hWnd, 0)); } + static void SetWindowPointer(HWND hWnd, void *ptr) { ::SetWindowLongPtr(hWnd, 0, reinterpret_cast<LONG_PTR>(ptr)); } + static void SetWindowID(HWND hWnd, int identifier) { ::SetWindowLongPtr(hWnd, GWLP_ID, identifier); } -#else -static void *PointerFromWindow(HWND hWnd) { - return reinterpret_cast<void *>(::GetWindowLong(hWnd, 0)); -} -static void SetWindowPointer(HWND hWnd, void *ptr) { - ::SetWindowLong(hWnd, 0, reinterpret_cast<LONG>(ptr)); -} -static void SetWindowID(HWND hWnd, int identifier) { - ::SetWindowLong(hWnd, GWL_ID, identifier); -} -#endif class ScintillaWin; // Forward declaration for COM interface subobjects @@ -528,14 +513,6 @@ static int InputCodePage() { return atoi(sCodePage); } -#ifndef VK_OEM_2 -static const int VK_OEM_2=0xbf; -static const int VK_OEM_3=0xc0; -static const int VK_OEM_4=0xdb; -static const int VK_OEM_5=0xdc; -static const int VK_OEM_6=0xdd; -#endif - /** Map the key codes to their equivalent SCK_ form. */ static int KeyTranslate(int keyIn) { //PLATFORM_ASSERT(!keyIn); |