Struct core_graphics::display::CGDisplay
[−]
[src]
pub struct CGDisplay { pub id: CGDirectDisplayID, }
Fields
id: CGDirectDisplayID
Methods
impl CGDisplay
[src]
pub fn new(id: CGDirectDisplayID) -> CGDisplay
[src]
pub fn main() -> CGDisplay
[src]
Returns the the main display.
pub fn bounds(&self) -> CGRect
[src]
Returns the bounds of a display in the global display coordinate space.
pub fn display_mode(&self) -> Option<CGDisplayMode>
[src]
Returns information about a display's current configuration.
pub fn image(&self) -> Option<CGImage>
[src]
Returns an image containing the contents of the specified display.
pub fn screenshot(
bounds: CGRect,
list_option: CGWindowListOption,
window_id: CGWindowID,
image_option: CGWindowImageOption
) -> Option<CGImage>
[src]
bounds: CGRect,
list_option: CGWindowListOption,
window_id: CGWindowID,
image_option: CGWindowImageOption
) -> Option<CGImage>
Returns a composite image based on a dynamically generated list of windows.
pub fn screenshot_from_windows(
bounds: CGRect,
windows: CFArray,
image_option: CGWindowImageOption
) -> Option<CGImage>
[src]
bounds: CGRect,
windows: CFArray,
image_option: CGWindowImageOption
) -> Option<CGImage>
Returns a composite image of the specified windows.
pub fn window_list_info(
option: CGWindowListOption,
relative_to_window: Option<CGWindowID>
) -> Option<CFArray>
[src]
option: CGWindowListOption,
relative_to_window: Option<CGWindowID>
) -> Option<CFArray>
Generates and returns information about the selected windows in the current user session.
pub fn is_active(&self) -> bool
[src]
Returns a Boolean value indicating whether a display is active.
pub fn is_always_in_mirror_set(&self) -> bool
[src]
Returns a boolean indicating whether a display is always in a mirroring set.
pub fn is_asleep(&self) -> bool
[src]
Returns a boolean indicating whether a display is sleeping (and is therefore not drawable.)
pub fn is_builtin(&self) -> bool
[src]
Returns a boolean indicating whether a display is built-in, such as the internal display in portable systems.
pub fn is_in_hw_mirror_set(&self) -> bool
[src]
Returns a boolean indicating whether a display is in a hardware mirroring set.
pub fn is_in_mirror_set(&self) -> bool
[src]
Returns a boolean indicating whether a display is in a mirroring set.
pub fn is_main(&self) -> bool
[src]
Returns a boolean indicating whether a display is the main display.
pub fn is_online(&self) -> bool
[src]
Returns a boolean indicating whether a display is connected or online.
pub fn uses_open_gl_acceleration(&self) -> bool
[src]
Returns a boolean indicating whether Quartz is using OpenGL-based window acceleration (Quartz Extreme) to render in a display.
pub fn is_stereo(&self) -> bool
[src]
Returns a boolean indicating whether a display is running in a stereo graphics mode.
pub fn mirrors_display(&self) -> CGDirectDisplayID
[src]
For a secondary display in a mirroring set, returns the primary display.
pub fn primary_display(&self) -> CGDirectDisplayID
[src]
Returns the primary display in a hardware mirroring set.
pub fn rotation(&self) -> f64
[src]
Returns the rotation angle of a display in degrees.
pub fn screen_size(&self) -> CGSize
[src]
Returns the width and height of a display in millimeters.
pub fn serial_number(&self) -> u32
[src]
Returns the serial number of a display monitor.
pub fn unit_number(&self) -> u32
[src]
Returns the logical unit number of a display.
pub fn vendor_number(&self) -> u32
[src]
Returns the vendor number of the specified display's monitor.
pub fn model_number(&self) -> u32
[src]
Returns the model number of a display monitor.
pub fn pixels_high(&self) -> u64
[src]
Returns the display height in pixel units.
pub fn pixels_wide(&self) -> u64
[src]
Returns the display width in pixel units.
pub fn active_displays() -> Result<Vec<CGDirectDisplayID>, CGError>
[src]
Provides a list of displays that are active (or drawable).
pub fn active_display_count() -> Result<u32, CGError>
[src]
Provides count of displays that are active (or drawable).
pub fn hide_cursor(&self) -> Result<(), CGError>
[src]
Hides the mouse cursor, and increments the hide cursor count.
pub fn show_cursor(&self) -> Result<(), CGError>
[src]
Decrements the hide cursor count, and shows the mouse cursor if the count is 0.
pub fn move_cursor_to_point(&self, point: CGPoint) -> Result<(), CGError>
[src]
Moves the mouse cursor to a specified point relative to the display origin (the upper-left corner of the display).
pub fn warp_mouse_cursor_position(point: CGPoint) -> Result<(), CGError>
[src]
Moves the mouse cursor without generating events.
pub fn associate_mouse_and_mouse_cursor_position(
connected: bool
) -> Result<(), CGError>
[src]
connected: bool
) -> Result<(), CGError>
Connects or disconnects the mouse and cursor while an application is in the foreground.
Trait Implementations
impl Copy for CGDisplay
[src]
impl Clone for CGDisplay
[src]
fn clone(&self) -> CGDisplay
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more