How to start with UI on the Mac? #255
Replies: 4 comments 12 replies
-
|
You will want to browse old documentation about the "Window Manager", "Menu Manager", "Dialog Manager" and "Control Manager", and maybe about the "TextEdit package". For Retro68-specific sample code, look at Samples/Dialog, Samples/WDEF (ignoring the stuff that is actually about WDEFs) and maybe LaunchAPPL/Server; and, especially if you're using Nix, at the https://github.com/autc04/Retro68NixSample repository. By modern standards, Apple's old UI libraries are very basic and low-level. |
Beta Was this translation helpful? Give feedback.
-
|
@autc04 I am close (I think!) but am getting some linker errors for functions defined in |
Beta Was this translation helpful? Give feedback.
-
|
@autc04 Having another crack at linking this together. I've gathered that But then I still get duplicate definition errors when compiling. I had gotten the whole lot to compile by setting Which is pretty clear. Do I need to omit MacWindows.h somehow? I'll post my CMakeList.txt in case you have any insights. |
Beta Was this translation helpful? Give feedback.
-
|
On Apr 14, 2025, at 2:45 PM, Wolfgang Thaller ***@***.***> wrote:
No shared libraries on 68K, but one could of course create and use a static library using standard CMake functionality. See add_library in make docs.
Mac OS 8 and 9 had a 68K port of the Code Fragment Manager to handle shared libraries, but that never caught on much because 68K was already on its way out, and anyway it'd be a big project to support in Retro68. And before that, there was the "Apple Shared Library Manager", which was strange by modern standards and which I've never seen in actual use at all.
ISTR some versions of MS Office used it?
Hmmm, yes it would be interesting to see how far it can be taken. Well, the original NeXTstep ran on 68K, and it was already more advanced than all Apple ever did before Mac OS X...
Sure, but NeXTstep also took proper advantage of the virtual memory capabilities of the 68K, which MacOS never did (it would have broken too much about how applications expected to work by the time it was feasible hardware-wise), and it's difficult to do shared libraries efficiently if you can't just map them in like Unix and Windows do.
I know that some of the old hardware was physically incapable of shuffling all the pixels of a window around quickly enough to allow for really smooth dragging of a window. But it was close, scrolling a few pixels at a time worked. And of course, the Old Ones refrained from double-buffering because they wanted to use their RAM for other things besides the UI itself, and they were apparently scared of asynchronous stuff...
I mean, yeah, but also double-buffering takes up enormous CPU resources when you don't have hardware page-flipping (which isn't practical for windowed double-buffering anyway). There is, however, plenty of asynchronous stuff in the old Toolbox, it's just done via callbacks. Drawing procedures for windows and controls and filter procedures are really great examples.
Event handling was primarily done as a loop because honestly that's how it's done a lot of places; you can always abstract that to be asynchronous via your own callbacks if you want, but handling it as a queue consumer is actually a lot more efficient from an overhead standpoint.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Like are there any libraries/headers for working with UI?
Beta Was this translation helpful? Give feedback.
All reactions