gtk/subclass/menu_button.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::toggle_button::ToggleButtonImpl;
6use crate::MenuButton;
7
8pub trait MenuButtonImpl: MenuButtonImplExt + ToggleButtonImpl {}
9
10mod sealed {
11 pub trait Sealed {}
12 impl<T: super::MenuButtonImpl> Sealed for T {}
13}
14
15pub trait MenuButtonImplExt: ObjectSubclass + sealed::Sealed {}
16
17impl<T: MenuButtonImpl> MenuButtonImplExt for T {}
18
19unsafe impl<T: MenuButtonImpl> IsSubclassable<T> for MenuButton {
20 fn class_init(class: &mut glib::Class<Self>) {
21 Self::parent_class_init::<T>(class);
22 }
23}