A couple of optimizations to avoid some server calls in WIN_FindWndPtr
[wine/multimedia.git] / dlls / quartz / imevent.c
blobdd3709f3b95ff96ca05200a258d65aed7fee8ad6
1 /*
2 * Implementation of IMediaEvent[Ex] for FilterGraph.
4 * FIXME - stub.
6 * hidenori@a2.ctktv.ne.jp
7 */
9 #include "config.h"
11 #include "windef.h"
12 #include "winbase.h"
13 #include "wingdi.h"
14 #include "winuser.h"
15 #include "winerror.h"
16 #include "wine/obj_base.h"
17 #include "wine/obj_oleaut.h"
18 #include "strmif.h"
19 #include "control.h"
20 #include "uuids.h"
22 #include "debugtools.h"
23 DEFAULT_DEBUG_CHANNEL(quartz);
25 #include "quartz_private.h"
26 #include "fgraph.h"
30 static HRESULT WINAPI
31 IMediaEventEx_fnQueryInterface(IMediaEventEx* iface,REFIID riid,void** ppobj)
33 CFilterGraph_THIS(iface,mediaevent);
35 TRACE("(%p)->()\n",This);
37 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
40 static ULONG WINAPI
41 IMediaEventEx_fnAddRef(IMediaEventEx* iface)
43 CFilterGraph_THIS(iface,mediaevent);
45 TRACE("(%p)->()\n",This);
47 return IUnknown_AddRef(This->unk.punkControl);
50 static ULONG WINAPI
51 IMediaEventEx_fnRelease(IMediaEventEx* iface)
53 CFilterGraph_THIS(iface,mediaevent);
55 TRACE("(%p)->()\n",This);
57 return IUnknown_Release(This->unk.punkControl);
60 static HRESULT WINAPI
61 IMediaEventEx_fnGetTypeInfoCount(IMediaEventEx* iface,UINT* pcTypeInfo)
63 CFilterGraph_THIS(iface,mediaevent);
65 FIXME("(%p)->()\n",This);
67 return E_NOTIMPL;
70 static HRESULT WINAPI
71 IMediaEventEx_fnGetTypeInfo(IMediaEventEx* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj)
73 CFilterGraph_THIS(iface,mediaevent);
75 FIXME("(%p)->()\n",This);
77 return E_NOTIMPL;
80 static HRESULT WINAPI
81 IMediaEventEx_fnGetIDsOfNames(IMediaEventEx* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId)
83 CFilterGraph_THIS(iface,mediaevent);
85 FIXME("(%p)->()\n",This);
87 return E_NOTIMPL;
90 static HRESULT WINAPI
91 IMediaEventEx_fnInvoke(IMediaEventEx* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr)
93 CFilterGraph_THIS(iface,mediaevent);
95 FIXME("(%p)->()\n",This);
97 return E_NOTIMPL;
101 static HRESULT WINAPI
102 IMediaEventEx_fnGetEventHandle(IMediaEventEx* iface,OAEVENT* hEvent)
104 CFilterGraph_THIS(iface,mediaevent);
106 TRACE("(%p)->()\n",This);
108 *hEvent = (OAEVENT)This->m_hMediaEvent;
110 return NOERROR;
113 static HRESULT WINAPI
114 IMediaEventEx_fnGetEvent(IMediaEventEx* iface,long* lEventCode,LONG_PTR* plParam1,LONG_PTR* plParam2,long lTimeOut)
116 CFilterGraph_THIS(iface,mediaevent);
118 FIXME("(%p)->() stub!\n",This);
120 return E_NOTIMPL;
123 static HRESULT WINAPI
124 IMediaEventEx_fnWaitForCompletion(IMediaEventEx* iface,long lTimeOut,long* plEventCode)
126 CFilterGraph_THIS(iface,mediaevent);
128 FIXME("(%p)->() stub!\n",This);
130 return E_NOTIMPL;
133 static HRESULT WINAPI
134 IMediaEventEx_fnCancelDefaultHandling(IMediaEventEx* iface,long lEventCode)
136 CFilterGraph_THIS(iface,mediaevent);
138 FIXME("(%p)->() stub!\n",This);
140 return E_NOTIMPL;
143 static HRESULT WINAPI
144 IMediaEventEx_fnRestoreDefaultHandling(IMediaEventEx* iface,long lEventCode)
146 CFilterGraph_THIS(iface,mediaevent);
148 FIXME("(%p)->() stub!\n",This);
150 return E_NOTIMPL;
153 static HRESULT WINAPI
154 IMediaEventEx_fnFreeEventParams(IMediaEventEx* iface,long lEventCode,LONG_PTR lParam1,LONG_PTR lParam2)
156 CFilterGraph_THIS(iface,mediaevent);
158 FIXME("(%p)->() stub!\n",This);
160 return E_NOTIMPL;
163 static HRESULT WINAPI
164 IMediaEventEx_fnSetNotifyWindow(IMediaEventEx* iface,OAHWND hwnd,long message,LONG_PTR lParam)
166 CFilterGraph_THIS(iface,mediaevent);
168 FIXME("(%p)->() stub!\n",This);
170 return E_NOTIMPL;
173 static HRESULT WINAPI
174 IMediaEventEx_fnSetNotifyFlags(IMediaEventEx* iface,long lNotifyFlags)
176 CFilterGraph_THIS(iface,mediaevent);
178 FIXME("(%p)->() stub!\n",This);
180 return E_NOTIMPL;
183 static HRESULT WINAPI
184 IMediaEventEx_fnGetNotifyFlags(IMediaEventEx* iface,long* plNotifyFlags)
186 CFilterGraph_THIS(iface,mediaevent);
188 FIXME("(%p)->() stub!\n",This);
190 return E_NOTIMPL;
195 static ICOM_VTABLE(IMediaEventEx) imediaevent =
197 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
198 /* IUnknown fields */
199 IMediaEventEx_fnQueryInterface,
200 IMediaEventEx_fnAddRef,
201 IMediaEventEx_fnRelease,
202 /* IDispatch fields */
203 IMediaEventEx_fnGetTypeInfoCount,
204 IMediaEventEx_fnGetTypeInfo,
205 IMediaEventEx_fnGetIDsOfNames,
206 IMediaEventEx_fnInvoke,
207 /* IMediaEvent fields */
208 IMediaEventEx_fnGetEventHandle,
209 IMediaEventEx_fnGetEvent,
210 IMediaEventEx_fnWaitForCompletion,
211 IMediaEventEx_fnCancelDefaultHandling,
212 IMediaEventEx_fnRestoreDefaultHandling,
213 IMediaEventEx_fnFreeEventParams,
214 /* IMediaEventEx fields */
215 IMediaEventEx_fnSetNotifyWindow,
216 IMediaEventEx_fnSetNotifyFlags,
217 IMediaEventEx_fnGetNotifyFlags,
221 HRESULT CFilterGraph_InitIMediaEventEx( CFilterGraph* pfg )
223 TRACE("(%p)\n",pfg);
224 ICOM_VTBL(&pfg->mediaevent) = &imediaevent;
226 pfg->m_hMediaEvent = CreateEventA( NULL, TRUE, FALSE, NULL );
227 if ( pfg->m_hMediaEvent == (HANDLE)NULL )
228 return E_OUTOFMEMORY;
230 return NOERROR;
233 void CFilterGraph_UninitIMediaEventEx( CFilterGraph* pfg )
235 TRACE("(%p)\n",pfg);
237 CloseHandle( pfg->m_hMediaEvent );