From 642a1a3531a028121777286b878541e014feac56 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 21 Jul 2000 13:36:30 +0000 Subject: Provide alternative symbols for all features defined in WinDefs.h to allow for eventual removal of WinDefs.h. --- include/Scintilla.h | 118 ++++++++++++++++++++++++++++++++++++++++++++++++---- include/WinDefs.h | 37 +++++++++------- 2 files changed, 133 insertions(+), 22 deletions(-) (limited to 'include') diff --git a/include/Scintilla.h b/include/Scintilla.h index d79441309..4a812fc0e 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -9,10 +9,6 @@ // Compile-time configuration options #define MACRO_SUPPORT 1 // Comment out to remove macro hooks -#if PLAT_WX || PLAT_GTK -#include "WinDefs.h" -#endif - #if PLAT_WIN #ifdef STATIC_BUILD void Scintilla_RegisterClasses(HINSTANCE hInstance); @@ -371,8 +367,8 @@ void Scintilla_RegisterClasses(HINSTANCE hInstance); // Optional module for macro recording #ifdef MACRO_SUPPORT -typedef void (tMacroRecorder)(UINT iMessage, WPARAM wParam, LPARAM lParam, - void *userData); +typedef void (tMacroRecorder)(unsigned int iMessage, unsigned long wParam, + long lParam, void *userData); #define SCI_STARTRECORD SCI_OPTIONAL_START + 1 #define SCI_STOPRECORD SCI_OPTIONAL_START + 2 #endif @@ -421,10 +417,49 @@ typedef void (tMacroRecorder)(UINT iMessage, WPARAM wParam, LPARAM lParam, #define SCN_MARGINCLICK 2010 #define SCN_NEEDSHOWN 2011 +// For compatibility, these go through the COMMAND notification rather than NOTIFY +#define SCEN_CHANGE 768 +#define SCEN_SETFOCUS 512 +#define SCEN_KILLFOCUS 256 + // End of definitions that could be generated from Scintilla.iface +// These structures are defined to be exactly the same shape as the Win32 +// CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs. +// So older code that treats Scintilla as a RichEdit will work. + +struct CharacterRange { + long cpMin; + long cpMax; +}; + +struct TextRange { + CharacterRange chrg; + char *lpstrText; +}; + +struct TextToFind { + CharacterRange chrg; + char *lpstrText; + CharacterRange chrgText; +}; + +struct RangeToFormat { + SurfaceID hdc; + SurfaceID hdcTarget; + PRectangle rc; + PRectangle rcPage; + CharacterRange chrg; +}; + +struct NotifyHeader { + WindowID hwndFrom; + unsigned int idFrom; + unsigned int code; +}; + struct SCNotification { - NMHDR nmhdr; + NotifyHeader nmhdr; int position; // SCN_STYLENEEDED, SCN_MODIFIED int ch; // SCN_CHARADDED, SCN_KEY int modifiers; // SCN_KEY @@ -445,6 +480,75 @@ struct SCNotification { #define SC_MASK_FOLDERS ((1<> 16) +//#define MAKELONG(a, b) ((a) | ((b) << 16)) +//#define LOWORD(x) (x & 0xffff) +//#define HIWORD(x) (x >> 16) #endif -- cgit v1.2.3