Add Window::set_content_protected on macOS and Windows (#2525)
* Add `Window::set_content_protect` on macOS and Windows * Update window.rs * Add builder variant * fix import * fix argument type * fix import * fix always visible window on Windows * update docs
This commit is contained in:
parent
418cc44e93
commit
65baae75c4
6 changed files with 89 additions and 7 deletions
|
|
@ -84,6 +84,9 @@ extern_methods!(
|
|||
#[sel(setMovable:)]
|
||||
pub fn setMovable(&self, movable: bool);
|
||||
|
||||
#[sel(setSharingType:)]
|
||||
pub fn setSharingType(&self, sharingType: NSWindowSharingType);
|
||||
|
||||
#[sel(setOpaque:)]
|
||||
pub fn setOpaque(&self, opaque: bool);
|
||||
|
||||
|
|
@ -349,3 +352,16 @@ pub enum NSBackingStoreType {
|
|||
unsafe impl Encode for NSBackingStoreType {
|
||||
const ENCODING: Encoding = NSUInteger::ENCODING;
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[repr(usize)] // NSUInteger
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
pub enum NSWindowSharingType {
|
||||
NSWindowSharingNone = 0,
|
||||
NSWindowSharingReadOnly = 1,
|
||||
NSWindowSharingReadWrite = 2,
|
||||
}
|
||||
|
||||
unsafe impl Encode for NSWindowSharingType {
|
||||
const ENCODING: Encoding = NSUInteger::ENCODING;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue