wine/dlls/mouse.drv16/mouse.c
2009-03-04 14:32:56 +01:00

80 lines
2.1 KiB
C

/*
* MOUSE driver
*
* Copyright 1998 Ulrich Weigand
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#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"
static FARPROC16 DefMouseEventProc;
/***********************************************************************
* Inquire (MOUSE.1)
*/
WORD WINAPI Inquire16(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);
}
/***********************************************************************
* Enable (MOUSE.2)
*/
VOID WINAPI Enable16( FARPROC16 proc )
{
DefMouseEventProc = proc;
}
/***********************************************************************
* Disable (MOUSE.3)
*/
VOID WINAPI Disable16(void)
{
DefMouseEventProc = 0;
}