gtk4/auto/
layout_child.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, LayoutManager, Widget};
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9    #[doc(alias = "GtkLayoutChild")]
10    pub struct LayoutChild(Object<ffi::GtkLayoutChild, ffi::GtkLayoutChildClass>);
11
12    match fn {
13        type_ => || ffi::gtk_layout_child_get_type(),
14    }
15}
16
17impl LayoutChild {
18    pub const NONE: Option<&'static LayoutChild> = None;
19}
20
21mod sealed {
22    pub trait Sealed {}
23    impl<T: super::IsA<super::LayoutChild>> Sealed for T {}
24}
25
26pub trait LayoutChildExt: IsA<LayoutChild> + sealed::Sealed + 'static {
27    #[doc(alias = "gtk_layout_child_get_child_widget")]
28    #[doc(alias = "get_child_widget")]
29    #[doc(alias = "child-widget")]
30    fn child_widget(&self) -> Widget {
31        unsafe {
32            from_glib_none(ffi::gtk_layout_child_get_child_widget(
33                self.as_ref().to_glib_none().0,
34            ))
35        }
36    }
37
38    #[doc(alias = "gtk_layout_child_get_layout_manager")]
39    #[doc(alias = "get_layout_manager")]
40    #[doc(alias = "layout-manager")]
41    fn layout_manager(&self) -> LayoutManager {
42        unsafe {
43            from_glib_none(ffi::gtk_layout_child_get_layout_manager(
44                self.as_ref().to_glib_none().0,
45            ))
46        }
47    }
48}
49
50impl<O: IsA<LayoutChild>> LayoutChildExt for O {}