pub trait ShellExt:
IsA<Shell>
+ Sealed
+ 'static {
Show 16 methods
// Provided methods
fn fade_out(&self, timeout: u32) { ... }
fn is_locked(&self) -> bool { ... }
fn lockscreen_manager(&self) -> LockscreenManager { ... }
fn lockscreen_type(&self) -> Type { ... }
fn screenshot_manager(&self) -> ScreenshotManager { ... }
fn usable_area(&self) -> (i32, i32, i32, i32) { ... }
fn set_default(&self) { ... }
fn is_docked(&self) -> bool { ... }
fn set_docked(&self, docked: bool) { ... }
fn set_locked(&self, locked: bool) { ... }
fn is_overview_visible(&self) -> bool { ... }
fn set_overview_visible(&self, overview_visible: bool) { ... }
fn connect_ready<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_docked_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_locked_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_overview_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Provided Methods§
fn fade_out(&self, timeout: u32)
fn is_locked(&self) -> bool
fn lockscreen_manager(&self) -> LockscreenManager
fn lockscreen_type(&self) -> Type
Sourcefn screenshot_manager(&self) -> ScreenshotManager
fn screenshot_manager(&self) -> ScreenshotManager
Examples found in repository?
examples/hello-world.rs (line 17)
6fn main() {
7 gtk::init().unwrap();
8
9 let clock = phosh::WallClock::new();
10 clock.set_default();
11
12 let shell = phosh::Shell::new();
13 shell.set_default();
14
15 shell.connect_ready(move |s| {
16 glib::g_message!("example", "Rusty shell ready");
17 let screenshot_manager = s.screenshot_manager();
18
19 let take_screenshot = glib::clone!(@weak screenshot_manager as sm => move || {
20 sm.take_screenshot(None, Some("hello-world"), false, false);
21 });
22
23 glib::timeout_add_seconds_local_once(2, take_screenshot);
24 });
25
26 gtk::main();
27}
fn usable_area(&self) -> (i32, i32, i32, i32)
Sourcefn set_default(&self)
fn set_default(&self)
Examples found in repository?
examples/custom-shell-and-lockscreen.rs (line 12)
5fn main() {
6 gtk::init().unwrap();
7
8 let clock = phosh::WallClock::new();
9 clock.set_default();
10
11 let shell = custom_shell::CustomShell::new();
12 shell.set_default();
13 shell.set_locked(true);
14
15 shell.connect_ready(|_| {
16 glib::g_message!("example", "Custom Rusty shell ready");
17 });
18
19 gtk::main();
20}
More examples
examples/hello-world.rs (line 13)
6fn main() {
7 gtk::init().unwrap();
8
9 let clock = phosh::WallClock::new();
10 clock.set_default();
11
12 let shell = phosh::Shell::new();
13 shell.set_default();
14
15 shell.connect_ready(move |s| {
16 glib::g_message!("example", "Rusty shell ready");
17 let screenshot_manager = s.screenshot_manager();
18
19 let take_screenshot = glib::clone!(@weak screenshot_manager as sm => move || {
20 sm.take_screenshot(None, Some("hello-world"), false, false);
21 });
22
23 glib::timeout_add_seconds_local_once(2, take_screenshot);
24 });
25
26 gtk::main();
27}
fn is_docked(&self) -> bool
fn set_docked(&self, docked: bool)
Sourcefn set_locked(&self, locked: bool)
fn set_locked(&self, locked: bool)
Examples found in repository?
examples/custom-shell-and-lockscreen.rs (line 13)
5fn main() {
6 gtk::init().unwrap();
7
8 let clock = phosh::WallClock::new();
9 clock.set_default();
10
11 let shell = custom_shell::CustomShell::new();
12 shell.set_default();
13 shell.set_locked(true);
14
15 shell.connect_ready(|_| {
16 glib::g_message!("example", "Custom Rusty shell ready");
17 });
18
19 gtk::main();
20}
fn is_overview_visible(&self) -> bool
fn set_overview_visible(&self, overview_visible: bool)
Sourcefn connect_ready<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_ready<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Examples found in repository?
examples/custom-shell-and-lockscreen.rs (lines 15-17)
5fn main() {
6 gtk::init().unwrap();
7
8 let clock = phosh::WallClock::new();
9 clock.set_default();
10
11 let shell = custom_shell::CustomShell::new();
12 shell.set_default();
13 shell.set_locked(true);
14
15 shell.connect_ready(|_| {
16 glib::g_message!("example", "Custom Rusty shell ready");
17 });
18
19 gtk::main();
20}
More examples
examples/hello-world.rs (lines 15-24)
6fn main() {
7 gtk::init().unwrap();
8
9 let clock = phosh::WallClock::new();
10 clock.set_default();
11
12 let shell = phosh::Shell::new();
13 shell.set_default();
14
15 shell.connect_ready(move |s| {
16 glib::g_message!("example", "Rusty shell ready");
17 let screenshot_manager = s.screenshot_manager();
18
19 let take_screenshot = glib::clone!(@weak screenshot_manager as sm => move || {
20 sm.take_screenshot(None, Some("hello-world"), false, false);
21 });
22
23 glib::timeout_add_seconds_local_once(2, take_screenshot);
24 });
25
26 gtk::main();
27}
fn connect_docked_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_locked_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_overview_visible_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.