Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bf844a4f
Commit
bf844a4f
authored
Nov 08, 1998
by
Ulrich Weigand
Committed by
Alexandre Julliard
Nov 08, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of MOUSE.DRV (contains some code taken from
windows/event.c).
parent
d1b919c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
125 additions
and
3 deletions
+125
-3
mouse.spec
if1632/mouse.spec
+3
-3
mouse.h
include/mouse.h
+47
-0
mouse.c
windows/mouse.c
+75
-0
No files found.
if1632/mouse.spec
View file @
bf844a4f
name mouse
name mouse
type win16
type win16
1 pascal16 Inquire(ptr) M
ouse
Inquire
1 pascal16 Inquire(ptr) M
OUSE_
Inquire
2 pascal16 Enable(segptr)
Mouse
Enable
2 pascal16 Enable(segptr)
THUNK_MOUSE_
Enable
3 pascal16 Disable() M
ouse
Disable
3 pascal16 Disable() M
OUSE_
Disable
4 stub MOUSEGETINTVECT
4 stub MOUSEGETINTVECT
5 stub GETSETMOUSEDATA
5 stub GETSETMOUSEDATA
#Control Panel thinks this is implemented if it is available
#Control Panel thinks this is implemented if it is available
...
...
include/mouse.h
0 → 100644
View file @
bf844a4f
/*
* MOUSE driver interface
*
* Copyright 1998 Ulrich Weigand
*/
#ifndef __WINE_MOUSE_H
#define __WINE_MOUSE_H
#pragma pack(1)
typedef
struct
_MOUSEINFO
{
BYTE
msExist
;
BYTE
msRelative
;
WORD
msNumButtons
;
WORD
msRate
;
WORD
msXThreshold
;
WORD
msYThreshold
;
WORD
msXRes
;
WORD
msYRes
;
WORD
msMouseCommPort
;
}
MOUSEINFO
,
*
LPMOUSEINFO
;
#pragma pack(4)
typedef
VOID
(
CALLBACK
*
LPMOUSE_EVENT_PROC
)(
DWORD
,
DWORD
,
DWORD
,
DWORD
,
DWORD
);
WORD
WINAPI
MOUSE_Inquire
(
LPMOUSEINFO
lpMouseInfo
);
VOID
WINAPI
MOUSE_Enable
(
LPMOUSE_EVENT_PROC
lpMouseEventProc
);
VOID
WINAPI
MOUSE_Disable
(
VOID
);
/* Wine internals */
#define WINE_MOUSEEVENT_MAGIC ( ('M'<<24)|('A'<<16)|('U'<<8)|'S' )
typedef
struct
_WINE_MOUSEEVENT
{
DWORD
magic
;
DWORD
keyState
;
DWORD
time
;
HWND32
hWnd
;
}
WINE_MOUSEEVENT
;
void
MOUSE_SendEvent
(
DWORD
mouseStatus
,
DWORD
posX
,
DWORD
posY
,
DWORD
keyState
,
DWORD
time
,
HWND32
hWnd
);
#endif
/* __WINE_MOUSE_H */
windows/mouse.c
0 → 100644
View file @
bf844a4f
/*
* MOUSE driver
*
* Copyright 1998 Ulrich Weigand
*
*/
#include <assert.h>
#include "windows.h"
#include "gdi.h"
#include "mouse.h"
#include "debug.h"
#include "debugtools.h"
static
LPMOUSE_EVENT_PROC
DefMouseEventProc
=
NULL
;
/***********************************************************************
* MOUSE_Inquire (MOUSE.1)
*/
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
);
}
/***********************************************************************
* MOUSE_Enable (MOUSE.2)
*/
VOID
WINAPI
MOUSE_Enable
(
LPMOUSE_EVENT_PROC
lpMouseEventProc
)
{
DefMouseEventProc
=
lpMouseEventProc
;
}
/***********************************************************************
* MOUSE_Disable (MOUSE.3)
*/
VOID
WINAPI
MOUSE_Disable
(
VOID
)
{
DefMouseEventProc
=
0
;
}
/***********************************************************************
* MOUSE_SendEvent
*/
void
MOUSE_SendEvent
(
DWORD
mouseStatus
,
DWORD
posX
,
DWORD
posY
,
DWORD
keyState
,
DWORD
time
,
HWND32
hWnd
)
{
WINE_MOUSEEVENT
wme
;
if
(
!
DefMouseEventProc
)
return
;
TRACE
(
event
,
"(%04lX,%ld,%ld)
\n
"
,
mouseStatus
,
posX
,
posY
);
mouseStatus
|=
MOUSEEVENTF_ABSOLUTE
;
posX
=
(((
long
)
posX
<<
16
)
+
screenWidth
-
1
)
/
screenWidth
;
posY
=
(((
long
)
posY
<<
16
)
+
screenHeight
-
1
)
/
screenHeight
;
wme
.
magic
=
WINE_MOUSEEVENT_MAGIC
;
wme
.
keyState
=
keyState
;
wme
.
time
=
time
;
wme
.
hWnd
=
hWnd
;
DefMouseEventProc
(
mouseStatus
,
posX
,
posY
,
0
,
(
DWORD
)
&
wme
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment