aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2023-09-27 15:45:05 +1000
committerNeil Hodgson <nyamatongwe@gmail.com>2023-09-27 15:45:05 +1000
commite1fe0a2bb0f5fc078f719198276757e4319e0e43 (patch)
treea0e846192c47440a787bc1f512dbc27071ffd806
parent2ce3269bf0331da6b23cfcc7d954dc7bad33518d (diff)
downloadscintilla-mirror-e1fe0a2bb0f5fc078f719198276757e4319e0e43.tar.gz
Deprecated methods disableFlushWindow and enableFlushWindow are avoided on
macOS 10.14+. Test application contains example calls that exercize this when available.
-rw-r--r--cocoa/ScintillaTest/AppController.mm4
-rw-r--r--cocoa/ScintillaView.mm15
-rw-r--r--doc/ScintillaHistory.html11
3 files changed, 26 insertions, 4 deletions
diff --git a/cocoa/ScintillaTest/AppController.mm b/cocoa/ScintillaTest/AppController.mm
index c835ba0de..9356ce1b8 100644
--- a/cocoa/ScintillaTest/AppController.mm
+++ b/cocoa/ScintillaTest/AppController.mm
@@ -116,6 +116,8 @@ const char user_keywords[] = // Definition of own keywords, not used by MySQL.
}
}
+ [mEditor suspendDrawing: TRUE];
+
// Keywords to highlight. Indices are:
// 0 - Major keywords (reserved keywords)
// 1 - Normal keywords (everything not reserved but integral part of the language)
@@ -219,6 +221,8 @@ const char user_keywords[] = // Definition of own keywords, not used by MySQL.
// Uncomment if you wanna see auto wrapping in action.
//[mEditor setGeneralProperty: SCI_SETWRAPMODE parameter: SC_WRAP_WORD value: 0];
+ [mEditor suspendDrawing: FALSE];
+
InfoBar* infoBar = [[[InfoBar alloc] initWithFrame: NSMakeRect(0, 0, 400, 0)] autorelease];
[infoBar setDisplay: IBShowAll];
[mEditor setInfoBar: infoBar top: NO];
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index 54988f650..cee96def5 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -1349,10 +1349,17 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) {
* (like clearing all marks and setting new ones etc.).
*/
- (void) suspendDrawing: (BOOL) suspend {
- if (suspend)
- [self.window disableFlushWindow];
- else
- [self.window enableFlushWindow];
+ if (@available(macOS 10.14, *)) {
+ // Don't try where deprecated
+ } else {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+ if (suspend)
+ [self.window disableFlushWindow];
+ else
+ [self.window enableFlushWindow];
+#pragma GCC diagnostic pop
+ }
}
//--------------------------------------------------------------------------------------------------
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 27a9a259b..bfa7ab60a 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -584,6 +584,17 @@
</table>
<h2>Releases</h2>
<h3>
+ <a href="https://www.scintilla.org/scintilla538.zip">Release 5.3.8</a>
+ </h3>
+ <ul>
+ <li>
+ Released 22 September 2023.
+ </li>
+ <li>
+ For Cocoa, do nothing for suspendDrawing on macOS 10.14+ as the underlying calls have been deprecated.
+ </li>
+ </ul>
+ <h3>
<a href="https://www.scintilla.org/scintilla537.zip">Release 5.3.7</a>
</h3>
<ul>