mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:35:52 +00:00
windows.ui: Add IUISettings2 stub interface.
This commit is contained in:
parent
f797ad083e
commit
c1a9f4ae46
|
@ -38,4 +38,42 @@
|
|||
|
||||
extern IActivationFactory *uisettings_factory;
|
||||
|
||||
#define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \
|
||||
static inline impl_type *impl_from( iface_type *iface ) \
|
||||
{ \
|
||||
return CONTAINING_RECORD( iface, impl_type, iface_mem ); \
|
||||
} \
|
||||
static HRESULT WINAPI pfx##_QueryInterface( iface_type *iface, REFIID iid, void **out ) \
|
||||
{ \
|
||||
impl_type *impl = impl_from( iface ); \
|
||||
return IInspectable_QueryInterface( (IInspectable *)(expr), iid, out ); \
|
||||
} \
|
||||
static ULONG WINAPI pfx##_AddRef( iface_type *iface ) \
|
||||
{ \
|
||||
impl_type *impl = impl_from( iface ); \
|
||||
return IInspectable_AddRef( (IInspectable *)(expr) ); \
|
||||
} \
|
||||
static ULONG WINAPI pfx##_Release( iface_type *iface ) \
|
||||
{ \
|
||||
impl_type *impl = impl_from( iface ); \
|
||||
return IInspectable_Release( (IInspectable *)(expr) ); \
|
||||
} \
|
||||
static HRESULT WINAPI pfx##_GetIids( iface_type *iface, ULONG *iid_count, IID **iids ) \
|
||||
{ \
|
||||
impl_type *impl = impl_from( iface ); \
|
||||
return IInspectable_GetIids( (IInspectable *)(expr), iid_count, iids ); \
|
||||
} \
|
||||
static HRESULT WINAPI pfx##_GetRuntimeClassName( iface_type *iface, HSTRING *class_name ) \
|
||||
{ \
|
||||
impl_type *impl = impl_from( iface ); \
|
||||
return IInspectable_GetRuntimeClassName( (IInspectable *)(expr), class_name ); \
|
||||
} \
|
||||
static HRESULT WINAPI pfx##_GetTrustLevel( iface_type *iface, TrustLevel *trust_level ) \
|
||||
{ \
|
||||
impl_type *impl = impl_from( iface ); \
|
||||
return IInspectable_GetTrustLevel( (IInspectable *)(expr), trust_level ); \
|
||||
}
|
||||
#define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \
|
||||
DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface )
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ui);
|
|||
struct uisettings
|
||||
{
|
||||
IUISettings IUISettings_iface;
|
||||
IUISettings2 IUISettings2_iface;
|
||||
IUISettings3 IUISettings3_iface;
|
||||
LONG ref;
|
||||
};
|
||||
|
@ -55,6 +56,10 @@ static HRESULT WINAPI uisettings_QueryInterface( IUISettings *iface, REFIID iid,
|
|||
{
|
||||
*out = &impl->IUISettings_iface;
|
||||
}
|
||||
else if (IsEqualGUID( iid, &IID_IUISettings2 ))
|
||||
{
|
||||
*out = &impl->IUISettings2_iface;
|
||||
}
|
||||
else if (IsEqualGUID( iid, &IID_IUISettings3 ))
|
||||
{
|
||||
*out = &impl->IUISettings3_iface;
|
||||
|
@ -212,6 +217,43 @@ static const struct IUISettingsVtbl uisettings_vtbl =
|
|||
uisettings_UIElementColor
|
||||
};
|
||||
|
||||
DEFINE_IINSPECTABLE( uisettings2, IUISettings2, struct uisettings, IUISettings_iface );
|
||||
|
||||
static HRESULT WINAPI uisettings2_get_TextScaleFactor( IUISettings2 *iface, DOUBLE *value )
|
||||
{
|
||||
FIXME( "iface %p, value %p stub!\n", iface, value );
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI uisettings2_add_TextScaleFactorChanged( IUISettings2 *iface, ITypedEventHandler_UISettings_IInspectable *handler,
|
||||
EventRegistrationToken *cookie )
|
||||
{
|
||||
FIXME( "iface %p, handler %p, cookie %p stub!\n", iface, handler, cookie );
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI uisettings2_remove_TextScaleFactorChanged( IUISettings2 *iface, EventRegistrationToken cookie )
|
||||
{
|
||||
FIXME( "iface %p, cookie %#I64x stub!\n", iface, cookie.value );
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const struct IUISettings2Vtbl uisettings2_vtbl =
|
||||
{
|
||||
uisettings2_QueryInterface,
|
||||
uisettings2_AddRef,
|
||||
uisettings2_Release,
|
||||
|
||||
/* IInspectable methods */
|
||||
uisettings2_GetIids,
|
||||
uisettings2_GetRuntimeClassName,
|
||||
uisettings2_GetTrustLevel,
|
||||
|
||||
/* IUISettings2 methods */
|
||||
uisettings2_get_TextScaleFactor,
|
||||
uisettings2_add_TextScaleFactorChanged,
|
||||
uisettings2_remove_TextScaleFactorChanged
|
||||
};
|
||||
|
||||
static HRESULT WINAPI uisettings3_QueryInterface( IUISettings3 *iface, REFIID iid, void **out )
|
||||
{
|
||||
|
@ -402,6 +444,7 @@ static HRESULT WINAPI factory_ActivateInstance( IActivationFactory *iface, IInsp
|
|||
}
|
||||
|
||||
impl->IUISettings_iface.lpVtbl = &uisettings_vtbl;
|
||||
impl->IUISettings2_iface.lpVtbl = &uisettings2_vtbl;
|
||||
impl->IUISettings3_iface.lpVtbl = &uisettings3_vtbl;
|
||||
impl->ref = 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue