pub struct AppIndicator { /* private fields */ }Implementations§
Source§impl AppIndicator
impl AppIndicator
Sourcepub fn new(title: &str, icon: &str) -> AppIndicator
pub fn new(title: &str, icon: &str) -> AppIndicator
Examples found in repository?
examples/hello-rust.rs (line 12)
9fn main() {
10 gtk::init().unwrap();
11 let mut indicator =
12 AppIndicator::new("libayatana-appindicator test application", "");
13 indicator.set_status(AppIndicatorStatus::Active);
14 let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples");
15 indicator.set_icon_theme_path(icon_path.to_str().unwrap());
16 indicator.set_icon_full("rust-logo-64x64-blk", "icon");
17 let mut m = gtk::Menu::new();
18 let mi = gtk::CheckMenuItem::with_label("Hello RUST");
19 mi.connect_activate(|_| {
20 gtk::main_quit();
21 });
22 m.append(&mi);
23 indicator.set_menu(&mut m);
24 m.show_all();
25 gtk::main();
26}pub fn with_path(title: &str, icon: &str, theme_path: &str) -> AppIndicator
Sourcepub fn set_status(&mut self, status: AppIndicatorStatus)
pub fn set_status(&mut self, status: AppIndicatorStatus)
Examples found in repository?
examples/hello-rust.rs (line 13)
9fn main() {
10 gtk::init().unwrap();
11 let mut indicator =
12 AppIndicator::new("libayatana-appindicator test application", "");
13 indicator.set_status(AppIndicatorStatus::Active);
14 let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples");
15 indicator.set_icon_theme_path(icon_path.to_str().unwrap());
16 indicator.set_icon_full("rust-logo-64x64-blk", "icon");
17 let mut m = gtk::Menu::new();
18 let mi = gtk::CheckMenuItem::with_label("Hello RUST");
19 mi.connect_activate(|_| {
20 gtk::main_quit();
21 });
22 m.append(&mi);
23 indicator.set_menu(&mut m);
24 m.show_all();
25 gtk::main();
26}Examples found in repository?
examples/hello-rust.rs (line 23)
9fn main() {
10 gtk::init().unwrap();
11 let mut indicator =
12 AppIndicator::new("libayatana-appindicator test application", "");
13 indicator.set_status(AppIndicatorStatus::Active);
14 let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples");
15 indicator.set_icon_theme_path(icon_path.to_str().unwrap());
16 indicator.set_icon_full("rust-logo-64x64-blk", "icon");
17 let mut m = gtk::Menu::new();
18 let mi = gtk::CheckMenuItem::with_label("Hello RUST");
19 mi.connect_activate(|_| {
20 gtk::main_quit();
21 });
22 m.append(&mi);
23 indicator.set_menu(&mut m);
24 m.show_all();
25 gtk::main();
26}pub fn set_label(&mut self, label: &str, guide: &str)
pub fn set_title(&mut self, title: &str)
pub fn set_icon(&mut self, name: &str)
Sourcepub fn set_icon_theme_path(&mut self, path: &str)
pub fn set_icon_theme_path(&mut self, path: &str)
Examples found in repository?
examples/hello-rust.rs (line 15)
9fn main() {
10 gtk::init().unwrap();
11 let mut indicator =
12 AppIndicator::new("libayatana-appindicator test application", "");
13 indicator.set_status(AppIndicatorStatus::Active);
14 let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples");
15 indicator.set_icon_theme_path(icon_path.to_str().unwrap());
16 indicator.set_icon_full("rust-logo-64x64-blk", "icon");
17 let mut m = gtk::Menu::new();
18 let mi = gtk::CheckMenuItem::with_label("Hello RUST");
19 mi.connect_activate(|_| {
20 gtk::main_quit();
21 });
22 m.append(&mi);
23 indicator.set_menu(&mut m);
24 m.show_all();
25 gtk::main();
26}Sourcepub fn set_icon_full(&mut self, name: &str, desc: &str)
pub fn set_icon_full(&mut self, name: &str, desc: &str)
Examples found in repository?
examples/hello-rust.rs (line 16)
9fn main() {
10 gtk::init().unwrap();
11 let mut indicator =
12 AppIndicator::new("libayatana-appindicator test application", "");
13 indicator.set_status(AppIndicatorStatus::Active);
14 let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples");
15 indicator.set_icon_theme_path(icon_path.to_str().unwrap());
16 indicator.set_icon_full("rust-logo-64x64-blk", "icon");
17 let mut m = gtk::Menu::new();
18 let mi = gtk::CheckMenuItem::with_label("Hello RUST");
19 mi.connect_activate(|_| {
20 gtk::main_quit();
21 });
22 m.append(&mi);
23 indicator.set_menu(&mut m);
24 m.show_all();
25 gtk::main();
26}pub fn set_attention_icon(&mut self, name: &str)
pub fn set_attention_icon_full(&mut self, name: &str, desc: &str)
Auto Trait Implementations§
impl !Send for AppIndicator
impl !Sync for AppIndicator
impl Freeze for AppIndicator
impl RefUnwindSafe for AppIndicator
impl Unpin for AppIndicator
impl UnsafeUnpin for AppIndicator
impl UnwindSafe for AppIndicator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more