main-common.h revision f845627c83ce6ce3e306f9b6842d1e30ef89ae97
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
24void emulator_config_init( void );
25void emulator_config_done( void );
26
27void emulator_config_get_window_pos( int *window_x, int *window_y );
28
29#define  ONE_MB  (1024*1024)
30
31unsigned convertBytesToMB( uint64_t  size );
32uint64_t convertMBToBytes( unsigned  megaBytes );
33
34extern SkinKeyset*  android_keyset;
35void parse_keyset(const char*  keyset, AndroidOptions*  opts);
36void write_default_keyset( void );
37
38extern const char*  skin_network_speed;
39extern const char*  skin_network_delay;
40
41void init_skinned_ui(const char *path, const char *name, AndroidOptions*  opts);
42
43#endif /* ANDROID_MAIN_COMMON_H */
44