PowerToys/Wox.Plugin/EventHandler.cs

31 lines
1.0 KiB
C#
Raw Normal View History

2015-10-31 07:17:34 +08:00
using System.Windows;
2014-07-19 10:12:11 +08:00
using System.Windows.Input;
namespace Wox.Plugin
{
public delegate void WoxKeyDownEventHandler(WoxKeyDownEventArgs e);
public delegate void AfterWoxQueryEventHandler(WoxQueryEventArgs e);
2014-07-19 10:12:11 +08:00
2015-02-03 18:32:16 +08:00
public delegate void ResultItemDropEventHandler(Result result, IDataObject dropObject, DragEventArgs e);
2015-02-02 23:28:40 +08:00
/// <summary>
/// Global keyboard events
/// </summary>
/// <param name="keyevent">WM_KEYDOWN = 256,WM_KEYUP = 257,WM_SYSKEYUP = 261,WM_SYSKEYDOWN = 260</param>
/// <param name="vkcode"></param>
/// <param name="state"></param>
/// <returns>return true to continue handling, return false to intercept system handling</returns>
public delegate bool WoxGlobalKeyboardEventHandler(int keyevent, int vkcode, SpecialKeyState state);
2014-07-19 10:12:11 +08:00
public class WoxKeyDownEventArgs
{
public string Query { get; set; }
public KeyEventArgs keyEventArgs { get; set; }
}
public class WoxQueryEventArgs
{
public Query Query { get; set; }
}
2014-07-19 10:12:11 +08:00
}