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 -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;