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
21pub trait LayoutChildExt: IsA<LayoutChild> + 'static {
22 #[doc(alias = "gtk_layout_child_get_child_widget")]
23 #[doc(alias = "get_child_widget")]
24 #[doc(alias = "child-widget")]
25 fn child_widget(&self) -> Widget {
26 unsafe {
27 from_glib_none(ffi::gtk_layout_child_get_child_widget(
28 self.as_ref().to_glib_none().0,
29 ))
30 }
31 }
32
33 #[doc(alias = "gtk_layout_child_get_layout_manager")]
34 #[doc(alias = "get_layout_manager")]
35 #[doc(alias = "layout-manager")]
36 fn layout_manager(&self) -> LayoutManager {
37 unsafe {
38 from_glib_none(ffi::gtk_layout_child_get_layout_manager(
39 self.as_ref().to_glib_none().0,
40 ))
41 }
42 }
43}
44
45impl<O: IsA<LayoutChild>> LayoutChildExt for O {}