From 4ac2ffc2fe88b80ad44fe495ff71912bceb4375a Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 16 Mar 2021 20:33:48 +1100 Subject: Moved Platform.h to src as it is private to Scintilla. --- gtk/deps.mak | 48 +-- include/Platform.h | 579 ----------------------------- qt/ScintillaEditBase/ScintillaEditBase.pro | 2 +- src/Platform.h | 579 +++++++++++++++++++++++++++++ win32/deps.mak | 48 +-- win32/nmdeps.mak | 48 +-- 6 files changed, 652 insertions(+), 652 deletions(-) delete mode 100644 include/Platform.h create mode 100644 src/Platform.h diff --git a/gtk/deps.mak b/gtk/deps.mak index 19b1ff5b3..ee48fd53e 100644 --- a/gtk/deps.mak +++ b/gtk/deps.mak @@ -1,7 +1,7 @@ # Created by DepGen.py. To recreate, run DepGen.py. PlatGTK.o: \ PlatGTK.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../include/ScintillaWidget.h \ @@ -11,7 +11,7 @@ PlatGTK.o: \ Converter.h ScintillaGTK.o: \ ScintillaGTK.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -51,7 +51,7 @@ ScintillaGTK.o: \ Converter.h ScintillaGTKAccessible.o: \ ScintillaGTKAccessible.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -89,7 +89,7 @@ ScintillaGTKAccessible.o: \ ScintillaGTKAccessible.h AutoComplete.o: \ ../src/AutoComplete.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/CharacterSet.h \ @@ -97,7 +97,7 @@ AutoComplete.o: \ ../src/AutoComplete.h CallTip.o: \ ../src/CallTip.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -113,7 +113,7 @@ CaseFolder.o: \ ../src/CaseConvert.h CellBuffer.o: \ ../src/CellBuffer.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -133,7 +133,7 @@ CharClassify.o: \ ../src/CharClassify.h ContractionState.o: \ ../src/ContractionState.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../src/Position.h \ ../src/UniqueString.h \ ../src/SplitVector.h \ @@ -146,7 +146,7 @@ DBCS.o: \ ../src/DBCS.h Decoration.o: \ ../src/Decoration.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -156,7 +156,7 @@ Decoration.o: \ ../src/Decoration.h Document.o: \ ../src/Document.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -178,7 +178,7 @@ Document.o: \ ../src/ElapsedPeriod.h EditModel.o: \ ../src/EditModel.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -206,7 +206,7 @@ EditModel.o: \ ../src/EditModel.h Editor.o: \ ../src/Editor.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -240,7 +240,7 @@ Editor.o: \ ../src/ElapsedPeriod.h EditView.o: \ ../src/EditView.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -274,7 +274,7 @@ EditView.o: \ ../src/ElapsedPeriod.h Indicator.o: \ ../src/Indicator.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/IntegerRectangle.h \ @@ -282,13 +282,13 @@ Indicator.o: \ ../src/XPM.h KeyMap.o: \ ../src/KeyMap.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/KeyMap.h LineMarker.o: \ ../src/LineMarker.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/IntegerRectangle.h \ @@ -296,7 +296,7 @@ LineMarker.o: \ ../src/LineMarker.h MarginView.o: \ ../src/MarginView.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -327,7 +327,7 @@ MarginView.o: \ ../src/EditView.h PerLine.o: \ ../src/PerLine.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -337,7 +337,7 @@ PerLine.o: \ ../src/PerLine.h PositionCache.o: \ ../src/PositionCache.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -369,7 +369,7 @@ RESearch.o: \ ../src/RESearch.h RunStyles.o: \ ../src/RunStyles.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -378,7 +378,7 @@ RunStyles.o: \ ../src/RunStyles.h ScintillaBase.o: \ ../src/ScintillaBase.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -411,14 +411,14 @@ ScintillaBase.o: \ ../src/ScintillaBase.h Selection.o: \ ../src/Selection.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ ../src/Selection.h Style.o: \ ../src/Style.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Style.h @@ -430,7 +430,7 @@ UniqueString.o: \ ../src/UniqueString.h ViewStyle.o: \ ../src/ViewStyle.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -442,5 +442,5 @@ ViewStyle.o: \ ../src/ViewStyle.h XPM.o: \ ../src/XPM.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../src/XPM.h diff --git a/include/Platform.h b/include/Platform.h deleted file mode 100644 index 628611132..000000000 --- a/include/Platform.h +++ /dev/null @@ -1,579 +0,0 @@ -// Scintilla source code edit control -/** @file Platform.h - ** Interface to platform facilities. Also includes some basic utilities. - ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. - **/ -// Copyright 1998-2009 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#ifndef PLATFORM_H -#define PLATFORM_H - -// PLAT_GTK = GTK+ on Linux or Win32 -// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 -// PLAT_WIN = Win32 API on Win32 OS -// PLAT_WX is wxWindows on any supported platform -// PLAT_TK = Tcl/TK on Linux or Win32 - -#define PLAT_GTK 0 -#define PLAT_GTK_WIN32 0 -#define PLAT_GTK_MACOSX 0 -#define PLAT_MACOSX 0 -#define PLAT_WIN 0 -#define PLAT_WX 0 -#define PLAT_QT 0 -#define PLAT_FOX 0 -#define PLAT_CURSES 0 -#define PLAT_TK 0 -#define PLAT_HAIKU 0 - -#if defined(FOX) -#undef PLAT_FOX -#define PLAT_FOX 1 - -#elif defined(__WX__) -#undef PLAT_WX -#define PLAT_WX 1 - -#elif defined(CURSES) -#undef PLAT_CURSES -#define PLAT_CURSES 1 - -#elif defined(__HAIKU__) -#undef PLAT_HAIKU -#define PLAT_HAIKU 1 - -#elif defined(SCINTILLA_QT) -#undef PLAT_QT -#define PLAT_QT 1 - -#elif defined(TK) -#undef PLAT_TK -#define PLAT_TK 1 - -#elif defined(GTK) -#undef PLAT_GTK -#define PLAT_GTK 1 - -#if defined(__WIN32__) || defined(_MSC_VER) -#undef PLAT_GTK_WIN32 -#define PLAT_GTK_WIN32 1 -#endif - -#if defined(__APPLE__) -#undef PLAT_GTK_MACOSX -#define PLAT_GTK_MACOSX 1 -#endif - -#elif defined(__APPLE__) - -#undef PLAT_MACOSX -#define PLAT_MACOSX 1 - -#else -#undef PLAT_WIN -#define PLAT_WIN 1 - -#endif - -namespace Scintilla { - -typedef float XYPOSITION; -typedef double XYACCUMULATOR; - -// Underlying the implementation of the platform classes are platform specific types. -// Sometimes these need to be passed around by client code so they are defined here - -typedef void *FontID; -typedef void *SurfaceID; -typedef void *WindowID; -typedef void *MenuID; -typedef void *TickerID; -typedef void *Function; -typedef void *IdlerID; - -/** - * A geometric point class. - * Point is similar to the Win32 POINT and GTK+ GdkPoint types. - */ -class Point { -public: - XYPOSITION x; - XYPOSITION y; - - constexpr explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) noexcept : x(x_), y(y_) { - } - - static constexpr Point FromInts(int x_, int y_) noexcept { - return Point(static_cast(x_), static_cast(y_)); - } - - constexpr bool operator!=(Point other) const noexcept { - return (x != other.x) || (y != other.y); - } - - constexpr Point operator+(Point other) const noexcept { - return Point(x + other.x, y + other.y); - } - - constexpr Point operator-(Point other) const noexcept { - return Point(x - other.x, y - other.y); - } - - // Other automatically defined methods (assignment, copy constructor, destructor) are fine -}; - -/** - * A geometric rectangle class. - * PRectangle is similar to Win32 RECT. - * PRectangles contain their top and left sides, but not their right and bottom sides. - */ -class PRectangle { -public: - XYPOSITION left; - XYPOSITION top; - XYPOSITION right; - XYPOSITION bottom; - - constexpr explicit PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_ = 0) noexcept : - left(left_), top(top_), right(right_), bottom(bottom_) { - } - - static constexpr PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept { - return PRectangle(static_cast(left_), static_cast(top_), - static_cast(right_), static_cast(bottom_)); - } - - // Other automatically defined methods (assignment, copy constructor, destructor) are fine - - constexpr bool operator==(const PRectangle &rc) const noexcept { - return (rc.left == left) && (rc.right == right) && - (rc.top == top) && (rc.bottom == bottom); - } - constexpr bool Contains(Point pt) const noexcept { - return (pt.x >= left) && (pt.x <= right) && - (pt.y >= top) && (pt.y <= bottom); - } - constexpr bool ContainsWholePixel(Point pt) const noexcept { - // Does the rectangle contain all of the pixel to left/below the point - return (pt.x >= left) && ((pt.x+1) <= right) && - (pt.y >= top) && ((pt.y+1) <= bottom); - } - constexpr bool Contains(PRectangle rc) const noexcept { - return (rc.left >= left) && (rc.right <= right) && - (rc.top >= top) && (rc.bottom <= bottom); - } - constexpr bool Intersects(PRectangle other) const noexcept { - return (right > other.left) && (left < other.right) && - (bottom > other.top) && (top < other.bottom); - } - void Move(XYPOSITION xDelta, XYPOSITION yDelta) noexcept { - left += xDelta; - top += yDelta; - right += xDelta; - bottom += yDelta; - } - constexpr XYPOSITION Width() const noexcept { return right - left; } - constexpr XYPOSITION Height() const noexcept { return bottom - top; } - constexpr bool Empty() const noexcept { - return (Height() <= 0) || (Width() <= 0); - } -}; - -/** - * Holds an RGB colour with 8 bits for each component. - */ -constexpr const float componentMaximum = 255.0f; -class ColourDesired { - int co; -public: - constexpr explicit ColourDesired(int co_=0) noexcept : co(co_) { - } - - constexpr ColourDesired(unsigned int red, unsigned int green, unsigned int blue) noexcept : - co(red | (green << 8) | (blue << 16)) { - } - - constexpr bool operator==(const ColourDesired &other) const noexcept { - return co == other.co; - } - - constexpr int AsInteger() const noexcept { - return co; - } - - // Red, green and blue values as bytes 0..255 - constexpr unsigned char GetRed() const noexcept { - return co & 0xff; - } - constexpr unsigned char GetGreen() const noexcept { - return (co >> 8) & 0xff; - } - constexpr unsigned char GetBlue() const noexcept { - return (co >> 16) & 0xff; - } - - // Red, green and blue values as float 0..1.0 - constexpr float GetRedComponent() const noexcept { - return GetRed() / componentMaximum; - } - constexpr float GetGreenComponent() const noexcept { - return GetGreen() / componentMaximum; - } - constexpr float GetBlueComponent() const noexcept { - return GetBlue() / componentMaximum; - } -}; - -/** -* Holds an RGBA colour. -*/ -class ColourAlpha : public ColourDesired { -public: - constexpr explicit ColourAlpha(int co_ = 0) noexcept : ColourDesired(co_) { - } - - constexpr ColourAlpha(unsigned int red, unsigned int green, unsigned int blue) noexcept : - ColourDesired(red | (green << 8) | (blue << 16)) { - } - - constexpr ColourAlpha(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha) noexcept : - ColourDesired(red | (green << 8) | (blue << 16) | (alpha << 24)) { - } - - constexpr ColourAlpha(ColourDesired cd, unsigned int alpha) noexcept : - ColourDesired(cd.AsInteger() | (alpha << 24)) { - } - - constexpr ColourDesired GetColour() const noexcept { - return ColourDesired(AsInteger() & 0xffffff); - } - - constexpr unsigned char GetAlpha() const noexcept { - return (AsInteger() >> 24) & 0xff; - } - - constexpr float GetAlphaComponent() const noexcept { - return GetAlpha() / componentMaximum; - } - - constexpr ColourAlpha MixedWith(ColourAlpha other) const noexcept { - const unsigned int red = (GetRed() + other.GetRed()) / 2; - const unsigned int green = (GetGreen() + other.GetGreen()) / 2; - const unsigned int blue = (GetBlue() + other.GetBlue()) / 2; - const unsigned int alpha = (GetAlpha() + other.GetAlpha()) / 2; - return ColourAlpha(red, green, blue, alpha); - } -}; - -/** -* Holds an element of a gradient with an RGBA colour and a relative position. -*/ -class ColourStop { -public: - float position; - ColourAlpha colour; - ColourStop(float position_, ColourAlpha colour_) noexcept : - position(position_), colour(colour_) { - } -}; - -/** - * Font management. - */ - -struct FontParameters { - const char *faceName; - float size; - int weight; - bool italic; - int extraFontFlag; - int technology; - int characterSet; - - FontParameters( - const char *faceName_, - float size_=10, - int weight_=400, - bool italic_=false, - int extraFontFlag_=0, - int technology_=0, - int characterSet_=0) noexcept : - - faceName(faceName_), - size(size_), - weight(weight_), - italic(italic_), - extraFontFlag(extraFontFlag_), - technology(technology_), - characterSet(characterSet_) - { - } - -}; - -class Font { -protected: - FontID fid; -public: - Font() noexcept; - // Deleted so Font objects can not be copied - Font(const Font &) = delete; - Font(Font &&) = delete; - Font &operator=(const Font &) = delete; - Font &operator=(Font &&) = delete; - virtual ~Font(); - - virtual void Create(const FontParameters &fp); - virtual void Release(); - - FontID GetID() const noexcept { return fid; } - // Alias another font - caller guarantees not to Release - void SetID(FontID fid_) noexcept { fid = fid_; } - friend class Surface; - friend class SurfaceImpl; -}; - -class IScreenLine { -public: - virtual std::string_view Text() const = 0; - virtual size_t Length() const = 0; - virtual size_t RepresentationCount() const = 0; - virtual XYPOSITION Width() const = 0; - virtual XYPOSITION Height() const = 0; - virtual XYPOSITION TabWidth() const = 0; - virtual XYPOSITION TabWidthMinimumPixels() const = 0; - virtual const Font *FontOfPosition(size_t position) const = 0; - virtual XYPOSITION RepresentationWidth(size_t position) const = 0; - virtual XYPOSITION TabPositionAfter(XYPOSITION xPosition) const = 0; -}; - -struct Interval { - XYPOSITION left; - XYPOSITION right; -}; - -class IScreenLineLayout { -public: - virtual ~IScreenLineLayout() = default; - virtual size_t PositionFromX(XYPOSITION xDistance, bool charPosition) = 0; - virtual XYPOSITION XFromPosition(size_t caretPosition) = 0; - virtual std::vector FindRangeIntervals(size_t start, size_t end) = 0; -}; - -/** - * A surface abstracts a place to draw. - */ -class Surface { -public: - Surface() noexcept = default; - Surface(const Surface &) = delete; - Surface(Surface &&) = delete; - Surface &operator=(const Surface &) = delete; - Surface &operator=(Surface &&) = delete; - virtual ~Surface() {} - static Surface *Allocate(int technology); - - virtual void Init(WindowID wid)=0; - virtual void Init(SurfaceID sid, WindowID wid)=0; - virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; - - virtual void Release()=0; - virtual bool Initialised()=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, size_t 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, ColourDesired fore, ColourDesired back)=0; - virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill, - ColourDesired outline, int alphaOutline, int flags)=0; - enum class GradientOptions { leftToRight, topToBottom }; - virtual void GradientRectangle(PRectangle rc, const std::vector &stops, GradientOptions options)=0; - virtual void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) = 0; - virtual void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back)=0; - virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; - - virtual std::unique_ptr Layout(const IScreenLine *screenLine) = 0; - - virtual void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) = 0; - virtual void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) = 0; - virtual void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore) = 0; - virtual void MeasureWidths(Font &font_, std::string_view text, XYPOSITION *positions) = 0; - virtual XYPOSITION WidthText(Font &font_, std::string_view text) = 0; - virtual XYPOSITION Ascent(Font &font_)=0; - virtual XYPOSITION Descent(Font &font_)=0; - virtual XYPOSITION InternalLeading(Font &font_)=0; - virtual XYPOSITION Height(Font &font_)=0; - virtual XYPOSITION AverageCharWidth(Font &font_)=0; - - virtual void SetClip(PRectangle rc)=0; - virtual void FlushCachedState()=0; - - virtual void SetUnicodeMode(bool unicodeMode_)=0; - virtual void SetDBCSMode(int codePage)=0; - virtual void SetBidiR2L(bool bidiR2L_)=0; -}; - -/** - * Class to hide the details of window manipulation. - * Does not own the window which will normally have a longer life than this object. - */ -class Window { -protected: - WindowID wid; -public: - Window() noexcept : wid(nullptr), cursorLast(cursorInvalid) { - } - Window(const Window &source) = delete; - Window(Window &&) = delete; - Window &operator=(WindowID wid_) noexcept { - wid = wid_; - cursorLast = cursorInvalid; - return *this; - } - Window &operator=(const Window &) = delete; - Window &operator=(Window &&) = delete; - virtual ~Window(); - WindowID GetID() const noexcept { return wid; } - bool Created() const noexcept { return wid != nullptr; } - void Destroy(); - PRectangle GetPosition() const; - void SetPosition(PRectangle rc); - void SetPositionRelative(PRectangle rc, const Window *relativeTo); - PRectangle GetClientPosition() const; - void Show(bool show=true); - void InvalidateAll(); - void InvalidateRectangle(PRectangle rc); - virtual void SetFont(Font &font); - enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; - void SetCursor(Cursor curs); - PRectangle GetMonitorRect(Point pt); -private: - Cursor cursorLast; -}; - -/** - * Listbox management. - */ - -// ScintillaBase implements IListBoxDelegate to receive ListBoxEvents from a ListBox - -struct ListBoxEvent { - enum class EventType { selectionChange, doubleClick } event; - ListBoxEvent(EventType event_) noexcept : event(event_) { - } -}; - -class IListBoxDelegate { -public: - virtual void ListNotify(ListBoxEvent *plbe)=0; -}; - -class ListBox : public Window { -public: - ListBox() noexcept; - ~ListBox() override; - static ListBox *Allocate(); - - void SetFont(Font &font) override =0; - virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_, int technology_)=0; - virtual void SetAverageCharWidth(int width)=0; - virtual void SetVisibleRows(int rows)=0; - virtual int GetVisibleRows() const=0; - virtual PRectangle GetDesiredRect()=0; - virtual int CaretFromEdge()=0; - virtual void Clear()=0; - virtual void Append(char *s, int type = -1)=0; - virtual int Length()=0; - virtual void Select(int n)=0; - virtual int GetSelection()=0; - virtual int Find(const char *prefix)=0; - virtual void GetValue(int n, char *value, int len)=0; - virtual void RegisterImage(int type, const char *xpm_data)=0; - virtual void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) = 0; - virtual void ClearRegisteredImages()=0; - virtual void SetDelegate(IListBoxDelegate *lbDelegate)=0; - virtual void SetList(const char* list, char separator, char typesep)=0; -}; - -/** - * Menu management. - */ -class Menu { - MenuID mid; -public: - Menu() noexcept; - MenuID GetID() const noexcept { return mid; } - void CreatePopUp(); - void Destroy(); - void Show(Point pt, Window &w); -}; - -/** - * Dynamic Library (DLL/SO/...) loading - */ -class DynamicLibrary { -public: - virtual ~DynamicLibrary() = default; - - /// @return Pointer to function "name", or NULL on failure. - virtual Function FindFunction(const char *name) = 0; - - /// @return true if the library was loaded successfully. - virtual bool IsValid() = 0; - - /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. - static DynamicLibrary *Load(const char *modulePath); -}; - -#if defined(__clang__) -# if __has_feature(attribute_analyzer_noreturn) -# define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) -# else -# define CLANG_ANALYZER_NORETURN -# endif -#else -# define CLANG_ANALYZER_NORETURN -#endif - -/** - * Platform class used to retrieve system wide parameters such as double click speed - * and chrome colour. Not a creatable object, more of a module with several functions. - */ -class Platform { -public: - Platform() = default; - Platform(const Platform &) = delete; - Platform(Platform &&) = delete; - Platform &operator=(const Platform &) = delete; - Platform &operator=(Platform &&) = delete; - ~Platform() = default; - static ColourDesired Chrome(); - static ColourDesired ChromeHighlight(); - static const char *DefaultFont(); - static int DefaultFontSize(); - static unsigned int DoubleClickTime(); - static void DebugDisplay(const char *s); - static constexpr long LongFromTwoShorts(short a,short b) noexcept { - return (a) | ((b) << 16); - } - - static void DebugPrintf(const char *format, ...); - static bool ShowAssertionPopUps(bool assertionPopUps_); - static void Assert(const char *c, const char *file, int line) CLANG_ANALYZER_NORETURN; -}; - -#ifdef NDEBUG -#define PLATFORM_ASSERT(c) ((void)0) -#else -#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__)) -#endif - -} - -#endif diff --git a/qt/ScintillaEditBase/ScintillaEditBase.pro b/qt/ScintillaEditBase/ScintillaEditBase.pro index 9678cc943..8b7a5000a 100644 --- a/qt/ScintillaEditBase/ScintillaEditBase.pro +++ b/qt/ScintillaEditBase/ScintillaEditBase.pro @@ -63,6 +63,7 @@ HEADERS += \ ../../src/RunStyles.h \ ../../src/RESearch.h \ ../../src/PositionCache.h \ + ../../src/Platform.h \ ../../src/PerLine.h \ ../../src/Partitioning.h \ ../../src/LineMarker.h \ @@ -82,7 +83,6 @@ HEADERS += \ ../../src/CallTip.h \ ../../src/AutoComplete.h \ ../../include/Scintilla.h \ - ../../include/Platform.h \ ../../include/ILexer.h OTHER_FILES += diff --git a/src/Platform.h b/src/Platform.h new file mode 100644 index 000000000..628611132 --- /dev/null +++ b/src/Platform.h @@ -0,0 +1,579 @@ +// Scintilla source code edit control +/** @file Platform.h + ** Interface to platform facilities. Also includes some basic utilities. + ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. + **/ +// Copyright 1998-2009 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PLATFORM_H +#define PLATFORM_H + +// PLAT_GTK = GTK+ on Linux or Win32 +// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 +// PLAT_WIN = Win32 API on Win32 OS +// PLAT_WX is wxWindows on any supported platform +// PLAT_TK = Tcl/TK on Linux or Win32 + +#define PLAT_GTK 0 +#define PLAT_GTK_WIN32 0 +#define PLAT_GTK_MACOSX 0 +#define PLAT_MACOSX 0 +#define PLAT_WIN 0 +#define PLAT_WX 0 +#define PLAT_QT 0 +#define PLAT_FOX 0 +#define PLAT_CURSES 0 +#define PLAT_TK 0 +#define PLAT_HAIKU 0 + +#if defined(FOX) +#undef PLAT_FOX +#define PLAT_FOX 1 + +#elif defined(__WX__) +#undef PLAT_WX +#define PLAT_WX 1 + +#elif defined(CURSES) +#undef PLAT_CURSES +#define PLAT_CURSES 1 + +#elif defined(__HAIKU__) +#undef PLAT_HAIKU +#define PLAT_HAIKU 1 + +#elif defined(SCINTILLA_QT) +#undef PLAT_QT +#define PLAT_QT 1 + +#elif defined(TK) +#undef PLAT_TK +#define PLAT_TK 1 + +#elif defined(GTK) +#undef PLAT_GTK +#define PLAT_GTK 1 + +#if defined(__WIN32__) || defined(_MSC_VER) +#undef PLAT_GTK_WIN32 +#define PLAT_GTK_WIN32 1 +#endif + +#if defined(__APPLE__) +#undef PLAT_GTK_MACOSX +#define PLAT_GTK_MACOSX 1 +#endif + +#elif defined(__APPLE__) + +#undef PLAT_MACOSX +#define PLAT_MACOSX 1 + +#else +#undef PLAT_WIN +#define PLAT_WIN 1 + +#endif + +namespace Scintilla { + +typedef float XYPOSITION; +typedef double XYACCUMULATOR; + +// Underlying the implementation of the platform classes are platform specific types. +// Sometimes these need to be passed around by client code so they are defined here + +typedef void *FontID; +typedef void *SurfaceID; +typedef void *WindowID; +typedef void *MenuID; +typedef void *TickerID; +typedef void *Function; +typedef void *IdlerID; + +/** + * A geometric point class. + * Point is similar to the Win32 POINT and GTK+ GdkPoint types. + */ +class Point { +public: + XYPOSITION x; + XYPOSITION y; + + constexpr explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) noexcept : x(x_), y(y_) { + } + + static constexpr Point FromInts(int x_, int y_) noexcept { + return Point(static_cast(x_), static_cast(y_)); + } + + constexpr bool operator!=(Point other) const noexcept { + return (x != other.x) || (y != other.y); + } + + constexpr Point operator+(Point other) const noexcept { + return Point(x + other.x, y + other.y); + } + + constexpr Point operator-(Point other) const noexcept { + return Point(x - other.x, y - other.y); + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine +}; + +/** + * A geometric rectangle class. + * PRectangle is similar to Win32 RECT. + * PRectangles contain their top and left sides, but not their right and bottom sides. + */ +class PRectangle { +public: + XYPOSITION left; + XYPOSITION top; + XYPOSITION right; + XYPOSITION bottom; + + constexpr explicit PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_ = 0) noexcept : + left(left_), top(top_), right(right_), bottom(bottom_) { + } + + static constexpr PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept { + return PRectangle(static_cast(left_), static_cast(top_), + static_cast(right_), static_cast(bottom_)); + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + constexpr bool operator==(const PRectangle &rc) const noexcept { + return (rc.left == left) && (rc.right == right) && + (rc.top == top) && (rc.bottom == bottom); + } + constexpr bool Contains(Point pt) const noexcept { + return (pt.x >= left) && (pt.x <= right) && + (pt.y >= top) && (pt.y <= bottom); + } + constexpr bool ContainsWholePixel(Point pt) const noexcept { + // Does the rectangle contain all of the pixel to left/below the point + return (pt.x >= left) && ((pt.x+1) <= right) && + (pt.y >= top) && ((pt.y+1) <= bottom); + } + constexpr bool Contains(PRectangle rc) const noexcept { + return (rc.left >= left) && (rc.right <= right) && + (rc.top >= top) && (rc.bottom <= bottom); + } + constexpr bool Intersects(PRectangle other) const noexcept { + return (right > other.left) && (left < other.right) && + (bottom > other.top) && (top < other.bottom); + } + void Move(XYPOSITION xDelta, XYPOSITION yDelta) noexcept { + left += xDelta; + top += yDelta; + right += xDelta; + bottom += yDelta; + } + constexpr XYPOSITION Width() const noexcept { return right - left; } + constexpr XYPOSITION Height() const noexcept { return bottom - top; } + constexpr bool Empty() const noexcept { + return (Height() <= 0) || (Width() <= 0); + } +}; + +/** + * Holds an RGB colour with 8 bits for each component. + */ +constexpr const float componentMaximum = 255.0f; +class ColourDesired { + int co; +public: + constexpr explicit ColourDesired(int co_=0) noexcept : co(co_) { + } + + constexpr ColourDesired(unsigned int red, unsigned int green, unsigned int blue) noexcept : + co(red | (green << 8) | (blue << 16)) { + } + + constexpr bool operator==(const ColourDesired &other) const noexcept { + return co == other.co; + } + + constexpr int AsInteger() const noexcept { + return co; + } + + // Red, green and blue values as bytes 0..255 + constexpr unsigned char GetRed() const noexcept { + return co & 0xff; + } + constexpr unsigned char GetGreen() const noexcept { + return (co >> 8) & 0xff; + } + constexpr unsigned char GetBlue() const noexcept { + return (co >> 16) & 0xff; + } + + // Red, green and blue values as float 0..1.0 + constexpr float GetRedComponent() const noexcept { + return GetRed() / componentMaximum; + } + constexpr float GetGreenComponent() const noexcept { + return GetGreen() / componentMaximum; + } + constexpr float GetBlueComponent() const noexcept { + return GetBlue() / componentMaximum; + } +}; + +/** +* Holds an RGBA colour. +*/ +class ColourAlpha : public ColourDesired { +public: + constexpr explicit ColourAlpha(int co_ = 0) noexcept : ColourDesired(co_) { + } + + constexpr ColourAlpha(unsigned int red, unsigned int green, unsigned int blue) noexcept : + ColourDesired(red | (green << 8) | (blue << 16)) { + } + + constexpr ColourAlpha(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha) noexcept : + ColourDesired(red | (green << 8) | (blue << 16) | (alpha << 24)) { + } + + constexpr ColourAlpha(ColourDesired cd, unsigned int alpha) noexcept : + ColourDesired(cd.AsInteger() | (alpha << 24)) { + } + + constexpr ColourDesired GetColour() const noexcept { + return ColourDesired(AsInteger() & 0xffffff); + } + + constexpr unsigned char GetAlpha() const noexcept { + return (AsInteger() >> 24) & 0xff; + } + + constexpr float GetAlphaComponent() const noexcept { + return GetAlpha() / componentMaximum; + } + + constexpr ColourAlpha MixedWith(ColourAlpha other) const noexcept { + const unsigned int red = (GetRed() + other.GetRed()) / 2; + const unsigned int green = (GetGreen() + other.GetGreen()) / 2; + const unsigned int blue = (GetBlue() + other.GetBlue()) / 2; + const unsigned int alpha = (GetAlpha() + other.GetAlpha()) / 2; + return ColourAlpha(red, green, blue, alpha); + } +}; + +/** +* Holds an element of a gradient with an RGBA colour and a relative position. +*/ +class ColourStop { +public: + float position; + ColourAlpha colour; + ColourStop(float position_, ColourAlpha colour_) noexcept : + position(position_), colour(colour_) { + } +}; + +/** + * Font management. + */ + +struct FontParameters { + const char *faceName; + float size; + int weight; + bool italic; + int extraFontFlag; + int technology; + int characterSet; + + FontParameters( + const char *faceName_, + float size_=10, + int weight_=400, + bool italic_=false, + int extraFontFlag_=0, + int technology_=0, + int characterSet_=0) noexcept : + + faceName(faceName_), + size(size_), + weight(weight_), + italic(italic_), + extraFontFlag(extraFontFlag_), + technology(technology_), + characterSet(characterSet_) + { + } + +}; + +class Font { +protected: + FontID fid; +public: + Font() noexcept; + // Deleted so Font objects can not be copied + Font(const Font &) = delete; + Font(Font &&) = delete; + Font &operator=(const Font &) = delete; + Font &operator=(Font &&) = delete; + virtual ~Font(); + + virtual void Create(const FontParameters &fp); + virtual void Release(); + + FontID GetID() const noexcept { return fid; } + // Alias another font - caller guarantees not to Release + void SetID(FontID fid_) noexcept { fid = fid_; } + friend class Surface; + friend class SurfaceImpl; +}; + +class IScreenLine { +public: + virtual std::string_view Text() const = 0; + virtual size_t Length() const = 0; + virtual size_t RepresentationCount() const = 0; + virtual XYPOSITION Width() const = 0; + virtual XYPOSITION Height() const = 0; + virtual XYPOSITION TabWidth() const = 0; + virtual XYPOSITION TabWidthMinimumPixels() const = 0; + virtual const Font *FontOfPosition(size_t position) const = 0; + virtual XYPOSITION RepresentationWidth(size_t position) const = 0; + virtual XYPOSITION TabPositionAfter(XYPOSITION xPosition) const = 0; +}; + +struct Interval { + XYPOSITION left; + XYPOSITION right; +}; + +class IScreenLineLayout { +public: + virtual ~IScreenLineLayout() = default; + virtual size_t PositionFromX(XYPOSITION xDistance, bool charPosition) = 0; + virtual XYPOSITION XFromPosition(size_t caretPosition) = 0; + virtual std::vector FindRangeIntervals(size_t start, size_t end) = 0; +}; + +/** + * A surface abstracts a place to draw. + */ +class Surface { +public: + Surface() noexcept = default; + Surface(const Surface &) = delete; + Surface(Surface &&) = delete; + Surface &operator=(const Surface &) = delete; + Surface &operator=(Surface &&) = delete; + virtual ~Surface() {} + static Surface *Allocate(int technology); + + virtual void Init(WindowID wid)=0; + virtual void Init(SurfaceID sid, WindowID wid)=0; + virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; + + virtual void Release()=0; + virtual bool Initialised()=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, size_t 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, ColourDesired fore, ColourDesired back)=0; + virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill, + ColourDesired outline, int alphaOutline, int flags)=0; + enum class GradientOptions { leftToRight, topToBottom }; + virtual void GradientRectangle(PRectangle rc, const std::vector &stops, GradientOptions options)=0; + virtual void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) = 0; + virtual void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back)=0; + virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; + + virtual std::unique_ptr Layout(const IScreenLine *screenLine) = 0; + + virtual void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) = 0; + virtual void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) = 0; + virtual void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore) = 0; + virtual void MeasureWidths(Font &font_, std::string_view text, XYPOSITION *positions) = 0; + virtual XYPOSITION WidthText(Font &font_, std::string_view text) = 0; + virtual XYPOSITION Ascent(Font &font_)=0; + virtual XYPOSITION Descent(Font &font_)=0; + virtual XYPOSITION InternalLeading(Font &font_)=0; + virtual XYPOSITION Height(Font &font_)=0; + virtual XYPOSITION AverageCharWidth(Font &font_)=0; + + virtual void SetClip(PRectangle rc)=0; + virtual void FlushCachedState()=0; + + virtual void SetUnicodeMode(bool unicodeMode_)=0; + virtual void SetDBCSMode(int codePage)=0; + virtual void SetBidiR2L(bool bidiR2L_)=0; +}; + +/** + * Class to hide the details of window manipulation. + * Does not own the window which will normally have a longer life than this object. + */ +class Window { +protected: + WindowID wid; +public: + Window() noexcept : wid(nullptr), cursorLast(cursorInvalid) { + } + Window(const Window &source) = delete; + Window(Window &&) = delete; + Window &operator=(WindowID wid_) noexcept { + wid = wid_; + cursorLast = cursorInvalid; + return *this; + } + Window &operator=(const Window &) = delete; + Window &operator=(Window &&) = delete; + virtual ~Window(); + WindowID GetID() const noexcept { return wid; } + bool Created() const noexcept { return wid != nullptr; } + void Destroy(); + PRectangle GetPosition() const; + void SetPosition(PRectangle rc); + void SetPositionRelative(PRectangle rc, const Window *relativeTo); + PRectangle GetClientPosition() const; + void Show(bool show=true); + void InvalidateAll(); + void InvalidateRectangle(PRectangle rc); + virtual void SetFont(Font &font); + enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; + void SetCursor(Cursor curs); + PRectangle GetMonitorRect(Point pt); +private: + Cursor cursorLast; +}; + +/** + * Listbox management. + */ + +// ScintillaBase implements IListBoxDelegate to receive ListBoxEvents from a ListBox + +struct ListBoxEvent { + enum class EventType { selectionChange, doubleClick } event; + ListBoxEvent(EventType event_) noexcept : event(event_) { + } +}; + +class IListBoxDelegate { +public: + virtual void ListNotify(ListBoxEvent *plbe)=0; +}; + +class ListBox : public Window { +public: + ListBox() noexcept; + ~ListBox() override; + static ListBox *Allocate(); + + void SetFont(Font &font) override =0; + virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_, int technology_)=0; + virtual void SetAverageCharWidth(int width)=0; + virtual void SetVisibleRows(int rows)=0; + virtual int GetVisibleRows() const=0; + virtual PRectangle GetDesiredRect()=0; + virtual int CaretFromEdge()=0; + virtual void Clear()=0; + virtual void Append(char *s, int type = -1)=0; + virtual int Length()=0; + virtual void Select(int n)=0; + virtual int GetSelection()=0; + virtual int Find(const char *prefix)=0; + virtual void GetValue(int n, char *value, int len)=0; + virtual void RegisterImage(int type, const char *xpm_data)=0; + virtual void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) = 0; + virtual void ClearRegisteredImages()=0; + virtual void SetDelegate(IListBoxDelegate *lbDelegate)=0; + virtual void SetList(const char* list, char separator, char typesep)=0; +}; + +/** + * Menu management. + */ +class Menu { + MenuID mid; +public: + Menu() noexcept; + MenuID GetID() const noexcept { return mid; } + void CreatePopUp(); + void Destroy(); + void Show(Point pt, Window &w); +}; + +/** + * Dynamic Library (DLL/SO/...) loading + */ +class DynamicLibrary { +public: + virtual ~DynamicLibrary() = default; + + /// @return Pointer to function "name", or NULL on failure. + virtual Function FindFunction(const char *name) = 0; + + /// @return true if the library was loaded successfully. + virtual bool IsValid() = 0; + + /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. + static DynamicLibrary *Load(const char *modulePath); +}; + +#if defined(__clang__) +# if __has_feature(attribute_analyzer_noreturn) +# define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) +# else +# define CLANG_ANALYZER_NORETURN +# endif +#else +# define CLANG_ANALYZER_NORETURN +#endif + +/** + * Platform class used to retrieve system wide parameters such as double click speed + * and chrome colour. Not a creatable object, more of a module with several functions. + */ +class Platform { +public: + Platform() = default; + Platform(const Platform &) = delete; + Platform(Platform &&) = delete; + Platform &operator=(const Platform &) = delete; + Platform &operator=(Platform &&) = delete; + ~Platform() = default; + static ColourDesired Chrome(); + static ColourDesired ChromeHighlight(); + static const char *DefaultFont(); + static int DefaultFontSize(); + static unsigned int DoubleClickTime(); + static void DebugDisplay(const char *s); + static constexpr long LongFromTwoShorts(short a,short b) noexcept { + return (a) | ((b) << 16); + } + + static void DebugPrintf(const char *format, ...); + static bool ShowAssertionPopUps(bool assertionPopUps_); + static void Assert(const char *c, const char *file, int line) CLANG_ANALYZER_NORETURN; +}; + +#ifdef NDEBUG +#define PLATFORM_ASSERT(c) ((void)0) +#else +#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__)) +#endif + +} + +#endif diff --git a/win32/deps.mak b/win32/deps.mak index c7f7c748c..0f7bb2937 100644 --- a/win32/deps.mak +++ b/win32/deps.mak @@ -5,7 +5,7 @@ HanjaDic.o: \ HanjaDic.h PlatWin.o: \ PlatWin.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../src/XPM.h \ ../src/UniConversion.h \ ../src/DBCS.h \ @@ -18,7 +18,7 @@ ScintillaDLL.o: \ ScintillaWin.h ScintillaWin.o: \ ScintillaWin.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -57,7 +57,7 @@ ScintillaWin.o: \ ScintillaWin.h AutoComplete.o: \ ../src/AutoComplete.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/CharacterSet.h \ @@ -65,7 +65,7 @@ AutoComplete.o: \ ../src/AutoComplete.h CallTip.o: \ ../src/CallTip.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -81,7 +81,7 @@ CaseFolder.o: \ ../src/CaseConvert.h CellBuffer.o: \ ../src/CellBuffer.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -101,7 +101,7 @@ CharClassify.o: \ ../src/CharClassify.h ContractionState.o: \ ../src/ContractionState.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../src/Position.h \ ../src/UniqueString.h \ ../src/SplitVector.h \ @@ -114,7 +114,7 @@ DBCS.o: \ ../src/DBCS.h Decoration.o: \ ../src/Decoration.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -124,7 +124,7 @@ Decoration.o: \ ../src/Decoration.h Document.o: \ ../src/Document.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -146,7 +146,7 @@ Document.o: \ ../src/ElapsedPeriod.h EditModel.o: \ ../src/EditModel.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -174,7 +174,7 @@ EditModel.o: \ ../src/EditModel.h Editor.o: \ ../src/Editor.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -208,7 +208,7 @@ Editor.o: \ ../src/ElapsedPeriod.h EditView.o: \ ../src/EditView.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -242,7 +242,7 @@ EditView.o: \ ../src/ElapsedPeriod.h Indicator.o: \ ../src/Indicator.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/IntegerRectangle.h \ @@ -250,13 +250,13 @@ Indicator.o: \ ../src/XPM.h KeyMap.o: \ ../src/KeyMap.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/KeyMap.h LineMarker.o: \ ../src/LineMarker.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/IntegerRectangle.h \ @@ -264,7 +264,7 @@ LineMarker.o: \ ../src/LineMarker.h MarginView.o: \ ../src/MarginView.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -295,7 +295,7 @@ MarginView.o: \ ../src/EditView.h PerLine.o: \ ../src/PerLine.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -305,7 +305,7 @@ PerLine.o: \ ../src/PerLine.h PositionCache.o: \ ../src/PositionCache.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -337,7 +337,7 @@ RESearch.o: \ ../src/RESearch.h RunStyles.o: \ ../src/RunStyles.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -346,7 +346,7 @@ RunStyles.o: \ ../src/RunStyles.h ScintillaBase.o: \ ../src/ScintillaBase.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -379,7 +379,7 @@ ScintillaBase.o: \ ../src/ScintillaBase.h ScintillaBaseL.o: \ ../src/ScintillaBase.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -412,14 +412,14 @@ ScintillaBaseL.o: \ ../src/ScintillaBase.h Selection.o: \ ../src/Selection.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ ../src/Selection.h Style.o: \ ../src/Style.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Style.h @@ -431,7 +431,7 @@ UniqueString.o: \ ../src/UniqueString.h ViewStyle.o: \ ../src/ViewStyle.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -443,5 +443,5 @@ ViewStyle.o: \ ../src/ViewStyle.h XPM.o: \ ../src/XPM.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../src/XPM.h diff --git a/win32/nmdeps.mak b/win32/nmdeps.mak index 0f7ab1f33..701731378 100644 --- a/win32/nmdeps.mak +++ b/win32/nmdeps.mak @@ -5,7 +5,7 @@ $(DIR_O)/HanjaDic.obj: \ HanjaDic.h $(DIR_O)/PlatWin.obj: \ PlatWin.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../src/XPM.h \ ../src/UniConversion.h \ ../src/DBCS.h \ @@ -18,7 +18,7 @@ $(DIR_O)/ScintillaDLL.obj: \ ScintillaWin.h $(DIR_O)/ScintillaWin.obj: \ ScintillaWin.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -57,7 +57,7 @@ $(DIR_O)/ScintillaWin.obj: \ ScintillaWin.h $(DIR_O)/AutoComplete.obj: \ ../src/AutoComplete.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/CharacterSet.h \ @@ -65,7 +65,7 @@ $(DIR_O)/AutoComplete.obj: \ ../src/AutoComplete.h $(DIR_O)/CallTip.obj: \ ../src/CallTip.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -81,7 +81,7 @@ $(DIR_O)/CaseFolder.obj: \ ../src/CaseConvert.h $(DIR_O)/CellBuffer.obj: \ ../src/CellBuffer.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -101,7 +101,7 @@ $(DIR_O)/CharClassify.obj: \ ../src/CharClassify.h $(DIR_O)/ContractionState.obj: \ ../src/ContractionState.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../src/Position.h \ ../src/UniqueString.h \ ../src/SplitVector.h \ @@ -114,7 +114,7 @@ $(DIR_O)/DBCS.obj: \ ../src/DBCS.h $(DIR_O)/Decoration.obj: \ ../src/Decoration.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -124,7 +124,7 @@ $(DIR_O)/Decoration.obj: \ ../src/Decoration.h $(DIR_O)/Document.obj: \ ../src/Document.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -146,7 +146,7 @@ $(DIR_O)/Document.obj: \ ../src/ElapsedPeriod.h $(DIR_O)/EditModel.obj: \ ../src/EditModel.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -174,7 +174,7 @@ $(DIR_O)/EditModel.obj: \ ../src/EditModel.h $(DIR_O)/Editor.obj: \ ../src/Editor.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -208,7 +208,7 @@ $(DIR_O)/Editor.obj: \ ../src/ElapsedPeriod.h $(DIR_O)/EditView.obj: \ ../src/EditView.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -242,7 +242,7 @@ $(DIR_O)/EditView.obj: \ ../src/ElapsedPeriod.h $(DIR_O)/Indicator.obj: \ ../src/Indicator.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/IntegerRectangle.h \ @@ -250,13 +250,13 @@ $(DIR_O)/Indicator.obj: \ ../src/XPM.h $(DIR_O)/KeyMap.obj: \ ../src/KeyMap.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/KeyMap.h $(DIR_O)/LineMarker.obj: \ ../src/LineMarker.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/IntegerRectangle.h \ @@ -264,7 +264,7 @@ $(DIR_O)/LineMarker.obj: \ ../src/LineMarker.h $(DIR_O)/MarginView.obj: \ ../src/MarginView.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -295,7 +295,7 @@ $(DIR_O)/MarginView.obj: \ ../src/EditView.h $(DIR_O)/PerLine.obj: \ ../src/PerLine.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -305,7 +305,7 @@ $(DIR_O)/PerLine.obj: \ ../src/PerLine.h $(DIR_O)/PositionCache.obj: \ ../src/PositionCache.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -337,7 +337,7 @@ $(DIR_O)/RESearch.obj: \ ../src/RESearch.h $(DIR_O)/RunStyles.obj: \ ../src/RunStyles.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -346,7 +346,7 @@ $(DIR_O)/RunStyles.obj: \ ../src/RunStyles.h $(DIR_O)/ScintillaBase.obj: \ ../src/ScintillaBase.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -379,7 +379,7 @@ $(DIR_O)/ScintillaBase.obj: \ ../src/ScintillaBase.h $(DIR_O)/ScintillaBaseL.obj: \ ../src/ScintillaBase.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/ILoader.h \ ../include/Sci_Position.h \ ../include/ILexer.h \ @@ -412,14 +412,14 @@ $(DIR_O)/ScintillaBaseL.obj: \ ../src/ScintillaBase.h $(DIR_O)/Selection.obj: \ ../src/Selection.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ ../src/Selection.h $(DIR_O)/Style.obj: \ ../src/Style.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Style.h @@ -431,7 +431,7 @@ $(DIR_O)/UniqueString.obj: \ ../src/UniqueString.h $(DIR_O)/ViewStyle.obj: \ ../src/ViewStyle.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../include/Scintilla.h \ ../include/Sci_Position.h \ ../src/Position.h \ @@ -443,5 +443,5 @@ $(DIR_O)/ViewStyle.obj: \ ../src/ViewStyle.h $(DIR_O)/XPM.obj: \ ../src/XPM.cxx \ - ../include/Platform.h \ + ../src/Platform.h \ ../src/XPM.h -- cgit v1.2.3