restructure
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
using Hyperbar.Windows.Win32;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Hyperbar.Windows.UI;
|
||||
using Hyperbar.Windows.Interop;
|
||||
|
||||
namespace Hyperbar.Windows.Controls;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.25936-preview" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Hyperbar.Windows.Win32\Hyperbar.Windows.Win32.csproj" />
|
||||
<ProjectReference Include="..\Hyperbar.Windows.Interop\Hyperbar.Windows.Interop.csproj" />
|
||||
<ProjectReference Include="..\Hyperbar.Windows.UI\Hyperbar.Windows.UI.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
+6
-6
@@ -5,7 +5,7 @@ using Windows.Win32.Foundation;
|
||||
using Windows.Win32.Graphics.Gdi;
|
||||
using Windows.Win32.UI.WindowsAndMessaging;
|
||||
|
||||
namespace Hyperbar.Windows.Win32;
|
||||
namespace Hyperbar.Windows.Interop;
|
||||
|
||||
public static class HwndExtensions
|
||||
{
|
||||
@@ -44,7 +44,7 @@ public static class HwndExtensions
|
||||
}
|
||||
|
||||
public static void SnapWindow(this IntPtr hwnd,
|
||||
WindowPlacement placement,
|
||||
int placement,
|
||||
double? width = null,
|
||||
double? height = null)
|
||||
{
|
||||
@@ -68,22 +68,22 @@ public static class HwndExtensions
|
||||
|
||||
switch (placement)
|
||||
{
|
||||
case WindowPlacement.Left:
|
||||
case 0:
|
||||
left = 0;
|
||||
top = (info.rcWork.bottom + info.rcWork.top) / 2 - actualHeight / 2;
|
||||
break;
|
||||
|
||||
case WindowPlacement.Top:
|
||||
case 1:
|
||||
left = (info.rcWork.left + info.rcWork.right) / 2 - actualWidth / 2;
|
||||
top = 0;
|
||||
break;
|
||||
|
||||
case WindowPlacement.Right:
|
||||
case 2:
|
||||
left = info.rcWork.left + info.rcWork.right - actualWidth;
|
||||
top = (info.rcWork.bottom + info.rcWork.top) / 2 - actualHeight / 2;
|
||||
break;
|
||||
|
||||
case WindowPlacement.Bottom:
|
||||
case 3:
|
||||
left = (info.rcWork.left + info.rcWork.right) / 2 - actualWidth / 2;
|
||||
top = info.rcWork.bottom + info.rcWork.top - actualHeight;
|
||||
break;
|
||||
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.1.506-beta">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace Hyperbar.Windows.Win32
|
||||
namespace Hyperbar.Windows.Interop
|
||||
{
|
||||
public interface IVirtualKeyboard
|
||||
{
|
||||
+1
-1
@@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
||||
using Windows.Win32;
|
||||
using Windows.Win32.UI.KeyboardAndMouseInput;
|
||||
|
||||
namespace Hyperbar.Windows.Win32;
|
||||
namespace Hyperbar.Windows.Interop;
|
||||
|
||||
public class VirtualKeyboard :
|
||||
IVirtualKeyboard
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
|
||||
namespace Hyperbar.Windows.Win32;
|
||||
namespace Hyperbar.Windows.Interop;
|
||||
|
||||
[Flags]
|
||||
public enum WindowStyle
|
||||
+8
-6
@@ -5,13 +5,15 @@
|
||||
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<UseRidGraph>true</UseRidGraph>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.1.506-beta">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.231202003-experimental1" />
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.25936-preview" />
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.230913002" />
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Hyperbar.Windows.Interop\Hyperbar.Windows.Interop.csproj" />
|
||||
<ProjectReference Include="..\Hyperbar.Windows.Win32\Hyperbar.Windows.Interop.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
using Microsoft.UI.Windowing;
|
||||
using Hyperbar.Windows.Interop;
|
||||
using Microsoft.UI.Windowing;
|
||||
using Microsoft.UI.Xaml;
|
||||
using System;
|
||||
using WinRT.Interop;
|
||||
|
||||
namespace Hyperbar.Windows.Win32;
|
||||
namespace Hyperbar.Windows.UI;
|
||||
|
||||
public static class WindowExtensions
|
||||
{
|
||||
@@ -32,5 +32,5 @@ public static class WindowExtensions
|
||||
public static void Snap(this Window window,
|
||||
WindowPlacement placement,
|
||||
double? width = null,
|
||||
double? height = null) => window.GetHandle().SnapWindow(placement, width, height);
|
||||
double? height = null) => window.GetHandle().SnapWindow((int)placement, width, height);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Hyperbar.Windows.UI;
|
||||
|
||||
public enum WindowPlacement
|
||||
{
|
||||
Left = 0,
|
||||
Top = 1,
|
||||
Right = 2,
|
||||
Bottom = 3,
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Hyperbar.Windows.Win32;
|
||||
|
||||
public enum WindowPlacement
|
||||
{
|
||||
Left,
|
||||
Top,
|
||||
Right,
|
||||
Bottom
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using Hyperbar.Windows.Win32;
|
||||
using Hyperbar.Windows.Interop;
|
||||
|
||||
namespace Hyperbar.Windows;
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<Platforms>x86;x64;ARM64</Platforms>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
|
||||
<UseRidGraph>true</UseRidGraph>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<EnableMsixTooling>true</EnableMsixTooling>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseRidGraph>true</UseRidGraph>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Views\WidgetButtonView.xaml" />
|
||||
@@ -37,6 +37,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Hyperbar.Windows.Contextual\Hyperbar.Widget.Contextual.csproj" />
|
||||
<ProjectReference Include="..\Hyperbar.Windows.Controls\Hyperbar.Windows.Controls.csproj" />
|
||||
<ProjectReference Include="..\Hyperbar.Windows.Interop\Hyperbar.Windows.Interop.csproj" />
|
||||
<ProjectReference Include="..\Hyperbar.Windows.Primary\Hyperbar.Widget.Primary.csproj" />
|
||||
<ProjectReference Include="..\Hyperbar\Hyperbar.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Hyperbar.Extensions;
|
||||
using Hyperbar.Windows.Win32;
|
||||
using Hyperbar.Windows.Interop;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
|
||||
+36
-18
@@ -7,14 +7,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbar.Windows", "Hyperba
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbar.Windows.Controls", "Hyperbar.Windows.Controls\Hyperbar.Windows.Controls.csproj", "{48ECC6A3-94FF-405D-9DB5-46A725C1B117}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbar.Windows.Win32", "Hyperbar.Windows.Win32\Hyperbar.Windows.Win32.csproj", "{8A4BBC50-970C-4FA8-9F21-0FA63269222F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbar", "Hyperbar\Hyperbar.csproj", "{E5795878-C7E3-4386-86FA-33681BCF8D5B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbar.Widget.Contextual", "Hyperbar.Windows.Contextual\Hyperbar.Widget.Contextual.csproj", "{C32D4073-2A9B-4257-8895-09951FAD8E7A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbar.Widget.Primary", "Hyperbar.Windows.Primary\Hyperbar.Widget.Primary.csproj", "{AFB8A3EB-8831-4041-AE05-3E0EF672887C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbar.Windows.UI", "Hyperbar.Windows.UI\Hyperbar.Windows.UI.csproj", "{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbar.Windows.Interop", "Hyperbar.Windows.Interop\Hyperbar.Windows.Interop.csproj", "{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -67,22 +69,6 @@ Global
|
||||
{48ECC6A3-94FF-405D-9DB5-46A725C1B117}.Release|x64.Build.0 = Release|Any CPU
|
||||
{48ECC6A3-94FF-405D-9DB5-46A725C1B117}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{48ECC6A3-94FF-405D-9DB5-46A725C1B117}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8A4BBC50-970C-4FA8-9F21-0FA63269222F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E5795878-C7E3-4386-86FA-33681BCF8D5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E5795878-C7E3-4386-86FA-33681BCF8D5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E5795878-C7E3-4386-86FA-33681BCF8D5B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
@@ -131,6 +117,38 @@ Global
|
||||
{AFB8A3EB-8831-4041-AE05-3E0EF672887C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{AFB8A3EB-8831-4041-AE05-3E0EF672887C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{AFB8A3EB-8831-4041-AE05-3E0EF672887C}.Release|x86.Build.0 = Release|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Release|x64.Build.0 = Release|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{ED489968-89A5-42B5-9FC3-20DCF5D78A5E}.Release|x86.Build.0 = Release|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Release|x64.Build.0 = Release|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B64085FB-7B4E-48B9-BEE2-8F158A6CF697}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in New Issue
Block a user