2001-09-26 04:40:45 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2013-02-27 11:04:38 +04:00
|
|
|
#ifndef nsJISx4051LineBreaker_h__
|
|
|
|
#define nsJISx4051LineBreaker_h__
|
1999-02-09 19:01:48 +03:00
|
|
|
|
|
|
|
|
|
|
|
#include "nsILineBreaker.h"
|
|
|
|
|
2003-09-17 07:08:18 +04:00
|
|
|
class nsJISx4051LineBreaker : public nsILineBreaker
|
1999-02-09 19:01:48 +03:00
|
|
|
{
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2014-06-24 02:40:02 +04:00
|
|
|
private:
|
|
|
|
virtual ~nsJISx4051LineBreaker();
|
|
|
|
|
1999-02-16 21:11:14 +03:00
|
|
|
public:
|
2005-08-22 07:00:06 +04:00
|
|
|
nsJISx4051LineBreaker();
|
1999-02-09 19:01:48 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t Next( const char16_t* aText, uint32_t aLen, uint32_t aPos) override;
|
1999-02-23 19:20:39 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t Prev( const char16_t* aText, uint32_t aLen, uint32_t aPos) override;
|
1999-02-16 21:11:14 +03:00
|
|
|
|
2014-01-04 19:02:17 +04:00
|
|
|
virtual void GetJISx4051Breaks(const char16_t* aText, uint32_t aLength,
|
2012-08-22 19:56:38 +04:00
|
|
|
uint8_t aBreakMode,
|
2015-03-21 19:28:04 +03:00
|
|
|
uint8_t* aBreakBefore) override;
|
2012-08-22 19:56:38 +04:00
|
|
|
virtual void GetJISx4051Breaks(const uint8_t* aText, uint32_t aLength,
|
|
|
|
uint8_t aBreakMode,
|
2015-03-21 19:28:04 +03:00
|
|
|
uint8_t* aBreakBefore) override;
|
2007-07-19 07:26:51 +04:00
|
|
|
|
|
|
|
private:
|
2014-01-04 19:02:17 +04:00
|
|
|
int32_t WordMove(const char16_t* aText, uint32_t aLen, uint32_t aPos,
|
2012-08-22 19:56:38 +04:00
|
|
|
int8_t aDirection);
|
1999-02-09 19:01:48 +03:00
|
|
|
};
|
|
|
|
|
2013-02-27 11:04:38 +04:00
|
|
|
#endif /* nsJISx4051LineBreaker_h__ */
|