mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-06 14:19:45 +00:00
Compare commits
58 Commits
dev/miniks
...
dev/migrie
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d877b8b961 | ||
|
|
57aac92f5b | ||
|
|
748dfb5164 | ||
|
|
8706e50133 | ||
|
|
82b43f6433 | ||
|
|
d2438d9c7a | ||
|
|
11c42bc3cb | ||
|
|
1bcb9f2e70 | ||
|
|
bc1d516b39 | ||
|
|
87118bf061 | ||
|
|
cd818334a5 | ||
|
|
05895a64a2 | ||
|
|
1fbf15836a | ||
|
|
d10f694778 | ||
|
|
6639df9edc | ||
|
|
930e24c6b3 | ||
|
|
341bb4f91e | ||
|
|
c0c23291b8 | ||
|
|
d5d2b7727f | ||
|
|
c173f20244 | ||
|
|
4eeaddc583 | ||
|
|
31416ff20a | ||
|
|
12e50ea911 | ||
|
|
24561399a2 | ||
|
|
b1eefb865c | ||
|
|
f742afdb49 | ||
|
|
f3cffafa52 | ||
|
|
bb2920ec01 | ||
|
|
ecf99fac23 | ||
|
|
c86038926d | ||
|
|
52b05e065e | ||
|
|
81a80257c9 | ||
|
|
1ea9fc26c8 | ||
|
|
e1d15105d7 | ||
|
|
d321ec084c | ||
|
|
f33c69d8b4 | ||
|
|
30b8335479 | ||
|
|
93b79fb23c | ||
|
|
7b8806b1fe | ||
|
|
8c5041b2ae | ||
|
|
a511ab0bc7 | ||
|
|
501c47adb2 | ||
|
|
72121721f3 | ||
|
|
3e80b6a466 | ||
|
|
a80e1d3f73 | ||
|
|
f45df9a717 | ||
|
|
b37f69826e | ||
|
|
b2e76c1812 | ||
|
|
2179e16e3d | ||
|
|
fafc0e1316 | ||
|
|
ca6dff9f20 | ||
|
|
186ff8f638 | ||
|
|
37810aac71 | ||
|
|
33bc88b225 | ||
|
|
d56137876e | ||
|
|
f928d41917 | ||
|
|
e4cc3104ab | ||
|
|
0c10b4b265 |
12
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
12
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
blank_issues_enabled: true
|
||||
|
||||
contact_links:
|
||||
- name: Microsoft Security Response Center 🔐
|
||||
url: https://msrc.microsoft.com/create-report
|
||||
about: Please report security vulnerabilities here.
|
||||
- name: Windows Terminal Documentation issue 📄
|
||||
url: https://github.com/MicrosoftDocs/terminal/issues/new
|
||||
about: Report issues with the documentation for the Windows Terminal (in docs.microsoft.com/windows/terminal)
|
||||
- name: Console Documentation issue 📄
|
||||
url: https://github.com/MicrosoftDocs/console-docs/issues/new
|
||||
about: Report issues with the documentation for the Console (in docs.microsoft.com/windows/console)
|
||||
25
.github/actions/spell-check/advice.txt
vendored
25
.github/actions/spell-check/advice.txt
vendored
@@ -1,25 +0,0 @@
|
||||
<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. You can copy the contents of each `perl` command excluding the outer `'` marks and dropping any `'"`/`"'` quotation mark pairs into a file and then run `perl file.pl` from the root of the repository to run the code. Alternatively, you can manually insert the items...
|
||||
|
||||
If the listed items are:
|
||||
* ... **misspelled**, then please *correct* them instead of using the command.
|
||||
* ... *names*, please add them to `.github/actions/spell-check/dictionary/names.txt`.
|
||||
* ... APIs, you can add them to a file in `.github/actions/spell-check/dictionary/`.
|
||||
* ... just things you're using, please add them to an appropriate file in `.github/actions/spell-check/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/spell-check/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>
|
||||
|
||||
#### :warning: Reviewers
|
||||
At present, the action that triggered this message will not show its :x: in this PR unless the branch is within this repository.
|
||||
Thus, you **should** make sure that this comment has been addressed before encouraging the merge bot to merge this PR.
|
||||
69
.github/actions/spell-check/dictionary/apis.txt
vendored
69
.github/actions/spell-check/dictionary/apis.txt
vendored
@@ -1,69 +0,0 @@
|
||||
ACCEPTFILES
|
||||
ACCESSDENIED
|
||||
alignof
|
||||
bitfield
|
||||
bitfields
|
||||
CLASSNOTAVAILABLE
|
||||
COLORPROPERTY
|
||||
CXICON
|
||||
CYICON
|
||||
environstrings
|
||||
EXPCMDFLAGS
|
||||
EXPCMDSTATE
|
||||
fullkbd
|
||||
futex
|
||||
GETDESKWALLPAPER
|
||||
GETHIGHCONTRAST
|
||||
Hashtable
|
||||
HIGHCONTRASTON
|
||||
HIGHCONTRASTW
|
||||
href
|
||||
IAsync
|
||||
IBind
|
||||
IBox
|
||||
IClass
|
||||
IComparable
|
||||
ICustom
|
||||
IDialog
|
||||
IDirect
|
||||
IExplorer
|
||||
IInheritable
|
||||
IMap
|
||||
IObject
|
||||
IStorage
|
||||
LCID
|
||||
llabs
|
||||
lround
|
||||
LSHIFT
|
||||
NCHITTEST
|
||||
NCLBUTTONDBLCLK
|
||||
NCRBUTTONDBLCLK
|
||||
NOAGGREGATION
|
||||
NOREDIRECTIONBITMAP
|
||||
oaidl
|
||||
ocidl
|
||||
otms
|
||||
OUTLINETEXTMETRICW
|
||||
PAGESCROLL
|
||||
RETURNCMD
|
||||
rfind
|
||||
roundf
|
||||
RSHIFT
|
||||
rx
|
||||
serializer
|
||||
SIZENS
|
||||
spsc
|
||||
sregex
|
||||
STDCPP
|
||||
strchr
|
||||
syscall
|
||||
THEMECHANGED
|
||||
tmp
|
||||
tx
|
||||
UPDATEINIFILE
|
||||
userenv
|
||||
wcstoui
|
||||
wsregex
|
||||
XDocument
|
||||
XElement
|
||||
XParse
|
||||
782
.github/actions/spell-check/dictionary/colors.txt
vendored
782
.github/actions/spell-check/dictionary/colors.txt
vendored
@@ -1,782 +0,0 @@
|
||||
snow
|
||||
ghost-white
|
||||
ghostwhite
|
||||
white-smoke
|
||||
whitesmoke
|
||||
gainsboro
|
||||
floral-white
|
||||
floralwhite
|
||||
old-lace
|
||||
oldlace
|
||||
linen
|
||||
antique-white
|
||||
antiquewhite
|
||||
papaya-whip
|
||||
papayawhip
|
||||
blanched-almond
|
||||
blanchedalmond
|
||||
bisque
|
||||
peach-puff
|
||||
peachpuff
|
||||
navajo-white
|
||||
navajowhite
|
||||
moccasin
|
||||
cornsilk
|
||||
ivory
|
||||
lemon-chiffon
|
||||
lemonchiffon
|
||||
seashell
|
||||
honeydew
|
||||
mint-cream
|
||||
mintcream
|
||||
azure
|
||||
alice-blue
|
||||
aliceblue
|
||||
lavender
|
||||
lavender-blush
|
||||
lavenderblush
|
||||
misty-rose
|
||||
mistyrose
|
||||
white
|
||||
black
|
||||
dark-slate-gray
|
||||
darkslategray
|
||||
dark-slate-grey
|
||||
darkslategrey
|
||||
dim-gray
|
||||
dimgray
|
||||
dim-grey
|
||||
dimgrey
|
||||
slate-gray
|
||||
slategray
|
||||
slate-grey
|
||||
slategrey
|
||||
light-slate-gray
|
||||
lightslategray
|
||||
light-slate-grey
|
||||
lightslategrey
|
||||
gray
|
||||
grey
|
||||
xray
|
||||
x11gray
|
||||
xrey
|
||||
x11grey
|
||||
web-gray
|
||||
webgray
|
||||
web-grey
|
||||
webgrey
|
||||
light-grey
|
||||
lightgrey
|
||||
light-gray
|
||||
lightgray
|
||||
midnight-blue
|
||||
midnightblue
|
||||
navy
|
||||
navy-blue
|
||||
navyblue
|
||||
cornflower-blue
|
||||
cornflowerblue
|
||||
dark-slate-blue
|
||||
darkslateblue
|
||||
slate-blue
|
||||
slateblue
|
||||
medium-slate-blue
|
||||
mediumslateblue
|
||||
light-slate-blue
|
||||
lightslateblue
|
||||
medium-blue
|
||||
mediumblue
|
||||
royal-blue
|
||||
royalblue
|
||||
blue
|
||||
dodger-blue
|
||||
dodgerblue
|
||||
deep-sky-blue
|
||||
deepskyblue
|
||||
sky-blue
|
||||
skyblue
|
||||
light-sky-blue
|
||||
lightskyblue
|
||||
steel-blue
|
||||
steelblue
|
||||
light-steel-blue
|
||||
lightsteelblue
|
||||
light-blue
|
||||
lightblue
|
||||
powder-blue
|
||||
powderblue
|
||||
pale-turquoise
|
||||
paleturquoise
|
||||
dark-turquoise
|
||||
darkturquoise
|
||||
medium-turquoise
|
||||
mediumturquoise
|
||||
turquoise
|
||||
cyan
|
||||
aqua
|
||||
light-cyan
|
||||
lightcyan
|
||||
cadet-blue
|
||||
cadetblue
|
||||
medium-aquamarine
|
||||
mediumaquamarine
|
||||
aquamarine
|
||||
dark-green
|
||||
darkgreen
|
||||
dark-olive-green
|
||||
darkolivegreen
|
||||
dark-sea-green
|
||||
darkseagreen
|
||||
sea-green
|
||||
seagreen
|
||||
medium-sea-green
|
||||
mediumseagreen
|
||||
light-sea-green
|
||||
lightseagreen
|
||||
pale-green
|
||||
palegreen
|
||||
spring-green
|
||||
springgreen
|
||||
lawn-green
|
||||
lawngreen
|
||||
green
|
||||
lime
|
||||
xreen
|
||||
x11green
|
||||
web-green
|
||||
webgreen
|
||||
chartreuse
|
||||
medium-spring-green
|
||||
mediumspringgreen
|
||||
green-yellow
|
||||
greenyellow
|
||||
lime-green
|
||||
limegreen
|
||||
yellow-green
|
||||
yellowgreen
|
||||
forest-green
|
||||
forestgreen
|
||||
olive-drab
|
||||
olivedrab
|
||||
dark-khaki
|
||||
darkkhaki
|
||||
khaki
|
||||
pale-goldenrod
|
||||
palegoldenrod
|
||||
light-goldenrod-yellow
|
||||
lightgoldenrodyellow
|
||||
light-yellow
|
||||
lightyellow
|
||||
yellow
|
||||
gold
|
||||
light-goldenrod
|
||||
lightgoldenrod
|
||||
goldenrod
|
||||
dark-goldenrod
|
||||
darkgoldenrod
|
||||
rosy-brown
|
||||
rosybrown
|
||||
indian-red
|
||||
indianred
|
||||
saddle-brown
|
||||
saddlebrown
|
||||
sienna
|
||||
peru
|
||||
burlywood
|
||||
beige
|
||||
wheat
|
||||
sandy-brown
|
||||
sandybrown
|
||||
tan
|
||||
chocolate
|
||||
firebrick
|
||||
brown
|
||||
dark-salmon
|
||||
darksalmon
|
||||
salmon
|
||||
light-salmon
|
||||
lightsalmon
|
||||
orange
|
||||
dark-orange
|
||||
darkorange
|
||||
coral
|
||||
light-coral
|
||||
lightcoral
|
||||
tomato
|
||||
orange-red
|
||||
orangered
|
||||
red
|
||||
hot-pink
|
||||
hotpink
|
||||
deep-pink
|
||||
deeppink
|
||||
pink
|
||||
light-pink
|
||||
lightpink
|
||||
pale-violet-red
|
||||
palevioletred
|
||||
maroon
|
||||
xaroon
|
||||
x11maroon
|
||||
web-maroon
|
||||
webmaroon
|
||||
medium-violet-red
|
||||
mediumvioletred
|
||||
violet-red
|
||||
violetred
|
||||
magenta
|
||||
fuchsia
|
||||
violet
|
||||
plum
|
||||
orchid
|
||||
medium-orchid
|
||||
mediumorchid
|
||||
dark-orchid
|
||||
darkorchid
|
||||
dark-violet
|
||||
darkviolet
|
||||
blue-violet
|
||||
blueviolet
|
||||
purple
|
||||
xurple
|
||||
x11purple
|
||||
web-purple
|
||||
webpurple
|
||||
medium-purple
|
||||
mediumpurple
|
||||
thistle
|
||||
snow1
|
||||
snow2
|
||||
snow3
|
||||
snow4
|
||||
seashell1
|
||||
seashell2
|
||||
seashell3
|
||||
seashell4
|
||||
antiquewhite1
|
||||
antiquewhite2
|
||||
antiquewhite3
|
||||
antiquewhite4
|
||||
bisque1
|
||||
bisque2
|
||||
bisque3
|
||||
bisque4
|
||||
peachpuff1
|
||||
peachpuff2
|
||||
peachpuff3
|
||||
peachpuff4
|
||||
navajowhite1
|
||||
navajowhite2
|
||||
navajowhite3
|
||||
navajowhite4
|
||||
lemonchiffon1
|
||||
lemonchiffon2
|
||||
lemonchiffon3
|
||||
lemonchiffon4
|
||||
cornsilk1
|
||||
cornsilk2
|
||||
cornsilk3
|
||||
cornsilk4
|
||||
ivory1
|
||||
ivory2
|
||||
ivory3
|
||||
ivory4
|
||||
honeydew1
|
||||
honeydew2
|
||||
honeydew3
|
||||
honeydew4
|
||||
lavenderblush1
|
||||
lavenderblush2
|
||||
lavenderblush3
|
||||
lavenderblush4
|
||||
mistyrose1
|
||||
mistyrose2
|
||||
mistyrose3
|
||||
mistyrose4
|
||||
azure1
|
||||
azure2
|
||||
azure3
|
||||
azure4
|
||||
slateblue1
|
||||
slateblue2
|
||||
slateblue3
|
||||
slateblue4
|
||||
royalblue1
|
||||
royalblue2
|
||||
royalblue3
|
||||
royalblue4
|
||||
blue1
|
||||
blue2
|
||||
blue3
|
||||
blue4
|
||||
dodgerblue1
|
||||
dodgerblue2
|
||||
dodgerblue3
|
||||
dodgerblue4
|
||||
steelblue1
|
||||
steelblue2
|
||||
steelblue3
|
||||
steelblue4
|
||||
deepskyblue1
|
||||
deepskyblue2
|
||||
deepskyblue3
|
||||
deepskyblue4
|
||||
skyblue1
|
||||
skyblue2
|
||||
skyblue3
|
||||
skyblue4
|
||||
lightskyblue1
|
||||
lightskyblue2
|
||||
lightskyblue3
|
||||
lightskyblue4
|
||||
slategray1
|
||||
slategray2
|
||||
slategray3
|
||||
slategray4
|
||||
lightsteelblue1
|
||||
lightsteelblue2
|
||||
lightsteelblue3
|
||||
lightsteelblue4
|
||||
lightblue1
|
||||
lightblue2
|
||||
lightblue3
|
||||
lightblue4
|
||||
lightcyan1
|
||||
lightcyan2
|
||||
lightcyan3
|
||||
lightcyan4
|
||||
paleturquoise1
|
||||
paleturquoise2
|
||||
paleturquoise3
|
||||
paleturquoise4
|
||||
cadetblue1
|
||||
cadetblue2
|
||||
cadetblue3
|
||||
cadetblue4
|
||||
turquoise1
|
||||
turquoise2
|
||||
turquoise3
|
||||
turquoise4
|
||||
cyan1
|
||||
cyan2
|
||||
cyan3
|
||||
cyan4
|
||||
darkslategray1
|
||||
darkslategray2
|
||||
darkslategray3
|
||||
darkslategray4
|
||||
aquamarine1
|
||||
aquamarine2
|
||||
aquamarine3
|
||||
aquamarine4
|
||||
darkseagreen1
|
||||
darkseagreen2
|
||||
darkseagreen3
|
||||
darkseagreen4
|
||||
seagreen1
|
||||
seagreen2
|
||||
seagreen3
|
||||
seagreen4
|
||||
palegreen1
|
||||
palegreen2
|
||||
palegreen3
|
||||
palegreen4
|
||||
springgreen1
|
||||
springgreen2
|
||||
springgreen3
|
||||
springgreen4
|
||||
green1
|
||||
green2
|
||||
green3
|
||||
green4
|
||||
chartreuse1
|
||||
chartreuse2
|
||||
chartreuse3
|
||||
chartreuse4
|
||||
olivedrab1
|
||||
olivedrab2
|
||||
olivedrab3
|
||||
olivedrab4
|
||||
darkolivegreen1
|
||||
darkolivegreen2
|
||||
darkolivegreen3
|
||||
darkolivegreen4
|
||||
khaki1
|
||||
khaki2
|
||||
khaki3
|
||||
khaki4
|
||||
lightgoldenrod1
|
||||
lightgoldenrod2
|
||||
lightgoldenrod3
|
||||
lightgoldenrod4
|
||||
lightyellow1
|
||||
lightyellow2
|
||||
lightyellow3
|
||||
lightyellow4
|
||||
yellow1
|
||||
yellow2
|
||||
yellow3
|
||||
yellow4
|
||||
gold1
|
||||
gold2
|
||||
gold3
|
||||
gold4
|
||||
goldenrod1
|
||||
goldenrod2
|
||||
goldenrod3
|
||||
goldenrod4
|
||||
darkgoldenrod1
|
||||
darkgoldenrod2
|
||||
darkgoldenrod3
|
||||
darkgoldenrod4
|
||||
rosybrown1
|
||||
rosybrown2
|
||||
rosybrown3
|
||||
rosybrown4
|
||||
indianred1
|
||||
indianred2
|
||||
indianred3
|
||||
indianred4
|
||||
sienna1
|
||||
sienna2
|
||||
sienna3
|
||||
sienna4
|
||||
burlywood1
|
||||
burlywood2
|
||||
burlywood3
|
||||
burlywood4
|
||||
wheat1
|
||||
wheat2
|
||||
wheat3
|
||||
wheat4
|
||||
tan1
|
||||
tan2
|
||||
tan3
|
||||
tan4
|
||||
chocolate1
|
||||
chocolate2
|
||||
chocolate3
|
||||
chocolate4
|
||||
firebrick1
|
||||
firebrick2
|
||||
firebrick3
|
||||
firebrick4
|
||||
brown1
|
||||
brown2
|
||||
brown3
|
||||
brown4
|
||||
salmon1
|
||||
salmon2
|
||||
salmon3
|
||||
salmon4
|
||||
lightsalmon1
|
||||
lightsalmon2
|
||||
lightsalmon3
|
||||
lightsalmon4
|
||||
orange1
|
||||
orange2
|
||||
orange3
|
||||
orange4
|
||||
darkorange1
|
||||
darkorange2
|
||||
darkorange3
|
||||
darkorange4
|
||||
coral1
|
||||
coral2
|
||||
coral3
|
||||
coral4
|
||||
tomato1
|
||||
tomato2
|
||||
tomato3
|
||||
tomato4
|
||||
orangered1
|
||||
orangered2
|
||||
orangered3
|
||||
orangered4
|
||||
red1
|
||||
red2
|
||||
red3
|
||||
red4
|
||||
deeppink1
|
||||
deeppink2
|
||||
deeppink3
|
||||
deeppink4
|
||||
hotpink1
|
||||
hotpink2
|
||||
hotpink3
|
||||
hotpink4
|
||||
pink1
|
||||
pink2
|
||||
pink3
|
||||
pink4
|
||||
lightpink1
|
||||
lightpink2
|
||||
lightpink3
|
||||
lightpink4
|
||||
palevioletred1
|
||||
palevioletred2
|
||||
palevioletred3
|
||||
palevioletred4
|
||||
maroon1
|
||||
maroon2
|
||||
maroon3
|
||||
maroon4
|
||||
violetred1
|
||||
violetred2
|
||||
violetred3
|
||||
violetred4
|
||||
magenta1
|
||||
magenta2
|
||||
magenta3
|
||||
magenta4
|
||||
orchid1
|
||||
orchid2
|
||||
orchid3
|
||||
orchid4
|
||||
plum1
|
||||
plum2
|
||||
plum3
|
||||
plum4
|
||||
mediumorchid1
|
||||
mediumorchid2
|
||||
mediumorchid3
|
||||
mediumorchid4
|
||||
darkorchid1
|
||||
darkorchid2
|
||||
darkorchid3
|
||||
darkorchid4
|
||||
purple1
|
||||
purple2
|
||||
purple3
|
||||
purple4
|
||||
mediumpurple1
|
||||
mediumpurple2
|
||||
mediumpurple3
|
||||
mediumpurple4
|
||||
thistle1
|
||||
thistle2
|
||||
thistle3
|
||||
thistle4
|
||||
gray0
|
||||
grey0
|
||||
gray1
|
||||
grey1
|
||||
gray2
|
||||
grey2
|
||||
gray3
|
||||
grey3
|
||||
gray4
|
||||
grey4
|
||||
gray5
|
||||
grey5
|
||||
gray6
|
||||
grey6
|
||||
gray7
|
||||
grey7
|
||||
gray8
|
||||
grey8
|
||||
gray9
|
||||
grey9
|
||||
gray10
|
||||
grey10
|
||||
gray11
|
||||
grey11
|
||||
gray12
|
||||
grey12
|
||||
gray13
|
||||
grey13
|
||||
gray14
|
||||
grey14
|
||||
gray15
|
||||
grey15
|
||||
gray16
|
||||
grey16
|
||||
gray17
|
||||
grey17
|
||||
gray18
|
||||
grey18
|
||||
gray19
|
||||
grey19
|
||||
gray20
|
||||
grey20
|
||||
gray21
|
||||
grey21
|
||||
gray22
|
||||
grey22
|
||||
gray23
|
||||
grey23
|
||||
gray24
|
||||
grey24
|
||||
gray25
|
||||
grey25
|
||||
gray26
|
||||
grey26
|
||||
gray27
|
||||
grey27
|
||||
gray28
|
||||
grey28
|
||||
gray29
|
||||
grey29
|
||||
gray30
|
||||
grey30
|
||||
gray31
|
||||
grey31
|
||||
gray32
|
||||
grey32
|
||||
gray33
|
||||
grey33
|
||||
gray34
|
||||
grey34
|
||||
gray35
|
||||
grey35
|
||||
gray36
|
||||
grey36
|
||||
gray37
|
||||
grey37
|
||||
gray38
|
||||
grey38
|
||||
gray39
|
||||
grey39
|
||||
gray40
|
||||
grey40
|
||||
gray41
|
||||
grey41
|
||||
gray42
|
||||
grey42
|
||||
gray43
|
||||
grey43
|
||||
gray44
|
||||
grey44
|
||||
gray45
|
||||
grey45
|
||||
gray46
|
||||
grey46
|
||||
gray47
|
||||
grey47
|
||||
gray48
|
||||
grey48
|
||||
gray49
|
||||
grey49
|
||||
gray50
|
||||
grey50
|
||||
gray51
|
||||
grey51
|
||||
gray52
|
||||
grey52
|
||||
gray53
|
||||
grey53
|
||||
gray54
|
||||
grey54
|
||||
gray55
|
||||
grey55
|
||||
gray56
|
||||
grey56
|
||||
gray57
|
||||
grey57
|
||||
gray58
|
||||
grey58
|
||||
gray59
|
||||
grey59
|
||||
gray60
|
||||
grey60
|
||||
gray61
|
||||
grey61
|
||||
gray62
|
||||
grey62
|
||||
gray63
|
||||
grey63
|
||||
gray64
|
||||
grey64
|
||||
gray65
|
||||
grey65
|
||||
gray66
|
||||
grey66
|
||||
gray67
|
||||
grey67
|
||||
gray68
|
||||
grey68
|
||||
gray69
|
||||
grey69
|
||||
gray70
|
||||
grey70
|
||||
gray71
|
||||
grey71
|
||||
gray72
|
||||
grey72
|
||||
gray73
|
||||
grey73
|
||||
gray74
|
||||
grey74
|
||||
gray75
|
||||
grey75
|
||||
gray76
|
||||
grey76
|
||||
gray77
|
||||
grey77
|
||||
gray78
|
||||
grey78
|
||||
gray79
|
||||
grey79
|
||||
gray80
|
||||
grey80
|
||||
gray81
|
||||
grey81
|
||||
gray82
|
||||
grey82
|
||||
gray83
|
||||
grey83
|
||||
gray84
|
||||
grey84
|
||||
gray85
|
||||
grey85
|
||||
gray86
|
||||
grey86
|
||||
gray87
|
||||
grey87
|
||||
gray88
|
||||
grey88
|
||||
gray89
|
||||
grey89
|
||||
gray90
|
||||
grey90
|
||||
gray91
|
||||
grey91
|
||||
gray92
|
||||
grey92
|
||||
gray93
|
||||
grey93
|
||||
gray94
|
||||
grey94
|
||||
gray95
|
||||
grey95
|
||||
gray96
|
||||
grey96
|
||||
gray97
|
||||
grey97
|
||||
gray98
|
||||
grey98
|
||||
gray99
|
||||
grey99
|
||||
gray100
|
||||
grey100
|
||||
dark-grey
|
||||
darkgrey
|
||||
dark-gray
|
||||
darkgray
|
||||
dark-blue
|
||||
darkblue
|
||||
dark-cyan
|
||||
darkcyan
|
||||
dark-magenta
|
||||
darkmagenta
|
||||
dark-red
|
||||
darkred
|
||||
light-green
|
||||
lightgreen
|
||||
crimson
|
||||
indigo
|
||||
olive
|
||||
rebecca-purple
|
||||
rebeccapurple
|
||||
silver
|
||||
teal
|
||||
479838
.github/actions/spell-check/dictionary/dictionary.txt
vendored
479838
.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,40 +0,0 @@
|
||||
ACLs
|
||||
altform
|
||||
appendwttlogging
|
||||
backplating
|
||||
CPRs
|
||||
DACL
|
||||
DACLs
|
||||
dotnetfeed
|
||||
DWINRT
|
||||
enablewttlogging
|
||||
LKG
|
||||
mfcribbon
|
||||
microsoft
|
||||
microsoftonline
|
||||
netcore
|
||||
osgvsowi
|
||||
pgc
|
||||
pgo
|
||||
pgosweep
|
||||
powerrename
|
||||
powershell
|
||||
propkey
|
||||
pscustomobject
|
||||
robocopy
|
||||
SACLs
|
||||
Shobjidl
|
||||
Skype
|
||||
sysnative
|
||||
systemroot
|
||||
taskkill
|
||||
tasklist
|
||||
tdbuildteamid
|
||||
vcruntime
|
||||
visualstudio
|
||||
VSTHRD
|
||||
wlk
|
||||
wslpath
|
||||
wtl
|
||||
wtt
|
||||
wttlog
|
||||
64
.github/actions/spell-check/excludes.txt
vendored
64
.github/actions/spell-check/excludes.txt
vendored
@@ -1,64 +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$
|
||||
\.vsdx$
|
||||
\.woff
|
||||
\.xcf$
|
||||
\.xls
|
||||
\.xpm$
|
||||
\.yml$
|
||||
\.zip$
|
||||
^consolegit2gitfilters\.json$
|
||||
^dep/
|
||||
^oss/
|
||||
^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 +0,0 @@
|
||||
renamer
|
||||
@@ -1,7 +0,0 @@
|
||||
autogenerated
|
||||
CPPCORECHECK
|
||||
Debian
|
||||
filepath
|
||||
inplace
|
||||
KEYBDINPUT
|
||||
WINVER
|
||||
15
.github/actions/spell-check/expect/web.txt
vendored
15
.github/actions/spell-check/expect/web.txt
vendored
@@ -1,15 +0,0 @@
|
||||
http
|
||||
td
|
||||
www
|
||||
ecma
|
||||
rapidtables
|
||||
WCAG
|
||||
freedesktop
|
||||
ycombinator
|
||||
robertelder
|
||||
kovidgoyal
|
||||
leonerd
|
||||
fixterms
|
||||
uk
|
||||
winui
|
||||
appshellintegration
|
||||
@@ -1,23 +0,0 @@
|
||||
https://(?:(?:[-a-zA-Z0-9?&=]*\.|)microsoft\.com)/[-a-zA-Z0-9?&=_#\/.]*
|
||||
https://aka\.ms/[-a-zA-Z0-9?&=\/_]*
|
||||
https://www\.itscj\.ipsj\.or\.jp/iso-ir/[-0-9]+\.pdf
|
||||
https://www\.vt100\.net/docs/[-a-zA-Z0-9#_\/.]*
|
||||
https://www.w3.org/[-a-zA-Z0-9?&=\/_#]*
|
||||
https://(?:(?:www\.|)youtube\.com|youtu.be)/[-a-zA-Z0-9?&=]*
|
||||
https://[a-z-]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
|
||||
[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])\1{3,}\b
|
||||
0x[0-9A-Za-z]+
|
||||
Base64::s_(?:En|De)code\(L"[^"]+"
|
||||
VERIFY_ARE_EQUAL\(L"[^"]+"
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\+/"
|
||||
std::memory_order_[\w]+
|
||||
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
|
||||
they are not otherwise present in the repository.
|
||||
|
||||
@@ -8,11 +8,11 @@ E.g., you could include a list of system APIs here, or potential
|
||||
contributors (so that if a future commit includes their name,
|
||||
it'll be accepted).
|
||||
|
||||
### Files
|
||||
## Files
|
||||
|
||||
| File | Description |
|
||||
| ---- | ----------- |
|
||||
| [Dictionary](dictionary.txt) | Primary US English dictionary |
|
||||
| [Allow](allow.txt) | Supplements to the dictionary |
|
||||
| [Chinese](chinese.txt) | Chinese words |
|
||||
| [Japanese](japanese.txt) | Japanese words |
|
||||
| [Microsoft](microsoft.txt) | Microsoft brand items |
|
||||
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
|
||||
emoji
|
||||
emojis
|
||||
Extralight
|
||||
Gabriola
|
||||
Iosevka
|
||||
MDL
|
||||
Monofur
|
||||
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,35 +1,49 @@
|
||||
Anup
|
||||
austdi
|
||||
arkthur
|
||||
Ballmer
|
||||
bhoj
|
||||
Bhojwani
|
||||
Bluloco
|
||||
carlos
|
||||
dhowett
|
||||
Diviness
|
||||
dsafa
|
||||
duhowett
|
||||
DXP
|
||||
ekg
|
||||
eryksun
|
||||
ethanschoonover
|
||||
Firefox
|
||||
Gatta
|
||||
glsl
|
||||
Gravell
|
||||
Grie
|
||||
Griese
|
||||
Hernan
|
||||
Howett
|
||||
Illhardt
|
||||
iquilezles
|
||||
italo
|
||||
jantari
|
||||
jerrysh
|
||||
Kaiyu
|
||||
kimwalisch
|
||||
KMehrain
|
||||
KODELIFE
|
||||
Kodelife
|
||||
Kourosh
|
||||
kowalczyk
|
||||
leonmsft
|
||||
Lepilleur
|
||||
lhecker
|
||||
lukesampson
|
||||
Macbook
|
||||
Manandhar
|
||||
masserano
|
||||
mbadolato
|
||||
Mehrain
|
||||
menger
|
||||
mgravell
|
||||
michaelniksa
|
||||
michkap
|
||||
@@ -43,7 +57,10 @@ nvaccess
|
||||
nvda
|
||||
oising
|
||||
oldnewthing
|
||||
opengl
|
||||
osgwiki
|
||||
pabhojwa
|
||||
panos
|
||||
paulcam
|
||||
pauldotknopf
|
||||
PGP
|
||||
@@ -51,11 +68,18 @@ Pham
|
||||
Rincewind
|
||||
rprichard
|
||||
Schoonover
|
||||
shadertoy
|
||||
Shomnipotence
|
||||
simioni
|
||||
Somuah
|
||||
sonph
|
||||
sonpham
|
||||
stakx
|
||||
talo
|
||||
thereses
|
||||
Walisch
|
||||
WDX
|
||||
Wellons
|
||||
Wirt
|
||||
Wojciech
|
||||
zadjii
|
||||
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$
|
||||
@@ -1,16 +1,23 @@
|
||||
AAAa
|
||||
AAAAA
|
||||
AAAAAAAAAAAAA
|
||||
AAAAAABBBBBBCCC
|
||||
AAAAABBBBBBCCC
|
||||
abcd
|
||||
abcd
|
||||
abcde
|
||||
abcdef
|
||||
ABCDEFG
|
||||
ABCDEFGH
|
||||
ABCDEFGHIJ
|
||||
abcdefghijk
|
||||
ABCDEFGHIJKLMNO
|
||||
abcdefghijklmnop
|
||||
ABCDEFGHIJKLMNOPQRST
|
||||
abcdefghijklmnopqrstuvwxyz
|
||||
ABCG
|
||||
ABE
|
||||
abf
|
||||
BBBBB
|
||||
BBBBBBBB
|
||||
BBBBBCCC
|
||||
BBBBCCCCC
|
||||
BBGGRR
|
||||
BBBBBBBBBBBBBBDDDD
|
||||
EFG
|
||||
EFGh
|
||||
QQQQQQQQQQABCDEFGHIJ
|
||||
@@ -19,7 +26,6 @@ QQQQQQQQQQABCDEFGHIJKLMNOPQRSTQQQQQQQQQQ
|
||||
QQQQQQQQQQABCDEFGHIJPQRSTQQQQQQQQQQ
|
||||
qrstuvwxyz
|
||||
qwerty
|
||||
QWERTYUIOP
|
||||
qwertyuiopasdfg
|
||||
YYYYYYYDDDDDDDDDDD
|
||||
ZAAZZ
|
||||
@@ -31,3 +37,4 @@ ZYXWVUT
|
||||
ZZBBZ
|
||||
ZZZBB
|
||||
ZZZBZ
|
||||
ZZZZZ
|
||||
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.*
|
||||
57
.github/workflows/linter.yml
vendored
57
.github/workflows/linter.yml
vendored
@@ -1,57 +0,0 @@
|
||||
---
|
||||
###########################
|
||||
###########################
|
||||
## Linter GitHub Actions ##
|
||||
###########################
|
||||
###########################
|
||||
name: Lint Code Base
|
||||
|
||||
#
|
||||
# Documentation:
|
||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||
#
|
||||
|
||||
###################################################
|
||||
# The linter is noisy; we used to run it on push. #
|
||||
###################################################
|
||||
#
|
||||
#on:
|
||||
# pull_request:
|
||||
# branches: [main]
|
||||
|
||||
###############
|
||||
# Set the Job #
|
||||
###############
|
||||
jobs:
|
||||
build:
|
||||
# Name the Job
|
||||
name: Lint Code Base
|
||||
# Set the agent to run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
##################
|
||||
# Load all steps #
|
||||
##################
|
||||
steps:
|
||||
##########################
|
||||
# Checkout the code base #
|
||||
##########################
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# Full git history is needed to get a proper list of changed files within `super-linter`
|
||||
fetch-depth: 0
|
||||
|
||||
################################
|
||||
# Run Linter against code base #
|
||||
################################
|
||||
- name: Lint Code Base
|
||||
uses: github/super-linter@v3
|
||||
env:
|
||||
VALIDATE_ALL_CODEBASE: false
|
||||
DEFAULT_BRANCH: main
|
||||
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VALIDATE_EDITORCONFIG: false
|
||||
# The json linter doesn't like JSONC, which we use all over. So just disable it.
|
||||
VALIDATE_JSON: false
|
||||
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.16-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 }}
|
||||
505
OpenConsole.sln
505
OpenConsole.sln
File diff suppressed because it is too large
Load Diff
@@ -685,8 +685,38 @@
|
||||
},
|
||||
"useTabSwitcher": {
|
||||
"default": true,
|
||||
"description": "When set to \"true\", the \"nextTab\" and \"prevTab\" commands will use the tab switcher UI.",
|
||||
"type": "boolean"
|
||||
"description": "Deprecated. Please use \"tabSwitcherMode\" instead.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"mru",
|
||||
"inOrder",
|
||||
"disabled",
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"deprecated": true
|
||||
},
|
||||
"tabSwitcherMode": {
|
||||
"default": true,
|
||||
"description": "When set to \"true\" or \"mru\", the \"nextTab\" and \"prevTab\" commands will use the tab switcher UI, with most-recently-used ordering. When set to \"inOrder\", these actions will switch tabs in their current ordering. Set to \"false\" to disable the tab switcher.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"mru",
|
||||
"inOrder",
|
||||
"disabled",
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -83,6 +83,8 @@ namespace SettingsModelLocalTests
|
||||
TEST_METHOD(TestCopy);
|
||||
TEST_METHOD(TestCloneInheritanceTree);
|
||||
|
||||
TEST_METHOD(TestValidDefaults);
|
||||
|
||||
TEST_CLASS_SETUP(ClassSetup)
|
||||
{
|
||||
InitializeJsonReader();
|
||||
@@ -2583,4 +2585,13 @@ namespace SettingsModelLocalTests
|
||||
verifyEmptyPD(emptyPDJson);
|
||||
verifyEmptyPD(missingPDJson);
|
||||
}
|
||||
|
||||
void DeserializationTests::TestValidDefaults()
|
||||
{
|
||||
// GH#8146: A LoadDefaults call should populate the list of active profiles
|
||||
|
||||
const auto settings{ CascadiaSettings::LoadDefaults() };
|
||||
VERIFY_ARE_EQUAL(settings.ActiveProfiles().Size(), settings.AllProfiles().Size());
|
||||
VERIFY_ARE_EQUAL(settings.AllProfiles().Size(), 2u);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,17 +7,32 @@
|
||||
#include "../TerminalApp/MinMaxCloseControl.h"
|
||||
#include "../TerminalApp/TabRowControl.h"
|
||||
#include "../TerminalApp/ShortcutActionDispatch.h"
|
||||
#include "../TerminalApp/Tab.h"
|
||||
#include "../TerminalApp/TerminalTab.h"
|
||||
#include "../CppWinrtTailored.h"
|
||||
|
||||
using namespace Microsoft::Console;
|
||||
using namespace TerminalApp;
|
||||
using namespace winrt::TerminalApp;
|
||||
using namespace winrt::Microsoft::Terminal::Settings::Model;
|
||||
|
||||
using namespace WEX::Logging;
|
||||
using namespace WEX::TestExecution;
|
||||
using namespace WEX::Common;
|
||||
|
||||
using namespace winrt::Windows::ApplicationModel::DataTransfer;
|
||||
using namespace winrt::Windows::Foundation::Collections;
|
||||
using namespace winrt::Windows::System;
|
||||
using namespace winrt::Windows::UI::Xaml;
|
||||
using namespace winrt::Windows::UI::Xaml::Controls;
|
||||
using namespace winrt::Windows::UI::Core;
|
||||
using namespace winrt::Windows::UI::Text;
|
||||
|
||||
namespace winrt
|
||||
{
|
||||
namespace MUX = Microsoft::UI::Xaml;
|
||||
namespace WUX = Windows::UI::Xaml;
|
||||
using IInspectable = Windows::Foundation::IInspectable;
|
||||
}
|
||||
|
||||
namespace TerminalAppLocalTests
|
||||
{
|
||||
@@ -66,6 +81,8 @@ namespace TerminalAppLocalTests
|
||||
TEST_METHOD(MoveFocusFromZoomedPane);
|
||||
TEST_METHOD(CloseZoomedPane);
|
||||
|
||||
TEST_METHOD(NextMRUTab);
|
||||
|
||||
TEST_CLASS_SETUP(ClassSetup)
|
||||
{
|
||||
return true;
|
||||
@@ -82,6 +99,13 @@ namespace TerminalAppLocalTests
|
||||
winrt::com_ptr<winrt::TerminalApp::implementation::TerminalPage> _commonSetup();
|
||||
};
|
||||
|
||||
template<typename TFunction>
|
||||
void TestOnUIThread(const TFunction& function)
|
||||
{
|
||||
const auto result = RunOnUIThread(function);
|
||||
VERIFY_SUCCEEDED(result);
|
||||
}
|
||||
|
||||
void TabTests::EnsureTestsActivate()
|
||||
{
|
||||
// This test was originally used to ensure that XAML Islands was
|
||||
@@ -250,8 +274,8 @@ namespace TerminalAppLocalTests
|
||||
// In the real app, this isn't a problem, but doesn't happen
|
||||
// reliably in the unit tests.
|
||||
Log::Comment(L"Ensure we set the first tab as the selected one.");
|
||||
auto tab{ page->_GetStrongTabImpl(0) };
|
||||
page->_tabView.SelectedItem(tab->GetTabViewItem());
|
||||
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
|
||||
page->_tabView.SelectedItem(tab->TabViewItem());
|
||||
page->_UpdatedSelectedTab(0);
|
||||
});
|
||||
VERIFY_SUCCEEDED(result);
|
||||
@@ -453,7 +477,7 @@ namespace TerminalAppLocalTests
|
||||
|
||||
result = RunOnUIThread([&page]() {
|
||||
VERIFY_ARE_EQUAL(1u, page->_tabs.Size());
|
||||
auto tab = page->_GetStrongTabImpl(0);
|
||||
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
|
||||
VERIFY_ARE_EQUAL(1, tab->GetLeafPaneCount());
|
||||
});
|
||||
VERIFY_SUCCEEDED(result);
|
||||
@@ -463,7 +487,7 @@ namespace TerminalAppLocalTests
|
||||
page->_SplitPane(SplitState::Automatic, SplitType::Duplicate, nullptr);
|
||||
|
||||
VERIFY_ARE_EQUAL(1u, page->_tabs.Size());
|
||||
auto tab = page->_GetStrongTabImpl(0);
|
||||
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
|
||||
VERIFY_ARE_EQUAL(2, tab->GetLeafPaneCount());
|
||||
});
|
||||
VERIFY_SUCCEEDED(result);
|
||||
@@ -481,7 +505,7 @@ namespace TerminalAppLocalTests
|
||||
page->_SplitPane(SplitState::Automatic, SplitType::Duplicate, nullptr);
|
||||
|
||||
VERIFY_ARE_EQUAL(1u, page->_tabs.Size());
|
||||
auto tab = page->_GetStrongTabImpl(0);
|
||||
auto tab = page->_GetTerminalTabImpl(page->_tabs.GetAt(0));
|
||||
VERIFY_ARE_EQUAL(2,
|
||||
tab->GetLeafPaneCount(),
|
||||
L"We should gracefully do nothing here - the profile no longer exists.");
|
||||
@@ -513,16 +537,31 @@ namespace TerminalAppLocalTests
|
||||
const std::string settingsJson0{ R"(
|
||||
{
|
||||
"defaultProfile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}",
|
||||
"showTabsInTitlebar": false,
|
||||
"profiles": [
|
||||
{
|
||||
"name" : "profile0",
|
||||
"guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}",
|
||||
"tabTitle" : "Profile 0",
|
||||
"historySize": 1
|
||||
},
|
||||
{
|
||||
"name" : "profile1",
|
||||
"guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}",
|
||||
"tabTitle" : "Profile 1",
|
||||
"historySize": 2
|
||||
},
|
||||
{
|
||||
"name" : "profile2",
|
||||
"guid": "{6239a42c-3333-49a3-80bd-e8fdd045185c}",
|
||||
"tabTitle" : "Profile 2",
|
||||
"historySize": 3
|
||||
},
|
||||
{
|
||||
"name" : "profile3",
|
||||
"guid": "{6239a42c-4444-49a3-80bd-e8fdd045185c}",
|
||||
"tabTitle" : "Profile 3",
|
||||
"historySize": 4
|
||||
}
|
||||
]
|
||||
})" };
|
||||
@@ -562,7 +601,7 @@ namespace TerminalAppLocalTests
|
||||
ActionEventArgs eventArgs{ args };
|
||||
// eventArgs.Args(args);
|
||||
page->_HandleSplitPane(nullptr, eventArgs);
|
||||
auto firstTab = page->_GetStrongTabImpl(0);
|
||||
auto firstTab = page->_GetTerminalTabImpl(0);
|
||||
|
||||
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
|
||||
VERIFY_IS_FALSE(firstTab->IsZoomed());
|
||||
@@ -573,7 +612,7 @@ namespace TerminalAppLocalTests
|
||||
result = RunOnUIThread([&page]() {
|
||||
ActionEventArgs eventArgs{};
|
||||
page->_HandleTogglePaneZoom(nullptr, eventArgs);
|
||||
auto firstTab = page->_GetStrongTabImpl(0);
|
||||
auto firstTab = page->_GetTerminalTabImpl(0);
|
||||
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
|
||||
VERIFY_IS_TRUE(firstTab->IsZoomed());
|
||||
});
|
||||
@@ -583,7 +622,7 @@ namespace TerminalAppLocalTests
|
||||
result = RunOnUIThread([&page]() {
|
||||
ActionEventArgs eventArgs{};
|
||||
page->_HandleTogglePaneZoom(nullptr, eventArgs);
|
||||
auto firstTab = page->_GetStrongTabImpl(0);
|
||||
auto firstTab = page->_GetTerminalTabImpl(0);
|
||||
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
|
||||
VERIFY_IS_FALSE(firstTab->IsZoomed());
|
||||
});
|
||||
@@ -600,7 +639,7 @@ namespace TerminalAppLocalTests
|
||||
SplitPaneArgs args{ SplitType::Duplicate };
|
||||
ActionEventArgs eventArgs{ args };
|
||||
page->_HandleSplitPane(nullptr, eventArgs);
|
||||
auto firstTab = page->_GetStrongTabImpl(0);
|
||||
auto firstTab = page->_GetTerminalTabImpl(0);
|
||||
|
||||
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
|
||||
VERIFY_IS_FALSE(firstTab->IsZoomed());
|
||||
@@ -614,7 +653,7 @@ namespace TerminalAppLocalTests
|
||||
|
||||
page->_HandleTogglePaneZoom(nullptr, eventArgs);
|
||||
|
||||
auto firstTab = page->_GetStrongTabImpl(0);
|
||||
auto firstTab = page->_GetTerminalTabImpl(0);
|
||||
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
|
||||
VERIFY_IS_TRUE(firstTab->IsZoomed());
|
||||
});
|
||||
@@ -628,7 +667,7 @@ namespace TerminalAppLocalTests
|
||||
|
||||
page->_HandleMoveFocus(nullptr, eventArgs);
|
||||
|
||||
auto firstTab = page->_GetStrongTabImpl(0);
|
||||
auto firstTab = page->_GetTerminalTabImpl(0);
|
||||
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
|
||||
VERIFY_IS_FALSE(firstTab->IsZoomed());
|
||||
});
|
||||
@@ -645,7 +684,7 @@ namespace TerminalAppLocalTests
|
||||
SplitPaneArgs args{ SplitType::Duplicate };
|
||||
ActionEventArgs eventArgs{ args };
|
||||
page->_HandleSplitPane(nullptr, eventArgs);
|
||||
auto firstTab = page->_GetStrongTabImpl(0);
|
||||
auto firstTab = page->_GetTerminalTabImpl(0);
|
||||
|
||||
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
|
||||
VERIFY_IS_FALSE(firstTab->IsZoomed());
|
||||
@@ -659,7 +698,7 @@ namespace TerminalAppLocalTests
|
||||
|
||||
page->_HandleTogglePaneZoom(nullptr, eventArgs);
|
||||
|
||||
auto firstTab = page->_GetStrongTabImpl(0);
|
||||
auto firstTab = page->_GetTerminalTabImpl(0);
|
||||
VERIFY_ARE_EQUAL(2, firstTab->GetLeafPaneCount());
|
||||
VERIFY_IS_TRUE(firstTab->IsZoomed());
|
||||
});
|
||||
@@ -672,7 +711,7 @@ namespace TerminalAppLocalTests
|
||||
|
||||
page->_HandleClosePane(nullptr, eventArgs);
|
||||
|
||||
auto firstTab = page->_GetStrongTabImpl(0);
|
||||
auto firstTab = page->_GetTerminalTabImpl(0);
|
||||
VERIFY_IS_FALSE(firstTab->IsZoomed());
|
||||
});
|
||||
VERIFY_SUCCEEDED(result);
|
||||
@@ -683,10 +722,130 @@ namespace TerminalAppLocalTests
|
||||
Log::Comment(L"Check to ensure there's only one pane left.");
|
||||
|
||||
result = RunOnUIThread([&page]() {
|
||||
auto firstTab = page->_GetStrongTabImpl(0);
|
||||
auto firstTab = page->_GetTerminalTabImpl(0);
|
||||
VERIFY_ARE_EQUAL(1, firstTab->GetLeafPaneCount());
|
||||
VERIFY_IS_FALSE(firstTab->IsZoomed());
|
||||
});
|
||||
VERIFY_SUCCEEDED(result);
|
||||
}
|
||||
|
||||
void TabTests::NextMRUTab()
|
||||
{
|
||||
// This is a test for GH#8025 - we want to make sure that we can do both
|
||||
// in-order and MRU tab traversal, using the tab switcher and with the
|
||||
// tab switcher disabled.
|
||||
|
||||
auto page = _commonSetup();
|
||||
|
||||
Log::Comment(L"Create a second tab");
|
||||
TestOnUIThread([&page]() {
|
||||
NewTerminalArgs newTerminalArgs{ 1 };
|
||||
page->_OpenNewTab(newTerminalArgs);
|
||||
});
|
||||
VERIFY_ARE_EQUAL(2u, page->_tabs.Size());
|
||||
|
||||
Log::Comment(L"Create a third tab");
|
||||
TestOnUIThread([&page]() {
|
||||
NewTerminalArgs newTerminalArgs{ 2 };
|
||||
page->_OpenNewTab(newTerminalArgs);
|
||||
});
|
||||
VERIFY_ARE_EQUAL(3u, page->_tabs.Size());
|
||||
|
||||
Log::Comment(L"Create a fourth tab");
|
||||
TestOnUIThread([&page]() {
|
||||
NewTerminalArgs newTerminalArgs{ 3 };
|
||||
page->_OpenNewTab(newTerminalArgs);
|
||||
});
|
||||
VERIFY_ARE_EQUAL(4u, page->_tabs.Size());
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
uint32_t focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(3u, focusedIndex, L"Verify the fourth tab is the focused one");
|
||||
});
|
||||
|
||||
Log::Comment(L"Select the second tab");
|
||||
TestOnUIThread([&page]() {
|
||||
page->_SelectTab(1);
|
||||
});
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
uint32_t focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(1u, focusedIndex, L"Verify the second tab is the focused one");
|
||||
});
|
||||
|
||||
Log::Comment(L"Change the tab switch order to MRU switching");
|
||||
TestOnUIThread([&page]() {
|
||||
page->_settings.GlobalSettings().TabSwitcherMode(TabSwitcherMode::MostRecentlyUsed);
|
||||
});
|
||||
|
||||
Log::Comment(L"Switch to the next MRU tab, which is the fourth tab");
|
||||
TestOnUIThread([&page]() {
|
||||
ActionEventArgs eventArgs{};
|
||||
page->_HandleNextTab(nullptr, eventArgs);
|
||||
});
|
||||
|
||||
Log::Comment(L"Sleep to let events propagate");
|
||||
Sleep(250);
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
Log::Comment(L"Hide the command palette, to confirm the selection");
|
||||
// If you don't do this, the palette will just stay open, and the
|
||||
// next time we call _HandleNextTab, we'll continue traversing the
|
||||
// MRU list, instead of just hoping one entry.
|
||||
page->CommandPalette().Visibility(Visibility::Collapsed);
|
||||
});
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
uint32_t focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(3u, focusedIndex, L"Verify the fourth tab is the focused one");
|
||||
});
|
||||
|
||||
Log::Comment(L"Switch to the next MRU tab, which is the second tab");
|
||||
TestOnUIThread([&page]() {
|
||||
ActionEventArgs eventArgs{};
|
||||
page->_HandleNextTab(nullptr, eventArgs);
|
||||
});
|
||||
|
||||
Log::Comment(L"Sleep to let events propagate");
|
||||
Sleep(250);
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
Log::Comment(L"Hide the command palette, to confirm the selection");
|
||||
// If you don't do this, the palette will just stay open, and the
|
||||
// next time we call _HandleNextTab, we'll continue traversing the
|
||||
// MRU list, instead of just hoping one entry.
|
||||
page->CommandPalette().Visibility(Visibility::Collapsed);
|
||||
});
|
||||
|
||||
TestOnUIThread([&page]() {
|
||||
uint32_t focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(1u, focusedIndex, L"Verify the second tab is the focused one");
|
||||
});
|
||||
|
||||
Log::Comment(L"Change the tab switch order to in-order switching");
|
||||
page->_settings.GlobalSettings().TabSwitcherMode(TabSwitcherMode::InOrder);
|
||||
|
||||
Log::Comment(L"Switch to the next in-order tab, which is the third tab");
|
||||
TestOnUIThread([&page]() {
|
||||
ActionEventArgs eventArgs{};
|
||||
page->_HandleNextTab(nullptr, eventArgs);
|
||||
});
|
||||
TestOnUIThread([&page]() {
|
||||
uint32_t focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(2u, focusedIndex, L"Verify the third tab is the focused one");
|
||||
});
|
||||
|
||||
Log::Comment(L"Change the tab switch order to not use the tab switcher (which is in-order always)");
|
||||
page->_settings.GlobalSettings().TabSwitcherMode(TabSwitcherMode::Disabled);
|
||||
|
||||
Log::Comment(L"Switch to the next in-order tab, which is the fourth tab");
|
||||
TestOnUIThread([&page]() {
|
||||
ActionEventArgs eventArgs{};
|
||||
page->_HandleNextTab(nullptr, eventArgs);
|
||||
});
|
||||
TestOnUIThread([&page]() {
|
||||
uint32_t focusedIndex = page->_GetFocusedTabIndex().value_or(-1);
|
||||
VERIFY_ARE_EQUAL(3u, focusedIndex, L"Verify the fourth tab is the focused one");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,21 +130,26 @@ namespace winrt::TerminalApp::implementation
|
||||
void TerminalPage::_HandleTogglePaneZoom(const IInspectable& /*sender*/,
|
||||
const ActionEventArgs& args)
|
||||
{
|
||||
auto activeTab = _GetFocusedTab();
|
||||
|
||||
// Don't do anything if there's only one pane. It's already zoomed.
|
||||
if (activeTab && activeTab->GetLeafPaneCount() > 1)
|
||||
if (auto focusedTab = _GetFocusedTab())
|
||||
{
|
||||
// First thing's first, remove the current content from the UI
|
||||
// tree. This is important, because we might be leaving zoom, and if
|
||||
// a pane is zoomed, then it's currently in the UI tree, and should
|
||||
// be removed before it's re-added in Pane::Restore
|
||||
_tabContent.Children().Clear();
|
||||
if (auto activeTab = _GetTerminalTabImpl(focusedTab))
|
||||
{
|
||||
// Don't do anything if there's only one pane. It's already zoomed.
|
||||
if (activeTab && activeTab->GetLeafPaneCount() > 1)
|
||||
{
|
||||
// First thing's first, remove the current content from the UI
|
||||
// tree. This is important, because we might be leaving zoom, and if
|
||||
// a pane is zoomed, then it's currently in the UI tree, and should
|
||||
// be removed before it's re-added in Pane::Restore
|
||||
_tabContent.Children().Clear();
|
||||
|
||||
// Togging the zoom on the tab will cause the tab to inform us of
|
||||
// the new root Content for this tab.
|
||||
activeTab->ToggleZoom();
|
||||
// Togging the zoom on the tab will cause the tab to inform us of
|
||||
// the new root Content for this tab.
|
||||
activeTab->ToggleZoom();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
args.Handled(true);
|
||||
}
|
||||
|
||||
@@ -323,16 +328,19 @@ namespace winrt::TerminalApp::implementation
|
||||
args.Handled(false);
|
||||
if (const auto& realArgs = args.ActionArgs().try_as<SetColorSchemeArgs>())
|
||||
{
|
||||
if (auto activeTab = _GetFocusedTab())
|
||||
if (auto focusedTab = _GetFocusedTab())
|
||||
{
|
||||
if (auto activeControl = activeTab->GetActiveTerminalControl())
|
||||
if (auto activeTab = _GetTerminalTabImpl(focusedTab))
|
||||
{
|
||||
if (const auto scheme = _settings.GlobalSettings().ColorSchemes().TryLookup(realArgs.SchemeName()))
|
||||
if (auto activeControl = activeTab->GetActiveTerminalControl())
|
||||
{
|
||||
auto controlSettings = activeControl.Settings().as<TerminalSettings>();
|
||||
controlSettings->ApplyColorScheme(scheme);
|
||||
activeControl.UpdateSettings(*controlSettings);
|
||||
args.Handled(true);
|
||||
if (const auto scheme = _settings.GlobalSettings().ColorSchemes().TryLookup(realArgs.SchemeName()))
|
||||
{
|
||||
auto controlSettings = activeControl.Settings().as<TerminalSettings>();
|
||||
controlSettings->ApplyColorScheme(scheme);
|
||||
activeControl.UpdateSettings(*controlSettings);
|
||||
args.Handled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,16 +360,18 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
}
|
||||
|
||||
auto activeTab = _GetFocusedTab();
|
||||
if (activeTab)
|
||||
if (auto focusedTab = _GetFocusedTab())
|
||||
{
|
||||
if (tabColor.has_value())
|
||||
if (auto activeTab = _GetTerminalTabImpl(focusedTab))
|
||||
{
|
||||
activeTab->SetRuntimeTabColor(tabColor.value());
|
||||
}
|
||||
else
|
||||
{
|
||||
activeTab->ResetRuntimeTabColor();
|
||||
if (tabColor.has_value())
|
||||
{
|
||||
activeTab->SetRuntimeTabColor(tabColor.value());
|
||||
}
|
||||
else
|
||||
{
|
||||
activeTab->ResetRuntimeTabColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
args.Handled(true);
|
||||
@@ -370,10 +380,12 @@ namespace winrt::TerminalApp::implementation
|
||||
void TerminalPage::_HandleOpenTabColorPicker(const IInspectable& /*sender*/,
|
||||
const ActionEventArgs& args)
|
||||
{
|
||||
auto activeTab = _GetFocusedTab();
|
||||
if (activeTab)
|
||||
if (auto focusedTab = _GetFocusedTab())
|
||||
{
|
||||
activeTab->ActivateColorPicker();
|
||||
if (auto activeTab = _GetTerminalTabImpl(focusedTab))
|
||||
{
|
||||
activeTab->ActivateColorPicker();
|
||||
}
|
||||
}
|
||||
args.Handled(true);
|
||||
}
|
||||
@@ -388,16 +400,18 @@ namespace winrt::TerminalApp::implementation
|
||||
title = realArgs.Title();
|
||||
}
|
||||
|
||||
auto activeTab = _GetFocusedTab();
|
||||
if (activeTab)
|
||||
if (auto focusedTab = _GetFocusedTab())
|
||||
{
|
||||
if (title.has_value())
|
||||
if (auto activeTab = _GetTerminalTabImpl(focusedTab))
|
||||
{
|
||||
activeTab->SetTabText(title.value());
|
||||
}
|
||||
else
|
||||
{
|
||||
activeTab->ResetTabText();
|
||||
if (title.has_value())
|
||||
{
|
||||
activeTab->SetTabText(title.value());
|
||||
}
|
||||
else
|
||||
{
|
||||
activeTab->ResetTabText();
|
||||
}
|
||||
}
|
||||
}
|
||||
args.Handled(true);
|
||||
@@ -406,10 +420,12 @@ namespace winrt::TerminalApp::implementation
|
||||
void TerminalPage::_HandleOpenTabRenamer(const IInspectable& /*sender*/,
|
||||
const ActionEventArgs& args)
|
||||
{
|
||||
auto activeTab = _GetFocusedTab();
|
||||
if (activeTab)
|
||||
if (auto focusedTab = _GetFocusedTab())
|
||||
{
|
||||
activeTab->ActivateTabRenamer();
|
||||
if (auto activeTab = _GetTerminalTabImpl(focusedTab))
|
||||
{
|
||||
activeTab->ActivateTabRenamer();
|
||||
}
|
||||
}
|
||||
args.Handled(true);
|
||||
}
|
||||
@@ -508,12 +524,7 @@ namespace winrt::TerminalApp::implementation
|
||||
const ActionEventArgs& args)
|
||||
{
|
||||
// Tab search is always in-order.
|
||||
auto tabCommands = winrt::single_threaded_vector<Command>();
|
||||
for (const auto& tab : _tabs)
|
||||
{
|
||||
tabCommands.Append(tab.SwitchToTabCommand());
|
||||
}
|
||||
CommandPalette().SetTabActions(tabCommands);
|
||||
_UpdatePaletteWithInOrderTabs();
|
||||
|
||||
auto opt = _GetFocusedTabIndex();
|
||||
uint32_t startIdx = opt.value_or(0);
|
||||
|
||||
@@ -470,6 +470,11 @@ namespace winrt::TerminalApp::implementation
|
||||
void AppLogic::_OnLoaded(const IInspectable& /*sender*/,
|
||||
const RoutedEventArgs& /*eventArgs*/)
|
||||
{
|
||||
const auto keyboardServiceIsDisabled = !_IsKeyboardServiceEnabled();
|
||||
if (keyboardServiceIsDisabled)
|
||||
{
|
||||
_root->ShowKeyboardServiceWarning();
|
||||
}
|
||||
if (FAILED(_settingsLoadedResult))
|
||||
{
|
||||
const winrt::hstring titleKey = USES_RESOURCE(L"InitialJsonParseErrorTitle");
|
||||
@@ -482,6 +487,51 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Helper for determining if the "Touch Keyboard and Handwriting Panel
|
||||
// Service" is enabled. If it isn't, we want to be able to display a
|
||||
// warning to the user, because they won't be able to type in the
|
||||
// Terminal.
|
||||
// Return Value:
|
||||
// - true if the service is enabled, or if we fail to query the service. We
|
||||
// return true in that case, to be less noisy (though, that is unexpected)
|
||||
bool AppLogic::_IsKeyboardServiceEnabled()
|
||||
{
|
||||
if (IsUwp())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// If at any point we fail to open the service manager, the service,
|
||||
// etc, then just quick return true to disable the dialog. We'd rather
|
||||
// not be noisy with this dialog if we failed for some reason.
|
||||
|
||||
// Open the service manager. This will return 0 if it failed.
|
||||
wil::unique_schandle hManager{ OpenSCManager(nullptr, nullptr, 0) };
|
||||
|
||||
if (LOG_LAST_ERROR_IF(!hManager.is_valid()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Get a handle to the keyboard service
|
||||
wil::unique_schandle hService{ OpenService(hManager.get(), TabletInputServiceKey.data(), SERVICE_QUERY_STATUS) };
|
||||
if (LOG_LAST_ERROR_IF(!hService.is_valid()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Get the current state of the service
|
||||
SERVICE_STATUS status{ 0 };
|
||||
if (!LOG_IF_WIN32_BOOL_FALSE(QueryServiceStatus(hService.get(), &status)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
const auto state = status.dwCurrentState;
|
||||
return (state == SERVICE_RUNNING || state == SERVICE_START_PENDING);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Get the size in pixels of the client area we'll need to launch this
|
||||
// terminal app. This method will use the default profile's settings to do
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "AppLogic.g.h"
|
||||
|
||||
#include "Tab.h"
|
||||
#include "TerminalPage.h"
|
||||
#include "Jumplist.h"
|
||||
#include "../../cascadia/inc/cppwinrt_utils.h"
|
||||
@@ -86,6 +84,8 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
void _ShowLoadErrorsDialog(const winrt::hstring& titleKey, const winrt::hstring& contentKey, HRESULT settingsLoadedResult);
|
||||
void _ShowLoadWarningsDialog();
|
||||
bool _IsKeyboardServiceEnabled();
|
||||
void _ShowKeyboardServiceDisabledDialog();
|
||||
|
||||
fire_and_forget _LoadErrorsDialogRoutine();
|
||||
fire_and_forget _ShowLoadWarningsDialogRoutine();
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace winrt::TerminalApp::implementation
|
||||
_nestedActionStack = winrt::single_threaded_vector<Command>();
|
||||
_currentNestedCommands = winrt::single_threaded_vector<Command>();
|
||||
_allCommands = winrt::single_threaded_vector<Command>();
|
||||
_allTabActions = winrt::single_threaded_vector<Command>();
|
||||
_tabActions = winrt::single_threaded_vector<Command>();
|
||||
|
||||
_switchToMode(CommandPaletteMode::ActionMode);
|
||||
|
||||
@@ -51,9 +51,9 @@ namespace winrt::TerminalApp::implementation
|
||||
if (_currentMode == CommandPaletteMode::TabSwitchMode)
|
||||
{
|
||||
_searchBox().Visibility(Visibility::Collapsed);
|
||||
_filteredActionsView().Focus(FocusState::Keyboard);
|
||||
_filteredActionsView().SelectedIndex(_switcherStartIdx);
|
||||
_filteredActionsView().ScrollIntoView(_filteredActionsView().SelectedItem());
|
||||
_filteredActionsView().Focus(FocusState::Keyboard);
|
||||
|
||||
// Do this right after becoming visible so we can quickly catch scenarios where
|
||||
// modifiers aren't held down (e.g. command palette invocation).
|
||||
@@ -61,9 +61,9 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
else
|
||||
{
|
||||
_filteredActionsView().SelectedIndex(0);
|
||||
_searchBox().Focus(FocusState::Programmatic);
|
||||
_updateFilteredActions();
|
||||
_filteredActionsView().SelectedIndex(0);
|
||||
}
|
||||
|
||||
TraceLoggingWrite(
|
||||
@@ -428,6 +428,25 @@ namespace winrt::TerminalApp::implementation
|
||||
_dispatchCommand(e.ClickedItem().try_as<Command>());
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// This event is called when the user clicks on an ChevronLeft button right
|
||||
// next to the ParentCommandName (e.g. New Tab...) above the subcommands list.
|
||||
// It'll go up a level when the users click the button.
|
||||
// Arguments:
|
||||
// - sender: the button that got clicked
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void CommandPalette::_moveBackButtonClicked(Windows::Foundation::IInspectable const& /*sender*/,
|
||||
Windows::UI::Xaml::RoutedEventArgs const&)
|
||||
{
|
||||
_nestedActionStack.Clear();
|
||||
ParentCommandName(L"");
|
||||
_currentNestedCommands.Clear();
|
||||
_searchBox().Focus(FocusState::Programmatic);
|
||||
_updateFilteredActions();
|
||||
_filteredActionsView().SelectedIndex(0);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - This is called when the user selects a command with subcommands. It
|
||||
// will update our UI to now display the list of subcommands instead, and
|
||||
@@ -472,8 +491,9 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
return _allCommands;
|
||||
case CommandPaletteMode::TabSearchMode:
|
||||
return _tabActions;
|
||||
case CommandPaletteMode::TabSwitchMode:
|
||||
return _allTabActions;
|
||||
return _tabActions;
|
||||
case CommandPaletteMode::CommandlineMode:
|
||||
return winrt::single_threaded_vector<Command>();
|
||||
default:
|
||||
@@ -684,9 +704,20 @@ namespace winrt::TerminalApp::implementation
|
||||
_updateFilteredActions();
|
||||
}
|
||||
|
||||
void CommandPalette::SetTabActions(Collections::IVector<Command> const& tabs)
|
||||
void CommandPalette::SetTabActions(Collections::IVector<Command> const& tabs, const bool clearList)
|
||||
{
|
||||
_allTabActions = tabs;
|
||||
_tabActions = tabs;
|
||||
// The smooth remove/add animations that happen during
|
||||
// UpdateFilteredActions don't work very well with changing the tab
|
||||
// order, because of the sheer amount of remove/adds. So, let's just
|
||||
// clear & rebuild the list when we change the set of tabs.
|
||||
//
|
||||
// Some callers might actually want smooth updating, like when the list
|
||||
// of tabs changes.
|
||||
if (clearList && _currentMode == CommandPaletteMode::TabSwitchMode)
|
||||
{
|
||||
_filteredActions.Clear();
|
||||
}
|
||||
_updateFilteredActions();
|
||||
}
|
||||
|
||||
@@ -1066,4 +1097,5 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
_updateFilteredActions();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace winrt::TerminalApp::implementation
|
||||
Windows::Foundation::Collections::IObservableVector<Microsoft::Terminal::Settings::Model::Command> FilteredActions();
|
||||
|
||||
void SetCommands(Windows::Foundation::Collections::IVector<Microsoft::Terminal::Settings::Model::Command> const& actions);
|
||||
void SetTabActions(Windows::Foundation::Collections::IVector<Microsoft::Terminal::Settings::Model::Command> const& tabs);
|
||||
void SetTabActions(Windows::Foundation::Collections::IVector<Microsoft::Terminal::Settings::Model::Command> const& tabs, const bool clearList);
|
||||
void SetKeyBindings(Microsoft::Terminal::TerminalControl::IKeyBindings bindings);
|
||||
|
||||
void EnableCommandPaletteMode();
|
||||
@@ -40,6 +40,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
// Tab Switcher
|
||||
void EnableTabSwitcherMode(const bool searchMode, const uint32_t startIdx);
|
||||
void SetTabSwitchOrder(const Microsoft::Terminal::Settings::Model::TabSwitcherMode order);
|
||||
|
||||
WINRT_CALLBACK(PropertyChanged, Windows::UI::Xaml::Data::PropertyChangedEventHandler);
|
||||
OBSERVABLE_GETSET_PROPERTY(winrt::hstring, NoMatchesText, _PropertyChangedHandlers);
|
||||
@@ -57,7 +58,6 @@ namespace winrt::TerminalApp::implementation
|
||||
Windows::Foundation::Collections::IVector<Microsoft::Terminal::Settings::Model::Command> _nestedActionStack{ nullptr };
|
||||
|
||||
winrt::TerminalApp::ShortcutActionDispatch _dispatch;
|
||||
|
||||
Windows::Foundation::Collections::IVector<Microsoft::Terminal::Settings::Model::Command> _commandsToFilter();
|
||||
|
||||
bool _lastFilterTextWasEmpty{ true };
|
||||
@@ -81,6 +81,8 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
void _listItemClicked(Windows::Foundation::IInspectable const& sender, Windows::UI::Xaml::Controls::ItemClickEventArgs const& e);
|
||||
|
||||
void _moveBackButtonClicked(Windows::Foundation::IInspectable const& sender, Windows::UI::Xaml::RoutedEventArgs const&);
|
||||
|
||||
void _updateFilteredActions();
|
||||
|
||||
std::vector<Microsoft::Terminal::Settings::Model::Command> _collectFilteredActions();
|
||||
@@ -97,7 +99,7 @@ namespace winrt::TerminalApp::implementation
|
||||
Microsoft::Terminal::TerminalControl::IKeyBindings _bindings;
|
||||
|
||||
// Tab Switcher
|
||||
Windows::Foundation::Collections::IVector<Microsoft::Terminal::Settings::Model::Command> _allTabActions{ nullptr };
|
||||
Windows::Foundation::Collections::IVector<Microsoft::Terminal::Settings::Model::Command> _tabActions{ nullptr };
|
||||
uint32_t _switcherStartIdx;
|
||||
void _anchorKeyUpHandler();
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace TerminalApp
|
||||
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Model.Command> FilteredActions { get; };
|
||||
|
||||
void SetCommands(Windows.Foundation.Collections.IVector<Microsoft.Terminal.Settings.Model.Command> actions);
|
||||
void SetTabActions(Windows.Foundation.Collections.IVector<Microsoft.Terminal.Settings.Model.Command> tabs);
|
||||
void SetTabActions(Windows.Foundation.Collections.IVector<Microsoft.Terminal.Settings.Model.Command> tabs, Boolean clearList);
|
||||
void SetKeyBindings(Microsoft.Terminal.TerminalControl.IKeyBindings bindings);
|
||||
void EnableCommandPaletteMode();
|
||||
|
||||
|
||||
@@ -186,16 +186,36 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
>
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock
|
||||
Padding="16, 0, 16, 4"
|
||||
x:Name="_parentCommandText"
|
||||
FontStyle="Italic"
|
||||
Visibility="{x:Bind ParentCommandName,
|
||||
Mode=OneWay,
|
||||
Converter={StaticResource ParentCommandVisibilityConverter}}"
|
||||
Grid.Row="1"
|
||||
Text="{x:Bind ParentCommandName, Mode=OneWay}">
|
||||
</TextBlock>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Padding="16, 0, 16, 4"
|
||||
Grid.Row="1"
|
||||
Visibility="{x:Bind ParentCommandName,
|
||||
Mode=OneWay,
|
||||
Converter={StaticResource ParentCommandVisibilityConverter}}">
|
||||
|
||||
<Button
|
||||
Background="Transparent"
|
||||
x:Name="_parentCommandBackButton"
|
||||
x:Uid="ParentCommandBackButton"
|
||||
Click="_moveBackButtonClicked"
|
||||
ClickMode="Press"
|
||||
VerticalAlignment="Center">
|
||||
<FontIcon
|
||||
FontSize="12"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
Glyph="">
|
||||
</FontIcon>
|
||||
</Button>
|
||||
|
||||
<TextBlock
|
||||
Padding="16, 0, 16, 4"
|
||||
x:Name="_parentCommandText"
|
||||
FontStyle="Italic"
|
||||
Grid.Row="1"
|
||||
Text="{x:Bind ParentCommandName, Mode=OneWay}"
|
||||
VerticalAlignment="Center">
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
Padding="16"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
@@ -26,36 +26,36 @@
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
@@ -149,6 +149,16 @@
|
||||
<data name="SettingsValidateErrorTitle" xml:space="preserve">
|
||||
<value>Encountered errors while loading user settings</value>
|
||||
</data>
|
||||
<data name="KeyboardServiceDisabledDialog.PrimaryButtonText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="KeyboardServiceDisabledDialog.Title" xml:space="preserve">
|
||||
<value>Warning:</value>
|
||||
</data>
|
||||
<data name="KeyboardServiceWarningText" xml:space="preserve">
|
||||
<value>The "{0}" isn't running on your machine. This can prevent the Terminal from receiving keyboard input.</value>
|
||||
<comment>{0} will be replaced with the OS-localized name of the TabletInputService</comment>
|
||||
</data>
|
||||
<data name="Ok" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
@@ -472,4 +482,10 @@
|
||||
<data name="FailedToWriteToSettings" xml:space="preserve">
|
||||
<value>We could not write to your settings file. Check the permissions on that file to ensure that the read-only flag is not set and that write access is granted.</value>
|
||||
</data>
|
||||
<data name="ParentCommandBackButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Back</value>
|
||||
</data>
|
||||
<data name="ParentCommandBackButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Back</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
import "ShortcutActionDispatch.idl";
|
||||
|
||||
namespace TerminalApp
|
||||
{
|
||||
[default_interface] runtimeclass Tab : Windows.UI.Xaml.Data.INotifyPropertyChanged
|
||||
{
|
||||
String Title { get; };
|
||||
Windows.UI.Xaml.Controls.IconSource IconSource { get; };
|
||||
Microsoft.Terminal.Settings.Model.Command SwitchToTabCommand { get; };
|
||||
UInt32 TabViewIndex { get; };
|
||||
|
||||
Windows.UI.Xaml.UIElement Content { get; };
|
||||
|
||||
void SetDispatch(ShortcutActionDispatch dispatch);
|
||||
}
|
||||
}
|
||||
148
src/cascadia/TerminalApp/TabBase.cpp
Normal file
148
src/cascadia/TerminalApp/TabBase.cpp
Normal file
@@ -0,0 +1,148 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "pch.h"
|
||||
#include <LibraryResources.h>
|
||||
#include "TabBase.h"
|
||||
#include "TabBase.g.cpp"
|
||||
|
||||
using namespace winrt;
|
||||
using namespace winrt::Windows::UI::Xaml;
|
||||
using namespace winrt::Windows::UI::Core;
|
||||
using namespace winrt::Microsoft::Terminal::TerminalControl;
|
||||
using namespace winrt::Microsoft::Terminal::Settings::Model;
|
||||
using namespace winrt::Windows::System;
|
||||
|
||||
namespace winrt
|
||||
{
|
||||
namespace MUX = Microsoft::UI::Xaml;
|
||||
namespace WUX = Windows::UI::Xaml;
|
||||
}
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
WUX::FocusState TabBase::FocusState() const noexcept
|
||||
{
|
||||
return _focusState;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Prepares this tab for being removed from the UI hierarchy
|
||||
void TabBase::Shutdown()
|
||||
{
|
||||
Content(nullptr);
|
||||
_ClosedHandlers(nullptr, nullptr);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Creates a context menu attached to the tab.
|
||||
// Currently contains elements allowing the user to close the selected tab
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void TabBase::_CreateContextMenu()
|
||||
{
|
||||
auto weakThis{ get_weak() };
|
||||
|
||||
// Close
|
||||
Controls::MenuFlyoutItem closeTabMenuItem;
|
||||
Controls::FontIcon closeSymbol;
|
||||
closeSymbol.FontFamily(Media::FontFamily{ L"Segoe MDL2 Assets" });
|
||||
closeSymbol.Glyph(L"\xE8BB");
|
||||
|
||||
closeTabMenuItem.Click([weakThis](auto&&, auto&&) {
|
||||
if (auto tab{ weakThis.get() })
|
||||
{
|
||||
tab->_ClosedHandlers(nullptr, nullptr);
|
||||
}
|
||||
});
|
||||
closeTabMenuItem.Text(RS_(L"TabClose"));
|
||||
closeTabMenuItem.Icon(closeSymbol);
|
||||
|
||||
// Build the menu
|
||||
Controls::MenuFlyout newTabFlyout;
|
||||
newTabFlyout.Items().Append(_CreateCloseSubMenu());
|
||||
newTabFlyout.Items().Append(closeTabMenuItem);
|
||||
TabViewItem().ContextFlyout(newTabFlyout);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Creates a sub-menu containing menu items to close multiple tabs
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - the created MenuFlyoutSubItem
|
||||
Controls::MenuFlyoutSubItem TabBase::_CreateCloseSubMenu()
|
||||
{
|
||||
auto weakThis{ get_weak() };
|
||||
|
||||
// Close tabs after
|
||||
_closeTabsAfterMenuItem.Click([weakThis](auto&&, auto&&) {
|
||||
if (auto tab{ weakThis.get() })
|
||||
{
|
||||
tab->_CloseTabsAfter();
|
||||
}
|
||||
});
|
||||
_closeTabsAfterMenuItem.Text(RS_(L"TabCloseAfter"));
|
||||
|
||||
// Close other tabs
|
||||
_closeOtherTabsMenuItem.Click([weakThis](auto&&, auto&&) {
|
||||
if (auto tab{ weakThis.get() })
|
||||
{
|
||||
tab->_CloseOtherTabs();
|
||||
}
|
||||
});
|
||||
_closeOtherTabsMenuItem.Text(RS_(L"TabCloseOther"));
|
||||
|
||||
Controls::MenuFlyoutSubItem closeSubMenu;
|
||||
closeSubMenu.Text(RS_(L"TabCloseSubMenu"));
|
||||
closeSubMenu.Items().Append(_closeTabsAfterMenuItem);
|
||||
closeSubMenu.Items().Append(_closeOtherTabsMenuItem);
|
||||
|
||||
return closeSubMenu;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Enable the Close menu items based on tab index and total number of tabs
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void TabBase::_EnableCloseMenuItems()
|
||||
{
|
||||
// close other tabs is enabled only if there are other tabs
|
||||
_closeOtherTabsMenuItem.IsEnabled(TabViewNumTabs() > 1);
|
||||
// close tabs after is enabled only if there are other tabs on the right
|
||||
_closeTabsAfterMenuItem.IsEnabled(TabViewIndex() < TabViewNumTabs() - 1);
|
||||
}
|
||||
|
||||
void TabBase::_CloseTabsAfter()
|
||||
{
|
||||
CloseTabsAfterArgs args{ _TabViewIndex };
|
||||
ActionAndArgs closeTabsAfter{ ShortcutAction::CloseTabsAfter, args };
|
||||
|
||||
_dispatch.DoAction(closeTabsAfter);
|
||||
}
|
||||
|
||||
void TabBase::_CloseOtherTabs()
|
||||
{
|
||||
CloseOtherTabsArgs args{ _TabViewIndex };
|
||||
ActionAndArgs closeOtherTabs{ ShortcutAction::CloseOtherTabs, args };
|
||||
|
||||
_dispatch.DoAction(closeOtherTabs);
|
||||
}
|
||||
|
||||
void TabBase::UpdateTabViewIndex(const uint32_t idx, const uint32_t numTabs)
|
||||
{
|
||||
TabViewIndex(idx);
|
||||
TabViewNumTabs(numTabs);
|
||||
_EnableCloseMenuItems();
|
||||
SwitchToTabCommand().Action().Args().as<SwitchToTabArgs>().TabIndex(idx);
|
||||
}
|
||||
|
||||
void TabBase::SetDispatch(const winrt::TerminalApp::ShortcutActionDispatch& dispatch)
|
||||
{
|
||||
_dispatch = dispatch;
|
||||
}
|
||||
}
|
||||
57
src/cascadia/TerminalApp/TabBase.h
Normal file
57
src/cascadia/TerminalApp/TabBase.h
Normal file
@@ -0,0 +1,57 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#pragma once
|
||||
#include "inc/cppwinrt_utils.h"
|
||||
#include "TabBase.g.h"
|
||||
|
||||
// fwdecl unittest classes
|
||||
namespace TerminalAppLocalTests
|
||||
{
|
||||
class TabTests;
|
||||
};
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
struct TabBase : TabBaseT<TabBase>
|
||||
{
|
||||
public:
|
||||
virtual void Focus(winrt::Windows::UI::Xaml::FocusState focusState) = 0;
|
||||
winrt::Windows::UI::Xaml::FocusState FocusState() const noexcept;
|
||||
|
||||
virtual void Shutdown();
|
||||
void SetDispatch(const winrt::TerminalApp::ShortcutActionDispatch& dispatch);
|
||||
|
||||
void UpdateTabViewIndex(const uint32_t idx, const uint32_t numTabs);
|
||||
|
||||
WINRT_CALLBACK(Closed, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>);
|
||||
WINRT_CALLBACK(PropertyChanged, Windows::UI::Xaml::Data::PropertyChangedEventHandler);
|
||||
|
||||
// The TabViewIndex is the index this Tab object resides in TerminalPage's _tabs vector.
|
||||
// This is needed since Tab is going to be managing its own SwitchToTab command.
|
||||
GETSET_PROPERTY(uint32_t, TabViewIndex, 0);
|
||||
// The TabViewNumTabs is the number of Tab objects in TerminalPage's _tabs vector.
|
||||
GETSET_PROPERTY(uint32_t, TabViewNumTabs, 0);
|
||||
|
||||
OBSERVABLE_GETSET_PROPERTY(winrt::hstring, Title, _PropertyChangedHandlers);
|
||||
OBSERVABLE_GETSET_PROPERTY(winrt::hstring, Icon, _PropertyChangedHandlers);
|
||||
OBSERVABLE_GETSET_PROPERTY(winrt::Microsoft::Terminal::Settings::Model::Command, SwitchToTabCommand, _PropertyChangedHandlers, nullptr);
|
||||
GETSET_PROPERTY(winrt::Microsoft::UI::Xaml::Controls::TabViewItem, TabViewItem, nullptr);
|
||||
|
||||
OBSERVABLE_GETSET_PROPERTY(winrt::Windows::UI::Xaml::FrameworkElement, Content, _PropertyChangedHandlers, nullptr);
|
||||
|
||||
protected:
|
||||
winrt::Windows::UI::Xaml::FocusState _focusState{ winrt::Windows::UI::Xaml::FocusState::Unfocused };
|
||||
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _closeOtherTabsMenuItem{};
|
||||
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _closeTabsAfterMenuItem{};
|
||||
winrt::TerminalApp::ShortcutActionDispatch _dispatch;
|
||||
|
||||
virtual void _CreateContextMenu();
|
||||
winrt::Windows::UI::Xaml::Controls::MenuFlyoutSubItem _CreateCloseSubMenu();
|
||||
void _EnableCloseMenuItems();
|
||||
void _CloseTabsAfter();
|
||||
void _CloseOtherTabs();
|
||||
|
||||
friend class ::TerminalAppLocalTests::TabTests;
|
||||
};
|
||||
}
|
||||
24
src/cascadia/TerminalApp/TabBase.idl
Normal file
24
src/cascadia/TerminalApp/TabBase.idl
Normal file
@@ -0,0 +1,24 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
import "ShortcutActionDispatch.idl";
|
||||
|
||||
namespace TerminalApp
|
||||
{
|
||||
unsealed runtimeclass TabBase : Windows.UI.Xaml.Data.INotifyPropertyChanged
|
||||
{
|
||||
String Title { get; };
|
||||
String Icon { get; };
|
||||
Microsoft.Terminal.Settings.Model.Command SwitchToTabCommand;
|
||||
Microsoft.UI.Xaml.Controls.TabViewItem TabViewItem { get; };
|
||||
Windows.UI.Xaml.FrameworkElement Content { get; };
|
||||
Windows.UI.Xaml.FocusState FocusState { get; };
|
||||
|
||||
UInt32 TabViewIndex;
|
||||
UInt32 TabViewNumTabs;
|
||||
|
||||
overridable void Focus(Windows.UI.Xaml.FocusState focusState);
|
||||
overridable void Shutdown();
|
||||
|
||||
void SetDispatch(ShortcutActionDispatch dispatch);
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,12 @@
|
||||
<ClInclude Include="MinMaxCloseControl.h">
|
||||
<DependentUpon>MinMaxCloseControl.xaml</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TabBase.h">
|
||||
<DependentUpon>TabBase.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TerminalTab.h">
|
||||
<DependentUpon>TerminalTab.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TerminalPage.h">
|
||||
<DependentUpon>TerminalPage.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
@@ -95,9 +101,6 @@
|
||||
<ClInclude Include="IconPathConverter.h">
|
||||
<DependentUpon>IconPathConverter.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Tab.h">
|
||||
<DependentUpon>Tab.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Pane.h" />
|
||||
<ClInclude Include="ColorHelper.h" />
|
||||
<ClInclude Include="TerminalSettings.h">
|
||||
@@ -127,6 +130,12 @@
|
||||
<ClCompile Include="MinMaxCloseControl.cpp">
|
||||
<DependentUpon>MinMaxCloseControl.xaml</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TabBase.cpp">
|
||||
<DependentUpon>TabBase.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TerminalTab.cpp">
|
||||
<DependentUpon>TerminalTab.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TerminalPage.cpp">
|
||||
<DependentUpon>TerminalPage.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
@@ -152,9 +161,6 @@
|
||||
<ClCompile Include="IconPathConverter.cpp">
|
||||
<DependentUpon>IconPathConverter.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Tab.cpp">
|
||||
<DependentUpon>Tab.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Pane.cpp" />
|
||||
<ClCompile Include="Pane.LayoutSizeNode.cpp" />
|
||||
<ClCompile Include="ColorHelper.cpp" />
|
||||
@@ -197,6 +203,8 @@
|
||||
<DependentUpon>MinMaxCloseControl.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Midl>
|
||||
<Midl Include="TabBase.idl" />
|
||||
<Midl Include="TerminalTab.idl" />
|
||||
<Midl Include="TerminalPage.idl">
|
||||
<DependentUpon>TerminalPage.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
@@ -220,7 +228,6 @@
|
||||
<Midl Include="EmptyStringVisibilityConverter.idl" />
|
||||
<Midl Include="HasNestedCommandsVisibilityConverter.idl" />
|
||||
<Midl Include="IconPathConverter.idl" />
|
||||
<Midl Include="Tab.idl" />
|
||||
<Midl Include="TerminalSettings.idl" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Misc Files ======================== -->
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
<ClCompile Include="TerminalSettings.cpp">
|
||||
<Filter>settings</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Jumplist.cpp" />
|
||||
<ClCompile Include="Tab.cpp">
|
||||
<Filter>tab</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Utils.h" />
|
||||
@@ -48,6 +52,10 @@
|
||||
<ClInclude Include="TerminalSettings.h">
|
||||
<Filter>settings</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Jumplist.h" />
|
||||
<ClInclude Include="Tab.h">
|
||||
<Filter>tab</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="AppLogic.idl">
|
||||
@@ -62,14 +70,13 @@
|
||||
<Midl Include="ShortcutActionDispatch.idl">
|
||||
<Filter>settings</Filter>
|
||||
</Midl>
|
||||
<Midl Include="Tab.idl">
|
||||
<Filter>tab</Filter>
|
||||
</Midl>
|
||||
<Midl Include="IDirectKeyListener.idl" />
|
||||
<Midl Include="CommandKeyChordVisibilityConverter.idl" />
|
||||
<Midl Include="TerminalSettings.idl">
|
||||
<Filter>settings</Filter>
|
||||
</Midl>
|
||||
<Midl Include="TerminalTab.idl">
|
||||
<Filter>tab</Filter>
|
||||
</Midl>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
@@ -119,4 +126,4 @@
|
||||
<Filter>app</Filter>
|
||||
</ApplicationDefinition>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -42,7 +42,7 @@ namespace winrt
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
TerminalPage::TerminalPage() :
|
||||
_tabs{ winrt::single_threaded_observable_vector<TerminalApp::Tab>() },
|
||||
_tabs{ winrt::single_threaded_observable_vector<TerminalApp::TabBase>() },
|
||||
_mruTabActions{ winrt::single_threaded_vector<Command>() },
|
||||
_startupActions{ winrt::single_threaded_vector<ActionAndArgs>() }
|
||||
{
|
||||
@@ -668,8 +668,10 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
TermControl term{ settings, connection };
|
||||
|
||||
auto newTabImpl = winrt::make_self<TerminalTab>(profileGuid, term);
|
||||
_MakeSwitchToTabCommand(*newTabImpl, _tabs.Size());
|
||||
|
||||
// Add the new tab to the list of our tabs.
|
||||
auto newTabImpl = winrt::make_self<Tab>(profileGuid, term);
|
||||
_tabs.Append(*newTabImpl);
|
||||
_mruTabActions.Append(newTabImpl->SwitchToTabCommand());
|
||||
|
||||
@@ -686,7 +688,8 @@ namespace winrt::TerminalApp::implementation
|
||||
auto weakTab = make_weak(newTabImpl);
|
||||
|
||||
// When the tab's active pane changes, we'll want to lookup a new icon
|
||||
// for it, and possibly propagate the title up to the window.
|
||||
// for it. The Title change will be propagated upwards through the tab's
|
||||
// PropertyChanged event handler.
|
||||
newTabImpl->ActivePaneChanged([weakTab, weakThis{ get_weak() }]() {
|
||||
auto page{ weakThis.get() };
|
||||
auto tab{ weakTab.get() };
|
||||
@@ -695,24 +698,12 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
// Possibly update the icon of the tab.
|
||||
page->_UpdateTabIcon(*tab);
|
||||
// Possibly update the title of the tab, window to match the newly
|
||||
// focused pane.
|
||||
page->_UpdateTitle(*tab);
|
||||
}
|
||||
});
|
||||
|
||||
auto tabViewItem = newTabImpl->GetTabViewItem();
|
||||
auto tabViewItem = newTabImpl->TabViewItem();
|
||||
_tabView.TabItems().Append(tabViewItem);
|
||||
// GH#6570
|
||||
// The TabView does not apply compact sizing to items added after Compact is enabled.
|
||||
// By forcibly reapplying compact sizing every time we add a new tab, we'll make sure
|
||||
// that it works.
|
||||
// Workaround from https://github.com/microsoft/microsoft-ui-xaml/issues/2711
|
||||
if (_tabView.TabWidthMode() == MUX::Controls::TabViewWidthMode::Compact)
|
||||
{
|
||||
_tabView.UpdateLayout();
|
||||
_tabView.TabWidthMode(MUX::Controls::TabViewWidthMode::Compact);
|
||||
}
|
||||
_ReapplyCompactTabSize();
|
||||
|
||||
// Set this tab's icon to the icon from the user's profile
|
||||
const auto profile = _settings.FindProfile(profileGuid);
|
||||
@@ -923,12 +914,12 @@ namespace winrt::TerminalApp::implementation
|
||||
// TitleChanged event.
|
||||
// Arguments:
|
||||
// - tab: the Tab to update the title for.
|
||||
void TerminalPage::_UpdateTitle(const Tab& tab)
|
||||
void TerminalPage::_UpdateTitle(const TerminalTab& tab)
|
||||
{
|
||||
auto newTabTitle = tab.GetActiveTitle();
|
||||
auto newTabTitle = tab.Title();
|
||||
|
||||
if (_settings.GlobalSettings().ShowTitleInTitlebar() &&
|
||||
tab.IsFocused())
|
||||
tab.FocusState() != FocusState::Unfocused)
|
||||
{
|
||||
_titleChangeHandlers(*this, newTabTitle);
|
||||
}
|
||||
@@ -939,7 +930,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// tab's icon to that icon.
|
||||
// Arguments:
|
||||
// - tab: the Tab to update the title for.
|
||||
void TerminalPage::_UpdateTabIcon(Tab& tab)
|
||||
void TerminalPage::_UpdateTabIcon(TerminalTab& tab)
|
||||
{
|
||||
const auto lastFocusedProfileOpt = tab.GetFocusedProfile();
|
||||
if (lastFocusedProfileOpt.has_value())
|
||||
@@ -990,30 +981,32 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
try
|
||||
if (auto terminalTab = _GetTerminalTabImpl(_tabs.GetAt(*index)))
|
||||
{
|
||||
auto focusedTab = _GetStrongTabImpl(*index);
|
||||
// TODO: GH#5047 - In the future, we should get the Profile of
|
||||
// the focused pane, and use that to build a new instance of the
|
||||
// settings so we can duplicate this tab/pane.
|
||||
//
|
||||
// Currently, if the profile doesn't exist anymore in our
|
||||
// settings, we'll silently do nothing.
|
||||
//
|
||||
// In the future, it will be preferable to just duplicate the
|
||||
// current control's settings, but we can't do that currently,
|
||||
// because we won't be able to create a new instance of the
|
||||
// connection without keeping an instance of the original Profile
|
||||
// object around.
|
||||
|
||||
const auto& profileGuid = focusedTab->GetFocusedProfile();
|
||||
if (profileGuid.has_value())
|
||||
try
|
||||
{
|
||||
const auto settings{ winrt::make<TerminalSettings>(_settings, profileGuid.value(), *_bindings) };
|
||||
_CreateNewTabFromSettings(profileGuid.value(), settings);
|
||||
// TODO: GH#5047 - In the future, we should get the Profile of
|
||||
// the focused pane, and use that to build a new instance of the
|
||||
// settings so we can duplicate this tab/pane.
|
||||
//
|
||||
// Currently, if the profile doesn't exist anymore in our
|
||||
// settings, we'll silently do nothing.
|
||||
//
|
||||
// In the future, it will be preferable to just duplicate the
|
||||
// current control's settings, but we can't do that currently,
|
||||
// because we won't be able to create a new instance of the
|
||||
// connection without keeping an instance of the original Profile
|
||||
// object around.
|
||||
|
||||
const auto& profileGuid = terminalTab->GetFocusedProfile();
|
||||
if (profileGuid.has_value())
|
||||
{
|
||||
const auto settings{ winrt::make<TerminalSettings>(_settings, profileGuid.value(), *_bindings) };
|
||||
_CreateNewTabFromSettings(profileGuid.value(), settings);
|
||||
}
|
||||
}
|
||||
CATCH_LOG();
|
||||
}
|
||||
CATCH_LOG();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1040,20 +1033,32 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
// Removing the tab from the collection should destroy its control and disconnect its connection,
|
||||
// but it doesn't always do so. The UI tree may still be holding the control and preventing its destruction.
|
||||
auto tab{ _GetStrongTabImpl(tabIndex) };
|
||||
tab->Shutdown();
|
||||
auto tab{ _tabs.GetAt(tabIndex) };
|
||||
tab.Shutdown();
|
||||
|
||||
uint32_t mruIndex;
|
||||
if (_mruTabActions.IndexOf(_tabs.GetAt(tabIndex).SwitchToTabCommand(), mruIndex))
|
||||
{
|
||||
_mruTabActions.RemoveAt(mruIndex);
|
||||
CommandPalette().SetTabActions(_mruTabActions);
|
||||
}
|
||||
|
||||
_tabs.RemoveAt(tabIndex);
|
||||
_tabView.TabItems().RemoveAt(tabIndex);
|
||||
_UpdateTabIndices();
|
||||
|
||||
// If the tab switcher is currently open, update it to reflect the
|
||||
// current list of tabs.
|
||||
const auto tabSwitchMode = _settings.GlobalSettings().TabSwitcherMode();
|
||||
const bool commandPaletteIsVisible = CommandPalette().Visibility() == Visibility::Visible;
|
||||
if (tabSwitchMode == TabSwitcherMode::MostRecentlyUsed && commandPaletteIsVisible)
|
||||
{
|
||||
CommandPalette().SetTabActions(_mruTabActions, false);
|
||||
}
|
||||
else if (commandPaletteIsVisible)
|
||||
{
|
||||
_UpdatePaletteWithInOrderTabs();
|
||||
}
|
||||
|
||||
// To close the window here, we need to close the hosting window.
|
||||
if (_tabs.Size() == 0)
|
||||
{
|
||||
@@ -1091,8 +1096,8 @@ namespace winrt::TerminalApp::implementation
|
||||
// here. If we don't, then the TabView will technically not have a
|
||||
// selected item at all, which can make things like ClosePane not
|
||||
// work correctly.
|
||||
auto newSelectedTab{ _GetStrongTabImpl(newSelectedIndex) };
|
||||
_tabView.SelectedItem(newSelectedTab->GetTabViewItem());
|
||||
auto newSelectedTab{ _tabs.GetAt(newSelectedIndex) };
|
||||
_tabView.SelectedItem(newSelectedTab.TabViewItem());
|
||||
}
|
||||
|
||||
// GH#5559 - If we were in the middle of a drag/drop, end it by clearing
|
||||
@@ -1114,7 +1119,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// Arguments:
|
||||
// - term: The newly created TermControl to connect the events for
|
||||
// - hostingTab: The Tab that's hosting this TermControl instance
|
||||
void TerminalPage::_RegisterTerminalEvents(TermControl term, Tab& hostingTab)
|
||||
void TerminalPage::_RegisterTerminalEvents(TermControl term, TerminalTab& hostingTab)
|
||||
{
|
||||
// Add an event handler when the terminal's selection wants to be copied.
|
||||
// When the text buffer data is retrieved, we'll copy the data into the Clipboard
|
||||
@@ -1144,12 +1149,12 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
else if (args.PropertyName() == L"Content")
|
||||
{
|
||||
if (tab == page->_GetFocusedTab())
|
||||
if (*tab == page->_GetFocusedTab())
|
||||
{
|
||||
page->_tabContent.Children().Clear();
|
||||
page->_tabContent.Children().Append(tab->Content());
|
||||
|
||||
tab->SetFocused(true);
|
||||
tab->Focus(FocusState::Programmatic);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1160,7 +1165,7 @@ namespace winrt::TerminalApp::implementation
|
||||
auto page{ weakThis.get() };
|
||||
auto tab{ weakTab.get() };
|
||||
|
||||
if (page && tab && tab->IsFocused())
|
||||
if (page && tab && (tab->FocusState() != FocusState::Unfocused))
|
||||
{
|
||||
page->_SetNonClientAreaColors(color);
|
||||
}
|
||||
@@ -1170,7 +1175,7 @@ namespace winrt::TerminalApp::implementation
|
||||
auto page{ weakThis.get() };
|
||||
auto tab{ weakTab.get() };
|
||||
|
||||
if (page && tab && tab->IsFocused())
|
||||
if (page && tab && (tab->FocusState() != FocusState::Unfocused))
|
||||
{
|
||||
page->_ClearNonClientAreaColors();
|
||||
}
|
||||
@@ -1184,36 +1189,83 @@ namespace winrt::TerminalApp::implementation
|
||||
// _ClearNewTabButtonColor();
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Updates the command palette (tab switcher) with a list of actions
|
||||
// reflecting the current in-order list of tabs.
|
||||
void TerminalPage::_UpdatePaletteWithInOrderTabs()
|
||||
{
|
||||
auto tabCommands = winrt::single_threaded_vector<Command>();
|
||||
for (const auto& tab : _tabs)
|
||||
{
|
||||
tabCommands.Append(tab.SwitchToTabCommand());
|
||||
}
|
||||
CommandPalette().SetTabActions(tabCommands, true);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Sets focus to the tab to the right or left the currently selected tab.
|
||||
void TerminalPage::_SelectNextTab(const bool bMoveRight)
|
||||
{
|
||||
if (_settings.GlobalSettings().UseTabSwitcher())
|
||||
{
|
||||
CommandPalette().SetTabActions(_mruTabActions);
|
||||
const auto tabSwitchMode = _settings.GlobalSettings().TabSwitcherMode();
|
||||
const bool useInOrderTabIndex = tabSwitchMode != TabSwitcherMode::MostRecentlyUsed;
|
||||
|
||||
// Since ATS is always MRU, our focused tab index is always 0.
|
||||
// So, going next should go to index 1, and going prev should wrap to the end.
|
||||
// First, determine what the index of the newly selected tab should be.
|
||||
// This changes if we're doing an in-order traversal vs a MRU traversal.
|
||||
auto newTabIndex = 0;
|
||||
if (useInOrderTabIndex)
|
||||
{
|
||||
// Determine what the next in-order tab index is
|
||||
if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
uint32_t tabCount = _tabs.Size();
|
||||
// Wraparound math. By adding tabCount and then calculating
|
||||
// modulo tabCount, we clamp the values to the range [0,
|
||||
// tabCount) while still supporting moving leftward from 0 to
|
||||
// tabCount - 1.
|
||||
newTabIndex = ((tabCount + *index + (bMoveRight ? 1 : -1)) % tabCount);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Determine what the next "most recently used" index is.
|
||||
// In this case, our focused tab index (in the MRU ordering) is
|
||||
// always 0. So, going next should go to index 1, and going prev
|
||||
// should wrap to the end.
|
||||
uint32_t tabCount = _mruTabActions.Size();
|
||||
auto newTabIndex = ((tabCount + (bMoveRight ? 1 : -1)) % tabCount);
|
||||
newTabIndex = ((tabCount + (bMoveRight ? 1 : -1)) % tabCount);
|
||||
}
|
||||
|
||||
const bool useTabSwitcher = tabSwitchMode != TabSwitcherMode::Disabled;
|
||||
|
||||
if (useTabSwitcher)
|
||||
{
|
||||
if (useInOrderTabIndex)
|
||||
{
|
||||
// Set up the list of in-order tabs
|
||||
_UpdatePaletteWithInOrderTabs();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set up the list of MRU tabs
|
||||
CommandPalette().SetTabActions(_mruTabActions, true);
|
||||
}
|
||||
|
||||
if (CommandPalette().Visibility() == Visibility::Visible)
|
||||
{
|
||||
// If the tab switcher is currently open, don't change its mode.
|
||||
// Just select the new tab.
|
||||
CommandPalette().SelectNextItem(bMoveRight);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise, set up the tab switcher in the selected mode, with
|
||||
// the given ordering, and make it visible.
|
||||
CommandPalette().EnableTabSwitcherMode(false, newTabIndex);
|
||||
CommandPalette().Visibility(Visibility::Visible);
|
||||
}
|
||||
}
|
||||
else if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
uint32_t tabCount = _tabs.Size();
|
||||
// Wraparound math. By adding tabCount and then calculating modulo tabCount,
|
||||
// we clamp the values to the range [0, tabCount) while still supporting moving
|
||||
// leftward from 0 to tabCount - 1.
|
||||
auto newTabIndex = ((tabCount + *index + (bMoveRight ? 1 : -1)) % tabCount);
|
||||
_SelectTab(newTabIndex);
|
||||
}
|
||||
}
|
||||
@@ -1234,8 +1286,8 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
if (_startupState == StartupState::InStartup)
|
||||
{
|
||||
auto tab{ _GetStrongTabImpl(tabIndex) };
|
||||
_tabView.SelectedItem(tab->GetTabViewItem());
|
||||
auto tab{ _tabs.GetAt(tabIndex) };
|
||||
_tabView.SelectedItem(tab.TabViewItem());
|
||||
_UpdatedSelectedTab(tabIndex);
|
||||
}
|
||||
else
|
||||
@@ -1263,16 +1315,21 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
void TerminalPage::_UnZoomIfNeeded()
|
||||
{
|
||||
auto activeTab = _GetFocusedTab();
|
||||
if (activeTab && activeTab->IsZoomed())
|
||||
if (auto focusedTab = _GetFocusedTab())
|
||||
{
|
||||
// Remove the content from the tab first, so Pane::UnZoom can
|
||||
// re-attach the content to the tree w/in the pane
|
||||
_tabContent.Children().Clear();
|
||||
// In ExitZoom, we'll change the Tab's Content(), triggering the
|
||||
// content changed event, which will re-attach the tab's new content
|
||||
// root to the tree.
|
||||
activeTab->ExitZoom();
|
||||
if (auto activeTab = _GetTerminalTabImpl(focusedTab))
|
||||
{
|
||||
if (activeTab->IsZoomed())
|
||||
{
|
||||
// Remove the content from the tab first, so Pane::UnZoom can
|
||||
// re-attach the content to the tree w/in the pane
|
||||
_tabContent.Children().Clear();
|
||||
// In ExitZoom, we'll change the Tab's Content(), triggering the
|
||||
// content changed event, which will re-attach the tab's new content
|
||||
// root to the tree.
|
||||
activeTab->ExitZoom();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1288,9 +1345,11 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
auto focusedTab{ _GetStrongTabImpl(*index) };
|
||||
_UnZoomIfNeeded();
|
||||
focusedTab->NavigateFocus(direction);
|
||||
if (auto terminalTab = _GetTerminalTabImpl(_tabs.GetAt(*index)))
|
||||
{
|
||||
_UnZoomIfNeeded();
|
||||
terminalTab->NavigateFocus(direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1298,13 +1357,12 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
auto focusedTab{ _GetStrongTabImpl(*index) };
|
||||
return focusedTab->GetActiveTerminalControl();
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
if (auto terminalTab = _GetTerminalTabImpl(_tabs.GetAt(*index)))
|
||||
{
|
||||
return terminalTab->GetActiveTerminalControl();
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -1327,11 +1385,11 @@ namespace winrt::TerminalApp::implementation
|
||||
// Method Description:
|
||||
// - returns a com_ptr to the currently focused tab. This might return null,
|
||||
// so make sure to check the result!
|
||||
winrt::com_ptr<Tab> TerminalPage::_GetFocusedTab()
|
||||
winrt::TerminalApp::TabBase TerminalPage::_GetFocusedTab()
|
||||
{
|
||||
if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
return _GetStrongTabImpl(*index);
|
||||
return _tabs.GetAt(*index);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1356,8 +1414,8 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
if (auto page{ weakThis.get() })
|
||||
{
|
||||
auto tab{ _GetStrongTabImpl(tabIndex) };
|
||||
_tabView.SelectedItem(tab->GetTabViewItem());
|
||||
auto tabToFocus = page->_tabs.GetAt(tabIndex);
|
||||
_tabView.SelectedItem(tabToFocus.TabViewItem());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1379,9 +1437,11 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
auto focusedTab{ _GetStrongTabImpl(*index) };
|
||||
_UnZoomIfNeeded();
|
||||
focusedTab->ClosePane();
|
||||
if (auto terminalTab = _GetTerminalTabImpl(_tabs.GetAt(*index)))
|
||||
{
|
||||
_UnZoomIfNeeded();
|
||||
terminalTab->ClosePane();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1422,22 +1482,24 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
auto focusedTab{ _GetStrongTabImpl(*index) };
|
||||
uint32_t realRowsToScroll;
|
||||
if (rowsToScroll == nullptr)
|
||||
if (auto terminalTab = _GetTerminalTabImpl(_tabs.GetAt(*index)))
|
||||
{
|
||||
// The magic value of WHEEL_PAGESCROLL indicates that we need to scroll the entire page
|
||||
realRowsToScroll = _systemRowsToScroll == WHEEL_PAGESCROLL ?
|
||||
focusedTab->GetActiveTerminalControl().GetViewHeight() :
|
||||
_systemRowsToScroll;
|
||||
uint32_t realRowsToScroll;
|
||||
if (rowsToScroll == nullptr)
|
||||
{
|
||||
// The magic value of WHEEL_PAGESCROLL indicates that we need to scroll the entire page
|
||||
realRowsToScroll = _systemRowsToScroll == WHEEL_PAGESCROLL ?
|
||||
terminalTab->GetActiveTerminalControl().GetViewHeight() :
|
||||
_systemRowsToScroll;
|
||||
}
|
||||
else
|
||||
{
|
||||
// use the custom value specified in the command
|
||||
realRowsToScroll = rowsToScroll.Value();
|
||||
}
|
||||
auto scrollDelta = _ComputeScrollDelta(scrollDirection, realRowsToScroll);
|
||||
terminalTab->Scroll(scrollDelta);
|
||||
}
|
||||
else
|
||||
{
|
||||
// use the custom value specified in the command
|
||||
realRowsToScroll = rowsToScroll.Value();
|
||||
}
|
||||
auto scrollDelta = _ComputeScrollDelta(scrollDirection, realRowsToScroll);
|
||||
focusedTab->Scroll(scrollDelta);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1470,9 +1532,16 @@ namespace winrt::TerminalApp::implementation
|
||||
return;
|
||||
}
|
||||
|
||||
auto focusedTab = _GetTerminalTabImpl(_tabs.GetAt(*indexOpt));
|
||||
|
||||
// Do nothing if the focused tab isn't a TerminalTab
|
||||
if (!focusedTab)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
auto focusedTab = _GetStrongTabImpl(*indexOpt);
|
||||
TerminalApp::TerminalSettings controlSettings;
|
||||
GUID realGuid;
|
||||
bool profileFound = false;
|
||||
@@ -1546,9 +1615,11 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
auto focusedTab{ _GetStrongTabImpl(*index) };
|
||||
_UnZoomIfNeeded();
|
||||
focusedTab->ResizePane(direction);
|
||||
if (auto terminalTab = _GetTerminalTabImpl(_tabs.GetAt(*index)))
|
||||
{
|
||||
_UnZoomIfNeeded();
|
||||
terminalTab->ResizePane(direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1566,11 +1637,13 @@ namespace winrt::TerminalApp::implementation
|
||||
return;
|
||||
}
|
||||
|
||||
const auto control = _GetActiveControl();
|
||||
const auto termHeight = control.GetViewHeight();
|
||||
auto focusedTab{ _GetStrongTabImpl(*indexOpt) };
|
||||
auto scrollDelta = _ComputeScrollDelta(scrollDirection, termHeight);
|
||||
focusedTab->Scroll(scrollDelta);
|
||||
if (auto terminalTab = _GetTerminalTabImpl(_tabs.GetAt(*indexOpt)))
|
||||
{
|
||||
const auto control = _GetActiveControl();
|
||||
const auto termHeight = control.GetViewHeight();
|
||||
auto scrollDelta = _ComputeScrollDelta(scrollDirection, termHeight);
|
||||
terminalTab->Scroll(scrollDelta);
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -1681,8 +1754,10 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
auto focusedTab{ _GetStrongTabImpl(*index) };
|
||||
return focusedTab->CalcSnappedDimension(widthOrHeight, dimension);
|
||||
if (auto terminalTab = _GetTerminalTabImpl(_tabs.GetAt(*index)))
|
||||
{
|
||||
return terminalTab->CalcSnappedDimension(widthOrHeight, dimension);
|
||||
}
|
||||
}
|
||||
}
|
||||
return dimension;
|
||||
@@ -1960,18 +2035,17 @@ namespace winrt::TerminalApp::implementation
|
||||
// Unfocus all the tabs.
|
||||
for (auto tab : _tabs)
|
||||
{
|
||||
auto tabImpl{ _GetStrongTabImpl(tab) };
|
||||
tabImpl->SetFocused(false);
|
||||
tab.Focus(FocusState::Unfocused);
|
||||
}
|
||||
|
||||
if (index >= 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
auto tab{ _GetStrongTabImpl(index) };
|
||||
auto tab{ _tabs.GetAt(index) };
|
||||
|
||||
_tabContent.Children().Clear();
|
||||
_tabContent.Children().Append(tab->Content());
|
||||
_tabContent.Children().Append(tab.Content());
|
||||
|
||||
// GH#7409: If the tab switcher is open, then we _don't_ want to
|
||||
// automatically focus the new tab here. The tab switcher wants
|
||||
@@ -1985,12 +2059,12 @@ namespace winrt::TerminalApp::implementation
|
||||
// need to worry about focus getting lost.
|
||||
if (CommandPalette().Visibility() != Visibility::Visible)
|
||||
{
|
||||
tab->SetFocused(true);
|
||||
tab.Focus(FocusState::Programmatic);
|
||||
_UpdateMRUTab(index);
|
||||
}
|
||||
|
||||
// Raise an event that our title changed
|
||||
_titleChangeHandlers(*this, tab->GetActiveTitle());
|
||||
_titleChangeHandlers(*this, tab.Title());
|
||||
}
|
||||
CATCH_LOG();
|
||||
}
|
||||
@@ -2025,8 +2099,10 @@ namespace winrt::TerminalApp::implementation
|
||||
const auto newSize = e.NewSize();
|
||||
for (auto tab : _tabs)
|
||||
{
|
||||
auto tabImpl{ _GetStrongTabImpl(tab) };
|
||||
tabImpl->ResizeContent(newSize);
|
||||
if (auto terminalTab = _GetTerminalTabImpl(tab))
|
||||
{
|
||||
terminalTab->ResizeContent(newSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2097,9 +2173,10 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
for (auto tab : _tabs)
|
||||
{
|
||||
// Attempt to reload the settings of any panes with this profile
|
||||
auto tabImpl{ _GetStrongTabImpl(tab) };
|
||||
tabImpl->UpdateSettings(settings, profileGuid);
|
||||
if (auto terminalTab = _GetTerminalTabImpl(tab))
|
||||
{
|
||||
terminalTab->UpdateSettings(settings, profileGuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
CATCH_LOG();
|
||||
@@ -2111,11 +2188,17 @@ namespace winrt::TerminalApp::implementation
|
||||
// anymore, so we can't possibly update its settings.
|
||||
|
||||
// Update the icon of the tab for the currently focused profile in that tab.
|
||||
// Only do this for TerminalTabs. Other types of tabs won't have multiple panes
|
||||
// and profiles so the Title and Icon will be set once and only once on init.
|
||||
for (auto tab : _tabs)
|
||||
{
|
||||
auto tabImpl{ _GetStrongTabImpl(tab) };
|
||||
_UpdateTabIcon(*tabImpl);
|
||||
_UpdateTitle(*tabImpl);
|
||||
if (auto terminalTab = _GetTerminalTabImpl(tab))
|
||||
{
|
||||
_UpdateTabIcon(*terminalTab);
|
||||
|
||||
// Force the TerminalTab to re-grab its currently active control's title.
|
||||
terminalTab->UpdateTitle();
|
||||
}
|
||||
}
|
||||
|
||||
auto weakThis{ get_weak() };
|
||||
@@ -2255,10 +2338,9 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
for (const auto& tab : _tabs)
|
||||
{
|
||||
auto tabImpl{ _GetStrongTabImpl(tab) };
|
||||
if (tabImpl->GetTabViewItem().ContextFlyout())
|
||||
if (tab.TabViewItem().ContextFlyout())
|
||||
{
|
||||
tabImpl->GetTabViewItem().ContextFlyout().Hide();
|
||||
tab.TabViewItem().ContextFlyout().Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2317,32 +2399,6 @@ namespace winrt::TerminalApp::implementation
|
||||
_alwaysOnTopChangedHandlers(*this, nullptr);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Returns a com_ptr to the implementation type of the tab at the given index
|
||||
// Arguments:
|
||||
// - index: an unsigned integer index to a tab in _tabs
|
||||
// Return Value:
|
||||
// - a com_ptr to the implementation type of the Tab
|
||||
winrt::com_ptr<Tab> TerminalPage::_GetStrongTabImpl(const uint32_t index) const
|
||||
{
|
||||
winrt::com_ptr<Tab> tabImpl;
|
||||
tabImpl.copy_from(winrt::get_self<Tab>(_tabs.GetAt(index)));
|
||||
return tabImpl;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Returns a com_ptr to the implementation type of the given projected Tab
|
||||
// Arguments:
|
||||
// - tab: the projected type of a Tab
|
||||
// Return Value:
|
||||
// - a com_ptr to the implementation type of the Tab
|
||||
winrt::com_ptr<Tab> TerminalPage::_GetStrongTabImpl(const ::winrt::TerminalApp::Tab& tab) const
|
||||
{
|
||||
winrt::com_ptr<Tab> tabImpl;
|
||||
tabImpl.copy_from(winrt::get_self<Tab>(tab));
|
||||
return tabImpl;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Sets the tab split button color when a new tab color is selected
|
||||
// Arguments:
|
||||
@@ -2544,7 +2600,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// Return focus to the active control
|
||||
if (auto index{ _GetFocusedTabIndex() })
|
||||
{
|
||||
_GetStrongTabImpl(index.value())->SetFocused(true);
|
||||
_tabs.GetAt(*index).Focus(FocusState::Programmatic);
|
||||
_UpdateMRUTab(index.value());
|
||||
}
|
||||
}
|
||||
@@ -2583,10 +2639,75 @@ namespace winrt::TerminalApp::implementation
|
||||
const uint32_t size = _tabs.Size();
|
||||
for (uint32_t i = 0; i < size; ++i)
|
||||
{
|
||||
_GetStrongTabImpl(i)->UpdateTabViewIndex(i, size);
|
||||
auto tab{ _tabs.GetAt(i) };
|
||||
auto tabImpl{ winrt::get_self<TabBase>(tab) };
|
||||
tabImpl->UpdateTabViewIndex(i, size);
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Returns a com_ptr to the implementation type of the given tab if it's a TerminalTab.
|
||||
// If the tab is not a TerminalTab, returns nullptr.
|
||||
// Arguments:
|
||||
// - tab: the projected type of a Tab
|
||||
// Return Value:
|
||||
// - If the tab is a TerminalTab, a com_ptr to the implementation type.
|
||||
// If the tab is not a TerminalTab, nullptr
|
||||
winrt::com_ptr<TerminalTab> TerminalPage::_GetTerminalTabImpl(const TerminalApp::TabBase& tab) const
|
||||
{
|
||||
if (auto terminalTab = tab.try_as<TerminalApp::TerminalTab>())
|
||||
{
|
||||
winrt::com_ptr<TerminalTab> tabImpl;
|
||||
tabImpl.copy_from(winrt::get_self<TerminalTab>(terminalTab));
|
||||
return tabImpl;
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - The TabView does not apply compact sizing to items added after Compact is enabled.
|
||||
// By forcibly reapplying compact sizing every time we add a new tab, we'll make sure
|
||||
// that it works.
|
||||
// Workaround from https://github.com/microsoft/microsoft-ui-xaml/issues/2711
|
||||
// TODO: Remove this function and its calls when ingesting the above changes.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void TerminalPage::_ReapplyCompactTabSize()
|
||||
{
|
||||
if (_tabView.TabWidthMode() == MUX::Controls::TabViewWidthMode::Compact)
|
||||
{
|
||||
_tabView.UpdateLayout();
|
||||
_tabView.TabWidthMode(MUX::Controls::TabViewWidthMode::Compact);
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Initializes a SwitchToTab command object for this Tab instance.
|
||||
// This should be done before the tab is added to the _tabs vector so that
|
||||
// controls like the CmdPal that observe the vector changes can always expect
|
||||
// a SwitchToTab command to be available.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void TerminalPage::_MakeSwitchToTabCommand(const TerminalApp::TabBase& tab, const uint32_t index)
|
||||
{
|
||||
SwitchToTabArgs args{ index };
|
||||
ActionAndArgs focusTabAction{ ShortcutAction::SwitchToTab, args };
|
||||
|
||||
Command command;
|
||||
command.Action(focusTabAction);
|
||||
command.Name(tab.Title());
|
||||
command.Icon(tab.Icon());
|
||||
|
||||
tab.SwitchToTabCommand(command);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Computes the delta for scrolling the tab's viewport.
|
||||
// Arguments:
|
||||
@@ -2636,11 +2757,87 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
_mruTabActions.RemoveAt(mruIndex);
|
||||
_mruTabActions.InsertAt(0, command);
|
||||
CommandPalette().SetTabActions(_mruTabActions);
|
||||
|
||||
// If the tab switcher is currently open, AND we're using it in
|
||||
// MRU mode, then update it to reflect the current list of tabs.
|
||||
const auto tabSwitchMode = _settings.GlobalSettings().TabSwitcherMode();
|
||||
const bool commandPaletteIsVisible = CommandPalette().Visibility() == Visibility::Visible;
|
||||
if (tabSwitchMode == TabSwitcherMode::MostRecentlyUsed && commandPaletteIsVisible)
|
||||
{
|
||||
CommandPalette().SetTabActions(_mruTabActions, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Displays a dialog stating the "Touch Keyboard and Handwriting Panel
|
||||
// Service" is disabled.
|
||||
void TerminalPage::ShowKeyboardServiceWarning()
|
||||
{
|
||||
if (auto presenter{ _dialogPresenter.get() })
|
||||
{
|
||||
presenter.ShowDialog(FindName(L"KeyboardServiceDisabledDialog").try_as<WUX::Controls::ContentDialog>());
|
||||
}
|
||||
}
|
||||
|
||||
// Function Description:
|
||||
// - Helper function to get the OS-localized name for the "Touch Keyboard
|
||||
// and Handwriting Panel Service". If we can't open up the service for any
|
||||
// reason, then we'll just return the service's key, "TabletInputService".
|
||||
// Return Value:
|
||||
// - The OS-localized name for the TabletInputService
|
||||
winrt::hstring _getTabletServiceName()
|
||||
{
|
||||
auto isUwp = false;
|
||||
try
|
||||
{
|
||||
isUwp = ::winrt::Windows::UI::Xaml::Application::Current().as<::winrt::TerminalApp::App>().Logic().IsUwp();
|
||||
}
|
||||
CATCH_LOG();
|
||||
|
||||
if (isUwp)
|
||||
{
|
||||
return winrt::hstring{ TabletInputServiceKey };
|
||||
}
|
||||
|
||||
wil::unique_schandle hManager{ OpenSCManager(nullptr, nullptr, 0) };
|
||||
|
||||
if (LOG_LAST_ERROR_IF(!hManager.is_valid()))
|
||||
{
|
||||
return winrt::hstring{ TabletInputServiceKey };
|
||||
}
|
||||
|
||||
DWORD cchBuffer = 0;
|
||||
GetServiceDisplayName(hManager.get(), TabletInputServiceKey.data(), nullptr, &cchBuffer);
|
||||
std::wstring buffer;
|
||||
cchBuffer += 1; // Add space for a null
|
||||
buffer.resize(cchBuffer);
|
||||
|
||||
if (LOG_LAST_ERROR_IF(!GetServiceDisplayName(hManager.get(),
|
||||
TabletInputServiceKey.data(),
|
||||
buffer.data(),
|
||||
&cchBuffer)))
|
||||
{
|
||||
return winrt::hstring{ TabletInputServiceKey };
|
||||
}
|
||||
return winrt::hstring{ buffer };
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Return the fully-formed warning message for the
|
||||
// "KeyboardServiceDisabled" dialog. This dialog is used to warn the user
|
||||
// if the keyboard service is disabled, and uses the OS localization for
|
||||
// the service's actual name. It's bound to the dialog in XAML.
|
||||
// Return Value:
|
||||
// - The warning message, including the OS-localized service name.
|
||||
winrt::hstring TerminalPage::KeyboardServiceDisabledText()
|
||||
{
|
||||
const winrt::hstring serviceName{ _getTabletServiceName() };
|
||||
const winrt::hstring text{ fmt::format(std::wstring_view(RS_(L"KeyboardServiceWarningText")), serviceName) };
|
||||
return text;
|
||||
}
|
||||
|
||||
// -------------------------------- WinRT Events ---------------------------------
|
||||
// Winrt events need a method for adding a callback to the event and removing the callback.
|
||||
// These macros will define them both for you.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "TerminalPage.g.h"
|
||||
#include "Tab.h"
|
||||
#include "TerminalTab.h"
|
||||
#include "AppKeyBindings.h"
|
||||
#include "TerminalSettings.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "AppCommandlineArgs.h"
|
||||
|
||||
static constexpr uint32_t DefaultRowsToScroll{ 3 };
|
||||
|
||||
static constexpr std::wstring_view TabletInputServiceKey{ L"TabletInputService" };
|
||||
// fwdecl unittest classes
|
||||
namespace TerminalAppLocalTests
|
||||
{
|
||||
@@ -71,6 +71,9 @@ namespace winrt::TerminalApp::implementation
|
||||
winrt::TerminalApp::IDialogPresenter DialogPresenter() const;
|
||||
void DialogPresenter(winrt::TerminalApp::IDialogPresenter dialogPresenter);
|
||||
|
||||
void ShowKeyboardServiceWarning();
|
||||
winrt::hstring KeyboardServiceDisabledText();
|
||||
|
||||
// -------------------------------- WinRT Events ---------------------------------
|
||||
DECLARE_EVENT_WITH_TYPED_EVENT_HANDLER(TitleChanged, _titleChangeHandlers, winrt::Windows::Foundation::IInspectable, winrt::hstring);
|
||||
DECLARE_EVENT_WITH_TYPED_EVENT_HANDLER(LastTabClosed, _lastTabClosedHandlers, winrt::Windows::Foundation::IInspectable, winrt::TerminalApp::LastTabClosedEventArgs);
|
||||
@@ -96,10 +99,10 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
Microsoft::Terminal::Settings::Model::CascadiaSettings _settings{ nullptr };
|
||||
|
||||
Windows::Foundation::Collections::IObservableVector<TerminalApp::Tab> _tabs;
|
||||
Windows::Foundation::Collections::IObservableVector<TerminalApp::TabBase> _tabs;
|
||||
Windows::Foundation::Collections::IVector<winrt::Microsoft::Terminal::Settings::Model::Command> _mruTabActions;
|
||||
winrt::com_ptr<Tab> _GetStrongTabImpl(const uint32_t index) const;
|
||||
winrt::com_ptr<Tab> _GetStrongTabImpl(const ::winrt::TerminalApp::Tab& tab) const;
|
||||
winrt::com_ptr<TerminalTab> _GetTerminalTabImpl(const TerminalApp::TabBase& tab) const;
|
||||
|
||||
void _UpdateTabIndices();
|
||||
|
||||
bool _isInFocusMode{ false };
|
||||
@@ -146,11 +149,12 @@ namespace winrt::TerminalApp::implementation
|
||||
void _HookupKeyBindings(const Microsoft::Terminal::Settings::Model::KeyMapping& keymap) noexcept;
|
||||
void _RegisterActionCallbacks();
|
||||
|
||||
void _UpdateTitle(const Tab& tab);
|
||||
void _UpdateTabIcon(Tab& tab);
|
||||
void _UpdateTitle(const TerminalTab& tab);
|
||||
void _UpdateTabIcon(TerminalTab& tab);
|
||||
void _UpdateTabView();
|
||||
void _UpdateTabWidthMode();
|
||||
void _UpdateCommandsForPalette();
|
||||
void _UpdatePaletteWithInOrderTabs();
|
||||
static winrt::Windows::Foundation::Collections::IMap<winrt::hstring, Microsoft::Terminal::Settings::Model::Command> _ExpandCommands(Windows::Foundation::Collections::IMapView<winrt::hstring, Microsoft::Terminal::Settings::Model::Command> commandsToExpand,
|
||||
Windows::Foundation::Collections::IVectorView<Microsoft::Terminal::Settings::Model::Profile> profiles,
|
||||
Windows::Foundation::Collections::IMapView<winrt::hstring, Microsoft::Terminal::Settings::Model::ColorScheme> schemes);
|
||||
@@ -159,7 +163,7 @@ namespace winrt::TerminalApp::implementation
|
||||
void _RemoveTabViewItem(const Microsoft::UI::Xaml::Controls::TabViewItem& tabViewItem);
|
||||
void _RemoveTabViewItemByIndex(uint32_t tabIndex);
|
||||
|
||||
void _RegisterTerminalEvents(Microsoft::Terminal::TerminalControl::TermControl term, Tab& hostingTab);
|
||||
void _RegisterTerminalEvents(Microsoft::Terminal::TerminalControl::TermControl term, TerminalTab& hostingTab);
|
||||
|
||||
void _SelectNextTab(const bool bMoveRight);
|
||||
bool _SelectTab(const uint32_t tabIndex);
|
||||
@@ -167,7 +171,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
winrt::Microsoft::Terminal::TerminalControl::TermControl _GetActiveControl();
|
||||
std::optional<uint32_t> _GetFocusedTabIndex() const noexcept;
|
||||
winrt::com_ptr<Tab> _GetFocusedTab();
|
||||
TerminalApp::TabBase _GetFocusedTab();
|
||||
winrt::fire_and_forget _SetFocusedTabIndex(const uint32_t tabIndex);
|
||||
void _CloseFocusedTab();
|
||||
void _CloseFocusedPane();
|
||||
@@ -218,6 +222,12 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
void _UnZoomIfNeeded();
|
||||
|
||||
void _OpenSettingsUI();
|
||||
|
||||
void _ReapplyCompactTabSize();
|
||||
|
||||
void _MakeSwitchToTabCommand(const TerminalApp::TabBase& tab, const uint32_t index);
|
||||
|
||||
static int _ComputeScrollDelta(ScrollDirection scrollDirection, const uint32_t rowsToScroll);
|
||||
static uint32_t _ReadSystemRowsToScroll();
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace TerminalApp
|
||||
// that there's only one application-global dialog visible at a time,
|
||||
// and because of GH#5224.
|
||||
IDialogPresenter DialogPresenter;
|
||||
void ShowKeyboardServiceWarning();
|
||||
String KeyboardServiceDisabledText { get; };
|
||||
|
||||
event Windows.Foundation.TypedEventHandler<Object, String> TitleChanged;
|
||||
event Windows.Foundation.TypedEventHandler<Object, LastTabClosedEventArgs> LastTabClosed;
|
||||
|
||||
@@ -83,6 +83,20 @@ the MIT License. See LICENSE in the project root for license information. -->
|
||||
</TextBlock>
|
||||
</ContentDialog>
|
||||
|
||||
|
||||
<ContentDialog
|
||||
x:Load="False"
|
||||
x:Name="KeyboardServiceDisabledDialog"
|
||||
x:Uid="KeyboardServiceDisabledDialog"
|
||||
DefaultButton="Primary">
|
||||
|
||||
<TextBlock
|
||||
Foreground="{ThemeResource ErrorTextBrush}"
|
||||
IsTextSelectionEnabled="True"
|
||||
TextWrapping="WrapWholeWords"
|
||||
Text="{x:Bind KeyboardServiceDisabledText, Mode=OneWay}" />
|
||||
</ContentDialog>
|
||||
|
||||
<local:CommandPalette
|
||||
x:Name="CommandPalette"
|
||||
Grid.Row="1"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include "pch.h"
|
||||
#include <LibraryResources.h>
|
||||
#include "ColorPickupFlyout.h"
|
||||
#include "Tab.h"
|
||||
#include "Tab.g.cpp"
|
||||
#include "TerminalTab.h"
|
||||
#include "TerminalTab.g.cpp"
|
||||
#include "Utils.h"
|
||||
#include "ColorHelper.h"
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace winrt
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
Tab::Tab(const GUID& profile, const TermControl& control)
|
||||
TerminalTab::TerminalTab(const GUID& profile, const TermControl& control)
|
||||
{
|
||||
_rootPane = std::make_shared<Pane>(profile, control, true);
|
||||
|
||||
@@ -36,7 +36,6 @@ namespace winrt::TerminalApp::implementation
|
||||
Content(_rootPane->GetRootElement());
|
||||
|
||||
_MakeTabViewItem();
|
||||
_MakeSwitchToTabCommand();
|
||||
_CreateContextMenu();
|
||||
}
|
||||
|
||||
@@ -46,18 +45,18 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_MakeTabViewItem()
|
||||
void TerminalTab::_MakeTabViewItem()
|
||||
{
|
||||
_tabViewItem = ::winrt::MUX::Controls::TabViewItem{};
|
||||
TabViewItem(::winrt::MUX::Controls::TabViewItem{});
|
||||
|
||||
_tabViewItem.DoubleTapped([weakThis = get_weak()](auto&& /*s*/, auto&& /*e*/) {
|
||||
TabViewItem().DoubleTapped([weakThis = get_weak()](auto&& /*s*/, auto&& /*e*/) {
|
||||
if (auto tab{ weakThis.get() })
|
||||
{
|
||||
tab->ActivateTabRenamer();
|
||||
}
|
||||
});
|
||||
|
||||
_UpdateTitle();
|
||||
UpdateTitle();
|
||||
_RecalculateAndApplyTabColor();
|
||||
}
|
||||
|
||||
@@ -72,22 +71,11 @@ namespace winrt::TerminalApp::implementation
|
||||
// Return Value:
|
||||
// - nullptr if no children were marked `_lastFocused`, else the TermControl
|
||||
// that was last focused.
|
||||
TermControl Tab::GetActiveTerminalControl() const
|
||||
TermControl TerminalTab::GetActiveTerminalControl() const
|
||||
{
|
||||
return _activePane->GetTerminalControl();
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Gets the TabViewItem that represents this Tab
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - The TabViewItem that represents this Tab
|
||||
winrt::MUX::Controls::TabViewItem Tab::GetTabViewItem()
|
||||
{
|
||||
return _tabViewItem;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Called after construction of a Tab object to bind event handlers to its
|
||||
// associated Pane and TermControl object
|
||||
@@ -95,39 +83,29 @@ namespace winrt::TerminalApp::implementation
|
||||
// - control: reference to the TermControl object to bind event to
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::Initialize(const TermControl& control)
|
||||
void TerminalTab::Initialize(const TermControl& control)
|
||||
{
|
||||
_BindEventHandlers(control);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Returns true if this is the currently focused tab. For any set of tabs,
|
||||
// there should only be one tab that is marked as focused, though each tab has
|
||||
// no control over the other tabs in the set.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - true iff this tab is focused.
|
||||
bool Tab::IsFocused() const noexcept
|
||||
{
|
||||
return _focused;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Updates our focus state. If we're gaining focus, make sure to transfer
|
||||
// focus to the last focused terminal control in our tree of controls.
|
||||
// Arguments:
|
||||
// - focused: our new focus state. If true, we should be focused. If false, we
|
||||
// should be unfocused.
|
||||
// - focused: our new focus state
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::SetFocused(const bool focused)
|
||||
void TerminalTab::Focus(WUX::FocusState focusState)
|
||||
{
|
||||
_focused = focused;
|
||||
_focusState = focusState;
|
||||
|
||||
if (_focused)
|
||||
if (_focusState != FocusState::Unfocused)
|
||||
{
|
||||
_Focus();
|
||||
auto lastFocusedControl = GetActiveTerminalControl();
|
||||
if (lastFocusedControl)
|
||||
{
|
||||
lastFocusedControl.Focus(_focusState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +118,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// Return Value:
|
||||
// - nullopt if no children of this tab were the last control to be
|
||||
// focused, else the GUID of the profile of the last control to be focused
|
||||
std::optional<GUID> Tab::GetFocusedProfile() const noexcept
|
||||
std::optional<GUID> TerminalTab::GetFocusedProfile() const noexcept
|
||||
{
|
||||
return _activePane->GetFocusedProfile();
|
||||
}
|
||||
@@ -152,7 +130,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - control: reference to the TermControl object to bind event to
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_BindEventHandlers(const TermControl& control) noexcept
|
||||
void TerminalTab::_BindEventHandlers(const TermControl& control) noexcept
|
||||
{
|
||||
_AttachEventHandlersToPane(_rootPane);
|
||||
_AttachEventHandlersToControl(control);
|
||||
@@ -165,35 +143,18 @@ namespace winrt::TerminalApp::implementation
|
||||
// - profile: The GUID of the profile these settings should apply to.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::UpdateSettings(const TerminalSettings& settings, const GUID& profile)
|
||||
void TerminalTab::UpdateSettings(const TerminalSettings& settings, const GUID& profile)
|
||||
{
|
||||
_rootPane->UpdateSettings(settings, profile);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Focus the last focused control in our tree of panes.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_Focus()
|
||||
{
|
||||
_focused = true;
|
||||
|
||||
auto lastFocusedControl = GetActiveTerminalControl();
|
||||
if (lastFocusedControl)
|
||||
{
|
||||
lastFocusedControl.Focus(FocusState::Programmatic);
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Set the icon on the TabViewItem for this tab.
|
||||
// Arguments:
|
||||
// - iconPath: The new path string to use as the IconPath for our TabViewItem
|
||||
// Return Value:
|
||||
// - <none>
|
||||
winrt::fire_and_forget Tab::UpdateIcon(const winrt::hstring iconPath)
|
||||
winrt::fire_and_forget TerminalTab::UpdateIcon(const winrt::hstring iconPath)
|
||||
{
|
||||
// Don't reload our icon if it hasn't changed.
|
||||
if (iconPath == _lastIconPath)
|
||||
@@ -205,13 +166,13 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
auto weakThis{ get_weak() };
|
||||
|
||||
co_await winrt::resume_foreground(_tabViewItem.Dispatcher());
|
||||
co_await winrt::resume_foreground(TabViewItem().Dispatcher());
|
||||
|
||||
if (auto tab{ weakThis.get() })
|
||||
{
|
||||
// The TabViewItem Icon needs MUX while the IconSourceElement in the CommandPalette needs WUX...
|
||||
IconSource(IconPathConverter::IconSourceWUX(_lastIconPath));
|
||||
_tabViewItem.IconSource(IconPathConverter::IconSourceMUX(_lastIconPath));
|
||||
Icon(_lastIconPath);
|
||||
TabViewItem().IconSource(IconPathConverter::IconSourceMUX(_lastIconPath));
|
||||
|
||||
// Update SwitchToTab command's icon
|
||||
SwitchToTabCommand().Icon(_lastIconPath);
|
||||
@@ -225,7 +186,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - the title string of the last focused terminal control in our tree.
|
||||
winrt::hstring Tab::GetActiveTitle() const
|
||||
winrt::hstring TerminalTab::_GetActiveTitle() const
|
||||
{
|
||||
if (!_runtimeTabText.empty())
|
||||
{
|
||||
@@ -243,14 +204,14 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
winrt::fire_and_forget Tab::_UpdateTitle()
|
||||
winrt::fire_and_forget TerminalTab::UpdateTitle()
|
||||
{
|
||||
auto weakThis{ get_weak() };
|
||||
co_await winrt::resume_foreground(_tabViewItem.Dispatcher());
|
||||
co_await winrt::resume_foreground(TabViewItem().Dispatcher());
|
||||
if (auto tab{ weakThis.get() })
|
||||
{
|
||||
// Bubble our current tab text to anyone who's listening for changes.
|
||||
Title(GetActiveTitle());
|
||||
Title(_GetActiveTitle());
|
||||
|
||||
// Update SwitchToTab command's name
|
||||
SwitchToTabCommand().Name(Title());
|
||||
@@ -268,7 +229,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - delta: a number of lines to move the viewport relative to the current viewport.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
winrt::fire_and_forget Tab::Scroll(const int delta)
|
||||
winrt::fire_and_forget TerminalTab::Scroll(const int delta)
|
||||
{
|
||||
auto control = GetActiveTerminalControl();
|
||||
|
||||
@@ -284,7 +245,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - splitType: The type of split we want to create.
|
||||
// Return Value:
|
||||
// - True if the focused pane can be split. False otherwise.
|
||||
bool Tab::CanSplitPane(SplitState splitType)
|
||||
bool TerminalTab::CanSplitPane(SplitState splitType)
|
||||
{
|
||||
return _activePane->CanSplit(splitType);
|
||||
}
|
||||
@@ -298,7 +259,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - control: A TermControl to use in the new pane.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::SplitPane(SplitState splitType, const GUID& profile, TermControl& control)
|
||||
void TerminalTab::SplitPane(SplitState splitType, const GUID& profile, TermControl& control)
|
||||
{
|
||||
auto [first, second] = _activePane->Split(splitType, profile, control);
|
||||
_activePane = first;
|
||||
@@ -318,7 +279,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
// Method Description:
|
||||
// - See Pane::CalcSnappedDimension
|
||||
float Tab::CalcSnappedDimension(const bool widthOrHeight, const float dimension) const
|
||||
float TerminalTab::CalcSnappedDimension(const bool widthOrHeight, const float dimension) const
|
||||
{
|
||||
return _rootPane->CalcSnappedDimension(widthOrHeight, dimension);
|
||||
}
|
||||
@@ -330,7 +291,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - newSize: the amount of space that the panes have to fill now.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::ResizeContent(const winrt::Windows::Foundation::Size& newSize)
|
||||
void TerminalTab::ResizeContent(const winrt::Windows::Foundation::Size& newSize)
|
||||
{
|
||||
// NOTE: This _must_ be called on the root pane, so that it can propagate
|
||||
// throughout the entire tree.
|
||||
@@ -344,7 +305,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - direction: The direction to move the separator in.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::ResizePane(const Direction& direction)
|
||||
void TerminalTab::ResizePane(const Direction& direction)
|
||||
{
|
||||
// NOTE: This _must_ be called on the root pane, so that it can propagate
|
||||
// throughout the entire tree.
|
||||
@@ -358,7 +319,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - direction: The direction to move the focus in.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::NavigateFocus(const Direction& direction)
|
||||
void TerminalTab::NavigateFocus(const Direction& direction)
|
||||
{
|
||||
// NOTE: This _must_ be called on the root pane, so that it can propagate
|
||||
// throughout the entire tree.
|
||||
@@ -367,7 +328,7 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
// Method Description:
|
||||
// - Prepares this tab for being removed from the UI hierarchy by shutting down all active connections.
|
||||
void Tab::Shutdown()
|
||||
void TerminalTab::Shutdown()
|
||||
{
|
||||
_rootPane->Shutdown();
|
||||
}
|
||||
@@ -380,21 +341,21 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::ClosePane()
|
||||
void TerminalTab::ClosePane()
|
||||
{
|
||||
_activePane->Close();
|
||||
}
|
||||
|
||||
void Tab::SetTabText(winrt::hstring title)
|
||||
void TerminalTab::SetTabText(winrt::hstring title)
|
||||
{
|
||||
_runtimeTabText = title;
|
||||
_UpdateTitle();
|
||||
UpdateTitle();
|
||||
}
|
||||
|
||||
void Tab::ResetTabText()
|
||||
void TerminalTab::ResetTabText()
|
||||
{
|
||||
_runtimeTabText = L"";
|
||||
_UpdateTitle();
|
||||
UpdateTitle();
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -404,7 +365,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::ActivateTabRenamer()
|
||||
void TerminalTab::ActivateTabRenamer()
|
||||
{
|
||||
_inRename = true;
|
||||
_receivedKeyDown = false;
|
||||
@@ -421,7 +382,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - control: the TermControl to add events to.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_AttachEventHandlersToControl(const TermControl& control)
|
||||
void TerminalTab::_AttachEventHandlersToControl(const TermControl& control)
|
||||
{
|
||||
auto weakThis{ get_weak() };
|
||||
|
||||
@@ -431,7 +392,7 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
// The title of the control changed, but not necessarily the title of the tab.
|
||||
// Set the tab's text to the active panes' text.
|
||||
tab->_UpdateTitle();
|
||||
tab->UpdateTitle();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -468,7 +429,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - pane: a Pane to mark as active.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_UpdateActivePane(std::shared_ptr<Pane> pane)
|
||||
void TerminalTab::_UpdateActivePane(std::shared_ptr<Pane> pane)
|
||||
{
|
||||
// Clear the active state of the entire tree, and mark only the pane as active.
|
||||
_rootPane->ClearActive();
|
||||
@@ -476,7 +437,7 @@ namespace winrt::TerminalApp::implementation
|
||||
_activePane->SetActive();
|
||||
|
||||
// Update our own title text to match the newly-active pane.
|
||||
_UpdateTitle();
|
||||
UpdateTitle();
|
||||
|
||||
// Raise our own ActivePaneChanged event.
|
||||
_ActivePaneChangedHandlers();
|
||||
@@ -491,7 +452,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_AttachEventHandlersToPane(std::shared_ptr<Pane> pane)
|
||||
void TerminalTab::_AttachEventHandlersToPane(std::shared_ptr<Pane> pane)
|
||||
{
|
||||
auto weakThis{ get_weak() };
|
||||
|
||||
@@ -531,7 +492,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_CreateContextMenu()
|
||||
void TerminalTab::_CreateContextMenu()
|
||||
{
|
||||
auto weakThis{ get_weak() };
|
||||
|
||||
@@ -605,57 +566,7 @@ namespace winrt::TerminalApp::implementation
|
||||
newTabFlyout.Items().Append(menuSeparator);
|
||||
newTabFlyout.Items().Append(_CreateCloseSubMenu());
|
||||
newTabFlyout.Items().Append(closeTabMenuItem);
|
||||
_tabViewItem.ContextFlyout(newTabFlyout);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Creates a sub-menu containing menu items to close multiple tabs
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - the created MenuFlyoutSubItem
|
||||
Controls::MenuFlyoutSubItem Tab::_CreateCloseSubMenu()
|
||||
{
|
||||
auto weakThis{ get_weak() };
|
||||
|
||||
// Close tabs after
|
||||
_closeTabsAfterMenuItem.Click([weakThis](auto&&, auto&&) {
|
||||
if (auto tab{ weakThis.get() })
|
||||
{
|
||||
tab->_CloseTabsAfter();
|
||||
}
|
||||
});
|
||||
_closeTabsAfterMenuItem.Text(RS_(L"TabCloseAfter"));
|
||||
|
||||
// Close other tabs
|
||||
_closeOtherTabsMenuItem.Click([weakThis](auto&&, auto&&) {
|
||||
if (auto tab{ weakThis.get() })
|
||||
{
|
||||
tab->_CloseOtherTabs();
|
||||
}
|
||||
});
|
||||
_closeOtherTabsMenuItem.Text(RS_(L"TabCloseOther"));
|
||||
|
||||
Controls::MenuFlyoutSubItem closeSubMenu;
|
||||
closeSubMenu.Text(RS_(L"TabCloseSubMenu"));
|
||||
closeSubMenu.Items().Append(_closeTabsAfterMenuItem);
|
||||
closeSubMenu.Items().Append(_closeOtherTabsMenuItem);
|
||||
|
||||
return closeSubMenu;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Enable the Close menu items based on tab index and total number of tabs
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_EnableCloseMenuItems()
|
||||
{
|
||||
// close other tabs is enabled only if there are other tabs
|
||||
_closeOtherTabsMenuItem.IsEnabled(TabViewNumTabs() > 1);
|
||||
// close tabs after is enabled only if there are other tabs on the right
|
||||
_closeTabsAfterMenuItem.IsEnabled(TabViewIndex() < TabViewNumTabs() - 1);
|
||||
TabViewItem().ContextFlyout(newTabFlyout);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -670,9 +581,9 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_UpdateTabHeader()
|
||||
void TerminalTab::_UpdateTabHeader()
|
||||
{
|
||||
winrt::hstring tabText{ GetActiveTitle() };
|
||||
winrt::hstring tabText{ Title() };
|
||||
|
||||
if (!_inRename)
|
||||
{
|
||||
@@ -690,13 +601,13 @@ namespace winrt::TerminalApp::implementation
|
||||
tb.Text(tabText);
|
||||
sp.Children().Append(tb);
|
||||
|
||||
_tabViewItem.Header(sp);
|
||||
TabViewItem().Header(sp);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If we're not currently in the process of renaming the tab,
|
||||
// then just set the tab's text to whatever our active title is.
|
||||
_tabViewItem.Header(winrt::box_value(tabText));
|
||||
TabViewItem().Header(winrt::box_value(tabText));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -713,9 +624,9 @@ namespace winrt::TerminalApp::implementation
|
||||
// - tabText: This should be the text to initialize the rename text box with.
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_ConstructTabRenameBox(const winrt::hstring& tabText)
|
||||
void TerminalTab::_ConstructTabRenameBox(const winrt::hstring& tabText)
|
||||
{
|
||||
if (_tabViewItem.Header().try_as<Controls::TextBox>())
|
||||
if (TabViewItem().Header().try_as<Controls::TextBox>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -763,7 +674,7 @@ namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
tab->_runtimeTabText = textBox.Text();
|
||||
tab->_inRename = false;
|
||||
tab->_UpdateTitle();
|
||||
tab->UpdateTitle();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -793,7 +704,7 @@ namespace winrt::TerminalApp::implementation
|
||||
e.Handled(true);
|
||||
textBox.Text(tab->_runtimeTabText);
|
||||
tab->_inRename = false;
|
||||
tab->_UpdateTitle();
|
||||
tab->UpdateTitle();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -803,7 +714,7 @@ namespace winrt::TerminalApp::implementation
|
||||
_tabRenameBoxLayoutUpdatedRevoker = tabTextBox.LayoutUpdated(winrt::auto_revoke, [this](auto&&, auto&&) {
|
||||
// Curiously, the sender for this event is null, so we have to
|
||||
// get the TextBox from the Tab's Header().
|
||||
auto textBox{ _tabViewItem.Header().try_as<Controls::TextBox>() };
|
||||
auto textBox{ TabViewItem().Header().try_as<Controls::TextBox>() };
|
||||
if (textBox)
|
||||
{
|
||||
textBox.SelectAll();
|
||||
@@ -813,7 +724,7 @@ namespace winrt::TerminalApp::implementation
|
||||
_tabRenameBoxLayoutUpdatedRevoker.revoke();
|
||||
});
|
||||
|
||||
_tabViewItem.Header(tabTextBox);
|
||||
TabViewItem().Header(tabTextBox);
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -822,7 +733,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - The tab's color, if any
|
||||
std::optional<winrt::Windows::UI::Color> Tab::GetTabColor()
|
||||
std::optional<winrt::Windows::UI::Color> TerminalTab::GetTabColor()
|
||||
{
|
||||
const auto currControlColor{ GetActiveTerminalControl().TabColor() };
|
||||
std::optional<winrt::Windows::UI::Color> controlTabColor;
|
||||
@@ -859,7 +770,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - color: the color the user picked for their tab
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::SetRuntimeTabColor(const winrt::Windows::UI::Color& color)
|
||||
void TerminalTab::SetRuntimeTabColor(const winrt::Windows::UI::Color& color)
|
||||
{
|
||||
_runtimeTabColor.emplace(color);
|
||||
_RecalculateAndApplyTabColor();
|
||||
@@ -874,11 +785,11 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_RecalculateAndApplyTabColor()
|
||||
void TerminalTab::_RecalculateAndApplyTabColor()
|
||||
{
|
||||
auto weakThis{ get_weak() };
|
||||
|
||||
_tabViewItem.Dispatcher().RunAsync(CoreDispatcherPriority::Normal, [weakThis]() {
|
||||
TabViewItem().Dispatcher().RunAsync(CoreDispatcherPriority::Normal, [weakThis]() {
|
||||
auto ptrTab = weakThis.get();
|
||||
if (!ptrTab)
|
||||
return;
|
||||
@@ -906,7 +817,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - color: the color the user picked for their tab
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_ApplyTabColor(const winrt::Windows::UI::Color& color)
|
||||
void TerminalTab::_ApplyTabColor(const winrt::Windows::UI::Color& color)
|
||||
{
|
||||
Media::SolidColorBrush selectedTabBrush{};
|
||||
Media::SolidColorBrush deselectedTabBrush{};
|
||||
@@ -935,15 +846,15 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
// currently if a tab has a custom color, a deselected state is
|
||||
// signified by using the same color with a bit ot transparency
|
||||
_tabViewItem.Resources().Insert(winrt::box_value(L"TabViewItemHeaderBackgroundSelected"), selectedTabBrush);
|
||||
_tabViewItem.Resources().Insert(winrt::box_value(L"TabViewItemHeaderBackground"), deselectedTabBrush);
|
||||
_tabViewItem.Resources().Insert(winrt::box_value(L"TabViewItemHeaderBackgroundPointerOver"), hoverTabBrush);
|
||||
_tabViewItem.Resources().Insert(winrt::box_value(L"TabViewItemHeaderBackgroundPressed"), selectedTabBrush);
|
||||
_tabViewItem.Resources().Insert(winrt::box_value(L"TabViewItemHeaderForeground"), fontBrush);
|
||||
_tabViewItem.Resources().Insert(winrt::box_value(L"TabViewItemHeaderForegroundSelected"), fontBrush);
|
||||
_tabViewItem.Resources().Insert(winrt::box_value(L"TabViewItemHeaderForegroundPointerOver"), fontBrush);
|
||||
_tabViewItem.Resources().Insert(winrt::box_value(L"TabViewItemHeaderForegroundPressed"), fontBrush);
|
||||
_tabViewItem.Resources().Insert(winrt::box_value(L"TabViewButtonForegroundActiveTab"), fontBrush);
|
||||
TabViewItem().Resources().Insert(winrt::box_value(L"TabViewItemHeaderBackgroundSelected"), selectedTabBrush);
|
||||
TabViewItem().Resources().Insert(winrt::box_value(L"TabViewItemHeaderBackground"), deselectedTabBrush);
|
||||
TabViewItem().Resources().Insert(winrt::box_value(L"TabViewItemHeaderBackgroundPointerOver"), hoverTabBrush);
|
||||
TabViewItem().Resources().Insert(winrt::box_value(L"TabViewItemHeaderBackgroundPressed"), selectedTabBrush);
|
||||
TabViewItem().Resources().Insert(winrt::box_value(L"TabViewItemHeaderForeground"), fontBrush);
|
||||
TabViewItem().Resources().Insert(winrt::box_value(L"TabViewItemHeaderForegroundSelected"), fontBrush);
|
||||
TabViewItem().Resources().Insert(winrt::box_value(L"TabViewItemHeaderForegroundPointerOver"), fontBrush);
|
||||
TabViewItem().Resources().Insert(winrt::box_value(L"TabViewItemHeaderForegroundPressed"), fontBrush);
|
||||
TabViewItem().Resources().Insert(winrt::box_value(L"TabViewButtonForegroundActiveTab"), fontBrush);
|
||||
|
||||
_RefreshVisualState();
|
||||
|
||||
@@ -958,7 +869,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::ResetRuntimeTabColor()
|
||||
void TerminalTab::ResetRuntimeTabColor()
|
||||
{
|
||||
_runtimeTabColor.reset();
|
||||
_RecalculateAndApplyTabColor();
|
||||
@@ -971,7 +882,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_ClearTabBackgroundColor()
|
||||
void TerminalTab::_ClearTabBackgroundColor()
|
||||
{
|
||||
winrt::hstring keys[] = {
|
||||
L"TabViewItemHeaderBackground",
|
||||
@@ -989,9 +900,9 @@ namespace winrt::TerminalApp::implementation
|
||||
for (auto keyString : keys)
|
||||
{
|
||||
auto key = winrt::box_value(keyString);
|
||||
if (_tabViewItem.Resources().HasKey(key))
|
||||
if (TabViewItem().Resources().HasKey(key))
|
||||
{
|
||||
_tabViewItem.Resources().Remove(key);
|
||||
TabViewItem().Resources().Remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1005,9 +916,9 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::ActivateColorPicker()
|
||||
void TerminalTab::ActivateColorPicker()
|
||||
{
|
||||
_tabColorPickup.ShowAt(_tabViewItem);
|
||||
_tabColorPickup.ShowAt(TabViewItem());
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
@@ -1017,17 +928,17 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_RefreshVisualState()
|
||||
void TerminalTab::_RefreshVisualState()
|
||||
{
|
||||
if (_focused)
|
||||
if (_focusState != FocusState::Unfocused)
|
||||
{
|
||||
VisualStateManager::GoToState(_tabViewItem, L"Normal", true);
|
||||
VisualStateManager::GoToState(_tabViewItem, L"Selected", true);
|
||||
VisualStateManager::GoToState(TabViewItem(), L"Normal", true);
|
||||
VisualStateManager::GoToState(TabViewItem(), L"Selected", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
VisualStateManager::GoToState(_tabViewItem, L"Selected", true);
|
||||
VisualStateManager::GoToState(_tabViewItem, L"Normal", true);
|
||||
VisualStateManager::GoToState(TabViewItem(), L"Selected", true);
|
||||
VisualStateManager::GoToState(TabViewItem(), L"Normal", true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1037,7 +948,7 @@ namespace winrt::TerminalApp::implementation
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - The total number of leaf panes hosted by this tab.
|
||||
int Tab::GetLeafPaneCount() const noexcept
|
||||
int TerminalTab::GetLeafPaneCount() const noexcept
|
||||
{
|
||||
return _rootPane->GetLeafPaneCount();
|
||||
}
|
||||
@@ -1052,12 +963,12 @@ namespace winrt::TerminalApp::implementation
|
||||
// Return Value:
|
||||
// - The SplitState that we should use for an `Automatic` split given
|
||||
// `availableSpace`
|
||||
SplitState Tab::PreCalculateAutoSplit(winrt::Windows::Foundation::Size availableSpace) const
|
||||
SplitState TerminalTab::PreCalculateAutoSplit(winrt::Windows::Foundation::Size availableSpace) const
|
||||
{
|
||||
return _rootPane->PreCalculateAutoSplit(_activePane, availableSpace).value_or(SplitState::Vertical);
|
||||
}
|
||||
|
||||
bool Tab::PreCalculateCanSplit(SplitState splitType, winrt::Windows::Foundation::Size availableSpace) const
|
||||
bool TerminalTab::PreCalculateCanSplit(SplitState splitType, winrt::Windows::Foundation::Size availableSpace) const
|
||||
{
|
||||
return _rootPane->PreCalculateCanSplit(_activePane, splitType, availableSpace).value_or(false);
|
||||
}
|
||||
@@ -1066,13 +977,13 @@ namespace winrt::TerminalApp::implementation
|
||||
// - Toggle our zoom state.
|
||||
// * If we're not zoomed, then zoom the active pane, making it take the
|
||||
// full size of the tab. We'll achieve this by changing our response to
|
||||
// Tab::GetRootElement, so that it'll return the zoomed pane only.
|
||||
// Tab::GetTabContent, so that it'll return the zoomed pane only.
|
||||
// * If we're currently zoomed on a pane, un-zoom that pane.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::ToggleZoom()
|
||||
void TerminalTab::ToggleZoom()
|
||||
{
|
||||
if (_zoomedPane)
|
||||
{
|
||||
@@ -1083,7 +994,7 @@ namespace winrt::TerminalApp::implementation
|
||||
EnterZoom();
|
||||
}
|
||||
}
|
||||
void Tab::EnterZoom()
|
||||
void TerminalTab::EnterZoom()
|
||||
{
|
||||
_zoomedPane = _activePane;
|
||||
_rootPane->Maximize(_zoomedPane);
|
||||
@@ -1091,7 +1002,7 @@ namespace winrt::TerminalApp::implementation
|
||||
_UpdateTabHeader();
|
||||
Content(_zoomedPane->GetRootElement());
|
||||
}
|
||||
void Tab::ExitZoom()
|
||||
void TerminalTab::ExitZoom()
|
||||
{
|
||||
_rootPane->Restore(_zoomedPane);
|
||||
_zoomedPane = nullptr;
|
||||
@@ -1100,60 +1011,12 @@ namespace winrt::TerminalApp::implementation
|
||||
Content(_rootPane->GetRootElement());
|
||||
}
|
||||
|
||||
bool Tab::IsZoomed()
|
||||
bool TerminalTab::IsZoomed()
|
||||
{
|
||||
return _zoomedPane != nullptr;
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Initializes a SwitchToTab command object for this Tab instance.
|
||||
// Arguments:
|
||||
// - <none>
|
||||
// Return Value:
|
||||
// - <none>
|
||||
void Tab::_MakeSwitchToTabCommand()
|
||||
{
|
||||
SwitchToTabArgs args{ _TabViewIndex };
|
||||
ActionAndArgs focusTabAction{ ShortcutAction::SwitchToTab, args };
|
||||
|
||||
Command command;
|
||||
command.Action(focusTabAction);
|
||||
command.Name(Title());
|
||||
command.Icon(_lastIconPath);
|
||||
|
||||
SwitchToTabCommand(command);
|
||||
}
|
||||
|
||||
void Tab::_CloseTabsAfter()
|
||||
{
|
||||
CloseTabsAfterArgs args{ _TabViewIndex };
|
||||
ActionAndArgs closeTabsAfter{ ShortcutAction::CloseTabsAfter, args };
|
||||
|
||||
_dispatch.DoAction(closeTabsAfter);
|
||||
}
|
||||
|
||||
void Tab::_CloseOtherTabs()
|
||||
{
|
||||
CloseOtherTabsArgs args{ _TabViewIndex };
|
||||
ActionAndArgs closeOtherTabs{ ShortcutAction::CloseOtherTabs, args };
|
||||
|
||||
_dispatch.DoAction(closeOtherTabs);
|
||||
}
|
||||
|
||||
void Tab::UpdateTabViewIndex(const uint32_t idx, const uint32_t numTabs)
|
||||
{
|
||||
TabViewIndex(idx);
|
||||
TabViewNumTabs(numTabs);
|
||||
_EnableCloseMenuItems();
|
||||
SwitchToTabCommand().Action().Args().as<SwitchToTabArgs>().TabIndex(idx);
|
||||
}
|
||||
|
||||
void Tab::SetDispatch(const winrt::TerminalApp::ShortcutActionDispatch& dispatch)
|
||||
{
|
||||
_dispatch = dispatch;
|
||||
}
|
||||
|
||||
DEFINE_EVENT(Tab, ActivePaneChanged, _ActivePaneChangedHandlers, winrt::delegate<>);
|
||||
DEFINE_EVENT(Tab, ColorSelected, _colorSelected, winrt::delegate<winrt::Windows::UI::Color>);
|
||||
DEFINE_EVENT(Tab, ColorCleared, _colorCleared, winrt::delegate<>);
|
||||
DEFINE_EVENT(TerminalTab, ActivePaneChanged, _ActivePaneChangedHandlers, winrt::delegate<>);
|
||||
DEFINE_EVENT(TerminalTab, ColorSelected, _colorSelected, winrt::delegate<winrt::Windows::UI::Color>);
|
||||
DEFINE_EVENT(TerminalTab, ColorCleared, _colorCleared, winrt::delegate<>);
|
||||
}
|
||||
@@ -4,7 +4,8 @@
|
||||
#pragma once
|
||||
#include "Pane.h"
|
||||
#include "ColorPickupFlyout.h"
|
||||
#include "Tab.g.h"
|
||||
#include "TabBase.h"
|
||||
#include "TerminalTab.g.h"
|
||||
|
||||
// fwdecl unittest classes
|
||||
namespace TerminalAppLocalTests
|
||||
@@ -14,21 +15,18 @@ namespace TerminalAppLocalTests
|
||||
|
||||
namespace winrt::TerminalApp::implementation
|
||||
{
|
||||
struct Tab : public TabT<Tab>
|
||||
struct TerminalTab : TerminalTabT<TerminalTab, TabBase>
|
||||
{
|
||||
public:
|
||||
Tab() = delete;
|
||||
Tab(const GUID& profile, const winrt::Microsoft::Terminal::TerminalControl::TermControl& control);
|
||||
TerminalTab(const GUID& profile, const winrt::Microsoft::Terminal::TerminalControl::TermControl& control);
|
||||
|
||||
// Called after construction to perform the necessary setup, which relies on weak_ptr
|
||||
void Initialize(const winrt::Microsoft::Terminal::TerminalControl::TermControl& control);
|
||||
|
||||
winrt::Microsoft::UI::Xaml::Controls::TabViewItem GetTabViewItem();
|
||||
winrt::Microsoft::Terminal::TerminalControl::TermControl GetActiveTerminalControl() const;
|
||||
std::optional<GUID> GetFocusedProfile() const noexcept;
|
||||
|
||||
bool IsFocused() const noexcept;
|
||||
void SetFocused(const bool focused);
|
||||
void Focus(winrt::Windows::UI::Xaml::FocusState focusState) override;
|
||||
|
||||
winrt::fire_and_forget Scroll(const int delta);
|
||||
|
||||
@@ -46,9 +44,9 @@ namespace winrt::TerminalApp::implementation
|
||||
void NavigateFocus(const winrt::Microsoft::Terminal::Settings::Model::Direction& direction);
|
||||
|
||||
void UpdateSettings(const winrt::TerminalApp::TerminalSettings& settings, const GUID& profile);
|
||||
winrt::hstring GetActiveTitle() const;
|
||||
winrt::fire_and_forget UpdateTitle();
|
||||
|
||||
void Shutdown();
|
||||
void Shutdown() override;
|
||||
void ClosePane();
|
||||
|
||||
void SetTabText(winrt::hstring title);
|
||||
@@ -68,28 +66,10 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
int GetLeafPaneCount() const noexcept;
|
||||
|
||||
void UpdateTabViewIndex(const uint32_t idx, const uint32_t numTabs);
|
||||
|
||||
void SetDispatch(const winrt::TerminalApp::ShortcutActionDispatch& dispatch);
|
||||
|
||||
WINRT_CALLBACK(Closed, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>);
|
||||
WINRT_CALLBACK(PropertyChanged, Windows::UI::Xaml::Data::PropertyChangedEventHandler);
|
||||
DECLARE_EVENT(ActivePaneChanged, _ActivePaneChangedHandlers, winrt::delegate<>);
|
||||
DECLARE_EVENT(ColorSelected, _colorSelected, winrt::delegate<winrt::Windows::UI::Color>);
|
||||
DECLARE_EVENT(ColorCleared, _colorCleared, winrt::delegate<>);
|
||||
|
||||
OBSERVABLE_GETSET_PROPERTY(winrt::hstring, Title, _PropertyChangedHandlers);
|
||||
OBSERVABLE_GETSET_PROPERTY(winrt::Windows::UI::Xaml::Controls::IconSource, IconSource, _PropertyChangedHandlers, nullptr);
|
||||
OBSERVABLE_GETSET_PROPERTY(winrt::Microsoft::Terminal::Settings::Model::Command, SwitchToTabCommand, _PropertyChangedHandlers, nullptr);
|
||||
|
||||
// The TabViewIndex is the index this Tab object resides in TerminalPage's _tabs vector.
|
||||
// This is needed since Tab is going to be managing its own SwitchToTab command.
|
||||
OBSERVABLE_GETSET_PROPERTY(uint32_t, TabViewIndex, _PropertyChangedHandlers, 0);
|
||||
// The TabViewNumTabs is the number of Tab objects in TerminalPage's _tabs vector.
|
||||
OBSERVABLE_GETSET_PROPERTY(uint32_t, TabViewNumTabs, _PropertyChangedHandlers, 0);
|
||||
|
||||
OBSERVABLE_GETSET_PROPERTY(winrt::Windows::UI::Xaml::UIElement, Content, _PropertyChangedHandlers, nullptr);
|
||||
|
||||
private:
|
||||
std::shared_ptr<Pane> _rootPane{ nullptr };
|
||||
std::shared_ptr<Pane> _activePane{ nullptr };
|
||||
@@ -101,9 +81,7 @@ namespace winrt::TerminalApp::implementation
|
||||
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _closeOtherTabsMenuItem{};
|
||||
winrt::Windows::UI::Xaml::Controls::MenuFlyoutItem _closeTabsAfterMenuItem{};
|
||||
|
||||
bool _focused{ false };
|
||||
bool _receivedKeyDown{ false };
|
||||
winrt::Microsoft::UI::Xaml::Controls::TabViewItem _tabViewItem{ nullptr };
|
||||
|
||||
winrt::hstring _runtimeTabText{};
|
||||
bool _inRename{ false };
|
||||
@@ -112,11 +90,8 @@ namespace winrt::TerminalApp::implementation
|
||||
winrt::TerminalApp::ShortcutActionDispatch _dispatch;
|
||||
|
||||
void _MakeTabViewItem();
|
||||
void _Focus();
|
||||
|
||||
void _CreateContextMenu();
|
||||
winrt::Windows::UI::Xaml::Controls::MenuFlyoutSubItem _CreateCloseSubMenu();
|
||||
void _EnableCloseMenuItems();
|
||||
void _CreateContextMenu() override;
|
||||
|
||||
void _RefreshVisualState();
|
||||
|
||||
@@ -127,19 +102,14 @@ namespace winrt::TerminalApp::implementation
|
||||
|
||||
void _UpdateActivePane(std::shared_ptr<Pane> pane);
|
||||
|
||||
winrt::hstring _GetActiveTitle() const;
|
||||
void _UpdateTabHeader();
|
||||
winrt::fire_and_forget _UpdateTitle();
|
||||
void _ConstructTabRenameBox(const winrt::hstring& tabText);
|
||||
|
||||
void _RecalculateAndApplyTabColor();
|
||||
void _ApplyTabColor(const winrt::Windows::UI::Color& color);
|
||||
void _ClearTabBackgroundColor();
|
||||
|
||||
void _MakeSwitchToTabCommand();
|
||||
|
||||
void _CloseTabsAfter();
|
||||
void _CloseOtherTabs();
|
||||
|
||||
friend class ::TerminalAppLocalTests::TabTests;
|
||||
};
|
||||
}
|
||||
11
src/cascadia/TerminalApp/TerminalTab.idl
Normal file
11
src/cascadia/TerminalApp/TerminalTab.idl
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import "TabBase.idl";
|
||||
|
||||
namespace TerminalApp
|
||||
{
|
||||
[default_interface] runtimeclass TerminalTab : TabBase
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,8 @@
|
||||
<ClInclude Include="../TitlebarControl.h" />
|
||||
<ClInclude Include="../TabRowControl.h" />
|
||||
<ClInclude Include="../App.h" />
|
||||
<ClInclude Include="../Tab.h" />
|
||||
<ClInclude Include="../TerminalTab.h" />
|
||||
<ClInclude Include="../SettingsTab.h" />
|
||||
</ItemGroup>
|
||||
<!-- ========================= Cpp Files ======================== -->
|
||||
<ItemGroup>
|
||||
|
||||
@@ -587,21 +587,21 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
||||
// This event is only registered during terminal initialization,
|
||||
// so we don't need to check _initializedTerminal.
|
||||
// We also don't lock for things that come back from the renderer.
|
||||
auto chain = _renderEngine->GetSwapChain();
|
||||
auto chainHandle = _renderEngine->GetSwapChainHandle();
|
||||
auto weakThis{ get_weak() };
|
||||
|
||||
co_await winrt::resume_foreground(Dispatcher());
|
||||
|
||||
if (auto control{ weakThis.get() })
|
||||
{
|
||||
_AttachDxgiSwapChainToXaml(chain.Get());
|
||||
_AttachDxgiSwapChainToXaml(chainHandle);
|
||||
}
|
||||
}
|
||||
|
||||
void TermControl::_AttachDxgiSwapChainToXaml(IDXGISwapChain1* swapChain)
|
||||
void TermControl::_AttachDxgiSwapChainToXaml(HANDLE swapChainHandle)
|
||||
{
|
||||
auto nativePanel = SwapChainPanel().as<ISwapChainPanelNative>();
|
||||
nativePanel->SetSwapChain(swapChain);
|
||||
auto nativePanel = SwapChainPanel().as<ISwapChainPanelNative2>();
|
||||
nativePanel->SetSwapChainHandle(swapChainHandle);
|
||||
}
|
||||
|
||||
bool TermControl::_InitializeTerminal()
|
||||
@@ -705,7 +705,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
||||
THROW_IF_FAILED(dxEngine->Enable());
|
||||
_renderEngine = std::move(dxEngine);
|
||||
|
||||
_AttachDxgiSwapChainToXaml(_renderEngine->GetSwapChain().Get());
|
||||
_AttachDxgiSwapChainToXaml(_renderEngine->GetSwapChainHandle());
|
||||
|
||||
// Tell the DX Engine to notify us when the swap chain changes.
|
||||
// We do this after we initially set the swapchain so as to avoid unnecessary callbacks (and locking problems)
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
||||
void ToggleRetroEffect();
|
||||
|
||||
winrt::fire_and_forget RenderEngineSwapChainChanged();
|
||||
void _AttachDxgiSwapChainToXaml(IDXGISwapChain1* swapChain);
|
||||
void _AttachDxgiSwapChainToXaml(HANDLE swapChainHandle);
|
||||
winrt::fire_and_forget _RendererEnteredErrorState();
|
||||
void _RenderRetryButton_Click(IInspectable const& button, IInspectable const& args);
|
||||
|
||||
|
||||
@@ -323,6 +323,7 @@ winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings CascadiaSettings::
|
||||
resultPtr->_ParseJsonString(DefaultJson, true);
|
||||
resultPtr->LayerJson(resultPtr->_defaultSettings);
|
||||
resultPtr->_ResolveDefaultProfile();
|
||||
resultPtr->_UpdateActiveProfiles();
|
||||
|
||||
return *resultPtr;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,8 @@ static constexpr std::string_view ConfirmCloseAllKey{ "confirmCloseAllTabs" };
|
||||
static constexpr std::string_view SnapToGridOnResizeKey{ "snapToGridOnResize" };
|
||||
static constexpr std::string_view EnableStartupTaskKey{ "startOnUserLogin" };
|
||||
static constexpr std::string_view AlwaysOnTopKey{ "alwaysOnTop" };
|
||||
static constexpr std::string_view UseTabSwitcherKey{ "useTabSwitcher" };
|
||||
static constexpr std::string_view LegacyUseTabSwitcherModeKey{ "useTabSwitcher" };
|
||||
static constexpr std::string_view TabSwitcherModeKey{ "tabSwitcherMode" };
|
||||
static constexpr std::string_view DisableAnimationsKey{ "disableAnimations" };
|
||||
|
||||
static constexpr std::string_view DebugFeaturesKey{ "debugFeatures" };
|
||||
@@ -107,7 +108,7 @@ winrt::com_ptr<GlobalAppSettings> GlobalAppSettings::Copy() const
|
||||
globals->_DebugFeaturesEnabled = _DebugFeaturesEnabled;
|
||||
globals->_StartOnUserLogin = _StartOnUserLogin;
|
||||
globals->_AlwaysOnTop = _AlwaysOnTop;
|
||||
globals->_UseTabSwitcher = _UseTabSwitcher;
|
||||
globals->_TabSwitcherMode = _TabSwitcherMode;
|
||||
globals->_DisableAnimations = _DisableAnimations;
|
||||
|
||||
globals->_UnparsedDefaultProfile = _UnparsedDefaultProfile;
|
||||
@@ -286,7 +287,11 @@ void GlobalAppSettings::LayerJson(const Json::Value& json)
|
||||
|
||||
JsonUtils::GetValueForKey(json, AlwaysOnTopKey, _AlwaysOnTop);
|
||||
|
||||
JsonUtils::GetValueForKey(json, UseTabSwitcherKey, _UseTabSwitcher);
|
||||
// GH#8076 - when adding enum values to this key, we also changed it from
|
||||
// "useTabSwitcher" to "tabSwitcherMode". Continue supporting
|
||||
// "useTabSwitcher", but prefer "tabSwitcherMode"
|
||||
JsonUtils::GetValueForKey(json, LegacyUseTabSwitcherModeKey, _TabSwitcherMode);
|
||||
JsonUtils::GetValueForKey(json, TabSwitcherModeKey, _TabSwitcherMode);
|
||||
|
||||
JsonUtils::GetValueForKey(json, DisableAnimationsKey, _DisableAnimations);
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
GETSET_SETTING(bool, DebugFeaturesEnabled); // default value set in constructor
|
||||
GETSET_SETTING(bool, StartOnUserLogin, false);
|
||||
GETSET_SETTING(bool, AlwaysOnTop, false);
|
||||
GETSET_SETTING(bool, UseTabSwitcher, true);
|
||||
GETSET_SETTING(Model::TabSwitcherMode, TabSwitcherMode, Model::TabSwitcherMode::MostRecentlyUsed);
|
||||
GETSET_SETTING(bool, DisableAnimations, false);
|
||||
|
||||
private:
|
||||
|
||||
@@ -26,6 +26,13 @@ namespace Microsoft.Terminal.Settings.Model
|
||||
MaximizedFocusMode,
|
||||
};
|
||||
|
||||
enum TabSwitcherMode
|
||||
{
|
||||
MostRecentlyUsed,
|
||||
InOrder,
|
||||
Disabled,
|
||||
};
|
||||
|
||||
[default_interface] runtimeclass GlobalAppSettings {
|
||||
Guid DefaultProfile;
|
||||
Boolean HasUnparsedDefaultProfile();
|
||||
@@ -120,9 +127,9 @@ namespace Microsoft.Terminal.Settings.Model
|
||||
void ClearAlwaysOnTop();
|
||||
Boolean AlwaysOnTop;
|
||||
|
||||
Boolean HasUseTabSwitcher();
|
||||
void ClearUseTabSwitcher();
|
||||
Boolean UseTabSwitcher;
|
||||
Boolean HasTabSwitcherMode();
|
||||
void ClearTabSwitcherMode();
|
||||
TabSwitcherMode TabSwitcherMode;
|
||||
|
||||
Boolean HasDisableAnimations();
|
||||
void ClearDisableAnimations();
|
||||
|
||||
@@ -342,3 +342,26 @@ JSON_ENUM_MAPPER(::winrt::Windows::System::VirtualKey)
|
||||
pair_type{ "shift", ValueType::Shift },
|
||||
};
|
||||
};
|
||||
|
||||
JSON_ENUM_MAPPER(::winrt::Microsoft::Terminal::Settings::Model::TabSwitcherMode)
|
||||
{
|
||||
JSON_MAPPINGS(3) = {
|
||||
pair_type{ "mru", ValueType::MostRecentlyUsed },
|
||||
pair_type{ "inOrder", ValueType::InOrder },
|
||||
pair_type{ "disabled", ValueType::Disabled },
|
||||
};
|
||||
|
||||
auto FromJson(const Json::Value& json)
|
||||
{
|
||||
if (json.isBool())
|
||||
{
|
||||
return json.asBool() ? ValueType::MostRecentlyUsed : ValueType::Disabled;
|
||||
}
|
||||
return BaseEnumMapper::FromJson(json);
|
||||
}
|
||||
|
||||
bool CanConvert(const Json::Value& json)
|
||||
{
|
||||
return BaseEnumMapper::CanConvert(json) || json.isBool();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"showTabsInTitlebar": true,
|
||||
"showTerminalTitleInTitlebar": true,
|
||||
"tabWidthMode": "equal",
|
||||
"useTabSwitcher": true,
|
||||
"useTabSwitcher": "mru",
|
||||
|
||||
// Miscellaneous
|
||||
"confirmCloseAllTabs": true,
|
||||
|
||||
@@ -109,62 +109,53 @@ int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
|
||||
// Make sure to call this so we get WM_POINTER messages.
|
||||
EnableMouseInPointer(true);
|
||||
|
||||
// !!! LOAD BEARING !!!
|
||||
// We must initialize the main thread as a single-threaded apartment before
|
||||
// constructing any Xaml objects. Failing to do so will cause some issues
|
||||
// in accessibility somewhere down the line when a UIAutomation object will
|
||||
// be queried on the wrong thread at the wrong time.
|
||||
// We used to initialize as STA only _after_ initializing the application
|
||||
// host, which loaded the settings. The settings needed to be loaded in MTA
|
||||
// because we were using the Windows.Storage APIs. Since we're no longer
|
||||
// doing that, we can safely init as STA before any WinRT dispatches.
|
||||
winrt::init_apartment(winrt::apartment_type::single_threaded);
|
||||
// !!! LOAD BEARING !!!
|
||||
// We must initialize the main thread as a single-threaded apartment before
|
||||
// constructing any Xaml objects. Failing to do so will cause some issues
|
||||
// in accessibility somewhere down the line when a UIAutomation object will
|
||||
// be queried on the wrong thread at the wrong time.
|
||||
// We used to initialize as STA only _after_ initializing the application
|
||||
// host, which loaded the settings. The settings needed to be loaded in MTA
|
||||
// because we were using the Windows.Storage APIs. Since we're no longer
|
||||
// doing that, we can safely init as STA before any WinRT dispatches.
|
||||
winrt::init_apartment(winrt::apartment_type::single_threaded);
|
||||
|
||||
// Create the AppHost object, which will create both the window and the
|
||||
// Terminal App. This MUST BE constructed before the Xaml manager as TermApp
|
||||
// provides an implementation of Windows.UI.Xaml.Application.
|
||||
AppHost host;
|
||||
// Create the AppHost object, which will create both the window and the
|
||||
// Terminal App. This MUST BE constructed before the Xaml manager as TermApp
|
||||
// provides an implementation of Windows.UI.Xaml.Application.
|
||||
AppHost host;
|
||||
|
||||
// Initialize the xaml content. This must be called AFTER the
|
||||
// WindowsXamlManager is initialized.
|
||||
host.Initialize();
|
||||
// Initialize the xaml content. This must be called AFTER the
|
||||
// WindowsXamlManager is initialized.
|
||||
host.Initialize();
|
||||
|
||||
MSG message;
|
||||
MSG message;
|
||||
|
||||
while (GetMessage(&message, nullptr, 0, 0))
|
||||
{
|
||||
// GH#638 (Pressing F7 brings up both the history AND a caret browsing message)
|
||||
// The Xaml input stack doesn't allow an application to suppress the "caret browsing"
|
||||
// dialog experience triggered when you press F7. Official recommendation from the Xaml
|
||||
// team is to catch F7 before we hand it off.
|
||||
// AppLogic contains an ad-hoc implementation of event bubbling for a runtime classes
|
||||
// implementing a custom IF7Listener interface.
|
||||
// If the recipient of IF7Listener::OnF7Pressed suggests that the F7 press has, in fact,
|
||||
// been handled we can discard the message before we even translate it.
|
||||
if (_messageIsF7Keypress(message))
|
||||
while (GetMessage(&message, nullptr, 0, 0))
|
||||
{
|
||||
if (host.OnDirectKeyEvent(VK_F7, LOBYTE(HIWORD(message.lParam)), true))
|
||||
{
|
||||
// The application consumed the F7. Don't let Xaml get it.
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// GH#6421 - System XAML will never send an Alt KeyUp event. So, similar
|
||||
// to how we'll steal the F7 KeyDown above, we'll steal the Alt KeyUp
|
||||
// here, and plumb it through.
|
||||
if (_messageIsAltKeyup(message))
|
||||
{
|
||||
// Let's pass <Alt> to the application
|
||||
if (host.OnDirectKeyEvent(VK_MENU, LOBYTE(HIWORD(message.lParam)), false))
|
||||
// GH#6421 - System XAML will never send an Alt KeyUp event. So, similar
|
||||
// to how we'll steal the F7 KeyDown above, we'll steal the Alt KeyUp
|
||||
// here, and plumb it through.
|
||||
if (_messageIsAltKeyup(message))
|
||||
{
|
||||
// The application consumed the Alt. Don't let Xaml get it.
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// Let's pass <Alt> to the application
|
||||
if (host.OnDirectKeyEvent(VK_MENU, LOBYTE(HIWORD(message.lParam)), false))
|
||||
{
|
||||
// The application consumed the Alt. Don't let Xaml get it.
|
||||
continue;
|
||||
}
|
||||
|
||||
TranslateMessage(&message);
|
||||
DispatchMessage(&message);
|
||||
TranslateMessage(&message);
|
||||
DispatchMessage(&message);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
winrt::event_token name(args const& handler) { return _##name##Handlers.add(handler); } \
|
||||
void name(winrt::event_token const& token) { _##name##Handlers.remove(token); } \
|
||||
\
|
||||
private: \
|
||||
protected: \
|
||||
winrt::event<args> _##name##Handlers;
|
||||
|
||||
// This is a helper macro for both declaring the signature and body of an event
|
||||
@@ -128,7 +128,7 @@ private:
|
||||
// (like when the class is being initialized).
|
||||
#define OBSERVABLE_GETSET_PROPERTY(type, name, event, ...) \
|
||||
public: \
|
||||
type name() { return _##name; }; \
|
||||
type name() const noexcept { return _##name; }; \
|
||||
void name(const type& value) \
|
||||
{ \
|
||||
if (_##name != value) \
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>onecoreuap_apiset.lib;d3dcompiler.lib;dwmapi.lib;uxtheme.lib;shlwapi.lib;ntdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>onecoreuap_apiset.lib;d3dcompiler.lib;dwmapi.lib;uxtheme.lib;shlwapi.lib;ntdll.lib;dcomp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ DxEngine::DxEngine() :
|
||||
_glyphCell{},
|
||||
_boxDrawingEffect{},
|
||||
_haveDeviceResources{ false },
|
||||
_swapChainHandle{ INVALID_HANDLE_VALUE },
|
||||
_swapChainDesc{ 0 },
|
||||
_swapChainFrameLatencyWaitableObject{ INVALID_HANDLE_VALUE },
|
||||
_recreateDeviceRequested{ false },
|
||||
@@ -488,6 +489,13 @@ try
|
||||
}
|
||||
case SwapChainMode::ForComposition:
|
||||
{
|
||||
if (!_swapChainHandle)
|
||||
{
|
||||
RETURN_IF_FAILED(DCompositionCreateSurfaceHandle(GENERIC_ALL, nullptr, &_swapChainHandle));
|
||||
}
|
||||
|
||||
RETURN_IF_FAILED(_dxgiFactory2.As(&_dxgiFactoryMedia));
|
||||
|
||||
// Use the given target size for compositions.
|
||||
_swapChainDesc.Width = _displaySizePixels.width<UINT>();
|
||||
_swapChainDesc.Height = _displaySizePixels.height<UINT>();
|
||||
@@ -497,10 +505,11 @@ try
|
||||
// It's 100% required to use scaling mode stretch for composition. There is no other choice.
|
||||
_swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
|
||||
|
||||
RETURN_IF_FAILED(_dxgiFactory2->CreateSwapChainForComposition(_d3dDevice.Get(),
|
||||
&_swapChainDesc,
|
||||
nullptr,
|
||||
&_dxgiSwapChain));
|
||||
RETURN_IF_FAILED(_dxgiFactoryMedia->CreateSwapChainForCompositionSurfaceHandle(_d3dDevice.Get(),
|
||||
_swapChainHandle.get(),
|
||||
&_swapChainDesc,
|
||||
nullptr,
|
||||
&_dxgiSwapChain));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -842,14 +851,14 @@ try
|
||||
}
|
||||
CATCH_LOG()
|
||||
|
||||
Microsoft::WRL::ComPtr<IDXGISwapChain1> DxEngine::GetSwapChain()
|
||||
HANDLE DxEngine::GetSwapChainHandle()
|
||||
{
|
||||
if (_dxgiSwapChain.Get() == nullptr)
|
||||
if (!_swapChainHandle)
|
||||
{
|
||||
THROW_IF_FAILED(_CreateDeviceResources(true));
|
||||
}
|
||||
|
||||
return _dxgiSwapChain;
|
||||
return _swapChainHandle.get();
|
||||
}
|
||||
|
||||
void DxEngine::_InvalidateRectangle(const til::rectangle& rc)
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Microsoft::Console::Render
|
||||
|
||||
void SetSoftwareRendering(bool enable) noexcept;
|
||||
|
||||
::Microsoft::WRL::ComPtr<IDXGISwapChain1> GetSwapChain();
|
||||
HANDLE GetSwapChainHandle();
|
||||
|
||||
// IRenderEngine Members
|
||||
[[nodiscard]] HRESULT Invalidate(const SMALL_RECT* const psrRegion) noexcept override;
|
||||
@@ -119,6 +119,8 @@ namespace Microsoft::Console::Render
|
||||
void SetAntialiasingMode(const D2D1_TEXT_ANTIALIAS_MODE antialiasingMode) noexcept;
|
||||
void SetDefaultTextBackgroundOpacity(const float opacity) noexcept;
|
||||
|
||||
wil::unique_handle _swapChainHandle;
|
||||
|
||||
void UpdateHyperlinkHoveredId(const uint16_t hoveredId) noexcept;
|
||||
|
||||
protected:
|
||||
@@ -212,6 +214,7 @@ namespace Microsoft::Console::Render
|
||||
::Microsoft::WRL::ComPtr<ID2D1SolidColorBrush> _d2dBrushBackground;
|
||||
|
||||
::Microsoft::WRL::ComPtr<IDXGIFactory2> _dxgiFactory2;
|
||||
::Microsoft::WRL::ComPtr<IDXGIFactoryMedia> _dxgiFactoryMedia;
|
||||
::Microsoft::WRL::ComPtr<IDXGIDevice> _dxgiDevice;
|
||||
::Microsoft::WRL::ComPtr<IDXGISurface> _dxgiSurface;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <typeinfo>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <dcomp.h>
|
||||
|
||||
#include <dxgi.h>
|
||||
#include <dxgi1_2.h>
|
||||
#include <dxgi1_3.h>
|
||||
|
||||
18
src/tools/RpcResearch/IScratch.idl
Normal file
18
src/tools/RpcResearch/IScratch.idl
Normal file
@@ -0,0 +1,18 @@
|
||||
import "unknwn.idl";
|
||||
import "ocidl.idl";
|
||||
|
||||
[
|
||||
uuid("BB64926F-1111-470D-BB8A-3D2CC4B035E4"),
|
||||
object,
|
||||
local
|
||||
] interface IScratch : IUnknown
|
||||
{
|
||||
HRESULT MyMethod();
|
||||
HRESULT MyCount([out] int* count);
|
||||
};
|
||||
|
||||
[uuid("E68F5EDD-6257-4E72-A10B-4067ED8E85F2"), version(1.0)]
|
||||
coclass ScratchImpl
|
||||
{
|
||||
[default] interface IScratch;
|
||||
};
|
||||
6
src/tools/RpcResearch/ProxyStub/ProxyStub.def
Normal file
6
src/tools/RpcResearch/ProxyStub/ProxyStub.def
Normal file
@@ -0,0 +1,6 @@
|
||||
LIBRARY ProxyStub.dll
|
||||
|
||||
EXPORTS
|
||||
DllGetClassObject PRIVATE
|
||||
DllCanUnloadNow PRIVATE
|
||||
GetProxyDllInfo PRIVATE
|
||||
186
src/tools/RpcResearch/ProxyStub/ProxyStub.vcxproj
Normal file
186
src/tools/RpcResearch/ProxyStub/ProxyStub.vcxproj
Normal file
@@ -0,0 +1,186 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{7d8c8d8e-c87d-49f2-9fb1-77fff2dd123a}</ProjectGuid>
|
||||
<RootNamespace>ProxyStub</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<EmbedManifest>false</EmbedManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;PROXYSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;PROXYSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;PROXYSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;PROXYSTUB_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h" />
|
||||
<ClInclude Include="IScratch_h.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dlldata.c" />
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="IScratch_i.c" />
|
||||
<ClCompile Include="IScratch_p.c" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="..\IScratch.idl" />
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<AdditionalDependencies>Rpcrt4.lib;RuntimeObject.lib;oleaut32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile Condition="Exists('$(ProjectName).def')">$(ProjectName).def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<!-- <Midl>
|
||||
<ApplicationConfigurationMode>true</ApplicationConfigurationMode>
|
||||
</Midl> -->
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
50
src/tools/RpcResearch/ProxyStub/ProxyStub.vcxproj.filters
Normal file
50
src/tools/RpcResearch/ProxyStub/ProxyStub.vcxproj.filters
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="IScratch_h.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dlldata.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="IScratch_i.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="IScratch_p.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="..\IScratch.idl">
|
||||
<Filter>Source Files</Filter>
|
||||
</Midl>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
19
src/tools/RpcResearch/ProxyStub/dllmain.cpp
Normal file
19
src/tools/RpcResearch/ProxyStub/dllmain.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||
#include "pch.h"
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
5
src/tools/RpcResearch/ProxyStub/framework.h
Normal file
5
src/tools/RpcResearch/ProxyStub/framework.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
// Windows Header Files
|
||||
#include <windows.h>
|
||||
5
src/tools/RpcResearch/ProxyStub/pch.cpp
Normal file
5
src/tools/RpcResearch/ProxyStub/pch.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
// pch.cpp: source file corresponding to the pre-compiled header
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
// When you are using pre-compiled headers, this source file is necessary for compilation to succeed.
|
||||
13
src/tools/RpcResearch/ProxyStub/pch.h
Normal file
13
src/tools/RpcResearch/ProxyStub/pch.h
Normal file
@@ -0,0 +1,13 @@
|
||||
// pch.h: This is a precompiled header file.
|
||||
// Files listed below are compiled only once, improving build performance for future builds.
|
||||
// This also affects IntelliSense performance, including code completion and many code browsing features.
|
||||
// However, files listed here are ALL re-compiled if any one of them is updated between builds.
|
||||
// Do not add files here that you will be updating frequently as this negates the performance advantage.
|
||||
|
||||
#ifndef PCH_H
|
||||
#define PCH_H
|
||||
|
||||
// add headers that you want to pre-compile here
|
||||
#include "framework.h"
|
||||
|
||||
#endif //PCH_H
|
||||
6
src/tools/RpcResearch/RPCServer/IScratch.h
Normal file
6
src/tools/RpcResearch/RPCServer/IScratch.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
struct __declspec(uuid("BB64926F-1A4D-470D-BB8A-3D2CC4B035E4")) IScratch : ::IUnknown
|
||||
{
|
||||
virtual HRESULT __stdcall MyMethod() = 0;
|
||||
};
|
||||
192
src/tools/RpcResearch/RPCServer/RPCServer.cpp
Normal file
192
src/tools/RpcResearch/RPCServer/RPCServer.cpp
Normal file
@@ -0,0 +1,192 @@
|
||||
/* file: hellos.c */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string>
|
||||
#include "hello_h.h"
|
||||
#include "ScratchImpl.h"
|
||||
#include <windows.h>
|
||||
#include <memory>
|
||||
|
||||
int g_doCount = 22;
|
||||
// IScratch* g_iScratch = nullptr;
|
||||
Microsoft::WRL::ComPtr<ScratchImpl> g_scratch{ nullptr };
|
||||
|
||||
void CreateScratch()
|
||||
{
|
||||
auto impl = Microsoft::WRL::Make<ScratchImpl>();
|
||||
// ScratchImpl* foo = Microsoft::WRL::make<ScratchImpl>();
|
||||
|
||||
// g_iScratch = impl.Get();
|
||||
g_scratch = impl;
|
||||
}
|
||||
|
||||
void HelloProc(const wchar_t* psz)
|
||||
{
|
||||
printf("Hello: %ws\n", psz);
|
||||
g_doCount++;
|
||||
printf("The do count is: %d\n", g_doCount);
|
||||
|
||||
if (g_scratch)
|
||||
{
|
||||
int count;
|
||||
g_scratch->MyCount(&count);
|
||||
printf("The scratch's do count is: %d\n", count);
|
||||
g_scratch->MyMethod();
|
||||
g_scratch->MyCount(&count);
|
||||
printf("Now the scratch's do count is: %d\n", count);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Creating a new scratch object\n");
|
||||
CreateScratch();
|
||||
}
|
||||
}
|
||||
HRESULT MarshallTheThing(IStream* pStream)
|
||||
{
|
||||
printf("MarshalTheThing\n");
|
||||
auto hr = pStream->Seek({ 0, 0 }, STREAM_SEEK_SET, nullptr);
|
||||
printf("Seek %d\n", hr);
|
||||
hr = CoMarshalInterface(pStream, __uuidof(IScratch), g_scratch.Get(), MSHCTX_LOCAL, nullptr, MSHLFLAGS_NORMAL);
|
||||
printf("CoMarshalInterface %d\n", hr);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
void InternallyMarshalAThing()
|
||||
{
|
||||
printf("InternallyMarshalAThing\n");
|
||||
|
||||
auto hr = S_OK;
|
||||
CoInitialize(nullptr);
|
||||
// auto f = Microsoft::WRL::Make<Microsoft::WRL::SimpleClassFactory<ScratchImpl>>();
|
||||
// DWORD registrationHostClass;
|
||||
// hr = CoRegisterClassObject(__uuidof(IScratch), f.Get(), CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE, ®istrationHostClass);
|
||||
// printf("CoRegisterClassObject: %d\n", hr);
|
||||
|
||||
Microsoft::WRL::ComPtr<IStream> pStream;
|
||||
hr = CreateStreamOnHGlobal(NULL,
|
||||
TRUE,
|
||||
&pStream);
|
||||
printf("CreateStreamOnHGlobal: %d\n", hr);
|
||||
|
||||
hr = pStream->Seek({ 0, 0 }, STREAM_SEEK_SET, nullptr);
|
||||
printf("Seek: %d\n", hr);
|
||||
|
||||
hr = CoMarshalInterface(pStream.Get(), __uuidof(IScratch), g_scratch.Get(), MSHCTX_LOCAL, nullptr, MSHLFLAGS_NORMAL);
|
||||
printf("CoMarshalInterface: %d\n", hr);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
printf("Exiting because CoMarshalInterface failed\n");
|
||||
exit(hr);
|
||||
}
|
||||
|
||||
hr = pStream->Seek({ 0, 0 }, STREAM_SEEK_SET, nullptr);
|
||||
printf("Seek (2): %d\n", hr);
|
||||
|
||||
STATSTG stat;
|
||||
ULARGE_INTEGER ulSize{};
|
||||
hr = pStream->Stat(&stat, STATFLAG_NONAME);
|
||||
printf("Stat: %d\n", hr);
|
||||
ulSize = stat.cbSize;
|
||||
size_t size = ulSize.QuadPart;
|
||||
printf("size was: %lu\n", size);
|
||||
auto buffer = std::make_unique<char[]>(size + 1);
|
||||
|
||||
ULONG numRead{};
|
||||
// DebugBreak();
|
||||
hr = pStream->Read(buffer.get(), size + 1, &numRead);
|
||||
if (FAILED(hr) || size != numRead)
|
||||
{
|
||||
printf("Read failed %d", hr);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Marshalled as: %s", buffer.get());
|
||||
}
|
||||
}
|
||||
|
||||
int GetDoCount()
|
||||
{
|
||||
return g_doCount;
|
||||
}
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
printf("Goodbye\n");
|
||||
|
||||
RPC_STATUS status;
|
||||
status = RpcMgmtStopServerListening(NULL);
|
||||
|
||||
if (status)
|
||||
{
|
||||
exit(status);
|
||||
}
|
||||
|
||||
status = RpcServerUnregisterIf(NULL, NULL, FALSE);
|
||||
|
||||
if (status)
|
||||
{
|
||||
exit(status);
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
RPC_STATUS status;
|
||||
std::wstring pszProtocolSequence{ L"ncacn_np" };
|
||||
char* pszSecurity = NULL;
|
||||
std::wstring pszEndpoint{ L"\\pipe\\hello" };
|
||||
unsigned int cMinCalls = 1;
|
||||
unsigned int fDontWait = FALSE;
|
||||
|
||||
status = RpcServerUseProtseqEp(reinterpret_cast<RPC_WSTR>(const_cast<wchar_t*>(pszProtocolSequence.data())),
|
||||
RPC_C_LISTEN_MAX_CALLS_DEFAULT,
|
||||
reinterpret_cast<RPC_WSTR>(const_cast<wchar_t*>(pszEndpoint.data())),
|
||||
pszSecurity);
|
||||
|
||||
if (status)
|
||||
{
|
||||
printf("RpcServerUseProtseqEp returned an error:%d\n", status);
|
||||
exit(status);
|
||||
}
|
||||
|
||||
// status = RpcServerRegisterIf(hello_IfHandle,
|
||||
status = RpcServerRegisterIf(hello_v1_0_s_ifspec,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
if (status)
|
||||
{
|
||||
printf("RpcServerRegisterIf returned an error:%d\n", status);
|
||||
exit(status);
|
||||
}
|
||||
|
||||
status = RpcServerListen(cMinCalls,
|
||||
RPC_C_LISTEN_MAX_CALLS_DEFAULT,
|
||||
fDontWait);
|
||||
|
||||
if (status)
|
||||
{
|
||||
printf("RpcServerListen returned an error:%d\n", status);
|
||||
exit(status);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("RpcServerListen returned 0\n");
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************/
|
||||
/* MIDL allocate and free */
|
||||
/******************************************************/
|
||||
|
||||
void __RPC_FAR* __RPC_USER midl_user_allocate(size_t len)
|
||||
{
|
||||
return (malloc(len));
|
||||
}
|
||||
|
||||
void __RPC_USER midl_user_free(void __RPC_FAR* ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
172
src/tools/RpcResearch/RPCServer/RPCServer.vcxproj
Normal file
172
src/tools/RpcResearch/RPCServer/RPCServer.vcxproj
Normal file
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{c36b5299-7353-4726-8007-31551d80a09c}</ProjectGuid>
|
||||
<RootNamespace>RPCServer</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>Rpcrt4.lib;RuntimeObject.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Midl>
|
||||
<ApplicationConfigurationMode>true</ApplicationConfigurationMode>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="RPCServer.cpp" />
|
||||
<ClCompile Include="hello_s.c">
|
||||
<DependentUpon>..\hello.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="..\hello.idl" />
|
||||
<Midl Include="..\IScratch.idl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\hello.acf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="IScratch.h" />
|
||||
<ClInclude Include="ScratchImpl.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
41
src/tools/RpcResearch/RPCServer/RPCServer.vcxproj.filters
Normal file
41
src/tools/RpcResearch/RPCServer/RPCServer.vcxproj.filters
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="RPCServer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="..\hello.idl">
|
||||
<Filter>Source Files</Filter>
|
||||
</Midl>
|
||||
<Midl Include="..\IScratch.idl">
|
||||
<Filter>Source Files</Filter>
|
||||
</Midl>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\hello.acf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="IScratch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ScratchImpl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
25
src/tools/RpcResearch/RPCServer/ScratchImpl.h
Normal file
25
src/tools/RpcResearch/RPCServer/ScratchImpl.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
// #include "IScratch.h"
|
||||
#include "IScratch_h.h"
|
||||
#include <wrl.h>
|
||||
|
||||
class __declspec(uuid("E68F5EDD-6257-4E72-A10B-4067ED8E85F2"))
|
||||
ScratchImpl : public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, IScratch>
|
||||
{
|
||||
public:
|
||||
HRESULT __stdcall MyMethod()
|
||||
{
|
||||
_count++;
|
||||
return S_OK;
|
||||
};
|
||||
HRESULT __stdcall MyCount(int* count)
|
||||
{
|
||||
*count = _count;
|
||||
return S_OK;
|
||||
};
|
||||
|
||||
private:
|
||||
int _count{ 0 };
|
||||
};
|
||||
|
||||
CoCreatableClass(ScratchImpl);
|
||||
735
src/tools/RpcResearch/RPCServer/hello_c.c
Normal file
735
src/tools/RpcResearch/RPCServer/hello_c.c
Normal file
@@ -0,0 +1,735 @@
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the RPC client stubs */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 8.01.0622 */
|
||||
/* at Mon Jan 18 21:14:07 2038
|
||||
*/
|
||||
/* Compiler settings for ..\hello.idl:
|
||||
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
|
||||
protocol : all , ms_ext, app_config, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
#if defined(_M_AMD64)
|
||||
|
||||
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
|
||||
#pragma warning( disable: 4211 ) /* redefine extern to static */
|
||||
#pragma warning( disable: 4232 ) /* dllimport identity*/
|
||||
#pragma warning( disable: 4024 ) /* array to pointer mapping*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "hello_h.h"
|
||||
|
||||
#define TYPE_FORMAT_STRING_SIZE 25
|
||||
#define PROC_FORMAT_STRING_SIZE 155
|
||||
#define EXPR_FORMAT_STRING_SIZE 1
|
||||
#define TRANSMIT_AS_TABLE_SIZE 0
|
||||
#define WIRE_MARSHAL_TABLE_SIZE 0
|
||||
|
||||
typedef struct _hello_MIDL_TYPE_FORMAT_STRING
|
||||
{
|
||||
short Pad;
|
||||
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
|
||||
} hello_MIDL_TYPE_FORMAT_STRING;
|
||||
|
||||
typedef struct _hello_MIDL_PROC_FORMAT_STRING
|
||||
{
|
||||
short Pad;
|
||||
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
|
||||
} hello_MIDL_PROC_FORMAT_STRING;
|
||||
|
||||
typedef struct _hello_MIDL_EXPR_FORMAT_STRING
|
||||
{
|
||||
long Pad;
|
||||
unsigned char Format[ EXPR_FORMAT_STRING_SIZE ];
|
||||
} hello_MIDL_EXPR_FORMAT_STRING;
|
||||
|
||||
|
||||
static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax =
|
||||
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
|
||||
|
||||
static const RPC_SYNTAX_IDENTIFIER _NDR64_RpcTransferSyntax =
|
||||
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}};
|
||||
|
||||
|
||||
|
||||
extern const hello_MIDL_TYPE_FORMAT_STRING hello__MIDL_TypeFormatString;
|
||||
extern const hello_MIDL_PROC_FORMAT_STRING hello__MIDL_ProcFormatString;
|
||||
extern const hello_MIDL_EXPR_FORMAT_STRING hello__MIDL_ExprFormatString;
|
||||
|
||||
#define GENERIC_BINDING_TABLE_SIZE 0
|
||||
|
||||
|
||||
/* Standard interface: hello, ver. 1.0,
|
||||
GUID={0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}} */
|
||||
|
||||
extern const MIDL_STUBLESS_PROXY_INFO hello_ProxyInfo;
|
||||
handle_t hello_IfHandle;
|
||||
|
||||
|
||||
static const RPC_CLIENT_INTERFACE hello___RpcClientInterface =
|
||||
{
|
||||
sizeof(RPC_CLIENT_INTERFACE),
|
||||
{{0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}},{1,0}},
|
||||
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&hello_ProxyInfo,
|
||||
0x02000000
|
||||
};
|
||||
RPC_IF_HANDLE hello_v1_0_c_ifspec = (RPC_IF_HANDLE)& hello___RpcClientInterface;
|
||||
|
||||
extern const MIDL_STUB_DESC hello_StubDesc;
|
||||
|
||||
static RPC_BINDING_HANDLE hello__MIDL_AutoBindHandle;
|
||||
|
||||
|
||||
int GetDoCount( void)
|
||||
{
|
||||
|
||||
CLIENT_CALL_RETURN _RetVal;
|
||||
|
||||
_RetVal = NdrClientCall3(
|
||||
( PMIDL_STUBLESS_PROXY_INFO )&hello_ProxyInfo,
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
return ( int )_RetVal.Simple;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void HelloProc(
|
||||
/* [string][in] */ const wchar_t *pszString)
|
||||
{
|
||||
|
||||
NdrClientCall3(
|
||||
( PMIDL_STUBLESS_PROXY_INFO )&hello_ProxyInfo,
|
||||
1,
|
||||
0,
|
||||
pszString);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Shutdown( void)
|
||||
{
|
||||
|
||||
NdrClientCall3(
|
||||
( PMIDL_STUBLESS_PROXY_INFO )&hello_ProxyInfo,
|
||||
2,
|
||||
0,
|
||||
0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void InternallyMarshalAThing( void)
|
||||
{
|
||||
|
||||
NdrClientCall3(
|
||||
( PMIDL_STUBLESS_PROXY_INFO )&hello_ProxyInfo,
|
||||
3,
|
||||
0,
|
||||
0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
HRESULT MarshallTheThing(
|
||||
/* [in] */ IStream *pStream)
|
||||
{
|
||||
|
||||
CLIENT_CALL_RETURN _RetVal;
|
||||
|
||||
_RetVal = NdrClientCall3(
|
||||
( PMIDL_STUBLESS_PROXY_INFO )&hello_ProxyInfo,
|
||||
4,
|
||||
0,
|
||||
pStream);
|
||||
return ( HRESULT )_RetVal.Simple;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#if !defined(__RPC_WIN64__)
|
||||
#error Invalid build platform for this stub.
|
||||
#endif
|
||||
|
||||
static const hello_MIDL_PROC_FORMAT_STRING hello__MIDL_ProcFormatString =
|
||||
{
|
||||
0,
|
||||
{
|
||||
|
||||
/* Procedure GetDoCount */
|
||||
|
||||
0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 2 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 6 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 8 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
|
||||
/* 10 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 12 */ NdrFcShort( 0x8 ), /* 8 */
|
||||
/* 14 */ 0x44, /* Oi2 Flags: has return, has ext, */
|
||||
0x1, /* 1 */
|
||||
/* 16 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 18 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 20 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 22 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 24 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Return value */
|
||||
|
||||
/* 26 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
|
||||
/* 28 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 30 */ 0x8, /* FC_LONG */
|
||||
0x0, /* 0 */
|
||||
|
||||
/* Procedure HelloProc */
|
||||
|
||||
/* 32 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 34 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 38 */ NdrFcShort( 0x1 ), /* 1 */
|
||||
/* 40 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
|
||||
/* 42 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 44 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 46 */ 0x42, /* Oi2 Flags: clt must size, has ext, */
|
||||
0x1, /* 1 */
|
||||
/* 48 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 50 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 52 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 54 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 56 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Parameter pszString */
|
||||
|
||||
/* 58 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */
|
||||
/* 60 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 62 */ NdrFcShort( 0x4 ), /* Type Offset=4 */
|
||||
|
||||
/* Procedure Shutdown */
|
||||
|
||||
/* 64 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 66 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 70 */ NdrFcShort( 0x2 ), /* 2 */
|
||||
/* 72 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 74 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 76 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 78 */ 0x40, /* Oi2 Flags: has ext, */
|
||||
0x0, /* 0 */
|
||||
/* 80 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 82 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 84 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 86 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 88 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Procedure InternallyMarshalAThing */
|
||||
|
||||
/* 90 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 92 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 96 */ NdrFcShort( 0x3 ), /* 3 */
|
||||
/* 98 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 100 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 102 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 104 */ 0x40, /* Oi2 Flags: has ext, */
|
||||
0x0, /* 0 */
|
||||
/* 106 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 108 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 110 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 112 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 114 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Procedure MarshallTheThing */
|
||||
|
||||
/* 116 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 118 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 122 */ NdrFcShort( 0x4 ), /* 4 */
|
||||
/* 124 */ NdrFcShort( 0x10 ), /* X64 Stack size/offset = 16 */
|
||||
/* 126 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 128 */ NdrFcShort( 0x8 ), /* 8 */
|
||||
/* 130 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */
|
||||
0x2, /* 2 */
|
||||
/* 132 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 134 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 136 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 138 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 140 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Parameter pStream */
|
||||
|
||||
/* 142 */ NdrFcShort( 0xb ), /* Flags: must size, must free, in, */
|
||||
/* 144 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 146 */ NdrFcShort( 0x6 ), /* Type Offset=6 */
|
||||
|
||||
/* Return value */
|
||||
|
||||
/* 148 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
|
||||
/* 150 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
|
||||
/* 152 */ 0x8, /* FC_LONG */
|
||||
0x0, /* 0 */
|
||||
|
||||
0x0
|
||||
}
|
||||
};
|
||||
|
||||
static const hello_MIDL_TYPE_FORMAT_STRING hello__MIDL_TypeFormatString =
|
||||
{
|
||||
0,
|
||||
{
|
||||
NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 2 */
|
||||
0x11, 0x8, /* FC_RP [simple_pointer] */
|
||||
/* 4 */
|
||||
0x25, /* FC_C_WSTRING */
|
||||
0x5c, /* FC_PAD */
|
||||
/* 6 */
|
||||
0x2f, /* FC_IP */
|
||||
0x5a, /* FC_CONSTANT_IID */
|
||||
/* 8 */ NdrFcLong( 0xc ), /* 12 */
|
||||
/* 12 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 14 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 16 */ 0xc0, /* 192 */
|
||||
0x0, /* 0 */
|
||||
/* 18 */ 0x0, /* 0 */
|
||||
0x0, /* 0 */
|
||||
/* 20 */ 0x0, /* 0 */
|
||||
0x0, /* 0 */
|
||||
/* 22 */ 0x0, /* 0 */
|
||||
0x46, /* 70 */
|
||||
|
||||
0x0
|
||||
}
|
||||
};
|
||||
|
||||
static const unsigned short hello_FormatStringOffsetTable[] =
|
||||
{
|
||||
0,
|
||||
32,
|
||||
64,
|
||||
90,
|
||||
116
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* defined(_M_AMD64)*/
|
||||
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the RPC client stubs */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 8.01.0622 */
|
||||
/* at Mon Jan 18 21:14:07 2038
|
||||
*/
|
||||
/* Compiler settings for ..\hello.idl:
|
||||
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
|
||||
protocol : all , ms_ext, app_config, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
#if defined(_M_AMD64)
|
||||
|
||||
|
||||
|
||||
|
||||
#if !defined(__RPC_WIN64__)
|
||||
#error Invalid build platform for this stub.
|
||||
#endif
|
||||
|
||||
|
||||
#include "ndr64types.h"
|
||||
#include "pshpack8.h"
|
||||
|
||||
|
||||
typedef
|
||||
NDR64_FORMAT_CHAR
|
||||
__midl_frag12_t;
|
||||
extern const __midl_frag12_t __midl_frag12;
|
||||
|
||||
typedef
|
||||
struct _NDR64_CONSTANT_IID_FORMAT
|
||||
__midl_frag11_t;
|
||||
extern const __midl_frag11_t __midl_frag11;
|
||||
|
||||
typedef
|
||||
struct _NDR64_POINTER_FORMAT
|
||||
__midl_frag10_t;
|
||||
extern const __midl_frag10_t __midl_frag10;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
struct _NDR64_PARAM_FORMAT frag2;
|
||||
struct _NDR64_PARAM_FORMAT frag3;
|
||||
}
|
||||
__midl_frag9_t;
|
||||
extern const __midl_frag9_t __midl_frag9;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
}
|
||||
__midl_frag8_t;
|
||||
extern const __midl_frag8_t __midl_frag8;
|
||||
|
||||
typedef
|
||||
struct _NDR64_CONFORMANT_STRING_FORMAT
|
||||
__midl_frag6_t;
|
||||
extern const __midl_frag6_t __midl_frag6;
|
||||
|
||||
typedef
|
||||
struct _NDR64_POINTER_FORMAT
|
||||
__midl_frag5_t;
|
||||
extern const __midl_frag5_t __midl_frag5;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
struct _NDR64_PARAM_FORMAT frag2;
|
||||
}
|
||||
__midl_frag4_t;
|
||||
extern const __midl_frag4_t __midl_frag4;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
struct _NDR64_PARAM_FORMAT frag2;
|
||||
}
|
||||
__midl_frag2_t;
|
||||
extern const __midl_frag2_t __midl_frag2;
|
||||
|
||||
typedef
|
||||
NDR64_FORMAT_UINT32
|
||||
__midl_frag1_t;
|
||||
extern const __midl_frag1_t __midl_frag1;
|
||||
|
||||
static const __midl_frag12_t __midl_frag12 =
|
||||
0x5 /* FC64_INT32 */;
|
||||
|
||||
static const __midl_frag11_t __midl_frag11 =
|
||||
{
|
||||
/* struct _NDR64_CONSTANT_IID_FORMAT */
|
||||
0x24, /* FC64_IP */
|
||||
(NDR64_UINT8) 1 /* 0x1 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
{
|
||||
0x0000000c,
|
||||
0x0000,
|
||||
0x0000,
|
||||
{0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag10_t __midl_frag10 =
|
||||
{
|
||||
/* *struct _NDR64_POINTER_FORMAT */
|
||||
0x24, /* FC64_IP */
|
||||
(NDR64_UINT8) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
&__midl_frag11
|
||||
};
|
||||
|
||||
static const __midl_frag9_t __midl_frag9 =
|
||||
{
|
||||
/* MarshallTheThing */
|
||||
{
|
||||
/* MarshallTheThing */ /* procedure MarshallTheThing */
|
||||
(NDR64_UINT32) 786498 /* 0xc0042 */, /* primitive handle */ /* IsIntrepreted, ClientMustSize, HasReturn */
|
||||
(NDR64_UINT32) 16 /* 0x10 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 8 /* 0x8 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 2 /* 0x2 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
},
|
||||
{
|
||||
/* pStream */ /* parameter pStream */
|
||||
&__midl_frag10,
|
||||
{
|
||||
/* pStream */
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* MustSize, MustFree, [in] */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0 /* 0x0 */, /* Stack offset */
|
||||
},
|
||||
{
|
||||
/* HRESULT */ /* parameter HRESULT */
|
||||
&__midl_frag12,
|
||||
{
|
||||
/* HRESULT */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* [out], IsReturn, Basetype, ByValue */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
8 /* 0x8 */, /* Stack offset */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag8_t __midl_frag8 =
|
||||
{
|
||||
/* InternallyMarshalAThing */
|
||||
{
|
||||
/* InternallyMarshalAThing */ /* procedure InternallyMarshalAThing */
|
||||
(NDR64_UINT32) 66 /* 0x42 */, /* primitive handle */ /* IsIntrepreted */
|
||||
(NDR64_UINT32) 0 /* 0x0 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag6_t __midl_frag6 =
|
||||
{
|
||||
/* *wchar_t */
|
||||
{
|
||||
/* *wchar_t */
|
||||
0x64, /* FC64_CONF_WCHAR_STRING */
|
||||
{
|
||||
/* *wchar_t */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
},
|
||||
(NDR64_UINT16) 2 /* 0x2 */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag5_t __midl_frag5 =
|
||||
{
|
||||
/* *wchar_t */
|
||||
0x20, /* FC64_RP */
|
||||
(NDR64_UINT8) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
&__midl_frag6
|
||||
};
|
||||
|
||||
static const __midl_frag4_t __midl_frag4 =
|
||||
{
|
||||
/* HelloProc */
|
||||
{
|
||||
/* HelloProc */ /* procedure HelloProc */
|
||||
(NDR64_UINT32) 262210 /* 0x40042 */, /* primitive handle */ /* IsIntrepreted, ClientMustSize */
|
||||
(NDR64_UINT32) 8 /* 0x8 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 1 /* 0x1 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
},
|
||||
{
|
||||
/* pszString */ /* parameter pszString */
|
||||
&__midl_frag6,
|
||||
{
|
||||
/* pszString */
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* MustSize, MustFree, [in], SimpleRef */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0 /* 0x0 */, /* Stack offset */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag2_t __midl_frag2 =
|
||||
{
|
||||
/* GetDoCount */
|
||||
{
|
||||
/* GetDoCount */ /* procedure GetDoCount */
|
||||
(NDR64_UINT32) 524354 /* 0x80042 */, /* primitive handle */ /* IsIntrepreted, HasReturn */
|
||||
(NDR64_UINT32) 8 /* 0x8 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 8 /* 0x8 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 1 /* 0x1 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
},
|
||||
{
|
||||
/* int */ /* parameter int */
|
||||
&__midl_frag12,
|
||||
{
|
||||
/* int */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* [out], IsReturn, Basetype, ByValue */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0 /* 0x0 */, /* Stack offset */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag1_t __midl_frag1 =
|
||||
(NDR64_UINT32) 0 /* 0x0 */;
|
||||
|
||||
|
||||
#include "poppack.h"
|
||||
|
||||
|
||||
static const FormatInfoRef hello_Ndr64ProcTable[] =
|
||||
{
|
||||
&__midl_frag2,
|
||||
&__midl_frag4,
|
||||
&__midl_frag8,
|
||||
&__midl_frag8,
|
||||
&__midl_frag9
|
||||
};
|
||||
|
||||
|
||||
static const MIDL_STUB_DESC hello_StubDesc =
|
||||
{
|
||||
(void *)& hello___RpcClientInterface,
|
||||
MIDL_user_allocate,
|
||||
MIDL_user_free,
|
||||
&hello_IfHandle,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
hello__MIDL_TypeFormatString.Format,
|
||||
1, /* -error bounds_check flag */
|
||||
0x60001, /* Ndr library version */
|
||||
0,
|
||||
0x801026e, /* MIDL Version 8.1.622 */
|
||||
0,
|
||||
0,
|
||||
0, /* notify & notify_flag routine table */
|
||||
0x2000001, /* MIDL flag */
|
||||
0, /* cs routines */
|
||||
(void *)& hello_ProxyInfo, /* proxy/server info */
|
||||
0
|
||||
};
|
||||
|
||||
static const MIDL_SYNTAX_INFO hello_SyntaxInfo [ 2 ] =
|
||||
{
|
||||
{
|
||||
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
|
||||
0,
|
||||
hello__MIDL_ProcFormatString.Format,
|
||||
hello_FormatStringOffsetTable,
|
||||
hello__MIDL_TypeFormatString.Format,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
}
|
||||
,{
|
||||
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}},
|
||||
0,
|
||||
0 ,
|
||||
(unsigned short *) hello_Ndr64ProcTable,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
}
|
||||
};
|
||||
|
||||
static const MIDL_STUBLESS_PROXY_INFO hello_ProxyInfo =
|
||||
{
|
||||
&hello_StubDesc,
|
||||
hello__MIDL_ProcFormatString.Format,
|
||||
hello_FormatStringOffsetTable,
|
||||
(RPC_SYNTAX_IDENTIFIER*)&_RpcTransferSyntax,
|
||||
2,
|
||||
(MIDL_SYNTAX_INFO*)hello_SyntaxInfo
|
||||
|
||||
};
|
||||
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* defined(_M_AMD64)*/
|
||||
|
||||
701
src/tools/RpcResearch/RPCServer/hello_s.c
Normal file
701
src/tools/RpcResearch/RPCServer/hello_s.c
Normal file
@@ -0,0 +1,701 @@
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the RPC server stubs */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 8.01.0622 */
|
||||
/* at Mon Jan 18 21:14:07 2038
|
||||
*/
|
||||
/* Compiler settings for ..\hello.idl:
|
||||
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
|
||||
protocol : all , ms_ext, app_config, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
#if defined(_M_AMD64)
|
||||
|
||||
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
|
||||
#pragma warning( disable: 4211 ) /* redefine extern to static */
|
||||
#pragma warning( disable: 4232 ) /* dllimport identity*/
|
||||
#pragma warning( disable: 4024 ) /* array to pointer mapping*/
|
||||
|
||||
#include <string.h>
|
||||
#include "hello_h.h"
|
||||
|
||||
#define TYPE_FORMAT_STRING_SIZE 25
|
||||
#define PROC_FORMAT_STRING_SIZE 155
|
||||
#define EXPR_FORMAT_STRING_SIZE 1
|
||||
#define TRANSMIT_AS_TABLE_SIZE 0
|
||||
#define WIRE_MARSHAL_TABLE_SIZE 0
|
||||
|
||||
typedef struct _hello_MIDL_TYPE_FORMAT_STRING
|
||||
{
|
||||
short Pad;
|
||||
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
|
||||
} hello_MIDL_TYPE_FORMAT_STRING;
|
||||
|
||||
typedef struct _hello_MIDL_PROC_FORMAT_STRING
|
||||
{
|
||||
short Pad;
|
||||
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
|
||||
} hello_MIDL_PROC_FORMAT_STRING;
|
||||
|
||||
typedef struct _hello_MIDL_EXPR_FORMAT_STRING
|
||||
{
|
||||
long Pad;
|
||||
unsigned char Format[ EXPR_FORMAT_STRING_SIZE ];
|
||||
} hello_MIDL_EXPR_FORMAT_STRING;
|
||||
|
||||
|
||||
static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax =
|
||||
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
|
||||
|
||||
static const RPC_SYNTAX_IDENTIFIER _NDR64_RpcTransferSyntax =
|
||||
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}};
|
||||
|
||||
|
||||
extern const hello_MIDL_TYPE_FORMAT_STRING hello__MIDL_TypeFormatString;
|
||||
extern const hello_MIDL_PROC_FORMAT_STRING hello__MIDL_ProcFormatString;
|
||||
extern const hello_MIDL_EXPR_FORMAT_STRING hello__MIDL_ExprFormatString;
|
||||
|
||||
/* Standard interface: hello, ver. 1.0,
|
||||
GUID={0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}} */
|
||||
|
||||
|
||||
extern const MIDL_SERVER_INFO hello_ServerInfo;
|
||||
|
||||
extern const RPC_DISPATCH_TABLE hello_v1_0_DispatchTable;
|
||||
|
||||
static const RPC_SERVER_INTERFACE hello___RpcServerInterface =
|
||||
{
|
||||
sizeof(RPC_SERVER_INTERFACE),
|
||||
{{0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}},{1,0}},
|
||||
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
|
||||
(RPC_DISPATCH_TABLE*)&hello_v1_0_DispatchTable,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&hello_ServerInfo,
|
||||
0x06000000
|
||||
};
|
||||
RPC_IF_HANDLE hello_v1_0_s_ifspec = (RPC_IF_HANDLE)& hello___RpcServerInterface;
|
||||
|
||||
extern const MIDL_STUB_DESC hello_StubDesc;
|
||||
|
||||
|
||||
#if !defined(__RPC_WIN64__)
|
||||
#error Invalid build platform for this stub.
|
||||
#endif
|
||||
|
||||
static const hello_MIDL_PROC_FORMAT_STRING hello__MIDL_ProcFormatString =
|
||||
{
|
||||
0,
|
||||
{
|
||||
|
||||
/* Procedure GetDoCount */
|
||||
|
||||
0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 2 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 6 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 8 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
|
||||
/* 10 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 12 */ NdrFcShort( 0x8 ), /* 8 */
|
||||
/* 14 */ 0x44, /* Oi2 Flags: has return, has ext, */
|
||||
0x1, /* 1 */
|
||||
/* 16 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 18 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 20 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 22 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 24 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Return value */
|
||||
|
||||
/* 26 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
|
||||
/* 28 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 30 */ 0x8, /* FC_LONG */
|
||||
0x0, /* 0 */
|
||||
|
||||
/* Procedure HelloProc */
|
||||
|
||||
/* 32 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 34 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 38 */ NdrFcShort( 0x1 ), /* 1 */
|
||||
/* 40 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
|
||||
/* 42 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 44 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 46 */ 0x42, /* Oi2 Flags: clt must size, has ext, */
|
||||
0x1, /* 1 */
|
||||
/* 48 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 50 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 52 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 54 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 56 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Parameter pszString */
|
||||
|
||||
/* 58 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */
|
||||
/* 60 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 62 */ NdrFcShort( 0x4 ), /* Type Offset=4 */
|
||||
|
||||
/* Procedure Shutdown */
|
||||
|
||||
/* 64 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 66 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 70 */ NdrFcShort( 0x2 ), /* 2 */
|
||||
/* 72 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 74 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 76 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 78 */ 0x40, /* Oi2 Flags: has ext, */
|
||||
0x0, /* 0 */
|
||||
/* 80 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 82 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 84 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 86 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 88 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Procedure InternallyMarshalAThing */
|
||||
|
||||
/* 90 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 92 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 96 */ NdrFcShort( 0x3 ), /* 3 */
|
||||
/* 98 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 100 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 102 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 104 */ 0x40, /* Oi2 Flags: has ext, */
|
||||
0x0, /* 0 */
|
||||
/* 106 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 108 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 110 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 112 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 114 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Procedure MarshallTheThing */
|
||||
|
||||
/* 116 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 118 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 122 */ NdrFcShort( 0x4 ), /* 4 */
|
||||
/* 124 */ NdrFcShort( 0x10 ), /* X64 Stack size/offset = 16 */
|
||||
/* 126 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 128 */ NdrFcShort( 0x8 ), /* 8 */
|
||||
/* 130 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */
|
||||
0x2, /* 2 */
|
||||
/* 132 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 134 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 136 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 138 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 140 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Parameter pStream */
|
||||
|
||||
/* 142 */ NdrFcShort( 0xb ), /* Flags: must size, must free, in, */
|
||||
/* 144 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 146 */ NdrFcShort( 0x6 ), /* Type Offset=6 */
|
||||
|
||||
/* Return value */
|
||||
|
||||
/* 148 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
|
||||
/* 150 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
|
||||
/* 152 */ 0x8, /* FC_LONG */
|
||||
0x0, /* 0 */
|
||||
|
||||
0x0
|
||||
}
|
||||
};
|
||||
|
||||
static const hello_MIDL_TYPE_FORMAT_STRING hello__MIDL_TypeFormatString =
|
||||
{
|
||||
0,
|
||||
{
|
||||
NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 2 */
|
||||
0x11, 0x8, /* FC_RP [simple_pointer] */
|
||||
/* 4 */
|
||||
0x25, /* FC_C_WSTRING */
|
||||
0x5c, /* FC_PAD */
|
||||
/* 6 */
|
||||
0x2f, /* FC_IP */
|
||||
0x5a, /* FC_CONSTANT_IID */
|
||||
/* 8 */ NdrFcLong( 0xc ), /* 12 */
|
||||
/* 12 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 14 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 16 */ 0xc0, /* 192 */
|
||||
0x0, /* 0 */
|
||||
/* 18 */ 0x0, /* 0 */
|
||||
0x0, /* 0 */
|
||||
/* 20 */ 0x0, /* 0 */
|
||||
0x0, /* 0 */
|
||||
/* 22 */ 0x0, /* 0 */
|
||||
0x46, /* 70 */
|
||||
|
||||
0x0
|
||||
}
|
||||
};
|
||||
|
||||
static const unsigned short hello_FormatStringOffsetTable[] =
|
||||
{
|
||||
0,
|
||||
32,
|
||||
64,
|
||||
90,
|
||||
116
|
||||
};
|
||||
|
||||
|
||||
static const RPC_DISPATCH_FUNCTION hello_table[] =
|
||||
{
|
||||
NdrServerCall2,
|
||||
NdrServerCall2,
|
||||
NdrServerCall2,
|
||||
NdrServerCall2,
|
||||
NdrServerCall2,
|
||||
0
|
||||
};
|
||||
static const RPC_DISPATCH_TABLE hello_v1_0_DispatchTable =
|
||||
{
|
||||
5,
|
||||
(RPC_DISPATCH_FUNCTION*)hello_table
|
||||
};
|
||||
|
||||
|
||||
#endif /* defined(_M_AMD64)*/
|
||||
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the RPC server stubs */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 8.01.0622 */
|
||||
/* at Mon Jan 18 21:14:07 2038
|
||||
*/
|
||||
/* Compiler settings for ..\hello.idl:
|
||||
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
|
||||
protocol : all , ms_ext, app_config, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
#if defined(_M_AMD64)
|
||||
|
||||
|
||||
|
||||
|
||||
#if !defined(__RPC_WIN64__)
|
||||
#error Invalid build platform for this stub.
|
||||
#endif
|
||||
|
||||
|
||||
#include "ndr64types.h"
|
||||
#include "pshpack8.h"
|
||||
|
||||
|
||||
typedef
|
||||
NDR64_FORMAT_CHAR
|
||||
__midl_frag12_t;
|
||||
extern const __midl_frag12_t __midl_frag12;
|
||||
|
||||
typedef
|
||||
struct _NDR64_CONSTANT_IID_FORMAT
|
||||
__midl_frag11_t;
|
||||
extern const __midl_frag11_t __midl_frag11;
|
||||
|
||||
typedef
|
||||
struct _NDR64_POINTER_FORMAT
|
||||
__midl_frag10_t;
|
||||
extern const __midl_frag10_t __midl_frag10;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
struct _NDR64_PARAM_FORMAT frag2;
|
||||
struct _NDR64_PARAM_FORMAT frag3;
|
||||
}
|
||||
__midl_frag9_t;
|
||||
extern const __midl_frag9_t __midl_frag9;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
}
|
||||
__midl_frag8_t;
|
||||
extern const __midl_frag8_t __midl_frag8;
|
||||
|
||||
typedef
|
||||
struct _NDR64_CONFORMANT_STRING_FORMAT
|
||||
__midl_frag6_t;
|
||||
extern const __midl_frag6_t __midl_frag6;
|
||||
|
||||
typedef
|
||||
struct _NDR64_POINTER_FORMAT
|
||||
__midl_frag5_t;
|
||||
extern const __midl_frag5_t __midl_frag5;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
struct _NDR64_PARAM_FORMAT frag2;
|
||||
}
|
||||
__midl_frag4_t;
|
||||
extern const __midl_frag4_t __midl_frag4;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
struct _NDR64_PARAM_FORMAT frag2;
|
||||
}
|
||||
__midl_frag2_t;
|
||||
extern const __midl_frag2_t __midl_frag2;
|
||||
|
||||
typedef
|
||||
NDR64_FORMAT_UINT32
|
||||
__midl_frag1_t;
|
||||
extern const __midl_frag1_t __midl_frag1;
|
||||
|
||||
static const __midl_frag12_t __midl_frag12 =
|
||||
0x5 /* FC64_INT32 */;
|
||||
|
||||
static const __midl_frag11_t __midl_frag11 =
|
||||
{
|
||||
/* struct _NDR64_CONSTANT_IID_FORMAT */
|
||||
0x24, /* FC64_IP */
|
||||
(NDR64_UINT8) 1 /* 0x1 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
{
|
||||
0x0000000c,
|
||||
0x0000,
|
||||
0x0000,
|
||||
{0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag10_t __midl_frag10 =
|
||||
{
|
||||
/* *struct _NDR64_POINTER_FORMAT */
|
||||
0x24, /* FC64_IP */
|
||||
(NDR64_UINT8) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
&__midl_frag11
|
||||
};
|
||||
|
||||
static const __midl_frag9_t __midl_frag9 =
|
||||
{
|
||||
/* MarshallTheThing */
|
||||
{
|
||||
/* MarshallTheThing */ /* procedure MarshallTheThing */
|
||||
(NDR64_UINT32) 786498 /* 0xc0042 */, /* primitive handle */ /* IsIntrepreted, ClientMustSize, HasReturn */
|
||||
(NDR64_UINT32) 16 /* 0x10 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 8 /* 0x8 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 2 /* 0x2 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
},
|
||||
{
|
||||
/* pStream */ /* parameter pStream */
|
||||
&__midl_frag10,
|
||||
{
|
||||
/* pStream */
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* MustSize, MustFree, [in] */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0 /* 0x0 */, /* Stack offset */
|
||||
},
|
||||
{
|
||||
/* HRESULT */ /* parameter HRESULT */
|
||||
&__midl_frag12,
|
||||
{
|
||||
/* HRESULT */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* [out], IsReturn, Basetype, ByValue */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
8 /* 0x8 */, /* Stack offset */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag8_t __midl_frag8 =
|
||||
{
|
||||
/* InternallyMarshalAThing */
|
||||
{
|
||||
/* InternallyMarshalAThing */ /* procedure InternallyMarshalAThing */
|
||||
(NDR64_UINT32) 66 /* 0x42 */, /* primitive handle */ /* IsIntrepreted */
|
||||
(NDR64_UINT32) 0 /* 0x0 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag6_t __midl_frag6 =
|
||||
{
|
||||
/* *wchar_t */
|
||||
{
|
||||
/* *wchar_t */
|
||||
0x64, /* FC64_CONF_WCHAR_STRING */
|
||||
{
|
||||
/* *wchar_t */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
},
|
||||
(NDR64_UINT16) 2 /* 0x2 */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag5_t __midl_frag5 =
|
||||
{
|
||||
/* *wchar_t */
|
||||
0x20, /* FC64_RP */
|
||||
(NDR64_UINT8) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
&__midl_frag6
|
||||
};
|
||||
|
||||
static const __midl_frag4_t __midl_frag4 =
|
||||
{
|
||||
/* HelloProc */
|
||||
{
|
||||
/* HelloProc */ /* procedure HelloProc */
|
||||
(NDR64_UINT32) 262210 /* 0x40042 */, /* primitive handle */ /* IsIntrepreted, ClientMustSize */
|
||||
(NDR64_UINT32) 8 /* 0x8 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 1 /* 0x1 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
},
|
||||
{
|
||||
/* pszString */ /* parameter pszString */
|
||||
&__midl_frag6,
|
||||
{
|
||||
/* pszString */
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* MustSize, MustFree, [in], SimpleRef */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0 /* 0x0 */, /* Stack offset */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag2_t __midl_frag2 =
|
||||
{
|
||||
/* GetDoCount */
|
||||
{
|
||||
/* GetDoCount */ /* procedure GetDoCount */
|
||||
(NDR64_UINT32) 524354 /* 0x80042 */, /* primitive handle */ /* IsIntrepreted, HasReturn */
|
||||
(NDR64_UINT32) 8 /* 0x8 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 8 /* 0x8 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 1 /* 0x1 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
},
|
||||
{
|
||||
/* int */ /* parameter int */
|
||||
&__midl_frag12,
|
||||
{
|
||||
/* int */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* [out], IsReturn, Basetype, ByValue */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0 /* 0x0 */, /* Stack offset */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag1_t __midl_frag1 =
|
||||
(NDR64_UINT32) 0 /* 0x0 */;
|
||||
|
||||
|
||||
#include "poppack.h"
|
||||
|
||||
|
||||
static const FormatInfoRef hello_Ndr64ProcTable[] =
|
||||
{
|
||||
&__midl_frag2,
|
||||
&__midl_frag4,
|
||||
&__midl_frag8,
|
||||
&__midl_frag8,
|
||||
&__midl_frag9
|
||||
};
|
||||
|
||||
|
||||
static const MIDL_STUB_DESC hello_StubDesc =
|
||||
{
|
||||
(void *)& hello___RpcServerInterface,
|
||||
MIDL_user_allocate,
|
||||
MIDL_user_free,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
hello__MIDL_TypeFormatString.Format,
|
||||
1, /* -error bounds_check flag */
|
||||
0x60001, /* Ndr library version */
|
||||
0,
|
||||
0x801026e, /* MIDL Version 8.1.622 */
|
||||
0,
|
||||
0,
|
||||
0, /* notify & notify_flag routine table */
|
||||
0x2000001, /* MIDL flag */
|
||||
0, /* cs routines */
|
||||
(void *)& hello_ServerInfo, /* proxy/server info */
|
||||
0
|
||||
};
|
||||
|
||||
static const RPC_DISPATCH_FUNCTION hello_NDR64__table[] =
|
||||
{
|
||||
NdrServerCallAll,
|
||||
NdrServerCallAll,
|
||||
NdrServerCallAll,
|
||||
NdrServerCallAll,
|
||||
NdrServerCallAll,
|
||||
0
|
||||
};
|
||||
static const RPC_DISPATCH_TABLE hello_NDR64__v1_0_DispatchTable =
|
||||
{
|
||||
5,
|
||||
(RPC_DISPATCH_FUNCTION*)hello_NDR64__table
|
||||
};
|
||||
|
||||
static const MIDL_SYNTAX_INFO hello_SyntaxInfo [ 2 ] =
|
||||
{
|
||||
{
|
||||
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
|
||||
(RPC_DISPATCH_TABLE*)&hello_v1_0_DispatchTable,
|
||||
hello__MIDL_ProcFormatString.Format,
|
||||
hello_FormatStringOffsetTable,
|
||||
hello__MIDL_TypeFormatString.Format,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
}
|
||||
,{
|
||||
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}},
|
||||
(RPC_DISPATCH_TABLE*)&hello_NDR64__v1_0_DispatchTable,
|
||||
0 ,
|
||||
(unsigned short *) hello_Ndr64ProcTable,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static const SERVER_ROUTINE hello_ServerRoutineTable[] =
|
||||
{
|
||||
(SERVER_ROUTINE)GetDoCount,
|
||||
(SERVER_ROUTINE)HelloProc,
|
||||
(SERVER_ROUTINE)Shutdown,
|
||||
(SERVER_ROUTINE)InternallyMarshalAThing,
|
||||
(SERVER_ROUTINE)MarshallTheThing
|
||||
};
|
||||
|
||||
static const MIDL_SERVER_INFO hello_ServerInfo =
|
||||
{
|
||||
&hello_StubDesc,
|
||||
hello_ServerRoutineTable,
|
||||
hello__MIDL_ProcFormatString.Format,
|
||||
(unsigned short *) hello_FormatStringOffsetTable,
|
||||
0,
|
||||
(RPC_SYNTAX_IDENTIFIER*)&_NDR64_RpcTransferSyntax,
|
||||
2,
|
||||
(MIDL_SYNTAX_INFO*)hello_SyntaxInfo
|
||||
};
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* defined(_M_AMD64)*/
|
||||
|
||||
129
src/tools/RpcResearch/RpcClient/RpcClient.cpp
Normal file
129
src/tools/RpcResearch/RpcClient/RpcClient.cpp
Normal file
@@ -0,0 +1,129 @@
|
||||
/* file: helloc.c */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include "hello_h.h"
|
||||
#include "IScratch_h.h"
|
||||
#include <windows.h>
|
||||
|
||||
#include <wrl.h>
|
||||
|
||||
void mainLoop()
|
||||
{
|
||||
const wchar_t* pszString = L"hello, world";
|
||||
|
||||
// Do the logic for the app in here, once RPC has already been set up.
|
||||
|
||||
printf("The server said the DoCount is %d\n", GetDoCount());
|
||||
|
||||
HelloProc(pszString);
|
||||
HelloProc(L"A different string");
|
||||
|
||||
printf("Now, the DoCount is %d\n", GetDoCount());
|
||||
|
||||
// This Shutdown RPC call will stop the server process
|
||||
// Shutdown();
|
||||
InternallyMarshalAThing();
|
||||
|
||||
Microsoft::WRL::ComPtr<IStream> stream2;
|
||||
auto hr = CreateStreamOnHGlobal(
|
||||
NULL,
|
||||
TRUE,
|
||||
&stream2);
|
||||
printf("CreateStreamOnHGlobal: %d\n", hr);
|
||||
|
||||
hr = stream2->Seek({ 0, 0 }, STREAM_SEEK_SET, nullptr);
|
||||
printf("Seek: %d\n", hr);
|
||||
|
||||
hr = MarshallTheThing(stream2.Get());
|
||||
|
||||
printf("MarshallTheThing: %d\n", hr);
|
||||
Microsoft::WRL::ComPtr<IScratch> otherScratch;
|
||||
|
||||
hr = CoUnmarshalInterface(stream2.Get(), __uuidof(IScratch), (void**)otherScratch.GetAddressOf());
|
||||
printf("CoUnmarshalInterface: %d\n", hr);
|
||||
if (otherScratch)
|
||||
{
|
||||
printf("Successfully got a IScratch\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Failed to get a IScratch\n");
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
RPC_STATUS status;
|
||||
wchar_t* pszUuid = NULL;
|
||||
const wchar_t* pszProtocolSequence = L"ncacn_np";
|
||||
wchar_t* pszNetworkAddress = NULL;
|
||||
const wchar_t* pszEndpoint = L"\\pipe\\hello";
|
||||
wchar_t* pszOptions = NULL;
|
||||
wchar_t* pszStringBinding = NULL;
|
||||
unsigned long ulCode;
|
||||
|
||||
status = RpcStringBindingCompose(reinterpret_cast<RPC_WSTR>(pszUuid),
|
||||
reinterpret_cast<RPC_WSTR>(const_cast<wchar_t*>(pszProtocolSequence)),
|
||||
reinterpret_cast<RPC_WSTR>(pszNetworkAddress),
|
||||
reinterpret_cast<RPC_WSTR>(const_cast<wchar_t*>(pszEndpoint)),
|
||||
reinterpret_cast<RPC_WSTR>(pszOptions),
|
||||
reinterpret_cast<RPC_WSTR*>(&pszStringBinding));
|
||||
if (status)
|
||||
{
|
||||
printf("RpcStringBindingCompose failed with %d\n", status);
|
||||
exit(status);
|
||||
}
|
||||
|
||||
// status = RpcBindingFromStringBinding(reinterpret_cast<RPC_WSTR>(pszStringBinding), &hello_ClientIfHandle);
|
||||
// status = RpcBindingFromStringBinding(reinterpret_cast<RPC_WSTR>(pszStringBinding), &hello_v1_0_c_ifspec);
|
||||
status = RpcBindingFromStringBinding(reinterpret_cast<RPC_WSTR>(pszStringBinding), &hello_IfHandle);
|
||||
|
||||
if (status)
|
||||
{
|
||||
printf("RpcBindingFromStringBinding failed with %d\n", status);
|
||||
exit(status);
|
||||
}
|
||||
|
||||
RpcTryExcept
|
||||
{
|
||||
mainLoop();
|
||||
}
|
||||
RpcExcept(1)
|
||||
{
|
||||
ulCode = RpcExceptionCode();
|
||||
printf("Runtime reported exception 0x%lx = %ld\n", ulCode, ulCode);
|
||||
}
|
||||
RpcEndExcept;
|
||||
|
||||
status = RpcStringFree(reinterpret_cast<RPC_WSTR*>(&pszStringBinding));
|
||||
if (status)
|
||||
{
|
||||
printf("RpcStringFree failed with %d\n", status);
|
||||
exit(status);
|
||||
}
|
||||
|
||||
status = RpcBindingFree(&hello_IfHandle);
|
||||
|
||||
if (status)
|
||||
{
|
||||
printf("RpcBindingFree failed with %d\n", status);
|
||||
exit(status);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/******************************************************/
|
||||
/* MIDL allocate and free */
|
||||
/******************************************************/
|
||||
|
||||
void __RPC_FAR* __RPC_USER midl_user_allocate(size_t len)
|
||||
{
|
||||
return (malloc(len));
|
||||
}
|
||||
|
||||
void __RPC_USER midl_user_free(void __RPC_FAR* ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
169
src/tools/RpcResearch/RpcClient/RpcClient.vcxproj
Normal file
169
src/tools/RpcResearch/RpcClient/RpcClient.vcxproj
Normal file
@@ -0,0 +1,169 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{4961296e-123f-4744-986b-760d0fbdc83a}</ProjectGuid>
|
||||
<RootNamespace>RpcClient</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>Rpcrt4.lib;RuntimeObject.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Midl>
|
||||
<ApplicationConfigurationMode>true</ApplicationConfigurationMode>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ClCompile Include="RpcClient.cpp" />
|
||||
<ClCompile Include="hello_c.c">
|
||||
<DependentUpon>..\hello.idl</DependentUpon>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="..\hello.idl" />
|
||||
<Midl Include="..\IScratch.idl" />
|
||||
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\hello.acf" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
22
src/tools/RpcResearch/RpcClient/RpcClient.vcxproj.filters
Normal file
22
src/tools/RpcResearch/RpcClient/RpcClient.vcxproj.filters
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="RpcClient.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
735
src/tools/RpcResearch/RpcClient/hello_c.c
Normal file
735
src/tools/RpcResearch/RpcClient/hello_c.c
Normal file
@@ -0,0 +1,735 @@
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the RPC client stubs */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 8.01.0622 */
|
||||
/* at Mon Jan 18 21:14:07 2038
|
||||
*/
|
||||
/* Compiler settings for ..\hello.idl:
|
||||
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
|
||||
protocol : all , ms_ext, app_config, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
#if defined(_M_AMD64)
|
||||
|
||||
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
|
||||
#pragma warning( disable: 4211 ) /* redefine extern to static */
|
||||
#pragma warning( disable: 4232 ) /* dllimport identity*/
|
||||
#pragma warning( disable: 4024 ) /* array to pointer mapping*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "hello_h.h"
|
||||
|
||||
#define TYPE_FORMAT_STRING_SIZE 25
|
||||
#define PROC_FORMAT_STRING_SIZE 155
|
||||
#define EXPR_FORMAT_STRING_SIZE 1
|
||||
#define TRANSMIT_AS_TABLE_SIZE 0
|
||||
#define WIRE_MARSHAL_TABLE_SIZE 0
|
||||
|
||||
typedef struct _hello_MIDL_TYPE_FORMAT_STRING
|
||||
{
|
||||
short Pad;
|
||||
unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];
|
||||
} hello_MIDL_TYPE_FORMAT_STRING;
|
||||
|
||||
typedef struct _hello_MIDL_PROC_FORMAT_STRING
|
||||
{
|
||||
short Pad;
|
||||
unsigned char Format[ PROC_FORMAT_STRING_SIZE ];
|
||||
} hello_MIDL_PROC_FORMAT_STRING;
|
||||
|
||||
typedef struct _hello_MIDL_EXPR_FORMAT_STRING
|
||||
{
|
||||
long Pad;
|
||||
unsigned char Format[ EXPR_FORMAT_STRING_SIZE ];
|
||||
} hello_MIDL_EXPR_FORMAT_STRING;
|
||||
|
||||
|
||||
static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax =
|
||||
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
|
||||
|
||||
static const RPC_SYNTAX_IDENTIFIER _NDR64_RpcTransferSyntax =
|
||||
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}};
|
||||
|
||||
|
||||
|
||||
extern const hello_MIDL_TYPE_FORMAT_STRING hello__MIDL_TypeFormatString;
|
||||
extern const hello_MIDL_PROC_FORMAT_STRING hello__MIDL_ProcFormatString;
|
||||
extern const hello_MIDL_EXPR_FORMAT_STRING hello__MIDL_ExprFormatString;
|
||||
|
||||
#define GENERIC_BINDING_TABLE_SIZE 0
|
||||
|
||||
|
||||
/* Standard interface: hello, ver. 1.0,
|
||||
GUID={0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}} */
|
||||
|
||||
extern const MIDL_STUBLESS_PROXY_INFO hello_ProxyInfo;
|
||||
handle_t hello_IfHandle;
|
||||
|
||||
|
||||
static const RPC_CLIENT_INTERFACE hello___RpcClientInterface =
|
||||
{
|
||||
sizeof(RPC_CLIENT_INTERFACE),
|
||||
{{0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}},{1,0}},
|
||||
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
&hello_ProxyInfo,
|
||||
0x02000000
|
||||
};
|
||||
RPC_IF_HANDLE hello_v1_0_c_ifspec = (RPC_IF_HANDLE)& hello___RpcClientInterface;
|
||||
|
||||
extern const MIDL_STUB_DESC hello_StubDesc;
|
||||
|
||||
static RPC_BINDING_HANDLE hello__MIDL_AutoBindHandle;
|
||||
|
||||
|
||||
int GetDoCount( void)
|
||||
{
|
||||
|
||||
CLIENT_CALL_RETURN _RetVal;
|
||||
|
||||
_RetVal = NdrClientCall3(
|
||||
( PMIDL_STUBLESS_PROXY_INFO )&hello_ProxyInfo,
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
return ( int )_RetVal.Simple;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void HelloProc(
|
||||
/* [string][in] */ const wchar_t *pszString)
|
||||
{
|
||||
|
||||
NdrClientCall3(
|
||||
( PMIDL_STUBLESS_PROXY_INFO )&hello_ProxyInfo,
|
||||
1,
|
||||
0,
|
||||
pszString);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Shutdown( void)
|
||||
{
|
||||
|
||||
NdrClientCall3(
|
||||
( PMIDL_STUBLESS_PROXY_INFO )&hello_ProxyInfo,
|
||||
2,
|
||||
0,
|
||||
0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void InternallyMarshalAThing( void)
|
||||
{
|
||||
|
||||
NdrClientCall3(
|
||||
( PMIDL_STUBLESS_PROXY_INFO )&hello_ProxyInfo,
|
||||
3,
|
||||
0,
|
||||
0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
HRESULT MarshallTheThing(
|
||||
/* [in] */ IStream *pStream)
|
||||
{
|
||||
|
||||
CLIENT_CALL_RETURN _RetVal;
|
||||
|
||||
_RetVal = NdrClientCall3(
|
||||
( PMIDL_STUBLESS_PROXY_INFO )&hello_ProxyInfo,
|
||||
4,
|
||||
0,
|
||||
pStream);
|
||||
return ( HRESULT )_RetVal.Simple;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#if !defined(__RPC_WIN64__)
|
||||
#error Invalid build platform for this stub.
|
||||
#endif
|
||||
|
||||
static const hello_MIDL_PROC_FORMAT_STRING hello__MIDL_ProcFormatString =
|
||||
{
|
||||
0,
|
||||
{
|
||||
|
||||
/* Procedure GetDoCount */
|
||||
|
||||
0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 2 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 6 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 8 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
|
||||
/* 10 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 12 */ NdrFcShort( 0x8 ), /* 8 */
|
||||
/* 14 */ 0x44, /* Oi2 Flags: has return, has ext, */
|
||||
0x1, /* 1 */
|
||||
/* 16 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 18 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 20 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 22 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 24 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Return value */
|
||||
|
||||
/* 26 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
|
||||
/* 28 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 30 */ 0x8, /* FC_LONG */
|
||||
0x0, /* 0 */
|
||||
|
||||
/* Procedure HelloProc */
|
||||
|
||||
/* 32 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 34 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 38 */ NdrFcShort( 0x1 ), /* 1 */
|
||||
/* 40 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
|
||||
/* 42 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 44 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 46 */ 0x42, /* Oi2 Flags: clt must size, has ext, */
|
||||
0x1, /* 1 */
|
||||
/* 48 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 50 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 52 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 54 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 56 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Parameter pszString */
|
||||
|
||||
/* 58 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */
|
||||
/* 60 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 62 */ NdrFcShort( 0x4 ), /* Type Offset=4 */
|
||||
|
||||
/* Procedure Shutdown */
|
||||
|
||||
/* 64 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 66 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 70 */ NdrFcShort( 0x2 ), /* 2 */
|
||||
/* 72 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 74 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 76 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 78 */ 0x40, /* Oi2 Flags: has ext, */
|
||||
0x0, /* 0 */
|
||||
/* 80 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 82 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 84 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 86 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 88 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Procedure InternallyMarshalAThing */
|
||||
|
||||
/* 90 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 92 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 96 */ NdrFcShort( 0x3 ), /* 3 */
|
||||
/* 98 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 100 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 102 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 104 */ 0x40, /* Oi2 Flags: has ext, */
|
||||
0x0, /* 0 */
|
||||
/* 106 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 108 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 110 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 112 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 114 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Procedure MarshallTheThing */
|
||||
|
||||
/* 116 */ 0x32, /* FC_BIND_PRIMITIVE */
|
||||
0x48, /* Old Flags: */
|
||||
/* 118 */ NdrFcLong( 0x0 ), /* 0 */
|
||||
/* 122 */ NdrFcShort( 0x4 ), /* 4 */
|
||||
/* 124 */ NdrFcShort( 0x10 ), /* X64 Stack size/offset = 16 */
|
||||
/* 126 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 128 */ NdrFcShort( 0x8 ), /* 8 */
|
||||
/* 130 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */
|
||||
0x2, /* 2 */
|
||||
/* 132 */ 0xa, /* 10 */
|
||||
0x1, /* Ext Flags: new corr desc, */
|
||||
/* 134 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 136 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 138 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 140 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
|
||||
/* Parameter pStream */
|
||||
|
||||
/* 142 */ NdrFcShort( 0xb ), /* Flags: must size, must free, in, */
|
||||
/* 144 */ NdrFcShort( 0x0 ), /* X64 Stack size/offset = 0 */
|
||||
/* 146 */ NdrFcShort( 0x6 ), /* Type Offset=6 */
|
||||
|
||||
/* Return value */
|
||||
|
||||
/* 148 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */
|
||||
/* 150 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */
|
||||
/* 152 */ 0x8, /* FC_LONG */
|
||||
0x0, /* 0 */
|
||||
|
||||
0x0
|
||||
}
|
||||
};
|
||||
|
||||
static const hello_MIDL_TYPE_FORMAT_STRING hello__MIDL_TypeFormatString =
|
||||
{
|
||||
0,
|
||||
{
|
||||
NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 2 */
|
||||
0x11, 0x8, /* FC_RP [simple_pointer] */
|
||||
/* 4 */
|
||||
0x25, /* FC_C_WSTRING */
|
||||
0x5c, /* FC_PAD */
|
||||
/* 6 */
|
||||
0x2f, /* FC_IP */
|
||||
0x5a, /* FC_CONSTANT_IID */
|
||||
/* 8 */ NdrFcLong( 0xc ), /* 12 */
|
||||
/* 12 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 14 */ NdrFcShort( 0x0 ), /* 0 */
|
||||
/* 16 */ 0xc0, /* 192 */
|
||||
0x0, /* 0 */
|
||||
/* 18 */ 0x0, /* 0 */
|
||||
0x0, /* 0 */
|
||||
/* 20 */ 0x0, /* 0 */
|
||||
0x0, /* 0 */
|
||||
/* 22 */ 0x0, /* 0 */
|
||||
0x46, /* 70 */
|
||||
|
||||
0x0
|
||||
}
|
||||
};
|
||||
|
||||
static const unsigned short hello_FormatStringOffsetTable[] =
|
||||
{
|
||||
0,
|
||||
32,
|
||||
64,
|
||||
90,
|
||||
116
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* defined(_M_AMD64)*/
|
||||
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the RPC client stubs */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 8.01.0622 */
|
||||
/* at Mon Jan 18 21:14:07 2038
|
||||
*/
|
||||
/* Compiler settings for ..\hello.idl:
|
||||
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
|
||||
protocol : all , ms_ext, app_config, c_ext, robust
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
#if defined(_M_AMD64)
|
||||
|
||||
|
||||
|
||||
|
||||
#if !defined(__RPC_WIN64__)
|
||||
#error Invalid build platform for this stub.
|
||||
#endif
|
||||
|
||||
|
||||
#include "ndr64types.h"
|
||||
#include "pshpack8.h"
|
||||
|
||||
|
||||
typedef
|
||||
NDR64_FORMAT_CHAR
|
||||
__midl_frag12_t;
|
||||
extern const __midl_frag12_t __midl_frag12;
|
||||
|
||||
typedef
|
||||
struct _NDR64_CONSTANT_IID_FORMAT
|
||||
__midl_frag11_t;
|
||||
extern const __midl_frag11_t __midl_frag11;
|
||||
|
||||
typedef
|
||||
struct _NDR64_POINTER_FORMAT
|
||||
__midl_frag10_t;
|
||||
extern const __midl_frag10_t __midl_frag10;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
struct _NDR64_PARAM_FORMAT frag2;
|
||||
struct _NDR64_PARAM_FORMAT frag3;
|
||||
}
|
||||
__midl_frag9_t;
|
||||
extern const __midl_frag9_t __midl_frag9;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
}
|
||||
__midl_frag8_t;
|
||||
extern const __midl_frag8_t __midl_frag8;
|
||||
|
||||
typedef
|
||||
struct _NDR64_CONFORMANT_STRING_FORMAT
|
||||
__midl_frag6_t;
|
||||
extern const __midl_frag6_t __midl_frag6;
|
||||
|
||||
typedef
|
||||
struct _NDR64_POINTER_FORMAT
|
||||
__midl_frag5_t;
|
||||
extern const __midl_frag5_t __midl_frag5;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
struct _NDR64_PARAM_FORMAT frag2;
|
||||
}
|
||||
__midl_frag4_t;
|
||||
extern const __midl_frag4_t __midl_frag4;
|
||||
|
||||
typedef
|
||||
struct
|
||||
{
|
||||
struct _NDR64_PROC_FORMAT frag1;
|
||||
struct _NDR64_PARAM_FORMAT frag2;
|
||||
}
|
||||
__midl_frag2_t;
|
||||
extern const __midl_frag2_t __midl_frag2;
|
||||
|
||||
typedef
|
||||
NDR64_FORMAT_UINT32
|
||||
__midl_frag1_t;
|
||||
extern const __midl_frag1_t __midl_frag1;
|
||||
|
||||
static const __midl_frag12_t __midl_frag12 =
|
||||
0x5 /* FC64_INT32 */;
|
||||
|
||||
static const __midl_frag11_t __midl_frag11 =
|
||||
{
|
||||
/* struct _NDR64_CONSTANT_IID_FORMAT */
|
||||
0x24, /* FC64_IP */
|
||||
(NDR64_UINT8) 1 /* 0x1 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
{
|
||||
0x0000000c,
|
||||
0x0000,
|
||||
0x0000,
|
||||
{0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag10_t __midl_frag10 =
|
||||
{
|
||||
/* *struct _NDR64_POINTER_FORMAT */
|
||||
0x24, /* FC64_IP */
|
||||
(NDR64_UINT8) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
&__midl_frag11
|
||||
};
|
||||
|
||||
static const __midl_frag9_t __midl_frag9 =
|
||||
{
|
||||
/* MarshallTheThing */
|
||||
{
|
||||
/* MarshallTheThing */ /* procedure MarshallTheThing */
|
||||
(NDR64_UINT32) 786498 /* 0xc0042 */, /* primitive handle */ /* IsIntrepreted, ClientMustSize, HasReturn */
|
||||
(NDR64_UINT32) 16 /* 0x10 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 8 /* 0x8 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 2 /* 0x2 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
},
|
||||
{
|
||||
/* pStream */ /* parameter pStream */
|
||||
&__midl_frag10,
|
||||
{
|
||||
/* pStream */
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* MustSize, MustFree, [in] */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0 /* 0x0 */, /* Stack offset */
|
||||
},
|
||||
{
|
||||
/* HRESULT */ /* parameter HRESULT */
|
||||
&__midl_frag12,
|
||||
{
|
||||
/* HRESULT */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* [out], IsReturn, Basetype, ByValue */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
8 /* 0x8 */, /* Stack offset */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag8_t __midl_frag8 =
|
||||
{
|
||||
/* InternallyMarshalAThing */
|
||||
{
|
||||
/* InternallyMarshalAThing */ /* procedure InternallyMarshalAThing */
|
||||
(NDR64_UINT32) 66 /* 0x42 */, /* primitive handle */ /* IsIntrepreted */
|
||||
(NDR64_UINT32) 0 /* 0x0 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag6_t __midl_frag6 =
|
||||
{
|
||||
/* *wchar_t */
|
||||
{
|
||||
/* *wchar_t */
|
||||
0x64, /* FC64_CONF_WCHAR_STRING */
|
||||
{
|
||||
/* *wchar_t */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
},
|
||||
(NDR64_UINT16) 2 /* 0x2 */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag5_t __midl_frag5 =
|
||||
{
|
||||
/* *wchar_t */
|
||||
0x20, /* FC64_RP */
|
||||
(NDR64_UINT8) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
&__midl_frag6
|
||||
};
|
||||
|
||||
static const __midl_frag4_t __midl_frag4 =
|
||||
{
|
||||
/* HelloProc */
|
||||
{
|
||||
/* HelloProc */ /* procedure HelloProc */
|
||||
(NDR64_UINT32) 262210 /* 0x40042 */, /* primitive handle */ /* IsIntrepreted, ClientMustSize */
|
||||
(NDR64_UINT32) 8 /* 0x8 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 1 /* 0x1 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
},
|
||||
{
|
||||
/* pszString */ /* parameter pszString */
|
||||
&__midl_frag6,
|
||||
{
|
||||
/* pszString */
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* MustSize, MustFree, [in], SimpleRef */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0 /* 0x0 */, /* Stack offset */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag2_t __midl_frag2 =
|
||||
{
|
||||
/* GetDoCount */
|
||||
{
|
||||
/* GetDoCount */ /* procedure GetDoCount */
|
||||
(NDR64_UINT32) 524354 /* 0x80042 */, /* primitive handle */ /* IsIntrepreted, HasReturn */
|
||||
(NDR64_UINT32) 8 /* 0x8 */ , /* Stack size */
|
||||
(NDR64_UINT32) 0 /* 0x0 */,
|
||||
(NDR64_UINT32) 8 /* 0x8 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
(NDR64_UINT16) 1 /* 0x1 */,
|
||||
(NDR64_UINT16) 0 /* 0x0 */
|
||||
},
|
||||
{
|
||||
/* int */ /* parameter int */
|
||||
&__midl_frag12,
|
||||
{
|
||||
/* int */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0
|
||||
}, /* [out], IsReturn, Basetype, ByValue */
|
||||
(NDR64_UINT16) 0 /* 0x0 */,
|
||||
0 /* 0x0 */, /* Stack offset */
|
||||
}
|
||||
};
|
||||
|
||||
static const __midl_frag1_t __midl_frag1 =
|
||||
(NDR64_UINT32) 0 /* 0x0 */;
|
||||
|
||||
|
||||
#include "poppack.h"
|
||||
|
||||
|
||||
static const FormatInfoRef hello_Ndr64ProcTable[] =
|
||||
{
|
||||
&__midl_frag2,
|
||||
&__midl_frag4,
|
||||
&__midl_frag8,
|
||||
&__midl_frag8,
|
||||
&__midl_frag9
|
||||
};
|
||||
|
||||
|
||||
static const MIDL_STUB_DESC hello_StubDesc =
|
||||
{
|
||||
(void *)& hello___RpcClientInterface,
|
||||
MIDL_user_allocate,
|
||||
MIDL_user_free,
|
||||
&hello_IfHandle,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
hello__MIDL_TypeFormatString.Format,
|
||||
1, /* -error bounds_check flag */
|
||||
0x60001, /* Ndr library version */
|
||||
0,
|
||||
0x801026e, /* MIDL Version 8.1.622 */
|
||||
0,
|
||||
0,
|
||||
0, /* notify & notify_flag routine table */
|
||||
0x2000001, /* MIDL flag */
|
||||
0, /* cs routines */
|
||||
(void *)& hello_ProxyInfo, /* proxy/server info */
|
||||
0
|
||||
};
|
||||
|
||||
static const MIDL_SYNTAX_INFO hello_SyntaxInfo [ 2 ] =
|
||||
{
|
||||
{
|
||||
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
|
||||
0,
|
||||
hello__MIDL_ProcFormatString.Format,
|
||||
hello_FormatStringOffsetTable,
|
||||
hello__MIDL_TypeFormatString.Format,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
}
|
||||
,{
|
||||
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}},
|
||||
0,
|
||||
0 ,
|
||||
(unsigned short *) hello_Ndr64ProcTable,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
}
|
||||
};
|
||||
|
||||
static const MIDL_STUBLESS_PROXY_INFO hello_ProxyInfo =
|
||||
{
|
||||
&hello_StubDesc,
|
||||
hello__MIDL_ProcFormatString.Format,
|
||||
hello_FormatStringOffsetTable,
|
||||
(RPC_SYNTAX_IDENTIFIER*)&_RpcTransferSyntax,
|
||||
2,
|
||||
(MIDL_SYNTAX_INFO*)hello_SyntaxInfo
|
||||
|
||||
};
|
||||
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* defined(_M_AMD64)*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user