Nathan Sobo
9f6f27f305
Order debug JSON and allow elements to be named; copy to clipboard
2021-04-07 21:54:14 -06:00
Nathan Sobo
cbb23a93a6
Log prettified element debug JSON to on cmd-alt-i
2021-04-07 21:54:14 -06:00
Nathan Sobo
765c3f9c18
Open platform window before first invalidation
...
This ensures we have an invalidation handler present so we render the first frame in all cases.
2021-04-06 09:15:21 -06:00
Nathan Sobo
2970e934da
Use handles to obtain entities in future callbacks
...
This guarantees that the spawning entity will be present and simplifies
the logic for obtaining the entity. Now we can forward the results of spawned futures and streams in the same way regardless of whether what spawned them was a model or a view.
2021-04-05 20:04:04 -06:00
Max Brunsfeld
fda1394057
Rename Task -> EntityTask (a BackgroundTask is just a Task)
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-05 17:03:42 -07:00
Max Brunsfeld
c39c7c3eff
Make background executor available on AppContext
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-05 16:45:55 -07:00
Nathan Sobo
c43d7cfb39
Use a condvar instead of a channel to implement finish_pending_tasks
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-02 13:53:06 -06:00
Nathan Sobo
526a55d0d7
Complete finish_pending_tasks future when tasks are cancelled
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-02 12:42:23 -06:00
Nathan Sobo
2d79193fb6
Remove future/stream handlers when task is dropped
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-02 12:03:35 -06:00
Nathan Sobo
914cf37f37
Remove executor::ForegroundTask wrapper
...
Now that smol returns the same Task as async_task, we can simply re-export the async_task::Task struct from our executor module.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-02 11:02:09 -06:00
Nathan Sobo
d68a747754
Fix hanging finish_pending_tasks test
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-04-02 10:48:03 -06:00
Max Brunsfeld
3bd6b92244
Introduce a GPUI test platform, get most tests running
...
There are still two tests that don't pass:
* `gpui::app::tests::test_finish_pending_tasks` hangs
* `editor::buffer_view::tests::test_fold` has an assertion failure
2021-03-31 17:03:58 -07:00
Antonio Scandurra
0906b2a2f4
Remove unused dependencies and avoid instantiating FontCache in tests
2021-03-25 10:48:32 +01:00
Antonio Scandurra
9178e91cc0
Extract platform-dependant FontSystem
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-03-24 16:51:28 +01:00
Antonio Scandurra
ad7974608b
WIP
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-03-23 19:11:56 +01:00
Nathan Sobo
119aa452b6
Overhaul the entire element system
...
Now the Element trait is designed to be wrapped in a Lifecycle enum that gets placed inside an ElementBox. This allows the framework to store data on behalf of the Element implementation, such as sizes, bounds, and also implementation-specific LayoutState and PaintState types. This makes it easier to reason about which data is available in each Element method.
2021-03-21 20:54:23 -06:00
Nathan Sobo
046fe3fff9
Dispatch keystrokes and fix rerendering when window invalidated
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-03-21 11:38:23 -06:00
Nathan Sobo
f5df3681f8
Add file_finder module
...
Still need to wire up key bindings to make it toggle.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-03-21 10:50:07 -06:00
Nathan Sobo
0c59937a65
Wire up events and fix synthetic dragging
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-03-21 09:44:14 -06:00
Nathan Sobo
e5ffe43bb6
Get basic graphics rendering via Metal
...
Also, handle window resize.
2021-03-20 22:19:26 -06:00
Nathan Sobo
cfe3aae2de
WIP: Get everything compiling again and keep window open
2021-03-19 12:12:10 -06:00
Nathan Sobo
605bdd62dd
WIP: Start on rendering scenes via presenter
2021-03-18 21:33:16 -06:00
Nathan Sobo
e809d6119a
Return tasks from spawn and spawn_stream
...
Also, eliminate the background spawning methods. We can spawn futures
on the executor and then spawn those on the app if we need to wait for
the result of running one.
2021-03-18 20:10:32 -06:00
Nathan Sobo
f849857309
Handle command line arguments and populate worktree
2021-03-18 17:54:35 -06:00
Nathan Sobo
9bab29c72f
Get workspace module in and compiling
2021-03-18 15:52:46 -06:00
Nathan Sobo
23308e17a9
WIP on rebuilding with extracted UI framework
2021-03-18 13:13:31 -06:00
Nathan Sobo
356bc41752
WIP
2021-03-09 21:00:51 -07:00