ReactOS 0.4.16-dev-240-gdb5fa3b
CicProfile Class Reference

#include <profile.h>

Inheritance diagram for CicProfile:
Collaboration diagram for CicProfile:

Public Member Functions

 CicProfile ()
 @implemented
 
virtual ~CicProfile ()
 @implemented
 
STDMETHODIMP QueryInterface (REFIID riid, LPVOID *ppvObj) override
 @implemented
 
 STDMETHODIMP_ (ULONG) AddRef() override
 
 STDMETHODIMP_ (ULONG) Release() override
 
HRESULT GetActiveLanguageProfile (_In_ HKL hKL, _In_ REFGUID rguid, _Out_ TF_LANGUAGEPROFILE *pProfile)
 @unimplemented
 
HRESULT GetLangId (_Out_ LANGID *pLangID)
 @implemented
 
HRESULT GetCodePageA (_Out_ UINT *puCodePage)
 @implemented
 
HRESULT InitProfileInstance (_Inout_ TLS *pTLS)
 @implemented
 
BOOL IsIME (HKL hKL)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Static Protected Member Functions

static INT CALLBACK ActiveLanguageProfileNotifySinkCallback (REFGUID rguid1, REFGUID rguid2, BOOL fActivated, LPVOID pUserData)
 @implemented
 

Protected Attributes

ITfInputProcessorProfiles * m_pIPProfiles
 
CActiveLanguageProfileNotifySinkm_pActiveLanguageProfileNotifySink
 
LANGID m_LangID1
 
WORD m_padding1
 
DWORD m_dwFlags
 
UINT m_nCodePage
 
LANGID m_LangID2
 
WORD m_padding2
 
DWORD m_dwUnknown1
 
LONG m_cRefs
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 12 of file profile.h.

Constructor & Destructor Documentation

◆ CicProfile()

CicProfile::CicProfile ( )

@implemented

Definition at line 13 of file profile.cpp.

14{
15 m_dwFlags &= 0xFFFFFFF0;
16 m_cRefs = 1;
19 m_LangID1 = 0;
21 m_LangID2 = 0;
22 m_dwUnknown1 = 0;
23}
DWORD m_dwFlags
Definition: profile.h:19
UINT m_nCodePage
Definition: profile.h:20
LANGID m_LangID1
Definition: profile.h:17
DWORD m_dwUnknown1
Definition: profile.h:23
LONG m_cRefs
Definition: profile.h:24
LANGID m_LangID2
Definition: profile.h:21
ITfInputProcessorProfiles * m_pIPProfiles
Definition: profile.h:15
CActiveLanguageProfileNotifySink * m_pActiveLanguageProfileNotifySink
Definition: profile.h:16
#define NULL
Definition: types.h:112
#define CP_ACP
Definition: compat.h:109

◆ ~CicProfile()

CicProfile::~CicProfile ( )
virtual

@implemented

Definition at line 26 of file profile.cpp.

27{
28 if (m_pIPProfiles)
29 {
30 if (m_LangID1)
31 m_pIPProfiles->ChangeCurrentLanguage(m_LangID1);
32
33 m_pIPProfiles->Release();
35 }
36
38 {
42 }
43}
HRESULT _Unadvise()
@implemented
Definition: sinks.cpp:502
ULONG Release()

Member Function Documentation

◆ ActiveLanguageProfileNotifySinkCallback()

INT CALLBACK CicProfile::ActiveLanguageProfileNotifySinkCallback ( REFGUID  rguid1,
REFGUID  rguid2,
BOOL  fActivated,
LPVOID  pUserData 
)
staticprotected

@implemented

Definition at line 71 of file profile.cpp.

76{
77 CicProfile *pThis = (CicProfile *)pUserData;
78 pThis->m_dwFlags &= ~0xE;
79 return 0;
80}

Referenced by InitProfileInstance().

◆ GetActiveLanguageProfile()

HRESULT CicProfile::GetActiveLanguageProfile ( _In_ HKL  hKL,
_In_ REFGUID  rguid,
_Out_ TF_LANGUAGEPROFILE pProfile 
)

@unimplemented

Definition at line 167 of file profile.cpp.

171{
172 return E_NOTIMPL;
173}
#define E_NOTIMPL
Definition: ddrawi.h:99

Referenced by CicBridge::ConfigureGeneral(), and CicBridge::ConfigureRegisterWord().

◆ GetCodePageA()

HRESULT CicProfile::GetCodePageA ( _Out_ UINT puCodePage)

@implemented

Definition at line 83 of file profile.cpp.

84{
85 if (!puCodePage)
86 return E_INVALIDARG;
87
88 if (m_dwFlags & 2)
89 {
90 *puCodePage = m_nCodePage;
91 return S_OK;
92 }
93
94 *puCodePage = 0;
95
98 if (FAILED(hr))
99 return E_FAIL;
100
101 WCHAR szBuff[12];
103 if (cch)
104 {
105 szBuff[cch] = 0;
106 m_nCodePage = *puCodePage = wcstoul(szBuff, NULL, 10);
107 m_dwFlags |= 2;
108 }
109
110 return S_OK;
111}
HRESULT GetLangId(_Out_ LANGID *pLangID)
@implemented
Definition: profile.cpp:114
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_FAIL
Definition: ddrawi.h:102
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: locale.c:1666
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
USHORT LANGID
Definition: mui.h:9
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:202
HRESULT hr
Definition: shlfolder.c:183
#define _countof(array)
Definition: sndvol32.h:70
int32_t INT
Definition: typedefs.h:58
_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
#define LOCALE_IDEFAULTANSICODEPAGE
Definition: winnls.h:40
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CFnDocFeed::DocFeed(), CFnDocFeed::StartReconvert(), and CFnDocFeed::StartUndoCompositionString().

