audrey/src/main.rs
2024-11-03 19:40:12 +01:00

53 lines
1.4 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_song;
pub use playbin_song::Song as PlaybinSong;
pub mod subsonic;
pub mod playbin;
pub type Playbin = playbin::Playbin<PlaybinSong>;
mod signal;
pub use signal::{Signal, SignalEmitter, SignalHandler};
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()
}