1998-11-08 13:21:35 +01:00
|
|
|
/*
|
|
|
|
* MOUSE driver
|
|
|
|
*
|
|
|
|
* Copyright 1998 Ulrich Weigand
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
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;
|
|
|
|
}
|