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:
parent
f450692e77
commit
2615a11f7c
73 changed files with 284 additions and 210 deletions
|
@ -1,7 +1,10 @@
|
|||
use context_menu::{ContextMenu, ContextMenuItem};
|
||||
use gpui::{
|
||||
elements::*, impl_internal_actions, AppContext, CursorStyle, Element, ElementBox, Entity,
|
||||
MouseButton, RenderContext, View, ViewContext, ViewHandle, WeakModelHandle, WeakViewHandle,
|
||||
elements::*,
|
||||
impl_internal_actions,
|
||||
platform::{CursorStyle, MouseButton},
|
||||
AppContext, Element, ElementBox, Entity, RenderContext, View, ViewContext, ViewHandle,
|
||||
WeakModelHandle, WeakViewHandle,
|
||||
};
|
||||
use settings::Settings;
|
||||
use std::any::TypeId;
|
||||
|
|
|
@ -7,10 +7,11 @@ use gpui::{
|
|||
rect::RectF,
|
||||
vector::{vec2f, Vector2F},
|
||||
},
|
||||
platform::{CursorStyle, MouseButton},
|
||||
serde_json::json,
|
||||
text_layout::{Line, RunStyle},
|
||||
Element, ElementBox, EventContext, FontCache, ModelContext, MouseButton, MouseRegion,
|
||||
PaintContext, Quad, SizeConstraint, TextLayoutCache, WeakModelHandle, WeakViewHandle,
|
||||
Element, ElementBox, EventContext, FontCache, ModelContext, MouseRegion, PaintContext, Quad,
|
||||
SizeConstraint, TextLayoutCache, WeakModelHandle, WeakViewHandle,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use language::CursorShape;
|
||||
|
@ -735,9 +736,9 @@ impl Element for TerminalElement {
|
|||
cx.scene.push_cursor_region(gpui::CursorRegion {
|
||||
bounds,
|
||||
style: if layout.hyperlink_tooltip.is_some() {
|
||||
gpui::CursorStyle::PointingHand
|
||||
CursorStyle::PointingHand
|
||||
} else {
|
||||
gpui::CursorStyle::IBeam
|
||||
CursorStyle::IBeam
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ use gpui::{
|
|||
geometry::vector::Vector2F,
|
||||
impl_actions, impl_internal_actions,
|
||||
keymap_matcher::{KeymapContext, Keystroke},
|
||||
platform::KeyDownEvent,
|
||||
AnyViewHandle, AppContext, Element, ElementBox, Entity, ModelHandle, Task, View, ViewContext,
|
||||
ViewHandle, WeakViewHandle,
|
||||
};
|
||||
|
@ -425,7 +426,7 @@ impl View for TerminalView {
|
|||
cx.notify();
|
||||
}
|
||||
|
||||
fn key_down(&mut self, event: &gpui::KeyDownEvent, cx: &mut ViewContext<Self>) -> bool {
|
||||
fn key_down(&mut self, event: &KeyDownEvent, cx: &mut ViewContext<Self>) -> bool {
|
||||
self.clear_bel(cx);
|
||||
self.pause_cursor_blinking(cx);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue