mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
[CTFMON][MSCTF][MSUTB][SDK] Add msutb.dll (stub) (#6222)
msutb.dll is the GUI back-end of Language Bar (Tipbar). - Add msutb.dll module at dll/win32/msutb/. - The implementation of msutb.dll is currently stub. - Modify msctf.spec and msctf.idl. - Add <cicero/cicutb.h>. - Adapt ctfmon.exe to these changes. CORE-19362, CORE-19363
This commit is contained in:
parent
5d9f622eeb
commit
f4460c3fcd
17 changed files with 367 additions and 25 deletions
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* PROJECT: ReactOS CTF Monitor
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: Cicero TIP Bar loader window
|
||||
* PURPOSE: Cicero Tipbar (Language Bar) loader window
|
||||
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* PROJECT: ReactOS CTF Monitor
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: Cicero TIP Bar loader window
|
||||
* PURPOSE: Cicero Tipbar (Language Bar) loader window
|
||||
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
||||
*/
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ list(APPEND SOURCE
|
|||
add_rc_deps(ctfmon.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/ctfmon.ico)
|
||||
add_executable(ctfmon ${SOURCE} ctfmon.rc)
|
||||
set_module_type(ctfmon win32gui UNICODE)
|
||||
add_dependencies(ctfmon msctf)
|
||||
add_dependencies(ctfmon msctf msutb)
|
||||
target_link_libraries(ctfmon uuid)
|
||||
add_importlibs(ctfmon msctf advapi32 shell32 user32 msvcrt kernel32)
|
||||
add_importlibs(ctfmon msctf msutb advapi32 shell32 user32 msvcrt kernel32)
|
||||
add_pch(ctfmon precomp.h SOURCE)
|
||||
add_cd_file(TARGET ctfmon DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -112,11 +112,11 @@ CRegWatcher::InitEvent(
|
|||
}
|
||||
|
||||
// Start registry watching
|
||||
error = RegNotifyChangeKeyValue(entry.hKey,
|
||||
TRUE,
|
||||
REG_NOTIFY_CHANGE_LAST_SET | REG_NOTIFY_CHANGE_NAME,
|
||||
s_ahWatchEvents[iEvent],
|
||||
TRUE);
|
||||
error = ::RegNotifyChangeKeyValue(entry.hKey,
|
||||
TRUE,
|
||||
REG_NOTIFY_CHANGE_LAST_SET | REG_NOTIFY_CHANGE_NAME,
|
||||
s_ahWatchEvents[iEvent],
|
||||
TRUE);
|
||||
return error == ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ BOOL g_bOnWow64 = FALSE; // Is the app running on WoW64?
|
|||
BOOL g_fNoRunKey = FALSE; // Don't write registry key "Run"?
|
||||
BOOL g_fJustRunKey = FALSE; // Just write registry key "Run"?
|
||||
DWORD g_dwOsInfo = 0; // The OS version info. See cicGetOSInfo
|
||||
CLoaderWnd* g_pLoaderWnd = NULL; // TIP Bar loader window
|
||||
CLoaderWnd* g_pLoaderWnd = NULL; // Tipbar loader window
|
||||
|
||||
static VOID
|
||||
ParseCommandLine(
|
||||
|
@ -209,7 +209,7 @@ InitApp(
|
|||
if (!g_bOnWow64)
|
||||
CRegWatcher::Init();
|
||||
|
||||
// Create TIP Bar loader window
|
||||
// Create Tipbar loader window
|
||||
g_pLoaderWnd = new CLoaderWnd();
|
||||
if (!g_pLoaderWnd || !g_pLoaderWnd->Init())
|
||||
return FALSE;
|
||||
|
@ -221,7 +221,7 @@ InitApp(
|
|||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
|
||||
// Display TIP Bar Popup if x86/x64 native
|
||||
// Display Tipbar Popup if x86/x64 native and necessary
|
||||
if (!g_bOnWow64)
|
||||
GetPopupTipbar(g_pLoaderWnd->m_hWnd, g_fWinLogon);
|
||||
|
||||
|
@ -234,7 +234,7 @@ InitApp(
|
|||
VOID
|
||||
UninitApp(VOID)
|
||||
{
|
||||
// Close TIP Bar Popup
|
||||
// Close Tipbar Popup
|
||||
ClosePopupTipbar();
|
||||
|
||||
// Release Cicero
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <ctfutb.h>
|
||||
#include <ctffunc.h>
|
||||
#include <cicero/cicbase.h>
|
||||
#include <cicero/cicutb.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
|
@ -43,13 +44,3 @@ typedef enum WATCH_INDEX
|
|||
WI_ASSEMBLIES = 11,
|
||||
WI_DESKTOP_SWITCH = 12,
|
||||
} WATCH_INDEX;
|
||||
|
||||
// FIXME: Use msutb.dll and header
|
||||
static inline void ClosePopupTipbar(void)
|
||||
{
|
||||
}
|
||||
|
||||
// FIXME: Use msutb.dll and header
|
||||
static inline void GetPopupTipbar(HWND hwnd, BOOL fWinLogon)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ add_subdirectory(msrle32)
|
|||
add_subdirectory(mssign32)
|
||||
add_subdirectory(mssip32)
|
||||
add_subdirectory(mstask)
|
||||
add_subdirectory(msutb)
|
||||
add_subdirectory(msv1_0)
|
||||
add_subdirectory(msvcrt)
|
||||
add_subdirectory(msvcrt20)
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
@ stub TF_CUASAppFix
|
||||
@ stub TF_CheckThreadInputIdle
|
||||
@ stub TF_ClearLangBarAddIns
|
||||
@ stub TF_CreateCategoryMgr
|
||||
@ stdcall -stub TF_CreateCategoryMgr(ptr)
|
||||
@ stdcall -stub TF_CreateCicLoadMutex(ptr)
|
||||
@ stub TF_CreateDisplayAttributeMgr
|
||||
@ stdcall -stub TF_CreateDisplayAttributeMgr(ptr)
|
||||
@ stdcall TF_CreateInputProcessorProfiles(ptr)
|
||||
@ stdcall TF_CreateLangBarItemMgr(ptr)
|
||||
@ stdcall TF_CreateLangBarMgr(ptr)
|
||||
|
|
19
dll/win32/msutb/CMakeLists.txt
Normal file
19
dll/win32/msutb/CMakeLists.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
spec2def(msutb.dll msutb.spec ADD_IMPORTLIB)
|
||||
|
||||
list(APPEND SOURCE
|
||||
msutb.cpp)
|
||||
|
||||
#file(GLOB msutb_rc_deps res/*.*)
|
||||
#add_rc_deps(msutb.rc ${msutb_rc_deps})
|
||||
|
||||
add_library(msutb MODULE
|
||||
${SOURCE}
|
||||
msutb.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/msutb.def)
|
||||
set_module_type(msutb win32dll UNICODE)
|
||||
add_dependencies(msutb msctf psdk)
|
||||
target_link_libraries(msutb wine uuid atl_classes)
|
||||
add_importlibs(msutb user32 gdi32 advapi32 comctl32 msvcrt kernel32 ntdll)
|
||||
add_delay_importlibs(msutb msctf ole32 oleaut32)
|
||||
add_cd_file(TARGET msutb DESTINATION reactos/system32 FOR all)
|
19
dll/win32/msutb/lang/en-US.rc
Normal file
19
dll/win32/msutb/lang/en-US.rc
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* PROJECT: ReactOS msutb.dll
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: English (United States) resource file
|
||||
* TRANSLATOR: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_OK "OK"
|
||||
IDS_CANCEL "Cancel"
|
||||
IDS_ABORT "&Abort"
|
||||
IDS_RETRY "&Retry"
|
||||
IDS_IGNORE "&Ignore"
|
||||
IDS_YES "&Yes"
|
||||
IDS_NO "&No"
|
||||
END
|
221
dll/win32/msutb/msutb.cpp
Normal file
221
dll/win32/msutb/msutb.cpp
Normal file
|
@ -0,0 +1,221 @@
|
|||
/*
|
||||
* PROJECT: ReactOS msutb.dll
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: Language Bar (Tipbar)
|
||||
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msutb);
|
||||
|
||||
HINSTANCE g_hInst = NULL;
|
||||
UINT g_wmTaskbarCreated = 0;
|
||||
UINT g_uACP = CP_ACP;
|
||||
DWORD g_dwOSInfo = 0;
|
||||
CRITICAL_SECTION g_cs;
|
||||
|
||||
EXTERN_C void __cxa_pure_virtual(void)
|
||||
{
|
||||
ERR("__cxa_pure_virtual\n");
|
||||
}
|
||||
|
||||
class CMsUtbModule : public CComModule
|
||||
{
|
||||
};
|
||||
|
||||
BEGIN_OBJECT_MAP(ObjectMap)
|
||||
//OBJECT_ENTRY(CLSID_MSUTBDeskBand, CDeskBand) // FIXME: Implement this
|
||||
END_OBJECT_MAP()
|
||||
|
||||
CMsUtbModule gModule;
|
||||
|
||||
/***********************************************************************
|
||||
* GetLibTls (MSUTB.@)
|
||||
*
|
||||
* @unimplemented
|
||||
*/
|
||||
EXTERN_C LPVOID WINAPI
|
||||
GetLibTls(VOID)
|
||||
{
|
||||
FIXME("stub:()\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetPopupTipbar (MSUTB.@)
|
||||
*
|
||||
* @unimplemented
|
||||
*/
|
||||
EXTERN_C BOOL WINAPI
|
||||
GetPopupTipbar(HWND hWnd, BOOL fWinLogon)
|
||||
{
|
||||
FIXME("stub:(%p, %d)\n", hWnd, fWinLogon);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetRegisterLangBand (MSUTB.@)
|
||||
*
|
||||
* @unimplemented
|
||||
*/
|
||||
EXTERN_C HRESULT WINAPI
|
||||
SetRegisterLangBand(BOOL bRegister)
|
||||
{
|
||||
FIXME("stub:(%d)\n", bRegister);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* ClosePopupTipbar (MSUTB.@)
|
||||
*
|
||||
* @unimplemented
|
||||
*/
|
||||
EXTERN_C VOID WINAPI
|
||||
ClosePopupTipbar(VOID)
|
||||
{
|
||||
FIXME("stub:()\n");
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (MSUTB.@)
|
||||
*
|
||||
* @implemented
|
||||
*/
|
||||
STDAPI DllRegisterServer(VOID)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return gModule.DllRegisterServer(FALSE);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer (MSUTB.@)
|
||||
*
|
||||
* @implemented
|
||||
*/
|
||||
STDAPI DllUnregisterServer(VOID)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return gModule.DllUnregisterServer(FALSE);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllCanUnloadNow (MSUTB.@)
|
||||
*
|
||||
* @implemented
|
||||
*/
|
||||
STDAPI DllCanUnloadNow(VOID)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return gModule.DllCanUnloadNow();
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject (MSUTB.@)
|
||||
*
|
||||
* @implemented
|
||||
*/
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return gModule.DllGetClassObject(rclsid, riid, ppv);
|
||||
}
|
||||
|
||||
/**
|
||||
* @unimplemented
|
||||
*/
|
||||
VOID InitUIFLib(VOID)
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
|
||||
/**
|
||||
* @unimplemented
|
||||
*/
|
||||
VOID DoneUIFLib(VOID)
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
|
||||
/**
|
||||
* @implemented
|
||||
*/
|
||||
HRESULT APIENTRY
|
||||
MsUtbCoCreateInstance(
|
||||
REFCLSID rclsid,
|
||||
LPUNKNOWN pUnkOuter,
|
||||
DWORD dwClsContext,
|
||||
REFIID iid,
|
||||
LPVOID *ppv)
|
||||
{
|
||||
if (IsEqualCLSID(rclsid, CLSID_TF_CategoryMgr))
|
||||
return TF_CreateCategoryMgr((ITfCategoryMgr**)ppv);
|
||||
if (IsEqualCLSID(rclsid, CLSID_TF_DisplayAttributeMgr))
|
||||
return TF_CreateDisplayAttributeMgr((ITfDisplayAttributeMgr **)ppv);
|
||||
return cicRealCoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv);
|
||||
}
|
||||
|
||||
/**
|
||||
* @unimplemented
|
||||
*/
|
||||
BOOL ProcessAttach(HINSTANCE hinstDLL)
|
||||
{
|
||||
::InitializeCriticalSectionAndSpinCount(&g_cs, 0);
|
||||
|
||||
g_hInst = hinstDLL;
|
||||
|
||||
cicGetOSInfo(&g_uACP, &g_dwOSInfo);
|
||||
|
||||
TFInitLib(MsUtbCoCreateInstance);
|
||||
InitUIFLib();
|
||||
|
||||
//CTrayIconWnd::RegisterClassW(); //FIXME
|
||||
|
||||
g_wmTaskbarCreated = RegisterWindowMessageW(L"TaskbarCreated");
|
||||
|
||||
gModule.Init(ObjectMap, hinstDLL, NULL);
|
||||
::DisableThreadLibraryCalls(hinstDLL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @implemented
|
||||
*/
|
||||
VOID ProcessDetach(HINSTANCE hinstDLL)
|
||||
{
|
||||
DoneUIFLib();
|
||||
TFUninitLib();
|
||||
::DeleteCriticalSection(&g_cs);
|
||||
gModule.Term();
|
||||
}
|
||||
|
||||
/**
|
||||
* @implemented
|
||||
*/
|
||||
EXTERN_C BOOL WINAPI
|
||||
DllMain(
|
||||
_In_ HINSTANCE hinstDLL,
|
||||
_In_ DWORD dwReason,
|
||||
_Inout_opt_ LPVOID lpvReserved)
|
||||
{
|
||||
switch (dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
TRACE("(%p, %lu, %p)\n", hinstDLL, dwReason, lpvReserved);
|
||||
if (!ProcessAttach(hinstDLL))
|
||||
{
|
||||
ProcessDetach(hinstDLL);
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DLL_PROCESS_DETACH:
|
||||
{
|
||||
ProcessDetach(hinstDLL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
28
dll/win32/msutb/msutb.rc
Normal file
28
dll/win32/msutb/msutb.rc
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* PROJECT: ReactOS msutb.dll
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: Resource of msutb.dll
|
||||
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
||||
*/
|
||||
|
||||
#include <windef.h>
|
||||
#include <winuser.rh>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
||||
#define REACTOS_VERSION_DLL
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS msutb.dll"
|
||||
#define REACTOS_STR_INTERNAL_NAME "msutb"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "msutb.dll"
|
||||
#include <reactos/version.rc>
|
||||
|
||||
#include <reactos/manifest_hosted.rc>
|
||||
|
||||
/* UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
||||
#ifdef LANGUAGE_EN_US
|
||||
#include "lang/en-US.rc"
|
||||
#endif
|
8
dll/win32/msutb/msutb.spec
Normal file
8
dll/win32/msutb/msutb.spec
Normal file
|
@ -0,0 +1,8 @@
|
|||
@ stdcall ClosePopupTipbar()
|
||||
@ stdcall -private DllCanUnloadNow()
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stdcall -private DllRegisterServer()
|
||||
@ stdcall -private DllUnregisterServer()
|
||||
@ stdcall GetLibTls()
|
||||
@ stdcall GetPopupTipbar(ptr long)
|
||||
@ stdcall SetRegisterLangBand(long)
|
31
dll/win32/msutb/precomp.h
Normal file
31
dll/win32/msutb/precomp.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* PROJECT: ReactOS msutb.dll
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: Language Bar (Tipbar)
|
||||
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define WIN32_NO_STATUS
|
||||
#define COBJMACROS
|
||||
#define INITGUID
|
||||
|
||||
#include <windows.h>
|
||||
#include <imm.h>
|
||||
#include <ddk/immdev.h>
|
||||
#include <cguid.h>
|
||||
#include <msctf.h>
|
||||
#include <ctffunc.h>
|
||||
#include <shlwapi.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <strsafe.h>
|
||||
#undef STATUS_NO_MEMORY
|
||||
#include <cicero/cicbase.h>
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
#include "resource.h"
|
9
dll/win32/msutb/resource.h
Normal file
9
dll/win32/msutb/resource.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#define IDS_OK 100
|
||||
#define IDS_CANCEL 101
|
||||
#define IDS_ABORT 102
|
||||
#define IDS_RETRY 103
|
||||
#define IDS_IGNORE 104
|
||||
#define IDS_YES 105
|
||||
#define IDS_NO 106
|
|
@ -41,6 +41,8 @@ cpp_quote("EXTERN_C HANDLE WINAPI TF_CreateCicLoadMutex(_Out_ LPBOOL pfWinLogon
|
|||
cpp_quote("EXTERN_C HRESULT WINAPI TF_InvalidAssemblyListCache(VOID);")
|
||||
cpp_quote("EXTERN_C HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist(VOID);")
|
||||
cpp_quote("EXTERN_C HRESULT WINAPI TF_DllDetachInOther(VOID);")
|
||||
cpp_quote("EXTERN_C HRESULT WINAPI TF_CreateCategoryMgr(ITfCategoryMgr **ppcat);")
|
||||
cpp_quote("EXTERN_C HRESULT WINAPI TF_CreateDisplayAttributeMgr(ITfDisplayAttributeMgr **ppdam);")
|
||||
|
||||
cpp_quote("EXTERN_C const GUID GUID_PROP_TEXTOWNER;")
|
||||
cpp_quote("EXTERN_C const GUID GUID_PROP_ATTRIBUTE;")
|
||||
|
|
13
sdk/include/reactos/cicero/cicutb.h
Normal file
13
sdk/include/reactos/cicero/cicutb.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Kernel
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Private header for msutb.dll
|
||||
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
EXTERN_C LPVOID WINAPI GetLibTls(VOID);
|
||||
EXTERN_C BOOL WINAPI GetPopupTipbar(HWND hWnd, BOOL fWinLogon);
|
||||
EXTERN_C HRESULT WINAPI SetRegisterLangBand(BOOL bRegister);
|
||||
EXTERN_C VOID WINAPI ClosePopupTipbar(VOID);
|
Loading…
Reference in a new issue