2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07: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-26 23:04:38 -08:00
|
|
|
#ifndef nsJISx4051LineBreaker_h__
|
|
|
|
#define nsJISx4051LineBreaker_h__
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
#include "nsILineBreaker.h"
|
|
|
|
|
|
|
|
class nsJISx4051LineBreaker : public nsILineBreaker
|
|
|
|
{
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2014-06-23 15:40:02 -07:00
|
|
|
private:
|
|
|
|
virtual ~nsJISx4051LineBreaker();
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
public:
|
|
|
|
nsJISx4051LineBreaker();
|
|
|
|
|
2015-01-06 12:12:14 -08:00
|
|
|
int32_t Next( const char16_t* aText, uint32_t aLen, uint32_t aPos) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2015-01-06 12:12:14 -08:00
|
|
|
int32_t Prev( const char16_t* aText, uint32_t aLen, uint32_t aPos) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-01-04 07:02:17 -08:00
|
|
|
virtual void GetJISx4051Breaks(const char16_t* aText, uint32_t aLength,
|
2012-08-22 08:56:38 -07:00
|
|
|
uint8_t aBreakMode,
|
2015-01-06 12:12:14 -08:00
|
|
|
uint8_t* aBreakBefore) MOZ_OVERRIDE;
|
2012-08-22 08:56:38 -07:00
|
|
|
virtual void GetJISx4051Breaks(const uint8_t* aText, uint32_t aLength,
|
|
|
|
uint8_t aBreakMode,
|
2015-01-06 12:12:14 -08:00
|
|
|
uint8_t* aBreakBefore) MOZ_OVERRIDE;
|
2007-07-18 20:26:51 -07:00
|
|
|
|
|
|
|
private:
|
2014-01-04 07:02:17 -08:00
|
|
|
int32_t WordMove(const char16_t* aText, uint32_t aLen, uint32_t aPos,
|
2012-08-22 08:56:38 -07:00
|
|
|
int8_t aDirection);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2013-02-26 23:04:38 -08:00
|
|
|
#endif /* nsJISx4051LineBreaker_h__ */
|