Debian Codegraph @

podcasts-gtk/src/widgets/empty_show.rs

raw symbols SCIP
1 // empty_show.rs
2 //
3 // Copyright 2022 Jordan Petridis <[email protected]>
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // SPDX-License-Identifier: GPL-3.0-or-later
19
20 use gtk::subclass::prelude::*;
21 use gtk::{CompositeTemplate, glib};
22
23 #[derive(Debug, Default, CompositeTemplate)]
24 #[template(resource = "/org/gnome/Podcasts/gtk/empty_show.ui")]
25 pub struct EmptyShowPriv {}
26
27 #[glib::object_subclass]
28 impl ObjectSubclass for EmptyShowPriv {
29 const NAME: &'static str = "PdEmptyShow";
30 type Type = EmptyShow;
31 type ParentType = gtk::Box;
32
33 fn class_init(klass: &mut Self::Class) {
34 klass.bind_template();
35 }
36
37 // You must call `Widget`'s `init_template()` within `instance_init()`.
38 fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
39 obj.init_template();
40 }
41 }
42
43 impl ObjectImpl for EmptyShowPriv {}
44
45 impl WidgetImpl for EmptyShowPriv {}
46 impl BoxImpl for EmptyShowPriv {}
47
48 glib::wrapper! {
49 pub struct EmptyShow(ObjectSubclass<EmptyShowPriv>)
50 @extends gtk::Widget, gtk::Box,
51 @implements gtk::ConstraintTarget, gtk::Buildable, gtk::Accessible;
52 }
53
54 impl Default for EmptyShow {
55 fn default() -> Self {
56 glib::Object::new()
57 }
58 }