•  Back 
  •  The extended xFSL call 
  •  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.2  xfsl_event                                            TOS

When the font-selector has been initialized and brought to the screen, 
xfsl_event takes over the main work.

     int xfsl_event (int    xhandle,
                     EVENT *event
                    );

The two parameters mean:

 xhandle   The handle of the font-selector, as returned by xfsl_init.

 event     Pointer to an EVENT structure, as used by Pure-C. In this 
           structure the font-selector returns AES events that it 
           could not process itself. In addition, you can also use the 
           input parameters to tell the font-selector about which 
           events are to be reported.

           However, the pointer can also just be a NULL if you do not 
           want to evaluate any (further) events. If the font-selector 
           is to be operated as a window-dialog and the caller (i.e. 
           your program) has some other windows open, then you have to 
           evaluate the redraw messages at least!

           Example: If you set the MU_MESAG flag in ev_mflags of 
           evnt_multi, then the font-selector will return all the 
           arriving AES messages that it cannot handle itself to the 
           caller.

           Note: It is also possible, or course, to receive timer 
           events; but these should only be used sparingly and not be 
           too short, as in that case the font-selector has to leave 
           its own event loop each time. 250 ms might serve as the - 
           non-binding - lower limit.

The possible return values of xfsl_event:

 xFS_STOP    The 'Cancel' button or (if present) the Closer of the 
             window-dialog was selected in the font-selector.

             If the CC_CLOSER control-flag is set and the Closer is 
             clicked on, the PFONTINFO structure to which the pointer 
             in the xFSL_PAR structure points nevertheless contains 
             data about which font was last selected in the font- 
             selector. Otherwise this information would not be 
             preserved.

 xFS_OK      A font was chosen and 'OK' selected. The font that was 
             selected is described in the PFONTINFO structure to which 
             the pointer in the xFSL_PAR structure points. If a valid 
             VDI handle was passed at xfsl_init, then this font will 
             also be set immediately on this VDI workstation.

 xFS_HELP    The HELP button was selected (this can only occur if one 
             has been provided, of course). It is up to the caller how 
             it reacts to this. Normally help will be provided by the 
             display of a Help page (or triggering such a display).

 xFS_EVENT   An AES event has occurred that the font-selector could 
             not process (e.g. a Redraw message for another window). 
             Exactly what this event was can be gathered from the 
             ev_mwich field of the EVENT structure.

             Desk accessories should not forget calling xfsl_exit on 
             receipt of an AC_CLOSE message! The same applies for the 
             AP_TERM message.

 xFS_POPUP   A change was made in the user-popup (if present). For the 
             changed popup entry the FF_CHANGED bit is set in the 
             fontflags element. The popup entry which was then 
             selected, and on return to the font-selector will be the 
             current one in the popup (at the next xfsl_event call), 
             will lie in the sel_entry element of xFSL_PAR.

             You now still have the option of making changes to the 
             popup entries, for instance to alter the font-flags, or 
             adopt the changed font in all other popup entries (in 
             this way it is possible to use the popup for some other 
             kind of information which may have nothing to do with the 
             selected font). But the texts and the number of popup 
             entries may not be changed!

 andere Werte: Other positive values should be ignored. It is possible 
             that the interface will be extended by further return 
             values (events).

             Negative values indicate an error, the font-selector 
             should then be aborted. But it is imperative that one 
             still calls xfsl_exit beforehand!