Dear all,
Elementary can be used for all because EFL is an open source.
But multi Touch event can have paten issue such as pinch zooming action.
So, I add "finger(pinch) zooming action" to elm_config to can be
enabled or disabled.
This configuration value can be used for diverse product.
It's my pleasure if Mr. Hacohen have time to review this. :-)
Only gesture layer recognizes this value if all other elementary is
based on gesture layer.
But elm map implemented pinch zooming by itself. I will change elm_map
to use gesture layer soon.
For the consistency, elm_map read this value temporarily. It will
removed later after gesture layer is applied.
Please review this patch.
--
BRs,
Kim.
Index: src/lib/elm_config.c
===================================================================
--- src/lib/elm_config.c (리비전 66231)
+++ src/lib/elm_config.c (작업 사본)
@@ -318,6 +318,7 @@ _desc_init(void)
ELM_CONFIG_VAL(D, T, desktop_entry, T_UCHAR);
ELM_CONFIG_VAL(D, T, password_show_last, T_UCHAR);
ELM_CONFIG_VAL(D, T, password_show_last_timeout, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, glayer_zoom_finger_enable, T_UCHAR);
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);
@@ -887,6 +888,7 @@ _config_load(void)
_elm_config->is_mirrored = EINA_FALSE; /* Read sys value in env_get() */
_elm_config->password_show_last = EINA_FALSE;
_elm_config->password_show_last_timeout = 2.0;
+ _elm_config->glayer_zoom_finger_enable = EINA_FALSE;
_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() */
Index: src/lib/elm_map.c
===================================================================
--- src/lib/elm_map.c (리비전 66231)
+++ src/lib/elm_map.c (작업 사본)
@@ -3215,22 +3215,17 @@ elm_map_add(Evas_Object *parent)
_pan_min_get, _pan_child_size_get);
wd->rect = evas_object_rectangle_add(e);
- evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_RESIZE,
- _rect_resize_cb, obj);
- evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MOUSE_DOWN,
- _mouse_down, obj);
- evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MOUSE_MOVE,
- _mouse_move, obj);
- evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MOUSE_UP,
- _mouse_up, obj);
- evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MULTI_DOWN,
- _mouse_multi_down, obj);
- evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MULTI_MOVE,
- _mouse_multi_move, obj);
- evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MULTI_UP,
- _mouse_multi_up, obj);
- evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MOUSE_WHEEL,
- _mouse_wheel_cb, obj);
+ evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_RESIZE, _rect_resize_cb, obj);
+ evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down, obj);
+ evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move, obj);
+ evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MOUSE_UP, _mouse_up, obj);
+ if (_elm_config->glayer_zoom_finger_enable)
+ {
+ evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MULTI_DOWN, _mouse_multi_down, obj);
+ evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MULTI_MOVE, _mouse_multi_move, obj);
+ evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MULTI_UP, _mouse_multi_up, obj);
+ }
+ evas_object_event_callback_add(wd->rect, EVAS_CALLBACK_MOUSE_WHEEL, _mouse_wheel_cb, obj);
evas_object_smart_member_add(wd->rect, wd->pan_smart);
elm_widget_sub_object_add(obj, wd->rect);
Index: src/lib/elm_gesture_layer.c
===================================================================
--- src/lib/elm_gesture_layer.c (리비전 66231)
+++ src/lib/elm_gesture_layer.c (작업 사본)
@@ -237,6 +237,7 @@ struct _Widget_Data
Evas_Coord zoom_distance_tolerance;
Evas_Coord line_distance_tolerance;
double line_angular_tolerance;
+ Eina_Bool zoom_finger_enable : 1; /* finger (pinch) zoom enable */
double zoom_wheel_factor; /* mouse wheel zoom steps */
double zoom_finger_factor; /* used for zoom factor */
double rotate_angular_tolerance;
@@ -3327,6 +3328,12 @@ elm_gesture_layer_cb_set(Evas_Object *ob
Gesture_Info *p;
if (!wd) return;
+ if (!wd->zoom_finger_enable && idx == ELM_GESTURE_ZOOM)
+ {
+ ERR("finger(pinch) zoom is disabled");
+ return;
+ }
+
if (!wd->gesture[idx])
wd->gesture[idx] = calloc(1, sizeof(Gesture_Info));
if (!wd->gesture[idx]) return;
@@ -3369,6 +3376,7 @@ elm_gesture_layer_add(Evas_Object *paren
wd->line_min_length =_elm_config->glayer_line_min_length * elm_finger_size_get();
wd->zoom_distance_tolerance = _elm_config->glayer_zoom_distance_tolerance * elm_finger_size_get();
wd->line_distance_tolerance = _elm_config->glayer_line_distance_tolerance * elm_finger_size_get();
+ wd->zoom_finger_enable = _elm_config->glayer_zoom_finger_enable;
wd->zoom_finger_factor = _elm_config->glayer_zoom_finger_factor;
wd->zoom_wheel_factor = _elm_config->glayer_zoom_wheel_factor; /* mouse wheel zoom steps */
wd->rotate_angular_tolerance = _elm_config->glayer_rotate_angular_tolerance;
@@ -3380,7 +3388,7 @@ elm_gesture_layer_add(Evas_Object *paren
#if defined(DEBUG_GESTURE_LAYER)
printf("size of Gestures = <%d>\n", sizeof(wd->gesture));
- printf("initial values:\n\tzoom_finger_factor=<%f>\n\tzoom_distance_tolerance=<%d>\n\tline_min_length=<%d>\n\tline_distance_tolerance=<%d>\n\tzoom_wheel_factor=<%f>\n\trotate_angular_tolerance=<%f>\n\twd->line_angular_tolerance=<%f>\n\twd->flick_time_limit_ms=<%d>\n\twd->long_tap_start_timeout=<%f>\n\twd->zoom_step=<%f>\n\twd->rotate_step=<%f>\n\twd->glayer_continues_enable=<%d>\n ", wd->zoom_finger_factor, wd->zoom_distance_tolerance, wd->line_min_length, wd->line_distance_tolerance, wd->zoom_wheel_factor, wd->rotate_angular_tolerance, wd->line_angular_tolerance, wd->flick_time_limit_ms, wd->long_tap_start_timeout, wd->zoom_step, wd->rotate_step, wd->glayer_continues_enable);
+ printf("initial values:\n\zoom_finger_enable=<%d>\n\tzoom_finger_factor=<%f>\n\tzoom_distance_tolerance=<%d>\n\tline_min_length=<%d>\n\tline_distance_tolerance=<%d>\n\tzoom_wheel_factor=<%f>\n\trotate_angular_tolerance=<%f>\n\twd->line_angular_tolerance=<%f>\n\twd->flick_time_limit_ms=<%d>\n\twd->long_tap_start_timeout=<%f>\n\twd->zoom_step=<%f>\n\twd->rotate_step=<%f>\n\twd->glayer_continues_enable=<%d>\n ", wd->zoom_finger_enable, wd->zoom_finger_factor, wd->zoom_distance_tolerance, wd->line_min_length, wd->line_distance_tolerance, wd->zoom_wheel_factor, wd->rotate_angular_tolerance, wd->line_angular_tolerance, wd->flick_time_limit_ms, wd->long_tap_start_timeout, wd->zoom_step, wd->rotate_step, wd->glayer_continues_enable);
#endif
memset(wd->gesture, 0, sizeof(wd->gesture));
Index: src/lib/elm_priv.h
===================================================================
--- src/lib/elm_priv.h (리비전 66231)
+++ src/lib/elm_priv.h (작업 사본)
@@ -149,6 +149,7 @@ struct _Elm_Config
unsigned char desktop_entry;
Eina_Bool password_show_last;
double password_show_last_timeout;
+ Eina_Bool glayer_zoom_finger_enable;
double glayer_zoom_finger_factor;
double glayer_zoom_wheel_factor;
double glayer_zoom_distance_tolerance;
Index: src/bin/test_map.c
===================================================================
--- src/bin/test_map.c (리비전 66231)
+++ src/bin/test_map.c (작업 사본)
@@ -224,7 +224,6 @@ my_map_drag_stop(void *data, Evas_Object
static void
my_map_scroll(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
- printf("scroll\n");
double lon, lat;
elm_map_geo_region_get(obj, &lon, &lat);
printf("scroll longitude : %f latitude : %f\n", lon, lat);
Index: config/standard/base.src
===================================================================
--- config/standard/base.src (리비전 66231)
+++ config/standard/base.src (작업 사본)
@@ -44,6 +44,7 @@ group "Elm_Config" struct {
value "desktop_entry" uchar: 1;
value "password_show_last" uchar: 0;
value "password_show_last_timeout" double: 2.0;
+ value "glayer_zoom_finger_enable" uchar: 0;
value "glayer_zoom_finger_factor" double: 1.0;
value "glayer_zoom_wheel_factor" double: 0.05;
value "glayer_zoom_distance_tolerance" double: 1.0;
Index: config/default/base.src
===================================================================
--- config/default/base.src (리비전 66231)
+++ config/default/base.src (작업 사본)
@@ -40,6 +40,7 @@ group "Elm_Config" struct {
value "desktop_entry" uchar: 0;
value "password_show_last" uchar: 0;
value "password_show_last_timeout" double: 2.0;
+ value "glayer_zoom_finger_enable" uchar: 0;
value "glayer_zoom_finger_factor" double: 1.0;
value "glayer_zoom_wheel_factor" double: 0.05;
value "glayer_zoom_distance_tolerance" double: 1.0;
Index: config/profile.src
===================================================================
--- config/profile.src (리비전 66231)
+++ config/profile.src (작업 사본)
@@ -1 +1 @@
-default
\ No newline at end of file
+default
Index: config/illume/base.src
===================================================================
--- config/illume/base.src (리비전 66231)
+++ config/illume/base.src (작업 사본)
@@ -44,6 +44,7 @@ group "Elm_Config" struct {
value "desktop_entry" uchar: 0;
value "password_show_last" uchar: 1;
value "password_show_last_timeout" double: 2.0;
+ value "glayer_zoom_finger_enable" uchar: 0;
value "glayer_zoom_finger_factor" double: 1.0;
value "glayer_zoom_wheel_factor" double: 0.05;
value "glayer_zoom_distance_tolerance" double: 1.0;
------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.
But none more important than the need to reduce IT complexity
while improving strategic productivity. Learn More!
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel