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
c52ce9bc
Commit
c52ce9bc
authored
Jul 19, 2007
by
Nigel Liang
Committed by
Alexandre Julliard
Jul 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Implement XIMPreEditCaretCallback.
parent
937432ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
1 deletion
+60
-1
edit.c
dlls/user32/edit.c
+4
-0
xim.c
dlls/winex11.drv/xim.c
+56
-1
No files found.
dlls/user32/edit.c
View file @
c52ce9bc
...
...
@@ -1032,6 +1032,8 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
break
;
case
WM_IME_COMPOSITION
:
{
int
caret_pos
=
es
->
selection_end
;
if
(
es
->
composition_len
==
0
)
{
if
(
es
->
selection_start
!=
es
->
selection_end
)
...
...
@@ -1043,7 +1045,9 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
es
->
composition_start
=
es
->
selection_end
;
}
EDIT_ImeComposition
(
hwnd
,
lParam
,
es
);
EDIT_SetCaretPos
(
es
,
caret_pos
,
es
->
flags
&
EF_AFTER_WRAP
);
break
;
}
case
WM_IME_ENDCOMPOSITION
:
es
->
composition_len
=
0
;
...
...
dlls/winex11.drv/xim.c
View file @
c52ce9bc
...
...
@@ -30,6 +30,7 @@
#include "winnls.h"
#include "x11drv.h"
#include "imm.h"
#include "ddk/imm.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
x11drv
);
...
...
@@ -39,6 +40,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
BOOL
ximInComposeMode
=
FALSE
;
typedef
struct
tagInputContextData
{
BOOL
bInternalState
;
BOOL
bRead
;
BOOL
bInComposition
;
HFONT
textfont
;
DWORD
dwLock
;
INPUTCONTEXT
IMC
;
}
InputContextData
;
static
HIMC
root_context
;
static
XIMStyle
ximStyle
=
0
;
static
XIMStyle
ximStyleRoot
=
0
;
...
...
@@ -56,6 +68,7 @@ static HIMC (WINAPI *pImmCreateContext)(void);
static
VOID
(
WINAPI
*
pImmSetOpenStatus
)(
HIMC
,
BOOL
);
static
BOOL
(
WINAPI
*
pImmSetCompositionString
)(
HIMC
,
DWORD
,
LPWSTR
,
DWORD
,
LPWSTR
,
DWORD
);
static
LONG
(
WINAPI
*
pImmGetCompositionString
)(
HIMC
,
DWORD
,
LPVOID
,
DWORD
);
static
VOID
(
WINAPI
*
pImmNotifyIME
)(
HIMC
,
DWORD
,
DWORD
,
DWORD
);
/* WINE specific messages from the xim in x11drv level */
...
...
@@ -92,6 +105,11 @@ static void LoadImmDll(void)
if
(
!
pImmSetCompositionString
)
WARN
(
"IMM: pImmSetCompositionStringW not found in DLL
\n
"
);
pImmGetCompositionString
=
(
void
*
)
GetProcAddress
(
hImmDll
,
"ImmGetCompositionStringW"
);
if
(
!
pImmGetCompositionString
)
WARN
(
"IMM: pImmGetCompositionStringW not found in DLL
\n
"
);
pImmNotifyIME
=
(
void
*
)
GetProcAddress
(
hImmDll
,
"ImmNotifyIME"
);
if
(
!
pImmNotifyIME
)
...
...
@@ -310,7 +328,44 @@ static void XIMPreEditDrawCallback(XIM ic, XPointer client_data,
static
void
XIMPreEditCaretCallback
(
XIC
ic
,
XPointer
client_data
,
XIMPreeditCaretCallbackStruct
*
P_C
)
{
FIXME
(
"PreeditCaretCalback %p
\n
"
,
ic
);
TRACE
(
"PreeditCaretCallback %p
\n
"
,
ic
);
if
(
P_C
)
{
int
pos
=
pImmGetCompositionString
(
root_context
,
GCS_CURSORPOS
,
NULL
,
0
);
TRACE
(
"pos: %d
\n
"
,
pos
);
switch
(
P_C
->
direction
)
{
case
XIMForwardChar
:
case
XIMForwardWord
:
pos
++
;
break
;
case
XIMBackwardChar
:
case
XIMBackwardWord
:
pos
--
;
break
;
case
XIMLineStart
:
pos
=
0
;
break
;
case
XIMAbsolutePosition
:
pos
=
P_C
->
position
;
break
;
case
XIMDontChange
:
P_C
->
position
=
pos
;
return
;
case
XIMCaretUp
:
case
XIMCaretDown
:
case
XIMPreviousLine
:
case
XIMNextLine
:
case
XIMLineEnd
:
FIXME
(
"Not implemented
\n
"
);
break
;
}
SendMessageW
(((
InputContextData
*
)
root_context
)
->
IMC
.
hWnd
,
EM_SETSEL
,
pos
,
pos
);
P_C
->
position
=
pos
;
}
TRACE
(
"Finished
\n
"
);
}
void
X11DRV_ForceXIMReset
(
HWND
hwnd
)
...
...
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