aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2000-07-21 14:08:48 +0000
committernyamatongwe <unknown>2000-07-21 14:08:48 +0000
commit1e00d4f26ac7e2a7ac67195c0a3516f832edf34c (patch)
treee5927c2d2a712fe9860974ac5c49140e1d95ad77
parent642a1a3531a028121777286b878541e014feac56 (diff)
downloadscintilla-mirror-1e00d4f26ac7e2a7ac67195c0a3516f832edf34c.tar.gz
Added SCI_GETDIRECTFUNCTION and SCI_GETDIRECTPOINTER to remove Windows
SendMessage intermediary code between client and Scintilla.
-rw-r--r--include/Scintilla.h3
-rw-r--r--win32/ScintillaWin.cxx13
2 files changed, 16 insertions, 0 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 4a812fc0e..7a7ee8c05 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -520,6 +520,9 @@ struct SCNotification {
#define SCI_PASTE 5026
#define SCI_SETTEXT 5027
+#define SCI_GETDIRECTFUNCTION 5040
+#define SCI_GETDIRECTPOINTER 5041
+
#define SCFIND_MATCHCASE 4
#define SCFIND_WHOLEWORD 2
#define SCFIND_DOWN 1
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index bd4254830..8d4d8f8cf 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -114,6 +114,8 @@ class ScintillaWin :
virtual void Initialise();
virtual void Finalise();
+ static LRESULT DirectFunction(
+ ScintillaWin *sci, UINT iMessage, WPARAM wParam, LPARAM lParam);
static LRESULT PASCAL SWndProc(
HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam);
static LRESULT PASCAL CTWndProc(
@@ -556,6 +558,12 @@ LRESULT ScintillaWin::WndProc(unsigned int iMessage, unsigned long wParam, long
case WM_WINDOWPOSCHANGED:
return ::DefWindowProc(wMain.GetID(), iMessage, wParam, lParam);
+ case SCI_GETDIRECTFUNCTION:
+ return reinterpret_cast<LRESULT>(DirectFunction);
+
+ case SCI_GETDIRECTPOINTER:
+ return reinterpret_cast<LRESULT>(this);
+
default:
return ScintillaBase::WndProc(iMessage, wParam, lParam);
}
@@ -1528,6 +1536,11 @@ LRESULT PASCAL ScintillaWin::CTWndProc(
}
}
+LRESULT ScintillaWin::DirectFunction(
+ ScintillaWin *sci, UINT iMessage, WPARAM wParam, LPARAM lParam) {
+ return sci->WndProc(iMessage, wParam, lParam);
+}
+
LRESULT PASCAL ScintillaWin::SWndProc(
HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) {
//Platform::DebugPrintf("S W:%x M:%x WP:%x L:%x\n", hWnd, iMessage, wParam, lParam);