FileSystemAccessServer+TextEditor: Implement cross-process modal prompts

This transitions from synchronous IPC calls to asynchronous IPC calls
provided through a synchronous interface in LibFileSystemAccessClient
which allows the parent Application to stay responsive.

It achieves this with Promise which is pumping the Application event
loop while waiting for the Dialog to respond with the user's action.

LibFileSystemAccessClient provides a lazy singleton which also ensures
that FileSystemAccessServer is running in the event of a crash.

This also transitions TextEditor into using LibFileSystemAccessClient.
This commit is contained in:
Timothy 2021-07-12 01:16:26 +10:00 committed by Andreas Kling
commit 38594dde79
Notes: sideshowbarker 2024-07-18 08:49:45 +09:00
12 changed files with 224 additions and 88 deletions

View file

@ -1,3 +1,4 @@
endpoint FileSystemAccessClient
{
handle_prompt_end(i32 error, Optional<IPC::File> fd, Optional<String> chosen_file) =|
}