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 | |
| 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.
| -rw-r--r-- | src/ChangeLog | 26 | ||||
| -rw-r--r-- | src/widget.c | 97 | ||||
| -rw-r--r-- | src/xfaces.c | 3 | ||||
| -rw-r--r-- | src/xfns.c | 9 | ||||
| -rw-r--r-- | src/xmenu.c | 63 | ||||
| -rw-r--r-- | src/xterm.c | 71 |
6 files changed, 87 insertions, 182 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7a662c29acf..a27fc7484f7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,29 @@ | |||
| 1 | 2010-07-12 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * xterm.c (x_frame_of_widget, x_alloc_nearest_color_for_widget) | ||
| 4 | (x_alloc_lighter_color_for_widget, cvt_string_to_pixel) | ||
| 5 | (cvt_pixel_dtor, x_window_to_menu_bar, xt_action_hook) | ||
| 6 | (xaw_jump_callback, xaw_scroll_callback) | ||
| 7 | (x_create_toolkit_scroll_bar, x_set_toolkit_scroll_bar_thumb) | ||
| 8 | (x_wm_set_size_hint, x_activate_timeout_atimer): Convert | ||
| 9 | definitions to standard C. | ||
| 10 | * xmenu.c (menubar_id_to_frame, popup_get_selection) | ||
| 11 | (popup_activate_callback, popup_deactivate_callback) | ||
| 12 | (menu_highlight_callback, menubar_selection_callback) | ||
| 13 | (apply_systemfont_to_dialog, apply_systemfont_to_menu) | ||
| 14 | (free_frame_menubar, popup_selection_callback, as) | ||
| 15 | (create_and_show_popup_menu, dialog_selection_callback) | ||
| 16 | (create_and_show_dialog): | ||
| 17 | * xfns.c (hack_wm_protocols, x_window): | ||
| 18 | * xfaces.c (x_update_menu_appearance): | ||
| 19 | * widget.c (get_default_char_pixel_size, pixel_to_char_size) | ||
| 20 | (char_to_pixel_size, round_size_to_char, get_wm_shell) | ||
| 21 | (set_frame_size, update_wm_hints, setup_frame_gcs) | ||
| 22 | (update_various_frame_slots, update_from_various_frame_slots) | ||
| 23 | (EmacsFrameInitialize, EmacsFrameRealize, EmacsFrameResize) | ||
| 24 | (EmacsFrameSetValues, EmacsFrameQueryGeometry) | ||
| 25 | (EmacsFrameSetCharSize, widget_store_internal_border): Likewise. | ||
| 26 | |||
| 1 | 2010-07-12 Andreas Schwab <schwab@linux-m68k.org> | 27 | 2010-07-12 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 28 | ||
| 3 | * dbusbind.c (xd_initialize): Don't compare boolean with a | 29 | * dbusbind.c (xd_initialize): Don't compare boolean with a |
diff --git a/src/widget.c b/src/widget.c index 0c3aa64a74e..2301f76c7c9 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -76,14 +76,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 76 | #define DEFAULT_FACE_FONT "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" | 76 | #define DEFAULT_FACE_FONT "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" |
| 77 | 77 | ||
| 78 | 78 | ||
| 79 | static void EmacsFrameInitialize (/*Widget, Widget, ArgList, Cardinal * */); | 79 | static void EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2); |
| 80 | static void EmacsFrameDestroy (/* Widget */); | 80 | static void EmacsFrameDestroy (Widget widget); |
| 81 | static void EmacsFrameRealize (/* Widget, XtValueMask*, XSetWindowAttributes* */); | 81 | static void EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs); |
| 82 | void EmacsFrameResize (/* Widget widget */); | 82 | void EmacsFrameResize (Widget widget); |
| 83 | static Boolean EmacsFrameSetValues (/* Widget, Widget, Widget, | 83 | static Boolean EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2); |
| 84 | ArgList, Cardinal * */); | 84 | static XtGeometryResult EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result); |
| 85 | static XtGeometryResult EmacsFrameQueryGeometry (/* Widget, XtWidgetGeometry*, | ||
| 86 | XtWidgetGeometry* */); | ||
| 87 | 85 | ||
| 88 | 86 | ||
| 89 | #undef XtOffset | 87 | #undef XtOffset |
| @@ -180,10 +178,7 @@ EmacsFrameClassRec emacsFrameClassRec = { | |||
| 180 | WidgetClass emacsFrameClass = (WidgetClass) &emacsFrameClassRec; | 178 | WidgetClass emacsFrameClass = (WidgetClass) &emacsFrameClassRec; |
| 181 | 179 | ||
| 182 | static void | 180 | static void |
| 183 | get_default_char_pixel_size (ew, pixel_width, pixel_height) | 181 | get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height) |
| 184 | EmacsFrame ew; | ||
| 185 | int* pixel_width; | ||
| 186 | int* pixel_height; | ||
| 187 | { | 182 | { |
| 188 | struct frame* f = ew->emacs_frame.frame; | 183 | struct frame* f = ew->emacs_frame.frame; |
| 189 | *pixel_width = FRAME_COLUMN_WIDTH (f); | 184 | *pixel_width = FRAME_COLUMN_WIDTH (f); |
| @@ -191,12 +186,7 @@ get_default_char_pixel_size (ew, pixel_width, pixel_height) | |||
| 191 | } | 186 | } |
| 192 | 187 | ||
| 193 | static void | 188 | static void |
| 194 | pixel_to_char_size (ew, pixel_width, pixel_height, char_width, char_height) | 189 | pixel_to_char_size (EmacsFrame ew, Dimension pixel_width, Dimension pixel_height, int *char_width, int *char_height) |
| 195 | EmacsFrame ew; | ||
| 196 | Dimension pixel_width; | ||
| 197 | Dimension pixel_height; | ||
| 198 | int* char_width; | ||
| 199 | int* char_height; | ||
| 200 | { | 190 | { |
| 201 | struct frame* f = ew->emacs_frame.frame; | 191 | struct frame* f = ew->emacs_frame.frame; |
| 202 | *char_width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, (int) pixel_width); | 192 | *char_width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, (int) pixel_width); |
| @@ -204,12 +194,7 @@ pixel_to_char_size (ew, pixel_width, pixel_height, char_width, char_height) | |||
| 204 | } | 194 | } |
| 205 | 195 | ||
| 206 | static void | 196 | static void |
| 207 | char_to_pixel_size (ew, char_width, char_height, pixel_width, pixel_height) | 197 | char_to_pixel_size (EmacsFrame ew, int char_width, int char_height, Dimension *pixel_width, Dimension *pixel_height) |
| 208 | EmacsFrame ew; | ||
| 209 | int char_width; | ||
| 210 | int char_height; | ||
| 211 | Dimension* pixel_width; | ||
| 212 | Dimension* pixel_height; | ||
| 213 | { | 198 | { |
| 214 | struct frame* f = ew->emacs_frame.frame; | 199 | struct frame* f = ew->emacs_frame.frame; |
| 215 | *pixel_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, char_width); | 200 | *pixel_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, char_width); |
| @@ -217,12 +202,7 @@ char_to_pixel_size (ew, char_width, char_height, pixel_width, pixel_height) | |||
| 217 | } | 202 | } |
| 218 | 203 | ||
| 219 | static void | 204 | static void |
| 220 | round_size_to_char (ew, in_width, in_height, out_width, out_height) | 205 | round_size_to_char (EmacsFrame ew, Dimension in_width, Dimension in_height, Dimension *out_width, Dimension *out_height) |
| 221 | EmacsFrame ew; | ||
| 222 | Dimension in_width; | ||
| 223 | Dimension in_height; | ||
| 224 | Dimension* out_width; | ||
| 225 | Dimension* out_height; | ||
| 226 | { | 206 | { |
| 227 | int char_width; | 207 | int char_width; |
| 228 | int char_height; | 208 | int char_height; |
| @@ -231,8 +211,7 @@ round_size_to_char (ew, in_width, in_height, out_width, out_height) | |||
| 231 | } | 211 | } |
| 232 | 212 | ||
| 233 | static Widget | 213 | static Widget |
| 234 | get_wm_shell (w) | 214 | get_wm_shell (Widget w) |
| 235 | Widget w; | ||
| 236 | { | 215 | { |
| 237 | Widget wmshell; | 216 | Widget wmshell; |
| 238 | 217 | ||
| @@ -269,8 +248,7 @@ static Boolean first_frame_p = True; | |||
| 269 | #endif | 248 | #endif |
| 270 | 249 | ||
| 271 | static void | 250 | static void |
| 272 | set_frame_size (ew) | 251 | set_frame_size (EmacsFrame ew) |
| 273 | EmacsFrame ew; | ||
| 274 | { | 252 | { |
| 275 | /* The widget hierarchy is | 253 | /* The widget hierarchy is |
| 276 | 254 | ||
| @@ -491,8 +469,7 @@ set_frame_size (ew) | |||
| 491 | int update_hints_inhibit; | 469 | int update_hints_inhibit; |
| 492 | 470 | ||
| 493 | static void | 471 | static void |
| 494 | update_wm_hints (ew) | 472 | update_wm_hints (EmacsFrame ew) |
| 495 | EmacsFrame ew; | ||
| 496 | { | 473 | { |
| 497 | Widget wmshell = get_wm_shell ((Widget)ew); | 474 | Widget wmshell = get_wm_shell ((Widget)ew); |
| 498 | int cw; | 475 | int cw; |
| @@ -570,8 +547,7 @@ static char setup_frame_cursor_bits[] = | |||
| 570 | }; | 547 | }; |
| 571 | 548 | ||
| 572 | static void | 549 | static void |
| 573 | setup_frame_gcs (ew) | 550 | setup_frame_gcs (EmacsFrame ew) |
| 574 | EmacsFrame ew; | ||
| 575 | { | 551 | { |
| 576 | XGCValues gc_values; | 552 | XGCValues gc_values; |
| 577 | struct frame* s = ew->emacs_frame.frame; | 553 | struct frame* s = ew->emacs_frame.frame; |
| @@ -649,8 +625,7 @@ setup_frame_gcs (ew) | |||
| 649 | } | 625 | } |
| 650 | 626 | ||
| 651 | static void | 627 | static void |
| 652 | update_various_frame_slots (ew) | 628 | update_various_frame_slots (EmacsFrame ew) |
| 653 | EmacsFrame ew; | ||
| 654 | { | 629 | { |
| 655 | struct frame *f = ew->emacs_frame.frame; | 630 | struct frame *f = ew->emacs_frame.frame; |
| 656 | struct x_output *x = f->output_data.x; | 631 | struct x_output *x = f->output_data.x; |
| @@ -661,8 +636,7 @@ update_various_frame_slots (ew) | |||
| 661 | } | 636 | } |
| 662 | 637 | ||
| 663 | static void | 638 | static void |
| 664 | update_from_various_frame_slots (ew) | 639 | update_from_various_frame_slots (EmacsFrame ew) |
| 665 | EmacsFrame ew; | ||
| 666 | { | 640 | { |
| 667 | struct frame *f = ew->emacs_frame.frame; | 641 | struct frame *f = ew->emacs_frame.frame; |
| 668 | struct x_output *x = f->output_data.x; | 642 | struct x_output *x = f->output_data.x; |
| @@ -677,11 +651,7 @@ update_from_various_frame_slots (ew) | |||
| 677 | } | 651 | } |
| 678 | 652 | ||
| 679 | static void | 653 | static void |
| 680 | EmacsFrameInitialize (request, new, dum1, dum2) | 654 | EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2) |
| 681 | Widget request; | ||
| 682 | Widget new; | ||
| 683 | ArgList dum1; | ||
| 684 | Cardinal *dum2; | ||
| 685 | { | 655 | { |
| 686 | EmacsFrame ew = (EmacsFrame)new; | 656 | EmacsFrame ew = (EmacsFrame)new; |
| 687 | 657 | ||
| @@ -698,10 +668,7 @@ EmacsFrameInitialize (request, new, dum1, dum2) | |||
| 698 | 668 | ||
| 699 | 669 | ||
| 700 | static void | 670 | static void |
| 701 | EmacsFrameRealize (widget, mask, attrs) | 671 | EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs) |
| 702 | Widget widget; | ||
| 703 | XtValueMask *mask; | ||
| 704 | XSetWindowAttributes *attrs; | ||
| 705 | { | 672 | { |
| 706 | EmacsFrame ew = (EmacsFrame)widget; | 673 | EmacsFrame ew = (EmacsFrame)widget; |
| 707 | 674 | ||
| @@ -717,11 +684,10 @@ EmacsFrameRealize (widget, mask, attrs) | |||
| 717 | update_wm_hints (ew); | 684 | update_wm_hints (ew); |
| 718 | } | 685 | } |
| 719 | 686 | ||
| 720 | extern void free_frame_faces (/* struct frame * */); | 687 | extern void free_frame_faces (struct frame *); |
| 721 | 688 | ||
| 722 | static void | 689 | static void |
| 723 | EmacsFrameDestroy (widget) | 690 | EmacsFrameDestroy (Widget widget) |
| 724 | Widget widget; | ||
| 725 | { | 691 | { |
| 726 | EmacsFrame ew = (EmacsFrame) widget; | 692 | EmacsFrame ew = (EmacsFrame) widget; |
| 727 | struct frame* s = ew->emacs_frame.frame; | 693 | struct frame* s = ew->emacs_frame.frame; |
| @@ -739,8 +705,7 @@ EmacsFrameDestroy (widget) | |||
| 739 | } | 705 | } |
| 740 | 706 | ||
| 741 | void | 707 | void |
| 742 | EmacsFrameResize (widget) | 708 | EmacsFrameResize (Widget widget) |
| 743 | Widget widget; | ||
| 744 | { | 709 | { |
| 745 | EmacsFrame ew = (EmacsFrame)widget; | 710 | EmacsFrame ew = (EmacsFrame)widget; |
| 746 | struct frame *f = ew->emacs_frame.frame; | 711 | struct frame *f = ew->emacs_frame.frame; |
| @@ -756,12 +721,7 @@ EmacsFrameResize (widget) | |||
| 756 | } | 721 | } |
| 757 | 722 | ||
| 758 | static Boolean | 723 | static Boolean |
| 759 | EmacsFrameSetValues (cur_widget, req_widget, new_widget, dum1, dum2) | 724 | EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2) |
| 760 | Widget cur_widget; | ||
| 761 | Widget req_widget; | ||
| 762 | Widget new_widget; | ||
| 763 | ArgList dum1; | ||
| 764 | Cardinal *dum2; | ||
| 765 | { | 725 | { |
| 766 | EmacsFrame cur = (EmacsFrame)cur_widget; | 726 | EmacsFrame cur = (EmacsFrame)cur_widget; |
| 767 | EmacsFrame new = (EmacsFrame)new_widget; | 727 | EmacsFrame new = (EmacsFrame)new_widget; |
| @@ -834,10 +794,7 @@ EmacsFrameSetValues (cur_widget, req_widget, new_widget, dum1, dum2) | |||
| 834 | } | 794 | } |
| 835 | 795 | ||
| 836 | static XtGeometryResult | 796 | static XtGeometryResult |
| 837 | EmacsFrameQueryGeometry (widget, request, result) | 797 | EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result) |
| 838 | Widget widget; | ||
| 839 | XtWidgetGeometry* request; | ||
| 840 | XtWidgetGeometry* result; | ||
| 841 | { | 798 | { |
| 842 | EmacsFrame ew = (EmacsFrame)widget; | 799 | EmacsFrame ew = (EmacsFrame)widget; |
| 843 | 800 | ||
| @@ -867,10 +824,7 @@ EmacsFrameQueryGeometry (widget, request, result) | |||
| 867 | 824 | ||
| 868 | /* Special entrypoints */ | 825 | /* Special entrypoints */ |
| 869 | void | 826 | void |
| 870 | EmacsFrameSetCharSize (widget, columns, rows) | 827 | EmacsFrameSetCharSize (Widget widget, int columns, int rows) |
| 871 | Widget widget; | ||
| 872 | int columns; | ||
| 873 | int rows; | ||
| 874 | { | 828 | { |
| 875 | EmacsFrame ew = (EmacsFrame) widget; | 829 | EmacsFrame ew = (EmacsFrame) widget; |
| 876 | struct frame *f = ew->emacs_frame.frame; | 830 | struct frame *f = ew->emacs_frame.frame; |
| @@ -880,8 +834,7 @@ EmacsFrameSetCharSize (widget, columns, rows) | |||
| 880 | 834 | ||
| 881 | 835 | ||
| 882 | void | 836 | void |
| 883 | widget_store_internal_border (widget) | 837 | widget_store_internal_border (Widget widget) |
| 884 | Widget widget; | ||
| 885 | { | 838 | { |
| 886 | EmacsFrame ew = (EmacsFrame) widget; | 839 | EmacsFrame ew = (EmacsFrame) widget; |
| 887 | FRAME_PTR f = ew->emacs_frame.frame; | 840 | FRAME_PTR f = ew->emacs_frame.frame; |
diff --git a/src/xfaces.c b/src/xfaces.c index 19be9971d07..ea0f57469e1 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -3599,8 +3599,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource", | |||
| 3599 | /* Make menus on frame F appear as specified by the `menu' face. */ | 3599 | /* Make menus on frame F appear as specified by the `menu' face. */ |
| 3600 | 3600 | ||
| 3601 | static void | 3601 | static void |
| 3602 | x_update_menu_appearance (f) | 3602 | x_update_menu_appearance (struct frame *f) |
| 3603 | struct frame *f; | ||
| 3604 | { | 3603 | { |
| 3605 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 3604 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 3606 | XrmDatabase rdb; | 3605 | XrmDatabase rdb; |
diff --git a/src/xfns.c b/src/xfns.c index 87170af9498..e4a073072f0 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1816,9 +1816,7 @@ x_default_scroll_bar_color_parameter (struct frame *f, | |||
| 1816 | for example, but Xt doesn't). */ | 1816 | for example, but Xt doesn't). */ |
| 1817 | 1817 | ||
| 1818 | static void | 1818 | static void |
| 1819 | hack_wm_protocols (f, widget) | 1819 | hack_wm_protocols (FRAME_PTR f, Widget widget) |
| 1820 | FRAME_PTR f; | ||
| 1821 | Widget widget; | ||
| 1822 | { | 1820 | { |
| 1823 | Display *dpy = XtDisplay (widget); | 1821 | Display *dpy = XtDisplay (widget); |
| 1824 | Window w = XtWindow (widget); | 1822 | Window w = XtWindow (widget); |
| @@ -2392,10 +2390,7 @@ xic_set_xfontset (struct frame *f, char *base_fontname) | |||
| 2392 | /* Create and set up the X widget for frame F. */ | 2390 | /* Create and set up the X widget for frame F. */ |
| 2393 | 2391 | ||
| 2394 | static void | 2392 | static void |
| 2395 | x_window (f, window_prompting, minibuffer_only) | 2393 | x_window (struct frame *f, long window_prompting, int minibuffer_only) |
| 2396 | struct frame *f; | ||
| 2397 | long window_prompting; | ||
| 2398 | int minibuffer_only; | ||
| 2399 | { | 2394 | { |
| 2400 | XClassHint class_hints; | 2395 | XClassHint class_hints; |
| 2401 | XSetWindowAttributes attributes; | 2396 | XSetWindowAttributes attributes; |
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 | ||
diff --git a/src/xterm.c b/src/xterm.c index c00d0330c23..c78408382bd 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1367,8 +1367,7 @@ static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer, | |||
| 1367 | cannot be determined. */ | 1367 | cannot be determined. */ |
| 1368 | 1368 | ||
| 1369 | static struct frame * | 1369 | static struct frame * |
| 1370 | x_frame_of_widget (widget) | 1370 | x_frame_of_widget (Widget widget) |
| 1371 | Widget widget; | ||
| 1372 | { | 1371 | { |
| 1373 | struct x_display_info *dpyinfo; | 1372 | struct x_display_info *dpyinfo; |
| 1374 | Lisp_Object tail; | 1373 | Lisp_Object tail; |
| @@ -1404,10 +1403,7 @@ x_frame_of_widget (widget) | |||
| 1404 | if successful. This is called from lwlib. */ | 1403 | if successful. This is called from lwlib. */ |
| 1405 | 1404 | ||
| 1406 | int | 1405 | int |
| 1407 | x_alloc_nearest_color_for_widget (widget, cmap, color) | 1406 | x_alloc_nearest_color_for_widget (Widget widget, Colormap cmap, XColor *color) |
| 1408 | Widget widget; | ||
| 1409 | Colormap cmap; | ||
| 1410 | XColor *color; | ||
| 1411 | { | 1407 | { |
| 1412 | struct frame *f = x_frame_of_widget (widget); | 1408 | struct frame *f = x_frame_of_widget (widget); |
| 1413 | return x_alloc_nearest_color (f, cmap, color); | 1409 | return x_alloc_nearest_color (f, cmap, color); |
| @@ -1422,13 +1418,8 @@ x_alloc_nearest_color_for_widget (widget, cmap, color) | |||
| 1422 | Value is non-zero if successful. */ | 1418 | Value is non-zero if successful. */ |
| 1423 | 1419 | ||
| 1424 | int | 1420 | int |
| 1425 | x_alloc_lighter_color_for_widget (widget, display, cmap, pixel, factor, delta) | 1421 | x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap, |
| 1426 | Widget widget; | 1422 | unsigned long *pixel, double factor, int delta) |
| 1427 | Display *display; | ||
| 1428 | Colormap cmap; | ||
| 1429 | unsigned long *pixel; | ||
| 1430 | double factor; | ||
| 1431 | int delta; | ||
| 1432 | { | 1423 | { |
| 1433 | struct frame *f = x_frame_of_widget (widget); | 1424 | struct frame *f = x_frame_of_widget (widget); |
| 1434 | return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta); | 1425 | return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta); |
| @@ -1471,12 +1462,9 @@ static Pixel cvt_string_to_pixel_value; | |||
| 1471 | Value is True if successful, False otherwise. */ | 1462 | Value is True if successful, False otherwise. */ |
| 1472 | 1463 | ||
| 1473 | static Boolean | 1464 | static Boolean |
| 1474 | cvt_string_to_pixel (dpy, args, nargs, from, to, closure_ret) | 1465 | cvt_string_to_pixel (Display *dpy, XrmValue *args, Cardinal *nargs, |
| 1475 | Display *dpy; | 1466 | XrmValue *from, XrmValue *to, |
| 1476 | XrmValue *args; | 1467 | XtPointer *closure_ret) |
| 1477 | Cardinal *nargs; | ||
| 1478 | XrmValue *from, *to; | ||
| 1479 | XtPointer *closure_ret; | ||
| 1480 | { | 1468 | { |
| 1481 | Screen *screen; | 1469 | Screen *screen; |
| 1482 | Colormap cmap; | 1470 | Colormap cmap; |
| @@ -1560,12 +1548,8 @@ cvt_string_to_pixel (dpy, args, nargs, from, to, closure_ret) | |||
| 1560 | ARGS and NARGS are like for cvt_string_to_pixel. */ | 1548 | ARGS and NARGS are like for cvt_string_to_pixel. */ |
| 1561 | 1549 | ||
| 1562 | static void | 1550 | static void |
| 1563 | cvt_pixel_dtor (app, to, closure, args, nargs) | 1551 | cvt_pixel_dtor (XtAppContext app, XrmValuePtr to, XtPointer closure, XrmValuePtr args, |
| 1564 | XtAppContext app; | 1552 | Cardinal *nargs) |
| 1565 | XrmValuePtr to; | ||
| 1566 | XtPointer closure; | ||
| 1567 | XrmValuePtr args; | ||
| 1568 | Cardinal *nargs; | ||
| 1569 | { | 1553 | { |
| 1570 | if (*nargs != 2) | 1554 | if (*nargs != 2) |
| 1571 | { | 1555 | { |
| @@ -3953,8 +3937,7 @@ x_window_to_scroll_bar (Display *display, Window window_id) | |||
| 3953 | if WINDOW is not part of a menu bar. */ | 3937 | if WINDOW is not part of a menu bar. */ |
| 3954 | 3938 | ||
| 3955 | static Widget | 3939 | static Widget |
| 3956 | x_window_to_menu_bar (window) | 3940 | x_window_to_menu_bar (Window window) |
| 3957 | Window window; | ||
| 3958 | { | 3941 | { |
| 3959 | Lisp_Object tail; | 3942 | Lisp_Object tail; |
| 3960 | 3943 | ||
| @@ -4021,14 +4004,8 @@ static Boolean xaw3d_pick_top; | |||
| 4021 | a `end-scroll' SCROLL_BAR_CLICK_EVENT' event if so. */ | 4004 | a `end-scroll' SCROLL_BAR_CLICK_EVENT' event if so. */ |
| 4022 | 4005 | ||
| 4023 | static void | 4006 | static void |
| 4024 | xt_action_hook (widget, client_data, action_name, event, params, | 4007 | xt_action_hook (Widget widget, XtPointer client_data, String action_name, |
| 4025 | num_params) | 4008 | XEvent *event, String *params, Cardinal *num_params) |
| 4026 | Widget widget; | ||
| 4027 | XtPointer client_data; | ||
| 4028 | String action_name; | ||
| 4029 | XEvent *event; | ||
| 4030 | String *params; | ||
| 4031 | Cardinal *num_params; | ||
| 4032 | { | 4009 | { |
| 4033 | int scroll_bar_p; | 4010 | int scroll_bar_p; |
| 4034 | char *end_action; | 4011 | char *end_action; |
| @@ -4341,9 +4318,7 @@ xg_end_scroll_callback (GtkWidget *widget, | |||
| 4341 | the thumb is. */ | 4318 | the thumb is. */ |
| 4342 | 4319 | ||
| 4343 | static void | 4320 | static void |
| 4344 | xaw_jump_callback (widget, client_data, call_data) | 4321 | xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data) |
| 4345 | Widget widget; | ||
| 4346 | XtPointer client_data, call_data; | ||
| 4347 | { | 4322 | { |
| 4348 | struct scroll_bar *bar = (struct scroll_bar *) client_data; | 4323 | struct scroll_bar *bar = (struct scroll_bar *) client_data; |
| 4349 | float top = *(float *) call_data; | 4324 | float top = *(float *) call_data; |
| @@ -4385,9 +4360,7 @@ xaw_jump_callback (widget, client_data, call_data) | |||
| 4385 | Values < height of scroll bar mean line-wise movement. */ | 4360 | Values < height of scroll bar mean line-wise movement. */ |
| 4386 | 4361 | ||
| 4387 | static void | 4362 | static void |
| 4388 | xaw_scroll_callback (widget, client_data, call_data) | 4363 | xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) |
| 4389 | Widget widget; | ||
| 4390 | XtPointer client_data, call_data; | ||
| 4391 | { | 4364 | { |
| 4392 | struct scroll_bar *bar = (struct scroll_bar *) client_data; | 4365 | struct scroll_bar *bar = (struct scroll_bar *) client_data; |
| 4393 | /* The position really is stored cast to a pointer. */ | 4366 | /* The position really is stored cast to a pointer. */ |
| @@ -4439,9 +4412,7 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar) | |||
| 4439 | #else /* not USE_GTK */ | 4412 | #else /* not USE_GTK */ |
| 4440 | 4413 | ||
| 4441 | static void | 4414 | static void |
| 4442 | x_create_toolkit_scroll_bar (f, bar) | 4415 | x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar) |
| 4443 | struct frame *f; | ||
| 4444 | struct scroll_bar *bar; | ||
| 4445 | { | 4416 | { |
| 4446 | Window xwindow; | 4417 | Window xwindow; |
| 4447 | Widget widget; | 4418 | Widget widget; |
| @@ -4648,9 +4619,8 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio | |||
| 4648 | 4619 | ||
| 4649 | #else /* not USE_GTK */ | 4620 | #else /* not USE_GTK */ |
| 4650 | static void | 4621 | static void |
| 4651 | x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | 4622 | x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position, |
| 4652 | struct scroll_bar *bar; | 4623 | int whole) |
| 4653 | int portion, position, whole; | ||
| 4654 | { | 4624 | { |
| 4655 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); | 4625 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); |
| 4656 | Widget widget = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar); | 4626 | Widget widget = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar); |
| @@ -9436,10 +9406,7 @@ x_destroy_window (struct frame *f) | |||
| 9436 | 9406 | ||
| 9437 | #ifndef USE_GTK | 9407 | #ifndef USE_GTK |
| 9438 | void | 9408 | void |
| 9439 | x_wm_set_size_hint (f, flags, user_position) | 9409 | x_wm_set_size_hint (struct frame *f, long flags, int user_position) |
| 9440 | struct frame *f; | ||
| 9441 | long flags; | ||
| 9442 | int user_position; | ||
| 9443 | { | 9410 | { |
| 9444 | XSizeHints size_hints; | 9411 | XSizeHints size_hints; |
| 9445 | Window window = FRAME_OUTER_WINDOW (f); | 9412 | Window window = FRAME_OUTER_WINDOW (f); |
| @@ -10402,7 +10369,7 @@ x_process_timeouts (timer) | |||
| 10402 | processed, these widgets don't behave normally. */ | 10369 | processed, these widgets don't behave normally. */ |
| 10403 | 10370 | ||
| 10404 | void | 10371 | void |
| 10405 | x_activate_timeout_atimer () | 10372 | x_activate_timeout_atimer (void) |
| 10406 | { | 10373 | { |
| 10407 | BLOCK_INPUT; | 10374 | BLOCK_INPUT; |
| 10408 | if (!x_timeout_atimer_activated_flag) | 10375 | if (!x_timeout_atimer_activated_flag) |