gtk4/auto/buildable.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::ffi;
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9 #[doc(alias = "GtkBuildable")]
10 pub struct Buildable(Interface<ffi::GtkBuildable, ffi::GtkBuildableIface>);
11
12 match fn {
13 type_ => || ffi::gtk_buildable_get_type(),
14 }
15}
16
17impl Buildable {
18 pub const NONE: Option<&'static Buildable> = None;
19}
20
21pub trait BuildableExt: IsA<Buildable> + 'static {
22 #[doc(alias = "gtk_buildable_get_buildable_id")]
23 #[doc(alias = "get_buildable_id")]
24 fn buildable_id(&self) -> Option<glib::GString> {
25 unsafe {
26 from_glib_none(ffi::gtk_buildable_get_buildable_id(
27 self.as_ref().to_glib_none().0,
28 ))
29 }
30 }
31}
32
33impl<O: IsA<Buildable>> BuildableExt for O {}