David 'Digit' Turner | f845627 | 2011-02-02 12:34:14 +0100 | [diff] [blame^] | 1 | /* Copyright (C) 2011 The Android Open Source Project |
| 2 | ** |
| 3 | ** This software is licensed under the terms of the GNU General Public |
| 4 | ** License version 2, as published by the Free Software Foundation, and |
| 5 | ** may be copied, distributed, and modified under those terms. |
| 6 | ** |
| 7 | ** This program is distributed in the hope that it will be useful, |
| 8 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | ** GNU General Public License for more details. |
| 11 | */ |
| 12 | #ifndef ANDROID_MAIN_COMMON_H |
| 13 | #define ANDROID_MAIN_COMMON_H |
| 14 | |
| 15 | #include <stdint.h> |
| 16 | #include "android/cmdline-option.h" |
| 17 | #include "android/skin/keyset.h" |
| 18 | |
| 19 | /* Common routines used by both android/main.c and android/main-ui.c */ |
| 20 | |
| 21 | /** Emulator user configuration (e.g. last window position) |
| 22 | **/ |
| 23 | |
| 24 | void emulator_config_init( void ); |
| 25 | void emulator_config_done( void ); |
| 26 | |
| 27 | void emulator_config_get_window_pos( int *window_x, int *window_y ); |
| 28 | |
| 29 | #define ONE_MB (1024*1024) |
| 30 | |
| 31 | unsigned convertBytesToMB( uint64_t size ); |
| 32 | uint64_t convertMBToBytes( unsigned megaBytes ); |
| 33 | |
| 34 | extern SkinKeyset* android_keyset; |
| 35 | void parse_keyset(const char* keyset, AndroidOptions* opts); |
| 36 | void write_default_keyset( void ); |
| 37 | |
| 38 | extern const char* skin_network_speed; |
| 39 | extern const char* skin_network_delay; |
| 40 | |
| 41 | void init_skinned_ui(const char *path, const char *name, AndroidOptions* opts); |
| 42 | |
| 43 | #endif /* ANDROID_MAIN_COMMON_H */ |