3
* Compiz mouse position polling plugin
7
* Copyright : (C) 2008 by Dennis Kasprzyk
8
* E-mail : onestone@opencompositing.org
11
* This program is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU General Public License
13
* as published by the Free Software Foundation; either version 2
14
* of the License, or (at your option) any later version.
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
23
#include <core/core.h>
24
#include <core/pluginclasshandler.h>
25
#include <core/timer.h>
27
#include <mousepoll/mousepoll.h>
29
#include "mousepoll_options.h"
31
typedef enum _MousepollOptions
33
MP_DISPLAY_OPTION_MOUSE_POLL_INTERVAL,
35
} MousepollDisplayOptions;
37
#define MP_OPTION_MOUSE_POLL_INTERVAL 0
38
#define MP_OPTION_NUM 1
40
class MousepollScreen :
41
public PluginClassHandler <MousepollScreen, CompScreen, COMPIZ_MOUSEPOLL_ABI>,
42
public MousepollOptions
46
MousepollScreen (CompScreen *screen);
48
std::list<MousePoller *> pollers;
60
addTimer (MousePoller *poller);
63
removeTimer (MousePoller *poller);
68
#define MOUSEPOLL_SCREEN(s) \
69
MousepollScreen *ms = MousepollScreen::get (s)
71
#define NUM_OPTIONS(s) (sizeof ((s)->opt) / sizeof (CompOption))
73
class MousepollPluginVTable :
74
public CompPlugin::VTableForScreen<MousepollScreen>