Mercurial > hg > xemacs-beta
comparison lwlib/xlwtabs.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 | b39c14581166 |
children | facf3239ba30 |
comparison
equal
deleted
inserted
replaced
2285:914c5afaac33 | 2286:04bc9d2f42c7 |
---|---|
419 * and optionally compute size of widget. */ | 419 * and optionally compute size of widget. */ |
420 | 420 |
421 /* ARGSUSED */ | 421 /* ARGSUSED */ |
422 | 422 |
423 static void | 423 static void |
424 TabsInit(Widget request, Widget new, ArgList args, Cardinal *num_args) | 424 TabsInit(Widget request, Widget new, ArgList UNUSED (args), |
425 Cardinal *UNUSED (num_args)) | |
425 { | 426 { |
426 TabsWidget newTw = (TabsWidget)new; | 427 TabsWidget newTw = (TabsWidget)new; |
427 | 428 |
428 newTw->tabs.numRows = 0 ; | 429 newTw->tabs.numRows = 0 ; |
429 newTw->tabs.realRows = 0; | 430 newTw->tabs.realRows = 0; |
475 /* Init the constraint part of a new tab child. Compute the | 476 /* Init the constraint part of a new tab child. Compute the |
476 * size of the tab. | 477 * size of the tab. |
477 */ | 478 */ |
478 /* ARGSUSED */ | 479 /* ARGSUSED */ |
479 static void | 480 static void |
480 TabsConstraintInitialize(Widget request, Widget new, | 481 TabsConstraintInitialize(Widget UNUSED (request), Widget new, |
481 ArgList args, Cardinal *num_args) | 482 ArgList UNUSED (args), Cardinal *UNUSED (num_args)) |
482 { | 483 { |
483 TabsConstraints tab = (TabsConstraints) new->core.constraints ; | 484 TabsConstraints tab = (TabsConstraints) new->core.constraints ; |
484 tab->tabs.greyAlloc = False ; /* defer allocation of pixel */ | 485 tab->tabs.greyAlloc = False ; /* defer allocation of pixel */ |
485 tab->tabs.visible = False ; | 486 tab->tabs.visible = False ; |
486 | 487 |
525 { | 526 { |
526 TabsWidget tw = (TabsWidget) w; | 527 TabsWidget tw = (TabsWidget) w; |
527 int i ; | 528 int i ; |
528 int num_children = tw->composite.num_children ; | 529 int num_children = tw->composite.num_children ; |
529 Widget *childP ; | 530 Widget *childP ; |
530 TabsConstraints tab ; /* #### unused */ | 531 /* TabsConstraints tab ; */ /* #### unused */ |
531 Dimension cw,ch,bw ; | 532 Dimension cw,ch,bw ; |
532 | 533 |
533 /* Our size has now been dictated by the parent. Lay out the | 534 /* Our size has now been dictated by the parent. Lay out the |
534 * tabs, lay out the frame, lay out the children. Remember | 535 * tabs, lay out the frame, lay out the children. Remember |
535 * that the tabs overlap each other and the frame by shadowWidth. | 536 * that the tabs overlap each other and the frame by shadowWidth. |
564 for(i=0, childP=tw->composite.children; | 565 for(i=0, childP=tw->composite.children; |
565 i < num_children; | 566 i < num_children; |
566 ++i, ++childP) | 567 ++i, ++childP) |
567 if( XtIsManaged(*childP) ) | 568 if( XtIsManaged(*childP) ) |
568 { | 569 { |
569 tab = (TabsConstraints) (*childP)->core.constraints ; | 570 /* tab = (TabsConstraints) (*childP)->core.constraints ; */ |
570 bw = (*childP)->core.border_width ; | 571 bw = (*childP)->core.border_width ; |
571 /* Don't do anything if we can't see any of the child. */ | 572 /* Don't do anything if we can't see any of the child. */ |
572 if (ch >= bw*2 && ch > 0 && cw >= bw*2 && cw > 0) | 573 if (ch >= bw*2 && ch > 0 && cw >= bw*2 && cw > 0) |
573 XtConfigureWidget(*childP, SHADWID,tw->tabs.tab_total+SHADWID, | 574 XtConfigureWidget(*childP, SHADWID,tw->tabs.tab_total+SHADWID, |
574 cw-bw*2,ch-bw*2, bw) ; | 575 cw-bw*2,ch-bw*2, bw) ; |
587 | 588 |
588 /* Redraw entire Tabs widget */ | 589 /* Redraw entire Tabs widget */ |
589 | 590 |
590 /* ARGSUSED */ | 591 /* ARGSUSED */ |
591 static void | 592 static void |
592 TabsExpose(Widget w, XEvent *event, Region region) | 593 TabsExpose(Widget w, XEvent *UNUSED (event), Region UNUSED (region)) |
593 { | 594 { |
594 TabsWidget tw = (TabsWidget) w; | 595 TabsWidget tw = (TabsWidget) w; |
595 | 596 |
596 if( tw->tabs.needs_layout ) | 597 if( tw->tabs.needs_layout ) |
597 XtClass(w)->core_class.resize(w) ; | 598 XtClass(w)->core_class.resize(w) ; |
602 | 603 |
603 /* Called when any Tabs widget resources are changed. */ | 604 /* Called when any Tabs widget resources are changed. */ |
604 | 605 |
605 /* ARGSUSED */ | 606 /* ARGSUSED */ |
606 static Boolean | 607 static Boolean |
607 TabsSetValues(Widget current, Widget request, Widget new, | 608 TabsSetValues(Widget current, Widget UNUSED (request), Widget new, |
608 ArgList args, Cardinal *num_args) | 609 ArgList UNUSED (args), Cardinal *UNUSED (num_args)) |
609 { | 610 { |
610 TabsWidget curtw = (TabsWidget) current ; | 611 TabsWidget curtw = (TabsWidget) current ; |
611 TabsWidget tw = (TabsWidget) new ; | 612 TabsWidget tw = (TabsWidget) new ; |
612 Boolean needRedraw = False ; | 613 Boolean needRedraw = False ; |
613 Widget *childP ; | 614 Widget *childP ; |
682 | 683 |
683 /* Called when any child constraint resources change. */ | 684 /* Called when any child constraint resources change. */ |
684 | 685 |
685 /* ARGSUSED */ | 686 /* ARGSUSED */ |
686 static Boolean | 687 static Boolean |
687 TabsConstraintSetValues(Widget current, Widget request, Widget new, | 688 TabsConstraintSetValues(Widget current, Widget UNUSED (request), Widget new, |
688 ArgList args, Cardinal *num_args) | 689 ArgList UNUSED (args), Cardinal *UNUSED (num_args)) |
689 { | 690 { |
690 TabsWidget tw = (TabsWidget) XtParent(new) ; | 691 TabsWidget tw = (TabsWidget) XtParent(new) ; |
691 TabsConstraints ctab = (TabsConstraints) current->core.constraints ; | 692 TabsConstraints ctab = (TabsConstraints) current->core.constraints ; |
692 TabsConstraints tab = (TabsConstraints) new->core.constraints ; | 693 TabsConstraints tab = (TabsConstraints) new->core.constraints ; |
693 | 694 |
735 return False ; | 736 return False ; |
736 } | 737 } |
737 | 738 |
738 | 739 |
739 static Boolean | 740 static Boolean |
740 TabsAcceptFocus(Widget w, Time *t) | 741 TabsAcceptFocus(Widget w, Time *UNUSED (t)) |
741 { | 742 { |
742 if( !w->core.being_destroyed && XtIsRealized(w) && | 743 if( !w->core.being_destroyed && XtIsRealized(w) && |
743 XtIsSensitive(w) && XtIsManaged(w) && w->core.visible ) | 744 XtIsSensitive(w) && XtIsManaged(w) && w->core.visible ) |
744 { | 745 { |
745 Widget p ; | 746 Widget p ; |
1036 | 1037 |
1037 /* User clicks on a tab, figure out which one it was. */ | 1038 /* User clicks on a tab, figure out which one it was. */ |
1038 | 1039 |
1039 /* ARGSUSED */ | 1040 /* ARGSUSED */ |
1040 static void | 1041 static void |
1041 TabsSelect(Widget w, XEvent *event, String *params, Cardinal *num_params) | 1042 TabsSelect(Widget w, XEvent *event, String *UNUSED (params), |
1043 Cardinal *UNUSED (num_params)) | |
1042 { | 1044 { |
1043 TabsWidget tw = (TabsWidget) w ; | 1045 TabsWidget tw = (TabsWidget) w ; |
1044 Widget *childP ; | 1046 Widget *childP ; |
1045 Position x,y ; | 1047 Position x,y ; |
1046 Dimension h = tw->tabs.tab_height ; | 1048 Dimension h = tw->tabs.tab_height ; |
1084 | 1086 |
1085 | 1087 |
1086 /* User hits a key */ | 1088 /* User hits a key */ |
1087 | 1089 |
1088 static void | 1090 static void |
1089 TabsPage(Widget w, XEvent *event, String *params, Cardinal *num_params) | 1091 TabsPage(Widget w, XEvent *UNUSED (event), String *params, |
1092 Cardinal *num_params) | |
1090 { | 1093 { |
1091 TabsWidget tw = (TabsWidget) w ; | 1094 TabsWidget tw = (TabsWidget) w ; |
1092 Widget newtop = NULL; | 1095 Widget newtop = NULL; |
1093 Widget *childP ; | 1096 Widget *childP ; |
1094 int idx ; | 1097 int idx ; |
1148 | 1151 |
1149 | 1152 |
1150 /* User hits up/down key */ | 1153 /* User hits up/down key */ |
1151 | 1154 |
1152 static void | 1155 static void |
1153 TabsHighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) | 1156 TabsHighlight(Widget w, XEvent *UNUSED (event), String *params, |
1157 Cardinal *num_params) | |
1154 { | 1158 { |
1155 TabsWidget tw = (TabsWidget) w ; | 1159 TabsWidget tw = (TabsWidget) w ; |
1156 Widget newhl = NULL; | 1160 Widget newhl = NULL; |
1157 Widget *childP ; | 1161 Widget *childP ; |
1158 int idx ; | 1162 int idx ; |
1213 } | 1217 } |
1214 | 1218 |
1215 | 1219 |
1216 | 1220 |
1217 static void | 1221 static void |
1218 TabsUnhighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) | 1222 TabsUnhighlight(Widget w, XEvent *UNUSED (event), String *UNUSED (params), |
1223 Cardinal *UNUSED (num_params)) | |
1219 { | 1224 { |
1220 TabsWidget tw = (TabsWidget) w ; | 1225 TabsWidget tw = (TabsWidget) w ; |
1221 int nc = tw->composite.num_children ; | 1226 int nc = tw->composite.num_children ; |
1222 | 1227 |
1223 if( nc <= 0 ) | 1228 if( nc <= 0 ) |