|
From f09892802c371d0e854211c9af1fe2760c20d30c Mon Sep 17 00:00:00 2001 |
|
From: Your name <[email protected]> |
|
Subject: [PATCH 0/5] buhl-tax-2025-wine10.0-rc3 |
|
|
|
Patches by Philipp Knechtges from |
|
https://gitlab.winehq.org/wine/wine/-/merge_requests/6492 |
|
|
|
|
|
Patches from Fabian Maurer from |
|
https://gitlab.winehq.org/DarkShadow44/wine/-/compare/master...remarkable?from_project_id=5.diff |
|
|
|
Fabian Maurer (3): |
|
include/windows.networking.connectivity: Add IConnectionProfile2 |
|
windows.networking.connectivity: Add IConnectionProfile2 stubs |
|
windows.networking.connectivity: Fake success for |
|
IsWwanConnectionProfile and IsWlanConnectionProfile |
|
|
|
Philipp Knechtges (2): |
|
d2d1: Add tests for drawing ID2D1GeometryGroup |
|
d2d1: Implement drawing for ID2D1GeometryGroup |
|
|
|
dlls/d2d1/geometry.c | 236 +++++++++++++++++- |
|
dlls/d2d1/tests/d2d1.c | 219 ++++++++++++++++ |
|
.../network_information.c | 162 ++++++++++++ |
|
include/windows.networking.connectivity.idl | 207 +++++++++++++++ |
|
4 files changed, 823 insertions(+), 1 deletion(-) |
|
|
|
-- |
|
2.43.0 |
|
|
|
From 190278478aa0cf0d1f52812197ec46e492250562 Mon Sep 17 00:00:00 2001 |
|
From: Philipp Knechtges <[email protected]> |
|
Date: Fri, 13 Sep 2024 11:16:44 +0200 |
|
Subject: [PATCH 1/5] d2d1: Add tests for drawing ID2D1GeometryGroup |
|
|
|
The functionality to draw ID2D1GeometryGroup is currently missing. |
|
Nothing is drawn. This causes the blank pages in the bug below. |
|
|
|
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51139 |
|
--- |
|
dlls/d2d1/tests/d2d1.c | 219 +++++++++++++++++++++++++++++++++++++++++ |
|
1 file changed, 219 insertions(+) |
|
|
|
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c |
|
index 625ad53292f..b9a460127d4 100644 |
|
--- a/dlls/d2d1/tests/d2d1.c |
|
+++ b/dlls/d2d1/tests/d2d1.c |
|
@@ -7061,6 +7061,7 @@ static void test_gradient(BOOL d3d11) |
|
static void test_draw_geometry(BOOL d3d11) |
|
{ |
|
ID2D1TransformedGeometry *transformed_geometry[4]; |
|
+ ID2D1GeometryGroup *geometry_group; |
|
ID2D1RectangleGeometry *rect_geometry[2]; |
|
D2D1_POINT_2F point = {0.0f, 0.0f}; |
|
D2D1_ROUNDED_RECT rounded_rect; |
|
@@ -7970,6 +7971,117 @@ static void test_draw_geometry(BOOL d3d11) |
|
hr = ID2D1PathGeometry_Open(geometry, &sink); |
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
|
|
+ set_point(&point, -0.402914f, 0.915514f); |
|
+ ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW); |
|
+ quadratic_to(sink, -0.310379f, 0.882571f, -0.116057f, 0.824000f); |
|
+ quadratic_to(sink, 0.008350f, 0.693614f, -0.052343f, 0.448886f); |
|
+ quadratic_to(sink, -0.154236f, 0.246072f, -0.279229f, 0.025343f); |
|
+ quadratic_to(sink, -0.370064f, -0.588586f, -0.383029f, -0.924114f); |
|
+ quadratic_to(sink, -0.295479f, -0.958764f, -0.017086f, -0.988400f); |
|
+ quadratic_to(sink, 0.208836f, -0.954157f, 0.272200f, -0.924114f); |
|
+ quadratic_to(sink, 0.295614f, -0.569071f, 0.230143f, 0.022886f); |
|
+ quadratic_to(sink, 0.101664f, 0.220643f, 0.012057f, 0.451571f); |
|
+ quadratic_to(sink, -0.028764f, 0.709014f, 0.104029f, 0.833943f); |
|
+ quadratic_to(sink, 0.319414f, 0.913057f, 0.403229f, 0.942628f); |
|
+ quadratic_to(sink, 0.317721f, 1.023450f, -0.017086f, 1.021771f); |
|
+ quadratic_to(sink, -0.310843f, 1.007472f, -0.402914f, 0.915514f); |
|
+ ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED); |
|
+ |
|
+ hr = ID2D1GeometrySink_Close(sink); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ ID2D1GeometrySink_Release(sink); |
|
+ |
|
+ set_matrix_identity(&matrix); |
|
+ translate_matrix(&matrix, 40.0f, 160.0f); |
|
+ scale_matrix(&matrix, 20.0f, 80.0f); |
|
+ hr = ID2D1Factory_CreateTransformedGeometry(factory, |
|
+ (ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ |
|
+ set_matrix_identity(&matrix); |
|
+ translate_matrix(&matrix, 160.0f, 640.0f); |
|
+ scale_matrix(&matrix, 40.0f, 160.0f); |
|
+ rotate_matrix(&matrix, M_PI / -5.0f); |
|
+ hr = ID2D1Factory_CreateTransformedGeometry(factory, |
|
+ (ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ ID2D1PathGeometry_Release(geometry); |
|
+ |
|
+ set_matrix_identity(&matrix); |
|
+ scale_matrix(&matrix, 0.5f, 1.0f); |
|
+ translate_matrix(&matrix, -80.0f, 0.0f); |
|
+ hr = ID2D1Factory_CreateTransformedGeometry(factory, |
|
+ (ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ |
|
+ set_matrix_identity(&matrix); |
|
+ rotate_matrix(&matrix, M_PI / 2.0f); |
|
+ translate_matrix(&matrix, 80.0f, -320.0f); |
|
+ scale_matrix(&matrix, 2.0f, 0.25f); |
|
+ hr = ID2D1Factory_CreateTransformedGeometry(factory, |
|
+ (ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ |
|
+ hr = ID2D1Factory_CreateGeometryGroup(factory, D2D1_FILL_MODE_WINDING, |
|
+ (ID2D1Geometry**) &transformed_geometry, 4, &geometry_group); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ ID2D1TransformedGeometry_Release(transformed_geometry[3]); |
|
+ ID2D1TransformedGeometry_Release(transformed_geometry[2]); |
|
+ ID2D1TransformedGeometry_Release(transformed_geometry[1]); |
|
+ ID2D1TransformedGeometry_Release(transformed_geometry[0]); |
|
+ |
|
+ ID2D1RenderTarget_BeginDraw(rt); |
|
+ ID2D1RenderTarget_Clear(rt, &color); |
|
+ ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry_group, (ID2D1Brush *)brush, 10.0f, NULL); |
|
+ hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ ID2D1GeometryGroup_Release(geometry_group); |
|
+ |
|
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 256, |
|
+ "iTANiwEagQEkeSp0LnIWAhZyFAYUchQGFHIUBhRyFAYUchQGFHIUBhRyFAYUchQGFHIUBhRyFAYU" |
|
+ "cxQFFHMUBRRzFAUUcxQFFHMUBRRzFAUUcxQFFHMUBRRzFAUUcxQFFHQUBBR0FAQUdBQDFHUUAxR1" |
|
+ "FAMUdRQDFHUUAxR1FQIUdhQCFHYUAhR2FAIUdhQCFHYUAhR2FAIUdhQBFHgoeCh4KHkmeiZ7JHwk" |
|
+ "fSJ+In8ggAEfggEeggEdhAEchQEbhQEahwEZhwEYiQEXiQEWigEWigEWigEWiwEViwEViwEViwEV" |
|
+ "igEXiQEXiQEXiQEYhwEZhgEbgwEefyR5KXQvbxgEGG4VBxhtMnAudCp6IoMBGOMu"); |
|
+ ok(match, "Figure does not match.\n"); |
|
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 512, |
|
+ "xpcBB7QCEqkCG6ACJJgCLI8CNYcCHgMc/gEeDBr4AR4UGPIBHR0W7AEdIxbmAR0pFt8BHTAV2gEd" |
|
+ "MBrWARwuIdMBGiwi1gEYKiPZARYoJNwBFiQk4AEWHyWxAQQvFhsltgEKKBYWJrwBECBOwQEXF0rI" |
|
+ "ARwOSM4Ba9UBYeABRf0BOIoCMZECLJYCKJoCJ5wCJp0CJJ8CIqICH6QCHagCGa4CFLoCB/yUAQAA"); |
|
+ ok(match, "Figure does not match.\n"); |
|
+ match = compare_figure(&ctx, 0, 160, 160, 320, 0xff652e89, 512, |
|
+ "yWQBnQEEmQEHlgELkwENkAEQjgETiwEVigEXhwEZhgEahQEcgwEdggEfgAEgfyF+I30jfCR8JXom" |
|
+ "eid4KHgodxQCFHYUAhR1FAMUdBUEFHMUBRRyFQUUchQHFHEUBxRwFAgUcBQJFG4UChRuFAoUbRUL" |
|
+ "FGwUDBRsFAwUbBQNFGwUDBRsFAwUbRQMFGwUDBRsFAwUbRQLFWwUDBRtFAsUbRQLFG0VCxRtFAsU" |
|
+ "bRQLFG4UCxRtFAsUbhQKFG4UCxRuFAoUbhQKFG4VCRRvFAoUbhQKFG8UCRRvFAoUbxQJFG8UCRRw" |
|
+ "FAgVbxQJFHAUCBRwFAgUcBUIFHAUCBRwFAgUcRQHFHEUBxRyFAYUchQGFHMUBRRzFAUUdBQEFHQU" |
|
+ "BBR1FAQUdBQEFHUUAxR1FAMUdhQCFHYUAhR2FQEUdxQBFHcpeCh4KHkneSd6JnoneiZ7JXwkfSN+" |
|
+ "In8hgAEggQEfgwEdhAEdhAEchQEbhgEahwEZiAEYGAFwGBYCcRcUBHEXEgZyFhEHchcOCXMWDAtz" |
|
+ "FgsMdBYIDnQWBhB1FgQQdhYCEnYqdyl3KXcpeCd5J3kneSd5JnomeyR8JHwkfCN9I30ifiF/IX4h" |
|
+ "fyF/IH8ggAEgfyCAASCAAR+AAR+BAR6CAR6BAR6CAR2CAR2DARyEARuEARuFARqGARmGARiKARSR" |
|
+ "AQqhYwAA"); |
|
+ ok(match, "Figure does not match.\n"); |
|
+ match = compare_figure(&ctx, 160, 160, 320, 320, 0xff652e89, 1024, |
|
+ "ytABA7gCCbICD60CFKkCF6cCGqMCHqACIZ0CJJoCJpgCKZUCFgIUkgIWBBWPAhYHFI4CFQoUjAIV" |
|
+ "DBSKAhUNFYgCFQ8UhwIVERSFAhUTFIMCFRQVgQIUFxSAAhQZFP4BFBoV/AEUHBT7ARQeFPkBFB8V" |
|
+ "9wEUIRT2ARQjFPQBFSMV8gEVJRTxARUnFPABFCgV7gEUKhTtARQsFOwBFCwV7AEULBTsARUsFOwB" |
|
+ "FSsV7AEULBTtARQsFO0BFCsU7QEVKxTtARUqFe0BFSoU7gEUKxTuARQqFe4BFCoU7wEUKhTuARUp" |
|
+ "FO8BFSkU7wEVKBXvARUoFPABFCkU8AEUKBTxARQoFPEBFCcV8QEUJxTxARUnFPEBFSYU8gEVJhTy" |
|
+ "ARUlFfIBFSUU8wEUJRXzARQlFPQBFCUU9AEUJBT1ARQkFPUBFCMU9gEUIhT2ARUhFPcBFSAU+AEV" |
|
+ "HxT5ARUeFPoBFR4U+gEVHRT7ARUcFPwBFRsU/QEVGhT+ARUZFP8BFBkUgAIUGBSBAhQXFIICFBcU" |
|
+ "ggIUFhSDAhQVFIQCFBQUhQIUExSGAhQSFIcCFBIUhwIUERSIAhUPFIkCFg0UigIXCxSNAhYJFI8C" |
|
+ "FggUkAIXBRSSAhcDFJQCFwEUlgIrlwIpmgImnAIkngIjnwIhoQIfowIepAIcpgIbpgIaqAIZqAIZ" |
|
+ "qAIYKwP7ARgnBf0BGCMI/QEZHgz+ARgbD/8BGBcSgAIYEhaAAhoNGIICGggcgwIaBB+DAjyEAjyF" |
|
+ "AjqGAjmIAjiIAiECFIkCFAIIBBSKAhQNFIsCFAwUjAIUCxSNAhQKFI4CFAkUjwIUBxWQAhQGFZEC" |
|
+ "FAUVkQIUBRWRAhQFFZECFQMVkwIUAxWTAhQDFZMCFAIVlAIVARWVAiqVAimWAimWAiiYAiaZAiaZ" |
|
+ "AiWaAiScAiKdAiGeAh+hAhyjAhmuAg3GxgEA"); |
|
+ ok(match, "Figure does not match.\n"); |
|
+ |
|
+ hr = ID2D1Factory_CreatePathGeometry(factory, &geometry); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ hr = ID2D1PathGeometry_Open(geometry, &sink); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ |
|
set_point(&point, 20.0f, 80.0f); |
|
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW); |
|
quadratic_to(sink, 20.0f, 160.0f, 60.0f, 160.0f); |
|
@@ -8011,6 +8123,7 @@ static void test_draw_geometry(BOOL d3d11) |
|
static void test_fill_geometry(BOOL d3d11) |
|
{ |
|
ID2D1TransformedGeometry *transformed_geometry[4]; |
|
+ ID2D1GeometryGroup *geometry_group; |
|
ID2D1RectangleGeometry *rect_geometry[2]; |
|
D2D1_POINT_2F point = {0.0f, 0.0f}; |
|
D2D1_ROUNDED_RECT rounded_rect; |
|
@@ -8728,6 +8841,112 @@ static void test_fill_geometry(BOOL d3d11) |
|
hr = ID2D1PathGeometry_Open(geometry, &sink); |
|
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
|
|
+ set_point(&point, -0.402914f, 0.915514f); |
|
+ ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED); |
|
+ quadratic_to(sink, -0.310379f, 0.882571f, -0.116057f, 0.824000f); |
|
+ quadratic_to(sink, 0.008350f, 0.693614f, -0.052343f, 0.448886f); |
|
+ quadratic_to(sink, -0.154236f, 0.246072f, -0.279229f, 0.025343f); |
|
+ quadratic_to(sink, -0.370064f, -0.588586f, -0.383029f, -0.924114f); |
|
+ quadratic_to(sink, -0.295479f, -0.958764f, -0.017086f, -0.988400f); |
|
+ quadratic_to(sink, 0.208836f, -0.954157f, 0.272200f, -0.924114f); |
|
+ quadratic_to(sink, 0.295614f, -0.569071f, 0.230143f, 0.022886f); |
|
+ quadratic_to(sink, 0.101664f, 0.220643f, 0.012057f, 0.451571f); |
|
+ quadratic_to(sink, -0.028764f, 0.709014f, 0.104029f, 0.833943f); |
|
+ quadratic_to(sink, 0.319414f, 0.913057f, 0.403229f, 0.942628f); |
|
+ quadratic_to(sink, 0.317721f, 1.023450f, -0.017086f, 1.021771f); |
|
+ quadratic_to(sink, -0.310843f, 1.007472f, -0.402914f, 0.915514f); |
|
+ ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED); |
|
+ |
|
+ hr = ID2D1GeometrySink_Close(sink); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ ID2D1GeometrySink_Release(sink); |
|
+ |
|
+ set_matrix_identity(&matrix); |
|
+ translate_matrix(&matrix, 40.0f, 160.0f); |
|
+ scale_matrix(&matrix, 20.0f, 80.0f); |
|
+ hr = ID2D1Factory_CreateTransformedGeometry(factory, |
|
+ (ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ |
|
+ set_matrix_identity(&matrix); |
|
+ translate_matrix(&matrix, 160.0f, 640.0f); |
|
+ scale_matrix(&matrix, 40.0f, 160.0f); |
|
+ rotate_matrix(&matrix, M_PI / -5.0f); |
|
+ hr = ID2D1Factory_CreateTransformedGeometry(factory, |
|
+ (ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ ID2D1PathGeometry_Release(geometry); |
|
+ |
|
+ set_matrix_identity(&matrix); |
|
+ scale_matrix(&matrix, 0.5f, 1.0f); |
|
+ translate_matrix(&matrix, -80.0f, 0.0f); |
|
+ hr = ID2D1Factory_CreateTransformedGeometry(factory, |
|
+ (ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ |
|
+ set_matrix_identity(&matrix); |
|
+ rotate_matrix(&matrix, M_PI / 2.0f); |
|
+ translate_matrix(&matrix, 80.0f, -320.0f); |
|
+ scale_matrix(&matrix, 2.0f, 0.25f); |
|
+ hr = ID2D1Factory_CreateTransformedGeometry(factory, |
|
+ (ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ |
|
+ hr = ID2D1Factory_CreateGeometryGroup(factory, D2D1_FILL_MODE_WINDING, |
|
+ (ID2D1Geometry**) &transformed_geometry, 4, &geometry_group); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ ID2D1TransformedGeometry_Release(transformed_geometry[3]); |
|
+ ID2D1TransformedGeometry_Release(transformed_geometry[2]); |
|
+ ID2D1TransformedGeometry_Release(transformed_geometry[1]); |
|
+ ID2D1TransformedGeometry_Release(transformed_geometry[0]); |
|
+ |
|
+ ID2D1RenderTarget_BeginDraw(rt); |
|
+ ID2D1RenderTarget_Clear(rt, &color); |
|
+ ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry_group, (ID2D1Brush *)brush, NULL); |
|
+ hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ ID2D1GeometryGroup_Release(geometry_group); |
|
+ |
|
+ match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 32, |
|
+ "zzIBlwEOjQEXiAEahgEahgEahgEahgEahgEahgEahgEahgEahgEahgEahwEZhwEZhwEZhwEZhwEZ" |
|
+ "hwEZhwEZhwEZhwEZhwEZiAEYiAEYiAEXiQEXiQEXiQEXiQEXiQEXigEWigEWigEWigEWigEWigEW" |
|
+ "igEVjAEUjAEUjAEUjQESjgESjwEQkAEQkQEOkgENlAEMlAELlgEKlwEImAEImQEHmQEGmwEFmwEE" |
|
+ "nQEDnQECngECngECngECnwEBnwEBnwEBnwEBngEDnQEDnQEDnQEEmwEFmgEHmQEHlwELkQERjAEX" |
|
+ "hgEdhAEfgwEchwEWjwEMqTEA"); |
|
+ ok(match, "Figure does not match.\n"); |
|
+ match = compare_figure(&ctx, 160, 0, 320, 160, 0xff652e89, 32, |
|
+ "h58BBrUCD6wCGKQCIJsCKZMCMIwCNoUCPf8BQ/kBSPQBTu0BTu4BTfEBSfUBRfkBQf0BPYECOYUC" |
|
+ "NIoCMI4CK+UBAS0W/AEHIweQAgsZBpcCEAwIngIepAIZqQIWrAITsAIRswIOtQIMuAIJuwIHwAIB" |
|
+ "ypwB"); |
|
+ ok(match, "Figure does not match.\n"); |
|
+ match = compare_figure(&ctx, 0, 160, 160, 320, 0xff652e89, 32, |
|
+ "wW4DnAEEmwEFmgEHmAEIlwEKlQELlAEMkwEOkQEPkAEQkAERjgESjgESjQEUjAEUiwEWigEWiQEX" |
|
+ "iQEYhwEZhwEZhgEbhQEbhAEchAEdggEeggEeggEfgAEggAEggAEhgAEggAEggQEggAEggAEggQEf" |
|
+ "gQEggQEfgQEfggEfgQEfgQEfggEfgQEfggEeggEfggEeggEeggEegwEeggEegwEdgwEegwEdgwEd" |
|
+ "hAEchAEdhAEchAEchAEdhAEchAEchQEbhQEbhgEahgEahwEZhwEZiAEYiAEYiQEYiAEYiQEXiQEX" |
|
+ "igEWigEWiwEViwEVjAEUjAEUjAEUjQETjQETjgESjgETjgESjwERkAEQkgEOkwENlAEMlQELlgEK" |
|
+ "lwEJmAEJmAEImQEHmgEGmwEFnAEEnQEEnQEDnQEDngECngEDngECngECnwECngECnwECngECngED" |
|
+ "ngECEgGLAQMQAosBAw4EjAEDCwWNAQQJBo0BBQYIjQEHAgqNARKOARKPARCQARCQARCQAQ+RAQ6S" |
|
+ "AQ6SAQ2TAQ2SAQ2TAQ2TAQyTAQyUAQyTAQyUAQuVAQuUAQuVAQqWAQmWAQqWAQmXAQiXAQiYAQeY" |
|
+ "AQeZAQWbAQSDZwAA"); |
|
+ ok(match, "Figure does not match.\n"); |
|
+ match = compare_figure(&ctx, 160, 160, 320, 320, 0xff652e89, 32, |
|
+ "g90BBLkCCLYCC7ICDrACEa0CFKoCF6cCGqQCHKMCHqECIJ8CIpwCJJsCJpkCKJcCKZYCK5QCLZIC" |
|
+ "L5ACMI8CMo0CNIsCNYoCN4gCOYcCOYYCO4QCPYICPoECQIACQYACQIECQIACQIECQIECQIECP4IC" |
|
+ "P4ICP4ECP4ICP4ICPoMCPoMCPoMCPYQCPYMCPYQCPYQCPYQCPIUCPIUCPIUCO4YCO4YCOoYCO4YC" |
|
+ "OocCOocCOocCOYgCOYgCOIkCOIkCN4oCNosCNYwCNI0CM44CMo4CM44CMo8CMZACMJECL5ICLpMC" |
|
+ "LZQCLJUCK5YCK5YCKpcCKZgCKJkCJ5oCJpsCJpsCJZwCJJ4CIqACIKICH6MCHaUCG6cCGakCF6wC" |
|
+ "Fa0CE68CEbECD7MCDrQCDLYCCrgCCbkCB7sCBrsCBbwCBbwCBL0CBL0CBL0CBL0CA70CBL0CBL0C" |
|
+ "BLwCBSUBlgIFIQSXAgYbCJcCBxcKmQIIEQ6ZAgoMEJoCDQUTnAIknAIjnQIingIhnwIgoAIfoQIe" |
|
+ "ogIdowIcpAIbpQIapQIZpgIZpgIZpwIYpwIXqAIXqAIXqQIVqgIVqgIUqwITrQISrQIRrgIQsAIO" |
|
+ "sQIMswILtQIIhs4B"); |
|
+ ok(match, "Figure does not match.\n"); |
|
+ |
|
+ hr = ID2D1Factory_CreatePathGeometry(factory, &geometry); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ hr = ID2D1PathGeometry_Open(geometry, &sink); |
|
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); |
|
+ |
|
set_point(&point, -0.402914f, 0.915514f); |
|
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW); |
|
quadratic_to(sink, -0.310379f, 0.882571f, -0.116057f, 0.824000f); |
|
-- |
|
2.43.0 |
|
|
|
|
|
From bd6ebdde314b100bdfe78f3722a0e7ca7668ca01 Mon Sep 17 00:00:00 2001 |
|
From: Philipp Knechtges <[email protected]> |
|
Date: Fri, 13 Sep 2024 16:37:31 +0200 |
|
Subject: [PATCH 2/5] d2d1: Implement drawing for ID2D1GeometryGroup |
|
|
|
Drawing of ID2D1GeometryGroup was so far unimplemented and resulted in |
|
blank drawing buffers. This partially fixes the rendering issues mentioned |
|
in the bug below. |
|
|
|
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51139 |
|
--- |
|
dlls/d2d1/geometry.c | 236 ++++++++++++++++++++++++++++++++++++++++++- |
|
1 file changed, 235 insertions(+), 1 deletion(-) |
|
|
|
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c |
|
index 3da3ad2e65b..93925408077 100644 |
|
--- a/dlls/d2d1/geometry.c |
|
+++ b/dlls/d2d1/geometry.c |
|
@@ -5497,8 +5497,13 @@ static const struct ID2D1GeometryGroupVtbl d2d_geometry_group_vtbl = |
|
HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *factory, |
|
D2D1_FILL_MODE fill_mode, ID2D1Geometry **geometries, unsigned int geometry_count) |
|
{ |
|
- unsigned int i; |
|
+ unsigned int i, j; |
|
+ struct d2d_geometry *other_geom; |
|
+ D2D_MATRIX_3X2_F g, gplain; |
|
+ size_t f_vertex_count, f_face_count, f_bezier_vertex_count, f_arc_vertex_count; |
|
+ size_t o_vertex_count, o_face_count, o_bezier_count, o_bezier_face_count, o_arc_count, o_arc_face_count; |
|
|
|
+ FIXME("Ignoring fill_mode=%#x!\n", fill_mode); |
|
d2d_geometry_init(geometry, factory, &identity, (ID2D1GeometryVtbl *)&d2d_geometry_group_vtbl); |
|
|
|
if (!(geometry->u.group.src_geometries = calloc(geometry_count, sizeof(*geometries)))) |
|
@@ -5507,13 +5512,242 @@ HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *fac |
|
return E_OUTOFMEMORY; |
|
} |
|
|
|
+ geometry->fill.vertex_count = 0; |
|
+ geometry->fill.face_count = 0; |
|
+ geometry->fill.bezier_vertex_count = 0; |
|
+ geometry->fill.arc_vertex_count = 0; |
|
+ geometry->outline.vertex_count = 0; |
|
+ geometry->outline.face_count = 0; |
|
+ geometry->outline.bezier_count = 0; |
|
+ geometry->outline.bezier_face_count = 0; |
|
+ geometry->outline.arc_count = 0; |
|
+ geometry->outline.arc_face_count = 0; |
|
for (i = 0; i < geometry_count; ++i) |
|
{ |
|
ID2D1Geometry_AddRef(geometry->u.group.src_geometries[i] = geometries[i]); |
|
+ other_geom = unsafe_impl_from_ID2D1Geometry(geometries[i]); |
|
+ geometry->fill.vertex_count += other_geom->fill.vertex_count; |
|
+ geometry->fill.face_count += other_geom->fill.face_count; |
|
+ geometry->fill.bezier_vertex_count += other_geom->fill.bezier_vertex_count; |
|
+ geometry->fill.arc_vertex_count += other_geom->fill.arc_vertex_count; |
|
+ geometry->outline.vertex_count += other_geom->outline.vertex_count; |
|
+ geometry->outline.face_count += other_geom->outline.face_count; |
|
+ geometry->outline.bezier_count += other_geom->outline.bezier_count; |
|
+ geometry->outline.bezier_face_count += other_geom->outline.bezier_face_count; |
|
+ geometry->outline.arc_count += other_geom->outline.arc_count; |
|
+ geometry->outline.arc_face_count += other_geom->outline.arc_face_count; |
|
} |
|
geometry->u.group.geometry_count = geometry_count; |
|
geometry->u.group.fill_mode = fill_mode; |
|
|
|
+ if (!(geometry->fill.vertices = calloc(geometry->fill.vertex_count, sizeof(D2D1_POINT_2F)))) |
|
+ { |
|
+ for (i = 0; i < geometry->u.group.geometry_count; ++i) |
|
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]); |
|
+ d2d_geometry_cleanup(geometry); |
|
+ return E_OUTOFMEMORY; |
|
+ } |
|
+ if (!(geometry->fill.faces = calloc(geometry->fill.face_count, sizeof(struct d2d_face)))) |
|
+ { |
|
+ for (i = 0; i < geometry->u.group.geometry_count; ++i) |
|
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]); |
|
+ d2d_geometry_cleanup(geometry); |
|
+ return E_OUTOFMEMORY; |
|
+ } |
|
+ geometry->fill.faces_size = geometry->fill.face_count; |
|
+ if (!(geometry->fill.bezier_vertices = calloc(geometry->fill.bezier_vertex_count, sizeof(struct d2d_curve_vertex)))) |
|
+ { |
|
+ for (i = 0; i < geometry->u.group.geometry_count; ++i) |
|
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]); |
|
+ d2d_geometry_cleanup(geometry); |
|
+ return E_OUTOFMEMORY; |
|
+ } |
|
+ geometry->fill.bezier_vertices_size = geometry->fill.bezier_vertex_count; |
|
+ if (!(geometry->fill.arc_vertices = calloc(geometry->fill.arc_vertex_count, sizeof(struct d2d_curve_vertex)))) |
|
+ { |
|
+ for (i = 0; i < geometry->u.group.geometry_count; ++i) |
|
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]); |
|
+ d2d_geometry_cleanup(geometry); |
|
+ return E_OUTOFMEMORY; |
|
+ } |
|
+ geometry->fill.arc_vertices_size = geometry->fill.arc_vertex_count; |
|
+ if (!(geometry->outline.vertices = calloc(geometry->outline.vertex_count, sizeof(struct d2d_outline_vertex)))) |
|
+ { |
|
+ for (i = 0; i < geometry->u.group.geometry_count; ++i) |
|
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]); |
|
+ d2d_geometry_cleanup(geometry); |
|
+ return E_OUTOFMEMORY; |
|
+ } |
|
+ geometry->outline.vertices_size = geometry->outline.vertex_count; |
|
+ if (!(geometry->outline.faces = calloc(geometry->outline.face_count, sizeof(struct d2d_face)))) |
|
+ { |
|
+ for (i = 0; i < geometry->u.group.geometry_count; ++i) |
|
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]); |
|
+ d2d_geometry_cleanup(geometry); |
|
+ return E_OUTOFMEMORY; |
|
+ } |
|
+ geometry->outline.faces_size = geometry->outline.face_count; |
|
+ if (!(geometry->outline.beziers = calloc(geometry->outline.bezier_count, sizeof(struct d2d_curve_outline_vertex)))) |
|
+ { |
|
+ for (i = 0; i < geometry->u.group.geometry_count; ++i) |
|
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]); |
|
+ d2d_geometry_cleanup(geometry); |
|
+ return E_OUTOFMEMORY; |
|
+ } |
|
+ geometry->outline.beziers_size = geometry->outline.bezier_count; |
|
+ if (!(geometry->outline.bezier_faces = calloc(geometry->outline.bezier_face_count, sizeof(struct d2d_face)))) |
|
+ { |
|
+ for (i = 0; i < geometry->u.group.geometry_count; ++i) |
|
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]); |
|
+ d2d_geometry_cleanup(geometry); |
|
+ return E_OUTOFMEMORY; |
|
+ } |
|
+ geometry->outline.bezier_faces_size = geometry->outline.bezier_face_count; |
|
+ if (!(geometry->outline.arcs = calloc(geometry->outline.arc_count, sizeof(struct d2d_curve_outline_vertex)))) |
|
+ { |
|
+ for (i = 0; i < geometry->u.group.geometry_count; ++i) |
|
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]); |
|
+ d2d_geometry_cleanup(geometry); |
|
+ return E_OUTOFMEMORY; |
|
+ } |
|
+ geometry->outline.arcs_size = geometry->outline.arc_count; |
|
+ if (!(geometry->outline.arc_faces = calloc(geometry->outline.arc_face_count, sizeof(struct d2d_face)))) |
|
+ { |
|
+ for (i = 0; i < geometry->u.group.geometry_count; ++i) |
|
+ ID2D1Geometry_Release(geometry->u.group.src_geometries[i]); |
|
+ d2d_geometry_cleanup(geometry); |
|
+ return E_OUTOFMEMORY; |
|
+ } |
|
+ geometry->outline.arc_faces_size = geometry->outline.arc_face_count; |
|
+ |
|
+ f_vertex_count = 0; |
|
+ f_face_count = 0; |
|
+ f_bezier_vertex_count = 0; |
|
+ f_arc_vertex_count = 0; |
|
+ o_vertex_count = 0; |
|
+ o_face_count = 0; |
|
+ o_bezier_count = 0; |
|
+ o_bezier_face_count = 0; |
|
+ o_arc_count = 0; |
|
+ o_arc_face_count = 0; |
|
+ for (i = 0; i < geometry_count; ++i) |
|
+ { |
|
+ other_geom = unsafe_impl_from_ID2D1Geometry(geometries[i]); |
|
+ g = other_geom->transform; |
|
+ gplain = g; |
|
+ gplain.dx = 0.0f; |
|
+ gplain.dy = 0.0f; |
|
+ |
|
+ for (j = 0; j < other_geom->fill.vertex_count; ++j) { |
|
+ d2d_point_transform(&geometry->fill.vertices[j+f_vertex_count], &g, |
|
+ other_geom->fill.vertices[j].x, other_geom->fill.vertices[j].y); |
|
+ } |
|
+ for (j = 0; j < other_geom->fill.face_count; ++j) { |
|
+ geometry->fill.faces[f_face_count+j].v[0] = other_geom->fill.faces[j].v[0] |
|
+ + (UINT16) f_vertex_count; |
|
+ geometry->fill.faces[f_face_count+j].v[1] = other_geom->fill.faces[j].v[1] |
|
+ + (UINT16) f_vertex_count; |
|
+ geometry->fill.faces[f_face_count+j].v[2] = other_geom->fill.faces[j].v[2] |
|
+ + (UINT16) f_vertex_count; |
|
+ } |
|
+ f_vertex_count += other_geom->fill.vertex_count; |
|
+ f_face_count += other_geom->fill.face_count; |
|
+ |
|
+ for (j = 0; j < other_geom->fill.bezier_vertex_count; ++j) { |
|
+ d2d_point_transform(&geometry->fill.bezier_vertices[j+f_bezier_vertex_count].position, |
|
+ &g, other_geom->fill.bezier_vertices[j].position.x, |
|
+ other_geom->fill.bezier_vertices[j].position.y); |
|
+ geometry->fill.bezier_vertices[j+f_bezier_vertex_count].texcoord |
|
+ = other_geom->fill.bezier_vertices[j].texcoord; |
|
+ } |
|
+ f_bezier_vertex_count += other_geom->fill.bezier_vertex_count; |
|
+ |
|
+ for (j = 0; j < other_geom->fill.arc_vertex_count; ++j) { |
|
+ d2d_point_transform(&geometry->fill.arc_vertices[j+f_arc_vertex_count].position, |
|
+ &g, other_geom->fill.arc_vertices[j].position.x, |
|
+ other_geom->fill.arc_vertices[j].position.y); |
|
+ geometry->fill.arc_vertices[j+f_arc_vertex_count].texcoord |
|
+ = other_geom->fill.arc_vertices[j].texcoord; |
|
+ |
|
+ } |
|
+ f_arc_vertex_count += other_geom->fill.arc_vertex_count; |
|
+ |
|
+ for (j = 0; j < other_geom->outline.vertex_count; ++j) { |
|
+ d2d_point_transform(&geometry->outline.vertices[j+o_vertex_count].position, &g, |
|
+ other_geom->outline.vertices[j].position.x, other_geom->outline.vertices[j].position.y); |
|
+ d2d_point_transform(&geometry->outline.vertices[j+o_vertex_count].prev, &gplain, |
|
+ other_geom->outline.vertices[j].prev.x, other_geom->outline.vertices[j].prev.y); |
|
+ d2d_point_normalise(&geometry->outline.vertices[j+o_vertex_count].prev); |
|
+ d2d_point_transform(&geometry->outline.vertices[j+o_vertex_count].next, &gplain, |
|
+ other_geom->outline.vertices[j].next.x, other_geom->outline.vertices[j].next.y); |
|
+ d2d_point_normalise(&geometry->outline.vertices[j+o_vertex_count].next); |
|
+ } |
|
+ for (j = 0; j < other_geom->outline.face_count; ++j) { |
|
+ geometry->outline.faces[o_face_count+j].v[0] = other_geom->outline.faces[j].v[0] |
|
+ + (UINT16) o_vertex_count; |
|
+ geometry->outline.faces[o_face_count+j].v[1] = other_geom->outline.faces[j].v[1] |
|
+ + (UINT16) o_vertex_count; |
|
+ geometry->outline.faces[o_face_count+j].v[2] = other_geom->outline.faces[j].v[2] |
|
+ + (UINT16) o_vertex_count; |
|
+ } |
|
+ o_vertex_count += other_geom->outline.vertex_count; |
|
+ o_face_count += other_geom->outline.face_count; |
|
+ |
|
+ for (j = 0; j < other_geom->outline.bezier_count; ++j) { |
|
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].position, &g, |
|
+ other_geom->outline.beziers[j].position.x, other_geom->outline.beziers[j].position.y); |
|
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].prev, &gplain, |
|
+ other_geom->outline.beziers[j].prev.x, other_geom->outline.beziers[j].prev.y); |
|
+ d2d_point_normalise(&geometry->outline.beziers[j+o_bezier_count].prev); |
|
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].next, &gplain, |
|
+ other_geom->outline.beziers[j].next.x, other_geom->outline.beziers[j].next.y); |
|
+ d2d_point_normalise(&geometry->outline.beziers[j+o_bezier_count].next); |
|
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].p0, &g, |
|
+ other_geom->outline.beziers[j].p0.x, other_geom->outline.beziers[j].p0.y); |
|
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].p1, &g, |
|
+ other_geom->outline.beziers[j].p1.x, other_geom->outline.beziers[j].p1.y); |
|
+ d2d_point_transform(&geometry->outline.beziers[j+o_bezier_count].p2, &g, |
|
+ other_geom->outline.beziers[j].p2.x, other_geom->outline.beziers[j].p2.y); |
|
+ } |
|
+ for (j = 0; j < other_geom->outline.bezier_face_count; ++j) { |
|
+ geometry->outline.bezier_faces[o_bezier_face_count+j].v[0] |
|
+ = other_geom->outline.bezier_faces[j].v[0] + (UINT16) o_bezier_count; |
|
+ geometry->outline.bezier_faces[o_bezier_face_count+j].v[1] |
|
+ = other_geom->outline.bezier_faces[j].v[1] + (UINT16) o_bezier_count; |
|
+ geometry->outline.bezier_faces[o_bezier_face_count+j].v[2] |
|
+ = other_geom->outline.bezier_faces[j].v[2] + (UINT16) o_bezier_count; |
|
+ } |
|
+ o_bezier_count += other_geom->outline.bezier_count; |
|
+ o_bezier_face_count += other_geom->outline.bezier_face_count; |
|
+ |
|
+ for (j = 0; j < other_geom->outline.arc_count; ++j) { |
|
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].position, &g, |
|
+ other_geom->outline.arcs[j].position.x, other_geom->outline.arcs[j].position.y); |
|
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].prev, &gplain, |
|
+ other_geom->outline.arcs[j].prev.x, other_geom->outline.arcs[j].prev.y); |
|
+ d2d_point_normalise(&geometry->outline.arcs[j+o_arc_count].prev); |
|
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].next, &gplain, |
|
+ other_geom->outline.arcs[j].next.x, other_geom->outline.arcs[j].next.y); |
|
+ d2d_point_normalise(&geometry->outline.arcs[j+o_arc_count].next); |
|
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].p0, &g, |
|
+ other_geom->outline.arcs[j].p0.x, other_geom->outline.arcs[j].p0.y); |
|
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].p1, &g, |
|
+ other_geom->outline.arcs[j].p1.x, other_geom->outline.arcs[j].p1.y); |
|
+ d2d_point_transform(&geometry->outline.arcs[j+o_arc_count].p2, &g, |
|
+ other_geom->outline.arcs[j].p2.x, other_geom->outline.arcs[j].p2.y); |
|
+ } |
|
+ for (j = 0; j < other_geom->outline.arc_face_count; ++j) { |
|
+ geometry->outline.arc_faces[o_arc_face_count+j].v[0] |
|
+ = other_geom->outline.arc_faces[j].v[0] + (UINT16) o_arc_count; |
|
+ geometry->outline.arc_faces[o_arc_face_count+j].v[1] |
|
+ = other_geom->outline.arc_faces[j].v[1] + (UINT16) o_arc_count; |
|
+ geometry->outline.arc_faces[o_arc_face_count+j].v[2] |
|
+ = other_geom->outline.arc_faces[j].v[2] + (UINT16) o_arc_count; |
|
+ } |
|
+ o_arc_count += other_geom->outline.arc_count; |
|
+ o_arc_face_count += other_geom->outline.arc_face_count; |
|
+ } |
|
+ |
|
return S_OK; |
|
} |
|
|
|
-- |
|
2.43.0 |
|
|
|
|
|
From e6ae0ab48c5e8c17068f8747737d9c0ac92e1dd8 Mon Sep 17 00:00:00 2001 |
|
From: Fabian Maurer <[email protected]> |
|
Date: Thu, 12 Dec 2024 19:15:38 +0100 |
|
Subject: [PATCH 3/5] include/windows.networking.connectivity: Add |
|
IConnectionProfile2 |
|
|
|
--- |
|
include/windows.networking.connectivity.idl | 207 ++++++++++++++++++++ |
|
1 file changed, 207 insertions(+) |
|
|
|
diff --git a/include/windows.networking.connectivity.idl b/include/windows.networking.connectivity.idl |
|
index 451e67df096..0507882d73f 100644 |
|
--- a/include/windows.networking.connectivity.idl |
|
+++ b/include/windows.networking.connectivity.idl |
|
@@ -60,6 +60,10 @@ namespace Windows.Networking.Connectivity |
|
runtimeclass NetworkItem; |
|
runtimeclass NetworkSecuritySettings; |
|
runtimeclass ProxyConfiguration; |
|
+ runtimeclass WwanConnectionProfileDetails; |
|
+ runtimeclass WlanConnectionProfileDetails; |
|
+ runtimeclass NetworkUsage; |
|
+ runtimeclass ConnectivityInterval; |
|
|
|
typedef enum NetworkAuthenticationType NetworkAuthenticationType; |
|
typedef enum NetworkConnectivityLevel NetworkConnectivityLevel; |
|
@@ -67,6 +71,13 @@ namespace Windows.Networking.Connectivity |
|
typedef enum NetworkEncryptionType NetworkEncryptionType; |
|
typedef enum NetworkTypes NetworkTypes; |
|
typedef enum RoamingStates RoamingStates; |
|
+ typedef enum DomainConnectivityLevel DomainConnectivityLevel; |
|
+ typedef enum DataUsageGranularity DataUsageGranularity; |
|
+ typedef enum TriStates TriStates; |
|
+ typedef enum WwanNetworkRegistrationState WwanNetworkRegistrationState; |
|
+ typedef enum WwanDataClass WwanDataClass; |
|
+ |
|
+ typedef struct NetworkUsageStates NetworkUsageStates; |
|
|
|
declare |
|
{ |
|
@@ -79,6 +90,20 @@ namespace Windows.Networking.Connectivity |
|
interface Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.LanIdentifier *>; |
|
interface Windows.Foundation.Collections.IVectorView<Windows.Networking.HostName *>; |
|
interface Windows.Foundation.Collections.IVectorView<Windows.Networking.EndpointPair *>; |
|
+ interface Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.NetworkUsage*>; |
|
+ interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.NetworkUsage*>*>; |
|
+ interface Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.ConnectivityInterval*>; |
|
+ interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.ConnectivityInterval*>*>; |
|
+ interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.ConnectivityInterval*>*>; |
|
+ interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Networking.Connectivity.ConnectionProfile*>; |
|
+ interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.NetworkUsage*>*>; |
|
+ } |
|
+ |
|
+ [ |
|
+ contractversion(2.0), |
|
+ ] |
|
+ apicontract WwanContract |
|
+ { |
|
} |
|
|
|
[ |
|
@@ -159,6 +184,83 @@ namespace Windows.Networking.Connectivity |
|
Roaming = 0x2, |
|
}; |
|
|
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ ] |
|
+ enum DomainConnectivityLevel |
|
+ { |
|
+ None = 0, |
|
+ Unauthenticated = 1, |
|
+ Authenticated = 2 |
|
+ }; |
|
+ |
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ ] |
|
+ enum DataUsageGranularity |
|
+ { |
|
+ PerMinute = 0, |
|
+ PerHour = 1, |
|
+ PerDay = 2, |
|
+ Total = 3 |
|
+ }; |
|
+ |
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ ] |
|
+ enum TriStates |
|
+ { |
|
+ DoNotCare = 0, |
|
+ No = 1, |
|
+ Yes = 2 |
|
+ }; |
|
+ |
|
+ [ |
|
+ contract(Windows.Networking.Connectivity.WwanContract, 1.0), |
|
+ ] |
|
+ enum WwanNetworkRegistrationState |
|
+ { |
|
+ None = 0, |
|
+ Deregistered = 1, |
|
+ Searching = 2, |
|
+ Home = 3, |
|
+ Roaming = 4, |
|
+ Partner = 5, |
|
+ Denied = 6 |
|
+ }; |
|
+ |
|
+ [ |
|
+ contract(Windows.Networking.Connectivity.WwanContract, 1.0), |
|
+ flags, |
|
+ ] |
|
+ enum WwanDataClass |
|
+ { |
|
+ None = 0x0, |
|
+ Gprs = 0x1, |
|
+ Edge = 0x2, |
|
+ Umts = 0x4, |
|
+ Hsdpa = 0x8, |
|
+ Hsupa = 0x10, |
|
+ LteAdvanced = 0x20, |
|
+ Cdma1xRtt = 0x10000, |
|
+ Cdma1xEvdo = 0x20000, |
|
+ Cdma1xEvdoRevA = 0x40000, |
|
+ Cdma1xEvdv = 0x80000, |
|
+ Cdma3xRtt = 0x100000, |
|
+ Cdma1xEvdoRevB = 0x200000, |
|
+ CdmaUmb = 0x400000, |
|
+ Custom = 0x80000000 |
|
+ }; |
|
+ |
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ ] |
|
+ struct NetworkUsageStates |
|
+ { |
|
+ Windows.Networking.Connectivity.TriStates Roaming; |
|
+ Windows.Networking.Connectivity.TriStates Shared; |
|
+ }; |
|
+ |
|
[ |
|
contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
uuid(71ba143f-598e-49d0-84eb-8febaedcc195), |
|
@@ -199,6 +301,28 @@ namespace Windows.Networking.Connectivity |
|
[propget] HRESULT NetworkSecuritySettings([out, retval] Windows.Networking.Connectivity.NetworkSecuritySettings **value); |
|
} |
|
|
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ exclusiveto(Windows.Networking.Connectivity.ConnectionProfile), |
|
+ uuid(e2045145-4c9f-400c-9150-7ec7d6e2888a), |
|
+ ] |
|
+ interface IConnectionProfile2 : IInspectable |
|
+ { |
|
+ [propget] HRESULT IsWwanConnectionProfile([out, retval] boolean *value); |
|
+ [propget] HRESULT IsWlanConnectionProfile([out, retval] boolean *value); |
|
+ [propget] HRESULT WwanConnectionProfileDetails([out, retval] Windows.Networking.Connectivity.WwanConnectionProfileDetails **value); |
|
+ [propget] HRESULT WlanConnectionProfileDetails([out, retval] Windows.Networking.Connectivity.WlanConnectionProfileDetails **value); |
|
+ [propget] HRESULT ServiceProviderGuid([out, retval] Windows.Foundation.IReference<GUID> **value); |
|
+ HRESULT GetSignalBars([out, retval] Windows.Foundation.IReference<BYTE> **value); |
|
+ HRESULT GetDomainConnectivityLevel([out, retval] Windows.Networking.Connectivity.DomainConnectivityLevel *value); |
|
+ HRESULT GetNetworkUsageAsync([in] Windows.Foundation.DateTime time_start, [in] Windows.Foundation.DateTime time_end, |
|
+ [in] Windows.Networking.Connectivity.DataUsageGranularity granularity, [in] Windows.Networking.Connectivity.NetworkUsageStates states, |
|
+ [out, retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.NetworkUsage*>*> **value); |
|
+ HRESULT GetConnectivityIntervalsAsync([in] Windows.Foundation.DateTime time_start, [in] Windows.Foundation.DateTime time_end, |
|
+ [in] Windows.Networking.Connectivity.NetworkUsageStates states, |
|
+ [out, retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Networking.Connectivity.ConnectivityInterval*>*> **value); |
|
+ } |
|
+ |
|
[ |
|
contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
exclusiveto(Windows.Networking.Connectivity.DataPlanStatus), |
|
@@ -339,6 +463,52 @@ namespace Windows.Networking.Connectivity |
|
[propget] HRESULT CanConnectDirectly([out, retval] boolean *value); |
|
} |
|
|
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ exclusiveto(Windows.Networking.Connectivity.NetworkUsage), |
|
+ uuid(49da8fce-9985-4927-bf5b-072b5c65f8d9), |
|
+ ] |
|
+ interface INetworkUsage : IInspectable |
|
+ { |
|
+ [propget] HRESULT BytesSent([out, retval] UINT64 *value); |
|
+ [propget] HRESULT BytesReceived([out, retval] UINT64 *value); |
|
+ [propget] HRESULT ConnectionDuration([out, retval] Windows.Foundation.TimeSpan *duration); |
|
+ } |
|
+ |
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ exclusiveto(Windows.Networking.Connectivity.ConnectivityInterval), |
|
+ uuid(4faa3fff-6746-4824-a964-eed8e87f8709), |
|
+ ] |
|
+ interface IConnectivityInterval : IInspectable |
|
+ { |
|
+ [propget] HRESULT StartTime([out, retval] Windows.Foundation.DateTime *time_start); |
|
+ [propget] HRESULT ConnectionDuration([out, retval] Windows.Foundation.TimeSpan *duration); |
|
+ } |
|
+ |
|
+ [ |
|
+ contract(Windows.Networking.Connectivity.WwanContract, 1.0), |
|
+ exclusiveto(Windows.Networking.Connectivity.WwanConnectionProfileDetails), |
|
+ uuid(0e4da8fe-835f-4df3-82fd-df556ebc09ef), |
|
+ ] |
|
+ interface IWwanConnectionProfileDetails : IInspectable |
|
+ { |
|
+ [propget] HRESULT HomeProviderId([out, retval] HSTRING *value); |
|
+ [propget] HRESULT AccessPointName([out, retval] HSTRING *value); |
|
+ HRESULT GetNetworkRegistrationState([out, retval] Windows.Networking.Connectivity.WwanNetworkRegistrationState *value); |
|
+ HRESULT GetCurrentDataClass([out, retval] Windows.Networking.Connectivity.WwanDataClass *value); |
|
+ } |
|
+ |
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ exclusiveto(Windows.Networking.Connectivity.WlanConnectionProfileDetails), |
|
+ uuid(562098cb-b35a-4bf1-a884-b7557e88ff86), |
|
+ ] |
|
+ interface IWlanConnectionProfileDetails : IInspectable |
|
+ { |
|
+ HRESULT GetConnectedSsid([out] [retval] HSTRING *value); |
|
+ } |
|
+ |
|
[ |
|
contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
marshaling_behavior(agile), |
|
@@ -460,4 +630,41 @@ namespace Windows.Networking.Connectivity |
|
{ |
|
[default] interface Windows.Networking.Connectivity.IProxyConfiguration; |
|
} |
|
+ |
|
+ [ |
|
+ contract(Windows.Networking.Connectivity.WwanContract, 1.0), |
|
+ marshaling_behavior(agile), |
|
+ ] |
|
+ runtimeclass WwanConnectionProfileDetails |
|
+ { |
|
+ [default] interface Windows.Networking.Connectivity.IWwanConnectionProfileDetails; |
|
+ [contract(Windows.Networking.Connectivity.WwanContract, 2.0)] interface Windows.Networking.Connectivity.IWwanConnectionProfileDetails2; |
|
+ } |
|
+ |
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ marshaling_behavior(agile), |
|
+ ] |
|
+ runtimeclass WlanConnectionProfileDetails |
|
+ { |
|
+ [default] interface Windows.Networking.Connectivity.IWlanConnectionProfileDetails; |
|
+ } |
|
+ |
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ marshaling_behavior(agile), |
|
+ ] |
|
+ runtimeclass NetworkUsage |
|
+ { |
|
+ [default] interface Windows.Networking.Connectivity.INetworkUsage; |
|
+ } |
|
+ |
|
+ [ |
|
+ contract(Windows.Foundation.UniversalApiContract, 1.0), |
|
+ marshaling_behavior(agile), |
|
+ ] |
|
+ runtimeclass ConnectivityInterval |
|
+ { |
|
+ [default] interface Windows.Networking.Connectivity.IConnectivityInterval; |
|
+ } |
|
} |
|
-- |
|
2.43.0 |
|
|
|
|
|
From ca0027802ea1e3b47ab4a33169433b71a84babba Mon Sep 17 00:00:00 2001 |
|
From: Fabian Maurer <[email protected]> |
|
Date: Thu, 12 Dec 2024 19:39:42 +0100 |
|
Subject: [PATCH 4/5] windows.networking.connectivity: Add IConnectionProfile2 |
|
stubs |
|
|
|
--- |
|
.../network_information.c | 160 ++++++++++++++++++ |
|
1 file changed, 160 insertions(+) |
|
|
|
diff --git a/dlls/windows.networking.connectivity/network_information.c b/dlls/windows.networking.connectivity/network_information.c |
|
index 7ac1dfc1244..d983b0a264f 100644 |
|
--- a/dlls/windows.networking.connectivity/network_information.c |
|
+++ b/dlls/windows.networking.connectivity/network_information.c |
|
@@ -121,6 +121,7 @@ static const struct IActivationFactoryVtbl factory_vtbl = |
|
struct connection_profile |
|
{ |
|
IConnectionProfile IConnectionProfile_iface; |
|
+ IConnectionProfile2 IConnectionProfile2_iface; |
|
LONG ref; |
|
|
|
INetworkListManager *network_list_manager; |
|
@@ -147,6 +148,12 @@ static HRESULT WINAPI connection_profile_QueryInterface( IConnectionProfile *ifa |
|
return S_OK; |
|
} |
|
|
|
+ if (IsEqualGUID( iid, &IID_IConnectionProfile2 )) |
|
+ { |
|
+ *out = &impl->IConnectionProfile2_iface; |
|
+ IInspectable_AddRef( *out ); |
|
+ return S_OK; |
|
+ } |
|
FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); |
|
*out = NULL; |
|
return E_NOINTERFACE; |
|
@@ -287,6 +294,158 @@ static const struct IConnectionProfileVtbl connection_profile_vtbl = |
|
connection_profile_get_NetworkSecuritySettings, |
|
}; |
|
|
|
+static inline struct connection_profile *impl_from_IConnectionProfile2( IConnectionProfile2 *iface ) |
|
+{ |
|
+ return CONTAINING_RECORD( iface, struct connection_profile, IConnectionProfile2_iface ); |
|
+} |
|
+ |
|
+static HRESULT WINAPI connection_profile2_QueryInterface( IConnectionProfile2 *iface, REFIID iid, void **out ) |
|
+{ |
|
+ struct connection_profile *impl = impl_from_IConnectionProfile2( iface ); |
|
+ |
|
+ TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); |
|
+ |
|
+ if (IsEqualGUID( iid, &IID_IUnknown ) || |
|
+ IsEqualGUID( iid, &IID_IInspectable ) || |
|
+ IsEqualGUID( iid, &IID_IAgileObject ) || |
|
+ IsEqualGUID( iid, &IID_IConnectionProfile )) |
|
+ { |
|
+ *out = &impl->IConnectionProfile_iface; |
|
+ IInspectable_AddRef( *out ); |
|
+ return S_OK; |
|
+ } |
|
+ |
|
+ if (IsEqualGUID( iid, &IID_IConnectionProfile2 )) /* TODO */ |
|
+ { |
|
+ *out = &impl->IConnectionProfile2_iface; |
|
+ IInspectable_AddRef( *out ); |
|
+ return S_OK; |
|
+ } |
|
+ FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); |
|
+ *out = NULL; |
|
+ return E_NOINTERFACE; |
|
+} |
|
+ |
|
+static ULONG WINAPI connection_profile2_AddRef( IConnectionProfile2 *iface ) |
|
+{ |
|
+ struct connection_profile *impl = impl_from_IConnectionProfile2( iface ); |
|
+ ULONG ref = InterlockedIncrement( &impl->ref ); |
|
+ TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); |
|
+ return ref; |
|
+} |
|
+ |
|
+static ULONG WINAPI connection_profile2_Release( IConnectionProfile2 *iface ) |
|
+{ |
|
+ struct connection_profile *impl = impl_from_IConnectionProfile2( iface ); |
|
+ ULONG ref = InterlockedDecrement( &impl->ref ); |
|
+ |
|
+ TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); |
|
+ |
|
+ if (!ref) |
|
+ { |
|
+ /* TODO */ |
|
+ } |
|
+ return ref; |
|
+} |
|
+ |
|
+static HRESULT WINAPI connection_profile2_GetIids( IConnectionProfile2 *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 connection_profile2_GetRuntimeClassName( IConnectionProfile2 *iface, HSTRING *class_name ) |
|
+{ |
|
+ FIXME( "iface %p, class_name %p stub!\n", iface, class_name ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+static HRESULT WINAPI connection_profile2_GetTrustLevel( IConnectionProfile2 *iface, TrustLevel *trust_level ) |
|
+{ |
|
+ FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+HRESULT WINAPI connection_profile2_get_IsWwanConnectionProfile( IConnectionProfile2 *iface, boolean *value ) |
|
+{ |
|
+ FIXME( "iface %p, value %p stub!\n", iface, value ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+HRESULT WINAPI connection_profile2_get_IsWlanConnectionProfile( IConnectionProfile2 *iface, boolean *value ) |
|
+{ |
|
+ FIXME( "iface %p, value %p stub!\n", iface, value ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+HRESULT WINAPI connection_profile2_get_WwanConnectionProfileDetails( IConnectionProfile2 *iface, IWwanConnectionProfileDetails **value ) |
|
+{ |
|
+ FIXME( "iface %p, value %p stub!\n", iface, value ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+HRESULT WINAPI connection_profile2_get_WlanConnectionProfileDetails( IConnectionProfile2 *iface, IWlanConnectionProfileDetails **value ) |
|
+{ |
|
+ FIXME( "iface %p, value %p stub!\n", iface, value ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+HRESULT WINAPI connection_profile2_get_ServiceProviderGuid( IConnectionProfile2 *iface, IReference_GUID **value ) |
|
+{ |
|
+ FIXME( "iface %p, value %p stub!\n", iface, value ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+HRESULT WINAPI connection_profile2_GetSignalBars( IConnectionProfile2 *iface, IReference_BYTE **value ) |
|
+{ |
|
+ FIXME( "iface %p, value %p stub!\n", iface, value ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+HRESULT WINAPI connection_profile2_GetDomainConnectivityLevel( IConnectionProfile2 *iface, DomainConnectivityLevel *value ) |
|
+{ |
|
+ FIXME( "iface %p, value %p stub!\n", iface, value ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+HRESULT WINAPI connection_profile2_GetNetworkUsageAsync( IConnectionProfile2 *iface, DateTime time_start, DateTime time_end, |
|
+ DataUsageGranularity granularity, NetworkUsageStates states, IAsyncOperation_IVectorView_NetworkUsage **value ) |
|
+{ |
|
+ FIXME( "iface %p, time_start %I64d, time_end %I64d, granularity %d, states %d-%d, value %p stub!\n", |
|
+ iface, time_start.UniversalTime, time_end.UniversalTime, granularity, states.Roaming, states.Shared, value ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+HRESULT WINAPI connection_profile2_GetConnectivityIntervalsAsync( IConnectionProfile2 *iface, DateTime time_start, DateTime time_end, |
|
+ NetworkUsageStates states, IAsyncOperation_IVectorView_ConnectivityInterval **value ) |
|
+{ |
|
+ FIXME( "iface %p, time_start %I64d, time_end %I64d, states %d-%d, value %p stub!\n", |
|
+ iface, time_start.UniversalTime, time_end.UniversalTime, states.Roaming, states.Shared, value ); |
|
+ return E_NOTIMPL; |
|
+} |
|
+ |
|
+static const struct IConnectionProfile2Vtbl connection_profile2_vtbl = |
|
+{ |
|
+ connection_profile2_QueryInterface, |
|
+ connection_profile2_AddRef, |
|
+ connection_profile2_Release, |
|
+ /* IInspectable methods */ |
|
+ connection_profile2_GetIids, |
|
+ connection_profile2_GetRuntimeClassName, |
|
+ connection_profile2_GetTrustLevel, |
|
+ /* IConnectionProfile2 methods */ |
|
+ connection_profile2_get_IsWwanConnectionProfile, |
|
+ connection_profile2_get_IsWlanConnectionProfile, |
|
+ connection_profile2_get_WwanConnectionProfileDetails, |
|
+ connection_profile2_get_WlanConnectionProfileDetails, |
|
+ connection_profile2_get_ServiceProviderGuid, |
|
+ connection_profile2_GetSignalBars, |
|
+ connection_profile2_GetDomainConnectivityLevel, |
|
+ connection_profile2_GetNetworkUsageAsync, |
|
+ connection_profile2_GetConnectivityIntervalsAsync, |
|
+ |
|
+}; |
|
+ |
|
DEFINE_IINSPECTABLE( network_information_statics, INetworkInformationStatics, struct network_information_statics, IActivationFactory_iface ) |
|
|
|
static HRESULT WINAPI network_information_statics_GetConnectionProfiles( INetworkInformationStatics *iface, IVectorView_ConnectionProfile **value ) |
|
@@ -313,6 +472,7 @@ static HRESULT WINAPI network_information_statics_GetInternetConnectionProfile( |
|
} |
|
|
|
impl->IConnectionProfile_iface.lpVtbl = &connection_profile_vtbl; |
|
+ impl->IConnectionProfile2_iface.lpVtbl = &connection_profile2_vtbl; |
|
impl->ref = 1; |
|
impl->network_list_manager = network_list_manager; |
|
|
|
-- |
|
2.43.0 |
|
|
|
|
|
From f09892802c371d0e854211c9af1fe2760c20d30c Mon Sep 17 00:00:00 2001 |
|
From: Fabian Maurer <[email protected]> |
|
Date: Thu, 12 Dec 2024 19:43:39 +0100 |
|
Subject: [PATCH 5/5] windows.networking.connectivity: Fake success for |
|
IsWwanConnectionProfile and IsWlanConnectionProfile |
|
|
|
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57529 |
|
--- |
|
dlls/windows.networking.connectivity/network_information.c | 6 ++++-- |
|
1 file changed, 4 insertions(+), 2 deletions(-) |
|
|
|
diff --git a/dlls/windows.networking.connectivity/network_information.c b/dlls/windows.networking.connectivity/network_information.c |
|
index d983b0a264f..dab1d88eb6d 100644 |
|
--- a/dlls/windows.networking.connectivity/network_information.c |
|
+++ b/dlls/windows.networking.connectivity/network_information.c |
|
@@ -369,13 +369,15 @@ static HRESULT WINAPI connection_profile2_GetTrustLevel( IConnectionProfile2 *if |
|
HRESULT WINAPI connection_profile2_get_IsWwanConnectionProfile( IConnectionProfile2 *iface, boolean *value ) |
|
{ |
|
FIXME( "iface %p, value %p stub!\n", iface, value ); |
|
- return E_NOTIMPL; |
|
+ *value = 0; |
|
+ return S_OK; |
|
} |
|
|
|
HRESULT WINAPI connection_profile2_get_IsWlanConnectionProfile( IConnectionProfile2 *iface, boolean *value ) |
|
{ |
|
FIXME( "iface %p, value %p stub!\n", iface, value ); |
|
- return E_NOTIMPL; |
|
+ *value = 0; |
|
+ return S_OK; |
|
} |
|
|
|
HRESULT WINAPI connection_profile2_get_WwanConnectionProfileDetails( IConnectionProfile2 *iface, IWwanConnectionProfileDetails **value ) |
|
-- |
|
2.43.0 |