Skip to content

Quick Switch #1018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 202 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
3f5bd0b
Initial Implementation of quickswitch in Flow
taooceros Feb 10, 2022
34c2e3f
Add required dll
taooceros Feb 10, 2022
0443ed1
Merge branch 'dev' into quickswitch
Jack251970 Apr 12, 2025
6404f23
Transit package
Jack251970 Apr 12, 2025
b13cb75
Code quality
Jack251970 Apr 12, 2025
bd5142f
Use PInvoke instead & Improve code quality
Jack251970 Apr 12, 2025
60412c2
Code quality
Jack251970 Apr 13, 2025
c5bbb64
Debug codes
Jack251970 Apr 13, 2025
3e24f05
Fix & Improve
Jack251970 Apr 13, 2025
6c629b7
Code quality
Jack251970 Apr 13, 2025
2c22993
Remove unused codes
Jack251970 Apr 13, 2025
959e89f
Use codes from https://github.com/idkidknow/Flow.Launcher.Plugin.DirQ…
Jack251970 Apr 13, 2025
fb87411
Add auto switch support & Use const for dialog class name
Jack251970 Apr 13, 2025
6ba6058
Replace Interop.Shell32 with PInovke
Jack251970 Apr 13, 2025
6f13f89
Change default hotkey
Jack251970 Apr 13, 2025
d229bfe
Replace Interop.SHDocVw with PInvoke
Jack251970 Apr 13, 2025
2d25fef
Initialize QuickSwitch earlier
Jack251970 Apr 13, 2025
ac255ba
Add support in HotKey page
Jack251970 Apr 13, 2025
3300c94
Merge branch 'dev' into quickswitch
Jack251970 Apr 13, 2025
80d0a27
Code quality
Jack251970 Apr 13, 2025
9742761
Initialize explorer window during startup
Jack251970 Apr 13, 2025
2291949
Merge branch 'dev' into quickswitch
Jack251970 Apr 13, 2025
a75779c
Make helper function public
Jack251970 Apr 13, 2025
6ebb582
Support quick switch main window
Jack251970 Apr 14, 2025
b62a4f9
Add "Beta" string in Label
onesounds Apr 14, 2025
9c8a5a3
Merge branch 'quickswitch' of https://github.com/Flow-Launcher/Flow.L…
Jack251970 Apr 14, 2025
0520ec3
Fix possible COMException
Jack251970 Apr 14, 2025
dd51be0
Remove unnecessary Initialize
Jack251970 Apr 14, 2025
18f39a5
Remove Interop.UIAutomationClient
Jack251970 Apr 14, 2025
d033012
Improve quick switch window moving & resizing
Jack251970 Apr 14, 2025
a0d447e
Expose check path function
Jack251970 Apr 14, 2025
224c109
Add quick switch property
Jack251970 Apr 14, 2025
b72ef91
Support quick switch results in main view model
Jack251970 Apr 14, 2025
cc0dc8c
Support quick switch commands
Jack251970 Apr 14, 2025
f1e674b
Support quick switch for explorer
Jack251970 Apr 14, 2025
f86d131
Use right click to quick switch
Jack251970 Apr 14, 2025
dbbee2c
Use right click for quick switch
Jack251970 Apr 14, 2025
21df92d
Use HWND.Null to check dialog window handle
Jack251970 Apr 14, 2025
75b7175
Check dialog window handle
Jack251970 Apr 14, 2025
38e8555
Add show quick switch window option
Jack251970 Apr 14, 2025
f6d32d3
Code quality
Jack251970 Apr 14, 2025
6e642b2
Make private
Jack251970 Apr 14, 2025
556af5e
Remove useless hooks
Jack251970 Apr 14, 2025
b398878
Restore to original visibility status & Improve code quality
Jack251970 Apr 14, 2025
9ebacd4
Use Proc to get size & position
Jack251970 Apr 14, 2025
28e4b2f
Use windows hook
Jack251970 Apr 14, 2025
25430cb
Fix hook issue
Jack251970 Apr 14, 2025
8d07acd
Use hook event back
Jack251970 Apr 14, 2025
e74b0f6
Improve restoring to original visibility status & display interface
Jack251970 Apr 14, 2025
00872ab
Delay time for timer
Jack251970 Apr 14, 2025
3556022
Change delay location
Jack251970 Apr 14, 2025
5435088
Hide quick switch window when file dialog is unfocused
Jack251970 Apr 14, 2025
61406eb
Add lock & Improve explorer view initialization
Jack251970 Apr 14, 2025
76c0003
New api interfaces
Jack251970 Apr 15, 2025
e6c4d0b
Fix code comments
Jack251970 Apr 15, 2025
589a5db
Merge branch 'dev' into quickswitch
Jack251970 Apr 15, 2025
f9dd05d
Merge branch 'dev' into quickswitch
Jack251970 Apr 15, 2025
e111d22
Remove blank lines
Jack251970 Apr 15, 2025
1418599
Support file path open
Jack251970 Apr 15, 2025
dbb33eb
Remove useless keyboard input
Jack251970 Apr 15, 2025
3aec2a1
Fix handle clear check
Jack251970 Apr 15, 2025
a74ad6d
Merge branch 'dev' into quickswitch
Jack251970 Apr 16, 2025
0e02416
Improve auto quick switch
Jack251970 Apr 18, 2025
854cc69
Check handle invalid
Jack251970 Apr 18, 2025
f337d88
Remove useless codes
Jack251970 Apr 18, 2025
79da928
Do not fill twice & Add lock for stability
Jack251970 Apr 18, 2025
d6e69b2
Initialize window visibility
Jack251970 Apr 18, 2025
ea65e20
Merge branch 'dev' into quickswitch
Jack251970 Apr 18, 2025
6484ec0
Resolve conflicts
Jack251970 Apr 18, 2025
b3ff92f
Ensure thread safety for _lastExplorerView in NavigateDialogPath method
Jack251970 Apr 18, 2025
e442f36
Improve navigation handle check
Jack251970 Apr 18, 2025
5b5cac6
Fix lock issue
Jack251970 Apr 18, 2025
e57816d
Improve quick switch dispose
Jack251970 Apr 18, 2025
58621b7
Add more codes
Jack251970 Apr 18, 2025
f536599
Remove Quick switch automatically
Jack251970 Apr 18, 2025
064dca7
Check dialog handle
Jack251970 Apr 18, 2025
877c6ab
Remove duplicate WM_KEYDOWN entry
Jack251970 Apr 19, 2025
3649f70
Add codes
Jack251970 Apr 19, 2025
e92ccff
Comment related control
Jack251970 Apr 19, 2025
222f6e6
Remove beta label
Jack251970 Apr 19, 2025
8c30b9d
Make sure window events unhooked
Jack251970 Apr 19, 2025
d8e9fe0
Remove useless codes
Jack251970 Apr 19, 2025
1bfae21
Stop timer when hiding window
Jack251970 Apr 19, 2025
343c122
Cleanup codes
Jack251970 Apr 19, 2025
45441a5
Add settings for quick switch
Jack251970 Apr 19, 2025
34fbc79
Add more debug info
Jack251970 Apr 19, 2025
4fa3ec7
Code quality
Jack251970 Apr 19, 2025
56d2c6e
Check window shown
Jack251970 Apr 19, 2025
0583dff
Code quality
Jack251970 Apr 19, 2025
d189bac
Remove window shown check
Jack251970 Apr 19, 2025
6c379d3
Check main window visibility status
Jack251970 Apr 19, 2025
5ae1c4b
Fast show window from hidden window
Jack251970 Apr 19, 2025
f73e768
Use hook to check timer
Jack251970 Apr 19, 2025
aefd18a
Merge branch 'dev' into quickswitch
Jack251970 Apr 19, 2025
3e896b5
Do not use hook & unhook to check window moving
Jack251970 Apr 19, 2025
34e868a
Add quick switch window position
Jack251970 Apr 19, 2025
9a241e2
Add enable quick switch
Jack251970 Apr 19, 2025
bb20878
Support enable & disable quick switch
Jack251970 Apr 19, 2025
1643c49
Improve code comments
Jack251970 Apr 19, 2025
0e7c80a
Reset quick switch when disable quick switch
Jack251970 Apr 19, 2025
5426be0
Add more options for quick switch
Jack251970 Apr 19, 2025
2bdfe24
Support result behaviours & Change keyboard for quick switch window &…
Jack251970 Apr 19, 2025
2c6c7d1
Improve display
Jack251970 Apr 19, 2025
1f78203
Support file result behaviours
Jack251970 Apr 19, 2025
9e818d2
Reset window when changing quick switch mode
Jack251970 Apr 19, 2025
ca937b4
Use GetDlgItem instead
Jack251970 Apr 20, 2025
cd66288
Use click event to open
Jack251970 Apr 20, 2025
2de02a6
Remove useless codes & Add new file result behaviour & Improve genera…
Jack251970 Apr 20, 2025
5e22bf7
Only reset window first time open dialog
Jack251970 Apr 20, 2025
866d6f8
Improve quick switch position description
Jack251970 Apr 20, 2025
b1b8707
Hide window when using left click
Jack251970 Apr 20, 2025
b72077b
Support quick switch window position
Jack251970 Apr 20, 2025
337b96e
Code quality
Jack251970 Apr 20, 2025
a7916ac
Improve error log message
Jack251970 Apr 20, 2025
2b05e4f
Code quality
Jack251970 Apr 20, 2025
ce93746
Add third party explorer support
Jack251970 Apr 20, 2025
d2325d5
Initialize third party file dialog support
Jack251970 Apr 20, 2025
0da8eb3
Fix code issue
Jack251970 Apr 20, 2025
13656d1
Remove current dialog
Jack251970 Apr 20, 2025
277171d
Use empty string
Jack251970 Apr 20, 2025
086f982
Add auto switch option back
Jack251970 Apr 20, 2025
dc5b897
Improve strings
Jack251970 Apr 20, 2025
23b586e
Improve log message
Jack251970 Apr 20, 2025
7c50ca3
Support third party file dialog
Jack251970 Apr 20, 2025
8fe6391
Fix string tooltip
Jack251970 Apr 20, 2025
c5a36fd
Remove DirectoryAndFileName file behaviour
Jack251970 Apr 20, 2025
fc72b4b
Revert "Fix string tooltip"
Jack251970 Apr 20, 2025
8416137
Merge branch 'dev' into quickswitch
Jack251970 Apr 20, 2025
ab5d5ae
Hook delegates can be garbage‑collected
Jack251970 Apr 20, 2025
f782277
Remove useless modifiers
Jack251970 Apr 20, 2025
b324718
Merge branch 'quickswitch' of https://github.com/Flow-Launcher/Flow.L…
Jack251970 Apr 20, 2025
b690ca1
Improve code comments
Jack251970 Apr 20, 2025
091f0ec
Fix possible handle issue
Jack251970 Apr 20, 2025
24829b2
Add dialog type & focus path editor when changing
Jack251970 Apr 21, 2025
9b0cf6c
Fix GetDlgItem issue & Improve code quality
Jack251970 Apr 21, 2025
ec966c1
Improve log message & legacy mode
Jack251970 Apr 21, 2025
eb1fa18
Fix save / save as dialog possible issue
Jack251970 Apr 21, 2025
faa5cd1
Cache current tab to fix file editor handle issue
Jack251970 Apr 21, 2025
89283ef
Code quality
Jack251970 Apr 21, 2025
1b3e036
Fix quick switch window show issue
Jack251970 Apr 21, 2025
136ccaf
Fix multi-display alignment issue
Jack251970 Apr 21, 2025
c62a687
Code quality
Jack251970 Apr 21, 2025
56a645c
Add exception information
Jack251970 Apr 21, 2025
2332436
Fix possible null exception & Improve dialog window lock
Jack251970 Apr 21, 2025
3fe0a3e
Remain focus on dialog when opening quick switch window
Jack251970 Apr 21, 2025
e85b4ed
Inline variable
Jack251970 Apr 21, 2025
907d683
Add warning for auto quick switch & Improve strings with Explorer
Jack251970 Apr 21, 2025
c343337
Improve handle getter
Jack251970 Apr 21, 2025
9b58dd3
Improve dialog window check & Fix issue that dialogs are enabled on o…
Jack251970 Apr 21, 2025
ffaeab3
Use event hook for dragging
Jack251970 Apr 21, 2025
8e64539
Use task instead of thread
Jack251970 Apr 21, 2025
dc492b7
Make local function static
Jack251970 Apr 21, 2025
9729d25
Improve log message
Jack251970 Apr 21, 2025
f9df58d
Fix result issue
Jack251970 Apr 22, 2025
33f958e
Check auto startup only for Debug
Jack251970 Apr 22, 2025
18f0daf
Add more logs
Jack251970 Apr 22, 2025
805d841
Code quality
Jack251970 Apr 22, 2025
e748076
Wait 30ms before checking foreground & Update source & check
Jack251970 Apr 22, 2025
11201df
Code quality
Jack251970 Apr 22, 2025
8eaefa3
Code quality
Jack251970 Apr 22, 2025
db694c4
Code quality
Jack251970 Apr 22, 2025
a69d6ea
Add foreground changed lock & Improve code quality
Jack251970 Apr 22, 2025
3f932a8
Check path first & Improve code quality
Jack251970 Apr 22, 2025
d443a2e
Fix code comments
Jack251970 Apr 22, 2025
588266c
Merge branch 'dev' into quickswitch
Jack251970 Apr 25, 2025
58eb835
Merge branch 'dev' into quickswitch
Jack251970 May 1, 2025
507e457
Merge branch 'dev' into quickswitch
Jack251970 May 2, 2025
4372b6a
Improve code quality
Jack251970 May 3, 2025
165ba17
Add async quick switch as features
Jack251970 May 3, 2025
131d1ec
Merge branch 'dev' into quickswitch
Jack251970 May 5, 2025
e662a1b
Improve code quality
Jack251970 May 5, 2025
bb31990
Merge branch 'dev' into quickswitch
Jack251970 May 5, 2025
8d9b152
Improve code quality
Jack251970 May 5, 2025
b33b9c0
Merge branch 'dev' into quickswitch
Jack251970 May 7, 2025
08406ef
Remove unused using
Jack251970 May 9, 2025
397c5d1
Support Files explorer
Jack251970 May 9, 2025
2d7d311
Remove null check
Jack251970 May 9, 2025
92249e9
Code quality
Jack251970 May 9, 2025
c03926f
Support Files for builtin shortcuts & Use topmost explorer window dur…
Jack251970 May 9, 2025
231e6e8
Improve Dispose
Jack251970 May 9, 2025
69076f3
Improve code quality
Jack251970 May 9, 2025
063d394
Code quality
Jack251970 May 9, 2025
99d5a99
Ignore character case
Jack251970 May 9, 2025
08f9b68
Improve code quality
Jack251970 May 9, 2025
69d8b12
Add process name check for Windows Explorer
Jack251970 May 9, 2025
0181ab1
Merge branch 'dev' into quickswitch
Jack251970 May 10, 2025
b232ff1
Revert InitializePosition change
Jack251970 May 10, 2025
281c5b7
Merge branch 'dev' into quickswitch
Jack251970 May 10, 2025
60bbf75
Fix build issue
Jack251970 May 10, 2025
5da9640
Improve code quality
Jack251970 May 10, 2025
fcf6194
Improve code quality
Jack251970 May 10, 2025
0e74643
Improve code quality
Jack251970 May 10, 2025
2b4f777
Clear possible home page results
Jack251970 May 10, 2025
4676234
Use requery instead of clear results
Jack251970 May 10, 2025
cd49464
Make clear results local & Improve code quality
Jack251970 May 10, 2025
a20befd
Remove blank lines
Jack251970 May 10, 2025
50f42a8
Revert changes in FileExplorerHelper.cs
Jack251970 May 11, 2025
d44f6e9
Remove Files support
Jack251970 May 11, 2025
76d52a9
Merge branch 'dev' into quickswitch
Jack251970 May 12, 2025
45ac0af
Remove unused project
Jack251970 May 12, 2025
c20bb30
Merge branch 'dev' into quickswitch
Jack251970 May 14, 2025
06baec5
Merge branch 'dev' into quickswitch
Jack251970 May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions Flow.Launcher.Core/Plugin/PluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
await Task.WhenAll(AllPlugins.Select(plugin => plugin.Plugin switch
{
IReloadable p => Task.Run(p.ReloadData),
IAsyncReloadable p => p.ReloadDataAsync(),

Check warning on line 114 in Flow.Launcher.Core/Plugin/PluginManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`Reloadable` is not a recognized word. (unrecognized-spelling)
_ => Task.CompletedTask,
}).ToArray());
}
Expand Down Expand Up @@ -173,10 +173,10 @@
/// <param name="settings"></param>
public static void LoadPlugins(PluginsSettings settings)
{
_metadatas = PluginConfig.Parse(Directories);

Check warning on line 176 in Flow.Launcher.Core/Plugin/PluginManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`metadatas` is not a recognized word. (unrecognized-spelling)
Settings = settings;
Settings.UpdatePluginSettings(_metadatas);

Check warning on line 178 in Flow.Launcher.Core/Plugin/PluginManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`metadatas` is not a recognized word. (unrecognized-spelling)
AllPlugins = PluginsLoader.Plugins(_metadatas, Settings);

Check warning on line 179 in Flow.Launcher.Core/Plugin/PluginManager.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`metadatas` is not a recognized word. (unrecognized-spelling)
// Since dotnet plugins need to get assembly name first, we should update plugin directory after loading plugins
UpdatePluginDirectory(_metadatas);
}
Expand Down Expand Up @@ -274,13 +274,16 @@
}
}

