Commit d4bb347
authored
Update SplashScreen to use CsWin32 and shared library (#10047)
* This updates `SplashScreen` to use direct interop built on CsWin32. It also uses the shared `System.Private.Windows.Core` library built in Windows Forms.
This makes `SplashScreen` trim-friendly and improves the performance as it will no longer need to generate the rather extensive interop it used to at startup.
This also introduces a bottom level assembly for WPF: `System.Windows.Primitives` where there are no other dependencies other than the WinForms/WPF base assembly: `System.Private.Windows.Core`.
`PInvokeCore` is the static class that comes from `System.Private.Windows.Core`. `PInvoke` is the static class from `System.Windows.Primitives`. When C# adds something akin to extension types (currently in the design phase) we'll be able to unify to a single `PInvoke`. Generated types (such as `HWND`) are in the namespaces as specified by the Windows metdata and don't have the same problem with conflicts as CsWin32 won't generate types that already exist.
CsWin32 uses `System.Drawing` types where they match Win32 types. `Point` is an example of this. These interchange `System.Drawing` types are in-box with .NET.
`System.Private.Windows.Core` provides a lot of useful support functionality, particularly when it comes to interop. The various scope types in this PR are an example. OLE code will come from this assembly after the new APIs are merged in WinForms.
I've also deleted a large swath of unused interop.
It builds on #10023, which leverages #9914.
This is an update of #7929.
* Make anonymous method static and remove orphaned file.1 parent cbaeca8 commit d4bb347
File tree
18 files changed
+469
-4623
lines changed- eng
- WpfArcadeSdk/tools
- src/Microsoft.DotNet.Wpf
- src
- System.Windows.Primitives
- ref
- UIAutomation/UIAutomationClientSideProviders
- WindowsBase
- MS/Internal
- System/Windows
- tests/UnitTests/WindowsBase.Tests
18 files changed
+469
-4623
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
257 | 261 | | |
258 | 262 | | |
259 | 263 | | |
| 264 | + | |
260 | 265 | | |
261 | 266 | | |
262 | 267 | | |
| |||
370 | 375 | | |
371 | 376 | | |
372 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
373 | 382 | | |
374 | 383 | | |
375 | 384 | | |
| |||
1606 | 1615 | | |
1607 | 1616 | | |
1608 | 1617 | | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
1609 | 1642 | | |
1610 | 1643 | | |
1611 | 1644 | | |
| |||
1730 | 1763 | | |
1731 | 1764 | | |
1732 | 1765 | | |
| 1766 | + | |
| 1767 | + | |
1733 | 1768 | | |
1734 | 1769 | | |
1735 | 1770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
| |||
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
| 122 | + | |
112 | 123 | | |
113 | 124 | | |
114 | 125 | | |
115 | 126 | | |
116 | 127 | | |
117 | | - | |
| 128 | + | |
118 | 129 | | |
119 | 130 | | |
120 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | | - | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| 150 | + | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
0 commit comments