-
-
Notifications
You must be signed in to change notification settings - Fork 583
feature: Everything 1.5a support #4370
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
VictoriousRaptor
wants to merge
31
commits into
dev
Choose a base branch
from
everything-1.5-sdk
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
05d9b96
Add Everything 1.5 SDK
VictoriousRaptor 9fca737
Introduce Everything SDK 3 for Everything 1.5
VictoriousRaptor 84edda4
Fix missing search
VictoriousRaptor 9d1c0ae
Add fast sort detection
VictoriousRaptor 2c5a4b5
Merge branch 'dev' into everything-1.5-sdk
VictoriousRaptor 9246dea
Add highlight
VictoriousRaptor 5fbb520
Fix highlighting issue
VictoriousRaptor 737e2b4
Merge branch 'dev' into everything-1.5-sdk
VictoriousRaptor 4bf530b
Fix LoadLibrary return type to IntPtr and use Win32Exception for erro…
Copilot cc62362
Fix LoadLibrary return type to IntPtr and use Win32Exception for erro…
VictoriousRaptor e5cc911
Extract Everything3 functions
VictoriousRaptor 9eeadfe
Add option for Everything 1.5 support
VictoriousRaptor c702ed0
Allow customizing Everything 1.5 instance name
VictoriousRaptor 9f579b2
Use variable for default name
VictoriousRaptor 68f0f47
Clear handle after successful unload
VictoriousRaptor 584ce07
Refactor
VictoriousRaptor 96b6664
Fix default everything instance name
VictoriousRaptor 4db9d67
Handle the timeout result from WaitAsync(TimeSpan) before releasing t…
VictoriousRaptor 5fa18c8
Stop dynamically loading Everything SDK
VictoriousRaptor 7254dc0
Clean code and revert useless changes
VictoriousRaptor 01e6697
update expected text
VictoriousRaptor a78397d
Revert unnecessary changes
VictoriousRaptor 5a6a461
Throw error on add sort option fails
VictoriousRaptor 825674f
Move default alpha instance name to Everything Search Manager
VictoriousRaptor ba2e8bd
Refactor EverythingSearchManager
VictoriousRaptor ca3cb6e
Extract commone code in API
VictoriousRaptor cfdff0d
Extract methods of API v3
VictoriousRaptor f439a6d
Update exceptions check
VictoriousRaptor 6811cdd
Delete Plugins/Flow.Launcher.Plugin.Explorer/Everything-1.5-architect…
VictoriousRaptor e21f300
Destroy the Everything3 client after incrementing run count
VictoriousRaptor ae6720b
Update exceptional message
VictoriousRaptor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,3 +108,4 @@ Msix | |
| dummyprofile | ||
| browserbookmark | ||
| copyurl | ||
| PInvoke | ||
Binary file added
BIN
+151 KB
Plugins/Flow.Launcher.Plugin.Explorer/EverythingSDK/x64/Everything3.dll
Binary file not shown.
Binary file added
BIN
+109 KB
Plugins/Flow.Launcher.Plugin.Explorer/EverythingSDK/x86/Everything3.dll
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/Everything3ApiDllImport.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| using System; | ||
| using System.ComponentModel; | ||
| using System.IO; | ||
| using System.Runtime.InteropServices; | ||
| using System.Text; | ||
|
|
||
| namespace Flow.Launcher.Plugin.Explorer.Search.Everything | ||
| { | ||
| internal static class Everything3ApiDllImport | ||
| { | ||
| private static IntPtr _dllHandle = IntPtr.Zero; | ||
| internal static bool IsLoaded => _dllHandle != IntPtr.Zero; | ||
|
|
||
| public static void Load(string directory) | ||
| { | ||
| if (_dllHandle != IntPtr.Zero) | ||
| { | ||
| return; | ||
| } | ||
|
|
||
| var path = Path.Combine(directory, Dll); | ||
| _dllHandle = LoadLibrary(path); | ||
| if (_dllHandle == IntPtr.Zero) | ||
| { | ||
| throw new Win32Exception(Marshal.GetLastPInvokeError()); | ||
| } | ||
| } | ||
|
|
||
| [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] | ||
| private static extern IntPtr LoadLibrary(string name); | ||
|
|
||
| private const string Dll = "Everything3.dll"; | ||
VictoriousRaptor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [DllImport(Dll, CharSet = CharSet.Unicode)] | ||
| internal static extern IntPtr Everything3_ConnectW(string instanceName); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_DestroyClient(IntPtr client); | ||
|
|
||
| [DllImport(Dll)] | ||
| internal static extern IntPtr Everything3_CreateSearchState(); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_DestroySearchState(IntPtr searchState); | ||
|
|
||
| [DllImport(Dll, CharSet = CharSet.Unicode)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_SetSearchTextW(IntPtr searchState, string search); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_SetSearchRegex(IntPtr searchState, bool matchRegex); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_SetSearchMatchPath(IntPtr searchState, bool matchPath); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_SetSearchHideResultOmissions(IntPtr searchState, bool hideResultOmissions); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_SetSearchViewportOffset(IntPtr searchState, nuint offset); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_SetSearchViewportCount(IntPtr searchState, nuint count); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_ClearSearchSorts(IntPtr searchState); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_AddSearchSort(IntPtr searchState, uint propertyId, bool ascending); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_ClearSearchPropertyRequests(IntPtr searchState); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_AddSearchPropertyRequest(IntPtr searchState, uint propertyId); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_AddSearchPropertyRequestHighlighted(IntPtr searchState, uint propertyId); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_GetSearchPropertyRequestHighlight(IntPtr searchState, nuint index); | ||
|
|
||
| [DllImport(Dll)] | ||
| internal static extern IntPtr Everything3_Search(IntPtr client, IntPtr searchState); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_DestroyResultList(IntPtr resultList); | ||
|
|
||
| [DllImport(Dll)] | ||
| internal static extern nuint Everything3_GetResultListViewportCount(IntPtr resultList); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_IsFolderResult(IntPtr resultList, nuint resultIndex); | ||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_IsRootResult(IntPtr resultList, nuint resultIndex); | ||
|
|
||
| [DllImport(Dll, CharSet = CharSet.Unicode)] | ||
| internal static extern nuint Everything3_GetResultFullPathNameW(IntPtr resultList, nuint resultIndex, StringBuilder buffer, nuint bufferSizeInWChars); | ||
|
|
||
| [DllImport(Dll, CharSet = CharSet.Unicode)] | ||
| internal static extern nuint Everything3_GetResultPropertyTextHighlightedW(IntPtr resultList, nuint resultIndex, uint propertyId, StringBuilder buffer, nuint bufferSizeInWChars); | ||
|
|
||
| [DllImport(Dll, CharSet = CharSet.Unicode)] | ||
| internal static extern nuint Everything3_GetResultPropertyTextW(IntPtr resultList, nuint resultIndex, uint propertyId, StringBuilder buffer, nuint bufferSizeInWChars); | ||
|
|
||
| [DllImport(Dll)] | ||
| internal static extern uint Everything3_GetResultRunCount(IntPtr resultList, nuint resultIndex); | ||
|
|
||
| [DllImport(Dll, CharSet = CharSet.Unicode)] | ||
| internal static extern uint Everything3_IncRunCountFromFilenameW(IntPtr client, string fileName); | ||
|
|
||
| [DllImport(Dll)] | ||
| internal static extern uint Everything3_GetLastError(); | ||
|
|
||
|
|
||
| [DllImport(Dll)] | ||
| [return: MarshalAs(UnmanagedType.Bool)] | ||
| internal static extern bool Everything3_IsPropertyFastSort(IntPtr client, uint propertyId); | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still use x86? Maybe these can be removed?