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
4c915453
Commit
4c915453
authored
May 09, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Use the default IME implementation for NotifyIME.
parent
800af36d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
163 deletions
+14
-163
event.c
dlls/winemac.drv/event.c
+10
-0
gdi.c
dlls/winemac.drv/gdi.c
+1
-0
ime.c
dlls/winemac.drv/ime.c
+2
-152
macdrv.h
dlls/winemac.drv/macdrv.h
+1
-0
macdrv_main.c
dlls/winemac.drv/macdrv_main.c
+0
-9
unixlib.h
dlls/winemac.drv/unixlib.h
+0
-1
winemac.drv.spec
dlls/winemac.drv/winemac.drv.spec
+0
-1
No files found.
dlls/winemac.drv/event.c
View file @
4c915453
...
...
@@ -357,6 +357,16 @@ BOOL query_ime_char_rect(macdrv_query* query)
/***********************************************************************
* NotifyIMEStatus (X11DRV.@)
*/
void
macdrv_NotifyIMEStatus
(
HWND
hwnd
,
UINT
status
)
{
TRACE_
(
imm
)(
"hwnd %p, status %#x
\n
"
,
hwnd
,
status
);
if
(
!
status
)
macdrv_clear_ime_text
();
}
/***********************************************************************
* macdrv_query_event
*
* Handler for QUERY_EVENT and QUERY_EVENT_NO_PREEMPT_WAIT queries.
...
...
dlls/winemac.drv/gdi.c
View file @
4c915453
...
...
@@ -302,6 +302,7 @@ static const struct user_driver_funcs macdrv_funcs =
.
pUpdateClipboard
=
macdrv_UpdateClipboard
,
.
pUpdateLayeredWindow
=
macdrv_UpdateLayeredWindow
,
.
pVkKeyScanEx
=
macdrv_VkKeyScanEx
,
.
pNotifyIMEStatus
=
macdrv_NotifyIMEStatus
,
.
pWindowMessage
=
macdrv_WindowMessage
,
.
pWindowPosChanged
=
macdrv_WindowPosChanged
,
.
pWindowPosChanging
=
macdrv_WindowPosChanging
,
...
...
dlls/winemac.drv/ime.c
View file @
4c915453
...
...
@@ -651,156 +651,6 @@ UINT WINAPI ImeToAsciiEx(UINT uVKey, UINT uScanCode, const LPBYTE lpbKeyState,
return
0
;
}
BOOL
WINAPI
NotifyIME
(
HIMC
hIMC
,
DWORD
dwAction
,
DWORD
dwIndex
,
DWORD
dwValue
)
{
BOOL
bRet
=
FALSE
;
LPINPUTCONTEXT
lpIMC
;
TRACE
(
"%p %li %li %li
\n
"
,
hIMC
,
dwAction
,
dwIndex
,
dwValue
);
lpIMC
=
LockRealIMC
(
hIMC
);
if
(
lpIMC
==
NULL
)
return
FALSE
;
switch
(
dwAction
)
{
case
NI_OPENCANDIDATE
:
FIXME
(
"NI_OPENCANDIDATE
\n
"
);
break
;
case
NI_CLOSECANDIDATE
:
FIXME
(
"NI_CLOSECANDIDATE
\n
"
);
break
;
case
NI_SELECTCANDIDATESTR
:
FIXME
(
"NI_SELECTCANDIDATESTR
\n
"
);
break
;
case
NI_CHANGECANDIDATELIST
:
FIXME
(
"NI_CHANGECANDIDATELIST
\n
"
);
break
;
case
NI_SETCANDIDATE_PAGESTART
:
FIXME
(
"NI_SETCANDIDATE_PAGESTART
\n
"
);
break
;
case
NI_SETCANDIDATE_PAGESIZE
:
FIXME
(
"NI_SETCANDIDATE_PAGESIZE
\n
"
);
break
;
case
NI_CONTEXTUPDATED
:
switch
(
dwValue
)
{
case
IMC_SETCOMPOSITIONWINDOW
:
FIXME
(
"NI_CONTEXTUPDATED: IMC_SETCOMPOSITIONWINDOW
\n
"
);
break
;
case
IMC_SETCONVERSIONMODE
:
FIXME
(
"NI_CONTEXTUPDATED: IMC_SETCONVERSIONMODE
\n
"
);
break
;
case
IMC_SETSENTENCEMODE
:
FIXME
(
"NI_CONTEXTUPDATED: IMC_SETSENTENCEMODE
\n
"
);
break
;
case
IMC_SETCANDIDATEPOS
:
FIXME
(
"NI_CONTEXTUPDATED: IMC_SETCANDIDATEPOS
\n
"
);
break
;
case
IMC_SETCOMPOSITIONFONT
:
{
LPIMEPRIVATE
myPrivate
;
TRACE
(
"NI_CONTEXTUPDATED: IMC_SETCOMPOSITIONFONT
\n
"
);
myPrivate
=
ImmLockIMCC
(
lpIMC
->
hPrivate
);
if
(
myPrivate
->
textfont
)
{
DeleteObject
(
myPrivate
->
textfont
);
myPrivate
->
textfont
=
NULL
;
}
myPrivate
->
textfont
=
CreateFontIndirectW
(
&
lpIMC
->
lfFont
.
W
);
ImmUnlockIMCC
(
lpIMC
->
hPrivate
);
}
break
;
case
IMC_SETOPENSTATUS
:
{
LPIMEPRIVATE
myPrivate
;
TRACE
(
"NI_CONTEXTUPDATED: IMC_SETOPENSTATUS
\n
"
);
myPrivate
=
ImmLockIMCC
(
lpIMC
->
hPrivate
);
if
(
lpIMC
->
fOpen
!=
myPrivate
->
bInternalState
&&
myPrivate
->
bInComposition
)
{
if
(
lpIMC
->
fOpen
==
FALSE
)
{
GenerateIMEMessage
(
hIMC
,
WM_IME_ENDCOMPOSITION
,
0
,
0
);
myPrivate
->
bInComposition
=
FALSE
;
}
else
{
GenerateIMEMessage
(
hIMC
,
WM_IME_STARTCOMPOSITION
,
0
,
0
);
GenerateIMEMessage
(
hIMC
,
WM_IME_COMPOSITION
,
0
,
0
);
}
}
myPrivate
->
bInternalState
=
lpIMC
->
fOpen
;
bRet
=
TRUE
;
}
break
;
default:
FIXME
(
"NI_CONTEXTUPDATED: Unknown
\n
"
);
break
;
}
break
;
case
NI_COMPOSITIONSTR
:
switch
(
dwIndex
)
{
case
CPS_COMPLETE
:
{
HIMCC
newCompStr
;
LPIMEPRIVATE
myPrivate
;
WCHAR
*
str
;
UINT
len
;
TRACE
(
"NI_COMPOSITIONSTR: CPS_COMPLETE
\n
"
);
/* clear existing result */
newCompStr
=
updateResultStr
(
lpIMC
->
hCompStr
,
NULL
,
0
);
ImmDestroyIMCC
(
lpIMC
->
hCompStr
);
lpIMC
->
hCompStr
=
newCompStr
;
myPrivate
=
ImmLockIMCC
(
lpIMC
->
hPrivate
);
if
((
str
=
input_context_get_comp_str
(
lpIMC
,
FALSE
,
&
len
)))
{
WCHAR
param
=
str
[
0
];
DWORD
flags
=
GCS_COMPSTR
;
newCompStr
=
updateResultStr
(
lpIMC
->
hCompStr
,
str
,
len
);
ImmDestroyIMCC
(
lpIMC
->
hCompStr
);
lpIMC
->
hCompStr
=
newCompStr
;
newCompStr
=
updateCompStr
(
lpIMC
->
hCompStr
,
NULL
,
0
,
&
flags
);
ImmDestroyIMCC
(
lpIMC
->
hCompStr
);
lpIMC
->
hCompStr
=
newCompStr
;
GenerateIMEMessage
(
hIMC
,
WM_IME_COMPOSITION
,
0
,
flags
);
GenerateIMEMessage
(
hIMC
,
WM_IME_COMPOSITION
,
param
,
GCS_RESULTSTR
|
GCS_RESULTCLAUSE
);
GenerateIMEMessage
(
hIMC
,
WM_IME_ENDCOMPOSITION
,
0
,
0
);
free
(
str
);
}
else
if
(
myPrivate
->
bInComposition
)
GenerateIMEMessage
(
hIMC
,
WM_IME_ENDCOMPOSITION
,
0
,
0
);
myPrivate
->
bInComposition
=
FALSE
;
ImmUnlockIMCC
(
lpIMC
->
hPrivate
);
bRet
=
TRUE
;
}
break
;
case
CPS_CONVERT
:
FIXME
(
"NI_COMPOSITIONSTR: CPS_CONVERT
\n
"
);
break
;
case
CPS_REVERT
:
FIXME
(
"NI_COMPOSITIONSTR: CPS_REVERT
\n
"
);
break
;
case
CPS_CANCEL
:
{
LPIMEPRIVATE
myPrivate
;
TRACE
(
"NI_COMPOSITIONSTR: CPS_CANCEL
\n
"
);
MACDRV_CALL
(
ime_clear
,
NULL
);
if
(
lpIMC
->
hCompStr
)
ImmDestroyIMCC
(
lpIMC
->
hCompStr
);
lpIMC
->
hCompStr
=
ImeCreateBlankCompStr
();
myPrivate
=
ImmLockIMCC
(
lpIMC
->
hPrivate
);
if
(
myPrivate
->
bInComposition
)
{
GenerateIMEMessage
(
hIMC
,
WM_IME_ENDCOMPOSITION
,
0
,
0
);
myPrivate
->
bInComposition
=
FALSE
;
}
ImmUnlockIMCC
(
lpIMC
->
hPrivate
);
bRet
=
TRUE
;
}
break
;
default:
FIXME
(
"NI_COMPOSITIONSTR: Unknown
\n
"
);
break
;
}
break
;
default:
FIXME
(
"Unknown Message
\n
"
);
break
;
}
UnlockRealIMC
(
hIMC
);
return
bRet
;
}
static
BOOL
IME_SetCompositionString
(
void
*
hIMC
,
DWORD
dwIndex
,
LPCVOID
lpComp
,
DWORD
dwCompLen
,
DWORD
cursor_pos
,
BOOL
cursor_valid
)
{
LPINPUTCONTEXT
lpIMC
;
...
...
@@ -862,7 +712,7 @@ static BOOL IME_SetCompositionString(void* hIMC, DWORD dwIndex, LPCVOID lpComp,
}
else
{
NotifyIME
(
hIMC
,
NI_COMPOSITIONSTR
,
CPS_CANCEL
,
0
);
Imm
NotifyIME
(
hIMC
,
NI_COMPOSITIONSTR
,
CPS_CANCEL
,
0
);
sendMessage
=
FALSE
;
}
...
...
@@ -890,7 +740,7 @@ BOOL WINAPI ImeSetCompositionString(HIMC hIMC, DWORD dwIndex, LPCVOID lpComp, DW
static
void
IME_NotifyComplete
(
void
*
hIMC
)
{
NotifyIME
(
hIMC
,
NI_COMPOSITIONSTR
,
CPS_COMPLETE
,
0
);
Imm
NotifyIME
(
hIMC
,
NI_COMPOSITIONSTR
,
CPS_COMPLETE
,
0
);
}
/* Interfaces to other parts of the Mac driver */
...
...
dlls/winemac.drv/macdrv.h
View file @
4c915453
...
...
@@ -167,6 +167,7 @@ extern INT macdrv_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyStat
LPWSTR
bufW
,
int
bufW_size
,
UINT
flags
,
HKL
hkl
)
DECLSPEC_HIDDEN
;
extern
UINT
macdrv_GetKeyboardLayoutList
(
INT
size
,
HKL
*
list
)
DECLSPEC_HIDDEN
;
extern
INT
macdrv_GetKeyNameText
(
LONG
lparam
,
LPWSTR
buffer
,
INT
size
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_NotifyIMEStatus
(
HWND
hwnd
,
UINT
status
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_SystemParametersInfo
(
UINT
action
,
UINT
int_param
,
void
*
ptr_param
,
UINT
flags
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_ProcessEvents
(
DWORD
mask
)
DECLSPEC_HIDDEN
;
...
...
dlls/winemac.drv/macdrv_main.c
View file @
4c915453
...
...
@@ -605,13 +605,6 @@ NTSTATUS macdrv_client_func(enum macdrv_client_funcs id, const void *params, ULO
}
static
NTSTATUS
macdrv_ime_clear
(
void
*
arg
)
{
macdrv_clear_ime_text
();
return
0
;
}
static
NTSTATUS
macdrv_ime_using_input_method
(
void
*
arg
)
{
return
macdrv_using_input_method
();
...
...
@@ -633,7 +626,6 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
macdrv_dnd_have_format
,
macdrv_dnd_release
,
macdrv_dnd_retain
,
macdrv_ime_clear
,
macdrv_ime_process_text_input
,
macdrv_ime_get_text_input
,
macdrv_ime_using_input_method
,
...
...
@@ -758,7 +750,6 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
macdrv_dnd_have_format
,
macdrv_dnd_release
,
macdrv_dnd_retain
,
macdrv_ime_clear
,
wow64_ime_process_text_input
,
macdrv_ime_get_text_input
,
macdrv_ime_using_input_method
,
...
...
dlls/winemac.drv/unixlib.h
View file @
4c915453
...
...
@@ -26,7 +26,6 @@ enum macdrv_funcs
unix_dnd_have_format
,
unix_dnd_release
,
unix_dnd_retain
,
unix_ime_clear
,
unix_ime_process_text_input
,
unix_ime_get_text_input
,
unix_ime_using_input_method
,
...
...
dlls/winemac.drv/winemac.drv.spec
View file @
4c915453
...
...
@@ -6,4 +6,3 @@
@ stdcall ImeSelect(long long)
@ stdcall ImeSetCompositionString(long long ptr long ptr long)
@ stdcall ImeToAsciiEx(long long ptr ptr long long)
@ stdcall NotifyIME(long long long long)
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