Files
oak-editor/src/lib.rs
T
Mike-Solar e346ea5338 feat(app): P5 — async full-res render, full preferences, shortcut map
- viewers show the 480px proxy immediately and a background thread
  fills the sequence-resolution frame (per-monitor in-flight job,
  generation-based staleness, playback skips full-res)
- preferences dialog complete: cache dir (now consumed by
  default_disk_cache_path), proxy policy/divider, snapshot interval
  (write-through era autosave), default transition length, audio
  in/out devices (new facade device-enumeration exports; audio init
  from config — playback was never creating the audio instance),
  language/theme/renderer backend, all persisted via config
- shortcut map (src/shortcuts.rs): space/J/K/L, I/O, S split, A/^A,
  ⌘Z/⌘⇧Z, ⌘N/⌘O/⌘S/⌘E/⌘Q, frame step, Home, track zoom; dispatch
  shares the menu action path and stays silent over modals
- screenshots: preferences dialog zh/en captured and reviewed
2026-08-16 18:05:03 +08:00

66 lines
2.8 KiB
Rust

// Oak Video Editor - Non-Linear Video Editor
// Copyright (C) 2026 Oak Team
//
// 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 <http://www.gnu.org/licenses/>.
//! `oakapp` — the Rust application layer of Oak, built on the `gpui` UI
//! framework (the oak-gpui fork at `gpui/`).
//!
//! This is the start of the Rust rewrite of `app/` (Qt): a gpui window with
//! the main layout from the design (`design/`), dockable panels built from
//! the `gpui_widgets` library, and an engine seam (`oakui`) with two
//! backends: the mock ([`oakui::MockEngine`]) feeding demo data, and the
//! real engine ([`oakui::RealEngine`]) bound to the built `liboakengine`
//! dylib through its frozen `oakengine_*` C ABI only (project open/save,
//! sequence/track/clip data, timeline edits through the oaktimeline edit
//! commands, the oaktask export path, and the config C ABI).
//!
//! # Layout
//!
//! * [`app`] — the window shell: menu bar, dock layout, status bar, modal
//! dialogs (file open/save-as, preferences, export), tick loop.
//! * [`dialogs`] — the preferences and export dialog content views.
//! * [`shortcuts`] — the keyboard shortcut table (keystroke → menu action).
//! * [`manager`] — the project manager window (M13 D4): the library browser
//! with new / open / rename / duplicate / delete / import / export.
//! * [`panels`] — the dockable panels (viewers, timeline, inspector, ...).
//! * [`oakui`] — the engine gateway trait, the mock + real implementations,
//! and the pure view-state logic (timecode, transport).
//!
//! # Running
//!
//! ```text
//! cargo run --bin oak-editor # the real engine, no project
//! cargo run --bin oak-editor -- path/to/project.ove # open a project at startup
//! cargo run --bin oak-editor -- --mock # the demo (mock) engine
//! cargo test # unit tests (app + crates)
//! ```
//!
//! The engine backend is selected at startup: the real engine by default,
//! the mock with the `--mock` flag, `OAK_ENGINE=mock`, or the
//! `mock-engine` cargo feature.
pub mod app;
pub mod dialogs;
pub mod i18n;
pub mod manager;
pub mod oakui;
pub mod panels;
pub mod shortcuts;
/// The application entry point (called from `main.rs`).
pub fn run() {
app::run();
}