Tracking issues for core-foundation-rs
issues/PRs
#719
Labels
A-framework
Affects the framework crates and the translator for them
documentation
Improvements or additions to documentation
My work on fixing upstream issues in
core-foundation-rs
(or at least opening new issues in this repo to track them). Similar to #22. See also #692.I'm a bit unsure how to handle this sort of stuff, I wanted to make sure that nothing in the
core-foundation-rs
repo is lost in the eventual migration, but I also didn't want to spam the repo with comments like "this is fixed inobjc2-core-foundation
".Issues:
CGEventSetFlags
.unsafe
).CGEvent.data
is Swift-only?CFCalendarGetIdentifier
servo/core-foundation-rs#685objc2_core_foundation::CFCalendarGetIdentifier
is correct.CGEventTap
helpers? #720.CGSRegionRelease
incore-graphics
prevents publishing to the Mac AppStore servo/core-foundation-rs#656CGSRegionRelease
isn't present inobjc2-core-graphics
.objc2
, andobjc2-core-foundation
supports this by implementingEncode
for all its types when the"objc2"
feature is activated.link
feature? servo/core-foundation-rs#651link
feature not present inobjc2
crates (I'll have to see a really compelling use-case before I add such a thing).objc2_core_foundation::CFRunLoopAddSource
does not accept raw pointer.objc2_core_graphics::CGImageCreate
returns anOption
, so it's up to the user themselves to handle errors.libdispatch
#77.objc2-io-kit
is available.objc2
's approach to macOS versions is different, it don't have a feature-flag per OS version, instead everything is always available, and it's up to you to only use the parts that are available on your supported OS version.rustc
's deployment target is what's tested in CI, and I regularly test on an old MacBook with macOS 10.12 installed.objc2
crates don't useforeign-types
.objc2-core-foundation
providesCFArray::to_vec
and array iterators which are safer and retains like you'd expect.objc2_app_kit::NSAlert
is available.objc2_core_graphics::CGEventCreateKeyboardEvent
acceptsNone
event source.IOSurface
should be inobjc2-io-surface
, that's the framework it belongs to.objc2
provides a lot of feature flags to tune which crates to depend on, so the dependency problem should be a non-issue there.objc2-core-graphics
, feature flags are used instead to keep compile-times down.objc2_core_foundation::CFRunLoop
's docs are also kinda empty. Adding some examples would be a good idea.&CGImage
to&CGImageRef
servo/core-foundation-rs#466objc2_core_foundation::CFRetained
makes this distiction of ownership clear, and avoids unnecessary retains.objc2_core_graphics::CGDisplayStream
is available.CGVirtualDisplay
are not available, I would accept a PR adding behind a"private"
feature flag.objc2-core-foundation
doesn't provide an abstraction on top ofCGDataProvider
.objc2-core-foundation
works withobjc2
and Objective-C message sending.CGImage
from a*mut CGImage
servo/core-foundation-rs#373objc2
doesn't useforeign-types
, so this is a non-issue here.objc2_core_foundation::Type
is anunsafe
trait.objc2_core_foundation::CFMutableDictionary
does not have the listed problems (it doesn't allow safe operations when the type parameters are unknown).objc2_foundation::NSThread
is available.objc2-core-wlan
is available.objc2_core_foundation::CFRunLoopObserver
functions are safe exceptCFRunLoopObserverCreate[WithHandler]
, since the callbacks must be thread-safe, and that's hard to ensure.CGDisplayMode::all_display_modes
segmentation fault servo/core-foundation-rs#319core_graphics::CGDisplayMode::all_display_modes
ends up taking ownership of more than it should.objc2_core_graphics::CGDisplayCopyAllDisplayModes
does not have this issue.objc2-core-foundation
intentionally does not provideCFArray::from_copyable
.objc2_app_kit::NSApplicationActivationOptions
usesbitflags!
.objc2
's header translator. See also Figure out naming scheme in framework crates #284.objc2-core-graphics
is a single crate. Incompatible dependency versions are unfortunate, but IMO better mitigated with infrequent releases.CAMetalLayer
can be set as the layer inobjc2_app_kit::NSView::setLayer
.CGDisplay
servo/core-foundation-rs#218objc2_core_foundation::CFDictionary
can be converted fromCFDictionary<K, V>
with.as_opaque()
.objc2_core_foundation::CFMutableArray
is available.objc2::define_class!
is available.objc2
's header translator creates newtypes.CGDataProvider
abstraction could be useful.objc2_foundation::NSURL
andobjc2_foundation::NSModalResponse
are available.-[NSEvent characters]
.objc2::define_class!
.objc2::extern_class!
.Drop
forNSAutoreleasePool
? servo/core-foundation-rs#179objc2::rc::autoreleasepool
is available, that's the only (barely) sound API.[NSEvent type]
produces value21
with no associatedNSEventType
variant causing SEGFAULT. servo/core-foundation-rs#178objc2_app_kit::NSEventType
is a struct overNSUInteger
instead of an enum.initWithFrame_
servo/core-foundation-rs#177cocoa
's handling of methods as traits, not an issue inobjc2
crates.-[NSStatusBar systemStatusBar]
.objc2
has automatically generated bindings.objc2
's header translator creates newtypes.objc2-core-graphics
doesn't try to serialize for you.[NSEvent type]
produces value21
with no associatedNSEventType
variant causing SEGFAULT. servo/core-foundation-rs#401[NSEvent type]
produces value21
with no associatedNSEventType
variant causing SEGFAULT. servo/core-foundation-rs#178.objc2-core-foundation
has comments on most casts).PRs:
CGEventTap
helpers? #720.CGEventTap
helpers? #720.CGEventSourceGetLocation
is private API not even available in.tbd
files.core_graphics::private::CGSRegion
servo/core-foundation-rs#700CGSRegion
is not present inobjc2-core-graphics
.Applicatin
->Application
servo/core-foundation-rs#696objc2_app_kit::NSDockTile
is auto-generated, and does contain such typos.CGEventTap
callback returns nullptr servo/core-foundation-rs#665CGEventTap
helpers? #720.objc2_app_kit::NSColor
.objc2-core-graphics
.objc2_core_foundation::CFRunLoopAddSource
does not accept raw pointer.objc
withobjc2
servo/core-foundation-rs#628objc2
.objc2_core_foundation::CFRangeMake
is not available, should be added for documentation purposes.no_std
environment servo/core-foundation-rs#609no_std
is supported inobjc2-core-foundation
, thoughobjc2
doesn't support it.objc2::rc::Retained::<objc2_quartz_core::CALayer>::from_raw
.objc2-core-text
, PRs for wrappers welcome.objc2
more idiomatically servo/core-foundation-rs#514objc2
.CGEventTap
helpers? #720.objc2-core-text
, PRs for wrappers welcome.objc2-core-text
, PRs for wrappers welcome.objc2_core_graphics::CGFontCopyVariations
.objc2-core-text
APIs that I don't really plan on exposing.objc2-image-io
.The text was updated successfully, but these errors were encountered: