VOpenServer


 
Name
  VOpenServer - connects to the X server.
 
Synopsis
  VOpenServer(process)
  char *process;
 
Description
  VOpenServer connects to the X server. VOpenServer also gets the screen ID,
and loads the fonts. VOpenServer should be called only once in the same
process. VOpenServer gets the fonts for the image, dialog and button windows
by reading the FONT.COM file in the local directory. If this is not
available, VOpenServer opens the FONTNAME file in the 3DVIEWNIX/FILES
directory, where the fonts for the 3DVIEWNIX windows are set at the time
of 3DVIEWNIX installation by the site manager. If the fonts from either
of these files are suitable for 3DVIEWNIX, then these fonts are used for
the rest of the process until a 3DVIEWNIX option to change the font is used.
However if the fonts from neither of these files are suitable or these
files do not exist, then VOpenServer uses the system default "variable"
font. If this font also fails to meet the 3DVIEWNIX reuqirements, then
VOpenServer uses the system default "fixed" font. If this font also fails
to meet the 3DVIEWNIX requirements, then VOpenServer uses the system
default "6x10" font for all window. If this font also fails to meet the
3DVIEWNIX requirements, then VOpenServer exits from the current process.
However if a suitable font was found in the above selection process,
VOpenServer computes all the window sizes and coordinates, the panel size
and location, the multi-resolution scale size and location based on the 
selected font size.
 
Return Value
  0 - work successfully.
  7 - environment variable does not exist.
  200- cannot open X server.
  201 - X server is already open.
 
Parameters
  process - specifies the name of the current process.
 
Side Effects
  The fonts and window sizes for all windows are set here.
 
Entry Conditions
  The environment variables DISPLAY and VIEWNIX_ENV must be properly set.
X-windows should already be running on the server where 3DVIEWNIX is to be 
displayed.
 
Related Functions
VCreateWindows, VGetServerScreenInformation, VGetScreenSize, VCreateColormap.