Skip to main content

gtk/subclass/
event_box.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::bin::BinImpl;
6
7use crate::EventBox;
8
9pub trait EventBoxImpl: BinImpl {}
10
11unsafe impl<T: EventBoxImpl> IsSubclassable<T> for EventBox {
12    fn class_init(class: &mut ::glib::Class<Self>) {
13        Self::parent_class_init::<T>(class);
14
15        if !crate::rt::is_initialized() {
16            panic!("GTK has to be initialized first");
17        }
18    }
19}