gtk/subclass/application_window.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::window::WindowImpl;
6use crate::ApplicationWindow;
7
8pub trait ApplicationWindowImpl: WindowImpl {}
9
10unsafe impl<T: ApplicationWindowImpl> IsSubclassable<T> for ApplicationWindow {
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}