Has Apple released APIs for touch bar yet?

☆樱花仙子☆ 提交于 2019-12-09 06:32:16

问题


Apple just announced the new MacBook with the touch bar. Are there APIs that app developers can use? I can't seem to find any online yet.

Does it support access from the browser via JavaScript? WebKit has force touch APIs to support it on four runs touch trackpad) so I'm guessing it'll be pretty useful if they release this one too. Is anything out yet?

Also how to debug and test for touch bar functions, is there some 'MAC EMULATOR' sort of thing?


回答1:


I think this option is for native client, it won’t be able to manipulate in browser, unless the browser doesn’t support it

If you're writing Native Client (JavaScript only), then here is a repository.

UPDATE: It is already supported by Electron.




回答2:


There is a native API: https://developer.apple.com/reference/appkit/nstouchbar

I don't know whether there will be support via Javascript



来源:https://stackoverflow.com/questions/40292937/has-apple-released-apis-for-touch-bar-yet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!