Added varargs support for 16-bit entry points.
[wine] / dlls / user / mouse.c
1 /*
2  * MOUSE driver
3  *
4  * Copyright 1998 Ulrich Weigand
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include <string.h>
22
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winuser.h"
26 #include "wine/winbase16.h"
27
28 #include "pshpack1.h"
29 typedef struct _MOUSEINFO
30 {
31     BYTE msExist;
32     BYTE msRelative;
33     WORD msNumButtons;
34     WORD msRate;
35     WORD msXThreshold;
36     WORD msYThreshold;
37     WORD msXRes;
38     WORD msYRes;
39     WORD msMouseCommPort;
40 } MOUSEINFO, *LPMOUSEINFO;
41 #include "poppack.h"
42
43 static FARPROC16 DefMouseEventProc;
44
45 /***********************************************************************
46  *           Inquire                       (MOUSE.1)
47  */
48 WORD WINAPI MOUSE_Inquire(LPMOUSEINFO mouseInfo)
49 {
50     mouseInfo->msExist = TRUE;
51     mouseInfo->msRelative = FALSE;
52     mouseInfo->msNumButtons = 2;
53     mouseInfo->msRate = 34;  /* the DDK says so ... */
54     mouseInfo->msXThreshold = 0;
55     mouseInfo->msYThreshold = 0;
56     mouseInfo->msXRes = 0;
57     mouseInfo->msYRes = 0;
58     mouseInfo->msMouseCommPort = 0;
59
60     return sizeof(MOUSEINFO);
61 }
62
63 /***********************************************************************
64  *           Enable                        (MOUSE.2)
65  */
66 VOID WINAPI MOUSE_Enable( FARPROC16 proc )
67 {
68     DefMouseEventProc = proc;
69 }
70
71 /***********************************************************************
72  *           Disable                       (MOUSE.3)
73  */
74 VOID WINAPI MOUSE_Disable(VOID)
75 {
76     DefMouseEventProc = 0;
77 }