aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Platform.h109
-rw-r--r--include/Scintilla.h4
-rw-r--r--include/Scintilla.iface16
3 files changed, 22 insertions, 107 deletions
diff --git a/include/Platform.h b/include/Platform.h
index 499e78e5d..654c4870a 100644
--- a/include/Platform.h
+++ b/include/Platform.h
@@ -139,18 +139,6 @@ public:
};
/**
- * In some circumstances, including Win32 in paletted mode and GTK+, each colour
- * must be allocated before use. The desired colours are held in the ColourDesired class,
- * and after allocation the allocation entry is stored in the ColourAllocated class. In other
- * circumstances, such as Win32 in true colour mode, the allocation process just copies
- * the RGB values from the desired to the allocated class.
- * As each desired colour requires allocation before it can be used, the ColourPair class
- * holds both a ColourDesired and a ColourAllocated
- * The Palette class is responsible for managing the palette of colours which contains a
- * list of ColourPair objects and performs the allocation.
- */
-
-/**
* Holds a desired RGB colour.
*/
class ColourDesired {
@@ -215,80 +203,6 @@ public:
};
/**
- * Holds an allocated RGB colour which may be an approximation to the desired colour.
- */
-class ColourAllocated {
- long coAllocated;
-
-public:
-
- ColourAllocated(long lcol=0) {
- coAllocated = lcol;
- }
-
- void Set(long lcol) {
- coAllocated = lcol;
- }
-
- long AsLong() const {
- return coAllocated;
- }
-};
-
-/**
- * Colour pairs hold a desired colour and an allocated colour.
- */
-struct ColourPair {
- ColourDesired desired;
- ColourAllocated allocated;
-
- ColourPair(ColourDesired desired_=ColourDesired(0,0,0)) {
- desired = desired_;
- allocated.Set(desired.AsLong());
- }
- void Copy() {
- allocated.Set(desired.AsLong());
- }
-};
-
-class Window; // Forward declaration for Palette
-
-/**
- * Colour palette management.
- */
-class Palette {
- int used;
- int size;
- ColourPair *entries;
-#if PLAT_GTK
- void *allocatedPalette; // GdkColor *
- int allocatedLen;
-#endif
- // Private so Palette objects can not be copied
- Palette(const Palette &);
- Palette &operator=(const Palette &);
-public:
-#if PLAT_WIN
- void *hpal;
-#endif
- bool allowRealization;
-
- Palette();
- ~Palette();
-
- void Release();
-
- /**
- * This method either adds a colour to the list of wanted colours (want==true)
- * or retrieves the allocated colour back to the ColourPair.
- * This is one method to make it easier to keep the code for wanting and retrieving in sync.
- */
- void WantFind(ColourPair &cp, bool want);
-
- void Allocate(Window &w);
-};
-
-/**
* Font management.
*/
@@ -367,25 +281,25 @@ public:
virtual void Release()=0;
virtual bool Initialised()=0;
- virtual void PenColour(ColourAllocated fore)=0;
+ virtual void PenColour(ColourDesired fore)=0;
virtual int LogPixelsY()=0;
virtual int DeviceHeightFont(int points)=0;
virtual void MoveTo(int x_, int y_)=0;
virtual void LineTo(int x_, int y_)=0;
- virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0;
- virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0;
- virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0;
+ virtual void Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back)=0;
+ virtual void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back)=0;
+ virtual void FillRectangle(PRectangle rc, ColourDesired back)=0;
virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0;
- virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0;
- virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill,
- ColourAllocated outline, int alphaOutline, int flags)=0;
+ virtual void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back)=0;
+ virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill,
+ ColourDesired outline, int alphaOutline, int flags)=0;
virtual void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) = 0;
- virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0;
+ virtual void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back)=0;
virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0;
- virtual void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0;
- virtual void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0;
- virtual void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourAllocated fore)=0;
+ virtual void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0;
+ virtual void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0;
+ virtual void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore)=0;
virtual void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions)=0;
virtual XYPOSITION WidthText(Font &font_, const char *s, int len)=0;
virtual XYPOSITION WidthChar(Font &font_, char ch)=0;
@@ -396,7 +310,6 @@ public:
virtual XYPOSITION Height(Font &font_)=0;
virtual XYPOSITION AverageCharWidth(Font &font_)=0;
- virtual int SetPalette(Palette *pal, bool inBackGround)=0;
virtual void SetClip(PRectangle rc)=0;
virtual void FlushCachedState()=0;
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 9b99436ff..10f290822 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -92,7 +92,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETTABWIDTH 2121
#define SC_CP_UTF8 65001
#define SCI_SETCODEPAGE 2037
-#define SCI_SETUSEPALETTE 2039
#define MARKER_MAX 31
#define SC_MARK_CIRCLE 0
#define SC_MARK_ROUNDRECT 1
@@ -337,7 +336,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETLINEENDPOSITION 2136
#define SCI_GETCODEPAGE 2137
#define SCI_GETCARETFORE 2138
-#define SCI_GETUSEPALETTE 2139
#define SCI_GETREADONLY 2140
#define SCI_SETCURRENTPOS 2141
#define SCI_SETSELECTIONSTART 2142
@@ -1041,6 +1039,8 @@ struct SCNotification {
#ifdef INCLUDE_DEPRECATED_FEATURES
#define SC_CP_DBCS 1
+#define SCI_SETUSEPALETTE 2039
+#define SCI_GETUSEPALETTE 2139
#endif
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index aa0f030dd..e77675567 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -228,10 +228,6 @@ val SC_CP_UTF8=65001
# The SC_CP_UTF8 value can be used to enter Unicode mode.
set void SetCodePage=2037(int codePage,)
-# In palette mode, Scintilla uses the environment's palette calls to display
-# more colours. This may lead to ugly displays.
-set void SetUsePalette=2039(bool usePalette,)
-
enu MarkerSymbol=SC_MARK_
val MARKER_MAX=31
val SC_MARK_CIRCLE=0
@@ -801,9 +797,6 @@ get int GetCodePage=2137(,)
# Get the foreground colour of the caret.
get colour GetCaretFore=2138(,)
-# In palette mode?
-get bool GetUsePalette=2139(,)
-
# In read-only mode?
get bool GetReadOnly=2140(,)
@@ -4037,3 +4030,12 @@ cat Deprecated
# Deprecated in 2.21
# The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+.
val SC_CP_DBCS=1
+
+# Deprecated in 2.30
+
+# In palette mode?
+get bool GetUsePalette=2139(,)
+
+# In palette mode, Scintilla uses the environment's palette calls to display
+# more colours. This may lead to ugly displays.
+set void SetUsePalette=2039(bool usePalette,)