ReactOS 0.4.15-dev-8131-g4988de4
msutb.cpp File Reference
#include "precomp.h"
Include dependency graph for msutb.cpp:

Go to the source code of this file.

Classes

struct  LANGBARITEMSTATE
 
class  CMsUtbModule
 
struct  CShellWndThread
 
class  CUTBLangBarDlg
 
class  CUTBCloseLangBarDlg
 
class  CUTBMinimizeLangBarDlg
 
class  CCicLibMenu
 
class  CCicLibMenuItem
 
class  CTipbarAccessible
 
class  CTipbarAccItem
 
class  CTipbarCoInitialize
 
class  CUTBMenuWnd
 
class  CUTBMenuItem
 
class  CModalMenu
 
class  CUTBContextMenu
 
class  CUTBLBarMenu
 
class  CUTBLBarMenuItem
 
class  CTipbarGripper
 
class  CLangBarItemList
 
class  CTrayIconWnd
 
class  CTrayIconItem
 
class  CButtonIconItem
 
class  CMainIconItem
 
class  CLBarItemBase
 
class  CLBarItemButtonBase
 
class  CLBarInatItem
 Language Bar international item. More...
 
class  CTipbarThread
 
class  CTipbarItem
 
class  CTipbarWnd
 

Macros

#define TIMER_ID_DOACCDEFAULTACTION   11
 

Typedefs

typedef struct LANGBARITEMSTATE LANGBARITEMSTATE
 
typedef struct LANGBARITEMSTATEPLANGBARITEMSTATE
 

Enumerations

enum  {
  TIPBAR_ATTACHED = 0x1 , TIPBAR_CHILD = 0x2 , TIPBAR_VERTICAL = 0x4 , TIPBAR_HIGHCONTRAST = 0x10 ,
  TIPBAR_TRAYICON = 0x20 , TIPBAR_UPDATING = 0x400 , TIPBAR_ENSURING = 0x2000 , TIPBAR_NODESKBAND = 0x4000 ,
  TIPBAR_TOOLBARENDED = 0x10000 , TIPBAR_TOPFIT = 0x40000 , TIPBAR_BOTTOMFIT = 0x80000 , TIPBAR_RIGHTFIT = 0x100000 ,
  TIPBAR_LEFTFIT = 0x200000
}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msutb)
 
EXTERN_C void __cxa_pure_virtual (void)
 
BOOL IsSkipRedrawHKL (HKL hSkipKL)
 
BOOL IsBiDiLocalizedSystem (void)
 
BOOL GetFontSig (HWND hWnd, HKL hKL)
 
void InitSkipRedrawHKLArray (void)
 
void UninitSkipRedrawHKLArray (void)
 
HRESULT GetGlobalCompartment (REFGUID rguid, ITfCompartment **ppComp)
 
HRESULT GetGlobalCompartmentDWORD (REFGUID rguid, LPDWORD pdwValue)
 
HRESULT SetGlobalCompartmentDWORD (REFGUID rguid, DWORD dwValue)
 
void TurnOffSpeechIfItsOn (void)
 
void DoCloseLangbar (void)
 
INT GetIconIndexFromhKL (_In_ HKL hKL)
 
BOOL GethKLDesc (_In_ HKL hKL, _Out_ LPWSTR pszDesc, _In_ UINT cchDesc)
 
HRESULT LangBarInsertMenu (_In_ ITfMenu *pMenu, _In_ UINT uId, _In_ LPCWSTR pszText, _In_ BOOL bChecked, _Inout_opt_ HICON hIcon)
 
HRESULT LangBarInsertSeparator (_In_ ITfMenu *pMenu)
 
BOOL IsFELangId (LANGID LangID)
 
BOOL CheckCloseMenuAvailable (void)
 
BOOL IsTransparecyAvailable (void)
 @unimplemented
 
static INT CALLBACK FindEAEnumFontProc (ENUMLOGFONT *pLF, NEWTEXTMETRIC *pTM, INT nFontType, LPARAM lParam)
 
BOOL CheckEAFonts (void)
 Are there East-Asian vertical fonts?
 
BOOL IsDeskBandFromReg ()
 
void SetDeskBandToReg (BOOL bShow)
 
BOOL RegisterComCat (REFCLSID rclsid, REFCATID rcatid, BOOL bRegister)
 
BOOL InitFromReg (void)
 
 STDMETHODIMP_ (BOOL) CButtonIconItem
 @unimplemented
 
 STDMETHODIMP_ (void) CTipbarGripper
 @unimplemented
 
 STDMETHODIMP_ (CCicLibMenu *) CCicLibMenu
 
 STDMETHODIMP_ (CCicLibMenuItem *) CCicLibMenu
 
 STDMETHODIMP_ (BSTR) CUTBMenuWnd
 
 STDMETHODIMP_ (INT) CUTBMenuItem
 @unimplemented
 
LONG MyWaitForInputIdle (DWORD dwThreadId, DWORD dwMilliseconds)
 
 STDMETHODIMP_ (DWORD) CTipbarWnd
 
 STDMETHODIMP_ (LPCWSTR) CTipbarItem
 
BOOL GetTipbarInternal (HWND hWnd, DWORD dwFlags, CDeskBand *pDeskBand)
 
EXTERN_C PCIC_LIBTHREAD 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)
 
STDAPI DllRegisterServer (VOID)
 
STDAPI DllUnregisterServer (VOID)
 
STDAPI DllCanUnloadNow (VOID)
 
STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
HRESULT APIENTRY MsUtbCoCreateInstance (REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
 @implemented
 
EXTERN_C VOID TFUninitLib (VOID)
 
BOOL ProcessAttach (HINSTANCE hinstDLL)
 @implemented
 
VOID ProcessDetach (HINSTANCE hinstDLL)
 @implemented
 
EXTERN_C BOOL WINAPI DllMain (_In_ HINSTANCE hinstDLL, _In_ DWORD dwReason, _Inout_opt_ LPVOID lpvReserved)
 @implemented
 

Variables

HINSTANCE g_hInst = NULL
 
UINT g_wmTaskbarCreated = 0
 
UINT g_uACP = CP_ACP
 
DWORD g_dwOSInfo = 0
 
CRITICAL_SECTION g_cs
 
LONG g_DllRefCount = 0
 
BOOL g_bWinLogon = FALSE
 
BOOL g_fInClosePopupTipbar = FALSE
 
HWND g_hwndParent = NULL
 
CIC_LIBTHREAD g_libTLS = { NULL, NULL }
 
BOOL g_bEnableDeskBand = FALSE
 
BOOL g_bShowTipbar = TRUE
 
BOOL g_bShowDebugMenu = FALSE
 
BOOL g_bNewLook = TRUE
 
BOOL g_bIntelliSense = FALSE
 
BOOL g_bShowCloseMenu = FALSE
 
UINT g_uTimeOutNonIntentional = 60 * 1000
 
UINT g_uTimeOutIntentional = 10 * 60 * 1000
 
UINT g_uTimeOutMax = 60 * 60 * 1000
 
BOOL g_bShowMinimizedBalloon = TRUE
 
POINT g_ptTipbar = { -1, -1 }
 
BOOL g_bExcludeCaptionButtons = TRUE
 
BOOL g_bShowShadow = FALSE
 
BOOL g_fTaskbarTheme = TRUE
 
BOOL g_fVertical = FALSE
 
UINT g_uTimerElapseSTUBSTART = 100
 
UINT g_uTimerElapseSTUBEND = 2 * 1000
 
UINT g_uTimerElapseBACKTOALPHA = 3 * 1000
 
UINT g_uTimerElapseONTHREADITEMCHANGE = 200
 
UINT g_uTimerElapseSETWINDOWPOS = 100
 
UINT g_uTimerElapseONUPDATECALLED = 50
 
UINT g_uTimerElapseSYSCOLORCHANGED = 20
 
UINT g_uTimerElapseDISPLAYCHANGE = 20
 
UINT g_uTimerElapseUPDATEUI = 70
 
UINT g_uTimerElapseSHOWWINDOW = 50
 
UINT g_uTimerElapseMOVETOTRAY = 50
 
UINT g_uTimerElapseTRAYWNDONDELAYMSG = 50
 
UINT g_uTimerElapseDOACCDEFAULTACTION = 200
 
UINT g_uTimerElapseENSUREFOCUS = 50
 
BOOL g_bShowDeskBand = FALSE
 
UINT g_uTimerElapseSHOWDESKBAND = 3 * 1000
 
BOOL g_fPolicyDisableCloseButton = FALSE
 
BOOL g_fPolicyEnableLanguagebarInFullscreen = FALSE
 
DWORD g_dwWndStyle = 0
 
DWORD g_dwMenuStyle = 0
 
DWORD g_dwChildWndStyle = 0
 
BOOL g_fRTL = FALSE
 
CMsUtbModule gModule
 
CTipbarWndg_pTipbarWnd = NULL
 
CTrayIconWndg_pTrayIconWnd = NULL
 
CicArray< HKL > * g_prghklSkipRedrawing = NULL
 

Macro Definition Documentation

◆ TIMER_ID_DOACCDEFAULTACTION

#define TIMER_ID_DOACCDEFAULTACTION   11

Definition at line 82 of file msutb.cpp.

Typedef Documentation

◆ LANGBARITEMSTATE

◆ PLANGBARITEMSTATE

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TIPBAR_ATTACHED 
TIPBAR_CHILD 
TIPBAR_VERTICAL 
TIPBAR_HIGHCONTRAST 
TIPBAR_TRAYICON 
TIPBAR_UPDATING 
TIPBAR_ENSURING 
TIPBAR_NODESKBAND 
TIPBAR_TOOLBARENDED 
TIPBAR_TOPFIT 
TIPBAR_BOTTOMFIT 
TIPBAR_RIGHTFIT 
TIPBAR_LEFTFIT 

Definition at line 1438 of file msutb.cpp.

1439{
1440 TIPBAR_ATTACHED = 0x1,
1441 TIPBAR_CHILD = 0x2,
1442 TIPBAR_VERTICAL = 0x4,
1443 TIPBAR_HIGHCONTRAST = 0x10,
1444 TIPBAR_TRAYICON = 0x20,
1445 TIPBAR_UPDATING = 0x400,
1446 TIPBAR_ENSURING = 0x2000,
1447 TIPBAR_NODESKBAND = 0x4000,
1448 TIPBAR_TOOLBARENDED = 0x10000,
1449 TIPBAR_TOPFIT = 0x40000,
1450 TIPBAR_BOTTOMFIT = 0x80000,
1451 TIPBAR_RIGHTFIT = 0x100000,
1452 TIPBAR_LEFTFIT = 0x200000,
1453};
@ TIPBAR_HIGHCONTRAST
Definition: msutb.cpp:1443
@ TIPBAR_VERTICAL
Definition: msutb.cpp:1442
@ TIPBAR_CHILD
Definition: msutb.cpp:1441
@ TIPBAR_NODESKBAND
Definition: msutb.cpp:1447
@ TIPBAR_TOOLBARENDED
Definition: msutb.cpp:1448
@ TIPBAR_ATTACHED
Definition: msutb.cpp:1440
@ TIPBAR_UPDATING
Definition: msutb.cpp:1445
@ TIPBAR_LEFTFIT
Definition: msutb.cpp:1452
@ TIPBAR_RIGHTFIT
Definition: msutb.cpp:1451
@ TIPBAR_ENSURING
Definition: msutb.cpp:1446
@ TIPBAR_TRAYICON
Definition: msutb.cpp:1444
@ TIPBAR_TOPFIT
Definition: msutb.cpp:1449
@ TIPBAR_BOTTOMFIT
Definition: msutb.cpp:1450

Function Documentation

◆ __cxa_pure_virtual()

EXTERN_C void __cxa_pure_virtual ( void  )

Definition at line 84 of file msutb.cpp.

85{
86 ERR("__cxa_pure_virtual\n");
87}
#define ERR(fmt,...)
Definition: debug.h:113

◆ CheckCloseMenuAvailable()

BOOL CheckCloseMenuAvailable ( void  )

Definition at line 353 of file msutb.cpp.

354{
355 BOOL ret = FALSE;
356 ITfInputProcessorProfiles *pProfiles = NULL;
357 LANGID *pLangIds = NULL;
358 ULONG iItem, cItems;
359
361 return FALSE;
362
364 return TRUE;
365
367 SUCCEEDED(pProfiles->GetLanguageList(&pLangIds, &cItems)))
368 {
369 for (iItem = 0; iItem < cItems; ++iItem)
370 {
371 if (IsFELangId(pLangIds[iItem]))
372 break;
373 }
374
375 ret = (iItem == cItems);
376 }
377
378 if (pLangIds)
379 CoTaskMemFree(pLangIds);
380 if (pProfiles)
381 pProfiles->Release();
382
383 return ret;
384}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
#define SUCCEEDED(hr)
Definition: intsafe.h:50
USHORT LANGID
Definition: mui.h:9
HRESULT WINAPI TF_CreateInputProcessorProfiles(ITfInputProcessorProfiles **ppipr)
Definition: msctf.c:668
BOOL IsFELangId(LANGID LangID)
Definition: msutb.cpp:339
BOOL g_bShowCloseMenu
Definition: msutb.cpp:49
BOOL g_fPolicyDisableCloseButton
Definition: msutb.cpp:75
uint32_t ULONG
Definition: typedefs.h:59
int ret

Referenced by CUTBContextMenu::CreateMenuUI().

◆ CheckEAFonts()

BOOL CheckEAFonts ( void  )

Are there East-Asian vertical fonts?

Definition at line 402 of file msutb.cpp.

403{
404 BOOL bHasVertical = FALSE;
405 HDC hDC = ::GetDC(NULL);
408 return bHasVertical;
409}
static HDC hDC
Definition: 3dtext.c:33
static HDC
Definition: imagelist.c:92
static INT CALLBACK FindEAEnumFontProc(ENUMLOGFONT *pLF, NEWTEXTMETRIC *pTM, INT nFontType, LPARAM lParam)
Definition: msutb.cpp:393
LONG_PTR LPARAM
Definition: windef.h:208
FONTENUMPROCA FONTENUMPROC
Definition: wingdi.h:2902
#define EnumFonts
Definition: wingdi.h:4452
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)

Referenced by CTipbarWnd::CreateVerticalFont().

◆ ClosePopupTipbar()

EXTERN_C VOID WINAPI ClosePopupTipbar ( VOID  )

Definition at line 6377 of file msutb.cpp.

6378{
6379 TRACE("()\n");
6380
6382 return;
6383
6385
6386 if (g_pTipbarWnd)
6387 {
6392 }
6393
6394 if (g_pTrayIconWnd)
6395 {
6397 delete g_pTrayIconWnd;
6399 }
6400
6402
6404}
void DestroyWnd()
Definition: msutb.cpp:4679
CDeskBand * m_pDeskBand
Definition: msutb.cpp:1499
void DestroyWnd()
Definition: msutb.cpp:3241
ULONG Release()
CTipbarWnd * g_pTipbarWnd
Definition: msutb.cpp:104
void UninitSkipRedrawHKLArray(void)
Definition: msutb.cpp:188
BOOL g_fInClosePopupTipbar
Definition: msutb.cpp:36
CTrayIconWnd * g_pTrayIconWnd
Definition: msutb.cpp:105
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by UninitApp(), and CLoaderWnd::WindowProc().

◆ DllCanUnloadNow()

STDAPI DllCanUnloadNow ( VOID  )

Definition at line 6433 of file msutb.cpp.

6434{
6435 TRACE("()\n");
6436 return gModule.DllCanUnloadNow() && (g_DllRefCount == 0);
6437}
CMsUtbModule gModule
Definition: msutb.cpp:93
LONG g_DllRefCount
Definition: msutb.cpp:34

◆ DllGetClassObject()

STDAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
LPVOID ppv 
)

Definition at line 6444 of file msutb.cpp.

6445{
6446 TRACE("()\n");
6447 return gModule.DllGetClassObject(rclsid, riid, ppv);
6448}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ DllMain()

EXTERN_C BOOL WINAPI DllMain ( _In_ HINSTANCE  hinstDLL,
_In_ DWORD  dwReason,
_Inout_opt_ LPVOID  lpvReserved 
)

@implemented

Definition at line 6510 of file msutb.cpp.

