home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / programm / MM2_DEV / DOC / MULTITOS.DOC < prev    next >
Encoding:
Text File  |  1993-05-01  |  86.8 KB  |  2,550 lines

  1.    AES Documentation 3/27/92 - 1/21/93
  2.  
  3. Copyright 1992,1993 ATARI CORP
  4. All Rights Reserved
  5.  
  6. ============================================================================
  7. The following is a discussioy of new calls and new features in AES.
  8. Everything listed here is subject to change.  If a feature is not clearly
  9. documented here, some more detail may be available in RELEASE.DOC.  If it's
  10. not clear after reading both this file and RELEASE.DOC, that's a bug and
  11. should be reported.
  12.  
  13. The first part of this file is structured like the AES documentation, with
  14. "V4.0" introducing the section which describes new things for this version
  15. of the AES.
  16. ============================================================================
  17.  
  18. 3.4.4     APPL_FIND
  19.  
  20. Purpose:
  21.  
  22.      Finds the ap_id of another application in the system.
  23.  
  24.      An application must know the ap_id before it can establish
  25.      communications with another application.
  26.  
  27.      V4.0
  28.  
  29.      a,  If the high word of ap_fpname is 0xFFFF, then the low word should
  30.          contain the mint id of that application. The appl_find call will
  31.          convert the mint id into the corresponding aes id.
  32.  
  33.      b,  If the high word of ap_fpname is 0xFFFE, then the low word should
  34.          contain the aes id of that application. The appl_find call will
  35.          convert the aes id into the corresponding mint id.
  36.  
  37.      c,  If ap_fpname is a zero pointer, the appl_find will return the
  38.          aes id of the current process.
  39.  
  40.  
  41. Parameters:
  42.  
  43.      control[0] = 13
  44.      control[1] = 0
  45.      control[2] = 1
  46.      control[3] = 1
  47.      control[4] = 0
  48.  
  49.      int_out[0] = ap_fid
  50.      addr_in[0] = ap_fpname
  51.  
  52.      ap_fid = the ap_id of the application for which the  current
  53.               application is searching.
  54.  
  55.      -1 - GEM AES could not find the application.
  56.  
  57.      ap_fpname  - address of a null-terminated string  containing
  58.                   the filename of the application for which the
  59.                   current application is searching.
  60.  
  61.      The string must be 8 characters long. If the filename has
  62.      fewer than 8 characters, the programmer must fill out the
  63.      rest of the string with blank spaces.
  64.  
  65.  
  66. Sample call to C language binding:
  67.  
  68.      ap_fid = appl_find( ap_fpname );
  69.  
  70.  
  71. -------------------------------------------------------------------
  72.  
  73. 3.4.1.    APPL_INIT
  74.  
  75.    Purpose:
  76.  
  77.      Initalizes the application and establishes a number of internal GEM
  78.      AES data structures prior to calls to other AES function calls.
  79.  
  80.      V4.0
  81.  
  82.      This must be the first call prior to all the other AES functions. Fail
  83.      to do this will have unpredictable result!
  84.  
  85.      The best way to detect if the AES is present is first to set the
  86.      global[0] to zero then check global[0] again after appl_init call. If
  87.      global[0] is non zero then AES is present otherwise AES is not
  88.      installed.
  89.  
  90.      Global[1] will return -1 to indicate current AES supports multitasking
  91.      environment.
  92.  
  93.      The global[13] contains the current maximum character that is used by AES to
  94.      do vst_height before writing text to the screen. Changed 9/29/92
  95.  
  96.      The global[14] contains the current maximum character that is used by AES to
  97.      do vst_height before writing text to the screen. Changed 9/29/92
  98.  
  99.      Note:
  100.      Some AES bindings have been hard-wired to always return a 1 in int_out[0] instead
  101.      of the true AES application ID.  Please check all bindings carefully.
  102.  
  103.  
  104.    Parameters:
  105.  
  106.      control[0] = 10
  107.      control[1] = 0
  108.      control[2] = 1
  109.      control[3] = 0
  110.      control[4] = 0
  111.  
  112.      int_out[0] = ap_id
  113.  
  114.      ap_id  - If appl_init was successful,  ap_id is a zero or  a
  115.      positive number.  GEM AES places this number in the  Global
  116.      Array,  and the application uses it with future calls to AES
  117.      routines.
  118.  
  119.      If APPL_INIT was not successful,  the value of ap_id is  -1.
  120.      The application should make no further AES calls.
  121.  
  122.  
  123.    Sample call to C language binding:
  124.  
  125.    ap_id = appl_init();
  126.  
  127.  
  128. ---------------------------------------------------------------------
  129.  
  130. 3.4.2     APPL_READ
  131.  
  132. Purpose:
  133.  
  134.      Reads a specified number of bytes from a message pipe.
  135.  
  136.      If  there  is no message in the pipe,  AES will  change  the
  137.      current  application  into WAIT state until the  request  is
  138.      satisfied.
  139.  
  140.      It  is  strongly  recommended to read 16  bytes  at  a  time
  141.      because of the way the AES works.
  142.  
  143.      V4.0
  144.  
  145.          If ap_rid equals -1,  this function will do a read  only
  146.          if there is data in the message pipe. Otherwise, it will
  147.          return immediately.
  148.  
  149.  
  150. Parameters:
  151.  
  152.      control[0] = 11
  153.      control[1] = 2
  154.      control[2] = 1
  155.      control[3] = 1
  156.      control[4] = 0
  157.  
  158.      int_in[0]  = ap_rid
  159.      int_in[1]  = ap_rlength
  160.      int_out[0] = ap_rreturn
  161.      addr_in[0] = ap_rpbuff
  162.  
  163. Description:
  164.  
  165.      ap_rid  -  the ap_id of the process whose message  pipe  the
  166.                 application is reading ( usually its own )
  167.  
  168.      ap_rlength  - the number of bytes to read from  the  message
  169.                    pipe
  170.  
  171.  
  172.      ap_rreturn - a coded return message
  173.  
  174.        0 - an error exists
  175.        n - ( positive integer ) - no error exists
  176.  
  177.      ap_rpbuff  - address of the buffer that will hold the  bytes
  178.                   the application is reading
  179.  
  180.  
  181. Sample call to C language binding:
  182.  
  183.      ap_rreturn = appl_read ( ap_rid, ap_rlength, ap_rpbuff );
  184.  
  185. ------------------------------------------------------------------
  186.  
  187.  3.4.9    APPL_SEARCH
  188.  
  189.  Purpose:
  190.  
  191.      V4.0
  192.      Searches all the existing AES processes in the system.
  193.  
  194.  Parameters:
  195.      control[0] = 18
  196.      control[1] = 1
  197.      control[2] = 3
  198.      control[3] = 1
  199.      control[4] = 0
  200.  
  201.      int_in[0]     = ap_smode
  202.      addr_in[0]    = ap_sname
  203.      int_out[0]    = ap_sreturn
  204.      int_out[1]    = ap_stype
  205.      int_out[2]    = ap_sid
  206.  
  207.      ap_smode - Search mode of the function
  208.                 0 = search first ( all the processes )
  209.                 1 = search next  ( all the processes )
  210.   2 = search system shell ( only one )
  211.  
  212.      ap_sname - Buffer that will hold the name of the AES process
  213.                 the size must be 9 or more characters long
  214.  
  215.      ap_stype - Process's type
  216.  
  217.                 1 = System process
  218.                 2 = Application
  219.                 4 = Accessory
  220.  
  221.        ap_sid - Process's AES id
  222.  
  223.    ap_sreturn - a coded return message
  224.  
  225.                 0 - No more file
  226.                 1 - No error exists
  227.  
  228. Sample call to C language binding:
  229.  
  230.  ap_sreturn = appl_search( ap_smode, ap_sname, &ap_stype, &ap_sid );
  231.  
  232. -------------------------------------------------------------------
  233.  
  234. 3.4.10 APPL_GETINFO
  235.  
  236. Purpose:
  237.  This function is to allow application to get general information about the
  238.  AES in general.
  239.  
  240.  Parameters:
  241.      control[0] = 130
  242.      control[1] = 1
  243.      control[2] = 5
  244.      control[3] = 0
  245.      control[4] = 0
  246.  
  247.      int_in[0]     = ap_gtype
  248.      int_out[0]    = ap_greturn
  249.      int_out[1]    = ap_gout1
  250.      int_out[2]    = ap_gout2
  251.      int_out[3]    = ap_gout3
  252.      int_out[4]    = ap_gout4
  253.  
  254.      ap_gtype - Get information type:
  255.  
  256.                 0 - Get AES regular font information:
  257.      ap_gout1 - font height
  258.      ap_gout2 - font id
  259.      ap_gout3 - font type: 0 - system font
  260.       1 - FSM font
  261.       2 and on to be defined in the future
  262.   
  263.                 1 - Get AES small font information:
  264.      ap_gout1 - font height
  265.      ap_gout2 - font id
  266.      ap_gout3 - font type: 0 - system font
  267.       1 - FSM font
  268.       2 and on to be defined in the future
  269.  
  270.   2 - Get AES current resolution number and the number of color is
  271.       being supported by the object library.
  272.  
  273.      ap_gout1 - resolution number
  274.      ap_gout2 - number of color supported by AES object library
  275.      ap_gout3 - color icons: 0 - Not supported
  276.         1 - Supported
  277.      ap_gout4 - new resource file format: 0 - Not supported
  278.        1 - Supported
  279.                 3 - Get AES language.
  280.  
  281.                    ap_gout1 - currently used language: 0 - English
  282.                                                        1 - German
  283.              2 - French
  284.              3 - reserved
  285.              4 - Spanish
  286.              5 - Italian
  287.              6 - Swedish (not implemented)
  288.  
  289.    ap_greturn - a coded return message
  290.  
  291.                 1 - No error
  292.                 0 - Error
  293.  
  294. Sample call to C language binding:
  295.  
  296.  ap_greturn = appl_getinfo( ap_gtype, &ap_gout1, &ap_gout2, &ap_gout3, &ap_gout4 );
  297.  
  298. -------------------------------------------------------------------
  299. 8.3.9 GRAF_MOUSE
  300.  
  301. Purpose:
  302.  Changes the mouse to one of a predefined set or to an application defined
  303.  form.
  304.  
  305.  The application should change the mouse back to ARROW after it finishes with
  306.  its current action. Do not leave the mouse in any form other than ARROW.
  307.  
  308.  V4.0
  309.  
  310.  Currently, applications have free access to the graf_mouse function to change
  311.  the mouse form without any restriction. However, in the new multiprogramming
  312.  environment in which a lot of applications may present in the system at the
  313.  same time will pose a big problem. Rules will be implemented so that AES
  314.  can take control of the mouse form and decide which application can change
  315.  the mouse form and which one can't.
  316.  
  317.  During a normal circumstance, a mouse should always stays in ARROW form.
  318.  In this case, the mouse form ownership is free and any application can change
  319.  it at its will. Once the mouse form is being changed to something other than
  320.  the ARROW, ownership is transfered to that application until it changes the
  321.  mouse back to ARROW. So, as a courtesy to other applications, the current
  322.  owner should change the mouse back to ARROW as soon as it finishes with its
  323.  work.
  324.  
  325.  However, in some circumstances, an application may want to change mouse
  326.  form immediately without any delay. For example, the foreground application
  327.  changes the mouse to a busy bee and user clicks on the background to do a drag
  328.  operation on a different application. It is very logical that the mouse should
  329.  be changed to a flat hand for the dragging. In this case, AES provides a way
  330.  to force the current mouse to the next owner in order to deal with this type of
  331.  situation. Please read the gr_monumber section below.
  332.  
  333.  
  334. Parameters:
  335.  
  336.  control[0] = 78
  337.  control[1] = 1
  338.  control[2] = 1
  339.  control[3] = 1
  340.  control[4] = 0
  341.  
  342.   int_in[0] = gr_monumber
  343.  int_out[0] = gr_moreturn
  344.  addr_in[0] = gr_mofaddr
  345.  
  346.  
  347.  gr_monumber - a code identifying a predefined form
  348.  
  349.    0 - arrow
  350.    1 - text cursor
  351.    2 - busy bee
  352.    3 - hand with pointing finger
  353.    4 - flat hand, extended fingers
  354.    5 - thin cross hair
  355.    6 - thich cross hair
  356.    7 - outline cross hair
  357.  255 - mouse form stored in gr_mofaddr
  358.  256 - hide mouse form
  359.  257 - show mouse form
  360.  ( V4.0 )
  361.  258 - save current mouse form
  362.  259 - restore to the last saved mouse form
  363.  260 - restore to previous mouse form
  364.  
  365.  In the event that the application must change the mouse form, set the highest
  366.  bit ( Bit 15 ) of gr_monumber to 1 and OR in with the desired mouse form number.
  367.  After finishing the work, call the graf_mouse with value 0 to set the mouse
  368.  back to arrow. It is suggested that the application to make this call in the
  369.  following way:
  370.  
  371.      wind_uodate( 1 )
  372.    graf_mouse( 0x8000|gr_monumber, 0 );
  373.   actions()
  374.   graf_mouse( 0, 0 );
  375.      wind_update( 0 ) 
  376.  
  377.  gr_moreturn - a coded return message
  378.  
  379.  0 - an error exits
  380.  n ( positive integer ) - no error exists.
  381.  
  382.  gr_mofaddr - the address of a 35-word buffer that fits the mouse form definition
  383.  block specified in the GEM programmer's guide
  384.  
  385.  ----------------------------------------------------------
  386.  
  387.  Sample call to C language binding:
  388.  
  389.  gr_moreturn = graf_mouse( gr_monumber, gr_mofaddr );
  390.  
  391.  
  392. ====================================================================================
  393.  
  394. Version Documentation Date: September 9, 1992
  395.  
  396.  
  397. Section 5 Addendum
  398.  
  399. Menu Library Enhancements
  400.  
  401.  
  402. 5.1 Introduction
  403.  
  404. This section describes the additional features of the Menu Library.  All
  405. enhancements are backwards compatible with previous versions of the AES, so
  406. existing applications will continue to work.  The new features will work on
  407. all machines with an AES version number of 3.3 and up.
  408.  
  409. The enhancements to the Menu Library are:
  410.  
  411. o   Heirarchical menus are now supported.
  412. o   Pop-Up Menus are now supported.
  413. o   Scrolling menus are supported for pop-up menus and submenus.
  414.     Scrolling for the first level menus of a menu bar are not supported.
  415.  
  416.  
  417. Heirarchical Menus
  418.  
  419. Heirarchical menus allow a menu item to be the title of a submenu.  Menu
  420. items with a right arrow signify that a submenu is attached.  Heirarchical
  421. menu items must be of the type G_STRING.  As a rule, the Desk Menu of a menu
  422. bar is not allowed to have submenus.
  423.  
  424. Two delay values are used to prevent the rapid appearance and disappearance
  425. of submenus:
  426.  
  427. o   Submenu Display Delay
  428.  
  429.     This delay is used to prevent the rapid flashing of submenus as the mouse
  430.     pointer is dragged thru a menu item with an attached submenu.  The mouse
  431.     pointer must remain within the menu item for the delay period before the
  432.     submenu is displayed.  The default Submenu Display Delay is 1/5 of a
  433.     second.  menu_settings can be used to inquire the current delay value,
  434.     or to set a new delay.
  435.  
  436. o   Submenu Drag Delay
  437.     
  438.     This delay is used to prevent the disappearance of the submenu as the
  439.     mouse pointer is dragged toward the submenu from a menu item.  The default
  440.     Submenu Drag Delay is 10 seconds.  menu_settings can be used to inquire
  441.     the current delay value, or to set a new delay.
  442.  
  443. There are several actions that will cancel the Submenu Drag Delay prematurely:
  444.  
  445. 1)  If the mouse pointer is dragged away from the direction of the submenu,
  446.     the submenu will disappear.
  447.  
  448. 2)  If the mouse pointer remains in the same position after the drag has
  449.     begun, the submenu will also disappear.
  450.  
  451. 3)  If the user clicks on the left mouse button before the mouse pointer has
  452.     entered the submenu, the system will return to the application the menu
  453.     item that started the drag.
  454.  
  455. 4)  If the mouse pointer is dragged vertically into another menu item, the
  456.     submenu will disappear.
  457.  
  458. As a rule, only one level of heirarchical menus should be used.  The actual
  459. number of recursions possible is currently set to 4.
  460.  
  461.  
  462. Pop-Up Menus
  463.  
  464. Pop-up menus are menus that are not in the menu bar.  They can be placed
  465. anywhere on the screen and once displayed, act like any other menu.
  466.  
  467.  
  468. Scrolling Menus
  469.  
  470. When the number of menu items exceeds the menu scroll height, a scroll
  471. indicator appears at the bottom of the menu.  The scroll indicators are
  472. displayed as UP or DOWN ARROWS.  Clicking  on the bottom arrow will scroll
  473. the menu items.  When the last item is shown, the DOWN ARROW indicator
  474. disappears.  Note that as soon as the menu started scrolling, the UP ARROW
  475. indicator appeared at the top of the menu.  This is to show that there are
  476. now menu items in that direction.  The default menu scroll height is 16.
  477. menu_settings can be used to inquire the current menu scroll height, or to
  478. set a new menu scroll height.
  479.  
  480. When the user clicks and holds down the left mouse button, there is a 1/4 of
  481. a second delay after one menu item has scrolled.  After the delay, scrolling
  482. continues uninterrupted.  This delay is used to prevent rapid scrolling for
  483. those just clicking on the scroll indicators.  menu_settings can be used to
  484. inquire the current delay, or to set a new delay.
  485.  
  486. Another delay value is used to slow down the scrolling speed.  This prevents
  487. the menu items from scrolling by too fast.  menu_settings can be used to
  488. inquire the current delay, or to set a new delay.
  489.  
  490. Pop-up menus and submenus might consist of objects other than G_STRINGS.
  491. Such a menu might consist of user-defined objects that display the system's
  492. fill patterns.  The system cannot scroll non-G_STRING object types.  Scrolling
  493. non-G_STRING object types will crash the system.  Pop-up menus and submenus
  494. containing non-G_STRING object types should have its scroll_flag field set to
  495. FALSE.
  496.  
  497. The first-level menus of a menu bar are set to be non-scrollable.  This is
  498. due to the parent-child relationships between the menu titles, menus and
  499. menu items.  Therefore, scrolling is applicable only to pop-up menus and
  500. submenus.
  501.  
  502.  
  503. 5.2 Using the Extended Menu Library
  504.  
  505. The existing Menu Library functions are still applicable to pop-up menus
  506. and submenus.  The Menu Library will continue to have the following
  507. responsibilities:
  508.  
  509. o   displaying the appropriate menu bar for each active application
  510. o   enabling and disabling menu items
  511. o   displaying check marks in menus
  512. o   returning a highlighted menu title to its normal state
  513. o   displaying context-sensitive menu text
  514. o   displaying a desk accessory's name on the Desk Menu
  515.  
  516. To use pop-up menus and submenus in one's application:
  517.  
  518. Create an object tree consisting of a G_BOX and as many G_STRINGS within the
  519. G_BOX as required.  The G_BOX is the menu and the G_STRINGS are the menu
  520. items.  An object tree is not limited to just one menu and can contain one,
  521. two or more menus.  If a menu item is expected to have a submenu attachment,
  522. the G_STRING must be padded with blanks to the width of the menu.
  523.  
  524. The object tree does not need to be created with the Resource Construction
  525. Set.  It can be created  during runtime by the application.  However, the
  526. programmer is responsible for this procedure.
  527.  
  528. Attaching a submenu to a menu item is done by calling menu_attach.  A submenu
  529. is associated to a menu item by placing a right arrow two characters in from
  530. the right edge.  Any characters at that location will be overwritten.
  531.  
  532. In addition, the high-byte of the object's type field is used to store an
  533. internal Menu ID.  The values between 128 and 192 are used by the new
  534. menu sytem.  Value one (1) and two (2), are used by a new AES feature.
  535. Currently, the resource contruction program - INTERFACE, uses the values 17
  536. through 22 for their library routines.  The Extended Object Type field
  537. is currently under evaluation at Atari and a forthcoming document will
  538. describe which values are reserved for Atari's internal use only, and which
  539. values are available for application purposes.
  540.  
  541. Each process can have up to 64 unique submenu attachments. Attaching the
  542. same submenu to multiple menu items counts as one attachment.
  543.  
  544. In addition to attaching a submenu, menu_attach can be used to change or
  545. remove a submenu. menu_attach can also be used to find out what submenu,
  546. if any, is attached to a menu item. menu_istart can be used to set and get
  547. the starting menu item of a submenu.
  548.  
  549. menu_settings can be used to set the menu delay values and to set the height
  550. at which pop-up menus and submenus will start to scroll.
  551.  
  552.  
  553. 5.2.1 Using a Menu Bar
  554.  
  555. Supplement to 5.2  Using the Menu Library
  556.  
  557. When the user chooses an item, the Screen Manager writes a message to the
  558. pipe.  Control then returns to the application, which must read the pipe.
  559.  
  560. The pipe message contains the following:
  561.  
  562. o   a code indicating that it is a menu message ( MN_SELECTED )
  563. o   the object index of the menu title selected
  564. o   the object index of the menu item chosen
  565. o   the object tree of the menu item chosen ( NEW )
  566. o   the object index of the parent of the menu item ( NEW )
  567.  
  568. ( If the user does not choose an item, or if the user selects a disabled
  569. menu item,  the Screen Manager does not write a message to the pipe. )
  570.  
  571. After processing the chosen item, the application makes a Menu Library call
  572. to dehighlight the menu title and waits for the next message to come through
  573. the message pipe.
  574.  
  575.  
  576. 5.3-b Extended Menu Library Routines
  577.  
  578. The additions to the Menu Library routines are:
  579.  
  580. o   menu_popup:    Displays a menu anywhere on the screen.  Clipping is
  581.                    performed for a standard menu.  Menus with user-defined
  582.                    objects will have to perform their own clipping.
  583.  
  584. o   menu_attach:   Lets an application attach, change, remove or inquire
  585.                    about a submenu associated with a menu item.
  586.  
  587. o   menu_istart:   Lets an application set and inquire the starting menu
  588.                    item of a pop-up menu or submenu
  589.  
  590. o   menu_settings: Lets an application set and inquire the delay and height
  591.                    parameters of the submenus.
  592.  
  593.  
  594. menu_popup and menu_attach use a new structure for passing and receiving
  595. submenu data.  The MENU structure is defined as follows:
  596.  
  597.    typedef struct _menu
  598.    {
  599.       OBJECT *mn_tree;   - the object tree of the menu
  600.       WORD    mn_menu;   - the parent object of the menu items
  601.       WORD    mn_item;   - the starting menu item
  602.       WORD    mn_scroll; - the scroll field status of the menu
  603.                            0  - The menu will not scroll
  604.                            !0 - The menu will scroll if the number of menu
  605.                                 items exceed the menu scroll height. The
  606.     non-zero value is the object at which
  607.     scrolling will begin.  This will allow one
  608.     to have a menu in which the scrollable region
  609.     is only a part of the whole menu.  The value
  610.     must be a menu item in the menu.
  611.     
  612.                                 menu_settings can be used to change the menu
  613.                                 scroll height.
  614.  
  615.                          NOTE: If the scroll field status is !0, the menu
  616.                                items must consist entirely of G_STRINGS.
  617.       WORD   mn_keystate; - The CTRL, ALT, SHIFT Key state at the time the
  618.        mouse button was pressed.
  619.    }MENU;
  620.  
  621. menu_settings uses a new structure for setting and inquiring the submenu
  622. delay values and the menu scroll height.  The delay values are measured in
  623. milliseconds and the height is based upon the number of menu items.
  624.  
  625.     typedef struct _mn_set
  626.     {
  627.        LONG  Display; - the submenu display delay
  628.        LONG  Drag;    - the submenu drag delay
  629.        LONG  Delay;   - the single-click scroll delay
  630.        LONG  Speed;   - the continuous scroll delay
  631.        WORD  Height;  - the menu scroll height
  632.     }MN_SET;
  633.  
  634. o  Submenu Display Delay:
  635.  
  636.    The delay is used to prevent the rapid flashing of submenus as the mouse
  637.    pointer is dragged thru a menu item with an attach submenu.  The default
  638.    value is 200 milliseconds ( 1/5th of a second ).
  639.  
  640. o  Submenu Drag Delay:
  641.  
  642.    The delay is used to prevent the disappearance of the submenu as the mouse
  643.    pointer is dragged toward the submenu from a menu item.  The default value
  644.    is 10000 milliseconds ( 10 seconds ).
  645.  
  646. o  Single-Click Scroll Delay:
  647.   
  648.    This is the delay period after one menu item has initiallly scrolled.
  649.    After the delay, scrolling continues at the rate specified by the
  650.    Continuous Scroll Delay.  The delay is used to prevent rapid scrolling for
  651.    those just clicking on the scroll indicators.  The default value is
  652.    250 milliseconds ( 1/4th of a second ).
  653.  
  654. o  Continuous Scroll Delay:
  655.  
  656.    This is the delay period after each menu item has scrolled.  The delay is
  657.    used to slow down the scrolling speed.  The default value is 0 milliseconds.
  658.  
  659. o  Menu Scroll Height:
  660.  
  661.    This value is the height at which a pop-up menu or a submenu will start to
  662.    scroll if its scroll field is TRUE.  The default value is 16 menu items.
  663.  
  664. The following sections describe these routines.
  665.  
  666.  
  667. -------------------------------------------------------------------------------
  668.  
  669. 5.3.7 MENU_POPUP
  670.  
  671. Purpose:
  672.  
  673. Allows an application to display a popup menu anywhere on the screen.  The
  674. popup menu may also have submenus.  If the number of menu items exceed the
  675. menu scroll height, the menu may also be set to scroll.  menu_settings can
  676. be used to set the height at which all menus will start to scroll.
  677.  
  678. Parameters:
  679.  
  680.      control(0)  =  36
  681.      control(1)  =  2
  682.      control(2)  =  1
  683.      control(3)  =  2
  684.      control(4)  =  0
  685.  
  686.      int_in(0)   =  me_xpos
  687.      int_in(1)   =  me_ypos
  688.  
  689.      int_out(0)  =  me_return
  690.  
  691.      addr_in(0)  =  me_menu
  692.      addr_in(1)  =  me_mdata
  693.  
  694. o    me_xpos - the left edge of where the starting menu item will be displayed
  695.  
  696. o    me_ypos - the top edge of where the starting menu item will be displayed
  697.  
  698. o    me_return - a coded return message
  699.  
  700.                  0 - FAILURE: The data returned by me_mdata is invalid
  701.                  1 - SUCCESS: The data returned by me_data is valid
  702.  
  703.      FAILURE is returned if the user did not click on an enabled menu item
  704.  
  705. o    me_menu  - pointer to the pop-up MENU structure.  The structure must be
  706.                 initialized with the object tree of the pop-up menu, the menu
  707.                 object, the starting menu item and the scroll field status.
  708.  
  709. o    me_mdata - pointer to the data MENU structure.  If menu_popup returns
  710.                 TRUE,  me_mdata will contain information about the submenu
  711.                 that the user selected.  This includes the object tree of the
  712.                 submenu, the menu object, the menu item selected and the
  713.                 scroll field status for this submenu.
  714.  
  715.  ------------------------------------------------
  716.  
  717.         Sample call to C language binding:
  718.  
  719.         me_return = menu_popup( MENU *me_menu, word me_xpos, word me_ypos,
  720.                                 MENU *me_mdata);
  721.  
  722.  
  723.  
  724. -------------------------------------------------------------------------------
  725.  
  726. 5.3.8 MENU_ATTACH
  727.  
  728. Purpose:
  729.  
  730. Allows an application to attach, change, remove or inquire about a submenu
  731. associated with a menu item.
  732.  
  733. Parameters:
  734.  
  735.      control(0)  =  37
  736.      control(1)  =  2
  737.      control(2)  =  1
  738.      control(3)  =  2
  739.      control(4)  =  0
  740.  
  741.      int_in(0)   =  me_flag 
  742.      int_in(1)   =  me_item
  743.  
  744.      int_out(0)  =  me_return
  745.  
  746.      addr_in(0)  =  me_tree
  747.      addr_in(1)  =  me_mdata
  748.  
  749. o  me_flag - the action to be performed by menu_attach.
  750.   
  751.    The options for me_flag are:
  752.  
  753.    0  Inquire data about the submenu that is associated with the menu item.
  754.       The data concerning the submenu is returned in me_mdata.
  755.  
  756.    1  Attach or change a submenu associated with a menu item.  me_mdata must
  757.       be initialized by the application.  The data must consist of the object
  758.       tree of the submenu, the menu object, the starting menu item and the
  759.       scroll field status.  Attaching a NULLPTR structure will remove the
  760.       submenu associated with the menu item.  There can be a maximum of 64
  761.       associations per process.
  762.  
  763.    2  Remove a submenu associated with a menu item.  me_mdata should be set
  764.       to NULLPTR.
  765.  
  766. o  me_item - the menu item that the submenu will be attached to
  767.  
  768. o  me_return - a coded return message
  769.  
  770.    0 - FAILURE: the submenu was not attached for whatever reasons
  771.    1 - SUCCESS: the submenu was attached, changed or removed successfully
  772.  
  773. o  me_tree - the object tree of the menu item that will have a submenu
  774.              attach to
  775.  
  776. o  me_mdata - pointer to the MENU structure. The contents of me_mdata are
  777.               dependant upon the value of me_flag:
  778.  
  779.    0  Upon return from menu_attach, me_mdata will contain the MENU data
  780.       regarding the submenu associated with the menu item.
  781.  
  782.    1  me_mdata must be initialized with the new submenu MENU data.
  783.       The submenu will be attached to the menu item - me_item.
  784.  
  785.    2  me_mdata should be set to NULLPTR.  The submenu associated with the
  786.       menu item will be removed.
  787.  
  788.    ------------------------------------------------
  789.  
  790.    Sample call to C language binding:
  791.  
  792.    me_return = menu_attach( word me_flag, object *me_tree, word me_item,
  793.                             MENU *me_mdata );
  794.  
  795.  
  796. -------------------------------------------------------------------------------
  797.  
  798.  
  799. 5.3.9 MENU_ISTART
  800.  
  801. Purpose:
  802.  
  803. Allows an application to set or inquire the starting menu item of a submenu
  804. that is associated with a menu item.  The submenu is shifted vertically so
  805. that the starting menu item is aligned with the menu item that is associated
  806. with this submenu.
  807.  
  808. Parameters:
  809.  
  810.      control(0)  =  38
  811.      control(1)  =  3
  812.      control(2)  =  1
  813.      control(3)  =  1
  814.      control(4)  =  0
  815.  
  816.      int_in(0)   =  me_flag
  817.      int_in(1)   =  me_imenu
  818.      int_in(2)   =  me_item
  819.  
  820.      int_out(0)  =  me_return
  821.  
  822.      addr_in(0)  =  me_tree
  823.  
  824. o    me_flag - the action to be performed by menu_istart
  825.  
  826.      0  Inquire the starting menu item for the submenu
  827.  
  828.      1  Set the starting menu item for the submenu to be me_item
  829.  
  830. o    me_imenu - the menu object of the submenu that is either to be set
  831.                 or inquired
  832.  
  833. o    me_item - the starting menu item that is either to be set or inquired
  834.  
  835. o    me_return - a coded return message
  836.  
  837.      0 - FAILURE: the submenu is not associated with a menu item.  The
  838.                   submenu must be attached via menu_attach before this
  839.                   call can be made.
  840.  
  841.      >0 - SUCCESS: the starting menu item is currently set to this value.
  842.  
  843. o    me_tree - the object tree of the menu item that we are setting or
  844.                inquiring about
  845.  
  846.      ------------------------------------------------
  847.  
  848.      Sample call to C language binding:
  849.  
  850.      me_return = menu_istart( word me_flag, object *me_tree, word me_imenu,
  851.                               word me_item );
  852.  
  853.  
  854. -------------------------------------------------------------------------------
  855.  
  856.  
  857. 5.3.10 MENU_SETTINGS
  858.  
  859. Purpose:
  860.  
  861. Allows an application to set or inquire the submenu delay values and the
  862. menu scroll height value.
  863.  
  864. Parameters:
  865.  
  866.      control(0)   =  39
  867.      control(1)   =  1
  868.      control(2)   =  1
  869.      control(3)   =  1
  870.      control(4)   =  0
  871.  
  872.      int_in(0)    =  me_flag
  873.  
  874.      int_out(0)   =  me_return
  875.  
  876.      addr_in(0)   =  me_values
  877.  
  878.  
  879. o    me_flag - the action to be taken by menu_settings
  880.  
  881.      0  Inquire the current delay and menu scroll height values.
  882.      1  Set the delay and menu scroll height values
  883.  
  884. o    me_return - always returns 1 ( one )
  885.  
  886. o    me_values - pointer to the MN_SET structure.  me_values is dependant
  887.                  upon the value of me_flag:
  888.  
  889.      0   Upon the return of menu_settings, me_values will contain the
  890.          current delay and menu scroll height values.
  891.  
  892.      1   me_values must be initialized.  The delay and menu scroll height
  893.          values will be set to those values found in me_values.  A value
  894.          set to NIL will be ignored.
  895.  
  896.      ------------------------------------------------
  897.  
  898.      Sample call to C language binding:
  899.  
  900.      me_return = menu_settings( word me_flag, MN_SET *me_values );
  901.  
  902.  
  903.  
  904.  
  905. AES Supplemental Documentation
  906. ---------------------------------------------------------------------------
  907. The following section contains documentation supplemental to the existing
  908. AES manual, and clarifications of existing documentation related to
  909. heirarchical submenus and the menubar.
  910.  
  911.  
  912. Supplement to: 4.2.5.2 MN_SELECTED
  913.  
  914. GEM AES uses this message to notify an application that a user has selected
  915. a menu item.
  916.  
  917. o   word 0   = 10
  918. o   word 3   = the object index of the menu title selected
  919. o   word 4   = the object index of the menu item selected
  920. o   word 5,6 = the object tree of the menu item selected
  921. o   word 7   = the parent object of the menu item selected
  922.  
  923.  
  924.  
  925.  
  926. 5.4.1 Pop-Up Menus
  927.  
  928. o   The button on a dialog box that brings up a pop-up menu should be shadowed.
  929.  
  930. o   It would be nice if the pop-up menu was shadowed also.
  931.  
  932. o   While the pop-up menu is displayed, if it has a title, the title should
  933.     be inverted.
  934.  
  935. o   The pop-up menu should be aligned on a byte boundary.  This speeds up
  936.     the drawing of the menu considerably.
  937.  
  938. o   The pop-up menu will be shifted vertically in order to line up the start
  939.     object with the given coordinates.
  940.  
  941. o   If the menu exceeds the top of the screen, it will be shifted down.
  942.  
  943. o   No horizontal adjustments will be done to the menu.
  944.  
  945.  
  946.  
  947.  
  948. 5.4.2 Submenus
  949.  
  950. o   Menu items expecting a submenu attachment must be of type G_STRING.
  951.  
  952. o   Menu items should be padded with blanks to the width of the menu.
  953.  
  954. o   Menu items expecting a submenu attachment should not have any keyboard
  955.     short-cut characters.
  956.  
  957. o   Submenus will automatically be displayed on a byte boundary.
  958.  
  959. o   The menu will be shifted vertically to align the start object with the
  960.     menu item.  In addition, the menu will be shifted to remain entirely on
  961.     the screen in the vertical plane.
  962.  
  963. o   The submenu will be displayed at the right edge of the menu item.  If the
  964.     menu extends off the edge of the screen, the menu will be displayed to
  965.     the left of the menu item.  If it exceeds the left edge of the screen,
  966.     the menu will be shifted right a character at a time, until it fits.
  967.  
  968. o   There can be a maximum of 64 submenu attachments per process.
  969.  
  970. o   A menu item with an attached submenu uses the high-byte of its object
  971.     type field.  Values 128 thru 192 are used by the submenu menu system.
  972.     Value one (1) and two (2), are used by a new AES feature.  Please note that
  973.     the Interface program already uses values 17 thru 22 for its library
  974.     routines.  The Extended Object Type field is currently under evaluation
  975.     at Atari.  A forthcoming document will describe which values are
  976.     reserved for Atari's internal use and which are available for
  977.     application purposes.
  978.  
  979. o   A submenu should not be attached to itself.
  980.  
  981. o   Attaching a submenu to different menu items counts as one attachment.
  982.     There will only be one scroll flag and one start object.
  983.  
  984. o   As a user interface guideline, there should only be one level of
  985.     heirarchical menus.  The system currently allows up to four levels
  986.     of recursion.
  987.  
  988. o   menu_istart works only on submenus attached with menu_attach.
  989.  
  990.  
  991.  
  992.  
  993. 5.4.3 Scrolling Menus
  994.  
  995. o   In order to scroll properly, all menu items must be G_STRINGS.  Menus
  996.     that contain objects other than G_STRINGS should set the scroll flag
  997.     to 0.
  998.  
  999. o   The first-level menus of a menu bar are not scrollable.
  1000.  
  1001. o   Pop-up menus and submenus with greater than sixteen items can be
  1002.     scrolled if their scroll flag is set.  The number of items to scroll at
  1003.     can be adjusted with menu_settings.
  1004.  
  1005. o   If the pop-up menu or submenu is designed to be a toolbox,
  1006.     (ie: fill patterns ), set the scroll flag to FALSE.
  1007.  
  1008. o   Setting the scroll flag to one of the menu items will initiate
  1009.     scrolling from that menu item if the number of items exceeds the
  1010.     menu height limit.
  1011.  
  1012. o   One should NOT set the scroll object to the last menu item of a menu.
  1013.  
  1014. o   Setting the scroll object to a value less than the first menu item
  1015.     defaults to the first menu item.
  1016.  
  1017. o   Setting the scroll object to a value greater than or equal to
  1018.     the last menu item defaults to the first menu item.
  1019.  
  1020.  
  1021.  
  1022. -----------------------------------------------------------------------------
  1023.  
  1024.  
  1025. 5.3.1     MENU_BAR
  1026.  
  1027.    Purpose:
  1028.  
  1029.      Displays or erases the application's menu bar
  1030.  
  1031.      The  application  should always call MENU_BAR to  erase  the
  1032.      menu prior to its APPL_EXIT call.
  1033.  
  1034.      V4.0
  1035.  
  1036.      If  me_bshow  is -1,  the menu_bar will  become  an  inquiry
  1037.      call  in which it will return the current menu  owner's  AES
  1038.      process id. If the return value is -1, then there is no menu
  1039.      bar owner.
  1040.  
  1041.      It is important to point out that the current menu bar  can
  1042.      be swappped out at any time.  If the application  wants  to
  1043.      update or redraw its menu bar,  it is recommended to  first
  1044.      check to see if it still own the menu bar and then  proceed
  1045.      to its functions.  However,  the menu bar owner can still be
  1046.      changed after menu_bar call.  So the safest way to do  menu
  1047.      bar update function should be as follow:
  1048.  
  1049.  
  1050.      wind_update(1);     /* wait until the screen stable down  */
  1051.                          /* no nobody can change the menu      */
  1052.  
  1053.      id = menu_bar( 0x0L, -1 );
  1054.  
  1055.      if ( id == my_id )
  1056.      {
  1057.         /* update the menu and draw it */
  1058.      }
  1059.      else
  1060.      {
  1061.         /* update the menu but don't draw it */
  1062.  
  1063.      }
  1064.  
  1065.      wind_update(0);
  1066.  
  1067.  
  1068.    Parameters:
  1069.  
  1070.      control[0] = 30
  1071.      control[1] = 1
  1072.      control[2] = 1
  1073.      control[3] = 1
  1074.      control[4] = 0
  1075.  
  1076.      int_in[0]  = me_bshow
  1077.      int_out[0] = me_breturn
  1078.      addr_in[0] = me_btree
  1079.  
  1080.  
  1081.       me_bshow - a code for whether the application displays  the
  1082.                  menu bar.
  1083.  
  1084.       0 - erase the menu bar
  1085.       1 - display the menu bar
  1086.  
  1087.       V4.0
  1088.  
  1089.       -1 - Inquire current menu owner.
  1090.  
  1091.      me_breturn - a coded return message.
  1092.  
  1093.      0 - an error exists
  1094.      n ( positive integer ) - no error exists
  1095.  
  1096.      For inquiry mode, -1 indicates no menu owner, otherwise n is
  1097.      the current menu owner's AES id.
  1098.  
  1099.  
  1100.      me_btree - the address of the object tree that  forms  this
  1101.                 menu.
  1102.  
  1103.  
  1104. Sample call to C language binding:
  1105.  
  1106.    me_breturn = menu_bar( me_btree, me_bshow );
  1107.  
  1108.  
  1109. ---------------------------------------------------------------
  1110.  
  1111. 5.3.6     MENU_REGISTER
  1112.  
  1113. Purpose:
  1114.  
  1115.      Places  a desk accessory's menu item string on the menu  and
  1116.      returns the accessory's menu item identifier.
  1117.  
  1118.      The menu can list no more than six desk accessories.
  1119.  
  1120.      V4.0
  1121.  
  1122.      The AES can handle as many accessories as possible  provided
  1123.      that  the  drop-down  menu is tall enough to  hold  all  the
  1124.      accessories'  name or that is enough memory to load  in  all
  1125.      the accessories.
  1126.  
  1127.      Applications can call menu_register to change the name that
  1128.      appears in the menu bar for that application.  The parameters
  1129.      are the same.
  1130.  
  1131. Parameters:
  1132.  
  1133.      control[0] = 35
  1134.      control[1] = 1
  1135.      control[2] = 1
  1136.      control[3] = 1
  1137.      control[4] = 0
  1138.  
  1139.      int_in[0] = me_rapid
  1140.      int_out[0] = me_rmenuid
  1141.      addr_in[0] = me_rpstring
  1142.  
  1143. Description:
  1144.  
  1145.      me_rapid - The AES process identifier of the desk accessory or
  1146.                 application.  This value  is the ap_id returned  by  the
  1147.                 appl_init call.
  1148.  
  1149.                 If this value equals -1,  the me_rpstring will be
  1150.                 used to replace the current accessory's  process
  1151.                 name.
  1152.  
  1153.      me_rmenuid - The desk accessory's or application's menu item
  1154.   identifier.
  1155.  
  1156.                   -1 - no more room on the menu.
  1157.  
  1158.      me_rpstring - The address of the desk accessory's or application's
  1159.                    menu  text string.  This string must contain no more
  1160.                    than 8  characters and must be ended with a dot or
  1161.                    null.
  1162.  
  1163.  
  1164. Sample call to C language binding:
  1165.  
  1166.   me_rmenuid = menu_register( me_rapid, me_rpstring );
  1167.  
  1168. --------------------------------------------------------
  1169.  
  1170. 12.3.6    RSRC_RCFIX
  1171.  
  1172. Purpose:
  1173.  
  1174.      V4.0
  1175.  
  1176.      Fixes up a raw resource data that is already loaded into the
  1177.      memory by the application.
  1178.  
  1179.      - It converts all the object's locations and sizes into pixel
  1180.        coordinates.
  1181.      - The resource must be the same as those generated by the
  1182.        resource construction set.
  1183.      - If there is another resource already loaded into the system for the
  1184.        application, the application is required to do a rsrc_free  to free
  1185.        up the memory before calling this function.
  1186.      - Application still needs to do rsrc_free before terminate.
  1187.  
  1188.  
  1189. Parameters:
  1190.      control[0] = 115
  1191.      control[1] = 0
  1192.      control[2] = 1
  1193.      control[3] = 1
  1194.      control[4] = 0
  1195.  
  1196.      int_out[0] = rc_return
  1197.      addr_in[0] = rc_header
  1198.  
  1199.      rc_return = Return value, always equals to 1
  1200.      rc_header = Resource header memory  location.  It  must  be
  1201.                  followed by resource data.
  1202.  
  1203. Sample call to C language binding:
  1204.  
  1205.      rc_return = rsrc_rcfix( rc_header );
  1206.  
  1207. ---------------------------------------------------------------------
  1208.  
  1209. 13.3.5    SHEL_GET
  1210.  
  1211. Purpose:
  1212.  
  1213.   Lets an application read data from the AES's internal shell buffer.
  1214.  
  1215.   The length of the buffer should not be more than 1024 bytes.
  1216.  
  1217.   V4.0
  1218.  
  1219.      sh_greturn - returns the size of the data.  The data can be
  1220.      longer than 1024 bytes.  The application's buffer will not be
  1221.      filled with more than sh_glen bytes, even if there is more
  1222.      data in AES's internal buffer.
  1223.      
  1224.      5/5/92
  1225.      If sh_glen is -1, it is the inquiry mode. 
  1226.  
  1227. Parameters:
  1228.  
  1229.   control(0) = 122
  1230.   control(1) = 1
  1231.   control(2) = 1
  1232.   control(3) = 1
  1233.   control(4) = 0
  1234.  
  1235.   int_in(0)  = sh_glen
  1236.  
  1237.   addr_in(0) = sh_gbuff
  1238.  
  1239.   int_out(0) = sh_greturn
  1240.  
  1241.  
  1242. Description:
  1243.  
  1244.   sh_greturn - a coded return message
  1245.  
  1246.   0 - an error exists
  1247.   n ( positive integer ) - no error exists
  1248.  
  1249.   sh_glen - the length of the buffer.
  1250.  
  1251.      If the value is -1, it is the inquiry mode in which sh_greturn will
  1252.      return the size of the current shel_get buffer.  
  1253.  
  1254.  
  1255.   sh_gbuff - the address of the buffer.
  1256.  
  1257.  
  1258. Sample call to C language binding:
  1259.  
  1260.   sh_greturn = shel_get( sh_gbuff, sh_glen );
  1261.  
  1262.  
  1263. ---------------------------------------------------------------------
  1264.  
  1265. 13.3.6    SHEL_PUT
  1266.  
  1267. Purpose:
  1268.  
  1269.   Lets the application save data into the AES's shell internal
  1270.   buffer.
  1271.  
  1272. Note:
  1273.   Currently,  the  AES desktop is using this buffer to store  the
  1274.   desktop.inf data.   Any usage of this buffer may  corrupt  the
  1275.   data that are already stored in there.
  1276.  
  1277.   The length of the data that goes into the buffer should not be
  1278.   more than 1024 bytes.
  1279.  
  1280.   V4.0
  1281.  
  1282.      The AES will allocate memory to store the data if the
  1283.      current buffer size is smaller than the sh_plen size. The
  1284.      default buffer size is 1024 bytes and the maximum size
  1285.      must be be less than 32K bytes.
  1286.  
  1287. Parameters:
  1288.  
  1289.   control(0) = 123
  1290.   control(1) = 1
  1291.   control(2) = 1
  1292.   control(3) = 1
  1293.   control(4) = 0
  1294.  
  1295.   int_in(0)  = sh_plen
  1296.  
  1297.   addr_in(0) = sh_pbuff
  1298.  
  1299.   int_out(0) = sh_preturn
  1300.  
  1301.  
  1302.   sh_preturn - a coded return message
  1303.  
  1304.   0 - an error exists
  1305.   n ( positive integer ) - no error exists
  1306.  
  1307.   sh_plen - the length of the buffer.
  1308.  
  1309.   sh_pbuff - the address of the buffer.
  1310.  
  1311.  
  1312. Sample call to C language binding:
  1313.  
  1314.   sh_preturn = shel_put( sh_pbuff, sh_plen );
  1315.  
  1316. -------------------------------------------------------------------
  1317.  
  1318.       Update 5/7/92
  1319.  
  1320.  
  1321.  Changes in mode 4, 5, and 7
  1322.  New shel_write mode 9 and 10
  1323.  
  1324.  
  1325.  
  1326.  
  1327. 13.3.2    SHEL_WRITE    
  1328.  
  1329. Purpose:
  1330.  
  1331.      Tells GEM AES whether to run another application and, if so,
  1332.      which application to run.
  1333.  
  1334.      sh_wreturn = shel_write( sh_wdoex, sh_wisgr, sh_wiscr,
  1335.                               sh_wpcmd, sh_wptail );
  1336.  
  1337.      V4.0
  1338.  
  1339.      Shel_write is expanded to have multiple functionalities. Please
  1340.      study the following documentation carefully.
  1341.  
  1342.  
  1343.   -> Sh_wodex: 0 - Launch program. The actual sh_wisgr value will be determined
  1344.      by the AES.
  1345.         1 - Launch an application
  1346.              3 - Launch an accessory.
  1347.  
  1348.      ( value 2 is reserved )
  1349.  
  1350.      Default directory will be set according to the file's full path
  1351.      except for the extended mode if bit 10 is set.
  1352.  
  1353.      AES will create a process of that application and will not wait
  1354.      for it to terminate (i.e. the process is started concurrently).
  1355.  
  1356.      sh_wreturn will return the process's AES id. If it is 0, an
  1357.      error exists.
  1358.  
  1359.      If sh_wodex is 0, the AES will determine the actual launching mode by
  1360.      looking at the file's extension.  What file extensions are considered
  1361.      for launching is determined by the AES environment variables GEMEXT,
  1362.      TOSEXT, and ACCEXT.
  1363.  
  1364.      Sh_wisgr: This parameter is only valid when Sh_wodex is 1
  1365.  
  1366.         1 for GEM application
  1367.         0 for TOS application
  1368.  
  1369.  
  1370.      The launching a non-gem (TOS) type application by shel_write is implemented
  1371.      in the following way:
  1372.  
  1373.      The AES will look into the environment for a variable named TOSRUN. It
  1374.      should contain a full path of a tos handler program to which the AES will
  1375.      pass the current (TOS) program name into the command tail. If there is an
  1376.      error, of launching this tos handler program, AES will return immediately.
  1377.      If TOSRUN does not exist, the AES will use the default way ( MW.PRG's message
  1378.      pipe method ) to launch that program.
  1379.  
  1380.      For example:
  1381.  
  1382.      Launch a program named C:\E.TOS and the current TOSRUN=C:\BIN\TOSHAND.PRG
  1383.  
  1384.      The following action will take place:
  1385.  
  1386.      The TOSHAND.PRG will be launched, the command tail will be preserved.
  1387.      However, an ARGV= will be created in the environment in the following way.
  1388.   
  1389.      ARGV=\0
  1390.      C:\E.TOS\0 
  1391.      file1\0 ( If there is any )
  1392.      file2\0 ( If there is any )
  1393.      \0
  1394.   
  1395.      Note:
  1396.  
  1397.      The TOSHAND.PRG will be launched as a GEM program regardless of its real
  1398.      type. The PATH will not be used to search the program so that TOSHAND.PRG
  1399.      can use TOSRUN to locate where it is. 
  1400.  
  1401.  
  1402.      Sh_wiscr: Request AES for setting up ARGV style parameter passing in the
  1403.         environment string
  1404.  
  1405.         0 - No
  1406.         1 - Yes
  1407.  
  1408.      This feature is intended for application which passes one or more
  1409.      arguments in the command tail.
  1410.  
  1411.      The AES will extract arguments from the command tail (seperated
  1412.      by spaces) and construct an ARGV element (as the last element) in
  1413.      the environment in the following fashion:
  1414.  
  1415.  ARGV=\0
  1416.  Progam name\0
  1417.  Argument1\0
  1418.  Argument2\0
  1419.  Argument3\0
  1420.  \0
  1421.  
  1422.      A value of 0x7f will be put into the first byte of original command tail to
  1423.      indicate a valid ARGV presents in the environment, application should ignore
  1424.      the content in the command tail.    5/22/92
  1425.  
  1426.      See The Atari Extended Argument Specification (ARGV), a separate
  1427.      document.
  1428.  
  1429.      -----------------------------------------------------------------
  1430.  
  1431.      More special features ( Extended mode ):
  1432.  
  1433.      The shel_write call also allows the user to launch the program or
  1434.      accessory in a customized way. The high byte ( bit 15 to bit 8 ) of
  1435.      sh_wodex is checked to see if any of the bits is set. If so, it is
  1436.      an extended call. Each bit is assigned to have a special meaning, the
  1437.      low byte meaning is not affected.
  1438.  
  1439.     SH_WODEX
  1440.  
  1441.           High Byte      |    Low Byte  
  1442.      Bit Number: 15 14 13 12 11 10 9 8 | 7 6 5 4 3 2 1 0
  1443.   ----------------------------------------      
  1444.          No Change 
  1445.       8 -> Psetlimit value
  1446.       9 -> Prenice value
  1447.      10 -> Default directory string
  1448.      11 -> Environment string
  1449.      12 -> Reserved
  1450.      13 -> Reserved
  1451.      14 -> Reserved
  1452.      15 -> Reserved
  1453.  
  1454.  
  1455.      In extended mode, sh_wpcmd will be treated as a pointer pointing to a set
  1456.      of long (32 bit) values.  Each value after the first corresponds to
  1457.      one of the bits in sh_wodex: if that bit is set then the corresponding
  1458.      LONG value is used, otherwise it is ignored. The values and their
  1459.      associated bit numbers are as follows:
  1460.  
  1461.      a, LONG[0] Pointer to the program name string ( must be the first element )
  1462.      b, LONG[1] Psetlimit value.    (bit 8)
  1463.      c, LONG[2] Prenice value.     (bit 9)
  1464.      d, LONG[3] Default directory string pointer  (bit 10)
  1465.  
  1466.          The directory path (LONG[3]) should look something like:
  1467.  
  1468.          C:\ or C:\FOLDER or C:\FOLDER1\FOLDER2 ...
  1469.  
  1470.   However, if the pointer is zero, then the default directory will
  1471.   be the directory that the program itself was found in.
  1472.  
  1473.  
  1474.      e, LONG[4] Application defined environment string pointer (bit 11)
  1475.  
  1476. ------------------------------------------------------------------------------
  1477.  
  1478.     PATH SEARCHING
  1479.  
  1480.      When using sh_wodex mode 0, 1, and 3, the program name string
  1481.      (LONG[0]) may contain full path and file name specifying the file to
  1482.      launch, or it may contain simply the name of the program.  In that
  1483.      case, AES will search each directory in the PATH variable in AES'
  1484.      environment for a file with that name and a legal program extension,
  1485.      as specified in the TOSEXT, GEMEXT, and ACCEXT environment variables.
  1486.  
  1487.      In mode 0 and mode 3, ACCPATH variable will be searched also. (4/30/92) 
  1488.  
  1489.      If the program is found using one of the GEMEXT extensions, it is
  1490.      launched as a GEM application.  If it is found using one of the TOSEXT
  1491.      extensions, it is launched like TOS programs are (see elsewhere).  If
  1492.      it is found using one of the ACCEXT extentions, it is loaded as a desk
  1493.      accessory.
  1494.  
  1495.      If the program name string includes an extension, that extension is
  1496.      checked against those in GEMEXT, TOSEXT, and ACCEXT to determine how
  1497.      to launch the program.  If the extension is not found in any of those
  1498.      environment variables, an error is returned.
  1499.  
  1500.      If the supplied program name includes any directory separators
  1501.      (backslashes) or drive specifiers (a letter and a colon) then the
  1502.      path and extension searching will not be done.  If there are no
  1503.      drive or directory specifiers but there is an extension (a dot),
  1504.      then the path searching is done but the extension searching is not.
  1505.      This is illustrated in the following table:
  1506.  
  1507.  PATH NAME      PATH SEARCH     EXT SEARCH
  1508.  -------------      -----------     ----------
  1509.  C:\BIN\MW.PRG   No  No
  1510.  C:\BIN\MW   No  Yes 4/27/92
  1511.  C:\BIN\MW.   No  No
  1512.  \MW.PRG    No  No 
  1513.  MW.PRG    Yes  No
  1514.  MW.    Yes  No
  1515.  MW    Yes  Yes
  1516.  
  1517.      sh_wodex mode 1 explicitly calls for the program to be launched as a
  1518.      GEM application or a TOS application (based on sh_wisgr). Mode 3
  1519.      explicitly calls for the file to be loaded as an accessory. Mode 0
  1520.      causes AES to decide, based on the extension.
  1521.  
  1522.  ----------------------------------------------------------------
  1523.  
  1524.   -> Sh_wodex value 4
  1525.  
  1526.      Set the system in shutdown or normal mode depends on sh_wiscr value.
  1527.  
  1528.      Once the AES is in the shutdown mode, the shel_write launch file capability
  1529.      mode 0-2 will be turned off.
  1530.   
  1531.      sh_wisgr 2 - Complete shutdown mode
  1532.  
  1533.      AES will check for all applications and accessories
  1534.      excluding the caller to make sure they all recognize AP_TERM
  1535.      message. If succeeded, AES will then send out AP_TERM to
  1536.      applications and AC_CLOSE to accessories. Accessories also
  1537.      get AP_TERM after the AC_CLOSE message.
  1538.  
  1539.      Note: the caller will receive none of the messages.
  1540.  
  1541.      sh_wisgr 1 - Partial shutdowm mode
  1542.  
  1543.      AES will check for all applications excluding the caller to
  1544.      make sure they all recognize AP_TERM message. If succeeded,
  1545.      AES will then send out AP_TERM to applications and AC_CLOSE
  1546.      to accessories.
  1547.  
  1548.      Note: the caller will receive none of the messages.
  1549.  
  1550.  
  1551.      sh_wisgr 0 - Abort the shutdown sequence.
  1552.   
  1553.     Note: Only the original caller of shutdown mode can abort
  1554.           the shutdown sequence.
  1555.  
  1556.  
  1557.     Please see shel_write mode 9 of how an application informs AES that it
  1558.     can recognize the AP_TERM message.
  1559.  
  1560.  
  1561.   -> Sh_wodex value 5 ( Changed 9/29/92 )
  1562.  
  1563.      Request the AES to change resolution. The sh_wiscr's value affects the meaning
  1564.      of sh_wisgr. If AES accepts the resolution change request, then it will put the
  1565.      system in SHUT DOWN mode. An application can either shut down and exit or deny
  1566.      tio shut down by sending a AP_TFAIL message to the AES.  
  1567.  
  1568.      a, If sh_wiscr is zero, then sh_wisgr is the physical device id to perform VDI's
  1569.         open physical workstation call.
  1570.  
  1571.         To get the current physical device id, do the Getres()+2.
  1572.  
  1573.         The following are the existing physical device id values:
  1574.  
  1575.      2 -> 320x200 ST Low
  1576.      3 -> 640x200 ST Medium
  1577.      4 -> 640x400 ST High
  1578.      6 -> 640x480 TT Medium
  1579.      8 -> 1280x960       TT High
  1580.      9 -> 320x480        TT Low
  1581.  
  1582.      b, If sh_wiscr is one, then sh_wisgr is the video mode word for use in the
  1583.         FALCON030 machine.
  1584.         Sh_wiscr value from 2 and up are reserved for future use.   
  1585.  
  1586.   -> Sh_wodex value 7
  1587.  
  1588.      Sends a message ( broadcast ) to all processes except AES,SCREEN and the
  1589.      sender.
  1590.  
  1591.      In this mode, the sh_wpcmd will be treated as a pointer pointing to
  1592.      a 16 byte message buffer. Sh_wisgr and sh_wiscr are ignored.
  1593.  
  1594.  
  1595.   -> Sh_wodex value 8
  1596.  
  1597.      This shel_write mode allows applications to manipulate AES environment
  1598.      variables.
  1599.  
  1600.      1, sh_wisgr = 0 Inquire the environment buffer size
  1601.  
  1602.  Sh_wreturn returns the size in bytes
  1603.  
  1604.      2,  sh_wisgr = 1  Add/Remove string
  1605.  
  1606.        In this mode to add or remove an AES environment name.
  1607.  
  1608.        The sh_wpcmd is the new environment string.
  1609.  
  1610.          a, To add a new environemnt string, the input should look like
  1611.  
  1612.             'NEW=STRING\0'
  1613.  
  1614.          b, To remove an environment string, the input should look like
  1615.  
  1616.      'NEW=\0'
  1617.  
  1618.      3, sh_wisgr = 2  Copy the environment buffer
  1619.  
  1620.  The sh_wpcmd is the output buffer in which the AES will copy
  1621.  the current environment buffer to.
  1622.  
  1623.  The output buffer size is specified by sh_wiscr.
  1624.  
  1625.  Sh_wreturn returns the number of bytes not copied.
  1626.  
  1627.  
  1628.  -> Sh_wodex value 9
  1629.  
  1630.     Inform the AES of what kind of new message that the application can
  1631.     recognize. 
  1632.  
  1633.     Sh_wisgr is the input parameter in which each of the 16 bits represents
  1634.     a message type.
  1635.  
  1636.     Bit 0 - AP_TERM
  1637.     Bit 1-15 Not defined at this moment.
  1638.  
  1639.  
  1640.  -> Sh_wodex value 10
  1641.  
  1642.     Send the AES a message.
  1643.  
  1644.     Sh_wpcmd is the 16 byte message buffer  
  1645.  
  1646.  
  1647.  
  1648. Parameters:
  1649.      control(0) = 121
  1650.      control(1) = 3
  1651.      control(2) = 1
  1652.      control(3) = 2
  1653.      control(4) = 0
  1654.  
  1655.      int_in(0)  = sh_wdoex
  1656.      int_in(1)  = sh_wisgr
  1657.      int_in(2)  = sh_wiscr
  1658.  
  1659.      int_out(0) = sh_wreturn
  1660.  
  1661.      addr_in(0) = sh_wpcmd
  1662.      addr_in(1) = sh_wptail
  1663.  
  1664.  
  1665. Description:
  1666.  
  1667.      sh_wdoex - a coded instruction to exit the system or run
  1668.                 another application when the user exits the
  1669.                 current application.
  1670.  
  1671.      0 - run application
  1672.      1 - run another application in GEM or TOS mode
  1673.      3 - run an accessory
  1674.      4 - set shutdown mode
  1675.      5 - resolution change
  1676.      7 - send message to all processes
  1677.      8 - AES environment
  1678.  
  1679.      sh_wisgr - function depneds on the sh_wdoex value.
  1680.  
  1681.      sh_wiscr - function depends on the sh_wdoex value.
  1682.  
  1683.      sh_wreturn - return value depends on the sh_wdoex function.
  1684.  
  1685.      sh_wpcmd - the address of the new command file to execute
  1686.  
  1687.      sh_wptail - the address of the command tail for the next
  1688.                  program
  1689.  
  1690.                  The first byte is the length of the command tail, the actual
  1691.                  command tail should start from the second byte position in the
  1692.    buffer and should be NULL terminated.
  1693.    
  1694.    ( 11/03/92 ) 
  1695.    In V4.0, however, if the first byte has a value of 0xFF, the
  1696.    length of the buffer will be determined by AES by looking for
  1697.    the NULL character. In theory, application can pass more than 128
  1698.    or 256 bytes to AES to create a long ARGV enviornment by setting
  1699.    sh_wiscr to one.
  1700.  
  1701.  
  1702. Sample call to C language binding:
  1703.  
  1704.      sh_wreturn = shel_write( sh_wdoex, sh_wisgr, sh_wiscr,
  1705.                               sh_wpcmd, sh_wptail );
  1706.  
  1707.  
  1708.  
  1709. -------------------------------------------------------------------
  1710.  
  1711.                    Supplement to wind_get / wind_set function
  1712.  
  1713.  6/23/92
  1714.  
  1715.  The window redraw message has been greatly optimized. The changes are in the
  1716.  WM_TOP and WM_SIZE of the window messages. For WM_TOP, there will be no redraw
  1717.  message to follow if the window is not being covered, otherwise, the covered
  1718.  areas will be merged to form a big redraw rectangle in the next WM_REDRAW
  1719.  message.
  1720.  
  1721.  For WM_SIZE, no redraw message will be sent if the window is sized from big
  1722.  to small and the x and y coordinates remain the same, otherwise, redraw
  1723.  message will be sent.
  1724.  
  1725.  
  1726.  
  1727.   11.3.5  WIND_GET / WIND_SET
  1728.  
  1729.      wi_gfield - A numerical value describing the wind_get operation
  1730.  
  1731.  
  1732.      WF_TOP - 10 Version 3.3 and up
  1733.  
  1734.    Returns handle in wi_gw1, owner's AES id in wi_gw2
  1735.    and the handle of the window below it in wi_gw3
  1736.  
  1737.      WF_NEWDESK - 14 Version 3.3 and up 
  1738.  
  1739.           Get the current system background window's object
  1740.           pointer. The value is returned in wi_gw1 and wi_gw2.
  1741.  
  1742.      WF_COLOR - 18 Version 3.3 and up  changed 7/8/92
  1743.  
  1744.           Get the window's element color by handle. The value are
  1745.           returned in wi_wg2 and wi_wg3. See also WF_DCOLOR.
  1746.  
  1747.      WF_DCOLOR - 19 Version 3.3 and up  changed 7/8/92
  1748.  
  1749.           Get the default element color. The values are returned in wi_gw2
  1750.    and wi_gw3.
  1751.  
  1752.      Note: The binding for wind_get for getting the window's color elements
  1753.     is as follows:
  1754.  
  1755.     wind_get( wi_handle, wi_field, &wi_gw1, &wi_gw2, &wi_gw3, &wi_gw4 );
  1756.  
  1757.     where wi_gw1 should contain the element number as an input, the
  1758.     output values will be placed in the wi_gw2 and wi_gw3.
  1759.  
  1760.     The wi_gw1 value should be put in the intin[2].
  1761.  
  1762.      WF_OWNER - 20 Version 3.3 and up  changed 7/8/92
  1763.  
  1764.           Get the window owner's AES id, window open status.
  1765.  
  1766.    wi_gw1 returns AES id of the owner
  1767.    wi_gw2 returns if the window is opened ( 1 ) or closed ( 0 )
  1768.    wi_gw3 handle of the window above it
  1769.    wi_gw4 handle of the window below it
  1770.  
  1771.    Note: If the window is closed, the wi_gw3 and wi_gw4 values will be
  1772.   meaningless.
  1773.  
  1774.      WF_BEVENT - 24 Version 3.31 and up changed 7/8/92
  1775.  
  1776.      If you set bit zero of the WF_BEVENT attribute of a window to
  1777.      one, a button click in that window's work area will not cause a
  1778.      WM_TOPPED message to be sent to that window.  Instead, the
  1779.      button click will satisfy evnt_button or the button-click
  1780.      option of an evnt_multi call.
  1781.  
  1782.      Example:
  1783.  
  1784.      To turn on this feature for a particular window, set  bit 0 of
  1785.      wi_sw1 to 1.
  1786.  
  1787.      wind_set( wi_handle, WF_BEVENT, 0x0001, 0, 0, 0 );
  1788.  
  1789.      To turn off this feature for a particular window, set bit 0 of
  1790.      wi_sw1 to 0.
  1791.  
  1792.      wind_set( wi_handle, WF_BEVENT, 0x0000, 0, 0, 0 );
  1793.  
  1794.      To inquire the WF_BEVENT status of a particular window:
  1795.  
  1796.      wind_get( wi_handle, WF_BEVENT, &wi_sw1,&wi_sw2,&wi_sw3,&wi_sw4 );
  1797.  
  1798.      The return value is in the wi_sw1.
  1799.  
  1800.      Note:
  1801.  
  1802.      The rest of the bits and parameters are reserved for future improvement
  1803.      and they should all be zero!
  1804.  
  1805.  
  1806.       WF_BOTTOM - 25 Version 3.31 and up
  1807.  
  1808.      This function mode set an already opened window to the bottom of the
  1809.      window stack ( excluding the background window ) and bring up next logical
  1810.      window to top. However, if the target window is only opend window in the
  1811.      system, this window will still remain on top and be active.
  1812.   
  1813.      Example:
  1814.  
  1815.      To set a particular window to the bottom.
  1816.  
  1817.      wind_set( wi_handle, WF_BOTTOM, 0, 0, 0, 0 );
  1818.  
  1819.      To inquire the current bottom window handle.
  1820.  
  1821.      wind_get( wi_handle, WF_BOTTOM, &wi_sw1,&wi_sw2,&wi_sw3,&wi_sw4 );
  1822.  
  1823.      The handle will return in the wi_sw1;
  1824.  
  1825. -------------------------------------------------------------------
  1826.  
  1827.  
  1828. 11.3.8 WIND_UPDATE
  1829.  
  1830.  
  1831.  V4.0
  1832.  
  1833.  The new 'check and set mode' is defined as follow.
  1834.  
  1835.  If the wi_ubegend value is 257 ( BEG_UPDATE|0x0100 )
  1836.  or 259 ( BEG_MCTRL|0x0100 ). The AES will first check for current
  1837.  wind_update ownership. If nobody owns it or the current owner
  1838.  is the caller itself then normal wind_update procedure will be
  1839.  performed. Otherwise, wind_update will return an error (0) in
  1840.  wi_ureturn.
  1841.  
  1842.  
  1843.  
  1844. -------------------------------------------------------------------
  1845.  
  1846.  
  1847.      The following are the new predefined system messages implemented
  1848.      in the new AES:
  1849.  
  1850.  
  1851.      1, WM_UNTOPPED - 30 Version 3.3 and up
  1852.  
  1853.         word 0 - 30
  1854.         word 3 - window handle
  1855.  
  1856.         This message is sent when the current top window is being untopped
  1857.         by other window.
  1858.  
  1859.  The application doesn't need to take any action. This message is
  1860.  for your information only.
  1861.  
  1862.  By the time this message is received by the owner of the
  1863.  formerly-topped window, that window is not likely to be on top.
  1864.  
  1865.      2, WM_ONTOP - 31  Version 3.3 and up
  1866.  
  1867.  word 0 - 31
  1868.  word 3 - window handle
  1869.  
  1870.  This message is sent when the application's window is placed on
  1871.  top, generally through no action of its own (i.e. another window is
  1872.  closed). The application does not have to take any action.
  1873.  
  1874.  Note: Since a lot of window events can happen between the time the
  1875.        window managers send out this message and the time the
  1876.        application actually receives the message, the window in
  1877.        question may not actually be on top any more.
  1878.  
  1879.      3, AP_TERM - 50 Request to terminate the current process
  1880.     Version 4.0 and up
  1881.  
  1882.         word 0 - 50
  1883.  word 5 - Code identifying the reason of shuting down
  1884.  
  1885.         This message is sent when the system requests that the application
  1886.         terminate.  This occurs, for instance, when the user requests a
  1887.         resolution change.  The response to this message should be to close
  1888.         windows, shut down, and terminate.
  1889.  
  1890.   This message is sent when the system or other applications request
  1891.  the target process ( application or accessory ) to terminate (exit).
  1892.  This may due to a resolution change or simply the other application
  1893.  wants to take over the system.
  1894.  
  1895.  Upon receiving this message and if the process decides to terminate
  1896.  itself, it should proceed with the normal termination sequences like
  1897.  closing all its windows, freeing the resources, free the menu etc.
  1898.  
  1899.  However, process must inform the system if it chooses not to
  1900.  terminate or it has error that prevents it from terminating itself.
  1901.  Use shel_write mode 10 to inform the AES if such situation should
  1902.  arise.
  1903.  
  1904.      From the caller point of view:
  1905.   
  1906.      The caller should check the return code to see if the request is
  1907.      granted or denied.
  1908.  
  1909.      If everything is OK, then caller should go back to its evnt_multi
  1910.      loop to wait for message SHUT_COMPLETED. This message will only be
  1911.      sent to the caller once. The message structure is defined as below:
  1912.  
  1913.      word[0] = SHUT_COMPLETED  (60)
  1914.      word[3] = 1 - Shut down is succeeful, 0 - Shut down failed.
  1915.  
  1916.      If there is an error i.e. word[3] is zero, then word[4] will
  1917.      contain the AES id of the process that has error and word[5] is
  1918.      the actual error code from that process. Otherwise, if the whole
  1919.      shutdown process is succcessful, the caller itself may choose to
  1920.      or not to exit the system depending on its initial purpose of
  1921.             calling this function.  
  1922.  
  1923.  
  1924.      From the receiver point of view:
  1925.  
  1926.      Application willreceive AP_TERM message and accessory will
  1927.      receive the AC_CLOSE during the shutdown. If is is a complete
  1928.      shut down, the accessory will also receive AP_TERM message. 
  1929.  
  1930.      The message structure is defined as below:
  1931.  
  1932.      word[0] = AP_TERM or AC_CLOSE
  1933.      word[5] = Reason for shuting down.
  1934.         For example: AP_TERM for just shuting down
  1935.        AP_RESCHG for changing resolution  
  1936.             
  1937.  
  1938.      If receiver choose not to comply with the request, it should
  1939.      send a AP_TFAIL message to AES by using the shel_write( 10, ... )
  1940.  
  1941.      See also AP_TFAIL message.  
  1942.  
  1943.  
  1944.      4, AP_TFAIL - 51 Fail to terminate or close.
  1945.      Version 4.0 and up
  1946.  
  1947.  This message is sent when the receiver of AP_TERM or AC_CLOSE message
  1948.  decides not to close or terminate or it just has problem somewhere and
  1949.  and would like to inform AES about the problem.
  1950.  
  1951.  The message structure should look like:
  1952.  
  1953.  word[0] = AP_TFAIL (51)
  1954.  word[1] = Your error code
  1955.  
  1956.  This message should be sent by using shel_write( 10 ... ).
  1957.  
  1958.  
  1959.      5, AP_RESCHG - 57  Code identifying reason to terminate or close.
  1960.    Version 4.0 and up
  1961.  
  1962.  This message is used in conjunction with AP_TERM message.
  1963.  
  1964.  
  1965.      6, SHUT_COMPLETED - 60 Version 4.0 and up
  1966.    
  1967.  This message is sent to the initial caller of shuting down.
  1968.  Please read also AP_TERM above.
  1969.   
  1970.  
  1971.      7, RESCH_COMPLETED - 61  Message from AES to report the resolution change
  1972.                condition. Version 4.0 and up
  1973.  
  1974.  This message is sent to the caller who request the AES to do
  1975.  resolution change.
  1976.  
  1977.  When a process requests to do a resolution change and the request
  1978.  is granted. It should wait on this message from the AES.
  1979.  
  1980.  The message structure is defined as follow:
  1981.  
  1982.  word[0] = RESCH_COMPLETED
  1983.  word[3] = 1 for no error, 0 for error
  1984.  
  1985.  If there is no error, the caller must exit the system in order to
  1986.  complete the resolution change process.
  1987.  
  1988.      8, AP_DRAGDROP - 63 Version 4.0 and up
  1989.  word[0] = AP_DRAGDROP
  1990.  word[1] = sender's id
  1991.  word[3] = window, or -1 for a request for a new window
  1992.  word[4] = mouse x
  1993.  word[5] = mouse y
  1994.  word[6] = keyboard state
  1995.  word[7] = pipe name
  1996.  
  1997.  This message is sent by the desktop (or any other application) to
  1998.  another application in order to inform that application that the user
  1999.  has dragged an object to one of its windows, or that the user wishes
  2000.  it to open a new window. See the drag and drop protocol specification
  2001.  for more details on how the two applications negotiate the exchange
  2002.  of data.
  2003.  
  2004.      9, SH_WDRAW - 72 Version 4.0 and up
  2005.  word[0] = SH_WDRAW
  2006.  word[3] = drive affected
  2007.  
  2008.  This message is sent by applications to the desktop to inform it that
  2009.  it should update its windows for a certain drive. word[3]
  2010.  indicates which drive: 0 for drive A:, 1 for drive B:, and so on.
  2011.  If word[3] is -1, then the desktop will update all of its windows.
  2012.  This message is useful an application that is doing file copying
  2013.  or deleting in the background. After the application has modified files
  2014.  on a drive, it should inform the desktop so that the user can see
  2015.  the correct information in his or her windows.
  2016.  
  2017.      10, CH_EXIT - 80  Version 4.0 and up
  2018.  
  2019.  word[0] = CH_EXIT
  2020.  word[3] = Child process's AES id
  2021.  word[4] = Child's exit code
  2022.  
  2023.  This message is sent back to the process when its child process
  2024.  is terminated.
  2025.  
  2026.  Note: Process created by using the shel_write call will be chilren
  2027.        of the AES.  AES remembers what process called shel_write and
  2028.        sends that process CH_EXIT to the caller when the process
  2029.        exits.
  2030.  
  2031. ============================================================================
  2032.                     Discussion of wind_update          3/92
  2033.  
  2034.       Wind_update is a semaphore that lets applications request control
  2035.  of the screen.  The application will either be granted access to
  2036.  the screen or be put on hold until the current owner of the screen
  2037.  semaphore releases its control.
  2038.  
  2039.       The  purpose of wind_update is to let an application take control
  2040.  of the whole screen when it is writing data to the screen or its
  2041.  windows. This function is to ensure the application that after the
  2042.  wind_update( 1 ) is successful, the  status of the screen will
  2043.  remain the same until the wind_update( 0 ) call. Other
  2044.  applications' window open, close, move, etc. calls will be
  2045.  suspended to prevent the state of the screen from changing while it
  2046.  is "locked." It  is especially important to an application that the
  2047.  screen must not change when it is walking the rectangle list
  2048.  (using wind_get(WF_FIRSTXYWH,..) and wind_get(WF_NEXTXYWH,..)).
  2049.  
  2050.  It is recommended that you call wind_update ONLY when necessary for
  2051.  walking the rectangle list and making VDI calls to write to the
  2052.  screen.  Because other processes calling wind_update will block
  2053.  until you let go, it is not a good idea to hold onto the screen
  2054.  semaphore longer than necessary in a multitasking environment.
  2055.  
  2056.  Traditionally, some programs have been written using a model
  2057.  like this:
  2058.  
  2059.   /* lock the screen during initialization */
  2060.   wind_update(TRUE);
  2061.  
  2062.   ...initialize...
  2063.  
  2064.   /* main loop */
  2065.  
  2066.   while (!done) {
  2067.    /* unlock the screen, wait for events */
  2068.    wind_update(FALSE);
  2069.    evnt = evnt_multi(...);
  2070.  
  2071.    /* lock the screen again and process events */
  2072.    wind_update(TRUE);
  2073.  
  2074.    if (evnt & MU_MESAG) {
  2075.     ...
  2076.    }
  2077.    if ...
  2078.   }
  2079.  
  2080.  This is not a good model for AES programming, because the screen is
  2081.  locked at all times, except when the program is blocked waiting for
  2082.  events in its evnt_multi call.  A more correct model for AES
  2083.  programming is to leave the wind_update semaphore alone except at
  2084.  the very moment that you need it, which is during screen updates
  2085.  when you are walking the rectangle list.
  2086.  
  2087. =======================================================================
  2088.  
  2089. Discussion of AES environment variables:
  2090.  
  2091.     NAME     MEANING
  2092.  
  2093.     ACCPATH     A comma-separated list of directories which will be
  2094.       searched for *.ACC at startup time.  When an accessory
  2095.       is found in a given directory, that directory will be
  2096.       the accessory's default directory when it starts. The
  2097.       root directory of the boot device is always searched
  2098.       in addition to any directories appearing in ACCPATH.
  2099.  
  2100.     PATH     A comma-separated list of directories which will be
  2101.       searched for programs when shel_write is called in mode
  2102.       0, 1, or 3.  See shel_write.  In addition, shel_find
  2103.       and rsrc_load will look in all directories in this path
  2104.       when searching for files.
  2105.  
  2106.     TOSEXT     A comma-separated list of extensions which are to be
  2107.       considered "TOS programs."  See shel_write.
  2108.  
  2109.     GEMEXT     A comma-separated list of extensions which are to be
  2110.       considered "GEM programs."  See shel_write.
  2111.  
  2112.     ACCEXT     A comma-separated list of extensions which are to be
  2113.       considered "accessories."  See shel_write.
  2114.  
  2115. ============================================================================
  2116.  
  2117. Discussion of GEM.CNF:
  2118.  
  2119. A file called GEM.CNF may appear in the root directory of the boot device, or
  2120. in a folder called "\MULTITOS."
  2121.  
  2122. It is a text file.  Each line must begin in the first column. A line
  2123. beginning with a number sign ("#") is a comment.  A command in this file is
  2124. separated from its argument with a single space.
  2125.  
  2126. The commands are:
  2127.  
  2128.  setenv <NAME=VALUE>
  2129.  
  2130.      This command places NAME=VALUE in the AES environment.
  2131.  
  2132.  run <program>
  2133.  
  2134.      This command causes AES to run the indicated program at boot
  2135.      time.  The program is launched as a GEM program and is run
  2136.      concurrently, just as if you'd double-clicked it.
  2137.  
  2138.  shell <program>
  2139.  
  2140.      This command launches the indicated program, just like "run"
  2141.      does, but sets a flag inside AES which prevents it from
  2142.      launching the Desktop.  You should use this command if you
  2143.      run a "desktop replacement" program and you don't want the
  2144.      Atari Desktop to appear.
  2145.  
  2146.  AE_SREDRAW=0
  2147.  
  2148.      The AES normally sends a full-screen redraw message when a GEM
  2149.      program starts up (calls appl_init).  If this command is in
  2150.      AES.CNF that message will not be sent.  This will soon be an
  2151.      environment variable instead.
  2152.  
  2153.  AE_TREDRAW=0
  2154.  
  2155.      The AES normally sends a full-screen redraw message when a GEM
  2156.      program finishes (calls appl_exit).  If this command is in
  2157.      AES.CNF that message will not be sent.  This will soon be an
  2158.      environment variable instead.
  2159.  
  2160. EXAMPLES:
  2161.  
  2162.  
  2163.  setenv PATH=.,c:\bin,c:\gem
  2164.  setenv TOSEXT=TOS,TTP
  2165.  setenv GEMEXT=PRG,APP,GTP
  2166.  setenv ACCEXT=ACC
  2167.  setenv ACCPATH=c:\acc
  2168.  run c:\mint\clock.prg
  2169.  shell c:\mint\mw.prg
  2170.  AE_TREDRAW=0
  2171.  AE_SREDRAW=0
  2172.  
  2173. BUGS:
  2174.  
  2175. A program started with "run" or "shell" can't be given arguments.
  2176.  
  2177. The PATH doesn't get searched when a program is started with "run" or
  2178. "shell."
  2179.  
  2180.  
  2181. ========================================================================================
  2182.  
  2183. Color Icon Format (v.2.1)    Sept 8, 1992
  2184.  
  2185. The color icon feature is implemented in AES version 3.3 and up.
  2186.  
  2187. This document specifies the format for TOS color icons.  The format features the ability
  2188. to take advantage of all resolutions and to perform limited animation when an icon is
  2189. selected.  Below is a description of the actual data structure.  The structure itself and
  2190. how it is going to be used is explained in the description that follows.  At the end of
  2191. this document, a file format for a color icon resource file is outlined.
  2192.  
  2193.  
  2194. Data Structure:
  2195.  
  2196. typedef struct cicon_data {
  2197.     int    num_planes;            /* number of planes in the following data */
  2198.     int    *col_data;             /* pointer to color bitmap in standard form */
  2199.     int    *col_mask;             /* pointer to single plane mask of col_data */
  2200.     int    *sel_data;             /* pointer to color bitmap of selected icon */
  2201.     int    *sel_mask;             /* pointer to single plane mask of selected icon */
  2202.     struct cicon_data *next_res;  /* pointer to next icon for a different resolution */
  2203. } CICON;
  2204.  
  2205. typedef struct cicon_blk {
  2206.     ICONBLK monoblk;           /* default monochrome icon */
  2207.     CICON *mainlist;           /* list of color icons for different resolutions */
  2208. } CICONBLK;
  2209.  
  2210. #define G_CICON    33             /* object type number for AES */
  2211.  
  2212.  
  2213. Description:
  2214.  
  2215. The AES Object Library uses the CICONBLK structure to hold the data that defines color
  2216. icons.  The object type G_CICON points with its ob_spec pointer to a CICONBLK
  2217. structure.
  2218.  
  2219. CICONBLK is a color icon block;  a color icon block contains a monochrome icon block
  2220. and a list of color icons.  The list, mainlist, is a linked list of color icons that
  2221. supports different resolutions.  The monochrome icon block, monoblk, is the default
  2222. icon displayed when mainlist does not contain an icon for the current resolution.
  2223. Furthermore, the monochrome icon and all of the color icons in mainlist share the
  2224. dimensions, placement, and all textual information contained in monoblk.
  2225.  
  2226. CICON is the structure that contains the color data.  A CICON can contain pointers to
  2227. two sets of icon data:  one for the color icon, col_data, and one for the color icon in
  2228. its selected state, sel_data.  In both cases, the data is an array of words, and is in
  2229. device-independent format. The number of planes of data is determined by num_planes
  2230. (Note:  In mainlist, CICON's must  have a unique num_planes.).  Each CICON must have a
  2231. valid pointer to data in col_data, but sel_data is optional.  In other words, if
  2232. sel_data is NULL, then when the icon is selected, the icon will be drawn darkened
  2233. (i.e. dithered).  Both col_data and sel_data pointers have masks: col_mask and sel_mask,
  2234. respectively.  Any other CICON's (with a different number of planes) are pointed to by
  2235. next_res.
  2236.  
  2237.  
  2238. File Format:
  2239.  
  2240. The following is a description of the modifications to a GEM Application Resource File to
  2241. include color icons.  In the modifications are minor changes to the existing resource
  2242. file header as well as the resource file itself.  A new array of pointers for extensions
  2243. to the resource file will be attached to the old file format, which will be followed by
  2244. extension data.  For color icons, the extension data consists of a table and color icon
  2245. data.
  2246.  
  2247. The original specification of the Application Resource File consisted of a header which
  2248. was followed by the structures described by the header.  The first word of the header,
  2249. rsh_vrsn, was always zero, but the new version of the header will now contain
  2250. a value that has the third bit on (e.g. 0x0004).
  2251.  
  2252. The array is an extension array.  Each long in the extension array is a specifically
  2253. defined slot that contains information about extensions to the resource file.  The first
  2254. slot must contain the size of the actual file.  The second slot is defined as the offset
  2255. to color icon data structures.  Other slots will be defined at a future date.  If a slot
  2256. contains a 0L, then that is the end of the array, and if a slot contains a -1L, then
  2257. that slot's extension is not used.  Hence, if a resource file contained color icons and
  2258. no other extensions, the array would contain the file size in the first long, an offset
  2259. in the second long, and a 0L in the third.  Note that since the array contains long
  2260. offsets, the resource file can now be larger than 64K.  In addition, the array must
  2261. start on a word boundary.
  2262.  
  2263. The offset found in the color icon slot will point to space reserved for a table of
  2264. pointers.  The table should have as many entries as there are CICONBLK's plus one.
  2265. However, all the pointers should be initialized to 0L, except for the last entry which
  2266. should have a -1L.  After the last entry, the color icon data should follow.  In general,
  2267. the data should consist of one  after another, preserving the structures within the
  2268. resource file except for nsome pointer modifications (see below).
  2269.  
  2270. Within the actual Resource File, objects can now be of G_CICON type.  Given an
  2271. ob_type of G_CICON, the ob_spec will contain a zero-based value of which color icon
  2272. to use.  In other words, if an ob_spec contains a zero, the object will point to the
  2273. first color icon.  This scheme is similar to the monochrome icon format.
  2274.  
  2275. In summary, an Application Resource File that has color icons should consist of two
  2276. sections:  The first section should be a resource file as defined by prior AES
  2277. documentation, except that objects can be of G_CICON type and that the first word is
  2278. now an offset to the second section.  The first section is immediately followed by the
  2279. second which consists of space for an extension array, a table of pointers to color
  2280. icons, and the color icon structures themselves.  The following is a description of how
  2281. the resource file, the table, and the color icon structures should look in the file
  2282. (Note:  Unless specified, all pointers may contain dummy values, and all offsets are
  2283. relative to the beginning of the file.):
  2284.  
  2285. Resource File Header {
  2286.     WORD rsh_vrsn    /* should have bit 2 on */
  2287.     WORD rest_of_header[17]    /* the rest of the resource file header, unchanged */
  2288. }
  2289. Resource File {
  2290.     /* standard format, except objects may be of ob_type G_CICON (see above) */
  2291. }
  2292. Table of Extensions {
  2293.     LONG filesize      /* size of the file */
  2294.     LONG color_ic    /* slot for color icons, containing an offset to Table
  2295.                                   * CICONBLK's
  2296.                                   */
  2297.     LONG dummy[?]  /* more extension slots, to be defined */
  2298.     LONG end_extensions    /* always 0L */
  2299. }                       (continued on next page)
  2300. Table of CICONBLK's with (number of CICONBLK's) entries {
  2301.      0L
  2302.      0L
  2303.      ...      (last entry of color icons)
  2304.      -1L   (end of table marker, this entry will never be converted to actual memory
  2305.      pointer)
  2306. }
  2307. for ( number of CICONBLK's ) {
  2308.     ICONBLK - (monochrome icon, same as the AES definition) {
  2309.         LONG - monochrome mask pointer
  2310.         LONG - monochrome data pointer
  2311.         LONG - text, 0L if no text
  2312.         WORD[5] - color info, character, placement vectors
  2313.         WORD - width in pixels
  2314.         WORD - height in pixels
  2315.         WORD[4] - dimension and placement of text box
  2316.            }
  2317.  
  2318.     LONG  -  number of CICON's of different resolutions
  2319.  
  2320.     WORD[n] - monochrome bitmap data, where n = # of words in mono icon
  2321.     WORD[n] - monochrome mask data, where n = # of words in mono icon
  2322.     BYTE[12] - text string (max of 12 characters)
  2323.  
  2324.     for (number of different resolution CICON's) {
  2325.         WORD - number of planes
  2326.         LONG - color data pointer
  2327.         LONG - color mask pointer
  2328.         LONG - select data pointer, if 0L then no extra data or mask follows
  2329.         LONG - select mask pointer
  2330.         LONG - next_res, 1L indicates more icons to follow
  2331.  
  2332.         WORD[n] - color data, where n = (# of words in mono icon) * num_planes
  2333.            WORD[n] - mask data, where n = # of words in mono icon
  2334.         if (select data pointer ) {
  2335.             WORD[n] -  select data, where n = (# of words in mono icon) *
  2336.     num_planes
  2337.                WORD[n] - select mask, where n = # of words in mono icon
  2338.                }
  2339.     }         /* end different resolutions */
  2340. }       /* end number of CICONBLK's */
  2341.  
  2342.  
  2343. Addendum:
  2344.  
  2345. Restriction on Color Icon Data
  2346. Due to a bug found in the VDI, the seventh word in the color icon data cannot contain
  2347. 0x0001.  The VDI looks at the wrong location to see whether or not it should skip a
  2348. transform form on the icon data.  The end result is that icons that have the seventh word
  2349. of data set to 0x0001 will be blitted in the wrong data format.  For those who are
  2350. writing icon editors, a check on the data is recommended to prevent this strange
  2351. behavior.
  2352.  
  2353. Since this is a rather obscure occurence, icon designers should not need to worry about
  2354. this problem unless a particular icon does not display correctly (i.e. the data is
  2355. scrambled).  If the icon is incorrectly displayed, change the image so that the first
  2356. sixteen pixels on the fourth line contain different data, until the image becomes
  2357. unscrambled.
  2358.  
  2359. Rsh_vrsn
  2360. The first word in the resource file header, rsh_vrsn, no longer contains the offset to
  2361. the table of extensions.  The third bit must be set to 1 (i.e. 0100).
  2362.  
  2363. Table of Extensions
  2364. Please note, the table of extensions must begin on a word boundary.
  2365.  
  2366. Reuse of Icons
  2367. If no appropriate color icon exists for the current video mode, AES will now take
  2368. four-plane icons and reuse the data in eight-plane and true color mode.  In addition,
  2369. eight-plane icon data will be converted to true-color mode.  Therefore, a deskicon.rsc
  2370. containing only four-plane icons is sufficient for all modes above four planes.
  2371.  
  2372. Color Icon Table
  2373. The color icon table is now has a -1 terminator, so that it is initialized with 0L for
  2374. all icon slots along with the extra -1L as a terminator.
  2375.  
  2376.  
  2377. ========================================================================================
  2378.  
  2379.   Three Dimensional Objects   1/21/93
  2380.  
  2381. Three dimensional objects are implemented in AES version 3.4 and up.
  2382.  
  2383. Defines:
  2384.  
  2385. #define FL3DMASK 0x0600
  2386. #define     FL3DNONE  0x0000
  2387. #define     FL3DIND  0x0200
  2388. #define     FL3DBAK  0x0400
  2389. #define     FL3DACT  0x0600
  2390.  
  2391. #define LK3DIND
  2392. #define LK3DACT
  2393. #define INDBUTCOL
  2394. #define ACTBUTCOL
  2395. #define BACKGRCOL
  2396. #define AD3DVALUE
  2397.  
  2398. Description:
  2399.  
  2400. The AES uses 2 new bits in the ob_flags field of objects to indicate what kind
  2401. of 3D shading effects (if any) should be used on the object. These are bits 9
  2402. and 10 of ob_flags.
  2403.  
  2404. If both bits are clear (FL3DNONE) then no 3D shading effects are applied to the object.
  2405.  
  2406. If (ob_flags & FL3DMASK) is FL3DIND, then the object is an "indicator." Typically
  2407. indicators are used in dialog boxes to indicate some sort of state; for example,
  2408. whether an option is "on" or "off." Radio buttons should always be indicators.
  2409.  
  2410. If (ob_flags & FL3DMASK) is FL3DACT, then the object is an "activator." Activators
  2411. don't have a persistent state, but rather are usually controls of some sort.
  2412. For example, the "OK" and "Cancel" buttons in dialog boxes should be activators.
  2413.  
  2414. If (ob_flags & FL3DMASK) is FL3DBAK, then the object is a "background" object.
  2415. Background objects are usually not selectable, and do not typically display 3D
  2416. effects other than inheriting the "3D background object" color (see below); the
  2417. only 3D effect applied to background objects is that "outlined" background objects
  2418. appear to be raised above the objects behind them.
  2419.  
  2420. The colors (and effects, for indicators and activators) of 3D objects may be controlled
  2421. by the objc_sysvar function. Any 3D object which is color 0 (white) and has a
  2422. hollow fill pattern will be drawn in the 3D default color set for its object
  2423. type, instead of in white. 3D objects which are not white or which have a non-hollow
  2424. fill pattern will be drawn in the color and pattern specified, as usual.
  2425.  
  2426. -------------------------------------------------------------------------------
  2427.  
  2428.  
  2429. 6.4.9 OBJC_SYSVAR
  2430.  
  2431. Purpose:
  2432.  
  2433. Allows an application to set or inquire the colors and effects for 3D objects.
  2434. Applications should not change 3D colors or effects except at the explicit
  2435. request of the user, because all such changes are global (i.e. they affect
  2436. all processes).
  2437.  
  2438. Parameters:
  2439.  
  2440.      control(0)  =  48
  2441.      control(1)  =  4
  2442.      control(2)  =  3
  2443.      control(3)  =  0
  2444.      control(4)  =  0
  2445.  
  2446.      int_in(0)   =  ob_smode
  2447.      int_in(1)   =  ob_swhich
  2448.      int_in(2)   =  ob_sival1
  2449.      int_in(3)  =  ob_sival2
  2450.  
  2451.      int_out(0)  =  ob_sreturn
  2452.      int_out(1)  =  ob_soval1
  2453.      int_out(2)  =  ob_soval2
  2454.  
  2455.  
  2456. o    ob_smode - whether the call is to get or set attributes
  2457.  
  2458.      0  Inquire (get) attributes
  2459.  
  2460.      1  Set attributes
  2461.  
  2462. o    ob_swhich - which attributes are being set or inquired; this
  2463.                  also affects the meaning of the other values,
  2464.    as follows:
  2465.  
  2466.      LK3DIND  Get/set attributes for indicator objects. If ob_smode is 0,
  2467.               then ob_soval1 indicates whether the text of indicator
  2468.        objects does (1) or does not (0) move when the object
  2469.        is selected, and ob_soval2 indicates whether the
  2470.        object does (1) or does not (0) change color when
  2471.        selected. If ob_smode is 1, then ob_sival1 controls
  2472.        whether indicator object text will (1) or will not (0)
  2473.        move when the object is selected, and ob_sival2 controls
  2474.        whether indicator objects will (1) or will not (0) change
  2475.        color when selected. The default is ob_sival1 = 1 and
  2476.        ob_sival2 = 0.
  2477.  
  2478.      LK3DACT  Get/set attributes for activator objects. The meanings of
  2479.               ob_soval1, ob_soval2, ob_sival1, and ob_sival2 are the same
  2480.        as for LK3DIND, except that they apply to activator objects
  2481.        rather than indicator objects. The defaults for activator
  2482.        objects is ob_sival1 = 0 and ob_sival1 = 1.
  2483.  
  2484.      INDBUTCOL Get/set default color for indicator objects. This is the
  2485.                color which hollow, white indicator objects (e.g. buttons)
  2486.         will be drawn in instead of white. If ob_smode is 0,
  2487.         then ob_soval1 is the current color index of the default
  2488.         indicator object color. If ob_smode is 1, then ob_sival1
  2489.         is the new color index for indicator objects.
  2490.  
  2491.      ACTBUTCOL Get/set default color for activator objects. Same as
  2492.                INDBUTCOL, but applies to activators rather than indicators.
  2493.  
  2494.      BACKGRCOL Get/set default color for 3D background objects. Same as
  2495.                INDBUTCOL, but applies only to 3D background objects.
  2496.  
  2497.      AD3DVALUE Get pixel adjustments for 3D indicators and activators.
  2498.                ob_smode must be 0. ob_soval1 is set to the number of pixels
  2499.         by which 3D indicators and activators are expanded on each side
  2500.                horizontally (to accomodate 3D effects), and ob_soval2 is
  2501.         the number of pixels by which they are expanded vertically.
  2502.         Remember that this adjustment is applied to each side of the
  2503.         object, so the objects width or height is increased by twice
  2504.         this amount.
  2505.         Background 3D objects never change in size.
  2506.  
  2507. o    ob_sreturn - a coded return message
  2508.  
  2509.      0 - FAILURE: an illegal value has been given for ob_swhich or for
  2510.                   ob_smode
  2511.  
  2512.      >0 - SUCCESS: the objc_sysvar call succeeded
  2513.  
  2514.      ------------------------------------------------
  2515.  
  2516.      Sample call to C language binding:
  2517.  
  2518.      ob_return = objc_sysvar( word ob_smode, word ob_swhich, word ob_sival1, word ob_soval1,
  2519.                               word *ob_soval1, word *ob_soval2 );
  2520.  
  2521.  
  2522. =========================================================================================
  2523.  
  2524.   IDT - International Day and Time Cookie  9/10/92
  2525.  
  2526. Beginning from AES 3.3 and up, the desktop will use the _IDT cookie to determine how to
  2527. set up the date and time format. The _IDT should look like the following.
  2528.  
  2529.  
  2530. _IDT LONG WORD: HIGH WORD |         LOW WORD   
  2531.    ------------------------------------------------
  2532. Bit Number: 31 - 16    |  15-12       11-8        7-0 bit  
  2533. Meaning: Reserved   |  Time        Date     Date Seperator
  2534. Value:         0  12 hour   0  MM-DD-YY     ASCII value  
  2535.          1  24 hour   1  DD-MM-YY   ( A zero value equivalent
  2536.               2  YY-MM-DD     to '/' ) 
  2537.               3  YY-DD-MM   
  2538.  
  2539. The current default values are:
  2540.  
  2541. Country  Time Date Seperator
  2542. -----------------------------------------
  2543. USA  0 0 /
  2544. Germany  1 1 .
  2545. French  1 1 /
  2546. Spain  1 1 /
  2547. Italy  1 1 /
  2548. Sweden,Norway
  2549. Finland  1 2 -
  2550.