| 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/::bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/::Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble#; |
| 21 | use craterust-analyzer cargo gnome-robots 50.0.0 crate/::cursorsrust-analyzer cargo gnome-robots 50.0.0 cursors/::make_cursorsrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursors().; |
| 22 | use craterust-analyzer cargo gnome-robots 50.0.0 crate/::themesrust-analyzer cargo gnome-robots 50.0.0 themes/::themes_from_directoryrust-analyzer cargo gnome-robots 50.0.0 themes/themes_from_directory().; |
| 23 | use gtkrust-analyzer cargo gtk4 0.11.1 crate/::{gdkrust-analyzer cargo gdk4 0.11.1 crate/, giorust-analyzer cargo gio 0.22.2 crate/, preluderust-analyzer cargo gtk4 0.11.1 prelude/::*}; |
| 24 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#; |
| 25 | 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#; |
| 26 | |
| 27 | pub trait Assetsrust-analyzer cargo gnome-robots 50.0.0 assets/Assets# { |
| 28 | fn themesrust-analyzer cargo gnome-robots 50.0.0 assets/Assets#themes().(&self) -> giorust-analyzer cargo gio 0.22.2 crate/::ListModelrust-analyzer cargo gio 0.22.2 auto/list_model/ListModel#; |
| 29 | fn aieee_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/Assets#aieee_bubble().(&self) -> Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble#; |
| 30 | fn yahoo_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/Assets#yahoo_bubble().(&self) -> Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble#; |
| 31 | fn splat_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/Assets#splat_bubble().(&self) -> Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble#; |
| 32 | fn cursorsrust-analyzer cargo gnome-robots 50.0.0 assets/Assets#cursors().(&self) -> 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#>; |
| 33 | } |
| 34 | |
| 35 | pub struct DirectoryAssetsrust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets# { |
| 36 | themesrust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#themes.: giorust-analyzer cargo gio 0.22.2 crate/::ListStorerust-analyzer cargo gio 0.22.2 auto/list_store/ListStore#, |
| 37 | aieee_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#aieee_bubble.: Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble#, |
| 38 | yahoo_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#yahoo_bubble.: Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble#, |
| 39 | splat_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#splat_bubble.: Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble#, |
| 40 | cursorsrust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#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#>, |
| 41 | } |
| 42 | |
| 43 | impl DirectoryAssetsrust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets# { |
| 44 | pub fn from_directoryrust-analyzer cargo gnome-robots 50.0.0 assets/impl#[DirectoryAssets]from_directory().(directory: &Pathrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/Path#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo gnome-robots 50.0.0 assets/impl#[DirectoryAssets], Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error#>> { |
| 45 | let themes = themes_from_directoryrust-analyzer cargo gnome-robots 50.0.0 themes/themes_from_directory().(&directory.joinrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]join().("themes")); |
| 46 | |
| 47 | let pixmaps = directory.joinrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]join().("pixmaps"); |
| 48 | let yahoo_bubble = Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble#::from_filerust-analyzer cargo gnome-robots 50.0.0 bubble/impl#[Bubble]from_file().(&pixmaps.joinrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]join().("yahoo.png"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 49 | let aieee_bubble = Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble#::from_filerust-analyzer cargo gnome-robots 50.0.0 bubble/impl#[Bubble]from_file().(&pixmaps.joinrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]join().("aieee.png"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 50 | let splat_bubble = Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble#::from_filerust-analyzer cargo gnome-robots 50.0.0 bubble/impl#[Bubble]from_file().(&pixmaps.joinrust-analyzer cargo std https://github.com/rust-lang/rust/library/std path/impl#[Path]join().("splat.png"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 51 | |
| 52 | let cursors = make_cursorsrust-analyzer cargo gnome-robots 50.0.0 cursors/make_cursors().(); |
| 53 | |
| 54 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Selfrust-analyzer cargo gnome-robots 50.0.0 assets/impl#[DirectoryAssets] { |
| 55 | themesrust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#themes., |
| 56 | aieee_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#aieee_bubble., |
| 57 | yahoo_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#yahoo_bubble., |
| 58 | splat_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#splat_bubble., |
| 59 | cursorsrust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#cursors., |
| 60 | }) |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | impl Assetsrust-analyzer cargo gnome-robots 50.0.0 assets/Assets# for DirectoryAssetsrust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets# { |
| 65 | fn themesrust-analyzer cargo gnome-robots 50.0.0 assets/impl#[DirectoryAssets][Assets]themes().(&self) -> giorust-analyzer cargo gio 0.22.2 crate/::ListModelrust-analyzer cargo gio 0.22.2 auto/list_model/ListModel# { |
| 66 | self.themesrust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#themes..clonerust-analyzer cargo gio 0.22.2 auto/list_store/impl#[ListStore][Clone]clone().().upcastrust-analyzer cargo glib 0.22.3 object/Cast#upcast().() |
| 67 | } |
| 68 | |
| 69 | fn aieee_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/impl#[DirectoryAssets][Assets]aieee_bubble().(&self) -> Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble# { |
| 70 | self.aieee_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#aieee_bubble..clonerust-analyzer cargo gnome-robots 50.0.0 bubble/impl#[Bubble][Clone]clone().() |
| 71 | } |
| 72 | |
| 73 | fn yahoo_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/impl#[DirectoryAssets][Assets]yahoo_bubble().(&self) -> Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble# { |
| 74 | self.yahoo_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#yahoo_bubble..clonerust-analyzer cargo gnome-robots 50.0.0 bubble/impl#[Bubble][Clone]clone().() |
| 75 | } |
| 76 | |
| 77 | fn splat_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/impl#[DirectoryAssets][Assets]splat_bubble().(&self) -> Bubblerust-analyzer cargo gnome-robots 50.0.0 bubble/Bubble# { |
| 78 | self.splat_bubblerust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#splat_bubble..clonerust-analyzer cargo gnome-robots 50.0.0 bubble/impl#[Bubble][Clone]clone().() |
| 79 | } |
| 80 | |
| 81 | fn cursorsrust-analyzer cargo gnome-robots 50.0.0 assets/impl#[DirectoryAssets][Assets]cursors().(&self) -> 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#> { |
| 82 | self.cursorsrust-analyzer cargo gnome-robots 50.0.0 assets/DirectoryAssets#cursors..clonerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][Clone]clone().() |
| 83 | } |
| 84 | } |