Mercurial > hg > xemacs-beta
comparison lwlib/xlwmenu.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 | 8c5cf108f035 |
children | ad2f4ae9895b |
comparison
equal
deleted
inserted
replaced
2285:914c5afaac33 | 2286:04bc9d2f42c7 |
---|---|
1337 static void | 1337 static void |
1338 separator_decoration_draw (XlwMenuWidget mw, | 1338 separator_decoration_draw (XlwMenuWidget mw, |
1339 Window window, | 1339 Window window, |
1340 int x, int y, | 1340 int x, int y, |
1341 unsigned int width, | 1341 unsigned int width, |
1342 Boolean vertical, | 1342 Boolean UNUSED (vertical), |
1343 shadow_type type) | 1343 shadow_type type) |
1344 { | 1344 { |
1345 Display *dpy = XtDisplay (mw); | 1345 Display *dpy = XtDisplay (mw); |
1346 GC top_gc; | 1346 GC top_gc; |
1347 GC bottom_gc; | 1347 GC bottom_gc; |
1529 } | 1529 } |
1530 | 1530 |
1531 static void | 1531 static void |
1532 label_button_size (XlwMenuWidget mw, | 1532 label_button_size (XlwMenuWidget mw, |
1533 widget_value *val, | 1533 widget_value *val, |
1534 Boolean in_menubar, | 1534 Boolean UNUSED (in_menubar), |
1535 unsigned int *toggle_width, | 1535 unsigned int *toggle_width, |
1536 unsigned int *label_width, | 1536 unsigned int *label_width, |
1537 unsigned int *bindings_width, | 1537 unsigned int *bindings_width, |
1538 unsigned int *height) | 1538 unsigned int *height) |
1539 { | 1539 { |
1552 widget_value *val, | 1552 widget_value *val, |
1553 Boolean in_menubar, | 1553 Boolean in_menubar, |
1554 Boolean highlighted, | 1554 Boolean highlighted, |
1555 Window window, | 1555 Window window, |
1556 int x, int y, | 1556 int x, int y, |
1557 unsigned int width, | 1557 unsigned int UNUSED (width), |
1558 unsigned int height, | 1558 unsigned int UNUSED (height), |
1559 unsigned int label_offset, | 1559 unsigned int label_offset, |
1560 unsigned int binding_tab) | 1560 unsigned int UNUSED (binding_tab)) |
1561 { | 1561 { |
1562 int y_offset = mw->menu.shadow_thickness + mw->menu.vertical_margin; | 1562 int y_offset = mw->menu.shadow_thickness + mw->menu.vertical_margin; |
1563 GC gc; | 1563 GC gc; |
1564 | 1564 |
1565 if (!label_offset) | 1565 if (!label_offset) |
1947 } | 1947 } |
1948 | 1948 |
1949 static void | 1949 static void |
1950 separator_size (XlwMenuWidget mw, | 1950 separator_size (XlwMenuWidget mw, |
1951 widget_value *val, | 1951 widget_value *val, |
1952 Boolean in_menubar, | 1952 Boolean UNUSED (in_menubar), |
1953 unsigned int *toggle_width, | 1953 unsigned int *toggle_width, |
1954 unsigned int *label_width, | 1954 unsigned int *label_width, |
1955 unsigned int *rest_width, | 1955 unsigned int *rest_width, |
1956 unsigned int *height) | 1956 unsigned int *height) |
1957 { | 1957 { |
1962 | 1962 |
1963 static void | 1963 static void |
1964 separator_draw (XlwMenuWidget mw, | 1964 separator_draw (XlwMenuWidget mw, |
1965 widget_value *val, | 1965 widget_value *val, |
1966 Boolean in_menubar, | 1966 Boolean in_menubar, |
1967 Boolean highlighted, | 1967 Boolean UNUSED (highlighted), |
1968 Window window, | 1968 Window window, |
1969 int x, int y, | 1969 int x, int y, |
1970 unsigned int width, | 1970 unsigned int width, |
1971 unsigned int height, | 1971 unsigned int height, |
1972 unsigned int label_tab, | 1972 unsigned int UNUSED (label_tab), |
1973 unsigned int binding_tab) | 1973 unsigned int UNUSED (binding_tab)) |
1974 { | 1974 { |
1975 unsigned int sep_width; | 1975 unsigned int sep_width; |
1976 | 1976 |
1977 if (in_menubar) | 1977 if (in_menubar) |
1978 sep_width = height; | 1978 sep_width = height; |
1987 in_menubar, | 1987 in_menubar, |
1988 separator_type(val->value)); | 1988 separator_type(val->value)); |
1989 } | 1989 } |
1990 | 1990 |
1991 static void | 1991 static void |
1992 pushright_size (XlwMenuWidget mw, | 1992 pushright_size (XlwMenuWidget UNUSED (mw), |
1993 widget_value *val, | 1993 widget_value *UNUSED (val), |
1994 Boolean in_menubar, | 1994 Boolean UNUSED (in_menubar), |
1995 unsigned int *toggle_width, | 1995 unsigned int *toggle_width, |
1996 unsigned int *label_width, | 1996 unsigned int *label_width, |
1997 unsigned int *rest_width, | 1997 unsigned int *rest_width, |
1998 unsigned int *height) | 1998 unsigned int *height) |
1999 { | 1999 { |
2998 return font; | 2998 return font; |
2999 } | 2999 } |
3000 #endif /* NEED_MOTIF */ | 3000 #endif /* NEED_MOTIF */ |
3001 | 3001 |
3002 static void | 3002 static void |
3003 XlwMenuInitialize (Widget request, Widget new_, ArgList args, | 3003 XlwMenuInitialize (Widget UNUSED (request), Widget new_, ArgList UNUSED (args), |
3004 Cardinal *num_args) | 3004 Cardinal *UNUSED (num_args)) |
3005 { | 3005 { |
3006 /* Get the GCs and the widget size */ | 3006 /* Get the GCs and the widget size */ |
3007 XlwMenuWidget mw = (XlwMenuWidget)new_; | 3007 XlwMenuWidget mw = (XlwMenuWidget)new_; |
3008 Window window = RootWindowOfScreen (DefaultScreenOfDisplay (XtDisplay (mw))); | 3008 Window window = RootWindowOfScreen (DefaultScreenOfDisplay (XtDisplay (mw))); |
3009 Display *display = XtDisplay (mw); | 3009 Display *display = XtDisplay (mw); |
3102 | 3102 |
3103 /* Only the toplevel menubar/popup is a widget so it's the only one that | 3103 /* Only the toplevel menubar/popup is a widget so it's the only one that |
3104 receives expose events through Xt. So we repaint all the other panes | 3104 receives expose events through Xt. So we repaint all the other panes |
3105 when receiving an Expose event. */ | 3105 when receiving an Expose event. */ |
3106 static void | 3106 static void |
3107 XlwMenuRedisplay (Widget w, XEvent *ev, Region region) | 3107 XlwMenuRedisplay (Widget w, XEvent *UNUSED (ev), Region UNUSED (region)) |
3108 { | 3108 { |
3109 XlwMenuWidget mw = (XlwMenuWidget)w; | 3109 XlwMenuWidget mw = (XlwMenuWidget)w; |
3110 int i; | 3110 int i; |
3111 | 3111 |
3112 if (mw->core.being_destroyed) return; | 3112 if (mw->core.being_destroyed) return; |
3161 if (mw->menu.windows) | 3161 if (mw->menu.windows) |
3162 XtFree ((char *) mw->menu.windows); | 3162 XtFree ((char *) mw->menu.windows); |
3163 } | 3163 } |
3164 | 3164 |
3165 static Boolean | 3165 static Boolean |
3166 XlwMenuSetValues (Widget current, Widget request, Widget new_, ArgList args, | 3166 XlwMenuSetValues (Widget current, Widget UNUSED (request), Widget new_, |
3167 Cardinal *num_args) | 3167 ArgList UNUSED (args), Cardinal *UNUSED (num_args)) |
3168 { | 3168 { |
3169 XlwMenuWidget oldmw = (XlwMenuWidget)current; | 3169 XlwMenuWidget oldmw = (XlwMenuWidget)current; |
3170 XlwMenuWidget newmw = (XlwMenuWidget)new_; | 3170 XlwMenuWidget newmw = (XlwMenuWidget)new_; |
3171 Boolean redisplay = False; | 3171 Boolean redisplay = False; |
3172 int i; | 3172 int i; |
3302 } | 3302 } |
3303 | 3303 |
3304 Time x_focus_timestamp_really_sucks_fix_me_better; | 3304 Time x_focus_timestamp_really_sucks_fix_me_better; |
3305 | 3305 |
3306 static void | 3306 static void |
3307 Start (Widget w, XEvent *ev, String *params, Cardinal *num_params) | 3307 Start (Widget w, XEvent *ev, String *UNUSED (params), |
3308 Cardinal *UNUSED (num_params)) | |
3308 { | 3309 { |
3309 XlwMenuWidget mw = (XlwMenuWidget)w; | 3310 XlwMenuWidget mw = (XlwMenuWidget)w; |
3310 | 3311 |
3311 lw_menubar_widget = w; | 3312 lw_menubar_widget = w; |
3312 | 3313 |
3337 /* handles the down like a move, slots are mostly compatible */ | 3338 /* handles the down like a move, slots are mostly compatible */ |
3338 handle_motion_event (mw, &ev->xmotion, True); | 3339 handle_motion_event (mw, &ev->xmotion, True); |
3339 } | 3340 } |
3340 | 3341 |
3341 static void | 3342 static void |
3342 Drag (Widget w, XEvent *ev, String *params, Cardinal *num_params) | 3343 Drag (Widget w, XEvent *ev, String *UNUSED (params), |
3344 Cardinal *UNUSED (num_params)) | |
3343 { | 3345 { |
3344 XlwMenuWidget mw = (XlwMenuWidget)w; | 3346 XlwMenuWidget mw = (XlwMenuWidget)w; |
3345 handle_motion_event (mw, &ev->xmotion, False); | 3347 handle_motion_event (mw, &ev->xmotion, False); |
3346 } | 3348 } |
3347 | 3349 |
3348 static void | 3350 static void |
3349 Select (Widget w, XEvent *ev, String *params, Cardinal *num_params) | 3351 Select (Widget w, XEvent *ev, String *UNUSED (params), |
3352 Cardinal *UNUSED (num_params)) | |
3350 { | 3353 { |
3351 XlwMenuWidget mw = (XlwMenuWidget)w; | 3354 XlwMenuWidget mw = (XlwMenuWidget)w; |
3352 widget_value *selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; | 3355 widget_value *selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; |
3353 | 3356 |
3354 lw_menu_accelerate = False; | 3357 lw_menu_accelerate = False; |
3465 } | 3468 } |
3466 } | 3469 } |
3467 | 3470 |
3468 /* display the stupid menu already */ | 3471 /* display the stupid menu already */ |
3469 void | 3472 void |
3470 xlw_display_menu (Time t) | 3473 xlw_display_menu (Time UNUSED (t)) |
3471 { | 3474 { |
3472 XlwMenuWidget mw = (XlwMenuWidget)lw_menubar_widget; | 3475 XlwMenuWidget mw = (XlwMenuWidget)lw_menubar_widget; |
3473 | 3476 |
3474 lw_menu_accelerate = True; | 3477 lw_menu_accelerate = True; |
3475 | 3478 |