|
|
@ -26,6 +26,9 @@ namespace Avalonia.Win32.Interop |
|
|
|
|
|
|
|
|
public delegate void TimeCallback(uint uTimerID, uint uMsg, UIntPtr dwUser, UIntPtr dw1, UIntPtr dw2); |
|
|
public delegate void TimeCallback(uint uTimerID, uint uMsg, UIntPtr dwUser, UIntPtr dw1, UIntPtr dw2); |
|
|
|
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.StdCall)] |
|
|
|
|
|
public delegate void WaitOrTimerCallback(IntPtr lpParameter, bool timerOrWaitFired); |
|
|
|
|
|
|
|
|
public delegate IntPtr WndProc(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam); |
|
|
public delegate IntPtr WndProc(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam); |
|
|
|
|
|
|
|
|
public enum Cursor |
|
|
public enum Cursor |
|
|
@ -848,11 +851,25 @@ namespace Avalonia.Win32.Interop |
|
|
[DllImport("user32.dll")] |
|
|
[DllImport("user32.dll")] |
|
|
public static extern bool ShowWindow(IntPtr hWnd, ShowWindowCommand nCmdShow); |
|
|
public static extern bool ShowWindow(IntPtr hWnd, ShowWindowCommand nCmdShow); |
|
|
|
|
|
|
|
|
[DllImport("Winmm.dll")] |
|
|
[DllImport("kernel32.dll", SetLastError = true)] |
|
|
public static extern uint timeKillEvent(uint uTimerID); |
|
|
public static extern IntPtr CreateTimerQueue(); |
|
|
|
|
|
|
|
|
|
|
|
[DllImport("kernel32.dll", SetLastError = true)] |
|
|
|
|
|
public static extern bool DeleteTimerQueueEx(IntPtr TimerQueue, IntPtr CompletionEvent); |
|
|
|
|
|
|
|
|
|
|
|
[DllImport("kernel32.dll", SetLastError = true)] |
|
|
|
|
|
[return: MarshalAs(UnmanagedType.Bool)] |
|
|
|
|
|
public static extern bool CreateTimerQueueTimer( |
|
|
|
|
|
out IntPtr phNewTimer, |
|
|
|
|
|
IntPtr TimerQueue, |
|
|
|
|
|
WaitOrTimerCallback Callback, |
|
|
|
|
|
IntPtr Parameter, |
|
|
|
|
|
uint DueTime, |
|
|
|
|
|
uint Period, |
|
|
|
|
|
uint Flags); |
|
|
|
|
|
|
|
|
[DllImport("Winmm.dll")] |
|
|
[DllImport("kernel32.dll", SetLastError = true)] |
|
|
public static extern uint timeSetEvent(uint uDelay, uint uResolution, TimeCallback lpTimeProc, UIntPtr dwUser, uint fuEvent); |
|
|
public static extern bool DeleteTimerQueueTimer(IntPtr TimerQueue, IntPtr Timer, IntPtr CompletionEvent); |
|
|
|
|
|
|
|
|
[DllImport("user32.dll")] |
|
|
[DllImport("user32.dll")] |
|
|
public static extern int ToUnicode( |
|
|
public static extern int ToUnicode( |
|
|
@ -972,9 +989,6 @@ namespace Avalonia.Win32.Interop |
|
|
[return: MarshalAs(UnmanagedType.Bool)] |
|
|
[return: MarshalAs(UnmanagedType.Bool)] |
|
|
public static extern bool GetMonitorInfo([In] IntPtr hMonitor, [Out] MONITORINFO lpmi); |
|
|
public static extern bool GetMonitorInfo([In] IntPtr hMonitor, [Out] MONITORINFO lpmi); |
|
|
|
|
|
|
|
|
[DllImport("kernel32.dll", SetLastError = true)] |
|
|
|
|
|
public static extern bool QueryPerformanceCounter(out long lpPerformanceCount); |
|
|
|
|
|
|
|
|
|
|
|
[return: MarshalAs(UnmanagedType.Bool)] |
|
|
[return: MarshalAs(UnmanagedType.Bool)] |
|
|
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = "PostMessageW")] |
|
|
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = "PostMessageW")] |
|
|
public static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); |
|
|
public static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); |
|
|
|