chromium/third_party/blink/renderer/platform/text/emoji_segmentation_category.h

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_TEXT_EMOJI_SEGMENTATION_CATEGORY_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_TEXT_EMOJI_SEGMENTATION_CATEGORY_H_

#include <cstdint>

namespace blink {

// Must match the categories defined in
// `third-party/emoji-segmenter/src/emoji_presentation_scanner.rl`.
enum class EmojiSegmentationCategory : uint8_t {};

// These operators are needed for the generated code at
// `third_party/emoji-segmenter`.
inline bool operator<(EmojiSegmentationCategory a, uint8_t b) {}
inline bool operator>(EmojiSegmentationCategory a, uint8_t b) {}

// If this function returns true for categories of any characters in a string,
// it may produce Emoji presentation, and thus cannot skip being run through the
// Ragel emoji presentation scanner in `SymbolsIterator`. See also
// `Character::ParticipatesInEmojiGrammar`.
inline bool IsEmojiPresentationCategory(EmojiSegmentationCategory emoji) {}

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_TEXT_EMOJI_SEGMENTATION_CATEGORY_H_