From 29a7e2d265e19ed1cc2c996779677d5604d5b24c Mon Sep 17 00:00:00 2001 From: Josh Channings Date: Mon, 17 Jan 2022 19:20:24 +0000 Subject: [PATCH] Add binding for NSWindow::isDocumentEdited() Getter for the existing setDocumentEdited() binding. I've tested both via an in-progress change to tauri-apps/tao --- cocoa/src/appkit.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cocoa/src/appkit.rs b/cocoa/src/appkit.rs index c046002..d282fd1 100644 --- a/cocoa/src/appkit.rs +++ b/cocoa/src/appkit.rs @@ -1087,6 +1087,7 @@ pub trait NSWindow: Sized { unsafe fn convertRectFromScreen_(self, rect: NSRect) -> NSRect; // Accessing Edited Status + unsafe fn isDocumentEdited(self) -> BOOL; unsafe fn setDocumentEdited_(self, documentEdited: BOOL); // Managing Titles @@ -1670,6 +1671,10 @@ impl NSWindow for id { // Accessing Edited Status + unsafe fn isDocumentEdited(self) -> BOOL { + msg_send![self, isDocumentEdited] + } + unsafe fn setDocumentEdited_(self, documentEdited: BOOL) { msg_send![self, setDocumentEdited:documentEdited] }