mmdevapi: Fix small capture bugs.
[wine/multimedia.git] / dlls / shdocvw / frame.c
blobeeff20adcb36cc1483b4b28d9ebe54f4bf254bb3
1 /*
2 * Copyright 2005 Jacek Caban 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 "wine/debug.h"
20 #include "shdocvw.h"
22 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
24 #define INPLACEFRAME_THIS(iface) DEFINE_THIS(DocHost, OleInPlaceFrame, iface)
26 static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface,
27 REFIID riid, void **ppv)
29 DocHost *This = INPLACEFRAME_THIS(iface);
31 *ppv = NULL;
33 if(IsEqualGUID(&IID_IUnknown, riid)) {
34 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
35 *ppv = INPLACEFRAME(This);
36 }else if(IsEqualGUID(&IID_IOleInPlaceUIWindow, riid)) {
37 TRACE("(%p)->(IID_IOleInPlaceUIWindow %p)\n", This, ppv);
38 *ppv = INPLACEFRAME(This);
39 }else if(IsEqualGUID(&IID_IOleInPlaceFrame, riid)) {
40 TRACE("(%p)->(IID_IOleInPlaceFrame %p)\n", This, ppv);
41 *ppv = INPLACEFRAME(This);
44 if(*ppv) {
45 IOleInPlaceFrame_AddRef(INPLACEFRAME(This));
46 return S_OK;
49 WARN("Unsopported interface %s\n", debugstr_guid(riid));
50 return E_NOINTERFACE;
53 static ULONG WINAPI InPlaceFrame_AddRef(IOleInPlaceFrame *iface)
55 DocHost *This = INPLACEFRAME_THIS(iface);
56 return IOleClientSite_AddRef(CLIENTSITE(This));
59 static ULONG WINAPI InPlaceFrame_Release(IOleInPlaceFrame *iface)
61 DocHost *This = INPLACEFRAME_THIS(iface);
62 return IOleClientSite_Release(CLIENTSITE(This));
65 static HRESULT WINAPI InPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phwnd)
67 DocHost *This = INPLACEFRAME_THIS(iface);
68 FIXME("(%p)->(%p)\n", This, phwnd);
69 return E_NOTIMPL;
72 static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame *iface,
73 BOOL fEnterMode)
75 DocHost *This = INPLACEFRAME_THIS(iface);
76 FIXME("(%p)->(%x)\n", This, fEnterMode);
77 return E_NOTIMPL;
80 static HRESULT WINAPI InPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder)
82 DocHost *This = INPLACEFRAME_THIS(iface);
83 FIXME("(%p)->(%p)\n", This, lprectBorder);
84 return E_NOTIMPL;
87 static HRESULT WINAPI InPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface,
88 LPCBORDERWIDTHS pborderwidths)
90 DocHost *This = INPLACEFRAME_THIS(iface);
91 FIXME("(%p)->(%p)\n", This, pborderwidths);
92 return E_NOTIMPL;
95 static HRESULT WINAPI InPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface,
96 LPCBORDERWIDTHS pborderwidths)
98 DocHost *This = INPLACEFRAME_THIS(iface);
99 FIXME("(%p)->(%p)\n", This, pborderwidths);
100 return E_NOTIMPL;
103 static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface,
104 IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
106 DocHost *This = INPLACEFRAME_THIS(iface);
107 FIXME("(%p)->(%p %s)\n", This, pActiveObject, debugstr_w(pszObjName));
108 return E_NOTIMPL;
111 static HRESULT WINAPI InPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared,
112 LPOLEMENUGROUPWIDTHS lpMenuWidths)
114 DocHost *This = INPLACEFRAME_THIS(iface);
115 FIXME("(%p)->(%p %p)\n", This, hmenuShared, lpMenuWidths);
116 return E_NOTIMPL;
119 static HRESULT WINAPI InPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared,
120 HOLEMENU holemenu, HWND hwndActiveObject)
122 DocHost *This = INPLACEFRAME_THIS(iface);
123 FIXME("(%p)->(%p %p %p)\n", This, hmenuShared, holemenu, hwndActiveObject);
124 return E_NOTIMPL;
127 static HRESULT WINAPI InPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared)
129 DocHost *This = INPLACEFRAME_THIS(iface);
130 FIXME("(%p)->(%p)\n", This, hmenuShared);
131 return E_NOTIMPL;
134 static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface,
135 LPCOLESTR pszStatusText)
137 DocHost *This = INPLACEFRAME_THIS(iface);
138 FIXME("(%p)->(%s)\n", This, debugstr_w(pszStatusText));
139 return E_NOTIMPL;
142 static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable)
144 DocHost *This = INPLACEFRAME_THIS(iface);
145 FIXME("(%p)->(%x)\n", This, fEnable);
146 return E_NOTIMPL;
149 static HRESULT WINAPI InPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg,
150 WORD wID)
152 DocHost *This = INPLACEFRAME_THIS(iface);
153 FIXME("(%p)->(%p %d)\n", This, lpmsg, wID);
154 return E_NOTIMPL;
157 #undef INPLACEFRAME_THIS
159 static const IOleInPlaceFrameVtbl OleInPlaceFrameVtbl = {
160 InPlaceFrame_QueryInterface,
161 InPlaceFrame_AddRef,
162 InPlaceFrame_Release,
163 InPlaceFrame_GetWindow,
164 InPlaceFrame_ContextSensitiveHelp,
165 InPlaceFrame_GetBorder,
166 InPlaceFrame_RequestBorderSpace,
167 InPlaceFrame_SetBorderSpace,
168 InPlaceFrame_SetActiveObject,
169 InPlaceFrame_InsertMenus,
170 InPlaceFrame_SetMenu,
171 InPlaceFrame_RemoveMenus,
172 InPlaceFrame_SetStatusText,
173 InPlaceFrame_EnableModeless,
174 InPlaceFrame_TranslateAccelerator
177 void DocHost_Frame_Init(DocHost *This)
179 This->lpOleInPlaceFrameVtbl = &OleInPlaceFrameVtbl;