pub struct SCShareableContentInfo(/* private fields */);Expand description
Information about shareable content from a filter (macOS 14.0+)
Provides metadata about the content being captured, including dimensions and scale factor.
Implementations§
Sourcepub fn for_filter(filter: &SCContentFilter) -> Option<Self>
pub fn for_filter(filter: &SCContentFilter) -> Option<Self>
Get content info for a filter
Returns information about the content described by the given filter.
Sourcepub fn style(&self) -> SCShareableContentStyle
pub fn style(&self) -> SCShareableContentStyle
Get the content style
Sourcepub fn point_pixel_scale(&self) -> f32
pub fn point_pixel_scale(&self) -> f32
Get the point-to-pixel scale factor
Typically 2.0 for Retina displays.
Sourcepub fn content_rect(&self) -> CGRect
pub fn content_rect(&self) -> CGRect
Get the content rectangle in points
Sourcepub fn pixel_size(&self) -> (u32, u32)
pub fn pixel_size(&self) -> (u32, u32)
Get the content size in pixels
Convenience method that multiplies content_rect dimensions by point_pixel_scale.
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more