Flutter Engine
 
Loading...
Searching...
No Matches
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
11#include "flutter/fml/macros.h"
14
15namespace flutter {
16
18 public:
20
21 static bool Register(JNIEnv* env);
22
23 static FlutterMain& Get();
24
25 const flutter::Settings& GetSettings() const;
27
29 const flutter::Settings& settings,
30 int api_level);
31
32 private:
33 const flutter::Settings settings_;
34 const flutter::AndroidRenderingAPI android_rendering_api_;
35 DartServiceIsolate::CallbackHandle vm_service_uri_callback_ = 0;
36
37 explicit FlutterMain(const flutter::Settings& settings,
38 flutter::AndroidRenderingAPI android_rendering_api);
39
40 static void Init(JNIEnv* env,
41 jclass clazz,
42 jobject context,
43 jobjectArray jargs,
44 jstring kernelPath,
45 jstring appStoragePath,
46 jstring engineCachesPath,
47 jlong initTimeMillis,
48 jint api_level);
49
50 void SetupDartVMServiceUriCallback(JNIEnv* env);
51
53};
54
55} // namespace flutter
56
57#endif // FLUTTER_SHELL_PLATFORM_ANDROID_FLUTTER_MAIN_H_
const flutter::Settings & GetSettings() const
flutter::AndroidRenderingAPI GetAndroidRenderingAPI()
static FlutterMain & Get()
static bool Register(JNIEnv *env)
static AndroidRenderingAPI SelectedRenderingAPI(const flutter::Settings &settings, int api_level)
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27