Commit ddff8633 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

windows.perception.stub: Add stub IHolographicSpaceInterop interface.

parent bb47eb9f
...@@ -27,6 +27,7 @@ struct holographicspace ...@@ -27,6 +27,7 @@ struct holographicspace
IActivationFactory IActivationFactory_iface; IActivationFactory IActivationFactory_iface;
IHolographicSpaceStatics2 IHolographicSpaceStatics2_iface; IHolographicSpaceStatics2 IHolographicSpaceStatics2_iface;
IHolographicSpaceStatics3 IHolographicSpaceStatics3_iface; IHolographicSpaceStatics3 IHolographicSpaceStatics3_iface;
IHolographicSpaceInterop IHolographicSpaceInterop_iface;
LONG ref; LONG ref;
}; };
...@@ -65,6 +66,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID ...@@ -65,6 +66,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID
return S_OK; return S_OK;
} }
if (IsEqualGUID( iid, &IID_IHolographicSpaceInterop ))
{
*out = &impl->IHolographicSpaceInterop_iface;
IInspectable_AddRef( *out );
return S_OK;
}
FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) );
*out = NULL; *out = NULL;
return E_NOINTERFACE; return E_NOINTERFACE;
...@@ -193,11 +201,36 @@ static const struct IHolographicSpaceStatics3Vtbl holographicspace_statics3_vtbl ...@@ -193,11 +201,36 @@ static const struct IHolographicSpaceStatics3Vtbl holographicspace_statics3_vtbl
holographicspace_statics3_get_IsConfigured, holographicspace_statics3_get_IsConfigured,
}; };
DEFINE_IINSPECTABLE( holographicspace_interop, IHolographicSpaceInterop, struct holographicspace, IActivationFactory_iface )
static HRESULT WINAPI holographicspace_interop_CreateForWindow( IHolographicSpaceInterop *iface,
HWND window, REFIID iid, void **holographic_space )
{
FIXME( "iface %p, window %p, iid %s, holographic_space %p.\n", iface, window, debugstr_guid( iid ), holographic_space );
*holographic_space = NULL;
return E_NOTIMPL;
}
static const struct IHolographicSpaceInteropVtbl holographicspace_interop_vtbl =
{
holographicspace_interop_QueryInterface,
holographicspace_interop_AddRef,
holographicspace_interop_Release,
/* IInspectable methods */
holographicspace_interop_GetIids,
holographicspace_interop_GetRuntimeClassName,
holographicspace_interop_GetTrustLevel,
/* IHolographicSpaceInterop methods */
holographicspace_interop_CreateForWindow,
};
static struct holographicspace holographicspace_statics = static struct holographicspace holographicspace_statics =
{ {
{&factory_vtbl}, {&factory_vtbl},
{&holographicspace_statics2_vtbl}, {&holographicspace_statics2_vtbl},
{&holographicspace_statics3_vtbl}, {&holographicspace_statics3_vtbl},
{&holographicspace_interop_vtbl},
1, 1,
}; };
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "windows.perception.spatial.surfaces.h" #include "windows.perception.spatial.surfaces.h"
#define WIDL_using_Windows_Graphics_Holographic #define WIDL_using_Windows_Graphics_Holographic
#include "windows.graphics.holographic.h" #include "windows.graphics.holographic.h"
#include "holographicspaceinterop.h"
extern IActivationFactory *observer_factory; extern IActivationFactory *observer_factory;
extern IActivationFactory *holographicspace_factory; extern IActivationFactory *holographicspace_factory;
......
...@@ -32,18 +32,20 @@ ...@@ -32,18 +32,20 @@
#include "windows.perception.spatial.surfaces.h" #include "windows.perception.spatial.surfaces.h"
#define WIDL_using_Windows_Graphics_Holographic #define WIDL_using_Windows_Graphics_Holographic
#include "windows.graphics.holographic.h" #include "windows.graphics.holographic.h"
#include "holographicspaceinterop.h"
#include "wine/test.h" #include "wine/test.h"
#define check_interface( obj, iid ) check_interface_( __LINE__, obj, iid ) #define check_interface( obj, iid, can_be_broken ) check_interface_( __LINE__, obj, iid, can_be_broken )
static void check_interface_( unsigned int line, void *obj, const IID *iid ) static void check_interface_( unsigned int line, void *obj, const IID *iid, BOOL can_be_broken )
{ {
IUnknown *iface = obj; IUnknown *iface = obj;
IUnknown *unk; IUnknown *unk;
HRESULT hr; HRESULT hr;
hr = IUnknown_QueryInterface( iface, iid, (void **)&unk ); hr = IUnknown_QueryInterface( iface, iid, (void **)&unk );
ok_(__FILE__, line)( hr == S_OK, "got hr %#lx.\n", hr ); ok_(__FILE__, line)( hr == S_OK || broken( can_be_broken && hr == E_NOINTERFACE ), "got hr %#lx.\n", hr );
if (SUCCEEDED(hr))
IUnknown_Release( unk ); IUnknown_Release( unk );
} }
...@@ -69,10 +71,10 @@ static void test_ObserverStatics(void) ...@@ -69,10 +71,10 @@ static void test_ObserverStatics(void)
return; return;
} }
check_interface( factory, &IID_IUnknown ); check_interface( factory, &IID_IUnknown, FALSE );
check_interface( factory, &IID_IInspectable ); check_interface( factory, &IID_IInspectable, FALSE );
check_interface( factory, &IID_IAgileObject ); check_interface( factory, &IID_IAgileObject, FALSE );
check_interface( factory, &IID_ISpatialSurfaceObserverStatics ); check_interface( factory, &IID_ISpatialSurfaceObserverStatics, FALSE );
hr = IActivationFactory_QueryInterface( factory, &IID_ISpatialSurfaceObserverStatics2, (void **)&observer_statics2 ); hr = IActivationFactory_QueryInterface( factory, &IID_ISpatialSurfaceObserverStatics2, (void **)&observer_statics2 );
if (hr == E_NOINTERFACE) /* win1607 */ if (hr == E_NOINTERFACE) /* win1607 */
...@@ -118,9 +120,10 @@ static void test_HolographicSpaceStatics(void) ...@@ -118,9 +120,10 @@ static void test_HolographicSpaceStatics(void)
return; return;
} }
check_interface( factory, &IID_IUnknown ); check_interface( factory, &IID_IUnknown, FALSE );
check_interface( factory, &IID_IInspectable ); check_interface( factory, &IID_IInspectable, FALSE );
check_interface( factory, &IID_IAgileObject ); check_interface( factory, &IID_IAgileObject, FALSE );
check_interface( factory, &IID_IHolographicSpaceInterop, TRUE /* broken on Testbot Win1607 */ );
hr = IActivationFactory_QueryInterface( factory, &IID_IHolographicSpaceStatics2, (void **)&holographicspace_statics2 ); hr = IActivationFactory_QueryInterface( factory, &IID_IHolographicSpaceStatics2, (void **)&holographicspace_statics2 );
if (hr == E_NOINTERFACE) /* win1607 */ if (hr == E_NOINTERFACE) /* win1607 */
......
...@@ -345,6 +345,7 @@ SOURCES = \ ...@@ -345,6 +345,7 @@ SOURCES = \
highlevelmonitorconfigurationapi.h \ highlevelmonitorconfigurationapi.h \
hlguids.h \ hlguids.h \
hlink.idl \ hlink.idl \
holographicspaceinterop.idl \
hrtfapoapi.idl \ hrtfapoapi.idl \
hstring.idl \ hstring.idl \
htiface.idl \ htiface.idl \
......
/*
* Copyright (C) 2024 Paul Gofman for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "inspectable.idl";
[
uuid(5c4ee536-6a98-4b86-a170-587013d6fd4b),
]
interface IHolographicSpaceInterop : IInspectable
{
HRESULT CreateForWindow( [in] HWND window, [in] REFIID iid, [out, iid_is(iid)] void **holographic_space);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment