1use bitflags::bitflags;
2use windows::core::{s, w};
3use windows::Win32::UI::WindowsAndMessaging::WM_USER;
4
5pub const EVERYTHING_WM_IPC: u32 = WM_USER;
6pub const EVERYTHING_IPC_ALL_RESULTS: u32 = 0xFFFFFFFF;
7
8#[repr(u32)]
9#[derive(Debug, Copy, Clone)]
10pub enum IpcTargetMachine {
11 X86 = 1,
12 X64 = 2,
13 ARM = 3,
14 ARM64 = 4,
15}
16
17#[repr(u32)]
18#[derive(Debug, Copy, Clone)]
19pub enum IpcFilter {
20 Everything = 0,
21 Audio = 1,
22 Compressed = 2,
23 Document = 3,
24 Executable = 4,
25 Folder = 5,
26 Picture = 6,
27 Video = 7,
28 Custom = 8,
29}
30
31#[repr(u32)]
32#[derive(Debug, Copy, Clone)]
33pub enum TaskbarIpcCommand {
34 GetMajorVersion = 0,
36 GetMinorVersion = 1,
37 GetRevision = 2,
38 GetBuildNumber = 3,
39 Exit = 4,
40 GetTargetMachine = 5,
41
42 DeleteStartMenuShortcuts = 100,
44 DeleteQuickLaunchShortcut = 101,
45 DeleteDesktopShortcut = 102,
46 DeleteFolderContextMenu = 103,
47 DeleteRunOnSystemStartup = 104,
48 DeleteUrlProtocol = 105,
49
50 CreateStartMenuShortcuts = 200,
52 CreateQuickLaunchShortcut = 201,
53 CreateDesktopShortcut = 202,
54 CreateFolderContextMenu = 203,
55 CreateRunOnSystemStartup = 204,
56 CreateUrlProtocol = 205,
57
58 IsStartMenuShortcuts = 300,
60 IsQuickLaunchShortcut = 301,
61 IsDesktopShortcut = 302,
62 IsFolderContextMenu = 303,
63 IsRunOnSystemStartup = 304,
64 IsUrlProtocol = 305,
65 IsService = 306,
66
67 IsNtfsDriveIndexed = 400,
68
69 IsDbLoaded = 401,
71 IsDbBusy = 402,
72 IsAdmin = 403,
73 IsAppdata = 404,
74 RebuildDb = 405,
75 UpdateAllFolderIndexes = 406,
76 SaveDb = 407,
77 SaveRunHistory = 408,
78 DeleteRunHistory = 409,
79 IsFastSort = 410,
80 IsFileInfoIndexed = 411,
81
82 QueueRebuildDb = 412,
84}
85
86#[repr(u32)]
89#[derive(Debug, Copy, Clone)]
90pub enum SearchWindowIpcQuery {
91 IsMatchCase = 500,
93 IsMatchWholeWord = 501,
94 IsMatchPath = 502,
95 IsMatchDiacritics = 503,
96 IsRegex = 504,
97 IsFilters = 505,
98 IsPreview = 506,
99 IsStatusBar = 507,
100 IsDetails = 508,
101 GetThumbnailSize = 509,
102 GetSort = 510,
103 GetOnTop = 511,
104 GetFilter = 512,
105 GetFIlterIndex = 513,
106
107 IsMatchPrefix = 514,
109 IsMatchSuffix = 515,
110 IsIgnorePunctuation = 516,
111 IsIgnoreWhitespace = 517,
112 IsSearchAsYouType = 518,
113}
114
115#[repr(u32)]
116#[derive(Debug, Copy, Clone)]
117pub enum SearchWindowIpcCommand {
118 FileMenu = 10001,
120 EditMenu = 10002,
121 SearchMenu = 10003,
122 ToolsMenu = 10004,
123 HelpMenu = 10005,
124 Toolbar = 10006,
125 SearchEdit = 10007,
126 Filter = 10008,
127 ResultsHeader = 10009,
128 Status = 10010,
129 ViewZoomMenu = 10012,
130 ViewMenu = 10013,
131 ViewWindowSizeMenu = 10019,
132 ResultList = 10020,
133 BookmarksMenu = 10021,
134 ViewSortByMenu = 10022,
135 ViewGotoMenu = 10024,
136 ViewOntopMenu = 10025,
137 Preview = 10026,
138
139 TrayNewSearchWindow = 40001,
141 TrayConnectToEtpServer = 40004,
142 TrayOptions = 40005,
143 TrayExit = 40006,
144 TrayShowSearchWindow = 40007,
145 TrayToggleSearchWindow = 40008,
146
147 FileNewWindow = 40010,
149 FileClose = 40011,
150 FileExport = 40012,
151 FileExit = 40013,
152 FileOpenFilelist = 40014,
153 FileCloseFilelist = 40015,
154
155 EditCut = 40020,
157 EditCopy = 40021,
158 EditPaste = 40022,
159 EditSelectAll = 40023,
160 EditInvertSelection = 40029,
161
162 ViewZoomIn = 40030,
164 ViewZoomOut = 40031,
165 ViewZoomReset = 40032,
166 ViewToggleFullscreen = 40034,
167 ViewAutoFit = 40044,
168 ViewAutoSize1 = 40045,
169 ViewAutoSize2 = 40046,
170 ViewAutoSize3 = 40047,
171 ViewRefresh = 40036,
172 ViewFilters = 40035,
173 ViewSortByAscending = 40037,
174 ViewSortByDescending = 40038,
175 ViewStatusBar = 40039,
176 ViewGotoBack = 40040,
177 ViewGotoForward = 40041,
178 ViewOntopNever = 40042,
179 ViewOntopAlways = 40043,
180 ViewOntopWhileSearching = 40048,
181 ViewGotoHome = 40049,
182 ViewToggleLtrRtl = 40050,
183 ViewDetails = 40051,
184 ViewMediumIcons = 40052,
185 ViewLargeIcons = 40053,
186 ViewExtraLargeIcons = 40054,
187 ViewPreview = 40055,
188 ViewGotoShowAllHistory = 40056,
189 ViewIncreaseThumbnailSize = 40057,
190 ViewDecreaseThumbnailSize = 40058,
191 ViewShowFilters = 40096, ViewHideFilters = 40097, ViewShowPreview = 40098, ViewHidePreview = 40099, ViewShowStatusBar = 40100, ViewHideStatusBar = 40101, ViewDetailsNoToggle = 40102, ViewMediumIconsNoToggle = 40103, ViewLargeIconsNoToggle = 40104, ViewExtraLargeIconsNoToggle = 40105, SearchToggleMatchCase = 40060,
204 SearchToggleMatchWholeWord = 40061,
205 SearchToggleMatchPath = 40062,
206 SearchToggleRegex = 40063,
207 SearchToggleMatchDiacritics = 40066,
208 SearchFilterAdd = 40067,
209 SearchFilterOrganize = 40068,
210 SearchAdvancedSearch = 40069,
211 SearchEnableMatchCase = 40106, SearchEnableMatchWholeWord = 40107, SearchEnableMatchPath = 40108, SearchEnableRegex = 40109, SearchEnableMatchDiacritics = 40110, SearchDisableMatchCase = 40111, SearchDisableMatchWholeWord = 40112, SearchDisableMatchPath = 40113, SearchDisableRegex = 40114, SearchDisableMatchDiacritics = 40115, SearchFilterEverything = 40116, SearchFilterAudio = 40117, SearchFilterCompressed = 40118, SearchFilterDocument = 40119, SearchFilterExecutable = 40120, SearchFilterFolder = 40121, SearchFilterPicture = 40122, SearchFilterVideo = 40123, SearchFilterAudioNoToggle = 40124, SearchFilterCompressedNoToggle = 40125, SearchFilterDocumentNoToggle = 40126, SearchFilterExecutableNoToggle = 40127, SearchFilterFolderNoToggle = 40128, SearchFilterPictureNoToggle = 40129, SearchFilterVideoNoToggle = 40130, ToolsConnectToEtpServer = 40072,
239 ToolsDisconnectFromEtpServer = 40073,
240 ToolsOptions = 40074,
241 ToolsConsole = 40075,
242 ToolsEditor = 40076,
243
244 HelpViewHelpTopics = 40080,
246 HelpOpenEverythingWebsite = 40081,
247 HelpCheckForUpdates = 40082,
248 HelpAboutEverything = 40083,
249 HelpSearchSyntax = 40084,
250 HelpCommandLineOptions = 40085,
251 HelpRegexSyntax = 40086,
252 HelpDonate = 40087,
253
254 BookmarkAdd = 40090,
256 BookmarkOrganize = 40091,
257
258 FileOpen = 41000,
260 FileOpenNew = 41048,
261 FileOpenWith = 41049,
262 FileEdit = 41050,
263 FilePlay = 41051,
264 FilePrint = 41052,
265 FilePreview = 41053,
266 FilePrintTo = 41054,
267 FileRunAs = 41055,
268 FileOpenWithDefaultVerb = 41056,
269 FileOpenAndClose = 41057,
270 FileExplorePath = 41002,
271 FileOpenPath = 41003,
272 FileDelete = 41004,
273 FilePermanentlyDelete = 41005,
274 FileRename = 41006,
275 FileCopyFullPathAndName = 41007,
276 FileCopyPath = 41008,
277 FileProperties = 41009,
278 FileReadExtendedInformation = 41064,
279 FileCreateShortcut = 41065,
280 FileSetRunCount = 41068,
281 FileCopyName = 41011,
282 FileOpenAndDoNotClose = 41076,
283
284 ResultListExplore = 41001,
286 ResultListFocus = 41010,
287 ResultListAutofitColumns = 41012,
288 ResultListDown = 41018,
289 ResultListUp = 41019,
290 ResultListPageUp = 41020,
291 ResultListPageDown = 41021,
292 ResultListStart = 41022,
293 ResultListEnd = 41023,
294 ResultListDownExtend = 41024,
295 ResultListUpExtend = 41025,
296 ResultListPageUpExtend = 41026,
297 ResultListPageDownExtend = 41027,
298 ResultListStartExtend = 41028,
299 ResultListEndExtend = 41029,
300 ResultListFocusDown = 41030,
301 ResultListFocusUp = 41031,
302 ResultListFocusPageUp = 41032,
303 ResultListFocusPageDown = 41033,
304 ResultListFocusStart = 41034,
305 ResultListFocusEnd = 41035,
306 ResultListScrollLeft = 41036,
307 ResultListScrollRight = 41037,
308 ResultListScrollPageLeft = 41038,
309 ResultListScrollPageRight = 41039,
310 ResultListSelectFocus = 41040,
311 ResultListToggleFocusSelection = 41041,
312 ResultListContextMenu = 41046,
313 ResultListFocusDownExtend = 41058,
314 ResultListFocusUpExtend = 41059,
315 ResultListFocusPageUpExtend = 41060,
316 ResultListFocusPageDownExtend = 41061,
317 ResultListFocusStartExtend = 41062,
318 ResultListFocusEndExtend = 41063,
319 ResultListAutofit = 41066,
320 ResultListCopyCsv = 41067,
321 ResultListLeftExtend = 41070,
322 ResultListRightExtend = 41071,
323 ResultListFocusLeftExtend = 41072,
324 ResultListFocusRightExtend = 41073,
325 ResultListFocusMostRun = 41074,
326 ResultListFocusLastRun = 41075,
327 ResultListLeft = 41079, ResultListRight = 41080, ResultListFocusLeft = 41081, ResultListFocusRight = 41082, ResultListScrollLeftScrollOnly = 41083, ResultListScrollRightScrollOnly = 41084, ResultListScrollPageLeftScrollOnly = 41085, ResultListScrollPageRightScrollOnly = 41086, ResultListSortByName = 41300,
337 ResultListSortByPath = 41301,
338 ResultListSortBySize = 41302,
339 ResultListSortByExtension = 41303,
340 ResultListSortByType = 41304,
341 ResultListSortByDateModified = 41305,
342 ResultListSortByDateCreated = 41306,
343 ResultListSortByAttributes = 41307,
344 ResultListSortByFileListFilename = 41308,
345 ResultListSortByRunCount = 41309,
346 ResultListSortByDateRecentlyChanged = 41310,
347 ResultListSortByDateAccessed = 41311,
348 ResultListSortByDateRun = 41312,
349
350 ResultListToggleNameColumn = 41400,
351 ResultListTogglePathColumn = 41401,
352 ResultListToggleSizeColumn = 41402,
353 ResultListToggleExtensionColumn = 41403,
354 ResultListToggleTypeColumn = 41404,
355 ResultListToggleDateModifiedColumn = 41405,
356 ResultListToggleDateCreatedColumn = 41406,
357 ResultListToggleAttributesColumn = 41407,
358 ResultListToggleFileListFilenameColumn = 41408,
359 ResultListToggleRunCountColumn = 41409,
360 ResultListToggleDateRecentlyChangedColumn = 41410,
361 ResultListToggleDateAccessedColumn = 41411,
362 ResultListToggleDateRunColumn = 41412,
363
364 ResultListSizeNameColumnToFit = 41600,
365 ResultListSizePathColumnToFit = 41601,
366 ResultListSizeSizeColumnToFit = 41602,
367 ResultListSizeExtensionColumnToFit = 41603,
368 ResultListSizeTypeColumnToFit = 41604,
369 ResultListSizeDateModifiedColumnToFit = 41605,
370 ResultListSizeDateCreatedColumnToFit = 41606,
371 ResultListSizeAttributesColumnToFit = 41607,
372 ResultListSizeFileListFilenameColumnToFit = 41608,
373 ResultListSizeRunCountColumnToFit = 41609,
374 ResultListSizeDateRecentlyChangedColumnToFit = 41610,
375 ResultListSizeDateAccessedColumnToFit = 41611,
376 ResultListSizeDateRunColumnToFit = 41612,
377
378 FileCustomVerb01 = 41500,
379 FileCustomVerb02 = 41501,
380 FileCustomVerb03 = 41502,
381 FileCustomVerb04 = 41503,
382 FileCustomVerb05 = 41504,
383 FileCustomVerb06 = 41505,
384 FileCustomVerb07 = 41506,
385 FileCustomVerb08 = 41507,
386 FileCustomVerb09 = 41508,
387 FileCustomVerb10 = 41509,
388 FileCustomVerb11 = 41510,
389 FileCustomVerb12 = 41511,
390
391 SearchEditFocus = 42000,
393 SearchEditWordDeleteToStart = 42019,
394 SearchEditAutoComplete = 42020,
395 SearchEditShowSearchHistory = 42021,
396 SearchEditShowAllSearchHistory = 42022,
397
398 TrayEditor = 41700,
399 TrayOpenFilelist = 41701,
400
401 IndexUpdateAllFoldersNow = 41800,
402 IndexForceRebuild = 41801,
403}
404
405pub const EVERYTHING_IPC_WNDCLASSW: windows::core::PCWSTR = w!("EVERYTHING_TASKBAR_NOTIFICATION");
406pub const EVERYTHING_IPC_WNDCLASSA: windows::core::PCSTR = s!("EVERYTHING_TASKBAR_NOTIFICATION");
407
408pub const EVERYTHING_IPC_SEARCH_CLIENT_WNDCLASSW: windows::core::PCWSTR = w!("EVERYTHING");
409pub const EVERYTHING_IPC_SEARCH_CLIENT_WNDCLASSA: windows::core::PCSTR = s!("EVERYTHING");
410
411pub const EVERYTHING_IPC_CREATEDW: windows::core::PCWSTR = w!("EVERYTHING_IPC_CREATED");
412pub const EVERYTHING_IPC_CREATEDA: windows::core::PCSTR = s!("EVERYTHING_IPC_CREATED");
413
414bitflags! {
415 #[repr(transparent)]
416 #[derive(Debug, Copy, Clone, Default)]
417 pub struct IpcSearchFlags: u32 {
422 const MATCH_CASE = 0x00000001;
424 const MATCH_WHOLEWORD = 0x00000002;
426 const MATCH_PATH = 0x00000004;
428 const REGEX = 0x00000008;
430 const MATCH_ACCENTS = 0x00000010;
432 const MATCH_DIACRITICS = 0x00000010;
434 const MATCH_PREFIX = 0x00000020; const MATCH_SUFFIX = 0x00000040; const IGNORE_PUNCTUATION = 0x00000080;
440 const IGNORE_WHITESPACE = 0x00000100;
442 }
443
444 #[repr(transparent)]
445 #[derive(Debug, Copy, Clone, Default)]
446 pub struct IpcItemFlags: u32 {
447 const IS_FOLDER = 0x00000001;
448 const IS_DRIVE_OR_ROOT = 0x00000002;
449 }
450}
451
452#[repr(C)]
455pub struct IpcCommandLine {
456 pub show_command: u32,
457 }
459
460#[repr(C, packed(1))]
462#[derive(Debug, Copy, Clone)]
463pub struct IpcQuery {
464 pub reply_hwnd: u32,
465 pub reply_copydata_message: u32,
466 pub search_flags: u32,
467 pub offset: u32,
468 pub max_results: u32,
469 }
471
472#[repr(C, packed(1))]
474#[derive(Debug, Copy, Clone)]
475pub struct IpcQuery2 {
476 pub reply_hwnd: u32,
477 pub reply_copydata_message: u32,
478 pub search_flags: u32,
479 pub offset: u32,
480 pub max_results: u32,
481 pub request_flags: u32,
482 pub sort_type: u32,
483 }
485
486#[repr(C, packed(1))]
488#[derive(Debug, Copy, Clone)]
489pub struct IpcItem {
490 pub flags: u32,
491 pub filename_offset: u32,
492 pub path_offset: u32,
493}
494
495#[repr(C, packed(1))]
497#[derive(Debug, Copy, Clone)]
498pub struct IpcList {
499 pub totfolders: u32,
500 pub totfiles: u32,
501 pub totitems: u32,
502 pub numfolders: u32,
503 pub numfiles: u32,
504 pub numitems: u32,
505 pub offset: u32,
506 }
508
509#[repr(C, packed(1))]
511#[derive(Debug, Copy, Clone)]
512pub struct IpcItem2 {
513 pub flags: u32,
514 pub data_offset: u32,
515}
516
517#[repr(C, packed(1))]
519#[derive(Debug, Copy, Clone)]
520pub struct IpcList2 {
521 pub totitems: u32,
522 pub numitems: u32,
523 pub offset: u32,
524 pub request_flags: u32,
525 pub sort_type: u32,
526 }
528
529#[repr(C, packed(1))]
530#[derive(Debug, Copy, Clone)]
531pub struct IpcRunHistory {
532 pub run_count: u32,
533 }
535
536#[repr(u32)]
537#[derive(Debug, Copy, Clone)]
538pub enum IpcCopyData {
539 CommandLineUTF8 = 0,
540 QueryA = 1,
541 QueryW = 2,
542 Query2A = 17,
543 Query2W = 18,
544 GetRunCountA = 19,
545 GetRunCountW = 20,
546 SetRunCountA = 21,
547 SetRunCountW = 22,
548 IncRunCountA = 23,
549 IncRunCountW = 24,
550}
551
552#[repr(u32)]
553#[derive(Debug, Copy, Clone, Default)]
554pub enum IpcSort {
558 #[default]
560 Default = 0,
561 NameAscending = 1,
562 NameDescending = 2,
563 PathAscending = 3,
564 PathDescending = 4,
565 SizeAscending = 5,
566 SizeDescending = 6,
567 ExtensionAscending = 7,
568 ExtensionDescending = 8,
569 TypeNameAscending = 9,
570 TypeNameDescending = 10,
571 DateCreatedAscending = 11,
572 DateCreatedDescending = 12,
573 DateModifiedAscending = 13,
574 DateModifiedDescending = 14,
575 AttributesAscending = 15,
576 AttributesDescending = 16,
577 FileListFilenameAscending = 17,
578 FileListFilenameDescending = 18,
579 RunCountAscending = 19,
580 RunCountDescending = 20,
581 DateRecentlyChangedAscending = 21,
582 DateRecentlyChangedDescending = 22,
583 DateAccessedAscending = 23,
584 DateAccessedDescending = 24,
585 DateRunAscending = 25,
586 DateRunDescending = 26,
587}
588
589pub const IPC_SORT_MAX: IpcSort = IpcSort::DateRunDescending;
590
591bitflags! {
592 #[repr(transparent)]
593 #[derive(Debug, Copy, Clone, Default)]
594 pub struct Query2RequestFlags: u32 {
600 const NAME = 0x00000001;
602 const PATH = 0x00000002;
604 const FULL_PATH_AND_NAME = 0x00000004;
606 const EXTENSION = 0x00000008;
608 const SIZE = 0x00000010;
610 const DATE_CREATED = 0x00000020;
612 const DATE_MODIFIED = 0x00000040;
614 const DATE_ACCESSED = 0x00000080;
616 const ATTRIBUTES = 0x00000100;
618 const FILE_LIST_FILE_NAME = 0x00000200;
620 const RUN_COUNT = 0x00000400;
622 const DATE_RUN = 0x00000800;
624 const DATE_RECENTLY_CHANGED = 0x00001000;
626 const HIGHLIGHTED_NAME = 0x00002000;
628 const HIGHLIGHTED_PATH = 0x00004000;
630 const HIGHLIGHTED_FULL_PATH_AND_NAME = 0x00008000;
632 }
633}
634
635#[repr(u32)]
637#[derive(Debug, Copy, Clone)]
638pub enum IpcFileInfo {
639 FileSize = 1,
641 FolderSize = 2,
643 DateCreated = 3,
645 DateModified = 4,
647 DateAccessed = 5,
649 Attributes = 6,
651}