Closed niknbr closed 7 months ago
In these cases it's generally calling .into()
on a type hinted NSUInteger declaration or param.
@ryanmcgrath I meant what is the value on the right side signify. For eg in WindowStyle::FullSizeContentView => 1 << 15,
what is 1 << 15
exactly ? Sorry, not familiar with these apis.
It's just a direct translation of the APIs, e.g:
https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled
(NSWindowStyleMask
is an NSUInteger
)
Ah ok. Thank you. Would an implementation for window level be similar to this ? Any hints in that direction ? 🙂
It likely would be similar, yes - though in typical Apple fashion the web docs lack context and you'll need to dig up the headers to find the right values:
https://developer.apple.com/documentation/appkit/nsfloatingwindowlevel?language=objc
And then also implement this:
https://developer.apple.com/documentation/appkit/nswindow/1419511-level?language=objc
And consider the orderIn
/orderOut
methods if you find them useful.
Thanks, new to this, but will give it a shot
Is there a way to set the window level ?
If not, I was trying to understand how it can be done similar to the window style, but could you please explain how these enum values are converted to
NSUInteger
https://github.com/ryanmcgrath/cacao/blob/0f64a843627caeb901705e246c4fc5d6ddbf964d/src/appkit/window/enums.rs#L48-L59