gtk/subclass/
box_.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::Box;
7
8pub trait BoxImpl: ContainerImpl {}
9
10unsafe impl<T: BoxImpl> IsSubclassable<T> for Box {
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}