audrey/src/main.rs
2024-11-02 20:57:12 +01:00

50 lines
1.3 KiB
Rust

pub const VERSION: &str = "0.1.0"; // AUDREY_VERSION
pub const USER_AGENT: &str = "audrey/linux";
pub const APP_ID: &str = "eu.callcc.audrey";
mod application;
pub use application::Application;
mod meson_config;
pub mod ui;
pub mod mpris;
pub use mpris::Mpris;
pub mod playbin;
pub use playbin::Playbin;
pub mod subsonic;
pub mod subsonic_vala;
mod playbin2;
use gettextrs::{bind_textdomain_codeset, bindtextdomain, setlocale, textdomain, LocaleCategory};
use gtk::prelude::*;
use gtk::{gio, glib};
pub mod mpv;
#[link(name = "audrey")]
#[link(name = "gcrypt")]
#[link(name = "json-glib-1.0")]
#[link(name = "secret-1")]
#[link(name = "soup-3.0")]
extern "C" {}
fn main() -> glib::ExitCode {
gio::resources_register_include!("audrey.gresource").expect("could not register resources");
ui::Playbar::ensure_type();
ui::PlayQueue::ensure_type();
gtk::disable_setlocale();
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");
let app = Application::new();
app.run()
}