Skip to main content

gtk/subclass/
tree_model_sort.rs

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