diff options
| author | Paul Eggert | 2011-04-13 15:19:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-13 15:19:27 -0700 |
| commit | b532497da492ad9fef912bdf41d7f57c6f5bd833 (patch) | |
| tree | 83d73904d0c7815b9d6e4de5c973a66d08652815 /src | |
| parent | 1675728f009404df6bc79b7e0933bc675afa1be1 (diff) | |
| download | emacs-b532497da492ad9fef912bdf41d7f57c6f5bd833.tar.gz emacs-b532497da492ad9fef912bdf41d7f57c6f5bd833.zip | |
* xterm.c: Make symbols static if they're not exported.
(x_raise_frame, x_lower_frame, x_wm_set_window_state):
(x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
(x_destroy_window, x_delete_display):
Now static.
(x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
(x_mouse_leave): Remove; unused.
* xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
(x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
(x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
Remove decls.
(x_mouse_leave): Declare only if WINDOWSNT.
(x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
(xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
USE_X_TOOLKIT.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 18 | ||||
| -rw-r--r-- | src/xterm.c | 31 | ||||
| -rw-r--r-- | src/xterm.h | 16 |
3 files changed, 41 insertions, 24 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1498d267775..94712577e87 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2011-04-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * xterm.c: Make symbols static if they're not exported. | ||
| 4 | (x_raise_frame, x_lower_frame, x_wm_set_window_state): | ||
| 5 | (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error): | ||
| 6 | (x_destroy_window, x_delete_display): | ||
| 7 | Now static. | ||
| 8 | (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT). | ||
| 9 | (x_mouse_leave): Remove; unused. | ||
| 10 | * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame): | ||
| 11 | (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap): | ||
| 12 | (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes): | ||
| 13 | Remove decls. | ||
| 14 | (x_mouse_leave): Declare only if WINDOWSNT. | ||
| 15 | (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT. | ||
| 16 | (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS && | ||
| 17 | USE_X_TOOLKIT. | ||
| 18 | |||
| 1 | 2011-04-12 Paul Eggert <eggert@cs.ucla.edu> | 19 | 2011-04-12 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 20 | ||
| 3 | * ftxfont.c: Make symbols static if they're not exported. | 21 | * ftxfont.c: Make symbols static if they're not exported. |
diff --git a/src/xterm.c b/src/xterm.c index b3e33b7c0bb..bc847388756 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -306,6 +306,8 @@ enum xembed_message | |||
| 306 | 306 | ||
| 307 | static int x_alloc_nearest_color_1 (Display *, Colormap, XColor *); | 307 | static int x_alloc_nearest_color_1 (Display *, Colormap, XColor *); |
| 308 | static void x_set_window_size_1 (struct frame *, int, int, int); | 308 | static void x_set_window_size_1 (struct frame *, int, int, int); |
| 309 | static void x_raise_frame (struct frame *); | ||
| 310 | static void x_lower_frame (struct frame *); | ||
| 309 | static const XColor *x_color_cells (Display *, int *); | 311 | static const XColor *x_color_cells (Display *, int *); |
| 310 | static void x_update_window_end (struct window *, int, int); | 312 | static void x_update_window_end (struct window *, int, int); |
| 311 | 313 | ||
| @@ -347,9 +349,15 @@ static void x_check_expected_move (struct frame *, int, int); | |||
| 347 | static void x_sync_with_move (struct frame *, int, int, int); | 349 | static void x_sync_with_move (struct frame *, int, int, int); |
| 348 | static int handle_one_xevent (struct x_display_info *, XEvent *, | 350 | static int handle_one_xevent (struct x_display_info *, XEvent *, |
| 349 | int *, struct input_event *); | 351 | int *, struct input_event *); |
| 352 | #if ! (defined USE_MOTIF || defined USE_X_TOOLKIT) | ||
| 353 | static int x_dispatch_event (XEvent *, Display *); | ||
| 354 | #endif | ||
| 350 | /* Don't declare this NO_RETURN because we want no | 355 | /* Don't declare this NO_RETURN because we want no |
| 351 | interference with debugging failing X calls. */ | 356 | interference with debugging failing X calls. */ |
| 352 | static void x_connection_closed (Display *, const char *); | 357 | static void x_connection_closed (Display *, const char *); |
| 358 | static void x_wm_set_window_state (struct frame *, int); | ||
| 359 | static void x_wm_set_icon_pixmap (struct frame *, int); | ||
| 360 | static void x_initialize (void); | ||
| 353 | 361 | ||
| 354 | 362 | ||
| 355 | /* Flush display of frame F, or of all frames if F is null. */ | 363 | /* Flush display of frame F, or of all frames if F is null. */ |
| @@ -3451,14 +3459,6 @@ x_detect_focus_change (struct x_display_info *dpyinfo, XEvent *event, struct inp | |||
| 3451 | } | 3459 | } |
| 3452 | 3460 | ||
| 3453 | 3461 | ||
| 3454 | /* Handle an event saying the mouse has moved out of an Emacs frame. */ | ||
| 3455 | |||
| 3456 | void | ||
| 3457 | x_mouse_leave (struct x_display_info *dpyinfo) | ||
| 3458 | { | ||
| 3459 | x_new_focus_frame (dpyinfo, dpyinfo->x_focus_event_frame); | ||
| 3460 | } | ||
| 3461 | |||
| 3462 | /* The focus has changed, or we have redirected a frame's focus to | 3462 | /* The focus has changed, or we have redirected a frame's focus to |
| 3463 | another frame (this happens when a frame uses a surrogate | 3463 | another frame (this happens when a frame uses a surrogate |
| 3464 | mini-buffer frame). Shift the highlight as appropriate. | 3464 | mini-buffer frame). Shift the highlight as appropriate. |
| @@ -5659,7 +5659,7 @@ static short temp_buffer[100]; | |||
| 5659 | /* Set this to nonzero to fake an "X I/O error" | 5659 | /* Set this to nonzero to fake an "X I/O error" |
| 5660 | on a particular display. */ | 5660 | on a particular display. */ |
| 5661 | 5661 | ||
| 5662 | struct x_display_info *XTread_socket_fake_io_error; | 5662 | static struct x_display_info *XTread_socket_fake_io_error; |
| 5663 | 5663 | ||
| 5664 | /* When we find no input here, we occasionally do a no-op command | 5664 | /* When we find no input here, we occasionally do a no-op command |
| 5665 | to verify that the X server is still running and we can still talk with it. | 5665 | to verify that the X server is still running and we can still talk with it. |
| @@ -6984,6 +6984,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6984 | i.e. looping while a popup menu or a dialog is posted. | 6984 | i.e. looping while a popup menu or a dialog is posted. |
| 6985 | 6985 | ||
| 6986 | Returns the value handle_one_xevent sets in the finish argument. */ | 6986 | Returns the value handle_one_xevent sets in the finish argument. */ |
| 6987 | #if ! (defined USE_MOTIF || defined USE_X_TOOLKIT) | ||
| 6988 | static | ||
| 6989 | #endif | ||
| 6987 | int | 6990 | int |
| 6988 | x_dispatch_event (XEvent *event, Display *display) | 6991 | x_dispatch_event (XEvent *event, Display *display) |
| 6989 | { | 6992 | { |
| @@ -8870,7 +8873,7 @@ x_raise_frame (struct frame *f) | |||
| 8870 | 8873 | ||
| 8871 | /* Lower frame F. */ | 8874 | /* Lower frame F. */ |
| 8872 | 8875 | ||
| 8873 | void | 8876 | static void |
| 8874 | x_lower_frame (struct frame *f) | 8877 | x_lower_frame (struct frame *f) |
| 8875 | { | 8878 | { |
| 8876 | if (f->async_visible) | 8879 | if (f->async_visible) |
| @@ -9432,7 +9435,7 @@ x_free_frame_resources (struct frame *f) | |||
| 9432 | 9435 | ||
| 9433 | /* Destroy the X window of frame F. */ | 9436 | /* Destroy the X window of frame F. */ |
| 9434 | 9437 | ||
| 9435 | void | 9438 | static void |
| 9436 | x_destroy_window (struct frame *f) | 9439 | x_destroy_window (struct frame *f) |
| 9437 | { | 9440 | { |
| 9438 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 9441 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| @@ -9556,7 +9559,7 @@ x_wm_set_size_hint (struct frame *f, long flags, int user_position) | |||
| 9556 | 9559 | ||
| 9557 | /* Used for IconicState or NormalState */ | 9560 | /* Used for IconicState or NormalState */ |
| 9558 | 9561 | ||
| 9559 | void | 9562 | static void |
| 9560 | x_wm_set_window_state (struct frame *f, int state) | 9563 | x_wm_set_window_state (struct frame *f, int state) |
| 9561 | { | 9564 | { |
| 9562 | #ifdef USE_X_TOOLKIT | 9565 | #ifdef USE_X_TOOLKIT |
| @@ -9574,7 +9577,7 @@ x_wm_set_window_state (struct frame *f, int state) | |||
| 9574 | #endif /* not USE_X_TOOLKIT */ | 9577 | #endif /* not USE_X_TOOLKIT */ |
| 9575 | } | 9578 | } |
| 9576 | 9579 | ||
| 9577 | void | 9580 | static void |
| 9578 | x_wm_set_icon_pixmap (struct frame *f, int pixmap_id) | 9581 | x_wm_set_icon_pixmap (struct frame *f, int pixmap_id) |
| 9579 | { | 9582 | { |
| 9580 | Pixmap icon_pixmap, icon_mask; | 9583 | Pixmap icon_pixmap, icon_mask; |
| @@ -10338,7 +10341,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 10338 | /* Get rid of display DPYINFO, deleting all frames on it, | 10341 | /* Get rid of display DPYINFO, deleting all frames on it, |
| 10339 | and without sending any more commands to the X server. */ | 10342 | and without sending any more commands to the X server. */ |
| 10340 | 10343 | ||
| 10341 | void | 10344 | static void |
| 10342 | x_delete_display (struct x_display_info *dpyinfo) | 10345 | x_delete_display (struct x_display_info *dpyinfo) |
| 10343 | { | 10346 | { |
| 10344 | struct terminal *t; | 10347 | struct terminal *t; |
diff --git a/src/xterm.h b/src/xterm.h index f44c71fab59..5c17e24bf23 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -388,7 +388,6 @@ extern struct x_display_info *x_display_list; | |||
| 388 | extern Lisp_Object x_display_name_list; | 388 | extern Lisp_Object x_display_name_list; |
| 389 | 389 | ||
| 390 | extern struct x_display_info *x_display_info_for_display (Display *); | 390 | extern struct x_display_info *x_display_info_for_display (Display *); |
| 391 | extern struct x_display_info *x_display_info_for_name (Lisp_Object); | ||
| 392 | extern void x_set_frame_alpha (struct frame *); | 391 | extern void x_set_frame_alpha (struct frame *); |
| 393 | 392 | ||
| 394 | extern struct x_display_info *x_term_init (Lisp_Object, char *, char *); | 393 | extern struct x_display_info *x_term_init (Lisp_Object, char *, char *); |
| @@ -965,19 +964,12 @@ extern void x_set_window_size (struct frame *, int, int, int); | |||
| 965 | extern void x_set_mouse_position (struct frame *, int, int); | 964 | extern void x_set_mouse_position (struct frame *, int, int); |
| 966 | extern void x_set_mouse_pixel_position (struct frame *, int, int); | 965 | extern void x_set_mouse_pixel_position (struct frame *, int, int); |
| 967 | extern void x_ewmh_activate_frame (struct frame *); | 966 | extern void x_ewmh_activate_frame (struct frame *); |
| 968 | extern void x_raise_frame (struct frame *); | ||
| 969 | extern void x_lower_frame (struct frame *); | ||
| 970 | extern void x_make_frame_visible (struct frame *); | 967 | extern void x_make_frame_visible (struct frame *); |
| 971 | extern void x_make_frame_invisible (struct frame *); | 968 | extern void x_make_frame_invisible (struct frame *); |
| 972 | extern void x_iconify_frame (struct frame *); | 969 | extern void x_iconify_frame (struct frame *); |
| 973 | extern void x_free_frame_resources (struct frame *); | 970 | extern void x_free_frame_resources (struct frame *); |
| 974 | extern void x_destroy_window (struct frame *); | ||
| 975 | extern void x_wm_set_size_hint (struct frame *, long, int); | 971 | extern void x_wm_set_size_hint (struct frame *, long, int); |
| 976 | extern void x_wm_set_window_state (struct frame *, int); | ||
| 977 | extern void x_wm_set_icon_pixmap (struct frame *, int); | ||
| 978 | extern void x_delete_display (struct x_display_info *); | ||
| 979 | extern void x_delete_terminal (struct terminal *terminal); | 972 | extern void x_delete_terminal (struct terminal *terminal); |
| 980 | extern void x_initialize (void); | ||
| 981 | extern unsigned long x_copy_color (struct frame *, unsigned long); | 973 | extern unsigned long x_copy_color (struct frame *, unsigned long); |
| 982 | #ifdef USE_X_TOOLKIT | 974 | #ifdef USE_X_TOOLKIT |
| 983 | extern XtAppContext Xt_app_con; | 975 | extern XtAppContext Xt_app_con; |
| @@ -990,9 +982,13 @@ extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *); | |||
| 990 | extern void x_query_colors (struct frame *f, XColor *, int); | 982 | extern void x_query_colors (struct frame *f, XColor *, int); |
| 991 | extern void x_query_color (struct frame *f, XColor *); | 983 | extern void x_query_color (struct frame *f, XColor *); |
| 992 | extern void x_clear_area (Display *, Window, int, int, int, int, int); | 984 | extern void x_clear_area (Display *, Window, int, int, int, int, int); |
| 985 | #ifdef WINDOWSNT | ||
| 993 | extern void x_mouse_leave (struct x_display_info *); | 986 | extern void x_mouse_leave (struct x_display_info *); |
| 987 | #endif | ||
| 994 | 988 | ||
| 989 | #if defined USE_MOTIF || defined USE_X_TOOLKIT | ||
| 995 | extern int x_dispatch_event (XEvent *, Display *); | 990 | extern int x_dispatch_event (XEvent *, Display *); |
| 991 | #endif | ||
| 996 | extern unsigned int x_x_to_emacs_modifiers (struct x_display_info *, | 992 | extern unsigned int x_x_to_emacs_modifiers (struct x_display_info *, |
| 997 | unsigned); | 993 | unsigned); |
| 998 | extern int x_display_pixel_height (struct x_display_info *); | 994 | extern int x_display_pixel_height (struct x_display_info *); |
| @@ -1041,7 +1037,6 @@ extern int xg_set_icon_from_xpm_data (struct frame *, const char**); | |||
| 1041 | #endif /* USE_GTK */ | 1037 | #endif /* USE_GTK */ |
| 1042 | 1038 | ||
| 1043 | extern void x_real_positions (struct frame *, int *, int *); | 1039 | extern void x_real_positions (struct frame *, int *, int *); |
| 1044 | extern void x_set_border_pixel (struct frame *, int); | ||
| 1045 | extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | 1040 | extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); |
| 1046 | extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); | 1041 | extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); |
| 1047 | extern void xic_free_xfontset (struct frame *); | 1042 | extern void xic_free_xfontset (struct frame *); |
| @@ -1054,12 +1049,13 @@ extern int x_pixel_width (struct frame *); | |||
| 1054 | extern int x_pixel_height (struct frame *); | 1049 | extern int x_pixel_height (struct frame *); |
| 1055 | extern int x_char_width (struct frame *); | 1050 | extern int x_char_width (struct frame *); |
| 1056 | extern int x_char_height (struct frame *); | 1051 | extern int x_char_height (struct frame *); |
| 1057 | extern int x_screen_planes (struct frame *); | ||
| 1058 | extern void x_sync (struct frame *); | 1052 | extern void x_sync (struct frame *); |
| 1059 | extern int x_defined_color (struct frame *, const char *, XColor *, int); | 1053 | extern int x_defined_color (struct frame *, const char *, XColor *, int); |
| 1060 | #ifdef HAVE_X_I18N | 1054 | #ifdef HAVE_X_I18N |
| 1061 | extern void free_frame_xic (struct frame *); | 1055 | extern void free_frame_xic (struct frame *); |
| 1056 | # if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT | ||
| 1062 | extern char * xic_create_fontsetname (const char *base_fontname, int motif); | 1057 | extern char * xic_create_fontsetname (const char *base_fontname, int motif); |
| 1058 | # endif | ||
| 1063 | #endif | 1059 | #endif |
| 1064 | extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | 1060 | extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); |
| 1065 | 1061 | ||