This repository has been archived by the owner on Jul 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 223
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 #494 from weitzhandler/feature/move-to-windows
Move types up to Windows.Core
- Loading branch information
Showing
7 changed files
with
109 additions
and
124 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 |
---|---|---|
@@ -1,23 +1,7 @@ | ||
PInvoke.User32.DISPLAY_DEVICE | ||
PInvoke.User32.DISPLAY_DEVICE.DISPLAY_DEVICE() -> void | ||
PInvoke.User32.DISPLAY_DEVICE.DeviceID -> char* | ||
PInvoke.User32.DISPLAY_DEVICE.DeviceKey -> char* | ||
PInvoke.User32.DISPLAY_DEVICE.DeviceName -> char* | ||
PInvoke.User32.DISPLAY_DEVICE.DeviceString -> char* | ||
PInvoke.User32.DISPLAY_DEVICE.StateFlags -> PInvoke.User32.DisplayDeviceFlags | ||
PInvoke.User32.DISPLAY_DEVICE.cb -> uint | ||
PInvoke.User32.DisplayDeviceFlags | ||
PInvoke.User32.DisplayDeviceFlags.DISPLAY_DEVICE_ACTIVE = 1 -> PInvoke.User32.DisplayDeviceFlags | ||
PInvoke.User32.DisplayDeviceFlags.DISPLAY_DEVICE_MIRRORING_DRIVER = 8 -> PInvoke.User32.DisplayDeviceFlags | ||
PInvoke.User32.DisplayDeviceFlags.DISPLAY_DEVICE_MODESPRUNED = 134217728 -> PInvoke.User32.DisplayDeviceFlags | ||
PInvoke.User32.DisplayDeviceFlags.DISPLAY_DEVICE_PRIMARY_DEVICE = 4 -> PInvoke.User32.DisplayDeviceFlags | ||
PInvoke.User32.DisplayDeviceFlags.DISPLAY_DEVICE_REMOVABLE = 32 -> PInvoke.User32.DisplayDeviceFlags | ||
PInvoke.User32.DisplayDeviceFlags.DISPLAY_DEVICE_VGA_COMPATIBLE = 16 -> PInvoke.User32.DisplayDeviceFlags | ||
PInvoke.User32.EnumDisplayDevicesFlags | ||
PInvoke.User32.EnumDisplayDevicesFlags.EDD_GET_DEVICE_INTERFACE_NAME = 1 -> PInvoke.User32.EnumDisplayDevicesFlags | ||
static PInvoke.User32.DISPLAY_DEVICE.Create() -> PInvoke.User32.DISPLAY_DEVICE | ||
static PInvoke.User32.EnumDisplayDevices(string lpDevice, uint iDevNum, System.IntPtr lpDisplayDevice, PInvoke.User32.EnumDisplayDevicesFlags dwFlags) -> bool | ||
static PInvoke.User32.EnumDisplayDevices(string lpDevice, uint iDevNum, ref PInvoke.User32.DISPLAY_DEVICE lpDisplayDevice, PInvoke.User32.EnumDisplayDevicesFlags dwFlags) -> bool | ||
static extern PInvoke.User32.EnumDisplayDevices(string lpDevice, uint iDevNum, PInvoke.User32.DISPLAY_DEVICE* lpDisplayDevice, PInvoke.User32.EnumDisplayDevicesFlags dwFlags) -> bool | ||
static PInvoke.User32.EnumDisplayDevices(string lpDevice, uint iDevNum, ref PInvoke.DISPLAY_DEVICE lpDisplayDevice, PInvoke.User32.EnumDisplayDevicesFlags dwFlags) -> bool | ||
static extern PInvoke.User32.EnumDisplayDevices(string lpDevice, uint iDevNum, PInvoke.DISPLAY_DEVICE* lpDisplayDevice, PInvoke.User32.EnumDisplayDevicesFlags dwFlags) -> bool | ||
static extern PInvoke.User32.UnregisterClass(string lpClassName, System.IntPtr hInstance) -> bool | ||
static readonly PInvoke.User32.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED -> System.IntPtr |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
// Copyright © .NET Foundation and Contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace PInvoke | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// Device state flags. | ||
/// </summary> | ||
[Flags] | ||
public enum DisplayDeviceFlags : uint | ||
{ | ||
/// <summary> | ||
/// Specifies whether a monitor is presented as being "on" by the respective GDI view. | ||
/// Windows Vista: EnumDisplayDevices will only enumerate monitors that can be presented as being "on". | ||
/// </summary> | ||
DISPLAY_DEVICE_ACTIVE = 0x00000001, | ||
|
||
/// <summary> | ||
/// Represents a pseudo device used to mirror application drawing for remoting or other purposes. An invisible pseudo monitor is associated with this device. | ||
/// For example, NetMeeting uses it. Note that <c>User32.GetSystemMetrics</c> (<c>SM_MONITORS</c>) only accounts for visible display monitors. | ||
/// </summary> | ||
DISPLAY_DEVICE_MIRRORING_DRIVER = 0x00000008, | ||
|
||
/// <summary>The device has more display modes than its output devices support.</summary> | ||
DISPLAY_DEVICE_MODESPRUNED = 0x08000000, | ||
|
||
/// <summary> | ||
/// The primary desktop is on the device. For a system with a single display card, this is always set. | ||
/// For a system with multiple display cards, only one device can have this set. | ||
/// </summary> | ||
DISPLAY_DEVICE_PRIMARY_DEVICE = 0x00000004, | ||
|
||
/// <summary>The device is removable; it cannot be the primary display.</summary> | ||
DISPLAY_DEVICE_REMOVABLE = 0x00000020, | ||
|
||
/// <summary>The device is VGA compatible.</summary> | ||
DISPLAY_DEVICE_VGA_COMPATIBLE = 0x00000010, | ||
} | ||
} |
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,50 @@ | ||
// Copyright © .NET Foundation and Contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace PInvoke | ||
{ | ||
/// <summary> | ||
/// Receives information about the display device specified by the <c>iDevNum</c> parameter of the <c>User32.EnumDisplayDevices</c> function. | ||
/// </summary> | ||
public unsafe struct DISPLAY_DEVICE | ||
{ | ||
/// <summary> | ||
/// Size, in bytes, of the DISPLAY_DEVICE structure. This must be initialized prior to calling <c>User32.EnumDisplayDevices</c>. | ||
/// </summary> | ||
public uint cb; | ||
|
||
/// <summary> | ||
/// An array of characters identifying the device name. This is either the adapter device or the monitor device. | ||
/// </summary> | ||
public fixed char DeviceName[32]; | ||
|
||
/// <summary> | ||
/// An array of characters containing the device context string. This is either a description of the display adapter or of the display monitor. | ||
/// </summary> | ||
public fixed char DeviceString[128]; | ||
|
||
/// <summary> | ||
/// Device state flags. | ||
/// </summary> | ||
public DisplayDeviceFlags StateFlags; | ||
|
||
/// <summary> | ||
/// Not used. | ||
/// </summary> | ||
public fixed char DeviceID[128]; | ||
|
||
/// <summary> | ||
/// Reserved. | ||
/// </summary> | ||
public fixed char DeviceKey[128]; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DISPLAY_DEVICE"/> struct | ||
/// with the <see cref="cb" /> field initialized. | ||
/// </summary> | ||
/// <returns> | ||
/// An instance of the structure. | ||
/// </returns> | ||
public static DISPLAY_DEVICE Create() => new DISPLAY_DEVICE { cb = (uint)sizeof(DISPLAY_DEVICE) }; | ||
} | ||
} |
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,16 @@ | ||
PInvoke.DISPLAY_DEVICE | ||
PInvoke.DISPLAY_DEVICE.DISPLAY_DEVICE() -> void | ||
PInvoke.DISPLAY_DEVICE.DeviceID -> char* | ||
PInvoke.DISPLAY_DEVICE.DeviceKey -> char* | ||
PInvoke.DISPLAY_DEVICE.DeviceName -> char* | ||
PInvoke.DISPLAY_DEVICE.DeviceString -> char* | ||
PInvoke.DISPLAY_DEVICE.StateFlags -> PInvoke.DisplayDeviceFlags | ||
PInvoke.DISPLAY_DEVICE.cb -> uint | ||
PInvoke.DisplayDeviceFlags | ||
PInvoke.DisplayDeviceFlags.DISPLAY_DEVICE_ACTIVE = 1 -> PInvoke.DisplayDeviceFlags | ||
PInvoke.DisplayDeviceFlags.DISPLAY_DEVICE_MIRRORING_DRIVER = 8 -> PInvoke.DisplayDeviceFlags | ||
PInvoke.DisplayDeviceFlags.DISPLAY_DEVICE_MODESPRUNED = 134217728 -> PInvoke.DisplayDeviceFlags | ||
PInvoke.DisplayDeviceFlags.DISPLAY_DEVICE_PRIMARY_DEVICE = 4 -> PInvoke.DisplayDeviceFlags | ||
PInvoke.DisplayDeviceFlags.DISPLAY_DEVICE_REMOVABLE = 32 -> PInvoke.DisplayDeviceFlags | ||
PInvoke.DisplayDeviceFlags.DISPLAY_DEVICE_VGA_COMPATIBLE = 16 -> PInvoke.DisplayDeviceFlags | ||
static PInvoke.DISPLAY_DEVICE.Create() -> PInvoke.DISPLAY_DEVICE |