Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/native/apple/frameworks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ extern "C" {
window_id: u32,
imageoptions: u32,
) -> ObjcId;
pub fn CGMainDisplayID() -> u32;
pub fn CGDisplayPixelsHigh(display: u32) -> u64;
pub fn CGColorCreateGenericRGB(red: f64, green: f64, blue: f64, alpha: f64) -> ObjcId;
pub fn CGAssociateMouseAndMouseCursorPosition(connected: bool);
pub fn CGWarpMouseCursorPosition(newCursorPosition: NSPoint);
Expand Down Expand Up @@ -221,6 +219,14 @@ extern "C" {
pub fn CGColorSpaceRelease(space: *const ObjcId);
}

// Some CoreGraphics functions are only available on macOS
#[cfg(target_os = "macos")]
#[link(name = "CoreGraphics", kind = "framework")]
extern "C" {
pub fn CGMainDisplayID() -> u32;
pub fn CGDisplayPixelsHigh(display: u32) -> u64;
}

pub const kCGBitmapByteOrderDefault: u32 = 0 << 12;
pub const kCGImageAlphaLast: u32 = 3;
pub const kCGRenderingIntentDefault: u32 = 0;
Expand Down
Loading