[Title] moved emulator condition field
authorgiwoong.kim <giwoong.kim@samsung.com>
Thu, 22 Mar 2012 02:39:00 +0000 (11:39 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Thu, 22 Mar 2012 02:39:00 +0000 (11:39 +0900)
[Type]
[Module] Emulator
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/emul_state.c
tizen/src/emul_state.h
tizen/src/emulator.c
tizen/src/emulator.h
tizen/src/maru_finger.c

index 31b355a..948245d 100644 (file)
@@ -39,6 +39,18 @@ MULTI_DEBUG_CHANNEL(qemu, emul_state);
 static EmulatorConfigInfo _emul_info;
 static EmulatorConfigState _emul_state;
 
+
+/* current emulator condition */
+int get_emulator_condition(void)
+{
+    return _emul_state.emulator_condition;
+}
+
+void set_emulator_condition(int state)
+{
+    _emul_state.emulator_condition = state;
+}
+
 /* lcd screen size */
 void set_emul_lcd_size(int width, int height)
 {
index 0624e5c..387086a 100644 (file)
@@ -63,14 +63,15 @@ enum {
 
 
 typedef  struct EmulatorConfigInfo {
-    char emulator_name[256];
+    char emulator_name[256]; //TODO:
     int lcd_size_w;
     int lcd_size_h;
-    int dpi;
+    int dpi; //not used yet
     //TODO:
 } EmulatorConfigInfo;
 
 typedef struct EmulatorConfigState {
+    int emulator_condition; //TODO : enum
     double scale_factor;
     short rotation_type;
     MultiTouchState qemu_mts;
@@ -79,11 +80,13 @@ typedef struct EmulatorConfigState {
 
 
 /* setter */
+void set_emulator_condition(int state);
 void set_emul_lcd_size(int width, int height);
 void set_emul_win_scale(double scale);
 void set_emul_rotation(short rotation_type);
 
 /* getter */
+int get_emulator_condition(void);
 int get_emul_lcd_width(void);
 int get_emul_lcd_height(void);
 double get_emul_win_scale(void);
index 71dec60..55770fe 100644 (file)
@@ -53,6 +53,7 @@
 
 MULTI_DEBUG_CHANNEL(qemu, main);
 
+
 #define IMAGE_PATH_PREFIX   "file="
 #define IMAGE_PATH_SUFFIX   ",if=virtio"
 #define SDB_PORT_PREFIX     "sdb_port="
@@ -61,19 +62,9 @@ MULTI_DEBUG_CHANNEL(qemu, main);
 #define MIDBUF  128
 int tizen_base_port = 0;
 
-int _emulator_condition = 0; //TODO:
 char tizen_target_path[MAXLEN] = {0, };
 char logpath[MAXLEN] = { 0, };
 
-int get_emulator_condition(void)
-{
-    return _emulator_condition;
-}
-
-void set_emulator_condition(int state)
-{
-    _emulator_condition = state;
-}
 
 void exit_emulator(void)
 {
index b886b5c..5e57fd4 100644 (file)
 
 extern char tizen_target_path[MAXLEN];
 
-int get_emulator_condition(void);
-void set_emulator_condition(int state);
 void exit_emulator(void);
 void set_image_and_log_path(char *qemu_argv);
 void get_tizen_port(char* option);
 
-#endif
+#endif /* __EMULATOR_H__ */
index 166f3d2..2cdd43b 100644 (file)
@@ -207,7 +207,7 @@ int get_multi_touch_enable(void)
     return get_emul_multi_touch_state()->multitouch_enable;
 }
 
-static int add_finger_point(int x, int y)
+static int _add_finger_point(int x, int y)
 {
     MultiTouchState *mts = get_emul_multi_touch_state();
 
@@ -283,7 +283,7 @@ void maru_finger_processing(int x, int y, int touch_type)
 
         if (mts->finger_cnt == 0)
         { //first finger touch input
-            if (add_finger_point(x, y) == -1) {
+            if (_add_finger_point(x, y) == -1) {
                 return;
             }
             kbd_mouse_event(x, y, 0, QEMU_MOUSE_PRESSED);
@@ -311,7 +311,7 @@ void maru_finger_processing(int x, int y, int touch_type)
         }
         else //one more finger
         {
-            add_finger_point(x, y) ;
+            _add_finger_point(x, y) ;
             kbd_mouse_event(x, y, mts->finger_cnt - 1, QEMU_MOUSE_PRESSED);
         }