diff options
| author | Dan Nicolaescu | 2010-07-12 12:29:49 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-12 12:29:49 -0700 |
| commit | ebd156110cd758dd0b356424844c8a14dfc4c615 (patch) | |
| tree | 954ad0daf8c790ebb71a57be6f11757be1c58ee9 /src/xmenu.c | |
| parent | de06a2dd4d6bd4b352a22b71b58dd7ae15c81fe0 (diff) | |
| download | emacs-ebd156110cd758dd0b356424844c8a14dfc4c615.tar.gz emacs-ebd156110cd758dd0b356424844c8a14dfc4c615.zip | |
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.
Diffstat (limited to 'src/xmenu.c')
| -rw-r--r-- | src/xmenu.c | 63 |
1 files changed, 14 insertions, 49 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 93a40792aec..d9c71b0cf2f 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -165,8 +165,7 @@ int pending_menu_activation; | |||
| 165 | /* Return the frame whose ->output_data.x->id equals ID, or 0 if none. */ | 165 | /* Return the frame whose ->output_data.x->id equals ID, or 0 if none. */ |
| 166 | 166 | ||
| 167 | static struct frame * | 167 | static struct frame * |
| 168 | menubar_id_to_frame (id) | 168 | menubar_id_to_frame (LWLIB_ID id) |
| 169 | LWLIB_ID id; | ||
| 170 | { | 169 | { |
| 171 | Lisp_Object tail, frame; | 170 | Lisp_Object tail, frame; |
| 172 | FRAME_PTR f; | 171 | FRAME_PTR f; |
| @@ -456,11 +455,7 @@ x_menu_wait_for_event (void *data) | |||
| 456 | with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ | 455 | with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ |
| 457 | 456 | ||
| 458 | static void | 457 | static void |
| 459 | popup_get_selection (initial_event, dpyinfo, id, do_timers) | 458 | popup_get_selection (XEvent *initial_event, struct x_display_info *dpyinfo, LWLIB_ID id, int do_timers) |
| 460 | XEvent *initial_event; | ||
| 461 | struct x_display_info *dpyinfo; | ||
| 462 | LWLIB_ID id; | ||
| 463 | int do_timers; | ||
| 464 | { | 459 | { |
| 465 | XEvent event; | 460 | XEvent event; |
| 466 | 461 | ||
| @@ -705,10 +700,7 @@ x_activate_menubar (FRAME_PTR f) | |||
| 705 | 700 | ||
| 706 | #ifndef USE_GTK | 701 | #ifndef USE_GTK |
| 707 | static void | 702 | static void |
| 708 | popup_activate_callback (widget, id, client_data) | 703 | popup_activate_callback (Widget widget, LWLIB_ID id, XtPointer client_data) |
| 709 | Widget widget; | ||
| 710 | LWLIB_ID id; | ||
| 711 | XtPointer client_data; | ||
| 712 | { | 704 | { |
| 713 | popup_activated_flag = 1; | 705 | popup_activated_flag = 1; |
| 714 | #ifdef USE_X_TOOLKIT | 706 | #ifdef USE_X_TOOLKIT |
| @@ -728,10 +720,7 @@ popup_deactivate_callback (GtkWidget *widget, gpointer client_data) | |||
| 728 | } | 720 | } |
| 729 | #else | 721 | #else |
| 730 | static void | 722 | static void |
| 731 | popup_deactivate_callback (widget, id, client_data) | 723 | popup_deactivate_callback (Widget widget, LWLIB_ID id, XtPointer client_data) |
| 732 | Widget widget; | ||
| 733 | LWLIB_ID id; | ||
| 734 | XtPointer client_data; | ||
| 735 | { | 724 | { |
| 736 | popup_activated_flag = 0; | 725 | popup_activated_flag = 0; |
| 737 | } | 726 | } |
| @@ -799,10 +788,7 @@ menu_highlight_callback (GtkWidget *widget, gpointer call_data) | |||
| 799 | } | 788 | } |
| 800 | #else | 789 | #else |
| 801 | void | 790 | void |
| 802 | menu_highlight_callback (widget, id, call_data) | 791 | menu_highlight_callback (Widget widget, LWLIB_ID id, void *call_data) |
| 803 | Widget widget; | ||
| 804 | LWLIB_ID id; | ||
| 805 | void *call_data; | ||
| 806 | { | 792 | { |
| 807 | struct frame *f; | 793 | struct frame *f; |
| 808 | Lisp_Object help; | 794 | Lisp_Object help; |
| @@ -873,10 +859,7 @@ menubar_selection_callback (GtkWidget *widget, gpointer client_data) | |||
| 873 | Figure out what the user chose | 859 | Figure out what the user chose |
| 874 | and put the appropriate events into the keyboard buffer. */ | 860 | and put the appropriate events into the keyboard buffer. */ |
| 875 | static void | 861 | static void |
| 876 | menubar_selection_callback (widget, id, client_data) | 862 | menubar_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) |
| 877 | Widget widget; | ||
| 878 | LWLIB_ID id; | ||
| 879 | XtPointer client_data; | ||
| 880 | { | 863 | { |
| 881 | FRAME_PTR f; | 864 | FRAME_PTR f; |
| 882 | 865 | ||
| @@ -942,8 +925,7 @@ update_frame_menubar (FRAME_PTR f) | |||
| 942 | 925 | ||
| 943 | #ifdef USE_LUCID | 926 | #ifdef USE_LUCID |
| 944 | static void | 927 | static void |
| 945 | apply_systemfont_to_dialog (w) | 928 | apply_systemfont_to_dialog (Widget w) |
| 946 | Widget w; | ||
| 947 | { | 929 | { |
| 948 | const char *fn = xsettings_get_system_normal_font (); | 930 | const char *fn = xsettings_get_system_normal_font (); |
| 949 | if (fn) | 931 | if (fn) |
| @@ -955,8 +937,7 @@ apply_systemfont_to_dialog (w) | |||
| 955 | } | 937 | } |
| 956 | 938 | ||
| 957 | static void | 939 | static void |
| 958 | apply_systemfont_to_menu (w) | 940 | apply_systemfont_to_menu (Widget w) |
| 959 | Widget w; | ||
| 960 | { | 941 | { |
| 961 | const char *fn = xsettings_get_system_normal_font (); | 942 | const char *fn = xsettings_get_system_normal_font (); |
| 962 | int defflt; | 943 | int defflt; |
| @@ -1352,8 +1333,7 @@ initialize_frame_menubar (FRAME_PTR f) | |||
| 1352 | 1333 | ||
| 1353 | #ifndef USE_GTK | 1334 | #ifndef USE_GTK |
| 1354 | void | 1335 | void |
| 1355 | free_frame_menubar (f) | 1336 | free_frame_menubar (FRAME_PTR f) |
| 1356 | FRAME_PTR f; | ||
| 1357 | { | 1337 | { |
| 1358 | Widget menubar_widget; | 1338 | Widget menubar_widget; |
| 1359 | 1339 | ||
| @@ -1569,10 +1549,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, i | |||
| 1569 | LWLIB_ID widget_id_tick; | 1549 | LWLIB_ID widget_id_tick; |
| 1570 | 1550 | ||
| 1571 | static void | 1551 | static void |
| 1572 | popup_selection_callback (widget, id, client_data) | 1552 | popup_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) |
| 1573 | Widget widget; | ||
| 1574 | LWLIB_ID id; | ||
| 1575 | XtPointer client_data; | ||
| 1576 | { | 1553 | { |
| 1577 | menu_item_selection = (Lisp_Object *) client_data; | 1554 | menu_item_selection = (Lisp_Object *) client_data; |
| 1578 | } | 1555 | } |
| @@ -1581,8 +1558,7 @@ popup_selection_callback (widget, id, client_data) | |||
| 1581 | as a Lisp object as (HIGHPART . LOWPART). */ | 1558 | as a Lisp object as (HIGHPART . LOWPART). */ |
| 1582 | 1559 | ||
| 1583 | static Lisp_Object | 1560 | static Lisp_Object |
| 1584 | pop_down_menu (arg) | 1561 | pop_down_menu (Lisp_Object arg) |
| 1585 | Lisp_Object arg; | ||
| 1586 | { | 1562 | { |
| 1587 | LWLIB_ID id = (XINT (XCAR (arg)) << 4 * sizeof (LWLIB_ID) | 1563 | LWLIB_ID id = (XINT (XCAR (arg)) << 4 * sizeof (LWLIB_ID) |
| 1588 | | XINT (XCDR (arg))); | 1564 | | XINT (XCDR (arg))); |
| @@ -1599,13 +1575,7 @@ pop_down_menu (arg) | |||
| 1599 | menu pops down. | 1575 | menu pops down. |
| 1600 | menu_item_selection will be set to the selection. */ | 1576 | menu_item_selection will be set to the selection. */ |
| 1601 | static void | 1577 | static void |
| 1602 | create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp) | 1578 | create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y, int for_click, unsigned int timestamp) |
| 1603 | FRAME_PTR f; | ||
| 1604 | widget_value *first_wv; | ||
| 1605 | int x; | ||
| 1606 | int y; | ||
| 1607 | int for_click; | ||
| 1608 | EMACS_UINT timestamp; | ||
| 1609 | { | 1579 | { |
| 1610 | int i; | 1580 | int i; |
| 1611 | Arg av[2]; | 1581 | Arg av[2]; |
| @@ -1997,10 +1967,7 @@ create_and_show_dialog (FRAME_PTR f, widget_value *first_wv) | |||
| 1997 | 1967 | ||
| 1998 | #else /* not USE_GTK */ | 1968 | #else /* not USE_GTK */ |
| 1999 | static void | 1969 | static void |
| 2000 | dialog_selection_callback (widget, id, client_data) | 1970 | dialog_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) |
| 2001 | Widget widget; | ||
| 2002 | LWLIB_ID id; | ||
| 2003 | XtPointer client_data; | ||
| 2004 | { | 1971 | { |
| 2005 | /* The EMACS_INT cast avoids a warning. There's no problem | 1972 | /* The EMACS_INT cast avoids a warning. There's no problem |
| 2006 | as long as pointers have enough bits to hold small integers. */ | 1973 | as long as pointers have enough bits to hold small integers. */ |
| @@ -2018,9 +1985,7 @@ dialog_selection_callback (widget, id, client_data) | |||
| 2018 | dialog pops down. | 1985 | dialog pops down. |
| 2019 | menu_item_selection will be set to the selection. */ | 1986 | menu_item_selection will be set to the selection. */ |
| 2020 | static void | 1987 | static void |
| 2021 | create_and_show_dialog (f, first_wv) | 1988 | create_and_show_dialog (FRAME_PTR f, widget_value *first_wv) |
| 2022 | FRAME_PTR f; | ||
| 2023 | widget_value *first_wv; | ||
| 2024 | { | 1989 | { |
| 2025 | LWLIB_ID dialog_id; | 1990 | LWLIB_ID dialog_id; |
| 2026 | 1991 | ||