mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-15 18:51:00 +00:00
Compare commits
6 Commits
dev/lhecke
...
dev/miniks
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7649fc8a06 | ||
|
|
343ff0913d | ||
|
|
39d67e3859 | ||
|
|
78c1bc10f7 | ||
|
|
b46b5d0f6f | ||
|
|
7e8f0398c3 |
479826
.github/actions/spell-check/dictionary/dictionary.txt
vendored
479826
.github/actions/spell-check/dictionary/dictionary.txt
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
|||||||
powf
|
|
||||||
sqrtf
|
|
||||||
isnan
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
mfcribbon
|
|
||||||
microsoft
|
|
||||||
microsoftonline
|
|
||||||
osgvsowi
|
|
||||||
powershell
|
|
||||||
tdbuildteamid
|
|
||||||
visualstudio
|
|
||||||
61
.github/actions/spell-check/excludes.txt
vendored
61
.github/actions/spell-check/excludes.txt
vendored
@@ -1,61 +0,0 @@
|
|||||||
(?:^|/)dirs$
|
|
||||||
(?:^|/)go\.mod$
|
|
||||||
(?:^|/)go\.sum$
|
|
||||||
(?:^|/)package-lock\.json$
|
|
||||||
(?:^|/)sources(?:|\.dep)$
|
|
||||||
SUMS$
|
|
||||||
\.ai$
|
|
||||||
\.bmp$
|
|
||||||
\.cer$
|
|
||||||
\.class$
|
|
||||||
\.crl$
|
|
||||||
\.crt$
|
|
||||||
\.csr$
|
|
||||||
\.dll$
|
|
||||||
\.DS_Store$
|
|
||||||
\.eot$
|
|
||||||
\.eps$
|
|
||||||
\.exe$
|
|
||||||
\.gif$
|
|
||||||
\.graffle$
|
|
||||||
\.gz$
|
|
||||||
\.icns$
|
|
||||||
\.ico$
|
|
||||||
\.jar$
|
|
||||||
\.jpeg$
|
|
||||||
\.jpg$
|
|
||||||
\.key$
|
|
||||||
\.lib$
|
|
||||||
\.lock$
|
|
||||||
\.map$
|
|
||||||
\.min\..
|
|
||||||
\.mp3$
|
|
||||||
\.mp4$
|
|
||||||
\.otf$
|
|
||||||
\.pbxproj$
|
|
||||||
\.pdf$
|
|
||||||
\.pem$
|
|
||||||
\.png$
|
|
||||||
\.psd$
|
|
||||||
\.runsettings$
|
|
||||||
\.sig$
|
|
||||||
\.so$
|
|
||||||
\.svg$
|
|
||||||
\.svgz$
|
|
||||||
\.tar$
|
|
||||||
\.tgz$
|
|
||||||
\.ttf$
|
|
||||||
\.woff
|
|
||||||
\.xcf$
|
|
||||||
\.xls
|
|
||||||
\.xpm$
|
|
||||||
\.yml$
|
|
||||||
\.zip$
|
|
||||||
^dep/
|
|
||||||
^doc/reference/UTF8-torture-test\.txt$
|
|
||||||
^src/interactivity/onecore/BgfxEngine\.
|
|
||||||
^src/renderer/wddmcon/WddmConRenderer\.
|
|
||||||
^src/terminal/parser/ft_fuzzer/VTCommandFuzzer\.cpp$
|
|
||||||
^src/tools/U8U16Test/(?:fr|ru|zh)\.txt$
|
|
||||||
^\.github/actions/spell-check/
|
|
||||||
^\.gitignore$
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
https://(?:(?:www\.|)youtube\.com|youtu.be)/[-a-zA-Z0-9?&=]*
|
|
||||||
(?:0[Xx]|U\+|#)[a-f0-9A-FGgRr]{2,}[Uu]?[Ll]?\b
|
|
||||||
\{[0-9A-FA-F]{8}-(?:[0-9A-FA-F]{4}-){3}[0-9A-FA-F]{12}\}
|
|
||||||
\d+x\d+Logo
|
|
||||||
Scro\&ll
|
|
||||||
# selectionInput.cpp
|
|
||||||
:\\windows\\syste\b
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
The contents of each `.txt` file in this directory are merged together.
|
|
||||||
|
|
||||||
* [alphabet](alphabet.txt) is a sample for alphabet related items
|
|
||||||
* [web](web.txt) is a sample for web/html related items
|
|
||||||
* [whitelist](whitelist.txt) is the main whitelist -- there is nothing
|
|
||||||
particularly special about the file name (beyond the extension which is
|
|
||||||
important).
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
http
|
|
||||||
td
|
|
||||||
www
|
|
||||||
15
.github/actions/spelling/README.md
vendored
Normal file
15
.github/actions/spelling/README.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# check-spelling/check-spelling configuration
|
||||||
|
|
||||||
|
File | Purpose | Format | Info
|
||||||
|
-|-|-|-
|
||||||
|
[allow/*.txt](allow/) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow)
|
||||||
|
[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject)
|
||||||
|
[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes)
|
||||||
|
[patterns/*.txt](patterns/) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
|
||||||
|
[candidate.patterns](candidate.patterns) | Patterns that might be worth adding to [patterns.txt](patterns.txt) | perl regular expression with optional comment block introductions (all matches will be suggested) | [candidates](https://github.com/check-spelling/check-spelling/wiki/Feature:-Suggest-patterns)
|
||||||
|
[line_forbidden.patterns](line_forbidden.patterns) | Patterns to flag in checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
|
||||||
|
[expect/*.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect)
|
||||||
|
[advice.md](advice.md) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice)
|
||||||
|
|
||||||
|
Note: you can replace any of these files with a directory by the same name (minus the suffix)
|
||||||
|
and then include multiple files inside that directory (with that suffix) to merge multiple files together.
|
||||||
48
.github/actions/spelling/advice.md
vendored
Normal file
48
.github/actions/spelling/advice.md
vendored
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
|
||||||
|
<details>
|
||||||
|
<summary>
|
||||||
|
:pencil2: Contributor please read this
|
||||||
|
</summary>
|
||||||
|
|
||||||
|
By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
|
||||||
|
|
||||||
|
:warning: The command is written for posix shells. If it doesn't work for you, you can manually _add_ (one word per line) / _remove_ items to `expect.txt` and the `excludes.txt` files.
|
||||||
|
|
||||||
|
If the listed items are:
|
||||||
|
|
||||||
|
* ... **misspelled**, then please *correct* them instead of using the command.
|
||||||
|
* ... *names*, please add them to `.github/actions/spelling/allow/names.txt`.
|
||||||
|
* ... APIs, you can add them to a file in `.github/actions/spelling/allow/`.
|
||||||
|
* ... just things you're using, please add them to an appropriate file in `.github/actions/spelling/expect/`.
|
||||||
|
* ... tokens you only need in one place and shouldn't *generally be used*, you can add an item in an appropriate file in `.github/actions/spelling/patterns/`.
|
||||||
|
|
||||||
|
See the `README.md` in each directory for more information.
|
||||||
|
|
||||||
|
:microscope: You can test your commits **without** *appending* to a PR by creating a new branch with that extra change and pushing it to your fork. The [check-spelling](https://github.com/marketplace/actions/check-spelling) action will run in response to your **push** -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. :wink:
|
||||||
|
|
||||||
|
|
||||||
|
<details><summary>If the flagged items are :exploding_head: false positives</summary>
|
||||||
|
|
||||||
|
If items relate to a ...
|
||||||
|
* binary file (or some other file you wouldn't want to check at all).
|
||||||
|
|
||||||
|
Please add a file path to the `excludes.txt` file matching the containing file.
|
||||||
|
|
||||||
|
File paths are Perl 5 Regular Expressions - you can [test](
|
||||||
|
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
|
||||||
|
|
||||||
|
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
|
||||||
|
../tree/HEAD/README.md) (on whichever branch you're using).
|
||||||
|
|
||||||
|
* well-formed pattern.
|
||||||
|
|
||||||
|
If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
|
||||||
|
try adding it to the `patterns.txt` file.
|
||||||
|
|
||||||
|
Patterns are Perl 5 Regular Expressions - you can [test](
|
||||||
|
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.
|
||||||
|
|
||||||
|
Note that patterns can't match multiline strings.
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</details>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Dictionaries are lists of words to accept unconditionally
|
# Allow files are lists of words to accept unconditionally
|
||||||
|
|
||||||
While check spelling will complain about a whitelisted word
|
While check spelling will complain about an expected word
|
||||||
which is no longer present, you can include things here even if
|
which is no longer present, you can include things here even if
|
||||||
they are not otherwise present in the repository.
|
they are not otherwise present in the repository.
|
||||||
|
|
||||||
@@ -8,13 +8,14 @@ E.g., you could include a list of system APIs here, or potential
|
|||||||
contributors (so that if a future commit includes their name,
|
contributors (so that if a future commit includes their name,
|
||||||
it'll be accepted).
|
it'll be accepted).
|
||||||
|
|
||||||
### Files
|
## Files
|
||||||
|
|
||||||
| File | Description |
|
| File | Description |
|
||||||
| ---- | ----------- |
|
| ---- | ----------- |
|
||||||
| [Dictionary](dictionary.txt) | Primary US English dictionary |
|
| [Allow](allow.txt) | Supplements to the dictionary |
|
||||||
| [Chinese](chinese.txt) | Chinese words |
|
| [Chinese](chinese.txt) | Chinese words |
|
||||||
| [Japanese](japanese.txt) | Japanese words |
|
| [Japanese](japanese.txt) | Japanese words |
|
||||||
| [Microsoft](microsoft.txt) | Microsoft brand items |
|
| [Microsoft](microsoft.txt) | Microsoft brand items |
|
||||||
| [Fonts](fonts.txt) | Font names |
|
| [Fonts](fonts.txt) | Font names |
|
||||||
| [Names](names.txt) | Names of people |
|
| [Names](names.txt) | Names of people |
|
||||||
|
| [Colors](colors.txt) | Names of color |
|
||||||
108
.github/actions/spelling/allow/allow.txt
vendored
Normal file
108
.github/actions/spelling/allow/allow.txt
vendored
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
admins
|
||||||
|
allcolors
|
||||||
|
Apc
|
||||||
|
apc
|
||||||
|
breadcrumb
|
||||||
|
breadcrumbs
|
||||||
|
bsd
|
||||||
|
calt
|
||||||
|
ccmp
|
||||||
|
changelog
|
||||||
|
clickable
|
||||||
|
clig
|
||||||
|
CMMI
|
||||||
|
copyable
|
||||||
|
cybersecurity
|
||||||
|
dalet
|
||||||
|
Dcs
|
||||||
|
dcs
|
||||||
|
dialytika
|
||||||
|
dje
|
||||||
|
downside
|
||||||
|
downsides
|
||||||
|
dze
|
||||||
|
dzhe
|
||||||
|
EDDB
|
||||||
|
EDDC
|
||||||
|
Enum'd
|
||||||
|
Fitt
|
||||||
|
formattings
|
||||||
|
FTCS
|
||||||
|
ftp
|
||||||
|
fvar
|
||||||
|
gantt
|
||||||
|
gcc
|
||||||
|
geeksforgeeks
|
||||||
|
ghe
|
||||||
|
github
|
||||||
|
gje
|
||||||
|
godbolt
|
||||||
|
hostname
|
||||||
|
hostnames
|
||||||
|
https
|
||||||
|
hyperlink
|
||||||
|
hyperlinking
|
||||||
|
hyperlinks
|
||||||
|
iconify
|
||||||
|
img
|
||||||
|
inlined
|
||||||
|
It'd
|
||||||
|
kje
|
||||||
|
libfuzzer
|
||||||
|
libuv
|
||||||
|
liga
|
||||||
|
lje
|
||||||
|
Llast
|
||||||
|
llvm
|
||||||
|
Lmid
|
||||||
|
locl
|
||||||
|
lol
|
||||||
|
lorem
|
||||||
|
Lorigin
|
||||||
|
maxed
|
||||||
|
minimalistic
|
||||||
|
mkmk
|
||||||
|
mnt
|
||||||
|
mru
|
||||||
|
nje
|
||||||
|
noreply
|
||||||
|
ogonek
|
||||||
|
ok'd
|
||||||
|
overlined
|
||||||
|
pipeline
|
||||||
|
postmodern
|
||||||
|
ptys
|
||||||
|
qof
|
||||||
|
qps
|
||||||
|
rclt
|
||||||
|
reimplementation
|
||||||
|
reserialization
|
||||||
|
reserialize
|
||||||
|
reserializes
|
||||||
|
rlig
|
||||||
|
runtimes
|
||||||
|
shcha
|
||||||
|
slnt
|
||||||
|
Sos
|
||||||
|
ssh
|
||||||
|
timeline
|
||||||
|
timelines
|
||||||
|
timestamped
|
||||||
|
TLDR
|
||||||
|
tokenizes
|
||||||
|
tonos
|
||||||
|
toolset
|
||||||
|
tshe
|
||||||
|
ubuntu
|
||||||
|
uiatextrange
|
||||||
|
UIs
|
||||||
|
und
|
||||||
|
unregister
|
||||||
|
versioned
|
||||||
|
vsdevcmd
|
||||||
|
We'd
|
||||||
|
wildcards
|
||||||
|
XBox
|
||||||
|
YBox
|
||||||
|
yeru
|
||||||
|
zhe
|
||||||
248
.github/actions/spelling/allow/apis.txt
vendored
Normal file
248
.github/actions/spelling/allow/apis.txt
vendored
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
ACCEPTFILES
|
||||||
|
ACCESSDENIED
|
||||||
|
acl
|
||||||
|
aclapi
|
||||||
|
alignas
|
||||||
|
alignof
|
||||||
|
APPLYTOSUBMENUS
|
||||||
|
appxrecipe
|
||||||
|
bitfield
|
||||||
|
bitfields
|
||||||
|
BUILDBRANCH
|
||||||
|
BUILDMSG
|
||||||
|
BUILDNUMBER
|
||||||
|
BYCOMMAND
|
||||||
|
BYPOSITION
|
||||||
|
charconv
|
||||||
|
CLASSNOTAVAILABLE
|
||||||
|
CLOSEAPP
|
||||||
|
cmdletbinding
|
||||||
|
COLORPROPERTY
|
||||||
|
colspan
|
||||||
|
COMDLG
|
||||||
|
commandlinetoargv
|
||||||
|
comparand
|
||||||
|
cstdint
|
||||||
|
CXICON
|
||||||
|
CYICON
|
||||||
|
Dacl
|
||||||
|
dataobject
|
||||||
|
dcomp
|
||||||
|
DERR
|
||||||
|
dlldata
|
||||||
|
DNE
|
||||||
|
DONTADDTORECENT
|
||||||
|
DWMSBT
|
||||||
|
DWMWA
|
||||||
|
DWMWA
|
||||||
|
DWORDLONG
|
||||||
|
endfor
|
||||||
|
ENDSESSION
|
||||||
|
enumset
|
||||||
|
environstrings
|
||||||
|
EXPCMDFLAGS
|
||||||
|
EXPCMDSTATE
|
||||||
|
filetime
|
||||||
|
FILTERSPEC
|
||||||
|
FORCEFILESYSTEM
|
||||||
|
FORCEMINIMIZE
|
||||||
|
frac
|
||||||
|
fullkbd
|
||||||
|
futex
|
||||||
|
GETDESKWALLPAPER
|
||||||
|
GETHIGHCONTRAST
|
||||||
|
GETMOUSEHOVERTIME
|
||||||
|
Hashtable
|
||||||
|
HIGHCONTRASTON
|
||||||
|
HIGHCONTRASTW
|
||||||
|
hotkeys
|
||||||
|
href
|
||||||
|
hrgn
|
||||||
|
HTCLOSE
|
||||||
|
hwinsta
|
||||||
|
HWINSTA
|
||||||
|
IActivation
|
||||||
|
IApp
|
||||||
|
IAppearance
|
||||||
|
IAsync
|
||||||
|
IBind
|
||||||
|
IBox
|
||||||
|
IClass
|
||||||
|
IComparable
|
||||||
|
IComparer
|
||||||
|
IConnection
|
||||||
|
ICustom
|
||||||
|
IDialog
|
||||||
|
IDirect
|
||||||
|
IExplorer
|
||||||
|
IFACEMETHOD
|
||||||
|
IFile
|
||||||
|
IGraphics
|
||||||
|
IInheritable
|
||||||
|
IMap
|
||||||
|
IMonarch
|
||||||
|
IObject
|
||||||
|
iosfwd
|
||||||
|
IPackage
|
||||||
|
IPeasant
|
||||||
|
ISetup
|
||||||
|
isspace
|
||||||
|
IStorage
|
||||||
|
istream
|
||||||
|
IStringable
|
||||||
|
ITab
|
||||||
|
ITaskbar
|
||||||
|
itow
|
||||||
|
IUri
|
||||||
|
IVirtual
|
||||||
|
KEYSELECT
|
||||||
|
LCID
|
||||||
|
llabs
|
||||||
|
llu
|
||||||
|
localtime
|
||||||
|
lround
|
||||||
|
Lsa
|
||||||
|
lsass
|
||||||
|
LSHIFT
|
||||||
|
LTGRAY
|
||||||
|
MAINWINDOW
|
||||||
|
memchr
|
||||||
|
memicmp
|
||||||
|
MENUCOMMAND
|
||||||
|
MENUDATA
|
||||||
|
MENUINFO
|
||||||
|
MENUITEMINFOW
|
||||||
|
mmeapi
|
||||||
|
MOUSELEAVE
|
||||||
|
mov
|
||||||
|
mptt
|
||||||
|
msappx
|
||||||
|
MULTIPLEUSE
|
||||||
|
NCHITTEST
|
||||||
|
NCLBUTTONDBLCLK
|
||||||
|
NCMOUSELEAVE
|
||||||
|
NCMOUSEMOVE
|
||||||
|
NCRBUTTONDBLCLK
|
||||||
|
NIF
|
||||||
|
NIN
|
||||||
|
NOAGGREGATION
|
||||||
|
NOASYNC
|
||||||
|
NOCHANGEDIR
|
||||||
|
NOPROGRESS
|
||||||
|
NOREDIRECTIONBITMAP
|
||||||
|
NOREPEAT
|
||||||
|
NOTIFYBYPOS
|
||||||
|
NOTIFYICON
|
||||||
|
NOTIFYICONDATA
|
||||||
|
ntprivapi
|
||||||
|
oaidl
|
||||||
|
ocidl
|
||||||
|
ODR
|
||||||
|
offsetof
|
||||||
|
ofstream
|
||||||
|
onefuzz
|
||||||
|
osver
|
||||||
|
OSVERSIONINFOEXW
|
||||||
|
otms
|
||||||
|
OUTLINETEXTMETRICW
|
||||||
|
overridable
|
||||||
|
PACL
|
||||||
|
PAGESCROLL
|
||||||
|
PATINVERT
|
||||||
|
PEXPLICIT
|
||||||
|
PICKFOLDERS
|
||||||
|
pmr
|
||||||
|
ptstr
|
||||||
|
QUERYENDSESSION
|
||||||
|
rcx
|
||||||
|
REGCLS
|
||||||
|
RETURNCMD
|
||||||
|
rfind
|
||||||
|
ROOTOWNER
|
||||||
|
roundf
|
||||||
|
RSHIFT
|
||||||
|
SACL
|
||||||
|
schandle
|
||||||
|
semver
|
||||||
|
serializer
|
||||||
|
SETVERSION
|
||||||
|
SHELLEXECUTEINFOW
|
||||||
|
shobjidl
|
||||||
|
SHOWHIDE
|
||||||
|
SHOWMINIMIZED
|
||||||
|
SHOWTIP
|
||||||
|
SINGLEUSE
|
||||||
|
SIZENS
|
||||||
|
smoothstep
|
||||||
|
snprintf
|
||||||
|
spsc
|
||||||
|
sregex
|
||||||
|
SRWLOC
|
||||||
|
SRWLOCK
|
||||||
|
STDCPP
|
||||||
|
STDMETHOD
|
||||||
|
strchr
|
||||||
|
strcpy
|
||||||
|
streambuf
|
||||||
|
strtoul
|
||||||
|
Stubless
|
||||||
|
Subheader
|
||||||
|
Subpage
|
||||||
|
syscall
|
||||||
|
SYSTEMBACKDROP
|
||||||
|
TABROW
|
||||||
|
TASKBARCREATED
|
||||||
|
TBPF
|
||||||
|
THEMECHANGED
|
||||||
|
tlg
|
||||||
|
TME
|
||||||
|
tmp
|
||||||
|
tmpdir
|
||||||
|
tolower
|
||||||
|
toupper
|
||||||
|
TRACKMOUSEEVENT
|
||||||
|
TTask
|
||||||
|
TVal
|
||||||
|
UChar
|
||||||
|
UFIELD
|
||||||
|
ULARGE
|
||||||
|
UOI
|
||||||
|
UPDATEINIFILE
|
||||||
|
userenv
|
||||||
|
USEROBJECTFLAGS
|
||||||
|
Viewbox
|
||||||
|
virtualalloc
|
||||||
|
wcsstr
|
||||||
|
wcstoui
|
||||||
|
winmain
|
||||||
|
winsta
|
||||||
|
winstamin
|
||||||
|
wmemcmp
|
||||||
|
wpc
|
||||||
|
WSF
|
||||||
|
wsregex
|
||||||
|
wwinmain
|
||||||
|
xchg
|
||||||
|
XDocument
|
||||||
|
XElement
|
||||||
|
xfacet
|
||||||
|
xhash
|
||||||
|
XIcon
|
||||||
|
xiosbase
|
||||||
|
xlocale
|
||||||
|
xlocbuf
|
||||||
|
xlocinfo
|
||||||
|
xlocmes
|
||||||
|
xlocmon
|
||||||
|
xlocnum
|
||||||
|
xloctime
|
||||||
|
XMax
|
||||||
|
xmemory
|
||||||
|
XParse
|
||||||
|
xpath
|
||||||
|
xstddef
|
||||||
|
xstring
|
||||||
|
xtree
|
||||||
|
xutility
|
||||||
|
YIcon
|
||||||
|
YMax
|
||||||
117
.github/actions/spelling/allow/colors.txt
vendored
Normal file
117
.github/actions/spelling/allow/colors.txt
vendored
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
alice
|
||||||
|
aliceblue
|
||||||
|
antiquewhite
|
||||||
|
blanchedalmond
|
||||||
|
blueviolet
|
||||||
|
burlywood
|
||||||
|
cadetblue
|
||||||
|
cornflowerblue
|
||||||
|
cornsilk
|
||||||
|
cyan
|
||||||
|
darkblue
|
||||||
|
darkcyan
|
||||||
|
darkgoldenrod
|
||||||
|
darkgray
|
||||||
|
darkgreen
|
||||||
|
darkgrey
|
||||||
|
darkkhaki
|
||||||
|
darkmagenta
|
||||||
|
darkolivegreen
|
||||||
|
darkorange
|
||||||
|
darkorchid
|
||||||
|
darkred
|
||||||
|
darksalmon
|
||||||
|
darkseagreen
|
||||||
|
darkslateblue
|
||||||
|
darkslategray
|
||||||
|
darkslategrey
|
||||||
|
darkturquoise
|
||||||
|
darkviolet
|
||||||
|
deeppink
|
||||||
|
deepskyblue
|
||||||
|
dimgray
|
||||||
|
dimgrey
|
||||||
|
dodgerblue
|
||||||
|
firebrick
|
||||||
|
floralwhite
|
||||||
|
forestgreen
|
||||||
|
gainsboro
|
||||||
|
ghostwhite
|
||||||
|
greenyellow
|
||||||
|
hotpink
|
||||||
|
indian
|
||||||
|
indianred
|
||||||
|
lavenderblush
|
||||||
|
lawngreen
|
||||||
|
lemonchiffon
|
||||||
|
lightblue
|
||||||
|
lightcoral
|
||||||
|
lightcyan
|
||||||
|
lightgoldenrod
|
||||||
|
lightgoldenrodyellow
|
||||||
|
lightgray
|
||||||
|
lightgreen
|
||||||
|
lightgrey
|
||||||
|
lightpink
|
||||||
|
lightsalmon
|
||||||
|
lightseagreen
|
||||||
|
lightskyblue
|
||||||
|
lightslateblue
|
||||||
|
lightslategray
|
||||||
|
lightslategrey
|
||||||
|
lightsteelblue
|
||||||
|
lightyellow
|
||||||
|
limegreen
|
||||||
|
mediumaquamarine
|
||||||
|
mediumblue
|
||||||
|
mediumorchid
|
||||||
|
mediumpurple
|
||||||
|
mediumseagreen
|
||||||
|
mediumslateblue
|
||||||
|
mediumspringgreen
|
||||||
|
mediumturquoise
|
||||||
|
mediumvioletred
|
||||||
|
midnightblue
|
||||||
|
mintcream
|
||||||
|
mistyrose
|
||||||
|
navajo
|
||||||
|
navajowhite
|
||||||
|
navyblue
|
||||||
|
oldlace
|
||||||
|
olivedrab
|
||||||
|
orangered
|
||||||
|
palegoldenrod
|
||||||
|
palegreen
|
||||||
|
paleturquoise
|
||||||
|
palevioletred
|
||||||
|
papayawhip
|
||||||
|
peachpuff
|
||||||
|
peru
|
||||||
|
powderblue
|
||||||
|
rebecca
|
||||||
|
rebeccapurple
|
||||||
|
rosybrown
|
||||||
|
royalblue
|
||||||
|
saddlebrown
|
||||||
|
sandybrown
|
||||||
|
seagreen
|
||||||
|
sienna
|
||||||
|
skyblue
|
||||||
|
slateblue
|
||||||
|
slategray
|
||||||
|
slategrey
|
||||||
|
springgreen
|
||||||
|
steelblue
|
||||||
|
violetred
|
||||||
|
webgray
|
||||||
|
webgreen
|
||||||
|
webgrey
|
||||||
|
webmaroon
|
||||||
|
webpurple
|
||||||
|
whitesmoke
|
||||||
|
xaroon
|
||||||
|
xray
|
||||||
|
xreen
|
||||||
|
xrey
|
||||||
|
xurple
|
||||||
|
yellowgreen
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
Consolas
|
Consolas
|
||||||
emoji
|
emoji
|
||||||
|
emojis
|
||||||
Extralight
|
Extralight
|
||||||
Gabriola
|
Gabriola
|
||||||
Iosevka
|
Iosevka
|
||||||
MDL
|
MDL
|
||||||
Monofur
|
Monofur
|
||||||
Segoe
|
Segoe
|
||||||
|
wght
|
||||||
11
.github/actions/spelling/allow/math.txt
vendored
Normal file
11
.github/actions/spelling/allow/math.txt
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
atan
|
||||||
|
CPrime
|
||||||
|
HBar
|
||||||
|
HPrime
|
||||||
|
isnan
|
||||||
|
LPrime
|
||||||
|
LStep
|
||||||
|
powf
|
||||||
|
RSub
|
||||||
|
sqrtf
|
||||||
|
ULP
|
||||||
85
.github/actions/spelling/allow/microsoft.txt
vendored
Normal file
85
.github/actions/spelling/allow/microsoft.txt
vendored
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
ACLs
|
||||||
|
ADMINS
|
||||||
|
advapi
|
||||||
|
altform
|
||||||
|
altforms
|
||||||
|
appendwttlogging
|
||||||
|
appx
|
||||||
|
appxbundle
|
||||||
|
appxerror
|
||||||
|
appxmanifest
|
||||||
|
ATL
|
||||||
|
backplating
|
||||||
|
bitmaps
|
||||||
|
BOMs
|
||||||
|
CPLs
|
||||||
|
cpptools
|
||||||
|
cppvsdbg
|
||||||
|
CPRs
|
||||||
|
cryptbase
|
||||||
|
DACL
|
||||||
|
DACLs
|
||||||
|
defaultlib
|
||||||
|
diffs
|
||||||
|
disposables
|
||||||
|
dotnetfeed
|
||||||
|
DTDs
|
||||||
|
DWINRT
|
||||||
|
enablewttlogging
|
||||||
|
Intelli
|
||||||
|
IVisual
|
||||||
|
libucrt
|
||||||
|
libucrtd
|
||||||
|
LKG
|
||||||
|
LOCKFILE
|
||||||
|
Lxss
|
||||||
|
mfcribbon
|
||||||
|
microsoft
|
||||||
|
microsoftonline
|
||||||
|
MSAA
|
||||||
|
msixbundle
|
||||||
|
MSVC
|
||||||
|
MSVCP
|
||||||
|
muxc
|
||||||
|
netcore
|
||||||
|
Onefuzz
|
||||||
|
osgvsowi
|
||||||
|
PFILETIME
|
||||||
|
pgc
|
||||||
|
pgo
|
||||||
|
pgosweep
|
||||||
|
powerrename
|
||||||
|
powershell
|
||||||
|
propkey
|
||||||
|
pscustomobject
|
||||||
|
QWORD
|
||||||
|
regedit
|
||||||
|
robocopy
|
||||||
|
SACLs
|
||||||
|
sdkddkver
|
||||||
|
Shobjidl
|
||||||
|
Skype
|
||||||
|
SRW
|
||||||
|
sxs
|
||||||
|
Sysinternals
|
||||||
|
sysnative
|
||||||
|
systemroot
|
||||||
|
taskkill
|
||||||
|
tasklist
|
||||||
|
tdbuildteamid
|
||||||
|
ucrt
|
||||||
|
ucrtd
|
||||||
|
unvirtualized
|
||||||
|
VCRT
|
||||||
|
vcruntime
|
||||||
|
Virtualization
|
||||||
|
visualstudio
|
||||||
|
vscode
|
||||||
|
VSTHRD
|
||||||
|
winsdkver
|
||||||
|
wlk
|
||||||
|
wslpath
|
||||||
|
wtl
|
||||||
|
wtt
|
||||||
|
wttlog
|
||||||
|
Xamarin
|
||||||
@@ -1,55 +1,91 @@
|
|||||||
Anup
|
Anup
|
||||||
austdi
|
austdi
|
||||||
|
arkthur
|
||||||
Ballmer
|
Ballmer
|
||||||
bhoj
|
bhoj
|
||||||
Bhojwani
|
Bhojwani
|
||||||
|
Bluloco
|
||||||
|
carlos
|
||||||
dhowett
|
dhowett
|
||||||
Diviness
|
Diviness
|
||||||
|
dsafa
|
||||||
duhowett
|
duhowett
|
||||||
|
DXP
|
||||||
|
ekg
|
||||||
|
eryksun
|
||||||
ethanschoonover
|
ethanschoonover
|
||||||
Firefox
|
Firefox
|
||||||
Gatta
|
Gatta
|
||||||
|
glsl
|
||||||
|
Gravell
|
||||||
Grie
|
Grie
|
||||||
Griese
|
Griese
|
||||||
Hernan
|
Hernan
|
||||||
Howett
|
Howett
|
||||||
Illhardt
|
Illhardt
|
||||||
|
iquilezles
|
||||||
|
italo
|
||||||
jantari
|
jantari
|
||||||
jerrysh
|
jerrysh
|
||||||
Kaiyu
|
Kaiyu
|
||||||
kimwalisch
|
kimwalisch
|
||||||
KMehrain
|
KMehrain
|
||||||
|
KODELIFE
|
||||||
|
Kodelife
|
||||||
Kourosh
|
Kourosh
|
||||||
kowalczyk
|
kowalczyk
|
||||||
leonmsft
|
leonmsft
|
||||||
Lepilleur
|
Lepilleur
|
||||||
|
lhecker
|
||||||
|
lukesampson
|
||||||
|
Macbook
|
||||||
Manandhar
|
Manandhar
|
||||||
|
masserano
|
||||||
mbadolato
|
mbadolato
|
||||||
Mehrain
|
Mehrain
|
||||||
|
menger
|
||||||
mgravell
|
mgravell
|
||||||
michaelniksa
|
michaelniksa
|
||||||
|
michkap
|
||||||
migrie
|
migrie
|
||||||
mikegr
|
mikegr
|
||||||
mikemaccana
|
mikemaccana
|
||||||
|
miloush
|
||||||
miniksa
|
miniksa
|
||||||
niksa
|
niksa
|
||||||
|
nvaccess
|
||||||
|
nvda
|
||||||
oising
|
oising
|
||||||
oldnewthing
|
oldnewthing
|
||||||
|
opengl
|
||||||
osgwiki
|
osgwiki
|
||||||
|
pabhojwa
|
||||||
|
panos
|
||||||
paulcam
|
paulcam
|
||||||
pauldotknopf
|
pauldotknopf
|
||||||
|
PGP
|
||||||
Pham
|
Pham
|
||||||
Rincewind
|
Rincewind
|
||||||
rprichard
|
rprichard
|
||||||
Schoonover
|
Schoonover
|
||||||
|
shadertoy
|
||||||
|
Shomnipotence
|
||||||
|
simioni
|
||||||
Somuah
|
Somuah
|
||||||
sonph
|
sonph
|
||||||
sonpham
|
sonpham
|
||||||
stakx
|
stakx
|
||||||
|
talo
|
||||||
|
thereses
|
||||||
Walisch
|
Walisch
|
||||||
|
WDX
|
||||||
|
Wellons
|
||||||
Wirt
|
Wirt
|
||||||
Wojciech
|
Wojciech
|
||||||
zadjii
|
zadjii
|
||||||
Zamor
|
Zamor
|
||||||
|
Zamora
|
||||||
|
zamora
|
||||||
Zoey
|
Zoey
|
||||||
zorio
|
zorio
|
||||||
|
Zverovich
|
||||||
523
.github/actions/spelling/candidate.patterns
vendored
Normal file
523
.github/actions/spelling/candidate.patterns
vendored
Normal file
@@ -0,0 +1,523 @@
|
|||||||
|
# marker to ignore all code on line
|
||||||
|
^.*/\* #no-spell-check-line \*/.*$
|
||||||
|
# marker for ignoring a comment to the end of the line
|
||||||
|
// #no-spell-check.*$
|
||||||
|
|
||||||
|
# patch hunk comments
|
||||||
|
^\@\@ -\d+(?:,\d+|) \+\d+(?:,\d+|) \@\@ .*
|
||||||
|
# git index header
|
||||||
|
index [0-9a-z]{7,40}\.\.[0-9a-z]{7,40}
|
||||||
|
|
||||||
|
# cid urls
|
||||||
|
(['"])cid:.*?\g{-1}
|
||||||
|
|
||||||
|
# data url in parens
|
||||||
|
\(data:[^)]*?(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})[^)]*\)
|
||||||
|
# data url in quotes
|
||||||
|
([`'"])data:.*?(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1}
|
||||||
|
# data url
|
||||||
|
data:[-a-zA-Z=;:/0-9+]*,\S*
|
||||||
|
|
||||||
|
# mailto urls
|
||||||
|
mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,}
|
||||||
|
|
||||||
|
# magnet urls
|
||||||
|
magnet:[?=:\w]+
|
||||||
|
|
||||||
|
# magnet urls
|
||||||
|
"magnet:[^"]+"
|
||||||
|
|
||||||
|
# obs:
|
||||||
|
"obs:[^"]*"
|
||||||
|
|
||||||
|
# The `\b` here means a break, it's the fancy way to handle urls, but it makes things harder to read
|
||||||
|
# In this examples content, I'm using a number of different ways to match things to show various approaches
|
||||||
|
# asciinema
|
||||||
|
\basciinema\.org/a/[0-9a-zA-Z]+
|
||||||
|
|
||||||
|
# apple
|
||||||
|
\bdeveloper\.apple\.com/[-\w?=/]+
|
||||||
|
# Apple music
|
||||||
|
\bembed\.music\.apple\.com/fr/playlist/usr-share/[-\w.]+
|
||||||
|
|
||||||
|
# appveyor api
|
||||||
|
\bci\.appveyor\.com/api/projects/status/[0-9a-z]+
|
||||||
|
# appveyor project
|
||||||
|
\bci\.appveyor\.com/project/(?:[^/\s"]*/){2}builds?/\d+/job/[0-9a-z]+
|
||||||
|
|
||||||
|
# Amazon
|
||||||
|
|
||||||
|
# Amazon
|
||||||
|
\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)
|
||||||
|
# AWS S3
|
||||||
|
\b\w*\.s3[^.]*\.amazonaws\.com/[-\w/&#%_?:=]*
|
||||||
|
# AWS execute-api
|
||||||
|
\b[0-9a-z]{10}\.execute-api\.[-0-9a-z]+\.amazonaws\.com\b
|
||||||
|
# AWS ELB
|
||||||
|
\b\w+\.[-0-9a-z]+\.elb\.amazonaws\.com\b
|
||||||
|
# AWS SNS
|
||||||
|
\bsns\.[-0-9a-z]+.amazonaws\.com/[-\w/&#%_?:=]*
|
||||||
|
# AWS VPC
|
||||||
|
vpc-\w+
|
||||||
|
|
||||||
|
# While you could try to match `http://` and `https://` by using `s?` in `https?://`, sometimes there
|
||||||
|
# YouTube url
|
||||||
|
\b(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|user/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_%]*
|
||||||
|
# YouTube music
|
||||||
|
\bmusic\.youtube\.com/youtubei/v1/browse(?:[?&]\w+=[-a-zA-Z0-9?&=_]*)
|
||||||
|
# YouTube tag
|
||||||
|
<\s*youtube\s+id=['"][-a-zA-Z0-9?_]*['"]
|
||||||
|
# YouTube image
|
||||||
|
\bimg\.youtube\.com/vi/[-a-zA-Z0-9?&=_]*
|
||||||
|
# Google Accounts
|
||||||
|
\baccounts.google.com/[-_/?=.:;+%&0-9a-zA-Z]*
|
||||||
|
# Google Analytics
|
||||||
|
\bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]*
|
||||||
|
# Google APIs
|
||||||
|
\bgoogleapis\.(?:com|dev)/[a-z]+/(?:v\d+/|)[a-z]+/[-@:./?=\w+|&]+
|
||||||
|
# Google Storage
|
||||||
|
\b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|)
|
||||||
|
# Google Calendar
|
||||||
|
\bcalendar\.google\.com/calendar(?:/u/\d+|)/embed\?src=[@./?=\w&%]+
|
||||||
|
\w+\@group\.calendar\.google\.com\b
|
||||||
|
# Google DataStudio
|
||||||
|
\bdatastudio\.google\.com/(?:(?:c/|)u/\d+/|)(?:embed/|)(?:open|reporting|datasources|s)/[-0-9a-zA-Z]+(?:/page/[-0-9a-zA-Z]+|)
|
||||||
|
# The leading `/` here is as opposed to the `\b` above
|
||||||
|
# ... a short way to match `https://` or `http://` since most urls have one of those prefixes
|
||||||
|
# Google Docs
|
||||||
|
/docs\.google\.com/[a-z]+/(?:ccc\?key=\w+|(?:u/\d+|d/(?:e/|)[0-9a-zA-Z_-]+/)?(?:edit\?[-\w=#.]*|/\?[\w=&]*|))
|
||||||
|
# Google Drive
|
||||||
|
\bdrive\.google\.com/(?:file/d/|open)[-0-9a-zA-Z_?=]*
|
||||||
|
# Google Groups
|
||||||
|
\bgroups\.google\.com/(?:(?:forum/#!|d/)(?:msg|topics?|searchin)|a)/[^/\s"]+/[-a-zA-Z0-9$]+(?:/[-a-zA-Z0-9]+)*
|
||||||
|
# Google Maps
|
||||||
|
\bmaps\.google\.com/maps\?[\w&;=]*
|
||||||
|
# Google themes
|
||||||
|
themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+.
|
||||||
|
# Google CDN
|
||||||
|
\bclients2\.google(?:usercontent|)\.com[-0-9a-zA-Z/.]*
|
||||||
|
# Goo.gl
|
||||||
|
/goo\.gl/[a-zA-Z0-9]+
|
||||||
|
# Google Chrome Store
|
||||||
|
\bchrome\.google\.com/webstore/detail/[-\w]*(?:/\w*|)
|
||||||
|
# Google Books
|
||||||
|
\bgoogle\.(?:\w{2,4})/books(?:/\w+)*\?[-\w\d=&#.]*
|
||||||
|
# Google Fonts
|
||||||
|
\bfonts\.(?:googleapis|gstatic)\.com/[-/?=:;+&0-9a-zA-Z]*
|
||||||
|
# Google Forms
|
||||||
|
\bforms\.gle/\w+
|
||||||
|
# Google Scholar
|
||||||
|
\bscholar\.google\.com/citations\?user=[A-Za-z0-9_]+
|
||||||
|
# Google Colab Research Drive
|
||||||
|
\bcolab\.research\.google\.com/drive/[-0-9a-zA-Z_?=]*
|
||||||
|
|
||||||
|
# GitHub SHAs (api)
|
||||||
|
\bapi.github\.com/repos(?:/[^/\s"]+){3}/[0-9a-f]+\b
|
||||||
|
# GitHub SHAs (markdown)
|
||||||
|
(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)
|
||||||
|
# GitHub SHAs
|
||||||
|
\bgithub\.com(?:/[^/\s"]+){2}[@#][0-9a-f]+\b
|
||||||
|
# GitHub wiki
|
||||||
|
\bgithub\.com/(?:[^/]+/){2}wiki/(?:(?:[^/]+/|)_history|[^/]+(?:/_compare|)/[0-9a-f.]{40,})\b
|
||||||
|
# githubusercontent
|
||||||
|
/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
|
||||||
|
# githubassets
|
||||||
|
\bgithubassets.com/[0-9a-f]+(?:[-/\w.]+)
|
||||||
|
# gist github
|
||||||
|
\bgist\.github\.com/[^/\s"]+/[0-9a-f]+
|
||||||
|
# git.io
|
||||||
|
\bgit\.io/[0-9a-zA-Z]+
|
||||||
|
# GitHub JSON
|
||||||
|
"node_id": "[-a-zA-Z=;:/0-9+]*"
|
||||||
|
# Contributor
|
||||||
|
\[[^\]]+\]\(https://github\.com/[^/\s"]+\)
|
||||||
|
# GHSA
|
||||||
|
GHSA(?:-[0-9a-z]{4}){3}
|
||||||
|
|
||||||
|
# GitLab commit
|
||||||
|
\bgitlab\.[^/\s"]*/\S+/\S+/commit/[0-9a-f]{7,16}#[0-9a-f]{40}\b
|
||||||
|
# GitLab merge requests
|
||||||
|
\bgitlab\.[^/\s"]*/\S+/\S+/-/merge_requests/\d+/diffs#[0-9a-f]{40}\b
|
||||||
|
# GitLab uploads
|
||||||
|
\bgitlab\.[^/\s"]*/uploads/[-a-zA-Z=;:/0-9+]*
|
||||||
|
# GitLab commits
|
||||||
|
\bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b
|
||||||
|
|
||||||
|
# binanace
|
||||||
|
accounts.binance.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]*
|
||||||
|
|
||||||
|
# bitbucket diff
|
||||||
|
\bapi\.bitbucket\.org/\d+\.\d+/repositories/(?:[^/\s"]+/){2}diff(?:stat|)(?:/[^/\s"]+){2}:[0-9a-f]+
|
||||||
|
# bitbucket repositories commits
|
||||||
|
\bapi\.bitbucket\.org/\d+\.\d+/repositories/(?:[^/\s"]+/){2}commits?/[0-9a-f]+
|
||||||
|
# bitbucket commits
|
||||||
|
\bbitbucket\.org/(?:[^/\s"]+/){2}commits?/[0-9a-f]+
|
||||||
|
|
||||||
|
# bit.ly
|
||||||
|
\bbit\.ly/\w+
|
||||||
|
|
||||||
|
# bitrise
|
||||||
|
\bapp\.bitrise\.io/app/[0-9a-f]*/[\w.?=&]*
|
||||||
|
|
||||||
|
# bootstrapcdn.com
|
||||||
|
\bbootstrapcdn\.com/[-./\w]+
|
||||||
|
|
||||||
|
# cdn.cloudflare.com
|
||||||
|
\bcdnjs\.cloudflare\.com/[./\w]+
|
||||||
|
|
||||||
|
# circleci
|
||||||
|
\bcircleci\.com/gh(?:/[^/\s"]+){1,5}.[a-z]+\?[-0-9a-zA-Z=&]+
|
||||||
|
|
||||||
|
# gitter
|
||||||
|
\bgitter\.im(?:/[^/\s"]+){2}\?at=[0-9a-f]+
|
||||||
|
|
||||||
|
# gravatar
|
||||||
|
\bgravatar\.com/avatar/[0-9a-f]+
|
||||||
|
|
||||||
|
# ibm
|
||||||
|
[a-z.]*ibm\.com/[-_#=:%!?~.\\/\d\w]*
|
||||||
|
|
||||||
|
# imgur
|
||||||
|
\bimgur\.com/[^.]+
|
||||||
|
|
||||||
|
# Internet Archive
|
||||||
|
\barchive\.org/web/\d+/(?:[-\w.?,'/\\+&%$#_:]*)
|
||||||
|
|
||||||
|
# discord
|
||||||
|
/discord(?:app\.com|\.gg)/(?:invite/)?[a-zA-Z0-9]{7,}
|
||||||
|
|
||||||
|
# Disqus
|
||||||
|
\bdisqus\.com/[-\w/%.()!?&=_]*
|
||||||
|
|
||||||
|
# medium link
|
||||||
|
\blink\.medium\.com/[a-zA-Z0-9]+
|
||||||
|
# medium
|
||||||
|
\bmedium\.com/\@?[^/\s"]+/[-\w]+
|
||||||
|
|
||||||
|
# microsoft
|
||||||
|
\b(?:https?://|)(?:(?:download\.visualstudio|docs|msdn2?|research)\.microsoft|blogs\.msdn)\.com/[-_a-zA-Z0-9()=./%]*
|
||||||
|
# powerbi
|
||||||
|
\bapp\.powerbi\.com/reportEmbed/[^"' ]*
|
||||||
|
# vs devops
|
||||||
|
\bvisualstudio.com(?::443|)/[-\w/?=%&.]*
|
||||||
|
# microsoft store
|
||||||
|
\bmicrosoft\.com/store/apps/\w+
|
||||||
|
|
||||||
|
# mvnrepository.com
|
||||||
|
\bmvnrepository\.com/[-0-9a-z./]+
|
||||||
|
|
||||||
|
# now.sh
|
||||||
|
/[0-9a-z-.]+\.now\.sh\b
|
||||||
|
|
||||||
|
# oracle
|
||||||
|
\bdocs\.oracle\.com/[-0-9a-zA-Z./_?#&=]*
|
||||||
|
|
||||||
|
# chromatic.com
|
||||||
|
/\S+.chromatic.com\S*[")]
|
||||||
|
|
||||||
|
# codacy
|
||||||
|
\bapi\.codacy\.com/project/badge/Grade/[0-9a-f]+
|
||||||
|
|
||||||
|
# compai
|
||||||
|
\bcompai\.pub/v1/png/[0-9a-f]+
|
||||||
|
|
||||||
|
# mailgun api
|
||||||
|
\.api\.mailgun\.net/v3/domains/[0-9a-z]+\.mailgun.org/messages/[0-9a-zA-Z=@]*
|
||||||
|
# mailgun
|
||||||
|
\b[0-9a-z]+.mailgun.org
|
||||||
|
|
||||||
|
# /message-id/
|
||||||
|
/message-id/[-\w@./%]+
|
||||||
|
|
||||||
|
# Reddit
|
||||||
|
\breddit\.com/r/[/\w_]*
|
||||||
|
|
||||||
|
# requestb.in
|
||||||
|
\brequestb\.in/[0-9a-z]+
|
||||||
|
|
||||||
|
# sched
|
||||||
|
\b[a-z0-9]+\.sched\.com\b
|
||||||
|
|
||||||
|
# Slack url
|
||||||
|
slack://[a-zA-Z0-9?&=]+
|
||||||
|
# Slack
|
||||||
|
\bslack\.com/[-0-9a-zA-Z/_~?&=.]*
|
||||||
|
# Slack edge
|
||||||
|
\bslack-edge\.com/[-a-zA-Z0-9?&=%./]+
|
||||||
|
# Slack images
|
||||||
|
\bslack-imgs\.com/[-a-zA-Z0-9?&=%.]+
|
||||||
|
|
||||||
|
# shields.io
|
||||||
|
\bshields\.io/[-\w/%?=&.:+;,]*
|
||||||
|
|
||||||
|
# stackexchange -- https://stackexchange.com/feeds/sites
|
||||||
|
\b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/(?:questions/\w+/[-\w]+|a/)
|
||||||
|
|
||||||
|
# Sentry
|
||||||
|
[0-9a-f]{32}\@o\d+\.ingest\.sentry\.io\b
|
||||||
|
|
||||||
|
# Twitter markdown
|
||||||
|
\[\@[^[/\]:]*?\]\(https://twitter.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)\)
|
||||||
|
# Twitter hashtag
|
||||||
|
\btwitter\.com/hashtag/[\w?_=&]*
|
||||||
|
# Twitter status
|
||||||
|
\btwitter\.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)
|
||||||
|
# Twitter profile images
|
||||||
|
\btwimg\.com/profile_images/[_\w./]*
|
||||||
|
# Twitter media
|
||||||
|
\btwimg\.com/media/[-_\w./?=]*
|
||||||
|
# Twitter link shortened
|
||||||
|
\bt\.co/\w+
|
||||||
|
|
||||||
|
# facebook
|
||||||
|
\bfburl\.com/[0-9a-z_]+
|
||||||
|
# facebook CDN
|
||||||
|
\bfbcdn\.net/[\w/.,]*
|
||||||
|
# facebook watch
|
||||||
|
\bfb\.watch/[0-9A-Za-z]+
|
||||||
|
|
||||||
|
# dropbox
|
||||||
|
\bdropbox\.com/sh?/[^/\s"]+/[-0-9A-Za-z_.%?=&;]+
|
||||||
|
|
||||||
|
# ipfs protocol
|
||||||
|
ipfs://[0-9a-z]*
|
||||||
|
# ipfs url
|
||||||
|
/ipfs/[0-9a-z]*
|
||||||
|
|
||||||
|
# w3
|
||||||
|
\bw3\.org/[-0-9a-zA-Z/#.]+
|
||||||
|
|
||||||
|
# loom
|
||||||
|
\bloom\.com/embed/[0-9a-f]+
|
||||||
|
|
||||||
|
# regex101
|
||||||
|
\bregex101\.com/r/[^/\s"]+/\d+
|
||||||
|
|
||||||
|
# figma
|
||||||
|
\bfigma\.com/file(?:/[0-9a-zA-Z]+/)+
|
||||||
|
|
||||||
|
# freecodecamp.org
|
||||||
|
\bfreecodecamp\.org/[-\w/.]+
|
||||||
|
|
||||||
|
# image.tmdb.org
|
||||||
|
\bimage\.tmdb\.org/[/\w.]+
|
||||||
|
|
||||||
|
# mermaid
|
||||||
|
\bmermaid\.ink/img/[-\w]+|\bmermaid-js\.github\.io/mermaid-live-editor/#/edit/[-\w]+
|
||||||
|
|
||||||
|
# Wikipedia
|
||||||
|
\ben\.wikipedia\.org/wiki/[-\w%.#]+
|
||||||
|
|
||||||
|
# gitweb
|
||||||
|
[^"\s]+/gitweb/\S+;h=[0-9a-f]+
|
||||||
|
|
||||||
|
# HyperKitty lists
|
||||||
|
/archives/list/[^@/]+\@[^/\s"]*/message/[^/\s"]*/
|
||||||
|
|
||||||
|
# lists
|
||||||
|
/thread\.html/[^"\s]+
|
||||||
|
|
||||||
|
# list-management
|
||||||
|
\blist-manage\.com/subscribe(?:[?&](?:u|id)=[0-9a-f]+)+
|
||||||
|
|
||||||
|
# kubectl.kubernetes.io/last-applied-configuration
|
||||||
|
"kubectl.kubernetes.io/last-applied-configuration": ".*"
|
||||||
|
|
||||||
|
# pgp
|
||||||
|
\bgnupg\.net/pks/lookup[?&=0-9a-zA-Z]*
|
||||||
|
|
||||||
|
# Spotify
|
||||||
|
\bopen\.spotify\.com/embed/playlist/\w+
|
||||||
|
|
||||||
|
# Mastodon
|
||||||
|
\bmastodon\.[-a-z.]*/(?:media/|\@)[?&=0-9a-zA-Z_]*
|
||||||
|
|
||||||
|
# scastie
|
||||||
|
\bscastie\.scala-lang\.org/[^/]+/\w+
|
||||||
|
|
||||||
|
# images.unsplash.com
|
||||||
|
\bimages\.unsplash\.com/(?:(?:flagged|reserve)/|)[-\w./%?=%&.;]+
|
||||||
|
|
||||||
|
# pastebin
|
||||||
|
\bpastebin\.com/[\w/]+
|
||||||
|
|
||||||
|
# heroku
|
||||||
|
\b\w+\.heroku\.com/source/archive/\w+
|
||||||
|
|
||||||
|
# quip
|
||||||
|
\b\w+\.quip\.com/\w+(?:(?:#|/issues/)\w+)?
|
||||||
|
|
||||||
|
# badgen.net
|
||||||
|
\bbadgen\.net/badge/[^")\]'\s]+
|
||||||
|
|
||||||
|
# statuspage.io
|
||||||
|
\w+\.statuspage\.io\b
|
||||||
|
|
||||||
|
# media.giphy.com
|
||||||
|
\bmedia\.giphy\.com/media/[^/]+/[\w.?&=]+
|
||||||
|
|
||||||
|
# tinyurl
|
||||||
|
\btinyurl\.com/\w+
|
||||||
|
|
||||||
|
# getopts
|
||||||
|
\bgetopts\s+(?:"[^"]+"|'[^']+')
|
||||||
|
|
||||||
|
# ANSI color codes
|
||||||
|
(?:\\(?:u00|x)1b|\x1b)\[\d+(?:;\d+|)m
|
||||||
|
|
||||||
|
# URL escaped characters
|
||||||
|
\%[0-9A-F][A-F]
|
||||||
|
# IPv6
|
||||||
|
\b(?:[0-9a-fA-F]{0,4}:){3,7}[0-9a-fA-F]{0,4}\b
|
||||||
|
# c99 hex digits (not the full format, just one I've seen)
|
||||||
|
0x[0-9a-fA-F](?:\.[0-9a-fA-F]*|)[pP]
|
||||||
|
# Punycode
|
||||||
|
\bxn--[-0-9a-z]+
|
||||||
|
# sha
|
||||||
|
sha\d+:[0-9]*[a-f]{3,}[0-9a-f]*
|
||||||
|
# sha-... -- uses a fancy capture
|
||||||
|
(['"]|")[0-9a-f]{40,}\g{-1}
|
||||||
|
# hex runs
|
||||||
|
\b[0-9a-fA-F]{16,}\b
|
||||||
|
# hex in url queries
|
||||||
|
=[0-9a-fA-F]*?(?:[A-F]{3,}|[a-f]{3,})[0-9a-fA-F]*?&
|
||||||
|
# ssh
|
||||||
|
(?:ssh-\S+|-nistp256) [-a-zA-Z=;:/0-9+]{12,}
|
||||||
|
|
||||||
|
# PGP
|
||||||
|
\b(?:[0-9A-F]{4} ){9}[0-9A-F]{4}\b
|
||||||
|
# GPG keys
|
||||||
|
\b(?:[0-9A-F]{4} ){5}(?: [0-9A-F]{4}){5}\b
|
||||||
|
# Well known gpg keys
|
||||||
|
.well-known/openpgpkey/[\w./]+
|
||||||
|
|
||||||
|
# uuid:
|
||||||
|
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
|
||||||
|
# hex digits including css/html color classes:
|
||||||
|
(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|u\d+)\b
|
||||||
|
# integrity
|
||||||
|
integrity="sha\d+-[-a-zA-Z=;:/0-9+]{40,}"
|
||||||
|
|
||||||
|
# https://www.gnu.org/software/groff/manual/groff.html
|
||||||
|
# man troff content
|
||||||
|
\\f[BCIPR]
|
||||||
|
# '
|
||||||
|
\\\(aq
|
||||||
|
|
||||||
|
# .desktop mime types
|
||||||
|
^MimeTypes?=.*$
|
||||||
|
# .desktop localized entries
|
||||||
|
^[A-Z][a-z]+\[[a-z]+\]=.*$
|
||||||
|
# Localized .desktop content
|
||||||
|
Name\[[^\]]+\]=.*
|
||||||
|
|
||||||
|
# IServiceProvider
|
||||||
|
\bI(?=(?:[A-Z][a-z]{2,})+\b)
|
||||||
|
|
||||||
|
# crypt
|
||||||
|
"\$2[ayb]\$.{56}"
|
||||||
|
|
||||||
|
# scrypt / argon
|
||||||
|
\$(?:scrypt|argon\d+[di]*)\$\S+
|
||||||
|
|
||||||
|
# Input to GitHub JSON
|
||||||
|
content: "[-a-zA-Z=;:/0-9+]*="
|
||||||
|
|
||||||
|
# Python stringprefix / binaryprefix
|
||||||
|
# Note that there's a high false positive rate, remove the `?=` and search for the regex to see if the matches seem like reasonable strings
|
||||||
|
(?<!')\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)'(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})
|
||||||
|
|
||||||
|
# Regular expressions for (P|p)assword
|
||||||
|
\([A-Z]\|[a-z]\)[a-z]+
|
||||||
|
|
||||||
|
# JavaScript regular expressions
|
||||||
|
# javascript test regex
|
||||||
|
/.*/[gim]*\.test\(
|
||||||
|
# javascript match regex
|
||||||
|
\.match\(/[^/\s"]*/[gim]*\s*
|
||||||
|
# javascript match regex
|
||||||
|
\.match\(/\\[b].*?/[gim]*\s*\)(?:;|$)
|
||||||
|
# javascript regex
|
||||||
|
^\s*/\\[b].*/[gim]*\s*(?:\)(?:;|$)|,$)
|
||||||
|
# javascript replace regex
|
||||||
|
\.replace\(/[^/\s"]*/[gim]*\s*,
|
||||||
|
|
||||||
|
# Go regular expressions
|
||||||
|
regexp?\.MustCompile\(`[^`]*`\)
|
||||||
|
|
||||||
|
# sed regular expressions
|
||||||
|
sed 's/(?:[^/]*?[a-zA-Z]{3,}[^/]*?/){2}
|
||||||
|
|
||||||
|
# go install
|
||||||
|
go install(?:\s+[a-z]+\.[-@\w/.]+)+
|
||||||
|
|
||||||
|
# kubernetes pod status lists
|
||||||
|
# https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
|
||||||
|
\w+(?:-\w+)+\s+\d+/\d+\s+(?:Running|Pending|Succeeded|Failed|Unknown)\s+
|
||||||
|
|
||||||
|
# kubectl - pods in CrashLoopBackOff
|
||||||
|
\w+-[0-9a-f]+-\w+\s+\d+/\d+\s+CrashLoopBackOff\s+
|
||||||
|
|
||||||
|
# kubernetes object suffix
|
||||||
|
-[0-9a-f]{10}-\w{5}\s
|
||||||
|
|
||||||
|
# posthog secrets
|
||||||
|
posthog\.init\((['"])phc_[^"',]+\g{-1},
|
||||||
|
|
||||||
|
# xcode
|
||||||
|
|
||||||
|
# xcodeproject scenes
|
||||||
|
(?:Controller|ID|id)="\w{3}-\w{2}-\w{3}"
|
||||||
|
|
||||||
|
# xcode api botches
|
||||||
|
customObjectInstantitationMethod
|
||||||
|
|
||||||
|
# font awesome classes
|
||||||
|
\.fa-[-a-z0-9]+
|
||||||
|
|
||||||
|
# Update Lorem based on your content (requires `ge` and `w` from https://github.com/jsoref/spelling; and `review` from https://github.com/check-spelling/check-spelling/wiki/Looking-for-items-locally )
|
||||||
|
# grep '^[^#].*lorem' .github/actions/spelling/patterns.txt|perl -pne 's/.*i..\?://;s/\).*//' |tr '|' "\n"|sort -f |xargs -n1 ge|perl -pne 's/^[^:]*://'|sort -u|w|sed -e 's/ .*//'|w|review -
|
||||||
|
# Warning, while `(?i)` is very neat and fancy, if you have some binary files that aren't proper unicode, you might run into:
|
||||||
|
## Operation "substitution (s///)" returns its argument for non-Unicode code point 0x1C19AE (the code point will vary).
|
||||||
|
## You could manually change `(?i)X...` to use `[Xx]...`
|
||||||
|
## or you could add the files to your `excludes` file (a version after 0.0.19 should identify the file path)
|
||||||
|
# Lorem
|
||||||
|
(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus)\b(?:\w|\s|[,.])*
|
||||||
|
|
||||||
|
# Non-English
|
||||||
|
[a-zA-Z]*[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*
|
||||||
|
|
||||||
|
# French
|
||||||
|
# This corpus only had capital letters, but you probably want lowercase ones as well.
|
||||||
|
\b[LN]'+[a-z]{2,}\b
|
||||||
|
|
||||||
|
# latex
|
||||||
|
\\(?:n(?:ew|ormal|osub)|r(?:enew)|t(?:able(?:of|)|he|itle))(?=[a-z]+)
|
||||||
|
|
||||||
|
# the negative lookahead here is to allow catching 'templatesz' as a misspelling
|
||||||
|
# but to otherwise recognize a Windows path with \templates\foo.template or similar:
|
||||||
|
\\(?:necessary|r(?:eport|esolve[dr]?|esult)|t(?:arget|emplates?))(?![a-z])
|
||||||
|
# ignore long runs of a single character:
|
||||||
|
\b([A-Za-z])\g{-1}{3,}\b
|
||||||
|
# Note that the next example is no longer necessary if you are using
|
||||||
|
# to match a string starting with a `#`, use a character-class:
|
||||||
|
[#]backwards
|
||||||
|
# version suffix <word>v#
|
||||||
|
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
|
||||||
|
# Compiler flags (Scala)
|
||||||
|
(?:^|[\t ,>"'`=(])-J-[DPWXY](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
|
||||||
|
# Compiler flags
|
||||||
|
#(?:^|[\t ,"'`=(])-[DPWXYLlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
|
||||||
|
|
||||||
|
# Compiler flags (linker)
|
||||||
|
,-B
|
||||||
|
# curl arguments
|
||||||
|
\b(?:\\n|)curl(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*
|
||||||
|
# set arguments
|
||||||
|
\bset(?:\s+-[abefimouxE]{1,2})*\s+-[abefimouxE]{3,}(?:\s+-[abefimouxE]+)*
|
||||||
|
# tar arguments
|
||||||
|
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
|
||||||
|
# tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long...
|
||||||
|
\btput\s+(?:(?:-[SV]|-T\s*\w+)\s+)*\w{3,5}\b
|
||||||
|
# macOS temp folders
|
||||||
|
/var/folders/\w\w/[+\w]+/(?:T|-Caches-)/
|
||||||
117
.github/actions/spelling/excludes.txt
vendored
Normal file
117
.github/actions/spelling/excludes.txt
vendored
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
|
||||||
|
(?:(?i)\.png$)
|
||||||
|
(?:^|/)(?i)COPYRIGHT
|
||||||
|
(?:^|/)(?i)LICEN[CS]E
|
||||||
|
(?:^|/)3rdparty/
|
||||||
|
(?:^|/)dirs$
|
||||||
|
(?:^|/)go\.mod$
|
||||||
|
(?:^|/)go\.sum$
|
||||||
|
(?:^|/)package(?:-lock|)\.json$
|
||||||
|
(?:^|/)sources(?:|\.dep)$
|
||||||
|
(?:^|/)vendor/
|
||||||
|
\.a$
|
||||||
|
\.ai$
|
||||||
|
\.avi$
|
||||||
|
\.bmp$
|
||||||
|
\.bz2$
|
||||||
|
\.cer$
|
||||||
|
\.class$
|
||||||
|
\.crl$
|
||||||
|
\.crt$
|
||||||
|
\.csr$
|
||||||
|
\.dll$
|
||||||
|
\.docx?$
|
||||||
|
\.drawio$
|
||||||
|
\.DS_Store$
|
||||||
|
\.eot$
|
||||||
|
\.eps$
|
||||||
|
\.exe$
|
||||||
|
\.gif$
|
||||||
|
\.gitattributes$
|
||||||
|
\.graffle$
|
||||||
|
\.gz$
|
||||||
|
\.icns$
|
||||||
|
\.ico$
|
||||||
|
\.jar$
|
||||||
|
\.jks$
|
||||||
|
\.jpeg$
|
||||||
|
\.jpg$
|
||||||
|
\.key$
|
||||||
|
\.lib$
|
||||||
|
\.lock$
|
||||||
|
\.map$
|
||||||
|
\.min\..
|
||||||
|
\.mod$
|
||||||
|
\.mp3$
|
||||||
|
\.mp4$
|
||||||
|
\.o$
|
||||||
|
\.ocf$
|
||||||
|
\.otf$
|
||||||
|
\.pbxproj$
|
||||||
|
\.pdf$
|
||||||
|
\.pem$
|
||||||
|
\.png$
|
||||||
|
\.psd$
|
||||||
|
\.pyc$
|
||||||
|
\.runsettings$
|
||||||
|
\.s$
|
||||||
|
\.sig$
|
||||||
|
\.so$
|
||||||
|
\.svg$
|
||||||
|
\.svgz$
|
||||||
|
\.svgz?$
|
||||||
|
\.tar$
|
||||||
|
\.tgz$
|
||||||
|
\.tiff?$
|
||||||
|
\.ttf$
|
||||||
|
\.vsdx$
|
||||||
|
\.wav$
|
||||||
|
\.webm$
|
||||||
|
\.webp$
|
||||||
|
\.woff
|
||||||
|
\.woff2?$
|
||||||
|
\.xcf$
|
||||||
|
\.xls
|
||||||
|
\.xlsx?$
|
||||||
|
\.xpm$
|
||||||
|
\.yml$
|
||||||
|
\.zip$
|
||||||
|
^\.github/actions/spelling/
|
||||||
|
^\.github/fabricbot.json$
|
||||||
|
^\.gitignore$
|
||||||
|
^\Q.git-blame-ignore-revs\E$
|
||||||
|
^\Q.github/workflows/spelling.yml\E$
|
||||||
|
^\Qdoc/reference/windows-terminal-logo.ans\E$
|
||||||
|
^\Qsamples/ConPTY/EchoCon/EchoCon/EchoCon.vcxproj.filters\E$
|
||||||
|
^\Qsrc/host/exe/Host.EXE.vcxproj.filters\E$
|
||||||
|
^\Qsrc/host/ft_host/chafa.txt\E$
|
||||||
|
^\Qsrc/tools/closetest/CloseTest.vcxproj.filters\E$
|
||||||
|
^\XamlStyler.json$
|
||||||
|
^build/config/
|
||||||
|
^consolegit2gitfilters\.json$
|
||||||
|
^dep/
|
||||||
|
^doc/reference/master-sequence-list.csv$
|
||||||
|
^doc/reference/UTF8-torture-test\.txt$
|
||||||
|
^oss/
|
||||||
|
^src/host/ft_uia/run\.bat$
|
||||||
|
^src/host/runft\.bat$
|
||||||
|
^src/host/runut\.bat$
|
||||||
|
^src/interactivity/onecore/BgfxEngine\.
|
||||||
|
^src/renderer/atlas/
|
||||||
|
^src/renderer/wddmcon/WddmConRenderer\.
|
||||||
|
^src/terminal/adapter/ut_adapter/run\.bat$
|
||||||
|
^src/terminal/parser/delfuzzpayload\.bat$
|
||||||
|
^src/terminal/parser/ft_fuzzer/run\.bat$
|
||||||
|
^src/terminal/parser/ft_fuzzer/VTCommandFuzzer\.cpp$
|
||||||
|
^src/terminal/parser/ft_fuzzwrapper/run\.bat$
|
||||||
|
^src/terminal/parser/ut_parser/Base64Test.cpp$
|
||||||
|
^src/terminal/parser/ut_parser/run\.bat$
|
||||||
|
^src/tools/integrity/packageuwp/ConsoleUWP\.appxSources$
|
||||||
|
^src/tools/lnkd/lnkd\.bat$
|
||||||
|
^src/tools/pixels/pixels\.bat$
|
||||||
|
^src/tools/texttests/fira\.txt$
|
||||||
|
^src/tools/U8U16Test/(?:fr|ru|zh)\.txt$
|
||||||
|
^src/types/ut_types/UtilsTests.cpp$
|
||||||
|
^tools/ReleaseEngineering/ServicingPipeline.ps1$
|
||||||
|
ignore$
|
||||||
|
SUMS$
|
||||||
13
.github/actions/spelling/expect/README.md
vendored
Normal file
13
.github/actions/spelling/expect/README.md
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
The contents of each `.txt` file in this directory are merged together.
|
||||||
|
|
||||||
|
* [alphabet](alphabet.txt) is a sample for alphabet related items
|
||||||
|
* [web](web.txt) is a sample for web/html related items
|
||||||
|
* [expect](expect.txt) is the main list of expected items -- there is nothing
|
||||||
|
particularly special about the file name (beyond the extension which is
|
||||||
|
important).
|
||||||
|
|
||||||
|
These terms are things which temporarily exist in the project, but which
|
||||||
|
aren't necessarily words.
|
||||||
|
|
||||||
|
If something is a word that could come and go, it probably belongs in a
|
||||||
|
[dictionary](../dictionary/README.md).
|
||||||
@@ -1,27 +1,33 @@
|
|||||||
|
AAAa
|
||||||
|
AAAAA
|
||||||
|
AAAAAAAAAAAAA
|
||||||
|
AAAAAABBBBBBCCC
|
||||||
|
AAAAABBBBBBCCC
|
||||||
|
abcd
|
||||||
abcd
|
abcd
|
||||||
abcde
|
|
||||||
abcdef
|
|
||||||
ABCDEFG
|
|
||||||
ABCDEFGH
|
|
||||||
ABCDEFGHIJ
|
ABCDEFGHIJ
|
||||||
abcdefghijk
|
abcdefghijk
|
||||||
|
ABCDEFGHIJKLMNO
|
||||||
abcdefghijklmnop
|
abcdefghijklmnop
|
||||||
ABCDEFGHIJKLMNOPQRST
|
ABCDEFGHIJKLMNOPQRST
|
||||||
abcdefghijklmnopqrstuvwxyz
|
ABCG
|
||||||
QQQQQ
|
ABE
|
||||||
QQQQQQQQQ
|
abf
|
||||||
QQQQQQQQQQ
|
BBBBB
|
||||||
|
BBBBBBBB
|
||||||
|
BBBBBCCC
|
||||||
|
BBBBCCCCC
|
||||||
|
BBGGRR
|
||||||
|
EFG
|
||||||
|
EFGh
|
||||||
QQQQQQQQQQABCDEFGHIJ
|
QQQQQQQQQQABCDEFGHIJ
|
||||||
QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQ
|
QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQ
|
||||||
QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQQ
|
QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQQ
|
||||||
QQQQQQQQQQABCDEFGHIJPQRSTQQQQQQQQQQ
|
QQQQQQQQQQABCDEFGHIJPQRSTQQQQQQQQQQ
|
||||||
qrstuvwxyz
|
qrstuvwxyz
|
||||||
qwerty
|
qwerty
|
||||||
QWERTYUIOP
|
|
||||||
qwertyuiopasdfg
|
qwertyuiopasdfg
|
||||||
TTTTTTTTTTTTTTTTTTTTTTTTTT
|
YYYYYYYDDDDDDDDDDD
|
||||||
VVVVVVVVVVVVVVVV
|
|
||||||
yyyy
|
|
||||||
ZAAZZ
|
ZAAZZ
|
||||||
ZABBZ
|
ZABBZ
|
||||||
ZBAZZ
|
ZBAZZ
|
||||||
File diff suppressed because it is too large
Load Diff
6
.github/actions/spelling/expect/web.txt
vendored
Normal file
6
.github/actions/spelling/expect/web.txt
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
WCAG
|
||||||
|
winui
|
||||||
|
appshellintegration
|
||||||
|
mdtauk
|
||||||
|
gfycat
|
||||||
|
Guake
|
||||||
62
.github/actions/spelling/line_forbidden.patterns
vendored
Normal file
62
.github/actions/spelling/line_forbidden.patterns
vendored
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# reject `m_data` as there's a certain OS which has evil defines that break things if it's used elsewhere
|
||||||
|
# \bm_data\b
|
||||||
|
|
||||||
|
# If you have a framework that uses `it()` for testing and `fit()` for debugging a specific test,
|
||||||
|
# you might not want to check in code where you were debugging w/ `fit()`, in which case, you might want
|
||||||
|
# to use this:
|
||||||
|
#\bfit\(
|
||||||
|
|
||||||
|
# s.b. GitHub
|
||||||
|
\bGithub\b
|
||||||
|
|
||||||
|
# s.b. GitLab
|
||||||
|
\bGitlab\b
|
||||||
|
|
||||||
|
# s.b. JavaScript
|
||||||
|
\bJavascript\b
|
||||||
|
|
||||||
|
# s.b. Microsoft
|
||||||
|
\bMicroSoft\b
|
||||||
|
|
||||||
|
# s.b. another
|
||||||
|
\ban[- ]other\b
|
||||||
|
|
||||||
|
# s.b. greater than
|
||||||
|
\bgreater then\b
|
||||||
|
|
||||||
|
# s.b. into
|
||||||
|
#\sin to\s
|
||||||
|
|
||||||
|
# s.b. opt-in
|
||||||
|
\sopt in\s
|
||||||
|
|
||||||
|
# s.b. less than
|
||||||
|
\bless then\b
|
||||||
|
|
||||||
|
# s.b. otherwise
|
||||||
|
\bother[- ]wise\b
|
||||||
|
|
||||||
|
# s.b. nonexistent
|
||||||
|
\bnon existing\b
|
||||||
|
\b[Nn]o[nt][- ]existent\b
|
||||||
|
|
||||||
|
# s.b. preexisting
|
||||||
|
[Pp]re[- ]existing
|
||||||
|
|
||||||
|
# s.b. preempt
|
||||||
|
[Pp]re[- ]empt\b
|
||||||
|
|
||||||
|
# s.b. preemptively
|
||||||
|
[Pp]re[- ]emptively
|
||||||
|
|
||||||
|
# s.b. reentrancy
|
||||||
|
[Rr]e[- ]entrancy
|
||||||
|
|
||||||
|
# s.b. reentrant
|
||||||
|
[Rr]e[- ]entrant
|
||||||
|
|
||||||
|
# s.b. workaround(s)
|
||||||
|
#\bwork[- ]arounds?\b
|
||||||
|
|
||||||
|
# Reject duplicate words
|
||||||
|
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
|
||||||
96
.github/actions/spelling/patterns/patterns.txt
vendored
Normal file
96
.github/actions/spelling/patterns/patterns.txt
vendored
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
|
||||||
|
|
||||||
|
https?://\S+
|
||||||
|
[Pp]ublicKeyToken="?[0-9a-fA-F]{16}"?
|
||||||
|
(?:[{"]|UniqueIdentifier>)[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}(?:[}"]|</UniqueIdentifier)
|
||||||
|
(?:0[Xx]|\\x|U\+|#)[a-f0-9A-FGgRr]{2,}[Uu]?[Ll]{0,2}\b
|
||||||
|
microsoft/cascadia-code\@[0-9a-fA-F]{40}
|
||||||
|
\d+x\d+Logo
|
||||||
|
Scro\&ll
|
||||||
|
# selectionInput.cpp
|
||||||
|
:\\windows\\syste\b
|
||||||
|
TestUtils::VerifyExpectedString\(tb, L"[^"]+"
|
||||||
|
(?:hostSm|mach)\.ProcessString\(L"[^"]+"
|
||||||
|
\b([A-Za-z])\g{-1}{3,}\b
|
||||||
|
0x[0-9A-Za-z]+
|
||||||
|
Base64::s_(?:En|De)code\(L"[^"]+"
|
||||||
|
VERIFY_ARE_EQUAL\(L"[^"]+"
|
||||||
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+/"
|
||||||
|
std::memory_order_[\w]+
|
||||||
|
D2DERR_SHADER_COMPILE_FAILED
|
||||||
|
TIL_FEATURE_[0-9A-Z_]+
|
||||||
|
vcvars\w*
|
||||||
|
ROY\sG\.\sBIV
|
||||||
|
!(?:(?i)ESC)!\[
|
||||||
|
!(?:(?i)CSI)!(?:\d+(?:;\d+|)m|[ABCDF])
|
||||||
|
|
||||||
|
# Python stringprefix / binaryprefix
|
||||||
|
\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)'
|
||||||
|
|
||||||
|
# Automatically suggested patterns
|
||||||
|
# hit-count: 3831 file-count: 582
|
||||||
|
# IServiceProvider
|
||||||
|
\bI(?=(?:[A-Z][a-z]{2,})+\b)
|
||||||
|
|
||||||
|
# hit-count: 71 file-count: 35
|
||||||
|
# Compiler flags
|
||||||
|
(?:^|[\t ,"'`=(])-[D](?=[A-Z]{2,}|[A-Z][a-z])
|
||||||
|
(?:^|[\t ,"'`=(])-[X](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
|
||||||
|
|
||||||
|
# hit-count: 41 file-count: 28
|
||||||
|
# version suffix <word>v#
|
||||||
|
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
|
||||||
|
|
||||||
|
# hit-count: 20 file-count: 9
|
||||||
|
# hex runs
|
||||||
|
\b[0-9a-fA-F]{16,}\b
|
||||||
|
|
||||||
|
# hit-count: 10 file-count: 7
|
||||||
|
# uuid:
|
||||||
|
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
|
||||||
|
|
||||||
|
# hit-count: 4 file-count: 4
|
||||||
|
# mailto urls
|
||||||
|
mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,}
|
||||||
|
|
||||||
|
# hit-count: 4 file-count: 1
|
||||||
|
# ANSI color codes
|
||||||
|
(?:\\(?:u00|x)1b|\x1b)\[\d+(?:;\d+|)m
|
||||||
|
|
||||||
|
# hit-count: 2 file-count: 1
|
||||||
|
# latex
|
||||||
|
\\(?:n(?:ew|ormal|osub)|r(?:enew)|t(?:able(?:of|)|he|itle))(?=[a-z]+)
|
||||||
|
|
||||||
|
# hit-count: 1 file-count: 1
|
||||||
|
# hex digits including css/html color classes:
|
||||||
|
(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|u\d+)\b
|
||||||
|
|
||||||
|
# hit-count: 1 file-count: 1
|
||||||
|
# Non-English
|
||||||
|
[a-zA-Z]*[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*
|
||||||
|
|
||||||
|
# hit-count: 1 file-count: 1
|
||||||
|
# French
|
||||||
|
# This corpus only had capital letters, but you probably want lowercase ones as well.
|
||||||
|
\b[LN]'+[a-z]{2,}\b
|
||||||
|
|
||||||
|
# acceptable duplicates
|
||||||
|
# ls directory listings
|
||||||
|
[-bcdlpsw](?:[-r][-w][-sx]){3}\s+\d+\s+(\S+)\s+\g{-1}\s+\d+\s+
|
||||||
|
# C/idl types + English ...
|
||||||
|
\s(Guid|long|LONG|that) \g{-1}\s
|
||||||
|
|
||||||
|
# javadoc / .net
|
||||||
|
(?:[\\@](?:groupname|param)|(?:public|private)(?:\s+static|\s+readonly)*)\s+(\w+)\s+\g{-1}\s
|
||||||
|
|
||||||
|
# Commit message -- Signed-off-by and friends
|
||||||
|
^\s*(?:(?:Based-on-patch|Co-authored|Helped|Mentored|Reported|Reviewed|Signed-off)-by|Thanks-to): (?:[^<]*<[^>]*>|[^<]*)\s*$
|
||||||
|
|
||||||
|
# Autogenerated revert commit message
|
||||||
|
^This reverts commit [0-9a-f]{40}\.$
|
||||||
|
|
||||||
|
# vtmode
|
||||||
|
--vtmode\s+(\w+)\s+\g{-1}\s
|
||||||
|
|
||||||
|
# ignore long runs of a single character:
|
||||||
|
\b([A-Za-z])\g{-1}{3,}\b
|
||||||
12
.github/actions/spelling/reject.txt
vendored
Normal file
12
.github/actions/spelling/reject.txt
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
^attache$
|
||||||
|
^attacher$
|
||||||
|
^attachers$
|
||||||
|
benefitting
|
||||||
|
occurences?
|
||||||
|
^dependan.*
|
||||||
|
^oer$
|
||||||
|
Sorce
|
||||||
|
^[Ss]pae.*
|
||||||
|
^untill$
|
||||||
|
^untilling$
|
||||||
|
^wether.*
|
||||||
20
.github/workflows/spelling.yml
vendored
20
.github/workflows/spelling.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Spell checking
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
schedule:
|
|
||||||
# * is a special character in YAML so you have to quote this string
|
|
||||||
- cron: '15 * * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Spell checking
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2.0.0
|
|
||||||
with:
|
|
||||||
fetch-depth: 5
|
|
||||||
- uses: check-spelling/check-spelling@0.0.12-alpha
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
bucket: .github/actions
|
|
||||||
project: spell-check
|
|
||||||
134
.github/workflows/spelling2.yml
vendored
Normal file
134
.github/workflows/spelling2.yml
vendored
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
# spelling.yml is blocked per https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p
|
||||||
|
name: Spell checking
|
||||||
|
|
||||||
|
# Comment management is handled through a secondary job, for details see:
|
||||||
|
# https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions
|
||||||
|
#
|
||||||
|
# `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment
|
||||||
|
# (in odd cases, it might actually run just to collapse a commment, but that's fairly rare)
|
||||||
|
# it needs `contents: write` in order to add a comment.
|
||||||
|
#
|
||||||
|
# `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment
|
||||||
|
# or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment)
|
||||||
|
# it needs `pull-requests: write` in order to manipulate those comments.
|
||||||
|
|
||||||
|
# Updating pull request branches is managed via comment handling.
|
||||||
|
# For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list
|
||||||
|
#
|
||||||
|
# These elements work together to make it happen:
|
||||||
|
#
|
||||||
|
# `on.issue_comment`
|
||||||
|
# This event listens to comments by users asking to update the metadata.
|
||||||
|
#
|
||||||
|
# `jobs.update`
|
||||||
|
# This job runs in response to an issue_comment and will push a new commit
|
||||||
|
# to update the spelling metadata.
|
||||||
|
#
|
||||||
|
# `with.experimental_apply_changes_via_bot`
|
||||||
|
# Tells the action to support and generate messages that enable it
|
||||||
|
# to make a commit to update the spelling metadata.
|
||||||
|
#
|
||||||
|
# `with.ssh_key`
|
||||||
|
# In order to trigger workflows when the commit is made, you can provide a
|
||||||
|
# secret (typically, a write-enabled github deploy key).
|
||||||
|
#
|
||||||
|
# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
tags-ignore:
|
||||||
|
- "**"
|
||||||
|
pull_request_target:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
tags-ignore:
|
||||||
|
- "**"
|
||||||
|
types:
|
||||||
|
- 'opened'
|
||||||
|
- 'reopened'
|
||||||
|
- 'synchronize'
|
||||||
|
issue_comment:
|
||||||
|
types:
|
||||||
|
- 'created'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
spelling:
|
||||||
|
name: Spell checking
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: read
|
||||||
|
actions: read
|
||||||
|
outputs:
|
||||||
|
followup: ${{ steps.spelling.outputs.followup }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'"
|
||||||
|
concurrency:
|
||||||
|
group: spelling-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
# note: If you use only_check_changed_files, you do not want cancel-in-progress
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- name: check-spelling
|
||||||
|
id: spelling
|
||||||
|
uses: check-spelling/check-spelling@v0.0.21
|
||||||
|
with:
|
||||||
|
suppress_push_for_open_pull_request: 1
|
||||||
|
checkout: true
|
||||||
|
check_file_names: 1
|
||||||
|
spell_check_this: check-spelling/spell-check-this@prerelease
|
||||||
|
post_comment: 0
|
||||||
|
use_magic_file: 1
|
||||||
|
extra_dictionary_limit: 10
|
||||||
|
extra_dictionaries:
|
||||||
|
cspell:software-terms/src/software-terms.txt
|
||||||
|
cspell:python/src/python/python-lib.txt
|
||||||
|
cspell:node/node.txt
|
||||||
|
cspell:cpp/src/stdlib-c.txt
|
||||||
|
cspell:cpp/src/stdlib-cpp.txt
|
||||||
|
cspell:fullstack/fullstack.txt
|
||||||
|
cspell:filetypes/filetypes.txt
|
||||||
|
cspell:html/html.txt
|
||||||
|
cspell:cpp/src/compiler-msvc.txt
|
||||||
|
cspell:python/src/common/extra.txt
|
||||||
|
cspell:powershell/powershell.txt
|
||||||
|
cspell:aws/aws.txt
|
||||||
|
cspell:cpp/src/lang-keywords.txt
|
||||||
|
cspell:npm/npm.txt
|
||||||
|
cspell:dotnet/dotnet.txt
|
||||||
|
cspell:python/src/python/python.txt
|
||||||
|
cspell:css/css.txt
|
||||||
|
cspell:cpp/src/stdlib-cmath.txt
|
||||||
|
check_extra_dictionaries: ''
|
||||||
|
|
||||||
|
comment-push:
|
||||||
|
name: Report (Push)
|
||||||
|
# If your workflow isn't running on push, you can remove this job
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: spelling
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push'
|
||||||
|
steps:
|
||||||
|
- name: comment
|
||||||
|
uses: check-spelling/check-spelling@v0.0.21
|
||||||
|
with:
|
||||||
|
checkout: true
|
||||||
|
spell_check_this: check-spelling/spell-check-this@prerelease
|
||||||
|
task: ${{ needs.spelling.outputs.followup }}
|
||||||
|
|
||||||
|
comment-pr:
|
||||||
|
name: Report (PR)
|
||||||
|
# If you workflow isn't running on pull_request*, you can remove this job
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: spelling
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
|
||||||
|
steps:
|
||||||
|
- name: comment
|
||||||
|
uses: check-spelling/check-spelling@v0.0.21
|
||||||
|
with:
|
||||||
|
checkout: true
|
||||||
|
spell_check_this: check-spelling/spell-check-this@prerelease
|
||||||
|
task: ${{ needs.spelling.outputs.followup }}
|
||||||
@@ -701,6 +701,7 @@ void Terminal::_AdjustCursorPosition(const COORD proposedPosition)
|
|||||||
|
|
||||||
if (notifyScroll)
|
if (notifyScroll)
|
||||||
{
|
{
|
||||||
|
// TODO: don't do this, thanks migrie
|
||||||
_buffer->GetRenderTarget().TriggerRedrawAll();
|
_buffer->GetRenderTarget().TriggerRedrawAll();
|
||||||
_NotifyScrollEvent();
|
_NotifyScrollEvent();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
#include "til/some.h"
|
#include "til/some.h"
|
||||||
#include "til/size.h"
|
#include "til/size.h"
|
||||||
#include "til/point.h"
|
#include "til/point.h"
|
||||||
#include "til/rectangle.h"
|
|
||||||
#include "til/operators.h"
|
#include "til/operators.h"
|
||||||
|
#include "til/rectangle.h"
|
||||||
#include "til/bitmap.h"
|
#include "til/bitmap.h"
|
||||||
#include "til/u8u16convert.h"
|
#include "til/u8u16convert.h"
|
||||||
|
|
||||||
|
|||||||
@@ -285,7 +285,8 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
|
|||||||
|
|
||||||
for (const auto pt : rc)
|
for (const auto pt : rc)
|
||||||
{
|
{
|
||||||
til::at(_bits, _rc.index_of(pt)) = true;
|
auto idx = _rc.index_of(pt);
|
||||||
|
til::at(_bits, idx) = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_dirty |= rc;
|
_dirty |= rc;
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "rectangle.h"
|
|
||||||
#include "size.h"
|
|
||||||
#include "bitmap.h"
|
|
||||||
|
|
||||||
namespace til // Terminal Implementation Library. Also: "Today I Learned"
|
namespace til // Terminal Implementation Library. Also: "Today I Learned"
|
||||||
{
|
{
|
||||||
// Operators go here when they involve two headers that can't/don't include each other.
|
// Operators go here when they involve two headers that can't/don't include each other.
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "point.h"
|
|
||||||
#include "size.h"
|
|
||||||
#include "some.h"
|
|
||||||
|
|
||||||
#ifdef UNIT_TESTING
|
#ifdef UNIT_TESTING
|
||||||
class RectangleTests;
|
class RectangleTests;
|
||||||
#endif
|
#endif
|
||||||
@@ -636,6 +632,32 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MUL will scale the entire rectangle up by the size factor
|
||||||
|
rectangle operator*(const size& size)
|
||||||
|
{
|
||||||
|
auto topLeft = _topLeft;
|
||||||
|
auto bottomRight = _bottomRight;
|
||||||
|
topLeft = topLeft * size;
|
||||||
|
bottomRight = bottomRight * size;
|
||||||
|
return til::rectangle{ topLeft, bottomRight };
|
||||||
|
}
|
||||||
|
|
||||||
|
// DIV will scale the entire rectangle down by the size factor,
|
||||||
|
// but rounds the bottom-right corner out.
|
||||||
|
rectangle operator/(const size& size)
|
||||||
|
{
|
||||||
|
auto topLeft = _topLeft;
|
||||||
|
auto bottomRight = _bottomRight;
|
||||||
|
topLeft = topLeft / size;
|
||||||
|
|
||||||
|
// Move bottom right point into a size
|
||||||
|
// Use size specialization of divide_ceil to round up against the size given.
|
||||||
|
// Add leading addition to point to convert it back into a point.
|
||||||
|
bottomRight = til::point{} + til::size{ right(), bottom() }.divide_ceil(size);
|
||||||
|
|
||||||
|
return til::rectangle{ topLeft, bottomRight };
|
||||||
|
}
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
constexpr ptrdiff_t top() const noexcept
|
constexpr ptrdiff_t top() const noexcept
|
||||||
|
|||||||
@@ -65,9 +65,8 @@ using namespace Microsoft::Console::Types;
|
|||||||
// TODO GH 2683: The default constructor should not throw.
|
// TODO GH 2683: The default constructor should not throw.
|
||||||
DxEngine::DxEngine() :
|
DxEngine::DxEngine() :
|
||||||
RenderEngineBase(),
|
RenderEngineBase(),
|
||||||
_isInvalidUsed{ false },
|
_invalidMap{},
|
||||||
_invalidRect{ 0 },
|
_invalidScroll{},
|
||||||
_invalidScroll{ 0 },
|
|
||||||
_presentParams{ 0 },
|
_presentParams{ 0 },
|
||||||
_presentReady{ false },
|
_presentReady{ false },
|
||||||
_presentScroll{ 0 },
|
_presentScroll{ 0 },
|
||||||
@@ -75,16 +74,16 @@ DxEngine::DxEngine() :
|
|||||||
_presentOffset{ 0 },
|
_presentOffset{ 0 },
|
||||||
_isEnabled{ false },
|
_isEnabled{ false },
|
||||||
_isPainting{ false },
|
_isPainting{ false },
|
||||||
_displaySizePixels{ 0 },
|
_displaySizePixels{},
|
||||||
_foregroundColor{ 0 },
|
_foregroundColor{ 0 },
|
||||||
_backgroundColor{ 0 },
|
_backgroundColor{ 0 },
|
||||||
_selectionBackground{},
|
_selectionBackground{},
|
||||||
_glyphCell{ 0 },
|
_glyphCell{},
|
||||||
_haveDeviceResources{ false },
|
_haveDeviceResources{ false },
|
||||||
_retroTerminalEffects{ false },
|
_retroTerminalEffects{ false },
|
||||||
_antialiasingMode{ D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE },
|
_antialiasingMode{ D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE },
|
||||||
_hwndTarget{ static_cast<HWND>(INVALID_HANDLE_VALUE) },
|
_hwndTarget{ static_cast<HWND>(INVALID_HANDLE_VALUE) },
|
||||||
_sizeTarget{ 0 },
|
_sizeTarget{},
|
||||||
_dpi{ USER_DEFAULT_SCREEN_DPI },
|
_dpi{ USER_DEFAULT_SCREEN_DPI },
|
||||||
_scale{ 1.0f },
|
_scale{ 1.0f },
|
||||||
_chainMode{ SwapChainMode::ForComposition },
|
_chainMode{ SwapChainMode::ForComposition },
|
||||||
@@ -238,8 +237,8 @@ HRESULT DxEngine::_SetupTerminalEffects()
|
|||||||
|
|
||||||
// Setup the viewport.
|
// Setup the viewport.
|
||||||
D3D11_VIEWPORT vp;
|
D3D11_VIEWPORT vp;
|
||||||
vp.Width = static_cast<FLOAT>(_displaySizePixels.cx);
|
vp.Width = _displaySizePixels.width<float>();
|
||||||
vp.Height = static_cast<FLOAT>(_displaySizePixels.cy);
|
vp.Height = _displaySizePixels.height<float>();
|
||||||
vp.MinDepth = 0.0f;
|
vp.MinDepth = 0.0f;
|
||||||
vp.MaxDepth = 1.0f;
|
vp.MaxDepth = 1.0f;
|
||||||
vp.TopLeftX = 0;
|
vp.TopLeftX = 0;
|
||||||
@@ -370,7 +369,7 @@ void DxEngine::_ComputePixelShaderSettings() noexcept
|
|||||||
// You can find out how to install it here:
|
// You can find out how to install it here:
|
||||||
// https://docs.microsoft.com/en-us/windows/uwp/gaming/use-the-directx-runtime-and-visual-studio-graphics-diagnostic-features
|
// https://docs.microsoft.com/en-us/windows/uwp/gaming/use-the-directx-runtime-and-visual-studio-graphics-diagnostic-features
|
||||||
// clang-format on
|
// clang-format on
|
||||||
// D3D11_CREATE_DEVICE_DEBUG |
|
D3D11_CREATE_DEVICE_DEBUG |
|
||||||
D3D11_CREATE_DEVICE_SINGLETHREADED;
|
D3D11_CREATE_DEVICE_SINGLETHREADED;
|
||||||
|
|
||||||
const std::array<D3D_FEATURE_LEVEL, 5> FeatureLevels{ D3D_FEATURE_LEVEL_11_1,
|
const std::array<D3D_FEATURE_LEVEL, 5> FeatureLevels{ D3D_FEATURE_LEVEL_11_1,
|
||||||
@@ -424,8 +423,7 @@ void DxEngine::_ComputePixelShaderSettings() noexcept
|
|||||||
{
|
{
|
||||||
switch (_chainMode)
|
switch (_chainMode)
|
||||||
{
|
{
|
||||||
case SwapChainMode::ForHwnd:
|
case SwapChainMode::ForHwnd: {
|
||||||
{
|
|
||||||
// use the HWND's dimensions for the swap chain dimensions.
|
// use the HWND's dimensions for the swap chain dimensions.
|
||||||
RECT rect = { 0 };
|
RECT rect = { 0 };
|
||||||
RETURN_IF_WIN32_BOOL_FALSE(GetClientRect(_hwndTarget, &rect));
|
RETURN_IF_WIN32_BOOL_FALSE(GetClientRect(_hwndTarget, &rect));
|
||||||
@@ -454,11 +452,10 @@ void DxEngine::_ComputePixelShaderSettings() noexcept
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SwapChainMode::ForComposition:
|
case SwapChainMode::ForComposition: {
|
||||||
{
|
|
||||||
// Use the given target size for compositions.
|
// Use the given target size for compositions.
|
||||||
SwapChainDesc.Width = _displaySizePixels.cx;
|
SwapChainDesc.Width = _displaySizePixels.width<UINT>();
|
||||||
SwapChainDesc.Height = _displaySizePixels.cy;
|
SwapChainDesc.Height = _displaySizePixels.height<UINT>();
|
||||||
|
|
||||||
// We're doing advanced composition pretty much for the purpose of pretty alpha, so turn it on.
|
// We're doing advanced composition pretty much for the purpose of pretty alpha, so turn it on.
|
||||||
SwapChainDesc.AlphaMode = DXGI_ALPHA_MODE_PREMULTIPLIED;
|
SwapChainDesc.AlphaMode = DXGI_ALPHA_MODE_PREMULTIPLIED;
|
||||||
@@ -633,8 +630,8 @@ void DxEngine::_ReleaseDeviceResources() noexcept
|
|||||||
return _dwriteFactory->CreateTextLayout(string,
|
return _dwriteFactory->CreateTextLayout(string,
|
||||||
gsl::narrow<UINT32>(stringLength),
|
gsl::narrow<UINT32>(stringLength),
|
||||||
_dwriteTextFormat.Get(),
|
_dwriteTextFormat.Get(),
|
||||||
gsl::narrow<float>(_displaySizePixels.cx),
|
_displaySizePixels.width<float>(),
|
||||||
_glyphCell.cy != 0 ? _glyphCell.cy : gsl::narrow<float>(_displaySizePixels.cy),
|
_glyphCell.height() != 0 ? _glyphCell.height<float>() : _displaySizePixels.height<float>(),
|
||||||
ppTextLayout);
|
ppTextLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -655,9 +652,7 @@ void DxEngine::_ReleaseDeviceResources() noexcept
|
|||||||
[[nodiscard]] HRESULT DxEngine::SetWindowSize(const SIZE Pixels) noexcept
|
[[nodiscard]] HRESULT DxEngine::SetWindowSize(const SIZE Pixels) noexcept
|
||||||
{
|
{
|
||||||
_sizeTarget = Pixels;
|
_sizeTarget = Pixels;
|
||||||
|
_invalidMap.resize(_sizeTarget / _glyphCell, true);
|
||||||
RETURN_IF_FAILED(InvalidateAll());
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -691,7 +686,8 @@ Microsoft::WRL::ComPtr<IDXGISwapChain1> DxEngine::GetSwapChain()
|
|||||||
{
|
{
|
||||||
RETURN_HR_IF_NULL(E_INVALIDARG, psrRegion);
|
RETURN_HR_IF_NULL(E_INVALIDARG, psrRegion);
|
||||||
|
|
||||||
_InvalidOr(*psrRegion);
|
_invalidMap.set(Viewport::FromExclusive(*psrRegion).ToInclusive());
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -705,8 +701,9 @@ Microsoft::WRL::ComPtr<IDXGISwapChain1> DxEngine::GetSwapChain()
|
|||||||
{
|
{
|
||||||
RETURN_HR_IF_NULL(E_INVALIDARG, pcoordCursor);
|
RETURN_HR_IF_NULL(E_INVALIDARG, pcoordCursor);
|
||||||
|
|
||||||
const SMALL_RECT sr = Microsoft::Console::Types::Viewport::FromCoord(*pcoordCursor).ToInclusive();
|
_invalidMap.set(*pcoordCursor);
|
||||||
return Invalidate(&sr);
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Routine Description:
|
// Routine Description:
|
||||||
@@ -716,13 +713,17 @@ Microsoft::WRL::ComPtr<IDXGISwapChain1> DxEngine::GetSwapChain()
|
|||||||
// Return Value:
|
// Return Value:
|
||||||
// - S_OK
|
// - S_OK
|
||||||
[[nodiscard]] HRESULT DxEngine::InvalidateSystem(const RECT* const prcDirtyClient) noexcept
|
[[nodiscard]] HRESULT DxEngine::InvalidateSystem(const RECT* const prcDirtyClient) noexcept
|
||||||
|
try
|
||||||
{
|
{
|
||||||
RETURN_HR_IF_NULL(E_INVALIDARG, prcDirtyClient);
|
RETURN_HR_IF_NULL(E_INVALIDARG, prcDirtyClient);
|
||||||
|
|
||||||
_InvalidOr(*prcDirtyClient);
|
// Dirty client is in pixels. Use divide specialization against glyph factor to make conversion
|
||||||
|
// to cells.
|
||||||
|
_invalidMap.set(til::rectangle{ *prcDirtyClient } / _glyphCell);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
CATCH_RETURN();
|
||||||
|
|
||||||
// Routine Description:
|
// Routine Description:
|
||||||
// - Invalidates a series of character rectangles
|
// - Invalidates a series of character rectangles
|
||||||
@@ -748,50 +749,24 @@ Microsoft::WRL::ComPtr<IDXGISwapChain1> DxEngine::GetSwapChain()
|
|||||||
// Return Value:
|
// Return Value:
|
||||||
// - S_OK
|
// - S_OK
|
||||||
[[nodiscard]] HRESULT DxEngine::InvalidateScroll(const COORD* const pcoordDelta) noexcept
|
[[nodiscard]] HRESULT DxEngine::InvalidateScroll(const COORD* const pcoordDelta) noexcept
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (pcoordDelta->X != 0 || pcoordDelta->Y != 0)
|
const til::point deltaCells{ *pcoordDelta };
|
||||||
|
|
||||||
|
if (deltaCells != til::point{ 0, 0 })
|
||||||
{
|
{
|
||||||
try
|
const til::point deltaPixels = deltaCells * _glyphCell;
|
||||||
{
|
|
||||||
POINT delta = { 0 };
|
|
||||||
delta.x = pcoordDelta->X * _glyphCell.cx;
|
|
||||||
delta.y = pcoordDelta->Y * _glyphCell.cy;
|
|
||||||
|
|
||||||
_InvalidOffset(delta);
|
// Shift the contents of the map and fill in revealed area.
|
||||||
|
_invalidMap.translate(deltaCells, true);
|
||||||
|
|
||||||
_invalidScroll.cx += delta.x;
|
// TODO: should we just maintain it all in cells?
|
||||||
_invalidScroll.cy += delta.y;
|
_invalidScroll += deltaPixels;
|
||||||
|
|
||||||
// Add the revealed portion of the screen from the scroll to the invalid area.
|
|
||||||
const RECT display = _GetDisplayRect();
|
|
||||||
RECT reveal = display;
|
|
||||||
|
|
||||||
// X delta first
|
|
||||||
OffsetRect(&reveal, delta.x, 0);
|
|
||||||
IntersectRect(&reveal, &reveal, &display);
|
|
||||||
SubtractRect(&reveal, &display, &reveal);
|
|
||||||
|
|
||||||
if (!IsRectEmpty(&reveal))
|
|
||||||
{
|
|
||||||
_InvalidOr(reveal);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Y delta second (subtract rect won't work if you move both)
|
|
||||||
reveal = display;
|
|
||||||
OffsetRect(&reveal, 0, delta.y);
|
|
||||||
IntersectRect(&reveal, &reveal, &display);
|
|
||||||
SubtractRect(&reveal, &display, &reveal);
|
|
||||||
|
|
||||||
if (!IsRectEmpty(&reveal))
|
|
||||||
{
|
|
||||||
_InvalidOr(reveal);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CATCH_RETURN();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
CATCH_RETURN();
|
||||||
|
|
||||||
// Routine Description:
|
// Routine Description:
|
||||||
// - Invalidates the entire window area
|
// - Invalidates the entire window area
|
||||||
@@ -800,12 +775,12 @@ Microsoft::WRL::ComPtr<IDXGISwapChain1> DxEngine::GetSwapChain()
|
|||||||
// Return Value:
|
// Return Value:
|
||||||
// - S_OK
|
// - S_OK
|
||||||
[[nodiscard]] HRESULT DxEngine::InvalidateAll() noexcept
|
[[nodiscard]] HRESULT DxEngine::InvalidateAll() noexcept
|
||||||
|
try
|
||||||
{
|
{
|
||||||
const RECT screen = _GetDisplayRect();
|
_invalidMap.set_all();
|
||||||
_InvalidOr(screen);
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
CATCH_RETURN();
|
||||||
|
|
||||||
// Routine Description:
|
// Routine Description:
|
||||||
// - This currently has no effect in this renderer.
|
// - This currently has no effect in this renderer.
|
||||||
@@ -827,23 +802,17 @@ Microsoft::WRL::ComPtr<IDXGISwapChain1> DxEngine::GetSwapChain()
|
|||||||
// - <none>
|
// - <none>
|
||||||
// Return Value:
|
// Return Value:
|
||||||
// - X by Y area in pixels of the surface
|
// - X by Y area in pixels of the surface
|
||||||
[[nodiscard]] SIZE DxEngine::_GetClientSize() const noexcept
|
[[nodiscard]] til::size DxEngine::_GetClientSize() const noexcept
|
||||||
{
|
{
|
||||||
switch (_chainMode)
|
switch (_chainMode)
|
||||||
{
|
{
|
||||||
case SwapChainMode::ForHwnd:
|
case SwapChainMode::ForHwnd: {
|
||||||
{
|
|
||||||
RECT clientRect = { 0 };
|
RECT clientRect = { 0 };
|
||||||
LOG_IF_WIN32_BOOL_FALSE(GetClientRect(_hwndTarget, &clientRect));
|
LOG_IF_WIN32_BOOL_FALSE(GetClientRect(_hwndTarget, &clientRect));
|
||||||
|
|
||||||
SIZE clientSize = { 0 };
|
return til::rectangle{ clientRect }.size();
|
||||||
clientSize.cx = clientRect.right - clientRect.left;
|
|
||||||
clientSize.cy = clientRect.bottom - clientRect.top;
|
|
||||||
|
|
||||||
return clientSize;
|
|
||||||
}
|
}
|
||||||
case SwapChainMode::ForComposition:
|
case SwapChainMode::ForComposition: {
|
||||||
{
|
|
||||||
SIZE size = _sizeTarget;
|
SIZE size = _sizeTarget;
|
||||||
size.cx = static_cast<LONG>(size.cx * _scale);
|
size.cx = static_cast<LONG>(size.cx * _scale);
|
||||||
size.cy = static_cast<LONG>(size.cy * _scale);
|
size.cy = static_cast<LONG>(size.cy * _scale);
|
||||||
@@ -870,90 +839,6 @@ void _ScaleByFont(RECT& cellsToPixels, SIZE fontSize) noexcept
|
|||||||
cellsToPixels.bottom *= fontSize.cy;
|
cellsToPixels.bottom *= fontSize.cy;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Routine Description:
|
|
||||||
// - Retrieves a rectangle representation of the pixel size of the
|
|
||||||
// surface we are drawing on
|
|
||||||
// Arguments:
|
|
||||||
// - <none>
|
|
||||||
// Return Value;
|
|
||||||
// - Origin-placed rectangle representing the pixel size of the surface
|
|
||||||
[[nodiscard]] RECT DxEngine::_GetDisplayRect() const noexcept
|
|
||||||
{
|
|
||||||
return { 0, 0, _displaySizePixels.cx, _displaySizePixels.cy };
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine Description:
|
|
||||||
// - Helper to shift the existing dirty rectangle by a pixel offset
|
|
||||||
// and crop it to still be within the bounds of the display surface
|
|
||||||
// Arguments:
|
|
||||||
// - delta - Adjustment distance in pixels
|
|
||||||
// - -Y is up, Y is down, -X is left, X is right.
|
|
||||||
// Return Value:
|
|
||||||
// - <none>
|
|
||||||
void DxEngine::_InvalidOffset(POINT delta)
|
|
||||||
{
|
|
||||||
if (_isInvalidUsed)
|
|
||||||
{
|
|
||||||
// Copy the existing invalid rect
|
|
||||||
RECT invalidNew = _invalidRect;
|
|
||||||
|
|
||||||
// Offset it to the new position
|
|
||||||
THROW_IF_WIN32_BOOL_FALSE(OffsetRect(&invalidNew, delta.x, delta.y));
|
|
||||||
|
|
||||||
// Get the rect representing the display
|
|
||||||
const RECT rectScreen = _GetDisplayRect();
|
|
||||||
|
|
||||||
// Ensure that the new invalid rectangle is still on the display
|
|
||||||
IntersectRect(&invalidNew, &invalidNew, &rectScreen);
|
|
||||||
|
|
||||||
_invalidRect = invalidNew;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine description:
|
|
||||||
// - Adds the given character rectangle to the total dirty region
|
|
||||||
// - Will scale internally to pixels based on the current font.
|
|
||||||
// Arguments:
|
|
||||||
// - sr - character rectangle
|
|
||||||
// Return Value:
|
|
||||||
// - <none>
|
|
||||||
void DxEngine::_InvalidOr(SMALL_RECT sr) noexcept
|
|
||||||
{
|
|
||||||
RECT region;
|
|
||||||
region.left = sr.Left;
|
|
||||||
region.top = sr.Top;
|
|
||||||
region.right = sr.Right;
|
|
||||||
region.bottom = sr.Bottom;
|
|
||||||
_ScaleByFont(region, _glyphCell);
|
|
||||||
|
|
||||||
region.right += _glyphCell.cx;
|
|
||||||
region.bottom += _glyphCell.cy;
|
|
||||||
|
|
||||||
_InvalidOr(region);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine Description:
|
|
||||||
// - Adds the given pixel rectangle to the total dirty region
|
|
||||||
// Arguments:
|
|
||||||
// - rc - Dirty pixel rectangle
|
|
||||||
// Return Value:
|
|
||||||
// - <none>
|
|
||||||
void DxEngine::_InvalidOr(RECT rc) noexcept
|
|
||||||
{
|
|
||||||
if (_isInvalidUsed)
|
|
||||||
{
|
|
||||||
UnionRect(&_invalidRect, &_invalidRect, &rc);
|
|
||||||
|
|
||||||
const RECT rcScreen = _GetDisplayRect();
|
|
||||||
IntersectRect(&_invalidRect, &_invalidRect, &rcScreen);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_invalidRect = rc;
|
|
||||||
_isInvalidUsed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine Description:
|
// Routine Description:
|
||||||
// - This is unused by this renderer.
|
// - This is unused by this renderer.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
@@ -976,24 +861,19 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
// - Any DirectX error, a memory error, etc.
|
// - Any DirectX error, a memory error, etc.
|
||||||
[[nodiscard]] HRESULT DxEngine::StartPaint() noexcept
|
[[nodiscard]] HRESULT DxEngine::StartPaint() noexcept
|
||||||
{
|
{
|
||||||
FAIL_FAST_IF_FAILED(InvalidateAll());
|
|
||||||
RETURN_HR_IF(E_NOT_VALID_STATE, _isPainting); // invalid to start a paint while painting.
|
RETURN_HR_IF(E_NOT_VALID_STATE, _isPainting); // invalid to start a paint while painting.
|
||||||
|
|
||||||
|
if (TraceLoggingProviderEnabled(g_hDxRenderProvider, WINEVENT_LEVEL_VERBOSE, 0))
|
||||||
|
{
|
||||||
|
const auto invalidatedStr = _invalidMap.to_string();
|
||||||
|
const auto invalidated = invalidatedStr.c_str();
|
||||||
|
|
||||||
#pragma warning(suppress : 26477 26485 26494 26482 26446 26447) // We don't control TraceLoggingWrite
|
#pragma warning(suppress : 26477 26485 26494 26482 26446 26447) // We don't control TraceLoggingWrite
|
||||||
TraceLoggingWrite(g_hDxRenderProvider,
|
TraceLoggingWrite(g_hDxRenderProvider,
|
||||||
"Invalid",
|
"Invalid",
|
||||||
TraceLoggingInt32(_invalidRect.bottom - _invalidRect.top, "InvalidHeight"),
|
TraceLoggingWideString(invalidated),
|
||||||
TraceLoggingInt32((_invalidRect.bottom - _invalidRect.top) / _glyphCell.cy, "InvalidHeightChars"),
|
TraceLoggingLevel(WINEVENT_LEVEL_VERBOSE));
|
||||||
TraceLoggingInt32(_invalidRect.right - _invalidRect.left, "InvalidWidth"),
|
}
|
||||||
TraceLoggingInt32((_invalidRect.right - _invalidRect.left) / _glyphCell.cx, "InvalidWidthChars"),
|
|
||||||
TraceLoggingInt32(_invalidRect.left, "InvalidX"),
|
|
||||||
TraceLoggingInt32(_invalidRect.left / _glyphCell.cx, "InvalidXChars"),
|
|
||||||
TraceLoggingInt32(_invalidRect.top, "InvalidY"),
|
|
||||||
TraceLoggingInt32(_invalidRect.top / _glyphCell.cy, "InvalidYChars"),
|
|
||||||
TraceLoggingInt32(_invalidScroll.cx, "ScrollWidth"),
|
|
||||||
TraceLoggingInt32(_invalidScroll.cx / _glyphCell.cx, "ScrollWidthChars"),
|
|
||||||
TraceLoggingInt32(_invalidScroll.cy, "ScrollHeight"),
|
|
||||||
TraceLoggingInt32(_invalidScroll.cy / _glyphCell.cy, "ScrollHeightChars"));
|
|
||||||
|
|
||||||
if (_isEnabled)
|
if (_isEnabled)
|
||||||
{
|
{
|
||||||
@@ -1004,8 +884,7 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
{
|
{
|
||||||
RETURN_IF_FAILED(_CreateDeviceResources(true));
|
RETURN_IF_FAILED(_CreateDeviceResources(true));
|
||||||
}
|
}
|
||||||
else if (_displaySizePixels.cy != clientSize.cy ||
|
else if (_displaySizePixels != clientSize)
|
||||||
_displaySizePixels.cx != clientSize.cx)
|
|
||||||
{
|
{
|
||||||
// OK, we're going to play a dangerous game here for the sake of optimizing resize
|
// OK, we're going to play a dangerous game here for the sake of optimizing resize
|
||||||
// First, set up a complete clear of all device resources if something goes terribly wrong.
|
// First, set up a complete clear of all device resources if something goes terribly wrong.
|
||||||
@@ -1018,7 +897,7 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
_d2dRenderTarget.Reset();
|
_d2dRenderTarget.Reset();
|
||||||
|
|
||||||
// Change the buffer size and recreate the render target (and surface)
|
// Change the buffer size and recreate the render target (and surface)
|
||||||
RETURN_IF_FAILED(_dxgiSwapChain->ResizeBuffers(2, clientSize.cx, clientSize.cy, DXGI_FORMAT_B8G8R8A8_UNORM, 0));
|
RETURN_IF_FAILED(_dxgiSwapChain->ResizeBuffers(2, clientSize.width<UINT>(), clientSize.height<UINT>(), DXGI_FORMAT_B8G8R8A8_UNORM, 0));
|
||||||
RETURN_IF_FAILED(_PrepareRenderTarget());
|
RETURN_IF_FAILED(_PrepareRenderTarget());
|
||||||
|
|
||||||
// OK we made it past the parts that can cause errors. We can release our failure handler.
|
// OK we made it past the parts that can cause errors. We can release our failure handler.
|
||||||
@@ -1044,6 +923,7 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
// Return Value:
|
// Return Value:
|
||||||
// - Any DirectX error, a memory error, etc.
|
// - Any DirectX error, a memory error, etc.
|
||||||
[[nodiscard]] HRESULT DxEngine::EndPaint() noexcept
|
[[nodiscard]] HRESULT DxEngine::EndPaint() noexcept
|
||||||
|
try
|
||||||
{
|
{
|
||||||
RETURN_HR_IF(E_INVALIDARG, !_isPainting); // invalid to end paint when we're not painting
|
RETURN_HR_IF(E_INVALIDARG, !_isPainting); // invalid to end paint when we're not painting
|
||||||
|
|
||||||
@@ -1057,21 +937,33 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
if (_invalidScroll.cy != 0 || _invalidScroll.cx != 0)
|
if (_invalidScroll != til::point{ 0, 0 })
|
||||||
{
|
{
|
||||||
_presentDirty = _invalidRect;
|
// Copy `til::rectangles` into RECT map.
|
||||||
|
_presentDirty.assign(_invalidMap.begin(), _invalidMap.end());
|
||||||
|
|
||||||
const RECT display = _GetDisplayRect();
|
// The scroll rect is the entire screen minus the revealed areas.
|
||||||
SubtractRect(&_presentScroll, &display, &_presentDirty);
|
// Get the entire screen into a rectangle.
|
||||||
_presentOffset.x = _invalidScroll.cx;
|
til::rectangle scrollArea{ _displaySizePixels };
|
||||||
_presentOffset.y = _invalidScroll.cy;
|
|
||||||
|
|
||||||
_presentParams.DirtyRectsCount = 1;
|
// Reduce the size of the rectangle by the scroll.
|
||||||
_presentParams.pDirtyRects = &_presentDirty;
|
scrollArea -= til::size{} - _invalidScroll;
|
||||||
|
|
||||||
|
// Assign the area to the present storage
|
||||||
|
_presentScroll = scrollArea;
|
||||||
|
|
||||||
|
// Pass the offset.
|
||||||
|
_presentOffset = _invalidScroll;
|
||||||
|
|
||||||
|
// Now fill up the parameters structure from the member variables.
|
||||||
|
_presentParams.DirtyRectsCount = gsl::narrow<UINT>(_presentDirty.size());
|
||||||
|
_presentParams.pDirtyRects = _presentDirty.data();
|
||||||
|
|
||||||
_presentParams.pScrollOffset = &_presentOffset;
|
_presentParams.pScrollOffset = &_presentOffset;
|
||||||
_presentParams.pScrollRect = &_presentScroll;
|
_presentParams.pScrollRect = &_presentScroll;
|
||||||
|
|
||||||
|
// The scroll rect will be empty if we scrolled >= 1 full screen size.
|
||||||
|
// Present1 doesn't like that. So clear it out. Everything will be dirty anyway.
|
||||||
if (IsRectEmpty(&_presentScroll))
|
if (IsRectEmpty(&_presentScroll))
|
||||||
{
|
{
|
||||||
_presentParams.pScrollRect = nullptr;
|
_presentParams.pScrollRect = nullptr;
|
||||||
@@ -1088,13 +980,13 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_invalidRect = { 0 };
|
_invalidMap.reset_all();
|
||||||
_isInvalidUsed = false;
|
|
||||||
|
|
||||||
_invalidScroll = { 0 };
|
_invalidScroll = {};
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
CATCH_RETURN()
|
||||||
|
|
||||||
// Routine Description:
|
// Routine Description:
|
||||||
// - Copies the front surface of the swap chain (the one being displayed)
|
// - Copies the front surface of the swap chain (the one being displayed)
|
||||||
@@ -1146,8 +1038,8 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
{
|
{
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
|
|
||||||
hr = _dxgiSwapChain->Present(1, 0);
|
/*hr = _dxgiSwapChain->Present(1, 0);*/
|
||||||
/*hr = _dxgiSwapChain->Present1(1, 0, &_presentParams);*/
|
hr = _dxgiSwapChain->Present1(1, 0, &_presentParams);
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
@@ -1166,7 +1058,7 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
RETURN_IF_FAILED(_CopyFrontToBack());
|
RETURN_IF_FAILED(_CopyFrontToBack());
|
||||||
_presentReady = false;
|
_presentReady = false;
|
||||||
|
|
||||||
_presentDirty = { 0 };
|
_presentDirty.clear();
|
||||||
_presentOffset = { 0 };
|
_presentOffset = { 0 };
|
||||||
_presentScroll = { 0 };
|
_presentScroll = { 0 };
|
||||||
_presentParams = { 0 };
|
_presentParams = { 0 };
|
||||||
@@ -1196,21 +1088,19 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
// - S_OK
|
// - S_OK
|
||||||
[[nodiscard]] HRESULT DxEngine::PaintBackground() noexcept
|
[[nodiscard]] HRESULT DxEngine::PaintBackground() noexcept
|
||||||
{
|
{
|
||||||
switch (_chainMode)
|
D2D1_COLOR_F nothing = { 0 };
|
||||||
{
|
|
||||||
case SwapChainMode::ForHwnd:
|
|
||||||
_d2dRenderTarget->FillRectangle(D2D1::RectF(static_cast<float>(_invalidRect.left),
|
|
||||||
static_cast<float>(_invalidRect.top),
|
|
||||||
static_cast<float>(_invalidRect.right),
|
|
||||||
static_cast<float>(_invalidRect.bottom)),
|
|
||||||
_d2dBrushBackground.Get());
|
|
||||||
break;
|
|
||||||
case SwapChainMode::ForComposition:
|
|
||||||
D2D1_COLOR_F nothing = { 0 };
|
|
||||||
|
|
||||||
|
// Runs are counts of cells.
|
||||||
|
// Use a transform by the size of one cell to convert cells-to-pixels
|
||||||
|
// as we clear.
|
||||||
|
_d2dRenderTarget->SetTransform(D2D1::Matrix3x2F::Scale(_glyphCell));
|
||||||
|
for (const auto rect : _invalidMap.runs())
|
||||||
|
{
|
||||||
|
_d2dRenderTarget->PushAxisAlignedClip(rect, D2D1_ANTIALIAS_MODE_ALIASED);
|
||||||
_d2dRenderTarget->Clear(nothing);
|
_d2dRenderTarget->Clear(nothing);
|
||||||
break;
|
_d2dRenderTarget->PopAxisAlignedClip();
|
||||||
}
|
}
|
||||||
|
_d2dRenderTarget->SetTransform(D2D1::Matrix3x2F::Identity());
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@@ -1231,9 +1121,7 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Calculate positioning of our origin.
|
// Calculate positioning of our origin.
|
||||||
D2D1_POINT_2F origin;
|
D2D1_POINT_2F origin = til::point{ coord } * _glyphCell;
|
||||||
origin.x = static_cast<float>(coord.X * _glyphCell.cx);
|
|
||||||
origin.y = static_cast<float>(coord.Y * _glyphCell.cy);
|
|
||||||
|
|
||||||
// Create the text layout
|
// Create the text layout
|
||||||
CustomTextLayout layout(_dwriteFactory.Get(),
|
CustomTextLayout layout(_dwriteFactory.Get(),
|
||||||
@@ -1241,7 +1129,7 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
_dwriteTextFormat.Get(),
|
_dwriteTextFormat.Get(),
|
||||||
_dwriteFontFace.Get(),
|
_dwriteFontFace.Get(),
|
||||||
clusters,
|
clusters,
|
||||||
_glyphCell.cx);
|
_glyphCell.width());
|
||||||
|
|
||||||
// Get the baseline for this font as that's where we draw from
|
// Get the baseline for this font as that's where we draw from
|
||||||
DWRITE_LINE_SPACING spacing;
|
DWRITE_LINE_SPACING spacing;
|
||||||
@@ -1253,7 +1141,7 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
_d2dBrushBackground.Get(),
|
_d2dBrushBackground.Get(),
|
||||||
_dwriteFactory.Get(),
|
_dwriteFactory.Get(),
|
||||||
spacing,
|
spacing,
|
||||||
D2D1::SizeF(gsl::narrow<FLOAT>(_glyphCell.cx), gsl::narrow<FLOAT>(_glyphCell.cy)),
|
_glyphCell,
|
||||||
D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT);
|
D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT);
|
||||||
|
|
||||||
// Layout then render the text
|
// Layout then render the text
|
||||||
@@ -1284,10 +1172,8 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
|
|
||||||
_d2dBrushForeground->SetColor(_ColorFFromColorRef(color));
|
_d2dBrushForeground->SetColor(_ColorFFromColorRef(color));
|
||||||
|
|
||||||
const auto font = _GetFontSize();
|
const auto font = _glyphCell;
|
||||||
D2D_POINT_2F target;
|
D2D_POINT_2F target = til::point{ coordTarget } * font;
|
||||||
target.x = static_cast<float>(coordTarget.X) * font.X;
|
|
||||||
target.y = static_cast<float>(coordTarget.Y) * font.Y;
|
|
||||||
|
|
||||||
D2D_POINT_2F start = { 0 };
|
D2D_POINT_2F start = { 0 };
|
||||||
D2D_POINT_2F end = { 0 };
|
D2D_POINT_2F end = { 0 };
|
||||||
@@ -1300,7 +1186,7 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
if (lines & GridLines::Top)
|
if (lines & GridLines::Top)
|
||||||
{
|
{
|
||||||
end = start;
|
end = start;
|
||||||
end.x += font.X;
|
end.x += font.width();
|
||||||
|
|
||||||
_d2dRenderTarget->DrawLine(start, end, _d2dBrushForeground.Get(), 1.0f, _strokeStyle.Get());
|
_d2dRenderTarget->DrawLine(start, end, _d2dBrushForeground.Get(), 1.0f, _strokeStyle.Get());
|
||||||
}
|
}
|
||||||
@@ -1308,7 +1194,7 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
if (lines & GridLines::Left)
|
if (lines & GridLines::Left)
|
||||||
{
|
{
|
||||||
end = start;
|
end = start;
|
||||||
end.y += font.Y;
|
end.y += font.height();
|
||||||
|
|
||||||
_d2dRenderTarget->DrawLine(start, end, _d2dBrushForeground.Get(), 1.0f, _strokeStyle.Get());
|
_d2dRenderTarget->DrawLine(start, end, _d2dBrushForeground.Get(), 1.0f, _strokeStyle.Get());
|
||||||
}
|
}
|
||||||
@@ -1321,28 +1207,28 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
// The top right corner inclusive is at 7,0 which is X (0) + Font Height (8) - 1 = 7.
|
// The top right corner inclusive is at 7,0 which is X (0) + Font Height (8) - 1 = 7.
|
||||||
|
|
||||||
// 0.5 pixel offset for crisp lines; -0.5 on the Y to fit _in_ the cell, not outside it.
|
// 0.5 pixel offset for crisp lines; -0.5 on the Y to fit _in_ the cell, not outside it.
|
||||||
start = { target.x + 0.5f, target.y + font.Y - 0.5f };
|
start = { target.x + 0.5f, target.y + font.height() - 0.5f };
|
||||||
|
|
||||||
if (lines & GridLines::Bottom)
|
if (lines & GridLines::Bottom)
|
||||||
{
|
{
|
||||||
end = start;
|
end = start;
|
||||||
end.x += font.X - 1.f;
|
end.x += font.width() - 1.f;
|
||||||
|
|
||||||
_d2dRenderTarget->DrawLine(start, end, _d2dBrushForeground.Get(), 1.0f, _strokeStyle.Get());
|
_d2dRenderTarget->DrawLine(start, end, _d2dBrushForeground.Get(), 1.0f, _strokeStyle.Get());
|
||||||
}
|
}
|
||||||
|
|
||||||
start = { target.x + font.X - 0.5f, target.y + 0.5f };
|
start = { target.x + font.width() - 0.5f, target.y + 0.5f };
|
||||||
|
|
||||||
if (lines & GridLines::Right)
|
if (lines & GridLines::Right)
|
||||||
{
|
{
|
||||||
end = start;
|
end = start;
|
||||||
end.y += font.Y - 1.f;
|
end.y += font.height() - 1.f;
|
||||||
|
|
||||||
_d2dRenderTarget->DrawLine(start, end, _d2dBrushForeground.Get(), 1.0f, _strokeStyle.Get());
|
_d2dRenderTarget->DrawLine(start, end, _d2dBrushForeground.Get(), 1.0f, _strokeStyle.Get());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to the next character in this run.
|
// Move to the next character in this run.
|
||||||
target.x += font.X;
|
target.x += font.width();
|
||||||
}
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@@ -1361,17 +1247,7 @@ void DxEngine::_InvalidOr(RECT rc) noexcept
|
|||||||
_d2dBrushForeground->SetColor(_selectionBackground);
|
_d2dBrushForeground->SetColor(_selectionBackground);
|
||||||
const auto resetColorOnExit = wil::scope_exit([&]() noexcept { _d2dBrushForeground->SetColor(existingColor); });
|
const auto resetColorOnExit = wil::scope_exit([&]() noexcept { _d2dBrushForeground->SetColor(existingColor); });
|
||||||
|
|
||||||
RECT pixels;
|
const D2D1_RECT_F draw = til::rectangle{ rect } *_glyphCell;
|
||||||
pixels.left = rect.Left * _glyphCell.cx;
|
|
||||||
pixels.top = rect.Top * _glyphCell.cy;
|
|
||||||
pixels.right = rect.Right * _glyphCell.cx;
|
|
||||||
pixels.bottom = rect.Bottom * _glyphCell.cy;
|
|
||||||
|
|
||||||
D2D1_RECT_F draw = { 0 };
|
|
||||||
draw.left = static_cast<float>(pixels.left);
|
|
||||||
draw.top = static_cast<float>(pixels.top);
|
|
||||||
draw.right = static_cast<float>(pixels.right);
|
|
||||||
draw.bottom = static_cast<float>(pixels.bottom);
|
|
||||||
|
|
||||||
_d2dRenderTarget->FillRectangle(draw, _d2dBrushForeground.Get());
|
_d2dRenderTarget->FillRectangle(draw, _d2dBrushForeground.Get());
|
||||||
|
|
||||||
@@ -1399,52 +1275,42 @@ enum class CursorPaintType
|
|||||||
{
|
{
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
}
|
}
|
||||||
// Create rectangular block representing where the cursor can fill.
|
// Create rectangular block representing where the cursor can fill.s
|
||||||
D2D1_RECT_F rect = { 0 };
|
D2D1_RECT_F rect = til::rectangle{ til::point{options.coordCursor} } *_glyphCell;
|
||||||
rect.left = static_cast<float>(options.coordCursor.X * _glyphCell.cx);
|
|
||||||
rect.top = static_cast<float>(options.coordCursor.Y * _glyphCell.cy);
|
|
||||||
rect.right = static_cast<float>(rect.left + _glyphCell.cx);
|
|
||||||
rect.bottom = static_cast<float>(rect.top + _glyphCell.cy);
|
|
||||||
|
|
||||||
// If we're double-width, make it one extra glyph wider
|
// If we're double-width, make it one extra glyph wider
|
||||||
if (options.fIsDoubleWidth)
|
if (options.fIsDoubleWidth)
|
||||||
{
|
{
|
||||||
rect.right += _glyphCell.cx;
|
rect.right += _glyphCell.width();
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorPaintType paintType = CursorPaintType::Fill;
|
CursorPaintType paintType = CursorPaintType::Fill;
|
||||||
|
|
||||||
switch (options.cursorType)
|
switch (options.cursorType)
|
||||||
{
|
{
|
||||||
case CursorType::Legacy:
|
case CursorType::Legacy: {
|
||||||
{
|
|
||||||
// Enforce min/max cursor height
|
// Enforce min/max cursor height
|
||||||
ULONG ulHeight = std::clamp(options.ulCursorHeightPercent, s_ulMinCursorHeightPercent, s_ulMaxCursorHeightPercent);
|
ULONG ulHeight = std::clamp(options.ulCursorHeightPercent, s_ulMinCursorHeightPercent, s_ulMaxCursorHeightPercent);
|
||||||
|
ulHeight = (_glyphCell.height<ULONG>() * ulHeight) / 100;
|
||||||
ulHeight = gsl::narrow<ULONG>((_glyphCell.cy * ulHeight) / 100);
|
|
||||||
rect.top = rect.bottom - ulHeight;
|
rect.top = rect.bottom - ulHeight;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CursorType::VerticalBar:
|
case CursorType::VerticalBar: {
|
||||||
{
|
|
||||||
// It can't be wider than one cell or we'll have problems in invalidation, so restrict here.
|
// It can't be wider than one cell or we'll have problems in invalidation, so restrict here.
|
||||||
// It's either the left + the proposed width from the ease of access setting, or
|
// It's either the left + the proposed width from the ease of access setting, or
|
||||||
// it's the right edge of the block cursor as a maximum.
|
// it's the right edge of the block cursor as a maximum.
|
||||||
rect.right = std::min(rect.right, rect.left + options.cursorPixelWidth);
|
rect.right = std::min(rect.right, rect.left + options.cursorPixelWidth);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CursorType::Underscore:
|
case CursorType::Underscore: {
|
||||||
{
|
|
||||||
rect.top = rect.bottom - 1;
|
rect.top = rect.bottom - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CursorType::EmptyBox:
|
case CursorType::EmptyBox: {
|
||||||
{
|
|
||||||
paintType = CursorPaintType::Outline;
|
paintType = CursorPaintType::Outline;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CursorType::FullBox:
|
case CursorType::FullBox: {
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@@ -1461,13 +1327,11 @@ enum class CursorPaintType
|
|||||||
|
|
||||||
switch (paintType)
|
switch (paintType)
|
||||||
{
|
{
|
||||||
case CursorPaintType::Fill:
|
case CursorPaintType::Fill: {
|
||||||
{
|
|
||||||
_d2dRenderTarget->FillRectangle(rect, brush.Get());
|
_d2dRenderTarget->FillRectangle(rect, brush.Get());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CursorPaintType::Outline:
|
case CursorPaintType::Outline: {
|
||||||
{
|
|
||||||
// DrawRectangle in straddles physical pixels in an attempt to draw a line
|
// DrawRectangle in straddles physical pixels in an attempt to draw a line
|
||||||
// between them. To avoid this, bump the rectangle around by half the stroke width.
|
// between them. To avoid this, bump the rectangle around by half the stroke width.
|
||||||
rect.top += 0.5f;
|
rect.top += 0.5f;
|
||||||
@@ -1581,6 +1445,7 @@ CATCH_RETURN()
|
|||||||
// Return Value:
|
// Return Value:
|
||||||
// - S_OK or relevant DirectX error
|
// - S_OK or relevant DirectX error
|
||||||
[[nodiscard]] HRESULT DxEngine::UpdateFont(const FontInfoDesired& pfiFontInfoDesired, FontInfo& fiFontInfo) noexcept
|
[[nodiscard]] HRESULT DxEngine::UpdateFont(const FontInfoDesired& pfiFontInfoDesired, FontInfo& fiFontInfo) noexcept
|
||||||
|
try
|
||||||
{
|
{
|
||||||
RETURN_IF_FAILED(_GetProposedFont(pfiFontInfoDesired,
|
RETURN_IF_FAILED(_GetProposedFont(pfiFontInfoDesired,
|
||||||
fiFontInfo,
|
fiFontInfo,
|
||||||
@@ -1589,22 +1454,16 @@ CATCH_RETURN()
|
|||||||
_dwriteTextAnalyzer,
|
_dwriteTextAnalyzer,
|
||||||
_dwriteFontFace));
|
_dwriteFontFace));
|
||||||
|
|
||||||
try
|
_glyphCell = fiFontInfo.GetSize();
|
||||||
{
|
|
||||||
const auto size = fiFontInfo.GetSize();
|
|
||||||
|
|
||||||
_glyphCell.cx = size.X;
|
|
||||||
_glyphCell.cy = size.Y;
|
|
||||||
}
|
|
||||||
CATCH_RETURN();
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
CATCH_RETURN();
|
||||||
|
|
||||||
[[nodiscard]] Viewport DxEngine::GetViewportInCharacters(const Viewport& viewInPixels) noexcept
|
[[nodiscard]] Viewport DxEngine::GetViewportInCharacters(const Viewport& viewInPixels) noexcept
|
||||||
{
|
{
|
||||||
const short widthInChars = gsl::narrow_cast<short>(viewInPixels.Width() / _glyphCell.cx);
|
const short widthInChars = gsl::narrow_cast<short>(viewInPixels.Width() / _glyphCell.width());
|
||||||
const short heightInChars = gsl::narrow_cast<short>(viewInPixels.Height() / _glyphCell.cy);
|
const short heightInChars = gsl::narrow_cast<short>(viewInPixels.Height() / _glyphCell.height());
|
||||||
|
|
||||||
return Viewport::FromDimensions(viewInPixels.Origin(), { widthInChars, heightInChars });
|
return Viewport::FromDimensions(viewInPixels.Origin(), { widthInChars, heightInChars });
|
||||||
}
|
}
|
||||||
@@ -1693,29 +1552,7 @@ float DxEngine::GetScaling() const noexcept
|
|||||||
// - Rectangle describing dirty area in characters.
|
// - Rectangle describing dirty area in characters.
|
||||||
[[nodiscard]] std::vector<til::rectangle> DxEngine::GetDirtyArea()
|
[[nodiscard]] std::vector<til::rectangle> DxEngine::GetDirtyArea()
|
||||||
{
|
{
|
||||||
SMALL_RECT r;
|
return _invalidMap.runs();
|
||||||
r.Top = gsl::narrow<SHORT>(floor(_invalidRect.top / _glyphCell.cy));
|
|
||||||
r.Left = gsl::narrow<SHORT>(floor(_invalidRect.left / _glyphCell.cx));
|
|
||||||
r.Bottom = gsl::narrow<SHORT>(floor(_invalidRect.bottom / _glyphCell.cy));
|
|
||||||
r.Right = gsl::narrow<SHORT>(floor(_invalidRect.right / _glyphCell.cx));
|
|
||||||
|
|
||||||
// Exclusive to inclusive
|
|
||||||
r.Bottom--;
|
|
||||||
r.Right--;
|
|
||||||
|
|
||||||
return { r };
|
|
||||||
}
|
|
||||||
|
|
||||||
// Routine Description:
|
|
||||||
// - Gets COORD packed with shorts of each glyph (character) cell's
|
|
||||||
// height and width.
|
|
||||||
// Arguments:
|
|
||||||
// - <none>
|
|
||||||
// Return Value:
|
|
||||||
// - Nearest integer short x and y values for each cell.
|
|
||||||
[[nodiscard]] COORD DxEngine::_GetFontSize() const noexcept
|
|
||||||
{
|
|
||||||
return { gsl::narrow<SHORT>(_glyphCell.cx), gsl::narrow<SHORT>(_glyphCell.cy) };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Routine Description:
|
// Routine Description:
|
||||||
@@ -1725,10 +1562,12 @@ float DxEngine::GetScaling() const noexcept
|
|||||||
// Return Value:
|
// Return Value:
|
||||||
// - S_OK
|
// - S_OK
|
||||||
[[nodiscard]] HRESULT DxEngine::GetFontSize(_Out_ COORD* const pFontSize) noexcept
|
[[nodiscard]] HRESULT DxEngine::GetFontSize(_Out_ COORD* const pFontSize) noexcept
|
||||||
|
try
|
||||||
{
|
{
|
||||||
*pFontSize = _GetFontSize();
|
*pFontSize = _glyphCell;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
CATCH_RETURN();
|
||||||
|
|
||||||
// Routine Description:
|
// Routine Description:
|
||||||
// - Currently unused by this renderer.
|
// - Currently unused by this renderer.
|
||||||
@@ -1738,30 +1577,28 @@ float DxEngine::GetScaling() const noexcept
|
|||||||
// Return Value:
|
// Return Value:
|
||||||
// - S_OK or relevant DirectWrite error.
|
// - S_OK or relevant DirectWrite error.
|
||||||
[[nodiscard]] HRESULT DxEngine::IsGlyphWideByFont(const std::wstring_view glyph, _Out_ bool* const pResult) noexcept
|
[[nodiscard]] HRESULT DxEngine::IsGlyphWideByFont(const std::wstring_view glyph, _Out_ bool* const pResult) noexcept
|
||||||
|
try
|
||||||
{
|
{
|
||||||
RETURN_HR_IF_NULL(E_INVALIDARG, pResult);
|
RETURN_HR_IF_NULL(E_INVALIDARG, pResult);
|
||||||
|
|
||||||
try
|
const Cluster cluster(glyph, 0); // columns don't matter, we're doing analysis not layout.
|
||||||
{
|
|
||||||
const Cluster cluster(glyph, 0); // columns don't matter, we're doing analysis not layout.
|
|
||||||
|
|
||||||
// Create the text layout
|
// Create the text layout
|
||||||
CustomTextLayout layout(_dwriteFactory.Get(),
|
CustomTextLayout layout(_dwriteFactory.Get(),
|
||||||
_dwriteTextAnalyzer.Get(),
|
_dwriteTextAnalyzer.Get(),
|
||||||
_dwriteTextFormat.Get(),
|
_dwriteTextFormat.Get(),
|
||||||
_dwriteFontFace.Get(),
|
_dwriteFontFace.Get(),
|
||||||
{ &cluster, 1 },
|
{ &cluster, 1 },
|
||||||
_glyphCell.cx);
|
_glyphCell.width());
|
||||||
|
|
||||||
UINT32 columns = 0;
|
UINT32 columns = 0;
|
||||||
RETURN_IF_FAILED(layout.GetColumns(&columns));
|
RETURN_IF_FAILED(layout.GetColumns(&columns));
|
||||||
|
|
||||||
*pResult = columns != 1;
|
*pResult = columns != 1;
|
||||||
}
|
|
||||||
CATCH_RETURN();
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
CATCH_RETURN();
|
||||||
|
|
||||||
// Method Description:
|
// Method Description:
|
||||||
// - Updates the window's title string.
|
// - Updates the window's title string.
|
||||||
@@ -2135,12 +1972,10 @@ float DxEngine::GetScaling() const noexcept
|
|||||||
|
|
||||||
switch (_chainMode)
|
switch (_chainMode)
|
||||||
{
|
{
|
||||||
case SwapChainMode::ForHwnd:
|
case SwapChainMode::ForHwnd: {
|
||||||
{
|
|
||||||
return D2D1::ColorF(rgb);
|
return D2D1::ColorF(rgb);
|
||||||
}
|
}
|
||||||
case SwapChainMode::ForComposition:
|
case SwapChainMode::ForComposition: {
|
||||||
{
|
|
||||||
// Get the A value we've snuck into the highest byte
|
// Get the A value we've snuck into the highest byte
|
||||||
const BYTE a = ((color >> 24) & 0xFF);
|
const BYTE a = ((color >> 24) & 0xFF);
|
||||||
const float aFloat = a / 255.0f;
|
const float aFloat = a / 255.0f;
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ namespace Microsoft::Console::Render
|
|||||||
SwapChainMode _chainMode;
|
SwapChainMode _chainMode;
|
||||||
|
|
||||||
HWND _hwndTarget;
|
HWND _hwndTarget;
|
||||||
SIZE _sizeTarget;
|
til::size _sizeTarget;
|
||||||
int _dpi;
|
int _dpi;
|
||||||
float _scale;
|
float _scale;
|
||||||
|
|
||||||
@@ -130,8 +130,8 @@ namespace Microsoft::Console::Render
|
|||||||
bool _isEnabled;
|
bool _isEnabled;
|
||||||
bool _isPainting;
|
bool _isPainting;
|
||||||
|
|
||||||
SIZE _displaySizePixels;
|
til::size _displaySizePixels;
|
||||||
SIZE _glyphCell;
|
til::size _glyphCell;
|
||||||
|
|
||||||
D2D1_COLOR_F _defaultForegroundColor;
|
D2D1_COLOR_F _defaultForegroundColor;
|
||||||
D2D1_COLOR_F _defaultBackgroundColor;
|
D2D1_COLOR_F _defaultBackgroundColor;
|
||||||
@@ -140,19 +140,11 @@ namespace Microsoft::Console::Render
|
|||||||
D2D1_COLOR_F _backgroundColor;
|
D2D1_COLOR_F _backgroundColor;
|
||||||
D2D1_COLOR_F _selectionBackground;
|
D2D1_COLOR_F _selectionBackground;
|
||||||
|
|
||||||
[[nodiscard]] RECT _GetDisplayRect() const noexcept;
|
til::bitmap _invalidMap;
|
||||||
|
til::point _invalidScroll;
|
||||||
bool _isInvalidUsed;
|
|
||||||
RECT _invalidRect;
|
|
||||||
SIZE _invalidScroll;
|
|
||||||
|
|
||||||
void _InvalidOr(SMALL_RECT sr) noexcept;
|
|
||||||
void _InvalidOr(RECT rc) noexcept;
|
|
||||||
|
|
||||||
void _InvalidOffset(POINT pt);
|
|
||||||
|
|
||||||
bool _presentReady;
|
bool _presentReady;
|
||||||
RECT _presentDirty;
|
std::vector<RECT> _presentDirty;
|
||||||
RECT _presentScroll;
|
RECT _presentScroll;
|
||||||
POINT _presentOffset;
|
POINT _presentOffset;
|
||||||
DXGI_PRESENT_PARAMETERS _presentParams;
|
DXGI_PRESENT_PARAMETERS _presentParams;
|
||||||
@@ -244,9 +236,7 @@ namespace Microsoft::Console::Render
|
|||||||
::Microsoft::WRL::ComPtr<IDWriteTextAnalyzer1>& textAnalyzer,
|
::Microsoft::WRL::ComPtr<IDWriteTextAnalyzer1>& textAnalyzer,
|
||||||
::Microsoft::WRL::ComPtr<IDWriteFontFace1>& fontFace) const noexcept;
|
::Microsoft::WRL::ComPtr<IDWriteFontFace1>& fontFace) const noexcept;
|
||||||
|
|
||||||
[[nodiscard]] COORD _GetFontSize() const noexcept;
|
[[nodiscard]] til::size _GetClientSize() const noexcept;
|
||||||
|
|
||||||
[[nodiscard]] SIZE _GetClientSize() const noexcept;
|
|
||||||
|
|
||||||
[[nodiscard]] D2D1_COLOR_F _ColorFFromColorRef(const COLORREF color) noexcept;
|
[[nodiscard]] D2D1_COLOR_F _ColorFFromColorRef(const COLORREF color) noexcept;
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// This includes support libraries from the CRT, STL, WIL, and GSL
|
// This includes support libraries from the CRT, STL, WIL, and GSL
|
||||||
|
#define BLOCK_TIL // We want to include it later, after DX.
|
||||||
#include "LibraryIncludes.h"
|
#include "LibraryIncludes.h"
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <winmeta.h>
|
||||||
|
|
||||||
#include "..\host\conddkrefs.h"
|
#include "..\host\conddkrefs.h"
|
||||||
#include <condrv.h>
|
#include <condrv.h>
|
||||||
@@ -34,4 +36,7 @@
|
|||||||
#include <dwrite_2.h>
|
#include <dwrite_2.h>
|
||||||
#include <dwrite_3.h>
|
#include <dwrite_3.h>
|
||||||
|
|
||||||
|
// Re-include TIL at the bottom to gain DX superpowers.
|
||||||
|
#include "til.h"
|
||||||
|
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
|
|||||||
Reference in New Issue
Block a user