servo / core-foundation-rs

Rust bindings to Core Foundation and other low level libraries on Mac OS X and iOS
Other
1.01k stars 221 forks source link

Should CGColorSpaceRef be a part of core-graphics-types? #479

Open kvark opened 2 years ago

kvark commented 2 years ago

I wonder if there is a guideline on what goes into the types crate and what doesn't. In https://github.com/gfx-rs/metal-rs/pull/221/, we use CGColorSpaceRef as opaque type, and it would be nice to avoid depending on the whole core-graphics crate there.

jrmuizel commented 2 years ago

I'd say a decent guideline is that if the type is used by other non-CoreGraphics APIs opaquely it's a good candidate for core-graphics-types.

jrmuizel commented 2 years ago

Though I guess separating out the CGColorSpace type from the wrapper is a bit of a pain.

jrmuizel commented 2 years ago

That being said, I have no objection to the whole thing being moved over if it makes life easier.

kvark commented 1 month ago

Would be good for https://github.com/gfx-rs/metal-rs/pull/296

waywardmonkeys commented 1 month ago

@kvark Any chance you want to do a PR for this?

@wusyong This is another thing that should go into the next release.