mirror of https://github.com/dahall/Vanara.git
Moved IWindowCore to MessagePump.cs
parent
9ae4a0007c
commit
b6c6ae03d5
|
@ -1,4 +1,5 @@
|
||||||
using static Vanara.PInvoke.User32;
|
using System;
|
||||||
|
using static Vanara.PInvoke.User32;
|
||||||
|
|
||||||
namespace Vanara.PInvoke;
|
namespace Vanara.PInvoke;
|
||||||
|
|
||||||
|
@ -24,6 +25,20 @@ public interface IMessagePump
|
||||||
int Run(IWindowCore mainWindow = null);
|
int Run(IWindowCore mainWindow = null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>An interface that represents a Win32 window with created and destroyed events.</summary>
|
||||||
|
public interface IWindowCore
|
||||||
|
{
|
||||||
|
/// <summary>Occurs when the window is created and has a valid handle.</summary>
|
||||||
|
event Action Created;
|
||||||
|
|
||||||
|
/// <summary>Occurs when the window has been destroyed.</summary>
|
||||||
|
event Action Destroyed;
|
||||||
|
|
||||||
|
/// <summary>Gets the window handle.</summary>
|
||||||
|
/// <value>The window handle.</value>
|
||||||
|
HWND Handle { get; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>A basic message pump to use independently or with a window instance.</summary>
|
/// <summary>A basic message pump to use independently or with a window instance.</summary>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// Simple example of a window creation and message pump.
|
/// Simple example of a window creation and message pump.
|
||||||
|
|
Loading…
Reference in New Issue