aboutsummaryrefslogtreecommitdiffstats
path: root/android/qemulator.h
blob: d9728cd4796539bf691450e3842ef4e2bab6c766 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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