NSScreen (cocoa): Add maximumRefreshInterval and minimumRefreshInterval (#646)

This commit is contained in:
Ryo "Genbuchan" Shigematsu
2023-11-24 15:55:29 +09:00
committed by GitHub
parent 58972aef0a
commit 64dd01a6a9
+10
View File
@@ -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_(