diff options
author | Daniel Colascione <dancol@dancol.org> | 2012-09-01 00:01:36 -0800 |
---|---|---|
committer | Daniel Colascione <dancol@dancol.org> | 2012-09-01 00:01:36 -0800 |
commit | 0a850e9a4eff07824bba57892bf27ce9767559bd (patch) | |
tree | dcbd8a6f16651b0745cf43a7ca02b6fd9e5e6daf /src | |
parent | 3d10e1343d65341d4d48633e0b561df86787c438 (diff) | |
parent | 17a2cbbd76385d0be8a4b28974e64f4debf459c1 (diff) | |
download | emacs-0a850e9a4eff07824bba57892bf27ce9767559bd.tar.gz |
Merge from cygw32 branch
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 72 | ||||
-rw-r--r-- | src/Makefile.in | 11 | ||||
-rw-r--r-- | src/ccl.h | 2 | ||||
-rw-r--r-- | src/dispnew.c | 14 | ||||
-rw-r--r-- | src/emacs.c | 12 | ||||
-rw-r--r-- | src/font.c | 14 | ||||
-rw-r--r-- | src/frame.c | 19 | ||||
-rw-r--r-- | src/frame.h | 30 | ||||
-rw-r--r-- | src/gtkutil.h | 1 | ||||
-rw-r--r-- | src/image.c | 31 | ||||
-rw-r--r-- | src/keyboard.c | 19 | ||||
-rw-r--r-- | src/keyboard.h | 2 | ||||
-rw-r--r-- | src/menu.c | 17 | ||||
-rw-r--r-- | src/nsterm.h | 27 | ||||
-rw-r--r-- | src/process.c | 7 | ||||
-rw-r--r-- | src/w32font.h | 4 | ||||
-rw-r--r-- | src/w32term.h | 2 | ||||
-rw-r--r-- | src/w32xfns.c | 2 | ||||
-rw-r--r-- | src/xfaces.c | 20 | ||||
-rw-r--r-- | src/xterm.h | 26 |
20 files changed, 176 insertions, 156 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ad96c948466..3c878d5850f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,78 @@ * lisp.h, sysdep.c (seed_random): Now takes address and size, not long. (init_random): New function. +2012-09-01 Daniel Colascione <dancol@dancol.org> + + * xterm.h: Add header guards. Declare x_menubar_window_to_frame. + Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible, + x_make_frame_invisible, x_iconify_frame, x_free_frame_resources, + x_wm_set_size_hint, x_query_colors, x_real_positions, + x_set_menu_bar_lines, x_char_width, x_char_height, x_sync, + x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar, + all of which have been moved to common code. + + * xfaces.c: Include TERM_HEADER instead of listing all possible + window-system headers. + + * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here) + to match header. + + * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of + directly accessing frame internals. + + * w32font.h (w): Include font.h. Define syms_of_w32font and + globals_of_w32font. + + * process.c: Include TERM_HEADER instead of listing all possible + window-system headers. + + * nsterm.h: Remove declarations now in frame.h. Define + FRAME_X_SCREEN, FRAME_X_VISUAL. + + * menu.c: Include TERM_HEADER instead of listing all possible + window-system headers. + + * keyboard.h: Declare ignore_mouse_drag_p whenever we have a + window system. + + * keyboard.c: Include TERM_HEADER instead of listing all possible + window-system headers. + + * image.c: Include TERM_HEADER instead of listing all possible + window-system headers. Declare Vlibrary_cache when compiling for + Windows. + + * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed + window system declarations. + + * frame.h: Move common functions here: set_frame_menubar, + x_set_window_size, x_sync, x_get_focus_frame, + x_set_mouse_position, x_set_mouse_pixel_position, + x_make_frame_visible, x_make_frame_invisible, x_iconify_frame, + x_char_width, x_char_height, x_pixel_width, x_pixel_height, + x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines, + x_activate_menubar, x_real_positions, x_bitmap_icon, + x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources, + and x_query_colors. + + * frame.c: Include TERM_HEADER instead of listing all possible + window-system headers. + + * font.c: Include TERM_HEADER instead of listing all possible + window-system headers. + + * emacs.c: Include TERM_HEADER. + + * dispnew.c (d): Include TERM_HEADER instead of listing all + possible window-system headers. + + * ccl.h (c): Include character.h. + + * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for + the current window system; include in list of objects to link into + Emacs. +>>>>>>> MERGE-SOURCE + 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru> Remove mark_ttys function and fix tty_display_info initialization. diff --git a/src/Makefile.in b/src/Makefile.in index 60df1f1c677..a809216f095 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -211,8 +211,8 @@ LIBXMENU=@LIBXMENU@ ## xmenu.o if HAVE_X_WINDOWS, else empty. XMENU_OBJ=@XMENU_OBJ@ -## xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o -## xsettings.o xgselect.o if HAVE_X_WINDOWS, else empty. +## xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o if +## HAVE_X_WINDOWS, else empty. XOBJ=@XOBJ@ TOOLKIT_LIBW=@TOOLKIT_LIBW@ @@ -247,6 +247,9 @@ WIDGET_OBJ=@WIDGET_OBJ@ ## sheap.o if CYGWIN, otherwise empty. CYGWIN_OBJ=@CYGWIN_OBJ@ +## fontset.o fringe.o image.o if we have any window system +WINDOW_SYSTEM_OBJ=@WINDOW_SYSTEM_OBJ@ + ## dosfns.o msdos.o w16select.o if MSDOS. MSDOS_OBJ = ## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS. @@ -255,7 +258,6 @@ MSDOS_X_OBJ = ns_appdir=@ns_appdir@ ns_appbindir=@ns_appbindir@ ns_appsrc=@ns_appsrc@ -## fontset.o fringe.o image.o if HAVE_NS, else empty. NS_OBJ=@NS_OBJ@ ## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o if HAVE_NS. NS_OBJC_OBJ=@NS_OBJC_OBJ@ @@ -340,7 +342,8 @@ base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ process.o gnutls.o callproc.o \ region-cache.o sound.o atimer.o \ doprnt.o intervals.o textprop.o composite.o xml.o \ - $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) + $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \ + $(WINDOW_SYSTEM_OBJ) obj = $(base_obj) $(NS_OBJC_OBJ) ## Object files used on some machine or other. diff --git a/src/ccl.h b/src/ccl.h index 71139175be5..cc5daf11e1c 100644 --- a/src/ccl.h +++ b/src/ccl.h @@ -26,6 +26,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #ifndef EMACS_CCL_H #define EMACS_CCL_H +#include "character.h" /* For MAX_MULTIBYTE_LENGTH */ + /* Macros for exit status of CCL program. */ #define CCL_STAT_SUCCESS 0 /* Terminated successfully. */ #define CCL_STAT_SUSPEND_BY_SRC 1 /* Terminated by empty input. */ diff --git a/src/dispnew.c b/src/dispnew.c index 2d232d49c53..cac4c2da4c4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -47,17 +47,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "syssignal.h" -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#endif /* HAVE_X_WINDOWS */ - -#ifdef HAVE_NTGUI -#include "w32term.h" -#endif /* HAVE_NTGUI */ - -#ifdef HAVE_NS -#include "nsterm.h" -#endif +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ /* Include systime.h after xterm.h to avoid double inclusion of time.h. */ diff --git a/src/emacs.c b/src/emacs.c index 842546461b6..adfff6ff3ed 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -31,6 +31,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "lisp.h" +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ + #ifdef WINDOWSNT #include <fcntl.h> #include <windows.h> /* just for w32.h */ @@ -62,20 +66,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "gnutls.h" #endif -#ifdef HAVE_NS -#include "nsterm.h" -#endif - #if (defined PROFILING \ && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__)) # include <sys/gmon.h> extern void moncontrol (int mode); #endif -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#endif - #ifdef HAVE_SETLOCALE #include <locale.h> #endif diff --git a/src/font.c b/src/font.c index 5b9e4f1cfcf..cf9964f08f3 100644 --- a/src/font.c +++ b/src/font.c @@ -38,17 +38,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "fontset.h" #include "font.h" -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#endif /* HAVE_X_WINDOWS */ - -#ifdef HAVE_NTGUI -#include "w32term.h" -#endif /* HAVE_NTGUI */ - -#ifdef HAVE_NS -#include "nsterm.h" -#endif /* HAVE_NS */ +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ Lisp_Object Qopentype; diff --git a/src/frame.c b/src/frame.c index 4785840a95f..968cb4905a2 100644 --- a/src/frame.c +++ b/src/frame.c @@ -30,15 +30,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "lisp.h" #include "character.h" -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#endif -#ifdef WINDOWSNT -#include "w32term.h" -#endif -#ifdef HAVE_NS -#include "nsterm.h" -#endif + +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ + #include "buffer.h" /* These help us bind and responding to switch-frame events. */ #include "commands.h" @@ -58,11 +54,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "dosfns.h" #endif - -#ifdef HAVE_WINDOW_SYSTEM - -#endif - #ifdef HAVE_NS Lisp_Object Qns_parse_geometry; #endif diff --git a/src/frame.h b/src/frame.h index 8587f094a95..76fde8ec96b 100644 --- a/src/frame.h +++ b/src/frame.h @@ -1251,10 +1251,40 @@ extern Lisp_Object display_x_get_resource (Display_Info *, Lisp_Object component, Lisp_Object subclass); +extern void set_frame_menubar (struct frame *f, int first_time, int deep_p); +extern void x_set_window_size (struct frame *f, int change_grav, + int cols, int rows); +extern void x_sync (struct frame *); +extern Lisp_Object x_get_focus_frame (struct frame *); +extern void x_set_mouse_position (struct frame *f, int h, int v); +extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); +extern void x_make_frame_visible (struct frame *f); +extern void x_make_frame_invisible (struct frame *f); +extern void x_iconify_frame (struct frame *f); +extern int x_char_width (struct frame *f); +extern int x_char_height (struct frame *f); +extern int x_pixel_width (struct frame *f); +extern int x_pixel_height (struct frame *f); +extern void x_set_frame_alpha (struct frame *f); +extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); +extern void x_set_tool_bar_lines (struct frame *f, + Lisp_Object value, + Lisp_Object oldval); +extern void x_activate_menubar (struct frame *); +extern void x_real_positions (struct frame *, int *, int *); +extern int x_bitmap_icon (struct frame *, Lisp_Object); +extern void x_set_menu_bar_lines (struct frame *, + Lisp_Object, + Lisp_Object); +extern void free_frame_menubar (struct frame *); +extern void x_free_frame_resources (struct frame *); + #if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT extern char *x_get_resource_string (const char *, const char *); #endif +extern void x_query_colors (struct frame *f, XColor *, int); + /* In xmenu.c */ extern void set_frame_menubar (FRAME_PTR, int, int); diff --git a/src/gtkutil.h b/src/gtkutil.h index 462e879d3e7..c1b6634999f 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h @@ -25,6 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <gtk/gtk.h> #include "frame.h" +#include "xterm.h" /* Minimum and maximum values used for GTK scroll bars */ diff --git a/src/image.c b/src/image.c index f2778165ece..c444c986a76 100644 --- a/src/image.c +++ b/src/image.c @@ -50,11 +50,19 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "termhooks.h" #include "font.h" -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#include <sys/types.h> +#ifdef HAVE_SYS_STAT_H #include <sys/stat.h> +#endif /* HAVE_SYS_STAT_H */ + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif /* HAVE_SYS_TYPES_H */ + +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ +#ifdef HAVE_X_WINDOWS #define COLOR_TABLE_SUPPORT 1 typedef struct x_bitmap_record Bitmap_Record; @@ -67,11 +75,7 @@ typedef struct x_bitmap_record Bitmap_Record; #define PIX_MASK_DRAW 1 #endif /* HAVE_X_WINDOWS */ - #ifdef HAVE_NTGUI -#include "w32.h" -#include "w32term.h" - /* W32_TODO : Color tables on W32. */ #undef COLOR_TABLE_SUPPORT @@ -84,15 +88,9 @@ typedef struct w32_bitmap_record Bitmap_Record; #define PIX_MASK_RETAIN 0 #define PIX_MASK_DRAW 1 -#define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual #define x_defined_color w32_defined_color #define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits) -/* Functions from w32term.c that depend on XColor (so can't go in w32term.h - without modifying lots of files). */ -extern void x_query_colors (struct frame *f, XColor *colors, int ncolors); -extern void x_query_color (struct frame *f, XColor *color); - /* Version of libpng that we were compiled with, or -1 if no PNG support was compiled in. This is tested by w32-win.el to correctly set up the alist used to search for PNG libraries. */ @@ -100,10 +98,6 @@ Lisp_Object Qlibpng_version; #endif /* HAVE_NTGUI */ #ifdef HAVE_NS -#include "nsterm.h" -#include <sys/types.h> -#include <sys/stat.h> - #undef COLOR_TABLE_SUPPORT typedef struct ns_bitmap_record Bitmap_Record; @@ -117,10 +111,8 @@ typedef struct ns_bitmap_record Bitmap_Record; #define PIX_MASK_RETAIN 0 #define PIX_MASK_DRAW 1 -#define FRAME_X_VISUAL FRAME_NS_DISPLAY_INFO (f)->visual #define x_defined_color(f, name, color_def, alloc) \ ns_defined_color (f, name, color_def, alloc, 0) -#define FRAME_X_SCREEN(f) 0 #define DefaultDepthOfScreen(screen) x_display_list->n_planes #endif /* HAVE_NS */ @@ -577,6 +569,7 @@ static void x_emboss (struct frame *, struct image *); static int x_build_heuristic_mask (struct frame *, struct image *, Lisp_Object); #ifdef HAVE_NTGUI +extern Lisp_Object Vlibrary_cache, QCloaded_from; #define CACHE_IMAGE_TYPE(type, status) \ do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) #else diff --git a/src/keyboard.c b/src/keyboard.c index d9b88a8a911..7b1ea341e7f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -63,20 +63,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <unistd.h> #include <fcntl.h> -/* This is to get the definitions of the XK_ symbols. */ -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#endif - -#ifdef HAVE_NTGUI -#include "w32term.h" -#endif /* HAVE_NTGUI */ - -#ifdef HAVE_NS -#include "nsterm.h" -#endif +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ -/* Variables for blockinput.h: */ +/* Variables for blockinput.h: */ /* Non-zero if interrupt input is blocked right now. */ volatile int interrupt_input_blocked; @@ -1324,7 +1315,7 @@ usage: (track-mouse BODY...) */) If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement after resizing the tool-bar window. */ -#if !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS +#if !defined HAVE_WINDOW_SYSTEM static #endif int ignore_mouse_drag_p; diff --git a/src/keyboard.h b/src/keyboard.h index 91484b3649b..98b1933f3f9 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -469,7 +469,7 @@ extern int waiting_for_input; happens. */ extern EMACS_TIME *input_available_clear_time; -#if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS +#if defined HAVE_WINDOW_SYSTEM extern int ignore_mouse_drag_p; #endif diff --git a/src/menu.c b/src/menu.c index 3e466b46aa3..20770537326 100644 --- a/src/menu.c +++ b/src/menu.c @@ -36,24 +36,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "../lwlib/lwlib.h" #endif -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#endif - -#ifdef HAVE_NS -#include "nsterm.h" -#endif - -#ifdef USE_GTK -#include "gtkutil.h" -#endif +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ #ifdef HAVE_NTGUI -#include "w32term.h" - extern AppendMenuW_Proc unicode_append_menu; extern HMENU current_popup_menu; - #endif /* HAVE_NTGUI */ #include "menu.h" diff --git a/src/nsterm.h b/src/nsterm.h index f9149d97571..f0cae193005 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -631,6 +631,8 @@ struct x_output /* This is the `Display *' which frame F is on. */ #define FRAME_NS_DISPLAY(f) (0) #define FRAME_X_DISPLAY(f) (0) +#define FRAME_X_SCREEN(f) (0) +#define FRAME_X_VISUAL(f) FRAME_NS_DISPLAY_INFO(f)->visual #define FRAME_FOREGROUND_COLOR(f) ((f)->output_data.ns->foreground_color) #define FRAME_BACKGROUND_COLOR(f) ((f)->output_data.ns->background_color) @@ -780,31 +782,6 @@ extern Lisp_Object find_and_return_menu_selection (FRAME_PTR f, extern Lisp_Object ns_popup_dialog (Lisp_Object position, Lisp_Object contents, Lisp_Object header); -/* More prototypes that should be moved to a more general include file */ -extern void set_frame_menubar (struct frame *f, int first_time, int deep_p); -extern void x_set_window_size (struct frame *f, int change_grav, - int cols, int rows); -extern void x_sync (struct frame *); -extern Lisp_Object x_get_focus_frame (struct frame *); -extern void x_set_mouse_position (struct frame *f, int h, int v); -extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); -extern void x_make_frame_visible (struct frame *f); -extern void x_make_frame_invisible (struct frame *f); -extern void x_iconify_frame (struct frame *f); -extern int x_char_width (struct frame *f); -extern int x_char_height (struct frame *f); -extern int x_pixel_width (struct frame *f); -extern int x_pixel_height (struct frame *f); -extern void x_set_frame_alpha (struct frame *f); -extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); -extern void x_set_tool_bar_lines (struct frame *f, - Lisp_Object value, - Lisp_Object oldval); -extern void x_activate_menubar (struct frame *); -extern void free_frame_menubar (struct frame *); -extern void x_free_frame_resources (struct frame *); -extern void x_destroy_window (struct frame *); - #define NSAPP_DATA2_RUNASSCRIPT 10 extern void ns_run_ascript (void); diff --git a/src/process.c b/src/process.c index fbe56ebcb54..bfac054c3c2 100644 --- a/src/process.c +++ b/src/process.c @@ -116,12 +116,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "gnutls.h" #endif +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER +#endif /* HAVE_WINDOW_SYSTEM */ + #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) #include "xgselect.h" #endif -#ifdef HAVE_NS -#include "nsterm.h" -#endif /* Work around GCC 4.7.0 bug with strict overflow checking; see <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>. diff --git a/src/w32font.h b/src/w32font.h index b08d48a3d36..a29ddbe778c 100644 --- a/src/w32font.h +++ b/src/w32font.h @@ -19,6 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #ifndef EMACS_W32FONT_H #define EMACS_W32FONT_H +#include "font.h" /* Bit 17 of ntmFlags in NEWTEXTMETRIC is set for PostScript OpenType fonts, bit 18 for TrueType OpenType fonts, bit 20 for Type1 fonts. */ @@ -83,4 +84,7 @@ int uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec); Lisp_Object intern_font_name (char *); +extern void syms_of_w32font (void); +extern void globals_of_w32font (void); + #endif diff --git a/src/w32term.h b/src/w32term.h index 6fc2beeb18c..5d756f435e4 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -342,7 +342,7 @@ extern struct w32_output w32term_display; /* Return the window associated with the frame F. */ #define FRAME_W32_WINDOW(f) ((f)->output_data.w32->window_desc) -#define FRAME_X_WINDOW(f) ((f)->output_data.w32->window_desc) +#define FRAME_X_WINDOW(f) FRAME_W32_WINDOW (f) #define FRAME_FONT(f) ((f)->output_data.w32->font) #define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) diff --git a/src/w32xfns.c b/src/w32xfns.c index 745a5cfe3e7..62e45dd987b 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -438,6 +438,6 @@ XParseGeometry (char *string, /* x_sync is a no-op on W32. */ void -x_sync (void *f) +x_sync (struct frame *f) { } diff --git a/src/xfaces.c b/src/xfaces.c index 820d764d0a8..5554c4aa705 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -225,11 +225,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "dosfns.h" #endif -#ifdef WINDOWSNT -#include "w32term.h" +#ifdef HAVE_WINDOW_SYSTEM +#include TERM_HEADER #include "fontset.h" -/* Redefine X specifics to W32 equivalents to avoid cluttering the - code with #ifdef blocks. */ +#ifdef WINDOWSNT #undef FRAME_X_DISPLAY_INFO #define FRAME_X_DISPLAY_INFO FRAME_W32_DISPLAY_INFO #define x_display_info w32_display_info @@ -238,13 +237,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #endif /* WINDOWSNT */ #ifdef HAVE_NS -#include "nsterm.h" #undef FRAME_X_DISPLAY_INFO #define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO #define x_display_info ns_display_info #define check_x check_ns #define GCGraphicsExposures 0 #endif /* HAVE_NS */ +#endif /* HAVE_WINDOW_SYSTEM */ #include "buffer.h" #include "dispextern.h" @@ -254,9 +253,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "termchar.h" #include "font.h" -#ifdef HAVE_WINDOW_SYSTEM -#include "fontset.h" -#endif /* HAVE_WINDOW_SYSTEM */ #ifdef HAVE_X_WINDOWS @@ -2565,13 +2561,13 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to, } else if (EQ (keyword, QCstipple)) { -#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) +#if defined (HAVE_WINDOW_SYSTEM) Lisp_Object pixmap_p = Fbitmap_spec_p (value); if (!NILP (pixmap_p)) to[LFACE_STIPPLE_INDEX] = value; else err = 1; -#endif +#endif /* HAVE_WINDOW_SYSTEM */ } else if (EQ (keyword, QCwidth)) { @@ -3125,14 +3121,14 @@ FRAME 0 means change the face on all frames, and change the default } else if (EQ (attr, QCstipple)) { -#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) +#if defined (HAVE_WINDOW_SYSTEM) if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) && !NILP (value) && NILP (Fbitmap_spec_p (value))) signal_error ("Invalid stipple attribute", value); old_value = LFACE_STIPPLE (lface); ASET (lface, LFACE_STIPPLE_INDEX, value); -#endif /* HAVE_X_WINDOWS || HAVE_NS */ +#endif /* HAVE_WINDOW_SYSTEM */ } else if (EQ (attr, QCwidth)) { 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. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef XTERM_H +#define XTERM_H + #include <X11/Xlib.h> #include <X11/cursorfont.h> @@ -367,13 +370,14 @@ extern int use_xim; extern void check_x (void); extern struct frame *x_window_to_frame (struct x_display_info *, int); - extern struct frame *x_any_window_to_frame (struct x_display_info *, int); extern struct frame *x_menubar_window_to_frame (struct x_display_info *, XEvent *); - extern struct frame *x_top_window_to_frame (struct x_display_info *, int); +extern struct frame *x_menubar_window_to_frame (struct x_display_info *, + XEvent *); + #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) #define x_any_window_to_frame x_window_to_frame #define x_top_window_to_frame x_window_to_frame @@ -389,7 +393,6 @@ extern struct x_display_info *x_display_list; extern Lisp_Object x_display_name_list; extern struct x_display_info *x_display_info_for_display (Display *); -extern void x_set_frame_alpha (struct frame *); extern struct x_display_info *x_term_init (Lisp_Object, char *, char *); extern int x_display_ok (const char *); @@ -941,7 +944,6 @@ XrmDatabase x_load_resources (Display *, const char *, const char *, /* Defined in xterm.c */ extern int x_text_icon (struct frame *, const char *); -extern int x_bitmap_icon (struct frame *, Lisp_Object); extern void x_catch_errors (Display *); extern void x_check_errors (Display *, const char *) ATTRIBUTE_FORMAT_PRINTF (2, 0); @@ -953,11 +955,6 @@ extern void x_set_mouse_position (struct frame *, int, int); extern void x_set_mouse_pixel_position (struct frame *, int, int); extern void xembed_request_focus (struct frame *); extern void x_ewmh_activate_frame (struct frame *); -extern void x_make_frame_visible (struct frame *); -extern void x_make_frame_invisible (struct frame *); -extern void x_iconify_frame (struct frame *); -extern void x_free_frame_resources (struct frame *); -extern void x_wm_set_size_hint (struct frame *, long, int); extern void x_delete_terminal (struct terminal *terminal); extern unsigned long x_copy_color (struct frame *, unsigned long); #ifdef USE_X_TOOLKIT @@ -970,7 +967,6 @@ extern int x_alloc_lighter_color_for_widget (Widget, Display *, Colormap, double, int); #endif extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *); -extern void x_query_colors (struct frame *f, XColor *, int); extern void x_query_color (struct frame *f, XColor *); extern void x_clear_area (Display *, Window, int, int, int, int, int); #if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK @@ -1029,8 +1025,6 @@ extern int xg_set_icon (struct frame *, Lisp_Object); extern int xg_set_icon_from_xpm_data (struct frame *, const char**); #endif /* USE_GTK */ -extern void x_real_positions (struct frame *, int *, int *); -extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); extern void xic_free_xfontset (struct frame *); extern void create_frame_xic (struct frame *); @@ -1040,9 +1034,6 @@ extern void xic_set_statusarea (struct frame *); extern void xic_set_xfontset (struct frame *, const char *); extern int x_pixel_width (struct frame *); extern int x_pixel_height (struct frame *); -extern int x_char_width (struct frame *); -extern int x_char_height (struct frame *); -extern void x_sync (struct frame *); extern int x_defined_color (struct frame *, const char *, XColor *, int); #ifdef HAVE_X_I18N extern void free_frame_xic (struct frame *); @@ -1050,7 +1041,6 @@ extern void free_frame_xic (struct frame *); extern char * xic_create_fontsetname (const char *base_fontname, int motif); # endif #endif -extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); /* Defined in xfaces.c */ @@ -1067,10 +1057,8 @@ extern void x_menu_set_in_use (int); #ifdef USE_MOTIF extern void x_menu_wait_for_event (void *data); #endif -extern void x_activate_menubar (struct frame *); extern int popup_activated (void); extern void initialize_frame_menubar (struct frame *); -extern void free_frame_menubar (struct frame *); /* Defined in widget.c */ @@ -1112,3 +1100,5 @@ extern Lisp_Object Qx_gtk_map_stock; (nr).y = (ry), \ (nr).width = (rwidth), \ (nr).height = (rheight)) + +#endif /* XTERM_H */ |