Fix cursor focus and selection in input box, add AWS env var warning box, and remove AWS Bedrock login banner
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use instant::Instant;
|
||||
use galaxyui::assets::asset_cache::AssetSource;
|
||||
use galaxyui::elements::{
|
||||
CacheOption, ConstrainedBox, CrossAxisAlignment, Flex, Image, ParentElement, Shrinkable, Stack,
|
||||
};
|
||||
use galaxyui::{AppContext, Element, Entity, TypedActionView, View};
|
||||
use instant::Instant;
|
||||
|
||||
pub struct RootView {
|
||||
animation_start_time: Instant,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::{
|
||||
Align, Border, ChildView, Container, CornerRadius, DispatchEventResult, EventHandler, Flex,
|
||||
ParentElement, Radius, Rect, Stack, Text,
|
||||
@@ -8,6 +7,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, ModelHandle, SingletonEntity, Tracked, TypedActionView, View,
|
||||
ViewContext, ViewHandle,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
pub fn init(ctx: &mut AppContext) {
|
||||
ctx.add_singleton_model(|_| Settings {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use galaxyui::{elements::Rect, AppContext, Element, Entity, TypedActionView, View};
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::Rect;
|
||||
use galaxyui::{AppContext, Element, Entity, TypedActionView, View};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
pub struct BlurredView {}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use std::any::Any;
|
||||
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use galaxyui::elements::{
|
||||
AcceptedByDropTarget, Align, ConstrainedBox, Container, DragAxis, Draggable, DraggableState,
|
||||
DropTarget, DropTargetData, ParentElement, Rect, Stack,
|
||||
};
|
||||
use galaxyui::{AppContext, Element, Entity, TypedActionView, View};
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct RootView {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use galaxyui::{elements::Rect, AppContext, Element, Entity, TypedActionView, View};
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::Rect;
|
||||
use galaxyui::{AppContext, Element, Entity, TypedActionView, View};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
pub struct RootView {}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! A UI sample demonstrating how the SelectableArea element can be used.
|
||||
|
||||
use markdown_parser::{parse_markdown, FormattedTextFragment, FormattedTextLine};
|
||||
use galaxyui::color::ColorU;
|
||||
use galaxyui::elements::{
|
||||
Align, ChildView, ConstrainedBox, Flex, FormattedTextElement, HeadingFontSizeMultipliers,
|
||||
@@ -12,6 +11,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, SingletonEntity as _, TypedActionView, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use markdown_parser::{parse_markdown, FormattedTextFragment, FormattedTextLine};
|
||||
|
||||
pub struct RootView {
|
||||
sub_view: ViewHandle<FormattedTextView>,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
use image::ImageEncoder;
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::{
|
||||
Align, ConstrainedBox, Container, DispatchEventResult, EventHandler, Padding, ParentElement,
|
||||
Rect, Stack, Text,
|
||||
@@ -12,6 +10,8 @@ use galaxyui::platform::CapturedFrame;
|
||||
use galaxyui::{
|
||||
AppContext, Element, Entity, SingletonEntity as _, TypedActionView, View, ViewContext,
|
||||
};
|
||||
use image::ImageEncoder;
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum RootViewAction {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::{
|
||||
CacheOption, ConstrainedBox, Flex, Icon, Image, MainAxisAlignment, MainAxisSize, ParentElement,
|
||||
Rect, Stack,
|
||||
};
|
||||
use galaxyui::{AppContext, Element, Entity, TypedActionView, View};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
pub struct RootView {}
|
||||
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
use galaxyui::elements::new_scrollable::AxisConfiguration;
|
||||
use galaxyui::elements::new_scrollable::ClippedAxisConfiguration;
|
||||
use galaxyui::elements::new_scrollable::DualAxisConfig;
|
||||
use galaxyui::elements::new_scrollable::NewScrollableElement;
|
||||
use galaxyui::elements::new_scrollable::ScrollableAppearance;
|
||||
use galaxyui::elements::new_scrollable::ScrollableAxis;
|
||||
use galaxyui::elements::Axis;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use galaxyui::color::ColorU;
|
||||
use galaxyui::elements::new_scrollable::{
|
||||
AxisConfiguration, ClippedAxisConfiguration, DualAxisConfig, NewScrollableElement,
|
||||
@@ -19,6 +10,8 @@ use galaxyui::elements::{
|
||||
use galaxyui::keymap::FixedBinding;
|
||||
use galaxyui::units::Pixels;
|
||||
use galaxyui::{AppContext, Element, Entity, TypedActionView, View, ViewContext, ViewHandle};
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
|
||||
pub fn init(ctx: &mut AppContext) {
|
||||
use galaxyui::keymap::macros::*;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use std::borrow::Cow;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
pub mod root_view;
|
||||
|
||||
extern crate galaxyui;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use std::borrow::Cow;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
pub mod root_view;
|
||||
|
||||
extern crate galaxyui;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxyui::color::ColorU;
|
||||
use galaxyui::elements::{
|
||||
Align, ConstrainedBox, Container, CornerRadius, DropShadow, Flex, ParentElement, Radius, Rect,
|
||||
Shrinkable,
|
||||
};
|
||||
use galaxyui::{AppContext, Element, Entity, TypedActionView, View};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
pub struct RootView;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use std::borrow::Cow;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
pub mod root_view;
|
||||
|
||||
extern crate galaxyui;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::{Align, Container};
|
||||
use galaxyui::presenter::ChildView;
|
||||
use galaxyui::ui_components::components::{UiComponent, UiComponentStyles};
|
||||
use galaxyui::ui_components::slider::{Slider, SliderStateHandle};
|
||||
use galaxyui::{AppContext, Element, Entity, TypedActionView, View, ViewContext, ViewHandle};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
/// Renders a center-aligned slider component against a black background. When the slider is
|
||||
/// dragged, the updated value is printed to stdout.
|
||||
|
||||
@@ -5,10 +5,9 @@ use pathfinder_geometry::vector::vec2f;
|
||||
pub mod root_view;
|
||||
|
||||
extern crate galaxyui;
|
||||
use galaxyui::{platform, platform::WindowBounds, AssetProvider};
|
||||
use rust_embed::RustEmbed;
|
||||
use galaxyui::platform::WindowBounds;
|
||||
use galaxyui::{platform, AssetProvider};
|
||||
use rust_embed::RustEmbed;
|
||||
|
||||
#[derive(Clone, Copy, RustEmbed)]
|
||||
#[folder = "examples/assets"]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use image::ImageEncoder;
|
||||
use galaxyui::color::ColorU;
|
||||
use galaxyui::elements::{
|
||||
ClippedScrollStateHandle, ClippedScrollable, ConstrainedBox, Container, Empty, Fill, Flex,
|
||||
@@ -16,6 +15,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, SingletonEntity as _, TypedActionView, View, ViewContext,
|
||||
ViewHandle, WindowId,
|
||||
};
|
||||
use image::ImageEncoder;
|
||||
|
||||
use crate::CaptureConfig;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use pathfinder_color::ColorU;
|
||||
use galaxyui::elements::{Align, ConstrainedBox, ParentElement, Rect, Stack, Text};
|
||||
use galaxyui::fonts::FamilyId;
|
||||
use galaxyui::keymap::FixedBinding;
|
||||
@@ -7,6 +6,7 @@ use galaxyui::{
|
||||
AppContext, Element, Entity, SingletonEntity as _, TypedActionView, View, ViewContext,
|
||||
ViewHandle,
|
||||
};
|
||||
use pathfinder_color::ColorU;
|
||||
|
||||
// We could initiate global action and bindings here.
|
||||
pub fn init(ctx: &mut AppContext) {
|
||||
|
||||
@@ -6,8 +6,8 @@ pub mod font_kit;
|
||||
#[path = "text_layout_tests.rs"]
|
||||
mod text_layout_tests;
|
||||
|
||||
pub use galaxyui_core::fonts::*;
|
||||
#[cfg(all(test, target_os = "macos"))]
|
||||
pub(crate) use text_layout_tests::collect_line_caret_position_starts;
|
||||
#[cfg(test)]
|
||||
pub(crate) use text_layout_tests::{collect_glyph_indices, init_fonts};
|
||||
pub use galaxyui_core::fonts::*;
|
||||
|
||||
@@ -5,11 +5,6 @@ use std::path::PathBuf;
|
||||
|
||||
use cocoa::base::id;
|
||||
use futures_util::future::LocalBoxFuture;
|
||||
use objc::runtime::{Object, Sel, BOOL, NO, YES};
|
||||
use objc2::rc::{autoreleasepool, Retained};
|
||||
use objc2::{msg_send, AnyThread, MainThreadMarker};
|
||||
use objc2_app_kit::{NSAlert, NSApplication, NSImage, NSRunningApplication};
|
||||
use objc2_foundation::{NSArray, NSData, NSString, NSUInteger, NSURL};
|
||||
use galaxyui_core::assets::AssetProvider;
|
||||
use galaxyui_core::integration::TestDriver;
|
||||
use galaxyui_core::keymap::{Keystroke, Trigger};
|
||||
@@ -20,6 +15,11 @@ use galaxyui_core::platform::app::{
|
||||
use galaxyui_core::platform::menu::{Menu, MenuBar};
|
||||
use galaxyui_core::platform::{self, FilePickerCallback, SaveFilePickerCallback};
|
||||
use galaxyui_core::{AppContext, Event};
|
||||
use objc::runtime::{Object, Sel, BOOL, NO, YES};
|
||||
use objc2::rc::{autoreleasepool, Retained};
|
||||
use objc2::{msg_send, AnyThread, MainThreadMarker};
|
||||
use objc2_app_kit::{NSAlert, NSApplication, NSImage, NSRunningApplication};
|
||||
use objc2_foundation::{NSArray, NSData, NSString, NSUInteger, NSURL};
|
||||
|
||||
use super::keycode::{Keycode, CMD_KEY, CONTROL_KEY, OPTION_KEY, SHIFT_KEY};
|
||||
use super::menus::{make_dock_menu, make_main_menu};
|
||||
|
||||
@@ -4,10 +4,10 @@ use std::slice;
|
||||
|
||||
use anyhow::Result;
|
||||
use cocoa::base::id;
|
||||
use galaxyui_core::clipboard::{ClipboardContent, ImageData};
|
||||
use objc2::rc::Retained;
|
||||
use objc2_app_kit::{NSPasteboard, NSPasteboardTypeHTML, NSPasteboardTypeString};
|
||||
use objc2_foundation::{ns_string, NSArray, NSData, NSString};
|
||||
use galaxyui_core::clipboard::{ClipboardContent, ImageData};
|
||||
|
||||
extern "C" {
|
||||
fn getFilePathsFromPasteboard() -> id;
|
||||
|
||||
@@ -4,10 +4,6 @@ use std::sync::Arc;
|
||||
|
||||
use anyhow::Result;
|
||||
use cocoa::base::{id, nil, BOOL, NO, YES};
|
||||
use objc2::{msg_send, MainThreadMarker};
|
||||
use objc2_app_kit::{NSApplication, NSCursor, NSRequestUserAttentionType};
|
||||
use objc2_av_foundation::{AVAuthorizationStatus, AVCaptureDevice, AVMediaTypeAudio};
|
||||
use objc2_foundation::NSUInteger;
|
||||
use galaxyui_core::accessibility::AccessibilityContent;
|
||||
use galaxyui_core::clipboard::InMemoryClipboard;
|
||||
use galaxyui_core::keymap::Keystroke;
|
||||
@@ -20,6 +16,10 @@ use galaxyui_core::platform::{
|
||||
SendNotificationErrorCallback, TerminationMode,
|
||||
};
|
||||
use galaxyui_core::{platform, ApplicationBundleInfo, WindowId};
|
||||
use objc2::{msg_send, MainThreadMarker};
|
||||
use objc2_app_kit::{NSApplication, NSCursor, NSRequestUserAttentionType};
|
||||
use objc2_av_foundation::{AVAuthorizationStatus, AVCaptureDevice, AVMediaTypeAudio};
|
||||
use objc2_foundation::NSUInteger;
|
||||
|
||||
use super::app::create_native_platform_modal;
|
||||
use super::keycode::{modifier_code, Keycode};
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use std::ffi::CStr;
|
||||
|
||||
use cocoa::base::id;
|
||||
use objc2_app_kit::{NSEvent, NSEventModifierFlags, NSEventType};
|
||||
use objc2_foundation::NSUInteger;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use galaxyui_core::event::{KeyEventDetails, ModifiersState};
|
||||
use galaxyui_core::keymap::Keystroke;
|
||||
use galaxyui_core::platform::keyboard::{KeyCode, PhysicalKey};
|
||||
use galaxyui_core::Event;
|
||||
use objc2_app_kit::{NSEvent, NSEventModifierFlags, NSEventType};
|
||||
use objc2_foundation::NSUInteger;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use super::keycode::{scancode_to_physicalkey, Keycode};
|
||||
use super::utils::unicode_char_to_key;
|
||||
|
||||
@@ -24,9 +24,9 @@ use font_kit::font::Font;
|
||||
use font_kit::loaders::core_text::NativeFont;
|
||||
use futures::future::BoxFuture;
|
||||
use futures::FutureExt as _;
|
||||
use galaxyui_core::fonts::canvas::RasterFormat;
|
||||
use galaxyui_core::fonts::{
|
||||
canvas::RasterFormat, FamilyId, FontId, FontInfo, GlyphId, Metrics, Properties,
|
||||
RasterizedGlyph, SubpixelAlignment,
|
||||
FamilyId, FontId, FontInfo, GlyphId, Metrics, Properties, RasterizedGlyph, SubpixelAlignment,
|
||||
};
|
||||
use galaxyui_core::platform::{self, FontDB as _, LineStyle, TextLayoutSystem};
|
||||
use galaxyui_core::rendering;
|
||||
|
||||
@@ -2,10 +2,10 @@ use std::slice;
|
||||
|
||||
use cocoa::base::{id, BOOL};
|
||||
use cocoa::foundation::NSUInteger;
|
||||
use objc2::rc::Retained;
|
||||
use objc2_foundation::{NSArray, NSNumber, NSString};
|
||||
use galaxyui_core::keymap::Keystroke;
|
||||
use galaxyui_core::platform::keyboard::{KeyCode, NativeKeyCode, PhysicalKey};
|
||||
use objc2::rc::Retained;
|
||||
use objc2_foundation::{NSArray, NSNumber, NSString};
|
||||
|
||||
// Modifier key mask values for the Carbon API.
|
||||
pub const CMD_KEY: u16 = 256;
|
||||
|
||||
@@ -5,6 +5,12 @@ use std::ffi::c_void;
|
||||
use std::rc::Rc;
|
||||
|
||||
use cocoa::base::{id, nil};
|
||||
use galaxyui_core::actions::StandardAction;
|
||||
use galaxyui_core::keymap::Keystroke;
|
||||
use galaxyui_core::platform::menu::{
|
||||
ItemTriggeredCallback, Menu, MenuBar, MenuItem, MenuItemProperties, MenuItemPropertyChanges,
|
||||
UpdateMenuItemCallback,
|
||||
};
|
||||
use lazy_static::lazy_static;
|
||||
use objc2::rc::{autoreleasepool, Retained};
|
||||
use objc2::runtime::Sel;
|
||||
@@ -20,12 +26,6 @@ use objc2_app_kit::{
|
||||
NSUpArrowFunctionKey,
|
||||
};
|
||||
use objc2_foundation::{ns_string, NSInteger, NSString};
|
||||
use galaxyui_core::actions::StandardAction;
|
||||
use galaxyui_core::keymap::Keystroke;
|
||||
use galaxyui_core::platform::menu::{
|
||||
ItemTriggeredCallback, Menu, MenuBar, MenuItem, MenuItemProperties, MenuItemPropertyChanges,
|
||||
UpdateMenuItemCallback,
|
||||
};
|
||||
|
||||
use super::app::callback_dispatcher;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use chrono::DateTime;
|
||||
use cocoa::base::id;
|
||||
use objc2_foundation::NSUInteger;
|
||||
use galaxyui_core::notification::{
|
||||
NotificationResponse, NotificationSendError, RequestPermissionsOutcome,
|
||||
};
|
||||
use objc2_foundation::NSUInteger;
|
||||
|
||||
use super::utils::nsstring_as_str;
|
||||
|
||||
|
||||
@@ -7,6 +7,11 @@ use std::ptr::NonNull;
|
||||
use std::sync::Once;
|
||||
|
||||
use dispatch2::DispatchData;
|
||||
use galaxyui_core::fonts::{self, canvas, RasterizedGlyph, SubpixelAlignment};
|
||||
use galaxyui_core::platform::CapturedFrame;
|
||||
use galaxyui_core::rendering::texture_cache::TextureCache;
|
||||
use galaxyui_core::rendering::{self};
|
||||
use galaxyui_core::scene::{CornerRadius, GlyphFade, GlyphKey, Icon, Image, Layer, Scene};
|
||||
use objc2::rc::Retained;
|
||||
use objc2::runtime::ProtocolObject;
|
||||
use objc2_foundation::NSString;
|
||||
@@ -22,11 +27,6 @@ use objc2_quartz_core::CAMetalDrawable;
|
||||
use pathfinder_color::{ColorF, ColorU};
|
||||
use pathfinder_geometry::rect::{RectF, RectI};
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use galaxyui_core::fonts::{self, canvas, RasterizedGlyph, SubpixelAlignment};
|
||||
use galaxyui_core::platform::CapturedFrame;
|
||||
use galaxyui_core::rendering::texture_cache::TextureCache;
|
||||
use galaxyui_core::rendering::{self};
|
||||
use galaxyui_core::scene::{CornerRadius, GlyphFade, GlyphKey, Icon, Image, Layer, Scene};
|
||||
|
||||
use super::frame_capture::capture_frame;
|
||||
use crate::platform::mac::rendering::renderer::Device;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use galaxyui_core::rendering;
|
||||
use objc2::runtime::ProtocolObject;
|
||||
use objc2_metal::{MTLDevice, MTLPixelFormat};
|
||||
use galaxyui_core::rendering;
|
||||
|
||||
use crate::platform::mac::rendering::metal::renderer::Renderer;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use objc2::rc::Retained;
|
||||
use objc2::runtime::ProtocolObject;
|
||||
use objc2_app_kit::{NSView, NSWindow};
|
||||
use objc2_metal::MTLDevice;
|
||||
use galaxyui_core::rendering::{
|
||||
GPUBackend, GPUDeviceInfo, GPUDeviceType, GPUPowerPreference, OnGPUDeviceSelected,
|
||||
};
|
||||
use galaxyui_core::{fonts, Scene};
|
||||
use objc2::rc::Retained;
|
||||
use objc2::runtime::ProtocolObject;
|
||||
use objc2_app_kit::{NSView, NSWindow};
|
||||
use objc2_metal::MTLDevice;
|
||||
|
||||
use crate::platform::mac::rendering::is_integrated_gpu;
|
||||
use crate::platform::mac::window::WindowState;
|
||||
|
||||
@@ -27,17 +27,16 @@ use core_text::run::{CTRun, CTRunRef};
|
||||
use core_text::string_attributes::{
|
||||
kCTFontAttributeName, kCTKernAttributeName, kCTParagraphStyleAttributeName,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use ordered_float::OrderedFloat;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use vec1::Vec1;
|
||||
|
||||
use galaxyui_core::fonts::GlyphId;
|
||||
use galaxyui_core::platform::{CapturedFrame, LineStyle};
|
||||
use galaxyui_core::platform::LineStyle;
|
||||
use galaxyui_core::text_layout::{
|
||||
CaretPosition, ClipConfig, Glyph, Line, Run, StyleAndFont, TextAlignment, TextBorder,
|
||||
TextFrame, TextStyle,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use ordered_float::OrderedFloat;
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
use vec1::Vec1;
|
||||
|
||||
use super::fonts::FontDB;
|
||||
use super::utils::{cg_color_to_color_u, color_u_to_cg_color};
|
||||
|
||||
@@ -9,6 +9,18 @@ use std::time::Duration;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use cocoa::base::id;
|
||||
use galaxyui_core::accessibility::AccessibilityContent;
|
||||
use galaxyui_core::actions::StandardAction;
|
||||
use galaxyui_core::event::ModifiersState;
|
||||
use galaxyui_core::platform::{
|
||||
self, file_picker, FilePickerCallback, FilePickerConfiguration, FullscreenState,
|
||||
GraphicsBackend, TerminationMode, WindowBounds, WindowFocusBehavior, WindowOptions,
|
||||
WindowStyle,
|
||||
};
|
||||
use galaxyui_core::r#async::{executor, Timer};
|
||||
use galaxyui_core::rendering::GPUPowerPreference;
|
||||
use galaxyui_core::windowing::WindowCallbacks;
|
||||
use galaxyui_core::{DisplayId, DisplayIdx, Event, OptionalPlatformWindow, Scene, WindowId};
|
||||
use instant::Instant;
|
||||
use num_traits::FromPrimitive;
|
||||
use objc::runtime::Object;
|
||||
@@ -23,18 +35,6 @@ use objc2_metal::{MTLCopyAllDevices, MTLCreateSystemDefaultDevice, MTLDevice};
|
||||
use objc2_quartz_core::CAMetalLayer;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use galaxyui_core::accessibility::AccessibilityContent;
|
||||
use galaxyui_core::actions::StandardAction;
|
||||
use galaxyui_core::event::ModifiersState;
|
||||
use galaxyui_core::platform::{
|
||||
self, file_picker, FilePickerCallback, FilePickerConfiguration, FullscreenState,
|
||||
GraphicsBackend, TerminationMode, WindowBounds, WindowFocusBehavior, WindowOptions,
|
||||
WindowStyle,
|
||||
};
|
||||
use galaxyui_core::r#async::{executor, Timer};
|
||||
use galaxyui_core::rendering::GPUPowerPreference;
|
||||
use galaxyui_core::windowing::WindowCallbacks;
|
||||
use galaxyui_core::{DisplayId, DisplayIdx, Event, OptionalPlatformWindow, Scene, WindowId};
|
||||
|
||||
use super::delegate::DispatchDelegate;
|
||||
use super::rendering::{self, is_integrated_gpu, Device, RendererManager};
|
||||
|
||||
@@ -2,12 +2,12 @@ pub(crate) mod hidden_input;
|
||||
pub(crate) mod mobile_detection;
|
||||
pub(crate) mod soft_keyboard;
|
||||
|
||||
// Re-export the functions from the core crate.
|
||||
pub use galaxyui_core::platform::wasm::*;
|
||||
use gloo::events::{EventListener, EventListenerOptions};
|
||||
pub use hidden_input::{HiddenInput, HiddenInputEvent, InputCallback};
|
||||
pub use mobile_detection::{is_mobile_device, is_mobile_user_agent};
|
||||
pub use soft_keyboard::{SoftKeyboardInput, SoftKeyboardManager, SoftKeyboardState};
|
||||
// Re-export the functions from the core crate.
|
||||
pub use galaxyui_core::platform::wasm::*;
|
||||
use wasm_bindgen::{JsCast, UnwrapThrowExt};
|
||||
|
||||
use super::KEYS_TO_IGNORE;
|
||||
|
||||
@@ -3,9 +3,9 @@ pub(crate) mod glyph_cache;
|
||||
#[cfg(wgpu)]
|
||||
pub mod wgpu;
|
||||
|
||||
pub(crate) use glyph_cache::{GlyphCache, GlyphRasterBoundsFn, RasterizeGlyphFn};
|
||||
pub use galaxyui_core::rendering::*;
|
||||
use galaxyui_core::scene::Dash;
|
||||
pub(crate) use glyph_cache::{GlyphCache, GlyphRasterBoundsFn, RasterizeGlyphFn};
|
||||
|
||||
/// Cache for the result of calling [`is_low_power_gpu_available`], as the
|
||||
/// check can be expensive.
|
||||
|
||||
@@ -295,6 +295,7 @@ impl Pipeline {
|
||||
|
||||
mod shaders {
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
|
||||
use crate::rendering::wgpu::shader_types::{ColorF, Vector4F};
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use std::mem;
|
||||
|
||||
use pathfinder_color::ColorU;
|
||||
use pathfinder_geometry::rect::RectF;
|
||||
|
||||
@@ -95,8 +97,6 @@ impl Vertex {
|
||||
const ATTRIBS: [wgpu::VertexAttribute; 1] = wgpu::vertex_attr_array![0 => Float32x2];
|
||||
|
||||
pub(super) fn desc() -> wgpu::VertexBufferLayout<'static> {
|
||||
use std::mem;
|
||||
|
||||
wgpu::VertexBufferLayout {
|
||||
array_stride: mem::size_of::<Self>() as wgpu::BufferAddress,
|
||||
step_mode: wgpu::VertexStepMode::Vertex,
|
||||
@@ -200,7 +200,6 @@ impl RectData {
|
||||
}
|
||||
|
||||
pub(super) fn desc() -> wgpu::VertexBufferLayout<'static> {
|
||||
|
||||
wgpu::VertexBufferLayout {
|
||||
array_stride: mem::size_of::<Self>() as wgpu::BufferAddress,
|
||||
step_mode: wgpu::VertexStepMode::Instance,
|
||||
|
||||
@@ -24,6 +24,7 @@ use cosmic_text::{
|
||||
use dashmap::mapref::entry::Entry;
|
||||
use dashmap::DashMap;
|
||||
use fontdb::Source;
|
||||
use galaxyui_core::fonts::{Style, Weight};
|
||||
use itertools::Itertools;
|
||||
use parking_lot::RwLock;
|
||||
use pathfinder_geometry::rect::{RectF, RectI};
|
||||
@@ -31,7 +32,6 @@ use pathfinder_geometry::vector::{vec2f, vec2i, Vector2F, Vector2I};
|
||||
use resvg::usvg::fontdb;
|
||||
use resvg::usvg::fontdb::Query;
|
||||
use vec1::Vec1;
|
||||
use galaxyui_core::fonts::{Style, Weight};
|
||||
#[cfg(target_os = "windows")]
|
||||
use windows::loader;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user