public static ICollection<PluginPair> ValidPluginsForQuery(Query query)
public static ICollection<PluginPair> ValidPluginsForQuery(Query query, bool quickSwitch)
{
if (query is null)
return Array.Empty<PluginPair>();

if (!NonGlobalPlugins.TryGetValue(query.ActionKeyword, out var plugin))
return GlobalPlugins;
return quickSwitch ? GlobalPlugins.Where(p => p.Plugin is IAsyncQuickSwitch).ToList() : GlobalPlugins;

if (quickSwitch && plugin.Plugin is not IAsyncQuickSwitch)
return Array.Empty<PluginPair>();

return new List<PluginPair>
{
Expand Down Expand Up @@ -366,6 +369,36 @@
}
return results;
}

public static async Task<List<QuickSwitchResult>> QueryQuickSwitchForPluginAsync(PluginPair pair, Query query, CancellationToken token)
{
var results = new List<QuickSwitchResult>();
var metadata = pair.Metadata;

try
{
var milliseconds = await API.StopwatchLogDebugAsync(ClassName, $"Cost for {metadata.Name}",
async () => results = await ((IAsyncQuickSwitch)pair.Plugin).QueryQuickSwitchAsync(query, token).ConfigureAwait(false));

token.ThrowIfCancellationRequested();
if (results == null)
return null;
UpdatePluginMetadata(results, metadata, query);

token.ThrowIfCancellationRequested();
}
catch (OperationCanceledException)
{
// null will be fine since the results will only be added into queue if the token hasn't been cancelled
return null;
}
catch (Exception e)
{
API.LogException(ClassName, $"Failed to query quick switch for plugin: {metadata.Name}", e);
return null;
}
return results;
}

