Bug 1832850 - Part 3: Remove an unnecessary include and some unnecessary forward...
[gecko.git] / intl / lwbrk / nsComplexBreaker.h
blob4120217a6e35d17da8b87fcc16f4a5efd7cbd1c6
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 nsComplexBreaker_h__
6 #define nsComplexBreaker_h__
8 #include <stdint.h>
9 /**
10 * Find line break opportunities in aText[] of aLength characters,
11 * filling boolean values indicating line break opportunities for
12 * corresponding charactersin aBreakBefore[] on return.
14 void NS_GetComplexLineBreaks(const char16_t* aText, uint32_t aLength,
15 uint8_t* aBreakBefore);
17 class ComplexBreaker {
18 public:
19 static void Initialize();
21 static void Shutdown();
23 /**
24 * A wrapper around the platform specific NS_GetComplexLineBreaks, which adds
25 * caching of the results to mitigate sometimes expensive implementation.
26 * @param aText - pointer to the text to process for possible line breaks
27 * @param aLength - the length to process
28 * @param aBreakBefore - result array correlated to aText, where element is
29 * set to true if line can be broken before
30 * corresponding character in aText and false otherwise
32 static void GetBreaks(const char16_t* aText, uint32_t aLength,
33 uint8_t* aBreakBefore);
36 #endif /* nsComplexBreaker_h__ */