From 7e624907cde7c97d9f97e14584655c1350ac6078 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 18 Sep 2013 10:40:53 +1000 Subject: Reimplement notifications from ScintillaCocoa to ScintillaView as a delegate relationship using ScintillaNotificationProtocol. Add optional command:idFrom: method to ScintillaNotificationProtocol for command notifications. In a future version registerNotifyCallback: and ScintillaCocoa::RegisterNotifyCallback will be deprecated. --- cocoa/ScintillaCocoa.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cocoa/ScintillaCocoa.h') diff --git a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h index 4842e2098..c857fd21a 100644 --- a/cocoa/ScintillaCocoa.h +++ b/cocoa/ScintillaCocoa.h @@ -86,6 +86,9 @@ private: TimerTarget* timerTarget; NSEvent* lastMouseEvent; + id delegate; + bool delegateHasCommand; + SciNotifyFunc notifyProc; intptr_t notifyObj; @@ -123,6 +126,7 @@ public: ScintillaCocoa(InnerView* view, MarginView* viewMargin); virtual ~ScintillaCocoa(); + void SetDelegate(id delegate_); void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback); sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); -- cgit v1.2.3