NSTouchBar API Reference
developer.apple.com
developer.apple.com
Hopefully the next XCode build will include a TouchBar simulator so there's no need for me to get a new MBP in order to work on this.
On rough days, I turn on `nyan-mode` [1] in Emacs. I don't think the existence of nyan-mode should turn anybody off from Emacs.
You do have to update macOS, though-- it's not included in the 10.12.1 build released a few days ago. The build you'll need is linked on Apple's developer site: https://developer.apple.com/macos/touch-bar/
It's interesting, then, that they explicitly showed the Touch Bar being used for alerts in the design video (when the user received a FaceTime call).
An alert is something that blocks further input until it is dismissed. Something along the lines of "Are you sure you want to disable encryption?" or "This item can not be deleted because it is locked."
They'll probably write a driver for it for Windows & Linux that just displays the F-keys.
Source: disgruntled Early 2013 MacBook Pro user who can't use the built-in microphone from within Boot Camp.
Apple's New MacBook Pro Requires a $25 Dongle To Charge Your iOS Device
I like the TouchBar. I really like the Security Enclave. I'm good with losing most of the ports. But they shoulda kept a standard USB port.So this will push my upgrade back not forward.
https://hardware.slashdot.org/story/16/10/27/2226215/apples-...
Same thing happens with the Magsafe anyway, the eco friendly material they decided to use frays too easily.
https://www.microsoft.com/surface/en-us/support/hardware-and...
I know because I ordered one a couple hours ago. (... The first of many silly dongles I'm going to need for my new MBP.)
It is standard isn't it? I thought the port was fully compatible with the USB-C standard?
USB Type C is standard and far more powerful than Types A or B. The ecosystem is still maturing, and I hope this drives it forward as Apple's switching to Type A on the iMac did so 15 or so years ago.
USB was already a lot of software (and hardware) complexity just to attach a low speed peripheral like a mouse or a keyboard.
Switching power delivery over to USB-C has meant the elimination of MagSafe connectors.
Replacing fixed solutions like Ethernet is a step back to AAUI/AUI and MAC dongles, except now, you have to put the entire ethernet controller and a USB or TBolt controller in an external dongle.
For example, Dropbox requires it for some features, as does an App that hides menubar items.
https://blogs.msdn.microsoft.com/oldnewthing/20110310-00/?p=...
- Media playback: When a song or a video is playing in a background app, there is an extra button in the system button part on the right that lets you access a media control strip. From it you can pause the current video / audio and even scrub through it.
- Xcode debugging: While Xcode is attached to a running process, there's a button in the system button part on the right side of the touch bar lets you access a debugging control strip, which lets you pause execution and step through the program. This access button is actually in the same place as the media control button, and in cases where both would be shown, the media control button wins.
- QuickTime screen recording: When you start recording the screen from QuickTime, the current recording time + a stop button is displayed in a touch bar overlay even if you focus a different app. However, once you do switch to a different app, you can close the overlay, and it minimizes into that same button slot on the right of the touch bar.
It surely would be nice to be able to do these things without private APIs, but I couldn't find anything so far.
"""There is no need, and no API, for your app to know whether or not there is a Touch Bar available. Whether your app is running on a machine that supports the Touch Bar or not, your app’s onscreen user interface (UI) appears and behaves the same way.
The Touch Bar dims automatically and wakes when the user touches it. Do not show alerts in the Touch Bar, and do not use the Touch Bar for widgets."""
For the touch bar, you aren't doing the actual rendering; the OS is. Only the OS knows if there's a touch bar, so without a kext or something, it seems there's no way for you to know if the touch bar exists.
if(!touchbar) return MAKE_SUCCESS_GREAT_AGAIN;
But then again maybe the user space component just doesn't have that conditional.However, it sounds like in the absence of private framework usage, the only way for your app to show anything in the bar at all is for it to be in the foreground.
So it would seem like less of an issue than even showing ads on the main screen, where any app can technically create windows that float over all the others and can't be moved by the user.
What's more, common actions usually have high-priority, simple chords (cmd-c/cmd-v, for example) --- whereas complex chords are used for infrequent commands (cmd-alt-shift-c to re-assign the origin in blender, for example). If we're going to surface commands in the touch bar, intuition says to surface the common commands, and leave infrequent ones tucked away, meaning that even with the touch bar you don't have quick or simple access to those commands.
I hope it doesn't get adopted by other laptop manufacturers. Imagine it does. Then we'll need desktop keyboards to support this standard. I like my wireless keyboard's battery life, and I don't see any benefit in buying a more expensive keyboard with decreased battery life in order to support UI I don't intend to use.
In saying that though, I doubt Apple would actually make this available for website.
I think Apple is going to use this to differentiate its native app offerings from competing web apps, particularly Google's web apps, so I doubt they put much effort into that.
With a bit of legwork, you could refactor and ship a React app with react-native-macos, and write a module that allows you to use NSTouchBar from JS.
There are so many old iPhone and iPads out there just waiting to be repurposed for something like this.
Heck, I'd even be interested in a reasonably priced (< $150) external touch strip as an accessory for my current MBP.
It is encouraging to read this in Apple's documentation[1]:
"There is no need, and no API, for your app to know whether or not there is a Touch Bar available. Whether your app is running on a machine that supports the Touch Bar or not, your app's onscreen user interface (UI) appears and behaves the same way."
Skip forward 5 years to a time when software developers assume that every Mac user has a Touch Bar. We will get to see just how poorly they make use of the feature. Even as someone without any disabilities, I sincerely hope I am never absolutely required to use the Touch Bar for features that cannot be found elsewhere in an application.
> Because the Touch Bar is designed to work with AppKit, it is fully accessible.
> Be sure to use the customizationLabel property on every NSTouchBarItem instance that you designate as customizable (as described in NSTouchBar Customization). The accessibility system in macOS makes use of these labels.
So, yes.
Kinda funny that a product that was only officially announced today already has a vernacular. :)
DJ-ing apps could show up cue points and let you trigger them.
While fullscreen mode on macOS advocated distraction-free focus, TouchBar takes a step backwards.
The example in the middle is in Swift, regardless of which language you've selected.
But the API list at the bottom does reflect your current language selection.
"Swift is a successor to both the C and Objective-C languages."
-- https://developer.apple.com/swift/
" Swift is intended as a replacement for C-based languages (C, C++, and Objective-C)."
Also on Sierra, launchd and the Dock have been rewritten in Swift.