1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_CaretAssociationHint_h
8 #define mozilla_CaretAssociationHint_h
12 template <typename PT
, typename CT
>
13 class RangeBoundaryBase
;
16 class BidiEmbeddingLevel
;
20 * Hint whether a caret is associated with the content before a
21 * given character offset (Before), or with the content after a given
22 * character offset (After).
24 enum class CaretAssociationHint
{ Before
, After
};
27 * Return better caret association hint for aCaretPoint than aDefault.
28 * This computes the result from layout. Therefore, you should flush pending
29 * layout before calling this.
31 template <typename PT
, typename CT
>
32 CaretAssociationHint
ComputeCaretAssociationHint(
33 CaretAssociationHint aDefault
, intl::BidiEmbeddingLevel aBidiLevel
,
34 const RangeBoundaryBase
<PT
, CT
>& aCaretPoint
);
36 } // namespace mozilla