intl/lwbrk/idl/nsISemanticUnitScanner.idl

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

michael@0 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 %{C++
michael@0 9 // {ADF42751-1CEF-4ad2-AA8E-BCB849D8D31F}
michael@0 10 #define NS_SEMANTICUNITSCANNER_CID { 0xadf42751, 0x1cef, 0x4ad2, { 0xaa, 0x8e, 0xbc, 0xb8, 0x49, 0xd8, 0xd3, 0x1f}}
michael@0 11 #define NS_SEMANTICUNITSCANNER_CONTRACTID "@mozilla.org/intl/semanticunitscanner;1"
michael@0 12 %}
michael@0 13
michael@0 14 /**
michael@0 15 * Provides a language independent way to break UNICODE
michael@0 16 * text into meaningful semantic units (e.g. words).
michael@0 17 */
michael@0 18 [scriptable, uuid(9f620be4-e535-11d6-b254-00039310a47a)]
michael@0 19 interface nsISemanticUnitScanner : nsISupports {
michael@0 20 /**
michael@0 21 * start()
michael@0 22 *
michael@0 23 * Starts up the semantic unit scanner with an optional
michael@0 24 * character set, which acts as a hint to optimize the heuristics
michael@0 25 * used to determine the language(s) of the processed text.
michael@0 26 *
michael@0 27 * @param characterSet the character set the text was originally
michael@0 28 * encoded in (can be NULL)
michael@0 29 */
michael@0 30 void start(in string characterSet);
michael@0 31
michael@0 32 /**
michael@0 33 * next()
michael@0 34 * Get the begin / end offset of the next unit in the current text
michael@0 35 *
michael@0 36 * @param text the text to be scanned
michael@0 37 * @param length the number of characters in the text to be processed
michael@0 38 * @param pos the current position
michael@0 39 * @param isLastBuffer, the buffer is the last one
michael@0 40 * @param begin the begin offset of the next unit
michael@0 41 * @param begin the end offset of the next unit
michael@0 42 * @return has more unit in the current text
michael@0 43 */
michael@0 44 boolean next(in wstring text, in long length, in long pos,
michael@0 45 in boolean isLastBuffer,
michael@0 46 out long begin, out long end );
michael@0 47
michael@0 48 };

mercurial