-
Notifications
You must be signed in to change notification settings - Fork 938
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
334 additions
and
290 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Gdi32 | ||
{ | ||
public enum BS : uint | ||
{ | ||
SOLID = 0, | ||
NULL = 1, | ||
HOLLOW = 1, | ||
HATCHED = 2, | ||
PATTERN = 3, | ||
INDEXED = 4, | ||
DIBPATTERN = 5, | ||
DIBPATTERNPT = 6, | ||
PATTERN8X8 = 7, | ||
DIBPATTERN8X8 = 8, | ||
MONOPATTERN = 9, | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/Common/src/Interop/Gdi32/Interop.CreateBrushIndirect.cs
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,15 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Gdi32 | ||
{ | ||
[DllImport(Libraries.Gdi32, ExactSpelling = true, SetLastError = true)] | ||
public static extern IntPtr CreateBrushIndirect(ref LOGBRUSH lb); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/Common/src/Interop/Gdi32/Interop.CreatePatternBrush.cs
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,15 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Gdi32 | ||
{ | ||
[DllImport(Libraries.Gdi32, ExactSpelling = true, SetLastError = true)] | ||
public static extern IntPtr CreatePatternBrush(IntPtr hbm); | ||
} | ||
} |
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,15 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Gdi32 | ||
{ | ||
[DllImport(Libraries.Gdi32, ExactSpelling = true)] | ||
public static extern IntPtr CreatePen(PS nStyle, int nWidth, int crColor); | ||
} | ||
} |
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,15 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Gdi32 | ||
{ | ||
[DllImport(Libraries.Gdi32, ExactSpelling = true, SetLastError = true)] | ||
public static extern IntPtr CreateSolidBrush(int crColor); | ||
} | ||
} |
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,23 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Windows.Forms; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Gdi32 | ||
{ | ||
[DllImport(Libraries.Gdi32, ExactSpelling = true, SetLastError = true)] | ||
public static extern BOOL Ellipse(IntPtr hdc, int left, int top, int right, int bottom); | ||
|
||
public static BOOL Ellipse(IHandle hdc, int left, int top, int right, int bottom) | ||
{ | ||
BOOL result = Ellipse(hdc.Handle, left, top, right, bottom); | ||
GC.KeepAlive(hdc); | ||
return result; | ||
} | ||
} | ||
} |
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,15 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Gdi32 | ||
{ | ||
[DllImport(Libraries.Gdi32, ExactSpelling = true)] | ||
public unsafe static extern IntPtr ExtCreatePen(PS fnStyle, int dwWidth, ref LOGBRUSH lplb, uint dwStyleCount, uint* lpStyle); | ||
} | ||
} |
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,18 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Gdi32 | ||
{ | ||
public struct LOGBRUSH | ||
{ | ||
public BS lbStyle; | ||
public int lbColor; | ||
public IntPtr lbHatch; | ||
} | ||
} | ||
} |
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,40 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class Gdi32 | ||
{ | ||
[Flags] | ||
public enum PS : uint | ||
{ | ||
SOLID = 0x00000000, | ||
DASH = 0x00000001, | ||
DOT = 0x00000002, | ||
DASHDOT = 0x00000003, | ||
DASHDOTDOT = 0x00000004, | ||
NULL = 0x00000005, | ||
INSIDEFRAME = 0x00000006, | ||
USERSTYLE = 0x00000007, | ||
ALTERNATE = 0x00000008, | ||
STYLE_MASK = 0x0000000f, | ||
|
||
ENDCAP_ROUND = 0x00000000, | ||
ENDCAP_SQUARE = 0x00000100, | ||
ENDCAP_FLAT = 0x00000200, | ||
ENDCAP_MASK = 0x00000f00, | ||
|
||
JOIN_ROUND = 0x00000000, | ||
JOIN_BEVEL = 0x00001000, | ||
JOIN_MITER = 0x00002000, | ||
JOIN_MASK = 0x0000f000, | ||
|
||
COSMETIC = 0x00000000, | ||
GEOMETRIC = 0x00010000, | ||
TYPE_MASK = 0x000f0000, | ||
} | ||
} | ||
} |
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,23 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class User32 | ||
{ | ||
[DllImport(Libraries.User32, ExactSpelling = true)] | ||
public static extern int FillRect(IntPtr hDC, ref RECT lprc, IntPtr hbr); | ||
|
||
public static int FillRect(HandleRef hDC, ref RECT lprc, HandleRef hbr) | ||
{ | ||
int result = FillRect(hDC.Handle, ref lprc, hbr.Handle); | ||
GC.KeepAlive(hDC.Wrapper); | ||
GC.KeepAlive(hbr.Wrapper); | ||
return result; | ||
} | ||
} | ||
} |
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,15 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class User32 | ||
{ | ||
[DllImport(Libraries.User32, ExactSpelling = true)] | ||
public static extern IntPtr GetSysColorBrush(int nIndex); | ||
} | ||
} |
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.