Dali 3D User Interface Engine
touch-data.h
Go to the documentation of this file.
1 #ifndef __DALI_INTEGRATION_TOUCH_DATA_H__
2 #define __DALI_INTEGRATION_TOUCH_DATA_H__
3 
4 /*
5  * Copyright (c) 2014 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  */
21 
22 namespace Dali
23 {
24 
25 namespace Integration
26 {
27 
28 struct TouchData;
29 
30 typedef std::vector<TouchData> TouchDataContainer;
31 typedef TouchDataContainer::iterator TouchDataIter;
32 
57 struct TouchData
58 {
59 
63  enum TouchType
64  {
65  Down, // Touch started
66  Up, // Touch ended
67  Motion // Touch is continuing
68  };
69 
71  : type(Motion),
72  timestamp(0u),
73  index(0u),
74  x(0),
75  y(0)
76  {
77 
78  }
79 
81  unsigned int timestamp,
82  unsigned int index,
83  int x,
84  int y)
85  : type(type),
86  timestamp(timestamp),
87  index(index),
88  x(x),
89  y(y)
90  {
91  }
92 
94  unsigned int timestamp;
95  unsigned int index;
96  int x;
97  int y;
98 
99 };
100 
101 } // namespace Integration
102 
103 } // namespace Dali
104 
105 #endif // __DALI_INTEGRATION_TOUCH_DATA_H__
Dali Docs Home
Read more about Dali