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
);
41 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid
));
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
);
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
);
70 static UINT32 STDMETHODCALLTYPE
d2d_effect_GetPropertyCount(ID2D1Effect
*iface
)
72 FIXME("iface %p stub!\n", iface
);
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
);
85 static UINT32 STDMETHODCALLTYPE
d2d_effect_GetPropertyNameLength(ID2D1Effect
*iface
, UINT32 index
)
87 FIXME("iface %p, index %u stub!\n", iface
, index
);
92 static D2D1_PROPERTY_TYPE STDMETHODCALLTYPE
d2d_effect_GetType(ID2D1Effect
*iface
, UINT32 index
)
94 FIXME("iface %p, index %u stub!\n", iface
, index
);
99 static UINT32 STDMETHODCALLTYPE
d2d_effect_GetPropertyIndex(ID2D1Effect
*iface
, const WCHAR
*name
)
101 FIXME("iface %p, name %s stub!\n", iface
, debugstr_w(name
));
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
);
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
);
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
,
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
,
141 static UINT32 STDMETHODCALLTYPE
d2d_effect_GetValueSize(ID2D1Effect
*iface
, UINT32 index
)
143 FIXME("iface %p, index %u stub!\n", iface
, index
);
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
);
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
);
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
);
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
,
189 d2d_effect_GetPropertyCount
,
190 d2d_effect_GetPropertyName
,
191 d2d_effect_GetPropertyNameLength
,
193 d2d_effect_GetPropertyIndex
,
194 d2d_effect_SetValueByName
,
196 d2d_effect_GetValueByName
,
198 d2d_effect_GetValueSize
,
199 d2d_effect_GetSubProperties
,
201 d2d_effect_SetInputCount
,
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;