Commit bc1b1521 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winex11: Move IME UI proc to default IME implementation.

parent a5117ed5
......@@ -20,37 +20,24 @@
*/
#define COBJMACROS
#include <stdarg.h>
#include <stdio.h>
#include "initguid.h"
#include "objbase.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "ntuser.h"
#include "winerror.h"
#include "wine/debug.h"
#include "imm.h"
#include "immdev.h"
#include "winnls.h"
#include "winreg.h"
#include "wine/list.h"
#include "imm_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(imm);
#define IMM_INIT_MAGIC 0x19650412
BOOL WINAPI User32InitializeImmEntryTable(DWORD);
HMODULE imm32_module;
/* MSIME messages */
static UINT WM_MSIME_SERVICE;
static UINT WM_MSIME_RECONVERTOPTIONS;
static UINT WM_MSIME_MOUSE;
static UINT WM_MSIME_RECONVERTREQUEST;
static UINT WM_MSIME_RECONVERT;
static UINT WM_MSIME_QUERYPOSITION;
static UINT WM_MSIME_DOCUMENTFEED;
UINT WM_MSIME_SERVICE;
UINT WM_MSIME_RECONVERTOPTIONS;
UINT WM_MSIME_MOUSE;
UINT WM_MSIME_RECONVERTREQUEST;
UINT WM_MSIME_RECONVERT;
UINT WM_MSIME_QUERYPOSITION;
UINT WM_MSIME_DOCUMENTFEED;
struct ime
{
......@@ -709,28 +696,28 @@ static void IMM_FreeAllImmHkl(void)
}
}
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved )
{
TRACE("%p, %lx, %p\n",hInstDLL,fdwReason,lpReserved);
switch (fdwReason)
TRACE( "instance %p, reason %lx, reserved %p\n", instance, reason, reserved );
switch (reason)
{
case DLL_PROCESS_ATTACH:
if (!User32InitializeImmEntryTable(IMM_INIT_MAGIC))
{
return FALSE;
}
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
IMM_FreeThreadData();
break;
case DLL_PROCESS_DETACH:
if (lpReserved) break;
IMM_FreeThreadData();
IMM_FreeAllImmHkl();
break;
case DLL_PROCESS_ATTACH:
if (!User32InitializeImmEntryTable( IMM_INIT_MAGIC )) return FALSE;
imm32_module = instance;
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
IMM_FreeThreadData();
break;
case DLL_PROCESS_DETACH:
if (reserved) break;
IMM_FreeThreadData();
IMM_FreeAllImmHkl();
break;
}
return TRUE;
}
......
/*
* 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 "winnls.h"
#include "winreg.h"
#include "imm.h"
#include "immdev.h"
#include "ntuser.h"
#include "objbase.h"
#include "wine/debug.h"
#include "wine/list.h"
extern HMODULE imm32_module;
/* MSIME messages */
extern UINT WM_MSIME_SERVICE;
extern UINT WM_MSIME_RECONVERTOPTIONS;
extern UINT WM_MSIME_MOUSE;
extern UINT WM_MSIME_RECONVERTREQUEST;
extern UINT WM_MSIME_RECONVERT;
extern UINT WM_MSIME_QUERYPOSITION;
extern UINT WM_MSIME_DOCUMENTFEED;
......@@ -43,16 +43,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm);
#define FROM_MACDRV ((HIMC)0xcafe1337)
typedef struct ime_private
{
BOOL bInComposition;
BOOL bInternalState;
HFONT textfont;
HWND hwndDefault;
UINT repeat;
} IMEPRIVATE, *LPIMEPRIVATE;
static const WCHAR UI_CLASS_NAME[] = {'W','i','n','e',' ','M','a','c',' ','I','M','E',0};
static HIMC *hSelectedFrom = NULL;
......
......@@ -11,8 +11,6 @@
@ cdecl wine_notify_icon(long ptr)
#IME Interface
@ stdcall ImeInquire(ptr ptr wstr)
@ stdcall ImeDestroy(long)
@ stdcall ImeSelect(long long)
@ stdcall ImeToAsciiEx(long long ptr ptr long long)
@ stdcall NotifyIME(long long long long)
......
......@@ -490,6 +490,16 @@ enum wine_internal_message
#define IME_INTERNAL_HKL_ACTIVATE 0x19
#define IME_INTERNAL_HKL_DEACTIVATE 0x20
/* internal IME private */
typedef struct ime_private
{
BOOL bInComposition;
BOOL bInternalState;
HFONT textfont;
HWND hwndDefault;
UINT repeat;
} IMEPRIVATE, *LPIMEPRIVATE;
#define WM_SYSTIMER 0x0118
/* the various structures that can be sent in messages, in platform-independent layout */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment