Subversion Repositories shark

Rev

Rev 523 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
519 mauro 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Paolo Gai           <pj@gandalf.sssup.it>
10
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
11
 *   Luca Abeni          <luca@gandalf.sssup.it>
12
 *   Mauro Marinoni      <mauro.marinoni@unipv.it>
13
 *
14
 *
15
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
16
 *
17
 * http://www.sssup.it
18
 * http://retis.sssup.it
19
 * http://shark.sssup.it
20
 */
21
 
22
/*
23
 * Copyright (C) 2000 Paolo Gai
24
 *
25
 * This program is free software; you can redistribute it and/or modify
26
 * it under the terms of the GNU General Public License as published by
27
 * the Free Software Foundation; either version 2 of the License, or
28
 * (at your option) any later version.
29
 *
30
 * This program is distributed in the hope that it will be useful,
31
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
32
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33
 * GNU General Public License for more details.
34
 *
35
 * You should have received a copy of the GNU General Public License
36
 * along with this program; if not, write to the Free Software
37
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
38
 *
39
 */
40
 
41
/* Glue Layer Header Linux Input Driver*/
42
 
43
#ifndef __SHARK_MOUSE26_H__
44
#define __SHARK_MOUSE26_H__
45
 
46
/* mouse buttons constant */  
47
#define MOUSE_RBUTT     1
48
#define MOUSE_CBUTT     2
49
#define MOUSE_LBUTT     4
50
 
51
/* the mouse event struct */
52
typedef struct {
53
        int x, y, z;            /* mouse position */
54
        int dx, dy, dz; /* distance covered by mouse */
55
        int buttons;            /* buttons flags */
56
} MOUSE_EVT;
57
 
58
/* macros to test mouse buttons */
59
#define isLeftButton(m)    ((m).buttons & MOUSE_LBUTT)
60
#define isRightButton(m)   ((m).buttons & MOUSE_RBUTT)
61
#define isCentralButton(m) ((m).buttons & MOUSE_CBUTT)
62
 
63
/* user mouse handler */
64
typedef void (*MOUSE_HANDLER)(MOUSE_EVT*);
65
 
66
int MOUSE26_init(void);
67
int MOUSE26_close(void);
68
 
69
#endif
70