/* Functions for the X window system.
- Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
- Free Software Foundation, Inc.
+
+Copyright (C) 1989, 1992-2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <math.h>
#include <setjmp.h>
#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
/* This makes the fields of a Display accessible, in Xlib header files. */
#undef USG /* ####KLUDGE for Solaris 2.2 and up */
#include <X11/Xos.h>
#define USG
+#ifdef USG /* Pacify gcc -Wunused-macros. */
+#endif
#else
#include <X11/Xos.h>
#endif
#include <Xm/Xm.h>
#include <Xm/DialogS.h>
#include <Xm/FileSB.h>
+#include <Xm/List.h>
+#include <Xm/TextF.h>
#endif
#ifdef USE_LUCID
#if !defined(NO_EDITRES)
#define HACK_EDITRES
-extern void _XEditResCheckMessages ();
+extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *);
#endif /* not defined NO_EDITRES */
/* Unique id counter for widgets created by the Lucid Widget Library. */
extern LWLIB_ID widget_id_tick;
-extern void free_frame_menubar ();
-extern double atof ();
-
#ifdef USE_MOTIF
-/* LessTif/Motif version info. */
-
-static Lisp_Object Vmotif_version_string;
-
#endif /* USE_MOTIF */
#endif /* USE_X_TOOLKIT */
#ifdef USE_GTK
-/* GTK+ version info */
-
-static Lisp_Object Vgtk_version_string;
-
#endif /* USE_GTK */
#define MAXREQUEST(dpy) (XMaxRequestSize (dpy))
int gray_bitmap_height = gray_height;
char *gray_bitmap_bits = gray_bits;
-/* Non-zero means prompt with the old GTK file selection dialog. */
-
-int x_gtk_use_old_file_dialog;
-
-/* If non-zero, by default show hidden files in the GTK file chooser. */
-
-int x_gtk_show_hidden_files;
-
-/* If non-zero, don't show additional help text in the GTK file chooser. */
-
-int x_gtk_file_dialog_help_text;
-
-/* If non-zero, don't collapse to tool bar when it is detached. */
-
-int x_gtk_whole_detached_tool_bar;
-
-/* If non-zero, use Gtk+ tooltips. */
-
-static int x_gtk_use_system_tooltips;
-
-/* The background and shape of the mouse pointer, and shape when not
- over text or in the modeline. */
-
-Lisp_Object Vx_pointer_shape, Vx_nontext_pointer_shape, Vx_mode_pointer_shape;
-Lisp_Object Vx_hourglass_pointer_shape;
-
-/* The shape when over mouse-sensitive text. */
-
-Lisp_Object Vx_sensitive_text_pointer_shape;
-
-/* If non-nil, the pointer shape to indicate that windows can be
- dragged horizontally. */
-
-Lisp_Object Vx_window_horizontal_drag_shape;
-
-/* Color of chars displayed in cursor box. */
-
-Lisp_Object Vx_cursor_fore_pixel;
-
/* Nonzero if using X. */
static int x_in_use;
-/* Non nil if no window manager is in use. */
-
-Lisp_Object Vx_no_window_manager;
-
-/* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */
-
-Lisp_Object Vx_pixel_size_width_font_regexp;
-
-Lisp_Object Qnone;
-Lisp_Object Qsuppress_icon;
-Lisp_Object Qundefined_color;
-Lisp_Object Qcompound_text, Qcancel_timer;
+static Lisp_Object Qnone;
+static Lisp_Object Qsuppress_icon;
+static Lisp_Object Qundefined_color;
+static Lisp_Object Qcompound_text, Qcancel_timer;
Lisp_Object Qfont_param;
#if GLYPH_DEBUG
#endif
#if defined (USE_GTK) && defined (HAVE_FREETYPE)
-char *x_last_font_name;
+static char *x_last_font_name;
#endif
+static struct x_display_info *x_display_info_for_name (Lisp_Object);
+
\f
/* Error if we are not connected to X. */
struct terminal *t = get_terminal (object, 1);
if (t->type != output_x_window)
- error ("Terminal %d is not an X display", XINT (object));
+ error ("Terminal %"pI"d is not an X display", XINT (object));
dpyinfo = t->display_info.x;
}
\f
-static void x_default_font_parameter (struct frame *, Lisp_Object);
-
-static Lisp_Object unwind_create_frame (Lisp_Object);
-static Lisp_Object unwind_create_tip_frame (Lisp_Object);
-
-void x_set_foreground_color (struct frame *, Lisp_Object, Lisp_Object);
-static void x_set_wait_for_wm (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_background_color (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_mouse_color (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_cursor_color (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_border_color (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_cursor_type (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_icon_type (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_icon_name (struct frame *, Lisp_Object, Lisp_Object);
-void x_explicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_title (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_scroll_bar_foreground (struct frame *, Lisp_Object,
- Lisp_Object);
-void x_set_scroll_bar_background (struct frame *, Lisp_Object,
- Lisp_Object);
-static Lisp_Object x_default_scroll_bar_color_parameter (struct frame *,
- Lisp_Object,
- Lisp_Object,
- const char *, const char *,
- int);
-\f
-
/* Store the screen positions of frame F into XPTR and YPTR.
These are the positions of the containing window manager window,
not Emacs's own window. */
void
x_real_positions (FRAME_PTR f, int *xptr, int *yptr)
{
- int win_x, win_y, outer_x, outer_y;
+ int win_x, win_y, outer_x IF_LINT (= 0), outer_y IF_LINT (= 0);
int real_x = 0, real_y = 0;
int had_errors = 0;
Window win = f->output_data.x->parent_desc;
+ Atom actual_type;
+ unsigned long actual_size, bytes_remaining;
+ int rc, actual_format;
+ struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ long max_len = 400;
+ Display *dpy = FRAME_X_DISPLAY (f);
+ unsigned char *tmp_data = NULL;
+ Atom target_type = XA_CARDINAL;
BLOCK_INPUT;
- x_catch_errors (FRAME_X_DISPLAY (f));
+ x_catch_errors (dpy);
- if (win == FRAME_X_DISPLAY_INFO (f)->root_window)
+ if (win == dpyinfo->root_window)
win = FRAME_OUTER_WINDOW (f);
/* This loop traverses up the containment tree until we hit the root
had_errors = x_had_errors_p (FRAME_X_DISPLAY (f));
}
+
+ if (dpyinfo->root_window == f->output_data.x->parent_desc)
+ {
+ /* Try _NET_FRAME_EXTENTS if our parent is the root window. */
+ rc = XGetWindowProperty (dpy, win, dpyinfo->Xatom_net_frame_extents,
+ 0, max_len, False, target_type,
+ &actual_type, &actual_format, &actual_size,
+ &bytes_remaining, &tmp_data);
+
+ if (rc == Success && actual_type == target_type && !x_had_errors_p (dpy)
+ && actual_size == 4 && actual_format == 32)
+ {
+ unsigned int ign;
+ Window rootw;
+ long *fe = (long *)tmp_data;
+
+ XGetGeometry (FRAME_X_DISPLAY (f), win,
+ &rootw, &real_x, &real_y, &ign, &ign, &ign, &ign);
+ outer_x = -fe[0];
+ outer_y = -fe[2];
+ real_x -= fe[0];
+ real_y -= fe[2];
+ }
+ }
+
+ if (tmp_data) XFree (tmp_data);
+
x_uncatch_errors ();
UNBLOCK_INPUT;
is a monochrome frame, return MONO_COLOR regardless of what ARG says.
Signal an error if color can't be allocated. */
-int
+static int
x_decode_color (FRAME_PTR f, Lisp_Object color_name, int mono_color)
{
XColor cdef;
/* x_defined_color is responsible for coping with failures
by looking for a near-miss. */
- if (x_defined_color (f, SDATA (color_name), &cdef, 1))
+ if (x_defined_color (f, SSDATA (color_name), &cdef, 1))
return cdef.pixel;
signal_error ("Undefined color", color_name);
if (EQ (new_value, old_value)) return;
#ifdef USE_GTK
- if (xg_change_toolbar_position (f, new_value))
+ if (xg_change_toolbar_position (f, new_value))
f->tool_bar_position = new_value;
#endif
}
{
GdkPixbuf *pixbuf;
GError *err = NULL;
- char *filename = (char *) SDATA (found);
+ char *filename = SSDATA (found);
BLOCK_INPUT;
pixbuf = gdk_pixbuf_new_from_file (filename, &err);
int
xg_set_icon_from_xpm_data (FRAME_PTR f, const char **data)
{
- int result = 0;
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data);
if (!pixbuf)
In that case, just record the parameter's new value
in the standard place; do not attempt to change the window. */
-void
+static void
x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
struct x_output *x = f->output_data.x;
unload_color (f, old_fg);
}
-void
+static void
x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
struct x_output *x = f->output_data.x;
static char const no_data[] = { 0 };
Pixmap pix;
XColor col;
- Cursor c;
+ Cursor c = 0;
x_catch_errors (dpy);
pix = XCreateBitmapFromData (dpy, FRAME_X_DISPLAY_INFO (f)->root_window,
no_data, 1, 1);
if (! x_had_errors_p (dpy) && pix != None)
{
+ Cursor pixc;
col.pixel = 0;
col.red = col.green = col.blue = 0;
col.flags = DoRed | DoGreen | DoBlue;
- c = XCreatePixmapCursor (dpy, pix, pix, &col, &col, 0, 0);
- if (x_had_errors_p (dpy) || c == None)
- c = 0;
+ pixc = XCreatePixmapCursor (dpy, pix, pix, &col, &col, 0, 0);
+ if (! x_had_errors_p (dpy) && pixc != None)
+ c = pixc;
XFreePixmap (dpy, pix);
}
return c;
}
-void
+static void
x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
struct x_output *x = f->output_data.x;
update_face_from_frame_parameter (f, Qmouse_color, arg);
}
-void
+static void
x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
unsigned long fore_pixel, pixel;
Note that this does not fully take effect if done before
F has an x-window. */
-void
+static void
x_set_border_pixel (struct frame *f, int pix)
{
unload_color (f, f->output_data.x->border_pixel);
Note: under X11, this is normally the province of the window manager,
and so emacs' border colors may be overridden. */
-void
+static void
x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
int pix;
}
-void
+static void
x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
{
set_frame_cursor_types (f, arg);
cursor_type_changed = 1;
}
\f
-void
+static void
x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
int result;
BLOCK_INPUT;
if (NILP (arg))
result = x_text_icon (f,
- (char *) SDATA ((!NILP (f->icon_name)
- ? f->icon_name
- : f->name)));
+ SSDATA ((!NILP (f->icon_name)
+ ? f->icon_name
+ : f->name)));
else
result = x_bitmap_icon (f, arg);
UNBLOCK_INPUT;
}
-void
+static void
x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
int result;
BLOCK_INPUT;
result = x_text_icon (f,
- (char *) SDATA ((!NILP (f->icon_name)
- ? f->icon_name
- : !NILP (f->title)
- ? f->title
- : f->name)));
+ SSDATA ((!NILP (f->icon_name)
+ ? f->icon_name
+ : !NILP (f->title)
+ ? f->title
+ : f->name)));
if (result)
{
isn't a valid color name, do nothing. OLDVAL is the old value of
the frame parameter. */
-void
+static void
x_set_scroll_bar_foreground (struct frame *f, Lisp_Object value, Lisp_Object oldval)
{
unsigned long pixel;
valid color name, do nothing. OLDVAL is the old value of the frame
parameter. */
-void
+static void
x_set_scroll_bar_background (struct frame *f, Lisp_Object value, Lisp_Object oldval)
{
unsigned long pixel;
#ifdef USE_GTK
gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- (char *) SDATA (encoded_name));
+ SSDATA (encoded_name));
#else /* not USE_GTK */
XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name,
FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
8, PropModeReplace,
- (char *) SDATA (encoded_name),
+ SDATA (encoded_name),
SBYTES (encoded_name));
#endif /* not USE_GTK */
FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name,
FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
8, PropModeReplace,
- (char *) SDATA (encoded_icon_name),
+ SDATA (encoded_icon_name),
SBYTES (encoded_icon_name));
if (do_free_icon_value)
suggesting a new name, which lisp code should override; if
F->explicit_name is set, ignore the new name; otherwise, set it. */
-void
+static void
x_set_name (struct frame *f, Lisp_Object name, int explicit)
{
/* Make sure that requests from lisp code override requests from
/* Check for no change needed in this very common case
before we do any consing. */
if (!strcmp (FRAME_X_DISPLAY_INFO (f)->x_id_name,
- SDATA (f->name)))
+ SSDATA (f->name)))
return;
name = build_string (FRAME_X_DISPLAY_INFO (f)->x_id_name);
}
/* This function should be called when the user's lisp code has
specified a name for the frame; the name will override any set by the
redisplay code. */
-void
+static void
x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
{
x_set_name (f, arg, 1);
/* Change the title of frame F to NAME.
If NAME is nil, use the frame name as the title. */
-void
+static void
x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
{
/* Don't change the title if it's already NAME. */
};
+#if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
/* Create an X fontset on frame F with base font name BASE_FONTNAME. */
-const char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*";
+static const char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*";
/* Create an Xt fontset spec from the name of a base font.
If `motif' is True use the Motif syntax. */
strcat (fontsetname, ":");
return fontsetname;
}
+#endif /* HAVE_X_WINDOWS && USE_X_TOOLKIT */
#ifdef DEBUG_XIC_FONTSET
static void
Elsewhere we specify the window name for the window manager. */
{
- char *str = (char *) SDATA (Vx_resource_name);
+ char *str = SSDATA (Vx_resource_name);
f->namebuf = (char *) xmalloc (strlen (str) + 1);
strcpy (f->namebuf, str);
}
{
int len;
char *tem, shell_position[32];
- Arg al[10];
- int ac = 0;
+ Arg gal[10];
+ int gac = 0;
int extra_borders = 0;
int menubar_size
= (f->output_data.x->menubar_widget
If Emacs had just one program position, we could set it in
fallback resources, but since each make-frame call can specify
different program positions, this is easier. */
- XtSetArg (al[ac], XtNx, left); ac++;
- XtSetArg (al[ac], XtNy, top); ac++;
+ XtSetArg (gal[gac], XtNx, left); gac++;
+ XtSetArg (gal[gac], XtNy, top); gac++;
}
}
when the frame is deleted. */
tem = (char *) xmalloc (len);
strncpy (tem, shell_position, len);
- XtSetArg (al[ac], XtNgeometry, tem); ac++;
- XtSetValues (shell_widget, al, ac);
+ XtSetArg (gal[gac], XtNgeometry, tem); gac++;
+ XtSetValues (shell_widget, gal, gac);
}
XtManageChild (pane_widget);
validate_x_resource_name ();
- class_hints.res_name = (char *) SDATA (Vx_resource_name);
- class_hints.res_class = (char *) SDATA (Vx_resource_class);
+ class_hints.res_name = SSDATA (Vx_resource_name);
+ class_hints.res_class = SSDATA (Vx_resource_class);
XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints);
#ifdef HAVE_X_I18N
#else /* not USE_X_TOOLKIT */
#ifdef USE_GTK
-void
+static void
x_window (FRAME_PTR f)
{
if (! xg_create_frame_widgets (f))
#else /*! USE_GTK */
/* Create and set up the X window for frame F. */
-void
+static void
x_window (struct frame *f)
{
XClassHint class_hints;
validate_x_resource_name ();
- class_hints.res_name = (char *) SDATA (Vx_resource_name);
- class_hints.res_class = (char *) SDATA (Vx_resource_class);
+ class_hints.res_name = SSDATA (Vx_resource_name);
+ class_hints.res_class = SSDATA (Vx_resource_class);
XSetClassHint (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &class_hints);
/* The menubar is part of the ordinary display;
: NormalState));
#endif
- x_text_icon (f, (char *) SDATA ((!NILP (f->icon_name)
- ? f->icon_name
- : f->name)));
+ x_text_icon (f, SSDATA ((!NILP (f->icon_name)
+ ? f->icon_name
+ : f->name)));
UNBLOCK_INPUT;
}
{
char *name = xstrdup (system_font);
font = font_open_by_name (f, name);
- free (name);
+ xfree (name);
}
}
static void
set_machine_and_pid_properties (struct frame *f)
{
- /* See the above comment "Note: Encoding strategy". */
- XTextProperty text;
- int bytes, stringp;
- int do_free_text_value = 0;
long pid = (long) getpid ();
- text.value = x_encode_text (Vsystem_name,
- Qcompound_text, 0, &bytes, &stringp,
- &do_free_text_value);
- text.encoding = (stringp ? XA_STRING
- : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
- text.format = 8;
- text.nitems = bytes;
- XSetWMClientMachine (FRAME_X_DISPLAY (f),
- FRAME_OUTER_WINDOW (f),
- &text);
- if (do_free_text_value)
- xfree (text.value);
-
+ /* This will set WM_CLIENT_MACHINE and WM_LOCALE_NAME. */
+ XSetWMProperties (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), NULL, NULL,
+ NULL, 0, NULL, NULL, NULL);
XChangeProperty (FRAME_X_DISPLAY (f),
FRAME_OUTER_WINDOW (f),
XInternAtom (FRAME_X_DISPLAY (f),
to get the color reference counts right, so initialize them! */
{
Lisp_Object black;
- struct gcpro gcpro1;
+ struct gcpro inner_gcpro1;
/* Function x_decode_color can signal an error. Make
sure to initialize color slots so that we won't try
f->output_data.x->mouse_pixel = -1;
black = build_string ("black");
- GCPRO1 (black);
+ GCPRO1_VAR (black, inner_gcpro);
FRAME_FOREGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
FRAME_BACKGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
f->output_data.x->mouse_pixel
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
- UNGCPRO;
+ UNGCPRO_VAR (inner_gcpro);
}
/* Specify the parent under which to make this X window. */
"background", "Background", RES_TYPE_STRING);
x_default_parameter (f, parms, Qmouse_color, build_string ("black"),
"pointerColor", "Foreground", RES_TYPE_STRING);
- x_default_parameter (f, parms, Qcursor_color, build_string ("black"),
- "cursorColor", "Foreground", RES_TYPE_STRING);
x_default_parameter (f, parms, Qborder_color, build_string ("black"),
"borderColor", "BorderColor", RES_TYPE_STRING);
x_default_parameter (f, parms, Qscreen_gamma, Qnil,
else if (! NILP (visibility))
x_make_frame_visible (f);
else
- /* Must have been Qnil. */
- ;
+ {
+ /* Must have been Qnil. */
+ }
}
BLOCK_INPUT;
-
+
/* Set machine name and pid for the purpose of window managers. */
set_machine_and_pid_properties(f);
/* Initialize `default-minibuffer-frame' in case this is the first
frame on this terminal. */
if (FRAME_HAS_MINIBUF_P (f)
- && (!FRAMEP (kb->Vdefault_minibuffer_frame)
- || !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))))
- kb->Vdefault_minibuffer_frame = frame;
+ && (!FRAMEP (KVAR (kb, Vdefault_minibuffer_frame))
+ || !FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame)))))
+ KVAR (kb, Vdefault_minibuffer_frame) = frame;
/* All remaining specified parameters, which have not been "used"
by x_get_arg and friends, now go in the misc. alist of the frame. */
\f
DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0,
- doc: /* Internal function called by `color-defined-p', which see. */)
+ doc: /* Internal function called by `color-defined-p', which see
+.\(Note that the Nextstep version of this function ignores FRAME.) */)
(Lisp_Object color, Lisp_Object frame)
{
XColor foo;
CHECK_STRING (color);
- if (x_defined_color (f, SDATA (color), &foo, 0))
+ if (x_defined_color (f, SSDATA (color), &foo, 0))
return Qt;
else
return Qnil;
CHECK_STRING (color);
- if (x_defined_color (f, SDATA (color), &foo, 0))
+ if (x_defined_color (f, SSDATA (color), &foo, 0))
return list3 (make_number (foo.red),
make_number (foo.green),
make_number (foo.blue));
return FRAME_LINE_HEIGHT (f);
}
-int
-x_screen_planes (register struct frame *f)
-{
- return FRAME_X_DISPLAY_INFO (f)->n_planes;
-}
-
\f
/************************************************************************
int i, class = -1;
XVisualInfo vinfo;
- strcpy (s, SDATA (value));
+ strcpy (s, SSDATA (value));
dash = strchr (s, '-');
if (dash)
{
/* Return the X display structure for the display named NAME.
Open a new connection if necessary. */
-struct x_display_info *
+static struct x_display_info *
x_display_info_for_name (Lisp_Object name)
{
Lisp_Object names;
validate_x_resource_name ();
dpyinfo = x_term_init (name, (char *)0,
- (char *) SDATA (Vx_resource_name));
+ SSDATA (Vx_resource_name));
if (dpyinfo == 0)
error ("Cannot connect to X server %s", SDATA (name));
DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection,
1, 3, 0,
- doc: /* Open a connection to an X server.
+ doc: /* Open a connection to a display server.
DISPLAY is the name of the display to connect to.
Optional second arg XRM-STRING is a string of resources in xrdb format.
If the optional third arg MUST-SUCCEED is non-nil,
-terminate Emacs if we can't open the connection. */)
+terminate Emacs if we can't open the connection.
+\(In the Nextstep version, the last two arguments are currently ignored.) */)
(Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed)
{
- unsigned char *xrm_option;
+ char *xrm_option;
struct x_display_info *dpyinfo;
CHECK_STRING (display);
#endif
if (! NILP (xrm_string))
- xrm_option = (unsigned char *) SDATA (xrm_string);
+ xrm_option = SSDATA (xrm_string);
else
- xrm_option = (unsigned char *) 0;
+ xrm_option = (char *) 0;
validate_x_resource_name ();
/* This is what opens the connection and sets x_current_display.
This also initializes many symbols, such as those used for input. */
dpyinfo = x_term_init (display, xrm_option,
- (char *) SDATA (Vx_resource_name));
+ SSDATA (Vx_resource_name));
if (dpyinfo == 0)
{
DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0,
doc: /* If ON is non-nil, report X errors as soon as the erring request is made.
+This function only has an effect on X Windows. With MS Windows, it is
+defined but does nothing.
+
If ON is nil, allow buffering of requests.
Turning on synchronization prohibits the Xlib routines from buffering
requests and seriously degrades performance, but makes debugging much
DEFUN ("x-change-window-property", Fx_change_window_property,
Sx_change_window_property, 2, 6, 0,
doc: /* Change window property PROP to VALUE on the X window of FRAME.
-PROP must be a string.
-VALUE may be a string or a list of conses, numbers and/or strings.
-If an element in the list is a string, it is converted to
-an Atom and the value of the Atom is used. If an element is a cons,
-it is converted to a 32 bit number where the car is the 16 top bits and the
-cdr is the lower 16 bits.
+PROP must be a string. VALUE may be a string or a list of conses,
+numbers and/or strings. If an element in the list is a string, it is
+converted to an atom and the value of the atom is used. If an element
+is a cons, it is converted to a 32 bit number where the car is the 16
+top bits and the cdr is the lower 16 bits.
+
FRAME nil or omitted means use the selected frame.
If TYPE is given and non-nil, it is the name of the type of VALUE.
If TYPE is not given or nil, the type is STRING.
It must be one of 8, 16 or 32.
If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8.
If OUTER_P is non-nil, the property is changed for the outer X window of
-FRAME. Default is to change on the edit X window.
-
-Value is VALUE. */)
+FRAME. Default is to change on the edit X window. */)
(Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p)
{
struct frame *f = check_x_frame (frame);
}
BLOCK_INPUT;
- prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False);
+ prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
if (! NILP (type))
{
CHECK_STRING (type);
- target_type = XInternAtom (FRAME_X_DISPLAY (f), SDATA (type), False);
+ target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
}
if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f);
CHECK_STRING (prop);
BLOCK_INPUT;
- prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False);
+ prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
XDeleteProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), prop_atom);
/* Make sure the property is removed when we return. */
1, 6, 0,
doc: /* Value is the value of window property PROP on FRAME.
If FRAME is nil or omitted, use the selected frame.
-If TYPE is nil or omitted, get the property as a string. Otherwise TYPE
-is the name of the Atom that denotes the type expected.
+
+On MS Windows, this function only accepts the PROP and FRAME arguments.
+
+On X Windows, the following optional arguments are also accepted:
+If TYPE is nil or omitted, get the property as a string.
+Otherwise TYPE is the name of the atom that denotes the type expected.
If SOURCE is non-nil, get the property on that window instead of from
FRAME. The number 0 denotes the root window.
If DELETE_P is non-nil, delete the property after retreiving it.
If VECTOR_RET_P is non-nil, don't return a string but a vector of values.
Value is nil if FRAME hasn't a property with name PROP or if PROP has
-no value of TYPE. */)
+no value of TYPE (always string in the MS Windows case). */)
(Lisp_Object prop, Lisp_Object frame, Lisp_Object type, Lisp_Object source, Lisp_Object delete_p, Lisp_Object vector_ret_p)
{
struct frame *f = check_x_frame (frame);
BLOCK_INPUT;
if (STRINGP (type))
{
- if (strcmp ("AnyPropertyType", SDATA (type)) == 0)
+ if (strcmp ("AnyPropertyType", SSDATA (type)) == 0)
target_type = AnyPropertyType;
else
- target_type = XInternAtom (FRAME_X_DISPLAY (f), SDATA (type), False);
+ target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
}
- prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False);
+ prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window,
prop_atom, 0, 0, False, target_type,
&actual_type, &actual_format, &actual_size,
}
if (NILP (vector_ret_p))
- prop_value = make_string (tmp_data, size);
+ prop_value = make_string ((char *) tmp_data, size);
else
prop_value = x_property_data_to_lisp (f,
tmp_data,
/* If non-nil, a timer started that hides the last tooltip when it
fires. */
-Lisp_Object tip_timer;
+static Lisp_Object tip_timer;
Window tip_window;
/* If non-nil, a vector of 3 elements containing the last args
with which x-show-tip was called. See there. */
-Lisp_Object last_show_tip_args;
-
-/* Maximum size for tooltips; a cons (COLUMNS . ROWS). */
-
-Lisp_Object Vx_max_tooltip_size;
+static Lisp_Object last_show_tip_args;
static Lisp_Object
Lisp_Object text)
{
struct frame *f;
- Lisp_Object frame, tem;
+ Lisp_Object frame;
Lisp_Object name;
- long window_prompting = 0;
int width, height;
int count = SPECPDL_INDEX ();
struct gcpro gcpro1, gcpro2, gcpro3;
Fset_window_buffer (FRAME_ROOT_WINDOW (f), buffer, Qnil);
old_buffer = current_buffer;
set_buffer_internal_1 (XBUFFER (buffer));
- current_buffer->truncate_lines = Qnil;
+ BVAR (current_buffer, truncate_lines) = Qnil;
specbind (Qinhibit_read_only, Qt);
specbind (Qinhibit_modification_hooks, Qt);
Ferase_buffer ();
to get the color reference counts right, so initialize them! */
{
Lisp_Object black;
- struct gcpro gcpro1;
+ struct gcpro inner_gcpro1;
/* Function x_decode_color can signal an error. Make
sure to initialize color slots so that we won't try
f->output_data.x->mouse_pixel = -1;
black = build_string ("black");
- GCPRO1 (black);
+ GCPRO1_VAR (black, inner_gcpro);
FRAME_FOREGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
FRAME_BACKGROUND_PIXEL (f)
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
f->output_data.x->mouse_pixel
= x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
- UNGCPRO;
+ UNGCPRO_VAR (inner_gcpro);
}
/* Set the name; the functions to which we pass f expect the name to
f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
- window_prompting = x_figure_window_size (f, parms, 0);
+ x_figure_window_size (f, parms, 0);
{
XSetWindowAttributes attrs;
Automatically hide the tooltip after TIMEOUT seconds. TIMEOUT nil
means use the default timeout of 5 seconds.
-If the list of frame parameters PARAMS contains a `left' parameters,
+If the list of frame parameters PARMS contains a `left' parameters,
the tooltip is displayed at that x-position. Otherwise it is
displayed at the mouse position, with offset DX added (default is 5 if
DX isn't specified). Likewise for the y-position; if a `top' frame
int root_x, root_y;
struct buffer *old_buffer;
struct text_pos pos;
- int i, width, height;
+ int i, width, height, seen_reversed_p;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
int old_windows_or_buffers_changed = windows_or_buffers_changed;
int count = SPECPDL_INDEX ();
#ifdef USE_GTK
if (x_gtk_use_system_tooltips)
{
- int ok;
+ int ok;
/* Hide a previous tip, if any. */
Fx_hide_tip ();
&& !NILP (Fequal (last_string, string))
&& !NILP (Fequal (last_parms, parms)))
{
- struct frame *f = XFRAME (tip_frame);
+ struct frame *tip_f = XFRAME (tip_frame);
/* Only DX and DY have changed. */
if (!NILP (tip_timer))
}
BLOCK_INPUT;
- compute_tip_xy (f, parms, dx, dy, FRAME_PIXEL_WIDTH (f),
- FRAME_PIXEL_HEIGHT (f), &root_x, &root_y);
- XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+ compute_tip_xy (tip_f, parms, dx, dy, FRAME_PIXEL_WIDTH (tip_f),
+ FRAME_PIXEL_HEIGHT (tip_f), &root_x, &root_y);
+ XMoveWindow (FRAME_X_DISPLAY (tip_f), FRAME_X_WINDOW (tip_f),
root_x, root_y);
UNBLOCK_INPUT;
goto start_timer;
/* Display the tooltip text in a temporary buffer. */
old_buffer = current_buffer;
set_buffer_internal_1 (XBUFFER (XWINDOW (FRAME_ROOT_WINDOW (f))->buffer));
- current_buffer->truncate_lines = Qnil;
+ BVAR (current_buffer, truncate_lines) = Qnil;
clear_glyph_matrix (w->desired_matrix);
clear_glyph_matrix (w->current_matrix);
SET_TEXT_POS (pos, BEGV, BEGV_BYTE);
try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHANGE);
/* Compute width and height of the tooltip. */
- width = height = 0;
+ width = height = seen_reversed_p = 0;
for (i = 0; i < w->desired_matrix->nrows; ++i)
{
struct glyph_row *row = &w->desired_matrix->rows[i];
row->full_width_p = 1;
row_width = row->pixel_width;
- /* There's a glyph at the end of rows that is used to place
- the cursor there. Don't include the width of this glyph. */
if (row->used[TEXT_AREA])
{
- last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1];
- if (INTEGERP (last->object))
- row_width -= last->pixel_width;
+ /* There's a glyph at the end of rows that is used to place
+ the cursor there. Don't include the width of this glyph. */
+ if (!row->reversed_p)
+ {
+ last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1];
+ if (INTEGERP (last->object))
+ row_width -= last->pixel_width;
+ }
+ else
+ {
+ /* There could be a stretch glyph at the beginning of R2L
+ rows that is produced by extend_face_to_end_of_line.
+ Don't count that glyph. */
+ struct glyph *g = row->glyphs[TEXT_AREA];
+
+ if (g->type == STRETCH_GLYPH && INTEGERP (g->object))
+ {
+ row_width -= g->pixel_width;
+ seen_reversed_p = 1;
+ }
+ }
}
height += row->height;
width = max (width, row_width);
}
+ /* If we've seen partial-length R2L rows, we need to re-adjust the
+ tool-tip frame width and redisplay it again, to avoid over-wide
+ tips due to the stretch glyph that extends R2L lines to full
+ width of the frame. */
+ if (seen_reversed_p)
+ {
+ /* w->total_cols and FRAME_TOTAL_COLS want the width in columns,
+ not in pixels. */
+ width /= WINDOW_FRAME_COLUMN_WIDTH (w);
+ w->total_cols = make_number (width);
+ FRAME_TOTAL_COLS (f) = width;
+ adjust_glyphs (f);
+ clear_glyph_matrix (w->desired_matrix);
+ clear_glyph_matrix (w->current_matrix);
+ try_window (FRAME_ROOT_WINDOW (f), pos, 0);
+ width = height = 0;
+ /* Recompute width and height of the tooltip. */
+ for (i = 0; i < w->desired_matrix->nrows; ++i)
+ {
+ struct glyph_row *row = &w->desired_matrix->rows[i];
+ struct glyph *last;
+ int row_width;
+
+ if (!row->enabled_p || !row->displays_text_p)
+ break;
+ row->full_width_p = 1;
+ row_width = row->pixel_width;
+ if (row->used[TEXT_AREA] && !row->reversed_p)
+ {
+ last = &row->glyphs[TEXT_AREA][row->used[TEXT_AREA] - 1];
+ if (INTEGERP (last->object))
+ row_width -= last->pixel_width;
+ }
+
+ height += row->height;
+ width = max (width, row_width);
+ }
+ }
+
/* Add the frame's internal border to the width and height the X
window should have. */
height += 2 * FRAME_INTERNAL_BORDER_WIDTH (f);
int count;
Lisp_Object deleted, frame, timer;
struct gcpro gcpro1, gcpro2;
- struct frame *f;
/* Return quickly if nothing to do. */
if (NILP (tip_timer) && NILP (tip_frame))
call1 (Qcancel_timer, timer);
#ifdef USE_GTK
- /* When using system tooltip, tip_frame is the Emacs frame on which
- the tip is shown. */
- f = XFRAME (frame);
- if (FRAME_LIVE_P (f) && xg_hide_tooltip (f))
- frame = Qnil;
+ {
+ /* When using system tooltip, tip_frame is the Emacs frame on which
+ the tip is shown. */
+ struct frame *f = XFRAME (frame);
+ if (FRAME_LIVE_P (f) && xg_hide_tooltip (f))
+ frame = Qnil;
+ }
#endif
if (FRAMEP (frame))
items is unmapped. Redisplay the menu manually... */
{
Widget w;
- f = SELECTED_FRAME ();
+ struct frame *f = SELECTED_FRAME ();
w = f->output_data.x->menubar_widget;
if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen)
/* Callback for "OK" and "Cancel" on file selection dialog. */
static void
-file_dialog_cb (widget, client_data, call_data)
- Widget widget;
- XtPointer call_data, client_data;
+file_dialog_cb (Widget widget, XtPointer client_data, XtPointer call_data)
{
int *result = (int *) client_data;
XmAnyCallbackStruct *cb = (XmAnyCallbackStruct *) call_data;
in this case. */
static void
-file_dialog_unmap_cb (widget, client_data, call_data)
- Widget widget;
- XtPointer call_data, client_data;
+file_dialog_unmap_cb (Widget widget, XtPointer client_data, XtPointer call_data)
{
int *result = (int *) client_data;
*result = XmCR_CANCEL;
}
static Lisp_Object
-clean_up_file_dialog (arg)
- Lisp_Object arg;
+clean_up_file_dialog (Lisp_Object arg)
{
struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
Widget dialog = (Widget) p->pointer;
doc: /* Read file name, prompting with PROMPT in directory DIR.
Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file
selection box, if specified. If MUSTMATCH is non-nil, the returned file
-or directory must exist. ONLY-DIR-P is ignored." */)
+or directory must exist.
+
+This function is only defined on MS Windows, and X Windows with the
+Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored.
+Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */)
(Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p)
{
int result;
/* Get the result. */
if (result == XmCR_OK)
{
- XmString text;
+ XmString text_string;
String data;
- XtVaGetValues (dialog, XmNtextString, &text, NULL);
- XmStringGetLtoR (text, XmFONTLIST_DEFAULT_TAG, &data);
- XmStringFree (text);
+ XtVaGetValues (dialog, XmNtextString, &text_string, NULL);
+ XmStringGetLtoR (text_string, XmFONTLIST_DEFAULT_TAG, &data);
+ XmStringFree (text_string);
file = build_string (data);
XtFree (data);
}
doc: /* Read file name, prompting with PROMPT in directory DIR.
Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file
selection box, if specified. If MUSTMATCH is non-nil, the returned file
-or directory must exist. If ONLY-DIR-P is non-nil, the user can only select
-directories. */)
+or directory must exist.
+
+This function is only defined on MS Windows, and X Windows with the
+Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored.
+Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */)
(Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p)
{
FRAME_PTR f = SELECTED_FRAME ();
BLOCK_INPUT;
if (STRINGP (default_filename))
- cdef_file = SDATA (default_filename);
+ cdef_file = SSDATA (default_filename);
else
- cdef_file = SDATA (dir);
+ cdef_file = SSDATA (dir);
- fn = xg_get_file_name (f, SDATA (prompt), cdef_file,
+ fn = xg_get_file_name (f, SSDATA (prompt), cdef_file,
! NILP (mustmatch),
! NILP (only_dir_p));
XSETFONT (font, FRAME_FONT (f));
font_param = Ffont_get (font, intern (":name"));
if (STRINGP (font_param))
- default_name = xstrdup (SDATA (font_param));
+ default_name = xstrdup (SSDATA (font_param));
else
{
font_param = Fframe_parameter (frame, Qfont_param);
if (STRINGP (font_param))
- default_name = xstrdup (SDATA (font_param));
+ default_name = xstrdup (SSDATA (font_param));
}
if (default_name == NULL && x_last_font_name != NULL)
struct frame *f = check_x_frame (frame);
Display *dpy = FRAME_X_DISPLAY (f);
Lisp_Object have_keys;
- int major, minor, op, event, error;
+ int major, minor, op, event, error_code;
BLOCK_INPUT;
/* Check that the server supports XKB. */
major = XkbMajorVersion;
minor = XkbMinorVersion;
- if (!XkbQueryExtension (dpy, &op, &event, &error, &major, &minor))
+ if (!XkbQueryExtension (dpy, &op, &event, &error_code, &major, &minor))
{
UNBLOCK_INPUT;
return Qlambda;
Fput (Qundefined_color, Qerror_message,
make_pure_c_string ("Undefined color"));
- DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape,
+ DEFVAR_LISP ("x-pointer-shape", Vx_pointer_shape,
doc: /* The shape of the pointer when over text.
Changing the value does not affect existing frames
unless you set the mouse color. */);
Vx_pointer_shape = Qnil;
#if 0 /* This doesn't really do anything. */
- DEFVAR_LISP ("x-nontext-pointer-shape", &Vx_nontext_pointer_shape,
+ DEFVAR_LISP ("x-nontext-pointer-shape", Vx_nontext_pointer_shape,
doc: /* The shape of the pointer when not over text.
This variable takes effect when you create a new frame
or when you set the mouse color. */);
#endif
Vx_nontext_pointer_shape = Qnil;
- DEFVAR_LISP ("x-hourglass-pointer-shape", &Vx_hourglass_pointer_shape,
+ DEFVAR_LISP ("x-hourglass-pointer-shape", Vx_hourglass_pointer_shape,
doc: /* The shape of the pointer when Emacs is busy.
This variable takes effect when you create a new frame
or when you set the mouse color. */);
Vx_hourglass_pointer_shape = Qnil;
#if 0 /* This doesn't really do anything. */
- DEFVAR_LISP ("x-mode-pointer-shape", &Vx_mode_pointer_shape,
+ DEFVAR_LISP ("x-mode-pointer-shape", Vx_mode_pointer_shape,
doc: /* The shape of the pointer when over the mode line.
This variable takes effect when you create a new frame
or when you set the mouse color. */);
Vx_mode_pointer_shape = Qnil;
DEFVAR_LISP ("x-sensitive-text-pointer-shape",
- &Vx_sensitive_text_pointer_shape,
+ Vx_sensitive_text_pointer_shape,
doc: /* The shape of the pointer when over mouse-sensitive text.
This variable takes effect when you create a new frame
or when you set the mouse color. */);
Vx_sensitive_text_pointer_shape = Qnil;
DEFVAR_LISP ("x-window-horizontal-drag-cursor",
- &Vx_window_horizontal_drag_shape,
+ Vx_window_horizontal_drag_shape,
doc: /* Pointer shape to use for indicating a window can be dragged horizontally.
This variable takes effect when you create a new frame
or when you set the mouse color. */);
Vx_window_horizontal_drag_shape = Qnil;
- DEFVAR_LISP ("x-cursor-fore-pixel", &Vx_cursor_fore_pixel,
+ DEFVAR_LISP ("x-cursor-fore-pixel", Vx_cursor_fore_pixel,
doc: /* A string indicating the foreground color of the cursor box. */);
Vx_cursor_fore_pixel = Qnil;
- DEFVAR_LISP ("x-max-tooltip-size", &Vx_max_tooltip_size,
+ DEFVAR_LISP ("x-max-tooltip-size", Vx_max_tooltip_size,
doc: /* Maximum size for tooltips.
Value is a pair (COLUMNS . ROWS). Text larger than this is clipped. */);
Vx_max_tooltip_size = Fcons (make_number (80), make_number (40));
- DEFVAR_LISP ("x-no-window-manager", &Vx_no_window_manager,
+ DEFVAR_LISP ("x-no-window-manager", Vx_no_window_manager,
doc: /* Non-nil if no X window manager is in use.
Emacs doesn't try to figure this out; this is always nil
unless you set it to something else. */);
Vx_no_window_manager = Qnil;
DEFVAR_LISP ("x-pixel-size-width-font-regexp",
- &Vx_pixel_size_width_font_regexp,
+ Vx_pixel_size_width_font_regexp,
doc: /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'.
Since Emacs gets width of a font matching with this regexp from
Vx_pixel_size_width_font_regexp = Qnil;
/* This is not ifdef:ed, so other builds than GTK can customize it. */
- DEFVAR_BOOL ("x-gtk-use-old-file-dialog", &x_gtk_use_old_file_dialog,
+ DEFVAR_BOOL ("x-gtk-use-old-file-dialog", x_gtk_use_old_file_dialog,
doc: /* *Non-nil means prompt with the old GTK file selection dialog.
If nil or if the file selection dialog is not available, the new GTK file
chooser is used instead. To turn off all file dialogs set the
variable `use-file-dialog'. */);
x_gtk_use_old_file_dialog = 0;
- DEFVAR_BOOL ("x-gtk-show-hidden-files", &x_gtk_show_hidden_files,
+ DEFVAR_BOOL ("x-gtk-show-hidden-files", x_gtk_show_hidden_files,
doc: /* *If non-nil, the GTK file chooser will by default show hidden files.
Note that this is just the default, there is a toggle button on the file
chooser to show or not show hidden files on a case by case basis. */);
x_gtk_show_hidden_files = 0;
- DEFVAR_BOOL ("x-gtk-file-dialog-help-text", &x_gtk_file_dialog_help_text,
+ DEFVAR_BOOL ("x-gtk-file-dialog-help-text", x_gtk_file_dialog_help_text,
doc: /* *If non-nil, the GTK file chooser will show additional help text.
If more space for files in the file chooser dialog is wanted, set this to nil
to turn the additional text off. */);
x_gtk_file_dialog_help_text = 1;
- DEFVAR_BOOL ("x-gtk-whole-detached-tool-bar", &x_gtk_whole_detached_tool_bar,
+ DEFVAR_BOOL ("x-gtk-whole-detached-tool-bar", x_gtk_whole_detached_tool_bar,
doc: /* *If non-nil, a detached tool bar is shown in full.
The default is to just show an arrow and pressing on that arrow shows
the tool bar buttons. */);
x_gtk_whole_detached_tool_bar = 0;
- DEFVAR_BOOL ("x-gtk-use-system-tooltips", &x_gtk_use_system_tooltips,
+ DEFVAR_BOOL ("x-gtk-use-system-tooltips", x_gtk_use_system_tooltips,
doc: /* *If non-nil with a Gtk+ built Emacs, the Gtk+ toolip is used.
Otherwise use Emacs own tooltip implementation.
When using Gtk+ tooltips, the tooltip face is not used. */);
#ifdef USE_MOTIF
Fprovide (intern_c_string ("motif"), Qnil);
- DEFVAR_LISP ("motif-version-string", &Vmotif_version_string,
+ DEFVAR_LISP ("motif-version-string", Vmotif_version_string,
doc: /* Version info for LessTif/Motif. */);
Vmotif_version_string = build_string (XmVERSION_STRING);
#endif /* USE_MOTIF */
Fprovide (intern_c_string ("gtk"), Qnil);
Fprovide (intern_c_string ("move-toolbar"), Qnil);
- DEFVAR_LISP ("gtk-version-string", &Vgtk_version_string,
+ DEFVAR_LISP ("gtk-version-string", Vgtk_version_string,
doc: /* Version info for GTK+. */);
{
char gtk_version[40];
}
#endif /* HAVE_X_WINDOWS */
-
-/* arch-tag: 55040d02-5485-4d58-8b22-95a7a05f3288
- (do not change this comment) */