From 24ac7c2923e2de7bc3d60679e7b6755f7a7077f3 Mon Sep 17 00:00:00 2001
From: nyamatongwe Scintilla can handle the major line end conventions and, depending on settings and
- the current lexer also support additional Unicode line ends. Scintilla can handle the major line end conventions and, depending on settings and
+ the current lexer also support additional Unicode line ends. Scintilla can interpret any of the Macintosh (\r), Unix (\n) and Windows (\r\n)
line ends.
@@ -2187,10 +2193,12 @@ struct Sci_TextToFind {
entire document to one of these line endings with For the UTF-8 encoding, three additional Unicode line ends,
Next Line ( SCI_SETEOLMODE(int eolMode) SCI_GETLINEENDTYPESSUPPORTED SCI_GETLINEENDTYPESACTIVE
o GTK+
+ o Provisional messages
+
o Deprecated messages
- o Edit messages never
- supported by Scintilla
-
+
@@ -2176,8 +2182,8 @@ struct Sci_TextToFind {
o Edit messages never
+ supported by Scintilla
+
o Building Scintilla
+
Line endings
- SCI_CONVERTEOLS. Finally, you
can choose to display the line endings with SCI_SETVIEWEOL.NEL=U+0085), Line Separator (LS=U+2028), and Paragraph Separator (PS=U+2029)
may optionally be interpreted when Unicode line ends is turned on and the current lexer also supports
Unicode line ends.
@@ -2198,10 +2206,12 @@ struct Sci_TextToFind {
+
+
@@ -2224,6 +2234,9 @@ struct Sci_TextToFind {
(CR), (LF), or (CR)(LF). SCI_GETVIEWEOL
returns the current state.
+
SCI_GETLINEENDTYPESSUPPORTED reports the different types of line ends supported
by the current lexer. This is a bit set although there is currently only a single choice
@@ -2240,6 +2253,7 @@ struct Sci_TextToFind {
SCI_GETLINEENDTYPESACTIVE reports the set of line ends currently interpreted
by Scintilla. It is SCI_GETLINEENDTYPESSUPPORTED & SCI_GETLINEENDTYPESALLOWED.Styling
@@ -5672,6 +5686,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
*keyWordList)
+
@@ -5679,6 +5694,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
+
Lexers may support several different sublanguages and each sublanguage may want to style some number of sets of identifiers (or similar lexemes such as documentation keywords) uniquely. Preallocating a large number for each purpose would exhaust the number of allowed styles quickly. @@ -5852,6 +5870,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
SCI_SETIDENTIFIERS(int style, const char *identifiers)
Similar to SCI_SETKEYWORDS but for substyles.
+
To allow lexers to report which line ends they support, and to support substyles,
Ilexer is extended to ILexerWithSubStyles.
void scintilla_release_resources()
Call this to free any remaining resources after all the Scintilla widgets have been destroyed.
Complex new features may be added as 'provisional' to allow further changes to the API. + Provisional features may even be removed if experience shows they are a mistake.
+ +Provisional features are displayed in this document with a distinctive background colour.
+ +Some developers may want to only use features that are stable and have graduated from
+ provisional status. To avoid using provisional messages compile with the symbol
+ SCI_DISABLE_PROVISIONAL defined.
The following messages are currently supported to emulate existing Windows controls, but diff --git a/include/HFacer.py b/include/HFacer.py index 074ce96be..aa6b0f0a2 100755 --- a/include/HFacer.py +++ b/include/HFacer.py @@ -20,9 +20,13 @@ def printLexHFile(f,out): out.write("#define " + name + " " + v["Value"] + "\n") def printHFile(f,out): + previousCategory = "" for name in f.order: v = f.features[name] if v["Category"] != "Deprecated": + if v["Category"] == "Provisional" and previousCategory != "Provisional": + out.write("#ifndef SCI_DISABLE_PROVISIONAL\n") + previousCategory = v["Category"] if v["FeatureType"] in ["fun", "get", "set"]: featureDefineName = "SCI_" + name.upper() out.write("#define " + featureDefineName + " " + v["Value"] + "\n") @@ -32,6 +36,7 @@ def printHFile(f,out): elif v["FeatureType"] in ["val"]: if not (Contains(name, "SCE_") or Contains(name, "SCLEX_")): out.write("#define " + name + " " + v["Value"] + "\n") + out.write("#endif\n") def CopyWithInsertion(input, output, genfn, definition): copying = 1 diff --git a/include/Scintilla.h b/include/Scintilla.h index f763002f5..32956e6ba 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -855,11 +855,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_VCHOMEDISPLAYEXTEND 2653 #define SCI_GETCARETLINEVISIBLEALWAYS 2654 #define SCI_SETCARETLINEVISIBLEALWAYS 2655 -#define SC_LINE_END_TYPE_DEFAULT 0 -#define SC_LINE_END_TYPE_UNICODE 1 -#define SCI_SETLINEENDTYPESALLOWED 2656 -#define SCI_GETLINEENDTYPESALLOWED 2657 -#define SCI_GETLINEENDTYPESACTIVE 2658 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 #define SCI_SETLEXER 4001 @@ -883,14 +878,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_PROPERTYTYPE 4015 #define SCI_DESCRIBEPROPERTY 4016 #define SCI_DESCRIBEKEYWORDSETS 4017 -#define SCI_GETLINEENDTYPESSUPPORTED 4018 -#define SCI_ALLOCATESUBSTYLES 4020 -#define SCI_GETSUBSTYLESSTART 4021 -#define SCI_GETSUBSTYLESLENGTH 4022 -#define SCI_FREESUBSTYLES 4023 -#define SCI_SETIDENTIFIERS 4024 -#define SCI_DISTANCETOSECONDARYSTYLES 4025 -#define SCI_GETSUBSTYLEBASES 4026 #define SC_MOD_INSERTTEXT 0x1 #define SC_MOD_DELETETEXT 0x2 #define SC_MOD_CHANGESTYLE 0x4 @@ -972,6 +959,21 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCN_AUTOCCANCELLED 2025 #define SCN_AUTOCCHARDELETED 2026 #define SCN_HOTSPOTRELEASECLICK 2027 +#ifndef SCI_DISABLE_PROVISIONAL +#define SC_LINE_END_TYPE_DEFAULT 0 +#define SC_LINE_END_TYPE_UNICODE 1 +#define SCI_SETLINEENDTYPESALLOWED 2656 +#define SCI_GETLINEENDTYPESALLOWED 2657 +#define SCI_GETLINEENDTYPESACTIVE 2658 +#define SCI_GETLINEENDTYPESSUPPORTED 4018 +#define SCI_ALLOCATESUBSTYLES 4020 +#define SCI_GETSUBSTYLESSTART 4021 +#define SCI_GETSUBSTYLESLENGTH 4022 +#define SCI_FREESUBSTYLES 4023 +#define SCI_SETIDENTIFIERS 4024 +#define SCI_DISTANCETOSECONDARYSTYLES 4025 +#define SCI_GETSUBSTYLEBASES 4026 +#endif /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ /* These structures are defined to be exactly the same shape as the Win32 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 714f3ee93..db4adbde9 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -2273,22 +2273,6 @@ get bool GetCaretLineVisibleAlways=2654(,) # Sets the caret line to always visible. set void SetCaretLineVisibleAlways=2655(bool alwaysVisible,) -# Line end types which may be used in addition to LF, CR, and CRLF -# SC_LINE_END_TYPE_UNICODE includes U+2028 Line Separator, -# U+2029 Paragraph Separator, and U+0085 Next Line -enu LineEndType=SC_LINE_END_TYPE_ -val SC_LINE_END_TYPE_DEFAULT=0 -val SC_LINE_END_TYPE_UNICODE=1 - -# Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. -set void SetLineEndTypesAllowed=2656(int lineEndBitSet,) - -# Get the line end types currently allowed. -get int GetLineEndTypesAllowed=2657(,) - -# Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. -get int GetLineEndTypesActive=2658(,) - # Start notifying the container of all key presses and commands. fun void StartRecord=3001(,) @@ -2357,32 +2341,6 @@ fun int DescribeProperty=4016(string name, stringresult description) # Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. fun int DescribeKeyWordSets=4017(, stringresult descriptions) -# Bit set of LineEndType enumertion for which line ends beyond the standard -# LF, CR, and CRLF are supported by the lexer. -get int GetLineEndTypesSupported=4018(,) - -# Allocate a set of sub styles for a particular base style, returning start of range -fun int AllocateSubStyles=4020(int styleBase, int numberStyles) - -# The starting style number for the sub styles associated with a base style -get int GetSubStylesStart=4021(int styleBase,) - -# The number of sub styles associated with a base style -get int GetSubStylesLength=4022(int styleBase,) - -# Free allocated sub styles -fun void FreeSubStyles=4023(,) - -# Set the identifiers that are shown in a particular style -set void SetIdentifiers=4024(int style, string identifiers) - -# Where styles are duplicated by a feature such as active/inactive code -# return the distance between the two types. -get int DistanceToSecondaryStyles=4025(,) - -# Get the set of base styles that can be extended with sub styles -get int GetSubStyleBases=4026(, stringresult styles) - # Notifications # Type of modification and the action which caused the modification. # These are defined as a bit mask to make it easy to specify which notifications are wanted. @@ -4292,6 +4250,50 @@ evt void AutoCCancelled=2025(void) evt void AutoCCharDeleted=2026(void) evt void HotSpotReleaseClick=2027(int modifiers, int position) +cat Provisional + +# Line end types which may be used in addition to LF, CR, and CRLF +# SC_LINE_END_TYPE_UNICODE includes U+2028 Line Separator, +# U+2029 Paragraph Separator, and U+0085 Next Line +enu LineEndType=SC_LINE_END_TYPE_ +val SC_LINE_END_TYPE_DEFAULT=0 +val SC_LINE_END_TYPE_UNICODE=1 + +# Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. +set void SetLineEndTypesAllowed=2656(int lineEndBitSet,) + +# Get the line end types currently allowed. +get int GetLineEndTypesAllowed=2657(,) + +# Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. +get int GetLineEndTypesActive=2658(,) + +# Bit set of LineEndType enumertion for which line ends beyond the standard +# LF, CR, and CRLF are supported by the lexer. +get int GetLineEndTypesSupported=4018(,) + +# Allocate a set of sub styles for a particular base style, returning start of range +fun int AllocateSubStyles=4020(int styleBase, int numberStyles) + +# The starting style number for the sub styles associated with a base style +get int GetSubStylesStart=4021(int styleBase,) + +# The number of sub styles associated with a base style +get int GetSubStylesLength=4022(int styleBase,) + +# Free allocated sub styles +fun void FreeSubStyles=4023(,) + +# Set the identifiers that are shown in a particular style +set void SetIdentifiers=4024(int style, string identifiers) + +# Where styles are duplicated by a feature such as active/inactive code +# return the distance between the two types. +get int DistanceToSecondaryStyles=4025(,) + +# Get the set of base styles that can be extended with sub styles +get int GetSubStyleBases=4026(, stringresult styles) + cat Deprecated # Deprecated in 2.21 -- cgit v1.2.3