home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / clients / xmag / RootWindow.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-06  |  2.7 KB  |  81 lines

  1. /* $XConsortium: RootWindow.c,v 1.1 90/12/06 20:39:39 dave Exp $ */
  2.  
  3. /*
  4.  * Copyright 1990 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  *
  23.  */
  24.  
  25. #include <X11/IntrinsicP.h>
  26. #include <X11/StringDefs.h>
  27. #include "RootWindoP.h"
  28.  
  29. static void Realize();
  30.  
  31. RootWindowClassRec rootWindowClassRec = {
  32.   { /* core fields */
  33.     /* superclass        */    (WidgetClass) &widgetClassRec,
  34.     /* class_name        */    "RootWindow",
  35.     /* widget_size        */    sizeof(RootWindowRec),
  36.     /* class_initialize        */    NULL,
  37.     /* class_part_initialize    */    NULL,
  38.     /* class_inited        */    FALSE,
  39.     /* initialize        */    NULL,
  40.     /* initialize_hook        */    NULL,
  41.     /* realize            */    Realize,
  42.     /* actions            */    NULL,
  43.     /* num_actions        */    0,
  44.     /* resources        */    NULL,
  45.     /* num_resources        */    0,
  46.     /* xrm_class        */    NULLQUARK,
  47.     /* compress_motion        */    TRUE,
  48.     /* compress_exposure    */    TRUE,
  49.     /* compress_enterleave    */    TRUE,
  50.     /* visible_interest        */    FALSE,
  51.     /* destroy            */    NULL,
  52.     /* resize            */    NULL,
  53.     /* expose            */    NULL,
  54.     /* set_values        */    NULL,
  55.     /* set_values_hook        */    NULL,
  56.     /* set_values_almost    */    XtInheritSetValuesAlmost,
  57.     /* get_values_hook        */    NULL,
  58.     /* accept_focus        */    NULL,
  59.     /* version            */    XtVersion,
  60.     /* callback_private        */    NULL,
  61.     /* tm_table            */    NULL,
  62.     /* query_geometry        */    XtInheritQueryGeometry,
  63.     /* display_accelerator    */    XtInheritDisplayAccelerator,
  64.     /* extension        */    NULL
  65.   },
  66.   { /* rootWindow fields */
  67.     /* empty            */    0
  68.   }
  69. };
  70.  
  71. WidgetClass rootWindowWidgetClass = (WidgetClass)&rootWindowClassRec;
  72.  
  73. /*ARGSUSED*/
  74. static void Realize(w, value_mask, attributes)
  75.     Widget    w;
  76.     XtValueMask *value_mask;
  77.     XSetWindowAttributes *attributes;
  78. {
  79.     w->core.window = RootWindowOfScreen(w->core.screen);
  80. }
  81.