2
* This file is part of unity-2d
4
* Copyright 2011 Canonical Ltd.
7
* - Aurélien Gâteau <aurelien.gateau@canonical.com>
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published
11
* by the Free Software Foundation; version 3.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
#include <unity2dapplication.h>
31
struct MouseAreaPrivate;
33
* A class to help detecting when the mouse cursor enters an area.
34
* Quite similar to QML MouseArea item.
36
class MouseArea : public QObject, protected AbstractX11EventFilter
40
MouseArea(QObject* parent = 0);
43
QRect geometry() const;
44
void setGeometry(int x, int y, int width, int height);
45
void setGeometry(const QRect&);
47
bool containsMouse() const;
54
bool x11EventFilter(XEvent*);
57
MouseAreaPrivate* const d;
60
#endif /* MOUSEAREA_H */