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