summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_gesture_framework.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-02-18 10:16:51 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-03 10:54:26 +0100
commit641c9427ef5f462655750ad3c802f925d09430b4 (patch)
tree7d35649312987515f1f5e26c44234e304c6fd0eb /src/bin/elementary/test_gesture_framework.c
parente54454b98696e945c6d1a9d02092338bb3506781 (diff)
efl/gesture: rename long_tap -> long_press
this is consistent with the rest of efl naming ref T8503 Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D11376
Diffstat (limited to '')
-rw-r--r--src/bin/elementary/test_gesture_framework.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/bin/elementary/test_gesture_framework.c b/src/bin/elementary/test_gesture_framework.c
index 41a9ffd49a..ff40711cdd 100644
--- a/src/bin/elementary/test_gesture_framework.c
+++ b/src/bin/elementary/test_gesture_framework.c
@@ -6,7 +6,7 @@
6#define TAP_NAME "tap" 6#define TAP_NAME "tap"
7#define DOUBLE_TAP_NAME "double_tap" 7#define DOUBLE_TAP_NAME "double_tap"
8#define TRIPLE_TAP_NAME "triple_tap" 8#define TRIPLE_TAP_NAME "triple_tap"
9#define LONG_TAP_NAME "long_tap" 9#define LONG_PRESS_NAME "long_press"
10#define FLICK_NAME "flick" 10#define FLICK_NAME "flick"
11#define LINE_NAME "line" 11#define LINE_NAME "line"
12#define MOMENTUM_NAME "momentum" 12#define MOMENTUM_NAME "momentum"
@@ -17,7 +17,7 @@
17#define MAX_DOUBLE_TAP 5 17#define MAX_DOUBLE_TAP 5
18#define MAX_FLICK 5 18#define MAX_FLICK 5
19#define MAX_LINE 5 19#define MAX_LINE 5
20#define MAX_LONG_TAP 5 20#define MAX_LONG_PRESS 5
21#define MAX_MOMENTUM 5 21#define MAX_MOMENTUM 5
22#define MAX_ROTATE 1 22#define MAX_ROTATE 1
23#define MAX_TAP 5 23#define MAX_TAP 5
@@ -59,7 +59,7 @@ struct _infra_data
59 icon_properties *icons; 59 icon_properties *icons;
60 Ecore_Timer *colortimer; 60 Ecore_Timer *colortimer;
61 char buf[1024]; 61 char buf[1024];
62 int long_tap_count; 62 int long_press_count;
63}; 63};
64typedef struct _infra_data infra_data; 64typedef struct _infra_data infra_data;
65 65
@@ -360,34 +360,34 @@ finger_double_tap_abort(void *data , Efl_Canvas_Gesture *tap EINA_UNUSED)
360} 360}
361 361
362static void 362static void
363finger_long_tap_start(void *data , Efl_Canvas_Gesture *tap) 363finger_long_press_start(void *data , Efl_Canvas_Gesture *tap)
364{ 364{
365 Eina_Position2D pos = efl_gesture_hotspot_get(tap); 365 Eina_Position2D pos = efl_gesture_hotspot_get(tap);
366 366
367 _color_and_icon_set(data, LONG_TAP_NAME, 1, MAX_TAP, START_COLOR); 367 _color_and_icon_set(data, LONG_PRESS_NAME, 1, MAX_TAP, START_COLOR);
368 printf("Long Tap Gesture started x,y=<%d,%d> \n", pos.x, pos.y); 368 printf("Long Tap Gesture started x,y=<%d,%d> \n", pos.x, pos.y);
369} 369}
370 370
371static void 371static void
372finger_long_tap_update(void *data , Efl_Canvas_Gesture *tap EINA_UNUSED) 372finger_long_press_update(void *data , Efl_Canvas_Gesture *tap EINA_UNUSED)
373{ 373{
374 _color_and_icon_set(data, LONG_TAP_NAME, 1, MAX_TAP, UPDATE_COLOR); 374 _color_and_icon_set(data, LONG_PRESS_NAME, 1, MAX_TAP, UPDATE_COLOR);
375 printf("Long Tap Gesture updated\n"); 375 printf("Long Tap Gesture updated\n");
376} 376}
377 377
378static void 378static void
379finger_long_tap_end(void *data , Efl_Canvas_Gesture *tap) 379finger_long_press_end(void *data , Efl_Canvas_Gesture *tap)
380{ 380{
381 Eina_Position2D pos = efl_gesture_hotspot_get(tap); 381 Eina_Position2D pos = efl_gesture_hotspot_get(tap);
382 382
383 _color_and_icon_set(data, LONG_TAP_NAME, 1, MAX_TAP, END_COLOR); 383 _color_and_icon_set(data, LONG_PRESS_NAME, 1, MAX_TAP, END_COLOR);
384 printf("Long Tap Gesture ended x,y=<%d,%d> \n",pos.x, pos.y); 384 printf("Long Tap Gesture ended x,y=<%d,%d> \n",pos.x, pos.y);
385} 385}
386 386
387static void 387static void
388finger_long_tap_abort(void *data , Efl_Canvas_Gesture *tap EINA_UNUSED) 388finger_long_press_abort(void *data , Efl_Canvas_Gesture *tap EINA_UNUSED)
389{ 389{
390 _color_and_icon_set(data, LONG_TAP_NAME, 1, MAX_TAP, ABORT_COLOR); 390 _color_and_icon_set(data, LONG_PRESS_NAME, 1, MAX_TAP, ABORT_COLOR);
391 printf("Long Tap Aborted\n"); 391 printf("Long Tap Aborted\n");
392} 392}
393 393
@@ -521,22 +521,22 @@ double_tap_gesture_cb(void *data , const Efl_Event *ev)
521} 521}
522 522
523static void 523static void
524long_tap_gesture_cb(void *data , const Efl_Event *ev) 524long_press_gesture_cb(void *data , const Efl_Event *ev)
525{ 525{
526 Efl_Canvas_Gesture *g = ev->info; 526 Efl_Canvas_Gesture *g = ev->info;
527 switch(efl_gesture_state_get(g)) 527 switch(efl_gesture_state_get(g))
528 { 528 {
529 case EFL_GESTURE_STATE_STARTED: 529 case EFL_GESTURE_STATE_STARTED:
530 finger_long_tap_start(data, g); 530 finger_long_press_start(data, g);
531 break; 531 break;
532 case EFL_GESTURE_STATE_UPDATED: 532 case EFL_GESTURE_STATE_UPDATED:
533 finger_long_tap_update(data, g); 533 finger_long_press_update(data, g);
534 break; 534 break;
535 case EFL_GESTURE_STATE_CANCELED: 535 case EFL_GESTURE_STATE_CANCELED:
536 finger_long_tap_abort(data, g); 536 finger_long_press_abort(data, g);
537 break; 537 break;
538 case EFL_GESTURE_STATE_FINISHED: 538 case EFL_GESTURE_STATE_FINISHED:
539 finger_long_tap_end(data, g); 539 finger_long_press_end(data, g);
540 break; 540 break;
541 default: 541 default:
542 break; 542 break;
@@ -625,7 +625,7 @@ test_gesture_framework(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
625 elm_table_pack(tb, bx, 2, 0, 1, 1); 625 elm_table_pack(tb, bx, 2, 0, 1, 1);
626 626
627 /* Box of Long Tap icon and label */ 627 /* Box of Long Tap icon and label */
628 bx = create_gesture_box(win, infra->icons, 3, LONG_TAP_NAME, "Long Tap"); 628 bx = create_gesture_box(win, infra->icons, 3, LONG_PRESS_NAME, "Long Tap");
629 elm_table_pack(tb, bx, 3, 0, 1, 1); 629 elm_table_pack(tb, bx, 3, 0, 1, 1);
630 630
631 /* Box of Momentum icon and label */ 631 /* Box of Momentum icon and label */
@@ -736,7 +736,7 @@ test_gesture_framework(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
736 736
737 // LISTEN FOR GESTURES 737 // LISTEN FOR GESTURES
738 efl_event_callback_add(target, EFL_EVENT_GESTURE_TAP, tap_gesture_cb, infra); 738 efl_event_callback_add(target, EFL_EVENT_GESTURE_TAP, tap_gesture_cb, infra);
739 efl_event_callback_add(target, EFL_EVENT_GESTURE_LONG_TAP, long_tap_gesture_cb, infra); 739 efl_event_callback_add(target, EFL_EVENT_GESTURE_LONG_PRESS, long_press_gesture_cb, infra);
740 efl_event_callback_add(target, EFL_EVENT_GESTURE_DOUBLE_TAP, double_tap_gesture_cb, infra); 740 efl_event_callback_add(target, EFL_EVENT_GESTURE_DOUBLE_TAP, double_tap_gesture_cb, infra);
741 efl_event_callback_add(target, EFL_EVENT_GESTURE_TRIPLE_TAP, triple_tap_gesture_cb, infra); 741 efl_event_callback_add(target, EFL_EVENT_GESTURE_TRIPLE_TAP, triple_tap_gesture_cb, infra);
742 efl_event_callback_add(target, EFL_EVENT_GESTURE_MOMENTUM, momentum_gesture_cb, infra); 742 efl_event_callback_add(target, EFL_EVENT_GESTURE_MOMENTUM, momentum_gesture_cb, infra);