Don't export platform::* from gpui

I'd like to avoid cluttering the top-level namespace with all the platform-
specific types.
This commit is contained in:
Nathan Sobo 2023-04-07 11:41:39 -06:00
parent f450692e77
commit 2615a11f7c
73 changed files with 284 additions and 210 deletions

View file

@ -8,7 +8,8 @@ use futures::StreamExt;
use gpui::{
elements::*,
geometry::{rect::RectF, vector::vec2f},
AppContext, Entity, MouseButton, RenderContext, Task, View, ViewContext,
platform::MouseButton,
AppContext, Entity, RenderContext, Task, View, ViewContext,
};
use settings::Settings;
use smallvec::SmallVec;
@ -75,7 +76,7 @@ impl View for SharedScreen {
vec2f(frame.width() as f32, frame.height() as f32),
);
let origin = bounds.origin() + (bounds.size() / 2.) - size / 2.;
cx.scene.push_surface(gpui::mac::Surface {
cx.scene.push_surface(gpui::platform::mac::Surface {
bounds: RectF::new(origin, size),
image_buffer: frame.image(),
});