xref: /reactos/dll/ime/msctfime/profile.h (revision febb589e)
1 /*
2  * PROJECT:     ReactOS msctfime.ime
3  * LICENSE:     LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4  * PURPOSE:     Profile of msctfime.ime
5  * COPYRIGHT:   Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6  */
7 
8 #pragma once
9 
10 #include "sinks.h"
11 
12 class CicProfile : public IUnknown
13 {
14 protected:
15     ITfInputProcessorProfiles *m_pIPProfiles;
16     CActiveLanguageProfileNotifySink *m_pActiveLanguageProfileNotifySink;
17     LANGID  m_LangID1;
18     WORD    m_padding1;
19     DWORD   m_dwFlags;
20     UINT    m_nCodePage;
21     LANGID  m_LangID2;
22     WORD    m_padding2;
23     DWORD   m_dwUnknown1;
24     LONG    m_cRefs;
25 
26     static INT CALLBACK
27     ActiveLanguageProfileNotifySinkCallback(
28         REFGUID rguid1,
29         REFGUID rguid2,
30         BOOL fActivated,
31         LPVOID pUserData);
32 
33 public:
34     CicProfile();
35     virtual ~CicProfile();
36 
37     // IUnknown interface
38     STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObj) override;
39     STDMETHODIMP_(ULONG) AddRef() override;
40     STDMETHODIMP_(ULONG) Release() override;
41 
42     HRESULT
43     GetActiveLanguageProfile(
44         _In_ HKL hKL,
45         _In_ REFGUID rguid,
46         _Out_ TF_LANGUAGEPROFILE *pProfile);
47     HRESULT GetLangId(_Out_ LANGID *pLangID);
48     HRESULT GetCodePageA(_Out_ UINT *puCodePage);
49 
50     HRESULT InitProfileInstance(_Inout_ TLS *pTLS);
51 
52     BOOL IsIME(HKL hKL);
53 };
54