clutter/auto/
layout_meta.rs1use crate::{ChildMeta, LayoutManager};
2use glib::{object::IsA, translate::*};
3use std::fmt;
4
5glib_wrapper! {
6 pub struct LayoutMeta(Object<ffi::ClutterLayoutMeta, ffi::ClutterLayoutMetaClass, LayoutMetaClass>) @extends ChildMeta;
7
8 match fn {
9 get_type => || ffi::clutter_layout_meta_get_type(),
10 }
11}
12
13pub const NONE_LAYOUT_META: Option<&LayoutMeta> = None;
14
15pub trait LayoutMetaExt: 'static {
21 fn get_manager(&self) -> Option<LayoutManager>;
27}
28
29impl<O: IsA<LayoutMeta>> LayoutMetaExt for O {
30 fn get_manager(&self) -> Option<LayoutManager> {
31 unsafe {
32 from_glib_none(ffi::clutter_layout_meta_get_manager(
33 self.as_ref().to_glib_none().0,
34 ))
35 }
36 }
37}
38
39impl fmt::Display for LayoutMeta {
40 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
41 write!(f, "LayoutMeta")
42 }
43}