Tobias Hunger
88cf874d03
API cleanup: Rename create_window to create_window_adapter
2022-08-29 16:53:47 +02:00
Tobias Hunger
1e6ffeaa0f
API cleanup: Rename PlatformWindow to WindowAdapter
2022-08-29 16:53:47 +02:00
Tobias Hunger
53053683a1
API cleanup: Rename PlatformAbstraction to Platform
2022-08-29 13:26:36 +02:00
Tobias Hunger
3557e92a84
API cleanup: Fix typos in comments/documentation
2022-08-29 13:26:36 +02:00
Olivier Goffart
13c9c3bbab
Re-export the platform module as public api in slint::platform
...
Tweek some documentation
2022-08-24 14:28:51 +02:00
Olivier Goffart
dbd9f00c71
Don't call invoke_from_event_loop in doctests
...
The test backend can no longer support this.
Because Tests might be called from different thread and the backend with
an event loop can only be set on one thread. So the test backend can't
implement new_event_loop_proxy()
2022-08-24 11:32:21 +02:00
Olivier Goffart
7417422e3c
Make the PlatformAbstraction not Send using a EventLoopProxy trait
...
This changes the way the platform abstraction is initialized
2022-08-24 11:32:21 +02:00
Olivier Goffart
2e5ab86bea
Rename backend module to platform
...
and the Backend trait into PlatfromAbstraction trait
2022-08-23 19:39:49 +02:00
Olivier Goffart
a326844948
Move the has_active_animation to the window
2022-08-22 14:41:50 +02:00
Simon Hausmann
af86f36157
Invert slint: 🪟 :WindowInner and PlatformWindow ownership
...
Previously: Window is an Rc<WindowInner>, which has an Rc<dyn
PLatformWindow> - and weak references the other way around.
Now: Rc<dyn PlatformWindow> is the root of window ownership. The impl
PlatformWindow has a slint::api::Window, which just holds a WindowInner.
This change is incomplete on a few levels, mainly that neither of the
code generators nor the interpreter is ported.
2022-08-19 15:07:27 +02:00
Olivier Goffart
02c60e5389
Refactor the way the backend sets the window size
2022-08-18 09:39:25 +02:00
Olivier Goffart
16985a349d
Add dispatch_pointer_event to the public API
2022-08-17 18:28:12 +02:00
Simon Hausmann
351a1b6448
Move set_rendering_notifier from the (to be public) PlatformWindow to the (private) Renderer trait
2022-08-10 13:07:07 +02:00
Simon Hausmann
0ee361d994
winit: Remove unused existing_size field
...
This field duplicates the winit window's inner size. It is set on a
WindowEvent::Resized(), after which
`winit:🪟 :Window::inner_size()` returns the same value.
2022-08-09 13:16:52 +02:00
Olivier Goffart
29404e3f2c
Rename i_slint_core:
🪟 :Window into WindowInner
...
We already have `api::Window` and also the Window element (`WindowItem`),
So rename the inner part to avoid confusion
2022-07-22 18:12:00 +02:00
Simon Hausmann
937c37677e
Add API for setting and getting the size of a Window in Rust and C++
2022-07-08 18:37:01 +02:00
Simon Hausmann
3ce9977f0a
Add slint::Window::(set_)position
...
Fixes #323
2022-07-08 18:37:01 +02:00
Olivier Goffart
ca5151de11
C++: implement Window::on_close_requested
2022-03-17 14:49:12 +01:00
Lukas Jung
9a0f67575b
remove redundant sentence in doc for on_close_requested()
...
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
2022-03-17 08:51:00 +01:00
Lukas Jung
e6b39aea40
remove unnecessary derive macros from CloseRequestResponse
2022-03-17 08:51:00 +01:00
Lukas Jung
0046c1a754
run rustfmt on api.rs and window.rs
2022-03-17 08:51:00 +01:00
Lukas Jung
17066615bb
remove mut from on_close_requested() to remove warning
2022-03-17 08:51:00 +01:00
Lukas Jung
3ce937f4df
Add documentation to functions for close callback handling
2022-03-17 08:51:00 +01:00
Lukas Jung
a7e798842a
add close_requested() closure and request_close() function to Window
2022-03-17 08:51:00 +01:00
Olivier Goffart
7a7a21ca54
Fix build with no_std
2022-02-14 16:21:31 +01:00
Olivier Goffart
3d209287c2
Docs: add a note that only exported global from the main file are exposed
2022-02-09 14:49:20 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
...
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Simon Hausmann
034804d2e5
janitor: Fix doc link to slint::Window
...
For the RenderingState we can't use the same trick as the same doc is also used for C++ :-(
2022-02-08 10:24:05 +01:00
Olivier Goffart
91e107150e
Merge remote-tracking branch 'origin/wip/rename'
...
Conflicts:
examples/opengl_underlay/index.html
examples/opengl_underlay/main.cpp
2022-02-08 07:29:41 +01:00
Simon Hausmann
2d14da2a43
Fix GL example not updating on Windows
...
The winit event loop needs a similar Poll nudge as for wasm in order for request_redraw() to work :-(
2022-02-07 17:49:11 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
...
The README.md contains the warning that used to be in lib.rs.
Add README.md files to all internal crates
... pointing to the official public crate to use instead.
Rename internal crates
fixup: README files
fixup rename
2022-02-07 13:12:48 +01:00
Olivier Goffart
4115af88bd
Fixup previous merge
2022-02-04 17:43:15 +01:00
Simon Hausmann
125b90a64b
Merge remote-tracking branch 'origin/master' into wip/rename
...
Conflicts:
api/cpp/cbindgen.rs
api/cpp/include/slint.h
examples/CMakeLists.txt
examples/imagefilter/Cargo.toml
examples/plotter/main.rs
internal/backends/mcu/lib.rs
2022-02-04 16:47:20 +01:00
Simon Hausmann
18bba6ede4
Add sixtyfps::Window::request_redraw()
...
This allows scheduling a redraw of a Window explicitly. Unfortunately it
comes with a winit caveat :(
2022-02-04 15:41:53 +01:00
Simon Hausmann
8959eac3d0
Add rendering callbacks to sixtyfps::Window
...
This API allows specifying a callback that will be invoked when setting
up graphics (great for compiling shaders), before rendering a frame (but
after the clearning of the surface background), after rendering a frame
(before swapbuffers) and when releasing graphics resources.
2022-02-04 15:41:53 +01:00
Tobias Hunger
2b55c488ca
Rename sixtyfps to slint in internal
2022-02-02 16:16:55 +01:00
Tobias Hunger
cc3994b58d
Rename rust API
2022-02-02 13:26:35 +01:00
Tobias Hunger
ee5ae56c4a
Move api/sixtyfps-rs to api/rs/slint (no crate rename!)
2022-02-02 13:26:34 +01:00
Olivier Goffart
03534039d6
Replace more .60 by .slint
...
Mainly an automated change with
git grep -O"sed -i 's/\.60/.slint/g'" -w "\.60"
and some manual checks
2022-02-02 10:12:31 +01:00
Simon Hausmann
2f73a27635
Rename the sixtyfps-interpreter crate
2022-02-01 18:11:25 +01:00
Simon Hausmann
9494068201
Rename the sixtyfps-rendering-backend-selector crate
2022-02-01 18:06:49 +01:00
Tobias Hunger
e6b24bceec
[reorg]: Set up and populate the internal
directory
...
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.
pre-commit applied some cleanups to the moved files:
- Consistent newline at end of file policy
- trimming trailing whitespace
- Formatting Cargo.toml files.
2022-01-31 16:00:50 +01:00