Elm glayer: Added config value to multi-touch rotation.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 20 Dec 2011 08:39:30 +0000 (08:39 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 20 Dec 2011 08:39:30 +0000 (08:39 +0000)
Patch by Bluezery.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@66368 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

config/default/base.src
config/illume/base.src
config/standard/base.src
src/lib/elm_config.c
src/lib/elm_gesture_layer.c
src/lib/elm_priv.h

index 3493915..f764202 100644 (file)
@@ -44,6 +44,7 @@ group "Elm_Config" struct {
   value "glayer_zoom_finger_factor" double: 1.0;
   value "glayer_zoom_wheel_factor" double: 0.05;
   value "glayer_zoom_distance_tolerance" double: 1.0;
+  value "glayer_rotate_finger_enable" uchar: 0;
   value "glayer_rotate_angular_tolerance" double: 0.034906585;
   value "glayer_line_min_length" double: 1.0;
   value "glayer_line_distance_tolerance" double: 3.0;
index 7595d4f..a0ef476 100644 (file)
@@ -48,6 +48,7 @@ group "Elm_Config" struct {
   value "glayer_zoom_finger_factor" double: 1.0;
   value "glayer_zoom_wheel_factor" double: 0.05;
   value "glayer_zoom_distance_tolerance" double: 1.0;
+  value "glayer_rotate_finger_enable" uchar: 0;
   value "glayer_rotate_angular_tolerance" double: 0.034906585;
   value "glayer_line_min_length" double: 1.0;
   value "glayer_line_distance_tolerance" double: 3.0;
index d0b0282..3b85de3 100644 (file)
@@ -48,6 +48,7 @@ group "Elm_Config" struct {
   value "glayer_zoom_finger_factor" double: 1.0;
   value "glayer_zoom_wheel_factor" double: 0.05;
   value "glayer_zoom_distance_tolerance" double: 1.0;
+  value "glayer_rotate_finger_enable" uchar: 0;
   value "glayer_rotate_angular_tolerance" double: 0.034906585;
   value "glayer_line_min_length" double: 1.0;
   value "glayer_line_distance_tolerance" double: 3.0;
index 29cc3e2..268a0cf 100644 (file)
@@ -322,6 +322,7 @@ _desc_init(void)
    ELM_CONFIG_VAL(D, T, glayer_zoom_finger_factor, T_DOUBLE);
    ELM_CONFIG_VAL(D, T, glayer_zoom_wheel_factor, T_DOUBLE);
    ELM_CONFIG_VAL(D, T, glayer_zoom_distance_tolerance, T_DOUBLE);
+   ELM_CONFIG_VAL(D, T, glayer_rotate_finger_enable, T_UCHAR);
    ELM_CONFIG_VAL(D, T, glayer_rotate_angular_tolerance, T_DOUBLE);
    ELM_CONFIG_VAL(D, T, glayer_line_min_length, T_DOUBLE);
    ELM_CONFIG_VAL(D, T, glayer_line_distance_tolerance, T_DOUBLE);
@@ -892,6 +893,7 @@ _config_load(void)
    _elm_config->glayer_zoom_finger_factor = 1.0;
    _elm_config->glayer_zoom_wheel_factor = 0.05;
    _elm_config->glayer_zoom_distance_tolerance = 1.0; /* 1 times elm_finger_size_get() */
+   _elm_config->glayer_rotate_finger_enable = EINA_FALSE;
    _elm_config->glayer_rotate_angular_tolerance = 0.034906585;     /* Represents 2 DEG */
    _elm_config->glayer_line_min_length = 1.0;         /* 1 times elm_finger_size_get() */
    _elm_config->glayer_line_distance_tolerance = 3.0; /* 3 times elm_finger_size_get() */
index 813a8fe..1b8ade4 100644 (file)
@@ -3116,7 +3116,7 @@ _event_process(void *data, Evas_Object *obj __UNUSED__,
    if (IS_TESTED(ELM_GESTURE_ZOOM))
      _zoom_with_wheel_test(data, event_info, event_type, ELM_GESTURE_ZOOM);
 
-   if (IS_TESTED(ELM_GESTURE_ROTATE))
+   if (_elm_config->glayer_rotate_finger_enable && IS_TESTED(ELM_GESTURE_ROTATE))
      _rotate_test(data, pe, event_info, event_type, ELM_GESTURE_ROTATE);
 
    if (_get_event_flag(event_info, event_type) & EVAS_EVENT_FLAG_ON_HOLD)
index ba18e4b..4123bbd 100644 (file)
@@ -153,6 +153,7 @@ struct _Elm_Config
    double         glayer_zoom_finger_factor;
    double         glayer_zoom_wheel_factor;
    double         glayer_zoom_distance_tolerance;
+   double         glayer_rotate_finger_enable;
    double         glayer_rotate_angular_tolerance;
    double         glayer_line_min_length;
    double         glayer_line_distance_tolerance;