* Add Darwin mouse cursor-related bindings
Create CoreGraphics package in the process
* Remove unneeded semicolons
* Define some CG types in CoreFoundation instead
This matches where Darwin's C header files defines these types
This commit updates the `darwin/Foundation` package's `NSScreen` bindings
to treat Objective-C "type properties" as class methods rather than
instance methods.
As a result, we can now access these properties like this:
```odin
import NS "core:sys/darwin/Foundation"
main :: proc() {
NS.Screen.mainScreen()
}
```
instead of this:
```odin
import NS "core:sys/darwin/Foundation"
main :: proc() {
(^NS.Screen)(nil).mainScreen()
}
```
This commit also adds a binding for `NSScreen`'s `screensHaveSeparateSpaces`
type property, which was previously missing from the `darwin/Foundation`
package.
Co-authored-by: Jacob Evelyn <j@cob.land>
Added support for NSBitmapImageRep class.
Added ability to set contents to a CALayer.
I needed these to support a port of Handmade Hero, but they are of general use.
Add `ODIN_PLATFORM_SUBTARGET_IOS` builtin constant which evaluated to
`true` when the platform is `Darwin` and the subtarget it either `iPhone` or `iPhoneSimulator`
When trying to grab the window pointer off the notification in a
windowDidBecomeKey implementation, I kept getting segfaults calling
notification->object(). The second argument of these needs to be a SEL.
https://developer.apple.com/documentation/objectivec/class_addmethod(_:_:_:_:)?language=objc#Discussion
I imagine existing code is getting by by setting the window information
in the delegate's context userdata, which works fine when you only have
one window as you can avoid needing to call notification->object(),
until you want one delegate assigned to two windows, hard to work around.