◆ GetLangId()

HRESULT CicProfile::GetLangId ( _Out_ LANGID pLangID)

@implemented

Definition at line 114 of file profile.cpp.

115{
116 *pLangID = 0;
117
118 if (!m_pIPProfiles)
119 return E_FAIL;
120
121 if (m_dwFlags & 4)
122 {
123 *pLangID = m_LangID2;
124 return S_OK;
125 }
126
127 HRESULT hr = m_pIPProfiles->GetCurrentLanguage(pLangID);
128 if (SUCCEEDED(hr))
129 {
130 m_dwFlags |= 4;
131 m_LangID2 = *pLangID;
132 }
133
134 return hr;
135}
#define SUCCEEDED(hr)
Definition: intsafe.h:50

Referenced by GetCodePageA(), CIMEUIWindowHandler::ImeUIMsImeHandler(), IsEALang(), CicBridge::Notify(), and CicInputContext::OnCleanupContext().

◆ InitProfileInstance()

HRESULT CicProfile::InitProfileInstance ( _Inout_ TLS pTLS)

@implemented

Definition at line 139 of file profile.cpp.

140{
142 if (FAILED(hr))
143 return hr;
144
146 {
150 if (!pSink)
151 {
152 m_pIPProfiles->Release();
154 return E_FAIL;
155 }
157 }
158
159 if (pTLS->m_pThreadMgr)
160 m_pActiveLanguageProfileNotifySink->_Advise(pTLS->m_pThreadMgr);
161
162 return hr;
163}
#define cicNoThrow
Definition: cicbase.h:34
HRESULT _Advise(ITfThreadMgr *pThreadMgr)
@implemented
Definition: sinks.cpp:472
static INT CALLBACK ActiveLanguageProfileNotifySinkCallback(REFGUID rguid1, REFGUID rguid2, BOOL fActivated, LPVOID pUserData)
@implemented
Definition: profile.cpp:71
HRESULT WINAPI TF_CreateInputProcessorProfiles(ITfInputProcessorProfiles **ppipr)
Definition: msctf.c:668

◆ IsIME()

BOOL CicProfile::IsIME ( HKL  hKL)

The return value of CicProfile::IsIME is brain-damaged. @unimplemented

Definition at line 177 of file profile.cpp.

178{
179 return TRUE;
180}
#define TRUE
Definition: types.h:120

Referenced by CtfImeIsIME().

◆ QueryInterface()

STDMETHODIMP CicProfile::QueryInterface ( REFIID  riid,
LPVOID ppvObj 
)
override

@implemented

Definition at line 46 of file profile.cpp.

47{
48 *ppvObj = NULL;
49 return E_NOINTERFACE;
50}
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ STDMETHODIMP_() [1/2]

CicProfile::STDMETHODIMP_ ( ULONG  )
override

◆ STDMETHODIMP_() [2/2]

CicProfile::STDMETHODIMP_ ( ULONG  )
override

Member Data Documentation

◆ m_cRefs

LONG CicProfile::m_cRefs
protected

Definition at line 24 of file profile.h.

Referenced by CicProfile(), and STDMETHODIMP_().

◆ m_dwFlags

DWORD CicProfile::m_dwFlags
protected

◆ m_dwUnknown1

DWORD CicProfile::m_dwUnknown1
protected

Definition at line 23 of file profile.h.

Referenced by CicProfile().

◆ m_LangID1

LANGID CicProfile::m_LangID1
protected

Definition at line 17 of file profile.h.

Referenced by CicProfile(), and ~CicProfile().

◆ m_LangID2

LANGID CicProfile::m_LangID2
protected

Definition at line 21 of file profile.h.

Referenced by CicProfile(), and GetLangId().

◆ m_nCodePage

UINT CicProfile::m_nCodePage
protected

Definition at line 20 of file profile.h.

Referenced by CicProfile(), and GetCodePageA().

◆ m_pActiveLanguageProfileNotifySink

CActiveLanguageProfileNotifySink* CicProfile::m_pActiveLanguageProfileNotifySink
protected

Definition at line 16 of file profile.h.

Referenced by CicProfile(), InitProfileInstance(), and ~CicProfile().

◆ m_padding1

WORD CicProfile::m_padding1
protected

Definition at line 18 of file profile.h.

◆ m_padding2

WORD CicProfile::m_padding2
protected

Definition at line 22 of file profile.h.

◆ m_pIPProfiles

ITfInputProcessorProfiles* CicProfile::m_pIPProfiles
protected

Definition at line 15 of file profile.h.

Referenced by CicProfile(), GetLangId(), InitProfileInstance(), and ~CicProfile().


The documentation for this class was generated from the following files: