riched20: Handle ES_WANTRETURN in the host.
[wine.git] / dlls / d2d1 / effect.c
blobfb1e66a3d9be3f8f2d0c66dd6e280146f3bb0cce
1 /*
2 * Copyright 2018 Nikolay Sivov for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "d2d1_private.h"
21 WINE_DEFAULT_DEBUG_CHANNEL(d2d);
23 static inline struct d2d_effect *impl_from_ID2D1Effect(ID2D1Effect *iface)
25 return CONTAINING_RECORD(iface, struct d2d_effect, ID2D1Effect_iface);
28 static HRESULT STDMETHODCALLTYPE d2d_effect_QueryInterface(ID2D1Effect *iface, REFIID iid, void **out)
30 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
32 if (IsEqualGUID(iid, &IID_ID2D1Effect)
33 || IsEqualGUID(iid, &IID_ID2D1Properties)
34 || IsEqualGUID(iid, &IID_IUnknown))
36 ID2D1Effect_AddRef(iface);
37 *out = iface;
38 return S_OK;
41 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
43 *out = NULL;
44 return E_NOINTERFACE;
47 static ULONG STDMETHODCALLTYPE d2d_effect_AddRef(ID2D1Effect *iface)
49 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
50 ULONG refcount = InterlockedIncrement(&effect->refcount);
52 TRACE("%p increasing refcount to %u.\n", iface, refcount);
54 return refcount;
57 static ULONG STDMETHODCALLTYPE d2d_effect_Release(ID2D1Effect *iface)
59 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
60 ULONG refcount = InterlockedDecrement(&effect->refcount);
62 TRACE("%p decreasing refcount to %u.\n", iface, refcount);
64 if (!refcount)
65 heap_free(effect);
67 return refcount;
70 static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyCount(ID2D1Effect *iface)
72 FIXME("iface %p stub!\n", iface);
74 return 0;
77 static HRESULT STDMETHODCALLTYPE d2d_effect_GetPropertyName(ID2D1Effect *iface, UINT32 index,
78 WCHAR *name, UINT32 name_count)
80 FIXME("iface %p, index %u, name %p, name_count %u stub!\n", iface, index, name, name_count);
82 return E_NOTIMPL;
85 static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyNameLength(ID2D1Effect *iface, UINT32 index)
87 FIXME("iface %p, index %u stub!\n", iface, index);
89 return 0;
92 static D2D1_PROPERTY_TYPE STDMETHODCALLTYPE d2d_effect_GetType(ID2D1Effect *iface, UINT32 index)
94 FIXME("iface %p, index %u stub!\n", iface, index);
96 return 0;
99 static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyIndex(ID2D1Effect *iface, const WCHAR *name)
101 FIXME("iface %p, name %s stub!\n", iface, debugstr_w(name));
103 return 0;
106 static HRESULT STDMETHODCALLTYPE d2d_effect_SetValueByName(ID2D1Effect *iface, const WCHAR *name,
107 D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size)
109 FIXME("iface %p, name %s, type %#x, value %p, value_size %u stub!\n", iface, debugstr_w(name),
110 type, value, value_size);
112 return E_NOTIMPL;
115 static HRESULT STDMETHODCALLTYPE d2d_effect_SetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type,
116 const BYTE *value, UINT32 value_size)
118 FIXME("iface %p, index %u, type %#x, value %p, value_size %u stub!\n", iface, index, type, value, value_size);
120 return S_OK;
123 static HRESULT STDMETHODCALLTYPE d2d_effect_GetValueByName(ID2D1Effect *iface, const WCHAR *name,
124 D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
126 FIXME("iface %p, name %s, type %#x, value %p, value_size %u stub!\n", iface, debugstr_w(name), type,
127 value, value_size);
129 return E_NOTIMPL;
132 static HRESULT STDMETHODCALLTYPE d2d_effect_GetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type,
133 BYTE *value, UINT32 value_size)
135 FIXME("iface %p, index %u, type %#x, value %p, value_size %u stub!\n", iface, index, type,
136 value, value_size);
138 return E_NOTIMPL;
141 static UINT32 STDMETHODCALLTYPE d2d_effect_GetValueSize(ID2D1Effect *iface, UINT32 index)
143 FIXME("iface %p, index %u stub!\n", iface, index);
145 return 0;
148 static HRESULT STDMETHODCALLTYPE d2d_effect_GetSubProperties(ID2D1Effect *iface, UINT32 index, ID2D1Properties **props)
150 FIXME("iface %p, index %u, props %p stub!\n", iface, index, props);
152 return E_NOTIMPL;
155 static void STDMETHODCALLTYPE d2d_effect_SetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image *input, BOOL invalidate)
157 FIXME("iface %p, index %u, input %p, invalidate %d stub!\n", iface, index, input, invalidate);
160 static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount(ID2D1Effect *iface, UINT32 count)
162 FIXME("iface %p, count %u stub!\n", iface, count);
164 return E_NOTIMPL;
167 static void STDMETHODCALLTYPE d2d_effect_GetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image **input)
169 FIXME("iface %p, index %u, input %p stub!\n", iface, index, input);
172 static UINT32 STDMETHODCALLTYPE d2d_effect_GetInputCount(ID2D1Effect *iface)
174 FIXME("iface %p stub!\n", iface);
176 return 0;
179 static void STDMETHODCALLTYPE d2d_effect_GetOutput(ID2D1Effect *iface, ID2D1Image **output)
181 FIXME("iface %p, output %p stub!\n", iface, output);
184 static const ID2D1EffectVtbl d2d_effect_vtbl =
186 d2d_effect_QueryInterface,
187 d2d_effect_AddRef,
188 d2d_effect_Release,
189 d2d_effect_GetPropertyCount,
190 d2d_effect_GetPropertyName,
191 d2d_effect_GetPropertyNameLength,
192 d2d_effect_GetType,
193 d2d_effect_GetPropertyIndex,
194 d2d_effect_SetValueByName,
195 d2d_effect_SetValue,
196 d2d_effect_GetValueByName,
197 d2d_effect_GetValue,
198 d2d_effect_GetValueSize,
199 d2d_effect_GetSubProperties,
200 d2d_effect_SetInput,
201 d2d_effect_SetInputCount,
202 d2d_effect_GetInput,
203 d2d_effect_GetInputCount,
204 d2d_effect_GetOutput,
207 void d2d_effect_init(struct d2d_effect *effect)
209 effect->ID2D1Effect_iface.lpVtbl = &d2d_effect_vtbl;
210 effect->refcount = 1;