diff --git a/.gitignore b/.gitignore index 8ac06ab..8e82056 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,4 @@ UpgradeLog*.XML *.pyc Visual Studio Project Template C#/$projectname$.sln +.vscode/launch.json diff --git a/ToolsForMaintainersOfTheProjectTemplate/Scintilla_iface_synchronizer/Face.py b/ToolsForMaintainersOfTheProjectTemplate/Scintilla_iface_synchronizer/Face.py index 9c4c936..2453a96 100644 --- a/ToolsForMaintainersOfTheProjectTemplate/Scintilla_iface_synchronizer/Face.py +++ b/ToolsForMaintainersOfTheProjectTemplate/Scintilla_iface_synchronizer/Face.py @@ -50,6 +50,10 @@ def ReadFromFile(self, name): currentCategory = "" currentComment = [] currentCommentFinished = 0 + import os, os.path, inspect + if '__file__' not in locals(): + __file__ = inspect.getframeinfo(inspect.currentframe())[0] + os.chdir(os.path.dirname(os.path.realpath(__file__))) file = open(name) for line in file.readlines(): line = sanitiseLine(line) diff --git a/ToolsForMaintainersOfTheProjectTemplate/Scintilla_iface_synchronizer/cs.py b/ToolsForMaintainersOfTheProjectTemplate/Scintilla_iface_synchronizer/cs.py index b645633..18db666 100644 --- a/ToolsForMaintainersOfTheProjectTemplate/Scintilla_iface_synchronizer/cs.py +++ b/ToolsForMaintainersOfTheProjectTemplate/Scintilla_iface_synchronizer/cs.py @@ -35,12 +35,12 @@ def isTypeUnsupported(t): if t in ["formatrange"]: return True return False -def translateType(t): +def translateType(t:str): if t == "cells": return "Cells" if t == "colour": return "Colour" - if t == "line": return "int" + if t == "line": return "long" if t == "pointer": return "IntPtr" - if t == "position": return "int" + if t == "position": return "long" if t == "textrange": return "TextRange" if t == "findtext": return "TextToFind" if t == "keymod": return "KeyModifier" @@ -81,7 +81,7 @@ def getUnsafeModifier(returnType, param1Type, param2Type): def translateReturnType(v, param1Type, param2Type): if param1Type == "stringresult" or param2Type == "stringresult": return "string" - else: + else: return translateType(v["ReturnType"]) def getParameterList(param1Type, param1Name, param2Type, param2Name): @@ -100,6 +100,7 @@ def printEnumDefinitions(f): if v["FeatureType"] in ["enu"] and name not in ["Keys"]: # for all except excluded enums [conflicting] appendComment(indent, out, v) prefix = v["Value"] + out.append(indent + "[Flags]") out.append(indent + "public enum " + name) out.append(indent + "{") for ename in f.order: @@ -189,10 +190,6 @@ def printLexGatewayFile(f): out.append(iindent + "return 1 == (int)" +res+ ";") elif returnType == "Colour": out.append(iindent + "return new Colour((int) " +res+ ");") - # elif returnType == "Line": - # out.append(iindent + "return new Line((int) " +res+ ");") - # elif returnType == "Position": - # out.append(iindent + "return new Position((int) " +res+ ");") elif returnType == "string": out.append(iindent + res + ";") out.append(iindent + "return Encoding.UTF8.GetString("+bufferVariableName+").TrimEnd('\\0');") diff --git a/Visual Studio Project Template C#/PluginInfrastructure/GatewayDomain.cs b/Visual Studio Project Template C#/PluginInfrastructure/GatewayDomain.cs index af8fd5b..c212616 100644 --- a/Visual Studio Project Template C#/PluginInfrastructure/GatewayDomain.cs +++ b/Visual Studio Project Template C#/PluginInfrastructure/GatewayDomain.cs @@ -63,14 +63,19 @@ public int Value /// public class Position : IEquatable { - private readonly int pos; + private readonly long pos; - public Position(int pos) + public Position(long pos) { this.pos = pos; } - public int Value + public Position(IntPtr pos) + { + this.pos = IntPtr.Size == sizeof(Int32)? pos.ToInt32(): pos.ToInt64(); + } + + public long Value { get { return pos; } } @@ -147,7 +152,7 @@ public override bool Equals(object obj) public override int GetHashCode() { - return pos; + return (int)pos; } } @@ -262,9 +267,9 @@ public void Dispose() } } - - /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ + /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ /// Is undo history being collected? (Scintilla feature SCWS_) + [Flags] public enum WhiteSpace { INVISIBLE = 0, @@ -273,12 +278,14 @@ public enum WhiteSpace VISIBLEONLYININDENT = 3 } /// Make white space characters invisible, always visible or visible outside indentation. (Scintilla feature SCTD_) + [Flags] public enum TabDrawMode { LONGARROW = 0, STRIKEOUT = 1 } /// Retrieve the position of the last correctly styled character. (Scintilla feature SC_EOL_) + [Flags] public enum EndOfLine { CRLF = 0, @@ -290,12 +297,14 @@ public enum EndOfLine /// The SC_CP_UTF8 value can be used to enter Unicode mode. /// (Scintilla feature SC_IME_) /// + [Flags] public enum IMEInteraction { WINDOWED = 0, INLINE = 1 } /// Choose to display the the IME in a winow or inline. (Scintilla feature SC_MARK_) + [Flags] public enum MarkerSymbol { CIRCLE = 0, @@ -334,6 +343,7 @@ public enum MarkerSymbol CHARACTER = 10000 } /// Invisible mark that only sets the line background colour. (Scintilla feature SC_MARKNUM_) + [Flags] public enum MarkerOutline { FOLDEREND = 25, @@ -345,6 +355,7 @@ public enum MarkerOutline FOLDEROPEN = 31 } /// Set the alpha used for a marker that is drawn in the text area, not the margin. (Scintilla feature SC_MARGIN_) + [Flags] public enum MarginType { SYMBOL = 0, @@ -356,6 +367,7 @@ public enum MarginType COLOUR = 6 } /// Styles in range 32..39 are predefined for parts of the UI and are not used as normal styles. (Scintilla feature STYLE_) + [Flags] public enum StylesCommon { DEFAULT = 32, @@ -374,6 +386,7 @@ public enum StylesCommon /// The values are the same as the Windows *_CHARSET values. /// (Scintilla feature SC_CHARSET_) /// + [Flags] public enum CharacterSet { ANSI = 0, @@ -400,6 +413,7 @@ public enum CharacterSet _8859_15 = 1000 } /// Set a style to be underlined or not. (Scintilla feature SC_CASE_) + [Flags] public enum CaseVisible { MIXED = 0, @@ -408,6 +422,7 @@ public enum CaseVisible CAMEL = 3 } /// Get the size of characters of a style in points multiplied by 100 (Scintilla feature SC_WEIGHT_) + [Flags] public enum FontWeight { NORMAL = 400, @@ -415,6 +430,7 @@ public enum FontWeight BOLD = 700 } /// Indicator style enumeration and some constants (Scintilla feature INDIC_) + [Flags] public enum IndicatorStyle { PLAIN = 0, @@ -450,6 +466,7 @@ public enum IndicatorStyle /// They are redeclared in IndicatorNumbers INDICATOR_. /// (Scintilla feature INDICATOR_) /// + [Flags] public enum IndicatorNumbers { CONTAINER = 8, @@ -458,17 +475,20 @@ public enum IndicatorNumbers MAX = 35 } /// Retrieve the foreground hover colour of an indicator. (Scintilla feature SC_INDICVALUE) + [Flags] public enum IndicValue { BIT = 0x1000000, MASK = 0xFFFFFF } /// Retrieve the foreground hover colour of an indicator. (Scintilla feature SC_INDICFLAG_) + [Flags] public enum IndicFlag { VALUEFORE = 1 } /// Is the horizontal scroll bar visible? (Scintilla feature SC_IV_) + [Flags] public enum IndentView { NONE = 0, @@ -477,6 +497,7 @@ public enum IndentView LOOKBOTH = 3 } /// Returns the print magnification. (Scintilla feature SC_PRINT_) + [Flags] public enum PrintOption { NORMAL = 0, @@ -487,6 +508,7 @@ public enum PrintOption SCREENCOLOURS = 5 } /// Returns the print colour mode. (Scintilla feature SCFIND_) + [Flags] public enum FindOption { NONE = 0x0, @@ -498,6 +520,7 @@ public enum FindOption CXX11REGEX = 0x00800000 } /// The number of display lines needed to wrap a document line (Scintilla feature SC_FOLDLEVEL) + [Flags] public enum FoldLevel { BASE = 0x400, @@ -506,6 +529,7 @@ public enum FoldLevel NUMBERMASK = 0x0FFF } /// Switch a header line between expanded and contracted and show some text after the line. (Scintilla feature SC_FOLDDISPLAYTEXT_) + [Flags] public enum FoldDisplayTextStyle { HIDDEN = 0, @@ -513,6 +537,7 @@ public enum FoldDisplayTextStyle BOXED = 2 } /// Get the default fold display text. (Scintilla feature SC_FOLDACTION_) + [Flags] public enum FoldAction { CONTRACT = 0, @@ -520,6 +545,7 @@ public enum FoldAction TOGGLE = 2 } /// Ensure a particular line is visible by expanding any header line hiding it. (Scintilla feature SC_AUTOMATICFOLD_) + [Flags] public enum AutomaticFold { SHOW = 0x0001, @@ -527,6 +553,7 @@ public enum AutomaticFold CHANGE = 0x0004 } /// Get automatic folding behaviours. (Scintilla feature SC_FOLDFLAG_) + [Flags] public enum FoldFlag { LINEBEFORE_EXPANDED = 0x0002, @@ -537,6 +564,7 @@ public enum FoldFlag LINESTATE = 0x0080 } /// Is the range start..end considered a word? (Scintilla feature SC_IDLESTYLING_) + [Flags] public enum IdleStyling { NONE = 0, @@ -545,6 +573,7 @@ public enum IdleStyling ALL = 3 } /// Retrieve the limits to idle styling. (Scintilla feature SC_WRAP_) + [Flags] public enum Wrap { NONE = 0, @@ -553,6 +582,7 @@ public enum Wrap WHITESPACE = 3 } /// Retrieve whether text is word wrapped. (Scintilla feature SC_WRAPVISUALFLAG_) + [Flags] public enum WrapVisualFlag { NONE = 0x0000, @@ -561,6 +591,7 @@ public enum WrapVisualFlag MARGIN = 0x0004 } /// Retrive the display mode of visual flags for wrapped lines. (Scintilla feature SC_WRAPVISUALFLAGLOC_) + [Flags] public enum WrapVisualLocation { DEFAULT = 0x0000, @@ -568,6 +599,7 @@ public enum WrapVisualLocation START_BY_TEXT = 0x0002 } /// Retrive the start indent for wrapped lines. (Scintilla feature SC_WRAPINDENT_) + [Flags] public enum WrapIndentMode { FIXED = 0, @@ -576,6 +608,7 @@ public enum WrapIndentMode DEEPINDENT = 3 } /// Retrieve how wrapped sublines are placed. Default is fixed. (Scintilla feature SC_CACHE_) + [Flags] public enum LineCache { NONE = 0, @@ -584,6 +617,7 @@ public enum LineCache DOCUMENT = 3 } /// Append a string to the end of the document without changing the selection. (Scintilla feature SC_PHASES_) + [Flags] public enum PhasesDraw { ONE = 0, @@ -591,6 +625,7 @@ public enum PhasesDraw MULTIPLE = 2 } /// Control font anti-aliasing. (Scintilla feature SC_EFF_) + [Flags] public enum FontQuality { QUALITY_MASK = 0xF, @@ -600,18 +635,21 @@ public enum FontQuality QUALITY_LCD_OPTIMIZED = 3 } /// Scroll so that a display line is at the top of the display. (Scintilla feature SC_MULTIPASTE_) + [Flags] public enum MultiPaste { ONCE = 0, EACH = 1 } /// Set the other colour used as a chequerboard pattern in the fold margin (Scintilla feature SC_ACCESSIBILITY_) + [Flags] public enum Accessibility { DISABLED = 0, ENABLED = 1 } /// Set which document modification events are sent to the container. (Scintilla feature EDGE_) + [Flags] public enum EdgeVisualStyle { NONE = 0, @@ -620,6 +658,7 @@ public enum EdgeVisualStyle MULTILINE = 3 } /// Retrieves the number of lines completely visible. (Scintilla feature SC_POPUP_) + [Flags] public enum PopUp { NEVER = 0, @@ -627,6 +666,7 @@ public enum PopUp TEXT = 2 } /// Retrieve the zoom level. (Scintilla feature SC_DOCUMENTOPTION_) + [Flags] public enum DocumentOption { DEFAULT = 0, @@ -634,6 +674,7 @@ public enum DocumentOption TEXT_LARGE = 0x100 } /// Get internal focus flag. (Scintilla feature SC_STATUS_) + [Flags] public enum Status { OK = 0, @@ -643,6 +684,7 @@ public enum Status WARN_REGEX = 1001 } /// Get whether mouse wheel can be active outside the window. (Scintilla feature SC_CURSOR) + [Flags] public enum CursorShape { NORMAL = -1, @@ -651,12 +693,14 @@ public enum CursorShape REVERSEARROW = 7 } /// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy. (Scintilla feature VISIBLE_) + [Flags] public enum VisiblePolicy { SLOP = 0x01, STRICT = 0x04 } /// Set the focus to this Scintilla widget. (Scintilla feature CARET_) + [Flags] public enum CaretPolicy { SLOP = 0x01, @@ -665,6 +709,7 @@ public enum CaretPolicy EVEN = 0x08 } /// Copy argument text to the clipboard. (Scintilla feature SC_SEL_) + [Flags] public enum SelectionMode { STREAM = 0, @@ -678,18 +723,21 @@ public enum SelectionMode /// Result is NUL-terminated. /// (Scintilla feature SC_CASEINSENSITIVEBEHAVIOUR_) /// + [Flags] public enum CaseInsensitiveBehaviour { RESPECTCASE = 0, IGNORECASE = 1 } /// Get auto-completion case insensitive behaviour. (Scintilla feature SC_MULTIAUTOC_) + [Flags] public enum MultiAutoComplete { ONCE = 0, EACH = 1 } /// Retrieve the effect of autocompleting when there are multiple selections. (Scintilla feature SC_ORDER_) + [Flags] public enum Ordering { PRESORTED = 0, @@ -697,6 +745,7 @@ public enum Ordering CUSTOM = 2 } /// Stop the caret preferred x position changing when the user types. (Scintilla feature SC_CARETSTICKY_) + [Flags] public enum CaretSticky { OFF = 0, @@ -704,6 +753,7 @@ public enum CaretSticky WHITESPACE = 2 } /// Duplicate the selection. If selection empty duplicate the line containing the caret. (Scintilla feature SC_ALPHA_) + [Flags] public enum Alpha { TRANSPARENT = 0, @@ -711,6 +761,7 @@ public enum Alpha NOALPHA = 256 } /// Get the background alpha of the caret line. (Scintilla feature CARETSTYLE_) + [Flags] public enum CaretStyle { INVISIBLE = 0, @@ -722,12 +773,14 @@ public enum CaretStyle BLOCK_AFTER = 0x100 } /// Get the start of the range of style numbers used for margin text (Scintilla feature SC_MARGINOPTION_) + [Flags] public enum MarginOption { NONE = 0, SUBLINESELECT = 1 } /// Clear the annotations from all lines (Scintilla feature ANNOTATION_) + [Flags] public enum AnnotationVisible { HIDDEN = 0, @@ -736,12 +789,14 @@ public enum AnnotationVisible INDENTED = 3 } /// Allocate some extended (>255) style numbers and return the start of the range (Scintilla feature UNDO_) + [Flags] public enum UndoFlags { NONE = 0, MAY_COALESCE = 1 } /// Return the virtual space of the anchor of the rectangular selection. (Scintilla feature SCVS_) + [Flags] public enum VirtualSpace { NONE = 0, @@ -750,6 +805,7 @@ public enum VirtualSpace NOWRAPLINESTART = 4 } /// Scroll to end of document. (Scintilla feature SC_TECHNOLOGY_) + [Flags] public enum Technology { DEFAULT = 0, @@ -763,6 +819,7 @@ public enum Technology /// U+2029 Paragraph Separator, and U+0085 Next Line /// (Scintilla feature SC_LINE_END_TYPE_) /// + [Flags] public enum LineEndType { DEFAULT = 0, @@ -773,6 +830,7 @@ public enum LineEndType /// Result is NUL-terminated. /// (Scintilla feature SC_TYPE_) /// + [Flags] public enum TypeProperty { BOOLEAN = 0, @@ -786,6 +844,7 @@ public enum TypeProperty /// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. /// (Scintilla feature SC_MOD_ SC_PERFORMED_ SC_MULTISTEPUNDOREDO SC_LASTSTEPINUNDOREDO SC_MULTILINEUNDOREDO SC_STARTACTION SC_MODEVENTMASKALL) /// + [Flags] public enum ModificationFlags { } @@ -796,6 +855,7 @@ public enum ModificationFlags /// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. /// (Scintilla feature SC_UPDATE_) /// + [Flags] public enum Update { CONTENT = 0x1, @@ -809,6 +869,7 @@ public enum Update /// Extended keys above 300. /// (Scintilla feature SCMOD_) /// + [Flags] public enum KeyMod { NORM = 0, @@ -824,6 +885,7 @@ public enum KeyMod /// Extended keys above 300. /// (Scintilla feature SC_AC_) /// + [Flags] public enum CompletionMethods { FILLUP = 1, @@ -833,6 +895,7 @@ public enum CompletionMethods COMMAND = 5 } /// characterSource for SCN_CHARADDED (Scintilla feature SC_CHARACTERSOURCE_) + [Flags] public enum CharacterSource { DIRECT_INPUT = 0, @@ -840,6 +903,7 @@ public enum CharacterSource IME_RESULT = 2 } /// For SciLexer.h (Scintilla feature SCLEX_) + [Flags] public enum Lexer { CONTAINER = 0, @@ -973,6 +1037,7 @@ public enum Lexer AUTOMATIC = 1000 } /// GTK Specific to work around focus and accelerator problems: (Scintilla feature SC_BIDIRECTIONAL_) + [Flags] public enum Bidirectional { DISABLED = 0, @@ -980,12 +1045,13 @@ public enum Bidirectional R2L = 2 } /// Set bidirectional text display state. (Scintilla feature SC_LINECHARACTERINDEX_) + [Flags] public enum LineCharacterIndexType { NONE = 0, UTF32 = 1, UTF16 = 2 } - /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ + /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ } diff --git a/Visual Studio Project Template C#/PluginInfrastructure/IScintillaGateway.cs b/Visual Studio Project Template C#/PluginInfrastructure/IScintillaGateway.cs index 981e1b7..3f62361 100644 --- a/Visual Studio Project Template C#/PluginInfrastructure/IScintillaGateway.cs +++ b/Visual Studio Project Template C#/PluginInfrastructure/IScintillaGateway.cs @@ -22,7 +22,7 @@ public interface IScintillaGateway /// /// Get the current line from the current position /// - int GetCurrentLineNumber(); + long GetCurrentLineNumber(); /// /// Get the scroll information for the current Scintilla window. @@ -34,40 +34,40 @@ public interface IScintillaGateway /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ /// Add text to the document at current position. (Scintilla feature 2001) - unsafe void AddText(int length, string text); + unsafe void AddText(long length, string text); /// Add array of cells to document. (Scintilla feature 2002) - unsafe void AddStyledText(int length, Cells c); + unsafe void AddStyledText(long length, Cells c); /// Insert string at a position. (Scintilla feature 2003) - unsafe void InsertText(int pos, string text); + unsafe void InsertText(long pos, string text); /// Change the text that is being inserted in response to SC_MOD_INSERTCHECK (Scintilla feature 2672) - unsafe void ChangeInsertion(int length, string text); + unsafe void ChangeInsertion(long length, string text); /// Delete all text in the document. (Scintilla feature 2004) void ClearAll(); /// Delete a range of text in the document. (Scintilla feature 2645) - void DeleteRange(int start, int lengthDelete); + void DeleteRange(long start, long lengthDelete); /// Set all style bytes to 0, remove all folding information. (Scintilla feature 2005) void ClearDocumentStyle(); /// Returns the number of bytes in the document. (Scintilla feature 2006) - int GetLength(); + long GetLength(); /// Returns the character byte at the position. (Scintilla feature 2007) - int GetCharAt(int pos); + int GetCharAt(long pos); /// Returns the position of the caret. (Scintilla feature 2008) - int GetCurrentPos(); + long GetCurrentPos(); /// Returns the position of the opposite end of the selection to the caret. (Scintilla feature 2009) - int GetAnchor(); + long GetAnchor(); /// Returns the style byte at the position. (Scintilla feature 2010) - int GetStyleAt(int pos); + int GetStyleAt(long pos); /// Redoes the next action on the undo history. (Scintilla feature 2011) void Redo(); @@ -94,7 +94,7 @@ public interface IScintillaGateway /// Returns the number of bytes in the buffer not including terminating NULs. /// (Scintilla feature 2015) /// - int GetStyledText(TextRange tr); + long GetStyledText(TextRange tr); /// Are there any redoable actions in the undo history? (Scintilla feature 2016) bool CanRedo(); @@ -129,27 +129,27 @@ public interface IScintillaGateway void SetTabDrawMode(TabDrawMode tabDrawMode); /// Find the position from a point within the window. (Scintilla feature 2022) - int PositionFromPoint(int x, int y); + long PositionFromPoint(int x, int y); /// /// Find the position from a point within the window but return /// INVALID_POSITION if not close to text. /// (Scintilla feature 2023) /// - int PositionFromPointClose(int x, int y); + long PositionFromPointClose(int x, int y); /// Set caret to start of a line and ensure it is visible. (Scintilla feature 2024) - void GotoLine(int line); + void GotoLine(long line); /// Set caret to a position and ensure it is visible. (Scintilla feature 2025) - void GotoPos(int caret); + void GotoPos(long caret); /// /// Set the selection anchor to a position. The anchor is the opposite /// end of the selection from the caret. /// (Scintilla feature 2026) /// - void SetAnchor(int anchor); + void SetAnchor(long anchor); /// /// Retrieve the text of the line containing the caret. @@ -157,10 +157,10 @@ public interface IScintillaGateway /// Result is NUL-terminated. /// (Scintilla feature 2027) /// - unsafe string GetCurLine(int length); + unsafe string GetCurLine(long length); /// Retrieve the position of the last correctly styled character. (Scintilla feature 2028) - int GetEndStyled(); + long GetEndStyled(); /// Convert all line endings in the document to one mode. (Scintilla feature 2029) void ConvertEOLs(EndOfLine eolMode); @@ -176,14 +176,14 @@ public interface IScintillaGateway /// The unused parameter is no longer used and should be set to 0. /// (Scintilla feature 2032) /// - void StartStyling(int start, int unused); + void StartStyling(long start, int unused); /// /// Change style from current styling position for length characters to a style /// and move the current styling position to after this newly styled segment. /// (Scintilla feature 2033) /// - void SetStyling(int length, int style); + void SetStyling(long length, int style); /// Is drawing done first into a buffer or direct to the screen? (Scintilla feature 2034) bool GetBufferedDraw(); @@ -202,13 +202,13 @@ public interface IScintillaGateway int GetTabWidth(); /// Clear explicit tabstops on a line. (Scintilla feature 2675) - void ClearTabStops(int line); + void ClearTabStops(long line); /// Add an explicit tab stop for a line. (Scintilla feature 2676) - void AddTabStop(int line, int x); + void AddTabStop(long line, int x); /// Find the next explicit tab stop position on a line after a position. (Scintilla feature 2677) - int GetNextTabStop(int line, int x); + int GetNextTabStop(long line, int x); /// /// Set the code page used to interpret the bytes of the document as characters. @@ -239,32 +239,32 @@ public interface IScintillaGateway void MarkerEnableHighlight(bool enabled); /// Add a marker to a line, returning an ID which can be used to find or delete the marker. (Scintilla feature 2043) - int MarkerAdd(int line, int markerNumber); + int MarkerAdd(long line, int markerNumber); /// Delete a marker from a line. (Scintilla feature 2044) - void MarkerDelete(int line, int markerNumber); + void MarkerDelete(long line, int markerNumber); /// Delete all markers with a particular number from all lines. (Scintilla feature 2045) void MarkerDeleteAll(int markerNumber); /// Get a bit mask of all the markers set on a line. (Scintilla feature 2046) - int MarkerGet(int line); + int MarkerGet(long line); /// /// Find the next line at or after lineStart that includes a marker in mask. /// Return -1 when no more lines. /// (Scintilla feature 2047) /// - int MarkerNext(int lineStart, int markerMask); + long MarkerNext(long lineStart, int markerMask); /// Find the previous line before lineStart that includes a marker in mask. (Scintilla feature 2048) - int MarkerPrevious(int lineStart, int markerMask); + long MarkerPrevious(long lineStart, int markerMask); /// Define a marker from a pixmap. (Scintilla feature 2049) unsafe void MarkerDefinePixmap(int markerNumber, string pixmap); /// Add a set of markers to a line. (Scintilla feature 2466) - void MarkerAddSet(int line, int markerSet); + void MarkerAddSet(long line, int markerSet); /// Set the alpha used for a marker that is drawn in the text area, not the margin. (Scintilla feature 2476) void MarkerSetAlpha(int markerNumber, Alpha alpha); @@ -441,7 +441,7 @@ public interface IScintillaGateway void ClearAllCmdKeys(); /// Set the styles for a segment of the document. (Scintilla feature 2073) - unsafe void SetStylingEx(int length, string styles); + unsafe void SetStylingEx(long length, string styles); /// Set a style to be visible or not. (Scintilla feature 2074) void StyleSetVisible(int style, bool visible); @@ -531,10 +531,10 @@ public interface IScintillaGateway int GetWhitespaceSize(); /// Used to hold extra styling information for each line. (Scintilla feature 2092) - void SetLineState(int line, int state); + void SetLineState(long line, int state); /// Retrieve the extra styling information for a line. (Scintilla feature 2093) - int GetLineState(int line); + int GetLineState(long line); /// Retrieve the last line number that has line state. (Scintilla feature 2094) int GetMaxLineState(); @@ -578,7 +578,7 @@ public interface IScintillaGateway /// the caret should be used to provide context. /// (Scintilla feature 2100) /// - unsafe void AutoCShow(int lengthEntered, string itemList); + unsafe void AutoCShow(long lengthEntered, string itemList); /// Remove the auto-completion list from the screen. (Scintilla feature 2101) void AutoCCancel(); @@ -587,7 +587,7 @@ public interface IScintillaGateway bool AutoCActive(); /// Retrieve the position of the caret when the auto-completion list was displayed. (Scintilla feature 2103) - int AutoCPosStart(); + long AutoCPosStart(); /// User has selected an item so remove the list and insert the selection. (Scintilla feature 2104) void AutoCComplete(); @@ -713,22 +713,22 @@ public interface IScintillaGateway bool GetUseTabs(); /// Change the indentation of a line to a number of columns. (Scintilla feature 2126) - void SetLineIndentation(int line, int indentation); + void SetLineIndentation(long line, int indentation); /// Retrieve the number of columns that a line is indented. (Scintilla feature 2127) - int GetLineIndentation(int line); + int GetLineIndentation(long line); /// Retrieve the position before the first non indentation character on a line. (Scintilla feature 2128) - int GetLineIndentPosition(int line); + long GetLineIndentPosition(long line); /// Retrieve the column number of a position, taking tab width into account. (Scintilla feature 2129) - int GetColumn(int pos); + long GetColumn(long pos); /// Count characters between two positions. (Scintilla feature 2633) - int CountCharacters(int start, int end); + long CountCharacters(long start, long end); /// Count code units between two positions. (Scintilla feature 2715) - int CountCodeUnits(int start, int end); + long CountCodeUnits(long start, long end); /// Show or hide the horizontal scroll bar. (Scintilla feature 2130) void SetHScrollBar(bool visible); @@ -747,13 +747,13 @@ public interface IScintillaGateway /// 0 = no highlighted guide. /// (Scintilla feature 2134) /// - void SetHighlightGuide(int column); + void SetHighlightGuide(long column); /// Get the highlighted indentation guide column. (Scintilla feature 2135) - int GetHighlightGuide(); + long GetHighlightGuide(); /// Get the position after the last visible characters on a line. (Scintilla feature 2136) - int GetLineEndPosition(int line); + long GetLineEndPosition(long line); /// Get the code page used to interpret the bytes of the document as characters. (Scintilla feature 2137) int GetCodePage(); @@ -765,22 +765,22 @@ public interface IScintillaGateway bool GetReadOnly(); /// Sets the position of the caret. (Scintilla feature 2141) - void SetCurrentPos(int caret); + void SetCurrentPos(long caret); /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2142) - void SetSelectionStart(int anchor); + void SetSelectionStart(long anchor); /// Returns the position at the start of the selection. (Scintilla feature 2143) - int GetSelectionStart(); + long GetSelectionStart(); /// Sets the position that ends the selection - this becomes the caret. (Scintilla feature 2144) - void SetSelectionEnd(int caret); + void SetSelectionEnd(long caret); /// Returns the position at the end of the selection. (Scintilla feature 2145) - int GetSelectionEnd(); + long GetSelectionEnd(); /// Set caret to a position, while removing any existing selection. (Scintilla feature 2556) - void SetEmptySelection(int caret); + void SetEmptySelection(long caret); /// Sets the print magnification added to the point size of each style for printing. (Scintilla feature 2146) void SetPrintMagnification(int magnification); @@ -795,20 +795,20 @@ public interface IScintillaGateway PrintOption GetPrintColourMode(); /// Find some text in the document. (Scintilla feature 2150) - int FindText(FindOption searchFlags, TextToFind ft); + long FindText(FindOption searchFlags, TextToFind ft); /// Retrieve the display line at the top of the display. (Scintilla feature 2152) - int GetFirstVisibleLine(); + long GetFirstVisibleLine(); /// /// Retrieve the contents of a line. /// Returns the length of the line. /// (Scintilla feature 2153) /// - unsafe string GetLine(int line); + unsafe string GetLine(long line); /// Returns the number of lines in the document. There is always at least one. (Scintilla feature 2154) - int GetLineCount(); + long GetLineCount(); /// Sets the size in pixels of the left margin. (Scintilla feature 2155) void SetMarginLeft(int pixelWidth); @@ -826,7 +826,7 @@ public interface IScintillaGateway bool GetModify(); /// Select a range of text. (Scintilla feature 2160) - void SetSel(int anchor, int caret); + void SetSel(long anchor, long caret); /// /// Retrieve the selected text. @@ -841,25 +841,25 @@ public interface IScintillaGateway /// Return the length of the text. /// (Scintilla feature 2162) /// - int GetTextRange(TextRange tr); + long GetTextRange(TextRange tr); /// Draw the selection either highlighted or in normal (non-highlighted) style. (Scintilla feature 2163) void HideSelection(bool hide); /// Retrieve the x value of the point in the window where a position is displayed. (Scintilla feature 2164) - int PointXFromPosition(int pos); + int PointXFromPosition(long pos); /// Retrieve the y value of the point in the window where a position is displayed. (Scintilla feature 2165) - int PointYFromPosition(int pos); + int PointYFromPosition(long pos); /// Retrieve the line containing a position. (Scintilla feature 2166) - int LineFromPosition(int pos); + long LineFromPosition(long pos); /// Retrieve the position at the start of a line. (Scintilla feature 2167) - int PositionFromLine(int line); + long PositionFromLine(long line); /// Scroll horizontally and vertically. (Scintilla feature 2168) - void LineScroll(int columns, int lines); + void LineScroll(long columns, long lines); /// Ensure the caret is visible. (Scintilla feature 2169) void ScrollCaret(); @@ -870,7 +870,7 @@ public interface IScintillaGateway /// This may be used to make a search match visible. /// (Scintilla feature 2569) /// - void ScrollRange(int secondary, int primary); + void ScrollRange(long secondary, long primary); /// Replace the selected text with the argument text. (Scintilla feature 2170) unsafe void ReplaceSel(string text); @@ -914,10 +914,10 @@ public interface IScintillaGateway /// Result is NUL-terminated. /// (Scintilla feature 2182) /// - unsafe string GetText(int length); + unsafe string GetText(long length); /// Retrieve the number of characters in the document. (Scintilla feature 2183) - int GetTextLength(); + long GetTextLength(); /// Retrieve a pointer to a function that processes messages for this Scintilla. (Scintilla feature 2184) IntPtr GetDirectFunction(); @@ -946,23 +946,23 @@ public interface IScintillaGateway /// document without affecting the scroll position. /// (Scintilla feature 2190) /// - void SetTargetStart(int start); + void SetTargetStart(long start); /// Get the position that starts the target. (Scintilla feature 2191) - int GetTargetStart(); + long GetTargetStart(); /// /// Sets the position that ends the target which is used for updating the /// document without affecting the scroll position. /// (Scintilla feature 2192) /// - void SetTargetEnd(int end); + void SetTargetEnd(long end); /// Get the position that ends the target. (Scintilla feature 2193) - int GetTargetEnd(); + long GetTargetEnd(); /// Sets both the start and end of the target in one call. (Scintilla feature 2686) - void SetTargetRange(int start, int end); + void SetTargetRange(long start, long end); /// Retrieve the text in the target. (Scintilla feature 2687) unsafe string GetTargetText(); @@ -979,7 +979,7 @@ public interface IScintillaGateway /// Returns the length of the replacement text. /// (Scintilla feature 2194) /// - unsafe int ReplaceTarget(int length, string text); + unsafe long ReplaceTarget(long length, string text); /// /// Replace the target text with the argument text after \d processing. @@ -990,7 +990,7 @@ public interface IScintillaGateway /// caused by processing the \d patterns. /// (Scintilla feature 2195) /// - unsafe int ReplaceTargetRE(int length, string text); + unsafe long ReplaceTargetRE(long length, string text); /// /// Search for a counted string in the target and set the target to the found @@ -998,7 +998,7 @@ public interface IScintillaGateway /// Returns start of found range or -1 for failure in which case target is not moved. /// (Scintilla feature 2197) /// - unsafe int SearchInTarget(int length, string text); + unsafe long SearchInTarget(long length, string text); /// Set the search flags used by SearchInTarget. (Scintilla feature 2198) void SetSearchFlags(FindOption searchFlags); @@ -1007,7 +1007,7 @@ public interface IScintillaGateway FindOption GetSearchFlags(); /// Show a call tip containing a definition near position pos. (Scintilla feature 2200) - unsafe void CallTipShow(int pos, string definition); + unsafe void CallTipShow(long pos, string definition); /// Remove the call tip from the screen. (Scintilla feature 2201) void CallTipCancel(); @@ -1016,10 +1016,10 @@ public interface IScintillaGateway bool CallTipActive(); /// Retrieve the position where the caret was before displaying the call tip. (Scintilla feature 2203) - int CallTipPosStart(); + long CallTipPosStart(); /// Set the start position in order to change when backspacing removes the calltip. (Scintilla feature 2214) - void CallTipSetPosStart(int posStart); + void CallTipSetPosStart(long posStart); /// Highlight a segment of the definition. (Scintilla feature 2204) void CallTipSetHlt(int highlightStart, int highlightEnd); @@ -1040,13 +1040,13 @@ public interface IScintillaGateway void CallTipSetPosition(bool above); /// Find the display line of a document line taking hidden lines into account. (Scintilla feature 2220) - int VisibleFromDocLine(int docLine); + long VisibleFromDocLine(long docLine); /// Find the document line of a display line taking hidden lines into account. (Scintilla feature 2221) - int DocLineFromVisible(int displayLine); + long DocLineFromVisible(long displayLine); /// The number of display lines needed to wrap a document line (Scintilla feature 2235) - int WrapCount(int docLine); + long WrapCount(long docLine); /// /// Set the fold level of a line. @@ -1054,40 +1054,40 @@ public interface IScintillaGateway /// line is a header and whether it is effectively white space. /// (Scintilla feature 2222) /// - void SetFoldLevel(int line, FoldLevel level); + void SetFoldLevel(long line, FoldLevel level); /// Retrieve the fold level of a line. (Scintilla feature 2223) - FoldLevel GetFoldLevel(int line); + FoldLevel GetFoldLevel(long line); /// Find the last child line of a header line. (Scintilla feature 2224) - int GetLastChild(int line, FoldLevel level); + long GetLastChild(long line, FoldLevel level); /// Find the parent line of a child line. (Scintilla feature 2225) - int GetFoldParent(int line); + long GetFoldParent(long line); /// Make a range of lines visible. (Scintilla feature 2226) - void ShowLines(int lineStart, int lineEnd); + void ShowLines(long lineStart, long lineEnd); /// Make a range of lines invisible. (Scintilla feature 2227) - void HideLines(int lineStart, int lineEnd); + void HideLines(long lineStart, long lineEnd); /// Is a line visible? (Scintilla feature 2228) - bool GetLineVisible(int line); + bool GetLineVisible(long line); /// Are all lines visible? (Scintilla feature 2236) bool GetAllLinesVisible(); /// Show the children of a header line. (Scintilla feature 2229) - void SetFoldExpanded(int line, bool expanded); + void SetFoldExpanded(long line, bool expanded); /// Is a header line expanded? (Scintilla feature 2230) - bool GetFoldExpanded(int line); + bool GetFoldExpanded(long line); /// Switch a header line between expanded and contracted. (Scintilla feature 2231) - void ToggleFold(int line); + void ToggleFold(long line); /// Switch a header line between expanded and contracted and show some text after the line. (Scintilla feature 2700) - unsafe void ToggleFoldShowText(int line, string text); + unsafe void ToggleFoldShowText(long line, string text); /// Set the style of fold display text. (Scintilla feature 2701) void FoldDisplayTextSetStyle(FoldDisplayTextStyle style); @@ -1102,19 +1102,19 @@ public interface IScintillaGateway unsafe string GetDefaultFoldDisplayText(); /// Expand or contract a fold header. (Scintilla feature 2237) - void FoldLine(int line, FoldAction action); + void FoldLine(long line, FoldAction action); /// Expand or contract a fold header and its children. (Scintilla feature 2238) - void FoldChildren(int line, FoldAction action); + void FoldChildren(long line, FoldAction action); /// Expand a fold header and all children. Use the level argument instead of the line's current level. (Scintilla feature 2239) - void ExpandChildren(int line, FoldLevel level); + void ExpandChildren(long line, FoldLevel level); /// Expand or contract all fold headers. (Scintilla feature 2662) void FoldAll(FoldAction action); /// Ensure a particular line is visible by expanding any header line hiding it. (Scintilla feature 2232) - void EnsureVisible(int line); + void EnsureVisible(long line); /// Set automatic folding behaviours. (Scintilla feature 2663) void SetAutomaticFold(AutomaticFold automaticFold); @@ -1130,7 +1130,7 @@ public interface IScintillaGateway /// Use the currently set visibility policy to determine which range to display. /// (Scintilla feature 2234) /// - void EnsureVisibleEnforcePolicy(int line); + void EnsureVisibleEnforcePolicy(long line); /// Sets whether a tab pressed when caret is within indentation indents. (Scintilla feature 2260) void SetTabIndents(bool tabIndents); @@ -1151,13 +1151,13 @@ public interface IScintillaGateway int GetMouseDwellTime(); /// Get position of start of word. (Scintilla feature 2266) - int WordStartPosition(int pos, bool onlyWordCharacters); + long WordStartPosition(long pos, bool onlyWordCharacters); /// Get position of end of word. (Scintilla feature 2267) - int WordEndPosition(int pos, bool onlyWordCharacters); + long WordEndPosition(long pos, bool onlyWordCharacters); /// Is the range start..end considered a word? (Scintilla feature 2691) - bool IsRangeWord(int start, int end); + bool IsRangeWord(long start, long end); /// Sets limits to idle styling. (Scintilla feature 2692) void SetIdleStyling(IdleStyling idleStyling); @@ -1237,7 +1237,7 @@ public interface IScintillaGateway bool GetEndAtLastLine(); /// Retrieve the height of a particular line of text in pixels. (Scintilla feature 2279) - int TextHeight(int line); + int TextHeight(long line); /// Show or hide the vertical scroll bar. (Scintilla feature 2280) void SetVScrollBar(bool visible); @@ -1246,7 +1246,7 @@ public interface IScintillaGateway bool GetVScrollBar(); /// Append a string to the end of the document without changing the selection. (Scintilla feature 2282) - unsafe void AppendText(int length, string text); + unsafe void AppendText(long length, string text); /// How many phases is drawing done in? (Scintilla feature 2673) PhasesDraw GetPhasesDraw(); @@ -1267,7 +1267,7 @@ public interface IScintillaGateway FontQuality GetFontQuality(); /// Scroll so that a display line is at the top of the display. (Scintilla feature 2613) - void SetFirstVisibleLine(int displayLine); + void SetFirstVisibleLine(long displayLine); /// Change the effect of pasting when there are multiple selections. (Scintilla feature 2614) void SetMultiPaste(MultiPaste multiPaste); @@ -1529,16 +1529,16 @@ public interface IScintillaGateway void MoveCaretInsideView(); /// How many characters are on a line, including end of line characters? (Scintilla feature 2350) - int LineLength(int line); + long LineLength(long line); /// Highlight the characters at two positions. (Scintilla feature 2351) - void BraceHighlight(int posA, int posB); + void BraceHighlight(long posA, long posB); /// Use specified indicator to highlight matching braces instead of changing their style. (Scintilla feature 2498) void BraceHighlightIndicator(bool useSetting, int indicator); /// Highlight the character at a position indicating there is no matching brace. (Scintilla feature 2352) - void BraceBadLight(int pos); + void BraceBadLight(long pos); /// Use specified indicator to highlight non matching brace instead of changing its style. (Scintilla feature 2499) void BraceBadLightIndicator(bool useSetting, int indicator); @@ -1548,7 +1548,7 @@ public interface IScintillaGateway /// The maxReStyle must be 0 for now. It may be defined in a future release. /// (Scintilla feature 2353) /// - int BraceMatch(int pos, int maxReStyle); + long BraceMatch(long pos, int maxReStyle); /// Are the end of line characters visible? (Scintilla feature 2355) bool GetViewEOL(); @@ -1566,14 +1566,14 @@ public interface IScintillaGateway void SetModEventMask(ModificationFlags eventMask); /// Retrieve the column number which text should be kept within. (Scintilla feature 2360) - int GetEdgeColumn(); + long GetEdgeColumn(); /// /// Set the column number of the edge. /// If text goes past the edge then it is highlighted. /// (Scintilla feature 2361) /// - void SetEdgeColumn(int column); + void SetEdgeColumn(long column); /// Retrieve the edge highlight mode. (Scintilla feature 2362) EdgeVisualStyle GetEdgeMode(); @@ -1592,7 +1592,7 @@ public interface IScintillaGateway void SetEdgeColour(Colour edgeColour); /// Add a new vertical edge to the view. (Scintilla feature 2694) - void MultiEdgeAddLine(int column, Colour edgeColour); + void MultiEdgeAddLine(long column, Colour edgeColour); /// Clear all vertical edges. (Scintilla feature 2695) void MultiEdgeClearAll(); @@ -1605,17 +1605,17 @@ public interface IScintillaGateway /// Does not ensure the selection is visible. /// (Scintilla feature 2367) /// - unsafe int SearchNext(FindOption searchFlags, string text); + unsafe long SearchNext(FindOption searchFlags, string text); /// /// Find some text starting at the search anchor and moving backwards. /// Does not ensure the selection is visible. /// (Scintilla feature 2368) /// - unsafe int SearchPrev(FindOption searchFlags, string text); + unsafe long SearchPrev(FindOption searchFlags, string text); /// Retrieves the number of lines completely visible. (Scintilla feature 2370) - int LinesOnScreen(); + long LinesOnScreen(); /// /// Set whether a pop up menu is displayed automatically when the user presses @@ -1642,7 +1642,7 @@ public interface IScintillaGateway /// Starts with reference count of 1 and not selected into editor. /// (Scintilla feature 2375) /// - IntPtr CreateDocument(int bytes, DocumentOption documentOptions); + IntPtr CreateDocument(long bytes, DocumentOption documentOptions); /// Extend life of document. (Scintilla feature 2376) void AddRefDocument(IntPtr doc); @@ -1808,21 +1808,21 @@ public interface IScintillaGateway /// page into account. Returns 0 if passed 0. /// (Scintilla feature 2417) /// - int PositionBefore(int pos); + long PositionBefore(long pos); /// /// Given a valid document position, return the next position taking code /// page into account. Maximum value returned is the last position in the document. /// (Scintilla feature 2418) /// - int PositionAfter(int pos); + long PositionAfter(long pos); /// /// Given a valid document position, return a position that differs in a number /// of characters. Returned value is always between 0 and last position in document. /// (Scintilla feature 2670) /// - int PositionRelative(int pos, int relative); + long PositionRelative(long pos, long relative); /// /// Given a valid document position, return a position that differs in a number @@ -1830,13 +1830,13 @@ public interface IScintillaGateway /// The result may point half way (2 bytes) inside a non-BMP character. /// (Scintilla feature 2716) /// - int PositionRelativeCodeUnits(int pos, int relative); + long PositionRelativeCodeUnits(long pos, long relative); /// Copy a range of text to the clipboard. Positions are clipped into the document. (Scintilla feature 2419) - void CopyRange(int start, int end); + void CopyRange(long start, long end); /// Copy argument text to the clipboard. (Scintilla feature 2420) - unsafe void CopyText(int length, string text); + unsafe void CopyText(long length, string text); /// /// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or @@ -1852,10 +1852,10 @@ public interface IScintillaGateway bool GetMoveExtendsSelection(); /// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2424) - int GetLineSelStartPosition(int line); + long GetLineSelStartPosition(long line); /// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2425) - int GetLineSelEndPosition(int line); + long GetLineSelEndPosition(long line); /// Move caret down one line, extending rectangular selection to new caret position. (Scintilla feature 2426) void LineDownRectExtend(); @@ -1966,7 +1966,7 @@ public interface IScintillaGateway Ordering AutoCGetOrder(); /// Enlarge the document to a particular size of text bytes. (Scintilla feature 2446) - void Allocate(int bytes); + void Allocate(long bytes); /// /// Returns the target converted to UTF8. @@ -1980,7 +1980,7 @@ public interface IScintillaGateway /// Set to -1 and the string will be measured to the first nul. /// (Scintilla feature 2448) /// - void SetLengthForEncode(int bytes); + void SetLengthForEncode(long bytes); /// /// Translates a UTF8 string into the document encoding. @@ -1995,7 +1995,7 @@ public interface IScintillaGateway /// multi-byte characters. If beyond end of line, return line end position. /// (Scintilla feature 2456) /// - int FindColumn(int line, int column); + long FindColumn(long line, long column); /// Can the caret preferred x position only be changed by explicit movement commands? (Scintilla feature 2457) CaretSticky GetCaretSticky(); @@ -2040,22 +2040,22 @@ public interface IScintillaGateway int GetIndicatorValue(); /// Turn a indicator on over a range. (Scintilla feature 2504) - void IndicatorFillRange(int start, int lengthFill); + void IndicatorFillRange(long start, long lengthFill); /// Turn a indicator off over a range. (Scintilla feature 2505) - void IndicatorClearRange(int start, int lengthClear); + void IndicatorClearRange(long start, long lengthClear); /// Are any indicators present at pos? (Scintilla feature 2506) - int IndicatorAllOnFor(int pos); + int IndicatorAllOnFor(long pos); /// What value does a particular indicator have at a position? (Scintilla feature 2507) - int IndicatorValueAt(int indicator, int pos); + int IndicatorValueAt(int indicator, long pos); /// Where does a particular indicator start? (Scintilla feature 2508) - int IndicatorStart(int indicator, int pos); + int IndicatorStart(int indicator, long pos); /// Where does a particular indicator end? (Scintilla feature 2509) - int IndicatorEnd(int indicator, int pos); + int IndicatorEnd(int indicator, long pos); /// Set number of entries in position cache (Scintilla feature 2514) void SetPositionCache(int size); @@ -2079,14 +2079,14 @@ public interface IScintillaGateway /// to lengthRange bytes. /// (Scintilla feature 2643) /// - IntPtr GetRangePointer(int start, int lengthRange); + IntPtr GetRangePointer(long start, long lengthRange); /// /// Return a position which, to avoid performance costs, should not be within /// the range of a call to GetRangePointer. /// (Scintilla feature 2644) /// - int GetGapPosition(); + long GetGapPosition(); /// Set the alpha fill colour of the given indicator. (Scintilla feature 2523) void IndicSetAlpha(int indicator, Alpha alpha); @@ -2116,22 +2116,22 @@ public interface IScintillaGateway int MarkerSymbolDefined(int markerNumber); /// Set the text in the text margin for a line (Scintilla feature 2530) - unsafe void MarginSetText(int line, string text); + unsafe void MarginSetText(long line, string text); /// Get the text in the text margin for a line (Scintilla feature 2531) - unsafe string MarginGetText(int line); + unsafe string MarginGetText(long line); /// Set the style number for the text margin for a line (Scintilla feature 2532) - void MarginSetStyle(int line, int style); + void MarginSetStyle(long line, int style); /// Get the style number for the text margin for a line (Scintilla feature 2533) - int MarginGetStyle(int line); + int MarginGetStyle(long line); /// Set the style in the text margin for a line (Scintilla feature 2534) - unsafe void MarginSetStyles(int line, string styles); + unsafe void MarginSetStyles(long line, string styles); /// Get the styles in the text margin for a line (Scintilla feature 2535) - unsafe string MarginGetStyles(int line); + unsafe string MarginGetStyles(long line); /// Clear the margin text on all lines (Scintilla feature 2536) void MarginTextClearAll(); @@ -2149,25 +2149,25 @@ public interface IScintillaGateway MarginOption GetMarginOptions(); /// Set the annotation text for a line (Scintilla feature 2540) - unsafe void AnnotationSetText(int line, string text); + unsafe void AnnotationSetText(long line, string text); /// Get the annotation text for a line (Scintilla feature 2541) - unsafe string AnnotationGetText(int line); + unsafe string AnnotationGetText(long line); /// Set the style number for the annotations for a line (Scintilla feature 2542) - void AnnotationSetStyle(int line, int style); + void AnnotationSetStyle(long line, int style); /// Get the style number for the annotations for a line (Scintilla feature 2543) - int AnnotationGetStyle(int line); + int AnnotationGetStyle(long line); /// Set the annotation styles for a line (Scintilla feature 2544) - unsafe void AnnotationSetStyles(int line, string styles); + unsafe void AnnotationSetStyles(long line, string styles); /// Get the annotation styles for a line (Scintilla feature 2545) - unsafe string AnnotationGetStyles(int line); + unsafe string AnnotationGetStyles(long line); /// Get the number of annotation lines for a line (Scintilla feature 2546) - int AnnotationGetLines(int line); + int AnnotationGetLines(long line); /// Clear the annotations from all lines (Scintilla feature 2547) void AnnotationClearAll(); @@ -2194,14 +2194,14 @@ public interface IScintillaGateway void AddUndoAction(int token, UndoFlags flags); /// Find the position of a character from a point within the window. (Scintilla feature 2561) - int CharPositionFromPoint(int x, int y); + long CharPositionFromPoint(int x, int y); /// /// Find the position of a character from a point within the window. /// Return INVALID_POSITION if not close to text. /// (Scintilla feature 2562) /// - int CharPositionFromPointClose(int x, int y); + long CharPositionFromPointClose(int x, int y); /// Set whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2668) void SetMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch); @@ -2243,10 +2243,10 @@ public interface IScintillaGateway void ClearSelections(); /// Set a simple selection (Scintilla feature 2572) - void SetSelection(int caret, int anchor); + void SetSelection(long caret, long anchor); /// Add a selection (Scintilla feature 2573) - void AddSelection(int caret, int anchor); + void AddSelection(long caret, long anchor); /// Drop one selection (Scintilla feature 2671) void DropSelectionN(int selection); @@ -2258,64 +2258,64 @@ public interface IScintillaGateway int GetMainSelection(); /// Set the caret position of the nth selection. (Scintilla feature 2576) - void SetSelectionNCaret(int selection, int caret); + void SetSelectionNCaret(int selection, long caret); /// Return the caret position of the nth selection. (Scintilla feature 2577) - int GetSelectionNCaret(int selection); + long GetSelectionNCaret(int selection); /// Set the anchor position of the nth selection. (Scintilla feature 2578) - void SetSelectionNAnchor(int selection, int anchor); + void SetSelectionNAnchor(int selection, long anchor); /// Return the anchor position of the nth selection. (Scintilla feature 2579) - int GetSelectionNAnchor(int selection); + long GetSelectionNAnchor(int selection); /// Set the virtual space of the caret of the nth selection. (Scintilla feature 2580) - void SetSelectionNCaretVirtualSpace(int selection, int space); + void SetSelectionNCaretVirtualSpace(int selection, long space); /// Return the virtual space of the caret of the nth selection. (Scintilla feature 2581) - int GetSelectionNCaretVirtualSpace(int selection); + long GetSelectionNCaretVirtualSpace(int selection); /// Set the virtual space of the anchor of the nth selection. (Scintilla feature 2582) - void SetSelectionNAnchorVirtualSpace(int selection, int space); + void SetSelectionNAnchorVirtualSpace(int selection, long space); /// Return the virtual space of the anchor of the nth selection. (Scintilla feature 2583) - int GetSelectionNAnchorVirtualSpace(int selection); + long GetSelectionNAnchorVirtualSpace(int selection); /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2584) - void SetSelectionNStart(int selection, int anchor); + void SetSelectionNStart(int selection, long anchor); /// Returns the position at the start of the selection. (Scintilla feature 2585) - int GetSelectionNStart(int selection); + long GetSelectionNStart(int selection); /// Sets the position that ends the selection - this becomes the currentPosition. (Scintilla feature 2586) - void SetSelectionNEnd(int selection, int caret); + void SetSelectionNEnd(int selection, long caret); /// Returns the position at the end of the selection. (Scintilla feature 2587) - int GetSelectionNEnd(int selection); + long GetSelectionNEnd(int selection); /// Set the caret position of the rectangular selection. (Scintilla feature 2588) - void SetRectangularSelectionCaret(int caret); + void SetRectangularSelectionCaret(long caret); /// Return the caret position of the rectangular selection. (Scintilla feature 2589) - int GetRectangularSelectionCaret(); + long GetRectangularSelectionCaret(); /// Set the anchor position of the rectangular selection. (Scintilla feature 2590) - void SetRectangularSelectionAnchor(int anchor); + void SetRectangularSelectionAnchor(long anchor); /// Return the anchor position of the rectangular selection. (Scintilla feature 2591) - int GetRectangularSelectionAnchor(); + long GetRectangularSelectionAnchor(); /// Set the virtual space of the caret of the rectangular selection. (Scintilla feature 2592) - void SetRectangularSelectionCaretVirtualSpace(int space); + void SetRectangularSelectionCaretVirtualSpace(long space); /// Return the virtual space of the caret of the rectangular selection. (Scintilla feature 2593) - int GetRectangularSelectionCaretVirtualSpace(); + long GetRectangularSelectionCaretVirtualSpace(); /// Set the virtual space of the anchor of the rectangular selection. (Scintilla feature 2594) - void SetRectangularSelectionAnchorVirtualSpace(int space); + void SetRectangularSelectionAnchorVirtualSpace(long space); /// Return the virtual space of the anchor of the rectangular selection. (Scintilla feature 2595) - int GetRectangularSelectionAnchorVirtualSpace(); + long GetRectangularSelectionAnchorVirtualSpace(); /// Set options for virtual space behaviour. (Scintilla feature 2596) void SetVirtualSpaceOptions(VirtualSpace virtualSpaceOptions); @@ -2386,14 +2386,14 @@ public interface IScintillaGateway /// there may be a need to redraw. /// (Scintilla feature 2617) /// - int ChangeLexerState(int start, int end); + int ChangeLexerState(long start, long end); /// /// Find the next line at or after lineStart that is a contracted fold header line. /// Return -1 when no more lines. /// (Scintilla feature 2618) /// - int ContractedFoldNext(int lineStart); + long ContractedFoldNext(long lineStart); /// Centre current line in window. (Scintilla feature 2619) void VerticalCentreCaret(); @@ -2446,13 +2446,13 @@ public interface IScintillaGateway Technology GetTechnology(); /// Create an ILoader*. (Scintilla feature 2632) - IntPtr CreateLoader(int bytes, DocumentOption documentOptions); + IntPtr CreateLoader(long bytes, DocumentOption documentOptions); /// On OS X, show a find indicator. (Scintilla feature 2640) - void FindIndicatorShow(int start, int end); + void FindIndicatorShow(long start, long end); /// On OS X, flash a find indicator, then fade out. (Scintilla feature 2641) - void FindIndicatorFlash(int start, int end); + void FindIndicatorFlash(long start, long end); /// On OS X, hide the find indicator. (Scintilla feature 2642) void FindIndicatorHide(); @@ -2508,7 +2508,7 @@ public interface IScintillaGateway int GetLexer(); /// Colourise a segment of the document using the current lexing language. (Scintilla feature 4003) - void Colourise(int start, int end); + void Colourise(long start, long end); /// Set up a value that may be used by a lexer for some optional feature. (Scintilla feature 4004) unsafe void SetProperty(string key, string value); @@ -2661,10 +2661,10 @@ public interface IScintillaGateway void ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex); /// Retrieve the document line containing a position measured in index units. (Scintilla feature 2713) - int LineFromIndexPosition(int pos, LineCharacterIndexType lineCharacterIndex); + long LineFromIndexPosition(long pos, LineCharacterIndexType lineCharacterIndex); /// Retrieve the position measured in index units at the start of a document line. (Scintilla feature 2714) - int IndexPositionFromLine(int line, LineCharacterIndexType lineCharacterIndex); + long IndexPositionFromLine(long line, LineCharacterIndexType lineCharacterIndex); /// /// Divide each styling byte into lexical class bits (default: 5) and indicator diff --git a/Visual Studio Project Template C#/PluginInfrastructure/ScintillaGateway.cs b/Visual Studio Project Template C#/PluginInfrastructure/ScintillaGateway.cs index 4483904..8c349d5 100644 --- a/Visual Studio Project Template C#/PluginInfrastructure/ScintillaGateway.cs +++ b/Visual Studio Project Template C#/PluginInfrastructure/ScintillaGateway.cs @@ -47,7 +47,7 @@ public void InsertTextAndMoveCursor(string text) public void SelectCurrentLine() { - int line = GetCurrentLineNumber(); + long line = GetCurrentLineNumber(); SetSelection(PositionFromLine(line), PositionFromLine(line + 1)); } @@ -63,7 +63,7 @@ public void ClearSelectionToCursor() /// /// Get the current line from the current position /// - public int GetCurrentLineNumber() + public long GetCurrentLineNumber() { return LineFromPosition(GetCurrentPos()); } @@ -85,7 +85,7 @@ public ScrollInfo GetScrollInfo(ScrollInfoMask mask = ScrollInfoMask.SIF_ALL, Sc /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ /// Add text to the document at current position. (Scintilla feature 2001) - public unsafe void AddText(int length, string text) + public unsafe void AddText(long length, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { @@ -94,7 +94,7 @@ public unsafe void AddText(int length, string text) } /// Add array of cells to document. (Scintilla feature 2002) - public unsafe void AddStyledText(int length, Cells c) + public unsafe void AddStyledText(long length, Cells c) { fixed (char* cPtr = c.Value) { @@ -103,7 +103,7 @@ public unsafe void AddStyledText(int length, Cells c) } /// Insert string at a position. (Scintilla feature 2003) - public unsafe void InsertText(int pos, string text) + public unsafe void InsertText(long pos, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { @@ -112,7 +112,7 @@ public unsafe void InsertText(int pos, string text) } /// Change the text that is being inserted in response to SC_MOD_INSERTCHECK (Scintilla feature 2672) - public unsafe void ChangeInsertion(int length, string text) + public unsafe void ChangeInsertion(long length, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { @@ -127,7 +127,7 @@ public void ClearAll() } /// Delete a range of text in the document. (Scintilla feature 2645) - public void DeleteRange(int start, int lengthDelete) + public void DeleteRange(long start, long lengthDelete) { Win32.SendMessage(scintilla, SciMsg.SCI_DELETERANGE, (IntPtr) start, (IntPtr) lengthDelete); } @@ -139,31 +139,31 @@ public void ClearDocumentStyle() } /// Returns the number of bytes in the document. (Scintilla feature 2006) - public int GetLength() + public long GetLength() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLENGTH, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETLENGTH, (IntPtr) Unused, (IntPtr) Unused); } /// Returns the character byte at the position. (Scintilla feature 2007) - public int GetCharAt(int pos) + public int GetCharAt(long pos) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCHARAT, (IntPtr) pos, (IntPtr) Unused); } /// Returns the position of the caret. (Scintilla feature 2008) - public int GetCurrentPos() + public long GetCurrentPos() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCURRENTPOS, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETCURRENTPOS, (IntPtr) Unused, (IntPtr) Unused); } /// Returns the position of the opposite end of the selection to the caret. (Scintilla feature 2009) - public int GetAnchor() + public long GetAnchor() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETANCHOR, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETANCHOR, (IntPtr) Unused, (IntPtr) Unused); } /// Returns the style byte at the position. (Scintilla feature 2010) - public int GetStyleAt(int pos) + public int GetStyleAt(long pos) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEAT, (IntPtr) pos, (IntPtr) Unused); } @@ -205,9 +205,9 @@ public void SetSavePoint() /// Returns the number of bytes in the buffer not including terminating NULs. /// (Scintilla feature 2015) /// - public int GetStyledText(TextRange tr) + public long GetStyledText(TextRange tr) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEDTEXT, (IntPtr) Unused, tr.NativePointer); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEDTEXT, (IntPtr) Unused, tr.NativePointer); } /// Are there any redoable actions in the undo history? (Scintilla feature 2016) @@ -267,9 +267,9 @@ public void SetTabDrawMode(TabDrawMode tabDrawMode) } /// Find the position from a point within the window. (Scintilla feature 2022) - public int PositionFromPoint(int x, int y) + public long PositionFromPoint(int x, int y) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMPOINT, (IntPtr) x, (IntPtr) y); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMPOINT, (IntPtr) x, (IntPtr) y); } /// @@ -277,19 +277,19 @@ public int PositionFromPoint(int x, int y) /// INVALID_POSITION if not close to text. /// (Scintilla feature 2023) /// - public int PositionFromPointClose(int x, int y) + public long PositionFromPointClose(int x, int y) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMPOINTCLOSE, (IntPtr) x, (IntPtr) y); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMPOINTCLOSE, (IntPtr) x, (IntPtr) y); } /// Set caret to start of a line and ensure it is visible. (Scintilla feature 2024) - public void GotoLine(int line) + public void GotoLine(long line) { Win32.SendMessage(scintilla, SciMsg.SCI_GOTOLINE, (IntPtr) line, (IntPtr) Unused); } /// Set caret to a position and ensure it is visible. (Scintilla feature 2025) - public void GotoPos(int caret) + public void GotoPos(long caret) { Win32.SendMessage(scintilla, SciMsg.SCI_GOTOPOS, (IntPtr) caret, (IntPtr) Unused); } @@ -299,7 +299,7 @@ public void GotoPos(int caret) /// end of the selection from the caret. /// (Scintilla feature 2026) /// - public void SetAnchor(int anchor) + public void SetAnchor(long anchor) { Win32.SendMessage(scintilla, SciMsg.SCI_SETANCHOR, (IntPtr) anchor, (IntPtr) Unused); } @@ -310,7 +310,7 @@ public void SetAnchor(int anchor) /// Result is NUL-terminated. /// (Scintilla feature 2027) /// - public unsafe string GetCurLine(int length) + public unsafe string GetCurLine(long length) { byte[] textBuffer = new byte[10000]; fixed (byte* textPtr = textBuffer) @@ -321,9 +321,9 @@ public unsafe string GetCurLine(int length) } /// Retrieve the position of the last correctly styled character. (Scintilla feature 2028) - public int GetEndStyled() + public long GetEndStyled() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETENDSTYLED, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETENDSTYLED, (IntPtr) Unused, (IntPtr) Unused); } /// Convert all line endings in the document to one mode. (Scintilla feature 2029) @@ -349,7 +349,7 @@ public void SetEOLMode(EndOfLine eolMode) /// The unused parameter is no longer used and should be set to 0. /// (Scintilla feature 2032) /// - public void StartStyling(int start, int unused) + public void StartStyling(long start, int unused) { Win32.SendMessage(scintilla, SciMsg.SCI_STARTSTYLING, (IntPtr) start, (IntPtr) unused); } @@ -359,7 +359,7 @@ public void StartStyling(int start, int unused) /// and move the current styling position to after this newly styled segment. /// (Scintilla feature 2033) /// - public void SetStyling(int length, int style) + public void SetStyling(long length, int style) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSTYLING, (IntPtr) length, (IntPtr) style); } @@ -393,19 +393,19 @@ public int GetTabWidth() } /// Clear explicit tabstops on a line. (Scintilla feature 2675) - public void ClearTabStops(int line) + public void ClearTabStops(long line) { Win32.SendMessage(scintilla, SciMsg.SCI_CLEARTABSTOPS, (IntPtr) line, (IntPtr) Unused); } /// Add an explicit tab stop for a line. (Scintilla feature 2676) - public void AddTabStop(int line, int x) + public void AddTabStop(long line, int x) { Win32.SendMessage(scintilla, SciMsg.SCI_ADDTABSTOP, (IntPtr) line, (IntPtr) x); } /// Find the next explicit tab stop position on a line after a position. (Scintilla feature 2677) - public int GetNextTabStop(int line, int x) + public int GetNextTabStop(long line, int x) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETNEXTTABSTOP, (IntPtr) line, (IntPtr) x); } @@ -463,13 +463,13 @@ public void MarkerEnableHighlight(bool enabled) } /// Add a marker to a line, returning an ID which can be used to find or delete the marker. (Scintilla feature 2043) - public int MarkerAdd(int line, int markerNumber) + public int MarkerAdd(long line, int markerNumber) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERADD, (IntPtr) line, (IntPtr) markerNumber); } /// Delete a marker from a line. (Scintilla feature 2044) - public void MarkerDelete(int line, int markerNumber) + public void MarkerDelete(long line, int markerNumber) { Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDELETE, (IntPtr) line, (IntPtr) markerNumber); } @@ -481,7 +481,7 @@ public void MarkerDeleteAll(int markerNumber) } /// Get a bit mask of all the markers set on a line. (Scintilla feature 2046) - public int MarkerGet(int line) + public int MarkerGet(long line) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERGET, (IntPtr) line, (IntPtr) Unused); } @@ -491,15 +491,15 @@ public int MarkerGet(int line) /// Return -1 when no more lines. /// (Scintilla feature 2047) /// - public int MarkerNext(int lineStart, int markerMask) + public long MarkerNext(long lineStart, int markerMask) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERNEXT, (IntPtr) lineStart, (IntPtr) markerMask); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERNEXT, (IntPtr) lineStart, (IntPtr) markerMask); } /// Find the previous line before lineStart that includes a marker in mask. (Scintilla feature 2048) - public int MarkerPrevious(int lineStart, int markerMask) + public long MarkerPrevious(long lineStart, int markerMask) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERPREVIOUS, (IntPtr) lineStart, (IntPtr) markerMask); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERPREVIOUS, (IntPtr) lineStart, (IntPtr) markerMask); } /// Define a marker from a pixmap. (Scintilla feature 2049) @@ -512,7 +512,7 @@ public unsafe void MarkerDefinePixmap(int markerNumber, string pixmap) } /// Add a set of markers to a line. (Scintilla feature 2466) - public void MarkerAddSet(int line, int markerSet) + public void MarkerAddSet(long line, int markerSet) { Win32.SendMessage(scintilla, SciMsg.SCI_MARKERADDSET, (IntPtr) line, (IntPtr) markerSet); } @@ -865,7 +865,7 @@ public void ClearAllCmdKeys() } /// Set the styles for a segment of the document. (Scintilla feature 2073) - public unsafe void SetStylingEx(int length, string styles) + public unsafe void SetStylingEx(long length, string styles) { fixed (byte* stylesPtr = Encoding.UTF8.GetBytes(styles)) { @@ -1044,13 +1044,13 @@ public int GetWhitespaceSize() } /// Used to hold extra styling information for each line. (Scintilla feature 2092) - public void SetLineState(int line, int state) + public void SetLineState(long line, int state) { Win32.SendMessage(scintilla, SciMsg.SCI_SETLINESTATE, (IntPtr) line, (IntPtr) state); } /// Retrieve the extra styling information for a line. (Scintilla feature 2093) - public int GetLineState(int line) + public int GetLineState(long line) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESTATE, (IntPtr) line, (IntPtr) Unused); } @@ -1121,7 +1121,7 @@ public void StyleSetChangeable(int style, bool changeable) /// the caret should be used to provide context. /// (Scintilla feature 2100) /// - public unsafe void AutoCShow(int lengthEntered, string itemList) + public unsafe void AutoCShow(long lengthEntered, string itemList) { fixed (byte* itemListPtr = Encoding.UTF8.GetBytes(itemList)) { @@ -1142,9 +1142,9 @@ public bool AutoCActive() } /// Retrieve the position of the caret when the auto-completion list was displayed. (Scintilla feature 2103) - public int AutoCPosStart() + public long AutoCPosStart() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCPOSSTART, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCPOSSTART, (IntPtr) Unused, (IntPtr) Unused); } /// User has selected an item so remove the list and insert the selection. (Scintilla feature 2104) @@ -1373,39 +1373,39 @@ public bool GetUseTabs() } /// Change the indentation of a line to a number of columns. (Scintilla feature 2126) - public void SetLineIndentation(int line, int indentation) + public void SetLineIndentation(long line, int indentation) { Win32.SendMessage(scintilla, SciMsg.SCI_SETLINEINDENTATION, (IntPtr) line, (IntPtr) indentation); } /// Retrieve the number of columns that a line is indented. (Scintilla feature 2127) - public int GetLineIndentation(int line) + public int GetLineIndentation(long line) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEINDENTATION, (IntPtr) line, (IntPtr) Unused); } /// Retrieve the position before the first non indentation character on a line. (Scintilla feature 2128) - public int GetLineIndentPosition(int line) + public long GetLineIndentPosition(long line) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEINDENTPOSITION, (IntPtr) line, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEINDENTPOSITION, (IntPtr) line, (IntPtr) Unused); } /// Retrieve the column number of a position, taking tab width into account. (Scintilla feature 2129) - public int GetColumn(int pos) + public long GetColumn(long pos) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCOLUMN, (IntPtr) pos, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETCOLUMN, (IntPtr) pos, (IntPtr) Unused); } /// Count characters between two positions. (Scintilla feature 2633) - public int CountCharacters(int start, int end) + public long CountCharacters(long start, long end) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_COUNTCHARACTERS, (IntPtr) start, (IntPtr) end); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_COUNTCHARACTERS, (IntPtr) start, (IntPtr) end); } /// Count code units between two positions. (Scintilla feature 2715) - public int CountCodeUnits(int start, int end) + public long CountCodeUnits(long start, long end) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_COUNTCODEUNITS, (IntPtr) start, (IntPtr) end); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_COUNTCODEUNITS, (IntPtr) start, (IntPtr) end); } /// Show or hide the horizontal scroll bar. (Scintilla feature 2130) @@ -1437,21 +1437,21 @@ public IndentView GetIndentationGuides() /// 0 = no highlighted guide. /// (Scintilla feature 2134) /// - public void SetHighlightGuide(int column) + public void SetHighlightGuide(long column) { Win32.SendMessage(scintilla, SciMsg.SCI_SETHIGHLIGHTGUIDE, (IntPtr) column, (IntPtr) Unused); } /// Get the highlighted indentation guide column. (Scintilla feature 2135) - public int GetHighlightGuide() + public long GetHighlightGuide() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETHIGHLIGHTGUIDE, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETHIGHLIGHTGUIDE, (IntPtr) Unused, (IntPtr) Unused); } /// Get the position after the last visible characters on a line. (Scintilla feature 2136) - public int GetLineEndPosition(int line) + public long GetLineEndPosition(long line) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEENDPOSITION, (IntPtr) line, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEENDPOSITION, (IntPtr) line, (IntPtr) Unused); } /// Get the code page used to interpret the bytes of the document as characters. (Scintilla feature 2137) @@ -1473,37 +1473,37 @@ public bool GetReadOnly() } /// Sets the position of the caret. (Scintilla feature 2141) - public void SetCurrentPos(int caret) + public void SetCurrentPos(long caret) { Win32.SendMessage(scintilla, SciMsg.SCI_SETCURRENTPOS, (IntPtr) caret, (IntPtr) Unused); } /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2142) - public void SetSelectionStart(int anchor) + public void SetSelectionStart(long anchor) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONSTART, (IntPtr) anchor, (IntPtr) Unused); } /// Returns the position at the start of the selection. (Scintilla feature 2143) - public int GetSelectionStart() + public long GetSelectionStart() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONSTART, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONSTART, (IntPtr) Unused, (IntPtr) Unused); } /// Sets the position that ends the selection - this becomes the caret. (Scintilla feature 2144) - public void SetSelectionEnd(int caret) + public void SetSelectionEnd(long caret) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONEND, (IntPtr) caret, (IntPtr) Unused); } /// Returns the position at the end of the selection. (Scintilla feature 2145) - public int GetSelectionEnd() + public long GetSelectionEnd() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONEND, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONEND, (IntPtr) Unused, (IntPtr) Unused); } /// Set caret to a position, while removing any existing selection. (Scintilla feature 2556) - public void SetEmptySelection(int caret) + public void SetEmptySelection(long caret) { Win32.SendMessage(scintilla, SciMsg.SCI_SETEMPTYSELECTION, (IntPtr) caret, (IntPtr) Unused); } @@ -1533,15 +1533,15 @@ public PrintOption GetPrintColourMode() } /// Find some text in the document. (Scintilla feature 2150) - public int FindText(FindOption searchFlags, TextToFind ft) + public long FindText(FindOption searchFlags, TextToFind ft) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_FINDTEXT, (IntPtr) searchFlags, ft.NativePointer); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_FINDTEXT, (IntPtr) searchFlags, ft.NativePointer); } /// Retrieve the display line at the top of the display. (Scintilla feature 2152) - public int GetFirstVisibleLine() + public long GetFirstVisibleLine() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFIRSTVISIBLELINE, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETFIRSTVISIBLELINE, (IntPtr) Unused, (IntPtr) Unused); } /// @@ -1549,7 +1549,7 @@ public int GetFirstVisibleLine() /// Returns the length of the line. /// (Scintilla feature 2153) /// - public unsafe string GetLine(int line) + public unsafe string GetLine(long line) { byte[] textBuffer = new byte[10000]; fixed (byte* textPtr = textBuffer) @@ -1560,9 +1560,9 @@ public unsafe string GetLine(int line) } /// Returns the number of lines in the document. There is always at least one. (Scintilla feature 2154) - public int GetLineCount() + public long GetLineCount() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINECOUNT, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINECOUNT, (IntPtr) Unused, (IntPtr) Unused); } /// Sets the size in pixels of the left margin. (Scintilla feature 2155) @@ -1596,7 +1596,7 @@ public bool GetModify() } /// Select a range of text. (Scintilla feature 2160) - public void SetSel(int anchor, int caret) + public void SetSel(long anchor, long caret) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSEL, (IntPtr) anchor, (IntPtr) caret); } @@ -1622,9 +1622,9 @@ public unsafe string GetSelText() /// Return the length of the text. /// (Scintilla feature 2162) /// - public int GetTextRange(TextRange tr) + public long GetTextRange(TextRange tr) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXTRANGE, (IntPtr) Unused, tr.NativePointer); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXTRANGE, (IntPtr) Unused, tr.NativePointer); } /// Draw the selection either highlighted or in normal (non-highlighted) style. (Scintilla feature 2163) @@ -1634,31 +1634,31 @@ public void HideSelection(bool hide) } /// Retrieve the x value of the point in the window where a position is displayed. (Scintilla feature 2164) - public int PointXFromPosition(int pos) + public int PointXFromPosition(long pos) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POINTXFROMPOSITION, (IntPtr) Unused, (IntPtr) pos); } /// Retrieve the y value of the point in the window where a position is displayed. (Scintilla feature 2165) - public int PointYFromPosition(int pos) + public int PointYFromPosition(long pos) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POINTYFROMPOSITION, (IntPtr) Unused, (IntPtr) pos); } /// Retrieve the line containing a position. (Scintilla feature 2166) - public int LineFromPosition(int pos) + public long LineFromPosition(long pos) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINEFROMPOSITION, (IntPtr) pos, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_LINEFROMPOSITION, (IntPtr) pos, (IntPtr) Unused); } /// Retrieve the position at the start of a line. (Scintilla feature 2167) - public int PositionFromLine(int line) + public long PositionFromLine(long line) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMLINE, (IntPtr) line, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMLINE, (IntPtr) line, (IntPtr) Unused); } /// Scroll horizontally and vertically. (Scintilla feature 2168) - public void LineScroll(int columns, int lines) + public void LineScroll(long columns, long lines) { Win32.SendMessage(scintilla, SciMsg.SCI_LINESCROLL, (IntPtr) columns, (IntPtr) lines); } @@ -1675,7 +1675,7 @@ public void ScrollCaret() /// This may be used to make a search match visible. /// (Scintilla feature 2569) /// - public void ScrollRange(int secondary, int primary) + public void ScrollRange(long secondary, long primary) { Win32.SendMessage(scintilla, SciMsg.SCI_SCROLLRANGE, (IntPtr) secondary, (IntPtr) primary); } @@ -1764,7 +1764,7 @@ public unsafe void SetText(string text) /// Result is NUL-terminated. /// (Scintilla feature 2182) /// - public unsafe string GetText(int length) + public unsafe string GetText(long length) { byte[] textBuffer = new byte[10000]; fixed (byte* textPtr = textBuffer) @@ -1775,9 +1775,9 @@ public unsafe string GetText(int length) } /// Retrieve the number of characters in the document. (Scintilla feature 2183) - public int GetTextLength() + public long GetTextLength() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXTLENGTH, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXTLENGTH, (IntPtr) Unused, (IntPtr) Unused); } /// Retrieve a pointer to a function that processes messages for this Scintilla. (Scintilla feature 2184) @@ -1825,15 +1825,15 @@ public int GetCaretWidth() /// document without affecting the scroll position. /// (Scintilla feature 2190) /// - public void SetTargetStart(int start) + public void SetTargetStart(long start) { Win32.SendMessage(scintilla, SciMsg.SCI_SETTARGETSTART, (IntPtr) start, (IntPtr) Unused); } /// Get the position that starts the target. (Scintilla feature 2191) - public int GetTargetStart() + public long GetTargetStart() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTARGETSTART, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETTARGETSTART, (IntPtr) Unused, (IntPtr) Unused); } /// @@ -1841,19 +1841,19 @@ public int GetTargetStart() /// document without affecting the scroll position. /// (Scintilla feature 2192) /// - public void SetTargetEnd(int end) + public void SetTargetEnd(long end) { Win32.SendMessage(scintilla, SciMsg.SCI_SETTARGETEND, (IntPtr) end, (IntPtr) Unused); } /// Get the position that ends the target. (Scintilla feature 2193) - public int GetTargetEnd() + public long GetTargetEnd() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTARGETEND, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETTARGETEND, (IntPtr) Unused, (IntPtr) Unused); } /// Sets both the start and end of the target in one call. (Scintilla feature 2686) - public void SetTargetRange(int start, int end) + public void SetTargetRange(long start, long end) { Win32.SendMessage(scintilla, SciMsg.SCI_SETTARGETRANGE, (IntPtr) start, (IntPtr) end); } @@ -1887,11 +1887,11 @@ public void TargetWholeDocument() /// Returns the length of the replacement text. /// (Scintilla feature 2194) /// - public unsafe int ReplaceTarget(int length, string text) + public unsafe long ReplaceTarget(long length, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_REPLACETARGET, (IntPtr) length, (IntPtr) textPtr); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_REPLACETARGET, (IntPtr) length, (IntPtr) textPtr); } } @@ -1904,11 +1904,11 @@ public unsafe int ReplaceTarget(int length, string text) /// caused by processing the \d patterns. /// (Scintilla feature 2195) /// - public unsafe int ReplaceTargetRE(int length, string text) + public unsafe long ReplaceTargetRE(long length, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_REPLACETARGETRE, (IntPtr) length, (IntPtr) textPtr); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_REPLACETARGETRE, (IntPtr) length, (IntPtr) textPtr); } } @@ -1918,11 +1918,11 @@ public unsafe int ReplaceTargetRE(int length, string text) /// Returns start of found range or -1 for failure in which case target is not moved. /// (Scintilla feature 2197) /// - public unsafe int SearchInTarget(int length, string text) + public unsafe long SearchInTarget(long length, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHINTARGET, (IntPtr) length, (IntPtr) textPtr); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHINTARGET, (IntPtr) length, (IntPtr) textPtr); } } @@ -1939,7 +1939,7 @@ public FindOption GetSearchFlags() } /// Show a call tip containing a definition near position pos. (Scintilla feature 2200) - public unsafe void CallTipShow(int pos, string definition) + public unsafe void CallTipShow(long pos, string definition) { fixed (byte* definitionPtr = Encoding.UTF8.GetBytes(definition)) { @@ -1960,13 +1960,13 @@ public bool CallTipActive() } /// Retrieve the position where the caret was before displaying the call tip. (Scintilla feature 2203) - public int CallTipPosStart() + public long CallTipPosStart() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPPOSSTART, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPPOSSTART, (IntPtr) Unused, (IntPtr) Unused); } /// Set the start position in order to change when backspacing removes the calltip. (Scintilla feature 2214) - public void CallTipSetPosStart(int posStart) + public void CallTipSetPosStart(long posStart) { Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETPOSSTART, (IntPtr) posStart, (IntPtr) Unused); } @@ -2008,21 +2008,21 @@ public void CallTipSetPosition(bool above) } /// Find the display line of a document line taking hidden lines into account. (Scintilla feature 2220) - public int VisibleFromDocLine(int docLine) + public long VisibleFromDocLine(long docLine) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_VISIBLEFROMDOCLINE, (IntPtr) docLine, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_VISIBLEFROMDOCLINE, (IntPtr) docLine, (IntPtr) Unused); } /// Find the document line of a display line taking hidden lines into account. (Scintilla feature 2221) - public int DocLineFromVisible(int displayLine) + public long DocLineFromVisible(long displayLine) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_DOCLINEFROMVISIBLE, (IntPtr) displayLine, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_DOCLINEFROMVISIBLE, (IntPtr) displayLine, (IntPtr) Unused); } /// The number of display lines needed to wrap a document line (Scintilla feature 2235) - public int WrapCount(int docLine) + public long WrapCount(long docLine) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_WRAPCOUNT, (IntPtr) docLine, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_WRAPCOUNT, (IntPtr) docLine, (IntPtr) Unused); } /// @@ -2031,43 +2031,43 @@ public int WrapCount(int docLine) /// line is a header and whether it is effectively white space. /// (Scintilla feature 2222) /// - public void SetFoldLevel(int line, FoldLevel level) + public void SetFoldLevel(long line, FoldLevel level) { Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDLEVEL, (IntPtr) line, (IntPtr) level); } /// Retrieve the fold level of a line. (Scintilla feature 2223) - public FoldLevel GetFoldLevel(int line) + public FoldLevel GetFoldLevel(long line) { return (FoldLevel)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOLDLEVEL, (IntPtr) line, (IntPtr) Unused); } /// Find the last child line of a header line. (Scintilla feature 2224) - public int GetLastChild(int line, FoldLevel level) + public long GetLastChild(long line, FoldLevel level) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLASTCHILD, (IntPtr) line, (IntPtr) level); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETLASTCHILD, (IntPtr) line, (IntPtr) level); } /// Find the parent line of a child line. (Scintilla feature 2225) - public int GetFoldParent(int line) + public long GetFoldParent(long line) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOLDPARENT, (IntPtr) line, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOLDPARENT, (IntPtr) line, (IntPtr) Unused); } /// Make a range of lines visible. (Scintilla feature 2226) - public void ShowLines(int lineStart, int lineEnd) + public void ShowLines(long lineStart, long lineEnd) { Win32.SendMessage(scintilla, SciMsg.SCI_SHOWLINES, (IntPtr) lineStart, (IntPtr) lineEnd); } /// Make a range of lines invisible. (Scintilla feature 2227) - public void HideLines(int lineStart, int lineEnd) + public void HideLines(long lineStart, long lineEnd) { Win32.SendMessage(scintilla, SciMsg.SCI_HIDELINES, (IntPtr) lineStart, (IntPtr) lineEnd); } /// Is a line visible? (Scintilla feature 2228) - public bool GetLineVisible(int line) + public bool GetLineVisible(long line) { return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEVISIBLE, (IntPtr) line, (IntPtr) Unused); } @@ -2079,25 +2079,25 @@ public bool GetAllLinesVisible() } /// Show the children of a header line. (Scintilla feature 2229) - public void SetFoldExpanded(int line, bool expanded) + public void SetFoldExpanded(long line, bool expanded) { Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDEXPANDED, (IntPtr) line, new IntPtr(expanded ? 1 : 0)); } /// Is a header line expanded? (Scintilla feature 2230) - public bool GetFoldExpanded(int line) + public bool GetFoldExpanded(long line) { return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOLDEXPANDED, (IntPtr) line, (IntPtr) Unused); } /// Switch a header line between expanded and contracted. (Scintilla feature 2231) - public void ToggleFold(int line) + public void ToggleFold(long line) { Win32.SendMessage(scintilla, SciMsg.SCI_TOGGLEFOLD, (IntPtr) line, (IntPtr) Unused); } /// Switch a header line between expanded and contracted and show some text after the line. (Scintilla feature 2700) - public unsafe void ToggleFoldShowText(int line, string text) + public unsafe void ToggleFoldShowText(long line, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { @@ -2138,19 +2138,19 @@ public unsafe string GetDefaultFoldDisplayText() } /// Expand or contract a fold header. (Scintilla feature 2237) - public void FoldLine(int line, FoldAction action) + public void FoldLine(long line, FoldAction action) { Win32.SendMessage(scintilla, SciMsg.SCI_FOLDLINE, (IntPtr) line, (IntPtr) action); } /// Expand or contract a fold header and its children. (Scintilla feature 2238) - public void FoldChildren(int line, FoldAction action) + public void FoldChildren(long line, FoldAction action) { Win32.SendMessage(scintilla, SciMsg.SCI_FOLDCHILDREN, (IntPtr) line, (IntPtr) action); } /// Expand a fold header and all children. Use the level argument instead of the line's current level. (Scintilla feature 2239) - public void ExpandChildren(int line, FoldLevel level) + public void ExpandChildren(long line, FoldLevel level) { Win32.SendMessage(scintilla, SciMsg.SCI_EXPANDCHILDREN, (IntPtr) line, (IntPtr) level); } @@ -2162,7 +2162,7 @@ public void FoldAll(FoldAction action) } /// Ensure a particular line is visible by expanding any header line hiding it. (Scintilla feature 2232) - public void EnsureVisible(int line) + public void EnsureVisible(long line) { Win32.SendMessage(scintilla, SciMsg.SCI_ENSUREVISIBLE, (IntPtr) line, (IntPtr) Unused); } @@ -2190,7 +2190,7 @@ public void SetFoldFlags(FoldFlag flags) /// Use the currently set visibility policy to determine which range to display. /// (Scintilla feature 2234) /// - public void EnsureVisibleEnforcePolicy(int line) + public void EnsureVisibleEnforcePolicy(long line) { Win32.SendMessage(scintilla, SciMsg.SCI_ENSUREVISIBLEENFORCEPOLICY, (IntPtr) line, (IntPtr) Unused); } @@ -2232,19 +2232,19 @@ public int GetMouseDwellTime() } /// Get position of start of word. (Scintilla feature 2266) - public int WordStartPosition(int pos, bool onlyWordCharacters) + public long WordStartPosition(long pos, bool onlyWordCharacters) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_WORDSTARTPOSITION, (IntPtr) pos, new IntPtr(onlyWordCharacters ? 1 : 0)); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_WORDSTARTPOSITION, (IntPtr) pos, new IntPtr(onlyWordCharacters ? 1 : 0)); } /// Get position of end of word. (Scintilla feature 2267) - public int WordEndPosition(int pos, bool onlyWordCharacters) + public long WordEndPosition(long pos, bool onlyWordCharacters) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_WORDENDPOSITION, (IntPtr) pos, new IntPtr(onlyWordCharacters ? 1 : 0)); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_WORDENDPOSITION, (IntPtr) pos, new IntPtr(onlyWordCharacters ? 1 : 0)); } /// Is the range start..end considered a word? (Scintilla feature 2691) - public bool IsRangeWord(int start, int end) + public bool IsRangeWord(long start, long end) { return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_ISRANGEWORD, (IntPtr) start, (IntPtr) end); } @@ -2393,7 +2393,7 @@ public bool GetEndAtLastLine() } /// Retrieve the height of a particular line of text in pixels. (Scintilla feature 2279) - public int TextHeight(int line) + public int TextHeight(long line) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_TEXTHEIGHT, (IntPtr) line, (IntPtr) Unused); } @@ -2411,7 +2411,7 @@ public bool GetVScrollBar() } /// Append a string to the end of the document without changing the selection. (Scintilla feature 2282) - public unsafe void AppendText(int length, string text) + public unsafe void AppendText(long length, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { @@ -2450,7 +2450,7 @@ public FontQuality GetFontQuality() } /// Scroll so that a display line is at the top of the display. (Scintilla feature 2613) - public void SetFirstVisibleLine(int displayLine) + public void SetFirstVisibleLine(long displayLine) { Win32.SendMessage(scintilla, SciMsg.SCI_SETFIRSTVISIBLELINE, (IntPtr) displayLine, (IntPtr) Unused); } @@ -2927,13 +2927,13 @@ public void MoveCaretInsideView() } /// How many characters are on a line, including end of line characters? (Scintilla feature 2350) - public int LineLength(int line) + public long LineLength(long line) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINELENGTH, (IntPtr) line, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_LINELENGTH, (IntPtr) line, (IntPtr) Unused); } /// Highlight the characters at two positions. (Scintilla feature 2351) - public void BraceHighlight(int posA, int posB) + public void BraceHighlight(long posA, long posB) { Win32.SendMessage(scintilla, SciMsg.SCI_BRACEHIGHLIGHT, (IntPtr) posA, (IntPtr) posB); } @@ -2945,7 +2945,7 @@ public void BraceHighlightIndicator(bool useSetting, int indicator) } /// Highlight the character at a position indicating there is no matching brace. (Scintilla feature 2352) - public void BraceBadLight(int pos) + public void BraceBadLight(long pos) { Win32.SendMessage(scintilla, SciMsg.SCI_BRACEBADLIGHT, (IntPtr) pos, (IntPtr) Unused); } @@ -2961,9 +2961,9 @@ public void BraceBadLightIndicator(bool useSetting, int indicator) /// The maxReStyle must be 0 for now. It may be defined in a future release. /// (Scintilla feature 2353) /// - public int BraceMatch(int pos, int maxReStyle) + public long BraceMatch(long pos, int maxReStyle) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_BRACEMATCH, (IntPtr) pos, (IntPtr) maxReStyle); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_BRACEMATCH, (IntPtr) pos, (IntPtr) maxReStyle); } /// Are the end of line characters visible? (Scintilla feature 2355) @@ -2997,9 +2997,9 @@ public void SetModEventMask(ModificationFlags eventMask) } /// Retrieve the column number which text should be kept within. (Scintilla feature 2360) - public int GetEdgeColumn() + public long GetEdgeColumn() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETEDGECOLUMN, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETEDGECOLUMN, (IntPtr) Unused, (IntPtr) Unused); } /// @@ -3007,7 +3007,7 @@ public int GetEdgeColumn() /// If text goes past the edge then it is highlighted. /// (Scintilla feature 2361) /// - public void SetEdgeColumn(int column) + public void SetEdgeColumn(long column) { Win32.SendMessage(scintilla, SciMsg.SCI_SETEDGECOLUMN, (IntPtr) column, (IntPtr) Unused); } @@ -3041,7 +3041,7 @@ public void SetEdgeColour(Colour edgeColour) } /// Add a new vertical edge to the view. (Scintilla feature 2694) - public void MultiEdgeAddLine(int column, Colour edgeColour) + public void MultiEdgeAddLine(long column, Colour edgeColour) { Win32.SendMessage(scintilla, SciMsg.SCI_MULTIEDGEADDLINE, (IntPtr) column, edgeColour.Value); } @@ -3063,11 +3063,11 @@ public void SearchAnchor() /// Does not ensure the selection is visible. /// (Scintilla feature 2367) /// - public unsafe int SearchNext(FindOption searchFlags, string text) + public unsafe long SearchNext(FindOption searchFlags, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHNEXT, (IntPtr) searchFlags, (IntPtr) textPtr); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHNEXT, (IntPtr) searchFlags, (IntPtr) textPtr); } } @@ -3076,18 +3076,18 @@ public unsafe int SearchNext(FindOption searchFlags, string text) /// Does not ensure the selection is visible. /// (Scintilla feature 2368) /// - public unsafe int SearchPrev(FindOption searchFlags, string text) + public unsafe long SearchPrev(FindOption searchFlags, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHPREV, (IntPtr) searchFlags, (IntPtr) textPtr); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHPREV, (IntPtr) searchFlags, (IntPtr) textPtr); } } /// Retrieves the number of lines completely visible. (Scintilla feature 2370) - public int LinesOnScreen() + public long LinesOnScreen() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINESONSCREEN, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_LINESONSCREEN, (IntPtr) Unused, (IntPtr) Unused); } /// @@ -3127,7 +3127,7 @@ public int GetZoom() /// Starts with reference count of 1 and not selected into editor. /// (Scintilla feature 2375) /// - public IntPtr CreateDocument(int bytes, DocumentOption documentOptions) + public IntPtr CreateDocument(long bytes, DocumentOption documentOptions) { return Win32.SendMessage(scintilla, SciMsg.SCI_CREATEDOCUMENT, (IntPtr) bytes, (IntPtr) documentOptions); } @@ -3431,9 +3431,9 @@ public void ParaUpExtend() /// page into account. Returns 0 if passed 0. /// (Scintilla feature 2417) /// - public int PositionBefore(int pos) + public long PositionBefore(long pos) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONBEFORE, (IntPtr) pos, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONBEFORE, (IntPtr) pos, (IntPtr) Unused); } /// @@ -3441,9 +3441,9 @@ public int PositionBefore(int pos) /// page into account. Maximum value returned is the last position in the document. /// (Scintilla feature 2418) /// - public int PositionAfter(int pos) + public long PositionAfter(long pos) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONAFTER, (IntPtr) pos, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONAFTER, (IntPtr) pos, (IntPtr) Unused); } /// @@ -3451,9 +3451,9 @@ public int PositionAfter(int pos) /// of characters. Returned value is always between 0 and last position in document. /// (Scintilla feature 2670) /// - public int PositionRelative(int pos, int relative) + public long PositionRelative(long pos, long relative) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONRELATIVE, (IntPtr) pos, (IntPtr) relative); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONRELATIVE, (IntPtr) pos, (IntPtr) relative); } /// @@ -3462,19 +3462,19 @@ public int PositionRelative(int pos, int relative) /// The result may point half way (2 bytes) inside a non-BMP character. /// (Scintilla feature 2716) /// - public int PositionRelativeCodeUnits(int pos, int relative) + public long PositionRelativeCodeUnits(long pos, long relative) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONRELATIVECODEUNITS, (IntPtr) pos, (IntPtr) relative); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONRELATIVECODEUNITS, (IntPtr) pos, (IntPtr) relative); } /// Copy a range of text to the clipboard. Positions are clipped into the document. (Scintilla feature 2419) - public void CopyRange(int start, int end) + public void CopyRange(long start, long end) { Win32.SendMessage(scintilla, SciMsg.SCI_COPYRANGE, (IntPtr) start, (IntPtr) end); } /// Copy argument text to the clipboard. (Scintilla feature 2420) - public unsafe void CopyText(int length, string text) + public unsafe void CopyText(long length, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { @@ -3505,15 +3505,15 @@ public bool GetMoveExtendsSelection() } /// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2424) - public int GetLineSelStartPosition(int line) + public long GetLineSelStartPosition(long line) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESELSTARTPOSITION, (IntPtr) line, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESELSTARTPOSITION, (IntPtr) line, (IntPtr) Unused); } /// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2425) - public int GetLineSelEndPosition(int line) + public long GetLineSelEndPosition(long line) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESELENDPOSITION, (IntPtr) line, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESELENDPOSITION, (IntPtr) line, (IntPtr) Unused); } /// Move caret down one line, extending rectangular selection to new caret position. (Scintilla feature 2426) @@ -3736,7 +3736,7 @@ public Ordering AutoCGetOrder() } /// Enlarge the document to a particular size of text bytes. (Scintilla feature 2446) - public void Allocate(int bytes) + public void Allocate(long bytes) { Win32.SendMessage(scintilla, SciMsg.SCI_ALLOCATE, (IntPtr) bytes, (IntPtr) Unused); } @@ -3761,7 +3761,7 @@ public unsafe string TargetAsUTF8() /// Set to -1 and the string will be measured to the first nul. /// (Scintilla feature 2448) /// - public void SetLengthForEncode(int bytes) + public void SetLengthForEncode(long bytes) { Win32.SendMessage(scintilla, SciMsg.SCI_SETLENGTHFORENCODE, (IntPtr) bytes, (IntPtr) Unused); } @@ -3790,9 +3790,9 @@ public unsafe string EncodedFromUTF8(string utf8) /// multi-byte characters. If beyond end of line, return line end position. /// (Scintilla feature 2456) /// - public int FindColumn(int line, int column) + public long FindColumn(long line, long column) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_FINDCOLUMN, (IntPtr) line, (IntPtr) column); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_FINDCOLUMN, (IntPtr) line, (IntPtr) column); } /// Can the caret preferred x position only be changed by explicit movement commands? (Scintilla feature 2457) @@ -3880,37 +3880,37 @@ public int GetIndicatorValue() } /// Turn a indicator on over a range. (Scintilla feature 2504) - public void IndicatorFillRange(int start, int lengthFill) + public void IndicatorFillRange(long start, long lengthFill) { Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORFILLRANGE, (IntPtr) start, (IntPtr) lengthFill); } /// Turn a indicator off over a range. (Scintilla feature 2505) - public void IndicatorClearRange(int start, int lengthClear) + public void IndicatorClearRange(long start, long lengthClear) { Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORCLEARRANGE, (IntPtr) start, (IntPtr) lengthClear); } /// Are any indicators present at pos? (Scintilla feature 2506) - public int IndicatorAllOnFor(int pos) + public int IndicatorAllOnFor(long pos) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORALLONFOR, (IntPtr) pos, (IntPtr) Unused); } /// What value does a particular indicator have at a position? (Scintilla feature 2507) - public int IndicatorValueAt(int indicator, int pos) + public int IndicatorValueAt(int indicator, long pos) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORVALUEAT, (IntPtr) indicator, (IntPtr) pos); } /// Where does a particular indicator start? (Scintilla feature 2508) - public int IndicatorStart(int indicator, int pos) + public int IndicatorStart(int indicator, long pos) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORSTART, (IntPtr) indicator, (IntPtr) pos); } /// Where does a particular indicator end? (Scintilla feature 2509) - public int IndicatorEnd(int indicator, int pos) + public int IndicatorEnd(int indicator, long pos) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATOREND, (IntPtr) indicator, (IntPtr) pos); } @@ -3949,7 +3949,7 @@ public IntPtr GetCharacterPointer() /// to lengthRange bytes. /// (Scintilla feature 2643) /// - public IntPtr GetRangePointer(int start, int lengthRange) + public IntPtr GetRangePointer(long start, long lengthRange) { return Win32.SendMessage(scintilla, SciMsg.SCI_GETRANGEPOINTER, (IntPtr) start, (IntPtr) lengthRange); } @@ -3959,9 +3959,9 @@ public IntPtr GetRangePointer(int start, int lengthRange) /// the range of a call to GetRangePointer. /// (Scintilla feature 2644) /// - public int GetGapPosition() + public long GetGapPosition() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETGAPPOSITION, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETGAPPOSITION, (IntPtr) Unused, (IntPtr) Unused); } /// Set the alpha fill colour of the given indicator. (Scintilla feature 2523) @@ -4019,7 +4019,7 @@ public int MarkerSymbolDefined(int markerNumber) } /// Set the text in the text margin for a line (Scintilla feature 2530) - public unsafe void MarginSetText(int line, string text) + public unsafe void MarginSetText(long line, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { @@ -4028,7 +4028,7 @@ public unsafe void MarginSetText(int line, string text) } /// Get the text in the text margin for a line (Scintilla feature 2531) - public unsafe string MarginGetText(int line) + public unsafe string MarginGetText(long line) { byte[] textBuffer = new byte[10000]; fixed (byte* textPtr = textBuffer) @@ -4039,19 +4039,19 @@ public unsafe string MarginGetText(int line) } /// Set the style number for the text margin for a line (Scintilla feature 2532) - public void MarginSetStyle(int line, int style) + public void MarginSetStyle(long line, int style) { Win32.SendMessage(scintilla, SciMsg.SCI_MARGINSETSTYLE, (IntPtr) line, (IntPtr) style); } /// Get the style number for the text margin for a line (Scintilla feature 2533) - public int MarginGetStyle(int line) + public int MarginGetStyle(long line) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARGINGETSTYLE, (IntPtr) line, (IntPtr) Unused); } /// Set the style in the text margin for a line (Scintilla feature 2534) - public unsafe void MarginSetStyles(int line, string styles) + public unsafe void MarginSetStyles(long line, string styles) { fixed (byte* stylesPtr = Encoding.UTF8.GetBytes(styles)) { @@ -4060,7 +4060,7 @@ public unsafe void MarginSetStyles(int line, string styles) } /// Get the styles in the text margin for a line (Scintilla feature 2535) - public unsafe string MarginGetStyles(int line) + public unsafe string MarginGetStyles(long line) { byte[] stylesBuffer = new byte[10000]; fixed (byte* stylesPtr = stylesBuffer) @@ -4101,7 +4101,7 @@ public MarginOption GetMarginOptions() } /// Set the annotation text for a line (Scintilla feature 2540) - public unsafe void AnnotationSetText(int line, string text) + public unsafe void AnnotationSetText(long line, string text) { fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) { @@ -4110,7 +4110,7 @@ public unsafe void AnnotationSetText(int line, string text) } /// Get the annotation text for a line (Scintilla feature 2541) - public unsafe string AnnotationGetText(int line) + public unsafe string AnnotationGetText(long line) { byte[] textBuffer = new byte[10000]; fixed (byte* textPtr = textBuffer) @@ -4121,19 +4121,19 @@ public unsafe string AnnotationGetText(int line) } /// Set the style number for the annotations for a line (Scintilla feature 2542) - public void AnnotationSetStyle(int line, int style) + public void AnnotationSetStyle(long line, int style) { Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETSTYLE, (IntPtr) line, (IntPtr) style); } /// Get the style number for the annotations for a line (Scintilla feature 2543) - public int AnnotationGetStyle(int line) + public int AnnotationGetStyle(long line) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETSTYLE, (IntPtr) line, (IntPtr) Unused); } /// Set the annotation styles for a line (Scintilla feature 2544) - public unsafe void AnnotationSetStyles(int line, string styles) + public unsafe void AnnotationSetStyles(long line, string styles) { fixed (byte* stylesPtr = Encoding.UTF8.GetBytes(styles)) { @@ -4142,7 +4142,7 @@ public unsafe void AnnotationSetStyles(int line, string styles) } /// Get the annotation styles for a line (Scintilla feature 2545) - public unsafe string AnnotationGetStyles(int line) + public unsafe string AnnotationGetStyles(long line) { byte[] stylesBuffer = new byte[10000]; fixed (byte* stylesPtr = stylesBuffer) @@ -4153,7 +4153,7 @@ public unsafe string AnnotationGetStyles(int line) } /// Get the number of annotation lines for a line (Scintilla feature 2546) - public int AnnotationGetLines(int line) + public int AnnotationGetLines(long line) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETLINES, (IntPtr) line, (IntPtr) Unused); } @@ -4207,9 +4207,9 @@ public void AddUndoAction(int token, UndoFlags flags) } /// Find the position of a character from a point within the window. (Scintilla feature 2561) - public int CharPositionFromPoint(int x, int y) + public long CharPositionFromPoint(int x, int y) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CHARPOSITIONFROMPOINT, (IntPtr) x, (IntPtr) y); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_CHARPOSITIONFROMPOINT, (IntPtr) x, (IntPtr) y); } /// @@ -4217,9 +4217,9 @@ public int CharPositionFromPoint(int x, int y) /// Return INVALID_POSITION if not close to text. /// (Scintilla feature 2562) /// - public int CharPositionFromPointClose(int x, int y) + public long CharPositionFromPointClose(int x, int y) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CHARPOSITIONFROMPOINTCLOSE, (IntPtr) x, (IntPtr) y); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_CHARPOSITIONFROMPOINTCLOSE, (IntPtr) x, (IntPtr) y); } /// Set whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2668) @@ -4301,13 +4301,13 @@ public void ClearSelections() } /// Set a simple selection (Scintilla feature 2572) - public void SetSelection(int caret, int anchor) + public void SetSelection(long caret, long anchor) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTION, (IntPtr) caret, (IntPtr) anchor); } /// Add a selection (Scintilla feature 2573) - public void AddSelection(int caret, int anchor) + public void AddSelection(long caret, long anchor) { Win32.SendMessage(scintilla, SciMsg.SCI_ADDSELECTION, (IntPtr) caret, (IntPtr) anchor); } @@ -4331,123 +4331,123 @@ public int GetMainSelection() } /// Set the caret position of the nth selection. (Scintilla feature 2576) - public void SetSelectionNCaret(int selection, int caret) + public void SetSelectionNCaret(int selection, long caret) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNCARET, (IntPtr) selection, (IntPtr) caret); } /// Return the caret position of the nth selection. (Scintilla feature 2577) - public int GetSelectionNCaret(int selection) + public long GetSelectionNCaret(int selection) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNCARET, (IntPtr) selection, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNCARET, (IntPtr) selection, (IntPtr) Unused); } /// Set the anchor position of the nth selection. (Scintilla feature 2578) - public void SetSelectionNAnchor(int selection, int anchor) + public void SetSelectionNAnchor(int selection, long anchor) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNANCHOR, (IntPtr) selection, (IntPtr) anchor); } /// Return the anchor position of the nth selection. (Scintilla feature 2579) - public int GetSelectionNAnchor(int selection) + public long GetSelectionNAnchor(int selection) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNANCHOR, (IntPtr) selection, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNANCHOR, (IntPtr) selection, (IntPtr) Unused); } /// Set the virtual space of the caret of the nth selection. (Scintilla feature 2580) - public void SetSelectionNCaretVirtualSpace(int selection, int space) + public void SetSelectionNCaretVirtualSpace(int selection, long space) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNCARETVIRTUALSPACE, (IntPtr) selection, (IntPtr) space); } /// Return the virtual space of the caret of the nth selection. (Scintilla feature 2581) - public int GetSelectionNCaretVirtualSpace(int selection) + public long GetSelectionNCaretVirtualSpace(int selection) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNCARETVIRTUALSPACE, (IntPtr) selection, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNCARETVIRTUALSPACE, (IntPtr) selection, (IntPtr) Unused); } /// Set the virtual space of the anchor of the nth selection. (Scintilla feature 2582) - public void SetSelectionNAnchorVirtualSpace(int selection, int space) + public void SetSelectionNAnchorVirtualSpace(int selection, long space) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNANCHORVIRTUALSPACE, (IntPtr) selection, (IntPtr) space); } /// Return the virtual space of the anchor of the nth selection. (Scintilla feature 2583) - public int GetSelectionNAnchorVirtualSpace(int selection) + public long GetSelectionNAnchorVirtualSpace(int selection) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNANCHORVIRTUALSPACE, (IntPtr) selection, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNANCHORVIRTUALSPACE, (IntPtr) selection, (IntPtr) Unused); } /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2584) - public void SetSelectionNStart(int selection, int anchor) + public void SetSelectionNStart(int selection, long anchor) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNSTART, (IntPtr) selection, (IntPtr) anchor); } /// Returns the position at the start of the selection. (Scintilla feature 2585) - public int GetSelectionNStart(int selection) + public long GetSelectionNStart(int selection) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNSTART, (IntPtr) selection, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNSTART, (IntPtr) selection, (IntPtr) Unused); } /// Sets the position that ends the selection - this becomes the currentPosition. (Scintilla feature 2586) - public void SetSelectionNEnd(int selection, int caret) + public void SetSelectionNEnd(int selection, long caret) { Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNEND, (IntPtr) selection, (IntPtr) caret); } /// Returns the position at the end of the selection. (Scintilla feature 2587) - public int GetSelectionNEnd(int selection) + public long GetSelectionNEnd(int selection) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNEND, (IntPtr) selection, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNEND, (IntPtr) selection, (IntPtr) Unused); } /// Set the caret position of the rectangular selection. (Scintilla feature 2588) - public void SetRectangularSelectionCaret(int caret) + public void SetRectangularSelectionCaret(long caret) { Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONCARET, (IntPtr) caret, (IntPtr) Unused); } /// Return the caret position of the rectangular selection. (Scintilla feature 2589) - public int GetRectangularSelectionCaret() + public long GetRectangularSelectionCaret() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONCARET, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONCARET, (IntPtr) Unused, (IntPtr) Unused); } /// Set the anchor position of the rectangular selection. (Scintilla feature 2590) - public void SetRectangularSelectionAnchor(int anchor) + public void SetRectangularSelectionAnchor(long anchor) { Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONANCHOR, (IntPtr) anchor, (IntPtr) Unused); } /// Return the anchor position of the rectangular selection. (Scintilla feature 2591) - public int GetRectangularSelectionAnchor() + public long GetRectangularSelectionAnchor() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONANCHOR, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONANCHOR, (IntPtr) Unused, (IntPtr) Unused); } /// Set the virtual space of the caret of the rectangular selection. (Scintilla feature 2592) - public void SetRectangularSelectionCaretVirtualSpace(int space) + public void SetRectangularSelectionCaretVirtualSpace(long space) { Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE, (IntPtr) space, (IntPtr) Unused); } /// Return the virtual space of the caret of the rectangular selection. (Scintilla feature 2593) - public int GetRectangularSelectionCaretVirtualSpace() + public long GetRectangularSelectionCaretVirtualSpace() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE, (IntPtr) Unused, (IntPtr) Unused); } /// Set the virtual space of the anchor of the rectangular selection. (Scintilla feature 2594) - public void SetRectangularSelectionAnchorVirtualSpace(int space) + public void SetRectangularSelectionAnchorVirtualSpace(long space) { Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE, (IntPtr) space, (IntPtr) Unused); } /// Return the virtual space of the anchor of the rectangular selection. (Scintilla feature 2595) - public int GetRectangularSelectionAnchorVirtualSpace() + public long GetRectangularSelectionAnchorVirtualSpace() { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE, (IntPtr) Unused, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE, (IntPtr) Unused, (IntPtr) Unused); } /// Set options for virtual space behaviour. (Scintilla feature 2596) @@ -4561,7 +4561,7 @@ public void MultipleSelectAddEach() /// there may be a need to redraw. /// (Scintilla feature 2617) /// - public int ChangeLexerState(int start, int end) + public int ChangeLexerState(long start, long end) { return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CHANGELEXERSTATE, (IntPtr) start, (IntPtr) end); } @@ -4571,9 +4571,9 @@ public int ChangeLexerState(int start, int end) /// Return -1 when no more lines. /// (Scintilla feature 2618) /// - public int ContractedFoldNext(int lineStart) + public long ContractedFoldNext(long lineStart) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CONTRACTEDFOLDNEXT, (IntPtr) lineStart, (IntPtr) Unused); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_CONTRACTEDFOLDNEXT, (IntPtr) lineStart, (IntPtr) Unused); } /// Centre current line in window. (Scintilla feature 2619) @@ -4675,19 +4675,19 @@ public Technology GetTechnology() } /// Create an ILoader*. (Scintilla feature 2632) - public IntPtr CreateLoader(int bytes, DocumentOption documentOptions) + public IntPtr CreateLoader(long bytes, DocumentOption documentOptions) { return Win32.SendMessage(scintilla, SciMsg.SCI_CREATELOADER, (IntPtr) bytes, (IntPtr) documentOptions); } /// On OS X, show a find indicator. (Scintilla feature 2640) - public void FindIndicatorShow(int start, int end) + public void FindIndicatorShow(long start, long end) { Win32.SendMessage(scintilla, SciMsg.SCI_FINDINDICATORSHOW, (IntPtr) start, (IntPtr) end); } /// On OS X, flash a find indicator, then fade out. (Scintilla feature 2641) - public void FindIndicatorFlash(int start, int end) + public void FindIndicatorFlash(long start, long end) { Win32.SendMessage(scintilla, SciMsg.SCI_FINDINDICATORFLASH, (IntPtr) start, (IntPtr) end); } @@ -4808,7 +4808,7 @@ public int GetLexer() } /// Colourise a segment of the document using the current lexing language. (Scintilla feature 4003) - public void Colourise(int start, int end) + public void Colourise(long start, long end) { Win32.SendMessage(scintilla, SciMsg.SCI_COLOURISE, (IntPtr) start, (IntPtr) end); } @@ -5143,15 +5143,15 @@ public void ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) } /// Retrieve the document line containing a position measured in index units. (Scintilla feature 2713) - public int LineFromIndexPosition(int pos, LineCharacterIndexType lineCharacterIndex) + public long LineFromIndexPosition(long pos, LineCharacterIndexType lineCharacterIndex) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINEFROMINDEXPOSITION, (IntPtr) pos, (IntPtr) lineCharacterIndex); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_LINEFROMINDEXPOSITION, (IntPtr) pos, (IntPtr) lineCharacterIndex); } /// Retrieve the position measured in index units at the start of a document line. (Scintilla feature 2714) - public int IndexPositionFromLine(int line, LineCharacterIndexType lineCharacterIndex) + public long IndexPositionFromLine(long line, LineCharacterIndexType lineCharacterIndex) { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDEXPOSITIONFROMLINE, (IntPtr) line, (IntPtr) lineCharacterIndex); + return (long)Win32.SendMessage(scintilla, SciMsg.SCI_INDEXPOSITIONFROMLINE, (IntPtr) line, (IntPtr) lineCharacterIndex); } /// diff --git a/Visual Studio Project Template C#/PluginInfrastructure/Scintilla_iface.cs b/Visual Studio Project Template C#/PluginInfrastructure/Scintilla_iface.cs index 945c0cf..a45b2a7 100644 --- a/Visual Studio Project Template C#/PluginInfrastructure/Scintilla_iface.cs +++ b/Visual Studio Project Template C#/PluginInfrastructure/Scintilla_iface.cs @@ -38,13 +38,13 @@ public struct ScNotificationHeader public struct ScNotification { public ScNotificationHeader Header; - private int position; /* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */ + private IntPtr position; /* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */ public int character; /* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETE, SCN_AUTOCSELECTION, SCN_USERLISTSELECTION */ public int Mmodifiers; /* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE */ public int ModificationType; /* SCN_MODIFIED - modification types are name "SC_MOD_*" */ public IntPtr TextPointer; /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED */ - public int Length; /* SCN_MODIFIED */ - public int LinesAdded; /* SCN_MODIFIED */ + public IntPtr Length; /* SCN_MODIFIED */ + public IntPtr LinesAdded; /* SCN_MODIFIED */ public int Message; /* SCN_MACRORECORD */ public IntPtr wParam; /* SCN_MACRORECORD */ public IntPtr lParam; /* SCN_MACRORECORD */ @@ -52,7 +52,7 @@ public struct ScNotification /// /// 0-based index /// - public int LineNumber; /* SCN_MODIFIED */ + public IntPtr LineNumber; /* SCN_MODIFIED */ public int FoldLevelNow; /* SCN_MODIFIED */ public int FoldLevelPrev; /* SCN_MODIFIED */ public int Margin; /* SCN_MARGINCLICK */ @@ -60,9 +60,10 @@ public struct ScNotification public int X; /* SCN_DWELLSTART, SCN_DWELLEND */ public int Y; /* SCN_DWELLSTART, SCN_DWELLEND */ public int Token; /* SCN_MODIFIED with SC_MOD_CONTAINER */ - public int AnnotationLinesAdded; /* SC_MOD_CHANGEANNOTATION */ + public IntPtr AnnotationLinesAdded; /* SC_MOD_CHANGEANNOTATION */ public int Updated; /* SCN_UPDATEUI */ public int ListCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */ + public int characterSource; /* SCN_CHARADDED */ /// /// SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION