Git init
[framework/uifw/xorg/app/x11-apps.git] / xmag / RootWin.c
1 /* $Xorg: RootWin.c,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $ */
2 /*
3
4 Copyright 1990, 1998  The Open Group
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.
11
12 The above copyright notice and this permission notice shall be included
13 in all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 OTHER DEALINGS IN THE SOFTWARE.
22
23 Except as contained in this notice, the name of The Open Group shall
24 not be used in advertising or otherwise to promote the sale, use or
25 other dealings in this Software without prior written authorization
26 from The Open Group.
27
28 */
29 /* $XFree86: xc/programs/xmag/RootWin.c,v 1.4 2001/01/17 23:46:20 dawes Exp $ */
30
31
32 #include <X11/IntrinsicP.h>
33 #include <X11/StringDefs.h>
34 #include "RootWinP.h"
35
36 static void Realize ( Widget w, XtValueMask *value_mask, XSetWindowAttributes *attributes );
37
38 RootWindowClassRec rootWindowClassRec = {
39   { /* core fields */
40     /* superclass               */      (WidgetClass) &widgetClassRec,
41     /* class_name               */      "RootWindow",
42     /* widget_size              */      sizeof(RootWindowRec),
43     /* class_initialize         */      NULL,
44     /* class_part_initialize    */      NULL,
45     /* class_inited             */      FALSE,
46     /* initialize               */      NULL,
47     /* initialize_hook          */      NULL,
48     /* realize                  */      Realize,
49     /* actions                  */      NULL,
50     /* num_actions              */      0,
51     /* resources                */      NULL,
52     /* num_resources            */      0,
53     /* xrm_class                */      NULLQUARK,
54     /* compress_motion          */      TRUE,
55     /* compress_exposure        */      TRUE,
56     /* compress_enterleave      */      TRUE,
57     /* visible_interest         */      FALSE,
58     /* destroy                  */      NULL,
59     /* resize                   */      NULL,
60     /* expose                   */      NULL,
61     /* set_values               */      NULL,
62     /* set_values_hook          */      NULL,
63     /* set_values_almost        */      XtInheritSetValuesAlmost,
64     /* get_values_hook          */      NULL,
65     /* accept_focus             */      NULL,
66     /* version                  */      XtVersion,
67     /* callback_private         */      NULL,
68     /* tm_table                 */      NULL,
69     /* query_geometry           */      XtInheritQueryGeometry,
70     /* display_accelerator      */      XtInheritDisplayAccelerator,
71     /* extension                */      NULL
72   },
73   { /* rootWindow fields */
74     /* empty                    */      0
75   }
76 };
77
78 WidgetClass rootWindowWidgetClass = (WidgetClass)&rootWindowClassRec;
79
80 /*ARGSUSED*/
81 static void 
82 Realize(Widget w, XtValueMask *value_mask, XSetWindowAttributes *attributes)
83 {
84     w->core.window = RootWindowOfScreen(w->core.screen);
85 }