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 MOUSEPOLL_ABIVERSION 20080116
25 
26 typedef int PositionPollingHandle;
27 
28 typedef void (*PositionUpdateProc) (CompScreen *s,
29 				    int        x,
30 				    int        y);
31 
32 typedef PositionPollingHandle
33 (*AddPositionPollingProc) (CompScreen         *s,
34 			   PositionUpdateProc update);
35 
36 typedef void
37 (*RemovePositionPollingProc) (CompScreen            *s,
38 			      PositionPollingHandle id);
39 
40 typedef void
41 (*GetCurrentPositionProc) (CompScreen *s,
42 			   int        *x,
43 			   int        *y);
44 
45 typedef struct _MousePollFunc {
46    AddPositionPollingProc    addPositionPolling;
47    RemovePositionPollingProc removePositionPolling;
48    GetCurrentPositionProc    getCurrentPosition;
49 } MousePollFunc;
50 
51 #endif
52