rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / x11 / libXaw4 / src / Xaw3_1Grip.c
blobd0ccb1a05245f168746894805af4a7bd17e48a9b
1 #ifndef lint
2 static char Xrcsid[] = "$XConsortium: Grip.c,v 1.27 89/12/08 12:35:56 swick Exp $";
3 #endif /* lint */
5 /***********************************************************
6 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
7 and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
9 All Rights Reserved
11 Permission to use, copy, modify, and distribute this software and its
12 documentation for any purpose and without fee is hereby granted,
13 provided that the above copyright notice appear in all copies and that
14 both that copyright notice and this permission notice appear in
15 supporting documentation, and that the names of Digital or MIT not be
16 used in advertising or publicity pertaining to distribution of the
17 software without specific, written prior permission.
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.
27 ******************************************************************/
30 * Grip.c - Grip Widget (Used by Paned Widget)
33 #include <X11/IntrinsicP.h>
34 #include <X11/StringDefs.h>
35 #include <./Xaw3_1XawInit.h>
36 #include <./Xaw3_1GripP.h>
38 static XtResource resources[] = {
39 {XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension),
40 XtOffset(GripWidget, core.width), XtRImmediate,
41 (caddr_t) DEFAULT_GRIP_SIZE},
42 {XtNheight, XtCHeight, XtRDimension, sizeof(Dimension),
43 XtOffset(GripWidget, core.height), XtRImmediate,
44 (caddr_t) DEFAULT_GRIP_SIZE},
45 {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
46 XtOffset(GripWidget, core.background_pixel), XtRString,
47 "XtDefaultForeground"},
48 {XtNborderWidth, XtCBorderWidth, XtRDimension, sizeof(Dimension),
49 XtOffset(GripWidget, core.border_width), XtRImmediate, (caddr_t)0},
50 {XtNcallback, XtCCallback, XtRCallback, sizeof(caddr_t),
51 XtOffset(GripWidget, grip.grip_action), XtRCallback, NULL},
54 static void GripAction( /* Widget, XEvent*, String*, Cardinal */ );
56 static XtActionsRec actionsList[] =
58 {"GripAction", GripAction},
61 #define SuperClass (&simpleClassRec)
63 GripClassRec gripClassRec = {
65 /* core class fields */
66 /* superclass */ (WidgetClass) SuperClass,
67 /* class name */ "Grip",
68 /* size */ sizeof(GripRec),
69 /* class initialize */ XawInitializeWidgetSet,
70 /* class_part_init */ NULL,
71 /* class_inited */ FALSE,
72 /* initialize */ NULL,
73 /* initialize_hook */ NULL,
74 /* realize */ XtInheritRealize,
75 /* actions */ actionsList,
76 /* num_actions */ XtNumber(actionsList),
77 /* resourses */ resources,
78 /* resource_count */ XtNumber(resources),
79 /* xrm_class */ NULLQUARK,
80 /* compress_motion */ TRUE,
81 /* compress_exposure */ TRUE,
82 /* compress_enterleave*/ TRUE,
83 /* visible_interest */ FALSE,
84 /* destroy */ NULL,
85 /* resize */ NULL,
86 /* expose */ NULL,
87 /* set_values */ NULL,
88 /* set_values_hook */ NULL,
89 /* set_values_almost */ XtInheritSetValuesAlmost,
90 /* get_values_hook */ NULL,
91 /* accept_focus */ NULL,
92 /* version */ XtVersion,
93 /* callback_private */ NULL,
94 /* tm_table */ NULL,
95 /* query_geometry */ XtInheritQueryGeometry,
96 /* display_accelerator*/ XtInheritDisplayAccelerator,
97 /* extension */ NULL
99 /* Simple class fields initialization */
101 /* change_sensitive */ XtInheritChangeSensitive
105 WidgetClass gripWidgetClass = (WidgetClass) &gripClassRec;
107 static void GripAction( widget, event, params, num_params )
108 Widget widget;
109 XEvent *event;
110 String *params;
111 Cardinal *num_params;
113 GripCallDataRec call_data;
115 call_data.event = event;
116 call_data.params = params;
117 call_data.num_params = *num_params;
119 XtCallCallbacks( widget, XtNcallback, (caddr_t)&call_data );