animate/legacy/
fixed_layout.rs

1use crate::LayoutManager;
2use glib::{object as gobject, object::Cast, translate::*};
3use std::fmt;
4
5glib_wrapper! {
6    pub struct FixedLayout(Object<ffi::ClutterFixedLayout, ffi::ClutterFixedLayoutClass, FixedLayoutClass>) @extends LayoutManager, gobject::InitiallyUnowned;
7
8    match fn {
9        get_type => || ffi::clutter_fixed_layout_get_type(),
10    }
11}
12
13impl FixedLayout {
14    /// Creates a new `FixedLayout`
15    ///
16    /// # Returns
17    ///
18    /// the newly created `FixedLayout`
19    pub fn new() -> FixedLayout {
20        unsafe { LayoutManager::from_glib_none(ffi::clutter_fixed_layout_new()).unsafe_cast() }
21    }
22}
23
24impl Default for FixedLayout {
25    fn default() -> Self {
26        Self::new()
27    }
28}
29
30impl fmt::Display for FixedLayout {
31    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
32        write!(f, "FixedLayout")
33    }
34}