public static void UpdatePluginMetadata(IReadOnlyList<Result> results, PluginMetadata metadata, Query query)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
Expand Down Expand Up @@ -59,12 +59,14 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="InputSimulator" Version="1.0.4" />
<PackageReference Include="MemoryPack" Version="1.21.4" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.12.19" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NHotkey.Wpf" Version="3.0.0" />
<PackageReference Include="NLog" Version="4.7.10" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -75,6 +77,5 @@
<!--Bumping to it or higher needs to test and ensure this is no longer a problem-->
<PackageReference Include="ToolGood.Words.Pinyin" Version="3.0.1.4" />
</ItemGroup>


</Project>
22 changes: 22 additions & 0 deletions Flow.Launcher.Infrastructure/NativeMethods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,25 @@ LOCALE_TRANSIENT_KEYBOARD1
LOCALE_TRANSIENT_KEYBOARD2
LOCALE_TRANSIENT_KEYBOARD3
LOCALE_TRANSIENT_KEYBOARD4

SetWinEventHook
UnhookWinEvent
SendMessage
EVENT_SYSTEM_FOREGROUND
WINEVENT_OUTOFCONTEXT
WM_SETTEXT
IShellFolderViewDual2
CoCreateInstance
CLSCTX
IShellWindows
IWebBrowser2
EVENT_OBJECT_DESTROY
EVENT_OBJECT_LOCATIONCHANGE
EVENT_SYSTEM_MOVESIZESTART
EVENT_SYSTEM_MOVESIZEEND
GetDlgItem
PostMessage
BM_CLICK
WM_GETTEXT
OpenProcess
QueryFullProcessImageName
8 changes: 5 additions & 3 deletions Flow.Launcher.Infrastructure/PInvokeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@

