mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
Split NativeStructures.cs into one file per struct, renaming all native structs to PascalCase for C# idioms. Updated all usages and P/Invoke signatures to match new names. Renamed GWL_WNDPROC to GwlWndproc for consistency. No functional changes; improves code organization and maintainability.
34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
// 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.
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace PowerDisplay.Common.Drivers
|
|
{
|
|
/// <summary>
|
|
/// Display configuration source device name - contains GDI device name (e.g., "\\.\DISPLAY1")
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
|
public unsafe struct DisplayConfigSourceDeviceName
|
|
{
|
|
public DisplayConfigDeviceInfoHeader Header;
|
|
|
|
/// <summary>
|
|
/// GDI device name - fixed buffer for 32 wide characters (CCHDEVICENAME)
|
|
/// </summary>
|
|
public fixed ushort ViewGdiDeviceName[32];
|
|
|
|
/// <summary>
|
|
/// Helper method to get GDI device name as string
|
|
/// </summary>
|
|
public readonly string GetViewGdiDeviceName()
|
|
{
|
|
fixed (ushort* ptr = ViewGdiDeviceName)
|
|
{
|
|
return new string((char*)ptr);
|
|
}
|
|
}
|
|
}
|
|
}
|