From c8ab474fa173218cfe16309c8fbf37ab29635ccc Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 22 Jul 2000 06:51:09 +0000 Subject: Updates to make new API work on both GTK+ and Win32. --- include/Platform.h | 16 ++++++++++------ include/Scintilla.h | 2 ++ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'include') 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(x >> 16); + } + static short LowShortFromLong(long x) { + return static_cast(x & 0xffff); + } static void DebugPrintf(const char *format, ...); static int Clamp(int val, int minVal, int maxVal); }; diff --git a/include/Scintilla.h b/include/Scintilla.h index 7a7ee8c05..1b23dfdca 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -15,6 +15,8 @@ void Scintilla_RegisterClasses(HINSTANCE hInstance); #endif #endif +typedef long (*SciFnDirect)(long ptr, unsigned int iMessage, unsigned long wParam, long lParam); + // Start of section which could be automatically generated from Scintilla.iface #define INVALID_POSITION -1 -- cgit v1.2.3