1
/*****************************************************************************
3
* frame - Touch Frame Library
5
* Copyright (C) 2011-2012 Canonical Ltd.
7
* This library is free software: you can redistribute it and/or modify it
8
* under the terms of the GNU Lesser General Public License version 3
9
* as published by the Free Software Foundation.
11
* This library is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranties of
13
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14
* PURPOSE. See the GNU Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this library. If not, see <http://www.gnu.org/licenses/>.
19
****************************************************************************/
21
#ifndef FRAME_TOUCH_H_
22
#define FRAME_TOUCH_H_
29
#include "oif/frame.h"
34
virtual ~UFTouch_() {}
40
class UFTouch : public UFTouch_, public Property<UFTouchProperty> {
42
UFTouch(UFTouchState state, UFTouchId id, float x, float y,
44
UFTouch(const UFTouch& touch, UFTouchState new_state);
46
UFTouchId id() const { return id_; }
47
UFTouchState state() const { return state_; }
49
void SetValue(UFAxisType type, float value);
50
UFStatus GetValue(UFAxisType type, float* value) const;
52
UFTouch(const UFTouch&) = delete;
53
UFTouch& operator=(const UFTouch&) = delete;
57
const UFTouchState state_;
58
std::map<UFAxisType, float> values_;
64
#endif // FRAME_TOUCH_H_