#[repr(transparent)]pub struct NSWindowCollectionBehavior(pub usize);
Expand description
You may specify at most one of
NSWindowCollectionBehaviorPrimary,``NSWindowCollectionBehaviorAuxiliary,
or
NSWindowCollectionBehaviorCanJoinAllApplications.
If unspecified, the window gets the default treatment determined by its other collection behaviors.
You may specify at most one of
NSWindowCollectionBehaviorManaged,``NSWindowCollectionBehaviorTransient,
or
NSWindowCollectionBehaviorStationary.
If neither is specified, the window gets the default behavior determined by its window level.
You may specify at most one of
NSWindowCollectionBehaviorParticipatesInCycle
or
NSWindowCollectionBehaviorIgnoresCycle.
If unspecified, the window gets the default behavior determined by its window level.
You may specify at most one of
NSWindowCollectionBehaviorFullScreenPrimary,``NSWindowCollectionBehaviorFullScreenAuxiliary,
or
NSWindowCollectionBehaviorFullScreenNone.
You may specify at most one of
NSWindowCollectionBehaviorFullScreenAllowsTiling
or
NSWindowCollectionBehaviorFullScreenDisallowsTiling,
or an assertion will be raised.
The default behavior is to allow any window to participate in full screen tiling, as long as it meets certain requirements, such as being resizable and not a panel or sheet. Windows which are not full screen capable can still become a secondary tile in full screen. A window can explicitly allow itself to be placed into a full screen tile by including
NSWindowCollectionBehaviorFullScreenAllowsTiling.
Even if a window allows itself to be placed in a tile, it still may not be put in the tile if its
minFullScreenContentSize
is too large to fit. A window can explicitly disallow itself from being placed in a full screen tile by including
NSWindowCollectionBehaviorFullScreenDisallowsTiling.
This is useful for non-full screen capable windows to explicitly prevent themselves from being tiled. It can also be used by a full screen window to prevent any other windows from being placed in its full screen tile.
See also Apple’s documentation
Tuple Fields§
§0: usize
Implementations§
Source§impl NSWindowCollectionBehavior
impl NSWindowCollectionBehavior
pub const Default: NSWindowCollectionBehavior
pub const CanJoinAllSpaces: NSWindowCollectionBehavior
pub const MoveToActiveSpace: NSWindowCollectionBehavior
pub const Managed: NSWindowCollectionBehavior
pub const Transient: NSWindowCollectionBehavior
pub const Stationary: NSWindowCollectionBehavior
pub const ParticipatesInCycle: NSWindowCollectionBehavior
pub const IgnoresCycle: NSWindowCollectionBehavior
pub const FullScreenPrimary: NSWindowCollectionBehavior
pub const FullScreenAuxiliary: NSWindowCollectionBehavior
pub const FullScreenNone: NSWindowCollectionBehavior
pub const FullScreenAllowsTiling: NSWindowCollectionBehavior
pub const FullScreenDisallowsTiling: NSWindowCollectionBehavior
pub const Primary: NSWindowCollectionBehavior
pub const Auxiliary: NSWindowCollectionBehavior
pub const CanJoinAllApplications: NSWindowCollectionBehavior
Source§impl NSWindowCollectionBehavior
impl NSWindowCollectionBehavior
Sourcepub const fn empty() -> NSWindowCollectionBehavior
pub const fn empty() -> NSWindowCollectionBehavior
Get a flags value with all bits unset.
Sourcepub const fn all() -> NSWindowCollectionBehavior
pub const fn all() -> NSWindowCollectionBehavior
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> usize
pub const fn bits(&self) -> usize
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: usize) -> Option<NSWindowCollectionBehavior>
pub const fn from_bits(bits: usize) -> Option<NSWindowCollectionBehavior>
Convert from a bits value.
This method will return None
if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: usize) -> NSWindowCollectionBehavior
pub const fn from_bits_truncate(bits: usize) -> NSWindowCollectionBehavior
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: usize) -> NSWindowCollectionBehavior
pub const fn from_bits_retain(bits: usize) -> NSWindowCollectionBehavior
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<NSWindowCollectionBehavior>
pub fn from_name(name: &str) -> Option<NSWindowCollectionBehavior>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: NSWindowCollectionBehavior) -> bool
pub const fn intersects(&self, other: NSWindowCollectionBehavior) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: NSWindowCollectionBehavior) -> bool
pub const fn contains(&self, other: NSWindowCollectionBehavior) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn insert(&mut self, other: NSWindowCollectionBehavior)
pub fn insert(&mut self, other: NSWindowCollectionBehavior)
The bitwise or (|
) of the bits in two flags values.
Sourcepub fn remove(&mut self, other: NSWindowCollectionBehavior)
pub fn remove(&mut self, other: NSWindowCollectionBehavior)
The intersection of a source flags value with the complement of a target flags
value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
Sourcepub fn toggle(&mut self, other: NSWindowCollectionBehavior)
pub fn toggle(&mut self, other: NSWindowCollectionBehavior)
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub fn set(&mut self, other: NSWindowCollectionBehavior, value: bool)
pub fn set(&mut self, other: NSWindowCollectionBehavior, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
Sourcepub const fn intersection(
self,
other: NSWindowCollectionBehavior,
) -> NSWindowCollectionBehavior
pub const fn intersection( self, other: NSWindowCollectionBehavior, ) -> NSWindowCollectionBehavior
The bitwise and (&
) of the bits in two flags values.
Sourcepub const fn union(
self,
other: NSWindowCollectionBehavior,
) -> NSWindowCollectionBehavior
pub const fn union( self, other: NSWindowCollectionBehavior, ) -> NSWindowCollectionBehavior
The bitwise or (|
) of the bits in two flags values.
Sourcepub const fn difference(
self,
other: NSWindowCollectionBehavior,
) -> NSWindowCollectionBehavior
pub const fn difference( self, other: NSWindowCollectionBehavior, ) -> NSWindowCollectionBehavior
The intersection of a source flags value with the complement of a target flags
value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Sourcepub const fn symmetric_difference(
self,
other: NSWindowCollectionBehavior,
) -> NSWindowCollectionBehavior
pub const fn symmetric_difference( self, other: NSWindowCollectionBehavior, ) -> NSWindowCollectionBehavior
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub const fn complement(self) -> NSWindowCollectionBehavior
pub const fn complement(self) -> NSWindowCollectionBehavior
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§impl NSWindowCollectionBehavior
impl NSWindowCollectionBehavior
Sourcepub const fn iter(&self) -> Iter<NSWindowCollectionBehavior>
pub const fn iter(&self) -> Iter<NSWindowCollectionBehavior>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<NSWindowCollectionBehavior>
pub const fn iter_names(&self) -> IterNames<NSWindowCollectionBehavior>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for NSWindowCollectionBehavior
impl Binary for NSWindowCollectionBehavior
Source§impl BitAnd for NSWindowCollectionBehavior
impl BitAnd for NSWindowCollectionBehavior
Source§fn bitand(self, other: NSWindowCollectionBehavior) -> NSWindowCollectionBehavior
fn bitand(self, other: NSWindowCollectionBehavior) -> NSWindowCollectionBehavior
The bitwise and (&
) of the bits in two flags values.
Source§type Output = NSWindowCollectionBehavior
type Output = NSWindowCollectionBehavior
&
operator.Source§impl BitAndAssign for NSWindowCollectionBehavior
impl BitAndAssign for NSWindowCollectionBehavior
Source§fn bitand_assign(&mut self, other: NSWindowCollectionBehavior)
fn bitand_assign(&mut self, other: NSWindowCollectionBehavior)
The bitwise and (&
) of the bits in two flags values.
Source§impl BitOr for NSWindowCollectionBehavior
impl BitOr for NSWindowCollectionBehavior
Source§fn bitor(self, other: NSWindowCollectionBehavior) -> NSWindowCollectionBehavior
fn bitor(self, other: NSWindowCollectionBehavior) -> NSWindowCollectionBehavior
The bitwise or (|
) of the bits in two flags values.
Source§type Output = NSWindowCollectionBehavior
type Output = NSWindowCollectionBehavior
|
operator.Source§impl BitOrAssign for NSWindowCollectionBehavior
impl BitOrAssign for NSWindowCollectionBehavior
Source§fn bitor_assign(&mut self, other: NSWindowCollectionBehavior)
fn bitor_assign(&mut self, other: NSWindowCollectionBehavior)
The bitwise or (|
) of the bits in two flags values.
Source§impl BitXor for NSWindowCollectionBehavior
impl BitXor for NSWindowCollectionBehavior
Source§fn bitxor(self, other: NSWindowCollectionBehavior) -> NSWindowCollectionBehavior
fn bitxor(self, other: NSWindowCollectionBehavior) -> NSWindowCollectionBehavior
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§type Output = NSWindowCollectionBehavior
type Output = NSWindowCollectionBehavior
^
operator.Source§impl BitXorAssign for NSWindowCollectionBehavior
impl BitXorAssign for NSWindowCollectionBehavior
Source§fn bitxor_assign(&mut self, other: NSWindowCollectionBehavior)
fn bitxor_assign(&mut self, other: NSWindowCollectionBehavior)
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§impl Clone for NSWindowCollectionBehavior
impl Clone for NSWindowCollectionBehavior
Source§fn clone(&self) -> NSWindowCollectionBehavior
fn clone(&self) -> NSWindowCollectionBehavior
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for NSWindowCollectionBehavior
impl Debug for NSWindowCollectionBehavior
Source§impl Encode for NSWindowCollectionBehavior
impl Encode for NSWindowCollectionBehavior
Source§impl Extend<NSWindowCollectionBehavior> for NSWindowCollectionBehavior
impl Extend<NSWindowCollectionBehavior> for NSWindowCollectionBehavior
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = NSWindowCollectionBehavior>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = NSWindowCollectionBehavior>,
The bitwise or (|
) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl Flags for NSWindowCollectionBehavior
impl Flags for NSWindowCollectionBehavior
Source§const FLAGS: &'static [Flag<NSWindowCollectionBehavior>]
const FLAGS: &'static [Flag<NSWindowCollectionBehavior>]
Source§fn from_bits_retain(bits: usize) -> NSWindowCollectionBehavior
fn from_bits_retain(bits: usize) -> NSWindowCollectionBehavior
§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true
if any unknown bits are set.§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read more§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert
] when value
is true
or [Flags::remove
] when value
is false
.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read more§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.Source§impl From<CollectionBehavior> for NSWindowCollectionBehavior
impl From<CollectionBehavior> for NSWindowCollectionBehavior
Source§fn from(behavior: CollectionBehavior) -> Self
fn from(behavior: CollectionBehavior) -> Self
Source§impl From<NSWindowCollectionBehavior> for CollectionBehavior
impl From<NSWindowCollectionBehavior> for CollectionBehavior
Source§fn from(value: NSWindowCollectionBehavior) -> Self
fn from(value: NSWindowCollectionBehavior) -> Self
Source§impl FromIterator<NSWindowCollectionBehavior> for NSWindowCollectionBehavior
impl FromIterator<NSWindowCollectionBehavior> for NSWindowCollectionBehavior
Source§fn from_iter<T>(iterator: T) -> NSWindowCollectionBehaviorwhere
T: IntoIterator<Item = NSWindowCollectionBehavior>,
fn from_iter<T>(iterator: T) -> NSWindowCollectionBehaviorwhere
T: IntoIterator<Item = NSWindowCollectionBehavior>,
The bitwise or (|
) of the bits in each flags value.
Source§impl Hash for NSWindowCollectionBehavior
impl Hash for NSWindowCollectionBehavior
Source§impl IntoIterator for NSWindowCollectionBehavior
impl IntoIterator for NSWindowCollectionBehavior
Source§type Item = NSWindowCollectionBehavior
type Item = NSWindowCollectionBehavior
Source§type IntoIter = Iter<NSWindowCollectionBehavior>
type IntoIter = Iter<NSWindowCollectionBehavior>
Source§fn into_iter(self) -> <NSWindowCollectionBehavior as IntoIterator>::IntoIter
fn into_iter(self) -> <NSWindowCollectionBehavior as IntoIterator>::IntoIter
Source§impl Not for NSWindowCollectionBehavior
impl Not for NSWindowCollectionBehavior
Source§fn not(self) -> NSWindowCollectionBehavior
fn not(self) -> NSWindowCollectionBehavior
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§type Output = NSWindowCollectionBehavior
type Output = NSWindowCollectionBehavior
!
operator.Source§impl Octal for NSWindowCollectionBehavior
impl Octal for NSWindowCollectionBehavior
Source§impl Ord for NSWindowCollectionBehavior
impl Ord for NSWindowCollectionBehavior
Source§fn cmp(&self, other: &NSWindowCollectionBehavior) -> Ordering
fn cmp(&self, other: &NSWindowCollectionBehavior) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for NSWindowCollectionBehavior
impl PartialOrd for NSWindowCollectionBehavior
Source§impl RefEncode for NSWindowCollectionBehavior
impl RefEncode for NSWindowCollectionBehavior
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
Source§impl Sub for NSWindowCollectionBehavior
impl Sub for NSWindowCollectionBehavior
Source§fn sub(self, other: NSWindowCollectionBehavior) -> NSWindowCollectionBehavior
fn sub(self, other: NSWindowCollectionBehavior) -> NSWindowCollectionBehavior
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Source§type Output = NSWindowCollectionBehavior
type Output = NSWindowCollectionBehavior
-
operator.Source§impl SubAssign for NSWindowCollectionBehavior
impl SubAssign for NSWindowCollectionBehavior
Source§fn sub_assign(&mut self, other: NSWindowCollectionBehavior)
fn sub_assign(&mut self, other: NSWindowCollectionBehavior)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
impl Copy for NSWindowCollectionBehavior
impl Eq for NSWindowCollectionBehavior
impl StructuralPartialEq for NSWindowCollectionBehavior
Auto Trait Implementations§
impl Freeze for NSWindowCollectionBehavior
impl RefUnwindSafe for NSWindowCollectionBehavior
impl Send for NSWindowCollectionBehavior
impl Sync for NSWindowCollectionBehavior
impl Unpin for NSWindowCollectionBehavior
impl UnwindSafe for NSWindowCollectionBehavior
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> EncodeArgument for Twhere
T: Encode,
impl<T> EncodeArgument for Twhere
T: Encode,
Source§const ENCODING_ARGUMENT: Encoding = T::ENCODING
const ENCODING_ARGUMENT: Encoding = T::ENCODING
Source§impl<T> EncodeReturn for Twhere
T: Encode,
impl<T> EncodeReturn for Twhere
T: Encode,
Source§const ENCODING_RETURN: Encoding = T::ENCODING
const ENCODING_RETURN: Encoding = T::ENCODING
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.