michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #ifndef nsJISx4051LineBreaker_h__ michael@0: #define nsJISx4051LineBreaker_h__ michael@0: michael@0: michael@0: #include "nsILineBreaker.h" michael@0: michael@0: class nsJISx4051LineBreaker : public nsILineBreaker michael@0: { michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: public: michael@0: nsJISx4051LineBreaker(); michael@0: virtual ~nsJISx4051LineBreaker(); michael@0: michael@0: int32_t Next( const char16_t* aText, uint32_t aLen, uint32_t aPos); michael@0: michael@0: int32_t Prev( const char16_t* aText, uint32_t aLen, uint32_t aPos); michael@0: michael@0: virtual void GetJISx4051Breaks(const char16_t* aText, uint32_t aLength, michael@0: uint8_t aBreakMode, michael@0: uint8_t* aBreakBefore); michael@0: virtual void GetJISx4051Breaks(const uint8_t* aText, uint32_t aLength, michael@0: uint8_t aBreakMode, michael@0: uint8_t* aBreakBefore); michael@0: michael@0: private: michael@0: int32_t WordMove(const char16_t* aText, uint32_t aLen, uint32_t aPos, michael@0: int8_t aDirection); michael@0: }; michael@0: michael@0: #endif /* nsJISx4051LineBreaker_h__ */