•  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.1  xfsl_init                                             TOS

This call not only brings up the font-selector on the screen, it also 
determines which fonts are to be displayed, whether a user-popup is 
being used and several other things.

     int xsfl_init (int       vdihandle,
                    xFSL_PAR *xpar
                   );

The two parameters mean:

 vdihandle   As for the simplified call, here you pass the handle of a 
             virtual VDI workstation already opened by your program, 
             or simply a NULL.

             If you pass a valid workstation handle, then the font- 
             selector will adopt the font current on this workstation 
             and display it - provided fontflags (in the xFSL_PAR 
             structure) actually makes it available for selection. If 
             this is not the case, then the font-selector will choose 
             a font from those available and display it.

             If you pass a NULL as workstation handle, then the font 
             from the PFONTINFO structure (to which a pointer in the 
             xFSL_PAR structure points) will be adopted and displayed.

             If you pass a VDI workstation handle, then the font 
             selected on this workstation will also be set.

 xpar        This is a pointer (i.e. the address) of an xFSL_PAR 
             structure that contains all further specifications for 
             the font-selector.

             Due to the large number of options, this structure has 
             been given its own page.

The following applies again for the return codes of the function: A 
negative return value indicates an error. Positive values here have a 
slightly different meaning: A 0 means that the font-selector was 
opened (successfully) as a modal dialog. Any other positive values 
correspond to the window handle of the opened font-selector. This way 
you can register the font-selector window with an AV-server, for 
instance.

On success (return value larger or equal to 0) you should store the 
handle in a variable, as it will still be needed for the following 
calls (xfsl_event and xfsl_exit).

Note: If the font-selector is to be displayed as a window, but 
xfsl_init returns the error xFS_NO_WINDOW (no more windows available), 
then one should attempt to display the font-selector at least as a 
dialog (clear control-flag CC_WINDOW and call xfsl_init again).

Remember: The user wants a font-selector, not an error-message!