summaryrefslogtreecommitdiffstats
path: root/scintilla/include
diff options
context:
space:
mode:
Diffstat (limited to 'scintilla/include')
-rw-r--r--scintilla/include/Accessor.h79
-rw-r--r--scintilla/include/ILexer.h69
-rw-r--r--scintilla/include/KeyWords.h113
-rw-r--r--scintilla/include/PropSet.h26
-rw-r--r--scintilla/include/SciLexer.h32
-rw-r--r--scintilla/include/Scintilla.h25
-rw-r--r--scintilla/include/ScintillaWidget.h2
-rw-r--r--scintilla/include/WindowAccessor.h67
8 files changed, 124 insertions, 289 deletions
diff --git a/scintilla/include/Accessor.h b/scintilla/include/Accessor.h
deleted file mode 100644
index bfe4d4d..0000000
--- a/scintilla/include/Accessor.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Scintilla source code edit control
-/** @file Accessor.h
- ** Rapid easy access to contents of a Scintilla.
- **/
-// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
-// The License.txt file describes the conditions under which this software may be distributed.
-
-enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8};
-
-class Accessor;
-
-typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len);
-
-/**
- * Interface to data in a Scintilla.
- */
-class Accessor {
-protected:
- enum {extremePosition=0x7FFFFFFF};
- /** @a bufferSize is a trade off between time taken to copy the characters
- * and retrieval overhead.
- * @a slopSize positions the buffer before the desired position
- * in case there is some backtracking. */
- enum {bufferSize=4000, slopSize=bufferSize/8};
- char buf[bufferSize+1];
- int startPos;
- int endPos;
- int codePage;
-
- virtual bool InternalIsLeadByte(char ch)=0;
- virtual void Fill(int position)=0;
-
-public:
- Accessor() : startPos(extremePosition), endPos(0), codePage(0) {}
- virtual ~Accessor() {}
- char operator[](int position) {
- if (position < startPos || position >= endPos) {
- Fill(position);
- }
- return buf[position - startPos];
- }
- /** Safe version of operator[], returning a defined value for invalid position. */
- char SafeGetCharAt(int position, char chDefault=' ') {
- if (position < startPos || position >= endPos) {
- Fill(position);
- if (position < startPos || position >= endPos) {
- // Position is outside range of document
- return chDefault;
- }
- }
- return buf[position - startPos];
- }
- bool IsLeadByte(char ch) {
- return codePage && InternalIsLeadByte(ch);
- }
- void SetCodePage(int codePage_) { codePage = codePage_; }
-
- virtual bool Match(int pos, const char *s)=0;
- virtual char StyleAt(int position)=0;
- virtual int GetLine(int position)=0;
- virtual int LineStart(int line)=0;
- virtual int LevelAt(int line)=0;
- virtual int Length()=0;
- virtual void Flush()=0;
- virtual int GetLineState(int line)=0;
- virtual int SetLineState(int line, int state)=0;
- virtual int GetPropertyInt(const char *key, int defaultValue=0)=0;
- virtual char *GetProperties()=0;
-
- // Style setting
- virtual void StartAt(unsigned int start, char chMask=31)=0;
- virtual void SetFlags(char chFlags_, char chWhile_)=0;
- virtual unsigned int GetStartSegment()=0;
- virtual void StartSegment(unsigned int pos)=0;
- virtual void ColourTo(unsigned int pos, int chAttr)=0;
- virtual void SetLevel(int line, int level)=0;
- virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0;
- virtual void IndicatorFill(int start, int end, int indicator, int value)=0;
-};
diff --git a/scintilla/include/ILexer.h b/scintilla/include/ILexer.h
new file mode 100644
index 0000000..15d2c99
--- /dev/null
+++ b/scintilla/include/ILexer.h
@@ -0,0 +1,69 @@
+// Scintilla source code edit control
+/** @file ILexer.h
+ ** Interface between Scintilla and lexers.
+ **/
+// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef ILEXER_H
+#define ILEXER_H
+
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
+#ifdef _WIN32
+ #define SCI_METHOD __stdcall
+#else
+ #define SCI_METHOD
+#endif
+
+enum { dvOriginal=0 };
+
+class IDocument {
+public:
+ virtual int SCI_METHOD Version() const = 0;
+ virtual void SCI_METHOD SetErrorStatus(int status) = 0;
+ virtual int SCI_METHOD Length() const = 0;
+ virtual void SCI_METHOD GetCharRange(char *buffer, int position, int lengthRetrieve) const = 0;
+ virtual char SCI_METHOD StyleAt(int position) const = 0;
+ virtual int SCI_METHOD LineFromPosition(int position) const = 0;
+ virtual int SCI_METHOD LineStart(int line) const = 0;
+ virtual int SCI_METHOD GetLevel(int line) const = 0;
+ virtual int SCI_METHOD SetLevel(int line, int level) = 0;
+ virtual int SCI_METHOD GetLineState(int line) const = 0;
+ virtual int SCI_METHOD SetLineState(int line, int state) = 0;
+ virtual void SCI_METHOD StartStyling(int position, char mask) = 0;
+ virtual bool SCI_METHOD SetStyleFor(int length, char style) = 0;
+ virtual bool SCI_METHOD SetStyles(int length, const char *styles) = 0;
+ virtual void SCI_METHOD DecorationSetCurrentIndicator(int indicator) = 0;
+ virtual void SCI_METHOD DecorationFillRange(int position, int value, int fillLength) = 0;
+ virtual void SCI_METHOD ChangeLexerState(int start, int 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(int line) = 0;
+};
+
+enum { lvOriginal=0 };
+
+class ILexer {
+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 int SCI_METHOD PropertySet(const char *key, const char *val) = 0;
+ virtual const char * SCI_METHOD DescribeWordListSets() = 0;
+ virtual int SCI_METHOD WordListSet(int n, const char *wl) = 0;
+ virtual void SCI_METHOD Lex(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess) = 0;
+ virtual void SCI_METHOD Fold(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess) = 0;
+ virtual void * SCI_METHOD PrivateCall(int operation, void *pointer) = 0;
+};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
+
+#endif
diff --git a/scintilla/include/KeyWords.h b/scintilla/include/KeyWords.h
deleted file mode 100644
index ab9438f..0000000
--- a/scintilla/include/KeyWords.h
+++ /dev/null
@@ -1,113 +0,0 @@
-// Scintilla source code edit control
-/** @file KeyWords.h
- ** Colourise for particular languages.
- **/
-// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
-// The License.txt file describes the conditions under which this software may be distributed.
-
-#ifdef SCI_NAMESPACE
-namespace Scintilla {
-#endif
-
-/**
- */
-class WordList {
-public:
- // Each word contains at least one character - a empty word acts as sentinel at the end.
- char **words;
- char *list;
- int len;
- bool onlyLineEnds; ///< Delimited by any white space or only line ends
- bool sorted;
- int starts[256];
- WordList(bool onlyLineEnds_ = false) :
- words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_),
- sorted(false)
- {}
- ~WordList() { Clear(); }
- operator bool() { return len ? true : false; }
- void Clear();
- void Set(const char *s);
- bool InList(const char *s);
- bool InListAbbreviated(const char *s, const char marker);
-};
-
-typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle,
- WordList *keywordlists[], Accessor &styler);
-
-/**
- * A LexerModule is responsible for lexing and folding a particular language.
- * The class maintains a list of LexerModules which can be searched to find a
- * module appropriate to a particular language.
- */
-class LexerModule {
-protected:
- const LexerModule *next;
- int language;
- LexerFunction fnLexer;
- LexerFunction fnFolder;
- const char * const * wordListDescriptions;
- int styleBits;
-
- static const LexerModule *base;
- static int nextLanguage;
-
-public:
- const char *languageName;
- LexerModule(int language_,
- LexerFunction fnLexer_,
- const char *languageName_=0,
- LexerFunction fnFolder_=0,
- const char * const wordListDescriptions_[] = NULL,
- int styleBits_=5);
- virtual ~LexerModule() {
- }
- int GetLanguage() const { return language; }
-
- // -1 is returned if no WordList information is available
- int GetNumWordLists() const;
- const char *GetWordListDescription(int index) const;
-
- int GetStyleBitsNeeded() const;
-
- virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle,
- WordList *keywordlists[], Accessor &styler) const;
- virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle,
- WordList *keywordlists[], Accessor &styler) const;
- static const LexerModule *Find(int language);
- static const LexerModule *Find(const char *languageName);
-};
-
-#ifdef SCI_NAMESPACE
-}
-#endif
-
-/**
- * Check if a character is a space.
- * This is ASCII specific but is safe with chars >= 0x80.
- */
-inline bool isspacechar(unsigned char ch) {
- return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
-}
-
-inline bool iswordchar(char ch) {
- return isascii(ch) && (isalnum(ch) || ch == '.' || ch == '_');
-}
-
-inline bool iswordstart(char ch) {
- return isascii(ch) && (isalnum(ch) || ch == '_');
-}
-
-inline bool isoperator(char ch) {
- if (isascii(ch) && isalnum(ch))
- return false;
- // '.' left out as it is used to make up numbers
- if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
- ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
- ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
- ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
- ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
- ch == '?' || ch == '!' || ch == '.' || ch == '~')
- return true;
- return false;
-}
diff --git a/scintilla/include/PropSet.h b/scintilla/include/PropSet.h
deleted file mode 100644
index 692044e..0000000
--- a/scintilla/include/PropSet.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Scintilla source code edit control
-/** @file PropSet.h
- ** An interface to the methods needed for access to property sets inside lexers.
- **/
-// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>
-// The License.txt file describes the conditions under which this software may be distributed.
-
-#ifndef PROPSET_H
-#define PROPSET_H
-
-#ifdef SCI_NAMESPACE
-namespace Scintilla {
-#endif
-
-class PropertyGet {
-public:
- virtual char *ToString() const=0; // Caller must delete[] the return value
- virtual int GetInt(const char *key, int defaultValue=0) const=0;
- virtual ~PropertyGet() {}
-};
-
-#ifdef SCI_NAMESPACE
-}
-#endif
-
-#endif
diff --git a/scintilla/include/SciLexer.h b/scintilla/include/SciLexer.h
index 8673799..b9e2a82 100644
--- a/scintilla/include/SciLexer.h
+++ b/scintilla/include/SciLexer.h
@@ -111,7 +111,8 @@
#define SCLEX_NIMROD 96
#define SCLEX_SML 97
#define SCLEX_MARKDOWN 98
-#define SCLEX_AHK 99
+#define SCLEX_TXT2TAGS 99
+#define SCLEX_AHK 100
#define SCLEX_AUTOMATIC 1000
#define SCE_AHK_DEFAULT 0
#define SCE_AHK_COMMENTLINE 1
@@ -1297,6 +1298,9 @@
#define SCE_POWERSHELL_KEYWORD 8
#define SCE_POWERSHELL_CMDLET 9
#define SCE_POWERSHELL_ALIAS 10
+#define SCE_POWERSHELL_FUNCTION 11
+#define SCE_POWERSHELL_USER1 12
+#define SCE_POWERSHELL_COMMENTSTREAM 13
#define SCE_MYSQL_DEFAULT 0
#define SCE_MYSQL_COMMENT 1
#define SCE_MYSQL_COMMENTLINE 2
@@ -1407,6 +1411,32 @@
#define SCE_MARKDOWN_CODE 19
#define SCE_MARKDOWN_CODE2 20
#define SCE_MARKDOWN_CODEBK 21
+#define SCE_TXT2TAGS_DEFAULT 0
+#define SCE_TXT2TAGS_LINE_BEGIN 1
+#define SCE_TXT2TAGS_STRONG1 2
+#define SCE_TXT2TAGS_STRONG2 3
+#define SCE_TXT2TAGS_EM1 4
+#define SCE_TXT2TAGS_EM2 5
+#define SCE_TXT2TAGS_HEADER1 6
+#define SCE_TXT2TAGS_HEADER2 7
+#define SCE_TXT2TAGS_HEADER3 8
+#define SCE_TXT2TAGS_HEADER4 9
+#define SCE_TXT2TAGS_HEADER5 10
+#define SCE_TXT2TAGS_HEADER6 11
+#define SCE_TXT2TAGS_PRECHAR 12
+#define SCE_TXT2TAGS_ULIST_ITEM 13
+#define SCE_TXT2TAGS_OLIST_ITEM 14
+#define SCE_TXT2TAGS_BLOCKQUOTE 15
+#define SCE_TXT2TAGS_STRIKEOUT 16
+#define SCE_TXT2TAGS_HRULE 17
+#define SCE_TXT2TAGS_LINK 18
+#define SCE_TXT2TAGS_CODE 19
+#define SCE_TXT2TAGS_CODE2 20
+#define SCE_TXT2TAGS_CODEBK 21
+#define SCE_TXT2TAGS_COMMENT 22
+#define SCE_TXT2TAGS_OPTION 23
+#define SCE_TXT2TAGS_PREPROC 24
+#define SCE_TXT2TAGS_POSTPROC 25
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
#endif
diff --git a/scintilla/include/Scintilla.h b/scintilla/include/Scintilla.h
index 1c98a88..691b2f5 100644
--- a/scintilla/include/Scintilla.h
+++ b/scintilla/include/Scintilla.h
@@ -91,7 +91,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_SETTABWIDTH 2036
#define SCI_GETTABWIDTH 2121
#define SC_CP_UTF8 65001
-#define SC_CP_DBCS 1
#define SCI_SETCODEPAGE 2037
#define SCI_SETUSEPALETTE 2039
#define MARKER_MAX 31
@@ -669,6 +668,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_FINDCOLUMN 2456
#define SCI_GETCARETSTICKY 2457
#define SCI_SETCARETSTICKY 2458
+#define SC_CARETSTICKY_OFF 0
+#define SC_CARETSTICKY_ON 1
+#define SC_CARETSTICKY_WHITESPACE 2
#define SCI_TOGGLECARETSTICKY 2459
#define SCI_SETPASTECONVERTENDINGS 2467
#define SCI_GETPASTECONVERTENDINGS 2468
@@ -783,6 +785,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETADDITIONALCARETFORE 2605
#define SCI_ROTATESELECTION 2606
#define SCI_SWAPMAINANCHORCARET 2607
+#define SCI_CHANGELEXERSTATE 2617
+#define SCI_CONTRACTEDFOLDNEXT 2618
+#define SCI_VERTICALCENTRECARET 2619
#define SCI_STARTRECORD 3001
#define SCI_STOPRECORD 3002
#define SCI_SETLEXER 4001
@@ -798,6 +803,14 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETPROPERTYINT 4010
#define SCI_GETSTYLEBITSNEEDED 4011
#define SCI_GETLEXERLANGUAGE 4012
+#define SCI_PRIVATELEXERCALL 4013
+#define SCI_PROPERTYNAMES 4014
+#define SC_TYPE_BOOLEAN 0
+#define SC_TYPE_INTEGER 1
+#define SC_TYPE_STRING 2
+#define SCI_PROPERTYTYPE 4015
+#define SCI_DESCRIBEPROPERTY 4016
+#define SCI_DESCRIBEKEYWORDSETS 4017
#define SC_MOD_INSERTTEXT 0x1
#define SC_MOD_DELETETEXT 0x2
#define SC_MOD_CHANGESTYLE 0x4
@@ -817,7 +830,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_MOD_CHANGEMARGIN 0x10000
#define SC_MOD_CHANGEANNOTATION 0x20000
#define SC_MOD_CONTAINER 0x40000
-#define SC_MODEVENTMASKALL 0x7FFFF
+#define SC_MOD_LEXERSTATE 0x80000
+#define SC_MODEVENTMASKALL 0xFFFFF
#define SCEN_CHANGE 768
#define SCEN_SETFOCUS 512
#define SCEN_KILLFOCUS 256
@@ -872,6 +886,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCN_INDICATORRELEASE 2024
#define SCN_AUTOCCANCELLED 2025
#define SCN_AUTOCCHARDELETED 2026
+#define SCN_HOTSPOTRELEASECLICK 2027
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
/* These structures are defined to be exactly the same shape as the Win32
@@ -962,4 +977,10 @@ struct SCNotification {
}
#endif
+#ifdef INCLUDE_DEPRECATED_FEATURES
+
+#define SC_CP_DBCS 1
+
+#endif
+
#endif
diff --git a/scintilla/include/ScintillaWidget.h b/scintilla/include/ScintillaWidget.h
index 44cff60..3a3c7ca 100644
--- a/scintilla/include/ScintillaWidget.h
+++ b/scintilla/include/ScintillaWidget.h
@@ -15,7 +15,7 @@
extern "C" {
#endif
-#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject)
+#define SCINTILLA(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, scintilla_get_type (), ScintillaObject)
#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass)
#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ())
diff --git a/scintilla/include/WindowAccessor.h b/scintilla/include/WindowAccessor.h
deleted file mode 100644
index ed67e29..0000000
--- a/scintilla/include/WindowAccessor.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Scintilla source code edit control
-/** @file WindowAccessor.h
- ** Implementation of BufferAccess and StylingAccess on a Scintilla
- ** rapid easy access to contents of a Scintilla.
- **/
-// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
-// The License.txt file describes the conditions under which this software may be distributed.
-
-#ifdef SCI_NAMESPACE
-namespace Scintilla {
-#endif
-
-/**
- */
-
-class WindowAccessor : public Accessor {
- // Private so WindowAccessor objects can not be copied
- WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {}
- WindowAccessor &operator=(const WindowAccessor &) { return *this; }
-protected:
- WindowID id;
- PropertyGet &props;
- int lenDoc;
-
- char styleBuf[bufferSize];
- int validLen;
- char chFlags;
- char chWhile;
- unsigned int startSeg;
-
- bool InternalIsLeadByte(char ch);
- void Fill(int position);
-public:
- WindowAccessor(WindowID id_, PropertyGet &props_) :
- Accessor(), id(id_), props(props_),
- lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
- }
- ~WindowAccessor();
- bool Match(int pos, const char *s);
- char StyleAt(int position);
- int GetLine(int position);
- int LineStart(int line);
- int LevelAt(int line);
- int Length();
- void Flush();
- int GetLineState(int line);
- int SetLineState(int line, int state);
- int GetPropertyInt(const char *key, int defaultValue=0) {
- return props.GetInt(key, defaultValue);
- }
- char *GetProperties() {
- return props.ToString();
- }
-
- void StartAt(unsigned int start, char chMask=31);
- void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }
- unsigned int GetStartSegment() { return startSeg; }
- void StartSegment(unsigned int pos);
- void ColourTo(unsigned int pos, int chAttr);
- void SetLevel(int line, int level);
- int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
- void IndicatorFill(int start, int end, int indicator, int value);
-};
-
-#ifdef SCI_NAMESPACE
-}
-#endif