Wrapping up bedrock implementation

This commit is contained in:
Ryan Ward
2026-05-13 10:04:59 -05:00
parent ed53aa99eb
commit cee61e2af0
1144 changed files with 2954 additions and 2660 deletions
@@ -4,8 +4,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -4,8 +4,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -1,4 +1,3 @@
use instant::Instant;
use galaxyui::{
assets::asset_cache::AssetSource,
elements::{
@@ -7,6 +6,7 @@ use galaxyui::{
},
AppContext, Element, Entity, TypedActionView, View,
};
use instant::Instant;
pub struct RootView {
animation_start_time: Instant,
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -1,4 +1,3 @@
use pathfinder_color::ColorU;
use galaxyui::elements::DispatchEventResult;
use galaxyui::fonts::FamilyId;
use galaxyui::{
@@ -9,6 +8,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 -1
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
+1 -1
View File
@@ -1,5 +1,5 @@
use pathfinder_color::ColorU;
use galaxyui::{elements::Rect, AppContext, Element, Entity, TypedActionView, View};
use pathfinder_color::ColorU;
pub struct BlurredView {}
+1 -1
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -1,10 +1,5 @@
use std::any::Any;
use pathfinder_color::ColorU;
use pathfinder_geometry::{
rect::RectF,
vector::{vec2f, Vector2F},
};
use galaxyui::elements::{AcceptedByDropTarget, DropTarget, DropTargetData};
use galaxyui::{
elements::{
@@ -13,6 +8,11 @@ use galaxyui::{
},
AppContext, Element, Entity, TypedActionView, View,
};
use pathfinder_color::ColorU;
use pathfinder_geometry::{
rect::RectF,
vector::{vec2f, Vector2F},
};
#[derive(Default)]
pub struct RootView {
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -1,5 +1,5 @@
use pathfinder_color::ColorU;
use galaxyui::{elements::Rect, AppContext, Element, Entity, TypedActionView, View};
use pathfinder_color::ColorU;
pub struct RootView {}
+1 -1
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
+1 -1
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -4,8 +4,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -1,6 +1,5 @@
//! A UI sample demonstrating how the SelectableArea element can be used.
use markdown_parser::{parse_markdown, FormattedTextFragment, FormattedTextLine};
use galaxyui::fonts::FamilyId;
use galaxyui::SingletonEntity as _;
use galaxyui::{
@@ -10,6 +9,7 @@ use galaxyui::{
},
AppContext, Element, Entity, TypedActionView, View, ViewContext, ViewHandle,
};
use markdown_parser::{parse_markdown, FormattedTextFragment, FormattedTextLine};
use galaxyui::color::ColorU;
use galaxyui::elements::{Align, HighlightedHyperlink, HyperlinkLens};
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -1,7 +1,3 @@
use image::ImageEncoder;
use pathfinder_color::ColorU;
use std::sync::{Arc, Mutex};
use std::time::{SystemTime, UNIX_EPOCH};
use galaxyui::SingletonEntity as _;
use galaxyui::{
elements::{
@@ -12,6 +8,10 @@ use galaxyui::{
platform::CapturedFrame,
AppContext, Element, Entity, TypedActionView, View, ViewContext,
};
use image::ImageEncoder;
use pathfinder_color::ColorU;
use std::sync::{Arc, Mutex};
use std::time::{SystemTime, UNIX_EPOCH};
#[derive(Clone, Debug)]
pub enum RootViewAction {
+1 -1
View File
@@ -1,4 +1,3 @@
use pathfinder_color::ColorU;
use galaxyui::{
elements::{
CacheOption, ConstrainedBox, Flex, Icon, Image, MainAxisAlignment, MainAxisSize,
@@ -6,6 +5,7 @@ use galaxyui::{
},
AppContext, Element, Entity, TypedActionView, View,
};
use pathfinder_color::ColorU;
pub struct RootView {}
+1 -1
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
+1 -1
View File
@@ -9,8 +9,8 @@ use galaxyui::{
AppContext, Element, Entity, TypedActionView, View, ViewContext,
};
use std::sync::{Arc, Mutex};
use galaxyui::color::ColorU;
use std::sync::{Arc, Mutex};
pub struct RootView {
font_family: FamilyId,
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -1,6 +1,3 @@
use pathfinder_geometry::rect::RectF;
use pathfinder_geometry::vector::vec2f;
use pathfinder_geometry::vector::Vector2F;
use galaxyui::elements::new_scrollable::AxisConfiguration;
use galaxyui::elements::new_scrollable::ClippedAxisConfiguration;
use galaxyui::elements::new_scrollable::DualAxisConfig;
@@ -8,6 +5,9 @@ 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;
use pathfinder_geometry::vector::Vector2F;
use galaxyui::elements::ChildView;
use galaxyui::elements::ClippedScrollStateHandle;
@@ -230,7 +230,12 @@ impl NewScrollableElement for ScrollableElement {
}
}
fn scroll(&mut self, delta: galaxyui::units::Pixels, axis: Axis, ctx: &mut galaxyui::EventContext) {
fn scroll(
&mut self,
delta: galaxyui::units::Pixels,
axis: Axis,
ctx: &mut galaxyui::EventContext,
) {
match axis {
Axis::Horizontal => (),
Axis::Vertical => {
+1 -1
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
+1 -1
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -80,7 +80,9 @@ impl View for RootView {
),
)
.with_dragbar_side(DragBarSide::Bottom)
.with_dragbar_color(galaxyui::elements::Fill::Solid(ColorU::new(0, 255, 255, 200)))
.with_dragbar_color(galaxyui::elements::Fill::Solid(ColorU::new(
0, 255, 255, 200,
)))
.on_resize(move |ctx, _| {
ctx.notify();
})
@@ -114,7 +116,9 @@ impl View for RootView {
),
)
.with_dragbar_side(DragBarSide::Right)
.with_dragbar_color(galaxyui::elements::Fill::Solid(ColorU::new(255, 255, 0, 200)))
.with_dragbar_color(galaxyui::elements::Fill::Solid(ColorU::new(
255, 255, 0, 200,
)))
.on_resize(move |ctx, _| {
ctx.notify();
})
+1 -1
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
+1 -1
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
+4 -2
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -26,7 +26,9 @@ fn main() -> Result<()> {
let app_builder =
platform::AppBuilder::new(platform::AppCallbacks::default(), Box::new(ASSETS), None);
let _ = app_builder.run(move |ctx| {
ctx.add_window(galaxyui::AddWindowOptions::default(), |_| root_view::RootView);
ctx.add_window(galaxyui::AddWindowOptions::default(), |_| {
root_view::RootView
});
});
Ok(())
@@ -1,4 +1,3 @@
use pathfinder_geometry::vector::vec2f;
use galaxyui::elements::{
Align, ConstrainedBox, Container, CornerRadius, DropShadow, Radius, Shrinkable,
};
@@ -6,6 +5,7 @@ use galaxyui::{
elements::{Flex, ParentElement, Rect},
AppContext, Element, Entity, TypedActionView, View,
};
use pathfinder_geometry::vector::vec2f;
use galaxyui::color::ColorU;
+1 -1
View File
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
+1 -1
View File
@@ -1,4 +1,3 @@
use pathfinder_color::ColorU;
use galaxyui::{
elements::{Align, Container},
presenter::ChildView,
@@ -8,6 +7,7 @@ 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.
@@ -4,8 +4,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, platform::WindowBounds, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -1,6 +1,4 @@
use crate::CaptureConfig;
use image::ImageEncoder;
use std::sync::{Arc, Mutex};
use galaxyui::color::ColorU;
use galaxyui::elements::{
ClippedScrollStateHandle, ClippedScrollable, ConstrainedBox, Container, Empty, Fill, Flex,
@@ -16,6 +14,8 @@ use galaxyui::SingletonEntity as _;
use galaxyui::{
AppContext, Element, Entity, TypedActionView, View, ViewContext, ViewHandle, WindowId,
};
use image::ImageEncoder;
use std::sync::{Arc, Mutex};
const TOTAL_DEMOS: usize = 13;
@@ -213,7 +213,8 @@ impl TableSampleView {
if auto_capture && !is_last_demo {
ctx.spawn(
async {
galaxyui::r#async::Timer::after(std::time::Duration::from_millis(350)).await;
galaxyui::r#async::Timer::after(std::time::Duration::from_millis(350))
.await;
},
|_, _, ctx| {
ctx.dispatch_typed_action(&SampleAction::NextDemo);
@@ -3,8 +3,8 @@ use std::borrow::Cow;
pub mod root_view;
extern crate galaxyui;
use rust_embed::RustEmbed;
use galaxyui::{platform, AssetProvider};
use rust_embed::RustEmbed;
#[derive(Clone, Copy, RustEmbed)]
#[folder = "examples/assets"]
@@ -1,4 +1,3 @@
use pathfinder_color::ColorU;
use galaxyui::fonts::FamilyId;
use galaxyui::SingletonEntity as _;
use galaxyui::{
@@ -7,6 +6,7 @@ use galaxyui::{
presenter::ChildView,
AppContext, Element, Entity, TypedActionView, View, ViewContext, ViewHandle,
};
use pathfinder_color::ColorU;
// We could initiate global action and bindings here.
pub fn init(ctx: &mut AppContext) {
+3 -3
View File
@@ -7,14 +7,14 @@ use dashmap::DashMap;
use font_kit::canvas::{AntialiasingStrategy, Canvas, RasterizationOptions};
use font_kit::font::Font;
use font_kit::hinting::HintingOptions;
use pathfinder_geometry::rect::RectI;
use pathfinder_geometry::transform2d::Transform2F;
use pathfinder_geometry::vector::{vec2i, Vector2F, Vector2I};
use galaxyui_core::fonts::canvas::RasterFormat;
use galaxyui_core::fonts::{
FontId, GlyphId, Properties, RasterizedGlyph, Style, SubpixelAlignment, Weight,
};
use galaxyui_core::rendering;
use pathfinder_geometry::rect::RectI;
use pathfinder_geometry::transform2d::Transform2F;
use pathfinder_geometry::vector::{vec2i, Vector2F, Vector2I};
#[cfg(target_os = "macos")]
use crate::platform::mac::AutoreleasePoolGuard;
+4 -4
View File
@@ -9,10 +9,6 @@ use cocoa::{
appkit::{NSApp, NSRequestUserAttentionType},
base::{id, nil},
};
use objc::{class, msg_send, sel, sel_impl};
use std::ffi::c_void;
use std::path::Path;
use std::sync::Arc;
use galaxyui_core::clipboard::InMemoryClipboard;
use galaxyui_core::keymap::Keystroke;
use galaxyui_core::modals::{AlertDialog, ModalId};
@@ -25,6 +21,10 @@ use galaxyui_core::ApplicationBundleInfo;
use galaxyui_core::{
accessibility::AccessibilityContent, notification::UserNotification, platform, WindowId,
};
use objc::{class, msg_send, sel, sel_impl};
use std::ffi::c_void;
use std::path::Path;
use std::sync::Arc;
// Functions implemented in objC files.
extern "C" {
+7 -7
View File
@@ -19,6 +19,13 @@ 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, FamilyId, FontId, FontInfo, GlyphId, Metrics, Properties,
RasterizedGlyph, SubpixelAlignment,
};
use galaxyui_core::platform::{self, FontDB as _, LineStyle, TextLayoutSystem};
use galaxyui_core::rendering;
use galaxyui_core::text_layout::{ClipConfig, StyleAndFont, TextAlignment, TextFrame};
use itertools::Itertools as _;
use ordered_float::OrderedFloat;
use pathfinder_geometry::rect::RectI;
@@ -30,13 +37,6 @@ use std::sync::{
atomic::{AtomicUsize, Ordering},
Arc,
};
use galaxyui_core::fonts::{
canvas::RasterFormat, FamilyId, FontId, FontInfo, GlyphId, Metrics, Properties,
RasterizedGlyph, SubpixelAlignment,
};
use galaxyui_core::platform::{self, FontDB as _, LineStyle, TextLayoutSystem};
use galaxyui_core::rendering;
use galaxyui_core::text_layout::{ClipConfig, StyleAndFont, TextAlignment, TextFrame};
struct FontFamily {
name: String,
+1 -1
View File
@@ -4,9 +4,9 @@ use cocoa::{
base::{id, nil, BOOL},
foundation::{NSArray, NSString, NSUInteger},
};
use objc::{msg_send, sel, sel_impl};
use galaxyui_core::keymap::Keystroke;
use galaxyui_core::platform::keyboard::{KeyCode, NativeKeyCode, PhysicalKey};
use objc::{msg_send, sel, sel_impl};
use super::make_nsstring;
+4 -4
View File
@@ -13,16 +13,16 @@ use cocoa::{
base::{id, nil},
foundation::{NSArray, NSAutoreleasePool, NSInteger},
};
use lazy_static::lazy_static;
use objc::runtime::{NO, YES};
use objc::{msg_send, sel, sel_impl};
use std::{boxed::Box, cell::RefCell, collections::HashMap, ffi::c_void, rc::Rc};
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 objc::runtime::{NO, YES};
use objc::{msg_send, sel, sel_impl};
use std::{boxed::Box, cell::RefCell, collections::HashMap, ffi::c_void, rc::Rc};
use super::app::callback_dispatcher;
use super::make_nsstring;
@@ -19,11 +19,11 @@
use cocoa::appkit::NSMenuItem;
use cocoa::base::nil;
use cocoa::foundation::NSAutoreleasePool;
use objc::runtime::Object;
use objc::{msg_send, sel, sel_impl};
use galaxyui_core::actions::StandardAction;
use galaxyui_core::keymap::Keystroke;
use galaxyui_core::platform::menu::{MenuItem, MenuItemPropertyChanges};
use objc::runtime::Object;
use objc::{msg_send, sel, sel_impl};
use super::{apply_changes, make_menu_item};
@@ -1,6 +1,6 @@
use galaxyui_core::platform::CapturedFrame;
use metal::{MTLPixelFormat, MTLStorageMode};
use pathfinder_geometry::vector::Vector2F;
use galaxyui_core::platform::CapturedFrame;
#[cfg(test)]
#[path = "frame_capture_tests.rs"]
@@ -9,27 +9,27 @@ use super::frame_capture::capture_frame;
use crate::platform::mac::rendering::renderer::Device;
use crate::platform::mac::window::WindowState;
use cocoa::base::id;
use galaxyui_core::platform::CapturedFrame;
use metal::{
Function, MTLBlendFactor, MTLBlendOperation, MTLIndexType, MTLPrimitiveType,
MTLResourceOptions, RenderPipelineDescriptor,
};
use objc::{msg_send, sel, sel_impl};
use galaxyui_core::platform::CapturedFrame;
use galaxyui_core::fonts::{canvas, RasterizedGlyph};
use galaxyui_core::scene::{CornerRadius, GlyphFade, Icon, Image, Layer, Scene};
use pathfinder_color::{ColorF, ColorU};
use pathfinder_geometry::{
rect::RectF,
vector::{vec2f, Vector2F},
};
use galaxyui_core::fonts::{canvas, RasterizedGlyph};
use galaxyui_core::scene::{CornerRadius, GlyphFade, Icon, Image, Layer, Scene};
use std::collections::HashMap;
use galaxyui_core::scene::GlyphKey;
use pathfinder_geometry::rect::RectI;
use std::{fs::File, mem, sync::Once};
use std::{io::Write, os::raw::c_void};
use galaxyui_core::scene::GlyphKey;
const METAL_LIB_BYTES: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/shaders.metallib"));
static WRITE_LIB_TO_FILE: Once = Once::new();
@@ -26,6 +26,12 @@ use core_text::{
line::CTLine,
string_attributes::{kCTFontAttributeName, kCTParagraphStyleAttributeName},
};
use galaxyui_core::fonts::GlyphId;
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;
@@ -37,12 +43,6 @@ use std::ops::Range;
use std::rc::Rc;
use std::slice;
use vec1::Vec1;
use galaxyui_core::fonts::GlyphId;
use galaxyui_core::platform::LineStyle;
use galaxyui_core::text_layout::{
CaretPosition, ClipConfig, Glyph, Line, Run, StyleAndFont, TextAlignment, TextBorder,
TextFrame, TextStyle,
};
use super::fonts::FontDB;
use super::utils::{cg_color_to_color_u, color_u_to_cg_color};
+12 -12
View File
@@ -13,18 +13,6 @@ use cocoa::{
foundation::{NSAutoreleasePool, NSInteger, NSRect, NSSize},
};
use foreign_types::ForeignType;
use itertools::Itertools;
use num_traits::FromPrimitive;
use objc::class;
use objc::{
msg_send,
runtime::{Object, BOOL, NO, YES},
sel, sel_impl,
};
use pathfinder_geometry::{
rect::RectF,
vector::{vec2f, Vector2F},
};
use galaxyui_core::event::ModifiersState;
use galaxyui_core::platform::{
file_picker, FilePickerCallback, FilePickerConfiguration, FullscreenState, GraphicsBackend,
@@ -41,6 +29,18 @@ use galaxyui_core::{
Event, OptionalPlatformWindow, Scene, WindowId,
};
use galaxyui_core::{DisplayId, DisplayIdx};
use itertools::Itertools;
use num_traits::FromPrimitive;
use objc::class;
use objc::{
msg_send,
runtime::{Object, BOOL, NO, YES},
sel, sel_impl,
};
use pathfinder_geometry::{
rect::RectF,
vector::{vec2f, Vector2F},
};
use instant::Instant;
use std::collections::HashMap;
@@ -5,9 +5,9 @@ mod rect;
mod util;
use frame::Frame;
use galaxyui_core::platform::CapturedFrame;
use pathfinder_geometry::vector::Vector2F;
use util::with_error_scope;
use galaxyui_core::platform::CapturedFrame;
use wgpu::wgc::{device::DeviceError, present::SurfaceError};
use crate::r#async::block_on;
@@ -12,12 +12,12 @@ use crate::rendering::OnGPUDeviceSelected;
use crate::windowing;
use crate::{r#async::block_on, rendering::GPUPowerPreference};
use anyhow::{anyhow, Result};
use galaxyui_core::rendering::{GPUBackend, GPUDeviceInfo, GPUDeviceType};
use itertools::Itertools;
use lazy_static::lazy_static;
use pathfinder_geometry::vector::Vector2F;
use thiserror::Error;
use version_compare::Version;
use galaxyui_core::rendering::{GPUBackend, GPUDeviceInfo, GPUDeviceType};
use wgpu::{
Adapter, Backend, CompositeAlphaMode, CurrentSurfaceTexture, Device, DeviceType, PresentMode,
Queue, Surface, SurfaceConfiguration,