win32u: Move MessageBeep implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5d308b1606
commit
8c5befe49b
|
@ -119,10 +119,6 @@ void USER_unload_driver(void)
|
|||
* These are fallbacks for entry points that are not implemented in the real driver.
|
||||
*/
|
||||
|
||||
static void CDECL nulldrv_Beep(void)
|
||||
{
|
||||
}
|
||||
|
||||
static BOOL CDECL nulldrv_RegisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
|
||||
{
|
||||
return TRUE;
|
||||
|
@ -287,11 +283,6 @@ static void CDECL nulldrv_ThreadDetach( void )
|
|||
* Each entry point simply loads the real driver and chains to it.
|
||||
*/
|
||||
|
||||
static void CDECL loaderdrv_Beep(void)
|
||||
{
|
||||
load_driver()->pBeep();
|
||||
}
|
||||
|
||||
static BOOL CDECL loaderdrv_RegisterHotKey( HWND hwnd, UINT modifiers, UINT vk )
|
||||
{
|
||||
return load_driver()->pRegisterHotKey( hwnd, modifiers, vk );
|
||||
|
@ -369,7 +360,7 @@ static struct user_driver_funcs lazy_load_driver =
|
|||
{ NULL },
|
||||
/* keyboard functions */
|
||||
NULL,
|
||||
loaderdrv_Beep,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -436,7 +427,6 @@ void CDECL __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT v
|
|||
#define SET_USER_FUNC(name) \
|
||||
do { if (!driver->p##name) driver->p##name = nulldrv_##name; } while(0)
|
||||
|
||||
SET_USER_FUNC(Beep);
|
||||
SET_USER_FUNC(RegisterHotKey);
|
||||
SET_USER_FUNC(UnregisterHotKey);
|
||||
SET_USER_FUNC(DestroyCursorIcon);
|
||||
|
|
|
@ -4432,10 +4432,7 @@ BOOL WINAPI SetMessageQueue( INT size )
|
|||
*/
|
||||
BOOL WINAPI MessageBeep( UINT i )
|
||||
{
|
||||
BOOL active = TRUE;
|
||||
SystemParametersInfoA( SPI_GETBEEP, 0, &active, FALSE );
|
||||
if (active) USER_Driver->pBeep();
|
||||
return TRUE;
|
||||
return NtUserCallOneParam( i, NtUserMessageBeep );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -958,6 +958,11 @@ static BOOL CDECL loaderdrv_ActivateKeyboardLayout( HKL layout, UINT flags )
|
|||
return load_driver()->pActivateKeyboardLayout( layout, flags );
|
||||
}
|
||||
|
||||
static void CDECL loaderdrv_Beep(void)
|
||||
{
|
||||
load_driver()->pBeep();
|
||||
}
|
||||
|
||||
static INT CDECL loaderdrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
|
||||
{
|
||||
return load_driver()->pGetKeyNameText( lparam, buffer, size );
|
||||
|
@ -1033,22 +1038,30 @@ static const struct vulkan_funcs * CDECL loaderdrv_wine_get_vulkan_driver( UINT
|
|||
|
||||
static const struct user_driver_funcs lazy_load_driver =
|
||||
{
|
||||
/* keyboard functions */
|
||||
.pActivateKeyboardLayout = loaderdrv_ActivateKeyboardLayout,
|
||||
.pBeep = loaderdrv_Beep,
|
||||
.pGetKeyNameText = loaderdrv_GetKeyNameText,
|
||||
.pGetKeyboardLayoutList = loaderdrv_GetKeyboardLayoutList,
|
||||
.pMapVirtualKeyEx = loaderdrv_MapVirtualKeyEx,
|
||||
.pToUnicodeEx = loaderdrv_ToUnicodeEx,
|
||||
.pUnregisterHotKey = loaderdrv_UnregisterHotKey,
|
||||
.pVkKeyScanEx = loaderdrv_VkKeyScanEx,
|
||||
.pChangeDisplaySettingsEx = loaderdrv_ChangeDisplaySettingsEx,
|
||||
.pEnumDisplaySettingsEx = loaderdrv_EnumDisplaySettingsEx,
|
||||
.pUpdateDisplayDevices = loaderdrv_UpdateDisplayDevices,
|
||||
/* cursor/icon functions */
|
||||
.pSetCursor = loaderdrv_SetCursor,
|
||||
.pSetCursorPos = loaderdrv_SetCursorPos,
|
||||
.pClipCursor = loaderdrv_ClipCursor,
|
||||
/* clipboard functions */
|
||||
.pUpdateClipboard = loaderdrv_UpdateClipboard,
|
||||
/* display modes */
|
||||
.pChangeDisplaySettingsEx = loaderdrv_ChangeDisplaySettingsEx,
|
||||
.pEnumDisplaySettingsEx = loaderdrv_EnumDisplaySettingsEx,
|
||||
.pUpdateDisplayDevices = loaderdrv_UpdateDisplayDevices,
|
||||
/* windowing functions */
|
||||
.pScrollDC = nulldrv_ScrollDC,
|
||||
/* system parameters */
|
||||
.pSystemParametersInfo = nulldrv_SystemParametersInfo,
|
||||
/* vulkan support */
|
||||
.pwine_get_vulkan_driver = loaderdrv_wine_get_vulkan_driver,
|
||||
};
|
||||
|
||||
|
|
|
@ -4475,6 +4475,14 @@ ULONG WINAPI NtUserGetProcessDpiAwarenessContext( HANDLE process )
|
|||
return dpi_awareness;
|
||||
}
|
||||
|
||||
static BOOL message_beep( UINT i )
|
||||
{
|
||||
BOOL active = TRUE;
|
||||
NtUserSystemParametersInfo( SPI_GETBEEP, 0, &active, FALSE );
|
||||
if (active) user_driver->pBeep();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NtUserCallOneParam (win32u.@)
|
||||
*/
|
||||
|
@ -4496,6 +4504,8 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
|
|||
return get_system_metrics( arg );
|
||||
case NtUserGetDeskPattern:
|
||||
return get_entry( &entry_DESKPATTERN, 256, (WCHAR *)arg );
|
||||
case NtUserMessageBeep:
|
||||
return message_beep( arg );
|
||||
default:
|
||||
FIXME( "invalid code %u\n", code );
|
||||
return 0;
|
||||
|
|
|
@ -57,6 +57,7 @@ enum
|
|||
NtUserGetSysColorBrush,
|
||||
NtUserGetSysColorPen,
|
||||
NtUserGetSystemMetrics,
|
||||
NtUserMessageBeep,
|
||||
NtUserRealizePalette,
|
||||
/* temporary exports */
|
||||
NtUserGetDeskPattern,
|
||||
|
|
Loading…
Reference in New Issue