1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_LIB_UI_DART_RUNTIME_HOOKS_H_
6#define FLUTTER_LIB_UI_DART_RUNTIME_HOOKS_H_
7
8#include "flutter/fml/macros.h"
9#include "third_party/dart/runtime/include/dart_api.h"
10#include "third_party/tonic/dart_library_natives.h"
11
12namespace flutter {
13
14class DartRuntimeHooks {
15 public:
16 static void Install(bool is_ui_isolate, const std::string& script_uri);
17
18 static void Logger_PrintDebugString(const std::string& message);
19
20 static void Logger_PrintString(const std::string& message);
21
22 static void ScheduleMicrotask(Dart_Handle closure);
23
24 static Dart_Handle GetCallbackHandle(Dart_Handle func);
25
26 static Dart_Handle GetCallbackFromHandle(int64_t handle);
27
28 private:
29 FML_DISALLOW_IMPLICIT_CONSTRUCTORS(DartRuntimeHooks);
30};
31
32void DartPluginRegistrant_EnsureInitialized();
33
34} // namespace flutter
35
36#endif // FLUTTER_LIB_UI_DART_RUNTIME_HOOKS_H_
37

Provided by KDAB

Privacy Policy
Learn more about Flutter for embedded and desktop on industrialflutter.com

source code of flutter_engine/flutter/lib/ui/dart_runtime_hooks.h