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
85722666
Commit
85722666
authored
Dec 16, 2000
by
Hidenori Takeshima
Committed by
Alexandre Julliard
Dec 16, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented some APIs and IME class - far from complete.
parent
34c9f9fb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
212 additions
and
31 deletions
+212
-31
Makefile.in
dlls/imm32/Makefile.in
+1
-0
imewnd.c
dlls/imm32/imewnd.c
+202
-0
imm.c
dlls/imm32/imm.c
+0
-26
imm_private.h
dlls/imm32/imm_private.h
+7
-3
main.c
dlls/imm32/main.c
+2
-2
No files found.
dlls/imm32/Makefile.in
View file @
85722666
...
...
@@ -9,6 +9,7 @@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE
=
$(MODULE)
.tmp.o
C_SRCS
=
\
imewnd.c
\
imm.c
\
main.c
\
memory.c
\
...
...
dlls/imm32/imewnd.c
0 → 100644
View file @
85722666
/*
* Implementation of the 'IME window' class
*
* Copyright 2000 Hidenori Takeshima
*
*
* FIXME:
* - handle all messages.
* - handle all notifications.
*/
#include "config.h"
#include "winbase.h"
#include "windef.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "immddk.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
imm
);
#include "imm_private.h"
static
CHAR
IMM32_szIMEClass
[]
=
"IME"
;
typedef
struct
{
int
dummy
;
}
IMM32_IMEWNDPARAM
;
static
BOOL
IMM32_IsUIMessage
(
UINT
nMsg
);
static
LRESULT
CALLBACK
IMM32_IMEWndProc
(
HWND
hwnd
,
UINT
nMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
IMM32_IMEWNDPARAM
*
pParam
=
(
IMM32_IMEWNDPARAM
*
)
GetWindowLongA
(
hwnd
,
0L
);
if
(
nMsg
==
WM_CREATE
)
{
pParam
=
(
IMM32_IMEWNDPARAM
*
)
IMM32_HeapAlloc
(
HEAP_ZERO_MEMORY
,
sizeof
(
IMM32_IMEWNDPARAM
)
);
if
(
pParam
==
NULL
)
return
-
1L
;
SetWindowLongA
(
hwnd
,
0L
,
(
LONG
)
pParam
);
/* FIXME - Initialize pParam. */
return
0
;
}
else
if
(
nMsg
==
WM_DESTROY
)
{
/* FIXME - Uninitialize pParam. */
IMM32_HeapFree
(
pParam
);
SetWindowLongA
(
hwnd
,
0L
,
(
LONG
)
NULL
);
return
0
;
}
if
(
pParam
==
NULL
)
{
if
(
IMM32_IsUIMessage
(
nMsg
)
)
return
0
;
return
DefWindowProcA
(
hwnd
,
nMsg
,
wParam
,
lParam
);
}
/* FIXME - handle all messages. */
/* FIXME - handle all notifications. */
if
(
IMM32_IsUIMessage
(
nMsg
)
)
return
0
;
return
DefWindowProcA
(
hwnd
,
nMsg
,
wParam
,
lParam
);
}
/***********************************************************************
* IMM32_RegisterClass (internal)
*/
BOOL
IMM32_RegisterIMEWndClass
(
HINSTANCE
hInstDLL
)
{
WNDCLASSA
wc
;
/* SDK says the "IME" window class is a system global class. */
wc
.
style
=
CS_GLOBALCLASS
;
wc
.
lpfnWndProc
=
IMM32_IMEWndProc
;
wc
.
cbClsExtra
=
0
;
wc
.
cbWndExtra
=
sizeof
(
LONG
);
wc
.
hInstance
=
hInstDLL
;
wc
.
hIcon
=
LoadIconA
((
HINSTANCE
)
NULL
,
IDI_APPLICATIONA
);
wc
.
hCursor
=
LoadCursorA
((
HINSTANCE
)
NULL
,
IDC_IBEAMA
);
wc
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
/* FIXME? */
wc
.
lpszMenuName
=
NULL
;
wc
.
lpszClassName
=
IMM32_szIMEClass
;
if
(
!
RegisterClassA
(
&
wc
)
)
return
FALSE
;
return
TRUE
;
}
/***********************************************************************
* IMM32_UnregisterClass (internal)
*/
void
IMM32_UnregisterIMEWndClass
(
HINSTANCE
hInstDLL
)
{
(
void
)
UnregisterClassA
(
IMM32_szIMEClass
,
hInstDLL
);
}
static
BOOL
IMM32_IsUIMessage
(
UINT
nMsg
)
{
switch
(
nMsg
)
{
case
WM_IME_STARTCOMPOSITION
:
case
WM_IME_ENDCOMPOSITION
:
case
WM_IME_COMPOSITION
:
case
WM_IME_SETCONTEXT
:
case
WM_IME_NOTIFY
:
case
WM_IME_COMPOSITIONFULL
:
case
WM_IME_SELECT
:
case
0x287
:
/* What is this message? IMM32.DLL returns TRUE. */
return
TRUE
;
}
return
FALSE
;
}
/***********************************************************************
* ImmIsUIMessageA (IMM32.@)
*/
BOOL
WINAPI
ImmIsUIMessageA
(
HWND
hwndIME
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
TRACE
(
"(0x%08x, %d, %d, %ld)
\n
"
,
hwndIME
,
msg
,
wParam
,
lParam
);
if
(
!
IMM32_IsUIMessage
(
msg
)
)
return
FALSE
;
if
(
hwndIME
==
(
HWND
)
NULL
)
return
TRUE
;
switch
(
msg
)
{
case
WM_IME_STARTCOMPOSITION
:
case
WM_IME_ENDCOMPOSITION
:
case
WM_IME_COMPOSITION
:
case
WM_IME_SETCONTEXT
:
case
WM_IME_NOTIFY
:
case
WM_IME_COMPOSITIONFULL
:
case
WM_IME_SELECT
:
SendMessageA
(
hwndIME
,
msg
,
wParam
,
lParam
);
break
;
case
0x287
:
/* What is this message? */
FIXME
(
"(0x%08x, %d, %d, %ld) - unknown message 0x287.
\n
"
,
hwndIME
,
msg
,
wParam
,
lParam
);
SendMessageA
(
hwndIME
,
msg
,
wParam
,
lParam
);
break
;
}
return
TRUE
;
}
/***********************************************************************
* ImmIsUIMessageW (IMM32.@)
*/
BOOL
WINAPI
ImmIsUIMessageW
(
HWND
hwndIME
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
TRACE
(
"(0x%08x, %d, %d, %ld)
\n
"
,
hwndIME
,
msg
,
wParam
,
lParam
);
if
(
!
IMM32_IsUIMessage
(
msg
)
)
return
FALSE
;
if
(
hwndIME
==
(
HWND
)
NULL
)
return
TRUE
;
switch
(
msg
)
{
case
WM_IME_STARTCOMPOSITION
:
case
WM_IME_ENDCOMPOSITION
:
case
WM_IME_COMPOSITION
:
case
WM_IME_SETCONTEXT
:
case
WM_IME_NOTIFY
:
case
WM_IME_COMPOSITIONFULL
:
case
WM_IME_SELECT
:
SendMessageW
(
hwndIME
,
msg
,
wParam
,
lParam
);
break
;
case
0x287
:
/* What is this message? */
FIXME
(
"(0x%08x, %d, %d, %ld) - unknown message 0x287.
\n
"
,
hwndIME
,
msg
,
wParam
,
lParam
);
SendMessageW
(
hwndIME
,
msg
,
wParam
,
lParam
);
break
;
}
return
TRUE
;
}
dlls/imm32/imm.c
View file @
85722666
...
...
@@ -519,32 +519,6 @@ BOOL WINAPI ImmIsIME(HKL hKL)
}
/***********************************************************************
* ImmIsUIMessageA (IMM32.@)
*/
BOOL
WINAPI
ImmIsUIMessageA
(
HWND
hWndIME
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
FIXME
(
"(0x%08x, %d, %d, %ld): stub
\n
"
,
hWndIME
,
msg
,
wParam
,
lParam
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
/***********************************************************************
* ImmIsUIMessageW (IMM32.@)
*/
BOOL
WINAPI
ImmIsUIMessageW
(
HWND
hWndIME
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
FIXME
(
"(0x%08x, %d, %d, %ld): stub
\n
"
,
hWndIME
,
msg
,
wParam
,
lParam
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
/***********************************************************************
* ImmNotifyIME (IMM32.@)
*/
BOOL
WINAPI
ImmNotifyIME
(
...
...
dlls/imm32/imm_private.h
View file @
85722666
...
...
@@ -121,13 +121,13 @@ struct IMM32_IME_EXPORTED_HANDLERS
/*
imm_
main.c */
/* main.c */
LPVOID
IMM32_HeapAlloc
(
DWORD
dwFlags
,
DWORD
dwSize
);
LPVOID
IMM32_HeapReAlloc
(
DWORD
dwFlags
,
LPVOID
lpv
,
DWORD
dwSize
);
void
IMM32_HeapFree
(
LPVOID
lpv
);
IMM32_THREADDATA
*
IMM32_GetThreadData
(
void
);
/*
imm_
memory.c */
/* memory.c */
IMM32_MOVEABLEMEM
*
IMM32_MoveableAlloc
(
DWORD
dwHeapFlags
,
DWORD
dwHeapSize
);
void
IMM32_MoveableFree
(
IMM32_MOVEABLEMEM
*
lpMoveable
);
BOOL
IMM32_MoveableReAlloc
(
IMM32_MOVEABLEMEM
*
lpMoveable
,
...
...
@@ -137,7 +137,7 @@ BOOL IMM32_MoveableUnlock( IMM32_MOVEABLEMEM* lpMoveable );
DWORD
IMM32_MoveableGetLockCount
(
IMM32_MOVEABLEMEM
*
lpMoveable
);
DWORD
IMM32_MoveableGetSize
(
IMM32_MOVEABLEMEM
*
lpMoveable
);
/*
imm_
string.c */
/* string.c */
INT
IMM32_strlenAtoW
(
LPCSTR
lpstr
);
INT
IMM32_strlenWtoA
(
LPCWSTR
lpwstr
);
LPWSTR
IMM32_strncpyAtoW
(
LPWSTR
lpwstr
,
LPCSTR
lpstr
,
INT
wbuflen
);
...
...
@@ -145,4 +145,8 @@ LPSTR IMM32_strncpyWtoA( LPSTR lpstr, LPCWSTR lpwstr, INT abuflen );
LPWSTR
IMM32_strdupAtoW
(
LPCSTR
lpstr
);
LPSTR
IMM32_strdupWtoA
(
LPCWSTR
lpwstr
);
/* imewnd.c */
BOOL
IMM32_RegisterIMEWndClass
(
HINSTANCE
hInstDLL
);
void
IMM32_UnregisterIMEWndClass
(
HINSTANCE
hInstDLL
);
dlls/imm32/main.c
View file @
85722666
...
...
@@ -48,11 +48,11 @@ BOOL WINAPI IMM32_DllMain(
IMM32_dwProcessAttached
++
;
IMM32_InitProcessMem
();
/*IMM32_RegisterIMEWndClass( hInstDLL );*/
IMM32_RegisterIMEWndClass
(
hInstDLL
);
break
;
case
DLL_PROCESS_DETACH
:
/*IMM32_UnloadAllIMEs();*/
/*IMM32_UnregisterIMEWndClass( hInstDLL );*/
IMM32_UnregisterIMEWndClass
(
hInstDLL
);
IMM32_CleanupProcessMem
();
IMM32_dwProcessAttached
--
;
...
...
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