gtk/subclass/cell_renderer_pixbuf.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::cell_renderer::CellRendererImpl;
7
8use crate::CellRendererPixbuf;
9
10pub trait CellRendererPixbufImpl:
11 CellRendererImpl + ObjectSubclass<Type: IsA<CellRendererPixbuf>>
12{
13}
14
15unsafe impl<T: CellRendererPixbufImpl> IsSubclassable<T> for CellRendererPixbuf {
16 fn class_init(class: &mut ::glib::Class<Self>) {
17 Self::parent_class_init::<T>(class);
18
19 if !crate::rt::is_initialized() {
20 panic!("GTK has to be initialized first");
21 }
22 }
23}