main.rs 803 Bytes
Newer Older
Eisha Chen-yen-su's avatar
Eisha Chen-yen-su committed
1
extern crate gdk_pixbuf;
Eisha Chen-yen-su's avatar
Eisha Chen-yen-su committed
2 3 4 5
extern crate gio;
extern crate glib;
extern crate gtk;

Eisha Chen-yen-su's avatar
Eisha Chen-yen-su committed
6 7
extern crate foundry;

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
// http://gtk-rs.org/tuto/closures
#[macro_export]
macro_rules! clone {
    (@param _) => ( _ );
    (@param $x:ident) => ( $x );
    ($($n:ident),+ => move || $body:expr) => (
        {
            $( let $n = $n.clone(); )+
            move || $body
        }
    );
    ($($n:ident),+ => move |$($p:tt),+| $body:expr) => (
        {
            $( let $n = $n.clone(); )+
            move |$(clone!(@param $p),)+| $body
        }
    );
}
Eisha Chen-yen-su's avatar
Eisha Chen-yen-su committed
26

27 28
mod app;
mod backend;
Eisha Chen-yen-su's avatar
Eisha Chen-yen-su committed
29
mod bkmessages;
Eisha Chen-yen-su's avatar
Eisha Chen-yen-su committed
30 31 32 33
mod static_resource;
mod window;

fn main() {
34 35
    gtk::init().expect("Error initializing gtk.");
    static_resource::init().expect("Something went wrong with the resource file initialization.");
Eisha Chen-yen-su's avatar
Eisha Chen-yen-su committed
36

37
    app::launch();
Eisha Chen-yen-su's avatar
Eisha Chen-yen-su committed
38
}