|
|
1.1 root 1: #ifndef lint
2: static char rcsid[] = "$Header: Knob.c,v 1.3 87/09/13 13:14:45 newman Locked $";
3: #endif lint
4:
5: /*
6: * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
7: *
8: * All Rights Reserved
9: *
10: * Permission to use, copy, modify, and distribute this software and its
11: * documentation for any purpose and without fee is hereby granted,
12: * provided that the above copyright notice appear in all copies and that
13: * both that copyright notice and this permission notice appear in
14: * supporting documentation, and that the name of Digital Equipment
15: * Corporation not be used in advertising or publicity pertaining to
16: * distribution of the software without specific, written prior permission.
17: *
18: *
19: * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
20: * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
21: * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
22: * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
23: * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
24: * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
25: * SOFTWARE.
26: */
27: /*
28: * Knob.c - Knob composite Widget (Used by VPane Widget)
29: *
30: * Author: Jeanne M. Rich
31: * Digital Equipment Corporation
32: * Western Research Laboratory
33: * Date: Wednesday, September 9 1987
34: *
35: */
36:
37:
38: #include "/usr/src/x11/include/Xlib.h"
39: #include "cursorfont.h"
40: #include "Intrinsic.h"
41: #include "KnobP.h"
42: #include "Knob.h"
43: #include "Atoms.h"
44:
45: extern void ClassInitialize();
46:
47: static Resource resources[] = {
48: {XtNbackground, XtCBackground, XrmRPixel, sizeof(Pixel),
49: Offset(KnobWidget, core.background_pixel), XtRString, "Black"},
50: {XtNborderWidth, XtCBorderWidth, XrmRInt, sizeof(int),
51: Offset(KnobWidget, core.border_width), XtRString, "0"}
52: };
53:
54: KnobClassRec knobClassRec = {
55: {
56: /* core class fields */
57: /* superclass */ (WidgetClass) &widgetClassRec,
58: /* class name */ "Knob",
59: /* size */ sizeof(KnobRec),
60: /* class initialize */ ClassInitialize,
61: /* class_inited */ FALSE,
62: /* initialize */ NULL,
63: /* realize */ NULL,
64: /* actions */ NULL,
65: /* num_actions */ 0,
66: /* resourses */ resources,
67: /* resource_count */ XtNumber(resources),
68: /* xrm_class */ NULLQUARK,
69: /* compress_motion */ TRUE,
70: /* compress_exposure */ TRUE,
71: /* visible_interest */ FALSE,
72: /* destroy */ NULL,
73: /* resize */ NULL,
74: /* expose */ NULL,
75: /* set_values */ NULL,
76: /* accept_focus */ NULL
77: }, {
78: /* mumble */ 0 /* make C compiler happy */
79: }
80: };
81:
82: WidgetClass knobWidgetClass = (WidgetClass) &knobClassRec;
83:
84: static void ClassInitialize()
85: {
86:
87: WidgetClass superclass;
88: KnobWidgetClass myclass;
89:
90: myclass = (KnobWidgetClass) knobWidgetClass;
91: superclass = (WidgetClass) myclass->core_class.superclass;
92:
93: /* Inherit initialize and realize from Core */
94: myclass->core_class.initialize =
95: superclass->core_class.initialize;
96: myclass->core_class.realize =
97: superclass->core_class.realize;
98: }
99:
100:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.