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
c902be6a
Commit
c902be6a
authored
Apr 06, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Cleanup default IME UI window proc traces.
parent
d8fa4337
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
54 deletions
+79
-54
ime.c
dlls/imm32/ime.c
+48
-54
imm.c
dlls/imm32/imm.c
+3
-0
imm_private.h
dlls/imm32/imm_private.h
+28
-0
No files found.
dlls/imm32/ime.c
View file @
c902be6a
...
...
@@ -23,6 +23,45 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
imm
);
static
const
char
*
debugstr_imn
(
WPARAM
wparam
)
{
switch
(
wparam
)
{
case
IMN_OPENSTATUSWINDOW
:
return
"IMN_OPENSTATUSWINDOW"
;
case
IMN_CLOSESTATUSWINDOW
:
return
"IMN_CLOSESTATUSWINDOW"
;
case
IMN_OPENCANDIDATE
:
return
"IMN_OPENCANDIDATE"
;
case
IMN_CHANGECANDIDATE
:
return
"IMN_CHANGECANDIDATE"
;
case
IMN_CLOSECANDIDATE
:
return
"IMN_CLOSECANDIDATE"
;
case
IMN_SETCONVERSIONMODE
:
return
"IMN_SETCONVERSIONMODE"
;
case
IMN_SETSENTENCEMODE
:
return
"IMN_SETSENTENCEMODE"
;
case
IMN_SETOPENSTATUS
:
return
"IMN_SETOPENSTATUS"
;
case
IMN_SETCANDIDATEPOS
:
return
"IMN_SETCANDIDATEPOS"
;
case
IMN_SETCOMPOSITIONFONT
:
return
"IMN_SETCOMPOSITIONFONT"
;
case
IMN_SETCOMPOSITIONWINDOW
:
return
"IMN_SETCOMPOSITIONWINDOW"
;
case
IMN_GUIDELINE
:
return
"IMN_GUIDELINE"
;
case
IMN_SETSTATUSWINDOWPOS
:
return
"IMN_SETSTATUSWINDOWPOS"
;
default:
return
wine_dbg_sprintf
(
"%#Ix"
,
wparam
);
}
}
static
const
char
*
debugstr_imc
(
WPARAM
wparam
)
{
switch
(
wparam
)
{
case
IMC_GETCANDIDATEPOS
:
return
"IMC_GETCANDIDATEPOS"
;
case
IMC_SETCANDIDATEPOS
:
return
"IMC_SETCANDIDATEPOS"
;
case
IMC_GETCOMPOSITIONFONT
:
return
"IMC_GETCOMPOSITIONFONT"
;
case
IMC_SETCOMPOSITIONFONT
:
return
"IMC_SETCOMPOSITIONFONT"
;
case
IMC_GETCOMPOSITIONWINDOW
:
return
"IMC_GETCOMPOSITIONWINDOW"
;
case
IMC_SETCOMPOSITIONWINDOW
:
return
"IMC_SETCOMPOSITIONWINDOW"
;
case
IMC_GETSTATUSWINDOWPOS
:
return
"IMC_GETSTATUSWINDOWPOS"
;
case
IMC_SETSTATUSWINDOWPOS
:
return
"IMC_SETSTATUSWINDOWPOS"
;
case
IMC_CLOSESTATUSWINDOW
:
return
"IMC_CLOSESTATUSWINDOW"
;
case
IMC_OPENSTATUSWINDOW
:
return
"IMC_OPENSTATUSWINDOW"
;
default:
return
wine_dbg_sprintf
(
"%#Ix"
,
wparam
);
}
}
static
WCHAR
*
input_context_get_comp_str
(
INPUTCONTEXT
*
ctx
,
BOOL
result
,
UINT
*
length
)
{
COMPOSITIONSTRING
*
string
;
...
...
@@ -189,7 +228,6 @@ static void ime_ui_update_window( INPUTCONTEXT *ctx, HWND hwnd )
static
void
ime_ui_composition
(
HIMC
himc
,
HWND
hwnd
,
LPARAM
lparam
)
{
INPUTCONTEXT
*
ctx
;
TRACE
(
"IME message WM_IME_COMPOSITION 0x%Ix
\n
"
,
lparam
);
if
(
lparam
&
GCS_RESULTSTR
)
return
;
if
(
!
(
ctx
=
ImmLockIMC
(
himc
)))
return
;
ime_ui_update_window
(
ctx
,
hwnd
);
...
...
@@ -199,41 +237,19 @@ static void ime_ui_composition( HIMC himc, HWND hwnd, LPARAM lparam )
static
void
ime_ui_start_composition
(
HIMC
himc
,
HWND
hwnd
)
{
INPUTCONTEXT
*
ctx
;
TRACE
(
"IME message WM_IME_STARTCOMPOSITION
\n
"
);
if
(
!
(
ctx
=
ImmLockIMC
(
himc
)))
return
;
ime_ui_update_window
(
ctx
,
hwnd
);
ImmUnlockIMC
(
himc
);
}
static
LRESULT
ime_ui_notify
(
HIMC
himc
,
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
switch
(
wparam
)
{
case
IMN_OPENSTATUSWINDOW
:
FIXME
(
"WM_IME_NOTIFY:IMN_OPENSTATUSWINDOW
\n
"
);
break
;
case
IMN_CLOSESTATUSWINDOW
:
FIXME
(
"WM_IME_NOTIFY:IMN_CLOSESTATUSWINDOW
\n
"
);
break
;
case
IMN_OPENCANDIDATE
:
FIXME
(
"WM_IME_NOTIFY:IMN_OPENCANDIDATE
\n
"
);
break
;
case
IMN_CHANGECANDIDATE
:
FIXME
(
"WM_IME_NOTIFY:IMN_CHANGECANDIDATE
\n
"
);
break
;
case
IMN_CLOSECANDIDATE
:
FIXME
(
"WM_IME_NOTIFY:IMN_CLOSECANDIDATE
\n
"
);
break
;
case
IMN_SETCONVERSIONMODE
:
FIXME
(
"WM_IME_NOTIFY:IMN_SETCONVERSIONMODE
\n
"
);
break
;
case
IMN_SETSENTENCEMODE
:
FIXME
(
"WM_IME_NOTIFY:IMN_SETSENTENCEMODE
\n
"
);
break
;
case
IMN_SETOPENSTATUS
:
TRACE
(
"WM_IME_NOTIFY:IMN_SETOPENSTATUS
\n
"
);
break
;
case
IMN_SETCANDIDATEPOS
:
FIXME
(
"WM_IME_NOTIFY:IMN_SETCANDIDATEPOS
\n
"
);
break
;
case
IMN_SETCOMPOSITIONFONT
:
FIXME
(
"WM_IME_NOTIFY:IMN_SETCOMPOSITIONFONT
\n
"
);
break
;
case
IMN_SETCOMPOSITIONWINDOW
:
FIXME
(
"WM_IME_NOTIFY:IMN_SETCOMPOSITIONWINDOW
\n
"
);
break
;
case
IMN_GUIDELINE
:
FIXME
(
"WM_IME_NOTIFY:IMN_GUIDELINE
\n
"
);
break
;
case
IMN_SETSTATUSWINDOWPOS
:
FIXME
(
"WM_IME_NOTIFY:IMN_SETSTATUSWINDOWPOS
\n
"
);
break
;
default:
FIXME
(
"WM_IME_NOTIFY:<Unknown 0x%Ix>
\n
"
,
wparam
);
break
;
}
return
0
;
}
static
LRESULT
WINAPI
ime_ui_window_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
HIMC
himc
=
(
HIMC
)
GetWindowLongPtrW
(
hwnd
,
IMMGWL_IMC
);
INPUTCONTEXT
*
ctx
;
LRESULT
ret
=
0
;
TRACE
(
"hwnd %p, himc %p, msg %#x, wparam %#Ix, lparam %#Ix
\n
"
,
hwnd
,
himc
,
msg
,
wparam
,
lparam
);
TRACE
(
"hwnd %p, himc %p, msg %s, wparam %#Ix, lparam %#Ix
\n
"
,
hwnd
,
himc
,
debugstr_wm_ime
(
msg
),
wparam
,
lparam
);
/* if we have no himc there are many messages we cannot process */
if
(
!
himc
)
...
...
@@ -285,40 +301,18 @@ static LRESULT WINAPI ime_ui_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LP
ime_ui_start_composition
(
himc
,
hwnd
);
break
;
case
WM_IME_ENDCOMPOSITION
:
TRACE
(
"IME message %s, 0x%Ix, 0x%Ix
\n
"
,
"WM_IME_ENDCOMPOSITION"
,
wparam
,
lparam
);
ShowWindow
(
hwnd
,
SW_HIDE
);
break
;
case
WM_IME_SELECT
:
TRACE
(
"IME message %s, 0x%Ix, 0x%Ix
\n
"
,
"WM_IME_SELECT"
,
wparam
,
lparam
);
break
;
case
WM_IME_CONTROL
:
TRACE
(
"IME message %s, 0x%Ix, 0x%Ix
\n
"
,
"WM_IME_CONTROL"
,
wparam
,
lparam
);
ret
=
1
;
break
;
case
WM_IME_NOTIFY
:
ret
=
ime_ui_notify
(
himc
,
hwnd
,
msg
,
wparam
,
lparam
);
break
;
default:
TRACE
(
"Non-standard message 0x%x
\n
"
,
msg
);
break
;
FIXME
(
"hwnd %p, himc %p, msg %s, wparam %s, lparam %#Ix stub!
\n
"
,
hwnd
,
himc
,
debugstr_wm_ime
(
msg
),
debugstr_imn
(
wparam
),
lparam
);
return
0
;
case
WM_IME_CONTROL
:
FIXME
(
"hwnd %p, himc %p, msg %s, wparam %s, lparam %#Ix stub!
\n
"
,
hwnd
,
himc
,
debugstr_wm_ime
(
msg
),
debugstr_imc
(
wparam
),
lparam
);
return
1
;
}
/* check the MSIME messages */
if
(
msg
==
WM_MSIME_SERVICE
)
TRACE
(
"IME message %s, 0x%Ix, 0x%Ix
\n
"
,
"WM_MSIME_SERVICE"
,
wparam
,
lparam
);
else
if
(
msg
==
WM_MSIME_RECONVERTOPTIONS
)
TRACE
(
"IME message %s, 0x%Ix, 0x%Ix
\n
"
,
"WM_MSIME_RECONVERTOPTIONS"
,
wparam
,
lparam
);
else
if
(
msg
==
WM_MSIME_MOUSE
)
TRACE
(
"IME message %s, 0x%Ix, 0x%Ix
\n
"
,
"WM_MSIME_MOUSE"
,
wparam
,
lparam
);
else
if
(
msg
==
WM_MSIME_RECONVERTREQUEST
)
TRACE
(
"IME message %s, 0x%Ix, 0x%Ix
\n
"
,
"WM_MSIME_RECONVERTREQUEST"
,
wparam
,
lparam
);
else
if
(
msg
==
WM_MSIME_RECONVERT
)
TRACE
(
"IME message %s, 0x%Ix, 0x%Ix
\n
"
,
"WM_MSIME_RECONVERT"
,
wparam
,
lparam
);
else
if
(
msg
==
WM_MSIME_QUERYPOSITION
)
TRACE
(
"IME message %s, 0x%Ix, 0x%Ix
\n
"
,
"WM_MSIME_QUERYPOSITION"
,
wparam
,
lparam
);
else
if
(
msg
==
WM_MSIME_DOCUMENTFEED
)
TRACE
(
"IME message %s, 0x%Ix, 0x%Ix
\n
"
,
"WM_MSIME_DOCUMENTFEED"
,
wparam
,
lparam
);
/* DefWndProc if not an IME message */
if
(
!
ret
&&
!
((
msg
>=
WM_IME_STARTCOMPOSITION
&&
msg
<=
WM_IME_KEYLAST
)
||
(
msg
>=
WM_IME_SETCONTEXT
&&
msg
<=
WM_IME_KEYUP
)))
...
...
dlls/imm32/imm.c
View file @
c902be6a
...
...
@@ -3203,6 +3203,9 @@ LRESULT WINAPI __wine_ime_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
{
HWND
ui_hwnd
;
TRACE
(
"hwnd %p, msg %s, wparam %#Ix, lparam %#Ix, ansi %u
\n
"
,
hwnd
,
debugstr_wm_ime
(
msg
),
wparam
,
lparam
,
ansi
);
switch
(
msg
)
{
case
WM_CREATE
:
...
...
dlls/imm32/imm_private.h
View file @
c902be6a
...
...
@@ -44,3 +44,31 @@ extern UINT WM_MSIME_RECONVERTREQUEST;
extern
UINT
WM_MSIME_RECONVERT
;
extern
UINT
WM_MSIME_QUERYPOSITION
;
extern
UINT
WM_MSIME_DOCUMENTFEED
;
static
const
char
*
debugstr_wm_ime
(
UINT
msg
)
{
switch
(
msg
)
{
case
WM_IME_STARTCOMPOSITION
:
return
"WM_IME_STARTCOMPOSITION"
;
case
WM_IME_ENDCOMPOSITION
:
return
"WM_IME_ENDCOMPOSITION"
;
case
WM_IME_COMPOSITION
:
return
"WM_IME_COMPOSITION"
;
case
WM_IME_SETCONTEXT
:
return
"WM_IME_SETCONTEXT"
;
case
WM_IME_NOTIFY
:
return
"WM_IME_NOTIFY"
;
case
WM_IME_CONTROL
:
return
"WM_IME_CONTROL"
;
case
WM_IME_COMPOSITIONFULL
:
return
"WM_IME_COMPOSITIONFULL"
;
case
WM_IME_SELECT
:
return
"WM_IME_SELECT"
;
case
WM_IME_CHAR
:
return
"WM_IME_CHAR"
;
case
WM_IME_REQUEST
:
return
"WM_IME_REQUEST"
;
case
WM_IME_KEYDOWN
:
return
"WM_IME_KEYDOWN"
;
case
WM_IME_KEYUP
:
return
"WM_IME_KEYUP"
;
default:
if
(
msg
==
WM_MSIME_SERVICE
)
return
"WM_MSIME_SERVICE"
;
else
if
(
msg
==
WM_MSIME_RECONVERTOPTIONS
)
return
"WM_MSIME_RECONVERTOPTIONS"
;
else
if
(
msg
==
WM_MSIME_MOUSE
)
return
"WM_MSIME_MOUSE"
;
else
if
(
msg
==
WM_MSIME_RECONVERTREQUEST
)
return
"WM_MSIME_RECONVERTREQUEST"
;
else
if
(
msg
==
WM_MSIME_RECONVERT
)
return
"WM_MSIME_RECONVERT"
;
else
if
(
msg
==
WM_MSIME_QUERYPOSITION
)
return
"WM_MSIME_QUERYPOSITION"
;
else
if
(
msg
==
WM_MSIME_DOCUMENTFEED
)
return
"WM_MSIME_DOCUMENTFEED"
;
return
wine_dbg_sprintf
(
"%#x"
,
msg
);
}
}
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