From: Joogab Yun Date: Mon, 5 Jul 2021 03:05:23 +0000 (+0900) Subject: Add Timer at TapGestureRecognizer X-Git-Tag: dali_2.0.36~6 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=4082d081eb74560feaa2d9aa17dc16bc2e3740f8;hp=-c Add Timer at TapGestureRecognizer Change-Id: Iea2b71b2eb9020cd71067554cdea621e86ae8f7b --- 4082d081eb74560feaa2d9aa17dc16bc2e3740f8 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gesture-generator.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gesture-generator.cpp index 4b465a7..4532c6e 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gesture-generator.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gesture-generator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -149,16 +149,23 @@ void TestEndPan(TestApplication& application, Vector2 pos, uint32_t time) application.ProcessEvent(GenerateSingleTouch(PointState::UP, pos, time)); } +void TestTriggerTap(TestApplication& application) +{ + application.GetPlatform().TriggerTimer(); +} + void TestGenerateTap(TestApplication& application, float x, float y, uint32_t time_down) { application.ProcessEvent(GenerateSingleTouch(PointState::DOWN, Vector2(x, y), time_down)); application.ProcessEvent(GenerateSingleTouch(PointState::UP, Vector2(x, y), time_down + 20)); + TestTriggerTap(application); } void TestGenerateTwoPointTap(TestApplication& application, float x1, float y1, float x2, float y2, uint32_t time_down) { application.ProcessEvent(GenerateDoubleTouch(PointState::DOWN, Vector2(x1, y1), PointState::DOWN, Vector2(x2, y2), time_down)); application.ProcessEvent(GenerateDoubleTouch(PointState::UP, Vector2(x1, y1), PointState::UP, Vector2(x2, y2), time_down + 20)); + TestTriggerTap(application); } void TestGenerateRotation(TestApplication& application) diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gesture-generator.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gesture-generator.h index e6e367d..cb3b1a6 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gesture-generator.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gesture-generator.h @@ -2,7 +2,7 @@ #define DALI_TEST_GESTURE_GENERATOR_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,6 +94,11 @@ void TestMovePan(TestApplication& application, Vector2 pos, uint32_t time = 400) void TestEndPan(TestApplication& application, Vector2 pos, uint32_t time = 500); /** + * Triggers the timer to begin a tap gesture + */ +void TestTriggerTap(TestApplication& application); + +/** * Produces a single point tap gesture with a 20ms interval */ void TestGenerateTap(TestApplication& application, float x = 20.0f, float y = 20.0f, uint32_t time_down = 100);