|
| #define | NewDeferredTaskUPP(userRoutine) |
| |
|
#define | DisposeDeferredTaskUPP(userUPP) DisposeRoutineDescriptor(userUPP) |
| |
|
#define | InvokeDeferredTaskUPP(dtParam, userUPP) CALL_ONE_PARAMETER_UPP((userUPP), uppDeferredTaskProcInfo, (dtParam)) |
| |
|
#define | NewDeferredTaskProc(userRoutine) NewDeferredTaskUPP(userRoutine) |
| |
|
#define | CallDeferredTaskProc(userRoutine, dtParam) InvokeDeferredTaskUPP(dtParam, userRoutine) |
| |
|
#define | GetMMUMode() ((SInt8)true32b) |
| |
|
#define | SwapMMUMode(x) (*(SInt8 *)(x) = true32b) |
| |
|
| enum | {
useFree = 0
, useATalk = 1
, useAsync = 2
, useExtClk = 3
,
useMIDI = 4
} |
| |
| enum | { false32b = 0
, true32b = 1
} |
| |
| enum | { sortsBefore = -1
, sortsEqual = 0
, sortsAfter = 1
} |
| |
| enum | {
dummyType = 0
, vType = 1
, ioQType = 2
, drvQType = 3
,
evType = 4
, fsQType = 5
, sIQType = 6
, dtQType = 7
,
nmType = 8
} |
| |
| enum | { uppDeferredTaskProcInfo = 0x0000B802
} |
| |
| enum | { curSysEnvVers = 2
} |
| |
| enum | {
envMac = -1
, envXL = -2
, envMachUnknown = 0
, env512KE = 1
,
envMacPlus = 2
, envSE = 3
, envMacII = 4
, envMacIIx = 5
,
envMacIIcx = 6
, envSE30 = 7
, envPortable = 8
, envMacIIci = 9
,
envMacIIfx = 11
} |
| |
| enum | {
envCPUUnknown = 0
, env68000 = 1
, env68010 = 2
, env68020 = 3
,
env68030 = 4
, env68040 = 5
} |
| |
| enum | {
envUnknownKbd = 0
, envMacKbd = 1
, envMacAndPad = 2
, envMacPlusKbd = 3
,
envAExtendKbd = 4
, envStandADBKbd = 5
, envPrtblADBKbd = 6
, envPrtblISOKbd = 7
,
envStdISOADBKbd = 8
, envExtISOADBKbd = 9
} |
| |
|
|
typedef | CALLBACK_API_REGISTER68K (void, DeferredTaskProcPtr,(long dtParam)) |
| |
|
typedef | REGISTER_UPP_TYPE (DeferredTaskProcPtr) DeferredTaskUPP |
| |
| DeferredTaskUPP | NewDeferredTaskUPP (DeferredTaskProcPtr userRoutine) |
| |
| void | DisposeDeferredTaskUPP (DeferredTaskUPP userUPP) |
| |
| void | InvokeDeferredTaskUPP (long dtParam, DeferredTaskUPP userUPP) |
| |
| Boolean | IsMetric (void) |
| |
| SysPPtr | GetSysPPtr (void) |
| | Get address of start of Parameter RAM data. More...
|
| |
| OSErr | DTInstall (DeferredTaskPtr dtTaskPtr) |
| | Add a task to the deferred task queue. More...
|
| |
| void | Delay (unsigned long numTicks, unsigned long *finalTicks) |
| | Pause execution for a specified interval. More...
|
| |
| OSErr | WriteParam (void) |
| | Write Parameter RAM data to non-volatile RAM. More...
|
| |
| void | Enqueue (QElemPtr qElement, QHdrPtr qHeader) |
| | Add an element to the end of a queue. More...
|
| |
| OSErr | Dequeue (QElemPtr qElement, QHdrPtr qHeader) |
| | Remove an element from a queue. More...
|
| |
| long | SetCurrentA5 (void) |
| | Get the current value of A5. More...
|
| |
| long | SetA5 (long newA5) |
| | Set the current value of A5. More...
|
| |
| OSErr | InitUtil (void) |
| | Copy Parameter RAM to low-memory variables. More...
|
| |
| void | MakeDataExecutable (void *baseAddress, unsigned long length) |
| |
| OSErr | FlushCodeCacheRange (void *address, unsigned long count) |
| |
| void | ReadLocation (MachineLocation *loc) |
| | Where is this Macintosh and what time is it? More...
|
| |
| void | WriteLocation (const MachineLocation *loc) |
| | Store machine's location and time zone data in RAM. More...
|
| |
| UInt32 | TickCount (void) |
| |
| CFStringRef | CSCopyUserName (Boolean useShortName) |
| |
| CFStringRef | CSCopyMachineName (void) |
| |
| OSErr | SysEnvirons (short versionRequested, SysEnvRec *theWorld) |
| | Get ROM version, machine type, system version, etc. More...
|
| |
OS Utilities Interfaces.
- Introduced In: Mac OS 9
- Avaliable From: Universal Interfaces 3.4.1
- Copyright: © 1985-2001 by Apple Computer, Inc., all rights reserved
For bug reports, consult the following page on the World Wide Web:
http://developer.apple.com/bugreporter/
| void Delay |
( |
unsigned long |
numTicks, |
|
|
unsigned long * |
finalTicks |
|
) |
| |
Pause execution for a specified interval.
Delay enables interrupts and keeps control until a specified interval in ticks
(1/60-th second units) has elapsed.
duration specifies the desired duration of the delay, in 1/60-th second
(16.6 ms) units. For instance, if duration = 60, the delay will
last approx. 1 second.
finalTicks is the address of a 32-bit long. Upon return, it will contain the
value of Ticks (the number of ticks since system startup) as it was
when Delay returned control.
- Returns
none
- Note
Because of the possibility of interrupts being disabled or overridden for
short periods, Delay may last one or more ticks longer than you requested
in duration. Thus, you should not rely on pinpoint accuracy here.
The finalTicks parameter can be used as an accuracy gauge to see if you did
lose a tick or two.
The global variable Ticks is updated upon every vertical retrace. See
VInstall for related information.
Ticks are generally referred to as 1/60th of a second. It is actually
1/60.15 seconds. However, if you need this kind of accuracy, you should not
be using functions like TickCount and Delay.
- Copyright: THINK Reference © 1991-1992 Symantec Corporation
- Non-Carbon CFM: in InterfaceLib 7.1 and later
- Carbon Lib: in CarbonLib 1.0 and later
- Mac OS X: in version 10.0 and later
| OSErr SysEnvirons |
( |
short |
versionRequested, |
|
|
SysEnvRec * |
theWorld |
|
) |
| |
Get ROM version, machine type, system version, etc.
SysEnvirons is no longer a recommended way of obtaining information
about the environment in which your code will run. Gestalt is now available
as glue in development environments so that there is no need to call Environs
or SysEnvirons , regardless of what machine or operating system you are
running on.
SysEnvirons fills a structure with information about the computer and
system on which the caller is executing.
verReqNo identifies which version of the SysEnvRec you wish to obtain. Use
the constant curSysEnvVers (currently version 2) to obtain the
basic 18-byte version described in the SysEnvRec topic.
theSysEnv is the address of an 18-byte SysEnvRec structure. Upon return, it
contains all the system environment information. See SysEnvRec for
details of the return values.
- Returns
an OSErr; an integer Error Code . It will be one of:
noErr(0) No error
envNotPresent (-5500) _SysEnvirons trap not present
envBadVers (-5501) negative number used in verReqNo
envVersTooBig (-5502) verReqNo version not handled by this system
- Note
SysEnvirons obtains the ROM version number, such as the CPU type,
whether or not color Quickdraw is present, keyboard type, and so forth.
Macintosh Technote #129 warns that values may be added to the acceptable
set of values for any field of the SysEnvRec without warning. Therefore, if
you are calling SysEnvirons you should be prepared to handle unexpected
values.
The constant curSysEnvVers contains the current version of
SysEnvirons . By using this constant rather than a hard coded version
number you can reduce the changes that may need to be made to your source
as SysEnvirons evolves. However, you should be prepared to handle
unexpected values and not make assumptions about functionality based on
current expectations. It is much safer to test for specific functionality with
Gestalt than rely on the future contents of SysEnvirons .
In future systems, the SysEnvRec structure may get longer, so the
following mechanism can be used to get the most up-to-date version of this
record:
•Set verReqNo to a value greater than curSysEnvVers (the SysEnvRec
version number you suspect might not be available).
•Set theSysEnv to point to the larger structure (i.e., some future
- Copyright: THINK Reference © 1991-1992 Symantec Corporation
- Non-Carbon CFM: in InterfaceLib 7.1 and later
- Carbon Lib: not available
- Mac OS X: not available