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
f9037de2
Commit
f9037de2
authored
Jun 25, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented SendInput().
parent
8d7b7d83
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
49 deletions
+75
-49
user.spec
dlls/user/user.spec
+2
-2
user32.spec
dlls/user/user32.spec
+1
-0
winuser.h
include/winuser.h
+54
-15
x11drv.h
include/x11drv.h
+1
-1
input.c
windows/input.c
+0
-0
event.c
windows/x11drv/event.c
+12
-26
mouse.c
windows/x11drv/mouse.c
+5
-5
No files found.
dlls/user/user.spec
View file @
f9037de2
...
...
@@ -298,13 +298,13 @@ rsrc resources/version16.res
286 pascal16 GetDesktopWindow() GetDesktopWindow16
287 pascal16 GetLastActivePopup(word) GetLastActivePopup16
288 pascal GetMessageExtraInfo() GetMessageExtraInfo
289 register keybd_event()
WIN16_keybd_event
289 register keybd_event()
keybd_event16
290 pascal16 RedrawWindow(word ptr word word) RedrawWindow16
291 pascal SetWindowsHookEx(s_word segptr word word) SetWindowsHookEx16
292 pascal16 UnhookWindowsHookEx(segptr) UnhookWindowsHookEx16
293 pascal CallNextHookEx(segptr s_word word long) CallNextHookEx16
294 pascal16 LockWindowUpdate(word) LockWindowUpdate16
299 register mouse_event()
WIN16_mouse_event
299 register mouse_event()
mouse_event16
300 stub UnloadInstalledDrivers # W1.1: USER_FARFRAME
301 stub EDITWNDPROC # BOZOSLIVEHERE :-))
302 stub STATICWNDPROC
...
...
dlls/user/user32.spec
View file @
f9037de2
...
...
@@ -662,6 +662,7 @@ debug_channels (accel caret class clipboard combo cursor dc dde ddeml dialog dri
@ stdcall GetWindowModuleFileNameA(long ptr long) GetWindowModuleFileNameA
@ stdcall GetWindowModuleFileNameW(long ptr long) GetWindowModuleFileNameW
@ stdcall LockSetForegroundWindow (long) LockSetForegroundWindow
@ stdcall SendInput(long ptr long) SendInput
################################################################
# Wine extensions: Win16 functions that are needed by other dlls
...
...
include/winuser.h
View file @
f9037de2
...
...
@@ -147,6 +147,48 @@ typedef struct
#define KL_NAMELENGTH 9
typedef
struct
tagMOUSEINPUT
{
LONG
dx
;
LONG
dy
;
DWORD
mouseData
;
DWORD
dwFlags
;
DWORD
time
;
ULONG_PTR
dwExtraInfo
;
}
MOUSEINPUT
,
*
PMOUSEINPUT
,
*
LPMOUSEINPUT
;
typedef
struct
tagKEYBDINPUT
{
WORD
wVk
;
WORD
wScan
;
DWORD
dwFlags
;
DWORD
time
;
ULONG_PTR
dwExtraInfo
;
}
KEYBDINPUT
,
*
PKEYBDINPUT
,
*
LPKEYBDINPUT
;
typedef
struct
tagHARDWAREINPUT
{
DWORD
uMsg
;
WORD
wParamL
;
WORD
wParamH
;
}
HARDWAREINPUT
,
*
PHARDWAREINPUT
,
*
LPHARDWAREINPUT
;
#define INPUT_MOUSE 0
#define INPUT_KEYBOARD 1
#define INPUT_HARDWARE 2
typedef
struct
tagINPUT
{
DWORD
type
;
union
{
MOUSEINPUT
mi
;
KEYBDINPUT
ki
;
HARDWAREINPUT
hi
;
}
DUMMYUNIONNAME
;
}
INPUT
,
*
PINPUT
,
*
LPINPUT
;
/***** Dialogs *****/
/* Gcc on Solaris has a version of this that we don't care about */
#undef FSHIFT
...
...
@@ -3749,29 +3791,26 @@ BOOL WINAPI RemoveMenu(HMENU,UINT,UINT);
HANDLE
WINAPI
RemovePropA
(
HWND
,
LPCSTR
);
HANDLE
WINAPI
RemovePropW
(
HWND
,
LPCWSTR
);
#define RemoveProp WINELIB_NAME_AW(RemoveProp)
BOOL
WINAPI
ReplyMessage
(
LRESULT
);
BOOL
WINAPI
ScreenToClient
(
HWND
,
LPPOINT
);
BOOL
WINAPI
ReplyMessage
(
LRESULT
);
BOOL
WINAPI
ScreenToClient
(
HWND
,
LPPOINT
);
VOID
WINAPI
ScrollChildren
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
BOOL
WINAPI
ScrollDC
(
HDC
,
INT
,
INT
,
const
RECT
*
,
const
RECT
*
,
HRGN
,
LPRECT
);
BOOL
WINAPI
ScrollWindow
(
HWND
,
INT
,
INT
,
const
RECT
*
,
const
RECT
*
);
INT
WINAPI
ScrollWindowEx
(
HWND
,
INT
,
INT
,
const
RECT
*
,
const
RECT
*
,
HRGN
,
LPRECT
,
UINT
);
BOOL
WINAPI
ScrollDC
(
HDC
,
INT
,
INT
,
const
RECT
*
,
const
RECT
*
,
HRGN
,
LPRECT
);
BOOL
WINAPI
ScrollWindow
(
HWND
,
INT
,
INT
,
const
RECT
*
,
const
RECT
*
);
INT
WINAPI
ScrollWindowEx
(
HWND
,
INT
,
INT
,
const
RECT
*
,
const
RECT
*
,
HRGN
,
LPRECT
,
UINT
);
LRESULT
WINAPI
SendDlgItemMessageA
(
HWND
,
INT
,
UINT
,
WPARAM
,
LPARAM
);
LRESULT
WINAPI
SendDlgItemMessageW
(
HWND
,
INT
,
UINT
,
WPARAM
,
LPARAM
);
#define SendDlgItemMessage WINELIB_NAME_AW(SendDlgItemMessage)
UINT
WINAPI
SendInput
(
UINT
,
LPINPUT
,
int
);
LRESULT
WINAPI
SendMessageA
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
LRESULT
WINAPI
SendMessageW
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
#define SendMessage WINELIB_NAME_AW(SendMessage)
LRESULT
WINAPI
SendMessageTimeoutA
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
UINT
,
UINT
,
LPDWORD
);
LRESULT
WINAPI
SendMessageTimeoutW
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
UINT
,
UINT
,
LPDWORD
);
LRESULT
WINAPI
SendMessageTimeoutA
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
UINT
,
UINT
,
LPDWORD
);
LRESULT
WINAPI
SendMessageTimeoutW
(
HWND
,
UINT
,
WPARAM
,
LPARAM
,
UINT
,
UINT
,
LPDWORD
);
#define SendMessageTimeout WINELIB_NAME_AW(SendMessageTimeout)
HWND
WINAPI
SetActiveWindow
(
HWND
);
HWND
WINAPI
SetCapture
(
HWND
);
BOOL
WINAPI
SetCaretBlinkTime
(
UINT
);
BOOL
WINAPI
SetCaretPos
(
INT
,
INT
);
HWND
WINAPI
SetActiveWindow
(
HWND
);
HWND
WINAPI
SetCapture
(
HWND
);
BOOL
WINAPI
SetCaretBlinkTime
(
UINT
);
BOOL
WINAPI
SetCaretPos
(
INT
,
INT
);
LONG
WINAPI
SetClassLongA
(
HWND
,
INT
,
LONG
);
LONG
WINAPI
SetClassLongW
(
HWND
,
INT
,
LONG
);
#define SetClassLong WINELIB_NAME_AW(SetClassLong)
...
...
include/x11drv.h
View file @
f9037de2
...
...
@@ -387,7 +387,7 @@ extern void X11DRV_InitMouse(LPMOUSE_EVENT_PROC);
extern
void
X11DRV_SetCursor
(
struct
tagCURSORICONINFO
*
lpCursor
);
extern
void
X11DRV_MoveCursor
(
WORD
wAbsX
,
WORD
wAbsY
);
extern
void
X11DRV_SendEvent
(
DWORD
mouseStatus
,
DWORD
posX
,
DWORD
posY
,
DWORD
keyState
,
DWORD
time
,
HWND
hWnd
);
WORD
keyState
,
DWORD
data
,
DWORD
time
,
HWND
hWnd
);
/* X11 windows driver */
...
...
windows/input.c
View file @
f9037de2
This diff is collapsed.
Click to expand it.
windows/x11drv/event.c
View file @
f9037de2
...
...
@@ -31,7 +31,6 @@
#include "message.h"
#include "mouse.h"
#include "options.h"
#include "queue.h"
#include "win.h"
#include "winpos.h"
#include "file.h"
...
...
@@ -292,21 +291,8 @@ static void EVENT_ProcessEvent( XEvent *event )
case
ButtonRelease
:
EVENT_ButtonRelease
(
hWnd
,
(
XButtonEvent
*
)
event
);
break
;
case
MotionNotify
:
/* Wine between two fast machines across the overloaded campus
ethernet gets very boged down in MotionEvents. The following
simply finds the last motion event in the queue and drops
the rest. On a good link events are servered before they build
up so this doesn't take place. On a slow link this may cause
problems if the event order is important. I'm not yet seen
of any problems. Jon 7/6/96.
*/
if
((
current_input_type
==
X11DRV_INPUT_ABSOLUTE
)
&&
(
in_transition
==
FALSE
))
/* Only cumulate events if in absolute mode */
while
(
TSXCheckTypedWindowEvent
(
display
,((
XAnyEvent
*
)
event
)
->
window
,
MotionNotify
,
event
));
EVENT_MotionNotify
(
hWnd
,
(
XMotionEvent
*
)
event
);
break
;
...
...
@@ -439,14 +425,14 @@ static void EVENT_MotionNotify( HWND hWnd, XMotionEvent *event )
{
get_coords
(
&
hWnd
,
event
->
window
,
event
->
x
,
event
->
y
,
&
pt
);
X11DRV_SendEvent
(
MOUSEEVENTF_MOVE
|
MOUSEEVENTF_ABSOLUTE
,
pt
.
x
,
pt
.
y
,
X11DRV_EVENT_XStateToKeyState
(
event
->
state
),
X11DRV_EVENT_XStateToKeyState
(
event
->
state
),
0
,
event
->
time
-
X11DRV_server_startticks
,
hWnd
);
}
else
{
X11DRV_SendEvent
(
MOUSEEVENTF_MOVE
,
event
->
x_root
,
event
->
y_root
,
X11DRV_EVENT_XStateToKeyState
(
event
->
state
),
X11DRV_EVENT_XStateToKeyState
(
event
->
state
),
0
,
event
->
time
-
X11DRV_server_startticks
,
hWnd
);
}
}
...
...
@@ -495,8 +481,7 @@ static void EVENT_ButtonPress( HWND hWnd, XButtonEvent *event )
}
X11DRV_SendEvent
(
statusCodes
[
buttonNum
],
pt
.
x
,
pt
.
y
,
MAKEWPARAM
(
keystate
,
wData
),
event
->
time
-
X11DRV_server_startticks
,
hWnd
);
keystate
,
wData
,
event
->
time
-
X11DRV_server_startticks
,
hWnd
);
}
...
...
@@ -537,7 +522,7 @@ static void EVENT_ButtonRelease( HWND hWnd, XButtonEvent *event )
return
;
}
X11DRV_SendEvent
(
statusCodes
[
buttonNum
],
pt
.
x
,
pt
.
y
,
keystate
,
event
->
time
-
X11DRV_server_startticks
,
hWnd
);
keystate
,
0
,
event
->
time
-
X11DRV_server_startticks
,
hWnd
);
}
...
...
@@ -1523,10 +1508,9 @@ void X11DRV_EVENT_SetDGAStatus(HWND hwnd, int event_base)
/* DGA2 event handlers */
static
void
EVENT_DGAMotionEvent
(
XDGAMotionEvent
*
event
)
{
X11DRV_SendEvent
(
MOUSEEVENTF_MOVE
,
event
->
dx
,
event
->
dy
,
X11DRV_EVENT_XStateToKeyState
(
event
->
state
),
event
->
time
-
X11DRV_server_startticks
,
DGAhwnd
);
X11DRV_SendEvent
(
MOUSEEVENTF_MOVE
,
event
->
dx
,
event
->
dy
,
X11DRV_EVENT_XStateToKeyState
(
event
->
state
),
0
,
event
->
time
-
X11DRV_server_startticks
,
DGAhwnd
);
}
static
void
EVENT_DGAButtonPressEvent
(
XDGAButtonEvent
*
event
)
...
...
@@ -1554,7 +1538,8 @@ static void EVENT_DGAButtonPressEvent( XDGAButtonEvent *event )
break
;
}
X11DRV_SendEvent
(
statusCodes
[
buttonNum
],
0
,
0
,
keystate
,
event
->
time
-
X11DRV_server_startticks
,
DGAhwnd
);
X11DRV_SendEvent
(
statusCodes
[
buttonNum
],
0
,
0
,
keystate
,
0
,
event
->
time
-
X11DRV_server_startticks
,
DGAhwnd
);
}
static
void
EVENT_DGAButtonReleaseEvent
(
XDGAButtonEvent
*
event
)
...
...
@@ -1582,7 +1567,8 @@ static void EVENT_DGAButtonReleaseEvent( XDGAButtonEvent *event )
break
;
}
X11DRV_SendEvent
(
statusCodes
[
buttonNum
],
0
,
0
,
keystate
,
event
->
time
-
X11DRV_server_startticks
,
DGAhwnd
);
X11DRV_SendEvent
(
statusCodes
[
buttonNum
],
0
,
0
,
keystate
,
0
,
event
->
time
-
X11DRV_server_startticks
,
DGAhwnd
);
}
#endif
windows/x11drv/mouse.c
View file @
f9037de2
...
...
@@ -280,8 +280,8 @@ void X11DRV_InitMouse( LPMOUSE_EVENT_PROC proc )
TSXQueryPointer
(
thread_display
(),
root_window
,
&
root
,
&
child
,
&
root_x
,
&
root_y
,
&
child_x
,
&
child_y
,
&
KeyState
);
X11DRV_SendEvent
(
MOUSEEVENTF_MOVE
|
MOUSEEVENTF_ABSOLUTE
,
root_x
,
root_y
,
X11DRV_EVENT_XStateToKeyState
(
KeyState
),
GetTickCount
(),
0
);
root_x
,
root_y
,
X11DRV_EVENT_XStateToKeyState
(
KeyState
),
0
,
GetTickCount
(),
0
);
}
}
...
...
@@ -289,8 +289,8 @@ void X11DRV_InitMouse( LPMOUSE_EVENT_PROC proc )
/***********************************************************************
* X11DRV_SendEvent (internal)
*/
void
X11DRV_SendEvent
(
DWORD
mouseStatus
,
DWORD
posX
,
DWORD
posY
,
DWORD
keyState
,
DWORD
time
,
HWND
hWnd
)
void
X11DRV_SendEvent
(
DWORD
mouseStatus
,
DWORD
posX
,
DWORD
posY
,
WORD
keyState
,
DWORD
data
,
DWORD
time
,
HWND
hWnd
)
{
int
width
=
GetSystemMetrics
(
SM_CXSCREEN
);
int
height
=
GetSystemMetrics
(
SM_CYSCREEN
);
...
...
@@ -318,7 +318,7 @@ void X11DRV_SendEvent( DWORD mouseStatus, DWORD posX, DWORD posY,
/* To avoid deadlocks, we have to suspend all locks on windows structures
before the program control is passed to the mouse driver */
iWndsLocks
=
WIN_SuspendWndsLock
();
DefMouseEventProc
(
mouseStatus
,
posX
,
posY
,
0
,
(
DWORD
)
&
wme
);
DefMouseEventProc
(
mouseStatus
,
posX
,
posY
,
data
,
(
DWORD
)
&
wme
);
WIN_RestoreWndsLock
(
iWndsLocks
);
InterlockedIncrement
(
&
X11DRV_MOUSE_WarpPointer
);
}
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