gtk4/
requisition.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use std::fmt;
4
5use crate::Requisition;
6
7impl Requisition {
8    #[inline]
9    pub fn width(&self) -> i32 {
10        self.inner.width
11    }
12
13    #[inline]
14    pub fn height(&self) -> i32 {
15        self.inner.height
16    }
17}
18
19impl fmt::Debug for Requisition {
20    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
21        f.debug_struct("Requisition")
22            .field("width", &self.width())
23            .field("height", &self.height())
24            .finish()
25    }
26}