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)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
fn main() {
gtk::init().unwrap();
let mut indicator =
AppIndicator::new("libayatana-appindicator test application", "");
indicator.set_status(AppIndicatorStatus::Active);
let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples");
indicator.set_icon_theme_path(icon_path.to_str().unwrap());
indicator.set_icon_full("rust-logo-64x64-blk", "icon");
let mut m = gtk::Menu::new();
let mi = gtk::CheckMenuItem::with_label("Hello RUST");
mi.connect_activate(|_| {
gtk::main_quit();
});
m.append(&mi);
indicator.set_menu(&mut m);
m.show_all();
gtk::main();
}
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)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
fn main() {
gtk::init().unwrap();
let mut indicator =
AppIndicator::new("libayatana-appindicator test application", "");
indicator.set_status(AppIndicatorStatus::Active);
let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples");
indicator.set_icon_theme_path(icon_path.to_str().unwrap());
indicator.set_icon_full("rust-logo-64x64-blk", "icon");
let mut m = gtk::Menu::new();
let mi = gtk::CheckMenuItem::with_label("Hello RUST");
mi.connect_activate(|_| {
gtk::main_quit();
});
m.append(&mi);
indicator.set_menu(&mut m);
m.show_all();
gtk::main();
}
Examples found in repository?
examples/hello-rust.rs (line 23)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
fn main() {
gtk::init().unwrap();
let mut indicator =
AppIndicator::new("libayatana-appindicator test application", "");
indicator.set_status(AppIndicatorStatus::Active);
let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples");
indicator.set_icon_theme_path(icon_path.to_str().unwrap());
indicator.set_icon_full("rust-logo-64x64-blk", "icon");
let mut m = gtk::Menu::new();
let mi = gtk::CheckMenuItem::with_label("Hello RUST");
mi.connect_activate(|_| {
gtk::main_quit();
});
m.append(&mi);
indicator.set_menu(&mut m);
m.show_all();
gtk::main();
}
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)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
fn main() {
gtk::init().unwrap();
let mut indicator =
AppIndicator::new("libayatana-appindicator test application", "");
indicator.set_status(AppIndicatorStatus::Active);
let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples");
indicator.set_icon_theme_path(icon_path.to_str().unwrap());
indicator.set_icon_full("rust-logo-64x64-blk", "icon");
let mut m = gtk::Menu::new();
let mi = gtk::CheckMenuItem::with_label("Hello RUST");
mi.connect_activate(|_| {
gtk::main_quit();
});
m.append(&mi);
indicator.set_menu(&mut m);
m.show_all();
gtk::main();
}
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)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
fn main() {
gtk::init().unwrap();
let mut indicator =
AppIndicator::new("libayatana-appindicator test application", "");
indicator.set_status(AppIndicatorStatus::Active);
let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("examples");
indicator.set_icon_theme_path(icon_path.to_str().unwrap());
indicator.set_icon_full("rust-logo-64x64-blk", "icon");
let mut m = gtk::Menu::new();
let mi = gtk::CheckMenuItem::with_label("Hello RUST");
mi.connect_activate(|_| {
gtk::main_quit();
});
m.append(&mi);
indicator.set_menu(&mut m);
m.show_all();
gtk::main();
}
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 Freeze for AppIndicator
impl RefUnwindSafe for AppIndicator
impl !Send for AppIndicator
impl !Sync for AppIndicator
impl Unpin 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