Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
NickeManarin committed Dec 7, 2023
2 parents ccd9b0d + 599f25b commit b108a80
Show file tree
Hide file tree
Showing 109 changed files with 2,691 additions and 2,196 deletions.
7 changes: 3 additions & 4 deletions Other/Translator/Translator.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
Expand All @@ -17,11 +17,10 @@
<Resource Include="Logo.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.421302">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="6.0.7" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="8.0.0" />
</ItemGroup>
</Project>
29 changes: 29 additions & 0 deletions ScreenToGif.Model/Enums/Native/CornerPreferences.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
namespace ScreenToGif.Domain.Enums.Native;

/// <summary>
/// Flags used by the DwmSetWindowAttribute function to specify the rounded corner preference for a window.
/// https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwm_window_corner_preference
/// Windows Build 22000
/// </summary>
public enum CornerPreferences
{
/// <summary>
/// Let the system decide when to round window corners.
/// </summary>
Default = 0,

/// <summary>
/// Never round window corners.
/// </summary>
DoNotRound = 1,

/// <summary>
/// Round the corners, if appropriate.
/// </summary>
Round = 2,

/// <summary>
/// Round the corners if appropriate, with a small radius.
/// </summary>
RoundSmall = 3
}
17 changes: 17 additions & 0 deletions ScreenToGif.Model/Enums/Native/DwmWindowAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,22 @@ public enum DwmWindowAttributes
Cloak,
Cloaked,
FreezeRepresentation,
PassiveUpdateMode,
UseHostBackdropBrush,
UseImmersiveDarkModeBefore20H1 = 19, //For Windows 10 versions before 2004.
UseImmersiveDarkMode = 20,
WindowCornerPreference = 33,
BorderColor,
CaptionColor,
TextColor,
VisibleFrameBorderThickness,

/// <summary>
/// Retrieves or specifies the system-drawn backdrop material of a window, including behind the non-client area.
/// The pvAttribute parameter points to a value of type SystemBackdropTypes.
/// </summary>
SystemBackdropType,

MicaEffect = 1029,
Last
}
134 changes: 134 additions & 0 deletions ScreenToGif.Model/Enums/Native/HitTestTargets.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
namespace ScreenToGif.Domain.Enums.Native;

public enum HitTestTargets : int
{
/// <summary>
/// In the border of a window that does not have a sizing border.
/// </summary>
Border = 18,

/// <summary>
/// In the lower-horizontal border of a resizable window (the user can click the mouse to resize the window vertically).
/// </summary>
Bottom = 15,

/// <summary>
/// In the lower-left corner of a border of a resizable window (the user can click the mouse to resize the window diagonally).
/// </summary>
BottomLeft = 16,

/// <summary>
/// In the lower-right corner of a border of a resizable window (the user can click the mouse to resize the window diagonally).
/// </summary>
BottomRight = 17,

/// <summary>
/// In a title bar.
/// </summary>
Caption = 2,

/// <summary>
/// In a client area.
/// </summary>
Client = 1,

/// <summary>
/// In a Close button.
/// </summary>
CloseButton = 20,

/// <summary>
/// On the screen background or on a dividing line between windows (same as HTNOWHERE, except that the DefWindowProc function produces a system beep to indicate an error).
/// </summary>
Error = -2,

/// <summary>
/// In a size box (same as HTSIZE).
/// </summary>
GrowBox = 4,

/// <summary>
/// In a Help button.
/// </summary>
Help = 21,

/// <summary>
/// In a horizontal scroll bar.
/// </summary>
HorizontalScroll = 6,

/// <summary>
/// In the left border of a resizable window (the user can click the mouse to resize the window horizontally).
/// </summary>
Left = 10,

/// <summary>
/// In a menu.
/// </summary>
Menu = 5,

/// <summary>
/// In a Maximize button.
/// </summary>
MaximizeButton = 9,

/// <summary>
/// In a Minimize button.
/// </summary>
MinimizeButton = 8,

/// <summary>
/// On the screen background or on a dividing line between windows.
/// </summary>
Nowhere = 0,

/// <summary>
/// In a Minimize button.
/// </summary>
Reduce = MinimizeButton,

/// <summary>
/// In the right border of a resizable window (the user can click the mouse to resize the window horizontally).
/// </summary>
Right = 11,

/// <summary>
/// In a size box (same as HTGROWBOX).
/// </summary>
Size = GrowBox,

/// <summary>
/// In a window menu or in a Close button in a child window.
/// </summary>
SysMenu = 3,

/// <summary>
/// In the upper-horizontal border of a window.
/// </summary>
Top = 12,

/// <summary>
/// In the upper-left corner of a window border.
/// </summary>
TopLeft = 13,

/// <summary>
/// In the upper-right corner of a window border.
/// </summary>
TopRight = 14,

/// <summary>
/// In a window currently covered by another window in the same thread (the message will be sent to underlying windows in the same thread until one of them returns a code that is not HTTRANSPARENT).
/// </summary>
Transparent = -1,

/// <summary>
/// In the vertical scroll bar.
/// </summary>
VerticalScroll = 7,

/// <summary>
/// In a Maximize button.
/// </summary>
Zoom = MaximizeButton
}
11 changes: 11 additions & 0 deletions ScreenToGif.Model/Enums/Native/MenuFunctions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace ScreenToGif.Domain.Enums.Native;

[Flags]
public enum MenuFunctions
{
ByCommand = 0x00000000,
ByPosition = 0x00000400,
Enabled = 0x00000000,
Grayed = 0x00000001,
Disabled = 0x00000002
}
26 changes: 26 additions & 0 deletions ScreenToGif.Model/Enums/Native/SysCommands.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace ScreenToGif.Domain.Enums.Native;

public enum SysCommands : uint
{
Size = 0xF000,
Move = 0xF010,
Minimize = 0xF020,
Maximize = 0xF030,
NextWindow = 0xF040,
PreviousWindow = 0xF050,
Close = 0xF060,
VScroll = 0xF070,
HScroll = 0xF080,
MouseMenu = 0xF090,
KeyMenu = 0xF100,
Arrange = 0xF110,
Restore = 0xF120,
TaskList = 0xF130,
ScreenSave = 0xF140,
HotKey = 0xF150,
Default = 0xF160,
MonitorPower = 0xF170,
ContextHelp = 0xF180,
Separator = 0xF00F,
IsSecure = 0x0001,
}
8 changes: 4 additions & 4 deletions ScreenToGif.Model/Enums/Native/WindowStyles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public enum WindowStyles : uint
Vscroll = 0x200000,
Hscroll = 0x100000,
Sysmenu = 0x80000,
Thickframe = 0x40000,
ThickFrame = 0x40000,
Group = 0x20000,
Tabstop = 0x10000,
Minimizebox = 0x20000,
Maximizebox = 0x10000,
MinimizeBox = 0x20000,
MaximizeBox = 0x10000,
Tiled = Overlapped,
Iconic = Minimize,
Sizebox = Thickframe,
Sizebox = ThickFrame,
}

0 comments on commit b108a80

Please sign in to comment.