first pass of merging in warp (doesn't build)

This commit is contained in:
Ryan Ward
2026-07-01 16:08:58 -05:00
parent 2f64909469
commit 4770ac06b5
3662 changed files with 414574 additions and 89772 deletions
+9 -5
View File
@@ -8,10 +8,9 @@ use pathfinder_geometry::rect::RectF;
pub use state::{State, StateEvent, WindowManager};
pub use system::{CreateWindowingSystemError, System};
use crate::{
actions::StandardAction, platform::WindowContext, AppContext, AppContextRefMut, CursorInfo,
Event, Scene,
};
use crate::actions::StandardAction;
use crate::platform::WindowContext;
use crate::{AppContext, AppContextRefMut, CursorInfo, Event, Scene};
/// Result of dispatching an event through the UI framework.
#[derive(Debug, Clone, Copy, Default)]
@@ -100,7 +99,12 @@ impl<'a> WindowCallbackDispatcher<'a> {
// support application menus, so these never get called.
// TODO(CORE-2691): implement native Windows OS app menus
#[cfg_attr(
any(target_os = "linux", target_os = "windows", target_family = "wasm"),
any(
target_os = "linux",
target_os = "freebsd",
target_os = "windows",
target_family = "wasm"
),
allow(dead_code)
)]
impl WindowCallbackDispatcher<'_> {
+17 -12
View File
@@ -1,18 +1,15 @@
use pathfinder_geometry::rect::RectF;
use std::{
collections::VecDeque,
fmt::{Display, Formatter},
};
use std::collections::VecDeque;
use std::fmt::{Display, Formatter};
use crate::{
geometry,
platform::{self, FullscreenState, TerminationMode, WindowFocusBehavior},
scene::{CornerRadius, Radius},
windowing, DisplayId, DisplayIdx, Entity, ModelContext, OptionalPlatformWindow,
SingletonEntity, WindowId,
};
use pathfinder_geometry::rect::RectF;
use super::WindowCallbacks;
use crate::platform::{self, FullscreenState, TerminationMode, WindowFocusBehavior};
use crate::scene::{CornerRadius, Radius};
use crate::{
geometry, windowing, DisplayId, DisplayIdx, Entity, ModelContext, OptionalPlatformWindow,
SingletonEntity, WindowId,
};
/// Description of the current stage in the lifecycle of the app.
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
@@ -94,6 +91,14 @@ impl WindowManager {
self.platform.set_window_bounds(window_id, bound)
}
/// Sets the per-window opacity, where `1.0` is fully opaque and `0.0` is fully
/// transparent. Cheap alternative to `hide_window` for cases where the window
/// only needs to disappear visually (e.g. tab drag preview) without changing
/// focus, key state, or z-order.
pub fn set_window_alpha(&self, window_id: WindowId, alpha: f32) {
self.platform.set_window_alpha(window_id, alpha)
}
pub fn cancel_synthetic_drag(&self, window_id: WindowId) {
self.platform.cancel_synthetic_drag(window_id)
}