From 64dd01a6a951ccc12bb707a5882549d4e80b8249 Mon Sep 17 00:00:00 2001 From: "Ryo \"Genbuchan\" Shigematsu" Date: Fri, 24 Nov 2023 15:55:29 +0900 Subject: [PATCH] NSScreen (cocoa): Add maximumRefreshInterval and minimumRefreshInterval (#646) --- cocoa/src/appkit.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cocoa/src/appkit.rs b/cocoa/src/appkit.rs index a3c7ae9e..dca1bafd 100644 --- a/cocoa/src/appkit.rs +++ b/cocoa/src/appkit.rs @@ -3333,6 +3333,8 @@ pub trait NSScreen: Sized { unsafe fn visibleFrame(self) -> NSRect; unsafe fn colorSpace(self) -> id /* (NSColorSpace *) */; unsafe fn screensHaveSeparateSpaces(_: Self) -> BOOL; + unsafe fn maximumRefreshInterval(self) -> NSTimeInterval; + unsafe fn minimumRefreshInterval(self) -> NSTimeInterval; // Screen Backing Coordinate Conversion unsafe fn backingAlignedRect_options_( @@ -3390,6 +3392,14 @@ impl NSScreen for id { msg_send![class!(NSScreen), screensHaveSeparateSpaces] } + unsafe fn maximumRefreshInterval(self) -> NSTimeInterval { + msg_send![self, maximumRefreshInterval] + } + + unsafe fn minimumRefreshInterval(self) -> NSTimeInterval { + msg_send![self, minimumRefreshInterval] + } + // Screen Backing Coordinate Conversion unsafe fn backingAlignedRect_options_(