• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (C) 2007-2008 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 #ifndef _SKIN_WINDOW_H
13 #define _SKIN_WINDOW_H
14 
15 #include "android/skin/file.h"
16 #include "android/skin/trackball.h"
17 #include <SDL.h>
18 
19 typedef struct SkinWindow  SkinWindow;
20 
21 extern SkinWindow*      skin_window_create( SkinLayout*  layout,
22                                             int          x,
23                                             int          y,
24                                             double       scale,
25                                             int          no_display );
26 
27 extern void             skin_window_enable_touch( SkinWindow*  window, int  enabled );
28 extern void             skin_window_enable_trackball( SkinWindow*  window, int  enabled );
29 extern void             skin_window_enable_dpad( SkinWindow*  window, int  enabled );
30 extern void             skin_window_enable_qwerty( SkinWindow*  window, int  enabled );
31 
32 extern int              skin_window_reset ( SkinWindow*  window, SkinLayout*  layout );
33 extern void             skin_window_free  ( SkinWindow*  window );
34 extern void             skin_window_redraw( SkinWindow*  window, SkinRect*  rect );
35 extern void             skin_window_process_event( SkinWindow*  window, SDL_Event*  ev );
36 
37 extern void             skin_window_set_onion( SkinWindow*   window,
38                                                SkinImage*    onion,
39                                                SkinRotation  rotation,
40                                                int           alpha );
41 
42 extern void             skin_window_set_scale( SkinWindow*  window,
43                                                double       scale );
44 
45 extern void             skin_window_set_title( SkinWindow*  window,
46                                                const char*  title );
47 
48 extern void             skin_window_set_trackball( SkinWindow*  window, SkinTrackBall*  ball );
49 extern void             skin_window_show_trackball( SkinWindow*  window, int  enable );
50 extern void             skin_window_toggle_fullscreen( SkinWindow*  window );
51 
52 /* change the brightness of the emulator LCD screen. 'brightness' will be clamped to 0..255 */
53 extern void             skin_window_set_lcd_brightness( SkinWindow*  window, int  brightness );
54 
55 typedef struct {
56     int           width;
57     int           height;
58     SkinRotation  rotation;
59     void*         data;
60 } ADisplayInfo;
61 
62 extern void             skin_window_get_display( SkinWindow*  window, ADisplayInfo  *info );
63 extern void             skin_window_update_display( SkinWindow*  window, int  x, int  y, int  w, int  h );
64 
65 #endif /* _SKIN_WINDOW_H */
66