749N/A#ifndef lint
749N/Astatic char Xrcsid[] = "$XConsortium: Grip.c,v 1.27 89/12/08 12:35:56 swick Exp $";
749N/A#endif /* lint */
749N/A
749N/A/***********************************************************
749N/ACopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
749N/Aand the Massachusetts Institute of Technology, Cambridge, Massachusetts.
749N/A
749N/A All Rights Reserved
749N/A
749N/APermission to use, copy, modify, and distribute this software and its
749N/Adocumentation for any purpose and without fee is hereby granted,
749N/Aprovided that the above copyright notice appear in all copies and that
749N/Aboth that copyright notice and this permission notice appear in
749N/Asupporting documentation, and that the names of Digital or MIT not be
749N/Aused in advertising or publicity pertaining to distribution of the
749N/Asoftware without specific, written prior permission.
749N/A
749N/ADIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
749N/AALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
749N/ADIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
749N/AANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
749N/AWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
749N/AARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
749N/ASOFTWARE.
749N/A
749N/A******************************************************************/
749N/A
749N/A/*
749N/A * Grip.c - Grip Widget (Used by Paned Widget)
749N/A *
749N/A */
749N/A#include <X11/IntrinsicP.h>
749N/A#include <X11/StringDefs.h>
749N/A#include <./Xaw3_1XawInit.h>
749N/A#include <./Xaw3_1GripP.h>
749N/A
749N/Astatic XtResource resources[] = {
749N/A {XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension),
749N/A XtOffset(GripWidget, core.width), XtRImmediate,
749N/A (caddr_t) DEFAULT_GRIP_SIZE},
749N/A {XtNheight, XtCHeight, XtRDimension, sizeof(Dimension),
749N/A XtOffset(GripWidget, core.height), XtRImmediate,
749N/A (caddr_t) DEFAULT_GRIP_SIZE},
749N/A {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
749N/A XtOffset(GripWidget, core.background_pixel), XtRString,
749N/A "XtDefaultForeground"},
749N/A {XtNborderWidth, XtCBorderWidth, XtRDimension, sizeof(Dimension),
749N/A XtOffset(GripWidget, core.border_width), XtRImmediate, (caddr_t)0},
749N/A {XtNcallback, XtCCallback, XtRCallback, sizeof(caddr_t),
749N/A XtOffset(GripWidget, grip.grip_action), XtRCallback, NULL},
749N/A};
749N/A
749N/Astatic void GripAction( /* Widget, XEvent*, String*, Cardinal */ );
749N/A
749N/Astatic XtActionsRec actionsList[] =
749N/A{
749N/A {"GripAction", GripAction},
749N/A};
749N/A
749N/A#define SuperClass (&simpleClassRec)
749N/A
749N/AGripClassRec gripClassRec = {
749N/A {
749N/A/* core class fields */
749N/A /* superclass */ (WidgetClass) SuperClass,
749N/A /* class name */ "Grip",
749N/A /* size */ sizeof(GripRec),
749N/A /* class initialize */ XawInitializeWidgetSet,
749N/A /* class_part_init */ NULL,
749N/A /* class_inited */ FALSE,
749N/A /* initialize */ NULL,
749N/A /* initialize_hook */ NULL,
749N/A /* realize */ XtInheritRealize,
749N/A /* actions */ actionsList,
749N/A /* num_actions */ XtNumber(actionsList),
749N/A /* resourses */ resources,
749N/A /* resource_count */ XtNumber(resources),
749N/A /* xrm_class */ NULLQUARK,
749N/A /* compress_motion */ TRUE,
749N/A /* compress_exposure */ TRUE,
749N/A /* compress_enterleave*/ TRUE,
749N/A /* visible_interest */ FALSE,
749N/A /* destroy */ NULL,
749N/A /* resize */ NULL,
749N/A /* expose */ NULL,
749N/A /* set_values */ NULL,
749N/A /* set_values_hook */ NULL,
749N/A /* set_values_almost */ XtInheritSetValuesAlmost,
749N/A /* get_values_hook */ NULL,
749N/A /* accept_focus */ NULL,
749N/A /* version */ XtVersion,
749N/A /* callback_private */ NULL,
749N/A /* tm_table */ NULL,
749N/A /* query_geometry */ XtInheritQueryGeometry,
749N/A /* display_accelerator*/ XtInheritDisplayAccelerator,
749N/A /* extension */ NULL
749N/A },
749N/A/* Simple class fields initialization */
749N/A {
749N/A /* change_sensitive */ XtInheritChangeSensitive
749N/A }
749N/A};
749N/A
749N/AWidgetClass gripWidgetClass = (WidgetClass) &gripClassRec;
749N/A
749N/Astatic void GripAction( widget, event, params, num_params )
749N/A Widget widget;
749N/A XEvent *event;
749N/A String *params;
749N/A Cardinal *num_params;
749N/A{
749N/A GripCallDataRec call_data;
749N/A
749N/A call_data.event = event;
749N/A call_data.params = params;
749N/A call_data.num_params = *num_params;
749N/A
749N/A XtCallCallbacks( widget, XtNcallback, (caddr_t)&call_data );
749N/A}