Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
| michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 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 | #ifndef nsSampleWordBreaker_h__ |
| michael@0 | 6 | #define nsSampleWordBreaker_h__ |
| michael@0 | 7 | |
| michael@0 | 8 | |
| michael@0 | 9 | #include "nsIWordBreaker.h" |
| michael@0 | 10 | |
| michael@0 | 11 | typedef enum { |
| michael@0 | 12 | kWbClassSpace = 0, |
| michael@0 | 13 | kWbClassAlphaLetter, |
| michael@0 | 14 | kWbClassPunct, |
| michael@0 | 15 | kWbClassHanLetter, |
| michael@0 | 16 | kWbClassKatakanaLetter, |
| michael@0 | 17 | kWbClassHiraganaLetter, |
| michael@0 | 18 | kWbClassHWKatakanaLetter, |
| michael@0 | 19 | kWbClassThaiLetter |
| michael@0 | 20 | } wb_class; |
| michael@0 | 21 | |
| michael@0 | 22 | class nsSampleWordBreaker : public nsIWordBreaker |
| michael@0 | 23 | { |
| michael@0 | 24 | NS_DECL_ISUPPORTS |
| michael@0 | 25 | public: |
| michael@0 | 26 | |
| michael@0 | 27 | nsSampleWordBreaker() ; |
| michael@0 | 28 | virtual ~nsSampleWordBreaker() ; |
| michael@0 | 29 | |
| michael@0 | 30 | bool BreakInBetween(const char16_t* aText1 , uint32_t aTextLen1, |
| michael@0 | 31 | const char16_t* aText2 , uint32_t aTextLen2); |
| michael@0 | 32 | nsWordRange FindWord(const char16_t* aText1 , uint32_t aTextLen1, |
| michael@0 | 33 | uint32_t aOffset); |
| michael@0 | 34 | |
| michael@0 | 35 | int32_t NextWord(const char16_t* aText, uint32_t aLen, uint32_t aPos); |
| michael@0 | 36 | |
| michael@0 | 37 | protected: |
| michael@0 | 38 | uint8_t GetClass(char16_t aChar); |
| michael@0 | 39 | }; |
| michael@0 | 40 | |
| michael@0 | 41 | #endif /* nsSampleWordBreaker_h__ */ |