diff options
| author | Neil <nyamatongwe@gmail.com> | 2021-03-19 14:12:20 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2021-03-19 14:12:20 +1100 |
| commit | 6b444111ecfe47a3f94293c3959cf197e3415735 (patch) | |
| tree | bf90b6915dcb2f45f22d3e2377a4252ec80c9259 /cocoa | |
| parent | 9659ea34246320bd9872740d1ee6a5c9ae9066c6 (diff) | |
| download | scintilla-mirror-6b444111ecfe47a3f94293c3959cf197e3415735.tar.gz | |
Add Platform::Supports for SupportsFeature API.
Diffstat (limited to 'cocoa')
| -rw-r--r-- | cocoa/PlatCocoa.h | 1 | ||||
| -rw-r--r-- | cocoa/PlatCocoa.mm | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/cocoa/PlatCocoa.h b/cocoa/PlatCocoa.h index 0117fcc15..18d339536 100644 --- a/cocoa/PlatCocoa.h +++ b/cocoa/PlatCocoa.h @@ -79,6 +79,7 @@ public: CGContextRef GetContext() { return gc; } void Release() noexcept override; + int Supports(int feature) noexcept override; bool Initialised() override; void PenColour(ColourDesired fore) override; diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 2f8778d11..33c24397f 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -319,6 +319,10 @@ void GetPositions(CTLineRef line, std::vector<CGFloat> &positions) { positions.begin(), std::plus<CGFloat>()); } +const int SupportsCocoa[] = { + SC_SUPPORTS_LINE_DRAWS_FINAL, +}; + } //----------------- SurfaceImpl -------------------------------------------------------------------- @@ -452,6 +456,16 @@ void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID //-------------------------------------------------------------------------------------------------- +int SurfaceImpl::Supports(int feature) noexcept { + for (const int f : SupportsCocoa) { + if (f == feature) + return 1; + } + return 0; +} + +//-------------------------------------------------------------------------------------------------- + void SurfaceImpl::PenColour(ColourDesired fore) { if (gc) { ColourDesired colour(fore.AsInteger()); |
