Flutter Engine
The Flutter Engine
flutter_main.h
Go to the documentation of this file.
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_SHELL_PLATFORM_ANDROID_FLUTTER_MAIN_H_
6#define FLUTTER_SHELL_PLATFORM_ANDROID_FLUTTER_MAIN_H_
7
8#include <jni.h>
9
10#include "flutter/common/settings.h"
11#include "flutter/fml/macros.h"
12#include "flutter/runtime/dart_service_isolate.h"
13
14namespace flutter {
15
17 public:
19
20 static bool Register(JNIEnv* env);
21
22 static FlutterMain& Get();
23
24 const flutter::Settings& GetSettings() const;
25
28
29 private:
30 const flutter::Settings settings_;
31 DartServiceIsolate::CallbackHandle vm_service_uri_callback_ = 0;
32
33 explicit FlutterMain(const flutter::Settings& settings);
34
35 static void Init(JNIEnv* env,
36 jclass clazz,
37 jobject context,
38 jobjectArray jargs,
39 jstring kernelPath,
40 jstring appStoragePath,
41 jstring engineCachesPath,
42 jlong initTimeMillis);
43
44 void SetupDartVMServiceUriCallback(JNIEnv* env);
45
46 FML_DISALLOW_COPY_AND_ASSIGN(FlutterMain);
47};
48
49} // namespace flutter
50
51#endif // FLUTTER_SHELL_PLATFORM_ANDROID_FLUTTER_MAIN_H_
const flutter::Settings & GetSettings() const
Definition: flutter_main.cc:64
static FlutterMain & Get()
Definition: flutter_main.cc:58
static bool Register(JNIEnv *env)
static AndroidRenderingAPI SelectedRenderingAPI(const flutter::Settings &settings)
Definition: __init__.py:1
AndroidRenderingAPI
Definition: settings.h:26