pub trait INSScreen: PNSObject {
Show 28 methods
// Provided methods
fn p_main_screen() -> NSScreen { ... }
fn p_deepest_screen() -> NSScreen { ... }
fn p_screens() -> NSScreen { ... }
fn p_depth(&self) -> NSWindowDepth { ... }
fn p_frame(&self) -> NSRect { ... }
fn p_supported_window_depths(&self) -> *const NSWindowDepth { ... }
fn p_device_description(&self) -> NSDictionary<NSDeviceDescriptionKey, id> { ... }
fn m_user_space_scale_factor(&self) -> CGFloat { ... }
fn p_color_space(&self) -> NSColorSpace { ... }
fn p_localized_name(&self) -> NSString { ... }
fn m_can_represent_display_gamut(
&self,
display_gamut: NSDisplayGamut,
) -> bool { ... }
fn p_screens_have_separate_spaces() -> bool { ... }
fn m_backing_aligned_rect_options(
&self,
rect: NSRect,
options: NSAlignmentOptions,
) -> NSRect { ... }
fn p_backing_scale_factor(&self) -> CGFloat { ... }
fn m_convert_rect_from_backing(&self, rect: NSRect) -> NSRect { ... }
fn m_convert_rect_to_backing(&self, rect: NSRect) -> NSRect { ... }
fn p_visible_frame(&self) -> NSRect { ... }
fn p_safe_area_insets(&self) -> NSEdgeInsets { ... }
fn p_maximum_potential_extended_dynamic_range_color_component_value(
&self,
) -> CGFloat { ... }
fn p_maximum_extended_dynamic_range_color_component_value(&self) -> CGFloat { ... }
fn p_maximum_reference_extended_dynamic_range_color_component_value(
&self,
) -> CGFloat { ... }
fn p_maximum_frames_per_second(&self) -> Int { ... }
fn p_minimum_refresh_interval(&self) -> NSTimeInterval { ... }
fn p_maximum_refresh_interval(&self) -> NSTimeInterval { ... }
fn p_display_update_granularity(&self) -> NSTimeInterval { ... }
fn p_last_display_update_timestamp(&self) -> NSTimeInterval { ... }
fn p_auxiliary_top_left_area(&self) -> NSRect { ... }
fn p_auxiliary_top_right_area(&self) -> NSRect { ... }
}
Expand description
A trait containing all the methods for NSScreen
Provided Methods§
Sourcefn p_main_screen() -> NSScreen
fn p_main_screen() -> NSScreen
Returns the screen object containing the window with the keyboard focus.
Sourcefn p_deepest_screen() -> NSScreen
fn p_deepest_screen() -> NSScreen
Returns a screen object representing the screen that can best represent color.
Sourcefn p_screens() -> NSScreen
fn p_screens() -> NSScreen
Returns an array of screen objects representing all of the screens available on the system.
Sourcefn p_depth(&self) -> NSWindowDepth
fn p_depth(&self) -> NSWindowDepth
The current bit depth and colorspace information of the screen.
Sourcefn p_supported_window_depths(&self) -> *const NSWindowDepth
fn p_supported_window_depths(&self) -> *const NSWindowDepth
A zero-terminated array of the window depths supported by the screen.
Sourcefn p_device_description(&self) -> NSDictionary<NSDeviceDescriptionKey, id>
fn p_device_description(&self) -> NSDictionary<NSDeviceDescriptionKey, id>
The device dictionary for the screen.
Sourcefn m_user_space_scale_factor(&self) -> CGFloat
👎Deprecated
fn m_user_space_scale_factor(&self) -> CGFloat
Returns the scaling factor from user space to device space on the screen.
Sourcefn p_color_space(&self) -> NSColorSpace
fn p_color_space(&self) -> NSColorSpace
The color space of the screen.
Sourcefn p_localized_name(&self) -> NSString
fn p_localized_name(&self) -> NSString
The localized name of the display.
Sourcefn m_can_represent_display_gamut(&self, display_gamut: NSDisplayGamut) -> bool
fn m_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.
Sourcefn p_screens_have_separate_spaces() -> bool
fn p_screens_have_separate_spaces() -> bool
Returns a Boolean value indicating whether each screen can have its own set of spaces.
Sourcefn m_backing_aligned_rect_options(
&self,
rect: NSRect,
options: NSAlignmentOptions,
) -> NSRect
fn m_backing_aligned_rect_options( &self, rect: NSRect, options: NSAlignmentOptions, ) -> NSRect
Converts a rectangle in global screen coordinates to a pixel aligned rectangle.
Sourcefn p_backing_scale_factor(&self) -> CGFloat
fn p_backing_scale_factor(&self) -> CGFloat
The backing store pixel scale factor for the screen.
Sourcefn m_convert_rect_from_backing(&self, rect: NSRect) -> NSRect
fn m_convert_rect_from_backing(&self, rect: NSRect) -> NSRect
Converts the rectangle from the device pixel aligned coordinates system of a screen.
Sourcefn m_convert_rect_to_backing(&self, rect: NSRect) -> NSRect
fn m_convert_rect_to_backing(&self, rect: NSRect) -> NSRect
Converts the rectangle to the device pixel aligned coordinates system of a screen.
Sourcefn p_visible_frame(&self) -> NSRect
fn p_visible_frame(&self) -> NSRect
The current location and dimensions of the visible screen.
Sourcefn p_safe_area_insets(&self) -> NSEdgeInsets
fn p_safe_area_insets(&self) -> NSEdgeInsets
The distances from the screen’s edges at which content isn’t obscured.
Sourcefn p_maximum_potential_extended_dynamic_range_color_component_value(
&self,
) -> CGFloat
fn p_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.
Sourcefn p_maximum_extended_dynamic_range_color_component_value(&self) -> CGFloat
fn p_maximum_extended_dynamic_range_color_component_value(&self) -> CGFloat
The current maximum color component value for the screen.
Sourcefn p_maximum_reference_extended_dynamic_range_color_component_value(
&self,
) -> CGFloat
fn p_maximum_reference_extended_dynamic_range_color_component_value( &self, ) -> CGFloat
The current maximum color component value for reference rendering to the screen.
Sourcefn p_maximum_frames_per_second(&self) -> Int
fn p_maximum_frames_per_second(&self) -> Int
The maximum number of frames per second that the screen supports.
Sourcefn p_minimum_refresh_interval(&self) -> NSTimeInterval
fn p_minimum_refresh_interval(&self) -> NSTimeInterval
The shortest refresh interval that the screen supports.
Sourcefn p_maximum_refresh_interval(&self) -> NSTimeInterval
fn p_maximum_refresh_interval(&self) -> NSTimeInterval
The largest refresh interval that the screen supports.
Sourcefn p_display_update_granularity(&self) -> NSTimeInterval
fn p_display_update_granularity(&self) -> NSTimeInterval
The number of seconds between the screen’s supported update rates, for screens that support fixed update rates.
Sourcefn p_last_display_update_timestamp(&self) -> NSTimeInterval
fn p_last_display_update_timestamp(&self) -> NSTimeInterval
The time of the last framebuffer update, expressed as the number of seconds since system startup.
fn p_auxiliary_top_left_area(&self) -> NSRect
fn p_auxiliary_top_right_area(&self) -> NSRect
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.