user32: Clear %edi register when calling window procedure.
[wine.git] / dlls / d2d1 / effect.c
blobcfb8255396a7580acbe98c6cf2bdb91cdebe9c27
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 "config.h"
20 #include "wine/port.h"
22 #include "d2d1_private.h"
24 WINE_DEFAULT_DEBUG_CHANNEL(d2d);
26 static inline struct d2d_effect *impl_from_ID2D1Effect(ID2D1Effect *iface)
28 return CONTAINING_RECORD(iface, struct d2d_effect, ID2D1Effect_iface);
31 static HRESULT STDMETHODCALLTYPE d2d_effect_QueryInterface(ID2D1Effect *iface, REFIID iid, void **out)
33 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
35 if (IsEqualGUID(iid, &IID_ID2D1Effect)
36 || IsEqualGUID(iid, &IID_ID2D1Properties)
37 || IsEqualGUID(iid, &IID_IUnknown))
39 ID2D1Effect_AddRef(iface);
40 *out = iface;
41 return S_OK;
44 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
46 *out = NULL;
47 return E_NOINTERFACE;
50 static ULONG STDMETHODCALLTYPE d2d_effect_AddRef(ID2D1Effect *iface)
52 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
53 ULONG refcount = InterlockedIncrement(&effect->refcount);
55 TRACE("%p increasing refcount to %u.\n", iface, refcount);
57 return refcount;
60 static ULONG STDMETHODCALLTYPE d2d_effect_Release(ID2D1Effect *iface)
62 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
63 ULONG refcount = InterlockedDecrement(&effect->refcount);
65 TRACE("%p decreasing refcount to %u.\n", iface, refcount);
67 if (!refcount)
68 heap_free(effect);
70 return refcount;
73 static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyCount(ID2D1Effect *iface)
75 FIXME("iface %p stub!\n", iface);
77 return 0;
80 static HRESULT STDMETHODCALLTYPE d2d_effect_GetPropertyName(ID2D1Effect *iface, UINT32 index,
81 WCHAR *name, UINT32 name_count)
83 FIXME("iface %p, index %u, name %p, name_count %u stub!\n", iface, index, name, name_count);
85 return E_NOTIMPL;
88 static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyNameLength(ID2D1Effect *iface, UINT32 index)
90 FIXME("iface %p, index %u stub!\n", iface, index);
92 return 0;
95 static D2D1_PROPERTY_TYPE STDMETHODCALLTYPE d2d_effect_GetType(ID2D1Effect *iface, UINT32 index)
97 FIXME("iface %p, index %u stub!\n", iface, index);
99 return 0;
102 static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyIndex(ID2D1Effect *iface, const WCHAR *name)
104 FIXME("iface %p, name %s stub!\n", iface, debugstr_w(name));
106 return 0;
109 static HRESULT STDMETHODCALLTYPE d2d_effect_SetValueByName(ID2D1Effect *iface, const WCHAR *name,
110 D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size)
112 FIXME("iface %p, name %s, type %#x, value %p, value_size %u stub!\n", iface, debugstr_w(name),
113 type, value, value_size);
115 return E_NOTIMPL;
118 static HRESULT STDMETHODCALLTYPE d2d_effect_SetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type,
119 const BYTE *value, UINT32 value_size)
121 FIXME("iface %p, index %u, type %#x, value %p, value_size %u stub!\n", iface, index, type, value, value_size);
123 return S_OK;
126 static HRESULT STDMETHODCALLTYPE d2d_effect_GetValueByName(ID2D1Effect *iface, const WCHAR *name,
127 D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
129 FIXME("iface %p, name %s, type %#x, value %p, value_size %u stub!\n", iface, debugstr_w(name), type,
130 value, value_size);
132 return E_NOTIMPL;
135 static HRESULT STDMETHODCALLTYPE d2d_effect_GetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type,
136 BYTE *value, UINT32 value_size)
138 FIXME("iface %p, index %u, type %#x, value %p, value_size %u stub!\n", iface, index, type,
139 value, value_size);
141 return E_NOTIMPL;
144 static UINT32 STDMETHODCALLTYPE d2d_effect_GetValueSize(ID2D1Effect *iface, UINT32 index)
146 FIXME("iface %p, index %u stub!\n", iface, index);
148 return 0;
151 static HRESULT STDMETHODCALLTYPE d2d_effect_GetSubProperties(ID2D1Effect *iface, UINT32 index, ID2D1Properties **props)
153 FIXME("iface %p, index %u, props %p stub!\n", iface, index, props);
155 return E_NOTIMPL;
158 static void STDMETHODCALLTYPE d2d_effect_SetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image *input, BOOL invalidate)
160 FIXME("iface %p, index %u, input %p, invalidate %d stub!\n", iface, index, input, invalidate);
163 static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount(ID2D1Effect *iface, UINT32 count)
165 FIXME("iface %p, count %u stub!\n", iface, count);
167 return E_NOTIMPL;
170 static void STDMETHODCALLTYPE d2d_effect_GetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image **input)
172 FIXME("iface %p, index %u, input %p stub!\n", iface, index, input);
175 static UINT32 STDMETHODCALLTYPE d2d_effect_GetInputCount(ID2D1Effect *iface)
177 FIXME("iface %p stub!\n", iface);
179 return 0;
182 static void STDMETHODCALLTYPE d2d_effect_GetOutput(ID2D1Effect *iface, ID2D1Image **output)
184 FIXME("iface %p, output %p stub!\n", iface, output);
187 static const ID2D1EffectVtbl d2d_effect_vtbl =
189 d2d_effect_QueryInterface,
190 d2d_effect_AddRef,
191 d2d_effect_Release,
192 d2d_effect_GetPropertyCount,
193 d2d_effect_GetPropertyName,
194 d2d_effect_GetPropertyNameLength,
195 d2d_effect_GetType,
196 d2d_effect_GetPropertyIndex,
197 d2d_effect_SetValueByName,
198 d2d_effect_SetValue,
199 d2d_effect_GetValueByName,
200 d2d_effect_GetValue,
201 d2d_effect_GetValueSize,
202 d2d_effect_GetSubProperties,
203 d2d_effect_SetInput,
204 d2d_effect_SetInputCount,
205 d2d_effect_GetInput,
206 d2d_effect_GetInputCount,
207 d2d_effect_GetOutput,
210 void d2d_effect_init(struct d2d_effect *effect)
212 effect->ID2D1Effect_iface.lpVtbl = &d2d_effect_vtbl;
213 effect->refcount = 1;