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
8091922d
Commit
8091922d
authored
May 26, 2020
by
Arkadiusz Hiler
Committed by
Alexandre Julliard
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Move *RegisterDeviceNotification*() to input.c.
Signed-off-by:
Arkadiusz Hiler
<
arek@hiler.eu
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6a05b84e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
69 deletions
+69
-69
input.c
dlls/user32/input.c
+69
-0
misc.c
dlls/user32/misc.c
+0
-69
No files found.
dlls/user32/input.c
View file @
8091922d
...
...
@@ -45,6 +45,7 @@
#include "winerror.h"
#include "win.h"
#include "user_private.h"
#include "dbt.h"
#include "wine/server.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -1298,3 +1299,71 @@ BOOL WINAPI EnableMouseInPointer(BOOL enable)
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
static
DWORD
CALLBACK
devnotify_window_callback
(
HANDLE
handle
,
DWORD
flags
,
DEV_BROADCAST_HDR
*
header
)
{
SendMessageTimeoutW
(
handle
,
WM_DEVICECHANGE
,
flags
,
(
LPARAM
)
header
,
SMTO_ABORTIFHUNG
,
2000
,
NULL
);
return
0
;
}
static
DWORD
CALLBACK
devnotify_service_callback
(
HANDLE
handle
,
DWORD
flags
,
DEV_BROADCAST_HDR
*
header
)
{
FIXME
(
"Support for service handles is not yet implemented!
\n
"
);
return
0
;
}
struct
device_notification_details
{
DWORD
(
CALLBACK
*
cb
)(
HANDLE
handle
,
DWORD
flags
,
DEV_BROADCAST_HDR
*
header
);
HANDLE
handle
;
};
extern
HDEVNOTIFY
WINAPI
I_ScRegisterDeviceNotification
(
struct
device_notification_details
*
details
,
void
*
filter
,
DWORD
flags
);
extern
BOOL
WINAPI
I_ScUnregisterDeviceNotification
(
HDEVNOTIFY
handle
);
/***********************************************************************
* RegisterDeviceNotificationA (USER32.@)
*
* See RegisterDeviceNotificationW.
*/
HDEVNOTIFY
WINAPI
RegisterDeviceNotificationA
(
HANDLE
hRecipient
,
LPVOID
pNotificationFilter
,
DWORD
dwFlags
)
{
TRACE
(
"(hwnd=%p, filter=%p,flags=0x%08x)
\n
"
,
hRecipient
,
pNotificationFilter
,
dwFlags
);
if
(
pNotificationFilter
)
FIXME
(
"The notification filter will requires an A->W when filter support is implemented
\n
"
);
return
RegisterDeviceNotificationW
(
hRecipient
,
pNotificationFilter
,
dwFlags
);
}
/***********************************************************************
* RegisterDeviceNotificationW (USER32.@)
*/
HDEVNOTIFY
WINAPI
RegisterDeviceNotificationW
(
HANDLE
handle
,
void
*
filter
,
DWORD
flags
)
{
struct
device_notification_details
details
;
TRACE
(
"handle %p, filter %p, flags %#x
\n
"
,
handle
,
filter
,
flags
);
if
(
flags
&
~
(
DEVICE_NOTIFY_SERVICE_HANDLE
|
DEVICE_NOTIFY_ALL_INTERFACE_CLASSES
))
FIXME
(
"unhandled flags %#x
\n
"
,
flags
);
details
.
handle
=
handle
;
if
(
flags
&
DEVICE_NOTIFY_SERVICE_HANDLE
)
details
.
cb
=
devnotify_service_callback
;
else
details
.
cb
=
devnotify_window_callback
;
return
I_ScRegisterDeviceNotification
(
&
details
,
filter
,
0
);
}
/***********************************************************************
* UnregisterDeviceNotification (USER32.@)
*/
BOOL
WINAPI
UnregisterDeviceNotification
(
HDEVNOTIFY
handle
)
{
TRACE
(
"%p
\n
"
,
handle
);
return
I_ScUnregisterDeviceNotification
(
handle
);
}
dlls/user32/misc.c
View file @
8091922d
...
...
@@ -31,7 +31,6 @@
#include "wingdi.h"
#include "controls.h"
#include "user_private.h"
#include "dbt.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -279,74 +278,6 @@ DWORD WINAPI RegisterTasklist (DWORD x)
return
TRUE
;
}
static
DWORD
CALLBACK
devnotify_window_callback
(
HANDLE
handle
,
DWORD
flags
,
DEV_BROADCAST_HDR
*
header
)
{
SendMessageTimeoutW
(
handle
,
WM_DEVICECHANGE
,
flags
,
(
LPARAM
)
header
,
SMTO_ABORTIFHUNG
,
2000
,
NULL
);
return
0
;
}
static
DWORD
CALLBACK
devnotify_service_callback
(
HANDLE
handle
,
DWORD
flags
,
DEV_BROADCAST_HDR
*
header
)
{
FIXME
(
"Support for service handles is not yet implemented!
\n
"
);
return
0
;
}
struct
device_notification_details
{
DWORD
(
CALLBACK
*
cb
)(
HANDLE
handle
,
DWORD
flags
,
DEV_BROADCAST_HDR
*
header
);
HANDLE
handle
;
};
extern
HDEVNOTIFY
WINAPI
I_ScRegisterDeviceNotification
(
struct
device_notification_details
*
details
,
void
*
filter
,
DWORD
flags
);
extern
BOOL
WINAPI
I_ScUnregisterDeviceNotification
(
HDEVNOTIFY
handle
);
/***********************************************************************
* RegisterDeviceNotificationA (USER32.@)
*
* See RegisterDeviceNotificationW.
*/
HDEVNOTIFY
WINAPI
RegisterDeviceNotificationA
(
HANDLE
hRecipient
,
LPVOID
pNotificationFilter
,
DWORD
dwFlags
)
{
TRACE
(
"(hwnd=%p, filter=%p,flags=0x%08x)
\n
"
,
hRecipient
,
pNotificationFilter
,
dwFlags
);
if
(
pNotificationFilter
)
FIXME
(
"The notification filter will requires an A->W when filter support is implemented
\n
"
);
return
RegisterDeviceNotificationW
(
hRecipient
,
pNotificationFilter
,
dwFlags
);
}
/***********************************************************************
* RegisterDeviceNotificationW (USER32.@)
*/
HDEVNOTIFY
WINAPI
RegisterDeviceNotificationW
(
HANDLE
handle
,
void
*
filter
,
DWORD
flags
)
{
struct
device_notification_details
details
;
TRACE
(
"handle %p, filter %p, flags %#x
\n
"
,
handle
,
filter
,
flags
);
if
(
flags
&
~
(
DEVICE_NOTIFY_SERVICE_HANDLE
|
DEVICE_NOTIFY_ALL_INTERFACE_CLASSES
))
FIXME
(
"unhandled flags %#x
\n
"
,
flags
);
details
.
handle
=
handle
;
if
(
flags
&
DEVICE_NOTIFY_SERVICE_HANDLE
)
details
.
cb
=
devnotify_service_callback
;
else
details
.
cb
=
devnotify_window_callback
;
return
I_ScRegisterDeviceNotification
(
&
details
,
filter
,
0
);
}
/***********************************************************************
* UnregisterDeviceNotification (USER32.@)
*/
BOOL
WINAPI
UnregisterDeviceNotification
(
HDEVNOTIFY
handle
)
{
TRACE
(
"%p
\n
"
,
handle
);
return
I_ScUnregisterDeviceNotification
(
handle
);
}
/***********************************************************************
* GetAppCompatFlags (USER32.@)
*/
...
...
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