Debian Codegraph @

src/window_size.rs

raw symbols SCIP
1 /*
2 * Copyright 2020-2024 Andrey Kutejko <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 *
17 * For more details see the file COPYING.
18 */
19
20 use gtkrust-analyzer cargo gtk4 0.11.1 crate/::giorust-analyzer cargo gio 0.22.2 crate/::{selfrust-analyzer cargo gio 0.22.2 crate/, preluderust-analyzer cargo gio 0.22.2 prelude/::*};
21
22 const KEY_WINDOW_WIDTHrust-analyzer cargo gnome-robots 50.0.0 window_size/KEY_WINDOW_WIDTH.: &str = "window-width";
23 const KEY_WINDOW_HEIGHTrust-analyzer cargo gnome-robots 50.0.0 window_size/KEY_WINDOW_HEIGHT.: &str = "window-height";
24 const KEY_WINDOW_IS_MAXIMIZEDrust-analyzer cargo gnome-robots 50.0.0 window_size/KEY_WINDOW_IS_MAXIMIZED.: &str = "window-is-maximized";
25
26 pub fn remember_window_sizerust-analyzer cargo gnome-robots 50.0.0 window_size/remember_window_size().(window: &gtkrust-analyzer cargo gtk4 0.11.1 crate/::Windowrust-analyzer cargo gtk4 0.11.1 auto/window/Window#, settings: &giorust-analyzer cargo gio 0.22.2 crate/::Settingsrust-analyzer cargo gio 0.22.2 auto/settings/Settings#) {
27 settings
28 .bindrust-analyzer cargo gio 0.22.2 settings/SettingsExtManual#bind().(KEY_WINDOW_WIDTHrust-analyzer cargo gnome-robots 50.0.0 window_size/KEY_WINDOW_WIDTH., window, "default-width")
29 .buildrust-analyzer cargo gio 0.22.2 settings/impl#[`BindingBuilder<'_>`]build().();
30 settings
31 .bindrust-analyzer cargo gio 0.22.2 settings/SettingsExtManual#bind().(KEY_WINDOW_HEIGHTrust-analyzer cargo gnome-robots 50.0.0 window_size/KEY_WINDOW_HEIGHT., window, "default-height")
32 .buildrust-analyzer cargo gio 0.22.2 settings/impl#[`BindingBuilder<'_>`]build().();
33 settings
34 .bindrust-analyzer cargo gio 0.22.2 settings/SettingsExtManual#bind().(KEY_WINDOW_IS_MAXIMIZEDrust-analyzer cargo gnome-robots 50.0.0 window_size/KEY_WINDOW_IS_MAXIMIZED., window, "maximized")
35 .buildrust-analyzer cargo gio 0.22.2 settings/impl#[`BindingBuilder<'_>`]build().();
36 }