Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3692 - Rearchitects drivers #3837

Draft
wants to merge 104 commits into
base: v2_develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
104 commits
Select commit Hold shift click to select a range
efbdfbe
Add simple loop input classes for Net and Win32
tznind Nov 18, 2024
8000c8d
Add scaffolding
tznind Nov 18, 2024
b0fe7a4
Adjust layout
tznind Nov 18, 2024
43418b5
Add Drivers2 test project and make everything public. Also add output
tznind Nov 19, 2024
77febd8
Launch with "win"
tznind Nov 19, 2024
6a535b4
Merge branch 'v2_develop' into v2-drivers
tig Nov 19, 2024
e24d06f
Deal with strange thread requirements of Win32 apis
tznind Nov 20, 2024
d267a0b
Merge branch 'v2-drivers' of https://github.com/tznind/gui.cs into v2…
tznind Nov 20, 2024
4cd73c7
WIP output buffer
tznind Nov 21, 2024
eb61350
Merge branch 'v2_develop' into v2-drivers
tznind Nov 22, 2024
0655f0d
WIP try to exercise new buffer for hello world
tznind Nov 22, 2024
15c9c07
Merge branch 'v2-drivers' of https://github.com/tznind/gui.cs into v2…
tznind Nov 22, 2024
aaef87d
Hello world appeared!
tznind Nov 22, 2024
ea3468e
Rainbows!
tznind Nov 22, 2024
d98a841
suppress suspicious check
tznind Nov 22, 2024
584a2ab
Add props and random render for fun
tznind Nov 22, 2024
c6b9c28
Starting on input processing
tznind Nov 22, 2024
6124deb
WIP : mouse support
tznind Nov 23, 2024
9f6e23a
Fix not reseting state after releasing mouse events
tznind Nov 23, 2024
24c2a5a
Refactor InputProcessor to be abstract with typed inheritors
tznind Nov 23, 2024
4c63297
WindowsOutput and InputProcessor working ish
tznind Nov 23, 2024
485be29
Add window size support
tznind Nov 23, 2024
d081b4d
Fix WindowsInputProcessor to handle mouse properly
tznind Nov 23, 2024
be8c339
Merge branch 'v2_develop' into v2-drivers
tznind Nov 23, 2024
a066f23
Merge branch 'v2_develop' into v2-drivers
tznind Nov 24, 2024
5e202b0
Add IConsoleDriver
tznind Nov 24, 2024
ee335bd
WIP: trying to implement IConsoleDriver facade
tznind Nov 24, 2024
90b5836
WIP Implement more of facade
tznind Nov 24, 2024
68f39a8
Building with new facacde
tznind Nov 25, 2024
e46b2a5
Tests passing
tznind Nov 25, 2024
02d1a7c
Set Application.Driver to facade when building main loop via coordinator
tznind Nov 25, 2024
d0ae141
Start working towards integrating View/Application with v2
tznind Nov 25, 2024
f1f9c95
Add key up and mouse handler
tznind Nov 25, 2024
e7b40a3
Update class diagram to show scheduler and facade
tznind Nov 25, 2024
04c467e
WIP mouse state machine - commented out for now
tznind Nov 25, 2024
12edf58
Merge branch 'v2_develop' into v2-drivers
tznind Nov 26, 2024
231270d
Click event getting raised
tznind Nov 26, 2024
27165e9
Merge branch 'v2-drivers' of https://github.com/tznind/gui.cs into v2…
tznind Nov 26, 2024
e9b8264
Working on hit tracking
tznind Nov 26, 2024
0fd0f15
Ability to switch focus
tznind Nov 26, 2024
7dead87
Update class diagram
tznind Nov 26, 2024
1214a96
merge ansi-parser into branch
tznind Nov 28, 2024
f280048
fix for 0 based seq
tznind Nov 28, 2024
59a7479
Update class diagram
tznind Nov 28, 2024
889e426
Update class diagram
tznind Nov 28, 2024
d91a87f
Merge branch 'ansi-parser' into v2-drivers
tznind Dec 3, 2024
e2fd4fe
More conservative version of IApplication
tznind Dec 3, 2024
cd65e0d
Add ChangeInstance method
tznind Dec 3, 2024
0592f5f
Merge branch 'iapplication-2' into v2-drivers
tznind Dec 3, 2024
b504e0f
WIP: how to create a v2 application
tznind Dec 3, 2024
280f288
WIP net driver working for Top (but not subviews)
tznind Dec 6, 2024
3785171
Merge branch 'v2_develop' into v2-drivers
tznind Dec 6, 2024
d418847
Add RequestStop to IApplication
tznind Dec 6, 2024
4fe25e3
Add IsLegacy field to IApplication so we can turn off janky code in a…
tznind Dec 7, 2024
3a09c2f
WIP trying to get exit to work
tznind Dec 7, 2024
9744041
Update class diagram
tznind Dec 7, 2024
ede6b43
Merge branch 'v2_develop' into v2-drivers
tznind Dec 7, 2024
2360ed8
WIP can exit with 2x Esc (bug) and can open scenario
tznind Dec 7, 2024
9007caa
Merge branch 'v2-drivers' of https://github.com/tznind/gui.cs into v2…
tznind Dec 7, 2024
d8ac1c4
Can switch between apps but have lost keybindings somehow
tznind Dec 7, 2024
f2497ef
Add esc timeout into InputProcessor
tznind Dec 7, 2024
8405ef1
Fix event wiring
tznind Dec 7, 2024
d0dd43a
Move Idles/Timeouts into their own self contained class TimedEvents b…
tznind Dec 7, 2024
634693a
WIP try to resolve the fact that timeouts/locks are deadlock city
tznind Dec 7, 2024
00990ba
Revert "WIP try to resolve the fact that timeouts/locks are deadlock …
tznind Dec 8, 2024
4482c21
Fix reverted TimedEvents to operate the same as before - we can refac…
tznind Dec 8, 2024
3ea02ca
V2 TimedEvents support
tznind Dec 8, 2024
2650e36
Add timed events to class diagram
tznind Dec 8, 2024
be7d8df
WIP: Trying to get windows driver to work
tznind Dec 8, 2024
cea3e77
WIP WindowsConsole / WindowsOutput
tznind Dec 8, 2024
9a72628
Make input infinite thread in WindowsConsole constructor optional
tznind Dec 9, 2024
25968c1
Remove dependency on WindowsConsole
tznind Dec 11, 2024
ac58ed1
Fledgling mouse support for windows input
tznind Dec 11, 2024
da533f1
Merge branch 'v2_develop' into v2-drivers
tznind Dec 11, 2024
4c667f3
Fix for new names
tznind Dec 11, 2024
650a075
Use LayoutAndDraw on iteration
tznind Dec 14, 2024
a1dcb08
How we would like draw loop to be
tznind Dec 14, 2024
6d4f6c0
Menu working
tznind Dec 14, 2024
adceea8
Revert removal of Suspend
tznind Dec 14, 2024
128b219
Revert changes to PositionCursor
tznind Dec 14, 2024
32aa24b
Revert lots of little changes to accessibility etc in main codebase
tznind Dec 14, 2024
e832d61
Remove debug only reference
tznind Dec 14, 2024
293fe4e
Do not deadlock in Stop if invoked
tznind Dec 14, 2024
f0a5e04
Support specify v2net or v2win
tznind Dec 14, 2024
13de24b
Update launch settings for new v2 options
tznind Dec 14, 2024
124ab9a
Move v2 driver bootstrap logic into Application and out of UICatalog
tznind Dec 15, 2024
74dc894
Add IWindowSizeMonitor
tznind Dec 15, 2024
c31d11d
Make sleep wait in input loop conditional
tznind Dec 15, 2024
c01f974
Create first test for Application2
tznind Dec 15, 2024
55fb132
Add shutdown call
tznind Dec 15, 2024
8216597
Allow DI of input/output
tznind Dec 15, 2024
ba09cd2
Fix wrong lock in TimedEvents
tznind Dec 15, 2024
52a0dec
tests for AnsiResponseParser HandleMouse
tznind Dec 16, 2024
e0f6643
Switch to established method EscSeqUtils.MapKey
tznind Dec 16, 2024
efd6b97
ConsoleInput test
tznind Dec 16, 2024
0a0da59
Add try/catch for the two main loops
tznind Dec 19, 2024
2e35203
Make MainLoop<T> execute as part of Application2.Run instead of in it…
tznind Dec 20, 2024
7dacacc
Add clipboards
tznind Dec 21, 2024
c6e96dc
Simplify branching structure of clipboard construction
tznind Dec 21, 2024
4354712
Add mouse button narratives for all buttons not just 1
tznind Dec 21, 2024
83b60d2
Refactor MouseInterpreter
tznind Dec 22, 2024
151f528
Add logging to Terminal.Gui
tznind Dec 26, 2024
e4d07d5
Change to DiagnosticSource for metrics
tznind Dec 26, 2024
7327a86
Switch to Meter and Histogram for metrics
tznind Dec 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update class diagram
  • Loading branch information
