Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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__ */