From 9e52243831ceffced1e9f0ef27041770fe13a85a Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 17 Jun 2021 09:28:05 +1000 Subject: Add SciFnDirectStatus, a direct access function which also returns status so can improve performance for client code that called SCI_GETSTATUS after every API to check for failure. --- doc/ScintillaDoc.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 2a842b222..7e048c273 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -128,7 +128,7 @@

Scintilla Documentation

-

Last edited 10 June 2021 NH

+

Last edited 17 June 2021 NH

Scintilla 5 has moved the lexers from Scintilla into a new Lexilla project.
@@ -6654,7 +6654,9 @@ struct Sci_RangeToFormat { SC_WRAP_CHAR is not supported for printing.

Direct access

- SCI_GETDIRECTFUNCTION → pointer
+ + SCI_GETDIRECTFUNCTION → pointer
+ SCI_GETDIRECTSTATUSFUNCTION → pointer
SCI_GETDIRECTPOINTER → pointer
SCI_GETCHARACTERPOINTER → pointer
SCI_GETRANGEPOINTER(position start, position lengthRange) → pointer
@@ -6677,7 +6679,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ } -

SciFnDirect, sptr_t and uptr_t are declared in +

SciFnDirect, SciFnDirectStatus, sptr_t and uptr_t are declared in Scintilla.h. hSciWnd is the window handle returned when you created the Scintilla window.

@@ -6685,9 +6687,9 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ to the native thread of the Scintilla window in which case SendMessage(hSciWnd, SCI_*, wParam, lParam) should be used to synchronize with the window's thread.

-

This feature also works on GTK but has no significant impact on speed.

+

This feature also works on other platforms but has less impact on speed.

-

From version 1.47 on Windows, Scintilla exports a function called +

On Windows, Scintilla exports a function called Scintilla_DirectFunction that can be used the same as the function returned by SCI_GETDIRECTFUNCTION. This saves you the call to SCI_GETDIRECTFUNCTION and the need to call Scintilla indirectly via the function @@ -6698,6 +6700,12 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ the overhead of passing through the Windows messaging system. You need only call this once, regardless of the number of Scintilla windows you create.

+

SCI_GETDIRECTSTATUSFUNCTION → pointer
+ This is similar to SCI_GETDIRECTFUNCTION but the returned function + is of type SciFnDirectStatus which also returns the status to the caller through a + pointer to an int. + This saves performing an extra call to retrieve the status in many situations so can be faster.

+

SCI_GETDIRECTPOINTER → pointer
This returns a pointer to data that identifies which Scintilla window is in use. You must call this once for each Scintilla window you create. When you call the direct function, you must -- cgit v1.2.3