mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
43 lines
933 B
C++
43 lines
933 B
C++
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_
|
|
#define FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_
|
|
|
|
#include "third_party/dart/runtime/include/dart_api.h"
|
|
#include "third_party/skia/include/core/SkRect.h"
|
|
#include "third_party/tonic/converter/dart_converter.h"
|
|
|
|
namespace flutter {
|
|
|
|
enum class TextDirection {
|
|
rtl,
|
|
ltr,
|
|
};
|
|
|
|
struct TextBox {
|
|
SkRect rect;
|
|
TextDirection direction;
|
|
|
|
TextBox(SkRect r, TextDirection d) : rect(r), direction(d) {}
|
|
};
|
|
|
|
} // namespace flutter
|
|
|
|
namespace tonic {
|
|
|
|
template <>
|
|
struct DartConverter<flutter::TextBox> {
|
|
static Dart_Handle ToDart(const flutter::TextBox& val);
|
|
};
|
|
|
|
template <>
|
|
struct DartListFactory<flutter::TextBox> {
|
|
static Dart_Handle NewList(intptr_t length);
|
|
};
|
|
|
|
} // namespace tonic
|
|
|
|
#endif // FLUTTER_LIB_UI_TEXT_TEXT_BOX_H_
|