From ffcb36523525eb3ff0df84b7ee5071c089f34cdd Mon Sep 17 00:00:00 2001 From: "Dan Thompson (SBS)" Date: Thu, 18 Jul 2019 19:03:03 -0700 Subject: [PATCH 1/4] Implement XTPUSHSGR, XTPOPSGR This change adds a new pair of methods to ITermDispatch: PushGraphicsRendition and PopGraphicsRendition, and then plumbs the change through AdaptDispatch, TerminalDispatch, ITerminalApi and TerminalApi. The stack logic is encapsulated in the SgrStack class, to allow it to be reused between the two APIs (AdaptDispatch and TerminalDispatch). Like xterm, only ten levels of nesting are supported. The stack is implemented as a "ring stack": if you push when the stack is full, the bottom of the stack will be dropped to make room. --- .github/actions/spelling/expect/expect.txt | 5758 +++++++++-------- src/buffer/out/TextAttribute.cpp | 26 + src/buffer/out/TextAttribute.hpp | 3 + src/cascadia/TerminalCore/ITerminalApi.hpp | 3 + src/cascadia/TerminalCore/Terminal.hpp | 7 + src/cascadia/TerminalCore/TerminalApi.cpp | 28 + .../TerminalCore/TerminalDispatch.hpp | 3 + .../TerminalCore/TerminalDispatchGraphics.cpp | 10 + src/terminal/adapter/DispatchTypes.hpp | 34 + src/terminal/adapter/ITermDispatch.hpp | 3 + src/terminal/adapter/adaptDispatch.hpp | 417 +- .../adapter/adaptDispatchGraphics.cpp | 45 + src/terminal/adapter/termDispatch.hpp | 3 + .../ut_adapter/Adapter.UnitTests.vcxproj | 3 + .../adapter/ut_adapter/adapterTest.cpp | 138 + .../parser/OutputStateMachineEngine.cpp | 13 + .../parser/OutputStateMachineEngine.hpp | 6 +- src/terminal/parser/telemetry.cpp | 2 + src/terminal/parser/telemetry.hpp | 2 + src/types/inc/sgrStack.hpp | 114 + src/types/lib/types.vcxproj | 2 + src/types/lib/types.vcxproj.filters | 6 + src/types/sgrStack.cpp | 231 + 23 files changed, 3772 insertions(+), 3085 deletions(-) create mode 100644 src/types/inc/sgrStack.hpp create mode 100644 src/types/sgrStack.cpp diff --git a/.github/actions/spelling/expect/expect.txt b/.github/actions/spelling/expect/expect.txt index 3df6051f12d..656747b4c30 100644 --- a/.github/actions/spelling/expect/expect.txt +++ b/.github/actions/spelling/expect/expect.txt @@ -1,2878 +1,2880 @@ -AAAAAABBBBBBCCC -AAAAABBBBBBBCCC -AAAAABBBBBBCCC -AAAAABCCCCCCCCC -AAAAADCCCCCCCCC -ABANDONFONT -abcd -ABCDEFGHIJKLMNO -ABCG -abf -abgr -abi -ACCESSTOKEN -acec -acf -acidev -ACIOSS -ACover -actctx -ACTCTXW -activatable -ACTIVEBORDER -ACTIVECAPTION -ADDALIAS -ADDB -ADDREF -addressof -ADDSTRING -ADDTOOL -aef -AEnd -AFew -AFill -AFX -AHelper -ahz -AImpl -AInplace -ALIGNRIGHT -alloc -allocing -alpc -ALTERNATENAME -ALTF -ALTNUMPAD -ALWAYSTIP -amd -ansd -ansicode -ansicpg -ANSISYS -ANSISYSRC -ANSISYSSC -antialias -antialiasing -ANull -anycpu -AOn -APARTMENTTHREADED -APCs -api -APIENTRY -apiset -apos -APPBARDATA -appconsult -APPICON -appium -applet -appletname -applicationmodel -APPLMODAL -appmodel -apps -APPWINDOW -appx -appxbundle -appxerror -appxmanifest -APrep -apsect -APSTUDIO -archeologists -architected -argb -argc -args -argv -ARRAYSIZE -ARROWKEYS -ASBRST -ASBSET -ASDF -asdfghjkl -ASetting -ASingle -asm -asmv -asmx -aspnet -aspx -astextplain -AStomps -ASYNCWINDOWPOS -atch -ATest -attr -ATTRCOLOR -aumid -Authenticode -AUTOBUDDY -AUTOCHECKBOX -autogenerated -autohide -AUTOHSCROLL -automagically -autopositioning -AUTORADIOBUTTON -autoscrolling -Autowrap -AVerify -AVI -awch -azuredevopspodcast -azurewebsites -azzle -backend -backgrounded -Backgrounder -backgrounding -backport -backstory -Batang -baz -Bazz -BBBBBCCC -BBBBCCCCC -BBDM -bbwe -bc -bcount -bcrypt -bcx -bcz -BEFOREPARENT -beginthread -bgcolor -bgfx -bgidx -Bgk -BGR -BGRA -BHID -biblioscape -bigobj -binplace -binplaced -bitcoin -bitcrazed -bitflag -bitmask -BITOPERATION -bitsavers -bitset -BKCOLOR -BKGND -Bksp -blog -Blt -BLUESCROLL -bmp -BOLDFONT -BOOLIFY -bools -boostorg -Borland -BOTTOMLEFT -BOTTOMRIGHT -boutput -BPBF -bpp -BPPF -branchconfig -BRK -Browsable -bsearch -BSODs -bstr -BTNFACE -buf -bufferout -buffersize -buflen -bugfix -buildtransitive -BUILDURI -burriter -BValue -byref -bytearray -bytebuffer -Cac -callee -cang -capslock -CARETBLINKINGENABLED -CARRIAGERETURN -cascadia -cassert -catid -cazamor -CBash -cbegin -cbiex -CBN -CBoolean -cbt -cbuffer -CCCBB -ccf -cch -CCHAR -cci -CCmd -ccolor -CCom -CComp -CConsole -CConversion -CCRT -cctype -CDATA -cdd -cdecl -CDeclaration -CEdit -CELLSIZE -cend -cerr -cfae -Cfg -cfie -cfiex -cfte -CFuzz -cgscrn -chafa -changelist -charinfo -charlespetzold -charset -CHARSETINFO -chcp -checkbox -checkboxes -chh -Childitem -chk -chrono -CHT -ci -Cic -cjk -ckuehl -cla -Clcompile -CLE -cleartype -CLICKACTIVE -clickdown -climits -clipbrd -CLIPCHILDREN -CLIPSIBLINGS -cliutils -clocale -closetest -cloudconsole -cls -CLSCTX -clsid -CLUSTERMAP -cmath -cmatrix -cmder -CMDEXT -Cmdlet -cmdline -CMOUSEBUTTONS -cmp -cmt -cmyk -CNL -cnt -CNTRL -codebase -Codeflow -codepage -codepath -codepoint -codeproject -COINIT -COLLECTIONURI -colorizing -colororacle -colorref -colorscheme -colorspaces -colorspec -colortable -colortbl -colortool -COLR -combaseapi -combobox -comctl -COMDAT -commandline -commctrl -commdlg -COMMITID -compat -componentization -conapi -conareainfo -conattrs -conbufferout -concat -concfg -conddkrefs -condrv -conechokey -conemu -config -configurability -conhost -conhostv -conime -conimeinfo -conint -conintegrity -conintegrityuwp -coninteractivitybase -coninteractivityonecore -coninteractivitywin -conio -coniosrv -CONKBD -conlibk -conmsgl -CONNECTINFO -CONOUT -conpixels -conprops -conpropsp -conpty -conptylib -conserv -consoleapi -CONSOLECONTROL -CONSOLEENDTASK -consolegit -consolehost -CONSOLEIME -consoleinternal -Consoleroot -Consolescreen -CONSOLESETFOREGROUND -consoletaeftemplates -CONSOLEV -Consolewait -CONSOLEWINDOWOWNER -consrv -constexpr -constexprable -constness -contentfiles -conterm -CONTEXTMENU -contsf -contypes -convarea -conwinuserrefs -coord -coordnew -COPYCOLOR -CORESYSTEM -cotaskmem -countof -cout -CPG -cpinfo -CPINFOEX -cplinfo -cplusplus -cpp -CPPCORECHECK -cppcorecheckrules -cpprest -cpprestsdk -cppwinrt -CProc -cpx -crbegin -CREATESCREENBUFFER -CREATESTRUCT -CREATESTRUCTW -creativecommons -cred -cref -crend -CRLFs -crloew -crt -CRTLIBS -csbi -csbiex -csharp -CSHORT -CSIDL -csproj -Csr -csrmsg -CSRSS -csrutil -cstdarg -cstddef -cstdio -cstdlib -cstr -cstring -cstyle -csv -CSwitch -CText -ctime -ctl -ctlseqs -Ctlv -ctor -CTRLEVENT -CTRLKEYSHORTCUTS -Ctx -Ctxt -ctype -CUF -cupxy -curated -CURRENTFONT -currentmode -CURRENTPAGE -CURSORCOLOR -CURSORSIZE -CURSORTYPE -CUU -cw -Cwa -cwch -cwchar -cwctype -cwd -cx -cxcy -CXFRAME -CXFULLSCREEN -CXHSCROLL -CXMIN -CXPADDEDBORDER -CXSIZE -CXSMICON -CXVIRTUALSCREEN -CXVSCROLL -cxx -CYFRAME -CYFULLSCREEN -cygwin -CYHSCROLL -CYMIN -CYPADDEDBORDER -CYSIZE -CYSIZEFRAME -CYSMICON -CYVIRTUALSCREEN -CYVSCROLL -dahall -dai -DATABLOCK -DATAVIEW -DATAW -DBatch -dbcs -DBCSCHAR -DBCSFONT -dbg -DBGALL -DBGCHARS -DBGFONTS -DBGOUTPUT -dbh -dblclk -DBlob -dbproj -DBUILD -DColor -DCOLORVALUE -dcommon -DCompile -dcompiler -DComposition -dde -DDESHARE -DDevice -DEADCHAR -dealloc -Debian -debolden -debounce -DECALN -DECANM -DECAUPSS -DECAWM -DECCKM -DECCOLM -DECEKBD -DECID -DECKPAM -DECKPM -DECKPNM -DECLRMM -decls -declspec -decltype -declval -DECNKM -DECNRCM -DECOM -deconstructed -DECPCTERM -DECRC -DECREQTPARM -DECRLM -DECRQM -DECRST -DECSASD -DECSC -DECSCA -DECSCNM -DECSCPP -DECSCUSR -DECSED -DECSEL -DECSET -DECSLPP -DECSLRM -DECSMKR -DECSR -decstandar -DECSTBM -DECSTR -DECTCEM -Dedupe -deduplicated -DEFAULTBACKGROUND -DEFAULTFOREGROUND -defaultsettings -DEFAULTTONEAREST -DEFAULTTONULL -DEFAULTTOPRIMARY -defectdefs -DEFERERASE -deff -DEFFACE -defing -DEFPUSHBUTTON -defterm -DELAYLOAD -deletable -DELETEONRELEASE -delims -Delt -demoable -depersist -deprioritized -deps -deque -deref -deserialization -deserialize -deserialized -deserializer -deserializing -desktopwindowxamlsource -dest -DESTINATIONNAME -devblogs -developercommunity -devicecode -devicefamily -devops -Dext -df -DFactory -DFF -DFMT -dh -dhandler -dialogbox -diffing -DINLINE -directio -DIRECTX -Dirs -DISABLENOSCROLL -DISPLAYATTRIBUTE -DISPLAYATTRIBUTEPROPERTY -DISPLAYCHANGE -distro -dlg -DLGC -dll -dllexport -DLLGETVERSIONPROC -dllimport -dllinit -dllmain -DLLVERSIONINFO -DLOAD -DLOOK -dmp -DOCTYPE -docx -DONTCARE -doskey -dotnet -doubleclick -downlevel -dpg -dpi -DPIAPI -DPICHANGE -DPICHANGED -dpix -dpiy -DRAWFRAME -DRAWITEM -DRAWITEMSTRUCT -drcs -dropdown -DROPDOWNLIST -DROPFILES -drv -dsm -dst -DSwap -DTest -dtor -DTTERM -DUMMYUNIONNAME -DUNICODE -DUNIT -dup'ed -dvi -dw -DWLP -dwm -dwmapi -dword -dwrite -dwriteglyphrundescriptionclustermap -dxgi -dxgidwm -dxinterop -dxttbmp -eachother -eaf -EASTEUROPE -eb -ECH -echokey -ecount -ECpp -Edgium -EDITKEYS -EDITTEXT -EDITUPDATE -edputil -edu -Efast -EHsc -EJO -EK -ELEMENTNOTAVAILABLE -elems -elif -elseif -emacs -EMPTYBOX -enabledelayedexpansion -endian -endif -endl -endlocal -endptr -endregion -ENQ -enqueuing -entrypoint -ENU -enum -ENUMLOGFONT -ENUMLOGFONTEX -enumranges -envvar -eol -EPres -ERASEBKGND -errno -errorlevel -ETB -etcoreapp -ETW -ETX -EUDC -ev -EVENTID -eventing -everytime -evflags -evt -ewdelete -exe -execd -executables -executionengine -exemain -EXETYPE -exeuwp -exewin -exitwin -expectedinput -expr -EXPUNGECOMMANDHISTORY -EXSTYLE -EXTENDEDEDITKEY -EXTKEY -EXTTEXTOUT -facename -FACENODE -FACESIZE -failfast -FAILIFTHERE -fallthrough -FARPROC -fcb -fcharset -fclose -fcntl -fdc -FDD -fde -fdopen -fdw -fea -fesb -FFDE -FFrom -FGCOLOR -fgetc -fgetwc -FGHIJ -fgidx -FILEDESCRIPTION -fileno -filepath -FILESUBTYPE -FILESYSPATH -filesystem -FILETIME -FILETYPE -FILEW -FILLATTR -FILLCONSOLEOUTPUT -FILTERONPASTE -finalizer -FINDCASE -FINDDLG -FINDDOWN -FINDSTR -FINDSTRINGEXACT -FINDUP -FIter -FIXEDCONVERTED -Flg -flyout -fmodern -fmtarg -fmtid -fmtlib -FOLDERID -FONTCHANGE -fontdlg -FONTENUMDATA -FONTENUMPROC -FONTFACE -FONTFAMILY -FONTHEIGHT -fontlist -FONTOK -FONTSIZE -FONTSTRING -fonttbl -FONTTYPE -FONTWEIGHT -FONTWIDTH -FONTWINDOW -forceinline -FORCEOFFFEEDBACK -FORCEONFEEDBACK -FORCEV -foreach -fprintf -framebuffer -FRAMECHANGED -fre -freopen -frontend -Fscreen -FSCTL -FSINFOCLASS -fsproj -fstream -fte -Ftm -fullscreen -fullwidth -func -FUNCTIONCALL -fuzzer -fuzzmap -fuzzwrapper -fwdecl -fwe -fwlink -GAUSSIAN -gb -gci -gcx -gcy -gdi -gdip -gdirenderer -geopol -GETALIAS -GETALIASES -GETALIASESLENGTH -GETALIASEXES -GETALIASEXESLENGTH -GETAUTOHIDEBAREX -GETCARETWIDTH -getch -getchar -GETCLIENTAREAANIMATION -GETCOMMANDHISTORY -GETCOMMANDHISTORYLENGTH -GETCONSOLEINPUT -GETCONSOLEPROCESSLIST -GETCONSOLEWINDOW -GETCOUNT -GETCP -GETCURSEL -GETCURSORINFO -GETDISPLAYMODE -GETDISPLAYSIZE -GETDLGCODE -GETDPISCALEDSIZE -GETFONTINFO -GETFONTSIZE -GETHARDWARESTATE -GETHUNGAPPTIMEOUT -GETICON -GETITEMDATA -GETKEYBOARDLAYOUTNAME -GETKEYSTATE -GETLARGESTWINDOWSIZE -GETLBTEXT -getline -GETMINMAXINFO -GETMOUSEINFO -GETMOUSEVANISH -GETNUMBEROFFONTS -GETNUMBEROFINPUTEVENTS -GETOBJECT -GETPOS -GETSELECTIONINFO -getset -GETSTATE -GETTEXT -GETTEXTLEN -GETTITLE -GETWAITTOKILLSERVICETIMEOUT -GETWAITTOKILLTIMEOUT -GETWHEELSCROLLCHARACTERS -GETWHEELSCROLLCHARS -GETWHEELSCROLLLINES -getwriter -GFEh -Gfun -gfx -gh -GHIJK -GHIJKL -GHIJKLM -gitfilters -github -gitlab -gle -globals -gmail -GMEM -GNUC -Goldmine -gonce -Google -goutput -GPUs -Gravell's -grayscale -GREENSCROLL -Grehan -grep -Greyscale -gridline -groupbox -gset -gsl -GTP -guc -gui -guidatom -GValue -GWL -GWLP -gwsz -HABCDEF -Hackathon -halfwidth -HALTCOND -HANGEUL -hardcoded -hardcodes -hashalg -HASSTRINGS -hbitmap -hbm -HBMMENU -hbmp -hbr -hbrush -hc -HCmd -hdc -hdr -HDROP -hdrstop -HEIGHTSCROLL -hfile -hfont -hglobal -hh -hhh -hhook -hhx -HIBYTE -HICON -HIDEWINDOW -HIGHLIGHTTEXT -hinst -HINSTANCE -Hirots -HISTORYBUFS -HISTORYNODUP -HISTORYSIZE -hittest -HIWORD -hk -HKCU -hkey -hkl -HKLM -hlocal -hlsl -HMENU -hmod -hmodule -hmon -HMONITOR -horiz -HORZ -hostable -hostlib -HPA -HPAINTBUFFER -HPCON -hpj -hpp -HPR -HPROPSHEETPAGE -HProvider -HREDRAW -hresult -HRSRC -hscroll -hsl -hstr -hstring -hsv -HTCAPTION -HTCLIENT -htm -HTMAXBUTTON -HTMINBUTTON -html -HTMLTo -HTTOP -hu -hungapp -HVP -hwheel -hwnd -HWNDPARENT -hxx -IAccessibility -IAction -IApi -IApplication -IBase -icacls -iccex -icch -IChar -ico -IComponent -ICONERROR -Iconified -ICONINFORMATION -IConsole -ICONSTOP -IControl -ICONWARNING -ICore -IData -IDCANCEL -IDD -IDesktop -IDevice -IDictionary -IDISHWND -IDispatch -IDisposable -idl -idllib -IDOK -IDR -idth -idx -IDXGI -IDynamic -IEnd -IEnum -IEnumerable -ies -ietf -IFACEMETHODIMP -ifdef -ification -ifndef -IFont -ifstream -IGNOREEND -IHigh -IHosted -iid -IInitialize -IInput -IInspectable -IInteract -IInteractivity -IIo -IList -imagemagick -Imatch -ime -Imm -IMouse -impl -inbox -inclusivity -INCONTEXT -INFOEX -inheritcursor -inheritdoc -inheritfrom -ini -INITCOMMONCONTROLSEX -INITDIALOG -initguid -INITMENU -inkscape -inl -INLINEPREFIX -inlines -INotify -inout -inplace -inproc -Inputkeyinfo -INPUTPROCESSORPROFILE -inputrc -Inputreadhandledata -INSERTMODE -intellisense -INTERACTIVITYBASE -INTERCEPTCOPYPASTE -INTERNALNAME -interop -interoperability -inthread -intptr -intsafe -INVALIDARG -INVALIDATERECT -inwap -IObservable -ioctl -iomanip -iostream -iot -ipch -ipconfig -IPersist -ipp -IProperty -IPSINK -ipsp -IRaw -IRead -IReference -IRender -IRenderer -IScheme -ISelection -IShell -isocpp -issuecomment -IState -IStoryboard -isupper -ISwap -iswdigit -iswspace -ISystem -iterm -itermcolors -ITerminal -IText -itf -Ith -itoa -IUI -IUia -IUnknown -ivalid -IValue -IVector -IWait -iwch -IWeb -IWin -IWindow -IXaml -IXMP -jconcpp -JOBOBJECT -JOBOBJECTINFOCLASS -jpe -jpeg -jpg -JPN -json -jsoncpp -jsprovider -jumplist -KAttrs -kawa -kayla -Kazu -kazum -kbd -kcub -kcud -kcuf -kcuu -Kd -kernelbase -kernelbasestaging -KEYBDINPUT -keybinding -keychord -keydown -keyevent -KEYFIRST -KEYLAST -keymap -Keymapping -keyscan -keystate -keyup -KF -khome -KILLACTIVE -KILLFOCUS -kinda -KJ -KLF -KLMNO -KLMNOPQRST -KLMNOPQRSTQQQQQ -KU -KVM -KX -langid -LANGUAGELIST -lasterror -lastexitcode -LAYOUTRTL -LBN -LBound -LBUTTON -LBUTTONDBLCLK -LBUTTONDOWN -LBUTTONUP -lcb -LCONTROL -LCTRL -lcx -LEFTALIGN -LEFTSHIFT -len -lhs -libpopcnt -libtickit -LIMITTEXT -LINEDOWN -LINESELECTION -LINEWRAP -LINKERRCAP -LINKERROR -linkid -linkpath -linputfile -Linq -linux -listbox -listproperties -listptr -listptrsize -lk -lld -llvm -llx -LMENU -LMNOP -lnk -lnkd -lnkfile -LNM -LOADONCALL -LOBYTE -localappdata -localhost -locsrc -locstudio -Loewen -LOGFONT -LOGFONTW -logissue -lowercased -loword -lparam -lparen -LPBYTE -LPCCH -lpch -LPCHARSETINFO -LPCOLORREF -LPCPLINFO -LPCREATESTRUCT -lpcs -LPCSTR -LPCTSTR -LPCWSTR -lpdata -LPDBLIST -lpdis -LPDRAWITEMSTRUCT -lpdw -LPDWORD -lpelfe -lpfn -LPFNADDPROPSHEETPAGE -LPINT -lpl -LPMEASUREITEMSTRUCT -LPMINMAXINFO -lpmsg -LPNEWCPLINFO -LPNEWCPLINFOA -LPNEWCPLINFOW -LPNMHDR -lpntme -LPPOINT -LPPROC -LPPROPSHEETPAGE -LPPSHNOTIFY -lprc -LPRECT -lpstr -lpsz -LPTSTR -LPTTFONTLIST -lpv -LPVOID -LPW -LPWCH -LPWINDOWPOS -lpwpos -lpwstr -LRESULT -lru -lsb -lsconfig -lsproj -lss -lstatus -lstrcmp -lstrcmpi -LTEXT -LTLTLTLTL -ltype -LUID -lval -LVB -LVERTICAL -LWA -LWIN -lwkmvj -mailto -majorly -makeappx -MAKEINTRESOURCE -MAKEINTRESOURCEW -MAKELANGID -MAKELONG -MAKELPARAM -MAKELRESULT -malloc -manpage -MAPBITMAP -MAPVIRTUALKEY -MAPVK -MAXDIMENSTRING -maxing -MAXLENGTH -MAXSHORT -maxversiontested -MAXWORD -maybenull -MBUTTON -MBUTTONDBLCLK -MBUTTONDOWN -MBUTTONUP -Mbxy -mdmerge -MDs -MEASUREITEM -megamix -memallocator -memcmp -memcopy -memcpy -memmove -memset -MENUCHAR -MENUCONTROL -MENUDROPALIGNMENT -MENUITEM -MENUITEMINFO -MENUSELECT -Mersenne -messageext -metadata -metaproj -midl -mii -MIIM -milli -mimetype -mincore -mindbogglingly -mingw -minimizeall -minkernel -MINMAXINFO -mintty -minwin -minwindef -Mip -mkdir -MMBB -mmcc -MMCPL -mmsystem -MNC -MNOPQ -MNOPQR -MODALFRAME -modelproj -MODERNCORE -MONITORINFO -MONITORINFOEXW -MONITORINFOF -monospaced -monostate -MOUSEACTIVATE -MOUSEFIRST -MOUSEHWHEEL -MOUSEMOVE -mousewheel -MOVESTART -msb -msbuild -mscorlib -msctf -msctls -msdata -msdn -msft -MSGCMDLINEF -MSGF -MSGFILTER -MSGFLG -MSGMARKMODE -MSGS -MSGSCROLLMODE -MSGSELECTMODE -msiexec -MSIL -msix -msrc -msvcrt -MSVS -msys -msysgit -mui -Mul -multiline -munged -munges -mutex -mutexes -muxes -myapplet -mydir -myignite -MYMAX -Mypair -Myval -NAMELENGTH -nameof -namespace -namespaced -namestream -nano -natvis -nbsp -Nc -NCCALCSIZE -NCCREATE -NCLBUTTONDOWN -NCLBUTTONUP -NCMBUTTONDOWN -NCMBUTTONUP -NCPAINT -NCRBUTTONDOWN -NCRBUTTONUP -NCXBUTTONDOWN -NCXBUTTONUP -NDEBUG -ned -NEL -NEQ -netcoreapp -netstandard -NEWCPLINFO -NEWCPLINFOA -NEWCPLINFOW -newcursor -Newdelete -NEWINQUIRE -NEWINQURE -NEWPROCESSWINDOW -NEWTEXTMETRIC -NEWTEXTMETRICEX -Newtonsoft -NEXTLINE -nfe -nlength -Nls -NLSMODE -NOACTIVATE -NOAPPLYNOW -NOCLIP -NOCOLOR -NOCOMM -NOCONTEXTHELP -NOCOPYBITS -nodiscard -NODUP -noexcept -NOHELP -noinline -NOINTEGRALHEIGHT -NOINTERFACE -NOLINKINFO -nologo -NOMCX -NOMINMAX -NOMOVE -NONALERT -nonbreaking -nonclient -NONCONST -NONINFRINGEMENT -NONPREROTATED -nonspace -NOOWNERZORDER -NOPAINT -NOPQRST -noprofile -NOREDRAW -NOREMOVE -NOREPOSITION -noreturn -NORMALDISPLAY -NOSCRATCH -NOSEARCH -noselect -NOSENDCHANGING -NOSIZE -NOSNAPSHOT -NOTHOUSANDS -nothrow -NOTICKS -NOTIMPL -notin -NOTNULL -NOTOPMOST -NOTRACK -NOTSUPPORTED -nouicompat -nounihan -NOUPDATE -NOWAIT -NOYIELD -NOZORDER -NPM -npos -nrcs -NSTATUS -ntapi -ntcon -ntcsrdll -ntdef -NTDEV -ntdll -ntifs -ntlpcapi -ntm -ntrtl -ntstatus -ntsubauth -NTSYSCALLAPI -nttree -nturtl -ntuser -NTVDM -ntverp -NTWIN -nuget -nullness -nullonfailure -nullopt -nullptr -NULs -numlock -numpad -NUMSCROLL -nupkg -NVDA -NVIDIA -NVR -Nx -oa -OACR -oauth -objbase -ocf -ocolor -odl -oem -oemcp -OEMFONT -OEMFORMAT -offboarded -OI -Oj -OLEAUT -OLECHAR -onecore -ONECOREBASE -ONECORESDKTOOLS -ONECORESHELL -onecoreuap -onecoreuapuuid -onecoreuuid -ONECOREWINDOWS -onehalf -ONLCR -Oo -openconsoleproxy -openbash -opencode -opencon -openconsole -OPENIF -OPENLINK -openps -opensource -openvt -openxmlformats -oq -ORIGINALFILENAME -osc -OSCBG -OSCCT -OSCFG -OSCRCC -OSCSCB -OSCSCC -OSCWT -OSDEPENDSROOT -osfhandle -OSG -OSGENG -osign -oss -ostream -ostringstream -Ou -ouicompat -outdir -outfile -Outof -OUTOFCONTEXT -OUTOFMEMORY -outout -Outptr -Ov -OVERLAPPEDWINDOW -OWNDC -OWNERDRAWFIXED -packageuwp -PACKCOORD -PACKVERSION -pagedown -pageup -PAINTPARAMS -PAINTSTRUCT -PALPC -pankaj -params -parentable -parms -passthrough -PATCOPY -pathcch -PATTERNID -pb -PBOOL -PBYTE -pcat -pcb -pcch -PCCHAR -PCCONSOLE -PCD -pch -PCHAR -PCIDLIST -PCIS -PCLIENT -PCLONG -PCOBJECT -pcon -PCONSOLE -PCONSOLEENDTASK -PCONSOLESETFOREGROUND -PCONSOLEWINDOWOWNER -pcoord -pcs -pcshell -PCSHORT -PCSR -PCSTR -PCUNICODE -PCWCH -PCWCHAR -PCWSTR -pda -pdb -pdbonly -pdbstr -pdf -pdp -pdtobj -pdw -PDWORD -pdx -peb -PEMAGIC -PENDTASKMSG -pfa -PFACENODE -pfed -pfi -PFILE -pfn -PFNCONSOLECREATEIOTHREAD -PFONT -PFONTENUMDATA -PFS -pgdn -pguid -pgup -PHANDLE -phhook -phwnd -pid -pidl -PIDLIST -pii -pinam -pinvoke -pipename -pipestr -pixelheight -PIXELSLIST -PJOBOBJECT -pkey -placeholders -platforming -playsound -plist -PLOGICAL -plugin -PMv -png -pnm -PNMLINK -pntm -PNTSTATUS -POBJECT -Podcast -POINTSLIST -POLYTEXTW -popd -POPF -poppack -popup -POPUPATTR -PORFLG -positionals -posix -POSTCHARBREAKS -POSX -POSXSCROLL -POSYSCROLL -ppci -ppf -ppguid -ppidl -pplx -PPORT -PPROC -PPROCESS -ppropvar -ppsi -ppsl -ppsp -ppsz -ppv -ppwch -PQRST -pragma -prc -prealigned -prebuilt -precendence -precomp -prect -prefast -prefilled -prefs -preinstalled -PRELOAD -PREMULTIPLIED -prepopulated -presorted -PREVENTPINNING -PREVIEWLABEL -PREVIEWWINDOW -PREVLINE -prg -pri -printf -prioritization -processenv -processhost -PROCESSINFOCLASS -procs -Progman -proj -PROPERTYID -PROPERTYKEY -PROPERTYVAL -propsheet -PROPSHEETHEADER -PROPSHEETPAGE -propslib -propsys -PROPTITLE -propvar -propvariant -propvarutil -psa -psd -PSECURITY -pseudocode -pseudoconsole -pseudoterminal -psh -pshn -PSHNOTIFY -PSHORT -pshpack -PSINGLE -psl -psldl -psm -PSMALL -PSNRET -PSobject -psp -PSPCB -psr -PSTR -psuedoconsole -psz -ptch -ptr -ptrdiff -ptsz -PTYIn -PUCHAR -PULONG -PUNICODE -pushd -putchar -putwchar -pv -PVOID -pw -pwch -PWCHAR -PWDDMCONSOLECONTEXT -PWORD -pwsh -pwstr -pwsz -px -py -pythonw -qi -QJ -qo -QOL -QRSTU -qsort -queryable -QUESTIONMARK -quickedit -QWER -qzmp -RAII -RALT -rasterbar -rasterfont -rasterization -rawinput -RAWPATH -raytracers -razzlerc -rbar -rbegin -RBUTTON -RBUTTONDBLCLK -RBUTTONDOWN -RBUTTONUP -rcch -RCDATA -rcelms -rcl -rclsid -RCOA -RCOCA -RCOCW -RCONTROL -RCOW -rcv -rdbuf -RDONLY -rdpartysource -readback -READCONSOLE -READCONSOLEOUTPUT -READCONSOLEOUTPUTSTRING -Readline -readme -READMODE -readonly -READWRITE -realloc -reamapping -rects -redef -Redir -redirector -redist -redistributable -REDSCROLL -refactor -refactoring -REFCLSID -refcount -referencesource -REFGUID -REFIID -REFPROPERTYKEY -regex -REGISTEROS -REGISTERVDM -regkey -REGSTR -reingest -Relayout -RELBINPATH -remoting -renamer -renderengine -rendersize -reparent -reparenting -replatformed -Replymessage -repositorypath -rescap -Resequence -reserialize -RESETCONTENT -resheader -resizable -resmimetype -restrictedcapabilities -resw -resx -retval -rfa -rfc -rftp -rgb -rgba -rgbi -rgch -rgci -rgfae -rgfte -rgi -rgn -rgp -rgpwsz -rgrc -rgs -rgui -rgw -rgwch -rhs -ri -RIGHTALIGN -RIGHTBUTTON -riid -RIPMSG -Rl -rmdir -RMENU -roadmap -robomac -roundtrip -rparen -RRF -RRRGGGBB -rsas -rtcore -RTEXT -rtf -RTFTo -Rtl -RTLREADING -RTTI -ru -ruleset -runas -runasradio -RUNDLL -runformat -runft -RUNFULLSCREEN -runsettings -runtests -runtimeclass -runuia -runut -rvalue -RVERTICAL -rxvt -RWIN -safearray -SAFECAST -safemath -sba -SBCS -SBCSDBCS -sbi -sbiex -sbold -scancode -scanline -schemename -SCL -scm -scprintf -SCRBUF -SCRBUFSIZE -screenbuffer -SCREENBUFFERINFO -screeninfo -screenshot -scriptload -Scrollable -scrollback -scrollbar -Scrolldown -Scrolldownpage -Scroller -SCROLLFORWARD -SCROLLINFO -scrolllock -scrolloffset -SCROLLSCALE -SCROLLSCREENBUFFER -Scrollup -Scrolluppage -scursor -sddl -sdeleted -sdk -SDKDDK -searchbox -securityappcontainer -segfault -SELCHANGE -SELECTALL -selectany -SELECTEDFONT -SELECTSTRING -Selfhosters -SERVERDLL -SETACTIVE -SETBUDDYINT -SETCOLOR -setcp -SETCURSEL -SETCURSOR -SETCURSORINFO -SETCURSORPOSITION -SETDISPLAYMODE -setfill -SETFOCUS -SETFONT -SETFOREGROUND -SETHARDWARESTATE -SETHOTKEY -SETICON -setintegritylevel -SETITEMDATA -SETITEMHEIGHT -SETKEYSHORTCUTS -setlocal -setlocale -SETMENUCLOSE -setmode -SETNUMBEROFCOMMANDS -SETOS -SETPALETTE -SETPOS -SETRANGE -SETSCREENBUFFERSIZE -SETSEL -SETTEXTATTRIBUTE -SETTINGCHANGE -SETTITLE -setw -Setwindow -SETWINDOWINFO -sfi -SFINAE -SFUI -sgr -SHANDLE -SHCo -shcore -shellapi -shellex -shellscalingapi -SHFILEINFO -SHGFI -SHGFP -SHIFTJIS -Shl -shlguid -shlobj -shlwapi -SHORTPATH -SHOWCURSOR -SHOWMAXIMIZED -SHOWMINNOACTIVE -SHOWNOACTIVATE -SHOWNORMAL -SHOWWINDOW -SHRT -sid -sidebyside -SIF -SIGDN -SINGLEFLAG -SINGLETHREADED -siup -SIZEBOX -sizeof -SIZESCROLL -SKIPFONT -SKIPOWNPROCESS -SKIPOWNTHREAD -sku -sldl -SLGP -SLIST -slmult -sln -slpit -smalllogo -SManifest -SMARTQUOTE -SMTO -SND -SOLIDBOX -Solutiondir -somefile -SOURCEBRANCH -sourced -SOURCESDIRECTORY -SPACEBAR -spammy -spand -splashscreen -sprintf -sqlproj -srand -src -SRCCODEPAGE -SRCCOPY -SRCINVERT -srcsrv -SRCSRVTRG -srctool -sre -srect -srv -srvinit -srvpipe -ssh -sstream -stackoverflow -standalone -STARTF -STARTUPINFO -STARTUPINFOEX -STARTUPINFOEXW -STARTUPINFOW -STARTWPARMS -STARTWPARMSA -STARTWPARMSW -Statusline -stdafx -STDAPI -stdcall -stdcpp -stderr -stdexcept -stdin -stdio -STDMETHODCALLTYPE -STDMETHODIMP -stdout -stgm -stl -stoi -stol -storelogo -stoul -stoutapot -strikethrough -stringstream -STRINGTABLE -strlen -strrev -strsafe -strtok -structs -STUVWX -STX -stylecop -SUA -subcompartment -subkey -SUBLANG -sublicensable -submenu -subresource -subspan -substr -subsystemconsole -subsystemwindows -suiteless -svg -swapchain -swapchainpanel -swappable -SWMR -SWP -swprintf -sx -sy -SYMED -SYNCPAINT -syscalls -SYSCHAR -SYSCOMMAND -SYSDEADCHAR -Sysinternals -SYSKEYDOWN -SYSKEYUP -SYSLINK -SYSMENU -sysparams -sysparamsext -SYSTEMHAND -SYSTEMMENU -sz -tabview -TAdd -taef -TARG -targetentrypoint -TARGETLIBS -TARGETNAME -targetnametoken -targetsize -targetver -taskbar -tbar -TBase -tbc -tbi -Tbl -TBM -tchar -TCHFORMAT -TCI -tcome -tcommandline -tcommands -TDelegated -TDP -TEAMPROJECT -tearoff -Teb -techcommunity -technet -tellp -telnet -telnetd -templated -teraflop -terminalcore -TERMINALSCROLLING -terminfo -TEs -testapp -testbuildplatform -testcon -testd -testdlls -testenv -testlab -testlist -testmd -testmddefinition -testmode -testname -testnameprefix -TESTNULL -testpass -testpasses -testtestabc -testtesttesttesttest -testtimeout -TEXCOORD -texel -TExpected -textattribute -TEXTATTRIBUTEID -textbox -textboxes -textbuffer -TEXTINCLUDE -textinfo -TEXTMETRIC -TEXTMETRICW -textmode -tf -TFCAT -tfoo -TFunction -tga -threadpool -THUMBPOSITION -THUMBTRACK -TIcon -tif -tilunittests -Timeline -titlebar -TITLEISLINKNAME -TJson -tl -TLEN -Tlg -Tlgdata -TMAE -TMPF -TMult -tmultiple -tmux -todo -tofrom -tokenhelpers -tokenized -tokenizing -toolbars -TOOLINFO -Toolset -tooltip -TOPDOWNDIB -TOPLEFT -toplevel -TOPRIGHT -TOpt -tosign -touchpad -towlower -towupper -Tpp -Tpqrst -tprivapi -tracelog -tracelogging -traceloggingprovider -trackbar -TRACKCOMPOSITION -trackpad -transcoder -transitioning -Trd -TREX -triaged -triaging -TRIANGLESTRIP -TRIMZEROHEADINGS -truetype -trx -tsattrs -tsf -TStr -TSTRFORMAT -TSub -tt -TTBITMAP -ttf -TTFONT -TTFONTLIST -tthe -tthis -TTM -TTo -TVPP -Txtev -typechecked -typechecking -typedef -typeid -typeinfo -typelib -typename -typeof -typeparam -TYUI -UAC -uap -uapadmin -UAX -ubuntu -ucd -UCD -ucdxml -uch -UCHAR -ucs -udk -UDM -uer -uget -uia -UIACCESS -uiacore -uiautomationcore -Uid -uielem -UIELEMENTENABLEDONLY -uint -uintptr -ul -ulcch -ulong -Unadvise -unattend -uncomment -UNCPRIORITY -undef -Unescape -unexpand -Unfocus -unhighlighting -unhosted -unicode -UNICODESTRING -UNICODETEXT -UNICRT -UNINIT -uninitialize -uninstall -Uniscribe -unittest -unittesting -universaltest -Unk -unknwn -unmark -UNORM -unparseable -unpause -Unregister -Unregistering -unte -untests -untextured -untimes -UPDATEDISPLAY -UPDOWN -UPKEY -UPSS -upvote -uri -url -urlencoded -Urxvt -USASCII -usebackq -USECALLBACK -USECOLOR -USECOUNTCHARS -USEDEFAULT -USEDX -USEFILLATTRIBUTE -USEGLYPHCHARS -USEHICON -USEPOSITION -userbase -USERDATA -userdpiapi -username -Userp -userprivapi -userprofile -USERSRV -USESHOWWINDOW -USESIZE -USESTDHANDLES -ushort -USRDLL -utf -utils -utr -uuid -uuidof -uuidv -UVWX -UVWXY -UWA -uwp -uxtheme -vals -Vanara -vararg -vbproj -vclib -Vcount -vcpkg -vcprintf -vcproj -vcrt -vcvarsall -vcxitems -vcxproj -vec -VERCTRL -versioning -VERTBAR -vf -VFT -vga -vgaoem -viewkind -viewports -Virt -VIRTTERM -Virtualizing -vk -vkey -VKKEYSCAN -VMs -VPA -VPATH -VPR -VPrintf -VProc -VRaw -VREDRAW -vsc -vscprintf -VSCROLL -vsinfo -vsnprintf -vso -vspath -vsprintf -VSTAMP -vstest -VSTS -VSTT -vstudio -vswhere -vtapp -VTE -VTID -vtio -vtmode -vtpipeterm -vtpt -vtrenderer -VTRGB -VTRGBTo -vtseq -vtterm -vttest -VWX -waaay -waitable -waivable -WANSUNG -WANTARROWS -WANTTAB -wapproj -wav -wbuilder -wch -wchar -WCIA -WCIW -WClass -wcout -wcschr -wcscmp -wcscpy -WCSHELPER -wcsicmp -wcslen -wcsnicmp -wcsrchr -wcsrev -wcstod -wcstoul -wddm -wddmcon -wddmconrenderer -WDDMCONSOLECONTEXT -wdm -webpage -website -websocket -wekyb -WEOF -wex -wextest -wextestclass -wfdopen -WFill -wfopen -wfstream -WHelper -whitelisting -WIDTHSCROLL -Widthx -wiki -wikia -wikipedia -wil -WImpl -WINAPI -winbase -winbasep -wincon -winconp -winconpty -winconptydll -winconptylib -wincontypes -WINCORE -windbg -WINDEF -WINDIR -windll -WINDOWALPHA -Windowbuffer -windowdpiapi -WINDOWEDGE -windowext -WINDOWFRAME -windowime -WINDOWINFO -windowio -windowmetrics -WINDOWPLACEMENT -windowpos -WINDOWPOSCHANGED -WINDOWPOSCHANGING -windowproc -windowrect -windowsapp -windowsinternalstring -WINDOWSIZE -windowsx -WINDOWTEXT -windowtheme -WINDOWTITLE -winevent -winfx -wingdi -winget -WINIDE -winioctl -winmd -winmeta -winmgr -winmm -winnt -Winperf -WInplace -winres -winrt -wintelnet -winternl -winuser -winuserp -WINVER -wistd -wixproj -wline -wlinestream -wmain -WMSZ -wnd -WNDALLOC -WNDCLASS -WNDCLASSEX -WNDCLASSW -Wndproc -WNegative -WNull -wnwb -workarea -workaround -workflow -workitem -wostream -WOutside -WOWARM -WOWx -wparam -WPartial -wpf -WPR -WPrep -WPresent -wprintf -wprp -wprpi -wregex -WResult -writeback -writechar -WRITECONSOLE -WRITECONSOLEINPUT -WRITECONSOLEOUTPUT -WRITECONSOLEOUTPUTSTRING -wrl -wrp -WRunoff -WScript -wsl -WSLENV -wsmatch -WSpace -wss -wstr -wstring -wstringstream -wsz -wtd -WTest -WTEXT -WTo -wtof -wtoi -WTs -wtw -wtypes -Wubi -WUX -WVerify -wwaproj -WWith -wx -wxh -xa -xact -xamarin -xaml -Xamlmeta -xargs -xaz -xbf -xbutton -XBUTTONDBLCLK -XBUTTONDOWN -XBUTTONUP -XCast -XCENTER -XColors -xcopy -XCount -xdy -XEncoding -xes -Xes -XES -xff -XFile -XManifest -XMath -XMFLOAT -xml -xmlns -xor -xorg -XOrg -Xpath -XPosition -XResource -xsd -xsi -xsize -XSubstantial -xtended -xterm -XTest -xunit -xutr -xvalue -XVIRTUALSCREEN -XWalk -xy -Xzn -yact -YAML -YCast -YCENTER -YCount -YDPI -yml -YOffset -YPosition -YSize -YSubstantial -YVIRTUALSCREEN -Yw -YWalk -yx -YZ -Zc -ZCmd -ZCtrl -zd -zh -ZM -zsh -zu -zxcvbnm -zy +AAAAAABBBBBBCCC +AAAAABBBBBBBCCC +AAAAABBBBBBCCC +AAAAABCCCCCCCCC +AAAAADCCCCCCCCC +ABANDONFONT +abcd +ABCDEFGHIJKLMNO +ABCG +abf +abgr +abi +ACCESSTOKEN +acec +acf +acidev +ACIOSS +ACover +actctx +ACTCTXW +activatable +ACTIVEBORDER +ACTIVECAPTION +ADDALIAS +ADDB +ADDREF +addressof +ADDSTRING +ADDTOOL +aef +AEnd +AFew +AFill +AFX +AHelper +ahz +AImpl +AInplace +ALIGNRIGHT +alloc +allocing +alpc +ALTERNATENAME +ALTF +ALTNUMPAD +ALWAYSTIP +amd +ansd +ansicode +ansicpg +ANSISYS +ANSISYSRC +ANSISYSSC +antialias +antialiasing +ANull +anycpu +AOn +APARTMENTTHREADED +APCs +api +APIENTRY +apiset +apos +APPBARDATA +appconsult +APPICON +appium +applet +appletname +applicationmodel +APPLMODAL +appmodel +apps +APPWINDOW +appx +appxbundle +appxerror +appxmanifest +APrep +apsect +APSTUDIO +archeologists +architected +argb +argc +args +argv +ARRAYSIZE +ARROWKEYS +ASBRST +ASBSET +ASDF +asdfghjkl +ASetting +ASingle +asm +asmv +asmx +aspnet +aspx +astextplain +AStomps +ASYNCWINDOWPOS +atch +ATest +attr +ATTRCOLOR +aumid +Authenticode +AUTOBUDDY +AUTOCHECKBOX +autogenerated +autohide +AUTOHSCROLL +automagically +autopositioning +AUTORADIOBUTTON +autoscrolling +Autowrap +AVerify +AVI +awch +azuredevopspodcast +azurewebsites +azzle +backend +backgrounded +Backgrounder +backgrounding +backport +backstory +Batang +baz +Bazz +BBBBBCCC +BBBBCCCCC +BBDM +bbwe +bc +bcount +bcrypt +bcx +bcz +BEFOREPARENT +beginthread +bgcolor +bgfx +bgidx +Bgk +BGR +BGRA +BHID +biblioscape +bigobj +binplace +binplaced +bitcoin +bitcrazed +bitflag +bitmask +BITOPERATION +bitsavers +bitset +BKCOLOR +BKGND +Bksp +blog +Blt +BLUESCROLL +bmp +BOLDFONT +BOOLIFY +bools +boostorg +Borland +BOTTOMLEFT +BOTTOMRIGHT +boutput +BPBF +bpp +BPPF +branchconfig +BRK +Browsable +bsearch +BSODs +bstr +BTNFACE +buf +bufferout +buffersize +buflen +bugfix +buildtransitive +BUILDURI +burriter +BValue +byref +bytearray +bytebuffer +Cac +callee +cang +capslock +CARETBLINKINGENABLED +CARRIAGERETURN +cascadia +cassert +catid +cazamor +CBash +cbegin +cbiex +CBN +CBoolean +cbt +cbuffer +CCCBB +ccf +cch +CCHAR +cci +CCmd +ccolor +CCom +CComp +CConsole +CConversion +CCRT +cctype +CDATA +cdd +cdecl +CDeclaration +CEdit +CELLSIZE +cend +cerr +cfae +Cfg +cfie +cfiex +cfte +CFuzz +cgscrn +chafa +changelist +charinfo +charlespetzold +charset +CHARSETINFO +chcp +checkbox +checkboxes +chh +Childitem +chk +chrono +CHT +ci +Cic +cjk +ckuehl +cla +Clcompile +CLE +cleartype +CLICKACTIVE +clickdown +climits +clipbrd +CLIPCHILDREN +CLIPSIBLINGS +cliutils +clocale +closetest +cloudconsole +cls +CLSCTX +clsid +CLUSTERMAP +cmath +cmatrix +cmder +CMDEXT +Cmdlet +cmdline +CMOUSEBUTTONS +cmp +cmt +cmyk +CNL +cnt +CNTRL +codebase +Codeflow +codepage +codepath +codepoint +codeproject +COINIT +COLLECTIONURI +colorizing +colororacle +colorref +colorscheme +colorspaces +colorspec +colortable +colortbl +colortool +COLR +combaseapi +combobox +comctl +COMDAT +commandline +commctrl +commdlg +COMMITID +compat +componentization +conapi +conareainfo +conattrs +conbufferout +concat +concfg +conddkrefs +condrv +conechokey +conemu +config +configurability +conhost +conhostv +conime +conimeinfo +conint +conintegrity +conintegrityuwp +coninteractivitybase +coninteractivityonecore +coninteractivitywin +conio +coniosrv +CONKBD +conlibk +conmsgl +CONNECTINFO +CONOUT +conpixels +conprops +conpropsp +conpty +conptylib +conserv +consoleapi +CONSOLECONTROL +CONSOLEENDTASK +consolegit +consolehost +CONSOLEIME +consoleinternal +Consoleroot +Consolescreen +CONSOLESETFOREGROUND +consoletaeftemplates +CONSOLEV +Consolewait +CONSOLEWINDOWOWNER +consrv +constexpr +constexprable +constness +contentfiles +conterm +CONTEXTMENU +contsf +contypes +convarea +conwinuserrefs +coord +coordnew +COPYCOLOR +CORESYSTEM +cotaskmem +countof +cout +CPG +cpinfo +CPINFOEX +cplinfo +cplusplus +cpp +CPPCORECHECK +cppcorecheckrules +cpprest +cpprestsdk +cppwinrt +CProc +cpx +crbegin +CREATESCREENBUFFER +CREATESTRUCT +CREATESTRUCTW +creativecommons +cred +cref +crend +CRLFs +crloew +crt +CRTLIBS +csbi +csbiex +csharp +CSHORT +CSIDL +csproj +Csr +csrmsg +CSRSS +csrutil +cstdarg +cstddef +cstdio +cstdlib +cstr +cstring +cstyle +csv +CSwitch +CText +ctime +ctl +ctlseqs +Ctlv +ctor +CTRLEVENT +CTRLKEYSHORTCUTS +Ctx +Ctxt +ctype +CUF +cupxy +curated +CURRENTFONT +currentmode +CURRENTPAGE +CURSORCOLOR +CURSORSIZE +CURSORTYPE +CUU +cw +Cwa +cwch +cwchar +cwctype +cwd +cx +cxcy +CXFRAME +CXFULLSCREEN +CXHSCROLL +CXMIN +CXPADDEDBORDER +CXSIZE +CXSMICON +CXVIRTUALSCREEN +CXVSCROLL +cxx +CYFRAME +CYFULLSCREEN +cygwin +CYHSCROLL +CYMIN +CYPADDEDBORDER +CYSIZE +CYSIZEFRAME +CYSMICON +CYVIRTUALSCREEN +CYVSCROLL +dahall +dai +DATABLOCK +DATAVIEW +DATAW +DBatch +dbcs +DBCSCHAR +DBCSFONT +dbg +DBGALL +DBGCHARS +DBGFONTS +DBGOUTPUT +dbh +dblclk +DBlob +dbproj +DBUILD +DColor +DCOLORVALUE +dcommon +DCompile +dcompiler +DComposition +dde +DDESHARE +DDevice +DEADCHAR +dealloc +Debian +debolden +debounce +DECALN +DECANM +DECAUPSS +DECAWM +DECCKM +DECCOLM +DECEKBD +DECID +DECKPAM +DECKPM +DECKPNM +DECLRMM +decls +declspec +decltype +declval +DECNKM +DECNRCM +DECOM +deconstructed +DECPCTERM +DECRC +DECREQTPARM +DECRLM +DECRQM +DECRST +DECSASD +DECSC +DECSCA +DECSCNM +DECSCPP +DECSCUSR +DECSED +DECSEL +DECSET +DECSLPP +DECSLRM +DECSMKR +DECSR +decstandar +DECSTBM +DECSTR +DECTCEM +Dedupe +deduplicated +DEFAULTBACKGROUND +DEFAULTFOREGROUND +defaultsettings +DEFAULTTONEAREST +DEFAULTTONULL +DEFAULTTOPRIMARY +defectdefs +DEFERERASE +deff +DEFFACE +defing +DEFPUSHBUTTON +defterm +DELAYLOAD +deletable +DELETEONRELEASE +delims +Delt +demoable +depersist +deprioritized +deps +deque +deref +deserialization +deserialize +deserialized +deserializer +deserializing +desktopwindowxamlsource +dest +DESTINATIONNAME +devblogs +developercommunity +devicecode +devicefamily +devops +Dext +df +DFactory +DFF +DFMT +dh +dhandler +dialogbox +diffing +DINLINE +directio +DIRECTX +Dirs +DISABLENOSCROLL +DISPLAYATTRIBUTE +DISPLAYATTRIBUTEPROPERTY +DISPLAYCHANGE +distro +dlg +DLGC +dll +dllexport +DLLGETVERSIONPROC +dllimport +dllinit +dllmain +DLLVERSIONINFO +DLOAD +DLOOK +dmp +DOCTYPE +docx +DONTCARE +doskey +dotnet +doubleclick +downlevel +dpg +dpi +DPIAPI +DPICHANGE +DPICHANGED +dpix +dpiy +DRAWFRAME +DRAWITEM +DRAWITEMSTRUCT +drcs +dropdown +DROPDOWNLIST +DROPFILES +drv +dsm +dst +DSwap +DTest +dtor +DTTERM +DUMMYUNIONNAME +DUNICODE +DUNIT +dup'ed +dvi +dw +DWLP +dwm +dwmapi +dword +dwrite +dwriteglyphrundescriptionclustermap +dxgi +dxgidwm +dxinterop +dxttbmp +eachother +eaf +EASTEUROPE +eb +ECH +echokey +ecount +ECpp +Edgium +EDITKEYS +EDITTEXT +EDITUPDATE +edputil +edu +Efast +EHsc +EJO +EK +ELEMENTNOTAVAILABLE +elems +elif +elseif +emacs +EMPTYBOX +enabledelayedexpansion +endian +endif +endl +endlocal +endptr +endregion +ENQ +enqueuing +entrypoint +ENU +enum +ENUMLOGFONT +ENUMLOGFONTEX +enumranges +envvar +eol +EPres +ERASEBKGND +errno +errorlevel +ETB +etcoreapp +ETW +ETX +EUDC +ev +EVENTID +eventing +everytime +evflags +evt +ewdelete +exe +execd +executables +executionengine +exemain +EXETYPE +exeuwp +exewin +exitwin +expectedinput +expr +EXPUNGECOMMANDHISTORY +EXSTYLE +EXTENDEDEDITKEY +EXTKEY +EXTTEXTOUT +facename +FACENODE +FACESIZE +failfast +FAILIFTHERE +fallthrough +FARPROC +fcb +fcharset +fclose +fcntl +fdc +FDD +fde +fdopen +fdw +fea +fesb +FFDE +FFrom +FGCOLOR +fgetc +fgetwc +FGHIJ +fgidx +FILEDESCRIPTION +fileno +filepath +FILESUBTYPE +FILESYSPATH +filesystem +FILETIME +FILETYPE +FILEW +FILLATTR +FILLCONSOLEOUTPUT +FILTERONPASTE +finalizer +FINDCASE +FINDDLG +FINDDOWN +FINDSTR +FINDSTRINGEXACT +FINDUP +FIter +FIXEDCONVERTED +Flg +flyout +fmodern +fmtarg +fmtid +fmtlib +FOLDERID +FONTCHANGE +fontdlg +FONTENUMDATA +FONTENUMPROC +FONTFACE +FONTFAMILY +FONTHEIGHT +fontlist +FONTOK +FONTSIZE +FONTSTRING +fonttbl +FONTTYPE +FONTWEIGHT +FONTWIDTH +FONTWINDOW +forceinline +FORCEOFFFEEDBACK +FORCEONFEEDBACK +FORCEV +foreach +fprintf +framebuffer +FRAMECHANGED +fre +freopen +frontend +Fscreen +FSCTL +FSINFOCLASS +fsproj +fstream +fte +Ftm +fullscreen +fullwidth +func +FUNCTIONCALL +fuzzer +fuzzmap +fuzzwrapper +fwdecl +fwe +fwlink +GAUSSIAN +gb +gci +gcx +gcy +gdi +gdip +gdirenderer +geopol +GETALIAS +GETALIASES +GETALIASESLENGTH +GETALIASEXES +GETALIASEXESLENGTH +GETAUTOHIDEBAREX +GETCARETWIDTH +getch +getchar +GETCLIENTAREAANIMATION +GETCOMMANDHISTORY +GETCOMMANDHISTORYLENGTH +GETCONSOLEINPUT +GETCONSOLEPROCESSLIST +GETCONSOLEWINDOW +GETCOUNT +GETCP +GETCURSEL +GETCURSORINFO +GETDISPLAYMODE +GETDISPLAYSIZE +GETDLGCODE +GETDPISCALEDSIZE +GETFONTINFO +GETFONTSIZE +GETHARDWARESTATE +GETHUNGAPPTIMEOUT +GETICON +GETITEMDATA +GETKEYBOARDLAYOUTNAME +GETKEYSTATE +GETLARGESTWINDOWSIZE +GETLBTEXT +getline +GETMINMAXINFO +GETMOUSEINFO +GETMOUSEVANISH +GETNUMBEROFFONTS +GETNUMBEROFINPUTEVENTS +GETOBJECT +GETPOS +GETSELECTIONINFO +getset +GETSTATE +GETTEXT +GETTEXTLEN +GETTITLE +GETWAITTOKILLSERVICETIMEOUT +GETWAITTOKILLTIMEOUT +GETWHEELSCROLLCHARACTERS +GETWHEELSCROLLCHARS +GETWHEELSCROLLLINES +getwriter +GFEh +Gfun +gfx +gh +GHIJK +GHIJKL +GHIJKLM +gitfilters +github +gitlab +gle +globals +gmail +GMEM +GNUC +Goldmine +gonce +Google +goutput +GPUs +Gravell's +grayscale +GREENSCROLL +Grehan +grep +Greyscale +gridline +groupbox +gset +gsl +GTP +guc +gui +guidatom +GValue +GWL +GWLP +gwsz +HABCDEF +Hackathon +halfwidth +HALTCOND +HANGEUL +hardcoded +hardcodes +hashalg +HASSTRINGS +hbitmap +hbm +HBMMENU +hbmp +hbr +hbrush +hc +HCmd +hdc +hdr +HDROP +hdrstop +HEIGHTSCROLL +hfile +hfont +hglobal +hh +hhh +hhook +hhx +HIBYTE +HICON +HIDEWINDOW +HIGHLIGHTTEXT +hinst +HINSTANCE +Hirots +HISTORYBUFS +HISTORYNODUP +HISTORYSIZE +hittest +HIWORD +hk +HKCU +hkey +hkl +HKLM +hlocal +hlsl +HMENU +hmod +hmodule +hmon +HMONITOR +horiz +HORZ +hostable +hostlib +HPA +HPAINTBUFFER +HPCON +hpj +hpp +HPR +HPROPSHEETPAGE +HProvider +HREDRAW +hresult +HRSRC +hscroll +hsl +hstr +hstring +hsv +HTCAPTION +HTCLIENT +htm +HTMAXBUTTON +HTMINBUTTON +html +HTMLTo +HTTOP +hu +hungapp +HVP +hwheel +hwnd +HWNDPARENT +hxx +IAccessibility +IAction +IApi +IApplication +IBase +icacls +iccex +icch +IChar +ico +IComponent +ICONERROR +Iconified +ICONINFORMATION +IConsole +ICONSTOP +IControl +ICONWARNING +ICore +IData +IDCANCEL +IDD +IDesktop +IDevice +IDictionary +IDISHWND +IDispatch +IDisposable +idl +idllib +IDOK +IDR +idth +idx +IDXGI +IDynamic +IEnd +IEnum +IEnumerable +ies +ietf +IFACEMETHODIMP +ifdef +ification +ifndef +IFont +ifstream +IGNOREEND +IHigh +IHosted +iid +IInitialize +IInput +IInspectable +IInteract +IInteractivity +IIo +IList +imagemagick +Imatch +ime +Imm +IMouse +impl +inbox +inclusivity +INCONTEXT +INFOEX +inheritcursor +inheritdoc +inheritfrom +ini +INITCOMMONCONTROLSEX +INITDIALOG +initguid +INITMENU +inkscape +inl +INLINEPREFIX +inlines +INotify +inout +inplace +inproc +Inputkeyinfo +INPUTPROCESSORPROFILE +inputrc +Inputreadhandledata +INSERTMODE +intellisense +INTERACTIVITYBASE +INTERCEPTCOPYPASTE +INTERNALNAME +interop +interoperability +inthread +intptr +intsafe +INVALIDARG +INVALIDATERECT +inwap +IObservable +ioctl +iomanip +iostream +iot +ipch +ipconfig +IPersist +ipp +IProperty +IPSINK +ipsp +IRaw +IRead +IReference +IRender +IRenderer +IScheme +ISelection +IShell +isocpp +issuecomment +IState +IStoryboard +isupper +ISwap +iswdigit +iswspace +ISystem +iterm +itermcolors +ITerminal +IText +itf +Ith +itoa +IUI +IUia +IUnknown +ivalid +IValue +IVector +IWait +iwch +IWeb +IWin +IWindow +IXaml +IXMP +jconcpp +JOBOBJECT +JOBOBJECTINFOCLASS +jpe +jpeg +jpg +JPN +json +jsoncpp +jsprovider +jumplist +KAttrs +kawa +kayla +Kazu +kazum +kbd +kcub +kcud +kcuf +kcuu +Kd +kernelbase +kernelbasestaging +KEYBDINPUT +keybinding +keychord +keydown +keyevent +KEYFIRST +KEYLAST +keymap +Keymapping +keyscan +keystate +keyup +KF +khome +KILLACTIVE +KILLFOCUS +kinda +KJ +KLF +KLMNO +KLMNOPQRST +KLMNOPQRSTQQQQQ +KU +KVM +KX +langid +LANGUAGELIST +lasterror +lastexitcode +LAYOUTRTL +LBN +LBound +LBUTTON +LBUTTONDBLCLK +LBUTTONDOWN +LBUTTONUP +lcb +LCONTROL +LCTRL +lcx +LEFTALIGN +LEFTSHIFT +len +lhs +libpopcnt +libtickit +LIMITTEXT +LINEDOWN +LINESELECTION +LINEWRAP +LINKERRCAP +LINKERROR +linkid +linkpath +linputfile +Linq +linux +listbox +listproperties +listptr +listptrsize +lk +lld +llvm +llx +LMENU +LMNOP +lnk +lnkd +lnkfile +LNM +LOADONCALL +LOBYTE +localappdata +localhost +locsrc +locstudio +Loewen +LOGFONT +LOGFONTW +logissue +lowercased +loword +lparam +lparen +LPBYTE +LPCCH +lpch +LPCHARSETINFO +LPCOLORREF +LPCPLINFO +LPCREATESTRUCT +lpcs +LPCSTR +LPCTSTR +LPCWSTR +lpdata +LPDBLIST +lpdis +LPDRAWITEMSTRUCT +lpdw +LPDWORD +lpelfe +lpfn +LPFNADDPROPSHEETPAGE +LPINT +lpl +LPMEASUREITEMSTRUCT +LPMINMAXINFO +lpmsg +LPNEWCPLINFO +LPNEWCPLINFOA +LPNEWCPLINFOW +LPNMHDR +lpntme +LPPOINT +LPPROC +LPPROPSHEETPAGE +LPPSHNOTIFY +lprc +LPRECT +lpstr +lpsz +LPTSTR +LPTTFONTLIST +lpv +LPVOID +LPW +LPWCH +LPWINDOWPOS +lpwpos +lpwstr +LRESULT +lru +lsb +lsconfig +lsproj +lss +lstatus +lstrcmp +lstrcmpi +LTEXT +LTLTLTLTL +ltype +LUID +lval +LVB +LVERTICAL +LWA +LWIN +lwkmvj +mailto +majorly +makeappx +MAKEINTRESOURCE +MAKEINTRESOURCEW +MAKELANGID +MAKELONG +MAKELPARAM +MAKELRESULT +malloc +manpage +MAPBITMAP +MAPVIRTUALKEY +MAPVK +MAXDIMENSTRING +maxing +MAXLENGTH +MAXSHORT +maxversiontested +MAXWORD +maybenull +MBUTTON +MBUTTONDBLCLK +MBUTTONDOWN +MBUTTONUP +Mbxy +mdmerge +MDs +MEASUREITEM +megamix +memallocator +memcmp +memcopy +memcpy +memmove +memset +MENUCHAR +MENUCONTROL +MENUDROPALIGNMENT +MENUITEM +MENUITEMINFO +MENUSELECT +Mersenne +messageext +metadata +metaproj +midl +mii +MIIM +milli +mimetype +mincore +mindbogglingly +mingw +minimizeall +minkernel +MINMAXINFO +mintty +minwin +minwindef +Mip +mkdir +MMBB +mmcc +MMCPL +mmsystem +MNC +MNOPQ +MNOPQR +MODALFRAME +modelproj +MODERNCORE +MONITORINFO +MONITORINFOEXW +MONITORINFOF +monospaced +monostate +MOUSEACTIVATE +MOUSEFIRST +MOUSEHWHEEL +MOUSEMOVE +mousewheel +MOVESTART +msb +msbuild +mscorlib +msctf +msctls +msdata +msdn +msft +MSGCMDLINEF +MSGF +MSGFILTER +MSGFLG +MSGMARKMODE +MSGS +MSGSCROLLMODE +MSGSELECTMODE +msiexec +MSIL +msix +msrc +msvcrt +MSVS +msys +msysgit +mui +Mul +multiline +munged +munges +mutex +mutexes +muxes +myapplet +mydir +myignite +MYMAX +Mypair +Myval +NAMELENGTH +nameof +namespace +namespaced +namestream +nano +natvis +nbsp +Nc +NCCALCSIZE +NCCREATE +NCLBUTTONDOWN +NCLBUTTONUP +NCMBUTTONDOWN +NCMBUTTONUP +NCPAINT +NCRBUTTONDOWN +NCRBUTTONUP +NCXBUTTONDOWN +NCXBUTTONUP +NDEBUG +ned +NEL +NEQ +netcoreapp +netstandard +NEWCPLINFO +NEWCPLINFOA +NEWCPLINFOW +newcursor +Newdelete +NEWINQUIRE +NEWINQURE +NEWPROCESSWINDOW +NEWTEXTMETRIC +NEWTEXTMETRICEX +Newtonsoft +NEXTLINE +nfe +nlength +Nls +NLSMODE +NOACTIVATE +NOAPPLYNOW +NOCLIP +NOCOLOR +NOCOMM +NOCONTEXTHELP +NOCOPYBITS +nodiscard +NODUP +noexcept +NOHELP +noinline +NOINTEGRALHEIGHT +NOINTERFACE +NOLINKINFO +nologo +NOMCX +NOMINMAX +NOMOVE +NONALERT +nonbreaking +nonclient +NONCONST +NONINFRINGEMENT +NONPREROTATED +nonspace +NOOWNERZORDER +NOPAINT +NOPQRST +noprofile +NOREDRAW +NOREMOVE +NOREPOSITION +noreturn +NORMALDISPLAY +NOSCRATCH +NOSEARCH +noselect +NOSENDCHANGING +NOSIZE +NOSNAPSHOT +NOTHOUSANDS +nothrow +NOTICKS +NOTIMPL +notin +NOTNULL +NOTOPMOST +NOTRACK +NOTSUPPORTED +nouicompat +nounihan +NOUPDATE +NOWAIT +NOYIELD +NOZORDER +NPM +npos +nrcs +NSTATUS +ntapi +ntcon +ntcsrdll +ntdef +NTDEV +ntdll +ntifs +ntlpcapi +ntm +ntrtl +ntstatus +ntsubauth +NTSYSCALLAPI +nttree +nturtl +ntuser +NTVDM +ntverp +NTWIN +nuget +nullness +nullonfailure +nullopt +nullptr +NULs +numlock +numpad +NUMSCROLL +nupkg +NVDA +NVIDIA +NVR +Nx +oa +OACR +oauth +objbase +ocf +ocolor +odl +oem +oemcp +OEMFONT +OEMFORMAT +offboarded +OI +Oj +OLEAUT +OLECHAR +onecore +ONECOREBASE +ONECORESDKTOOLS +ONECORESHELL +onecoreuap +onecoreuapuuid +onecoreuuid +ONECOREWINDOWS +onehalf +ONLCR +Oo +openconsoleproxy +openbash +opencode +opencon +openconsole +OPENIF +OPENLINK +openps +opensource +openvt +openxmlformats +oq +ORIGINALFILENAME +osc +OSCBG +OSCCT +OSCFG +OSCRCC +OSCSCB +OSCSCC +OSCWT +OSDEPENDSROOT +osfhandle +OSG +OSGENG +osign +oss +ostream +ostringstream +Ou +ouicompat +outdir +outfile +Outof +OUTOFCONTEXT +OUTOFMEMORY +outout +Outptr +Ov +OVERLAPPEDWINDOW +OWNDC +OWNERDRAWFIXED +packageuwp +PACKCOORD +PACKVERSION +pagedown +pageup +PAINTPARAMS +PAINTSTRUCT +PALPC +pankaj +params +parentable +parms +passthrough +PATCOPY +pathcch +PATTERNID +pb +PBOOL +PBYTE +pcat +pcb +pcch +PCCHAR +PCCONSOLE +PCD +pch +PCHAR +PCIDLIST +PCIS +PCLIENT +PCLONG +PCOBJECT +pcon +PCONSOLE +PCONSOLEENDTASK +PCONSOLESETFOREGROUND +PCONSOLEWINDOWOWNER +pcoord +pcs +pcshell +PCSHORT +PCSR +PCSTR +PCUNICODE +PCWCH +PCWCHAR +PCWSTR +pda +pdb +pdbonly +pdbstr +pdf +pdp +pdtobj +pdw +PDWORD +pdx +peb +PEMAGIC +PENDTASKMSG +pfa +PFACENODE +pfed +pfi +PFILE +pfn +PFNCONSOLECREATEIOTHREAD +PFONT +PFONTENUMDATA +PFS +pgdn +pguid +pgup +PHANDLE +phhook +phwnd +pid +pidl +PIDLIST +pii +pinam +pinvoke +pipename +pipestr +pixelheight +PIXELSLIST +PJOBOBJECT +pkey +placeholders +platforming +playsound +plist +PLOGICAL +plugin +PMv +png +pnm +PNMLINK +pntm +PNTSTATUS +POBJECT +Podcast +POINTSLIST +POLYTEXTW +popd +POPF +poppack +popup +POPUPATTR +PORFLG +positionals +posix +POSTCHARBREAKS +POSX +POSXSCROLL +POSYSCROLL +ppci +ppf +ppguid +ppidl +pplx +PPORT +PPROC +PPROCESS +ppropvar +ppsi +ppsl +ppsp +ppsz +ppv +ppwch +PQRST +pragma +prc +prealigned +prebuilt +precendence +precomp +prect +prefast +prefilled +prefs +preinstalled +PRELOAD +PREMULTIPLIED +prepopulated +presorted +PREVENTPINNING +PREVIEWLABEL +PREVIEWWINDOW +PREVLINE +prg +pri +printf +prioritization +processenv +processhost +PROCESSINFOCLASS +procs +Progman +proj +PROPERTYID +PROPERTYKEY +PROPERTYVAL +propsheet +PROPSHEETHEADER +PROPSHEETPAGE +propslib +propsys +PROPTITLE +propvar +propvariant +propvarutil +psa +psd +PSECURITY +pseudocode +pseudoconsole +pseudoterminal +psh +pshn +PSHNOTIFY +PSHORT +pshpack +PSINGLE +psl +psldl +psm +PSMALL +PSNRET +PSobject +psp +PSPCB +psr +PSTR +psuedoconsole +psz +ptch +ptr +ptrdiff +ptsz +PTYIn +PUCHAR +PULONG +PUNICODE +pushd +putchar +putwchar +pv +PVOID +pw +pwch +PWCHAR +PWDDMCONSOLECONTEXT +PWORD +pwsh +pwstr +pwsz +px +py +pythonw +qi +QJ +qo +QOL +QRSTU +qsort +queryable +QUESTIONMARK +quickedit +QWER +qzmp +RAII +RALT +rasterbar +rasterfont +rasterization +rawinput +RAWPATH +raytracers +razzlerc +rbar +rbegin +RBUTTON +RBUTTONDBLCLK +RBUTTONDOWN +RBUTTONUP +rcch +RCDATA +rcelms +rcl +rclsid +RCOA +RCOCA +RCOCW +RCONTROL +RCOW +rcv +rdbuf +RDONLY +rdpartysource +readback +READCONSOLE +READCONSOLEOUTPUT +READCONSOLEOUTPUTSTRING +Readline +readme +READMODE +readonly +READWRITE +realloc +reamapping +rects +redef +Redir +redirector +redist +redistributable +REDSCROLL +refactor +refactoring +REFCLSID +refcount +referencesource +REFGUID +REFIID +REFPROPERTYKEY +regex +REGISTEROS +REGISTERVDM +regkey +REGSTR +reingest +Relayout +RELBINPATH +remoting +renamer +renderengine +rendersize +reparent +reparenting +replatformed +Replymessage +repositorypath +rescap +Resequence +reserialize +RESETCONTENT +resheader +resizable +resmimetype +restrictedcapabilities +resw +resx +retval +rfa +rfc +rftp +rgb +rgba +rgbi +rgch +rgci +rgfae +rgfte +rgi +rgn +rgp +rgpwsz +rgrc +rgs +rgui +rgw +rgwch +rhs +ri +RIGHTALIGN +RIGHTBUTTON +riid +RIPMSG +Rl +rmdir +RMENU +roadmap +robomac +roundtrip +rparen +RRF +RRRGGGBB +rsas +rtcore +RTEXT +rtf +RTFTo +Rtl +RTLREADING +RTTI +ru +ruleset +runas +runasradio +RUNDLL +runformat +runft +RUNFULLSCREEN +runsettings +runtests +runtimeclass +runuia +runut +rvalue +RVERTICAL +rxvt +RWIN +safearray +SAFECAST +safemath +sba +SBCS +SBCSDBCS +sbi +sbiex +sbold +scancode +scanline +schemename +SCL +scm +scprintf +SCRBUF +SCRBUFSIZE +screenbuffer +SCREENBUFFERINFO +screeninfo +screenshot +scriptload +Scrollable +scrollback +scrollbar +Scrolldown +Scrolldownpage +Scroller +SCROLLFORWARD +SCROLLINFO +scrolllock +scrolloffset +SCROLLSCALE +SCROLLSCREENBUFFER +Scrollup +Scrolluppage +scursor +sddl +sdeleted +sdk +SDKDDK +searchbox +securityappcontainer +segfault +SELCHANGE +SELECTALL +selectany +SELECTEDFONT +SELECTSTRING +Selfhosters +SERVERDLL +SETACTIVE +SETBUDDYINT +SETCOLOR +setcp +SETCURSEL +SETCURSOR +SETCURSORINFO +SETCURSORPOSITION +SETDISPLAYMODE +setfill +SETFOCUS +SETFONT +SETFOREGROUND +SETHARDWARESTATE +SETHOTKEY +SETICON +setintegritylevel +SETITEMDATA +SETITEMHEIGHT +SETKEYSHORTCUTS +setlocal +setlocale +SETMENUCLOSE +setmode +SETNUMBEROFCOMMANDS +SETOS +SETPALETTE +SETPOS +SETRANGE +SETSCREENBUFFERSIZE +SETSEL +SETTEXTATTRIBUTE +SETTINGCHANGE +SETTITLE +setw +Setwindow +SETWINDOWINFO +sfi +SFINAE +SFUI +sgr +SHANDLE +SHCo +shcore +shellapi +shellex +shellscalingapi +SHFILEINFO +SHGFI +SHGFP +SHIFTJIS +Shl +shlguid +shlobj +shlwapi +SHORTPATH +SHOWCURSOR +SHOWMAXIMIZED +SHOWMINNOACTIVE +SHOWNOACTIVATE +SHOWNORMAL +SHOWWINDOW +SHRT +sid +sidebyside +SIF +SIGDN +SINGLEFLAG +SINGLETHREADED +siup +SIZEBOX +sizeof +SIZESCROLL +SKIPFONT +SKIPOWNPROCESS +SKIPOWNTHREAD +sku +sldl +SLGP +SLIST +slmult +sln +slpit +smalllogo +SManifest +SMARTQUOTE +SMTO +SND +SOLIDBOX +Solutiondir +somefile +SOURCEBRANCH +sourced +SOURCESDIRECTORY +SPACEBAR +spammy +spand +splashscreen +sprintf +sqlproj +srand +src +SRCCODEPAGE +SRCCOPY +SRCINVERT +srcsrv +SRCSRVTRG +srctool +sre +srect +srv +srvinit +srvpipe +ssh +sstream +stackoverflow +standalone +STARTF +STARTUPINFO +STARTUPINFOEX +STARTUPINFOEXW +STARTUPINFOW +STARTWPARMS +STARTWPARMSA +STARTWPARMSW +Statusline +stdafx +STDAPI +stdcall +stdcpp +stderr +stdexcept +stdin +stdio +STDMETHODCALLTYPE +STDMETHODIMP +stdout +stgm +stl +stoi +stol +storelogo +stoul +stoutapot +strikethrough +stringstream +STRINGTABLE +strlen +strrev +strsafe +strtok +structs +STUVWX +STX +stylecop +SUA +subcompartment +subkey +SUBLANG +sublicensable +submenu +subresource +subspan +substr +subsystemconsole +subsystemwindows +suiteless +svg +swapchain +swapchainpanel +swappable +SWMR +SWP +swprintf +sx +sy +SYMED +SYNCPAINT +syscalls +SYSCHAR +SYSCOMMAND +SYSDEADCHAR +Sysinternals +SYSKEYDOWN +SYSKEYUP +SYSLINK +SYSMENU +sysparams +sysparamsext +SYSTEMHAND +SYSTEMMENU +sz +tabview +TAdd +taef +TARG +targetentrypoint +TARGETLIBS +TARGETNAME +targetnametoken +targetsize +targetver +taskbar +tbar +TBase +tbc +tbi +Tbl +TBM +tchar +TCHFORMAT +TCI +tcome +tcommandline +tcommands +TDelegated +TDP +TEAMPROJECT +tearoff +Teb +techcommunity +technet +tellp +telnet +telnetd +templated +teraflop +terminalcore +TERMINALSCROLLING +terminfo +TEs +testapp +testbuildplatform +testcon +testd +testdlls +testenv +testlab +testlist +testmd +testmddefinition +testmode +testname +testnameprefix +TESTNULL +testpass +testpasses +testtestabc +testtesttesttesttest +testtimeout +TEXCOORD +texel +TExpected +textattribute +TEXTATTRIBUTEID +textbox +textboxes +textbuffer +TEXTINCLUDE +textinfo +TEXTMETRIC +TEXTMETRICW +textmode +tf +TFCAT +tfoo +TFunction +tga +threadpool +THUMBPOSITION +THUMBTRACK +TIcon +tif +tilunittests +Timeline +titlebar +TITLEISLINKNAME +TJson +tl +TLEN +Tlg +Tlgdata +TMAE +TMPF +TMult +tmultiple +tmux +todo +tofrom +tokenhelpers +tokenized +tokenizing +toolbars +TOOLINFO +Toolset +tooltip +TOPDOWNDIB +TOPLEFT +toplevel +TOPRIGHT +TOpt +tosign +touchpad +towlower +towupper +Tpp +Tpqrst +tprivapi +tracelog +tracelogging +traceloggingprovider +trackbar +TRACKCOMPOSITION +trackpad +transcoder +transitioning +Trd +TREX +triaged +triaging +TRIANGLESTRIP +TRIMZEROHEADINGS +truetype +trx +tsattrs +tsf +TStr +TSTRFORMAT +TSub +tt +TTBITMAP +ttf +TTFONT +TTFONTLIST +tthe +tthis +TTM +TTo +TVPP +Txtev +typechecked +typechecking +typedef +typeid +typeinfo +typelib +typename +typeof +typeparam +TYUI +UAC +uap +uapadmin +UAX +ubuntu +ucd +UCD +ucdxml +uch +UCHAR +ucs +udk +UDM +uer +uget +uia +UIACCESS +uiacore +uiautomationcore +Uid +uielem +UIELEMENTENABLEDONLY +uint +uintptr +ul +ulcch +ulong +Unadvise +unattend +uncomment +UNCPRIORITY +undef +Unescape +unexpand +Unfocus +unhighlighting +unhosted +unicode +UNICODESTRING +UNICODETEXT +UNICRT +UNINIT +uninitialize +uninstall +Uniscribe +unittest +unittesting +universaltest +Unk +unknwn +unmark +UNORM +unparseable +unpause +Unregister +Unregistering +unte +untests +untextured +untimes +UPDATEDISPLAY +UPDOWN +UPKEY +UPSS +upvote +uri +url +urlencoded +Urxvt +USASCII +usebackq +USECALLBACK +USECOLOR +USECOUNTCHARS +USEDEFAULT +USEDX +USEFILLATTRIBUTE +USEGLYPHCHARS +USEHICON +USEPOSITION +userbase +USERDATA +userdpiapi +username +Userp +userprivapi +userprofile +USERSRV +USESHOWWINDOW +USESIZE +USESTDHANDLES +ushort +USRDLL +utf +utils +utr +uuid +uuidof +uuidv +UVWX +UVWXY +UWA +uwp +uxtheme +vals +Vanara +vararg +vbproj +vclib +Vcount +vcpkg +vcprintf +vcproj +vcrt +vcvarsall +vcxitems +vcxproj +vec +VERCTRL +versioning +VERTBAR +vf +VFT +vga +vgaoem +viewkind +viewports +Virt +VIRTTERM +Virtualizing +vk +vkey +VKKEYSCAN +VMs +VPA +VPATH +VPR +VPrintf +VProc +VRaw +VREDRAW +vsc +vscprintf +VSCROLL +vsinfo +vsnprintf +vso +vspath +vsprintf +VSTAMP +vstest +VSTS +VSTT +vstudio +vswhere +vtapp +VTE +VTID +vtio +vtmode +vtpipeterm +vtpt +vtrenderer +VTRGB +VTRGBTo +vtseq +vtterm +vttest +VWX +waaay +waitable +waivable +WANSUNG +WANTARROWS +WANTTAB +wapproj +wav +wbuilder +wch +wchar +WCIA +WCIW +WClass +wcout +wcschr +wcscmp +wcscpy +WCSHELPER +wcsicmp +wcslen +wcsnicmp +wcsrchr +wcsrev +wcstod +wcstoul +wddm +wddmcon +wddmconrenderer +WDDMCONSOLECONTEXT +wdm +webpage +website +websocket +wekyb +WEOF +wex +wextest +wextestclass +wfdopen +WFill +wfopen +wfstream +WHelper +whitelisting +WIDTHSCROLL +Widthx +wiki +wikia +wikipedia +wil +WImpl +WINAPI +winbase +winbasep +wincon +winconp +winconpty +winconptydll +winconptylib +wincontypes +WINCORE +windbg +WINDEF +WINDIR +windll +WINDOWALPHA +Windowbuffer +windowdpiapi +WINDOWEDGE +windowext +WINDOWFRAME +windowime +WINDOWINFO +windowio +windowmetrics +WINDOWPLACEMENT +windowpos +WINDOWPOSCHANGED +WINDOWPOSCHANGING +windowproc +windowrect +windowsapp +windowsinternalstring +WINDOWSIZE +windowsx +WINDOWTEXT +windowtheme +WINDOWTITLE +winevent +winfx +wingdi +winget +WINIDE +winioctl +winmd +winmeta +winmgr +winmm +winnt +Winperf +WInplace +winres +winrt +wintelnet +winternl +winuser +winuserp +WINVER +wistd +wixproj +wline +wlinestream +wmain +WMSZ +wnd +WNDALLOC +WNDCLASS +WNDCLASSEX +WNDCLASSW +Wndproc +WNegative +WNull +wnwb +workarea +workaround +workflow +workitem +wostream +WOutside +WOWARM +WOWx +wparam +WPartial +wpf +WPR +WPrep +WPresent +wprintf +wprp +wprpi +wregex +WResult +writeback +writechar +WRITECONSOLE +WRITECONSOLEINPUT +WRITECONSOLEOUTPUT +WRITECONSOLEOUTPUTSTRING +wrl +wrp +WRunoff +WScript +wsl +WSLENV +wsmatch +WSpace +wss +wstr +wstring +wstringstream +wsz +wtd +WTest +WTEXT +WTo +wtof +wtoi +WTs +wtw +wtypes +Wubi +WUX +WVerify +wwaproj +WWith +wx +wxh +xa +xact +xamarin +xaml +Xamlmeta +xargs +xaz +xbf +xbutton +XBUTTONDBLCLK +XBUTTONDOWN +XBUTTONUP +XCast +XCENTER +XColors +xcopy +XCount +xdy +XEncoding +xes +Xes +XES +xff +XFile +XManifest +XMath +XMFLOAT +xml +xmlns +xor +xorg +XOrg +Xpath +XPosition +XResource +xsd +xsi +xsize +XSubstantial +xtended +xterm +XTest +XTPUSHSGR +XTPOPSGR +xunit +xutr +xvalue +XVIRTUALSCREEN +XWalk +xy +Xzn +yact +YAML +YCast +YCENTER +YCount +YDPI +yml +YOffset +YPosition +YSize +YSubstantial +YVIRTUALSCREEN +Yw +YWalk +yx +YZ +Zc +ZCmd +ZCtrl +zd +zh +ZM +zsh +zu +zxcvbnm +zy diff --git a/src/buffer/out/TextAttribute.cpp b/src/buffer/out/TextAttribute.cpp index dd6be654efa..1d96ed645f4 100644 --- a/src/buffer/out/TextAttribute.cpp +++ b/src/buffer/out/TextAttribute.cpp @@ -81,6 +81,32 @@ bool TextAttribute::IsLegacy() const noexcept return _foreground.IsLegacy() && _background.IsLegacy(); } +// Routine Description: +// - Makes this TextAttribute's foreground color the same as the other one. +// Arguments: +// - The TextAttribute to copy the foreground color from +// Return Value: +// - +void TextAttribute::SetForegroundFrom(const TextAttribute& other) noexcept +{ + _foreground = other._foreground; + WI_ClearAllFlags(_wAttrLegacy, FG_ATTRS); + _wAttrLegacy |= (other._wAttrLegacy & FG_ATTRS); +} + +// Routine Description: +// - Makes this TextAttribute's background color the same as the other one. +// Arguments: +// - The TextAttribute to copy the background color from +// Return Value: +// - +void TextAttribute::SetBackgroundFrom(const TextAttribute& other) noexcept +{ + _background = other._background; + WI_ClearAllFlags(_wAttrLegacy, BG_ATTRS); + _wAttrLegacy |= (other._wAttrLegacy & BG_ATTRS); +} + // Routine Description: // - Calculates rgb colors based off of current color table and active modification attributes. // Arguments: diff --git a/src/buffer/out/TextAttribute.hpp b/src/buffer/out/TextAttribute.hpp index ef140e39b77..44b31abd461 100644 --- a/src/buffer/out/TextAttribute.hpp +++ b/src/buffer/out/TextAttribute.hpp @@ -72,6 +72,9 @@ class TextAttribute final const bool reverseScreenMode = false, const bool blinkingIsFaint = false) const noexcept; + void SetForegroundFrom(const TextAttribute& other) noexcept; + void SetBackgroundFrom(const TextAttribute& other) noexcept; + bool IsLeadingByte() const noexcept; bool IsTrailingByte() const noexcept; bool IsTopHorizontalDisplayed() const noexcept; diff --git a/src/cascadia/TerminalCore/ITerminalApi.hpp b/src/cascadia/TerminalCore/ITerminalApi.hpp index 0ea02440d15..bc1c63fd89a 100644 --- a/src/cascadia/TerminalCore/ITerminalApi.hpp +++ b/src/cascadia/TerminalCore/ITerminalApi.hpp @@ -70,6 +70,9 @@ namespace Microsoft::Terminal::Core virtual bool SetWorkingDirectory(std::wstring_view uri) noexcept = 0; virtual std::wstring_view GetWorkingDirectory() noexcept = 0; + virtual bool PushGraphicsRendition(const ::Microsoft::Console::VirtualTerminal::VTParameters options) noexcept = 0; + virtual bool PopGraphicsRendition() noexcept = 0; + protected: ITerminalApi() = default; }; diff --git a/src/cascadia/TerminalCore/Terminal.hpp b/src/cascadia/TerminalCore/Terminal.hpp index dcd64d71c88..d3a051df94a 100644 --- a/src/cascadia/TerminalCore/Terminal.hpp +++ b/src/cascadia/TerminalCore/Terminal.hpp @@ -6,6 +6,7 @@ #include #include "../../buffer/out/textBuffer.hpp" +#include "../../types/inc/sgrStack.hpp" #include "../../renderer/inc/BlinkingState.hpp" #include "../../terminal/parser/StateMachine.hpp" #include "../../terminal/input/terminalInput.hpp" @@ -124,6 +125,10 @@ class Microsoft::Terminal::Core::Terminal final : bool SetTaskbarProgress(const size_t state, const size_t progress) noexcept override; bool SetWorkingDirectory(std::wstring_view uri) noexcept override; std::wstring_view GetWorkingDirectory() noexcept override; + + bool PushGraphicsRendition(const ::Microsoft::Console::VirtualTerminal::VTParameters options) noexcept override; + bool PopGraphicsRendition() noexcept override; + #pragma endregion #pragma region ITerminalInput @@ -347,6 +352,8 @@ class Microsoft::Terminal::Core::Terminal final : COORD _ConvertToBufferCell(const COORD viewportPos) const; #pragma endregion + Microsoft::Console::VirtualTerminal::SgrStack _sgrStack; + #ifdef UNIT_TESTING friend class TerminalCoreUnitTests::TerminalBufferTests; friend class TerminalCoreUnitTests::TerminalApiTest; diff --git a/src/cascadia/TerminalCore/TerminalApi.cpp b/src/cascadia/TerminalCore/TerminalApi.cpp index 9bbf8901d62..aaf61778dbf 100644 --- a/src/cascadia/TerminalCore/TerminalApi.cpp +++ b/src/cascadia/TerminalCore/TerminalApi.cpp @@ -640,3 +640,31 @@ std::wstring_view Terminal::GetWorkingDirectory() noexcept { return _workingDirectory; } + +// Method Description: +// - Saves the current text attributes to an internal stack. +// Arguments: +// - options, cOptions: if present, specify which portions of the current text attributes +// should be saved. Only a small subset of GraphicsOptions are actually supported; +// others are ignored. If no options are specified, all attributes are stored. +// Return Value: +// - true +bool Terminal::PushGraphicsRendition(const VTParameters options) noexcept +{ + _sgrStack.Push(_buffer->GetCurrentAttributes(), options); + return true; +} + +// Method Description: +// - Restores text attributes from the internal stack. If only portions of text attributes +// were saved, combines those with the current attributes. +// Arguments: +// - +// Return Value: +// - true +bool Terminal::PopGraphicsRendition() noexcept +{ + const TextAttribute current = _buffer->GetCurrentAttributes(); + _buffer->SetCurrentAttributes(_sgrStack.Pop(current)); + return true; +} diff --git a/src/cascadia/TerminalCore/TerminalDispatch.hpp b/src/cascadia/TerminalCore/TerminalDispatch.hpp index c36e5b48e0d..d01beae8081 100644 --- a/src/cascadia/TerminalCore/TerminalDispatch.hpp +++ b/src/cascadia/TerminalCore/TerminalDispatch.hpp @@ -18,6 +18,9 @@ class TerminalDispatch : public Microsoft::Console::VirtualTerminal::TermDispatc bool SetGraphicsRendition(const ::Microsoft::Console::VirtualTerminal::VTParameters options) noexcept override; + bool PushGraphicsRendition(const ::Microsoft::Console::VirtualTerminal::VTParameters options) noexcept override; + bool PopGraphicsRendition() noexcept override; + bool CursorPosition(const size_t line, const size_t column) noexcept override; // CUP diff --git a/src/cascadia/TerminalCore/TerminalDispatchGraphics.cpp b/src/cascadia/TerminalCore/TerminalDispatchGraphics.cpp index 35755bf9f2a..c70d61b0554 100644 --- a/src/cascadia/TerminalCore/TerminalDispatchGraphics.cpp +++ b/src/cascadia/TerminalCore/TerminalDispatchGraphics.cpp @@ -276,3 +276,13 @@ bool TerminalDispatch::SetGraphicsRendition(const VTParameters options) noexcept _terminalApi.SetTextAttributes(attr); return true; } + +bool TerminalDispatch::PushGraphicsRendition(const VTParameters options) noexcept +{ + return _terminalApi.PushGraphicsRendition(options); +} + +bool TerminalDispatch::PopGraphicsRendition() noexcept +{ + return _terminalApi.PopGraphicsRendition(); +} diff --git a/src/terminal/adapter/DispatchTypes.hpp b/src/terminal/adapter/DispatchTypes.hpp index 36817734882..e28dde68252 100644 --- a/src/terminal/adapter/DispatchTypes.hpp +++ b/src/terminal/adapter/DispatchTypes.hpp @@ -311,6 +311,40 @@ namespace Microsoft::Console::VirtualTerminal::DispatchTypes BrightBackgroundWhite = 107, }; + // Many of these correspond directly to SGR parameters (the GraphicsOptions enum), but + // these are distinct (notably 10 and 11, which as SGR parameters would select fonts, + // are used here to indicate that the foreground/background colors should be saved). + // From xterm's ctlseqs doc for XTPUSHSGR: + // + // Ps = 1 => Bold. + // Ps = 2 => Faint. + // Ps = 3 => Italicized. + // Ps = 4 => Underlined. + // Ps = 5 => Blink. + // Ps = 7 => Inverse. + // Ps = 8 => Invisible. + // Ps = 9 => Crossed-out characters. + // Ps = 2 1 => Doubly-underlined. + // Ps = 3 0 => Foreground color. + // Ps = 3 1 => Background color. + // + enum class SgrSaveRestoreStackOptions : size_t + { + All = 0, + Boldness = 1, + Faintness = 2, + Italics = 3, + Underline = 4, + Blink = 5, + Negative = 7, + Invisible = 8, + CrossedOut = 9, + DoublyUnderlined = 21, + SaveForegroundColor = 30, + SaveBackgroundColor = 31, + Max = SaveBackgroundColor + }; + enum class AnsiStatusType : size_t { OS_OperatingStatus = 5, diff --git a/src/terminal/adapter/ITermDispatch.hpp b/src/terminal/adapter/ITermDispatch.hpp index 92f9765139d..e18f0cd46ab 100644 --- a/src/terminal/adapter/ITermDispatch.hpp +++ b/src/terminal/adapter/ITermDispatch.hpp @@ -89,6 +89,9 @@ class Microsoft::Console::VirtualTerminal::ITermDispatch virtual bool SetGraphicsRendition(const VTParameters options) = 0; // SGR + virtual bool PushGraphicsRendition(const VTParameters options) = 0; // XTPUSHSGR + virtual bool PopGraphicsRendition() = 0; // XTPOPSGR + virtual bool SetMode(const DispatchTypes::ModeParams param) = 0; // DECSET virtual bool ResetMode(const DispatchTypes::ModeParams param) = 0; // DECRST diff --git a/src/terminal/adapter/adaptDispatch.hpp b/src/terminal/adapter/adaptDispatch.hpp index deb468da4a2..667119c0efe 100644 --- a/src/terminal/adapter/adaptDispatch.hpp +++ b/src/terminal/adapter/adaptDispatch.hpp @@ -1,206 +1,211 @@ -/*++ -Copyright (c) Microsoft Corporation -Licensed under the MIT license. - -Module Name: -- adaptDispatch.hpp - -Abstract: -- This serves as the Windows Console API-specific implementation of the callbacks from our generic Virtual Terminal parser. - -Author(s): -- Michael Niksa (MiNiksa) 30-July-2015 ---*/ - -#pragma once - -#include "termDispatch.hpp" -#include "DispatchCommon.hpp" -#include "conGetSet.hpp" -#include "adaptDefaults.hpp" -#include "terminalOutput.hpp" - -namespace Microsoft::Console::VirtualTerminal -{ - class AdaptDispatch : public ITermDispatch - { - public: - AdaptDispatch(std::unique_ptr pConApi, - std::unique_ptr pDefaults); - - void Execute(const wchar_t wchControl) override - { - _pDefaults->Execute(wchControl); - } - - void PrintString(const std::wstring_view string) override; - void Print(const wchar_t wchPrintable) override; - - bool CursorUp(const size_t distance) override; // CUU - bool CursorDown(const size_t distance) override; // CUD - bool CursorForward(const size_t distance) override; // CUF - bool CursorBackward(const size_t distance) override; // CUB, BS - bool CursorNextLine(const size_t distance) override; // CNL - bool CursorPrevLine(const size_t distance) override; // CPL - bool CursorHorizontalPositionAbsolute(const size_t column) override; // HPA, CHA - bool VerticalLinePositionAbsolute(const size_t line) override; // VPA - bool HorizontalPositionRelative(const size_t distance) override; // HPR - bool VerticalPositionRelative(const size_t distance) override; // VPR - bool CursorPosition(const size_t line, const size_t column) override; // CUP, HVP - bool CursorSaveState() override; // DECSC - bool CursorRestoreState() override; // DECRC - bool CursorVisibility(const bool isVisible) override; // DECTCEM - bool EraseInDisplay(const DispatchTypes::EraseType eraseType) override; // ED - bool EraseInLine(const DispatchTypes::EraseType eraseType) override; // EL - bool EraseCharacters(const size_t numChars) override; // ECH - bool InsertCharacter(const size_t count) override; // ICH - bool DeleteCharacter(const size_t count) override; // DCH - bool SetGraphicsRendition(const VTParameters options) override; // SGR - bool DeviceStatusReport(const DispatchTypes::AnsiStatusType statusType) override; // DSR, DSR-OS, DSR-CPR - bool DeviceAttributes() override; // DA1 - bool SecondaryDeviceAttributes() override; // DA2 - bool TertiaryDeviceAttributes() override; // DA3 - bool Vt52DeviceAttributes() override; // VT52 Identify - bool RequestTerminalParameters(const DispatchTypes::ReportingPermission permission) override; // DECREQTPARM - bool ScrollUp(const size_t distance) override; // SU - bool ScrollDown(const size_t distance) override; // SD - bool InsertLine(const size_t distance) override; // IL - bool DeleteLine(const size_t distance) override; // DL - bool SetColumns(const size_t columns) override; // DECCOLM - bool SetMode(const DispatchTypes::ModeParams param) override; // DECSET - bool ResetMode(const DispatchTypes::ModeParams param) override; // DECRST - bool SetCursorKeysMode(const bool applicationMode) override; // DECCKM - bool SetKeypadMode(const bool applicationMode) override; // DECKPAM, DECKPNM - bool EnableWin32InputMode(const bool win32InputMode) override; // win32-input-mode - bool EnableCursorBlinking(const bool enable) override; // ATT610 - bool SetAnsiMode(const bool ansiMode) override; // DECANM - bool SetScreenMode(const bool reverseMode) override; // DECSCNM - bool SetOriginMode(const bool relativeMode) noexcept override; // DECOM - bool SetAutoWrapMode(const bool wrapAtEOL) override; // DECAWM - bool SetTopBottomScrollingMargins(const size_t topMargin, - const size_t bottomMargin) override; // DECSTBM - bool WarningBell() override; // BEL - bool CarriageReturn() override; // CR - bool LineFeed(const DispatchTypes::LineFeedType lineFeedType) override; // IND, NEL, LF, FF, VT - bool ReverseLineFeed() override; // RI - bool SetWindowTitle(const std::wstring_view title) override; // OSCWindowTitle - bool UseAlternateScreenBuffer() override; // ASBSET - bool UseMainScreenBuffer() override; // ASBRST - bool HorizontalTabSet() override; // HTS - bool ForwardTab(const size_t numTabs) override; // CHT, HT - bool BackwardsTab(const size_t numTabs) override; // CBT - bool TabClear(const DispatchTypes::TabClearType clearType) override; // TBC - bool DesignateCodingSystem(const VTID codingSystem) override; // DOCS - bool Designate94Charset(const size_t gsetNumber, const VTID charset) override; // SCS - bool Designate96Charset(const size_t gsetNumber, const VTID charset) override; // SCS - bool LockingShift(const size_t gsetNumber) override; // LS0, LS1, LS2, LS3 - bool LockingShiftRight(const size_t gsetNumber) override; // LS1R, LS2R, LS3R - bool SingleShift(const size_t gsetNumber) override; // SS2, SS3 - bool SoftReset() override; // DECSTR - bool HardReset() override; // RIS - bool ScreenAlignmentPattern() override; // DECALN - bool EnableDECCOLMSupport(const bool enabled) noexcept override; // ?40 - bool EnableVT200MouseMode(const bool enabled) override; // ?1000 - bool EnableUTF8ExtendedMouseMode(const bool enabled) override; // ?1005 - bool EnableSGRExtendedMouseMode(const bool enabled) override; // ?1006 - bool EnableButtonEventMouseMode(const bool enabled) override; // ?1002 - bool EnableAnyEventMouseMode(const bool enabled) override; // ?1003 - bool EnableAlternateScroll(const bool enabled) override; // ?1007 - bool EnableXtermBracketedPasteMode(const bool enabled) noexcept override; // ?2004 - bool SetCursorStyle(const DispatchTypes::CursorStyle cursorStyle) override; // DECSCUSR - bool SetCursorColor(const COLORREF cursorColor) override; - - bool SetClipboard(const std::wstring_view content) noexcept override; // OSCSetClipboard - - bool SetColorTableEntry(const size_t tableIndex, - const DWORD color) override; // OSCColorTable - bool SetDefaultForeground(const DWORD color) override; // OSCDefaultForeground - bool SetDefaultBackground(const DWORD color) override; // OSCDefaultBackground - - bool WindowManipulation(const DispatchTypes::WindowManipulationType function, - const VTParameter parameter1, - const VTParameter parameter2) override; // DTTERM_WindowManipulation - - bool AddHyperlink(const std::wstring_view uri, const std::wstring_view params) override; - bool EndHyperlink() override; - - bool DoConEmuAction(const std::wstring_view string) noexcept override; - - private: - enum class ScrollDirection - { - Up, - Down - }; - struct CursorState - { - unsigned int Row = 1; - unsigned int Column = 1; - bool IsOriginModeRelative = false; - TextAttribute Attributes = {}; - TerminalOutput TermOutput = {}; - unsigned int CodePage = 0; - }; - struct Offset - { - int Value; - bool IsAbsolute; - // VT origin is at 1,1 so we need to subtract 1 from absolute positions. - static constexpr Offset Absolute(const size_t value) { return { gsl::narrow_cast(value) - 1, true }; }; - static constexpr Offset Forward(const size_t value) { return { gsl::narrow_cast(value), false }; }; - static constexpr Offset Backward(const size_t value) { return { -gsl::narrow_cast(value), false }; }; - static constexpr Offset Unchanged() { return Forward(0); }; - }; - - bool _CursorMovePosition(const Offset rowOffset, const Offset colOffset, const bool clampInMargins) const; - bool _EraseSingleLineHelper(const CONSOLE_SCREEN_BUFFER_INFOEX& csbiex, - const DispatchTypes::EraseType eraseType, - const size_t lineId) const; - bool _EraseScrollback(); - bool _EraseAll(); - bool _InsertDeleteHelper(const size_t count, const bool isInsert) const; - bool _ScrollMovement(const ScrollDirection dir, const size_t distance) const; - - bool _DoSetTopBottomScrollingMargins(const size_t topMargin, - const size_t bottomMargin); - bool _OperatingStatus() const; - bool _CursorPositionReport() const; - - bool _WriteResponse(const std::wstring_view reply) const; - bool _ModeParamsHelper(const DispatchTypes::ModeParams param, const bool enable); - bool _DoDECCOLMHelper(const size_t columns); - - bool _ClearSingleTabStop(); - bool _ClearAllTabStops() noexcept; - void _ResetTabStops() noexcept; - void _InitTabStopsForWidth(const size_t width); - - bool _ShouldPassThroughInputModeChange() const; - - std::vector _tabStopColumns; - bool _initDefaultTabStops = true; - - std::unique_ptr _pConApi; - std::unique_ptr _pDefaults; - TerminalOutput _termOutput; - std::optional _initialCodePage; - - // We have two instances of the saved cursor state, because we need - // one for the main buffer (at index 0), and another for the alt buffer - // (at index 1). The _usingAltBuffer property keeps tracks of which - // buffer is active, so can be used as an index into this array to - // obtain the saved state that should be currently active. - std::array _savedCursorState; - bool _usingAltBuffer; - - SMALL_RECT _scrollMargins; - - bool _isOriginModeRelative; - - bool _isDECCOLMAllowed; - - size_t _SetRgbColorsHelper(const VTParameters options, - TextAttribute& attr, - const bool isForeground) noexcept; - }; -} +/*++ +Copyright (c) Microsoft Corporation +Licensed under the MIT license. + +Module Name: +- adaptDispatch.hpp + +Abstract: +- This serves as the Windows Console API-specific implementation of the callbacks from our generic Virtual Terminal parser. + +Author(s): +- Michael Niksa (MiNiksa) 30-July-2015 +--*/ + +#pragma once + +#include "termDispatch.hpp" +#include "DispatchCommon.hpp" +#include "conGetSet.hpp" +#include "adaptDefaults.hpp" +#include "terminalOutput.hpp" +#include "..\..\types\inc\sgrStack.hpp" + +namespace Microsoft::Console::VirtualTerminal +{ + class AdaptDispatch : public ITermDispatch + { + public: + AdaptDispatch(std::unique_ptr pConApi, + std::unique_ptr pDefaults); + + void Execute(const wchar_t wchControl) override + { + _pDefaults->Execute(wchControl); + } + + void PrintString(const std::wstring_view string) override; + void Print(const wchar_t wchPrintable) override; + + bool CursorUp(const size_t distance) override; // CUU + bool CursorDown(const size_t distance) override; // CUD + bool CursorForward(const size_t distance) override; // CUF + bool CursorBackward(const size_t distance) override; // CUB, BS + bool CursorNextLine(const size_t distance) override; // CNL + bool CursorPrevLine(const size_t distance) override; // CPL + bool CursorHorizontalPositionAbsolute(const size_t column) override; // HPA, CHA + bool VerticalLinePositionAbsolute(const size_t line) override; // VPA + bool HorizontalPositionRelative(const size_t distance) override; // HPR + bool VerticalPositionRelative(const size_t distance) override; // VPR + bool CursorPosition(const size_t line, const size_t column) override; // CUP, HVP + bool CursorSaveState() override; // DECSC + bool CursorRestoreState() override; // DECRC + bool CursorVisibility(const bool isVisible) override; // DECTCEM + bool EraseInDisplay(const DispatchTypes::EraseType eraseType) override; // ED + bool EraseInLine(const DispatchTypes::EraseType eraseType) override; // EL + bool EraseCharacters(const size_t numChars) override; // ECH + bool InsertCharacter(const size_t count) override; // ICH + bool DeleteCharacter(const size_t count) override; // DCH + bool SetGraphicsRendition(const VTParameters options) override; // SGR + bool PushGraphicsRendition(const VTParameters options) override; // XTPUSHSGR + bool PopGraphicsRendition() override; // XTPOPSGR + bool DeviceStatusReport(const DispatchTypes::AnsiStatusType statusType) override; // DSR, DSR-OS, DSR-CPR + bool DeviceAttributes() override; // DA1 + bool SecondaryDeviceAttributes() override; // DA2 + bool TertiaryDeviceAttributes() override; // DA3 + bool Vt52DeviceAttributes() override; // VT52 Identify + bool RequestTerminalParameters(const DispatchTypes::ReportingPermission permission) override; // DECREQTPARM + bool ScrollUp(const size_t distance) override; // SU + bool ScrollDown(const size_t distance) override; // SD + bool InsertLine(const size_t distance) override; // IL + bool DeleteLine(const size_t distance) override; // DL + bool SetColumns(const size_t columns) override; // DECCOLM + bool SetMode(const DispatchTypes::ModeParams param) override; // DECSET + bool ResetMode(const DispatchTypes::ModeParams param) override; // DECRST + bool SetCursorKeysMode(const bool applicationMode) override; // DECCKM + bool SetKeypadMode(const bool applicationMode) override; // DECKPAM, DECKPNM + bool EnableWin32InputMode(const bool win32InputMode) override; // win32-input-mode + bool EnableCursorBlinking(const bool enable) override; // ATT610 + bool SetAnsiMode(const bool ansiMode) override; // DECANM + bool SetScreenMode(const bool reverseMode) override; // DECSCNM + bool SetOriginMode(const bool relativeMode) noexcept override; // DECOM + bool SetAutoWrapMode(const bool wrapAtEOL) override; // DECAWM + bool SetTopBottomScrollingMargins(const size_t topMargin, + const size_t bottomMargin) override; // DECSTBM + bool WarningBell() override; // BEL + bool CarriageReturn() override; // CR + bool LineFeed(const DispatchTypes::LineFeedType lineFeedType) override; // IND, NEL, LF, FF, VT + bool ReverseLineFeed() override; // RI + bool SetWindowTitle(const std::wstring_view title) override; // OSCWindowTitle + bool UseAlternateScreenBuffer() override; // ASBSET + bool UseMainScreenBuffer() override; // ASBRST + bool HorizontalTabSet() override; // HTS + bool ForwardTab(const size_t numTabs) override; // CHT, HT + bool BackwardsTab(const size_t numTabs) override; // CBT + bool TabClear(const DispatchTypes::TabClearType clearType) override; // TBC + bool DesignateCodingSystem(const VTID codingSystem) override; // DOCS + bool Designate94Charset(const size_t gsetNumber, const VTID charset) override; // SCS + bool Designate96Charset(const size_t gsetNumber, const VTID charset) override; // SCS + bool LockingShift(const size_t gsetNumber) override; // LS0, LS1, LS2, LS3 + bool LockingShiftRight(const size_t gsetNumber) override; // LS1R, LS2R, LS3R + bool SingleShift(const size_t gsetNumber) override; // SS2, SS3 + bool SoftReset() override; // DECSTR + bool HardReset() override; // RIS + bool ScreenAlignmentPattern() override; // DECALN + bool EnableDECCOLMSupport(const bool enabled) noexcept override; // ?40 + bool EnableVT200MouseMode(const bool enabled) override; // ?1000 + bool EnableUTF8ExtendedMouseMode(const bool enabled) override; // ?1005 + bool EnableSGRExtendedMouseMode(const bool enabled) override; // ?1006 + bool EnableButtonEventMouseMode(const bool enabled) override; // ?1002 + bool EnableAnyEventMouseMode(const bool enabled) override; // ?1003 + bool EnableAlternateScroll(const bool enabled) override; // ?1007 + bool EnableXtermBracketedPasteMode(const bool enabled) noexcept override; // ?2004 + bool SetCursorStyle(const DispatchTypes::CursorStyle cursorStyle) override; // DECSCUSR + bool SetCursorColor(const COLORREF cursorColor) override; + + bool SetClipboard(const std::wstring_view content) noexcept override; // OSCSetClipboard + + bool SetColorTableEntry(const size_t tableIndex, + const DWORD color) override; // OSCColorTable + bool SetDefaultForeground(const DWORD color) override; // OSCDefaultForeground + bool SetDefaultBackground(const DWORD color) override; // OSCDefaultBackground + + bool WindowManipulation(const DispatchTypes::WindowManipulationType function, + const VTParameter parameter1, + const VTParameter parameter2) override; // DTTERM_WindowManipulation + + bool AddHyperlink(const std::wstring_view uri, const std::wstring_view params) override; + bool EndHyperlink() override; + + bool DoConEmuAction(const std::wstring_view string) noexcept override; + + private: + enum class ScrollDirection + { + Up, + Down + }; + struct CursorState + { + unsigned int Row = 1; + unsigned int Column = 1; + bool IsOriginModeRelative = false; + TextAttribute Attributes = {}; + TerminalOutput TermOutput = {}; + unsigned int CodePage = 0; + }; + struct Offset + { + int Value; + bool IsAbsolute; + // VT origin is at 1,1 so we need to subtract 1 from absolute positions. + static constexpr Offset Absolute(const size_t value) { return { gsl::narrow_cast(value) - 1, true }; }; + static constexpr Offset Forward(const size_t value) { return { gsl::narrow_cast(value), false }; }; + static constexpr Offset Backward(const size_t value) { return { -gsl::narrow_cast(value), false }; }; + static constexpr Offset Unchanged() { return Forward(0); }; + }; + + bool _CursorMovePosition(const Offset rowOffset, const Offset colOffset, const bool clampInMargins) const; + bool _EraseSingleLineHelper(const CONSOLE_SCREEN_BUFFER_INFOEX& csbiex, + const DispatchTypes::EraseType eraseType, + const size_t lineId) const; + bool _EraseScrollback(); + bool _EraseAll(); + bool _InsertDeleteHelper(const size_t count, const bool isInsert) const; + bool _ScrollMovement(const ScrollDirection dir, const size_t distance) const; + + bool _DoSetTopBottomScrollingMargins(const size_t topMargin, + const size_t bottomMargin); + bool _OperatingStatus() const; + bool _CursorPositionReport() const; + + bool _WriteResponse(const std::wstring_view reply) const; + bool _ModeParamsHelper(const DispatchTypes::ModeParams param, const bool enable); + bool _DoDECCOLMHelper(const size_t columns); + + bool _ClearSingleTabStop(); + bool _ClearAllTabStops() noexcept; + void _ResetTabStops() noexcept; + void _InitTabStopsForWidth(const size_t width); + + bool _ShouldPassThroughInputModeChange() const; + + std::vector _tabStopColumns; + bool _initDefaultTabStops = true; + + std::unique_ptr _pConApi; + std::unique_ptr _pDefaults; + TerminalOutput _termOutput; + std::optional _initialCodePage; + + // We have two instances of the saved cursor state, because we need + // one for the main buffer (at index 0), and another for the alt buffer + // (at index 1). The _usingAltBuffer property keeps tracks of which + // buffer is active, so can be used as an index into this array to + // obtain the saved state that should be currently active. + std::array _savedCursorState; + bool _usingAltBuffer; + + SMALL_RECT _scrollMargins; + + bool _isOriginModeRelative; + + bool _isDECCOLMAllowed; + + SgrStack _sgrStack; + + size_t _SetRgbColorsHelper(const VTParameters options, + TextAttribute& attr, + const bool isForeground) noexcept; + }; +} diff --git a/src/terminal/adapter/adaptDispatchGraphics.cpp b/src/terminal/adapter/adaptDispatchGraphics.cpp index 65ff4e2b98f..66e419b1c28 100644 --- a/src/terminal/adapter/adaptDispatchGraphics.cpp +++ b/src/terminal/adapter/adaptDispatchGraphics.cpp @@ -286,3 +286,48 @@ bool AdaptDispatch::SetGraphicsRendition(const VTParameters options) return success; } + +// Method Description: +// - Saves the current text attributes to an internal stack. +// Arguments: +// - options: if not empty, specify which portions of the current text attributes should +// be saved. Options that are not supported are ignored. If no options are specified, +// all attributes are stored. +// Return Value: +// - True if handled successfully. False otherwise. +bool AdaptDispatch::PushGraphicsRendition(const VTParameters options) +{ + bool success = true; + TextAttribute currentAttributes; + + success = _pConApi->PrivateGetTextAttributes(currentAttributes); + + if (success) + { + _sgrStack.Push(currentAttributes, options); + } + + return success; +} + +// Method Description: +// - Restores text attributes from the internal stack. If only portions of text attributes +// were saved, combines those with the current attributes. +// Arguments: +// - +// Return Value: +// - True if handled successfully. False otherwise. +bool AdaptDispatch::PopGraphicsRendition() +{ + bool success = true; + TextAttribute currentAttributes; + + success = _pConApi->PrivateGetTextAttributes(currentAttributes); + + if (success) + { + success = _pConApi->PrivateSetTextAttributes(_sgrStack.Pop(currentAttributes)); + } + + return success; +} diff --git a/src/terminal/adapter/termDispatch.hpp b/src/terminal/adapter/termDispatch.hpp index fac375b1f9b..3fb4b0d2d65 100644 --- a/src/terminal/adapter/termDispatch.hpp +++ b/src/terminal/adapter/termDispatch.hpp @@ -83,6 +83,9 @@ class Microsoft::Console::VirtualTerminal::TermDispatch : public Microsoft::Cons bool SetGraphicsRendition(const VTParameters /*options*/) noexcept override { return false; } // SGR + bool PushGraphicsRendition(const VTParameters /*options*/) noexcept override { return false; } // XTPUSHSGR + bool PopGraphicsRendition() noexcept override { return false; } // XTPOPSGR + bool SetMode(const DispatchTypes::ModeParams /*param*/) noexcept override { return false; } // DECSET bool ResetMode(const DispatchTypes::ModeParams /*param*/) noexcept override { return false; } // DECRST diff --git a/src/terminal/adapter/ut_adapter/Adapter.UnitTests.vcxproj b/src/terminal/adapter/ut_adapter/Adapter.UnitTests.vcxproj index 553c9b275ac..3208d26ba7e 100644 --- a/src/terminal/adapter/ut_adapter/Adapter.UnitTests.vcxproj +++ b/src/terminal/adapter/ut_adapter/Adapter.UnitTests.vcxproj @@ -57,6 +57,9 @@ {dcf55140-ef6a-4736-a403-957e4f7430bb} + + {0cf235bd-2da0-407e-90ee-c467e8bbc714} + diff --git a/src/terminal/adapter/ut_adapter/adapterTest.cpp b/src/terminal/adapter/ut_adapter/adapterTest.cpp index bc1b1b01123..5773833117a 100644 --- a/src/terminal/adapter/ut_adapter/adapterTest.cpp +++ b/src/terminal/adapter/ut_adapter/adapterTest.cpp @@ -1599,6 +1599,144 @@ class AdapterTest VERIFY_IS_TRUE(_pDispatch.get()->SetGraphicsRendition({ rgOptions, cOptions })); } + TEST_METHOD(GraphicsPushPopTests) + { + Log::Comment(L"Starting test..."); + + _testGetSet->PrepData(); // default color from here is gray on black, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED + + VTParameter rgOptions[16]; + VTParameter rgStackOptions[16]; + size_t cOptions = 1; + + Log::Comment(L"Test 1: Basic push and pop"); + + rgOptions[0] = DispatchTypes::GraphicsOptions::Off; + _testGetSet->_expectedAttribute = {}; + VERIFY_IS_TRUE(_pDispatch->SetGraphicsRendition({ rgOptions, cOptions })); + + cOptions = 0; + VERIFY_IS_TRUE(_pDispatch->PushGraphicsRendition({ rgStackOptions, cOptions })); + + VERIFY_IS_TRUE(_pDispatch->PopGraphicsRendition()); + + Log::Comment(L"Test 2: Push, change color, pop"); + + VERIFY_IS_TRUE(_pDispatch->PushGraphicsRendition({ rgStackOptions, cOptions })); + + cOptions = 1; + rgOptions[0] = DispatchTypes::GraphicsOptions::ForegroundCyan; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(3); + _testGetSet->_expectedAttribute.SetDefaultBackground(); + VERIFY_IS_TRUE(_pDispatch->SetGraphicsRendition({ rgOptions, cOptions })); + + cOptions = 0; + _testGetSet->_expectedAttribute = {}; + VERIFY_IS_TRUE(_pDispatch->PopGraphicsRendition()); + + Log::Comment(L"Test 3: two pushes (nested) and pops"); + + // First push: + VERIFY_IS_TRUE(_pDispatch->PushGraphicsRendition({ rgStackOptions, cOptions })); + + cOptions = 1; + rgOptions[0] = DispatchTypes::GraphicsOptions::ForegroundRed; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(FOREGROUND_RED); + _testGetSet->_expectedAttribute.SetDefaultBackground(); + VERIFY_IS_TRUE(_pDispatch->SetGraphicsRendition({ rgOptions, cOptions })); + + // Second push: + cOptions = 0; + VERIFY_IS_TRUE(_pDispatch->PushGraphicsRendition({ rgStackOptions, cOptions })); + + cOptions = 1; + rgOptions[0] = DispatchTypes::GraphicsOptions::ForegroundGreen; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(FOREGROUND_GREEN); + _testGetSet->_expectedAttribute.SetDefaultBackground(); + VERIFY_IS_TRUE(_pDispatch->SetGraphicsRendition({ rgOptions, cOptions })); + + // First pop: + cOptions = 0; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(FOREGROUND_RED); + _testGetSet->_expectedAttribute.SetDefaultBackground(); + VERIFY_IS_TRUE(_pDispatch->PopGraphicsRendition()); + + // Second pop: + cOptions = 0; + _testGetSet->_expectedAttribute = {}; + VERIFY_IS_TRUE(_pDispatch->PopGraphicsRendition()); + + Log::Comment(L"Test 4: Save and restore partial attributes"); + + cOptions = 1; + rgOptions[0] = DispatchTypes::GraphicsOptions::ForegroundGreen; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(FOREGROUND_GREEN); + _testGetSet->_expectedAttribute.SetDefaultBackground(); + VERIFY_IS_TRUE(_pDispatch->SetGraphicsRendition({ rgOptions, cOptions })); + + cOptions = 1; + rgOptions[0] = DispatchTypes::GraphicsOptions::BoldBright; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(FOREGROUND_GREEN); + _testGetSet->_expectedAttribute.SetBold(true); + _testGetSet->_expectedAttribute.SetDefaultBackground(); + VERIFY_IS_TRUE(_pDispatch->SetGraphicsRendition({ rgOptions, cOptions })); + + rgOptions[0] = DispatchTypes::GraphicsOptions::BackgroundBlue; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(FOREGROUND_GREEN); + _testGetSet->_expectedAttribute.SetIndexedBackground(BACKGROUND_BLUE >> 4); + _testGetSet->_expectedAttribute.SetBold(true); + VERIFY_IS_TRUE(_pDispatch->SetGraphicsRendition({ rgOptions, cOptions })); + + // Push, specifying that we only want to save the background, the boldness, and double-underline-ness: + cOptions = 3; + rgStackOptions[0] = (size_t)DispatchTypes::SgrSaveRestoreStackOptions::Boldness; + rgStackOptions[1] = (size_t)DispatchTypes::SgrSaveRestoreStackOptions::SaveBackgroundColor; + rgStackOptions[2] = (size_t)DispatchTypes::SgrSaveRestoreStackOptions::DoublyUnderlined; + VERIFY_IS_TRUE(_pDispatch->PushGraphicsRendition({ rgStackOptions, cOptions })); + + // Now change everything... + cOptions = 2; + rgOptions[0] = DispatchTypes::GraphicsOptions::BackgroundGreen; + rgOptions[1] = DispatchTypes::GraphicsOptions::DoublyUnderlined; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(FOREGROUND_GREEN); + _testGetSet->_expectedAttribute.SetIndexedBackground(BACKGROUND_GREEN >> 4); + _testGetSet->_expectedAttribute.SetBold(true); + _testGetSet->_expectedAttribute.SetDoublyUnderlined(true); + VERIFY_IS_TRUE(_pDispatch->SetGraphicsRendition({ rgOptions, cOptions })); + + cOptions = 1; + rgOptions[0] = DispatchTypes::GraphicsOptions::ForegroundRed; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(FOREGROUND_RED); + _testGetSet->_expectedAttribute.SetIndexedBackground(BACKGROUND_GREEN >> 4); + _testGetSet->_expectedAttribute.SetBold(true); + _testGetSet->_expectedAttribute.SetDoublyUnderlined(true); + VERIFY_IS_TRUE(_pDispatch->SetGraphicsRendition({ rgOptions, cOptions })); + + rgOptions[0] = DispatchTypes::GraphicsOptions::NotBoldOrFaint; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(FOREGROUND_RED); + _testGetSet->_expectedAttribute.SetIndexedBackground(BACKGROUND_GREEN >> 4); + _testGetSet->_expectedAttribute.SetDoublyUnderlined(true); + VERIFY_IS_TRUE(_pDispatch->SetGraphicsRendition({ rgOptions, cOptions })); + + // And then restore... + cOptions = 0; + _testGetSet->_expectedAttribute = {}; + _testGetSet->_expectedAttribute.SetIndexedForeground(FOREGROUND_RED); + _testGetSet->_expectedAttribute.SetIndexedBackground(BACKGROUND_BLUE >> 4); + _testGetSet->_expectedAttribute.SetBold(true); + VERIFY_IS_TRUE(_pDispatch->PopGraphicsRendition()); + } + TEST_METHOD(GraphicsPersistBrightnessTests) { Log::Comment(L"Starting test..."); diff --git a/src/terminal/parser/OutputStateMachineEngine.cpp b/src/terminal/parser/OutputStateMachineEngine.cpp index 049dfcaf443..a214f5fd1f7 100644 --- a/src/terminal/parser/OutputStateMachineEngine.cpp +++ b/src/terminal/parser/OutputStateMachineEngine.cpp @@ -589,6 +589,19 @@ bool OutputStateMachineEngine::ActionCsiDispatch(const VTID id, const VTParamete success = _dispatch->SoftReset(); TermTelemetry::Instance().Log(TermTelemetry::Codes::DECSTR); break; + + case CsiActionCodes::XT_PushSgr: + case CsiActionCodes::XT_PushSgrAlias: + success = _dispatch->PushGraphicsRendition(parameters); + TermTelemetry::Instance().Log(TermTelemetry::Codes::XTPUSHSGR); + break; + + case CsiActionCodes::XT_PopSgr: + case CsiActionCodes::XT_PopSgrAlias: + success = _dispatch->PopGraphicsRendition(); + TermTelemetry::Instance().Log(TermTelemetry::Codes::XTPOPSGR); + break; + default: // If no functions to call, overall dispatch was a failure. success = false; diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index 69436840ca5..46f1f5f7ea8 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -131,7 +131,11 @@ namespace Microsoft::Console::VirtualTerminal DECREQTPARM_RequestTerminalParameters = VTID("x"), DECSCUSR_SetCursorStyle = VTID(" q"), DECSTR_SoftReset = VTID("!p"), - DECSCPP_SetColumnsPerPage = VTID("$|") + DECSCPP_SetColumnsPerPage = VTID("$|"), + XT_PushSgr = VTID("#{"), + XT_PushSgrAlias = VTID("#p"), + XT_PopSgr = VTID("#}"), + XT_PopSgrAlias = VTID("#q"), }; enum Vt52ActionCodes : uint64_t diff --git a/src/terminal/parser/telemetry.cpp b/src/terminal/parser/telemetry.cpp index 445b1e1d3fd..d1a6da50cba 100644 --- a/src/terminal/parser/telemetry.cpp +++ b/src/terminal/parser/telemetry.cpp @@ -274,6 +274,8 @@ void TermTelemetry::WriteFinalTraceLog() const TraceLoggingUInt32(_uiTimesUsed[OSCSCB], "OscSetClipboard"), TraceLoggingUInt32(_uiTimesUsed[REP], "REP"), TraceLoggingUInt32(_uiTimesUsed[DECALN], "DECALN"), + TraceLoggingUInt32(_uiTimesUsed[XTPUSHSGR], "XTPUSHSGR"), + TraceLoggingUInt32(_uiTimesUsed[XTPOPSGR], "XTPOPSGR"), TraceLoggingUInt32Array(_uiTimesFailed, ARRAYSIZE(_uiTimesFailed), "Failed"), TraceLoggingUInt32(_uiTimesFailedOutsideRange, "FailedOutsideRange")); } diff --git a/src/terminal/parser/telemetry.hpp b/src/terminal/parser/telemetry.hpp index 0da17fbc4fb..f472852a224 100644 --- a/src/terminal/parser/telemetry.hpp +++ b/src/terminal/parser/telemetry.hpp @@ -101,6 +101,8 @@ namespace Microsoft::Console::VirtualTerminal OSCBG, DECALN, OSCSCB, + XTPUSHSGR, + XTPOPSGR, // Only use this last enum as a count of the number of codes. NUMBER_OF_CODES }; diff --git a/src/types/inc/sgrStack.hpp b/src/types/inc/sgrStack.hpp new file mode 100644 index 00000000000..d8b96a09687 --- /dev/null +++ b/src/types/inc/sgrStack.hpp @@ -0,0 +1,114 @@ +/*++ +Copyright (c) Microsoft Corporation +Licensed under the MIT license. + +Module Name: +- sgrStack.hpp + +Abstract: +- Encapsulates logic for the XTPUSHSGR / XTPOPSGR VT control sequences, which save and + restore text attributes on a stack. + +--*/ + +#pragma once + +#include "..\..\buffer\out\TextAttribute.hpp" +#include "..\..\terminal\adapter\DispatchTypes.hpp" +#include + +namespace Microsoft::Console::VirtualTerminal +{ + class SgrStack + { + public: + SgrStack() noexcept; + + // Method Description: + // - Saves the specified text attributes onto an internal stack. + // Arguments: + // - currentAttributes - The attributes to save onto the stack. + // - options - If none supplied, the full attributes are saved. Else only the + // specified parts of currentAttributes are saved. + // Return Value: + // - + void Push(const TextAttribute& currentAttributes, + const VTParameters options) noexcept; + + // Method Description: + // - Restores text attributes by removing from the top of the internal stack, + // combining them with the supplied currentAttributes, if appropriate. + // Arguments: + // - currentAttributes - The current text attributes. If only a portion of + // attributes were saved on the internal stack, then those attributes will be + // combined with the currentAttributes passed in to form the return value. + // Return Value: + // - The TextAttribute that has been removed from the top of the stack, possibly + // combined with currentAttributes. + const TextAttribute Pop(const TextAttribute& currentAttributes) noexcept; + + // Xterm allows the save stack to go ten deep, so we'll follow suit. + static constexpr int c_MaxStoredSgrPushes = 10; + + private: + // Note the +1 in the size of the bitset: this is because we use the + // SgrSaveRestoreStackOptions enum values as bitset flags, so they are naturally + // one-based. + typedef std::bitset(DispatchTypes::SgrSaveRestoreStackOptions::Max) + 1> AttrBitset; + + TextAttribute _CombineWithCurrentAttributes(const TextAttribute& currentAttributes, + const TextAttribute& savedAttribute, + const AttrBitset validParts) noexcept; // valid parts of savedAttribute + + struct SavedSgrAttributes + { + TextAttribute TextAttributes; + AttrBitset ValidParts; // flags that indicate which parts of TextAttributes are meaningful + }; + + // The number of "save slots" on the stack is limited (let's say there are N). So + // there are a couple of problems to think about: what to do about apps that try + // to do more pushes than will fit, and how to recover from garbage (such as + // accidentally running "cat" on a binary file that looks like lots of pushes). + // + // Dealing with more pops than pushes is simple: just ignore pops when the stack + // is empty. + // + // But how should we handle doing more pushes than are supported by the storage? + // + // One approach might be to ignore pushes once the stack is full. Things won't + // look right while the number of outstanding pushes is above the stack, but once + // it gets popped back down into range, things start working again. Put another + // way: with a traditional stack, the first N pushes work, and the last N pops + // work. But that introduces a burden: you have to do something (lots of pops) in + // order to recover from garbage. (There are strategies that could be employed to + // place an upper bound on how many pops are required (say K), but it's still + // something that /must/ be done to recover from a blown stack.) + // + // An alternative approach is a "ring stack": if you do another push when the + // stack is already full, it just drops the bottom of the stack. With this + // strategy, the last N pushes work, and the first N pops work. And the advantage + // of this approach is that there is no "recovery procedure" necessary: if you + // want a clean slate, you can just declare a clean slate--you will always have N + // slots for pushes and pops in front of you. + // + // A ring stack will also lead to apps that are friendlier to cross-app + // pushes/pops. + // + // Consider using a traditional stack. In that case, an app might be tempted to + // always begin by issuing a bunch of pops (K), in order to ensure they have a + // clean state. However, apps that behave that way would not work well with + // cross-app push/pops (e.g. I push before I ssh to my remote system, and will pop + // when after closing the connection, and during the connection I'll run apps on + // the remote host which might also do pushes and pops). By using a ring stack, an + // app does not need to do /anything/ to start in a "clean state"--an app can + // ALWAYS consider its initial state to be clean. + // + // So we've chosen to use a "ring stack", because it is simplest for apps to deal + // with. + + int _nextPushIndex; // will wrap around once the stack is full + int _numSavedAttrs; // how much of _storedSgrAttributes is actually in use + std::array _storedSgrAttributes; + }; +} diff --git a/src/types/lib/types.vcxproj b/src/types/lib/types.vcxproj index b96b1755ba1..e401b6cd9c4 100644 --- a/src/types/lib/types.vcxproj +++ b/src/types/lib/types.vcxproj @@ -22,6 +22,7 @@ + @@ -44,6 +45,7 @@ + diff --git a/src/types/lib/types.vcxproj.filters b/src/types/lib/types.vcxproj.filters index f3b8cf61a6b..efb34ad3735 100644 --- a/src/types/lib/types.vcxproj.filters +++ b/src/types/lib/types.vcxproj.filters @@ -72,6 +72,9 @@ Source Files + + Source Files + Source Files @@ -161,6 +164,9 @@ Header Files + + Header Files + Header Files diff --git a/src/types/sgrStack.cpp b/src/types/sgrStack.cpp new file mode 100644 index 00000000000..d38fc376174 --- /dev/null +++ b/src/types/sgrStack.cpp @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +#include "precomp.h" +#include "inc/sgrStack.hpp" + +using namespace Microsoft::Console::VirtualTerminal::DispatchTypes; + +namespace Microsoft::Console::VirtualTerminal +{ + SgrStack::SgrStack() noexcept : + _nextPushIndex{ 0 }, + _numSavedAttrs{ 0 } + { + } + + void SgrStack::Push(const TextAttribute& currentAttributes, + const VTParameters options) noexcept + { + AttrBitset validParts; + + if (options.empty()) + { + // We save all current attributes. + validParts.set(static_cast(SgrSaveRestoreStackOptions::All)); + } + else + { + // Each option is encoded as a bit in validParts. All options (that fit) are + // encoded; options that aren't supported are ignored when read back (popped). + // So if you try to save only unsupported aspects of the current text + // attributes, you'll do what is effectively an "empty" push (the subsequent + // pop will not change the current attributes), which is the correct behavior. + + for (size_t i = 0; i < options.size(); i++) + { + // TRICKY: The VTParameter could be a fake/materialized parameter, in + // which case it has a default value, and the default value of a + // VTParameter depends on what you are assigning to: if you assign / + // convert directly to a size_t, then the default is "1", but for other + // size_t-sized types, the default is "0". We want "default is 0", so we + // convert to a SgrSaveRestoreStackOptions first. + const SgrSaveRestoreStackOptions option = options.at(i); + const size_t optionAsIndex = static_cast(option); + + // Options must be specified singly; not in combination. Values that are + // out of range will be ignored. + if (optionAsIndex < validParts.size()) + { + try + { + validParts.set(optionAsIndex); + } + catch (std::out_of_range&) + { + // We should not be able to reach here: we already checked + // optionAsIndex against the size of the bitset. + RaiseFailFastException(nullptr, nullptr, 0); + } + } + } + } + + if (_numSavedAttrs < gsl::narrow(_storedSgrAttributes.size())) + { + _numSavedAttrs++; + } + + _storedSgrAttributes.at(_nextPushIndex) = { currentAttributes, validParts }; + _nextPushIndex = (_nextPushIndex + 1) % gsl::narrow(_storedSgrAttributes.size()); + } + + const TextAttribute SgrStack::Pop(const TextAttribute& currentAttributes) noexcept + { + if (_numSavedAttrs > 0) + { + _numSavedAttrs--; + + if (_nextPushIndex == 0) + { + _nextPushIndex = gsl::narrow(_storedSgrAttributes.size() - 1); + } + else + { + _nextPushIndex--; + } + + SavedSgrAttributes& restoreMe = _storedSgrAttributes.at(_nextPushIndex); + + if (restoreMe.ValidParts.test(static_cast(SgrSaveRestoreStackOptions::All))) + { + return restoreMe.TextAttributes; + } + else + { + return _CombineWithCurrentAttributes(currentAttributes, + restoreMe.TextAttributes, + restoreMe.ValidParts); + } + } + + return currentAttributes; + } + + TextAttribute SgrStack::_CombineWithCurrentAttributes(const TextAttribute& currentAttributes, + const TextAttribute& savedAttribute, + const AttrBitset validParts) noexcept // of savedAttribute + { + // If we are restoring all attributes, we should have just taken savedAttribute + // before we even got here. + FAIL_FAST_IF(validParts.test(static_cast(SgrSaveRestoreStackOptions::All))); + + TextAttribute result = currentAttributes; + + // From xterm documentation: + // + // CSI # { + // CSI Ps ; Ps # { + // Push video attributes onto stack (XTPUSHSGR), xterm. The + // optional parameters correspond to the SGR encoding for video + // attributes, except for colors (which do not have a unique SGR + // code): + // Ps = 1 -> Bold. + // Ps = 2 -> Faint. + // Ps = 3 -> Italicized. + // Ps = 4 -> Underlined. + // Ps = 5 -> Blink. + // Ps = 7 -> Inverse. + // Ps = 8 -> Invisible. + // Ps = 9 -> Crossed-out characters. + // Ps = 2 1 -> Doubly-underlined. + // Ps = 3 0 -> Foreground color. + // Ps = 3 1 -> Background color. + // + // (some closing braces for people with editors that get thrown off without them: }}) + // + // Note that not all of these attributes are actually supported by + // renderers/conhost, despite setters/getters on TextAttribute. + + try + { + // Boldness = 1, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Boldness))) + { + result.SetBold(savedAttribute.IsBold()); + } + + // Faintness = 2, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Faintness))) + { + result.SetFaint(savedAttribute.IsFaint()); + } + + // Italics = 3, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Italics))) + { + result.SetItalic(savedAttribute.IsItalic()); + } + + // Underline = 4, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Underline))) + { + result.SetUnderlined(savedAttribute.IsUnderlined()); + } + + // Blink = 5, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Blink))) + { + result.SetBlinking(savedAttribute.IsBlinking()); + } + + // Negative = 7, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Negative))) + { + if (savedAttribute.IsReverseVideo()) + { + if (!result.IsReverseVideo()) + { + result.Invert(); + } + } + else + { + if (result.IsReverseVideo()) + { + result.Invert(); + } + } + } + + // Invisible = 8, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Invisible))) + { + result.SetInvisible(savedAttribute.IsInvisible()); + } + + // CrossedOut = 9, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::CrossedOut))) + { + result.SetCrossedOut(savedAttribute.IsCrossedOut()); + } + + // DoublyUnderlined = 21, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::DoublyUnderlined))) + { + result.SetDoublyUnderlined(savedAttribute.IsDoublyUnderlined()); + } + + // SaveForegroundColor = 30, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::SaveForegroundColor))) + { + result.SetForegroundFrom(savedAttribute); + } + + // SaveBackgroundColor = 31, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::SaveBackgroundColor))) + { + result.SetBackgroundFrom(savedAttribute); + } + } + catch (std::out_of_range&) + { + // We should not be able to reach here: all values passed to bitset::test are + // constants, clearly in range of the bitset. + RaiseFailFastException(nullptr, nullptr, 0); + } + + return result; + } + +} From 34547cf241da0c8dc4b903bae5e6cc544501f667 Mon Sep 17 00:00:00 2001 From: "Dan Thompson (SBS)" Date: Sat, 13 Feb 2021 17:11:28 -0800 Subject: [PATCH 2/4] Fix static analysis complaints about possible exceptions. --- src/types/inc/sgrStack.hpp | 2 +- src/types/sgrStack.cpp | 89 +++++++++++++++++++++----------------- 2 files changed, 50 insertions(+), 41 deletions(-) diff --git a/src/types/inc/sgrStack.hpp b/src/types/inc/sgrStack.hpp index d8b96a09687..84a9a42861e 100644 --- a/src/types/inc/sgrStack.hpp +++ b/src/types/inc/sgrStack.hpp @@ -58,7 +58,7 @@ namespace Microsoft::Console::VirtualTerminal TextAttribute _CombineWithCurrentAttributes(const TextAttribute& currentAttributes, const TextAttribute& savedAttribute, - const AttrBitset validParts) noexcept; // valid parts of savedAttribute + const AttrBitset validParts); // valid parts of savedAttribute struct SavedSgrAttributes { diff --git a/src/types/sgrStack.cpp b/src/types/sgrStack.cpp index d38fc376174..a322cafc2ca 100644 --- a/src/types/sgrStack.cpp +++ b/src/types/sgrStack.cpp @@ -19,47 +19,47 @@ namespace Microsoft::Console::VirtualTerminal { AttrBitset validParts; - if (options.empty()) - { - // We save all current attributes. - validParts.set(static_cast(SgrSaveRestoreStackOptions::All)); - } - else + try { - // Each option is encoded as a bit in validParts. All options (that fit) are - // encoded; options that aren't supported are ignored when read back (popped). - // So if you try to save only unsupported aspects of the current text - // attributes, you'll do what is effectively an "empty" push (the subsequent - // pop will not change the current attributes), which is the correct behavior. - - for (size_t i = 0; i < options.size(); i++) - { - // TRICKY: The VTParameter could be a fake/materialized parameter, in - // which case it has a default value, and the default value of a - // VTParameter depends on what you are assigning to: if you assign / - // convert directly to a size_t, then the default is "1", but for other - // size_t-sized types, the default is "0". We want "default is 0", so we - // convert to a SgrSaveRestoreStackOptions first. - const SgrSaveRestoreStackOptions option = options.at(i); - const size_t optionAsIndex = static_cast(option); - - // Options must be specified singly; not in combination. Values that are - // out of range will be ignored. - if (optionAsIndex < validParts.size()) + if (options.empty()) + { + // We save all current attributes. + validParts.set(static_cast(SgrSaveRestoreStackOptions::All)); + } + else + { + // Each option is encoded as a bit in validParts. All options (that fit) are + // encoded; options that aren't supported are ignored when read back (popped). + // So if you try to save only unsupported aspects of the current text + // attributes, you'll do what is effectively an "empty" push (the subsequent + // pop will not change the current attributes), which is the correct behavior. + + for (size_t i = 0; i < options.size(); i++) { - try + // TRICKY: The VTParameter could be a fake/materialized parameter, in + // which case it has a default value, and the default value of a + // VTParameter depends on what you are assigning to: if you assign / + // convert directly to a size_t, then the default is "1", but for other + // size_t-sized types, the default is "0". We want "default is 0", so we + // convert to a SgrSaveRestoreStackOptions first. + const SgrSaveRestoreStackOptions option = options.at(i); + const size_t optionAsIndex = static_cast(option); + + // Options must be specified singly; not in combination. Values that are + // out of range will be ignored. + if (optionAsIndex < validParts.size()) { validParts.set(optionAsIndex); } - catch (std::out_of_range&) - { - // We should not be able to reach here: we already checked - // optionAsIndex against the size of the bitset. - RaiseFailFastException(nullptr, nullptr, 0); - } } } } + catch (std::out_of_range&) + { + // We should not be able to reach here: we pre-check that everything should be + // in range. + RaiseFailFastException(nullptr, nullptr, 0); + } if (_numSavedAttrs < gsl::narrow(_storedSgrAttributes.size())) { @@ -87,15 +87,24 @@ namespace Microsoft::Console::VirtualTerminal SavedSgrAttributes& restoreMe = _storedSgrAttributes.at(_nextPushIndex); - if (restoreMe.ValidParts.test(static_cast(SgrSaveRestoreStackOptions::All))) + try { - return restoreMe.TextAttributes; + if (restoreMe.ValidParts.test(static_cast(SgrSaveRestoreStackOptions::All))) + { + return restoreMe.TextAttributes; + } + else + { + return _CombineWithCurrentAttributes(currentAttributes, + restoreMe.TextAttributes, + restoreMe.ValidParts); + } } - else + catch (std::out_of_range&) { - return _CombineWithCurrentAttributes(currentAttributes, - restoreMe.TextAttributes, - restoreMe.ValidParts); + // We should not be able to reach here: we pre-check that everything + // should be in range. + RaiseFailFastException(nullptr, nullptr, 0); } } @@ -104,7 +113,7 @@ namespace Microsoft::Console::VirtualTerminal TextAttribute SgrStack::_CombineWithCurrentAttributes(const TextAttribute& currentAttributes, const TextAttribute& savedAttribute, - const AttrBitset validParts) noexcept // of savedAttribute + const AttrBitset validParts) // of savedAttribute { // If we are restoring all attributes, we should have just taken savedAttribute // before we even got here. From 48c97206898b4f82dc9d52cb42e80cbfb27cd08d Mon Sep 17 00:00:00 2001 From: "Dan Thompson (SBS)" Date: Sat, 13 Feb 2021 21:09:12 -0800 Subject: [PATCH 3/4] PR feedback: don't need Set...From; sort Csi codes --- src/buffer/out/TextAttribute.cpp | 26 ------------------- src/buffer/out/TextAttribute.hpp | 3 --- .../parser/OutputStateMachineEngine.hpp | 6 ++--- src/types/sgrStack.cpp | 4 +-- 4 files changed, 5 insertions(+), 34 deletions(-) diff --git a/src/buffer/out/TextAttribute.cpp b/src/buffer/out/TextAttribute.cpp index 1d96ed645f4..dd6be654efa 100644 --- a/src/buffer/out/TextAttribute.cpp +++ b/src/buffer/out/TextAttribute.cpp @@ -81,32 +81,6 @@ bool TextAttribute::IsLegacy() const noexcept return _foreground.IsLegacy() && _background.IsLegacy(); } -// Routine Description: -// - Makes this TextAttribute's foreground color the same as the other one. -// Arguments: -// - The TextAttribute to copy the foreground color from -// Return Value: -// - -void TextAttribute::SetForegroundFrom(const TextAttribute& other) noexcept -{ - _foreground = other._foreground; - WI_ClearAllFlags(_wAttrLegacy, FG_ATTRS); - _wAttrLegacy |= (other._wAttrLegacy & FG_ATTRS); -} - -// Routine Description: -// - Makes this TextAttribute's background color the same as the other one. -// Arguments: -// - The TextAttribute to copy the background color from -// Return Value: -// - -void TextAttribute::SetBackgroundFrom(const TextAttribute& other) noexcept -{ - _background = other._background; - WI_ClearAllFlags(_wAttrLegacy, BG_ATTRS); - _wAttrLegacy |= (other._wAttrLegacy & BG_ATTRS); -} - // Routine Description: // - Calculates rgb colors based off of current color table and active modification attributes. // Arguments: diff --git a/src/buffer/out/TextAttribute.hpp b/src/buffer/out/TextAttribute.hpp index 44b31abd461..ef140e39b77 100644 --- a/src/buffer/out/TextAttribute.hpp +++ b/src/buffer/out/TextAttribute.hpp @@ -72,9 +72,6 @@ class TextAttribute final const bool reverseScreenMode = false, const bool blinkingIsFaint = false) const noexcept; - void SetForegroundFrom(const TextAttribute& other) noexcept; - void SetBackgroundFrom(const TextAttribute& other) noexcept; - bool IsLeadingByte() const noexcept; bool IsTrailingByte() const noexcept; bool IsTopHorizontalDisplayed() const noexcept; diff --git a/src/terminal/parser/OutputStateMachineEngine.hpp b/src/terminal/parser/OutputStateMachineEngine.hpp index 46f1f5f7ea8..1ad03b643ed 100644 --- a/src/terminal/parser/OutputStateMachineEngine.hpp +++ b/src/terminal/parser/OutputStateMachineEngine.hpp @@ -131,11 +131,11 @@ namespace Microsoft::Console::VirtualTerminal DECREQTPARM_RequestTerminalParameters = VTID("x"), DECSCUSR_SetCursorStyle = VTID(" q"), DECSTR_SoftReset = VTID("!p"), - DECSCPP_SetColumnsPerPage = VTID("$|"), - XT_PushSgr = VTID("#{"), XT_PushSgrAlias = VTID("#p"), - XT_PopSgr = VTID("#}"), XT_PopSgrAlias = VTID("#q"), + XT_PushSgr = VTID("#{"), + XT_PopSgr = VTID("#}"), + DECSCPP_SetColumnsPerPage = VTID("$|"), }; enum Vt52ActionCodes : uint64_t diff --git a/src/types/sgrStack.cpp b/src/types/sgrStack.cpp index a322cafc2ca..5313453cdd7 100644 --- a/src/types/sgrStack.cpp +++ b/src/types/sgrStack.cpp @@ -218,13 +218,13 @@ namespace Microsoft::Console::VirtualTerminal // SaveForegroundColor = 30, if (validParts.test(static_cast(SgrSaveRestoreStackOptions::SaveForegroundColor))) { - result.SetForegroundFrom(savedAttribute); + result.SetForeground(savedAttribute.GetForeground()); } // SaveBackgroundColor = 31, if (validParts.test(static_cast(SgrSaveRestoreStackOptions::SaveBackgroundColor))) { - result.SetBackgroundFrom(savedAttribute); + result.SetBackground(savedAttribute.GetBackground()); } } catch (std::out_of_range&) From e4c9ca60fecc0952d7f9163da0799201a039926d Mon Sep 17 00:00:00 2001 From: "Dan Thompson (SBS)" Date: Tue, 16 Feb 2021 23:06:06 -0800 Subject: [PATCH 4/4] PR feedback --- .github/actions/spelling/expect/expect.txt | 5760 ++++++++++---------- src/terminal/adapter/adaptDispatch.hpp | 422 +- src/types/sgrStack.cpp | 158 +- src/types/sources.inc | 1 + 4 files changed, 3157 insertions(+), 3184 deletions(-) diff --git a/.github/actions/spelling/expect/expect.txt b/.github/actions/spelling/expect/expect.txt index 656747b4c30..8b0943584f9 100644 --- a/.github/actions/spelling/expect/expect.txt +++ b/.github/actions/spelling/expect/expect.txt @@ -1,2880 +1,2880 @@ -AAAAAABBBBBBCCC -AAAAABBBBBBBCCC -AAAAABBBBBBCCC -AAAAABCCCCCCCCC -AAAAADCCCCCCCCC -ABANDONFONT -abcd -ABCDEFGHIJKLMNO -ABCG -abf -abgr -abi -ACCESSTOKEN -acec -acf -acidev -ACIOSS -ACover -actctx -ACTCTXW -activatable -ACTIVEBORDER -ACTIVECAPTION -ADDALIAS -ADDB -ADDREF -addressof -ADDSTRING -ADDTOOL -aef -AEnd -AFew -AFill -AFX -AHelper -ahz -AImpl -AInplace -ALIGNRIGHT -alloc -allocing -alpc -ALTERNATENAME -ALTF -ALTNUMPAD -ALWAYSTIP -amd -ansd -ansicode -ansicpg -ANSISYS -ANSISYSRC -ANSISYSSC -antialias -antialiasing -ANull -anycpu -AOn -APARTMENTTHREADED -APCs -api -APIENTRY -apiset -apos -APPBARDATA -appconsult -APPICON -appium -applet -appletname -applicationmodel -APPLMODAL -appmodel -apps -APPWINDOW -appx -appxbundle -appxerror -appxmanifest -APrep -apsect -APSTUDIO -archeologists -architected -argb -argc -args -argv -ARRAYSIZE -ARROWKEYS -ASBRST -ASBSET -ASDF -asdfghjkl -ASetting -ASingle -asm -asmv -asmx -aspnet -aspx -astextplain -AStomps -ASYNCWINDOWPOS -atch -ATest -attr -ATTRCOLOR -aumid -Authenticode -AUTOBUDDY -AUTOCHECKBOX -autogenerated -autohide -AUTOHSCROLL -automagically -autopositioning -AUTORADIOBUTTON -autoscrolling -Autowrap -AVerify -AVI -awch -azuredevopspodcast -azurewebsites -azzle -backend -backgrounded -Backgrounder -backgrounding -backport -backstory -Batang -baz -Bazz -BBBBBCCC -BBBBCCCCC -BBDM -bbwe -bc -bcount -bcrypt -bcx -bcz -BEFOREPARENT -beginthread -bgcolor -bgfx -bgidx -Bgk -BGR -BGRA -BHID -biblioscape -bigobj -binplace -binplaced -bitcoin -bitcrazed -bitflag -bitmask -BITOPERATION -bitsavers -bitset -BKCOLOR -BKGND -Bksp -blog -Blt -BLUESCROLL -bmp -BOLDFONT -BOOLIFY -bools -boostorg -Borland -BOTTOMLEFT -BOTTOMRIGHT -boutput -BPBF -bpp -BPPF -branchconfig -BRK -Browsable -bsearch -BSODs -bstr -BTNFACE -buf -bufferout -buffersize -buflen -bugfix -buildtransitive -BUILDURI -burriter -BValue -byref -bytearray -bytebuffer -Cac -callee -cang -capslock -CARETBLINKINGENABLED -CARRIAGERETURN -cascadia -cassert -catid -cazamor -CBash -cbegin -cbiex -CBN -CBoolean -cbt -cbuffer -CCCBB -ccf -cch -CCHAR -cci -CCmd -ccolor -CCom -CComp -CConsole -CConversion -CCRT -cctype -CDATA -cdd -cdecl -CDeclaration -CEdit -CELLSIZE -cend -cerr -cfae -Cfg -cfie -cfiex -cfte -CFuzz -cgscrn -chafa -changelist -charinfo -charlespetzold -charset -CHARSETINFO -chcp -checkbox -checkboxes -chh -Childitem -chk -chrono -CHT -ci -Cic -cjk -ckuehl -cla -Clcompile -CLE -cleartype -CLICKACTIVE -clickdown -climits -clipbrd -CLIPCHILDREN -CLIPSIBLINGS -cliutils -clocale -closetest -cloudconsole -cls -CLSCTX -clsid -CLUSTERMAP -cmath -cmatrix -cmder -CMDEXT -Cmdlet -cmdline -CMOUSEBUTTONS -cmp -cmt -cmyk -CNL -cnt -CNTRL -codebase -Codeflow -codepage -codepath -codepoint -codeproject -COINIT -COLLECTIONURI -colorizing -colororacle -colorref -colorscheme -colorspaces -colorspec -colortable -colortbl -colortool -COLR -combaseapi -combobox -comctl -COMDAT -commandline -commctrl -commdlg -COMMITID -compat -componentization -conapi -conareainfo -conattrs -conbufferout -concat -concfg -conddkrefs -condrv -conechokey -conemu -config -configurability -conhost -conhostv -conime -conimeinfo -conint -conintegrity -conintegrityuwp -coninteractivitybase -coninteractivityonecore -coninteractivitywin -conio -coniosrv -CONKBD -conlibk -conmsgl -CONNECTINFO -CONOUT -conpixels -conprops -conpropsp -conpty -conptylib -conserv -consoleapi -CONSOLECONTROL -CONSOLEENDTASK -consolegit -consolehost -CONSOLEIME -consoleinternal -Consoleroot -Consolescreen -CONSOLESETFOREGROUND -consoletaeftemplates -CONSOLEV -Consolewait -CONSOLEWINDOWOWNER -consrv -constexpr -constexprable -constness -contentfiles -conterm -CONTEXTMENU -contsf -contypes -convarea -conwinuserrefs -coord -coordnew -COPYCOLOR -CORESYSTEM -cotaskmem -countof -cout -CPG -cpinfo -CPINFOEX -cplinfo -cplusplus -cpp -CPPCORECHECK -cppcorecheckrules -cpprest -cpprestsdk -cppwinrt -CProc -cpx -crbegin -CREATESCREENBUFFER -CREATESTRUCT -CREATESTRUCTW -creativecommons -cred -cref -crend -CRLFs -crloew -crt -CRTLIBS -csbi -csbiex -csharp -CSHORT -CSIDL -csproj -Csr -csrmsg -CSRSS -csrutil -cstdarg -cstddef -cstdio -cstdlib -cstr -cstring -cstyle -csv -CSwitch -CText -ctime -ctl -ctlseqs -Ctlv -ctor -CTRLEVENT -CTRLKEYSHORTCUTS -Ctx -Ctxt -ctype -CUF -cupxy -curated -CURRENTFONT -currentmode -CURRENTPAGE -CURSORCOLOR -CURSORSIZE -CURSORTYPE -CUU -cw -Cwa -cwch -cwchar -cwctype -cwd -cx -cxcy -CXFRAME -CXFULLSCREEN -CXHSCROLL -CXMIN -CXPADDEDBORDER -CXSIZE -CXSMICON -CXVIRTUALSCREEN -CXVSCROLL -cxx -CYFRAME -CYFULLSCREEN -cygwin -CYHSCROLL -CYMIN -CYPADDEDBORDER -CYSIZE -CYSIZEFRAME -CYSMICON -CYVIRTUALSCREEN -CYVSCROLL -dahall -dai -DATABLOCK -DATAVIEW -DATAW -DBatch -dbcs -DBCSCHAR -DBCSFONT -dbg -DBGALL -DBGCHARS -DBGFONTS -DBGOUTPUT -dbh -dblclk -DBlob -dbproj -DBUILD -DColor -DCOLORVALUE -dcommon -DCompile -dcompiler -DComposition -dde -DDESHARE -DDevice -DEADCHAR -dealloc -Debian -debolden -debounce -DECALN -DECANM -DECAUPSS -DECAWM -DECCKM -DECCOLM -DECEKBD -DECID -DECKPAM -DECKPM -DECKPNM -DECLRMM -decls -declspec -decltype -declval -DECNKM -DECNRCM -DECOM -deconstructed -DECPCTERM -DECRC -DECREQTPARM -DECRLM -DECRQM -DECRST -DECSASD -DECSC -DECSCA -DECSCNM -DECSCPP -DECSCUSR -DECSED -DECSEL -DECSET -DECSLPP -DECSLRM -DECSMKR -DECSR -decstandar -DECSTBM -DECSTR -DECTCEM -Dedupe -deduplicated -DEFAULTBACKGROUND -DEFAULTFOREGROUND -defaultsettings -DEFAULTTONEAREST -DEFAULTTONULL -DEFAULTTOPRIMARY -defectdefs -DEFERERASE -deff -DEFFACE -defing -DEFPUSHBUTTON -defterm -DELAYLOAD -deletable -DELETEONRELEASE -delims -Delt -demoable -depersist -deprioritized -deps -deque -deref -deserialization -deserialize -deserialized -deserializer -deserializing -desktopwindowxamlsource -dest -DESTINATIONNAME -devblogs -developercommunity -devicecode -devicefamily -devops -Dext -df -DFactory -DFF -DFMT -dh -dhandler -dialogbox -diffing -DINLINE -directio -DIRECTX -Dirs -DISABLENOSCROLL -DISPLAYATTRIBUTE -DISPLAYATTRIBUTEPROPERTY -DISPLAYCHANGE -distro -dlg -DLGC -dll -dllexport -DLLGETVERSIONPROC -dllimport -dllinit -dllmain -DLLVERSIONINFO -DLOAD -DLOOK -dmp -DOCTYPE -docx -DONTCARE -doskey -dotnet -doubleclick -downlevel -dpg -dpi -DPIAPI -DPICHANGE -DPICHANGED -dpix -dpiy -DRAWFRAME -DRAWITEM -DRAWITEMSTRUCT -drcs -dropdown -DROPDOWNLIST -DROPFILES -drv -dsm -dst -DSwap -DTest -dtor -DTTERM -DUMMYUNIONNAME -DUNICODE -DUNIT -dup'ed -dvi -dw -DWLP -dwm -dwmapi -dword -dwrite -dwriteglyphrundescriptionclustermap -dxgi -dxgidwm -dxinterop -dxttbmp -eachother -eaf -EASTEUROPE -eb -ECH -echokey -ecount -ECpp -Edgium -EDITKEYS -EDITTEXT -EDITUPDATE -edputil -edu -Efast -EHsc -EJO -EK -ELEMENTNOTAVAILABLE -elems -elif -elseif -emacs -EMPTYBOX -enabledelayedexpansion -endian -endif -endl -endlocal -endptr -endregion -ENQ -enqueuing -entrypoint -ENU -enum -ENUMLOGFONT -ENUMLOGFONTEX -enumranges -envvar -eol -EPres -ERASEBKGND -errno -errorlevel -ETB -etcoreapp -ETW -ETX -EUDC -ev -EVENTID -eventing -everytime -evflags -evt -ewdelete -exe -execd -executables -executionengine -exemain -EXETYPE -exeuwp -exewin -exitwin -expectedinput -expr -EXPUNGECOMMANDHISTORY -EXSTYLE -EXTENDEDEDITKEY -EXTKEY -EXTTEXTOUT -facename -FACENODE -FACESIZE -failfast -FAILIFTHERE -fallthrough -FARPROC -fcb -fcharset -fclose -fcntl -fdc -FDD -fde -fdopen -fdw -fea -fesb -FFDE -FFrom -FGCOLOR -fgetc -fgetwc -FGHIJ -fgidx -FILEDESCRIPTION -fileno -filepath -FILESUBTYPE -FILESYSPATH -filesystem -FILETIME -FILETYPE -FILEW -FILLATTR -FILLCONSOLEOUTPUT -FILTERONPASTE -finalizer -FINDCASE -FINDDLG -FINDDOWN -FINDSTR -FINDSTRINGEXACT -FINDUP -FIter -FIXEDCONVERTED -Flg -flyout -fmodern -fmtarg -fmtid -fmtlib -FOLDERID -FONTCHANGE -fontdlg -FONTENUMDATA -FONTENUMPROC -FONTFACE -FONTFAMILY -FONTHEIGHT -fontlist -FONTOK -FONTSIZE -FONTSTRING -fonttbl -FONTTYPE -FONTWEIGHT -FONTWIDTH -FONTWINDOW -forceinline -FORCEOFFFEEDBACK -FORCEONFEEDBACK -FORCEV -foreach -fprintf -framebuffer -FRAMECHANGED -fre -freopen -frontend -Fscreen -FSCTL -FSINFOCLASS -fsproj -fstream -fte -Ftm -fullscreen -fullwidth -func -FUNCTIONCALL -fuzzer -fuzzmap -fuzzwrapper -fwdecl -fwe -fwlink -GAUSSIAN -gb -gci -gcx -gcy -gdi -gdip -gdirenderer -geopol -GETALIAS -GETALIASES -GETALIASESLENGTH -GETALIASEXES -GETALIASEXESLENGTH -GETAUTOHIDEBAREX -GETCARETWIDTH -getch -getchar -GETCLIENTAREAANIMATION -GETCOMMANDHISTORY -GETCOMMANDHISTORYLENGTH -GETCONSOLEINPUT -GETCONSOLEPROCESSLIST -GETCONSOLEWINDOW -GETCOUNT -GETCP -GETCURSEL -GETCURSORINFO -GETDISPLAYMODE -GETDISPLAYSIZE -GETDLGCODE -GETDPISCALEDSIZE -GETFONTINFO -GETFONTSIZE -GETHARDWARESTATE -GETHUNGAPPTIMEOUT -GETICON -GETITEMDATA -GETKEYBOARDLAYOUTNAME -GETKEYSTATE -GETLARGESTWINDOWSIZE -GETLBTEXT -getline -GETMINMAXINFO -GETMOUSEINFO -GETMOUSEVANISH -GETNUMBEROFFONTS -GETNUMBEROFINPUTEVENTS -GETOBJECT -GETPOS -GETSELECTIONINFO -getset -GETSTATE -GETTEXT -GETTEXTLEN -GETTITLE -GETWAITTOKILLSERVICETIMEOUT -GETWAITTOKILLTIMEOUT -GETWHEELSCROLLCHARACTERS -GETWHEELSCROLLCHARS -GETWHEELSCROLLLINES -getwriter -GFEh -Gfun -gfx -gh -GHIJK -GHIJKL -GHIJKLM -gitfilters -github -gitlab -gle -globals -gmail -GMEM -GNUC -Goldmine -gonce -Google -goutput -GPUs -Gravell's -grayscale -GREENSCROLL -Grehan -grep -Greyscale -gridline -groupbox -gset -gsl -GTP -guc -gui -guidatom -GValue -GWL -GWLP -gwsz -HABCDEF -Hackathon -halfwidth -HALTCOND -HANGEUL -hardcoded -hardcodes -hashalg -HASSTRINGS -hbitmap -hbm -HBMMENU -hbmp -hbr -hbrush -hc -HCmd -hdc -hdr -HDROP -hdrstop -HEIGHTSCROLL -hfile -hfont -hglobal -hh -hhh -hhook -hhx -HIBYTE -HICON -HIDEWINDOW -HIGHLIGHTTEXT -hinst -HINSTANCE -Hirots -HISTORYBUFS -HISTORYNODUP -HISTORYSIZE -hittest -HIWORD -hk -HKCU -hkey -hkl -HKLM -hlocal -hlsl -HMENU -hmod -hmodule -hmon -HMONITOR -horiz -HORZ -hostable -hostlib -HPA -HPAINTBUFFER -HPCON -hpj -hpp -HPR -HPROPSHEETPAGE -HProvider -HREDRAW -hresult -HRSRC -hscroll -hsl -hstr -hstring -hsv -HTCAPTION -HTCLIENT -htm -HTMAXBUTTON -HTMINBUTTON -html -HTMLTo -HTTOP -hu -hungapp -HVP -hwheel -hwnd -HWNDPARENT -hxx -IAccessibility -IAction -IApi -IApplication -IBase -icacls -iccex -icch -IChar -ico -IComponent -ICONERROR -Iconified -ICONINFORMATION -IConsole -ICONSTOP -IControl -ICONWARNING -ICore -IData -IDCANCEL -IDD -IDesktop -IDevice -IDictionary -IDISHWND -IDispatch -IDisposable -idl -idllib -IDOK -IDR -idth -idx -IDXGI -IDynamic -IEnd -IEnum -IEnumerable -ies -ietf -IFACEMETHODIMP -ifdef -ification -ifndef -IFont -ifstream -IGNOREEND -IHigh -IHosted -iid -IInitialize -IInput -IInspectable -IInteract -IInteractivity -IIo -IList -imagemagick -Imatch -ime -Imm -IMouse -impl -inbox -inclusivity -INCONTEXT -INFOEX -inheritcursor -inheritdoc -inheritfrom -ini -INITCOMMONCONTROLSEX -INITDIALOG -initguid -INITMENU -inkscape -inl -INLINEPREFIX -inlines -INotify -inout -inplace -inproc -Inputkeyinfo -INPUTPROCESSORPROFILE -inputrc -Inputreadhandledata -INSERTMODE -intellisense -INTERACTIVITYBASE -INTERCEPTCOPYPASTE -INTERNALNAME -interop -interoperability -inthread -intptr -intsafe -INVALIDARG -INVALIDATERECT -inwap -IObservable -ioctl -iomanip -iostream -iot -ipch -ipconfig -IPersist -ipp -IProperty -IPSINK -ipsp -IRaw -IRead -IReference -IRender -IRenderer -IScheme -ISelection -IShell -isocpp -issuecomment -IState -IStoryboard -isupper -ISwap -iswdigit -iswspace -ISystem -iterm -itermcolors -ITerminal -IText -itf -Ith -itoa -IUI -IUia -IUnknown -ivalid -IValue -IVector -IWait -iwch -IWeb -IWin -IWindow -IXaml -IXMP -jconcpp -JOBOBJECT -JOBOBJECTINFOCLASS -jpe -jpeg -jpg -JPN -json -jsoncpp -jsprovider -jumplist -KAttrs -kawa -kayla -Kazu -kazum -kbd -kcub -kcud -kcuf -kcuu -Kd -kernelbase -kernelbasestaging -KEYBDINPUT -keybinding -keychord -keydown -keyevent -KEYFIRST -KEYLAST -keymap -Keymapping -keyscan -keystate -keyup -KF -khome -KILLACTIVE -KILLFOCUS -kinda -KJ -KLF -KLMNO -KLMNOPQRST -KLMNOPQRSTQQQQQ -KU -KVM -KX -langid -LANGUAGELIST -lasterror -lastexitcode -LAYOUTRTL -LBN -LBound -LBUTTON -LBUTTONDBLCLK -LBUTTONDOWN -LBUTTONUP -lcb -LCONTROL -LCTRL -lcx -LEFTALIGN -LEFTSHIFT -len -lhs -libpopcnt -libtickit -LIMITTEXT -LINEDOWN -LINESELECTION -LINEWRAP -LINKERRCAP -LINKERROR -linkid -linkpath -linputfile -Linq -linux -listbox -listproperties -listptr -listptrsize -lk -lld -llvm -llx -LMENU -LMNOP -lnk -lnkd -lnkfile -LNM -LOADONCALL -LOBYTE -localappdata -localhost -locsrc -locstudio -Loewen -LOGFONT -LOGFONTW -logissue -lowercased -loword -lparam -lparen -LPBYTE -LPCCH -lpch -LPCHARSETINFO -LPCOLORREF -LPCPLINFO -LPCREATESTRUCT -lpcs -LPCSTR -LPCTSTR -LPCWSTR -lpdata -LPDBLIST -lpdis -LPDRAWITEMSTRUCT -lpdw -LPDWORD -lpelfe -lpfn -LPFNADDPROPSHEETPAGE -LPINT -lpl -LPMEASUREITEMSTRUCT -LPMINMAXINFO -lpmsg -LPNEWCPLINFO -LPNEWCPLINFOA -LPNEWCPLINFOW -LPNMHDR -lpntme -LPPOINT -LPPROC -LPPROPSHEETPAGE -LPPSHNOTIFY -lprc -LPRECT -lpstr -lpsz -LPTSTR -LPTTFONTLIST -lpv -LPVOID -LPW -LPWCH -LPWINDOWPOS -lpwpos -lpwstr -LRESULT -lru -lsb -lsconfig -lsproj -lss -lstatus -lstrcmp -lstrcmpi -LTEXT -LTLTLTLTL -ltype -LUID -lval -LVB -LVERTICAL -LWA -LWIN -lwkmvj -mailto -majorly -makeappx -MAKEINTRESOURCE -MAKEINTRESOURCEW -MAKELANGID -MAKELONG -MAKELPARAM -MAKELRESULT -malloc -manpage -MAPBITMAP -MAPVIRTUALKEY -MAPVK -MAXDIMENSTRING -maxing -MAXLENGTH -MAXSHORT -maxversiontested -MAXWORD -maybenull -MBUTTON -MBUTTONDBLCLK -MBUTTONDOWN -MBUTTONUP -Mbxy -mdmerge -MDs -MEASUREITEM -megamix -memallocator -memcmp -memcopy -memcpy -memmove -memset -MENUCHAR -MENUCONTROL -MENUDROPALIGNMENT -MENUITEM -MENUITEMINFO -MENUSELECT -Mersenne -messageext -metadata -metaproj -midl -mii -MIIM -milli -mimetype -mincore -mindbogglingly -mingw -minimizeall -minkernel -MINMAXINFO -mintty -minwin -minwindef -Mip -mkdir -MMBB -mmcc -MMCPL -mmsystem -MNC -MNOPQ -MNOPQR -MODALFRAME -modelproj -MODERNCORE -MONITORINFO -MONITORINFOEXW -MONITORINFOF -monospaced -monostate -MOUSEACTIVATE -MOUSEFIRST -MOUSEHWHEEL -MOUSEMOVE -mousewheel -MOVESTART -msb -msbuild -mscorlib -msctf -msctls -msdata -msdn -msft -MSGCMDLINEF -MSGF -MSGFILTER -MSGFLG -MSGMARKMODE -MSGS -MSGSCROLLMODE -MSGSELECTMODE -msiexec -MSIL -msix -msrc -msvcrt -MSVS -msys -msysgit -mui -Mul -multiline -munged -munges -mutex -mutexes -muxes -myapplet -mydir -myignite -MYMAX -Mypair -Myval -NAMELENGTH -nameof -namespace -namespaced -namestream -nano -natvis -nbsp -Nc -NCCALCSIZE -NCCREATE -NCLBUTTONDOWN -NCLBUTTONUP -NCMBUTTONDOWN -NCMBUTTONUP -NCPAINT -NCRBUTTONDOWN -NCRBUTTONUP -NCXBUTTONDOWN -NCXBUTTONUP -NDEBUG -ned -NEL -NEQ -netcoreapp -netstandard -NEWCPLINFO -NEWCPLINFOA -NEWCPLINFOW -newcursor -Newdelete -NEWINQUIRE -NEWINQURE -NEWPROCESSWINDOW -NEWTEXTMETRIC -NEWTEXTMETRICEX -Newtonsoft -NEXTLINE -nfe -nlength -Nls -NLSMODE -NOACTIVATE -NOAPPLYNOW -NOCLIP -NOCOLOR -NOCOMM -NOCONTEXTHELP -NOCOPYBITS -nodiscard -NODUP -noexcept -NOHELP -noinline -NOINTEGRALHEIGHT -NOINTERFACE -NOLINKINFO -nologo -NOMCX -NOMINMAX -NOMOVE -NONALERT -nonbreaking -nonclient -NONCONST -NONINFRINGEMENT -NONPREROTATED -nonspace -NOOWNERZORDER -NOPAINT -NOPQRST -noprofile -NOREDRAW -NOREMOVE -NOREPOSITION -noreturn -NORMALDISPLAY -NOSCRATCH -NOSEARCH -noselect -NOSENDCHANGING -NOSIZE -NOSNAPSHOT -NOTHOUSANDS -nothrow -NOTICKS -NOTIMPL -notin -NOTNULL -NOTOPMOST -NOTRACK -NOTSUPPORTED -nouicompat -nounihan -NOUPDATE -NOWAIT -NOYIELD -NOZORDER -NPM -npos -nrcs -NSTATUS -ntapi -ntcon -ntcsrdll -ntdef -NTDEV -ntdll -ntifs -ntlpcapi -ntm -ntrtl -ntstatus -ntsubauth -NTSYSCALLAPI -nttree -nturtl -ntuser -NTVDM -ntverp -NTWIN -nuget -nullness -nullonfailure -nullopt -nullptr -NULs -numlock -numpad -NUMSCROLL -nupkg -NVDA -NVIDIA -NVR -Nx -oa -OACR -oauth -objbase -ocf -ocolor -odl -oem -oemcp -OEMFONT -OEMFORMAT -offboarded -OI -Oj -OLEAUT -OLECHAR -onecore -ONECOREBASE -ONECORESDKTOOLS -ONECORESHELL -onecoreuap -onecoreuapuuid -onecoreuuid -ONECOREWINDOWS -onehalf -ONLCR -Oo -openconsoleproxy -openbash -opencode -opencon -openconsole -OPENIF -OPENLINK -openps -opensource -openvt -openxmlformats -oq -ORIGINALFILENAME -osc -OSCBG -OSCCT -OSCFG -OSCRCC -OSCSCB -OSCSCC -OSCWT -OSDEPENDSROOT -osfhandle -OSG -OSGENG -osign -oss -ostream -ostringstream -Ou -ouicompat -outdir -outfile -Outof -OUTOFCONTEXT -OUTOFMEMORY -outout -Outptr -Ov -OVERLAPPEDWINDOW -OWNDC -OWNERDRAWFIXED -packageuwp -PACKCOORD -PACKVERSION -pagedown -pageup -PAINTPARAMS -PAINTSTRUCT -PALPC -pankaj -params -parentable -parms -passthrough -PATCOPY -pathcch -PATTERNID -pb -PBOOL -PBYTE -pcat -pcb -pcch -PCCHAR -PCCONSOLE -PCD -pch -PCHAR -PCIDLIST -PCIS -PCLIENT -PCLONG -PCOBJECT -pcon -PCONSOLE -PCONSOLEENDTASK -PCONSOLESETFOREGROUND -PCONSOLEWINDOWOWNER -pcoord -pcs -pcshell -PCSHORT -PCSR -PCSTR -PCUNICODE -PCWCH -PCWCHAR -PCWSTR -pda -pdb -pdbonly -pdbstr -pdf -pdp -pdtobj -pdw -PDWORD -pdx -peb -PEMAGIC -PENDTASKMSG -pfa -PFACENODE -pfed -pfi -PFILE -pfn -PFNCONSOLECREATEIOTHREAD -PFONT -PFONTENUMDATA -PFS -pgdn -pguid -pgup -PHANDLE -phhook -phwnd -pid -pidl -PIDLIST -pii -pinam -pinvoke -pipename -pipestr -pixelheight -PIXELSLIST -PJOBOBJECT -pkey -placeholders -platforming -playsound -plist -PLOGICAL -plugin -PMv -png -pnm -PNMLINK -pntm -PNTSTATUS -POBJECT -Podcast -POINTSLIST -POLYTEXTW -popd -POPF -poppack -popup -POPUPATTR -PORFLG -positionals -posix -POSTCHARBREAKS -POSX -POSXSCROLL -POSYSCROLL -ppci -ppf -ppguid -ppidl -pplx -PPORT -PPROC -PPROCESS -ppropvar -ppsi -ppsl -ppsp -ppsz -ppv -ppwch -PQRST -pragma -prc -prealigned -prebuilt -precendence -precomp -prect -prefast -prefilled -prefs -preinstalled -PRELOAD -PREMULTIPLIED -prepopulated -presorted -PREVENTPINNING -PREVIEWLABEL -PREVIEWWINDOW -PREVLINE -prg -pri -printf -prioritization -processenv -processhost -PROCESSINFOCLASS -procs -Progman -proj -PROPERTYID -PROPERTYKEY -PROPERTYVAL -propsheet -PROPSHEETHEADER -PROPSHEETPAGE -propslib -propsys -PROPTITLE -propvar -propvariant -propvarutil -psa -psd -PSECURITY -pseudocode -pseudoconsole -pseudoterminal -psh -pshn -PSHNOTIFY -PSHORT -pshpack -PSINGLE -psl -psldl -psm -PSMALL -PSNRET -PSobject -psp -PSPCB -psr -PSTR -psuedoconsole -psz -ptch -ptr -ptrdiff -ptsz -PTYIn -PUCHAR -PULONG -PUNICODE -pushd -putchar -putwchar -pv -PVOID -pw -pwch -PWCHAR -PWDDMCONSOLECONTEXT -PWORD -pwsh -pwstr -pwsz -px -py -pythonw -qi -QJ -qo -QOL -QRSTU -qsort -queryable -QUESTIONMARK -quickedit -QWER -qzmp -RAII -RALT -rasterbar -rasterfont -rasterization -rawinput -RAWPATH -raytracers -razzlerc -rbar -rbegin -RBUTTON -RBUTTONDBLCLK -RBUTTONDOWN -RBUTTONUP -rcch -RCDATA -rcelms -rcl -rclsid -RCOA -RCOCA -RCOCW -RCONTROL -RCOW -rcv -rdbuf -RDONLY -rdpartysource -readback -READCONSOLE -READCONSOLEOUTPUT -READCONSOLEOUTPUTSTRING -Readline -readme -READMODE -readonly -READWRITE -realloc -reamapping -rects -redef -Redir -redirector -redist -redistributable -REDSCROLL -refactor -refactoring -REFCLSID -refcount -referencesource -REFGUID -REFIID -REFPROPERTYKEY -regex -REGISTEROS -REGISTERVDM -regkey -REGSTR -reingest -Relayout -RELBINPATH -remoting -renamer -renderengine -rendersize -reparent -reparenting -replatformed -Replymessage -repositorypath -rescap -Resequence -reserialize -RESETCONTENT -resheader -resizable -resmimetype -restrictedcapabilities -resw -resx -retval -rfa -rfc -rftp -rgb -rgba -rgbi -rgch -rgci -rgfae -rgfte -rgi -rgn -rgp -rgpwsz -rgrc -rgs -rgui -rgw -rgwch -rhs -ri -RIGHTALIGN -RIGHTBUTTON -riid -RIPMSG -Rl -rmdir -RMENU -roadmap -robomac -roundtrip -rparen -RRF -RRRGGGBB -rsas -rtcore -RTEXT -rtf -RTFTo -Rtl -RTLREADING -RTTI -ru -ruleset -runas -runasradio -RUNDLL -runformat -runft -RUNFULLSCREEN -runsettings -runtests -runtimeclass -runuia -runut -rvalue -RVERTICAL -rxvt -RWIN -safearray -SAFECAST -safemath -sba -SBCS -SBCSDBCS -sbi -sbiex -sbold -scancode -scanline -schemename -SCL -scm -scprintf -SCRBUF -SCRBUFSIZE -screenbuffer -SCREENBUFFERINFO -screeninfo -screenshot -scriptload -Scrollable -scrollback -scrollbar -Scrolldown -Scrolldownpage -Scroller -SCROLLFORWARD -SCROLLINFO -scrolllock -scrolloffset -SCROLLSCALE -SCROLLSCREENBUFFER -Scrollup -Scrolluppage -scursor -sddl -sdeleted -sdk -SDKDDK -searchbox -securityappcontainer -segfault -SELCHANGE -SELECTALL -selectany -SELECTEDFONT -SELECTSTRING -Selfhosters -SERVERDLL -SETACTIVE -SETBUDDYINT -SETCOLOR -setcp -SETCURSEL -SETCURSOR -SETCURSORINFO -SETCURSORPOSITION -SETDISPLAYMODE -setfill -SETFOCUS -SETFONT -SETFOREGROUND -SETHARDWARESTATE -SETHOTKEY -SETICON -setintegritylevel -SETITEMDATA -SETITEMHEIGHT -SETKEYSHORTCUTS -setlocal -setlocale -SETMENUCLOSE -setmode -SETNUMBEROFCOMMANDS -SETOS -SETPALETTE -SETPOS -SETRANGE -SETSCREENBUFFERSIZE -SETSEL -SETTEXTATTRIBUTE -SETTINGCHANGE -SETTITLE -setw -Setwindow -SETWINDOWINFO -sfi -SFINAE -SFUI -sgr -SHANDLE -SHCo -shcore -shellapi -shellex -shellscalingapi -SHFILEINFO -SHGFI -SHGFP -SHIFTJIS -Shl -shlguid -shlobj -shlwapi -SHORTPATH -SHOWCURSOR -SHOWMAXIMIZED -SHOWMINNOACTIVE -SHOWNOACTIVATE -SHOWNORMAL -SHOWWINDOW -SHRT -sid -sidebyside -SIF -SIGDN -SINGLEFLAG -SINGLETHREADED -siup -SIZEBOX -sizeof -SIZESCROLL -SKIPFONT -SKIPOWNPROCESS -SKIPOWNTHREAD -sku -sldl -SLGP -SLIST -slmult -sln -slpit -smalllogo -SManifest -SMARTQUOTE -SMTO -SND -SOLIDBOX -Solutiondir -somefile -SOURCEBRANCH -sourced -SOURCESDIRECTORY -SPACEBAR -spammy -spand -splashscreen -sprintf -sqlproj -srand -src -SRCCODEPAGE -SRCCOPY -SRCINVERT -srcsrv -SRCSRVTRG -srctool -sre -srect -srv -srvinit -srvpipe -ssh -sstream -stackoverflow -standalone -STARTF -STARTUPINFO -STARTUPINFOEX -STARTUPINFOEXW -STARTUPINFOW -STARTWPARMS -STARTWPARMSA -STARTWPARMSW -Statusline -stdafx -STDAPI -stdcall -stdcpp -stderr -stdexcept -stdin -stdio -STDMETHODCALLTYPE -STDMETHODIMP -stdout -stgm -stl -stoi -stol -storelogo -stoul -stoutapot -strikethrough -stringstream -STRINGTABLE -strlen -strrev -strsafe -strtok -structs -STUVWX -STX -stylecop -SUA -subcompartment -subkey -SUBLANG -sublicensable -submenu -subresource -subspan -substr -subsystemconsole -subsystemwindows -suiteless -svg -swapchain -swapchainpanel -swappable -SWMR -SWP -swprintf -sx -sy -SYMED -SYNCPAINT -syscalls -SYSCHAR -SYSCOMMAND -SYSDEADCHAR -Sysinternals -SYSKEYDOWN -SYSKEYUP -SYSLINK -SYSMENU -sysparams -sysparamsext -SYSTEMHAND -SYSTEMMENU -sz -tabview -TAdd -taef -TARG -targetentrypoint -TARGETLIBS -TARGETNAME -targetnametoken -targetsize -targetver -taskbar -tbar -TBase -tbc -tbi -Tbl -TBM -tchar -TCHFORMAT -TCI -tcome -tcommandline -tcommands -TDelegated -TDP -TEAMPROJECT -tearoff -Teb -techcommunity -technet -tellp -telnet -telnetd -templated -teraflop -terminalcore -TERMINALSCROLLING -terminfo -TEs -testapp -testbuildplatform -testcon -testd -testdlls -testenv -testlab -testlist -testmd -testmddefinition -testmode -testname -testnameprefix -TESTNULL -testpass -testpasses -testtestabc -testtesttesttesttest -testtimeout -TEXCOORD -texel -TExpected -textattribute -TEXTATTRIBUTEID -textbox -textboxes -textbuffer -TEXTINCLUDE -textinfo -TEXTMETRIC -TEXTMETRICW -textmode -tf -TFCAT -tfoo -TFunction -tga -threadpool -THUMBPOSITION -THUMBTRACK -TIcon -tif -tilunittests -Timeline -titlebar -TITLEISLINKNAME -TJson -tl -TLEN -Tlg -Tlgdata -TMAE -TMPF -TMult -tmultiple -tmux -todo -tofrom -tokenhelpers -tokenized -tokenizing -toolbars -TOOLINFO -Toolset -tooltip -TOPDOWNDIB -TOPLEFT -toplevel -TOPRIGHT -TOpt -tosign -touchpad -towlower -towupper -Tpp -Tpqrst -tprivapi -tracelog -tracelogging -traceloggingprovider -trackbar -TRACKCOMPOSITION -trackpad -transcoder -transitioning -Trd -TREX -triaged -triaging -TRIANGLESTRIP -TRIMZEROHEADINGS -truetype -trx -tsattrs -tsf -TStr -TSTRFORMAT -TSub -tt -TTBITMAP -ttf -TTFONT -TTFONTLIST -tthe -tthis -TTM -TTo -TVPP -Txtev -typechecked -typechecking -typedef -typeid -typeinfo -typelib -typename -typeof -typeparam -TYUI -UAC -uap -uapadmin -UAX -ubuntu -ucd -UCD -ucdxml -uch -UCHAR -ucs -udk -UDM -uer -uget -uia -UIACCESS -uiacore -uiautomationcore -Uid -uielem -UIELEMENTENABLEDONLY -uint -uintptr -ul -ulcch -ulong -Unadvise -unattend -uncomment -UNCPRIORITY -undef -Unescape -unexpand -Unfocus -unhighlighting -unhosted -unicode -UNICODESTRING -UNICODETEXT -UNICRT -UNINIT -uninitialize -uninstall -Uniscribe -unittest -unittesting -universaltest -Unk -unknwn -unmark -UNORM -unparseable -unpause -Unregister -Unregistering -unte -untests -untextured -untimes -UPDATEDISPLAY -UPDOWN -UPKEY -UPSS -upvote -uri -url -urlencoded -Urxvt -USASCII -usebackq -USECALLBACK -USECOLOR -USECOUNTCHARS -USEDEFAULT -USEDX -USEFILLATTRIBUTE -USEGLYPHCHARS -USEHICON -USEPOSITION -userbase -USERDATA -userdpiapi -username -Userp -userprivapi -userprofile -USERSRV -USESHOWWINDOW -USESIZE -USESTDHANDLES -ushort -USRDLL -utf -utils -utr -uuid -uuidof -uuidv -UVWX -UVWXY -UWA -uwp -uxtheme -vals -Vanara -vararg -vbproj -vclib -Vcount -vcpkg -vcprintf -vcproj -vcrt -vcvarsall -vcxitems -vcxproj -vec -VERCTRL -versioning -VERTBAR -vf -VFT -vga -vgaoem -viewkind -viewports -Virt -VIRTTERM -Virtualizing -vk -vkey -VKKEYSCAN -VMs -VPA -VPATH -VPR -VPrintf -VProc -VRaw -VREDRAW -vsc -vscprintf -VSCROLL -vsinfo -vsnprintf -vso -vspath -vsprintf -VSTAMP -vstest -VSTS -VSTT -vstudio -vswhere -vtapp -VTE -VTID -vtio -vtmode -vtpipeterm -vtpt -vtrenderer -VTRGB -VTRGBTo -vtseq -vtterm -vttest -VWX -waaay -waitable -waivable -WANSUNG -WANTARROWS -WANTTAB -wapproj -wav -wbuilder -wch -wchar -WCIA -WCIW -WClass -wcout -wcschr -wcscmp -wcscpy -WCSHELPER -wcsicmp -wcslen -wcsnicmp -wcsrchr -wcsrev -wcstod -wcstoul -wddm -wddmcon -wddmconrenderer -WDDMCONSOLECONTEXT -wdm -webpage -website -websocket -wekyb -WEOF -wex -wextest -wextestclass -wfdopen -WFill -wfopen -wfstream -WHelper -whitelisting -WIDTHSCROLL -Widthx -wiki -wikia -wikipedia -wil -WImpl -WINAPI -winbase -winbasep -wincon -winconp -winconpty -winconptydll -winconptylib -wincontypes -WINCORE -windbg -WINDEF -WINDIR -windll -WINDOWALPHA -Windowbuffer -windowdpiapi -WINDOWEDGE -windowext -WINDOWFRAME -windowime -WINDOWINFO -windowio -windowmetrics -WINDOWPLACEMENT -windowpos -WINDOWPOSCHANGED -WINDOWPOSCHANGING -windowproc -windowrect -windowsapp -windowsinternalstring -WINDOWSIZE -windowsx -WINDOWTEXT -windowtheme -WINDOWTITLE -winevent -winfx -wingdi -winget -WINIDE -winioctl -winmd -winmeta -winmgr -winmm -winnt -Winperf -WInplace -winres -winrt -wintelnet -winternl -winuser -winuserp -WINVER -wistd -wixproj -wline -wlinestream -wmain -WMSZ -wnd -WNDALLOC -WNDCLASS -WNDCLASSEX -WNDCLASSW -Wndproc -WNegative -WNull -wnwb -workarea -workaround -workflow -workitem -wostream -WOutside -WOWARM -WOWx -wparam -WPartial -wpf -WPR -WPrep -WPresent -wprintf -wprp -wprpi -wregex -WResult -writeback -writechar -WRITECONSOLE -WRITECONSOLEINPUT -WRITECONSOLEOUTPUT -WRITECONSOLEOUTPUTSTRING -wrl -wrp -WRunoff -WScript -wsl -WSLENV -wsmatch -WSpace -wss -wstr -wstring -wstringstream -wsz -wtd -WTest -WTEXT -WTo -wtof -wtoi -WTs -wtw -wtypes -Wubi -WUX -WVerify -wwaproj -WWith -wx -wxh -xa -xact -xamarin -xaml -Xamlmeta -xargs -xaz -xbf -xbutton -XBUTTONDBLCLK -XBUTTONDOWN -XBUTTONUP -XCast -XCENTER -XColors -xcopy -XCount -xdy -XEncoding -xes -Xes -XES -xff -XFile -XManifest -XMath -XMFLOAT -xml -xmlns -xor -xorg -XOrg -Xpath -XPosition -XResource -xsd -xsi -xsize -XSubstantial -xtended -xterm -XTest -XTPUSHSGR -XTPOPSGR -xunit -xutr -xvalue -XVIRTUALSCREEN -XWalk -xy -Xzn -yact -YAML -YCast -YCENTER -YCount -YDPI -yml -YOffset -YPosition -YSize -YSubstantial -YVIRTUALSCREEN -Yw -YWalk -yx -YZ -Zc -ZCmd -ZCtrl -zd -zh -ZM -zsh -zu -zxcvbnm -zy +AAAAAABBBBBBCCC +AAAAABBBBBBBCCC +AAAAABBBBBBCCC +AAAAABCCCCCCCCC +AAAAADCCCCCCCCC +ABANDONFONT +abcd +ABCDEFGHIJKLMNO +ABCG +abf +abgr +abi +ACCESSTOKEN +acec +acf +acidev +ACIOSS +ACover +actctx +ACTCTXW +activatable +ACTIVEBORDER +ACTIVECAPTION +ADDALIAS +ADDB +ADDREF +addressof +ADDSTRING +ADDTOOL +aef +AEnd +AFew +AFill +AFX +AHelper +ahz +AImpl +AInplace +ALIGNRIGHT +alloc +allocing +alpc +ALTERNATENAME +ALTF +ALTNUMPAD +ALWAYSTIP +amd +ansd +ansicode +ansicpg +ANSISYS +ANSISYSRC +ANSISYSSC +antialias +antialiasing +ANull +anycpu +AOn +APARTMENTTHREADED +APCs +api +APIENTRY +apiset +apos +APPBARDATA +appconsult +APPICON +appium +applet +appletname +applicationmodel +APPLMODAL +appmodel +apps +APPWINDOW +appx +appxbundle +appxerror +appxmanifest +APrep +apsect +APSTUDIO +archeologists +architected +argb +argc +args +argv +ARRAYSIZE +ARROWKEYS +ASBRST +ASBSET +ASDF +asdfghjkl +ASetting +ASingle +asm +asmv +asmx +aspnet +aspx +astextplain +AStomps +ASYNCWINDOWPOS +atch +ATest +attr +ATTRCOLOR +aumid +Authenticode +AUTOBUDDY +AUTOCHECKBOX +autogenerated +autohide +AUTOHSCROLL +automagically +autopositioning +AUTORADIOBUTTON +autoscrolling +Autowrap +AVerify +AVI +awch +azuredevopspodcast +azurewebsites +azzle +backend +backgrounded +Backgrounder +backgrounding +backport +backstory +Batang +baz +Bazz +BBBBBCCC +BBBBCCCCC +BBDM +bbwe +bc +bcount +bcrypt +bcx +bcz +BEFOREPARENT +beginthread +bgcolor +bgfx +bgidx +Bgk +BGR +BGRA +BHID +biblioscape +bigobj +binplace +binplaced +bitcoin +bitcrazed +bitflag +bitmask +BITOPERATION +bitsavers +bitset +BKCOLOR +BKGND +Bksp +blog +Blt +BLUESCROLL +bmp +BOLDFONT +BOOLIFY +bools +boostorg +Borland +BOTTOMLEFT +BOTTOMRIGHT +boutput +BPBF +bpp +BPPF +branchconfig +BRK +Browsable +bsearch +BSODs +bstr +BTNFACE +buf +bufferout +buffersize +buflen +bugfix +buildtransitive +BUILDURI +burriter +BValue +byref +bytearray +bytebuffer +Cac +callee +cang +capslock +CARETBLINKINGENABLED +CARRIAGERETURN +cascadia +cassert +catid +cazamor +CBash +cbegin +cbiex +CBN +CBoolean +cbt +cbuffer +CCCBB +ccf +cch +CCHAR +cci +CCmd +ccolor +CCom +CComp +CConsole +CConversion +CCRT +cctype +CDATA +cdd +cdecl +CDeclaration +CEdit +CELLSIZE +cend +cerr +cfae +Cfg +cfie +cfiex +cfte +CFuzz +cgscrn +chafa +changelist +charinfo +charlespetzold +charset +CHARSETINFO +chcp +checkbox +checkboxes +chh +Childitem +chk +chrono +CHT +ci +Cic +cjk +ckuehl +cla +Clcompile +CLE +cleartype +CLICKACTIVE +clickdown +climits +clipbrd +CLIPCHILDREN +CLIPSIBLINGS +cliutils +clocale +closetest +cloudconsole +cls +CLSCTX +clsid +CLUSTERMAP +cmath +cmatrix +cmder +CMDEXT +Cmdlet +cmdline +CMOUSEBUTTONS +cmp +cmt +cmyk +CNL +cnt +CNTRL +codebase +Codeflow +codepage +codepath +codepoint +codeproject +COINIT +COLLECTIONURI +colorizing +colororacle +colorref +colorscheme +colorspaces +colorspec +colortable +colortbl +colortool +COLR +combaseapi +combobox +comctl +COMDAT +commandline +commctrl +commdlg +COMMITID +compat +componentization +conapi +conareainfo +conattrs +conbufferout +concat +concfg +conddkrefs +condrv +conechokey +conemu +config +configurability +conhost +conhostv +conime +conimeinfo +conint +conintegrity +conintegrityuwp +coninteractivitybase +coninteractivityonecore +coninteractivitywin +conio +coniosrv +CONKBD +conlibk +conmsgl +CONNECTINFO +CONOUT +conpixels +conprops +conpropsp +conpty +conptylib +conserv +consoleapi +CONSOLECONTROL +CONSOLEENDTASK +consolegit +consolehost +CONSOLEIME +consoleinternal +Consoleroot +Consolescreen +CONSOLESETFOREGROUND +consoletaeftemplates +CONSOLEV +Consolewait +CONSOLEWINDOWOWNER +consrv +constexpr +constexprable +constness +contentfiles +conterm +CONTEXTMENU +contsf +contypes +convarea +conwinuserrefs +coord +coordnew +COPYCOLOR +CORESYSTEM +cotaskmem +countof +cout +CPG +cpinfo +CPINFOEX +cplinfo +cplusplus +cpp +CPPCORECHECK +cppcorecheckrules +cpprest +cpprestsdk +cppwinrt +CProc +cpx +crbegin +CREATESCREENBUFFER +CREATESTRUCT +CREATESTRUCTW +creativecommons +cred +cref +crend +CRLFs +crloew +crt +CRTLIBS +csbi +csbiex +csharp +CSHORT +CSIDL +csproj +Csr +csrmsg +CSRSS +csrutil +cstdarg +cstddef +cstdio +cstdlib +cstr +cstring +cstyle +csv +CSwitch +CText +ctime +ctl +ctlseqs +Ctlv +ctor +CTRLEVENT +CTRLKEYSHORTCUTS +Ctx +Ctxt +ctype +CUF +cupxy +curated +CURRENTFONT +currentmode +CURRENTPAGE +CURSORCOLOR +CURSORSIZE +CURSORTYPE +CUU +cw +Cwa +cwch +cwchar +cwctype +cwd +cx +cxcy +CXFRAME +CXFULLSCREEN +CXHSCROLL +CXMIN +CXPADDEDBORDER +CXSIZE +CXSMICON +CXVIRTUALSCREEN +CXVSCROLL +cxx +CYFRAME +CYFULLSCREEN +cygwin +CYHSCROLL +CYMIN +CYPADDEDBORDER +CYSIZE +CYSIZEFRAME +CYSMICON +CYVIRTUALSCREEN +CYVSCROLL +dahall +dai +DATABLOCK +DATAVIEW +DATAW +DBatch +dbcs +DBCSCHAR +DBCSFONT +dbg +DBGALL +DBGCHARS +DBGFONTS +DBGOUTPUT +dbh +dblclk +DBlob +dbproj +DBUILD +DColor +DCOLORVALUE +dcommon +DCompile +dcompiler +DComposition +dde +DDESHARE +DDevice +DEADCHAR +dealloc +Debian +debolden +debounce +DECALN +DECANM +DECAUPSS +DECAWM +DECCKM +DECCOLM +DECEKBD +DECID +DECKPAM +DECKPM +DECKPNM +DECLRMM +decls +declspec +decltype +declval +DECNKM +DECNRCM +DECOM +deconstructed +DECPCTERM +DECRC +DECREQTPARM +DECRLM +DECRQM +DECRST +DECSASD +DECSC +DECSCA +DECSCNM +DECSCPP +DECSCUSR +DECSED +DECSEL +DECSET +DECSLPP +DECSLRM +DECSMKR +DECSR +decstandar +DECSTBM +DECSTR +DECTCEM +Dedupe +deduplicated +DEFAULTBACKGROUND +DEFAULTFOREGROUND +defaultsettings +DEFAULTTONEAREST +DEFAULTTONULL +DEFAULTTOPRIMARY +defectdefs +DEFERERASE +deff +DEFFACE +defing +DEFPUSHBUTTON +defterm +DELAYLOAD +deletable +DELETEONRELEASE +delims +Delt +demoable +depersist +deprioritized +deps +deque +deref +deserialization +deserialize +deserialized +deserializer +deserializing +desktopwindowxamlsource +dest +DESTINATIONNAME +devblogs +developercommunity +devicecode +devicefamily +devops +Dext +df +DFactory +DFF +DFMT +dh +dhandler +dialogbox +diffing +DINLINE +directio +DIRECTX +Dirs +DISABLENOSCROLL +DISPLAYATTRIBUTE +DISPLAYATTRIBUTEPROPERTY +DISPLAYCHANGE +distro +dlg +DLGC +dll +dllexport +DLLGETVERSIONPROC +dllimport +dllinit +dllmain +DLLVERSIONINFO +DLOAD +DLOOK +dmp +DOCTYPE +docx +DONTCARE +doskey +dotnet +doubleclick +downlevel +dpg +dpi +DPIAPI +DPICHANGE +DPICHANGED +dpix +dpiy +DRAWFRAME +DRAWITEM +DRAWITEMSTRUCT +drcs +dropdown +DROPDOWNLIST +DROPFILES +drv +dsm +dst +DSwap +DTest +dtor +DTTERM +DUMMYUNIONNAME +DUNICODE +DUNIT +dup'ed +dvi +dw +DWLP +dwm +dwmapi +dword +dwrite +dwriteglyphrundescriptionclustermap +dxgi +dxgidwm +dxinterop +dxttbmp +eachother +eaf +EASTEUROPE +eb +ECH +echokey +ecount +ECpp +Edgium +EDITKEYS +EDITTEXT +EDITUPDATE +edputil +edu +Efast +EHsc +EJO +EK +ELEMENTNOTAVAILABLE +elems +elif +elseif +emacs +EMPTYBOX +enabledelayedexpansion +endian +endif +endl +endlocal +endptr +endregion +ENQ +enqueuing +entrypoint +ENU +enum +ENUMLOGFONT +ENUMLOGFONTEX +enumranges +envvar +eol +EPres +ERASEBKGND +errno +errorlevel +ETB +etcoreapp +ETW +ETX +EUDC +ev +EVENTID +eventing +everytime +evflags +evt +ewdelete +exe +execd +executables +executionengine +exemain +EXETYPE +exeuwp +exewin +exitwin +expectedinput +expr +EXPUNGECOMMANDHISTORY +EXSTYLE +EXTENDEDEDITKEY +EXTKEY +EXTTEXTOUT +facename +FACENODE +FACESIZE +failfast +FAILIFTHERE +fallthrough +FARPROC +fcb +fcharset +fclose +fcntl +fdc +FDD +fde +fdopen +fdw +fea +fesb +FFDE +FFrom +FGCOLOR +fgetc +fgetwc +FGHIJ +fgidx +FILEDESCRIPTION +fileno +filepath +FILESUBTYPE +FILESYSPATH +filesystem +FILETIME +FILETYPE +FILEW +FILLATTR +FILLCONSOLEOUTPUT +FILTERONPASTE +finalizer +FINDCASE +FINDDLG +FINDDOWN +FINDSTR +FINDSTRINGEXACT +FINDUP +FIter +FIXEDCONVERTED +Flg +flyout +fmodern +fmtarg +fmtid +fmtlib +FOLDERID +FONTCHANGE +fontdlg +FONTENUMDATA +FONTENUMPROC +FONTFACE +FONTFAMILY +FONTHEIGHT +fontlist +FONTOK +FONTSIZE +FONTSTRING +fonttbl +FONTTYPE +FONTWEIGHT +FONTWIDTH +FONTWINDOW +forceinline +FORCEOFFFEEDBACK +FORCEONFEEDBACK +FORCEV +foreach +fprintf +framebuffer +FRAMECHANGED +fre +freopen +frontend +Fscreen +FSCTL +FSINFOCLASS +fsproj +fstream +fte +Ftm +fullscreen +fullwidth +func +FUNCTIONCALL +fuzzer +fuzzmap +fuzzwrapper +fwdecl +fwe +fwlink +GAUSSIAN +gb +gci +gcx +gcy +gdi +gdip +gdirenderer +geopol +GETALIAS +GETALIASES +GETALIASESLENGTH +GETALIASEXES +GETALIASEXESLENGTH +GETAUTOHIDEBAREX +GETCARETWIDTH +getch +getchar +GETCLIENTAREAANIMATION +GETCOMMANDHISTORY +GETCOMMANDHISTORYLENGTH +GETCONSOLEINPUT +GETCONSOLEPROCESSLIST +GETCONSOLEWINDOW +GETCOUNT +GETCP +GETCURSEL +GETCURSORINFO +GETDISPLAYMODE +GETDISPLAYSIZE +GETDLGCODE +GETDPISCALEDSIZE +GETFONTINFO +GETFONTSIZE +GETHARDWARESTATE +GETHUNGAPPTIMEOUT +GETICON +GETITEMDATA +GETKEYBOARDLAYOUTNAME +GETKEYSTATE +GETLARGESTWINDOWSIZE +GETLBTEXT +getline +GETMINMAXINFO +GETMOUSEINFO +GETMOUSEVANISH +GETNUMBEROFFONTS +GETNUMBEROFINPUTEVENTS +GETOBJECT +GETPOS +GETSELECTIONINFO +getset +GETSTATE +GETTEXT +GETTEXTLEN +GETTITLE +GETWAITTOKILLSERVICETIMEOUT +GETWAITTOKILLTIMEOUT +GETWHEELSCROLLCHARACTERS +GETWHEELSCROLLCHARS +GETWHEELSCROLLLINES +getwriter +GFEh +Gfun +gfx +gh +GHIJK +GHIJKL +GHIJKLM +gitfilters +github +gitlab +gle +globals +gmail +GMEM +GNUC +Goldmine +gonce +Google +goutput +GPUs +Gravell's +grayscale +GREENSCROLL +Grehan +grep +Greyscale +gridline +groupbox +gset +gsl +GTP +guc +gui +guidatom +GValue +GWL +GWLP +gwsz +HABCDEF +Hackathon +halfwidth +HALTCOND +HANGEUL +hardcoded +hardcodes +hashalg +HASSTRINGS +hbitmap +hbm +HBMMENU +hbmp +hbr +hbrush +hc +HCmd +hdc +hdr +HDROP +hdrstop +HEIGHTSCROLL +hfile +hfont +hglobal +hh +hhh +hhook +hhx +HIBYTE +HICON +HIDEWINDOW +HIGHLIGHTTEXT +hinst +HINSTANCE +Hirots +HISTORYBUFS +HISTORYNODUP +HISTORYSIZE +hittest +HIWORD +hk +HKCU +hkey +hkl +HKLM +hlocal +hlsl +HMENU +hmod +hmodule +hmon +HMONITOR +horiz +HORZ +hostable +hostlib +HPA +HPAINTBUFFER +HPCON +hpj +hpp +HPR +HPROPSHEETPAGE +HProvider +HREDRAW +hresult +HRSRC +hscroll +hsl +hstr +hstring +hsv +HTCAPTION +HTCLIENT +htm +HTMAXBUTTON +HTMINBUTTON +html +HTMLTo +HTTOP +hu +hungapp +HVP +hwheel +hwnd +HWNDPARENT +hxx +IAccessibility +IAction +IApi +IApplication +IBase +icacls +iccex +icch +IChar +ico +IComponent +ICONERROR +Iconified +ICONINFORMATION +IConsole +ICONSTOP +IControl +ICONWARNING +ICore +IData +IDCANCEL +IDD +IDesktop +IDevice +IDictionary +IDISHWND +IDispatch +IDisposable +idl +idllib +IDOK +IDR +idth +idx +IDXGI +IDynamic +IEnd +IEnum +IEnumerable +ies +ietf +IFACEMETHODIMP +ifdef +ification +ifndef +IFont +ifstream +IGNOREEND +IHigh +IHosted +iid +IInitialize +IInput +IInspectable +IInteract +IInteractivity +IIo +IList +imagemagick +Imatch +ime +Imm +IMouse +impl +inbox +inclusivity +INCONTEXT +INFOEX +inheritcursor +inheritdoc +inheritfrom +ini +INITCOMMONCONTROLSEX +INITDIALOG +initguid +INITMENU +inkscape +inl +INLINEPREFIX +inlines +INotify +inout +inplace +inproc +Inputkeyinfo +INPUTPROCESSORPROFILE +inputrc +Inputreadhandledata +INSERTMODE +intellisense +INTERACTIVITYBASE +INTERCEPTCOPYPASTE +INTERNALNAME +interop +interoperability +inthread +intptr +intsafe +INVALIDARG +INVALIDATERECT +inwap +IObservable +ioctl +iomanip +iostream +iot +ipch +ipconfig +IPersist +ipp +IProperty +IPSINK +ipsp +IRaw +IRead +IReference +IRender +IRenderer +IScheme +ISelection +IShell +isocpp +issuecomment +IState +IStoryboard +isupper +ISwap +iswdigit +iswspace +ISystem +iterm +itermcolors +ITerminal +IText +itf +Ith +itoa +IUI +IUia +IUnknown +ivalid +IValue +IVector +IWait +iwch +IWeb +IWin +IWindow +IXaml +IXMP +jconcpp +JOBOBJECT +JOBOBJECTINFOCLASS +jpe +jpeg +jpg +JPN +json +jsoncpp +jsprovider +jumplist +KAttrs +kawa +kayla +Kazu +kazum +kbd +kcub +kcud +kcuf +kcuu +Kd +kernelbase +kernelbasestaging +KEYBDINPUT +keybinding +keychord +keydown +keyevent +KEYFIRST +KEYLAST +keymap +Keymapping +keyscan +keystate +keyup +KF +khome +KILLACTIVE +KILLFOCUS +kinda +KJ +KLF +KLMNO +KLMNOPQRST +KLMNOPQRSTQQQQQ +KU +KVM +KX +langid +LANGUAGELIST +lasterror +lastexitcode +LAYOUTRTL +LBN +LBound +LBUTTON +LBUTTONDBLCLK +LBUTTONDOWN +LBUTTONUP +lcb +LCONTROL +LCTRL +lcx +LEFTALIGN +LEFTSHIFT +len +lhs +libpopcnt +libtickit +LIMITTEXT +LINEDOWN +LINESELECTION +LINEWRAP +LINKERRCAP +LINKERROR +linkid +linkpath +linputfile +Linq +linux +listbox +listproperties +listptr +listptrsize +lk +lld +llvm +llx +LMENU +LMNOP +lnk +lnkd +lnkfile +LNM +LOADONCALL +LOBYTE +localappdata +localhost +locsrc +locstudio +Loewen +LOGFONT +LOGFONTW +logissue +lowercased +loword +lparam +lparen +LPBYTE +LPCCH +lpch +LPCHARSETINFO +LPCOLORREF +LPCPLINFO +LPCREATESTRUCT +lpcs +LPCSTR +LPCTSTR +LPCWSTR +lpdata +LPDBLIST +lpdis +LPDRAWITEMSTRUCT +lpdw +LPDWORD +lpelfe +lpfn +LPFNADDPROPSHEETPAGE +LPINT +lpl +LPMEASUREITEMSTRUCT +LPMINMAXINFO +lpmsg +LPNEWCPLINFO +LPNEWCPLINFOA +LPNEWCPLINFOW +LPNMHDR +lpntme +LPPOINT +LPPROC +LPPROPSHEETPAGE +LPPSHNOTIFY +lprc +LPRECT +lpstr +lpsz +LPTSTR +LPTTFONTLIST +lpv +LPVOID +LPW +LPWCH +LPWINDOWPOS +lpwpos +lpwstr +LRESULT +lru +lsb +lsconfig +lsproj +lss +lstatus +lstrcmp +lstrcmpi +LTEXT +LTLTLTLTL +ltype +LUID +lval +LVB +LVERTICAL +LWA +LWIN +lwkmvj +mailto +majorly +makeappx +MAKEINTRESOURCE +MAKEINTRESOURCEW +MAKELANGID +MAKELONG +MAKELPARAM +MAKELRESULT +malloc +manpage +MAPBITMAP +MAPVIRTUALKEY +MAPVK +MAXDIMENSTRING +maxing +MAXLENGTH +MAXSHORT +maxversiontested +MAXWORD +maybenull +MBUTTON +MBUTTONDBLCLK +MBUTTONDOWN +MBUTTONUP +Mbxy +mdmerge +MDs +MEASUREITEM +megamix +memallocator +memcmp +memcopy +memcpy +memmove +memset +MENUCHAR +MENUCONTROL +MENUDROPALIGNMENT +MENUITEM +MENUITEMINFO +MENUSELECT +Mersenne +messageext +metadata +metaproj +midl +mii +MIIM +milli +mimetype +mincore +mindbogglingly +mingw +minimizeall +minkernel +MINMAXINFO +mintty +minwin +minwindef +Mip +mkdir +MMBB +mmcc +MMCPL +mmsystem +MNC +MNOPQ +MNOPQR +MODALFRAME +modelproj +MODERNCORE +MONITORINFO +MONITORINFOEXW +MONITORINFOF +monospaced +monostate +MOUSEACTIVATE +MOUSEFIRST +MOUSEHWHEEL +MOUSEMOVE +mousewheel +MOVESTART +msb +msbuild +mscorlib +msctf +msctls +msdata +msdn +msft +MSGCMDLINEF +MSGF +MSGFILTER +MSGFLG +MSGMARKMODE +MSGS +MSGSCROLLMODE +MSGSELECTMODE +msiexec +MSIL +msix +msrc +msvcrt +MSVS +msys +msysgit +mui +Mul +multiline +munged +munges +mutex +mutexes +muxes +myapplet +mydir +myignite +MYMAX +Mypair +Myval +NAMELENGTH +nameof +namespace +namespaced +namestream +nano +natvis +nbsp +Nc +NCCALCSIZE +NCCREATE +NCLBUTTONDOWN +NCLBUTTONUP +NCMBUTTONDOWN +NCMBUTTONUP +NCPAINT +NCRBUTTONDOWN +NCRBUTTONUP +NCXBUTTONDOWN +NCXBUTTONUP +NDEBUG +ned +NEL +NEQ +netcoreapp +netstandard +NEWCPLINFO +NEWCPLINFOA +NEWCPLINFOW +newcursor +Newdelete +NEWINQUIRE +NEWINQURE +NEWPROCESSWINDOW +NEWTEXTMETRIC +NEWTEXTMETRICEX +Newtonsoft +NEXTLINE +nfe +nlength +Nls +NLSMODE +NOACTIVATE +NOAPPLYNOW +NOCLIP +NOCOLOR +NOCOMM +NOCONTEXTHELP +NOCOPYBITS +nodiscard +NODUP +noexcept +NOHELP +noinline +NOINTEGRALHEIGHT +NOINTERFACE +NOLINKINFO +nologo +NOMCX +NOMINMAX +NOMOVE +NONALERT +nonbreaking +nonclient +NONCONST +NONINFRINGEMENT +NONPREROTATED +nonspace +NOOWNERZORDER +NOPAINT +NOPQRST +noprofile +NOREDRAW +NOREMOVE +NOREPOSITION +noreturn +NORMALDISPLAY +NOSCRATCH +NOSEARCH +noselect +NOSENDCHANGING +NOSIZE +NOSNAPSHOT +NOTHOUSANDS +nothrow +NOTICKS +NOTIMPL +notin +NOTNULL +NOTOPMOST +NOTRACK +NOTSUPPORTED +nouicompat +nounihan +NOUPDATE +NOWAIT +NOYIELD +NOZORDER +NPM +npos +nrcs +NSTATUS +ntapi +ntcon +ntcsrdll +ntdef +NTDEV +ntdll +ntifs +ntlpcapi +ntm +ntrtl +ntstatus +ntsubauth +NTSYSCALLAPI +nttree +nturtl +ntuser +NTVDM +ntverp +NTWIN +nuget +nullness +nullonfailure +nullopt +nullptr +NULs +numlock +numpad +NUMSCROLL +nupkg +NVDA +NVIDIA +NVR +Nx +oa +OACR +oauth +objbase +ocf +ocolor +odl +oem +oemcp +OEMFONT +OEMFORMAT +offboarded +OI +Oj +OLEAUT +OLECHAR +onecore +ONECOREBASE +ONECORESDKTOOLS +ONECORESHELL +onecoreuap +onecoreuapuuid +onecoreuuid +ONECOREWINDOWS +onehalf +ONLCR +Oo +openconsoleproxy +openbash +opencode +opencon +openconsole +OPENIF +OPENLINK +openps +opensource +openvt +openxmlformats +oq +ORIGINALFILENAME +osc +OSCBG +OSCCT +OSCFG +OSCRCC +OSCSCB +OSCSCC +OSCWT +OSDEPENDSROOT +osfhandle +OSG +OSGENG +osign +oss +ostream +ostringstream +Ou +ouicompat +outdir +outfile +Outof +OUTOFCONTEXT +OUTOFMEMORY +outout +Outptr +Ov +OVERLAPPEDWINDOW +OWNDC +OWNERDRAWFIXED +packageuwp +PACKCOORD +PACKVERSION +pagedown +pageup +PAINTPARAMS +PAINTSTRUCT +PALPC +pankaj +params +parentable +parms +passthrough +PATCOPY +pathcch +PATTERNID +pb +PBOOL +PBYTE +pcat +pcb +pcch +PCCHAR +PCCONSOLE +PCD +pch +PCHAR +PCIDLIST +PCIS +PCLIENT +PCLONG +PCOBJECT +pcon +PCONSOLE +PCONSOLEENDTASK +PCONSOLESETFOREGROUND +PCONSOLEWINDOWOWNER +pcoord +pcs +pcshell +PCSHORT +PCSR +PCSTR +PCUNICODE +PCWCH +PCWCHAR +PCWSTR +pda +pdb +pdbonly +pdbstr +pdf +pdp +pdtobj +pdw +PDWORD +pdx +peb +PEMAGIC +PENDTASKMSG +pfa +PFACENODE +pfed +pfi +PFILE +pfn +PFNCONSOLECREATEIOTHREAD +PFONT +PFONTENUMDATA +PFS +pgdn +pguid +pgup +PHANDLE +phhook +phwnd +pid +pidl +PIDLIST +pii +pinam +pinvoke +pipename +pipestr +pixelheight +PIXELSLIST +PJOBOBJECT +pkey +placeholders +platforming +playsound +plist +PLOGICAL +plugin +PMv +png +pnm +PNMLINK +pntm +PNTSTATUS +POBJECT +Podcast +POINTSLIST +POLYTEXTW +popd +POPF +poppack +popup +POPUPATTR +PORFLG +positionals +posix +POSTCHARBREAKS +POSX +POSXSCROLL +POSYSCROLL +ppci +ppf +ppguid +ppidl +pplx +PPORT +PPROC +PPROCESS +ppropvar +ppsi +ppsl +ppsp +ppsz +ppv +ppwch +PQRST +pragma +prc +prealigned +prebuilt +precendence +precomp +prect +prefast +prefilled +prefs +preinstalled +PRELOAD +PREMULTIPLIED +prepopulated +presorted +PREVENTPINNING +PREVIEWLABEL +PREVIEWWINDOW +PREVLINE +prg +pri +printf +prioritization +processenv +processhost +PROCESSINFOCLASS +procs +Progman +proj +PROPERTYID +PROPERTYKEY +PROPERTYVAL +propsheet +PROPSHEETHEADER +PROPSHEETPAGE +propslib +propsys +PROPTITLE +propvar +propvariant +propvarutil +psa +psd +PSECURITY +pseudocode +pseudoconsole +pseudoterminal +psh +pshn +PSHNOTIFY +PSHORT +pshpack +PSINGLE +psl +psldl +psm +PSMALL +PSNRET +PSobject +psp +PSPCB +psr +PSTR +psuedoconsole +psz +ptch +ptr +ptrdiff +ptsz +PTYIn +PUCHAR +PULONG +PUNICODE +pushd +putchar +putwchar +pv +PVOID +pw +pwch +PWCHAR +PWDDMCONSOLECONTEXT +PWORD +pwsh +pwstr +pwsz +px +py +pythonw +qi +QJ +qo +QOL +QRSTU +qsort +queryable +QUESTIONMARK +quickedit +QWER +qzmp +RAII +RALT +rasterbar +rasterfont +rasterization +rawinput +RAWPATH +raytracers +razzlerc +rbar +rbegin +RBUTTON +RBUTTONDBLCLK +RBUTTONDOWN +RBUTTONUP +rcch +RCDATA +rcelms +rcl +rclsid +RCOA +RCOCA +RCOCW +RCONTROL +RCOW +rcv +rdbuf +RDONLY +rdpartysource +readback +READCONSOLE +READCONSOLEOUTPUT +READCONSOLEOUTPUTSTRING +Readline +readme +READMODE +readonly +READWRITE +realloc +reamapping +rects +redef +Redir +redirector +redist +redistributable +REDSCROLL +refactor +refactoring +REFCLSID +refcount +referencesource +REFGUID +REFIID +REFPROPERTYKEY +regex +REGISTEROS +REGISTERVDM +regkey +REGSTR +reingest +Relayout +RELBINPATH +remoting +renamer +renderengine +rendersize +reparent +reparenting +replatformed +Replymessage +repositorypath +rescap +Resequence +reserialize +RESETCONTENT +resheader +resizable +resmimetype +restrictedcapabilities +resw +resx +retval +rfa +rfc +rftp +rgb +rgba +rgbi +rgch +rgci +rgfae +rgfte +rgi +rgn +rgp +rgpwsz +rgrc +rgs +rgui +rgw +rgwch +rhs +ri +RIGHTALIGN +RIGHTBUTTON +riid +RIPMSG +Rl +rmdir +RMENU +roadmap +robomac +roundtrip +rparen +RRF +RRRGGGBB +rsas +rtcore +RTEXT +rtf +RTFTo +Rtl +RTLREADING +RTTI +ru +ruleset +runas +runasradio +RUNDLL +runformat +runft +RUNFULLSCREEN +runsettings +runtests +runtimeclass +runuia +runut +rvalue +RVERTICAL +rxvt +RWIN +safearray +SAFECAST +safemath +sba +SBCS +SBCSDBCS +sbi +sbiex +sbold +scancode +scanline +schemename +SCL +scm +scprintf +SCRBUF +SCRBUFSIZE +screenbuffer +SCREENBUFFERINFO +screeninfo +screenshot +scriptload +Scrollable +scrollback +scrollbar +Scrolldown +Scrolldownpage +Scroller +SCROLLFORWARD +SCROLLINFO +scrolllock +scrolloffset +SCROLLSCALE +SCROLLSCREENBUFFER +Scrollup +Scrolluppage +scursor +sddl +sdeleted +sdk +SDKDDK +searchbox +securityappcontainer +segfault +SELCHANGE +SELECTALL +selectany +SELECTEDFONT +SELECTSTRING +Selfhosters +SERVERDLL +SETACTIVE +SETBUDDYINT +SETCOLOR +setcp +SETCURSEL +SETCURSOR +SETCURSORINFO +SETCURSORPOSITION +SETDISPLAYMODE +setfill +SETFOCUS +SETFONT +SETFOREGROUND +SETHARDWARESTATE +SETHOTKEY +SETICON +setintegritylevel +SETITEMDATA +SETITEMHEIGHT +SETKEYSHORTCUTS +setlocal +setlocale +SETMENUCLOSE +setmode +SETNUMBEROFCOMMANDS +SETOS +SETPALETTE +SETPOS +SETRANGE +SETSCREENBUFFERSIZE +SETSEL +SETTEXTATTRIBUTE +SETTINGCHANGE +SETTITLE +setw +Setwindow +SETWINDOWINFO +sfi +SFINAE +SFUI +sgr +SHANDLE +SHCo +shcore +shellapi +shellex +shellscalingapi +SHFILEINFO +SHGFI +SHGFP +SHIFTJIS +Shl +shlguid +shlobj +shlwapi +SHORTPATH +SHOWCURSOR +SHOWMAXIMIZED +SHOWMINNOACTIVE +SHOWNOACTIVATE +SHOWNORMAL +SHOWWINDOW +SHRT +sid +sidebyside +SIF +SIGDN +SINGLEFLAG +SINGLETHREADED +siup +SIZEBOX +sizeof +SIZESCROLL +SKIPFONT +SKIPOWNPROCESS +SKIPOWNTHREAD +sku +sldl +SLGP +SLIST +slmult +sln +slpit +smalllogo +SManifest +SMARTQUOTE +SMTO +SND +SOLIDBOX +Solutiondir +somefile +SOURCEBRANCH +sourced +SOURCESDIRECTORY +SPACEBAR +spammy +spand +splashscreen +sprintf +sqlproj +srand +src +SRCCODEPAGE +SRCCOPY +SRCINVERT +srcsrv +SRCSRVTRG +srctool +sre +srect +srv +srvinit +srvpipe +ssh +sstream +stackoverflow +standalone +STARTF +STARTUPINFO +STARTUPINFOEX +STARTUPINFOEXW +STARTUPINFOW +STARTWPARMS +STARTWPARMSA +STARTWPARMSW +Statusline +stdafx +STDAPI +stdcall +stdcpp +stderr +stdexcept +stdin +stdio +STDMETHODCALLTYPE +STDMETHODIMP +stdout +stgm +stl +stoi +stol +storelogo +stoul +stoutapot +strikethrough +stringstream +STRINGTABLE +strlen +strrev +strsafe +strtok +structs +STUVWX +STX +stylecop +SUA +subcompartment +subkey +SUBLANG +sublicensable +submenu +subresource +subspan +substr +subsystemconsole +subsystemwindows +suiteless +svg +swapchain +swapchainpanel +swappable +SWMR +SWP +swprintf +sx +sy +SYMED +SYNCPAINT +syscalls +SYSCHAR +SYSCOMMAND +SYSDEADCHAR +Sysinternals +SYSKEYDOWN +SYSKEYUP +SYSLINK +SYSMENU +sysparams +sysparamsext +SYSTEMHAND +SYSTEMMENU +sz +tabview +TAdd +taef +TARG +targetentrypoint +TARGETLIBS +TARGETNAME +targetnametoken +targetsize +targetver +taskbar +tbar +TBase +tbc +tbi +Tbl +TBM +tchar +TCHFORMAT +TCI +tcome +tcommandline +tcommands +TDelegated +TDP +TEAMPROJECT +tearoff +Teb +techcommunity +technet +tellp +telnet +telnetd +templated +teraflop +terminalcore +TERMINALSCROLLING +terminfo +TEs +testapp +testbuildplatform +testcon +testd +testdlls +testenv +testlab +testlist +testmd +testmddefinition +testmode +testname +testnameprefix +TESTNULL +testpass +testpasses +testtestabc +testtesttesttesttest +testtimeout +TEXCOORD +texel +TExpected +textattribute +TEXTATTRIBUTEID +textbox +textboxes +textbuffer +TEXTINCLUDE +textinfo +TEXTMETRIC +TEXTMETRICW +textmode +tf +TFCAT +tfoo +TFunction +tga +threadpool +THUMBPOSITION +THUMBTRACK +TIcon +tif +tilunittests +Timeline +titlebar +TITLEISLINKNAME +TJson +tl +TLEN +Tlg +Tlgdata +TMAE +TMPF +TMult +tmultiple +tmux +todo +tofrom +tokenhelpers +tokenized +tokenizing +toolbars +TOOLINFO +Toolset +tooltip +TOPDOWNDIB +TOPLEFT +toplevel +TOPRIGHT +TOpt +tosign +touchpad +towlower +towupper +Tpp +Tpqrst +tprivapi +tracelog +tracelogging +traceloggingprovider +trackbar +TRACKCOMPOSITION +trackpad +transcoder +transitioning +Trd +TREX +triaged +triaging +TRIANGLESTRIP +TRIMZEROHEADINGS +truetype +trx +tsattrs +tsf +TStr +TSTRFORMAT +TSub +tt +TTBITMAP +ttf +TTFONT +TTFONTLIST +tthe +tthis +TTM +TTo +TVPP +Txtev +typechecked +typechecking +typedef +typeid +typeinfo +typelib +typename +typeof +typeparam +TYUI +UAC +uap +uapadmin +UAX +ubuntu +ucd +UCD +ucdxml +uch +UCHAR +ucs +udk +UDM +uer +uget +uia +UIACCESS +uiacore +uiautomationcore +Uid +uielem +UIELEMENTENABLEDONLY +uint +uintptr +ul +ulcch +ulong +Unadvise +unattend +uncomment +UNCPRIORITY +undef +Unescape +unexpand +Unfocus +unhighlighting +unhosted +unicode +UNICODESTRING +UNICODETEXT +UNICRT +UNINIT +uninitialize +uninstall +Uniscribe +unittest +unittesting +universaltest +Unk +unknwn +unmark +UNORM +unparseable +unpause +Unregister +Unregistering +unte +untests +untextured +untimes +UPDATEDISPLAY +UPDOWN +UPKEY +UPSS +upvote +uri +url +urlencoded +Urxvt +USASCII +usebackq +USECALLBACK +USECOLOR +USECOUNTCHARS +USEDEFAULT +USEDX +USEFILLATTRIBUTE +USEGLYPHCHARS +USEHICON +USEPOSITION +userbase +USERDATA +userdpiapi +username +Userp +userprivapi +userprofile +USERSRV +USESHOWWINDOW +USESIZE +USESTDHANDLES +ushort +USRDLL +utf +utils +utr +uuid +uuidof +uuidv +UVWX +UVWXY +UWA +uwp +uxtheme +vals +Vanara +vararg +vbproj +vclib +Vcount +vcpkg +vcprintf +vcproj +vcrt +vcvarsall +vcxitems +vcxproj +vec +VERCTRL +versioning +VERTBAR +vf +VFT +vga +vgaoem +viewkind +viewports +Virt +VIRTTERM +Virtualizing +vk +vkey +VKKEYSCAN +VMs +VPA +VPATH +VPR +VPrintf +VProc +VRaw +VREDRAW +vsc +vscprintf +VSCROLL +vsinfo +vsnprintf +vso +vspath +vsprintf +VSTAMP +vstest +VSTS +VSTT +vstudio +vswhere +vtapp +VTE +VTID +vtio +vtmode +vtpipeterm +vtpt +vtrenderer +VTRGB +VTRGBTo +vtseq +vtterm +vttest +VWX +waaay +waitable +waivable +WANSUNG +WANTARROWS +WANTTAB +wapproj +wav +wbuilder +wch +wchar +WCIA +WCIW +WClass +wcout +wcschr +wcscmp +wcscpy +WCSHELPER +wcsicmp +wcslen +wcsnicmp +wcsrchr +wcsrev +wcstod +wcstoul +wddm +wddmcon +wddmconrenderer +WDDMCONSOLECONTEXT +wdm +webpage +website +websocket +wekyb +WEOF +wex +wextest +wextestclass +wfdopen +WFill +wfopen +wfstream +WHelper +whitelisting +WIDTHSCROLL +Widthx +wiki +wikia +wikipedia +wil +WImpl +WINAPI +winbase +winbasep +wincon +winconp +winconpty +winconptydll +winconptylib +wincontypes +WINCORE +windbg +WINDEF +WINDIR +windll +WINDOWALPHA +Windowbuffer +windowdpiapi +WINDOWEDGE +windowext +WINDOWFRAME +windowime +WINDOWINFO +windowio +windowmetrics +WINDOWPLACEMENT +windowpos +WINDOWPOSCHANGED +WINDOWPOSCHANGING +windowproc +windowrect +windowsapp +windowsinternalstring +WINDOWSIZE +windowsx +WINDOWTEXT +windowtheme +WINDOWTITLE +winevent +winfx +wingdi +winget +WINIDE +winioctl +winmd +winmeta +winmgr +winmm +winnt +Winperf +WInplace +winres +winrt +wintelnet +winternl +winuser +winuserp +WINVER +wistd +wixproj +wline +wlinestream +wmain +WMSZ +wnd +WNDALLOC +WNDCLASS +WNDCLASSEX +WNDCLASSW +Wndproc +WNegative +WNull +wnwb +workarea +workaround +workflow +workitem +wostream +WOutside +WOWARM +WOWx +wparam +WPartial +wpf +WPR +WPrep +WPresent +wprintf +wprp +wprpi +wregex +WResult +writeback +writechar +WRITECONSOLE +WRITECONSOLEINPUT +WRITECONSOLEOUTPUT +WRITECONSOLEOUTPUTSTRING +wrl +wrp +WRunoff +WScript +wsl +WSLENV +wsmatch +WSpace +wss +wstr +wstring +wstringstream +wsz +wtd +WTest +WTEXT +WTo +wtof +wtoi +WTs +wtw +wtypes +Wubi +WUX +WVerify +wwaproj +WWith +wx +wxh +xa +xact +xamarin +xaml +Xamlmeta +xargs +xaz +xbf +xbutton +XBUTTONDBLCLK +XBUTTONDOWN +XBUTTONUP +XCast +XCENTER +XColors +xcopy +XCount +xdy +XEncoding +xes +Xes +XES +xff +XFile +XManifest +XMath +XMFLOAT +xml +xmlns +xor +xorg +XOrg +Xpath +XPosition +XResource +xsd +xsi +xsize +XSubstantial +xtended +xterm +XTest +XTPUSHSGR +XTPOPSGR +xunit +xutr +xvalue +XVIRTUALSCREEN +XWalk +xy +Xzn +yact +YAML +YCast +YCENTER +YCount +YDPI +yml +YOffset +YPosition +YSize +YSubstantial +YVIRTUALSCREEN +Yw +YWalk +yx +YZ +Zc +ZCmd +ZCtrl +zd +zh +ZM +zsh +zu +zxcvbnm +zy diff --git a/src/terminal/adapter/adaptDispatch.hpp b/src/terminal/adapter/adaptDispatch.hpp index 667119c0efe..77f17f5b987 100644 --- a/src/terminal/adapter/adaptDispatch.hpp +++ b/src/terminal/adapter/adaptDispatch.hpp @@ -1,211 +1,211 @@ -/*++ -Copyright (c) Microsoft Corporation -Licensed under the MIT license. - -Module Name: -- adaptDispatch.hpp - -Abstract: -- This serves as the Windows Console API-specific implementation of the callbacks from our generic Virtual Terminal parser. - -Author(s): -- Michael Niksa (MiNiksa) 30-July-2015 ---*/ - -#pragma once - -#include "termDispatch.hpp" -#include "DispatchCommon.hpp" -#include "conGetSet.hpp" -#include "adaptDefaults.hpp" -#include "terminalOutput.hpp" -#include "..\..\types\inc\sgrStack.hpp" - -namespace Microsoft::Console::VirtualTerminal -{ - class AdaptDispatch : public ITermDispatch - { - public: - AdaptDispatch(std::unique_ptr pConApi, - std::unique_ptr pDefaults); - - void Execute(const wchar_t wchControl) override - { - _pDefaults->Execute(wchControl); - } - - void PrintString(const std::wstring_view string) override; - void Print(const wchar_t wchPrintable) override; - - bool CursorUp(const size_t distance) override; // CUU - bool CursorDown(const size_t distance) override; // CUD - bool CursorForward(const size_t distance) override; // CUF - bool CursorBackward(const size_t distance) override; // CUB, BS - bool CursorNextLine(const size_t distance) override; // CNL - bool CursorPrevLine(const size_t distance) override; // CPL - bool CursorHorizontalPositionAbsolute(const size_t column) override; // HPA, CHA - bool VerticalLinePositionAbsolute(const size_t line) override; // VPA - bool HorizontalPositionRelative(const size_t distance) override; // HPR - bool VerticalPositionRelative(const size_t distance) override; // VPR - bool CursorPosition(const size_t line, const size_t column) override; // CUP, HVP - bool CursorSaveState() override; // DECSC - bool CursorRestoreState() override; // DECRC - bool CursorVisibility(const bool isVisible) override; // DECTCEM - bool EraseInDisplay(const DispatchTypes::EraseType eraseType) override; // ED - bool EraseInLine(const DispatchTypes::EraseType eraseType) override; // EL - bool EraseCharacters(const size_t numChars) override; // ECH - bool InsertCharacter(const size_t count) override; // ICH - bool DeleteCharacter(const size_t count) override; // DCH - bool SetGraphicsRendition(const VTParameters options) override; // SGR - bool PushGraphicsRendition(const VTParameters options) override; // XTPUSHSGR - bool PopGraphicsRendition() override; // XTPOPSGR - bool DeviceStatusReport(const DispatchTypes::AnsiStatusType statusType) override; // DSR, DSR-OS, DSR-CPR - bool DeviceAttributes() override; // DA1 - bool SecondaryDeviceAttributes() override; // DA2 - bool TertiaryDeviceAttributes() override; // DA3 - bool Vt52DeviceAttributes() override; // VT52 Identify - bool RequestTerminalParameters(const DispatchTypes::ReportingPermission permission) override; // DECREQTPARM - bool ScrollUp(const size_t distance) override; // SU - bool ScrollDown(const size_t distance) override; // SD - bool InsertLine(const size_t distance) override; // IL - bool DeleteLine(const size_t distance) override; // DL - bool SetColumns(const size_t columns) override; // DECCOLM - bool SetMode(const DispatchTypes::ModeParams param) override; // DECSET - bool ResetMode(const DispatchTypes::ModeParams param) override; // DECRST - bool SetCursorKeysMode(const bool applicationMode) override; // DECCKM - bool SetKeypadMode(const bool applicationMode) override; // DECKPAM, DECKPNM - bool EnableWin32InputMode(const bool win32InputMode) override; // win32-input-mode - bool EnableCursorBlinking(const bool enable) override; // ATT610 - bool SetAnsiMode(const bool ansiMode) override; // DECANM - bool SetScreenMode(const bool reverseMode) override; // DECSCNM - bool SetOriginMode(const bool relativeMode) noexcept override; // DECOM - bool SetAutoWrapMode(const bool wrapAtEOL) override; // DECAWM - bool SetTopBottomScrollingMargins(const size_t topMargin, - const size_t bottomMargin) override; // DECSTBM - bool WarningBell() override; // BEL - bool CarriageReturn() override; // CR - bool LineFeed(const DispatchTypes::LineFeedType lineFeedType) override; // IND, NEL, LF, FF, VT - bool ReverseLineFeed() override; // RI - bool SetWindowTitle(const std::wstring_view title) override; // OSCWindowTitle - bool UseAlternateScreenBuffer() override; // ASBSET - bool UseMainScreenBuffer() override; // ASBRST - bool HorizontalTabSet() override; // HTS - bool ForwardTab(const size_t numTabs) override; // CHT, HT - bool BackwardsTab(const size_t numTabs) override; // CBT - bool TabClear(const DispatchTypes::TabClearType clearType) override; // TBC - bool DesignateCodingSystem(const VTID codingSystem) override; // DOCS - bool Designate94Charset(const size_t gsetNumber, const VTID charset) override; // SCS - bool Designate96Charset(const size_t gsetNumber, const VTID charset) override; // SCS - bool LockingShift(const size_t gsetNumber) override; // LS0, LS1, LS2, LS3 - bool LockingShiftRight(const size_t gsetNumber) override; // LS1R, LS2R, LS3R - bool SingleShift(const size_t gsetNumber) override; // SS2, SS3 - bool SoftReset() override; // DECSTR - bool HardReset() override; // RIS - bool ScreenAlignmentPattern() override; // DECALN - bool EnableDECCOLMSupport(const bool enabled) noexcept override; // ?40 - bool EnableVT200MouseMode(const bool enabled) override; // ?1000 - bool EnableUTF8ExtendedMouseMode(const bool enabled) override; // ?1005 - bool EnableSGRExtendedMouseMode(const bool enabled) override; // ?1006 - bool EnableButtonEventMouseMode(const bool enabled) override; // ?1002 - bool EnableAnyEventMouseMode(const bool enabled) override; // ?1003 - bool EnableAlternateScroll(const bool enabled) override; // ?1007 - bool EnableXtermBracketedPasteMode(const bool enabled) noexcept override; // ?2004 - bool SetCursorStyle(const DispatchTypes::CursorStyle cursorStyle) override; // DECSCUSR - bool SetCursorColor(const COLORREF cursorColor) override; - - bool SetClipboard(const std::wstring_view content) noexcept override; // OSCSetClipboard - - bool SetColorTableEntry(const size_t tableIndex, - const DWORD color) override; // OSCColorTable - bool SetDefaultForeground(const DWORD color) override; // OSCDefaultForeground - bool SetDefaultBackground(const DWORD color) override; // OSCDefaultBackground - - bool WindowManipulation(const DispatchTypes::WindowManipulationType function, - const VTParameter parameter1, - const VTParameter parameter2) override; // DTTERM_WindowManipulation - - bool AddHyperlink(const std::wstring_view uri, const std::wstring_view params) override; - bool EndHyperlink() override; - - bool DoConEmuAction(const std::wstring_view string) noexcept override; - - private: - enum class ScrollDirection - { - Up, - Down - }; - struct CursorState - { - unsigned int Row = 1; - unsigned int Column = 1; - bool IsOriginModeRelative = false; - TextAttribute Attributes = {}; - TerminalOutput TermOutput = {}; - unsigned int CodePage = 0; - }; - struct Offset - { - int Value; - bool IsAbsolute; - // VT origin is at 1,1 so we need to subtract 1 from absolute positions. - static constexpr Offset Absolute(const size_t value) { return { gsl::narrow_cast(value) - 1, true }; }; - static constexpr Offset Forward(const size_t value) { return { gsl::narrow_cast(value), false }; }; - static constexpr Offset Backward(const size_t value) { return { -gsl::narrow_cast(value), false }; }; - static constexpr Offset Unchanged() { return Forward(0); }; - }; - - bool _CursorMovePosition(const Offset rowOffset, const Offset colOffset, const bool clampInMargins) const; - bool _EraseSingleLineHelper(const CONSOLE_SCREEN_BUFFER_INFOEX& csbiex, - const DispatchTypes::EraseType eraseType, - const size_t lineId) const; - bool _EraseScrollback(); - bool _EraseAll(); - bool _InsertDeleteHelper(const size_t count, const bool isInsert) const; - bool _ScrollMovement(const ScrollDirection dir, const size_t distance) const; - - bool _DoSetTopBottomScrollingMargins(const size_t topMargin, - const size_t bottomMargin); - bool _OperatingStatus() const; - bool _CursorPositionReport() const; - - bool _WriteResponse(const std::wstring_view reply) const; - bool _ModeParamsHelper(const DispatchTypes::ModeParams param, const bool enable); - bool _DoDECCOLMHelper(const size_t columns); - - bool _ClearSingleTabStop(); - bool _ClearAllTabStops() noexcept; - void _ResetTabStops() noexcept; - void _InitTabStopsForWidth(const size_t width); - - bool _ShouldPassThroughInputModeChange() const; - - std::vector _tabStopColumns; - bool _initDefaultTabStops = true; - - std::unique_ptr _pConApi; - std::unique_ptr _pDefaults; - TerminalOutput _termOutput; - std::optional _initialCodePage; - - // We have two instances of the saved cursor state, because we need - // one for the main buffer (at index 0), and another for the alt buffer - // (at index 1). The _usingAltBuffer property keeps tracks of which - // buffer is active, so can be used as an index into this array to - // obtain the saved state that should be currently active. - std::array _savedCursorState; - bool _usingAltBuffer; - - SMALL_RECT _scrollMargins; - - bool _isOriginModeRelative; - - bool _isDECCOLMAllowed; - - SgrStack _sgrStack; - - size_t _SetRgbColorsHelper(const VTParameters options, - TextAttribute& attr, - const bool isForeground) noexcept; - }; -} +/*++ +Copyright (c) Microsoft Corporation +Licensed under the MIT license. + +Module Name: +- adaptDispatch.hpp + +Abstract: +- This serves as the Windows Console API-specific implementation of the callbacks from our generic Virtual Terminal parser. + +Author(s): +- Michael Niksa (MiNiksa) 30-July-2015 +--*/ + +#pragma once + +#include "termDispatch.hpp" +#include "DispatchCommon.hpp" +#include "conGetSet.hpp" +#include "adaptDefaults.hpp" +#include "terminalOutput.hpp" +#include "..\..\types\inc\sgrStack.hpp" + +namespace Microsoft::Console::VirtualTerminal +{ + class AdaptDispatch : public ITermDispatch + { + public: + AdaptDispatch(std::unique_ptr pConApi, + std::unique_ptr pDefaults); + + void Execute(const wchar_t wchControl) override + { + _pDefaults->Execute(wchControl); + } + + void PrintString(const std::wstring_view string) override; + void Print(const wchar_t wchPrintable) override; + + bool CursorUp(const size_t distance) override; // CUU + bool CursorDown(const size_t distance) override; // CUD + bool CursorForward(const size_t distance) override; // CUF + bool CursorBackward(const size_t distance) override; // CUB, BS + bool CursorNextLine(const size_t distance) override; // CNL + bool CursorPrevLine(const size_t distance) override; // CPL + bool CursorHorizontalPositionAbsolute(const size_t column) override; // HPA, CHA + bool VerticalLinePositionAbsolute(const size_t line) override; // VPA + bool HorizontalPositionRelative(const size_t distance) override; // HPR + bool VerticalPositionRelative(const size_t distance) override; // VPR + bool CursorPosition(const size_t line, const size_t column) override; // CUP, HVP + bool CursorSaveState() override; // DECSC + bool CursorRestoreState() override; // DECRC + bool CursorVisibility(const bool isVisible) override; // DECTCEM + bool EraseInDisplay(const DispatchTypes::EraseType eraseType) override; // ED + bool EraseInLine(const DispatchTypes::EraseType eraseType) override; // EL + bool EraseCharacters(const size_t numChars) override; // ECH + bool InsertCharacter(const size_t count) override; // ICH + bool DeleteCharacter(const size_t count) override; // DCH + bool SetGraphicsRendition(const VTParameters options) override; // SGR + bool PushGraphicsRendition(const VTParameters options) override; // XTPUSHSGR + bool PopGraphicsRendition() override; // XTPOPSGR + bool DeviceStatusReport(const DispatchTypes::AnsiStatusType statusType) override; // DSR, DSR-OS, DSR-CPR + bool DeviceAttributes() override; // DA1 + bool SecondaryDeviceAttributes() override; // DA2 + bool TertiaryDeviceAttributes() override; // DA3 + bool Vt52DeviceAttributes() override; // VT52 Identify + bool RequestTerminalParameters(const DispatchTypes::ReportingPermission permission) override; // DECREQTPARM + bool ScrollUp(const size_t distance) override; // SU + bool ScrollDown(const size_t distance) override; // SD + bool InsertLine(const size_t distance) override; // IL + bool DeleteLine(const size_t distance) override; // DL + bool SetColumns(const size_t columns) override; // DECCOLM + bool SetMode(const DispatchTypes::ModeParams param) override; // DECSET + bool ResetMode(const DispatchTypes::ModeParams param) override; // DECRST + bool SetCursorKeysMode(const bool applicationMode) override; // DECCKM + bool SetKeypadMode(const bool applicationMode) override; // DECKPAM, DECKPNM + bool EnableWin32InputMode(const bool win32InputMode) override; // win32-input-mode + bool EnableCursorBlinking(const bool enable) override; // ATT610 + bool SetAnsiMode(const bool ansiMode) override; // DECANM + bool SetScreenMode(const bool reverseMode) override; // DECSCNM + bool SetOriginMode(const bool relativeMode) noexcept override; // DECOM + bool SetAutoWrapMode(const bool wrapAtEOL) override; // DECAWM + bool SetTopBottomScrollingMargins(const size_t topMargin, + const size_t bottomMargin) override; // DECSTBM + bool WarningBell() override; // BEL + bool CarriageReturn() override; // CR + bool LineFeed(const DispatchTypes::LineFeedType lineFeedType) override; // IND, NEL, LF, FF, VT + bool ReverseLineFeed() override; // RI + bool SetWindowTitle(const std::wstring_view title) override; // OSCWindowTitle + bool UseAlternateScreenBuffer() override; // ASBSET + bool UseMainScreenBuffer() override; // ASBRST + bool HorizontalTabSet() override; // HTS + bool ForwardTab(const size_t numTabs) override; // CHT, HT + bool BackwardsTab(const size_t numTabs) override; // CBT + bool TabClear(const DispatchTypes::TabClearType clearType) override; // TBC + bool DesignateCodingSystem(const VTID codingSystem) override; // DOCS + bool Designate94Charset(const size_t gsetNumber, const VTID charset) override; // SCS + bool Designate96Charset(const size_t gsetNumber, const VTID charset) override; // SCS + bool LockingShift(const size_t gsetNumber) override; // LS0, LS1, LS2, LS3 + bool LockingShiftRight(const size_t gsetNumber) override; // LS1R, LS2R, LS3R + bool SingleShift(const size_t gsetNumber) override; // SS2, SS3 + bool SoftReset() override; // DECSTR + bool HardReset() override; // RIS + bool ScreenAlignmentPattern() override; // DECALN + bool EnableDECCOLMSupport(const bool enabled) noexcept override; // ?40 + bool EnableVT200MouseMode(const bool enabled) override; // ?1000 + bool EnableUTF8ExtendedMouseMode(const bool enabled) override; // ?1005 + bool EnableSGRExtendedMouseMode(const bool enabled) override; // ?1006 + bool EnableButtonEventMouseMode(const bool enabled) override; // ?1002 + bool EnableAnyEventMouseMode(const bool enabled) override; // ?1003 + bool EnableAlternateScroll(const bool enabled) override; // ?1007 + bool EnableXtermBracketedPasteMode(const bool enabled) noexcept override; // ?2004 + bool SetCursorStyle(const DispatchTypes::CursorStyle cursorStyle) override; // DECSCUSR + bool SetCursorColor(const COLORREF cursorColor) override; + + bool SetClipboard(const std::wstring_view content) noexcept override; // OSCSetClipboard + + bool SetColorTableEntry(const size_t tableIndex, + const DWORD color) override; // OSCColorTable + bool SetDefaultForeground(const DWORD color) override; // OSCDefaultForeground + bool SetDefaultBackground(const DWORD color) override; // OSCDefaultBackground + + bool WindowManipulation(const DispatchTypes::WindowManipulationType function, + const VTParameter parameter1, + const VTParameter parameter2) override; // DTTERM_WindowManipulation + + bool AddHyperlink(const std::wstring_view uri, const std::wstring_view params) override; + bool EndHyperlink() override; + + bool DoConEmuAction(const std::wstring_view string) noexcept override; + + private: + enum class ScrollDirection + { + Up, + Down + }; + struct CursorState + { + unsigned int Row = 1; + unsigned int Column = 1; + bool IsOriginModeRelative = false; + TextAttribute Attributes = {}; + TerminalOutput TermOutput = {}; + unsigned int CodePage = 0; + }; + struct Offset + { + int Value; + bool IsAbsolute; + // VT origin is at 1,1 so we need to subtract 1 from absolute positions. + static constexpr Offset Absolute(const size_t value) { return { gsl::narrow_cast(value) - 1, true }; }; + static constexpr Offset Forward(const size_t value) { return { gsl::narrow_cast(value), false }; }; + static constexpr Offset Backward(const size_t value) { return { -gsl::narrow_cast(value), false }; }; + static constexpr Offset Unchanged() { return Forward(0); }; + }; + + bool _CursorMovePosition(const Offset rowOffset, const Offset colOffset, const bool clampInMargins) const; + bool _EraseSingleLineHelper(const CONSOLE_SCREEN_BUFFER_INFOEX& csbiex, + const DispatchTypes::EraseType eraseType, + const size_t lineId) const; + bool _EraseScrollback(); + bool _EraseAll(); + bool _InsertDeleteHelper(const size_t count, const bool isInsert) const; + bool _ScrollMovement(const ScrollDirection dir, const size_t distance) const; + + bool _DoSetTopBottomScrollingMargins(const size_t topMargin, + const size_t bottomMargin); + bool _OperatingStatus() const; + bool _CursorPositionReport() const; + + bool _WriteResponse(const std::wstring_view reply) const; + bool _ModeParamsHelper(const DispatchTypes::ModeParams param, const bool enable); + bool _DoDECCOLMHelper(const size_t columns); + + bool _ClearSingleTabStop(); + bool _ClearAllTabStops() noexcept; + void _ResetTabStops() noexcept; + void _InitTabStopsForWidth(const size_t width); + + bool _ShouldPassThroughInputModeChange() const; + + std::vector _tabStopColumns; + bool _initDefaultTabStops = true; + + std::unique_ptr _pConApi; + std::unique_ptr _pDefaults; + TerminalOutput _termOutput; + std::optional _initialCodePage; + + // We have two instances of the saved cursor state, because we need + // one for the main buffer (at index 0), and another for the alt buffer + // (at index 1). The _usingAltBuffer property keeps tracks of which + // buffer is active, so can be used as an index into this array to + // obtain the saved state that should be currently active. + std::array _savedCursorState; + bool _usingAltBuffer; + + SMALL_RECT _scrollMargins; + + bool _isOriginModeRelative; + + bool _isDECCOLMAllowed; + + SgrStack _sgrStack; + + size_t _SetRgbColorsHelper(const VTParameters options, + TextAttribute& attr, + const bool isForeground) noexcept; + }; +} diff --git a/src/types/sgrStack.cpp b/src/types/sgrStack.cpp index 5313453cdd7..42abe8ed409 100644 --- a/src/types/sgrStack.cpp +++ b/src/types/sgrStack.cpp @@ -36,14 +36,7 @@ namespace Microsoft::Console::VirtualTerminal for (size_t i = 0; i < options.size(); i++) { - // TRICKY: The VTParameter could be a fake/materialized parameter, in - // which case it has a default value, and the default value of a - // VTParameter depends on what you are assigning to: if you assign / - // convert directly to a size_t, then the default is "1", but for other - // size_t-sized types, the default is "0". We want "default is 0", so we - // convert to a SgrSaveRestoreStackOptions first. - const SgrSaveRestoreStackOptions option = options.at(i); - const size_t optionAsIndex = static_cast(option); + const size_t optionAsIndex = options.at(i).value_or(0); // Options must be specified singly; not in combination. Values that are // out of range will be ignored. @@ -54,11 +47,13 @@ namespace Microsoft::Console::VirtualTerminal } } } - catch (std::out_of_range&) + catch (...) { - // We should not be able to reach here: we pre-check that everything should be - // in range. - RaiseFailFastException(nullptr, nullptr, 0); + // The static analyzer knows that the bitset operations can throw + // std::out_of_range. However, we know that won't happen, because we pre-check + // that everything should be in range. So we plan to never execute this + // failfast: + FAIL_FAST_CAUGHT_EXCEPTION(); } if (_numSavedAttrs < gsl::narrow(_storedSgrAttributes.size())) @@ -100,11 +95,13 @@ namespace Microsoft::Console::VirtualTerminal restoreMe.ValidParts); } } - catch (std::out_of_range&) + catch (...) { - // We should not be able to reach here: we pre-check that everything - // should be in range. - RaiseFailFastException(nullptr, nullptr, 0); + // The static analyzer knows that the bitset operations can throw + // std::out_of_range. However, we know that won't happen, because we + // pre-check that everything should be in range. So we plan to never + // execute this failfast: + FAIL_FAST_CAUGHT_EXCEPTION(); } } @@ -142,96 +139,71 @@ namespace Microsoft::Console::VirtualTerminal // Ps = 3 1 -> Background color. // // (some closing braces for people with editors that get thrown off without them: }}) - // - // Note that not all of these attributes are actually supported by - // renderers/conhost, despite setters/getters on TextAttribute. - try + // Boldness = 1, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Boldness))) { - // Boldness = 1, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Boldness))) - { - result.SetBold(savedAttribute.IsBold()); - } - - // Faintness = 2, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Faintness))) - { - result.SetFaint(savedAttribute.IsFaint()); - } + result.SetBold(savedAttribute.IsBold()); + } - // Italics = 3, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Italics))) - { - result.SetItalic(savedAttribute.IsItalic()); - } + // Faintness = 2, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Faintness))) + { + result.SetFaint(savedAttribute.IsFaint()); + } - // Underline = 4, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Underline))) - { - result.SetUnderlined(savedAttribute.IsUnderlined()); - } + // Italics = 3, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Italics))) + { + result.SetItalic(savedAttribute.IsItalic()); + } - // Blink = 5, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Blink))) - { - result.SetBlinking(savedAttribute.IsBlinking()); - } + // Underline = 4, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Underline))) + { + result.SetUnderlined(savedAttribute.IsUnderlined()); + } - // Negative = 7, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Negative))) - { - if (savedAttribute.IsReverseVideo()) - { - if (!result.IsReverseVideo()) - { - result.Invert(); - } - } - else - { - if (result.IsReverseVideo()) - { - result.Invert(); - } - } - } + // Blink = 5, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Blink))) + { + result.SetBlinking(savedAttribute.IsBlinking()); + } - // Invisible = 8, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Invisible))) - { - result.SetInvisible(savedAttribute.IsInvisible()); - } + // Negative = 7, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Negative))) + { + result.SetReverseVideo(savedAttribute.IsReverseVideo()); + } - // CrossedOut = 9, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::CrossedOut))) - { - result.SetCrossedOut(savedAttribute.IsCrossedOut()); - } + // Invisible = 8, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::Invisible))) + { + result.SetInvisible(savedAttribute.IsInvisible()); + } - // DoublyUnderlined = 21, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::DoublyUnderlined))) - { - result.SetDoublyUnderlined(savedAttribute.IsDoublyUnderlined()); - } + // CrossedOut = 9, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::CrossedOut))) + { + result.SetCrossedOut(savedAttribute.IsCrossedOut()); + } - // SaveForegroundColor = 30, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::SaveForegroundColor))) - { - result.SetForeground(savedAttribute.GetForeground()); - } + // DoublyUnderlined = 21, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::DoublyUnderlined))) + { + result.SetDoublyUnderlined(savedAttribute.IsDoublyUnderlined()); + } - // SaveBackgroundColor = 31, - if (validParts.test(static_cast(SgrSaveRestoreStackOptions::SaveBackgroundColor))) - { - result.SetBackground(savedAttribute.GetBackground()); - } + // SaveForegroundColor = 30, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::SaveForegroundColor))) + { + result.SetForeground(savedAttribute.GetForeground()); } - catch (std::out_of_range&) + + // SaveBackgroundColor = 31, + if (validParts.test(static_cast(SgrSaveRestoreStackOptions::SaveBackgroundColor))) { - // We should not be able to reach here: all values passed to bitset::test are - // constants, clearly in range of the bitset. - RaiseFailFastException(nullptr, nullptr, 0); + result.SetBackground(savedAttribute.GetBackground()); } return result; diff --git a/src/types/sources.inc b/src/types/sources.inc index 90cf7f591ce..601ecf3a194 100644 --- a/src/types/sources.inc +++ b/src/types/sources.inc @@ -44,6 +44,7 @@ SOURCES= \ ..\utils.cpp \ ..\ThemeUtils.cpp \ ..\ScreenInfoUiaProviderBase.cpp \ + ..\sgrStack.cpp \ ..\UiaTextRangeBase.cpp \ ..\UiaTracing.cpp \ ..\TermControlUiaProvider.cpp \