update source for tizen_2.1
[sdk/emulator/qemu.git] / tizen / src / emul_state.h
1 /*
2  * Emulator
3  *
4  * Copyright (C) 2011, 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: 
7  * SeokYeon Hwang <syeon.hwang@samsung.com>
8  * MunKyu Im <munkyu.im@samsung.com>
9  * GiWoong Kim <giwoong.kim@samsung.com>
10  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
11  * HyunJun Son
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
26  *
27  * Contributors:
28  * - S-Core Co., Ltd
29  *
30  */
31
32
33 #ifndef __EMUL_STATE_H__
34 #define __EMUL_STATE_H__
35
36
37 #include "maru_common.h"
38 #include "maru_finger.h"
39
40 /* keep it consistent with emulator-skin definition */
41 enum {
42     HARD_KEY_HOME = 139,
43     HARD_KEY_POWER = 116,
44     HARD_KEY_VOL_UP = 115,
45     HARD_KEY_VOL_DOWN = 114,
46 };
47
48 /* keep it consistent with emulator-skin definition */
49 enum {
50     MOUSE_DOWN = 1,
51     MOUSE_UP = 2,
52     MOUSE_DRAG = 3,
53     MOUSE_WHEELUP = 4,
54     MOUSE_WHEELDOWN = 5,
55 };
56
57 /* keep it consistent with emulator-skin definition */
58 enum {
59     KEY_PRESSED = 1,
60     KEY_RELEASED = 2,
61 };
62
63 /* keep it consistent with emulator-skin definition */
64 enum {
65     ROTATION_PORTRAIT = 0,
66     ROTATION_LANDSCAPE = 1,
67     ROTATION_REVERSE_PORTRAIT = 2,
68     ROTATION_REVERSE_LANDSCAPE = 3,
69 };
70
71 enum {
72     HOST_CAPSLOCK_KEY = 1,
73     HOST_NUMLOCK_KEY = 2,
74 };
75
76
77 typedef  struct EmulatorConfigInfo {
78     int skin_enable;
79     int lcd_size_w;
80     int lcd_size_h;
81     int sdl_bpp;
82     int max_touch_point;
83     int vm_base_port;
84     /* add here */
85 } EmulatorConfigInfo;
86
87 typedef struct EmulatorConfigState {
88     int emulator_condition; //TODO : enum
89     double scale_factor;
90     short rotation_type;
91     MultiTouchState qemu_mts;
92     int qemu_caps_lock;
93     int qemu_num_lock;
94     /* add here */
95 } EmulatorConfigState;
96
97
98 /* setter */
99 void set_emul_skin_enable(int enable);
100 void set_emul_lcd_size(int width, int height);
101 void set_emul_win_scale(double scale);
102 void set_emul_sdl_bpp(int bpp);
103 void set_emul_max_touch_point(int cnt);
104 void set_emul_vm_base_port(int port);
105
106 void set_emulator_condition(int state);
107 void set_emul_rotation(short rotation_type);
108 void set_emul_caps_lock_state(int state);
109 void set_emul_num_lock_state(int state);
110
111 /* getter */
112 int get_emul_skin_enable(void);
113 int get_emul_lcd_width(void);
114 int get_emul_lcd_height(void);
115 double get_emul_win_scale(void);
116 int get_emul_sdl_bpp(void);
117 int get_emul_max_touch_point(void);
118 int get_emul_vm_base_port(void);
119
120 int get_emulator_condition(void);
121 short get_emul_rotation(void);
122 MultiTouchState *get_emul_multi_touch_state(void);
123 int get_host_lock_key_state(int key);
124 int get_host_lock_key_state_darwin(int key);
125 int get_emul_caps_lock_state(void);
126 int get_emul_num_lock_state(void);
127
128
129 #endif /* __EMUL_STATE_H__ */