Purge underscored header file barriers
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-gesture-generator.h
1 #ifndef DALI_TEST_GESTURE_GENERATOR_H
2 #define DALI_TEST_GESTURE_GENERATOR_H
3
4 /*
5  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 #include "test-application.h"
22
23 namespace Dali
24 {
25 /**
26  * These functions use touch events to trigger a gesture, assuming the default gesture parameters are used
27  */
28
29 /**
30  * Returns the frame interval used in ms
31  */
32 uint32_t TestGetFrameInterval();
33
34 /**
35  * Produces the initial touch of a long press
36  */
37 void TestStartLongPress( TestApplication& application, float x = 20.0f, float y = 20.0f, uint32_t time = 450 );
38
39 /**
40  * Triggers the timer to begin a long press gesture
41  */
42 void TestTriggerLongPress( TestApplication& application );
43
44 /**
45  * Produces the initial press and triggers the timer to begin a long press gesture
46  */
47 void TestGenerateLongPress( TestApplication& application, float x = 20.0f, float y = 20.0f, uint32_t time = 450 );
48
49 /**
50  * End a long press by lifting the touch
51  */
52 void TestEndLongPress( TestApplication& application, float x = 20.0f, float y = 20.0f, uint32_t time = 450 );
53
54 /**
55  * Produces a vertical pinch gesture between (20,20) and (20,90)
56  */
57 void TestGeneratePinch( TestApplication& application );
58
59 /**
60  * Produces the gesture started event of a pinch, using 4 touches, 50ms apart, starting with 1, ending at 2
61  */
62 void TestStartPinch( TestApplication& application, Vector2 a1, Vector2 b1, Vector2 a2, Vector2 b2, uint32_t time );
63
64 /**
65  * Produces a gesture continuing event of a pinch, using 4 touches, 50ms apart, starting with 1, ending at 2
66  */
67 void TestContinuePinch( TestApplication& application, Vector2 a1, Vector2 b1, Vector2 a2, Vector2 b2, uint32_t time );
68
69 /**
70  * Produces a gesture finished event of a pinch, using 2 touches, 50ms apart
71  */
72 void TestEndPinch( TestApplication& application, Vector2 a1, Vector2 b1, Vector2 a2, Vector2 b2, uint32_t time );
73
74 /**
75  * Produces a pan gesture from (20,20) to (20,40)
76  */
77 void TestGenerateMiniPan( TestApplication& application );
78
79 /**
80  * Produces the start event of a pan gesture, assuming minimum distance moved between start and end is greater than 15
81  * in either direction or 11 in both (x&y). Time will be incremented using the standard frame interval per touch movement
82  */
83 void TestStartPan( TestApplication& application, Vector2 start, Vector2 end, uint32_t& time );
84
85 /**
86  * Continues a pan event by creating a single touch at pos.
87  * N.B This does not increment the time
88  */
89 void TestMovePan( TestApplication& application, Vector2 pos, uint32_t time = 400);
90
91 /**
92  * End a pan gesture at position pos
93  */
94 void TestEndPan( TestApplication& application, Vector2 pos, uint32_t time = 500);
95
96 /**
97  * Produces a single point tap gesture with a 20ms interval
98  */
99 void TestGenerateTap( TestApplication& application, float x = 20.0f, float y = 20.0f, uint32_t time_down = 100 );
100
101 /**
102  * Produce a tap gesture with two touch points and a 20ms interval
103  */
104 void TestGenerateTwoPointTap( TestApplication& application, float x1, float y1, float x2, float y2, uint32_t time_down );
105
106 } // namespace Dali
107
108 #endif // DALI_TEST_GESTURE_GENERATOR_H