Skip to content

Commit 673611f

Browse files
masonry_winit: Depend on masonry_core not masonry (linebender#1148)
Now that we don't use `masonry::theme::default_property_set()` and we have the re-exports in place from `masonry_core`, we can remove our dependency on `masonry` itself.
1 parent 3af4d68 commit 673611f

File tree

7 files changed

+19
-16
lines changed

7 files changed

+19
-16
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

masonry_winit/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
2121
default = []
2222
# Enables tracing using tracy if the default Masonry tracing is used.
2323
# https://github.com/wolfpld/tracy can be connected to when this feature is enabled.
24-
tracy = ["dep:tracing-tracy", "dep:wgpu-profiler", "wgpu-profiler/tracy", "masonry/tracy"]
24+
tracy = ["dep:tracing-tracy", "dep:wgpu-profiler", "wgpu-profiler/tracy", "masonry_core/tracy"]
2525

2626
[dependencies]
27-
masonry.workspace = true
27+
masonry_core.workspace = true
2828
wgpu.workspace = true
2929
winit.workspace = true
3030
tracing = { workspace = true, features = ["default"] }

masonry_winit/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ fn main() {
115115
}
116116
```
117117

118-
For more information, see [the documentation module](masonry::doc).
118+
For more information, see [the Masonry documentation][Masonry].
119119

120120
### Crate feature flags
121121

@@ -132,6 +132,7 @@ Masonry apps currently ship with two debugging features built in:
132132

133133
[winit]: https://crates.io/crates/winit
134134
[Druid]: https://crates.io/crates/druid
135+
[Masonry]: https://docs.rs/masonry
135136
[Xilem]: https://crates.io/crates/xilem
136137
[tracing_tracy]: https://crates.io/crates/tracing-tracy
137138

masonry_winit/src/app_driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use std::hash::Hash;
66
use std::num::NonZeroU64;
77
use std::sync::atomic::{AtomicU64, Ordering};
88

9-
use masonry::app::RenderRoot;
10-
use masonry::core::{Action, Widget, WidgetId, WidgetPod};
9+
use masonry_core::app::RenderRoot;
10+
use masonry_core::core::{Action, Widget, WidgetId, WidgetPod};
1111
use tracing::field::DisplayValue;
1212
use winit::event_loop::ActiveEventLoop;
1313
use winit::window::{Window as WindowHandle, WindowAttributes};

masonry_winit/src/convert_winit_event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// https://github.com/DioxusLabs/blitz/blob/main/packages/blitz-shell/src/convert_events.rs
66
// Should be removed once https://github.com/rust-windowing/winit/pull/4026 is merged.
77

8-
use masonry::core::{Ime, ResizeDirection};
8+
use masonry_core::core::{Ime, ResizeDirection};
99
use winit::event::Ime as WinitIme;
1010
use winit::window::ResizeDirection as WinitResizeDirection;
1111

masonry_winit/src/event_loop_runner.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ use std::sync::mpsc::Sender;
99
use std::sync::{Arc, mpsc};
1010

1111
use accesskit_winit::Adapter;
12-
use masonry::app::{RenderRoot, RenderRootOptions, RenderRootSignal, WindowSizePolicy};
13-
use masonry::core::{DefaultProperties, TextEvent, Widget, WidgetId, WidgetPod, WindowEvent};
14-
use masonry::kurbo::Affine;
15-
use masonry::peniko::Color;
16-
use masonry::util::Instant;
17-
use masonry::vello::util::{RenderContext, RenderSurface};
18-
use masonry::vello::{AaConfig, AaSupport, RenderParams, Renderer, RendererOptions, Scene};
12+
use masonry_core::app::{RenderRoot, RenderRootOptions, RenderRootSignal, WindowSizePolicy};
13+
use masonry_core::core::{DefaultProperties, TextEvent, Widget, WidgetId, WidgetPod, WindowEvent};
14+
use masonry_core::kurbo::Affine;
15+
use masonry_core::peniko::Color;
16+
use masonry_core::util::Instant;
17+
use masonry_core::vello::util::{RenderContext, RenderSurface};
18+
use masonry_core::vello::{AaConfig, AaSupport, RenderParams, Renderer, RendererOptions, Scene};
1919
use tracing::{debug, error, info, info_span};
2020
use ui_events_winit::{WindowEventReducer, WindowEventTranslation};
2121
use wgpu::PresentMode;
@@ -32,7 +32,7 @@ use crate::app_driver::WindowId;
3232
pub enum MasonryUserEvent {
3333
AccessKit(HandleId, accesskit_winit::WindowEvent),
3434
// TODO: A more considered design here
35-
Action(WindowId, masonry::core::Action, WidgetId),
35+
Action(WindowId, masonry_core::core::Action, WidgetId),
3636
}
3737

3838
impl From<accesskit_winit::Event> for MasonryUserEvent {
@@ -177,7 +177,7 @@ pub fn run_with(
177177
// already been set, we get an error which we swallow.
178178
// By now, we're about to take control of the event loop. The user is unlikely
179179
// to try to set their own subscriber once the event loop has started.
180-
let _ = masonry::app::try_init_tracing();
180+
let _ = masonry_core::app::try_init_tracing();
181181

182182
let mut main_state = MainState {
183183
masonry_state: MasonryState::new(event_loop.create_proxy(), windows, default_properties),

masonry_winit/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
//! }
9494
//! ```
9595
//!
96-
//! For more information, see [the documentation module](masonry::doc).
96+
//! For more information, see [the Masonry documentation][Masonry].
9797
//!
9898
//! ### Crate feature flags
9999
//!
@@ -110,6 +110,7 @@
110110
//!
111111
//! [winit]: https://crates.io/crates/winit
112112
//! [Druid]: https://crates.io/crates/druid
113+
//! [Masonry]: https://docs.rs/masonry
113114
//! [Xilem]: https://crates.io/crates/xilem
114115
//! [tracing_tracy]: https://crates.io/crates/tracing-tracy
115116
// TODO: Add screenshot. This can't use include_screenshot as that doesn't work with cargo-rdme

0 commit comments

Comments
 (0)