[PATCH 0/2] MR9889: windows.ui: Stub IUISettings2::get_TextScaleFactor().
Needed by HP Prime Virtual Calculator Emulator. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9889
From: Mohamad Al-Jaf <mohamadaljaf@gmail.com> --- dlls/windows.ui/tests/uisettings.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/windows.ui/tests/uisettings.c b/dlls/windows.ui/tests/uisettings.c index 4ab05d14ddd..d63961f3a60 100644 --- a/dlls/windows.ui/tests/uisettings.c +++ b/dlls/windows.ui/tests/uisettings.c @@ -177,8 +177,10 @@ static void test_UISettings(void) { static const WCHAR *uisettings_name = L"Windows.UI.ViewManagement.UISettings"; IActivationFactory *factory; + IUISettings2 *uisettings2; IUISettings3 *uisettings3; IInspectable *inspectable; + DOUBLE text_scale_factor; DWORD default_theme; UIColorType type; Color value; @@ -222,6 +224,19 @@ static void test_UISettings(void) check_interface( inspectable, &IID_IWeakReferenceSource, TRUE ); check_interface( inspectable, &IID_IWeakReference, FALSE ); + hr = IInspectable_QueryInterface( inspectable, &IID_IUISettings2, (void **)&uisettings2 ); + todo_wine + ok( hr == S_OK, "got hr %#lx.\n", hr ); + + text_scale_factor = 12345.6; + hr = IUISettings2_get_TextScaleFactor( uisettings2, &text_scale_factor ); + todo_wine + ok( hr == S_OK, "got hr %#lx.\n", hr ); + todo_wine + ok( text_scale_factor == 1.0, "got text_scale_factor %f.\n", text_scale_factor ); + + IUISettings2_Release( uisettings2 ); + test_AccentColor( uisettings3 ); default_theme = get_app_theme(); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9889
From: Mohamad Al-Jaf <mohamadaljaf@gmail.com> Needed by HP Prime Virtual Calculator Emulator. --- dlls/windows.ui/tests/uisettings.c | 3 --- dlls/windows.ui/uisettings.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/windows.ui/tests/uisettings.c b/dlls/windows.ui/tests/uisettings.c index d63961f3a60..102d7a2ca8f 100644 --- a/dlls/windows.ui/tests/uisettings.c +++ b/dlls/windows.ui/tests/uisettings.c @@ -225,14 +225,11 @@ static void test_UISettings(void) check_interface( inspectable, &IID_IWeakReference, FALSE ); hr = IInspectable_QueryInterface( inspectable, &IID_IUISettings2, (void **)&uisettings2 ); - todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr ); text_scale_factor = 12345.6; hr = IUISettings2_get_TextScaleFactor( uisettings2, &text_scale_factor ); - todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr ); - todo_wine ok( text_scale_factor == 1.0, "got text_scale_factor %f.\n", text_scale_factor ); IUISettings2_Release( uisettings2 ); diff --git a/dlls/windows.ui/uisettings.c b/dlls/windows.ui/uisettings.c index a58becf3555..e94ec0916e9 100644 --- a/dlls/windows.ui/uisettings.c +++ b/dlls/windows.ui/uisettings.c @@ -235,7 +235,8 @@ DEFINE_IINSPECTABLE( uisettings2, IUISettings2, struct uisettings, IUISettings_i static HRESULT WINAPI uisettings2_get_TextScaleFactor( IUISettings2 *iface, DOUBLE *value ) { FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + *value = 1.0; + return S_OK; } static HRESULT WINAPI uisettings2_add_TextScaleFactorChanged( IUISettings2 *iface, ITypedEventHandler_UISettings_IInspectable *handler, -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9889
participants (2)
-
Mohamad Al-Jaf -
Mohamad Al-Jaf (@maljaf)