forked from Flow-Launcher/Flow.Launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventHandler.cs
More file actions
98 lines (87 loc) · 3.14 KB
/
EventHandler.cs
File metadata and controls
98 lines (87 loc) · 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
using System;
using System.Windows;
using System.Windows.Input;
namespace Flow.Launcher.Plugin
{
/// <summary>
/// Delegate for key down event
/// </summary>
/// <param name="e"></param>
public delegate void FlowLauncherKeyDownEventHandler(FlowLauncherKeyDownEventArgs e);
/// <summary>
/// Delegate for query event
/// </summary>
/// <param name="e"></param>
public delegate void AfterFlowLauncherQueryEventHandler(FlowLauncherQueryEventArgs e);
/// <summary>
/// Delegate for drop events [unused?]
/// </summary>
/// <param name="result"></param>
/// <param name="dropObject"></param>
/// <param name="e"></param>
public delegate void ResultItemDropEventHandler(Result result, IDataObject dropObject, DragEventArgs e);
/// <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 FlowLauncherGlobalKeyboardEventHandler(int keyevent, int vkcode, SpecialKeyState state);
/// <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>
/// A delegate for when the actual application theme is changed
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
public delegate void ActualApplicationThemeChangedEventHandler(object sender, ActualApplicationThemeChangedEventArgs 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; }
}
/// <summary>
/// Arguments container for the Key Down event
/// </summary>
public class FlowLauncherKeyDownEventArgs
{
/// <summary>
/// The actual query
/// </summary>
public string Query { get; set; }
/// <summary>
/// Relevant key events for this event
/// </summary>
public KeyEventArgs keyEventArgs { get; set; }
}
/// <summary>
/// Arguments container for the Query event
/// </summary>
public class FlowLauncherQueryEventArgs
{
/// <summary>
/// The actual query
/// </summary>
public Query Query { get; set; }
}
/// <summary>
/// The event args for <see cref="ActualApplicationThemeChangedEventHandler"/>
/// </summary>
public class ActualApplicationThemeChangedEventArgs : EventArgs
{
/// <summary>
/// <see langword="true"/> if the application has changed actual theme
/// </summary>
public bool IsDark { get; init; }
}
}