ReactOS 0.4.16-dev-1311-g81a4d83
displayattributemgr.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS CTF
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: ITfDisplayAttributeMgr implementation
5 * COPYRIGHT: Copyright 2010 CodeWeavers, Aric Stewart
6 * Copyright 2025 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
7 */
8
9#include <initguid.h>
10#include <windef.h>
11#include <winbase.h>
12#include <winreg.h>
13#include <msctf.h>
14#include <msctf_undoc.h>
15
16// Cicero
17#include <cicbase.h>
18#include <cicreg.h>
19#include <cicutb.h>
20
21#include "displayattributemgr.h"
22#include "msctf_internal.h"
23
24#include <wine/debug.h>
26
28// CDisplayAttributeMgr
29
31 : m_cRefs(1)
32{
33}
34
36{
37}
38
40{
41 FIXME("(%p)\n", wine_dbgstr_guid(&rguid));
42 return FALSE;
43}
44
46{
47 FIXME("(%p, %u)\n", pProcessor, dwCookie);
48}
49
51{
52 FIXME("(%u)\n", dwCookie);
53}
54
56{
57 FIXME("()\n");
58}
59
61// ** IUnknown methods **
62
65{
66 if (!ppvObj)
67 return E_INVALIDARG;
68
69 *ppvObj = NULL;
70
72 IsEqualIID(riid, IID_ITfDisplayAttributeMgr) ||
73 IsEqualIID(riid, IID_CDisplayAttributeMgr))
74 {
75 *ppvObj = this;
76 }
77 else if (IsEqualIID(riid, IID_ITfDisplayAttributeCollectionMgr))
78 {
79 *ppvObj = static_cast<ITfDisplayAttributeCollectionMgr *>(this);
80 }
81
82 if (!*ppvObj)
83 return E_NOINTERFACE;
84
85 AddRef();
86 return S_OK;
87}
88
91{
92 return ::InterlockedIncrement(&m_cRefs);
93}
94
97{
99 {
100 delete this;
101 return 0;
102 }
103 return m_cRefs;
104}
105
107// ** ITfDisplayAttributeMgr methods **
108
110{
111 FIXME("()\n");
112 return E_NOTIMPL;
113}
114
117{
118 FIXME("(%p)\n", ppEnum);
119 return E_NOTIMPL;
120}
121
126 _Out_ CLSID *pclsidOwner)
127{
128 FIXME("(%s, %p, %s)\n", wine_dbgstr_guid(&guid), ppInfo, wine_dbgstr_guid(pclsidOwner));
129 return E_NOTIMPL;
130}
131
133// ** ITfDisplayAttributeCollectionMgr methods **
134
137{
138 FIXME("(0x%lX)\n", unused);
139 return E_NOTIMPL;
140}
141
143
146{
147 if (pUnkOuter)
149
151 if (!This)
152 return E_OUTOFMEMORY;
153
154 HRESULT hr = This->QueryInterface(IID_ITfDisplayAttributeMgr, (void **)ppOut);
155 This->Release();
156 return hr;
157}
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define EXTERN_C
Definition: basetyps.h:12
#define STDMETHODIMP
Definition: basetyps.h:43
#define STDMETHODIMP_(t)
Definition: basetyps.h:44
const GUID IID_IUnknown
#define cicNoThrow
Definition: cicbase.h:34
void _UnadviseMarkupCollection(DWORD dwCookie)
STDMETHODIMP UnknownMethod(_In_ DWORD unused) override
STDMETHODIMP OnUpdateInfo() override
BOOL _IsInCollection(REFGUID rguid)
void _AdviseMarkupCollection(ITfTextInputProcessor *pProcessor, DWORD dwCookie)
STDMETHODIMP EnumDisplayAttributeInfo(_Out_ IEnumTfDisplayAttributeInfo **ppEnum) override
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj) override
STDMETHODIMP GetDisplayAttributeInfo(_In_ REFGUID guid, _Out_ ITfDisplayAttributeInfo **ppInfo, _Out_ CLSID *pclsidOwner) override
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
EXTERN_C HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
GUID guid
Definition: version.c:147
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
ULONG AddRef()
ULONG Release()
#define S_OK
Definition: intsafe.h:52
WORD unused[29]
Definition: crypt.c:1155
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
HRESULT hr
Definition: shlfolder.c:183
Definition: scsiwmi.h:51
uint32_t ULONG
Definition: typedefs.h:59
#define E_NOINTERFACE
Definition: winerror.h:2364
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662