ReactOS 0.4.16-dev-303-g11d5cb8
msctfime.h File Reference
#include <stdlib.h>
#include <windows.h>
#include <imm.h>
#include <immdev.h>
#include <imm32_undoc.h>
#include <cguid.h>
#include <tchar.h>
#include <msctf.h>
#include <ctffunc.h>
#include <shlwapi.h>
#include <strsafe.h>
#include <cicbase.h>
#include <cicarray.h>
#include <cicimc.h>
#include <cictf.h>
#include <cicreg.h>
#include <ciccaret.h>
#include <cicuif.h>
#include <cicutb.h>
#include <wine/debug.h>
#include "resource.h"
#include "bridge.h"
#include "inputcontext.h"
#include "misc.h"
#include "profile.h"
#include "sinks.h"
#include "tls.h"
#include "ui.h"
Include dependency graph for msctfime.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define COBJMACROS
 
#define INITGUID
 
#define GUID_MODEBIAS_NONE   GUID_NULL
 

Typedefs

typedef CicArray< GUIDCDispAttrPropCache
 

Functions

HRESULT Inquire (_Out_ LPIMEINFO lpIMEInfo, _Out_ LPWSTR lpszWndClass, _In_ DWORD dwSystemInfoFlags, _In_ HKL hKL)
 
 DEFINE_GUID (GUID_COMPARTMENT_CTFIME_DIMFLAGS, 0xA94C5FD2, 0xC471, 0x4031, 0x95, 0x46, 0x70, 0x9C, 0x17, 0x30, 0x0C, 0xB9)
 
 DEFINE_GUID (GUID_COMPARTMENT_CTFIME_CICINPUTCONTEXT, 0x85A688F7, 0x6DC8, 0x4F17, 0xA8, 0x3A, 0xB1, 0x1C, 0x09, 0xCD, 0xD7, 0xBF)
 
 DEFINE_GUID (GUID_MODEBIAS_FILENAME, 0xD7F707FE, 0x44C6, 0x4FCA, 0x8E, 0x76, 0x86, 0xAB, 0x50, 0xC7, 0x93, 0x1B)
 
 DEFINE_GUID (GUID_MODEBIAS_NUMERIC, 0x4021766C, 0xE872, 0x48FD, 0x9C, 0xEE, 0x4E, 0xC5, 0xC7, 0x5E, 0x16, 0xC3)
 
 DEFINE_GUID (GUID_MODEBIAS_URLHISTORY, 0x8B0E54D9, 0x63F2, 0x4C68, 0x84, 0xD4, 0x79, 0xAE, 0xE7, 0xA5, 0x9F, 0x09)
 
 DEFINE_GUID (GUID_MODEBIAS_DEFAULT, 0xF3DA8BD4, 0x0786, 0x49C2, 0x8C, 0x09, 0x68, 0x39, 0xD8, 0xB8, 0x4F, 0x58)
 
 DEFINE_GUID (GUID_PROP_MODEBIAS, 0x372E0716, 0x974F, 0x40AC, 0xA0, 0x88, 0x08, 0xCD, 0xC9, 0x2E, 0xBF, 0xBC)
 

Variables

HINSTANCE g_hInst
 
CRITICAL_SECTION g_csLock
 
CDispAttrPropCacheg_pPropCache
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 13 of file msctfime.h.

◆ GUID_MODEBIAS_NONE

#define GUID_MODEBIAS_NONE   GUID_NULL

Definition at line 58 of file msctfime.h.

◆ INITGUID

#define INITGUID

Definition at line 14 of file msctfime.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 12 of file msctfime.h.

Typedef Documentation

◆ CDispAttrPropCache

Definition at line 41 of file msctfime.h.

Function Documentation

◆ DEFINE_GUID() [1/7]

DEFINE_GUID ( GUID_COMPARTMENT_CTFIME_CICINPUTCONTEXT  ,
0x85A688F7  ,
0x6DC8  ,
0x4F17  ,
0xA8  ,
0x3A  ,
0xB1  ,
0x1C  ,
0x09  ,
0xCD  ,
0xD7  ,
0xBF   
)

