diff options
Diffstat (limited to 'doc/ScintillaDoc.html')
| -rw-r--r-- | doc/ScintillaDoc.html | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index df08b19da..a1d46b1fa 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -116,7 +116,7 @@ <h1>Scintilla Documentation</h1> - <p>Last edited 11 August 2017 NH</p> + <p>Last edited 31 January 2018 NH</p> <p>There is <a class="jump" href="Design.html">an overview of the internal design of Scintilla</a>.<br /> @@ -5688,7 +5688,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ <code><a class="message" href="#SCI_GETDOCPOINTER">SCI_GETDOCPOINTER → document *</a><br /> <a class="message" href="#SCI_SETDOCPOINTER">SCI_SETDOCPOINTER(<unused>, document *doc)</a><br /> - <a class="message" href="#SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT → document *</a><br /> + <a class="message" href="#SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT(int bytes, int documentOption) → document *</a><br /> <a class="message" href="#SCI_ADDREFDOCUMENT">SCI_ADDREFDOCUMENT(<unused>, document *doc)</a><br /> <a class="message" href="#SCI_RELEASEDOCUMENT">SCI_RELEASEDOCUMENT(<unused>, document @@ -5709,13 +5709,20 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ window.<br /> 6. If <code class="parameter">doc</code> was not 0, its reference count is increased by 1.</p> - <p><b id="SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT → document *</b><br /> + <p><b id="SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT(int bytes, int documentOption) → document *</b><br /> This message creates a new, empty document and returns a pointer to it. This document is not - selected into the editor and starts with a reference count of 1. This means that you have - ownership of it and must either reduce its reference count by 1 after using + selected into the editor and starts with a reference count of 1. This means that you have + ownership of it and must either reduce its reference count by 1 after using <code>SCI_SETDOCPOINTER</code> so that the Scintilla window owns it or you must make sure that - you reduce the reference count by 1 with <code>SCI_RELEASEDOCUMENT</code> before you close the - application to avoid memory leaks.</p> + you reduce the reference count by 1 with <code>SCI_RELEASEDOCUMENT</code> before you close the + application to avoid memory leaks. The <code class="parameter">bytes</code> argument determines + the initial memory allocation for the document as it is more efficient + to allocate once rather than rely on the buffer growing as data is added. + If <code>SCI_CREATEDOCUMENT</code> fails then 0 is returned.</p> + + <p>The <code class="parameter">documentOption</code> argument may be used in future versions + to choose between different document capabilities which affect memory allocation and performance. + The only valid value for now is <code>SC_DOCUMENTOPTION_DEFAULT</code> (0).</p> <p><b id="SCI_ADDREFDOCUMENT">SCI_ADDREFDOCUMENT(<unused>, document *doc)</b><br /> This increases the reference count of a document by 1. If you want to replace the current @@ -5742,7 +5749,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ <h3 id="BackgroundLoad">Loading in the background</h3> - <code><a class="message" href="#SCI_CREATELOADER">SCI_CREATELOADER(int bytes) → int</a><br /> + <code><a class="message" href="#SCI_CREATELOADER">SCI_CREATELOADER(int bytes, int documentOption) → int</a><br /> </code> <p>An application can load all of a file into a buffer it allocates on a background thread and then add the data in that buffer @@ -5751,13 +5758,17 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ <p>To avoid these issues, a loader object may be created and used to load the file. The loader object supports the ILoader interface.</p> - <p><b id="SCI_CREATELOADER">SCI_CREATELOADER(int bytes) → int</b><br /> + <p><b id="SCI_CREATELOADER">SCI_CREATELOADER(int bytes, int documentOption) → int</b><br /> Create an object that supports the <code>ILoader</code> interface which can be used to load data and then be turned into a Scintilla document object for attachment to a view object. The <code class="parameter">bytes</code> argument determines the initial memory allocation for the document as it is more efficient to allocate once rather than rely on the buffer growing as data is added. If <code>SCI_CREATELOADER</code> fails then 0 is returned.</p> + <p>The <code class="parameter">documentOption</code> argument may be used in future versions + to choose between different document capabilities which affect memory allocation and performance. + The only valid value for now is <code>SC_DOCUMENTOPTION_DEFAULT</code> (0).</p> + <h4>ILoader</h4> <div class="highlighted"> |
