On macOS, add documentEdited APIs (#2550)
* On macOS, add documentEdited APIs
Port of 33fdeab629
* Update src/platform/macos.rs
Co-authored-by: Mads Marquart <mads@marquart.dk>
* typo
Co-authored-by: Mads Marquart <mads@marquart.dk>
This commit is contained in:
parent
6d0cf6a275
commit
f77f858e9b
4 changed files with 44 additions and 0 deletions
|
|
@ -168,6 +168,9 @@ extern_methods!(
|
|||
#[sel(setLevel:)]
|
||||
pub fn setLevel(&self, level: NSWindowLevel);
|
||||
|
||||
#[sel(setDocumentEdited:)]
|
||||
pub fn setDocumentEdited(&self, val: bool);
|
||||
|
||||
#[sel(occlusionState)]
|
||||
pub fn occlusionState(&self) -> NSWindowOcclusionState;
|
||||
|
||||
|
|
@ -186,6 +189,9 @@ extern_methods!(
|
|||
#[sel(isZoomed)]
|
||||
pub fn isZoomed(&self) -> bool;
|
||||
|
||||
#[sel(isDocumentEdited)]
|
||||
pub fn isDocumentEdited(&self) -> bool;
|
||||
|
||||
#[sel(close)]
|
||||
pub fn close(&self);
|
||||
|
||||
|
|
|
|||
|
|
@ -1229,6 +1229,14 @@ impl WindowExtMacOS for WinitWindow {
|
|||
fn set_has_shadow(&self, has_shadow: bool) {
|
||||
self.setHasShadow(has_shadow)
|
||||
}
|
||||
|
||||
fn is_document_edited(&self) -> bool {
|
||||
self.isDocumentEdited()
|
||||
}
|
||||
|
||||
fn set_document_edited(&self, edited: bool) {
|
||||
self.setDocumentEdited(edited)
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn get_ns_theme() -> Theme {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue