winit/platform/
unix.rs

1#![cfg(any(
2    target_os = "linux",
3    target_os = "dragonfly",
4    target_os = "freebsd",
5    target_os = "netbsd",
6    target_os = "openbsd"
7))]
8
9use crate::window::Window;
10
11/// Additional methods on `Window` that are specific to Unix.
12pub trait WindowExtUnix {
13    /// Returns the `ApplicatonWindow` from gtk crate that is used by this window.
14    ///
15    /// Returns `None` if the window doesn't use xlib (if it uses wayland for example).
16    fn gtk_window(&self) -> &gtk::ApplicationWindow;
17
18    /// Not to display window icon in the task bar.
19    fn skip_taskbar(&self);
20}
21
22impl WindowExtUnix for Window {
23    fn gtk_window(&self) -> &gtk::ApplicationWindow {
24        &self.window.window
25    }
26
27    fn skip_taskbar(&self) {
28        self.window.skip_taskbar()
29    }
30}