Tobias Hunger
04738a900f
Janitor: Fix clippy::map_clone
2021-08-04 22:50:35 +02:00
Tobias Hunger
24a2021226
Janitor: Fix clippy::needless_borrow
2021-08-04 22:50:35 +02:00
Simon Hausmann
29f5853332
Provide sixtyfps::Window
by reference in the Rust API
...
This also removes Clone from the Window again, to avoid having to face
the question: Does cloning a window duplicate it on the screen?
2021-08-03 10:32:04 +02:00
Tobias Hunger
27b42687fa
Janitor: Fix clippy::redundant_closure
2021-07-23 13:48:52 +02:00
Tobias Hunger
4bd8920ac4
Janitor: Fix clippy::declare_interior_mutable_const
2021-07-21 19:44:57 +02:00
Tobias Hunger
dc51d4ccda
Use impl Default
instead of new()
constructors
2021-07-12 13:22:25 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Simon Hausmann
cec7dde6e6
Small typo fixes
2021-06-30 16:12:39 +02:00
Olivier Goffart
ffb0a9881b
Add command line arguments to the LSP
...
To set the include path, the style, or the backend
2021-06-09 17:15:49 +02:00
Olivier Goffart
6c1aa9bd8f
Add a pass to always have the top level as a Window
2021-06-09 11:02:55 +02:00
Olivier Goffart
1c505edd09
Revert the change to depends on the public crate from our tools
...
We should probablt re-ecport the function from the interpreter, but one
shouldn't depends both on sixtyfps and sixtyfps-interpreter at the same
time
2021-05-25 15:53:49 +02:00
Simon Hausmann
73f647c2e1
Add the Rust equivalent of sixtyfps::invoke_from_event_loop
...
The same API exists in C++.
2021-05-25 15:53:49 +02:00
Olivier Goffart
8ecc834333
LSP: forward the diagnostic from the preview to the editor
...
Because the preview might have more diagnostics.
2021-05-18 16:12:30 +02:00
Olivier Goffart
c119d28237
LSP: Make sure the sender channel is droped when closing
...
It might keep alive the IO thread otherwise
2021-05-02 15:10:48 +02:00
Olivier Goffart
422ed0b767
LSP preview: fix the Qt preview
...
We can't start sending events from the thread before the QApplication
is properly initialized.
So add a state in the state machine and wait until the event loop is initialized
to send the first event.
2021-04-23 18:04:56 +02:00
Simon Hausmann
d899eaf094
Delay the start of the gui event loop until a preview is requested
...
This is part of #204 and has the additional benefit that at least on macOS
the icon in the dock doesn't appear out of a sudden but only when the user
explicitly requested a preview.
2021-04-23 17:36:11 +02:00
Olivier Goffart
deaaef8cd3
LSP Preview: detect if the component to preview is a Window
...
Then we don't need to wrap Window in Window
2021-04-16 11:34:21 +02:00
Olivier Goffart
5877e75f8f
LSP: fix reloading a specific component
2021-04-16 11:34:21 +02:00
Olivier Goffart
dcedaad402
LSP: Use the same machanism to avoid re-compiling the preview more often than needed
...
Just use an atomic counter to count the number of pending event so that
there is at most one pending event at the time.
2021-04-16 11:34:21 +02:00
Olivier Goffart
bcce36385d
LSP: code action to preview a particular component
2021-04-15 18:55:57 +02:00
Olivier Goffart
9ce63b80b9
VS extension: Add a status bar bar item with status of the preview
2021-04-14 15:01:25 +02:00
Simon Hausmann
5e8b738b70
Don't automatically show the preview window when reloading
...
When the user closes the window explicitly, don't make it suddnely pop up again when editing the .60.
2021-04-09 10:32:03 +02:00
Olivier Goffart
b195f1be96
LSP preview: use the cache from the LSP, and refresh when the content change
2021-04-06 13:18:37 +02:00
Simon Hausmann
af33d439a9
Simplify LSP thread startup
...
After commit 1e4921de13
we don't need wait anymore,
the preview requests themselves will be queued.
2021-04-06 12:44:13 +02:00
Simon Hausmann
1e4921de13
Fix LSP server staying alive when closing preview window
...
* Provide an internal behavior parameter to run_event_loop() that we can use
from the preview to not quit when the last window was closed.
* Fix Drop for the winit event loop GraphicsWindow to drop the backend window correctly
when unmapping, not when the graphics window dies. Otherwise QuitOnLastWindowClosed doesn't work.
2021-04-06 12:11:55 +02:00
Simon Hausmann
b81803774b
Start the LSP thread when the gui thread is ready
...
This way we can serve preview requests immediately.
This basically makes post_event safe to call before the event loop is entered.
The events will be queued up and sent when the event loop
is created and we have access
to the proxy, which will take over the queue.
2021-04-06 11:40:17 +02:00
Simon Hausmann
d9db07db2a
Try to gracefully terminate the LSP server when requested
2021-04-06 11:10:30 +02:00
Simon Hausmann
121a098f74
Fix lsp startup
...
Copy & paste brown paper bag for me for not calling the function :)
2021-04-06 11:05:05 +02:00
Simon Hausmann
9f2924a642
Begin swapping the event loops in the lsp
...
Run the preview in the main thread, as required for winit, and run the LSP
main loop in a secondary thread.
At least three more follow-up changes are needed, but this gets the
preview showing for example on macOS.
2021-04-06 10:40:34 +02:00
Olivier Goffart
309a9274e1
LSP: preview window
...
Currently not yet live preview from the open document content, but that should totaly be doable
2021-04-03 10:00:12 +02:00