gtk/lib.rs
1// Take a look at the license at the top of the repository in the LICENSE file.
2
3#![allow(clippy::needless_doctest_main)]
4#![allow(clippy::upper_case_acronyms)]
5#![allow(clippy::wrong_self_convention)]
6#![doc = include_str!("../README.md")]
7#![allow(clippy::type_complexity)]
8#![allow(clippy::derived_hash_with_manual_eq)]
9#![allow(clippy::too_many_arguments)]
10#![allow(clippy::missing_safety_doc)]
11#![allow(clippy::new_without_default)]
12#![cfg_attr(docsrs, feature(doc_cfg))]
13
14pub use ffi;
15// Re-export gtk dependencies
16pub use atk;
17pub use cairo;
18pub use gdk;
19pub use gdk_pixbuf;
20pub use gio;
21pub use glib;
22pub use pango;
23
24#[doc(hidden)]
25pub use field_offset::*;
26#[doc(hidden)]
27pub use gtk3_macros::*;
28
29pub mod xlib;
30
31#[doc(alias = "GTK_STYLE_PROVIDER_PRIORITY_FALLBACK")]
32pub const STYLE_PROVIDER_PRIORITY_FALLBACK: u32 = ffi::GTK_STYLE_PROVIDER_PRIORITY_FALLBACK as u32;
33#[doc(alias = "GTK_STYLE_PROVIDER_PRIORITY_THEME")]
34pub const STYLE_PROVIDER_PRIORITY_THEME: u32 = ffi::GTK_STYLE_PROVIDER_PRIORITY_THEME as u32;
35#[doc(alias = "GTK_STYLE_PROVIDER_PRIORITY_SETTINGS")]
36pub const STYLE_PROVIDER_PRIORITY_SETTINGS: u32 = ffi::GTK_STYLE_PROVIDER_PRIORITY_SETTINGS as u32;
37#[doc(alias = "GTK_STYLE_PROVIDER_PRIORITY_APPLICATION")]
38pub const STYLE_PROVIDER_PRIORITY_APPLICATION: u32 =
39 ffi::GTK_STYLE_PROVIDER_PRIORITY_APPLICATION as u32;
40#[doc(alias = "GTK_STYLE_PROVIDER_PRIORITY_USER")]
41pub const STYLE_PROVIDER_PRIORITY_USER: u32 = ffi::GTK_STYLE_PROVIDER_PRIORITY_USER as u32;
42
43#[macro_use]
44mod rt;
45
46#[cfg(test)]
47pub(crate) static TEST_THREAD_WORKER: glib::once_cell::sync::Lazy<glib::ThreadPool> =
48 glib::once_cell::sync::Lazy::new(|| {
49 let pool = glib::ThreadPool::exclusive(1).unwrap();
50 pool.push(move || {
51 crate::init().expect("Tests failed to initialize gtk");
52 })
53 .expect("Failed to schedule a test call");
54 pool
55 });
56
57#[allow(clippy::let_and_return)]
58#[allow(clippy::many_single_char_names)]
59#[allow(clippy::wrong_self_convention)]
60#[allow(clippy::clone_on_copy)]
61#[allow(unused_imports)]
62mod auto;
63
64mod accel_group;
65mod app_chooser;
66mod application;
67mod application_window;
68mod border;
69mod buildable;
70mod builder;
71mod cell_renderer_pixbuf;
72mod clipboard;
73mod color_button;
74mod color_chooser;
75mod combo_box;
76mod container;
77mod dialog;
78mod drag_context;
79mod entry;
80mod entry_buffer;
81mod entry_completion;
82mod enums;
83mod file_chooser;
84mod file_chooser_dialog;
85mod file_filter_info;
86mod fixed;
87mod flow_box;
88mod functions;
89#[cfg(feature = "v3_24")]
90mod gesture_stylus;
91mod im_context_simple;
92mod image;
93mod invisible;
94mod list_box;
95mod list_store;
96mod menu;
97mod message_dialog;
98mod native_dialog;
99mod notebook;
100mod pad_action_entry;
101mod pad_controller;
102mod page_range;
103mod print_operation;
104mod print_settings;
105mod radio_button;
106mod radio_menu_item;
107mod radio_tool_button;
108mod recent_chooser_dialog;
109mod recent_data;
110mod requisition;
111mod response_type;
112mod selection_data;
113mod signal;
114mod stack_switcher;
115mod style_context;
116mod switch;
117mod target_entry;
118mod target_list;
119mod text_buffer;
120mod text_iter;
121mod tree_model_filter;
122mod tree_path;
123mod tree_row_reference;
124mod tree_sortable;
125mod tree_store;
126mod tree_view_column;
127mod widget;
128
129#[macro_use]
130pub mod subclass;
131
132pub mod builders;
133pub mod prelude;
134
135pub use crate::auto::functions::*;
136pub use crate::auto::*;
137pub use crate::rt::*;
138pub use crate::signal::*;
139
140pub use gdk::Rectangle as Allocation;
141pub use gdk::Rectangle;
142
143pub use crate::app_chooser::AppChooser;
144pub use crate::border::Border;
145pub use crate::entry_buffer::EntryBuffer;
146pub use crate::file_filter_info::FileFilterInfo;
147pub use crate::page_range::PageRange;
148pub use crate::recent_data::RecentData;
149pub use crate::requisition::Requisition;
150pub use crate::response_type::ResponseType;
151pub use crate::target_entry::TargetEntry;
152pub use crate::tree_sortable::SortColumn;
153pub use crate::widget::TickCallbackId;
154pub use functions::*;
155pub use pad_action_entry::PadActionEntry;