Re: NSTouchBar in Carbon
Re: NSTouchBar in Carbon
- Subject: Re: NSTouchBar in Carbon
- From: "Gary L. Wade" <email@hidden>
- Date: Mon, 12 Dec 2016 12:42:34 -0800
NSApplication may add too much conflicting infrastructure to a Carbon app, but I don’t know for sure since I went whole-Cocoa after first adding the drag-to-trash-poof animation to a Carbon app years ago. However, you might be able to subclass NSWindow and add your own makeTouchBar method to it and use that to call initWithWindowRef: on your Carbon window. That may be enough to tie into Cocoa’s responder chain; not sure how controls can be bridged from Carbon to Cocoa, but at least the NSWindow would be the best place to know how to configure a touch bar.
--
Gary L. Wade
http://www.garywade.com/ <http://www.garywade.com/>
> On Dec 12, 2016, at 11:22 AM, Jens Alfke <email@hidden> wrote:
>
> I haven’t used NSTouchBar at all yet, but from the API in the header file, it looks like you can instantiate one with -init, configure it, and then assign it to the touchBar property of the NSApplication instance.
>
> (I'm assuming that even a Carbon-based app process has an NSApplication these days. You can access it via the global variable NSApp.)
>
> —Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden