Skip to main content

gtk/subclass/
bin.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::subclass::prelude::*;
4
5use super::container::ContainerImpl;
6use crate::Bin;
7
8pub trait BinImpl: ContainerImpl {}
9
10unsafe impl<T: BinImpl> IsSubclassable<T> for Bin {
11    fn class_init(class: &mut ::glib::Class<Self>) {
12        Self::parent_class_init::<T>(class);
13
14        if !crate::rt::is_initialized() {
15            panic!("GTK has to be initialized first");
16        }
17    }
18}