| 1 | /* |
| 2 | * Copyright 2024 Andrey Kutejko <[email protected]> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 3 of the License, or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, see <http://www.gnu.org/licenses/>. |
| 16 | * |
| 17 | * For more details see the file COPYING. |
| 18 | */ |
| 19 | |
| 20 | use application::RobotsApplication; |
| 21 | use config::{GETTEXT_PACKAGE, LOCALEDIR}; |
| 22 | use gtk::prelude::*; |
| 23 | use std::error::Error; |
| 24 | use std::process::Termination; |
| 25 | |
| 26 | mod animation; |
| 27 | mod application; |
| 28 | mod arena; |
| 29 | mod assets; |
| 30 | mod bubble; |
| 31 | mod config; |
| 32 | mod controls; |
| 33 | mod cursors; |
| 34 | mod game; |
| 35 | mod game_area; |
| 36 | mod game_config; |
| 37 | mod graphics; |
| 38 | mod image; |
| 39 | mod properties; |
| 40 | mod properties_dialog; |
| 41 | mod scores; |
| 42 | mod slot; |
| 43 | mod sound_player; |
| 44 | mod theme; |
| 45 | mod themes; |
| 46 | mod utils; |
| 47 | mod window; |
| 48 | mod window_size; |
| 49 | |
| 50 | fn main() -> Result<impl Termination, Box<dyn Error>> { |
| 51 | gettextrs::setlocale(gettextrs::LocaleCategory::LcAll, ""); |
| 52 | gettextrs::bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR)?; |
| 53 | gettextrs::bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8")?; |
| 54 | gettextrs::textdomain(GETTEXT_PACKAGE)?; |
| 55 | |
| 56 | let app = RobotsApplication::default(); |
| 57 | Ok(app.run()) |
| 58 | } |