|
|
@ -10,6 +10,7 @@ mod redraw_scheduler;
|
|
|
|
mod renderer;
|
|
|
|
mod renderer;
|
|
|
|
mod settings;
|
|
|
|
mod settings;
|
|
|
|
mod window;
|
|
|
|
mod window;
|
|
|
|
|
|
|
|
pub mod windows_utils;
|
|
|
|
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
#[macro_use]
|
|
|
|
extern crate derive_new;
|
|
|
|
extern crate derive_new;
|
|
|
@ -18,10 +19,7 @@ extern crate rust_embed;
|
|
|
|
#[macro_use]
|
|
|
|
#[macro_use]
|
|
|
|
extern crate lazy_static;
|
|
|
|
extern crate lazy_static;
|
|
|
|
|
|
|
|
|
|
|
|
use std::{
|
|
|
|
use std::sync::{atomic::AtomicBool, mpsc::channel, Arc};
|
|
|
|
process,
|
|
|
|
|
|
|
|
sync::{atomic::AtomicBool, mpsc::channel, Arc},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use crossfire::mpsc::unbounded_future;
|
|
|
|
use crossfire::mpsc::unbounded_future;
|
|
|
|
|
|
|
|
|
|
|
@ -29,6 +27,7 @@ use bridge::start_bridge;
|
|
|
|
use editor::start_editor;
|
|
|
|
use editor::start_editor;
|
|
|
|
use renderer::{cursor_renderer::CursorSettings, RendererSettings};
|
|
|
|
use renderer::{cursor_renderer::CursorSettings, RendererSettings};
|
|
|
|
use window::{create_window, window_geometry, KeyboardSettings, WindowSettings};
|
|
|
|
use window::{create_window, window_geometry, KeyboardSettings, WindowSettings};
|
|
|
|
|
|
|
|
use windows_utils::attach_parent_console;
|
|
|
|
|
|
|
|
|
|
|
|
pub const INITIAL_DIMENSIONS: (u64, u64) = (100, 50);
|
|
|
|
pub const INITIAL_DIMENSIONS: (u64, u64) = (100, 50);
|
|
|
|
|
|
|
|
|
|
|
@ -101,11 +100,22 @@ fn main() {
|
|
|
|
// another frame next frame, or if it can safely skip drawing to save battery and cpu power.
|
|
|
|
// another frame next frame, or if it can safely skip drawing to save battery and cpu power.
|
|
|
|
// Multiple other parts of the app "queue_next_frame" function to ensure animations continue
|
|
|
|
// Multiple other parts of the app "queue_next_frame" function to ensure animations continue
|
|
|
|
// properly or updates to the graphics are pushed to the screen.
|
|
|
|
// properly or updates to the graphics are pushed to the screen.
|
|
|
|
|
|
|
|
println!("This is a test");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if std::env::args().any(|arg| arg == "--version" || arg == "-v") {
|
|
|
|
|
|
|
|
attach_parent_console();
|
|
|
|
|
|
|
|
println!("Neovide version: {}", env!("CARGO_PKG_VERSION"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if std::env::args().any(|arg| arg == "--help" || arg == "-h") {
|
|
|
|
|
|
|
|
attach_parent_console();
|
|
|
|
|
|
|
|
println!("Neovide: {}", env!("CARGO_PKG_DESCRIPTION"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if let Err(err) = window_geometry() {
|
|
|
|
if let Err(err) = window_geometry() {
|
|
|
|
eprintln!("{}", err);
|
|
|
|
eprintln!("{}", err);
|
|
|
|
process::exit(1);
|
|
|
|
return;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[cfg(target_os = "macos")]
|
|
|
|
#[cfg(target_os = "macos")]
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -118,7 +128,6 @@ fn main() {
|
|
|
|
.arg("--disowned")
|
|
|
|
.arg("--disowned")
|
|
|
|
.spawn()
|
|
|
|
.spawn()
|
|
|
|
.is_ok());
|
|
|
|
.is_ok());
|
|
|
|
std::process::exit(0);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
eprintln!("error in disowning process, cannot obtain the path for the current executable, continuing without disowning...");
|
|
|
|
eprintln!("error in disowning process, cannot obtain the path for the current executable, continuing without disowning...");
|
|
|
|
}
|
|
|
|
}
|
|
|
|