Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
24dd5d9e
Commit
24dd5d9e
authored
Sep 20, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Sep 20, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keyboard/mouse event proc thunk creation moved out of if1632/thunk.c.
parent
c44ab1f0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
3 deletions
+102
-3
keyboard.spec
if1632/keyboard.spec
+1
-1
mouse.spec
if1632/mouse.spec
+1
-1
input.c
windows/input.c
+34
-0
keyboard.c
windows/keyboard.c
+33
-1
mouse.c
windows/mouse.c
+33
-0
No files found.
if1632/keyboard.spec
View file @
24dd5d9e
...
...
@@ -2,7 +2,7 @@ name keyboard
type win16
1 pascal16 Inquire(ptr) KEYBOARD_Inquire
2 pascal16 Enable(segptr ptr)
THUNK
_KEYBOARD_Enable
2 pascal16 Enable(segptr ptr)
WIN16
_KEYBOARD_Enable
3 pascal16 Disable() KEYBOARD_Disable
4 pascal16 ToAscii(word word ptr ptr word) ToAscii16
5 pascal16 AnsiToOem(str ptr) AnsiToOem16
...
...
if1632/mouse.spec
View file @
24dd5d9e
...
...
@@ -2,7 +2,7 @@ name mouse
type win16
1 pascal16 Inquire(ptr) MOUSE_Inquire
2 pascal16 Enable(segptr)
THUNK
_MOUSE_Enable
2 pascal16 Enable(segptr)
WIN16
_MOUSE_Enable
3 pascal16 Disable() MOUSE_Disable
4 stub MOUSEGETINTVECT
5 stub GETSETMOUSEDATA
...
...
windows/input.c
View file @
24dd5d9e
...
...
@@ -24,6 +24,7 @@
#include "keyboard.h"
#include "mouse.h"
#include "message.h"
#include "module.h"
#include "debugtools.h"
#include "struct32.h"
#include "winerror.h"
...
...
@@ -143,6 +144,20 @@ void WINAPI keybd_event( BYTE bVk, BYTE bScan,
}
/***********************************************************************
* WIN16_keybd_event (USER.289)
*/
void
WINAPI
WIN16_keybd_event
(
CONTEXT86
*
context
)
{
DWORD
dwFlags
=
0
;
if
(
AH_reg
(
context
)
&
0x80
)
dwFlags
|=
KEYEVENTF_KEYUP
;
if
(
BH_reg
(
context
)
&
1
)
dwFlags
|=
KEYEVENTF_EXTENDEDKEY
;
keybd_event
(
AL_reg
(
context
),
BL_reg
(
context
),
dwFlags
,
MAKELONG
(
SI_reg
(
context
),
DI_reg
(
context
))
);
}
/***********************************************************************
* mouse_event (USER32.584)
*/
void
WINAPI
mouse_event
(
DWORD
dwFlags
,
DWORD
dx
,
DWORD
dy
,
...
...
@@ -238,6 +253,25 @@ void WINAPI mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
}
}
/***********************************************************************
* WIN16_mouse_event (USER.299)
*/
void
WINAPI
WIN16_mouse_event
(
CONTEXT86
*
context
)
{
mouse_event
(
AX_reg
(
context
),
BX_reg
(
context
),
CX_reg
(
context
),
DX_reg
(
context
),
MAKELONG
(
SI_reg
(
context
),
DI_reg
(
context
))
);
}
/***********************************************************************
* GetMouseEventProc (USER.337)
*/
FARPROC16
WINAPI
GetMouseEventProc16
(
void
)
{
HMODULE16
hmodule
=
GetModuleHandle16
(
"USER"
);
return
NE_GetEntryPoint
(
hmodule
,
NE_GetOrdinal
(
hmodule
,
"mouse_event"
));
}
/**********************************************************************
* EnableHardwareInput (USER.331)
*/
...
...
windows/keyboard.c
View file @
24dd5d9e
...
...
@@ -19,7 +19,8 @@
#include "heap.h"
#include "keyboard.h"
#include "message.h"
#include "debugtools.h"
#include "callback.h"
#include "builtin16.h"
#include "debugtools.h"
#include "struct32.h"
#include "winerror.h"
...
...
@@ -56,6 +57,8 @@ VOID WINAPI KEYBOARD_Enable( LPKEYBD_EVENT_PROC lpKeybEventProc,
{
static
BOOL
initDone
=
FALSE
;
THUNK_Free
(
(
FARPROC
)
DefKeybEventProc
);
DefKeybEventProc
=
lpKeybEventProc
;
pKeyStateTable
=
lpKeyState
;
...
...
@@ -66,11 +69,40 @@ VOID WINAPI KEYBOARD_Enable( LPKEYBD_EVENT_PROC lpKeybEventProc,
initDone
=
TRUE
;
}
static
VOID
WINAPI
KEYBOARD_CallKeybdEventProc
(
FARPROC16
proc
,
BYTE
bVk
,
BYTE
bScan
,
DWORD
dwFlags
,
DWORD
dwExtraInfo
)
{
CONTEXT86
context
;
memset
(
&
context
,
0
,
sizeof
(
context
)
);
CS_reg
(
&
context
)
=
SELECTOROF
(
proc
);
EIP_reg
(
&
context
)
=
OFFSETOF
(
proc
);
AH_reg
(
&
context
)
=
(
dwFlags
&
KEYEVENTF_KEYUP
)
?
0x80
:
0
;
AL_reg
(
&
context
)
=
bVk
;
BH_reg
(
&
context
)
=
(
dwFlags
&
KEYEVENTF_EXTENDEDKEY
)
?
1
:
0
;
BL_reg
(
&
context
)
=
bScan
;
SI_reg
(
&
context
)
=
LOWORD
(
dwExtraInfo
);
DI_reg
(
&
context
)
=
HIWORD
(
dwExtraInfo
);
CallTo16RegisterShort
(
&
context
,
0
);
}
VOID
WINAPI
WIN16_KEYBOARD_Enable
(
FARPROC16
proc
,
LPBYTE
lpKeyState
)
{
LPKEYBD_EVENT_PROC
thunk
=
(
LPKEYBD_EVENT_PROC
)
THUNK_Alloc
(
proc
,
(
RELAY
)
KEYBOARD_CallKeybdEventProc
);
KEYBOARD_Enable
(
thunk
,
lpKeyState
);
}
/***********************************************************************
* KEYBOARD_Disable (KEYBOARD.3)
*/
VOID
WINAPI
KEYBOARD_Disable
(
VOID
)
{
THUNK_Free
(
(
FARPROC
)
DefKeybEventProc
);
DefKeybEventProc
=
NULL
;
pKeyStateTable
=
NULL
;
}
...
...
windows/mouse.c
View file @
24dd5d9e
...
...
@@ -5,7 +5,11 @@
*
*/
#include <string.h>
#include "debugtools.h"
#include "callback.h"
#include "builtin16.h"
#include "mouse.h"
#include "monitor.h"
#include "winuser.h"
...
...
@@ -42,14 +46,43 @@ WORD WINAPI MOUSE_Inquire(LPMOUSEINFO mouseInfo)
*/
VOID
WINAPI
MOUSE_Enable
(
LPMOUSE_EVENT_PROC
lpMouseEventProc
)
{
THUNK_Free
(
(
FARPROC
)
DefMouseEventProc
);
DefMouseEventProc
=
lpMouseEventProc
;
}
static
VOID
WINAPI
MOUSE_CallMouseEventProc
(
FARPROC16
proc
,
DWORD
dwFlags
,
DWORD
dx
,
DWORD
dy
,
DWORD
cButtons
,
DWORD
dwExtraInfo
)
{
CONTEXT86
context
;
memset
(
&
context
,
0
,
sizeof
(
context
)
);
CS_reg
(
&
context
)
=
SELECTOROF
(
proc
);
EIP_reg
(
&
context
)
=
OFFSETOF
(
proc
);
AX_reg
(
&
context
)
=
(
WORD
)
dwFlags
;
BX_reg
(
&
context
)
=
(
WORD
)
dx
;
CX_reg
(
&
context
)
=
(
WORD
)
dy
;
DX_reg
(
&
context
)
=
(
WORD
)
cButtons
;
SI_reg
(
&
context
)
=
LOWORD
(
dwExtraInfo
);
DI_reg
(
&
context
)
=
HIWORD
(
dwExtraInfo
);
CallTo16RegisterShort
(
&
context
,
0
);
}
VOID
WINAPI
WIN16_MOUSE_Enable
(
FARPROC16
proc
)
{
LPMOUSE_EVENT_PROC
thunk
=
(
LPMOUSE_EVENT_PROC
)
THUNK_Alloc
(
proc
,
(
RELAY
)
MOUSE_CallMouseEventProc
);
MOUSE_Enable
(
thunk
);
}
/***********************************************************************
* MOUSE_Disable (MOUSE.3)
*/
VOID
WINAPI
MOUSE_Disable
(
VOID
)
{
THUNK_Free
(
(
FARPROC
)
DefMouseEventProc
);
DefMouseEventProc
=
0
;
}
...
...
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