◆ DEFINE_GUID() [2/7]

DEFINE_GUID ( GUID_COMPARTMENT_CTFIME_DIMFLAGS  ,
0xA94C5FD2  ,
0xC471  ,
0x4031  ,
0x95  ,
0x46  ,
0x70  ,
0x9C  ,
0x17  ,
0x30  ,
0x0C  ,
0xB9   
)

◆ DEFINE_GUID() [3/7]

DEFINE_GUID ( GUID_MODEBIAS_DEFAULT  ,
0xF3DA8BD4  ,
0x0786  ,
0x49C2  ,
0x8C  ,
0x09  ,
0x68  ,
0x39  ,
0xD8  ,
0xB8  ,
0x4F  ,
0x58   
)

◆ DEFINE_GUID() [4/7]

DEFINE_GUID ( GUID_MODEBIAS_FILENAME  ,
0xD7F707FE  ,
0x44C6  ,
0x4FCA  ,
0x8E  ,
0x76  ,
0x86  ,
0xAB  ,
0x50  ,
0xC7  ,
0x93  ,
0x1B   
)

◆ DEFINE_GUID() [5/7]

DEFINE_GUID ( GUID_MODEBIAS_NUMERIC  ,
0x4021766C  ,
0xE872  ,
0x48FD  ,
0x9C  ,
0xEE  ,
0x4E  ,
0xC5  ,
0xC7  ,
0x5E  ,
0x16  ,
0xC3   
)

◆ DEFINE_GUID() [6/7]

DEFINE_GUID ( GUID_MODEBIAS_URLHISTORY  ,
0x8B0E54D9  ,
0x63F2  ,
0x4C68  ,
0x84  ,
0xD4  ,
0x79  ,
0xAE  ,
0xE7  ,
0xA5  ,
0x9F  ,
0x09   
)

◆ DEFINE_GUID() [7/7]

DEFINE_GUID ( GUID_PROP_MODEBIAS  ,
0x372E0716  ,
0x974F  ,
0x40AC  ,
0xA0  ,
0x88  ,
0x08  ,
0xCD  ,
0xC9  ,
0x2E  ,
0xBF  ,
0xBC   
)

◆ Inquire()

HRESULT Inquire ( _Out_ LPIMEINFO  lpIMEInfo,
_Out_ LPWSTR  lpszWndClass,
_In_ DWORD  dwSystemInfoFlags,
_In_ HKL  hKL 
)

Retrieves the IME information. @implemented

Definition at line 92 of file msctfime.cpp.

97{
98 if (!lpIMEInfo)
99 return E_OUTOFMEMORY;
100
101 StringCchCopyW(lpszWndClass, 64, L"MSCTFIME UI");
102 lpIMEInfo->dwPrivateDataSize = 0;
103
104 switch (LOWORD(hKL)) // Language ID
105 {
106 case MAKELANGID(LANG_JAPANESE, SUBLANG_DEFAULT): // Japanese
107 {
108 lpIMEInfo->fdwProperty = IME_PROP_COMPLETE_ON_UNSELECT | IME_PROP_SPECIAL_UI |
111 lpIMEInfo->fdwConversionCaps = IME_CMODE_FULLSHAPE | IME_CMODE_KATAKANA |
113 lpIMEInfo->fdwSentenceCaps = IME_SMODE_CONVERSATION | IME_SMODE_PLAURALCLAUSE;
114 lpIMEInfo->fdwSelectCaps = SELECT_CAP_SENTENCE | SELECT_CAP_CONVERSION;
115 lpIMEInfo->fdwSCSCaps = SCS_CAP_SETRECONVERTSTRING | SCS_CAP_MAKEREAD |
117 lpIMEInfo->fdwUICaps = UI_CAP_ROT90;
118 break;
119 }
120 case MAKELANGID(LANG_KOREAN, SUBLANG_DEFAULT): // Korean
121 {
122 lpIMEInfo->fdwProperty = IME_PROP_COMPLETE_ON_UNSELECT | IME_PROP_SPECIAL_UI |
125 lpIMEInfo->fdwConversionCaps = IME_CMODE_FULLSHAPE | IME_CMODE_NATIVE;
126 lpIMEInfo->fdwSentenceCaps = 0;
127 lpIMEInfo->fdwSCSCaps = SCS_CAP_SETRECONVERTSTRING | SCS_CAP_COMPSTR;
128 lpIMEInfo->fdwSelectCaps = SELECT_CAP_CONVERSION;
129 lpIMEInfo->fdwUICaps = UI_CAP_ROT90;
130 break;
131 }
132 case MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED): // Simplified Chinese
133 case MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL): // Traditional Chinese
134 {
135 lpIMEInfo->fdwProperty = IME_PROP_SPECIAL_UI | IME_PROP_AT_CARET |
137 lpIMEInfo->fdwConversionCaps = IME_CMODE_FULLSHAPE | IME_CMODE_NATIVE;
138 lpIMEInfo->fdwSentenceCaps = SELECT_CAP_CONVERSION;
139 lpIMEInfo->fdwSelectCaps = 0;
140 lpIMEInfo->fdwSCSCaps = SCS_CAP_SETRECONVERTSTRING | SCS_CAP_MAKEREAD |
142 lpIMEInfo->fdwUICaps = UI_CAP_ROT90;
143 break;
144 }
145 default: // Otherwise
146 {
147 lpIMEInfo->fdwProperty = IME_PROP_UNICODE | IME_PROP_AT_CARET;
148 lpIMEInfo->fdwConversionCaps = 0;
149 lpIMEInfo->fdwSentenceCaps = 0;
150 lpIMEInfo->fdwSCSCaps = 0;
151 lpIMEInfo->fdwUICaps = 0;
152 lpIMEInfo->fdwSelectCaps = 0;
153 break;
154 }
155 }
156
157 return S_OK;
158}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define IME_CMODE_KATAKANA
Definition: imm.h:343
#define IME_CMODE_NATIVE
Definition: imm.h:337
#define IME_SMODE_CONVERSATION
Definition: imm.h:361
#define IME_PROP_AT_CARET
Definition: imm.h:246
#define SCS_CAP_COMPSTR
Definition: imm.h:259
#define SELECT_CAP_CONVERSION
Definition: imm.h:264
#define IME_PROP_UNICODE
Definition: imm.h:249
#define SELECT_CAP_SENTENCE
Definition: imm.h:265
#define SCS_CAP_SETRECONVERTSTRING
Definition: imm.h:261
#define IME_PROP_SPECIAL_UI
Definition: imm.h:247
#define IME_SMODE_PLAURALCLAUSE
Definition: imm.h:357
#define SCS_CAP_MAKEREAD
Definition: imm.h:260
#define IME_PROP_COMPLETE_ON_UNSELECT
Definition: imm.h:250
#define IME_CMODE_FULLSHAPE
Definition: imm.h:345
#define UI_CAP_ROT90
Definition: imm.h:254
#define IME_PROP_NEED_ALTKEY
Definition: immdev.h:387
#define IME_PROP_KBD_CHAR_FIRST
Definition: immdev.h:385
#define S_OK
Definition: intsafe.h:52
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#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
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149

Referenced by CtfImeInquireExW(), and CicInputContext::OnCleanupContext().

Variable Documentation

◆ g_csLock

CRITICAL_SECTION g_csLock
extern

Definition at line 17 of file msctfime.cpp.

Referenced by InitDisplayAttrbuteLib(), ProcessAttach(), and ProcessDetach().

◆ g_hInst

◆ g_pPropCache

CDispAttrPropCache* g_pPropCache
extern

Definition at line 18 of file msctfime.cpp.

Referenced by InitDisplayAttrbuteLib(), and TFUninitLib().