•  Back 
  •  About the xFSL interface 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File13.14.1.3  The extended xFSL call                                  TOS

The extended xFSL call consists of three individual function calls:

 xfsl_init    Displays the font-selector on the screen. In addition 
              the parameters are passed here.

 xfsl_event   This function is called repeatedly until a font has been 
              selected in the font-selector, or 'Cancel' selected.

 xfsl_exit    Removes the font-selector from the screen again.


In C it can look like this, for instance:

     xhandle = xfsl->xfsl_init (vdihandle, &xpar);
     if (xhandle >= 0)
     {
       do
       {
         ret = xfsl->xfsl_event (xhandle, 0L);
         if (ret == xFS_HELP)
           ...;  /* Call Help function  */
         else if (ret == xFS_POPUP)
           ...;  /* Handle popup       */
         else if (ret == xFS_EVENT)
           ...;  /* Handle (!nolink [AES]) event   */
       } while ((ret != xFS_OK) && (ret != xFS_STOP));
       xfsl->xfsl_exit (xhandle);
     }

This splitting up into three has the advantage, amongst others, that 
the handling of the events (HELP button, popup, AES events) does not 
have to pass pointers to functions (which presents difficulties in 
some programming languages). Also the interface can be extended easily 
by furher events if these should ever become necessary.