aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/PlatGTK.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-19 14:12:20 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-19 14:12:20 +1100
commit6b444111ecfe47a3f94293c3959cf197e3415735 (patch)
treebf90b6915dcb2f45f22d3e2377a4252ec80c9259 /gtk/PlatGTK.cxx
parent9659ea34246320bd9872740d1ee6a5c9ae9066c6 (diff)
downloadscintilla-mirror-6b444111ecfe47a3f94293c3959cf197e3415735.tar.gz
Add Platform::Supports for SupportsFeature API.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rwxr-xr-xgtk/PlatGTK.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index 6aed67ba5..19b25294b 100755
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -151,6 +151,7 @@ public:
void Clear() noexcept;
void Release() noexcept override;
+ int Supports(int feature) noexcept override;
bool Initialised() override;
void PenColour(ColourDesired fore) override;
int LogPixelsY() override;
@@ -190,6 +191,11 @@ public:
void SetDBCSMode(int codePage) override;
void SetBidiR2L(bool bidiR2L_) override;
};
+
+const int SupportsGTK[] = {
+ SC_SUPPORTS_LINE_DRAWS_FINAL,
+};
+
}
const char *CharacterSetID(int characterSet) noexcept {
@@ -367,6 +373,14 @@ void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID
et = surfImpl->et;
}
+int SurfaceImpl::Supports(int feature) noexcept {
+ for (const int f : SupportsGTK) {
+ if (f == feature)
+ return 1;
+ }
+ return 0;
+}
+
void SurfaceImpl::PenColour(ColourDesired fore) {
if (context) {
const ColourDesired cdFore(fore.AsInteger());