mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
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:
parent
ab353fd4e1
commit
38594dde79
12 changed files with 224 additions and 88 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
endpoint FileSystemAccessServer
|
||||
{
|
||||
request_file(String path, Core::OpenMode requested_access) => (i32 error, Optional<IPC::File> fd)
|
||||
prompt_open_file(String path_to_view, Core::OpenMode requested_access) => (i32 error, Optional<IPC::File> fd, Optional<String> chosen_file)
|
||||
prompt_save_file(String title, String ext, String path_to_view, Core::OpenMode requested_access) => (i32 error, Optional<IPC::File> fd, Optional<String> chosen_file)
|
||||
request_file(i32 window_server_client_id, i32 window_id, String path, Core::OpenMode requested_access) =|
|
||||
prompt_open_file(i32 window_server_client_id, i32 window_id, String path_to_view, Core::OpenMode requested_access) =|
|
||||
prompt_save_file(i32 window_server_client_id, i32 window_id,String title, String ext, String path_to_view, Core::OpenMode requested_access) =|
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue