1 #ifndef __DALI_INTEGRATION_TOUCH_DATA_H__
2 #define __DALI_INTEGRATION_TOUCH_DATA_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #include <dali/public-api/common/vector-wrapper.h>
30 typedef std::vector<TouchData> TouchDataContainer;
31 typedef TouchDataContainer::iterator TouchDataIter;
35 * represents the raw touch information from touch-screen for
36 * a single touch event e.g.
38 * "First finger touching down at pixel 123,456 on the screen (relative
39 * to top left corner of phone in portrait mode). at timestamp 125ms (from a reference
40 * timestamp e.g. phone boot being 0secs)."
41 * TouchData(Down, 125, 0, 123, 456)
43 * "Above finger moving to pixel 133,457, at timestamp 150ms"
44 * TouchData(Motion, 150, 0, 133, 457)
46 * "Additional finger touching down at pixel 50, 75, at timestamp 175ms"
47 * TouchData(Down, 175, 1, 50, 75)
49 * "First finger removing at pixel 143, 458, at timestamp 200ms"
50 * TouchData(Up, 200, 0, 143, 458)
52 * "Additional finger removing at pixel 51, 77, at timestamp 225ms"
53 * TouchData(Up, 225, 1, 51, 77)
55 * Note: Multiple incidents of touch data can be present at the same timestamp.
61 * The Touch Type for this data.
65 Down, // Touch started
67 Motion // Touch is continuing
80 TouchData(TouchType type,
81 unsigned int timestamp,
94 unsigned int timestamp;
101 } // namespace Integration
105 #endif // __DALI_INTEGRATION_TOUCH_DATA_H__