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: Interapplication Communication /
Chapter 8 - Apple Event Terminology Resources


Structure of Apple Event Terminology Resources

Table 8-3 summarizes the resource structure used by both the 'aeut' and 'aete' resources. Each asterisk (*) in the table indicates the beginning of an array. Each array can contain any number of items, including both additional arrays and specific definitions (n).
Structure of the 'aeut' and 'aete' resources
n Template version
n Language code
* Array of suites:
n Suite information
* Array of events:
n Event information (including information about the direct parameter)
* Array of other parameters:
n Parameter information
* Array of classes:
n Class description
* Array of properties:
n Property information
* Array of elements:
n Element information
* Array of key forms:
n Key form information
* Array of comparison operators:
n Comparison operator information
* Array of enumerations:
n Enumeration information
* Array of enumerators:
n Enumerator information

Listing 8-1 shows the resource type declaration in Rez format for the 'aeut' resource, which can also serve as a template for an 'aete' resource. (Rez is a resource compiler available with the MPW programming environment.) For complete descriptions of all the fields shown in Listing 8-1, see "Reference to Apple Event Terminology Resources," beginning on page 8-31.

Listing 8-1 Resource type declaration for the 'aeut' resource

type 'aeut' {
   hex byte;                        /*major version in binary-coded */
                                    /* decimal (BCD)*/
   hex byte;                        /*minor version in BCD*/
   integer  Language, english = 0, japanese = 11;  /*language code*/
   integer  Script, roman = 0;      /*script code*/
   integer = $$Countof(Suites);
   array Suites {
      pstring;                      /*human-language name of suite*/
      pstring;                      /*suite description*/
      align word;                   /*alignment*/
      literal longint;              /*suite ID*/
      integer;                      /*suite level*/
      integer;                      /*suite version*/
      integer = $$Countof(Events);
      array Events {
         pstring;                   /*human-language name of event*/
         pstring;                   /*event description*/
         align word;                /*alignment*/
         literal longint;           /*event class*/
         literal longint;           /*event ID*/
         literal longint   noReply = 'null';    /*reply type*/
         pstring;                   /*reply description*/
         align word;                /*alignment*/
         boolean  replyRequired,    /*if the reply is */
                  replyOptional;    /* required*/
         boolean  singleItem,       /*if the reply must be a list*/
                  listOfItems;      
         boolean  notEnumerated,    /*if the type is enumerated*/
                  enumerated;       
         boolean  reserved;         /*these 13 bits are reserved; */
         boolean  reserved;         /* set them to "reserved"*/
         boolean  reserved;         
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved,         /*if event is verb event or nonverb */
                  nonVerbEvent;     /* event; used by Japanese dialect*/
         literal longint   noParams = 'null'; /*direct param type*/
         pstring;                   /*direct param description*/
         align word;                /*alignment*/
         boolean  directParamRequired, /*if the direct param is required*/
                  directParamOptional;
         boolean  singleItem,       /*if the param must be a list*/
                  listOfItems;
         boolean  notEnumerated,    /*if the type is enumerated*/
                  enumerated;
         boolean  doesntChangeState, /*if the event changes server's state*/
                  changesState;
         boolean  reserved;         /*these 12 bits are reserved; */
         boolean  reserved;         /* set them to "reserved"*/
         boolean  reserved;         
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         boolean  reserved;
         integer = $$Countof(OtherParams);
         array OtherParams {
            pstring;                /*human-language name for parameter*/
            align word;             /*alignment*/
            literal longint;        /*parameter keyword*/
            literal longint;        /*parameter type*/
            pstring;                /*parameter description*/
            align word;             /*alignment*/
            boolean  required,      /*if param is required*/
                     optional;

            boolean  singleItem,    /*if the param must be a list*/
                     listOfItems;
            boolean  notEnumerated, /*if the type is enumerated*/
                     enumerated;
            boolean  isNamed,       /*indicates if this should be the */
                     isUnnamed;     /* unnamed parameter; only one */
                                    /* parameter can be so marked; set to */
                                    /* reserved if not required*/
            boolean  reserved;      /*these 9 bits are reserved; */
            boolean  reserved;      /* set them to "reserved"*/
            boolean  reserved;
            boolean  reserved;
            boolean  reserved;
            boolean  reserved;
            boolean  reserved;
            boolean  reserved;
            boolean  reserved;
            boolean  notFeminine,   /*feminine; set to reserved if not  */
                     feminine;      /* required*/
            boolean  notMasculine,  /*masculine; set to reserved if not */
                     masculine;     /* required*/
            boolean  singular,
                     plural;        /*plural*/
         };
      };
      integer = $$Countof(Classes);
      array Classes {
         pstring;                   /*human-language name for class*/
         align word;                /*alignment*/
         literal longint;           /*class ID*/
         pstring;                   /*class description*/
         align word;                /*alignment*/
         integer = $$Countof(Properties);
         array Properties {
            pstring;                /*human-language name for property*/
            align word;             /*alignment*/
            literal longint;        /*property ID*/
            literal longint;        /*property class*/
            pstring;                /*property description*/
            align word;             /*alignment*/
            boolean  reserved;      /*reserved*/
            boolean  singleItem,    /*if the property must be a list*/
                     listOfItems;   
            boolean  notEnumerated, /*if the type is enumerated*/
                     enumerated; 
            boolean  readOnly,      /*can only read it*/
                     readWrite;     /*can read or write it*/
            boolean  reserved;      /*these 9 bits are reserved; */
            boolean  reserved;      /* set them to "reserved"*/
            boolean  reserved;
            boolean  reserved;
            boolean  reserved;
            boolean  reserved;
            boolean  reserved;
            boolean  reserved;
            boolean  reserved;      
            boolean  notFeminine,   /*feminine; set to reserved if not  */
                     feminine;      /* required*/
            boolean  notMasculine,  /*masculine; set to reserved if not */
                     masculine;     /* required*/
            boolean  singular,
                     plural;        /*plural*/
         };
         integer = $$Countof(Elements);
         array Elements {
            literal longint;        /*element class*/
            integer = $$Countof(KeyForms);
            array KeyForms {        /*list of key forms*/
               literal longint   
               formAbsolutePosition = 'indx',
               formName = 'name';   /*key form ID*/
            };
         };
      };
      integer = $$Countof(ComparisonOps);
      array ComparisonOps {
         pstring;                   /*human-language name for */
                                    /* comparison operator*/
         align word;                /*alignment*/
         literal longint;           /*comparison operator ID*/
         pstring;                   /*comparison operator description*/
         align word;                /*alignment*/
      };
      integer = $$Countof(Enumerations);
      array Enumerations {          /*list of enumerations*/
         literal longint;           /*enumeration ID*/
         integer = $$Countof(Enumerators);
         array Enumerators {        /*list of enumerators*/
            pstring;                /*human-language name for enumerator*/
            align word;             /*alignment*/
            literal longint;        /*enumerator ID*/
            pstring;                /*enumerator description*/
            align word;             /*alignment*/
         };
      };
   };
}; 

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996