1/* Copyright (C) 2006-2010 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 13#ifndef QEMU_ANDROID_QEMULATOR_H 14#define QEMU_ANDROID_QEMULATOR_H 15 16#include "android/config.h" 17#include "android/skin/file.h" 18#include "android/skin/keyboard.h" 19#include "android/skin/window.h" 20#include "android/cmdline-option.h" 21 22typedef struct { 23 AConfig* aconfig; 24 SkinFile* layout_file; 25 SkinLayout* layout; 26 SkinKeyboard* keyboard; 27 SkinWindow* window; 28 int win_x; 29 int win_y; 30 int show_trackball; 31 SkinTrackBall* trackball; 32 int lcd_brightness; 33 SkinImage* onion; 34 SkinRotation onion_rotation; 35 int onion_alpha; 36 37 AndroidOptions opts[1]; /* copy of options */ 38} QEmulator; 39 40/* Gets a pointer to a QEmulator structure instance. */ 41QEmulator* 42qemulator_get(void); 43 44/* Initializes QEmulator structure instance. */ 45int 46qemulator_init( QEmulator* emulator, 47 AConfig* aconfig, 48 const char* basepath, 49 int x, 50 int y, 51 AndroidOptions* opts ); 52 53/* Uninitializes QEmulator structure instance on exit. */ 54void 55qemulator_done( QEmulator* emulator ); 56 57/* Sets title on the emulator's window. */ 58void 59qemulator_set_title( QEmulator* emulator ); 60 61/* Gets emulator's layout. */ 62SkinLayout* 63qemulator_get_layout( QEmulator* emulator ); 64 65/* Gets framebuffer for the first display. */ 66QFrameBuffer* 67qemulator_get_first_framebuffer(QEmulator* emulator); 68 69#endif // QEMU_ANDROID_QEMULATOR_H 70