objc2
objc2 copied to clipboard
Bindings to Apple's frameworks in Rust
Continued from https://github.com/madsmtm/objc2/issues/345 Sorry for hijacking this issue - I guess it's where my research ended up. My original project was to mess with ScreenCaptureKit, which ended me up at...
Xcode 16 is still in beta, opening this PR to track the update. TODO: - [ ] Fix errors while running `header-translator`. - [ ] Wait for GitHub Actions to...
As I mentioned earlier, excellent work on these libraries and generators! That said, I find it frustrating to have to specify the feature for every class I want to use...
Hello! I am a little confused with a Rust implementation of `autoreleasepool`... When I type a something as below: ``` fn func(mtm: MainThreadMaker) -> Id { autoreleasepool(|_| { let alloc_1...
1. When using NSArray or NSDictionary, their values are usually generic types, so they need to be defined using AnyObject, such as `NSMutableDictionary::`. However, for types like NSNumber, multiple calls...
`Id` is a leftover from `objc_id`, but that name doesn't actually convey any meaning to an outsider, and has only weak relevance to the concept in Objective-C (it somewhat matches...
Convert things like: ```rust #[method_id(initWithObjects:count:)] pub unsafe fn initWithObjects_count( this: Allocated, objects: *mut NonNull, cnt: NSUInteger, ) -> Id; #[method_id(colorWithColorSpace:components:count:)] pub unsafe fn colorWithColorSpace_components_count( space: &NSColorSpace, components: NonNull, number_of_components: NSInteger,...
Given things like: ```objective-c #define MTLCounterDontSample ((NSUInteger)-1) #define NSFoundationVersionNumber10_0 397.40 ``` Emit: ```rust const MTLCounterDontSample: NSUInteger = NSUInteger::MAX; const NSFoundationVersionNumber10_0: c_double = 397.40; ``` Difficult because we have no way...
Hello, After spending time at building a hybrid Rust + Objective C framework, I just did an experiment with the `declare_class` macro present in this crate to remove entirely the...
Some protocols like `UIApplicationDelegate` are not registered with the runtime until the compiler has seen a `@protocol(UIApplicationDelegate)`, or the protocol is implemented by a concrete class ([details](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocProtocols.html#//apple_ref/doc/uid/TP30001163-CH15-TPXREF149)). This leads to...