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