rust-macios 0.4.2

Apple Frameworks for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use objc::Encode;

/// A structure that contains width and height values.
#[derive(Clone, Copy, Debug, Default, PartialEq)]
#[repr(C)]
pub struct CGSize {
    /// A width value.
    pub width: f64,
    /// A height value.
    pub height: f64,
}

unsafe impl Encode for CGSize {
    fn encode() -> objc::Encoding {
        unsafe { objc::Encoding::from_str("{CGSize=dd}") }
    }
}