Yeah I think you are right, I should say that some of that code was ported and still survives today in 26 uses some of the same APIs and naming, but isn’t necessarily the same code from classic Mac OS. One example is RegisterEventHotKey.
"CarbonLib" implies Mac OS 9 (or 8) — it's the classic Mac OS implementation of the Carbon API. The OS X implementation is Carbon.framework (or more precisely, various frameworks under its umbrella).
RegisterEventHotKey() is available "in CarbonLib 1.3 and later" according to Universal Interfaces.
They moved it to HIToolbox when Carbon framework was eliminated.
This was never provided by classic Mac OS and many apps hacked it in by hooking Get/WaitNextEvent. In Carbon they didn't support this sort of "mangle the global system callbacks" shenanigans, but there was a real developer expectation of this API, and Apple was begging developers to port to Carbon. This API filled that gap.
I seem to recall years ago reading that the Cocoa (the NeXTstep derived API) menu code called into the Carbon (the classic Mac OS derived API) code to run stuff. But that was around Snow Leopard IIRC. That sort of stuff might still be around?
The Carbon API itself lasted until 10.15 (Catalina / 2019) for 32 bit apps, so there's presumably at least some classic Mac OS derived code in there until then.
Pretty sure the menu bar was Carbon in Snow Leopard, which was the same release that discontinued Classic. Lots of Cocoa widgets called into HIToolbox under the hood. QuickTime wasn't fundamentally changed. And iTunes of course was Carbon code for a very, very long time.
But in the early days, a lot of UI and OS frameworks were based on Carbon stuff ported from Classic MacOS with Cocoa wrappers on them.
One sibling mentioned the menus. Another sibling mentioned the Security framework. The SDK for macOS Golden Gate still ships with headers dating back to MacOS 8.6 (although they are mostly deprecated now) https://kalleboo.com/linked/macos86security_vs_macosgoldenga...
> and I fell in love with the jank as it were (hacks
> upon hacks upon hacks going back to the 1980s is
> something I’d definitely describe as “jank”).
Modern macOS still has classic Mac OS code in it dating as far back, and has added Objective C and Swift abstractions on top.