diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-19 09:23:09 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-19 09:23:09 +1100 |
commit | 721d52df9cb90af8d1545093a2304023f1affd14 (patch) | |
tree | 1a3e495dd5f055a646af55027c6af58d9665f0d2 | |
parent | 35d3f2be76c7075bf106a246544a002d03a5d042 (diff) | |
download | scintilla-mirror-721d52df9cb90af8d1545093a2304023f1affd14.tar.gz |
Add SupportsFeature API but leave empty for now with no features defined.
-rw-r--r-- | include/Scintilla.h | 1 | ||||
-rw-r--r-- | include/Scintilla.iface | 5 | ||||
-rw-r--r-- | src/Editor.cxx | 7 | ||||
-rw-r--r-- | src/Editor.h | 1 |
4 files changed, 14 insertions, 0 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h index ca79dc7af..0e61d0bbc 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -1018,6 +1018,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_EOLANNOTATIONGETVISIBLE 2746 #define SCI_EOLANNOTATIONSETSTYLEOFFSET 2747 #define SCI_EOLANNOTATIONGETSTYLEOFFSET 2748 +#define SCI_SUPPORTSFEATURE 2750 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 #define SCI_GETLEXER 4002 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index eea7a4336..1fca9bf32 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -2875,6 +2875,11 @@ set void EOLAnnotationSetStyleOffset=2747(int style,) # Get the start of the range of style numbers used for end of line annotations get int EOLAnnotationGetStyleOffset=2748(,) +enu Supports=SC_SUPPORTS_ + +# Get whether a feature is supported +get int SupportsFeature=2750(Supports feature,) + # Start notifying the container of all key presses and commands. fun void StartRecord=3001(,) diff --git a/src/Editor.cxx b/src/Editor.cxx index 786d1bb95..28159fd57 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5177,6 +5177,10 @@ void Editor::QueueIdleWork(WorkNeeded::workItems items, Sci::Position upTo) { workNeeded.Need(items, upTo); } +int Editor::SupportsFeature(int /* feature */) { + return 0; +} + bool Editor::PaintContains(PRectangle rc) { if (rc.Empty()) { return true; @@ -8150,6 +8154,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_ALLOCATEEXTENDEDSTYLES: return vs.AllocateExtendedStyles(static_cast<int>(wParam)); + case SCI_SUPPORTSFEATURE: + return SupportsFeature(static_cast<int>(wParam)); + case SCI_ADDUNDOACTION: pdoc->AddUndoAction(static_cast<Sci::Position>(wParam), lParam & UNDO_MAY_COALESCE); break; diff --git a/src/Editor.h b/src/Editor.h index 60742b403..87a904bf1 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -537,6 +537,7 @@ protected: // ScintillaBase subclass needs access to much of Editor virtual void IdleWork(); virtual void QueueIdleWork(WorkNeeded::workItems items, Sci::Position upTo=0); + virtual int SupportsFeature(int feature); virtual bool PaintContains(PRectangle rc); bool PaintContainsMargin(); void CheckForChangeOutsidePaint(Range r); |