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 224
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 #542 from NotCoffee418/GetLastInputInfo
Add User32.GetLastInputInfo
- Loading branch information
Showing
3 changed files
with
66 additions
and
1 deletion.
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
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,36 @@ | ||
// 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; | ||
using System.Runtime.InteropServices; | ||
|
||
/// <content> | ||
/// Contains the <see cref="LASTINPUTINFO"/> nested type. | ||
/// </content> | ||
public partial class User32 | ||
{ | ||
/// <summary> | ||
/// Contains the time of the last input. It is used with the <see cref="GetLastInputInfo(LASTINPUTINFO*)"/> function. | ||
/// </summary> | ||
public struct LASTINPUTINFO | ||
{ | ||
/// <summary> | ||
/// The size of the structure, in bytes. This member must be set to <c>sizeof(LASTINPUTINFO)</c>. | ||
/// </summary> | ||
public int cbSize; | ||
|
||
/// <summary> | ||
/// The tick count when the last input event was received. | ||
/// </summary> | ||
public uint dwTime; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="LASTINPUTINFO"/> struct. | ||
/// </summary> | ||
/// <returns>An initialized instance of the struct.</returns> | ||
public static unsafe LASTINPUTINFO Create() => new LASTINPUTINFO { cbSize = sizeof(LASTINPUTINFO) }; | ||
} | ||
} | ||
} |
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