Add Quesa (QuickDraw 3D over OpenGL) for PowerPC, and Carbon accessors

- 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
This commit is contained in:
Claude committed 2026-11-25 19:59:00 +00:00
1 parent dfc98cce81
commit 83640d4d9f
126 files changed
+2223 -25

No files matched your search

+11 -1
View File
@@ -90,5 +90,15 @@ jobs:
mkdir -p "$RUNNER_TEMP/gcc"
tar -xJf gcc-15.2.0.tar.xz -C "$RUNNER_TEMP/gcc"
echo "GCC_SRC=$RUNNER_TEMP/gcc/gcc-15.2.0" >> "$GITHUB_ENV"
- name: Get Quesa (the last commit with the classic Mac OS build)
uses: actions/checkout@v4
with:
repository: jwwalker/Quesa
ref: 883c9a0d218bd18c17f2f62024c0e57f2d5d4a07
path: quesa
sparse-checkout: |
Development/Source
SDK/Includes
persist-credentials: false
- name: Tests
run: LLVM_SRC=$PWD/llvm PICOLIBC_SRC=$PWD/picolibc tests/run.sh
run: LLVM_SRC=$PWD/llvm PICOLIBC_SRC=$PWD/picolibc QUESA_SRC=$PWD/quesa tests/run.sh
+9 -2
View File
@@ -380,6 +380,12 @@ links both archives before `libmacrt.a`, and starts the program at
- OpenGL on PowerPC: `GL/gl.h` (OpenGL 1.2 and Apple's extensions),
`GL/glu.h` and `AGL/agl.h`, imported weakly from Apple's
`OpenGLLibrary` and `OpenGLUtility`. See docs/opengl.md.
- QuickDraw 3D on PowerPC: `extras/quesa/build.sh` builds Quesa, the
open-source QuickDraw 3D over OpenGL, as a static library, with the
`QD3D*.h` header names. See docs/quesa.md.
- `CarbonAccessors.h`: Carbon's accessor functions (`GetPortBounds`,
`GetWindowFromPort`, `GetMenuID` and others) as inline functions for
programs that are not Carbon programs, as Apple's CarbonAccessors.o.
- POSIX threads (`pthread.h`) over the Thread Manager: cooperative
threads, mutexes, condition variables, keys and `pthread_once`, and
`sched_yield`, `nanosleep`, `usleep` and `clock_gettime`. The C++
@@ -454,10 +460,11 @@ the C library. `runtime/build-libstdcxx.sh` builds the library, and
relocations, and gives each imported InterfaceLib function a fake
built on `sim68k.py`'s (the Memory Manager, the File Manager,
`ReadLocation`, `DrawString`, `ExitToShell`, the console window's
calls, with `--keys` too, ThreadsLib, and a fake OpenGL in
calls, with `--keys` too, ThreadsLib, the Code Fragment Manager's
`GetSharedLibrary` and `FindSymbol`, and a fake OpenGL in
`tools/fakegl.py`). A program that calls
any other import stops there. `tests/run.sh` runs the runtime, glue,
C library, thread, socket and OpenGL tests in it.
C library, thread, socket, OpenGL and Quesa tests in it.
- `tools/mame/` boots Apple's System disks in MAME (Systems 0.1 to 7.1)
with an application in place of the Finder: `mkroms.py` makes ROM sets
from dumps you own, `matrix.py App.bin OUTDIR` boots every System and
+10
View File
@@ -903,3 +903,13 @@
- name: kDontCreateFolder
value: 0
comment: Folder Manager volume and creation arguments.
# ####
- enum:
values:
- name: kResolveAliasFileNoUI
value: 0x00000001
comment: |
ResolveAliasFileWithMountFlags: do not show a dialog to mount a
volume
+1 -1
View File
@@ -1346,7 +1346,7 @@
return: Boolean
args:
- type: Point
- type: Str255
- type: ConstStr255Param
- type: RGBColor*
- type: RGBColor*
dispatcher: Pack12
+79 -1
View File
@@ -130,6 +130,16 @@
# ####
- enum:
values:
- name: kUnresolvedCFragSymbolAddress
value: 0
comment: |
the address of a weak import that the Code Fragment Manager did
not find
# ####
- typedef:
name: LoadFlags
type: uint32_t
@@ -239,6 +249,74 @@
# ####
- verbatim: |
/* The Code Fragment Manager's newer names (CodeFragments.h of
Universal Interfaces 3), and the block that a fragment's
initialization function gets. */
typedef ConnectionID CFragConnectionID;
typedef uint8_t CFragSymbolClass;
typedef OSType CFragArchitecture;
typedef uint32_t CFragLoadOptions;
enum {
kPowerPCCFragArch = 'pwpc',
kMotorola68KCFragArch = 'm68k',
kAnyCFragArch = 0x3F3F3F3F,
kLoadCFrag = 1,
kFindCFrag = 2,
kDataCFragSymbol = 1,
kCodeCFragSymbol = 0,
kTVectorCFragSymbol = 2,
kTOCCFragSymbol = 3,
kGlueCFragSymbol = 4
};
typedef struct OpaqueCFragContextID *CFragContextID;
enum {
kMemoryCFragLocator = 0,
kDataForkCFragLocator = 1,
kResourceCFragLocator = 2,
kNamedFragmentCFragLocator = 4,
kCFragGoesToEOF = 0,
kPrivateCFragCopy = 5
};
typedef struct CFragSystem7MemoryLocator {
void *address;
uint32_t length;
Boolean inPlace;
uint8_t reservedA;
uint16_t reservedB;
} CFragSystem7MemoryLocator;
typedef struct CFragSystem7DiskFlatLocator {
struct FSSpec *fileSpec;
uint32_t offset;
uint32_t length;
} CFragSystem7DiskFlatLocator;
typedef struct CFragSystem7SegmentedLocator {
struct FSSpec *fileSpec;
uint32_t rsrcType;
int16_t rsrcID;
uint16_t reservedA;
} CFragSystem7SegmentedLocator;
typedef struct CFragSystem7Locator {
int32_t where;
union {
CFragSystem7DiskFlatLocator onDisk;
CFragSystem7MemoryLocator inMem;
CFragSystem7SegmentedLocator inSegs;
} u;
} CFragSystem7Locator;
typedef struct CFragSystem7InitBlock {
CFragContextID contextID;
CFragClosureID closureID;
CFragConnectionID connectionID;
CFragSystem7Locator fragLocator;
unsigned char *libName;
uint32_t reservedA;
} CFragSystem7InitBlock;
typedef CFragSystem7InitBlock CFragInitBlock;
typedef CFragInitBlock *CFragInitBlockPtr;
# ####
- dispatcher:
name: CodeFragmentDispatch
trap: 0xAA5A
@@ -251,7 +329,7 @@
return: OSErr
args:
- name: fsp
type: FSSpecPtr
type: const FSSpec*
- name: offset
type: LONGINT
- name: length
+47
View File
@@ -149,3 +149,50 @@
name: EventMask
type: UInt16
comment: A set of event kinds, one bit each (everyEvent and friends).
# ####
- enum:
values:
- name: kNullCharCode
value: 0
- name: kHomeCharCode
value: 1
- name: kEnterCharCode
value: 3
- name: kEndCharCode
value: 4
- name: kHelpCharCode
value: 5
- name: kBellCharCode
value: 7
- name: kBackspaceCharCode
value: 8
- name: kTabCharCode
value: 9
- name: kLineFeedCharCode
value: 10
- name: kPageUpCharCode
value: 11
- name: kPageDownCharCode
value: 12
- name: kReturnCharCode
value: 13
- name: kFunctionKeyCharCode
value: 16
- name: kEscapeCharCode
value: 27
- name: kClearCharCode
value: 27
- name: kLeftArrowCharCode
value: 28
- name: kRightArrowCharCode
value: 29
- name: kUpArrowCharCode
value: 30
- name: kDownArrowCharCode
value: 31
- name: kSpaceCharCode
value: 32
- name: kDeleteCharCode
value: 127
+9
View File
@@ -1541,3 +1541,12 @@
- name: inString
type: ConstStr255Param
m68k: none
# ####
- enum:
values:
- name: hierMenu
value: -1
comment: |
InsertMenu's beforeID for a submenu or a pop-up menu
+9 -9
View File
@@ -1289,9 +1289,9 @@
name: CopyBits
args:
- name: src_bitmap
type: BitMap*
type: const BitMap*
- name: dst_bitmap
type: BitMap*
type: const BitMap*
- name: src_rect
type: const Rect*
- name: dst_rect
@@ -1605,11 +1605,11 @@
name: CopyMask
args:
- name: srcbp
type: BitMap*
type: const BitMap*
- name: mskbp
type: BitMap*
type: const BitMap*
- name: dstbp
type: BitMap*
type: const BitMap*
- name: srcrp
type: const Rect*
- name: mskrp
@@ -3176,11 +3176,11 @@
name: CopyDeepMask
args:
- name: srcBits
type: BitMap*
type: const BitMap*
- name: maskBits
type: BitMap*
type: const BitMap*
- name: dstBits
type: BitMap*
type: const BitMap*
- name: srcRect
type: const Rect*
- name: maskRect
@@ -3308,7 +3308,7 @@
args:
- name: p
type: CGrafPtr
return: BitMap *
return: const BitMap *
m68k-needs: [GrafPort]
m68k-body: |
return &((GrafPtr)p)->portBits;
+24
View File
@@ -19,6 +19,30 @@
# ####
- typedef:
name: QTAtom
type: LONGINT
# ####
- typedef:
name: QTAtomType
type: LONGINT
# ####
- typedef:
name: QTAtomID
type: LONGINT
# ####
- typedef:
name: QTAtomContainer
type: Handle
# ####
- dispatcher:
name: QuickTime
trap: 0xAAAA
+27
View File
@@ -13,3 +13,30 @@
## Checked against a real ROM
<!-- include README.md "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`.
+117
View File
@@ -0,0 +1,117 @@
# QuickDraw 3D (Quesa)
PowerPC programs can use QuickDraw 3D through Quesa. Quesa is an
open-source implementation of the QuickDraw 3D API. It draws with
OpenGL. The SDK has a script that builds Quesa as a static library for
the classic Mac OS on PowerPC.
## Summary
| Item | Value |
| --- | --- |
| Source | <https://github.com/jwwalker/Quesa>, commit `883c9a0d` (July 2007) |
| License | BSD 3-clause (Quesa's own license) |
| Build script | `extras/quesa/build.sh QUESA_SRC LIB` |
| Library | `LIB/ppc/libquesa.a` |
| Headers | `LIB/include/Quesa/`: `Quesa*.h`, and `QD3D*.h` names for them |
| Renderers | The interactive renderer (OpenGL), the wireframe renderer, and the others of Quesa 1.8 |
| Draw contexts | Pixmap (AGL off-screen) and Macintosh window (AGL drawable) |
| CPU | PowerPC only. There is no OpenGL for 68k Macs. |
## Why this commit
Quesa stopped building for the classic Mac OS in the commit after
`883c9a0d` ("Remove Classic", `af2f641c`). Later versions also need
GLSL shaders, which Apple OpenGL for Mac OS 9 does not have.
`build.sh` stops when the checkout is at a different commit.
## Requirements
- The C library and the C++ library in `LIB`: run `runtime/build.sh`,
`runtime/build-libc.sh` and `runtime/build-libstdcxx.sh` first.
Quesa is C++ code.
- clang-retro's clang. `CLANG` names it (default: `clang`). `llvm-ar`
must be in the same directory.
- A Quesa checkout at commit `883c9a0d218bd18c17f2f62024c0e57f2d5d4a07`.
Only `Development/Source` and `SDK/Includes` are necessary.
## Build Quesa
```sh
git clone https://github.com/jwwalker/Quesa.git quesa
git -C quesa checkout 883c9a0d218bd18c17f2f62024c0e57f2d5d4a07
CLANG=/path/to/clang extras/quesa/build.sh quesa /path/to/lib
```
The script does these steps:
1. It copies the sources to a temporary directory. It does not change
the checkout.
2. It applies `extras/quesa/quesa.patch` (see below).
3. It compiles the 139 files of `extras/quesa/files.txt` as C++98. This
is the file list of the "Classic ShLib Release" target of Quesa's
CodeWarrior project. CodeWarrior also compiled these `.c` files as
C++.
4. It writes `LIB/ppc/libquesa.a` and copies the headers to
`LIB/include/Quesa/`.
## Build a program
Compile the program as C++ and link `libquesa.a`:
```sh
CLANG=/path/to/clang python3 tools/macapp.py --cpu ppc --lib /path/to/lib \
-o Teapot.bin -- -Wno-pragma-pack -I/path/to/lib/include/Quesa \
teapot.cpp /path/to/lib/ppc/libquesa.a
```
- Include `QD3D.h`, `QD3DGeometry.h` and the other QuickDraw 3D names,
or the `Quesa*.h` names. Each `QD3D*.h` file includes the `Quesa*.h`
file of the same name.
- At least one source file must be C++. `macapp.py` links the C++
library only for a program that has C++ sources.
- `Quesa.h` sets `#pragma options align=power` and does not reset it.
This is the QuickDraw 3D alignment, and it is the PowerPC default.
`-Wno-pragma-pack` stops the warning about it.
- `Quesa.h` finds the classic Mac OS from clang's `macintosh` macro. Do
not define `QUESA_OS_MACINTOSH` yourself.
## Changes to Quesa
`quesa.patch` changes these items:
| File | Change |
| --- | --- |
| `SDK/Includes/Quesa/Quesa.h` | Also selects the Mac OS when `macintosh` is defined and `__MACH__` is not. |
| `E3Viewer.c`, `E3MacDrawContext.c`, `E3MacViewer.h` and its copies | `<QuickDraw.h>` becomes `<Quickdraw.h>`, the name of the SDK's header. |
| `Renderers/Common/GLUtils.c` | `GLGetProcAddress` finds OpenGL functions with `GetSharedLibrary` and `FindSymbol`. In Quesa's classic build, it always gave NULL. |
The files in `extras/quesa/compat/` replace what CodeWarrior and
Apple's Universal Interfaces gave:
| File | Gives |
| --- | --- |
| `quesa-classic.h` | The settings of Quesa's prefix file (`QUESA_OS_MACINTOSH`, `Q3_DEBUG 0`, `Q3_EXPORT_SYMBOLS 1`), `<limits.h>`, `<CarbonAccessors.h>`, and `kGeneralFailureErr`. The script includes it before each source file. |
| `CFBundle.h`, `CFURL.h`, `CFString.h` | The Core Foundation type names that Quesa's prototypes use. The classic build does not call Core Foundation. |
## Things that the library does not do
- Plug-ins: Quesa looks for plug-ins in the Extensions folder and next
to the application. It loads each one with `GetDiskFragment`. The
SDK cannot link a plug-in (a CFM shared library), so only the
renderers that are in `libquesa.a` are available.
- Programs that are already linked against Apple's "QuickDraw™ 3D Lib":
the library is static, so these programs do not use it. A shared
library build of Quesa needs a shared library linker.
- Debug builds: `Q3_DEBUG` is 0. Quesa's debug build needs
`E3MacCFMStackCrawl.c`, which is CodeWarrior assembler.
## Test
`tests/quesa.cpp` starts Quesa, makes a box, gets its bounds through a
view, and renders it with the interactive renderer into a 16 x 8
pixmap. Then it checks that the pixmap has the clear colour. `tests/run.sh`
builds Quesa and runs this test in `tools/simppc.py` when `QUESA_SRC`
names the checkout (with `LLVM_SRC`, `PICOLIBC_SRC` and `GCC_SRC`). The
fake OpenGL of `tools/fakegl.py` does the clear. The GitHub workflow
gets Quesa and runs the test.
+94
View File
@@ -0,0 +1,94 @@
#!/bin/sh
# build.sh - build Quesa, the open-source QuickDraw 3D, for the classic
# Mac OS on PowerPC.
#
# Usage: extras/quesa/build.sh QUESA_SRC LIB
#
# QUESA_SRC is a checkout of https://github.com/jwwalker/Quesa at commit
# 883c9a0d218bd18c17f2f62024c0e57f2d5d4a07 (July 2007), the last commit
# that builds for the classic Mac OS. LIB is the directory where
# runtime/build.sh, runtime/build-libc.sh and runtime/build-libstdcxx.sh
# put the libraries. CLANG names the compiler (default: clang).
#
# The script copies the sources to a temporary directory, applies
# quesa.patch, compiles the files in files.txt as C++ (as CodeWarrior did
# for the classic target), and writes:
# LIB/ppc/libquesa.a the library
# LIB/include/Quesa/ Quesa's headers, and QD3D*.h names for them
# See docs/quesa.md.
set -e
if [ $# -ne 2 ]; then
echo "usage: $0 QUESA_SRC LIB" >&2
exit 2
fi
HERE=$(cd "$(dirname "$0")" && pwd)
SDK=$(cd "$HERE/../.." && pwd)
SRC=$(cd "$1" && pwd)
LIB=$(cd "$2" && pwd)
CLANG=${CLANG:-clang}
COMMIT=883c9a0d218bd18c17f2f62024c0e57f2d5d4a07
if [ -d "$SRC/.git" ] || [ -f "$SRC/.git" ]; then
have=$(git -C "$SRC" rev-parse HEAD)
if [ "$have" != "$COMMIT" ]; then
echo "build.sh: $SRC is at $have, not $COMMIT" >&2
exit 1
fi
fi
CXXTOP=$(ls -d "$LIB"/include/c++/*/powerpc-apple-macos9 2>/dev/null | sort | tail -1)
if [ -z "$CXXTOP" ]; then
echo "build.sh: no C++ library in $LIB; run runtime/build-libstdcxx.sh" >&2
exit 1
fi
WORK=$(mktemp -d "${TMPDIR:-/tmp}/quesa.XXXXXX")
trap 'rm -rf "$WORK"' EXIT
mkdir -p "$WORK/src" "$WORK/obj"
cp -R "$SRC/Development" "$SRC/SDK" "$WORK/src/"
(cd "$WORK/src" && patch -s -p1 < "$HERE/quesa.patch")
# Every source directory is on the include path, as in the CodeWarrior
# project, except those of the other platforms.
INC=""
for d in $(cd "$WORK/src" && find Development/Source -type d |
grep -v 'Platform/\(Windows\|Unix\|Cocoa\)\|Resources\|Gestalt' |
sort); do
INC="$INC -I$WORK/src/$d"
done
INC="$INC -I$WORK/src/SDK/Includes/Quesa -I$HERE/compat"
FLAGS="--target=powerpc-apple-macos9 -Os -ffunction-sections -fdata-sections
-x c++ -std=gnu++98 -nostdinc++ -isystem $CXXTOP -isystem $(dirname "$CXXTOP")
-isystem $LIB/include -I$SDK/include -include $HERE/compat/quesa-classic.h
$INC -w"
# Each line of files.txt is compiled into WORK/obj, in parallel. The
# object's name is the source's path with "_" for "/".
JOBS=$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 2)
export CLANG FLAGS WORK
grep -v '^#' "$HERE/files.txt" | grep . |
xargs -P "$JOBS" -n 1 sh -c \
'$CLANG $FLAGS -c "$WORK/src/$1" -o "$WORK/obj/$(echo "$1" | tr / _).o"' sh
n=$(grep -v '^#' "$HERE/files.txt" | grep -c .)
got=$(ls "$WORK/obj" | grep -c '\.o$')
if [ "$got" -ne "$n" ]; then
echo "build.sh: $got of $n files compiled" >&2
exit 1
fi
AR=${AR:-$(dirname "$(command -v "$CLANG")")/llvm-ar}
[ -x "$AR" ] || AR=llvm-ar
mkdir -p "$LIB/ppc" "$LIB/include/Quesa"
rm -f "$LIB/ppc/libquesa.a"
"$AR" rcs "$LIB/ppc/libquesa.a" "$WORK"/obj/*.o
# The headers, and the names that QuickDraw 3D programs include.
cp "$WORK/src/SDK/Includes/Quesa/"*.h "$LIB/include/Quesa/"
for h in "$LIB/include/Quesa/"Quesa*.h; do
b=$(basename "$h" .h)
q="QD3D${b#Quesa}"
printf '/* %s.h - the QuickDraw 3D name of %s.h. */\n#include "%s.h"\n' \
"$q" "$b" "$b" > "$LIB/include/Quesa/$q.h"
done
echo "quesa: $n files, $LIB/ppc/libquesa.a"
+10
View File
@@ -0,0 +1,10 @@
/* CFBundle.h - the Core Foundation types that Quesa names in its
* prototypes. The classic Mac OS has no Core Foundation without
* CarbonLib; Quesa calls it only in Carbon builds. */
#ifndef QUESA_COMPAT_CFBUNDLE_H
#define QUESA_COMPAT_CFBUNDLE_H
typedef const struct __CFString *CFStringRef;
typedef struct __CFBundle *CFBundleRef;
typedef const struct __CFURL *CFURLRef;
typedef const struct __CFArray *CFArrayRef;
#endif
+6
View File
@@ -0,0 +1,6 @@
/* CFString.h - a stand-in for the Core Foundation header that Quesa
* includes. The classic build of Quesa does not call Core Foundation. */
#ifndef QUESA_COMPAT_CFSTRING_H
#define QUESA_COMPAT_CFSTRING_H
#include "CFBundle.h"
#endif
+2
View File
@@ -0,0 +1,2 @@
/* CFURL.h - see CFBundle.h. */
#include <CFBundle.h>
+22
View File
@@ -0,0 +1,22 @@
/* quesa-classic.h - included before each Quesa source in the build for
* the classic Mac OS with clang and mac-sdk. It sets what Quesa's
* CodeWarrior prefix files set, and gives the few names that Apple's
* Universal Interfaces had and mac-sdk does not. */
#ifndef QUESA_CLASSIC_H
#define QUESA_CLASSIC_H
#define QUESA_OS_MACINTOSH 1
#define Q3_EXPORT_SYMBOLS 1
#define Q3_DEBUG 0
#define Q3_PROFILE 0
#define ACCESSOR_CALLS_ARE_FUNCTIONS 1
/* The error that the old Viewer calls give for a failure. QD3D did not
* document one; this is a stand-in. */
#ifndef kGeneralFailureErr
#define kGeneralFailureErr (-1)
#endif
/* Quesa uses ULONG_MAX and others without <limits.h>; CodeWarrior's
* prefix gave them. */
#include <limits.h>
/* Quesa uses the Carbon accessor functions also in its classic build. */
#include <CarbonAccessors.h>
#endif
+143
View File
@@ -0,0 +1,143 @@
# The Quesa sources of the "Classic ShLib Release" target of
# Development/Projects/Mac/Quesa.mcp.xml, without E3MacMemory.c (it needs
# CodeWarrior's MSL) and E3MacCFMStackCrawl.c (CodeWarrior assembler, for
# debug builds only).
Development/Source/Platform/Mac/E3MacDebug.c
Development/Source/Core/System/E3Camera.c
Development/Source/Core/System/E3Controller.c
Development/Source/Core/System/E3CustomElements.c
Development/Source/Core/System/E3DrawContext.c
Development/Source/Core/System/E3Errors.c
Development/Source/Core/System/E3Extension.c
Development/Source/Core/Geometry/E3Geometry.c
Development/Source/Core/System/E3Group.c
Development/Source/Core/System/E3IO.c
Development/Source/Core/System/E3Light.c
Development/Source/Core/System/E3Main.c
Development/Source/Core/System/E3Math.c
Development/Source/Core/System/E3Pick.c
Development/Source/Core/System/E3Renderer.c
Development/Source/Core/System/E3Set.c
Development/Source/Core/System/E3Shader.c
Development/Source/Core/System/E3Storage.c
Development/Source/Core/System/E3String.c
Development/Source/Core/System/E3Style.c
Development/Source/Core/System/E3Transform.c
Development/Source/Core/System/E3View.c
Development/Source/Core/Glue/QD3DCamera.c
Development/Source/Core/Glue/QD3DController.c
Development/Source/Core/Glue/QD3DCustomElements.c
Development/Source/Core/Glue/QD3DDrawContext.c
Development/Source/Core/Glue/QD3DErrors.c
Development/Source/Core/Glue/QD3DExtension.c
Development/Source/Core/Glue/QD3DGeometry.c
Development/Source/Core/Glue/QD3DGroup.c
Development/Source/Core/Glue/QD3DIO.c
Development/Source/Core/Glue/QD3DLight.c
Development/Source/Core/Glue/QD3DMain.c
Development/Source/Core/Glue/QD3DMath.c
Development/Source/Core/Glue/QD3DPick.c
Development/Source/Core/Glue/QD3DRenderer.c
Development/Source/Core/Glue/QD3DSet.c
Development/Source/Core/Glue/QD3DShader.c
Development/Source/Core/Glue/QD3DStorage.c
Development/Source/Core/Glue/QD3DString.c
Development/Source/Core/Glue/QD3DStyle.c
Development/Source/Core/Glue/QD3DTransform.c
Development/Source/Core/Glue/QD3DView.c
Development/Source/Platform/Mac/E3MacDrawContext.c
Development/Source/Platform/Mac/E3MacStorage.c
Development/Source/Core/Support/E3Globals.c
Development/Source/Core/Support/E3ClassTree.c
Development/Source/Core/Support/E3ErrorManager.c
Development/Source/Platform/Mac/E3MacErrors.c
Development/Source/Core/Support/E3Utils.c
Development/Source/Core/Support/E3System.c
Development/Source/Platform/Mac/E3MacSystem.c
Development/Source/Core/Support/E3Compatibility.c
Development/Source/Core/Geometry/E3GeometryPoint.c
Development/Source/Core/Geometry/E3GeometryTriangle.c
Development/Source/Core/Geometry/E3GeometryLine.c
Development/Source/Core/Geometry/E3GeometryMarker.c
Development/Source/Core/Geometry/E3GeometryPixmapMarker.c
Development/Source/Core/Geometry/E3GeometryPolyLine.c
Development/Source/Core/Geometry/E3GeometryBox.c
Development/Source/Core/Geometry/E3GeometryGeneralPolygon.c
Development/Source/Core/Geometry/E3GeometryPolyhedron.c
Development/Source/Core/Geometry/E3GeometryTriGrid.c
Development/Source/Core/Geometry/E3GeometryTriMesh.c
Development/Source/Core/Geometry/E3GeometryCone.c
Development/Source/Core/Geometry/E3GeometryCylinder.c
Development/Source/Core/Geometry/E3GeometryDisk.c
Development/Source/Core/Geometry/E3GeometryEllipse.c
Development/Source/Core/Geometry/E3GeometryEllipsoid.c
Development/Source/Core/Geometry/E3GeometryMesh.c
Development/Source/Core/Geometry/E3GeometryNURBCurve.c
Development/Source/Core/Geometry/E3GeometryNURBPatch.c
Development/Source/Core/Geometry/E3GeometryTorus.c
Development/Source/Core/Geometry/E3GeometryPolygon.c
Development/Source/Core/System/E3IOData.c
Development/Source/FileFormats/E3IOFileFormat.c
Development/Source/Core/Support/E3HashTable.c
Development/Source/Renderers/Generic/GNGeometry.c
Development/Source/Renderers/Generic/GNRegister.c
Development/Source/Renderers/Generic/GNRenderer.c
Development/Source/Renderers/Common/GLCamera.c
Development/Source/Renderers/Common/GLDrawContext.c
Development/Source/Core/System/E3Texture.c
Development/Source/Renderers/Interactive/IRGeometry.c
Development/Source/Renderers/Interactive/IRRegister.c
Development/Source/Renderers/Interactive/IRRenderer.c
Development/Source/Renderers/Interactive/IRUpdate.c
Development/Source/Renderers/Interactive/IRLights.c
Development/Source/Renderers/Common/GLUtils.c
Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Geometry.c
Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Register.c
Development/Source/FileFormats/Writers/3DMF/E3FFW_3DMFBin_Writer.c
Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF.c
Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Bin.c
Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Geometry.c
Development/Source/FileFormats/Readers/3DMF/E3FFR_3DMF_Text.c
Development/Source/Core/Support/E3Pool.c
Development/Source/Core/Support/E3ArrayOrList.c
Development/Source/Core/Glue/QD3DMemory.c
Development/Source/Core/System/E3Memory.c
Development/Source/Core/Viewer/E3Viewer.c
Development/Source/Core/Viewer/E3ViewerOldAPIs.c
Development/Source/Core/Viewer/E3ViewerTools.c
Development/Source/Core/Glue/QD3DViewer.c
Development/Source/Core/Support/E3Tessellate.c
Development/Source/Renderers/Interactive/IRTransparent.c
Development/Source/Renderers/Interactive/IRGeometryTriMesh.c
Development/Source/Renderers/Interactive/IRTexture.c
Development/Source/Renderers/Interactive/IRTriBuffer.c
Development/Source/Renderers/Common/GLTextureManager.c
Development/Source/Core/Geometry/E3GeometryTriMeshOptimize.cpp
Development/Source/Renderers/Common/GLGPUSharing.cpp
Development/Source/Renderers/Common/GLTextureLoader.cpp
Development/Source/Renderers/Common/GLDisplayListManager.cpp
Development/Source/Renderers/Common/GLVBOManager.cpp
Development/Source/Renderers/MakeStrip/MakeStrip.cpp
Development/Source/Renderers/MakeStrip/StripMaker_FindAdjacencies.cpp
Development/Source/Renderers/MakeStrip/StripMaker_InitFaces.cpp
Development/Source/Renderers/MakeStrip/StripMaker_JoinStrips.cpp
Development/Source/Renderers/MakeStrip/StripMaker_MakeSimpleStrip.cpp
Development/Source/Renderers/OpenGL/QOClientStates.cpp
Development/Source/Renderers/OpenGL/QOGeometry.cpp
Development/Source/Renderers/OpenGL/QOLights.cpp
Development/Source/Renderers/OpenGL/QOMatrix.cpp
Development/Source/Renderers/OpenGL/QOOpaqueTriBuffer.cpp
Development/Source/Renderers/OpenGL/QORegister.cpp
Development/Source/Renderers/OpenGL/QORenderer.cpp
Development/Source/Renderers/OpenGL/QOStartAndEnd.cpp
Development/Source/Renderers/OpenGL/QOStatics.cpp
Development/Source/Renderers/OpenGL/QOTexture.cpp
Development/Source/Renderers/OpenGL/QOTransBuffer.cpp
Development/Source/Renderers/OpenGL/QOUpdate.cpp
Development/Source/Renderers/Common/OptimizedTriMeshElement.cpp
Development/Source/Renderers/OpenGL/QOGLShadingLanguage.cpp
Development/Source/Renderers/OpenGL/QOCalcTriMeshEdges.cpp
Development/Source/Renderers/OpenGL/QOShadowMarker.cpp
Development/Source/Renderers/HiddenLine/HiddenLine.cpp
Development/Source/Core/System/E3Math_Intersect.cpp
Development/Source/Renderers/Wireframe/WFRenderer.cpp
+131
View File
@@ -0,0 +1,131 @@
diff --git a/Development/Source/Core/Viewer/E3Viewer.c b/Development/Source/Core/Viewer/E3Viewer.c
index 8ecd30ba..77a95771 100644
--- a/Development/Source/Core/Viewer/E3Viewer.c
+++ b/Development/Source/Core/Viewer/E3Viewer.c
@@ -51,7 +51,7 @@
#if QUESA_UH_IN_FRAMEWORKS
#include <Carbon/Carbon.h>
#else
- #include <QuickDraw.h>
+ #include <Quickdraw.h>
#include <Appearance.h>
#include <Resources.h>
#include <ColorPicker.h>
diff --git a/Development/Source/Platform/Mac/E3MacDrawContext.c b/Development/Source/Platform/Mac/E3MacDrawContext.c
index c7f87bfd..119b904a 100644
--- a/Development/Source/Platform/Mac/E3MacDrawContext.c
+++ b/Development/Source/Platform/Mac/E3MacDrawContext.c
@@ -49,7 +49,7 @@
#include "E3DrawContext.h"
#if !QUESA_UH_IN_FRAMEWORKS
- #include <QuickDraw.h>
+ #include <Quickdraw.h>
#include <MacWindows.h>
#endif
diff --git a/Development/Source/Platform/Mac/E3MacQD3DViewer.h b/Development/Source/Platform/Mac/E3MacQD3DViewer.h
index 9f096efc..9662874e 100644
--- a/Development/Source/Platform/Mac/E3MacQD3DViewer.h
+++ b/Development/Source/Platform/Mac/E3MacQD3DViewer.h
@@ -85,7 +85,7 @@
#include <Icons.h>
#include <InternetConfig.h>
#include <Menus.h>
- #include <QuickDraw.h>
+ #include <Quickdraw.h>
#include <Resources.h>
#include <Scrap.h>
#include <Sound.h>
diff --git a/Development/Source/Platform/Mac/E3MacViewer.h b/Development/Source/Platform/Mac/E3MacViewer.h
index 9f096efc..9662874e 100644
--- a/Development/Source/Platform/Mac/E3MacViewer.h
+++ b/Development/Source/Platform/Mac/E3MacViewer.h
@@ -85,7 +85,7 @@
#include <Icons.h>
#include <InternetConfig.h>
#include <Menus.h>
- #include <QuickDraw.h>
+ #include <Quickdraw.h>
#include <Resources.h>
#include <Scrap.h>
#include <Sound.h>
diff --git a/Development/Source/Platform/Windows/E3WindowsViewer.h b/Development/Source/Platform/Windows/E3WindowsViewer.h
index 9f096efc..9662874e 100644
--- a/Development/Source/Platform/Windows/E3WindowsViewer.h
+++ b/Development/Source/Platform/Windows/E3WindowsViewer.h
@@ -85,7 +85,7 @@
#include <Icons.h>
#include <InternetConfig.h>
#include <Menus.h>
- #include <QuickDraw.h>
+ #include <Quickdraw.h>
#include <Resources.h>
#include <Scrap.h>
#include <Sound.h>
diff --git a/Development/Source/Renderers/Common/GLUtils.c b/Development/Source/Renderers/Common/GLUtils.c
index 14fdf0d8..06657623 100644
--- a/Development/Source/Renderers/Common/GLUtils.c
+++ b/Development/Source/Renderers/Common/GLUtils.c
@@ -55,6 +55,10 @@
#include <wingdi.h>
+#elif QUESA_OS_MACINTOSH && !QUESA_UH_IN_FRAMEWORKS && !TARGET_API_MAC_CARBON
+
+ #include <CodeFragments.h>
+
#elif QUESA_OS_MACINTOSH && !QUESA_UH_IN_FRAMEWORKS
#include <CFString.h>
@@ -499,6 +503,36 @@ void* GLGetProcAddress( const char* funcName )
return (void*)glXGetProcAddressARB( (const GLubyte*)funcName );
}
+#elif QUESA_OS_MACINTOSH && !QUESA_UH_IN_FRAMEWORKS && !TARGET_API_MAC_CARBON
+
+// Finds a function of OpenGLLibrary by name, through the Code Fragment
+// Manager. Gives NULL when the library or the function is not there.
+void* GLGetProcAddress( const char* funcName )
+{
+ static CFragConnectionID sConn = NULL;
+ static bool sTried = false;
+ if (!sTried)
+ {
+ sTried = true;
+ Ptr entry = NULL;
+ Str255 err;
+ if (GetSharedLibrary( "\pOpenGLLibrary", kPowerPCCFragArch, kReferenceCFrag,
+ &sConn, &entry, err ) != noErr)
+ sConn = NULL;
+ }
+ size_t len = (funcName != NULL) ? strlen( funcName ) : 0;
+ if ((sConn == NULL) || (len == 0) || (len > 255))
+ return NULL;
+ Str255 pName;
+ pName[0] = (unsigned char) len;
+ memcpy( pName + 1, funcName, len );
+ Ptr addr = NULL;
+ CFragSymbolClass symClass = 0;
+ if (FindSymbol( sConn, pName, &addr, &symClass ) != noErr)
+ return NULL;
+ return addr;
+}
+
#elif QUESA_OS_MACINTOSH && !QUESA_UH_IN_FRAMEWORKS
diff --git a/SDK/Includes/Quesa/Quesa.h b/SDK/Includes/Quesa/Quesa.h
index 6beb75ed..a659a39f 100644
--- a/SDK/Includes/Quesa/Quesa.h
+++ b/SDK/Includes/Quesa/Quesa.h
@@ -57,7 +57,8 @@
!defined(QUESA_OS_COCOA)
// Mac OS
- #if ((defined(__MWERKS__) && __dest_os == __mac_os) || defined(MPW_CPLUS) || defined(MPW_C))
+ #if ((defined(__MWERKS__) && __dest_os == __mac_os) || defined(MPW_CPLUS) || defined(MPW_C) || \
+ (defined(macintosh) && !defined(__MACH__)))
#ifndef QUESA_OS_MACINTOSH
#define QUESA_OS_MACINTOSH 1
#endif
+17
View File
@@ -0,0 +1,17 @@
/* aglRenderers.h - the renderer IDs of AGL, for AGL_RENDERER_ID in
* aglChoosePixelFormat and for aglDescribeRenderer. The values are those
* of the same renderers in CGL (kCGLRendererGenericID and
* kCGLRendererATIRage128ID).
*
* Part of mac-sdk.
* SPDX-License-Identifier: AGPL-3.0-only
*/
#ifndef _AGLRENDERERS_H
#define _AGLRENDERERS_H
/* Apple's software renderer. */
#define AGL_RENDERER_GENERIC_ID 0x00020200
/* The renderer of ATI's Rage 128 and later cards. */
#define AGL_RENDERER_ATI_ID 0x00021000
#endif /* _AGLRENDERERS_H */
+285
View File
@@ -0,0 +1,285 @@
/* CarbonAccessors.h - the Carbon accessor functions for programs that are
* not Carbon programs.
*
* Carbon hides the Toolbox records. A Carbon program uses functions such
* as GetPortBounds and GetWindowFromPort to read them. Apple gave the
* same functions to classic programs in CarbonAccessors.o. This header
* gives them as inline functions that read the records directly, so that
* code written for Carbon also compiles for the classic Mac OS.
*
* When TARGET_API_MAC_CARBON is not zero, this header gives nothing: the
* Toolbox headers declare the real functions.
*/
#ifndef __CARBONACCESSORS__
#define __CARBONACCESSORS__
#include "Multiverse.h"
#if !TARGET_API_MAC_CARBON
/* The QuickDraw globals (qd) are below the address in *CurrentA5:
* *CurrentA5 points at qd.thePort. These are the offsets of the other
* fields below thePort. */
#define CARBONACCESSORS_QD_RANDSEED 126
#define CARBONACCESSORS_QD_SCREENBITS 122
#define CARBONACCESSORS_QD_ARROW 108
#define CARBONACCESSORS_QD_DKGRAY 40
#define CARBONACCESSORS_QD_LTGRAY 32
#define CARBONACCESSORS_QD_GRAY 24
#define CARBONACCESSORS_QD_BLACK 16
#define CARBONACCESSORS_QD_WHITE 8
/* Gives the address of the field that is off bytes below qd.thePort. */
static __inline__ char *CarbonAccessorsQD(long off) {
return **(char ***)0x904 - off;
}
/* ---- QuickDraw ports ---- */
/* Gives the bounds (portRect) of a port. */
static __inline__ Rect *GetPortBounds(CGrafPtr p, Rect *r) {
*r = ((GrafPtr)p)->portRect;
return r;
}
/* Copies the visible region of a port into rgn, and gives rgn. */
static __inline__ RgnHandle GetPortVisibleRegion(CGrafPtr p, RgnHandle rgn) {
CopyRgn(((GrafPtr)p)->visRgn, rgn);
return rgn;
}
/* Copies the clip region of a port into rgn, and gives rgn. */
static __inline__ RgnHandle GetPortClipRegion(CGrafPtr p, RgnHandle rgn) {
CopyRgn(((GrafPtr)p)->clipRgn, rgn);
return rgn;
}
/* Gives the bit map of a port, to use as an argument of CopyBits. For a
* color port, this is the port's pixel map handle in the same place. */
static __inline__ const BitMap *GetPortBitMapForCopyBits(CGrafPtr p) {
return &((GrafPtr)p)->portBits;
}
/* Gives the pixel map of a color port. */
static __inline__ PixMapHandle GetPortPixMap(CGrafPtr p) {
return p->portPixMap;
}
/* Gives true if the port is a color port. */
static __inline__ Boolean IsPortColor(CGrafPtr p) {
return (p->portVersion & 0xC000) == 0xC000;
}
/* Gives the font of a port. */
static __inline__ short GetPortTextFont(CGrafPtr p) {
return ((GrafPtr)p)->txFont;
}
/* Gives the font size of a port. */
static __inline__ short GetPortTextSize(CGrafPtr p) {
return ((GrafPtr)p)->txSize;
}
/* Gives the text style of a port. */
static __inline__ Style GetPortTextFace(CGrafPtr p) {
return ((GrafPtr)p)->txFace;
}
/* Gives the text transfer mode of a port. */
static __inline__ short GetPortTextMode(CGrafPtr p) {
return ((GrafPtr)p)->txMode;
}
/* Gives the pen size of a port in *pt, and gives pt. */
static __inline__ Point *GetPortPenSize(CGrafPtr p, Point *pt) {
*pt = ((GrafPtr)p)->pnSize;
return pt;
}
/* Gives the pen location of a port in *pt, and gives pt. */
static __inline__ Point *GetPortPenLocation(CGrafPtr p, Point *pt) {
*pt = ((GrafPtr)p)->pnLoc;
return pt;
}
/* ---- QuickDraw globals ---- */
/* Gives the current port (qd.thePort). */
static __inline__ CGrafPtr GetQDGlobalsThePort(void) {
return *(CGrafPtr *)CarbonAccessorsQD(0);
}
/* Gives the screen bit map (qd.screenBits) in *bm, and gives bm. */
static __inline__ BitMap *GetQDGlobalsScreenBits(BitMap *bm) {
*bm = *(BitMap *)CarbonAccessorsQD(CARBONACCESSORS_QD_SCREENBITS);
return bm;
}
/* Gives the arrow cursor (qd.arrow) in *c, and gives c. */
static __inline__ Cursor *GetQDGlobalsArrow(Cursor *c) {
*c = *(Cursor *)CarbonAccessorsQD(CARBONACCESSORS_QD_ARROW);
return c;
}
/* Gives the dark gray pattern (qd.dkGray) in *pat, and gives pat. */
static __inline__ Pattern *GetQDGlobalsDarkGray(Pattern *pat) {
*pat = *(Pattern *)CarbonAccessorsQD(CARBONACCESSORS_QD_DKGRAY);
return pat;
}
/* Gives the light gray pattern (qd.ltGray) in *pat, and gives pat. */
static __inline__ Pattern *GetQDGlobalsLightGray(Pattern *pat) {
*pat = *(Pattern *)CarbonAccessorsQD(CARBONACCESSORS_QD_LTGRAY);
return pat;
}
/* Gives the gray pattern (qd.gray) in *pat, and gives pat. */
static __inline__ Pattern *GetQDGlobalsGray(Pattern *pat) {
*pat = *(Pattern *)CarbonAccessorsQD(CARBONACCESSORS_QD_GRAY);
return pat;
}
/* Gives the black pattern (qd.black) in *pat, and gives pat. */
static __inline__ Pattern *GetQDGlobalsBlack(Pattern *pat) {
*pat = *(Pattern *)CarbonAccessorsQD(CARBONACCESSORS_QD_BLACK);
return pat;
}
/* Gives the white pattern (qd.white) in *pat, and gives pat. */
static __inline__ Pattern *GetQDGlobalsWhite(Pattern *pat) {
*pat = *(Pattern *)CarbonAccessorsQD(CARBONACCESSORS_QD_WHITE);
return pat;
}
/* Gives the seed of Random (qd.randSeed). */
static __inline__ long GetQDGlobalsRandomSeed(void) {
return *(long *)CarbonAccessorsQD(CARBONACCESSORS_QD_RANDSEED);
}
/* Sets the seed of Random (qd.randSeed). */
static __inline__ void SetQDGlobalsRandomSeed(long seed) {
*(long *)CarbonAccessorsQD(CARBONACCESSORS_QD_RANDSEED) = seed;
}
/* ---- Windows ---- */
/* Gives the port of a window. A window record starts with its port. */
static __inline__ CGrafPtr GetWindowPort(WindowRef w) {
return (CGrafPtr)w;
}
/* Gives the window of a window's port. */
static __inline__ WindowRef GetWindowFromPort(CGrafPtr p) {
return (WindowRef)p;
}
/* Sets the kind of a window (windowKind). */
static __inline__ void SetWindowKind(WindowRef w, short kind) {
((WindowPeek)w)->windowKind = kind;
}
/* Gives true if the window is highlighted. */
static __inline__ Boolean IsWindowHilited(WindowRef w) {
return ((WindowPeek)w)->hilited != 0;
}
/* Gives true if the window is visible. */
static __inline__ Boolean IsWindowVisible(WindowRef w) {
return ((WindowPeek)w)->visible != 0;
}
/* Gives the frontmost window in the window list (WindowList). */
static __inline__ WindowRef GetWindowList(void) {
return (WindowRef)LMGetWindowList();
}
/* Gives the window after w in the window list. */
static __inline__ WindowRef GetNextWindow(WindowRef w) {
return (WindowRef)((WindowPeek)w)->nextWindow;
}
/* ---- Menus ---- */
/* Gives the ID of a menu. */
static __inline__ short GetMenuID(MenuRef m) {
return (**m).menuID;
}
/* Sets the ID of a menu. */
static __inline__ void SetMenuID(MenuRef m, short id) {
(**m).menuID = id;
}
/* Gives the width of a menu. */
static __inline__ short GetMenuWidth(MenuRef m) {
return (**m).menuWidth;
}
/* Gives the height of a menu. */
static __inline__ short GetMenuHeight(MenuRef m) {
return (**m).menuHeight;
}
/* Gives the number of items in a menu. */
static __inline__ short CountMenuItems(MenuRef m) {
return CountMItems(m);
}
/* ---- Dialogs ---- */
/* Gives the window of a dialog. A dialog record starts with its window. */
static __inline__ WindowRef GetDialogWindow(DialogRef d) {
return (WindowRef)d;
}
/* Gives the port of a dialog. */
static __inline__ CGrafPtr GetDialogPort(DialogRef d) {
return (CGrafPtr)d;
}
/* Gives the dialog of a dialog's window. */
static __inline__ DialogRef GetDialogFromWindow(WindowRef w) {
return (DialogRef)w;
}
/* Gives the TextEdit record of a dialog. */
static __inline__ TEHandle GetDialogTextEditHandle(DialogRef d) {
return ((DialogPeek)d)->textH;
}
/* Gives the item that has the keyboard focus (editField + 1). */
static __inline__ short GetDialogKeyboardFocusItem(DialogRef d) {
return ((DialogPeek)d)->editField + 1;
}
/* ---- Controls ---- */
/* Gives the bounds of a control in *r, and gives r. */
static __inline__ Rect *GetControlBounds(ControlHandle c, Rect *r) {
*r = (**c).contrlRect;
return r;
}
/* Sets the bounds of a control. It does not draw the control again. */
static __inline__ void SetControlBounds(ControlHandle c, const Rect *r) {
(**c).contrlRect = *r;
}
/* Gives the window of a control. */
static __inline__ WindowRef GetControlOwner(ControlHandle c) {
return (WindowRef)(**c).contrlOwner;
}
/* Gives the highlight state of a control (contrlHilite). */
static __inline__ unsigned short GetControlHilite(ControlHandle c) {
return (**c).contrlHilite;
}
/* Gives true if a control is highlighted (a part, not 0 or 255). */
static __inline__ Boolean IsControlHilited(ControlHandle c) {
return (**c).contrlHilite != 0 && (**c).contrlHilite != 255;
}
#endif /* !TARGET_API_MAC_CARBON */
#endif /* __CARBONACCESSORS__ */
+2
View File
@@ -0,0 +1,2 @@
/* ColorPicker.h: generated by tools/gen-headers.py. */
#include "Multiverse.h"
+4
View File
@@ -95,5 +95,9 @@
#include "mv/URLAccess.h"
#include "mv/UnicodeConverter.h"
#ifdef __cplusplus
extern "C" QDGlobals qd;
#else
extern QDGlobals qd;
#endif
#endif
+4
View File
@@ -0,0 +1,4 @@
/* agl.h - the name that Apple's OpenGL SDK for the classic Mac OS used.
* Part of mac-sdk.
* SPDX-License-Identifier: AGPL-3.0-only */
#include <AGL/agl.h>
+4
View File
@@ -0,0 +1,4 @@
/* aglRenderers.h - the name that Apple's OpenGL SDK for the classic
* Mac OS used. Part of mac-sdk.
* SPDX-License-Identifier: AGPL-3.0-only */
#include <AGL/aglRenderers.h>
+4
View File
@@ -0,0 +1,4 @@
/* gl.h - the name that Apple's OpenGL SDK for the classic Mac OS used.
* Part of mac-sdk.
* SPDX-License-Identifier: AGPL-3.0-only */
#include <GL/gl.h>
+4
View File
@@ -0,0 +1,4 @@
/* glext.h - the name that Apple's OpenGL SDK for the classic Mac OS used.
* Part of mac-sdk.
* SPDX-License-Identifier: AGPL-3.0-only */
#include <GL/glext.h>
+4
View File
@@ -0,0 +1,4 @@
/* glu.h - the name that Apple's OpenGL SDK for the classic Mac OS used.
* Part of mac-sdk.
* SPDX-License-Identifier: AGPL-3.0-only */
#include <GL/glu.h>
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ADBDataBlock ADBDataBlock;
struct ADBDataBlock {
SignedByte devType;
@@ -119,6 +124,10 @@ static __inline__ OSErr ADBOp(Ptr data, ProcPtr procp, Ptr buffer, INTEGER comma
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// Connection states (TRCCB.state)
enum {
sListening = 1,
@@ -184,6 +189,10 @@ union {
typedef DSPParamBlock *DSPPBPtr;
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+13
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef ProcPtr AliasFilterUPP;
typedef Handle AliasHandle;
@@ -215,6 +220,14 @@ enum {
kDontCreateFolder = 0,
};
enum {
kResolveAliasFileNoUI = 1, /* ResolveAliasFileWithMountFlags: do not show a dialog to mount a volume */
};
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -18,6 +18,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// Appearance Manager (Mac OS 8). Gestalt selectors.
enum {
gestaltAppearanceAttr = 'appr',
@@ -931,6 +936,10 @@ pascal OSStatus SetTheme(Collection ioCollection);
pascal OSStatus InstallWindowContentPaintProc(WindowRef window, WindowPaintUPP paintProc, WindowPaintProcOptions options, void *refCon);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef long AEEventClass;
typedef long AEEventID;
@@ -555,6 +560,10 @@ typedef IdleUPP AEIdleUPP;
typedef EventFilterUPP AEFilterUPP;
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -14,6 +14,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// AppleTalk IMII-305 (true-b);
#define LMGetPortBUse() (*(Byte *)0x00000291)
#define LMSetPortBUse(val) ((*(Byte *)0x00000291) = (val))
@@ -1363,6 +1368,10 @@ static __inline__ OSErr LAPRmvATQ(ATQEntryPtr theATQEntry) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
#if TARGET_CPU_68K
static __inline__ __attribute__((__always_inline__)) void NumToString(LONGINT l, StringPtr s) {
register LONGINT _l __asm__("d0") = l;
@@ -38,6 +43,10 @@ static __inline__ __attribute__((__always_inline__)) void StringToNum(ConstStrin
pascal void StringToNum(ConstStringPtr s, LONGINT *lp);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+10 -1
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
minSeed = 1024,
};
@@ -519,7 +524,7 @@ MAC_SINCE(0x0200, "2.0") pascal SmallFract Fix2SmallFract(Fixed arg0) M68K_INLIN
MAC_SINCE(0x0200, "2.0") pascal Fixed SmallFract2Fix(SmallFract arg0) M68K_INLINE(0x3F3C, 0x0002, 0xA82E);
MAC_SINCE(0x0200, "2.0") pascal Boolean GetColor(Point arg0, Str255 arg1, RGBColor *arg2, RGBColor *arg3) M68K_INLINE(0x3F3C, 0x0009, 0xA82E);
MAC_SINCE(0x0200, "2.0") pascal Boolean GetColor(Point arg0, ConstStr255Param arg1, RGBColor *arg2, RGBColor *arg3) M68K_INLINE(0x3F3C, 0x0009, 0xA82E);
enum { _GetCTable = 0xAA18 };
MAC_SINCE(0x0500, "5.0") MAC_COLOR_QD pascal CTabHandle GetCTable(INTEGER arg0) M68K_INLINE(0xAA18);
@@ -711,6 +716,10 @@ static __inline__ void ScreenRes(INTEGER *arg0, INTEGER *arg1) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -31,6 +31,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// C-string forms of Toolbox calls (C calling convention; they take C
// strings, and Points by address). On 68k they need MPW-style glue.
#if TARGET_CPU_68K
@@ -1461,6 +1466,10 @@ static __inline__ void P2CStr(StringPtr pString) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -14,6 +14,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
curCTBUVersion = 2,
};
@@ -169,6 +174,10 @@ MAC_SINCE_GESTALT(0x0701, "7.0.1", "'ctbv'") static __inline__ __attribute__((__
MAC_SINCE_GESTALT(0x0701, "7.0.1", "'ctbv'") pascal INTEGER CustomNBP(Point where, ConstStr255Param prompt, INTEGER numTypes, NLType typeList, NameFilterUPP nameFilter, ZoneFilterUPP zoneFilter, DlgHookUPP hook, long userData, INTEGER dialogID, ModalFilterUPP filter, NBPReply *theReply);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+79 -1
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct cfrg_resource_t cfrg_resource_t;
struct cfrg_resource_t {
unsigned long reserved0;
@@ -72,6 +77,10 @@ enum {
kLoadNewCopy = 5,
};
enum {
kUnresolvedCFragSymbolAddress = 0, /* the address of a weak import that the Code Fragment Manager did not find */
};
typedef unsigned long LoadFlags;
typedef struct MemFragment MemFragment;
@@ -126,9 +135,74 @@ typedef struct CFragClosure CFragClosure;
typedef CFragClosure *CFragClosureID;
/* The Code Fragment Manager's newer names (CodeFragments.h of
Universal Interfaces 3), and the block that a fragment's
initialization function gets. */
typedef ConnectionID CFragConnectionID;
typedef uint8_t CFragSymbolClass;
typedef OSType CFragArchitecture;
typedef uint32_t CFragLoadOptions;
enum {
kPowerPCCFragArch = 'pwpc',
kMotorola68KCFragArch = 'm68k',
kAnyCFragArch = 0x3F3F3F3F,
kLoadCFrag = 1,
kFindCFrag = 2,
kDataCFragSymbol = 1,
kCodeCFragSymbol = 0,
kTVectorCFragSymbol = 2,
kTOCCFragSymbol = 3,
kGlueCFragSymbol = 4
};
typedef struct OpaqueCFragContextID *CFragContextID;
enum {
kMemoryCFragLocator = 0,
kDataForkCFragLocator = 1,
kResourceCFragLocator = 2,
kNamedFragmentCFragLocator = 4,
kCFragGoesToEOF = 0,
kPrivateCFragCopy = 5
};
typedef struct CFragSystem7MemoryLocator {
void *address;
uint32_t length;
Boolean inPlace;
uint8_t reservedA;
uint16_t reservedB;
} CFragSystem7MemoryLocator;
typedef struct CFragSystem7DiskFlatLocator {
struct FSSpec *fileSpec;
uint32_t offset;
uint32_t length;
} CFragSystem7DiskFlatLocator;
typedef struct CFragSystem7SegmentedLocator {
struct FSSpec *fileSpec;
uint32_t rsrcType;
int16_t rsrcID;
uint16_t reservedA;
} CFragSystem7SegmentedLocator;
typedef struct CFragSystem7Locator {
int32_t where;
union {
CFragSystem7DiskFlatLocator onDisk;
CFragSystem7MemoryLocator inMem;
CFragSystem7SegmentedLocator inSegs;
} u;
} CFragSystem7Locator;
typedef struct CFragSystem7InitBlock {
CFragContextID contextID;
CFragClosureID closureID;
CFragConnectionID connectionID;
CFragSystem7Locator fragLocator;
unsigned char *libName;
uint32_t reservedA;
} CFragSystem7InitBlock;
typedef CFragSystem7InitBlock CFragInitBlock;
typedef CFragInitBlock *CFragInitBlockPtr;
enum { _CodeFragmentDispatch = 0xAA5A };
MAC_SINCE_GESTALT(0x0761, "7.6.1", "'cfrg'") pascal OSErr GetDiskFragment(FSSpecPtr fsp, LONGINT offset, LONGINT length, ConstStr63Param fragname, LoadFlags flags, ConnectionID *connp, Ptr *mainAddrp, Str255 errname) M68K_INLINE(0x3F3C, 0x0002, 0xAA5A);
MAC_SINCE_GESTALT(0x0761, "7.6.1", "'cfrg'") pascal OSErr GetDiskFragment(const FSSpec *fsp, LONGINT offset, LONGINT length, ConstStr63Param fragname, LoadFlags flags, ConnectionID *connp, Ptr *mainAddrp, Str255 errname) M68K_INLINE(0x3F3C, 0x0002, 0xAA5A);
typedef uint8_t SymClass;
@@ -144,6 +218,10 @@ MAC_SINCE_GESTALT(0x0761, "7.6.1", "'cfrg'") pascal OSErr CountSymbols(Connectio
MAC_SINCE_GESTALT(0x0761, "7.6.1", "'cfrg'") pascal OSErr GetIndSymbol(ConnectionID id, LONGINT index, Str255 name, Ptr *addrp, SymClass *classp) M68K_INLINE(0x3F3C, 0x0007, 0xAA5A);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// Collection Manager: an ordered list of tagged items, used by the Window and Appearance Managers to store settings.
typedef struct OpaqueCollection *Collection;
@@ -147,6 +152,10 @@ MAC_SINCE(0x0810, "8.1") pascal OSErr FlattenCollectionToHdl(Collection aCollect
MAC_SINCE(0x0810, "8.1") pascal OSErr UnflattenCollectionFromHdl(Collection aCollection, Handle flattened) M68K_INLINE(0x7026, 0xABF6);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct CRMRec CRMRec;
struct CRMRec {
QElemPtr qLink;
@@ -418,6 +423,10 @@ MAC_SINCE_GESTALT(0x0701, "7.0.1", "'ctbv'") static __inline__ __attribute__((__
MAC_SINCE_GESTALT(0x0701, "7.0.1", "'ctbv'") pascal OSErr CRMReleaseRF(INTEGER refNum);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ComponentRecord ComponentRecord;
struct ComponentRecord {
LONGINT data[1];
@@ -299,6 +304,10 @@ static __inline__ long CallComponentFunctionWithStorageProcInfo(Handle storage,
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
curCMVersion = 2,
curConnEnvRecVers = 0,
@@ -966,6 +971,10 @@ MAC_SINCE_GESTALT(0x0701, "7.0.1", "'ctbv'") static __inline__ __attribute__((__
MAC_SINCE_GESTALT(0x0701, "7.0.1", "'ctbv'") pascal INTEGER CMGetCMVersion(void);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -16,6 +16,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// Contextual Menu Manager: what ContextualMenuSelect returns, and help types.
enum {
gestaltContextualMenuAttr = 'cmnu',
@@ -40,6 +45,10 @@ MAC_SINCE_GESTALT(0x0921, "9.2.1", "'cmnu'") pascal OSStatus ContextualMenuSelec
MAC_SINCE_GESTALT(0x0921, "9.2.1", "'cmnu'") pascal OSStatus ProcessIsContextualMenuClient(ProcessSerialNumber *inPSN, Boolean *outIsClient) M68K_INLINE(0x7004, 0xAA72);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -18,6 +18,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
pushButProc = 0,
checkBoxProc = 1,
@@ -1152,6 +1157,10 @@ static __inline__ OSErr SetDisclosureTriangleLastValue(ControlRef inTabControl,
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// The record's fields are not declared here yet.
typedef struct CursorDevice *CursorDevicePtr;
@@ -84,6 +89,10 @@ MAC_SINCE(0x0710, "7.1") pascal OSErr CursorDeviceNewDevice(CursorDevicePtr *our
MAC_SINCE(0x0710, "7.1") pascal OSErr CursorDeviceDisposeDevice(CursorDevicePtr ourDevice) M68K_INLINE(0x700D, 0xAADB);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef OSType DBType;
typedef struct DBAsyncParamBlockRec DBAsyncParamBlockRec;
@@ -107,6 +112,10 @@ MAC_SINCE(0x0701, "7.0.1") pascal OSErr DBRemoveResultHandler(DBType dataType) M
MAC_SINCE(0x0701, "7.0.1") pascal OSErr DBGetResultHandler(DBType dataType, DBResultHandlerUPP *theHandler, Boolean getSysHandler) M68K_INLINE(0x303C, 0x0516, 0xA82F);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
undoCmd = 0,
cutCmd = 2,
@@ -57,6 +62,10 @@ pascal Boolean SystemEvent(EventRecord *evp) M68K_INLINE(0xA9B2);
enum { _SystemMenu = 0xA9B5 };
pascal void SystemMenu(LONGINT menu) M68K_INLINE(0xA9B5);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -14,6 +14,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct DCtlEntry DCtlEntry;
typedef DCtlEntry *DCtlPtr;
@@ -417,6 +422,10 @@ static __inline__ void AddDrive(INTEGER drvrRefNum, INTEGER drvNum, DrvQElPtr qE
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -17,6 +17,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
ctrlItem = 4,
btnCtrl = 0,
@@ -539,6 +544,10 @@ static __inline__ Boolean StdFilterProc(DialogPtr theDialog, EventRecord *event,
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef INTEGER DictionaryDataInsertMode;
enum {
@@ -62,6 +67,10 @@ MAC_SINCE_GESTALT(0x0710, "7.1", "'dict'") MAC_COLOR_QD pascal OSErr InitializeD
MAC_SINCE_GESTALT(0x0710, "7.1", "'dict'") MAC_COLOR_QD pascal OSErr GetDictionaryInformation(SInt32 dictionaryReference, DictionaryInformation *theDictionaryInformation) M68K_INLINE(0x303C, 0x0407, 0xAA53);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -14,6 +14,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
firstDskErr = -84,
sectNFErr = -81,
@@ -106,6 +111,10 @@ static __inline__ OSErr DriveStatus(INTEGER dn, DrvSts *statp) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum { _Pack2 = 0xA9E9 };
pascal void DILoad(void) M68K_INLINE(0x3F3C, 0x0002, 0xA9E9);
@@ -25,6 +30,10 @@ pascal OSErr DIVerify(INTEGER dn) M68K_INLINE(0x3F3C, 0x0008, 0xA9E9);
pascal OSErr DIZero(INTEGER dn, StringPtr vname) M68K_INLINE(0x3F3C, 0x000A, 0xA9E9);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -17,6 +17,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef pascal void (*DMNotificationProcPtr)(AppleEvent *theEvent);
#if TARGET_RT_MAC_CFM
typedef UniversalProcPtr DMNotificationUPP;
@@ -236,6 +241,10 @@ MAC_SINCE(0x0761, "7.6.1") pascal OSErr DMGetEnableByAVID(AVIDType theAVID, Bool
MAC_SINCE(0x0761, "7.6.1") pascal OSErr DMSetEnableByAVID(AVIDType theAVID, Boolean doEnable, Handle displayState) M68K_INLINE(0x303C, 0x053D, 0xABEB);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -16,6 +16,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// A drag. Opaque: allocated by NewDrag, or handed to a handler by
// the Drag Manager.
typedef Ptr DragRef;
@@ -296,6 +301,10 @@ MAC_SINCE_GESTALT(0x0761, "7.6.1", "'drag'") pascal OSErr SetDragImage(DragRef t
MAC_SINCE_GESTALT(0x0761, "7.6.1", "'drag'") pascal OSErr ChangeDragBehaviors(DragRef theDrag, DragBehaviors inBehaviorsToSet, DragBehaviors inBehaviorsToClear) M68K_INLINE(0x7028, 0xABED);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// The low 16 bits are an OSErr; the high 16 are its sign extension.
typedef SInt32 OSStatus;
@@ -380,6 +385,10 @@ struct DriverDescription {
typedef DriverDescription *DriverDescriptionPtr;
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -14,6 +14,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
ENetSetGeneral = 253,
ENetGetInfo = 252,
@@ -174,6 +179,10 @@ static __inline__ OSErr EDelMulti(EParamBlkPtr thePBptr, Boolean async) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef long TimeStamp;
typedef Handle EditionRefNum;
@@ -241,6 +246,10 @@ MAC_SINCE_GESTALT(0x0701, "7.0.1", "'edtn'") pascal OSErr CallEditionOpenerProc(
MAC_SINCE_GESTALT(0x0701, "7.0.1", "'edtn'") pascal OSErr CallFormatIOProc(FormatIOVerb selector, FormatIOParamBlock *param_block, FormatIOUPP proc) M68K_INLINE(0x303C, 0x0530, 0xA82D);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+33
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
nullEvent = 0,
mouseDown = 1,
@@ -91,6 +96,34 @@ struct EventRecord {
// A set of event kinds, one bit each (everyEvent and friends).
typedef UInt16 EventMask;
enum {
kNullCharCode = 0,
kHomeCharCode = 1,
kEnterCharCode = 3,
kEndCharCode = 4,
kHelpCharCode = 5,
kBellCharCode = 7,
kBackspaceCharCode = 8,
kTabCharCode = 9,
kLineFeedCharCode = 10,
kPageUpCharCode = 11,
kPageDownCharCode = 12,
kReturnCharCode = 13,
kFunctionKeyCharCode = 16,
kEscapeCharCode = 27,
kClearCharCode = 27,
kLeftArrowCharCode = 28,
kRightArrowCharCode = 29,
kUpArrowCharCode = 30,
kDownArrowCharCode = 31,
kSpaceCharCode = 32,
kDeleteCharCode = 127,
};
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,10 +12,19 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// Published to the guest through the table at low-memory address 0x58,
// which Executor fills in by hand; this is not a trap.
pascal OSErr ExecutorUnixMount(CInfoPBRec *cpbp) M68K_INLINE(0x2078, 0x0058, 0x2068, 0x0020, 0x4E90);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
fOnDesk = 1,
fHasBundle = 8192,
@@ -5415,6 +5420,10 @@ static __inline__ OSErr FSGetResourceForkName(HFSUniStr255 *resourceForkName) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -17,6 +17,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
curFTVersion = 2,
};
@@ -688,6 +693,10 @@ MAC_SINCE_GESTALT(0x0701, "7.0.1", "'ctbv'") static __inline__ __attribute__((__
MAC_SINCE_GESTALT(0x0701, "7.0.1", "'ctbv'") pascal void FTGetErrorString(FTHandle hFT, INTEGER id, Str255 errMsg);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct DTPBRec DTPBRec;
struct DTPBRec {
QElemPtr qLink;
@@ -437,6 +442,10 @@ MAC_SINCE(0x0070, "0.7") static __inline__ __attribute__((__always_inline__)) OS
MAC_SINCE(0x0070, "0.7") pascal OSErr PBDTDeleteAsync(DTPBPtr dtp);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
systemFont = 0,
applFont = 1,
@@ -355,6 +360,10 @@ pascal void QDTextBounds(INTEGER byteCount, const void *textAddr, Rect *bounds)
pascal OSErr FetchFontInfo(SInt16 fontID, SInt16 fontSize, SInt16 fontStyle, FontInfo *info) M68K_INLINE(0x7014, 0xA854);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
gestaltPhysicalRAMSize = 'ram ',
gestaltAddressingModeAttr = 'addr',
@@ -282,6 +287,10 @@ enum {
gestaltHasHFSPlusAPIs = 12,
};
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -15,6 +15,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct HMStringResType HMStringResType;
struct HMStringResType {
INTEGER hmmResID;
@@ -95,6 +100,10 @@ MAC_SINCE_GESTALT(0x0701, "7.0.1", "'help'") pascal OSErr HMExtractHelpMsg(ResTy
MAC_SINCE_GESTALT(0x0701, "7.0.1", "'help'") pascal OSErr HMGetIndHelpMsg(ResType type, INTEGER resid, INTEGER msg, INTEGER state, LONGINT *options, Point tip, Rect *altrectp, INTEGER *theprocp, INTEGER *variantp, HMMessageRecord *helpmsgp, INTEGER *count) M68K_INLINE(0x303C, 0x1306, 0xA830);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
large1BitMask = 'ICN#',
large4BitData = 'icl4',
@@ -418,6 +423,10 @@ enum {
kAlignNone = 0,
};
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
currSymLead = 16,
currNegSym = 32,
@@ -210,6 +215,10 @@ static __inline__ INTEGER IUEqualString(ConstStringPtr str1, ConstStringPtr str2
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -14,6 +14,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// Keychain Manager (Mac OS 9; Keychain 1.0 was an extension for 8.6).
typedef struct OpaqueKCRef *KCRef;
@@ -281,6 +286,10 @@ pascal OSStatus KCFindNextItem(KCSearchRef search, KCItemRef *item);
pascal OSStatus KCReleaseSearch(KCSearchRef *search);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef Point Cell;
typedef Byte DataArray[32001];
@@ -168,6 +173,10 @@ MAC_SINCE(0x0100, "1.0") pascal void LCellSize(Point csize, ListHandle list) M68
MAC_SINCE(0x0100, "1.0") pascal Boolean LGetSelect(Boolean next, Cell *cellp, ListHandle list) M68K_INLINE(0x3F3C, 0x003C, 0xA9E7);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -10,6 +10,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// Declarations of low memory globals which haven't been put anywhere else
// yet follow. Whenever a low memory global clearly belongs to one manager/module,
// put it should live in the appropriate header.
@@ -164,6 +169,10 @@
#define LMGetABusGlobals() (*(Ptr *)0x000002D8)
#define LMSetABusGlobals(val) ((*(Ptr *)0x000002D8) = (val))
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct MIDIPacket MIDIPacket;
struct MIDIPacket {
uint8_t flags;
@@ -179,6 +184,10 @@ MAC_SINCE(0x0608, "6.0.8") pascal void MIDISetRunRate(INTEGER refnum, INTEGER ra
MAC_SINCE(0x0608, "6.0.8") pascal Handle MIDIGetClientIcon(OSType clientID) M68K_INLINE(0x203C, 0x009C, 0x0004, 0xA800);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// IPv4 address. Numeric value; guest byte order (big-endian) is
// identical to network byte order.
typedef ULONGINT ip_addr;
@@ -320,6 +325,10 @@ struct GetAddrParamBlock {
ip_addr ourNetMask;
};
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -10,6 +10,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef int16_t INTEGER;
typedef long LONGINT;
@@ -181,6 +186,10 @@ typedef ConstStringPtr ConstStr15Param;
typedef Byte Str27[28];
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
memFullErr = -108,
memLockedErr = -117,
@@ -1419,6 +1424,10 @@ static __inline__ OSErr GetPhysical(LogicalToPhysicalTable *addresses, unsigned
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+13
View File
@@ -14,6 +14,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
noMark = 0,
};
@@ -526,6 +531,10 @@ pascal OSStatus InsertMenuItemText(MenuRef menu, ConstStr255Param inString, UInt
pascal OSStatus AppendMenuItemText(MenuRef menu, ConstStr255Param inString);
#endif
enum {
hierMenu = -1, /* InsertMenu's beforeID for a submenu or a pop-up menu */
};
#if TARGET_CPU_68K
#if TARGET_API_MAC_CARBON
static __inline__ void EnableMenuItem(MenuHandle mh, INTEGER item) {
@@ -541,6 +550,10 @@ static __inline__ void DisableMenuItem(MenuHandle mh, INTEGER item) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef uint8_t ISAType;
typedef uint16_t CallingConventionType;
@@ -145,6 +150,10 @@ LONGINT CallUniversalProc(UniversalProcPtr theProcPtr, ProcInfoType procInfo, ..
long CallOSTrapUniversalProc(UniversalProcPtr theProc, ProcInfoType procInfo, ...);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// Multiprocessing Services 2.x (MPLibrary, Mac OS 8.6 to 9.2): preemptive tasks on PowerPC.
typedef struct OpaqueMPOpaqueID *MPOpaqueID;
@@ -360,6 +365,10 @@ Boolean _MPIsFullyInitialized(void);
Duration AbsoluteToDuration(AbsoluteTime absoluteTime);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// Identifies one entry in the Name Registry. Opaque: copy the whole
// structure, and dispose of IDs the Registry hands out with
// RegistryEntryIDDispose.
@@ -75,6 +80,10 @@ pascal OSStatus RegistryPropertyGet(const RegEntryID *entryID, const RegProperty
pascal OSStatus RegistryPropertySet(const RegEntryID *entryID, const RegPropertyName *propertyName, const void *propertyValue, RegPropertyValueSize propertySize);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -15,6 +15,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned long NavActionState;
typedef long NavCustomControlMessage;
@@ -261,6 +266,10 @@ pascal OSErr NavCreatePreview(AEDesc *theObject, OSType previewDataType, const v
pascal OSErr NavCustomControl(NavContext context, NavCustomControlMessage selector, void *parms);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct NMRec NMRec;
struct NMRec {
QElemPtr qLink;
@@ -60,6 +65,10 @@ MAC_SINCE(0x0600, "6.0") static __inline__ __attribute__((__always_inline__)) OS
MAC_SINCE(0x0600, "6.0") pascal OSErr NMRemove(NMRecPtr nmptr);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
evtNotEnb = 1,
};
@@ -237,6 +242,10 @@ static __inline__ QHdrPtr GetEvQHdr(void) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -16,6 +16,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
macXLMachine = 0,
macMachine = 1,
@@ -1163,6 +1168,10 @@ static __inline__ UniversalProcPtr* GetTrapVector(uint16_t trapNumber) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// configAddr is typed as an address but carries a register offset in
// configuration space, 0 to 255. The word and long routines swap
// bytes, so values arrive as they appear on the bus.
@@ -28,6 +33,10 @@ pascal OSErr ExpMgrConfigWriteWord(RegEntryIDPtr node, LogicalAddress configAddr
pascal OSErr ExpMgrConfigWriteLong(RegEntryIDPtr node, LogicalAddress configAddr, UInt32 value);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
kPEFTag1 = 'Joy!',
kPEFTag2 = 'peff',
@@ -175,6 +180,10 @@ enum {
#define PEFRelocComposeLgByImport_2nd(fullIndex) ((uint16_t) ((uint32_t)(fullIndex)))
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef int16_t PPCPortKinds;
typedef int16_t PPCLocationKind;
@@ -631,6 +636,10 @@ MAC_SINCE_GESTALT(0x0700, "7.0", "'ppc '") static __inline__ __attribute__((__al
MAC_SINCE_GESTALT(0x0700, "7.0", "'ppc '") pascal OSErr PPCKillAsync(void *pb);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
dskInit = 2,
stdFile = 3,
@@ -30,6 +35,10 @@ pascal void InitPack(INTEGER packid) M68K_INLINE(0xA9E5);
enum { _InitAllPacks = 0xA9E6 };
pascal void InitAllPacks(void) M68K_INLINE(0xA9E6);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef UniversalProcPtr SleepQUPP;
typedef struct SleepQRec SleepQRec;
@@ -953,6 +958,10 @@ static __inline__ OSErr DisableWUTime(void) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
bDraftLoop = 0,
bSpoolLoop = 1,
@@ -230,6 +235,10 @@ MAC_SINCE(0x0200, "2.0") pascal void PrPurge(void) M68K_INLINE(0x2F3C, 0xA800, 0
MAC_SINCE(0x0200, "2.0") pascal void PrNoPurge(void) M68K_INLINE(0x2F3C, 0xB000, 0x0000, 0xA8FD);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef INTEGER LaunchFlags;
typedef struct ProcessSerialNumber ProcessSerialNumber;
@@ -147,6 +152,10 @@ MAC_SINCE(0x0700, "7.0") pascal OSErr GetFrontProcess(ProcessSerialNumber *PSN)
pascal OSErr KillProcess(const ProcessSerialNumber *inProcess);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+15 -6
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// number of bytes InitGraf needs
enum {
grafSize = 206,
@@ -745,7 +750,7 @@ typedef QDGlobals *QDGlobalsPtr;
#define LMSetPortList(val) ((*(Handle *)0x00000D66) = (val))
enum { _CopyBits = 0xA8EC };
pascal void CopyBits(BitMap *src_bitmap, BitMap *dst_bitmap, const Rect *src_rect, const Rect *dst_rect, INTEGER mode, RgnHandle mask) M68K_INLINE(0xA8EC);
pascal void CopyBits(const BitMap *src_bitmap, const BitMap *dst_bitmap, const Rect *src_rect, const Rect *dst_rect, INTEGER mode, RgnHandle mask) M68K_INLINE(0xA8EC);
enum { _ScrollRect = 0xA8EF };
pascal void ScrollRect(Rect *rp, INTEGER dh, INTEGER dv, RgnHandle updatergn) M68K_INLINE(0xA8EF);
@@ -829,7 +834,7 @@ enum { _CalcMask = 0xA838 };
MAC_SINCE(0x0070, "0.7") pascal void CalcMask(Ptr srcp, Ptr dstp, INTEGER srcr, INTEGER dstr, INTEGER height, INTEGER width) M68K_INLINE(0xA838);
enum { _CopyMask = 0xA817 };
MAC_SINCE(0x0070, "0.7") pascal void CopyMask(BitMap *srcbp, BitMap *mskbp, BitMap *dstbp, const Rect *srcrp, const Rect *mskrp, const Rect *dstrp) M68K_INLINE(0xA817);
MAC_SINCE(0x0070, "0.7") pascal void CopyMask(const BitMap *srcbp, const BitMap *mskbp, const BitMap *dstbp, const Rect *srcrp, const Rect *mskrp, const Rect *dstrp) M68K_INLINE(0xA817);
enum { _GetMaskTable = 0xA836 };
MAC_SINCE(0x0070, "0.7") pascal INTEGER* GetMaskTable(void) M68K_INLINE(0xA836);
@@ -1216,7 +1221,7 @@ enum { _CalcCMask = 0xAA4F };
MAC_SINCE(0x0500, "5.0") MAC_COLOR_QD pascal void CalcCMask(BitMap *srcbp, BitMap *dstbp, const Rect *srcrp, const Rect *dstrp, RGBColor *seedrgbp, ProcPtr matchprocp, LONGINT matchdata) M68K_INLINE(0xAA4F);
enum { _CopyDeepMask = 0xAA51 };
MAC_SINCE(0x0700, "7.0") MAC_COLOR_QD pascal void CopyDeepMask(BitMap *srcBits, BitMap *maskBits, BitMap *dstBits, const Rect *srcRect, const Rect *maskRect, const Rect *dstRect, INTEGER mode, RgnHandle maskRgn) M68K_INLINE(0xAA51);
MAC_SINCE(0x0700, "7.0") MAC_COLOR_QD pascal void CopyDeepMask(const BitMap *srcBits, const BitMap *maskBits, const BitMap *dstBits, const Rect *srcRect, const Rect *maskRect, const Rect *dstRect, INTEGER mode, RgnHandle maskRgn) M68K_INLINE(0xAA51);
#if TARGET_API_MAC_CARBON
#if TARGET_CPU_68K
@@ -1276,9 +1281,9 @@ pascal void GetRegionBounds(RgnHandle rgn, Rect *r);
#if TARGET_API_MAC_CARBON
#if TARGET_CPU_68K
static __inline__ BitMap * GetPortBitMapForCopyBits(CGrafPtr p);
static __inline__ const BitMap * GetPortBitMapForCopyBits(CGrafPtr p);
#else
pascal BitMap * GetPortBitMapForCopyBits(CGrafPtr p);
pascal const BitMap * GetPortBitMapForCopyBits(CGrafPtr p);
#endif
#endif
@@ -1336,7 +1341,7 @@ static __inline__ void GetRegionBounds(RgnHandle rgn, Rect *r) {
#endif
#if TARGET_API_MAC_CARBON
static __inline__ BitMap * GetPortBitMapForCopyBits(CGrafPtr p) {
static __inline__ const BitMap * GetPortBitMapForCopyBits(CGrafPtr p) {
return &((GrafPtr)p)->portBits;
}
#endif
@@ -1350,6 +1355,10 @@ static __inline__ void GetQDGlobalsScreenBits(BitMap *bm) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+17
View File
@@ -23,6 +23,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct MovieRecord MovieRecord;
struct MovieRecord {
LONGINT data[1];
@@ -32,6 +37,14 @@ typedef MovieRecord *Movie;
typedef LONGINT TimeValue;
typedef LONGINT QTAtom;
typedef LONGINT QTAtomType;
typedef LONGINT QTAtomID;
typedef Handle QTAtomContainer;
enum { _QuickTime = 0xAAAA };
MAC_SINCE_GESTALT(0x0710, "7.1", "'qtim'") pascal OSErr EnterMovies(void) M68K_INLINE(0x7001, 0xAAAA);
@@ -3843,6 +3856,10 @@ enum {
codecInterfaceVersion = 1,
};
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// resource attribute masks
enum {
resSysHeap = 64,
@@ -281,6 +286,10 @@ static __inline__ void TempInsertROMMap(Boolean tempResLoad) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
// Big-endian 64 bit "comp" data type. Note that this has a NaN value!
// typedef union {
// struct
@@ -154,6 +159,10 @@ enum { _Pack7 = 0xA9EE };
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct SCSIInstr SCSIInstr;
struct SCSIInstr {
INTEGER scOpcode;
@@ -268,6 +273,10 @@ MAC_SINCE(0x0761, "7.6.1") static __inline__ __attribute__((__always_inline__))
MAC_SINCE(0x0761, "7.6.1") pascal OSErr SCSIKillXPT(SIMInitInfo *SIMinfoPtr);
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -11,6 +11,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
noScrapErr = -100,
noTypeErr = -102,
@@ -65,6 +70,10 @@ pascal LONGINT PutScrap(LONGINT len, ResType rest, Ptr p) M68K_INLINE(0xA9FE);
enum { _GetScrap = 0xA9FD };
pascal LONGINT GetScrap(Handle h, ResType rest, LONGINT *off) M68K_INLINE(0xA9FD);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -14,6 +14,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
typedef INTEGER String2DateStatus;
enum {
@@ -777,6 +782,10 @@ static __inline__ INTEGER IUStringOrder(ConstStr255Param aStr, ConstStr255Param
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum { _ExitToShell = 0xA9F4 };
pascal void ExitToShell(void) M68K_INLINE(0xA9F4);
@@ -127,6 +132,10 @@ static __inline__ void ClrAppFiles(INTEGER index) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -13,6 +13,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
baud300 = 380,
baud600 = 189,
@@ -253,6 +258,10 @@ static __inline__ OSErr SerStatus(INTEGER rn, SerStaRec *serstap) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -10,6 +10,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum {
sdOnPowerOff = 1,
sdOnRestart = 2,
@@ -28,6 +33,10 @@ MAC_SINCE(0x0200, "2.0") pascal void ShutDwnInstall(ProcPtr shutdown_proc, int16
MAC_SINCE(0x0200, "2.0") pascal void ShutDwnRemove(ProcPtr shutdown_proc) M68K_INLINE(0x3F3C, 0x0004, 0xA895);
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
+9
View File
@@ -12,6 +12,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wuser-defined-warnings"
/* The Toolbox calls are C functions, also in C++. */
#ifdef __cplusplus
extern "C" {
#endif
enum { _SlotManager = 0xA06E };
typedef struct SpBlock SpBlock;
@@ -720,6 +725,10 @@ static __inline__ OSErr OpenSlot(ParmBlkPtr paramBlock, Boolean async) {
#endif
#ifdef __cplusplus
}
#endif
#pragma clang diagnostic pop
#pragma options align=reset
Loaded 100 of 126 files, more files were not shown because too many files have changed in this diff. Show more