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