Merge remote-tracking branch 'score/develop' into tizen-arm-develop
authorEvgeny Voevodin <e.voevodin@samsung.com>
Fri, 14 Sep 2012 04:19:52 +0000 (08:19 +0400)
committerEvgeny Voevodin <e.voevodin@samsung.com>
Fri, 14 Sep 2012 07:47:53 +0000 (11:47 +0400)
package/pkginfo.manifest
tizen/src/maru_finger.c
tizen/src/maru_finger.h
tizen/src/skin/maruskin_operation.c

index ab51323663b7df5630fc203e8124a053ee1bb472..d7e53af49c5fcf9c94d216c331ea76f92100a176 100644 (file)
@@ -1,4 +1,4 @@
-Version: 1.3.50
+Version: 1.3.54
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
 Source: emulator
 
index c47e564e95ceb558bf1d331f75e428aabcd9ec58..c42dbcaf4cbbe4aaec57b72863e8e83bef5d7153 100644 (file)
@@ -162,7 +162,7 @@ void init_multi_touch_state(void)
 
     mts->finger_cnt_max = get_emul_max_touch_point();
     if (mts->finger_cnt_max > MAX_FINGER_CNT) {
-        mts->finger_cnt_max = MAX_FINGER_CNT; //TODO:
+        mts->finger_cnt_max = MAX_FINGER_CNT;
         set_emul_max_touch_point(mts->finger_cnt_max);
     }
     INFO("maxTouchPoint=%d\n", get_emul_max_touch_point());
@@ -279,7 +279,7 @@ FingerPoint *get_finger_point_search(int x, int y)
 static int _grab_finger_id = 0;
 #define QEMU_MOUSE_PRESSED 1
 #define QEMU_MOUSE_RELEASEED 0
-void maru_finger_processing_A(int touch_type, int origin_x, int origin_y, int x, int y)
+void maru_finger_processing_1(int touch_type, int origin_x, int origin_y, int x, int y)
 {
     MultiTouchState *mts = get_emul_multi_touch_state();
     FingerPoint *finger = NULL;
@@ -341,7 +341,7 @@ void maru_finger_processing_A(int touch_type, int origin_x, int origin_y, int x,
     }
 }
 
-void maru_finger_processing_B(int touch_type, int origin_x, int origin_y, int x, int y)
+void maru_finger_processing_2(int touch_type, int origin_x, int origin_y, int x, int y)
 {
     MultiTouchState *mts = get_emul_multi_touch_state();
     FingerPoint *finger = NULL;
index afc6564526cdf6f8e685a01bc6c3a582061411dc..e004fd8320834890803ea6a1ac6b1acf1268ab74 100644 (file)
@@ -33,8 +33,7 @@
 
 
 /* definitions relating to multi-touch */
-//TODO : from arg
-#define MAX_FINGER_CNT 6
+#define MAX_FINGER_CNT 10
 #define DEFAULT_FINGER_POINT_SIZE 32
 #define DEFAULT_FINGER_POINT_COLOR 0x7E0F0F0F
 #define DEFAULT_FINGER_POINT_OUTLINE_COLOR 0xDDDDDDDD
@@ -65,8 +64,8 @@ void set_multi_touch_enable(int enable);
 int get_multi_touch_enable(void);
 FingerPoint *get_finger_point_from_slot(int index);
 FingerPoint *get_finger_point_search(int x, int y);
-void maru_finger_processing_A(int touch_type, int origin_x, int origin_y, int x, int y);
-void maru_finger_processing_B(int touch_type, int origin_x, int origin_y, int x, int y);
+void maru_finger_processing_1(int touch_type, int origin_x, int origin_y, int x, int y);
+void maru_finger_processing_2(int touch_type, int origin_x, int origin_y, int x, int y);
 int rearrange_finger_points(int lcd_w, int lcd_h, double scale_factor, int rotaton_type);
 void clear_finger_slot(void);
 void cleanup_multi_touch_state(void);
index 0123e049a3078ea07cb3c4cceeacd69c41a7fd04..9ca9b14e120f2679e467efca2519b050e3e965af 100644 (file)
@@ -97,10 +97,10 @@ void do_mouse_event(int button_type, int event_type,
 #ifndef USE_SHM
     /* multi-touch */
     if (get_emul_multi_touch_state()->multitouch_enable == 1) {
-        maru_finger_processing_A(event_type, origin_x, origin_y, x, y);
+        maru_finger_processing_1(event_type, origin_x, origin_y, x, y);
         return;
     } else if (get_emul_multi_touch_state()->multitouch_enable == 2) {
-        maru_finger_processing_B(event_type, origin_x, origin_y, x, y);
+        maru_finger_processing_2(event_type, origin_x, origin_y, x, y);
         return;
     }
 #endif
@@ -156,31 +156,36 @@ void do_key_event(int event_type, int keycode, int state_mask, int key_location)
 #ifndef USE_SHM
     //is multi-touch mode ?
     if (get_emul_max_touch_point() > 1) {
-        if (keycode == JAVA_KEYCODE_BIT_CTRL) {
+        int state_mask_temp = state_mask & ~JAVA_KEYCODE_NO_FOCUS;
+
+        if ((keycode == JAVA_KEYCODE_BIT_SHIFT &&
+            state_mask_temp == JAVA_KEYCODE_BIT_CTRL) ||
+            (keycode == JAVA_KEYCODE_BIT_CTRL &&
+            state_mask_temp == JAVA_KEYCODE_BIT_SHIFT))
+        {
             if (KEY_PRESSED == event_type) {
-                get_emul_multi_touch_state()->multitouch_enable = 1;
-                INFO("1)multi-touch enabled = A\n");
-            } else if (KEY_RELEASED == event_type) {
-                get_emul_multi_touch_state()->multitouch_enable = 0;
-                clear_finger_slot();
-                INFO("1)multi-touch disabled\n");
-            }
-        } else if (keycode == (JAVA_KEYCODE_NO_FOCUS | JAVA_KEYCODE_BIT_CTRL)) {
-            //release ctrl key when dragging
-            if (KEY_RELEASED == event_type) {
-                get_emul_multi_touch_state()->multitouch_enable = 0;
-                clear_finger_slot();
-                INFO("2)multi-touch disabled\n");
+                get_emul_multi_touch_state()->multitouch_enable = 2;
+                INFO("enable multi-touch = mode2\n");
             }
-        } else if (keycode == (JAVA_KEYCODE_BIT_SHIFT | JAVA_KEYCODE_BIT_CTRL)) {
+        }
+        else if (keycode == JAVA_KEYCODE_BIT_CTRL ||
+            keycode == JAVA_KEYCODE_BIT_SHIFT)
+        {
             if (KEY_PRESSED == event_type) {
-                get_emul_multi_touch_state()->multitouch_enable = 2;
-                INFO("2)multi-touch enabled = B\n");
-            } else if (KEY_RELEASED == event_type) {
                 get_emul_multi_touch_state()->multitouch_enable = 1;
-                INFO("2)multi-touch enabled = A\n");
+                INFO("enable multi-touch = mode1\n");
+            } else if (KEY_RELEASED == event_type) {
+                if (state_mask_temp == (JAVA_KEYCODE_BIT_CTRL | JAVA_KEYCODE_BIT_SHIFT)) {
+                    get_emul_multi_touch_state()->multitouch_enable = 1;
+                    INFO("enabled multi-touch = mode1\'\n");
+                } else {
+                    get_emul_multi_touch_state()->multitouch_enable = 0;
+                    clear_finger_slot();
+                    INFO("disable multi-touch\n");
+                }
             }
         }
+
     }
 #endif