6514{
6515 switch (dwReason)
6516 {
6517 case DLL_PROCESS_ATTACH:
6518 {
6519 TRACE("(%p, %lu, %p)\n", hinstDLL, dwReason, lpvReserved);
6520 if (!ProcessAttach(hinstDLL))
6521 {
6522 ProcessDetach(hinstDLL);
6523 return FALSE;
6524 }
6525 break;
6526 }
6527 case DLL_PROCESS_DETACH:
6528 {
6529 ProcessDetach(hinstDLL);
6530 break;
6531 }
6532 }
6533 return TRUE;
6534}
DWORD dwReason
Definition: misc.cpp:154
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
static IN DWORD IN LPVOID lpvReserved
BOOL ProcessAttach(HINSTANCE hinstDLL)
@implemented
Definition: msutb.cpp:6478
VOID ProcessDetach(HINSTANCE hinstDLL)
@implemented
Definition: msutb.cpp:6500

◆ DllRegisterServer()

STDAPI DllRegisterServer ( VOID  )

Definition at line 6411 of file msutb.cpp.

6412{
6413 TRACE("()\n");
6414 return gModule.DllRegisterServer(FALSE);
6415}

◆ DllUnregisterServer()

STDAPI DllUnregisterServer ( VOID  )

Definition at line 6422 of file msutb.cpp.

6423{
6424 TRACE("()\n");
6425 return gModule.DllUnregisterServer(FALSE);
6426}

◆ DoCloseLangbar()

void DoCloseLangbar ( void  )

Definition at line 251 of file msutb.cpp.

252{
253 ITfLangBarMgr *pLangBarMgr = NULL;
254 HRESULT hr = TF_CreateLangBarMgr(&pLangBarMgr);
255 if (FAILED(hr))
256 return;
257
258 if (pLangBarMgr)
259 {
260 hr = pLangBarMgr->ShowFloating(TF_SFT_HIDDEN);
261 pLangBarMgr->Release();
262 }
263
264 if (SUCCEEDED(hr))
266
267 CicRegKey regKey;
269 TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Run"),
271 if (error == ERROR_SUCCESS)
272 ::RegDeleteValue(regKey, TEXT("ctfmon.exe"));
273}
LSTATUS Open(HKEY hKey, LPCTSTR lpSubKey, REGSAM samDesired=KEY_READ)
Definition: cicreg.h:51
#define ERROR_SUCCESS
Definition: deptool.c:10
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
HRESULT ShowFloating([in] DWORD dwFlags)
#define FAILED(hr)
Definition: intsafe.h:51
#define TEXT(s)
Definition: k32.h:26
#define error(str)
Definition: mkdosfs.c:1605
HRESULT WINAPI TF_CreateLangBarMgr(ITfLangBarMgr **pppbm)
Definition: msctf.c:686
void TurnOffSpeechIfItsOn(void)
Definition: msutb.cpp:243
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
HRESULT hr
Definition: shlfolder.c:183
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define RegDeleteValue
Definition: winreg.h:508

Referenced by CUTBContextMenu::SelectMenuItem().

◆ FindEAEnumFontProc()

static INT CALLBACK FindEAEnumFontProc ( ENUMLOGFONT pLF,
NEWTEXTMETRIC pTM,
INT  nFontType,
LPARAM  lParam 
)
static

Definition at line 393 of file msutb.cpp.

394{
395 if ((nFontType != TRUETYPE_FONTTYPE) || (pLF->elfLogFont.lfFaceName[0] != '@'))
396 return TRUE;
397 *(BOOL*)lParam = TRUE;
398 return FALSE;
399}
LPARAM lParam
Definition: combotst.c:139
LOGFONTA elfLogFont
Definition: wingdi.h:2686
CHAR lfFaceName[LF_FACESIZE]
Definition: wingdi.h:1894
#define TRUETYPE_FONTTYPE
Definition: wingdi.h:1109

Referenced by CheckEAFonts().

◆ GetFontSig()

BOOL GetFontSig ( HWND  hWnd,
HKL  hKL 
)

Definition at line 138 of file msutb.cpp.

139{
140 LOCALESIGNATURE Sig;
141 INT size = sizeof(Sig) / sizeof(WCHAR);
143 return FALSE;
144
145 HDC hDC = ::GetDC(hWnd);
147 CHARSETINFO CharSetInfo;
150
151 return !!(CharSetInfo.fs.fsCsb[0] & Sig.lsCsbSupported[0]);
152}
HWND hWnd
Definition: settings.c:17
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: locale.c:1665
static void CharSet(RTF_Info *info)
Definition: reader.c:2420
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
#define LOWORD(l)
Definition: pedump.c:82
FONTSIGNATURE fs
Definition: wingdi.h:1548
DWORD fsCsb[2]
Definition: wingdi.h:1543
uint32_t DWORD_PTR
Definition: typedefs.h:65
int32_t INT
Definition: typedefs.h:58
int WINAPI GetTextCharsetInfo(_In_ HDC, _Out_opt_ LPFONTSIGNATURE, _In_ DWORD)
#define TCI_SRCCHARSET
Definition: wingdi.h:961
BOOL WINAPI TranslateCharsetInfo(_Inout_ PDWORD, _Out_ LPCHARSETINFO, _In_ DWORD)
#define LOCALE_FONTSIGNATURE
Definition: winnls.h:125
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by CLBarInatItem::OnMenuSelect().

◆ GetGlobalCompartment()

HRESULT GetGlobalCompartment ( REFGUID  rguid,
ITfCompartment **  ppComp 
)

Definition at line 197 of file msutb.cpp.

198{
201 if (FAILED(hr))
202 return hr;
203
204 if (!pCompMgr)
205 return E_FAIL;
206
207 hr = pCompMgr->GetCompartment(rguid, ppComp);
208 pCompMgr->Release();
209 return hr;
210}
#define E_FAIL
Definition: ddrawi.h:102
nsrefcnt Release()
EXTERN_C HRESULT WINAPI TF_GetGlobalCompartment(_Out_ ITfCompartmentMgr **ppCompMgr)
static nsIComponentManager * pCompMgr
Definition: nsembed.c:62

Referenced by GetGlobalCompartmentDWORD(), and SetGlobalCompartmentDWORD().

◆ GetGlobalCompartmentDWORD()

HRESULT GetGlobalCompartmentDWORD ( REFGUID  rguid,
LPDWORD  pdwValue 
)

Definition at line 212 of file msutb.cpp.

213{
214 *pdwValue = 0;
215 ITfCompartment *pComp;
216 HRESULT hr = GetGlobalCompartment(rguid, &pComp);
217 if (SUCCEEDED(hr))
218 {
219 VARIANT vari;
220 hr = pComp->GetValue(&vari);
221 if (hr == S_OK)
222 *pdwValue = V_I4(&vari);
223 pComp->Release();
224 }
225 return hr;
226}
HRESULT GetValue([out] VARIANT *pvarValue)
#define S_OK
Definition: intsafe.h:52
HRESULT GetGlobalCompartment(REFGUID rguid, ITfCompartment **ppComp)
Definition: msutb.cpp:197
#define V_I4(A)
Definition: oleauto.h:247

Referenced by TurnOffSpeechIfItsOn().

◆ GethKLDesc()

BOOL GethKLDesc ( _In_ HKL  hKL,
_Out_ LPWSTR  pszDesc,
_In_ UINT  cchDesc 
)

Definition at line 292 of file msutb.cpp.

293{
294 HKL hGotKL;
295
296 INT iKL, cKLs = TF_MlngInfoCount();
297 for (iKL = 0; iKL < cKLs; ++iKL)
298 {
299 if (TF_GetMlngHKL(iKL, &hGotKL, pszDesc, cchDesc) && hKL == hGotKL)
300 return TRUE;
301 }
302
303 return TF_GetMlngHKL(0, &hGotKL, pszDesc, cchDesc);
304}
EXTERN_C BOOL WINAPI TF_GetMlngHKL(_In_ INT iKL, _Out_opt_ HKL *phKL, _Out_opt_ LPWSTR pszDesc, _In_ INT cchDesc)
Definition: mlng.cpp:664
EXTERN_C INT WINAPI TF_MlngInfoCount(VOID)
Definition: mlng.cpp:614
UINT_PTR HKL
Definition: msctf.idl:143

Referenced by CLBarInatItem::GetText().

◆ GetIconIndexFromhKL()

INT GetIconIndexFromhKL ( _In_ HKL  hKL)

Definition at line 275 of file msutb.cpp.

