Home | History | Annotate | Download | only in android
      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-file.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 
     22 typedef 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. */
     41 QEmulator*
     42 qemulator_get(void);
     43 
     44 void
     45 android_emulator_set_window_scale(double  scale, int  is_dpi);
     46 
     47 /* Initializes QEmulator structure instance. */
     48 int
     49 qemulator_init( QEmulator*       emulator,
     50                 AConfig*         aconfig,
     51                 const char*      basepath,
     52                 int              x,
     53                 int              y,
     54                 AndroidOptions*  opts );
     55 
     56 /* Uninitializes QEmulator structure instance on exit. */
     57 void
     58 qemulator_done( QEmulator* emulator );
     59 
     60 /* Sets title on the emulator's window. */
     61 void
     62 qemulator_set_title( QEmulator* emulator );
     63 
     64 /* Gets emulator's layout. */
     65 SkinLayout*
     66 qemulator_get_layout( QEmulator* emulator );
     67 
     68 /* Gets framebuffer for the first display. */
     69 QFrameBuffer*
     70 qemulator_get_first_framebuffer(QEmulator* emulator);
     71 
     72 #endif  // QEMU_ANDROID_QEMULATOR_H
     73