aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-20 12:10:14 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-20 12:10:14 +1100
commit2813306346e4087679915c2b30f1be4949f0228a (patch)
treeb503f9539900c5623f50e8d6a88da14df7e9ed24 /src
parent2f0011955fe7d3ac0b80247abc88ee0461104eb6 (diff)
downloadscintilla-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 'src')
-rw-r--r--src/Platform.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Platform.h b/src/Platform.h
index 568c571cc..3afa24c92 100644
--- a/src/Platform.h
+++ b/src/Platform.h
@@ -163,6 +163,17 @@ public:
};
/**
+ * Parameters for surfaces.
+ */
+struct SurfaceMode {
+ int codePage = 0;
+ bool bidiR2L = false;
+ SurfaceMode() = default;
+ explicit SurfaceMode(int codePage_, bool bidiR2L_) noexcept : codePage(codePage_), bidiR2L(bidiR2L_) {
+ }
+};
+
+/**
* A surface abstracts a place to draw.
*/
class Surface {
@@ -179,6 +190,8 @@ public:
virtual void Init(SurfaceID sid, WindowID wid)=0;
virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0;
+ virtual void SetMode(SurfaceMode mode)=0;
+
enum class Ends {
semiCircles = 0x0,
leftFlat = 0x1,