Tutorial by Examples

Add the Gtk dependecy to your Cargo.toml: [dependencies] gtk = { git = "https://github.com/gtk-rs/gtk.git" } Create a simple window with the following: extern crate gtk; use gtk::prelude::*; // Import all the basic things use gtk::{Window, WindowType, Label}; fn main() { ...
extern crate gtk; use gtk::prelude::*; use gtk::{Window, WindowType, Label, Entry, Box as GtkBox, Orientation}; fn main() { if gtk::init().is_err() { println!("Failed to initialize GTK."); return; } let window = Window::new(WindowType::Toplevel); ...

Page 1 of 1