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
3d694c81
Commit
3d694c81
authored
Mar 06, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Add a default implementation for IME functions.
To be used by graphics drivers.
parent
f2447979
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
160 additions
and
5 deletions
+160
-5
Makefile.in
dlls/imm32/Makefile.in
+1
-0
ime.c
dlls/imm32/ime.c
+151
-0
imm.c
dlls/imm32/imm.c
+8
-5
No files found.
dlls/imm32/Makefile.in
View file @
3d694c81
...
@@ -4,6 +4,7 @@ IMPORTS = user32 gdi32 advapi32 kernelbase win32u
...
@@ -4,6 +4,7 @@ IMPORTS = user32 gdi32 advapi32 kernelbase win32u
DELAYIMPORTS
=
ole32
DELAYIMPORTS
=
ole32
C_SRCS
=
\
C_SRCS
=
\
ime.c
\
imm.c
imm.c
RC_SRCS
=
version.rc
RC_SRCS
=
version.rc
dlls/imm32/ime.c
0 → 100644
View file @
3d694c81
/*
* Copyright 2023 Rémi Bernon for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <stddef.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "imm.h"
#include "immdev.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
imm
);
BOOL
WINAPI
ImeInquire
(
IMEINFO
*
info
,
WCHAR
*
ui_class
,
DWORD
flags
)
{
FIXME
(
"info %p, ui_class %p, flags %#lx stub!
\n
"
,
info
,
ui_class
,
flags
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
BOOL
WINAPI
ImeDestroy
(
UINT
force
)
{
FIXME
(
"force %u stub!
\n
"
,
force
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
BOOL
WINAPI
ImeSelect
(
HIMC
himc
,
BOOL
select
)
{
FIXME
(
"himc %p, select %d stub!
\n
"
,
himc
,
select
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
BOOL
WINAPI
ImeSetActiveContext
(
HIMC
himc
,
BOOL
flag
)
{
FIXME
(
"himc %p, flag %#x stub!
\n
"
,
himc
,
flag
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
BOOL
WINAPI
ImeProcessKey
(
HIMC
himc
,
UINT
vkey
,
LPARAM
key_data
,
BYTE
*
key_state
)
{
FIXME
(
"himc %p, vkey %u, key_data %#Ix, key_state %p stub!
\n
"
,
himc
,
vkey
,
key_data
,
key_state
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
UINT
WINAPI
ImeToAsciiEx
(
UINT
vkey
,
UINT
scan_code
,
BYTE
*
key_state
,
TRANSMSGLIST
*
msgs
,
UINT
state
,
HIMC
himc
)
{
FIXME
(
"vkey %u, scan_code %u, key_state %p, msgs %p, state %u, himc %p stub!
\n
"
,
vkey
,
scan_code
,
key_state
,
msgs
,
state
,
himc
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
BOOL
WINAPI
ImeConfigure
(
HKL
hkl
,
HWND
hwnd
,
DWORD
mode
,
void
*
data
)
{
FIXME
(
"hkl %p, hwnd %p, mode %lu, data %p stub!
\n
"
,
hkl
,
hwnd
,
mode
,
data
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
DWORD
WINAPI
ImeConversionList
(
HIMC
himc
,
const
WCHAR
*
source
,
CANDIDATELIST
*
dest
,
DWORD
dest_len
,
UINT
flag
)
{
FIXME
(
"himc %p, source %s, dest %p, dest_len %lu, flag %#x stub!
\n
"
,
himc
,
debugstr_w
(
source
),
dest
,
dest_len
,
flag
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
BOOL
WINAPI
ImeSetCompositionString
(
HIMC
himc
,
DWORD
index
,
const
void
*
comp
,
DWORD
comp_len
,
const
void
*
read
,
DWORD
read_len
)
{
FIXME
(
"himc %p, index %lu, comp %p, comp_len %lu, read %p, read_len %lu stub!
\n
"
,
himc
,
index
,
comp
,
comp_len
,
read
,
read_len
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
BOOL
WINAPI
NotifyIME
(
HIMC
himc
,
DWORD
action
,
DWORD
index
,
DWORD
value
)
{
FIXME
(
"himc %p, action %lu, index %lu, value %lu stub!
\n
"
,
himc
,
action
,
index
,
value
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
LRESULT
WINAPI
ImeEscape
(
HIMC
himc
,
UINT
escape
,
void
*
data
)
{
FIXME
(
"himc %p, escape %#x, data %p stub!
\n
"
,
himc
,
escape
,
data
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
DWORD
WINAPI
ImeGetImeMenuItems
(
HIMC
himc
,
DWORD
flags
,
DWORD
type
,
IMEMENUITEMINFOW
*
parent
,
IMEMENUITEMINFOW
*
menu
,
DWORD
size
)
{
FIXME
(
"himc %p, flags %#lx, type %lu, parent %p, menu %p, size %#lx stub!
\n
"
,
himc
,
flags
,
type
,
parent
,
menu
,
size
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
BOOL
WINAPI
ImeRegisterWord
(
const
WCHAR
*
reading
,
DWORD
style
,
const
WCHAR
*
string
)
{
FIXME
(
"reading %s, style %lu, string %s stub!
\n
"
,
debugstr_w
(
reading
),
style
,
debugstr_w
(
string
)
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
UINT
WINAPI
ImeGetRegisterWordStyle
(
UINT
item
,
STYLEBUFW
*
style
)
{
FIXME
(
"item %u, style %p stub!
\n
"
,
item
,
style
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
BOOL
WINAPI
ImeUnregisterWord
(
const
WCHAR
*
reading
,
DWORD
style
,
const
WCHAR
*
string
)
{
FIXME
(
"reading %s, style %lu, string %s stub!
\n
"
,
debugstr_w
(
reading
),
style
,
debugstr_w
(
string
)
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
UINT
WINAPI
ImeEnumRegisterWord
(
REGISTERWORDENUMPROCW
proc
,
const
WCHAR
*
reading
,
DWORD
style
,
const
WCHAR
*
string
,
void
*
data
)
{
FIXME
(
"proc %p, reading %s, style %lu, string %s, data %p stub!
\n
"
,
proc
,
debugstr_w
(
reading
),
style
,
debugstr_w
(
string
),
data
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
}
dlls/imm32/imm.c
View file @
3d694c81
...
@@ -467,6 +467,7 @@ BOOL WINAPI ImmFreeLayout( HKL hkl )
...
@@ -467,6 +467,7 @@ BOOL WINAPI ImmFreeLayout( HKL hkl )
BOOL
WINAPI
ImmLoadIME
(
HKL
hkl
)
BOOL
WINAPI
ImmLoadIME
(
HKL
hkl
)
{
{
WCHAR
buffer
[
MAX_PATH
]
=
{
0
};
WCHAR
buffer
[
MAX_PATH
]
=
{
0
};
BOOL
use_default_ime
;
struct
ime
*
ime
;
struct
ime
*
ime
;
TRACE
(
"hkl %p
\n
"
,
hkl
);
TRACE
(
"hkl %p
\n
"
,
hkl
);
...
@@ -479,17 +480,19 @@ BOOL WINAPI ImmLoadIME( HKL hkl )
...
@@ -479,17 +480,19 @@ BOOL WINAPI ImmLoadIME( HKL hkl )
if
(
!
(
ime
=
calloc
(
1
,
sizeof
(
*
ime
)
)))
return
FALSE
;
if
(
!
(
ime
=
calloc
(
1
,
sizeof
(
*
ime
)
)))
return
FALSE
;
ime
->
hkl
=
hkl
;
ime
->
hkl
=
hkl
;
if
(
!
ImmGetIMEFileNameW
(
hkl
,
buffer
,
MAX_PATH
))
ime
->
module
=
NULL
;
if
(
!
ImmGetIMEFileNameW
(
hkl
,
buffer
,
MAX_PATH
))
use_default_ime
=
TRUE
;
else
ime
->
module
=
LoadLibraryW
(
buffer
);
else
if
(
!
(
ime
->
module
=
LoadLibraryW
(
buffer
)))
use_default_ime
=
TRUE
;
else
use_default_ime
=
FALSE
;
if
(
!
ime
->
modul
e
)
if
(
use_default_im
e
)
{
{
if
(
*
buffer
)
WARN
(
"Failed to load %s, falling back to default.
\n
"
,
debugstr_w
(
buffer
)
);
if
(
*
buffer
)
WARN
(
"Failed to load %s, falling back to default.
\n
"
,
debugstr_w
(
buffer
)
);
if
(
!
(
ime
->
module
=
load_graphics_driver
()))
goto
failed
;
if
(
!
(
ime
->
module
=
load_graphics_driver
()))
ime
->
module
=
LoadLibraryW
(
L"imm32"
)
;
}
}
#define LOAD_FUNCPTR( f ) \
#define LOAD_FUNCPTR( f ) \
if (!(ime->p##f = (void *)GetProcAddress( ime->module, #f ))) \
if (!(ime->p##f = (void *)GetProcAddress( ime->module, #f )) && \
!(ime->p##f = use_default_ime ? (void *)f : NULL)) \
{ \
{ \
WARN( "Can't find function %s in HKL %p IME\n", #f, hkl ); \
WARN( "Can't find function %s in HKL %p IME\n", #f, hkl ); \
goto failed; \
goto failed; \
...
...
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