1998-11-08 13:21:35 +01:00
|
|
|
/*
|
|
|
|
* MOUSE driver
|
2002-06-01 01:06:46 +02:00
|
|
|
*
|
1998-11-08 13:21:35 +01:00
|
|
|
* Copyright 1998 Ulrich Weigand
|
2002-06-01 01:06:46 +02:00
|
|
|
*
|
2002-03-10 00:29:33 +01:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1998-11-08 13:21:35 +01:00
|
|
|
*/
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
1999-09-20 20:49:02 +02:00
|
|
|
#include <string.h>
|
|
|
|
|
2000-02-10 20:03:02 +01:00
|
|
|
#include "windef.h"
|
2001-12-17 22:35:42 +01:00
|
|
|
#include "winbase.h"
|
1999-04-01 10:16:08 +02:00
|
|
|
#include "winuser.h"
|
1999-12-06 02:20:00 +01:00
|
|
|
#include "wine/winbase16.h"
|
1999-02-04 15:05:38 +01:00
|
|
|
|
2000-06-08 06:57:22 +02:00
|
|
|
#include "pshpack1.h"
|
|
|
|
typedef struct _MOUSEINFO
|
|
|
|
{
|
|
|
|
BYTE msExist;
|
|
|
|
BYTE msRelative;
|
|
|
|
WORD msNumButtons;
|
|
|
|
WORD msRate;
|
|
|
|
WORD msXThreshold;
|
|
|
|
WORD msYThreshold;
|
|
|
|
WORD msXRes;
|
|
|
|
WORD msYRes;
|
|
|
|
WORD msMouseCommPort;
|
|
|
|
} MOUSEINFO, *LPMOUSEINFO;
|
|
|
|
#include "poppack.h"
|
|
|
|
|
2001-12-17 22:35:42 +01:00
|
|
|
static FARPROC16 DefMouseEventProc;
|
1998-11-08 13:21:35 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* Inquire (MOUSE.1)
|
1998-11-08 13:21:35 +01:00
|
|
|
*/
|
|
|
|
WORD WINAPI MOUSE_Inquire(LPMOUSEINFO mouseInfo)
|
|
|
|
{
|
|
|
|
mouseInfo->msExist = TRUE;
|
|
|
|
mouseInfo->msRelative = FALSE;
|
|
|
|
mouseInfo->msNumButtons = 2;
|
|
|
|
mouseInfo->msRate = 34; /* the DDK says so ... */
|
|
|
|
mouseInfo->msXThreshold = 0;
|
|
|
|
mouseInfo->msYThreshold = 0;
|
|
|
|
mouseInfo->msXRes = 0;
|
|
|
|
mouseInfo->msYRes = 0;
|
|
|
|
mouseInfo->msMouseCommPort = 0;
|
|
|
|
|
|
|
|
return sizeof(MOUSEINFO);
|
|
|
|
}
|
|
|
|
|
2001-10-18 23:38:59 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* Enable (MOUSE.2)
|
|
|
|
*/
|
|
|
|
VOID WINAPI MOUSE_Enable( FARPROC16 proc )
|
1999-09-20 20:49:02 +02:00
|
|
|
{
|
2001-12-17 22:35:42 +01:00
|
|
|
DefMouseEventProc = proc;
|
1999-09-20 20:49:02 +02:00
|
|
|
}
|
|
|
|
|
1998-11-08 13:21:35 +01:00
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* Disable (MOUSE.3)
|
1998-11-08 13:21:35 +01:00
|
|
|
*/
|
|
|
|
VOID WINAPI MOUSE_Disable(VOID)
|
|
|
|
{
|
|
|
|
DefMouseEventProc = 0;
|
|
|
|
}
|