10119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine/* Copyright (C) 2006-2010 The Android Open Source Project 20119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine** 30119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine** This software is licensed under the terms of the GNU General Public 40119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine** License version 2, as published by the Free Software Foundation, and 50119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine** may be copied, distributed, and modified under those terms. 60119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine** 70119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine** This program is distributed in the hope that it will be useful, 80119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine** but WITHOUT ANY WARRANTY; without even the implied warranty of 90119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 100119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine** GNU General Public License for more details. 110119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine*/ 120119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine 130119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine#ifndef QEMU_ANDROID_QEMULATOR_H 140119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine#define QEMU_ANDROID_QEMULATOR_H 150119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine 1673dd5fc7da33280597dc6302ad8116d3723ebf3eDavid 'Digit' Turner#include "android/config-file.h" 170119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine#include "android/skin/file.h" 180119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine#include "android/skin/keyboard.h" 190119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine#include "android/skin/window.h" 200119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine#include "android/cmdline-option.h" 210119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine 220119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkinetypedef struct { 230119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine AConfig* aconfig; 240119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine SkinFile* layout_file; 250119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine SkinLayout* layout; 260119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine SkinKeyboard* keyboard; 270119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine SkinWindow* window; 280119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine int win_x; 290119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine int win_y; 300119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine int show_trackball; 310119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine SkinTrackBall* trackball; 320119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine int lcd_brightness; 330119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine SkinImage* onion; 340119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine SkinRotation onion_rotation; 350119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine int onion_alpha; 360119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine 370119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine AndroidOptions opts[1]; /* copy of options */ 380119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine} QEmulator; 390119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine 400119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine/* Gets a pointer to a QEmulator structure instance. */ 410119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir ChtchetkineQEmulator* 420119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkineqemulator_get(void); 430119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine 44496168ed6e29479bcc2c5cac2ade6f045013a59cDavid 'Digit' Turnervoid 45496168ed6e29479bcc2c5cac2ade6f045013a59cDavid 'Digit' Turnerandroid_emulator_set_window_scale(double scale, int is_dpi); 46496168ed6e29479bcc2c5cac2ade6f045013a59cDavid 'Digit' Turner 470119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine/* Initializes QEmulator structure instance. */ 480119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkineint 490119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkineqemulator_init( QEmulator* emulator, 500119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine AConfig* aconfig, 510119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine const char* basepath, 520119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine int x, 530119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine int y, 540119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine AndroidOptions* opts ); 550119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine 560119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine/* Uninitializes QEmulator structure instance on exit. */ 570119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkinevoid 580119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkineqemulator_done( QEmulator* emulator ); 590119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine 600119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine/* Sets title on the emulator's window. */ 610119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkinevoid 620119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkineqemulator_set_title( QEmulator* emulator ); 630119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine 640119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine/* Gets emulator's layout. */ 650119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir ChtchetkineSkinLayout* 660119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkineqemulator_get_layout( QEmulator* emulator ); 670119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine 68cf755ea6f4b850a6afd12ef8308da8def7ba8941Vladimir Chtchetkine/* Gets framebuffer for the first display. */ 69cf755ea6f4b850a6afd12ef8308da8def7ba8941Vladimir ChtchetkineQFrameBuffer* 70cf755ea6f4b850a6afd12ef8308da8def7ba8941Vladimir Chtchetkineqemulator_get_first_framebuffer(QEmulator* emulator); 71cf755ea6f4b850a6afd12ef8308da8def7ba8941Vladimir Chtchetkine 720119362f0d74ca74f3ea743f6e0e527a9edcc474Vladimir Chtchetkine#endif // QEMU_ANDROID_QEMULATOR_H 73