Skip to content

Commit

Permalink
Bumped Scintilla from 1.77 to 4.4.6 (mhammond#2425)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Nov 12, 2024
1 parent b64bccb commit 68aaa09
Show file tree
Hide file tree
Showing 279 changed files with 84,562 additions and 27,380 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ https://mhammond.github.io/pywin32_installers.html.
Coming in build 309, as yet unreleased
--------------------------------------

* Pythonwin: Bumped Scintilla from 1.77 to 4.4.6. The full changelog can be found here: https://www.scintilla.org/ScintillaHistory.html
* Fixed `ddeclient` and `ddeserver` demos import error (#2290, @Avasam)
* The `EvtSubscribe_push` demo now actually demonstrates the callback action and the event context being filled. (#2281, @Avasam)
* Fixed Pythonwin's editor failing due to invalid regex import (#2419, @Avasam)
Expand Down
28 changes: 14 additions & 14 deletions Pythonwin/Scintilla/License.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ License for Scintilla and SciTE

Copyright 1998-2003 by Neil Hodgson <[email protected]>

All Rights Reserved
All Rights Reserved

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.

NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
OR PERFORMANCE OF THIS SOFTWARE.
NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
OR PERFORMANCE OF THIS SOFTWARE.
75 changes: 55 additions & 20 deletions Pythonwin/Scintilla/README
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@ README for building of Scintilla and SciTE
Scintilla can be built by itself.
To build SciTE, Scintilla must first be built.

Lexers can be either compiled into Scintilla or built separately into a Lexilla
shared library.
A separate Lexilla is the preferred option and will become the only supported
direction in Scintilla 5.0.
See lexilla/src/README for information on building Lexilla.

*** GTK+/Linux version ***

You must first have GTK+ 1.2 or later and GCC (3.1 or better) installed.
GTK+ 1.0x will not work and when it did it was very slow.
You must first have GTK+ 2.24 or later and GCC (7.1 or better) installed.
Clang may be used by adding CLANG=1 to the make command line.
Other C++ compilers may work but may require tweaking the make file.
Either GTK+ 2.x or 3.x may be used with 2.x the default and 3.x
chosen with the make argument GTK3=1.

To build Scintilla, use the makefile located in the scintilla/gtk directory
cd scintilla/gtk
Expand All @@ -18,7 +25,7 @@ To build Scintilla, use the makefile located in the scintilla/gtk directory
To build and install SciTE, use the makefile located in the scite/gtk directory
cd scite/gtk
make
make install
sudo make install

This installs SciTE into $prefix/bin. The value of $prefix is determined from
the location of Gnome if it is installed. This is usually /usr if installed
Expand All @@ -29,12 +36,8 @@ and make install as this location is compiled into the executable. The global
properties file is installed at $prefix/share/scite/SciTEGlobal.properties.
The language specific properties files are also installed into this directory.

To build Scintilla for GTK+ 1 rather than the default GTK+ 2, define GTK1 on
the make command line:
make GTK1=1

To remove SciTE
make uninstall
sudo make uninstall

To clean the object files which may be needed to change $prefix
make clean
Expand All @@ -44,26 +47,58 @@ The current make file only supports static linking between SciTE and Scintilla.

*** Windows version ***

A C++ compiler is required. Visual Studio .NET 2008 is the development system
used for most development although Mingw32 3.1 is also supported.
Borland did work but the command lines are now too long and the most recent
Borland version does not work. For older versions such as version 5.02, add the -l option.
A C++ 17 compiler is required.
Visual Studio 2017 is the development system used for most development
although Mingw-w64 7.1 is also supported.

There are versions of Scintilla with lexers (SciLexer.DLL) and without lexers
(Scintilla.DLL). Make builds both versions.

To build Scintilla, make in the scintilla/win32 directory
cd scintilla\win32
GCC: mingw32-make
VS .NET: nmake -f scintilla.mak
VC++ 6: nmake -f scintilla_vc6.mak
Borland: make -fscintilla.mak
Visual C++: nmake -f scintilla.mak
cd ..\..

To build SciTE, use the makefiles located in the scite/win32 directory
cd scite\win32
GCC: mingw32-make
VS .NET: nmake -f scite.mak
Borland: make -fscite.mak
Visual C++: nmake -f scite.mak

An executable SciTE will now be in scite/bin.

*** GTK+/Windows version ***

Mingw-w64 is known to work. Other compilers will probably not work.

Only Scintilla will build with GTK+ on Windows. SciTE will not work.

Make builds both a static library version of Scintilla with lexers (scintilla.a) and
a shared library without lexers (libscintilla.so or or libscintilla.dll).

To build Scintilla, make in the scintilla/gtk directory
cd scintilla\gtk
mingw32-make

*** macOS Cocoa version ***

Xcode 9.2 or later may be used to build Scintilla on macOS.

There is no open source version of SciTE for macOS but there is a commercial
version available through the App Store.

There are versions of Scintilla.framework with lexers (ScintillaFramework) and
without lexers (Scintilla).

To build Scintilla, run xcodebuild in the scintilla/cocoa/ScintillaFramework or
scintilla/cocoa/Scintilla directory

cd cocoa/Scintilla
or
cd cocoa/ScintillaFramework

xcodebuild

An executable SciTE will now be in scite\bin.
*** Qt version ***

The Visual C++ 6.0 project (.dsp) files are no longer supported but are left
in the download for people that are prepared to update them.
See the qt/README file to build Scintilla with Qt.
15 changes: 10 additions & 5 deletions Pythonwin/Scintilla/README_pythonwin
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
This is a copy of Scintilla 1.77 used for Pythonwin.
This is a copy of Scintilla 4.4.6 used for Pythonwin.

Scintilla's home is www.scintilla.org
Scintilla's home is https://www.scintilla.org/

Only the sources relevant to Scintilla under Pythonwin are
included (plus the Scintilla licence and readme). For the
full set of Scintilla sources, including its documentation and
companion editor Scite, see www.scintilla.org.
included (plus the Scintilla Licence.txt and README).
For the full set of Scintilla sources, including its documentation
and companion editor SciTE, see https://www.scintilla.org/.

When updating the Scintilla source, also update the copyright year
in Pythonwin/pywin/framework/app.py and regenerate
Pythonwin/pywin/scintilla/scintillacon.py using h2py:
https://github.com/python/cpython/blob/3.8/Tools/scripts/h2py.py
79 changes: 0 additions & 79 deletions Pythonwin/Scintilla/include/Accessor.h

This file was deleted.

85 changes: 85 additions & 0 deletions Pythonwin/Scintilla/include/ILexer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// Scintilla source code edit control
/** @file ILexer.h
** Interface between Scintilla and lexers.
**/
// Copyright 1998-2010 by Neil Hodgson <[email protected]>
// The License.txt file describes the conditions under which this software may be distributed.

#ifndef ILEXER_H
#define ILEXER_H

#include "Sci_Position.h"

namespace Scintilla {

enum { dvRelease4=2 };

class IDocument {
public:
virtual int SCI_METHOD Version() const = 0;
virtual void SCI_METHOD SetErrorStatus(int status) = 0;
virtual Sci_Position SCI_METHOD Length() const = 0;
virtual void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const = 0;
virtual char SCI_METHOD StyleAt(Sci_Position position) const = 0;
virtual Sci_Position SCI_METHOD LineFromPosition(Sci_Position position) const = 0;
virtual Sci_Position SCI_METHOD LineStart(Sci_Position line) const = 0;
virtual int SCI_METHOD GetLevel(Sci_Position line) const = 0;
virtual int SCI_METHOD SetLevel(Sci_Position line, int level) = 0;
virtual int SCI_METHOD GetLineState(Sci_Position line) const = 0;
virtual int SCI_METHOD SetLineState(Sci_Position line, int state) = 0;
virtual void SCI_METHOD StartStyling(Sci_Position position) = 0;
virtual bool SCI_METHOD SetStyleFor(Sci_Position length, char style) = 0;
virtual bool SCI_METHOD SetStyles(Sci_Position length, const char *styles) = 0;
virtual void SCI_METHOD DecorationSetCurrentIndicator(int indicator) = 0;
virtual void SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) = 0;
virtual void SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end) = 0;
virtual int SCI_METHOD CodePage() const = 0;
virtual bool SCI_METHOD IsDBCSLeadByte(char ch) const = 0;
virtual const char * SCI_METHOD BufferPointer() = 0;
virtual int SCI_METHOD GetLineIndentation(Sci_Position line) = 0;
virtual Sci_Position SCI_METHOD LineEnd(Sci_Position line) const = 0;
virtual Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const = 0;
virtual int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const = 0;
};

enum { lvRelease4=2, lvRelease5=3 };

class ILexer4 {
public:
virtual int SCI_METHOD Version() const = 0;
virtual void SCI_METHOD Release() = 0;
virtual const char * SCI_METHOD PropertyNames() = 0;
virtual int SCI_METHOD PropertyType(const char *name) = 0;
virtual const char * SCI_METHOD DescribeProperty(const char *name) = 0;
virtual Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) = 0;
virtual const char * SCI_METHOD DescribeWordListSets() = 0;
virtual Sci_Position SCI_METHOD WordListSet(int n, const char *wl) = 0;
virtual void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0;
virtual void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0;
virtual void * SCI_METHOD PrivateCall(int operation, void *pointer) = 0;
virtual int SCI_METHOD LineEndTypesSupported() = 0;
virtual int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) = 0;
virtual int SCI_METHOD SubStylesStart(int styleBase) = 0;
virtual int SCI_METHOD SubStylesLength(int styleBase) = 0;
virtual int SCI_METHOD StyleFromSubStyle(int subStyle) = 0;
virtual int SCI_METHOD PrimaryStyleFromStyle(int style) = 0;
virtual void SCI_METHOD FreeSubStyles() = 0;
virtual void SCI_METHOD SetIdentifiers(int style, const char *identifiers) = 0;
virtual int SCI_METHOD DistanceToSecondaryStyles() = 0;
virtual const char * SCI_METHOD GetSubStyleBases() = 0;
virtual int SCI_METHOD NamedStyles() = 0;
virtual const char * SCI_METHOD NameOfStyle(int style) = 0;
virtual const char * SCI_METHOD TagsOfStyle(int style) = 0;
virtual const char * SCI_METHOD DescriptionOfStyle(int style) = 0;
};

class ILexer5 : public ILexer4 {
public:
virtual const char * SCI_METHOD GetName() = 0;
virtual int SCI_METHOD GetIdentifier() = 0;
virtual const char * SCI_METHOD PropertyGet(const char *key) = 0;
};

}

#endif
21 changes: 21 additions & 0 deletions Pythonwin/Scintilla/include/ILoader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Scintilla source code edit control
/** @file ILoader.h
** Interface for loading into a Scintilla document from a background thread.
**/
// Copyright 1998-2017 by Neil Hodgson <[email protected]>
// The License.txt file describes the conditions under which this software may be distributed.

#ifndef ILOADER_H
#define ILOADER_H

#include "Sci_Position.h"

class ILoader {
public:
virtual int SCI_METHOD Release() = 0;
// Returns a status code from SC_STATUS_*
virtual int SCI_METHOD AddData(const char *data, Sci_Position length) = 0;
virtual void * SCI_METHOD ConvertToDocument() = 0;
};

#endif
Loading

0 comments on commit 68aaa09

Please sign in to comment.