tznind committed Nov 28, 2024
commit 889e4268d8557c3faf3a6b8b3f8041ab7423b40a
62 changes: 44 additions & 18 deletions Terminal.Gui/ConsoleDrivers/V2/V2.cd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 16,7 @@
<Position X="18.458" Y="3.562" Height="0.396" Width="2.825" />
</Comment>
<Comment CommentText="Mouse interpretation subsystem">
<Position X="16.125" Y="8.833" Height="0.396" Width="2.825" />
<Position X="12.625" Y="9.833" Height="0.396" Width="2.825" />
</Comment>
<Class Name="Terminal.Gui.WindowsInput" Collapsed="true">
<Position X="10.5" Y="3" Width="1.75" />
Expand Down Expand Up @@ -74,7 74,7 @@
<Lollipop Position="0.2" />
</Class>
<Class Name="Terminal.Gui.AnsiResponseParser&lt;T&gt;" Collapsed="true">
<Position X="19.5" Y="7.75" Width="2" />
<Position X="18.75" Y="10" Width="2" />
<TypeIdentifier>
<HashCode>AAQAAAAAAAAACIAAAAAAAAAAAAAgAABAAAAAABAAAAA=</HashCode>
<FileName>ConsoleDrivers\AnsiResponseParser\AnsiResponseParser.cs</FileName>
Expand Down Expand Up @@ -116,8 116,10 @@
<Point X="18.125" Y="5.031" />
<Point X="18.125" Y="5.5" />
<Point X="19" Y="5.5" />
<Point X="19" Y="8" />
<Point X="19.5" Y="8" />
<Point X="19" Y="9.75" />
<Point X="18.5" Y="9.75" />
<Point X="18.5" Y="10.25" />
<Point X="18.75" Y="10.25" />
</Path>
</AssociationLine>
<TypeIdentifier>
Expand All @@ -143,8 145,8 @@
<FileName>ConsoleDrivers\V2\WindowsInputProcessor.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Terminal.Gui.AnsiMouseParser" Collapsed="true">
<Position X="22.5" Y="9.25" Width="1.5" />
<Class Name="Terminal.Gui.AnsiMouseParser">
<Position X="23.5" Y="9" Width="1.75" />
<TypeIdentifier>
<HashCode>BAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAA=</HashCode>
<FileName>ConsoleDrivers\AnsiResponseParser\AnsiMouseParser.cs</FileName>
Expand Down Expand Up @@ -173,7 175,7 @@
</ShowAsCollectionAssociation>
</Class>
<Class Name="Terminal.Gui.AnsiResponseParserBase" Collapsed="true">
<Position X="19.5" Y="7" Width="2" />
<Position X="19.5" Y="9" Width="2" />
<TypeIdentifier>
<HashCode>UACASAAAEICQALAAQAAACAAAIAIAAABAAQIAJgAQACQ=</HashCode>
<FileName>ConsoleDrivers\AnsiResponseParser\AnsiResponseParser.cs</FileName>
Expand All @@ -185,7 187,7 @@
<Lollipop Position="0.2" />
</Class>
<Class Name="Terminal.Gui.MouseInterpreter">
<Position X="16.25" Y="9.5" Width="1.5" />
<Position X="12.75" Y="10.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAQAAAAAAAABAAIAAkAAACAAICgIAAAAAABAAAAAAgA=</HashCode>
<FileName>ConsoleDrivers\V2\MouseState.cs</FileName>
Expand All @@ -198,7 200,7 @@
</ShowAsCollectionAssociation>
</Class>
<Class Name="Terminal.Gui.ButtonNarrative">
<Position X="19.25" Y="11" Width="1.5" />
<Position X="15.75" Y="12" Width="1.5" />
<TypeIdentifier>
<HashCode>IAAAAAAAAAAAAAAAAgAAAAAAICAAAAQAAAAAAAAAAAA=</HashCode>
<FileName>ConsoleDrivers\V2\MouseState.cs</FileName>
Expand All @@ -211,22 213,22 @@
</ShowAsCollectionAssociation>
</Class>
<Class Name="Terminal.Gui.ButtonState">
<Position X="22" Y="11" Width="1.5" />
<Position X="18.5" Y="12" Width="1.5" />
<TypeIdentifier>
<HashCode>AEAAAAAAAAAAAAggAAAAAAAAAACJAAAAAoAAAAAEAAA=</HashCode>
<FileName>ConsoleDrivers\V2\MouseState.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Terminal.Gui.StringHeld" Collapsed="true">
<Position X="22.5" Y="8.5" Width="1.5" />
<Position X="21" Y="11" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAIAACAAAAAAAIAAAAAAAACAAAAAAAgAAAA=</HashCode>
<FileName>ConsoleDrivers\AnsiResponseParser\StringHeld.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="Terminal.Gui.GenericHeld&lt;T&gt;" Collapsed="true">
<Position X="24" Y="8.5" Width="1.5" />
<Position X="19.25" Y="11" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAgAIAACAAAAAAAIAAAAAAAACAAAAAAAAAAAA=</HashCode>
<FileName>ConsoleDrivers\AnsiResponseParser\GenericHeld.cs</FileName>
Expand All @@ -247,6 249,13 @@
<FileName>ConsoleDrivers\AnsiEscapeSequence.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Terminal.Gui.AnsiResponseParser" Collapsed="true">
<Position X="20.75" Y="10" Width="1.75" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAgACBAAAAAABAAAAA=</HashCode>
<FileName>ConsoleDrivers\AnsiResponseParser\AnsiResponseParser.cs</FileName>
</TypeIdentifier>
</Class>
<Interface Name="Terminal.Gui.IConsoleInput&lt;T&gt;" Collapsed="true">
<Position X="11.5" Y="1" Width="1.5" />
<TypeIdentifier>
Expand Down Expand Up @@ -280,11 289,11 @@
<AssociationLine Name="MouseInterpreter" Type="Terminal.Gui.MouseInterpreter" ManuallyRouted="true" FixedFromPoint="true" FixedToPoint="true">
<Path>
<Point X="14.5" Y="6.875" />
<Point X="14.62" Y="6.875" />
<Point X="14.62" Y="7.953" />
<Point X="15.807" Y="7.953" />
<Point X="15.807" Y="11.143" />
<Point X="16.25" Y="11.143" />
<Point X="15.5" Y="6.875" />
<Point X="15.5" Y="10.125" />
<Point X="12.375" Y="10.125" />
<Point X="12.375" Y="12.143" />
<Point X="12.75" Y="12.143" />
</Path>
<MemberNameLabel ManuallyPlaced="true">
<Position X="0.123" Y="0.152" />
Expand All @@ -299,7 308,7 @@
</ShowAsAssociation>
</Interface>
<Interface Name="Terminal.Gui.ConsoleDrivers.V2.IViewFinder">
<Position X="19.25" Y="9.25" Width="1.5" />
<Position X="15.75" Y="10.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>ConsoleDrivers\V2\IViewFinder.cs</FileName>
Expand All @@ -312,5 321,22 @@
<FileName>ConsoleDrivers\AnsiResponseParser\IHeld.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="Terminal.Gui.IAnsiResponseParser">
<Position X="19.5" Y="5.25" Width="2" />
<TypeIdentifier>
<HashCode>AAAAQAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAJAAAAAA=</HashCode>
<FileName>ConsoleDrivers\AnsiResponseParser\IAnsiResponseParser.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="State" />
</ShowAsAssociation>
</Interface>
<Enum Name="Terminal.Gui.AnsiResponseParserState">
<Position X="19.5" Y="7.25" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAEAAAAAAAAAAAAAAAAAAAAAIAAIAAAAAAAAAAAA=</HashCode>
<FileName>ConsoleDrivers\AnsiResponseParser\AnsiResponseParserState.cs</FileName>
</TypeIdentifier>
</Enum>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>
Loading