// Scintilla source code edit control
-// WinDefs.h - the subset of definitions from Windows needed by Scintilla for GTK+
-// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
+/** @file WinDefs.h
+ ** The subset of definitions from Windows needed by Scintilla for GTK+.
+ **/
+// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef WINDEFS_H
#define WINDEFS_H
+/* Running GTK version on win32 */
+#if PLAT_GTK_WIN32
+#include "Windows.h"
+#include "Richedit.h"
+
+/* Name conflicts */
+#undef DrawText
+#undef FindText
+#else
+
#define WORD short
#define WPARAM unsigned long
#define LPARAM long
#define LPSTR char *
#define LONG long
+//#if 0
/* RTF control */
#define EM_CANPASTE (1074)
#define EM_CANUNDO (198)
#define WM_NULL (0)
#define WM_CLEAR (771)
-#define WM_COMMAND (273)
#define WM_COPY (769)
#define WM_CUT (768)
#define WM_GETTEXT (13)
#define WM_GETTEXTLENGTH (14)
-#define WM_NOTIFY (78)
#define WM_PASTE (770)
#define WM_SETTEXT (12)
#define WM_UNDO (772)
#define EC_RIGHTMARGIN 2
#define EC_USEFONTINFO 0xffff
+//#endif
+
+#if 0
#if PLAT_GTK
#define VK_DOWN GDK_Down
#define VK_UP GDK_Up
#define VK_SUBTRACT WXK_SUBTRACT
//TODO:
#define VK_DIVIDE WXK_DIVIDE
+#endif
+
+#define SHIFT_PRESSED 1
+#define LEFT_CTRL_PRESSED 2
+#define LEFT_ALT_PRESSED 4
// Are these needed any more
#define LPSTR char *
#define LONG long
#define LPDWORD (long *)
-#endif
/* SELCHANGE structure */
#define SEL_EMPTY (0)
#define SEL_MULTICHAR (4)
#define SEL_MULTIOBJECT (8)
-/* FINDREPLACE structure */
-#define FR_MATCHCASE (0x4)
-#define FR_WHOLEWORD (0x2)
-#define FR_DOWN (0x1)
-
-#define SHIFT_PRESSED 1
-#define LEFT_CTRL_PRESSED 2
-#define LEFT_ALT_PRESSED 4
-
struct RECT {
LONG left;
LONG top;
LONG bottom;
};
+/* FINDREPLACE structure */
+
+#define FR_MATCHCASE (0x4)
+#define FR_WHOLEWORD (0x2)
+#define FR_DOWN (0x1)
+
+#endif
+
+#if 0
struct CHARRANGE {
LONG cpMin;
LONG cpMax;
RECT rcPage;
CHARRANGE chrg;
};
+#endif
+
+//#define MAKELONG(a, b) ((a) | ((b) << 16))
+//#define LOWORD(x) (x & 0xffff)
+//#define HIWORD(x) (x >> 16)
-#define MAKELONG(a, b) ((a) | ((b) << 16))
-#define LOWORD(x) (x & 0xffff)
-#define HIWORD(x) (x >> 16)
+#endif /* !_MSC_VER */
#endif