Skip to main content

gtk/subclass/
tree_store.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use crate::TreeStore;
4
5use glib::{object::IsA, subclass::prelude::*};
6
7pub trait TreeStoreImpl: ObjectImpl + ObjectSubclass<Type: IsA<TreeStore>> {}
8
9unsafe impl<T: TreeStoreImpl> IsSubclassable<T> for TreeStore {
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}