aboutsummaryrefslogtreecommitdiffstats
path: root/android/qemulator.h
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2010-05-11 13:07:22 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2010-05-11 16:51:55 -0700
commit0119362f0d74ca74f3ea743f6e0e527a9edcc474 (patch)
tree3d648dbbd37cac73982d520eb7bddc4a75ed6e1e /android/qemulator.h
parent3266b5118e1d9ac13ea87bc24f37b50d22a2b81f (diff)
downloadexternal_qemu-0119362f0d74ca74f3ea743f6e0e527a9edcc474.zip
external_qemu-0119362f0d74ca74f3ea743f6e0e527a9edcc474.tar.gz
external_qemu-0119362f0d74ca74f3ea743f6e0e527a9edcc474.tar.bz2
Moved QEmulator out of main.c
Change-Id: I20964bb5d7fbef5ea22d265427793a2a7fce2017
Diffstat (limited to 'android/qemulator.h')
-rw-r--r--android/qemulator.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/android/qemulator.h b/android/qemulator.h
new file mode 100644
index 0000000..d9728cd
--- /dev/null
+++ b/android/qemulator.h
@@ -0,0 +1,69 @@
+/* Copyright (C) 2006-2010 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 QEMU_ANDROID_QEMULATOR_H
+#define QEMU_ANDROID_QEMULATOR_H
+
+#include "android/config.h"
+#include "android/skin/file.h"
+#include "android/skin/keyboard.h"
+#include "android/skin/window.h"
+#include "android/cmdline-option.h"
+
+typedef struct {
+ AConfig* aconfig;
+ SkinFile* layout_file;
+ SkinLayout* layout;
+ SkinKeyboard* keyboard;
+ SkinWindow* window;
+ int win_x;
+ int win_y;
+ int show_trackball;
+ SkinTrackBall* trackball;
+ int lcd_brightness;
+ SkinImage* onion;
+ SkinRotation onion_rotation;
+ int onion_alpha;
+
+ AndroidOptions opts[1]; /* copy of options */
+} QEmulator;
+
+/* Gets a pointer to a QEmulator structure instance. */
+QEmulator*
+qemulator_get(void);
+
+/* Initializes QEmulator structure instance. */
+int
+qemulator_init( QEmulator* emulator,
+ AConfig* aconfig,
+ const char* basepath,
+ int x,
+ int y,
+ AndroidOptions* opts );
+
+/* Uninitializes QEmulator structure instance on exit. */
+void
+qemulator_done( QEmulator* emulator );
+
+/* Sets title on the emulator's window. */
+void
+qemulator_set_title( QEmulator* emulator );
+
+/* Gets emulator's layout. */
+SkinLayout*
+qemulator_get_layout( QEmulator* emulator );
+
+/* A helper routine for getting device DPI. */
+int
+get_device_dpi( AndroidOptions* opts );
+
+#endif // QEMU_ANDROID_QEMULATOR_H