From f604e610551058e2889c1fb78962f8c548c64081 Mon Sep 17 00:00:00 2001 From: Nalin Date: Sat, 5 Jul 2025 00:15:30 +0530 Subject: [PATCH 01/29] Bounty: Use SVG's for common cursors (Custom cursor functionality) #630 Open --- Cargo.lock | 177 ++++++++++- apps/desktop/src-tauri/tauri.conf.json | 12 +- apps/desktop/src/cursors/arrow.svg | 20 ++ apps/desktop/src/cursors/crosshair.svg | 22 ++ apps/desktop/src/cursors/ibeam.svg | 22 ++ apps/desktop/src/cursors/pointing-hand.svg | 31 ++ apps/desktop/src/cursors/resize-ew.svg | 20 ++ apps/desktop/src/cursors/resize-nwse.svg | 40 +++ .../src/routes/editor/ConfigSidebar.tsx | 82 +++--- crates/project/src/configuration.rs | 2 + crates/rendering/Cargo.toml | 2 + crates/rendering/src/cursor_svg.rs | 276 ++++++++++++++++++ crates/rendering/src/cursor_svg_tests.rs | 269 +++++++++++++++++ .../rendering/src/cursor_texture_manager.rs | 251 ++++++++++++++++ crates/rendering/src/layers/cursor.rs | 4 +- crates/rendering/src/lib.rs | 102 ++----- 16 files changed, 1217 insertions(+), 115 deletions(-) create mode 100644 apps/desktop/src/cursors/arrow.svg create mode 100644 apps/desktop/src/cursors/crosshair.svg create mode 100644 apps/desktop/src/cursors/ibeam.svg create mode 100644 apps/desktop/src/cursors/pointing-hand.svg create mode 100644 apps/desktop/src/cursors/resize-ew.svg create mode 100644 apps/desktop/src/cursors/resize-nwse.svg create mode 100644 crates/rendering/src/cursor_svg.rs create mode 100644 crates/rendering/src/cursor_svg_tests.rs create mode 100644 crates/rendering/src/cursor_texture_manager.rs diff --git a/Cargo.lock b/Cargo.lock index 263dd086307..cd71d579330 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,6 +239,12 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.6" @@ -1218,9 +1224,11 @@ dependencies = [ "log", "pretty_assertions", "reactive_graph", + "resvg", "serde", "specta", "thiserror 1.0.69", + "tiny-skia", "tokio", "tracing", "wgpu", @@ -2010,7 +2018,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2" dependencies = [ "bitflags 2.9.0", - "fontdb", + "fontdb 0.16.2", "log", "rangemap", "rayon", @@ -2788,6 +2796,12 @@ dependencies = [ "miniz_oxide 0.8.0", ] +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" + [[package]] name = "flume" version = "0.10.14" @@ -2851,6 +2865,20 @@ dependencies = [ "ttf-parser 0.20.0", ] +[[package]] +name = "fontdb" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2", + "slotmap", + "tinyvec", + "ttf-parser 0.21.1", +] + [[package]] name = "foreign-types" version = "0.3.2" @@ -3881,6 +3909,12 @@ dependencies = [ "quick-error", ] +[[package]] +name = "imagesize" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" + [[package]] name = "imgref" version = "1.10.1" @@ -4154,6 +4188,16 @@ dependencies = [ "selectors", ] +[[package]] +name = "kurbo" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1077d333efea6170d9ccb96d3c3026f300ca0773da4938cc4c811daa6df68b0c" +dependencies = [ + "arrayvec", + "smallvec", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -5677,7 +5721,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -5686,7 +5730,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -5695,9 +5739,15 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + [[package]] name = "pin-project" version = "1.1.5" @@ -6413,6 +6463,22 @@ dependencies = [ "windows-registry 0.2.0", ] +[[package]] +name = "resvg" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "944d052815156ac8fa77eaac055220e95ba0b01fa8887108ca710c03805d9051" +dependencies = [ + "gif", + "jpeg-decoder", + "log", + "pico-args", + "rgb", + "svgtypes", + "tiny-skia", + "usvg", +] + [[package]] name = "rfd" version = "0.15.0" @@ -7149,12 +7215,27 @@ dependencies = [ "quote", ] +[[package]] +name = "simplecss" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" +dependencies = [ + "log", +] + [[package]] name = "siphasher" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + [[package]] name = "skia-bindings" version = "0.86.1" @@ -7213,9 +7294,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" @@ -7352,6 +7433,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +dependencies = [ + "float-cmp", +] + [[package]] name = "string_cache" version = "0.8.7" @@ -7402,6 +7492,16 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0193cc4331cfd2f3d2011ef287590868599a2f33c3e69bc22c1a3d3acf9e02fb" +[[package]] +name = "svgtypes" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc" +dependencies = [ + "kurbo", + "siphasher 1.0.1", +] + [[package]] name = "swash" version = "0.1.19" @@ -8392,6 +8492,32 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if 1.0.0", + "log", + "png", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -8870,6 +8996,12 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +[[package]] +name = "unicode-vo" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" + [[package]] name = "unicode-width" version = "0.1.13" @@ -8925,6 +9057,33 @@ dependencies = [ "url", ] +[[package]] +name = "usvg" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b84ea542ae85c715f07b082438a4231c3760539d902e11d093847a0b22963032" +dependencies = [ + "base64 0.22.1", + "data-url", + "flate2", + "fontdb 0.18.0", + "imagesize", + "kurbo", + "log", + "pico-args", + "roxmltree", + "rustybuzz", + "simplecss", + "siphasher 1.0.1", + "strict-num", + "svgtypes", + "tiny-skia-path", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", +] + [[package]] name = "utf-8" version = "0.7.6" @@ -10374,6 +10533,12 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "539a77ee7c0de333dcc6da69b177380a0b81e0dacfa4f7344c465a36871ee601" +[[package]] +name = "xmlwriter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" + [[package]] name = "yansi" version = "1.0.1" diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 448fd064c06..21e0c579f37 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -15,7 +15,14 @@ "csp": "default-src 'self' ws: ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost data:; media-src 'self' asset: http://asset.localhost; script-src 'self' 'unsafe-eval' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'", "assetProtocol": { "enable": true, - "scope": ["$APPDATA/**", "**/*.jpg", "**/*.webp", "$RESOURCE/**", "**/*.riv", "$HOME/**"] + "scope": [ + "$APPDATA/**", + "**/*.jpg", + "**/*.webp", + "$RESOURCE/**", + "**/*.riv", + "$HOME/**" + ] } } }, @@ -44,7 +51,8 @@ "assets/backgrounds/dark/*": "assets/backgrounds/dark/", "assets/backgrounds/orange/*": "assets/backgrounds/orange/", "assets/backgrounds/purple/*": "assets/backgrounds/purple/", - "../src/assets/rive/*.riv": "assets/rive/" + "../src/assets/rive/*.riv": "assets/rive/", + "../src/cursors/*.svg": "cursors/" }, "macOS": { "dmg": { diff --git a/apps/desktop/src/cursors/arrow.svg b/apps/desktop/src/cursors/arrow.svg new file mode 100644 index 00000000000..21b101c2e4a --- /dev/null +++ b/apps/desktop/src/cursors/arrow.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/apps/desktop/src/cursors/crosshair.svg b/apps/desktop/src/cursors/crosshair.svg new file mode 100644 index 00000000000..1404ea40b11 --- /dev/null +++ b/apps/desktop/src/cursors/crosshair.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/desktop/src/cursors/ibeam.svg b/apps/desktop/src/cursors/ibeam.svg new file mode 100644 index 00000000000..fe9f77e7022 --- /dev/null +++ b/apps/desktop/src/cursors/ibeam.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/desktop/src/cursors/pointing-hand.svg b/apps/desktop/src/cursors/pointing-hand.svg new file mode 100644 index 00000000000..b7c20f45098 --- /dev/null +++ b/apps/desktop/src/cursors/pointing-hand.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/desktop/src/cursors/resize-ew.svg b/apps/desktop/src/cursors/resize-ew.svg new file mode 100644 index 00000000000..9003670f699 --- /dev/null +++ b/apps/desktop/src/cursors/resize-ew.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/apps/desktop/src/cursors/resize-nwse.svg b/apps/desktop/src/cursors/resize-nwse.svg new file mode 100644 index 00000000000..ee98f38a6bf --- /dev/null +++ b/apps/desktop/src/cursors/resize-nwse.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/desktop/src/routes/editor/ConfigSidebar.tsx b/apps/desktop/src/routes/editor/ConfigSidebar.tsx index eddb0837d16..9a84ce2aead 100644 --- a/apps/desktop/src/routes/editor/ConfigSidebar.tsx +++ b/apps/desktop/src/routes/editor/ConfigSidebar.tsx @@ -241,7 +241,7 @@ export function ConfigSidebar() { id: TAB_IDS.camera, icon: IconCapCamera, disabled: editorInstance.recordings.segments.every( - (s) => s.camera === null + (s) => s.camera === null, ), }, { id: TAB_IDS.audio, icon: IconCapAudioOn }, @@ -275,7 +275,7 @@ export function ConfigSidebar() { class={cx( "flex justify-center relative border-transparent border z-10 items-center rounded-md size-9 transition will-change-transform", state.selectedTab !== item.id && - "group-hover:border-gray-300 group-disabled:border-none" + "group-hover:border-gray-300 group-disabled:border-none", )} > @@ -313,7 +313,7 @@ export function ConfigSidebar() { optionValue="value" optionTextValue="name" value={STEREO_MODES.find( - (v) => v.value === project.audio.micStereoMode + (v) => v.value === project.audio.micStereoMode, )} onChange={(v) => { if (v) setProject("audio", "micStereoMode", v.value); @@ -480,6 +480,18 @@ export function ConfigSidebar() { + } + value={ + { + setProject("cursor", "useSvg" as any, value); + }} + /> + } + /> {/* @@ -660,7 +672,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { // Get the raw path without any URL prefixes const rawPath = decodeURIComponent( - photoUrl.replace("file://", "") + photoUrl.replace("file://", ""), ); debouncedSetProject(rawPath); @@ -720,7 +732,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { } }, }, - { passive: false } + { passive: false }, ); let fileInput!: HTMLInputElement; @@ -886,7 +898,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { project.background.source.path ) { const convertedPath = convertFileSrc( - project.background.source.path + project.background.source.path, ); // Only use converted path if it's valid if (convertedPath) { @@ -904,7 +916,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { project.background.source as { path?: string; } - ).path?.includes(w.id) + ).path?.includes(w.id), ); // Only use wallpaper URL if it exists if (selectedWallpaper?.url) { @@ -971,7 +983,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { setBackgroundTab( - key as keyof typeof BACKGROUND_THEMES + key as keyof typeof BACKGROUND_THEMES, ) } value={key} @@ -988,17 +1000,17 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { + ? (wallpapers()?.find((w) => ( project.background.source as { path?: string } - ).path?.includes(w.id) - )?.url ?? undefined + ).path?.includes(w.id), + )?.url ?? undefined) : undefined } onChange={(photoUrl) => { try { const wallpaper = wallpapers()?.find( - (w) => w.url === photoUrl + (w) => w.url === photoUrl, ); if (!wallpaper) return; @@ -1199,7 +1211,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { setProject( "background", "source", - backgrounds.color + backgrounds.color, ); } }} @@ -1283,7 +1295,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { const rawNewAngle = Math.round( start + - (downEvent.clientY - moveEvent.clientY) + (downEvent.clientY - moveEvent.clientY), ) % max; const newAngle = moveEvent.shiftKey ? rawNewAngle @@ -1298,7 +1310,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { ) { commands.performHapticFeedback( "Alignment", - "Now" + "Now", ); } @@ -1308,7 +1320,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { newAngle < 0 ? newAngle + max : newAngle, }); }, - }) + }), ); }} > @@ -1333,7 +1345,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { setProject( "background", "source", - backgrounds.gradient + backgrounds.gradient, ); } }} @@ -1342,7 +1354,7 @@ function BackgroundConfig(props: { scrollRef: HTMLDivElement }) { class="rounded-lg transition-all duration-200 cursor-pointer size-8 peer-checked:hover:opacity-100 peer-hover:opacity-70 peer-checked:ring-2 peer-checked:ring-gray-500 peer-checked:ring-offset-2 peer-checked:ring-offset-gray-200" style={{ background: `linear-gradient(${angle()}deg, rgb(${gradient.from.join( - "," + ",", )}), rgb(${gradient.to.join(",")}))`, }} /> @@ -1506,9 +1518,9 @@ function CameraConfig(props: { scrollRef: HTMLDivElement }) { item.x === "left" ? "left-2" : item.x === "right" - ? "right-2" - : "left-1/2 transform -translate-x-1/2", - item.y === "top" ? "top-2" : "bottom-2" + ? "right-2" + : "left-1/2 transform -translate-x-1/2", + item.y === "top" ? "top-2" : "bottom-2", )} onClick={() => setProject("camera", "position", item)} > @@ -1537,7 +1549,7 @@ function CameraConfig(props: { scrollRef: HTMLDivElement }) { optionValue="value" optionTextValue="name" value={CAMERA_SHAPES.find( - (v) => v.value === project.camera.shape + (v) => v.value === project.camera.shape, )} onChange={(v) => { if (v) setProject("camera", "shape", v.value); @@ -1744,7 +1756,7 @@ function ZoomSegmentConfig(props: { "zoomSegments", props.segmentIndex, "amount", - v[0] + v[0], ) } minValue={1} @@ -1763,7 +1775,7 @@ function ZoomSegmentConfig(props: { "zoomSegments", props.segmentIndex, "mode", - v === "auto" ? "auto" : { manual: states.manual } + v === "auto" ? "auto" : { manual: states.manual }, ); }} > @@ -1804,7 +1816,7 @@ function ZoomSegmentConfig(props: { const st = start(); let i = project.timeline?.segments.findIndex( - (s) => s.start <= st && s.end > st + (s) => s.start <= st && s.end > st, ); if (i === undefined || i === -1) return 0; return i; @@ -1816,7 +1828,7 @@ function ZoomSegmentConfig(props: { // TODO: this shouldn't be so hardcoded `${ editorInstance.path - }/content/segments/segment-${segmentIndex()}/display.mp4` + }/content/segments/segment-${segmentIndex()}/display.mp4`, ); }); @@ -1834,8 +1846,8 @@ function ZoomSegmentConfig(props: { }, () => { render(); - } - ) + }, + ), ); const render = () => { @@ -1850,7 +1862,7 @@ function ZoomSegmentConfig(props: { 0, 0, canvasRef.width!, - canvasRef.height! + canvasRef.height!, ); }; @@ -1913,19 +1925,19 @@ function ZoomSegmentConfig(props: { Math.min( (moveEvent.clientX - bounds.left) / bounds.width, - 1 + 1, ), - 0 + 0, ), y: Math.max( Math.min( (moveEvent.clientY - bounds.top) / bounds.height, - 1 + 1, ), - 0 + 0, ), - } + }, ); }, }); @@ -1989,7 +2001,7 @@ function ClipSegmentConfig(props: { disabled={ ( project.timeline?.segments.filter( - (s) => s.recordingSegment === props.segment.recordingSegment + (s) => s.recordingSegment === props.segment.recordingSegment, ) ?? [] ).length < 2 } diff --git a/crates/project/src/configuration.rs b/crates/project/src/configuration.rs index 3e29d07c342..cc8b109719c 100644 --- a/crates/project/src/configuration.rs +++ b/crates/project/src/configuration.rs @@ -354,6 +354,8 @@ pub struct CursorConfiguration { pub raw: bool, #[serde(default)] pub motion_blur: f32, + #[serde(default = "CursorConfiguration::default_use_svg")] + pub use_svg: bool, } impl Default for CursorConfiguration { diff --git a/crates/rendering/Cargo.toml b/crates/rendering/Cargo.toml index b199d7a7ea8..ce507f60fa4 100644 --- a/crates/rendering/Cargo.toml +++ b/crates/rendering/Cargo.toml @@ -28,6 +28,8 @@ bezier_easing = "0.1.1" reactive_graph = "0.1.5" glyphon = "0.6.0" tracing.workspace = true +resvg = "0.42" +tiny-skia = "0.11" [target.'cfg(target_os = "macos")'.dependencies] cidre.workspace = true diff --git a/crates/rendering/src/cursor_svg.rs b/crates/rendering/src/cursor_svg.rs new file mode 100644 index 00000000000..5e58c500a12 --- /dev/null +++ b/crates/rendering/src/cursor_svg.rs @@ -0,0 +1,276 @@ +use std::collections::HashMap; +use std::path::Path; + +// Common cursor types that we support with SVG versions +#[derive(Debug, Clone, PartialEq, Hash)] +pub enum CommonCursorType { + Arrow, + IBeam, + Crosshair, + PointingHand, + ResizeNWSE, // Diagonal resize (northwest-southeast) + ResizeEW, // Horizontal resize (east-west) + // Add more as needed +} + +impl CommonCursorType { + /// Get the SVG filename for this cursor type + pub fn svg_filename(&self) -> &'static str { + match self { + CommonCursorType::Arrow => "arrow.svg", + CommonCursorType::IBeam => "ibeam.svg", + CommonCursorType::Crosshair => "crosshair.svg", + CommonCursorType::PointingHand => "pointing-hand.svg", + CommonCursorType::ResizeNWSE => "resize-nwse.svg", + CommonCursorType::ResizeEW => "resize-ew.svg", + } + } + + /// Detect cursor type from image data (simplified heuristic approach) + /// In a real implementation, this could use more sophisticated image analysis + pub fn detect_from_image(image_data: &[u8], width: u32, height: u32) -> Option { + // For now, we'll use simple heuristics based on size and basic pattern detection + // This is a placeholder - in production you might want more sophisticated detection + + // Arrow cursor is typically around 32x32 or similar + if width <= 40 && height <= 40 { + // Simple pattern matching - this could be made more sophisticated + if Self::matches_arrow_pattern(image_data, width, height) { + return Some(CommonCursorType::Arrow); + } + } + + // I-beam cursors are typically thin and tall + if width < height && width <= 20 && height >= 20 { + if Self::matches_ibeam_pattern(image_data, width, height) { + return Some(CommonCursorType::IBeam); + } + } + + // Crosshair cursors are typically square and have cross pattern + if (width as i32 - height as i32).abs() <= 5 && width >= 20 && width <= 40 { + if Self::matches_crosshair_pattern(image_data, width, height) { + return Some(CommonCursorType::Crosshair); + } + } + + // Pointing hand cursors are typically wider and have a specific shape + if width >= 20 && height >= 20 && width <= 40 && height <= 40 { + if Self::matches_hand_pattern(image_data, width, height) { + return Some(CommonCursorType::PointingHand); + } + } + + // Resize cursors - typically have arrow patterns + if width >= 16 && height >= 16 && width <= 40 && height <= 40 { + if Self::matches_resize_pattern(image_data, width, height) { + // For simplicity, default to diagonal resize + // More sophisticated detection could distinguish between different resize types + return Some(CommonCursorType::ResizeNWSE); + } + } + + None + } + + /// Simple pattern matching for arrow cursor + /// Look for typical arrow shape - pointed top-left, wider bottom-right + fn matches_arrow_pattern(image_data: &[u8], width: u32, height: u32) -> bool { + // This is a very simplified check + // In practice, you'd want more sophisticated pattern recognition + + if image_data.len() < (width * height * 4) as usize { + return false; + } + + // Check if there's a diagonal pattern from top-left + let mut non_transparent_pixels = 0; + let mut top_left_pixels = 0; + + for y in 0..height { + for x in 0..width { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + let alpha = image_data[idx + 3]; + if alpha > 128 { // Not transparent + non_transparent_pixels += 1; + if x <= width / 3 && y <= height / 3 { + top_left_pixels += 1; + } + } + } + } + } + + // Arrow should have most pixels in top-left area + non_transparent_pixels > 0 && top_left_pixels as f32 / non_transparent_pixels as f32 > 0.3 + } + + /// Simple pattern matching for I-beam cursor + fn matches_ibeam_pattern(image_data: &[u8], width: u32, height: u32) -> bool { + if image_data.len() < (width * height * 4) as usize { + return false; + } + + // I-beam should have pixels mostly in vertical center column + let center_x = width / 2; + let mut center_column_pixels = 0; + let mut total_pixels = 0; + + for y in 0..height { + for x in 0..width { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + let alpha = image_data[idx + 3]; + if alpha > 128 { + total_pixels += 1; + if (x as i32 - center_x as i32).abs() <= 2 { + center_column_pixels += 1; + } + } + } + } + } + + total_pixels > 0 && center_column_pixels as f32 / total_pixels as f32 > 0.6 + } + + /// Simple pattern matching for crosshair cursor + fn matches_crosshair_pattern(image_data: &[u8], width: u32, height: u32) -> bool { + if image_data.len() < (width * height * 4) as usize { + return false; + } + + let center_x = width / 2; + let center_y = height / 2; + let mut cross_pixels = 0; + let mut total_pixels = 0; + + for y in 0..height { + for x in 0..width { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + let alpha = image_data[idx + 3]; + if alpha > 128 { + total_pixels += 1; + // Check if pixel is on horizontal or vertical line through center + if (x as i32 - center_x as i32).abs() <= 2 || (y as i32 - center_y as i32).abs() <= 2 { + cross_pixels += 1; + } + } + } + } + } + + total_pixels > 0 && cross_pixels as f32 / total_pixels as f32 > 0.5 + } + + /// Simple pattern matching for pointing hand cursor + fn matches_hand_pattern(image_data: &[u8], width: u32, height: u32) -> bool { + if image_data.len() < (width * height * 4) as usize { + return false; + } + + // Hand cursors typically have more pixels in the bottom half + let mut top_half_pixels = 0; + let mut bottom_half_pixels = 0; + let mid_y = height / 2; + + for y in 0..height { + for x in 0..width { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + let alpha = image_data[idx + 3]; + if alpha > 128 { + if y < mid_y { + top_half_pixels += 1; + } else { + bottom_half_pixels += 1; + } + } + } + } + } + + // Hand cursor should have more pixels in bottom half + bottom_half_pixels > top_half_pixels && bottom_half_pixels > 50 + } + + /// Simple pattern matching for resize cursors + /// Look for arrow-like patterns in corners or edges + fn matches_resize_pattern(image_data: &[u8], width: u32, height: u32) -> bool { + if image_data.len() < (width * height * 4) as usize { + return false; + } + + // Resize cursors typically have arrow patterns pointing in opposite directions + let mut corner_pixels = 0; + let mut edge_pixels = 0; + let mut total_pixels = 0; + + for y in 0..height { + for x in 0..width { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + let alpha = image_data[idx + 3]; + if alpha > 128 { + total_pixels += 1; + + // Check if pixel is in corners (typical for resize cursors) + let is_corner = (x < width / 4 && y < height / 4) || + (x > 3 * width / 4 && y > 3 * height / 4) || + (x < width / 4 && y > 3 * height / 4) || + (x > 3 * width / 4 && y < height / 4); + + if is_corner { + corner_pixels += 1; + } + + // Check if pixel is on edges (for line-based resize cursors) + let is_edge = x < 2 || x > width - 3 || y < 2 || y > height - 3; + if is_edge { + edge_pixels += 1; + } + } + } + } + } + + // Resize cursors should have significant corner or edge concentration + total_pixels > 20 && + (corner_pixels as f32 / total_pixels as f32 > 0.3 || + edge_pixels as f32 / total_pixels as f32 > 0.6) + } +} + +/// Map to store detected cursor types for cached lookup +pub type CursorTypeMap = HashMap; + +/// Load SVG content for a cursor type from bundled resources +pub fn load_cursor_svg(cursor_type: &CommonCursorType) -> Option> { + // In a Tauri app, we would use the resource API to load bundled SVGs + // For now, return the embedded SVG content as a fallback + let svg_content = match cursor_type { + CommonCursorType::Arrow => include_bytes!("../../../apps/desktop/src/cursors/arrow.svg"), + CommonCursorType::IBeam => include_bytes!("../../../apps/desktop/src/cursors/ibeam.svg"), + CommonCursorType::Crosshair => include_bytes!("../../../apps/desktop/src/cursors/crosshair.svg"), + CommonCursorType::PointingHand => include_bytes!("../../../apps/desktop/src/cursors/pointing-hand.svg"), + CommonCursorType::ResizeNWSE => include_bytes!("../../../apps/desktop/src/cursors/resize-nwse.svg"), + CommonCursorType::ResizeEW => include_bytes!("../../../apps/desktop/src/cursors/resize-ew.svg"), + }; + + Some(svg_content.to_vec()) +} + +/// Analyze a cursor image and try to detect its type +pub fn analyze_cursor_image(image_path: &Path) -> Option { + // Load the image and analyze it + if let Ok(img) = image::open(image_path) { + let rgba = img.to_rgba8(); + let (width, height) = img.dimensions(); + CommonCursorType::detect_from_image(&rgba.into_raw(), width, height) + } else { + None + } +} + diff --git a/crates/rendering/src/cursor_svg_tests.rs b/crates/rendering/src/cursor_svg_tests.rs new file mode 100644 index 00000000000..0d72abd045d --- /dev/null +++ b/crates/rendering/src/cursor_svg_tests.rs @@ -0,0 +1,269 @@ +#[cfg(test)] +mod tests { + use super::super::cursor_svg::*; + + #[test] + fn test_arrow_cursor_detection() { + // Create a simple arrow pattern: mostly pixels in top-left + let width = 32; + let height = 32; + let mut image_data = vec![0u8; (width * height * 4) as usize]; + + // Add some pixels in the top-left area to simulate arrow + for y in 0..height / 3 { + for x in 0..width / 3 { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + image_data[idx] = 0; // R + image_data[idx + 1] = 0; // G + image_data[idx + 2] = 0; // B + image_data[idx + 3] = 255; // A (opaque) + } + } + } + + let detected = CommonCursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, Some(CommonCursorType::Arrow)); + } + + #[test] + fn test_ibeam_cursor_detection() { + // Create a vertical line pattern for I-beam + let width = 16; + let height = 32; + let mut image_data = vec![0u8; (width * height * 4) as usize]; + + // Add vertical line in center + let center_x = width / 2; + for y in 0..height { + for x in center_x.saturating_sub(1)..=center_x + 1 { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + image_data[idx] = 0; // R + image_data[idx + 1] = 0; // G + image_data[idx + 2] = 0; // B + image_data[idx + 3] = 255; // A (opaque) + } + } + } + + let detected = CommonCursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, Some(CommonCursorType::IBeam)); + } + + #[test] + fn test_crosshair_cursor_detection() { + // Create a cross pattern + let width = 24; + let height = 24; + let mut image_data = vec![0u8; (width * height * 4) as usize]; + + let center_x = width / 2; + let center_y = height / 2; + + // Horizontal line + for x in 0..width { + let idx = ((center_y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + image_data[idx + 3] = 255; // A (opaque) + } + } + + // Vertical line + for y in 0..height { + let idx = ((y * width + center_x) * 4) as usize; + if idx + 3 < image_data.len() { + image_data[idx + 3] = 255; // A (opaque) + } + } + + let detected = CommonCursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, Some(CommonCursorType::Crosshair)); + } + + #[test] + fn test_hand_cursor_detection() { + // Create a pattern with more pixels in bottom half (typical of hand cursors) + let width = 24; + let height = 24; + let mut image_data = vec![0u8; (width * height * 4) as usize]; + + let mid_y = height / 2; + + // Add more pixels in the bottom half + for y in mid_y..height { + for x in 4..width - 4 { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + image_data[idx] = 0; // R + image_data[idx + 1] = 0; // G + image_data[idx + 2] = 0; // B + image_data[idx + 3] = 255; // A (opaque) + } + } + } + + // Add some pixels in top half but fewer + for y in 0..mid_y / 2 { + for x in 8..width - 8 { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + image_data[idx + 3] = 255; // A (opaque) + } + } + } + + let detected = CommonCursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, Some(CommonCursorType::PointingHand)); + } + + #[test] + fn test_resize_cursor_detection() { + // Create a pattern with corner pixels (typical of resize cursors) + let width = 24; + let height = 24; + let mut image_data = vec![0u8; (width * height * 4) as usize]; + + // Add pixels in corners + let corner_size = width / 4; + + // Top-left corner + for y in 0..corner_size { + for x in 0..corner_size { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + image_data[idx + 3] = 255; // A (opaque) + } + } + } + + // Bottom-right corner + for y in (height - corner_size)..height { + for x in (width - corner_size)..width { + let idx = ((y * width + x) * 4) as usize; + if idx + 3 < image_data.len() { + image_data[idx + 3] = 255; // A (opaque) + } + } + } + + let detected = CommonCursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, Some(CommonCursorType::ResizeNWSE)); + } + + #[test] + fn test_unknown_cursor_pattern() { + // Create a random pattern that shouldn't match any known cursor + let width = 32; + let height = 32; + let mut image_data = vec![0u8; (width * height * 4) as usize]; + + // Add a few random pixels + for i in (0..100).step_by(10) { + if i * 4 + 3 < image_data.len() { + image_data[i * 4 + 3] = 255; // A (opaque) + } + } + + let detected = CommonCursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, None); + } + + #[test] + fn test_empty_image() { + // Test with completely transparent image + let width = 32; + let height = 32; + let image_data = vec![0u8; (width * height * 4) as usize]; // All transparent + + let detected = CommonCursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, None); + } + + #[test] + fn test_svg_filename_mapping() { + assert_eq!(CommonCursorType::Arrow.svg_filename(), "arrow.svg"); + assert_eq!(CommonCursorType::IBeam.svg_filename(), "ibeam.svg"); + assert_eq!(CommonCursorType::Crosshair.svg_filename(), "crosshair.svg"); + assert_eq!( + CommonCursorType::PointingHand.svg_filename(), + "pointing-hand.svg" + ); + assert_eq!( + CommonCursorType::ResizeNWSE.svg_filename(), + "resize-nwse.svg" + ); + assert_eq!(CommonCursorType::ResizeEW.svg_filename(), "resize-ew.svg"); + } + + #[test] + fn test_svg_loading() { + // Test that we can load SVG content for all cursor types + for cursor_type in [ + CommonCursorType::Arrow, + CommonCursorType::IBeam, + CommonCursorType::Crosshair, + CommonCursorType::PointingHand, + CommonCursorType::ResizeNWSE, + CommonCursorType::ResizeEW, + ] { + let svg_content = load_cursor_svg(&cursor_type); + assert!( + svg_content.is_some(), + "Failed to load SVG for {:?}", + cursor_type + ); + + if let Some(content) = svg_content { + assert!( + !content.is_empty(), + "SVG content is empty for {:?}", + cursor_type + ); + // Basic SVG validation + let content_str = String::from_utf8_lossy(&content); + assert!( + content_str.contains(""), + "Invalid SVG content for {:?}", + cursor_type + ); + } + } + } + + #[test] + fn test_cursor_pattern_edge_cases() { + // Test with very small images + let width = 4; + let height = 4; + let mut image_data = vec![0u8; (width * height * 4) as usize]; + + // Fill with opaque pixels + for i in 0..image_data.len() { + if i % 4 == 3 { + image_data[i] = 255; // Alpha channel + } + } + + let detected = CommonCursorType::detect_from_image(&image_data, width, height); + // Should not crash and return None for very small images + assert_eq!(detected, None); + } + + #[test] + fn test_cursor_pattern_with_invalid_data() { + // Test with insufficient data + let width = 32; + let height = 32; + let image_data = vec![0u8; 10]; // Much smaller than required + + let detected = CommonCursorType::detect_from_image(&image_data, width, height); + // Should handle gracefully and return None + assert_eq!(detected, None); + } +} diff --git a/crates/rendering/src/cursor_texture_manager.rs b/crates/rendering/src/cursor_texture_manager.rs new file mode 100644 index 00000000000..476d84f431c --- /dev/null +++ b/crates/rendering/src/cursor_texture_manager.rs @@ -0,0 +1,251 @@ +use crate::cursor_svg::{analyze_cursor_image, CommonCursorType}; +use cap_project::XY; +use std::collections::HashMap; +use std::path::Path; + +/// A cursor texture that can be either from a captured PNG or a high-quality SVG +#[derive(Debug)] +pub struct EnhancedCursorTexture { + pub inner: wgpu::Texture, + pub hotspot: XY, + pub source_type: CursorSourceType, + pub cursor_type: Option, +} + +#[derive(Debug, Clone)] +pub enum CursorSourceType { + /// Original captured cursor image + Captured, + /// High-quality SVG version + Svg, +} + +/// Enhanced cursor texture manager that prefers SVG versions when available +pub struct CursorTextureManager { + /// Map of cursor_id to detected cursor type + cursor_type_cache: HashMap>, + /// Loaded SVG textures by cursor type + svg_textures: HashMap, + /// Fallback captured textures by cursor_id + captured_textures: HashMap, +} + +impl CursorTextureManager { + pub fn new() -> Self { + Self { + cursor_type_cache: HashMap::new(), + svg_textures: HashMap::new(), + captured_textures: HashMap::new(), + } + } + + /// Get the best available texture for a cursor ID + /// Prefers SVG version if available, cursor type is detected, and SVG is enabled + pub fn get_texture(&self, cursor_id: &str, use_svg: bool) -> Option<&EnhancedCursorTexture> { + // First, check if we have a detected cursor type and SVG texture for it (and SVG is enabled) + if use_svg { + if let Some(Some(cursor_type)) = self.cursor_type_cache.get(cursor_id) { + if let Some(svg_texture) = self.svg_textures.get(cursor_type) { + return Some(svg_texture); + } + } + } + + // Fall back to captured texture + self.captured_textures.get(cursor_id) + } + + /// Load and analyze a captured cursor image + /// Detect its type and cache the result + pub fn load_captured_cursor( + &mut self, + device: &wgpu::Device, + queue: &wgpu::Queue, + cursor_id: String, + image_path: &Path, + hotspot: XY, + ) -> Result<(), String> { + // Analyze the cursor image to detect its type + let detected_type = analyze_cursor_image(image_path); + self.cursor_type_cache + .insert(cursor_id.clone(), detected_type); + + // Load the captured texture as fallback + let img = + image::open(image_path).map_err(|e| format!("Failed to load cursor image: {}", e))?; + + let rgba = img.to_rgba8(); + let dimensions = img.dimensions(); + + let size = wgpu::Extent3d { + width: dimensions.0, + height: dimensions.1, + depth_or_array_layers: 1, + }; + + let texture = device.create_texture(&wgpu::TextureDescriptor { + label: Some(&format!("Captured Cursor Texture {}", cursor_id)), + size, + mip_level_count: 1, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format: wgpu::TextureFormat::Rgba8UnormSrgb, + usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, + view_formats: &[], + }); + + queue.write_texture( + wgpu::ImageCopyTexture { + aspect: wgpu::TextureAspect::All, + texture: &texture, + mip_level: 0, + origin: wgpu::Origin3d::ZERO, + }, + &rgba, + wgpu::ImageDataLayout { + offset: 0, + bytes_per_row: Some(4 * dimensions.0), + rows_per_image: Some(dimensions.1), + }, + size, + ); + + let enhanced_texture = EnhancedCursorTexture { + inner: texture, + hotspot, + source_type: CursorSourceType::Captured, + cursor_type: detected_type, + }; + + self.captured_textures.insert(cursor_id, enhanced_texture); + Ok(()) + } + + /// Load an SVG cursor texture for a specific cursor type + pub fn load_svg_cursor( + &mut self, + device: &wgpu::Device, + queue: &wgpu::Queue, + cursor_type: CommonCursorType, + svg_content: &[u8], + size: u32, + ) -> Result<(), String> { + // Rasterize the SVG using resvg + let svg_data = + std::str::from_utf8(svg_content).map_err(|e| format!("Invalid UTF-8 in SVG: {}", e))?; + + let rtree = resvg::usvg::Tree::from_str(svg_data, &resvg::usvg::Options::default()) + .map_err(|e| format!("Failed to parse SVG: {}", e))?; + + let pixmap_size = rtree.size().to_int_size(); + let target_size = tiny_skia::IntSize::from_wh(size, size).ok_or("Invalid target size")?; + + let mut pixmap = tiny_skia::Pixmap::new(target_size.width(), target_size.height()) + .ok_or("Failed to create pixmap")?; + + // Calculate scale to fit the SVG into the target size while maintaining aspect ratio + let scale_x = target_size.width() as f32 / pixmap_size.width() as f32; + let scale_y = target_size.height() as f32 / pixmap_size.height() as f32; + let scale = scale_x.min(scale_y); + + let transform = tiny_skia::Transform::from_scale(scale, scale); + + resvg::render(&rtree, transform, &mut pixmap.as_mut()); + + // Convert pixmap to RGBA format for wgpu + let rgba_data: Vec = pixmap + .pixels() + .iter() + .flat_map(|pixel| { + let [b, g, r, a] = pixel.to_array(); + [r, g, b, a] + }) + .collect(); + + let texture_size = wgpu::Extent3d { + width: size, + height: size, + depth_or_array_layers: 1, + }; + + let texture = device.create_texture(&wgpu::TextureDescriptor { + label: Some(&format!("SVG Cursor Texture {:?}", cursor_type)), + size: texture_size, + mip_level_count: 1, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format: wgpu::TextureFormat::Rgba8UnormSrgb, + usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, + view_formats: &[], + }); + + queue.write_texture( + wgpu::ImageCopyTexture { + aspect: wgpu::TextureAspect::All, + texture: &texture, + mip_level: 0, + origin: wgpu::Origin3d::ZERO, + }, + &rgba_data, + wgpu::ImageDataLayout { + offset: 0, + bytes_per_row: Some(4 * size), + rows_per_image: Some(size), + }, + texture_size, + ); + + // Set default hotspot for SVG cursors based on type + let hotspot = match cursor_type { + CommonCursorType::Arrow => XY::new(0.1, 0.1), // Top-left point + CommonCursorType::IBeam => XY::new(0.5, 0.5), // Center + CommonCursorType::Crosshair => XY::new(0.5, 0.5), // Center + CommonCursorType::PointingHand => XY::new(0.3, 0.1), // Finger tip + CommonCursorType::ResizeNWSE => XY::new(0.5, 0.5), // Center + CommonCursorType::ResizeEW => XY::new(0.5, 0.5), // Center + }; + + let enhanced_texture = EnhancedCursorTexture { + inner: texture, + hotspot, + source_type: CursorSourceType::Svg, + cursor_type: Some(cursor_type), + }; + + self.svg_textures.insert(cursor_type, enhanced_texture); + Ok(()) + } + + /// Initialize all built-in SVG cursors + pub fn initialize_svg_cursors( + &mut self, + device: &wgpu::Device, + queue: &wgpu::Queue, + ) -> Result<(), String> { + use crate::cursor_svg::{load_cursor_svg, CommonCursorType}; + + // Load all the SVG cursors we have + let cursor_types = vec![ + CommonCursorType::Arrow, + CommonCursorType::IBeam, + CommonCursorType::Crosshair, + CommonCursorType::PointingHand, + CommonCursorType::ResizeNWSE, + CommonCursorType::ResizeEW, + ]; + + for cursor_type in cursor_types { + if let Some(svg_content) = load_cursor_svg(&cursor_type) { + // Use a higher resolution for SVG cursors (64x64) for better quality + self.load_svg_cursor(device, queue, cursor_type, &svg_content, 64)?; + } else { + return Err(format!( + "Failed to load SVG content for cursor type: {:?}", + cursor_type + )); + } + } + + Ok(()) + } +} diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rs index e348688b31c..11e27e170ef 100644 --- a/crates/rendering/src/layers/cursor.rs +++ b/crates/rendering/src/layers/cursor.rs @@ -208,8 +208,8 @@ impl CursorLayer { let motion_blur_amount = (speed * 0.3).min(1.0) * 0.0; // uniforms.project.cursor.motion_blur; let Some(cursor_texture) = constants - .cursor_textures - .get(&interpolated_cursor.cursor_id) + .cursor_texture_manager + .get_texture(&interpolated_cursor.cursor_id,!uniforms.project.cursor.raw && uniforms.project.cursor.use_svg) else { return; }; diff --git a/crates/rendering/src/lib.rs b/crates/rendering/src/lib.rs index 64bb6e5dbfc..02593c21094 100644 --- a/crates/rendering/src/lib.rs +++ b/crates/rendering/src/lib.rs @@ -6,6 +6,7 @@ use cap_project::{ use composite_frame::CompositeVideoFrameUniforms; use core::f64; use cursor_interpolation::{interpolate_cursor, InterpolatedCursorPosition}; +use cursor_texture_manager::{CursorTextureManager, EnhancedCursorTexture}; use decoder::{spawn_decoder, AsyncVideoDecoderHandle}; use frame_pipeline::finish_encoder; use futures::future::OptionFuture; @@ -23,6 +24,9 @@ use tokio::sync::mpsc; mod composite_frame; mod coord; mod cursor_interpolation; +mod cursor_svg; +mod cursor_svg_tests; +mod cursor_texture_manager; pub mod decoder; mod frame_pipeline; mod layers; @@ -167,6 +171,8 @@ pub enum RenderingError { ChannelSendFrameFailed(#[from] mpsc::error::SendError<(RenderedFrame, u32)>), #[error("Failed to load image: {0}")] ImageLoadError(String), + #[error("Other error: {0}")] + Other(String), } pub struct RenderSegment { @@ -293,18 +299,13 @@ pub fn get_duration( } } -pub struct CursorTexture { - inner: wgpu::Texture, - hotspot: XY, -} - pub struct RenderVideoConstants { pub _instance: wgpu::Instance, pub _adapter: wgpu::Adapter, pub queue: wgpu::Queue, pub device: wgpu::Device, pub options: RenderOptions, - pub cursor_textures: HashMap, + pub cursor_texture_manager: CursorTextureManager, background_textures: std::sync::Arc>>, } @@ -337,7 +338,7 @@ impl RenderVideoConstants { ) .await?; - let cursor_textures = Self::load_cursor_textures(&device, &queue, recording_meta, meta); + let cursor_texture_manager = Self::load_cursor_textures(&device, &queue, recording_meta, meta)?; let background_textures = Arc::new(tokio::sync::RwLock::new(HashMap::new())); Ok(Self { @@ -346,7 +347,7 @@ impl RenderVideoConstants { device, queue, options, - cursor_textures, + cursor_texture_manager, background_textures, }) } @@ -356,8 +357,12 @@ impl RenderVideoConstants { queue: &wgpu::Queue, recording_meta: &RecordingMeta, meta: &StudioRecordingMeta, - ) -> HashMap { - let mut textures = HashMap::new(); + ) -> Result { + let mut manager = CursorTextureManager::new(); + + // Initialize SVG cursors first + manager.initialize_svg_cursors(device, queue) + .map_err(|e| RenderingError::Other(format!("Failed to initialize SVG cursors: {}", e)))?; let cursor_images = match &meta { StudioRecordingMeta::SingleSegment { .. } => Default::default(), @@ -371,69 +376,25 @@ impl RenderVideoConstants { continue; } - match image::open(&cursor.path) { - Ok(img) => { - let dimensions = img.dimensions(); - - let rgba = img.into_rgba8(); - - // Create the texture - let texture = device.create_texture(&wgpu::TextureDescriptor { - label: Some(&format!("Cursor Texture {}", cursor_id)), - size: wgpu::Extent3d { - width: dimensions.0, - height: dimensions.1, - depth_or_array_layers: 1, - }, - mip_level_count: 1, - sample_count: 1, - dimension: wgpu::TextureDimension::D2, - format: wgpu::TextureFormat::Rgba8UnormSrgb, - usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, - view_formats: &[], - }); - - queue.write_texture( - wgpu::ImageCopyTexture { - texture: &texture, - mip_level: 0, - origin: wgpu::Origin3d::ZERO, - aspect: wgpu::TextureAspect::All, - }, - &rgba, - wgpu::ImageDataLayout { - offset: 0, - bytes_per_row: Some(4 * dimensions.0), - rows_per_image: None, - }, - wgpu::Extent3d { - width: dimensions.0, - height: dimensions.1, - depth_or_array_layers: 1, - }, - ); - - textures.insert( - cursor_id.clone(), - CursorTexture { - inner: texture, - hotspot: cursor.hotspot.map(|v| v as f32), - }, - ); - } - Err(e) => { - println!( - "Failed to load cursor image {}: {}", - cursor.path.display(), - e - ); - // Don't return error, just skip this cursor image - continue; - } + // Load the captured cursor and analyze its type + if let Err(e) = manager.load_captured_cursor( + device, + queue, + cursor_id.clone(), + &cursor.path, + cursor.hotspot.map(|v| v as f32) + ) { + println!( + "Failed to load cursor image {}: {}", + cursor.path.display(), + e + ); + // Don't return error, just skip this cursor image + continue; } } - textures + Ok(manager) } } @@ -1278,3 +1239,4 @@ fn get_either((a, b): (T, T), left: bool) -> T { b } } + From 13134285a8e1cf7f022c7dbe91dc102cfeac6c46 Mon Sep 17 00:00:00 2001 From: Nalin Date: Thu, 10 Jul 2025 18:51:49 +0530 Subject: [PATCH 02/29] check for rust --- apps/desktop/src/routes/editor/ConfigSidebar.tsx | 2 +- crates/project/src/configuration.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/routes/editor/ConfigSidebar.tsx b/apps/desktop/src/routes/editor/ConfigSidebar.tsx index 9a84ce2aead..bcc5be6cf61 100644 --- a/apps/desktop/src/routes/editor/ConfigSidebar.tsx +++ b/apps/desktop/src/routes/editor/ConfigSidebar.tsx @@ -33,7 +33,7 @@ import { import { createStore, produce } from "solid-js/store"; import { Dynamic } from "solid-js/web"; import toast from "solid-toast"; - +import IconLucideSparkles from "~icons/lucide/sparkles"; import colorBg from "~/assets/illustrations/color.webp"; import gradientBg from "~/assets/illustrations/gradient.webp"; import imageBg from "~/assets/illustrations/image.webp"; diff --git a/crates/project/src/configuration.rs b/crates/project/src/configuration.rs index cc8b109719c..1869c3520ab 100644 --- a/crates/project/src/configuration.rs +++ b/crates/project/src/configuration.rs @@ -541,7 +541,7 @@ impl ProjectConfiguration { pub fn load(project_path: impl AsRef) -> Result { let config_str = std::fs::read_to_string(project_path.as_ref().join("project-config.json"))?; - let mut config: Self = serde_json::from_str(&config_str).unwrap_or_default(); + let config: Self = serde_json::from_str(&config_str).unwrap_or_default(); Ok(config) } From e05272399f708f03def9612547bceac66e7f2eed Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Tue, 29 Jul 2025 11:17:27 +0800 Subject: [PATCH 03/29] fix --- apps/desktop/src/utils/tauri.ts | 2 +- crates/project/src/configuration.rs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.ts index 3a19d09b7a2..5b8f436388c 100644 --- a/apps/desktop/src/utils/tauri.ts +++ b/apps/desktop/src/utils/tauri.ts @@ -319,7 +319,7 @@ export type CurrentRecording = { target: CurrentRecordingTarget; type: Recording export type CurrentRecordingChanged = null export type CurrentRecordingTarget = { window: { id: number; bounds: Bounds } } | { screen: { id: number } } | { area: { screen: number; bounds: Bounds } } export type CursorAnimationStyle = "regular" | "slow" | "fast" -export type CursorConfiguration = { hide?: boolean; hideWhenIdle: boolean; size: number; type: CursorType; animationStyle: CursorAnimationStyle; tension: number; mass: number; friction: number; raw?: boolean; motionBlur?: number; useSvg: boolean } +export type CursorConfiguration = { hide?: boolean; hideWhenIdle: boolean; size: number; type: CursorType; animationStyle: CursorAnimationStyle; tension: number; mass: number; friction: number; raw?: boolean; motionBlur?: number; useSvg?: boolean } export type CursorMeta = { imagePath: string; hotspot: XY } export type CursorType = "pointer" | "circle" export type Cursors = { [key in string]: string } | { [key in string]: CursorMeta } diff --git a/crates/project/src/configuration.rs b/crates/project/src/configuration.rs index e55f92e20f4..ef301eacbdb 100644 --- a/crates/project/src/configuration.rs +++ b/crates/project/src/configuration.rs @@ -354,10 +354,14 @@ pub struct CursorConfiguration { pub raw: bool, #[serde(default)] pub motion_blur: f32, - // #[serde(default = "CursorConfiguration::default_use_svg")] // TODO + #[serde(default = "yes")] pub use_svg: bool, } +fn yes() -> bool { + true +} + impl Default for CursorConfiguration { fn default() -> Self { Self { @@ -371,7 +375,7 @@ impl Default for CursorConfiguration { friction: 20.0, raw: false, motion_blur: 0.5, - use_svg: true, // TODO + use_svg: true, } } } From a3fd04f17f5d93c57375b06469eb4def15367198 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Tue, 29 Jul 2025 11:38:56 +0800 Subject: [PATCH 04/29] move cursors into rendering + drop `svg_filename` and add `Cursor::load` --- apps/desktop/src-tauri/tauri.conf.json | 3 +- .../rendering/assets}/cursors/arrow.svg | 0 .../rendering/assets}/cursors/crosshair.svg | 0 .../rendering/assets}/cursors/ibeam.svg | 0 .../assets}/cursors/pointing-hand.svg | 0 .../rendering/assets}/cursors/resize-ew.svg | 0 .../rendering/assets}/cursors/resize-nwse.svg | 0 crates/rendering/src/cursor_svg.rs | 78 +++++++------------ crates/rendering/src/cursor_svg_tests.rs | 56 +++++-------- .../rendering/src/cursor_texture_manager.rs | 52 ++++++------- crates/rendering/src/layers/cursor.rs | 8 +- 11 files changed, 75 insertions(+), 122 deletions(-) rename {apps/desktop/src => crates/rendering/assets}/cursors/arrow.svg (100%) rename {apps/desktop/src => crates/rendering/assets}/cursors/crosshair.svg (100%) rename {apps/desktop/src => crates/rendering/assets}/cursors/ibeam.svg (100%) rename {apps/desktop/src => crates/rendering/assets}/cursors/pointing-hand.svg (100%) rename {apps/desktop/src => crates/rendering/assets}/cursors/resize-ew.svg (100%) rename {apps/desktop/src => crates/rendering/assets}/cursors/resize-nwse.svg (100%) diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 21e0c579f37..879c2c5a469 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -51,8 +51,7 @@ "assets/backgrounds/dark/*": "assets/backgrounds/dark/", "assets/backgrounds/orange/*": "assets/backgrounds/orange/", "assets/backgrounds/purple/*": "assets/backgrounds/purple/", - "../src/assets/rive/*.riv": "assets/rive/", - "../src/cursors/*.svg": "cursors/" + "../src/assets/rive/*.riv": "assets/rive/" }, "macOS": { "dmg": { diff --git a/apps/desktop/src/cursors/arrow.svg b/crates/rendering/assets/cursors/arrow.svg similarity index 100% rename from apps/desktop/src/cursors/arrow.svg rename to crates/rendering/assets/cursors/arrow.svg diff --git a/apps/desktop/src/cursors/crosshair.svg b/crates/rendering/assets/cursors/crosshair.svg similarity index 100% rename from apps/desktop/src/cursors/crosshair.svg rename to crates/rendering/assets/cursors/crosshair.svg diff --git a/apps/desktop/src/cursors/ibeam.svg b/crates/rendering/assets/cursors/ibeam.svg similarity index 100% rename from apps/desktop/src/cursors/ibeam.svg rename to crates/rendering/assets/cursors/ibeam.svg diff --git a/apps/desktop/src/cursors/pointing-hand.svg b/crates/rendering/assets/cursors/pointing-hand.svg similarity index 100% rename from apps/desktop/src/cursors/pointing-hand.svg rename to crates/rendering/assets/cursors/pointing-hand.svg diff --git a/apps/desktop/src/cursors/resize-ew.svg b/crates/rendering/assets/cursors/resize-ew.svg similarity index 100% rename from apps/desktop/src/cursors/resize-ew.svg rename to crates/rendering/assets/cursors/resize-ew.svg diff --git a/apps/desktop/src/cursors/resize-nwse.svg b/crates/rendering/assets/cursors/resize-nwse.svg similarity index 100% rename from apps/desktop/src/cursors/resize-nwse.svg rename to crates/rendering/assets/cursors/resize-nwse.svg diff --git a/crates/rendering/src/cursor_svg.rs b/crates/rendering/src/cursor_svg.rs index d4b8308a2ec..287549620f0 100644 --- a/crates/rendering/src/cursor_svg.rs +++ b/crates/rendering/src/cursor_svg.rs @@ -1,30 +1,34 @@ -use std::collections::HashMap; -use std::path::Path; +use std::{borrow::Cow, path::Path}; use image::GenericImageView; -// Common cursor types that we support with SVG versions +static CURSOR_ARROW: &'static [u8] = include_bytes!("../assets/cursors/arrow.svg"); +static CURSOR_IBEAM: &'static [u8] = include_bytes!("../assets/cursors/ibeam.svg"); +static CURSOR_CROSSHAIR: &'static [u8] = include_bytes!("../assets/cursors/crosshair.svg"); +static CURSOR_POINTING_HAND: &'static [u8] = include_bytes!("../assets/cursors/pointing-hand.svg"); +static CURSOR_RESIZE_NWSE: &'static [u8] = include_bytes!("../assets/cursors/resize-nwse.svg"); +static CURSOR_RESIZE_EW: &'static [u8] = include_bytes!("../assets/cursors/resize-ew.svg"); + +/// The type of cursor to use #[derive(Debug, Clone, Eq, PartialEq, Hash)] -pub enum CommonCursorType { +pub enum CursorType { Arrow, IBeam, Crosshair, PointingHand, - ResizeNWSE, // Diagonal resize (northwest-southeast) - ResizeEW, // Horizontal resize (east-west) - // Add more as needed + ResizeNWSE, + ResizeEW, } -impl CommonCursorType { - /// Get the SVG filename for this cursor type - pub fn svg_filename(&self) -> &'static str { +impl CursorType { + pub fn load(&self) -> Cow<'static, [u8]> { match self { - CommonCursorType::Arrow => "arrow.svg", - CommonCursorType::IBeam => "ibeam.svg", - CommonCursorType::Crosshair => "crosshair.svg", - CommonCursorType::PointingHand => "pointing-hand.svg", - CommonCursorType::ResizeNWSE => "resize-nwse.svg", - CommonCursorType::ResizeEW => "resize-ew.svg", + CursorType::Arrow => Cow::Borrowed(CURSOR_ARROW), + CursorType::IBeam => Cow::Borrowed(CURSOR_IBEAM), + CursorType::Crosshair => Cow::Borrowed(CURSOR_CROSSHAIR), + CursorType::PointingHand => Cow::Borrowed(CURSOR_POINTING_HAND), + CursorType::ResizeNWSE => Cow::Borrowed(CURSOR_RESIZE_NWSE), + CursorType::ResizeEW => Cow::Borrowed(CURSOR_RESIZE_EW), } } @@ -38,28 +42,28 @@ impl CommonCursorType { if width <= 40 && height <= 40 { // Simple pattern matching - this could be made more sophisticated if Self::matches_arrow_pattern(image_data, width, height) { - return Some(CommonCursorType::Arrow); + return Some(CursorType::Arrow); } } // I-beam cursors are typically thin and tall if width < height && width <= 20 && height >= 20 { if Self::matches_ibeam_pattern(image_data, width, height) { - return Some(CommonCursorType::IBeam); + return Some(CursorType::IBeam); } } // Crosshair cursors are typically square and have cross pattern if (width as i32 - height as i32).abs() <= 5 && width >= 20 && width <= 40 { if Self::matches_crosshair_pattern(image_data, width, height) { - return Some(CommonCursorType::Crosshair); + return Some(CursorType::Crosshair); } } // Pointing hand cursors are typically wider and have a specific shape if width >= 20 && height >= 20 && width <= 40 && height <= 40 { if Self::matches_hand_pattern(image_data, width, height) { - return Some(CommonCursorType::PointingHand); + return Some(CursorType::PointingHand); } } @@ -68,7 +72,7 @@ impl CommonCursorType { if Self::matches_resize_pattern(image_data, width, height) { // For simplicity, default to diagonal resize // More sophisticated detection could distinguish between different resize types - return Some(CommonCursorType::ResizeNWSE); + return Some(CursorType::ResizeNWSE); } } @@ -248,41 +252,13 @@ impl CommonCursorType { } } -/// Map to store detected cursor types for cached lookup -pub type CursorTypeMap = HashMap; - -static CURSOR_ARROW: &[u8] = include_bytes!("../../../apps/desktop/src/cursors/arrow.svg"); -static CURSOR_IBEAM: &[u8] = include_bytes!("../../../apps/desktop/src/cursors/ibeam.svg"); -static CURSOR_CROSSHAIR: &[u8] = include_bytes!("../../../apps/desktop/src/cursors/crosshair.svg"); -static CURSOR_POINTING_HAND: &[u8] = - include_bytes!("../../../apps/desktop/src/cursors/pointing-hand.svg"); -static CURSOR_RESIZE_NWSE: &[u8] = - include_bytes!("../../../apps/desktop/src/cursors/resize-nwse.svg"); -static CURSOR_RESIZE_EW: &[u8] = include_bytes!("../../../apps/desktop/src/cursors/resize-ew.svg"); - -/// Load SVG content for a cursor type from bundled resources -pub fn load_cursor_svg(cursor_type: &CommonCursorType) -> Option> { - // In a Tauri app, we would use the resource API to load bundled SVGs - // For now, return the embedded SVG content as a fallback - let svg_content = match cursor_type { - CommonCursorType::Arrow => CURSOR_ARROW, - CommonCursorType::IBeam => CURSOR_IBEAM, - CommonCursorType::Crosshair => CURSOR_CROSSHAIR, - CommonCursorType::PointingHand => CURSOR_POINTING_HAND, - CommonCursorType::ResizeNWSE => CURSOR_RESIZE_NWSE, - CommonCursorType::ResizeEW => CURSOR_RESIZE_EW, - }; - - Some(svg_content.to_vec()) -} - /// Analyze a cursor image and try to detect its type -pub fn analyze_cursor_image(image_path: &Path) -> Option { +pub fn analyze_cursor_image(image_path: &Path) -> Option { // Load the image and analyze it if let Ok(img) = image::open(image_path) { let rgba = img.to_rgba8(); let (width, height) = img.dimensions(); - CommonCursorType::detect_from_image(&rgba.into_raw(), width, height) + CursorType::detect_from_image(&rgba.into_raw(), width, height) } else { None } diff --git a/crates/rendering/src/cursor_svg_tests.rs b/crates/rendering/src/cursor_svg_tests.rs index 0d72abd045d..0672cad7b63 100644 --- a/crates/rendering/src/cursor_svg_tests.rs +++ b/crates/rendering/src/cursor_svg_tests.rs @@ -22,8 +22,8 @@ mod tests { } } - let detected = CommonCursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, Some(CommonCursorType::Arrow)); + let detected = CursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, Some(CursorType::Arrow)); } #[test] @@ -47,8 +47,8 @@ mod tests { } } - let detected = CommonCursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, Some(CommonCursorType::IBeam)); + let detected = CursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, Some(CursorType::IBeam)); } #[test] @@ -77,8 +77,8 @@ mod tests { } } - let detected = CommonCursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, Some(CommonCursorType::Crosshair)); + let detected = CursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, Some(CursorType::Crosshair)); } #[test] @@ -113,8 +113,8 @@ mod tests { } } - let detected = CommonCursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, Some(CommonCursorType::PointingHand)); + let detected = CursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, Some(CursorType::PointingHand)); } #[test] @@ -147,8 +147,8 @@ mod tests { } } - let detected = CommonCursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, Some(CommonCursorType::ResizeNWSE)); + let detected = CursorType::detect_from_image(&image_data, width, height); + assert_eq!(detected, Some(CursorType::ResizeNWSE)); } #[test] @@ -165,7 +165,7 @@ mod tests { } } - let detected = CommonCursorType::detect_from_image(&image_data, width, height); + let detected = CursorType::detect_from_image(&image_data, width, height); assert_eq!(detected, None); } @@ -176,36 +176,20 @@ mod tests { let height = 32; let image_data = vec![0u8; (width * height * 4) as usize]; // All transparent - let detected = CommonCursorType::detect_from_image(&image_data, width, height); + let detected = CursorType::detect_from_image(&image_data, width, height); assert_eq!(detected, None); } - #[test] - fn test_svg_filename_mapping() { - assert_eq!(CommonCursorType::Arrow.svg_filename(), "arrow.svg"); - assert_eq!(CommonCursorType::IBeam.svg_filename(), "ibeam.svg"); - assert_eq!(CommonCursorType::Crosshair.svg_filename(), "crosshair.svg"); - assert_eq!( - CommonCursorType::PointingHand.svg_filename(), - "pointing-hand.svg" - ); - assert_eq!( - CommonCursorType::ResizeNWSE.svg_filename(), - "resize-nwse.svg" - ); - assert_eq!(CommonCursorType::ResizeEW.svg_filename(), "resize-ew.svg"); - } - #[test] fn test_svg_loading() { // Test that we can load SVG content for all cursor types for cursor_type in [ - CommonCursorType::Arrow, - CommonCursorType::IBeam, - CommonCursorType::Crosshair, - CommonCursorType::PointingHand, - CommonCursorType::ResizeNWSE, - CommonCursorType::ResizeEW, + CursorType::Arrow, + CursorType::IBeam, + CursorType::Crosshair, + CursorType::PointingHand, + CursorType::ResizeNWSE, + CursorType::ResizeEW, ] { let svg_content = load_cursor_svg(&cursor_type); assert!( @@ -250,7 +234,7 @@ mod tests { } } - let detected = CommonCursorType::detect_from_image(&image_data, width, height); + let detected = CursorType::detect_from_image(&image_data, width, height); // Should not crash and return None for very small images assert_eq!(detected, None); } @@ -262,7 +246,7 @@ mod tests { let height = 32; let image_data = vec![0u8; 10]; // Much smaller than required - let detected = CommonCursorType::detect_from_image(&image_data, width, height); + let detected = CursorType::detect_from_image(&image_data, width, height); // Should handle gracefully and return None assert_eq!(detected, None); } diff --git a/crates/rendering/src/cursor_texture_manager.rs b/crates/rendering/src/cursor_texture_manager.rs index be00b58b922..128ddab585f 100644 --- a/crates/rendering/src/cursor_texture_manager.rs +++ b/crates/rendering/src/cursor_texture_manager.rs @@ -1,4 +1,4 @@ -use crate::cursor_svg::{analyze_cursor_image, CommonCursorType}; +use crate::cursor_svg::{analyze_cursor_image, CursorType}; use cap_project::XY; use image::GenericImageView; use std::collections::HashMap; @@ -10,7 +10,7 @@ pub struct EnhancedCursorTexture { pub inner: wgpu::Texture, pub hotspot: XY, pub source_type: CursorSourceType, - pub cursor_type: Option, + pub cursor_type: Option, } #[derive(Debug, Clone)] @@ -24,9 +24,9 @@ pub enum CursorSourceType { /// Enhanced cursor texture manager that prefers SVG versions when available pub struct CursorTextureManager { /// Map of cursor_id to detected cursor type - cursor_type_cache: HashMap>, + cursor_type_cache: HashMap>, /// Loaded SVG textures by cursor type - svg_textures: HashMap, + svg_textures: HashMap, /// Fallback captured textures by cursor_id captured_textures: HashMap, } @@ -96,14 +96,14 @@ impl CursorTextureManager { }); queue.write_texture( - wgpu::ImageCopyTexture { + wgpu::TexelCopyTextureInfo { aspect: wgpu::TextureAspect::All, texture: &texture, mip_level: 0, origin: wgpu::Origin3d::ZERO, }, &rgba, - wgpu::ImageDataLayout { + wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(4 * dimensions.0), rows_per_image: Some(dimensions.1), @@ -127,7 +127,7 @@ impl CursorTextureManager { &mut self, device: &wgpu::Device, queue: &wgpu::Queue, - cursor_type: CommonCursorType, + cursor_type: CursorType, svg_content: &[u8], size: u32, ) -> Result<(), String> { @@ -200,12 +200,12 @@ impl CursorTextureManager { // Set default hotspot for SVG cursors based on type let hotspot = match cursor_type { - CommonCursorType::Arrow => XY::new(0.1, 0.1), // Top-left point - CommonCursorType::IBeam => XY::new(0.5, 0.5), // Center - CommonCursorType::Crosshair => XY::new(0.5, 0.5), // Center - CommonCursorType::PointingHand => XY::new(0.3, 0.1), // Finger tip - CommonCursorType::ResizeNWSE => XY::new(0.5, 0.5), // Center - CommonCursorType::ResizeEW => XY::new(0.5, 0.5), // Center + CursorType::Arrow => XY::new(0.1, 0.1), // Top-left point + CursorType::IBeam => XY::new(0.5, 0.5), // Center + CursorType::Crosshair => XY::new(0.5, 0.5), // Center + CursorType::PointingHand => XY::new(0.3, 0.1), // Finger tip + CursorType::ResizeNWSE => XY::new(0.5, 0.5), // Center + CursorType::ResizeEW => XY::new(0.5, 0.5), // Center }; let enhanced_texture = EnhancedCursorTexture { @@ -225,28 +225,22 @@ impl CursorTextureManager { device: &wgpu::Device, queue: &wgpu::Queue, ) -> Result<(), String> { - use crate::cursor_svg::{load_cursor_svg, CommonCursorType}; + use crate::cursor_svg::CursorType; // Load all the SVG cursors we have let cursor_types = vec![ - CommonCursorType::Arrow, - CommonCursorType::IBeam, - CommonCursorType::Crosshair, - CommonCursorType::PointingHand, - CommonCursorType::ResizeNWSE, - CommonCursorType::ResizeEW, + CursorType::Arrow, + CursorType::IBeam, + CursorType::Crosshair, + CursorType::PointingHand, + CursorType::ResizeNWSE, + CursorType::ResizeEW, ]; for cursor_type in cursor_types { - if let Some(svg_content) = load_cursor_svg(&cursor_type) { - // Use a higher resolution for SVG cursors (64x64) for better quality - self.load_svg_cursor(device, queue, cursor_type, &svg_content, 64)?; - } else { - return Err(format!( - "Failed to load SVG content for cursor type: {:?}", - cursor_type - )); - } + let svg_content = cursor_type.load(); + // Use a higher resolution for SVG cursors (64x64) for better quality + self.load_svg_cursor(device, queue, cursor_type, &svg_content, 64)?; } Ok(()) diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rs index 9c92270aa5a..a19ea576e6d 100644 --- a/crates/rendering/src/layers/cursor.rs +++ b/crates/rendering/src/layers/cursor.rs @@ -201,10 +201,10 @@ impl CursorLayer { let speed = (velocity[0] * velocity[0] + velocity[1] * velocity[1]).sqrt(); let motion_blur_amount = (speed * 0.3).min(1.0) * 0.0; // uniforms.project.cursor.motion_blur; - let Some(cursor_texture) = constants - .cursor_texture_manager - .get_texture(&interpolated_cursor.cursor_id,!uniforms.project.cursor.raw && uniforms.project.cursor.use_svg) - else { + let Some(cursor_texture) = constants.cursor_texture_manager.get_texture( + &interpolated_cursor.cursor_id, + !uniforms.project.cursor.raw && uniforms.project.cursor.use_svg, + ) else { return; }; From e94955e6ea2f0b3aa3f930208d52fb24d2aab0f1 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Tue, 29 Jul 2025 11:41:31 +0800 Subject: [PATCH 05/29] reset changes --- apps/desktop/src-tauri/tauri.conf.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 879c2c5a469..448fd064c06 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -15,14 +15,7 @@ "csp": "default-src 'self' ws: ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost data:; media-src 'self' asset: http://asset.localhost; script-src 'self' 'unsafe-eval' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'", "assetProtocol": { "enable": true, - "scope": [ - "$APPDATA/**", - "**/*.jpg", - "**/*.webp", - "$RESOURCE/**", - "**/*.riv", - "$HOME/**" - ] + "scope": ["$APPDATA/**", "**/*.jpg", "**/*.webp", "$RESOURCE/**", "**/*.riv", "$HOME/**"] } } }, From fde4395b161b4963538fcec6fbf0c6cd01277ad4 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Tue, 29 Jul 2025 11:50:28 +0800 Subject: [PATCH 06/29] remove unused stuff + upgrade resvg --- Cargo.lock | 79 +++++++++++++++---- crates/rendering/Cargo.toml | 2 +- crates/rendering/src/cursor_svg.rs | 12 +++ .../rendering/src/cursor_texture_manager.rs | 49 +++--------- 4 files changed, 88 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ea75c4e579a..c7901912f5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1949,6 +1949,15 @@ dependencies = [ "objc", ] +[[package]] +name = "core_maths" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" +dependencies = [ + "libm", +] + [[package]] name = "coreaudio-rs" version = "0.11.3" @@ -1980,7 +1989,7 @@ dependencies = [ "log", "rangemap", "rustc-hash 1.1.0", - "rustybuzz", + "rustybuzz 0.14.1", "self_cell", "smol_str", "swash", @@ -2836,16 +2845,16 @@ dependencies = [ [[package]] name = "fontdb" -version = "0.18.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770" +checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" dependencies = [ "fontconfig-parser", "log", "memmap2", "slotmap", "tinyvec", - "ttf-parser 0.21.1", + "ttf-parser 0.25.1", ] [[package]] @@ -3895,9 +3904,9 @@ dependencies = [ [[package]] name = "imagesize" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" +checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" [[package]] name = "imgref" @@ -6512,18 +6521,19 @@ dependencies = [ [[package]] name = "resvg" -version = "0.42.0" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "944d052815156ac8fa77eaac055220e95ba0b01fa8887108ca710c03805d9051" +checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43" dependencies = [ "gif", - "jpeg-decoder", + "image-webp", "log", "pico-args", "rgb", "svgtypes", "tiny-skia", "usvg", + "zune-jpeg", ] [[package]] @@ -6725,8 +6735,26 @@ dependencies = [ "libm", "smallvec", "ttf-parser 0.21.1", - "unicode-bidi-mirroring", - "unicode-ccc", + "unicode-bidi-mirroring 0.2.0", + "unicode-ccc 0.2.0", + "unicode-properties", + "unicode-script", +] + +[[package]] +name = "rustybuzz" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" +dependencies = [ + "bitflags 2.9.0", + "bytemuck", + "core_maths", + "log", + "smallvec", + "ttf-parser 0.25.1", + "unicode-bidi-mirroring 0.4.0", + "unicode-ccc 0.4.0", "unicode-properties", "unicode-script", ] @@ -8914,6 +8942,15 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" +dependencies = [ + "core_maths", +] + [[package]] name = "tungstenite" version = "0.24.0" @@ -9026,12 +9063,24 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" +[[package]] +name = "unicode-bidi-mirroring" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfa6e8c60bb66d49db113e0125ee8711b7647b5579dc7f5f19c42357ed039fe" + [[package]] name = "unicode-ccc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" +[[package]] +name = "unicode-ccc" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e" + [[package]] name = "unicode-ident" version = "1.0.12" @@ -9128,20 +9177,20 @@ dependencies = [ [[package]] name = "usvg" -version = "0.42.0" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84ea542ae85c715f07b082438a4231c3760539d902e11d093847a0b22963032" +checksum = "80be9b06fbae3b8b303400ab20778c80bbaf338f563afe567cf3c9eea17b47ef" dependencies = [ "base64 0.22.1", "data-url", "flate2", - "fontdb 0.18.0", + "fontdb 0.23.0", "imagesize", "kurbo", "log", "pico-args", "roxmltree", - "rustybuzz", + "rustybuzz 0.20.1", "simplecss", "siphasher 1.0.1", "strict-num", diff --git a/crates/rendering/Cargo.toml b/crates/rendering/Cargo.toml index be16d4fd4a1..ef49be9e0ca 100644 --- a/crates/rendering/Cargo.toml +++ b/crates/rendering/Cargo.toml @@ -28,7 +28,7 @@ bezier_easing = "0.1.1" reactive_graph = "0.1.5" glyphon = "0.9.0" tracing.workspace = true -resvg = "0.42" +resvg = "0.45" tiny-skia = "0.11" [target.'cfg(target_os = "macos")'.dependencies] diff --git a/crates/rendering/src/cursor_svg.rs b/crates/rendering/src/cursor_svg.rs index 287549620f0..136a34df4cf 100644 --- a/crates/rendering/src/cursor_svg.rs +++ b/crates/rendering/src/cursor_svg.rs @@ -1,5 +1,6 @@ use std::{borrow::Cow, path::Path}; +use cap_project::XY; use image::GenericImageView; static CURSOR_ARROW: &'static [u8] = include_bytes!("../assets/cursors/arrow.svg"); @@ -32,6 +33,17 @@ impl CursorType { } } + pub fn get_hotspot(&self) -> XY { + match self { + CursorType::Arrow => XY::new(0.1, 0.1), // Top-left point + CursorType::IBeam => XY::new(0.5, 0.5), // Center + CursorType::Crosshair => XY::new(0.5, 0.5), // Center + CursorType::PointingHand => XY::new(0.3, 0.1), // Finger tip + CursorType::ResizeNWSE => XY::new(0.5, 0.5), // Center + CursorType::ResizeEW => XY::new(0.5, 0.5), // Center + } + } + /// Detect cursor type from image data (simplified heuristic approach) /// In a real implementation, this could use more sophisticated image analysis pub fn detect_from_image(image_data: &[u8], width: u32, height: u32) -> Option { diff --git a/crates/rendering/src/cursor_texture_manager.rs b/crates/rendering/src/cursor_texture_manager.rs index 128ddab585f..d6d07ba5d55 100644 --- a/crates/rendering/src/cursor_texture_manager.rs +++ b/crates/rendering/src/cursor_texture_manager.rs @@ -9,16 +9,6 @@ use std::path::Path; pub struct EnhancedCursorTexture { pub inner: wgpu::Texture, pub hotspot: XY, - pub source_type: CursorSourceType, - pub cursor_type: Option, -} - -#[derive(Debug, Clone)] -pub enum CursorSourceType { - /// Original captured cursor image - Captured, - /// High-quality SVG version - Svg, } /// Enhanced cursor texture manager that prefers SVG versions when available @@ -114,8 +104,6 @@ impl CursorTextureManager { let enhanced_texture = EnhancedCursorTexture { inner: texture, hotspot, - source_type: CursorSourceType::Captured, - cursor_type: detected_type, }; self.captured_textures.insert(cursor_id, enhanced_texture); @@ -157,12 +145,7 @@ impl CursorTextureManager { let rgba_data: Vec = pixmap .pixels() .iter() - .flat_map(|pixel| { - // let [b, g, r, a] = pixel.to_array(); - // [r, g, b, a] - - [pixel.red(), pixel.green(), pixel.red(), pixel.alpha()] - }) + .flat_map(|pixel| [pixel.red(), pixel.green(), pixel.red(), pixel.alpha()]) .collect(); let texture_size = wgpu::Extent3d { @@ -183,14 +166,14 @@ impl CursorTextureManager { }); queue.write_texture( - wgpu::ImageCopyTexture { + wgpu::TexelCopyTextureInfo { aspect: wgpu::TextureAspect::All, texture: &texture, mip_level: 0, origin: wgpu::Origin3d::ZERO, }, &rgba_data, - wgpu::ImageDataLayout { + wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(4 * size), rows_per_image: Some(size), @@ -198,24 +181,14 @@ impl CursorTextureManager { texture_size, ); - // Set default hotspot for SVG cursors based on type - let hotspot = match cursor_type { - CursorType::Arrow => XY::new(0.1, 0.1), // Top-left point - CursorType::IBeam => XY::new(0.5, 0.5), // Center - CursorType::Crosshair => XY::new(0.5, 0.5), // Center - CursorType::PointingHand => XY::new(0.3, 0.1), // Finger tip - CursorType::ResizeNWSE => XY::new(0.5, 0.5), // Center - CursorType::ResizeEW => XY::new(0.5, 0.5), // Center - }; - - let enhanced_texture = EnhancedCursorTexture { - inner: texture, - hotspot, - source_type: CursorSourceType::Svg, - cursor_type: Some(cursor_type.clone()), - }; - - self.svg_textures.insert(cursor_type, enhanced_texture); + let hotspot = cursor_type.get_hotspot(); + self.svg_textures.insert( + cursor_type, + EnhancedCursorTexture { + inner: texture, + hotspot, + }, + ); Ok(()) } From 50af9d804c3e105b89892ba768c2d67e62ff66f1 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Tue, 29 Jul 2025 14:08:01 +0800 Subject: [PATCH 07/29] overhaul --- apps/desktop/src-tauri/src/lib.rs | 2 +- apps/desktop/src-tauri/src/recording.rs | 2 +- apps/desktop/src/utils/tauri.ts | 4 +- crates/editor/src/editor_instance.rs | 2 +- crates/export/src/lib.rs | 10 +- crates/project/src/configuration.rs | 9 + crates/project/src/meta.rs | 28 +- crates/rendering/Cargo.toml | 2 +- crates/rendering/src/cursor_svg.rs | 277 ------------------ crates/rendering/src/cursor_svg_tests.rs | 253 ---------------- .../rendering/src/cursor_texture_manager.rs | 221 -------------- crates/rendering/src/layers/cursor.rs | 157 +++++++++- crates/rendering/src/lib.rs | 75 +---- 13 files changed, 190 insertions(+), 852 deletions(-) delete mode 100644 crates/rendering/src/cursor_svg.rs delete mode 100644 crates/rendering/src/cursor_svg_tests.rs delete mode 100644 crates/rendering/src/cursor_texture_manager.rs diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs index 2738e204f10..b8edb1bf276 100644 --- a/apps/desktop/src-tauri/src/lib.rs +++ b/apps/desktop/src-tauri/src/lib.rs @@ -1219,7 +1219,7 @@ async fn take_screenshot(app: AppHandle, _state: MutableState<'_, App>) -> Resul use cap_project::*; RecordingMeta { - platform: Some(Platform::default()), + platform: Platform::default(), project_path: recording_dir.clone(), sharing: None, pretty_name: screenshot_name, diff --git a/apps/desktop/src-tauri/src/recording.rs b/apps/desktop/src-tauri/src/recording.rs index caddf5501cf..4b5e6660fa5 100644 --- a/apps/desktop/src-tauri/src/recording.rs +++ b/apps/desktop/src-tauri/src/recording.rs @@ -758,7 +758,7 @@ async fn handle_recording_finish( }; let meta = RecordingMeta { - platform: Some(Platform::default()), + platform: Platform::default(), project_path: recording_dir.clone(), sharing, pretty_name: format!( diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.ts index 5b8f436388c..1b6b3febae5 100644 --- a/apps/desktop/src/utils/tauri.ts +++ b/apps/desktop/src/utils/tauri.ts @@ -361,8 +361,8 @@ export type Preset = { name: string; config: ProjectConfiguration } export type PresetsStore = { presets: Preset[]; default: number | null } export type ProjectConfiguration = { aspectRatio: AspectRatio | null; background: BackgroundConfiguration; camera: Camera; audio: AudioConfiguration; cursor: CursorConfiguration; hotkeys: HotkeysConfiguration; timeline?: TimelineConfiguration | null; captions?: CaptionsData | null } export type ProjectRecordingsMeta = { segments: SegmentRecordings[] } -export type RecordingMeta = (StudioRecordingMeta | InstantRecordingMeta) & { platform: Platform | null; pretty_name: string; sharing?: SharingMeta | null } -export type RecordingMetaWithType = ((StudioRecordingMeta | InstantRecordingMeta) & { platform: Platform | null; pretty_name: string; sharing?: SharingMeta | null }) & { type: RecordingType } +export type RecordingMeta = (StudioRecordingMeta | InstantRecordingMeta) & { platform?: Platform; pretty_name: string; sharing?: SharingMeta | null } +export type RecordingMetaWithType = ((StudioRecordingMeta | InstantRecordingMeta) & { platform?: Platform; pretty_name: string; sharing?: SharingMeta | null }) & { type: RecordingType } export type RecordingMode = "studio" | "instant" export type RecordingOptionsChanged = null export type RecordingStarted = null diff --git a/crates/editor/src/editor_instance.rs b/crates/editor/src/editor_instance.rs index 4b353e6bd7a..6b40cb94d7c 100644 --- a/crates/editor/src/editor_instance.rs +++ b/crates/editor/src/editor_instance.rs @@ -65,7 +65,7 @@ impl EditorInstance { let (ws_port, ws_shutdown) = create_frame_ws(frame_rx).await; let render_constants = Arc::new( - RenderVideoConstants::new(&recordings.segments, &recording_meta, meta) + RenderVideoConstants::new(&recordings.segments, recording_meta.clone(), meta.clone()) .await .unwrap(), ); diff --git a/crates/export/src/lib.rs b/crates/export/src/lib.rs index 9923c977fed..33707d91ec6 100644 --- a/crates/export/src/lib.rs +++ b/crates/export/src/lib.rs @@ -82,9 +82,13 @@ impl ExporterBuilder { ); let render_constants = Arc::new( - RenderVideoConstants::new(&recordings.segments, &recording_meta, studio_meta) - .await - .unwrap(), + RenderVideoConstants::new( + &recordings.segments, + recording_meta.clone(), + studio_meta.clone(), + ) + .await + .unwrap(), ); let segments = cap_editor::create_segments(&recording_meta, studio_meta) diff --git a/crates/project/src/configuration.rs b/crates/project/src/configuration.rs index ef301eacbdb..8343851e468 100644 --- a/crates/project/src/configuration.rs +++ b/crates/project/src/configuration.rs @@ -148,6 +148,15 @@ impl> Div> for XY { } } +impl Into> for XY { + fn into(self) -> XY { + XY { + x: self.x as f64, + y: self.y as f64, + } + } +} + #[derive(Type, Serialize, Deserialize, Clone, Debug, Default)] #[serde(rename_all = "camelCase")] pub struct Crop { diff --git a/crates/project/src/meta.rs b/crates/project/src/meta.rs index 45e0e05609b..07a8c5e56e8 100644 --- a/crates/project/src/meta.rs +++ b/crates/project/src/meta.rs @@ -60,7 +60,8 @@ impl Default for Platform { #[derive(Debug, Clone, Serialize, Deserialize, Type)] pub struct RecordingMeta { - pub platform: Option, + #[serde(default)] + pub platform: Platform, // this field is just for convenience, it shouldn't be persisted #[serde(skip_serializing, default)] pub project_path: PathBuf, @@ -249,22 +250,17 @@ impl MultipleSegments { meta.project_path.join(path) } - pub fn cursor_images(&self, meta: &RecordingMeta) -> Result { - Ok(CursorImages(match &self.cursors { - Cursors::Old(_) => Default::default(), - Cursors::Correct(map) => map - .iter() - .map(|(k, v)| { - ( - k.clone(), - CursorImage { - path: meta.path(&v.image_path), - hotspot: v.hotspot, - }, - ) + pub fn get_cursor_image(&self, meta: &RecordingMeta, id: &str) -> Option { + match &self.cursors { + Cursors::Old(_) => None, + Cursors::Correct(map) => { + let cursor = map.get(id)?; + Some(CursorImage { + path: meta.path(&cursor.image_path), + hotspot: cursor.hotspot, }) - .collect::<_>(), - })) + } + } } } diff --git a/crates/rendering/Cargo.toml b/crates/rendering/Cargo.toml index ef49be9e0ca..739e351e591 100644 --- a/crates/rendering/Cargo.toml +++ b/crates/rendering/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cap-rendering" version = "0.1.0" -edition = "2021" +edition = "2024" [lints] workspace = true diff --git a/crates/rendering/src/cursor_svg.rs b/crates/rendering/src/cursor_svg.rs deleted file mode 100644 index 136a34df4cf..00000000000 --- a/crates/rendering/src/cursor_svg.rs +++ /dev/null @@ -1,277 +0,0 @@ -use std::{borrow::Cow, path::Path}; - -use cap_project::XY; -use image::GenericImageView; - -static CURSOR_ARROW: &'static [u8] = include_bytes!("../assets/cursors/arrow.svg"); -static CURSOR_IBEAM: &'static [u8] = include_bytes!("../assets/cursors/ibeam.svg"); -static CURSOR_CROSSHAIR: &'static [u8] = include_bytes!("../assets/cursors/crosshair.svg"); -static CURSOR_POINTING_HAND: &'static [u8] = include_bytes!("../assets/cursors/pointing-hand.svg"); -static CURSOR_RESIZE_NWSE: &'static [u8] = include_bytes!("../assets/cursors/resize-nwse.svg"); -static CURSOR_RESIZE_EW: &'static [u8] = include_bytes!("../assets/cursors/resize-ew.svg"); - -/// The type of cursor to use -#[derive(Debug, Clone, Eq, PartialEq, Hash)] -pub enum CursorType { - Arrow, - IBeam, - Crosshair, - PointingHand, - ResizeNWSE, - ResizeEW, -} - -impl CursorType { - pub fn load(&self) -> Cow<'static, [u8]> { - match self { - CursorType::Arrow => Cow::Borrowed(CURSOR_ARROW), - CursorType::IBeam => Cow::Borrowed(CURSOR_IBEAM), - CursorType::Crosshair => Cow::Borrowed(CURSOR_CROSSHAIR), - CursorType::PointingHand => Cow::Borrowed(CURSOR_POINTING_HAND), - CursorType::ResizeNWSE => Cow::Borrowed(CURSOR_RESIZE_NWSE), - CursorType::ResizeEW => Cow::Borrowed(CURSOR_RESIZE_EW), - } - } - - pub fn get_hotspot(&self) -> XY { - match self { - CursorType::Arrow => XY::new(0.1, 0.1), // Top-left point - CursorType::IBeam => XY::new(0.5, 0.5), // Center - CursorType::Crosshair => XY::new(0.5, 0.5), // Center - CursorType::PointingHand => XY::new(0.3, 0.1), // Finger tip - CursorType::ResizeNWSE => XY::new(0.5, 0.5), // Center - CursorType::ResizeEW => XY::new(0.5, 0.5), // Center - } - } - - /// Detect cursor type from image data (simplified heuristic approach) - /// In a real implementation, this could use more sophisticated image analysis - pub fn detect_from_image(image_data: &[u8], width: u32, height: u32) -> Option { - // For now, we'll use simple heuristics based on size and basic pattern detection - // This is a placeholder - in production you might want more sophisticated detection - - // Arrow cursor is typically around 32x32 or similar - if width <= 40 && height <= 40 { - // Simple pattern matching - this could be made more sophisticated - if Self::matches_arrow_pattern(image_data, width, height) { - return Some(CursorType::Arrow); - } - } - - // I-beam cursors are typically thin and tall - if width < height && width <= 20 && height >= 20 { - if Self::matches_ibeam_pattern(image_data, width, height) { - return Some(CursorType::IBeam); - } - } - - // Crosshair cursors are typically square and have cross pattern - if (width as i32 - height as i32).abs() <= 5 && width >= 20 && width <= 40 { - if Self::matches_crosshair_pattern(image_data, width, height) { - return Some(CursorType::Crosshair); - } - } - - // Pointing hand cursors are typically wider and have a specific shape - if width >= 20 && height >= 20 && width <= 40 && height <= 40 { - if Self::matches_hand_pattern(image_data, width, height) { - return Some(CursorType::PointingHand); - } - } - - // Resize cursors - typically have arrow patterns - if width >= 16 && height >= 16 && width <= 40 && height <= 40 { - if Self::matches_resize_pattern(image_data, width, height) { - // For simplicity, default to diagonal resize - // More sophisticated detection could distinguish between different resize types - return Some(CursorType::ResizeNWSE); - } - } - - None - } - - /// Simple pattern matching for arrow cursor - /// Look for typical arrow shape - pointed top-left, wider bottom-right - fn matches_arrow_pattern(image_data: &[u8], width: u32, height: u32) -> bool { - // This is a very simplified check - // In practice, you'd want more sophisticated pattern recognition - - if image_data.len() < (width * height * 4) as usize { - return false; - } - - // Check if there's a diagonal pattern from top-left - let mut non_transparent_pixels = 0; - let mut top_left_pixels = 0; - - for y in 0..height { - for x in 0..width { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - let alpha = image_data[idx + 3]; - if alpha > 128 { - // Not transparent - non_transparent_pixels += 1; - if x <= width / 3 && y <= height / 3 { - top_left_pixels += 1; - } - } - } - } - } - - // Arrow should have most pixels in top-left area - non_transparent_pixels > 0 && top_left_pixels as f32 / non_transparent_pixels as f32 > 0.3 - } - - /// Simple pattern matching for I-beam cursor - fn matches_ibeam_pattern(image_data: &[u8], width: u32, height: u32) -> bool { - if image_data.len() < (width * height * 4) as usize { - return false; - } - - // I-beam should have pixels mostly in vertical center column - let center_x = width / 2; - let mut center_column_pixels = 0; - let mut total_pixels = 0; - - for y in 0..height { - for x in 0..width { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - let alpha = image_data[idx + 3]; - if alpha > 128 { - total_pixels += 1; - if (x as i32 - center_x as i32).abs() <= 2 { - center_column_pixels += 1; - } - } - } - } - } - - total_pixels > 0 && center_column_pixels as f32 / total_pixels as f32 > 0.6 - } - - /// Simple pattern matching for crosshair cursor - fn matches_crosshair_pattern(image_data: &[u8], width: u32, height: u32) -> bool { - if image_data.len() < (width * height * 4) as usize { - return false; - } - - let center_x = width / 2; - let center_y = height / 2; - let mut cross_pixels = 0; - let mut total_pixels = 0; - - for y in 0..height { - for x in 0..width { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - let alpha = image_data[idx + 3]; - if alpha > 128 { - total_pixels += 1; - // Check if pixel is on horizontal or vertical line through center - if (x as i32 - center_x as i32).abs() <= 2 - || (y as i32 - center_y as i32).abs() <= 2 - { - cross_pixels += 1; - } - } - } - } - } - - total_pixels > 0 && cross_pixels as f32 / total_pixels as f32 > 0.5 - } - - /// Simple pattern matching for pointing hand cursor - fn matches_hand_pattern(image_data: &[u8], width: u32, height: u32) -> bool { - if image_data.len() < (width * height * 4) as usize { - return false; - } - - // Hand cursors typically have more pixels in the bottom half - let mut top_half_pixels = 0; - let mut bottom_half_pixels = 0; - let mid_y = height / 2; - - for y in 0..height { - for x in 0..width { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - let alpha = image_data[idx + 3]; - if alpha > 128 { - if y < mid_y { - top_half_pixels += 1; - } else { - bottom_half_pixels += 1; - } - } - } - } - } - - // Hand cursor should have more pixels in bottom half - bottom_half_pixels > top_half_pixels && bottom_half_pixels > 50 - } - - /// Simple pattern matching for resize cursors - /// Look for arrow-like patterns in corners or edges - fn matches_resize_pattern(image_data: &[u8], width: u32, height: u32) -> bool { - if image_data.len() < (width * height * 4) as usize { - return false; - } - - // Resize cursors typically have arrow patterns pointing in opposite directions - let mut corner_pixels = 0; - let mut edge_pixels = 0; - let mut total_pixels = 0; - - for y in 0..height { - for x in 0..width { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - let alpha = image_data[idx + 3]; - if alpha > 128 { - total_pixels += 1; - - // Check if pixel is in corners (typical for resize cursors) - let is_corner = (x < width / 4 && y < height / 4) - || (x > 3 * width / 4 && y > 3 * height / 4) - || (x < width / 4 && y > 3 * height / 4) - || (x > 3 * width / 4 && y < height / 4); - - if is_corner { - corner_pixels += 1; - } - - // Check if pixel is on edges (for line-based resize cursors) - let is_edge = x < 2 || x > width - 3 || y < 2 || y > height - 3; - if is_edge { - edge_pixels += 1; - } - } - } - } - } - - // Resize cursors should have significant corner or edge concentration - total_pixels > 20 - && (corner_pixels as f32 / total_pixels as f32 > 0.3 - || edge_pixels as f32 / total_pixels as f32 > 0.6) - } -} - -/// Analyze a cursor image and try to detect its type -pub fn analyze_cursor_image(image_path: &Path) -> Option { - // Load the image and analyze it - if let Ok(img) = image::open(image_path) { - let rgba = img.to_rgba8(); - let (width, height) = img.dimensions(); - CursorType::detect_from_image(&rgba.into_raw(), width, height) - } else { - None - } -} diff --git a/crates/rendering/src/cursor_svg_tests.rs b/crates/rendering/src/cursor_svg_tests.rs deleted file mode 100644 index 0672cad7b63..00000000000 --- a/crates/rendering/src/cursor_svg_tests.rs +++ /dev/null @@ -1,253 +0,0 @@ -#[cfg(test)] -mod tests { - use super::super::cursor_svg::*; - - #[test] - fn test_arrow_cursor_detection() { - // Create a simple arrow pattern: mostly pixels in top-left - let width = 32; - let height = 32; - let mut image_data = vec![0u8; (width * height * 4) as usize]; - - // Add some pixels in the top-left area to simulate arrow - for y in 0..height / 3 { - for x in 0..width / 3 { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - image_data[idx] = 0; // R - image_data[idx + 1] = 0; // G - image_data[idx + 2] = 0; // B - image_data[idx + 3] = 255; // A (opaque) - } - } - } - - let detected = CursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, Some(CursorType::Arrow)); - } - - #[test] - fn test_ibeam_cursor_detection() { - // Create a vertical line pattern for I-beam - let width = 16; - let height = 32; - let mut image_data = vec![0u8; (width * height * 4) as usize]; - - // Add vertical line in center - let center_x = width / 2; - for y in 0..height { - for x in center_x.saturating_sub(1)..=center_x + 1 { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - image_data[idx] = 0; // R - image_data[idx + 1] = 0; // G - image_data[idx + 2] = 0; // B - image_data[idx + 3] = 255; // A (opaque) - } - } - } - - let detected = CursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, Some(CursorType::IBeam)); - } - - #[test] - fn test_crosshair_cursor_detection() { - // Create a cross pattern - let width = 24; - let height = 24; - let mut image_data = vec![0u8; (width * height * 4) as usize]; - - let center_x = width / 2; - let center_y = height / 2; - - // Horizontal line - for x in 0..width { - let idx = ((center_y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - image_data[idx + 3] = 255; // A (opaque) - } - } - - // Vertical line - for y in 0..height { - let idx = ((y * width + center_x) * 4) as usize; - if idx + 3 < image_data.len() { - image_data[idx + 3] = 255; // A (opaque) - } - } - - let detected = CursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, Some(CursorType::Crosshair)); - } - - #[test] - fn test_hand_cursor_detection() { - // Create a pattern with more pixels in bottom half (typical of hand cursors) - let width = 24; - let height = 24; - let mut image_data = vec![0u8; (width * height * 4) as usize]; - - let mid_y = height / 2; - - // Add more pixels in the bottom half - for y in mid_y..height { - for x in 4..width - 4 { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - image_data[idx] = 0; // R - image_data[idx + 1] = 0; // G - image_data[idx + 2] = 0; // B - image_data[idx + 3] = 255; // A (opaque) - } - } - } - - // Add some pixels in top half but fewer - for y in 0..mid_y / 2 { - for x in 8..width - 8 { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - image_data[idx + 3] = 255; // A (opaque) - } - } - } - - let detected = CursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, Some(CursorType::PointingHand)); - } - - #[test] - fn test_resize_cursor_detection() { - // Create a pattern with corner pixels (typical of resize cursors) - let width = 24; - let height = 24; - let mut image_data = vec![0u8; (width * height * 4) as usize]; - - // Add pixels in corners - let corner_size = width / 4; - - // Top-left corner - for y in 0..corner_size { - for x in 0..corner_size { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - image_data[idx + 3] = 255; // A (opaque) - } - } - } - - // Bottom-right corner - for y in (height - corner_size)..height { - for x in (width - corner_size)..width { - let idx = ((y * width + x) * 4) as usize; - if idx + 3 < image_data.len() { - image_data[idx + 3] = 255; // A (opaque) - } - } - } - - let detected = CursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, Some(CursorType::ResizeNWSE)); - } - - #[test] - fn test_unknown_cursor_pattern() { - // Create a random pattern that shouldn't match any known cursor - let width = 32; - let height = 32; - let mut image_data = vec![0u8; (width * height * 4) as usize]; - - // Add a few random pixels - for i in (0..100).step_by(10) { - if i * 4 + 3 < image_data.len() { - image_data[i * 4 + 3] = 255; // A (opaque) - } - } - - let detected = CursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, None); - } - - #[test] - fn test_empty_image() { - // Test with completely transparent image - let width = 32; - let height = 32; - let image_data = vec![0u8; (width * height * 4) as usize]; // All transparent - - let detected = CursorType::detect_from_image(&image_data, width, height); - assert_eq!(detected, None); - } - - #[test] - fn test_svg_loading() { - // Test that we can load SVG content for all cursor types - for cursor_type in [ - CursorType::Arrow, - CursorType::IBeam, - CursorType::Crosshair, - CursorType::PointingHand, - CursorType::ResizeNWSE, - CursorType::ResizeEW, - ] { - let svg_content = load_cursor_svg(&cursor_type); - assert!( - svg_content.is_some(), - "Failed to load SVG for {:?}", - cursor_type - ); - - if let Some(content) = svg_content { - assert!( - !content.is_empty(), - "SVG content is empty for {:?}", - cursor_type - ); - // Basic SVG validation - let content_str = String::from_utf8_lossy(&content); - assert!( - content_str.contains(""), - "Invalid SVG content for {:?}", - cursor_type - ); - } - } - } - - #[test] - fn test_cursor_pattern_edge_cases() { - // Test with very small images - let width = 4; - let height = 4; - let mut image_data = vec![0u8; (width * height * 4) as usize]; - - // Fill with opaque pixels - for i in 0..image_data.len() { - if i % 4 == 3 { - image_data[i] = 255; // Alpha channel - } - } - - let detected = CursorType::detect_from_image(&image_data, width, height); - // Should not crash and return None for very small images - assert_eq!(detected, None); - } - - #[test] - fn test_cursor_pattern_with_invalid_data() { - // Test with insufficient data - let width = 32; - let height = 32; - let image_data = vec![0u8; 10]; // Much smaller than required - - let detected = CursorType::detect_from_image(&image_data, width, height); - // Should handle gracefully and return None - assert_eq!(detected, None); - } -} diff --git a/crates/rendering/src/cursor_texture_manager.rs b/crates/rendering/src/cursor_texture_manager.rs deleted file mode 100644 index d6d07ba5d55..00000000000 --- a/crates/rendering/src/cursor_texture_manager.rs +++ /dev/null @@ -1,221 +0,0 @@ -use crate::cursor_svg::{analyze_cursor_image, CursorType}; -use cap_project::XY; -use image::GenericImageView; -use std::collections::HashMap; -use std::path::Path; - -/// A cursor texture that can be either from a captured PNG or a high-quality SVG -#[derive(Debug)] -pub struct EnhancedCursorTexture { - pub inner: wgpu::Texture, - pub hotspot: XY, -} - -/// Enhanced cursor texture manager that prefers SVG versions when available -pub struct CursorTextureManager { - /// Map of cursor_id to detected cursor type - cursor_type_cache: HashMap>, - /// Loaded SVG textures by cursor type - svg_textures: HashMap, - /// Fallback captured textures by cursor_id - captured_textures: HashMap, -} - -impl CursorTextureManager { - pub fn new() -> Self { - Self { - cursor_type_cache: HashMap::new(), - svg_textures: HashMap::new(), - captured_textures: HashMap::new(), - } - } - - /// Get the best available texture for a cursor ID - /// Prefers SVG version if available, cursor type is detected, and SVG is enabled - pub fn get_texture(&self, cursor_id: &str, use_svg: bool) -> Option<&EnhancedCursorTexture> { - // First, check if we have a detected cursor type and SVG texture for it (and SVG is enabled) - if use_svg { - if let Some(Some(cursor_type)) = self.cursor_type_cache.get(cursor_id) { - if let Some(svg_texture) = self.svg_textures.get(cursor_type) { - return Some(svg_texture); - } - } - } - - // Fall back to captured texture - self.captured_textures.get(cursor_id) - } - - /// Load and analyze a captured cursor image - /// Detect its type and cache the result - pub fn load_captured_cursor( - &mut self, - device: &wgpu::Device, - queue: &wgpu::Queue, - cursor_id: String, - image_path: &Path, - hotspot: XY, - ) -> Result<(), String> { - // Analyze the cursor image to detect its type - let detected_type = analyze_cursor_image(image_path); - self.cursor_type_cache - .insert(cursor_id.clone(), detected_type.clone()); - - // Load the captured texture as fallback - let img = - image::open(image_path).map_err(|e| format!("Failed to load cursor image: {}", e))?; - - let rgba = img.to_rgba8(); - let dimensions = img.dimensions(); - - let size = wgpu::Extent3d { - width: dimensions.0, - height: dimensions.1, - depth_or_array_layers: 1, - }; - - let texture = device.create_texture(&wgpu::TextureDescriptor { - label: Some(&format!("Captured Cursor Texture {}", cursor_id)), - size, - mip_level_count: 1, - sample_count: 1, - dimension: wgpu::TextureDimension::D2, - format: wgpu::TextureFormat::Rgba8UnormSrgb, - usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, - view_formats: &[], - }); - - queue.write_texture( - wgpu::TexelCopyTextureInfo { - aspect: wgpu::TextureAspect::All, - texture: &texture, - mip_level: 0, - origin: wgpu::Origin3d::ZERO, - }, - &rgba, - wgpu::TexelCopyBufferLayout { - offset: 0, - bytes_per_row: Some(4 * dimensions.0), - rows_per_image: Some(dimensions.1), - }, - size, - ); - - let enhanced_texture = EnhancedCursorTexture { - inner: texture, - hotspot, - }; - - self.captured_textures.insert(cursor_id, enhanced_texture); - Ok(()) - } - - /// Load an SVG cursor texture for a specific cursor type - pub fn load_svg_cursor( - &mut self, - device: &wgpu::Device, - queue: &wgpu::Queue, - cursor_type: CursorType, - svg_content: &[u8], - size: u32, - ) -> Result<(), String> { - // Rasterize the SVG using resvg - let svg_data = - std::str::from_utf8(svg_content).map_err(|e| format!("Invalid UTF-8 in SVG: {}", e))?; - - let rtree = resvg::usvg::Tree::from_str(svg_data, &resvg::usvg::Options::default()) - .map_err(|e| format!("Failed to parse SVG: {}", e))?; - - let pixmap_size = rtree.size().to_int_size(); - let target_size = tiny_skia::IntSize::from_wh(size, size).ok_or("Invalid target size")?; - - let mut pixmap = tiny_skia::Pixmap::new(target_size.width(), target_size.height()) - .ok_or("Failed to create pixmap")?; - - // Calculate scale to fit the SVG into the target size while maintaining aspect ratio - let scale_x = target_size.width() as f32 / pixmap_size.width() as f32; - let scale_y = target_size.height() as f32 / pixmap_size.height() as f32; - let scale = scale_x.min(scale_y); - - let transform = tiny_skia::Transform::from_scale(scale, scale); - - resvg::render(&rtree, transform, &mut pixmap.as_mut()); - - // Convert pixmap to RGBA format for wgpu - let rgba_data: Vec = pixmap - .pixels() - .iter() - .flat_map(|pixel| [pixel.red(), pixel.green(), pixel.red(), pixel.alpha()]) - .collect(); - - let texture_size = wgpu::Extent3d { - width: size, - height: size, - depth_or_array_layers: 1, - }; - - let texture = device.create_texture(&wgpu::TextureDescriptor { - label: Some(&format!("SVG Cursor Texture {:?}", cursor_type)), - size: texture_size, - mip_level_count: 1, - sample_count: 1, - dimension: wgpu::TextureDimension::D2, - format: wgpu::TextureFormat::Rgba8UnormSrgb, - usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, - view_formats: &[], - }); - - queue.write_texture( - wgpu::TexelCopyTextureInfo { - aspect: wgpu::TextureAspect::All, - texture: &texture, - mip_level: 0, - origin: wgpu::Origin3d::ZERO, - }, - &rgba_data, - wgpu::TexelCopyBufferLayout { - offset: 0, - bytes_per_row: Some(4 * size), - rows_per_image: Some(size), - }, - texture_size, - ); - - let hotspot = cursor_type.get_hotspot(); - self.svg_textures.insert( - cursor_type, - EnhancedCursorTexture { - inner: texture, - hotspot, - }, - ); - Ok(()) - } - - /// Initialize all built-in SVG cursors - pub fn initialize_svg_cursors( - &mut self, - device: &wgpu::Device, - queue: &wgpu::Queue, - ) -> Result<(), String> { - use crate::cursor_svg::CursorType; - - // Load all the SVG cursors we have - let cursor_types = vec![ - CursorType::Arrow, - CursorType::IBeam, - CursorType::Crosshair, - CursorType::PointingHand, - CursorType::ResizeNWSE, - CursorType::ResizeEW, - ]; - - for cursor_type in cursor_types { - let svg_content = cursor_type.load(); - // Use a higher resolution for SVG cursors (64x64) for better quality - self.load_svg_cursor(device, queue, cursor_type, &svg_content, 64)?; - } - - Ok(()) - } -} diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rs index a19ea576e6d..e1ecb495308 100644 --- a/crates/rendering/src/layers/cursor.rs +++ b/crates/rendering/src/layers/cursor.rs @@ -1,10 +1,14 @@ +use std::collections::HashMap; + use bytemuck::{Pod, Zeroable}; use cap_project::*; -use wgpu::{include_wgsl, util::DeviceExt, BindGroup, FilterMode}; +use image::GenericImageView; +use tracing::error; +use wgpu::{BindGroup, FilterMode, include_wgsl, util::DeviceExt}; use crate::{ - zoom::InterpolatedZoom, DecodedSegmentFrames, ProjectUniforms, RenderVideoConstants, - STANDARD_CURSOR_HEIGHT, + DecodedSegmentFrames, ProjectUniforms, RenderVideoConstants, STANDARD_CURSOR_HEIGHT, + zoom::InterpolatedZoom, }; const CURSOR_CLICK_DURATION: f64 = 0.25; @@ -14,6 +18,7 @@ const CLICK_SHRINK_SIZE: f32 = 0.7; pub struct CursorLayer { statics: Statics, bind_group: Option, + cursors: HashMap, } struct Statics { @@ -169,6 +174,7 @@ impl CursorLayer { Self { statics, bind_group: None, + cursors: Default::default(), } } @@ -201,15 +207,45 @@ impl CursorLayer { let speed = (velocity[0] * velocity[0] + velocity[1] * velocity[1]).sqrt(); let motion_blur_amount = (speed * 0.3).min(1.0) * 0.0; // uniforms.project.cursor.motion_blur; - let Some(cursor_texture) = constants.cursor_texture_manager.get_texture( - &interpolated_cursor.cursor_id, - !uniforms.project.cursor.raw && uniforms.project.cursor.use_svg, - ) else { + if !self.cursors.contains_key(&interpolated_cursor.cursor_id) { + let mut cursor = None; + // We first attempt to load a high-quality SVG cursor + if !uniforms.project.cursor.raw && uniforms.project.cursor.use_svg { + cursor = CursorTexture::get_svg(&constants, &interpolated_cursor.cursor_id); + } + + // If not we attempt to load the low-quality image cursor + if let StudioRecordingMeta::MultipleSegments { inner, .. } = &constants.meta + && cursor.is_none() + { + if let Some(c) = inner + .get_cursor_image(&constants.recording_meta, &interpolated_cursor.cursor_id) + { + if let Ok(img) = image::open(&c.path).map_err(|err| { + error!("Failed to load cursor image from {:?}: {err}", c.path) + }) { + cursor = Some(CursorTexture::prepare( + constants, + &img.to_rgba8(), + img.dimensions(), + c.hotspot, + )); + } + } + } + + if let Some(cursor) = cursor { + self.cursors + .insert(interpolated_cursor.cursor_id.clone(), cursor); + } + } + let Some(cursor_texture) = self.cursors.get(&interpolated_cursor.cursor_id) else { + error!("Cursor {:?} not found!", interpolated_cursor.cursor_id); return; }; let cursor_base_size_px = { - let cursor_texture_size = cursor_texture.inner.size(); + let cursor_texture_size = cursor_texture.texture.size(); let cursor_texture_size_aspect = cursor_texture_size.width as f32 / cursor_texture_size.height as f32; @@ -233,8 +269,8 @@ impl CursorLayer { * (1.0 - CLICK_SHRINK_SIZE) + CLICK_SHRINK_SIZE; - let cursor_size_px = - cursor_base_size_px * click_scale_factor * zoom.display_amount() as f32; + let cursor_size_px: XY = + (cursor_base_size_px * click_scale_factor * zoom.display_amount() as f32).into(); let hotspot_px = cursor_texture.hotspot * cursor_size_px; @@ -254,7 +290,7 @@ impl CursorLayer { let uniforms = CursorUniforms { position: [position.x as f32, position.y as f32], - size: [cursor_size_px.x, cursor_size_px.y], + size: [cursor_size_px.x as f32, cursor_size_px.y as f32], output_size: [uniforms.output_size.0 as f32, uniforms.output_size.1 as f32], screen_bounds: uniforms.display.target_bounds, velocity, @@ -270,7 +306,7 @@ impl CursorLayer { self.bind_group = Some( self.statics - .create_bind_group(&constants.device, &cursor_texture.inner), + .create_bind_group(&constants.device, &cursor_texture.texture), ); } @@ -363,3 +399,100 @@ fn get_click_t(clicks: &[CursorClickEvent], time_ms: f64) -> f32 { 1.0 } + +struct CursorTexture { + texture: wgpu::Texture, + hotspot: XY, +} + +impl CursorTexture { + // Attempt to find and load a higher-quality SVG cursor included in Cap. + // These are used instead of the OS provided cursor images so the cursor is better quality. + fn get_svg(constants: &RenderVideoConstants, id: &str) -> Option { + println!("GET SVG {:?} {:?}", id, constants.recording_meta.platform); + + match (id, &constants.recording_meta.platform) { + _ => None, + } + } + + /// Prepare a cursor texture on the GPU from RGBA data. + fn prepare( + constants: &RenderVideoConstants, + rgba: &[u8], + dimensions: (u32, u32), + hotspot: XY, + ) -> Self { + let texture = constants.device.create_texture(&wgpu::TextureDescriptor { + label: Some("Cursor Texture"), + size: wgpu::Extent3d { + width: dimensions.0, + height: dimensions.1, + depth_or_array_layers: 1, + }, + mip_level_count: 1, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format: wgpu::TextureFormat::Rgba8UnormSrgb, + usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, + view_formats: &[], + }); + + constants.queue.write_texture( + wgpu::TexelCopyTextureInfo { + texture: &texture, + mip_level: 0, + origin: wgpu::Origin3d::ZERO, + aspect: wgpu::TextureAspect::All, + }, + &rgba, + wgpu::TexelCopyBufferLayout { + offset: 0, + bytes_per_row: Some(4 * dimensions.0), + rows_per_image: None, + }, + wgpu::Extent3d { + width: dimensions.0, + height: dimensions.1, + depth_or_array_layers: 1, + }, + ); + + Self { texture, hotspot } + } + + /// Prepare a cursor texture on the GPU from a raw SVG file + fn prepare_svg( + constants: &RenderVideoConstants, + svg_data: &str, + hotspot: XY, + ) -> Result { + let size = 64; // TODO: Should scale with the cursor size in the editor + + let rtree = resvg::usvg::Tree::from_str(svg_data, &resvg::usvg::Options::default()) + .map_err(|e| format!("Failed to parse SVG: {}", e))?; + + let pixmap_size = rtree.size().to_int_size(); + let target_size = tiny_skia::IntSize::from_wh(size, size).ok_or("Invalid target size")?; + + let mut pixmap = tiny_skia::Pixmap::new(target_size.width(), target_size.height()) + .ok_or("Failed to create pixmap")?; + + // Calculate scale to fit the SVG into the target size while maintaining aspect ratio + let scale_x = target_size.width() as f32 / pixmap_size.width() as f32; + let scale_y = target_size.height() as f32 / pixmap_size.height() as f32; + let scale = scale_x.min(scale_y); + + let transform = tiny_skia::Transform::from_scale(scale, scale); + + resvg::render(&rtree, transform, &mut pixmap.as_mut()); + + let rgba: Vec = pixmap + .pixels() + .iter() + .flat_map(|pixel| [pixel.red(), pixel.green(), pixel.red(), pixel.alpha()]) + .collect(); + + Ok(Self::prepare(constants, &rgba, (size, size), hotspot)) + } +} diff --git a/crates/rendering/src/lib.rs b/crates/rendering/src/lib.rs index 46a1d25c849..2d5fae54094 100644 --- a/crates/rendering/src/lib.rs +++ b/crates/rendering/src/lib.rs @@ -5,13 +5,11 @@ use cap_project::{ }; use composite_frame::CompositeVideoFrameUniforms; use core::f64; -use cursor_interpolation::{interpolate_cursor, InterpolatedCursorPosition}; -use cursor_texture_manager::{CursorTextureManager, EnhancedCursorTexture}; -use decoder::{spawn_decoder, AsyncVideoDecoderHandle}; +use cursor_interpolation::{InterpolatedCursorPosition, interpolate_cursor}; +use decoder::{AsyncVideoDecoderHandle, spawn_decoder}; use frame_pipeline::finish_encoder; -use futures::future::OptionFuture; use futures::FutureExt; -use image::GenericImageView; +use futures::future::OptionFuture; use layers::{ Background, BackgroundLayer, BlurLayer, CameraLayer, CaptionsLayer, CursorLayer, DisplayLayer, }; @@ -25,9 +23,6 @@ use tracing::error; mod composite_frame; mod coord; mod cursor_interpolation; -mod cursor_svg; -mod cursor_svg_tests; -mod cursor_texture_manager; pub mod decoder; mod frame_pipeline; mod layers; @@ -172,8 +167,6 @@ pub enum RenderingError { ChannelSendFrameFailed(#[from] mpsc::error::SendError<(RenderedFrame, u32)>), #[error("Failed to load image: {0}")] ImageLoadError(String), - #[error("Other error: {0}")] - Other(String), } pub struct RenderSegment { @@ -306,15 +299,16 @@ pub struct RenderVideoConstants { pub queue: wgpu::Queue, pub device: wgpu::Device, pub options: RenderOptions, - pub cursor_texture_manager: CursorTextureManager, - background_textures: std::sync::Arc>>, + pub meta: StudioRecordingMeta, + pub recording_meta: RecordingMeta, + pub background_textures: std::sync::Arc>>, } impl RenderVideoConstants { pub async fn new( segments: &[SegmentRecordings], - recording_meta: &RecordingMeta, - meta: &StudioRecordingMeta, + recording_meta: RecordingMeta, + meta: StudioRecordingMeta, ) -> Result { let options = RenderOptions { screen_size: XY::new(segments[0].display.width, segments[0].display.height), @@ -336,8 +330,6 @@ impl RenderVideoConstants { }) .await?; - let cursor_texture_manager = - Self::load_cursor_textures(&device, &queue, recording_meta, meta)?; let background_textures = Arc::new(tokio::sync::RwLock::new(HashMap::new())); Ok(Self { @@ -346,52 +338,11 @@ impl RenderVideoConstants { device, queue, options, - cursor_texture_manager, background_textures, + meta, + recording_meta, }) } - - fn load_cursor_textures( - device: &wgpu::Device, - queue: &wgpu::Queue, - recording_meta: &RecordingMeta, - meta: &StudioRecordingMeta, - ) -> Result { - let mut manager = CursorTextureManager::new(); - - // Initialize SVG cursors first - manager.initialize_svg_cursors(device, queue).map_err(|e| { - RenderingError::Other(format!("Failed to initialize SVG cursors: {}", e)) - })?; - - let cursor_images = match &meta { - StudioRecordingMeta::SingleSegment { .. } => Default::default(), - StudioRecordingMeta::MultipleSegments { inner, .. } => { - inner.cursor_images(recording_meta).unwrap_or_default() - } - }; - - for (cursor_id, cursor) in &cursor_images.0 { - if !cursor.path.exists() { - continue; - } - - // Load the captured cursor and analyze its type - if let Err(e) = manager.load_captured_cursor( - device, - queue, - cursor_id.clone(), - &cursor.path, - cursor.hotspot.map(|v| v as f32), - ) { - error!("Failed to load cursor image {}: {e}", cursor.path.display()); - // Don't return error, just skip this cursor image - continue; - } - } - - Ok(manager) - } } #[derive(Clone, Debug)] @@ -1225,9 +1176,5 @@ fn srgb_to_linear(c: u16) -> f32 { } fn get_either((a, b): (T, T), left: bool) -> T { - if left { - a - } else { - b - } + if left { a } else { b } } From 0a71e2244ad6b0d966ad8fde59d6807f6be063f6 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Tue, 29 Jul 2025 14:17:21 +0800 Subject: [PATCH 08/29] ensure prepare svg system is working + bundle included cursors --- crates/project/src/configuration.rs | 2 +- crates/rendering/src/layers/cursor.rs | 54 ++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/crates/project/src/configuration.rs b/crates/project/src/configuration.rs index 8343851e468..79e9fa17216 100644 --- a/crates/project/src/configuration.rs +++ b/crates/project/src/configuration.rs @@ -59,7 +59,7 @@ pub struct XY { } impl XY { - pub fn new(x: T, y: T) -> Self { + pub const fn new(x: T, y: T) -> Self { Self { x, y } } diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rs index e1ecb495308..9e78338e0ac 100644 --- a/crates/rendering/src/layers/cursor.rs +++ b/crates/rendering/src/layers/cursor.rs @@ -211,7 +211,15 @@ impl CursorLayer { let mut cursor = None; // We first attempt to load a high-quality SVG cursor if !uniforms.project.cursor.raw && uniforms.project.cursor.use_svg { - cursor = CursorTexture::get_svg(&constants, &interpolated_cursor.cursor_id); + cursor = CursorTexture::get_svg(&constants, &interpolated_cursor.cursor_id) + .map_err(|err| { + error!( + "Error loading SVG cursor {:?}: {err}", + interpolated_cursor.cursor_id + ) + }) + .ok() + .flatten(); } // If not we attempt to load the low-quality image cursor @@ -400,20 +408,54 @@ fn get_click_t(clicks: &[CursorClickEvent], time_ms: f64) -> f32 { 1.0 } +static CURSOR_ARROW: (&'static str, XY) = ( + include_str!("../../assets/cursors/arrow.svg"), + XY::new(0.1, 0.1), +); + +static CURSOR_IBEAM: (&'static str, XY) = ( + include_str!("../../assets/cursors/ibeam.svg"), + XY::new(0.5, 0.5), +); +static CURSOR_CROSSHAIR: (&'static str, XY) = ( + include_str!("../../assets/cursors/crosshair.svg"), + XY::new(0.5, 0.5), +); +static CURSOR_POINTING_HAND: (&'static str, XY) = ( + include_str!("../../assets/cursors/pointing-hand.svg"), + XY::new(0.3, 0.1), +); +static CURSOR_RESIZE_NWSE: (&'static str, XY) = ( + include_str!("../../assets/cursors/resize-nwse.svg"), + XY::new(0.5, 0.5), +); +static CURSOR_RESIZE_EW: (&'static str, XY) = ( + include_str!("../../assets/cursors/resize-ew.svg"), + XY::new(0.5, 0.5), +); + struct CursorTexture { texture: wgpu::Texture, hotspot: XY, } impl CursorTexture { - // Attempt to find and load a higher-quality SVG cursor included in Cap. - // These are used instead of the OS provided cursor images so the cursor is better quality. - fn get_svg(constants: &RenderVideoConstants, id: &str) -> Option { + /// Attempt to find and load a higher-quality SVG cursor included in Cap. + /// These are used instead of the OS provided cursor images when possible as the quality is better. + fn get_svg( + constants: &RenderVideoConstants, + id: &str, + ) -> Result, String> { println!("GET SVG {:?} {:?}", id, constants.recording_meta.platform); - match (id, &constants.recording_meta.platform) { + Ok(match (id, &constants.recording_meta.platform) { + (_, _) => Some(Self::prepare_svg( + constants, + CURSOR_RESIZE_NWSE.0, + CURSOR_RESIZE_NWSE.1, + )?), _ => None, - } + }) } /// Prepare a cursor texture on the GPU from RGBA data. From dc2d447286ced4bd62ce0668c869924acad22b69 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Tue, 29 Jul 2025 15:09:18 +0800 Subject: [PATCH 09/29] svg output scaling --- crates/rendering/src/layers/cursor.rs | 44 ++++++++++++++++----------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rs index 9e78338e0ac..b8f51d2aab0 100644 --- a/crates/rendering/src/layers/cursor.rs +++ b/crates/rendering/src/layers/cursor.rs @@ -257,19 +257,20 @@ impl CursorLayer { let cursor_texture_size_aspect = cursor_texture_size.width as f32 / cursor_texture_size.height as f32; - let screen_size = constants.options.screen_size; let cursor_size_percentage = if uniforms.cursor_size <= 0.0 { 100.0 } else { uniforms.cursor_size / 100.0 }; + let factor = STANDARD_CURSOR_HEIGHT / constants.options.screen_size.y as f32 + * uniforms.output_size.1 as f32; - let factor = - STANDARD_CURSOR_HEIGHT / screen_size.y as f32 * uniforms.output_size.1 as f32; + let cursor_size_constant = + factor * cursor_size_percentage * zoom.display_amount() as f32; XY::new( - factor * cursor_texture_size_aspect * cursor_size_percentage, - factor * cursor_size_percentage, + cursor_size_constant * cursor_texture_size_aspect, + cursor_size_constant, ) }; @@ -277,8 +278,7 @@ impl CursorLayer { * (1.0 - CLICK_SHRINK_SIZE) + CLICK_SHRINK_SIZE; - let cursor_size_px: XY = - (cursor_base_size_px * click_scale_factor * zoom.display_amount() as f32).into(); + let cursor_size_px: XY = (cursor_base_size_px * click_scale_factor).into(); let hotspot_px = cursor_texture.hotspot * cursor_size_px; @@ -434,6 +434,9 @@ static CURSOR_RESIZE_EW: (&'static str, XY) = ( XY::new(0.5, 0.5), ); +/// The size to render the svg to. +static SVG_OUTPUT_HEIGHT: u32 = 255; + struct CursorTexture { texture: wgpu::Texture, hotspot: XY, @@ -509,22 +512,24 @@ impl CursorTexture { svg_data: &str, hotspot: XY, ) -> Result { - let size = 64; // TODO: Should scale with the cursor size in the editor - let rtree = resvg::usvg::Tree::from_str(svg_data, &resvg::usvg::Options::default()) .map_err(|e| format!("Failed to parse SVG: {}", e))?; - let pixmap_size = rtree.size().to_int_size(); - let target_size = tiny_skia::IntSize::from_wh(size, size).ok_or("Invalid target size")?; + // Although we could probably determine the size that the cursor is going to be render, + // that would depend on the cursor size the user selects. + // + // This would require reinitializing the texture every time that changes which would be more complicated. + // So we trade a small about VRAM for only initializing it once. + let aspect_ratio = rtree.size().width() / rtree.size().height(); + let width = (aspect_ratio * SVG_OUTPUT_HEIGHT as f32) as u32; - let mut pixmap = tiny_skia::Pixmap::new(target_size.width(), target_size.height()) + let mut pixmap = tiny_skia::Pixmap::new(width as u32, SVG_OUTPUT_HEIGHT as u32) .ok_or("Failed to create pixmap")?; // Calculate scale to fit the SVG into the target size while maintaining aspect ratio - let scale_x = target_size.width() as f32 / pixmap_size.width() as f32; - let scale_y = target_size.height() as f32 / pixmap_size.height() as f32; + let scale_x = width as f32 / rtree.size().width(); + let scale_y = SVG_OUTPUT_HEIGHT as f32 / rtree.size().height(); let scale = scale_x.min(scale_y); - let transform = tiny_skia::Transform::from_scale(scale, scale); resvg::render(&rtree, transform, &mut pixmap.as_mut()); @@ -532,9 +537,14 @@ impl CursorTexture { let rgba: Vec = pixmap .pixels() .iter() - .flat_map(|pixel| [pixel.red(), pixel.green(), pixel.red(), pixel.alpha()]) + .flat_map(|p| [p.red(), p.green(), p.red(), p.alpha()]) .collect(); - Ok(Self::prepare(constants, &rgba, (size, size), hotspot)) + Ok(Self::prepare( + constants, + &rgba, + (pixmap.width(), pixmap.height()), + hotspot, + )) } } From 9035c3e14fd074e0cba641635ddf72ec78f54a83 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 13:13:50 +0800 Subject: [PATCH 10/29] `cap-cursor-info` work + cursor enums populated --- Cargo.lock | 212 +++--- apps/desktop/src/utils/tauri.ts | 2 +- crates/cursor-info/Cargo.toml | 20 + crates/cursor-info/assets/mac/LICENSE | 674 ++++++++++++++++++ crates/cursor-info/assets/mac/X_cursor.svg | 17 + crates/cursor-info/assets/mac/all-scroll.svg | 23 + .../assets/mac/bottom_left_corner.svg | 17 + .../assets/mac/bottom_right_corner.svg | 17 + crates/cursor-info/assets/mac/bottom_tee.svg | 17 + crates/cursor-info/assets/mac/center_ptr.svg | 17 + .../cursor-info/assets/mac/context-menu.svg | 18 + crates/cursor-info/assets/mac/copy.svg | 51 ++ crates/cursor-info/assets/mac/cross.svg | 18 + .../cursor-info/assets/mac/crossed_circle.svg | 39 + crates/cursor-info/assets/mac/crosshair.svg | 71 ++ crates/cursor-info/assets/mac/dnd_no_drop.svg | 28 + crates/cursor-info/assets/mac/dotbox.svg | 23 + crates/cursor-info/assets/mac/hand1.svg | 20 + crates/cursor-info/assets/mac/hand2.svg | 20 + crates/cursor-info/assets/mac/left_ptr.svg | 17 + .../mac/left_ptr_watch/left_ptr_watch-01.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-02.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-03.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-04.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-05.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-06.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-07.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-08.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-09.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-10.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-11.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-12.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-13.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-14.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-15.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-16.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-17.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-18.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-19.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-20.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-21.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-22.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-23.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-24.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-25.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-26.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-27.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-28.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-29.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-30.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-31.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-32.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-33.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-34.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-35.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-36.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-37.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-38.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-39.svg | 66 ++ .../mac/left_ptr_watch/left_ptr_watch-40.svg | 66 ++ crates/cursor-info/assets/mac/left_side.svg | 22 + crates/cursor-info/assets/mac/left_tee.svg | 17 + crates/cursor-info/assets/mac/link.svg | 17 + crates/cursor-info/assets/mac/ll_angle.svg | 18 + crates/cursor-info/assets/mac/lr_angle.svg | 18 + crates/cursor-info/assets/mac/move.svg | 20 + crates/cursor-info/assets/mac/pencil.svg | 17 + crates/cursor-info/assets/mac/person.svg | 51 ++ crates/cursor-info/assets/mac/pin.svg | 39 + crates/cursor-info/assets/mac/plus.svg | 19 + .../cursor-info/assets/mac/question_arrow.svg | 19 + crates/cursor-info/assets/mac/right_ptr.svg | 17 + crates/cursor-info/assets/mac/right_tee.svg | 22 + .../cursor-info/assets/mac/sb_down_arrow.svg | 22 + .../assets/mac/sb_h_double_arrow.svg | 17 + .../cursor-info/assets/mac/sb_left_arrow.svg | 17 + .../cursor-info/assets/mac/sb_right_arrow.svg | 17 + crates/cursor-info/assets/mac/sb_up_arrow.svg | 17 + .../assets/mac/sb_v_double_arrow.svg | 22 + crates/cursor-info/assets/mac/top_side.svg | 22 + crates/cursor-info/assets/mac/top_tee.svg | 22 + crates/cursor-info/assets/mac/ul_angle.svg | 17 + crates/cursor-info/assets/mac/ur_angle.svg | 17 + .../cursor-info/assets/mac/vertical-text.svg | 17 + .../cursor-info/assets/mac/wait/wait-01.svg | 34 + .../cursor-info/assets/mac/wait/wait-02.svg | 34 + .../cursor-info/assets/mac/wait/wait-03.svg | 39 + .../cursor-info/assets/mac/wait/wait-04.svg | 39 + .../cursor-info/assets/mac/wait/wait-05.svg | 39 + .../cursor-info/assets/mac/wait/wait-06.svg | 39 + .../cursor-info/assets/mac/wait/wait-07.svg | 39 + .../cursor-info/assets/mac/wait/wait-08.svg | 39 + .../cursor-info/assets/mac/wait/wait-09.svg | 39 + .../cursor-info/assets/mac/wait/wait-10.svg | 34 + .../cursor-info/assets/mac/wait/wait-11.svg | 34 + .../cursor-info/assets/mac/wait/wait-12.svg | 34 + .../cursor-info/assets/mac/wait/wait-13.svg | 39 + .../cursor-info/assets/mac/wait/wait-14.svg | 39 + .../cursor-info/assets/mac/wait/wait-15.svg | 39 + .../cursor-info/assets/mac/wait/wait-16.svg | 39 + .../cursor-info/assets/mac/wait/wait-17.svg | 39 + .../cursor-info/assets/mac/wait/wait-18.svg | 39 + .../cursor-info/assets/mac/wait/wait-19.svg | 39 + .../cursor-info/assets/mac/wait/wait-20.svg | 34 + .../cursor-info/assets/mac/wait/wait-21.svg | 34 + .../cursor-info/assets/mac/wait/wait-22.svg | 34 + .../cursor-info/assets/mac/wait/wait-23.svg | 39 + .../cursor-info/assets/mac/wait/wait-24.svg | 39 + .../cursor-info/assets/mac/wait/wait-25.svg | 39 + .../cursor-info/assets/mac/wait/wait-26.svg | 39 + .../cursor-info/assets/mac/wait/wait-27.svg | 39 + .../cursor-info/assets/mac/wait/wait-28.svg | 39 + .../cursor-info/assets/mac/wait/wait-29.svg | 39 + .../cursor-info/assets/mac/wait/wait-30.svg | 34 + .../cursor-info/assets/mac/wait/wait-31.svg | 34 + .../cursor-info/assets/mac/wait/wait-32.svg | 34 + .../cursor-info/assets/mac/wait/wait-33.svg | 39 + .../cursor-info/assets/mac/wait/wait-34.svg | 39 + .../cursor-info/assets/mac/wait/wait-35.svg | 39 + .../cursor-info/assets/mac/wait/wait-36.svg | 39 + .../cursor-info/assets/mac/wait/wait-37.svg | 39 + .../cursor-info/assets/mac/wait/wait-38.svg | 39 + .../cursor-info/assets/mac/wait/wait-39.svg | 39 + .../cursor-info/assets/mac/wait/wait-40.svg | 34 + .../cursor-info/assets/mac/wayland-cursor.svg | 17 + crates/cursor-info/assets/mac/xterm.svg | 22 + crates/cursor-info/assets/mac/zoom-in.svg | 32 + crates/cursor-info/assets/mac/zoom-out.svg | 31 + crates/cursor-info/assets/windows/arrow.svg | 3 + crates/cursor-info/assets/windows/cross.svg | 3 + crates/cursor-info/assets/windows/hand.svg | 8 + crates/cursor-info/assets/windows/ibeam.svg | 3 + crates/cursor-info/assets/windows/no.svg | 3 + crates/cursor-info/assets/windows/pen.svg | 11 + .../cursor-info/assets/windows/size-nesw.svg | 3 + crates/cursor-info/assets/windows/size-ns.svg | 3 + crates/cursor-info/assets/windows/sizeall.svg | 3 + crates/cursor-info/assets/windows/wait.svg | 46 ++ crates/cursor-info/src/lib.rs | 105 +++ crates/cursor-info/src/macos.rs | 122 ++++ crates/cursor-info/src/windows.rs | 250 +++++++ crates/export/src/lib.rs | 2 +- crates/media/src/platform/mod.rs | 68 -- crates/media/src/platform/win.rs | 81 --- crates/project/Cargo.toml | 2 + crates/project/src/configuration.rs | 9 + crates/project/src/meta.rs | 4 +- crates/recording/Cargo.toml | 2 + crates/recording/src/cursor.rs | 74 +- crates/recording/src/studio_recording.rs | 1 + crates/rendering/Cargo.toml | 1 + crates/rendering/assets/cursors/arrow.svg | 20 - crates/rendering/assets/cursors/crosshair.svg | 22 - crates/rendering/assets/cursors/ibeam.svg | 22 - .../assets/cursors/pointing-hand.svg | 31 - crates/rendering/assets/cursors/resize-ew.svg | 20 - .../rendering/assets/cursors/resize-nwse.svg | 40 -- crates/rendering/src/cursor_interpolation.rs | 3 +- crates/rendering/src/layers/cursor.rs | 83 +-- 159 files changed, 6618 insertions(+), 496 deletions(-) create mode 100644 crates/cursor-info/Cargo.toml create mode 100644 crates/cursor-info/assets/mac/LICENSE create mode 100644 crates/cursor-info/assets/mac/X_cursor.svg create mode 100644 crates/cursor-info/assets/mac/all-scroll.svg create mode 100644 crates/cursor-info/assets/mac/bottom_left_corner.svg create mode 100644 crates/cursor-info/assets/mac/bottom_right_corner.svg create mode 100644 crates/cursor-info/assets/mac/bottom_tee.svg create mode 100644 crates/cursor-info/assets/mac/center_ptr.svg create mode 100644 crates/cursor-info/assets/mac/context-menu.svg create mode 100644 crates/cursor-info/assets/mac/copy.svg create mode 100644 crates/cursor-info/assets/mac/cross.svg create mode 100644 crates/cursor-info/assets/mac/crossed_circle.svg create mode 100644 crates/cursor-info/assets/mac/crosshair.svg create mode 100644 crates/cursor-info/assets/mac/dnd_no_drop.svg create mode 100644 crates/cursor-info/assets/mac/dotbox.svg create mode 100644 crates/cursor-info/assets/mac/hand1.svg create mode 100644 crates/cursor-info/assets/mac/hand2.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-01.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-02.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-03.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-04.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-05.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-06.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-07.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-08.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-09.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-10.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-11.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-12.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-13.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-14.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-15.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-16.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-17.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-18.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-19.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-20.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-21.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-22.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-23.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-24.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-25.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-26.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-27.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-28.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-29.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-30.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-31.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-32.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-33.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-34.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-35.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-36.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-37.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-38.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-39.svg create mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-40.svg create mode 100644 crates/cursor-info/assets/mac/left_side.svg create mode 100644 crates/cursor-info/assets/mac/left_tee.svg create mode 100644 crates/cursor-info/assets/mac/link.svg create mode 100644 crates/cursor-info/assets/mac/ll_angle.svg create mode 100644 crates/cursor-info/assets/mac/lr_angle.svg create mode 100644 crates/cursor-info/assets/mac/move.svg create mode 100644 crates/cursor-info/assets/mac/pencil.svg create mode 100644 crates/cursor-info/assets/mac/person.svg create mode 100644 crates/cursor-info/assets/mac/pin.svg create mode 100644 crates/cursor-info/assets/mac/plus.svg create mode 100644 crates/cursor-info/assets/mac/question_arrow.svg create mode 100644 crates/cursor-info/assets/mac/right_ptr.svg create mode 100644 crates/cursor-info/assets/mac/right_tee.svg create mode 100644 crates/cursor-info/assets/mac/sb_down_arrow.svg create mode 100644 crates/cursor-info/assets/mac/sb_h_double_arrow.svg create mode 100644 crates/cursor-info/assets/mac/sb_left_arrow.svg create mode 100644 crates/cursor-info/assets/mac/sb_right_arrow.svg create mode 100644 crates/cursor-info/assets/mac/sb_up_arrow.svg create mode 100644 crates/cursor-info/assets/mac/sb_v_double_arrow.svg create mode 100644 crates/cursor-info/assets/mac/top_side.svg create mode 100644 crates/cursor-info/assets/mac/top_tee.svg create mode 100644 crates/cursor-info/assets/mac/ul_angle.svg create mode 100644 crates/cursor-info/assets/mac/ur_angle.svg create mode 100644 crates/cursor-info/assets/mac/vertical-text.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-01.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-02.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-03.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-04.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-05.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-06.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-07.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-08.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-09.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-10.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-11.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-12.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-13.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-14.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-15.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-16.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-17.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-18.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-19.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-20.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-21.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-22.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-23.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-24.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-25.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-26.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-27.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-28.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-29.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-30.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-31.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-32.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-33.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-34.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-35.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-36.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-37.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-38.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-39.svg create mode 100644 crates/cursor-info/assets/mac/wait/wait-40.svg create mode 100644 crates/cursor-info/assets/mac/wayland-cursor.svg create mode 100644 crates/cursor-info/assets/mac/xterm.svg create mode 100644 crates/cursor-info/assets/mac/zoom-in.svg create mode 100644 crates/cursor-info/assets/mac/zoom-out.svg create mode 100644 crates/cursor-info/assets/windows/arrow.svg create mode 100644 crates/cursor-info/assets/windows/cross.svg create mode 100644 crates/cursor-info/assets/windows/hand.svg create mode 100644 crates/cursor-info/assets/windows/ibeam.svg create mode 100644 crates/cursor-info/assets/windows/no.svg create mode 100644 crates/cursor-info/assets/windows/pen.svg create mode 100644 crates/cursor-info/assets/windows/size-nesw.svg create mode 100644 crates/cursor-info/assets/windows/size-ns.svg create mode 100644 crates/cursor-info/assets/windows/sizeall.svg create mode 100644 crates/cursor-info/assets/windows/wait.svg create mode 100644 crates/cursor-info/src/lib.rs create mode 100644 crates/cursor-info/src/macos.rs create mode 100644 crates/cursor-info/src/windows.rs delete mode 100644 crates/rendering/assets/cursors/arrow.svg delete mode 100644 crates/rendering/assets/cursors/crosshair.svg delete mode 100644 crates/rendering/assets/cursors/ibeam.svg delete mode 100644 crates/rendering/assets/cursors/pointing-hand.svg delete mode 100644 crates/rendering/assets/cursors/resize-ew.svg delete mode 100644 crates/rendering/assets/cursors/resize-nwse.svg diff --git a/Cargo.lock b/Cargo.lock index 0e80083916c..543051eef1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -769,11 +769,11 @@ dependencies = [ [[package]] name = "block2" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d59b4c170e16f0405a2e95aff44432a0d41aa97675f3d52623effe95792a037" +checksum = "340d2f0bdb2a43c1d3cd40513185b2bd7def0aa1052f956455114bc98f82dcf2" dependencies = [ - "objc2 0.6.0", + "objc2 0.6.1", ] [[package]] @@ -999,6 +999,17 @@ dependencies = [ "device_query 3.0.1", ] +[[package]] +name = "cap-cursor-info" +version = "0.1.0" +dependencies = [ + "objc2-app-kit 0.3.1", + "serde", + "specta", + "strum 0.27.2", + "windows 0.58.0", +] + [[package]] name = "cap-desktop" version = "0.3.60" @@ -1038,7 +1049,7 @@ dependencies = [ "mp4", "nix 0.29.0", "objc", - "objc2-app-kit 0.3.0", + "objc2-app-kit 0.3.1", "png", "rand 0.8.5", "relative-path", @@ -1208,6 +1219,7 @@ dependencies = [ name = "cap-project" version = "0.1.0" dependencies = [ + "cap-cursor-info", "either", "log", "relative-path", @@ -1222,6 +1234,7 @@ name = "cap-recording" version = "0.1.0" dependencies = [ "cap-cursor-capture", + "cap-cursor-info", "cap-displays", "cap-flags", "cap-media", @@ -1237,6 +1250,7 @@ dependencies = [ "futures", "image 0.25.5", "objc", + "objc2-app-kit 0.3.1", "relative-path", "screencapturekit", "serde", @@ -1259,6 +1273,7 @@ dependencies = [ "bezier_easing", "build-time", "bytemuck", + "cap-cursor-info", "cap-flags", "cap-project", "cap-video-decode", @@ -1552,9 +1567,9 @@ checksum = "afede46921767868c5c7f8f55202bdd8bec0bab6bc9605174200f45924f93c62" dependencies = [ "clipboard-win", "image 0.25.5", - "objc2 0.6.0", - "objc2-app-kit 0.3.0", - "objc2-foundation 0.3.0", + "objc2 0.6.1", + "objc2-app-kit 0.3.1", + "objc2-foundation 0.3.1", "windows 0.59.0", "x11rb", ] @@ -2385,6 +2400,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "dispatch2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags 2.9.0", + "objc2 0.6.1", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -4443,8 +4468,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b95dfb34071d1592b45622bf93e315e3a72d414b6782aca9a015c12bec367ef" dependencies = [ "cc", - "objc2 0.6.0", - "objc2-foundation 0.3.0", + "objc2 0.6.1", + "objc2-foundation 0.3.1", "time", ] @@ -4716,10 +4741,10 @@ dependencies = [ "dpi", "gtk", "keyboard-types", - "objc2 0.6.0", - "objc2-app-kit 0.3.0", + "objc2 0.6.1", + "objc2-app-kit 0.3.1", "objc2-core-foundation", - "objc2-foundation 0.3.0", + "objc2-foundation 0.3.1", "once_cell", "png", "serde", @@ -4747,7 +4772,7 @@ dependencies = [ "once_cell", "rustc-hash 1.1.0", "spirv", - "strum", + "strum 0.26.3", "thiserror 2.0.12", "unicode-ident", ] @@ -5134,9 +5159,9 @@ dependencies = [ [[package]] name = "objc2" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3531f65190d9cff863b77a99857e74c314dd16bf56c538c4b57c7cbc3f3a6e59" +checksum = "88c6597e14493ab2e44ce58f2fdecf095a51f12ca57bec060a11c57332520551" dependencies = [ "objc2-encode", "objc2-exception-helper", @@ -5160,32 +5185,32 @@ dependencies = [ [[package]] name = "objc2-app-kit" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5906f93257178e2f7ae069efb89fbd6ee94f0592740b5f8a1512ca498814d0fb" +checksum = "e6f29f568bec459b0ddff777cec4fe3fd8666d82d5a40ebd0ff7e66134f89bcc" dependencies = [ "bitflags 2.9.0", - "block2 0.6.0", + "block2 0.6.1", "libc", - "objc2 0.6.0", + "objc2 0.6.1", "objc2-cloud-kit", - "objc2-core-data 0.3.0", + "objc2-core-data 0.3.1", "objc2-core-foundation", "objc2-core-graphics", - "objc2-core-image 0.3.0", - "objc2-foundation 0.3.0", - "objc2-quartz-core 0.3.0", + "objc2-core-image 0.3.1", + "objc2-foundation 0.3.1", + "objc2-quartz-core 0.3.1", ] [[package]] name = "objc2-cloud-kit" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c1948a9be5f469deadbd6bcb86ad7ff9e47b4f632380139722f7d9840c0d42c" +checksum = "17614fdcd9b411e6ff1117dfb1d0150f908ba83a7df81b1f118005fe0a8ea15d" dependencies = [ "bitflags 2.9.0", - "objc2 0.6.0", - "objc2-foundation 0.3.0", + "objc2 0.6.1", + "objc2-foundation 0.3.1", ] [[package]] @@ -5202,33 +5227,35 @@ dependencies = [ [[package]] name = "objc2-core-data" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f860f8e841f6d32f754836f51e6bc7777cd7e7053cf18528233f6811d3eceb4" +checksum = "291fbbf7d29287518e8686417cf7239c74700fd4b607623140a7d4a3c834329d" dependencies = [ "bitflags 2.9.0", - "objc2 0.6.0", - "objc2-foundation 0.3.0", + "objc2 0.6.1", + "objc2-foundation 0.3.1", ] [[package]] name = "objc2-core-foundation" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daeaf60f25471d26948a1c2f840e3f7d86f4109e3af4e8e4b5cd70c39690d925" +checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ "bitflags 2.9.0", - "objc2 0.6.0", + "dispatch2", + "objc2 0.6.1", ] [[package]] name = "objc2-core-graphics" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dca602628b65356b6513290a21a6405b4d4027b8b250f0b98dddbb28b7de02" +checksum = "989c6c68c13021b5c2d6b71456ebb0f9dc78d752e86a98da7c716f4f9470f5a4" dependencies = [ "bitflags 2.9.0", - "objc2 0.6.0", + "dispatch2", + "objc2 0.6.1", "objc2-core-foundation", "objc2-io-surface", ] @@ -5247,12 +5274,12 @@ dependencies = [ [[package]] name = "objc2-core-image" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ffa6bea72bf42c78b0b34e89c0bafac877d5f80bf91e159a5d96ea7f693ca56" +checksum = "79b3dc0cc4386b6ccf21c157591b34a7f44c8e75b064f85502901ab2188c007e" dependencies = [ - "objc2 0.6.0", - "objc2-foundation 0.3.0", + "objc2 0.6.1", + "objc2-foundation 0.3.1", ] [[package]] @@ -5285,25 +5312,25 @@ dependencies = [ [[package]] name = "objc2-foundation" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a21c6c9014b82c39515db5b396f91645182611c97d24637cf56ac01e5f8d998" +checksum = "900831247d2fe1a09a683278e5384cfb8c80c79fe6b166f9d14bfdde0ea1b03c" dependencies = [ "bitflags 2.9.0", - "block2 0.6.0", + "block2 0.6.1", "libc", - "objc2 0.6.0", + "objc2 0.6.1", "objc2-core-foundation", ] [[package]] name = "objc2-io-surface" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161a8b87e32610086e1a7a9e9ec39f84459db7b3a0881c1f16ca5a2605581c19" +checksum = "7282e9ac92529fa3457ce90ebb15f4ecbc383e8338060960760fa2cf75420c3c" dependencies = [ "bitflags 2.9.0", - "objc2 0.6.0", + "objc2 0.6.1", "objc2-core-foundation", ] @@ -5346,13 +5373,13 @@ dependencies = [ [[package]] name = "objc2-quartz-core" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb3794501bb1bee12f08dcad8c61f2a5875791ad1c6f47faa71a0f033f20071" +checksum = "90ffb6a0cd5f182dc964334388560b12a57f7b74b3e2dec5e2722aa2dfb2ccd5" dependencies = [ "bitflags 2.9.0", - "objc2 0.6.0", - "objc2-foundation 0.3.0", + "objc2 0.6.1", + "objc2-foundation 0.3.1", ] [[package]] @@ -5362,9 +5389,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "777a571be14a42a3990d4ebedaeb8b54cd17377ec21b92e8200ac03797b3bee1" dependencies = [ "bitflags 2.9.0", - "objc2 0.6.0", + "objc2 0.6.1", "objc2-core-foundation", - "objc2-foundation 0.3.0", + "objc2-foundation 0.3.1", ] [[package]] @@ -5374,11 +5401,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b717127e4014b0f9f3e8bba3d3f2acec81f1bde01f656823036e823ed2c94dce" dependencies = [ "bitflags 2.9.0", - "block2 0.6.0", - "objc2 0.6.0", - "objc2-app-kit 0.3.0", + "block2 0.6.1", + "objc2 0.6.1", + "objc2-app-kit 0.3.1", "objc2-core-foundation", - "objc2-foundation 0.3.0", + "objc2-foundation 0.3.1", ] [[package]] @@ -6850,7 +6877,7 @@ name = "screencapturekit" version = "0.3.5" source = "git+https://github.com/CapSoftware/screencapturekit-rs?rev=7ff1e103742e56c8f6c2e940b5e52684ed0bed69#7ff1e103742e56c8f6c2e940b5e52684ed0bed69" dependencies = [ - "block2 0.6.0", + "block2 0.6.1", "core-foundation 0.10.0", "core-graphics 0.24.0", "core-media-rs", @@ -7580,7 +7607,16 @@ version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros", + "strum_macros 0.26.4", +] + +[[package]] +name = "strum" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +dependencies = [ + "strum_macros 0.27.2", ] [[package]] @@ -7596,6 +7632,18 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "subtle" version = "2.6.1" @@ -7807,9 +7855,9 @@ dependencies = [ "ndk 0.9.0", "ndk-context", "ndk-sys 0.6.0+11769913", - "objc2 0.6.0", - "objc2-app-kit 0.3.0", - "objc2-foundation 0.3.0", + "objc2 0.6.1", + "objc2-app-kit 0.3.1", + "objc2-foundation 0.3.1", "once_cell", "parking_lot", "raw-window-handle", @@ -7875,9 +7923,9 @@ dependencies = [ "log", "mime", "muda", - "objc2 0.6.0", - "objc2-app-kit 0.3.0", - "objc2-foundation 0.3.0", + "objc2 0.6.1", + "objc2-app-kit 0.3.1", + "objc2-foundation 0.3.1", "objc2-ui-kit", "percent-encoding", "plist", @@ -8155,8 +8203,8 @@ checksum = "2fdc6cb608e04b7d2b6d1f21e9444ad49245f6d03465ba53323d692d1ceb1a30" dependencies = [ "dunce", "glob", - "objc2-app-kit 0.3.0", - "objc2-foundation 0.3.0", + "objc2-app-kit 0.3.1", + "objc2-foundation 0.3.1", "open", "schemars", "serde", @@ -8322,7 +8370,7 @@ dependencies = [ "gtk", "http", "jni", - "objc2 0.6.0", + "objc2 0.6.1", "objc2-ui-kit", "raw-window-handle", "serde", @@ -8343,9 +8391,9 @@ dependencies = [ "http", "jni", "log", - "objc2 0.6.0", - "objc2-app-kit 0.3.0", - "objc2-foundation 0.3.0", + "objc2 0.6.1", + "objc2-app-kit 0.3.1", + "objc2-foundation 0.3.1", "once_cell", "percent-encoding", "raw-window-handle", @@ -8909,11 +8957,11 @@ dependencies = [ "dirs", "libappindicator", "muda", - "objc2 0.6.0", - "objc2-app-kit 0.3.0", + "objc2 0.6.1", + "objc2-app-kit 0.3.1", "objc2-core-foundation", "objc2-core-graphics", - "objc2-foundation 0.3.0", + "objc2-foundation 0.3.1", "once_cell", "png", "serde", @@ -9823,10 +9871,10 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" dependencies = [ - "objc2 0.6.0", - "objc2-app-kit 0.3.0", + "objc2 0.6.1", + "objc2-app-kit 0.3.1", "objc2-core-foundation", - "objc2-foundation 0.3.0", + "objc2-foundation 0.3.1", "raw-window-handle", "windows-sys 0.59.0", "windows-version", @@ -10605,7 +10653,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c886a0a9d2a94fd90cfa1d929629b79cfefb1546e2c7430c63a47f0664c0e4e2" dependencies = [ "base64 0.22.1", - "block2 0.6.0", + "block2 0.6.1", "cookie", "crossbeam-channel", "dpi", @@ -10619,10 +10667,10 @@ dependencies = [ "kuchikiki", "libc", "ndk 0.9.0", - "objc2 0.6.0", - "objc2-app-kit 0.3.0", + "objc2 0.6.1", + "objc2-app-kit 0.3.1", "objc2-core-foundation", - "objc2-foundation 0.3.0", + "objc2-foundation 0.3.1", "objc2-ui-kit", "objc2-web-kit", "once_cell", diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.ts index 1b6b3febae5..bc32bd5bfe4 100644 --- a/apps/desktop/src/utils/tauri.ts +++ b/apps/desktop/src/utils/tauri.ts @@ -320,7 +320,7 @@ export type CurrentRecordingChanged = null export type CurrentRecordingTarget = { window: { id: number; bounds: Bounds } } | { screen: { id: number } } | { area: { screen: number; bounds: Bounds } } export type CursorAnimationStyle = "regular" | "slow" | "fast" export type CursorConfiguration = { hide?: boolean; hideWhenIdle: boolean; size: number; type: CursorType; animationStyle: CursorAnimationStyle; tension: number; mass: number; friction: number; raw?: boolean; motionBlur?: number; useSvg?: boolean } -export type CursorMeta = { imagePath: string; hotspot: XY } +export type CursorMeta = { imagePath: string; hotspot: XY; shape?: string | null } export type CursorType = "pointer" | "circle" export type Cursors = { [key in string]: string } | { [key in string]: CursorMeta } export type DownloadProgress = { progress: number; message: string } diff --git a/crates/cursor-info/Cargo.toml b/crates/cursor-info/Cargo.toml new file mode 100644 index 00000000000..a535ec111c2 --- /dev/null +++ b/crates/cursor-info/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "cap-cursor-info" +version = "0.1.0" +edition = "2024" + +[dependencies] +serde = { version = "1.0.219", features = ["derive"] } +specta = { workspace = true, features = ["derive"] } +strum = { version = "0.27", features = ["derive"] } + +[target.'cfg(target_os = "macos")'.dependencies] +objc2-app-kit = "0.3.1" + +[target.'cfg(target_os= "windows")'.dependencies] +windows = { workspace = true, features = [ + "Win32_UI_WindowsAndMessaging", +] } + +[lints] +workspace = true diff --git a/crates/cursor-info/assets/mac/LICENSE b/crates/cursor-info/assets/mac/LICENSE new file mode 100644 index 00000000000..555733cca4c --- /dev/null +++ b/crates/cursor-info/assets/mac/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + Open source macOS Cursors. + Copyright (C) 2024 Abdulkaiz Khatri + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + apple_cursor Copyright (C) 2024 Abdulkaiz Khatri + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/crates/cursor-info/assets/mac/X_cursor.svg b/crates/cursor-info/assets/mac/X_cursor.svg new file mode 100644 index 00000000000..d6ba70d46cb --- /dev/null +++ b/crates/cursor-info/assets/mac/X_cursor.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/all-scroll.svg b/crates/cursor-info/assets/mac/all-scroll.svg new file mode 100644 index 00000000000..b6750964b33 --- /dev/null +++ b/crates/cursor-info/assets/mac/all-scroll.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/bottom_left_corner.svg b/crates/cursor-info/assets/mac/bottom_left_corner.svg new file mode 100644 index 00000000000..a99d2ecdaca --- /dev/null +++ b/crates/cursor-info/assets/mac/bottom_left_corner.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/bottom_right_corner.svg b/crates/cursor-info/assets/mac/bottom_right_corner.svg new file mode 100644 index 00000000000..3a83143e7bc --- /dev/null +++ b/crates/cursor-info/assets/mac/bottom_right_corner.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/bottom_tee.svg b/crates/cursor-info/assets/mac/bottom_tee.svg new file mode 100644 index 00000000000..19f78d50a80 --- /dev/null +++ b/crates/cursor-info/assets/mac/bottom_tee.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/center_ptr.svg b/crates/cursor-info/assets/mac/center_ptr.svg new file mode 100644 index 00000000000..b4e192caf20 --- /dev/null +++ b/crates/cursor-info/assets/mac/center_ptr.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/context-menu.svg b/crates/cursor-info/assets/mac/context-menu.svg new file mode 100644 index 00000000000..10b4b1098a9 --- /dev/null +++ b/crates/cursor-info/assets/mac/context-menu.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/copy.svg b/crates/cursor-info/assets/mac/copy.svg new file mode 100644 index 00000000000..5975a3aa58a --- /dev/null +++ b/crates/cursor-info/assets/mac/copy.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/cross.svg b/crates/cursor-info/assets/mac/cross.svg new file mode 100644 index 00000000000..741be7511fe --- /dev/null +++ b/crates/cursor-info/assets/mac/cross.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/crossed_circle.svg b/crates/cursor-info/assets/mac/crossed_circle.svg new file mode 100644 index 00000000000..d2c1d2291e6 --- /dev/null +++ b/crates/cursor-info/assets/mac/crossed_circle.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/crosshair.svg b/crates/cursor-info/assets/mac/crosshair.svg new file mode 100644 index 00000000000..12777105ea1 --- /dev/null +++ b/crates/cursor-info/assets/mac/crosshair.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/dnd_no_drop.svg b/crates/cursor-info/assets/mac/dnd_no_drop.svg new file mode 100644 index 00000000000..c7d66401cd0 --- /dev/null +++ b/crates/cursor-info/assets/mac/dnd_no_drop.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/dotbox.svg b/crates/cursor-info/assets/mac/dotbox.svg new file mode 100644 index 00000000000..f341dd550ae --- /dev/null +++ b/crates/cursor-info/assets/mac/dotbox.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/hand1.svg b/crates/cursor-info/assets/mac/hand1.svg new file mode 100644 index 00000000000..5a001f50a05 --- /dev/null +++ b/crates/cursor-info/assets/mac/hand1.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/hand2.svg b/crates/cursor-info/assets/mac/hand2.svg new file mode 100644 index 00000000000..d85d31ac7b7 --- /dev/null +++ b/crates/cursor-info/assets/mac/hand2.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr.svg b/crates/cursor-info/assets/mac/left_ptr.svg new file mode 100644 index 00000000000..724753a350b --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-01.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-01.svg new file mode 100644 index 00000000000..3735a2c79ef --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-01.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-02.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-02.svg new file mode 100644 index 00000000000..ea6b8fc997c --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-02.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-03.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-03.svg new file mode 100644 index 00000000000..8243e8bd82d --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-03.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-04.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-04.svg new file mode 100644 index 00000000000..f585ee817ea --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-04.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-05.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-05.svg new file mode 100644 index 00000000000..9f0ecdd99f6 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-05.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-06.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-06.svg new file mode 100644 index 00000000000..c0875b2514b --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-06.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-07.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-07.svg new file mode 100644 index 00000000000..2371ad8ea8f --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-07.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-08.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-08.svg new file mode 100644 index 00000000000..f1193ab3fc3 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-08.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-09.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-09.svg new file mode 100644 index 00000000000..802bab6a5bb --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-09.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-10.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-10.svg new file mode 100644 index 00000000000..67e6504fe90 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-10.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-11.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-11.svg new file mode 100644 index 00000000000..43a5f26a78e --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-11.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-12.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-12.svg new file mode 100644 index 00000000000..f882050989d --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-12.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-13.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-13.svg new file mode 100644 index 00000000000..7516aeb038d --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-13.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-14.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-14.svg new file mode 100644 index 00000000000..993bdf32c5d --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-14.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-15.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-15.svg new file mode 100644 index 00000000000..8c9c1cd7065 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-15.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-16.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-16.svg new file mode 100644 index 00000000000..850e7b4dda0 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-16.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-17.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-17.svg new file mode 100644 index 00000000000..62c8c40caf2 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-17.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-18.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-18.svg new file mode 100644 index 00000000000..c4c150f0c78 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-18.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-19.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-19.svg new file mode 100644 index 00000000000..3e69893760b --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-19.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-20.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-20.svg new file mode 100644 index 00000000000..47a636e0e53 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-20.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-21.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-21.svg new file mode 100644 index 00000000000..3cbaecde416 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-21.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-22.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-22.svg new file mode 100644 index 00000000000..b31e184abd6 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-22.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-23.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-23.svg new file mode 100644 index 00000000000..d495ac99f07 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-23.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-24.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-24.svg new file mode 100644 index 00000000000..7577e62235e --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-24.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-25.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-25.svg new file mode 100644 index 00000000000..9a538b02588 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-25.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-26.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-26.svg new file mode 100644 index 00000000000..47960d88966 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-26.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-27.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-27.svg new file mode 100644 index 00000000000..72641cfd342 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-27.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-28.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-28.svg new file mode 100644 index 00000000000..2b5ecc0ca8d --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-28.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-29.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-29.svg new file mode 100644 index 00000000000..8c724050899 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-29.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-30.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-30.svg new file mode 100644 index 00000000000..1b4cce102e4 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-30.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-31.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-31.svg new file mode 100644 index 00000000000..657d2d64c36 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-31.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-32.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-32.svg new file mode 100644 index 00000000000..2cc08d07d7e --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-32.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-33.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-33.svg new file mode 100644 index 00000000000..dfa451342a1 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-33.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-34.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-34.svg new file mode 100644 index 00000000000..9631e2f0d00 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-34.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-35.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-35.svg new file mode 100644 index 00000000000..6d8f61105e1 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-35.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-36.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-36.svg new file mode 100644 index 00000000000..1b5269ebf05 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-36.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-37.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-37.svg new file mode 100644 index 00000000000..bd369679af4 --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-37.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-38.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-38.svg new file mode 100644 index 00000000000..f4039388a2c --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-38.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-39.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-39.svg new file mode 100644 index 00000000000..ede238ac34a --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-39.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-40.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-40.svg new file mode 100644 index 00000000000..20b4042cc4e --- /dev/null +++ b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-40.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_side.svg b/crates/cursor-info/assets/mac/left_side.svg new file mode 100644 index 00000000000..0f78f72f07a --- /dev/null +++ b/crates/cursor-info/assets/mac/left_side.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/left_tee.svg b/crates/cursor-info/assets/mac/left_tee.svg new file mode 100644 index 00000000000..f6e664857aa --- /dev/null +++ b/crates/cursor-info/assets/mac/left_tee.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/link.svg b/crates/cursor-info/assets/mac/link.svg new file mode 100644 index 00000000000..b78e94a3bbd --- /dev/null +++ b/crates/cursor-info/assets/mac/link.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/ll_angle.svg b/crates/cursor-info/assets/mac/ll_angle.svg new file mode 100644 index 00000000000..03c12837283 --- /dev/null +++ b/crates/cursor-info/assets/mac/ll_angle.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/lr_angle.svg b/crates/cursor-info/assets/mac/lr_angle.svg new file mode 100644 index 00000000000..1e99adefd2f --- /dev/null +++ b/crates/cursor-info/assets/mac/lr_angle.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/move.svg b/crates/cursor-info/assets/mac/move.svg new file mode 100644 index 00000000000..ed97450c01f --- /dev/null +++ b/crates/cursor-info/assets/mac/move.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/pencil.svg b/crates/cursor-info/assets/mac/pencil.svg new file mode 100644 index 00000000000..a1fc28f08cd --- /dev/null +++ b/crates/cursor-info/assets/mac/pencil.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/person.svg b/crates/cursor-info/assets/mac/person.svg new file mode 100644 index 00000000000..972415051fd --- /dev/null +++ b/crates/cursor-info/assets/mac/person.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/pin.svg b/crates/cursor-info/assets/mac/pin.svg new file mode 100644 index 00000000000..696a4c189fa --- /dev/null +++ b/crates/cursor-info/assets/mac/pin.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/plus.svg b/crates/cursor-info/assets/mac/plus.svg new file mode 100644 index 00000000000..481cbd569ab --- /dev/null +++ b/crates/cursor-info/assets/mac/plus.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/question_arrow.svg b/crates/cursor-info/assets/mac/question_arrow.svg new file mode 100644 index 00000000000..1173a343186 --- /dev/null +++ b/crates/cursor-info/assets/mac/question_arrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/right_ptr.svg b/crates/cursor-info/assets/mac/right_ptr.svg new file mode 100644 index 00000000000..ef178771933 --- /dev/null +++ b/crates/cursor-info/assets/mac/right_ptr.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/right_tee.svg b/crates/cursor-info/assets/mac/right_tee.svg new file mode 100644 index 00000000000..60535fcd6c5 --- /dev/null +++ b/crates/cursor-info/assets/mac/right_tee.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/sb_down_arrow.svg b/crates/cursor-info/assets/mac/sb_down_arrow.svg new file mode 100644 index 00000000000..b097ed6971f --- /dev/null +++ b/crates/cursor-info/assets/mac/sb_down_arrow.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/sb_h_double_arrow.svg b/crates/cursor-info/assets/mac/sb_h_double_arrow.svg new file mode 100644 index 00000000000..b3b63142b46 --- /dev/null +++ b/crates/cursor-info/assets/mac/sb_h_double_arrow.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/sb_left_arrow.svg b/crates/cursor-info/assets/mac/sb_left_arrow.svg new file mode 100644 index 00000000000..2cc67bb0094 --- /dev/null +++ b/crates/cursor-info/assets/mac/sb_left_arrow.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/sb_right_arrow.svg b/crates/cursor-info/assets/mac/sb_right_arrow.svg new file mode 100644 index 00000000000..02a70cc3966 --- /dev/null +++ b/crates/cursor-info/assets/mac/sb_right_arrow.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/sb_up_arrow.svg b/crates/cursor-info/assets/mac/sb_up_arrow.svg new file mode 100644 index 00000000000..e0222de2afb --- /dev/null +++ b/crates/cursor-info/assets/mac/sb_up_arrow.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/sb_v_double_arrow.svg b/crates/cursor-info/assets/mac/sb_v_double_arrow.svg new file mode 100644 index 00000000000..8b92feb6478 --- /dev/null +++ b/crates/cursor-info/assets/mac/sb_v_double_arrow.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/top_side.svg b/crates/cursor-info/assets/mac/top_side.svg new file mode 100644 index 00000000000..bba0188848a --- /dev/null +++ b/crates/cursor-info/assets/mac/top_side.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/top_tee.svg b/crates/cursor-info/assets/mac/top_tee.svg new file mode 100644 index 00000000000..01570579b96 --- /dev/null +++ b/crates/cursor-info/assets/mac/top_tee.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/ul_angle.svg b/crates/cursor-info/assets/mac/ul_angle.svg new file mode 100644 index 00000000000..da734dfb7f0 --- /dev/null +++ b/crates/cursor-info/assets/mac/ul_angle.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/ur_angle.svg b/crates/cursor-info/assets/mac/ur_angle.svg new file mode 100644 index 00000000000..b7e64d8a74b --- /dev/null +++ b/crates/cursor-info/assets/mac/ur_angle.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/vertical-text.svg b/crates/cursor-info/assets/mac/vertical-text.svg new file mode 100644 index 00000000000..6eaa5f87d3f --- /dev/null +++ b/crates/cursor-info/assets/mac/vertical-text.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-01.svg b/crates/cursor-info/assets/mac/wait/wait-01.svg new file mode 100644 index 00000000000..1418259e410 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-01.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-02.svg b/crates/cursor-info/assets/mac/wait/wait-02.svg new file mode 100644 index 00000000000..8be1a581889 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-02.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-03.svg b/crates/cursor-info/assets/mac/wait/wait-03.svg new file mode 100644 index 00000000000..874491abb7f --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-03.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-04.svg b/crates/cursor-info/assets/mac/wait/wait-04.svg new file mode 100644 index 00000000000..5550406127d --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-04.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-05.svg b/crates/cursor-info/assets/mac/wait/wait-05.svg new file mode 100644 index 00000000000..584f53e85eb --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-05.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-06.svg b/crates/cursor-info/assets/mac/wait/wait-06.svg new file mode 100644 index 00000000000..47d61804d40 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-06.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-07.svg b/crates/cursor-info/assets/mac/wait/wait-07.svg new file mode 100644 index 00000000000..b1bad22800e --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-07.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-08.svg b/crates/cursor-info/assets/mac/wait/wait-08.svg new file mode 100644 index 00000000000..d1753b8969d --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-08.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-09.svg b/crates/cursor-info/assets/mac/wait/wait-09.svg new file mode 100644 index 00000000000..6dc42d8cbb7 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-09.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-10.svg b/crates/cursor-info/assets/mac/wait/wait-10.svg new file mode 100644 index 00000000000..ee5aeccfec1 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-10.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-11.svg b/crates/cursor-info/assets/mac/wait/wait-11.svg new file mode 100644 index 00000000000..03430eb7baa --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-11.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-12.svg b/crates/cursor-info/assets/mac/wait/wait-12.svg new file mode 100644 index 00000000000..ae8eb62b990 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-12.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-13.svg b/crates/cursor-info/assets/mac/wait/wait-13.svg new file mode 100644 index 00000000000..b13d404ee1f --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-13.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-14.svg b/crates/cursor-info/assets/mac/wait/wait-14.svg new file mode 100644 index 00000000000..48c9c5a972f --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-14.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-15.svg b/crates/cursor-info/assets/mac/wait/wait-15.svg new file mode 100644 index 00000000000..446a086b79f --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-15.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-16.svg b/crates/cursor-info/assets/mac/wait/wait-16.svg new file mode 100644 index 00000000000..62b20dc4c6a --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-16.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-17.svg b/crates/cursor-info/assets/mac/wait/wait-17.svg new file mode 100644 index 00000000000..ceb738ad921 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-17.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-18.svg b/crates/cursor-info/assets/mac/wait/wait-18.svg new file mode 100644 index 00000000000..9e202fba3dd --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-18.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-19.svg b/crates/cursor-info/assets/mac/wait/wait-19.svg new file mode 100644 index 00000000000..60d11b16ea3 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-19.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-20.svg b/crates/cursor-info/assets/mac/wait/wait-20.svg new file mode 100644 index 00000000000..9689209885e --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-20.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-21.svg b/crates/cursor-info/assets/mac/wait/wait-21.svg new file mode 100644 index 00000000000..79408bf432f --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-21.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-22.svg b/crates/cursor-info/assets/mac/wait/wait-22.svg new file mode 100644 index 00000000000..99e557c2ff9 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-22.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-23.svg b/crates/cursor-info/assets/mac/wait/wait-23.svg new file mode 100644 index 00000000000..e6d0e500d8c --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-23.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-24.svg b/crates/cursor-info/assets/mac/wait/wait-24.svg new file mode 100644 index 00000000000..c52ae77df18 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-24.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-25.svg b/crates/cursor-info/assets/mac/wait/wait-25.svg new file mode 100644 index 00000000000..1e4778ff90d --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-25.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-26.svg b/crates/cursor-info/assets/mac/wait/wait-26.svg new file mode 100644 index 00000000000..d683a314caf --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-26.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-27.svg b/crates/cursor-info/assets/mac/wait/wait-27.svg new file mode 100644 index 00000000000..d59fe6133f3 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-27.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-28.svg b/crates/cursor-info/assets/mac/wait/wait-28.svg new file mode 100644 index 00000000000..0873d643331 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-28.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-29.svg b/crates/cursor-info/assets/mac/wait/wait-29.svg new file mode 100644 index 00000000000..cf4303484be --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-29.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-30.svg b/crates/cursor-info/assets/mac/wait/wait-30.svg new file mode 100644 index 00000000000..a5a7e6f4754 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-30.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-31.svg b/crates/cursor-info/assets/mac/wait/wait-31.svg new file mode 100644 index 00000000000..08939756130 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-31.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-32.svg b/crates/cursor-info/assets/mac/wait/wait-32.svg new file mode 100644 index 00000000000..b721b87002d --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-32.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-33.svg b/crates/cursor-info/assets/mac/wait/wait-33.svg new file mode 100644 index 00000000000..cd752e5147f --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-33.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-34.svg b/crates/cursor-info/assets/mac/wait/wait-34.svg new file mode 100644 index 00000000000..918ca8171d3 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-34.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-35.svg b/crates/cursor-info/assets/mac/wait/wait-35.svg new file mode 100644 index 00000000000..88b35cc667d --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-35.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-36.svg b/crates/cursor-info/assets/mac/wait/wait-36.svg new file mode 100644 index 00000000000..60a428a15f3 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-36.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-37.svg b/crates/cursor-info/assets/mac/wait/wait-37.svg new file mode 100644 index 00000000000..814e2172f79 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-37.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-38.svg b/crates/cursor-info/assets/mac/wait/wait-38.svg new file mode 100644 index 00000000000..2a9cfa61ddd --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-38.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-39.svg b/crates/cursor-info/assets/mac/wait/wait-39.svg new file mode 100644 index 00000000000..d7fd0aa0be4 --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-39.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wait/wait-40.svg b/crates/cursor-info/assets/mac/wait/wait-40.svg new file mode 100644 index 00000000000..dc389daabcb --- /dev/null +++ b/crates/cursor-info/assets/mac/wait/wait-40.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/wayland-cursor.svg b/crates/cursor-info/assets/mac/wayland-cursor.svg new file mode 100644 index 00000000000..294f567927b --- /dev/null +++ b/crates/cursor-info/assets/mac/wayland-cursor.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/xterm.svg b/crates/cursor-info/assets/mac/xterm.svg new file mode 100644 index 00000000000..b0ff782e2f1 --- /dev/null +++ b/crates/cursor-info/assets/mac/xterm.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/zoom-in.svg b/crates/cursor-info/assets/mac/zoom-in.svg new file mode 100644 index 00000000000..f9e0ecb109a --- /dev/null +++ b/crates/cursor-info/assets/mac/zoom-in.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/mac/zoom-out.svg b/crates/cursor-info/assets/mac/zoom-out.svg new file mode 100644 index 00000000000..05fbad5267e --- /dev/null +++ b/crates/cursor-info/assets/mac/zoom-out.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/assets/windows/arrow.svg b/crates/cursor-info/assets/windows/arrow.svg new file mode 100644 index 00000000000..8fc222050eb --- /dev/null +++ b/crates/cursor-info/assets/windows/arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/crates/cursor-info/assets/windows/cross.svg b/crates/cursor-info/assets/windows/cross.svg new file mode 100644 index 00000000000..a96f1b0a0e6 --- /dev/null +++ b/crates/cursor-info/assets/windows/cross.svg @@ -0,0 +1,3 @@ + + + diff --git a/crates/cursor-info/assets/windows/hand.svg b/crates/cursor-info/assets/windows/hand.svg new file mode 100644 index 00000000000..9705811906a --- /dev/null +++ b/crates/cursor-info/assets/windows/hand.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/crates/cursor-info/assets/windows/ibeam.svg b/crates/cursor-info/assets/windows/ibeam.svg new file mode 100644 index 00000000000..bd12ae6b23b --- /dev/null +++ b/crates/cursor-info/assets/windows/ibeam.svg @@ -0,0 +1,3 @@ + + + diff --git a/crates/cursor-info/assets/windows/no.svg b/crates/cursor-info/assets/windows/no.svg new file mode 100644 index 00000000000..c9a3dc140f5 --- /dev/null +++ b/crates/cursor-info/assets/windows/no.svg @@ -0,0 +1,3 @@ + + + diff --git a/crates/cursor-info/assets/windows/pen.svg b/crates/cursor-info/assets/windows/pen.svg new file mode 100644 index 00000000000..720137b75be --- /dev/null +++ b/crates/cursor-info/assets/windows/pen.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/crates/cursor-info/assets/windows/size-nesw.svg b/crates/cursor-info/assets/windows/size-nesw.svg new file mode 100644 index 00000000000..889732e7510 --- /dev/null +++ b/crates/cursor-info/assets/windows/size-nesw.svg @@ -0,0 +1,3 @@ + + + diff --git a/crates/cursor-info/assets/windows/size-ns.svg b/crates/cursor-info/assets/windows/size-ns.svg new file mode 100644 index 00000000000..6d1be6bf43e --- /dev/null +++ b/crates/cursor-info/assets/windows/size-ns.svg @@ -0,0 +1,3 @@ + + + diff --git a/crates/cursor-info/assets/windows/sizeall.svg b/crates/cursor-info/assets/windows/sizeall.svg new file mode 100644 index 00000000000..a3d615abd02 --- /dev/null +++ b/crates/cursor-info/assets/windows/sizeall.svg @@ -0,0 +1,3 @@ + + + diff --git a/crates/cursor-info/assets/windows/wait.svg b/crates/cursor-info/assets/windows/wait.svg new file mode 100644 index 00000000000..256de2f5d0c --- /dev/null +++ b/crates/cursor-info/assets/windows/wait.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/crates/cursor-info/src/lib.rs b/crates/cursor-info/src/lib.rs new file mode 100644 index 00000000000..eaa670c32a4 --- /dev/null +++ b/crates/cursor-info/src/lib.rs @@ -0,0 +1,105 @@ +//! Cap Cursor Info: A crate for getting cursor information, assets and hotspot information. + +use std::{fmt, str::FromStr}; + +use serde::{Deserialize, Serialize}; +use specta::Type; + +mod macos; +mod windows; + +pub use macos::*; +pub use windows::*; + +/// Information about a resolved cursor shape +#[derive(Debug, Clone)] +pub struct ResolvedCursor { + /// Raw svg definition of the cursor asset + pub raw: &'static str, + /// The location of the hotspot within the cursor asset + pub hotspot: (f64, f64), +} + +/// Defines the shape of the cursor +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +pub enum CursorShape { + MacOS(CursorShapeMacOS), + Windows(CursorShapeWindows), +} + +impl CursorShape { + /// Get the resolved cursor information + pub fn info(&self) -> Option { + match self { + CursorShape::MacOS(cursor) => cursor.info(), + CursorShape::Windows(cursor) => cursor.info(), + } + } +} + +impl fmt::Display for CursorShape { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let kind = match self { + CursorShape::MacOS(_) => "MacOS", + CursorShape::Windows(_) => "Windows", + }; + + let variant: &'static str = match self { + CursorShape::MacOS(cursor) => cursor.into(), + CursorShape::Windows(cursor) => cursor.into(), + }; + + writeln!(f, "{kind}|{variant}") + } +} + +impl Serialize for CursorShape { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serializer.serialize_str(&self.to_string()) + } +} + +impl<'de> Deserialize<'de> for CursorShape { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let string = String::deserialize(deserializer)?; + + let Some((kind, variant)) = string.split_once("|") else { + return Err(serde::de::Error::custom( + "Invalid CursorShape. Missing delimiter", + )); + }; + + match kind { + "MacOS" => Ok(CursorShape::MacOS( + CursorShapeMacOS::from_str(variant).map_err(|err| { + serde::de::Error::custom( + format!("Failed to parse MacOS cursor variant: {err}",), + ) + })?, + )), + "Windows" => Ok(CursorShape::Windows( + CursorShapeWindows::from_str(variant).map_err(|err| { + serde::de::Error::custom( + format!("Failed to parse MacOS cursor variant: {err}",), + ) + })?, + )), + _ => Err(serde::de::Error::custom("Failed to parse CursorShape kind")), + } + } +} + +impl Type for CursorShape { + fn inline( + types: &mut specta::TypeMap, + generics: specta::Generics, + ) -> specta::datatype::DataType { + String::inline(types, generics) + } +} diff --git a/crates/cursor-info/src/macos.rs b/crates/cursor-info/src/macos.rs new file mode 100644 index 00000000000..14691820549 --- /dev/null +++ b/crates/cursor-info/src/macos.rs @@ -0,0 +1,122 @@ +use strum::{EnumString, IntoStaticStr}; + +use crate::ResolvedCursor; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, EnumString, IntoStaticStr)] +pub enum CursorShapeMacOS { + /// https://developer.apple.com/documentation/appkit/nscursor/arrow + Arrow, + /// https://developer.apple.com/documentation/appkit/nscursor/contextualmenu + ContextualMenu, + /// https://developer.apple.com/documentation/appkit/nscursor/closedhand + ClosedHand, + /// https://developer.apple.com/documentation/appkit/nscursor/crosshair + Crosshair, + /// https://developer.apple.com/documentation/appkit/nscursor/disappearingitem + DisappearingItem, + /// https://developer.apple.com/documentation/appkit/nscursor/dragcopy + DragCopy, + /// https://developer.apple.com/documentation/appkit/nscursor/draglink + DragLink, + /// https://developer.apple.com/documentation/appkit/nscursor/ibeam + IBeam, + /// https://developer.apple.com/documentation/appkit/nscursor/openhand + OpenHand, + /// https://developer.apple.com/documentation/appkit/nscursor/operationnotallowed + OperationNotAllowed, + /// https://developer.apple.com/documentation/appkit/nscursor/pointinghand + PointingHand, + /// https://developer.apple.com/documentation/appkit/nscursor/resizedown + ResizeDown, + /// https://developer.apple.com/documentation/appkit/nscursor/resizeleft + ResizeLeft, + /// https://developer.apple.com/documentation/appkit/nscursor/resizeleftright + ResizeLeftRight, + /// https://developer.apple.com/documentation/appkit/nscursor/resizeright + ResizeRight, + /// https://developer.apple.com/documentation/appkit/nscursor/resizeup + ResizeUp, + /// https://developer.apple.com/documentation/appkit/nscursor/resizeupdown + ResizeUpDown, + /// https://developer.apple.com/documentation/appkit/nscursor/ibeamcursorforverticallayout + IBeamVerticalForVerticalLayout, +} + +impl CursorShapeMacOS { + pub fn info(&self) -> Option { + Some(match self { + CursorShapeMacOS::Arrow => ResolvedCursor { + raw: include_str!("../assets/mac/left_ptr.svg"), + hotspot: todo!(), + }, + CursorShapeMacOS::ContextualMenu => todo!(), + CursorShapeMacOS::ClosedHand => todo!(), + CursorShapeMacOS::Crosshair => todo!(), + CursorShapeMacOS::DisappearingItem => todo!(), + CursorShapeMacOS::DragCopy => todo!(), + CursorShapeMacOS::DragLink => todo!(), + CursorShapeMacOS::IBeam => todo!(), + CursorShapeMacOS::OpenHand => todo!(), + CursorShapeMacOS::OperationNotAllowed => todo!(), + CursorShapeMacOS::PointingHand => todo!(), + CursorShapeMacOS::ResizeDown => todo!(), + CursorShapeMacOS::ResizeLeft => todo!(), + CursorShapeMacOS::ResizeLeftRight => todo!(), + CursorShapeMacOS::ResizeRight => todo!(), + CursorShapeMacOS::ResizeUp => todo!(), + CursorShapeMacOS::ResizeUpDown => todo!(), + CursorShapeMacOS::IBeamVerticalForVerticalLayout => todo!(), + _ => return None, + }) + } +} + +#[cfg(target_os = "macos")] +impl TryFrom<&objc2_app_kit::NSCursor> for super::CursorShape { + type Error = (); + + #[allow(deprecated)] + fn try_from(cursor: &objc2_app_kit::NSCursor) -> Result { + Ok(super::CursorShape::MacOS( + if *cursor == *objc2_app_kit::NSCursor::arrowCursor() { + CursorShapeMacOS::Arrow + } else if *cursor == *objc2_app_kit::NSCursor::contextualMenuCursor() { + CursorShapeMacOS::ContextualMenu + } else if *cursor == *objc2_app_kit::NSCursor::closedHandCursor() { + CursorShapeMacOS::ClosedHand + } else if *cursor == *objc2_app_kit::NSCursor::crosshairCursor() { + CursorShapeMacOS::Crosshair + } else if *cursor == *objc2_app_kit::NSCursor::disappearingItemCursor() { + CursorShapeMacOS::DisappearingItem + } else if *cursor == *objc2_app_kit::NSCursor::dragCopyCursor() { + CursorShapeMacOS::DragCopy + } else if *cursor == *objc2_app_kit::NSCursor::dragLinkCursor() { + CursorShapeMacOS::DragLink + } else if *cursor == *objc2_app_kit::NSCursor::IBeamCursor() { + CursorShapeMacOS::IBeam + } else if *cursor == *objc2_app_kit::NSCursor::openHandCursor() { + CursorShapeMacOS::OpenHand + } else if *cursor == *objc2_app_kit::NSCursor::operationNotAllowedCursor() { + CursorShapeMacOS::OperationNotAllowed + } else if *cursor == *objc2_app_kit::NSCursor::pointingHandCursor() { + CursorShapeMacOS::PointingHand + } else if *cursor == *objc2_app_kit::NSCursor::resizeDownCursor() { + CursorShapeMacOS::ResizeDown + } else if *cursor == *objc2_app_kit::NSCursor::resizeLeftCursor() { + CursorShapeMacOS::ResizeLeft + } else if *cursor == *objc2_app_kit::NSCursor::resizeLeftRightCursor() { + CursorShapeMacOS::ResizeLeftRight + } else if *cursor == *objc2_app_kit::NSCursor::resizeRightCursor() { + CursorShapeMacOS::ResizeRight + } else if *cursor == *objc2_app_kit::NSCursor::resizeUpCursor() { + CursorShapeMacOS::ResizeUp + } else if *cursor == *objc2_app_kit::NSCursor::resizeUpDownCursor() { + CursorShapeMacOS::ResizeUpDown + } else if *cursor == *objc2_app_kit::NSCursor::IBeamCursorForVerticalLayout() { + CursorShapeMacOS::IBeamVerticalForVerticalLayout + } else { + return Err(()); + }, + )) + } +} diff --git a/crates/cursor-info/src/windows.rs b/crates/cursor-info/src/windows.rs new file mode 100644 index 00000000000..87fc17d7d7f --- /dev/null +++ b/crates/cursor-info/src/windows.rs @@ -0,0 +1,250 @@ +use strum::{EnumString, IntoStaticStr}; + +use crate::ResolvedCursor; + +// https://learn.microsoft.com/en-us/windows/win32/menurc/about-cursors +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, EnumString, IntoStaticStr)] +pub enum CursorShapeWindows { + /// IDC_ARROW + Arrow, + /// IDC_IBEAM + IBeam, + /// IDC_WAIT + Wait, + /// IDC_CROSS + Cross, + /// IDC_UPARROW + UpArrow, + /// IDC_SIZENWSE + SizeNWSE, + /// IDC_SIZENESW + SizeNESW, + /// IDC_SIZEWE + SizeWE, + /// IDC_SIZENS + SizeNS, + /// IDC_SIZEALL + SizeAll, + /// IDC_NO + No, + /// IDC_HAND + Hand, + /// IDC_APPSTARTING + AppStarting, + /// IDC_HELP + Help, + /// IDC_PIN + Pin, + /// IDC_PERSON + Person, + /// MAKEINTRESOURCE(32631) + Pen, + /// MAKEINTRESOURCE(32652) + ScrolNS, + /// MAKEINTRESOURCE(32653) + ScrollWE, + /// MAKEINTRESOURCE(32654) + ScrollNSEW, + /// MAKEINTRESOURCE(32655) + ScrollN, + /// MAKEINTRESOURCE(32656) + ScrollS, + /// MAKEINTRESOURCE(32657) + ScrollW, + /// MAKEINTRESOURCE(32658) + ScrollE, + /// MAKEINTRESOURCE(32659) + ScrollNW, + /// MAKEINTRESOURCE(32660) + ScrollNE, + /// MAKEINTRESOURCE(32661) + ScrollSW, + /// MAKEINTRESOURCE(32662) + ScrollSE, + /// MAKEINTRESOURCE(32663) + ArrowCD, +} + +impl CursorShapeWindows { + pub fn info(&self) -> Option { + Some(match self { + CursorShapeWindows::Arrow => ResolvedCursor { + raw: include_str!("../assets/windows/arrow.svg"), + hotspot: todo!(), + }, + CursorShapeWindows::IBeam => ResolvedCursor { + raw: include_str!("../assets/windows/ibeam.svg"), + hotspot: todo!(), + }, + CursorShapeWindows::Wait => ResolvedCursor { + raw: include_str!("../assets/windows/wait.svg"), + hotspot: todo!(), + }, + CursorShapeWindows::Cross => ResolvedCursor { + raw: include_str!("../assets/windows/cross.svg"), + hotspot: todo!(), + }, + CursorShapeWindows::UpArrow => todo!(), + CursorShapeWindows::SizeNWSE => todo!(), + CursorShapeWindows::SizeNESW => ResolvedCursor { + raw: include_str!("../assets/windows/size-nesw.svg"), + hotspot: todo!(), + }, + CursorShapeWindows::SizeWE => todo!(), + CursorShapeWindows::SizeNS => ResolvedCursor { + raw: include_str!("../assets/windows/size-ns.svg"), + hotspot: todo!(), + }, + CursorShapeWindows::SizeAll => todo!(), + CursorShapeWindows::No => ResolvedCursor { + raw: include_str!("../assets/windows/no.svg"), + hotspot: todo!(), + }, + CursorShapeWindows::Hand => ResolvedCursor { + raw: include_str!("../assets/windows/hand.svg"), + hotspot: todo!(), + }, + CursorShapeWindows::AppStarting => todo!(), + CursorShapeWindows::Help => todo!(), + CursorShapeWindows::Pin => todo!(), + CursorShapeWindows::Person => todo!(), + CursorShapeWindows::Pen => ResolvedCursor { + raw: include_str!("../assets/windows/pen.svg"), + hotspot: todo!(), + }, + CursorShapeWindows::ScrolNS => todo!(), + CursorShapeWindows::ScrollWE => todo!(), + CursorShapeWindows::ScrollNSEW => todo!(), + CursorShapeWindows::ScrollN => todo!(), + CursorShapeWindows::ScrollS => todo!(), + CursorShapeWindows::ScrollW => todo!(), + CursorShapeWindows::ScrollE => todo!(), + CursorShapeWindows::ScrollNW => todo!(), + CursorShapeWindows::ScrollNE => todo!(), + CursorShapeWindows::ScrollSW => todo!(), + CursorShapeWindows::ScrollSE => todo!(), + CursorShapeWindows::ArrowCD => todo!(), + _ => return None, + }) + } + + /// Get the hotspot of the cursor shape. + pub fn hotspot(&self) -> (f64, f64) { + match self { + // TODO: Implement this + _ => (0.0, 0.0), + } + } +} + +#[cfg(target_os = "windows")] +impl TryFrom<&windows::Win32::UI::WindowsAndMessaging::HCURSOR> for super::CursorShape { + type Error = (); + + fn try_from(cursor: &objc2_app_kit::NSCursor) -> Result { + #[inline] + fn load_cursor(lpcursorname: PCWSTR) -> *mut std::ffi::c_void { + unsafe { LoadCursorW(None, lpcursorname) } + .expect("Failed to load default system cursors") + .0 + } + + Ok(super::CursorShape::Windows(match cursor.0 { + ptr if ptr == load_cursor(IDC_ARROW) => CursorShape::Arrow, + ptr if ptr == cursors.ibeam => CursorShape::IBeam, + ptr if ptr == cursors.wait => CursorShape::Wait, + ptr if ptr == cursors.cross => CursorShape::Crosshair, + ptr if ptr == cursors.up_arrow => CursorShape::ResizeUp, + ptr if ptr == cursors.size_we => CursorShape::ResizeLeftRight, + ptr if ptr == cursors.size_ns => CursorShape::ResizeUpDown, + ptr if ptr == cursors.size_nwse => CursorShape::ResizeUpLeftAndDownRight, + ptr if ptr == cursors.size_nesw => CursorShape::ResizeUpRightAndDownLeft, + ptr if ptr == cursors.size_all => CursorShape::ResizeAll, + ptr if ptr == cursors.hand => CursorShape::OpenHand, + ptr if ptr == cursors.no => CursorShape::NotAllowed, + ptr if ptr == cursors.appstarting => CursorShape::Appstarting, + ptr if ptr == cursors.help => CursorShape::Help, + ptr if ptr == cursors.pin || ptr == cursors.person => CursorShape::OpenHand, + // Usually 0, meaning the cursor is hidden. On Windows 8+, a value of 2 means the cursor is supressed + // as the user is using touch input instead. + _ => CursorShape::Hidden, + })) + } +} + +// TODO: #[cfg(target_os = "windows")] + +// pub fn get_cursor_shape(cursors: &DefaultCursors) -> CursorShape { +// let mut cursor_info = CURSORINFO { +// cbSize: std::mem::size_of::() as u32, +// ..Default::default() +// }; +// match unsafe { GetCursorInfo(&mut cursor_info) } { +// Ok(_) => match cursor_info.hCursor.0 { +// ptr if ptr == cursors.arrow => CursorShape::Arrow, +// ptr if ptr == cursors.ibeam => CursorShape::IBeam, +// ptr if ptr == cursors.wait => CursorShape::Wait, +// ptr if ptr == cursors.cross => CursorShape::Crosshair, +// ptr if ptr == cursors.up_arrow => CursorShape::ResizeUp, +// ptr if ptr == cursors.size_we => CursorShape::ResizeLeftRight, +// ptr if ptr == cursors.size_ns => CursorShape::ResizeUpDown, +// ptr if ptr == cursors.size_nwse => CursorShape::ResizeUpLeftAndDownRight, +// ptr if ptr == cursors.size_nesw => CursorShape::ResizeUpRightAndDownLeft, +// ptr if ptr == cursors.size_all => CursorShape::ResizeAll, +// ptr if ptr == cursors.hand => CursorShape::OpenHand, +// ptr if ptr == cursors.no => CursorShape::NotAllowed, +// ptr if ptr == cursors.appstarting => CursorShape::Appstarting, +// ptr if ptr == cursors.help => CursorShape::Help, +// ptr if ptr == cursors.pin || ptr == cursors.person => CursorShape::OpenHand, +// // Usually 0, meaning the cursor is hidden. On Windows 8+, a value of 2 means the cursor is supressed +// // as the user is using touch input instead. +// _ => CursorShape::Hidden, +// }, +// Err(_) => CursorShape::Unknown, +// } +// } + +// /// Keeps handles to default cursor. +// /// Read more: [MS Doc - About Cursors](https://learn.microsoft.com/en-us/windows/win32/menurc/about-cursors) +// pub struct DefaultCursors { +// arrow: *mut c_void, +// ibeam: *mut c_void, +// wait: *mut c_void, +// cross: *mut c_void, +// up_arrow: *mut c_void, +// size_nwse: *mut c_void, +// size_nesw: *mut c_void, +// size_we: *mut c_void, +// size_ns: *mut c_void, +// size_all: *mut c_void, +// no: *mut c_void, +// hand: *mut c_void, +// appstarting: *mut c_void, +// help: *mut c_void, +// pin: *mut c_void, +// person: *mut c_void, +// } + +// impl Default for DefaultCursors { +// fn default() -> Self { + +// DefaultCursors { +// arrow: load_cursor(IDC_ARROW), +// ibeam: load_cursor(IDC_IBEAM), +// cross: load_cursor(IDC_CROSS), +// hand: load_cursor(IDC_HAND), +// help: load_cursor(IDC_HELP), +// no: load_cursor(IDC_NO), +// size_all: load_cursor(IDC_SIZEALL), +// size_ns: load_cursor(IDC_SIZENS), +// size_we: load_cursor(IDC_SIZEWE), +// size_nwse: load_cursor(IDC_SIZENWSE), +// size_nesw: load_cursor(IDC_SIZENESW), +// up_arrow: load_cursor(IDC_UPARROW), +// wait: load_cursor(IDC_WAIT), +// appstarting: load_cursor(IDC_APPSTARTING), +// pin: load_cursor(IDC_PIN), +// person: load_cursor(IDC_PERSON), +// } +// } +// } diff --git a/crates/export/src/lib.rs b/crates/export/src/lib.rs index 33707d91ec6..ccb4fe953f3 100644 --- a/crates/export/src/lib.rs +++ b/crates/export/src/lib.rs @@ -2,7 +2,7 @@ pub mod gif; pub mod mp4; use cap_editor::Segment; -use cap_project::{ProjectConfiguration, RecordingMeta, StudioRecordingMeta, XY}; +use cap_project::{ProjectConfiguration, RecordingMeta, StudioRecordingMeta}; use cap_rendering::{ProjectRecordingsMeta, RenderVideoConstants}; use std::{path::PathBuf, sync::Arc}; use tracing::error; diff --git a/crates/media/src/platform/mod.rs b/crates/media/src/platform/mod.rs index fc667d5d745..894d20d4b5c 100644 --- a/crates/media/src/platform/mod.rs +++ b/crates/media/src/platform/mod.rs @@ -28,74 +28,6 @@ pub struct Window { pub bounds: Bounds, } -#[derive(Debug, Clone, Copy, Serialize, Deserialize, Type, PartialEq, Eq, PartialOrd, Ord)] -pub enum CursorShape { - /// Windows: IDC_ARROW - Arrow, - /// Windows: IDC_IBEAM - IBeam, - /// Windows: IDC_CROSS - Crosshair, - /// macOS Only. Windows not supported. - ClosedHand, - /// macOS Only. Windows not supported. - OpenHand, - /// macOS Only. Windows not supported. - PointingHand, - /// macOS Only. Windows not supported. - ResizeLeft, - /// macOS Only. Windows not supported. - ResizeRight, - /// Windows: IDC_SIZEWE - ResizeLeftRight, - /// Windows: IDC_UPARROW - ResizeUp, - /// macOS Only. Windows not supported. - ResizeDown, - /// Windows: IDC_SIZENS - ResizeUpDown, - /// Windows: IDC_SIZENWSE - /// - /// Windows only. macOS not supported. - ResizeUpLeftAndDownRight, - /// Windows: IDC_SIZENESW - /// - /// Windows only. macOS not supported. - ResizeUpRightAndDownLeft, - /// Windows: IDC_SIZEALL - /// - /// Windows only. macOS not supported. - ResizeAll, - /// macOS Only. Windows not supported. - DisappearingItem, - /// macOS Only. Windows not supported. - VerticalIBeam, - /// Windows: IDC_NO - NotAllowed, - /// macOS Only. Windows not supported. - DragLink, - /// macOS Only. Windows not supported. - DragCopy, - /// macOS Only. Windows not supported. - ContextualMenu, - /// Windows only. macOS not supported. - Appstarting, - /// Windows: IDC_WAIT - /// - /// Windows only. macOS not supported. - Wait, - /// Windows: IDC_HELP - /// - /// Windows only. macOS not supported. - Help, - /// Windows only. macOS not supported. - /// - /// Indicates the cursor is not visible. - Hidden, - /// Couldn't get the cursor shape. - Unknown, -} - #[derive(Debug, Clone, Copy)] pub struct LogicalPosition { pub x: f64, diff --git a/crates/media/src/platform/win.rs b/crates/media/src/platform/win.rs index 6ab448f243c..5a309fe08eb 100644 --- a/crates/media/src/platform/win.rs +++ b/crates/media/src/platform/win.rs @@ -33,87 +33,6 @@ pub fn bring_window_to_focus(window_id: u32) { let _ = unsafe { SetForegroundWindow(HWND(window_id as *mut c_void)) }; } -pub fn get_cursor_shape(cursors: &DefaultCursors) -> CursorShape { - let mut cursor_info = CURSORINFO { - cbSize: std::mem::size_of::() as u32, - ..Default::default() - }; - match unsafe { GetCursorInfo(&mut cursor_info) } { - Ok(_) => match cursor_info.hCursor.0 { - ptr if ptr == cursors.arrow => CursorShape::Arrow, - ptr if ptr == cursors.ibeam => CursorShape::IBeam, - ptr if ptr == cursors.wait => CursorShape::Wait, - ptr if ptr == cursors.cross => CursorShape::Crosshair, - ptr if ptr == cursors.up_arrow => CursorShape::ResizeUp, - ptr if ptr == cursors.size_we => CursorShape::ResizeLeftRight, - ptr if ptr == cursors.size_ns => CursorShape::ResizeUpDown, - ptr if ptr == cursors.size_nwse => CursorShape::ResizeUpLeftAndDownRight, - ptr if ptr == cursors.size_nesw => CursorShape::ResizeUpRightAndDownLeft, - ptr if ptr == cursors.size_all => CursorShape::ResizeAll, - ptr if ptr == cursors.hand => CursorShape::OpenHand, - ptr if ptr == cursors.no => CursorShape::NotAllowed, - ptr if ptr == cursors.appstarting => CursorShape::Appstarting, - ptr if ptr == cursors.help => CursorShape::Help, - ptr if ptr == cursors.pin || ptr == cursors.person => CursorShape::OpenHand, - // Usually 0, meaning the cursor is hidden. On Windows 8+, a value of 2 means the cursor is supressed - // as the user is using touch input instead. - _ => CursorShape::Hidden, - }, - Err(_) => CursorShape::Unknown, - } -} - -/// Keeps handles to default cursor. -/// Read more: [MS Doc - About Cursors](https://learn.microsoft.com/en-us/windows/win32/menurc/about-cursors) -pub struct DefaultCursors { - arrow: *mut c_void, - ibeam: *mut c_void, - wait: *mut c_void, - cross: *mut c_void, - up_arrow: *mut c_void, - size_nwse: *mut c_void, - size_nesw: *mut c_void, - size_we: *mut c_void, - size_ns: *mut c_void, - size_all: *mut c_void, - no: *mut c_void, - hand: *mut c_void, - appstarting: *mut c_void, - help: *mut c_void, - pin: *mut c_void, - person: *mut c_void, -} - -impl Default for DefaultCursors { - fn default() -> Self { - #[inline] - fn load_cursor(lpcursorname: PCWSTR) -> *mut c_void { - unsafe { LoadCursorW(None, lpcursorname) } - .expect("Failed to load default system cursors") - .0 - } - - DefaultCursors { - arrow: load_cursor(IDC_ARROW), - ibeam: load_cursor(IDC_IBEAM), - cross: load_cursor(IDC_CROSS), - hand: load_cursor(IDC_HAND), - help: load_cursor(IDC_HELP), - no: load_cursor(IDC_NO), - size_all: load_cursor(IDC_SIZEALL), - size_ns: load_cursor(IDC_SIZENS), - size_we: load_cursor(IDC_SIZEWE), - size_nwse: load_cursor(IDC_SIZENWSE), - size_nesw: load_cursor(IDC_SIZENESW), - up_arrow: load_cursor(IDC_UPARROW), - wait: load_cursor(IDC_WAIT), - appstarting: load_cursor(IDC_APPSTARTING), - pin: load_cursor(IDC_PIN), - person: load_cursor(IDC_PERSON), - } - } -} - unsafe fn pid_to_exe_path(pid: u32) -> Result { let handle = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid)?; if handle.is_invalid() { diff --git a/crates/project/Cargo.toml b/crates/project/Cargo.toml index 24e579be2d6..6f7a2c8c199 100644 --- a/crates/project/Cargo.toml +++ b/crates/project/Cargo.toml @@ -7,6 +7,8 @@ edition = "2021" workspace = true [dependencies] +cap-cursor-info = { path = "../cursor-info" } + specta.workspace = true serde = { version = "1", features = ["derive"] } diff --git a/crates/project/src/configuration.rs b/crates/project/src/configuration.rs index 79e9fa17216..1e9fae991ca 100644 --- a/crates/project/src/configuration.rs +++ b/crates/project/src/configuration.rs @@ -157,6 +157,15 @@ impl Into> for XY { } } +impl Into> for (T, T) { + fn into(self) -> XY { + XY { + x: self.0, + y: self.1, + } + } +} + #[derive(Type, Serialize, Deserialize, Clone, Debug, Default)] #[serde(rename_all = "camelCase")] pub struct Crop { diff --git a/crates/project/src/meta.rs b/crates/project/src/meta.rs index 07a8c5e56e8..62104063aec 100644 --- a/crates/project/src/meta.rs +++ b/crates/project/src/meta.rs @@ -10,7 +10,7 @@ use std::{ use tracing::{debug, info, warn}; // use tracing::{debug, warn}; -use crate::{CaptionsData, CursorEvents, CursorImage, CursorImages, ProjectConfiguration, XY}; +use crate::{CaptionsData, CursorEvents, CursorImage, ProjectConfiguration, XY}; #[derive(Debug, Clone, Serialize, Deserialize, Type)] pub struct VideoMeta { @@ -243,6 +243,8 @@ pub struct CursorMeta { #[specta(type = String)] pub image_path: RelativePathBuf, pub hotspot: XY, + #[serde(default)] + pub shape: Option, } impl MultipleSegments { diff --git a/crates/recording/Cargo.toml b/crates/recording/Cargo.toml index f55ad203312..bbaa49f63e2 100644 --- a/crates/recording/Cargo.toml +++ b/crates/recording/Cargo.toml @@ -13,6 +13,7 @@ cap-flags = { path = "../flags" } cap-utils = { path = "../utils" } cap-displays = { path = "../displays" } cap-cursor-capture = { path = "../cursor-capture" } +cap-cursor-info = { path = "../cursor-info" } specta.workspace = true tokio.workspace = true @@ -37,6 +38,7 @@ screencapturekit = "0.3.5" cocoa = "0.26.0" objc = "0.2.7" cidre = { workspace = true } +objc2-app-kit = "0.3.1" [target.'cfg(target_os = "windows")'.dependencies] windows = { workspace = true, features = [ diff --git a/crates/recording/src/cursor.rs b/crates/recording/src/cursor.rs index bd03d936955..2c16528dc44 100644 --- a/crates/recording/src/cursor.rs +++ b/crates/recording/src/cursor.rs @@ -7,6 +7,7 @@ use std::{ }; use cap_cursor_capture::RawCursorPosition; +use cap_cursor_info::CursorShape; use cap_displays::Display; use cap_media::{platform::Bounds, sources::CropRatio}; use cap_project::{CursorClickEvent, CursorMoveEvent, XY}; @@ -21,6 +22,7 @@ pub struct Cursor { pub file_name: String, pub id: u32, pub hotspot: XY, + pub shape: Option, } pub type Cursors = HashMap; @@ -90,7 +92,7 @@ pub fn spawn_cursor_recorder( let elapsed = elapsed.as_secs_f64() * 1000.0; let mouse_state = device_state.get_mouse(); - let cursor_data = get_cursor_image_data(); + let cursor_data = get_cursor_data(); let cursor_id = if let Some(data) = cursor_data { let mut hasher = DefaultHasher::default(); data.image.hash(&mut hasher); @@ -118,6 +120,7 @@ pub fn spawn_cursor_recorder( Cursor { file_name, id: response.next_cursor_id, + shape: data.shape, hotspot: data.hotspot, }, ); @@ -240,67 +243,35 @@ pub fn spawn_cursor_recorder( struct CursorData { image: Vec, hotspot: XY, + // Optional as we can fallback to png if an SVG isn't available + shape: Option, } #[cfg(target_os = "macos")] -fn get_cursor_image_data() -> Option { - use cocoa::base::{id, nil}; - use cocoa::foundation::{NSPoint, NSSize, NSUInteger}; +fn get_cursor_data() -> Option { use objc::rc::autoreleasepool; - use objc::runtime::Class; - use objc::*; + use objc2_app_kit::NSCursor; - autoreleasepool(|| { - let nscursor_class = match Class::get("NSCursor") { - Some(cls) => cls, - None => return None, - }; - - unsafe { - // Get the current system cursor - let current_cursor: id = msg_send![nscursor_class, currentSystemCursor]; - if current_cursor == nil { - return None; - } - - // Get the image of the cursor - let cursor_image: id = msg_send![current_cursor, image]; - if cursor_image == nil { - return None; - } - - let cursor_size: NSSize = msg_send![cursor_image, size]; - let cursor_hotspot: NSPoint = msg_send![current_cursor, hotSpot]; - - // Get the TIFF representation of the image - let image_data: id = msg_send![cursor_image, TIFFRepresentation]; - if image_data == nil { - return None; - } + autoreleasepool(|| unsafe { + let cursor = NSCursor::currentCursor(); - // Get the length of the data - let length: NSUInteger = msg_send![image_data, length]; - - // Get the bytes of the data - let bytes: *const u8 = msg_send![image_data, bytes]; - - // Copy the data into a Vec - let slice = std::slice::from_raw_parts(bytes, length as usize); - let data = slice.to_vec(); + let image = cursor.image(); + let size = image.size(); + let hotspot = cursor.hotSpot(); + let Some(image_data) = image.TIFFRepresentation() else { + return None; + }; - Some(CursorData { - image: data, - hotspot: XY::new( - cursor_hotspot.x / cursor_size.width, - cursor_hotspot.y / cursor_size.height, - ), - }) - } + Some(CursorData { + shape: CursorShape::try_from(&*cursor).ok(), + image: image_data.as_bytes_unchecked().to_vec(), + hotspot: XY::new(hotspot.x / size.width, hotspot.y / size.height), + }) }) } #[cfg(windows)] -fn get_cursor_image_data() -> Option { +fn get_cursor_data() -> Option { use windows::Win32::Foundation::{HWND, POINT}; use windows::Win32::Graphics::Gdi::{ CreateCompatibleDC, CreateDIBSection, DeleteDC, DeleteObject, GetDC, GetObjectA, ReleaseDC, @@ -595,6 +566,7 @@ fn get_cursor_image_data() -> Option { .ok()?; Some(CursorData { + shape: CursorShape::try_from(&cursor_info).ok(), image: png_data, hotspot: XY::new(hotspot_x, hotspot_y), }) diff --git a/crates/recording/src/studio_recording.rs b/crates/recording/src/studio_recording.rs index 7e5b8e149f5..ad26badb828 100644 --- a/crates/recording/src/studio_recording.rs +++ b/crates/recording/src/studio_recording.rs @@ -524,6 +524,7 @@ async fn stop_recording( image_path: RelativePathBuf::from("content/cursors") .join(&cursor.file_name), hotspot: cursor.hotspot, + shape: cursor.shape, }, ) }) diff --git a/crates/rendering/Cargo.toml b/crates/rendering/Cargo.toml index 739e351e591..476b6002159 100644 --- a/crates/rendering/Cargo.toml +++ b/crates/rendering/Cargo.toml @@ -12,6 +12,7 @@ bytemuck = { version = "1.7", features = ["derive"] } cap-flags = { path = "../flags" } cap-project = { path = "../project" } cap-video-decode = { path = "../video-decode" } +cap-cursor-info = { path = "../cursor-info" } ffmpeg-hw-device = { path = "../ffmpeg-hw-device" } tokio.workspace = true ffmpeg.workspace = true diff --git a/crates/rendering/assets/cursors/arrow.svg b/crates/rendering/assets/cursors/arrow.svg deleted file mode 100644 index 21b101c2e4a..00000000000 --- a/crates/rendering/assets/cursors/arrow.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - diff --git a/crates/rendering/assets/cursors/crosshair.svg b/crates/rendering/assets/cursors/crosshair.svg deleted file mode 100644 index 1404ea40b11..00000000000 --- a/crates/rendering/assets/cursors/crosshair.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/rendering/assets/cursors/ibeam.svg b/crates/rendering/assets/cursors/ibeam.svg deleted file mode 100644 index fe9f77e7022..00000000000 --- a/crates/rendering/assets/cursors/ibeam.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/rendering/assets/cursors/pointing-hand.svg b/crates/rendering/assets/cursors/pointing-hand.svg deleted file mode 100644 index b7c20f45098..00000000000 --- a/crates/rendering/assets/cursors/pointing-hand.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/rendering/assets/cursors/resize-ew.svg b/crates/rendering/assets/cursors/resize-ew.svg deleted file mode 100644 index 9003670f699..00000000000 --- a/crates/rendering/assets/cursors/resize-ew.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - diff --git a/crates/rendering/assets/cursors/resize-nwse.svg b/crates/rendering/assets/cursors/resize-nwse.svg deleted file mode 100644 index ee98f38a6bf..00000000000 --- a/crates/rendering/assets/cursors/resize-nwse.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/rendering/src/cursor_interpolation.rs b/crates/rendering/src/cursor_interpolation.rs index cd620143858..83a9291254c 100644 --- a/crates/rendering/src/cursor_interpolation.rs +++ b/crates/rendering/src/cursor_interpolation.rs @@ -1,8 +1,9 @@ +use cap_cursor_info::CursorShape; use cap_project::{CursorEvents, CursorMoveEvent, XY}; use crate::{ - spring_mass_damper::{SpringMassDamperSimulation, SpringMassDamperSimulationConfig}, Coord, RawDisplayUVSpace, + spring_mass_damper::{SpringMassDamperSimulation, SpringMassDamperSimulationConfig}, }; #[derive(Debug, Clone)] diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rs index b8f51d2aab0..e413768a325 100644 --- a/crates/rendering/src/layers/cursor.rs +++ b/crates/rendering/src/layers/cursor.rs @@ -209,17 +209,34 @@ impl CursorLayer { if !self.cursors.contains_key(&interpolated_cursor.cursor_id) { let mut cursor = None; - // We first attempt to load a high-quality SVG cursor - if !uniforms.project.cursor.raw && uniforms.project.cursor.use_svg { - cursor = CursorTexture::get_svg(&constants, &interpolated_cursor.cursor_id) - .map_err(|err| { - error!( - "Error loading SVG cursor {:?}: {err}", - interpolated_cursor.cursor_id - ) - }) - .ok() - .flatten(); + + let cursor_shape = match &constants.recording_meta.inner { + RecordingMetaInner::Studio(StudioRecordingMeta::MultipleSegments { + inner: + MultipleSegments { + cursors: Cursors::Correct(cursors), + .. + }, + }) => cursors.get(&interpolated_cursor.cursor_id).unwrap().shape, + _ => None, + }; + + // Attempt to find and load a higher-quality SVG cursor included in Cap. + // These are used instead of the OS provided cursor images when possible as the quality is better. + if let Some(cursor_shape) = cursor_shape + && !uniforms.project.cursor.raw + && uniforms.project.cursor.use_svg + { + if let Some(info) = cursor_shape.info() { + cursor = CursorTexture::prepare_svg(&constants, info.raw, info.hotspot.into()) + .map_err(|err| { + error!( + "Error loading SVG cursor {:?}: {err}", + interpolated_cursor.cursor_id + ) + }) + .ok(); + } } // If not we attempt to load the low-quality image cursor @@ -408,32 +425,6 @@ fn get_click_t(clicks: &[CursorClickEvent], time_ms: f64) -> f32 { 1.0 } -static CURSOR_ARROW: (&'static str, XY) = ( - include_str!("../../assets/cursors/arrow.svg"), - XY::new(0.1, 0.1), -); - -static CURSOR_IBEAM: (&'static str, XY) = ( - include_str!("../../assets/cursors/ibeam.svg"), - XY::new(0.5, 0.5), -); -static CURSOR_CROSSHAIR: (&'static str, XY) = ( - include_str!("../../assets/cursors/crosshair.svg"), - XY::new(0.5, 0.5), -); -static CURSOR_POINTING_HAND: (&'static str, XY) = ( - include_str!("../../assets/cursors/pointing-hand.svg"), - XY::new(0.3, 0.1), -); -static CURSOR_RESIZE_NWSE: (&'static str, XY) = ( - include_str!("../../assets/cursors/resize-nwse.svg"), - XY::new(0.5, 0.5), -); -static CURSOR_RESIZE_EW: (&'static str, XY) = ( - include_str!("../../assets/cursors/resize-ew.svg"), - XY::new(0.5, 0.5), -); - /// The size to render the svg to. static SVG_OUTPUT_HEIGHT: u32 = 255; @@ -443,24 +434,6 @@ struct CursorTexture { } impl CursorTexture { - /// Attempt to find and load a higher-quality SVG cursor included in Cap. - /// These are used instead of the OS provided cursor images when possible as the quality is better. - fn get_svg( - constants: &RenderVideoConstants, - id: &str, - ) -> Result, String> { - println!("GET SVG {:?} {:?}", id, constants.recording_meta.platform); - - Ok(match (id, &constants.recording_meta.platform) { - (_, _) => Some(Self::prepare_svg( - constants, - CURSOR_RESIZE_NWSE.0, - CURSOR_RESIZE_NWSE.1, - )?), - _ => None, - }) - } - /// Prepare a cursor texture on the GPU from RGBA data. fn prepare( constants: &RenderVideoConstants, From 8906225fc51d51328a7b82619c979469cee89c51 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 14:29:29 +0800 Subject: [PATCH 11/29] windows work --- crates/cursor-info/src/windows.rs | 130 ++++++++---------------------- crates/media/src/platform/win.rs | 2 +- crates/recording/src/cursor.rs | 2 +- 3 files changed, 37 insertions(+), 97 deletions(-) diff --git a/crates/cursor-info/src/windows.rs b/crates/cursor-info/src/windows.rs index 87fc17d7d7f..ff8c6b75090 100644 --- a/crates/cursor-info/src/windows.rs +++ b/crates/cursor-info/src/windows.rs @@ -141,7 +141,9 @@ impl CursorShapeWindows { impl TryFrom<&windows::Win32::UI::WindowsAndMessaging::HCURSOR> for super::CursorShape { type Error = (); - fn try_from(cursor: &objc2_app_kit::NSCursor) -> Result { + fn try_from(cursor: &windows::Win32::UI::WindowsAndMessaging::HCURSOR) -> Result { + use windows::{core::PCWSTR, Win32::UI::WindowsAndMessaging::{LoadCursorW, IDC_APPSTARTING, IDC_ARROW, IDC_CROSS, IDC_HAND, IDC_HELP, IDC_IBEAM, IDC_NO, IDC_PERSON, IDC_PIN, IDC_SIZEALL, IDC_SIZENESW, IDC_SIZENS, IDC_SIZENWSE, IDC_SIZEWE, IDC_UPARROW, IDC_WAIT}}; + #[inline] fn load_cursor(lpcursorname: PCWSTR) -> *mut std::ffi::c_void { unsafe { LoadCursorW(None, lpcursorname) } @@ -150,101 +152,39 @@ impl TryFrom<&windows::Win32::UI::WindowsAndMessaging::HCURSOR> for super::Curso } Ok(super::CursorShape::Windows(match cursor.0 { - ptr if ptr == load_cursor(IDC_ARROW) => CursorShape::Arrow, - ptr if ptr == cursors.ibeam => CursorShape::IBeam, - ptr if ptr == cursors.wait => CursorShape::Wait, - ptr if ptr == cursors.cross => CursorShape::Crosshair, - ptr if ptr == cursors.up_arrow => CursorShape::ResizeUp, - ptr if ptr == cursors.size_we => CursorShape::ResizeLeftRight, - ptr if ptr == cursors.size_ns => CursorShape::ResizeUpDown, - ptr if ptr == cursors.size_nwse => CursorShape::ResizeUpLeftAndDownRight, - ptr if ptr == cursors.size_nesw => CursorShape::ResizeUpRightAndDownLeft, - ptr if ptr == cursors.size_all => CursorShape::ResizeAll, - ptr if ptr == cursors.hand => CursorShape::OpenHand, - ptr if ptr == cursors.no => CursorShape::NotAllowed, - ptr if ptr == cursors.appstarting => CursorShape::Appstarting, - ptr if ptr == cursors.help => CursorShape::Help, - ptr if ptr == cursors.pin || ptr == cursors.person => CursorShape::OpenHand, - // Usually 0, meaning the cursor is hidden. On Windows 8+, a value of 2 means the cursor is supressed - // as the user is using touch input instead. - _ => CursorShape::Hidden, + ptr if ptr == load_cursor(IDC_ARROW) => CursorShapeWindows::Arrow, + ptr if ptr == load_cursor(IDC_IBEAM) => CursorShapeWindows::IBeam, + ptr if ptr == load_cursor(IDC_WAIT) => CursorShapeWindows::Wait, + ptr if ptr == load_cursor(IDC_CROSS) => CursorShapeWindows::Cross, + ptr if ptr == load_cursor(IDC_UPARROW) => CursorShapeWindows::UpArrow, + ptr if ptr == load_cursor(IDC_SIZENWSE) => CursorShapeWindows::SizeNWSE, + ptr if ptr == load_cursor(IDC_SIZENESW) => CursorShapeWindows::SizeNESW, + ptr if ptr == load_cursor(IDC_SIZEWE) => CursorShapeWindows::SizeWE, + ptr if ptr == load_cursor(IDC_SIZENS) => CursorShapeWindows::SizeNS, + ptr if ptr == load_cursor(IDC_SIZEALL) => CursorShapeWindows::SizeAll, + ptr if ptr == load_cursor(IDC_NO) => CursorShapeWindows::No, + ptr if ptr == load_cursor(IDC_HAND) => CursorShapeWindows::Hand, + ptr if ptr == load_cursor(IDC_APPSTARTING) => CursorShapeWindows::AppStarting, + ptr if ptr == load_cursor(IDC_HELP) => CursorShapeWindows::Help, + ptr if ptr == load_cursor(IDC_PIN) => CursorShapeWindows::Pin, + ptr if ptr == load_cursor(IDC_PERSON) => CursorShapeWindows::Person, + ptr if ptr == load_cursor(PCWSTR(32631u16 as _)) => CursorShapeWindows::Pen, + ptr if ptr == load_cursor(PCWSTR(32652u16 as _)) => CursorShapeWindows::ScrolNS, + ptr if ptr == load_cursor(PCWSTR(32653u16 as _)) => CursorShapeWindows::ScrollWE, + ptr if ptr == load_cursor(PCWSTR(32654u16 as _)) => CursorShapeWindows::ScrollNSEW, + ptr if ptr == load_cursor(PCWSTR(32655u16 as _)) => CursorShapeWindows::ScrollN, + ptr if ptr == load_cursor(PCWSTR(32656u16 as _)) => CursorShapeWindows::ScrollS, + ptr if ptr == load_cursor(PCWSTR(32657u16 as _)) => CursorShapeWindows::ScrollW, + ptr if ptr == load_cursor(PCWSTR(32658u16 as _)) => CursorShapeWindows::ScrollE, + ptr if ptr == load_cursor(PCWSTR(32659u16 as _)) => CursorShapeWindows::ScrollNW, + ptr if ptr == load_cursor(PCWSTR(32660u16 as _)) => CursorShapeWindows::ScrollNE, + ptr if ptr == load_cursor(PCWSTR(32661u16 as _)) => CursorShapeWindows::ScrollSW, + ptr if ptr == load_cursor(PCWSTR(32662u16 as _)) => CursorShapeWindows::ScrollSE, + ptr if ptr == load_cursor(PCWSTR(32663u16 as _)) => CursorShapeWindows::ArrowCD, + + // TODO: REST + _ => return Err(()), })) } } -// TODO: #[cfg(target_os = "windows")] - -// pub fn get_cursor_shape(cursors: &DefaultCursors) -> CursorShape { -// let mut cursor_info = CURSORINFO { -// cbSize: std::mem::size_of::() as u32, -// ..Default::default() -// }; -// match unsafe { GetCursorInfo(&mut cursor_info) } { -// Ok(_) => match cursor_info.hCursor.0 { -// ptr if ptr == cursors.arrow => CursorShape::Arrow, -// ptr if ptr == cursors.ibeam => CursorShape::IBeam, -// ptr if ptr == cursors.wait => CursorShape::Wait, -// ptr if ptr == cursors.cross => CursorShape::Crosshair, -// ptr if ptr == cursors.up_arrow => CursorShape::ResizeUp, -// ptr if ptr == cursors.size_we => CursorShape::ResizeLeftRight, -// ptr if ptr == cursors.size_ns => CursorShape::ResizeUpDown, -// ptr if ptr == cursors.size_nwse => CursorShape::ResizeUpLeftAndDownRight, -// ptr if ptr == cursors.size_nesw => CursorShape::ResizeUpRightAndDownLeft, -// ptr if ptr == cursors.size_all => CursorShape::ResizeAll, -// ptr if ptr == cursors.hand => CursorShape::OpenHand, -// ptr if ptr == cursors.no => CursorShape::NotAllowed, -// ptr if ptr == cursors.appstarting => CursorShape::Appstarting, -// ptr if ptr == cursors.help => CursorShape::Help, -// ptr if ptr == cursors.pin || ptr == cursors.person => CursorShape::OpenHand, -// // Usually 0, meaning the cursor is hidden. On Windows 8+, a value of 2 means the cursor is supressed -// // as the user is using touch input instead. -// _ => CursorShape::Hidden, -// }, -// Err(_) => CursorShape::Unknown, -// } -// } - -// /// Keeps handles to default cursor. -// /// Read more: [MS Doc - About Cursors](https://learn.microsoft.com/en-us/windows/win32/menurc/about-cursors) -// pub struct DefaultCursors { -// arrow: *mut c_void, -// ibeam: *mut c_void, -// wait: *mut c_void, -// cross: *mut c_void, -// up_arrow: *mut c_void, -// size_nwse: *mut c_void, -// size_nesw: *mut c_void, -// size_we: *mut c_void, -// size_ns: *mut c_void, -// size_all: *mut c_void, -// no: *mut c_void, -// hand: *mut c_void, -// appstarting: *mut c_void, -// help: *mut c_void, -// pin: *mut c_void, -// person: *mut c_void, -// } - -// impl Default for DefaultCursors { -// fn default() -> Self { - -// DefaultCursors { -// arrow: load_cursor(IDC_ARROW), -// ibeam: load_cursor(IDC_IBEAM), -// cross: load_cursor(IDC_CROSS), -// hand: load_cursor(IDC_HAND), -// help: load_cursor(IDC_HELP), -// no: load_cursor(IDC_NO), -// size_all: load_cursor(IDC_SIZEALL), -// size_ns: load_cursor(IDC_SIZENS), -// size_we: load_cursor(IDC_SIZEWE), -// size_nwse: load_cursor(IDC_SIZENWSE), -// size_nesw: load_cursor(IDC_SIZENESW), -// up_arrow: load_cursor(IDC_UPARROW), -// wait: load_cursor(IDC_WAIT), -// appstarting: load_cursor(IDC_APPSTARTING), -// pin: load_cursor(IDC_PIN), -// person: load_cursor(IDC_PERSON), -// } -// } -// } diff --git a/crates/media/src/platform/win.rs b/crates/media/src/platform/win.rs index 5a309fe08eb..9dcbceaa5c9 100644 --- a/crates/media/src/platform/win.rs +++ b/crates/media/src/platform/win.rs @@ -3,7 +3,7 @@ use std::ffi::{c_void, OsString}; use std::os::windows::ffi::OsStringExt; use std::path::PathBuf; -use super::{Bounds, CursorShape, LogicalBounds, LogicalPosition, LogicalSize, Window}; +use super::{Bounds, LogicalBounds, LogicalPosition, LogicalSize, Window}; use tracing::debug; use windows::core::{PCWSTR, PWSTR}; diff --git a/crates/recording/src/cursor.rs b/crates/recording/src/cursor.rs index 2c16528dc44..50e3fed7760 100644 --- a/crates/recording/src/cursor.rs +++ b/crates/recording/src/cursor.rs @@ -566,7 +566,7 @@ fn get_cursor_data() -> Option { .ok()?; Some(CursorData { - shape: CursorShape::try_from(&cursor_info).ok(), + shape: CursorShape::try_from(&cursor_info.hCursor).ok(), image: png_data, hotspot: XY::new(hotspot_x, hotspot_y), }) From 14b4c03031c0aa82f6d24a9f63affbd2ed4f816e Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 14:44:50 +0800 Subject: [PATCH 12/29] fix `CursorShape` serialize impl --- crates/cursor-info/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cursor-info/src/lib.rs b/crates/cursor-info/src/lib.rs index eaa670c32a4..b9ef5bd8be5 100644 --- a/crates/cursor-info/src/lib.rs +++ b/crates/cursor-info/src/lib.rs @@ -49,7 +49,7 @@ impl fmt::Display for CursorShape { CursorShape::Windows(cursor) => cursor.into(), }; - writeln!(f, "{kind}|{variant}") + write!(f, "{kind}|{variant}") } } From add538949b596b99e09839a7f028c8fb6db08531 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 17:09:55 +0800 Subject: [PATCH 13/29] invalidate cache when toggling scg assets + better macOS assets --- crates/cursor-info/assets/mac-old/arrow.png | Bin 0 -> 15325 bytes crates/cursor-info/assets/mac-old/arrow.svg | 9 + .../assets/mac-old/closed_hand.png | Bin 0 -> 1686 bytes .../assets/mac-old/closed_hand.svg | 9 + .../assets/mac-old/context_menu.png | Bin 0 -> 1997 bytes .../assets/mac-old/context_menu.svg | 9 + .../cursor-info/assets/mac-old/crosshair.png | Bin 0 -> 480 bytes .../cursor-info/assets/mac-old/crosshair.svg | 9 + .../assets/mac-old/cursor_metadata.json | 149 ++++ .../assets/mac-old/disappearing_item.png | Bin 0 -> 4153 bytes .../assets/mac-old/disappearing_item.svg | 9 + .../cursor-info/assets/mac-old/drag_copy.png | Bin 0 -> 3936 bytes .../cursor-info/assets/mac-old/drag_copy.svg | 9 + .../cursor-info/assets/mac-old/drag_link.png | Bin 0 -> 1904 bytes .../cursor-info/assets/mac-old/drag_link.svg | 9 + crates/cursor-info/assets/mac-old/ibeam.png | Bin 0 -> 6946 bytes crates/cursor-info/assets/mac-old/ibeam.svg | 9 + .../assets/mac-old/ibeam_vertical.png | Bin 0 -> 1564 bytes .../assets/mac-old/ibeam_vertical.svg | 9 + .../cursor-info/assets/mac-old/open_hand.png | Bin 0 -> 2236 bytes .../cursor-info/assets/mac-old/open_hand.svg | 9 + .../assets/mac-old/operation_not_allowed.png | Bin 0 -> 5087 bytes .../assets/mac-old/operation_not_allowed.svg | 9 + .../assets/mac-old/pointing_hand.png | Bin 0 -> 2122 bytes .../assets/mac-old/pointing_hand.svg | 9 + .../assets/mac-old/resize_down.png | Bin 0 -> 1644 bytes .../assets/mac-old/resize_down.svg | 9 + .../assets/mac-old/resize_left.png | Bin 0 -> 1527 bytes .../assets/mac-old/resize_left.svg | 9 + .../assets/mac-old/resize_left_right.png | Bin 0 -> 2451 bytes .../assets/mac-old/resize_left_right.svg | 9 + .../assets/mac-old/resize_right.png | Bin 0 -> 1596 bytes .../assets/mac-old/resize_right.svg | 9 + .../cursor-info/assets/mac-old/resize_up.png | Bin 0 -> 1507 bytes .../cursor-info/assets/mac-old/resize_up.svg | 9 + .../assets/mac-old/resize_up_down.png | Bin 0 -> 2418 bytes .../assets/mac-old/resize_up_down.svg | 9 + crates/cursor-info/assets/mac/LICENSE | 674 ------------------ crates/cursor-info/assets/mac/X_cursor.svg | 17 - crates/cursor-info/assets/mac/all-scroll.svg | 23 - crates/cursor-info/assets/mac/arrow.svg | 1 + .../assets/mac/bottom_left_corner.svg | 17 - .../assets/mac/bottom_right_corner.svg | 17 - crates/cursor-info/assets/mac/bottom_tee.svg | 17 - crates/cursor-info/assets/mac/center_ptr.svg | 17 - crates/cursor-info/assets/mac/closed_hand.svg | 1 + .../cursor-info/assets/mac/context-menu.svg | 18 - .../assets/mac/contextual_menu.svg | 1 + crates/cursor-info/assets/mac/copy.svg | 51 -- crates/cursor-info/assets/mac/cross.svg | 18 - .../cursor-info/assets/mac/crossed_circle.svg | 39 - crates/cursor-info/assets/mac/crosshair.svg | 72 +- crates/cursor-info/assets/mac/dnd_no_drop.svg | 28 - crates/cursor-info/assets/mac/dotbox.svg | 23 - crates/cursor-info/assets/mac/drag_copy.svg | 1 + crates/cursor-info/assets/mac/drag_link.svg | 1 + crates/cursor-info/assets/mac/hand1.svg | 20 - crates/cursor-info/assets/mac/hand2.svg | 20 - crates/cursor-info/assets/mac/ibeam.svg | 1 + .../cursor-info/assets/mac/ibeam_vertical.svg | 1 + crates/cursor-info/assets/mac/left_ptr.svg | 17 - .../mac/left_ptr_watch/left_ptr_watch-01.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-02.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-03.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-04.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-05.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-06.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-07.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-08.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-09.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-10.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-11.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-12.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-13.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-14.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-15.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-16.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-17.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-18.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-19.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-20.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-21.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-22.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-23.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-24.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-25.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-26.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-27.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-28.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-29.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-30.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-31.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-32.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-33.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-34.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-35.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-36.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-37.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-38.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-39.svg | 66 -- .../mac/left_ptr_watch/left_ptr_watch-40.svg | 66 -- crates/cursor-info/assets/mac/left_side.svg | 22 - crates/cursor-info/assets/mac/left_tee.svg | 17 - crates/cursor-info/assets/mac/link.svg | 17 - crates/cursor-info/assets/mac/ll_angle.svg | 18 - crates/cursor-info/assets/mac/lr_angle.svg | 18 - crates/cursor-info/assets/mac/move.svg | 20 - crates/cursor-info/assets/mac/open_hand.svg | 1 + .../assets/mac/operation_not_allowed.svg | 1 + crates/cursor-info/assets/mac/pencil.svg | 17 - crates/cursor-info/assets/mac/person.svg | 51 -- crates/cursor-info/assets/mac/pin.svg | 39 - crates/cursor-info/assets/mac/plus.svg | 19 - .../cursor-info/assets/mac/pointing_hand.svg | 1 + .../cursor-info/assets/mac/question_arrow.svg | 19 - crates/cursor-info/assets/mac/resize_down.svg | 1 + crates/cursor-info/assets/mac/resize_left.svg | 1 + .../assets/mac/resize_left_right.svg | 1 + .../cursor-info/assets/mac/resize_right.svg | 1 + crates/cursor-info/assets/mac/resize_up.svg | 1 + .../cursor-info/assets/mac/resize_up_down.svg | 1 + crates/cursor-info/assets/mac/right_ptr.svg | 17 - crates/cursor-info/assets/mac/right_tee.svg | 22 - .../cursor-info/assets/mac/sb_down_arrow.svg | 22 - .../assets/mac/sb_h_double_arrow.svg | 17 - .../cursor-info/assets/mac/sb_left_arrow.svg | 17 - .../cursor-info/assets/mac/sb_right_arrow.svg | 17 - crates/cursor-info/assets/mac/sb_up_arrow.svg | 17 - .../assets/mac/sb_v_double_arrow.svg | 22 - crates/cursor-info/assets/mac/top_side.svg | 22 - crates/cursor-info/assets/mac/top_tee.svg | 22 - crates/cursor-info/assets/mac/ul_angle.svg | 17 - crates/cursor-info/assets/mac/ur_angle.svg | 17 - .../cursor-info/assets/mac/vertical-text.svg | 17 - .../cursor-info/assets/mac/wait/wait-01.svg | 34 - .../cursor-info/assets/mac/wait/wait-02.svg | 34 - .../cursor-info/assets/mac/wait/wait-03.svg | 39 - .../cursor-info/assets/mac/wait/wait-04.svg | 39 - .../cursor-info/assets/mac/wait/wait-05.svg | 39 - .../cursor-info/assets/mac/wait/wait-06.svg | 39 - .../cursor-info/assets/mac/wait/wait-07.svg | 39 - .../cursor-info/assets/mac/wait/wait-08.svg | 39 - .../cursor-info/assets/mac/wait/wait-09.svg | 39 - .../cursor-info/assets/mac/wait/wait-10.svg | 34 - .../cursor-info/assets/mac/wait/wait-11.svg | 34 - .../cursor-info/assets/mac/wait/wait-12.svg | 34 - .../cursor-info/assets/mac/wait/wait-13.svg | 39 - .../cursor-info/assets/mac/wait/wait-14.svg | 39 - .../cursor-info/assets/mac/wait/wait-15.svg | 39 - .../cursor-info/assets/mac/wait/wait-16.svg | 39 - .../cursor-info/assets/mac/wait/wait-17.svg | 39 - .../cursor-info/assets/mac/wait/wait-18.svg | 39 - .../cursor-info/assets/mac/wait/wait-19.svg | 39 - .../cursor-info/assets/mac/wait/wait-20.svg | 34 - .../cursor-info/assets/mac/wait/wait-21.svg | 34 - .../cursor-info/assets/mac/wait/wait-22.svg | 34 - .../cursor-info/assets/mac/wait/wait-23.svg | 39 - .../cursor-info/assets/mac/wait/wait-24.svg | 39 - .../cursor-info/assets/mac/wait/wait-25.svg | 39 - .../cursor-info/assets/mac/wait/wait-26.svg | 39 - .../cursor-info/assets/mac/wait/wait-27.svg | 39 - .../cursor-info/assets/mac/wait/wait-28.svg | 39 - .../cursor-info/assets/mac/wait/wait-29.svg | 39 - .../cursor-info/assets/mac/wait/wait-30.svg | 34 - .../cursor-info/assets/mac/wait/wait-31.svg | 34 - .../cursor-info/assets/mac/wait/wait-32.svg | 34 - .../cursor-info/assets/mac/wait/wait-33.svg | 39 - .../cursor-info/assets/mac/wait/wait-34.svg | 39 - .../cursor-info/assets/mac/wait/wait-35.svg | 39 - .../cursor-info/assets/mac/wait/wait-36.svg | 39 - .../cursor-info/assets/mac/wait/wait-37.svg | 39 - .../cursor-info/assets/mac/wait/wait-38.svg | 39 - .../cursor-info/assets/mac/wait/wait-39.svg | 39 - .../cursor-info/assets/mac/wait/wait-40.svg | 34 - .../cursor-info/assets/mac/wayland-cursor.svg | 17 - crates/cursor-info/assets/mac/xterm.svg | 22 - crates/cursor-info/assets/mac/zoom-in.svg | 32 - crates/cursor-info/assets/mac/zoom-out.svg | 31 - crates/cursor-info/src/macos.rs | 89 ++- crates/recording/src/cursor.rs | 5 +- crates/rendering/src/layers/cursor.rs | 13 + 181 files changed, 414 insertions(+), 5853 deletions(-) create mode 100644 crates/cursor-info/assets/mac-old/arrow.png create mode 100644 crates/cursor-info/assets/mac-old/arrow.svg create mode 100644 crates/cursor-info/assets/mac-old/closed_hand.png create mode 100644 crates/cursor-info/assets/mac-old/closed_hand.svg create mode 100644 crates/cursor-info/assets/mac-old/context_menu.png create mode 100644 crates/cursor-info/assets/mac-old/context_menu.svg create mode 100644 crates/cursor-info/assets/mac-old/crosshair.png create mode 100644 crates/cursor-info/assets/mac-old/crosshair.svg create mode 100644 crates/cursor-info/assets/mac-old/cursor_metadata.json create mode 100644 crates/cursor-info/assets/mac-old/disappearing_item.png create mode 100644 crates/cursor-info/assets/mac-old/disappearing_item.svg create mode 100644 crates/cursor-info/assets/mac-old/drag_copy.png create mode 100644 crates/cursor-info/assets/mac-old/drag_copy.svg create mode 100644 crates/cursor-info/assets/mac-old/drag_link.png create mode 100644 crates/cursor-info/assets/mac-old/drag_link.svg create mode 100644 crates/cursor-info/assets/mac-old/ibeam.png create mode 100644 crates/cursor-info/assets/mac-old/ibeam.svg create mode 100644 crates/cursor-info/assets/mac-old/ibeam_vertical.png create mode 100644 crates/cursor-info/assets/mac-old/ibeam_vertical.svg create mode 100644 crates/cursor-info/assets/mac-old/open_hand.png create mode 100644 crates/cursor-info/assets/mac-old/open_hand.svg create mode 100644 crates/cursor-info/assets/mac-old/operation_not_allowed.png create mode 100644 crates/cursor-info/assets/mac-old/operation_not_allowed.svg create mode 100644 crates/cursor-info/assets/mac-old/pointing_hand.png create mode 100644 crates/cursor-info/assets/mac-old/pointing_hand.svg create mode 100644 crates/cursor-info/assets/mac-old/resize_down.png create mode 100644 crates/cursor-info/assets/mac-old/resize_down.svg create mode 100644 crates/cursor-info/assets/mac-old/resize_left.png create mode 100644 crates/cursor-info/assets/mac-old/resize_left.svg create mode 100644 crates/cursor-info/assets/mac-old/resize_left_right.png create mode 100644 crates/cursor-info/assets/mac-old/resize_left_right.svg create mode 100644 crates/cursor-info/assets/mac-old/resize_right.png create mode 100644 crates/cursor-info/assets/mac-old/resize_right.svg create mode 100644 crates/cursor-info/assets/mac-old/resize_up.png create mode 100644 crates/cursor-info/assets/mac-old/resize_up.svg create mode 100644 crates/cursor-info/assets/mac-old/resize_up_down.png create mode 100644 crates/cursor-info/assets/mac-old/resize_up_down.svg delete mode 100644 crates/cursor-info/assets/mac/LICENSE delete mode 100644 crates/cursor-info/assets/mac/X_cursor.svg delete mode 100644 crates/cursor-info/assets/mac/all-scroll.svg create mode 100644 crates/cursor-info/assets/mac/arrow.svg delete mode 100644 crates/cursor-info/assets/mac/bottom_left_corner.svg delete mode 100644 crates/cursor-info/assets/mac/bottom_right_corner.svg delete mode 100644 crates/cursor-info/assets/mac/bottom_tee.svg delete mode 100644 crates/cursor-info/assets/mac/center_ptr.svg create mode 100644 crates/cursor-info/assets/mac/closed_hand.svg delete mode 100644 crates/cursor-info/assets/mac/context-menu.svg create mode 100644 crates/cursor-info/assets/mac/contextual_menu.svg delete mode 100644 crates/cursor-info/assets/mac/copy.svg delete mode 100644 crates/cursor-info/assets/mac/cross.svg delete mode 100644 crates/cursor-info/assets/mac/crossed_circle.svg delete mode 100644 crates/cursor-info/assets/mac/dnd_no_drop.svg delete mode 100644 crates/cursor-info/assets/mac/dotbox.svg create mode 100644 crates/cursor-info/assets/mac/drag_copy.svg create mode 100644 crates/cursor-info/assets/mac/drag_link.svg delete mode 100644 crates/cursor-info/assets/mac/hand1.svg delete mode 100644 crates/cursor-info/assets/mac/hand2.svg create mode 100644 crates/cursor-info/assets/mac/ibeam.svg create mode 100644 crates/cursor-info/assets/mac/ibeam_vertical.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-01.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-02.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-03.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-04.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-05.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-06.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-07.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-08.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-09.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-10.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-11.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-12.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-13.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-14.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-15.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-16.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-17.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-18.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-19.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-20.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-21.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-22.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-23.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-24.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-25.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-26.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-27.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-28.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-29.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-30.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-31.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-32.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-33.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-34.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-35.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-36.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-37.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-38.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-39.svg delete mode 100644 crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-40.svg delete mode 100644 crates/cursor-info/assets/mac/left_side.svg delete mode 100644 crates/cursor-info/assets/mac/left_tee.svg delete mode 100644 crates/cursor-info/assets/mac/link.svg delete mode 100644 crates/cursor-info/assets/mac/ll_angle.svg delete mode 100644 crates/cursor-info/assets/mac/lr_angle.svg delete mode 100644 crates/cursor-info/assets/mac/move.svg create mode 100644 crates/cursor-info/assets/mac/open_hand.svg create mode 100644 crates/cursor-info/assets/mac/operation_not_allowed.svg delete mode 100644 crates/cursor-info/assets/mac/pencil.svg delete mode 100644 crates/cursor-info/assets/mac/person.svg delete mode 100644 crates/cursor-info/assets/mac/pin.svg delete mode 100644 crates/cursor-info/assets/mac/plus.svg create mode 100644 crates/cursor-info/assets/mac/pointing_hand.svg delete mode 100644 crates/cursor-info/assets/mac/question_arrow.svg create mode 100644 crates/cursor-info/assets/mac/resize_down.svg create mode 100644 crates/cursor-info/assets/mac/resize_left.svg create mode 100644 crates/cursor-info/assets/mac/resize_left_right.svg create mode 100644 crates/cursor-info/assets/mac/resize_right.svg create mode 100644 crates/cursor-info/assets/mac/resize_up.svg create mode 100644 crates/cursor-info/assets/mac/resize_up_down.svg delete mode 100644 crates/cursor-info/assets/mac/right_ptr.svg delete mode 100644 crates/cursor-info/assets/mac/right_tee.svg delete mode 100644 crates/cursor-info/assets/mac/sb_down_arrow.svg delete mode 100644 crates/cursor-info/assets/mac/sb_h_double_arrow.svg delete mode 100644 crates/cursor-info/assets/mac/sb_left_arrow.svg delete mode 100644 crates/cursor-info/assets/mac/sb_right_arrow.svg delete mode 100644 crates/cursor-info/assets/mac/sb_up_arrow.svg delete mode 100644 crates/cursor-info/assets/mac/sb_v_double_arrow.svg delete mode 100644 crates/cursor-info/assets/mac/top_side.svg delete mode 100644 crates/cursor-info/assets/mac/top_tee.svg delete mode 100644 crates/cursor-info/assets/mac/ul_angle.svg delete mode 100644 crates/cursor-info/assets/mac/ur_angle.svg delete mode 100644 crates/cursor-info/assets/mac/vertical-text.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-01.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-02.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-03.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-04.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-05.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-06.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-07.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-08.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-09.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-10.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-11.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-12.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-13.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-14.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-15.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-16.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-17.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-18.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-19.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-20.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-21.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-22.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-23.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-24.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-25.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-26.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-27.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-28.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-29.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-30.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-31.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-32.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-33.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-34.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-35.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-36.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-37.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-38.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-39.svg delete mode 100644 crates/cursor-info/assets/mac/wait/wait-40.svg delete mode 100644 crates/cursor-info/assets/mac/wayland-cursor.svg delete mode 100644 crates/cursor-info/assets/mac/xterm.svg delete mode 100644 crates/cursor-info/assets/mac/zoom-in.svg delete mode 100644 crates/cursor-info/assets/mac/zoom-out.svg diff --git a/crates/cursor-info/assets/mac-old/arrow.png b/crates/cursor-info/assets/mac-old/arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..d8af87898da554ff631ea9eb9571bdce4643b691 GIT binary patch literal 15325 zcmb_@eOy#!`Zq5lqG(`-n5JOjOOc|PkSPq6O64ZC<+AI`U~5UgMI)nx5tuXTx?+Tw zW(pO5lBeMz17{3!kJSHQenGz~^U|tlyEd}zXg=R@`2Xw2h0_(L z*n)n+!yw&h?wcQNk6GTWTcJ#H4Zm|Z{LXaw6;Gdlf__cfS4S^6o7J=OvXa6#g(|(R-+EiS<89~TZ5zvq-)*-nh_=Ts zZ`15ek~PcsbQs6#y2r+NcW3C#8MU1f+om+Z)&FQn) z(U`QLYG1eNRYLtM7VPTfwbKfGv@`S415?k1rkty-YtPkKay4Up))&kRz`JbiH1_V% zj5;W!U;~AFf+~EQM{n7c6drhcvc@o3vvNPXeSK1hE5s46=+TTgC`@f0?Mk0K^<1&b z{(DTaxO$zfMrWI%l*>FM6Mfc4C{I79Jbj0Aui(PzgKMWni0_k`fp0`8H|OPU<}U0` zxe%$iT$FM-(Z!?M7w`7b?(L&Zo7#^Gx4*G~h6AuGrC@Z)~;Wg0pdRNg6lf#s2nq zzFj@Sd_CTNUGFhw;=J_%N(pQ*#&cdY-u9^HyH$~Er{%p&+YuL0HtHY-j9`hAHoAv5 zmTY&SKLogJ*@bsf$d+ruQ?K*M7kkGE+XHVy%r&JGekw|>FG>wvUl#G+GM7;khiu=? zK=&`e?ju~>B##(UZnXOacJ*xx*`K7?WV*S@>Mre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&V3g!t5XWO*X zW$(93Gug7#qd71K;(F@(N2<2kdumlFn6(%pQ?z|4T5TylHGd^KzTE1)|TZl#YA{67*ku0dvkW@a=CG$kDAvMwhR0HUXEkp+^So@Fmmtu&KsMI?Q z?i@ckup1;}k4hEh2$Nnf*!F5p?080(L5V2nZf+F`PePf%MpP7B6P68d@nmwxBwO4$ zD}*$&!`Pjh@;LTL4{kAZ8GwwvU4k4tV*Gkk4g+`|$G&g}+6b$aMB!7mqV2cC$chbT}BL{8B`PCIrncn>ju@UdUKcTH1)r?r|{A;E70 zG5tOOxg`)$i5ph?5{8138JK0MgA7g?11mBGv8Tv16AtF{bLjCfY(Fsg5ZwZfgr}D1 zLxjoMRcr_3ru0kZh%D@57YIGytnK-dJt{}AJ7BvDc{8MlfM4TARB4?&sRQjZWr(*C zJ2*N=W9!31jGBXTJVrO#{bJ!BK$HljD>a)UG7=kw-@Ozi^ngYGY}--Ji}X>L6SP0b z?FBr)7U1GehezZ&n4gG2=GZ+IOmTWmla)G3pQ$9qlL2KosbHJov-V>=`4{2h=8)hr zBoKuVfvHGB&}4$m@QYD)VARNY+Q+sxekc(c13FD+B0n3zbQDS~rl|Jg!bLg4!+1b4 zZb(6d?Wi1zdQ%ZPD09F9NWk9MZDCHwn|$m)NnP~Z-IiVQChRjBv^zVN!FGxril;Py zb7q;O<6-0zW70a_%9Dc65+7pn!hFCP;G_l`@PwdN3!Bp55za>)38y*^8Wodj#Sa1( z;`Q)t2OCk492ZCGpTHCFUWw4aaT6a9i=C^du#a&@8%E_x6gy2x#g$bjf`f(`svkdVYQ1|ewne;0 + + macOS arrow Cursor + Scalable macOS cursor: arrow (hotspot: 40.0, 40.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/closed_hand.png b/crates/cursor-info/assets/mac-old/closed_hand.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d741e675b7ec678a5f0842d907310441e892a7 GIT binary patch literal 1686 zcmb7FjZ+h68sE((AwVI1)Kd^hs-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|(V-ncTwL6B9JloLg8I6-_DdHLPVEXemy996`+naiZqWv8 z=^+&D;OLo#Hh+U%GE#A>*fm+)7&x}i?Df9tYqdC^J$qJx_e}pVHs(;`UL_T(7Y`{S zq+l0hg<{z{E_-9yZqNssIB(qw7Ts!_!$f|JzAp?eNxn^aoYnpE+BX!M(PK;#Of7f$ z{ASotpC**XbVXXBbp#yeEK;5Wga?TGngEF zm^>4z+XUd{0oQt%x-&iRRkPkYqpv3UQidivFM|ND^9PW)J|qF;Svlok4_{kmfFT5+ z1?PyT`86ACD`XFQrkcU>Fg{}!GgaYFP$kw36^C2-uZTNa&?@4e#0eR+6OwQaqT9%6 z6bD?~5VU}@{7H-@RfLI4Rtsb(#%)A(m=5Ld<$5t27T&dTH|T(WH32Jt6f&*ig%+sy zW@-s=#LBq^82NtqAsNR3M^E65 sU9U@%AxC + + macOS closed_hand Cursor + Scalable macOS cursor: closed_hand (hotspot: 32.0, 32.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/context_menu.png b/crates/cursor-info/assets/mac-old/context_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..c5c9683eced25141a27f27bc93aea9abf9cca1f1 GIT binary patch literal 1997 zcmb_ddsGu=7N1N)0thA2ZJ|U=toT?xYoaLV;gR@2VD*UY;gs$2N{>~KMNE(?39p%9 zMd|}XsUVgXSP*U3mEh?bC?w2SC>BK{vRkl0CO{#jA|VgVduAuvJ?-w_d(NGi@66oq z&i&or?|%2p{(Xso{$c(A00br{?RuMfZl$jMzD(-AcZKTr0KmGKylZ=^jP?wpH$}W# z+ixNZ<}1G&ymoxgfwo+o>K8k5zM=My%7#smZ_YbTc6?BHwIU|xUrIB?sUdZ~gpVq4 zRE(+algm@H1SXVQV_4P3<`D%gX1Cv3(SqAgKw93C6aM>=21825d&J?DvMd@yK#!6U z>v$r!_OxuZZpNqT6pf~mZ;v=bzRT7gY6#M~%lbUygS&(Iu)VQde>osjAjV+1DthYi z%cX;R=5FK}gEqso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)2diDgYL-Mhu0yCdF zS1I^FA{O7ynxiLTVWIFADPxX&+~|3Xy9XNG1Cec-=YKv%fdEQv1(2<+Kvq#;KS)fS z7lF({szof9FyGC*&NmT8fNv-$~xoAy< z0ov_z$G~^64bq@?a5s-;Y2F?SP5PUT&TKn@fm>h67`AyT)6>&OGCQSzrGde9oja&K zlL^CAc0dO3fcBsM??d;(@_is!N2|v+>KW}mR!S9{c{CbW7Lp0R+Rk_diPHmrqOYuS z-}}OSZ_u(yEN0Zgu-_=lUn~a0#G;H9SsyZkLy;}*Or{w0B0@h$7)%TUQbjPr2u`8~ z6Xg*Q@erm0%ZFAFB@6~z1WfwVnE`d{`_KkjemQ0GAs*rBdu{UZ;8&N)_>V~47jAs_ wG#Ryy?0Cz8R^BCZQwd4S%K`X*|71^G>i-_^5oeZ~&j65|uy0q}4sqGP0f3GXJ^%m! literal 0 HcmV?d00001 diff --git a/crates/cursor-info/assets/mac-old/context_menu.svg b/crates/cursor-info/assets/mac-old/context_menu.svg new file mode 100644 index 00000000000..50edc9fb9cc --- /dev/null +++ b/crates/cursor-info/assets/mac-old/context_menu.svg @@ -0,0 +1,9 @@ + + + macOS context_menu Cursor + Scalable macOS cursor: context_menu (hotspot: 10.0, 10.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/crosshair.png b/crates/cursor-info/assets/mac-old/crosshair.png new file mode 100644 index 0000000000000000000000000000000000000000..8b26c427f6417d37beb9c869c2b90d4571bd51e7 GIT binary patch literal 480 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezr3(FfR9WaSW+oe0zX-flB1GV;}#Q zzw145W_gi!^19sH+n^}3XWlfg_4AC3mEQd<+n!amtlc{M>iSRnrKkSCyW-D#x2N^y zTK{(k{=DCN>VICyzjEat{6;*7Q^5Ldc@7_`*8@xQe|zC>!_=T|^Yi2%@dcmeA29px z3e|q3enO(evURVy8dP{VHuS1|oZk#FYB7>6tQ&IwHQzAPSMq%1+Frq!Gh5tA=zM=} zo#Ugr{50jx=f};?`%bF382D3s&yQre!zR8q=ARGkmHfaRlQ?g`yZs|UhAUA&e;>D> zSI^ue-k6({EPeZiTLS|l6H7<>Z`OIfU?$M^+?>z(EgPt-p2Js4V;}yUpz^Oc0PbgyLl4$(09j-6DUqLfcA~^Apf}o4ydm)4u`O}Nu65cr w2Q2#5zW;ryUJe*CivP-yy@?i>AgTWxi<2t?bxvKM0gO2YPgg&ebxsLQ06duN?EnA( literal 0 HcmV?d00001 diff --git a/crates/cursor-info/assets/mac-old/crosshair.svg b/crates/cursor-info/assets/mac-old/crosshair.svg new file mode 100644 index 00000000000..d2b3c3de34f --- /dev/null +++ b/crates/cursor-info/assets/mac-old/crosshair.svg @@ -0,0 +1,9 @@ + + + macOS crosshair Cursor + Scalable macOS cursor: crosshair (hotspot: 22.0, 22.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/cursor_metadata.json b/crates/cursor-info/assets/mac-old/cursor_metadata.json new file mode 100644 index 00000000000..28172e7a631 --- /dev/null +++ b/crates/cursor-info/assets/mac-old/cursor_metadata.json @@ -0,0 +1,149 @@ +{ + "cursors": [ + { + "name": "arrow", + "hotspot_x": 40.0, + "hotspot_y": 40.0, + "size_width": 170.0, + "size_height": 230.0, + "filename": "arrow.png" + }, + { + "name": "ibeam", + "hotspot_x": 40.0, + "hotspot_y": 90.0, + "size_width": 90.0, + "size_height": 180.0, + "filename": "ibeam.png" + }, + { + "name": "pointing_hand", + "hotspot_x": 26.0, + "hotspot_y": 16.0, + "size_width": 64.0, + "size_height": 64.0, + "filename": "pointing_hand.png" + }, + { + "name": "closed_hand", + "hotspot_x": 32.0, + "hotspot_y": 32.0, + "size_width": 64.0, + "size_height": 64.0, + "filename": "closed_hand.png" + }, + { + "name": "open_hand", + "hotspot_x": 32.0, + "hotspot_y": 32.0, + "size_width": 64.0, + "size_height": 64.0, + "filename": "open_hand.png" + }, + { + "name": "crosshair", + "hotspot_x": 22.0, + "hotspot_y": 22.0, + "size_width": 48.0, + "size_height": 48.0, + "filename": "crosshair.png" + }, + { + "name": "disappearing_item", + "hotspot_x": 10.0, + "hotspot_y": 10.0, + "size_width": 56.0, + "size_height": 80.0, + "filename": "disappearing_item.png" + }, + { + "name": "operation_not_allowed", + "hotspot_x": 10.0, + "hotspot_y": 10.0, + "size_width": 56.0, + "size_height": 80.0, + "filename": "operation_not_allowed.png" + }, + { + "name": "drag_link", + "hotspot_x": 22.0, + "hotspot_y": 6.0, + "size_width": 32.0, + "size_height": 42.0, + "filename": "drag_link.png" + }, + { + "name": "drag_copy", + "hotspot_x": 10.0, + "hotspot_y": 10.0, + "size_width": 56.0, + "size_height": 80.0, + "filename": "drag_copy.png" + }, + { + "name": "context_menu", + "hotspot_x": 10.0, + "hotspot_y": 10.0, + "size_width": 56.0, + "size_height": 80.0, + "filename": "context_menu.png" + }, + { + "name": "resize_up_down", + "hotspot_x": 24.0, + "hotspot_y": 24.0, + "size_width": 48.0, + "size_height": 48.0, + "filename": "resize_up_down.png" + }, + { + "name": "resize_left_right", + "hotspot_x": 24.0, + "hotspot_y": 24.0, + "size_width": 48.0, + "size_height": 48.0, + "filename": "resize_left_right.png" + }, + { + "name": "resize_up", + "hotspot_x": 24.0, + "hotspot_y": 24.0, + "size_width": 48.0, + "size_height": 48.0, + "filename": "resize_up.png" + }, + { + "name": "resize_down", + "hotspot_x": 24.0, + "hotspot_y": 24.0, + "size_width": 48.0, + "size_height": 48.0, + "filename": "resize_down.png" + }, + { + "name": "resize_left", + "hotspot_x": 24.0, + "hotspot_y": 24.0, + "size_width": 48.0, + "size_height": 48.0, + "filename": "resize_left.png" + }, + { + "name": "resize_right", + "hotspot_x": 24.0, + "hotspot_y": 24.0, + "size_width": 48.0, + "size_height": 48.0, + "filename": "resize_right.png" + }, + { + "name": "ibeam_vertical", + "hotspot_x": 14.0, + "hotspot_y": 8.0, + "size_width": 36.0, + "size_height": 32.0, + "filename": "ibeam_vertical.png" + } + ], + "extracted_at": "2025-07-30T06:32:49.130878+00:00" +} \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/disappearing_item.png b/crates/cursor-info/assets/mac-old/disappearing_item.png new file mode 100644 index 0000000000000000000000000000000000000000..c29668cae34a1b4de7d0ee0fe5e49b0ce23d29b0 GIT binary patch literal 4153 zcmYLN3se(#x}V7d2(N(1Vnq!Cf{#kLVhKn};u9&X(b`?DVu+8`c7YqNT9Y6!6VM{3 zDipQAjRITO>OE}@uE&59$RJUxpt!a|Y>@DfHwHp@1tv51KcTwk3@|zQ=KFt--}n1{ zL;m({aUQM2ZNYF0py7Zkr~{bzFcEk>^h{`|X#7E)$D z_e<0DqX`FZrWrMVTwk6o`|cBU*_wzzv+YFH-!p#5i%EH@9z*;ukwzDSsqrvKFwIkP z$!Fqli;i=tZ`n<+077b@Xcf}sixulv>9t&Nla zBqG1BImzP2SIL!(5;EGW`H)cy6@>?2k=!%?q%8<1BfR(*g5!(+DSp9bTj90m!-HwwnTxznNwPNOqHyhj4$oqDUq53%@Z>;1KGO-+rq5nQTl(^QtJ>bpVz`+&%gb!wy?JphL2In3HL8&2smx|xoZd5>?g}c|8YK5NY)M+0 z-`Cd+tmU~pIX!IOJv}h3skH&qsmx=WhM~DER_BmHWbz2|(7&$J|LDMrW$pIYCj08T zzLRx*s-OeTb6E^|;m)(a3hX=EM?Fl13B_R+^9W&|F%xoe6qInWbK43 zyHA$A@qNCYD@jl3tVY_%COX(_R8QqQD67`J#%G{yQ?t*T5;0-7z`0)cZ>sI1L4vWM zro$1$op!2WX}a#1y6&OC15WdW=yX9`kEtW8y)SEeQc9i(%#qIgAf2fZQ9-XZ`aFk@ zoxb}$9F)#TqJ=?6lx{*M!zG-w+`w05{gRjIVgi*!gX?B~)Xg*tdJo3-9zmB?(iRr- zRWRLS0U9J>8|ahDHv+#)$ms%GNkQi--PkI4x`=Bl65!y7H|5X?WtN2HEN8X;5t6vDiLY?Cfp9Y$$pRiV2*878~JKa17jP^GZL%I2D)R--Psl@Qv|N|t7b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Cursor + Scalable macOS cursor: disappearing_item (hotspot: 10.0, 10.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/drag_copy.png b/crates/cursor-info/assets/mac-old/drag_copy.png new file mode 100644 index 0000000000000000000000000000000000000000..916a0f7550f8508bed659ae5494119db998efc5a GIT binary patch literal 3936 zcmYjU3sh5A*1k8n1OfyQ<%bgFAsAa3NCYNeK@!yRD9;YA`a+0;P=*BXF%aaD8xfTX zl_4X7NMr=jf4T~BKm>_!QKUt{w4i_l2#SJ;CWL^zLh_$zr~j+v_IqD$BE#>izi?-u+=+wN1NtV|b6<3*l$JcDrMR6ehFe-%#N9y3b7YIzvb!aJ`2lvX zgm4`^#%W#^L#tv;k;cYJL!+aw4~+qt&um-FY`gJ~I9l7g<{G%N5 zr=}zT&CT`X;$08j>j2P}`^x~jm~~?JJLr=YE~m9j-iHKUC%N?n`S^6-=CQR=*_uo1 zRA%c`x#JQ2PgcyBsr6U;8EcVavm{wj@MTw}T%nPtC;@a-wqc$3Co5ud#~JO{G}G7S z{8Q%rqwbx|U*uj~xV67NQN(yb9Nx@jO-Kc_bwTKt7^$j_LdZ6@_T? zKcRrFaXOSv@gEiHCkpl1KTtl1HmtbljFXcCF(`1SIdA1A?=iVeNv>~elVsi>%)Gyl zo->u6v+ECgO}1)HQdS#Nx=l6Xrf%iE+;4QK!GqE#AZ&}PzxIS+%n62md)sfiu+KU& z<{W$C-8FZ{bOGbEO?bCX%xpSB*uX@WE(W}ojc1QdWiNe5(WY%Wow8DsveFW+Q`$wk z{#WQkUh{R>F%^lzxk3qiBc>i=K+`I3shzWbIhSQ11D-^kT33E-Tahp(V|^zR(9I&8 zb&*dwj3-&4jx5t5{0IIkhUFz*-o@q8i!Yqp=A7ZBV(M}+Lk*62bqz}6XS0aL%;R~G zl1;MWgXI(qT&8Qek1xE5WGqB3pQbM1Am6DIzEkPGtM!c4E$9hsJIiz*Zas_1gkZ#; z$;7Rv9sdg22if1LyiGEFc`R$cu!~+S>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Clzh&Go#D@7Tfc*CX2I7swQ^O zfe1+fxlzAg$nMXG_CTnm%@5GM=>_S}S-Wa(I{;l9x;zpEbb56mi5_=lswB}((Bsq} zM*(&W6(zDo4!XguckYAI6+@dJ`0&6Me8ifz(Kjb6tGoK>k@Av!4qK22#4WVjslOrQ z0HrY_xiK;EfVH#%gfq0egYF_I2^ww)0k_}8j^S%ts$)MPV=MJ4pAd46=dFJB)Et5d z9Ts$uN@akNd<5L&NcYZI{i8WB-cdv- zxt#O2g`_fyI|w02sNOir^ANh=EF0vdD8m-G2CR*{(&OZQ>`G5Z;#CRC&Z!-uz2J=^ z;#DLWN*>EtTnB*g{i(InIayDRcZKvZ>p)D*+MroL&gc)XNThV;uA_Oe|T`g zABFJ*b6SxTXJs{OZoWZWH)4MGyGSEp@Gu%kmJW4-*nvEbEl&%N_F54t1J213+jbxK zOf^mYpC$tvTvDa-x}W%st|omZ(zDSI!{6lhBU`$IA2|;Up5Obu{tQ7FWZw991Ogd@ zM|b<~P+0S*+Um7X%@?FAf=IpOHC0ji1drhA3YP}kXnLUL0rV^VBq99jXCbmvQpxDEz z>wfAP!28e+5k%*29JdnT+4zGPt`y!FfsTIBHBQ!m~AR?2yepQOoK=uK5uTR zXFdzWP(Gmmv-Uz<;c|>3f+m^zd+eJw@rhP^3lU<%-!*RLg)7nNO#t6)U!LcAANvZ@ zyTvr^LATTN<8^GT*I}V+A_p+*eXui&WDJ@!`{oDg83)Z8Vqg}58t$pYZ3N7^ff;qU z5(X@>t`sGH+>fPsZ>BxgVF4p%C<@^WgpoL+6U&~D=-NiRmyB~wJJF_{K3h)Y!6)*T uFXk<^6+YH-_GnV7K7HWcQp-9Sxb-u*B(&$>6X44k3i>K+ckNEr>Hh + + macOS drag_copy Cursor + Scalable macOS cursor: drag_copy (hotspot: 10.0, 10.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/drag_link.png b/crates/cursor-info/assets/mac-old/drag_link.png new file mode 100644 index 0000000000000000000000000000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WWS2#<%TxxN=Y~LC zXx-x|sWw}teIUl^tcu8nhliJOjjjSO?5Gs4>o)sRvtC`82_zSeSuC+Q8455|MON5+ z4zOjq5}9D_0cv`HLIvDiuFdzFU5r8(BR@*jt?5-1KT&jtA=%I)$3sgEg!xLpsDd4v z|AV3uvs7i4Rvo*Oq#mQ0$CC9tfu1J=m7o&NAu0j9T3$-bFUciV9mh)M-~K4u=W9A) zu5f+yaRB_mP%H)mc%~kisfP>*GZ6btxmzya3ue(V z(oP1vj%#FbbSxHFj(L9_P1zrF$1vCz^oVD`b~ZFp3srK1Zm}h-a6me9M0)8GY85Y+4cMkH0Pk{b_#lm*x$qfaWXvlgwsw2@EPmX z`RBJ}Rb0`$6nEOqyL5D430Vxd zmP6hq5pdx{xR_1cUJqw4WJX3*_u9MSsRAZZtLac}2!3%oeQS$r0DlDO>Rp=(u$=GL k?64MWz&|>JYJf(F=tORPTNWh5e^MafVA6q>{fvwM2T7m4{Qv*} literal 0 HcmV?d00001 diff --git a/crates/cursor-info/assets/mac-old/drag_link.svg b/crates/cursor-info/assets/mac-old/drag_link.svg new file mode 100644 index 00000000000..e10c1f7326c --- /dev/null +++ b/crates/cursor-info/assets/mac-old/drag_link.svg @@ -0,0 +1,9 @@ + + + macOS drag_link Cursor + Scalable macOS cursor: drag_link (hotspot: 22.0, 6.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/ibeam.png b/crates/cursor-info/assets/mac-old/ibeam.png new file mode 100644 index 0000000000000000000000000000000000000000..778d3d2231407b140f914a686198e2e47f0425b6 GIT binary patch literal 6946 zcmd5>dsI_*){Q*GN)aE`baW&>aF|vlZT%`*g3&5N)vwZrU0NTB)@hjzA}UoA2)PKQ zV5y=gvRahP=u(_Im|8m`8i)u8f|#*tLBS-1M+A|)fFy8p?|07cqODG6t@&%#$J%NP z$$k9J`R%j!zI)zT5fw0U;z%Bk7qIlLCGWw%Yv9ihBZkA@FLZ=kdAy08OP4HKDI50a zviDztKRkTZ#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r;W*CM(^|;p)khqR(hz8*3daG})-_V>jbVjqi(Qb4v zu++-kSZAa7%_UZEvDF({&8#E_ez(9ijM&!eZH6wCnJ#qZJPD*Rd1RR|cOtt~TTO^# z;IXR&vkvs6v~WY)yy?Z^$QSzt|M3$cEW)37`Pfk+>>}|RgOi5XURn^{jc9Q~viCKcdvx2&x zewx6J88vE@t5!`fD}&@HXL(+zO;z=Do^=y8Kc1lm?bUWDvE&6{kB0R;h>0o!G$U{j zU;;{v@vOY%%<-q=H*qbN$#KRqa7Ke_4-=rsKBD3KF`cnIZ^h_POpjDsN2)JpJ-{T$ zmCeq>@U#YpkwfszC2Y>;fa?)@>w@#Pny&rAKo^*I%pz;(USEQ(_K6UC|TsID;eUZPJj~4I8{A_5h&x zfCB>e0YQtjg`~Qjo5Yao^&^`CX?!x2LD?p%Z4=imvJPcZpa%#+I~6*>s>BljJcxS? zlZ&xlTa=_T7oc}U7#tBQP%ol%_7B{#M3c(BIf>^m7?FCFEy;Q_U<^*;GRq*qwQGR9 zNUEG3WXp8QRe&MaF=^<#n={RJZoZN9`v&zrlHtH{PAHIzIRGua-Xy*WEVd8og&Ca_2#};b literal 0 HcmV?d00001 diff --git a/crates/cursor-info/assets/mac-old/ibeam.svg b/crates/cursor-info/assets/mac-old/ibeam.svg new file mode 100644 index 00000000000..835ca50f73e --- /dev/null +++ b/crates/cursor-info/assets/mac-old/ibeam.svg @@ -0,0 +1,9 @@ + + + macOS ibeam Cursor + Scalable macOS cursor: ibeam (hotspot: 40.0, 90.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/ibeam_vertical.png b/crates/cursor-info/assets/mac-old/ibeam_vertical.png new file mode 100644 index 0000000000000000000000000000000000000000..4009f316a2701b0b9fdcc4cf23d2e229defe522d GIT binary patch literal 1564 zcmbtUc~BE)6kkM%2u>7Rt#xRqgkhA@pm;X1Q3s2G0!p1Sf)c!jsUfa{5CXZZZP953 z3lxtuiFFEUEu?B;`ym9KsfS0zZr>tk1&T?NqbqM8yiqo1T3OVW)U1m&KYdzc}l=fQ)U*%h1F zX_{DT+{*_Ed7GA@{P%ICS_*-%R;fO@`iR}aNCC9wyDY+6hoc5_%C%aIa4sIER(pdlib%;0nRf7ryr2%$fvIm zP*FP-EpgtGxNk`UoY(N~FrqbDZ;M8-C^nXH#==3Qg6gV}7YQM@(4o=kK5Y%M{!y~+ zjk|6#L7i_ngfAYL*1K!1vJhx9CrzT z!C~?@%=3;#Qe6!hCmIb;OE`~8EM0n}OItX4!B_g0u=1EN#U|3D4M~Av=Tj3bpYuIx zewR@066P62EL$r9Y31~8<}QPV3N(Z9lvhik_L$(?W$^tnI9MQc|0cCD}zv5&1cY&VWaRE8=|A8sBy5FG2wJVoS?QC%S)-} zCDKFklw(eGBcZyHvvW@R93JFx3eU!bw7H#E@UDya5nn+Ytq)hZToRO>>8_?`^A)o1GV*ISBPs?x5s*Xv;e*1V7G{+dyKd_;sT*nZLjy%JAo|TO@zA>3ZsBa+N7Gf8wFU>_fi?aiR92obd1QhxP0(#La zp82!*1KY)t1Mp=f<-17ANFaidWSw*>LE1i-Ws0XSg^N>lG(;TQE?^RGO*XAmY$;`U z7l3dB2z#m4WmGHEH!u&Pv-x_CDm)CcqUThY5#Y>bc@KWz^ujthlRDZ(dPT3 zrFk$6uW+T@g&>xG ezef+K^Tw-oFFhK4)QD|;fVL|+u5M@6*Z% + + macOS ibeam_vertical Cursor + Scalable macOS cursor: ibeam_vertical (hotspot: 14.0, 8.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/open_hand.png b/crates/cursor-info/assets/mac-old/open_hand.png new file mode 100644 index 0000000000000000000000000000000000000000..35642a8757e32efafca97e484e276bd10fdf164f GIT binary patch literal 2236 zcmaJ@dr(tX8oxI;B;lE=TOWud3dkxfu(}9JNR|0GvGxX`zH1{seocgJCgh)5 zh@xJC`#CPE`imu_dMEM_NdSVOK=EapvT8Od4x#Q|+@bm)el@lOO@Uv@J-#Bmz}8UX zF=Pr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${+h&P19<8I#Buq5IP+M-9v~RG7(Af%ml{V z$2A z8(>k^^_jN1L0r=|ZV8{yFPSy~L8NHTtYN2-@fZP)ko6SdN~~OBZI+nm_5u2gt>A69 zFpw_79(QzYGZ45zQ4pyUmY0{OWn_?yWim^d&B4FC<61Kyq8|Ycz!r0qt$W!%aS8Gm z?%un2{cGMYW)WeYx~;a{&a14d@(DWnQ|G)giH_*?K~ySr>_5*w0ld7t>f~}oM+Ybo z&Q;wm6S)-l8Oi7x1RTK3-x?WDIFQ@l(0fRgXu@AOfw_l`RZ96SQjPGavc9dY&#pCX zkBEpEt2OW)0&W?twI3Gha)sT9loSW(fd#lr&gc*YLa8Xr=!W(*%6k_|B8?FH>XN8V zIBgfU4jRT9x#V}vYhbc$M3u2Ynxp~z= zP|IF9!A=6UqT!itrBFvhXtL80(gFyTBOW2p@^BzW?8CH33NeL0hvT$^3CyHXHYSri z + + macOS open_hand Cursor + Scalable macOS cursor: open_hand (hotspot: 32.0, 32.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/operation_not_allowed.png b/crates/cursor-info/assets/mac-old/operation_not_allowed.png new file mode 100644 index 0000000000000000000000000000000000000000..0cb6dc2845f25c828823ffc12c3687684ded3ca7 GIT binary patch literal 5087 zcmZu#2~<;8x4t(C2~!AzE)bQVpjN3QzgB`WB&}McSfg#vC2Aj3`We{SsRdvC2SE+MRSa`ry^ z>~Gj9-MlG@?j7n4K@dH8!@Bpt-&pXw*^>%hH!f&c3PC{^lGnZYfdn2$$u*H5p1xzk za}CFS>A1KzWoK=6U&Eiz?xR(w->Iuwv2vlowy*KO@-Gy}W&U0_DVuu=@AGtdG|+p6 zXhSC+_CY$^q+*^LUR3KJ?#ewkiFv)oo4~x-xOq#S%X_oDYM7t4!<7*sNrx$Ha*V{a zES!g_4@(yJ4SAFwgyDv~HzP~&5B=4D{#9Dnwd&W0}Eku#L29Ey8 ztG700>AjVu!|F7XPrO1Rr&Qvr{nelJwLmA>;b;u2G`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n@lTqm~40`W5BuO9g zhG$o9&*@y%(|RYf<<61p?Ceen0whG$sy~4qGd{JZoq%@{{N_ z^h@At3cDJmeT~xRM^x4$nhx@Yg)5zIAiK7yrnUj;0^BW|Jem=&|Ft4|`_s$UPM=)D zPtVaG<0M)MTb-_7MLdpA(}zAy|7KVZWY}nQ5&9@<66=|$<&W`Z*GQ7O;3_sXze$}n4SVOucvOMa^|sEGy!A!r^1 zyg6Z9*GHg0C%i($nVm#-QwIs9YB3XDP_%l_v-S(blp(teFtj^^YXI|9v62`41A%3%m?5j#Zt3ivqGe_*;A#z zr%EmNTl?=PSavW9dRGCP>@4lhSOPIW z`^gvmIavLOy_~ZFMdXBt$5N(|cZKAwP(l~%;aLm#K7tLUXgy=W$0CGYfCmX*TX(?P z7zAbu#M^@UR+4js)DFb^176w=A!)IY{m}Pk57MtqWJv + + macOS operation_not_allowed Cursor + Scalable macOS cursor: operation_not_allowed (hotspot: 10.0, 10.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/pointing_hand.png b/crates/cursor-info/assets/mac-old/pointing_hand.png new file mode 100644 index 0000000000000000000000000000000000000000..63cb5328a2aba3119f9c4d53b661bb9d36976036 GIT binary patch literal 2122 zcmZ`*3s6((6}~qK2@wRMuBbeMJW6$yL{ZF|EWxg9WUZ!EcW_mbxa{iK6~fDqK*&vG zM_`r21r=Q?&~bIORdKr&qEd2Us8Ni>)>X6tb9swGE+Ie??oDnJ+nLUErZfL*&YAx^ z|9Q-J{;J>X6f9h@VgUdE3p2KD-R0ZU{4s6fic!b!r znlSvhs<6La zsE!u_cJWDsUkQ?_!OPg@xkJ4Ae;c{? z)*dHfYT`3$HfJ=)R-v9(=!pBrpTaj52I(rD-l-||&Y#;y4MzLd~c<8nm zyDeTDo4Pqx75*BuGyRX%fUcm7$yU|dR(VsM;zAt*PK2ftjS&WWgyU{Ac2{Y3Ds{k@ zqva~x2=P>7#VUbecE8~=(>uV_nw0s-kQ%M3Gyv_(IRTXr|2QG1U)MO`TF4#_ty8G$ zO0LzBn$S{Pv1hio@X^}VW$#|5x9<0$B-cLpB+GJoYgCH@({L;d z$LR6| z+EJ`sIbl?-0fh3-#U|)&@_sIw`%;{O zwqv;s7IyFiiWV9?p0b{cT%$*;)#`l;c`k-wyr&F8MImI=Um!Y-)icc^3RFHTr)Y2P zYOVNV>nXph;pUN{RNIiezqc&Q<~+!pJJ>d|zdgZ;4GXaAZ;-)j-CmcJKhPOqD=sSP@_JL9Tn-085cQbM zlGD2K2&o68pZEK8kD^s$YD*5(&(T&$oib_NpPqdKRmC4I}6(2HGJ?zh*8Kz8-oq({%)HvU7^<=hu?(T9V)!#3@w>y};VY}Ju@7zey13XLvXE+{&Z+5af0^1BaY(j+h7jI+u6-HBs%M#HpH7pM zei%PdeS6s4&=2XHa@~QXIv_GC>L3=T57h@=2OZ4vZb(ZB(cA;cFWNmvgr)zSHMmY1 zw%s_pYXR_f_Pcj9(;A4wpnn+P$YIzEIF&nIY zpL8`X?{Ab1F}?uM>|()zl?}CbI(doq-HoKFzlsRFCPsc<+PA*Y_eTIS N(sypX`76ose*we$Uz`8{ literal 0 HcmV?d00001 diff --git a/crates/cursor-info/assets/mac-old/pointing_hand.svg b/crates/cursor-info/assets/mac-old/pointing_hand.svg new file mode 100644 index 00000000000..3ceaa90715a --- /dev/null +++ b/crates/cursor-info/assets/mac-old/pointing_hand.svg @@ -0,0 +1,9 @@ + + + macOS pointing_hand Cursor + Scalable macOS cursor: pointing_hand (hotspot: 26.0, 16.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_down.png b/crates/cursor-info/assets/mac-old/resize_down.png new file mode 100644 index 0000000000000000000000000000000000000000..566b7f6ebe73e951ead5e8db02fa0f67e924b578 GIT binary patch literal 1644 zcmZ`)dr%Wc7~i|g<4Ax2nu3W4RSF&Hm`t%kAv9@A1+)XU)k3E{Zpu`&1j7hQ5-_>w zD7F@SbPBfEkWs5RTB3D^&!yc2*i}|LGv9qT|3+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literal 0 HcmV?d00001 diff --git a/crates/cursor-info/assets/mac-old/resize_down.svg b/crates/cursor-info/assets/mac-old/resize_down.svg new file mode 100644 index 00000000000..7c701a46183 --- /dev/null +++ b/crates/cursor-info/assets/mac-old/resize_down.svg @@ -0,0 +1,9 @@ + + + macOS resize_down Cursor + Scalable macOS cursor: resize_down (hotspot: 24.0, 24.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_left.png b/crates/cursor-info/assets/mac-old/resize_left.png new file mode 100644 index 0000000000000000000000000000000000000000..bb2d2fd3e5f5af901ff52a3e30df65dd7b8db7b9 GIT binary patch literal 1527 zcmXYx3rtgI6vywqZ4nBThf~A?t%Aa=2`I`-A{Qgig_k2k@zG8u$V3b3q_RP8K>{c+ z2O>CJL7A{6%416a1-Tc3xL~&uh&+aHYmtHhEU(#nY3bbsOn%?@o#gxHeCOml=M+Ro zhFG$MxEqe)#EE)A&*H0TQikQ)rLt&!F)7_vMMGfD&s)Uk}(2401w5{X3F)6FdQ)-ufMMy)#0Dg;s>7v*8LCAYgZn%!273pxOksqe zpB}P_MmWdY$x4(QH7Jw@g_UAz$-WU(5aldBY|z`ZPcuKO-sFX^Ji%8Sv(&Cx>O)C? zo=|Q%iQT8-neN*`*0ijsMXGO+*75XBJbi74_K^Id`LtyBD6q}P&rcm-)@kkv!(fJJ z;`I3B>G9P(DUpXZ55`|=oAYuKF{a6ep!w_q0lSaE)sk{8IgaZxaov_jcO?C#^6nYb zII{#?sfN@jr)(ELm4j&0>ACdw#yeFu_x5_N*KQrwd-B>zL`Q(o6qdO{etJ>Gh4Yo@8LGf~p$+)b^I><07H0~15n~1Sob2|xt zw4Gn#!Ngl zmT+DJNEhs+o!pMM+{^f#& zb<8Fm{+JN(u^c?JxJy`q8|QG%vzht{S@`F8d^kB+Q&Uqw`7xD=e3{8(grR~`d8x{{ z%-3KJ79LJy^VNVOk-H)ZFV>D|oxQfSHn#GGBG0*F15}S)PC0dp%0&rD;Fc=4kaDT0JZ>QvgfCyk7I9bpi79EVDU_ zpc`YVHu)KIuZ%9TGU+`K+#KhS_JZjEas!ML0mdZ^nqJE`C;`Tp6@u-J&|M4)73C!T zJ3Oq);&QnL*9VIaJ^9rj<2Ghmh%sYDl}UbU{}_rPq^@SMA))>}A~SK}i#U&o@*)^A zQJ_|8Jd$oIR;oqo)>fxhjt^&V>si(;qyy3+9n^-|o;QrfkS(5ZE*_9T#H*lF_n5eO zFcmljaAXJj2->YSsT#Z>suFyKIZU^nrGwhhxaqNsx$Zj(1|0k7nPhSmP7Q*b8%+i= zpb&;MIA=lYT5nnnu-srk&1RS#s0J-V>piGz`P4Qw8(fE>Vbd&Wa|n9WQkM+Q)?fd4 V4((0 literal 0 HcmV?d00001 diff --git a/crates/cursor-info/assets/mac-old/resize_left.svg b/crates/cursor-info/assets/mac-old/resize_left.svg new file mode 100644 index 00000000000..bf1ae2637ae --- /dev/null +++ b/crates/cursor-info/assets/mac-old/resize_left.svg @@ -0,0 +1,9 @@ + + + macOS resize_left Cursor + Scalable macOS cursor: resize_left (hotspot: 24.0, 24.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_left_right.png b/crates/cursor-info/assets/mac-old/resize_left_right.png new file mode 100644 index 0000000000000000000000000000000000000000..279958c19bbf89faba494b3ab3ad294589cb1e78 GIT binary patch literal 2451 zcmYjTdsGu=7M~YMc!U7165dttiIsG*f|fv9A4qAT+w~MH2-(dlDo6s_5B)G zSX~usMY=r|yA=avd8m*Xd_WawWUZhFWJVBz1`?78A;~1O1MMGs&Yf?*neY4V{qDWL z`#blG4^k4j9)TVJ0C1DGZ~2gU3+5jViy6}(+vfn_zAI_V+dJgo6b{!!e0;XkL>C$= ze(9+#NS0hXIN1D$?Ek9z?7QmfKSwV!*gkDJP<;9Gw{jk-%~;SG`so$QxNS@svxdI; z7aLJ=U+I;93|J8G&@o1A*0(9g7m?5^5$NHAw%!s!+y_*Zic59&WWJo5n2JQc>t$V-OXs|Ds;~J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(A zLRTnf>M-BH>_0kiq<4Tin?T)8ppwZrnQtu6FM@j*$Xx(o?oODEZzVIyYRsj_To=+x zn$jGdwZf_WH!DjgCAN!%EhO*8ixr_H5KCq?^Ma?}iy4-OW0tqD+uw&d_f?z!S(|aB zi8&^v92o7u+zg-rUI(!8zcOl~{jHd;frQp3V-&5J#eUG9Y;RR={KSEC>%3 zbiYo`O6l3?Oh;3eLvOfg)YJlnuocju$+)io;tIso6=YF>;K97wS@aMt#Dz>L+?c5t zo~Y0;JUyNr+O?SFty)h1yj;fNleJ2FE&YsvW(BraDm4b+Pw{rfSw9)_6%%C3GI@tr zgaAqw^I~~J@KF1%x;*90mXe$5xf8~@6NK)|aB*++#f^tpfGLhea;E1q=W-2V&Ozl^ zak~a?^=$QzWlzG%V#H6N4Ljris|X4g<08o2tFFmuWk`-Tr%T&sLR8_I>vPD7WXeFRd~Yj zWbgHi6G1^iMpg#&(R|Xv#bL2XKaNC*Gh^381;Xy{p&-1d9$A71SD_o}pTStb8(m({ zZ1LC$FB0Qa_m#E@uL$OLa6caS81WEHzgK>@?C#$?EN=jb_;Lp7@S=qnXRhDj`lM$u zS0Di0IaM&MJv?}@#dL(vM;F&4XK^6nB*P;A`rfS0zP3*UK`b%QPjxdRON^|*GydlK zR5QAfGh;_8O3BVhWDgS~gQ%K53i<;S16jVNBei^LDrjN5eo{ XL)d`^sq|x}*#eTbrfj+Pj=1c9Yv;st literal 0 HcmV?d00001 diff --git a/crates/cursor-info/assets/mac-old/resize_left_right.svg b/crates/cursor-info/assets/mac-old/resize_left_right.svg new file mode 100644 index 00000000000..5982ebf013e --- /dev/null +++ b/crates/cursor-info/assets/mac-old/resize_left_right.svg @@ -0,0 +1,9 @@ + + + macOS resize_left_right Cursor + Scalable macOS cursor: resize_left_right (hotspot: 24.0, 24.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_right.png b/crates/cursor-info/assets/mac-old/resize_right.png new file mode 100644 index 0000000000000000000000000000000000000000..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kD;fhKxXpQ!0S-A06>!=8h&^% zu(flP$+$mOY2XUde+$S!VUH?o-Z?hxi(la0xF95lHwqM_e--Y-Rbu<*(nL@Pt{OOh z_p8`jwhvM0J<@jzjGU3feEk=vZWFZtaVuqXd=%oNyl^t@L&xWr8G7D&l=ohl(Y?tl z#!KJ4-E9=MLkbdlo6|rnHj-WHui<;CW~Jpq`ljukqlgGcP|xM0Q`79r&XE2+Pfje* zK#{4Xq + + macOS resize_right Cursor + Scalable macOS cursor: resize_right (hotspot: 24.0, 24.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_up.png b/crates/cursor-info/assets/mac-old/resize_up.png new file mode 100644 index 0000000000000000000000000000000000000000..f0cf99e2499b2abfbb469fdafc4207bf3313857f GIT binary patch literal 1507 zcmZXUdsLEV9LL`aDyS&A3{AJ;rL{#V-LQ)j+Nsps)b2Jt$SQ3XN~tG7ix=vYbt>%C zDK8arwrTB>+HqwrgSV;J40X-3%+R1ru}BcngnE77y=?nyJLmh{f6wpvJiq61GBr7# z?mgEV004So!rDz_$#EyDCz)@DT%`cu@k8R;HCrU$7z(Q+cU;uji6ZNn`}(W-NxSND z4Y&SP&S}-f4fU!eOT(?MgH3yjYfD$}`?G#R8*+gdyoTA<4FK3J@t*1M9^$}=mgt4RblPr&GhodvIHYp0&5EXA_Wg%Y!6}(i?3lF3;168xN(>_ zKEty);%rMr?=Y96)JV)22^g(n&m|UnjP|Og9AEr=#2ScK#^P{KtYNyh*Q>_MrAq2rX5PgW|S;(dh&thal zF_QlB!#kn`Ew_oPdRLWgd>SF95zkOC;;h`&v<5TKsA_mlnWQa3@X8-I`O7Bsl}qQ7 zAo!8KlDmCFf7B!amt&>pj98cPMUCK9&23BFoo>yOAMZXf3=~_g6TnY$H;*L@&!tdO z747txf${r1=TV;XdoP~zUJN#7#23{&R@Jv2^I=NVy;oBlBx-sK8HW`q($39!$j$8~ zH=BO3Y2K;)7Ak0NUkuDbVnL4g<|hwKvb7Uz-nfZ$cD#d!+gospHjWvUVQRjzx=7iF z%=DRQDH6yZakh%_;Y@t^!-4+(X1@wBkjnqt6P1yw=-26VmDPl+n$R#2I}>r9uf}!@ zY*T`=#yvd~M+Qo4cU#C4h)R)7oR?OXODp3EeGjIe?#gc5jQV~o2khTONFLHiPnt)? zScmL&hsLorb82hmTjgr2sf!Fw|KMQOjkJceg_68e?MK>o-m_Yx#BZ|2y4RvJmh|9K!>6iU5@6MA{$`Qtw(XI!YM2o42jNH zM%5fzz8`oEG8K*J4pV4@&q4*5fXcywW76a;s`A_6a%i?12pm<=gb!(|;FzSgedj~_=jS*qlnXo< z&VSLb4;<;&!y=I=!^an;MhaDDIvoM2@(&(=xo}Pa4lkN>N{L)qWCBPEDR)6n5+BS) zxjlt%Cv%iar6eytJ{~K{6^X_N+|AltA!WVVe)(D~;!y#n$M)to?{3bR7>KlEk4Mak zOhBe$N7}^=9-&Z@ih0iwz#!kWiy6cbl6!QB#Ja}df2z?{@cRt8#Jy(#1Pfz(citdZ z{o=vAp0eiWObOSHEt=yaIN?X-yNv{E&D~dqGA&&o4Ea7D;RRhVXQ6y3f|yy)0^yOB z8>IrzfFQ+%@0y@GSP2)XC&C+Mf@7J9)g4+9v<;2g@81BCrVckaJq<2JJ?d5f+5Bfl zD;LiqJG@X2_dPgcUN-K~djG*M_4J58hUR(E>@W@~F+woEW literal 0 HcmV?d00001 diff --git a/crates/cursor-info/assets/mac-old/resize_up.svg b/crates/cursor-info/assets/mac-old/resize_up.svg new file mode 100644 index 00000000000..922096bea02 --- /dev/null +++ b/crates/cursor-info/assets/mac-old/resize_up.svg @@ -0,0 +1,9 @@ + + + macOS resize_up Cursor + Scalable macOS cursor: resize_up (hotspot: 24.0, 24.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_up_down.png b/crates/cursor-info/assets/mac-old/resize_up_down.png new file mode 100644 index 0000000000000000000000000000000000000000..4702206fd8b339795d6d4a734f9b3e1f3d67ac4d GIT binary patch literal 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3w{#ns4^W)=Zgv*#OUQH{uTVnH`jqj?*H+i~B3*f(IJfH;(zLii~KD>Fy``>$Ya zg1_f%l6ETS!{wnvstK2VQoo8d6Fb1(n?iy%HgJJ=Rl8N*J>rx;%!QOrpe&6y)LjwkF46f$biQ!B=Xk>f>BfnFq^GA>gJy%K8;xKm5D4N&cNUug z)gaPOU&fr*XU)?SQ&AaVbN&qpt3K9D?CYf}OEo&4x=I$DKoR-%zY_ ztSf&^x?v-xm)kCHRSBCH28A!t=akKr19o38c1vZZWGW=a(8i2(Q!^E+(68Z z)UW|+Dn-VxN!Kb&s9`4(-1EfzRJd(2H_y38F}X+XNKsFwWP_}W2jlVw;_56v993@W z{BiAl1^rMlULcJ>>z7r7)h`l;(c$4Ep{ejnEEo_V5fDU#X(O5qN$4^xU;)fgsZ`cJ z=LM5fprZ$u%a!d1qGrNmxL<#!?P)Dt?gHX>I?7T0DC6a=TATh?LDR2svPLDfk>syo z?IBo8FxhGrvyQzL3wVV#5H3)sy(aF={W#jvVEg4I={KL57)jdrR&PW>Wws$%k=N_(-`+R4UGHrL$~u61z*%v$b^UYPet?jmL6J{@D-6y`R=b~;DID)99Oe=y8R{c- zZl9g;$x&N?Eua%s5rO46u+FH9>h*y7X<-rw9-jfdpHaWuz5A{QSmkpacyt=^=g6C} zYc^$H?zd}J7G6s5urF2?;rmD=gSQ4@3t@*sI%G0RknoHLb9guLc|w2&2 + + macOS resize_up_down Cursor + Scalable macOS cursor: resize_up_down (hotspot: 24.0, 24.0) + + + + + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/LICENSE b/crates/cursor-info/assets/mac/LICENSE deleted file mode 100644 index 555733cca4c..00000000000 --- a/crates/cursor-info/assets/mac/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - Open source macOS Cursors. - Copyright (C) 2024 Abdulkaiz Khatri - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - apple_cursor Copyright (C) 2024 Abdulkaiz Khatri - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/crates/cursor-info/assets/mac/X_cursor.svg b/crates/cursor-info/assets/mac/X_cursor.svg deleted file mode 100644 index d6ba70d46cb..00000000000 --- a/crates/cursor-info/assets/mac/X_cursor.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/all-scroll.svg b/crates/cursor-info/assets/mac/all-scroll.svg deleted file mode 100644 index b6750964b33..00000000000 --- a/crates/cursor-info/assets/mac/all-scroll.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/arrow.svg b/crates/cursor-info/assets/mac/arrow.svg new file mode 100644 index 00000000000..42ae068a3a2 --- /dev/null +++ b/crates/cursor-info/assets/mac/arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/bottom_left_corner.svg b/crates/cursor-info/assets/mac/bottom_left_corner.svg deleted file mode 100644 index a99d2ecdaca..00000000000 --- a/crates/cursor-info/assets/mac/bottom_left_corner.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/bottom_right_corner.svg b/crates/cursor-info/assets/mac/bottom_right_corner.svg deleted file mode 100644 index 3a83143e7bc..00000000000 --- a/crates/cursor-info/assets/mac/bottom_right_corner.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/bottom_tee.svg b/crates/cursor-info/assets/mac/bottom_tee.svg deleted file mode 100644 index 19f78d50a80..00000000000 --- a/crates/cursor-info/assets/mac/bottom_tee.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/center_ptr.svg b/crates/cursor-info/assets/mac/center_ptr.svg deleted file mode 100644 index b4e192caf20..00000000000 --- a/crates/cursor-info/assets/mac/center_ptr.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/closed_hand.svg b/crates/cursor-info/assets/mac/closed_hand.svg new file mode 100644 index 00000000000..e30f0c8c039 --- /dev/null +++ b/crates/cursor-info/assets/mac/closed_hand.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/context-menu.svg b/crates/cursor-info/assets/mac/context-menu.svg deleted file mode 100644 index 10b4b1098a9..00000000000 --- a/crates/cursor-info/assets/mac/context-menu.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/contextual_menu.svg b/crates/cursor-info/assets/mac/contextual_menu.svg new file mode 100644 index 00000000000..2d3e11929e4 --- /dev/null +++ b/crates/cursor-info/assets/mac/contextual_menu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/copy.svg b/crates/cursor-info/assets/mac/copy.svg deleted file mode 100644 index 5975a3aa58a..00000000000 --- a/crates/cursor-info/assets/mac/copy.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/cross.svg b/crates/cursor-info/assets/mac/cross.svg deleted file mode 100644 index 741be7511fe..00000000000 --- a/crates/cursor-info/assets/mac/cross.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/crossed_circle.svg b/crates/cursor-info/assets/mac/crossed_circle.svg deleted file mode 100644 index d2c1d2291e6..00000000000 --- a/crates/cursor-info/assets/mac/crossed_circle.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/crosshair.svg b/crates/cursor-info/assets/mac/crosshair.svg index 12777105ea1..5e78d1eecf5 100644 --- a/crates/cursor-info/assets/mac/crosshair.svg +++ b/crates/cursor-info/assets/mac/crosshair.svg @@ -1,71 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/dnd_no_drop.svg b/crates/cursor-info/assets/mac/dnd_no_drop.svg deleted file mode 100644 index c7d66401cd0..00000000000 --- a/crates/cursor-info/assets/mac/dnd_no_drop.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/dotbox.svg b/crates/cursor-info/assets/mac/dotbox.svg deleted file mode 100644 index f341dd550ae..00000000000 --- a/crates/cursor-info/assets/mac/dotbox.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/drag_copy.svg b/crates/cursor-info/assets/mac/drag_copy.svg new file mode 100644 index 00000000000..adf185db229 --- /dev/null +++ b/crates/cursor-info/assets/mac/drag_copy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/drag_link.svg b/crates/cursor-info/assets/mac/drag_link.svg new file mode 100644 index 00000000000..33d4604798b --- /dev/null +++ b/crates/cursor-info/assets/mac/drag_link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/hand1.svg b/crates/cursor-info/assets/mac/hand1.svg deleted file mode 100644 index 5a001f50a05..00000000000 --- a/crates/cursor-info/assets/mac/hand1.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/hand2.svg b/crates/cursor-info/assets/mac/hand2.svg deleted file mode 100644 index d85d31ac7b7..00000000000 --- a/crates/cursor-info/assets/mac/hand2.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/ibeam.svg b/crates/cursor-info/assets/mac/ibeam.svg new file mode 100644 index 00000000000..b7de00fe1a0 --- /dev/null +++ b/crates/cursor-info/assets/mac/ibeam.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/ibeam_vertical.svg b/crates/cursor-info/assets/mac/ibeam_vertical.svg new file mode 100644 index 00000000000..4d77ae9c0b5 --- /dev/null +++ b/crates/cursor-info/assets/mac/ibeam_vertical.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/left_ptr.svg b/crates/cursor-info/assets/mac/left_ptr.svg deleted file mode 100644 index 724753a350b..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-01.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-01.svg deleted file mode 100644 index 3735a2c79ef..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-01.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-02.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-02.svg deleted file mode 100644 index ea6b8fc997c..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-02.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-03.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-03.svg deleted file mode 100644 index 8243e8bd82d..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-03.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-04.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-04.svg deleted file mode 100644 index f585ee817ea..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-04.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-05.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-05.svg deleted file mode 100644 index 9f0ecdd99f6..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-05.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-06.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-06.svg deleted file mode 100644 index c0875b2514b..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-06.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-07.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-07.svg deleted file mode 100644 index 2371ad8ea8f..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-07.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-08.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-08.svg deleted file mode 100644 index f1193ab3fc3..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-08.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-09.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-09.svg deleted file mode 100644 index 802bab6a5bb..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-09.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-10.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-10.svg deleted file mode 100644 index 67e6504fe90..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-10.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-11.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-11.svg deleted file mode 100644 index 43a5f26a78e..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-11.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-12.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-12.svg deleted file mode 100644 index f882050989d..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-12.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-13.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-13.svg deleted file mode 100644 index 7516aeb038d..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-13.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-14.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-14.svg deleted file mode 100644 index 993bdf32c5d..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-14.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-15.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-15.svg deleted file mode 100644 index 8c9c1cd7065..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-15.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-16.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-16.svg deleted file mode 100644 index 850e7b4dda0..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-16.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-17.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-17.svg deleted file mode 100644 index 62c8c40caf2..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-17.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-18.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-18.svg deleted file mode 100644 index c4c150f0c78..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-18.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-19.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-19.svg deleted file mode 100644 index 3e69893760b..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-19.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-20.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-20.svg deleted file mode 100644 index 47a636e0e53..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-20.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-21.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-21.svg deleted file mode 100644 index 3cbaecde416..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-21.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-22.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-22.svg deleted file mode 100644 index b31e184abd6..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-22.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-23.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-23.svg deleted file mode 100644 index d495ac99f07..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-23.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-24.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-24.svg deleted file mode 100644 index 7577e62235e..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-24.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-25.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-25.svg deleted file mode 100644 index 9a538b02588..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-25.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-26.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-26.svg deleted file mode 100644 index 47960d88966..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-26.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-27.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-27.svg deleted file mode 100644 index 72641cfd342..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-27.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-28.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-28.svg deleted file mode 100644 index 2b5ecc0ca8d..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-28.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-29.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-29.svg deleted file mode 100644 index 8c724050899..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-29.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-30.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-30.svg deleted file mode 100644 index 1b4cce102e4..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-30.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-31.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-31.svg deleted file mode 100644 index 657d2d64c36..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-31.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-32.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-32.svg deleted file mode 100644 index 2cc08d07d7e..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-32.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-33.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-33.svg deleted file mode 100644 index dfa451342a1..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-33.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-34.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-34.svg deleted file mode 100644 index 9631e2f0d00..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-34.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-35.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-35.svg deleted file mode 100644 index 6d8f61105e1..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-35.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-36.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-36.svg deleted file mode 100644 index 1b5269ebf05..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-36.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-37.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-37.svg deleted file mode 100644 index bd369679af4..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-37.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-38.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-38.svg deleted file mode 100644 index f4039388a2c..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-38.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-39.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-39.svg deleted file mode 100644 index ede238ac34a..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-39.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-40.svg b/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-40.svg deleted file mode 100644 index 20b4042cc4e..00000000000 --- a/crates/cursor-info/assets/mac/left_ptr_watch/left_ptr_watch-40.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_side.svg b/crates/cursor-info/assets/mac/left_side.svg deleted file mode 100644 index 0f78f72f07a..00000000000 --- a/crates/cursor-info/assets/mac/left_side.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/left_tee.svg b/crates/cursor-info/assets/mac/left_tee.svg deleted file mode 100644 index f6e664857aa..00000000000 --- a/crates/cursor-info/assets/mac/left_tee.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/link.svg b/crates/cursor-info/assets/mac/link.svg deleted file mode 100644 index b78e94a3bbd..00000000000 --- a/crates/cursor-info/assets/mac/link.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/ll_angle.svg b/crates/cursor-info/assets/mac/ll_angle.svg deleted file mode 100644 index 03c12837283..00000000000 --- a/crates/cursor-info/assets/mac/ll_angle.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/lr_angle.svg b/crates/cursor-info/assets/mac/lr_angle.svg deleted file mode 100644 index 1e99adefd2f..00000000000 --- a/crates/cursor-info/assets/mac/lr_angle.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/move.svg b/crates/cursor-info/assets/mac/move.svg deleted file mode 100644 index ed97450c01f..00000000000 --- a/crates/cursor-info/assets/mac/move.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/open_hand.svg b/crates/cursor-info/assets/mac/open_hand.svg new file mode 100644 index 00000000000..9b4b6a096c0 --- /dev/null +++ b/crates/cursor-info/assets/mac/open_hand.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/operation_not_allowed.svg b/crates/cursor-info/assets/mac/operation_not_allowed.svg new file mode 100644 index 00000000000..65d0d2a3c31 --- /dev/null +++ b/crates/cursor-info/assets/mac/operation_not_allowed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/pencil.svg b/crates/cursor-info/assets/mac/pencil.svg deleted file mode 100644 index a1fc28f08cd..00000000000 --- a/crates/cursor-info/assets/mac/pencil.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/person.svg b/crates/cursor-info/assets/mac/person.svg deleted file mode 100644 index 972415051fd..00000000000 --- a/crates/cursor-info/assets/mac/person.svg +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/pin.svg b/crates/cursor-info/assets/mac/pin.svg deleted file mode 100644 index 696a4c189fa..00000000000 --- a/crates/cursor-info/assets/mac/pin.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/plus.svg b/crates/cursor-info/assets/mac/plus.svg deleted file mode 100644 index 481cbd569ab..00000000000 --- a/crates/cursor-info/assets/mac/plus.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/pointing_hand.svg b/crates/cursor-info/assets/mac/pointing_hand.svg new file mode 100644 index 00000000000..ef77a7d706e --- /dev/null +++ b/crates/cursor-info/assets/mac/pointing_hand.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/question_arrow.svg b/crates/cursor-info/assets/mac/question_arrow.svg deleted file mode 100644 index 1173a343186..00000000000 --- a/crates/cursor-info/assets/mac/question_arrow.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/resize_down.svg b/crates/cursor-info/assets/mac/resize_down.svg new file mode 100644 index 00000000000..794d7a672f1 --- /dev/null +++ b/crates/cursor-info/assets/mac/resize_down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/resize_left.svg b/crates/cursor-info/assets/mac/resize_left.svg new file mode 100644 index 00000000000..ee59c47d475 --- /dev/null +++ b/crates/cursor-info/assets/mac/resize_left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/resize_left_right.svg b/crates/cursor-info/assets/mac/resize_left_right.svg new file mode 100644 index 00000000000..fc280d40756 --- /dev/null +++ b/crates/cursor-info/assets/mac/resize_left_right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/resize_right.svg b/crates/cursor-info/assets/mac/resize_right.svg new file mode 100644 index 00000000000..f0fe6c64b34 --- /dev/null +++ b/crates/cursor-info/assets/mac/resize_right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/resize_up.svg b/crates/cursor-info/assets/mac/resize_up.svg new file mode 100644 index 00000000000..41bcc685b67 --- /dev/null +++ b/crates/cursor-info/assets/mac/resize_up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/resize_up_down.svg b/crates/cursor-info/assets/mac/resize_up_down.svg new file mode 100644 index 00000000000..09eccb1962e --- /dev/null +++ b/crates/cursor-info/assets/mac/resize_up_down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/cursor-info/assets/mac/right_ptr.svg b/crates/cursor-info/assets/mac/right_ptr.svg deleted file mode 100644 index ef178771933..00000000000 --- a/crates/cursor-info/assets/mac/right_ptr.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/right_tee.svg b/crates/cursor-info/assets/mac/right_tee.svg deleted file mode 100644 index 60535fcd6c5..00000000000 --- a/crates/cursor-info/assets/mac/right_tee.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/sb_down_arrow.svg b/crates/cursor-info/assets/mac/sb_down_arrow.svg deleted file mode 100644 index b097ed6971f..00000000000 --- a/crates/cursor-info/assets/mac/sb_down_arrow.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/sb_h_double_arrow.svg b/crates/cursor-info/assets/mac/sb_h_double_arrow.svg deleted file mode 100644 index b3b63142b46..00000000000 --- a/crates/cursor-info/assets/mac/sb_h_double_arrow.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/sb_left_arrow.svg b/crates/cursor-info/assets/mac/sb_left_arrow.svg deleted file mode 100644 index 2cc67bb0094..00000000000 --- a/crates/cursor-info/assets/mac/sb_left_arrow.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/sb_right_arrow.svg b/crates/cursor-info/assets/mac/sb_right_arrow.svg deleted file mode 100644 index 02a70cc3966..00000000000 --- a/crates/cursor-info/assets/mac/sb_right_arrow.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/sb_up_arrow.svg b/crates/cursor-info/assets/mac/sb_up_arrow.svg deleted file mode 100644 index e0222de2afb..00000000000 --- a/crates/cursor-info/assets/mac/sb_up_arrow.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/sb_v_double_arrow.svg b/crates/cursor-info/assets/mac/sb_v_double_arrow.svg deleted file mode 100644 index 8b92feb6478..00000000000 --- a/crates/cursor-info/assets/mac/sb_v_double_arrow.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/top_side.svg b/crates/cursor-info/assets/mac/top_side.svg deleted file mode 100644 index bba0188848a..00000000000 --- a/crates/cursor-info/assets/mac/top_side.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/top_tee.svg b/crates/cursor-info/assets/mac/top_tee.svg deleted file mode 100644 index 01570579b96..00000000000 --- a/crates/cursor-info/assets/mac/top_tee.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/ul_angle.svg b/crates/cursor-info/assets/mac/ul_angle.svg deleted file mode 100644 index da734dfb7f0..00000000000 --- a/crates/cursor-info/assets/mac/ul_angle.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/ur_angle.svg b/crates/cursor-info/assets/mac/ur_angle.svg deleted file mode 100644 index b7e64d8a74b..00000000000 --- a/crates/cursor-info/assets/mac/ur_angle.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/vertical-text.svg b/crates/cursor-info/assets/mac/vertical-text.svg deleted file mode 100644 index 6eaa5f87d3f..00000000000 --- a/crates/cursor-info/assets/mac/vertical-text.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-01.svg b/crates/cursor-info/assets/mac/wait/wait-01.svg deleted file mode 100644 index 1418259e410..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-01.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-02.svg b/crates/cursor-info/assets/mac/wait/wait-02.svg deleted file mode 100644 index 8be1a581889..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-02.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-03.svg b/crates/cursor-info/assets/mac/wait/wait-03.svg deleted file mode 100644 index 874491abb7f..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-03.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-04.svg b/crates/cursor-info/assets/mac/wait/wait-04.svg deleted file mode 100644 index 5550406127d..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-04.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-05.svg b/crates/cursor-info/assets/mac/wait/wait-05.svg deleted file mode 100644 index 584f53e85eb..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-05.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-06.svg b/crates/cursor-info/assets/mac/wait/wait-06.svg deleted file mode 100644 index 47d61804d40..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-06.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-07.svg b/crates/cursor-info/assets/mac/wait/wait-07.svg deleted file mode 100644 index b1bad22800e..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-07.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-08.svg b/crates/cursor-info/assets/mac/wait/wait-08.svg deleted file mode 100644 index d1753b8969d..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-08.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-09.svg b/crates/cursor-info/assets/mac/wait/wait-09.svg deleted file mode 100644 index 6dc42d8cbb7..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-09.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-10.svg b/crates/cursor-info/assets/mac/wait/wait-10.svg deleted file mode 100644 index ee5aeccfec1..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-10.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-11.svg b/crates/cursor-info/assets/mac/wait/wait-11.svg deleted file mode 100644 index 03430eb7baa..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-11.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-12.svg b/crates/cursor-info/assets/mac/wait/wait-12.svg deleted file mode 100644 index ae8eb62b990..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-12.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-13.svg b/crates/cursor-info/assets/mac/wait/wait-13.svg deleted file mode 100644 index b13d404ee1f..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-13.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-14.svg b/crates/cursor-info/assets/mac/wait/wait-14.svg deleted file mode 100644 index 48c9c5a972f..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-14.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-15.svg b/crates/cursor-info/assets/mac/wait/wait-15.svg deleted file mode 100644 index 446a086b79f..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-15.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-16.svg b/crates/cursor-info/assets/mac/wait/wait-16.svg deleted file mode 100644 index 62b20dc4c6a..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-16.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-17.svg b/crates/cursor-info/assets/mac/wait/wait-17.svg deleted file mode 100644 index ceb738ad921..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-17.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-18.svg b/crates/cursor-info/assets/mac/wait/wait-18.svg deleted file mode 100644 index 9e202fba3dd..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-18.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-19.svg b/crates/cursor-info/assets/mac/wait/wait-19.svg deleted file mode 100644 index 60d11b16ea3..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-19.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-20.svg b/crates/cursor-info/assets/mac/wait/wait-20.svg deleted file mode 100644 index 9689209885e..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-20.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-21.svg b/crates/cursor-info/assets/mac/wait/wait-21.svg deleted file mode 100644 index 79408bf432f..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-21.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-22.svg b/crates/cursor-info/assets/mac/wait/wait-22.svg deleted file mode 100644 index 99e557c2ff9..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-22.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-23.svg b/crates/cursor-info/assets/mac/wait/wait-23.svg deleted file mode 100644 index e6d0e500d8c..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-23.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-24.svg b/crates/cursor-info/assets/mac/wait/wait-24.svg deleted file mode 100644 index c52ae77df18..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-24.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-25.svg b/crates/cursor-info/assets/mac/wait/wait-25.svg deleted file mode 100644 index 1e4778ff90d..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-25.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-26.svg b/crates/cursor-info/assets/mac/wait/wait-26.svg deleted file mode 100644 index d683a314caf..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-26.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-27.svg b/crates/cursor-info/assets/mac/wait/wait-27.svg deleted file mode 100644 index d59fe6133f3..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-27.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-28.svg b/crates/cursor-info/assets/mac/wait/wait-28.svg deleted file mode 100644 index 0873d643331..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-28.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-29.svg b/crates/cursor-info/assets/mac/wait/wait-29.svg deleted file mode 100644 index cf4303484be..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-29.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-30.svg b/crates/cursor-info/assets/mac/wait/wait-30.svg deleted file mode 100644 index a5a7e6f4754..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-30.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-31.svg b/crates/cursor-info/assets/mac/wait/wait-31.svg deleted file mode 100644 index 08939756130..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-31.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-32.svg b/crates/cursor-info/assets/mac/wait/wait-32.svg deleted file mode 100644 index b721b87002d..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-32.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-33.svg b/crates/cursor-info/assets/mac/wait/wait-33.svg deleted file mode 100644 index cd752e5147f..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-33.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-34.svg b/crates/cursor-info/assets/mac/wait/wait-34.svg deleted file mode 100644 index 918ca8171d3..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-34.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-35.svg b/crates/cursor-info/assets/mac/wait/wait-35.svg deleted file mode 100644 index 88b35cc667d..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-35.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-36.svg b/crates/cursor-info/assets/mac/wait/wait-36.svg deleted file mode 100644 index 60a428a15f3..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-36.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-37.svg b/crates/cursor-info/assets/mac/wait/wait-37.svg deleted file mode 100644 index 814e2172f79..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-37.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-38.svg b/crates/cursor-info/assets/mac/wait/wait-38.svg deleted file mode 100644 index 2a9cfa61ddd..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-38.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-39.svg b/crates/cursor-info/assets/mac/wait/wait-39.svg deleted file mode 100644 index d7fd0aa0be4..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-39.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wait/wait-40.svg b/crates/cursor-info/assets/mac/wait/wait-40.svg deleted file mode 100644 index dc389daabcb..00000000000 --- a/crates/cursor-info/assets/mac/wait/wait-40.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/wayland-cursor.svg b/crates/cursor-info/assets/mac/wayland-cursor.svg deleted file mode 100644 index 294f567927b..00000000000 --- a/crates/cursor-info/assets/mac/wayland-cursor.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/xterm.svg b/crates/cursor-info/assets/mac/xterm.svg deleted file mode 100644 index b0ff782e2f1..00000000000 --- a/crates/cursor-info/assets/mac/xterm.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/zoom-in.svg b/crates/cursor-info/assets/mac/zoom-in.svg deleted file mode 100644 index f9e0ecb109a..00000000000 --- a/crates/cursor-info/assets/mac/zoom-in.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/assets/mac/zoom-out.svg b/crates/cursor-info/assets/mac/zoom-out.svg deleted file mode 100644 index 05fbad5267e..00000000000 --- a/crates/cursor-info/assets/mac/zoom-out.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/crates/cursor-info/src/macos.rs b/crates/cursor-info/src/macos.rs index 14691820549..2467d75716f 100644 --- a/crates/cursor-info/src/macos.rs +++ b/crates/cursor-info/src/macos.rs @@ -46,26 +46,75 @@ impl CursorShapeMacOS { pub fn info(&self) -> Option { Some(match self { CursorShapeMacOS::Arrow => ResolvedCursor { - raw: include_str!("../assets/mac/left_ptr.svg"), - hotspot: todo!(), - }, - CursorShapeMacOS::ContextualMenu => todo!(), - CursorShapeMacOS::ClosedHand => todo!(), - CursorShapeMacOS::Crosshair => todo!(), - CursorShapeMacOS::DisappearingItem => todo!(), - CursorShapeMacOS::DragCopy => todo!(), - CursorShapeMacOS::DragLink => todo!(), - CursorShapeMacOS::IBeam => todo!(), - CursorShapeMacOS::OpenHand => todo!(), - CursorShapeMacOS::OperationNotAllowed => todo!(), - CursorShapeMacOS::PointingHand => todo!(), - CursorShapeMacOS::ResizeDown => todo!(), - CursorShapeMacOS::ResizeLeft => todo!(), - CursorShapeMacOS::ResizeLeftRight => todo!(), - CursorShapeMacOS::ResizeRight => todo!(), - CursorShapeMacOS::ResizeUp => todo!(), - CursorShapeMacOS::ResizeUpDown => todo!(), - CursorShapeMacOS::IBeamVerticalForVerticalLayout => todo!(), + raw: include_str!("../assets/mac/arrow.svg"), + hotspot: (0.235, 0.174), // 40.0/170.0, 40.0/230.0 + }, + CursorShapeMacOS::ContextualMenu => ResolvedCursor { + raw: include_str!("../assets/mac/contextual_menu.svg"), + hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0 + }, + CursorShapeMacOS::ClosedHand => ResolvedCursor { + raw: include_str!("../assets/mac/closed_hand.svg"), + hotspot: (0.5, 0.5), // 32.0/64.0, 32.0/64.0 + }, + CursorShapeMacOS::Crosshair => ResolvedCursor { + raw: include_str!("../assets/mac/crosshair.svg"), + hotspot: (0.458, 0.458), // 22.0/48.0, 22.0/48.0 + }, + CursorShapeMacOS::DragCopy => ResolvedCursor { + raw: include_str!("../assets/mac/drag_copy.svg"), + hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0 + }, + CursorShapeMacOS::DragLink => ResolvedCursor { + raw: include_str!("../assets/mac/drag_link.svg"), + hotspot: (0.688, 0.143), // 22.0/32.0, 6.0/42.0 + }, + CursorShapeMacOS::IBeam => ResolvedCursor { + raw: include_str!("../assets/mac/ibeam.svg"), + hotspot: (0.444, 0.5), // 40.0/90.0, 90.0/180.0 + }, + CursorShapeMacOS::OpenHand => ResolvedCursor { + raw: include_str!("../assets/mac/open_hand.svg"), + hotspot: (0.5, 0.5), // 32.0/64.0, 32.0/64.0 + }, + CursorShapeMacOS::OperationNotAllowed => ResolvedCursor { + raw: include_str!("../assets/mac/operation_not_allowed.svg"), + hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0 + }, + CursorShapeMacOS::PointingHand => ResolvedCursor { + raw: include_str!("../assets/mac/pointing_hand.svg"), + hotspot: (0.406, 0.25), // 26.0/64.0, 16.0/64.0 + }, + CursorShapeMacOS::ResizeDown => ResolvedCursor { + raw: include_str!("../assets/mac/resize_down.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + CursorShapeMacOS::ResizeLeft => ResolvedCursor { + raw: include_str!("../assets/mac/resize_left.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + CursorShapeMacOS::ResizeLeftRight => ResolvedCursor { + raw: include_str!("../assets/mac/resize_left_right.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + CursorShapeMacOS::ResizeRight => ResolvedCursor { + raw: include_str!("../assets/mac/resize_right.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + CursorShapeMacOS::ResizeUp => ResolvedCursor { + raw: include_str!("../assets/mac/resize_up.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + CursorShapeMacOS::ResizeUpDown => ResolvedCursor { + raw: include_str!("../assets/mac/resize_up_down.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + CursorShapeMacOS::IBeamVerticalForVerticalLayout => ResolvedCursor { + raw: include_str!("../assets/mac/ibeam_vertical.svg"), + hotspot: (0.389, 0.25), // 14.0/36.0, 8.0/32.0 + }, + // Missing asset for it + CursorShapeMacOS::DisappearingItem => return None, _ => return None, }) } diff --git a/crates/recording/src/cursor.rs b/crates/recording/src/cursor.rs index 50e3fed7760..b79a9d21f6e 100644 --- a/crates/recording/src/cursor.rs +++ b/crates/recording/src/cursor.rs @@ -255,6 +255,9 @@ fn get_cursor_data() -> Option { autoreleasepool(|| unsafe { let cursor = NSCursor::currentCursor(); + let shape = CursorShape::try_from(&*cursor).ok(); + println!("{:?} {:?}", cursor, shape); + let image = cursor.image(); let size = image.size(); let hotspot = cursor.hotSpot(); @@ -263,7 +266,7 @@ fn get_cursor_data() -> Option { }; Some(CursorData { - shape: CursorShape::try_from(&*cursor).ok(), + shape: None, // TODO image: image_data.as_bytes_unchecked().to_vec(), hotspot: XY::new(hotspot.x / size.width, hotspot.y / size.height), }) diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rs index e413768a325..acd92bd8426 100644 --- a/crates/rendering/src/layers/cursor.rs +++ b/crates/rendering/src/layers/cursor.rs @@ -19,6 +19,7 @@ pub struct CursorLayer { statics: Statics, bind_group: Option, cursors: HashMap, + prev_is_svg_assets_enabled: Option, } struct Statics { @@ -175,6 +176,7 @@ impl CursorLayer { statics, bind_group: None, cursors: Default::default(), + prev_is_svg_assets_enabled: None, } } @@ -207,6 +209,17 @@ impl CursorLayer { let speed = (velocity[0] * velocity[0] + velocity[1] * velocity[1]).sqrt(); let motion_blur_amount = (speed * 0.3).min(1.0) * 0.0; // uniforms.project.cursor.motion_blur; + let is_svg_assets_enabled = !uniforms.project.cursor.raw && uniforms.project.cursor.use_svg; + + // Remove all cursor assets if the svg configuration changes. + // it might change the texture. + // + // This would be better if it only invalidated the required assets but that would be more complicated. + if self.prev_is_svg_assets_enabled != Some(is_svg_assets_enabled) { + self.prev_is_svg_assets_enabled = Some(is_svg_assets_enabled); + self.cursors.drain(); + } + if !self.cursors.contains_key(&interpolated_cursor.cursor_id) { let mut cursor = None; From be3f10683885ae9367719377f8576e07a13b8bd4 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 17:55:47 +0800 Subject: [PATCH 14/29] bruh macos `NSCursor` is cringe --- Cargo.lock | 7 +++++-- crates/cursor-info/Cargo.toml | 1 + crates/cursor-info/src/macos.rs | 20 ++++++++++++++++++++ crates/recording/Cargo.toml | 2 ++ crates/recording/src/cursor.rs | 24 ++++++++++++++++++++++-- 5 files changed, 50 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0dba9842b2..7a8a1e2661a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1003,6 +1003,7 @@ dependencies = [ name = "cap-cursor-info" version = "0.1.0" dependencies = [ + "objc2 0.6.1", "objc2-app-kit 0.3.1", "serde", "specta", @@ -1250,6 +1251,7 @@ dependencies = [ "ffmpeg-next", "flume 0.11.0", "futures", + "hex", "image 0.25.5", "objc", "objc2-app-kit 0.3.1", @@ -1257,6 +1259,7 @@ dependencies = [ "screencapturekit", "serde", "serde_json", + "sha2", "specta", "tempfile", "thiserror 1.0.69", @@ -7247,9 +7250,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if 1.0.0", "cpufeatures", diff --git a/crates/cursor-info/Cargo.toml b/crates/cursor-info/Cargo.toml index a535ec111c2..5a8add21304 100644 --- a/crates/cursor-info/Cargo.toml +++ b/crates/cursor-info/Cargo.toml @@ -10,6 +10,7 @@ strum = { version = "0.27", features = ["derive"] } [target.'cfg(target_os = "macos")'.dependencies] objc2-app-kit = "0.3.1" +objc2 = "0.6.1" [target.'cfg(target_os= "windows")'.dependencies] windows = { workspace = true, features = [ diff --git a/crates/cursor-info/src/macos.rs b/crates/cursor-info/src/macos.rs index 2467d75716f..ba3ce32ecb6 100644 --- a/crates/cursor-info/src/macos.rs +++ b/crates/cursor-info/src/macos.rs @@ -126,6 +126,26 @@ impl TryFrom<&objc2_app_kit::NSCursor> for super::CursorShape { #[allow(deprecated)] fn try_from(cursor: &objc2_app_kit::NSCursor) -> Result { + use objc2::rc::Id; + + println!( + "{:?} {:?} {:?} {:?} {:?} {:?} {:?} {:?}", + cursor, + *cursor == *objc2_app_kit::NSCursor::resizeLeftRightCursor(), + *cursor == *objc2_app_kit::NSCursor::arrowCursor(), + cursor + .class() + .eq(objc2_app_kit::NSCursor::resizeLeftRightCursor().class()), + cursor + .class() + .eq(objc2_app_kit::NSCursor::arrowCursor().class()), + cursor.class().name(), + objc2_app_kit::NSCursor::resizeLeftRightCursor() + .class() + .name(), + objc2_app_kit::NSCursor::arrowCursor().class().name(), + ); + Ok(super::CursorShape::MacOS( if *cursor == *objc2_app_kit::NSCursor::arrowCursor() { CursorShapeMacOS::Arrow diff --git a/crates/recording/Cargo.toml b/crates/recording/Cargo.toml index bbaa49f63e2..6023963b7f7 100644 --- a/crates/recording/Cargo.toml +++ b/crates/recording/Cargo.toml @@ -32,6 +32,8 @@ tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } relative-path = "1.9.3" futures = "0.3.31" tokio-util = "0.7.15" +sha2 = "0.10.9" +hex = "0.4.3" [target.'cfg(target_os = "macos")'.dependencies] screencapturekit = "0.3.5" diff --git a/crates/recording/src/cursor.rs b/crates/recording/src/cursor.rs index b79a9d21f6e..2273dfc17a8 100644 --- a/crates/recording/src/cursor.rs +++ b/crates/recording/src/cursor.rs @@ -251,9 +251,25 @@ struct CursorData { fn get_cursor_data() -> Option { use objc::rc::autoreleasepool; use objc2_app_kit::NSCursor; + use sha2::{Digest, Sha256}; autoreleasepool(|| unsafe { - let cursor = NSCursor::currentCursor(); + // let class: *const AnyObject = unsafe { msg_send![cursor, class] }; + // let description: *const AnyObject = unsafe { msg_send![cursor, description] }; + // println!("Cursor class: {:?}, desc: {:?}", class, description); + + println!( + "GET {:?} {:?} {:?} {:?}", + NSCursor::currentSystemCursor(), + NSCursor::currentCursor(), + NSCursor::currentSystemCursor() + .as_deref() + .map(|v| CursorShape::try_from(v).ok()), + CursorShape::try_from(&*NSCursor::currentCursor()).ok() + ); + + #[allow(deprecated)] + let cursor = NSCursor::currentSystemCursor().unwrap_or(NSCursor::currentCursor()); let shape = CursorShape::try_from(&*cursor).ok(); println!("{:?} {:?}", cursor, shape); @@ -265,9 +281,13 @@ fn get_cursor_data() -> Option { return None; }; + let image = image_data.as_bytes_unchecked().to_vec(); + + println!("CURSOR: {:?}", hex::encode(Sha256::digest(&image))); + Some(CursorData { shape: None, // TODO - image: image_data.as_bytes_unchecked().to_vec(), + image, hotspot: XY::new(hotspot.x / size.width, hotspot.y / size.height), }) }) From 4238502b73065211e6ba5c313650afcfabc2250d Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 18:47:29 +0800 Subject: [PATCH 15/29] Cursor debug CLI wip --- crates/cursor-info/examples/cli.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 crates/cursor-info/examples/cli.rs diff --git a/crates/cursor-info/examples/cli.rs b/crates/cursor-info/examples/cli.rs new file mode 100644 index 00000000000..0d01799ab6e --- /dev/null +++ b/crates/cursor-info/examples/cli.rs @@ -0,0 +1,27 @@ +use objc2::{MainThreadMarker, rc::Retained}; +use objc2_app_kit::{NSApplication, NSCursor}; + +fn main() { + let mtm = MainThreadMarker::new().expect("Not on main thread"); + + let app: Retained = NSApplication::sharedApplication(mtm); + + std::thread::spawn(|| unsafe { + let arrow = NSCursor::arrowCursor(); + + loop { + #[allow(deprecated)] + let cursor = NSCursor::currentSystemCursor().unwrap_or(NSCursor::currentCursor()); + + print!("{cursor:?} {:?}", cursor.image() == arrow.image()); + + if cursor == arrow { + println!("Cursor is an arrow"); + } else { + println!("Cursor is not an arrow"); + } + } + }); + + app.run(); +} From 1a325549a6ae15c62d3e9d0922a5185247f4ccf8 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 19:17:14 +0800 Subject: [PATCH 16/29] move to hash-based `NSCursor` comparision --- Cargo.lock | 4 +- apps/desktop/src/utils/tauri.ts | 2 +- crates/cursor-info/Cargo.toml | 2 + crates/cursor-info/assets/mac-old/arrow.png | Bin 15325 -> 0 bytes crates/cursor-info/assets/mac-old/arrow.svg | 9 - .../assets/mac-old/closed_hand.png | Bin 1686 -> 0 bytes .../assets/mac-old/closed_hand.svg | 9 - .../assets/mac-old/context_menu.png | Bin 1997 -> 0 bytes .../assets/mac-old/context_menu.svg | 9 - .../cursor-info/assets/mac-old/crosshair.png | Bin 480 -> 0 bytes .../cursor-info/assets/mac-old/crosshair.svg | 9 - .../assets/mac-old/cursor_metadata.json | 149 -------------- .../assets/mac-old/disappearing_item.png | Bin 4153 -> 0 bytes .../assets/mac-old/disappearing_item.svg | 9 - .../cursor-info/assets/mac-old/drag_copy.png | Bin 3936 -> 0 bytes .../cursor-info/assets/mac-old/drag_copy.svg | 9 - .../cursor-info/assets/mac-old/drag_link.png | Bin 1904 -> 0 bytes .../cursor-info/assets/mac-old/drag_link.svg | 9 - crates/cursor-info/assets/mac-old/ibeam.png | Bin 6946 -> 0 bytes crates/cursor-info/assets/mac-old/ibeam.svg | 9 - .../assets/mac-old/ibeam_vertical.png | Bin 1564 -> 0 bytes .../assets/mac-old/ibeam_vertical.svg | 9 - .../cursor-info/assets/mac-old/open_hand.png | Bin 2236 -> 0 bytes .../cursor-info/assets/mac-old/open_hand.svg | 9 - .../assets/mac-old/operation_not_allowed.png | Bin 5087 -> 0 bytes .../assets/mac-old/operation_not_allowed.svg | 9 - .../assets/mac-old/pointing_hand.png | Bin 2122 -> 0 bytes .../assets/mac-old/pointing_hand.svg | 9 - .../assets/mac-old/resize_down.png | Bin 1644 -> 0 bytes .../assets/mac-old/resize_down.svg | 9 - .../assets/mac-old/resize_left.png | Bin 1527 -> 0 bytes .../assets/mac-old/resize_left.svg | 9 - .../assets/mac-old/resize_left_right.png | Bin 2451 -> 0 bytes .../assets/mac-old/resize_left_right.svg | 9 - .../assets/mac-old/resize_right.png | Bin 1596 -> 0 bytes .../assets/mac-old/resize_right.svg | 9 - .../cursor-info/assets/mac-old/resize_up.png | Bin 1507 -> 0 bytes .../cursor-info/assets/mac-old/resize_up.svg | 9 - .../assets/mac-old/resize_up_down.png | Bin 2418 -> 0 bytes .../assets/mac-old/resize_up_down.svg | 9 - crates/cursor-info/examples/cli.rs | 76 +++++-- crates/cursor-info/src/lib.rs | 187 ++++++++--------- crates/cursor-info/src/macos.rs | 191 ------------------ crates/project/Cargo.toml | 2 - crates/project/src/meta.rs | 2 +- crates/recording/Cargo.toml | 2 +- crates/recording/src/cursor.rs | 30 +-- crates/recording/src/studio_recording.rs | 2 +- crates/rendering/src/cursor_interpolation.rs | 1 - crates/rendering/src/layers/cursor.rs | 13 +- 50 files changed, 179 insertions(+), 646 deletions(-) delete mode 100644 crates/cursor-info/assets/mac-old/arrow.png delete mode 100644 crates/cursor-info/assets/mac-old/arrow.svg delete mode 100644 crates/cursor-info/assets/mac-old/closed_hand.png delete mode 100644 crates/cursor-info/assets/mac-old/closed_hand.svg delete mode 100644 crates/cursor-info/assets/mac-old/context_menu.png delete mode 100644 crates/cursor-info/assets/mac-old/context_menu.svg delete mode 100644 crates/cursor-info/assets/mac-old/crosshair.png delete mode 100644 crates/cursor-info/assets/mac-old/crosshair.svg delete mode 100644 crates/cursor-info/assets/mac-old/cursor_metadata.json delete mode 100644 crates/cursor-info/assets/mac-old/disappearing_item.png delete mode 100644 crates/cursor-info/assets/mac-old/disappearing_item.svg delete mode 100644 crates/cursor-info/assets/mac-old/drag_copy.png delete mode 100644 crates/cursor-info/assets/mac-old/drag_copy.svg delete mode 100644 crates/cursor-info/assets/mac-old/drag_link.png delete mode 100644 crates/cursor-info/assets/mac-old/drag_link.svg delete mode 100644 crates/cursor-info/assets/mac-old/ibeam.png delete mode 100644 crates/cursor-info/assets/mac-old/ibeam.svg delete mode 100644 crates/cursor-info/assets/mac-old/ibeam_vertical.png delete mode 100644 crates/cursor-info/assets/mac-old/ibeam_vertical.svg delete mode 100644 crates/cursor-info/assets/mac-old/open_hand.png delete mode 100644 crates/cursor-info/assets/mac-old/open_hand.svg delete mode 100644 crates/cursor-info/assets/mac-old/operation_not_allowed.png delete mode 100644 crates/cursor-info/assets/mac-old/operation_not_allowed.svg delete mode 100644 crates/cursor-info/assets/mac-old/pointing_hand.png delete mode 100644 crates/cursor-info/assets/mac-old/pointing_hand.svg delete mode 100644 crates/cursor-info/assets/mac-old/resize_down.png delete mode 100644 crates/cursor-info/assets/mac-old/resize_down.svg delete mode 100644 crates/cursor-info/assets/mac-old/resize_left.png delete mode 100644 crates/cursor-info/assets/mac-old/resize_left.svg delete mode 100644 crates/cursor-info/assets/mac-old/resize_left_right.png delete mode 100644 crates/cursor-info/assets/mac-old/resize_left_right.svg delete mode 100644 crates/cursor-info/assets/mac-old/resize_right.png delete mode 100644 crates/cursor-info/assets/mac-old/resize_right.svg delete mode 100644 crates/cursor-info/assets/mac-old/resize_up.png delete mode 100644 crates/cursor-info/assets/mac-old/resize_up.svg delete mode 100644 crates/cursor-info/assets/mac-old/resize_up_down.png delete mode 100644 crates/cursor-info/assets/mac-old/resize_up_down.svg delete mode 100644 crates/cursor-info/src/macos.rs diff --git a/Cargo.lock b/Cargo.lock index 7a8a1e2661a..9424a288a10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1003,9 +1003,11 @@ dependencies = [ name = "cap-cursor-info" version = "0.1.0" dependencies = [ + "hex", "objc2 0.6.1", "objc2-app-kit 0.3.1", "serde", + "sha2", "specta", "strum 0.27.2", "windows 0.58.0", @@ -1222,7 +1224,6 @@ dependencies = [ name = "cap-project" version = "0.1.0" dependencies = [ - "cap-cursor-info", "either", "log", "relative-path", @@ -1237,7 +1238,6 @@ name = "cap-recording" version = "0.1.0" dependencies = [ "cap-cursor-capture", - "cap-cursor-info", "cap-displays", "cap-flags", "cap-media", diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.ts index e43c50c336c..8690914e2ed 100644 --- a/apps/desktop/src/utils/tauri.ts +++ b/apps/desktop/src/utils/tauri.ts @@ -329,7 +329,7 @@ export type CurrentRecordingChanged = null export type CurrentRecordingTarget = { window: { id: number; bounds: Bounds } } | { screen: { id: number } } | { area: { screen: number; bounds: Bounds } } export type CursorAnimationStyle = "regular" | "slow" | "fast" export type CursorConfiguration = { hide?: boolean; hideWhenIdle: boolean; size: number; type: CursorType; animationStyle: CursorAnimationStyle; tension: number; mass: number; friction: number; raw?: boolean; motionBlur?: number; useSvg?: boolean } -export type CursorMeta = { imagePath: string; hotspot: XY; shape?: string | null } +export type CursorMeta = { imagePath: string; hotspot: XY; hash?: string | null } export type CursorType = "pointer" | "circle" export type Cursors = { [key in string]: string } | { [key in string]: CursorMeta } export type DownloadProgress = { progress: number; message: string } diff --git a/crates/cursor-info/Cargo.toml b/crates/cursor-info/Cargo.toml index 5a8add21304..13b28553d2d 100644 --- a/crates/cursor-info/Cargo.toml +++ b/crates/cursor-info/Cargo.toml @@ -4,7 +4,9 @@ version = "0.1.0" edition = "2024" [dependencies] +hex = "0.4.3" serde = { version = "1.0.219", features = ["derive"] } +sha2 = "0.10.9" specta = { workspace = true, features = ["derive"] } strum = { version = "0.27", features = ["derive"] } diff --git a/crates/cursor-info/assets/mac-old/arrow.png b/crates/cursor-info/assets/mac-old/arrow.png deleted file mode 100644 index d8af87898da554ff631ea9e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{A;E70 zG5tOOxg`)$i5ph?5{8138JK0MgA7g?11mBGv8Tv16AtF{bLjCfY(Fsg5ZwZfgr}D1 zLxjoMRcr_3ru0kZh%D@57YIGytnK-dJt{}AJ7BvDc{8MlfM4TARB4?&sRQjZWr(*C zJ2*N=W9!31jGBXTJVrO#{bJ!BK$HljD>a)UG7=kw-@Ozi^ngYGY}--Ji}X>L6SP0b z?FBr)7U1GehezZ&n4gG2=GZ+IOmTWmla)G3pQ$9qlL2KosbHJov-V>=`4{2h=8)hr zBoKuVfvHGB&}4$m@QYD)VARNY+Q+sxekc(c13FD+B0n3zbQDS~rl|Jg!bLg4!+1b4 zZb(6d?Wi1zdQ%ZPD09F9NWk9MZDCHwn|$m)NnP~Z-IiVQChRjBv^zVN!FGxril;Py zb7q;O<6-0zW70a_%9Dc65+7pn!hFCP;G_l`@PwdN3!Bp55za>)38y*^8Wodj#Sa1( z;`Q)t2OCk492ZCGpTHCFUWw4aaT6a9i=C^du#a&@8%E_x6gy2x#g$bjf`f(`svkdVYQ1|ewne;0 - - macOS arrow Cursor - Scalable macOS cursor: arrow (hotspot: 40.0, 40.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/closed_hand.png b/crates/cursor-info/assets/mac-old/closed_hand.png deleted file mode 100644 index a6d741e675b7ec678a5f0842d907310441e892a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1686 zcmb7FjZ+h68sE((AwVI1)Kd^hs-V+)iYG?{C9tv5I^knWO5&Xo0)Zq;HoF&`{sGsS_j#XZ z=K0O82D# z!YaTcikxZd0ARt__Io&e&zU;BcR3!k;iHX>jllb5iTh<}S>ntP931-k(Vp%V0PHP= zzsu;cXK-p`-B0SZHwNewatMt?Dc@GwDIohXocf!Eip%n(z{}C~ng7X?{&$yti`bU? z4GP$DCrA<<9NYn1Is6Bua>MY`V=A@UB-ec@-+<4o#vfccya3sZk%=YDlz_2^UnRZ; zisy?I=L4CuAL@U4R6O-ayR|V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fFT5+ z1?PyT`86ACD`XFQrkcU>Fg{}!GgaYFP$kw36^C2-uZTNa&?@4e#0eR+6OwQaqT9%6 z6bD?~5VU}@{7H-@RfLI4Rtsb(#%)A(m=5Ld<$5t27T&dTH|T(WH32Jt6f&*ig%+sy zW@-s=#LBq^82NtqAsNR3M^E65 sU9U@%AxC - - macOS closed_hand Cursor - Scalable macOS cursor: closed_hand (hotspot: 32.0, 32.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/context_menu.png b/crates/cursor-info/assets/mac-old/context_menu.png deleted file mode 100644 index c5c9683eced25141a27f27bc93aea9abf9cca1f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1997 zcmb_ddsGu=7N1N)0thA2ZJ|U=toT?xYoaLV;gR@2VD*UY;gs$2N{>~KMNE(?39p%9 zMd|}XsUVgXSP*U3mEh?bC?w2SC>BK{vRkl0CO{#jA|VgVduAuvJ?-w_d(NGi@66oq z&i&or?|%2p{(Xso{$c(A00br{?RuMfZl$jMzD(-AcZKTr0KmGKylZ=^jP?wpH$}W# z+ixNZ<}1G&ymoxgfwo+o>K8k5zM=My%7#smZ_YbTc6?BHwIU|xUrIB?sUdZ~gpVq4 zRE(+algm@H1SXVQV_4P3<`D%gX1Cv3(SqAgKw93C6aM>=21825d&J?DvMd@yK#!6U z>v$r!_OxuZZpNqT6pf~mZ;v=bzRT7gY6#M~%lbUygS&(Iu)VQde>osjAjV+1DthYi z%cX;R=5FK}gEqsoB(`3LFzU!{Z0-9xHBc?!VNv{#u7IHeGLjwpNknq>m8?g8$%-m# zS1gxLn)%xK`3->3x>IO9ckBE5h+Mi4mG5DmY@*L%3V}=^>f0POt-HHheUGyGQruR8 zchtUpffm^WfPIj#3~CXQ7NH?~wi%s=aF+&m{h{^Z0W4rG44Ci=JwB@?-CB8Xbn(uU1qJevf|8MFSA)^f zAlcBmjP<&RmD&V`KcxMy?MJ}h@c`OnLWL|Vyxs3J=CPX|&I{<(vSZ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yEN0Zgu-_=lUn~a0#G;H9SsyZkLy;}*Or{w0B0@h$7)%TUQbjPr2u`8~ z6Xg*Q@erm0%ZFAFB@6~z1WfwVnE`d{`_KkjemQ0GAs*rBdu{UZ;8&N)_>V~47jAs_ wG#Ryy?0Cz8R^BCZQwd4S%K`X*|71^G>i-_^5oeZ~&j65|uy0q}4sqGP0f3GXJ^%m! diff --git a/crates/cursor-info/assets/mac-old/context_menu.svg b/crates/cursor-info/assets/mac-old/context_menu.svg deleted file mode 100644 index 50edc9fb9cc..00000000000 --- a/crates/cursor-info/assets/mac-old/context_menu.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - macOS context_menu Cursor - Scalable macOS cursor: context_menu (hotspot: 10.0, 10.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/crosshair.png b/crates/cursor-info/assets/mac-old/crosshair.png deleted file mode 100644 index 8b26c427f6417d37beb9c869c2b90d4571bd51e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 480 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezr3(FfR9WaSW+oe0zX-flB1GV;}#Q zzw145W_gi!^19sH+n^}3XWlfg_4AC3mEQd<+n!amtlc{M>iSRnrKkSCyW-D#x2N^y zTK{(k{=DCN>VICyzjEat{6;*7Q^5Ldc@7_`*8@xQe|zC>!_=T|^Yi2%@dcmeA29px z3e|q3enO(evURVy8dP{VHuS1|oZk#FYB7>6tQ&IwHQzAPSMq%1+Frq!Gh5tA=zM=} zo#Ugr{50jx=f};?`%bF382D3s&yQre!zR8q=ARGkmHfaRlQ?g`yZs|UhAUA&e;>D> zSI^ue-k6({EPeZiTLS|l6H7<>Z`OIfU?$M^+?>z(EgPt-p2Js4V;}yUpz^Oc0PbgyLl4$(09j-6DUqLfcA~^Apf}o4ydm)4u`O}Nu65cr w2Q2#5zW;ryUJe*CivP-yy@?i>AgTWxi<2t?bxvKM0gO2YPgg&ebxsLQ06duN?EnA( diff --git a/crates/cursor-info/assets/mac-old/crosshair.svg b/crates/cursor-info/assets/mac-old/crosshair.svg deleted file mode 100644 index d2b3c3de34f..00000000000 --- a/crates/cursor-info/assets/mac-old/crosshair.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - macOS crosshair Cursor - Scalable macOS cursor: crosshair (hotspot: 22.0, 22.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/cursor_metadata.json b/crates/cursor-info/assets/mac-old/cursor_metadata.json deleted file mode 100644 index 28172e7a631..00000000000 --- a/crates/cursor-info/assets/mac-old/cursor_metadata.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "cursors": [ - { - "name": "arrow", - "hotspot_x": 40.0, - "hotspot_y": 40.0, - "size_width": 170.0, - "size_height": 230.0, - "filename": "arrow.png" - }, - { - "name": "ibeam", - "hotspot_x": 40.0, - "hotspot_y": 90.0, - "size_width": 90.0, - "size_height": 180.0, - "filename": "ibeam.png" - }, - { - "name": "pointing_hand", - "hotspot_x": 26.0, - "hotspot_y": 16.0, - "size_width": 64.0, - "size_height": 64.0, - "filename": "pointing_hand.png" - }, - { - "name": "closed_hand", - "hotspot_x": 32.0, - "hotspot_y": 32.0, - "size_width": 64.0, - "size_height": 64.0, - "filename": "closed_hand.png" - }, - { - "name": "open_hand", - "hotspot_x": 32.0, - "hotspot_y": 32.0, - "size_width": 64.0, - "size_height": 64.0, - "filename": "open_hand.png" - }, - { - "name": "crosshair", - "hotspot_x": 22.0, - "hotspot_y": 22.0, - "size_width": 48.0, - "size_height": 48.0, - "filename": "crosshair.png" - }, - { - "name": "disappearing_item", - "hotspot_x": 10.0, - "hotspot_y": 10.0, - "size_width": 56.0, - "size_height": 80.0, - "filename": "disappearing_item.png" - }, - { - "name": "operation_not_allowed", - "hotspot_x": 10.0, - "hotspot_y": 10.0, - "size_width": 56.0, - "size_height": 80.0, - "filename": "operation_not_allowed.png" - }, - { - "name": "drag_link", - "hotspot_x": 22.0, - "hotspot_y": 6.0, - "size_width": 32.0, - "size_height": 42.0, - "filename": "drag_link.png" - }, - { - "name": "drag_copy", - "hotspot_x": 10.0, - "hotspot_y": 10.0, - "size_width": 56.0, - "size_height": 80.0, - "filename": "drag_copy.png" - }, - { - "name": "context_menu", - "hotspot_x": 10.0, - "hotspot_y": 10.0, - "size_width": 56.0, - "size_height": 80.0, - "filename": "context_menu.png" - }, - { - "name": "resize_up_down", - "hotspot_x": 24.0, - "hotspot_y": 24.0, - "size_width": 48.0, - "size_height": 48.0, - "filename": "resize_up_down.png" - }, - { - "name": "resize_left_right", - "hotspot_x": 24.0, - "hotspot_y": 24.0, - "size_width": 48.0, - "size_height": 48.0, - "filename": "resize_left_right.png" - }, - { - "name": "resize_up", - "hotspot_x": 24.0, - "hotspot_y": 24.0, - "size_width": 48.0, - "size_height": 48.0, - "filename": "resize_up.png" - }, - { - "name": "resize_down", - "hotspot_x": 24.0, - "hotspot_y": 24.0, - "size_width": 48.0, - "size_height": 48.0, - "filename": "resize_down.png" - }, - { - "name": "resize_left", - "hotspot_x": 24.0, - "hotspot_y": 24.0, - "size_width": 48.0, - "size_height": 48.0, - "filename": "resize_left.png" - }, - { - "name": "resize_right", - "hotspot_x": 24.0, - "hotspot_y": 24.0, - "size_width": 48.0, - "size_height": 48.0, - "filename": "resize_right.png" - }, - { - "name": "ibeam_vertical", - "hotspot_x": 14.0, - "hotspot_y": 8.0, - "size_width": 36.0, - "size_height": 32.0, - "filename": "ibeam_vertical.png" - } - ], - "extracted_at": "2025-07-30T06:32:49.130878+00:00" -} \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/disappearing_item.png b/crates/cursor-info/assets/mac-old/disappearing_item.png deleted file mode 100644 index c29668cae34a1b4de7d0ee0fe5e49b0ce23d29b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4153 zcmYLN3se(#x}V7d2(N(1Vnq!Cf{#kLVhKn};u9&X(b`?DVu+8`c7YqNT9Y6!6VM{3 zDipQAjRITO>OE}@uE&59$RJU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dreWgfR4D11y{J_suhna+!rnHN#y^bS2XprW@Q(R~0bHCf|&PDeaP2Pirr zpMc`Sm7uTm^r4@tib~tKf%5CJj8JjcGBM2vIov~FnGkF^Op~at3+w}z*L~#*8MOgA z04QrQ##oDKC7=~br$lTDV(q|nVgyyAh@xNQ5Z_ScZHy`5 z?53XsobDD{wiT&nM5(hIb+y*3v4dCZ{&D97Fa1vj=6TdR zoV(yOQVOO9eX-|Ppml1&+X?Z=gm`A!((TXpo5TJ)VZsy2i1F*?2qhNk=%}b_-)eR> zvAf3>gf00U>#F3+z+Mv3?#?iasj*_kz;kmnU9OLJ^Fkf zH;NU>JtEMcu*|kcS#1T`BU9NU+&e91Co}wv=BL~!@mMQfd&chy3at#MYtU}&%Z|0_ z_bwhCJJ;TSPHcJI{`R$a;BU#3f0F{N2B!w)`@Nwg-aJE$kc7Z?DcN>OkoNOF=o#Dx z_SCR+2%vW>hBtbV>nP=RH$W#)A1uCuk?wA&v-PT^nJ;%`y^O1EYpiX{T{2mjcjX>2 zGgJlGG6rpEXt0=TM%t0Vo#h#XV)jmJ zliVz%If1=~(Sj{aXBilgN@lq8x(ZsoFDnsq`3YT??y`uMhj~{512E*Mt#v(a%wI)Y zE@Wm%oSKx;;o$9#xia8pcsT4+>C}R`?uJt&P)G#~7V>1aWh7LH0!68y`Szo(^DCe( zSGva+7~?F)NObsvtdf}oo&U_D|myo95d=WPvu>8#*F@RDu!BBR0LqxbEKE?wnb wvZ@LBP*0|PMo6#Dy|&-LO - - macOS disappearing_item Cursor - Scalable macOS cursor: disappearing_item (hotspot: 10.0, 10.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/drag_copy.png b/crates/cursor-info/assets/mac-old/drag_copy.png deleted file mode 100644 index 916a0f7550f8508bed659ae5494119db998efc5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3936 zcmYjU3sh5A*1k8n1OfyQ<%bgFAsAa3NCYNeK@!yRD9;YA`a+0;P=*B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ts$uN@akNd<5L&NcYZI{i8WB-cdv- zxt#O2g`_fyI|w02sNOir^ANh=EF0vdD8m-G2CR*{(&OZQ>`G5Z;#CRC&Z!-uz2J=^ z;#DLWN*>EtTnB*g{i(InIayDRcZKvZ>p)D*+MroL&gc)XNThV;uA_Oe|T`g zABFJ*b6SxTXJs{OZoWZWH)4MGyGSEp@Gu%kmJW4-*nvEbEl&%N_F54t1J213+jbxK zOf^mYpC$tvTvDa-x}W%st|omZ(zDSI!{6lhBU`$IA2|;Up5Obu{tQ7FWZw991Ogd@ zM|b<~P+0S*+Um7X%@?FAf=IpOHC0ji1drhA3YP}kXnLUL0rV^VBq99jXCbmvQpxDEz z>wfAP!28e+5k%*29JdnT+4zGPt`y!FfsTIBHBQ!m~AR?2yepQOoK=uK5uTR zXFdzWP(Gmmv-Uz<;c|>3f+m^zd+eJw@rhP^3lU<%-!*RLg)7nNO#t6)U!LcAANvZ@ zyTvr^LATTN<8^GT*I}V+A_p+*eXui&WDJ@!`{oDg83)Z8Vqg}58t$pYZ3N7^ff;qU z5(X@>t`sGH+>fPsZ>BxgVF4p%C<@^WgpoL+6U&~D=-NiRmyB~wJJF_{K3h)Y!6)*T uFXk<^6+YH-_GnV7K7HWcQp-9Sxb-u*B(&$>6X44k3i>K+ckNEr>Hh - - macOS drag_copy Cursor - Scalable macOS cursor: drag_copy (hotspot: 10.0, 10.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/drag_link.png b/crates/cursor-info/assets/mac-old/drag_link.png deleted file mode 100644 index 036dec973b660e6bebef41e880a0c4a76ce5f2e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1904 zcmYLK3s6&68ooF8mV}oeh#;>}LD>qDj3}r)62%9U3T|b}v?`=!R$37Pq9n*8H=@PV z^0bOwFv%`m-A;kPxbjfQz2&JZ7+H!6Xc7?!N=XQTJV~-QPG@@FbLO1+zW@LJ^B>;P zq{Ge*-VOi&I48s(_!OT5@V<>?hmZez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=W9A) zu5f+yaRB_mP%H)mc%~kisfP>*GZ6btxmzya3ue(V z(oP1vj%#FbbSxHFj(L9_P1zrF$1vCz^oVD`b~ZFp3srK1Zm}h-a6me9M0)8GY85Y+4cMkH0Pk{b_#lm*x$qfaWXvlgwsw2@EPmX z`RBJ}Rb0`$6nEOqyL5D430Vxd zmP6hq5pdx{xR_1cUJqw4WJX3*_u9MSsRAZZtLac}2!3%oeQS$r0DlDO>Rp=(u$=GL k?64MWz&|>JYJf(F=tORPTNWh5e^MafVA6q>{fvwM2T7m4{Qv*} diff --git a/crates/cursor-info/assets/mac-old/drag_link.svg b/crates/cursor-info/assets/mac-old/drag_link.svg deleted file mode 100644 index e10c1f7326c..00000000000 --- a/crates/cursor-info/assets/mac-old/drag_link.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - macOS drag_link Cursor - Scalable macOS cursor: drag_link (hotspot: 22.0, 6.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/ibeam.png b/crates/cursor-info/assets/mac-old/ibeam.png deleted file mode 100644 index 778d3d2231407b140f914a686198e2e47f0425b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6946 zcmd5>dsI_*){Q*GN)aE`baW&>aF|vlZT%`*g3&5N)vwZrU0NTB)@hjzA}UoA2)PKQ zV5y=gvRahP=u(_Im|8m`8i)u8f|#*tLBS-1M+A|)fFy8p?|07cqODG6t@&%#$J%NP z$$k9J`R%j!zI)zT5fw0U;z%Bk7qIlLCGWw%Yv9ihBZkA@FLZ=kdAy08OP4HKDI50a zviDztKRkTZ#_sCbTXVf|`|?d^;+oD6;nS}Q4lh#|yf$ZAk9%kFpA%1JgvZ`dZ@)wN zzP!q_>M!Jlurj~&F5t9w;Ay;}>usPs4b=TLvApc0=GLI%b)k91_jfkMQO;cm8y~Ps zFE<~hg*#jKhUs0~g-*a&p>3>iTixv9=I>X}nvk8`y-DEz&a#(;o*x0CTNaji215FZ zkoM9EOzsPvC-b)qoQww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=Do^=y8Kc1lm?bUWDvE&6{kB0R;h>0o!G$U{j zU;;{v@vOY%%<-q=H*qbN$#KRqa7Ke_4-=rsKBD3KF`cnIZ^h_POpjDsN2)JpJ-{T$ zmCeq>@U#YpkwfszC2Y>;fa?)@>w@#Pny&rAKo^*I%pz;(USEQ(_K6UC|TsID;eUZPJj~4I8{A_5h&x zfCB>e0YQtjg`~Qjo5Yao^&^`CX?!x2LD?p%Z4=imvJPcZpa%#+I~6*>s>BljJcxS? zlZ&xlTa=_T7oc}U7#tBQP%ol%_7B{#M3c(BIf>^m7?FCFEy;Q_U<^*;GRq*qwQGR9 zNUEG3WXp8QRe&MaF=^<#n={RJZoZN9`v&zrlHtH{PAHIzIRGua-Xy*WEVd8og&Ca_2#};b diff --git a/crates/cursor-info/assets/mac-old/ibeam.svg b/crates/cursor-info/assets/mac-old/ibeam.svg deleted file mode 100644 index 835ca50f73e..00000000000 --- a/crates/cursor-info/assets/mac-old/ibeam.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - macOS ibeam Cursor - Scalable macOS cursor: ibeam (hotspot: 40.0, 90.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/ibeam_vertical.png b/crates/cursor-info/assets/mac-old/ibeam_vertical.png deleted file mode 100644 index 4009f316a2701b0b9fdcc4cf23d2e229defe522d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1564 zcmbtUc~BE)6kkM%2u>7Rt#xRqgkhA@pm;X1Q3s2G0!p1Sf)c!jsUfa{5CXZZZP953 z3lxtuiFFEUEu?B;`ym9KsfS0zZr>tk1&T?NqbqM8yiqo1T3OVW)U1m&KYdzc}l=fQ)U*%h1F zX_{DT+{*_Ed7GA@{P%ICS_*-%R;fO@`iR}aNCC9wyDY+6hoc5_%C%aIa4sIER(pdlib%;0nRf7ryr2%$fvIm zP*FP-EpgtGxNk`UoY(N~FrqbDZ;M8-C^nXH#==3Qg6gV}7YQM@(4o=kK5Y%M{!y~+ zjk|6#L7i_ngfAYL*1K!1vJhx9CrzT z!C~?@%=3;#Qe6!hCmIb;OE`~8EM0n}OItX4!B_g0u=1EN#U|3D4M~Av=Tj3bpYuIx zewR@066P62EL$r9Y31~8<}QPV3N(Z9lvhik_L$(?W$^tnI9MQc|0cCD}zv5&1cY&VWaRE8=|A8sBy5FG2wJVoS?QC%S)-} zCDKFklw(eGBcZyHvvW@R93JFx3eU!bw7H#E@UDya5nn+Ytq)hZToRO>>8_?`^A)o1GV*ISBPs?x5s*Xv;e*1V7G{+dyKd_;sT*nZLjy%JAo|TO@zA>3ZsBa+N7Gf8wFU>_fi?aiR92obd1QhxP0(#La zp82!*1KY)t1Mp=f<-17ANFaidWSw*>LE1i-Ws0XSg^N>lG(;TQE?^RGO*XAmY$;`U z7l3dB2z#m4WmGHEH!u&Pv-x_CDm)CcqUThY5#Y>bc@KWz^ujthlRDZ(dPT3 zrFk$6uW+T@g&>xG ezef+K^Tw-oFFhK4)QD|;fVL|+u5M@6*Z% - - macOS ibeam_vertical Cursor - Scalable macOS cursor: ibeam_vertical (hotspot: 14.0, 8.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/open_hand.png b/crates/cursor-info/assets/mac-old/open_hand.png deleted file mode 100644 index 35642a8757e32efafca97e484e276bd10fdf164f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2236 zcmaJ@dr(tX8oxI;B;lE=TOWud3dkxfu(}9JNR|0GvGxX`zH1{seocgJCgh)5 zh@xJC`#CPE`imu_dMEM_NdSVOK=EapvT8Od4x#Q|+@bm)el@lOO@Uv@J-#Bmz}8UX zF=PrlCFY9(@AZ?bl5}Si@8Hkl?AIf;DUlS_VguXS5KqFrn%DB;(LV7y^d4+ch%w13 zB$s4(*w*%nNpi`1>ZES36%6@p*eyzHDR7g|!PKKq+ z*VIvd6$PFn4uY+L#zY1&!%*n;87;aBe(zM<_|%@KVNk70>u^D&g387^#%hOp`@+;| zXrI<(DHP7fi*6iS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)WeYx~;a{&a14d@(DWnQ|G)giH_*?K~ySr>_5*w0ld7t>f~}oM+Ybo z&Q;wm6S)-l8Oi7x1RTK3-x?WDIFQ@l(0fRgXu@AOfw_l`RZ96SQjPGavc9dY&#pCX zkBEpEt2OW)0&W?twI3Gha)sT9loSW(fd#lr&gc*YLa8Xr=!W(*%6k_|B8?FH>XN8V zIBgfU4jRT9x#V}vYhbc$M3u2Ynxp~z= zP|IF9!A=6UqT!itrBFvhXtL80(gFyTBOW2p@^BzW?8CH33NeL0hvT$^3CyHXHYSri z - - macOS open_hand Cursor - Scalable macOS cursor: open_hand (hotspot: 32.0, 32.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/operation_not_allowed.png b/crates/cursor-info/assets/mac-old/operation_not_allowed.png deleted file mode 100644 index 0cb6dc2845f25c828823ffc12c3687684ded3ca7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5087 zcmZu#2~<;8x4t(C2~!AzE)bQVpjN3QzgB`WB&}McSfg#vC2Aj3`We{SsRdvC2SE+MRSa`ry^ z>~Gj9-MlG@?j7n4K@dH8!@Bpt-&pXw*^>%hH!f&c3PC{^lGnZYfdn2$$u*H5p1xzk za}CFS>A1KzWoK=6U&Eiz?xR(w->Iuwv2vlowy*KO@-Gy}W&U0_DVuu=@AGtdG|+p6 zXhSC+_CY$^q+*^LUR3KJ?#ewkiFv)oo4~x-xOq#S%X_oDYM7t4!<7*sNrx$Ha*V{a zES!g_4@(yJ4SAFwgyDv~HzP~&5B=4D{#9Dnwd&W0}Eku#L29Ey8 ztG700>AjVu!|F7XPrO1Rr&Qvr{nelJwLmA>;b;u2G`o4xhCQY$cGpfchb>1yb;o5zM-$0mD&O7=uZ z0(#$0TTnVYtOlzk2RIUP^!6L=U}DVRfe}0W*Q$65zUf5y!N|x3UdbEY3Y6I|%I?iondV+q zsni9nJq4{(xkbadMQi^$uirA3|f{FMR|^?iNkKv$ z4}vM-JRT{Cy>~q{AN)`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Q5&9@<66=|$<&W`Z*GQ7O;3_sXze$}n4SVOucvOMa^|sEGy!A!r^1 zyg6Z9*GHg0C%i($nVm#-QwIs9YB3XDP_%l_v-S(blp(teFtj^^YXI|9v62`41A%3%m?5j#Zt3ivqGe_*;A#z zr%EmNTl?=PSavW9dRGCP>@4lhSOPIW z`^gvmIavLOy_~ZFMdXBt$5N(|cZKAwP(l~%;aLm#K7tLUXgy=W$0CGYfCmX*TX(?P z7zAbu#M^@UR+4js)DFb^176w=A!)IY{m}Pk57MtqWJv - - macOS operation_not_allowed Cursor - Scalable macOS cursor: operation_not_allowed (hotspot: 10.0, 10.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/pointing_hand.png b/crates/cursor-info/assets/mac-old/pointing_hand.png deleted file mode 100644 index 63cb5328a2aba3119f9c4d53b661bb9d36976036..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2122 zcmZ`*3s6((6}~qK2@wRMuBbeMJW6$yL{ZF|EWxg9WUZ!EcW_mbxa{iK6~fDqK*&vG zM_`r21r=Q?&~bIORdKr&qEd2Us8Ni>)>X6tb9swGE+Ie??oDnJ+nLUErZfL*&YAx^ z|9Q-J{;J>X6f9h@VgUdE3p2KD-R0ZU{4s6fic!b!r znlSvhs<6La zsE!u_cJWDsUkQ?_!OPg@xkJ4Ae;c{? z)*dHfYT`3$HfJ=)R-v9(=!pBrpTaj52I(rD-l-||&Y#;y4MzLd~c<8nm zyDeTDo4Pqx75*BuGyRX%fUcm7$yU|dR(VsM;zAt*PK2ftjS&WWgyU{Ac2{Y3Ds{k@ zqva~x2=P>7#VUbecE8~=(>uV_nw0s-kQ%M3Gyv_(IRTXr|2QG1U)MO`TF4#_ty8G$ zO0LzBn$S{Pv1hio@X^}VW$#|5x9<0$B-cLpB+GJoYgCH@({L;d z$LR6| z+EJ`sIbl?-0fh3-#U|)&@_sIw`%;{O zwqv;s7IyFiiWV9?p0b{cT%$*;)#`l;c`k-wyr&F8MImI=Um!Y-)icc^3RFHTr)Y2P zYOVNV>nXph;pUN{RNIiezqc&Q<~+!pJJ>d|zdgZ;4GXaAZ;-)j-CmcJKhPOqD=sSP@_JL9Tn-085cQbM zlGD2K2&o68pZEK8kD^s$YD*5(&(T&$oib_NpPqdKRmC4I}6(2HGJ?zh*8Kz8-oq({%)HvU7^<=hu?(T9V)!#3@w>y};VY}Ju@7zey13XLvXE+{&Z+5af0^1BaY(j+h7jI+u6-HBs%M#HpH7pM zei%PdeS6s4&=2XHa@~QXIv_GC>L3=T57h@=2OZ4vZb(ZB(cA;cFWNmvgr)zSHMmY1 zw%s_pYXR_f_Pcj9(;A4wpnn+P$YIzEIF&nIY zpL8`X?{Ab1F}?uM>|()zl?}CbI(doq-HoKFzlsRFCPsc<+PA*Y_eTIS N(sypX`76ose*we$Uz`8{ diff --git a/crates/cursor-info/assets/mac-old/pointing_hand.svg b/crates/cursor-info/assets/mac-old/pointing_hand.svg deleted file mode 100644 index 3ceaa90715a..00000000000 --- a/crates/cursor-info/assets/mac-old/pointing_hand.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - macOS pointing_hand Cursor - Scalable macOS cursor: pointing_hand (hotspot: 26.0, 16.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_down.png b/crates/cursor-info/assets/mac-old/resize_down.png deleted file mode 100644 index 566b7f6ebe73e951ead5e8db02fa0f67e924b578..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1644 zcmZ`)dr%Wc7~i|g<4Ax2nu3W4RSF&Hm`t%kAv9@A1+)XU)k3E{Zpu`&1j7hQ5-_>w zD7F@SbPBfEkWs5RTB3D^&!yc2*i}|LGv9qT|3+O z%fQ9GTgy5s?VbPG?$3?QTg=9nQ`XM<_gg;EUTDau_}%QWioc}C+R3@iQ~K2P^o@7? zj>cc|;bN|1z&X@m@9S`Fu?PTBbw(0z$=M{{R!J6(}p{J7>8>l|(>FyOmD@}ln zDsZ30e!p}lp@747DUhfL%oyhGX0e8#o|&zrIQJ(U*vSub(mA07nt&M_otlt#g+S?c zsQ3>Iyra`uQ<@MI<2;#vyS24dCU0nHAnPjk?C~hXV)2>Gy5{mfq0JbpmkCJEjKQu;)5xAx^b#nCIsXzLzAski6 zlGYDy#c_~s++9|7XnGmS^;xNNwAX97cI_5YsZ`E`*a#fB&$M?R4HpRfHf=S51EkY0 z*gU0KB|SlO6>Z=$cW&8zt#D<@(W$+oz$;0?FjkZlGp?A>2r+0iw}ZV0bg=UP-vm$a zAegt!p!@oQK=LiBh~ltD5>tw|__Y{FG(nsJAtwP_nhOOZba zsLGJsgugljEu|T%Awmo1B^jWZ5S_+38%f_JFf4`51h}}W^_apphFLbFQ%#!b7LYfF zBUoG-c%NV;3?5OJ!0-cn&1opb#MNTq%KD&1A1v>71bZA}?;ANww06fk=tT!Dp7R^$ z{G*)$TquPru&^rzD8|4VxE?9fFP$^JZUHWr=cGYJAFiT_et;F6rvHPdNV-(MHk z?{XzF%qtnnNydHu!w>!E)-1d@+cg;ubna-qTQWXF(PSf{2B ztEpZg%t9H)H{oT(SEI`PwGe}Rgr1jdv%Y$v%KbJLO0%=nfUqG5%H_Pz5eH7Fw>hH4`;<8z6mmK` z_OLz!;e;k&3X4M*q)O?9(z%}DjGp1GhvUUcF$ES*QK1My!dO;VrE4m9j zftE8yr>~?AgvRW`Aw=u>qOJa~hxz(|r*hm?SyB`gN8XAf-&+=S1<}Ja4JIgrR-C~7 zwsRg;dA#9dGK|K9n{?1hx8!}3zQfYlxziE&&JnmyXq+XCIJqwwB6A4R9#1VUJ%O!6 zcvVyyq^$Zm@+!XwY=E)}kbqG$?PPFO4hA=Mtu+Xx2tK$vq;6JM84fOy3 diff --git a/crates/cursor-info/assets/mac-old/resize_down.svg b/crates/cursor-info/assets/mac-old/resize_down.svg deleted file mode 100644 index 7c701a46183..00000000000 --- a/crates/cursor-info/assets/mac-old/resize_down.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - macOS resize_down Cursor - Scalable macOS cursor: resize_down (hotspot: 24.0, 24.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_left.png b/crates/cursor-info/assets/mac-old/resize_left.png deleted file mode 100644 index bb2d2fd3e5f5af901ff52a3e30df65dd7b8db7b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1527 zcmXYx3rtgI6vywqZ4nBThf~A?t%Aa=2`I`-A{Qgig_k2k@zG8u$V3b3q_RP8K>{c+ z2O>CJL7A{6%416a1-Tc3xL~&uh&+aHYmtHhEU(#nY3bbsOn%?@o#gxHeCOml=M+Ro zhFG$MxEqe)#EE)A&*H0TQikQ)rLt&!F)7_vMMGfD&s)Uk}(2401w5{X3F)6FdQ)-ufMMy)#0Dg;s>7v*8LCAYgZn%!273pxOksqe zpB}P_MmWdY$x4(QH7Jw@g_UAz$-WU(5aldBY|z`ZPcuKO-sFX^Ji%8Sv(&Cx>O)C? zo=|Q%iQT8-neN*`*0ijsMXGO+*75XBJbi74_K^Id`LtyBD6q}P&rcm-)@kkv!(fJJ z;`I3B>G9P(DUpXZ55`|=oAYuKF{a6ep!w_q0lSaE)sk{8IgaZxaov_jcO?C#^6nYb zII{#?sfN@jr)(ELm4j&0>ACdw#yeFu_x5_N*KQrwd-B>zL`Q(o6qdO{etJ>Gh4Yo@8LGf~p$+)b^I><07H0~15n~1Sob2|xt zw4Gn#!Ngl zmT+DJNEhs+o!pMM+{^f#& zb<8Fm{+JN(u^c?JxJy`q8|QG%vzht{S@`F8d^kB+Q&Uqw`7xD=e3{8(grR~`d8x{{ z%-3KJ79LJy^VNVOk-H)ZFV>D|oxQfSHn#GGBG0*F15}S)PC0dp%0&rD;Fc=4kaDT0JZ>QvgfCyk7I9bpi79EVDU_ zpc`YVHu)KIuZ%9TGU+`K+#KhS_JZjEas!ML0mdZ^nqJE`C;`Tp6@u-J&|M4)73C!T zJ3Oq);&QnL*9VIaJ^9rj<2Ghmh%sYDl}UbU{}_rPq^@SMA))>}A~SK}i#U&o@*)^A zQJ_|8Jd$oIR;oqo)>fxhjt^&V>si(;qyy3+9n^-|o;QrfkS(5ZE*_9T#H*lF_n5eO zFcmljaAXJj2->YSsT#Z>suFyKIZU^nrGwhhxaqNsx$Zj(1|0k7nPhSmP7Q*b8%+i= zpb&;MIA=lYT5nnnu-srk&1RS#s0J-V>piGz`P4Qw8(fE>Vbd&Wa|n9WQkM+Q)?fd4 V4((0 diff --git a/crates/cursor-info/assets/mac-old/resize_left.svg b/crates/cursor-info/assets/mac-old/resize_left.svg deleted file mode 100644 index bf1ae2637ae..00000000000 --- a/crates/cursor-info/assets/mac-old/resize_left.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - macOS resize_left Cursor - Scalable macOS cursor: resize_left (hotspot: 24.0, 24.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_left_right.png b/crates/cursor-info/assets/mac-old/resize_left_right.png deleted file mode 100644 index 279958c19bbf89faba494b3ab3ad294589cb1e78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2451 zcmYjTdsGu=7M~YMc!U7165dttiIsG*f|fv9A4qAT+w~MH2-(dlDo6s_5B)G zSX~usMY=r|yA=avd8m*Xd_WawWUZhFWJVBz1`?78A;~1O1MMGs&Yf?*neY4V{qDWL z`#blG4^k4j9)TVJ0C1DGZ~2gU3+5jViy6}(+vfn_zAI_V+dJgo6b{!!e0;XkL>C$= ze(9+#NS0hXIN1D$?Ek9z?7QmfKSwV!*gkDJP<;9Gw{jk-%~;SG`so$QxNS@svxdI; z7aLJ=U+I;93|J8G&@o1A*0(9g7m?5^5$NHAw%!s!+y_*Zic59&WWJo5n2JQc>t$V-OXs|Ds;~Jo!PkZH8i09cC^smS2<4EEJMc0CyfBq ztn%fnIx*fEWdi6{1z(7JXtU@x78-)JTk$0_&RWo9+&o5X%UD_iES^wtU3-E=yd5=w zdlh5fy928RKyXKm<4!7dr_!xh+=*Rf+fyC?Np);V5`Lh9I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^v92o7u+zg-rUI(!8zcOl~{jHd;frQp3V-&5J#eUG9Y;RR={KSEC>%3 zbiYo`O6l3?Oh;3eLvOfg)YJlnuocju$+)io;tIso6=YF>;K97wS@aMt#Dz>L+?c5t zo~Y0;JUyNr+O?SFty)h1yj;fNleJ2FE&YsvW(BraDm4b+Pw{rfSw9)_6%%C3GI@tr zgaAqw^I~~J@KF1%x;*90mXe$5xf8~@6NK)|aB*++#f^tpfGLhea;E1q=W-2V&Ozl^ zak~a?^=$QzWlzG%V#H6N4Ljris|X4g<08o2tFFmuWk`-Tr%T&sLR8_I>vPD7WXeFRd~Yj zWbgHi6G1^iMpg#&(R|Xv#bL2XKaNC*Gh^381;Xy{p&-1d9$A71SD_o}pTStb8(m({ zZ1LC$FB0Qa_m#E@uL$OLa6caS81WEHzgK>@?C#$?EN=jb_;Lp7@S=qnXRhDj`lM$u zS0Di0IaM&MJv?}@#dL(vM;F&4XK^6nB*P;A`rfS0zP3*UK`b%QPjxdRON^|*GydlK zR5QAfGh;_8O3BVhWDgS~gQ%K53i<;S16jVNBei^LDrjN5eo{ XL)d`^sq|x}*#eTbrfj+Pj=1c9Yv;st diff --git a/crates/cursor-info/assets/mac-old/resize_left_right.svg b/crates/cursor-info/assets/mac-old/resize_left_right.svg deleted file mode 100644 index 5982ebf013e..00000000000 --- a/crates/cursor-info/assets/mac-old/resize_left_right.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - macOS resize_left_right Cursor - Scalable macOS cursor: resize_left_right (hotspot: 24.0, 24.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_right.png b/crates/cursor-info/assets/mac-old/resize_right.png deleted file mode 100644 index e9639a173b46364d2ad9b2a7f1ea71c3f66d5ea9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1596 zcmZ`)Yfuwc6yCcVLO>n?tw90;1;K)vSS_J~5-S>!j$p?Yt2Au2t+s%GSV0ALqob(B z7gRv8P)l2!DVU7421a04XlrY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@L&xWr8G7D&l=ohl(Y?tl z#!KJ4-E9=MLkbdlo6|rnHj-WHui<;CW~Jpq`ljukqlgGcP|xM0Q`79r&XE2+Pfje* zK#{4Xq - - macOS resize_right Cursor - Scalable macOS cursor: resize_right (hotspot: 24.0, 24.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_up.png b/crates/cursor-info/assets/mac-old/resize_up.png deleted file mode 100644 index f0cf99e2499b2abfbb469fdafc4207bf3313857f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1507 zcmZXUdsLEV9LL`aDyS&A3{AJ;rL{#V-LQ)j+Nsps)b2Jt$SQ3XN~tG7ix=vYbt>%C zDK8arwrTB>+HqwrgSV;J40X-3%+R1ru}BcngnE77y=?nyJLmh{f6wpvJiq61GBr7# z?mgEV004So!rDz_$#EyDCz)@DT%`cu@k8R;HCrU$7z(Q+cU;uji6ZNn`}(W-NxSND z4Y&SP&S}-f4fU!eOT(?MgH3yjYfD$}`?G#R8*+gdyoTA<4FK3J@t*1M9^$}=mgt4RblPr&GhodvIHYp0&5EXA_Wg%Y!6}(i?3lF3;168xN(>_ zKEty);%rMr?=Y96)JV)22^g(n&m|UnjP|Og9AEr=#2ScK#^P{KtYNyh*Q>_MrAq2rX5PgW|S;(dh&thal zF_QlB!#kn`Ew_oPdRLWgd>SF95zkOC;;h`&v<5TKsA_mlnWQa3@X8-I`O7Bsl}qQ7 zAo!8KlDmCFf7B!amt&>pj98cPMUCK9&23BFoo>yOAMZXf3=~_g6TnY$H;*L@&!tdO z747txf${r1=TV;XdoP~zUJN#7#23{&R@Jv2^I=NVy;oBlBx-sK8HW`q($39!$j$8~ zH=BO3Y2K;)7Ak0NUkuDbVnL4g<|hwKvb7Uz-nfZ$cD#d!+gospHjWvUVQRjzx=7iF z%=DRQDH6yZakh%_;Y@t^!-4+(X1@wBkjnqt6P1yw=-26VmDPl+n$R#2I}>r9uf}!@ zY*T`=#yvd~M+Qo4cU#C4h)R)7oR?OXODp3EeGjIe?#gc5jQV~o2khTONFLHiPnt)? zScmL&hsLorb82hmTjgr2sf!Fw|KMQOjkJceg_68e?MK>o-m_Yx#BZ|2y4RvJmh|9K!>6iU5@6MA{$`Qtw(XI!YM2o42jNH zM%5fzz8`oEG8K*J4pV4@&q4*5fXcywW76a;s`A_6a%i?12pm<=gb!(|;FzSgedj~_=jS*qlnXo< z&VSLb4;<;&!y=I=!^an;MhaDDIvoM2@(&(=xo}Pa4lkN>N{L)qWCBPEDR)6n5+BS) zxjlt%Cv%iar6eytJ{~K{6^X_N+|AltA!WVVe)(D~;!y#n$M)to?{3bR7>KlEk4Mak zOhBe$N7}^=9-&Z@ih0iwz#!kWiy6cbl6!QB#Ja}df2z?{@cRt8#Jy(#1Pfz(citdZ z{o=vAp0eiWObOSHEt=yaIN?X-yNv{E&D~dqGA&&o4Ea7D;RRhVXQ6y3f|yy)0^yOB z8>IrzfFQ+%@0y@GSP2)XC&C+Mf@7J9)g4+9v<;2g@81BCrVckaJq<2JJ?d5f+5Bfl zD;LiqJG@X2_dPgcUN-K~djG*M_4J58hUR(E>@W@~F+woEW diff --git a/crates/cursor-info/assets/mac-old/resize_up.svg b/crates/cursor-info/assets/mac-old/resize_up.svg deleted file mode 100644 index 922096bea02..00000000000 --- a/crates/cursor-info/assets/mac-old/resize_up.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - macOS resize_up Cursor - Scalable macOS cursor: resize_up (hotspot: 24.0, 24.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/assets/mac-old/resize_up_down.png b/crates/cursor-info/assets/mac-old/resize_up_down.png deleted file mode 100644 index 4702206fd8b339795d6d4a734f9b3e1f3d67ac4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2418 zcmXX|2~-nz8lNNNK#m|!L8B1s)zucV)fNvlu~j22f=4TK#bjL9qZJJ*LLfpWwq0pa z=)$wmS`)Uur|znN&&p9C8B}zUBlfupmO_RA37{kl5y&yg>_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>rx;%!QOrpe&6y)LjwkF46f$biQ!B=Xk>f>BfnFq^GA>gJy%K8;xKm5D4N&cNUug z)gaPOU&fr*XU)?SQ&AaVbN&qpt3K9D?CYf}OEo&4x=I$DKoR-%zY_ ztSf&^x?v-xm)kCHRSBCH28A!t=akKr19o38c1vZZWGW=a(8i2(Q!^E+(68Z z)UW|+Dn-VxN!Kb&s9`4(-1EfzRJd(2H_y38F}X+XNKsFwWP_}W2jlVw;_56v993@W z{BiAl1^rMlULcJ>>z7r7)h`l;(c$4Ep{ejnEEo_V5fDU#X(O5qN$4^xU;)fgsZ`cJ z=LM5fprZ$u%a!d1qGrNmxL<#!?P)Dt?gHX>I?7T0DC6a=TATh?LDR2svPLDfk>syo z?IBo8FxhGrvyQzL3wVV#5H3)sy(aF={W#jvVEg4I={KL57)jdrR&PW>Wws$%k=N_(-`+R4UGHrL$~u61z*%v$b^UYPet?jmL6J{@D-6y`R=b~;DID)99Oe=y8R{c- zZl9g;$x&N?Eua%s5rO46u+FH9>h*y7X<-rw9-jfdpHaWuz5A{QSmkpacyt=^=g6C} zYc^$H?zd}J7G6s5urF2?;rmD=gSQ4@3t@*sI%G0RknoHLb9guLc|w2&2 - - macOS resize_up_down Cursor - Scalable macOS cursor: resize_up_down (hotspot: 24.0, 24.0) - - - - - \ No newline at end of file diff --git a/crates/cursor-info/examples/cli.rs b/crates/cursor-info/examples/cli.rs index 0d01799ab6e..5d4c70de132 100644 --- a/crates/cursor-info/examples/cli.rs +++ b/crates/cursor-info/examples/cli.rs @@ -1,27 +1,79 @@ +use std::collections::HashMap; + use objc2::{MainThreadMarker, rc::Retained}; use objc2_app_kit::{NSApplication, NSCursor}; +use sha2::{Digest, Sha256}; +#[allow(deprecated)] fn main() { + #[cfg(target_os = "macos")] + run_macos(); + #[cfg(not(target_os = "macos"))] + panic!("Unsupported platform!"); +} + +#[cfg(target_os = "macos")] +fn run_macos() { let mtm = MainThreadMarker::new().expect("Not on main thread"); + let _app: Retained = NSApplication::sharedApplication(mtm); - let app: Retained = NSApplication::sharedApplication(mtm); + let cursors = vec![ + ("arrow", NSCursor::arrowCursor()), + ("contextualMenu", NSCursor::contextualMenuCursor()), + ("closedHand", NSCursor::closedHandCursor()), + ("crosshair", NSCursor::crosshairCursor()), + ("disappearingItem", NSCursor::disappearingItemCursor()), + ("dragCopy", NSCursor::dragCopyCursor()), + ("dragLink", NSCursor::dragLinkCursor()), + ("IBeam", NSCursor::IBeamCursor()), + ("openHand", NSCursor::openHandCursor()), + ("operationNotAllowed", NSCursor::operationNotAllowedCursor()), + ("pointingHand", NSCursor::pointingHandCursor()), + ("resizeDown", NSCursor::resizeDownCursor()), + ("resizeLeft", NSCursor::resizeLeftCursor()), + ("resizeLeftRight", NSCursor::resizeLeftRightCursor()), + ("resizeRight", NSCursor::resizeRightCursor()), + ("resizeUp", NSCursor::resizeUpCursor()), + ("resizeUpDown", NSCursor::resizeUpDownCursor()), + ("IBeamVertical", NSCursor::IBeamCursorForVerticalLayout()), + ]; - std::thread::spawn(|| unsafe { - let arrow = NSCursor::arrowCursor(); + unsafe { + let mut cursor_lookup = HashMap::new(); + + for (name, cursor) in cursors { + let hash = hex::encode(Sha256::digest( + &cursor + .image() + .TIFFRepresentation() + .expect("Failed to get TIFF representation of built-in cursor") + .as_bytes_unchecked(), + )); + println!("{name}: {}", hash); + cursor_lookup.insert(hash, name); + } + + // return; loop { #[allow(deprecated)] let cursor = NSCursor::currentSystemCursor().unwrap_or(NSCursor::currentCursor()); + let hash = hex::encode(Sha256::digest( + &cursor + .image() + .TIFFRepresentation() + .expect("Failed to get TIFF representation of built-in cursor") + .as_bytes_unchecked(), + )); - print!("{cursor:?} {:?}", cursor.image() == arrow.image()); + if cursor_lookup.get(&hash).is_none() { + panic!("Cursor hash '{hash}' not known",); + }; - if cursor == arrow { - println!("Cursor is an arrow"); - } else { - println!("Cursor is not an arrow"); - } + println!( + "{cursor:?} {hash} {}", + cursor_lookup.get(&hash).unwrap_or(&"Unknown") + ); } - }); - - app.run(); + }; } diff --git a/crates/cursor-info/src/lib.rs b/crates/cursor-info/src/lib.rs index b9ef5bd8be5..35f30a32c90 100644 --- a/crates/cursor-info/src/lib.rs +++ b/crates/cursor-info/src/lib.rs @@ -1,16 +1,5 @@ //! Cap Cursor Info: A crate for getting cursor information, assets and hotspot information. -use std::{fmt, str::FromStr}; - -use serde::{Deserialize, Serialize}; -use specta::Type; - -mod macos; -mod windows; - -pub use macos::*; -pub use windows::*; - /// Information about a resolved cursor shape #[derive(Debug, Clone)] pub struct ResolvedCursor { @@ -20,86 +9,100 @@ pub struct ResolvedCursor { pub hotspot: (f64, f64), } -/// Defines the shape of the cursor -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] -pub enum CursorShape { - MacOS(CursorShapeMacOS), - Windows(CursorShapeWindows), -} - -impl CursorShape { - /// Get the resolved cursor information - pub fn info(&self) -> Option { - match self { - CursorShape::MacOS(cursor) => cursor.info(), - CursorShape::Windows(cursor) => cursor.info(), - } - } -} - -impl fmt::Display for CursorShape { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let kind = match self { - CursorShape::MacOS(_) => "MacOS", - CursorShape::Windows(_) => "Windows", - }; - - let variant: &'static str = match self { - CursorShape::MacOS(cursor) => cursor.into(), - CursorShape::Windows(cursor) => cursor.into(), - }; - - write!(f, "{kind}|{variant}") - } -} - -impl Serialize for CursorShape { - fn serialize(&self, serializer: S) -> Result - where - S: serde::Serializer, - { - serializer.serialize_str(&self.to_string()) - } -} - -impl<'de> Deserialize<'de> for CursorShape { - fn deserialize(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - let string = String::deserialize(deserializer)?; - - let Some((kind, variant)) = string.split_once("|") else { - return Err(serde::de::Error::custom( - "Invalid CursorShape. Missing delimiter", - )); - }; - - match kind { - "MacOS" => Ok(CursorShape::MacOS( - CursorShapeMacOS::from_str(variant).map_err(|err| { - serde::de::Error::custom( - format!("Failed to parse MacOS cursor variant: {err}",), - ) - })?, - )), - "Windows" => Ok(CursorShape::Windows( - CursorShapeWindows::from_str(variant).map_err(|err| { - serde::de::Error::custom( - format!("Failed to parse MacOS cursor variant: {err}",), - ) - })?, - )), - _ => Err(serde::de::Error::custom("Failed to parse CursorShape kind")), - } - } -} - -impl Type for CursorShape { - fn inline( - types: &mut specta::TypeMap, - generics: specta::Generics, - ) -> specta::datatype::DataType { - String::inline(types, generics) +impl ResolvedCursor { + /// Resolve the SVG asset from a given cursor hash + /// + /// We hash the cursor's image on macOS as `NSCursor`'s can't be reliably compared. + pub fn from_hash(s: String) -> Option { + Some(match s.as_str() { + // https://developer.apple.com/documentation/appkit/nscursor/arrow + "de2d1f4a81e520b65fd1317b845b00a1c51a4d1f71cca3cd4ccdab52b98d1ac9" => ResolvedCursor { + raw: include_str!("../assets/mac/arrow.svg"), + hotspot: (0.235, 0.174), // 40.0/170.0, 40.0/230.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/contextualmenu + "ab26ca862492d41355b711c58544687a799dd7ae14cf161959ca524bbc97c322" => ResolvedCursor { + raw: include_str!("../assets/mac/contextual_menu.svg"), + hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/closedhand + "fbb165d4603dd8808b536f45bb74a9a72d9358ad19714b318bb7c06358a7d3c2" => ResolvedCursor { + raw: include_str!("../assets/mac/closed_hand.svg"), + hotspot: (0.5, 0.5), // 32.0/64.0, 32.0/64.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/crosshair + "c583f776531f4e7b76ea7ba2ab159765e2da11fd63cb897cc10362183859d1d8" => ResolvedCursor { + raw: include_str!("../assets/mac/crosshair.svg"), + hotspot: (0.458, 0.458), // 22.0/48.0, 22.0/48.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/disappearingitem + "67c369820fbc37af9b59b840c675ca24117ca8dfdccec7702b10894058617951" => return None, + // https://developer.apple.com/documentation/appkit/nscursor/dragcopy + "af060876004c8647d82411eeac1bbd613d2991d46794aba16b56c91d3081e128" => ResolvedCursor { + raw: include_str!("../assets/mac/drag_copy.svg"), + hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/draglink + "59ac2483461f4ad577a0a6b68be89fe663c36263b583c5f038eee2ae6a5ad98f" => ResolvedCursor { + raw: include_str!("../assets/mac/drag_link.svg"), + hotspot: (0.688, 0.143), // 22.0/32.0, 6.0/42.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/ibeam + "492dca0bb6751a30607ac728803af992ba69365052b7df2dff1c0dfe463e653c" => ResolvedCursor { + raw: include_str!("../assets/mac/ibeam.svg"), + hotspot: (0.444, 0.5), // 40.0/90.0, 90.0/180.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/openhand + "3f6a5594a3c9334065944b9c56d9f73fd5fe5f02108a5e28f37e222e770be476" => ResolvedCursor { + raw: include_str!("../assets/mac/open_hand.svg"), + hotspot: (0.5, 0.5), // 32.0/64.0, 32.0/64.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/operationnotallowed + "37287ef1d097704d3e9d0be9c1049ce1fb6dfabd6d210af0429b1b6ec7084c59" => ResolvedCursor { + raw: include_str!("../assets/mac/operation_not_allowed.svg"), + hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/pointinghand + "b0443e9f72e724cb6d94b879bf29c6cb18376d0357c6233e5a7561cf8a9943c6" => ResolvedCursor { + raw: include_str!("../assets/mac/pointing_hand.svg"), + hotspot: (0.406, 0.25), // 26.0/64.0, 16.0/64.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/resizedown + "3c9bf0ce893b64fe9e4363793b406140d4b3900b7beafa1c409e78cf5a8cf954" => ResolvedCursor { + raw: include_str!("../assets/mac/resize_down.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/resizeleft + "50431d8fd537119aefb4c3673f9b9ff00d3cd1d2bf6c35e5dfb09ed40cfd5e7c" => ResolvedCursor { + raw: include_str!("../assets/mac/resize_left.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/resizeleftright + "0fdaea89910bcbe34ad0d4d63a6ada2095489df18537bbf54dd0d0769588b381" => ResolvedCursor { + raw: include_str!("../assets/mac/resize_left_right.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/resizeright + "e74de88f863f059e5beb27152b2dfc2cd1e8dcc458ce775607765e9a4859667e" => ResolvedCursor { + raw: include_str!("../assets/mac/resize_right.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/resizeup + "912ca42451a9624f6fb8c1d53c29c26782b7590d383a66075a6768c4409024d9" => ResolvedCursor { + raw: include_str!("../assets/mac/resize_up.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/resizeupdown + "9c93eb53df68d7fd86298ba1eb3e3b32ccd34d168b81a31a6fc4bb79f131331f" => ResolvedCursor { + raw: include_str!("../assets/mac/resize_up_down.svg"), + hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 + }, + // https://developer.apple.com/documentation/appkit/nscursor/ibeamcursorforverticallayout + "024e1d486a7f16368669d419e69c9a326e464ec1b8ed39645e5c89cb183e03c5" => ResolvedCursor { + raw: include_str!("../assets/mac/ibeam_vertical.svg"), + hotspot: (0.389, 0.25), // 14.0/36.0, 8.0/32.0 + }, + _ => return None, + }) } } diff --git a/crates/cursor-info/src/macos.rs b/crates/cursor-info/src/macos.rs deleted file mode 100644 index ba3ce32ecb6..00000000000 --- a/crates/cursor-info/src/macos.rs +++ /dev/null @@ -1,191 +0,0 @@ -use strum::{EnumString, IntoStaticStr}; - -use crate::ResolvedCursor; - -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, EnumString, IntoStaticStr)] -pub enum CursorShapeMacOS { - /// https://developer.apple.com/documentation/appkit/nscursor/arrow - Arrow, - /// https://developer.apple.com/documentation/appkit/nscursor/contextualmenu - ContextualMenu, - /// https://developer.apple.com/documentation/appkit/nscursor/closedhand - ClosedHand, - /// https://developer.apple.com/documentation/appkit/nscursor/crosshair - Crosshair, - /// https://developer.apple.com/documentation/appkit/nscursor/disappearingitem - DisappearingItem, - /// https://developer.apple.com/documentation/appkit/nscursor/dragcopy - DragCopy, - /// https://developer.apple.com/documentation/appkit/nscursor/draglink - DragLink, - /// https://developer.apple.com/documentation/appkit/nscursor/ibeam - IBeam, - /// https://developer.apple.com/documentation/appkit/nscursor/openhand - OpenHand, - /// https://developer.apple.com/documentation/appkit/nscursor/operationnotallowed - OperationNotAllowed, - /// https://developer.apple.com/documentation/appkit/nscursor/pointinghand - PointingHand, - /// https://developer.apple.com/documentation/appkit/nscursor/resizedown - ResizeDown, - /// https://developer.apple.com/documentation/appkit/nscursor/resizeleft - ResizeLeft, - /// https://developer.apple.com/documentation/appkit/nscursor/resizeleftright - ResizeLeftRight, - /// https://developer.apple.com/documentation/appkit/nscursor/resizeright - ResizeRight, - /// https://developer.apple.com/documentation/appkit/nscursor/resizeup - ResizeUp, - /// https://developer.apple.com/documentation/appkit/nscursor/resizeupdown - ResizeUpDown, - /// https://developer.apple.com/documentation/appkit/nscursor/ibeamcursorforverticallayout - IBeamVerticalForVerticalLayout, -} - -impl CursorShapeMacOS { - pub fn info(&self) -> Option { - Some(match self { - CursorShapeMacOS::Arrow => ResolvedCursor { - raw: include_str!("../assets/mac/arrow.svg"), - hotspot: (0.235, 0.174), // 40.0/170.0, 40.0/230.0 - }, - CursorShapeMacOS::ContextualMenu => ResolvedCursor { - raw: include_str!("../assets/mac/contextual_menu.svg"), - hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0 - }, - CursorShapeMacOS::ClosedHand => ResolvedCursor { - raw: include_str!("../assets/mac/closed_hand.svg"), - hotspot: (0.5, 0.5), // 32.0/64.0, 32.0/64.0 - }, - CursorShapeMacOS::Crosshair => ResolvedCursor { - raw: include_str!("../assets/mac/crosshair.svg"), - hotspot: (0.458, 0.458), // 22.0/48.0, 22.0/48.0 - }, - CursorShapeMacOS::DragCopy => ResolvedCursor { - raw: include_str!("../assets/mac/drag_copy.svg"), - hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0 - }, - CursorShapeMacOS::DragLink => ResolvedCursor { - raw: include_str!("../assets/mac/drag_link.svg"), - hotspot: (0.688, 0.143), // 22.0/32.0, 6.0/42.0 - }, - CursorShapeMacOS::IBeam => ResolvedCursor { - raw: include_str!("../assets/mac/ibeam.svg"), - hotspot: (0.444, 0.5), // 40.0/90.0, 90.0/180.0 - }, - CursorShapeMacOS::OpenHand => ResolvedCursor { - raw: include_str!("../assets/mac/open_hand.svg"), - hotspot: (0.5, 0.5), // 32.0/64.0, 32.0/64.0 - }, - CursorShapeMacOS::OperationNotAllowed => ResolvedCursor { - raw: include_str!("../assets/mac/operation_not_allowed.svg"), - hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0 - }, - CursorShapeMacOS::PointingHand => ResolvedCursor { - raw: include_str!("../assets/mac/pointing_hand.svg"), - hotspot: (0.406, 0.25), // 26.0/64.0, 16.0/64.0 - }, - CursorShapeMacOS::ResizeDown => ResolvedCursor { - raw: include_str!("../assets/mac/resize_down.svg"), - hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 - }, - CursorShapeMacOS::ResizeLeft => ResolvedCursor { - raw: include_str!("../assets/mac/resize_left.svg"), - hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 - }, - CursorShapeMacOS::ResizeLeftRight => ResolvedCursor { - raw: include_str!("../assets/mac/resize_left_right.svg"), - hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 - }, - CursorShapeMacOS::ResizeRight => ResolvedCursor { - raw: include_str!("../assets/mac/resize_right.svg"), - hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 - }, - CursorShapeMacOS::ResizeUp => ResolvedCursor { - raw: include_str!("../assets/mac/resize_up.svg"), - hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 - }, - CursorShapeMacOS::ResizeUpDown => ResolvedCursor { - raw: include_str!("../assets/mac/resize_up_down.svg"), - hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0 - }, - CursorShapeMacOS::IBeamVerticalForVerticalLayout => ResolvedCursor { - raw: include_str!("../assets/mac/ibeam_vertical.svg"), - hotspot: (0.389, 0.25), // 14.0/36.0, 8.0/32.0 - }, - // Missing asset for it - CursorShapeMacOS::DisappearingItem => return None, - _ => return None, - }) - } -} - -#[cfg(target_os = "macos")] -impl TryFrom<&objc2_app_kit::NSCursor> for super::CursorShape { - type Error = (); - - #[allow(deprecated)] - fn try_from(cursor: &objc2_app_kit::NSCursor) -> Result { - use objc2::rc::Id; - - println!( - "{:?} {:?} {:?} {:?} {:?} {:?} {:?} {:?}", - cursor, - *cursor == *objc2_app_kit::NSCursor::resizeLeftRightCursor(), - *cursor == *objc2_app_kit::NSCursor::arrowCursor(), - cursor - .class() - .eq(objc2_app_kit::NSCursor::resizeLeftRightCursor().class()), - cursor - .class() - .eq(objc2_app_kit::NSCursor::arrowCursor().class()), - cursor.class().name(), - objc2_app_kit::NSCursor::resizeLeftRightCursor() - .class() - .name(), - objc2_app_kit::NSCursor::arrowCursor().class().name(), - ); - - Ok(super::CursorShape::MacOS( - if *cursor == *objc2_app_kit::NSCursor::arrowCursor() { - CursorShapeMacOS::Arrow - } else if *cursor == *objc2_app_kit::NSCursor::contextualMenuCursor() { - CursorShapeMacOS::ContextualMenu - } else if *cursor == *objc2_app_kit::NSCursor::closedHandCursor() { - CursorShapeMacOS::ClosedHand - } else if *cursor == *objc2_app_kit::NSCursor::crosshairCursor() { - CursorShapeMacOS::Crosshair - } else if *cursor == *objc2_app_kit::NSCursor::disappearingItemCursor() { - CursorShapeMacOS::DisappearingItem - } else if *cursor == *objc2_app_kit::NSCursor::dragCopyCursor() { - CursorShapeMacOS::DragCopy - } else if *cursor == *objc2_app_kit::NSCursor::dragLinkCursor() { - CursorShapeMacOS::DragLink - } else if *cursor == *objc2_app_kit::NSCursor::IBeamCursor() { - CursorShapeMacOS::IBeam - } else if *cursor == *objc2_app_kit::NSCursor::openHandCursor() { - CursorShapeMacOS::OpenHand - } else if *cursor == *objc2_app_kit::NSCursor::operationNotAllowedCursor() { - CursorShapeMacOS::OperationNotAllowed - } else if *cursor == *objc2_app_kit::NSCursor::pointingHandCursor() { - CursorShapeMacOS::PointingHand - } else if *cursor == *objc2_app_kit::NSCursor::resizeDownCursor() { - CursorShapeMacOS::ResizeDown - } else if *cursor == *objc2_app_kit::NSCursor::resizeLeftCursor() { - CursorShapeMacOS::ResizeLeft - } else if *cursor == *objc2_app_kit::NSCursor::resizeLeftRightCursor() { - CursorShapeMacOS::ResizeLeftRight - } else if *cursor == *objc2_app_kit::NSCursor::resizeRightCursor() { - CursorShapeMacOS::ResizeRight - } else if *cursor == *objc2_app_kit::NSCursor::resizeUpCursor() { - CursorShapeMacOS::ResizeUp - } else if *cursor == *objc2_app_kit::NSCursor::resizeUpDownCursor() { - CursorShapeMacOS::ResizeUpDown - } else if *cursor == *objc2_app_kit::NSCursor::IBeamCursorForVerticalLayout() { - CursorShapeMacOS::IBeamVerticalForVerticalLayout - } else { - return Err(()); - }, - )) - } -} diff --git a/crates/project/Cargo.toml b/crates/project/Cargo.toml index 6f7a2c8c199..24e579be2d6 100644 --- a/crates/project/Cargo.toml +++ b/crates/project/Cargo.toml @@ -7,8 +7,6 @@ edition = "2021" workspace = true [dependencies] -cap-cursor-info = { path = "../cursor-info" } - specta.workspace = true serde = { version = "1", features = ["derive"] } diff --git a/crates/project/src/meta.rs b/crates/project/src/meta.rs index 62104063aec..a8bfc8ff442 100644 --- a/crates/project/src/meta.rs +++ b/crates/project/src/meta.rs @@ -244,7 +244,7 @@ pub struct CursorMeta { pub image_path: RelativePathBuf, pub hotspot: XY, #[serde(default)] - pub shape: Option, + pub hash: Option, } impl MultipleSegments { diff --git a/crates/recording/Cargo.toml b/crates/recording/Cargo.toml index 6023963b7f7..0e6f68c23e3 100644 --- a/crates/recording/Cargo.toml +++ b/crates/recording/Cargo.toml @@ -13,7 +13,7 @@ cap-flags = { path = "../flags" } cap-utils = { path = "../utils" } cap-displays = { path = "../displays" } cap-cursor-capture = { path = "../cursor-capture" } -cap-cursor-info = { path = "../cursor-info" } +# cap-cursor-info = { path = "../cursor-info" } specta.workspace = true tokio.workspace = true diff --git a/crates/recording/src/cursor.rs b/crates/recording/src/cursor.rs index 2273dfc17a8..761d7fd9653 100644 --- a/crates/recording/src/cursor.rs +++ b/crates/recording/src/cursor.rs @@ -7,13 +7,13 @@ use std::{ }; use cap_cursor_capture::RawCursorPosition; -use cap_cursor_info::CursorShape; use cap_displays::Display; use cap_media::{platform::Bounds, sources::CropRatio}; use cap_project::{CursorClickEvent, CursorMoveEvent, XY}; use cap_utils::spawn_actor; use device_query::{DeviceQuery, DeviceState}; use futures::future::Either; +use sha2::{Digest, Sha256}; use tokio::sync::oneshot; use tokio_util::sync::CancellationToken; use tracing::{error, info}; @@ -22,7 +22,7 @@ pub struct Cursor { pub file_name: String, pub id: u32, pub hotspot: XY, - pub shape: Option, + pub hash: String, } pub type Cursors = HashMap; @@ -107,6 +107,7 @@ pub fn spawn_cursor_recorder( let file_name = format!("cursor_{}.png", cursor_id); let cursor_path = cursors_dir.join(&file_name); + let hash = hex::encode(Sha256::digest(&data.image)); if let Ok(image) = image::load_from_memory(&data.image) { // Convert to RGBA let rgba_image = image.into_rgba8(); @@ -120,8 +121,8 @@ pub fn spawn_cursor_recorder( Cursor { file_name, id: response.next_cursor_id, - shape: data.shape, hotspot: data.hotspot, + hash, }, ); response.next_cursor_id += 1; @@ -243,37 +244,17 @@ pub fn spawn_cursor_recorder( struct CursorData { image: Vec, hotspot: XY, - // Optional as we can fallback to png if an SVG isn't available - shape: Option, } #[cfg(target_os = "macos")] fn get_cursor_data() -> Option { use objc::rc::autoreleasepool; use objc2_app_kit::NSCursor; - use sha2::{Digest, Sha256}; autoreleasepool(|| unsafe { - // let class: *const AnyObject = unsafe { msg_send![cursor, class] }; - // let description: *const AnyObject = unsafe { msg_send![cursor, description] }; - // println!("Cursor class: {:?}, desc: {:?}", class, description); - - println!( - "GET {:?} {:?} {:?} {:?}", - NSCursor::currentSystemCursor(), - NSCursor::currentCursor(), - NSCursor::currentSystemCursor() - .as_deref() - .map(|v| CursorShape::try_from(v).ok()), - CursorShape::try_from(&*NSCursor::currentCursor()).ok() - ); - #[allow(deprecated)] let cursor = NSCursor::currentSystemCursor().unwrap_or(NSCursor::currentCursor()); - let shape = CursorShape::try_from(&*cursor).ok(); - println!("{:?} {:?}", cursor, shape); - let image = cursor.image(); let size = image.size(); let hotspot = cursor.hotSpot(); @@ -283,10 +264,7 @@ fn get_cursor_data() -> Option { let image = image_data.as_bytes_unchecked().to_vec(); - println!("CURSOR: {:?}", hex::encode(Sha256::digest(&image))); - Some(CursorData { - shape: None, // TODO image, hotspot: XY::new(hotspot.x / size.width, hotspot.y / size.height), }) diff --git a/crates/recording/src/studio_recording.rs b/crates/recording/src/studio_recording.rs index ad26badb828..00922420b8f 100644 --- a/crates/recording/src/studio_recording.rs +++ b/crates/recording/src/studio_recording.rs @@ -524,7 +524,7 @@ async fn stop_recording( image_path: RelativePathBuf::from("content/cursors") .join(&cursor.file_name), hotspot: cursor.hotspot, - shape: cursor.shape, + hash: Some(cursor.hash), }, ) }) diff --git a/crates/rendering/src/cursor_interpolation.rs b/crates/rendering/src/cursor_interpolation.rs index 83a9291254c..3b899236635 100644 --- a/crates/rendering/src/cursor_interpolation.rs +++ b/crates/rendering/src/cursor_interpolation.rs @@ -1,4 +1,3 @@ -use cap_cursor_info::CursorShape; use cap_project::{CursorEvents, CursorMoveEvent, XY}; use crate::{ diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rs index acd92bd8426..6a6e2ca8412 100644 --- a/crates/rendering/src/layers/cursor.rs +++ b/crates/rendering/src/layers/cursor.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use bytemuck::{Pod, Zeroable}; +use cap_cursor_info::ResolvedCursor; use cap_project::*; use image::GenericImageView; use tracing::error; @@ -223,24 +224,26 @@ impl CursorLayer { if !self.cursors.contains_key(&interpolated_cursor.cursor_id) { let mut cursor = None; - let cursor_shape = match &constants.recording_meta.inner { + let cursor_hash = match &constants.recording_meta.inner { RecordingMetaInner::Studio(StudioRecordingMeta::MultipleSegments { inner: MultipleSegments { cursors: Cursors::Correct(cursors), .. }, - }) => cursors.get(&interpolated_cursor.cursor_id).unwrap().shape, + }) => cursors + .get(&interpolated_cursor.cursor_id) + .and_then(|v| v.hash.clone()), _ => None, }; // Attempt to find and load a higher-quality SVG cursor included in Cap. // These are used instead of the OS provided cursor images when possible as the quality is better. - if let Some(cursor_shape) = cursor_shape + if let Some(cursor_hash) = cursor_hash && !uniforms.project.cursor.raw && uniforms.project.cursor.use_svg { - if let Some(info) = cursor_shape.info() { + if let Some(info) = ResolvedCursor::from_hash(cursor_hash) { cursor = CursorTexture::prepare_svg(&constants, info.raw, info.hotspot.into()) .map_err(|err| { error!( @@ -439,7 +442,7 @@ fn get_click_t(clicks: &[CursorClickEvent], time_ms: f64) -> f32 { } /// The size to render the svg to. -static SVG_OUTPUT_HEIGHT: u32 = 255; +static SVG_OUTPUT_HEIGHT: u32 = 300; struct CursorTexture { texture: wgpu::Texture, From 3186a83362d734dbe9e8db86b9d45fd66350508e Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 19:25:11 +0800 Subject: [PATCH 17/29] position svg correctly and scale up a bit more --- crates/rendering/src/layers/cursor.rs | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rs index 6a6e2ca8412..9520cda69ca 100644 --- a/crates/rendering/src/layers/cursor.rs +++ b/crates/rendering/src/layers/cursor.rs @@ -16,6 +16,9 @@ const CURSOR_CLICK_DURATION: f64 = 0.25; const CURSOR_CLICK_DURATION_MS: f64 = CURSOR_CLICK_DURATION * 1000.0; const CLICK_SHRINK_SIZE: f32 = 0.7; +/// The size to render the svg to. +static SVG_CURSOR_RASTERIZED_HEIGHT: u32 = 200; + pub struct CursorLayer { statics: Statics, bind_group: Option, @@ -441,9 +444,6 @@ fn get_click_t(clicks: &[CursorClickEvent], time_ms: f64) -> f32 { 1.0 } -/// The size to render the svg to. -static SVG_OUTPUT_HEIGHT: u32 = 300; - struct CursorTexture { texture: wgpu::Texture, hotspot: XY, @@ -510,16 +510,23 @@ impl CursorTexture { // This would require reinitializing the texture every time that changes which would be more complicated. // So we trade a small about VRAM for only initializing it once. let aspect_ratio = rtree.size().width() / rtree.size().height(); - let width = (aspect_ratio * SVG_OUTPUT_HEIGHT as f32) as u32; + let width = (aspect_ratio * SVG_CURSOR_RASTERIZED_HEIGHT as f32) as u32; - let mut pixmap = tiny_skia::Pixmap::new(width as u32, SVG_OUTPUT_HEIGHT as u32) + let mut pixmap = tiny_skia::Pixmap::new(width as u32, SVG_CURSOR_RASTERIZED_HEIGHT as u32) .ok_or("Failed to create pixmap")?; // Calculate scale to fit the SVG into the target size while maintaining aspect ratio let scale_x = width as f32 / rtree.size().width(); - let scale_y = SVG_OUTPUT_HEIGHT as f32 / rtree.size().height(); - let scale = scale_x.min(scale_y); - let transform = tiny_skia::Transform::from_scale(scale, scale); + let scale_y = SVG_CURSOR_RASTERIZED_HEIGHT as f32 / rtree.size().height(); + let scale = scale_x.min(scale_y) * 1.5; + let transform = tiny_skia::Transform::from_row( + scale, + 0.0, + 0.0, + scale, + (SVG_CURSOR_RASTERIZED_HEIGHT / 4) as f32 * -1.0, + (SVG_CURSOR_RASTERIZED_HEIGHT / 4) as f32 * -1.0, + ); resvg::render(&rtree, transform, &mut pixmap.as_mut()); From b18edad456628f0dba603a34472aa62bb823f7bf Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 19:41:51 +0800 Subject: [PATCH 18/29] windows support for CLI --- crates/cursor-info/examples/cli.rs | 46 ++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/crates/cursor-info/examples/cli.rs b/crates/cursor-info/examples/cli.rs index 5d4c70de132..ad761347f1f 100644 --- a/crates/cursor-info/examples/cli.rs +++ b/crates/cursor-info/examples/cli.rs @@ -1,19 +1,21 @@ use std::collections::HashMap; -use objc2::{MainThreadMarker, rc::Retained}; -use objc2_app_kit::{NSApplication, NSCursor}; + use sha2::{Digest, Sha256}; #[allow(deprecated)] fn main() { - #[cfg(target_os = "macos")] - run_macos(); + #[cfg(any(target_os = "macos", target_os = "windows"))] + run(); #[cfg(not(target_os = "macos"))] panic!("Unsupported platform!"); } #[cfg(target_os = "macos")] -fn run_macos() { +fn run() { + use objc2::{MainThreadMarker, rc::Retained}; + use objc2_app_kit::{NSApplication, NSCursor}; + let mtm = MainThreadMarker::new().expect("Not on main thread"); let _app: Retained = NSApplication::sharedApplication(mtm); @@ -77,3 +79,37 @@ fn run_macos() { } }; } + +#[cfg(target_os = "windows")] +fn run() { + use windows::{core::PCWSTR, Win32::{Foundation::POINT, UI::WindowsAndMessaging::{LoadCursorW, IDC_ARROW, GetCursorInfo, CURSORINFO, CURSORINFO_FLAGS}}; + + #[inline] + fn load_cursor(lpcursorname: PCWSTR) -> *mut std::ffi::c_void { + unsafe { LoadCursorW(None, lpcursorname) } + .expect("Failed to load default system cursors") + .0 + } + + let arrow = load_cursor(IDC_ARROW); + + loop { + let mut cursor_info = CURSORINFO { + cbSize: std::mem::size_of::() as u32, + flags: CURSORINFO_FLAGS(0), + hCursor: Default::default(), + ptScreenPos: POINT::default(), + }; + + if unsafe { GetCursorInfo(&mut cursor_info).is_err() } { + panic!("Failed to get cursor info") + } + + if cursor_info.hCursor.is_invalid() { + panic!("Hcursor is invalid") + } + + println!("{}", cursor_info.hCursor.0 == arrow); + } + +} \ No newline at end of file From a4923a291c67eb2769df93ae811b9fc9aed46378 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 19:49:48 +0800 Subject: [PATCH 19/29] wip --- crates/cursor-info/examples/cli.rs | 279 ++++++++++++++++++++++++++++- crates/recording/src/cursor.rs | 1 - 2 files changed, 275 insertions(+), 5 deletions(-) diff --git a/crates/cursor-info/examples/cli.rs b/crates/cursor-info/examples/cli.rs index ad761347f1f..163e9e2a19e 100644 --- a/crates/cursor-info/examples/cli.rs +++ b/crates/cursor-info/examples/cli.rs @@ -82,7 +82,7 @@ fn run() { #[cfg(target_os = "windows")] fn run() { - use windows::{core::PCWSTR, Win32::{Foundation::POINT, UI::WindowsAndMessaging::{LoadCursorW, IDC_ARROW, GetCursorInfo, CURSORINFO, CURSORINFO_FLAGS}}; + use windows::{core::PCWSTR, Win32::{Foundation::POINT, UI::WindowsAndMessaging::{LoadCursorW, IDC_ARROW, GetCursorInfo, CURSORINFO, CURSORINFO_FLAGS}}}; #[inline] fn load_cursor(lpcursorname: PCWSTR) -> *mut std::ffi::c_void { @@ -91,7 +91,11 @@ fn run() { .0 } - let arrow = load_cursor(IDC_ARROW); + let cursors = vec![ + load_cursor(IDC_ARROW), + load_cursor(IDC_IBEAM), + load_cursor(IDC_WAIT), + ]; loop { let mut cursor_info = CURSORINFO { @@ -109,7 +113,274 @@ fn run() { panic!("Hcursor is invalid") } - println!("{}", cursor_info.hCursor.0 == arrow); - } + // Get icon info + let mut icon_info = ICONINFO::default(); + if GetIconInfo(cursor_info.hCursor, &mut icon_info).is_err() { + return None; + } + + // Get bitmap info for the cursor + let mut bitmap = BITMAP::default(); + let bitmap_handle = if !icon_info.hbmColor.is_invalid() { + icon_info.hbmColor + } else { + icon_info.hbmMask + }; + + if GetObjectA( + bitmap_handle, + std::mem::size_of::() as i32, + Some(&mut bitmap as *mut _ as *mut _), + ) == 0 + { + // Clean up handles + if !icon_info.hbmColor.is_invalid() { + DeleteObject(icon_info.hbmColor); + } + if !icon_info.hbmMask.is_invalid() { + DeleteObject(icon_info.hbmMask); + } + return None; + } + + // Create DCs + let screen_dc = GetDC(HWND::default()); + let mem_dc = CreateCompatibleDC(screen_dc); + + // Get cursor dimensions + let width = bitmap.bmWidth; + let height = if icon_info.hbmColor.is_invalid() && bitmap.bmHeight > 0 { + // For mask cursors, the height is doubled (AND mask + XOR mask) + bitmap.bmHeight / 2 + } else { + bitmap.bmHeight + }; + + // Create bitmap info header for 32-bit RGBA + let bi = BITMAPINFOHEADER { + biSize: std::mem::size_of::() as u32, + biWidth: width, + biHeight: -height, // Negative for top-down DIB + biPlanes: 1, + biBitCount: 32, // 32-bit RGBA + biCompression: 0, + biSizeImage: 0, + biXPelsPerMeter: 0, + biYPelsPerMeter: 0, + biClrUsed: 0, + biClrImportant: 0, + }; + + let bitmap_info = BITMAPINFO { + bmiHeader: bi, + bmiColors: [Default::default()], + }; + + // Create DIB section + let mut bits: *mut std::ffi::c_void = std::ptr::null_mut(); + let dib = CreateDIBSection(mem_dc, &bitmap_info, DIB_RGB_COLORS, &mut bits, None, 0); + + if dib.is_err() { + // Clean up + DeleteDC(mem_dc); + ReleaseDC(HWND::default(), screen_dc); + if !icon_info.hbmColor.is_invalid() { + DeleteObject(icon_info.hbmColor); + } + if !icon_info.hbmMask.is_invalid() { + DeleteObject(icon_info.hbmMask); + } + return None; + } + + let dib = dib.unwrap(); + + // Select DIB into DC + let old_bitmap = SelectObject(mem_dc, dib); + + // Draw the cursor onto our bitmap with transparency + if DrawIconEx( + mem_dc, + 0, + 0, + cursor_info.hCursor, + 0, // Use actual size + 0, // Use actual size + 0, + None, + DI_NORMAL, + ) + .is_err() + { + // Clean up + SelectObject(mem_dc, old_bitmap); + DeleteObject(dib); + DeleteDC(mem_dc); + ReleaseDC(HWND::default(), screen_dc); + if !icon_info.hbmColor.is_invalid() { + DeleteObject(icon_info.hbmColor); + } + if !icon_info.hbmMask.is_invalid() { + DeleteObject(icon_info.hbmMask); + } + return None; + } + + // Get image data + let size = (width * height * 4) as usize; + let mut image_data = vec![0u8; size]; + unsafe { std::ptr::copy_nonoverlapping(bits, image_data.as_mut_ptr() as *mut _, size) }; + + // Calculate hotspot + let mut hotspot_x = if icon_info.fIcon.as_bool() == false { + icon_info.xHotspot as f64 / width as f64 + } else { + 0.5 + }; + + let mut hotspot_y = if icon_info.fIcon.as_bool() == false { + icon_info.yHotspot as f64 / height as f64 + } else { + 0.5 + }; + // Cleanup + SelectObject(mem_dc, old_bitmap); + DeleteObject(dib); + DeleteDC(mem_dc); + ReleaseDC(HWND::default(), screen_dc); + if !icon_info.hbmColor.is_invalid() { + DeleteObject(icon_info.hbmColor); + } + if !icon_info.hbmMask.is_invalid() { + DeleteObject(icon_info.hbmMask); + } + + // Process the image data to ensure proper alpha channel + for i in (0..size).step_by(4) { + // Windows DIB format is BGRA, we need to: + // 1. Swap B and R channels + let b = image_data[i]; + image_data[i] = image_data[i + 2]; // B <- R + image_data[i + 2] = b; // R <- B + + // 2. Pre-multiply alpha if needed + // This is already handled by DrawIconEx + } + + // Convert to RGBA image + let mut rgba_image = image::RgbaImage::from_raw(width as u32, height as u32, image_data)?; + + // For text cursor (I-beam), enhance visibility by adding a shadow/outline + // Check if this is likely a text cursor by examining dimensions and pixels + let is_text_cursor = width <= 20 && height >= 20 && width <= height / 2; + + if is_text_cursor { + // Add a subtle shadow/outline to make it visible on white backgrounds + for y in 0..height as u32 { + for x in 0..width as u32 { + let pixel = rgba_image.get_pixel(x, y); + // If this is a solid pixel of the cursor + if pixel[3] > 200 { + // If alpha is high (visible pixel) + // Add shadow pixels around it + for dx in [-1, 0, 1].iter() { + for dy in [-1, 0, 1].iter() { + let nx = x as i32 + dx; + let ny = y as i32 + dy; + + // Skip if out of bounds or same pixel + if nx < 0 + || ny < 0 + || nx >= width as i32 + || ny >= height as i32 + || (*dx == 0 && *dy == 0) + { + continue; + } + + let nx = nx as u32; + let ny = ny as u32; + + let shadow_pixel = rgba_image.get_pixel(nx, ny); + // Only add shadow where there isn't already content + if shadow_pixel[3] < 100 { + rgba_image.put_pixel(nx, ny, image::Rgba([0, 0, 0, 100])); + } + } + } + } + } + } + } + + // Find the bounds of non-transparent pixels to trim whitespace + let mut min_x = width as u32; + let mut min_y = height as u32; + let mut max_x = 0u32; + let mut max_y = 0u32; + + let mut has_content = false; + + for y in 0..height as u32 { + for x in 0..width as u32 { + let pixel = rgba_image.get_pixel(x, y); + if pixel[3] > 0 { + // If pixel has any opacity + has_content = true; + min_x = min_x.min(x); + min_y = min_y.min(y); + max_x = max_x.max(x); + max_y = max_y.max(y); + } + } + } + + // Only trim if we found content and there's actually whitespace to trim + let trimmed_image = if has_content + && (min_x > 0 || min_y > 0 || max_x < width as u32 - 1 || max_y < height as u32 - 1) + { + // Add a small padding (2 pixels) around the content + let padding = 2u32; + let trim_min_x = min_x.saturating_sub(padding); + let trim_min_y = min_y.saturating_sub(padding); + let trim_max_x = (max_x + padding).min(width as u32 - 1); + let trim_max_y = (max_y + padding).min(height as u32 - 1); + + let trim_width = trim_max_x - trim_min_x + 1; + let trim_height = trim_max_y - trim_min_y + 1; + + // Create a new image with the trimmed dimensions + let mut trimmed = image::RgbaImage::new(trim_width, trim_height); + + // Copy the content to the new image + for y in 0..trim_height { + for x in 0..trim_width { + let src_x = trim_min_x + x; + let src_y = trim_min_y + y; + let pixel = rgba_image.get_pixel(src_x, src_y); + trimmed.put_pixel(x, y, *pixel); + } + } + + // Adjust hotspot coordinates for the trimmed image + hotspot_x = (hotspot_x * width as f64 - trim_min_x as f64) / trim_width as f64; + hotspot_y = (hotspot_y * height as f64 - trim_min_y as f64) / trim_height as f64; + + trimmed + } else { + rgba_image + }; + + // Convert to PNG format + // let mut png_data = Vec::new(); + // trimmed_image + // .write_to( + // &mut std::io::Cursor::new(&mut png_data), + // image::ImageFormat::Png, + // ) + // .ok()?; + + println!("{}", hex::encode(Sha256::encode(&trimmed_image))); + } } \ No newline at end of file diff --git a/crates/recording/src/cursor.rs b/crates/recording/src/cursor.rs index 761d7fd9653..2555ca0514a 100644 --- a/crates/recording/src/cursor.rs +++ b/crates/recording/src/cursor.rs @@ -567,7 +567,6 @@ fn get_cursor_data() -> Option { .ok()?; Some(CursorData { - shape: CursorShape::try_from(&cursor_info.hCursor).ok(), image: png_data, hotspot: XY::new(hotspot_x, hotspot_y), }) From 3211ae21c5cd9191fbb5e652b3cdb3b17af9c27a Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 19:56:32 +0800 Subject: [PATCH 20/29] windows hashing wip --- crates/cursor-info/examples/cli.rs | 96 +++++++++++++++++++++--------- crates/cursor-info/src/lib.rs | 2 + crates/cursor-info/src/windows.rs | 52 ---------------- 3 files changed, 71 insertions(+), 79 deletions(-) diff --git a/crates/cursor-info/examples/cli.rs b/crates/cursor-info/examples/cli.rs index 163e9e2a19e..74115a1ec10 100644 --- a/crates/cursor-info/examples/cli.rs +++ b/crates/cursor-info/examples/cli.rs @@ -1,6 +1,5 @@ use std::collections::HashMap; - use sha2::{Digest, Sha256}; #[allow(deprecated)] @@ -82,7 +81,15 @@ fn run() { #[cfg(target_os = "windows")] fn run() { - use windows::{core::PCWSTR, Win32::{Foundation::POINT, UI::WindowsAndMessaging::{LoadCursorW, IDC_ARROW, GetCursorInfo, CURSORINFO, CURSORINFO_FLAGS}}}; + use windows::{ + Win32::{ + Foundation::POINT, + UI::WindowsAndMessaging::{ + CURSORINFO, CURSORINFO_FLAGS, GetCursorInfo, IDC_ARROW, LoadCursorW, + }, + }, + core::PCWSTR, + }; #[inline] fn load_cursor(lpcursorname: PCWSTR) -> *mut std::ffi::c_void { @@ -91,29 +98,8 @@ fn run() { .0 } - let cursors = vec![ - load_cursor(IDC_ARROW), - load_cursor(IDC_IBEAM), - load_cursor(IDC_WAIT), - ]; - - loop { - let mut cursor_info = CURSORINFO { - cbSize: std::mem::size_of::() as u32, - flags: CURSORINFO_FLAGS(0), - hCursor: Default::default(), - ptScreenPos: POINT::default(), - }; - - if unsafe { GetCursorInfo(&mut cursor_info).is_err() } { - panic!("Failed to get cursor info") - } - - if cursor_info.hCursor.is_invalid() { - panic!("Hcursor is invalid") - } - - // Get icon info + fn get_icon(cursor_info: CURSORINFO) -> Vec { + // Get icon info let mut icon_info = ICONINFO::default(); if GetIconInfo(cursor_info.hCursor, &mut icon_info).is_err() { return None; @@ -337,7 +323,7 @@ fn run() { } // Only trim if we found content and there's actually whitespace to trim - let trimmed_image = if has_content + if has_content && (min_x > 0 || min_y > 0 || max_x < width as u32 - 1 || max_y < height as u32 - 1) { // Add a small padding (2 pixels) around the content @@ -370,8 +356,64 @@ fn run() { trimmed } else { rgba_image + } + } + + let cursors = vec![ + ("IDC_ARROW", load_cursor(IDC_ARROW)), + ("IDC_IBEAM", load_cursor(IDC_IBEAM)), + ("IDC_WAIT", load_cursor(IDC_WAIT)), + ("IDC_CROSS", load_cursor(IDC_CROSS)), + ("IDC_UPARROW", load_cursor(IDC_UPARROW)), + ("IDC_SIZENWSE", load_cursor(IDC_SIZENWSE)), + ("IDC_SIZENESW", load_cursor(IDC_SIZENESW)), + ("IDC_SIZEWE", load_cursor(IDC_SIZEWE)), + ("IDC_SIZENS", load_cursor(IDC_SIZENS)), + ("IDC_SIZEALL", load_cursor(IDC_SIZEALL)), + ("IDC_NO", load_cursor(IDC_NO)), + ("IDC_HAND", load_cursor(IDC_HAND)), + ("IDC_APPSTARTING", load_cursor(IDC_APPSTARTING)), + ("IDC_HELP", load_cursor(IDC_HELP)), + ("IDC_PIN", load_cursor(IDC_PIN)), + ("IDC_PERSON", load_cursor(IDC_PERSON)), + ("Pen", load_cursor(PCWSTR(32631u16 as _))), + ("ScrolNS", load_cursor(PCWSTR(32652u16 as _))), + ("ScrollWE", load_cursor(PCWSTR(32653u16 as _))), + ("ScrollNSEW", load_cursor(PCWSTR(32654u16 as _))), + ("ScrollN", load_cursor(PCWSTR(32655u16 as _))), + ("ScrollS", load_cursor(PCWSTR(32656u16 as _))), + ("ScrollW", load_cursor(PCWSTR(32657u16 as _))), + ("ScrollE", load_cursor(PCWSTR(32658u16 as _))), + ("ScrollNW", load_cursor(PCWSTR(32659u16 as _))), + ("ScrollNE", load_cursor(PCWSTR(32660u16 as _))), + ("ScrollSW", load_cursor(PCWSTR(32661u16 as _))), + ("ScrollSE", load_cursor(PCWSTR(32662u16 as _))), + ("ArrowCD", load_cursor(PCWSTR(32663u16 as _))), + ]; + + for (name, cursor) in cursors { + let icon = get_icon(cursor); + println!("{}: {}", name, hex::encode(Sha256::digest(icon))); + } + + loop { + let mut cursor_info = CURSORINFO { + cbSize: std::mem::size_of::() as u32, + flags: CURSORINFO_FLAGS(0), + hCursor: Default::default(), + ptScreenPos: POINT::default(), }; + if unsafe { GetCursorInfo(&mut cursor_info).is_err() } { + panic!("Failed to get cursor info") + } + + if cursor_info.hCursor.is_invalid() { + panic!("Hcursor is invalid") + } + + let trimmed_image = get_icon(cursor_info); + // Convert to PNG format // let mut png_data = Vec::new(); // trimmed_image @@ -383,4 +425,4 @@ fn run() { println!("{}", hex::encode(Sha256::encode(&trimmed_image))); } -} \ No newline at end of file +} diff --git a/crates/cursor-info/src/lib.rs b/crates/cursor-info/src/lib.rs index 35f30a32c90..50713b516af 100644 --- a/crates/cursor-info/src/lib.rs +++ b/crates/cursor-info/src/lib.rs @@ -13,6 +13,8 @@ impl ResolvedCursor { /// Resolve the SVG asset from a given cursor hash /// /// We hash the cursor's image on macOS as `NSCursor`'s can't be reliably compared. + /// On Windows we technically don't need to but storing a hash is useful as it means we can modify the cursors, + /// interpretation without rerecording if we were to support custom cursors or add new OS cursors. pub fn from_hash(s: String) -> Option { Some(match s.as_str() { // https://developer.apple.com/documentation/appkit/nscursor/arrow diff --git a/crates/cursor-info/src/windows.rs b/crates/cursor-info/src/windows.rs index ff8c6b75090..96a7f304865 100644 --- a/crates/cursor-info/src/windows.rs +++ b/crates/cursor-info/src/windows.rs @@ -136,55 +136,3 @@ impl CursorShapeWindows { } } } - -#[cfg(target_os = "windows")] -impl TryFrom<&windows::Win32::UI::WindowsAndMessaging::HCURSOR> for super::CursorShape { - type Error = (); - - fn try_from(cursor: &windows::Win32::UI::WindowsAndMessaging::HCURSOR) -> Result { - use windows::{core::PCWSTR, Win32::UI::WindowsAndMessaging::{LoadCursorW, IDC_APPSTARTING, IDC_ARROW, IDC_CROSS, IDC_HAND, IDC_HELP, IDC_IBEAM, IDC_NO, IDC_PERSON, IDC_PIN, IDC_SIZEALL, IDC_SIZENESW, IDC_SIZENS, IDC_SIZENWSE, IDC_SIZEWE, IDC_UPARROW, IDC_WAIT}}; - - #[inline] - fn load_cursor(lpcursorname: PCWSTR) -> *mut std::ffi::c_void { - unsafe { LoadCursorW(None, lpcursorname) } - .expect("Failed to load default system cursors") - .0 - } - - Ok(super::CursorShape::Windows(match cursor.0 { - ptr if ptr == load_cursor(IDC_ARROW) => CursorShapeWindows::Arrow, - ptr if ptr == load_cursor(IDC_IBEAM) => CursorShapeWindows::IBeam, - ptr if ptr == load_cursor(IDC_WAIT) => CursorShapeWindows::Wait, - ptr if ptr == load_cursor(IDC_CROSS) => CursorShapeWindows::Cross, - ptr if ptr == load_cursor(IDC_UPARROW) => CursorShapeWindows::UpArrow, - ptr if ptr == load_cursor(IDC_SIZENWSE) => CursorShapeWindows::SizeNWSE, - ptr if ptr == load_cursor(IDC_SIZENESW) => CursorShapeWindows::SizeNESW, - ptr if ptr == load_cursor(IDC_SIZEWE) => CursorShapeWindows::SizeWE, - ptr if ptr == load_cursor(IDC_SIZENS) => CursorShapeWindows::SizeNS, - ptr if ptr == load_cursor(IDC_SIZEALL) => CursorShapeWindows::SizeAll, - ptr if ptr == load_cursor(IDC_NO) => CursorShapeWindows::No, - ptr if ptr == load_cursor(IDC_HAND) => CursorShapeWindows::Hand, - ptr if ptr == load_cursor(IDC_APPSTARTING) => CursorShapeWindows::AppStarting, - ptr if ptr == load_cursor(IDC_HELP) => CursorShapeWindows::Help, - ptr if ptr == load_cursor(IDC_PIN) => CursorShapeWindows::Pin, - ptr if ptr == load_cursor(IDC_PERSON) => CursorShapeWindows::Person, - ptr if ptr == load_cursor(PCWSTR(32631u16 as _)) => CursorShapeWindows::Pen, - ptr if ptr == load_cursor(PCWSTR(32652u16 as _)) => CursorShapeWindows::ScrolNS, - ptr if ptr == load_cursor(PCWSTR(32653u16 as _)) => CursorShapeWindows::ScrollWE, - ptr if ptr == load_cursor(PCWSTR(32654u16 as _)) => CursorShapeWindows::ScrollNSEW, - ptr if ptr == load_cursor(PCWSTR(32655u16 as _)) => CursorShapeWindows::ScrollN, - ptr if ptr == load_cursor(PCWSTR(32656u16 as _)) => CursorShapeWindows::ScrollS, - ptr if ptr == load_cursor(PCWSTR(32657u16 as _)) => CursorShapeWindows::ScrollW, - ptr if ptr == load_cursor(PCWSTR(32658u16 as _)) => CursorShapeWindows::ScrollE, - ptr if ptr == load_cursor(PCWSTR(32659u16 as _)) => CursorShapeWindows::ScrollNW, - ptr if ptr == load_cursor(PCWSTR(32660u16 as _)) => CursorShapeWindows::ScrollNE, - ptr if ptr == load_cursor(PCWSTR(32661u16 as _)) => CursorShapeWindows::ScrollSW, - ptr if ptr == load_cursor(PCWSTR(32662u16 as _)) => CursorShapeWindows::ScrollSE, - ptr if ptr == load_cursor(PCWSTR(32663u16 as _)) => CursorShapeWindows::ArrowCD, - - // TODO: REST - _ => return Err(()), - })) - } -} - From 4812e797cefec29f7d338d92195def625918d717 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 20:13:37 +0800 Subject: [PATCH 21/29] windows cli + get hashes --- Cargo.lock | 21 ++--- crates/cursor-info/Cargo.toml | 2 + crates/cursor-info/examples/cli.rs | 74 ++++++++++------- crates/cursor-info/src/lib.rs | 30 +++++++ packages/ui-solid/src/auto-imports.d.ts | 103 +----------------------- 5 files changed, 89 insertions(+), 141 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9424a288a10..1d4266696bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -218,7 +218,7 @@ checksum = "df099ccb16cd014ff054ac1bf392c67feeef57164b05c42f037cd40f5d4357f4" dependencies = [ "clipboard-win", "core-graphics 0.23.2", - "image 0.25.5", + "image 0.25.6", "log", "objc2 0.5.2", "objc2-app-kit 0.2.2", @@ -1004,6 +1004,7 @@ name = "cap-cursor-info" version = "0.1.0" dependencies = [ "hex", + "image 0.25.6", "objc2 0.6.1", "objc2-app-kit 0.3.1", "serde", @@ -1045,7 +1046,7 @@ dependencies = [ "futures", "futures-intrusive", "global-hotkey", - "image 0.25.5", + "image 0.25.6", "keyed_priority_queue", "lazy_static", "log", @@ -1144,7 +1145,7 @@ dependencies = [ "clap 4.5.41", "ffmpeg-next", "futures", - "image 0.25.5", + "image 0.25.6", "inquire", "mp4", "serde", @@ -1198,7 +1199,7 @@ dependencies = [ "flume 0.11.0", "futures", "gif", - "image 0.25.5", + "image 0.25.6", "indexmap 2.10.0", "nokhwa", "nokhwa-bindings-macos", @@ -1252,7 +1253,7 @@ dependencies = [ "flume 0.11.0", "futures", "hex", - "image 0.25.5", + "image 0.25.6", "objc", "objc2-app-kit 0.3.1", "relative-path", @@ -1289,7 +1290,7 @@ dependencies = [ "futures", "futures-intrusive", "glyphon", - "image 0.25.5", + "image 0.25.6", "log", "pretty_assertions", "reactive_graph", @@ -1571,7 +1572,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afede46921767868c5c7f8f55202bdd8bec0bab6bc9605174200f45924f93c62" dependencies = [ "clipboard-win", - "image 0.25.5", + "image 0.25.6", "objc2 0.6.1", "objc2-app-kit 0.3.1", "objc2-foundation 0.3.1", @@ -3904,9 +3905,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.5" +version = "0.25.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" +checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" dependencies = [ "bytemuck", "byteorder-lite", @@ -7922,7 +7923,7 @@ dependencies = [ "heck 0.5.0", "http", "http-range", - "image 0.25.5", + "image 0.25.6", "jni", "libc", "log", diff --git a/crates/cursor-info/Cargo.toml b/crates/cursor-info/Cargo.toml index 13b28553d2d..88235c2f181 100644 --- a/crates/cursor-info/Cargo.toml +++ b/crates/cursor-info/Cargo.toml @@ -5,6 +5,7 @@ edition = "2024" [dependencies] hex = "0.4.3" +image = "0.25.6" serde = { version = "1.0.219", features = ["derive"] } sha2 = "0.10.9" specta = { workspace = true, features = ["derive"] } @@ -16,6 +17,7 @@ objc2 = "0.6.1" [target.'cfg(target_os= "windows")'.dependencies] windows = { workspace = true, features = [ + "Win32_Graphics_Gdi", "Win32_UI_WindowsAndMessaging", ] } diff --git a/crates/cursor-info/examples/cli.rs b/crates/cursor-info/examples/cli.rs index 74115a1ec10..a64e1d27b4b 100644 --- a/crates/cursor-info/examples/cli.rs +++ b/crates/cursor-info/examples/cli.rs @@ -2,15 +2,15 @@ use std::collections::HashMap; use sha2::{Digest, Sha256}; -#[allow(deprecated)] fn main() { #[cfg(any(target_os = "macos", target_os = "windows"))] - run(); - #[cfg(not(target_os = "macos"))] + return run(); + #[allow(unreachable_code)] panic!("Unsupported platform!"); } #[cfg(target_os = "macos")] +#[allow(deprecated)] fn run() { use objc2::{MainThreadMarker, rc::Retained}; use objc2_app_kit::{NSApplication, NSCursor}; @@ -82,27 +82,27 @@ fn run() { #[cfg(target_os = "windows")] fn run() { use windows::{ - Win32::{ + core::PCWSTR, Win32::{ Foundation::POINT, UI::WindowsAndMessaging::{ - CURSORINFO, CURSORINFO_FLAGS, GetCursorInfo, IDC_ARROW, LoadCursorW, + GetCursorInfo, GetIconInfo, LoadCursorW, CURSORINFO, CURSORINFO_FLAGS, HCURSOR, ICONINFO, IDC_APPSTARTING, IDC_ARROW, IDC_CROSS, IDC_HAND, IDC_HELP, IDC_IBEAM, IDC_NO, IDC_PERSON, IDC_PIN, IDC_SIZEALL, IDC_SIZENESW, IDC_SIZENS, IDC_SIZENWSE, IDC_SIZEWE, IDC_UPARROW, IDC_WAIT }, - }, - core::PCWSTR, + } }; #[inline] - fn load_cursor(lpcursorname: PCWSTR) -> *mut std::ffi::c_void { + fn load_cursor(lpcursorname: PCWSTR) -> HCURSOR { unsafe { LoadCursorW(None, lpcursorname) } .expect("Failed to load default system cursors") - .0 } - fn get_icon(cursor_info: CURSORINFO) -> Vec { + fn get_icon(hCursor: HCURSOR) -> Vec { + unsafe { // Get icon info + use windows::Win32::{Foundation::HWND, Graphics::Gdi::{CreateCompatibleDC, CreateDIBSection, DeleteDC, DeleteObject, GetDC, GetObjectA, ReleaseDC, SelectObject, BITMAP, BITMAPINFO, BITMAPINFOHEADER, DIB_RGB_COLORS}, UI::WindowsAndMessaging::{DrawIconEx, DI_NORMAL}}; let mut icon_info = ICONINFO::default(); - if GetIconInfo(cursor_info.hCursor, &mut icon_info).is_err() { - return None; + if GetIconInfo(hCursor, &mut icon_info).is_err() { + panic!("Error getting icon info"); } // Get bitmap info for the cursor @@ -121,12 +121,16 @@ fn run() { { // Clean up handles if !icon_info.hbmColor.is_invalid() { + use windows::Win32::Graphics::Gdi::DeleteObject; + DeleteObject(icon_info.hbmColor); } if !icon_info.hbmMask.is_invalid() { + use windows::Win32::Graphics::Gdi::DeleteObject; + DeleteObject(icon_info.hbmMask); } - return None; + panic!("Error"); } // Create DCs @@ -168,15 +172,21 @@ fn run() { if dib.is_err() { // Clean up + + use windows::Win32::Graphics::Gdi::{DeleteDC, ReleaseDC}; DeleteDC(mem_dc); ReleaseDC(HWND::default(), screen_dc); if !icon_info.hbmColor.is_invalid() { + use windows::Win32::Graphics::Gdi::DeleteObject; + DeleteObject(icon_info.hbmColor); } if !icon_info.hbmMask.is_invalid() { + use windows::Win32::Graphics::Gdi::DeleteObject; + DeleteObject(icon_info.hbmMask); } - return None; + panic!("Error"); } let dib = dib.unwrap(); @@ -189,7 +199,7 @@ fn run() { mem_dc, 0, 0, - cursor_info.hCursor, + hCursor, 0, // Use actual size 0, // Use actual size 0, @@ -199,6 +209,8 @@ fn run() { .is_err() { // Clean up + + use windows::Win32::Graphics::Gdi::{DeleteDC, DeleteObject, ReleaseDC}; SelectObject(mem_dc, old_bitmap); DeleteObject(dib); DeleteDC(mem_dc); @@ -209,7 +221,7 @@ fn run() { if !icon_info.hbmMask.is_invalid() { DeleteObject(icon_info.hbmMask); } - return None; + panic!("Error"); } // Get image data @@ -255,7 +267,7 @@ fn run() { } // Convert to RGBA image - let mut rgba_image = image::RgbaImage::from_raw(width as u32, height as u32, image_data)?; + let mut rgba_image = image::RgbaImage::from_raw(width as u32, height as u32, image_data).unwrap(); // For text cursor (I-beam), enhance visibility by adding a shadow/outline // Check if this is likely a text cursor by examining dimensions and pixels @@ -356,7 +368,8 @@ fn run() { trimmed } else { rgba_image - } + }.to_vec() + } } let cursors = vec![ @@ -391,11 +404,17 @@ fn run() { ("ArrowCD", load_cursor(PCWSTR(32663u16 as _))), ]; + let mut cursor_lookup = HashMap::new(); + for (name, cursor) in cursors { let icon = get_icon(cursor); - println!("{}: {}", name, hex::encode(Sha256::digest(icon))); + let hash = hex::encode(Sha256::digest(icon)); + println!("{name}: {hash}"); + cursor_lookup.insert(hash, name); } + return; + loop { let mut cursor_info = CURSORINFO { cbSize: std::mem::size_of::() as u32, @@ -412,17 +431,14 @@ fn run() { panic!("Hcursor is invalid") } - let trimmed_image = get_icon(cursor_info); + let trimmed_image = get_icon(cursor_info.hCursor); + + let hash = hex::encode(Sha256::digest(&trimmed_image)); - // Convert to PNG format - // let mut png_data = Vec::new(); - // trimmed_image - // .write_to( - // &mut std::io::Cursor::new(&mut png_data), - // image::ImageFormat::Png, - // ) - // .ok()?; + if !cursor_lookup.contains_key(&*hash) { + panic!("Found unknown cursor hash {hash}"); + } - println!("{}", hex::encode(Sha256::encode(&trimmed_image))); + println!("{hash} {}", cursor_lookup.get(&*hash).unwrap_or(&"Unknown")); } } diff --git a/crates/cursor-info/src/lib.rs b/crates/cursor-info/src/lib.rs index 50713b516af..124f6ebcd4c 100644 --- a/crates/cursor-info/src/lib.rs +++ b/crates/cursor-info/src/lib.rs @@ -104,6 +104,36 @@ impl ResolvedCursor { raw: include_str!("../assets/mac/ibeam_vertical.svg"), hotspot: (0.389, 0.25), // 14.0/36.0, 8.0/32.0 }, + // Running `target\debug\examples\cli.exe` + // IDC_ARROW: 19502718917bb8a86b83ffb168021cf90517b5c5e510c33423060d230c9e2d20 + // IDC_IBEAM: 77cc4cedcf68f3e1d41bfe16c567961b2306c6236b35b966cd3d5c9516565e33 + // IDC_WAIT: 5991d86a0d4e915dd0cb0fdd9bef3bf37ed6a3b321256fcb5b240db7ac1a6324 + // IDC_CROSS: cd2c775b1a124e4deaed1ed345efae25eb28a9133fc39691555902a2c1d7d578 + // IDC_UPARROW: 823d642acdc51ffbc29c2710303606270ed24936daf45215ead531333df102ba + // IDC_SIZENWSE: 2daf2a40e4c7ecadec3270fbdb243a12ac22a14bb0b3a08a56b38a38322f9296 + // IDC_SIZENESW: 47b4d609cb404feae70c7e20b525ac901d1e7a5f1a2e8a240418b3710ee43473 + // IDC_SIZEWE: 8a024cf4bec4d58a4c149af2320206088981357312b3d82fbfcc07bee38c71ac + // IDC_SIZENS: 253b9e5360de1e12561be6a8f84484d4b108fd54d31e7d2c8f3b66d1c71b9880 + // IDC_SIZEALL: 8066a12792e4e8ef21636e5ade61adaaf0fecc2ffc69536ffa0c2dd5bedc6903 + // IDC_NO: 7df883a459aced72acf32b969ff1119676d334d9acfcbe668ef92fe01094a7d6 + // IDC_HAND: 44a554b439a681410d337d239bf08afe7c66486538563ebb93dc1c309f0a9209 + // IDC_APPSTARTING: 1486a2339478da61a52a6eecf8ee3446be62f12d375dba8befd42bb553eea7bf + // IDC_HELP: 5d0b4df6188bc8d540abfbd4235199cc0f67fb41d5e0dcbfd40a3011f8808fea + // IDC_PIN: cb74a2d34774dbc43004882e43f9c058b2d2ee60184185567d0328ca013f5bc3 + // IDC_PERSON: 1f5209791a75916697c26cf2d018d267ae1102c71dbd196de6c83132f5627f09 + // Pen: 7340ea75802db8fef3a103e9385e65b2c8c358e077ef949faaf572fb502dd9e2 + // ScrolNS: 4c89e1d64c35cc88d09aaddcc78ab685ceab8d974006d3d94af23a9e888a74d7 + // ScrollWE: c5b16cfc625082dfdaa8e43111909baf9201fca39433ee8cdd117221f66cb4d1 + // ScrollNSEW: 65527a0605a3bf225f90b9fe5b27b1c70743f4fa017b780abe27d5910cfdf69d + // ScrollN: fe1b1ac207a874a452b4dd28949008282e6038c3ca903aba5da151d718e3d811 + // ScrollS: 1d7c1ea6ecedfa467c8b082f4082a8382c76d01033222f59f367267ba04c2b18 + // ScrollW: 81fc32f5284680bf9503fe6af204f4a2494da213de935e5e0a59e85ce3ed7685 + // ScrollE: c0a4f452e2f564bfa0193523e47ab4fbdcb9ac2c475566c01ef8df61752ab8af + // ScrollNW: b5c891535897b0665553d8ec1217a9919a1ca6147144d8b142516c9e829ca15a + // ScrollNE: 7b6008d5752a204e0aca2e45db3ea8d0901419b4d772c49bcb46821f9c23b85b + // ScrollSW: 56b8ae43318dd75770a10786e60b9f12f9ba8408eee8cb3a946a56ebbace7297 + // ScrollSE: 178f8c96aaace35760dd01d5a7d4341b0690f7e3de45919bfd696d0c60c14895 + // ArrowCD: a8bcbabdbb363b9be601cbeaa29b46e0e64834ff1ae0812646ad6d0c64efb2da _ => return None, }) } diff --git a/packages/ui-solid/src/auto-imports.d.ts b/packages/ui-solid/src/auto-imports.d.ts index d20fda03094..9d2400790b5 100644 --- a/packages/ui-solid/src/auto-imports.d.ts +++ b/packages/ui-solid/src/auto-imports.d.ts @@ -6,106 +6,5 @@ // biome-ignore lint: disable export {} declare global { - const IconCapArrows: typeof import('~icons/cap/arrows.jsx')['default'] - const IconCapAudioOn: typeof import('~icons/cap/audio-on.jsx')['default'] - const IconCapAuto: typeof import("~icons/cap/auto.jsx")["default"] - const IconCapBgBlur: typeof import('~icons/cap/bg-blur.jsx')['default'] - const IconCapBlur: typeof import("~icons/cap/blur.jsx")["default"] - const IconCapCamera: typeof import('~icons/cap/camera.jsx')['default'] - const IconCapCaptions: typeof import('~icons/cap/captions.jsx')['default'] - const IconCapCheck: typeof import("~icons/cap/check.jsx")["default"] - const IconCapChevronDown: typeof import('~icons/cap/chevron-down.jsx')['default'] - const IconCapCircle: typeof import('~icons/cap/circle.jsx')['default'] - const IconCapCircleCheck: typeof import('~icons/cap/circle-check.jsx')['default'] - const IconCapCirclePlus: typeof import('~icons/cap/circle-plus.jsx')['default'] - const IconCapCircleX: typeof import('~icons/cap/circle-x.jsx')['default'] - const IconCapClock: typeof import("~icons/cap/clock.jsx")["default"] - const IconCapCopy: typeof import('~icons/cap/copy.jsx')['default'] - const IconCapCorners: typeof import('~icons/cap/corners.jsx')['default'] - const IconCapCrop: typeof import('~icons/cap/crop.jsx')['default'] - const IconCapCursor: typeof import('~icons/cap/cursor.jsx')['default'] - const IconCapDownload: typeof import('~icons/cap/download.jsx')['default'] - const IconCapEditor: typeof import('~icons/cap/editor.jsx')['default'] - const IconCapEnlarge: typeof import('~icons/cap/enlarge.jsx')['default'] - const IconCapFile: typeof import('~icons/cap/file.jsx')['default'] - const IconCapFilmCut: typeof import('~icons/cap/film-cut.jsx')['default'] - const IconCapFrameFirst: typeof import("~icons/cap/frame-first.jsx")["default"] - const IconCapFrameLast: typeof import("~icons/cap/frame-last.jsx")["default"] - const IconCapGauge: typeof import('~icons/cap/gauge.jsx')['default'] - const IconCapHotkeys: typeof import('~icons/cap/hotkeys.jsx')['default'] - const IconCapImage: typeof import('~icons/cap/image.jsx')['default'] - const IconCapInfo: typeof import('~icons/cap/info.jsx')['default'] - const IconCapInset: typeof import("~icons/cap/inset.jsx")["default"] - const IconCapInstant: typeof import('~icons/cap/instant.jsx')['default'] - const IconCapLayout: typeof import('~icons/cap/layout.jsx')['default'] - const IconCapLink: typeof import('~icons/cap/link.jsx')['default'] - const IconCapLogo: typeof import('~icons/cap/logo.jsx')['default'] - const IconCapLogoFull: typeof import('~icons/cap/logo-full.jsx')['default'] - const IconCapLogoFullDark: typeof import('~icons/cap/logo-full-dark.jsx')['default'] - const IconCapMessageBubble: typeof import('~icons/cap/message-bubble.jsx')['default'] - const IconCapMicrophone: typeof import('~icons/cap/microphone.jsx')['default'] - const IconCapMoreVertical: typeof import('~icons/cap/more-vertical.jsx')['default'] - const IconCapMoveLeft: typeof import("~icons/cap/move-left.jsx")["default"] - const IconCapMoveRight: typeof import("~icons/cap/move-right.jsx")["default"] - const IconCapNext: typeof import('~icons/cap/next.jsx')['default'] - const IconCapPadding: typeof import('~icons/cap/padding.jsx')['default'] - const IconCapPause: typeof import('~icons/cap/pause.jsx')['default'] - const IconCapPauseCircle: typeof import('~icons/cap/pause-circle.jsx')['default'] - const IconCapPlay: typeof import('~icons/cap/play.jsx')['default'] - const IconCapPlayCircle: typeof import('~icons/cap/play-circle.jsx')['default'] - const IconCapPresets: typeof import('~icons/cap/presets.jsx')['default'] - const IconCapPrev: typeof import('~icons/cap/prev.jsx')['default'] - const IconCapRedo: typeof import('~icons/cap/redo.jsx')['default'] - const IconCapRefresh: typeof import('~icons/cap/refresh.jsx')['default'] - const IconCapRestart: typeof import('~icons/cap/restart.jsx')['default'] - const IconCapScissors: typeof import('~icons/cap/scissors.jsx')['default'] - const IconCapSettings: typeof import('~icons/cap/settings.jsx')['default'] - const IconCapShadow: typeof import('~icons/cap/shadow.jsx')['default'] - const IconCapSize: typeof import("~icons/cap/size.jsx")["default"] - const IconCapSquare: typeof import('~icons/cap/square.jsx')['default'] - const IconCapStop: typeof import("~icons/cap/stop.jsx")["default"] - const IconCapStopCircle: typeof import('~icons/cap/stop-circle.jsx')['default'] - const IconCapTrash: typeof import('~icons/cap/trash.jsx')['default'] - const IconCapUndo: typeof import('~icons/cap/undo.jsx')['default'] - const IconCapUpload: typeof import('~icons/cap/upload.jsx')['default'] - const IconCapWindow: typeof import('~icons/cap/window.jsx')['default'] - const IconCapX: typeof import('~icons/cap/x.jsx')['default'] - const IconCapZoomIn: typeof import('~icons/cap/zoom-in.jsx')['default'] - const IconCapZoomOut: typeof import('~icons/cap/zoom-out.jsx')['default'] - const IconHugeiconsEaseCurveControlPoints: typeof import('~icons/hugeicons/ease-curve-control-points.jsx')['default'] - const IconIcBaselineMonitor: typeof import("~icons/ic/baseline-monitor.jsx")["default"] - const IconIcRoundSearch: typeof import("~icons/ic/round-search.jsx")["default"] - const IconLucideBell: typeof import('~icons/lucide/bell.jsx')['default'] - const IconLucideBug: typeof import('~icons/lucide/bug.jsx')['default'] - const IconLucideCamera: typeof import("~icons/lucide/camera.jsx")["default"] - const IconLucideCheck: typeof import('~icons/lucide/check.jsx')['default'] - const IconLucideChevronDown: typeof import("~icons/lucide/chevron-down.jsx")["default"] - const IconLucideClock: typeof import('~icons/lucide/clock.jsx')['default'] - const IconLucideDatabase: typeof import('~icons/lucide/database.jsx')['default'] - const IconLucideEdit: typeof import('~icons/lucide/edit.jsx')['default'] - const IconLucideEye: typeof import('~icons/lucide/eye.jsx')['default'] - const IconLucideFolder: typeof import('~icons/lucide/folder.jsx')['default'] - const IconLucideGift: typeof import('~icons/lucide/gift.jsx')['default'] - const IconLucideHardDrive: typeof import('~icons/lucide/hard-drive.jsx')['default'] - const IconLucideLayoutGrid: typeof import("~icons/lucide/layout-grid.jsx")["default"] - const IconLucideLoaderCircle: typeof import('~icons/lucide/loader-circle.jsx')['default'] - const IconLucideMessageCircle: typeof import("~icons/lucide/message-circle.jsx")["default"] - const IconLucideMessageSquare: typeof import("~icons/lucide/message-square.jsx")["default"] - const IconLucideMessageSquarePlus: typeof import('~icons/lucide/message-square-plus.jsx')['default'] - const IconLucideMicOff: typeof import('~icons/lucide/mic-off.jsx')['default'] - const IconLucideMonitor: typeof import('~icons/lucide/monitor.jsx')['default'] - const IconLucideRabbit: typeof import("~icons/lucide/rabbit.jsx")["default"] - const IconLucideRectangle: typeof import('~icons/lucide/rectangle.jsx')['default'] - const IconLucideRectangleHorizontal: typeof import('~icons/lucide/rectangle-horizontal.jsx')['default'] - const IconLucideRectangleSquare: typeof import('~icons/lucide/rectangle-square.jsx')['default'] - const IconLucideRotateCcw: typeof import('~icons/lucide/rotate-ccw.jsx')['default'] - const IconLucideSearch: typeof import('~icons/lucide/search.jsx')['default'] - const IconLucideSquarePlay: typeof import('~icons/lucide/square-play.jsx')['default'] - const IconLucideUnplug: typeof import('~icons/lucide/unplug.jsx')['default'] - const IconLucideVideo: typeof import("~icons/lucide/video.jsx")["default"] - const IconLucideVolume2: typeof import('~icons/lucide/volume2.jsx')['default'] - const IconLucideVolumeX: typeof import('~icons/lucide/volume-x.jsx')['default'] - const IconLucideX: typeof import('~icons/lucide/x.jsx')['default'] - const IconMdiMonitor: typeof import("~icons/mdi/monitor.jsx")["default"] - const IconPhMonitorBold: typeof import('~icons/ph/monitor-bold.jsx')['default'] + } From 09558ee78db59e47456d69edc44f54f7cfaab03f Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 20:20:33 +0800 Subject: [PATCH 22/29] macos hashes --- crates/cursor-info/src/lib.rs | 115 ++++++++++++++++++------- crates/cursor-info/src/windows.rs | 138 ------------------------------ 2 files changed, 85 insertions(+), 168 deletions(-) delete mode 100644 crates/cursor-info/src/windows.rs diff --git a/crates/cursor-info/src/lib.rs b/crates/cursor-info/src/lib.rs index 124f6ebcd4c..7240cbd2cda 100644 --- a/crates/cursor-info/src/lib.rs +++ b/crates/cursor-info/src/lib.rs @@ -104,36 +104,91 @@ impl ResolvedCursor { raw: include_str!("../assets/mac/ibeam_vertical.svg"), hotspot: (0.389, 0.25), // 14.0/36.0, 8.0/32.0 }, - // Running `target\debug\examples\cli.exe` - // IDC_ARROW: 19502718917bb8a86b83ffb168021cf90517b5c5e510c33423060d230c9e2d20 - // IDC_IBEAM: 77cc4cedcf68f3e1d41bfe16c567961b2306c6236b35b966cd3d5c9516565e33 - // IDC_WAIT: 5991d86a0d4e915dd0cb0fdd9bef3bf37ed6a3b321256fcb5b240db7ac1a6324 - // IDC_CROSS: cd2c775b1a124e4deaed1ed345efae25eb28a9133fc39691555902a2c1d7d578 - // IDC_UPARROW: 823d642acdc51ffbc29c2710303606270ed24936daf45215ead531333df102ba - // IDC_SIZENWSE: 2daf2a40e4c7ecadec3270fbdb243a12ac22a14bb0b3a08a56b38a38322f9296 - // IDC_SIZENESW: 47b4d609cb404feae70c7e20b525ac901d1e7a5f1a2e8a240418b3710ee43473 - // IDC_SIZEWE: 8a024cf4bec4d58a4c149af2320206088981357312b3d82fbfcc07bee38c71ac - // IDC_SIZENS: 253b9e5360de1e12561be6a8f84484d4b108fd54d31e7d2c8f3b66d1c71b9880 - // IDC_SIZEALL: 8066a12792e4e8ef21636e5ade61adaaf0fecc2ffc69536ffa0c2dd5bedc6903 - // IDC_NO: 7df883a459aced72acf32b969ff1119676d334d9acfcbe668ef92fe01094a7d6 - // IDC_HAND: 44a554b439a681410d337d239bf08afe7c66486538563ebb93dc1c309f0a9209 - // IDC_APPSTARTING: 1486a2339478da61a52a6eecf8ee3446be62f12d375dba8befd42bb553eea7bf - // IDC_HELP: 5d0b4df6188bc8d540abfbd4235199cc0f67fb41d5e0dcbfd40a3011f8808fea - // IDC_PIN: cb74a2d34774dbc43004882e43f9c058b2d2ee60184185567d0328ca013f5bc3 - // IDC_PERSON: 1f5209791a75916697c26cf2d018d267ae1102c71dbd196de6c83132f5627f09 - // Pen: 7340ea75802db8fef3a103e9385e65b2c8c358e077ef949faaf572fb502dd9e2 - // ScrolNS: 4c89e1d64c35cc88d09aaddcc78ab685ceab8d974006d3d94af23a9e888a74d7 - // ScrollWE: c5b16cfc625082dfdaa8e43111909baf9201fca39433ee8cdd117221f66cb4d1 - // ScrollNSEW: 65527a0605a3bf225f90b9fe5b27b1c70743f4fa017b780abe27d5910cfdf69d - // ScrollN: fe1b1ac207a874a452b4dd28949008282e6038c3ca903aba5da151d718e3d811 - // ScrollS: 1d7c1ea6ecedfa467c8b082f4082a8382c76d01033222f59f367267ba04c2b18 - // ScrollW: 81fc32f5284680bf9503fe6af204f4a2494da213de935e5e0a59e85ce3ed7685 - // ScrollE: c0a4f452e2f564bfa0193523e47ab4fbdcb9ac2c475566c01ef8df61752ab8af - // ScrollNW: b5c891535897b0665553d8ec1217a9919a1ca6147144d8b142516c9e829ca15a - // ScrollNE: 7b6008d5752a204e0aca2e45db3ea8d0901419b4d772c49bcb46821f9c23b85b - // ScrollSW: 56b8ae43318dd75770a10786e60b9f12f9ba8408eee8cb3a946a56ebbace7297 - // ScrollSE: 178f8c96aaace35760dd01d5a7d4341b0690f7e3de45919bfd696d0c60c14895 - // ArrowCD: a8bcbabdbb363b9be601cbeaa29b46e0e64834ff1ae0812646ad6d0c64efb2da + // IDC_ARROW + "19502718917bb8a86b83ffb168021cf90517b5c5e510c33423060d230c9e2d20" => esolvedCursor { + raw: include_str!("../assets/windows/arrow.svg"), + hotspot: todo!(), + }, + // IDC_IBEAM + "77cc4cedcf68f3e1d41bfe16c567961b2306c6236b35b966cd3d5c9516565e33" => ResolvedCursor { + raw: include_str!("../assets/windows/ibeam.svg"), + hotspot: todo!(), + }, + // IDC_WAIT + "5991d86a0d4e915dd0cb0fdd9bef3bf37ed6a3b321256fcb5b240db7ac1a6324" => ResolvedCursor { + raw: include_str!("../assets/windows/wait.svg"), + hotspot: todo!(), + }, + // IDC_CROSS + "cd2c775b1a124e4deaed1ed345efae25eb28a9133fc39691555902a2c1d7d578" => ResolvedCursor { + raw: include_str!("../assets/windows/cross.svg"), + hotspot: todo!(), + }, + // IDC_UPARROW + "823d642acdc51ffbc29c2710303606270ed24936daf45215ead531333df102ba" => todo!(), + // IDC_SIZENWSE + "2daf2a40e4c7ecadec3270fbdb243a12ac22a14bb0b3a08a56b38a38322f9296" => todo!(), + // IDC_SIZENESW + "47b4d609cb404feae70c7e20b525ac901d1e7a5f1a2e8a240418b3710ee43473" => ResolvedCursor { + raw: include_str!("../assets/windows/size-nesw.svg"), + hotspot: todo!(), + }, + // IDC_SIZEWE + "8a024cf4bec4d58a4c149af2320206088981357312b3d82fbfcc07bee38c71ac" => todo!(), + // IDC_SIZENS + "253b9e5360de1e12561be6a8f84484d4b108fd54d31e7d2c8f3b66d1c71b9880" => ResolvedCursor { + raw: include_str!("../assets/windows/size-ns.svg"), + hotspot: todo!(), + }, + // IDC_SIZEALL + "8066a12792e4e8ef21636e5ade61adaaf0fecc2ffc69536ffa0c2dd5bedc6903" => todo!(), + // IDC_NO + "7df883a459aced72acf32b969ff1119676d334d9acfcbe668ef92fe01094a7d6" => ResolvedCursor { + raw: include_str!("../assets/windows/no.svg"), + hotspot: todo!(), + }, + // IDC_HAND + "44a554b439a681410d337d239bf08afe7c66486538563ebb93dc1c309f0a9209" => ResolvedCursor { + raw: include_str!("../assets/windows/hand.svg"), + hotspot: todo!(), + }, + // IDC_APPSTARTING + "1486a2339478da61a52a6eecf8ee3446be62f12d375dba8befd42bb553eea7bf" => todo!(), + // IDC_HELP + "5d0b4df6188bc8d540abfbd4235199cc0f67fb41d5e0dcbfd40a3011f8808fea" => todo!(), + // IDC_PIN + "cb74a2d34774dbc43004882e43f9c058b2d2ee60184185567d0328ca013f5bc3" => todo!(), + // IDC_PERSON + "1f5209791a75916697c26cf2d018d267ae1102c71dbd196de6c83132f5627f09" => todo!(), + // MAKEINTRESOURCE(32631) - Pen + "7340ea75802db8fef3a103e9385e65b2c8c358e077ef949faaf572fb502dd9e2" => ResolvedCursor { + raw: include_str!("../assets/windows/pen.svg"), + hotspot: todo!(), + }, + // MAKEINTRESOURCE(32652) - ScrolNS + "4c89e1d64c35cc88d09aaddcc78ab685ceab8d974006d3d94af23a9e888a74d7" => todo!(), + // MAKEINTRESOURCE(32653) - ScrollWE + "c5b16cfc625082dfdaa8e43111909baf9201fca39433ee8cdd117221f66cb4d1" => todo!(), + // MAKEINTRESOURCE(32654) - ScrollNSEW + "65527a0605a3bf225f90b9fe5b27b1c70743f4fa017b780abe27d5910cfdf69d" => todo!(), + // MAKEINTRESOURCE(32655) - ScrollN + "fe1b1ac207a874a452b4dd28949008282e6038c3ca903aba5da151d718e3d811" => todo!(), + // MAKEINTRESOURCE(32656) - ScrollS + "1d7c1ea6ecedfa467c8b082f4082a8382c76d01033222f59f367267ba04c2b18" => todo!(), + // MAKEINTRESOURCE(32657) - ScrollW + "81fc32f5284680bf9503fe6af204f4a2494da213de935e5e0a59e85ce3ed7685" => todo!(), + // MAKEINTRESOURCE(32658) - ScrollE + "c0a4f452e2f564bfa0193523e47ab4fbdcb9ac2c475566c01ef8df61752ab8af" => todo!(), + // MAKEINTRESOURCE(32659) - ScrollNW + "b5c891535897b0665553d8ec1217a9919a1ca6147144d8b142516c9e829ca15a" => todo!(), + // MAKEINTRESOURCE(32660) - ScrollNE + "7b6008d5752a204e0aca2e45db3ea8d0901419b4d772c49bcb46821f9c23b85b" => todo!(), + // MAKEINTRESOURCE(32661) - ScrollSW + "56b8ae43318dd75770a10786e60b9f12f9ba8408eee8cb3a946a56ebbace7297" => todo!(), + // MAKEINTRESOURCE(32662) - ScrollSE + "178f8c96aaace35760dd01d5a7d4341b0690f7e3de45919bfd696d0c60c14895" => todo!(), + // MAKEINTRESOURCE(32663) - ArrowCD + "a8bcbabdbb363b9be601cbeaa29b46e0e64834ff1ae0812646ad6d0c64efb2da" => todo!(), _ => return None, }) } diff --git a/crates/cursor-info/src/windows.rs b/crates/cursor-info/src/windows.rs deleted file mode 100644 index 96a7f304865..00000000000 --- a/crates/cursor-info/src/windows.rs +++ /dev/null @@ -1,138 +0,0 @@ -use strum::{EnumString, IntoStaticStr}; - -use crate::ResolvedCursor; - -// https://learn.microsoft.com/en-us/windows/win32/menurc/about-cursors -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, EnumString, IntoStaticStr)] -pub enum CursorShapeWindows { - /// IDC_ARROW - Arrow, - /// IDC_IBEAM - IBeam, - /// IDC_WAIT - Wait, - /// IDC_CROSS - Cross, - /// IDC_UPARROW - UpArrow, - /// IDC_SIZENWSE - SizeNWSE, - /// IDC_SIZENESW - SizeNESW, - /// IDC_SIZEWE - SizeWE, - /// IDC_SIZENS - SizeNS, - /// IDC_SIZEALL - SizeAll, - /// IDC_NO - No, - /// IDC_HAND - Hand, - /// IDC_APPSTARTING - AppStarting, - /// IDC_HELP - Help, - /// IDC_PIN - Pin, - /// IDC_PERSON - Person, - /// MAKEINTRESOURCE(32631) - Pen, - /// MAKEINTRESOURCE(32652) - ScrolNS, - /// MAKEINTRESOURCE(32653) - ScrollWE, - /// MAKEINTRESOURCE(32654) - ScrollNSEW, - /// MAKEINTRESOURCE(32655) - ScrollN, - /// MAKEINTRESOURCE(32656) - ScrollS, - /// MAKEINTRESOURCE(32657) - ScrollW, - /// MAKEINTRESOURCE(32658) - ScrollE, - /// MAKEINTRESOURCE(32659) - ScrollNW, - /// MAKEINTRESOURCE(32660) - ScrollNE, - /// MAKEINTRESOURCE(32661) - ScrollSW, - /// MAKEINTRESOURCE(32662) - ScrollSE, - /// MAKEINTRESOURCE(32663) - ArrowCD, -} - -impl CursorShapeWindows { - pub fn info(&self) -> Option { - Some(match self { - CursorShapeWindows::Arrow => ResolvedCursor { - raw: include_str!("../assets/windows/arrow.svg"), - hotspot: todo!(), - }, - CursorShapeWindows::IBeam => ResolvedCursor { - raw: include_str!("../assets/windows/ibeam.svg"), - hotspot: todo!(), - }, - CursorShapeWindows::Wait => ResolvedCursor { - raw: include_str!("../assets/windows/wait.svg"), - hotspot: todo!(), - }, - CursorShapeWindows::Cross => ResolvedCursor { - raw: include_str!("../assets/windows/cross.svg"), - hotspot: todo!(), - }, - CursorShapeWindows::UpArrow => todo!(), - CursorShapeWindows::SizeNWSE => todo!(), - CursorShapeWindows::SizeNESW => ResolvedCursor { - raw: include_str!("../assets/windows/size-nesw.svg"), - hotspot: todo!(), - }, - CursorShapeWindows::SizeWE => todo!(), - CursorShapeWindows::SizeNS => ResolvedCursor { - raw: include_str!("../assets/windows/size-ns.svg"), - hotspot: todo!(), - }, - CursorShapeWindows::SizeAll => todo!(), - CursorShapeWindows::No => ResolvedCursor { - raw: include_str!("../assets/windows/no.svg"), - hotspot: todo!(), - }, - CursorShapeWindows::Hand => ResolvedCursor { - raw: include_str!("../assets/windows/hand.svg"), - hotspot: todo!(), - }, - CursorShapeWindows::AppStarting => todo!(), - CursorShapeWindows::Help => todo!(), - CursorShapeWindows::Pin => todo!(), - CursorShapeWindows::Person => todo!(), - CursorShapeWindows::Pen => ResolvedCursor { - raw: include_str!("../assets/windows/pen.svg"), - hotspot: todo!(), - }, - CursorShapeWindows::ScrolNS => todo!(), - CursorShapeWindows::ScrollWE => todo!(), - CursorShapeWindows::ScrollNSEW => todo!(), - CursorShapeWindows::ScrollN => todo!(), - CursorShapeWindows::ScrollS => todo!(), - CursorShapeWindows::ScrollW => todo!(), - CursorShapeWindows::ScrollE => todo!(), - CursorShapeWindows::ScrollNW => todo!(), - CursorShapeWindows::ScrollNE => todo!(), - CursorShapeWindows::ScrollSW => todo!(), - CursorShapeWindows::ScrollSE => todo!(), - CursorShapeWindows::ArrowCD => todo!(), - _ => return None, - }) - } - - /// Get the hotspot of the cursor shape. - pub fn hotspot(&self) -> (f64, f64) { - match self { - // TODO: Implement this - _ => (0.0, 0.0), - } - } -} From bf14b449d4cb2233668a948969da43388e3db5d3 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 20:24:17 +0800 Subject: [PATCH 23/29] disable Windows cursors without assets --- crates/cursor-info/src/lib.rs | 93 ++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 41 deletions(-) diff --git a/crates/cursor-info/src/lib.rs b/crates/cursor-info/src/lib.rs index 7240cbd2cda..d8d69f34b74 100644 --- a/crates/cursor-info/src/lib.rs +++ b/crates/cursor-info/src/lib.rs @@ -17,6 +17,11 @@ impl ResolvedCursor { /// interpretation without rerecording if we were to support custom cursors or add new OS cursors. pub fn from_hash(s: String) -> Option { Some(match s.as_str() { + // + // macOS Cursors + // https://developer.apple.com/documentation/appkit/nscursor + // + // https://developer.apple.com/documentation/appkit/nscursor/arrow "de2d1f4a81e520b65fd1317b845b00a1c51a4d1f71cca3cd4ccdab52b98d1ac9" => ResolvedCursor { raw: include_str!("../assets/mac/arrow.svg"), @@ -104,8 +109,14 @@ impl ResolvedCursor { raw: include_str!("../assets/mac/ibeam_vertical.svg"), hotspot: (0.389, 0.25), // 14.0/36.0, 8.0/32.0 }, + + // + // Windows Cursors + // https://learn.microsoft.com/en-us/windows/win32/menurc/about-cursors + // + // IDC_ARROW - "19502718917bb8a86b83ffb168021cf90517b5c5e510c33423060d230c9e2d20" => esolvedCursor { + "19502718917bb8a86b83ffb168021cf90517b5c5e510c33423060d230c9e2d20" => ResolvedCursor { raw: include_str!("../assets/windows/arrow.svg"), hotspot: todo!(), }, @@ -124,24 +135,24 @@ impl ResolvedCursor { raw: include_str!("../assets/windows/cross.svg"), hotspot: todo!(), }, - // IDC_UPARROW - "823d642acdc51ffbc29c2710303606270ed24936daf45215ead531333df102ba" => todo!(), - // IDC_SIZENWSE - "2daf2a40e4c7ecadec3270fbdb243a12ac22a14bb0b3a08a56b38a38322f9296" => todo!(), + // // IDC_UPARROW + // "823d642acdc51ffbc29c2710303606270ed24936daf45215ead531333df102ba" => todo!(), + // // IDC_SIZENWSE + // "2daf2a40e4c7ecadec3270fbdb243a12ac22a14bb0b3a08a56b38a38322f9296" => todo!(), // IDC_SIZENESW "47b4d609cb404feae70c7e20b525ac901d1e7a5f1a2e8a240418b3710ee43473" => ResolvedCursor { raw: include_str!("../assets/windows/size-nesw.svg"), hotspot: todo!(), }, - // IDC_SIZEWE - "8a024cf4bec4d58a4c149af2320206088981357312b3d82fbfcc07bee38c71ac" => todo!(), + // // IDC_SIZEWE + // "8a024cf4bec4d58a4c149af2320206088981357312b3d82fbfcc07bee38c71ac" => todo!(), // IDC_SIZENS "253b9e5360de1e12561be6a8f84484d4b108fd54d31e7d2c8f3b66d1c71b9880" => ResolvedCursor { raw: include_str!("../assets/windows/size-ns.svg"), hotspot: todo!(), }, - // IDC_SIZEALL - "8066a12792e4e8ef21636e5ade61adaaf0fecc2ffc69536ffa0c2dd5bedc6903" => todo!(), + // // IDC_SIZEALL + // "8066a12792e4e8ef21636e5ade61adaaf0fecc2ffc69536ffa0c2dd5bedc6903" => todo!(), // IDC_NO "7df883a459aced72acf32b969ff1119676d334d9acfcbe668ef92fe01094a7d6" => ResolvedCursor { raw: include_str!("../assets/windows/no.svg"), @@ -152,43 +163,43 @@ impl ResolvedCursor { raw: include_str!("../assets/windows/hand.svg"), hotspot: todo!(), }, - // IDC_APPSTARTING - "1486a2339478da61a52a6eecf8ee3446be62f12d375dba8befd42bb553eea7bf" => todo!(), - // IDC_HELP - "5d0b4df6188bc8d540abfbd4235199cc0f67fb41d5e0dcbfd40a3011f8808fea" => todo!(), - // IDC_PIN - "cb74a2d34774dbc43004882e43f9c058b2d2ee60184185567d0328ca013f5bc3" => todo!(), - // IDC_PERSON - "1f5209791a75916697c26cf2d018d267ae1102c71dbd196de6c83132f5627f09" => todo!(), + // // IDC_APPSTARTING + // "1486a2339478da61a52a6eecf8ee3446be62f12d375dba8befd42bb553eea7bf" => todo!(), + // // IDC_HELP + // "5d0b4df6188bc8d540abfbd4235199cc0f67fb41d5e0dcbfd40a3011f8808fea" => todo!(), + // // IDC_PIN + // "cb74a2d34774dbc43004882e43f9c058b2d2ee60184185567d0328ca013f5bc3" => todo!(), + // // IDC_PERSON + // "1f5209791a75916697c26cf2d018d267ae1102c71dbd196de6c83132f5627f09" => todo!(), // MAKEINTRESOURCE(32631) - Pen "7340ea75802db8fef3a103e9385e65b2c8c358e077ef949faaf572fb502dd9e2" => ResolvedCursor { raw: include_str!("../assets/windows/pen.svg"), hotspot: todo!(), }, - // MAKEINTRESOURCE(32652) - ScrolNS - "4c89e1d64c35cc88d09aaddcc78ab685ceab8d974006d3d94af23a9e888a74d7" => todo!(), - // MAKEINTRESOURCE(32653) - ScrollWE - "c5b16cfc625082dfdaa8e43111909baf9201fca39433ee8cdd117221f66cb4d1" => todo!(), - // MAKEINTRESOURCE(32654) - ScrollNSEW - "65527a0605a3bf225f90b9fe5b27b1c70743f4fa017b780abe27d5910cfdf69d" => todo!(), - // MAKEINTRESOURCE(32655) - ScrollN - "fe1b1ac207a874a452b4dd28949008282e6038c3ca903aba5da151d718e3d811" => todo!(), - // MAKEINTRESOURCE(32656) - ScrollS - "1d7c1ea6ecedfa467c8b082f4082a8382c76d01033222f59f367267ba04c2b18" => todo!(), - // MAKEINTRESOURCE(32657) - ScrollW - "81fc32f5284680bf9503fe6af204f4a2494da213de935e5e0a59e85ce3ed7685" => todo!(), - // MAKEINTRESOURCE(32658) - ScrollE - "c0a4f452e2f564bfa0193523e47ab4fbdcb9ac2c475566c01ef8df61752ab8af" => todo!(), - // MAKEINTRESOURCE(32659) - ScrollNW - "b5c891535897b0665553d8ec1217a9919a1ca6147144d8b142516c9e829ca15a" => todo!(), - // MAKEINTRESOURCE(32660) - ScrollNE - "7b6008d5752a204e0aca2e45db3ea8d0901419b4d772c49bcb46821f9c23b85b" => todo!(), - // MAKEINTRESOURCE(32661) - ScrollSW - "56b8ae43318dd75770a10786e60b9f12f9ba8408eee8cb3a946a56ebbace7297" => todo!(), - // MAKEINTRESOURCE(32662) - ScrollSE - "178f8c96aaace35760dd01d5a7d4341b0690f7e3de45919bfd696d0c60c14895" => todo!(), - // MAKEINTRESOURCE(32663) - ArrowCD - "a8bcbabdbb363b9be601cbeaa29b46e0e64834ff1ae0812646ad6d0c64efb2da" => todo!(), + // // MAKEINTRESOURCE(32652) - ScrolNS + // "4c89e1d64c35cc88d09aaddcc78ab685ceab8d974006d3d94af23a9e888a74d7" => todo!(), + // // MAKEINTRESOURCE(32653) - ScrollWE + // "c5b16cfc625082dfdaa8e43111909baf9201fca39433ee8cdd117221f66cb4d1" => todo!(), + // // MAKEINTRESOURCE(32654) - ScrollNSEW + // "65527a0605a3bf225f90b9fe5b27b1c70743f4fa017b780abe27d5910cfdf69d" => todo!(), + // // MAKEINTRESOURCE(32655) - ScrollN + // "fe1b1ac207a874a452b4dd28949008282e6038c3ca903aba5da151d718e3d811" => todo!(), + // // MAKEINTRESOURCE(32656) - ScrollS + // "1d7c1ea6ecedfa467c8b082f4082a8382c76d01033222f59f367267ba04c2b18" => todo!(), + // // MAKEINTRESOURCE(32657) - ScrollW + // "81fc32f5284680bf9503fe6af204f4a2494da213de935e5e0a59e85ce3ed7685" => todo!(), + // // MAKEINTRESOURCE(32658) - ScrollE + // "c0a4f452e2f564bfa0193523e47ab4fbdcb9ac2c475566c01ef8df61752ab8af" => todo!(), + // // MAKEINTRESOURCE(32659) - ScrollNW + // "b5c891535897b0665553d8ec1217a9919a1ca6147144d8b142516c9e829ca15a" => todo!(), + // // MAKEINTRESOURCE(32660) - ScrollNE + // "7b6008d5752a204e0aca2e45db3ea8d0901419b4d772c49bcb46821f9c23b85b" => todo!(), + // // MAKEINTRESOURCE(32661) - ScrollSW + // "56b8ae43318dd75770a10786e60b9f12f9ba8408eee8cb3a946a56ebbace7297" => todo!(), + // // MAKEINTRESOURCE(32662) - ScrollSE + // "178f8c96aaace35760dd01d5a7d4341b0690f7e3de45919bfd696d0c60c14895" => todo!(), + // // MAKEINTRESOURCE(32663) - ArrowCD + // "a8bcbabdbb363b9be601cbeaa29b46e0e64834ff1ae0812646ad6d0c64efb2da" => todo!(), _ => return None, }) } From c86e4397b3e2f20857852561015386d9f6880d42 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 20:31:40 +0800 Subject: [PATCH 24/29] hotspot viewer --- crates/cursor-info/assets/mac/LICENCE | 3 + crates/cursor-info/cursor-viewer.html | 418 ++++++++++++++++++++++++++ 2 files changed, 421 insertions(+) create mode 100644 crates/cursor-info/assets/mac/LICENCE create mode 100644 crates/cursor-info/cursor-viewer.html diff --git a/crates/cursor-info/assets/mac/LICENCE b/crates/cursor-info/assets/mac/LICENCE new file mode 100644 index 00000000000..915e9e7330c --- /dev/null +++ b/crates/cursor-info/assets/mac/LICENCE @@ -0,0 +1,3 @@ +This software is released under the Apple User Agreement. + +Icons taken from: https://github.com/daviddarnes/mac-cursors diff --git a/crates/cursor-info/cursor-viewer.html b/crates/cursor-info/cursor-viewer.html new file mode 100644 index 00000000000..f4769238deb --- /dev/null +++ b/crates/cursor-info/cursor-viewer.html @@ -0,0 +1,418 @@ + + + + + + Cursor Hotspot Viewer + + + +
+

Cursor Hotspot Viewer

+

Hover over cursors to see mouse coordinates, click to copy hotspot values

+
+ +
+

macOS Cursors

+
+
+ +
+

Windows Cursors

+
+
+ + + + From 4decc31a43e541894259a2a8bb92a39fcc106d71 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 20:39:15 +0800 Subject: [PATCH 25/29] windows cursor hotspots + cursor viewer site --- crates/cursor-info/cursor-viewer.html | 418 ------------------------- crates/cursor-info/cursors.html | 427 ++++++++++++++++++++++++++ crates/cursor-info/src/lib.rs | 18 +- 3 files changed, 436 insertions(+), 427 deletions(-) delete mode 100644 crates/cursor-info/cursor-viewer.html create mode 100644 crates/cursor-info/cursors.html diff --git a/crates/cursor-info/cursor-viewer.html b/crates/cursor-info/cursor-viewer.html deleted file mode 100644 index f4769238deb..00000000000 --- a/crates/cursor-info/cursor-viewer.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - Cursor Hotspot Viewer - - - -
-

Cursor Hotspot Viewer

-

Hover over cursors to see mouse coordinates, click to copy hotspot values

-
- -
-

macOS Cursors

-
-
- -
-

Windows Cursors

-
-
- - - - diff --git a/crates/cursor-info/cursors.html b/crates/cursor-info/cursors.html new file mode 100644 index 00000000000..df920e5f02e --- /dev/null +++ b/crates/cursor-info/cursors.html @@ -0,0 +1,427 @@ + + + + + + Cursor Hotspot Viewer + + + +
+

Cursor Hotspot Viewer

+

+ Hover over cursors to see mouse coordinates, click to copy hotspot + values +

+
+ +
+

macOS Cursors

+
+
+ +
+

Windows Cursors

+
+
+ + + + diff --git a/crates/cursor-info/src/lib.rs b/crates/cursor-info/src/lib.rs index d8d69f34b74..db0a9b3c2ff 100644 --- a/crates/cursor-info/src/lib.rs +++ b/crates/cursor-info/src/lib.rs @@ -118,22 +118,22 @@ impl ResolvedCursor { // IDC_ARROW "19502718917bb8a86b83ffb168021cf90517b5c5e510c33423060d230c9e2d20" => ResolvedCursor { raw: include_str!("../assets/windows/arrow.svg"), - hotspot: todo!(), + hotspot: (0.027, 0.041), // Arrow tip at top-left }, // IDC_IBEAM "77cc4cedcf68f3e1d41bfe16c567961b2306c6236b35b966cd3d5c9516565e33" => ResolvedCursor { raw: include_str!("../assets/windows/ibeam.svg"), - hotspot: todo!(), + hotspot: (0.5, 0.5), // Center of I-beam }, // IDC_WAIT "5991d86a0d4e915dd0cb0fdd9bef3bf37ed6a3b321256fcb5b240db7ac1a6324" => ResolvedCursor { raw: include_str!("../assets/windows/wait.svg"), - hotspot: todo!(), + hotspot: (0.5, 0.5), // Center of hourglass }, // IDC_CROSS "cd2c775b1a124e4deaed1ed345efae25eb28a9133fc39691555902a2c1d7d578" => ResolvedCursor { raw: include_str!("../assets/windows/cross.svg"), - hotspot: todo!(), + hotspot: (0.5, 0.5), // Center of crosshair }, // // IDC_UPARROW // "823d642acdc51ffbc29c2710303606270ed24936daf45215ead531333df102ba" => todo!(), @@ -142,26 +142,26 @@ impl ResolvedCursor { // IDC_SIZENESW "47b4d609cb404feae70c7e20b525ac901d1e7a5f1a2e8a240418b3710ee43473" => ResolvedCursor { raw: include_str!("../assets/windows/size-nesw.svg"), - hotspot: todo!(), + hotspot: (0.5, 0.5), // Center of resize cursor }, // // IDC_SIZEWE // "8a024cf4bec4d58a4c149af2320206088981357312b3d82fbfcc07bee38c71ac" => todo!(), // IDC_SIZENS "253b9e5360de1e12561be6a8f84484d4b108fd54d31e7d2c8f3b66d1c71b9880" => ResolvedCursor { raw: include_str!("../assets/windows/size-ns.svg"), - hotspot: todo!(), + hotspot: (0.5, 0.5), // Center of vertical resize cursor }, // // IDC_SIZEALL // "8066a12792e4e8ef21636e5ade61adaaf0fecc2ffc69536ffa0c2dd5bedc6903" => todo!(), // IDC_NO "7df883a459aced72acf32b969ff1119676d334d9acfcbe668ef92fe01094a7d6" => ResolvedCursor { raw: include_str!("../assets/windows/no.svg"), - hotspot: todo!(), + hotspot: (0.5, 0.5), // Center of "not allowed" symbol }, // IDC_HAND "44a554b439a681410d337d239bf08afe7c66486538563ebb93dc1c309f0a9209" => ResolvedCursor { raw: include_str!("../assets/windows/hand.svg"), - hotspot: todo!(), + hotspot: (0.421, 0.009), // Tip of pointing finger }, // // IDC_APPSTARTING // "1486a2339478da61a52a6eecf8ee3446be62f12d375dba8befd42bb553eea7bf" => todo!(), @@ -174,7 +174,7 @@ impl ResolvedCursor { // MAKEINTRESOURCE(32631) - Pen "7340ea75802db8fef3a103e9385e65b2c8c358e077ef949faaf572fb502dd9e2" => ResolvedCursor { raw: include_str!("../assets/windows/pen.svg"), - hotspot: todo!(), + hotspot: (0.03, 0.97), // Tip of pen at bottom-left }, // // MAKEINTRESOURCE(32652) - ScrolNS // "4c89e1d64c35cc88d09aaddcc78ab685ceab8d974006d3d94af23a9e888a74d7" => todo!(), From f9dbb91ac3259034dbc7a302d2133e070b6bbbf6 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 20:45:19 +0800 Subject: [PATCH 26/29] set cursor info deps as dev --- Cargo.lock | 30 +++--------------------------- crates/cursor-info/Cargo.toml | 12 +++++------- 2 files changed, 8 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1d4266696bd..09adca08a99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1001,16 +1001,13 @@ dependencies = [ [[package]] name = "cap-cursor-info" -version = "0.1.0" +version = "0.0.0" dependencies = [ "hex", "image 0.25.6", "objc2 0.6.1", "objc2-app-kit 0.3.1", - "serde", "sha2", - "specta", - "strum 0.27.2", "windows 0.58.0", ] @@ -4778,7 +4775,7 @@ dependencies = [ "once_cell", "rustc-hash 1.1.0", "spirv", - "strum 0.26.3", + "strum", "thiserror 2.0.12", "unicode-ident", ] @@ -7613,16 +7610,7 @@ version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.26.4", -] - -[[package]] -name = "strum" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" -dependencies = [ - "strum_macros 0.27.2", + "strum_macros", ] [[package]] @@ -7638,18 +7626,6 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "strum_macros" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "subtle" version = "2.6.1" diff --git a/crates/cursor-info/Cargo.toml b/crates/cursor-info/Cargo.toml index 88235c2f181..b604feab2c2 100644 --- a/crates/cursor-info/Cargo.toml +++ b/crates/cursor-info/Cargo.toml @@ -1,21 +1,19 @@ [package] name = "cap-cursor-info" -version = "0.1.0" +version = "0.0.0" edition = "2024" +publish = false -[dependencies] +[dev-dependencies] hex = "0.4.3" image = "0.25.6" -serde = { version = "1.0.219", features = ["derive"] } sha2 = "0.10.9" -specta = { workspace = true, features = ["derive"] } -strum = { version = "0.27", features = ["derive"] } -[target.'cfg(target_os = "macos")'.dependencies] +[target.'cfg(target_os = "macos")'.dev-dependencies] objc2-app-kit = "0.3.1" objc2 = "0.6.1" -[target.'cfg(target_os= "windows")'.dependencies] +[target.'cfg(target_os= "windows")'.dev-dependencies] windows = { workspace = true, features = [ "Win32_Graphics_Gdi", "Win32_UI_WindowsAndMessaging", From 27b8c1943d54056c78c814065d5fa1b5d1f69847 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 20:51:23 +0800 Subject: [PATCH 27/29] nit --- crates/recording/Cargo.toml | 1 - packages/ui-solid/src/auto-imports.d.ts | 103 +++++++++++++++++++++++- 2 files changed, 102 insertions(+), 2 deletions(-) diff --git a/crates/recording/Cargo.toml b/crates/recording/Cargo.toml index 0e6f68c23e3..60f3c03a0a4 100644 --- a/crates/recording/Cargo.toml +++ b/crates/recording/Cargo.toml @@ -13,7 +13,6 @@ cap-flags = { path = "../flags" } cap-utils = { path = "../utils" } cap-displays = { path = "../displays" } cap-cursor-capture = { path = "../cursor-capture" } -# cap-cursor-info = { path = "../cursor-info" } specta.workspace = true tokio.workspace = true diff --git a/packages/ui-solid/src/auto-imports.d.ts b/packages/ui-solid/src/auto-imports.d.ts index 9d2400790b5..5d516cba82e 100644 --- a/packages/ui-solid/src/auto-imports.d.ts +++ b/packages/ui-solid/src/auto-imports.d.ts @@ -6,5 +6,106 @@ // biome-ignore lint: disable export {} declare global { - + const IconCapArrows: typeof import("~icons/cap/arrows.jsx")["default"]; + const IconCapAudioOn: typeof import("~icons/cap/audio-on.jsx")["default"]; + const IconCapAuto: typeof import("~icons/cap/auto.jsx")["default"]; + const IconCapBgBlur: typeof import("~icons/cap/bg-blur.jsx")["default"]; + const IconCapBlur: typeof import("~icons/cap/blur.jsx")["default"]; + const IconCapCamera: typeof import("~icons/cap/camera.jsx")["default"]; + const IconCapCaptions: typeof import("~icons/cap/captions.jsx")["default"]; + const IconCapCheck: typeof import("~icons/cap/check.jsx")["default"]; + const IconCapChevronDown: typeof import("~icons/cap/chevron-down.jsx")["default"]; + const IconCapCircle: typeof import("~icons/cap/circle.jsx")["default"]; + const IconCapCircleCheck: typeof import("~icons/cap/circle-check.jsx")["default"]; + const IconCapCirclePlus: typeof import("~icons/cap/circle-plus.jsx")["default"]; + const IconCapCircleX: typeof import("~icons/cap/circle-x.jsx")["default"]; + const IconCapClock: typeof import("~icons/cap/clock.jsx")["default"]; + const IconCapCopy: typeof import("~icons/cap/copy.jsx")["default"]; + const IconCapCorners: typeof import("~icons/cap/corners.jsx")["default"]; + const IconCapCrop: typeof import("~icons/cap/crop.jsx")["default"]; + const IconCapCursor: typeof import("~icons/cap/cursor.jsx")["default"]; + const IconCapDownload: typeof import("~icons/cap/download.jsx")["default"]; + const IconCapEditor: typeof import("~icons/cap/editor.jsx")["default"]; + const IconCapEnlarge: typeof import("~icons/cap/enlarge.jsx")["default"]; + const IconCapFile: typeof import("~icons/cap/file.jsx")["default"]; + const IconCapFilmCut: typeof import("~icons/cap/film-cut.jsx")["default"]; + const IconCapFrameFirst: typeof import("~icons/cap/frame-first.jsx")["default"]; + const IconCapFrameLast: typeof import("~icons/cap/frame-last.jsx")["default"]; + const IconCapGauge: typeof import("~icons/cap/gauge.jsx")["default"]; + const IconCapHotkeys: typeof import("~icons/cap/hotkeys.jsx")["default"]; + const IconCapImage: typeof import("~icons/cap/image.jsx")["default"]; + const IconCapInfo: typeof import("~icons/cap/info.jsx")["default"]; + const IconCapInset: typeof import("~icons/cap/inset.jsx")["default"]; + const IconCapInstant: typeof import("~icons/cap/instant.jsx")["default"]; + const IconCapLayout: typeof import("~icons/cap/layout.jsx")["default"]; + const IconCapLink: typeof import("~icons/cap/link.jsx")["default"]; + const IconCapLogo: typeof import("~icons/cap/logo.jsx")["default"]; + const IconCapLogoFull: typeof import("~icons/cap/logo-full.jsx")["default"]; + const IconCapLogoFullDark: typeof import("~icons/cap/logo-full-dark.jsx")["default"]; + const IconCapMessageBubble: typeof import("~icons/cap/message-bubble.jsx")["default"]; + const IconCapMicrophone: typeof import("~icons/cap/microphone.jsx")["default"]; + const IconCapMoreVertical: typeof import("~icons/cap/more-vertical.jsx")["default"]; + const IconCapMoveLeft: typeof import("~icons/cap/move-left.jsx")["default"]; + const IconCapMoveRight: typeof import("~icons/cap/move-right.jsx")["default"]; + const IconCapNext: typeof import("~icons/cap/next.jsx")["default"]; + const IconCapPadding: typeof import("~icons/cap/padding.jsx")["default"]; + const IconCapPause: typeof import("~icons/cap/pause.jsx")["default"]; + const IconCapPauseCircle: typeof import("~icons/cap/pause-circle.jsx")["default"]; + const IconCapPlay: typeof import("~icons/cap/play.jsx")["default"]; + const IconCapPlayCircle: typeof import("~icons/cap/play-circle.jsx")["default"]; + const IconCapPresets: typeof import("~icons/cap/presets.jsx")["default"]; + const IconCapPrev: typeof import("~icons/cap/prev.jsx")["default"]; + const IconCapRedo: typeof import("~icons/cap/redo.jsx")["default"]; + const IconCapRefresh: typeof import("~icons/cap/refresh.jsx")["default"]; + const IconCapRestart: typeof import("~icons/cap/restart.jsx")["default"]; + const IconCapScissors: typeof import("~icons/cap/scissors.jsx")["default"]; + const IconCapSettings: typeof import("~icons/cap/settings.jsx")["default"]; + const IconCapShadow: typeof import("~icons/cap/shadow.jsx")["default"]; + const IconCapSize: typeof import("~icons/cap/size.jsx")["default"]; + const IconCapSquare: typeof import("~icons/cap/square.jsx")["default"]; + const IconCapStop: typeof import("~icons/cap/stop.jsx")["default"]; + const IconCapStopCircle: typeof import("~icons/cap/stop-circle.jsx")["default"]; + const IconCapTrash: typeof import("~icons/cap/trash.jsx")["default"]; + const IconCapUndo: typeof import("~icons/cap/undo.jsx")["default"]; + const IconCapUpload: typeof import("~icons/cap/upload.jsx")["default"]; + const IconCapWindow: typeof import("~icons/cap/window.jsx")["default"]; + const IconCapX: typeof import("~icons/cap/x.jsx")["default"]; + const IconCapZoomIn: typeof import("~icons/cap/zoom-in.jsx")["default"]; + const IconCapZoomOut: typeof import("~icons/cap/zoom-out.jsx")["default"]; + const IconHugeiconsEaseCurveControlPoints: typeof import("~icons/hugeicons/ease-curve-control-points.jsx")["default"]; + const IconIcBaselineMonitor: typeof import("~icons/ic/baseline-monitor.jsx")["default"]; + const IconIcRoundSearch: typeof import("~icons/ic/round-search.jsx")["default"]; + const IconLucideBell: typeof import("~icons/lucide/bell.jsx")["default"]; + const IconLucideBug: typeof import("~icons/lucide/bug.jsx")["default"]; + const IconLucideCamera: typeof import("~icons/lucide/camera.jsx")["default"]; + const IconLucideCheck: typeof import("~icons/lucide/check.jsx")["default"]; + const IconLucideChevronDown: typeof import("~icons/lucide/chevron-down.jsx")["default"]; + const IconLucideClock: typeof import("~icons/lucide/clock.jsx")["default"]; + const IconLucideDatabase: typeof import("~icons/lucide/database.jsx")["default"]; + const IconLucideEdit: typeof import("~icons/lucide/edit.jsx")["default"]; + const IconLucideEye: typeof import("~icons/lucide/eye.jsx")["default"]; + const IconLucideFolder: typeof import("~icons/lucide/folder.jsx")["default"]; + const IconLucideGift: typeof import("~icons/lucide/gift.jsx")["default"]; + const IconLucideHardDrive: typeof import("~icons/lucide/hard-drive.jsx")["default"]; + const IconLucideLayoutGrid: typeof import("~icons/lucide/layout-grid.jsx")["default"]; + const IconLucideLoaderCircle: typeof import("~icons/lucide/loader-circle.jsx")["default"]; + const IconLucideMessageCircle: typeof import("~icons/lucide/message-circle.jsx")["default"]; + const IconLucideMessageSquare: typeof import("~icons/lucide/message-square.jsx")["default"]; + const IconLucideMessageSquarePlus: typeof import("~icons/lucide/message-square-plus.jsx")["default"]; + const IconLucideMicOff: typeof import("~icons/lucide/mic-off.jsx")["default"]; + const IconLucideMonitor: typeof import("~icons/lucide/monitor.jsx")["default"]; + const IconLucideRabbit: typeof import("~icons/lucide/rabbit.jsx")["default"]; + const IconLucideRectangle: typeof import("~icons/lucide/rectangle.jsx")["default"]; + const IconLucideRectangleHorizontal: typeof import("~icons/lucide/rectangle-horizontal.jsx")["default"]; + const IconLucideRectangleSquare: typeof import("~icons/lucide/rectangle-square.jsx")["default"]; + const IconLucideRotateCcw: typeof import("~icons/lucide/rotate-ccw.jsx")["default"]; + const IconLucideSearch: typeof import("~icons/lucide/search.jsx")["default"]; + const IconLucideSquarePlay: typeof import("~icons/lucide/square-play.jsx")["default"]; + const IconLucideUnplug: typeof import("~icons/lucide/unplug.jsx")["default"]; + const IconLucideVideo: typeof import("~icons/lucide/video.jsx")["default"]; + const IconLucideVolume2: typeof import("~icons/lucide/volume2.jsx")["default"]; + const IconLucideVolumeX: typeof import("~icons/lucide/volume-x.jsx")["default"]; + const IconLucideX: typeof import("~icons/lucide/x.jsx")["default"]; + const IconMdiMonitor: typeof import("~icons/mdi/monitor.jsx")["default"]; + const IconPhMonitorBold: typeof import("~icons/ph/monitor-bold.jsx")["default"]; } From 011f873e58a4b7d9cebe14fd2213f57ba1dc7a34 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Wed, 30 Jul 2025 21:26:12 +0800 Subject: [PATCH 28/29] format --- crates/cursor-info/examples/cli.rs | 477 +++++++++--------- crates/rendering/src/coord.rs | 2 +- crates/rendering/src/decoder/avassetreader.rs | 12 +- crates/rendering/src/decoder/ffmpeg.rs | 14 +- crates/rendering/src/decoder/mod.rs | 2 +- crates/rendering/src/layers/background.rs | 4 +- crates/rendering/src/layers/camera.rs | 2 +- crates/rendering/src/layers/captions.rs | 4 +- crates/rendering/src/layers/display.rs | 2 +- crates/rendering/src/zoom.rs | 2 +- packages/ui-solid/src/auto-imports.d.ts | 204 ++++---- 11 files changed, 362 insertions(+), 363 deletions(-) diff --git a/crates/cursor-info/examples/cli.rs b/crates/cursor-info/examples/cli.rs index a64e1d27b4b..9047c9c602f 100644 --- a/crates/cursor-info/examples/cli.rs +++ b/crates/cursor-info/examples/cli.rs @@ -82,135 +82,172 @@ fn run() { #[cfg(target_os = "windows")] fn run() { use windows::{ - core::PCWSTR, Win32::{ + Win32::{ Foundation::POINT, UI::WindowsAndMessaging::{ - GetCursorInfo, GetIconInfo, LoadCursorW, CURSORINFO, CURSORINFO_FLAGS, HCURSOR, ICONINFO, IDC_APPSTARTING, IDC_ARROW, IDC_CROSS, IDC_HAND, IDC_HELP, IDC_IBEAM, IDC_NO, IDC_PERSON, IDC_PIN, IDC_SIZEALL, IDC_SIZENESW, IDC_SIZENS, IDC_SIZENWSE, IDC_SIZEWE, IDC_UPARROW, IDC_WAIT + CURSORINFO, CURSORINFO_FLAGS, GetCursorInfo, GetIconInfo, HCURSOR, ICONINFO, + IDC_APPSTARTING, IDC_ARROW, IDC_CROSS, IDC_HAND, IDC_HELP, IDC_IBEAM, IDC_NO, + IDC_PERSON, IDC_PIN, IDC_SIZEALL, IDC_SIZENESW, IDC_SIZENS, IDC_SIZENWSE, + IDC_SIZEWE, IDC_UPARROW, IDC_WAIT, LoadCursorW, }, - } + }, + core::PCWSTR, }; #[inline] fn load_cursor(lpcursorname: PCWSTR) -> HCURSOR { - unsafe { LoadCursorW(None, lpcursorname) } - .expect("Failed to load default system cursors") + unsafe { LoadCursorW(None, lpcursorname) }.expect("Failed to load default system cursors") } fn get_icon(hCursor: HCURSOR) -> Vec { unsafe { - // Get icon info - use windows::Win32::{Foundation::HWND, Graphics::Gdi::{CreateCompatibleDC, CreateDIBSection, DeleteDC, DeleteObject, GetDC, GetObjectA, ReleaseDC, SelectObject, BITMAP, BITMAPINFO, BITMAPINFOHEADER, DIB_RGB_COLORS}, UI::WindowsAndMessaging::{DrawIconEx, DI_NORMAL}}; - let mut icon_info = ICONINFO::default(); - if GetIconInfo(hCursor, &mut icon_info).is_err() { - panic!("Error getting icon info"); - } + // Get icon info + use windows::Win32::{ + Foundation::HWND, + Graphics::Gdi::{ + BITMAP, BITMAPINFO, BITMAPINFOHEADER, CreateCompatibleDC, CreateDIBSection, + DIB_RGB_COLORS, DeleteDC, DeleteObject, GetDC, GetObjectA, ReleaseDC, + SelectObject, + }, + UI::WindowsAndMessaging::{DI_NORMAL, DrawIconEx}, + }; + let mut icon_info = ICONINFO::default(); + if GetIconInfo(hCursor, &mut icon_info).is_err() { + panic!("Error getting icon info"); + } - // Get bitmap info for the cursor - let mut bitmap = BITMAP::default(); - let bitmap_handle = if !icon_info.hbmColor.is_invalid() { - icon_info.hbmColor - } else { - icon_info.hbmMask - }; + // Get bitmap info for the cursor + let mut bitmap = BITMAP::default(); + let bitmap_handle = if !icon_info.hbmColor.is_invalid() { + icon_info.hbmColor + } else { + icon_info.hbmMask + }; - if GetObjectA( - bitmap_handle, - std::mem::size_of::() as i32, - Some(&mut bitmap as *mut _ as *mut _), - ) == 0 - { - // Clean up handles - if !icon_info.hbmColor.is_invalid() { - use windows::Win32::Graphics::Gdi::DeleteObject; + if GetObjectA( + bitmap_handle, + std::mem::size_of::() as i32, + Some(&mut bitmap as *mut _ as *mut _), + ) == 0 + { + // Clean up handles + if !icon_info.hbmColor.is_invalid() { + use windows::Win32::Graphics::Gdi::DeleteObject; + + DeleteObject(icon_info.hbmColor); + } + if !icon_info.hbmMask.is_invalid() { + use windows::Win32::Graphics::Gdi::DeleteObject; - DeleteObject(icon_info.hbmColor); + DeleteObject(icon_info.hbmMask); + } + panic!("Error"); } - if !icon_info.hbmMask.is_invalid() { - use windows::Win32::Graphics::Gdi::DeleteObject; - DeleteObject(icon_info.hbmMask); - } - panic!("Error"); - } + // Create DCs + let screen_dc = GetDC(HWND::default()); + let mem_dc = CreateCompatibleDC(screen_dc); + + // Get cursor dimensions + let width = bitmap.bmWidth; + let height = if icon_info.hbmColor.is_invalid() && bitmap.bmHeight > 0 { + // For mask cursors, the height is doubled (AND mask + XOR mask) + bitmap.bmHeight / 2 + } else { + bitmap.bmHeight + }; - // Create DCs - let screen_dc = GetDC(HWND::default()); - let mem_dc = CreateCompatibleDC(screen_dc); - - // Get cursor dimensions - let width = bitmap.bmWidth; - let height = if icon_info.hbmColor.is_invalid() && bitmap.bmHeight > 0 { - // For mask cursors, the height is doubled (AND mask + XOR mask) - bitmap.bmHeight / 2 - } else { - bitmap.bmHeight - }; + // Create bitmap info header for 32-bit RGBA + let bi = BITMAPINFOHEADER { + biSize: std::mem::size_of::() as u32, + biWidth: width, + biHeight: -height, // Negative for top-down DIB + biPlanes: 1, + biBitCount: 32, // 32-bit RGBA + biCompression: 0, + biSizeImage: 0, + biXPelsPerMeter: 0, + biYPelsPerMeter: 0, + biClrUsed: 0, + biClrImportant: 0, + }; - // Create bitmap info header for 32-bit RGBA - let bi = BITMAPINFOHEADER { - biSize: std::mem::size_of::() as u32, - biWidth: width, - biHeight: -height, // Negative for top-down DIB - biPlanes: 1, - biBitCount: 32, // 32-bit RGBA - biCompression: 0, - biSizeImage: 0, - biXPelsPerMeter: 0, - biYPelsPerMeter: 0, - biClrUsed: 0, - biClrImportant: 0, - }; + let bitmap_info = BITMAPINFO { + bmiHeader: bi, + bmiColors: [Default::default()], + }; - let bitmap_info = BITMAPINFO { - bmiHeader: bi, - bmiColors: [Default::default()], - }; + // Create DIB section + let mut bits: *mut std::ffi::c_void = std::ptr::null_mut(); + let dib = CreateDIBSection(mem_dc, &bitmap_info, DIB_RGB_COLORS, &mut bits, None, 0); - // Create DIB section - let mut bits: *mut std::ffi::c_void = std::ptr::null_mut(); - let dib = CreateDIBSection(mem_dc, &bitmap_info, DIB_RGB_COLORS, &mut bits, None, 0); + if dib.is_err() { + // Clean up - if dib.is_err() { - // Clean up + use windows::Win32::Graphics::Gdi::{DeleteDC, ReleaseDC}; + DeleteDC(mem_dc); + ReleaseDC(HWND::default(), screen_dc); + if !icon_info.hbmColor.is_invalid() { + use windows::Win32::Graphics::Gdi::DeleteObject; - use windows::Win32::Graphics::Gdi::{DeleteDC, ReleaseDC}; - DeleteDC(mem_dc); - ReleaseDC(HWND::default(), screen_dc); - if !icon_info.hbmColor.is_invalid() { - use windows::Win32::Graphics::Gdi::DeleteObject; + DeleteObject(icon_info.hbmColor); + } + if !icon_info.hbmMask.is_invalid() { + use windows::Win32::Graphics::Gdi::DeleteObject; - DeleteObject(icon_info.hbmColor); + DeleteObject(icon_info.hbmMask); + } + panic!("Error"); } - if !icon_info.hbmMask.is_invalid() { - use windows::Win32::Graphics::Gdi::DeleteObject; - DeleteObject(icon_info.hbmMask); + let dib = dib.unwrap(); + + // Select DIB into DC + let old_bitmap = SelectObject(mem_dc, dib); + + // Draw the cursor onto our bitmap with transparency + if DrawIconEx( + mem_dc, 0, 0, hCursor, 0, // Use actual size + 0, // Use actual size + 0, None, DI_NORMAL, + ) + .is_err() + { + // Clean up + + use windows::Win32::Graphics::Gdi::{DeleteDC, DeleteObject, ReleaseDC}; + SelectObject(mem_dc, old_bitmap); + DeleteObject(dib); + DeleteDC(mem_dc); + ReleaseDC(HWND::default(), screen_dc); + if !icon_info.hbmColor.is_invalid() { + DeleteObject(icon_info.hbmColor); + } + if !icon_info.hbmMask.is_invalid() { + DeleteObject(icon_info.hbmMask); + } + panic!("Error"); } - panic!("Error"); - } - let dib = dib.unwrap(); - - // Select DIB into DC - let old_bitmap = SelectObject(mem_dc, dib); - - // Draw the cursor onto our bitmap with transparency - if DrawIconEx( - mem_dc, - 0, - 0, - hCursor, - 0, // Use actual size - 0, // Use actual size - 0, - None, - DI_NORMAL, - ) - .is_err() - { - // Clean up - - use windows::Win32::Graphics::Gdi::{DeleteDC, DeleteObject, ReleaseDC}; + // Get image data + let size = (width * height * 4) as usize; + let mut image_data = vec![0u8; size]; + unsafe { std::ptr::copy_nonoverlapping(bits, image_data.as_mut_ptr() as *mut _, size) }; + + // Calculate hotspot + let mut hotspot_x = if icon_info.fIcon.as_bool() == false { + icon_info.xHotspot as f64 / width as f64 + } else { + 0.5 + }; + + let mut hotspot_y = if icon_info.fIcon.as_bool() == false { + icon_info.yHotspot as f64 / height as f64 + } else { + 0.5 + }; + + // Cleanup SelectObject(mem_dc, old_bitmap); DeleteObject(dib); DeleteDC(mem_dc); @@ -221,155 +258,125 @@ fn run() { if !icon_info.hbmMask.is_invalid() { DeleteObject(icon_info.hbmMask); } - panic!("Error"); - } - // Get image data - let size = (width * height * 4) as usize; - let mut image_data = vec![0u8; size]; - unsafe { std::ptr::copy_nonoverlapping(bits, image_data.as_mut_ptr() as *mut _, size) }; - - // Calculate hotspot - let mut hotspot_x = if icon_info.fIcon.as_bool() == false { - icon_info.xHotspot as f64 / width as f64 - } else { - 0.5 - }; - - let mut hotspot_y = if icon_info.fIcon.as_bool() == false { - icon_info.yHotspot as f64 / height as f64 - } else { - 0.5 - }; - - // Cleanup - SelectObject(mem_dc, old_bitmap); - DeleteObject(dib); - DeleteDC(mem_dc); - ReleaseDC(HWND::default(), screen_dc); - if !icon_info.hbmColor.is_invalid() { - DeleteObject(icon_info.hbmColor); - } - if !icon_info.hbmMask.is_invalid() { - DeleteObject(icon_info.hbmMask); - } - - // Process the image data to ensure proper alpha channel - for i in (0..size).step_by(4) { - // Windows DIB format is BGRA, we need to: - // 1. Swap B and R channels - let b = image_data[i]; - image_data[i] = image_data[i + 2]; // B <- R - image_data[i + 2] = b; // R <- B - - // 2. Pre-multiply alpha if needed - // This is already handled by DrawIconEx - } - - // Convert to RGBA image - let mut rgba_image = image::RgbaImage::from_raw(width as u32, height as u32, image_data).unwrap(); - - // For text cursor (I-beam), enhance visibility by adding a shadow/outline - // Check if this is likely a text cursor by examining dimensions and pixels - let is_text_cursor = width <= 20 && height >= 20 && width <= height / 2; - - if is_text_cursor { - // Add a subtle shadow/outline to make it visible on white backgrounds - for y in 0..height as u32 { - for x in 0..width as u32 { - let pixel = rgba_image.get_pixel(x, y); - // If this is a solid pixel of the cursor - if pixel[3] > 200 { - // If alpha is high (visible pixel) - // Add shadow pixels around it - for dx in [-1, 0, 1].iter() { - for dy in [-1, 0, 1].iter() { - let nx = x as i32 + dx; - let ny = y as i32 + dy; - - // Skip if out of bounds or same pixel - if nx < 0 - || ny < 0 - || nx >= width as i32 - || ny >= height as i32 - || (*dx == 0 && *dy == 0) - { - continue; - } + // Process the image data to ensure proper alpha channel + for i in (0..size).step_by(4) { + // Windows DIB format is BGRA, we need to: + // 1. Swap B and R channels + let b = image_data[i]; + image_data[i] = image_data[i + 2]; // B <- R + image_data[i + 2] = b; // R <- B - let nx = nx as u32; - let ny = ny as u32; + // 2. Pre-multiply alpha if needed + // This is already handled by DrawIconEx + } - let shadow_pixel = rgba_image.get_pixel(nx, ny); - // Only add shadow where there isn't already content - if shadow_pixel[3] < 100 { - rgba_image.put_pixel(nx, ny, image::Rgba([0, 0, 0, 100])); + // Convert to RGBA image + let mut rgba_image = + image::RgbaImage::from_raw(width as u32, height as u32, image_data).unwrap(); + + // For text cursor (I-beam), enhance visibility by adding a shadow/outline + // Check if this is likely a text cursor by examining dimensions and pixels + let is_text_cursor = width <= 20 && height >= 20 && width <= height / 2; + + if is_text_cursor { + // Add a subtle shadow/outline to make it visible on white backgrounds + for y in 0..height as u32 { + for x in 0..width as u32 { + let pixel = rgba_image.get_pixel(x, y); + // If this is a solid pixel of the cursor + if pixel[3] > 200 { + // If alpha is high (visible pixel) + // Add shadow pixels around it + for dx in [-1, 0, 1].iter() { + for dy in [-1, 0, 1].iter() { + let nx = x as i32 + dx; + let ny = y as i32 + dy; + + // Skip if out of bounds or same pixel + if nx < 0 + || ny < 0 + || nx >= width as i32 + || ny >= height as i32 + || (*dx == 0 && *dy == 0) + { + continue; + } + + let nx = nx as u32; + let ny = ny as u32; + + let shadow_pixel = rgba_image.get_pixel(nx, ny); + // Only add shadow where there isn't already content + if shadow_pixel[3] < 100 { + rgba_image.put_pixel(nx, ny, image::Rgba([0, 0, 0, 100])); + } } } } } } } - } - // Find the bounds of non-transparent pixels to trim whitespace - let mut min_x = width as u32; - let mut min_y = height as u32; - let mut max_x = 0u32; - let mut max_y = 0u32; - - let mut has_content = false; - - for y in 0..height as u32 { - for x in 0..width as u32 { - let pixel = rgba_image.get_pixel(x, y); - if pixel[3] > 0 { - // If pixel has any opacity - has_content = true; - min_x = min_x.min(x); - min_y = min_y.min(y); - max_x = max_x.max(x); - max_y = max_y.max(y); + // Find the bounds of non-transparent pixels to trim whitespace + let mut min_x = width as u32; + let mut min_y = height as u32; + let mut max_x = 0u32; + let mut max_y = 0u32; + + let mut has_content = false; + + for y in 0..height as u32 { + for x in 0..width as u32 { + let pixel = rgba_image.get_pixel(x, y); + if pixel[3] > 0 { + // If pixel has any opacity + has_content = true; + min_x = min_x.min(x); + min_y = min_y.min(y); + max_x = max_x.max(x); + max_y = max_y.max(y); + } } } - } - // Only trim if we found content and there's actually whitespace to trim - if has_content - && (min_x > 0 || min_y > 0 || max_x < width as u32 - 1 || max_y < height as u32 - 1) - { - // Add a small padding (2 pixels) around the content - let padding = 2u32; - let trim_min_x = min_x.saturating_sub(padding); - let trim_min_y = min_y.saturating_sub(padding); - let trim_max_x = (max_x + padding).min(width as u32 - 1); - let trim_max_y = (max_y + padding).min(height as u32 - 1); - - let trim_width = trim_max_x - trim_min_x + 1; - let trim_height = trim_max_y - trim_min_y + 1; - - // Create a new image with the trimmed dimensions - let mut trimmed = image::RgbaImage::new(trim_width, trim_height); - - // Copy the content to the new image - for y in 0..trim_height { - for x in 0..trim_width { - let src_x = trim_min_x + x; - let src_y = trim_min_y + y; - let pixel = rgba_image.get_pixel(src_x, src_y); - trimmed.put_pixel(x, y, *pixel); + // Only trim if we found content and there's actually whitespace to trim + if has_content + && (min_x > 0 || min_y > 0 || max_x < width as u32 - 1 || max_y < height as u32 - 1) + { + // Add a small padding (2 pixels) around the content + let padding = 2u32; + let trim_min_x = min_x.saturating_sub(padding); + let trim_min_y = min_y.saturating_sub(padding); + let trim_max_x = (max_x + padding).min(width as u32 - 1); + let trim_max_y = (max_y + padding).min(height as u32 - 1); + + let trim_width = trim_max_x - trim_min_x + 1; + let trim_height = trim_max_y - trim_min_y + 1; + + // Create a new image with the trimmed dimensions + let mut trimmed = image::RgbaImage::new(trim_width, trim_height); + + // Copy the content to the new image + for y in 0..trim_height { + for x in 0..trim_width { + let src_x = trim_min_x + x; + let src_y = trim_min_y + y; + let pixel = rgba_image.get_pixel(src_x, src_y); + trimmed.put_pixel(x, y, *pixel); + } } - } - // Adjust hotspot coordinates for the trimmed image - hotspot_x = (hotspot_x * width as f64 - trim_min_x as f64) / trim_width as f64; - hotspot_y = (hotspot_y * height as f64 - trim_min_y as f64) / trim_height as f64; + // Adjust hotspot coordinates for the trimmed image + hotspot_x = (hotspot_x * width as f64 - trim_min_x as f64) / trim_width as f64; + hotspot_y = (hotspot_y * height as f64 - trim_min_y as f64) / trim_height as f64; - trimmed - } else { - rgba_image - }.to_vec() - } + trimmed + } else { + rgba_image + } + .to_vec() + } } let cursors = vec![ diff --git a/crates/rendering/src/coord.rs b/crates/rendering/src/coord.rs index f301dd1284f..29cc5046f2b 100644 --- a/crates/rendering/src/coord.rs +++ b/crates/rendering/src/coord.rs @@ -2,7 +2,7 @@ use std::ops::{Add, Deref, Mul, Sub}; use cap_project::{ProjectConfiguration, XY}; -use crate::{zoom::InterpolatedZoom, ProjectUniforms, RenderOptions}; +use crate::{ProjectUniforms, RenderOptions, zoom::InterpolatedZoom}; #[derive(Default, Clone, Copy, Debug)] pub struct RawDisplaySpace; diff --git a/crates/rendering/src/decoder/avassetreader.rs b/crates/rendering/src/decoder/avassetreader.rs index 0e9d87b22c7..6b3fc203ad2 100644 --- a/crates/rendering/src/decoder/avassetreader.rs +++ b/crates/rendering/src/decoder/avassetreader.rs @@ -3,17 +3,17 @@ use std::{ collections::BTreeMap, path::PathBuf, rc::Rc, - sync::{mpsc, Arc}, + sync::{Arc, mpsc}, }; use cidre::{ arc::R, cv::{self, pixel_buffer::LockFlags}, }; -use ffmpeg::{format, frame, Rational}; +use ffmpeg::{Rational, format, frame}; use tokio::{runtime::Handle as TokioHandle, sync::oneshot}; -use super::{pts_to_frame, VideoDecoderMessage, FRAME_CACHE_SIZE}; +use super::{FRAME_CACHE_SIZE, VideoDecoderMessage, pts_to_frame}; #[derive(Clone)] struct ProcessedFrame { @@ -338,11 +338,7 @@ impl AVAssetReaderDecoder { let min = *cache.keys().min().unwrap(); let max = *cache.keys().max().unwrap(); - if current_frame > max { - min - } else { - max - } + if current_frame > max { min } else { max } }; cache.remove(&frame); diff --git a/crates/rendering/src/decoder/ffmpeg.rs b/crates/rendering/src/decoder/ffmpeg.rs index 8d23341b3da..d60e65aca90 100644 --- a/crates/rendering/src/decoder/ffmpeg.rs +++ b/crates/rendering/src/decoder/ffmpeg.rs @@ -3,15 +3,15 @@ use std::{ collections::BTreeMap, path::PathBuf, rc::Rc, - sync::{mpsc, Arc}, + sync::{Arc, mpsc}, }; -use ffmpeg::{codec, format, frame, software, Codec}; -use ffmpeg_sys_next::{avcodec_find_decoder, AVHWDeviceType}; +use ffmpeg::{Codec, codec, format, frame, software}; +use ffmpeg_sys_next::{AVHWDeviceType, avcodec_find_decoder}; use log::debug; use tokio::sync::oneshot; -use super::{pts_to_frame, VideoDecoderMessage, FRAME_CACHE_SIZE}; +use super::{FRAME_CACHE_SIZE, VideoDecoderMessage, pts_to_frame}; #[derive(Clone)] struct ProcessedFrame { @@ -201,11 +201,7 @@ impl FfmpegDecoder { let min = *cache.keys().min().unwrap(); let max = *cache.keys().max().unwrap(); - if current_frame > max { - min - } else { - max - } + if current_frame > max { min } else { max } }; cache.remove(&frame); diff --git a/crates/rendering/src/decoder/mod.rs b/crates/rendering/src/decoder/mod.rs index 1ff92d5f5ca..0cad645b2c1 100644 --- a/crates/rendering/src/decoder/mod.rs +++ b/crates/rendering/src/decoder/mod.rs @@ -1,7 +1,7 @@ use ::ffmpeg::Rational; use std::{ path::PathBuf, - sync::{mpsc, Arc}, + sync::{Arc, mpsc}, }; use tokio::sync::oneshot; diff --git a/crates/rendering/src/layers/background.rs b/crates/rendering/src/layers/background.rs index b328c8e0de1..441e9f44990 100644 --- a/crates/rendering/src/layers/background.rs +++ b/crates/rendering/src/layers/background.rs @@ -6,8 +6,8 @@ use specta::Type; use wgpu::{include_wgsl, util::DeviceExt}; use crate::{ - create_shader_render_pipeline, srgb_to_linear, ProjectUniforms, RenderVideoConstants, - RenderingError, + ProjectUniforms, RenderVideoConstants, RenderingError, create_shader_render_pipeline, + srgb_to_linear, }; #[derive(PartialEq, Debug, Clone, Copy, Serialize, Deserialize, Type)] diff --git a/crates/rendering/src/layers/camera.rs b/crates/rendering/src/layers/camera.rs index 8b92395f2a4..9fa14f51440 100644 --- a/crates/rendering/src/layers/camera.rs +++ b/crates/rendering/src/layers/camera.rs @@ -2,7 +2,7 @@ use cap_project::XY; use wgpu::util::DeviceExt; use crate::{ - composite_frame::CompositeVideoFramePipeline, CompositeVideoFrameUniforms, DecodedFrame, + CompositeVideoFrameUniforms, DecodedFrame, composite_frame::CompositeVideoFramePipeline, }; pub struct CameraLayer { diff --git a/crates/rendering/src/layers/captions.rs b/crates/rendering/src/layers/captions.rs index eb7e51c9c9d..1a8b3461d60 100644 --- a/crates/rendering/src/layers/captions.rs +++ b/crates/rendering/src/layers/captions.rs @@ -5,9 +5,9 @@ use glyphon::{ TextArea, TextAtlas, TextBounds, TextRenderer, Viewport, }; use log::{debug, info, warn}; -use wgpu::{util::DeviceExt, Device, Queue}; +use wgpu::{Device, Queue, util::DeviceExt}; -use crate::{parse_color_component, DecodedSegmentFrames, ProjectUniforms, RenderVideoConstants}; +use crate::{DecodedSegmentFrames, ProjectUniforms, RenderVideoConstants, parse_color_component}; /// Represents a caption segment with timing and text #[derive(Debug, Clone)] diff --git a/crates/rendering/src/layers/display.rs b/crates/rendering/src/layers/display.rs index bc8eb5ff03e..f86e40e5f82 100644 --- a/crates/rendering/src/layers/display.rs +++ b/crates/rendering/src/layers/display.rs @@ -1,8 +1,8 @@ use cap_project::XY; use crate::{ - composite_frame::{CompositeVideoFramePipeline, CompositeVideoFrameUniforms}, DecodedSegmentFrames, + composite_frame::{CompositeVideoFramePipeline, CompositeVideoFrameUniforms}, }; pub struct DisplayLayer { diff --git a/crates/rendering/src/zoom.rs b/crates/rendering/src/zoom.rs index 7522924127c..068badd92f1 100644 --- a/crates/rendering/src/zoom.rs +++ b/crates/rendering/src/zoom.rs @@ -1,4 +1,4 @@ -use cap_project::{ZoomSegment, XY}; +use cap_project::{XY, ZoomSegment}; use crate::{Coord, RawDisplayUVSpace}; diff --git a/packages/ui-solid/src/auto-imports.d.ts b/packages/ui-solid/src/auto-imports.d.ts index 5d516cba82e..4bc68431505 100644 --- a/packages/ui-solid/src/auto-imports.d.ts +++ b/packages/ui-solid/src/auto-imports.d.ts @@ -6,106 +6,106 @@ // biome-ignore lint: disable export {} declare global { - const IconCapArrows: typeof import("~icons/cap/arrows.jsx")["default"]; - const IconCapAudioOn: typeof import("~icons/cap/audio-on.jsx")["default"]; - const IconCapAuto: typeof import("~icons/cap/auto.jsx")["default"]; - const IconCapBgBlur: typeof import("~icons/cap/bg-blur.jsx")["default"]; - const IconCapBlur: typeof import("~icons/cap/blur.jsx")["default"]; - const IconCapCamera: typeof import("~icons/cap/camera.jsx")["default"]; - const IconCapCaptions: typeof import("~icons/cap/captions.jsx")["default"]; - const IconCapCheck: typeof import("~icons/cap/check.jsx")["default"]; - const IconCapChevronDown: typeof import("~icons/cap/chevron-down.jsx")["default"]; - const IconCapCircle: typeof import("~icons/cap/circle.jsx")["default"]; - const IconCapCircleCheck: typeof import("~icons/cap/circle-check.jsx")["default"]; - const IconCapCirclePlus: typeof import("~icons/cap/circle-plus.jsx")["default"]; - const IconCapCircleX: typeof import("~icons/cap/circle-x.jsx")["default"]; - const IconCapClock: typeof import("~icons/cap/clock.jsx")["default"]; - const IconCapCopy: typeof import("~icons/cap/copy.jsx")["default"]; - const IconCapCorners: typeof import("~icons/cap/corners.jsx")["default"]; - const IconCapCrop: typeof import("~icons/cap/crop.jsx")["default"]; - const IconCapCursor: typeof import("~icons/cap/cursor.jsx")["default"]; - const IconCapDownload: typeof import("~icons/cap/download.jsx")["default"]; - const IconCapEditor: typeof import("~icons/cap/editor.jsx")["default"]; - const IconCapEnlarge: typeof import("~icons/cap/enlarge.jsx")["default"]; - const IconCapFile: typeof import("~icons/cap/file.jsx")["default"]; - const IconCapFilmCut: typeof import("~icons/cap/film-cut.jsx")["default"]; - const IconCapFrameFirst: typeof import("~icons/cap/frame-first.jsx")["default"]; - const IconCapFrameLast: typeof import("~icons/cap/frame-last.jsx")["default"]; - const IconCapGauge: typeof import("~icons/cap/gauge.jsx")["default"]; - const IconCapHotkeys: typeof import("~icons/cap/hotkeys.jsx")["default"]; - const IconCapImage: typeof import("~icons/cap/image.jsx")["default"]; - const IconCapInfo: typeof import("~icons/cap/info.jsx")["default"]; - const IconCapInset: typeof import("~icons/cap/inset.jsx")["default"]; - const IconCapInstant: typeof import("~icons/cap/instant.jsx")["default"]; - const IconCapLayout: typeof import("~icons/cap/layout.jsx")["default"]; - const IconCapLink: typeof import("~icons/cap/link.jsx")["default"]; - const IconCapLogo: typeof import("~icons/cap/logo.jsx")["default"]; - const IconCapLogoFull: typeof import("~icons/cap/logo-full.jsx")["default"]; - const IconCapLogoFullDark: typeof import("~icons/cap/logo-full-dark.jsx")["default"]; - const IconCapMessageBubble: typeof import("~icons/cap/message-bubble.jsx")["default"]; - const IconCapMicrophone: typeof import("~icons/cap/microphone.jsx")["default"]; - const IconCapMoreVertical: typeof import("~icons/cap/more-vertical.jsx")["default"]; - const IconCapMoveLeft: typeof import("~icons/cap/move-left.jsx")["default"]; - const IconCapMoveRight: typeof import("~icons/cap/move-right.jsx")["default"]; - const IconCapNext: typeof import("~icons/cap/next.jsx")["default"]; - const IconCapPadding: typeof import("~icons/cap/padding.jsx")["default"]; - const IconCapPause: typeof import("~icons/cap/pause.jsx")["default"]; - const IconCapPauseCircle: typeof import("~icons/cap/pause-circle.jsx")["default"]; - const IconCapPlay: typeof import("~icons/cap/play.jsx")["default"]; - const IconCapPlayCircle: typeof import("~icons/cap/play-circle.jsx")["default"]; - const IconCapPresets: typeof import("~icons/cap/presets.jsx")["default"]; - const IconCapPrev: typeof import("~icons/cap/prev.jsx")["default"]; - const IconCapRedo: typeof import("~icons/cap/redo.jsx")["default"]; - const IconCapRefresh: typeof import("~icons/cap/refresh.jsx")["default"]; - const IconCapRestart: typeof import("~icons/cap/restart.jsx")["default"]; - const IconCapScissors: typeof import("~icons/cap/scissors.jsx")["default"]; - const IconCapSettings: typeof import("~icons/cap/settings.jsx")["default"]; - const IconCapShadow: typeof import("~icons/cap/shadow.jsx")["default"]; - const IconCapSize: typeof import("~icons/cap/size.jsx")["default"]; - const IconCapSquare: typeof import("~icons/cap/square.jsx")["default"]; - const IconCapStop: typeof import("~icons/cap/stop.jsx")["default"]; - const IconCapStopCircle: typeof import("~icons/cap/stop-circle.jsx")["default"]; - const IconCapTrash: typeof import("~icons/cap/trash.jsx")["default"]; - const IconCapUndo: typeof import("~icons/cap/undo.jsx")["default"]; - const IconCapUpload: typeof import("~icons/cap/upload.jsx")["default"]; - const IconCapWindow: typeof import("~icons/cap/window.jsx")["default"]; - const IconCapX: typeof import("~icons/cap/x.jsx")["default"]; - const IconCapZoomIn: typeof import("~icons/cap/zoom-in.jsx")["default"]; - const IconCapZoomOut: typeof import("~icons/cap/zoom-out.jsx")["default"]; - const IconHugeiconsEaseCurveControlPoints: typeof import("~icons/hugeicons/ease-curve-control-points.jsx")["default"]; - const IconIcBaselineMonitor: typeof import("~icons/ic/baseline-monitor.jsx")["default"]; - const IconIcRoundSearch: typeof import("~icons/ic/round-search.jsx")["default"]; - const IconLucideBell: typeof import("~icons/lucide/bell.jsx")["default"]; - const IconLucideBug: typeof import("~icons/lucide/bug.jsx")["default"]; - const IconLucideCamera: typeof import("~icons/lucide/camera.jsx")["default"]; - const IconLucideCheck: typeof import("~icons/lucide/check.jsx")["default"]; - const IconLucideChevronDown: typeof import("~icons/lucide/chevron-down.jsx")["default"]; - const IconLucideClock: typeof import("~icons/lucide/clock.jsx")["default"]; - const IconLucideDatabase: typeof import("~icons/lucide/database.jsx")["default"]; - const IconLucideEdit: typeof import("~icons/lucide/edit.jsx")["default"]; - const IconLucideEye: typeof import("~icons/lucide/eye.jsx")["default"]; - const IconLucideFolder: typeof import("~icons/lucide/folder.jsx")["default"]; - const IconLucideGift: typeof import("~icons/lucide/gift.jsx")["default"]; - const IconLucideHardDrive: typeof import("~icons/lucide/hard-drive.jsx")["default"]; - const IconLucideLayoutGrid: typeof import("~icons/lucide/layout-grid.jsx")["default"]; - const IconLucideLoaderCircle: typeof import("~icons/lucide/loader-circle.jsx")["default"]; - const IconLucideMessageCircle: typeof import("~icons/lucide/message-circle.jsx")["default"]; - const IconLucideMessageSquare: typeof import("~icons/lucide/message-square.jsx")["default"]; - const IconLucideMessageSquarePlus: typeof import("~icons/lucide/message-square-plus.jsx")["default"]; - const IconLucideMicOff: typeof import("~icons/lucide/mic-off.jsx")["default"]; - const IconLucideMonitor: typeof import("~icons/lucide/monitor.jsx")["default"]; - const IconLucideRabbit: typeof import("~icons/lucide/rabbit.jsx")["default"]; - const IconLucideRectangle: typeof import("~icons/lucide/rectangle.jsx")["default"]; - const IconLucideRectangleHorizontal: typeof import("~icons/lucide/rectangle-horizontal.jsx")["default"]; - const IconLucideRectangleSquare: typeof import("~icons/lucide/rectangle-square.jsx")["default"]; - const IconLucideRotateCcw: typeof import("~icons/lucide/rotate-ccw.jsx")["default"]; - const IconLucideSearch: typeof import("~icons/lucide/search.jsx")["default"]; - const IconLucideSquarePlay: typeof import("~icons/lucide/square-play.jsx")["default"]; - const IconLucideUnplug: typeof import("~icons/lucide/unplug.jsx")["default"]; - const IconLucideVideo: typeof import("~icons/lucide/video.jsx")["default"]; - const IconLucideVolume2: typeof import("~icons/lucide/volume2.jsx")["default"]; - const IconLucideVolumeX: typeof import("~icons/lucide/volume-x.jsx")["default"]; - const IconLucideX: typeof import("~icons/lucide/x.jsx")["default"]; - const IconMdiMonitor: typeof import("~icons/mdi/monitor.jsx")["default"]; - const IconPhMonitorBold: typeof import("~icons/ph/monitor-bold.jsx")["default"]; + const IconCapArrows: typeof import("~icons/cap/arrows.jsx")["default"] + const IconCapAudioOn: typeof import("~icons/cap/audio-on.jsx")["default"] + const IconCapAuto: typeof import("~icons/cap/auto.jsx")["default"] + const IconCapBgBlur: typeof import("~icons/cap/bg-blur.jsx")["default"] + const IconCapBlur: typeof import("~icons/cap/blur.jsx")["default"] + const IconCapCamera: typeof import('~icons/cap/camera.jsx')['default'] + const IconCapCaptions: typeof import("~icons/cap/captions.jsx")["default"] + const IconCapCheck: typeof import("~icons/cap/check.jsx")["default"] + const IconCapChevronDown: typeof import('~icons/cap/chevron-down.jsx')['default'] + const IconCapCircle: typeof import("~icons/cap/circle.jsx")["default"] + const IconCapCircleCheck: typeof import("~icons/cap/circle-check.jsx")["default"] + const IconCapCirclePlus: typeof import("~icons/cap/circle-plus.jsx")["default"] + const IconCapCircleX: typeof import("~icons/cap/circle-x.jsx")["default"] + const IconCapClock: typeof import("~icons/cap/clock.jsx")["default"] + const IconCapCopy: typeof import("~icons/cap/copy.jsx")["default"] + const IconCapCorners: typeof import("~icons/cap/corners.jsx")["default"] + const IconCapCrop: typeof import('~icons/cap/crop.jsx')['default'] + const IconCapCursor: typeof import("~icons/cap/cursor.jsx")["default"] + const IconCapDownload: typeof import("~icons/cap/download.jsx")["default"] + const IconCapEditor: typeof import("~icons/cap/editor.jsx")["default"] + const IconCapEnlarge: typeof import("~icons/cap/enlarge.jsx")["default"] + const IconCapFile: typeof import("~icons/cap/file.jsx")["default"] + const IconCapFilmCut: typeof import('~icons/cap/film-cut.jsx')['default'] + const IconCapFrameFirst: typeof import("~icons/cap/frame-first.jsx")["default"] + const IconCapFrameLast: typeof import("~icons/cap/frame-last.jsx")["default"] + const IconCapGauge: typeof import("~icons/cap/gauge.jsx")["default"] + const IconCapHotkeys: typeof import("~icons/cap/hotkeys.jsx")["default"] + const IconCapImage: typeof import("~icons/cap/image.jsx")["default"] + const IconCapInfo: typeof import('~icons/cap/info.jsx')['default'] + const IconCapInset: typeof import("~icons/cap/inset.jsx")["default"] + const IconCapInstant: typeof import('~icons/cap/instant.jsx')['default'] + const IconCapLayout: typeof import("~icons/cap/layout.jsx")["default"] + const IconCapLink: typeof import("~icons/cap/link.jsx")["default"] + const IconCapLogo: typeof import('~icons/cap/logo.jsx')['default'] + const IconCapLogoFull: typeof import('~icons/cap/logo-full.jsx')['default'] + const IconCapLogoFullDark: typeof import('~icons/cap/logo-full-dark.jsx')['default'] + const IconCapMessageBubble: typeof import("~icons/cap/message-bubble.jsx")["default"] + const IconCapMicrophone: typeof import('~icons/cap/microphone.jsx')['default'] + const IconCapMoreVertical: typeof import("~icons/cap/more-vertical.jsx")["default"] + const IconCapMoveLeft: typeof import("~icons/cap/move-left.jsx")["default"] + const IconCapMoveRight: typeof import("~icons/cap/move-right.jsx")["default"] + const IconCapNext: typeof import("~icons/cap/next.jsx")["default"] + const IconCapPadding: typeof import("~icons/cap/padding.jsx")["default"] + const IconCapPause: typeof import("~icons/cap/pause.jsx")["default"] + const IconCapPauseCircle: typeof import("~icons/cap/pause-circle.jsx")["default"] + const IconCapPlay: typeof import("~icons/cap/play.jsx")["default"] + const IconCapPlayCircle: typeof import("~icons/cap/play-circle.jsx")["default"] + const IconCapPresets: typeof import("~icons/cap/presets.jsx")["default"] + const IconCapPrev: typeof import("~icons/cap/prev.jsx")["default"] + const IconCapRedo: typeof import("~icons/cap/redo.jsx")["default"] + const IconCapRefresh: typeof import("~icons/cap/refresh.jsx")["default"] + const IconCapRestart: typeof import("~icons/cap/restart.jsx")["default"] + const IconCapScissors: typeof import("~icons/cap/scissors.jsx")["default"] + const IconCapSettings: typeof import('~icons/cap/settings.jsx')['default'] + const IconCapShadow: typeof import("~icons/cap/shadow.jsx")["default"] + const IconCapSize: typeof import("~icons/cap/size.jsx")["default"] + const IconCapSquare: typeof import("~icons/cap/square.jsx")["default"] + const IconCapStop: typeof import("~icons/cap/stop.jsx")["default"] + const IconCapStopCircle: typeof import("~icons/cap/stop-circle.jsx")["default"] + const IconCapTrash: typeof import("~icons/cap/trash.jsx")["default"] + const IconCapUndo: typeof import("~icons/cap/undo.jsx")["default"] + const IconCapUpload: typeof import("~icons/cap/upload.jsx")["default"] + const IconCapWindow: typeof import("~icons/cap/window.jsx")["default"] + const IconCapX: typeof import("~icons/cap/x.jsx")["default"] + const IconCapZoomIn: typeof import("~icons/cap/zoom-in.jsx")["default"] + const IconCapZoomOut: typeof import("~icons/cap/zoom-out.jsx")["default"] + const IconHugeiconsEaseCurveControlPoints: typeof import("~icons/hugeicons/ease-curve-control-points.jsx")["default"] + const IconIcBaselineMonitor: typeof import("~icons/ic/baseline-monitor.jsx")["default"] + const IconIcRoundSearch: typeof import("~icons/ic/round-search.jsx")["default"] + const IconLucideBell: typeof import('~icons/lucide/bell.jsx')['default'] + const IconLucideBug: typeof import('~icons/lucide/bug.jsx')['default'] + const IconLucideCamera: typeof import("~icons/lucide/camera.jsx")["default"] + const IconLucideCheck: typeof import("~icons/lucide/check.jsx")["default"] + const IconLucideChevronDown: typeof import("~icons/lucide/chevron-down.jsx")["default"] + const IconLucideClock: typeof import("~icons/lucide/clock.jsx")["default"] + const IconLucideDatabase: typeof import("~icons/lucide/database.jsx")["default"] + const IconLucideEdit: typeof import("~icons/lucide/edit.jsx")["default"] + const IconLucideEye: typeof import("~icons/lucide/eye.jsx")["default"] + const IconLucideFolder: typeof import("~icons/lucide/folder.jsx")["default"] + const IconLucideGift: typeof import('~icons/lucide/gift.jsx')['default'] + const IconLucideHardDrive: typeof import("~icons/lucide/hard-drive.jsx")["default"] + const IconLucideLayoutGrid: typeof import("~icons/lucide/layout-grid.jsx")["default"] + const IconLucideLoaderCircle: typeof import("~icons/lucide/loader-circle.jsx")["default"] + const IconLucideMessageCircle: typeof import("~icons/lucide/message-circle.jsx")["default"] + const IconLucideMessageSquare: typeof import("~icons/lucide/message-square.jsx")["default"] + const IconLucideMessageSquarePlus: typeof import("~icons/lucide/message-square-plus.jsx")["default"] + const IconLucideMicOff: typeof import("~icons/lucide/mic-off.jsx")["default"] + const IconLucideMonitor: typeof import("~icons/lucide/monitor.jsx")["default"] + const IconLucideRabbit: typeof import("~icons/lucide/rabbit.jsx")["default"] + const IconLucideRectangle: typeof import("~icons/lucide/rectangle.jsx")["default"] + const IconLucideRectangleHorizontal: typeof import("~icons/lucide/rectangle-horizontal.jsx")["default"] + const IconLucideRectangleSquare: typeof import("~icons/lucide/rectangle-square.jsx")["default"] + const IconLucideRotateCcw: typeof import("~icons/lucide/rotate-ccw.jsx")["default"] + const IconLucideSearch: typeof import("~icons/lucide/search.jsx")["default"] + const IconLucideSquarePlay: typeof import('~icons/lucide/square-play.jsx')['default'] + const IconLucideUnplug: typeof import("~icons/lucide/unplug.jsx")["default"] + const IconLucideVideo: typeof import("~icons/lucide/video.jsx")["default"] + const IconLucideVolume2: typeof import("~icons/lucide/volume2.jsx")["default"] + const IconLucideVolumeX: typeof import("~icons/lucide/volume-x.jsx")["default"] + const IconLucideX: typeof import("~icons/lucide/x.jsx")["default"] + const IconMdiMonitor: typeof import("~icons/mdi/monitor.jsx")["default"] + const IconPhMonitorBold: typeof import('~icons/ph/monitor-bold.jsx')['default'] } From df683151a96cb28102aeffe51328c915b5d0edfa Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Thu, 31 Jul 2025 22:59:42 +0800 Subject: [PATCH 29/29] wip --- apps/desktop/src-tauri/src/lib.rs | 2 +- apps/desktop/src-tauri/src/recording.rs | 2 +- apps/desktop/src-tauri/src/windows.rs | 10 +--------- crates/project/src/meta.rs | 2 +- crates/rendering/src/layers/cursor.rs | 16 ++++++++++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs index a23eb7b197b..01700d88027 100644 --- a/apps/desktop/src-tauri/src/lib.rs +++ b/apps/desktop/src-tauri/src/lib.rs @@ -1276,7 +1276,7 @@ async fn take_screenshot(app: AppHandle, _state: MutableState<'_, App>) -> Resul use cap_project::*; RecordingMeta { - platform: Platform::default(), + platform: Some(Platform::default()), project_path: recording_dir.clone(), sharing: None, pretty_name: screenshot_name, diff --git a/apps/desktop/src-tauri/src/recording.rs b/apps/desktop/src-tauri/src/recording.rs index e27a9dd4e6d..f6f6afed0b0 100644 --- a/apps/desktop/src-tauri/src/recording.rs +++ b/apps/desktop/src-tauri/src/recording.rs @@ -772,7 +772,7 @@ async fn handle_recording_finish( }; let meta = RecordingMeta { - platform: Platform::default(), + platform: Some(Platform::default()), project_path: recording_dir.clone(), sharing, pretty_name: format!( diff --git a/apps/desktop/src-tauri/src/windows.rs b/apps/desktop/src-tauri/src/windows.rs index 15d651ad016..1a3149df4ee 100644 --- a/apps/desktop/src-tauri/src/windows.rs +++ b/apps/desktop/src-tauri/src/windows.rs @@ -167,7 +167,7 @@ pub enum ShowCapWindow { WindowCaptureOccluder { screen_id: u32 }, CaptureArea { screen_id: u32 }, Camera, - InProgressRecording { position: Option<(f64, f64)> }, + InProgressRecording { countdown: Option }, Upgrade, ModeSelect, } @@ -309,8 +309,6 @@ impl ShowCapWindow { Self::Camera => { const WINDOW_SIZE: f64 = 230.0 * 2.0; - let port = app.state::>>().read().await.camera_ws_port; - let mut window_builder = self .window_builder(app, "/camera") .maximized(false) @@ -326,12 +324,6 @@ impl ShowCapWindow { - WINDOW_SIZE - 100.0, ) - .initialization_script(&format!( - " - window.__CAP__ = window.__CAP__ ?? {{}}; - window.__CAP__.cameraWsPort = {port}; - ", - )) .transparent(true); let window = window_builder.build()?; diff --git a/crates/project/src/meta.rs b/crates/project/src/meta.rs index a8bfc8ff442..2d8013dca98 100644 --- a/crates/project/src/meta.rs +++ b/crates/project/src/meta.rs @@ -61,7 +61,7 @@ impl Default for Platform { #[derive(Debug, Clone, Serialize, Deserialize, Type)] pub struct RecordingMeta { #[serde(default)] - pub platform: Platform, + pub platform: Option, // this field is just for convenience, it shouldn't be persisted #[serde(skip_serializing, default)] pub project_path: PathBuf, diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rs index 9520cda69ca..fd6f912b966 100644 --- a/crates/rendering/src/layers/cursor.rs +++ b/crates/rendering/src/layers/cursor.rs @@ -304,10 +304,18 @@ impl CursorLayer { let cursor_size_constant = factor * cursor_size_percentage * zoom.display_amount() as f32; - XY::new( - cursor_size_constant * cursor_texture_size_aspect, - cursor_size_constant, - ) + if cursor_texture_size_aspect > 1.0 { + // Wide cursor: base sizing on width to prevent excessive width + let width = cursor_size_constant; + let height = cursor_size_constant / cursor_texture_size_aspect; + XY::new(width, height) + } else { + // Tall or square cursor: base sizing on height (current behavior) + XY::new( + cursor_size_constant * cursor_texture_size_aspect, + cursor_size_constant, + ) + } }; let click_scale_factor = get_click_t(&cursor.clicks, (time_s as f64) * 1000.0)