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
467ab8a0
Commit
467ab8a0
authored
Apr 02, 2008
by
Aric Stewart
Committed by
Alexandre Julliard
Apr 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Implement ImmConfigureIME using the loaded IME.
parent
6dca48fe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
8 deletions
+72
-8
imm.c
dlls/imm32/imm.c
+72
-8
No files found.
dlls/imm32/imm.c
View file @
467ab8a0
...
@@ -121,6 +121,32 @@ static void ImmInternalPostIMEMessage(InputContextData*, UINT, WPARAM, LPARAM);
...
@@ -121,6 +121,32 @@ static void ImmInternalPostIMEMessage(InputContextData*, UINT, WPARAM, LPARAM);
static
void
ImmInternalSetOpenStatus
(
BOOL
fOpen
);
static
void
ImmInternalSetOpenStatus
(
BOOL
fOpen
);
static
HIMCC
updateResultStr
(
HIMCC
old
,
LPWSTR
resultstr
,
DWORD
len
);
static
HIMCC
updateResultStr
(
HIMCC
old
,
LPWSTR
resultstr
,
DWORD
len
);
#define is_kbd_ime_unicode(p) (p->imeInfo.fdwProperty & IME_PROP_UNICODE)
static
inline
WCHAR
*
strdupAtoW
(
const
char
*
str
)
{
WCHAR
*
ret
=
NULL
;
if
(
str
)
{
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
if
((
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
ret
,
len
);
}
return
ret
;
}
static
inline
CHAR
*
strdupWtoA
(
const
WCHAR
*
str
)
{
CHAR
*
ret
=
NULL
;
if
(
str
)
{
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
((
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
ret
,
len
,
NULL
,
NULL
);
}
return
ret
;
}
/* ImmHkl loading and freeing */
/* ImmHkl loading and freeing */
#define LOAD_FUNCPTR(f) if((ptr->p##f = (LPVOID)GetProcAddress(ptr->hIME, #f)) == NULL){WARN("Can't find function %s in ime\n", #f);}
#define LOAD_FUNCPTR(f) if((ptr->p##f = (LPVOID)GetProcAddress(ptr->hIME, #f)) == NULL){WARN("Can't find function %s in ime\n", #f);}
static
ImmHkl
*
IMM_GetImmHkl
(
HKL
hkl
)
static
ImmHkl
*
IMM_GetImmHkl
(
HKL
hkl
)
...
@@ -702,10 +728,29 @@ BOOL WINAPI ImmAssociateContextEx(HWND hWnd, HIMC hIMC, DWORD dwFlags)
...
@@ -702,10 +728,29 @@ BOOL WINAPI ImmAssociateContextEx(HWND hWnd, HIMC hIMC, DWORD dwFlags)
BOOL
WINAPI
ImmConfigureIMEA
(
BOOL
WINAPI
ImmConfigureIMEA
(
HKL
hKL
,
HWND
hWnd
,
DWORD
dwMode
,
LPVOID
lpData
)
HKL
hKL
,
HWND
hWnd
,
DWORD
dwMode
,
LPVOID
lpData
)
{
{
FIXME
(
"(%p, %p, %d, %p): stub
\n
"
,
ImmHkl
*
immHkl
=
IMM_GetImmHkl
(
hKL
);
hKL
,
hWnd
,
dwMode
,
lpData
);
TRACE
(
"(%p, %p, %d, %p):
\n
"
,
hKL
,
hWnd
,
dwMode
,
lpData
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
if
(
immHkl
->
hIME
&&
immHkl
->
pImeConfigure
)
{
if
(
dwMode
!=
IME_CONFIG_REGISTERWORD
||
!
is_kbd_ime_unicode
(
immHkl
))
return
immHkl
->
pImeConfigure
(
hKL
,
hWnd
,
dwMode
,
lpData
);
else
{
REGISTERWORDW
rww
;
REGISTERWORDA
*
rwa
=
(
REGISTERWORDA
*
)
lpData
;
BOOL
rc
;
rww
.
lpReading
=
strdupAtoW
(
rwa
->
lpReading
);
rww
.
lpWord
=
strdupAtoW
(
rwa
->
lpWord
);
rc
=
immHkl
->
pImeConfigure
(
hKL
,
hWnd
,
dwMode
,
&
rww
);
HeapFree
(
GetProcessHeap
(),
0
,
rww
.
lpReading
);
HeapFree
(
GetProcessHeap
(),
0
,
rww
.
lpWord
);
return
rc
;
}
}
else
return
FALSE
;
return
FALSE
;
}
}
...
@@ -715,10 +760,29 @@ BOOL WINAPI ImmConfigureIMEA(
...
@@ -715,10 +760,29 @@ BOOL WINAPI ImmConfigureIMEA(
BOOL
WINAPI
ImmConfigureIMEW
(
BOOL
WINAPI
ImmConfigureIMEW
(
HKL
hKL
,
HWND
hWnd
,
DWORD
dwMode
,
LPVOID
lpData
)
HKL
hKL
,
HWND
hWnd
,
DWORD
dwMode
,
LPVOID
lpData
)
{
{
FIXME
(
"(%p, %p, %d, %p): stub
\n
"
,
ImmHkl
*
immHkl
=
IMM_GetImmHkl
(
hKL
);
hKL
,
hWnd
,
dwMode
,
lpData
);
TRACE
(
"(%p, %p, %d, %p):
\n
"
,
hKL
,
hWnd
,
dwMode
,
lpData
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
if
(
immHkl
->
hIME
&&
immHkl
->
pImeConfigure
)
{
if
(
dwMode
!=
IME_CONFIG_REGISTERWORD
||
is_kbd_ime_unicode
(
immHkl
))
return
immHkl
->
pImeConfigure
(
hKL
,
hWnd
,
dwMode
,
lpData
);
else
{
REGISTERWORDW
*
rww
=
(
REGISTERWORDW
*
)
lpData
;
REGISTERWORDA
rwa
;
BOOL
rc
;
rwa
.
lpReading
=
strdupWtoA
(
rww
->
lpReading
);
rwa
.
lpWord
=
strdupWtoA
(
rww
->
lpWord
);
rc
=
immHkl
->
pImeConfigure
(
hKL
,
hWnd
,
dwMode
,
&
rwa
);
HeapFree
(
GetProcessHeap
(),
0
,
rwa
.
lpReading
);
HeapFree
(
GetProcessHeap
(),
0
,
rwa
.
lpWord
);
return
rc
;
}
}
else
return
FALSE
;
return
FALSE
;
}
}
...
...
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