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
639c202e
Commit
639c202e
authored
Oct 21, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Use an init once function to register IME classes.
parent
7cc272cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
26 deletions
+26
-26
ime.c
dlls/winemac.drv/ime.c
+26
-24
macdrv.h
dlls/winemac.drv/macdrv.h
+0
-2
No files found.
dlls/winemac.drv/ime.c
View file @
639c202e
...
...
@@ -563,25 +563,6 @@ static void UpdateDataInDefaultIMEWindow(HIMC hIMC, HWND hwnd, BOOL showable)
UnlockRealIMC
(
hIMC
);
}
BOOL
WINAPI
ImeInquire
(
LPIMEINFO
lpIMEInfo
,
LPWSTR
lpszUIClass
,
LPCWSTR
lpszOption
)
{
TRACE
(
"
\n
"
);
IME_RegisterClasses
(
macdrv_module
);
lpIMEInfo
->
dwPrivateDataSize
=
sizeof
(
IMEPRIVATE
);
lpIMEInfo
->
fdwProperty
=
IME_PROP_UNICODE
|
IME_PROP_AT_CARET
;
lpIMEInfo
->
fdwConversionCaps
=
IME_CMODE_NATIVE
;
lpIMEInfo
->
fdwSentenceCaps
=
IME_SMODE_AUTOMATIC
;
lpIMEInfo
->
fdwUICaps
=
UI_CAP_2700
;
/* Tell App we cannot accept ImeSetCompositionString calls */
/* FIXME: Can we? */
lpIMEInfo
->
fdwSCSCaps
=
0
;
lpIMEInfo
->
fdwSelectCaps
=
SELECT_CAP_CONVERSION
;
lstrcpyW
(
lpszUIClass
,
UI_CLASS_NAME
);
return
TRUE
;
}
BOOL
WINAPI
ImeConfigure
(
HKL
hKL
,
HWND
hWnd
,
DWORD
dwMode
,
LPVOID
lpData
)
{
FIXME
(
"(%p, %p, %d, %p): stub
\n
"
,
hKL
,
hWnd
,
dwMode
,
lpData
);
...
...
@@ -1394,10 +1375,7 @@ static LRESULT WINAPI IME_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return
rc
;
}
/* Interfaces to other parts of the Mac driver */
void
IME_RegisterClasses
(
HINSTANCE
hImeInst
)
static
BOOL
WINAPI
register_classes
(
INIT_ONCE
*
once
,
void
*
param
,
void
**
context
)
{
WNDCLASSW
wndClass
;
ZeroMemory
(
&
wndClass
,
sizeof
(
WNDCLASSW
));
...
...
@@ -1405,7 +1383,7 @@ void IME_RegisterClasses(HINSTANCE hImeInst)
wndClass
.
lpfnWndProc
=
(
WNDPROC
)
IME_WindowProc
;
wndClass
.
cbClsExtra
=
0
;
wndClass
.
cbWndExtra
=
2
*
sizeof
(
LONG_PTR
);
wndClass
.
hInstance
=
hImeInst
;
wndClass
.
hInstance
=
macdrv_module
;
wndClass
.
hCursor
=
LoadCursorW
(
NULL
,
(
LPWSTR
)
IDC_ARROW
);
wndClass
.
hIcon
=
LoadIconW
(
NULL
,
(
LPWSTR
)
IDI_APPLICATION
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
...
...
@@ -1421,8 +1399,32 @@ void IME_RegisterClasses(HINSTANCE hImeInst)
WM_MSIME_RECONVERT
=
RegisterWindowMessageA
(
"MSIMEReconvert"
);
WM_MSIME_QUERYPOSITION
=
RegisterWindowMessageA
(
"MSIMEQueryPosition"
);
WM_MSIME_DOCUMENTFEED
=
RegisterWindowMessageA
(
"MSIMEDocumentFeed"
);
return
TRUE
;
}
BOOL
WINAPI
ImeInquire
(
LPIMEINFO
lpIMEInfo
,
LPWSTR
lpszUIClass
,
LPCWSTR
lpszOption
)
{
static
INIT_ONCE
init_once
=
INIT_ONCE_STATIC_INIT
;
TRACE
(
"
\n
"
);
InitOnceExecuteOnce
(
&
init_once
,
register_classes
,
NULL
,
NULL
);
lpIMEInfo
->
dwPrivateDataSize
=
sizeof
(
IMEPRIVATE
);
lpIMEInfo
->
fdwProperty
=
IME_PROP_UNICODE
|
IME_PROP_AT_CARET
;
lpIMEInfo
->
fdwConversionCaps
=
IME_CMODE_NATIVE
;
lpIMEInfo
->
fdwSentenceCaps
=
IME_SMODE_AUTOMATIC
;
lpIMEInfo
->
fdwUICaps
=
UI_CAP_2700
;
/* Tell App we cannot accept ImeSetCompositionString calls */
/* FIXME: Can we? */
lpIMEInfo
->
fdwSCSCaps
=
0
;
lpIMEInfo
->
fdwSelectCaps
=
SELECT_CAP_CONVERSION
;
lstrcpyW
(
lpszUIClass
,
UI_CLASS_NAME
);
return
TRUE
;
}
/* Interfaces to other parts of the Mac driver */
/***********************************************************************
* macdrv_im_set_text
*/
...
...
dlls/winemac.drv/macdrv.h
View file @
639c202e
...
...
@@ -210,8 +210,6 @@ extern void macdrv_status_item_mouse_move(const macdrv_event *event) DECLSPEC_HI
* Mac IME driver
*/
extern
void
IME_RegisterClasses
(
HINSTANCE
hImeInst
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_process_text_input
(
UINT
vkey
,
UINT
scan
,
UINT
repeat
,
const
BYTE
*
key_state
,
void
*
himc
)
DECLSPEC_HIDDEN
;
...
...
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