diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-20 12:10:14 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-20 12:10:14 +1100 |
commit | 2813306346e4087679915c2b30f1be4949f0228a (patch) | |
tree | b503f9539900c5623f50e8d6a88da14df7e9ed24 /cocoa/PlatCocoa.h | |
parent | 2f0011955fe7d3ac0b80247abc88ee0461104eb6 (diff) | |
download | scintilla-mirror-2813306346e4087679915c2b30f1be4949f0228a.tar.gz |
Use SurfaceMode struct as a way to inform Surface of modes like code page and
bidirectional options in an extensible way instead of adding a call for each
element.
Diffstat (limited to 'cocoa/PlatCocoa.h')
-rw-r--r-- | cocoa/PlatCocoa.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cocoa/PlatCocoa.h b/cocoa/PlatCocoa.h index 1df4e0458..040821cb8 100644 --- a/cocoa/PlatCocoa.h +++ b/cocoa/PlatCocoa.h @@ -41,7 +41,7 @@ namespace Scintilla { // A class to do the actual text rendering for us using Quartz 2D. class SurfaceImpl : public Surface { private: - bool unicodeMode; + SurfaceMode mode; float x; float y; @@ -49,7 +49,6 @@ private: /** The text layout instance */ std::unique_ptr<QuartzTextLayout> textLayout; - int codePage; int verticalDeviceResolution; /** If the surface is a bitmap context, contains a reference to the bitmap data. */ @@ -71,6 +70,7 @@ private: static const int BITS_PER_PIXEL = BITS_PER_COMPONENT * 4; static const int BYTES_PER_PIXEL = BITS_PER_PIXEL / 8; + bool UnicodeMode() const noexcept; void Clear(); public: @@ -82,6 +82,8 @@ public: void InitPixMap(int width, int height, Surface *surface_, WindowID wid) override; CGContextRef GetContext() { return gc; } + void SetMode(SurfaceMode mode) override; + void Release() noexcept override; int Supports(int feature) noexcept override; bool Initialised() override; |