dbusmenu_gtk3/
lib.rs

1//! # bindings for gtk part of libdbusmenu
2//!
3//! Rust bindings for the gtk part of [libdbusmenu] that work with the [gtk-rs ecosystem].
4//!
5//! If you are looking to expose a menu over DBus (e.g. for a system tray icon), see [`mod@dbusmenu_glib`].
6//! This crate provides [`Menu`], a GTK widget which will show the contents of a menu exposed over DBus.
7//!
8//! [libdbusmenu]: https://github.com/AyatanaIndicators/libdbusmenu
9//! [gtk-rs ecosystem]: https://gtk-rs.org
10
11// for links in docs
12#[allow(unused)] use dbusmenu_glib;
13#[allow(unused)] use gtk;
14#[allow(unused_macros)]
15#[doc(hidden)]
16macro_rules! skip_assert_initialized {
17    () => {};
18}
19
20#[allow(unused_macros)]
21#[doc(hidden)]
22macro_rules! assert_initialized_main_thread {
23    () => {
24      if !::gtk::is_initialized_main_thread() {
25    if ::gtk::is_initialized() {
26        panic!("GTK may only be used from the main thread.");
27    } else {
28        panic!("GTK has not been initialized. Call `gtk::init` first.");
29    }
30}
31
32    };
33}
34
35mod auto;
36pub use auto::*;
37pub use ffi;