X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bfabd11afbc07bd0a976d95e52d2b69e78c7cf1e..80a779275ae04443c568dca919adb26cf6f5002c:/src/stc/scintilla/include/Scintilla.iface diff --git a/src/stc/scintilla/include/Scintilla.iface b/src/stc/scintilla/include/Scintilla.iface index 5187070c56..9540e0de1a 100644 --- a/src/stc/scintilla/include/Scintilla.iface +++ b/src/stc/scintilla/include/Scintilla.iface @@ -2,27 +2,49 @@ ## This file defines the interface to Scintilla +## Copyright 2000-2003 by Neil Hodgson +## The License.txt file describes the conditions under which this software may be distributed. + ## A line starting with ## is a pure comment and should be stripped by readers. -## A line starting with #!! is for future shbang use -## A line starting with # followed by a space is a documentation comment and refers +## A line starting with #! is for future shbang use +## A line starting with # followed by a space is a documentation comment and refers ## to the next feature definition. -## Each feature is defined by a line starting with fun, get, set or val. +## Each feature is defined by a line starting with fun, get, set, val or evt. ## cat -> start a category ## fun -> a function ## get -> a property get function -## get -> a property set function +## set -> a property set function ## val -> definition of a constant +## evt -> an event +## enu -> associate an enumeration with a set of vals with a prefix +## lex -> associate a lexer with the lexical classes it produces +## ## All other feature names should be ignored. They may be defined in the future. ## A property may have a set function, a get function or both. Each will have ## "Get" or "Set" in their names and the corresponding name will have the obvious switch. ## A property may be subscripted, in which case the first parameter is the subscript. ## fun, get, and set features have a strict syntax: ## [=,) -## param is [=] +## where stands for white space. +## param may be empty (null value) or is [=] ## Additional white space is allowed between elements. +## The syntax for evt is [=[,]*]) ## Feature names that contain an underscore are defined by Windows, so in these ## cases, using the Windows definition is preferred where available. +## The feature numbers are stable so features will not be renumbered. +## Features may be removed but they will go through a period of deprecation +## before removal which is signalled by moving them into the Deprecated category. +## +## enu has the syntax enu=[]* where all the val +## features in this file starting with a given are considered part of the +## enumeration. +## +## lex has the syntax lex=[]* +## where name is a reasonably capitalised (Python, XML) identifier or UI name, +## lexerVal is the val used to specify the lexer, and the list of prefixes is similar +## to enu. The name may not be the same as that used within the lexer so the lexerVal +## should be used to tie these entities together. ## Types: ## void @@ -31,88 +53,120 @@ ## position -> integer position in a document ## colour -> colour integer containing red, green and blue bytes. ## string -> pointer to const character -## stringresult -> pointer to character +## stringresult -> pointer to character, NULL-> return size of result ## cells -> pointer to array of cells, each cell containing a style byte and character byte -## textrange -> complex structure +## textrange -> range of a min and a max position with an output string ## findtext -> searchrange, text -> foundposition ## keymod -> integer containing key in low half and modifiers in high half -## countedstring ## formatrange +## Types no longer used: +## findtextex -> searchrange +## charrange -> range of a min and a max position +## charrangeresult -> like charrange, but output param +## countedstring ## point -> x,y -## Client code should ignore definitions containing types it does not understand, except +## pointresult -> like point, but output param +## rectangle -> left,top,right,bottom +## Client code should ignore definitions containing types it does not understand, except ## for possibly #defining the constants -cat Basics +## Line numbers and positions start at 0. +## String arguments may contain NUL ('\0') characters where the calls provide a length +## argument and retrieve NUL characters. All retrieved strings except for those retrieved +## by GetLine also have a NUL appended but client code should calculate the size that +## will be returned rather than relying upon the NUL whenever possible. Allow for the +## extra NUL character when allocating buffers. The size to allocate for a stringresult +## can be determined by calling with a NULL (0) pointer. + +cat Basics ################################################ -## From Scintilla.h +## For Scintilla.h val INVALID_POSITION=-1 +# Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages +# as many EM_ messages can be used although that use is deprecated. val SCI_START=2000 val SCI_OPTIONAL_START=3000 val SCI_LEXER_START=4000 -# Add text to the document +# Add text to the document at current position. fun void AddText=2001(int length, string text) -# Add array of cells to document +# Add array of cells to document. fun void AddStyledText=2002(int length, cells c) -# Insert string at a position +# Insert string at a position. fun void InsertText=2003(position pos, string text) -# Delete all text in the document +# Delete all text in the document. fun void ClearAll=2004(,) -# The number of characters in the document +# Set all style bytes to 0, remove all folding information. +fun void ClearDocumentStyle=2005(,) + +# Returns the number of characters in the document. get int GetLength=2006(,) -# Returns the character byte at the position +# Returns the character byte at the position. get int GetCharAt=2007(position pos,) -# Returns the position of the caret +# Returns the position of the caret. get position GetCurrentPos=2008(,) -# Returns the position of the opposite end of the selection to the caret +# Returns the position of the opposite end of the selection to the caret. get position GetAnchor=2009(,) -# Returns the style byte at the position +# Returns the style byte at the position. get int GetStyleAt=2010(position pos,) -# Redoes the next action on the undo history +# Redoes the next action on the undo history. fun void Redo=2011(,) -val SC_UNDOCOLLECT_NONE=0 -val SC_UNDOCOLLECT_AUTOSTART=1 - -# Choose between collecting actions into the undo +# Choose between collecting actions into the undo # history and discarding them. -set void SetUndoCollection=2012(int collectUndo,) +set void SetUndoCollection=2012(bool collectUndo,) # Select all the text in the document. fun void SelectAll=2013(,) -# Remember the current position in the undo history as the position +# Remember the current position in the undo history as the position # at which the document was saved. fun void SetSavePoint=2014(,) # Retrieve a buffer of cells. -# Returns the number of bytes in the buffer not including terminating nulls. +# Returns the number of bytes in the buffer not including terminating NULs. fun int GetStyledText=2015(, textrange tr) -# Are there any redoable actions in the undo history. +# Are there any redoable actions in the undo history? fun bool CanRedo=2016(,) -# Retrieve the line number at which a particular marker is located +# Retrieve the line number at which a particular marker is located. fun int MarkerLineFromHandle=2017(int handle,) # Delete a marker. fun void MarkerDeleteHandle=2018(int handle,) +# Is undo history being collected? +get bool GetUndoCollection=2019(,) + +enu WhiteSpace=SCWS_ +val SCWS_INVISIBLE=0 +val SCWS_VISIBLEALWAYS=1 +val SCWS_VISIBLEAFTERINDENT=2 + # Are white space characters currently visible? -get bool GetViewWS=2020(,) +# Returns one of SCWS_* constants. +get int GetViewWS=2020(,) + +# Make white space characters invisible, always visible or visible outside indentation. +set void SetViewWS=2021(int viewWS,) -# Make white space characters visible or invisible. -set void SetViewWS=2021(bool viewWS,) +# Find the position from a point within the window. +fun position PositionFromPoint=2022(int x, int y) + +# Find the position from a point within the window but return +# INVALID_POSITION if not close to text. +fun position PositionFromPointClose=2023(int x, int y) # Set caret to start of a line and ensure it is visible. fun void GotoLine=2024(int line,) @@ -131,13 +185,14 @@ fun int GetCurLine=2027(int length, stringresult text) # Retrieve the position of the last correctly styled character. get position GetEndStyled=2028(,) -# Convert all line endings in the document to use the current mode. -fun void ConvertEOLs=2029(,) - +enu EndOfLine=SC_EOL_ val SC_EOL_CRLF=0 val SC_EOL_CR=1 val SC_EOL_LF=2 +# Convert all line endings in the document to one mode. +fun void ConvertEOLs=2029(int eolMode,) + # Retrieve the current end of line mode - one of CRLF, CR, or LF. get int GetEOLMode=2030(,) @@ -145,35 +200,42 @@ get int GetEOLMode=2030(,) set void SetEOLMode=2031(int eolMode,) # Set the current styling position to pos and the styling mask to mask. -# The styling mask can be used to protect some bits in each styling byte from -# modification. +# The styling mask can be used to protect some bits in each styling byte from modification. fun void StartStyling=2032(position pos, int mask) # Change style from current styling position for length characters to a style # and move the current styling position to after this newly styled segment. fun void SetStyling=2033(int length, int style) +# Is drawing done first into a buffer or direct to the screen? +get bool GetBufferedDraw=2034(,) + # If drawing is buffered then each line of text is drawn into a bitmap buffer # before drawing it to the screen to avoid flicker. set void SetBufferedDraw=2035(bool buffered,) -# Change the visible size of a tab to be a multiple of the width of a space -# character. +# Change the visible size of a tab to be a multiple of the width of a space character. set void SetTabWidth=2036(int tabWidth,) -# Retrieve the visible size of a tab. +# Retrieve the visible size of a tab. get int GetTabWidth=2121(,) +# The SC_CP_UTF8 value can be used to enter Unicode mode. +# This is the same value as CP_UTF8 in Windows val SC_CP_UTF8=65001 +# The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+. +val SC_CP_DBCS=1 + # Set the code page used to interpret the bytes of the document as characters. # The SC_CP_UTF8 value can be used to enter Unicode mode. set void SetCodePage=2037(int codePage,) -# In palette mode, Scintilla uses the environments palette calls to display +# In palette mode, Scintilla uses the environment's palette calls to display # more colours. This may lead to ugly displays. set void SetUsePalette=2039(bool usePalette,) +enu MarkerSymbol=SC_MARK_ val MARKER_MAX=31 val SC_MARK_CIRCLE=0 val SC_MARK_ROUNDRECT=1 @@ -185,9 +247,41 @@ val SC_MARK_ARROWDOWN=6 val SC_MARK_MINUS=7 val SC_MARK_PLUS=8 +# Shapes used for outlining column. +val SC_MARK_VLINE=9 +val SC_MARK_LCORNER=10 +val SC_MARK_TCORNER=11 +val SC_MARK_BOXPLUS=12 +val SC_MARK_BOXPLUSCONNECTED=13 +val SC_MARK_BOXMINUS=14 +val SC_MARK_BOXMINUSCONNECTED=15 +val SC_MARK_LCORNERCURVE=16 +val SC_MARK_TCORNERCURVE=17 +val SC_MARK_CIRCLEPLUS=18 +val SC_MARK_CIRCLEPLUSCONNECTED=19 +val SC_MARK_CIRCLEMINUS=20 +val SC_MARK_CIRCLEMINUSCONNECTED=21 + +# Invisible mark that only sets the line background color. +val SC_MARK_BACKGROUND=22 +val SC_MARK_DOTDOTDOT=23 +val SC_MARK_ARROWS=24 +val SC_MARK_PIXMAP=25 +val SC_MARK_FULLRECT=26 + +val SC_MARK_CHARACTER=10000 + +enu MarkerOutline=SC_MARKNUM_ +# Markers used for outlining column. +val SC_MARKNUM_FOLDEREND=25 +val SC_MARKNUM_FOLDEROPENMID=26 +val SC_MARKNUM_FOLDERMIDTAIL=27 +val SC_MARKNUM_FOLDERTAIL=28 +val SC_MARKNUM_FOLDERSUB=29 val SC_MARKNUM_FOLDER=30 val SC_MARKNUM_FOLDEROPEN=31 -##val SC_MASK_FOLDERS=1<