mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
wintypes: Add IIterable<IKeyValuePair<HSTRING, IInspectable *>> stub for MapView<HSTRING, IInspectable *>.
This commit is contained in:
parent
c62ecdd8ad
commit
e385002e30
2 changed files with 42 additions and 1 deletions
|
@ -31,6 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL( wintypes );
|
|||
struct mapview_HSTRING_IInspectable
|
||||
{
|
||||
IMapView_HSTRING_IInspectable IMapView_HSTRING_IInspectable_iface;
|
||||
IIterable_IKeyValuePair_HSTRING_IInspectable IIterable_IKeyValuePair_HSTRING_IInspectable_iface;
|
||||
LONG ref;
|
||||
};
|
||||
|
||||
|
@ -55,6 +56,14 @@ static HRESULT STDMETHODCALLTYPE mapview_HSTRING_IInspectable_QueryInterface(
|
|||
IUnknown_AddRef( iface );
|
||||
return S_OK;
|
||||
}
|
||||
if (IsEqualGUID( iid, &IID_IIterable_IKeyValuePair_HSTRING_IInspectable ))
|
||||
{
|
||||
struct mapview_HSTRING_IInspectable *impl =
|
||||
impl_from_IMapView_HSTRING_IInspectable( iface );
|
||||
*out = &impl->IIterable_IKeyValuePair_HSTRING_IInspectable_iface;
|
||||
IUnknown_AddRef( iface );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
FIXME( "%s not implemented, returning E_NOTINTERFACE.\n", debugstr_guid( iid ) );
|
||||
return E_NOINTERFACE;
|
||||
|
@ -154,6 +163,36 @@ const static IMapView_HSTRING_IInspectableVtbl mapview_HSTRING_IInspectable_vtbl
|
|||
mapview_HSTRING_IInspectable_Split,
|
||||
};
|
||||
|
||||
DEFINE_IINSPECTABLE_( mapview_iterable_kvpair_HSTRING_IInspectable,
|
||||
IIterable_IKeyValuePair_HSTRING_IInspectable,
|
||||
struct mapview_HSTRING_IInspectable,
|
||||
mapview_impl_from_IIterable_IKeyValuePair_HSTRING_IInspectable,
|
||||
IIterable_IKeyValuePair_HSTRING_IInspectable_iface,
|
||||
&impl->IMapView_HSTRING_IInspectable_iface );
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE mapview_iterable_kvpair_HSTRING_IInspectable_First(
|
||||
IIterable_IKeyValuePair_HSTRING_IInspectable *iface,
|
||||
IIterator_IKeyValuePair_HSTRING_IInspectable **iter )
|
||||
{
|
||||
FIXME( "(%p, %p) stub!\n", iface, iter );
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
const static IIterable_IKeyValuePair_HSTRING_IInspectableVtbl
|
||||
mapview_iterable_kvpair_HSTRING_IInspectable_vtbl =
|
||||
{
|
||||
/* IUnknown */
|
||||
mapview_iterable_kvpair_HSTRING_IInspectable_QueryInterface,
|
||||
mapview_iterable_kvpair_HSTRING_IInspectable_AddRef,
|
||||
mapview_iterable_kvpair_HSTRING_IInspectable_Release,
|
||||
/* IInspectable */
|
||||
mapview_iterable_kvpair_HSTRING_IInspectable_GetIids,
|
||||
mapview_iterable_kvpair_HSTRING_IInspectable_GetRuntimeClassName,
|
||||
mapview_iterable_kvpair_HSTRING_IInspectable_GetTrustLevel,
|
||||
/* IIterable<IKeyValuePair<HSTRING, IInspectable*>> */
|
||||
mapview_iterable_kvpair_HSTRING_IInspectable_First
|
||||
};
|
||||
|
||||
struct propertyset
|
||||
{
|
||||
IPropertySet IPropertySet_iface;
|
||||
|
@ -336,6 +375,8 @@ static HRESULT STDMETHODCALLTYPE propertyset_GetView(
|
|||
return E_OUTOFMEMORY;
|
||||
|
||||
impl->IMapView_HSTRING_IInspectable_iface.lpVtbl = &mapview_HSTRING_IInspectable_vtbl;
|
||||
impl->IIterable_IKeyValuePair_HSTRING_IInspectable_iface.lpVtbl =
|
||||
&mapview_iterable_kvpair_HSTRING_IInspectable_vtbl;
|
||||
|
||||
impl->ref = 1;
|
||||
*view = &impl->IMapView_HSTRING_IInspectable_iface;
|
||||
|
|
|
@ -109,7 +109,7 @@ static void test_IPropertySet(void)
|
|||
{
|
||||
hr = IMapView_HSTRING_IInspectable_QueryInterface( map_view, &IID_IIterable_IKeyValuePair_HSTRING_IInspectable,
|
||||
(void **)&iterable );
|
||||
todo_wine ok( SUCCEEDED( hr ), "QueryInterface failed, got %#lx\n", hr );
|
||||
ok( SUCCEEDED( hr ), "QueryInterface failed, got %#lx\n", hr );
|
||||
if (SUCCEEDED( hr ))
|
||||
{
|
||||
hr = IIterable_IKeyValuePair_HSTRING_IInspectable_First( iterable, &iterator );
|
||||
|
|
Loading…
Reference in a new issue