[][src]Struct core_graphics::display::CGDisplay

pub struct CGDisplay {
    pub id: CGDirectDisplayID,
}

Fields

id: CGDirectDisplayID

Implementations

impl CGDisplay[src]

pub fn new(id: CGDirectDisplayID) -> CGDisplay[src]

pub fn main() -> CGDisplay[src]

Returns the the main display.

pub fn null_display() -> CGDisplay[src]

A value that will never correspond to actual hardware.

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 begin_configuration(&self) -> Result<CGDisplayConfigRef, CGError>[src]

Begins a new set of display configuration changes.

pub fn cancel_configuration(
    &self,
    config_ref: &CGDisplayConfigRef
) -> Result<(), CGError>
[src]

Cancels a set of display configuration changes.

pub fn complete_configuration(
    &self,
    config_ref: &CGDisplayConfigRef,
    option: CGConfigureOption
) -> Result<(), CGError>
[src]

Completes a set of display configuration changes.

pub fn configure_display_with_display_mode(
    &self,
    config_ref: &CGDisplayConfigRef,
    display_mode: &CGDisplayMode
) -> Result<(), CGError>
[src]

Configures the display mode of a display.

pub fn configure_display_origin(
    &self,
    config_ref: &CGDisplayConfigRef,
    x: i32,
    y: i32
) -> Result<(), CGError>
[src]

Configures the origin of a display in the global display coordinate space.

pub fn configure_display_mirror_of_display(
    &self,
    config_ref: &CGDisplayConfigRef,
    master: &CGDisplay
) -> Result<(), CGError>
[src]

Changes the configuration of a mirroring set.

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]

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]

Returns a composite image of the specified windows.

pub fn window_list_info(
    option: CGWindowListOption,
    relative_to_window: Option<CGWindowID>
) -> Option<CFArray>
[src]

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]

Connects or disconnects the mouse and cursor while an application is in the foreground.

Trait Implementations

impl Clone for CGDisplay[src]

impl Copy for CGDisplay[src]

impl Debug for CGDisplay[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.