Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional PRs to core-foundation-rs #462

Open
xanathar opened this issue Aug 13, 2021 · 2 comments
Open

Additional PRs to core-foundation-rs #462

xanathar opened this issue Aug 13, 2021 · 2 comments

Comments

@xanathar
Copy link
Contributor

Hi,
I'm the author of #459 and #460 (which, incidentally, are blocked because the CI timed out - my guess is that it timed out independently of the PRs).

I've authored three further wrappers you might be interested into, but, given that they have a scope which is a bit broader than what's in the repo now and there are some caveats (additional dependencies or undocumented APIs), I'm asking if they are welcome or not before spending time polishing them for PR.

CGDisplayStream
Both sys and rusty wrappers around the CGDisplayStream family of APIs which allow the display contents to be streamed to an IOSurface at high speed / low cpu usage. These are documented APIs, and I think they can be of interest, but they require a couple of dependencies, as it's a CG API that directly refers IOSurface, plus it uses objective-c blocks (and so needs block crate ).

CGS Display calls
These are wrappers around Display calls starting with "CGS"; they are undocumented API calls which are generally useful to manipulate displays on MacOS. Examples are enumerating all the displays, or getting access to video modes which are not exposed to the UI. There are both the sys/ffi wrappers and the "rusty" ones, but the calls are, again, not documented by Apple.

CGVirtualDisplay
Again, a wrapper over undocumented APIs which allow to create virtual displays on MacOS; I think they are the APIs Apple uses to support Sidecar. Controversy here is the undocumented status.

Let me know if you are interested in a PR for any subset of them, and I'll open those.

@jrmuizel
Copy link
Collaborator

I think we're interested in all of them. It might be worth putting undocumented APIs in a separate crate like 'core-graphics-private' or something like that.

@EpicCodeWizard
Copy link

Hello, I was just wondering if the PRs ended up getting merged for CGVirtualDisplay. I'm making a cross-platform Rust app that allows users to create and manage virtual displays easily - I have the Windows and Linux parts figured out, but I couldn't find any API for CGVirtualDisplay. Please let me know how I can use the CGVirtualDisplay APIs as mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants