comparison lwlib/xlwgauge.c @ 2286:04bc9d2f42c7

[xemacs-hg @ 2004-09-20 19:18:55 by james] Mark all unused parameters as unused. Also eliminate some unneeded local variables.
author james
date Mon, 20 Sep 2004 19:20:08 +0000
parents 0dfff19d20da
children 6c9e392b4307
comparison
equal deleted inserted replaced
2285:914c5afaac33 2286:04bc9d2f42c7
239 239
240 /* ARGSUSED */ 240 /* ARGSUSED */
241 static void 241 static void
242 GaugeInit (Widget request, 242 GaugeInit (Widget request,
243 Widget new, 243 Widget new,
244 ArgList args, 244 ArgList UNUSED (args),
245 Cardinal *num_args) 245 Cardinal *UNUSED (num_args))
246 { 246 {
247 GaugeWidget gw = (GaugeWidget) new; 247 GaugeWidget gw = (GaugeWidget) new;
248 248
249 if( gw->gauge.v0 == 0 && gw->gauge.v1 == 0 ) { 249 if( gw->gauge.v0 == 0 && gw->gauge.v1 == 0 ) {
250 gw->gauge.autoScaleUp = gw->gauge.autoScaleDown = TRUE ; 250 gw->gauge.autoScaleUp = gw->gauge.autoScaleDown = TRUE ;
364 */ 364 */
365 365
366 /* ARGSUSED */ 366 /* ARGSUSED */
367 static void 367 static void
368 GaugeExpose (Widget w, 368 GaugeExpose (Widget w,
369 XEvent *event, 369 XEvent *UNUSED (event),
370 Region region) 370 Region UNUSED (region))
371 { 371 {
372 GaugeWidget gw = (GaugeWidget) w; 372 GaugeWidget gw = (GaugeWidget) w;
373 register Display *dpy = XtDisplay(w) ; 373 register Display *dpy = XtDisplay(w) ;
374 register Window win = XtWindow(w) ; 374 register Window win = XtWindow(w) ;
375 GC gc; /* foreground, background */ 375 GC gc; /* foreground, background */
376 GC gctop, gcbot ; /* dark, light shadows */ 376 GC gctop, gcbot ; /* dark, light shadows */
377 377
378 int len ; /* length (width or height) of widget */ 378 int len ; /* length (width or height) of widget */
379 int hgt ; /* height (width) of widget */
380 int e0,e1 ; /* ends of the gauge */ 379 int e0,e1 ; /* ends of the gauge */
381 int x ; 380 int x ;
382 int y ; /* vertical (horizontal) position */ 381 int y ; /* vertical (horizontal) position */
383 int i ; 382 int i ;
384 int v0 = gw->gauge.v0 ; 383 int v0 = gw->gauge.v0 ;
395 gctop = gcbot = gc ; 394 gctop = gcbot = gc ;
396 #endif 395 #endif
397 396
398 if( gw->gauge.orientation == XtorientHorizontal ) { 397 if( gw->gauge.orientation == XtorientHorizontal ) {
399 len = gw->core.width ; 398 len = gw->core.width ;
400 hgt = gw->core.height ;
401 } else { 399 } else {
402 len = gw->core.height ; 400 len = gw->core.height ;
403 hgt = gw->core.width ;
404 } 401 }
405 402
406 /* if the gauge is selected, signify by drawing the background 403 /* if the gauge is selected, signify by drawing the background
407 * in a contrasting color. 404 * in a contrasting color.
408 */ 405 */
501 * Set specified arguments into widget 498 * Set specified arguments into widget
502 */ 499 */
503 500
504 static Boolean 501 static Boolean
505 GaugeSetValues (Widget old, 502 GaugeSetValues (Widget old,
506 Widget request, 503 Widget UNUSED (request),
507 Widget new, 504 Widget new,
508 ArgList args, 505 ArgList UNUSED (args),
509 Cardinal *num_args) 506 Cardinal *UNUSED (num_args))
510 { 507 {
511 GaugeWidget oldgw = (GaugeWidget) old; 508 GaugeWidget oldgw = (GaugeWidget) old;
512 GaugeWidget gw = (GaugeWidget) new; 509 GaugeWidget gw = (GaugeWidget) new;
513 Boolean was_resized = False; 510 Boolean was_resized = False;
514 511
722 719
723 720
724 721
725 static void 722 static void
726 GaugeLoseSel (Widget w, 723 GaugeLoseSel (Widget w,
727 Atom *selection) /* usually XA_PRIMARY */ 724 Atom *UNUSED (selection)) /* usually XA_PRIMARY */
728 { 725 {
729 GaugeWidget gw = (GaugeWidget)w ; 726 GaugeWidget gw = (GaugeWidget)w ;
730 Display *dpy = XtDisplay(w) ; 727 Display *dpy = XtDisplay(w) ;
731 Window win = XtWindow(w) ; 728 Window win = XtWindow(w) ;
732 729
740 GaugeExpose(w,0,0) ; 737 GaugeExpose(w,0,0) ;
741 } 738 }
742 739
743 740
744 static void 741 static void
745 GaugeDoneSel (Widget w, 742 GaugeDoneSel (Widget UNUSED (w),
746 Atom *selection, /* usually XA_PRIMARY */ 743 Atom *UNUSED (selection), /* usually XA_PRIMARY */
747 Atom *target) /* requested target */ 744 Atom *UNUSED (target)) /* requested target */
748 { 745 {
749 /* selection done, anything to do? */ 746 /* selection done, anything to do? */
750 } 747 }
751 748
752 749
773 GaugeGetSelCB (Widget w, 770 GaugeGetSelCB (Widget w,
774 XtPointer client, 771 XtPointer client,
775 Atom *selection, 772 Atom *selection,
776 Atom *type, 773 Atom *type,
777 XtPointer value, 774 XtPointer value,
778 unsigned long *length, 775 unsigned long *UNUSED (length),
779 int *format) 776 int *UNUSED (format))
780 { 777 {
781 Display *dpy = XtDisplay(w) ; 778 Display *dpy = XtDisplay(w) ;
782 Atom target = (Atom)client ; 779 Atom target = (Atom)client ;
783 int *iptr ; 780 int *iptr ;
784 char *cptr ; 781 char *cptr ;
1106 XtRemoveTimeOut(gw->gauge.intervalId) ; 1103 XtRemoveTimeOut(gw->gauge.intervalId) ;
1107 } 1104 }
1108 1105
1109 static void 1106 static void
1110 GaugeGetValue (XtPointer clientData, 1107 GaugeGetValue (XtPointer clientData,
1111 XtIntervalId *intervalId) 1108 XtIntervalId *UNUSED (intervalId))
1112 { 1109 {
1113 GaugeWidget gw = (GaugeWidget)clientData ; 1110 GaugeWidget gw = (GaugeWidget)clientData ;
1114 Cardinal value ; 1111 Cardinal value ;
1115 1112
1116 if( gw->gauge.update > 0 ) 1113 if( gw->gauge.update > 0 )