We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, thanks for your work on this project!
I'm trying to work with CoreGraphics and can't see how to do that with objc
objc
For example, I'm trying to call CGEventCreate(null) by writing:
CGEventCreate(null)
const objc = require('objc') objc.import('Cocoa') objc.import('Framework') const {CGEventCreate} = objc const test = CGEventCreate(null)
but I'm getting back an error that CGEventCreate is not a function, and that it's value is 'H��AW'.
CGEventCreate
'H��AW'
Any pointers for how to get this to work?
The text was updated successfully, but these errors were encountered:
The problem is that CoreGraphics is entirely written in C, meaning that you'll have to access it via the ffi module:
CoreGraphics
ffi
const ffi = require('ffi'); const objc = require('objc'); objc.import('CoreGraphics'); const lib = new ffi.Library(null, { CGEventCreate: ['pointer', ['pointer']] }); const event = lib.CGEventCreate(null);
Sorry, something went wrong.
No branches or pull requests
Hi, thanks for your work on this project!
I'm trying to work with CoreGraphics and can't see how to do that with
objc
For example, I'm trying to call
CGEventCreate(null)
by writing:but I'm getting back an error that
CGEventCreate
is not a function, and that it's value is'H��AW'
.Any pointers for how to get this to work?
The text was updated successfully, but these errors were encountered: