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
8ed99016
Commit
8ed99016
authored
Jun 01, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Use unixlib interface for IME calls.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
340d1b7a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
10 deletions
+42
-10
ime.c
dlls/winemac.drv/ime.c
+9
-2
keyboard.c
dlls/winemac.drv/keyboard.c
+11
-6
macdrv.h
dlls/winemac.drv/macdrv.h
+1
-2
macdrv_main.c
dlls/winemac.drv/macdrv_main.c
+8
-0
unixlib.h
dlls/winemac.drv/unixlib.h
+13
-0
No files found.
dlls/winemac.drv/ime.c
View file @
8ed99016
...
...
@@ -577,7 +577,7 @@ BOOL WINAPI ImeProcessKey(HIMC hIMC, UINT vKey, LPARAM lKeyData, const LPBYTE lp
return
FALSE
;
}
inIME
=
macdrv_using_input_method
(
);
inIME
=
MACDRV_CALL
(
ime_using_input_method
,
NULL
);
lpIMC
=
LockRealIMC
(
hIMC
);
if
(
lpIMC
)
{
...
...
@@ -658,6 +658,7 @@ BOOL WINAPI ImeSetActiveContext(HIMC hIMC, BOOL fFlag)
UINT
WINAPI
ImeToAsciiEx
(
UINT
uVKey
,
UINT
uScanCode
,
const
LPBYTE
lpbKeyState
,
LPDWORD
lpdwTransKey
,
UINT
fuState
,
HIMC
hIMC
)
{
struct
process_text_input_params
params
;
UINT
vkey
;
LPINPUTCONTEXT
lpIMC
;
LPIMEPRIVATE
myPrivate
;
...
...
@@ -690,7 +691,13 @@ UINT WINAPI ImeToAsciiEx(UINT uVKey, UINT uScanCode, const LPBYTE lpbKeyState,
UnlockRealIMC
(
hIMC
);
TRACE
(
"Processing Mac 0x%04x
\n
"
,
vkey
);
macdrv_process_text_input
(
uVKey
,
uScanCode
,
repeat
,
lpbKeyState
,
hIMC
,
&
done
);
params
.
vkey
=
uVKey
;
params
.
scan
=
uScanCode
;
params
.
repeat
=
repeat
;
params
.
key_state
=
lpbKeyState
;
params
.
himc
=
hIMC
;
params
.
done
=
&
done
;
MACDRV_CALL
(
ime_process_text_input
,
&
params
);
while
(
!
done
)
MsgWaitForMultipleObjectsEx
(
0
,
NULL
,
INFINITE
,
QS_POSTMESSAGE
|
QS_SENDMESSAGE
,
0
);
...
...
dlls/winemac.drv/keyboard.c
View file @
8ed99016
...
...
@@ -1187,13 +1187,16 @@ void macdrv_hotkey_press(const macdrv_event *event)
/***********************************************************************
* macdrv_process_text_input
*/
void
macdrv_process_text_input
(
UINT
vkey
,
UINT
scan
,
UINT
repeat
,
const
BYTE
*
key_state
,
void
*
himc
,
int
*
done
)
NTSTATUS
macdrv_ime_process_text_input
(
void
*
arg
)
{
struct
process_text_input_params
*
params
=
arg
;
struct
macdrv_thread_data
*
thread_data
=
macdrv_thread_data
();
const
BYTE
*
key_state
=
params
->
key_state
;
unsigned
int
flags
;
int
keyc
;
TRACE
(
"vkey 0x%04x scan 0x%04x repeat %u himc %p
\n
"
,
vkey
,
scan
,
repeat
,
himc
);
TRACE
(
"vkey 0x%04x scan 0x%04x repeat %u himc %p
\n
"
,
params
->
vkey
,
params
->
scan
,
params
->
repeat
,
params
->
himc
);
flags
=
thread_data
->
last_modifiers
;
if
(
key_state
[
VK_SHIFT
]
&
0x80
)
...
...
@@ -1215,17 +1218,19 @@ void macdrv_process_text_input(UINT vkey, UINT scan, UINT repeat, const BYTE *ke
/* Find the Mac keycode corresponding to the scan code */
for
(
keyc
=
0
;
keyc
<
ARRAY_SIZE
(
thread_data
->
keyc2vkey
);
keyc
++
)
if
(
thread_data
->
keyc2vkey
[
keyc
]
==
vkey
)
break
;
if
(
thread_data
->
keyc2vkey
[
keyc
]
==
params
->
vkey
)
break
;
if
(
keyc
>=
ARRAY_SIZE
(
thread_data
->
keyc2vkey
))
{
*
done
=
-
1
;
return
;
*
params
->
done
=
-
1
;
return
0
;
}
TRACE
(
"flags 0x%08x keyc 0x%04x
\n
"
,
flags
,
keyc
);
macdrv_send_text_input_event
(((
scan
&
0x8000
)
==
0
),
flags
,
repeat
,
keyc
,
himc
,
done
);
macdrv_send_text_input_event
(((
params
->
scan
&
0x8000
)
==
0
),
flags
,
params
->
repeat
,
keyc
,
params
->
himc
,
params
->
done
);
return
0
;
}
...
...
dlls/winemac.drv/macdrv.h
View file @
8ed99016
...
...
@@ -287,8 +287,7 @@ extern NTSTATUS macdrv_init(void *arg) DECLSPEC_HIDDEN;
* Mac IME driver
*/
extern
void
macdrv_process_text_input
(
UINT
vkey
,
UINT
scan
,
UINT
repeat
,
const
BYTE
*
key_state
,
void
*
himc
,
int
*
done
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
macdrv_ime_process_text_input
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_im_set_text
(
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_sent_text_input
(
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
...
...
dlls/winemac.drv/macdrv_main.c
View file @
8ed99016
...
...
@@ -607,8 +607,16 @@ BOOL macdrv_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param,
}
static
NTSTATUS
macdrv_ime_using_input_method
(
void
*
arg
)
{
return
macdrv_using_input_method
();
}
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
macdrv_ime_process_text_input
,
macdrv_ime_using_input_method
,
macdrv_init
,
macdrv_notify_icon
,
};
...
...
dlls/winemac.drv/unixlib.h
View file @
8ed99016
...
...
@@ -21,6 +21,8 @@
enum
macdrv_funcs
{
unix_ime_process_text_input
,
unix_ime_using_input_method
,
unix_init
,
unix_notify_icon
,
unix_funcs_count
...
...
@@ -30,6 +32,17 @@ enum macdrv_funcs
extern
NTSTATUS
unix_call
(
enum
macdrv_funcs
code
,
void
*
params
)
DECLSPEC_HIDDEN
;
#define MACDRV_CALL(func, params) unix_call( unix_ ## func, params )
/* macdrv_ime_process_text_input params */
struct
process_text_input_params
{
UINT
vkey
;
UINT
scan
;
UINT
repeat
;
const
BYTE
*
key_state
;
void
*
himc
;
int
*
done
;
};
/* macdrv_init params */
struct
localized_string
{
...
...
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