2023-07-09 16:32:29 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Windows;
|
2014-07-19 02:12:11 +00:00
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
|
|
2020-04-21 09:12:17 +00:00
|
|
|
|
namespace Flow.Launcher.Plugin
|
2014-07-19 02:12:11 +00:00
|
|
|
|
{
|
2022-08-09 00:35:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Delegate for key down event
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="e"></param>
|
2020-04-21 12:16:10 +00:00
|
|
|
|
public delegate void FlowLauncherKeyDownEventHandler(FlowLauncherKeyDownEventArgs e);
|
2022-08-09 00:35:38 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Delegate for query event
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="e"></param>
|
2020-04-21 12:16:10 +00:00
|
|
|
|
public delegate void AfterFlowLauncherQueryEventHandler(FlowLauncherQueryEventArgs e);
|
2014-07-19 02:12:11 +00:00
|
|
|
|
|
2022-08-09 00:35:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Delegate for drop events [unused?]
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="result"></param>
|
|
|
|
|
|
/// <param name="dropObject"></param>
|
|
|
|
|
|
/// <param name="e"></param>
|
2015-02-03 10:32:16 +00:00
|
|
|
|
public delegate void ResultItemDropEventHandler(Result result, IDataObject dropObject, DragEventArgs e);
|
2015-02-02 15:28:40 +00:00
|
|
|
|
|
2015-01-08 14:49:42 +00: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>
|
2020-04-21 12:16:10 +00:00
|
|
|
|
public delegate bool FlowLauncherGlobalKeyboardEventHandler(int keyevent, int vkcode, SpecialKeyState state);
|
2015-01-08 14:49:42 +00:00
|
|
|
|
|
2023-07-09 14:54:32 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A delegate for when the visibility is changed
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
|
/// <param name="args"></param>
|
|
|
|
|
|
public delegate void VisibilityChangedEventHandler(object sender, VisibilityChangedEventArgs args);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The event args for <see cref="VisibilityChangedEventHandler"/>
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class VisibilityChangedEventArgs : EventArgs
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// <see langword="true"/> if the main window has become visible
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool IsVisible { get; init; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-08-09 00:35:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Arguments container for the Key Down event
|
|
|
|
|
|
/// </summary>
|
2020-04-21 12:16:10 +00:00
|
|
|
|
public class FlowLauncherKeyDownEventArgs
|
2014-07-19 02:12:11 +00:00
|
|
|
|
{
|
2022-08-09 00:35:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The actual query
|
|
|
|
|
|
/// </summary>
|
2014-07-19 02:12:11 +00:00
|
|
|
|
public string Query { get; set; }
|
2022-08-09 00:35:38 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Relevant key events for this event
|
|
|
|
|
|
/// </summary>
|
2014-07-19 02:12:11 +00:00
|
|
|
|
public KeyEventArgs keyEventArgs { get; set; }
|
|
|
|
|
|
}
|
2015-01-18 10:21:48 +00:00
|
|
|
|
|
2022-08-09 00:35:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Arguments container for the Query event
|
|
|
|
|
|
/// </summary>
|
2020-04-21 12:16:10 +00:00
|
|
|
|
public class FlowLauncherQueryEventArgs
|
2015-01-18 10:21:48 +00:00
|
|
|
|
{
|
2022-08-09 00:35:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The actual query
|
|
|
|
|
|
/// </summary>
|
2015-01-18 10:21:48 +00:00
|
|
|
|
public Query Query { get; set; }
|
|
|
|
|
|
}
|
2014-07-19 02:12:11 +00:00
|
|
|
|
}
|