Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

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 =
      environsVersion:  Integer;
      machineType:      Integer;
      systemVersion:    Integer;
      processor:        Integer;
      hasFPU:           Boolean;
      hasColorQD:       Boolean;
      keyBoardType:     Integer;
      atDrvrVersNum:    Integer;
      sysVRefNum:       Integer;
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.
A code for the Macintosh model, which can be one of these values:
                  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}
Use Gestalt to obtain information about machine types not listed above.
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.
A code for the microprocessor, which can be one of these values:
                  envCPUUnknown        = 0;  {unknown }
                                             { microprocessor}
                  env68000             = 1;  {MC68000}
                  env68010             = 2;  {MC68010}
                  env68020             = 3;  {MC68020}
                  env68030             = 4;  {MC68030}
                  env68040             = 5;  {MC68040}
A Boolean value that indicates whether hardware floating-point processing is available.
A Boolean value that indicates whether Color QuickDraw is present. This field says nothing about the presence of a color monitor.
A code for the keyboard type, which can be one of these values:
                  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}
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.
The version number of the AppleTalk driver (specifically, the .MPP driver) currently installed. If AppleTalk is not loaded, this field is 0.
The working-directory reference number of the folder or volume that holds the open System file.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice