Full Code of qgindi/LibreAutomate for AI

master 7121bef44741 cached
768 files
10.8 MB
2.9M tokens
11154 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (11,431K chars total). Download the full file to get everything.
Repository: qgindi/LibreAutomate
Branch: master
Commit: 7121bef44741
Files: 768
Total size: 10.8 MB

Directory structure:
gitextract__t3y79t8/

├── .editorconfig
├── .gitattributes
├── .github/
│   └── FUNDING.yml
├── .gitignore
├── Au/
│   ├── Api/
│   │   ├── Api.cs
│   │   ├── Api^kernel32.cs
│   │   ├── Api^user32.cs
│   │   ├── Api_COM.cs
│   │   ├── Api_UIA.cs
│   │   ├── Api_const.cs
│   │   ├── Api_public.cs
│   │   ├── Cpp.cs
│   │   └── WinRT.cs
│   ├── Au.More/
│   │   ├── AppSingleInstance.cs
│   │   ├── BufferedPaint.cs
│   │   ├── CheckListDialog.cs
│   │   ├── ComUtil.cs
│   │   ├── Convert2.cs
│   │   ├── DebugTraceListener.cs
│   │   ├── Dpi.cs
│   │   ├── FastBuffer.cs
│   │   ├── FileOpenSaveDialog.cs
│   │   ├── GdiTextRenderer.cs
│   │   ├── Hash.cs
│   │   ├── HelpUtil.cs
│   │   ├── HttpServerSession.cs
│   │   ├── IconImageCache.cs
│   │   ├── ImageUtil.cs
│   │   ├── KeyToTextConverter.cs
│   │   ├── Math2.cs
│   │   ├── MemoryBitmap.cs
│   │   ├── MemoryUtil.cs
│   │   ├── MenuItemInfo.cs
│   │   ├── MouseCursor.cs
│   │   ├── RecordingUtil.cs
│   │   ├── ResourceUtil.cs
│   │   ├── SecurityUtil.cs
│   │   ├── WaitableTimer.cs
│   │   ├── WinEventHook.cs
│   │   ├── WindowsHook.cs
│   │   └── WinformsControlNames.cs
│   ├── Au.Types/
│   │   ├── ColorInt.cs
│   │   ├── JSettings.cs
│   │   ├── TreeBase.cs
│   │   ├── common.cs
│   │   ├── exceptions.cs
│   │   ├── param types.cs
│   │   ├── structs.cs
│   │   └── unused/
│   │       └── AuClassless.cs
│   ├── Au.cs
│   ├── Au.csproj
│   ├── Ext/
│   │   ├── Bitmap.Resize.cs
│   │   ├── ExtMisc.cs
│   │   ├── ExtWpf.cs
│   │   └── ExtXml.cs
│   ├── Files, data/
│   │   ├── ExplorerFolder.cs
│   │   ├── FileSystemRedirection.cs
│   │   ├── FileTree.cs
│   │   ├── FileWatcher.cs
│   │   ├── Pidl.cs
│   │   ├── TempFile.cs
│   │   ├── filesystem-types.cs
│   │   ├── filesystem.cs
│   │   ├── filesystem.more.cs
│   │   ├── folders.cs
│   │   ├── icon.cs
│   │   ├── pathname.cs
│   │   ├── shortcutFile.cs
│   │   ├── sqlite.cs
│   │   └── sqlite_api.cs
│   ├── GUI/
│   │   ├── EnumUI.cs
│   │   ├── dialog-static.cs
│   │   ├── dialog-types.cs
│   │   ├── dialog-x-obsolete.cs
│   │   ├── dialog.cs
│   │   ├── osd.cs
│   │   ├── popupMenu/
│   │   │   ├── MTBase.cs
│   │   │   ├── pm acc.cs
│   │   │   ├── pm render.cs
│   │   │   ├── pm types.cs
│   │   │   └── popupMenu.cs
│   │   ├── toolbar/
│   │   │   ├── tb acc.cs
│   │   │   ├── tb dialog.cs
│   │   │   ├── tb man.cs
│   │   │   ├── tb render.cs
│   │   │   ├── tb sat.cs
│   │   │   ├── tb types.cs
│   │   │   ├── tb util.cs
│   │   │   └── toolbar.cs
│   │   ├── trayIcon.cs
│   │   ├── wpf-types.cs
│   │   └── wpfBuilder.cs
│   ├── Input/
│   │   ├── RegisteredHotkey.cs
│   │   ├── clipboard.cs
│   │   ├── clipboardData.cs
│   │   ├── inputBlocker.cs
│   │   ├── keys.cs
│   │   ├── keys.more.cs
│   │   ├── keys_static.cs
│   │   ├── keys_types.cs
│   │   ├── keys_util.cs
│   │   ├── miscInfo.cs
│   │   ├── mouse.cs
│   │   └── mouse_types.cs
│   ├── Internal/
│   │   ├── ActCtx_.cs
│   │   ├── ArrayBuilder_.cs
│   │   ├── AssemblyUtil_.cs
│   │   ├── AttachThreadInput_.cs
│   │   ├── Debug_.cs
│   │   ├── GC_.cs
│   │   ├── GDI misc.cs
│   │   ├── Handle_.cs
│   │   ├── ILReader.cs
│   │   ├── IconString_.cs
│   │   ├── Jit_.cs
│   │   ├── LaDebugger_.cs
│   │   ├── LineWriter_.cs
│   │   ├── MiniProgram_.cs
│   │   ├── NamespaceDoc.cs
│   │   ├── NativeFont_.cs
│   │   ├── NativeScrollbar_.cs
│   │   ├── NativeThread_.cs
│   │   ├── PostToThisThread_.cs
│   │   ├── ProcessStarter_.cs
│   │   ├── Ptr_.cs
│   │   ├── Serializer_.cs
│   │   ├── SharedMemory_.cs
│   │   ├── StaTaskScheduler_.cs
│   │   ├── StringBuilder_.cs
│   │   ├── Util_.cs
│   │   ├── misc_.cs
│   │   └── tables.cs
│   ├── Other/
│   │   ├── PrintServer.cs
│   │   ├── ScriptEditor.cs
│   │   ├── internet.cs
│   │   ├── lastError.cs
│   │   ├── opt.cs
│   │   ├── print.cs
│   │   ├── screen.cs
│   │   ├── script+.cs
│   │   └── script.cs
│   ├── Resources/
│   │   ├── AssemblyInfo.cs
│   │   └── red_cross_cursor.cur
│   ├── String/
│   │   ├── ExtString.cs
│   │   ├── SegParser.cs
│   │   ├── StringUtil.cs
│   │   ├── csvTable.cs
│   │   ├── regexp.cs
│   │   ├── regexp_ExtString.cs
│   │   ├── regexp_types.cs
│   │   └── wildcard.cs
│   ├── System/
│   │   ├── CpuUsage.cs
│   │   ├── ProcessMemory.cs
│   │   ├── computer.cs
│   │   ├── consoleProcess.cs
│   │   ├── osVersion.cs
│   │   ├── process.cs
│   │   ├── run.cs
│   │   ├── sound.cs
│   │   └── uacInfo.cs
│   ├── Time/
│   │   ├── WaitLoop.cs
│   │   ├── perf.cs
│   │   ├── timer.cs
│   │   ├── timer2.cs
│   │   ├── wait.cs
│   │   └── wait_for.cs
│   ├── Triggers/
│   │   ├── Trigger.cs
│   │   ├── Triggers.cs
│   │   ├── TriggersListWindow.cs
│   │   ├── Triggers_actions.cs
│   │   ├── Triggers_hooks.cs
│   │   ├── Triggers_util.cs
│   │   └── Types/
│   │       ├── t-autotext.cs
│   │       ├── t-hotkey.cs
│   │       ├── t-mouse.cs
│   │       └── t-window.cs
│   ├── UI objects/
│   │   ├── CaptureScreen.cs
│   │   ├── OcrGoogleCloud.cs
│   │   ├── OcrMicrosoftAzure.cs
│   │   ├── OcrTesseract.cs
│   │   ├── OcrWin10.cs
│   │   ├── elm.cs
│   │   ├── elmFinder.cs
│   │   ├── elm_func.cs
│   │   ├── elm_types.cs
│   │   ├── ocr.cs
│   │   ├── ocrFinder.cs
│   │   ├── ocr_types.cs
│   │   ├── uiimage.cs
│   │   ├── uiimageFinder.cs
│   │   └── uiimage_types.cs
│   ├── resources/
│   │   └── global2.cs
│   ├── wnd/
│   │   ├── WProp.cs
│   │   ├── WTaskbarButton.cs
│   │   ├── WndCopyData.cs
│   │   ├── WndSavedRect.cs
│   │   ├── WndUtil.cs
│   │   ├── inactive/
│   │   │   └── desktop.cs
│   │   ├── wnd.cs
│   │   ├── wndChildFinder.cs
│   │   ├── wndFinder.cs
│   │   ├── wnd_child.cs
│   │   ├── wnd_find.cs
│   │   ├── wnd_fromxy.cs
│   │   ├── wnd_get.cs
│   │   ├── wnd_other.cs
│   │   ├── wnd_private.cs
│   │   └── wnd_wait.cs
│   └── x/
│       └── NuGet.md
├── Au.AppHost/
│   ├── AppHost.cpp
│   ├── Au.AppHost.vcxproj
│   ├── Au.AppHost.vcxproj.filters
│   ├── ResourceHacker.txt
│   └── coreclrhost.h
├── Au.Controls/
│   ├── Au.Controls.cs
│   ├── Au.Controls.csproj
│   ├── KMenuCommands/
│   │   ├── KMenuCommands+.cs
│   │   └── KMenuCommands.cs
│   ├── KPanels/
│   │   ├── FlexStackPanel.cs
│   │   ├── ILeaf.cs
│   │   ├── KPanels.cs
│   │   ├── _Floating.cs
│   │   ├── _Node.cs
│   │   ├── dock.cs
│   │   ├── stack.cs
│   │   └── tab.cs
│   ├── KScintilla/
│   │   ├── KScintilla.cs
│   │   ├── Sci API.cs
│   │   ├── Sci adapter.cs
│   │   ├── Sci loader.cs
│   │   ├── Sci other.cs
│   │   ├── Sci styles.cs
│   │   ├── Sci text.cs
│   │   ├── SciImages.cs
│   │   ├── SciTags.cs
│   │   ├── SciTextBuilder.cs
│   │   └── other/
│   │       └── KSciInfoBox.cs
│   ├── KTreeView/
│   │   ├── KTreeView.cs
│   │   ├── tv-acc.cs
│   │   ├── tv-hh.cs
│   │   ├── tv-misc.cs
│   │   ├── tv-render.cs
│   │   └── tv-types.cs
│   ├── Simple/
│   │   ├── KCheckBox.cs
│   │   ├── KCheckDropdownBox.cs
│   │   ├── KColorPicker.cs
│   │   ├── KDateTime.cs
│   │   ├── KDialogWindow.cs
│   │   ├── KGroupBox.cs
│   │   ├── KHotkeyControl.cs
│   │   ├── KListBoxItemWithImage.cs
│   │   ├── KPasswordBox.cs
│   │   ├── KPopup.cs
│   │   ├── KPopupListBox.cs
│   │   ├── KScreenComboBox.cs
│   │   ├── KTextBox.cs
│   │   └── KWpfMenu.cs
│   ├── Util, Api/
│   │   ├── HwndHostAccessibleBase_.cs
│   │   ├── KApi.cs
│   │   ├── KExtWpf.cs
│   │   └── KImageUtil.cs
│   └── resources/
│       ├── AssemblyInfo.cs
│       ├── Generic.xaml
│       └── XamlResources.cs
├── Au.Editor/
│   ├── App/
│   │   ├── App-resources.xaml
│   │   ├── App.TrayIcon.cs
│   │   ├── App.cs
│   │   ├── AppSettings.cs
│   │   ├── CommandLine.cs
│   │   ├── DOptions.cs
│   │   ├── MainWindow.cs
│   │   └── Menus.cs
│   ├── Au.Editor.cs
│   ├── Au.Editor.csproj
│   ├── Compiler/
│   │   ├── Compiler.cs
│   │   ├── EditorExtension.cs
│   │   ├── ErrBuilder.cs
│   │   ├── MetaComments.cs
│   │   ├── MetaReferences.cs
│   │   ├── RecentTT.cs
│   │   ├── Run task.cs
│   │   ├── TestInternal.cs
│   │   ├── XCompiled.cs
│   │   ├── XPublish.cs
│   │   └── util/
│   │       ├── CompilerUtil.cs
│   │       └── Compiler_resources.cs
│   ├── Debugger/
│   │   ├── PD-stack.cs
│   │   ├── PD-variables.cs
│   │   ├── PD._Debugger.cs
│   │   ├── PD._MiRecord.cs
│   │   ├── PanelBreakpoints.cs
│   │   └── PanelDebug.cs
│   ├── Default/
│   │   ├── Commands.xml
│   │   ├── Layout.xml
│   │   ├── Snippets.xml
│   │   └── Themes/
│   │       ├── Material dark.csv
│   │       ├── One Monokai dark.csv
│   │       └── Visual Studio dark.csv
│   ├── Edit/
│   │   ├── Ci-types.cs
│   │   ├── CiAutocorrect.cs
│   │   ├── CiCompletion.cs
│   │   ├── CiErrors.cs
│   │   ├── CiFind.cs
│   │   ├── CiFindGo.cs
│   │   ├── CiFolding.cs
│   │   ├── CiGoTo.cs
│   │   ├── CiPopupList.cs
│   │   ├── CiPopupText.cs
│   │   ├── CiProjects.cs
│   │   ├── CiQuickInfo.cs
│   │   ├── CiSignature.cs
│   │   ├── CiSnippets.cs
│   │   ├── CiStyling.cs
│   │   ├── CiText.cs
│   │   ├── CiTools.cs
│   │   ├── CiUtil.cs
│   │   ├── CiUtilExt.cs
│   │   ├── CiWinapi.cs
│   │   ├── CiWorkspace.cs
│   │   ├── CodeExporter.cs
│   │   ├── CodeInfo.cs
│   │   ├── EditGoBack.cs
│   │   ├── GenerateCode.cs
│   │   ├── InsertCode.cs
│   │   ├── ModifyCode.cs
│   │   ├── PanelEdit.cs
│   │   ├── Sci-DD.cs
│   │   ├── Sci-TR.cs
│   │   ├── Sci-images.cs
│   │   ├── SciCode.cs
│   │   ├── SciTheme.cs
│   │   └── SciUndo.cs
│   ├── Files/
│   │   ├── DProperties.cs
│   │   ├── FileNode.cs
│   │   ├── Files+.cs
│   │   ├── FilesModel.cs
│   │   ├── FilesView.cs
│   │   ├── Git.cs
│   │   ├── Save.cs
│   │   ├── SyncWithFilesystem.cs
│   │   └── WorkspaceState.cs
│   ├── LibreAutomate.iss
│   ├── Panels/
│   │   ├── PanelBookmarks.cs
│   │   ├── PanelFiles.cs
│   │   ├── PanelFind.cs
│   │   ├── PanelFound.cs
│   │   ├── PanelHelp.cs
│   │   ├── PanelMouse.cs
│   │   ├── PanelOpen.cs
│   │   ├── PanelOutline.cs
│   │   ├── PanelOutput.cs
│   │   ├── PanelRead.cs
│   │   ├── PanelTasks.cs
│   │   └── Panels.cs
│   ├── Properties/
│   │   └── launchSettings.json
│   ├── Test.cs
│   ├── Tools/
│   │   ├── CapturingWithHotkey.cs
│   │   ├── ColorQuantizer.cs
│   │   ├── DCustomize.cs
│   │   ├── DCustomizeContextMenu.cs
│   │   ├── DEnumFiles.cs
│   │   ├── DIcons.cs
│   │   ├── DInputRecorder.cs
│   │   ├── DPortable.cs
│   │   ├── DPwnd.cs
│   │   ├── DSnippets.cs
│   │   ├── DWinapi.cs
│   │   ├── Delm.cs
│   │   ├── Dnuget.cs
│   │   ├── Docr.cs
│   │   ├── Duiimage.cs
│   │   ├── Dwnd.cs
│   │   ├── InfoWindow.cs
│   │   ├── KSciCodeBox.cs
│   │   ├── KSciCodeBoxWnd.cs
│   │   ├── KTextExpressionBox.cs
│   │   ├── KeysWindow.cs
│   │   ├── QuickCapture.cs
│   │   ├── RegexWindow.cs
│   │   ├── Scripting.cs
│   │   ├── TUtil-main-process.cs
│   │   ├── TUtil.cs
│   │   ├── ToolProcess.cs
│   │   └── WindowFindCodeFormatter.cs
│   ├── Triggers and toolbars/
│   │   ├── DCommandline.cs
│   │   ├── DSchedule.cs
│   │   ├── TT-tb.cs
│   │   ├── TT-triggers.cs
│   │   ├── TT._CodeAnalysis.cs
│   │   ├── TriggersAndToolbars.cs
│   │   └── WinScheduler.cs
│   ├── _prePostBuild.cs
│   ├── resources/
│   │   ├── AssemblyInfo.cs
│   │   ├── Au.manifest
│   │   └── ci/
│   │       ├── Class.xaml
│   │       ├── Constant.xaml
│   │       ├── Delegate.xaml
│   │       ├── Enum.xaml
│   │       ├── EnumMember.xaml
│   │       ├── Event.xaml
│   │       ├── ExpandScope.xaml
│   │       ├── ExtensionMethod.xaml
│   │       ├── Field.xaml
│   │       ├── GroupBy.xaml
│   │       ├── Interface.xaml
│   │       ├── Keyword.xaml
│   │       ├── Label.xaml
│   │       ├── LocalMethod.xaml
│   │       ├── LocalVariable.xaml
│   │       ├── Method.xaml
│   │       ├── Namespace.xaml
│   │       ├── Operator.xaml
│   │       ├── OverlayAbstract.xaml
│   │       ├── OverlayInternal.xaml
│   │       ├── OverlayPrivate.xaml
│   │       ├── OverlayProtected.xaml
│   │       ├── OverlayStatic.xaml
│   │       ├── Property.xaml
│   │       ├── Region.xaml
│   │       ├── Snippet.xaml
│   │       ├── Structure.xaml
│   │       └── TypeParameter.xaml
│   ├── xAI/
│   │   ├── AI search.cs
│   │   ├── AiModel.cs
│   │   ├── McpServer.cs
│   │   └── McpTools.cs
│   ├── xMisc/
│   │   ├── EnvVarUpdater.cs
│   │   ├── Pip.cs
│   │   ├── PipIPC.cs
│   │   ├── RegHotkeys.cs
│   │   └── UacDragDrop.cs
│   └── xUtil/
│       ├── Downloader.cs
│       ├── Ed util shared.cs
│       ├── Ed util.cs
│       ├── EdExt.cs
│       ├── EdIcons.cs
│       ├── Libs/
│       │   ├── DiffMatchPatch.cs
│       │   └── EnglishPorter2Stemmer.cs
│       ├── MetaCommentsParser.cs
│       ├── NugetDownloader.cs
│       └── RegexParser.cs
├── Au.sln
├── Cookbook/
│   └── files.xml
├── Cpp/
│   ├── Cpp.cpp
│   ├── Cpp.def
│   ├── Cpp.h
│   ├── Cpp.manifest
│   ├── Cpp.rc
│   ├── Cpp.vcxproj
│   ├── Cpp.vcxproj.filters
│   ├── IAccessible2.h
│   ├── ISimpleDOMDocument.h
│   ├── ISimpleDOMNode.h
│   ├── ISimpleDOMText.h
│   ├── JAB.h
│   ├── MemoryPool.cpp
│   ├── MemoryPool.h
│   ├── Util.cpp
│   ├── acc bridge.cpp
│   ├── acc find.cpp
│   ├── acc func.cpp
│   ├── acc get.cpp
│   ├── acc java.cpp
│   ├── acc uia.cpp
│   ├── acc web.cpp
│   ├── acc workaround.cpp
│   ├── acc.h
│   ├── in-proc.cpp
│   ├── internal.h
│   ├── other.cpp
│   ├── rejected.cpp
│   ├── resource.h
│   ├── stdafx.cpp
│   ├── stdafx.h
│   ├── str.cpp
│   ├── str.h
│   ├── test Uia.cpp
│   ├── test.cpp
│   └── util.h
├── LICENSE.txt
├── Libraries/
│   ├── PCRE/
│   │   ├── PCRE.vcxproj
│   │   ├── PCRE.vcxproj.filters
│   │   ├── config.h
│   │   ├── pcre2.h
│   │   ├── pcre2_auto_possess.c
│   │   ├── pcre2_chartables.c
│   │   ├── pcre2_chkdint.c
│   │   ├── pcre2_compile.c
│   │   ├── pcre2_compile.h
│   │   ├── pcre2_compile_class.c
│   │   ├── pcre2_config.c
│   │   ├── pcre2_context.c
│   │   ├── pcre2_error.c
│   │   ├── pcre2_extuni.c
│   │   ├── pcre2_find_bracket.c
│   │   ├── pcre2_internal.h
│   │   ├── pcre2_intmodedep.h
│   │   ├── pcre2_maketables.c
│   │   ├── pcre2_match.c
│   │   ├── pcre2_match_data.c
│   │   ├── pcre2_newline.c
│   │   ├── pcre2_ord2utf.c
│   │   ├── pcre2_pattern_info.c
│   │   ├── pcre2_script_run.c
│   │   ├── pcre2_serialize.c
│   │   ├── pcre2_string_utils.c
│   │   ├── pcre2_study.c
│   │   ├── pcre2_substring.c
│   │   ├── pcre2_tables.c
│   │   ├── pcre2_ucd.c
│   │   ├── pcre2_ucp.h
│   │   ├── pcre2_ucptables.c
│   │   ├── pcre2_util.h
│   │   ├── pcre2_valid_utf.c
│   │   └── pcre2_xclass.c
│   └── scintilla/
│       ├── .editorconfig
│       ├── include/
│       │   ├── ILexer.h
│       │   ├── ILoader.h
│       │   ├── Sci_Position.h
│       │   ├── Scintilla.iface
│       │   ├── ScintillaCall.h
│       │   ├── ScintillaMessages.h
│       │   ├── ScintillaStructures.h
│       │   ├── ScintillaTypes.h
│       │   ├── ScintillaWidget.h
│       │   └── scintilla.h
│       ├── src/
│       │   ├── AutoComplete.cxx
│       │   ├── AutoComplete.h
│       │   ├── CallTip.cxx
│       │   ├── CallTip.h
│       │   ├── CaseConvert.cxx
│       │   ├── CaseConvert.h
│       │   ├── CaseFolder.cxx
│       │   ├── CaseFolder.h
│       │   ├── CellBuffer.cxx
│       │   ├── CellBuffer.h
│       │   ├── ChangeHistory.cxx
│       │   ├── ChangeHistory.h
│       │   ├── CharClassify.cxx
│       │   ├── CharClassify.h
│       │   ├── CharacterCategoryMap.cxx
│       │   ├── CharacterCategoryMap.h
│       │   ├── CharacterType.cxx
│       │   ├── CharacterType.h
│       │   ├── ContractionState.cxx
│       │   ├── ContractionState.h
│       │   ├── DBCS.cxx
│       │   ├── DBCS.h
│       │   ├── Debugging.h
│       │   ├── Decoration.cxx
│       │   ├── Decoration.h
│       │   ├── Document.cxx
│       │   ├── Document.h
│       │   ├── EditModel.cxx
│       │   ├── EditModel.h
│       │   ├── EditView.cxx
│       │   ├── EditView.h
│       │   ├── Editor.cxx
│       │   ├── Editor.h
│       │   ├── ElapsedPeriod.h
│       │   ├── Geometry.cxx
│       │   ├── Geometry.h
│       │   ├── Indicator.cxx
│       │   ├── Indicator.h
│       │   ├── KeyMap.cxx
│       │   ├── KeyMap.h
│       │   ├── LineMarker.cxx
│       │   ├── LineMarker.h
│       │   ├── MarginView.cxx
│       │   ├── MarginView.h
│       │   ├── Partitioning.h
│       │   ├── PerLine.cxx
│       │   ├── PerLine.h
│       │   ├── Platform.h
│       │   ├── Position.h
│       │   ├── PositionCache.cxx
│       │   ├── PositionCache.h
│       │   ├── RESearch.cxx
│       │   ├── RESearch.h
│       │   ├── RunStyles.cxx
│       │   ├── RunStyles.h
│       │   ├── ScintillaBase.cxx
│       │   ├── ScintillaBase.h
│       │   ├── Selection.cxx
│       │   ├── Selection.h
│       │   ├── SparseVector.h
│       │   ├── SplitVector.h
│       │   ├── Style.cxx
│       │   ├── Style.h
│       │   ├── UndoHistory.cxx
│       │   ├── UndoHistory.h
│       │   ├── UniConversion.cxx
│       │   ├── UniConversion.h
│       │   ├── UniqueString.cxx
│       │   ├── UniqueString.h
│       │   ├── ViewStyle.cxx
│       │   ├── ViewStyle.h
│       │   ├── XPM.cxx
│       │   └── XPM.h
│       ├── version.txt
│       └── win32/
│           ├── HanjaDic.cxx
│           ├── HanjaDic.h
│           ├── ListBox.cxx
│           ├── ListBox.h
│           ├── PlatWin.cxx
│           ├── PlatWin.h
│           ├── ScintRes.rc
│           ├── Scintilla.def
│           ├── Scintilla.vcxproj
│           ├── ScintillaDLL.cxx
│           ├── ScintillaWin.cxx
│           ├── ScintillaWin.h
│           ├── SurfaceD2D.cxx
│           ├── SurfaceD2D.h
│           ├── SurfaceGDI.cxx
│           ├── SurfaceGDI.h
│           └── WinTypes.h
├── Notes.txt
├── Other/
│   ├── Au.DllHost/
│   │   ├── Au.DllHost.vcxproj
│   │   ├── Au.DllHost.vcxproj.filters
│   │   └── DllHost.c
│   ├── Au.Net4/
│   │   ├── App.config
│   │   ├── Au.Net4.csproj
│   │   ├── Net4.cs
│   │   ├── Properties/
│   │   │   └── AssemblyInfo.cs
│   │   └── TypelibConverter.cs
│   ├── BuildEvents/
│   │   ├── Au.TestInternal.cs
│   │   ├── BuildEvents.cs
│   │   ├── BuildEvents.csproj
│   │   ├── GitBinaryFiles.cs
│   │   ├── Readme - Roslyn.txt
│   │   └── Sftp.cs
│   ├── DatabasesEtc/
│   │   ├── DatabasesEtc.csproj
│   │   ├── Icons.cs
│   │   ├── Program.cs
│   │   ├── RefAndDoc.cs
│   │   └── RefTxt.cs
│   └── DocFX/
│       ├── DocFX.csproj
│       └── _doc/
│           ├── .gitignore
│           ├── api/
│           │   ├── .gitignore
│           │   └── index.md
│           ├── articles/
│           │   ├── Caller info parameter.md
│           │   ├── Key names and operators.md
│           │   ├── Library.md
│           │   ├── Output tags.md
│           │   ├── UAC.md
│           │   ├── UI element issues.md
│           │   ├── Wait timeout.md
│           │   ├── Wildcard expression.md
│           │   ├── index.md
│           │   └── toc.yml
│           ├── changes/
│           │   ├── future.md
│           │   ├── old/
│           │   │   ├── v0.1.md
│           │   │   ├── v0.10.md
│           │   │   ├── v0.11.md
│           │   │   ├── v0.12.md
│           │   │   ├── v0.13.md
│           │   │   ├── v0.14.md
│           │   │   ├── v0.15.md
│           │   │   ├── v0.16.md
│           │   │   ├── v0.17.md
│           │   │   ├── v0.18.md
│           │   │   ├── v0.19.md
│           │   │   ├── v0.2.md
│           │   │   ├── v0.3.md
│           │   │   ├── v0.4.md
│           │   │   ├── v0.5.md
│           │   │   ├── v0.6.md
│           │   │   ├── v0.7.md
│           │   │   ├── v0.8.md
│           │   │   ├── v0.9.md
│           │   │   ├── v1.0.md
│           │   │   ├── v1.1.md
│           │   │   ├── v1.2.md
│           │   │   ├── v1.3.md
│           │   │   ├── v1.4.md
│           │   │   ├── v1.5.md
│           │   │   ├── v1.6.md
│           │   │   ├── v1.7.md
│           │   │   ├── v1.8.md
│           │   │   └── v1.9.md
│           │   ├── template.md
│           │   ├── v1.10.md
│           │   ├── v1.11.md
│           │   ├── v1.12.md
│           │   ├── v1.13.md
│           │   ├── v1.14.md
│           │   └── v1.15.md
│           ├── docfx.json
│           ├── editor/
│           │   ├── Application.md
│           │   ├── Class files, projects.md
│           │   ├── Code editor.md
│           │   ├── Command line.md
│           │   ├── Compared with QM.md
│           │   ├── Creating exe programs.md
│           │   ├── Debugger.md
│           │   ├── File properties.md
│           │   ├── Git, backup, sync.md
│           │   ├── Icons.md
│           │   ├── LA and AI.md
│           │   ├── Menu commands.md
│           │   ├── NuGet.md
│           │   ├── PiP session.md
│           │   ├── Portable app.md
│           │   ├── Scripts.md
│           │   ├── Settings.md
│           │   ├── Snippets.md
│           │   └── toc.yml
│           ├── filter.yml
│           ├── index.md
│           ├── md-styles.css
│           ├── misc/
│           │   └── privacy-policy.md
│           ├── template1/
│           │   ├── layout/
│           │   │   └── _master.tmpl
│           │   ├── mod.txt
│           │   ├── partials/
│           │   │   ├── class.header.tmpl.partial
│           │   │   ├── footer.tmpl.partial
│           │   │   ├── logo.tmpl.partial
│           │   │   ├── namespace.tmpl.partial
│           │   │   └── navbar.tmpl.partial
│           │   └── styles/
│           │       ├── main.css
│           │       └── main.js
│           ├── template2/
│           │   └── partials/
│           │       ├── collection.tmpl.partial
│           │       └── item.tmpl.partial
│           └── toc.yml
├── README.md
├── Scripts/
│   ├── @Au docs/
│   │   ├── Au docs.cs
│   │   ├── AuDocs analyze.cs
│   │   ├── AuDocs cookbook.cs
│   │   ├── AuDocs other tasks.cs
│   │   ├── AuDocs text.cs
│   │   ├── AuDocs.cs
│   │   ├── LA docs doc-html.db.cs
│   │   ├── LA docs toc.json.cs
│   │   ├── LA menu doc.cs
│   │   └── Readme.txt
│   ├── @WinAPI converter/
│   │   ├── WinAPI converter.cs
│   │   ├── WinApiConverter+.cs
│   │   └── WinApiConverter.cs
│   ├── AuDocsLib.cs
│   ├── Create NuGet package.cs
│   ├── LA docs for AI/
│   │   ├── AI summaries.cs
│   │   └── Upload AI embeddings.cs
│   ├── Minimal .NET SDK.cs
│   ├── Update version.txt.cs
│   └── old/
│       ├── VS goto.cs
│       └── Windows SDK to C#/
│           ├── @SDK converter/
│           │   ├── Classes.cs
│           │   ├── Constants.cs
│           │   ├── Converter.cs
│           │   ├── Expr.cs
│           │   ├── Functions.cs
│           │   ├── Parameters.cs
│           │   ├── SDK converter.cs
│           │   ├── Tokenize.cs
│           │   ├── Types.cs
│           │   └── Util.cs
│           ├── Readme.txt
│           └── Scripts/
│               ├── SDK append 32-bit diff.cs
│               ├── SDK create database.cs
│               ├── SDK headers.h
│               ├── SDK preprocessor.cs
│               ├── SdkUtil.cs
│               └── once/
│                   ├── SDK get GUID.cs
│                   └── SDK get dll names.cs
├── _/
│   ├── default.exe.manifest
│   ├── dotnet_ref_editor.txt
│   ├── dotnet_ref_task.txt
│   └── gitBinaryRestore.csv
└── global.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
[*.{cs,vb}]

# IDE0032: Use auto property
dotnet_style_prefer_auto_properties = false:silent

# CA1416: Validate platform compatibility
dotnet_diagnostic.CA1416.severity = none

# CA1806: Do not ignore method results
dotnet_diagnostic.CA1806.severity = silent

# CA2014: Do not use stackalloc in loops
dotnet_diagnostic.CA2014.severity = warning

# CS1573: Parameter has no matching param tag in the XML comment (but other parameters do)
dotnet_diagnostic.CS1573.severity = suggestion

[*]
charset = utf-8

[*.iss]
charset = utf-8-bom


================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following 
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln       merge=binary
#*.csproj    merge=binary
#*.vbproj    merge=binary
#*.vcxproj   merge=binary
#*.vcproj    merge=binary
#*.dbproj    merge=binary
#*.fsproj    merge=binary
#*.lsproj    merge=binary
#*.wixproj   merge=binary
#*.modelproj merge=binary
#*.sqlproj   merge=binary
#*.wwaproj   merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg   binary
#*.png   binary
#*.gif   binary
###############################################################################
/Libraries/** linguist-vendored
###############################################################################


================================================
FILE: .github/FUNDING.yml
================================================
github: qgindi


================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
build/
bld/
[Bb]in/
[Oo]bj/

# Visual Studio 2015 cache/options directory
.vs/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# DNX
project.lock.json
artifacts/

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
## _TODO: Comment the next line if you want to checkin your
## web deploy settings but do note that will include unencrypted
## passwords
#*.pubxml

*.publishproj

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.snk
*.publishsettings
node_modules/
orleans.codegen.cs

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

# Au
/Other/Api/

/Libraries/PCRE/excluded/

/_/*
!/_/Default/
!/_/Templates/
!/_/*.manifest
!/_/dotnet_ref_*.txt
!/_/gitBinaryRestore.csv

!/_/32/
/_/32/*
!/_/32/7za.exe

/_/Default/*
!/_/Default/Workspace/

/_/Default/Workspace/*
!/_/Default/Workspace/files/
!/_/Default/Workspace/files.xml
!/_/Default/Workspace/state.db

/_/Templates/*
!/_/Templates/files/
!/_/Templates/files.xml

/Cookbook/*
!/Cookbook/files/
!/Cookbook/files.xml

*.bak
/Au/global.json
.tools/
/Other/DocFX/_doc/cookbook
/Au.Editor/Panels/PanelRead-WB.cs


================================================
FILE: Au/Api/Api.cs
================================================
//[assembly: DefaultDllImportSearchPaths(DllImportSearchPath.System32|DllImportSearchPath.UserDirectories)]

#pragma warning disable 649, 169 //field never assigned/used

namespace Au.Types;

//[DebuggerStepThrough]
static unsafe partial class Api {
	#region util
	
	/// <summary>
	/// Gets the native size of a struct variable.
	/// Returns <c>Marshal.SizeOf(typeof(T))</c>.
	/// Speed: the same (in Release config) as <c>Marshal.SizeOf(typeof(T))</c>, and 2 times faster than <c>Marshal.SizeOf(v)</c>.
	/// </summary>
	internal static int SizeOf<T>(T v) => Marshal.SizeOf<T>();
	
	/// <summary>
	/// Gets the native size of a type.
	/// Returns <c>Marshal.SizeOf(typeof(T))</c>.
	/// </summary>
	internal static int SizeOf<T>() => Marshal.SizeOf<T>();
	
	/// <summary>
	/// Gets dll module handle (<c>GetModuleHandle</c>) or loads dll (<c>NativeLibrary.TryLoad</c>), and returns unmanaged exported function address (<c>GetProcAddress</c>).
	/// See also: <c>GetDelegate</c>.
	/// </summary>
	internal static IntPtr GetProcAddress(string dllName, string funcName) {
		IntPtr hmod = GetModuleHandle(dllName);
		if (hmod == default && !NativeLibrary.TryLoad(dllName, out hmod)) return default;
		
		return GetProcAddress(hmod, funcName);
	}
	
	/// <summary>
	/// Calls <see cref="GetProcAddress(string, string)"/> (loads dll or gets handle) and <see cref="Marshal.GetDelegateForFunctionPointer{TDelegate}(IntPtr)"/>.
	/// </summary>
	internal static bool GetDelegate<T>(out T deleg, string dllName, string funcName) where T : class {
		IntPtr fa = GetProcAddress(dllName, funcName); if (fa == default) { deleg = null; return false; }
		deleg = Marshal.GetDelegateForFunctionPointer<T>(fa);
		return deleg != null;
	}
	
	/// <summary>
	/// Calls API <see cref="GetProcAddress(IntPtr, string)"/> and <see cref="Marshal.GetDelegateForFunctionPointer{TDelegate}(IntPtr)"/>.
	/// </summary>
	internal static bool GetDelegate<T>(out T deleg, IntPtr hModule, string funcName) where T : class {
		deleg = null;
		IntPtr fa = GetProcAddress(hModule, funcName); if (fa == default) return false;
		deleg = Marshal.GetDelegateForFunctionPointer<T>(fa);
		return deleg != null;
	}
	
	/// <summary>
	/// If <i>o</i> is not <c>null</c>, calls <see cref="Marshal.ReleaseComObject"/>.
	/// </summary>
	internal static void ReleaseComObject<T>(T o) where T : class {
		if (o != null) Marshal.ReleaseComObject(o);
	}
	
	#endregion
	
	#region gdi32
	
	[DllImport("gdi32.dll")] //this and many other GDI functions don't use SetLastError
	internal static extern bool DeleteObject(IntPtr ho);
	
	[DllImport("gdi32.dll")]
	internal static extern IntPtr CreateRectRgn(int x1, int y1, int x2, int y2);
	
	internal const int RGN_AND = 1;
	internal const int RGN_OR = 2;
	internal const int RGN_XOR = 3;
	internal const int RGN_DIFF = 4;
	internal const int RGN_COPY = 5;
	
	[DllImport("gdi32.dll")]
	internal static extern int CombineRgn(IntPtr hrgnDst, IntPtr hrgnSrc1, IntPtr hrgnSrc2, int iMode);
	
	[DllImport("gdi32.dll")]
	internal static extern bool SetRectRgn(IntPtr hrgn, int left, int top, int right, int bottom);
	
	[DllImport("gdi32.dll")]
	internal static extern IntPtr CreateRectRgnIndirect(in RECT lprect);
	
	[DllImport("gdi32.dll")]
	internal static extern bool PtInRegion(IntPtr hrgn, int x, int y);
	
	[DllImport("gdi32.dll")]
	internal static extern IntPtr CreateCompatibleDC(IntPtr hdc);
	
	[DllImport("gdi32.dll")]
	internal static extern bool DeleteDC(IntPtr hdc);
	
	[DllImport("gdi32.dll")]
	internal static extern IntPtr SelectObject(IntPtr hdc, IntPtr h);
	
	[DllImport("gdi32.dll", EntryPoint = "GetObjectW")]
	internal static extern int GetObject(IntPtr h, int c, void* pv);
	
	/// <param name="mode">1 transparent, 2 opaque.</param>
	[DllImport("gdi32.dll")]
	internal static extern int SetBkMode(IntPtr hdc, int mode);
	
	[DllImport("gdi32.dll")]
	internal static extern int SetBkColor(IntPtr hdc, int color);
	
	[DllImport("gdi32.dll", EntryPoint = "TextOutW")]
	internal static extern bool TextOut(IntPtr hdc, int x, int y, string lpString, int c);
	
	[DllImport("gdi32.dll", EntryPoint = "TextOutW")]
	internal static extern bool TextOut(IntPtr hdc, int x, int y, char* lpString, int c);
	
	[DllImport("gdi32.dll", EntryPoint = "ExtTextOutW")]
	internal static extern bool ExtTextOut(IntPtr hdc, int x, int y, uint options, in RECT lprect, char* lpString, int c, int* lpDx = null);
	internal const uint ETO_CLIPPED = 0x4;
	
	[DllImport("gdi32.dll")]
	internal static extern bool MoveToEx(IntPtr hdc, int x, int y, out POINT lppt);
	
	[DllImport("gdi32.dll")]
	internal static extern bool GetCurrentPositionEx(IntPtr hdc, out POINT lppt);
	
	[DllImport("gdi32.dll")]
	internal static extern uint SetTextAlign(IntPtr hdc, uint align);
	
	[DllImport("gdi32.dll")]
	internal static extern int SetTextColor(IntPtr hdc, int color);
	
	[DllImport("gdi32.dll")]
	internal static extern IntPtr CreatePen(int iStyle, int cWidth, int color);
	
	[DllImport("gdi32.dll")]
	internal static extern bool LineTo(IntPtr hdc, int x, int y);
	
	[DllImport("gdi32.dll")] //tested: does not set last error
	internal static extern IntPtr CreateCompatibleBitmap(IntPtr hdc, int cx, int cy);
	
	[DllImport("gdi32.dll")]
	internal static extern int GetDeviceCaps(IntPtr hdc, int index);
	
	[DllImport("gdi32.dll", EntryPoint = "GetTextExtentPoint32W")]
	internal static extern bool GetTextExtentPoint32(IntPtr hdc, string lpString, int c, out SIZE psizl);
	
	[DllImport("gdi32.dll", EntryPoint = "GetTextExtentPoint32W")]
	internal static extern bool GetTextExtentPoint32(IntPtr hdc, char* lpString, int c, out SIZE psizl);
	
	[DllImport("gdi32.dll", EntryPoint = "CreateFontW")]
	internal static extern IntPtr CreateFont(int cHeight, int cWidth = 0, int cEscapement = 0, int cOrientation = 0, int cWeight = 0, int bItalic = 0, int bUnderline = 0, int bStrikeOut = 0, int iCharSet = 0, int iOutPrecision = 0, int iClipPrecision = 0, int iQuality = 0, int iPitchAndFamily = 0, string pszFaceName = null);
	
	[DllImport("gdi32.dll", EntryPoint = "CreateFontIndirectW")]
	internal static extern IntPtr CreateFontIndirect(in LOGFONT lplf);
	
	internal const uint SRCCOPY = 0xCC0020;
	internal const uint CAPTUREBLT = 0x40000000;
	
	[DllImport("gdi32.dll")] //tested: in some cases does not set last error even if returns false
	internal static extern bool BitBlt(IntPtr hdc, int x, int y, int cx, int cy, IntPtr hdcSrc, int x1, int y1, uint rop);
	
	[DllImport("gdi32.dll")]
	internal static extern bool StretchBlt(IntPtr hdcDest, int xDest, int yDest, int wDest, int hDest, IntPtr hdcSrc, int xSrc, int ySrc, int wSrc, int hSrc, uint rop);
	
	[DllImport("gdi32.dll")]
	internal static extern IntPtr CreateDIBSection(IntPtr hdc, in Api.BITMAPINFO pbmi, uint usage, out uint* ppvBits, IntPtr hSection = default, uint offset = 0);
	
	internal struct BITMAPINFOHEADER {
		public int biSize;
		public int biWidth;
		public int biHeight;
		public ushort biPlanes;
		public ushort biBitCount;
		public int biCompression;
		public int biSizeImage;
		public int biXPelsPerMeter;
		public int biYPelsPerMeter;
		public int biClrUsed;
		public int biClrImportant;
	}
	
	/// <summary>
	/// <c>BITMAPINFOHEADER</c> members and 3 uints for color table etc.
	/// </summary>
	internal struct BITMAPINFO {
		public readonly int biSize;
		public int biWidth;
		public int biHeight;
		public ushort biPlanes;
		public ushort biBitCount;
		public int biCompression;
		public int biSizeImage;
		public int biXPelsPerMeter;
		public int biYPelsPerMeter;
		public int biClrUsed;
		public int biClrImportant;
		public fixed uint bmiColors[3]; //info: GetDIBits(DIB_RGB_COLORS) sets 0xFF0000, 0xFF00, 0xFF. Note: with 8-bit colors bitmaps need 256, but this library does not use it.
		
		/// <summary>
		/// Sets <c>biSize=sizeof(BITMAPINFOHEADER)</c>. Note: it is less than <c>sizeof(BITMAPINFO)</c>.
		/// </summary>
		public BITMAPINFO() { biSize = sizeof(BITMAPINFOHEADER); }
		
		/// <summary>
		/// Sets width/height/bitcount/planes fields. Sets <c>biSize=sizeof(BITMAPINFOHEADER)</c>. Note: it is less than <c>sizeof(BITMAPINFO)</c>.
		/// </summary>
		public BITMAPINFO(int width, int height, int bitCount = 32) {
			biSize = sizeof(BITMAPINFOHEADER);
			biWidth = width;
			biHeight = height;
			biBitCount = (ushort)bitCount;
			biPlanes = 1;
		}
		
		//little tested
		///// <summary>
		///// Gets DIB bits of compatible bitmap. Uses API <ms>GetDIBits</ms>. Returns <c>null</c> if failed.
		///// </summary>
		///// <param name="hb">Bitmap handle.</param>
		///// <param name="topDown">Create top-down DIB.</param>
		///// <param name="dc">Eg <see cref="ScreenDC_"/>.</param>
		///// <param name="palColors">Use DIB_PAL_COLORS.</param>
		//public byte[] GetBitmapBits(IntPtr hb, bool topDown, IntPtr dc, bool palColors = false) {
		//	biBitCount = 0; //biBitCount=(ushort)bitCount; //somehow fails if bitCount is 32 and bitmap is 32-bit
		//	if (0 == GetDIBits(dc, hb, 0, 0, null, ref this, palColors ? 1 : 0)) return null;
		//	var r = new byte[biSizeImage];
		//	fixed (byte* p = r) {
		//		int hei = biHeight; if (topDown) biHeight = -hei;
		//		var k = GetDIBits(dc, hb, 0, hei, p, ref this, palColors ? 1 : 0);
		//		biHeight = hei;
		//		if (k == 0) return null;
		//	}
		//	return r;
		//}
	}
	
	[DllImport("gdi32.dll")]
	internal static extern int GetDIBits(IntPtr hdc, IntPtr hbm, int start, int cLines, void* lpvBits, ref BITMAPINFO lpbmi, int usage);
	
	/// <summary>
	/// lpbmi can be <c>BITMAPINFOHEADER</c>/<c>BITMAPV5HEADER</c> or <c>BITMAPCOREHEADER</c>.
	/// </summary>
	[DllImport("gdi32.dll")]
	internal static extern int SetDIBitsToDevice(IntPtr hdc, int xDest, int yDest, int w, int h, int xSrc, int ySrc, int StartScan, int cLines, void* lpvBits, void* lpbmi, uint ColorUse = 0); //DIB_RGB_COLORS
	
	//internal const int WHITE_BRUSH = 0;
	//internal const int LTGRAY_BRUSH = 1;
	//internal const int GRAY_BRUSH = 2;
	//internal const int DKGRAY_BRUSH = 3;
	//internal const int BLACK_BRUSH = 4;
	//internal const int NULL_BRUSH = 5;
	//internal const int HOLLOW_BRUSH = 5;
	//internal const int WHITE_PEN = 6;
	//internal const int BLACK_PEN = 7;
	//internal const int NULL_PEN = 8;
	//internal const int OEM_FIXED_FONT = 10;
	//internal const int ANSI_FIXED_FONT = 11;
	//internal const int ANSI_VAR_FONT = 12;
	//internal const int SYSTEM_FONT = 13;
	//internal const int DEVICE_DEFAULT_FONT = 14;
	//internal const int DEFAULT_PALETTE = 15;
	//internal const int SYSTEM_FIXED_FONT = 16;
	//internal const int DEFAULT_GUI_FONT = 17;
	//internal const int DC_BRUSH = 18;
	//internal const int DC_PEN = 19;
	
	[DllImport("gdi32.dll")]
	internal static extern IntPtr GetStockObject(int i);
	
	[DllImport("gdi32.dll")]
	internal static extern IntPtr CreateSolidBrush(int color);
	
	[DllImport("gdi32.dll")]
	internal static extern int IntersectClipRect(IntPtr hdc, int left, int top, int right, int bottom);
	
	internal struct LOGFONT {
		public int lfHeight;
		public int lfWidth;
		public int lfEscapement;
		public int lfOrientation;
		public int lfWeight;
		public byte lfItalic;
		public byte lfUnderline;
		public byte lfStrikeOut;
		public byte lfCharSet;
		public byte lfOutPrecision;
		public byte lfClipPrecision;
		public byte lfQuality;
		public byte lfPitchAndFamily;
		public fixed char lfFaceName[32];
	}
	
	internal struct NONCLIENTMETRICS {
		public int cbSize;
		public int iBorderWidth;
		public int iScrollWidth;
		public int iScrollHeight;
		public int iCaptionWidth;
		public int iCaptionHeight;
		public LOGFONT lfCaptionFont;
		public int iSmCaptionWidth;
		public int iSmCaptionHeight;
		public LOGFONT lfSmCaptionFont;
		public int iMenuWidth;
		public int iMenuHeight;
		public LOGFONT lfMenuFont;
		public LOGFONT lfStatusFont;
		public LOGFONT lfMessageFont;
		public int iPaddedBorderWidth;
	}
	
	[DllImport("gdi32.dll")] //does not set last error when fails
	internal static extern uint GetPixel(IntPtr hdc, int x, int y);
	
	#endregion
	
	#region advapi32
	
	[DllImport("advapi32.dll")]
	internal static extern int RegSetValueEx(IntPtr hKey, string lpValueName, int Reserved, Microsoft.Win32.RegistryValueKind dwType, void* lpData, int cbData);
	
	[DllImport("advapi32.dll")]
	internal static extern int RegQueryValueEx(IntPtr hKey, string lpValueName, IntPtr Reserved, out Microsoft.Win32.RegistryValueKind dwType, void* lpData, ref int cbData);
	
	internal const uint TOKEN_WRITE = STANDARD_RIGHTS_WRITE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT;
	internal const uint TOKEN_SOURCE_LENGTH = 8;
	internal const uint TOKEN_READ = STANDARD_RIGHTS_READ | TOKEN_QUERY;
	internal const uint TOKEN_QUERY_SOURCE = 16;
	internal const uint TOKEN_QUERY = 8;
	internal const uint TOKEN_IMPERSONATE = 4;
	internal const uint TOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE;
	internal const uint TOKEN_DUPLICATE = 2;
	internal const uint TOKEN_AUDIT_SUCCESS_INCLUDE = 1;
	internal const uint TOKEN_AUDIT_SUCCESS_EXCLUDE = 2;
	internal const uint TOKEN_AUDIT_FAILURE_INCLUDE = 4;
	internal const uint TOKEN_AUDIT_FAILURE_EXCLUDE = 8;
	internal const uint TOKEN_ASSIGN_PRIMARY = 1;
	internal const uint TOKEN_ALL_ACCESS_P = STANDARD_RIGHTS_REQUIRED | TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_QUERY_SOURCE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT;
	internal const uint TOKEN_ALL_ACCESS = TOKEN_ALL_ACCESS_P | TOKEN_ADJUST_SESSIONID;
	internal const uint TOKEN_ADJUST_SESSIONID = 256;
	internal const uint TOKEN_ADJUST_PRIVILEGES = 32;
	internal const uint TOKEN_ADJUST_GROUPS = 64;
	internal const uint TOKEN_ADJUST_DEFAULT = 128;
	
	[DllImport("advapi32.dll", SetLastError = true)]
	internal static extern bool OpenProcessToken(IntPtr ProcessHandle, uint DesiredAccess, out Handle_ TokenHandle);
	
	internal enum TOKEN_INFORMATION_CLASS {
		TokenUser = 1,
		TokenGroups,
		TokenPrivileges,
		TokenOwner,
		TokenPrimaryGroup,
		TokenDefaultDacl,
		TokenSource,
		TokenType,
		TokenImpersonationLevel,
		TokenStatistics,
		TokenRestrictedSids,
		TokenSessionId,
		TokenGroupsAndPrivileges,
		TokenSessionReference,
		TokenSandBoxInert,
		TokenAuditPolicy,
		TokenOrigin,
		TokenElevationType,
		TokenLinkedToken,
		TokenElevation,
		TokenHasRestrictions,
		TokenAccessInformation,
		TokenVirtualizationAllowed,
		TokenVirtualizationEnabled,
		TokenIntegrityLevel,
		TokenUIAccess,
		TokenMandatoryPolicy,
		TokenLogonSid,
		//Win8
		TokenIsAppContainer,
		TokenCapabilities,
		TokenAppContainerSid,
		TokenAppContainerNumber,
		TokenUserClaimAttributes,
		TokenDeviceClaimAttributes,
		TokenRestrictedUserClaimAttributes,
		TokenRestrictedDeviceClaimAttributes,
		TokenDeviceGroups,
		TokenRestrictedDeviceGroups,
		TokenSecurityAttributes,
		TokenIsRestricted,
		TokenProcessTrustLevel,
		TokenPrivateNameSpace,
		MaxTokenInfoClass  // MaxTokenInfoClass should always be the last enum
	}
	
	[DllImport("advapi32.dll", SetLastError = true)]
	internal static extern bool GetTokenInformation(HandleRef TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, void* TokenInformation, uint TokenInformationLength, out uint ReturnLength);
	
	[DllImport("advapi32.dll")]
	internal static extern byte* GetSidSubAuthorityCount(IntPtr pSid);
	
	[DllImport("advapi32.dll")]
	internal static extern uint* GetSidSubAuthority(IntPtr pSid, uint nSubAuthority);
	
	internal enum SECURITY_IMPERSONATION_LEVEL {
		SecurityAnonymous,
		SecurityIdentification,
		SecurityImpersonation,
		SecurityDelegation
	}
	
	internal enum TOKEN_TYPE {
		TokenPrimary = 1,
		TokenImpersonation
	}
	
	[DllImport("advapi32.dll", SetLastError = true)]
	internal static extern bool DuplicateTokenEx(IntPtr hExistingToken, uint dwDesiredAccess, SECURITY_ATTRIBUTES lpTokenAttributes, SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, TOKEN_TYPE TokenType, out IntPtr phNewToken);
	
	[DllImport("advapi32.dll", SetLastError = true)]
	internal static extern bool CreateProcessWithTokenW(IntPtr hToken, uint dwLogonFlags, string lpApplicationName, char[] lpCommandLine, uint dwCreationFlags, string lpEnvironment, string lpCurrentDirectory, in STARTUPINFO lpStartupInfo, out PROCESS_INFORMATION lpProcessInformation);
	
	internal struct LUID {
		public uint LowPart;
		public int HighPart;
	}
	
	[DllImport("advapi32.dll", EntryPoint = "LookupPrivilegeValueW", SetLastError = true)]
	internal static extern bool LookupPrivilegeValue(string lpSystemName, string lpName, out LUID lpLuid);
	
	[StructLayout(LayoutKind.Sequential, Pack = 4)]
	internal struct LUID_AND_ATTRIBUTES {
		public LUID Luid;
		public uint Attributes;
	}
	
	internal struct TOKEN_PRIVILEGES {
		public int PrivilegeCount;
		public LUID_AND_ATTRIBUTES Privileges; //[1]
	}
	
	[DllImport("advapi32.dll", SetLastError = true)]
	internal static extern bool AdjustTokenPrivileges(IntPtr TokenHandle, bool DisableAllPrivileges, in TOKEN_PRIVILEGES NewState, uint BufferLength, [Out] TOKEN_PRIVILEGES[] PreviousState, IntPtr ReturnLength);
	
	[StructLayout(LayoutKind.Sequential)]
	internal sealed class SECURITY_ATTRIBUTES : IDisposable {
		public int nLength;
		public void* lpSecurityDescriptor;
		public int bInheritHandle;
		
		/// <summary>
		/// Creates <c>SECURITY_ATTRIBUTES</c> from string security descriptor.
		/// <i>securityDescriptor</i> can be <c>null</c>; then <c>lpSecurityDescriptor</c> will be <c>null</c>.
		/// </summary>
		public SECURITY_ATTRIBUTES(string securityDescriptor) {
			nLength = IntPtr.Size * 3;
			if (securityDescriptor != null && !ConvertStringSecurityDescriptorToSecurityDescriptor(securityDescriptor, 1, out lpSecurityDescriptor)) throw new AuException(0, "SECURITY_ATTRIBUTES");
		}
		
		public void Dispose() {
			if (lpSecurityDescriptor != null) {
				LocalFree(lpSecurityDescriptor);
				lpSecurityDescriptor = null;
			}
		}
		
		~SECURITY_ATTRIBUTES() => Dispose();
		
		/// <summary>
		/// Creates <c>SECURITY_ATTRIBUTES</c> that allows UAC low IL processes to open the kernel object.
		/// </summary>
		public static readonly SECURITY_ATTRIBUTES ForLowIL = new SECURITY_ATTRIBUTES("D:NO_ACCESS_CONTROLS:(ML;;NW;;;LW)");
		
		/// <summary>
		/// Creates <c>SECURITY_ATTRIBUTES</c> that allows UAC medium IL processes to open the pipe.
		/// Like of <c>PipeSecurity</c> that allows <c>ReadWrite</c> for <c>AuthenticatedUserSid</c>.
		/// </summary>
		public static readonly SECURITY_ATTRIBUTES ForPipes = new SECURITY_ATTRIBUTES("D:(A;;0x12019b;;;AU)");
	}
	
	[DllImport("advapi32.dll", EntryPoint = "ConvertStringSecurityDescriptorToSecurityDescriptorW", SetLastError = true)]
	internal static extern bool ConvertStringSecurityDescriptorToSecurityDescriptor(string StringSecurityDescriptor, uint StringSDRevision, out void* SecurityDescriptor, uint* SecurityDescriptorSize = null);
	
	//[DllImport("advapi32.dll", EntryPoint = "ConvertSecurityDescriptorToStringSecurityDescriptorW")]
	//internal static extern bool ConvertSecurityDescriptorToStringSecurityDescriptor(void* SecurityDescriptor, uint RequestedStringSDRevision, uint SecurityInformation, out char* StringSecurityDescriptor, out uint StringSecurityDescriptorLen);
	
	[DllImport("advapi32.dll", EntryPoint = "InitiateSystemShutdownW", SetLastError = true)]
	internal static extern bool InitiateSystemShutdown(string lpMachineName, string lpMessage, int dwTimeout, bool bForceAppsClosed, bool bRebootAfterShutdown);
	
	
	
	
	#endregion
	
	#region shell32
	
	//[DllImport("shell32.dll")]
	//internal static extern bool IsUserAnAdmin();
	
	internal const uint SHGFI_ICON = 0x000000100;     // get icon;
	internal const uint SHGFI_DISPLAYNAME = 0x000000200;     // get display name;
	internal const uint SHGFI_TYPENAME = 0x000000400;     // get type name;
	internal const uint SHGFI_ATTRIBUTES = 0x000000800;     // get attributes;
	internal const uint SHGFI_ICONLOCATION = 0x000001000;     // get icon location;
	internal const uint SHGFI_EXETYPE = 0x000002000;     // return exe type;
	internal const uint SHGFI_SYSICONINDEX = 0x000004000;     // get system icon index;
	internal const uint SHGFI_LINKOVERLAY = 0x000008000;     // put a link overlay on icon;
	internal const uint SHGFI_SELECTED = 0x000010000;     // show icon in selected state;
	internal const uint SHGFI_ATTR_SPECIFIED = 0x000020000;     // get only specified attributes;
	internal const uint SHGFI_LARGEICON = 0x000000000;     // get large icon;
	internal const uint SHGFI_SMALLICON = 0x000000001;     // get small icon;
	internal const uint SHGFI_OPENICON = 0x000000002;     // get open icon;
	internal const uint SHGFI_SHELLICONSIZE = 0x000000004;     // get shell size icon;
	internal const uint SHGFI_PIDL = 0x000000008;     // pszPath is a pidl;
	internal const uint SHGFI_USEFILEATTRIBUTES = 0x000000010;     // use passed dwFileAttribute;
	internal const uint SHGFI_ADDOVERLAYS = 0x000000020;     // apply the appropriate overlays;
	internal const uint SHGFI_OVERLAYINDEX = 0x000000040;     // Get the index of the overlay;
	
	internal struct SHFILEINFO {
		public IntPtr hIcon;
		public int iIcon;
		public uint dwAttributes;
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
		public string szDisplayName;
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
		public string szTypeName;
	}
	
	//[DllImport("shell32.dll", EntryPoint = "SHGetFileInfoW")]
	//internal static extern nint SHGetFileInfo(string pszPath, uint dwFileAttributes, out SHFILEINFO psfi, int cbFileInfo, uint uFlags);
	
	[DllImport("shell32.dll", EntryPoint = "SHGetFileInfoW")]
	static extern nint _SHGetFileInfo(nint pidl, uint dwFileAttributes, out SHFILEINFO psfi, int cbFileInfo, uint uFlags);
	
	internal static nint SHGetFileInfo(nint pidl, out SHFILEINFO psfi, uint uFlags, uint dwFileAttributes = 0) {
		return _SHGetFileInfo(pidl, dwFileAttributes, out psfi, Api.SizeOf<Api.SHFILEINFO>(), uFlags);
	}
	
	internal static nint SHGetFileInfo(string path, out SHFILEINFO psfi, uint uFlags, uint dwFileAttributes = 0) {
		//if (0 != (uFlags & SHGFI_PIDL)) { //not tested
		//	var pidl = Pidl.FromString_(path);
		//	if (pidl == 0) { psfi = default; return 0; }
		//	try { return _SHGetFileInfo(pidl, dwFileAttributes, out psfi, Api.SizeOf<Api.SHFILEINFO>(), uFlags); }
		//	finally { Marshal.FreeCoTaskMem(pidl); }
		//} else {
		fixed (char* p = path) return _SHGetFileInfo((nint)p, dwFileAttributes, out psfi, Api.SizeOf<Api.SHFILEINFO>(), uFlags);
		//}
	}
	
	//[DllImport("shell32.dll")]
	//internal static extern int SHGetDesktopFolder(out IShellFolder ppshf);
	
	[DllImport("shell32.dll")]
	internal static extern int SHParseDisplayName(string pszName, IntPtr pbc, out IntPtr pidl, uint sfgaoIn, uint* psfgaoOut);
	
	[DllImport("shell32.dll")]
	internal static extern int SHGetNameFromIDList(IntPtr pidl, SIGDN sigdnName, out string ppszName);
	
	[DllImport("shell32.dll")]
	internal static extern int SHCreateShellItem(IntPtr pidlParent, IShellFolder psfParent, IntPtr pidl, out IShellItem ppsi);
	//This classic API supports absolute PIDL and parent+relative PIDL.
	//There are 2 newer API - SHCreateItemFromIDList (absoulte) and SHCreateItemWithParent (parent+relative). They can get IShellItem2 too, which is currently not useful here. Same speed.
	
	//[DllImport("shell32.dll")]
	//internal static extern int SHCreateItemFromIDList(IntPtr pidl, in Guid riid, out IShellItem ppv); //or IShellItem2
	
	[DllImport("shell32.dll")]
	internal static extern int SHBindToParent(IntPtr pidl, in Guid riid, out IShellFolder ppv, out IntPtr ppidlLast);
	
	[DllImport("shell32.dll")]
	internal static extern int SHGetPropertyStoreForWindow(wnd hwnd, in Guid riid, out IPropertyStore ppv);
	
	internal static PROPERTYKEY PKEY_AppUserModel_ID = new PROPERTYKEY() { fmtid = new Guid(0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3), pid = 5 };
	
	[DllImport("shell32.dll")]
	internal static extern char** CommandLineToArgvW(string lpCmdLine, out int pNumArgs);
	
	[DllImport("shell32.dll", EntryPoint = "Shell_NotifyIconW", SetLastError = true)]
	internal static extern bool Shell_NotifyIcon(int dwMessage, in NOTIFYICONDATA lpData);
	
	internal const int NIM_ADD = 0x0;
	internal const int NIM_MODIFY = 0x1;
	internal const int NIM_DELETE = 0x2;
	internal const int NIM_SETFOCUS = 0x3;
	internal const int NIM_SETVERSION = 0x4;
	
	internal const int NOTIFYICON_VERSION_4 = 4;
	
	internal const uint NIF_MESSAGE = 0x1;
	internal const uint NIF_ICON = 0x2;
	internal const uint NIF_TIP = 0x4;
	internal const uint NIF_STATE = 0x8;
	internal const uint NIF_INFO = 0x10;
	internal const uint NIF_GUID = 0x20;
	internal const uint NIF_REALTIME = 0x40;
	internal const uint NIF_SHOWTIP = 0x80;
	
	internal const uint NIS_HIDDEN = 0x1;
	internal const uint NIS_SHAREDICON = 0x2;
	
	internal struct NOTIFYICONDATA {
		/// <summary>
		/// Sets <c>cbSize</c>, <c>hWnd</c> and <c>uFlags</c>.
		/// </summary>
		/// <param name="wNotify"></param>
		/// <param name="nifFlags"></param>
		public NOTIFYICONDATA(wnd wNotify, uint nifFlags = 0) {
			cbSize = Api.SizeOf<Api.NOTIFYICONDATA>();
			hWnd = wNotify;
			uFlags = nifFlags;
		}
		
		public int cbSize;
		public wnd hWnd;
		public int uID;
		public uint uFlags;
		public int uCallbackMessage;
		public IntPtr hIcon;
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string szTip;
		public uint dwState;
		public uint dwStateMask;
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string szInfo;
		public int uVersion;
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string szInfoTitle;
		public uint dwInfoFlags;
		public Guid guidItem;
		public IntPtr hBalloonIcon;
	}
	
	internal const int NIN_SELECT = 0x400;
	internal const int NIN_KEYSELECT = 0x401;
	internal const int NIN_BALLOONSHOW = 0x402;
	internal const int NIN_BALLOONHIDE = 0x403;
	internal const int NIN_BALLOONTIMEOUT = 0x404;
	internal const int NIN_BALLOONUSERCLICK = 0x405;
	internal const int NIN_POPUPOPEN = 0x406;
	internal const int NIN_POPUPCLOSE = 0x407;
	
	[DllImport("shell32.dll")]
	internal static extern int Shell_NotifyIconGetRect(in NOTIFYICONIDENTIFIER identifier, out RECT iconLocation);
	internal struct NOTIFYICONIDENTIFIER {
		public int cbSize;
		public wnd hWnd;
		public int uID;
		public Guid guidItem;
	}
	
	internal struct SHSTOCKICONINFO {
		public int cbSize;
		public IntPtr hIcon;
		public int iSysImageIndex;
		public int iIcon;
		public fixed char szPath[260];
	}
	
	[DllImport("shell32.dll")]
	internal static extern int SHGetStockIconInfo(StockIcon siid, uint uFlags, ref SHSTOCKICONINFO psii);
	
	[DllImport("shell32.dll", EntryPoint = "#6")]
	internal static extern int SHDefExtractIcon(string pszIconFile, int iIndex, uint uFlags, IntPtr* phiconLarge, IntPtr* phiconSmall, int nIconSize);
	
	internal const int SHIL_LARGE = 0;
	internal const int SHIL_SMALL = 1;
	internal const int SHIL_EXTRALARGE = 2;
	//internal const int SHIL_SYSSMALL = 3;
	internal const int SHIL_JUMBO = 4;
	
	//[DllImport("shell32.dll", EntryPoint = "#727")]
	//internal static extern int SHGetImageList(int iImageList, in Guid riid, out IImageList ppvObj);
	[DllImport("shell32.dll", EntryPoint = "#727")]
	internal static extern int SHGetImageList(int iImageList, in Guid riid, out IntPtr ppvObj);
	
	internal const uint SHCNE_RENAMEITEM = 0x1;
	internal const uint SHCNE_CREATE = 0x2;
	internal const uint SHCNE_DELETE = 0x4;
	internal const uint SHCNE_MKDIR = 0x8;
	internal const uint SHCNE_RMDIR = 0x10;
	internal const uint SHCNE_MEDIAINSERTED = 0x20;
	internal const uint SHCNE_MEDIAREMOVED = 0x40;
	internal const uint SHCNE_DRIVEREMOVED = 0x80;
	internal const uint SHCNE_DRIVEADD = 0x100;
	internal const uint SHCNE_NETSHARE = 0x200;
	internal const uint SHCNE_NETUNSHARE = 0x400;
	internal const uint SHCNE_ATTRIBUTES = 0x800;
	internal const uint SHCNE_UPDATEDIR = 0x1000;
	internal const uint SHCNE_UPDATEITEM = 0x2000;
	internal const uint SHCNE_SERVERDISCONNECT = 0x4000;
	internal const uint SHCNE_UPDATEIMAGE = 0x8000;
	internal const uint SHCNE_DRIVEADDGUI = 0x10000;
	internal const uint SHCNE_RENAMEFOLDER = 0x20000;
	internal const uint SHCNE_FREESPACE = 0x40000;
	internal const uint SHCNE_EXTENDED_EVENT = 0x4000000;
	internal const uint SHCNE_ASSOCCHANGED = 0x8000000;
	internal const uint SHCNE_DISKEVENTS = 0x2381F;
	internal const uint SHCNE_GLOBALEVENTS = 0xC0581E0;
	internal const uint SHCNE_ALLEVENTS = 0x7FFFFFFF;
	internal const uint SHCNE_INTERRUPT = 0x80000000;
	
	internal const uint SHCNF_IDLIST = 0x0;
	internal const uint SHCNF_DWORD = 0x3;
	internal const uint SHCNF_PATH = 0x5;
	internal const uint SHCNF_PRINTER = 0x6;
	internal const uint SHCNF_FLUSH = 0x1000;
	internal const uint SHCNF_FLUSHNOWAIT = 0x3000;
	internal const uint SHCNF_NOTIFYRECURSIVE = 0x10000;
	
	[DllImport("shell32.dll")]
	internal static extern void SHChangeNotify(uint wEventId, uint uFlags, string dwItem1, string dwItem2);
	
	internal const uint SEE_MASK_CONNECTNETDRV = 0x80;
	internal const uint SEE_MASK_NOZONECHECKS = 0x800000;
	internal const uint SEE_MASK_UNICODE = 0x4000;
	internal const uint SEE_MASK_FLAG_NO_UI = 0x400;
	internal const uint SEE_MASK_INVOKEIDLIST = 0xC;
	internal const uint SEE_MASK_NOCLOSEPROCESS = 0x40;
	internal const uint SEE_MASK_NOASYNC = 0x100;
	internal const uint SEE_MASK_NO_CONSOLE = 0x8000;
	//internal const uint SEE_MASK_HMONITOR = 0x200000;
	//internal const uint SEE_MASK_WAITFORINPUTIDLE = 0x2000000;
	internal const uint SEE_MASK_FLAG_LOG_USAGE = 0x4000000;
	
	internal struct SHELLEXECUTEINFO {
		public int cbSize;
		public uint fMask;
		public wnd hwnd;
		public string lpVerb;
		public string lpFile;
		public string lpParameters;
		public string lpDirectory;
		public int nShow;
		public IntPtr hInstApp;
		public IntPtr lpIDList;
		public string lpClass;
		public IntPtr hkeyClass;
		public uint dwHotKey;
		public IntPtr hMonitor;
		public Handle_ hProcess;
	}
	
	[DllImport("shell32.dll", EntryPoint = "ShellExecuteExW", SetLastError = true)]
	internal static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO pExecInfo);
	
	[DllImport("shell32.dll")]
	internal static extern int SHOpenFolderAndSelectItems(HandleRef pidlFolder, uint cidl, IntPtr[] apidl, uint dwFlags);
	
	[DllImport("shell32.dll", EntryPoint = "#152")]
	internal static extern int ILGetSize(IntPtr pidl);
	
	[DllImport("shell32.dll", EntryPoint = "#25")]
	internal static extern IntPtr ILCombine(IntPtr pidl1, IntPtr pidl2);
	
	[DllImport("shell32.dll", EntryPoint = "#21")]
	internal static extern bool ILIsEqual(IntPtr pidl1, IntPtr pidl2);
	
	internal const uint FO_MOVE = 0x1;
	internal const uint FO_COPY = 0x2;
	internal const uint FO_DELETE = 0x3;
	internal const uint FO_RENAME = 0x4;
	
	internal const uint FOF_MULTIDESTFILES = 0x1;
	internal const uint FOF_CONFIRMMOUSE = 0x2;
	internal const uint FOF_SILENT = 0x4;
	internal const uint FOF_RENAMEONCOLLISION = 0x8;
	internal const uint FOF_NOCONFIRMATION = 0x10;
	internal const uint FOF_WANTMAPPINGHANDLE = 0x20;
	internal const uint FOF_ALLOWUNDO = 0x40;
	internal const uint FOF_FILESONLY = 0x80;
	internal const uint FOF_SIMPLEPROGRESS = 0x100;
	internal const uint FOF_NOCONFIRMMKDIR = 0x200;
	internal const uint FOF_NOERRORUI = 0x400;
	internal const uint FOF_NOCOPYSECURITYATTRIBS = 0x800;
	internal const uint FOF_NORECURSION = 0x1000;
	internal const uint FOF_NO_CONNECTED_ELEMENTS = 0x2000;
	internal const uint FOF_WANTNUKEWARNING = 0x4000;
	internal const uint FOF_NORECURSEREPARSE = 0x8000;
	internal const uint FOF_NO_UI = 0x614;
	
	internal struct SHFILEOPSTRUCT {
		public wnd hwnd;
		public uint wFunc;
		public string pFrom;
		public string pTo;
		public ushort fFlags;
		
		//workaround for this problem: the 32-bit version of SHFILEOPSTRUCT uses Pack = 1, ie no 2-byte gap after fFlags.
		//	I don't want to use two versions. Then also would need two versions of code that use this struct.
		//	The last two members are not useful, but we need fAnyOperationsAborted. This workaround gets it through a property function.
		//	Update: we don't need fAnyOperationsAborted. We use FOF_SILENT therefore cannot be aborted. And it is unreliable.
		//		But the workaround is tested, on both platformas.
		
#if use_fAnyOperationsAborted
				//public bool fAnyOperationsAborted; //BOOL
				ushort _fAnyOperationsAborted_32, _fAnyOperationsAborted_common, _fAnyOperationsAborted_64;
				public bool fAnyOperationsAborted
				{
					get
					{
						if(_fAnyOperationsAborted_common != 0) return true;
						var v = osVersion.is32BitProcess ? _fAnyOperationsAborted_32 : _fAnyOperationsAborted_64;
						return v != 0;
					}
				}
#else
		private int fAnyOperationsAborted;
#endif
		private IntPtr hNameMappings;
		private string lpszProgressTitle;
		//these are private and not used, because would be at invalid offsets on 32-bit
	}
	
	//internal struct SHFILEOPSTRUCT
	//{
	//	public wnd hwnd;
	//	public uint wFunc;
	//	public string pFrom;
	//	public string pTo;
	//	public ushort fFlags;
	//	public bool fAnyOperationsAborted;
	//	public IntPtr hNameMappings;
	//	public string lpszProgressTitle;
	//}
	
	//[StructLayout(LayoutKind.Sequential, Pack = 1)]
	//internal struct SHFILEOPSTRUCT__32
	//{
	//	public wnd hwnd;
	//	public uint wFunc;
	//	public string pFrom;
	//	public string pTo;
	//	public ushort fFlags;
	//	public bool fAnyOperationsAborted;
	//	public IntPtr hNameMappings;
	//	public string lpszProgressTitle;
	//}
	
	[DllImport("shell32.dll", EntryPoint = "SHFileOperationW")]
	internal static extern int SHFileOperation(in SHFILEOPSTRUCT lpFileOp);
	
	[DllImport("shell32.dll", EntryPoint = "DragQueryFileW")]
	internal static extern int DragQueryFile(IntPtr hDrop, int iFile, char* lpszFile, int cch);
	
	[DllImport("shell32.dll")]
	internal static extern bool IsUserAnAdmin();
	
	[DllImport("shell32.dll", EntryPoint = "SHEmptyRecycleBinW")]
	internal static extern int SHEmptyRecycleBin(wnd hwnd, string pszRootPath, int dwFlags);
	
	
	#endregion
	
	#region shlwapi
	
	[DllImport("shlwapi.dll")]
	static extern int IUnknown_QueryService([MarshalAs(UnmanagedType.IUnknown)] object punk, in Guid guidService, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppvOut);
	
	public static bool QueryService<T>(object from, in Guid guidService, out T result) where T : class {
		bool ok = 0 == IUnknown_QueryService(from, guidService, typeof(T).GUID, out var o);
		result = ok ? (T)o : null;
		return ok;
	}
	
	//[DllImport("shlwapi.dll")]
	//internal static extern uint ColorAdjustLuma(uint clrRGB, int n, bool fScale);
	
	[DllImport("shlwapi.dll")]
	internal static extern void ColorRGBToHLS(int clrRGB, out ushort pwHue, out ushort pwLuminance, out ushort pwSaturation);
	
	[DllImport("shlwapi.dll")]
	internal static extern int ColorHLSToRGB(ushort wHue, ushort wLuminance, ushort wSaturation);
	
	[DllImport("shlwapi.dll")]
	internal static extern int PathCreateFromUrlAlloc(string pszIn, out string ppszOut, uint dwFlags = 0);
	
	//internal enum ASSOCSTR
	//{
	//	ASSOCSTR_COMMAND = 1,
	//	ASSOCSTR_EXECUTABLE,
	//	ASSOCSTR_FRIENDLYDOCNAME,
	//	ASSOCSTR_FRIENDLYAPPNAME,
	//	ASSOCSTR_NOOPEN,
	//	ASSOCSTR_SHELLNEWVALUE,
	//	ASSOCSTR_DDECOMMAND,
	//	ASSOCSTR_DDEIFEXEC,
	//	ASSOCSTR_DDEAPPLICATION,
	//	ASSOCSTR_DDETOPIC,
	//	ASSOCSTR_INFOTIP,
	//	ASSOCSTR_QUICKTIP,
	//	ASSOCSTR_TILEINFO,
	//	ASSOCSTR_CONTENTTYPE,
	//	ASSOCSTR_DEFAULTICON,
	//	ASSOCSTR_SHELLEXTENSION,
	//	ASSOCSTR_DROPTARGET,
	//	ASSOCSTR_DELEGATEEXECUTE,
	//	ASSOCSTR_SUPPORTED_URI_PROTOCOLS,
	//	ASSOCSTR_PROGID,
	//	ASSOCSTR_APPID,
	//	ASSOCSTR_APPPUBLISHER,
	//	ASSOCSTR_APPICONREFERENCE,
	//	ASSOCSTR_MAX
	//}
	
	//[DllImport("shlwapi.dll", EntryPoint = "AssocQueryStringW")]
	//internal static extern int AssocQueryString(uint flags, /*ASSOCSTR*/ int str, string pszAssoc, string pszExtra, char[] pszOut, ref int pcchOut);
	
	///// <summary>
	///// Returns executable path of file type.
	///// </summary>
	///// <param name="dotExt"></param>
	//internal static string AssocQueryString(string dotExt/*, ASSOCSTR what = ASSOCSTR.ASSOCSTR_EXECUTABLE*/)
	//{
	//	var b = ApiBuffer_.Char_(300, out var n);
	//	int hr = AssocQueryString(0x20, 2, dotExt, null, b, ref n); //ASSOCF_NOTRUNCATE
	//	if(hr == E_POINTER) hr = AssocQueryString(0x20, 2, dotExt, null, b = ApiBuffer_.Char_(n), ref n);
	//	return hr == 0 ? b.ToString(n) : null;
	//}
	
	
	#endregion
	
	#region comctl32
	
	[DllImport("comctl32.dll")]
	internal static extern IntPtr ImageList_GetIcon(IntPtr himl, int i, uint flags);
	
	[DllImport("comctl32.dll")]
	internal static extern bool ImageList_GetIconSize(IntPtr himl, out int cx, out int cy);
	
	internal const uint TME_LEAVE = 0x2;
	internal const uint TME_NONCLIENT = 0x10;
	internal const uint TME_CANCEL = 0x80000000;
	
	internal struct TRACKMOUSEEVENT {
		public int cbSize;
		public uint dwFlags;
		public wnd hwndTrack;
		public int dwHoverTime;
		
		public TRACKMOUSEEVENT(wnd w, uint flags, int hoverTime = 0) {
			cbSize = sizeof(TRACKMOUSEEVENT);
			hwndTrack = w;
			dwFlags = flags;
			dwHoverTime = hoverTime;
		}
	}
	
	[DllImport("comctl32.dll", EntryPoint = "_TrackMouseEvent")]
	internal static extern bool TrackMouseEvent(ref TRACKMOUSEEVENT lpEventTrack);
	
	/// <summary>
	/// Calls <c>TrackMouseEvent</c> with <c>TME_LEAVE</c>.
	/// </summary>
	/// <param name="w"></param>
	/// <param name="track"><c>true</c> to start, <c>false</c> to cancel.</param>
	internal static bool TrackMouseLeave(wnd w, bool track) {
		var t = new TRACKMOUSEEVENT(w, track ? TME_LEAVE : TME_LEAVE | TME_CANCEL);
		return TrackMouseEvent(ref t);
	}
	
	[DllImport("comctl32.dll", EntryPoint = "#380")]
	internal static extern int LoadIconMetric(IntPtr hinst, nint pszName, int lims, out IntPtr phico);
	
	[DllImport("comctl32.dll", EntryPoint = "#410")]
	internal static extern bool SetWindowSubclass(wnd hWnd, SUBCLASSPROC pfnSubclass, nint uIdSubclass, nint dwRefData = 0);
	
	internal delegate nint SUBCLASSPROC(wnd hWnd, int uMsg, nint wParam, nint lParam, nint uIdSubclass, nint dwRefData);
	
	[DllImport("comctl32.dll", EntryPoint = "#413")]
	internal static extern nint DefSubclassProc(wnd hWnd, int uMsg, nint wParam, nint lParam);
	
	[DllImport("comctl32.dll", EntryPoint = "#412")]
	internal static extern bool RemoveWindowSubclass(wnd hWnd, SUBCLASSPROC pfnSubclass, nint uIdSubclass);
	
	
	
	
	#endregion
	
	#region oleaut32
	
	[DllImport("oleaut32.dll", EntryPoint = "#6")]
	internal static extern void SysFreeString(char* bstrString);
	
	[DllImport("oleaut32.dll", EntryPoint = "#7")]
	internal static extern int SysStringLen(char* pbstr);
	
	[DllImport("oleaut32.dll", EntryPoint = "#4")]
	internal static extern BSTR SysAllocStringLen(string strIn, int len);
	
	[DllImport("oleaut32.dll", EntryPoint = "#2")]
	internal static extern BSTR SysAllocString(char* psz);
	
	[DllImport("oleaut32.dll", EntryPoint = "#147")]
	internal static extern int VariantChangeTypeEx(ref VARIANT pvargDest, in VARIANT pvarSrc, uint lcid, ushort wFlags, VARENUM vt);
	
	[DllImport("oleaut32.dll", EntryPoint = "#9")]
	internal static extern int VariantClear(ref VARIANT pvarg);
	
	[DllImport("oleaut32.dll", EntryPoint = "#35")]
	internal static extern int GetActiveObject(in Guid rclsid, IntPtr pvReserved, [MarshalAs(UnmanagedType.IUnknown)] out object ppunk);
	
	
	
	
	#endregion
	
	#region ole32
	
	[DllImport("ole32.dll")]
	internal static extern int CoCreateInstance(in Guid rclsid, nint pUnkOuter, uint dwClsContext, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv);
	
	[DllImport("ole32.dll")]
	internal static extern int PropVariantClear(ref PROPVARIANT pvar);
	
	//internal enum APTTYPE
	//{
	//	APTTYPE_CURRENT = -1,
	//	APTTYPE_STA,
	//	APTTYPE_MTA,
	//	APTTYPE_NA,
	//	APTTYPE_MAINSTA
	//}
	
	//[DllImport("ole32.dll")]
	//internal static extern int CoGetApartmentType(out APTTYPE pAptType, out int pAptQualifier);
	
	[DllImport("ole32.dll")]
	internal static extern int OleInitialize(IntPtr pvReserved);
	
	[DllImport("ole32.dll")]
	internal static extern void OleUninitialize();
	
	[ComImport, Guid("00000122-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface IDropTarget {
		void DragEnter(System.Runtime.InteropServices.ComTypes.IDataObject d, int grfKeyState, POINT pt, ref int effect);
		void DragOver(int grfKeyState, POINT pt, ref int effect);
		void DragLeave();
		void Drop(System.Runtime.InteropServices.ComTypes.IDataObject d, int grfKeyState, POINT pt, ref int effect);
	}
	
	[DllImport("ole32.dll")]
	internal static extern int RegisterDragDrop(wnd hwnd, IDropTarget pDropTarget);
	
	[DllImport("ole32.dll")]
	internal static extern int RevokeDragDrop(wnd hwnd);
	
	[DllImport("ole32.dll")]
	internal static extern void ReleaseStgMedium(ref System.Runtime.InteropServices.ComTypes.STGMEDIUM medium);
	
	[DllImport("ole32.dll")]
	internal static extern int CLSIDFromProgID(string lpszProgID, out Guid lpclsid);
	
	#endregion
	
	#region oleacc
	
	[DllImport("oleacc.dll")]
	internal static extern int AccessibleObjectFromWindow(wnd hwnd, EObjid dwId, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object o);
	
	[DllImport("oleacc.dll")]
	internal static extern int AccessibleObjectFromEvent(wnd hwnd, EObjid dwObjectId, int dwChildId, out IntPtr ppacc, out VARIANT pvarChild);
	
	[DllImport("oleacc.dll")]
	internal static extern Handle_ GetProcessHandleFromHwnd(wnd hwnd);
	
	[DllImport("oleacc.dll")]
	internal static extern int CreateStdAccessibleObject(wnd hwnd, EObjid idObject, in Guid riid, out IAccessible ppvObject);
	
	[ComImport, Guid("618736e0-3c3d-11cf-810c-00aa00389b71"), InterfaceType(ComInterfaceType.InterfaceIsDual)]
	internal interface IAccessible {
		IAccessible get_accParent();
		int get_accChildCount();
		[PreserveSig] int get_accChild(VarInt varChild, [MarshalAs(UnmanagedType.IDispatch)] out object ppdispChild);
		string get_accName(VarInt varChild);
		string get_accValue(VarInt varChild);
		string get_accDescription(VarInt varChild);
		VarInt get_accRole(VarInt varChild);
		VarInt get_accState(VarInt varChild);
		string get_accHelp(VarInt varChild);
		int get_accHelpTopic(out string pszHelpFile, VarInt varChild);
		string get_accKeyboardShortcut(VarInt varChild);
		object get_accFocus();
		object get_accSelection();
		string get_accDefaultAction(VarInt varChild);
		void accSelect(ESelect flagsSelect, VarInt varChild);
		void accLocation(out int pxLeft, out int pyTop, out int pcxWidth, out int pcyHeight, VarInt varChild);
		object accNavigate(NAVDIR navDir, VarInt varStart);
		VarInt accHitTest(int xLeft, int yTop);
		void accDoDefaultAction(VarInt varChild);
		void put_accName(VarInt varChild, string szName);
		void put_accValue(VarInt varChild, string szValue);
		
		//NOTE: although some members are obsolete or useless, don't use default implementation, because then exception at run time.
	}
	
#pragma warning disable 169
	internal struct VarInt {
		ushort _vt, _1, _2, _3;
		nint _int, _4;
		public static implicit operator VarInt(int i) => new VarInt { _vt = 3, _int = i + 1 };
		public static implicit operator int(VarInt v) {
			if (v._vt == 3) return (int)v._int - 1;
			Debug_.Print($"VarInt vt={v._vt}, value={v._int}");
			throw new ArgumentException();
		}
	}
#pragma warning restore 169
	
	internal enum NAVDIR { UP = 1, DOWN, LEFT, RIGHT, NEXT, PREVIOUS, FIRSTCHILD, LASTCHILD }
	
	
	#endregion
	
	#region msvcrt
	
	//don't use, because for eg "0xffffffff" returns int.Max instead of -1.
	//[DllImport("msvcrt.dll", EntryPoint = "wcstol", CallingConvention = CallingConvention.Cdecl)]
	//internal static extern int strtoi(char* s, char** endPtr = null, int radix = 0);
	
	//don't use the u API because they return 1 if the value is too big and the string contains '-'.
	//[DllImport("msvcrt.dll", EntryPoint = "wcstoul", CallingConvention = CallingConvention.Cdecl)]
	//internal static extern uint strtoui(char* s, char** endPtr = null, int radix = 0);
	
	[DllImport("msvcrt.dll", EntryPoint = "_wcstoi64", CallingConvention = CallingConvention.Cdecl)]
	internal static extern long strtoi64(char* s, char** endPtr = null, int radix = 0);
	//info: ntdll also has wcstol, wcstoul, _wcstoui64, but not _wcstoi64.
	
	//[DllImport("msvcrt.dll", EntryPoint = "_wcstoui64", CallingConvention = CallingConvention.Cdecl)]
	//internal static extern ulong strtoui64(char* s, char** endPtr = null, int radix = 0);
	
	[DllImport("msvcrt.dll", EntryPoint = "_strtoi64", CallingConvention = CallingConvention.Cdecl)]
	internal static extern long strtoi64(byte* s, byte** endPtr = null, int radix = 0);
	
	//not used
	//[DllImport("msvcrt.dll", EntryPoint = "_strtoui64", CallingConvention = CallingConvention.Cdecl)]
	//internal static extern long strtoui64(byte* s, byte** endPtr = null, int radix = 0);
	
	//This is used when working with char*. With C# strings use ExtString.ToInt32 etc.
	internal static int strtoi(char* s, char** endPtr = null, int radix = 0) {
		return (int)strtoi64(s, endPtr, radix);
	}
	
	//This is used with UTF-8 text.
	internal static int strtoi(byte* s, byte** endPtr = null, int radix = 0) {
		return (int)strtoi64(s, endPtr, radix);
	}
	
#if false //not used, because we have ExtString.ToInt32 etc, which has no overflow problems. But it supports only decimal and hex, not any radix.
	/// <summary>
	/// Converts part of string to <c>int</c>.
	/// Returns the <c>int</c> value.
	/// Returns 0 if the string is <c>null</c>, <c>""</c> or does not begin with a number; then <i>numberEndIndex</i> will be = <i>startIndex</i>.
	/// </summary>
	/// <param name="s">String.</param>
	/// <param name="startIndex">Offset in string where to start parsing.</param>
	/// <param name="numberEndIndex">Receives offset in string where the number part ends.</param>
	/// <param name="radix">If 0, parses the string as hexadecimal number if starts with <c>"0x"</c>, as octal if starts with <c>"0"</c>, else as decimal. Else it can be 2 to 36. Examples: 10 - parse as decimal (don't support <c>"0x"</c> etc); 16 - as hexadecimal (eg returns 26 if string is <c>"1A"</c> or <c>"0x1A"</c>); 2 - as binary (eg returns 5 if string is <c>"101"</c>).</param>
	/// <exception cref="ArgumentOutOfRangeException"><i>startIndex</i> is invalid.</exception>
	internal static int strtoi(string s, int startIndex, out int numberEndIndex, int radix = 0) {
		int R = 0, len = s == null ? 0 : s.Length - startIndex;
		if(len < 0) throw new ArgumentOutOfRangeException("startIndex");
		if(len != 0)
			fixed (char* p = s) {
				char* t = p + startIndex, e = t;
				R = strtoi(t, &e, radix);
				len = (int)(e - t);
			}
		numberEndIndex = startIndex + len;
		return R;
	}

	/// <summary>
	/// Converts part of string to <c>long</c>.
	/// Returns the <c>long</c> value.
	/// Returns 0 if the string is <c>null</c>, <c>""</c> or does not begin with a number; then <i>numberEndIndex</i> will be = <i>startIndex</i>.
	/// </summary>
	/// <param name="s">String.</param>
	/// <param name="startIndex">Offset in string where to start parsing.</param>
	/// <param name="numberEndIndex">Receives offset in string where the number part ends.</param>
	/// <param name="radix">If 0, parses the string as hexadecimal number if starts with <c>"0x"</c>, as octal if starts with <c>"0"</c>, else as decimal. Else it can be 2 to 36. Examples: 10 - parse as decimal (don't support <c>"0x"</c> etc); 16 - as hexadecimal (eg returns 26 if string is <c>"1A"</c> or <c>"0x1A"</c>); 2 - as binary (eg returns 5 if string is <c>"101"</c>).</param>
	/// <exception cref="ArgumentOutOfRangeException"><i>startIndex</i> is invalid.</exception>
	internal static long strtoi64(string s, int startIndex, out int numberEndIndex, int radix = 0) {
		long R = 0;
		int len = s == null ? 0 : s.Length - startIndex;
		if(len < 0) throw new ArgumentOutOfRangeException("startIndex");
		if(len != 0)
			fixed (char* p = s) {
				char* t = p + startIndex, e = t;
				R = strtoi64(t, &e, radix);
				len = (int)(e - t);
			}
		numberEndIndex = startIndex + len;
		return R;
	}

	internal static int strtoi(string s, int startIndex = 0, int radix = 0) {
		return strtoi(s, startIndex, out _, radix);
	}

	internal static long strtoi64(string s, int startIndex = 0, int radix = 0) {
		return strtoi64(s, startIndex, out _, radix);
	}
#endif
	
	[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern char* _ltoa(int value, byte* s, int radix);
	
	[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern void* memmove(void* to, void* from, nint n);
	
	//[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
	//internal static extern void* memset(void* ptr, int ch, nint n);
	
	[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int memcmp(void* p1, void* p2, nint count);
	
	
	
	#endregion
	
	#region winmm
	
	[DllImport("winmm.dll")]
	internal static extern uint timeBeginPeriod(uint uPeriod);
	
	[DllImport("winmm.dll")]
	internal static extern uint timeEndPeriod(uint uPeriod);
	
	[DllImport("winmm.dll")]
	internal static extern uint waveOutSetVolume(IntPtr hwo, uint dwVolume);
	
	[DllImport("winmm.dll")]
	internal static extern uint waveOutGetVolume(IntPtr hwo, out uint pdwVolume);
	
	[DllImport("winmm.dll", EntryPoint = "PlaySoundW")]
	internal static extern bool PlaySound(string pszSound, IntPtr hmod, uint fdwSound);
	
	internal const uint SND_FILENAME = 0x20000;
	internal const uint SND_NODEFAULT = 0x2;
	internal const uint SND_SYSTEM = 0x200000;
	internal const uint SND_ASYNC = 0x1;
	internal const uint SND_ALIAS = 0x10000;
	internal const uint SND_APPLICATION = 0x80;
	
	[DllImport("user32.dll")]
	internal static extern bool MessageBeep(uint uType);
	
	[DllImport("kernel32.dll")]
	internal static extern bool Beep(int dwFreq, int dwDuration);
	
	#endregion
	
	#region dwmapi
	
	internal enum DWMWA {
		NCRENDERING_ENABLED = 1,
		NCRENDERING_POLICY,
		TRANSITIONS_FORCEDISABLED,
		ALLOW_NCPAINT,
		CAPTION_BUTTON_BOUNDS,
		NONCLIENT_RTL_LAYOUT,
		FORCE_ICONIC_REPRESENTATION,
		FLIP3D_POLICY,
		EXTENDED_FRAME_BOUNDS,
		HAS_ICONIC_BITMAP,
		DISALLOW_PEEK,
		EXCLUDED_FROM_PEEK,
		CLOAK,
		CLOAKED,
		FREEZE_REPRESENTATION,
		PASSIVE_UPDATE_MODE,
	}
	
	[DllImport("dwmapi.dll")]
	internal static extern int DwmGetWindowAttribute(wnd hwnd, DWMWA dwAttribute, void* pvAttribute, int cbAttribute);
	
	//[DllImport("dwmapi.dll")]
	//internal static extern int DwmSetWindowAttribute(wnd hwnd, DWMWA dwAttribute, void* pvAttribute, int cbAttribute);
	
	//[DllImport("dwmapi.dll")]
	//internal static extern int DwmRegisterThumbnail(wnd hwndDestination, wnd hwndSource, out IntPtr phThumbnailId);
	
	//[DllImport("dwmapi.dll")]
	//internal static extern int DwmUnregisterThumbnail(IntPtr hThumbnailId);
	
	//[DllImport("dwmapi.dll")]
	//internal static extern int DwmQueryThumbnailSourceSize(IntPtr hThumbnail, out SIZE pSize);
	
	//[DllImport("dwmapi.dll")]
	//internal static extern int DwmUpdateThumbnailProperties(IntPtr hThumbnailId, in DWM_THUMBNAIL_PROPERTIES ptnProperties);
	
	//[StructLayout(LayoutKind.Sequential, Pack = 1)]
	//internal struct DWM_THUMBNAIL_PROPERTIES {
	//	public uint dwFlags;
	//	public RECT rcDestination;
	//	public RECT rcSource;
	//	public byte opacity;
	//	public bool fVisible;
	//	public bool fSourceClientAreaOnly;
	//}
	
	//internal const uint DWM_TNP_SOURCECLIENTAREAONLY = 0x10;
	//internal const uint DWM_TNP_RECTDESTINATION = 0x1;
	//internal const uint DWM_TNP_VISIBLE = 0x8;
	//internal const uint DWM_TNP_RECTSOURCE = 0x2;
	
	
	
	
	#endregion
	
	#region uxtheme
	
	[DllImport("uxtheme.dll")]
	static extern IntPtr OpenThemeData(wnd hwnd, string pszClassList);
	
	[DllImport("uxtheme.dll")]
	static extern IntPtr OpenThemeDataForDpi(wnd hwnd, string pszClassList, int dpi);
	
	internal static IntPtr OpenThemeData(wnd hwnd, string classList, int dpi) {
		if (osVersion.minWin10_1703) return OpenThemeDataForDpi(hwnd, classList, dpi);
		return OpenThemeData(hwnd, classList); //never mind: bad on Win8.1 non-primary screen with different DPI than primary if hwnd==0
	}
	
	[DllImport("uxtheme.dll")]
	internal static extern int CloseThemeData(IntPtr hTheme);
	
	[DllImport("uxtheme.dll")]
	internal static extern int GetThemePartSize(IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, RECT* prc, THEMESIZE eSize, out SIZE psz);
	internal enum THEMESIZE {
		TS_MIN,
		TS_TRUE,
		TS_DRAW
	}
	
	[DllImport("uxtheme.dll")]
	internal static extern int DrawThemeBackground(IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, in RECT pRect, RECT* pClipRect = null);
	
	//[DllImport("uxtheme.dll")]
	//internal static extern int SetWindowTheme(wnd hwnd, string pszSubAppName, string pszSubIdList);
	
	[DllImport("uxtheme.dll")]
	internal static extern int GetThemeSysColor(IntPtr hTheme, int iColorId);
	
	[DllImport("uxtheme.dll")]
	internal static extern IntPtr GetThemeSysColorBrush(IntPtr hTheme, int iColorId);
	
	[DllImport("uxtheme.dll")]
	internal static extern int BufferedPaintInit();
	
	//[DllImport("uxtheme.dll")]
	//internal static extern int BufferedPaintUnInit();
	
	[DllImport("uxtheme.dll")]
	internal static extern IntPtr BeginBufferedPaint(IntPtr hdcTarget, in RECT prcTarget, BP_BUFFERFORMAT dwFormat, ref BP_PAINTPARAMS pPaintParams, out IntPtr phdc);
	
	[DllImport("uxtheme.dll")]
	internal static extern int EndBufferedPaint(IntPtr hBufferedPaint, bool fUpdateTarget);
	
	internal enum BP_BUFFERFORMAT {
		BPBF_COMPATIBLEBITMAP,
		BPBF_DIB,
		BPBF_TOPDOWNDIB,
		BPBF_TOPDOWNMONODIB
	}
	internal struct BP_PAINTPARAMS {
		public int cbSize;
		public uint dwFlags;
		public RECT* prcExclude;
		//public BLENDFUNCTION* pBlendFunction;
		uint pBlendFunction;
	}
	//internal struct BLENDFUNCTION {
	//	public byte BlendOp;
	//	public byte BlendFlags;
	//	public byte SourceConstantAlpha;
	//	public byte AlphaFormat;
	//}
	
	
	#endregion
	
	#region wtsapi
	
	[DllImport("wtsapi32.dll", SetLastError = true)]
	internal static extern bool WTSTerminateProcess(IntPtr hServer, int ProcessId, int ExitCode);
	
	[DllImport("wtsapi32.dll")]
	internal static extern void WTSFreeMemory(void* pMemory);
	
	[DllImport("wtsapi32.dll", EntryPoint = "WTSQuerySessionInformationW", SetLastError = true)]
	static extern bool _WTSQuerySessionInformation(nint hServer, int SessionId, WTS_INFO_CLASS WTSInfoClass, out char* ppBuffer, out int pBytesReturned);
	
	internal enum WTS_INFO_CLASS {
		WTSInitialProgram,
		WTSApplicationName,
		WTSWorkingDirectory,
		WTSOEMId,
		WTSSessionId,
		WTSUserName,
		WTSWinStationName,
		WTSDomainName,
		WTSConnectState,
		WTSClientBuildNumber,
		WTSClientName,
		WTSClientDirectory,
		WTSClientProductId,
		WTSClientHardwareId,
		WTSClientAddress,
		WTSClientDisplay,
		WTSClientProtocolType,
		WTSIdleTime,
		WTSLogonTime,
		WTSIncomingBytes,
		WTSOutgoingBytes,
		WTSIncomingFrames,
		WTSOutgoingFrames,
		WTSClientInfo,
		WTSSessionInfo,
		WTSSessionInfoEx,
		WTSConfigInfo,
		WTSValidationInfo,
		WTSSessionAddressV4,
		WTSIsRemoteSession
	}
	
	internal static unsafe bool WTSQuerySessionInformation(int sessionId, Api.WTS_INFO_CLASS what, out string r) {
		if (_WTSQuerySessionInformation(0, -1, what, out char* p, out int len)) {
			r = len > 2 ? new(p, 0, len / 2 - 1) : null;
			Api.WTSFreeMemory(p);
			return r != null;
		}
		r = null;
		return false;
	}
	
	internal static unsafe bool WTSQuerySessionInformation<T>(int sessionId, Api.WTS_INFO_CLASS what, out T r) where T : unmanaged {
		if (_WTSQuerySessionInformation(0, -1, what, out char* p, out int len)) {
			Debug_.PrintIf(len != sizeof(T), len.ToS());
			r = len == sizeof(T) ? *(T*)p : default;
			Api.WTSFreeMemory(p);
			return len == sizeof(T);
		}
		r = default;
		return false;
	}
	
	[DllImport("wtsapi32.dll")]
	internal static extern bool WTSGetChildSessionId(out int pSessionId);
	
	
	#endregion
	
	#region ntdll
	
	internal struct RTL_OSVERSIONINFOW {
		public int dwOSVersionInfoSize;
		public uint dwMajorVersion;
		public uint dwMinorVersion;
		public uint dwBuildNumber;
		public uint dwPlatformId;
		public fixed char szCSDVersion[128];
	}
	
	[DllImport("ntdll.dll", ExactSpelling = true)]
	internal static extern int RtlGetVersion(ref RTL_OSVERSIONINFOW lpVersionInformation);
	
	[DllImport("ntdll.dll")]
	internal static extern uint NtQueryTimerResolution(out uint maxi, out uint mini, out uint current);
	//info: NtSetTimerResolution can set min 0.5 ms resolution. timeBeginPeriod min 1.
	
	[DllImport("ntdll.dll")]
	internal static extern void MD5Init(out Hash.MD5Context context);
	
	[DllImport("ntdll.dll")]
	internal static extern void MD5Update(ref Hash.MD5Context context, void* data, int dataLen);
	
	[DllImport("ntdll.dll")]
	internal static extern void MD5Final(ref Hash.MD5Context context);
	
#pragma warning disable 169
	[DllImport("ntdll.dll")]
	internal static extern int NtQueryInformationProcess(IntPtr ProcessHandle, int ProcessInformationClass, void* ProcessInformation, int ProcessInformationLength, out int ReturnLength);
	
	//all structs are same in 64-bit and 32-bit processes
	
	internal record struct PROCESS_BASIC_INFORMATION {
		long Reserved1;
		public long PebBaseAddress;
		long Reserved2_0, Reserved2_1;
		public long UniqueProcessId;
		public long ParentProcessId;
	}
	
	internal struct RTL_USER_PROCESS_PARAMETERS {
		fixed byte Reserved[96];
		public UNICODE_STRING ImagePathName;
		public UNICODE_STRING CommandLine;
	}
	
	internal struct UNICODE_STRING {
		public ushort Length;
		public ushort MaximumLength;
		public char* Buffer;
	}
	
	internal struct SYSTEM_PROCESS_INFORMATION {
		internal uint NextEntryOffset;
		internal uint NumberOfThreads;
		long SpareLi1;
		long SpareLi2;
		long SpareLi3;
		internal long CreateTime;
		internal long UserTime;
		internal long KernelTime;
		
		internal ushort NameLength;   // UNICODE_STRING   
		internal ushort MaximumNameLength;
		internal IntPtr NamePtr;     // This will point into the data block returned by NtQuerySystemInformation
		
		internal int BasePriority;
		internal IntPtr UniqueProcessId;
		internal IntPtr InheritedFromUniqueProcessId;
		internal uint HandleCount;
		internal uint SessionId;
		
		//unused members
	}
#pragma warning restore 169
	
	internal const int STATUS_INFO_LENGTH_MISMATCH = unchecked((int)0xC0000004);
	
	[DllImport("ntdll.dll")]
	internal static extern int NtQuerySystemInformation(int five, SYSTEM_PROCESS_INFORMATION* SystemInformation, int SystemInformationLength, out int ReturnLength);
	
	[DllImport("ntdll.dll")]
	internal static extern int NtSuspendProcess(IntPtr handle);
	
	[DllImport("ntdll.dll")]
	internal static extern int NtResumeProcess(IntPtr handle);
	
	
	
	
	#endregion
	
	#region other
	
	[DllImport("msi.dll", EntryPoint = "#217")]
	internal static extern int MsiGetShortcutTarget(string szShortcutPath, char* szProductCode, char* szFeatureId, char* szComponentCode);
	
	[DllImport("msi.dll", EntryPoint = "#173")]
	internal static extern int MsiGetComponentPath(char* szProduct, char* szComponent, char* lpPathBuf, ref int pcchBuf);
	
	[DllImport("powrprof.dll")]
	internal static extern byte SetSuspendState(byte bHibernate, byte bForce, byte bWakeupEventsDisabled);
	
	[DllImport("powrprof.dll")]
	internal static extern byte IsPwrSuspendAllowed();
	
	//[DllImport("urlmon.dll")]
	//internal static extern int FindMimeFromData(IntPtr pBC, string pwzUrl, byte[] pBuffer, int cbSize, string pwzMimeProposed, uint dwMimeFlags, out string ppwzMimeOut, uint dwReserved);
	
	#endregion
	
	#region struct
	
	internal struct NEWHEADER {
		public ushort wReserved;
		public ushort wResType;
		public ushort wResCount;
	};
	
	[StructLayout(LayoutKind.Sequential, Pack = 2)]
	internal struct ICONDIRENTRY {
		public byte bWidth;
		public byte bHeight;
		public byte bColorCount;
		public byte bReserved;
		public ushort wPlanes;
		public ushort wBitCount;
		public int dwBytesInRes;
		public int dwImageOffset;
	};
	
	#endregion
}


================================================
FILE: Au/Api/Api^kernel32.cs
================================================
namespace Au.Types;

static unsafe partial class Api {
	[DllImport("kernel32.dll", SetLastError = true)] //note: without `SetLastError = true` Marshal.GetLastWin32Error is unaware that we set the code to 0 etc and returns old captured error code
	internal static extern void SetLastError(int errCode);
	
	internal const uint FORMAT_MESSAGE_FROM_SYSTEM = 0x1000;
	internal const uint FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x100;
	internal const uint FORMAT_MESSAGE_IGNORE_INSERTS = 0x200;
	
	[DllImport("kernel32.dll", EntryPoint = "FormatMessageW")]
	internal static extern int FormatMessage(uint dwFlags, IntPtr lpSource, int code, uint dwLanguageId, char** lpBuffer, int nSize, IntPtr Arguments);
	
	[DllImport("kernel32.dll", EntryPoint = "SetDllDirectoryW", SetLastError = true)]
	internal static extern bool SetDllDirectory(string lpPathName);
	
	[SuppressGCTransition] //makes slightly faster. Not faster with [MethodImpl].
	[DllImport("kernel32.dll")]
	internal static extern bool QueryPerformanceCounter(out long lpPerformanceCount);
	
	[DllImport("kernel32.dll")]
	internal static extern bool QueryPerformanceFrequency(out long lpFrequency);
	
	[DllImport("kernel32.dll")]
	internal static extern bool QueryUnbiasedInterruptTime(out long UnbiasedTime);
	
	[DllImport("kernel32.dll")]
	internal static extern long GetTickCount64();
	
	[DllImport("kernel32.dll")]
	internal static extern int GetTickCount();
	
	internal struct SYSTEMTIME {
		public ushort wYear;
		public ushort wMonth;
		public ushort wDayOfWeek;
		public ushort wDay;
		public ushort wHour;
		public ushort wMinute;
		public ushort wSecond;
		public ushort wMilliseconds;
	}
	
	[DllImport("kernel32.dll")]
	internal static extern void GetLocalTime(out SYSTEMTIME lpSystemTime);
	
	[DllImport("kernel32.dll")]
	internal static extern void GetSystemTimeAsFileTime(out long lpSystemTimeAsFileTime);
	
	//[DllImport("kernel32.dll", SetLastError = true)]
	//internal static extern bool GetThreadTimes(IntPtr hThread, out long lpCreationTime, out long lpExitTime, out long lpKernelTime, out long lpUserTime);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool GetProcessTimes(IntPtr hProcess, out long lpCreationTime, out long lpExitTime, out long lpKernelTime, out long lpUserTime);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool GetThreadTimes(IntPtr hThread, out long lpCreationTime, out long lpExitTime, out long lpKernelTime, out long lpUserTime);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern int GetThreadDescription(IntPtr hThread, out char* ppszThreadDescription);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool QueryProcessCycleTime(nint ProcessHandle, out long CycleTime);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool QueryThreadCycleTime(nint ThreadHandle, out long CycleTime);
	
	[DllImport("kernel32.dll")]
	internal static extern bool QueryIdleProcessorCycleTimeEx(ushort Group, ref int BufferLength, long* ProcessorIdleCycleTime);
	
	[DllImport("kernel32.dll")]
	internal static extern ushort GetActiveProcessorGroupCount();
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern int GetThreadPriority(nint hThread);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool SetThreadPriority(nint hThread, int nPriority);
	
	internal const int THREAD_PRIORITY_TIME_CRITICAL = 15;
	
	[DllImport("kernel32.dll", EntryPoint = "CreateEventW", SetLastError = true)]
	internal static extern IntPtr CreateEvent2(IntPtr lpEventAttributes, bool bManualReset, bool bInitialState, string lpName);
	
	internal static Handle_ CreateEvent(bool bManualReset)
		=> new(CreateEvent2(default, bManualReset, false, null));
	
	[DllImport("kernel32.dll", EntryPoint = "OpenEventW", SetLastError = true)]
	internal static extern IntPtr OpenEvent(uint dwDesiredAccess, bool bInheritHandle, string lpName);
	
	internal const uint EVENT_MODIFY_STATE = 0x2;
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool SetEvent(IntPtr hEvent);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool ResetEvent(IntPtr hEvent);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern int WaitForSingleObject(IntPtr hHandle, int dwMilliseconds);
	
	//[DllImport("kernel32.dll")]
	//internal static extern int SignalObjectAndWait(IntPtr hObjectToSignal, IntPtr hObjectToWaitOn, int dwMilliseconds, bool bAlertable);
	//note: don't know why, this often is much slower than setevent/waitforsingleobject.
	
	[DllImport("kernel32.dll")] //note: no SetLastError = true
	internal static extern bool CloseHandle(IntPtr hObject);
	
	//currently not used
	//[DllImport("kernel32.dll")] //note: no SetLastError = true
	//internal static extern bool CloseHandle(HandleRef hObject);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool SetHandleInformation(IntPtr hObject, uint dwMask, uint dwFlags);
	
	[DllImport("kernel32.dll", EntryPoint = "CreateMutexW", SetLastError = true)]
	internal static extern nint CreateMutex(SECURITY_ATTRIBUTES lpMutexAttributes, bool bInitialOwner, string lpName);
	
	[DllImport("kernel32.dll", EntryPoint = "OpenMutexW", SetLastError = true)]
	internal static extern nint OpenMutex(uint dwDesiredAccess, bool bInheritHandle, string lpName);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool ReleaseMutex(nint hMutex);
	
	/// <summary>
	/// Note: use only for private threads. Not everything works like with <c>Thread.Start</c>. For example .NET does not auto-release COM objects when thread ends.
	/// </summary>
	/// <param name="lpStartAddress"><c>[UnmanagedCallersOnly]</c></param>
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern IntPtr CreateThread(nint lpThreadAttributes, nint dwStackSize, delegate* unmanaged<GCHandle, uint> lpStartAddress, GCHandle lpParameter, uint dwCreationFlags, out int lpThreadId);
	
	[DllImport("kernel32.dll")]
	internal static extern IntPtr GetCurrentThread();
	
	[SuppressGCTransition]
	[DllImport("kernel32.dll")]
	internal static extern int GetCurrentThreadId();
	
	[DllImport("kernel32.dll")]
	internal static extern IntPtr GetCurrentProcess();
	
	[SuppressGCTransition]
	[DllImport("kernel32.dll")]
	internal static extern int GetCurrentProcessId();
	
	[DllImport("kernel32.dll", EntryPoint = "QueryFullProcessImageNameW", SetLastError = true)]
	internal static extern bool QueryFullProcessImageName(IntPtr hProcess, bool nativeFormat, char* lpExeName, ref int lpdwSize);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool TerminateProcess(IntPtr hProcess, int uExitCode);
	
	[DllImport("kernel32.dll")]
	internal static extern void ExitProcess(int uExitCode);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool IsWow64Process(IntPtr hProcess, out bool Wow64Process);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern Handle_ CreateFileMapping(IntPtr hFile, SECURITY_ATTRIBUTES lpFileMappingAttributes, uint flProtect, uint dwMaximumSizeHigh, uint dwMaximumSizeLow, string lpName);
	
	[DllImport("kernel32.dll", EntryPoint = "OpenFileMappingW", SetLastError = true)]
	internal static extern Handle_ OpenFileMapping(uint dwDesiredAccess, bool bInheritHandle, string lpName);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern void* MapViewOfFile(IntPtr hFileMappingObject, uint dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, nint dwNumberOfBytesToMap);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool UnmapViewOfFile(void* lpBaseAddress);
	
	[DllImport("kernel32.dll", EntryPoint = "GetModuleHandleW", SetLastError = true)]
	internal static extern IntPtr GetModuleHandle(string name);
	
	//Better use NativeLibrary.TryLoad.
	//Dlls loaded by LoadLibrary don't find other used dlls from the same directory if it's not the app directory. Need LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH, and probably NativeLibrary.TryLoad uses it.
	//[DllImport("kernel32.dll", EntryPoint = "LoadLibraryW", SetLastError = true)]
	//internal static extern IntPtr LoadLibrary(string lpLibFileName);
	
	internal const uint LOAD_LIBRARY_AS_DATAFILE = 0x2;
	
	[DllImport("kernel32.dll", EntryPoint = "LoadLibraryExW", SetLastError = true)]
	internal static extern IntPtr LoadLibraryEx(string lpLibFileName, IntPtr hFile, uint dwFlags);
	
	[DllImport("kernel32.dll")]
	internal static extern bool FreeLibrary(IntPtr hLibModule);
	
	[DllImport("kernel32.dll", BestFitMapping = false, SetLastError = true)]
	internal static extern IntPtr GetProcAddress(IntPtr hModule, [MarshalAs(UnmanagedType.LPStr)] string lpProcName);
	
	internal const uint PROCESS_TERMINATE = 0x0001;
	internal const uint PROCESS_CREATE_THREAD = 0x0002;
	internal const uint PROCESS_SET_SESSIONID = 0x0004;
	internal const uint PROCESS_VM_OPERATION = 0x0008;
	internal const uint PROCESS_VM_READ = 0x0010;
	internal const uint PROCESS_VM_WRITE = 0x0020;
	internal const uint PROCESS_DUP_HANDLE = 0x0040;
	internal const uint PROCESS_CREATE_PROCESS = 0x0080;
	internal const uint PROCESS_SET_QUOTA = 0x0100;
	internal const uint PROCESS_SET_INFORMATION = 0x0200;
	internal const uint PROCESS_QUERY_INFORMATION = 0x0400;
	internal const uint PROCESS_SUSPEND_RESUME = 0x0800;
	internal const uint PROCESS_QUERY_LIMITED_INFORMATION = 0x1000;
	internal const uint PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFFF;
	internal const uint DELETE = 0x00010000;
	internal const uint READ_CONTROL = 0x00020000;
	internal const uint WRITE_DAC = 0x00040000;
	internal const uint WRITE_OWNER = 0x00080000;
	internal const uint SYNCHRONIZE = 0x00100000;
	internal const uint STANDARD_RIGHTS_REQUIRED = 0x000F0000;
	internal const uint STANDARD_RIGHTS_READ = READ_CONTROL;
	internal const uint STANDARD_RIGHTS_WRITE = READ_CONTROL;
	internal const uint STANDARD_RIGHTS_EXECUTE = READ_CONTROL;
	internal const uint STANDARD_RIGHTS_ALL = 0x001F0000;
	internal const uint TIMER_MODIFY_STATE = 0x2;
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern Handle_ OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);
	
	[DllImport("kernel32.dll", EntryPoint = "GetFullPathNameW", SetLastError = true)]
	static extern int _GetFullPathName(string lpFileName, int nBufferLength, char* lpBuffer, char** lpFilePart);
	
	/// <summary>
	/// Calls API <c>GetFullPathName</c>.
	/// Returns <c>false</c> if failed or result is same; then <i>r</i> is <i>s</i>.
	/// <i>r</i> can be same variable as <i>s</i>.
	/// </summary>
	[SkipLocalsInit]
	internal static bool GetFullPathName(string s, out string r) {
		using FastBuffer<char> b = new();
		for (; ; ) if (b.GetString(_GetFullPathName(s, b.n, b.p, null), out r, 0, s)) return (object)r != s;
	}
	
	[DllImport("kernel32.dll", EntryPoint = "GetLongPathNameW", SetLastError = true)]
	static extern int _GetLongPathName(string lpszShortPath, char* lpszLongPath, int cchBuffer);
	
	/// <summary>
	/// Calls API <c>GetFullPathName</c>.
	/// Returns <c>false</c> if failed or result is same; then <i>r</i> is <i>s</i>.
	/// <i>r</i> can be same variable as <i>s</i>.
	/// </summary>
	[SkipLocalsInit]
	internal static bool GetLongPathName(string s, out string r) {
		using FastBuffer<char> b = new();
		for (; ; ) if (b.GetString(_GetLongPathName(s, b.p, b.n), out r, 0, s)) return (object)r != s;
	}
	
	[DllImport("kernel32.dll", EntryPoint = "GetFinalPathNameByHandleW", SetLastError = true)]
	static extern int _GetFinalPathNameByHandle(IntPtr hFile, char* lpszFilePath, int cchFilePath, uint dwFlags);
	
	[SkipLocalsInit]
	internal static bool GetFinalPathNameByHandle(IntPtr h, out string r, uint dwFlags = 0) {
		using FastBuffer<char> b = new();
		for (; ; ) {
			g1: if (b.GetString(_GetFinalPathNameByHandle(h, b.p, b.n, dwFlags), out r, 0)) {
				if (r != null) return r.Length > 0;
				if (0u != (dwFlags & 3u)) { dwFlags &= ~3u; goto g1; } //if VOLUME_NAME_GUID, fails if network path
				return false;
			}
		}
	}
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool ProcessIdToSessionId(int dwProcessId, out int pSessionId);
	
	internal const uint PAGE_NOACCESS = 0x1;
	internal const uint PAGE_READONLY = 0x2;
	internal const uint PAGE_READWRITE = 0x4;
	internal const uint PAGE_WRITECOPY = 0x8;
	internal const uint PAGE_EXECUTE = 0x10;
	internal const uint PAGE_EXECUTE_READ = 0x20;
	internal const uint PAGE_EXECUTE_READWRITE = 0x40;
	internal const uint PAGE_EXECUTE_WRITECOPY = 0x80;
	internal const uint PAGE_GUARD = 0x100;
	internal const uint PAGE_NOCACHE = 0x200;
	internal const uint PAGE_WRITECOMBINE = 0x400;
	
	internal const uint MEM_COMMIT = 0x1000;
	internal const uint MEM_RESERVE = 0x2000;
	internal const uint MEM_DECOMMIT = 0x4000;
	internal const uint MEM_RELEASE = 0x8000;
	internal const uint MEM_RESET = 0x80000;
	internal const uint MEM_TOP_DOWN = 0x100000;
	internal const uint MEM_WRITE_WATCH = 0x200000;
	internal const uint MEM_PHYSICAL = 0x400000;
	internal const uint MEM_RESET_UNDO = 0x1000000;
	internal const uint MEM_LARGE_PAGES = 0x20000000;
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern void* VirtualAlloc(void* lpAddress, nint dwSize, uint flAllocationType = MEM_COMMIT | MEM_RESERVE, uint flProtect = PAGE_READWRITE);
	//note: with PAGE_EXECUTE_READWRITE writing to the memory first time is much slower.
	
	[DllImport("kernel32.dll")]
	internal static extern bool VirtualFree(void* lpAddress, nint dwSize = 0, uint dwFreeType = MEM_RELEASE);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern IntPtr VirtualAllocEx(HandleRef hProcess, IntPtr lpAddress, nint dwSize, uint flAllocationType = MEM_COMMIT | MEM_RESERVE, uint flProtect = PAGE_EXECUTE_READWRITE);
	
	[DllImport("kernel32.dll")]
	internal static extern bool VirtualFreeEx(HandleRef hProcess, IntPtr lpAddress, nint dwSize = 0, uint dwFreeType = MEM_RELEASE);
	
	[DllImport("kernel32.dll", EntryPoint = "GetFileAttributesW", SetLastError = true)]
	internal static extern FileAttributes GetFileAttributes(string lpFileName);
	
	[DllImport("kernel32.dll", EntryPoint = "SetFileAttributesW", SetLastError = true)]
	internal static extern bool SetFileAttributes(string lpFileName, FileAttributes dwFileAttributes);
	
	[StructLayout(LayoutKind.Sequential, Pack = 4)]
	internal struct WIN32_FILE_ATTRIBUTE_DATA {
		public FileAttributes dwFileAttributes;
		public FILETIME ftCreationTime;
		public FILETIME ftLastAccessTime;
		public FILETIME ftLastWriteTime;
		public uint nFileSizeHigh;
		public uint nFileSizeLow;
		public long Size => (long)nFileSizeHigh << 32 | nFileSizeLow;
	}
	
	[DllImport("kernel32.dll", EntryPoint = "GetFileAttributesExW", SetLastError = true)]
	internal static extern bool GetFileAttributesEx(string lpFileName, int zero, out WIN32_FILE_ATTRIBUTE_DATA lpFileInformation);
	
	[DllImport("kernel32.dll", EntryPoint = "SearchPathW", SetLastError = true)]
	static extern int _SearchPath(string lpPath, string lpFileName, string lpExtension, int nBufferLength, char* lpBuffer, char** lpFilePart);
	
	/// <summary>
	/// Calls API <c>SearchPath</c>. Returns full path, or <c>null</c> if not found.
	/// </summary>
	/// <param name="lpPath">Parent directory or <c>null</c>.</param>
	/// <param name="lpFileName"></param>
	/// <param name="lpExtension"><c>null</c> or extension like <c>".ext"</c> to add if <i>lpFileName</i> is without extension.</param>
	[SkipLocalsInit]
	internal static string SearchPath(string lpPath, string lpFileName, string lpExtension = null) {
		using FastBuffer<char> b = new();
		for (; ; ) if (b.GetString(_SearchPath(lpPath, lpFileName, lpExtension, b.n, b.p, null), out var s)) return s;
	}
	
	internal const uint BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE = 0x1;
	internal const uint BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE = 0x10000;
	internal const uint BASE_SEARCH_PATH_PERMANENT = 0x8000;
	
	[DllImport("kernel32.dll")]
	internal static extern bool SetSearchPathMode(uint Flags);
	
	internal const uint SEM_FAILCRITICALERRORS = 0x1;
	internal const uint SEM_NOGPFAULTERRORBOX = 0x2;
	
	[DllImport("kernel32.dll")]
	internal static extern uint SetErrorMode(uint uMode);
	
	//[DllImport("kernel32.dll")]
	//internal static extern uint GetErrorMode();
	
	//[DllImport("kernel32.dll", SetLastError = true)]
	//internal static extern IntPtr LocalAlloc(uint uFlags, nint uBytes);
	
	[DllImport("kernel32.dll")]
	internal static extern IntPtr LocalFree(void* hMem);
	
	[DllImport("kernel32.dll", EntryPoint = "lstrcpynW")]
	internal static extern char* lstrcpyn(char* sTo, string sFrom, int sToBufferLength);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool Wow64DisableWow64FsRedirection(out IntPtr OldValue);
	
	[DllImport("kernel32.dll")]
	internal static extern bool Wow64RevertWow64FsRedirection(IntPtr OlValue);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool GetExitCodeProcess(IntPtr hProcess, out int lpExitCode);
	
	[DllImport("kernel32.dll")]
	internal static extern IntPtr GetProcessHeap();
	[DllImport("kernel32.dll")]
	internal static extern void* HeapAlloc(IntPtr hHeap, uint dwFlags, nint dwBytes);
	[DllImport("kernel32.dll")]
	internal static extern void* HeapReAlloc(IntPtr hHeap, uint dwFlags, void* lpMem, nint dwBytes);
	[DllImport("kernel32.dll")]
	internal static extern bool HeapFree(IntPtr hHeap, uint dwFlags, void* lpMem);
	
	internal const int CP_UTF8 = 65001;
	internal const uint MB_ERR_INVALID_CHARS = 0x8;
	internal const uint WC_ERR_INVALID_CHARS = 0x80;
	
	[DllImport("kernel32.dll")]
	internal static extern int MultiByteToWideChar(uint CodePage, uint dwFlags, byte* lpMultiByteStr, int cbMultiByte, char* lpWideCharStr, int cchWideChar);
	
	[DllImport("kernel32.dll")]
	internal static extern int WideCharToMultiByte(uint CodePage, uint dwFlags, char* lpWideCharStr, int cchWideChar, byte* lpMultiByteStr, int cbMultiByte, IntPtr lpDefaultChar = default, int* lpUsedDefaultChar = null);
	
	[Flags]
	internal enum Access : uint { }
	
	internal const Access FILE_READ_DATA = (Access)0x1;
	internal const Access FILE_LIST_DIRECTORY = (Access)0x1;
	internal const Access FILE_WRITE_DATA = (Access)0x2;
	internal const Access FILE_ADD_FILE = (Access)0x2;
	internal const Access FILE_APPEND_DATA = (Access)0x4;
	internal const Access FILE_ADD_SUBDIRECTORY = (Access)0x4;
	internal const Access FILE_CREATE_PIPE_INSTANCE = (Access)0x4;
	internal const Access FILE_READ_EA = (Access)0x8;
	internal const Access FILE_WRITE_EA = (Access)0x10;
	internal const Access FILE_EXECUTE = (Access)0x20;
	internal const Access FILE_TRAVERSE = (Access)0x20;
	internal const Access FILE_DELETE_CHILD = (Access)0x40;
	internal const Access FILE_READ_ATTRIBUTES = (Access)0x80;
	internal const Access FILE_WRITE_ATTRIBUTES = (Access)0x100;
	internal const Access FILE_ALL_ACCESS = (Access)0x1F01FF;
	internal const Access FILE_GENERIC_READ = (Access)0x120089;
	internal const Access FILE_GENERIC_WRITE = (Access)0x120116;
	internal const Access FILE_GENERIC_EXECUTE = (Access)0x1200A0;
	
	internal const Access GENERIC_READ = (Access)0x80000000;
	internal const Access GENERIC_WRITE = (Access)0x40000000;
	
	internal enum CfCreation { }
	
	internal const CfCreation CREATE_NEW = (CfCreation)1;
	internal const CfCreation CREATE_ALWAYS = (CfCreation)2;
	internal const CfCreation OPEN_EXISTING = (CfCreation)3;
	internal const CfCreation OPEN_ALWAYS = (CfCreation)4;
	internal const CfCreation TRUNCATE_EXISTING = (CfCreation)5;
	
	[Flags]
	internal enum CfShare : uint { }
	
	internal const CfShare FILE_SHARE_READ = (CfShare)0x1;
	internal const CfShare FILE_SHARE_WRITE = (CfShare)0x2;
	internal const CfShare FILE_SHARE_DELETE = (CfShare)0x4;
	internal const CfShare FILE_SHARE_ALL = (CfShare)0x7;
	
	//the commented out attributes are not documented for CreateFile
	internal const uint FILE_ATTRIBUTE_READONLY = 0x1;
	internal const uint FILE_ATTRIBUTE_HIDDEN = 0x2;
	internal const uint FILE_ATTRIBUTE_SYSTEM = 0x4;
	//internal const uint FILE_ATTRIBUTE_DIRECTORY = 0x10;
	internal const uint FILE_ATTRIBUTE_ARCHIVE = 0x20;
	//internal const uint FILE_ATTRIBUTE_DEVICE = 0x40;
	internal const uint FILE_ATTRIBUTE_NORMAL = 0x80;
	internal const uint FILE_ATTRIBUTE_TEMPORARY = 0x100;
	//internal const uint FILE_ATTRIBUTE_SPARSE_FILE = 0x200;
	//internal const uint FILE_ATTRIBUTE_REPARSE_POINT = 0x400;
	//internal const uint FILE_ATTRIBUTE_COMPRESSED = 0x800;
	internal const uint FILE_ATTRIBUTE_OFFLINE = 0x1000;
	//internal const uint FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x2000;
	internal const uint FILE_ATTRIBUTE_ENCRYPTED = 0x4000;
	//internal const uint FILE_ATTRIBUTE_INTEGRITY_STREAM = 0x8000;
	//internal const uint FILE_ATTRIBUTE_VIRTUAL = 0x10000;
	//internal const uint FILE_ATTRIBUTE_NO_SCRUB_DATA = 0x20000;
	
	internal const uint FILE_FLAG_WRITE_THROUGH = 0x80000000;
	internal const uint FILE_FLAG_OVERLAPPED = 0x40000000;
	internal const uint FILE_FLAG_NO_BUFFERING = 0x20000000;
	internal const uint FILE_FLAG_RANDOM_ACCESS = 0x10000000;
	internal const uint FILE_FLAG_SEQUENTIAL_SCAN = 0x8000000;
	internal const uint FILE_FLAG_DELETE_ON_CLOSE = 0x4000000;
	internal const uint FILE_FLAG_BACKUP_SEMANTICS = 0x2000000;
	internal const uint FILE_FLAG_POSIX_SEMANTICS = 0x1000000;
	internal const uint FILE_FLAG_SESSION_AWARE = 0x800000;
	internal const uint FILE_FLAG_OPEN_REPARSE_POINT = 0x200000;
	internal const uint FILE_FLAG_OPEN_NO_RECALL = 0x100000;
	internal const uint FILE_FLAG_FIRST_PIPE_INSTANCE = 0x80000;
	internal const uint FILE_FLAG_OPEN_REQUIRING_OPLOCK = 0x40000;
	
	[DllImport("kernel32.dll", EntryPoint = "CreateFileW", SetLastError = true)]
	static extern IntPtr _CreateFile(string lpFileName, Access dwDesiredAccess, CfShare dwShareMode, SECURITY_ATTRIBUTES lpSecurityAttributes, CfCreation creationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplateFile);
	
	internal static Handle_ CreateFile(string lpFileName, Access dwDesiredAccess, CfShare dwShareMode, CfCreation creationDisposition, uint dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL, IntPtr hTemplateFile = default, SECURITY_ATTRIBUTES lpSecurityAttributes = null)
		=> new Handle_(_CreateFile(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, creationDisposition, dwFlagsAndAttributes, hTemplateFile));
	//note: cannot return Handle_ directly from API because returns -1 if failed. The ctor then makes 0.
	
	//note: not using parameter types SECURITY_ATTRIBUTES and OVERLAPPED* because it makes JIT-compiling much slower in some time-critical places.
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool ReadFile(IntPtr hFile, void* lpBuffer, int nBytesToRead, out int nBytesRead, void* lpOverlapped = null);
	
	internal static bool ReadFileArr(IntPtr hFile, byte[] a, out int nBytesRead, void* lpOverlapped = null) {
		fixed (byte* p = a) return ReadFile(hFile, p, a.Length, out nBytesRead, lpOverlapped);
	}
	
	internal static bool ReadFileArr(IntPtr hFile, out byte[] a, int size, out int nBytesRead, void* lpOverlapped = null) {
		a = new byte[size];
		return ReadFileArr(hFile, a, out nBytesRead, lpOverlapped);
	}
	
	//internal static byte[] ReadFileArr(string file) {
	//	using var h = CreateFile(file, Api.GENERIC_READ, FILE_SHARE_ALL, OPEN_EXISTING);
	//	if (h.Is0 || !GetFileSizeEx(h, out long size) || !ReadFileArr(h, out var a, (int)size, out _)) throw new AuException(0);
	//	return a;
	//}
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool WriteFile(IntPtr hFile, void* lpBuffer, int nBytesToWrite, out int nBytesWritten, void* lpOverlapped = null);
	//note: lpNumberOfBytesWritten can be null only if lpOverlapped is not null.
	
	//note: don't use overloads, because we Jit_.Compile("WriteFile").
	internal static bool WriteFile2(IntPtr hFile, RByte a, out int nBytesWritten) {
		fixed (byte* p = a) return WriteFile(hFile, p, a.Length, out nBytesWritten);
	}
	
	//internal static bool WriteFile2(IntPtr hFile, RByte a, out int nBytesWritten, void* lpOverlapped)
	//{
	//	fixed (byte* p = a) return WriteFile(hFile, p, a.Length, out nBytesWritten, lpOverlapped);
	//}
	
	internal struct OVERLAPPED {
		nint _1, _2;
		int _3, _4;
		public IntPtr hEvent;
	}
	
	[StructLayout(LayoutKind.Sequential, Pack = 4)]
	internal struct BY_HANDLE_FILE_INFORMATION {
		public uint dwFileAttributes;
		public long ftCreationTime;
		public long ftLastAccessTime;
		public long ftLastWriteTime;
		public uint dwVolumeSerialNumber;
		uint _nFileSizeHigh;
		uint _nFileSizeLow;
		public uint nNumberOfLinks;
		uint _nFileIndexHigh;
		uint _nFileIndexLow;
		
		public long FileSize => (long)((ulong)_nFileSizeHigh << 32 | _nFileSizeLow);
		
		public long FileIndex => (long)((ulong)_nFileIndexHigh << 32 | _nFileIndexLow);
	}
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool GetFileInformationByHandle(IntPtr hFile, out BY_HANDLE_FILE_INFORMATION lpFileInformation);
	
	//internal enum FILE_INFO_BY_HANDLE_CLASS
	//{
	//	FileBasicInfo,
	//	FileStandardInfo,
	//	FileNameInfo,
	//	FileRenameInfo,
	//	FileDispositionInfo,
	//	FileAllocationInfo,
	//	FileEndOfFileInfo,
	//	FileStreamInfo,
	//	FileCompressionInfo,
	//	FileAttributeTagInfo,
	//	FileIdBothDirectoryInfo,
	//	FileIdBothDirectoryRestartInfo,
	//	FileIoPriorityHintInfo,
	//	FileRemoteProtocolInfo,
	//	FileFullDirectoryInfo,
	//	FileFullDirectoryRestartInfo,
	//	FileStorageInfo,
	//	FileAlignmentInfo,
	//	FileIdInfo,
	//	FileIdExtdDirectoryInfo,
	//	FileIdExtdDirectoryRestartInfo,
	//	MaximumFileInfoByHandleClass
	//}
	
	//internal struct FILE_BASIC_INFO
	//{
	//	public long CreationTime;
	//	public long LastAccessTime;
	//	public long LastWriteTime;
	//	public long ChangeTime;
	//	public uint FileAttributes;
	//}
	
	//[DllImport("kernel32.dll", SetLastError = true)]
	//internal static extern bool GetFileInformationByHandleEx(IntPtr hFile, int FileInformationClass, void* lpFileInformation, int dwBufferSize);
	
	//[DllImport("kernel32.dll", SetLastError = true)]
	//internal static extern bool SetFileInformationByHandle(IntPtr hFile, int FileInformationClass, void* lpFileInformation, int dwBufferSize);
	
	internal const int FILE_BEGIN = 0;
	internal const int FILE_CURRENT = 1;
	internal const int FILE_END = 2;
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool SetFilePointerEx(IntPtr hFile, long liDistanceToMove, long* lpNewFilePointer, int dwMoveMethod);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool SetEndOfFile(IntPtr hFile);
	
	[DllImport("kernel32.dll", EntryPoint = "CreateMailslotW", SetLastError = true)]
	static extern IntPtr _CreateMailslot(string lpName, uint nMaxMessageSize, int lReadTimeout, SECURITY_ATTRIBUTES lpSecurityAttributes);
	
	internal static Handle_ CreateMailslot(string lpName, uint nMaxMessageSize, int lReadTimeout, SECURITY_ATTRIBUTES lpSecurityAttributes)
		=> new Handle_(_CreateMailslot(lpName, nMaxMessageSize, lReadTimeout, lpSecurityAttributes));
	//note: cannot return Handle_ directly from API because returns -1 if failed. The ctor then makes 0.
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool GetMailslotInfo(IntPtr hMailslot, uint* lpMaxMessageSize, out int lpNextSize, out int lpMessageCount, int* lpReadTimeout = null);
	
	[DllImport("kernel32.dll")]
	internal static extern int GetApplicationUserModelId(IntPtr hProcess, ref int AppModelIDLength, char* sbAppUserModelID);
	
	[DllImport("kernel32.dll", EntryPoint = "GetEnvironmentVariableW", SetLastError = true)]
	static extern int _GetEnvironmentVariable(string lpName, char* lpBuffer, int nSize);
	
	/// <summary>
	/// Calls API <c>GetEnvironmentVariable</c>.
	/// Returns <c>null</c> if variable not found.
	/// Does not support <c>folders.X</c>.
	/// </summary>
	/// <param name="name">Case-insensitive name. Without <c>%</c>.</param>
	[SkipLocalsInit]
	internal static string GetEnvironmentVariable(string name) {
		using FastBuffer<char> b = new();
		for (; ; ) if (b.GetString(_GetEnvironmentVariable(name, b.p, b.n), out var s)) return s;
	}
	
	/// <summary>
	/// Returns <c>true</c> if environment variable exists.
	/// </summary>
	internal static bool EnvironmentVariableExists(string name) => 0 != _GetEnvironmentVariable(name, null, 0);
	
	[DllImport("kernel32.dll", EntryPoint = "SetEnvironmentVariableW", SetLastError = true)]
	internal static extern bool SetEnvironmentVariable(string lpName, string lpValue);
	
	[DllImport("kernel32.dll", EntryPoint = "ExpandEnvironmentStringsW")]
	static extern int _ExpandEnvironmentStrings(string lpSrc, char* lpDst, int nSize);
	
	/// <summary>
	/// Calls API <c>ExpandEnvironmentStrings</c>.
	/// Returns <c>false</c> if failed or result is same; then <i>r</i> is <i>s</i>.
	/// <i>r</i> can be same variable as <i>s</i>.
	/// </summary>
	[SkipLocalsInit]
	internal static bool ExpandEnvironmentStrings(string s, out string r) {
		using FastBuffer<char> b = new();
		for (; ; ) if (b.GetString(_ExpandEnvironmentStrings(s, b.p, b.n), out r, BSFlags.ReturnsLengthWith0, s)) return (object)r != s;
	}
	
	[DllImport("kernel32.dll", EntryPoint = "GetEnvironmentStringsW")]
	internal static extern char* GetEnvironmentStrings();
	
	[DllImport("kernel32.dll", EntryPoint = "FreeEnvironmentStringsW")]
	internal static extern bool FreeEnvironmentStrings(char* penv);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern int GetProcessId(IntPtr Process);
	
	internal struct FILETIME {
		public uint dwLowDateTime;
		public uint dwHighDateTime;
		
		public static implicit operator long(FILETIME ft) => (long)((ulong)ft.dwHighDateTime << 32 | ft.dwLowDateTime);
		public static implicit operator FILETIME(long ft) => new() { dwHighDateTime = (uint)(ft >>> 32), dwLowDateTime = (uint)ft };
	}
	
	internal struct WIN32_FIND_DATA {
		public FileAttributes dwFileAttributes;
		public FILETIME ftCreationTime;
		public FILETIME ftLastAccessTime;
		public FILETIME ftLastWriteTime;
		public uint nFileSizeHigh;
		public uint nFileSizeLow;
		public uint dwReserved0;
		public uint dwReserved1;
		public fixed char cFileName[260];
		public fixed char cAlternateFileName[14];
		
		/// <summary>
		/// Returns <c>cFileName</c> as string, or null if it's <c>".."</c> or <c>"."</c>.
		/// </summary>
		public unsafe string Name {
			get {
				fixed (char* p = cFileName) {
					if (p[0] == '.') {
						if (p[1] == '\0') return null;
						if (p[1] == '.' && p[2] == '\0') return null;
					}
					return new string(p);
				}
			}
		}
		
		/// <summary>
		/// Returns nonzero if this is a NTFS link: 1 symlink, 2 mount, 3 other.
		/// </summary>
		public int IsNtfsLink
			=> dwFileAttributes.Has(FileAttributes.ReparsePoint) && 0 != (dwReserved0 & 0x20000000)
			? dwReserved0 switch { 0xA000000C => 1, 0xA0000003 => 2, _ => 3 }
			: 0;
	}
	
	[DllImport("kernel32.dll", EntryPoint = "FindFirstFileW", SetLastError = true)]
	internal static extern IntPtr FindFirstFile(string lpFileName, out WIN32_FIND_DATA lpFindFileData);
	
	[DllImport("kernel32.dll", EntryPoint = "FindNextFileW", SetLastError = true)]
	internal static extern bool FindNextFile(IntPtr hFindFile, out WIN32_FIND_DATA lpFindFileData);
	
	[DllImport("kernel32.dll")]
	internal static extern bool FindClose(IntPtr hFindFile);
	
#if TEST_FINDFIRSTFILEEX
	internal enum FINDEX_INFO_LEVELS
	{
		FindExInfoStandard,
		FindExInfoBasic,
		FindExInfoMaxInfoLevel
	}

	internal const uint FIND_FIRST_EX_LARGE_FETCH = 0x2;

	[DllImport("kernel32.dll", EntryPoint = "FindFirstFileExW")]
	internal static extern IntPtr FindFirstFileEx(string lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, out WIN32_FIND_DATA lpFindFileData, int fSearchOp, IntPtr lpSearchFilter, uint dwAdditionalFlags);
#endif
	
	internal const uint MOVEFILE_REPLACE_EXISTING = 0x1;
	internal const uint MOVEFILE_COPY_ALLOWED = 0x2;
	internal const uint MOVEFILE_DELAY_UNTIL_REBOOT = 0x4;
	internal const uint MOVEFILE_WRITE_THROUGH = 0x8;
	internal const uint MOVEFILE_CREATE_HARDLINK = 0x10;
	internal const uint MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20;
	
	[DllImport("kernel32.dll", EntryPoint = "MoveFileExW", SetLastError = true)]
	internal static extern bool MoveFileEx(string lpExistingFileName, string lpNewFileName, uint dwFlags);
	
	//[DllImport("kernel32.dll", EntryPoint = "CopyFileW", SetLastError = true)]
	//internal static extern bool CopyFile(string lpExistingFileName, string lpNewFileName, bool bFailIfExists);
	
	internal const uint COPY_FILE_FAIL_IF_EXISTS = 0x1;
	internal const uint COPY_FILE_RESTARTABLE = 0x2;
	internal const uint COPY_FILE_OPEN_SOURCE_FOR_WRITE = 0x4;
	internal const uint COPY_FILE_ALLOW_DECRYPTED_DESTINATION = 0x8;
	internal const uint COPY_FILE_COPY_SYMLINK = 0x800;
	internal const uint COPY_FILE_NO_BUFFERING = 0x1000;
	
	[DllImport("kernel32.dll", EntryPoint = "CopyFileExW", SetLastError = true)]
	static extern bool CopyFileEx(string lpExistingFileName, string lpNewFileName, nint lpProgressRoutine, IntPtr lpData, int* pbCancel, uint dwCopyFlags);
	
	internal static bool CopyFileEx(string lpExistingFileName, string lpNewFileName, uint dwCopyFlags) {
		if (!CopyFileEx(lpExistingFileName, lpNewFileName, 0, 0, null, dwCopyFlags)) return false;
		
		//Workaround for: when copying in Vmware virtual PC from host path like @"\\vmware-host\Shared Folders\...", adds Readonly attribute.
		//	Also GetFileAttributes[Ex] for the source adds Readonly. But FindFirstFile[Ex] doesn't.
		if (GetFileAttributes(lpNewFileName) is var a1 && a1.Has(FileAttributes.ReadOnly) && a1 != (FileAttributes)(-1)) {
			var h = FindFirstFile(lpExistingFileName, out var d);
			if (h != -1) {
				FindClose(h);
				if (!d.dwFileAttributes.Has(FileAttributes.ReadOnly)) {
					Debug_.Print("Readonly attribute");
					SetFileAttributes(lpNewFileName, d.dwFileAttributes);
				}
			}
		}
		
		return true;
	}
	
	[DllImport("kernel32.dll", EntryPoint = "DeleteFileW", SetLastError = true)]
	internal static extern bool DeleteFile(string lpFileName);
	
	[DllImport("kernel32.dll", EntryPoint = "RemoveDirectoryW", SetLastError = true)]
	internal static extern bool RemoveDirectory(string lpPathName);
	
	[DllImport("kernel32.dll", EntryPoint = "CreateDirectoryW", SetLastError = true)]
	internal static extern bool CreateDirectory(string lpPathName, IntPtr lpSecurityAttributes); //ref SECURITY_ATTRIBUTES
	
	[DllImport("kernel32.dll", EntryPoint = "CreateDirectoryExW", SetLastError = true)]
	internal static extern bool CreateDirectoryEx(string lpTemplateDirectory, string lpNewDirectory, IntPtr lpSecurityAttributes); //ref SECURITY_ATTRIBUTES
	
	[DllImport("kernel32.dll", EntryPoint = "ReplaceFileW", SetLastError = true)]
	internal static extern bool ReplaceFile(string lpReplacedFileName, string lpReplacementFileName, string lpBackupFileName, uint dwReplaceFlags, IntPtr lpExclude = default, IntPtr lpReserved = default);
	
	[DllImport("kernel32.dll", EntryPoint = "GlobalAddAtomW")]
	internal static extern ushort GlobalAddAtom(string lpString);
	
	[DllImport("kernel32.dll")]
	internal static extern ushort GlobalDeleteAtom(ushort nAtom);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool ReadProcessMemory(HandleRef hProcess, IntPtr lpBaseAddress, void* lpBuffer, nint nSize, nint* lpNumberOfBytesRead);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool WriteProcessMemory(HandleRef hProcess, IntPtr lpBaseAddress, void* lpBuffer, nint nSize, nint* lpNumberOfBytesWritten);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal extern static IntPtr CreateActCtx(in ACTCTX actctx);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal extern static bool ActivateActCtx(IntPtr hActCtx, out IntPtr lpCookie);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal extern static bool DeactivateActCtx(int dwFlags, IntPtr lpCookie);
	
	[DllImport("kernel32.dll")]
	internal static extern void ReleaseActCtx(IntPtr hActCtx);
	
	internal const int ACTCTX_FLAG_RESOURCE_NAME_VALID = 0x8;
	internal const int ACTCTX_FLAG_HMODULE_VALID = 0x80;
	
	internal struct ACTCTX {
		public int cbSize;
		public uint dwFlags;
		public string lpSource;
		public ushort wProcessorArchitecture;
		public ushort wLangId;
		public IntPtr lpAssemblyDirectory;
		public IntPtr lpResourceName;
		public IntPtr lpApplicationName;
		public IntPtr hModule;
	}
	
	
	//internal const uint THREAD_TERMINATE = 0x1;
	internal const uint THREAD_SUSPEND_RESUME = 0x2;
	internal const uint THREAD_SET_CONTEXT = 0x10;
	internal const uint THREAD_QUERY_LIMITED_INFORMATION = 0x800;
	internal const uint THREAD_ALL_ACCESS = 0x1FFFFF;
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern Handle_ OpenThread(uint dwDesiredAccess, bool bInheritHandle, int dwThreadId);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern int SuspendThread(IntPtr hThread);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern uint ResumeThread(IntPtr hThread);
	
	//[DllImport("kernel32.dll", SetLastError = true)]
	//internal static extern bool TerminateThread(IntPtr hThread, int dwExitCode);
	
	internal const uint GMEM_FIXED = 0x0;
	internal const uint GMEM_MOVEABLE = 0x2;
	internal const uint GMEM_ZEROINIT = 0x40;
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern IntPtr GlobalAlloc(uint uFlags, nint dwBytes);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern IntPtr GlobalFree(IntPtr hMem);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern IntPtr GlobalLock(IntPtr hMem);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool GlobalUnlock(IntPtr hMem);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern nint GlobalSize(IntPtr hMem);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool GetFileSizeEx(IntPtr hFile, out long lpFileSize);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern int WaitForMultipleObjectsEx(int nCount, IntPtr* pHandles, bool bWaitAll, int dwMilliseconds, bool bAlertable);
	
	[DllImport("kernel32.dll")]
	internal static extern int SleepEx(int dwMilliseconds, bool bAlertable);
	
	[DllImport("kernel32.dll", EntryPoint = "GetStartupInfoW")]
	internal static extern void GetStartupInfo(out STARTUPINFO lpStartupInfo);
	
	internal struct STARTUPINFO {
		public int cb;
		public IntPtr lpReserved;
		public char* lpDesktop;
		public char* lpTitle;
		public int dwX;
		public int dwY;
		public int dwXSize;
		public int dwYSize;
		public int dwXCountChars;
		public int dwYCountChars;
		public uint dwFillAttribute;
		public uint dwFlags;
		public ushort wShowWindow;
		public ushort cbReserved2;
		public IntPtr lpReserved2;
		public IntPtr hStdInput;
		public IntPtr hStdOutput;
		public IntPtr hStdError;
	}
	
	internal struct STARTUPINFOEX {
		public STARTUPINFO StartupInfo;
		public IntPtr lpAttributeList;
	}
	
	internal struct PROCESS_INFORMATION : IDisposable {
		public Handle_ hProcess;
		public Handle_ hThread;
		public int dwProcessId;
		public int dwThreadId;
		
		public void Dispose() {
			hThread.Dispose();
			hProcess.Dispose();
		}
	}
	
	//CreateProcess flags
	internal const uint CREATE_SUSPENDED = 0x4;
	internal const uint CREATE_NEW_CONSOLE = 0x10;
	internal const uint CREATE_UNICODE_ENVIRONMENT = 0x400;
	internal const uint EXTENDED_STARTUPINFO_PRESENT = 0x80000;
	//STARTUPINFO flags
	internal const uint STARTF_USESHOWWINDOW = 0x1;
	internal const uint STARTF_FORCEOFFFEEDBACK = 0x80;
	internal const uint STARTF_USESTDHANDLES = 0x100;
	
	[DllImport("kernel32.dll", EntryPoint = "CreateProcessW", SetLastError = true)]
	internal static extern bool CreateProcess(string lpApplicationName, char[] lpCommandLine, SECURITY_ATTRIBUTES lpProcessAttributes, SECURITY_ATTRIBUTES lpThreadAttributes, bool bInheritHandles, uint dwCreationFlags, string lpEnvironment, string lpCurrentDirectory, in STARTUPINFO lpStartupInfo, out PROCESS_INFORMATION lpProcessInformation);
	
	[DllImport("advapi32.dll", EntryPoint = "CreateProcessAsUserW", SetLastError = true)]
	internal static extern bool CreateProcessAsUser(IntPtr hToken, string lpApplicationName, char[] lpCommandLine, SECURITY_ATTRIBUTES lpProcessAttributes, SECURITY_ATTRIBUTES lpThreadAttributes, bool bInheritHandles, uint dwCreationFlags, string lpEnvironment, string lpCurrentDirectory, in STARTUPINFO lpStartupInfo, out PROCESS_INFORMATION lpProcessInformation);
	
	[DllImport("kernel32.dll", EntryPoint = "CreateWaitableTimerW", SetLastError = true)]
	internal static extern Handle_ CreateWaitableTimer(SECURITY_ATTRIBUTES lpTimerAttributes, bool bManualReset, string lpTimerName);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool SetWaitableTimer(IntPtr hTimer, ref long lpDueTime, int lPeriod = 0, IntPtr pfnCompletionRoutine = default, IntPtr lpArgToCompletionRoutine = default, bool fResume = false);
	
	[DllImport("kernel32.dll", EntryPoint = "OpenWaitableTimerW", SetLastError = true)]
	internal static extern Handle_ OpenWaitableTimer(uint dwDesiredAccess, bool bInheritHandle, string lpTimerName);
	
	[DllImport("kernel32.dll", EntryPoint = "GetModuleFileNameW", SetLastError = true)]
	internal static extern int GetModuleFileName(IntPtr hModule, char* lpFilename, int nSize);
	
	internal const uint PIPE_ACCESS_INBOUND = 0x1;
	internal const uint PIPE_ACCESS_OUTBOUND = 0x2;
	internal const uint PIPE_ACCESS_DUPLEX = 0x3;
	internal const uint PIPE_TYPE_MESSAGE = 0x4;
	internal const uint PIPE_READMODE_MESSAGE = 0x2;
	internal const uint PIPE_REJECT_REMOTE_CLIENTS = 0x8;
	
	[DllImport("kernel32.dll", EntryPoint = "CreateNamedPipeW", SetLastError = true)]
	static extern IntPtr _CreateNamedPipe(string lpName, uint dwOpenMode, uint dwPipeMode, uint nMaxInstances, uint nOutBufferSize, uint nInBufferSize, uint nDefaultTimeOut, SECURITY_ATTRIBUTES lpSecurityAttributes);
	
	internal static Handle_ CreateNamedPipe(string lpName, uint dwOpenMode, uint dwPipeMode, uint nMaxInstances, uint nOutBufferSize, uint nInBufferSize, uint nDefaultTimeOut, SECURITY_ATTRIBUTES lpSecurityAttributes)
		=> new Handle_(_CreateNamedPipe(lpName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut, lpSecurityAttributes));
	//note: cannot return Handle_ directly from API because returns -1 if failed. The ctor then makes 0.
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool CreatePipe(out Handle_ hReadPipe, out Handle_ hWritePipe, SECURITY_ATTRIBUTES lpPipeAttributes, uint nSize);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool ConnectNamedPipe(IntPtr hNamedPipe, OVERLAPPED* lpOverlapped);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool DisconnectNamedPipe(IntPtr hNamedPipe);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool GetOverlappedResult(IntPtr hFile, ref OVERLAPPED lpOverlapped, out int lpNumberOfBytesTransferred, bool bWait);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool CancelIo(IntPtr hFile);
	
	[DllImport("kernel32.dll", EntryPoint = "WaitNamedPipeW", SetLastError = true)]
	internal static extern bool WaitNamedPipe(string lpNamedPipeName, int nTimeOut);
	
	//[DllImport("kernel32.dll", EntryPoint = "CallNamedPipeW", SetLastError = true)]
	//internal static extern bool CallNamedPipe(string lpNamedPipeName, void* lpInBuffer, int nInBufferSize, out int lpOutBuffer, int nOutBufferSize, out int lpBytesRead, int nTimeOut);
	
	//[DllImport("kernel32.dll", SetLastError = true)]
	//internal static extern bool GetNamedPipeClientProcessId(IntPtr Pipe, out int ClientProcessId);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool PeekNamedPipe(IntPtr hNamedPipe, void* lpBuffer, int nBufferSize, out int lpBytesRead, out int lpTotalBytesAvail, IntPtr lpBytesLeftThisMessage = default);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool AllocConsole();
	
	[DllImport("kernel32.dll", EntryPoint = "OutputDebugStringW")]
	internal static extern void OutputDebugString(string lpOutputString);
	
	[DllImport("kernel32.dll")]
	internal static extern bool SetProcessWorkingSetSize(IntPtr hProcess, nint dwMinimumWorkingSetSize, nint dwMaximumWorkingSetSize);
	
	//internal struct PROCESS_MEMORY_COUNTERS
	//{
	//	public int cb;
	//	public int PageFaultCount;
	//	public nint PeakWorkingSetSize;
	//	public nint WorkingSetSize;
	//	public nint QuotaPeakPagedPoolUsage;
	//	public nint QuotaPagedPoolUsage;
	//	public nint QuotaPeakNonPagedPoolUsage;
	//	public nint QuotaNonPagedPoolUsage;
	//	public nint PagefileUsage;
	//	public nint PeakPagefileUsage;
	//}
	
	//[DllImport("kernel32.dll", EntryPoint = "K32GetProcessMemoryInfo")]
	//internal static extern bool GetProcessMemoryInfo(IntPtr Process, ref PROCESS_MEMORY_COUNTERS ppsmemCounters, int cb);
	
	[DllImport("kernel32.dll", EntryPoint = "FindResourceW", SetLastError = true)]
	public static extern IntPtr FindResource(IntPtr hModule, nint lpName, nint lpType);
	
	internal const int RT_GROUP_ICON = 14;
	
	//internal const int STD_INPUT_HANDLE = -10;
	internal const int STD_OUTPUT_HANDLE = -11;
	
	[DllImport("kernel32.dll")]
	internal static extern nint GetStdHandle(int nStdHandle);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern uint GetConsoleOutputCP();
	
	[DllImport("kernel32.dll")]
	internal static extern nint SetUnhandledExceptionFilter(nint _);
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern uint QueueUserAPC(delegate* unmanaged<GCHandle, void> pfnAPC, IntPtr hThread, GCHandle dwData);
	
	internal delegate void PAPCFUNC(nint Parameter);
	
	[DllImport("kernel32.dll", EntryPoint = "GetDriveTypeW")]
	internal static extern int GetDriveType(string lpRootPathName);
	
	/// <summary>
	/// Use this API instead of <c>Directory.CreateSymbolicLink</c> which has a bug: does not throw exception when fails (eg non-admin).
	/// Note: the API fails if non-admin.
	///		With flag 2 does not fail if enabled developer mode.
	///		It seems can be enabled for non-admin in <c>gpedit.msc</c>; not tested; google for more info.
	///		Somewhere found this info, but it's incorrect: "Windows 11 doesn’t require administrative privileges to create symbolic links".
	/// </summary>
	/// <param name="dwFlags">1 - directory.</param>
	[DllImport("kernel32.dll", EntryPoint = "CreateSymbolicLinkW", SetLastError = true)]
	[return: MarshalAs(UnmanagedType.U1)] //BOOLEAN
	internal static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, uint dwFlags);
	
	[DllImport("kernel32.dll")]
	internal static extern int GetACP();
	
	[DllImport("kernel32.dll", SetLastError = true)]
	internal static extern bool DeviceIoControl(IntPtr hDevice, int dwIoControlCode, void* lpInBuffer, int nInBufferSize, void* lpOutBuffer, int nOutBufferSize, out int lpBytesReturned, nint lpOverlapped = 0);
	
	internal const int IOCTL_STORAGE_QUERY_PROPERTY = 0x2D1400;
	
	internal struct STORAGE_PROPERTY_QUERY {
		public int PropertyId;
		public int QueryType;
		public byte AdditionalParameters;
	}
	
	internal struct DEVICE_SEEK_PENALTY_DESCRIPTOR {
		public uint Version;
		public uint Size;
		public byte IncursSeekPenalty;
	}
	
	[DllImport("kernel32.dll", EntryPoint = "GetVolumePathNameW", SetLastError = true)]
	internal static extern bool GetVolumePathName(string lpszFileName, char* lpszVolumePathName, int cchBufferLength);
	
	[DllImport("kernel32.dll", EntryPoint = "GetVolumeNameForVolumeMountPointW", SetLastError = true)]
	internal static extern bool GetVolumeNameForVolumeMountPoint(string lpszVolumeMountPoint, char* lpszVolumeName, int cchBufferLength);
	
	[DllImport("kernel32.dll", EntryPoint = "GetCommandLineW")]
	internal static extern char* GetCommandLine();
	
	[DllImport("kernel32.dll")]
	internal static extern int WTSGetActiveConsoleSessionId();
	
	
	
	
	
	#region undocumented
	
	internal delegate int CheckElevationEnabled(out int pResult);
	
	#endregion
}


================================================
FILE: Au/Api/Api^user32.cs
================================================
namespace Au.Types;

//#pragma warning disable 649 //field never assigned

static unsafe partial class Api {
	[DllImport("user32.dll", EntryPoint = "SendMessageW", SetLastError = true)]
	internal static extern nint SendMessage(wnd hWnd, int msg, nint wParam, nint lParam);
	
	[DllImport("user32.dll", EntryPoint = "SendMessageTimeoutW", SetLastError = true)]
	internal static extern nint SendMessageTimeout(wnd hWnd, int Msg, nint wParam, nint lParam, SMTFlags flags, int uTimeout, out nint lpdwResult);
	
	[DllImport("user32.dll", EntryPoint = "SendNotifyMessageW", SetLastError = true)]
	internal static extern bool SendNotifyMessage(wnd hWnd, int Msg, nint wParam, nint lParam);
	
	[DllImport("user32.dll", EntryPoint = "PostMessageW", SetLastError = true)]
	internal static extern bool PostMessage(wnd hWnd, int Msg, nint wParam, nint lParam);
	
	[DllImport("user32.dll", EntryPoint = "PostThreadMessageW", SetLastError = true)]
	internal static extern bool PostThreadMessage(int idThread, int Msg, nint wParam, nint lParam);
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern nint GetWindowLongW(wnd hWnd, int nIndex);
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern nint GetWindowLongPtrW(wnd hWnd, int nIndex);
	
	//info: 32-bit user32.dll does not have GetWindowLongPtrW etc. In C++, in x86 config it is defined as GetWindowLongW etc.
	internal static nint GetWindowLongPtr(wnd w, int nIndex)
		=> IntPtr.Size == 8 ? GetWindowLongPtrW(w, nIndex) : GetWindowLongW(w, nIndex);
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern nint SetWindowLongW(wnd hWnd, int nIndex, nint dwNewLong);
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern nint SetWindowLongPtrW(wnd hWnd, int nIndex, nint dwNewLong);
	
	internal static nint SetWindowLongPtr(wnd w, int nIndex, nint dwNewLong)
		=> IntPtr.Size == 8 ? SetWindowLongPtrW(w, nIndex, dwNewLong) : SetWindowLongW(w, nIndex, dwNewLong);
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern nint GetClassLongW(wnd hWnd, int nIndex);
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern nint GetClassLongPtrW(wnd hWnd, int nIndex);
	
	internal static nint GetClassLongPtr(wnd w, int nIndex)
		=> IntPtr.Size == 8 ? GetClassLongPtrW(w, nIndex) : GetClassLongW(w, nIndex);
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern nint SetClassLongW(wnd hWnd, int nIndex, nint dwNewLong);
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern nint SetClassLongPtrW(wnd hWnd, int nIndex, nint dwNewLong);
	
	internal static nint SetClassLongPtr(wnd w, int nIndex, nint dwNewLong)
		=> IntPtr.Size == 8 ? SetClassLongPtrW(w, nIndex, dwNewLong) : SetClassLongW(w, nIndex, dwNewLong);
	
	[DllImport("user32.dll", EntryPoint = "GetClassNameW", SetLastError = true)]
	internal static extern int GetClassName(wnd hWnd, char* lpClassName, int nMaxCount);
	
	[DllImport("user32.dll", EntryPoint = "InternalGetWindowText", SetLastError = true)]
	internal static extern int InternalGetWindowText(wnd hWnd, char* pString, int cchMaxCount);
	
	[DllImport("user32.dll")]
	internal static extern bool IsWindow(wnd hWnd);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool IsWindowVisible(wnd hWnd);
	
	internal const int SW_HIDE = 0;
	internal const int SW_SHOWNORMAL = 1;
	internal const int SW_SHOWMINIMIZED = 2;
	internal const int SW_SHOWMAXIMIZED = 3;
	internal const int SW_SHOWNOACTIVATE = 4; //restores min/max window
	internal const int SW_SHOW = 5;
	internal const int SW_MINIMIZE = 6;
	internal const int SW_SHOWMINNOACTIVE = 7;
	internal const int SW_SHOWNA = 8;
	internal const int SW_RESTORE = 9;
	internal const int SW_SHOWDEFAULT = 10;
	internal const int SW_FORCEMINIMIZE = 11;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern void ShowWindow(wnd hWnd, int SW_X);
	//note: the return value does not say succeeded/failed.
	//	It is non-zero if was visible, 0 if was hidden.
	//	Declared void to avoid programming errors.
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool IsWindowEnabled(wnd hWnd);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern void EnableWindow(wnd hWnd, bool bEnable);
	//note: the returns value does not say succeeded/failed.
	//	It is non-zero if was disabled, 0 if was enabled.
	//	Declared void to avoid programming errors.
	
	[DllImport("user32.dll", EntryPoint = "FindWindowExW", SetLastError = true)]
	internal static extern wnd _FindWindowEx(wnd hWndParent, wnd hWndChildAfter, string lpszClass, string lpszWindow);
	
	internal static wnd FindWindowEx(wnd wParent = default, wnd wAfter = default, string cn = null, string name = null) {
		//Windows 11 bug: FindWindow[Ex] occasionally returns 0 for an existing window.
		//	Second or third call usually succeeds.
		//	More often fails when there is some activity, eg when Visual Studio compiles/launches an app, or when opening/closing Notepad++.
		//	GetLastError 0.
		//	To reproduce, call every 2 ms, eg to find Notepad by classname.
		//	EnumWindows does not fail.
		//	On Win10 never noticed and cannot reproduce.
		//	Maybe FindWindowEx uses an unsafe loop like with GetWindow. When Z order changes, skips part of windows.
		//	FUTURE: remove this workaround when API fixed. Also in wn::FindWndEx.
		if (osVersion.minWin11) {
			for (int i = 5; --i >= 0;) {
				var w = _FindWindowEx(wParent, wAfter, cn, name);
				if (!w.Is0) return w;
			}
			return default;
		} else {
			return _FindWindowEx(wParent, wAfter, cn, name);
		}
	}
	
	internal struct WNDCLASSEX {
		public int cbSize;
		public uint style;
		public IntPtr lpfnWndProc; //not WNDPROC to avoid auto-marshaling where don't need. Use Marshal.GetFunctionPointerForDelegate/GetDelegateForFunctionPointer.
		public int cbClsExtra;
		public int cbWndExtra;
		public IntPtr hInstance;
		public IntPtr hIcon;
		public IntPtr hCursor;
		public nint hbrBackground;
#pragma warning disable 169
		IntPtr lpszMenuName;
#pragma warning restore 169
		public char* lpszClassName; //not string because CLR would call CoTaskMemFree
		public IntPtr hIconSm;
		
		/// <summary>
		/// If ex <c>null</c>, sets arrow cursor and style <c>CS_VREDRAW | CS_HREDRAW</c>.
		/// </summary>
		public WNDCLASSEX(RWCEtc ex) {
			cbSize = sizeof(WNDCLASSEX);
			if (ex == null) {
				hCursor = LoadCursor(default, MCursor.Arrow);
				style = CS_VREDRAW | CS_HREDRAW;
			} else {
				style = ex.style;
				cbClsExtra = ex.cbClsExtra;
				cbWndExtra = ex.cbWndExtra;
				//hInstance = ex.hInstance;
				hIcon = ex.hIcon;
				if (ex.hCursor != default) hCursor = ex.hCursor; else if (ex.mCursor != default) hCursor = LoadCursor(default, ex.mCursor);
				hbrBackground = ex.hbrBackground;
				hIconSm = ex.hIconSm;
			}
		}
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern ushort RegisterClassEx(in WNDCLASSEX lpwcx);
	
	[DllImport("user32.dll", EntryPoint = "GetClassInfoExW", SetLastError = true)]
	internal static extern ushort GetClassInfoEx(IntPtr hInstance, string lpszClass, ref WNDCLASSEX lpwcx);
	
	[DllImport("user32.dll", EntryPoint = "UnregisterClassW", SetLastError = true)]
	internal static extern bool UnregisterClass(string lpClassName, IntPtr hInstance);
	
	[DllImport("user32.dll", EntryPoint = "UnregisterClassW", SetLastError = true)]
	internal static extern bool UnregisterClass(uint classAtom, IntPtr hInstance);
	
	[DllImport("user32.dll", EntryPoint = "CreateWindowExW", SetLastError = true)]
	internal static extern wnd CreateWindowEx(WSE dwExStyle, string lpClassName, string lpWindowName, WS dwStyle, int x, int y, int nWidth, int nHeight, wnd hWndParent = default, nint hMenu = 0, IntPtr hInstance = default, nint lpParam = 0);
	
	internal const int CW_USEDEFAULT = 1 << 31;
	
	[DllImport("user32.dll", EntryPoint = "DefWindowProcW")]
	internal static extern nint DefWindowProc(wnd hWnd, int msg, nint wParam, nint lParam);
	
	[DllImport("user32.dll", EntryPoint = "CallWindowProcW")]
	internal static extern nint CallWindowProc(nint lpPrevWndFunc, wnd hWnd, int Msg, nint wParam, nint lParam);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool DestroyWindow(wnd hWnd);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern void PostQuitMessage(int nExitCode);
	
	[DllImport("user32.dll", EntryPoint = "GetMessage", SetLastError = true)]
	internal static extern int _GetMessage(out MSG lpMsg, wnd hWnd, int wMsgFilterMin, int wMsgFilterMax);
	
	internal static bool GetMessage(out MSG m, wnd hWnd = default, int wMsgFilterMin = 0, int wMsgFilterMax = 0) {
		int r = _GetMessage(out m, hWnd, wMsgFilterMin, wMsgFilterMax);
		if (r == -1) throw new Win32Exception();
		return r != 0;
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool TranslateMessage(in MSG lpMsg);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern nint DispatchMessage(in MSG lpmsg);
	
	internal const uint PM_NOREMOVE = 0x0;
	internal const uint PM_REMOVE = 0x1;
	internal const uint PM_NOYIELD = 0x2;
	internal const uint PM_QS_SENDMESSAGE = 0x400000;
	internal const uint PM_QS_POSTMESSAGE = 0x980000;
	internal const uint PM_QS_PAINT = 0x200000;
	internal const uint PM_QS_INPUT = 0x1C070000;
	
	[DllImport("user32.dll", EntryPoint = "PeekMessageW", SetLastError = true)]
	internal static extern bool PeekMessage(out MSG lpMsg, wnd hWnd = default, int wMsgFilterMin = 0, int wMsgFilterMax = 0, uint wRemoveMsg = PM_REMOVE);
	
	[DllImport("user32.dll")]
	internal static extern bool WaitMessage();
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool ReplyMessage(nint lResult);
	
	internal const int GA_PARENT = 1;
	internal const int GA_ROOT = 2;
	internal const int GA_ROOTOWNER = 3;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern wnd GetAncestor(wnd hwnd, uint GA_X);
	
	[DllImport("user32.dll")]
	internal static extern wnd GetForegroundWindow();
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool SetForegroundWindow(wnd hWnd);
	
	internal const int ASFW_ANY = -1;
	
#if true
	[DllImport("user32.dll", EntryPoint = "AllowSetForegroundWindow", SetLastError = true)]
	static extern bool _AllowSetForegroundWindow(int dwProcessId);
	
	internal static bool AllowSetForegroundWindow(int dwProcessId = ASFW_ANY) {
		return _AllowSetForegroundWindow(ASFW_ANY);
		//Ignore dwProcessId, because AllowSetForegroundWindow doc says:
		//"The process specified by the dwProcessId parameter loses the ability to set the foreground window the next time that either the user generates input, unless the input is directed at that process, or the next time a process calls AllowSetForegroundWindow, unless the same process is specified as in the previous call to AllowSetForegroundWindow."
		//If it's true (not tested), if we call AllowSetForegroundWindow with a process id, we disable setforegroundwindow in all other processes.
	}
#else
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool AllowSetForegroundWindow(int dwProcessId = ASFW_ANY);
#endif
	
	internal const uint LSFW_LOCK = 1;
	internal const uint LSFW_UNLOCK = 2;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool LockSetForegroundWindow(uint LSFW_X);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern wnd SetFocus(wnd hWnd);
	
	[DllImport("user32.dll")]
	internal static extern wnd GetFocus();
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern wnd SetActiveWindow(wnd hWnd);
	
	[DllImport("user32.dll")]
	internal static extern wnd GetActiveWindow();
	
	internal struct WINDOWPOS {
		public wnd hwnd;
		public wnd hwndInsertAfter;
		public int x;
		public int y;
		public int cx;
		public int cy;
		public SWPFlags flags;
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool SetWindowPos(wnd hWnd, wnd hWndInsertAfter, int X, int Y, int cx, int cy, SWPFlags swpFlags);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr BeginDeferWindowPos(int nNumWindows);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr DeferWindowPos(IntPtr hWinPosInfo, wnd hWnd, wnd hWndInsertAfter, int x, int y, int cx, int cy, SWPFlags uFlags);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool EndDeferWindowPos(IntPtr hWinPosInfo);
	
	internal struct FLASHWINFO {
		public int cbSize;
		public wnd hwnd;
		public uint dwFlags;
		public int uCount;
		public int dwTimeout;
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool FlashWindowEx(ref FLASHWINFO pfwi);
	
	internal const int GW_OWNER = 4;
	internal const int GW_HWNDPREV = 3;
	internal const int GW_HWNDNEXT = 2;
	internal const int GW_HWNDLAST = 1;
	internal const int GW_HWNDFIRST = 0;
	internal const int GW_ENABLEDPOPUP = 6;
	internal const int GW_CHILD = 5;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern wnd GetWindow(wnd hWnd, int GW_X);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern wnd GetTopWindow(wnd hWnd);
	
	//rejected. Obsolete, confusing.
	//	Returns owner for top-level windows with WS_POPUP style.
	//	Returns 0 for child windows without WS_CHILD style, eg message-only windows and QM2 toolbar owners.
	//[DllImport("user32.dll", SetLastError = true)]
	//internal static extern wnd GetParent(wnd hWnd);
	
	[DllImport("user32.dll")]
	internal static extern wnd GetDesktopWindow();
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern wnd GetShellWindow();
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern wnd GetLastActivePopup(wnd hWnd);
	
	[DllImport("user32.dll")]
	internal static extern bool IntersectRect(out RECT lprcDst, in RECT lprcSrc1, in RECT lprcSrc2);
	
	[DllImport("user32.dll")]
	internal static extern bool UnionRect(out RECT lprcDst, in RECT lprcSrc1, in RECT lprcSrc2);
	
	/// <summary>
	/// <c>GetPhysicalCursorPos</c>.
	/// </summary>
	/// <remarks>
	/// Gets DPI physical cursor pos, ie always in pixels.
	/// The classic <c>GetCursorPos</c> API behavior is undefined. Sometimes physical, sometimes logical.
	/// Make sure the process is fully DPI-aware.
	/// </remarks>
	[DllImport("user32.dll", EntryPoint = "GetPhysicalCursorPos", SetLastError = true)]
	internal static extern bool GetCursorPos(out POINT lpPoint);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool SetCursorPos(int X, int Y);
	
	[DllImport("user32.dll", EntryPoint = "LoadImageW", SetLastError = true)]
	internal static extern IntPtr LoadImage(IntPtr hInst, string name, int type, int cx, int cy, uint LR_X);
	[DllImport("user32.dll", EntryPoint = "LoadImageW", SetLastError = true)]
	internal static extern IntPtr LoadImage(IntPtr hInst, nint resId, int type, int cx, int cy, uint LR_X);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr CopyImage(IntPtr h, int type, int cx, int cy, uint flags);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool DestroyIcon(IntPtr hIcon);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool GetWindowRect(wnd hWnd, out RECT lpRect);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool GetClientRect(wnd hWnd, out RECT lpRect);
	
	internal const uint WPF_SETMINPOSITION = 0x1;
	internal const uint WPF_RESTORETOMAXIMIZED = 0x2;
	internal const uint WPF_ASYNCWINDOWPLACEMENT = 0x4;
	
	internal struct WINDOWPLACEMENT {
		public int length;
		/// <summary><c>WPF_x</c></summary>
		public uint flags;
		public int showCmd;
		public POINT ptMinPosition;
		public POINT ptMaxPosition;
		public RECT rcNormalPosition;
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool GetWindowPlacement(wnd hWnd, ref WINDOWPLACEMENT lpwndpl);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool SetWindowPlacement(wnd hWnd, in WINDOWPLACEMENT lpwndpl);
	
	internal struct WINDOWINFO {
		public int cbSize;
		public RECT rcWindow;
		public RECT rcClient;
		public WS dwStyle;
		public WSE dwExStyle;
		public uint dwWindowStatus;
		public int cxWindowBorders;
		public int cyWindowBorders;
		public ushort atomWindowType;
		public ushort wCreatorVersion;
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool GetWindowInfo(wnd hwnd, ref WINDOWINFO pwi);
	
	//[DllImport("user32.dll", SetLastError = true)]
	//internal static extern bool GetTitleBarInfo(wnd hwnd, ref TITLEBARINFO pti);
	
	//internal struct TITLEBARINFO {
	//	public int cbSize;
	//	public RECT r;
	//	public fixed uint rgstate[6];
	//}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool IsZoomed(wnd hWnd);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool IsIconic(wnd hWnd);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern int GetWindowThreadProcessId(wnd hWnd, int* lpdwProcessId);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool IsWindowUnicode(wnd hWnd);
	
	[DllImport("user32.dll", EntryPoint = "GetPropW", SetLastError = true)]
	internal static extern nint GetProp(wnd hWnd, string lpString);
	
	[DllImport("user32.dll", EntryPoint = "GetPropW", SetLastError = true)]
	//internal static extern nint GetProp(wnd hWnd, [MarshalAs(UnmanagedType.SysInt)] ushort atom); //exception, must be U2
	internal static extern nint GetProp(wnd hWnd, nint atom);
	
	[DllImport("user32.dll", EntryPoint = "SetPropW", SetLastError = true)]
	internal static extern bool SetProp(wnd hWnd, string lpString, nint hData);
	
	[DllImport("user32.dll", EntryPoint = "SetPropW", SetLastError = true)]
	internal static extern bool SetProp(wnd hWnd, nint atom, nint hData);
	
	[DllImport("user32.dll", EntryPoint = "RemovePropW", SetLastError = true)]
	internal static extern nint RemoveProp(wnd hWnd, string lpString);
	
	[DllImport("user32.dll", EntryPoint = "RemovePropW", SetLastError = true)]
	internal static extern nint RemoveProp(wnd hWnd, nint atom);
	
	internal delegate bool PROPENUMPROCEX(wnd hwnd, IntPtr lpszString, nint hData, nint dwData);
	
	[DllImport("user32.dll", EntryPoint = "EnumPropsExW", SetLastError = true)]
	internal static extern int EnumPropsEx(wnd hWnd, PROPENUMPROCEX lpEnumFunc, nint lParam);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern wnd GetDlgItem(wnd hDlg, int nIDDlgItem);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern int GetDlgCtrlID(wnd hWnd);
	
	internal delegate int WNDENUMPROC(wnd w, void* p);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool EnumWindows(WNDENUMPROC lpEnumFunc, void* p = null);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool EnumThreadWindows(int dwThreadId, WNDENUMPROC lpEnumFunc, void* p = null);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool EnumChildWindows(wnd hWndParent, WNDENUMPROC lpEnumFunc, void* p = null);
	
	[DllImport("user32.dll", EntryPoint = "RegisterWindowMessageW", SetLastError = true)]
	internal static extern int RegisterWindowMessage(string lpString);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool IsChild(wnd hWndParent, wnd hWnd);
	
	//rejected. As slow as GetAncestor(GA_PARENT).
	//[DllImport("user32.dll", SetLastError = true), Obsolete("Undocumented API")]
	//internal static extern bool IsTopLevelWindow(wnd hWnd);
	
	[DllImport("user32.dll")]
	internal static extern IntPtr MonitorFromPoint(POINT pt, SODefault dwFlags);
	
	[DllImport("user32.dll")]
	internal static extern IntPtr MonitorFromRect(in RECT lprc, SODefault dwFlags);
	
	[DllImport("user32.dll")]
	internal static extern IntPtr MonitorFromWindow(wnd hwnd, SODefault dwFlags);
	
	internal struct MONITORINFO {
		public int cbSize;
		public RECT rcMonitor;
		public RECT rcWork;
		public uint dwFlags;
	}
	
	[DllImport("user32.dll", EntryPoint = "GetMonitorInfoW")]
	static extern bool _GetMonitorInfo(IntPtr hMonitor, ref MONITORINFO lpmi);
	
	internal static bool GetMonitorInfo(IntPtr hMonitor, out MONITORINFO lpmi) {
		lpmi = new MONITORINFO { cbSize = sizeof(MONITORINFO) };
		return _GetMonitorInfo(hMonitor, ref lpmi);
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool EnumDisplayMonitors(nint hdc, RECT* lprcClip, delegate* unmanaged<nint, nint, RECT*, nint*, int> lpfnEnum, nint* a);
	
	#region GetSystemMetrics, SystemParametersInfo
	
	internal const int SM_YVIRTUALSCREEN = 77;
	internal const int SM_XVIRTUALSCREEN = 76;
	internal const int SM_TABLETPC = 86;
	internal const int SM_SWAPBUTTON = 23;
	internal const int SM_STARTER = 88;
	internal const int SM_SLOWMACHINE = 73;
	internal const int SM_SHUTTINGDOWN = 8192;
	internal const int SM_SHOWSOUNDS = 70;
	internal const int SM_SERVERR2 = 89;
	internal const int SM_SECURE = 44;
	internal const int SM_SAMEDISPLAYFORMAT = 81;
	internal const int SM_RESERVED4 = 27;
	internal const int SM_RESERVED3 = 26;
	internal const int SM_RESERVED2 = 25;
	internal const int SM_RESERVED1 = 24;
	internal const int SM_REMOTESESSION = 4096;
	internal const int SM_REMOTECONTROL = 8193;
	internal const int SM_PENWINDOWS = 41;
	internal const int SM_NETWORK = 63;
	internal const int SM_MOUSEWHEELPRESENT = 75;
	internal const int SM_MOUSEPRESENT = 19;
	internal const int SM_MIDEASTENABLED = 74;
	internal const int SM_MENUDROPALIGNMENT = 40;
	internal const int SM_MEDIACENTER = 87;
	internal const int SM_IMMENABLED = 82;
	internal const int SM_DEBUG = 22;
	internal const int SM_DBCSENABLED = 42;
	internal const int SM_CYVTHUMB = 9;
	internal const int SM_CYVSCROLL = 20;
	internal const int SM_CYVIRTUALSCREEN = 79;
	internal const int SM_CYSMSIZE = 53;
	internal const int SM_CYSMICON = 50;
	internal const int SM_CYSMCAPTION = 51;
	internal const int SM_CYSIZEFRAME = SM_CYFRAME;
	internal const int SM_CYSIZE = 31;
	internal const int SM_CYSCREEN = 1;
	internal const int SM_CYMINTRACK = 35;
	internal const int SM_CYMINSPACING = 48;
	internal const int SM_CYMINIMIZED = 58;
	internal const int SM_CYMIN = 29;
	internal const int SM_CYMENUSIZE = 55;
	internal const int SM_CYMENUCHECK = 72;
	internal const int SM_CYMENU = 15;
	internal const int SM_CYMAXTRACK = 60;
	internal const int SM_CYMAXIMIZED = 62;
	internal const int SM_CYKANJIWINDOW = 18;
	internal const int SM_CYICONSPACING = 39;
	internal const int SM_CYICON = 12;
	internal const int SM_CYHSCROLL = 3;
	internal const int SM_CYFULLSCREEN = 17;
	internal const int SM_CYFRAME = 33;
	internal const int SM_CYFOCUSBORDER = 84;
	internal const int SM_CYFIXEDFRAME = SM_CYDLGFRAME;
	internal const int SM_CYEDGE = 46;
	internal const int SM_CYDRAG = 69;
	internal const int SM_CYDOUBLECLK = 37;
	internal const int SM_CYDLGFRAME = 8;
	internal const int SM_CYCURSOR = 14;
	internal const int SM_CYCAPTION = 4;
	internal const int SM_CYBORDER = 6;
	internal const int SM_CXVSCROLL = 2;
	internal const int SM_CXVIRTUALSCREEN = 78;
	internal const int SM_CXSMSIZE = 52;
	internal const int SM_CXSMICON = 49;
	internal const int SM_CXSIZEFRAME = SM_CXFRAME;
	internal const int SM_CXSIZE = 30;
	internal const int SM_CXSCREEN = 0;
	internal const int SM_CXMINTRACK = 34;
	internal const int SM_CXMINSPACING = 47;
	internal const int SM_CXMINIMIZED = 57;
	internal const int SM_CXMIN = 28;
	internal const int SM_CXMENUSIZE = 54;
	internal const int SM_CXMENUCHECK = 71;
	internal const int SM_CXMAXTRACK = 59;
	internal const int SM_CXMAXIMIZED = 61;
	internal const int SM_CXICONSPACING = 38;
	internal const int SM_CXICON = 11;
	internal const int SM_CXHTHUMB = 10;
	internal const int SM_CXHSCROLL = 21;
	internal const int SM_CXFULLSCREEN = 16;
	internal const int SM_CXFRAME = 32;
	internal const int SM_CXFOCUSBORDER = 83;
	internal const int SM_CXFIXEDFRAME = SM_CXDLGFRAME;
	internal const int SM_CXEDGE = 45;
	internal const int SM_CXDRAG = 68;
	internal const int SM_CXDOUBLECLK = 36;
	internal const int SM_CXDLGFRAME = 7;
	internal const int SM_CXCURSOR = 13;
	internal const int SM_CXBORDER = 5;
	internal const int SM_CMOUSEBUTTONS = 43;
	internal const int SM_CMONITORS = 80;
	internal const int SM_CMETRICS = 90;
	internal const int SM_CLEANBOOT = 67;
	internal const int SM_CARETBLINKINGENABLED = 8194;
	internal const int SM_ARRANGE = 56;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern int GetSystemMetrics(int nIndex);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern int GetSystemMetricsForDpi(int nIndex, int dpi);
	
	internal const int SPI_SETWORKAREA = 47;
	internal const int SPI_SETWHEELSCROLLLINES = 105;
	internal const int SPI_SETUIEFFECTS = 4159;
	internal const int SPI_SETTOOLTIPFADE = 4121;
	internal const int SPI_SETTOOLTIPANIMATION = 4119;
	internal const int SPI_SETTOGGLEKEYS = 53;
	internal const int SPI_SETSTICKYKEYS = 59;
	internal const int SPI_SETSOUNDSENTRY = 65;
	internal const int SPI_SETSNAPTODEFBUTTON = 96;
	internal const int SPI_SETSHOWSOUNDS = 57;
	internal const int SPI_SETSHOWIMEUI = 111;
	internal const int SPI_SETSERIALKEYS = 63;
	internal const int SPI_SETSELECTIONFADE = 4117;
	internal const int SPI_SETSCREENSAVETIMEOUT = 15;
	internal const int SPI_SETSCREENSAVERRUNNING = 97;
	internal const int SPI_SETSCREENSAVEACTIVE = 17;
	internal const int SPI_SETSCREENREADER = 71;
	internal const int SPI_SETPOWEROFFTIMEOUT = 82;
	internal const int SPI_SETPOWEROFFACTIVE = 86;
	internal const int SPI_SETPENWINDOWS = 49;
	internal const int SPI_SETNONCLIENTMETRICS = 42;
	internal const int SPI_SETMOUSEVANISH = 4129;
	internal const int SPI_SETMOUSETRAILS = 93;
	internal const int SPI_SETMOUSESPEED = 113;
	internal const int SPI_SETMOUSESONAR = 4125;
	internal const int SPI_SETMOUSEKEYS = 55;
	internal const int SPI_SETMOUSEHOVERWIDTH = 99;
	internal const int SPI_SETMOUSEHOVERTIME = 103;
	internal const int SPI_SETMOUSEHOVERHEIGHT = 101;
	internal const int SPI_SETMOUSECLICKLOCKTIME = 8201;
	internal const int SPI_SETMOUSECLICKLOCK = 4127;
	internal const int SPI_SETMOUSEBUTTONSWAP = 33;
	internal const int SPI_SETMOUSE = 4;
	internal const int SPI_SETMINIMIZEDMETRICS = 44;
	internal const int SPI_SETMENUUNDERLINES = SPI_SETKEYBOARDCUES;
	internal const int SPI_SETMENUSHOWDELAY = 107;
	internal const int SPI_SETMENUFADE = 4115;
	internal const int SPI_SETMENUDROPALIGNMENT = 28;
	internal const int SPI_SETMENUANIMATION = 4099;
	internal const int SPI_SETLOWPOWERTIMEOUT = 81;
	internal const int SPI_SETLOWPOWERACTIVE = 85;
	internal const int SPI_SETLISTBOXSMOOTHSCROLLING = 4103;
	internal const int SPI_SETLANGTOGGLE = 91;
	internal const int SPI_SETKEYBOARDSPEED = 11;
	internal const int SPI_SETKEYBOARDPREF = 69;
	internal const int SPI_SETKEYBOARDDELAY = 23;
	internal const int SPI_SETKEYBOARDCUES = 4107;
	internal const int SPI_SETICONTITLEWRAP = 26;
	internal const int SPI_SETICONTITLELOGFONT = 34;
	internal const int SPI_SETICONS = 88;
	internal const int SPI_SETICONMETRICS = 46;
	internal const int SPI_SETHOTTRACKING = 4111;
	internal const int SPI_SETHIGHCONTRAST = 67;
	internal const int SPI_SETHANDHELD = 78;
	internal const int SPI_SETGRIDGRANULARITY = 19;
	internal const int SPI_SETGRADIENTCAPTIONS = 4105;
	internal const int SPI_SETFOREGROUNDLOCKTIMEOUT = 8193;
	internal const int SPI_SETFOREGROUNDFLASHCOUNT = 8197;
	internal const int SPI_SETFONTSMOOTHINGTYPE = 8203;
	internal const int SPI_SETFONTSMOOTHINGORIENTATION = 8211;
	internal const int SPI_SETFONTSMOOTHINGCONTRAST = 8205;
	internal const int SPI_SETFONTSMOOTHING = 75;
	internal const int SPI_SETFOCUSBORDERWIDTH = 8207;
	internal const int SPI_SETFOCUSBORDERHEIGHT = 8209;
	internal const int SPI_SETFLATMENU = 4131;
	internal const int SPI_SETFILTERKEYS = 51;
	internal const int SPI_SETFASTTASKSWITCH = 36;
	internal const int SPI_SETDROPSHADOW = 4133;
	internal const int SPI_SETDRAGWIDTH = 76;
	internal const int SPI_SETDRAGHEIGHT = 77;
	internal const int SPI_SETDRAGFULLWINDOWS = 37;
	internal const int SPI_SETDOUBLECLKWIDTH = 29;
	internal const int SPI_SETDOUBLECLKHEIGHT = 30;
	internal const int SPI_SETDOUBLECLICKTIME = 32;
	internal const int SPI_SETDESKWALLPAPER = 20;
	internal const int SPI_SETDESKPATTERN = 21;
	internal const int SPI_SETDEFAULTINPUTLANG = 90;
	internal const int SPI_SETCURSORSHADOW = 4123;
	internal const int SPI_SETCURSORS = 87;
	internal const int SPI_SETCOMBOBOXANIMATION = 4101;
	internal const int SPI_SETCARETWIDTH = 8199;
	internal const int SPI_SETBORDER = 6;
	internal const int SPI_SETBLOCKSENDINPUTRESETS = 4135;
	internal const int SPI_SETBEEP = 2;
	internal const int SPI_SETANIMATION = 73;
	internal const int SPI_SETACTIVEWNDTRKZORDER = 4109;
	internal const int SPI_SETACTIVEWNDTRKTIMEOUT = 8195;
	internal const int SPI_SETACTIVEWINDOWTRACKING = 4097;
	internal const int SPI_SETACCESSTIMEOUT = 61;
	internal const int SPI_LANGDRIVER = 12;
	internal const int SPI_ICONVERTICALSPACING = 24;
	internal const int SPI_ICONHORIZONTALSPACING = 13;
	internal const int SPI_GETWORKAREA = 48;
	internal const int SPI_GETWINDOWSEXTENSION = 92;
	internal const int SPI_GETWHEELSCROLLLINES = 104;
	internal const int SPI_GETUIEFFECTS = 4158;
	internal const int SPI_GETTOOLTIPFADE = 4120;
	internal const int SPI_GETTOOLTIPANIMATION = 4118;
	internal const int SPI_GETTOGGLEKEYS = 52;
	internal const int SPI_GETSTICKYKEYS = 58;
	internal const int SPI_GETSOUNDSENTRY = 64;
	internal const int SPI_GETSNAPTODEFBUTTON = 95;
	internal const int SPI_GETSHOWSOUNDS = 56;
	internal const int SPI_GETSHOWIMEUI = 110;
	internal const int SPI_GETSERIALKEYS = 62;
	internal const int SPI_GETSELECTIONFADE = 4116;
	internal const int SPI_GETSCREENSAVETIMEOUT = 14;
	internal const int SPI_GETSCREENSAVERRUNNING = 114;
	internal const int SPI_GETSCREENSAVEACTIVE = 16;
	internal const int SPI_GETSCREENREADER = 70;
	internal const int SPI_GETPOWEROFFTIMEOUT = 80;
	internal const int SPI_GETPOWEROFFACTIVE = 84;
	internal const int SPI_GETNONCLIENTMETRICS = 41;
	internal const int SPI_GETMOUSEVANISH = 4128;
	internal const int SPI_GETMOUSETRAILS = 94;
	internal const int SPI_GETMOUSESPEED = 112;
	internal const int SPI_GETMOUSESONAR = 4124;
	internal const int SPI_GETMOUSEKEYS = 54;
	internal const int SPI_GETMOUSEHOVERWIDTH = 98;
	internal const int SPI_GETMOUSEHOVERTIME = 102;
	internal const int SPI_GETMOUSEHOVERHEIGHT = 100;
	internal const int SPI_GETMOUSECLICKLOCKTIME = 8200;
	internal const int SPI_GETMOUSECLICKLOCK = 4126;
	internal const int SPI_GETMOUSE = 3;
	internal const int SPI_GETMINIMIZEDMETRICS = 43;
	internal const int SPI_GETMENUUNDERLINES = SPI_GETKEYBOARDCUES;
	internal const int SPI_GETMENUSHOWDELAY = 106;
	internal const int SPI_GETMENUFADE = 4114;
	internal const int SPI_GETMENUDROPALIGNMENT = 27;
	internal const int SPI_GETMENUANIMATION = 4098;
	internal const int SPI_GETLOWPOWERTIMEOUT = 79;
	internal const int SPI_GETLOWPOWERACTIVE = 83;
	internal const int SPI_GETLISTBOXSMOOTHSCROLLING = 4102;
	internal const int SPI_GETKEYBOARDSPEED = 10;
	internal const int SPI_GETKEYBOARDPREF = 68;
	internal const int SPI_GETKEYBOARDDELAY = 22;
	internal const int SPI_GETKEYBOARDCUES = 4106;
	internal const int SPI_GETICONTITLEWRAP = 25;
	internal const int SPI_GETICONTITLELOGFONT = 31;
	internal const int SPI_GETICONMETRICS = 45;
	internal const int SPI_GETHOTTRACKING = 4110;
	internal const int SPI_GETHIGHCONTRAST = 66;
	internal const int SPI_GETGRIDGRANULARITY = 18;
	internal const int SPI_GETGRADIENTCAPTIONS = 4104;
	internal const int SPI_GETFOREGROUNDLOCKTIMEOUT = 8192;
	internal const int SPI_GETFOREGROUNDFLASHCOUNT = 8196;
	internal const int SPI_GETFONTSMOOTHINGTYPE = 8202;
	internal const int SPI_GETFONTSMOOTHINGORIENTATION = 8210;
	internal const int SPI_GETFONTSMOOTHINGCONTRAST = 8204;
	internal const int SPI_GETFONTSMOOTHING = 74;
	internal const int SPI_GETFOCUSBORDERWIDTH = 8206;
	internal const int SPI_GETFOCUSBORDERHEIGHT = 8208;
	internal const int SPI_GETFLATMENU = 4130;
	internal const int SPI_GETFILTERKEYS = 50;
	internal const int SPI_GETFASTTASKSWITCH = 35;
	internal const int SPI_GETDROPSHADOW = 4132;
	internal const int SPI_GETDRAGFULLWINDOWS = 38;
	internal const int SPI_GETDESKWALLPAPER = 115;
	internal const int SPI_GETDEFAULTINPUTLANG = 89;
	internal const int SPI_GETCURSORSHADOW = 4122;
	internal const int SPI_GETCOMBOBOXANIMATION = 4100;
	internal const int SPI_GETCARETWIDTH = 8198;
	internal const int SPI_GETBORDER = 5;
	internal const int SPI_GETBLOCKSENDINPUTRESETS = 4134;
	internal const int SPI_GETBEEP = 1;
	internal const int SPI_GETANIMATION = 72;
	internal const int SPI_GETACTIVEWNDTRKZORDER = 4108;
	internal const int SPI_GETACTIVEWNDTRKTIMEOUT = 8194;
	internal const int SPI_GETACTIVEWINDOWTRACKING = 4096;
	internal const int SPI_GETACCESSTIMEOUT = 60;
	internal const int SPI_GETMOUSEWHEELROUTING = 0x201C;
	
	internal const uint SPIF_UPDATEINIFILE = 0x1;
	internal const uint SPIF_SENDCHANGE = 0x2;
	
	/// <summary>
	/// Gets or sets any value. This is the direct API call.
	/// </summary>
	[DllImport("user32.dll", EntryPoint = "SystemParametersInfoW", SetLastError = true)]
	internal static extern bool SystemParametersInfo(uint uiAction, int uiParam, void* pvParam, uint fWinIni = 0);
	
	/// <summary>
	/// Gets 32-bit integer value. Returns <i>def</i> if failed.
	/// </summary>
	internal static int SystemParametersInfo(uint uiAction, int def) {
		int r = 0;
		return SystemParametersInfo(uiAction, 0, &r) ? r : def;
	}
	
	/// <summary>
	/// Gets <c>BOOL</c> value. Returns <c>false</c> if failed.
	/// </summary>
	internal static bool SystemParametersInfo(uint uiAction) {
		int r = 0;
		return SystemParametersInfo(uiAction, 0, &r) && r != 0;
	}
	
	//internal static bool SystemParametersInfo<T>(uint uiAction, ref T pvParam) where T : unmanaged {
	//	fixed (T* p = &pvParam) return SystemParametersInfo(uiAction, sizeof(T), p, 0);
	//}
	
	/// <summary>
	/// Sets value.
	/// </summary>
	internal static bool SystemParametersInfo(uint uiAction, int uiParam, void* pvParam, bool save, bool notify) {
		uint f = 0;
		if (save) f |= 1; //SPIF_UPDATEINIFILE
		if (notify) f |= 2; //SPIF_SENDCHANGE
		return SystemParametersInfo(uiAction, uiParam, pvParam, f);
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool SystemParametersInfoForDpi(uint uiAction, int uiParam, void* pvParam, uint fWinIni, int dpi);
	
	#endregion
	
	/// <summary>
	/// <c>WindowFromPhysicalPoint</c>. On Win8.1+ it is the same as <c>WindowFromPoint</c>.
	/// </summary>
	[DllImport("user32.dll", EntryPoint = "WindowFromPhysicalPoint")]
	internal static extern wnd WindowFromPoint(POINT pt);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool ScreenToClient(wnd hWnd, ref POINT lpPoint);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool ClientToScreen(wnd hWnd, ref POINT lpPoint);
	
	//internal static bool ClientToScreenIgnoreRtl(wnd w, ref POINT p)
	//{
	//	if(!w.HasExStyle(WSE.LAYOUTRTL)) return ClientToScreen(w, ref p);
	//	if(!GetClientRect(w, out var r) || !MapWindowPoints(w, default, ref r, out _)) return false;
	//	p.Offset(r.left, r.top);
	//	return true;
	//}
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern int MapWindowPoints(wnd hWndFrom, wnd hWndTo, void* lpPoints, int cPoints);
	
	internal static bool MapWindowPoints(wnd wFrom, wnd wTo, void* points, int cPoints, out int ret) {
		lastError.clear();
		ret = MapWindowPoints(wFrom, wTo, points, cPoints);
		return ret != 0 ? true : lastError.code == 0;
	}
	
	internal static bool MapWindowPoints(wnd wFrom, wnd wTo, ref RECT r, out int ret) {
		fixed (void* u = &r) return MapWindowPoints(wFrom, wTo, u, 2, out ret);
	}
	
	internal static bool MapWindowPoints(wnd wFrom, wnd wTo, ref POINT p, out int ret) {
		fixed (void* u = &p) return MapWindowPoints(wFrom, wTo, u, 1, out ret);
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool GetGUIThreadInfo(int idThread, ref GUITHREADINFO pgui);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool AttachThreadInput(int idAttach, int idAttachTo, bool fAttach);
	
	internal const uint KEYEVENTF_EXTENDEDKEY = 0x1;
	internal const uint KEYEVENTF_KEYUP = 0x2;
	internal const uint KEYEVENTF_UNICODE = 0x4;
	internal const uint KEYEVENTF_SCANCODE = 0x8;
	
	internal struct INPUTK {
		nint _type;
		public ushort wVk;
		public ushort wScan;
		public uint dwFlags;
		public int time;
		public nint dwExtraInfo;
#pragma warning disable 414 //never used
		int _u1, _u2; //need INPUT size
#pragma warning restore 414
		
		public INPUTK(KKey vk, ushort sc, uint flags = 0) {
			_type = INPUT_KEYBOARD; dwExtraInfo = AuExtraInfo;
			wVk = (ushort)vk; wScan = sc; dwFlags = flags;
			time = 0; _u2 = _u1 = 0;
			Debug.Assert(sizeof(INPUTK) == sizeof(INPUTM));
		}
		
		public void Set(KKey vk, ushort sc, uint flags = 0) {
			_type = INPUT_KEYBOARD; dwExtraInfo = AuExtraInfo;
			wVk = (ushort)vk; wScan = sc; dwFlags = flags;
		}
		
		//public void InitCommonFields()
		//{
		//	_type = INPUT_KEYBOARD; dwExtraInfo = AuExtraInfo;
		//}
		
		const int INPUT_KEYBOARD = 1;
	}
	
	[Flags]
	internal enum IMFlags : uint {
		Move = 1,
		LeftDown = 2, LeftUp = 4,
		RightDown = 8, RightUp = 16,
		MiddleDown = 32, MiddleUp = 64,
		XDown = 0x80, XUp = 0x100,
		Wheel = 0x0800, HWheel = 0x01000,
		NoCoalesce = 0x2000,
		VirtualdDesktop = 0x4000,
		Absolute = 0x8000,
		//not API
		X1 = 0x1000000,
		X2 = 0x2000000,
	};
	
	internal struct INPUTM {
		nint _type;
		public int dx;
		public int dy;
		public int mouseData;
		public IMFlags dwFlags;
		public int time;
		public nint dwExtraInfo;
		
		public INPUTM(IMFlags flags, int x = 0, int y = 0, int data = 0) {
			_type = INPUT_MOUSE;
			dx = x; dy = y; dwFlags = flags; mouseData = data;
			time = 0; dwExtraInfo = AuExtraInfo;
		}
		
		const int INPUT_MOUSE = 0;
	}
	
	/// <summary>
	/// Extra info value of key and mouse events sent by functions of this library.
	/// </summary>
	internal const int AuExtraInfo = 0x71427fa5;
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern int SendInput(int cInputs, void* pInputs, int cbSize);
	//tested: Returns 0 when: invalid argument; other desktop active.
	//	Does not return 0 when: UAC (documented); BlockInput; ClipCursor.
	
	/// <exception cref="InputDesktopException"></exception>
	internal static void SendInput(INPUTK* ip, int n = 1, bool dontThrow = false) {
		if (n != SendInput(n, ip, sizeof(INPUTK))) {
			if (!dontThrow) InputDesktopException.ThrowIfBadDesktop("*send keyboard input.");
			//tested: if bad input desktop, GetLastError returns 'access denied'.
			
			//throw new AuException("*send keyboard input."); //rejected. Anyway in most cases cannot detect when fails (because API returns not 0).
			Debug_.Print($"SendInput(key) failed. {lastError.message}");
		}
	}
	
	/// <exception cref="InputDesktopException"></exception>
	internal static void SendInput(INPUTM* ip, int n = 1, bool dontThrow = false) {
		if (n != SendInput(n, ip, sizeof(INPUTM))) {
			if (!dontThrow) InputDesktopException.ThrowIfBadDesktop("*send mouse input.");
			
			//throw new AuException("*send mouse input.");
			Debug_.Print($"SendInput(mouse) failed. {lastError.message}");
		}
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool IsHungAppWindow(wnd hwnd);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool SetLayeredWindowAttributes(wnd hwnd, uint crKey, byte bAlpha, uint dwFlags);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool GetLayeredWindowAttributes(wnd hwnd, out uint pcrKey, out byte pbAlpha, out uint pdwFlags);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr CreateIcon(IntPtr hInstance, int nWidth, int nHeight, byte cPlanes, byte cBitsPixel, byte[] lpbANDbits, byte[] lpbXORbits);
	
	[DllImport("user32.dll", EntryPoint = "LoadCursorW", SetLastError = true)]
	internal static extern IntPtr LoadCursor(IntPtr hInstance, MCursor cursorId);
	
	internal delegate void TIMERPROC(wnd param1, int param2, nint param3, uint param4);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern nint SetTimer(wnd hWnd, nint nIDEvent, int uElapse, TIMERPROC lpTimerFunc);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool KillTimer(wnd hWnd, nint uIDEvent);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern wnd SetParent(wnd hWndChild, wnd hWndNewParent);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool AdjustWindowRectEx(ref RECT lpRect, WS dwStyle, bool bMenu, WSE dwExStyle);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool AdjustWindowRectExForDpi(ref RECT lpRect, WS dwStyle, bool bMenu, WSE dwExStyle, int dpi);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool ChangeWindowMessageFilter(int message, uint dwFlag);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern short GetKeyState(int nVirtKey); //not KKey because it is :byte
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern short GetAsyncKeyState(int vKey); //not KKey because it is :byte
	
	internal const uint MOD_ALT = 0x1;
	internal const uint MOD_CONTROL = 0x2;
	internal const uint MOD_SHIFT = 0x4;
	internal const uint MOD_WIN = 0x8;
	internal const uint MOD_NOREPEAT = 0x4000;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool RegisterHotKey(wnd hWnd, int id, uint fsModifiers, KKey vk);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool UnregisterHotKey(wnd hWnd, int id);
	
	internal const uint MWMO_WAITALL = 0x1;
	internal const uint MWMO_ALERTABLE = 0x2;
	internal const uint MWMO_INPUTAVAILABLE = 0x4;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern int MsgWaitForMultipleObjectsEx(int nCount, IntPtr* pHandles, int dwMilliseconds, uint dwWakeMask, uint MWMO_Flags);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool InvalidateRect(wnd hWnd, RECT* lpRect, bool bErase);
	internal static bool InvalidateRect(wnd hWnd, bool bErase = false) => InvalidateRect(hWnd, null, bErase);
	internal static bool InvalidateRect(wnd hWnd, RECT r, bool bErase = false) => InvalidateRect(hWnd, &r, bErase);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool ValidateRect(wnd hWnd, RECT* lpRect);
	internal static bool ValidateRect(wnd hWnd) => ValidateRect(hWnd, null);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool GetUpdateRect(wnd hWnd, out RECT lpRect, bool bErase);
	
	internal const int ERROR = 0;
	internal const int NULLREGION = 1;
	internal const int SIMPLEREGION = 2;
	internal const int COMPLEXREGION = 3;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern int GetUpdateRgn(wnd hWnd, IntPtr hRgn, bool bErase);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool InvalidateRgn(wnd hWnd, IntPtr hRgn, bool bErase);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool DragDetect(wnd hwnd, POINT pt);
	
	[DllImport("user32.dll")]
	internal static extern IntPtr GetCursor();
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr SetCursor(IntPtr hCursor);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern wnd SetCapture(wnd hWnd);
	
	[DllImport("user32.dll")]
	internal static extern wnd GetCapture();
	
	[DllImport("user32.dll")]
	internal static extern bool ReleaseCapture();
	
	//[DllImport("user32.dll", EntryPoint = "CharLowerBuffW")]
	//internal static unsafe extern int CharLowerBuff(char* lpsz, int cchLength);
	
	//[DllImport("user32.dll", CallingConvention = CallingConvention.Cdecl)]
	//internal static extern int wsprintfW(char* lpOut1024, string lpFmt, __arglist);
	//note: with __arglist always returns 0. Could instead use void*, but then much work to properly pack arguments.
	
	//tested speed (time %) of various formatting functions, with two int and one string arg, with converting to string:
	//	StringBuilder.Append + int.ToString(CultureInfo.InvariantCulture): 85% - FASTEST
	//	StringBuilder.Append: 100%
	//	StringBuilder.AppendFormat + int.ToString() (avoid int boxing): 140%
	//	StringBuilder.AppendFormat: 150%
	//	$"{var} string": 160% (probably uses StringBuilder)
	//	wsprintfW (user32.dll): 150%
	//	_snwprintf (msvcrt.dll): 500% - SLOWEST
	
	[DllImport("user32.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
	internal static extern int wsprintfA(byte* lpOut1024, string lpFmt, __arglist);
	
	[DllImport("user32.dll", CallingConvention = CallingConvention.Cdecl)]
	internal static extern int wsprintfW(char* lpOut1024, string lpFmt, __arglist);
	
	internal struct PAINTSTRUCT {
		public IntPtr hdc;
		public bool fErase;
		public RECT rcPaint;
		public bool fRestore;
		public bool fIncUpdate;
		fixed byte rgbReserved[32];
	}
	
	[DllImport("user32.dll")]
	internal static extern IntPtr BeginPaint(wnd hWnd, out PAINTSTRUCT lpPaint);
	
	[DllImport("user32.dll")]
	internal static extern bool EndPaint(wnd hWnd, in PAINTSTRUCT lpPaint);
	
	[DllImport("user32.dll")]
	internal static extern bool UpdateWindow(wnd hWnd);
	
	[DllImport("user32.dll")]
	internal static extern nint GetKeyboardLayout(int idThread);
	
	[DllImport("user32.dll", EntryPoint = "MapVirtualKeyExW")]
	internal static extern uint MapVirtualKeyEx(uint uCode, uint uMapType, nint dwhkl);
	
	[DllImport("user32.dll", EntryPoint = "VkKeyScanExW")]
	internal static extern short VkKeyScanEx(char ch, nint dwhkl);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool OpenClipboard(wnd hWndNewOwner);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool CloseClipboard();
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool EmptyClipboard();
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr SetClipboardData(int uFormat, IntPtr hMem);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr GetClipboardData(int uFormat);
	
	//[DllImport("user32.dll", SetLastError = true)]
	//internal static extern wnd SetClipboardViewer(wnd hWndNewViewer);
	
	//[DllImport("user32.dll")]
	//internal static extern bool ChangeClipboardChain(wnd hWndRemove, wnd hWndNewNext);
	
	[DllImport("user32.dll")]
	internal static extern wnd GetOpenClipboardWindow();
	
	[DllImport("user32.dll")]
	internal static extern uint GetClipboardSequenceNumber();
	
	[DllImport("user32.dll", EntryPoint = "RegisterClipboardFormatW")]
	internal static extern int RegisterClipboardFormat(string lpszFormat);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool AddClipboardFormatListener(wnd hwnd);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool RemoveClipboardFormatListener(wnd hwnd);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern int EnumClipboardFormats(int format);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool IsClipboardFormatAvailable(int format);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern int GetPriorityClipboardFormat(int[] paFormatPriorityList, int cFormats);
	
	[DllImport("user32.dll", EntryPoint = "GetClipboardFormatNameW", SetLastError = true)]
	internal static unsafe extern int GetClipboardFormatName(int format, char* lpszFormatName, int cchMaxCount);
	
	[DllImport("user32.dll")]
	internal static extern int GetDoubleClickTime();
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool DrawIconEx(IntPtr hdc, int xLeft, int yTop, IntPtr hIcon, int cxWidth, int cyWidth, int istepIfAniCur = 0, IntPtr hbrFlickerFreeDraw = default, uint diFlags = 3); //DI_NORMAL
	
	internal const uint CURSOR_SHOWING = 0x1;
	
	internal struct CURSORINFO {
		public int cbSize;
		public uint flags;
		public IntPtr hCursor;
		public POINT ptScreenPos;
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool GetCursorInfo(ref CURSORINFO pci);
	
	internal struct ICONINFO : IDisposable {
		public bool fIcon;
		public int xHotspot;
		public int yHotspot;
		public IntPtr hbmMask;
		public IntPtr hbmColor;
		
		public ICONINFO(IntPtr hIcon) {
			GetIconInfo(hIcon, out this);
			//never mind if failed. Then hbm members are default, and caller can either check it or simply let other API fail.
		}
		
		public void Dispose() {
			if (hbmMask != default) DeleteObject(hbmMask);
			if (hbmColor != default) DeleteObject(hbmColor);
		}
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool GetIconInfo(IntPtr hIcon, out ICONINFO piconinfo);
	//tested: GetIconInfoEx gets resource info only for icons loaded from a module loaded in this process.
	
	internal struct BITMAP {
		public int bmType;
		public int bmWidth;
		public int bmHeight;
		public int bmWidthBytes;
		public ushort bmPlanes;
		public ushort bmBitsPixel;
		public IntPtr bmBits;
	}
	
	internal const int WH_MSGFILTER = -1;
	internal const int WH_KEYBOARD = 2;
	internal const int WH_GETMESSAGE = 3;
	internal const int WH_CALLWNDPROC = 4;
	internal const int WH_CBT = 5;
	//internal const int WH_SYSMSGFILTER = 6; //hook proc must be in dll
	internal const int WH_MOUSE = 7;
	internal const int WH_DEBUG = 9;
	internal const int WH_SHELL = 10;
	internal const int WH_FOREGROUNDIDLE = 11;
	internal const int WH_CALLWNDPROCRET = 12;
	internal const int WH_KEYBOARD_LL = 13;
	internal const int WH_MOUSE_LL = 14;
	
	internal delegate nint HOOKPROC(int code, nint wParam, nint lParam);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr SetWindowsHookEx(int WH_X, HOOKPROC lpfn, IntPtr hMod, int dwThreadId);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool UnhookWindowsHookEx(IntPtr hhk);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern nint CallNextHookEx(IntPtr hhk, int nCode, nint wParam, nint lParam);
	
	internal const uint LLKHF_EXTENDED = 0x1;
	internal const uint LLKHF_INJECTED = 0x10;
	internal const uint LLKHF_ALTDOWN = 0x20;
	internal const uint LLKHF_UP = 0x80;
	
	internal struct KBDLLHOOKSTRUCT {
		public uint vkCode;
		public uint scanCode;
		public uint flags;
		public int time;
		public nint dwExtraInfo;
		
		public bool IsUp => 0 != (flags & LLKHF_UP);
		
		/// <summary>
		/// <c>true</c> if the event was generated by software.
		/// </summary>
		public bool IsInjected => 0 != (flags & LLKHF_INJECTED);
		
		/// <summary>
		/// <c>true</c> if the event was generated by functions of this library.
		/// </summary>
		public bool IsInjectedByAu => 0 != (flags & LLKHF_INJECTED) && dwExtraInfo == AuExtraInfo;
		//CONSIDER: also add IsInjectedByAuOrQM2. And let QM2 recognize the extra info too. Or let they use the same extra info; probably bad idea.
		
		/// <summary>
		/// The <c>set</c> function adds or removes flag 0x80000000.
		/// The <c>get</c> function returns <c>true</c> if flag 0x80000000 is set.
		/// </summary>
		public bool BlockEvent {
			get => 0 != (flags & 0x80000000);
			set { if (value) flags |= 0x80000000; else flags &= ~0x80000000; }
		}
	}
	
	internal const uint LLMHF_INJECTED = 0x1;
	
	internal struct MSLLHOOKSTRUCT {
		public POINT pt;
		public uint mouseData;
		public uint flags;
		public int time;
		public nint dwExtraInfo;
		
		/// <summary>
		/// <c>true</c> if the event was generated by software.
		/// </summary>
		public bool IsInjected => 0 != (flags & LLMHF_INJECTED);
		
		/// <summary>
		/// <c>true</c> if the event was generated by functions of this library.
		/// </summary>
		public bool IsInjectedByAu => 0 != (flags & LLMHF_INJECTED) && dwExtraInfo == AuExtraInfo;
		
		/// <summary>
		/// The <c>set</c> function adds or removes flag 0x80000000.
		/// The <c>get</c> function returns <c>true</c> if flag 0x80000000 is set.
		/// </summary>
		public bool BlockEvent {
			get => 0 != (flags & 0x80000000);
			set { if (value) flags |= 0x80000000; else flags &= ~0x80000000; }
		}
	}
	
	internal const int HC_NOREMOVE = 3;
	
	internal delegate void WINEVENTPROC(IntPtr hWinEventHook, EEvent event_, wnd hwnd, EObjid idObject, int idChild, int idEventThread, int dwmsEventTime);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr SetWinEventHook(EEvent eventMin, EEvent eventMax, IntPtr hmodWinEventProc, WINEVENTPROC pfnWinEventProc, int idProcess, int idThread, EHookFlags dwFlags);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool UnhookWinEvent(IntPtr hWinEventHook);
	
	[Flags]
	internal enum AnimationFlags : uint {
		Roll = 0x0000, // Uses a roll animation.
		HorizontalPositive = 0x00001, // Animates the window from left to right. This flag can be used with roll or slide animation.
		HorizontalNegative = 0x00002, // Animates the window from right to left. This flag can be used with roll or slide animation.
		VerticalPositive = 0x00004, // Animates the window from top to bottom. This flag can be used with roll or slide animation.
		VerticalNegative = 0x00008, // Animates the window from bottom to top. This flag can be used with roll or slide animation.
		Center = 0x00010, // Makes the window appear to collapse inward if Hide is used or expand outward if the Hide is not used.
		Hide = 0x10000, // Hides the window. By default, the window is shown.
		Activate = 0x20000, // Activates the window.
		Slide = 0x40000, // Uses a slide animation. By default, roll animation is used.
		Blend = 0x80000, // Uses a fade effect. This flag can be used only with a top-level window.
		Mask = 0xfffff,
	}
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool AnimateWindow(wnd hWnd, int dwTime, AnimationFlags dwFlags);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool GetCaretPos(out POINT lpPoint);
	
	internal static bool GetCaretPosInScreen_(out POINT p) => GetCaretPos(out p) && GetFocus().MapClientToScreen(ref p);
	
	[DllImport("user32.dll")]
	internal static extern int ToUnicodeEx(uint wVirtKey, uint wScanCode, byte* lpKeyState, char* pwszBuff, int cchBuff, uint wFlags, IntPtr dwhkl);
	
	internal const uint PW_CLIENTONLY = 0x1;
	internal const uint PW_RENDERFULLCONTENT = 0x2;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool PrintWindow(wnd hwnd, IntPtr hdcBlt, uint nFlags);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr GetDC(wnd hWnd);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr GetWindowDC(wnd hWnd);
	
	[DllImport("user32.dll")] //note: no SetLastError = true
	internal static extern int ReleaseDC(wnd hWnd, IntPtr hDC);
	
	[DllImport("user32.dll")]
	internal static extern int FillRect(IntPtr hDC, in RECT lprc, nint hbr);
	
	[DllImport("user32.dll")]
	internal static extern int FrameRect(IntPtr hDC, in RECT lprc, IntPtr hbr);
	
	internal const uint RDW_INVALIDATE = 0x1;
	internal const uint RDW_ERASE = 0x4;
	internal const uint RDW_ALLCHILDREN = 0x80;
	internal const uint RDW_FRAME = 0x400;
	
	[DllImport("user32.dll")]
	internal static extern bool RedrawWindow(wnd hWnd, RECT* lprcUpdate = null, IntPtr hrgnUpdate = default, uint flags = 0);
	
	/// <param name="flags"><c>Au.Controls.PopupAlignment</c></param>
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool CalculatePopupWindowPosition(in POINT anchorPoint, in SIZE windowSize, uint flags, in RECT excludeRect, out RECT popupWindowPosition);
	
	[DllImport("user32.dll")]
	internal static extern int MenuItemFromPoint(wnd hWnd, IntPtr hMenu, POINT ptScreen);
	
	[DllImport("user32.dll")]
	internal static extern int GetMenuItemID(IntPtr hMenu, int nPos);
	
	internal struct MENUITEMINFO {
		public int cbSize;
		public uint fMask;
		public uint fType;
		public uint fState;
		public int wID;
		public IntPtr hSubMenu;
		public IntPtr hbmpChecked;
		public IntPtr hbmpUnchecked;
		public nint dwItemData;
		public char* dwTypeData;
		public int cch;
		public IntPtr hbmpItem;
		
		public MENUITEMINFO(uint miim) {
			cbSize = sizeof(MENUITEMINFO);
			fMask = miim;
		}
	}
	
	[DllImport("user32.dll", EntryPoint = "GetMenuItemInfoW")]
	internal static extern bool GetMenuItemInfo(IntPtr hmenu, int item, bool fByPosition, ref MENUITEMINFO lpmii);
	
	internal const uint MIIM_STRING = 0x40;
	
	[DllImport("user32.dll")]
	internal static extern IntPtr GetSystemMenu(wnd hWnd, bool bRevert);
	
	[DllImport("user32.dll")]
	internal static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem, uint uEnable);
	
	internal const uint MF_GRAYED = 0x1;
	
	internal const uint SIF_RANGE = 0x1;
	internal const uint SIF_PAGE = 0x2;
	internal const uint SIF_POS = 0x4;
	internal const uint SIF_TRACKPOS = 0x10;
	internal const int SB_LINEUP = 0;
	//internal const int SB_LINELEFT = 0;
	internal const int SB_LINEDOWN = 1;
	//internal const int SB_LINERIGHT = 1;
	internal const int SB_PAGEUP = 2;
	//internal const int SB_PAGELEFT = 2;
	internal const int SB_PAGEDOWN = 3;
	//internal const int SB_PAGERIGHT = 3;
	//internal const int SB_THUMBPOSITION = 4;
	internal const int SB_THUMBTRACK = 5;
	internal const int SB_TOP = 6;
	//internal const int SB_LEFT = 6;
	internal const int SB_BOTTOM = 7;
	//internal const int SB_RIGHT = 7;
	//internal const int SB_ENDSCROLL = 8;
	internal const int SB_HORZ = 0;
	internal const int SB_VERT = 1;
	//internal const int SB_CTL = 2;
	internal const int SB_BOTH = 3;
	
	internal struct SCROLLINFO {
		public int cbSize;
		public uint fMask;
		public int nMin;
		public int nMax;
		public int nPage;
		public int nPos;
		public int nTrackPos;
		
		public SCROLLINFO(uint mask) {
			cbSize = sizeof(SCROLLINFO);
			fMask = mask;
		}
		
		public int Set(wnd w, bool vertical, bool redraw = true)
			=> SetScrollInfo(w, vertical ? SB_VERT : SB_HORZ, this, redraw);
		
		public bool Get(wnd w, bool vertical)
			=> GetScrollInfo(w, vertical ? SB_VERT : SB_HORZ, ref this);
		
		public static SCROLLINFO Get(wnd w, bool vertical, uint mask) {
			SCROLLINFO v = new(mask);
			v.Get(w, vertical);
			return v;
		}
		
		public static int GetTrackPos(wnd w, bool vertical) => Get(w, vertical, SIF_TRACKPOS).nTrackPos;
		
		public static void SetPos(wnd w, bool vertical, int pos, bool redraw = true) {
			new SCROLLINFO(SIF_POS) { nPos = pos }.Set(w, vertical, redraw);
		}
		
		public static void SetRange(wnd w, bool vertical, int max, int page, bool redraw = true) {
			new SCROLLINFO(SIF_RANGE | SIF_PAGE) { nMax = max, nPage = page }.Set(w, vertical, redraw);
		}
	}
	
	[DllImport("user32.dll")]
	internal static extern int SetScrollInfo(wnd hwnd, int nBar, in SCROLLINFO lpsi, bool redraw);
	
	[DllImport("user32.dll")]
	internal static extern bool GetScrollInfo(wnd hwnd, int nBar, ref SCROLLINFO lpsi);
	
	[DllImport("user32.dll")]
	internal static extern bool ShowScrollBar(wnd hWnd, int wBar, bool bShow);
	
	//[DllImport("user32.dll", SetLastError = true)]
	//internal static extern bool GetScrollBarInfo(wnd hwnd, EObjid idObject, ref SCROLLBARINFO psbi);
	
	//internal struct SCROLLBARINFO
	//{
	//	public int cbSize;
	//	public RECT rcScrollBar;
	//	public int dxyLineButton;
	//	public int xyThumbTop;
	//	public int xyThumbBottom;
	//	public int reserved;
	//	//public fixed uint rgstate[6];
	//	public uint stateScrollbar, stateArrowTopRight, statePageUpRight, stateThumb, statePageDownLeft, stateArrowBottomLeft;
	//}
	//internal const uint STATE_SYSTEM_INVISIBLE = 0x8000;
	//internal const uint STATE_SYSTEM_OFFSCREEN = 0x10000;
	//internal const uint STATE_SYSTEM_PRESSED = 0x8;
	//internal const uint STATE_SYSTEM_UNAVAILABLE = 0x1;
	
	[DllImport("user32.dll", EntryPoint = "MessageBoxW")]
	internal static extern int MessageBox(wnd hWnd, string lpText, string lpCaption, uint uType);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern int GetWindowRgn(wnd hWnd, IntPtr hRgn);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern int GetDpiForWindow(wnd hWnd);
	
	[DllImport("user32.dll")]
	internal static extern IntPtr GetWindowDpiAwarenessContext(wnd hwnd);
	
	[DllImport("user32.dll")]
	internal static extern Dpi.Awareness GetAwarenessFromDpiAwarenessContext(IntPtr value);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern nint SetThreadDpiAwarenessContext(nint dpiContext);
	
	[DllImport("shcore.dll")]
	internal static extern int GetDpiForMonitor(IntPtr hmonitor, int dpiType, out int dpiX, out int dpiY);
	
	[DllImport("shcore.dll")]
	internal static extern int GetProcessDpiAwareness(IntPtr hprocess, out Dpi.Awareness value); //Dpi.Awareness is PROCESS_DPI_AWARENESS
	
	[DllImport("user32.dll")]
	internal static extern bool PhysicalToLogicalPointForPerMonitorDPI(wnd hWnd, ref POINT lpPoint);
	
	//[DllImport("user32.dll")]
	//internal static extern bool PhysicalToLogicalPoint(wnd hWnd, ref POINT lpPoint);
	
	//internal static bool PhysicalToLogicalPoint_AnyOS(wnd w, ref POINT p) => osVersion.minWin8_1 ? PhysicalToLogicalPointForPerMonitorDPI(w, ref p) : PhysicalToLogicalPoint(w, ref p);
	
	//[DllImport("user32.dll")]
	//internal static extern bool LogicalToPhysicalPointForPerMonitorDPI(wnd hWnd, ref POINT lpPoint);
	
	[DllImport("user32.dll")]
	internal static extern bool LogicalToPhysicalPoint(wnd hWnd, ref POINT lpPoint);
	
	//internal static bool LogicalToPhysicalPoint_AnyOS(wnd w, ref POINT p) => osVersion.minWin8_1 ? LogicalToPhysicalPointForPerMonitorDPI(w, ref p) : LogicalToPhysicalPoint(w, ref p);
	
	[DllImport("user32.dll")]
	internal static extern int GetSysColor(int nIndex);
	
	[DllImport("user32.dll")]
	internal static extern IntPtr GetSysColorBrush(int nIndex);
	
	//internal struct DRAWTEXTPARAMS
	//{
	//	public int cbSize;
	//	public int iTabLength;
	//	public int iLeftMargin;
	//	public int iRightMargin;
	//	public int uiLengthDrawn;
	//}
	
	//[DllImport("user32.dll", SetLastError = true)]
	//static extern int DrawTextExW(IntPtr hdc, char* lpchText, int cchText, ref RECT lprc, TFFlags format, DRAWTEXTPARAMS* lpdtp);
	
	[DllImport("user32.dll", SetLastError = true)]
	static extern int DrawTextExW(IntPtr hdc, char* lpchText, int cchText, ref RECT lprc, TFFlags format, void* lpdtp);
	
	internal static int DrawText(IntPtr hdc, RStr s, ref RECT lprc, TFFlags format) {
		if (format.Has(TFFlags.MODIFYSTRING)) throw new NotSupportedException("MODIFYSTRING");
		fixed (char* p = s) return DrawTextExW(hdc, p, s.Length, ref lprc, format, null);
		
		//DRAWTEXTPARAMS doc incorrect. Left nad right margin fields are in pixels, not average char widths. Not tested tab width.
	}
	
	internal const WS TTS_ALWAYSTIP = (WS)0x1;
	internal const WS TTS_NOPREFIX = (WS)0x2;
	internal const WS TTS_BALLOON = (WS)0x40;
	internal const int TTM_ACTIVATE = 0x401;
	internal const int TTM_SETMAXTIPWIDTH = 0x418;
	internal const int TTM_ADDTOOL = 0x432;
	internal const int TTM_DELTOOL = 0x433;
	internal const int TTM_RELAYEVENT = 0x407;
	//internal const uint TTF_SUBCLASS = 0x10;
	
	internal struct TTTOOLINFO {
		public int cbSize;
		public uint uFlags;
		public wnd hwnd;
		public nint uId;
		public RECT rect;
		public IntPtr hinst;
		public char* lpszText;
		public nint lParam;
		public void* lpReserved;
	}
	
	[DllImport("user32.dll")]
	internal static extern bool DrawEdge(IntPtr hdc, ref RECT qrc, uint edge, uint grfFlags);
	
	internal const uint EDGE_ETCHED = 0x6;
	internal const uint BF_LEFT = 0x1;
	internal const uint BF_TOP = 0x2;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern IntPtr GetThreadDesktop(int dwThreadId);
	
	[DllImport("user32.dll", EntryPoint = "GetUserObjectInformationW", SetLastError = true)]
	internal static extern bool GetUserObjectInformation(IntPtr hObj, int nIndex, void* pvInfo, int nLength, out int lpnLengthNeeded);
	
	internal const int UOI_IO = 6;
	//internal const int UOI_NAME = 2;
	
	//[DllImport("user32.dll", SetLastError = true)]
	//internal static extern IntPtr OpenInputDesktop(uint dwFlags, bool fInherit, uint dwDesiredAccess);
	
	//[DllImport("user32.dll")]
	//internal static extern bool CloseDesktop(IntPtr hDesktop);
	
	internal const uint ISMEX_SEND = 0x1;
	internal const uint ISMEX_REPLIED = 0x8;
	
	[DllImport("user32.dll")]
	internal static extern uint InSendMessageEx(nint lpReserved = 0);
	
	public static bool InSendMessageBlocked => (InSendMessageEx() & (ISMEX_SEND | ISMEX_REPLIED)) == ISMEX_SEND;
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool ExitWindowsEx(int uFlags, uint dwReason);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool LockWorkStation();
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern nint RegisterSuspendResumeNotification(IntPtr hRecipient, uint Flags);
	
	internal struct DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS {
		public delegate* unmanaged<void*, int, void*, int> Callback;
		public void* Context;
	}
	
	//internal const uint DEVICE_NOTIFY_WINDOW_HANDLE = 0x0;
	//internal const int DEVICE_NOTIFY_CALLBACK = 2;
	
	[DllImport("user32.dll")]
	internal static extern bool UnregisterSuspendResumeNotification(nint Handle);
	
	//internal struct DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS {
	//	public IntPtr Callback; //DEVICE_NOTIFY_CALLBACK_ROUTINE
	//	public nint Context;
	//}
	
	//internal delegate uint DEVICE_NOTIFY_CALLBACK_ROUTINE(nint context, uint type, nint setting);
	
	[DllImport("user32.dll", SetLastError = true)]
	internal static extern bool ClipCursor(RECT* lpRect);
	
	[DllImport("user32.dll")]
	static extern bool GetLastInputInfo(ref LASTINPUTINFO plii);
	
	struct LASTINPUTINFO {
		public int cbSize;
		public uint dwTime;
	}
	
	/// <summary>
	/// Calls API <see cref="GetLastInputInfo"/> and makes the result 64-bit.
	/// </summary>
	internal static long GetLastInputTime() {
		var r = new LASTINPUTINFO { cbSize = 8 };
		if (!GetLastInputInfo(ref r)) return 0;
		return TickCount32To64(r.dwTime);
	}
	
	/// <summary>
	/// Extends a 32-bit tick count (like from many Windows API) into the 64-bit tick count space.
	/// </summary>
	/// <param name="tick32">32-bit time, like from API <c>GetTickCount</c>. Must not be in the future.</param>
	internal static long TickCount32To64(uint tick32) {
		long now64 = Environment.TickCount64;
		long r = (now64 & ~0xffffffffL) | tick32;
		if (r > now64) r -= 0x1_0000_0000L;
		return r;
	}
}



================================================
FILE: Au/Api/Api_COM.cs
================================================
namespace Au.Types;

static unsafe partial class Api {
	internal struct STRRET {
		public uint uType;

		[StructLayout(LayoutKind.Explicit)]
		internal struct TYPE_1 {
			[FieldOffset(0)]
			public char* pOleStr;
			[FieldOffset(0)]
			public uint uOffset;
			[FieldOffset(0)]
			public fixed sbyte cStr[260];
		}
		public TYPE_1 _2;
	}

	//internal static Guid IID_IShellFolder = new Guid(0x000214E6, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);

	[ComImport, Guid("000214E6-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface IShellFolder {
		//[PreserveSig] int ParseDisplayName(wnd hwnd, IntPtr pbc, [MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName, uint* pchEaten, out IntPtr ppidl, uint* pdwAttributes);
		//[PreserveSig] int EnumObjects(wnd hwnd, uint grfFlags, out IEnumIDList ppenumIDList);
		//[PreserveSig] int BindToObject(IntPtr pidl, IntPtr pbc, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv);
		//[PreserveSig] int BindToStorage(IntPtr pidl, IntPtr pbc, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv);
		//[PreserveSig] int CompareIDs(nint lParam, IntPtr pidl1, IntPtr pidl2);
		//[PreserveSig] int CreateViewObject(wnd hwndOwner, in Guid riid, out IntPtr ppv);
		//[PreserveSig] int GetAttributesOf(uint cidl, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] apidl, ref uint rgfInOut);
		void _0();
		void _1();
		void _2();
		void _3();
		void _4();
		void _5();
		void _6();
		[PreserveSig] int GetUIObjectOf(wnd hwndOwner, uint cidl, in IntPtr pidl, in Guid riid, nint rgfReserved, [MarshalAs(UnmanagedType.IUnknown)] out object ppv);
		//[PreserveSig] int GetDisplayNameOf(IntPtr pidl, uint uFlags, out STRRET pName);
		//[PreserveSig] int SetNameOf(wnd hwnd, IntPtr pidl, [MarshalAs(UnmanagedType.LPWStr)] string pszName, uint uFlags, out IntPtr ppidlOut);
	}

	internal static bool GetUIObjectOf<T>(this IShellFolder t, IntPtr pidl, out T result) where T : class {
		result = null;
		if (0 != t.GetUIObjectOf(default, 1, pidl, typeof(T).GUID, 0, out var o) || o is not T r) return false;
		result = r;
		return true;
	}

	//internal static Guid IID_IShellItem = new Guid(0x43826D1E, 0xE718, 0x42EE, 0xBC, 0x55, 0xA1, 0xE2, 0x61, 0xC3, 0x7B, 0xFE);

	[ComImport, Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface IShellItem {
		//[PreserveSig] int BindToHandler(IntPtr pbc, in Guid bhid, in Guid riid, out IntPtr ppv); //IBindCtx
		//[PreserveSig] int GetParent(out IShellItem ppsi);
		void _0();
		void _1();
		[PreserveSig] int GetDisplayName(SIGDN sigdnName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszName);
		[PreserveSig] int GetAttributes(uint sfgaoMask, out uint psfgaoAttribs);
		//[PreserveSig] int Compare(IShellItem psi, uint hint, out int piOrder);
	}

	//[ComImport, Guid("000214F2-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	//internal interface IEnumIDList {
	//	[PreserveSig] int Next(int celt, [MarshalAs(UnmanagedType.LPArray)][Out] IntPtr[] rgelt, out int pceltFetched);
	//	[PreserveSig] int Skip(int celt);
	//	[PreserveSig] int Reset();
	//	[PreserveSig] int Clone(out IEnumIDList ppenum);
	//}

	[ComImport, Guid("000214fa-0000-0000-c000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface IExtractIcon {
		[PreserveSig] int GetIconLocation(uint uFlags, StringBuilder pszIconFile, int cchMax, out int piIndex, out uint pwFlags);
		//[PreserveSig] int Extract([MarshalAs(UnmanagedType.LPWStr)] string pszFile, int nIconIndex, out IntPtr phiconLarge, out IntPtr phiconSmall, uint nIconSize);
	}

	[ComImport, Guid("000214F9-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface IShellLink {
		[PreserveSig] int GetPath(char* pszFile, int cch, IntPtr pfd = default, uint fFlags = 0);
		[PreserveSig] int GetIDList(out IntPtr ppidl);
		[PreserveSig] int SetIDList(IntPtr pidl);
		[PreserveSig] int GetDescription(char* pszName, int cch);
		[PreserveSig] int SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName);
		[PreserveSig] int GetWorkingDirectory(char* pszDir, int cch);
		[PreserveSig] int SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir);
		[PreserveSig] int GetArguments(char* pszArgs, int cch);
		[PreserveSig] int SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
		[PreserveSig] int GetHotkey(out ushort pwHotkey);
		[PreserveSig] int SetHotkey(ushort wHotkey);
		[PreserveSig] int GetShowCmd(out int piShowCmd);
		[PreserveSig] int SetShowCmd(int iShowCmd);
		[PreserveSig] int GetIconLocation(char* pszIconPath, int cch, out int piIcon);
		[PreserveSig] int SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, int iIcon);
		[PreserveSig] int SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, uint dwReserved = 0);
		[PreserveSig] int Resolve(wnd hwnd, uint fFlags);
		[PreserveSig] int SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);

		//info: default string marshaling in COM interfaces is BSTR, but in this interface strings are LPWSTR. Cannot use plain string and char[].
		//	Instead of [MarshalAs(UnmanagedType.LPArray)] [Out] char[] can be just char*. Then also need fixed when calling.
	}

	[ComImport, Guid("00021401-0000-0000-C000-000000000046"), ClassInterface(ClassInterfaceType.None)]
	internal class ShellLink { }

	[ComImport, Guid("0000010b-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface IPersistFile {
		// IPersist
		[PreserveSig] int GetClassID(out Guid pClassID);
		// IPersistFile
		[PreserveSig] int IsDirty();
		[PreserveSig] int Load([MarshalAs(UnmanagedType.LPWStr)] string pszFileName, uint dwMode);
		[PreserveSig] int Save([MarshalAs(UnmanagedType.LPWStr)] string pszFileName, [MarshalAs(UnmanagedType.Bool)] bool fRemember);
		//[PreserveSig] int SaveCompleted([MarshalAs(UnmanagedType.LPWStr)] string pszFileName);
		//[PreserveSig] int GetCurFile(out IntPtr ppszFileName);
	}

	//see also VARIANT in Struct.cs
	internal struct PROPVARIANT : IDisposable {
		public VARENUM vt; //ushort
		ushort _u1;
		uint _u2;
		public nint value;
		public nint value2;

		/// <summary>
		/// Calls <c>PropVariantClear</c>.
		/// </summary>
		public void Dispose() {
			PropVariantClear(ref this);
		}
	}

	internal struct PROPERTYKEY {
		public Guid fmtid;
		public uint pid;
	}

	internal static Guid IID_IPropertyStore = new Guid(0x886D8EEB, 0x8CF2, 0x4446, 0x8D, 0x02, 0xCD, 0xBA, 0x1D, 0xBD, 0xCF, 0x99);

	[ComImport, Guid("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface IPropertyStore {
		[PreserveSig] int GetCount(out int cProps);
		[PreserveSig] int GetAt(int iProp, out PROPERTYKEY pkey);
		[PreserveSig] int GetValue(in PROPERTYKEY key, out PROPVARIANT pv);
		[PreserveSig] int SetValue(in PROPERTYKEY key, ref PROPVARIANT propvar);
		[PreserveSig] int Commit();
	}

	//note: this is used in the lib, even if IImageList isn't.
	internal static Guid IID_IImageList = new Guid(0x46EB5926, 0x582E, 0x4017, 0x9F, 0xDF, 0xE8, 0x99, 0x8D, 0xAA, 0x09, 0x50);

	[ComImport, Guid("a5cd92ff-29be-454c-8d04-d82879fb3f1b"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface IVirtualDesktopManager {
		[PreserveSig] int IsWindowOnCurrentVirtualDesktop(wnd topLevelWindow, [MarshalAs(UnmanagedType.Bool)] out bool onCurrentDesktop);
		[PreserveSig] int GetWindowDesktopId(wnd topLevelWindow, out Guid desktopId);
		[PreserveSig] int MoveWindowToDesktop(wnd topLevelWindow, in Guid desktopId);
	}

	[ComImport, Guid("aa509086-5ca9-4c25-8f95-589d3c07b48a"), ClassInterface(ClassInterfaceType.None)]
	internal class VirtualDesktopManager { }
}


================================================
FILE: Au/Api/Api_UIA.cs
================================================
namespace Au.Types;

/// <summary>
/// Wraps some UI Automation API.
/// </summary>
static class UiaUtil {
	public static UiaApi.IUIAutomation Uia => _uia ??= osVersion.minWin8 ? new UiaApi.CUIAutomation8() as UiaApi.IUIAutomation : new UiaApi.CUIAutomation() as UiaApi.IUIAutomation;
	[ThreadStatic] static UiaApi.IUIAutomation _uia;
	
	/// <summary>
	/// Gets UI element from point.
	/// </summary>
	/// <param name="xy">Screen coordinates.</param>
	/// <returns><c>null</c> if failed.</returns>
	public static UiaApi.IUIAutomationElement ElementFromPoint(POINT xy) {
		return 0 == Uia.ElementFromPoint(xy, out var e) ? e : null;
	}
	
	/// <summary>
	/// Gets the focused element.
	/// </summary>
	/// <returns><c>null</c> if failed.</returns>
	public static UiaApi.IUIAutomationElement ElementFocused() {
		return 0 == Uia.GetFocusedElement(out var e) ? e : null;
	}
	
	///// <summary>
	///// Gets the container control of this or nearest ancestor element that can retrieve it.
	///// </summary>
	//public static wnd Hwnd(this UiaApi.IUIAutomationElement t) {
	//	if (0 == t.get_CurrentNativeWindowHandle(out var w) && !w.Is0) return w;
		
	//	if (0 == Uia.get_RawViewWalker(out var walker)) {
	//		while (0 == walker.GetParentElement(t, out var p) && p != null && p != t) {
	//			t = p;
	//			if (0 == t.get_CurrentNativeWindowHandle(out w) && !w.Is0) return w;
	//		}
	//	}
		
	//	return default;
	//}
	
	/// <summary>
	/// Gets caret rectangle in screen from this focused element.
	/// </summary>
	public static bool GetCaretRect(this UiaApi.IUIAutomationElement t, out RECT r) {
		if (0 == t.GetCurrentPattern(UiaApi.UIA_TextPattern2Id, out var o) && o is UiaApi.IUIAutomationTextPattern2 p2) {
			if (0 == p2.GetCaretRange(out bool isActive, out var tr) && tr != null /*&& isActive*/) {
				return tr.GetRect(out r, t);
			}
		}
		if (0 == t.GetCurrentPattern(UiaApi.UIA_TextPatternId, out o) && o is UiaApi.IUIAutomationTextPattern p) {
			if (0 == p.GetSelection(out var ranges) && 0 == ranges.GetElement(0, out var tr)) {
				return tr.GetRect(out r, t, selectionToCaret: true);
			}
		}
		r = default;
		return false;
	}
	
	/// <summary>
	/// Gets rectangle in screen.
	/// </summary>
	public static unsafe bool GetRect(this UiaApi.IUIAutomationTextRange t, out RECT r, UiaApi.IUIAutomationElement e, bool selectionToCaret = false) {
		if (_GetRect(t, out r)) {
			if (selectionToCaret) r.left = r.right - 1;
			return true;
		}
		
		//probably no selection
		
		if (0 == t.ExpandToEnclosingUnit(UiaApi.TextUnit.TextUnit_Character) && _GetRect(t, out r)) {
			r.right = r.left + 1;
			return true;
		}
		
		//probably caret at the end
		
		if (0 == t.MoveEndpointByUnit(UiaApi.TextPatternRangeEndpoint.TextPatternRangeEndpoint_Start, UiaApi.TextUnit.TextUnit_Character, -1, out int m) && m < 0 && _GetRect(t, out r)) {
			//moved to previous line?
			if (0 == t.GetText(2, out var s) && !s.NE() && s[0] is '\r' or '\n' && 0 == t.ExpandToEnclosingUnit(UiaApi.TextUnit.TextUnit_Line) && _GetRect(t, out var r2)) {
				r.Offset(0, r2.Height);
				r.right = (r.left = r2.left) + 1;
			} else {
				r.right = (r.left = r.right) + 1;
			}
			return true;
		}
		
		//probably no text
		
		//get the left edge of e rect
		if (0 == e.get_CurrentBoundingRectangle(out r)) {
			int dpi = Dpi.OfWindow(wnd.active);
			int h = (int)Dpi.Unscale(r.Height, dpi);
			if (h < 111) { //assume it's a single-line edit control
				if (h > 32) r.top = r.bottom - Dpi.Scale(32, dpi); //get the bottom max 32 logical pixels
				r.right = r.left + 1;
				return true;
			}
		}
		
		return false;
		
		static unsafe bool _GetRect(UiaApi.IUIAutomationTextRange t, out RECT r) {
			r = default;
			if (0 != t.GetBoundingRectangles(out var sap) || sap == null) return false;
			uint n = sap->rgsabound.cElements / 4;
			if (n > 0) {
				var p = (double*)sap->pvData + sap->rgsabound.cElements - 4;
				r = new(p[0].ToInt(), p[1].ToInt(), p[2].ToInt(), p[3].ToInt());
			}
			UiaApi.SafeArrayDestroy(sap);
			return n > 0;
		}
	}
	
	public static bool GetCaretRectInPowerShell(out RECT r) {
		//GetGUIThreadInfo and MSAA don't work with PowerShell.
		//	Does not support IUIAutomationTextPattern2.
		//	IUIAutomationTextPattern.GetSelection -> IUIAutomationTextRange.GetBoundingRectangles returns client coord, which may be fixed in the future.
		//	Win+; doesn't work too. But PhraseExpress works. And IME (interesting: temporarily replaces the caret).
		//	I would't care, but this was a user request.
		//Now instead using an undocumented PS feature.
		
		var t = ElementFocused();
		if (t != null && 0 == t.get_CurrentControlType(out var ct) && ct == UiaApi.TypeId.Edit) {
			if (0 == Uia.get_RawViewWalker(out var walker)) {
				UiaApi.IUIAutomationElement e = null;
				while (0 == (e == null ? walker.GetFirstChildElement(t, out e) : walker.GetNextSiblingElement(e, out e)) && e != null) {
					//if (0 == e.get_CurrentControlType(out ct)) print.it(ct);
					//if (0 == e.get_CurrentAutomationId(out var ai)) print.it(ai);
					if (0 == e.get_CurrentAutomationId(out var ai) && ai.Find("Caret", true) >= 0 && 0 == e.get_CurrentControlType(out ct) && ct == UiaApi.TypeId.Custom) {
						if (0 == e.get_CurrentBoundingRectangle(out r)) {
							return true;
						}
					}
				}
				//There are 3 child elements. The first is caret.
				//This is slow. Tested MSAA, but it gets only child element "selection", and cannot get rect when selection empty.
			}
		}
		r = default;
		return false;
	}
	
	///// <summary>
	///// Gets text of <c>TextPattern</c> paragraph from point.
	///// </summary>
	///// <param name="t"></param>
	///// <param name="xy">Screen coordinates.</param>
	///// <returns><c>null</c> if the element does not support <c>TextPattern</c> or if failed.</returns>
	//public static string PatternTextFromPoint(this UiaApi.IUIAutomationElement t, POINT xy) {
	//	if (0 == t.GetCurrentPattern(UiaApi.UIA_TextPatternId, out var o) && o is UiaApi.IUIAutomationTextPattern p) {
	//		if (0 == p.RangeFromPoint(xy, out var tr) && 0 == tr.ExpandToEnclosingUnit(UiaApi.TextUnit.TextUnit_Paragraph)) {
	//			if (0 == tr.GetText(5000, out var s)) return s;
	//		}
	//	}
	//	return null;
	//}
	
	///// <summary>
	///// Gets text of <c>ValuePattern</c>.
	///// </summary>
	///// <param name="t"></param>
	///// <returns><c>null</c> if the element does not support <c>ValuePattern</c> or if failed.</returns>
	//public static string ValueText(this UiaApi.IUIAutomationElement t) {
	//	if (0 == t.GetCurrentPattern(UiaApi.UIA_ValuePatternId, out var o) && o is UiaApi.IUIAutomationValuePattern p) {
	//		if (0 == p.get_CurrentValue(out var s)) return s;
	//	}
	//	return null;
	//}
}

#pragma warning disable 1591, 649, 169

/// <summary>
/// Declarations of some UI Automation API.
/// </summary>
unsafe class UiaApi : NativeApi {
	
	[ComImport, Guid("ff48dba4-60ef-4201-aa87-54103eef594e"), ClassInterface(ClassInterfaceType.None)]
	internal class CUIAutomation { }

	[ComImport, Guid("e22ad333-b25f-460c-83d0-0581107395c9"), ClassInterface(ClassInterfaceType.None)]
	internal class CUIAutomation8 { }
	
	[ComImport, Guid("30cbe57d-d9d0-452a-ab13-7ac5ac4825ee"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface IUIAutomation {
		[PreserveSig] int CompareElements(IUIAutomationElement el1, IUIAutomationElement el2, [MarshalAs(UnmanagedType.Bool)] out bool areSame);
		[PreserveSig] int CompareRuntimeIds(SAFEARRAY* runtimeId1, SAFEARRAY* runtimeId2, [MarshalAs(UnmanagedType.Bool)] out bool areSame);
		[PreserveSig] int GetRootElement(out IUIAutomationElement root);
		[PreserveSig] int ElementFromHandle(void* hwnd, out IUIAutomationElement element);
		[PreserveSig] int ElementFromPoint(POINT pt, out IUIAutomationElement element);
		[PreserveSig] int GetFocusedElement(out IUIAutomationElement element);
		[PreserveSig] int GetRootElementBuildCache(IUIAutomationCacheRequest cacheRequest, out IUIAutomationElement root);
		[PreserveSig] int ElementFromHandleBuildCache(void* hwnd, IUIAutomationCacheRequest cacheRequest, out IUIAutomationElement element);
		[PreserveSig] int ElementFromPointBuildCache(POINT pt, IUIAutomationCacheRequest cacheRequest, out IUIAutomationElement element);
		[PreserveSig] int GetFocusedElementBuildCache(IUIAutomationCacheRequest cacheRequest, out IUIAutomationElement element);
		[PreserveSig] int CreateTreeWalker(IUIAutomationCondition pCondition, out IUIAutomationTreeWalker walker);
		[PreserveSig] int get_ControlViewWalker(out IUIAutomationTreeWalker walker);
		[PreserveSig] int get_ContentViewWalker(out IUIAutomationTreeWalker walker);
		[PreserveSig] int get_RawViewWalker(out IUIAutomationTreeWalker walker);
		[PreserveSig] int get_RawViewCondition(out IUIAutomationCondition condition);
		[PreserveSig] int get_ControlViewCondition(out IUIAutomationCondition condition);
		[PreserveSig] int get_ContentViewCondition(out IUIAutomationCondition condition);
		[PreserveSig] int CreateCacheRequest(out IUIAutomationCacheRequest cacheRequest);
		[PreserveSig] int CreateTrueCondition(out IUIAutomationCondition newCondition);
		[PreserveSig] int CreateFalseCondition(out IUIAutomationCondition newCondition);
		[PreserveSig] int CreatePropertyCondition(int propertyId, object value, out IUIAutomationCondition newCondition);
		[PreserveSig] int CreatePropertyConditionEx(int propertyId, object value, PropertyConditionFlags flags, out IUIAutomationCondition newCondition);
		[PreserveSig] int CreateAndCondition(IUIAutomationCondition condition1, IUIAutomationCondition condition2, out IUIAutomationCondition newCondition);
		[PreserveSig] int CreateAndConditionFromArray(SAFEARRAY* conditions, out IUIAutomationCondition newCondition);
		[PreserveSig] int CreateAndConditionFromNativeArray([MarshalAs(UnmanagedType.LPArray)][In] IUIAutomationCondition[] conditions, int conditionCount, out IUIAutomationCondition newCondition);
		[PreserveSig] int CreateOrCondition(IUIAutomationCondition condition1, IUIAutomationCondition condition2, out IUIAutomationCondition newCondition);
		[PreserveSig] int CreateOrConditionFromArray(SAFEARRAY* conditions, out IUIAutomationCondition newCondition);
		[PreserveSig] int CreateOrConditionFromNativeArray([MarshalAs(UnmanagedType.LPArray)]
Download .txt
gitextract__t3y79t8/

├── .editorconfig
├── .gitattributes
├── .github/
│   └── FUNDING.yml
├── .gitignore
├── Au/
│   ├── Api/
│   │   ├── Api.cs
│   │   ├── Api^kernel32.cs
│   │   ├── Api^user32.cs
│   │   ├── Api_COM.cs
│   │   ├── Api_UIA.cs
│   │   ├── Api_const.cs
│   │   ├── Api_public.cs
│   │   ├── Cpp.cs
│   │   └── WinRT.cs
│   ├── Au.More/
│   │   ├── AppSingleInstance.cs
│   │   ├── BufferedPaint.cs
│   │   ├── CheckListDialog.cs
│   │   ├── ComUtil.cs
│   │   ├── Convert2.cs
│   │   ├── DebugTraceListener.cs
│   │   ├── Dpi.cs
│   │   ├── FastBuffer.cs
│   │   ├── FileOpenSaveDialog.cs
│   │   ├── GdiTextRenderer.cs
│   │   ├── Hash.cs
│   │   ├── HelpUtil.cs
│   │   ├── HttpServerSession.cs
│   │   ├── IconImageCache.cs
│   │   ├── ImageUtil.cs
│   │   ├── KeyToTextConverter.cs
│   │   ├── Math2.cs
│   │   ├── MemoryBitmap.cs
│   │   ├── MemoryUtil.cs
│   │   ├── MenuItemInfo.cs
│   │   ├── MouseCursor.cs
│   │   ├── RecordingUtil.cs
│   │   ├── ResourceUtil.cs
│   │   ├── SecurityUtil.cs
│   │   ├── WaitableTimer.cs
│   │   ├── WinEventHook.cs
│   │   ├── WindowsHook.cs
│   │   └── WinformsControlNames.cs
│   ├── Au.Types/
│   │   ├── ColorInt.cs
│   │   ├── JSettings.cs
│   │   ├── TreeBase.cs
│   │   ├── common.cs
│   │   ├── exceptions.cs
│   │   ├── param types.cs
│   │   ├── structs.cs
│   │   └── unused/
│   │       └── AuClassless.cs
│   ├── Au.cs
│   ├── Au.csproj
│   ├── Ext/
│   │   ├── Bitmap.Resize.cs
│   │   ├── ExtMisc.cs
│   │   ├── ExtWpf.cs
│   │   └── ExtXml.cs
│   ├── Files, data/
│   │   ├── ExplorerFolder.cs
│   │   ├── FileSystemRedirection.cs
│   │   ├── FileTree.cs
│   │   ├── FileWatcher.cs
│   │   ├── Pidl.cs
│   │   ├── TempFile.cs
│   │   ├── filesystem-types.cs
│   │   ├── filesystem.cs
│   │   ├── filesystem.more.cs
│   │   ├── folders.cs
│   │   ├── icon.cs
│   │   ├── pathname.cs
│   │   ├── shortcutFile.cs
│   │   ├── sqlite.cs
│   │   └── sqlite_api.cs
│   ├── GUI/
│   │   ├── EnumUI.cs
│   │   ├── dialog-static.cs
│   │   ├── dialog-types.cs
│   │   ├── dialog-x-obsolete.cs
│   │   ├── dialog.cs
│   │   ├── osd.cs
│   │   ├── popupMenu/
│   │   │   ├── MTBase.cs
│   │   │   ├── pm acc.cs
│   │   │   ├── pm render.cs
│   │   │   ├── pm types.cs
│   │   │   └── popupMenu.cs
│   │   ├── toolbar/
│   │   │   ├── tb acc.cs
│   │   │   ├── tb dialog.cs
│   │   │   ├── tb man.cs
│   │   │   ├── tb render.cs
│   │   │   ├── tb sat.cs
│   │   │   ├── tb types.cs
│   │   │   ├── tb util.cs
│   │   │   └── toolbar.cs
│   │   ├── trayIcon.cs
│   │   ├── wpf-types.cs
│   │   └── wpfBuilder.cs
│   ├── Input/
│   │   ├── RegisteredHotkey.cs
│   │   ├── clipboard.cs
│   │   ├── clipboardData.cs
│   │   ├── inputBlocker.cs
│   │   ├── keys.cs
│   │   ├── keys.more.cs
│   │   ├── keys_static.cs
│   │   ├── keys_types.cs
│   │   ├── keys_util.cs
│   │   ├── miscInfo.cs
│   │   ├── mouse.cs
│   │   └── mouse_types.cs
│   ├── Internal/
│   │   ├── ActCtx_.cs
│   │   ├── ArrayBuilder_.cs
│   │   ├── AssemblyUtil_.cs
│   │   ├── AttachThreadInput_.cs
│   │   ├── Debug_.cs
│   │   ├── GC_.cs
│   │   ├── GDI misc.cs
│   │   ├── Handle_.cs
│   │   ├── ILReader.cs
│   │   ├── IconString_.cs
│   │   ├── Jit_.cs
│   │   ├── LaDebugger_.cs
│   │   ├── LineWriter_.cs
│   │   ├── MiniProgram_.cs
│   │   ├── NamespaceDoc.cs
│   │   ├── NativeFont_.cs
│   │   ├── NativeScrollbar_.cs
│   │   ├── NativeThread_.cs
│   │   ├── PostToThisThread_.cs
│   │   ├── ProcessStarter_.cs
│   │   ├── Ptr_.cs
│   │   ├── Serializer_.cs
│   │   ├── SharedMemory_.cs
│   │   ├── StaTaskScheduler_.cs
│   │   ├── StringBuilder_.cs
│   │   ├── Util_.cs
│   │   ├── misc_.cs
│   │   └── tables.cs
│   ├── Other/
│   │   ├── PrintServer.cs
│   │   ├── ScriptEditor.cs
│   │   ├── internet.cs
│   │   ├── lastError.cs
│   │   ├── opt.cs
│   │   ├── print.cs
│   │   ├── screen.cs
│   │   ├── script+.cs
│   │   └── script.cs
│   ├── Resources/
│   │   ├── AssemblyInfo.cs
│   │   └── red_cross_cursor.cur
│   ├── String/
│   │   ├── ExtString.cs
│   │   ├── SegParser.cs
│   │   ├── StringUtil.cs
│   │   ├── csvTable.cs
│   │   ├── regexp.cs
│   │   ├── regexp_ExtString.cs
│   │   ├── regexp_types.cs
│   │   └── wildcard.cs
│   ├── System/
│   │   ├── CpuUsage.cs
│   │   ├── ProcessMemory.cs
│   │   ├── computer.cs
│   │   ├── consoleProcess.cs
│   │   ├── osVersion.cs
│   │   ├── process.cs
│   │   ├── run.cs
│   │   ├── sound.cs
│   │   └── uacInfo.cs
│   ├── Time/
│   │   ├── WaitLoop.cs
│   │   ├── perf.cs
│   │   ├── timer.cs
│   │   ├── timer2.cs
│   │   ├── wait.cs
│   │   └── wait_for.cs
│   ├── Triggers/
│   │   ├── Trigger.cs
│   │   ├── Triggers.cs
│   │   ├── TriggersListWindow.cs
│   │   ├── Triggers_actions.cs
│   │   ├── Triggers_hooks.cs
│   │   ├── Triggers_util.cs
│   │   └── Types/
│   │       ├── t-autotext.cs
│   │       ├── t-hotkey.cs
│   │       ├── t-mouse.cs
│   │       └── t-window.cs
│   ├── UI objects/
│   │   ├── CaptureScreen.cs
│   │   ├── OcrGoogleCloud.cs
│   │   ├── OcrMicrosoftAzure.cs
│   │   ├── OcrTesseract.cs
│   │   ├── OcrWin10.cs
│   │   ├── elm.cs
│   │   ├── elmFinder.cs
│   │   ├── elm_func.cs
│   │   ├── elm_types.cs
│   │   ├── ocr.cs
│   │   ├── ocrFinder.cs
│   │   ├── ocr_types.cs
│   │   ├── uiimage.cs
│   │   ├── uiimageFinder.cs
│   │   └── uiimage_types.cs
│   ├── resources/
│   │   └── global2.cs
│   ├── wnd/
│   │   ├── WProp.cs
│   │   ├── WTaskbarButton.cs
│   │   ├── WndCopyData.cs
│   │   ├── WndSavedRect.cs
│   │   ├── WndUtil.cs
│   │   ├── inactive/
│   │   │   └── desktop.cs
│   │   ├── wnd.cs
│   │   ├── wndChildFinder.cs
│   │   ├── wndFinder.cs
│   │   ├── wnd_child.cs
│   │   ├── wnd_find.cs
│   │   ├── wnd_fromxy.cs
│   │   ├── wnd_get.cs
│   │   ├── wnd_other.cs
│   │   ├── wnd_private.cs
│   │   └── wnd_wait.cs
│   └── x/
│       └── NuGet.md
├── Au.AppHost/
│   ├── AppHost.cpp
│   ├── Au.AppHost.vcxproj
│   ├── Au.AppHost.vcxproj.filters
│   ├── ResourceHacker.txt
│   └── coreclrhost.h
├── Au.Controls/
│   ├── Au.Controls.cs
│   ├── Au.Controls.csproj
│   ├── KMenuCommands/
│   │   ├── KMenuCommands+.cs
│   │   └── KMenuCommands.cs
│   ├── KPanels/
│   │   ├── FlexStackPanel.cs
│   │   ├── ILeaf.cs
│   │   ├── KPanels.cs
│   │   ├── _Floating.cs
│   │   ├── _Node.cs
│   │   ├── dock.cs
│   │   ├── stack.cs
│   │   └── tab.cs
│   ├── KScintilla/
│   │   ├── KScintilla.cs
│   │   ├── Sci API.cs
│   │   ├── Sci adapter.cs
│   │   ├── Sci loader.cs
│   │   ├── Sci other.cs
│   │   ├── Sci styles.cs
│   │   ├── Sci text.cs
│   │   ├── SciImages.cs
│   │   ├── SciTags.cs
│   │   ├── SciTextBuilder.cs
│   │   └── other/
│   │       └── KSciInfoBox.cs
│   ├── KTreeView/
│   │   ├── KTreeView.cs
│   │   ├── tv-acc.cs
│   │   ├── tv-hh.cs
│   │   ├── tv-misc.cs
│   │   ├── tv-render.cs
│   │   └── tv-types.cs
│   ├── Simple/
│   │   ├── KCheckBox.cs
│   │   ├── KCheckDropdownBox.cs
│   │   ├── KColorPicker.cs
│   │   ├── KDateTime.cs
│   │   ├── KDialogWindow.cs
│   │   ├── KGroupBox.cs
│   │   ├── KHotkeyControl.cs
│   │   ├── KListBoxItemWithImage.cs
│   │   ├── KPasswordBox.cs
│   │   ├── KPopup.cs
│   │   ├── KPopupListBox.cs
│   │   ├── KScreenComboBox.cs
│   │   ├── KTextBox.cs
│   │   └── KWpfMenu.cs
│   ├── Util, Api/
│   │   ├── HwndHostAccessibleBase_.cs
│   │   ├── KApi.cs
│   │   ├── KExtWpf.cs
│   │   └── KImageUtil.cs
│   └── resources/
│       ├── AssemblyInfo.cs
│       ├── Generic.xaml
│       └── XamlResources.cs
├── Au.Editor/
│   ├── App/
│   │   ├── App-resources.xaml
│   │   ├── App.TrayIcon.cs
│   │   ├── App.cs
│   │   ├── AppSettings.cs
│   │   ├── CommandLine.cs
│   │   ├── DOptions.cs
│   │   ├── MainWindow.cs
│   │   └── Menus.cs
│   ├── Au.Editor.cs
│   ├── Au.Editor.csproj
│   ├── Compiler/
│   │   ├── Compiler.cs
│   │   ├── EditorExtension.cs
│   │   ├── ErrBuilder.cs
│   │   ├── MetaComments.cs
│   │   ├── MetaReferences.cs
│   │   ├── RecentTT.cs
│   │   ├── Run task.cs
│   │   ├── TestInternal.cs
│   │   ├── XCompiled.cs
│   │   ├── XPublish.cs
│   │   └── util/
│   │       ├── CompilerUtil.cs
│   │       └── Compiler_resources.cs
│   ├── Debugger/
│   │   ├── PD-stack.cs
│   │   ├── PD-variables.cs
│   │   ├── PD._Debugger.cs
│   │   ├── PD._MiRecord.cs
│   │   ├── PanelBreakpoints.cs
│   │   └── PanelDebug.cs
│   ├── Default/
│   │   ├── Commands.xml
│   │   ├── Layout.xml
│   │   ├── Snippets.xml
│   │   └── Themes/
│   │       ├── Material dark.csv
│   │       ├── One Monokai dark.csv
│   │       └── Visual Studio dark.csv
│   ├── Edit/
│   │   ├── Ci-types.cs
│   │   ├── CiAutocorrect.cs
│   │   ├── CiCompletion.cs
│   │   ├── CiErrors.cs
│   │   ├── CiFind.cs
│   │   ├── CiFindGo.cs
│   │   ├── CiFolding.cs
│   │   ├── CiGoTo.cs
│   │   ├── CiPopupList.cs
│   │   ├── CiPopupText.cs
│   │   ├── CiProjects.cs
│   │   ├── CiQuickInfo.cs
│   │   ├── CiSignature.cs
│   │   ├── CiSnippets.cs
│   │   ├── CiStyling.cs
│   │   ├── CiText.cs
│   │   ├── CiTools.cs
│   │   ├── CiUtil.cs
│   │   ├── CiUtilExt.cs
│   │   ├── CiWinapi.cs
│   │   ├── CiWorkspace.cs
│   │   ├── CodeExporter.cs
│   │   ├── CodeInfo.cs
│   │   ├── EditGoBack.cs
│   │   ├── GenerateCode.cs
│   │   ├── InsertCode.cs
│   │   ├── ModifyCode.cs
│   │   ├── PanelEdit.cs
│   │   ├── Sci-DD.cs
│   │   ├── Sci-TR.cs
│   │   ├── Sci-images.cs
│   │   ├── SciCode.cs
│   │   ├── SciTheme.cs
│   │   └── SciUndo.cs
│   ├── Files/
│   │   ├── DProperties.cs
│   │   ├── FileNode.cs
│   │   ├── Files+.cs
│   │   ├── FilesModel.cs
│   │   ├── FilesView.cs
│   │   ├── Git.cs
│   │   ├── Save.cs
│   │   ├── SyncWithFilesystem.cs
│   │   └── WorkspaceState.cs
│   ├── LibreAutomate.iss
│   ├── Panels/
│   │   ├── PanelBookmarks.cs
│   │   ├── PanelFiles.cs
│   │   ├── PanelFind.cs
│   │   ├── PanelFound.cs
│   │   ├── PanelHelp.cs
│   │   ├── PanelMouse.cs
│   │   ├── PanelOpen.cs
│   │   ├── PanelOutline.cs
│   │   ├── PanelOutput.cs
│   │   ├── PanelRead.cs
│   │   ├── PanelTasks.cs
│   │   └── Panels.cs
│   ├── Properties/
│   │   └── launchSettings.json
│   ├── Test.cs
│   ├── Tools/
│   │   ├── CapturingWithHotkey.cs
│   │   ├── ColorQuantizer.cs
│   │   ├── DCustomize.cs
│   │   ├── DCustomizeContextMenu.cs
│   │   ├── DEnumFiles.cs
│   │   ├── DIcons.cs
│   │   ├── DInputRecorder.cs
│   │   ├── DPortable.cs
│   │   ├── DPwnd.cs
│   │   ├── DSnippets.cs
│   │   ├── DWinapi.cs
│   │   ├── Delm.cs
│   │   ├── Dnuget.cs
│   │   ├── Docr.cs
│   │   ├── Duiimage.cs
│   │   ├── Dwnd.cs
│   │   ├── InfoWindow.cs
│   │   ├── KSciCodeBox.cs
│   │   ├── KSciCodeBoxWnd.cs
│   │   ├── KTextExpressionBox.cs
│   │   ├── KeysWindow.cs
│   │   ├── QuickCapture.cs
│   │   ├── RegexWindow.cs
│   │   ├── Scripting.cs
│   │   ├── TUtil-main-process.cs
│   │   ├── TUtil.cs
│   │   ├── ToolProcess.cs
│   │   └── WindowFindCodeFormatter.cs
│   ├── Triggers and toolbars/
│   │   ├── DCommandline.cs
│   │   ├── DSchedule.cs
│   │   ├── TT-tb.cs
│   │   ├── TT-triggers.cs
│   │   ├── TT._CodeAnalysis.cs
│   │   ├── TriggersAndToolbars.cs
│   │   └── WinScheduler.cs
│   ├── _prePostBuild.cs
│   ├── resources/
│   │   ├── AssemblyInfo.cs
│   │   ├── Au.manifest
│   │   └── ci/
│   │       ├── Class.xaml
│   │       ├── Constant.xaml
│   │       ├── Delegate.xaml
│   │       ├── Enum.xaml
│   │       ├── EnumMember.xaml
│   │       ├── Event.xaml
│   │       ├── ExpandScope.xaml
│   │       ├── ExtensionMethod.xaml
│   │       ├── Field.xaml
│   │       ├── GroupBy.xaml
│   │       ├── Interface.xaml
│   │       ├── Keyword.xaml
│   │       ├── Label.xaml
│   │       ├── LocalMethod.xaml
│   │       ├── LocalVariable.xaml
│   │       ├── Method.xaml
│   │       ├── Namespace.xaml
│   │       ├── Operator.xaml
│   │       ├── OverlayAbstract.xaml
│   │       ├── OverlayInternal.xaml
│   │       ├── OverlayPrivate.xaml
│   │       ├── OverlayProtected.xaml
│   │       ├── OverlayStatic.xaml
│   │       ├── Property.xaml
│   │       ├── Region.xaml
│   │       ├── Snippet.xaml
│   │       ├── Structure.xaml
│   │       └── TypeParameter.xaml
│   ├── xAI/
│   │   ├── AI search.cs
│   │   ├── AiModel.cs
│   │   ├── McpServer.cs
│   │   └── McpTools.cs
│   ├── xMisc/
│   │   ├── EnvVarUpdater.cs
│   │   ├── Pip.cs
│   │   ├── PipIPC.cs
│   │   ├── RegHotkeys.cs
│   │   └── UacDragDrop.cs
│   └── xUtil/
│       ├── Downloader.cs
│       ├── Ed util shared.cs
│       ├── Ed util.cs
│       ├── EdExt.cs
│       ├── EdIcons.cs
│       ├── Libs/
│       │   ├── DiffMatchPatch.cs
│       │   └── EnglishPorter2Stemmer.cs
│       ├── MetaCommentsParser.cs
│       ├── NugetDownloader.cs
│       └── RegexParser.cs
├── Au.sln
├── Cookbook/
│   └── files.xml
├── Cpp/
│   ├── Cpp.cpp
│   ├── Cpp.def
│   ├── Cpp.h
│   ├── Cpp.manifest
│   ├── Cpp.rc
│   ├── Cpp.vcxproj
│   ├── Cpp.vcxproj.filters
│   ├── IAccessible2.h
│   ├── ISimpleDOMDocument.h
│   ├── ISimpleDOMNode.h
│   ├── ISimpleDOMText.h
│   ├── JAB.h
│   ├── MemoryPool.cpp
│   ├── MemoryPool.h
│   ├── Util.cpp
│   ├── acc bridge.cpp
│   ├── acc find.cpp
│   ├── acc func.cpp
│   ├── acc get.cpp
│   ├── acc java.cpp
│   ├── acc uia.cpp
│   ├── acc web.cpp
│   ├── acc workaround.cpp
│   ├── acc.h
│   ├── in-proc.cpp
│   ├── internal.h
│   ├── other.cpp
│   ├── rejected.cpp
│   ├── resource.h
│   ├── stdafx.cpp
│   ├── stdafx.h
│   ├── str.cpp
│   ├── str.h
│   ├── test Uia.cpp
│   ├── test.cpp
│   └── util.h
├── LICENSE.txt
├── Libraries/
│   ├── PCRE/
│   │   ├── PCRE.vcxproj
│   │   ├── PCRE.vcxproj.filters
│   │   ├── config.h
│   │   ├── pcre2.h
│   │   ├── pcre2_auto_possess.c
│   │   ├── pcre2_chartables.c
│   │   ├── pcre2_chkdint.c
│   │   ├── pcre2_compile.c
│   │   ├── pcre2_compile.h
│   │   ├── pcre2_compile_class.c
│   │   ├── pcre2_config.c
│   │   ├── pcre2_context.c
│   │   ├── pcre2_error.c
│   │   ├── pcre2_extuni.c
│   │   ├── pcre2_find_bracket.c
│   │   ├── pcre2_internal.h
│   │   ├── pcre2_intmodedep.h
│   │   ├── pcre2_maketables.c
│   │   ├── pcre2_match.c
│   │   ├── pcre2_match_data.c
│   │   ├── pcre2_newline.c
│   │   ├── pcre2_ord2utf.c
│   │   ├── pcre2_pattern_info.c
│   │   ├── pcre2_script_run.c
│   │   ├── pcre2_serialize.c
│   │   ├── pcre2_string_utils.c
│   │   ├── pcre2_study.c
│   │   ├── pcre2_substring.c
│   │   ├── pcre2_tables.c
│   │   ├── pcre2_ucd.c
│   │   ├── pcre2_ucp.h
│   │   ├── pcre2_ucptables.c
│   │   ├── pcre2_util.h
│   │   ├── pcre2_valid_utf.c
│   │   └── pcre2_xclass.c
│   └── scintilla/
│       ├── .editorconfig
│       ├── include/
│       │   ├── ILexer.h
│       │   ├── ILoader.h
│       │   ├── Sci_Position.h
│       │   ├── Scintilla.iface
│       │   ├── ScintillaCall.h
│       │   ├── ScintillaMessages.h
│       │   ├── ScintillaStructures.h
│       │   ├── ScintillaTypes.h
│       │   ├── ScintillaWidget.h
│       │   └── scintilla.h
│       ├── src/
│       │   ├── AutoComplete.cxx
│       │   ├── AutoComplete.h
│       │   ├── CallTip.cxx
│       │   ├── CallTip.h
│       │   ├── CaseConvert.cxx
│       │   ├── CaseConvert.h
│       │   ├── CaseFolder.cxx
│       │   ├── CaseFolder.h
│       │   ├── CellBuffer.cxx
│       │   ├── CellBuffer.h
│       │   ├── ChangeHistory.cxx
│       │   ├── ChangeHistory.h
│       │   ├── CharClassify.cxx
│       │   ├── CharClassify.h
│       │   ├── CharacterCategoryMap.cxx
│       │   ├── CharacterCategoryMap.h
│       │   ├── CharacterType.cxx
│       │   ├── CharacterType.h
│       │   ├── ContractionState.cxx
│       │   ├── ContractionState.h
│       │   ├── DBCS.cxx
│       │   ├── DBCS.h
│       │   ├── Debugging.h
│       │   ├── Decoration.cxx
│       │   ├── Decoration.h
│       │   ├── Document.cxx
│       │   ├── Document.h
│       │   ├── EditModel.cxx
│       │   ├── EditModel.h
│       │   ├── EditView.cxx
│       │   ├── EditView.h
│       │   ├── Editor.cxx
│       │   ├── Editor.h
│       │   ├── ElapsedPeriod.h
│       │   ├── Geometry.cxx
│       │   ├── Geometry.h
│       │   ├── Indicator.cxx
│       │   ├── Indicator.h
│       │   ├── KeyMap.cxx
│       │   ├── KeyMap.h
│       │   ├── LineMarker.cxx
│       │   ├── LineMarker.h
│       │   ├── MarginView.cxx
│       │   ├── MarginView.h
│       │   ├── Partitioning.h
│       │   ├── PerLine.cxx
│       │   ├── PerLine.h
│       │   ├── Platform.h
│       │   ├── Position.h
│       │   ├── PositionCache.cxx
│       │   ├── PositionCache.h
│       │   ├── RESearch.cxx
│       │   ├── RESearch.h
│       │   ├── RunStyles.cxx
│       │   ├── RunStyles.h
│       │   ├── ScintillaBase.cxx
│       │   ├── ScintillaBase.h
│       │   ├── Selection.cxx
│       │   ├── Selection.h
│       │   ├── SparseVector.h
│       │   ├── SplitVector.h
│       │   ├── Style.cxx
│       │   ├── Style.h
│       │   ├── UndoHistory.cxx
│       │   ├── UndoHistory.h
│       │   ├── UniConversion.cxx
│       │   ├── UniConversion.h
│       │   ├── UniqueString.cxx
│       │   ├── UniqueString.h
│       │   ├── ViewStyle.cxx
│       │   ├── ViewStyle.h
│       │   ├── XPM.cxx
│       │   └── XPM.h
│       ├── version.txt
│       └── win32/
│           ├── HanjaDic.cxx
│           ├── HanjaDic.h
│           ├── ListBox.cxx
│           ├── ListBox.h
│           ├── PlatWin.cxx
│           ├── PlatWin.h
│           ├── ScintRes.rc
│           ├── Scintilla.def
│           ├── Scintilla.vcxproj
│           ├── ScintillaDLL.cxx
│           ├── ScintillaWin.cxx
│           ├── ScintillaWin.h
│           ├── SurfaceD2D.cxx
│           ├── SurfaceD2D.h
│           ├── SurfaceGDI.cxx
│           ├── SurfaceGDI.h
│           └── WinTypes.h
├── Notes.txt
├── Other/
│   ├── Au.DllHost/
│   │   ├── Au.DllHost.vcxproj
│   │   ├── Au.DllHost.vcxproj.filters
│   │   └── DllHost.c
│   ├── Au.Net4/
│   │   ├── App.config
│   │   ├── Au.Net4.csproj
│   │   ├── Net4.cs
│   │   ├── Properties/
│   │   │   └── AssemblyInfo.cs
│   │   └── TypelibConverter.cs
│   ├── BuildEvents/
│   │   ├── Au.TestInternal.cs
│   │   ├── BuildEvents.cs
│   │   ├── BuildEvents.csproj
│   │   ├── GitBinaryFiles.cs
│   │   ├── Readme - Roslyn.txt
│   │   └── Sftp.cs
│   ├── DatabasesEtc/
│   │   ├── DatabasesEtc.csproj
│   │   ├── Icons.cs
│   │   ├── Program.cs
│   │   ├── RefAndDoc.cs
│   │   └── RefTxt.cs
│   └── DocFX/
│       ├── DocFX.csproj
│       └── _doc/
│           ├── .gitignore
│           ├── api/
│           │   ├── .gitignore
│           │   └── index.md
│           ├── articles/
│           │   ├── Caller info parameter.md
│           │   ├── Key names and operators.md
│           │   ├── Library.md
│           │   ├── Output tags.md
│           │   ├── UAC.md
│           │   ├── UI element issues.md
│           │   ├── Wait timeout.md
│           │   ├── Wildcard expression.md
│           │   ├── index.md
│           │   └── toc.yml
│           ├── changes/
│           │   ├── future.md
│           │   ├── old/
│           │   │   ├── v0.1.md
│           │   │   ├── v0.10.md
│           │   │   ├── v0.11.md
│           │   │   ├── v0.12.md
│           │   │   ├── v0.13.md
│           │   │   ├── v0.14.md
│           │   │   ├── v0.15.md
│           │   │   ├── v0.16.md
│           │   │   ├── v0.17.md
│           │   │   ├── v0.18.md
│           │   │   ├── v0.19.md
│           │   │   ├── v0.2.md
│           │   │   ├── v0.3.md
│           │   │   ├── v0.4.md
│           │   │   ├── v0.5.md
│           │   │   ├── v0.6.md
│           │   │   ├── v0.7.md
│           │   │   ├── v0.8.md
│           │   │   ├── v0.9.md
│           │   │   ├── v1.0.md
│           │   │   ├── v1.1.md
│           │   │   ├── v1.2.md
│           │   │   ├── v1.3.md
│           │   │   ├── v1.4.md
│           │   │   ├── v1.5.md
│           │   │   ├── v1.6.md
│           │   │   ├── v1.7.md
│           │   │   ├── v1.8.md
│           │   │   └── v1.9.md
│           │   ├── template.md
│           │   ├── v1.10.md
│           │   ├── v1.11.md
│           │   ├── v1.12.md
│           │   ├── v1.13.md
│           │   ├── v1.14.md
│           │   └── v1.15.md
│           ├── docfx.json
│           ├── editor/
│           │   ├── Application.md
│           │   ├── Class files, projects.md
│           │   ├── Code editor.md
│           │   ├── Command line.md
│           │   ├── Compared with QM.md
│           │   ├── Creating exe programs.md
│           │   ├── Debugger.md
│           │   ├── File properties.md
│           │   ├── Git, backup, sync.md
│           │   ├── Icons.md
│           │   ├── LA and AI.md
│           │   ├── Menu commands.md
│           │   ├── NuGet.md
│           │   ├── PiP session.md
│           │   ├── Portable app.md
│           │   ├── Scripts.md
│           │   ├── Settings.md
│           │   ├── Snippets.md
│           │   └── toc.yml
│           ├── filter.yml
│           ├── index.md
│           ├── md-styles.css
│           ├── misc/
│           │   └── privacy-policy.md
│           ├── template1/
│           │   ├── layout/
│           │   │   └── _master.tmpl
│           │   ├── mod.txt
│           │   ├── partials/
│           │   │   ├── class.header.tmpl.partial
│           │   │   ├── footer.tmpl.partial
│           │   │   ├── logo.tmpl.partial
│           │   │   ├── namespace.tmpl.partial
│           │   │   └── navbar.tmpl.partial
│           │   └── styles/
│           │       ├── main.css
│           │       └── main.js
│           ├── template2/
│           │   └── partials/
│           │       ├── collection.tmpl.partial
│           │       └── item.tmpl.partial
│           └── toc.yml
├── README.md
├── Scripts/
│   ├── @Au docs/
│   │   ├── Au docs.cs
│   │   ├── AuDocs analyze.cs
│   │   ├── AuDocs cookbook.cs
│   │   ├── AuDocs other tasks.cs
│   │   ├── AuDocs text.cs
│   │   ├── AuDocs.cs
│   │   ├── LA docs doc-html.db.cs
│   │   ├── LA docs toc.json.cs
│   │   ├── LA menu doc.cs
│   │   └── Readme.txt
│   ├── @WinAPI converter/
│   │   ├── WinAPI converter.cs
│   │   ├── WinApiConverter+.cs
│   │   └── WinApiConverter.cs
│   ├── AuDocsLib.cs
│   ├── Create NuGet package.cs
│   ├── LA docs for AI/
│   │   ├── AI summaries.cs
│   │   └── Upload AI embeddings.cs
│   ├── Minimal .NET SDK.cs
│   ├── Update version.txt.cs
│   └── old/
│       ├── VS goto.cs
│       └── Windows SDK to C#/
│           ├── @SDK converter/
│           │   ├── Classes.cs
│           │   ├── Constants.cs
│           │   ├── Converter.cs
│           │   ├── Expr.cs
│           │   ├── Functions.cs
│           │   ├── Parameters.cs
│           │   ├── SDK converter.cs
│           │   ├── Tokenize.cs
│           │   ├── Types.cs
│           │   └── Util.cs
│           ├── Readme.txt
│           └── Scripts/
│               ├── SDK append 32-bit diff.cs
│               ├── SDK create database.cs
│               ├── SDK headers.h
│               ├── SDK preprocessor.cs
│               ├── SdkUtil.cs
│               └── once/
│                   ├── SDK get GUID.cs
│                   └── SDK get dll names.cs
├── _/
│   ├── default.exe.manifest
│   ├── dotnet_ref_editor.txt
│   ├── dotnet_ref_task.txt
│   └── gitBinaryRestore.csv
└── global.json
Download .txt
Showing preview only (1,006K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (11154 symbols across 554 files)

FILE: Au.AppHost/AppHost.cpp
  function Print (line 26) | void Print(LPCSTR frm, Args ... args) {
  function _WstringFrom (line 50) | void _WstringFrom(std::wstring& r, LPCWSTR w1, size_t len1, LPCWSTR w2, ...
  function _WstringFrom (line 60) | void _WstringFrom(std::wstring& r, const std::wstring& w1, LPCWSTR w2, s...
  function _ToUtf8 (line 64) | void _ToUtf8(LPCWSTR w, size_t len, std::string& r) {
  function _ToUtf8 (line 70) | void _ToUtf8(const std::wstring& w, std::string& r) {
  function _ToUtf8 (line 74) | int _ToUtf8(LPCWSTR w, size_t len, LPSTR utf8, size_t lenUtf8) {
  function _StrEqualI (line 82) | bool _StrEqualI(const std::wstring& s1, LPCWSTR s2) {
  function _FileExists (line 91) | bool _FileExists(LPCWSTR path) {
  function _DirExists (line 95) | bool _DirExists(LPCWSTR path) {
  function _IsProcessWow64 (line 100) | bool _IsProcessWow64() {
  function LPCWSTR (line 117) | LPCWSTR _ProcessPlatformString() {
  function _IsProcessX64andOsArm64 (line 127) | bool _IsProcessX64andOsArm64() {
  type PATHS (line 143) | struct PATHS {
  type VERSTRUCT (line 150) | struct VERSTRUCT {

FILE: Au.Controls/KMenuCommands/KMenuCommands+.cs
  class KMenuCommands (line 11) | public partial class KMenuCommands {
    class Command (line 16) | public class Command : ICommand {
      method Command (line 23) | internal Command(KMenuCommands mc, string name, string text, MemberI...
      method SetMenuItem_ (line 34) | internal void SetMenuItem_(object text, string image, MenuItem miFac...
      method ToString (line 58) | public override string ToString() => Name;
      method OnSubmenuOpened (line 88) | public void OnSubmenuOpened(Action<MenuItem> action) {
      method CopyToButton (line 122) | public void CopyToButton(ButtonBase b, Dock? imageAt = null, UIEleme...
      method CopyToMenu (line 195) | public void CopyToMenu(MenuItem m, UIElement image = null, object te...
      method _CopyToMenu (line 197) | static MenuItem _CopyToMenu(MenuItem from, MenuItem to, UIElement im...
      method _CopyDescendants (line 233) | static void _CopyDescendants(ItemsControl from, ItemsControl to) {
      method CopyToMenu (line 259) | public void CopyToMenu(ContextMenu cm) {
      method CopyImage (line 268) | public UIElement CopyImage() => _CopyImage(_Mi);
      method _CopyImage (line 270) | static UIElement _CopyImage(MenuItem from) {
      method _SetImage (line 281) | bool _SetImage(string image, bool custom = false) {
      method Enable (line 316) | public void Enable(bool enable) {
      method CanExecute (line 343) | public bool CanExecute(object parameter) => _enabled;
      method Execute (line 345) | public void Execute(object parameter) {
      method FindButtonInToolbar (line 368) | public ButtonBase FindButtonInToolbar(ToolBar tb) => tb.Items.OfType...
      method FindMenuButtonInToolbar (line 373) | public MenuItem FindMenuButtonInToolbar(ToolBar tb) {
      method Customize_ (line 386) | internal void Customize_(XElement x, ToolBar toolbar) {
      method CustomizingError (line 467) | public void CustomizingError(string s, Exception ex = null) {
    class _XElementNameEqualityComparer (line 474) | class _XElementNameEqualityComparer : IEqualityComparer<XElement> {
      method Equals (line 475) | bool IEqualityComparer<XElement>.Equals(XElement x, XElement y) => x...
      method GetHashCode (line 476) | int IEqualityComparer<XElement>.GetHashCode(XElement x) => x.Name.Ge...
    class FactoryParams (line 488) | public class FactoryParams {
      method FactoryParams (line 489) | internal FactoryParams(Command command, MemberInfo member) { this.co...
      method SetMenuItem (line 524) | public void SetMenuItem(MenuItem mi = null) => command.SetMenuItem_(...
  class CommandAttribute (line 532) | [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowM...
    method CommandAttribute (line 614) | public CommandAttribute([CallerLineNumber] int l_ = 0) { order_ = l_; }
    method CommandAttribute (line 621) | public CommandAttribute(string text, [CallerLineNumber] int l_ = 0) { ...
    method CommandAttribute (line 628) | public CommandAttribute(char underlined, [CallerLineNumber] int l_ = 0...

FILE: Au.Controls/KMenuCommands/KMenuCommands.cs
  class KMenuCommands (line 75) | public partial class KMenuCommands {
    method KMenuCommands (line 88) | public KMenuCommands(Type commands, Menu menu, bool autoUnderline = tr...
    method _CreateMenu (line 93) | void _CreateMenu(Type type, ItemsControl parentMenu, bool autoUnderlin...
    method TryFind (line 199) | public bool TryFind(string command, out Command c) => _d.TryGetValue(c...
    method BindKeysTarget (line 206) | public void BindKeysTarget(UIElement target, string name) {
    method InitToolbarsAndCustomize (line 294) | public void InitToolbarsAndCustomize(string xmlFileDefault, string xml...
    method LoadFiles (line 318) | public XElement[] LoadFiles() {

FILE: Au.Controls/KPanels/FlexStackPanel.cs
  type FlexStretchDirection (line 13) | public enum FlexStretchDirection {
  class FlexStackPanel (line 20) | public class FlexStackPanel : Panel {
    method FlexStackPanel (line 78) | static FlexStackPanel() {
    method GetIsOverflowed (line 130) | public static bool GetIsOverflowed(UIElement element) {
    method GetMaxSlotSize (line 134) | public static double? GetMaxSlotSize(UIElement element) {
    method GetMinSlotSize (line 138) | public static double? GetMinSlotSize(UIElement element) {
    method GetShrinkOnOverflow (line 142) | public static bool GetShrinkOnOverflow(UIElement element) {
    method SetMaxSlotSize (line 146) | public static void SetMaxSlotSize(UIElement element, double? value) {
    method SetMinSlotSize (line 150) | public static void SetMinSlotSize(UIElement element, double? value) {
    method SetShrinkOnOverflow (line 154) | public static void SetShrinkOnOverflow(UIElement element, bool value) {
    method ArrangeOverride (line 158) | protected override Size ArrangeOverride(Size finalSize) {
    method MeasureOverride (line 192) | protected override Size MeasureOverride(Size availableSize) {
    method OnVisualChildrenChanged (line 300) | protected override void OnVisualChildrenChanged(DependencyObject visua...
    method ExpandSlots (line 309) | private static void ExpandSlots(IEnumerable<Slot> slots, double target) {
    method GetChildrenConstraint (line 345) | private Size GetChildrenConstraint(Size availableSize) {
    method GetSizePart (line 351) | private double GetSizePart(Size size) {
    method GetUniformSize (line 355) | private Size GetUniformSize(Size availableSize) {
    method IsGreater (line 365) | private static bool IsGreater(double a, double b, double tolerance) {
    method MeasureChild (line 369) | private void MeasureChild(UIElement child, Size childConstraint) {
    method OnAffectMeasureChanged (line 377) | private void OnAffectMeasureChanged() {
    method OnAffectMeasurePropertyChanged (line 382) | private static void OnAffectMeasurePropertyChanged(DependencyObject de...
    method OnOrientationChanged (line 388) | private static void OnOrientationChanged(DependencyObject d, Dependenc...
    method RecalcSlots (line 393) | private void RecalcSlots(double current, double target) {
    method RemeasureChildren (line 403) | private void RemeasureChildren(Size availableSize) {
    method SetIsOverflowed (line 417) | private static void SetIsOverflowed(UIElement element, bool value) {
    method ShrinkSlots (line 421) | private static void ShrinkSlots(IEnumerable<Slot> slots, double target) {
    class Slot (line 462) | private class Slot {
      method Slot (line 473) | public Slot(double min, double max, double val) {
  class MeasureUtil (line 488) | file static class MeasureUtil {
    method Height (line 489) | public static double Height(this Thickness thickness) {
    method Width (line 493) | public static double Width(this Thickness thickness) {

FILE: Au.Controls/KPanels/ILeaf.cs
  class KPanels (line 6) | public partial class KPanels {
    type ILeaf (line 10) | public interface ILeaf {
      method AddSibling (line 51) | ILeaf AddSibling(bool after, LeafType type, string name, bool canClo...
      method Delete (line 57) | void Delete();
      method Rename (line 62) | void Rename(string name);
    type LeafType (line 104) | public enum LeafType { None, Panel, Toolbar, Document }
    type ParentInfo (line 106) | public struct ParentInfo {
      method ParentInfo (line 111) | internal ParentInfo(DockPanel panel, FrameworkElement elem, int inde...

FILE: Au.Controls/KPanels/KPanels.cs
  class KPanels (line 23) | public partial class KPanels {
    method Load (line 38) | public void Load(string xmlFileDefault, string xmlFileCustomized) {
    method Save (line 76) | public void Save() {
    method _AutoUpdateXml (line 101) | void _AutoUpdateXml(XElement rootStack, string xmlFileDefault) {
    method AddNewExtension (line 222) | public ILeaf AddNewExtension(bool toolbar, string name, ILeaf where = ...
    class _XmlNameAttrComparer (line 275) | class _XmlNameAttrComparer : IEqualityComparer<XElement> {
      method Equals (line 276) | public bool Equals(XElement x, XElement y) => x.Attr("name") == y.At...
      method GetHashCode (line 277) | public int GetHashCode(XElement obj) => obj.Attr("name").GetHashCode();

FILE: Au.Controls/KPanels/_Floating.cs
  class KPanels (line 10) | public partial class KPanels {
    class _Node (line 11) | partial class _Node {
      class _Floating (line 12) | class _Floating : Window {
        method _Floating (line 17) | public _Floating(_Node node, bool onDrag) {
        method ShowIfOwnerVisible (line 72) | public void ShowIfOwnerVisible() {
        method _Owner_IsVisibleChanged (line 76) | private void _Owner_IsVisibleChanged(object sender, DependencyProp...
        method _Owner_Closing (line 83) | private void _Owner_Closing(object sender, CancelEventArgs e) {
        method OnClosing (line 88) | protected override void OnClosing(CancelEventArgs e) {
        method Save (line 99) | public void Save() {
        method OnSourceInitialized (line 104) | protected override void OnSourceInitialized(EventArgs e) {
        method WndProc (line 110) | private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr...
        method Drag (line 169) | public void Drag(POINT p) {
        method ChangeWindowStyle (line 203) | public void ChangeWindowStyle(_WindowStyle style) {

FILE: Au.Controls/KPanels/_Node.cs
  class KPanels (line 10) | public partial class KPanels {
    class _Node (line 11) | partial class _Node : TreeBase<_Node>, ILeaf {
      class _StackFields (line 33) | class _StackFields {
      class _TabFields (line 38) | class _TabFields {
      class _LeafFields (line 43) | class _LeafFields {
      type _Flags (line 53) | [Flags]
      method _Node (line 59) | public _Node(KPanels pm, XElement x) : this(pm, x, null, 0) { }
      method _Node (line 64) | _Node(KPanels pm, XElement x, _Node parent, int index) {
      method _Node (line 183) | _Node(_Node target, bool isTab, bool verticalStack = false) {
      method _Node (line 221) | _Node(_Node target, bool after, LeafType type, string name, bool can...
      method Save (line 231) | public void Save(XmlWriter x) {
      method ToString (line 319) | public override string ToString() {
      method _SetHeaderAt (line 348) | void _SetHeaderAt(Dock ca, bool firstTime = false) {
      method _AddRemoveHeaderAndBorder (line 376) | void _AddRemoveHeaderAndBorder() {
      method _SetToolbarOrientation (line 434) | void _SetToolbarOrientation() {
      method _IsVisibleReally (line 467) | bool _IsVisibleReally(bool useSavedState = false) {
      method AddSibling (line 486) | ILeaf ILeaf.AddSibling(bool after, LeafType type, string name, bool ...
      method Delete (line 491) | public void Delete() {
      method Rename (line 500) | void ILeaf.Rename(string name) {
    class _DockPanelWithBorder (line 528) | class _DockPanelWithBorder : Border {
      method _DockPanelWithBorder (line 531) | public _DockPanelWithBorder() {

FILE: Au.Controls/KPanels/dock.cs
  class KPanels (line 8) | public partial class KPanels {
    class _Node (line 9) | partial class _Node {
      type _DockState (line 10) | [Flags]
      type _WindowStyle (line 13) | [Flags]
      method _HeaderContextMenu (line 16) | void _HeaderContextMenu(object sender, ContextMenuEventArgs e) {
      method _HeaderContextMenu (line 22) | void _HeaderContextMenu(_Node thisOrParentTab) {
      method _OnMouseDown (line 127) | private protected void _OnMouseDown(object sender, MouseButtonEventA...
      method _OnMouseDown (line 132) | void _OnMouseDown(MouseButtonEventArgs e) {
      method _IsGoodMouseEvent (line 157) | bool _IsGoodMouseEvent(object sender, RoutedEventArgs e, out _Node t...
      method _UserClosing (line 167) | void _UserClosing() {
      method _Hide (line 176) | void _Hide() => _SetDockState(_DockState.Hide);
      method _Unhide (line 177) | void _Unhide() => _SetDockState(_state & ~_DockState.Hide);
      method _SetDockState (line 179) | void _SetDockState(_DockState state, bool onDrag = false) {
      method _ContextMenu_Move (line 221) | void _ContextMenu_Move(popupMenu m) {
      type _HowToMove (line 350) | enum _HowToMove //don't reorder
      type _MoveRect (line 360) | record class _MoveRect(_Node target, _HowToMove how, Dock dock = def...
      method _MoveTo (line 362) | void _MoveTo(_Node target, _HowToMove how, Dock dock = default) {
      method _AddToParentWhenMovingOrAddingLater (line 418) | void _AddToParentWhenMovingOrAddingLater(_Node target, bool after) {
      method _AddToParentWhenMoving (line 433) | void _AddToParentWhenMoving(_Node parent) {
      method _RemoveFromParentWhenMovingOrDeleting (line 447) | void _RemoveFromParentWhenMovingOrDeleting() {
      method _RemoveParentIfNeedAfterMovingOrDeleting (line 462) | void _RemoveParentIfNeedAfterMovingOrDeleting(_Node oldParent) {
      method _ShiftSiblingIndices (line 484) | void _ShiftSiblingIndices(int n) {
    method PrintTree_ (line 489) | [Conditional("DEBUG")]

FILE: Au.Controls/KPanels/stack.cs
  class KPanels (line 7) | public partial class KPanels
    class _Node (line 9) | partial class _Node
      method _AddToStack (line 47) | void _AddToStack(bool moving, int splitterSize) {
      method _ReplaceInStack (line 78) | void _ReplaceInStack(_Node target) {
      method _RemoveGridRowCol (line 102) | void _RemoveGridRowCol(FrameworkElement e) {
      method _ShowHideInStack (line 107) | void _ShowHideInStack(bool show) {
      method _CreateSplitter (line 141) | void _CreateSplitter(int size) {
      method _SetSplitterEvents (line 168) | void _SetSplitterEvents(bool add) {
      method _Stack_UpdateSplittersVisibility (line 181) | void _Stack_UpdateSplittersVisibility() {
      method _RemoveSplitter (line 190) | void _RemoveSplitter() {
      method _SplitterContextMenu (line 211) | void _SplitterContextMenu(object sender, ContextMenuEventArgs e) {
      method _SplitterContextMenu_Unit (line 241) | void _SplitterContextMenu_Unit(popupMenu m, string s1) {
      method _ChangeSizeUnit (line 324) | void _ChangeSizeUnit(GridUnitType unit, bool updateStars) {
      type _RowCol (line 333) | struct _RowCol
        method _RowCol (line 337) | public _RowCol(_Node node) {
        method ChangeUnit (line 365) | public GridLength ChangeUnit(GridUnitType unit) { var r = new Grid...
      method _GridLengthFromString (line 368) | static GridLength _GridLengthFromString(string s) {
      method _GridLengthToString (line 377) | static string _GridLengthToString(GridLength k) {

FILE: Au.Controls/KPanels/tab.cs
  class KPanels (line 9) | public partial class KPanels {
    class _Node (line 10) | partial class _Node {
      method _InitTabControl (line 17) | void _InitTabControl() {
      method _VerticalTabHeader (line 65) | void _VerticalTabHeader(double height = -1, bool onMove = false) {
      method _AddToTab (line 100) | void _AddToTab(bool moving) {
      method _ShowHideInTab (line 110) | void _ShowHideInTab(bool show) {
      method _ReorderInTab (line 139) | void _ReorderInTab(_Node target, bool after) {
      method _NodeFromTabItem (line 152) | static _Node _NodeFromTabItem(TabItem ti) => ti.Tag as _Node;
    class _TabControl (line 155) | class _TabControl : TabControl {
      method OnKeyDown (line 156) | protected override void OnKeyDown(KeyEventArgs e) {

FILE: Au.Controls/KScintilla/KScintilla.cs
  class KScintilla (line 19) | public unsafe partial class KScintilla : HwndHost {
    method KScintilla (line 32) | static KScintilla() {
    method KScintilla (line 36) | public KScintilla() {
    method AaOnHandleCreated (line 66) | protected virtual void AaOnHandleCreated() => AaHandleCreated?.Invoke(...
    method BuildWindowCore (line 68) | protected override HandleRef BuildWindowCore(HandleRef hwndParent) {
    method _InitDocument (line 125) | void _InitDocument() {
    method DestroyWindowCore (line 136) | protected override void DestroyWindowCore(HandleRef hwnd) {
    method _WndProc (line 155) | nint _WndProc(wnd w, int msg, nint wp, nint lp) {
    method WndProc (line 209) | protected virtual nint WndProc(wnd w, int msg, nint wp, nint lp) {
    method WndProc (line 214) | protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam,...
    method OnDpiChanged (line 222) | protected override void OnDpiChanged(DpiScale oldDpi, DpiScale newDpi) {
    method _OnWmSetFocus (line 247) | bool _OnWmSetFocus() {
    method OnGotKeyboardFocus (line 268) | protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventAr...
    method TabIntoCore (line 275) | protected override bool TabIntoCore(TraversalRequest request) {
    method TranslateAcceleratorCore (line 281) | protected override bool TranslateAcceleratorCore(ref System.Windows.In...
    method TranslateCharCore (line 301) | protected override bool TranslateCharCore(ref System.Windows.Interop.M...
    method _NotifyCallback (line 313) | void _NotifyCallback(void* cbParam, ref SCNotification n) {
    method AaOnSciNotify (line 354) | protected virtual void AaOnSciNotify(ref SCNotification n) {
    type AaEventHandlerArgs (line 363) | public ref struct AaEventHandlerArgs {
      method AaEventHandlerArgs (line 366) | public AaEventHandlerArgs(KScintilla sci, ref SCNotification notif) ...
    method _DeleteMarkers (line 382) | void _DeleteMarkers(ref SCNotification n) {
    method AaOnDeletingLineWithMarkers (line 401) | protected virtual void AaOnDeletingLineWithMarkers(int line, uint mark...
    method Call (line 411) | [DebuggerStepThrough]
    method Call (line 418) | [DebuggerStepThrough]
    method Call (line 425) | [DebuggerStepThrough]
    method Call (line 432) | [DebuggerStepThrough]
    method CallRetPtr (line 439) | [DebuggerStepThrough]
    method _DebugPrintMessage (line 460) | static void _DebugPrintMessage(int sciMessage) {
    type AaTagsStyle (line 520) | public enum AaTagsStyle {
    type _RangeData (line 581) | struct _RangeData {
    method AaRangeDataAdd (line 593) | public void AaRangeDataAdd(bool utf16, Range r, object data) {
    method AaRangeDataGet (line 607) | public bool AaRangeDataGet<T>(bool utf16, int pos, out T data) where T...
    method AaRangeDataGet (line 616) | public bool AaRangeDataGet<T>(bool utf16, int pos, out T data, out int...
    method AaRangeDataEnum (line 637) | public IEnumerable<T> AaRangeDataEnum<T>() {
    method _RdOnModified (line 651) | void _RdOnModified(bool inserted, in SCNotification n) {
    class _Accessible (line 715) | class _Accessible : HwndHostAccessibleBase_ {
      method _Accessible (line 718) | internal _Accessible(KScintilla sci) : base(sci, sci.AaWnd) {
      method Role (line 722) | public override ERole Role(int child) => _sci.AaAccessibleRole;
      method Name (line 724) | public override string Name(int child) => _sci.AaAccessibleName;
      method Description (line 726) | public override string Description(int child) => _sci.AaAccessibleDe...
      method Value (line 728) | public override string Value(int child) => _sci.AaAccessibleValue;
      method State (line 730) | public override EState State(int child) {

FILE: Au.Controls/KScintilla/Sci API.cs
  class Sci (line 3) | public static unsafe class Sci {
    method Sci_Call (line 18) | [DllImport(SCINTILLA_DLL, EntryPoint = "Scintilla_DirectFunction")]
    method Sci_Range (line 21) | [DllImport(SCINTILLA_DLL)]
    method Sci_SetFoldLevels (line 24) | [DllImport(SCINTILLA_DLL)]
    type Sci_VisibleRange (line 27) | public record struct Sci_VisibleRange {
    method Sci_GetVisibleRange (line 34) | [DllImport(SCINTILLA_DLL)]
    type Sci_AnnotationDrawCallbackData (line 41) | public unsafe struct Sci_AnnotationDrawCallbackData {
    type Sci_MarginDrawCallbackData (line 48) | public unsafe struct Sci_MarginDrawCallbackData {
    type Sci_DragDropData (line 53) | public struct Sci_DragDropData {
    type AnnotationsVisible (line 1065) | public enum AnnotationsVisible {
    type MOD (line 1253) | [Flags]
    type UPDATE (line 1280) | [Flags]
    type NOTIF (line 1326) | public enum NOTIF {
    type Sci_CharacterRange (line 1366) | public struct Sci_CharacterRange {
    type Sci_TextRange (line 1371) | public struct Sci_TextRange {
    type Sci_TextToFind (line 1377) | public struct Sci_TextToFind {
    type Sci_Rectangle (line 1384) | public struct Sci_Rectangle {
    type Sci_RangeToFormat (line 1391) | public struct Sci_RangeToFormat {
    type Sci_NotifyHeader (line 1399) | public struct Sci_NotifyHeader {
    type SCNotification (line 1405) | public struct SCNotification {

FILE: Au.Controls/KScintilla/Sci adapter.cs
  class KScintilla (line 5) | public unsafe partial class KScintilla {
    method aaaPos8 (line 36) | public int aaaPos8(int pos16) => _adapter.Pos8(pos16);
    method aaaPos16 (line 42) | public unsafe int aaaPos16(int pos8) => _adapter.Pos16(pos8);
    class _Adapter (line 49) | class _Adapter {
      type _NA (line 50) | record struct _NA(int i8, int i16, int len16, int charLen);
      method _Adapter (line 58) | public _Adapter(KScintilla sci) {
      method HandleCreated (line 63) | public void HandleCreated() {
      method TextModified (line 67) | public void TextModified() {
      method _GetText (line 73) | string _GetText() => _sci._RangeText(0, Len8);
      method Pos8 (line 97) | public int Pos8(int pos16) {
      method Pos16 (line 114) | public unsafe int Pos16(int pos8) {
      method _CreatePosMap (line 132) | [MethodImpl(MethodImplOptions.AggressiveOptimization)]

FILE: Au.Controls/KScintilla/Sci loader.cs
  class KScintilla (line 5) | public unsafe partial class KScintilla {
    class aaaFileLoaderSaver (line 6) | public class aaaFileLoaderSaver {
      method Load (line 19) | public void Load(string file) {
      method _EncodingEnumToObject (line 57) | Encoding _EncodingEnumToObject() {
      method _DetectEncoding (line 68) | static unsafe _Encoding _DetectEncoding(RByte s) {
      type _Encoding (line 90) | enum _Encoding : byte {
      method SetText (line 132) | public unsafe bool SetText(KScintilla k) {
      method DetectBadNewlines (line 148) | public bool DetectBadNewlines() {
      method FinishedLoading (line 162) | public void FinishedLoading() {
      method Save (line 173) | public unsafe void Save(KScintilla k, string file, string tempDirect...

FILE: Au.Controls/KScintilla/Sci other.cs
  class KScintilla (line 5) | public partial class KScintilla {
    method aaaMarkerDefine (line 16) | public void aaaMarkerDefine(int marker, int style, ColorInt? foreColor...
    method aaaMarkerAdd (line 27) | public int aaaMarkerAdd(int marker, int line) {
    method aaaMarkerAdd (line 35) | public int aaaMarkerAdd(int marker, bool utf16, int pos) {
    method aaaMarkerDelete (line 42) | public void aaaMarkerDelete(int marker, int line) {
    method aaaMarkerDelete (line 49) | public void aaaMarkerDelete(int marker, bool utf16, int pos) {
    method aaaMarkerDeleteAll (line 57) | public void aaaMarkerDeleteAll(int marker) {
    method aaaMarkerDeleteHandle (line 64) | public void aaaMarkerDeleteHandle(int handle) {
    method aaaIndicatorDefine (line 84) | public void aaaIndicatorDefine(int indic, int style, ColorInt? color =...
    method aaaIndicatorClear (line 98) | public void aaaIndicatorClear(int indic) => aaaIndicatorClear(indic, f...
    method aaaIndicatorClear (line 100) | public void aaaIndicatorClear(int indic, bool utf16, Range r) {
    method aaaIndicatorAdd (line 106) | public void aaaIndicatorAdd(int indic, bool utf16, Range r, int value ...
    method aaaIndicatorGetValue (line 116) | public int aaaIndicatorGetValue(int indic, int pos, bool utf16 = false) {
    method aaaIndicatorGetAll (line 124) | public int aaaIndicatorGetAll(int pos, bool utf16 = false) {
    method aaaIndicatorFindFirst (line 135) | public bool aaaIndicatorFindFirst(int indic, out StartEnd r) {
    method aaaMarginSetType (line 159) | public void aaaMarginSetType(int margin, int type, int? markersMask = ...
    method aaaMarginSetWidth (line 173) | public void aaaMarginSetWidth(int margin, int pixels, int chars = 0) {
    method _MarginWidthsDpiChanged (line 180) | void _MarginWidthsDpiChanged() {
    method _MarginSetWidth (line 185) | void _MarginSetWidth(int i, int pixels, int chars) {
    method aaaMarginFromPoint (line 192) | public int aaaMarginFromPoint(POINT p, bool screenCoord = false) {
    method aaaMarginGetX (line 203) | public (int left, int right) aaaMarginGetX(int margin, bool dpiUnscale...
    method aaaFoldingInit (line 220) | public void aaaFoldingInit(int foldMargin = 0, int separatorMarker = -...
    method aaaFoldingApply (line 260) | public void aaaFoldingApply(List<SciFoldPoint> af, int separatorMarker...
    method aaaFoldingLevel (line 310) | public (int level, bool isHeader) aaaFoldingLevel(int line) {
  type SciFoldPoint (line 324) | public record struct SciFoldPoint(int pos, bool start, ushort separator ...

FILE: Au.Controls/KScintilla/Sci styles.cs
  class KScintilla (line 5) | public unsafe partial class KScintilla {
    method aaaStyleFont (line 7) | public void aaaStyleFont(int style, string name) {
    method aaaStyleFont (line 16) | public void aaaStyleFont(int style, string name, double size) {
    method aaaStyleFont (line 22) | public void aaaStyleFont(int style, System.Windows.Controls.Control c) {
    method aaaStyleFont (line 27) | public void aaaStyleFont(int style) {
    method aaaStyleFontSize (line 31) | public void aaaStyleFontSize(int style, double value) {
    method aaaStyleHidden (line 40) | public void aaaStyleHidden(int style, bool value) {
    method aaaStyleBold (line 49) | public void aaaStyleBold(int style, bool value) {
    method aaaStyleItalic (line 53) | public void aaaStyleItalic(int style, bool value) {
    method aaaStyleUnderline (line 57) | public void aaaStyleUnderline(int style, bool value) {
    method aaaStyleEolFilled (line 61) | public void aaaStyleEolFilled(int style, bool value) {
    method aaaStyleHotspot (line 65) | public void aaaStyleHotspot(int style, bool value) {
    method aaaStyleHotspot (line 69) | public bool aaaStyleHotspot(int style) {
    method aaaStyleForeColor (line 73) | public void aaaStyleForeColor(int style, ColorInt color) {
    method aaaStyleBackColor (line 77) | public void aaaStyleBackColor(int style, ColorInt color) {
    method aaaStyleMeasureStringWidth (line 84) | public int aaaStyleMeasureStringWidth(int style, string s) {
    method aaaStyleClearAll (line 93) | public void aaaStyleClearAll(bool belowDefault = false) {
    method aaaStyleClearRange (line 105) | public void aaaStyleClearRange(int styleFrom8, int styleTo8NotIncludin...
    method aaaStyleGetAt (line 114) | public int aaaStyleGetAt(int pos8) {
    method aaaSetStyled (line 125) | public void aaaSetStyled(int to8 = int.MaxValue) => Call(SCI_STARTSTYL...
    method aaaSetElementColor (line 132) | public void aaaSetElementColor(int element, ColorInt? color) {
    method aaaGetElementColor (line 141) | public ColorInt aaaGetElementColor(int element) {
    method aaaSetStyling (line 148) | public void aaaSetStyling(int start8, RByte styles) {
    method aaaConvertStylingBytesToUtf8 (line 159) | public static Span<byte> aaaConvertStylingBytesToUtf8(Span<byte> style...

FILE: Au.Controls/KScintilla/Sci text.cs
  class KScintilla (line 7) | public unsafe partial class KScintilla {
    method aaaSetString (line 16) | public int aaaSetString(int sciMessage, nint wParam, RStr lParam) {
    method aaaSetString (line 28) | public int aaaSetString(int sciMessage, RStr lParam) {
    method aaaSetString (line 40) | public int aaaSetString(int sciMessage, RStr wParam, nint lParam) {
    method aaaSetString (line 52) | public int aaaSetString(int sciMessage, nint wParam, RByte lParam) {
    method aaaSetStringString (line 64) | public int aaaSetStringString(int sciMessage, RStr wParamlParam) {
    method aaaGetStringOfLength (line 83) | public string aaaGetStringOfLength(int sciMessage, nint wParam, int ut...
    method aaaGetStringGetLength (line 94) | public string aaaGetStringGetLength(int sciMessage, nint wParam)
    method aaaGetString0Terminated (line 109) | public string aaaGetString0Terminated(int sciMessage, nint wParam, int...
    method _GetString (line 112) | [SkipLocalsInit]
    method _FromUtf8 (line 123) | static string _FromUtf8(byte* b) => Convert2.Utf8Decode(b);
    method _ToUtf8 (line 125) | static byte[] _ToUtf8(RStr s) => Convert2.Utf8Encode(s);
    method _ToUtf8 (line 127) | static byte[] _ToUtf8(RStr s, out int utf8Length) {
    method _RangeText (line 142) | string _RangeText(int start8, int end8) {
    method aaaNormalizeRange (line 173) | public void aaaNormalizeRange(bool utf16, ref int from, ref int to) {
    method aaaNormalizeRange (line 185) | public (int from, int to) aaaNormalizeRange(bool utf16, Range r) {
    method aaaNormalizeRangeCanBeReverse (line 205) | public bool aaaNormalizeRangeCanBeReverse(bool utf16, ref int from, re...
    method _ParamPos (line 217) | int _ParamPos(bool utf16, int pos) => pos >= 0 ? (utf16 ? aaaPos8(pos)...
    method _ReturnPos (line 223) | int _ReturnPos(bool utf16, int pos) => pos >= 0 ? (utf16 ? aaaPos16(po...
    method _ReturnPosCanBeNegative (line 228) | int _ReturnPosCanBeNegative(bool utf16, int pos) => pos >= 0 ? (utf16 ...
    method _ParamLine (line 234) | int _ParamLine(int line) => line >= 0 ? line : throw new ArgumentOutOf...
    type _NoReadonly (line 236) | struct _NoReadonly : IDisposable {
      method _NoReadonly (line 240) | public _NoReadonly(KScintilla t) {
      method Dispose (line 246) | public void Dispose() {
    type _NoUndoNotif (line 251) | struct _NoUndoNotif : IDisposable {
      method _NoUndoNotif (line 255) | public _NoUndoNotif(KScintilla t, SciSetTextFlags flags) {
      method Dispose (line 263) | public void Dispose() {
    method aaaClearText (line 280) | public void aaaClearText(SciSetTextFlags flags = 0) {
    method aaaSetText (line 294) | public void aaaSetText(string s, SciSetTextFlags flags = 0, bool ignor...
    method _CanParseTags (line 306) | bool _CanParseTags(string s) {
    method aaaAppendText (line 323) | public void aaaAppendText(string s, bool andRN, bool scroll, bool igno...
    method aaaAppendText8 (line 341) | public void aaaAppendText8(RByte s, bool scroll) {
    method aaaAddText8_ (line 353) | internal void aaaAddText8_(bool append, bool scroll, byte* s, int lenT...
    method aaaSelection (line 418) | public (int start, int end) aaaSelection(bool utf16)
    method aaaLineFromPos (line 431) | public int aaaLineFromPos(bool utf16, int pos)
    method aaaLineFromPos (line 437) | public int aaaLineFromPos()
    method aaaLineStart (line 445) | public int aaaLineStart(bool utf16, int line) => _ReturnPos(utf16, _Li...
    method _LineStart (line 447) | int _LineStart(int line) {
    method aaaLineEnd (line 461) | public int aaaLineEnd(bool utf16, int line, bool withRN = false) {
    method aaaLineStartFromPos (line 471) | public int aaaLineStartFromPos(bool utf16, int pos)
    method aaaLineStartFromPos (line 481) | public int aaaLineStartFromPos(bool utf16, int pos, out int line)
    method aaaLineEndFromPos (line 491) | public int aaaLineEndFromPos(bool utf16, int pos, bool withRN = false,...
    method aaaLineStartEndFromPos (line 507) | public (int line, int start, int end) aaaLineStartEndFromPos(bool utf1...
    method aaaLineText (line 519) | public string aaaLineText(int line, bool withRN = false) => _RangeText...
    method aaaLineHeight (line 525) | public int aaaLineHeight() => Call(SCI_TEXTHEIGHT, 0);
    method aaaLineIndentFromPos (line 538) | public int aaaLineIndentFromPos(bool utf16, int pos, out int extraSpac...
    method aaaLineIndentFromPos (line 550) | public int aaaLineIndentFromPos(bool utf16, int pos) => aaaLineIndentF...
    method aaaPosFromXY (line 558) | public int aaaPosFromXY(bool utf16, POINT p, bool minusOneIfFar)
    method aaaAnnotationText (line 565) | public string aaaAnnotationText(int line) => AaImages?.AnnotationText_...
    method aaaAnnotationText_ (line 572) | public string aaaAnnotationText_(int line) => aaaGetStringGetLength(SC...
    method aaaAnnotationText (line 580) | public void aaaAnnotationText(int line, string s, bool eol = false) {
    method aaaAnnotationText_ (line 590) | internal void aaaAnnotationText_(int line, string s, bool eol = false) {
    method aaaRangeToFullLines (line 603) | public void aaaRangeToFullLines(bool utf16, ref int from, ref int to, ...
    method aaaInsertText (line 622) | public void aaaInsertText(bool utf16, int pos, string s, bool addUndoP...
    type aaaFoldingRestorer (line 634) | public struct aaaFoldingRestorer : IDisposable {
      method aaaFoldingRestorer (line 641) | public aaaFoldingRestorer(KScintilla sci, int pos) {
      method Dispose (line 650) | public void Dispose() {
    method aaaDeleteRange (line 683) | public void aaaDeleteRange(bool utf16, int from, int to) {
    method aaaReplaceRange (line 705) | public void aaaReplaceRange(bool utf16, int from, int to, string s, bo...
    method aaaRangeText (line 721) | public string aaaRangeText(bool utf16, int from, int to) {
    method aaaRangePointer (line 732) | public byte* aaaRangePointer(int from, int to) {
    method aaaRangeSpan (line 743) | public RByte aaaRangeSpan(int from, int to) => new(aaaRangePointer(fro...
    method aaaReplaceSel (line 753) | public void aaaReplaceSel(string s) {
    method aaaSetAndReplaceSel (line 769) | public void aaaSetAndReplaceSel(bool utf16, int from, int to, string s) {
    method aaaGoToPos (line 778) | public void aaaGoToPos(bool utf16, int pos) {
    method aaaGoToLine (line 788) | public void aaaGoToLine(int line) {
    method aaaSelect (line 800) | public void aaaSelect(bool utf16, int from, int to, bool makeVisible =...
    method aaaGetSelectionLines (line 833) | public bool aaaGetSelectionLines(bool utf16, out (int selStart, int se...
    method aaaSelectedText (line 858) | public string aaaSelectedText() => _RangeText(aaaSelectionStart8, aaaS...
    method aaaFindText (line 867) | public unsafe int aaaFindText(bool utf16, RStr s, int start = 0, int e...
    method aaaCharAt8 (line 879) | public char aaaCharAt8(int pos8) => (char)Call(SCI_GETCHARAT, pos8);
    method aaaAddUndoPoint (line 884) | public void aaaAddUndoPoint() {
    method aaaBeginUndoAction (line 893) | public int aaaBeginUndoAction() {
    method aaaEndUndoAction (line 903) | public int aaaEndUndoAction() {
  type SciSetTextFlags (line 947) | [Flags]
  type SciDirectRange (line 970) | unsafe struct SciDirectRange {
    method SciDirectRange (line 974) | public SciDirectRange(KScintilla sci, int from8, int to8) {

FILE: Au.Controls/KScintilla/SciImages.cs
  class SciImages (line 16) | public unsafe class SciImages {
    class _Image (line 17) | class _Image {
    class _ThreadSharedData (line 23) | class _ThreadSharedData {
      method AddImage (line 30) | public void AddImage(_Image im) {
      method FindImage (line 52) | public _Image FindImage(long nameHash, int dpi) {
      method ClearCache (line 63) | public void ClearCache() {
      method CompactCache (line 72) | public void CompactCache() {
    method SciImages (line 96) | internal SciImages(KScintilla c) {
    method _GetImageFromText (line 105) | _Image _GetImageFromText(RByte s) {
    method SetImagesForTextRange_ (line 150) | internal void SetImagesForTextRange_(RByte text, List<StartEnd> images...
    method _ParseAnnotText (line 244) | static int _ParseAnnotText(byte* s, int length, out int imageInfo) {
    method AnnotationText_ (line 263) | [SkipLocalsInit]
    method AnnotationText_ (line 292) | [SkipLocalsInit]
    method _AnnotationDrawCallback (line 313) | unsafe int _AnnotationDrawCallback(void* cbParam, ref Sci_AnnotationDr...

FILE: Au.Controls/KScintilla/SciTags.cs
  class SciTags (line 74) | public unsafe class SciTags {
    type TagStyle (line 78) | public struct TagStyle {
      method Equals (line 96) | public bool Equals(TagStyle x) { return x.u1 == u1 && x.u2 == u2; }
      method Merge (line 97) | public void Merge(TagStyle x) {
      method TagStyle (line 111) | public TagStyle(UserDefinedStyle k) {
    class UserDefinedStyle (line 127) | public class UserDefinedStyle {
    method SciTags (line 136) | internal SciTags(KScintilla c) {
    method _SetUserStyles (line 150) | void _SetUserStyles(int from) {
    method _ClearUserStyles (line 177) | void _ClearUserStyles() {
    method OnTextChanged_ (line 185) | internal void OnTextChanged_(bool inserted, in SCNotification n) {
    method PrintServerProcessMessages (line 209) | public void PrintServerProcessMessages(PrintServer ps, Action<PrintSer...
    method AddText (line 285) | public void AddText(string text, bool append, bool skipLTGT, bool? scr...
    type _StackItem (line 306) | record struct _StackItem(byte kind, byte style, int i = 0, string s = ...
    class _Garbage (line 308) | class _Garbage {
      method Clear (line 314) | public void Clear() {
    method _AddText (line 323) | void _AddText(byte* s, int len, bool append, bool? scroll, bool dontHi...
    method _GetStyleIndex (line 598) | byte _GetStyleIndex(TagStyle style, byte currentStyle, List<_StackItem...
    method OnLinkClick_ (line 623) | internal void OnLinkClick_(int pos, bool ctrl) {
    method GetLinkFromPos (line 630) | public bool GetLinkFromPos(int pos, out string tag, out string attr) {
    method OnLinkClick (line 645) | public void OnLinkClick(string tag, string attr) {
    method AddLinkTag (line 699) | public void AddLinkTag(string name, Action<string> a, UserDefinedStyle...
    method HasLinkTag (line 704) | public bool HasLinkTag(string name) => _userLinkTags.ContainsKey(name);
    method AddCommonLinkTag (line 711) | public static void AddCommonLinkTag(string name, Action<string> a) {
    method HasCommonLinkTag (line 715) | public static bool HasCommonLinkTag(string name) => s_userLinkTags.Con...
    method AddStyleTag (line 732) | public void AddStyleTag(string name, UserDefinedStyle style) {
    method _AddUserStyle (line 737) | public void _AddUserStyle(string name, UserDefinedStyle style) {
    method _FindUserStyle (line 745) | [MethodImpl(MethodImplOptions.AggressiveOptimization)]

FILE: Au.Controls/KScintilla/SciTextBuilder.cs
  class SciTextBuilder (line 5) | public class SciTextBuilder {
    method Clear (line 16) | public void Clear() {
    method Apply (line 28) | public unsafe void Apply(KScintilla sci) {
    method Text (line 70) | public SciTextBuilder Text(RStr text) {
    method NL (line 78) | public SciTextBuilder NL() {
    method Marker (line 87) | public SciTextBuilder Marker(int marker, bool prevLine = false) {
    method Indic (line 97) | public SciTextBuilder Indic(int indic, int start, int end, int value =...
    method Indic (line 106) | public SciTextBuilder Indic(int indic, RStr text, int value = 1) {
    method Indic (line 116) | public SciTextBuilder Indic(int indic, int value = 1) {
    method Indic_ (line 124) | public SciTextBuilder Indic_() {
    method Link (line 134) | public SciTextBuilder Link(object data, int start, int end, int indic) {
    method Link (line 142) | public SciTextBuilder Link(object data, RStr text, int indic) {
    method Link (line 151) | public SciTextBuilder Link(object data, int indic) {
    method Link_ (line 159) | public SciTextBuilder Link_() {
    method Style (line 168) | public SciTextBuilder Style(int style, int start, int end) {
    method Style (line 176) | public SciTextBuilder Style(int style, RStr text) {
    method Style (line 185) | public SciTextBuilder Style(int style) {
    method Style_ (line 193) | public SciTextBuilder Style_() {
    method Fold (line 201) | public SciTextBuilder Fold(SciFoldPoint fp) {
    method B (line 207) | public SciTextBuilder B(int start, int end) => Style(BoldStyle, start,...
    method B (line 208) | public SciTextBuilder B(RStr text) => Style(BoldStyle, text);
    method B (line 209) | public SciTextBuilder B() => Style(BoldStyle);
    method B_ (line 210) | public SciTextBuilder B_() => Style_();
    method Gray (line 213) | public SciTextBuilder Gray(int start, int end) => Style(GrayStyle, sta...
    method Gray (line 214) | public SciTextBuilder Gray(RStr text) => Style(GrayStyle, text);
    method Gray (line 215) | public SciTextBuilder Gray() => Style(GrayStyle);
    method Gray_ (line 216) | public SciTextBuilder Gray_() => Style_();
    method Green (line 219) | public SciTextBuilder Green(int start, int end) => Style(GreenStyle, s...
    method Green (line 220) | public SciTextBuilder Green(RStr text) => Style(GreenStyle, text);
    method Green (line 221) | public SciTextBuilder Green() => Style(GreenStyle);
    method Green_ (line 222) | public SciTextBuilder Green_() => Style_();
    method Link (line 225) | public SciTextBuilder Link(object data, int start, int end) => Link(da...
    method Link (line 226) | public SciTextBuilder Link(object data, RStr text) => Link(data, text,...
    method Link (line 227) | public SciTextBuilder Link(object data) => Link(data, LinkIndic);
    method Link2 (line 230) | public SciTextBuilder Link2(object data, int start, int end) => Link(d...
    method Link2 (line 231) | public SciTextBuilder Link2(object data, RStr text) => Link(data, text...
    method Link2 (line 232) | public SciTextBuilder Link2(object data) => Link(data, Link2Indic);

FILE: Au.Controls/KScintilla/other/KSciInfoBox.cs
  class KSciInfoBox (line 10) | public class KSciInfoBox : KScintilla {
    method KSciInfoBox (line 11) | public KSciInfoBox() {
    method AaOnHandleCreated (line 22) | protected override void AaOnHandleCreated() {
    method AaAddElem (line 53) | public void AaAddElem(FrameworkElement c, string text) {
    method AaSuspendElems (line 70) | public void AaSuspendElems(long timeMS = 3000) {

FILE: Au.Controls/KTreeView/KTreeView.cs
  class KTreeView (line 7) | public unsafe partial class KTreeView {
    type _VisibleItem (line 15) | struct _VisibleItem {
      method Select (line 22) | public bool Select(bool on) {
    method KTreeView (line 30) | public KTreeView() {
    method _SetDpiAndItemSize (line 40) | void _SetDpiAndItemSize(int dpi) {
    method OnDpiChanged (line 53) | protected override void OnDpiChanged(DpiScale oldDpi, DpiScale newDpi) {
    method _SetVisibleItems (line 81) | void _SetVisibleItems(bool init) {
    method SetItems (line 146) | public void SetItems(IEnumerable<ITreeViewItem> items, bool modified =...
    method IndexOf (line 162) | public int IndexOf(ITreeViewItem item) {
    method IndexOf (line 171) | public int IndexOf(Func<ITreeViewItem, bool> func) {
    method _ScrollInit (line 191) | void _ScrollInit() {
    method OnMouseWheel (line 208) | protected override void OnMouseWheel(MouseWheelEventArgs e) {
    method Expand (line 230) | public void Expand(int index, bool? expand) {
    method Expand (line 249) | public void Expand(ITreeViewItem item, bool? expand) {
    method EnsureVisible (line 260) | public void EnsureVisible(int index, bool scrollTop = false) {
    method EnsureVisible (line 280) | public int EnsureVisible(ITreeViewItem item, bool scrollTop = false) {
    method _OnMouseDown (line 307) | void _OnMouseDown(MouseButton button, nint wParam, nint lParam, bool @...
    method _MouseEvents (line 340) | void _MouseEvents(bool click, bool activate, bool drag, MouseButton bu...
    method _MouseEnd (line 347) | void _MouseEnd() {
    method _OnMouseUp (line 354) | bool _OnMouseUp(MouseButton button) {
    method _OnMouseMove (line 374) | void _OnMouseMove(nint wParam) {
    method _OnMouseMoveOrScroll (line 392) | void _OnMouseMoveOrScroll(bool wheel) {
    method _OnMouseLeave (line 409) | void _OnMouseLeave() {
    method OnKeyDown (line 441) | protected override void OnKeyDown(KeyEventArgs e) {
    method ProcessKey (line 460) | public bool ProcessKey(Key k) {
    method Select (line 553) | public void Select(int index, bool select = true, bool unselectOther =...
    method Select (line 572) | public void Select(ITreeViewItem item, bool select = true, bool unsele...
    method Select (line 589) | public void Select(Range range, bool select = true, bool unselectOther...
    method UnselectAll (line 611) | public void UnselectAll() => Select(.., select: false);
    method SelectSingle (line 621) | public void SelectSingle(int index, bool andFocus, bool scrollTop = fa...
    method SelectSingle (line 628) | public void SelectSingle(ITreeViewItem item, bool scrollTop = false) =...
    method _ShiftSelect (line 630) | void _ShiftSelect(int last) {
    method IsSelected (line 640) | public bool IsSelected(int index) => _avi[index].isSelected;
    method IsSelected (line 646) | public bool IsSelected(ITreeViewItem item) {
    method SetFocusedItem (line 713) | public void SetFocusedItem(int index, TVFocus flags = TVFocus.EnsureVi...
    method SetFocusedItem (line 725) | public void SetFocusedItem(ITreeViewItem item, TVFocus flags = TVFocus...
    method OnGotKeyboardFocus (line 729) | protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventAr...
    method OnLostKeyboardFocus (line 735) | protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventA...
    method EditLabel (line 827) | public void EditLabel(Action<bool> ended = null) { int i = _focusedInd...
    method EditLabel (line 835) | public void EditLabel(ITreeViewItem item, Action<bool> ended = null) =...
    method EditLabel (line 843) | public void EditLabel(int index, Action<bool> ended = null) {
    method _EditLabel (line 848) | void _EditLabel(ITreeViewItem item, int index, Action<bool> ended) {
    type EditLabelStartedEventArgs (line 886) | public record class EditLabelStartedEventArgs(KTreeView tv, ITreeViewI...
    method EndEditLabel (line 905) | public void EndEditLabel(bool cancel = false) {
    method OnDragLeave (line 930) | protected override void OnDragLeave(DragEventArgs e) {
    method OnDrop (line 937) | protected override void OnDrop(DragEventArgs e) {
    method OnDragOver2 (line 953) | public void OnDragOver2(bool canDrop) {
    class _DragDrop (line 1009) | class _DragDrop {
      method _DragDrop (line 1017) | public _DragDrop(KTreeView tv) {
      method SetInsertMark (line 1022) | public void SetInsertMark(int i, bool after, bool folder) {
      method ClearInsertMark (line 1030) | public void ClearInsertMark() => SetInsertMark(-1, false, false);
    method GetDropInfo (line 1040) | public void GetDropInfo(out TVDropInfo d) => GetDropInfo(_w.MouseClien...
    method GetDropInfo (line 1048) | public void GetDropInfo(POINT xy, out TVDropInfo d) {

FILE: Au.Controls/KTreeView/tv-acc.cs
  class KTreeView (line 17) | public partial class KTreeView {
    class _Accessible (line 18) | class _Accessible : HwndHostAccessibleBase_ {
      method _Accessible (line 21) | internal _Accessible(KTreeView tv) : base(tv, tv.Hwnd) {
      method _Item (line 25) | ITreeViewItem _Item(int child) {
      method Name (line 33) | public override string Name(int child) {
      method Role (line 39) | public override ERole Role(int child) {
      method State (line 43) | public override EState State(int child) {
      method DefaultAction (line 69) | public override string DefaultAction(int child) {
      method SelectChild (line 76) | public override void SelectChild(ESelect flagsSelect, int child) {
      method ChildRect (line 103) | public override RECT ChildRect(int child) => _tv.GetRectPhysical(chi...
      method Navigate (line 105) | public override int? Navigate(NAVDIR navDir, int childStart) {
      method HitTest (line 124) | public override int HitTest(int x, int y) => _tv._ItemFromY(y);
      method DoDefaultAction (line 126) | public override void DoDefaultAction(int child) {

FILE: Au.Controls/KTreeView/tv-hh.cs
  class KTreeView (line 8) | public unsafe partial class KTreeView : HwndHost {
    method BuildWindowCore (line 21) | protected override HandleRef BuildWindowCore(HandleRef hwndParent) {
    method DestroyWindowCore (line 32) | protected override void DestroyWindowCore(HandleRef hwnd) {
    method _WndProc (line 38) | nint _WndProc(wnd w, int msg, nint wParam, nint lParam) {
    method WndProc (line 128) | protected override nint WndProc(IntPtr hwnd, int msg, IntPtr wParam, I...
    method OnPropertyChanged (line 139) | protected override void OnPropertyChanged(DependencyPropertyChangedEve...
    method TabIntoCore (line 146) | protected override bool TabIntoCore(TraversalRequest r) {
    method HitTestCore (line 152) | protected override HitTestResult HitTestCore(PointHitTestParameters hi...

FILE: Au.Controls/KTreeView/tv-misc.cs
  class KTreeView (line 7) | public unsafe partial class KTreeView {
    method _IsValid (line 8) | bool _IsValid(int index) => (uint)index < _avi.Lenn_();
    method _IndexToItem (line 17) | bool _IndexToItem(int i, out ITreeViewItem item) {
    method _IndexToItem (line 23) | ITreeViewItem _IndexToItem(int i) => _IsValid(i) ? _avi[i].item : null;
    method _IndexOfOrThrow (line 25) | int _IndexOfOrThrow(ITreeViewItem item, bool canBeNull = false) {
    method _IndexOfOrThrowIfImportant (line 31) | bool _IndexOfOrThrowIfImportant(bool important, ITreeViewItem item, ou...
    method _IsInside (line 37) | bool _IsInside(int iParent, int iChild) {
    method _DpiScale (line 53) | int _DpiScale(int value) => More.Dpi.Scale(value, _dpi);
    method _ItemTop (line 55) | int _ItemTop(int index) => (index - _vscroll.Pos) * _itemHeight;
    method _ItemFromY (line 61) | int _ItemFromY(int y) {
    type _PartOffsets (line 67) | struct _PartOffsets {
    method _GetPartOffsets (line 72) | void _GetPartOffsets(int i, out _PartOffsets p, bool measuring = false) {
    method GetRectPhysical (line 97) | public RECT GetRectPhysical(int index, TVParts parts = 0, bool inScree...
    method GetRectLogical (line 137) | public Rect GetRectLogical(int index, TVParts parts = 0, bool inScreen...
    method HitTest (line 149) | public bool HitTest(POINT p, out TVHitTest h) {
    method HitTest (line 177) | public bool HitTest(out TVHitTest h) => HitTest(_w.MouseClientXY, out h);
    class _LabelTip (line 181) | class _LabelTip {
      method _LabelTip (line 188) | public _LabelTip(KTreeView tv) { _tv = tv; }
      method HotChanged (line 190) | public void HotChanged(int i) {
      method _Show (line 203) | void _Show(timer t) {
      method Hide (line 221) | public void Hide() {
    class _Tooltip (line 230) | class _Tooltip {
      method _Tooltip (line 237) | public _Tooltip(KTreeView tv) { _tv = tv; }
      method HotChanged (line 239) | public void HotChanged(int i) {
      method _Timer (line 249) | void _Timer(timer t) {
      method Hide (line 262) | public void Hide() {

FILE: Au.Controls/KTreeView/tv-render.cs
  class KTreeView (line 5) | public unsafe partial class KTreeView {
    method _Measure (line 9) | void _Measure(bool onScroll = false) {
    method _ScrollEnded (line 65) | void _ScrollEnded() {
    method _MeasureClear (line 78) | void _MeasureClear(bool updateNow) {
    method _GetViewRange (line 88) | (int from, int to) _GetViewRange() {
    method _Invalidate (line 94) | void _Invalidate(RECT* r = null) {
    method _Invalidate (line 98) | void _Invalidate(int index) {
    method Redraw (line 111) | public void Redraw(int index, bool remeasure = false) {
    method Redraw (line 133) | public void Redraw(ITreeViewItem item, bool remeasure = false) {
    method Redraw (line 144) | public void Redraw(bool remeasure = false) {
    method _Render (line 189) | void _Render(IntPtr dc, RECT rUpdate) {
    method _StockLinkLocation (line 398) | static string _StockLinkLocation() {

FILE: Au.Controls/KTreeView/tv-types.cs
  type ITreeViewItem (line 8) | public interface ITreeViewItem {
    method SetIsExpanded (line 27) | void SetIsExpanded(bool yes) { }
    method SetNewText (line 37) | void SetNewText(string text) { }
    method Color (line 84) | int Color(TVColorInfo ci) => -1;
    method SelectedColor (line 90) | int SelectedColor(TVColorInfo ci) => -1;
    method TextColor (line 95) | int TextColor(TVColorInfo ci) => -1;
    method BorderColor (line 101) | int BorderColor(TVColorInfo ci) => -1;
    method MesureTextWidth (line 107) | int MesureTextWidth(GdiTextRenderer tr) => -1;
    method TooltipSetContent (line 124) | void TooltipSetContent(System.Windows.Controls.ToolTip tt) {  }
  type TVCheck (line 130) | public enum TVCheck : byte { Unchecked, Checked, Mixed, Excluded, RadioU...
  type TVParts (line 135) | [Flags]
  type TVHitTest (line 164) | public struct TVHitTest {
  type TVItemEventArgs (line 182) | public record class TVItemEventArgs(ITreeViewItem Item, int Index, TVPar...
  type ITVCustomDraw (line 190) | public interface ITVCustomDraw {
    method Begin (line 191) | void Begin(TVDrawInfo cd, GdiTextRenderer tr);
    method DrawBackground (line 192) | bool DrawBackground() => false;
    method DrawCheckbox (line 193) | bool DrawCheckbox() => false;
    method DrawImage (line 194) | bool DrawImage(System.Drawing.Bitmap image) => false;
    method DrawText (line 195) | bool DrawText() => false;
    method DrawMarginLeft (line 196) | void DrawMarginLeft() { }
    method DrawMarginRight (line 197) | void DrawMarginRight() { }
    method End (line 198) | void End() { }
  class TVDrawInfo (line 204) | public class TVDrawInfo {
    method TVDrawInfo (line 253) | public TVDrawInfo(KTreeView tv, IntPtr dc, System.Drawing.Graphics gra...
  type TVColorInfo (line 261) | public struct TVColorInfo {
  type TVDropInfo (line 266) | public struct TVDropInfo {
  type TVFocus (line 286) | [Flags]

FILE: Au.Controls/Simple/KCheckBox.cs
  class KCheckBox (line 12) | public class KCheckBox : CheckBox {
    method OnChecked (line 18) | protected override void OnChecked(RoutedEventArgs e) {
    method OnUnchecked (line 23) | protected override void OnUnchecked(RoutedEventArgs e) {
    method OnIndeterminate (line 28) | protected override void OnIndeterminate(RoutedEventArgs e) {
    method OnCheckChanged (line 36) | protected virtual void OnCheckChanged(RoutedEventArgs e) {
  class KCheckNoBox (line 50) | class KCheckNoBox : KCheckBox {
    method KCheckNoBox (line 51) | static KCheckNoBox() {
    method GetBrushes_ (line 101) | internal static (Brush checkedCold, Brush checkedHot, Brush uncheckedH...
  class KButtonRoundNoBorder (line 120) | class KButtonRoundNoBorder : Button {
    method KButtonRoundNoBorder (line 121) | static KButtonRoundNoBorder() {
  class KCheckTextBox (line 157) | public class KCheckTextBox {
    method KCheckTextBox (line 165) | public KCheckTextBox(KCheckBox c, KTextBox t, Button button = null) {
    method Deconstruct (line 203) | public void Deconstruct(out KCheckBox c, out TextBox t) { c = this.c; ...
    method Set (line 218) | public void Set(bool check, string text) {
    method Set (line 223) | public void Set(bool check, string text, List<string> items) {
    method Set (line 229) | public void Set(bool check, string text, Func<List<string>> items) {
    method Clear (line 235) | public void Clear(string text = null) {
    method GetText (line 246) | public bool GetText(out string s, bool emptyToo = false) {
    method CheckIfTextNotEmpty (line 255) | public bool CheckIfTextNotEmpty() {
  class KCheckComboBox (line 264) | public class KCheckComboBox {
    method KCheckComboBox (line 269) | public KCheckComboBox(KCheckBox c, ComboBox t) {
    method Deconstruct (line 277) | public void Deconstruct(out KCheckBox c, out ComboBox t) { c = this.c;...
    method GetIndex (line 294) | public bool GetIndex(out int index) {
    method GetText (line 304) | public bool GetText(out string text) {

FILE: Au.Controls/Simple/KCheckDropdownBox.cs
  class KCheckDropdownBox (line 12) | public class KCheckDropdownBox : TextBox {
    method KCheckDropdownBox (line 14) | public KCheckDropdownBox() {
    type DDSettings (line 83) | public record DDSettings(Panel panel = null, bool fixedWidth = false, ...
    type DropdownEventData (line 107) | public record DropdownEventData(KCheckDropdownBox cb, Popup popup, Che...
    method OnPreviewMouseLeftButtonUp (line 110) | protected override void OnPreviewMouseLeftButtonUp(MouseButtonEventArg...
    method _MouseLeftButtonUp (line 117) | void _MouseLeftButtonUp(object sender, MouseButtonEventArgs e) {
    method _ShowDropdown (line 125) | void _ShowDropdown() {
    method OnPreviewKeyDown (line 223) | protected override void OnPreviewKeyDown(KeyEventArgs e) {
    method OnPreviewTextInput (line 231) | protected override void OnPreviewTextInput(TextCompositionEventArgs e) {

FILE: Au.Controls/Simple/KColorPicker.cs
  class KColorPicker (line 12) | public class KColorPicker : UserControl {
    method KColorPicker (line 17) | public KColorPicker() {
    class _Palette (line 100) | class _Palette : HwndHost {
      method _Palette (line 110) | public _Palette(KColorPicker cp) {
      method BuildWindowCore (line 114) | protected override HandleRef BuildWindowCore(HandleRef hwndParent) {
      method DestroyWindowCore (line 121) | protected override void DestroyWindowCore(HandleRef hwnd) {
      method MeasureOverride (line 125) | protected override Size MeasureOverride(Size constraint) => _Measure();
      method _WndProc (line 128) | nint _WndProc(wnd w, int msg, nint wParam, nint lParam) {
      method _Measure (line 149) | Size _Measure() {
      method _Paint (line 158) | void _Paint(nint dc) {
      method _GenerateColors (line 192) | static int[,] _GenerateColors() {
      method SelectColor (line 238) | public void SelectColor(int col) {
      method _WmLbuttondown (line 261) | void _WmLbuttondown(nint xy) {
      method Invalidate (line 275) | public unsafe void Invalidate() {
    method _SetColor (line 281) | void _SetColor(int color, bool bgr) {
    method _GetColor (line 287) | int _GetColor(bool bgr) {
    method ColorTool (line 306) | public static void ColorTool(Action<string> result, Window owner, bool...
    class _ComboBox (line 360) | class _ComboBox : ComboBox {
      method _ComboBox (line 361) | public _ComboBox() {

FILE: Au.Controls/Simple/KDateTime.cs
  class KDateTime (line 13) | public class KDateTime : TextBox {
    method KDateTime (line 17) | public KDateTime() {
    method Validation (line 37) | public static string Validation(FrameworkElement e) => ((KDateTime)e)....
    method _Validation (line 39) | string _Validation() {
    method OnMouseWheel (line 64) | protected override void OnMouseWheel(MouseWheelEventArgs e) {
    method OnMouseMove (line 81) | protected override void OnMouseMove(MouseEventArgs e) {
    method OnPreviewMouseLeftButtonUp (line 87) | protected override void OnPreviewMouseLeftButtonUp(MouseButtonEventArg...
    method _MouseLeftButtonUp (line 94) | void _MouseLeftButtonUp(object sender, MouseButtonEventArgs e) {
    method _ShowCalendar (line 103) | void _ShowCalendar(int part, bool focusCalendar) {
    method _CloseCalendar (line 148) | bool _CloseCalendar(CalendarControl c = null) {
    method OnPreviewKeyDown (line 167) | protected override void OnPreviewKeyDown(KeyEventArgs e) {
    method OnPreviewTextInput (line 206) | protected override void OnPreviewTextInput(TextCompositionEventArgs e) {
    method _OnPreviewTextInput (line 212) | bool _OnPreviewTextInput(char c) {
    method _FieldUpDown (line 228) | void _FieldUpDown(int pos, int add) {
    method _ParseRX (line 249) | bool _ParseRX(string s, out RXMatch m) {
    method _PartFromPos (line 255) | bool _PartFromPos(string s, int pos, out int part, out RXMatch m) {
    method _ParseDate (line 261) | static bool _ParseDate(string s, out DateTime d) {
    method _MouseCharPos (line 265) | int _MouseCharPos(MouseEventArgs e, bool snapToText) => base.GetCharac...

FILE: Au.Controls/Simple/KDialogWindow.cs
  class KDialogWindow (line 10) | public class KDialogWindow : Window {
    method ShowSingle (line 18) | protected static T ShowSingle<T>(Func<T> fNew) where T : KDialogWindow {
    method OnClosed (line 31) | protected override void OnClosed(EventArgs e) {
    method GetSingle (line 39) | public static bool GetSingle<T>(out T window) where T : KDialogWindow
    method InitWinProp (line 46) | public void InitWinProp(string title, DependencyObject owner, bool sho...
    method OnSourceInitialized (line 52) | protected override void OnSourceInitialized(EventArgs e) {
    method ShowAndWait (line 66) | public bool ShowAndWait(Window owner = null, bool hideOwner = false, b...

FILE: Au.Controls/Simple/KGroupBox.cs
  class KGroupBox (line 10) | public class KGroupBox : GroupBox {
    method KGroupBox (line 13) | public KGroupBox() {
    method OnHeaderChanged (line 18) | protected override void OnHeaderChanged(object oldHeader, object newHe...
  class KGroupBoxSeparator (line 36) | public class KGroupBoxSeparator : KGroupBox {
    method KGroupBoxSeparator (line 37) | public KGroupBoxSeparator() {

FILE: Au.Controls/Simple/KHotkeyControl.cs
  class KHotkeyControl (line 7) | public class KHotkeyControl : UserControl {
    method KHotkeyControl (line 15) | public KHotkeyControl(bool forTrigger = false, bool onlyMod = false) {
    method _Format (line 106) | void _Format(KMod mod, KMod modAny = 0) {
    method Focus (line 148) | public new void Focus() {

FILE: Au.Controls/Simple/KListBoxItemWithImage.cs
  class KListBoxItemWithImage (line 6) | public class KListBoxItemWithImage : ListBoxItem {
    method KListBoxItemWithImage (line 12) | public KListBoxItemWithImage(object image, string text, int imageMargi...
    method SetText (line 17) | public void SetText(string text) {
    method SetText (line 21) | public void SetText(string text, string tooltip) {
    method ToString (line 26) | public override string ToString() => _tb.Text;
    method CreateContent (line 28) | public static (StackPanel panel, FrameworkElement image, TextBlock tex...

FILE: Au.Controls/Simple/KPasswordBox.cs
  class KPasswordBox (line 10) | class KPasswordBox : UserControl {
    method KPasswordBox (line 16) | public KPasswordBox() {

FILE: Au.Controls/Simple/KPopup.cs
  class KPopup (line 15) | public class KPopup {
    method KPopup (line 25) | public KPopup(WS style = WS.POPUP | WS.THICKFRAME, WSE exStyle = WSE.T...
    method _Create (line 32) | HwndSource _Create() {
    class _HwndSource (line 52) | class _HwndSource : HwndSource {
      method _HwndSource (line 53) | public _HwndSource(HwndSourceParameters p) : base(p) { }
    method OnHandleCreated (line 57) | protected virtual void OnHandleCreated() { HandleCreated?.Invoke(); }
    method FromHwnd (line 60) | public static KPopup FromHwnd(wnd w) {
    method ShowByRect (line 141) | public void ShowByRect(object owner, Dock? side, RECT? rScreen = null,...
    method Close (line 253) | public void Close() {
    method _ClickCloseTimer (line 295) | void _ClickCloseTimer(bool? start) {
    type CC (line 326) | [Flags]
    method _Hook (line 329) | unsafe nint _Hook(nint hwnd, int msg, nint wParam, nint lParam, ref bo...
    method _Hook (line 335) | unsafe nint? _Hook(wnd w, int msg, nint wParam, nint lParam) {

FILE: Au.Controls/Simple/KPopupListBox.cs
  class KPopupListBox (line 18) | public class KPopupListBox : Popup {
    method KPopupListBox (line 22) | public KPopupListBox() {
    method _CloseOK (line 38) | void _CloseOK() {
    method OnMouseUp (line 44) | protected override void OnMouseUp(MouseButtonEventArgs e) {
    method OnKeyUp (line 54) | protected override void OnKeyUp(KeyEventArgs e) { //if OnKeyDown, next...
    method OnOpened (line 62) | protected override void OnOpened(EventArgs e) {
    method OnClosed (line 69) | protected override void OnClosed(EventArgs e) {
    method _Hook (line 75) | bool _Hook(HookData.ThreadKeyboard k) {

FILE: Au.Controls/Simple/KScreenComboBox.cs
  class KScreenComboBox (line 9) | public class KScreenComboBox : ComboBox {
    method KScreenComboBox (line 11) | public KScreenComboBox() {
    method Result (line 41) | public string Result(bool trigger) {

FILE: Au.Controls/Simple/KTextBox.cs
  class KTextBox (line 15) | public class KTextBox : TextBox {
    method OnGotKeyboardFocus (line 29) | protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventAr...
    method OnLostKeyboardFocus (line 34) | protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventA...
    method OnMouseDown (line 39) | protected override void OnMouseDown(MouseButtonEventArgs e) {
    method OnContextMenuOpening (line 56) | protected override void OnContextMenuOpening(ContextMenuEventArgs e) {
  class KTextBoxFile (line 68) | public class KTextBoxFile : TextBox {
    method OnPreviewDragEnter (line 72) | protected override void OnPreviewDragEnter(DragEventArgs e) {
    method OnPreviewDragOver (line 78) | protected override void OnPreviewDragOver(DragEventArgs e) {
    method OnDrop (line 84) | protected override void OnDrop(DragEventArgs e) {
    method OnContextMenuOpening (line 96) | protected override void OnContextMenuOpening(ContextMenuEventArgs e) {
    method GetCode (line 163) | public string GetCode() {

FILE: Au.Controls/Simple/KWpfMenu.cs
  class KWpfMenu (line 27) | public class KWpfMenu : ContextMenu {
    method KWpfMenu (line 29) | public KWpfMenu() {
    method Add (line 50) | public MenuItem Add(object text, Action<WpfMenuActionArgs> click = nul...
    method Separator (line 108) | public void Separator() { CurrentAddMenu.Items.Add(new Separator()); }
    method Submenu (line 120) | public UsingEndAction Submenu(object text, object icon = null, Action<...
    method Show (line 157) | public void Show(UIElement owner, bool byCaret = false, bool modal = f...
    method _EndModal (line 186) | void _EndModal() {
    method OnClosed (line 194) | protected override void OnClosed(RoutedEventArgs e) {
    method MenuItemIcon_ (line 199) | internal static object MenuItemIcon_(object icon) {
    method ShowSimple (line 239) | public static int ShowSimple(Strings items, UIElement owner, bool byCa...
    class _MenuItem (line 271) | class _MenuItem : MenuItem {
      method _MenuItem (line 276) | public _MenuItem(KWpfMenu m) { _m = m; }
      method OnClick (line 278) | protected override void OnClick() {
      method OnPreviewMouseUp (line 288) | protected override void OnPreviewMouseUp(MouseButtonEventArgs e) {
  class WpfMenuActionArgs (line 309) | public class WpfMenuActionArgs {
    method WpfMenuActionArgs (line 311) | public WpfMenuActionArgs(MenuItem item) { Item = item; }
    method ToString (line 319) | public override string ToString() {

FILE: Au.Controls/Util, Api/HwndHostAccessibleBase_.cs
  class HwndHostAccessibleBase_ (line 12) | abstract class HwndHostAccessibleBase_ : IAccessible, IDisposable/*, IRe...
    method HwndHostAccessibleBase_ (line 19) | public HwndHostAccessibleBase_(FrameworkElement e, wnd w) {
    method Dispose (line 33) | public void Dispose() {
    method get_accParent (line 42) | IAccessible IAccessible.get_accParent() => _StdAO?.get_accParent();
    method get_accChildCount (line 58) | int IAccessible.get_accChildCount() => ChildCount;
    method get_accChild (line 61) | int IAccessible.get_accChild(VarInt varChild, [MarshalAs(UnmanagedType...
    method Name (line 70) | public virtual string Name(int child) => _e.Name;
    method get_accName (line 71) | string IAccessible.get_accName(VarInt varChild) => Name(varChild);
    method Value (line 76) | public virtual string Value(int child) => null;
    method get_accValue (line 77) | string IAccessible.get_accValue(VarInt varChild) => Value(varChild);
    method Description (line 82) | public virtual string Description(int child) => null;
    method get_accDescription (line 83) | string IAccessible.get_accDescription(VarInt varChild) => Description(...
    method Role (line 85) | public abstract ERole Role(int child);
    method get_accRole (line 86) | VarInt IAccessible.get_accRole(VarInt varChild) => (int)Role(varChild)...
    method State (line 93) | public virtual EState State(int child) {
    method get_accState (line 104) | VarInt IAccessible.get_accState(VarInt varChild) => (int)State(varChil...
    method Help (line 109) | public virtual string Help(int child) => null;
    method get_accHelp (line 110) | string IAccessible.get_accHelp(VarInt varChild) => Help(varChild);
    method get_accHelpTopic (line 112) | int IAccessible.get_accHelpTopic(out string pszHelpFile, VarInt varChi...
    method KeyboardShortcut (line 117) | public virtual string KeyboardShortcut(int child) => null;
    method get_accKeyboardShortcut (line 118) | string IAccessible.get_accKeyboardShortcut(VarInt varChild) => Keyboar...
    method get_accFocus (line 125) | object IAccessible.get_accFocus() => wnd.thisThread.isFocused(_w) ? Fo...
    method get_accSelection (line 135) | object IAccessible.get_accSelection() {
    class _EnumSelected (line 142) | unsafe class _EnumSelected : IEnumVarInt {
      method _EnumSelected (line 145) | public _EnumSelected(List<int> a) { _a = a; }
      method Next (line 147) | public int Next(int celt, VarInt* rgVar, int* pCeltFetched) {
      method Skip (line 154) | public int Skip(int celt) {
      method Reset (line 161) | public void Reset() { _i = 0; }
      method Clone (line 163) | public IEnumVarInt Clone() => throw new NotImplementedException();
    type IEnumVarInt (line 166) | [ComImport, Guid("00020404-0000-0000-C000-000000000046"), InterfaceTyp...
      method Next (line 168) | [PreserveSig] int Next(int celt, VarInt* rgVar, int* pCeltFetched);
      method Skip (line 169) | [PreserveSig] int Skip(int celt);
      method Reset (line 170) | void Reset();
      method Clone (line 171) | IEnumVarInt Clone();
    method DefaultAction (line 177) | public virtual string DefaultAction(int child) => null;
    method get_accDefaultAction (line 178) | string IAccessible.get_accDefaultAction(VarInt varChild) => DefaultAct...
    method SelectChild (line 184) | public virtual void SelectChild(ESelect flagsSelect, int child) { }
    method accSelect (line 185) | void IAccessible.accSelect(ESelect flagsSelect, VarInt varChild) {
    method ChildRect (line 200) | public virtual RECT ChildRect(int child) => default;
    method accLocation (line 201) | void IAccessible.accLocation(out int pxLeft, out int pyTop, out int pc...
    method Navigate (line 217) | public virtual int? Navigate(NAVDIR navDir, int childStart) => null;
    method accNavigate (line 218) | object IAccessible.accNavigate(NAVDIR navDir, VarInt varStart) {
    method HitTest (line 235) | public virtual int HitTest(int x, int y) => -1;
    method accHitTest (line 236) | VarInt IAccessible.accHitTest(int xLeft, int yTop) {
    method DoDefaultAction (line 246) | public virtual void DoDefaultAction(int child) { }
    method accDoDefaultAction (line 247) | void IAccessible.accDoDefaultAction(VarInt varChild) => DoDefaultActio...
    method put_accName (line 249) | void IAccessible.put_accName(VarInt varChild, string szName) { }
    method put_accValue (line 251) | void IAccessible.put_accValue(VarInt varChild, string szValue) { }
    method WmGetobject (line 277) | public nint WmGetobject(nint wParam, nint lParam) {

FILE: Au.Controls/Util, Api/KApi.cs
  class KApi (line 3) | [DebuggerStepThrough]
    method DrawFrameControl (line 6) | [DllImport("user32.dll")]

FILE: Au.Controls/Util, Api/KExtWpf.cs
  class KExtWpf (line 12) | public static class KExtWpf {
    method xAddCheck (line 21) | public static wpfBuilder xAddCheck<T>(this wpfBuilder b, out T c, stri...
    method xAddText (line 32) | public static wpfBuilder xAddText<TTBox>(this wpfBuilder b, out TTBox ...
    method xAddCheckText (line 46) | public static KCheckTextBox xAddCheckText<TTBox>(this wpfBuilder b, st...
    method xAddCheckText (line 54) | public static KCheckTextBox xAddCheckText(this wpfBuilder b, string na...
    method xAddCheckTextDropdown (line 66) | public static KCheckTextBox xAddCheckTextDropdown<TTBox>(this wpfBuild...
    method xAddCheckTextDropdown (line 75) | public static KCheckTextBox xAddCheckTextDropdown(this wpfBuilder b, s...
    method xAddCheckCombo (line 85) | public static KCheckComboBox xAddCheckCombo(this wpfBuilder b, string ...
    method xAddOther (line 98) | public static wpfBuilder xAddOther<T>(this wpfBuilder b, out T other, ...
    method _xSetOther (line 105) | static void _xSetOther(wpfBuilder b, FrameworkElement e) {
    method xAddButton (line 113) | public static wpfBuilder xAddButton(this wpfBuilder b, out Button butt...
    method xAddButton (line 122) | public static wpfBuilder xAddButton(this wpfBuilder b, string text, Ac...
    method xAddCheckAnd (line 129) | public static wpfBuilder xAddCheckAnd<T>(this wpfBuilder b, out KCheck...
    method xAddInBorder (line 138) | public static Border xAddInBorder<T>(this wpfBuilder b, out T var, str...
    method xAddInBorder (line 148) | public static Border xAddInBorder(this wpfBuilder b, FrameworkElement ...
    method xAddCheckIcon (line 158) | public static wpfBuilder xAddCheckIcon(this wpfBuilder b, out KCheckBo...
    method xAddButtonIcon (line 172) | public static wpfBuilder xAddButtonIcon(this wpfBuilder b, out Button ...
    method xAddButtonIcon (line 182) | public static wpfBuilder xAddButtonIcon(this wpfBuilder b, string icon...
    method xAddGroupSeparator (line 190) | public static wpfBuilder xAddGroupSeparator(this wpfBuilder b, object ...
    method xAddToolBar (line 204) | public static ToolBar xAddToolBar(this wpfBuilder t, bool vertical = f...
    method AddButton (line 224) | public static Button AddButton(this ToolBar t, string icon, Action<But...
    method AddCheckbox (line 237) | public static KCheckBox AddCheckbox(this ToolBar t, string icon, strin...
    method xContextMenu (line 251) | public static void xContextMenu(this ButtonBase t, Action<popupMenu> f...
    method xDropdownMenu (line 266) | public static void xDropdownMenu(this ButtonBase t, Action<popupMenu> ...
    method xStartPropertyGrid (line 278) | public static ScrollViewer xStartPropertyGrid(this wpfBuilder b, strin...
    method xEndPropertyGrid (line 292) | public static void xEndPropertyGrid(this wpfBuilder b) {
    method xSetHeaderProp (line 301) | public static void xSetHeaderProp(this wpfBuilder b) {
    method xAddSplitterV (line 318) | public static void xAddSplitterV(this wpfBuilder b, int span = 1, doub...
    method xAddSplitterH (line 325) | public static void xAddSplitterH(this wpfBuilder b, int span = 1, doub...
    method xAddInfoBlockF (line 333) | public static wpfBuilder xAddInfoBlockF(this wpfBuilder t, wpfBuilder....
    method xAddInfoBlockT (line 342) | public static wpfBuilder xAddInfoBlockT(this wpfBuilder t, string text...
    method xAddInfoBlockT (line 348) | public static wpfBuilder xAddInfoBlockT(this wpfBuilder t, out TextBlo...
    method xAddControlHelpButton (line 356) | public static wpfBuilder xAddControlHelpButton(this wpfBuilder t, Acti...
    method xAddControlHelpButton (line 363) | public static wpfBuilder xAddControlHelpButton(this wpfBuilder t, stri...
    method xAddDialogHelpButtonAndF1 (line 369) | public static wpfBuilder xAddDialogHelpButtonAndF1(this wpfBuilder t, ...
    method xAddDialogHelpButtonAndF1 (line 382) | public static wpfBuilder xAddDialogHelpButtonAndF1(this wpfBuilder t, ...
    method xValidateHotkey (line 388) | public static wpfBuilder xValidateHotkey(this wpfBuilder b, bool error...
    method xBindCheckedVisible (line 400) | public static wpfBuilder xBindCheckedVisible(this wpfBuilder t, CheckB...
    method xBindCheckedEnabled (line 413) | public static wpfBuilder xBindCheckedEnabled(this wpfBuilder t, CheckB...
    method xAddDocked (line 425) | public static void xAddDocked(this DockPanel t, UIElement e, Dock dock) {
    method xAddCutCopyPasteToContextMenu (line 436) | public static ContextMenu xAddCutCopyPasteToContextMenu(this TextBox t...
    method xAdd (line 465) | public static MenuItem xAdd(this ContextMenu t, string name, string ho...
    method xAddSeparator (line 475) | public static void xAddSeparator(this ContextMenu t) {

FILE: Au.Controls/Util, Api/KImageUtil.cs
  class KImageUtil (line 8) | public static unsafe class KImageUtil {
    type BITMAPFILEHEADER (line 11) | [StructLayout(LayoutKind.Sequential, Pack = 2)]
    type BITMAPCOREHEADER (line 20) | internal struct BITMAPCOREHEADER {
    type BITMAPV5HEADER (line 28) | internal struct BITMAPV5HEADER {
    type CIEXYZTRIPLE (line 55) | internal struct CIEXYZTRIPLE {
    type CIEXYZ (line 61) | internal struct CIEXYZ {
    type BitmapFileInfo_ (line 69) | internal struct BitmapFileInfo_ {
    method GetBitmapFileInfo_ (line 82) | internal static bool GetBitmapFileInfo_(byte[] mem, out BitmapFileInfo...
    type ImageType (line 116) | public enum ImageType {
    method ImageTypeFromString (line 157) | internal static ImageType ImageTypeFromString(out int prefixLength, RB...
    method ImageTypeFromString (line 232) | public static ImageType ImageTypeFromString(out int prefixLength, stri...
    method BmpFileDataFromString (line 245) | public static byte[] BmpFileDataFromString(string s, ImageType t, bool...
    method _ImageToBytes (line 288) | static byte[] _ImageToBytes(Bitmap im) {
    method _IconToBytes (line 313) | static byte[] _IconToBytes(string s, bool isCursor, bool searchPath) {
    method GetIconSizeFromHandle (line 356) | public static int GetIconSizeFromHandle(IntPtr hi)
    method BmpFileDataToString (line 377) | public static string BmpFileDataToString(byte[] bmpFileData) {
    method ImageToString (line 390) | public static string ImageToString(string path) {

FILE: Au.Controls/resources/XamlResources.cs
  class XamlResources (line 5) | public class XamlResources {
    method XamlResources (line 7) | static XamlResources() {

FILE: Au.Editor/App/App.TrayIcon.cs
  class App (line 3) | static partial class App {
    class TrayIcon (line 4) | internal static class TrayIcon {
      method Update_ (line 12) | internal static void Update_() {
      method _Add (line 35) | static void _Add(bool restore) {
      method _GetIcon (line 54) | static IntPtr _GetIcon() {
      method _Notified (line 63) | static void _Notified(nint wParam, nint lParam) {
      method _WndProc (line 79) | static unsafe nint _WndProc(wnd w, int m, nint wParam, nint lParam) {
      method _ContextMenu (line 99) | static void _ContextMenu() {
      method _Exit (line 107) | static void _Exit() {

FILE: Au.Editor/App/App.cs
  class App (line 11) | static partial class App {
    method Main (line 22) | static int Main(string[] args) {
    method _Main (line 81) | [MethodImpl(MethodImplOptions.NoInlining)]
    method MainFinally_ (line 156) | internal static void MainFinally_() {
    class _Application (line 170) | class _Application : Application {
      method OnSessionEnding (line 171) | protected override void OnSessionEnding(SessionEndingCancelEventArgs...
    method ShowWindow (line 206) | public static void ShowWindow() {
    method _UnhandledException (line 219) | static void _UnhandledException(object sender, UnhandledExceptionEvent...
    method _Assembly_Resolving (line 227) | private static Assembly _Assembly_Resolving(AssemblyLoadContext alc, A...
    method _UnmanagedDll_Resolving (line 242) | private static IntPtr _UnmanagedDll_Resolving(Assembly _, string name) {
    method _FindEditorExtensionInStack (line 253) | static bool _FindEditorExtensionInStack(out Assembly asm) {
    method InitThisAppFoldersEtc_ (line 264) | internal static void InitThisAppFoldersEtc_(string[] args = null) {
    method _RemindToBuildAllPlatforms (line 311) | static void _RemindToBuildAllPlatforms() {
    method OnMainWindowLoaded_ (line 320) | internal static void OnMainWindowLoaded_() {
    method OnMainWindowClosed_ (line 366) | internal static void OnMainWindowClosed_() {
    method _RestartAsAdmin (line 372) | static bool _RestartAsAdmin(string[] args) {
    method Restart (line 393) | public static void Restart(string commandLine = null, bool admin = fal...
    method _RestartArm64 (line 401) | static unsafe void _RestartArm64(string[] args) {
    method _TimerProc (line 442) | static void _TimerProc(timer t) {
    method TryFileOperation (line 468) | public static bool TryFileOperation(ReadOnlySpan<string> paths, Action...
    method CheckForUpdates (line 474) | public static async void CheckForUpdates(System.Windows.Controls.Butto...
  type AppState (line 507) | enum AppState {

FILE: Au.Editor/App/AppSettings.cs
  type AppSettings (line 11) | record AppSettings : JSettings {
  type WorkspaceSettings (line 283) | record WorkspaceSettings : JSettings {

FILE: Au.Editor/App/CommandLine.cs
  class CommandLine (line 4) | static class CommandLine {
    method ProgramStarted1 (line 9) | public static bool ProgramStarted1(ReadOnlySpan<string> args, out int ...
    method ProgramStarted2 (line 72) | public static bool ProgramStarted2(string[] args) {
    method ProgramLoaded (line 182) | public static void ProgramLoaded() {
    method UILoaded (line 194) | public static void UILoaded() {
    method _WndProc (line 222) | static nint _WndProc(wnd w, int message, nint wparam, nint lparam) {
    method _WmUser (line 241) | static nint _WmUser(nint wparam, nint lparam) {
    method _WmCopyData (line 288) | static nint _WmCopyData(nint wparam, nint lparam) {
    method _RunEditorAsAdmin (line 444) | [MethodImpl(MethodImplOptions.NoOptimization)]
    method _MBox (line 513) | [Conditional("DEBUG")]
    method _EnsureEditorRunningAndGetMsgWindow (line 525) | static bool _EnsureEditorRunningAndGetMsgWindow(out wnd wMsg, string a...
    method _LetEditorRunScript (line 544) | static unsafe int _LetEditorRunScript(ReadOnlySpan<string> args, strin...
    class _Api (line 577) | static unsafe class _Api {
      method WTSQueryUserToken (line 578) | [DllImport("wtsapi32.dll")]
      method GetTokenInformation (line 581) | [DllImport("advapi32.dll")]
      method CreateEnvironmentBlock (line 584) | [DllImport("userenv.dll")]
      method DestroyEnvironmentBlock (line 587) | [DllImport("userenv.dll")]
      method CreateProcessAsUser (line 590) | [DllImport("advapi32.dll", EntryPoint = "CreateProcessAsUserW", SetL...
      method WTSSendMessage (line 594) | [DllImport("wtsapi32.dll", EntryPoint = "WTSSendMessageW")]
      method AttachConsole (line 600) | [DllImport("kernel32.dll")]

FILE: Au.Editor/App/DOptions.cs
  class DOptions (line 14) | class DOptions : KDialogWindow {
    type EPage (line 15) | public enum EPage { App, Workspace, FontAndColors, CodeEditor, Templat...
    method AaShow (line 17) | public static void AaShow(EPage? page = null) {
    method DOptions (line 25) | DOptions() {
    method _Page (line 55) | wpfBuilder _Page(string name, WBPanelType panelType = WBPanelType.Grid) {
    method _App (line 61) | void _App() {
    method _Workspace (line 100) | void _Workspace() {
    class _FontControls (line 161) | class _FontControls {
      method Init (line 165) | public void Init(string[] fonts) {
      method Init (line 174) | public void Init(string[] fonts, AppSettings.font_t f) {
      method Set (line 179) | public void Set(string fontName, double fontSize) {
      method Get (line 184) | public (string name, double size) Get() {
      method Apply (line 189) | public bool Apply(ref AppSettings.font_t f) {
    method _FontAndColors (line 199) | void _FontAndColors() {
    method _CodeEditor (line 508) | void _CodeEditor() {
    method _Templates (line 603) | void _Templates() {
    method _Hotkeys (line 657) | void _Hotkeys() {
    method _AI (line 680) | void _AI() {
    method _Other (line 816) | void _Other() {
    method _OS (line 838) | unsafe void _OS() {
    class _Api (line 871) | class _Api : NativeApi {
      method EnumFontFamiliesEx (line 872) | [DllImport("gdi32.dll", EntryPoint = "EnumFontFamiliesExW")]

FILE: Au.Editor/App/MainWindow.cs
  class MainWindow (line 10) | partial class MainWindow : Window {
    method OnPropertyChanged (line 11) | protected override void OnPropertyChanged(DependencyPropertyChangedEve...
    method _Init (line 22) | void _Init() {
    method OnSourceInitialized (line 74) | protected override void OnSourceInitialized(EventArgs e) {
    method OnClosing (line 126) | protected override void OnClosing(CancelEventArgs e) {
    method OnClosed (line 140) | protected override void OnClosed(EventArgs e) {
    method _WndProc (line 154) | unsafe nint _WndProc(nint hwnd, int msg, nint wParam, nint lParam, ref...
    method OnActivatedDeactivatedAppOrPip_ (line 179) | internal static void OnActivatedDeactivatedAppOrPip_(bool activated) {
    method Hide_ (line 194) | internal void Hide_() {
    method _StartProfileOptimization (line 235) | static void _StartProfileOptimization() {
    method AaShowAndActivate (line 244) | public void AaShowAndActivate() {
    method _NormalizeMouseWheel (line 253) | static unsafe void _NormalizeMouseWheel() {

FILE: Au.Editor/App/Menus.cs
  class Menus (line 40) | static class Menus {
    class File (line 53) | [Command(target = "Files")]
      class New (line 55) | [Command(target = "", image = "*Material.FilePlusOutline" + black)]
        method _New (line 57) | static FileNode _New(string name) => App.Model.NewItem(name, begin...
        method New_script (line 59) | [Command('s', keys = "Ctrl+N", image = EdIcons.Script, tooltip = "...
        method New_class (line 62) | [Command('c', image = EdIcons.Class, tooltip = "Class files contai...
        method New_text_file (line 65) | [Command('t', image = "*FeatherIcons.FileText" + black, tooltip = ...
        method New_folder (line 68) | [Command('f', image = EdIcons.Folder)]
        method _Init (line 71) | static void _Init(KMenuCommands mc, KMenuCommands.Command c) {
      method Delete (line 76) | [Command("Delete...", separator = true, keysText = "Delete", image =...
      method Rename (line 79) | [Command(keys = "F2", image = "*BoxIcons.RegularRename @15" + black)]
      method Properties (line 82) | [Command(image = "*RemixIcon.ChatSettingsLine" + green)]
      class CopyPaste (line 85) | [Command("Copy, paste")]
        method MultiSelect_files (line 87) | [Command("Multi-select", checkable = true, image = "*Modern.ListTw...
        method Cut_file (line 90) | [Command("Cu_t", separator = true, keysText = "Ctrl+X")]
        method Copy_file (line 93) | [Command("Copy", keysText = "Ctrl+C")]
        method Paste_file (line 96) | [Command("Paste", keysText = "Ctrl+V")]
        method CancelCutCopy_file (line 99) | [Command("Cancel Cut/Copy", keysText = "Esc")]
        method Copy_relative_path (line 102) | [Command('r', separator = true, tooltip = @"Path in this workspace...
        method Copy_full_path (line 105) | [Command('f', tooltip = "Full path of the file.")]
      class OpenClose (line 109) | [Command("Open, close")]
        method Open (line 111) | [Command(keysText = "Enter")]
        method Open_in_default_app (line 114) | [Command(image = "*MaterialDesign.OpenInNew" + black)]
        method Select_in_Explorer (line 117) | [Command(image = "*Material.FolderMarker" + darkYellow)]
        method Close (line 120) | [Command(separator = true, target = "", keys = "Ctrl+F4", keysText...
        method Close_all (line 123) | [Command(target = "")]
        method Collapse_all_folders (line 126) | [Command(separator = true, target = "", image = "*Codicons.Collaps...
        method Collapse_inactive_folders (line 129) | [Command(target = "", image = "*Codicons.CollapseAll" + black)]
      class ExportImport (line 133) | [Command("Export, import", separator = true)]
        method Export (line 135) | [Command("...")]
        method Import_zip (line 138) | [Command("Import .zip...", separator = true)]
        method Import_workspace (line 145) | [Command("...")]
        method Import_files (line 152) | [Command("...")]
        method Import_folder (line 155) | [Command("...")]
      class Workspace (line 159) | [Command(target = "")]
        method _Init (line 161) | static void _Init(KMenuCommands mc, KMenuCommands.Command c) {
        method Reload_this_workspace (line 165) | [Command(image = "*Material.Reload" + black)]
        method Open_workspace (line 168) | [Command("...", separator = true)]
        method New_workspace (line 171) | [Command("...")]
        method Repair_workspace (line 174) | [Command("...", separator = true)]
        method Save_now (line 177) | [Command(separator = true, keys = "Ctrl+S", image = "*BoxIcons.Reg...
      class Git (line 181) | [Command(target = "", image = "*Material.Git" + blue)]
        method Git_status (line 183) | [Command(image = "*MaterialDesign.InfoOutline" + blue)]
        method Git_commit (line 186) | [Command("Commit", image = "*RemixIcon.GitCommitLine" + blue)]
        method Git_push (line 189) | [Command("Push to GitHub", image = "*Unicons.CloudUpload" + blue)]
        method Git_pull (line 192) | [Command("Pull from GitHub", image = "*Unicons.CloudDownload" + bl...
        method Git_gui (line 195) | [Command("GitHub Desktop", image = "*Codicons.Github" + purple, se...
        method Git_cmd (line 198) | [Command("Cmd", image = "*Material.Console" + black)]
        method Git_workspace_folder (line 201) | [Command("Workspace folder", image = "*Material.Folder" + darkYell...
        method Git_reload_workspace (line 204) | [Command("Reload workspace", image = "*Material.Reload" + black)]
        method Git_sign_out (line 207) | [Command("GitHub sign out", separator = true)]
        method Git_maintenance (line 210) | [Command("Maintenance...")]
        method Git_setup (line 213) | [Command("...")]
      method Close_window (line 217) | [Command(separator = true, target = "", keysText = "Alt+F4")]
      method Exit (line 220) | [Command(target = "")]
    class Edit (line 224) | [Command(target = "Edit")]
      class Clipboard (line 226) | [Command]
        method Cut (line 228) | [Command('t', keys = "Ctrl+X", image = "*Zondicons.EditCut" + brown)]
        method Copy (line 231) | [Command(keys = "Ctrl+C", image = "*Material.ContentCopy" + brown)]
        method Paste (line 234) | [Command(keys = "Ctrl+V", image = EdIcons.Paste)]
        method Forum_copy (line 237) | [Command("Copy _forum code", image = "*Material.ForumOutline" + br...
        method Copy_HTML_span_style (line 240) | [Command("Copy HTML <span style>")]
        method Copy_HTML_span_class_CSS (line 243) | [Command("Copy HTML <span class> and CSS")]
        method Copy_HTML_span_class (line 246) | [Command("Copy HTML <span class>")]
        method Copy_markdown (line 249) | [Command]
        method Copy_without_screenshots (line 252) | [Command]
      class UndoRedo (line 256) | [Command("Undo")]
        method Undo (line 258) | [Command(keys = "Ctrl+Z", image = EdIcons.Undo)]
        method Redo (line 261) | [Command(keys = "Ctrl+Y", image = "*Ionicons.RedoiOS" + brown)]
        method Undo_in_files (line 264) | [Command(separator = true, tooltip = "Undo a multi-file operation,...
        method Redo_in_files (line 267) | [Command(tooltip = "Redo a multi-file operation.")]
      class Find (line 271) | [Command("Find", separator = true)]
        method Find_text (line 273) | [Command("Find text", keys = "Ctrl+F", image = "*Material.FindRepl...
        method Find_symbol (line 276) | [Command("...", keys = "Ctrl+T", image = "*FontAwesome.SearchLocat...
        method Find_references (line 279) | [Command(keys = "Shift+F12", image = EdIcons.References, separator...
        method Find_implementations (line 282) | [Command(image = "*Material.InformationVariant" + blue)]
        method Go_to_definition (line 285) | [Command(keys = "F12", image = "*RemixIcon.WalkFill" + blue, separ...
        method Go_to_base (line 288) | [Command]
        method Rename_symbol (line 291) | [Command(keys = "F2", image = "*PicolIcons.Edit" + blue, separator...
        method Find_next (line 294) | [Command(keys = "F3", target = "", separator = true)]
        method Find_previous (line 297) | [Command(keys = "Shift+F3", target = "")]
        method Next_found (line 300) | [Command(keys = "F4", target = "")]
        method Previous_found (line 303) | [Command(keys = "Shift+F4", target = "")]
      class Assist (line 307) | [Command]
        method Autocompletion_list (line 309) | [Command(keysText = "Ctrl+Space", image = "*FontAwesome.ListUlSoli...
        method Parameter_info (line 312) | [Command(keysText = "Ctrl+Shift+Space", image = "*RemixIcon.Parent...
        method Autocorrect_raw_enter (line 326) | [Command("Raw Enter before ) ] ;", checkable = true, separator = t...
        method _Init (line 333) | static void _Init(KMenuCommands mc, KMenuCommands.Command c) {
      class Navigate (line 338) | [Command]
        method Toggle_bookmark (line 340) | [Command(image = "*Material.Bookmark @16" + darkYellow)]
        method Previous_bookmark (line 343) | [Command(image = "*JamIcons.ArrowSquareUp" + black, keys = "Alt+Up...
        method Next_bookmark (line 346) | [Command(image = "*JamIcons.ArrowSquareDown" + black, keys = "Alt+...
        method Go_back (line 349) | [Command(keys = "Alt+Left", target = "", image = EdIcons.Back, sep...
        method Go_forward (line 352) | [Command(keys = "Alt+Right", target = "", image = "*EvaIcons.Arrow...
        method Previous_document (line 355) | [Command(separator = true, target = "", keys = "Ctrl+Tab", noIndir...
      class Selection (line 359) | [Command(separator = true)]
        method Toggle_comment (line 361) | [Command(keys = "Ctrl+/", image = $"*Material.SlashForward{brown} ...
        method Toggle_line_comment (line 364) | [Command(keysText = "R-click margin", image = $"*Material.SlashFor...
        method Comment_selection (line 367) | [Command(image = $"*Material.SlashForward{brown} %1,1,7,1,f; *Mate...
        method Uncomment_selection (line 370) | [Command(image = $"*Material.SlashForward{brown} %1,1,7,1,f; *Mate...
        method Surround (line 375) | [Command("...", image = "*RemixIcon.BracesLine" + brown, separator...
        method Documentation_tags (line 378) | [Command("...")]
        method Select_all (line 381) | [Command(separator = true, keysText = "Ctrl+A")]
      class Tidy_code (line 385) | [Command]
        method Format_document (line 387) | [Command(image = "*PixelartIcons.AlignLeft" + brown)]
        method Format_selection (line 390) | [Command(image = "*PixelartIcons.AlignLeft" + brown)]
        method Disable_format_selection (line 393) | [Command]
        method Indent (line 396) | [Command("Indent selected lines", keysText = "Tab", image = "*Mate...
        method Unindent (line 400) | [Command("Unindent selected lines", keysText = "Shift+Tab", image ...
        method Deduplicate_wnd_find (line 403) | [Command("Deduplicate wnd.find", separator = true, image = "*Mater...
        method Remove_screenshots (line 406) | [Command(tooltip = "Remove screenshots in all or selected text.\nS...
      class Generate (line 410) | [Command]
        method Create_delegate (line 412) | [Command(keys = "Ctrl+Shift+D", image = "*Material.Lambda" + brown)]
        method Implement_interface (line 415) | [Command("Implement interface/abstract", tooltip = "Implement memb...
        method Create_event_handlers (line 418) | [Command]
        method Create_overrides (line 421) | [Command]
        method Create_GUID (line 424) | [Command("Create GUID")]
        method Add_function_Main (line 430) | [Command]
        method Convert_PreserveSig (line 433) | [Command("Convert [PreserveSig] methods")]
      class View (line 437) | [Command(separator = true)]
        method Wrap_lines (line 439) | [Command(checkable = true, keys = "Ctrl+W", image = "*Codicons.Wor...
        method Images_in_code (line 442) | [Command(checkable = true, image = "*Material.TooltipImageOutline"...
        method WPF_preview (line 445) | [Command(checkable = true, image = "*Codicons.Preview" + green)]
        method Customize_edit_context_menu (line 448) | [Command("Customize...", separator = true)]
    class Code (line 453) | [Command(target = "Edit", tooltip = "Tools for creating code")]
      method Input_recorder (line 455) | [Command(underlined: 'r', image = "*Material.RecordRec" + blue)]
      method wnd (line 458) | [Command("Find _window", image = "*BoxIcons.SolidWindowAlt" + blue)]
      method elm (line 461) | [Command("Find UI _element", image = "*Material.CheckBoxOutline @15"...
      method uiimage (line 464) | [Command("Find _image", image = "*Material.ImageSearchOutline" + blue)]
      method ocr (line 467) | [Command("Find _OCR text", image = "*Material.Ocr" + blue)]
      method Get_files_in_folder (line 470) | [Command(image = "*Material.FolderOutline" + blue)]
      method Keys (line 473) | [Command(keysText = "Ctrl+Space in string", image = EdIcons.Keys)]
      method Regex (line 476) | [Command(underlined: 'x', image = EdIcons.Regex, keysText = "Ctrl+Sp...
      method Color (line 479) | [Command(image = EdIcons.Color)]
      method Windows_API (line 482) | [Command(underlined: 'A', image = "*Material.Api" + blue)]
      method Quick_capturing_info (line 485) | [Command(separator = true)]
    class TT (line 489) | [Command("T\x2009T", target = "", tooltip = "Triggers and toolbars")]
      method Hotkey_triggers (line 491) | [Command('k'/*, separator = true*/)]
      method Autotext_triggers (line 494) | [Command]
      method Mouse_triggers (line 497) | [Command]
      method Window_triggers (line 500) | [Command]
      method New_trigger (line 503) | [Command("...", image = EdIcons.Trigger)]
      method Other_triggers (line 514) | [Command]
      method Toolbars (line 517) | [Command(separator = true)]
      method New_toolbar (line 520) | [Command("...", image = "*Material.ShapeRectanglePlus" + blue)]
      method Toolbar_trigger (line 523) | [Command("...")]
      method Active_toolbars (line 526) | [Command]
      method Disable_triggers (line 529) | [Command(separator = true)]
      method _Init (line 532) | static void _Init(KMenuCommands mc, KMenuCommands.Command c) {
      method Restart_TT_script (line 536) | [Command]
      method Find_triggers (line 539) | [Command(tooltip = "Finds triggers of current script.\nFinds its nam...
      method Triggers_list_info (line 542) | [Command]
      class Script_launchers (line 545) | [Command(separator = true, image = "*RemixIcon.TerminalLine" + blue)]
        method Command_line (line 547) | [Command("...", image = "*RemixIcon.TerminalLine" + blue)]
        method Schedule (line 550) | [Command("...", image = "*Unicons.Schedule" + blue)]
        method Shortcut (line 553) | [Command("...")]
        method Shell_menu (line 556) | [Command("...")]
        method Run_at_startup (line 559) | [Command("...", separator = true)]
    class Run (line 564) | [Command(target = "Edit")]
      method Compile (line 566) | [Command(image = "*VaadinIcons.Compile" + blue)]
      method Run_script (line 569) | [Command("Run", image = "*Codicons.DebugStart" + green2)]
      method End_task (line 572) | [Command(image = "*Material.SquareOutline @14" + black)]
      method Recent (line 590) | [Command("...", image = "*BoxIcons.RegularHistory" + black)]
      method Debug_run (line 593) | [Command(image = "*Material.Bug" + green2)]
      method Publish (line 596) | [Command("...", image = "*Entypo.Publish" + blue, separator = true)]
      method PiP_session (line 599) | [Command(image = "*MaterialDesign.PictureInPictureAlt" + blue, separ...
      method Run_in_PiP (line 602) | [Command(image = "*Codicons.DebugStart %,,6" + green2 + "; *Material...
    class Tools (line 606) | [Command(target = "")]
      method Options (line 608) | [Command(image = "*PicolIcons.Settings" + green)]
      method Icons (line 611) | [Command(image = EdIcons.Icons)]
      method Update_icons (line 614) | [Command(tooltip = "Clear icon caches")]
      method NuGet (line 617) | [Command(image = "*SimpleIcons.NuGet" + blue)]
      method Snippets (line 620) | [Command(image = "*Codicons.SymbolSnippet" + blue)]
      method Customize (line 623) | [Command]
      method Portable (line 626) | [Command]
      class Output (line 629) | [Command(separator = true, target = "Output")]
        method Output_clear (line 631) | [Command("Clear", keysText = "M-click")]
        method Output_copy (line 634) | [Command("Copy", keysText = "Ctrl+C")]
        method Output_history (line 637) | [Command("History")]
        method Output_wrap_lines (line 640) | [Command("Wrap lines", separator = true, checkable = true)]
        method Output_white_space (line 643) | [Command("White space", checkable = true)]
    class Help (line 648) | [Command(target = "")]
      method LA_docs (line 650) | [Command(image = EdIcons.Help)]
      method CSharp_docs (line 653) | [Command("C# docs", image = "*Modern.LanguageCsharp" + darkYellow)]
      method Context_help (line 656) | [Command(keys = "F1", image = "*Unicons.MapMarkerQuestion" + darkYel...
      method Website (line 667) | [Command(image = "*Modern.Home" + darkYellow)]
      method Forum (line 670) | [Command(image = "*Material.Forum" + darkYellow)]
      method Whats_new (line 673) | [Command("What's new")]
      method Email (line 676) | [Command]
      method Donate (line 679) | [Command]
      method About (line 682) | [Command]
    method TEST (line 697) | [Command]
    method gc (line 700) | [Command]
    method Invoke (line 709) | internal static int Invoke(string command, bool getState, int flags = ...

FILE: Au.Editor/Compiler/Compiler.cs
  class Compiler (line 17) | partial class Compiler {
    method Compile (line 38) | public static bool Compile(CCReason reason, out CompResults r, FileNod...
    type CompResults (line 71) | public record CompResults {
    method _Compile (line 96) | bool _Compile(CCReason reason, FileNode f, out CompResults r, FileNode...
    method _AddAttributesEtc (line 325) | MiniProgram_.MPFlags _AddAttributesEtc() {
    method _GetDllPaths (line 411) | void _GetDllPaths() {
    method _GetDefaultTPA (line 602) | static string _GetDefaultTPA() {
    method _CreateManagedResources (line 612) | List<ResourceDescription> _CreateManagedResources(string asmName, CSha...
    method _ResourceException (line 618) | void _ResourceException(Exception e, FileNode curFile) {
    method _CreateNativeResources (line 626) | Stream _CreateNativeResources() {
    method _AppHost (line 674) | string _AppHost(string outFile, string fileName, MCPlatform platform) {
    method _GetMainFileIcon (line 740) | bool _GetMainFileIcon(out MemoryStream ms) {
    method _GetIconFromXaml (line 752) | static void _GetIconFromXaml(string xaml, out MemoryStream ms) {
    method _CopyDlls (line 759) | void _CopyDlls(Stream asmStream, bool need64, bool needArm, bool need3...
    method _RunPrePostBuildScript (line 801) | bool _RunPrePostBuildScript(bool post, string outFile) {
    method DllNameToExeName (line 809) | public static string DllNameToExeName(string dll, MCPlatform platform)
    method _NeedNativeExeAndDllFilesOfPlatforms (line 812) | (bool x64, bool arm64, bool x86) _NeedNativeExeAndDllFilesOfPlatforms() {
    method _RenameLockedFile (line 821) | static bool _RenameLockedFile(string file, bool notInCache) {
    method _DeleteRenamedLockedFiles (line 848) | static void _DeleteRenamedLockedFiles(timer timer) {
    method Warmup (line 856) | public static void Warmup(CAW::Microsoft.CodeAnalysis.Document documen...
  type CCReason (line 868) | enum CCReason { Run, CompileAlways, CompileIfNeed, WpfPreview }
  type CanCompileArgs (line 870) | record CanCompileArgs(MetaComments m, CSharpSyntaxTree[] trees, CSharpCo...

FILE: Au.Editor/Compiler/EditorExtension.cs
  class EditorExtension (line 14) | public static class EditorExtension {
    method Run_ (line 21) | internal static async void Run_(string asmFile, string[] args, bool ha...
    type _LoadedScriptAssembly (line 111) | struct _LoadedScriptAssembly {
      method Find (line 114) | [MethodImpl(MethodImplOptions.NoInlining)]
      method Add (line 135) | [MethodImpl(MethodImplOptions.NoInlining)]
    class _Asm (line 145) | class _Asm {
    method _FindAsmValue (line 153) | static _Asm _FindAsmValue(Assembly asm) {
    method WindowLoaded_ (line 199) | internal static void WindowLoaded_() {
    method _InvokeAction (line 204) | static void _InvokeAction(Action a) {
    method ClosingWorkspace_ (line 238) | internal static void ClosingWorkspace_(bool onExit) {
    class _AssemblyLoadContext (line 249) | class _AssemblyLoadContext : AssemblyLoadContext {
      method _AssemblyLoadContext (line 250) | public _AssemblyLoadContext(string name, bool isCollectible) : base(...
    class _AssemblyDtor (line 262) | class _AssemblyDtor {
      method _AssemblyDtor (line 267) | public _AssemblyDtor(Assembly a) {

FILE: Au.Editor/Compiler/ErrBuilder.cs
  class ErrBuilder (line 6) | class ErrBuilder {
    method Clear (line 12) | public void Clear() {
    method AddErrorOrWarning (line 26) | public void AddErrorOrWarning(Diagnostic d, FileNode fMain) {
    method AddError (line 44) | public void AddError(FileNode f, string message) {
    method AddError (line 58) | public void AddError(FileNode f, string code, int pos, string message,...
    method AddError (line 70) | public void AddError(FileNode f, Microsoft.CodeAnalysis.Text.LinePosit...
    method _StartAdd (line 75) | void _StartAdd(bool isWarning = false) {
    method _Append (line 82) | void _Append(FileNode f, int line, int col, string message, params obj...
    method _Append (line 86) | void _Append(string file, int line, int col, string message, params ob...
    method ToString (line 91) | public override string ToString() => _b?.ToString();
    method PrintAll (line 98) | public void PrintAll() {

FILE: Au.Editor/Compiler/MetaComments.cs
  class MetaComments (line 146) | class MetaComments {
    method DefaultRole (line 336) | public static MCRole DefaultRole(bool isScript) => isScript ? MCRole.m...
    method MetaComments (line 379) | public MetaComments(MCFlags flags, Dictionary<FileNode, string> fileTe...
    method Parse (line 391) | public bool Parse(FileNode f, FileNode projFolder) {
    method _ParseFile (line 440) | bool _ParseFile(FileNode f, bool isMain, bool isC, bool isGlobal = fal...
    method _ParseOption (line 532) | void _ParseOption(string name, string value, int iName, int iValue) {
    method _Error (line 734) | bool _Error(string s, int from, int to) {
    method _ErrorN (line 744) | bool _ErrorN(string s) => _Error(s, _nameFrom, _nameTo);
    method _ErrorV (line 747) | bool _ErrorV(string s) => _Error(s, _valueFrom, _valueTo);
    method _ErrorM (line 750) | bool _ErrorM(string s) => _Error(s, _metaRange.start, _metaRange.start...
    method _Specified (line 752) | void _Specified(MCSpecified what) {
    method _TrueFalse (line 757) | bool _TrueFalse(out bool b, string s) {
    method _Enum (line 767) | unsafe bool _Enum<T>(out T result, string s) where T : unmanaged, Enum {
    method _Enum2 (line 773) | bool _Enum2(Type t, out int result, string s) {
    method _GetFile (line 793) | FileNode _GetFile(string s, FNFind kind) {
    method FindFile (line 811) | public static FileNode FindFile(FileNode fRelativeTo, string metaValue...
    method _GetFileAndString (line 820) | MCFileAndString _GetFileAndString(string s, FNFind kind) {
    method SplitArgs_ (line 833) | internal static string SplitArgs_(string s, out string s2) {
    method _GetOutPath (line 842) | string _GetOutPath(string s) {
    method _CodeFilesContains (line 852) | bool _CodeFilesContains(FileNode f) {
    method _PR (line 861) | bool _PR(ref string value) {
    method _NuGet (line 883) | void _NuGet(string value, string alias) {
    method _FinalCheckOptions (line 931) | bool _FinalCheckOptions() {
    method GetDefaultOutputPath (line 973) | public static string GetDefaultOutputPath(FileNode f, MCRole role, boo...
    method CreateCompilationOptions (line 981) | public CSharpCompilationOptions CreateCompilationOptions() {
    method CreateParseOptions (line 1012) | public CSharpParseOptions CreateParseOptions() {
    method FindMetaComments (line 1024) | public static StartEnd FindMetaComments(RStr code) {
    method EnumOptions (line 1053) | [MethodImpl(MethodImplOptions.AggressiveOptimization)]
    type Token (line 1079) | public struct Token {
      method NameIs (line 1085) | public bool NameIs(string s) => code.Eq(nameStart..nameEnd, s);
      method ValueIs (line 1086) | public bool ValueIs(string s) => code.Eq(valueStart..valueEnd, s);
  type MCCodeFile (line 1095) | record class MCCodeFile(FileNode f, string code, bool isMain, bool isC) {
  type MCFileAndString (line 1100) | record struct MCFileAndString(FileNode f, string s);
  type MCRole (line 1102) | enum MCRole { miniProgram, exeProgram, editorExtension, classLibrary, cl...
  type MCUac (line 1104) | enum MCUac { inherit, user, admin }
  type MCIfRunning (line 1106) | enum MCIfRunning { warn_restart, warn, cancel_restart, cancel, wait_rest...
  type MCPlatform (line 1108) | enum MCPlatform { Default, x64, arm64, x86 }
  type MCFlags (line 1113) | [Flags]
  type MCSpecified (line 1178) | [Flags]

FILE: Au.Editor/Compiler/MetaReferences.cs
  class MetaReferences (line 23) | class MetaReferences {
    class _MR (line 27) | class _MR {
      method _MR (line 36) | public _MR(string name, string path, bool isNuget) {
      method UncacheIfNeed (line 65) | public void UncacheIfNeed(long timeNow) {
    class _MR2 (line 83) | class _MR2 : _MR {
      method _MR2 (line 87) | public _MR2(string name, string path, string alias, bool isCOM, bool...
      method PropEq (line 94) | public bool PropEq(string alias, bool isCOM) => isCOM == _isCOM && a...
    method IsNuget (line 99) | public static bool IsNuget(PortableExecutableReference r) => s_attach....
    method IsDefaultRef (line 117) | public static bool IsDefaultRef(string name) => DefaultReferences.Cont...
    method MetaReferences (line 119) | static MetaReferences() {
    method UncacheOldFiles (line 141) | public static void UncacheOldFiles() {
    method MetaReferences (line 149) | public MetaReferences() {
    method ParseRefAliasEtc_ (line 170) | internal static bool ParseRefAliasEtc_(string name, string s, out stri...
    method Resolve (line 201) | public bool Resolve(string reference, string alias, bool isCOM, bool i...
    method RemoveFromRefs (line 307) | internal void RemoveFromRefs(string wildx) {
    method RemoveBadRefFromCache (line 326) | public static void RemoveBadRefFromCache(string errorMessage) {
    method DebugPrintCachedRefs (line 334) | internal static void DebugPrintCachedRefs() {
    class _DocumentationProvider (line 344) | class _DocumentationProvider : DocumentationProvider {
      method Create (line 354) | public static DocumentationProvider Create(string asmPath) {
      method GetDocumentationForSymbol (line 429) | protected internal override string GetDocumentationForSymbol(string ...
      method Equals (line 449) | public override bool Equals(object obj) {
      method GetHashCode (line 454) | public override int GetHashCode() {
      method _Cleanup (line 459) | static void _Cleanup() {
    class _NetDocumentationProvider (line 485) | class _NetDocumentationProvider : _DocumentationProvider {
      method _NetDocumentationProvider (line 488) | public _NetDocumentationProvider() {
      method HaveRef (line 500) | public bool HaveRef(string refName) => _refs?.Contains(refName) ?? f...
    class _XmlFileDocumentationProvider (line 507) | sealed class _XmlFileDocumentationProvider : XmlDocumentationProvider {
      method _XmlFileDocumentationProvider (line 510) | public _XmlFileDocumentationProvider(string filePath) {
      method GetSourceStream (line 514) | protected override Stream GetSourceStream(CancellationToken cancella...
      method GetDocumentationForSymbol (line 517) | protected override string GetDocumentationForSymbol(string documenta...
      method Equals (line 524) | public override bool Equals(object obj) => obj == this;
      method GetHashCode (line 526) | public override int GetHashCode() => 1;

FILE: Au.Editor/Compiler/RecentTT.cs
  class RecentTT (line 6) | static class RecentTT {
    type _Item (line 7) | record _Item {
    method TaskEvent (line 20) | public static void TaskEvent(bool started, RunningTask t, int exitCode...
    method TriggerEvent (line 26) | public static void TriggerEvent(PrintServerMessage m) {
    method _Started (line 42) | static void _Started(long id, FileNode fn, int line, long time, string...
    method _Ended (line 78) | static void _Ended(long id, long time, bool failed) {
    method Clear (line 87) | public static void Clear() {
    method Show (line 91) | public static void Show() {

FILE: Au.Editor/Compiler/Run task.cs
  class CompileRun (line 10) | static class CompileRun {
    method CompileAndRun (line 29) | public static int CompileAndRun(bool run, FileNode f, string[] args = ...
    method Compile (line 59) | public static bool Compile(bool forRun, ref FileNode f, out Compiler.C...
    method RunWpfPreview (line 84) | public static void RunWpfPreview(FileNode f, Func<CanCompileArgs, bool...
    method _OnRunClassFile (line 99) | static void _OnRunClassFile(FileNode f, FileNode projFolder) {
    method _SciLink_RunClassFile (line 106) | static void _SciLink_RunClassFile(string s) {
  class RunningTask (line 155) | class RunningTask : ITreeViewItem {
    method RunningTask (line 163) | public RunningTask(FileNode f, WaitHandle hProcess, int processId) {
    method End (line 191) | public bool End(bool onProgramExit) {
  class RunningTasks (line 247) | class RunningTasks {
    class _WaitingTask (line 248) | class _WaitingTask {
      method _WaitingTask (line 253) | public _WaitingTask(FileNode f, Compiler.CompResults r, string[] arg...
    method RunningTasks (line 269) | public RunningTasks() {
    method OnWorkspaceClosed (line 273) | public void OnWorkspaceClosed() {
    method _Add (line 296) | void _Add(RunningTask rt) {
    method TaskEnded1 (line 306) | internal void TaskEnded1(int taskId, int exitCode) {
    method TaskEnded2 (line 320) | internal void TaskEnded2(nint wParam, nint lParam) {
    method _TimerUpdateUI (line 342) | void _TimerUpdateUI() {
    method _UpdatePanels (line 348) | void _UpdatePanels() {
    method IsRunning (line 357) | public bool IsRunning(FileNode f) => null != _GetRunning(f);
    method _GetRunning (line 359) | RunningTask _GetRunning(FileNode f) {
    method TaskFromProcessId (line 382) | public RunningTask TaskFromProcessId(int processId) {
    method EndTasksOf (line 393) | public bool EndTasksOf(FileNode f, int exceptProcessId = 0) {
    method EndTask (line 408) | public void EndTask(RunningTask rt) {
    method _EndTask (line 412) | bool _EndTask(RunningTask rt, bool onExit = false) {
    method _CanRunNow (line 417) | bool _CanRunNow(FileNode f, Compiler.CompResults r, out RunningTask ru...
    method RunCompiled (line 438) | public unsafe int RunCompiled(FileNode f, Compiler.CompResults r, stri...
    class _Preloaded (line 591) | class _Preloaded {
      method _Preloaded (line 598) | public _Preloaded(int index) {
      method Dispose (line 607) | public void Dispose() {
    type _SpUac (line 619) | enum _SpUac {
    method _StartProcess (line 630) | static unsafe (int pid, WaitHandle hProcess) _StartProcess(_SpUac uac,...
    method _Find (line 715) | int _Find(int taskId) {
    method OnWM_DISPLAYCHANGE (line 722) | public void OnWM_DISPLAYCHANGE() {

FILE: Au.Editor/Compiler/TestInternal.cs
  class TestInternal (line 3) | static class TestInternal {
    method TestInternal (line 7) | static TestInternal() {
    method CompilerStart (line 25) | public static void CompilerStart(string asmName, string[] testInternal...
    method CompilerEnd (line 32) | public static void CompilerEnd() {
    method CiAdd (line 38) | public static void CiAdd(string asmName, string[] testInternals) {
    method CiClear (line 45) | public static void CiClear() {
    method RefsStart (line 50) | public static void RefsStart() {
    method RefsEnd (line 57) | public static void RefsEnd() {
    method RefsAdd (line 63) | public static void RefsAdd(string asmName, string[] testInternals) {

FILE: Au.Editor/Compiler/XCompiled.cs
  class Compiler (line 3) | partial class Compiler {
    class XCompiled (line 7) | unsafe class XCompiled {
      method XCompiled (line 16) | public XCompiled() {
      method IsCompiled (line 35) | public bool IsCompiled(FileNode f, out CompResults r, FileNode projF...
      method AddCompiled (line 153) | public void AddCompiled(FileNode f, string outFile, MetaComments m, ...
      method Remove (line 243) | public void Remove(FileNode f, bool deleteAsmFile) {
      method _Open (line 254) | bool _Open() {
      method _Save (line 281) | void _Save() {
      method _ClearCache (line 291) | void _ClearCache() {
    method Uncache (line 298) | public static void Uncache(FileNode f, bool andDescendants = false) {

FILE: Au.Editor/Compiler/XPublish.cs
  class XPublish (line 10) | class XPublish {
    method Publish (line 14) | public async void Publish() {
    method _PrepareOutDir (line 72) | static void _PrepareOutDir(string outDir, string outFile) {
    method _DotnetPublish (line 79) | bool _DotnetPublish(string outDir, bool singleFile, bool? selfExtract) {
    method _CreateCsproj (line 110) | bool _CreateCsproj(bool singleFile, bool? selfExtract, bool selfContai...

FILE: Au.Editor/Compiler/util/CompilerUtil.cs
  class CompilerUtil (line 10) | static partial class CompilerUtil {
    method IsNetAssembly (line 14) | public static bool IsNetAssembly(string path) {
    method IsNetAssembly (line 22) | public static bool IsNetAssembly(string path, out bool isRefOnly) {
    method CreateSyntaxTrees (line 42) | public static CSharpSyntaxTree[] CreateSyntaxTrees(MetaComments meta) {
    method CreateManagedResources (line 77) | public static bool CreateManagedResources(MetaComments meta, string as...
    method CopyFileIfNeed (line 208) | public static void CopyFileIfNeed(string sFrom, string sTo) {
    method CopyMetaFileFilesOfAllProjects (line 219) | public static void CopyMetaFileFilesOfAllProjects(MetaComments meta, s...
    method UsesSqlite (line 252) | public static bool UsesSqlite(Stream asmStream, bool recursive = false) {
    method UsesSqlite (line 290) | public static bool UsesSqlite(string dll, bool recursive = false) {
    method RunPrePostBuildScript (line 296) | public static bool RunPrePostBuildScript(MetaComments m, bool post, st...
    method DeleteExeFile (line 333) | public static void DeleteExeFile(string programPath) {

FILE: Au.Editor/Compiler/util/Compiler_resources.cs
  class Compiler (line 3) | partial class Compiler {
    class _NativeResources (line 4) | unsafe class _NativeResources {
      class _Res (line 5) | class _Res {
        method _Res (line 10) | public _Res(ushort resType, ushort resId, byte[] data) {
      method AddVersion (line 19) | public void AddVersion(string asmFile) {
      method AddManifest (line 26) | public void AddManifest(string manifestFile) {
      method AddIcon (line 30) | public void AddIcon(string iconFile, ref ICONCONTEXT ic)
      method AddIcon (line 33) | public void AddIcon(byte[] iconBytes, ref ICONCONTEXT ic) {
      type ICONCONTEXT (line 68) | public struct ICONCONTEXT { public int groupId, iconId; }
      method AddTpa (line 70) | public void AddTpa(string tpa) {
      method _Throw (line 80) | static void _Throw() {
      method _LoadNativeResource (line 84) | static bool _LoadNativeResource(IntPtr hModule, ushort resType, usho...
      method _LoadNativeResource (line 94) | static byte[] _LoadNativeResource(IntPtr hModule, ushort resType, us...
      method LoadNativeResourceUtf8String_ (line 99) | internal static string LoadNativeResourceUtf8String_(ushort resType,...
      method WriteAll (line 104) | public void WriteAll(string exeFile, byte[] exeData, MCPlatform plat...
      method _WriteResources (line 170) | bool _WriteResources(Stream m, uint resRva) {
      method LoadResource (line 262) | [DllImport("kernel32.dll")]
      method LockResource (line 265) | [DllImport("kernel32.dll")]
      method SizeofResource (line 268) | [DllImport("kernel32.dll")]
      method ImageNtHeader (line 271) | [DllImport("dbghelp.dll")]
      type IMAGE_SECTION_HEADER (line 276) | internal struct IMAGE_SECTION_HEADER {
      type IMAGE_DATA_DIRECTORY (line 289) | internal struct IMAGE_DATA_DIRECTORY {
      type IMAGE_OPTIONAL_HEADER32 (line 294) | [StructLayout(LayoutKind.Sequential, Pack = 4)]
      type IMAGE_OPTIONAL_HEADER64 (line 330) | [StructLayout(LayoutKind.Sequential, Pack = 4)]
      type IMAGE_FILE_HEADER (line 365) | internal struct IMAGE_FILE_HEADER {
      type IMAGE_NT_HEADERS64 (line 375) | [StructLayout(LayoutKind.Sequential, Pack = 4)]
      type IMAGE_RESOURCE_DIRECTORY (line 382) | internal struct IMAGE_RESOURCE_DIRECTORY {
      type IMAGE_RESOURCE_DIRECTORY_ENTRY (line 391) | internal struct IMAGE_RESOURCE_DIRECTORY_ENTRY {
      type IMAGE_RESOURCE_DATA_ENTRY (line 397) | internal struct IMAGE_RESOURCE_DATA_ENTRY {

FILE: Au.Editor/Debugger/PD-stack.cs
  class PanelDebug (line 5) | partial class PanelDebug {
    method _StackViewInit (line 9) | void _StackViewInit() {
    method _StackViewSetItems (line 14) | void _StackViewSetItems(_FRAME[] a, int iSelect = 0) {
    method _tvStack_ItemActivated (line 28) | void _tvStack_ItemActivated(TVItemEventArgs e) {
    class _StackViewItem (line 37) | class _StackViewItem : ITreeViewItem {
      method _StackViewItem (line 42) | public _StackViewItem(PanelDebug panel, _FRAME f) {
      method TextColor (line 58) | int ITreeViewItem.TextColor(TVColorInfo ci) => f.file.NE() ? 0x80808...

FILE: Au.Editor/Debugger/PD-variables.cs
  class PanelDebug (line 20) | partial class PanelDebug {
    method _VariablesViewInit (line 25) | void _VariablesViewInit() {
    method _ListVariables (line 31) | void _ListVariables() {
    method _VariablesViewSetItems (line 48) | void _VariablesViewSetItems(_VARIABLE[] a) {
    method SciMouseHover_ (line 72) | internal void SciMouseHover_(CodeInfo.Context cd) {
    method _VarCreate (line 174) | _VAR _VarCreate(string exp, int frame = -1) {
    method _VarCreateL (line 188) | _VAR _VarCreateL(string exp) {
    method _WatchAdd (line 196) | void _WatchAdd(string exp, int frame = -1) {
    method _WatchRemove (line 206) | void _WatchRemove(_VariablesViewItem v) {
    method _EscapeExpression (line 211) | static string _EscapeExpression(string s) {
    method _tvVariables_ItemClick (line 217) | void _tvVariables_ItemClick(TVItemEventArgs e) {
    class _VariablesViewItem (line 235) | class _VariablesViewItem : ITreeViewItem {
      method _VariablesViewItem (line 244) | public _VariablesViewItem(PanelDebug panel, _VARIABLE v) {
      method _SetTextAndIsFolder (line 250) | void _SetTextAndIsFolder(string value) {
      method _VariablesViewItem (line 257) | public _VariablesViewItem(PanelDebug panel, _VariablesViewItem paren...
      method _VariablesViewItem (line 273) | public _VariablesViewItem(PanelDebug panel, _VVItemKind itemKind) {
      method ExpPath (line 295) | public string ExpPath() {
      method AddWatch (line 310) | public void AddWatch(_VariablesViewItem v) {
      method RemoveWatch (line 316) | public void RemoveWatch(_VariablesViewItem v) {
      method UpdateWatch (line 327) | public void UpdateWatch() {
      method Print (line 339) | public void Print() {
      method _EnsureHaveVar (line 386) | bool _EnsureHaveVar() {
      method SetIsExpanded (line 451) | void ITreeViewItem.SetIsExpanded(bool yes) { _isExpanded = yes; }
      method SetNewText (line 457) | void ITreeViewItem.SetNewText(string text) {
      method TextColor (line 461) | int ITreeViewItem.TextColor(TVColorInfo ci) => itemKind switch { _VV...
    type _VVItemKind (line 464) | enum _VVItemKind : byte { Default, Mouse, Watch }
    method _Test (line 467) | void _Test() {

FILE: Au.Editor/Debugger/PD._Debugger.cs
  class PanelDebug (line 11) | partial class PanelDebug {
    class _Debugger (line 12) | class _Debugger {
      method _Debugger (line 19) | public _Debugger(Action<string> events) {
      method Init (line 24) | public bool Init(bool arm64) {
      method _ReadEvents (line 39) | void _ReadEvents() {
      method Dispose (line 67) | public void Dispose() {
      method _Write (line 74) | bool _Write(string s) {
      method Send (line 90) | public void Send(string s) {
      method SendSync (line 101) | public string SendSync(int token, string s, Func<string, bool> noEve...

FILE: Au.Editor/Debugger/PD._MiRecord.cs
  class PanelDebug (line 6) | partial class PanelDebug {
    type _MiRecord (line 7) | record class _MiRecord {

FILE: Au.Editor/Debugger/PanelBreakpoints.cs
  class PanelBreakpoints (line 11) | class PanelBreakpoints {
    method PanelBreakpoints (line 18) | public PanelBreakpoints() {
    method _LoadIfNeed (line 29) | void _LoadIfNeed() {
    method SaveNowIfNeed (line 107) | public void SaveNowIfNeed() {
    method _SaveNow (line 111) | void _SaveNow() {
    method _SaveLater (line 135) | void _SaveLater(int afterS = 30) {
    method SciLoaded (line 140) | internal void SciLoaded(SciCode doc) {
    method _FindItemOfFile (line 156) | _Item _FindItemOfFile(FileNode fn) {
    method _FindItemOfFile (line 162) | _Item _FindItemOfFile(SciCode doc) => _FindItemOfFile(doc?.EFile);
    method ToggleBreakpoint (line 164) | public void ToggleBreakpoint(int pos8 = -1, bool logpoint = false) {
    method _SetEnabled (line 193) | void _SetEnabled(_Item b, bool enabled) {
    method SciMiddleClick_ (line 204) | internal bool SciMiddleClick_(SciCode doc, int line) {
    method AddMarginMenuItems_ (line 210) | internal void AddMarginMenuItems_(SciCode doc, popupMenu m, int line, ...
    method _BreakpointProperties (line 221) | void _BreakpointProperties(_Item x, DependencyObject owner) {
    method SciMouseDwell_ (line 271) | internal void SciMouseDwell_(bool started, SciCode doc, in Sci.SCNotif...
    method _TvSetItems (line 289) | void _TvSetItems(bool modified = false) {
    method _ContextMenu (line 297) | void _ContextMenu(_Item b) {
    method _IsBreakpoint (line 335) | bool _IsBreakpoint(SciCode doc, int line) => (doc.Call(Sci.SCI_MARKERG...
    method _BreakpointFromLine (line 337) | _Item _BreakpointFromLine(SciCode doc, int line) {
    method _DeleteBreakpoint (line 348) | void _DeleteBreakpoint(SciCode doc, int line, bool sciDelete = true) {
    method _DeleteBreakpointL (line 355) | void _DeleteBreakpointL(_Item b) {
    method _DeleteItem (line 364) | void _DeleteItem(_Item b) {
    method FileDeleted (line 376) | internal void FileDeleted(IEnumerable<FileNode> files) {
    method _MoveFolder (line 387) | void _MoveFolder(_Item f, bool up) {
    method SciDeletingLineWithMarker (line 397) | internal void SciDeletingLineWithMarker(SciCode doc, int line) {
    method SciModified (line 401) | internal void SciModified(SciCode doc, in Sci.SCNotification n) {
    method GetBreakpoints (line 419) | internal IEnumerable<IBreakpoint> GetBreakpoints(bool disabledToo = fa...
    class _Item (line 427) | class _Item : TreeBase<_Item>, ITreeViewItem, IBreakpoint {
      method _Item (line 438) | public _Item(PanelBreakpoints view, FileNode file, bool isExpanded) {
      method _Item (line 446) | public _Item(PanelBreakpoints bv, int line, int markerHandle, string...
      method _Item (line 454) | public _Item(PanelBreakpoints bv, XElement x) {
      method ToString (line 467) | public override string ToString() => ((ITreeViewItem)this).DisplayText;
      method SetMarkerInDoc (line 472) | public bool SetMarkerInDoc() {
      method SetIsExpanded (line 489) | public void SetIsExpanded(bool yes) { _isExpanded = yes; _view._Save...
      method TextColor (line 502) | int ITreeViewItem.TextColor(TVColorInfo ci) => !log.NE() ? 0x00A000 ...
      method TooltipSetContent (line 506) | public void TooltipSetContent(ToolTip tt) {
  type IBreakpoint (line 539) | interface IBreakpoint {

FILE: Au.Editor/Debugger/PanelDebug.cs
  class PanelDebug (line 13) | partial class PanelDebug {
    type _Session (line 22) | record class _Session(int processId, bool attachMode) {
    method PanelDebug (line 38) | public PanelDebug() {
    method _Start (line 123) | void _Start(FileNode restart = null, _RthData runToHere = null) {
    method _Restart (line 151) | void _Restart(_RthData runToHere = null) {
    method _Attach (line 155) | bool _Attach(int processId, bool attachMode, FileNode file, _RthData r...
    method Start (line 201) | public void Start() {
    method Attach (line 205) | public bool Attach(int processId) {
    method EndIfDebugging (line 212) | public bool EndIfDebugging(int processId) {
    method WmHotkey_ (line 218) | internal void WmHotkey_(RegHotkeys.Id id) {
    method _OptionsMenu (line 233) | void _OptionsMenu(popupMenu m) {
    method _SetOptions (line 297) | void _SetOptions() {
    method _SetExceptions (line 303) | void _SetExceptions(int action) {
    method _SetBreakpoints (line 340) | void _SetBreakpoints() {
    method _SetBreakpoint (line 346) | void _SetBreakpoint(IBreakpoint b) {
    method _SetBreakpoint (line 352) | int _SetBreakpoint(FileNode f, int line) {
    method BreakpointAddedDeleted_ (line 359) | internal void BreakpointAddedDeleted_(IBreakpoint b, bool added) {
    method BreakpointPropertiesChanged_ (line 371) | internal void BreakpointPropertiesChanged_(IBreakpoint b) {
    method _SetBreakpointCondition (line 375) | void _SetBreakpointCondition(IBreakpoint b) {
    method AddMarginMenuItems_ (line 395) | internal void AddMarginMenuItems_(SciCode doc, popupMenu m, int line) {
    method _Step (line 402) | void _Step(string s) {
    method _Next (line 417) | void _Next() => _Step("next");
    method _Step (line 419) | void _Step() => _Step("step");
    method _StepOut (line 421) | void _StepOut() => _Step("finish");
    method _Continue (line 423) | void _Continue() => _Step("continue");
    method _ExecStepL (line 425) | bool _ExecStepL(string s) {
    method _RunToHere (line 435) | void _RunToHere(FileNode f, int line, bool nonstop, bool restart = fal...
    method _RthEnd (line 449) | void _RthEnd() {
    method _JumpToHere (line 455) | void _JumpToHere(FileNode f, int line) {
    method _IsEnabledBreakpoint (line 475) | bool _IsEnabledBreakpoint(int id) => Panels.Breakpoints.GetBreakpoints...
    type _RthData (line 477) | record class _RthData(FileNode file, int line, bool nonstop);
    method _Pause (line 479) | void _Pause() {
    method _End (line 492) | void _End() {
    method _Disconnect (line 496) | void _Disconnect() {
    method _Events (line 500) | void _Events(string s) {
    method _Stopped (line 591) | bool _Stopped(string s) {
    method _SelectedThread (line 724) | void _SelectedThread(_THREAD t) {
    method _GoToLine (line 734) | bool _GoToLine(_FRAME f, bool keepMarkers = false) {
    method _UpdateUI (line 755) | void _UpdateUI(_UU u) {
    type _UU (line 784) | enum _UU { Init, Started, Ended, Paused, Resumed, Resumed2 }
    method _ClearTreeviewsAndMarkers (line 788) | void _ClearTreeviewsAndMarkers() {
    method _AutoShowHidePanel (line 795) | void _AutoShowHidePanel(bool starting) {
    method _Print (line 819) | static void _Print(string s) {
    method _GetThreadNameAndTime (line 823) | static unsafe bool _GetThreadNameAndTime(int id, out string name, out ...
    method _IsHiddenThreadName (line 839) | static bool _IsHiddenThreadName(string s) => s is "Au.Aux" or ".NET TP...
    method _GetModuleName (line 841) | string _GetModuleName(_FRAME f) {
    method _FormatFrameString (line 847) | string _FormatFrameString(_FRAME f/*, bool forPrint = false*/) {
    method _PrintThread (line 853) | void _PrintThread(string s, bool started) {
    method _TempDisableAuDebugging (line 877) | [Conditional("DEBUG")]
    class _Marker (line 890) | class _Marker {
      method _Marker (line 895) | public _Marker(int marker, int indic) {
      method Add (line 900) | public void Add(int line, int column, int line2, int column2) {
      method Delete (line 916) | public void Delete() {
    type _BKPT (line 936) | record _BKPT(int number, string type, string disp, string enabled, str...
    type _DONE_BKPT (line 937) | record _DONE_BKPT(_BKPT bkpt);
    type _THREAD (line 939) | record _THREAD(int id, string state) { public string name; public long...
    type _DONE_THREADS (line 940) | record _DONE_THREADS(_THREAD[] threads);
    type _CLR_ADDR (line 942) | record struct _CLR_ADDR(string module_id, string method_token, int met...
    type _FRAME (line 943) | record _FRAME(int level, string file, string fullname, int line, int c...
    type _STOPPED (line 944) | record _STOPPED(string reason, int thread_id, string stopped_threads, ...
    type _DONE_STACK (line 946) | record _DONE_STACK(_FRAME[] stack);
    type _VARIABLE (line 948) | record _VARIABLE(string name, string value);
    type _DONE_VARIABLES (line 949) | record _DONE_VARIABLES(_VARIABLE[] variables);
    type _VAR (line 951) | record _VAR(string name, string value, string attributes, string exp, ...
    type _DONE_CHILDREN (line 953) | record _DONE_CHILDREN(int numchild, _VAR[] children, int has_more);

FILE: Au.Editor/Edit/Ci-types.cs
  class CiComplItem (line 9) | class CiComplItem : ITreeViewItem {
    method GetCI (line 22) | public CompletionItem GetCI([CallerMemberName] string m_ = null) {
    method SetCI (line 30) | public void SetCI(CompletionItem c) {
    method CiComplItem (line 35) | public CiComplItem(CiComplProvider provider, CompletionItem ci) {
    method CiComplItem (line 43) | public CiComplItem(CiComplProvider provider, string name, CiItemKind k...
    method SetDisplayText (line 83) | public void SetDisplayText(string comment) {
    method ImageResource (line 96) | public static string ImageResource(CiItemKind kind) => kind switch {
    method AccessImageResource (line 123) | public static string AccessImageResource(CiItemAccess access) => acces...
    method _ModifierImageResource (line 132) | static string _ModifierImageResource(CiComplItem ci) {
  type CiComplProvider (line 144) | enum CiComplProvider : byte {
  type CiComplResult (line 161) | enum CiComplResult {
  type CiComplItemHiddenBy (line 179) | [Flags]
  type CiComplItemMoveDownBy (line 182) | [Flags]
  type CiItemKind (line 186) | enum CiItemKind : sbyte {
  type CiItemAccess (line 201) | enum CiItemAccess : sbyte { Public, Private, Protected, Internal }
  class CiNamespaceSymbolEqualityComparer (line 203) | class CiNamespaceSymbolEqualityComparer : IEqualityComparer<INamespaceSy...
    method Equals (line 204) | public bool Equals(INamespaceSymbol x, INamespaceSymbol y) {
    method GetHashCode (line 214) | public int GetHashCode(INamespaceSymbol obj) {
  class CiNamespaceOrTypeSymbolEqualityComparer (line 223) | class CiNamespaceOrTypeSymbolEqualityComparer : IEqualityComparer<INames...
    method Equals (line 224) | public bool Equals(INamespaceOrTypeSymbol x, INamespaceOrTypeSymbol y) {
    method GetHashCode (line 235) | public int GetHashCode(INamespaceOrTypeSymbol obj) {
  type CiStringRange (line 244) | struct CiStringRange {
    method CiStringRange (line 249) | public CiStringRange(string code, int start, int end, bool verbatim) {
    method ToString (line 253) | public override string ToString() {

FILE: Au.Editor/Edit/CiAutocorrect.cs
  class CiAutocorrect (line 19) | class CiAutocorrect {
    method BracketsAdded (line 23) | public void BracketsAdded(SciCode doc, int innerFrom, int innerTo, EBr...
    type EBrackets (line 29) | public enum EBrackets {
    method SciBeforeKey (line 51) | public bool SciBeforeKey(SciCode doc, KKey key, ModifierKeys mod) {
    method SciBeforeCharAdded (line 93) | public bool SciBeforeCharAdded(SciCode doc, char ch) {
    method SciCharAdded (line 278) | public void SciCharAdded(CodeInfo.CharContext c) {
    method _OnDot (line 534) | static bool _OnDot() {
    method _OnSemicolon (line 557) | static bool _OnSemicolon(bool anywhere) {
    method _GetLastTokenForSemicolonStatementCompletion (line 606) | static bool _GetLastTokenForSemicolonStatementCompletion(ref SyntaxTok...
    method _OnEnter (line 638) | static void _OnEnter(int mod) {
    method _OnEnter2 (line 646) | static bool _OnEnter2(int mod) {
    method _InNonblankTriviaOrStringOrChar (line 908) | static int _InNonblankTriviaOrStringOrChar(CodeInfo.Context cd, Syntax...
    method _OnBackspaceOrDelete (line 989) | static bool _OnBackspaceOrDelete(SciCode doc, bool back) {
    method _AutoFormat (line 1066) | static void _AutoFormat(char ch) {
    method _AutoFormat (line 1108) | static void _AutoFormat(SyntaxNode n, CodeInfo.Context cd, int maxTo =...
    class Pasting (line 1117) | internal class Pasting {
      method Pasting (line 1121) | public Pasting(SciCode doc) {
      method _doc_AaTextChanged (line 1128) | unsafe void _doc_AaTextChanged(KScintilla.AaEventHandlerArgs e) {
      method After (line 1138) | public void After() {
    method _InsertNodeCompletionTextWithAutoformat (line 1171) | static int _InsertNodeCompletionTextWithAutoformat(CodeInfo.Context cd...
    method _IsSwitchCast (line 1198) | static bool _IsSwitchCast(SyntaxNode node)
    method IsSwitchSectionEndStatement_ (line 1201) | internal static bool IsSwitchSectionEndStatement_(SyntaxNode n)
  type CiIndent (line 1210) | struct CiIndent {
    method CiIndent (line 1219) | public CiIndent(CodeInfo.Context cd, int pos, bool forNewLine, bool ra...
    method ToString (line 1282) | public override string ToString() {

FILE: Au.Editor/Edit/CiCompletion.cs
  class CiCompletion (line 28) | partial class CiCompletion {
    class _Data (line 33) | class _Data {
    method Cancel (line 47) | public void Cancel() {
    method _CancelUI (line 53) | void _CancelUI(bool popupListHidden = false, bool tempRangeRemoved = f...
    method SciCharAdding_Commit (line 66) | public CiComplResult SciCharAdding_Commit(SciCode doc, char ch) {
    method SciCharAdded_ShowList (line 83) | public void SciCharAdded_ShowList(CodeInfo.CharContext c) {
    method SciModified (line 92) | public void SciModified(SciCode doc, in Sci.SCNotification n) {
    method ShowList (line 111) | public void ShowList(char ch = default) {
    method _ShowList (line 117) | async void _ShowList(char ch) {
    method _FilterItems (line 761) | static void _FilterItems(_Data d) {
    method _FilterFindChar (line 836) | static int _FilterFindChar(string s, int i, char cLower, char cUpper, ...
    method SelectBestMatch (line 853) | public void SelectBestMatch(List<CiComplItem> visibleListItems, bool g...
    method GetDescriptionDoc (line 938) | public System.Windows.Documents.Section GetDescriptionDoc(CiComplItem ...
    method _Commit (line 961) | CiComplResult _Commit(SciCode doc, CiComplItem item, char ch, KKey key) {
    method Commit (line 1223) | public void Commit(SciCode doc, CiComplItem item) => _Commit(doc, item...
    method OnCmdKey_Commit (line 1228) | public CiComplResult OnCmdKey_Commit(SciCode doc, KKey key) {
    method OnCmdKey_SelectOrHide (line 1245) | public bool OnCmdKey_SelectOrHide(KKey key) => _data != null && _popup...
    method _GetProvider (line 1247) | static CiComplProvider _GetProvider(CompletionItem ci) {

FILE: Au.Editor/Edit/CiErrors.cs
  class CiErrors (line 17) | class CiErrors {
    type _Diagnostic (line 18) | record struct _Diagnostic(Diagnostic d, int start, int end) {
    method Indicators (line 32) | public void Indicators(int start16, int end16, bool pasting = false, b...
    method _Strings (line 161) | void _Strings(SemanticModel semo, CodeInfo.Context cd, int start16, in...
    method ClearMetaErrors (line 249) | public void ClearMetaErrors() => _metaErrors.Clear();
    method AddMetaError (line 251) | public void AddMetaError(StartEnd metaRange, int from, int to, string ...
    method EraseIndicatorsInLine (line 256) | public void EraseIndicatorsInLine(SciCode doc, int pos8) {
    method SciModified (line 264) | public void SciModified(SciCode doc, in Sci.SCNotification n) {
    method Pasting (line 286) | public void Pasting(SciCode doc, bool silent) { _pasting = (doc, silen...
    method GetPopupTextAt (line 288) | public System.Windows.Documents.Section GetPopupTextAt(SciCode doc, in...
    type _MissingUsingError (line 372) | record _MissingUsingError {
    method _GetMissingUsings (line 404) | List<string> _GetMissingUsings(List<_MissingUsingError> a) {
    method _UsingsEtc (line 467) | void _UsingsEtc(CiText x, in _Diagnostic v, SciCode doc, bool extMetho...
    method _LinkClicked (line 498) | void _LinkClicked(string s) {
    method _IsAttributeNameWithoutSuffix (line 528) | static bool _IsAttributeNameWithoutSuffix(string name, int pos, Semant...
    method _GetExtensionMethodReceiverType (line 533) | static ITypeSymbol _GetExtensionMethodReceiverType(SemanticModel semo,...
    method _PastedWithUsings (line 541) | bool _PastedWithUsings(CodeInfo.Context cd, ImmutableArray<Diagnostic>...

FILE: Au.Editor/Edit/CiFind.cs
  class CiFind (line 24) | static class CiFind {
    method FindReferencesOrImplementations (line 31) | public static async void FindReferencesOrImplementations(bool implemen...
    type _Seen (line 262) | record struct _Seen(object file, int pos);
    class _LocationComparer (line 264) | class _LocationComparer : IEqualityComparer<Location> {
      method Equals (line 265) | public bool Equals(Location x, Location y)
      method GetHashCode (line 268) | public int GetHashCode(Location x)
    class _SymbolComparer (line 272) | class _SymbolComparer : IEqualityComparer<ISymbol> {
      method _SymbolComparer (line 275) | public _SymbolComparer(_LocationComparer locComp) { _locComp = locCo...
      method Equals (line 278) | public bool Equals(ISymbol x, ISymbol y) { //faster, no garbage
      method GetHashCode (line 285) | public int GetHashCode(ISymbol x) => x.Name.GetHashCode();
    method SciUpdateUI (line 288) | public static void SciUpdateUI(SciCode doc, bool modified) {
    method _SciUpdateUI (line 303) | static async void _SciUpdateUI(timer _1) {
    method _HighlightMatchingBracesOrDirectives (line 362) | static void _HighlightMatchingBracesOrDirectives(CodeInfo.Context cd) {
    method RenameSymbol (line 422) | public static void RenameSymbol() {
    class _Renamer (line 429) | class _Renamer {
      method Rename (line 437) | public async void Rename() {
      method _Dialog (line 550) | bool _Dialog(ISymbol sym) {
      method _Preview (line 577) | void _Preview() {
      method _Link (line 613) | void _Link(bool cancel) {
      method _Finish (line 622) | void _Finish() {
      type _Change (line 663) | record struct _Change(int start, int end, string text, int marker);
      type _File (line 664) | record struct _File(FileNode f, string text, List<_Change> a);

FILE: Au.Editor/Edit/CiFindGo.cs
  class CiFindGo (line 24) | class CiFindGo : KDialogWindow {
    method ShowSingle (line 30) | public static void ShowSingle() {
    method CiFindGo (line 35) | CiFindGo() {
    method _Update (line 80) | async void _Update() {
    class _TvItem (line 172) | class _TvItem : ITreeViewItem {
      method _TvItem (line 178) | public _TvItem(ISymbol sym, string text, string text2, ImmutableArra...
      method MesureTextWidth (line 194) | int ITreeViewItem.MesureTextWidth(GdiTextRenderer tr) => Math.Max(tr...
      method SelectedColor (line 196) | int ITreeViewItem.SelectedColor(TVColorInfo ci) => ci.isSelected ? 0...
      method BorderColor (line 198) | int ITreeViewItem.BorderColor(TVColorInfo ci) => ci.isSelected ? 0x9...
      method DrawText (line 202) | public void DrawText(TVDrawInfo d, GdiTextRenderer tr) {
      method DrawMarginLeft (line 228) | public void DrawMarginLeft(TVDrawInfo d, GdiTextRenderer tr) {
      method Clicked (line 235) | public void Clicked() {
      method CompareTo (line 239) | public int CompareTo(_TvItem other) {
    class _TvDraw (line 256) | class _TvDraw : ITVCustomDraw {
      method Begin (line 262) | public void Begin(TVDrawInfo cd, GdiTextRenderer tr) {
      method DrawText (line 277) | public bool DrawText() {
      method DrawMarginLeft (line 282) | public void DrawMarginLeft() {
    method OnPreviewKeyDown (line 325) | protected override void OnPreviewKeyDown(KeyEventArgs e) {
    method OnDeactivated (line 336) | protected override void OnDeactivated(EventArgs e) {
    method _Options (line 344) | void _Options(WBButtonClickArgs e) {

FILE: Au.Editor/Edit/CiFolding.cs
  class CiFolding (line 19) | class CiFolding {
    method GetFoldPoints (line 22) | public static List<SciFoldPoint> GetFoldPoints(SyntaxNode root, string...
    method Fold (line 346) | public static void Fold(SciCode doc, List<SciFoldPoint> af) {
    method InitFolding (line 351) | public static void InitFolding(SciCode doc) {
    type FoldKind (line 355) | [Flags]
  class SciCode (line 364) | partial class SciCode {
    method ERestoreEditorData_ (line 365) | internal void ERestoreEditorData_() {
    type _EOpenState (line 431) | enum _EOpenState : byte { Open, Reopen, NewFileFromTemplate, NewFileNo...
    method ESaveEditorData_ (line 437) | internal void ESaveEditorData_(bool closingDoc) {
    method EFoldLine (line 470) | public void EFoldLine(int line, bool unfold = false, bool andDescendan...
    method _FoldOnMarginClick (line 531) | void _FoldOnMarginClick(int pos8, int modifiers) {
    method _FoldContextMenu (line 551) | void _FoldContextMenu(int pos8 = -1) {

FILE: Au.Editor/Edit/CiGoTo.cs
  type _SourceLocation (line 24) | struct _SourceLocation {
    method _SourceLocation (line 25) | public _SourceLocation(string file, int line, int column) {
  method CiGoTo (line 48) | CiGoTo(bool inSource) { _canGoTo = true; _inSource = inSource; }
  method CiGoTo (line 54) | public CiGoTo(ISymbol sym) {
  method _GetLinkData (line 149) | string _GetLinkData() {
  method GetLinkData (line 164) | public static string GetLinkData(ISymbol sym) => new CiGoTo(sym)._GetLin...
  method LinkGoTo (line 170) | public static void LinkGoTo(string linkData) {
  method GoTo (line 201) | public void GoTo() {

FILE: Au.Editor/Edit/CiPopupList.cs
  class CiPopupList (line 9) | class CiPopupList {
    method CiPopupList (line 34) | public CiPopupList(CiCompletion compl) {
    method _KindButton_Click (line 92) | private void _KindButton_Click(object sender, RoutedEventArgs e) {
    method _GroupButton_Click (line 109) | private void _GroupButton_Click(object sender, RoutedEventArgs e) {
    method _UnimportedButton_Click (line 117) | private void _UnimportedButton_Click(object sender, RoutedEventArgs e) {
    method _tv_ItemActivated (line 126) | private void _tv_ItemActivated(TVItemEventArgs e) {
    method _tv_SelectedSingle (line 131) | private void _tv_SelectedSingle(object sender, int index) {
    method _ShowTextPopup (line 145) | void _ShowTextPopup(timer t) {
    method _SortAndSetControlItems (line 160) | void _SortAndSetControlItems() {
    method UpdateVisibleItems (line 204) | public void UpdateVisibleItems() {
    method Show (line 229) | public void Show(SciCode doc, int position, List<CiComplItem> a, List<...
    method Hide (line 254) | public void Hide() {
    method OnCmdKey (line 298) | public bool OnCmdKey(KKey key) {
    class _CustomDraw (line 317) | class _CustomDraw : ITVCustomDraw {
      method _CustomDraw (line 323) | public _CustomDraw(CiPopupList list) {
      method Begin (line 327) | public void Begin(TVDrawInfo cd, GdiTextRenderer tr) {
      method DrawText (line 342) | public bool DrawText() {
      method DrawMarginLeft (line 382) | public void DrawMarginLeft() {

FILE: Au.Editor/Edit/CiPopupText.cs
  class CiPopupText (line 7) | class CiPopupText {
    type UsedBy (line 8) | public enum UsedBy { PopupList, Signature, Info }
    method CiPopupText (line 17) | public CiPopupText(UsedBy usedy, EventHandler onHiddenOrDestroyed = nu...
    method _CreateOrGet (line 46) | KPopup _CreateOrGet() {
    method Show (line 85) | public void Show(SciCode ownerControl, RECT anchorRect, Dock? side, bo...
    method Show (line 102) | public void Show(SciCode ownerControl, int pos16, bool hideIfOutside =...
    method Hide (line 108) | public bool Hide() {
    method _SetText (line 119) | void _SetText() {

FILE: Au.Editor/Edit/CiProjects.cs
  class CiProjects (line 16) | class CiProjects {
    method _GetAllMetaPrAndC (line 30) | static async Task<List<(FileNode f, FileNode[] pr, FileNode[] c, Dicti...
    method _GetUsers (line 158) | static async Task<List<FileNode>> _GetUsers(Dictionary<FileNode, Proje...
    method _GetUsers (line 195) | static async Task<List<FileNode>> _GetUsers(ISymbol sym, _FRContext x) {
    method GetSolutionForFindReferences (line 250) | public static async Task<(Solution solution, string info)> GetSolution...
    method _CreateProject (line 293) | static (ProjectInfo pri, MetaComments meta) _CreateProject(_FRContext ...
    class _FRContext (line 332) | class _FRContext {
    method AttachFileOf (line 338) | public static void AttachFileOf(DocumentId docId, FileNode f) { _cwtFO...
    method AttachFileOf (line 339) | public static void AttachFileOf(ProjectId projId, FileNode f) { _cwtFO...
    method FileOf (line 343) | public static FileNode FileOf(DocumentId id) => _cwtFO.TryGetValue(id,...
    method FileOf (line 344) | public static FileNode FileOf(Document doc) => FileOf(doc.Id);
    method FileOf (line 345) | public static FileNode FileOf(SyntaxTree t, Solution sol) => FileOf(so...
    method FileOf (line 346) | public static FileNode FileOf(ProjectId id) => _cwtFO.TryGetValue(id, ...
    method FileOf (line 347) | public static FileNode FileOf(Project proj) => FileOf(proj.Id);

FILE: Au.Editor/Edit/CiQuickInfo.cs
  class CiQuickInfo (line 9) | class CiQuickInfo {
    method GetTextAt (line 10) | public async Task<Section> GetTextAt(int pos16) {
    method GetIndexerToken (line 107) | internal static bool GetIndexerToken(CodeInfo.Context cd, in SyntaxTok...

FILE: Au.Editor/Edit/CiSignature.cs
  class CiSignature (line 12) | class CiSignature {
    class _Data (line 17) | class _Data {
      method IsSameSpan (line 23) | public bool IsSameSpan(_Span span2) {
      method IsSameArglist (line 28) | public bool IsSameArglist(_Span span2, SignatureHelpItems r2) {
    type _Span (line 40) | struct _Span {
      method _Span (line 42) | public _Span(int start, int fromEnd) { this.start = start; this.from...
      method _Span (line 43) | public _Span(TextSpan span, string code) { this.start = span.Start; ...
    method Cancel (line 48) | public void Cancel() {
    method _CancelUI (line 53) | void _CancelUI() {
    method SciPositionChanged (line 60) | public void SciPositionChanged(SciCode doc) {
    method SciCharAdded (line 67) | public void SciCharAdded(SciCode doc, char ch, bool methodCompletion =...
    method ShowSignature (line 73) | public void ShowSignature(SciCode doc) {
    method _ShowSignature (line 77) | async void _ShowSignature(SciCode doc, char ch, bool methodCompletion ...
    method _FormatText (line 229) | System.Windows.Documents.Section _FormatText(int iSel, bool userSelect...
    method _GetSignatureHelpProviders (line 336) | static List<ISignatureHelpProvider> _GetSignatureHelpProviders() {
    method OnCmdKey (line 357) | public bool OnCmdKey(KKey key) {

FILE: Au.Editor/Edit/CiSnippets.cs
  class CiSnippets (line 19) | static class CiSnippets {
    class _CiComplItemSnippet (line 20) | class _CiComplItemSnippet : CiComplItem {
      method _CiComplItemSnippet (line 25) | public _CiComplItemSnippet(string name, XElement x, string customFil...
    type _Context (line 34) | [Flags]
    method AddSnippets (line 61) | public static void AddSnippets(List<CiComplItem> items, TextSpan span,...
    method LoadSnippetsFile_ (line 173) | internal static XElement LoadSnippetsFile_(string file) {
    method _DetectContextsOfSnippets (line 214) | static void _DetectContextsOfSnippets(List<_CiComplItemSnippet> a) {
    method Reload (line 310) | public static void Reload() => s_items = null;
    method Compare (line 312) | public static int Compare(CiComplItem i1, CiComplItem i2) {
    method GetDescription (line 319) | public static System.Windows.Documents.Section GetDescription(CiComplI...
    method Surround (line 368) | public static void Surround(string snippetXml = null, Range? range = n...
    method GetSurroundRange (line 433) | public static (int start, int end) GetSurroundRange(CodeInfo.Context k) {
    method Commit (line 446) | public static void Commit(SciCode doc, CiComplItem item, int codeLenDi...
    method _Commit (line 467) | static void _Commit(SciCode doc, int pos, int endPos, XElement x, stri...
  class CiSnippetMode (line 534) | class CiSnippetMode {
    type _Dollar (line 536) | record struct _Dollar(int n, string text, int offset, int len);
    class _Field (line 539) | class _Field {
      method ToString (line 542) | public override string ToString() => $"_Field {n} ({start}..{end})";
    method CiSnippetMode (line 556) | public CiSnippetMode(int pos, int endPos, string s, SciCode doc, strin...
    method _Start (line 649) | void _Start(int pos, int endPos, string s, List<_Dollar> dollars) {
    method End (line 746) | public void End(bool goToFinal = false) {
    method _SetActiveField (line 757) | void _SetActiveField(_Field field, bool select) {
    method _FieldLeaved (line 774) | void _FieldLeaved(bool ending = false) {
    method _FieldFromPos (line 786) | _Field _FieldFromPos(int pos, int pos2) {
    method _FieldFromSel (line 791) | _Field _FieldFromSel() => _FieldFromPos(_doc.aaaSelectionStart8, _doc....
    method SciModified (line 793) | public void SciModified(in Sci.SCNotification n) {
    method SciPosChanged (line 843) | public void SciPosChanged() {
    method SciKey (line 852) | public bool SciKey(KKey key, ModifierKeys mod) {
    method _ReplaceTextOfRelatedFields (line 889) | unsafe void _ReplaceTextOfRelatedFields(bool ending) {

FILE: Au.Editor/Edit/CiStyling.cs
  class CiStyling (line 20) | partial class CiStyling {
    method DocHandleDestroyed (line 21) | public void DocHandleDestroyed(SciCode doc) {
    method DocTextAdded (line 30) | public static void DocTextAdded() => CodeInfo._styling._DocTextAdded();
    method _DocTextAdded (line 31) | void _DocTextAdded() {
    method Update (line 43) | public void Update() => _update = true;
    method _DocChanged (line 55) | void _DocChanged(SciCode doc = null) {
    method Timer250msWhenVisibleAndWarm (line 74) | public void Timer250msWhenVisibleAndWarm(SciCode doc) {
    method SciModified (line 98) | public void SciModified(SciCode doc, in SCNotification n) {
    method _ModifiedTimer (line 121) | void _ModifiedTimer(timer t) {
    method _Work (line 130) | async void _Work(SciCode doc, int start8 = 0, int end8 = -1, bool canc...
    method StyleFromClassifiedSpan (line 321) | public static EStyle StyleFromClassifiedSpan(ClassifiedSpan cs) {
    method IsProtected (line 384) | public static bool IsProtected(KScintilla sci, int pos8) => sci.aaaSty...
    method IsProtected (line 390) | public static bool IsProtected(KScintilla sci, int from8, int to8) {
    method SkipProtected (line 398) | public static int SkipProtected(KScintilla sci, int pos8, bool back) {

FILE: Au.Editor/Edit/CiText.cs
  class CiText (line 23) | class CiText {
    method _Start (line 35) | void _Start(TextElement e, bool start) {
    method _End (line 51) | void _End() { _container = _stack.Pop(); }
    method Append (line 53) | public Run Append(string text) {
    method Append (line 59) | public void Append(Inline i) {
    method Append (line 64) | public void Append(UIElement e) {
    method _Inlines (line 68) | InlineCollection _Inlines() => _container switch { Paragraph p => p.In...
    method Run (line 70) | public Run Run(string style, string text, string append = null) {
    method Style (line 77) | public void Style(string style) {
    method StartParagraph (line 82) | public Paragraph StartParagraph(string style = null) {
    method EndParagraph (line 89) | public void EndParagraph() => _End();
    method StartDiv (line 94) | public Paragraph StartDiv() => StartParagraph("div");
    method EndDiv (line 96) | public void EndDiv() => _End();
    method Header (line 98) | public (Paragraph, Run) Header(string text) {
    method Separator (line 105) | public Separator Separator() {
    method LineBreak (line 112) | public void LineBreak(string append = null, bool notIfFirstInParagraph...
    method StartOverload (line 117) | public void StartOverload(bool selected, int index) {
    method EndOverload (line 123) | public void EndOverload(bool selected) {
    method CodeBlock (line 132) | public void CodeBlock(string code) {
    method StartSpan (line 142) | public Span StartSpan(string style = null) {
    method EndSpan (line 149) | public void EndSpan() => _End();
    method StartBold (line 151) | public void StartBold() => _Start(new Bold(), true);
    method EndBold (line 153) | public void EndBold() => _End();
    method Bold (line 155) | public void Bold(string text) => _Start(new Bold(new Run(text)), false);
    method StartItalic (line 157) | public void StartItalic() => _Start(new Italic(), true);
    method EndItalic (line 159) | public void EndItalic() => _End();
    method Italic (line 161) | public void Italic(string text) => _Start(new Italic(new Run(text)), f...
    method StartHyperlink (line 163) | public Hyperlink StartHyperlink(string uri) {
    method EndHyperlink (line 170) | public void EndHyperlink() => _End();
    method Hyperlink (line 172) | public Hyperlink Hyperlink(string uri, string text, string append = nu...
    method Image (line 181) | public void Image(CiItemKind i) => Image(CiComplItem.ImageResource(i));
    method Image (line 183) | public void Image(CiItemAccess i) => Image(CiComplItem.AccessImageReso...
    method Image (line 189) | public void Image(string source) {
    method AppendTaggedParts (line 199) | public void AppendTaggedParts(IEnumerable<TaggedText> tags, bool? isPa...
    method AppendTaggedParts (line 327) | public void AppendTaggedParts(ImmutableArray<SymbolDisplayPart> parts,...
    method FromTaggedParts (line 330) | public static Section FromTaggedParts(IEnumerable<TaggedText> tags) {
    method FromSymbols (line 338) | public static Section FromSymbols(IEnumerable<ISymbol> symbols, int iS...
    method AppendSymbols (line 345) | public void AppendSymbols(IEnumerable<ISymbol> symbols, int iSelect, S...
    method GetSymbolDescription (line 626) | public static ImmutableArray<TaggedText> GetSymbolDescription(ISymbol ...
    method AppendSymbolWithoutParameters (line 700) | public void AppendSymbolWithoutParameters(ISymbol sym) {
    method AppendParameters (line 704) | public void AppendParameters(ISymbol sym, int iSel = -1, SignatureHelp...
    method AppendSymbolLinks (line 764) | public bool AppendSymbolLinks(ISymbol sym) {
    method AppendSymbolLinks (line 772) | public void AppendSymbolLinks(string helpUrl, string sourceUrl) {
    method FromKeyword (line 781) | public static Section FromKeyword(string name) {
    method FromLabel (line 798) | public static Section FromLabel(string name) {
    method CreateControl (line 806) | public static FlowDocumentControl CreateControl(int colorRGB = 0xfffff...
  class FlowDocumentControl (line 828) | class FlowDocumentControl : FlowDocumentScrollViewer {
    method OnLinkClicked_ (line 831) | internal static void OnLinkClicked_(Hyperlink h, RequestNavigateEventA...
    method Clear (line 844) | public void Clear() {
    method OnPreviewMouseLeftButtonUp (line 849) | protected override void OnPreviewMouseLeftButtonUp(MouseButtonEventArg...

FILE: Au.Editor/Edit/CiTools.cs
  class CiTools (line 14) | class CiTools {
    method HideTempWindows (line 15) | public bool HideTempWindows() {
    method _RegexWindowShow (line 27) | void _RegexWindowShow(SciCode doc, string code, int pos16, in CiString...
    method _KeysWindowShow (line 56) | void _KeysWindowShow(SciCode doc, string code, int pos16, in CiStringI...
    method _ShowWindow (line 65) | static void _ShowWindow(InfoWindow w, SciCode doc, int position, wnd d...
    method CmdShowRegexWindow (line 75) | public static void CmdShowRegexWindow() => _ShowRegexOrKeysWindow(true);
    method CmdShowKeysWindow (line 76) | public static void CmdShowKeysWindow() => _ShowRegexOrKeysWindow(false);
    method _ShowRegexOrKeysWindow (line 78) | static void _ShowRegexOrKeysWindow(bool isRegex) {
    method ShowForStringParameter (line 127) | public void ShowForStringParameter(PSFormat stringFormat, CodeInfo.Con...

FILE: Au.Editor/Edit/CiUtil.cs
  class CiUtil (line 21) | static class CiUtil {
    method IsSpace (line 27) | public static bool IsSpace(char c) => c is ' ' or '\t';
    method IsSpace (line 32) | public static bool IsSpace(string code, int pos) => (uint)pos < code.L...
    method SkipSpace (line 37) | public static int SkipSpace(string code, int pos) {
    method SkipSpaceBack (line 45) | public static int SkipSpaceBack(string code, int pos) {
    method SkipSpaceAround (line 53) | public static (int start, int end) SkipSpaceAround(string code, int po...
    method SkipNewline (line 63) | public static int SkipNewline(string code, int pos) {
    method SkipNewlineBack (line 72) | public static int SkipNewlineBack(string code, int pos) {
    method SkipSpaceAndNewline (line 81) | public static int SkipSpaceAndNewline(string code, int pos) {
    method SkipSpaceAndNewlineBack (line 89) | public static int SkipSpaceAndNewlineBack(string code, int pos) {
    method IsLineStart (line 97) | public static bool IsLineStart(RStr s, int i/*, out int startOfLine*/) {
    method IsLineStart (line 107) | public static bool IsLineStart(RStr s, int i, out int startOfLine) {
    method CreateIndentString (line 117) | public static string CreateIndentString(int n) {
    method IndentStringForInsertSimple (line 127) | public static string IndentStringForInsertSimple(string s, SciCode doc...
    method GoogleURL (line 136) | public static string GoogleURL(string query) => App.Settings.internetS...
    method IsPosInNonblankTrivia (line 145) | public static bool IsPosInNonblankTrivia(SyntaxNode node, int pos, str...
    method IsScript (line 165) | public static bool IsScript(string code) {
    method GetSymbolFromPos (line 184) | public static (ISymbol symbol, CodeInfo.Context cd) GetSymbolFromPos(b...
    method GetSymbolFromPos (line 189) | public static ISymbol GetSymbolFromPos(CodeInfo.Context cd, bool andZe...
    method _TryGetAltSymbolFromPos (line 206) | static ISymbol _TryGetAltSymbolFromPos(CodeInfo.Context cd) {
    method GetSymbolEtcFromPos (line 217) | public static (ISymbol symbol, string keyword, HelpKind helpKind, Synt...
    method GetFunctionSymbolInfoFromArgumentList (line 297) | public static bool GetFunctionSymbolInfoFromArgumentList(BaseArgumentL...
    type HelpKind (line 308) | public enum HelpKind {
    method OpenSymbolEtcFromPosHelp (line 312) | public static void OpenSymbolEtcFromPosHelp() {
    method GetArgumentParameterFromPos (line 352) | public static bool GetArgumentParameterFromPos(BaseArgumentListSyntax ...
    method GetParameterSymbol (line 378) | public static IEnumerable<IParameterSymbol> GetParameterSymbol(SymbolI...
    method GetNearestLocalVariableOfType (line 408) | public static ISymbol GetNearestLocalVariableOfType(params string[] ty...
    method GetLocalVariablesAt (line 420) | public static List<ISymbol> GetLocalVariablesAt(SemanticModel semo, in...
    method EnumPropertiesAndFields (line 452) | public static IEnumerable<ISymbol> EnumPropertiesAndFields(SemanticMod...
    method _GetLocalScopes (line 472) | static List<SyntaxNode> _GetLocalScopes(SemanticModel semo, int pos) {
    method _IsLocalScope (line 499) | static bool _IsLocalScope(SyntaxNode n) {
    method _GetLocalScope (line 515) | static SyntaxNode _GetLocalScope(SyntaxNode node) => node.FirstAncesto...
    method GetSymbolHelpUrl (line 523) | public static string GetSymbolHelpUrl(ISymbol sym, out bool isAu) {
    method GetParameterStringFormat (line 584) | public static PSFormat GetParameterStringFormat(SyntaxNode node, Seman...
    method GetAllGlobalUsings (line 648) | public static IEnumerable<UsingDirectiveSyntax> GetAllGlobalUsings(Sem...
    method GetClassifiedSpansAsync (line 661) | public static async Task<List<ClassifiedSpan>> GetClassifiedSpansAsync...
    method GetClassifiedSpans (line 669) | public static List<ClassifiedSpan> GetClassifiedSpans(SemanticModel se...
    method _CorrectClassifiedSpans (line 676) | static List<ClassifiedSpan> _CorrectClassifiedSpans(IEnumerable<Classi...
    method GetScintillaStylingBytes8 (line 711) | public static byte[] GetScintillaStylingBytes8(string code) {
    method MemberDeclarationToKind (line 758) | public static CiItemKind MemberDeclarationToKind(MemberDeclarationSynt...
    method TagsToKindAndAccess (line 778) | public static void TagsToKindAndAccess(ImmutableArray<string> tags, ou...
    class CompletionListSortComparer (line 842) | public class CompletionListSortComparer : IComparer<string> {
      method Compare (line 843) | public int Compare(string x, string y) {
    method CreateDocumentFromCode (line 864) | public static Document CreateDocumentFromCode(AdhocWorkspace ws, strin...
    method CreateSyntaxTree (line 910) | public static CompilationUnitSyntax CreateSyntaxTree(string code) {
    method PrintNode (line 919) | public static void PrintNode(SyntaxNode x, int pos = 0, bool printNode...
    method PrintNode (line 932) | public static void PrintNode(SyntaxToken x, int pos = 0, bool printNod...
    method PrintNode (line 937) | public static void PrintNode(SyntaxTrivia x, int pos = 0, bool printNo...
    method DebugHiliteRange (line 942) | public static void DebugHiliteRange(int start, int end, int indic = Sc...
    method DebugHiliteRange (line 948) | public static void DebugHiliteRange(TextSpan span, int indic = SciThem...
    method DebugHiliteRanges (line 950) | public static void DebugHiliteRanges(List<Range> a, int indic = SciThe...
    method DebugGetSymbolInterfaces (line 957) | static IEnumerable<string> DebugGetSymbolInterfaces(ISymbol sym) {
    method DebugGetContextType (line 962) | public static /*CiContextType*/void DebugGetContextType(/*in CodeInfo....

FILE: Au.Editor/Edit/CiUtilExt.cs
  class CiUtilExt (line 25) | static class CiUtilExt {
    method IsInString (line 39) | public static bool? IsInString(this ref SyntaxToken t, int position, s...
    method NoClosingQuote (line 199) | public static bool NoClosingQuote(this SyntaxNode t) //fast
    method Deconstruct (line 204) | public static void Deconstruct(this TextSpan t, out int Start, out int...
    method ToRange (line 206) | public static Range ToRange(this TextSpan t) => t.Start..t.End;
    method ContainsInside (line 211) | public static bool ContainsInside(this TextSpan t, int position) => po...
    method ContainsOrTouches (line 216) | public static bool ContainsOrTouches(this TextSpan t, int position) =>...
    method FindTrivia (line 224) | public static SyntaxTrivia FindTrivia(in this SyntaxToken t, int posit...
    method FindTouchingToken (line 248) | public static bool FindTouchingToken(this SyntaxNode t, out SyntaxToke...
    method GetRealFullSpan (line 262) | public static TextSpan GetRealFullSpan(this SyntaxNode t, bool minimal...
    method GetStatementEtc (line 295) | public static SyntaxNode GetStatementEtc(this SyntaxNode t, int pos, b...
    method PreviousSiblings (line 310) | public static IEnumerable<SyntaxNode> PreviousSiblings(this SyntaxNode...
    method Eq (line 327) | public static bool Eq(this string t, TextSpan span, string s, bool ign...
    method IsCsNewlineChar (line 333) | public static bool IsCsNewlineChar(this string t, int i)
    method IsCsStartOfLine (line 339) | public static bool IsCsStartOfLine(this string t, int i)
    method IsCsEndOfLine (line 345) | public static bool IsCsEndOfLine(this string t, int i)
    method DebugPrint (line 348) | [Conditional("DEBUG")]
    method DebugPrintIf (line 354) | [Conditional("DEBUG")]
    method JustName (line 366) | public static string JustName(this ISymbol t) {
    method QualifiedName (line 372) | public static string QualifiedName(this ISymbol t, bool onlyNamespace ...
    method QualifiedNameCached (line 385) | public static string QualifiedNameCached(this INamespaceSymbol t) { //...
    method GetEnclosingNamedType2 (line 399) | public static INamedTypeSymbol GetEnclosingNamedType2(this SemanticMod...
    method GetHeaderLength (line 409) | public static int GetHeaderLength(this CompilationUnitSyntax t) {
    method ImageResource (line 418) | public static (string kind, string access) ImageResource(this ISymbol ...
    method AppendIndent (line 498) | public static StringBuilder AppendIndent(this StringBuilder t, int n) {
    method AppendCodeWithIndent (line 509) | public static void AppendCodeWithIndent(this StringBuilder t, string s...
  type CiStringInfo (line 531) | record struct CiStringInfo {

FILE: Au.Editor/Edit/CiWinapi.cs
  class CiWinapi (line 15) | class CiWinapi {
    method IsWinapiClassSymbol (line 20) | public static bool IsWinapiClassSymbol(INamedTypeSymbol typeSym) => ty...
    method AddWinapi (line 22) | public static CiWinapi AddWinapi(INamedTypeSymbol typeSym, List<CiComp...
    method GetDescription (line 53) | public static System.Windows.Documents.Section GetDescription(CiComplI...
    method _GetText (line 62) | static bool _GetText(CiComplItem item, out string text) {
    method OnCommitInsertDeclaration (line 67) | public void OnCommitInsertDeclaration(CiComplItem item) {
    method _InsertDeclaration (line 74) | bool _InsertDeclaration(CiComplItem item, string text) {

FILE: Au.Editor/Edit/CiWorkspace.cs
  class CiWorkspace (line 19) | class CiWorkspace : IDisposable {
    method GetCompilation (line 40) | public Compilation GetCompilation() => Solution.GetProject(Projects[0]...
    method GetDocId (line 46) | public DocumentId GetDocId(FileNode fn) {
    method CiWorkspace (line 51) | public CiWorkspace(FileNode fn, Caller caller) {
    method Dispose (line 120) | public void Dispose() {
    type Caller (line 124) | public enum Caller {
    type ProjectData (line 138) | public record struct ProjectData(MetaComments meta, ProjectId projectI...

FILE: Au.Editor/Edit/CodeExporter.cs
  class CodeExporter (line 14) | static class CodeExporter {
    method GetStyles (line 15) | public static EStyle[] GetStyles(string s) {
    method ExportForum (line 34) | public static string ExportForum(string s) {
    method ExportHtml (line 51) | public static string ExportHtml(string s, bool spanClass, bool withCss...
    method ExportCss (line 95) | public static string ExportCss() {
    method _StyleToString (line 129) | static string _StyleToString(EStyle style)
    method _StyleToStruct (line 151) | static TStyle _StyleToStruct(EStyle style) => SciTheme.Default[style];

FILE: Au.Editor/Edit/CodeInfo.cs
  class CodeInfo (line 22) | static class CodeInfo {
    method UiLoaded (line 43) | public static void UiLoaded() {
    method WaitUntilReadyForStyling (line 157) | public static void WaitUntilReadyForStyling() {
    method _CanWork (line 164) | static bool _CanWork(SciCode doc) {
    method _Uncache (line 172) | static void _Uncache() {
    method Stop (line 185) | public static void Stop() {
    method Cancel (line 190) | public static void Cancel() {
    method StopAndUpdateStyling (line 200) | public static void StopAndUpdateStyling() {
    method FilesChanged (line 210) | public static void FilesChanged() {
    method SciKillFocus (line 230) | public static void SciKillFocus(SciCode doc) {
    method SciCmdKey (line 240) | public static bool SciCmdKey(SciCode doc, KKey key, ModifierKeys mod) {
    method SciBeforeCharAdded (line 289) | public static bool SciBeforeCharAdded(SciCode doc, char ch) {
    method SciModified (line 302) | public static bool SciModified(SciCode doc, in Sci.SCNotification n) {
    method SciCharAdded (line 312) | public static void SciCharAdded(SciCode doc, char ch) {
    method SciUpdateUI (line 341) | public static void SciUpdateUI(SciCode doc, Sci.UPDATE updated) {
    method ShowCompletionList (line 360) | public static void ShowCompletionList(SciCode doc = null) {
    method ShowSignature (line 366) | public static void ShowSignature(SciCode doc = null) {
    method SciMouseDwellStarted (line 375) | public static async void SciMouseDwellStarted(SciCode doc, int pos8) {
    class PastingEtc (line 399) | public class PastingEtc : IDisposable {
      method PastingEtc (line 404) | public PastingEtc(SciCode doc, bool silent = false) {
      method Dispose (line 411) | public void Dispose() {
    class Context (line 417) | public class Context {
      method Context (line 435) | public Context(int pos) {
      method GetDocument (line 450) | public bool GetDocument() {
    method GetContextAndDocument (line 516) | public static bool GetContextAndDocument(out Context r, int position =...
    method GetContextWithoutDocument (line 527) | public static bool GetContextWithoutDocument(out Context r, int positi...
    method GetDocumentAndFindNode (line 540) | public static bool GetDocumentAndFindNode(out Context r, out SyntaxNod...
    method GetDocumentAndFindToken (line 551) | public static bool GetDocumentAndFindToken(out Context r, out SyntaxTo...
    method _CreateWorkspace (line 559) | static void _CreateWorkspace(SciCode sci) {
    method _Timer025sWhenVisible (line 573) | private static void _Timer025sWhenVisible() {
    method _ShowTextPopup (line 601) | static void _ShowTextPopup(SciCode doc, int pos16, System.Windows.Docu...
    method HideTextPopup (line 624) | internal static bool HideTextPopup() {
    method HideTextPopupAndTempWindows (line 629) | internal static void HideTextPopupAndTempWindows() {
    class CharContext (line 634) | public class CharContext : IDisposable {
      method CharContext (line 641) | public CharContext(SciCode doc, char ch) {
      method Dispose (line 654) | public void Dispose() {

FILE: Au.Editor/Edit/EditGoBack.cs
  class EditGoBack (line 3) | class EditGoBack {
    type _Location (line 4) | record struct _Location(FileNode fn, int pos);
    method OnPosChanged (line 11) | internal void OnPosChanged(SciCode doc) {
    method SciModified (line 47) | internal void SciModified(SciCode doc, bool deleted, int pos, int len) {
    method OnRestoringSavedPos (line 86) | internal void OnRestoringSavedPos() {
    method OnFileDeleted (line 90) | internal void OnFileDeleted(IEnumerable<FileNode> e) {
    method RecordNext (line 115) | public void RecordNext() { _recordNext = true; }
    method GoBack (line 118) | public void GoBack() {
    method GoForward (line 124) | public void GoForward() {
    method _GoTo (line 130) | void _GoTo() {
    method _UpdateUI (line 139) | void _UpdateUI() {
    method DisableUI (line 145) | internal static void DisableUI() {

FILE: Au.Editor/Edit/GenerateCode.cs
  class GenerateCode (line 25) | static class GenerateCode {
    method DocComment (line 29) | public static void DocComment(CodeInfo.Context cd) {
    method CreateDelegate (line 87) | public static void CreateDelegate() {
    method _CreateDelegate (line 91) | static bool _CreateDelegate() {
    method _FormatDelegete (line 173) | static void _FormatDelegete(StringBuilder b, bool? lambda, INamedTypeS...
    method CreateEventHandlers (line 212) | public static void CreateEventHandlers() {
    method CreateOverrides (line 276) | public static void CreateOverrides() {
    method _AccToString (line 332) | static string _AccToString(ISymbol v) => v.DeclaredAccessibility switc...
    method ImplementInterfaceOrAbstractClass (line 334) | public static void ImplementInterfaceOrAbstractClass(int position = -1) {

FILE: Au.Editor/Edit/InsertCode.cs
  class InsertCode (line 25) | static class InsertCode {
    type InsertCodeParams (line 36) | public record InsertCodeParams(string s, bool goTo = false, bool activ...
    method Statements (line 45) | public static void Statements(InsertCodeParams p) {
    method TextSimply (line 202) | public static void TextSimply(string s) {
    method UsingDirective (line 215) | public static bool UsingDirective(string ns, bool missing = false) {
    method FindUsingsInsertPos (line 247) | public static int FindUsingsInsertPos(CodeInfo.Context k, string[] nam...
    method MetaComment (line 306) | public static bool MetaComment(string s) {
    method SurroundPragmaWarningFormat (line 323) | public static void SurroundPragmaWarningFormat() {
    method AddClassProgram (line 331) | public static void AddClassProgram() {
    method SetMenuToolbarItemIcon (line 378) | public static void SetMenuToolbarItemIcon(string icon) {
    class Util (line 435) | public static class Util {
      method RenameNewSymbols (line 439) | public static void RenameNewSymbols(ref string s, int pos, bool make...
      method RenameNewSymbols (line 452) | public static void RenameNewSymbols(ref string s, CodeInfo.Context k...

FILE: Au.Editor/Edit/ModifyCode.cs
  class ModifyCode (line 20) | static class ModifyCode {
    method Comment (line 26) | public static void Comment(bool? comment, bool notSlashStar = false) {
    method Format (line 130) | public static void Format(bool selection) {
    method Format (line 155) | public static void Format(CodeInfo.Context cd, int from, int to) {
    method _FormatReplace (line 163) | static void _FormatReplace(CodeInfo.Context cd, List<TextChange> a) {
    method Format (line 180) | public static List<TextChange> Format(CodeInfo.Context cd, ref int fro...
    method _Format (line 222) | static bool _Format(CodeInfo.Context cd, int from, int to, out List<Te...
    method _PrintFormattingTextChanges (line 340) | static void _PrintFormattingTextChanges(string header, string code, IL...
    method FormatForInsert (line 355) | public static bool FormatForInsert(ref string s, ref int start, int en...
    method CleanupWndFind (line 437) | public static void CleanupWndFind() {
    method ConvertInterfaceMethodPreserveSig (line 537) | public static void ConvertInterfaceMethodPreserveSig() {
  class SciCode (line 711) | partial class SciCode {
    method EReplaceTextGently (line 715) | public void EReplaceTextGently(string s) => _ReplaceTextGently(0, aaaL...
    method EReplaceTextGently (line 720) | public void EReplaceTextGently(int from, int to, string s) => _Replace...
    method _ReplaceTextGently (line 722) | void _ReplaceTextGently(int rFrom, int rTo, string s, bool isRange) {

FILE: Au.Editor/Edit/PanelEdit.cs
  class PanelEdit (line 11) | class PanelEdit {
    method PanelEdit (line 15) | public PanelEdit() {
    method Open (line 54) | public bool Open(FileNode f, bool newFile, bool? focusEditor, bool noT...
    method Close (line 130) | public void Close(FileNode f) {
    method _Close (line 148) | void _Close(SciCode doc) {
    method CloseAll_ (line 162) | internal void CloseAll_(bool saveTextIfNeed) {
    method SaveText (line 178) | public bool SaveText() {
    method SaveEditorData (line 182) | public void SaveEditorData(bool closingDoc) {
    method OnAppActivated_ (line 188) | internal void OnAppActivated_() {
    method SyncEditorTextIfFileIs (line 197) | public void SyncEditorTextIfFileIs(string file, bool save) {
    method _UpdateUI_IsOpen (line 210) | void _UpdateUI_IsOpen() {
    method UpdateUI_EditEnabled_ (line 238) | internal void UpdateUI_EditEnabled_() {
    method UpdateUI_EditView_ (line 262) | internal void UpdateUI_EditView_() {
    type _EUpdateUI (line 267) | [Flags]

FILE: Au.Editor/Edit/Sci-DD.cs
  class SciCode (line 7) | partial class SciCode {
    method _InitDragDrop (line 8) | void _InitDragDrop() {
    class _DragDrop (line 16) | class _DragDrop : Api.IDropTarget {
      method _DragDrop (line 21) | public _DragDrop(SciCode sci) { _sci = sci; }
      method DragEnter (line 23) | void Api.IDropTarget.DragEnter(System.Runtime.InteropServices.ComTyp...
      method DragOver (line 33) | unsafe void Api.IDropTarget.DragOver(int grfKeyState, POINT p, ref i...
      method DragLeave (line 41) | void Api.IDropTarget.DragLeave() {
      method Drop (line 48) | void Api.IDropTarget.Drop(System.Runtime.InteropServices.ComTypes.ID...
      method _GetEffect (line 53) | int _GetEffect(int effect, int grfKeyState) {
      method _GetDropPos (line 70) | void _GetDropPos(ref POINT p, out int pos) {
      method _Drop (line 80) | void _Drop(POINT xy, int effect) {

FILE: Au.Editor/Edit/Sci-TR.cs
  class SciCode (line 8) | partial class SciCode : KScintilla {
    type TempRangeFlags (line 9) | [Flags]
    type ITempRange (line 27) | public interface ITempRange {
      method Remove (line 33) | void Remove();
      method GetCurrentFromTo (line 39) | bool GetCurrentFromTo(out int from, out int to, bool utf8 = false);
    class _TempRange (line 61) | class _TempRange : ITempRange {
      method _TempRange (line 70) | internal _TempRange(SciCode doc, object owner, int fromUtf16, int fr...
      method Remove (line 80) | public void Remove() {
      method Leaved (line 88) | internal void Leaved() => _doc = null;
      method GetCurrentFromTo (line 90) | public bool GetCurrentFromTo(out int from, out int to, bool utf8 = f...
      method MustLeave (line 110) | internal bool MustLeave(int pos, int pos2, int modLen) {
      method Contains (line 116) | internal bool Contains(int pos, object owner, bool endPosition)
      method Equals (line 119) | internal bool Equals(int from2, int to2, object owner2, TempRangeFla...
      method ToString (line 127) | public override string ToString() => $"({CurrentFrom}, {CurrentTo}),...
    method ETempRanges_Add (line 149) | public ITempRange ETempRanges_Add(object owner, int from, int to, Acti...
    method ETempRanges_Enum (line 181) | public IEnumerable<ITempRange> ETempRanges_Enum(int position, object o...
    method ETempRanges_Enum (line 194) | public IEnumerable<ITempRange> ETempRanges_Enum(object owner) {
    method ETempRanges_HidingOrClosingActiveDoc_ (line 201) | internal void ETempRanges_HidingOrClosingActiveDoc_() {
    method _TempRangeOnModifiedOrPosChanged (line 213) | void _TempRangeOnModifiedOrPosChanged(MOD mod, int pos, int len) {
    method _TraceTempRange (line 234) | [Conditional("TRACE_TEMP_RANGES")]

FILE: Au.Editor/Edit/Sci-images.cs
  class SciCode (line 24) | partial class SciCode {
    type _Image (line 25) | struct _Image {
    type _Images (line 32) | struct _Images {
    method EImagesGet_ (line 41) | internal void EImagesGet_(CodeInfo.Context cd, ClassifiedSpan[] a, in ...
    method _ImagesMarginDrawCallback (line 244) | unsafe void _ImagesMarginDrawCallback(ref Sci_MarginDrawCallbackData c) {
    method _ImagesMarginAutoWidth (line 300) | void _ImagesMarginAutoWidth(int oldWidth, int width) {
    method _ImagesOnOff (line 308) | void _ImagesOnOff() {
    method _ImageDisplaySize (line 322) | Size _ImageDisplaySize(bool isIcon16, Bitmap b, bool smaller) {
    method EHideImages_ (line 344) | internal unsafe void EHideImages_(int from8, int to8, Span<byte> style...
    method _ImageDeleteKey (line 385) | bool _ImageDeleteKey(KKey key) {
    method _ImageRemoveScreenshots (line 412) | static string _ImageRemoveScreenshots(string s, bool onCopy) {
    method EImageRemoveScreenshots (line 425) | public void EImageRemoveScreenshots() {

FILE: Au.Editor/Edit/SciCode.cs
  class SciCode (line 12) | partial class SciCode : KScintilla {
    method ToString (line 18) | public override string ToString() => _fn.ToString();
    method SciCode (line 20) | internal SciCode(FileNode file, aaaFileLoaderSaver fls) {
    method AaOnHandleCreated (line 33) | protected override void AaOnHandleCreated() {
    method _OnHandleCreatedOrDpiChanged (line 76) | void _OnHandleCreatedOrDpiChanged() {
    method OnDpiChanged (line 82) | protected override void OnDpiChanged(DpiScale oldDpi, DpiScale newDpi) {
    method DestroyWindowCore (line 87) | protected override void DestroyWindowCore(HandleRef hwnd) {
    method EInit_ (line 95) | internal void EInit_(bool newFile, bool noTemplate) {
    method EOpenDocActivated (line 140) | internal void EOpenDocActivated() {
    method AaOnSciNotify (line 145) | protected override void AaOnSciNotify(ref SCNotification n) {
    method WndProc (line 256) | protected override nint WndProc(wnd w, int msg, nint wp, nint lp) {
    method _MarkersMarginClicked (line 340) | void _MarkersMarginClicked(bool rclick, int pos8) {
    method TranslateAcceleratorCore (line 364) | protected override bool TranslateAcceleratorCore(ref System.Windows.In...
    method OnGotFocus (line 379) | protected override void OnGotFocus(RoutedEventArgs e) {
    method ESaveText_ (line 396) | internal bool ESaveText_(bool force) {
    method EFileModifiedExternally_ (line 411) | internal void EFileModifiedExternally_() {
    method ESetLineNumberMarginWidth_ (line 422) | internal void ESetLineNumberMarginWidth_(bool onModified = false) {
    method AaOnDeletingLineWithMarkers (line 430) | protected override void AaOnDeletingLineWithMarkers(int line, uint mar...
    method ECopy (line 444) | public void ECopy(ECopyAs copyAs = ECopyAs.Text) {
    type ECopyAs (line 478) | public enum ECopyAs { Text, Forum, HtmlSpanStyle, HtmlSpanClassCss, Ht...
    method EPaste (line 484) | public void EPaste() {
    method EIsForumCode_ (line 510) | internal static (bool yes, string text, string filename, bool isClass)...
    method _NewFileFromForumCode (line 523) | static void _NewFileFromForumCode(string text, string name, bool isCla...
    method _IndicatorsInit (line 531) | void _IndicatorsInit() {
    method EInicatorsFound_ (line 547) | internal void EInicatorsFound_(List<Range> a) {
    method EInicatorsDiag_ (line 558) | internal void EInicatorsDiag_(bool has) {
    type EView (line 574) | [Flags]
    method EToggleView_call_from_menu_only_ (line 577) | internal static void EToggleView_call_from_menu_only_(EView what) {
    method _CodeModifiedAndCodeinfoOK (line 592) | void _CodeModifiedAndCodeinfoOK() {
    method _WpfPreviewRun (line 606) | void _WpfPreviewRun(bool starting) {
    method WpfPreviewStartStop (line 648) | public static void WpfPreviewStartStop(MenuItem mi) {
    method _DefineIconMarkers (line 681) | void _DefineIconMarkers() {
    type _MarkerBitmaps (line 725) | struct _MarkerBitmaps {
    method EGetCaretRectFromPos (line 735) | public RECT EGetCaretRectFromPos(int pos16 = -1, bool inScreen = false) {

FILE: Au.Editor/Edit/SciTheme.cs
  type SciTheme (line 8) | record class SciTheme { //info: record class because need `with` and syn...

FILE: Au.Editor/Edit/SciUndo.cs
  class SciUndo (line 6) | class SciUndo : IDisposable {
    method Dispose (line 17) | void IDisposable.Dispose() {
    method StartReplaceInFiles (line 27) | public void StartReplaceInFiles() {
    method FinishReplaceInFiles (line 45) | public void FinishReplaceInFiles(string operationDescription) {
    method RifAddFile (line 71) | public void RifAddFile(SciCode doc, string oldText, string newText, Li...
    method RifAddFile (line 81) | public void RifAddFile(FileNode f, string oldText, string newText, Lis...
    method _RifUndoRedo (line 126) | bool _RifUndoRedo(bool redo, int id) {
    method UndoRedo (line 203) | public void UndoRedo(bool redo) {
    method _UndoRedo (line 217) | static void _UndoRedo(SciCode doc, bool redo, int mark) {
    method UndoRedoMultiFileReplace (line 221) | public void UndoRedoMultiFileReplace(bool redo) {
  class SciCode (line 228) | partial class SciCode {
    method ESetUndoMark_ (line 231) | internal void ESetUndoMark_(int mark) {
    method EGetUndoMark_ (line 242) | internal int EGetUndoMark_(bool redo) {
    method _ManageUndoOnModified (line 262) | void _ManageUndoOnModified(MOD mod) {
    method ENewUndoAction (line 286) | public EUndoAction ENewUndoAction(bool onUndoDontChangeCaretPos = fals...
    type EUndoAction (line 292) | public struct EUndoAction : IDisposable {
      method EUndoAction (line 301) | public EUndoAction(SciCode sci, bool onUndoDontChangeCaretPos = fals...
      method Dispose (line 310) | public void Dispose() {

FILE: Au.Editor/Files/DProperties.cs
  class DProperties (line 13) | class DProperties : KDialogWindow {
    method ShowFor (line 14) | public static void ShowFor(FileNode f) {
    method DProperties (line 34) | DProperties(FileNode f) {
    method OnSourceInitialized (line 207) | protected override void OnSourceInitialized(EventArgs e) {
    method _GetMeta (line 212) | void _GetMeta() {
    method _OkApply (line 269) | void _OkApply(WBButtonClickArgs e) {
    method _ButtonClick_addLibrary (line 276) | void _ButtonClick_addLibrary(WBButtonClickArgs e) {
    method _ButtonClick_addNuget (line 301) | void _ButtonClick_addNuget(WBButtonClickArgs e) {
    method _ButtonClick_addProject (line 317) | void _ButtonClick_addProject(WBButtonClickArgs e)
    method _ButtonClick_addClass (line 322) | void _ButtonClick_addClass(WBButtonClickArgs e) {
    method _ButtonClick_addFile (line 337) | void _ButtonClick_addFile(WBButtonClickArgs e) {
    method _AddFromWorkspace (line 368) | void _AddFromWorkspace(Func<FileNode, FileNode> filter, List<string> m...
    method _IconManifestSign_DropDownOpened (line 415) | void _IconManifestSign_DropDownOpened(object sender, EventArgs e) {
    method _bAddComBrowse_Click (line 427) | void _bAddComBrowse_Click(WBButtonClickArgs e) {
    method _bAddComRegistry_Click (line 452) | void _bAddComRegistry_Click(WBButtonClickArgs e) {
    method _ConvertTypeLibrary (line 482) | async void _ConvertTypeLibrary(object tlDef, Button button) {
    method _ShowHide (line 493) | static void _ShowHide(FrameworkElement e, bool show) => e.Visibility =...
    method _ShowCollapse (line 495) | static void _ShowCollapse(FrameworkElement e, bool show) => e.Visibili...
    method _ShowHide (line 497) | static void _ShowHide(bool show, params FrameworkElement[] a) {
    method _ShowCollapse (line 501) | static void _ShowCollapse(bool show, params FrameworkElement[] a) {
    method _IsHidden (line 505) | static bool _IsHidden(FrameworkElement t) {
    method _Get (line 511) | static string _Get(TextBox t, bool nullIfHidden = true) {
    method _Get (line 517) | static string _Get(ComboBox t, bool nullIfHidden = true, int? defaultI...
    method _Get (line 523) | static string _Get(KCheckBox t, bool nullIfHidden = true) {
    method _IsChecked (line 528) | static bool _IsChecked(KCheckBox t, bool falseIfHidden = true) {
    method _GetOutputPath (line 533) | string _GetOutputPath(bool getDefault, bool expandEnvVar = false) {
    method _ShowInfo_ListEmpty (line 542) | void _ShowInfo_ListEmpty(UIElement by, string sFind) {
    method _ShowInfo_Added (line 546) | void _ShowInfo_Added(UIElement by, List<string> metaList) {
    method _ShowInfoTooltip (line 550) | void _ShowInfoTooltip(UIElement by, string s) {
    method _InitInfo (line 559) | void _InitInfo() {

FILE: Au.Editor/Files/FileNode.cs
  class FileNode (line 7) | partial class FileNode : TreeBase<FileNode>, ITreeViewItem {
    type _State (line 11) | [Flags]
    type _Flags (line 17) | [Flags]
    method FileNode (line 40) | public FileNode(FilesModel model, string name, FNType type) {
    method FileNode (line 55) | public FileNode(FilesModel model, string name, string filePath, bool i...
    method FileNode (line 67) | FileNode(FilesModel model, FileNode f, string name) {
    method FileNode (line 81) | FileNode(XmlReader x, FileNode parent, FilesModel model) {
    method FileNode (line 95) | internal FileNode(XElement x, FilesModel model) {
    method _ReadXmlAttribute (line 102) | void _ReadXmlAttribute(string name, string value) {
    method _WorkspaceLoaded (line 114) | internal void _WorkspaceLoaded(uint id, bool importing) {
    method LoadWorkspace (line 128) | public static FileNode LoadWorkspace(string file, FilesModel model) {
    method SaveWorkspace (line 134) | public void SaveWorkspace(string file) => XmlSave(file, (x, n) => n._X...
    method _XmlWrite (line 136) | void _XmlWrite(XmlWriter x) {
    method Export (line 152) | public static void Export(FileNode fRoot, string file) {
    method FileNode (line 156) | FileNode() { }
    method CreateForExport (line 161) | public static FileNode CreateForExport() {
    method CreateForExport (line 169) | public static FileNode CreateForExport(string folderName) {
    method CreateForExport (line 178) | public static FileNode CreateForExport(FileNode f, bool exportLinkTarg...
    method _SetName (line 262) | void _SetName(string name) {
    method SciLink (line 291) | public string SciLink(bool path = false, int? lineOrPos = null) {
    method ItemPathIn (line 392) | public string ItemPathIn(FileNode ancestor) => _ItemPath(null, ancestor);
    method _ItemPath (line 394) | [SkipLocalsInit]
    method ItemPathOrName (line 440) | public string ItemPathOrName() {
    method ItemPathOrName (line 452) | public string ItemPathOrName(FileNode relativeTo, FNFind kind = FNFind...
    method ToString (line 465) | public override string ToString() => _name;
    method GetCurrentText (line 482) | public BoolError GetCurrentText(out string text, bool? silent = false) {
    method GetFileText (line 494) | public BoolError GetFileText(out string text, bool? silent = false) {
    method GetFileTextLL (line 539) | public static string GetFileTextLL(string filePath) {
    method _UpdateFileModTime (line 555) | internal void _UpdateFileModTime() {
    method _CheckModifiedExternally (line 559) | internal void _CheckModifiedExternally(SciCode doc) {
    method ReplaceAllInText (line 576) | public bool ReplaceAllInText(string text, List<StartEndText> a, out st...
    method SaveNewTextOfClosedFile (line 609) | public void SaveNewTextOfClosedFile(string text) {
    method SetIsExpanded (line 641) | public void SetIsExpanded(bool yes) { if (yes != _isExpanded) { _isExp...
    method SetNewText (line 645) | void ITreeViewItem.SetNewText(string text) { FileRename(text); }
    method GetFileTypeImageSource (line 647) | public static string GetFileTypeImageSource(FNType ft, bool openFolder...
    method Color (line 665) | int ITreeViewItem.Color(TVColorInfo ci) => ci.isTextBlack && !IsFolder...
    method TextColor (line 667) | int ITreeViewItem.TextColor(TVColorInfo ci) => _model.IsCut(this) ? 0x...
    method BorderColor (line 669) | int ITreeViewItem.BorderColor(TVColorInfo ci) => this == _model.Curren...
    method SelectSingle (line 679) | public void SelectSingle() {
    method UpdateControlRow (line 693) | public void UpdateControlRow() => TreeControl.Redraw(this);
    method FindDescendant (line 705) | public FileNode FindDescendant(string name, FNFind kind = FNFind.Any) {
    method _FindIn (line 711) | static FileNode _FindIn(IEnumerable<FileNode> e, RStr name, FNFind kin...
    method _FindRelative (line 722) | FileNode _FindRelative(string name, FNFind kind, bool orAnywhere = fal...
    method FindRelative (line 769) | public FileNode FindRelative(bool orAnywhere, string relativePath, FNF...
    method FindAllDescendantFiles (line 793) | public FileNode[] FindAllDescendantFiles(string name) {
    method DescendantsExceptGarbage (line 808) | public IEnumerable<FileNode> DescendantsExceptGarbage() {
    method FindProject (line 828) | public bool FindProject(out FileNode folder, out FileNode main, bool o...
    method GetProjectMainOrThis (line 846) | public FileNode GetProjectMainOrThis(bool ofAnyScript = false) {
    method IsProjectFolder (line 857) | public bool IsProjectFolder(out FileNode main) {
    method EnumProjectClassFiles (line 867) | public IEnumerable<FileNode> EnumProjectClassFiles(FileNode fSkip = nu...
    method GetClassFileRole (line 878) | public FNClassFileRole GetClassFileRole(bool preferApp = false) {
    method IsExecutableDirectly (line 907) | public bool IsExecutableDirectly() {
    method CreateNameUniqueInFolder (line 920) | public static string CreateNameUniqueInFolder(FileNode folder, string ...
    class Templates (line 950) | public static class Templates {
      method FileName (line 954) | public static string FileName(ETempl templ) => templ switch { ETempl...
      method FilePathRaw (line 956) | public static string FilePathRaw(ETempl templ, bool user) => (user ?...
      method FilePathReal (line 958) | public static string FilePathReal(ETempl templ, bool? user = null) {
      method Load (line 965) | public static string Load(ETempl templ, bool? user = null) {
      method IsStandardTemplateName (line 969) | public static bool IsStandardTemplateName(string template, out ETemp...
      method LoadXml (line 984) | public static XElement LoadXml(string template = null) {
      method IsInDefault (line 1004) | public static bool IsInDefault(XElement x) => x.Ancestors().Any(o =>...
    type ETempl (line 1007) | [Flags]
    method FileRename (line 1024) | public bool FileRename(string name, bool syncing = false) {
    method RenameL_ (line 1047) | internal bool RenameL_(string name) {
    method CanMove (line 1063) | public bool CanMove(FNInsertPos ipos) {
    method FileMove (line 1087) | public bool FileMove(FNInsertPos ipos) {
    method Common_MoveCopyNew (line 1110) | public void Common_MoveCopyNew(FNInsertPos ipos, bool moving) {
    method AddToTree (line 1123) | public void AddToTree(FNInsertPos ipos) {
    method _FileCopy (line 1136) | internal FileNode _FileCopy(FNInsertPos ipos, FilesModel model, bool c...
    method XmlTagToFileType (line 1183) | public static FNType XmlTagToFileType(string tag, bool canThrow) => ta...
    method _DetectFileType (line 1196) | static FNType _DetectFileType(string path) {

FILE: Au.Editor/Files/Files+.cs
  type FNType (line 11) | enum FNType : byte {
  type FNInsert (line 18) | enum FNInsert { Last, First, Before, After }
  type FNInsertPos (line 20) | record struct FNInsertPos(FileNode f, FNInsert pos) {
  type FNFind (line 25) | enum FNFind {
  type FNClassFileRole (line 29) | enum FNClassFileRole {
  class NewFileText (line 40) | class NewFileText {
    method NewFileText (line 44) | public NewFileText() { }
    method NewFileText (line 46) | public NewFileText(bool replaceTemplate, string text, string meta = nu...
  class DNewWo
Copy disabled (too large) Download .json
Condensed preview — 768 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (12,216K chars).
[
  {
    "path": ".editorconfig",
    "chars": 535,
    "preview": "[*.{cs,vb}]\n\n# IDE0032: Use auto property\ndotnet_style_prefer_auto_properties = false:silent\n\n# CA1416: Validate platfor"
  },
  {
    "path": ".gitattributes",
    "chars": 1696,
    "preview": "###############################################################################\n# Set default behavior to automatically "
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 15,
    "preview": "github: qgindi\n"
  },
  {
    "path": ".gitignore",
    "chars": 3665,
    "preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User"
  },
  {
    "path": "Au/Api/Api.cs",
    "chars": 59782,
    "preview": "//[assembly: DefaultDllImportSearchPaths(DllImportSearchPath.System32|DllImportSearchPath.UserDirectories)]\n\n#pragma war"
  },
  {
    "path": "Au/Api/Api^kernel32.cs",
    "chars": 48363,
    "preview": "namespace Au.Types;\n\nstatic unsafe partial class Api {\n\t[DllImport(\"kernel32.dll\", SetLastError = true)] //note: without"
  },
  {
    "path": "Au/Api/Api^user32.cs",
    "chars": 66738,
    "preview": "namespace Au.Types;\n\n//#pragma warning disable 649 //field never assigned\n\nstatic unsafe partial class Api {\n\t[DllImport"
  },
  {
    "path": "Au/Api/Api_COM.cs",
    "chars": 7863,
    "preview": "namespace Au.Types;\n\nstatic unsafe partial class Api {\n\tinternal struct STRRET {\n\t\tpublic uint uType;\n\n\t\t[StructLayout(L"
  },
  {
    "path": "Au/Api/Api_UIA.cs",
    "chars": 30889,
    "preview": "namespace Au.Types;\n\n/// <summary>\n/// Wraps some UI Automation API.\n/// </summary>\nstatic class UiaUtil {\n\tpublic stati"
  },
  {
    "path": "Au/Api/Api_const.cs",
    "chars": 24458,
    "preview": "//Windows API constants common to multiple API functions, such as WM_, WS_, errors.\n\nnamespace Au.Types;\n\nstatic unsafe "
  },
  {
    "path": "Au/Api/Api_public.cs",
    "chars": 7978,
    "preview": "#pragma warning disable 649, 169 //field never assigned/used\n#pragma warning disable 1591 //missing XML documentation\n\nn"
  },
  {
    "path": "Au/Api/Cpp.cs",
    "chars": 12776,
    "preview": "using static Au.Types.GWL;\n\nnamespace Au.Types;\n\n[DebuggerStepThrough]\nstatic unsafe partial class Cpp {\n\tstatic List<(s"
  },
  {
    "path": "Au/Api/WinRT.cs",
    "chars": 7928,
    "preview": "//WinRT common API and utils. Others are in files where used.\n\n//This library does not use C#/WinRT (Microsoft.Windows.S"
  },
  {
    "path": "Au/Au.More/AppSingleInstance.cs",
    "chars": 3339,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Implements \"single instance process\" feature.\n/// </summary>\n/// <example>\n/// <co"
  },
  {
    "path": "Au/Au.More/BufferedPaint.cs",
    "chars": 3493,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Wraps buffered paint API <ms>BeginBufferedPaint</ms> etc.\n/// Must be disposed loc"
  },
  {
    "path": "Au/Au.More/CheckListDialog.cs",
    "chars": 5564,
    "preview": "using System.Windows;\nusing System.Windows.Controls;\nusing System.Collections;\n\nnamespace Au.More;\n\n/// <summary>\n/// Di"
  },
  {
    "path": "Au/Au.More/ComUtil.cs",
    "chars": 6090,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// COM utility functions.\n/// </summary>\npublic static class ComUtil {\n\t/// <summary>"
  },
  {
    "path": "Au/Au.More/Convert2.cs",
    "chars": 24959,
    "preview": "using System.IO.Compression;\nusing System.Security.Cryptography;\n\nnamespace Au.More;\n\n/// <summary>\n/// Data conversion "
  },
  {
    "path": "Au/Au.More/DebugTraceListener.cs",
    "chars": 2911,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Replaces the default trace listener with a listener that shows a message box on a "
  },
  {
    "path": "Au/Au.More/Dpi.cs",
    "chars": 21518,
    "preview": "namespace Au.More {\n\t/// <summary>\n\t/// Functions for high-DPI screen support.\n\t/// </summary>\n\t/// <remarks>\n\t/// To fi"
  },
  {
    "path": "Au/Au.More/FastBuffer.cs",
    "chars": 11335,
    "preview": "namespace Au.More {\n\t/// <summary>\n\t/// Memory buffer on stack with ability to expand and use heap memory.\n\t/// Can be u"
  },
  {
    "path": "Au/Au.More/FileOpenSaveDialog.cs",
    "chars": 19377,
    "preview": "namespace Au.More {\n\t/// <summary>\n\t/// Shows standard \"Open\", \"Save As\" or \"Select Folder\" dialog to select a file or f"
  },
  {
    "path": "Au/Au.More/GdiTextRenderer.cs",
    "chars": 5887,
    "preview": "//FUTURE: support columns. Maybe use \\t of specified widths.\n\nnamespace Au.More;\n#pragma warning disable CS1591 // Missi"
  },
  {
    "path": "Au/Au.More/Hash.cs",
    "chars": 12692,
    "preview": "using System.Security.Cryptography;\nusing System.Buffers.Text;\n\nnamespace Au.More;\n\n/// <summary>\n/// Data hash function"
  },
  {
    "path": "Au/Au.More/HelpUtil.cs",
    "chars": 2338,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Static functions to open a help topic etc.\n/// </summary>\npublic static class Help"
  },
  {
    "path": "Au/Au.More/HttpServerSession.cs",
    "chars": 31913,
    "preview": "using System.Net;\nusing System.Net.Sockets;\nusing System.Text.Json;\n\nnamespace Au.More {\n\t/// <summary>\n\t/// Simple HTTP"
  },
  {
    "path": "Au/Au.More/IconImageCache.cs",
    "chars": 19022,
    "preview": "//TODO2: 2025-11: often the main floating toolbar expands slowly. 2025-12: fast again.\n\nusing System.Drawing;\nusing Micr"
  },
  {
    "path": "Au/Au.More/ImageUtil.cs",
    "chars": 16689,
    "preview": "using System.Windows;\nusing System.Windows.Markup;\nusing System.Windows.Controls;\nusing System.Windows.Media;\nusing Syst"
  },
  {
    "path": "Au/Au.More/KeyToTextConverter.cs",
    "chars": 3754,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Converts virtual-key codes to text characters.\n/// </summary>\n/// <remarks>\n/// To"
  },
  {
    "path": "Au/Au.More/Math2.cs",
    "chars": 9363,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Simple calculation functions.\n/// </summary>\n//[DebuggerStepThrough]\npublic static"
  },
  {
    "path": "Au/Au.More/MemoryBitmap.cs",
    "chars": 3524,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Creates and manages native bitmap handle and memory DC (GDI device context).\n/// T"
  },
  {
    "path": "Au/Au.More/MemoryUtil.cs",
    "chars": 6590,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Allocates memory from native heap of this process using heap API.\n/// Also has mor"
  },
  {
    "path": "Au/Au.More/MenuItemInfo.cs",
    "chars": 3789,
    "preview": "namespace Au.More\n{\n\t/// <summary>\n\t/// Gets item id, text and other info of a classic menu.\n\t/// </summary>\n\tpublic cla"
  },
  {
    "path": "Au/Au.More/MouseCursor.cs",
    "chars": 6268,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Helps to load cursors, etc. Contains native cursor handle.\n/// </summary>\n/// <rem"
  },
  {
    "path": "Au/Au.More/RecordingUtil.cs",
    "chars": 2780,
    "preview": "namespace Au.More\n{\n\t/// <summary>\n\t/// Functions for keyboard/mouse/etc recorder tools.\n\t/// </summary>\n\tpublic static"
  },
  {
    "path": "Au/Au.More/ResourceUtil.cs",
    "chars": 11248,
    "preview": "using System.Resources;\nusing System.Windows.Media.Imaging;\nusing System.Windows.Markup;\nusing System.Windows;\nusing Sys"
  },
  {
    "path": "Au/Au.More/SecurityUtil.cs",
    "chars": 925,
    "preview": "namespace Au.More\n{\n\t/// <summary>\n\t/// Security-related functions, such as enabling privileges.\n\t/// </summary>\n\tpublic"
  },
  {
    "path": "Au/Au.More/WaitableTimer.cs",
    "chars": 3783,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Wraps a waitable timer handle.\n/// </summary>\n/// <remarks>\n/// More info: API <ms"
  },
  {
    "path": "Au/Au.More/WinEventHook.cs",
    "chars": 9100,
    "preview": "namespace Au.More {\n\t/// <summary>\n\t/// Helps with UI element event hooks. See API <ms>SetWinEventHook</ms>.\n\t/// </summ"
  },
  {
    "path": "Au/Au.More/WindowsHook.cs",
    "chars": 49525,
    "preview": "namespace Au.More {\n\t/// <summary>\n\t/// Wraps API <ms>SetWindowsHookEx</ms>.\n\t/// </summary>\n\t/// <remarks>\n\t/// Hooks a"
  },
  {
    "path": "Au/Au.More/WinformsControlNames.cs",
    "chars": 4315,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Gets programming names of .NET Windows Forms controls.\n/// </summary>\n/// <remarks"
  },
  {
    "path": "Au/Au.Types/ColorInt.cs",
    "chars": 9389,
    "preview": "using System.Drawing;\nusing System.Text.Json.Serialization;\n\nnamespace Au.Types;\n\n//rejected: /// <completionlist cref=\""
  },
  {
    "path": "Au/Au.Types/JSettings.cs",
    "chars": 12389,
    "preview": "using System.Text.Json;\nusing System.Text.Json.Serialization;\n\nnamespace Au.Types;\n\n/// <summary>\n/// Base of record cla"
  },
  {
    "path": "Au/Au.Types/TreeBase.cs",
    "chars": 16180,
    "preview": "using System.Xml;\n\nnamespace Au.Types;\n\n/// <summary>\n/// Base class for tree classes.\n/// The tree can be loaded/saved "
  },
  {
    "path": "Au/Au.Types/common.cs",
    "chars": 5844,
    "preview": "using System.Diagnostics.CodeAnalysis;\nusing static Au.More.Serializer_;\n\nnamespace Au.Types {\n\t/// <summary>\n\t/// In Do"
  },
  {
    "path": "Au/Au.Types/exceptions.cs",
    "chars": 9295,
    "preview": "namespace Au.Types {\n\t/// <summary>\n\t/// The base exception class used in this library.\n\t/// Thrown when something fails"
  },
  {
    "path": "Au/Au.Types/param types.cs",
    "chars": 19098,
    "preview": "namespace Au.Types;\n\n#if false //test docfx preprocessing\n/// <summary>\n/// Sum.\n/// two\n/// </summary>\n/// <param name="
  },
  {
    "path": "Au/Au.Types/structs.cs",
    "chars": 24182,
    "preview": "using System.Drawing;\nusing System.Text.Json.Serialization;\n\nnamespace Au.Types {\n\t/// <summary>\n\t/// Point coordinates "
  },
  {
    "path": "Au/Au.Types/unused/AuClassless.cs",
    "chars": 428,
    "preview": "//rejected\n//namespace Au.Types\n//{\n//\t/// <summary>\n//\t/// Contains functions of this library that can be called witho"
  },
  {
    "path": "Au/Au.cs",
    "chars": 470,
    "preview": "/*/\nrole classLibrary;\ndefine IDE_LA,AU,NO_GLOBAL,NO_DEFAULT_CHARSET_UNICODE;\nnoWarnings 419,649;\npreBuild ..\\@Au.Editor"
  },
  {
    "path": "Au/Au.csproj",
    "chars": 3264,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n\t<PropertyGroup>\n\t\t<TargetFramework>net10.0-windows</TargetFramework>\n\t\t<UseWindowsFo"
  },
  {
    "path": "Au/Ext/Bitmap.Resize.cs",
    "chars": 14306,
    "preview": "//The main code is from FreeImage sources.\n\nusing System.Drawing;\nusing System.Drawing.Imaging;\n\nnamespace Au.Types;\n\n//"
  },
  {
    "path": "Au/Ext/ExtMisc.cs",
    "chars": 30197,
    "preview": "//note: be careful when adding functions to this class. Eg something may load winforms dlls although it seems not used.\n"
  },
  {
    "path": "Au/Ext/ExtWpf.cs",
    "chars": 31160,
    "preview": "using System.Windows;\nusing System.Windows.Controls.Primitives;\nusing System.Windows.Interop;\nusing System.Windows.Contr"
  },
  {
    "path": "Au/Ext/ExtXml.cs",
    "chars": 15125,
    "preview": "\nusing System.Xml.Linq;\nusing System.Xml;\n\nnamespace Au.Types {\n\t/// <summary>\n\t/// Adds extension methods for <see cref"
  },
  {
    "path": "Au/Files, data/ExplorerFolder.cs",
    "chars": 9903,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// File Explorer folder window functions.\n/// </summary>\npublic class ExplorerFolder "
  },
  {
    "path": "Au/Files, data/FileSystemRedirection.cs",
    "chars": 3138,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// File system redirection functions. Can temporarily disable redirection, to allow t"
  },
  {
    "path": "Au/Files, data/FileTree.cs",
    "chars": 5120,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Contains file infos of this and descendant folders and files retrieved by <see cre"
  },
  {
    "path": "Au/Files, data/FileWatcher.cs",
    "chars": 7504,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Watches a file for external changes. An external change is when another process wr"
  },
  {
    "path": "Au/Files, data/Pidl.cs",
    "chars": 12591,
    "preview": "namespace Au.Types;\n\n/// <summary>\n/// Manages an <ms>ITEMIDLIST</ms> structure that is used to identify files and other"
  },
  {
    "path": "Au/Files, data/TempFile.cs",
    "chars": 1897,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Creates unique name for a temporary file and later auto-deletes the file.\n/// </su"
  },
  {
    "path": "Au/Files, data/filesystem-types.cs",
    "chars": 16654,
    "preview": "\nnamespace Au.Types;\n\n/// <summary>\n/// File system entry type - file, directory, NTFS link, whether it exists and is ac"
  },
  {
    "path": "Au/Files, data/filesystem.cs",
    "chars": 71704,
    "preview": "\n//#define TEST_FINDFIRSTFILEEX\n\nusing Microsoft.Win32;\n\nnamespace Au;\n\n/// <summary>\n/// File and directory functions. "
  },
  {
    "path": "Au/Files, data/filesystem.more.cs",
    "chars": 26835,
    "preview": "namespace Au;\n\npartial class filesystem {\n\t/// <summary>\n\t/// Miscellaneous rarely used file/directory functions.\n\t/// <"
  },
  {
    "path": "Au/Files, data/folders.cs",
    "chars": 56527,
    "preview": "#pragma warning disable 1591 //missing XML documentation\n\nnamespace Au {\n\t/// <summary>\n\t/// Gets known/special folder p"
  },
  {
    "path": "Au/Files, data/icon.cs",
    "chars": 41344,
    "preview": "using System.Drawing;\nusing System.Reflection.Emit;\n\nnamespace Au {\n\t/// <summary>\n\t/// Gets icons from/of files etc. Co"
  },
  {
    "path": "Au/Files, data/pathname.cs",
    "chars": 36878,
    "preview": "//tested: System.IO.Path functions improved in Core.\n//\tNo exceptions if path contains invalid characters. Although the "
  },
  {
    "path": "Au/Files, data/shortcutFile.cs",
    "chars": 14057,
    "preview": "namespace Au {\n\t/// <summary>\n\t/// Creates shell shortcuts (<c>.lnk</c> files) and gets shortcut properties.\n\t/// </summ"
  },
  {
    "path": "Au/Files, data/sqlite.cs",
    "chars": 44677,
    "preview": "namespace Au {\n\t/// <summary>\n\t/// A SQLite database connection.\n\t/// Creates/opens/closes database file or in-memory da"
  },
  {
    "path": "Au/Files, data/sqlite_api.cs",
    "chars": 38998,
    "preview": "using System.IO.Compression;\n\nnamespace Au.Types;\n\n#region enum\n\n//Most of these declarations are from System.Data.SQLit"
  },
  {
    "path": "Au/GUI/EnumUI.cs",
    "chars": 6119,
    "preview": "using System.Windows;\nusing System.Windows.Controls;\nusing System.Windows.Controls.Primitives;\nnamespace Au.More;\n\n/// <"
  },
  {
    "path": "Au/GUI/dialog-static.cs",
    "chars": 19677,
    "preview": "namespace Au;\n\npublic partial class dialog {\n\t#region Show\n\t\n\t/// <summary>\n\t/// Shows dialog.\n\t/// </summary>\n\t/// <ret"
  },
  {
    "path": "Au/GUI/dialog-types.cs",
    "chars": 17843,
    "preview": "#pragma warning disable 649 //unused fields in API structs\n\nnamespace Au.Types {\n\t/// <summary>\n\t/// Text for <see cref="
  },
  {
    "path": "Au/GUI/dialog-x-obsolete.cs",
    "chars": 10724,
    "preview": "//info: the \"x\" in filename is for DocFX to correctly resolve links (changes file processing order).\n\n#if !DEBUG && NET9"
  },
  {
    "path": "Au/GUI/dialog.cs",
    "chars": 52712,
    "preview": "//rejected: by default show dialog in screen of mouse, like with <c>dialog.options.defaultScreen = screen.ofMouse;</c>.\n"
  },
  {
    "path": "Au/GUI/osd.cs",
    "chars": 37533,
    "preview": "using System.Drawing;\n\nnamespace Au.Types {\n\t/// <summary>\n\t/// Transparent window that can be used for on-screen displa"
  },
  {
    "path": "Au/GUI/popupMenu/MTBase.cs",
    "chars": 14673,
    "preview": "using System.Drawing;\n\nnamespace Au.Types;\n\n/// <summary>\n/// Base class of <see cref=\"popupMenu\"/> and <see cref=\"toolb"
  },
  {
    "path": "Au/GUI/popupMenu/pm acc.cs",
    "chars": 4548,
    "preview": "\nusing IAccessible = Au.Types.Api.IAccessible;\nusing VarInt = Au.Types.Api.VarInt;\nusing NAVDIR = Au.Types.Api.NAVDIR;\n\n"
  },
  {
    "path": "Au/GUI/popupMenu/pm render.cs",
    "chars": 10490,
    "preview": "using System.Drawing;\nusing System.Drawing.Drawing2D;\n\nnamespace Au;\n\npublic unsafe partial class popupMenu {\n\t/// <summ"
  },
  {
    "path": "Au/GUI/popupMenu/pm types.cs",
    "chars": 4735,
    "preview": "\nnamespace Au.Types;\n\n/// <summary>\n/// Represents a menu item in <see cref=\"popupMenu\"/>.\n/// </summary>\n/// <remarks>\n"
  },
  {
    "path": "Au/GUI/popupMenu/popupMenu.cs",
    "chars": 40298,
    "preview": "//TODO3: winevents EEvent.SYSTEM_MENUSTART, EEvent.SYSTEM_MENUEND, EEvent.SYSTEM_MENUPOPUPSTART, EEvent.SYSTEM_MENUPOPUP"
  },
  {
    "path": "Au/GUI/toolbar/tb acc.cs",
    "chars": 3659,
    "preview": "using IAccessible = Au.Types.Api.IAccessible;\nusing VarInt = Au.Types.Api.VarInt;\nusing NAVDIR = Au.Types.Api.NAVDIR;\n\nn"
  },
  {
    "path": "Au/GUI/toolbar/tb dialog.cs",
    "chars": 3923,
    "preview": "//TODO2: sometimes the first time shows the window with several s delay. Can't repro, even after reboot. Possibly more l"
  },
  {
    "path": "Au/GUI/toolbar/tb man.cs",
    "chars": 26533,
    "preview": "namespace Au;\n\npublic partial class toolbar {\n\tclass _OwnerWindow {\n\t\tpublic readonly List<toolbar> a = [];\n\t\tpublic rea"
  },
  {
    "path": "Au/GUI/toolbar/tb render.cs",
    "chars": 12813,
    "preview": "using System.Drawing;\nusing System.Drawing.Drawing2D;\n\nnamespace Au;\n\npublic partial class toolbar {\n\t/// <summary>\n\t///"
  },
  {
    "path": "Au/GUI/toolbar/tb sat.cs",
    "chars": 9597,
    "preview": "using Au.Triggers;\n\nnamespace Au;\n\npublic partial class toolbar {\n\ttoolbar _satellite;\n\ttoolbar _satPlanet;\n\tbool _satVi"
  },
  {
    "path": "Au/GUI/toolbar/tb types.cs",
    "chars": 12075,
    "preview": "namespace Au.Types;\n\n/// <summary>\n/// Represents a button or separator in <see cref=\"toolbar\"/>.\n/// </summary>\n/// <re"
  },
  {
    "path": "Au/GUI/toolbar/tb util.cs",
    "chars": 3759,
    "preview": "namespace Au;\n\npublic partial class toolbar {\n#if DEBUG\n\t/// <summary>\n\t/// This is a debug-only function. Returns the c"
  },
  {
    "path": "Au/GUI/toolbar/toolbar.cs",
    "chars": 42668,
    "preview": "using Au.Triggers;\n\nnamespace Au;\n\n//rejected: warn if using common controls version 5. Eg tooltips don't work. The same"
  },
  {
    "path": "Au/GUI/trayIcon.cs",
    "chars": 13676,
    "preview": "namespace Au {\n\t/// <summary>\n\t/// Shows tray icon.\n\t/// </summary>\n\t/// <remarks>\n\t/// Wraps API <ms>Shell_NotifyIconW<"
  },
  {
    "path": "Au/GUI/wpf-types.cs",
    "chars": 22103,
    "preview": "using System.Windows;\nusing System.Windows.Controls;\nusing System.Windows.Controls.Primitives;\nusing System.Windows.Inpu"
  },
  {
    "path": "Au/GUI/wpfBuilder.cs",
    "chars": 133643,
    "preview": "using System.Windows;\nusing System.Windows.Controls;\nusing System.Windows.Controls.Primitives;\nusing System.Windows.Docu"
  },
  {
    "path": "Au/Input/RegisteredHotkey.cs",
    "chars": 4967,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Registers a hotkey using API <ms>RegisterHotKey</ms>. Unregisters when disposing.\n"
  },
  {
    "path": "Au/Input/clipboard.cs",
    "chars": 36594,
    "preview": "namespace Au;\n\n/// <summary>\n/// Clipboard functions. Copy, paste, get and set clipboard text and other data.\n/// </summ"
  },
  {
    "path": "Au/Input/clipboardData.cs",
    "chars": 29995,
    "preview": "\n//#define SUPPORT_RAW_HANDLE\n\nusing System.Drawing;\nusing System.Drawing.Imaging;\n\nnamespace Au {\n\t/// <summary>\n\t/// S"
  },
  {
    "path": "Au/Input/inputBlocker.cs",
    "chars": 11776,
    "preview": "namespace Au {\n\t/// <summary>\n\t/// Blocks keyboard and/or mouse input events from reaching applications.\n\t/// </summary>"
  },
  {
    "path": "Au/Input/keys.cs",
    "chars": 31554,
    "preview": "//TODO3: on exception release modifiers.\n\nnamespace Au;\n\n/// <summary>\n/// Keyboard functions. Send virtual keystrokes a"
  },
  {
    "path": "Au/Input/keys.more.cs",
    "chars": 15120,
    "preview": "namespace Au;\n\npartial class keys {\n\t/// <summary>\n\t/// Miscellaneous rarely used keyboard-related functions.\n\t/// </sum"
  },
  {
    "path": "Au/Input/keys_static.cs",
    "chars": 33210,
    "preview": "namespace Au;\n\npublic partial class keys {\n\t#region get key state\n\n\t/// <summary>\n\t/// Gets key states for using in UI c"
  },
  {
    "path": "Au/Input/keys_types.cs",
    "chars": 9145,
    "preview": "namespace Au.Types;\n\n#pragma warning disable 1591 //missing doc\n\n/// <summary>\n/// Modifier keys as flags.\n/// </summary"
  },
  {
    "path": "Au/Input/keys_util.cs",
    "chars": 21259,
    "preview": "namespace Au;\n\npublic partial class keys {\n\t/// <summary>\n\t/// Converts part of string to <see cref=\"KKey\"/>.\n\t/// The s"
  },
  {
    "path": "Au/Input/miscInfo.cs",
    "chars": 6676,
    "preview": "namespace Au;\n\n/// <summary>\n/// Contains functions to get miscellaneous info not found in other classes of this library"
  },
  {
    "path": "Au/Input/mouse.cs",
    "chars": 60528,
    "preview": "//TODO3: test how mouse moves through non-screen area between screens A and C when screen B is in between.\n//\tQM2 has pr"
  },
  {
    "path": "Au/Input/mouse_types.cs",
    "chars": 7179,
    "preview": "namespace Au.Types;\n\n/// <summary>\n/// <i>button</i> parameter type for <see cref=\"mouse.clickEx(MButton, bool)\"/> and s"
  },
  {
    "path": "Au/Internal/ActCtx_.cs",
    "chars": 1335,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Activates our manifest which tells to use <c>comctl32.dll</c> version 6.\n/// The "
  },
  {
    "path": "Au/Internal/ArrayBuilder_.cs",
    "chars": 5453,
    "preview": "//CONSIDER: System.Buffers.ArrayPool<T>.\n\nnamespace Au.More;\n\n/// <summary>\n/// Like <c>List</c> or <c>StringBuilder</c>"
  },
  {
    "path": "Au/Internal/AssemblyUtil_.cs",
    "chars": 2488,
    "preview": "using System.Runtime.Loader;\n\nnamespace Au.More;\n\n/// <summary>\n/// Assembly functions.\n/// </summary>\ninternal static c"
  },
  {
    "path": "Au/Internal/AttachThreadInput_.cs",
    "chars": 1020,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Calls API <ms>AttachThreadInput</ms> to attach/detach thread input.\n/// Constructo"
  },
  {
    "path": "Au/Internal/Debug_.cs",
    "chars": 11263,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Functions useful to debug code.\n/// </summary>\n/// <remarks>\n/// The <c>Debug_.Pri"
  },
  {
    "path": "Au/Internal/GC_.cs",
    "chars": 2738,
    "preview": "namespace Au.More {\n\t/// <summary>\n\t/// <see cref=\"GC\"/> extensions.\n\t/// </summary>\n\tstatic class GC_ {\n\t\tstatic reado"
  },
  {
    "path": "Au/Internal/GDI misc.cs",
    "chars": 4985,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Helps to get and release screen DC with <c>using</c>.\n/// Uses API GetDC and Relea"
  },
  {
    "path": "Au/Internal/Handle_.cs",
    "chars": 3763,
    "preview": "\nusing Microsoft.Win32.SafeHandles;\n\nnamespace Au.More;\n\n/// <summary>\n/// Manages a kernel handle.\n/// Must be disposed"
  },
  {
    "path": "Au/Internal/ILReader.cs",
    "chars": 17524,
    "preview": "\n//https://stackoverflow.com/questions/14243284/how-can-i-retrieve-string-literals-using-reflection\n\n//#define FULL\n\nusi"
  },
  {
    "path": "Au/Internal/IconString_.cs",
    "chars": 8352,
    "preview": "using System.Windows;\nusing System.Windows.Media;\n\nnamespace Au.More;\n\n/// <summary>\n/// Parses XAML icon strings like <"
  },
  {
    "path": "Au/Internal/Jit_.cs",
    "chars": 2648,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// JIT-compiles methods.\n/// </summary>\nstatic class Jit_ {\n\tconst BindingFlags c_bi"
  },
  {
    "path": "Au/Internal/LaDebugger_.cs",
    "chars": 1090,
    "preview": "namespace Au.More;\n\nclass LaDebugger_ {\n\t//Called by netcoredbg as a breakpoint condition when specified Message.\n\tstati"
  },
  {
    "path": "Au/Internal/LineWriter_.cs",
    "chars": 2689,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// <see cref=\"TextWriter\"/> optimized for writing full lines.\n/// </summary>\n/// <re"
  },
  {
    "path": "Au/Internal/MiniProgram_.cs",
    "chars": 13123,
    "preview": "//PROBLEM: slow startup.\n//A minimal script starts in 70-100 ms cold, 40 hot (old PC, tested long time ago). Now on new "
  },
  {
    "path": "Au/Internal/NamespaceDoc.cs",
    "chars": 847,
    "preview": "\n//These are not supported by DocFX, but used for code info.\n//rejected. Now code info for namespaces does not work.\n\n//"
  },
  {
    "path": "Au/Internal/NativeFont_.cs",
    "chars": 3304,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Creates and manages native font handle.\n/// </summary>\ninternal sealed class Nati"
  },
  {
    "path": "Au/Internal/NativeScrollbar_.cs",
    "chars": 6125,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Manages native vertical or horizontal scrollbar of a window.\n/// </summary>\ninter"
  },
  {
    "path": "Au/Internal/NativeThread_.cs",
    "chars": 3342,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Represents a thread created using API <c>CreateThread</c>.\n/// Use when need threa"
  },
  {
    "path": "Au/Internal/PostToThisThread_.cs",
    "chars": 1208,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Executes actions in same UI thread as ctor.\n/// Use <see cref=\"OfThisThread\"/>. C"
  },
  {
    "path": "Au/Internal/ProcessStarter_.cs",
    "chars": 11016,
    "preview": "using Microsoft.Win32.SafeHandles;\n\nnamespace Au.More;\n\nunsafe struct ProcessStarter_ {\n\tpublic char[] cl;\n\tpublic Api.S"
  },
  {
    "path": "Au/Internal/Ptr_.cs",
    "chars": 1957,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// String functions for unmanaged <c>char*</c> or <c>byte*</c> strings.\n/// </summary"
  },
  {
    "path": "Au/Internal/Serializer_.cs",
    "chars": 5064,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Binary-serializes and deserializes multiple values of types <c>int</c>, <c>string"
  },
  {
    "path": "Au/Internal/SharedMemory_.cs",
    "chars": 4338,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Memory shared by all processes using this library.\n/// </summary>\n[StructLayout(La"
  },
  {
    "path": "Au/Internal/StaTaskScheduler_.cs",
    "chars": 3808,
    "preview": "//\n// Copyright (c) Microsoft. All rights reserved.\n// Licensed under the MIT license. See LICENSE.md file in the projec"
  },
  {
    "path": "Au/Internal/StringBuilder_.cs",
    "chars": 1698,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Provides a cached reusable instance of <c>StringBuilder</c> per thread. It's an o"
  },
  {
    "path": "Au/Internal/Util_.cs",
    "chars": 2663,
    "preview": "using System.Windows;\n\nnamespace Au.More;\n\nstatic unsafe class Not_ {\n\t//internal static void NullCheck<T>(this T t, str"
  },
  {
    "path": "Au/Internal/misc_.cs",
    "chars": 1008,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Dictionary with case-insensitive string keys (uses <see cref=\"StringComparer.Ordin"
  },
  {
    "path": "Au/Internal/tables.cs",
    "chars": 1195,
    "preview": "namespace Au.More\n{\n\t/// <summary>\n\t/// Lookup tables for various functions of this library.\n\t/// </summary>\n\tunsafe sta"
  },
  {
    "path": "Au/Other/PrintServer.cs",
    "chars": 23567,
    "preview": "//#define NEED_CALLER //rejected. Too slow and generates much garbage.\n\n/*\nSingle global server is supported in this use"
  },
  {
    "path": "Au/Other/ScriptEditor.cs",
    "chars": 13075,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Contains functions to interact with the script editor, if available.\n/// </summary"
  },
  {
    "path": "Au/Other/internet.cs",
    "chars": 39902,
    "preview": "using System.Net.NetworkInformation;\nusing System.Net.Http;\nusing System.Net.Http.Json;\nusing System.Net.Http.Headers;\nu"
  },
  {
    "path": "Au/Other/lastError.cs",
    "chars": 3405,
    "preview": "namespace Au {\n\t/// <summary>\n\t/// Gets, sets or clears the last error code of Windows API. Gets error text.\n\t/// </summ"
  },
  {
    "path": "Au/Other/opt.cs",
    "chars": 38750,
    "preview": "namespace Au {\n\t/// <summary>\n\t/// Ambient options for some functions of this library.\n\t/// </summary>\n\t/// <remarks>\n\t/"
  },
  {
    "path": "Au/Other/print.cs",
    "chars": 27388,
    "preview": "using COL = System.Collections;\n\nnamespace Au;\n\n/// <summary>\n/// Writes text to the output window, console, log file or"
  },
  {
    "path": "Au/Other/screen.cs",
    "chars": 20171,
    "preview": "namespace Au {\n\t/// <summary>\n\t/// Represents a screen device. Gets its rectangle etc.\n\t/// </summary>\n\t/// <remarks>\n\t/"
  },
  {
    "path": "Au/Other/script+.cs",
    "chars": 6339,
    "preview": "using System.Text.Json;\n\nnamespace Au.Types {\n\t/// <summary>\n\t/// <see cref=\"script.role\"/>.\n\t/// </summary>\n\tpublic enu"
  },
  {
    "path": "Au/Other/script.cs",
    "chars": 52349,
    "preview": "namespace Au;\n\n/// <summary>\n/// Script task functions. Run, get properties, set options, etc.\n/// A script task is a ru"
  },
  {
    "path": "Au/Resources/AssemblyInfo.cs",
    "chars": 2379,
    "preview": "\n[assembly: AssemblyTitle(\"Au\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n//more in glo"
  },
  {
    "path": "Au/String/ExtString.cs",
    "chars": 74684,
    "preview": "//FUTURE: now in intellisense RStr methods are mixed with that of string. Many of them are not useful. Maybe .NET 10 or "
  },
  {
    "path": "Au/String/SegParser.cs",
    "chars": 6508,
    "preview": "//Modified version of Microsoft.Extensions.Primitives.StringSegment. It is from github; current .NET does not have it, n"
  },
  {
    "path": "Au/String/StringUtil.cs",
    "chars": 11699,
    "preview": "using System.Text.Json;\n\nnamespace Au.More;\n\n/// <summary>\n/// Miscellaneous rarely used string functions. Parsing etc.\n"
  },
  {
    "path": "Au/String/csvTable.cs",
    "chars": 27590,
    "preview": "namespace Au;\n\n/// <summary>\n/// Parses and composes CSV text. CSV table data in memory as a <c>List</c> of string array"
  },
  {
    "path": "Au/String/regexp.cs",
    "chars": 48216,
    "preview": "\nusing System.Text.RegularExpressions; //for XML doc links\n\nnamespace Au;\n\n/// <summary>\n/// PCRE regular expression.\n//"
  },
  {
    "path": "Au/String/regexp_ExtString.cs",
    "chars": 15905,
    "preview": "namespace Au.Types;\n\npublic static partial class ExtString {\n\t/// <summary>\n\t/// Returns <c>true</c> if this string matc"
  },
  {
    "path": "Au/String/regexp_types.cs",
    "chars": 34932,
    "preview": "\nusing System.Text.RegularExpressions; //for XML doc links\n\nnamespace Au.Types {\n\t/// <summary>\n\t/// Regular expression "
  },
  {
    "path": "Au/String/wildcard.cs",
    "chars": 16524,
    "preview": "using System.Text.RegularExpressions;\n\nnamespace Au {\n\t/// <summary>\n\t/// Parses and compares [wildcard expression](xref"
  },
  {
    "path": "Au/System/CpuUsage.cs",
    "chars": 6665,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Gets CPU usage.\n/// </summary>\n/// <remarks>\n/// You can use the static functions "
  },
  {
    "path": "Au/System/ProcessMemory.cs",
    "chars": 10176,
    "preview": "namespace Au.More;\n\n/// <summary>\n/// Allocates, writes and reads memory in other process.\n/// </summary>\n/// <remarks>\n"
  },
  {
    "path": "Au/System/computer.cs",
    "chars": 8080,
    "preview": "//FUTURE: GetCpuUsage.\n\nusing Microsoft.Win32;\n\nnamespace Au {\n\t/// <summary>\n\t/// Computer shutdown etc.\n\t/// </summary"
  },
  {
    "path": "Au/System/consoleProcess.cs",
    "chars": 17540,
    "preview": "namespace Au;\n\n/// <summary>\n/// Runs a console program in hidden mode. Gets its output text and can write input text.\n/"
  },
  {
    "path": "Au/System/osVersion.cs",
    "chars": 7138,
    "preview": "namespace Au;\n\n/// <summary>\n/// Provides Windows version info. Also some info about the current process (eg 32/64 bit) "
  },
  {
    "path": "Au/System/process.cs",
    "chars": 37234,
    "preview": "//#define USE_WTS\n\n//FUTURE: GetCpuUsage.\n\nnamespace Au {\n\t/// <summary>\n\t/// Process functions. Find, enumerate, get ba"
  },
  {
    "path": "Au/System/run.cs",
    "chars": 24947,
    "preview": "using Microsoft.Win32.SafeHandles;\n\nnamespace Au {\n\t/// <summary>\n\t/// Execute or open programs, files, folders, web pag"
  },
  {
    "path": "Au/System/sound.cs",
    "chars": 14242,
    "preview": "using Microsoft.Win32;\n\nnamespace Au {\n\t/// <summary>\n\t/// Plays short sounds and speaks text.\n\t/// </summary>\n\tpublic s"
  },
  {
    "path": "Au/System/uacInfo.cs",
    "chars": 12767,
    "preview": "namespace Au {\n\t/// <summary>\n\t/// Gets [](xref:uac) integrity level and other security info of this and other processes"
  },
  {
    "path": "Au/Time/WaitLoop.cs",
    "chars": 10179,
    "preview": "namespace Au.More {\n\t/// <summary>\n\t/// Can be used to easily implement \"wait for\" functions with a timeout.\n\t/// </summ"
  },
  {
    "path": "Au/Time/perf.cs",
    "chars": 14863,
    "preview": "//#define PREPAREMETHOD //now slow anyway. Does not JIT everything.\n\nnamespace Au {\n\t/// <summary>\n\t/// Code execution t"
  },
  {
    "path": "Au/Time/timer.cs",
    "chars": 9019,
    "preview": "namespace Au;\n\n/// <summary>\n/// Timer that calls callback function in same thread, which must have a message loop.\n/// "
  },
  {
    "path": "Au/Time/timer2.cs",
    "chars": 5196,
    "preview": "namespace Au;\n\n/// <summary>\n/// Timer that calls callback function in other thread (thread pool) and can be used in any"
  },
  {
    "path": "Au/Time/wait.cs",
    "chars": 16090,
    "preview": "namespace Au;\n\n/// <summary>\n/// Contains functions to wait for a custom condition, handle, etc, or simply sleep.\n/// </"
  },
  {
    "path": "Au/Time/wait_for.cs",
    "chars": 17403,
    "preview": "namespace Au {\n\tpublic static partial class wait {\n\t\t/// <summary>\n\t\t/// Waits for a user-defined condition. Until the c"
  },
  {
    "path": "Au/Triggers/Trigger.cs",
    "chars": 21179,
    "preview": "namespace Au.Triggers;\n\n/// <summary>\n/// Base of classes of all action trigger types.\n/// </summary>\npublic abstract cl"
  },
  {
    "path": "Au/Triggers/Triggers.cs",
    "chars": 28156,
    "preview": "namespace Au.Triggers;\n\n/// <summary>\n/// The main class of action triggers.\n/// </summary>\n/// <remarks>\n/// This class"
  },
  {
    "path": "Au/Triggers/TriggersListWindow.cs",
    "chars": 17655,
    "preview": "using Au.Triggers;\nusing System.Windows;\nusing System.Windows.Controls;\nusing System.Windows.Controls.Primitives;\nusing "
  },
  {
    "path": "Au/Triggers/Triggers_actions.cs",
    "chars": 18298,
    "preview": "namespace Au.Triggers;\n\nclass TOptions {\n\tpublic Action<TOBAArgs> before;\n\tpublic Action<TOBAArgs> after;\n\tpublic sbyte "
  },
  {
    "path": "Au/Triggers/Triggers_hooks.cs",
    "chars": 7070,
    "preview": "//Key/mouse/autotext triggers use low-level keyboard and mouse hooks. The hooks are in a separate thread, because:\n//\t1."
  },
  {
    "path": "Au/Triggers/Triggers_util.cs",
    "chars": 703,
    "preview": "namespace Au.Triggers;\n\nstatic class TrigUtil {\n\t/// <summary>\n\t/// Gets left and right modifiers. Uses <see cref=\"keys."
  },
  {
    "path": "Au/Triggers/Types/t-autotext.cs",
    "chars": 37621,
    "preview": "//CONSIDER: trigger type: When pressed CapsLock, eat trigger text. When triggered, turn off CapsLock.\n//\tTo cancel, user"
  },
  {
    "path": "Au/Triggers/Types/t-hotkey.cs",
    "chars": 13158,
    "preview": "//CONSIDER: AltGr generates RAlt+LCtrl. Should then ignore Ctrl?\n\nnamespace Au.Triggers;\n\n/// <summary>\n/// Flags of hot"
  },
  {
    "path": "Au/Triggers/Types/t-mouse.cs",
    "chars": 25182,
    "preview": "namespace Au.Triggers;\n\n/// <summary>\n/// Flags of mouse triggers.\n/// </summary>\n[Flags]\npublic enum TMFlags : byte {\n\t"
  },
  {
    "path": "Au/Triggers/Types/t-window.cs",
    "chars": 40276,
    "preview": "namespace Au.Triggers;\n\n/// <summary>\n/// Flags of window triggers.\n/// </summary>\n[Flags]\npublic enum TWFlags : byte {\n"
  },
  {
    "path": "Au/UI objects/CaptureScreen.cs",
    "chars": 34852,
    "preview": "using System.Drawing;\nusing System.Drawing.Imaging;\n\nnamespace Au.More {\n\t/// <summary>\n\t/// Contains functions and tool"
  },
  {
    "path": "Au/UI objects/OcrGoogleCloud.cs",
    "chars": 4426,
    "preview": "using System.Drawing;\nusing System.Text.Json.Nodes;\nusing System.Net.Http;\n\nnamespace Au.More;\n\n/// <summary>\n/// This O"
  },
  {
    "path": "Au/UI objects/OcrMicrosoftAzure.cs",
    "chars": 2913,
    "preview": "using System.Drawing;\nusing System.Text.Json.Nodes;\nusing System.Net.Http;\n\nnamespace Au.More;\n\n/// <summary>\n/// This O"
  },
  {
    "path": "Au/UI objects/OcrTesseract.cs",
    "chars": 3625,
    "preview": "using Microsoft.Win32;\nusing System.Drawing;\nusing System.Drawing.Imaging;\n\nnamespace Au.More;\n\n/// <summary>\n/// This O"
  },
  {
    "path": "Au/UI objects/OcrWin10.cs",
    "chars": 7659,
    "preview": "using System.Drawing;\nusing System.Drawing.Imaging;\n\nnamespace Au.More {\n\t/// <summary>\n\t/// The default OCR engine. Ava"
  },
  {
    "path": "Au/UI objects/elm.cs",
    "chars": 20241,
    "preview": "namespace Au;\n\n/// <summary>\n/// Represents a UI element. Clicks, gets properties, etc.\n/// </summary>\n/// <remarks>\n///"
  },
  {
    "path": "Au/UI objects/elmFinder.cs",
    "chars": 29819,
    "preview": "namespace Au;\n\n/// <summary>\n/// Finds UI elements (<see cref=\"elm\"/>). Contains name and other parameters of elements t"
  },
  {
    "path": "Au/UI objects/elm_func.cs",
    "chars": 83455,
    "preview": "//FUTURE: ChildFromXY. Like wnd.ChildFromXY. Use IAccessible.accHitTest.\n\nnamespace Au {\n\tpublic unsafe partial class el"
  },
  {
    "path": "Au/UI objects/elm_types.cs",
    "chars": 16401,
    "preview": "namespace Au.Types {\n\t/// <summary>\n\t/// Flags for \"find UI element\" functions (<see cref=\"elmFinder\"/>).\n\t/// </summary"
  },
  {
    "path": "Au/UI objects/ocr.cs",
    "chars": 14713,
    "preview": "using System.Drawing;\n\nnamespace Au;\n\n/// <summary>\n/// OCR functions. Recognizes text on screen or in image, gets word "
  },
  {
    "path": "Au/UI objects/ocrFinder.cs",
    "chars": 5652,
    "preview": "using System.Drawing;\nusing System.Drawing.Imaging;\nusing System.Text.RegularExpressions;\n\nnamespace Au;\n\n/// <summary>\n"
  },
  {
    "path": "Au/UI objects/ocr_types.cs",
    "chars": 5213,
    "preview": "using System.Drawing;\nusing System.Drawing.Imaging;\nusing System.Text.Json.Nodes;\n\nnamespace Au.Types;\n\n/// <summary>\n//"
  },
  {
    "path": "Au/UI objects/uiimage.cs",
    "chars": 16881,
    "preview": "using System.Drawing;\n\nnamespace Au;\n\n/// <summary>\n/// Captures, finds and clicks images and colors in windows.\n/// </s"
  },
  {
    "path": "Au/UI objects/uiimageFinder.cs",
    "chars": 22773,
    "preview": "//FUTURE: option to allow % of image completely different. Eg button with/without focus rectangle.\n//\tOr/and in the tool"
  },
  {
    "path": "Au/UI objects/uiimage_types.cs",
    "chars": 14133,
    "preview": "using System.Drawing;\n\nnamespace Au.Types;\n\n#pragma warning disable CS1591 // Missing XML comment for publicly visible t"
  },
  {
    "path": "Au/resources/global2.cs",
    "chars": 1365,
    "preview": "//This file is used by several projects: Au, Au.Controls, Au.Editor.\n\nglobal using Au;\nglobal using Au.Types;\nglobal usi"
  },
  {
    "path": "Au/wnd/WProp.cs",
    "chars": 3553,
    "preview": "namespace Au.Types\n{\n\t/// <summary>\n\t/// Sets, gets, removes and lists window properties using API <ms>SetProp</ms> and "
  },
  {
    "path": "Au/wnd/WTaskbarButton.cs",
    "chars": 4173,
    "preview": "namespace Au.Types;\n\n/// <summary>\n/// Taskbar button flash, progress, add/delete.\n/// </summary>\npublic unsafe class WT"
  },
  {
    "path": "Au/wnd/WndCopyData.cs",
    "chars": 10089,
    "preview": "namespace Au.More {\n\t/// <summary>\n\t/// Send/receive data to/from other process using message <ms>WM_COPYDATA</ms>.\n\t///"
  },
  {
    "path": "Au/wnd/WndSavedRect.cs",
    "chars": 8372,
    "preview": "//TODO3: it seems makes WPF window visible too early.\n//TODO3: if window not resizable, restore only position, not size."
  },
  {
    "path": "Au/wnd/WndUtil.cs",
    "chars": 40228,
    "preview": "namespace Au.More {\n\t/// <summary>\n\t/// Miscellaneous window-related functions. Rarely used in automation scripts.\n\t/// "
  },
  {
    "path": "Au/wnd/inactive/desktop.cs",
    "chars": 2760,
    "preview": "//rejected.\n//\tExisting functions are rarely used and can be invoked with hotkeys, eg Win+D = Show Desktop, Win+Tab = T"
  },
  {
    "path": "Au/wnd/wnd.cs",
    "chars": 128154,
    "preview": "namespace Au;\n\n/// <summary>\n/// A variable of <c>wnd</c> type represents a window or control. It is a window handle, al"
  },
  {
    "path": "Au/wnd/wndChildFinder.cs",
    "chars": 10385,
    "preview": "using static Au.wnd.Internal_;\n\nnamespace Au;\n\n/// <summary>\n/// Finds window controls (child windows). Contains name an"
  },
  {
    "path": "Au/wnd/wndFinder.cs",
    "chars": 16515,
    "preview": "using static Au.wnd.Internal_;\n\n//TODO3: if no name, prefer non-tooltip window. Now often finds tooltip instead of the w"
  }
]

// ... and 568 more files (download for full content)

About this extraction

This page contains the full source code of the qgindi/LibreAutomate GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 768 files (10.8 MB), approximately 2.9M tokens, and a symbol index with 11154 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!