namespace Windows.Win32;

// Edited from: https://github.com/files-community/Files
/// <summary>
/// Edited from: https://github.com/files-community/Files
/// </summary>
internal static partial class PInvoke
{
[DllImport("User32", EntryPoint = "SetWindowLongW", ExactSpelling = true)]
static extern int _SetWindowLong(HWND hWnd, int nIndex, int dwNewLong);
private static extern int _SetWindowLong(HWND hWnd, int nIndex, int dwNewLong);

[DllImport("User32", EntryPoint = "SetWindowLongPtrW", ExactSpelling = true)]
static extern nint _SetWindowLongPtr(HWND hWnd, int nIndex, nint dwNewLong);
private static extern nint _SetWindowLongPtr(HWND hWnd, int nIndex, nint dwNewLong);

// NOTE:
// CsWin32 doesn't generate SetWindowLong on other than x86 and vice versa.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using Windows.Win32.Foundation;

namespace Flow.Launcher.Infrastructure.QuickSwitch.Interface
{
/// <summary>
/// Interface for handling File Dialog instances in QuickSwitch.
/// </summary>
/// <remarks>
/// Add models which implement IQuickSwitchDialog in folder QuickSwitch/Models.
/// E.g. Models.WindowsDialog.
/// Then add instances in QuickSwitch._quickSwitchDialogs.
/// </remarks>
internal interface IQuickSwitchDialog : IDisposable
{
IQuickSwitchDialogWindow DialogWindow { get; }

bool CheckDialogWindow(HWND hwnd);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using Windows.Win32.Foundation;

namespace Flow.Launcher.Infrastructure.QuickSwitch.Interface
{
internal interface IQuickSwitchDialogWindow : IDisposable
{
HWND Handle { get; }

IQuickSwitchDialogWindowTab GetCurrentTab();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using Windows.Win32.Foundation;

namespace Flow.Launcher.Infrastructure.QuickSwitch.Interface
{
internal interface IQuickSwitchDialogWindowTab : IDisposable
{
HWND Handle { get; }

string GetCurrentFolder();

string GetCurrentFile();

bool JumpFolder(string path, bool auto);

bool JumpFile(string path);

bool Open();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using Windows.Win32.Foundation;

namespace Flow.Launcher.Infrastructure.QuickSwitch.Interface
{
/// <summary>
/// Interface for handling Windows Explorer instances in QuickSwitch.
/// </summary>
/// <remarks>
/// Add models which implement IQuickSwitchExplorer in folder QuickSwitch/Models.
/// E.g. Models.WindowsExplorer.
/// Then add instances in QuickSwitch._quickSwitchExplorers.
/// </remarks>
internal interface IQuickSwitchExplorer : IDisposable
{
bool CheckExplorerWindow(HWND foreground);

void RemoveExplorerWindow();

string GetExplorerPath();
}
}
Loading
Loading