mouse.c 2.14 KB
Newer Older
1 2
/*
 * MOUSE driver
3
 *
4
 * Copyright 1998 Ulrich Weigand
5
 *
6 7 8 9 10 11 12 13 14 15 16 17
 * 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
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 20
 */

21
#include <stdarg.h>
22 23
#include <string.h>

24
#include "windef.h"
25
#include "winbase.h"
26
#include "winuser.h"
27
#include "wine/winbase16.h"
28
#include "wine/winuser16.h"
29

30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
#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"

45
static FARPROC16 DefMouseEventProc;
46 47

/***********************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
48
 *           Inquire                       (MOUSE.1)
49
 */
50
WORD WINAPI Inquire16(LPMOUSEINFO mouseInfo)
51 52 53 54 55 56 57 58 59 60 61 62 63 64
{
    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);
}

65 66 67
/***********************************************************************
 *           Enable                        (MOUSE.2)
 */
68
VOID WINAPI Enable16( FARPROC16 proc )
69
{
70
    DefMouseEventProc = proc;
71 72
}

73
/***********************************************************************
Patrik Stridvall's avatar
Patrik Stridvall committed
74
 *           Disable                       (MOUSE.3)
75
 */
76
VOID WINAPI Disable16(void)
77 78 79
{
    DefMouseEventProc = 0;
}