quartz/tests: Add more tests for IMediaSeeking.
[wine.git] / dlls / uiribbon / uiribbon.c
blob58ac51aece387d109b87211f53c4f5690d9220bc
1 /*
2 * Copyright 2017 Fabian Maurer
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/debug.h"
22 #define COBJMACROS
24 #include "uiribbon_private.h"
26 #include <stdio.h>
28 WINE_DEFAULT_DEBUG_CHANNEL(uiribbon);
30 static inline UIRibbonFrameworkImpl *impl_from_IUIFramework(IUIFramework *iface)
32 return CONTAINING_RECORD(iface, UIRibbonFrameworkImpl, IUIFramework_iface);
35 /*** IUnknown methods ***/
37 static HRESULT WINAPI UIRibbonFrameworkImpl_QueryInterface(IUIFramework *iface, REFIID riid, void **ppvObject)
39 UIRibbonFrameworkImpl *This = impl_from_IUIFramework(iface);
41 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
43 if (IsEqualGUID(riid, &IID_IUnknown)
44 || IsEqualGUID(riid, &IID_IUIFramework))
46 IUnknown_AddRef(iface);
47 *ppvObject = &This->IUIFramework_iface;
48 return S_OK;
51 ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
52 return E_NOINTERFACE;
55 static ULONG WINAPI UIRibbonFrameworkImpl_AddRef(IUIFramework *iface)
57 UIRibbonFrameworkImpl *This = impl_from_IUIFramework(iface);
58 ULONG ref = InterlockedIncrement(&This->ref);
60 TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
62 return ref;
65 static ULONG WINAPI UIRibbonFrameworkImpl_Release(IUIFramework *iface)
67 UIRibbonFrameworkImpl *This = impl_from_IUIFramework(iface);
68 ULONG ref = InterlockedDecrement(&This->ref);
70 TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref);
72 if (!ref)
73 HeapFree(GetProcessHeap(), 0, This);
75 return ref;
78 /*** IUIFramework methods ***/
80 static HRESULT WINAPI UIRibbonFrameworkImpl_Initialize(IUIFramework *iface, HWND frameWnd, IUIApplication *application)
82 FIXME("(%p, %p): stub!\n", frameWnd, application);
84 return E_NOTIMPL;
87 static HRESULT WINAPI UIRibbonFrameworkImpl_Destroy(IUIFramework *iface)
89 FIXME("(): stub!\n");
91 return E_NOTIMPL;
94 static HRESULT WINAPI UIRibbonFrameworkImpl_LoadUI(IUIFramework *iface, HINSTANCE instance, LPCWSTR resourceName)
96 FIXME("(%p, %s): stub!\n", instance, debugstr_w(resourceName));
98 return E_NOTIMPL;
101 static HRESULT WINAPI UIRibbonFrameworkImpl_GetView(IUIFramework *iface, UINT32 viewId, REFIID riid, void **ppv)
103 FIXME("(%u, %p, %p): stub!\n", viewId, riid, ppv);
105 return E_NOTIMPL;
108 static HRESULT WINAPI UIRibbonFrameworkImpl_GetUICommandProperty(IUIFramework *iface, UINT32 commandId, REFPROPERTYKEY key, PROPVARIANT *value)
110 FIXME("(%u, %p, %p): stub!\n", commandId, key, value);
112 return E_NOTIMPL;
115 static HRESULT WINAPI UIRibbonFrameworkImpl_SetUICommandProperty(IUIFramework *iface, UINT32 commandId, REFPROPERTYKEY key, PROPVARIANT value)
117 FIXME("(%u, %p): stub!\n", commandId, key);
119 return E_NOTIMPL;
122 static HRESULT WINAPI UIRibbonFrameworkImpl_InvalidateUICommand(IUIFramework *iface, UINT32 commandId, UI_INVALIDATIONS flags, const PROPERTYKEY *key)
124 FIXME("(%u, %#x, %p): stub!\n", commandId, flags, key);
126 return E_NOTIMPL;
129 static HRESULT WINAPI UIRibbonFrameworkImpl_FlushPendingInvalidations(IUIFramework *iface)
131 FIXME("(): stub!\n");
133 return E_NOTIMPL;
136 static HRESULT WINAPI UIRibbonFrameworkImpl_SetModes(IUIFramework *iface, INT32 iModes)
138 FIXME("(%d): stub!\n", iModes);
140 return E_NOTIMPL;
143 static const IUIFrameworkVtbl IUIFramework_Vtbl =
145 UIRibbonFrameworkImpl_QueryInterface,
146 UIRibbonFrameworkImpl_AddRef,
147 UIRibbonFrameworkImpl_Release,
148 UIRibbonFrameworkImpl_Initialize,
149 UIRibbonFrameworkImpl_Destroy,
150 UIRibbonFrameworkImpl_LoadUI,
151 UIRibbonFrameworkImpl_GetView,
152 UIRibbonFrameworkImpl_GetUICommandProperty,
153 UIRibbonFrameworkImpl_SetUICommandProperty,
154 UIRibbonFrameworkImpl_InvalidateUICommand,
155 UIRibbonFrameworkImpl_FlushPendingInvalidations,
156 UIRibbonFrameworkImpl_SetModes
159 HRESULT UIRibbonFrameworkImpl_Create(IUnknown *pUnkOuter, void **ppObj)
161 UIRibbonFrameworkImpl *object;
163 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
165 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(UIRibbonFrameworkImpl));
166 if (!object)
167 return E_OUTOFMEMORY;
169 object->IUIFramework_iface.lpVtbl = &IUIFramework_Vtbl;
170 object->ref = 1;
172 *ppObj = &object->IUIFramework_iface;
174 return S_OK;