~linaro-graphics-wg/compiz-plugins-main/oneiric-gles2

« back to all changes in this revision

Viewing changes to mousepoll/include/mousepoll/mousepoll.h

  • Committer: Sam Spilsbury
  • Date: 2011-09-20 07:43:55 UTC
  • Revision ID: sam.spilsbury@canonical.com-20110920074355-puzdutejjwsu3ta2
Sync - Remove Plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *
3
 
 * Compiz mouse position polling plugin
4
 
 *
5
 
 * Copyright : (C) 2008 by Dennis Kasprzyk
6
 
 * E-mail    : onestone@opencompositing.org
7
 
 *
8
 
 *
9
 
 * This program is free software; you can redistribute it and/or
10
 
 * modify it under the terms of the GNU General Public License
11
 
 * as published by the Free Software Foundation; either version 2
12
 
 * of the License, or (at your option) any later version.
13
 
 *
14
 
 * This program is distributed in the hope that it will be useful,
15
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 * GNU General Public License for more details.
18
 
 *
19
 
 */
20
 
 
21
 
#ifndef _COMPIZ_MOUSEPOLL_H
22
 
#define _COMPIZ_MOUSEPOLL_H
23
 
 
24
 
#define COMPIZ_MOUSEPOLL_ABI 1
25
 
 
26
 
class MousePoller
27
 
{
28
 
    public:
29
 
 
30
 
        typedef boost::function<void (const CompPoint &)> CallBack;
31
 
 
32
 
        MousePoller ();
33
 
        ~MousePoller ();
34
 
 
35
 
        void
36
 
        setCallback (CallBack callback);
37
 
 
38
 
        void
39
 
        start ();
40
 
 
41
 
        void
42
 
        stop ();
43
 
 
44
 
        bool
45
 
        active ();
46
 
 
47
 
        CompPoint
48
 
        getPosition ();
49
 
 
50
 
        static CompPoint
51
 
        getCurrentPosition ();
52
 
 
53
 
    private:
54
 
 
55
 
        bool      mActive;
56
 
        CompPoint mPoint;
57
 
        CallBack  mCallback;
58
 
 
59
 
    friend class MousepollScreen;
60
 
};
61
 
 
62
 
#endif