Mercurial > emacs
diff src/xmenu.c @ 109372:dd04c65fb401
Convert function definitions to standard C.
* src/xterm.c (x_frame_of_widget, x_alloc_nearest_color_for_widget)
(x_alloc_lighter_color_for_widget, cvt_string_to_pixel)
(cvt_pixel_dtor, x_window_to_menu_bar, xt_action_hook)
(xaw_jump_callback, xaw_scroll_callback)
(x_create_toolkit_scroll_bar, x_set_toolkit_scroll_bar_thumb)
(x_wm_set_size_hint, x_activate_timeout_atimer): Convert
definitions to standard C.
* src/xmenu.c (menubar_id_to_frame, popup_get_selection)
(popup_activate_callback, popup_deactivate_callback)
(menu_highlight_callback, menubar_selection_callback)
(apply_systemfont_to_dialog, apply_systemfont_to_menu)
(free_frame_menubar, popup_selection_callback, as)
(create_and_show_popup_menu, dialog_selection_callback)
(create_and_show_dialog):
* src/xfns.c (hack_wm_protocols, x_window):
* src/xfaces.c (x_update_menu_appearance):
* src/widget.c (get_default_char_pixel_size, pixel_to_char_size)
(char_to_pixel_size, round_size_to_char, get_wm_shell)
(set_frame_size, update_wm_hints, setup_frame_gcs)
(update_various_frame_slots, update_from_various_frame_slots)
(EmacsFrameInitialize, EmacsFrameRealize, EmacsFrameResize)
(EmacsFrameSetValues, EmacsFrameQueryGeometry)
(EmacsFrameSetCharSize, widget_store_internal_border): Likewise.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 12 Jul 2010 12:29:49 -0700 |
parents | 60516122d066 |
children | 88a5b905a895 |
line wrap: on
line diff
--- a/src/xmenu.c Mon Jul 12 21:03:53 2010 +0200 +++ b/src/xmenu.c Mon Jul 12 12:29:49 2010 -0700 @@ -165,8 +165,7 @@ /* Return the frame whose ->output_data.x->id equals ID, or 0 if none. */ static struct frame * -menubar_id_to_frame (id) - LWLIB_ID id; +menubar_id_to_frame (LWLIB_ID id) { Lisp_Object tail, frame; FRAME_PTR f; @@ -456,11 +455,7 @@ with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ static void -popup_get_selection (initial_event, dpyinfo, id, do_timers) - XEvent *initial_event; - struct x_display_info *dpyinfo; - LWLIB_ID id; - int do_timers; +popup_get_selection (XEvent *initial_event, struct x_display_info *dpyinfo, LWLIB_ID id, int do_timers) { XEvent event; @@ -705,10 +700,7 @@ #ifndef USE_GTK static void -popup_activate_callback (widget, id, client_data) - Widget widget; - LWLIB_ID id; - XtPointer client_data; +popup_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data) { popup_activated_flag = 1; #ifdef USE_X_TOOLKIT @@ -728,10 +720,7 @@ } #else static void -popup_deactivate_callback (widget, id, client_data) - Widget widget; - LWLIB_ID id; - XtPointer client_data; +popup_deactivate_callback (Widget widget, LWLIB_ID id, XtPointer client_data) { popup_activated_flag = 0; } @@ -799,10 +788,7 @@ } #else void -menu_highlight_callback (widget, id, call_data) - Widget widget; - LWLIB_ID id; - void *call_data; +menu_highlight_callback (Widget widget, LWLIB_ID id, void *call_data) { struct frame *f; Lisp_Object help; @@ -873,10 +859,7 @@ Figure out what the user chose and put the appropriate events into the keyboard buffer. */ static void -menubar_selection_callback (widget, id, client_data) - Widget widget; - LWLIB_ID id; - XtPointer client_data; +menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) { FRAME_PTR f; @@ -942,8 +925,7 @@ #ifdef USE_LUCID static void -apply_systemfont_to_dialog (w) - Widget w; +apply_systemfont_to_dialog (Widget w) { const char *fn = xsettings_get_system_normal_font (); if (fn) @@ -955,8 +937,7 @@ } static void -apply_systemfont_to_menu (w) - Widget w; +apply_systemfont_to_menu (Widget w) { const char *fn = xsettings_get_system_normal_font (); int defflt; @@ -1352,8 +1333,7 @@ #ifndef USE_GTK void -free_frame_menubar (f) - FRAME_PTR f; +free_frame_menubar (FRAME_PTR f) { Widget menubar_widget; @@ -1569,10 +1549,7 @@ LWLIB_ID widget_id_tick; static void -popup_selection_callback (widget, id, client_data) - Widget widget; - LWLIB_ID id; - XtPointer client_data; +popup_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) { menu_item_selection = (Lisp_Object *) client_data; } @@ -1581,8 +1558,7 @@ as a Lisp object as (HIGHPART . LOWPART). */ static Lisp_Object -pop_down_menu (arg) - Lisp_Object arg; +pop_down_menu (Lisp_Object arg) { LWLIB_ID id = (XINT (XCAR (arg)) << 4 * sizeof (LWLIB_ID) | XINT (XCDR (arg))); @@ -1599,13 +1575,7 @@ menu pops down. menu_item_selection will be set to the selection. */ static void -create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp) - FRAME_PTR f; - widget_value *first_wv; - int x; - int y; - int for_click; - EMACS_UINT timestamp; +create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, int for_click, unsigned int timestamp) { int i; Arg av[2]; @@ -1997,10 +1967,7 @@ #else /* not USE_GTK */ static void -dialog_selection_callback (widget, id, client_data) - Widget widget; - LWLIB_ID id; - XtPointer client_data; +dialog_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) { /* The EMACS_INT cast avoids a warning. There's no problem as long as pointers have enough bits to hold small integers. */ @@ -2018,9 +1985,7 @@ dialog pops down. menu_item_selection will be set to the selection. */ static void -create_and_show_dialog (f, first_wv) - FRAME_PTR f; - widget_value *first_wv; +create_and_show_dialog (FRAME_PTR f, widget_value *first_wv) { LWLIB_ID dialog_id;