From: Mohamad Al-Jaf mohamadaljaf@gmail.com
Needed by iCUE. --- dlls/windows.ui.xaml/color_helper.c | 15 +++++++++++++-- dlls/windows.ui.xaml/tests/xaml.c | 3 --- 2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/windows.ui.xaml/color_helper.c b/dlls/windows.ui.xaml/color_helper.c index 8df93641e0f..09f0ae0196d 100644 --- a/dlls/windows.ui.xaml/color_helper.c +++ b/dlls/windows.ui.xaml/color_helper.c @@ -118,8 +118,19 @@ DEFINE_IINSPECTABLE( color_helper_statics, IColorHelperStatics, struct color_hel
static HRESULT WINAPI color_helper_statics_FromArgb( IColorHelperStatics *iface, BYTE a, BYTE r, BYTE g, BYTE b, Color *value ) { - FIXME( "iface %p, a %u, r %u, g %u, b %u, value %p stub!\n", iface, a, r, g, b, value ); - return E_NOTIMPL; + Color color; + + TRACE( "iface %p, a %u, r %u, g %u, b %u, value %p\n", iface, a, r, g, b, value ); + + if (!value) return E_POINTER; + + color.A = a; + color.R = r; + color.G = g; + color.B = b; + + *value = color; + return S_OK; }
static const struct IColorHelperStaticsVtbl color_helper_statics_vtbl = diff --git a/dlls/windows.ui.xaml/tests/xaml.c b/dlls/windows.ui.xaml/tests/xaml.c index eb0b845abf3..4d181b9bc66 100644 --- a/dlls/windows.ui.xaml/tests/xaml.c +++ b/dlls/windows.ui.xaml/tests/xaml.c @@ -75,12 +75,9 @@ static void test_ColorHelper(void)
memset( &color, 0, sizeof( color ) ); hr = IColorHelperStatics_FromArgb( color_helper_statics, 255, 255, 255, 255, NULL ); - todo_wine ok( hr == E_POINTER, "got hr %#lx.\n", hr ); hr = IColorHelperStatics_FromArgb( color_helper_statics, 255, 255, 255, 255, &color ); - todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr ); - todo_wine ok( color.A == 255 && color.R == 255 && color.G == 255 && color.B == 255, "got color.A = %u, color.R = %u, color.G = %u, color.B = %u,\n", color.A, color.R, color.G, color.B );