audrey/src/main.rs

54 lines
1.3 KiB
Rust
Raw Normal View History

2024-11-01 08:47:23 +00:00
pub const VERSION: &str = "0.1.0"; // AUDREY_VERSION
pub const USER_AGENT: &str = "audrey/linux";
pub const APP_ID: &str = "eu.callcc.audrey";
2024-11-01 08:47:03 +00:00
2024-10-29 12:01:42 +00:00
mod application;
2024-10-29 13:02:29 +00:00
pub use application::Application;
2024-10-30 06:32:21 +00:00
mod meson_config;
2024-10-29 13:02:29 +00:00
pub mod ui;
2024-10-29 12:01:42 +00:00
2024-10-30 09:06:10 +00:00
pub mod mpris;
pub use mpris::Mpris;
pub mod playbin;
pub use playbin::Playbin;
pub mod subsonic;
2024-10-31 12:16:42 +00:00
pub mod subsonic_vala;
2024-10-30 09:06:10 +00:00
2024-11-03 15:11:25 +00:00
pub mod playbin2;
2024-11-02 19:57:12 +00:00
2024-11-03 10:57:55 +00:00
mod signal;
pub use signal::{Signal, SignalEmitter, SignalHandler};
2024-11-03 10:57:55 +00:00
2024-10-30 06:32:21 +00:00
use gettextrs::{bind_textdomain_codeset, bindtextdomain, setlocale, textdomain, LocaleCategory};
2024-10-29 12:01:42 +00:00
use gtk::prelude::*;
2024-10-29 13:02:29 +00:00
use gtk::{gio, glib};
2024-10-29 10:46:58 +00:00
2024-10-30 07:41:17 +00:00
pub mod mpv;
2024-10-29 10:37:15 +00:00
#[link(name = "audrey")]
#[link(name = "gcrypt")]
#[link(name = "json-glib-1.0")]
2024-10-29 18:13:58 +00:00
#[link(name = "secret-1")]
2024-10-29 10:37:15 +00:00
#[link(name = "soup-3.0")]
2024-10-29 13:02:29 +00:00
extern "C" {}
2024-10-29 10:37:15 +00:00
2024-10-29 12:01:42 +00:00
fn main() -> glib::ExitCode {
2024-10-29 10:46:58 +00:00
gio::resources_register_include!("audrey.gresource").expect("could not register resources");
2024-10-30 11:45:50 +00:00
ui::Playbar::ensure_type();
2024-10-31 11:02:00 +00:00
ui::PlayQueue::ensure_type();
2024-10-30 11:45:50 +00:00
2024-10-29 12:01:42 +00:00
gtk::disable_setlocale();
2024-10-30 06:32:21 +00:00
bindtextdomain("audrey", meson_config::LOCALEDIR).expect("failed to bind text domain");
bind_textdomain_codeset("audrey", "UTF-8").expect("failed to bind textdomaincodeset");
textdomain("audrey").expect("unable to switch to text domain");
setlocale(LocaleCategory::LcAll, "");
setlocale(LocaleCategory::LcNumeric, "C.UTF-8");
2024-10-29 12:01:42 +00:00
let app = Application::new();
2024-11-01 08:29:59 +00:00
2024-10-29 12:01:42 +00:00
app.run()
2024-10-29 10:37:15 +00:00
}