• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 The Android Open Source Project
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 #include "aemu/base/export.h"
18 #include "constants.h"
19 #include "host-common/hw-config.h"
20 
21 /* MSVC only exports function pointers */
22 AEMU_EXPORT AndroidHwConfig* aemu_get_android_hw();
23 
24 /* this is to support snapshot (currently only qemu1+software-renderer) */
25 extern const char* savevm_on_exit;
26 
27 /* this indicates that guest has mounted data partition */
28 extern int guest_data_partition_mounted;
29 
30 /* this indicates that guest has boot completed */
31 extern int guest_boot_completed;
32 
33 extern int arm_snapshot_save_completed;
34 
35 extern int host_emulator_is_headless;
36 
37 /* are we using the emulator in the android mode or plain qemu? */
38 extern int android_qemu_mode;
39 
40 /* are we using android-emu libraries for a minimal configuration? */
41 extern int min_config_qemu_mode;
42 
43 /* is android-emu running Fuchsia? */
44 extern int is_fuchsia;
45 
46 extern int android_snapshot_update_timer;
47 
48 /* are we using qemu 2? */
49 /* remove this flag once we deprecate qemu1 on both dev and release branches. */
50 extern int engine_supports_snapshot;
51 
52 /* are we changing the language, country, or locale? */
53 extern int changing_language_country_locale;
54 extern const char* to_set_language;
55 extern const char* to_set_country;
56 extern const char* to_set_locale;
57 
58 /* True if we are using keycode forwarding instead of translating text value to
59  * keycode */
60 /* on emulator host. */
61 extern int use_keycode_forwarding;
62 
63 enum WinsysPreferredGlesBackend {
64     WINSYS_GLESBACKEND_PREFERENCE_AUTO = 0,
65     WINSYS_GLESBACKEND_PREFERENCE_ANGLE = 1,
66     WINSYS_GLESBACKEND_PREFERENCE_ANGLE9 = 2,
67     WINSYS_GLESBACKEND_PREFERENCE_SWIFTSHADER = 3,
68     WINSYS_GLESBACKEND_PREFERENCE_NATIVEGL = 4,
69     WINSYS_GLESBACKEND_PREFERENCE_NUM = 5,
70 };
71 
72 enum WinsysPreferredGlesApiLevel {
73     WINSYS_GLESAPILEVEL_PREFERENCE_AUTO = 0,
74     WINSYS_GLESAPILEVEL_PREFERENCE_MAX = 1,
75     WINSYS_GLESAPILEVEL_PREFERENCE_COMPAT = 2,
76     WINSYS_GLESAPILEVEL_PREFERENCE_NUM = 3,
77 };
78 
79