gtk/subclass/drawing_area.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::widget::WidgetImpl;
6use crate::DrawingArea;
7
8pub trait DrawingAreaImpl: WidgetImpl {}
9
10unsafe impl<T: DrawingAreaImpl> IsSubclassable<T> for DrawingArea {
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}