Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fotios Valasiadis
wine
Commits
bf844a4f
Commit
bf844a4f
authored
26 years ago
by
Ulrich Weigand
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implementation of MOUSE.DRV (contains some code taken from
windows/event.c).
parent
d1b919c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
if1632/mouse.spec
+3
-3
3 additions, 3 deletions
if1632/mouse.spec
include/mouse.h
+47
-0
47 additions, 0 deletions
include/mouse.h
windows/mouse.c
+75
-0
75 additions, 0 deletions
windows/mouse.c
with
125 additions
and
3 deletions
if1632/mouse.spec
+
3
−
3
View file @
bf844a4f
name mouse
type win16
1 pascal16 Inquire(ptr) M
ouse
Inquire
2 pascal16 Enable(segptr)
Mouse
Enable
3 pascal16 Disable() M
ouse
Disable
1 pascal16 Inquire(ptr) M
OUSE_
Inquire
2 pascal16 Enable(segptr)
THUNK_MOUSE_
Enable
3 pascal16 Disable() M
OUSE_
Disable
4 stub MOUSEGETINTVECT
5 stub GETSETMOUSEDATA
#Control Panel thinks this is implemented if it is available
...
...
This diff is collapsed.
Click to expand it.
include/mouse.h
0 → 100644
+
47
−
0
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 */
This diff is collapsed.
Click to expand it.
windows/mouse.c
0 → 100644
+
75
−
0
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
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment