-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from mikeclayton/feature/box-layout
#19 - configurable borders
- Loading branch information
Showing
97 changed files
with
3,361 additions
and
875 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ obj | |
|
||
releases | ||
|
||
*.csproj.user | ||
*.user | ||
|
||
wiki/anim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright (c) Microsoft Corporation | ||
// The Microsoft Corporation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
namespace FancyMouse.NativeMethods; | ||
|
||
internal static partial class Core | ||
{ | ||
/// <summary> | ||
/// A 32-bit signed integer.The range is -2147483648 through 2147483647 decimal. | ||
/// This type is declared in WinNT.h as follows: | ||
/// typedef long LONG; | ||
/// </summary> | ||
/// <remarks> | ||
/// See https://learn.microsoft.com/en-us/windows/win32/api/guiddef/ns-guiddef-guid | ||
/// </remarks> | ||
internal readonly struct GUID | ||
{ | ||
public readonly ulong Data1; | ||
public readonly short Data2; | ||
public readonly short Data3; | ||
public readonly char[] Data4; | ||
|
||
public GUID(Guid value) | ||
{ | ||
this.Data1 = 0; | ||
this.Data2 = 0; | ||
this.Data3 = 0; | ||
this.Data4 = new[] { (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0 }; | ||
} | ||
|
||
public GUID(ulong data1, short data2, short data3, char[] data4) | ||
{ | ||
this.Data1 = data1; | ||
this.Data2 = data2; | ||
this.Data3 = data3; | ||
this.Data4 = data4; | ||
} | ||
|
||
public static implicit operator Guid(GUID value) => Guid.NewGuid(); | ||
|
||
public static implicit operator GUID(Guid value) => new( | ||
data1: 0, | ||
data2: 0, | ||
data3: 0, | ||
data4: new[] { (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0, (char)0 }); | ||
|
||
public override string ToString() | ||
{ | ||
return $"{this.GetType().Name}"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
namespace FancyMouse.NativeMethods; | ||
|
||
internal static partial class Core | ||
{ | ||
/// <summary> | ||
/// A handle to a bitmap. | ||
/// This type is declared in WinDef.h as follows: | ||
/// typedef HANDLE HBITMAP; | ||
/// </summary> | ||
/// <remarks> | ||
/// See https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types | ||
/// </remarks> | ||
internal readonly struct HBITMAP | ||
{ | ||
public static readonly HBITMAP Null = new(IntPtr.Zero); | ||
|
||
public readonly IntPtr Value; | ||
|
||
public HBITMAP(IntPtr value) | ||
{ | ||
this.Value = value; | ||
} | ||
|
||
public bool IsNull => this.Value == HBITMAP.Null.Value; | ||
|
||
public static implicit operator IntPtr(HBITMAP value) => value.Value; | ||
|
||
public static explicit operator HBITMAP(IntPtr value) => new(value); | ||
|
||
public static explicit operator HBITMAP(HGDIOBJ value) => new(value.Value); | ||
|
||
public static implicit operator HGDIOBJ(HBITMAP value) => new(value.Value); | ||
|
||
public override string ToString() | ||
{ | ||
return $"{this.GetType().Name}({this.Value})"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
namespace FancyMouse.NativeMethods; | ||
|
||
internal static partial class Core | ||
{ | ||
/// <summary> | ||
/// A handle to a GDI object. | ||
/// This type is declared in WinDef.h as follows: | ||
/// typedef HANDLE HGDIOBJ; | ||
/// </summary> | ||
/// <remarks> | ||
/// See https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types | ||
/// </remarks> | ||
internal readonly struct HGDIOBJ | ||
{ | ||
public static readonly HGDIOBJ Null = new(IntPtr.Zero); | ||
|
||
public readonly IntPtr Value; | ||
|
||
public HGDIOBJ(IntPtr value) | ||
{ | ||
this.Value = value; | ||
} | ||
|
||
public bool IsNull => this.Value == HGDIOBJ.Null.Value; | ||
|
||
public static implicit operator IntPtr(HGDIOBJ value) => value.Value; | ||
|
||
public static explicit operator HGDIOBJ(IntPtr value) => new(value); | ||
|
||
public override string ToString() | ||
{ | ||
return $"{this.GetType().Name}({this.Value})"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.