
Class documentation.

$Ident: This file is part of the 'Gt-library' 1.0.0 $
$Copyright: (C) 1997 by Gran Gustafsson $

-------------------------------------------------------------------------

  ** GtDisplay **
  ---------------

Name:       GtDisplay
Superclass: GtBase
Include:    gtdisplay.h


  This class handles the connection to the X server and it encapsulates
a X display. It provides methods for handling events and reading values from
the display.


Tags for GtDisplay:
-------------------

  Name                   ISGR  Type            Defaults
  -----------------------------------------------------
  GT_DispString         (I.GR) (char *)        NULL
  GT_DontFreeX          (I.G.) (sbool)         FALSE
  GT_XDisplay           (I.G.) (Display *)     NULL
  
  
  * GT_DispString
    The display to open is given by this tag. If it's value is "NULL" the
    default display is opened.


  * GT_DontFreeX
    If this tag is true the encapsulated display is not destroy when the
    GtDisplay object is destroyed.
    

  * GT_XCursor
    This tag provide a X display to encapsulate. The "GT_DontFreeX" tag is
    by default true if this tag is used in initializing the GtDisplay.

    NOTE: All features of the encapsulation may not work correctly for
    objects using the "GT_XDisplay" tag in initialization.


Callbacks for GtDisplay:
------------------------

  ** NONE DEFINED **
  

Methods for GtDisplay:
----------------------

   -- User methods --
   
  XEvent *HandleEvent(void)
  Display *XDsp(void)
  sbool Pending(void)
  
  ulong XBlackPixel(void)
  ulong XWhitePixel(void)
  Colormap XDefaultColormap(void)
  ulong XDefaultDepth(void)
  Window XDefaultRootWindow(void)
  int XDefaultScreen(void)
  Visual *XDefaultVisual(void)
  int XDisplayCells(void)
  int XDisplayPlanes(void)

   -- Internal methods --
   
  int GetFD(void)
  
   -- GtBase methods --

  Init, Set, Get, GetClass, IsSubClassOf, InitV, SetV, GetV, GetA,
  PrtErrHeader
 
 ----------------------------------------------------------------------------

  void HandleEvent(XEvent *xe)

    - xe : pointer to a XEvent structure to fill in.
    
    This method fills in the XEvent structure with the next event from the X
    server.
    
 ----------------------------------------------------------------------------

  Display *XDsp(void)
  
    - <result> : pointer to the encapsulated X display.
    
    This method returns the encapsulated X display of the GtDisplay object.

 ----------------------------------------------------------------------------

  sbool Pending(void)
  
    - <result> : true if any X events are pending else false.
    
    This method checks if any X events are pending from the display. If no
    events are pending the output queue is flushed.

 ----------------------------------------------------------------------------

  ulong XBlackPixel(void)
  ulong XWhitePixel(void)
  Colormap XDefaultColormap(void)
  ulong XDefaultDepth(void)
  Window XDefaultRootWindow(void)
  int XDefaultScreen(void)
  Visual *XDefaultVisual(void)
  int XDisplayCells(void)
  int XDisplayPlanes(void)
  int XDisplayWidth(void)
  int XDisplayHeight(void)

    These methods use the macros with the same names to return default
    values of the GtDisplay object. Note that they return X resources and
    not encapsulating Gt objects.
    
 ----------------------------------------------------------------------------

  int GetFD(void)
  
    - <result> : the file descriptor of the display connection.
    
    This method returns the file descriptor used to communicate with the X
    server.
