-/* Gauge Widget for XEmacs.
+/* Gauge Widget for XEmacs.
Copyright (C) 1999 Edward A. Falk
This file is part of XEmacs.
*
* Author: Edward A. Falk
* falk@falconer.vip.best.com
- *
+ *
* Date: July 9, 1997
*
* Note: for fun and demonstration purposes, I have added selection
#include <X11/IntrinsicP.h>
#include <X11/Xatom.h>
#include <X11/StringDefs.h>
-#include ATHENA_INCLUDE(XawInit.h)
+#include ATHENA_XawInit_h_
#include "xlwgaugeP.h"
#include "../src/xmu.h"
#ifdef HAVE_XMU
static void GaugeMercury (Display *, Window, GC, GaugeWidget, Cardinal, Cardinal);
static Boolean GaugeConvert (Widget, Atom *, Atom *, Atom *,
- XtPointer *, u_long *, int *);
+ XtPointer *, unsigned long *, int *);
static void GaugeLoseSel (Widget, Atom *);
static void GaugeDoneSel (Widget, Atom *, Atom *);
static void GaugeGetSelCB (Widget, XtPointer, Atom *, Atom *,
- XtPointer, u_long *, int *);
+ XtPointer, unsigned long *, int *);
static GC Get_GC (GaugeWidget, Pixel);
GaugeClassRec gaugeClassRec = {
{
-/* core_class fields */
+/* core_class fields */
/* superclass */ (WidgetClass) &labelClassRec,
/* class_name */ "Gauge",
/* widget_size */ sizeof(GaugeRec),
}
else
{
- gw->gauge.margin0 =
+ gw->gauge.margin0 =
gw->gauge.margin1 = lh / 2 ;
size += lwm + vmargin ;
}
}
/* if the gauge is selected, signify by drawing the background
- * in a constrasting color.
+ * in a contrasting color.
*/
if( gw->gauge.selected )
else
GaugeResize(new) ;
}
-
+
if( gw->gauge.update != oldgw->gauge.update )
{
if( gw->gauge.update > 0 )
Atom *target, /* requested target */
Atom *type, /* returned type */
XtPointer *value, /* returned value */
- u_long *length, /* returned length */
+ unsigned long *length, /* returned length */
int *format) /* returned format */
{
GaugeWidget gw = (GaugeWidget)w ;
if( *target == XA_TARGETS(XtDisplay(w)) )
{
Atom *rval, *stdTargets ;
- u_long stdLength ;
+ unsigned long stdLength ;
/* XmuConvertStandardSelection can handle this. This function
* will return a list of standard targets. We prepend TEXT,
return True ;
}
- else
+ else
#endif
if( *target == XA_INTEGER )
{
return True ;
}
- else if( *target == XA_STRING
+ else if( *target == XA_STRING
#ifdef HAVE_XMU
- ||
- *target == XA_TEXT(XtDisplay(w))
+ ||
+ *target == XA_TEXT(XtDisplay(w))
#endif
)
{
if( XmuConvertStandardSelection(w, req->time, selection, target,
type, (XPointer *) value, length, format) )
return True ;
- else
+ else
#endif
{
printf(
Atom *selection,
Atom *type,
XtPointer value,
- u_long *length,
+ unsigned long *length,
int *format)
{
Display *dpy = XtDisplay(w) ;
XawGaugeSetValue(w, *iptr) ;
}
- else if( *type == XA_STRING
+ else if( *type == XA_STRING
#ifdef HAVE_XMU
||
- *type == XA_TEXT(dpy)
+ *type == XA_TEXT(dpy)
#endif
- )
+ )
{
cptr = (char *)value ;
XawGaugeSetValue(w, atoi(cptr)) ;