Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c4e6d162
Commit
c4e6d162
authored
May 06, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
May 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Factor GetKeyboardLayoutNameW implementations.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7a94687f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
36 deletions
+17
-36
driver.c
dlls/user32/driver.c
+0
-13
input.c
dlls/user32/input.c
+16
-4
user_private.h
dlls/user32/user_private.h
+0
-1
keyboard.c
dlls/winemac.drv/keyboard.c
+0
-15
winemac.drv.spec
dlls/winemac.drv/winemac.drv.spec
+0
-1
keyboard.c
dlls/winex11.drv/keyboard.c
+1
-1
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+0
-1
No files found.
dlls/user32/driver.c
View file @
c4e6d162
...
...
@@ -109,7 +109,6 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC
(
Beep
);
GET_USER_FUNC
(
GetKeyNameText
);
GET_USER_FUNC
(
GetKeyboardLayoutList
);
GET_USER_FUNC
(
GetKeyboardLayoutName
);
GET_USER_FUNC
(
LoadKeyboardLayout
);
GET_USER_FUNC
(
MapVirtualKeyEx
);
GET_USER_FUNC
(
RegisterHotKey
);
...
...
@@ -205,11 +204,6 @@ static INT CDECL nulldrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
return
-
1
;
/* use default implementation */
}
static
BOOL
CDECL
nulldrv_GetKeyboardLayoutName
(
LPWSTR
name
)
{
return
FALSE
;
}
static
HKL
CDECL
nulldrv_LoadKeyboardLayout
(
LPCWSTR
name
,
UINT
flags
)
{
return
0
;
...
...
@@ -422,7 +416,6 @@ static USER_DRIVER null_driver =
nulldrv_Beep
,
nulldrv_GetKeyNameText
,
nulldrv_GetKeyboardLayoutList
,
nulldrv_GetKeyboardLayoutName
,
nulldrv_LoadKeyboardLayout
,
nulldrv_MapVirtualKeyEx
,
nulldrv_RegisterHotKey
,
...
...
@@ -500,11 +493,6 @@ static UINT CDECL loaderdrv_GetKeyboardLayoutList( INT size, HKL *layouts )
return
load_driver
()
->
pGetKeyboardLayoutList
(
size
,
layouts
);
}
static
BOOL
CDECL
loaderdrv_GetKeyboardLayoutName
(
LPWSTR
name
)
{
return
load_driver
()
->
pGetKeyboardLayoutName
(
name
);
}
static
HKL
CDECL
loaderdrv_LoadKeyboardLayout
(
LPCWSTR
name
,
UINT
flags
)
{
return
load_driver
()
->
pLoadKeyboardLayout
(
name
,
flags
);
...
...
@@ -631,7 +619,6 @@ static USER_DRIVER lazy_load_driver =
loaderdrv_Beep
,
loaderdrv_GetKeyNameText
,
loaderdrv_GetKeyboardLayoutList
,
loaderdrv_GetKeyboardLayoutName
,
loaderdrv_LoadKeyboardLayout
,
loaderdrv_MapVirtualKeyEx
,
loaderdrv_RegisterHotKey
,
...
...
dlls/user32/input.c
View file @
c4e6d162
...
...
@@ -1108,14 +1108,26 @@ BOOL WINAPI GetKeyboardLayoutNameA(LPSTR pszKLID)
/****************************************************************************
* GetKeyboardLayoutNameW (USER32.@)
*/
BOOL
WINAPI
GetKeyboardLayoutNameW
(
LPWSTR
pwszKLID
)
BOOL
WINAPI
GetKeyboardLayoutNameW
(
WCHAR
*
name
)
{
if
(
!
pwszKLID
)
DWORD
tmp
;
HKL
layout
;
TRACE_
(
keyboard
)(
"name %p
\n
"
,
name
);
if
(
!
name
)
{
SetLastError
(
ERROR_NOACCESS
);
SetLastError
(
ERROR_NOACCESS
);
return
FALSE
;
}
return
USER_Driver
->
pGetKeyboardLayoutName
(
pwszKLID
);
layout
=
GetKeyboardLayout
(
0
);
tmp
=
HandleToUlong
(
layout
);
if
(
HIWORD
(
tmp
)
==
LOWORD
(
tmp
))
tmp
=
LOWORD
(
tmp
);
swprintf
(
name
,
KL_NAMELENGTH
,
L"%08X"
,
tmp
);
TRACE_
(
keyboard
)(
"ret %s
\n
"
,
debugstr_w
(
name
)
);
return
TRUE
;
}
/****************************************************************************
...
...
dlls/user32/user_private.h
View file @
c4e6d162
...
...
@@ -66,7 +66,6 @@ typedef struct tagUSER_DRIVER {
void
(
CDECL
*
pBeep
)(
void
);
INT
(
CDECL
*
pGetKeyNameText
)(
LONG
,
LPWSTR
,
INT
);
UINT
(
CDECL
*
pGetKeyboardLayoutList
)(
INT
,
HKL
*
);
BOOL
(
CDECL
*
pGetKeyboardLayoutName
)(
LPWSTR
);
HKL
(
CDECL
*
pLoadKeyboardLayout
)(
LPCWSTR
,
UINT
);
UINT
(
CDECL
*
pMapVirtualKeyEx
)(
UINT
,
UINT
,
HKL
);
BOOL
(
CDECL
*
pRegisterHotKey
)(
HWND
,
UINT
,
UINT
);
...
...
dlls/winemac.drv/keyboard.c
View file @
c4e6d162
...
...
@@ -1327,21 +1327,6 @@ UINT CDECL macdrv_GetKeyboardLayoutList(INT size, HKL *list)
return
count
;
}
/***********************************************************************
* GetKeyboardLayoutName (MACDRV.@)
*/
BOOL
CDECL
macdrv_GetKeyboardLayoutName
(
LPWSTR
name
)
{
static
const
WCHAR
formatW
[]
=
{
'%'
,
'0'
,
'8'
,
'x'
,
0
};
DWORD
layout
;
layout
=
HandleToUlong
(
GetKeyboardLayout
(
0
));
if
(
HIWORD
(
layout
)
==
LOWORD
(
layout
))
layout
=
LOWORD
(
layout
);
sprintfW
(
name
,
formatW
,
layout
);
TRACE
(
"returning %s
\n
"
,
debugstr_w
(
name
));
return
TRUE
;
}
/***********************************************************************
* MapVirtualKeyEx (MACDRV.@)
...
...
dlls/winemac.drv/winemac.drv.spec
View file @
c4e6d162
...
...
@@ -15,7 +15,6 @@
@ cdecl EnumDisplaySettingsEx(ptr long ptr long) macdrv_EnumDisplaySettingsEx
@ cdecl GetCursorPos(ptr) macdrv_GetCursorPos
@ cdecl GetKeyboardLayoutList(long ptr) macdrv_GetKeyboardLayoutList
@ cdecl GetKeyboardLayoutName(ptr) macdrv_GetKeyboardLayoutName
@ cdecl GetKeyNameText(long ptr long) macdrv_GetKeyNameText
@ cdecl MapVirtualKeyEx(long long long) macdrv_MapVirtualKeyEx
@ cdecl MsgWaitForMultipleObjectsEx(long ptr long long long) macdrv_MsgWaitForMultipleObjectsEx
...
...
dlls/winex11.drv/keyboard.c
View file @
c4e6d162
...
...
@@ -1566,7 +1566,7 @@ static HKL get_locale_kbd_layout(void)
/***********************************************************************
* GetKeyboardLayoutName (X11DRV.@)
*/
BOOL
CDECL
X11DRV_GetKeyboardLayoutName
(
LPWSTR
name
)
static
BOOL
CDECL
X11DRV_GetKeyboardLayoutName
(
LPWSTR
name
)
{
static
const
WCHAR
formatW
[]
=
{
'%'
,
'0'
,
'8'
,
'x'
,
0
};
DWORD
layout
;
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
c4e6d162
...
...
@@ -7,7 +7,6 @@
@ cdecl ActivateKeyboardLayout(long long) X11DRV_ActivateKeyboardLayout
@ cdecl Beep() X11DRV_Beep
@ cdecl GetKeyNameText(long ptr long) X11DRV_GetKeyNameText
@ cdecl GetKeyboardLayoutName(ptr) X11DRV_GetKeyboardLayoutName
@ cdecl LoadKeyboardLayout(wstr long) X11DRV_LoadKeyboardLayout
@ cdecl MapVirtualKeyEx(long long long) X11DRV_MapVirtualKeyEx
@ cdecl ToUnicodeEx(long long ptr ptr long long long) X11DRV_ToUnicodeEx
...
...
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