intl/lwbrk/src/nsSampleWordBreaker.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef nsSampleWordBreaker_h__
     6 #define nsSampleWordBreaker_h__
     9 #include "nsIWordBreaker.h"
    11 typedef enum {
    12   kWbClassSpace = 0,
    13   kWbClassAlphaLetter,
    14   kWbClassPunct,
    15   kWbClassHanLetter,
    16   kWbClassKatakanaLetter,
    17   kWbClassHiraganaLetter,
    18   kWbClassHWKatakanaLetter,
    19   kWbClassThaiLetter
    20 } wb_class;
    22 class nsSampleWordBreaker : public nsIWordBreaker
    23 {
    24   NS_DECL_ISUPPORTS
    25 public:
    27   nsSampleWordBreaker() ;
    28   virtual ~nsSampleWordBreaker() ;
    30   bool BreakInBetween(const char16_t* aText1 , uint32_t aTextLen1,
    31                         const char16_t* aText2 , uint32_t aTextLen2);
    32   nsWordRange FindWord(const char16_t* aText1 , uint32_t aTextLen1,
    33                        uint32_t aOffset);
    35   int32_t NextWord(const char16_t* aText, uint32_t aLen, uint32_t aPos);
    37 protected:
    38   uint8_t  GetClass(char16_t aChar);
    39 };
    41 #endif  /* nsSampleWordBreaker_h__ */

mercurial