diff options
| author | Daniel Colascione | 2012-08-31 22:38:52 -0800 |
|---|---|---|
| committer | Daniel Colascione | 2012-08-31 22:38:52 -0800 |
| commit | 17a2cbbd76385d0be8a4b28974e64f4debf459c1 (patch) | |
| tree | c9d9f61e8580269679c9583ee94ccd812cca5790 /src/xterm.h | |
| parent | c650a5dec69902c684c5333befd35da6c518c5e0 (diff) | |
| download | emacs-17a2cbbd76385d0be8a4b28974e64f4debf459c1.tar.gz emacs-17a2cbbd76385d0be8a4b28974e64f4debf459c1.zip | |
Refactor window-system configuration
This change streamlines the window system selection code in
configure.in and moves many common function declarations from
window-specific headers to frame.h. It introduces a new TERM_HEADER
macro in config.h: we set this macro to the right header to use for
the window system for which we're compiling Emacs and have source
files include it indirectly. This way, we don't have to teach every
file about every window system.
Diffstat (limited to 'src/xterm.h')
| -rw-r--r-- | src/xterm.h | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/xterm.h b/src/xterm.h index 007c92b929c..2d718f49118 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -16,6 +16,9 @@ GNU General Public License for more details. | |||
| 16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #ifndef XTERM_H | ||
| 20 | #define XTERM_H | ||
| 21 | |||
| 19 | #include <X11/Xlib.h> | 22 | #include <X11/Xlib.h> |
| 20 | #include <X11/cursorfont.h> | 23 | #include <X11/cursorfont.h> |
| 21 | 24 | ||
| @@ -367,13 +370,14 @@ extern int use_xim; | |||
| 367 | extern void check_x (void); | 370 | extern void check_x (void); |
| 368 | 371 | ||
| 369 | extern struct frame *x_window_to_frame (struct x_display_info *, int); | 372 | extern struct frame *x_window_to_frame (struct x_display_info *, int); |
| 370 | |||
| 371 | extern struct frame *x_any_window_to_frame (struct x_display_info *, int); | 373 | extern struct frame *x_any_window_to_frame (struct x_display_info *, int); |
| 372 | extern struct frame *x_menubar_window_to_frame (struct x_display_info *, | 374 | extern struct frame *x_menubar_window_to_frame (struct x_display_info *, |
| 373 | XEvent *); | 375 | XEvent *); |
| 374 | |||
| 375 | extern struct frame *x_top_window_to_frame (struct x_display_info *, int); | 376 | extern struct frame *x_top_window_to_frame (struct x_display_info *, int); |
| 376 | 377 | ||
| 378 | extern struct frame *x_menubar_window_to_frame (struct x_display_info *, | ||
| 379 | XEvent *); | ||
| 380 | |||
| 377 | #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) | 381 | #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) |
| 378 | #define x_any_window_to_frame x_window_to_frame | 382 | #define x_any_window_to_frame x_window_to_frame |
| 379 | #define x_top_window_to_frame x_window_to_frame | 383 | #define x_top_window_to_frame x_window_to_frame |
| @@ -389,7 +393,6 @@ extern struct x_display_info *x_display_list; | |||
| 389 | extern Lisp_Object x_display_name_list; | 393 | extern Lisp_Object x_display_name_list; |
| 390 | 394 | ||
| 391 | extern struct x_display_info *x_display_info_for_display (Display *); | 395 | extern struct x_display_info *x_display_info_for_display (Display *); |
| 392 | extern void x_set_frame_alpha (struct frame *); | ||
| 393 | 396 | ||
| 394 | extern struct x_display_info *x_term_init (Lisp_Object, char *, char *); | 397 | extern struct x_display_info *x_term_init (Lisp_Object, char *, char *); |
| 395 | extern int x_display_ok (const char *); | 398 | extern int x_display_ok (const char *); |
| @@ -941,7 +944,6 @@ XrmDatabase x_load_resources (Display *, const char *, const char *, | |||
| 941 | /* Defined in xterm.c */ | 944 | /* Defined in xterm.c */ |
| 942 | 945 | ||
| 943 | extern int x_text_icon (struct frame *, const char *); | 946 | extern int x_text_icon (struct frame *, const char *); |
| 944 | extern int x_bitmap_icon (struct frame *, Lisp_Object); | ||
| 945 | extern void x_catch_errors (Display *); | 947 | extern void x_catch_errors (Display *); |
| 946 | extern void x_check_errors (Display *, const char *) | 948 | extern void x_check_errors (Display *, const char *) |
| 947 | ATTRIBUTE_FORMAT_PRINTF (2, 0); | 949 | ATTRIBUTE_FORMAT_PRINTF (2, 0); |
| @@ -953,11 +955,6 @@ extern void x_set_mouse_position (struct frame *, int, int); | |||
| 953 | extern void x_set_mouse_pixel_position (struct frame *, int, int); | 955 | extern void x_set_mouse_pixel_position (struct frame *, int, int); |
| 954 | extern void xembed_request_focus (struct frame *); | 956 | extern void xembed_request_focus (struct frame *); |
| 955 | extern void x_ewmh_activate_frame (struct frame *); | 957 | extern void x_ewmh_activate_frame (struct frame *); |
| 956 | extern void x_make_frame_visible (struct frame *); | ||
| 957 | extern void x_make_frame_invisible (struct frame *); | ||
| 958 | extern void x_iconify_frame (struct frame *); | ||
| 959 | extern void x_free_frame_resources (struct frame *); | ||
| 960 | extern void x_wm_set_size_hint (struct frame *, long, int); | ||
| 961 | extern void x_delete_terminal (struct terminal *terminal); | 958 | extern void x_delete_terminal (struct terminal *terminal); |
| 962 | extern unsigned long x_copy_color (struct frame *, unsigned long); | 959 | extern unsigned long x_copy_color (struct frame *, unsigned long); |
| 963 | #ifdef USE_X_TOOLKIT | 960 | #ifdef USE_X_TOOLKIT |
| @@ -970,7 +967,6 @@ extern int x_alloc_lighter_color_for_widget (Widget, Display *, Colormap, | |||
| 970 | double, int); | 967 | double, int); |
| 971 | #endif | 968 | #endif |
| 972 | extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *); | 969 | extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *); |
| 973 | extern void x_query_colors (struct frame *f, XColor *, int); | ||
| 974 | extern void x_query_color (struct frame *f, XColor *); | 970 | extern void x_query_color (struct frame *f, XColor *); |
| 975 | extern void x_clear_area (Display *, Window, int, int, int, int, int); | 971 | extern void x_clear_area (Display *, Window, int, int, int, int, int); |
| 976 | #if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK | 972 | #if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK |
| @@ -1029,8 +1025,6 @@ extern int xg_set_icon (struct frame *, Lisp_Object); | |||
| 1029 | extern int xg_set_icon_from_xpm_data (struct frame *, const char**); | 1025 | extern int xg_set_icon_from_xpm_data (struct frame *, const char**); |
| 1030 | #endif /* USE_GTK */ | 1026 | #endif /* USE_GTK */ |
| 1031 | 1027 | ||
| 1032 | extern void x_real_positions (struct frame *, int *, int *); | ||
| 1033 | extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | ||
| 1034 | extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); | 1028 | extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); |
| 1035 | extern void xic_free_xfontset (struct frame *); | 1029 | extern void xic_free_xfontset (struct frame *); |
| 1036 | extern void create_frame_xic (struct frame *); | 1030 | extern void create_frame_xic (struct frame *); |
| @@ -1040,9 +1034,6 @@ extern void xic_set_statusarea (struct frame *); | |||
| 1040 | extern void xic_set_xfontset (struct frame *, const char *); | 1034 | extern void xic_set_xfontset (struct frame *, const char *); |
| 1041 | extern int x_pixel_width (struct frame *); | 1035 | extern int x_pixel_width (struct frame *); |
| 1042 | extern int x_pixel_height (struct frame *); | 1036 | extern int x_pixel_height (struct frame *); |
| 1043 | extern int x_char_width (struct frame *); | ||
| 1044 | extern int x_char_height (struct frame *); | ||
| 1045 | extern void x_sync (struct frame *); | ||
| 1046 | extern int x_defined_color (struct frame *, const char *, XColor *, int); | 1037 | extern int x_defined_color (struct frame *, const char *, XColor *, int); |
| 1047 | #ifdef HAVE_X_I18N | 1038 | #ifdef HAVE_X_I18N |
| 1048 | extern void free_frame_xic (struct frame *); | 1039 | extern void free_frame_xic (struct frame *); |
| @@ -1050,7 +1041,6 @@ extern void free_frame_xic (struct frame *); | |||
| 1050 | extern char * xic_create_fontsetname (const char *base_fontname, int motif); | 1041 | extern char * xic_create_fontsetname (const char *base_fontname, int motif); |
| 1051 | # endif | 1042 | # endif |
| 1052 | #endif | 1043 | #endif |
| 1053 | extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | ||
| 1054 | 1044 | ||
| 1055 | /* Defined in xfaces.c */ | 1045 | /* Defined in xfaces.c */ |
| 1056 | 1046 | ||
| @@ -1067,10 +1057,8 @@ extern void x_menu_set_in_use (int); | |||
| 1067 | #ifdef USE_MOTIF | 1057 | #ifdef USE_MOTIF |
| 1068 | extern void x_menu_wait_for_event (void *data); | 1058 | extern void x_menu_wait_for_event (void *data); |
| 1069 | #endif | 1059 | #endif |
| 1070 | extern void x_activate_menubar (struct frame *); | ||
| 1071 | extern int popup_activated (void); | 1060 | extern int popup_activated (void); |
| 1072 | extern void initialize_frame_menubar (struct frame *); | 1061 | extern void initialize_frame_menubar (struct frame *); |
| 1073 | extern void free_frame_menubar (struct frame *); | ||
| 1074 | 1062 | ||
| 1075 | /* Defined in widget.c */ | 1063 | /* Defined in widget.c */ |
| 1076 | 1064 | ||
| @@ -1112,3 +1100,5 @@ extern Lisp_Object Qx_gtk_map_stock; | |||
| 1112 | (nr).y = (ry), \ | 1100 | (nr).y = (ry), \ |
| 1113 | (nr).width = (rwidth), \ | 1101 | (nr).width = (rwidth), \ |
| 1114 | (nr).height = (rheight)) | 1102 | (nr).height = (rheight)) |
| 1103 | |||
| 1104 | #endif /* XTERM_H */ | ||