diff options
author | David 'Digit' Turner <digit@android.com> | 2011-02-02 12:34:14 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-02-02 12:34:14 +0100 |
commit | f845627c83ce6ce3e306f9b6842d1e30ef89ae97 (patch) | |
tree | de4e4222afa69f0e10762035f94ff0dd682dd457 /android/main-common.h | |
parent | 6d37ae98b765dc741caef137b7494133bb6f8980 (diff) | |
download | external_qemu-f845627c83ce6ce3e306f9b6842d1e30ef89ae97.zip external_qemu-f845627c83ce6ce3e306f9b6842d1e30ef89ae97.tar.gz external_qemu-f845627c83ce6ce3e306f9b6842d1e30ef89ae97.tar.bz2 |
Move common main routines from into android-common.[hc]
This is a first step towards cleaning-up our initialization/startup code.
Change-Id: I2d4fbc5c2cd0181fb39a1a97a15650945038c3b9
Diffstat (limited to 'android/main-common.h')
-rw-r--r-- | android/main-common.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/android/main-common.h b/android/main-common.h new file mode 100644 index 0000000..0adc4a2 --- /dev/null +++ b/android/main-common.h @@ -0,0 +1,43 @@ +/* Copyright (C) 2011 The Android Open Source Project +** +** This software is licensed under the terms of the GNU General Public +** License version 2, as published by the Free Software Foundation, and +** may be copied, distributed, and modified under those terms. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +*/ +#ifndef ANDROID_MAIN_COMMON_H +#define ANDROID_MAIN_COMMON_H + +#include <stdint.h> +#include "android/cmdline-option.h" +#include "android/skin/keyset.h" + +/* Common routines used by both android/main.c and android/main-ui.c */ + +/** Emulator user configuration (e.g. last window position) + **/ + +void emulator_config_init( void ); +void emulator_config_done( void ); + +void emulator_config_get_window_pos( int *window_x, int *window_y ); + +#define ONE_MB (1024*1024) + +unsigned convertBytesToMB( uint64_t size ); +uint64_t convertMBToBytes( unsigned megaBytes ); + +extern SkinKeyset* android_keyset; +void parse_keyset(const char* keyset, AndroidOptions* opts); +void write_default_keyset( void ); + +extern const char* skin_network_speed; +extern const char* skin_network_delay; + +void init_skinned_ui(const char *path, const char *name, AndroidOptions* opts); + +#endif /* ANDROID_MAIN_COMMON_H */ |