This corrects what interface should be returned, there isn't a hierarchy with these IUISettings at all. It should return IUISettings and then QI for any others that it requires.
-- v4: windows.ui: Use DEFINE_IINSPECTABLE for IUISettings3 windows.ui: Add IUISettings2 stub interface windows.ui: Add Stubbed interface IUISettings include: Add Missing IUISettings interfaces.
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- include/windows.ui.viewmanagement.idl | 120 ++++++++++++++++++++++++++ 1 file changed, 120 insertions(+)
diff --git a/include/windows.ui.viewmanagement.idl b/include/windows.ui.viewmanagement.idl index e7a90646338..336ec57fc9e 100644 --- a/include/windows.ui.viewmanagement.idl +++ b/include/windows.ui.viewmanagement.idl @@ -39,12 +39,26 @@ namespace Windows.UI.ViewManagement typedef enum UIElementType UIElementType;
interface IUISettings; + interface IUISettings2; interface IUISettings3; + interface IUISettings4; + interface IUISettings5; + interface IUISettings6; + + interface IUISettingsAnimationsEnabledChangedEventArgs; + interface IUISettingsAutoHideScrollBarsChangedEventArgs; + interface IUISettingsMessageDurationChangedEventArgs;
runtimeclass UISettings; + runtimeclass UISettingsAnimationsEnabledChangedEventArgs; + runtimeclass UISettingsAutoHideScrollBarsChangedEventArgs; + runtimeclass UISettingsMessageDurationChangedEventArgs;
declare { interface Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings *, IInspectable *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings *, Windows.UI.ViewManagement.UISettingsAnimationsEnabledChangedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings *, Windows.UI.ViewManagement.UISettingsAutoHideScrollBarsChangedEventArgs *>; + interface Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings *, Windows.UI.ViewManagement.UISettingsMessageDurationChangedEventArgs *>; }
[ @@ -141,6 +155,19 @@ namespace Windows.UI.ViewManagement HRESULT UIElementColor([in] Windows.UI.ViewManagement.UIElementType element, [out, retval] Windows.UI.Color *value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.ViewManagement.UISettings), + uuid(bad82401-2721-44f9-bb91-2bb228be442f) + ] + interface IUISettings2 : IInspectable + { + [propget] HRESULT TextScaleFactor([out, retval] DOUBLE *value); + [eventadd] HRESULT TextScaleFactorChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings*, + IInspectable *> *handler, [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT TextScaleFactorChanged([in] EventRegistrationToken cookie); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.UI.ViewManagement.UISettings), @@ -154,6 +181,95 @@ namespace Windows.UI.ViewManagement [eventremove] HRESULT ColorValuesChanged([in] EventRegistrationToken cookie); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.UI.ViewManagement.UISettings), + uuid(52bb3002-919b-4d6b-9b78-8dd66ff4b93b) + ] + interface IUISettings4 : IInspectable + { + [propget] HRESULT AdvancedEffectsEnabled([out, retval] boolean *value); + [eventadd] HRESULT AdvancedEffectsEnabledChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings *, IInspectable *> *handler, + [out, retval] EventRegistrationToken *cookie); + [eventremove] HRESULT AdvancedEffectsEnabledChanged([in] EventRegistrationToken cookie); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 8.0), + exclusiveto(Windows.UI.ViewManagement.UISettings), + uuid(5349d588-0cb5-5f05-bd34-706b3231f0bd) + ] + interface IUISettings5 : IInspectable + { + [propget] HRESULT AutoHideScrollBars([out] [retval] boolean *value); + [eventadd] HRESULT AutoHideScrollBarsChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings *, + Windows.UI.ViewManagement.UISettingsAutoHideScrollBarsChangedEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT AutoHideScrollBarsChanged([in] EventRegistrationToken token); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 10.0), + exclusiveto(Windows.UI.ViewManagement.UISettings), + uuid(aef19bd7-fe31-5a04-ada4-469aaec6dfa9) + ] + interface IUISettings6 : IInspectable + { + [eventadd] HRESULT AnimationsEnabledChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings*, + Windows.UI.ViewManagement.UISettingsAnimationsEnabledChangedEventArgs *>* handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT AnimationsEnabledChanged([in] EventRegistrationToken token); + [eventadd] HRESULT MessageDurationChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings*, + Windows.UI.ViewManagement.UISettingsMessageDurationChangedEventArgs *> *handler, [out, retval] EventRegistrationToken *token); + [eventremove] HRESULT MessageDurationChanged([in] EventRegistrationToken token); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 10.0), + exclusiveto(Windows.UI.ViewManagement.UISettingsAnimationsEnabledChangedEventArgs), + uuid(0c7b4b3d-2ea1-533e-894d-415bc5243c29) + ] + interface IUISettingsAnimationsEnabledChangedEventArgs : IInspectable + { + } + + [ + contract(Windows.Foundation.UniversalApiContract, 8.0), + exclusiveto(Windows.UI.ViewManagement.UISettingsAutoHideScrollBarsChangedEventArgs), + uuid(87afd4b2-9146-5f02-8f6b-06d454174c0f) + ] + interface IUISettingsAutoHideScrollBarsChangedEventArgs : IInspectable + { + } + + [ + contract(Windows.Foundation.UniversalApiContract, 10.0), + exclusiveto(Windows.UI.ViewManagement.UISettingsMessageDurationChangedEventArgs), + uuid(338aad52-4a5d-5b59-8002-d930f608fd6e) + ] + interface IUISettingsMessageDurationChangedEventArgs : IInspectable + { + } + + [contract(Windows.Foundation.UniversalApiContract, 10.0)] + [marshaling_behavior(agile)] + runtimeclass UISettingsAnimationsEnabledChangedEventArgs + { + [default] interface Windows.UI.ViewManagement.IUISettingsAnimationsEnabledChangedEventArgs; + } + + [contract(Windows.Foundation.UniversalApiContract, 8.0)] + [marshaling_behavior(agile)] + runtimeclass UISettingsAutoHideScrollBarsChangedEventArgs + { + [default] interface Windows.UI.ViewManagement.IUISettingsAutoHideScrollBarsChangedEventArgs; + } + + [contract(Windows.Foundation.UniversalApiContract, 10.0)] + [marshaling_behavior(agile)] + runtimeclass UISettingsMessageDurationChangedEventArgs + { + [default] interface Windows.UI.ViewManagement.IUISettingsMessageDurationChangedEventArgs; + } + [ activatable(Windows.Foundation.UniversalApiContract, 1.0), contract(Windows.Foundation.UniversalApiContract, 1.0), @@ -162,6 +278,10 @@ namespace Windows.UI.ViewManagement runtimeclass UISettings { [default] interface Windows.UI.ViewManagement.IUISettings; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.ViewManagement.IUISettings2; [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.ViewManagement.IUISettings3; + [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.UI.ViewManagement.IUISettings4; + [contract(Windows.Foundation.UniversalApiContract, 8.0)] interface Windows.UI.ViewManagement.IUISettings5; + [contract(Windows.Foundation.UniversalApiContract, 10.0)] interface Windows.UI.ViewManagement.IUISettings6; } }
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
This corrects what interface should be returned, there isn't a hierarchy with these IUISettings at all. It should return IUISettings and the QI for any others that it requires. --- dlls/windows.ui/uisettings.c | 182 ++++++++++++++++++++++++++++++++--- 1 file changed, 170 insertions(+), 12 deletions(-)
diff --git a/dlls/windows.ui/uisettings.c b/dlls/windows.ui/uisettings.c index 943fbb6a37e..cd1a2b7050d 100644 --- a/dlls/windows.ui/uisettings.c +++ b/dlls/windows.ui/uisettings.c @@ -25,47 +25,62 @@ WINE_DEFAULT_DEBUG_CHANNEL(ui);
struct uisettings { + IUISettings IUISettings_iface; IUISettings3 IUISettings3_iface; LONG ref; };
+static inline struct uisettings *impl_from_IUISettings( IUISettings *iface ) +{ + return CONTAINING_RECORD( iface, struct uisettings, IUISettings_iface ); +} + static inline struct uisettings *impl_from_IUISettings3( IUISettings3 *iface ) { return CONTAINING_RECORD( iface, struct uisettings, IUISettings3_iface ); }
-static HRESULT WINAPI uisettings3_QueryInterface( IUISettings3 *iface, REFIID iid, void **out ) +static HRESULT WINAPI uisettings_QueryInterface( IUISettings *iface, REFIID iid, void **out ) { - struct uisettings *impl = impl_from_IUISettings3( iface ); + struct uisettings *impl = impl_from_IUISettings( iface );
TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out );
+ *out = NULL; + if (IsEqualGUID( iid, &IID_IUnknown ) || IsEqualGUID( iid, &IID_IInspectable ) || IsEqualGUID( iid, &IID_IAgileObject ) || - IsEqualGUID( iid, &IID_IUISettings3 )) + IsEqualGUID( iid, &IID_IUISettings )) + { + *out = &impl->IUISettings_iface; + } + else if (IsEqualGUID( iid, &IID_IUISettings3 )) { *out = &impl->IUISettings3_iface; - IInspectable_AddRef( *out ); - return S_OK; }
- FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); - *out = NULL; - return E_NOINTERFACE; + if (!*out) + { + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + return E_NOINTERFACE; + } + + IUnknown_AddRef( (IUnknown*)*out ); + return S_OK; }
-static ULONG WINAPI uisettings3_AddRef( IUISettings3 *iface ) +static ULONG WINAPI uisettings_AddRef( IUISettings *iface ) { - struct uisettings *impl = impl_from_IUISettings3( iface ); + struct uisettings *impl = impl_from_IUISettings( iface ); ULONG ref = InterlockedIncrement( &impl->ref ); TRACE( "iface %p, ref %lu.\n", iface, ref ); return ref; }
-static ULONG WINAPI uisettings3_Release( IUISettings3 *iface ) +static ULONG WINAPI uisettings_Release( IUISettings *iface ) { - struct uisettings *impl = impl_from_IUISettings3( iface ); + struct uisettings *impl = impl_from_IUISettings( iface ); ULONG ref = InterlockedDecrement( &impl->ref );
TRACE( "iface %p, ref %lu.\n", iface, ref ); @@ -74,6 +89,148 @@ static ULONG WINAPI uisettings3_Release( IUISettings3 *iface ) return ref; }
+static HRESULT WINAPI uisettings_GetIids( IUISettings *iface, ULONG *iid_count, IID **iids ) +{ + FIXME( "iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_GetRuntimeClassName( IUISettings *iface, HSTRING *class_name ) +{ + FIXME( "iface %p, class_name %p stub!\n", iface, class_name ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_GetTrustLevel( IUISettings *iface, TrustLevel *trust_level ) +{ + FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_HandPreference( IUISettings *iface, enum HandPreference *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_CursorSize( IUISettings *iface, struct Size *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_ScrollBarSize( IUISettings *iface, struct Size *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_ScrollBarArrowSize( IUISettings *iface, struct Size *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_ScrollBarThumbBoxSize( IUISettings *iface, struct Size *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_MessageDuration( IUISettings *iface, UINT32 *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_AnimationsEnabled( IUISettings *iface, boolean *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_CaretBrowsingEnabled( IUISettings *iface, boolean *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_CaretBlinkRate( IUISettings *iface, UINT32 *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_CaretWidth( IUISettings *iface, UINT32 *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_DoubleClickTime( IUISettings *iface, UINT32 *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_get_MouseHoverTime( IUISettings *iface, UINT32 *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI uisettings_UIElementColor( IUISettings *iface, enum UIElementType element, struct Color *value ) +{ + FIXME( "iface %p, element %d value %p stub!\n", iface, element, value ); + return E_NOTIMPL; +} + +static const struct IUISettingsVtbl uisettings_vtbl = +{ + uisettings_QueryInterface, + uisettings_AddRef, + uisettings_Release, + + /* IInspectable methods */ + uisettings_GetIids, + uisettings_GetRuntimeClassName, + uisettings_GetTrustLevel, + + /* IUISettings methods */ + uisettings_get_HandPreference, + uisettings_get_CursorSize, + uisettings_get_ScrollBarSize, + uisettings_get_ScrollBarArrowSize, + uisettings_get_ScrollBarThumbBoxSize, + uisettings_get_MessageDuration, + uisettings_get_AnimationsEnabled, + uisettings_get_CaretBrowsingEnabled, + uisettings_get_CaretBlinkRate, + uisettings_get_CaretWidth, + uisettings_get_DoubleClickTime, + uisettings_get_MouseHoverTime, + uisettings_UIElementColor +}; + + +static HRESULT WINAPI uisettings3_QueryInterface( IUISettings3 *iface, REFIID iid, void **out ) +{ + struct uisettings *impl = impl_from_IUISettings3( iface ); + return uisettings_QueryInterface(&impl->IUISettings_iface, iid, out); +} + +static ULONG WINAPI uisettings3_AddRef( IUISettings3 *iface ) +{ + struct uisettings *impl = impl_from_IUISettings3( iface ); + return uisettings_AddRef(&impl->IUISettings_iface); +} + +static ULONG WINAPI uisettings3_Release( IUISettings3 *iface ) +{ + struct uisettings *impl = impl_from_IUISettings3( iface ); + return uisettings_Release(&impl->IUISettings_iface); +} + static HRESULT WINAPI uisettings3_GetIids( IUISettings3 *iface, ULONG *iid_count, IID **iids ) { FIXME( "iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids ); @@ -244,6 +401,7 @@ static HRESULT WINAPI factory_ActivateInstance( IActivationFactory *iface, IInsp return E_OUTOFMEMORY; }
+ impl->IUISettings_iface.lpVtbl = &uisettings_vtbl; impl->IUISettings3_iface.lpVtbl = &uisettings3_vtbl; impl->ref = 1;
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/windows.ui/private.h | 38 +++++++++++++++++++++++++++++++ dlls/windows.ui/uisettings.c | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+)
diff --git a/dlls/windows.ui/private.h b/dlls/windows.ui/private.h index 1af5faf152b..60a928ca865 100644 --- a/dlls/windows.ui/private.h +++ b/dlls/windows.ui/private.h @@ -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 diff --git a/dlls/windows.ui/uisettings.c b/dlls/windows.ui/uisettings.c index cd1a2b7050d..404daca8d72 100644 --- a/dlls/windows.ui/uisettings.c +++ b/dlls/windows.ui/uisettings.c @@ -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;
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/windows.ui/uisettings.c | 41 +----------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-)
diff --git a/dlls/windows.ui/uisettings.c b/dlls/windows.ui/uisettings.c index 404daca8d72..041388da33b 100644 --- a/dlls/windows.ui/uisettings.c +++ b/dlls/windows.ui/uisettings.c @@ -36,11 +36,6 @@ static inline struct uisettings *impl_from_IUISettings( IUISettings *iface ) return CONTAINING_RECORD( iface, struct uisettings, IUISettings_iface ); }
-static inline struct uisettings *impl_from_IUISettings3( IUISettings3 *iface ) -{ - return CONTAINING_RECORD( iface, struct uisettings, IUISettings3_iface ); -} - static HRESULT WINAPI uisettings_QueryInterface( IUISettings *iface, REFIID iid, void **out ) { struct uisettings *impl = impl_from_IUISettings( iface ); @@ -255,41 +250,7 @@ static const struct IUISettings2Vtbl uisettings2_vtbl = uisettings2_remove_TextScaleFactorChanged };
-static HRESULT WINAPI uisettings3_QueryInterface( IUISettings3 *iface, REFIID iid, void **out ) -{ - struct uisettings *impl = impl_from_IUISettings3( iface ); - return uisettings_QueryInterface(&impl->IUISettings_iface, iid, out); -} - -static ULONG WINAPI uisettings3_AddRef( IUISettings3 *iface ) -{ - struct uisettings *impl = impl_from_IUISettings3( iface ); - return uisettings_AddRef(&impl->IUISettings_iface); -} - -static ULONG WINAPI uisettings3_Release( IUISettings3 *iface ) -{ - struct uisettings *impl = impl_from_IUISettings3( iface ); - return uisettings_Release(&impl->IUISettings_iface); -} - -static HRESULT WINAPI uisettings3_GetIids( IUISettings3 *iface, ULONG *iid_count, IID **iids ) -{ - FIXME( "iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids ); - return E_NOTIMPL; -} - -static HRESULT WINAPI uisettings3_GetRuntimeClassName( IUISettings3 *iface, HSTRING *class_name ) -{ - FIXME( "iface %p, class_name %p stub!\n", iface, class_name ); - return E_NOTIMPL; -} - -static HRESULT WINAPI uisettings3_GetTrustLevel( IUISettings3 *iface, TrustLevel *trust_level ) -{ - FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level ); - return E_NOTIMPL; -} +DEFINE_IINSPECTABLE( uisettings3, IUISettings3, struct uisettings, IUISettings_iface );
static DWORD get_app_theme(void) {
Rémi Bernon (@rbernon) commented about include/windows.ui.viewmanagement.idl:
runtimeclass UISettings { [default] interface Windows.UI.ViewManagement.IUISettings;
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.ViewManagement.IUISettings2; [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.ViewManagement.IUISettings3;
[contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.UI.ViewManagement.IUISettings4;
[contract(Windows.Foundation.UniversalApiContract, 8.0)] interface Windows.UI.ViewManagement.IUISettings5;
[contract(Windows.Foundation.UniversalApiContract, 10.0)] interface Windows.UI.ViewManagement.IUISettings6;
Are `IUISettings4`, `IUISettings5` and `IUISettings6` needed by anything? If not, you don't have to define them, forward declaration is enough even for this.
Rémi Bernon (@rbernon) commented about include/windows.ui.viewmanagement.idl:
HRESULT UIElementColor([in] Windows.UI.ViewManagement.UIElementType element, [out, retval] Windows.UI.Color *value); }
- [
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.ViewManagement.UISettings),
uuid(bad82401-2721-44f9-bb91-2bb228be442f)
- ]
- interface IUISettings2 : IInspectable
- {
[propget] HRESULT TextScaleFactor([out, retval] DOUBLE *value);
[eventadd] HRESULT TextScaleFactorChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings*,
IInspectable *> *handler, [out, retval] EventRegistrationToken *cookie);
```suggestion:-1+0 [eventadd] HRESULT TextScaleFactorChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.ViewManagement.UISettings *, IInspectable *> *handler, [out, retval] EventRegistrationToken *cookie); ```