mirror of
https://github.com/clang-retro/mac-sdk.git
synced 2026-11-28 13:19:22 -08:00
- extras/quesa: build.sh builds Quesa at 883c9a0 (2007, the last commit with a classic build) as LIB/ppc/libquesa.a, with QD3D*.h header names. quesa.patch makes Quesa.h detect the classic Mac OS and makes GLGetProcAddress use the Code Fragment Manager. - include/CarbonAccessors.h: the Carbon accessor functions as inline functions for programs that are not Carbon programs. - The generated Toolbox headers now have C linkage in C++. - defs: Universal Interfaces 3 names of the Code Fragment Manager, const arguments of CopyBits, CopyMask, CopyDeepMask, GetDiskFragment and GetColor, char codes, hierMenu, kResolveAliasFileNoUI, QTAtom types; ColorPicker.h; Apple-style gl.h, glu.h, glext.h, agl.h and aglRenderers.h. - simppc fakes NewRoutineDescriptor, GetCurrentProcess, GetProcessInformation, DMRegisterNotifyProc and FindFolder. - tests/quesa.cpp renders a box through Quesa and OpenGL into a pixmap in simppc; run.sh runs it when QUESA_SRC is set, and CI gets Quesa. - docs/quesa.md, and C++ and Carbon accessor sections in headers.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRTDFNgD4oK9xbDsEGn
2.0 KiB
2.0 KiB
The Toolbox headers
Old routine names
Where they come from
Checked against a real ROM
C++
The Toolbox headers declare the Toolbox calls with C linkage, also in
C++. A C++ program can include them without extern "C".
Carbon accessors
Carbon programs read the Toolbox records with accessor functions, such
as GetPortBounds and GetWindowFromPort. The Toolbox headers declare
these functions only when TARGET_API_MAC_CARBON is 1. Apple gave the
same functions to programs that are not Carbon programs in
CarbonAccessors.o. CarbonAccessors.h gives them as inline functions
that read the records:
| Area | Functions |
|---|---|
| Ports | GetPortBounds, GetPortVisibleRegion, GetPortClipRegion, GetPortBitMapForCopyBits, GetPortPixMap, IsPortColor, GetPortTextFont, GetPortTextSize, GetPortTextFace, GetPortTextMode, GetPortPenSize, GetPortPenLocation |
| QuickDraw globals | GetQDGlobalsThePort, GetQDGlobalsScreenBits, GetQDGlobalsArrow, GetQDGlobalsDarkGray, GetQDGlobalsLightGray, GetQDGlobalsGray, GetQDGlobalsBlack, GetQDGlobalsWhite, GetQDGlobalsRandomSeed, SetQDGlobalsRandomSeed |
| Windows | GetWindowPort, GetWindowFromPort, SetWindowKind, IsWindowHilited, IsWindowVisible, GetWindowList, GetNextWindow |
| Menus | GetMenuID, SetMenuID, GetMenuWidth, GetMenuHeight, CountMenuItems |
| Dialogs | GetDialogWindow, GetDialogPort, GetDialogFromWindow, GetDialogTextEditHandle, GetDialogKeyboardFocusItem |
| Controls | GetControlBounds, SetControlBounds, GetControlOwner, GetControlHilite, IsControlHilited |
When TARGET_API_MAC_CARBON is 1, CarbonAccessors.h gives nothing.
The QuickDraw globals functions read the globals below *CurrentA5, so
call them after InitGraf.