#[repr(C)]pub struct NSScreen {
pub ptr: Id<Object>,
}
Expand description
An object that describes the attributes of a computer’s monitor or screen.
Fields§
§ptr: Id<Object>
The raw pointer to the Objective-C object.
Implementations§
Source§impl NSScreen
impl NSScreen
Sourcepub fn main_screen() -> NSScreen
pub fn main_screen() -> NSScreen
Returns the screen object containing the window with the keyboard focus.
Sourcepub fn deepest_screen() -> NSScreen
pub fn deepest_screen() -> NSScreen
Returns a screen object representing the screen that can best represent color.
Sourcepub fn screens() -> NSScreen
pub fn screens() -> NSScreen
Returns an array of screen objects representing all of the screens available on the system.
Sourcepub fn depth(&self) -> NSWindowDepth
pub fn depth(&self) -> NSWindowDepth
The current bit depth and colorspace information of the screen.
Sourcepub fn supported_window_depths(&self) -> *const NSWindowDepth
pub fn supported_window_depths(&self) -> *const NSWindowDepth
A zero-terminated array of the window depths supported by the screen.
Sourcepub fn device_description(&self) -> NSDictionary<NSDeviceDescriptionKey, id>
pub fn device_description(&self) -> NSDictionary<NSDeviceDescriptionKey, id>
The device dictionary for the screen.
Sourcepub fn user_space_scale_factor(&self) -> CGFloat
👎Deprecated
pub fn user_space_scale_factor(&self) -> CGFloat
Returns the scaling factor from user space to device space on the screen.
Sourcepub fn color_space(&self) -> NSColorSpace
pub fn color_space(&self) -> NSColorSpace
The color space of the screen.
Sourcepub fn localized_name(&self) -> NSString
pub fn localized_name(&self) -> NSString
The localized name of the display.
Sourcepub fn can_represent_display_gamut(&self, display_gamut: NSDisplayGamut) -> bool
pub fn can_represent_display_gamut(&self, display_gamut: NSDisplayGamut) -> bool
A Boolean value indicating whether the color space of the screen is capable of representing the specified display gamut.
Sourcepub fn screens_have_separate_spaces() -> bool
pub fn screens_have_separate_spaces() -> bool
Returns a Boolean value indicating whether each screen can have its own set of spaces.
Sourcepub fn backing_aligned_rect_options(
&self,
rect: NSRect,
options: NSAlignmentOptions,
) -> NSRect
pub fn backing_aligned_rect_options( &self, rect: NSRect, options: NSAlignmentOptions, ) -> NSRect
Converts a rectangle in global screen coordinates to a pixel aligned rectangle.
Sourcepub fn backing_scale_factor(&self) -> CGFloat
pub fn backing_scale_factor(&self) -> CGFloat
The backing store pixel scale factor for the screen.
Sourcepub fn convert_rect_from_backing(&self, rect: NSRect) -> NSRect
pub fn convert_rect_from_backing(&self, rect: NSRect) -> NSRect
Converts the rectangle from the device pixel aligned coordinates system of a screen.
Sourcepub fn convert_rect_to_backing(&self, rect: NSRect) -> NSRect
pub fn convert_rect_to_backing(&self, rect: NSRect) -> NSRect
Converts the rectangle to the device pixel aligned coordinates system of a screen.
Sourcepub fn visible_frame(&self) -> NSRect
pub fn visible_frame(&self) -> NSRect
The current location and dimensions of the visible screen.
Sourcepub fn safe_area_insets(&self) -> NSEdgeInsets
pub fn safe_area_insets(&self) -> NSEdgeInsets
The distances from the screen’s edges at which content isn’t obscured.
Sourcepub fn maximum_potential_extended_dynamic_range_color_component_value(
&self,
) -> CGFloat
pub fn maximum_potential_extended_dynamic_range_color_component_value( &self, ) -> CGFloat
The maximum possible color component value for the screen when it’s in extended dynamic range (EDR) mode.
Sourcepub fn maximum_extended_dynamic_range_color_component_value(&self) -> CGFloat
pub fn maximum_extended_dynamic_range_color_component_value(&self) -> CGFloat
The current maximum color component value for the screen.
Sourcepub fn maximum_reference_extended_dynamic_range_color_component_value(
&self,
) -> CGFloat
pub fn maximum_reference_extended_dynamic_range_color_component_value( &self, ) -> CGFloat
The current maximum color component value for reference rendering to the screen.
Sourcepub fn maximum_frames_per_second(&self) -> Int
pub fn maximum_frames_per_second(&self) -> Int
The maximum number of frames per second that the screen supports.
Sourcepub fn minimum_refresh_interval(&self) -> NSTimeInterval
pub fn minimum_refresh_interval(&self) -> NSTimeInterval
The shortest refresh interval that the screen supports.
Sourcepub fn maximum_refresh_interval(&self) -> NSTimeInterval
pub fn maximum_refresh_interval(&self) -> NSTimeInterval
The largest refresh interval that the screen supports.
Sourcepub fn display_update_granularity(&self) -> NSTimeInterval
pub fn display_update_granularity(&self) -> NSTimeInterval
The number of seconds between the screen’s supported update rates, for screens that support fixed update rates.
Sourcepub fn last_display_update_timestamp(&self) -> NSTimeInterval
pub fn last_display_update_timestamp(&self) -> NSTimeInterval
The time of the last framebuffer update, expressed as the number of seconds since system startup.
pub fn auxiliary_top_left_area(&self) -> NSRect
pub fn auxiliary_top_right_area(&self) -> NSRect
Methods from Deref<Target = Object>§
Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Returns a reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Returns a mutable reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.