276{
277 HKL hGotKL;
278
279 INT iKL, cKLs = TF_MlngInfoCount();
280 for (iKL = 0; iKL < cKLs; ++iKL)
281 {
282 if (TF_GetMlngHKL(iKL, &hGotKL, NULL, 0) && hKL == hGotKL)
283 return TF_GetMlngIconIndex(iKL);
284 }
285
286 if (!TF_GetMlngHKL(0, &hGotKL, NULL, 0))
287 return -1;
288
289 return TF_GetMlngIconIndex(0);
290}
EXTERN_C INT WINAPI TF_GetMlngIconIndex(_In_ INT iKL)
Definition: mlng.cpp:640

Referenced by CLBarInatItem::GetIcon(), and CLBarInatItem::InitMenu().

◆ GetLibTls()

Definition at line 6324 of file msutb.cpp.

6325{
6326 TRACE("()\n");
6327 return &g_libTLS;
6328}
CIC_LIBTHREAD g_libTLS
Definition: msutb.cpp:38

◆ GetPopupTipbar()

EXTERN_C BOOL WINAPI GetPopupTipbar ( HWND  hWnd,
BOOL  fWinLogon 
)

Definition at line 6336 of file msutb.cpp.

6337{
6338 TRACE("(%p, %d)\n", hWnd, fWinLogon);
6339
6340 if (!fWinLogon)
6342
6343 return GetTipbarInternal(hWnd, fWinLogon | 0x80000000, NULL);
6344}
BOOL GetTipbarInternal(HWND hWnd, DWORD dwFlags, CDeskBand *pDeskBand)
Definition: msutb.cpp:6273

Referenced by InitApp(), and CLoaderWnd::WindowProc().

◆ GetTipbarInternal()

BOOL GetTipbarInternal ( HWND  hWnd,
DWORD  dwFlags,
CDeskBand *  pDeskBand 
)

Definition at line 6273 of file msutb.cpp.

6274{
6275 BOOL bParent = !!(dwFlags & 0x80000000);
6276 g_bWinLogon = !!(dwFlags & 0x1);
6277
6278 InitFromReg();
6279
6280 if (!g_bShowTipbar)
6281 return FALSE;
6282
6283 if (bParent)
6284 {
6286 if (!g_pTrayIconWnd)
6287 return FALSE;
6289 }
6290
6292 if (!g_pTipbarWnd || !g_pTipbarWnd->Initialize())
6293 return FALSE;
6294
6295 g_pTipbarWnd->Init(!bParent, pDeskBand);
6296 g_pTipbarWnd->CreateWnd(hWnd);
6297
6298 ::SetWindowText(*g_pTipbarWnd, TEXT("TF_FloatingLangBar_WndTitle"));
6299
6300 DWORD dwOldStatus = 0;
6301 if (!bParent)
6302 {
6304 g_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND);
6305 }
6306
6310
6311 if (!bParent && (dwOldStatus & TF_SFT_DESKBAND))
6313
6315 return TRUE;
6316}
#define cicNoThrow
Definition: cicbase.h:34
ITfLangBarMgr_P * m_pLangBarMgr
Definition: msutb.cpp:1483
DWORD m_dwTipbarWndFlags
Definition: msutb.cpp:1473
STDMETHOD() ShowFloating(DWORD dwFlags) override
@unimplemented
Definition: msutb.cpp:5290
void Init(BOOL bChild, CDeskBand *pDeskBand)
@unimplemented
Definition: msutb.cpp:4207
HWND CreateWnd()
Definition: msutb.cpp:3225
HRESULT GetShowFloatingStatus([out] DWORD *pdwFlags)
BOOL InitFromReg(void)
Definition: msutb.cpp:460
BOOL g_bShowTipbar
Definition: msutb.cpp:45
BOOL g_bWinLogon
Definition: msutb.cpp:35
DWORD g_dwWndStyle
Definition: msutb.cpp:77
DWORD g_dwChildWndStyle
Definition: msutb.cpp:79
HWND g_hwndParent
Definition: msutb.cpp:37
DWORD dwStatus
Definition: mediaobj.idl:95
STDMETHOD() GetPrevShowFloatingStatus(DWORD *)=0
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define SetWindowText
Definition: winuser.h:5857

Referenced by GetPopupTipbar().

◆ InitFromReg()

BOOL InitFromReg ( void  )

Definition at line 460 of file msutb.cpp.

