1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Copyright 2018–2021, The libhandy-rs Project Developers.
// See the COPYRIGHT file at the top-level directory of this distribution.
// Licensed under the LGPL-2.1-only, see the LICENSE file or <https://opensource.org/licenses/LGPL-2.1>
//! # Rust Handy bindings
//!
//! This library contains safe Rust bindings for Handy, a library that offers
//! building blocks for modern adaptive GNOME applications.
//!
//! See also
//!
//! - [GTK 3 Rust bindings documentation](mod@gtk)
//! - [Libhandy documentation](https://gnome.pages.gitlab.gnome.org/libhandy/)
//! - [gtk-rs project overview](https://gtk-rs.org/)
//!
//! # Example
//!
//! ```no_run
//! use gtk::prelude::*;
//! use gtk::{Application, Box, ListBox, Orientation};
//! use libhandy::prelude::*;
//! use libhandy::{ActionRow, ApplicationWindow, HeaderBar};
//!
//! fn main() {
//! let application = Application::builder()
//! .application_id("com.example.FirstHandyApp")
//! .build();
//!
//! application.connect_activate(|app| {
//! libhandy::init();
//!
//! // ActionRows are only available in Handy
//! let row = ActionRow::builder()
//! .activatable(true)
//! .selectable(false)
//! .margin(32)
//! .title("Click me")
//! .build();
//! row.connect_activated(|_| {
//! eprintln!("Clicked!");
//! });
//!
//! let list = ListBox::builder().child(&row).build();
//! // the content class makes the list look nicer
//! list.style_context().add_class("content");
//!
//! // Combine the content in a box
//! let content = Box::new(Orientation::Vertical, 0);
//! // Handy's ApplicationWindow does not include a HeaderBar
//! content.add(
//! &HeaderBar::builder()
//! .show_close_button(true)
//! .title("First Handy Program")
//! .build(),
//! );
//! content.add(&list);
//!
//! let window = ApplicationWindow::builder()
//! .default_width(350)
//! .default_height(70)
//! // add content to window
//! .child(&content)
//! .build();
//! window.set_application(Some(app));
//! window.show_all();
//! });
//!
//! application.run();
//! }
//! ```
/// Asserts that this is the main thread and `gtk::init` has been called.
pub use gdk;
pub use gio;
pub use glib;
pub use gtk;
pub use pango;
pub use *;
pub use *;