Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 1 - Gestalt Manager / Gestalt Manager Reference
Data Structures


The System Environment Record

The SysEnvirons function fills in a system environment record, which describes some aspects of the software and hardware environment.

TYPE SysEnvRec =
   RECORD
      environsVersion:  Integer;
      machineType:      Integer;
      systemVersion:    Integer;
      processor:        Integer;
      hasFPU:           Boolean;
      hasColorQD:       Boolean;
      keyBoardType:     Integer;
      atDrvrVersNum:    Integer;
      sysVRefNum:       Integer;
   END;
FIELD DESCRIPTIONS
environsVersion
The version number of the SysEnvirons function that was used to fill in the record.
When you call SysEnvirons, you specify a version number to ensure that you receive a system environment record that matches your expectations, as explained in the description of SysEnvirons beginning on page 1-32. If you request a more recent version of SysEnvirons than is available, SysEnvirons places its own version number in the environsVersion field and returns a function result envVersTooBig.
machineType
A code for the Macintosh model, which can be one of these values:
               CONST
                  envXL                = -2; {Macintosh XL}
                  envMac               = -1; {Macintosh with 64K }
                                             { ROM}
                  envMachUnknown       = 0;  {unknown model, }
                                             { after Macintosh }
                                             { IIfx}
                  env512KE             = 1;  {Macintosh 512K }
                                             { enhanced}
                  envMacPlus           = 2;  {Macintosh Plus}
                  envSE                = 3;  {Macintosh SE}
                  envMacII             = 4;  {Macintosh II}
                  envMacIIx            = 5;  {Macintosh IIx}
                  envMacIIcx           = 6;  {Macintosh IIcx}
                  envSE30              = 7;  {Macintosh SE30}
                  envPortable          = 8;  {Macintosh Portable}
                  envMacIIci           = 9;  {Macintosh IIci}
                  envMacIIfx           = 11; {Macintosh IIfx}
Note
Use Gestalt to obtain information about machine types not listed above.
systemVersion
The version number of the current System file, represented as two byte-long numbers with one or more implied decimal points. The value $0410, for example, represents system software version 4.1.
If you call SysEnvirons when a system earlier than 4.1 is running, the MPW glue places $0 in this field and returns a result code of envNotPresent.
processor
A code for the microprocessor, which can be one of these values:
               CONST
                  envCPUUnknown        = 0;  {unknown }
                                             { microprocessor}
                  env68000             = 1;  {MC68000}
                  env68010             = 2;  {MC68010}
                  env68020             = 3;  {MC68020}
                  env68030             = 4;  {MC68030}
                  env68040             = 5;  {MC68040}
hasFPU
A Boolean value that indicates whether hardware floating-point processing is available.
hasColorQD
A Boolean value that indicates whether Color QuickDraw is present. This field says nothing about the presence of a color monitor.
keyboardType
A code for the keyboard type, which can be one of these values:
               CONST
                  envUnknownKbd     = 0;  {Macintosh Plus with }
                                          { keypad}
                  envMacKbd         = 1;  {Macintosh}
                  envMacAndPad      = 2;  {Macintosh with keypad}
                  envMacPlusKbd     = 3;  {Macintosh Plus}
                  envAExtendKbd     = 4;  {Apple extended}
                  envStandADBKbd    = 5;  {standard ADB}
                  envPrtblADBKbd    = 6;  {Macintosh Portable ADB}
                  envPrtblISOKbd    = 7;  {Macintosh Portable ISO}
                  envStdISOADBKbd   = 8;  {standard ISO ADB}
                  envExtISOADBKbd   = 9;  {extended ISO ADB}
Note
Use Gestalt to obtain information about keyboard types not listed above.
If the Apple Desktop Bus is in use, this field returns the keyboard type of the keyboard on which the last keystroke was made.
atDrvrVersNum
The version number of the AppleTalk driver (specifically, the .MPP driver) currently installed. If AppleTalk is not loaded, this field is 0.
sysVRefNum
The working-directory reference number of the folder or volume that holds the open System file.

Subtopics
FIELD DESCRIPTIONS

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996