repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/lib.rs
desktop/src/lib.rs
use clap::Parser; use std::process::exit; use tracing_subscriber::EnvFilter; use winit::event_loop::EventLoop; pub(crate) mod consts; mod app; mod cef; mod cli; mod dirs; mod event; mod persist; mod render; mod window; mod gpu_context; pub(crate) use graphite_desktop_wrapper as wrapper; use app::App; use cef::CefH...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cli.rs
desktop/src/cli.rs
#[derive(clap::Parser)] #[clap(name = "graphite", version)] pub struct Cli { #[arg(help = "Files to open on startup")] pub files: Vec<std::path::PathBuf>, #[arg(long, action = clap::ArgAction::SetTrue, help = "Disable hardware accelerated UI rendering")] pub disable_ui_acceleration: bool, }
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef.rs
desktop/src/cef.rs
//! CEF (Chromium Embedded Framework) integration for Graphite Desktop //! //! This module provides CEF browser integration with hardware-accelerated texture sharing. //! //! # Hardware Acceleration //! //! The texture import system supports platform-specific hardware acceleration: //! //! - **Linux**: DMA-BUF via Vulk...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/render.rs
desktop/src/render.rs
mod frame_buffer_ref; pub(crate) use frame_buffer_ref::FrameBufferRef; mod state; pub(crate) use state::{RenderError, RenderState};
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/gpu_context.rs
desktop/src/gpu_context.rs
use crate::wrapper::{WgpuContext, WgpuContextBuilder, WgpuFeatures}; pub(super) async fn create_wgpu_context() -> WgpuContext { let wgpu_context_builder = WgpuContextBuilder::new().with_features(WgpuFeatures::PUSH_CONSTANTS); // TODO: add a cli flag to list adapters and exit instead of always printing println!("\n...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/window.rs
desktop/src/window.rs
use std::collections::HashMap; use std::sync::Arc; use winit::cursor::{CursorIcon, CustomCursor, CustomCursorSource}; use winit::event_loop::ActiveEventLoop; use winit::window::{Window as WinitWindow, WindowAttributes}; use crate::consts::APP_NAME; use crate::event::AppEventScheduler; use crate::wrapper::messages::Men...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/dirs.rs
desktop/src/dirs.rs
use std::fs::create_dir_all; use std::path::PathBuf; use crate::consts::{APP_DIRECTORY_NAME, APP_DOCUMENTS_DIRECTORY_NAME}; pub(crate) fn ensure_dir_exists(path: &PathBuf) { if !path.exists() { create_dir_all(path).unwrap_or_else(|_| panic!("Failed to create directory at {path:?}")); } } pub(crate) fn app_data_d...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/main.rs
desktop/src/main.rs
fn main() { graphite_desktop::start(); }
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/consts.rs
desktop/src/cef/consts.rs
use std::time::Duration; pub(crate) const RESOURCE_SCHEME: &str = "resources"; pub(crate) const RESOURCE_DOMAIN: &str = "resources"; pub(crate) const SCROLL_LINE_HEIGHT: usize = 40; pub(crate) const SCROLL_LINE_WIDTH: usize = 40; #[cfg(target_os = "linux")] pub(crate) const SCROLL_SPEED_X: f32 = 3.0; #[cfg(target_os...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal.rs
desktop/src/cef/internal.rs
mod browser_process_app; mod browser_process_client; mod browser_process_handler; mod render_process_app; mod render_process_handler; mod render_process_v8_handler; mod context_menu_handler; mod display_handler; mod life_span_handler; mod load_handler; mod resource_handler; mod scheme_handler_factory; pub(super) mod...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/platform.rs
desktop/src/cef/platform.rs
#[cfg(feature = "accelerated_paint")] pub fn should_enable_hardware_acceleration() -> bool { #[cfg(target_os = "linux")] { // Check if running on Wayland or X11 let has_wayland = std::env::var("WAYLAND_DISPLAY") .ok() .filter(|var| !var.is_empty()) .or_else(|| std::env::var("WAYLAND_SOCKET").ok()) .fi...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/utility.rs
desktop/src/cef/utility.rs
pub unsafe fn pointer_to_string(pointer: *mut cef::sys::_cef_string_utf16_t) -> String { let str = unsafe { (*pointer).str_ }; let len = unsafe { (*pointer).length }; let slice = unsafe { std::slice::from_raw_parts(str, len) }; String::from_utf16(slice).unwrap() }
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/dirs.rs
desktop/src/cef/dirs.rs
use std::path::PathBuf; use crate::dirs::{app_data_dir, ensure_dir_exists}; static CEF_DIR_NAME: &str = "browser"; pub(crate) fn delete_instance_dirs() { let cef_dir = app_data_dir().join(CEF_DIR_NAME); if let Ok(entries) = std::fs::read_dir(&cef_dir) { for entry in entries.flatten() { let path = entry.path()...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/context.rs
desktop/src/cef/context.rs
#[cfg(not(target_os = "macos"))] mod multithreaded; mod singlethreaded; mod builder; pub(crate) use builder::{CefContextBuilder, InitError}; pub(crate) trait CefContext { fn work(&mut self); fn handle_window_event(&mut self, event: &winit::event::WindowEvent); fn notify_view_info_changed(&self); fn send_web_me...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/input.rs
desktop/src/cef/input.rs
use cef::sys::{cef_key_event_type_t, cef_mouse_button_type_t}; use cef::{Browser, ImplBrowser, ImplBrowserHost, KeyEvent, MouseEvent}; use winit::event::{ButtonSource, ElementState, MouseButton, MouseScrollDelta, WindowEvent}; mod keymap; use keymap::{ToCharRepresentation, ToNativeKeycode, ToVKBits}; mod state; pub(c...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/ipc.rs
desktop/src/cef/ipc.rs
use cef::{CefString, Frame, ImplBinaryValue, ImplFrame, ImplListValue, ImplProcessMessage, ImplV8Context, ProcessId, V8Context, sys::cef_process_id_t}; pub(crate) enum MessageType { Initialized, SendToJS, SendToNative, } impl From<MessageType> for MessageInfo { fn from(val: MessageType) -> Self { match val { ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/input/state.rs
desktop/src/cef/input/state.rs
use cef::MouseEvent; use cef::sys::cef_event_flags_t; use std::time::Instant; use winit::dpi::PhysicalPosition; use winit::event::{ElementState, MouseButton}; use winit::keyboard::{Key, KeyLocation, ModifiersState, NamedKey}; use crate::cef::consts::{MULTICLICK_ALLOWED_TRAVEL, MULTICLICK_TIMEOUT}; #[derive(Default)] ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/input/keymap.rs
desktop/src/cef/input/keymap.rs
use winit::keyboard::{Key, NamedKey, PhysicalKey}; pub(crate) trait ToCharRepresentation { fn to_char_representation(&self) -> char; } impl ToCharRepresentation for Key { fn to_char_representation(&self) -> char { match self { Key::Named(named) => match named { NamedKey::Tab => '\t', NamedKey::Enter =>...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/life_span_handler.rs
desktop/src/cef/internal/life_span_handler.rs
use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_life_span_handler_t, cef_base_ref_counted_t}; use cef::{ImplLifeSpanHandler, WrapLifeSpanHandler}; pub(crate) struct LifeSpanHandlerImpl { object: *mut RcImpl<_cef_life_span_handler_t, Self>, } impl LifeSpanHandlerImpl { pub(crate) fn new() -> Self { Self { object: st...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/scheme_handler_factory.rs
desktop/src/cef/internal/scheme_handler_factory.rs
use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_scheme_handler_factory_t, cef_base_ref_counted_t, cef_scheme_options_t}; use cef::{Browser, CefString, Frame, ImplRequest, ImplSchemeHandlerFactory, ImplSchemeRegistrar, Request, ResourceHandler, SchemeRegistrar, WrapSchemeHandlerFactory}; use super::resource_handler::Res...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/render_process_v8_handler.rs
desktop/src/cef/internal/render_process_v8_handler.rs
use cef::{ImplV8Handler, ImplV8Value, V8Value, WrapV8Handler, rc::Rc, v8_context_get_current_context}; use crate::cef::ipc::{MessageType, SendMessage}; pub struct RenderProcessV8HandlerImpl { object: *mut cef::rc::RcImpl<cef::sys::_cef_v8_handler_t, Self>, } impl RenderProcessV8HandlerImpl { pub(crate) fn new() -> ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/render_process_app.rs
desktop/src/cef/internal/render_process_app.rs
use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_app_t, cef_base_ref_counted_t}; use cef::{App, ImplApp, RenderProcessHandler, SchemeRegistrar, WrapApp}; use super::render_process_handler::RenderProcessHandlerImpl; use super::scheme_handler_factory::SchemeHandlerFactoryImpl; use crate::cef::CefEventHandler; pub(crate) ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/display_handler.rs
desktop/src/cef/internal/display_handler.rs
use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_display_handler_t, cef_base_ref_counted_t, cef_cursor_type_t::*, cef_log_severity_t::*}; use cef::{CefString, ImplDisplayHandler, Point, Size, WrapDisplayHandler}; use winit::cursor::CursorIcon; use crate::cef::CefEventHandler; pub(crate) struct DisplayHandlerImpl<H: Cef...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/load_handler.rs
desktop/src/cef/internal/load_handler.rs
use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_load_handler_t, cef_base_ref_counted_t, cef_load_handler_t}; use cef::{ImplBrowser, ImplBrowserHost, ImplLoadHandler, WrapLoadHandler}; use crate::cef::CefEventHandler; pub(crate) struct LoadHandlerImpl<H: CefEventHandler> { object: *mut RcImpl<cef_load_handler_t, Self>...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/render_handler.rs
desktop/src/cef/internal/render_handler.rs
use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_render_handler_t, cef_base_ref_counted_t}; use cef::{Browser, ImplRenderHandler, PaintElementType, Rect, WrapRenderHandler}; use crate::cef::CefEventHandler; use crate::render::FrameBufferRef; pub(crate) struct RenderHandlerImpl<H: CefEventHandler> { object: *mut RcImpl...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/render_process_handler.rs
desktop/src/cef/internal/render_process_handler.rs
use cef::rc::{ConvertReturnValue, Rc, RcImpl}; use cef::sys::{_cef_render_process_handler_t, cef_base_ref_counted_t, cef_render_process_handler_t, cef_v8_propertyattribute_t, cef_v8_value_create_array_buffer_with_copy}; use cef::{CefString, ImplFrame, ImplRenderProcessHandler, ImplV8Context, ImplV8Value, V8Handler, V8P...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/browser_process_app.rs
desktop/src/cef/internal/browser_process_app.rs
#[cfg(target_os = "linux")] use std::env; use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_app_t, cef_base_ref_counted_t}; use cef::{BrowserProcessHandler, CefString, ImplApp, ImplCommandLine, SchemeRegistrar, WrapApp}; use super::browser_process_handler::BrowserProcessHandlerImpl; use super::scheme_handler_factory::Sc...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/resource_handler.rs
desktop/src/cef/internal/resource_handler.rs
use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_resource_handler_t, cef_base_ref_counted_t}; use cef::{Callback, CefString, ImplResourceHandler, ImplResponse, Request, ResourceReadCallback, Response, WrapResourceHandler}; use std::cell::RefCell; use std::ffi::c_int; use std::io::Read; use crate::cef::{Resource, Resourc...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/task.rs
desktop/src/cef/internal/task.rs
use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_task_t, cef_base_ref_counted_t}; use cef::{ImplTask, WrapTask}; use std::cell::RefCell; // Closure-based task wrapper following CEF patterns pub struct ClosureTask<F> { pub(crate) object: *mut RcImpl<_cef_task_t, Self>, pub(crate) closure: RefCell<Option<F>>, } impl<F:...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/browser_process_handler.rs
desktop/src/cef/internal/browser_process_handler.rs
use std::time::{Duration, Instant}; use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_browser_process_handler_t, cef_base_ref_counted_t, cef_browser_process_handler_t}; use cef::{CefString, ImplBrowserProcessHandler, WrapBrowserProcessHandler}; use crate::cef::CefEventHandler; pub(crate) struct BrowserProcessHandlerImp...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/context_menu_handler.rs
desktop/src/cef/internal/context_menu_handler.rs
use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_context_menu_handler_t, cef_base_ref_counted_t}; use cef::{ImplContextMenuHandler, WrapContextMenuHandler}; pub(crate) struct ContextMenuHandlerImpl { object: *mut RcImpl<_cef_context_menu_handler_t, Self>, } impl ContextMenuHandlerImpl { pub(crate) fn new() -> Self { ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/internal/browser_process_client.rs
desktop/src/cef/internal/browser_process_client.rs
use cef::rc::{Rc, RcImpl}; use cef::sys::{_cef_client_t, cef_base_ref_counted_t}; use cef::{ContextMenuHandler, DisplayHandler, ImplClient, LifeSpanHandler, LoadHandler, RenderHandler, WrapClient}; use crate::cef::CefEventHandler; use crate::cef::ipc::{MessageType, UnpackMessage, UnpackedMessage}; use super::context_...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/context/builder.rs
desktop/src/cef/context/builder.rs
use std::path::{Path, PathBuf}; use cef::args::Args; use cef::sys::{CEF_API_VERSION_LAST, cef_resultcode_t}; use cef::{ App, BrowserSettings, CefString, Client, DictionaryValue, ImplCommandLine, ImplRequestContext, RequestContextSettings, SchemeHandlerFactory, Settings, WindowInfo, api_hash, browser_host_create_brow...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/context/multithreaded.rs
desktop/src/cef/context/multithreaded.rs
use cef::sys::cef_thread_id_t; use cef::{Task, ThreadId, post_task}; use std::cell::RefCell; use winit::event::WindowEvent; use crate::cef::internal::task::ClosureTask; use super::CefContext; use super::singlethreaded::SingleThreadedCefContext; thread_local! { pub(super) static CONTEXT: RefCell<Option<SingleThreade...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/cef/context/singlethreaded.rs
desktop/src/cef/context/singlethreaded.rs
use cef::{Browser, ImplBrowser, ImplBrowserHost}; use winit::event::WindowEvent; use crate::cef::input::InputState; use crate::cef::ipc::{MessageType, SendMessage}; use crate::cef::{CefEventHandler, input}; use super::CefContext; pub(super) struct SingleThreadedCefContext { pub(super) event_handler: Box<dyn CefEven...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/window/win.rs
desktop/src/window/win.rs
use windows::Win32::System::Com::{COINIT_APARTMENTTHREADED, CoInitializeEx}; use windows::Win32::UI::Shell::SetCurrentProcessExplicitAppUserModelID; use windows::core::HSTRING; use winit::event_loop::ActiveEventLoop; use winit::window::{Window, WindowAttributes}; use crate::consts::APP_ID; use crate::event::AppEventSc...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/window/linux.rs
desktop/src/window/linux.rs
use winit::event_loop::ActiveEventLoop; use winit::platform::wayland::ActiveEventLoopExtWayland; use winit::platform::wayland::WindowAttributesWayland; use winit::platform::x11::WindowAttributesX11; use winit::window::{Window, WindowAttributes}; use crate::consts::{APP_ID, APP_NAME}; use crate::event::AppEventSchedule...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/window/mac.rs
desktop/src/window/mac.rs
use winit::event_loop::ActiveEventLoop; use winit::platform::macos::WindowAttributesMacOS; use winit::window::{Window, WindowAttributes}; use crate::event::AppEventScheduler; use crate::wrapper::messages::MenuItem; mod app; mod menu; pub(super) struct NativeWindowImpl { menu: menu::Menu, } impl super::NativeWindow...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/window/mac/app.rs
desktop/src/window/mac/app.rs
use objc2::{ClassType, define_class, msg_send}; use objc2_app_kit::{NSApplication, NSEvent, NSEventType, NSResponder}; use objc2_foundation::NSObject; define_class!( #[unsafe(super(NSApplication, NSResponder, NSObject))] #[name = "GraphiteApplication"] pub(super) struct GraphiteApplication; impl GraphiteApplicati...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/window/mac/menu.rs
desktop/src/window/mac/menu.rs
use muda::Menu as MudaMenu; use muda::accelerator::Accelerator; use muda::{CheckMenuItem, IsMenuItem, MenuEvent, MenuItem, MenuItemKind, PredefinedMenuItem, Result, Submenu}; use crate::event::{AppEvent, AppEventScheduler}; use crate::wrapper::messages::MenuItem as WrapperMenuItem; pub(super) struct Menu { inner: Mu...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/window/win/native_handle.rs
desktop/src/window/win/native_handle.rs
//! Implements a Windows-specific custom window frame (no titlebar, but native boarder, shadows and resize). //! Look and feel should be similar to a standard window. //! //! Implementation notes: //! - Windows that don't use standard decorations don't get native resize handles or shadows by default. //! - We implement...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/render/frame_buffer_ref.rs
desktop/src/render/frame_buffer_ref.rs
use thiserror::Error; pub(crate) struct FrameBufferRef<'a> { buffer: &'a [u8], width: usize, height: usize, } impl<'a> FrameBufferRef<'a> { pub(crate) fn new(buffer: &'a [u8], width: usize, height: usize) -> Result<Self, FrameBufferError> { let fb = Self { buffer, width, height }; fb.validate_size()?; Ok(fb)...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/src/render/state.rs
desktop/src/render/state.rs
use crate::window::Window; use crate::wrapper::{Color, WgpuContext, WgpuExecutor}; #[derive(derivative::Derivative)] #[derivative(Debug)] pub(crate) struct RenderState { surface: wgpu::Surface<'static>, context: WgpuContext, executor: WgpuExecutor, config: wgpu::SurfaceConfiguration, render_pipeline: wgpu::Rende...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/embedded-resources/build.rs
desktop/embedded-resources/build.rs
const EMBEDDED_RESOURCES_ENV: &str = "EMBEDDED_RESOURCES"; const DEFAULT_RESOURCES_DIR: &str = "../../frontend/dist"; fn main() { let mut embedded_resources: Option<String> = None; println!("cargo:rerun-if-env-changed={EMBEDDED_RESOURCES_ENV}"); if let Ok(embedded_resources_env) = std::env::var(EMBEDDED_RESOURCES_...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/embedded-resources/src/lib.rs
desktop/embedded-resources/src/lib.rs
//! This crate provides `EMBEDDED_RESOURCES` that can be included in the desktop application binary. //! It is intended to be used by the `embedded_resources` feature of the `graphite-desktop` crate. //! The build script checks if the specified resources directory exists and sets the `embedded_resources` cfg flag accor...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/wrapper/src/messages.rs
desktop/wrapper/src/messages.rs
use graphite_editor::messages::prelude::FrontendMessage; use std::path::PathBuf; pub(crate) use graphite_editor::messages::prelude::Message as EditorMessage; pub use graphite_editor::messages::input_mapper::utility_types::input_keyboard::{Key, ModifierKeys}; pub use graphite_editor::messages::input_mapper::utility_ty...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/wrapper/src/lib.rs
desktop/wrapper/src/lib.rs
use graph_craft::wasm_application_io::WasmApplicationIo; use graphite_editor::application::Editor; use graphite_editor::messages::prelude::{FrontendMessage, Message}; // TODO: Remove usage of this reexport in desktop create and remove this line pub use graphene_std::Color; pub use wgpu_executor::WgpuContext; pub use ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/wrapper/src/intercept_editor_message.rs
desktop/wrapper/src/intercept_editor_message.rs
use super::DesktopWrapperMessageDispatcher; use super::messages::EditorMessage; pub(super) fn intercept_editor_message(_dispatcher: &mut DesktopWrapperMessageDispatcher, message: EditorMessage) -> Option<EditorMessage> { // TODO: remove if it turns out to be unnecessary Some(message) }
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/wrapper/src/handle_desktop_wrapper_message.rs
desktop/wrapper/src/handle_desktop_wrapper_message.rs
use graphene_std::Color; use graphene_std::raster::Image; use graphite_editor::messages::app_window::app_window_message_handler::AppWindowPlatform; use graphite_editor::messages::clipboard::utility_types::ClipboardContentRaw; use graphite_editor::messages::prelude::*; use super::DesktopWrapperMessageDispatcher; use su...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/wrapper/src/utils.rs
desktop/wrapper/src/utils.rs
#[cfg(target_os = "macos")] pub(crate) mod menu { use base64::engine::Engine; use base64::engine::general_purpose::STANDARD as BASE64; use graphite_editor::messages::input_mapper::utility_types::input_keyboard::{Key, LabeledKeyOrMouseMotion, LabeledShortcut}; use graphite_editor::messages::input_mapper::utility_ty...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/wrapper/src/message_dispatcher.rs
desktop/wrapper/src/message_dispatcher.rs
use graphite_editor::application::Editor; use std::collections::VecDeque; use super::handle_desktop_wrapper_message::handle_desktop_wrapper_message; use super::intercept_editor_message::intercept_editor_message; use super::intercept_frontend_message::intercept_frontend_message; use super::messages::{DesktopFrontendMes...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/wrapper/src/intercept_frontend_message.rs
desktop/wrapper/src/intercept_frontend_message.rs
use std::path::PathBuf; use graphite_editor::messages::prelude::FrontendMessage; use super::DesktopWrapperMessageDispatcher; use super::messages::{DesktopFrontendMessage, Document, FileFilter, OpenFileDialogContext, SaveFileDialogContext}; pub(super) fn intercept_frontend_message(dispatcher: &mut DesktopWrapperMessa...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/bundle/build.rs
desktop/bundle/build.rs
fn main() { println!("cargo:rerun-if-env-changed=CARGO_PROFILE"); println!("cargo:rerun-if-env-changed=PROFILE"); let profile = std::env::var("CARGO_PROFILE").or_else(|_| std::env::var("PROFILE")).unwrap(); println!("cargo:rustc-env=CARGO_PROFILE={profile}"); println!("cargo:rerun-if-env-changed=DEP_CEF_DLL_WRAPP...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/bundle/src/win.rs
desktop/bundle/src/win.rs
use std::error::Error; use std::fs; use std::path::{Path, PathBuf}; use crate::common::*; const EXECUTABLE: &str = "Graphite.exe"; pub fn main() -> Result<(), Box<dyn Error>> { let app_bin = build_bin("graphite-desktop-platform-win", None)?; let executable = bundle(&profile_path(), &app_bin); // TODO: Consider ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/bundle/src/linux.rs
desktop/bundle/src/linux.rs
use std::error::Error; use crate::common::*; pub fn main() -> Result<(), Box<dyn Error>> { let app_bin = build_bin("graphite-desktop-platform-linux", None)?; // TODO: Implement bundling for linux // TODO: Consider adding more useful cli if std::env::args().any(|a| a == "open") { run_command(&app_bin.to_string...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/bundle/src/mac.rs
desktop/bundle/src/mac.rs
use std::collections::HashMap; use std::error::Error; use std::fs; use std::path::{Path, PathBuf}; use crate::common::*; const APP_ID: &str = "art.graphite.Graphite"; const ICONS_FILE_NAME: &str = "graphite.icns"; const EXEC_PATH: &str = "Contents/MacOS"; const FRAMEWORKS_PATH: &str = "Contents/Frameworks"; const R...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/bundle/src/main.rs
desktop/bundle/src/main.rs
mod common; #[cfg(target_os = "linux")] mod linux; #[cfg(target_os = "macos")] mod mac; #[cfg(target_os = "windows")] mod win; fn main() { #[cfg(target_os = "linux")] linux::main().unwrap(); #[cfg(target_os = "macos")] mac::main().unwrap(); #[cfg(target_os = "windows")] win::main().unwrap(); }
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/bundle/src/common.rs
desktop/bundle/src/common.rs
use std::error::Error; use std::fs; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; pub(crate) const APP_NAME: &str = "Graphite"; pub(crate) const APP_BIN: &str = "graphite"; pub(crate) fn workspace_path() -> PathBuf { PathBuf::from(env!("CARGO_WORKSPACE_DIR")) } fn profile_name() -> &'static st...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/platform/mac/src/helper.rs
desktop/platform/mac/src/helper.rs
fn main() { graphite_desktop::start_helper(); }
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/platform/mac/src/main.rs
desktop/platform/mac/src/main.rs
fn main() { graphite_desktop::start(); }
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/platform/linux/src/main.rs
desktop/platform/linux/src/main.rs
fn main() { graphite_desktop::start(); }
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/platform/win/build.rs
desktop/platform/win/build.rs
fn main() { #[cfg(target_os = "windows")] { let mut res = winres::WindowsResource::new(); res.set_icon("../../../branding/app-icons/graphite.ico"); res.set_language(0x0409); // English (US) // TODO: Replace with actual version res.set_version_info(winres::VersionInfo::FILEVERSION, { const MAJOR: u64 =...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/desktop/platform/win/src/main.rs
desktop/platform/win/src/main.rs
#![windows_subsystem = "windows"] fn main() { graphite_desktop::start(); }
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/blending/src/lib.rs
node-graph/nodes/blending/src/lib.rs
use core_types::registry::types::Percentage; use core_types::table::Table; use core_types::{BlendMode, Color, Ctx}; use graphic_types::Graphic; use graphic_types::Vector; use graphic_types::raster_types::{CPU, Raster}; use vector_types::GradientStops; pub(crate) trait MultiplyAlpha { fn multiply_alpha(&mut self, fact...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/gcore/src/extract_xy.rs
node-graph/nodes/gcore/src/extract_xy.rs
use core_types::Ctx; use dyn_any::DynAny; use glam::{DVec2, IVec2, UVec2}; /// Obtains the X or Y component of a vec2. /// /// The inverse of this node is "Vec2 Value", which can have either or both its X and Y parameters exposed as graph inputs. #[node_macro::node(name("Extract XY"), category("Math: Vector"))] fn ext...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/gcore/src/lib.rs
node-graph/nodes/gcore/src/lib.rs
pub mod animation; pub mod context_modification; pub mod debug; pub mod extract_xy; pub mod logic; pub mod memo; pub mod ops; // Re-export all nodes pub use animation::*; pub use context_modification::*; pub use debug::*; pub use extract_xy::*; pub use logic::*; pub use memo::*; pub use ops::*;
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/gcore/src/animation.rs
node-graph/nodes/gcore/src/animation.rs
use core_types::{Ctx, ExtractAnimationTime, ExtractPointer, ExtractRealTime}; use glam::DVec2; const DAY: f64 = 1000. * 3600. * 24.; #[derive(Debug, Clone, Copy, PartialEq, Eq, dyn_any::DynAny, Default, Hash, node_macro::ChoiceType, serde::Serialize, serde::Deserialize)] pub enum RealTimeMode { #[label("UTC")] Utc,...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/gcore/src/debug.rs
node-graph/nodes/gcore/src/debug.rs
use core_types::Ctx; use core_types::table::Table; use glam::{DAffine2, DVec2}; use raster_types::{CPU, Raster}; /// Meant for debugging purposes, not general use. Logs the input value to the console and passes it through unchanged. #[node_macro::node(category("Debug"), name("Log to Console"))] fn log_to_console<T: st...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/gcore/src/memo.rs
node-graph/nodes/gcore/src/memo.rs
use core_types::memo::*; use core_types::{Node, WasmNotSend}; use dyn_any::DynFuture; use std::future::Future; use std::hash::DefaultHasher; use std::hash::{Hash, Hasher}; use std::sync::Arc; use std::sync::Mutex; /// Caches the output of a given node called with a specific input. /// /// A cache miss occurs when the ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/gcore/src/context_modification.rs
node-graph/nodes/gcore/src/context_modification.rs
use core::f64; use core_types::context::{CloneVarArgs, Context, ContextFeatures, Ctx, ExtractAll}; use core_types::table::Table; use core_types::transform::Footprint; use core_types::uuid::NodeId; use core_types::{Color, OwnedContextImpl}; use glam::{DAffine2, DVec2}; use graphic_types::{Artboard, Graphic, Vector, vect...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/gcore/src/ops.rs
node-graph/nodes/gcore/src/ops.rs
use core_types::{Ctx, ExtractFootprint, ops::Convert, transform::Footprint}; use std::marker::PhantomData; // Re-export TypeNode from core-types for convenience pub use core_types::ops::TypeNode; // TODO: Rename to "Passthrough" /// Passes-through the input value without changing it. /// This is useful for rerouting ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/gcore/src/logic.rs
node-graph/nodes/gcore/src/logic.rs
use core_types::Color; use core_types::registry::types::TextArea; use core_types::table::Table; use core_types::{Context, Ctx}; use glam::{DAffine2, DVec2}; use graphic_types::{Artboard, Graphic, Vector, vector_types::GradientStops}; use raster_types::{CPU, GPU, Raster}; /// Type-asserts a value to be a string. #[node...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/math/src/lib.rs
node-graph/nodes/math/src/lib.rs
use core_types::registry::types::{Fraction, Percentage, PixelSize, TextArea}; use core_types::table::Table; use core_types::transform::Footprint; use core_types::{Color, Ctx, num_traits}; use glam::{DAffine2, DVec2}; use log::warn; use math_parser::ast; use math_parser::context::{EvalContext, NothingMap, ValueProvider}...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/graphic/src/lib.rs
node-graph/nodes/graphic/src/lib.rs
pub mod artboard; pub mod graphic; // Re-export all nodes pub use artboard::*; pub use graphic::*;
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/graphic/src/artboard.rs
node-graph/nodes/graphic/src/artboard.rs
use core_types::{CloneVarArgs, Color, Context, Ctx, ExtractAll, OwnedContextImpl, table::Table, transform::TransformMut}; use glam::{DAffine2, DVec2, IVec2}; use graphic_types::{ Artboard, Vector, graphic::{Graphic, IntoGraphicTable}, }; use raster_types::{CPU, GPU, Raster}; use vector_types::GradientStops; /// Cons...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/graphic/src/graphic.rs
node-graph/nodes/graphic/src/graphic.rs
use core_types::Color; use core_types::Ctx; use core_types::registry::types::SignedInteger; use core_types::table::{Table, TableRow}; use core_types::uuid::NodeId; use glam::{DAffine2, DVec2}; use graphic_types::graphic::{Graphic, IntoGraphicTable}; use graphic_types::{Artboard, Vector}; use raster_types::{CPU, GPU, Ra...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/gradient_map.rs
node-graph/nodes/raster/src/gradient_map.rs
//! Not immediately shader compatible due to needing [`GradientStops`] as a param, which needs [`Vec`] use crate::adjust::Adjust; use core_types::table::Table; use core_types::{Color, Ctx}; use raster_types::{CPU, Raster}; use vector_types::GradientStops; // Aims for interoperable compatibility with: // https://www.a...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/lib.rs
node-graph/nodes/raster/src/lib.rs
#![cfg_attr(not(feature = "std"), no_std)] pub mod adjust; pub mod adjustments; pub mod blending_nodes; pub mod cubic_spline; pub mod fullscreen_vertex; /// required by shader macro #[cfg(feature = "shader-nodes")] pub use raster_nodes_shaders::WGSL_SHADER; #[cfg(feature = "std")] pub mod curve; #[cfg(feature = "std...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/filter.rs
node-graph/nodes/raster/src/filter.rs
use core_types::color::Color; use core_types::context::Ctx; use core_types::registry::types::PixelLength; use core_types::table::Table; use raster_types::Image; use raster_types::{Bitmap, BitmapMut}; use raster_types::{CPU, Raster}; /// Blurs the image with a Gaussian or blur kernel filter. #[node_macro::node(category...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/dehaze.rs
node-graph/nodes/raster/src/dehaze.rs
use core_types::context::Ctx; use core_types::registry::types::Percentage; use core_types::table::Table; use image::{DynamicImage, GenericImage, GenericImageView, GrayImage, ImageBuffer, Luma, Rgba, RgbaImage}; use ndarray::{Array2, ArrayBase, Dim, OwnedRepr}; use raster_types::Image; use raster_types::{CPU, Raster}; u...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/std_nodes.rs
node-graph/nodes/raster/src/std_nodes.rs
use crate::adjustments::{CellularDistanceFunction, CellularReturnType, DomainWarpType, FractalType, NoiseType}; use core_types::blending::AlphaBlending; use core_types::color::Color; use core_types::color::{Alpha, AlphaMut, Channel, LinearChannel, Luminance, RGBMut}; use core_types::context::{Ctx, ExtractFootprint}; us...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/curve.rs
node-graph/nodes/raster/src/curve.rs
use core_types::Node; use core_types::color::{Channel, Linear, LuminanceMut}; use dyn_any::{DynAny, StaticType, StaticTypeSized}; use std::hash::{Hash, Hasher}; use std::ops::{Add, Mul, Sub}; #[derive(Debug, Clone, PartialEq, DynAny, specta::Type, serde::Serialize, serde::Deserialize)] pub struct Curve { #[serde(rena...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/fullscreen_vertex.rs
node-graph/nodes/raster/src/fullscreen_vertex.rs
use glam::{Vec2, Vec4}; use spirv_std::spirv; /// webgpu NDC is like OpenGL: (-1.0 .. 1.0, -1.0 .. 1.0, 0.0 .. 1.0) /// https://www.w3.org/TR/webgpu/#coordinate-systems /// /// So to make a fullscreen triangle around a box at (-1..1): /// /// ```text /// 3 + /// |\ /// 2 | \ /// | \ /// 1 +-----+ /// |...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/cubic_spline.rs
node-graph/nodes/raster/src/cubic_spline.rs
#[derive(Debug)] pub struct CubicSplines { pub x: [f32; 4], pub y: [f32; 4], } impl CubicSplines { pub fn solve(&self) -> [f32; 4] { let (x, y) = (&self.x, &self.y); // Build an augmented matrix to solve the system of equations using Gaussian elimination let mut augmented_matrix = [ [ 2. / (x[1] - x[0...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/adjustments.rs
node-graph/nodes/raster/src/adjustments.rs
#![allow(clippy::too_many_arguments)] use crate::adjust::Adjust; use crate::cubic_spline::CubicSplines; use core::fmt::Debug; #[cfg(feature = "std")] use core_types::table::Table; use glam::{Vec3, Vec4}; use no_std_types::color::Color; use no_std_types::context::Ctx; use no_std_types::registry::types::{AngleF32, Perce...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
true
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/blending_nodes.rs
node-graph/nodes/raster/src/blending_nodes.rs
use crate::adjust::Adjust; #[cfg(feature = "std")] use core_types::table::Table; use no_std_types::Ctx; use no_std_types::blending::BlendMode; use no_std_types::color::{Color, Pixel}; use no_std_types::registry::types::PercentageF32; #[cfg(feature = "std")] use raster_types::{CPU, Raster}; #[cfg(feature = "std")] use v...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/adjust.rs
node-graph/nodes/raster/src/adjust.rs
use no_std_types::color::Color; pub trait Adjust<P> { fn adjust(&mut self, map_fn: impl Fn(&P) -> P); } impl Adjust<Color> for Color { fn adjust(&mut self, map_fn: impl Fn(&Color) -> Color) { *self = map_fn(self); } } #[cfg(feature = "std")] mod adjust_std { use super::*; use core_types::table::Table; use ras...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/generate_curves.rs
node-graph/nodes/raster/src/generate_curves.rs
use crate::curve::{Curve, CurveManipulatorGroup, ValueMapperNode}; use core_types::color::{Channel, Linear}; use core_types::context::Ctx; use kurbo::{CubicBez, ParamCurve, PathSeg, Point}; use vector_types::vector::algorithms::bezpath_algorithms::pathseg_find_tvalues_for_x; const WINDOW_SIZE: usize = 1024; #[node_ma...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/src/image_color_palette.rs
node-graph/nodes/raster/src/image_color_palette.rs
use core_types::color::Color; use core_types::context::Ctx; use core_types::table::{Table, TableRow}; use raster_types::{CPU, Raster}; #[node_macro::node(category("Color"))] async fn image_color_palette( _: impl Ctx, image: Table<Raster<CPU>>, #[hard_min(1.)] #[soft_max(28.)] max_size: u32, ) -> Table<Color> { c...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/shaders/build.rs
node-graph/nodes/raster/shaders/build.rs
use cargo_gpu::InstalledBackend; use cargo_gpu::spirv_builder::{MetadataPrintout, SpirvMetadata}; use std::path::PathBuf; pub fn main() -> Result<(), Box<dyn std::error::Error>> { env_logger::builder().filter_level(log::LevelFilter::Debug).init(); // Skip building the shader if they are provided externally println...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/shaders/src/lib.rs
node-graph/nodes/raster/shaders/src/lib.rs
pub const WGSL_SHADER: &str = include_str!(env!("RASTER_NODES_SHADER_PATH"));
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/raster/shaders/entrypoint/src/lib.rs
node-graph/nodes/raster/shaders/entrypoint/src/lib.rs
#![no_std] pub use raster_nodes::*;
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/transform/src/lib.rs
node-graph/nodes/transform/src/lib.rs
pub mod transform_nodes; // Re-export for convenience pub use core_types as gcore; pub use graphic_types; pub use transform_nodes::*; pub use vector_types;
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/transform/src/transform_nodes.rs
node-graph/nodes/transform/src/transform_nodes.rs
use core::f64; use core_types::color::Color; use core_types::table::Table; use core_types::transform::{ApplyTransform, Transform}; use core_types::{CloneVarArgs, Context, Ctx, ExtractAll, InjectFootprint, ModifyFootprint, OwnedContextImpl}; use glam::{DAffine2, DMat2, DVec2}; use graphic_types::Graphic; use graphic_typ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/vector/src/vector_nodes.rs
node-graph/nodes/vector/src/vector_nodes.rs
use core::f64::consts::PI; use core::hash::{Hash, Hasher}; use core_types::bounds::{BoundingBox, RenderBoundingBox}; use core_types::registry::types::{Angle, IntegerCount, Length, Multiplier, Percentage, PixelLength, PixelSize, Progression, SeedValue}; use core_types::table::{Table, TableRow, TableRowMut}; use core_typ...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
true
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/vector/src/lib.rs
node-graph/nodes/vector/src/lib.rs
pub mod generator_nodes; pub mod instance; pub mod vector_modification_nodes; mod vector_nodes; #[macro_use] extern crate log; // Re-export for convenience pub use core_types as gcore; pub use generator_nodes::*; pub use graphic_types; pub use instance::*; pub use vector_modification_nodes::*; pub use vector_nodes::*...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/vector/src/vector_modification_nodes.rs
node-graph/nodes/vector/src/vector_modification_nodes.rs
use core_types::Ctx; use core_types::table::Table; use core_types::uuid::NodeId; use glam::DAffine2; use graphic_types::Vector; use vector_types::vector::VectorModification; /// Applies a differential modification to a vector path, associating changes made by the Pen and Path tools to indices of edited points and segm...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/vector/src/generator_nodes.rs
node-graph/nodes/vector/src/generator_nodes.rs
use core_types::Ctx; use core_types::registry::types::{Angle, PixelSize}; use core_types::table::Table; use glam::DVec2; use graphic_types::Vector; use vector_types::subpath; use vector_types::vector::misc::{ArcType, AsU64, GridType}; use vector_types::vector::misc::{HandleId, SpiralType}; use vector_types::vector::{Po...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/vector/src/instance.rs
node-graph/nodes/vector/src/instance.rs
use core_types::Color; use core_types::table::{Table, TableRowRef}; use core_types::{CloneVarArgs, Context, Ctx, ExtractAll, ExtractIndex, ExtractVarArgs, InjectVarArgs, OwnedContextImpl}; use glam::DVec2; use graphic_types::Graphic; use graphic_types::Vector; use graphic_types::raster_types::{CPU, Raster}; use vector_...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false
GraphiteEditor/Graphite
https://github.com/GraphiteEditor/Graphite/blob/42440c0d0bcf5735b05d8a9e5bd27187f74b1589/node-graph/nodes/brush/src/brush_stroke.rs
node-graph/nodes/brush/src/brush_stroke.rs
use core_types::blending::BlendMode; use core_types::color::Color; use core_types::math::bbox::AxisAlignedBbox; use dyn_any::DynAny; use glam::DVec2; use std::hash::{Hash, Hasher}; /// The style of a brush. #[derive(Clone, Debug, DynAny, serde::Serialize, serde::Deserialize)] pub struct BrushStyle { pub color: Color,...
rust
Apache-2.0
42440c0d0bcf5735b05d8a9e5bd27187f74b1589
2026-01-04T15:38:29.103662Z
false