461{
462 DWORD dwValue;
464
465 CicRegKey regKey1;
466 error = regKey1.Open(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\CTF\\"));
467 if (error == ERROR_SUCCESS)
468 {
469 error = regKey1.QueryDword(TEXT("ShowTipbar"), &dwValue);
470 if (error == ERROR_SUCCESS)
471 g_bShowTipbar = !!dwValue;
472 }
473
474 CicRegKey regKey2;
475 error = regKey2.Open(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\CTF\\MSUTB\\"));
476 if (error == ERROR_SUCCESS)
477 {
478 error = regKey2.QueryDword(TEXT("ShowDebugMenu"), &dwValue);
479 if (error == ERROR_SUCCESS)
480 g_bShowDebugMenu = !!dwValue;
481 error = regKey2.QueryDword(TEXT("NewLook"), &dwValue);
482 if (error == ERROR_SUCCESS)
483 g_bNewLook = !!dwValue;
484 error = regKey2.QueryDword(TEXT("IntelliSense"), &dwValue);
485 if (error == ERROR_SUCCESS)
486 g_bIntelliSense = !!dwValue;
487 error = regKey2.QueryDword(TEXT("ShowCloseMenu"), &dwValue);
488 if (error == ERROR_SUCCESS)
489 g_bShowCloseMenu = !!dwValue;
490 error = regKey2.QueryDword(TEXT("TimeOutNonIntentional"), &dwValue);
491 if (error == ERROR_SUCCESS)
492 g_uTimeOutNonIntentional = 1000 * dwValue;
493 error = regKey2.QueryDword(TEXT("TimeOutIntentional"), &dwValue);
494 if (error == ERROR_SUCCESS)
495 {
496 g_uTimeOutIntentional = 1000 * dwValue;
497 g_uTimeOutMax = 6000 * dwValue;
498 }
499 error = regKey2.QueryDword(TEXT("ShowMinimizedBalloon"), &dwValue);
500 if (error == ERROR_SUCCESS)
501 g_bShowMinimizedBalloon = !!dwValue;
502 error = regKey2.QueryDword(TEXT("Left"), &dwValue);
503 if (error == ERROR_SUCCESS)
504 g_ptTipbar.x = dwValue;
505 error = regKey2.QueryDword(TEXT("Top"), &dwValue);
506 if (error == ERROR_SUCCESS)
507 g_ptTipbar.y = dwValue;
508 error = regKey2.QueryDword(TEXT("ExcludeCaptionButtons"), &dwValue);
509 if (error == ERROR_SUCCESS)
510 g_bExcludeCaptionButtons = !!dwValue;
511 error = regKey2.QueryDword(TEXT("ShowShadow"), &dwValue);
512 if (error == ERROR_SUCCESS)
513 g_bShowShadow = !!dwValue;
514 error = regKey2.QueryDword(TEXT("TaskbarTheme"), &dwValue);
515 if (error == ERROR_SUCCESS)
516 g_fTaskbarTheme = !!dwValue;
517 error = regKey2.QueryDword(TEXT("Vertical"), &dwValue);
518 if (error == ERROR_SUCCESS)
519 g_fVertical = !!dwValue;
520 error = regKey2.QueryDword(TEXT("TimerElapseSTUBSTART"), &dwValue);
521 if (error == ERROR_SUCCESS)
522 g_uTimerElapseSTUBSTART = dwValue;
523 error = regKey2.QueryDword(TEXT("TimerElapseSTUBEND"), &dwValue);
524 if (error == ERROR_SUCCESS)
525 g_uTimerElapseSTUBEND = dwValue;
526 error = regKey2.QueryDword(TEXT("TimerElapseBACKTOALPHA"), &dwValue);
527 if (error == ERROR_SUCCESS)
529 error = regKey2.QueryDword(TEXT("TimerElapseONTHREADITEMCHANGE"), &dwValue);
530 if (error == ERROR_SUCCESS)
532 error = regKey2.QueryDword(TEXT("TimerElapseSETWINDOWPOS"), &dwValue);
533 if (error == ERROR_SUCCESS)
535 error = regKey2.QueryDword(TEXT("TimerElapseONUPDATECALLED"), &dwValue);
536 if (error == ERROR_SUCCESS)
538 error = regKey2.QueryDword(TEXT("TimerElapseSYSCOLORCHANGED"), &dwValue);
539 if (error == ERROR_SUCCESS)
541 error = regKey2.QueryDword(TEXT("TimerElapseDISPLAYCHANGE"), &dwValue);
542 if (error == ERROR_SUCCESS)
544 error = regKey2.QueryDword(TEXT("TimerElapseUPDATEUI"), &dwValue);
545 if (error == ERROR_SUCCESS)
546 g_uTimerElapseUPDATEUI = dwValue;
547 error = regKey2.QueryDword(TEXT("TimerElapseSHOWWINDOW"), &dwValue);
548 if (error == ERROR_SUCCESS)
549 g_uTimerElapseSHOWWINDOW = dwValue;
550 error = regKey2.QueryDword(TEXT("TimerElapseMOVETOTRAY"), &dwValue);
551 if (error == ERROR_SUCCESS)
552 g_uTimerElapseMOVETOTRAY = dwValue;
553 error = regKey2.QueryDword(TEXT("TimerElapseTRAYWNDONDELAYMSG"), &dwValue);
554 if (error == ERROR_SUCCESS)
556 error = regKey2.QueryDword(TEXT("TimerElapseDOACCDEFAULTACTION"), &dwValue);
557 if (error == ERROR_SUCCESS)
559 error = regKey2.QueryDword(TEXT("TimerElapseENSUREFOCUS"), &dwValue);
560 if (error == ERROR_SUCCESS)
563 {
564 error = regKey2.QueryDword(TEXT("ShowDeskBand"), &dwValue);
565 if (error == ERROR_SUCCESS)
566 g_bShowDeskBand = !!dwValue;
567 error = regKey2.QueryDword(TEXT("TimerElapseSHOWWDESKBAND"), &dwValue);
568 if (error == ERROR_SUCCESS)
570 }
571 }
572
573 CicRegKey regKey3;
574 error = regKey3.Open(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Policies\\Microsoft\\MSCTF"));
575 if (error == ERROR_SUCCESS)
576 {
577 error = regKey3.QueryDword(TEXT("DisableCloseButton"), &dwValue);
578 if (error == ERROR_SUCCESS)
579 g_fPolicyDisableCloseButton = !!dwValue;
580 }
581
582 CicRegKey regKey4;
583 error = regKey4.Open(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Policies\\Microsoft\\MSCTF"));
584 if (error == ERROR_SUCCESS)
585 {
586 error = regKey4.QueryDword(TEXT("EnableLanguagebarInFullscreen"), &dwValue);
587 if (error == ERROR_SUCCESS)
589 }
590
592
593 if (g_bNewLook)
594 {
597 if (g_bShowShadow)
601 }
602 else
603 {
607 }
608
611
613 {
617 g_fRTL = TRUE;
618 }
619
620 return TRUE;
621}
#define CIC_OSINFO_XPPLUS
Definition: cicbase.h:51
@ UIF_WINDOW_NOMOUSEMSG
Definition: cicuif.h:503
@ UIF_WINDOW_CHILD
Definition: cicuif.h:494
@ UIF_WINDOW_LAYOUTRTL
Definition: cicuif.h:502
@ UIF_WINDOW_TOPMOST
Definition: cicuif.h:495
@ UIF_WINDOW_TOOLWINDOW
Definition: cicuif.h:496
@ UIF_WINDOW_WORKAREA
Definition: cicuif.h:500
@ UIF_WINDOW_MONITOR
Definition: cicuif.h:501
@ UIF_WINDOW_DLGFRAME
Definition: cicuif.h:497
@ UIF_WINDOW_ENABLETHEMED
Definition: cicuif.h:507
@ UIF_WINDOW_SHADOW
Definition: cicuif.h:499
@ UIF_WINDOW_TOOLTIP
Definition: cicuif.h:498
LSTATUS QueryDword(LPCTSTR pszValueName, LPDWORD pdwValue)
Definition: cicreg.h:61
UINT g_uTimerElapseSHOWWINDOW
Definition: msutb.cpp:68
UINT g_uTimeOutIntentional
Definition: msutb.cpp:51
POINT g_ptTipbar
Definition: msutb.cpp:54
BOOL g_bShowDebugMenu
Definition: msutb.cpp:46
BOOL g_bIntelliSense
Definition: msutb.cpp:48
DWORD g_dwOSInfo
Definition: msutb.cpp:32
BOOL g_bShowShadow
Definition: msutb.cpp:56
UINT g_uTimerElapseENSUREFOCUS
Definition: msutb.cpp:72
DWORD g_dwMenuStyle
Definition: msutb.cpp:78
BOOL g_bShowMinimizedBalloon
Definition: msutb.cpp:53
UINT g_uTimerElapseSYSCOLORCHANGED
Definition: msutb.cpp:65
UINT g_uTimerElapseUPDATEUI
Definition: msutb.cpp:67
UINT g_uTimeOutNonIntentional
Definition: msutb.cpp:50
BOOL g_bEnableDeskBand
Definition: msutb.cpp:42
BOOL g_fPolicyEnableLanguagebarInFullscreen
Definition: msutb.cpp:76
UINT g_uTimerElapseONTHREADITEMCHANGE
Definition: msutb.cpp:62
BOOL g_fTaskbarTheme
Definition: msutb.cpp:57
UINT g_uTimerElapseSTUBEND
Definition: msutb.cpp:60
BOOL g_fVertical
Definition: msutb.cpp:58
UINT g_uTimerElapseTRAYWNDONDELAYMSG
Definition: msutb.cpp:70
UINT g_uTimerElapseDOACCDEFAULTACTION
Definition: msutb.cpp:71
UINT g_uTimerElapseSHOWDESKBAND
Definition: msutb.cpp:74
BOOL g_bNewLook
Definition: msutb.cpp:47
UINT g_uTimerElapseSTUBSTART
Definition: msutb.cpp:59
UINT g_uTimeOutMax
Definition: msutb.cpp:52
BOOL g_bShowDeskBand
Definition: msutb.cpp:73
UINT g_uTimerElapseBACKTOALPHA
Definition: msutb.cpp:61
UINT g_uTimerElapseDISPLAYCHANGE
Definition: msutb.cpp:66
BOOL g_bExcludeCaptionButtons
Definition: msutb.cpp:55
void InitSkipRedrawHKLArray(void)
Definition: msutb.cpp:154
BOOL IsBiDiLocalizedSystem(void)
Definition: msutb.cpp:125
BOOL g_fRTL
Definition: msutb.cpp:80
UINT g_uTimerElapseMOVETOTRAY
Definition: msutb.cpp:69
UINT g_uTimerElapseSETWINDOWPOS
Definition: msutb.cpp:63
UINT g_uTimerElapseONUPDATECALLED
Definition: msutb.cpp:64
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

◆ InitSkipRedrawHKLArray()

void InitSkipRedrawHKLArray ( void  )

Definition at line 154 of file msutb.cpp.

155{
158 return;
159
161 {
162 // Japanese IME will be skipped
163 g_prghklSkipRedrawing->Add((HKL)UlongToHandle(0xE0010411));
164 }
165
166 CicRegKey regKey;
168 TEXT("SOFTWARE\\Microsoft\\CTF\\MSUTB\\SkipRedrawHKL"));
169 if (error != ERROR_SUCCESS)
170 return;
171
172 TCHAR szValueName[256];
173 for (DWORD dwIndex = 0; ; ++dwIndex)
174 {
175 error = regKey.EnumValue(dwIndex, szValueName, _countof(szValueName));
176 if (error != ERROR_SUCCESS)
177 break;
178
179 if (szValueName[0] == TEXT('0') &&
180 (szValueName[1] == TEXT('x') || szValueName[1] == TEXT('X')))
181 {
182 HKL hKL = (HKL)UlongToHandle(_tcstoul(szValueName, NULL, 16));
183 g_prghklSkipRedrawing->Add(hKL); // This hKL will be skipped
184 }
185 }
186}
#define UlongToHandle(ul)
Definition: basetsd.h:97
LSTATUS EnumValue(DWORD dwIndex, LPTSTR lpValueName, DWORD cchValueName)
Definition: cicreg.h:108
#define _tcstoul
Definition: tchar.h:595
CicArray< HKL > * g_prghklSkipRedrawing
Definition: msutb.cpp:107
#define _countof(array)
Definition: sndvol32.h:70
char TCHAR
Definition: xmlstorage.h:189

Referenced by InitFromReg().

◆ IsBiDiLocalizedSystem()

BOOL IsBiDiLocalizedSystem ( void  )

Definition at line 125 of file msutb.cpp.

126{
127 LOCALESIGNATURE Sig;
129 if (!LangID)
130 return FALSE;
131
132 INT size = sizeof(Sig) / sizeof(WCHAR);
134 return FALSE;
135 return (Sig.lsUsb[3] & 0x8000000) != 0;
136}
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: locale.c:1374
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
Definition: wdfusb.h:1083

Referenced by InitFromReg().

◆ IsDeskBandFromReg()

BOOL IsDeskBandFromReg ( )

Definition at line 411 of file msutb.cpp.

412{
413 if (!g_bEnableDeskBand || !(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+
414 return FALSE;
415
416 CicRegKey regKey;
417 if (regKey.Open(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\CTF\\MSUTB\\")))
418 {
419 DWORD dwValue = 0;
420 regKey.QueryDword(TEXT("ShowDeskBand"), &dwValue);
421 return !!dwValue;
422 }
423
424 return FALSE;
425}

Referenced by SetRegisterLangBand().

◆ IsFELangId()

BOOL IsFELangId ( LANGID  LangID)

Definition at line 339 of file msutb.cpp.

340{
341 switch (LangID)
342 {
343 case MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED): // Chinese (Simplified)
344 case MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL): // Chinese (Traditional)
345 case MAKELANGID(LANG_JAPANESE, SUBLANG_DEFAULT): // Japanese
346 case MAKELANGID(LANG_KOREAN, SUBLANG_DEFAULT): // Korean
347 return TRUE;
348 default:
349 return FALSE;
350 }
351}
return
Definition: dirsup.c:529
#define MAKELANGID(p, s)
Definition: nls.h:15
#define SUBLANG_CHINESE_TRADITIONAL
Definition: nls.h:208
#define SUBLANG_CHINESE_SIMPLIFIED
Definition: nls.h:209
#define SUBLANG_DEFAULT
Definition: nls.h:168
#define LANG_CHINESE
Definition: nls.h:42
#define LANG_JAPANESE
Definition: nls.h:76
#define LANG_KOREAN
Definition: nls.h:84

Referenced by CheckCloseMenuAvailable().

◆ IsSkipRedrawHKL()

BOOL IsSkipRedrawHKL ( HKL  hSkipKL)

Definition at line 109 of file msutb.cpp.

110{
112 return FALSE; // Japanese HKL will be skipped
114 return FALSE;
115
116 for (size_t iItem = 0; iItem < g_prghklSkipRedrawing->size(); ++iItem)
117 {
118 if ((*g_prghklSkipRedrawing)[iItem] == hSkipKL)
119 return TRUE; // To be skipped
120 }
121
122 return FALSE; // To be not skipped
123}

Referenced by CTipbarWnd::IsHKLToSkipRedrawOnNoItem().

◆ IsTransparecyAvailable()

BOOL IsTransparecyAvailable ( void  )

@unimplemented

Definition at line 387 of file msutb.cpp.

388{
389 return FALSE;
390}

Referenced by CUTBContextMenu::CreateMenuUI().

◆ LangBarInsertMenu()

HRESULT LangBarInsertMenu ( _In_ ITfMenu pMenu,
_In_ UINT  uId,
_In_ LPCWSTR  pszText,
_In_ BOOL  bChecked,
_Inout_opt_ HICON  hIcon 
)

Definition at line 307 of file msutb.cpp.

313{
314 HBITMAP hbmp = NULL, hbmpMask = NULL;
315 if (hIcon)
316 {
318 SIZE iconSize = { 16, 16 };
319 if (!hIconNew)
320 hIconNew = hIcon;
321 if (!cicGetIconBitmaps(hIconNew, &hbmp, &hbmpMask, &iconSize))
322 return E_FAIL;
323 if (hIconNew)
324 ::DestroyIcon(hIconNew);
326 }
327
328 INT cchText = lstrlenW(pszText);
329 DWORD dwFlags = (bChecked ? TF_LBMENUF_CHECKED : 0);
330 return pMenu->AddMenuItem(uId, dwFlags, hbmp, hbmpMask, pszText, cchText, NULL);
331}
HBITMAP hbmp
BOOL cicGetIconBitmaps(HICON hIcon, HBITMAP *hbm1, HBITMAP *hbm2, const SIZE *pSize)
Definition: cicuif.cpp:1375
#define lstrlenW
Definition: compat.h:750
static HBITMAP
Definition: button.c:44
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
#define IMAGE_ICON
Definition: winuser.h:212
#define LR_COPYFROMRESOURCE
Definition: winuser.h:1099
HANDLE WINAPI CopyImage(_In_ HANDLE, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2018
_In_ int cchText
Definition: winuser.h:4465
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2084

Referenced by CLBarInatItem::InitMenu().

◆ LangBarInsertSeparator()

HRESULT LangBarInsertSeparator ( _In_ ITfMenu pMenu)

Definition at line 333 of file msutb.cpp.

334{
335 return pMenu->AddMenuItem(-1, TF_LBMENUF_SEPARATOR, NULL, NULL, NULL, 0, NULL);
336}

Referenced by CLBarInatItem::InitMenu().

◆ MsUtbCoCreateInstance()

HRESULT APIENTRY MsUtbCoCreateInstance ( REFCLSID  rclsid,
LPUNKNOWN  pUnkOuter,
DWORD  dwClsContext,
REFIID  iid,
LPVOID ppv 
)

@implemented

Definition at line 6452 of file msutb.cpp.

6458{
6463 return cicRealCoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv);
6464}
EXTERN_C HRESULT cicRealCoCreateInstance(_In_ REFCLSID rclsid, _In_ LPUNKNOWN pUnkOuter, _In_ DWORD dwClsContext, _In_ REFIID iid, _Out_ LPVOID *ppv)
Definition: cicbase.cpp:206
EXTERN_C HRESULT WINAPI TF_CreateCategoryMgr(_Out_ ITfCategoryMgr **ppcat)
EXTERN_C HRESULT WINAPI TF_CreateDisplayAttributeMgr(_Out_ ITfDisplayAttributeMgr **ppdam)
EXTERN_C const CLSID CLSID_TF_CategoryMgr
Definition: msctf.idl:84
EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr
Definition: msctf.idl:85
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96

Referenced by ProcessAttach().

◆ MyWaitForInputIdle()

LONG MyWaitForInputIdle ( DWORD  dwThreadId,
DWORD  dwMilliseconds 
)

Definition at line 4956 of file msutb.cpp.

4957{
4958 if (g_pTipbarWnd && (g_pTipbarWnd->m_dwShowType & TF_SFT_DESKBAND))
4959 return 0;
4960
4962 return STATUS_TIMEOUT;
4963
4964 DWORD dwFlags1 = 0, dwFlags2 = 0;
4965 if (!TF_GetThreadFlags(dwThreadId, &dwFlags1, &dwFlags2, NULL) && dwFlags2)
4966 return -1;
4967
4968 return TF_CheckThreadInputIdle(dwThreadId, dwMilliseconds);
4969}
DWORD m_dwShowType
Definition: msutb.cpp:1475
DWORD dwThreadId
Definition: fdebug.c:31
EXTERN_C BOOL WINAPI TF_GetThreadFlags(_In_ DWORD dwThreadId, _Out_ LPDWORD pdwFlags1, _Out_ LPDWORD pdwFlags2, _Out_ LPDWORD pdwFlags3)
EXTERN_C LONG WINAPI TF_CheckThreadInputIdle(_In_ DWORD dwThreadId, _In_ DWORD dwMilliseconds)
EXTERN_C BOOL WINAPI TF_IsInMarshaling(_In_ DWORD dwThreadId)
#define STATUS_TIMEOUT
Definition: ntstatus.h:81

Referenced by CTipbarThread::_UninitItemList().

◆ ProcessAttach()

BOOL ProcessAttach ( HINSTANCE  hinstDLL)

@implemented

Definition at line 6478 of file msutb.cpp.

6479{
6481
6482 g_hInst = hinstDLL;
6483
6485
6487 cicInitUIFLib();
6488
6490
6491 g_wmTaskbarCreated = RegisterWindowMessageW(L"TaskbarCreated");
6492
6493 gModule.Init(ObjectMap, hinstDLL, NULL);
6495
6496 return TRUE;
6497}
EXTERN_C void cicGetOSInfo(LPUINT puACP, LPDWORD pdwOSInfo)
Definition: cicbase.cpp:82
EXTERN_C BOOL TFInitLib(FN_CoCreateInstance fnCoCreateInstance)
Definition: cicbase.cpp:251
void cicInitUIFLib(void)
Definition: cicuif.cpp:5459
static BOOL RegisterClass()
Definition: msutb.cpp:3314
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
UINT g_wmTaskbarCreated
Definition: msutb.cpp:30
CRITICAL_SECTION g_cs
Definition: msutb.cpp:33
HRESULT APIENTRY MsUtbCoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
@implemented
Definition: msutb.cpp:6452
UINT g_uACP
Definition: msutb.cpp:31
HINSTANCE g_hInst
Definition: msutb.cpp:29
#define L(x)
Definition: ntvdm.h:50
BOOL WINAPI InitializeCriticalSectionAndSpinCount(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount)
Definition: synch.c:765
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)

Referenced by DllMain().

◆ ProcessDetach()

VOID ProcessDetach ( HINSTANCE  hinstDLL)

@implemented

Definition at line 6500 of file msutb.cpp.

6501{
6502 cicDoneUIFLib();
6503 TFUninitLib();
6505 gModule.Term();
6506}
void cicDoneUIFLib(void)
Definition: cicuif.cpp:5466
EXTERN_C VOID TFUninitLib(VOID)
Definition: msutb.cpp:6472
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

Referenced by DllMain().

◆ RegisterComCat()

BOOL RegisterComCat ( REFCLSID  rclsid,
REFCATID  rcatid,
BOOL  bRegister 
)

Definition at line 434 of file msutb.cpp.

435{
437 return FALSE;
438
439 ICatRegister *pCat;
440 HRESULT hr = ::CoCreateInstance(CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER,
441 IID_ICatRegister, (void**)&pCat);
442 if (SUCCEEDED(hr))
443 {
444 if (bRegister)
445 hr = pCat->RegisterClassImplCategories(rclsid, 1, const_cast<CATID*>(&rcatid));
446 else
447 hr = pCat->UnRegisterClassImplCategories(rclsid, 1, const_cast<CATID*>(&rcatid));
448
449 pCat->Release();
450 }
451
453
454 //if (IsIE5())
455 // ::RegDeleteKey(HKEY_CLASSES_ROOT, TEXT("Component Categories\\{00021492-0000-0000-C000-000000000046}\\Enum"));
456
457 return SUCCEEDED(hr);
458}
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
HRESULT RegisterClassImplCategories([in] REFCLSID rclsid, [in] ULONG cCategories, [in, size_is(cCategories)] CATID rgcatid[])
HRESULT UnRegisterClassImplCategories([in] REFCLSID rclsid, [in] ULONG cCategories, [in, size_is(cCategories)] CATID rgcatid[])

◆ SetDeskBandToReg()

void SetDeskBandToReg ( BOOL  bShow)

Definition at line 427 of file msutb.cpp.

428{
429 CicRegKey regKey;
430 if (regKey.Open(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\CTF\\MSUTB\\"), KEY_ALL_ACCESS))
431 regKey.SetDword(TEXT("ShowDeskBand"), bShow);
432}
LSTATUS SetDword(LPCTSTR pszValueName, DWORD dwValue)
Definition: cicreg.h:67

Referenced by SetRegisterLangBand().

◆ SetGlobalCompartmentDWORD()

HRESULT SetGlobalCompartmentDWORD ( REFGUID  rguid,
DWORD  dwValue 
)

Definition at line 228 of file msutb.cpp.

229{
230 VARIANT vari;
231 ITfCompartment *pComp;
232 HRESULT hr = GetGlobalCompartment(rguid, &pComp);
233 if (SUCCEEDED(hr))
234 {
235 V_VT(&vari) = VT_I4;
236 V_I4(&vari) = dwValue;
237 hr = pComp->SetValue(0, &vari);
238 pComp->Release();
239 }
240 return hr;
241}
@ VT_I4
Definition: compat.h:2298
HRESULT SetValue([in] TfClientId tid, [in] const VARIANT *pvarValue)
#define V_VT(A)
Definition: oleauto.h:211

Referenced by TurnOffSpeechIfItsOn().

◆ SetRegisterLangBand()

EXTERN_C HRESULT WINAPI SetRegisterLangBand ( BOOL  bRegister)

Definition at line 6352 of file msutb.cpp.

6353{
6354 TRACE("(%d)\n", bRegister);
6355
6356 if (!g_bEnableDeskBand || !(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+
6357 return E_FAIL;
6358
6359 BOOL bDeskBand = IsDeskBandFromReg();
6360 if (bDeskBand == bRegister)
6361 return S_OK;
6362
6363 SetDeskBandToReg(bRegister);
6364
6365 if (!RegisterComCat(CLSID_MSUTBDeskBand, CATID_DeskBand, bRegister))
6366 return TF_E_NOLOCK;
6367
6368 return S_OK;
6369}
HRESULT RegisterComCat()
void SetDeskBandToReg(BOOL bShow)
Definition: msutb.cpp:427
BOOL IsDeskBandFromReg()
Definition: msutb.cpp:411

◆ STDMETHODIMP_() [1/8]

STDMETHODIMP_ ( BOOL  )

@unimplemented

@implemented

Definition at line 1704 of file msutb.cpp.

1705{
1706 extern HINSTANCE g_hInst;
1707 ::DialogBoxParam(g_hInst, m_pszDialogName, NULL, DlgProc, (LPARAM)this);
1708 SetDlgShown(FALSE);
1709 _Release();
1710 return TRUE;
1711}
DLGPROC DlgProc
Definition: desk.c:122
#define DialogBoxParam
Definition: winuser.h:5764

◆ STDMETHODIMP_() [2/8]

STDMETHODIMP_ ( BSTR  )

Definition at line 2610 of file msutb.cpp.

2611{
2612 WCHAR szText[64];
2613 LoadStringW(g_hInst, IDS_MENUWND, szText, _countof(szText));
2614 return ::SysAllocString(szText);
2615}
#define IDS_MENUWND
Definition: resource.h:27
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)

◆ STDMETHODIMP_() [3/8]

STDMETHODIMP_ ( CCicLibMenu )

Definition at line 1913 of file msutb.cpp.

1914{
1915 return new(cicNoThrow) CCicLibMenu();
1916}

◆ STDMETHODIMP_() [4/8]

STDMETHODIMP_ ( CCicLibMenuItem )

Definition at line 1918 of file msutb.cpp.

1919{
1920 return new(cicNoThrow) CCicLibMenuItem();
1921}

◆ STDMETHODIMP_() [5/8]

STDMETHODIMP_ ( DWORD  )

Definition at line 5353 of file msutb.cpp.

5354{
5355 return CUIFWindow::GetWndStyle() & ~WS_BORDER;
5356}

◆ STDMETHODIMP_() [6/8]

STDMETHODIMP_ ( INT  )

@unimplemented

Definition at line 2617 of file msutb.cpp.

2618{
2619 return 9;
2620}

◆ STDMETHODIMP_() [7/8]

STDMETHODIMP_ ( LPCWSTR  )

Definition at line 6212 of file msutb.cpp.

6213{
6214 OnUnknown41();
6215
6216 if (!(m_dwItemFlags & 0x1))
6217 {
6218 m_dwItemFlags |= 0x1;
6219
6220 BSTR bstrString;
6221 if (FAILED(m_pLangBarItem->GetTooltipString(&bstrString)))
6222 return NULL;
6223
6224 if (bstrString)
6225 {
6226 OnUnknown53(bstrString);
6227 ::SysFreeString(bstrString);
6228 }
6229 }
6230
6231 LPCWSTR pszToolTip = OnUnknown55();
6232
6233 OnUnknown42();
6234
6235 return pszToolTip;
6236}
OLECHAR * BSTR
Definition: compat.h:2293
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ STDMETHODIMP_() [8/8]

STDMETHODIMP_ ( void  )

@unimplemented

Definition at line 1796 of file msutb.cpp.

1797{
1798 s_bIsDlgShown = bShown;
1799}

◆ TFUninitLib()

EXTERN_C VOID TFUninitLib ( VOID  )

Definition at line 6472 of file msutb.cpp.

6473{
6474 // Do nothing
6475}

Referenced by ProcessDetach().

◆ TurnOffSpeechIfItsOn()

void TurnOffSpeechIfItsOn ( void  )

Definition at line 243 of file msutb.cpp.

244{
245 DWORD dwValue = 0;
247 if (SUCCEEDED(hr) && dwValue)
249}
EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE
Definition: msctf.idl:92
HRESULT SetGlobalCompartmentDWORD(REFGUID rguid, DWORD dwValue)
Definition: msutb.cpp:228
HRESULT GetGlobalCompartmentDWORD(REFGUID rguid, LPDWORD pdwValue)
Definition: msutb.cpp:212

Referenced by DoCloseLangbar(), and GetPopupTipbar().

◆ UninitSkipRedrawHKLArray()

void UninitSkipRedrawHKLArray ( void  )

Definition at line 188 of file msutb.cpp.

189{
191 {
194 }
195}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msutb  )

Variable Documentation

◆ g_bEnableDeskBand

◆ g_bExcludeCaptionButtons

BOOL g_bExcludeCaptionButtons = TRUE

Definition at line 55 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_bIntelliSense

BOOL g_bIntelliSense = FALSE

◆ g_bNewLook

BOOL g_bNewLook = TRUE

Definition at line 47 of file msutb.cpp.

Referenced by CTipbarWnd::Init(), and InitFromReg().

◆ g_bShowCloseMenu

BOOL g_bShowCloseMenu = FALSE

Definition at line 49 of file msutb.cpp.

Referenced by CheckCloseMenuAvailable(), and InitFromReg().

◆ g_bShowDebugMenu

BOOL g_bShowDebugMenu = FALSE

Definition at line 46 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_bShowDeskBand

BOOL g_bShowDeskBand = FALSE

Definition at line 73 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_bShowMinimizedBalloon

BOOL g_bShowMinimizedBalloon = TRUE

Definition at line 53 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_bShowShadow

BOOL g_bShowShadow = FALSE

Definition at line 56 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_bShowTipbar

BOOL g_bShowTipbar = TRUE

Definition at line 45 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_bWinLogon

BOOL g_bWinLogon = FALSE

Definition at line 35 of file msutb.cpp.

Referenced by CTipbarWnd::_FindThread(), and CUTBContextMenu::ShowPopup().

◆ g_cs

◆ g_DllRefCount

LONG g_DllRefCount = 0

◆ g_dwChildWndStyle

DWORD g_dwChildWndStyle = 0

Definition at line 79 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_dwMenuStyle

DWORD g_dwMenuStyle = 0

◆ g_dwOSInfo

◆ g_dwWndStyle

DWORD g_dwWndStyle = 0

Definition at line 77 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_fInClosePopupTipbar

BOOL g_fInClosePopupTipbar = FALSE

Definition at line 36 of file msutb.cpp.

◆ g_fPolicyDisableCloseButton

BOOL g_fPolicyDisableCloseButton = FALSE

Definition at line 75 of file msutb.cpp.

Referenced by CheckCloseMenuAvailable(), and InitFromReg().

◆ g_fPolicyEnableLanguagebarInFullscreen

BOOL g_fPolicyEnableLanguagebarInFullscreen = FALSE

Definition at line 76 of file msutb.cpp.

Referenced by InitFromReg(), and CTipbarWnd::IsFullScreenWindow().

◆ g_fRTL

BOOL g_fRTL = FALSE

Definition at line 80 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_fTaskbarTheme

BOOL g_fTaskbarTheme = TRUE

Definition at line 57 of file msutb.cpp.

Referenced by CTipbarWnd::CTipbarWnd(), InitFromReg(), and CTipbarWnd::SetVertical().

◆ g_fVertical

BOOL g_fVertical = FALSE

Definition at line 58 of file msutb.cpp.

Referenced by CTipbarWnd::CTipbarWnd(), and InitFromReg().

◆ g_hInst

◆ g_hwndParent

HWND g_hwndParent = NULL

Definition at line 37 of file msutb.cpp.

◆ g_libTLS

CIC_LIBTHREAD g_libTLS = { NULL, NULL }

Definition at line 38 of file msutb.cpp.

Referenced by GetLibTls(), and CTipbarWnd::~CTipbarWnd().

◆ g_prghklSkipRedrawing

CicArray<HKL>* g_prghklSkipRedrawing = NULL

Definition at line 107 of file msutb.cpp.

Referenced by InitSkipRedrawHKLArray(), IsSkipRedrawHKL(), and UninitSkipRedrawHKLArray().

◆ g_pTipbarWnd

◆ g_pTrayIconWnd

◆ g_ptTipbar

POINT g_ptTipbar = { -1, -1 }

Definition at line 54 of file msutb.cpp.

Referenced by CTipbarWnd::CTipbarWnd(), and InitFromReg().

◆ g_uACP

UINT g_uACP = CP_ACP

Definition at line 31 of file msutb.cpp.

Referenced by ProcessAttach().

◆ g_uTimeOutIntentional

UINT g_uTimeOutIntentional = 10 * 60 * 1000

Definition at line 51 of file msutb.cpp.

Referenced by InitFromReg(), and CLangBarItemList::StartDemotingTimer().

◆ g_uTimeOutMax

UINT g_uTimeOutMax = 60 * 60 * 1000

Definition at line 52 of file msutb.cpp.

Referenced by InitFromReg(), and CLangBarItemList::StartDemotingTimer().

◆ g_uTimeOutNonIntentional

UINT g_uTimeOutNonIntentional = 60 * 1000

Definition at line 50 of file msutb.cpp.

Referenced by InitFromReg(), and CLangBarItemList::StartDemotingTimer().

◆ g_uTimerElapseBACKTOALPHA

UINT g_uTimerElapseBACKTOALPHA = 3 * 1000

Definition at line 61 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_uTimerElapseDISPLAYCHANGE

UINT g_uTimerElapseDISPLAYCHANGE = 20

Definition at line 66 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_uTimerElapseDOACCDEFAULTACTION

UINT g_uTimerElapseDOACCDEFAULTACTION = 200

◆ g_uTimerElapseENSUREFOCUS

UINT g_uTimerElapseENSUREFOCUS = 50

Definition at line 72 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_uTimerElapseMOVETOTRAY

UINT g_uTimerElapseMOVETOTRAY = 50

Definition at line 69 of file msutb.cpp.

Referenced by InitFromReg(), and CTipbarWnd::SetShowTrayIcon().

◆ g_uTimerElapseONTHREADITEMCHANGE

UINT g_uTimerElapseONTHREADITEMCHANGE = 200

Definition at line 62 of file msutb.cpp.

Referenced by InitFromReg(), and CTipbarWnd::OnThreadItemChange().

◆ g_uTimerElapseONUPDATECALLED

UINT g_uTimerElapseONUPDATECALLED = 50

Definition at line 64 of file msutb.cpp.

Referenced by InitFromReg(), and CTipbarItem::OnUpdate().

◆ g_uTimerElapseSETWINDOWPOS

UINT g_uTimerElapseSETWINDOWPOS = 100

Definition at line 63 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_uTimerElapseSHOWDESKBAND

UINT g_uTimerElapseSHOWDESKBAND = 3 * 1000

Definition at line 74 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_uTimerElapseSHOWWINDOW

UINT g_uTimerElapseSHOWWINDOW = 50

Definition at line 68 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_uTimerElapseSTUBEND

UINT g_uTimerElapseSTUBEND = 2 * 1000

Definition at line 60 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_uTimerElapseSTUBSTART

UINT g_uTimerElapseSTUBSTART = 100

Definition at line 59 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_uTimerElapseSYSCOLORCHANGED

UINT g_uTimerElapseSYSCOLORCHANGED = 20

Definition at line 65 of file msutb.cpp.

Referenced by InitFromReg(), CTipbarWnd::SetLangBand(), and CTipbarWnd::SetVertical().

◆ g_uTimerElapseTRAYWNDONDELAYMSG

UINT g_uTimerElapseTRAYWNDONDELAYMSG = 50

Definition at line 70 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_uTimerElapseUPDATEUI

UINT g_uTimerElapseUPDATEUI = 70

Definition at line 67 of file msutb.cpp.

Referenced by InitFromReg().

◆ g_wmTaskbarCreated

UINT g_wmTaskbarCreated = 0

Definition at line 30 of file msutb.cpp.

Referenced by ProcessAttach().

◆ gModule