+2012-09-01 Daniel Colascione <dan.colascione@gmail.com>
+
+ * configure.ac: Introduce term_header variable, which holds the
+ value which will become TERM_HEADER in code. We effect our choice
+ of window system by setting term_header and WINDOW_SYSTEM_OBJ
+ instead of using ad-hoc variables and flags for each window
+ system.
+
2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
* configure.ac (CFLAGS): Prefer -g3 to -g if -g3 works
#### Choose a window system.
+## We leave window_system equal to none if
+## we end up building without one. Any new window system should
+## set window_system to an appropriate value and add objects to
+## window-system-specific substs.
+
+window_system=none
AC_PATH_X
-if test "$no_x" = yes; then
- window_system=none
-else
+if test "$no_x" != yes; then
window_system=x11
fi
fi
window_system=nextstep
- with_xft=no
# set up packaging dirs
if test "${EN_NS_SELF_CONTAINED}" = yes; then
ns_self_contained=yes
INSTALL_ARCH_INDEP_EXTRA=
fi
ns_frag=$srcdir/src/ns.mk
- NS_OBJ="fontset.o fringe.o image.o"
NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
fi
CFLAGS="$tmp_CFLAGS"
AC_SUBST(LIB_STANDARD)
AC_SUBST_FILE(ns_frag)
+## $window_system is now set to the window system we will
+## ultimately use.
+
+term_header=
+HAVE_X_WINDOWS=no
+HAVE_X11=no
+USE_X_TOOLKIT=none
+
case "${window_system}" in
x11 )
HAVE_X_WINDOWS=yes
HAVE_X11=yes
+ term_header=xterm.h
case "${with_x_toolkit}" in
athena | lucid ) USE_X_TOOLKIT=LUCID ;;
motif ) USE_X_TOOLKIT=MOTIF ;;
gtk ) with_gtk=yes
+ term_header=gtkutil.h
dnl Don't set this for GTK. A lot of tests below assumes Xt when
dnl USE_X_TOOLKIT is set.
USE_X_TOOLKIT=none ;;
gtk3 ) with_gtk3=yes
+ term_header=gtkutil.h
USE_X_TOOLKIT=none ;;
no ) USE_X_TOOLKIT=none ;;
dnl If user did not say whether to use a toolkit, make this decision later:
* ) USE_X_TOOLKIT=maybe ;;
esac
;;
- nextstep | none )
- HAVE_X_WINDOWS=no
- HAVE_X11=no
- USE_X_TOOLKIT=none
+ nextstep )
+ term_header=nsterm.h
;;
esac
+if test -n "${term_header}"; then
+ AC_DEFINE_UNQUOTED(TERM_HEADER, "${term_header}",
+ [Define to the header for the built-in window system.])
+fi
+
if test "$window_system" = none && test "X$with_x" != "Xno"; then
AC_CHECK_PROG(HAVE_XSERVER, X, true, false)
if test "$HAVE_XSERVER" = true ||
fi
AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.])
GTK_OBJ=emacsgtkfixed.o
+ term_header=gtkutil.h
fi
if test "$pkg_check_gtk" != "yes"; then
gtk_widget_get_mapped gtk_adjustment_get_page_size \
gtk_orientable_set_orientation \
gtk_window_set_has_resize_grip)
+
+ term_header=gtkutil.h
fi
dnl D-Bus has been tested under GNU/Linux only. Must be adapted for
AC_SUBST(GNU_OBJC_CFLAGS)
AC_SUBST(OTHER_FILES)
+if test -n "${term_header}"; then
+ AC_DEFINE_UNQUOTED(TERM_HEADER, "${term_header}",
+ [Define to the header for the built-in window system.])
+fi
+
AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}",
[Define to the canonical Emacs configuration name.])
AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}",
AC_DEFINE(HAVE_X_WINDOWS, 1,
[Define to 1 if you want to use the X window system.])
XMENU_OBJ=xmenu.o
- XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
+ XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
FONT_OBJ=xfont.o
if test "$HAVE_XFT" = "yes"; then
FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
fi dnl if $GCC
AC_SUBST(LIB_GCC)
-
-## If we're using X11/GNUstep, define some consequences.
-if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
+## Common for all window systems
+if test "$window_system" != "none"; then
AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.])
AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
+ WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
fi
+AC_SUBST(WINDOW_SYSTEM_OBJ)
AH_TOP([/* GNU Emacs site configuration template file.
+2012-09-01 Daniel Colascione <dancol@dancol.org>
+
+ * inc/ms-w32.h (TERM_HEADER): Add for refactoring
+
2012-08-22 Juanma Barranquero <lekktu@gmail.com>
* config.nt: Sync with autogen/config.in.
#define DebPrint(stuff)
#endif
+#define TERM_HEADER "w32term.h"
+
+
/* ============================================================ */
+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.
+
2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
Remove mark_ttys function and fix tty_display_info initialization.
## 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@
## 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.
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@
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.
#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. */
#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. */
#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 */
#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
#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;
#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"
#include "dosfns.h"
#endif
-
-#ifdef HAVE_WINDOW_SYSTEM
-
-#endif
-
#ifdef HAVE_NS
Lisp_Object Qns_parse_geometry;
#endif
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);
#include <gtk/gtk.h>
#include "frame.h"
+#include "xterm.h"
/* Minimum and maximum values used for GTK scroll bars */
#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;
#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
#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. */
#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;
#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 */
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
#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;
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;
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
#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"
/* 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)
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);
#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>.
#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. */
Lisp_Object intern_font_name (char *);
+extern void syms_of_w32font (void);
+extern void globals_of_w32font (void);
+
#endif
/* 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)
/* x_sync is a no-op on W32. */
void
-x_sync (void *f)
+x_sync (struct frame *f)
{
}
#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
#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"
#include "termchar.h"
#include "font.h"
-#ifdef HAVE_WINDOW_SYSTEM
-#include "fontset.h"
-#endif /* HAVE_WINDOW_SYSTEM */
#ifdef HAVE_X_WINDOWS
}
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))
{
}
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))
{
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>
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
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 *);
/* 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);
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
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
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 *);
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 *);
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 */
#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 */
(nr).y = (ry), \
(nr).width = (rwidth), \
(nr).height = (rheight))
+
+#endif /* XTERM_H */