Debian Codegraph @

src/cursors.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 craterust-analyzer cargo gnome-robots 50.0.0 crate/::configrust-analyzer cargo gnome-robots 50.0.0 config/::DATA_DIRECTORY;
21 use gtkrust-analyzer cargo gtk4 0.11.1 crate/::gdkrust-analyzer cargo gdk4 0.11.1 crate/;
22 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/::Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#;
23
24 pub fn make_cursorsrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursors().() -> Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<gdkrust-analyzer cargo gdk4 0.11.1 crate/::Cursorrust-analyzer cargo gdk4 0.11.1 auto/cursor/Cursor#> {
25 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
26 make_cursorrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursor().("cursor-up-left.png", 3, 3),
27 make_cursorrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursor().("cursor-up.png", 10, 3),
28 make_cursorrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursor().("cursor-up-right.png", 17, 3),
29 make_cursorrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursor().("cursor-left.png", 3, 10),
30 make_cursorrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursor().("cursor-hold.png", 10, 10),
31 make_cursorrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursor().("cursor-right.png", 17, 10),
32 make_cursorrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursor().("cursor-down-left.png", 3, 17),
33 make_cursorrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursor().("cursor-down.png", 10, 17),
34 make_cursorrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursor().("cursor-down-right.png", 17, 17),
35 ]
36 }
37
38 fn make_cursorrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursor().(filename: &str, hsx: i32, hsy: i32) -> gdkrust-analyzer cargo gdk4 0.11.1 crate/::Cursorrust-analyzer cargo gdk4 0.11.1 auto/cursor/Cursor# {
39 let path = Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]new().(DATA_DIRECTORY).joinrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]join().("cursors").joinrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]join().(filename);
40 let texture = gdkrust-analyzer cargo gdk4 0.11.1 crate/::Texturerust-analyzer cargo gdk4 0.11.1 auto/texture/Texture#::from_filenamerust-analyzer cargo gdk4 0.11.1 auto/texture/impl#[Texture]from_filename().(path).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
41 gdkrust-analyzer cargo gdk4 0.11.1 crate/::Cursorrust-analyzer cargo gdk4 0.11.1 auto/cursor/Cursor#::from_texturerust-analyzer cargo gdk4 0.11.1 auto/cursor/impl#[Cursor]from_texture().(&texture, hsx, hsy, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#)
42 }