diff options
author | nyamatongwe <unknown> | 2000-07-22 06:51:09 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2000-07-22 06:51:09 +0000 |
commit | c8ab474fa173218cfe16309c8fbf37ab29635ccc (patch) | |
tree | e7dec8b009cb188dfeae386c35b8a845114d13dd /include/Platform.h | |
parent | 1e00d4f26ac7e2a7ac67195c0a3516f832edf34c (diff) | |
download | scintilla-mirror-c8ab474fa173218cfe16309c8fbf37ab29635ccc.tar.gz |
Updates to make new API work on both GTK+ and Win32.
Diffstat (limited to 'include/Platform.h')
-rw-r--r-- | include/Platform.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/Platform.h b/include/Platform.h index 14be5cebd..de9cf202a 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -80,12 +80,6 @@ typedef wxWindow* WindowID; typedef wxMenu* MenuID; #endif -#if PLAT_GTK || PLAT_WX -#define SHIFT_PRESSED 1 -#define LEFT_CTRL_PRESSED 2 -#define LEFT_ALT_PRESSED 4 -#endif - // Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably class Point { @@ -400,6 +394,16 @@ public: // These are utility functions not really tied to a platform static int Minimum(int a, int b); static int Maximum(int a, int b); + // Next three assume 16 bit shorts and 32 bit longs + static long LongFromTwoShorts(short a,short b) { + return (a) | ((b) << 16); + } + static short HighShortFromLong(long x) { + return static_cast<short>(x >> 16); + } + static short LowShortFromLong(long x) { + return static_cast<short>(x & 0xffff); + } static void DebugPrintf(const char *format, ...); static int Clamp(int val, int minVal, int maxVal); }; |