-/* Functions for handle font and other changes dynamically.
- Copyright (C) 2009, 2010
- Free Software Foundation, Inc.
+/* Functions for handling font and other changes dynamically.
+
+Copyright (C) 2009-2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
static struct x_display_info *first_dpyinfo;
static Lisp_Object Qmonospace_font_name, Qfont_name, Qfont_render,
Qtool_bar_style;
-static int use_system_font;
-static Lisp_Object Vxft_settings;
static Lisp_Object current_tool_bar_style;
#ifdef HAVE_GCONF
#if defined (HAVE_GCONF) && defined (HAVE_XFT)
char *s;
+#ifdef HAVE_G_TYPE_INIT
g_type_init ();
+#endif
gconf_client = gconf_client_get_default ();
s = gconf_client_get_string (gconf_client, SYSTEM_MONO_FONT, NULL);
if (s)
static void
init_xsettings (struct x_display_info *dpyinfo)
{
- char sel[64];
Display *dpy = dpyinfo->display;
BLOCK_INPUT;
- sprintf (sel, "_XSETTINGS_S%d", XScreenNumberOfScreen (dpyinfo->screen));
- dpyinfo->Xatom_xsettings_sel = XInternAtom (dpy, sel, False);
- dpyinfo->Xatom_xsettings_prop = XInternAtom (dpy,
- "_XSETTINGS_SETTINGS",
- False);
- dpyinfo->Xatom_xsettings_mgr = XInternAtom (dpy, "MANAGER", False);
-
/* Select events so we can detect client messages sent when selection
owner changes. */
XSelectInput (dpy, dpyinfo->root_window, StructureNotifyMask);
Sfont_get_system_normal_font,
0, 0, 0,
doc: /* Get the system default application font. */)
- ()
+ (void)
{
return current_font
? make_string (current_font, strlen (current_font))
DEFUN ("font-get-system-font", Ffont_get_system_font, Sfont_get_system_font,
0, 0, 0,
doc: /* Get the system default fixed width font. */)
- ()
+ (void)
{
return current_mono_font
? make_string (current_mono_font, strlen (current_mono_font))
doc: /* Get the system tool bar style.
If no system tool bar style is known, return `tool-bar-style' if set to a
known style. Otherwise return image. */)
- ()
+ (void)
{
if (EQ (Vtool_bar_style, Qimage)
|| EQ (Vtool_bar_style, Qtext)
|| EQ (Vtool_bar_style, Qboth)
- || EQ (Vtool_bar_style, Qboth_horiz))
+ || EQ (Vtool_bar_style, Qboth_horiz)
+ || EQ (Vtool_bar_style, Qtext_image_horiz))
return Vtool_bar_style;
if (!NILP (current_tool_bar_style))
return current_tool_bar_style;
defsubr (&Sfont_get_system_font);
defsubr (&Sfont_get_system_normal_font);
- DEFVAR_BOOL ("font-use-system-font", &use_system_font,
+ DEFVAR_BOOL ("font-use-system-font", use_system_font,
doc: /* *Non-nil means to apply the system defined font dynamically.
When this is non-nil and the system defined fixed width font changes, we
update frames dynamically.
If this variable is nil, Emacs ignores system font changes. */);
use_system_font = 0;
- DEFVAR_LISP ("xft-settings", &Vxft_settings,
+ DEFVAR_LISP ("xft-settings", Vxft_settings,
doc: /* Font settings applied to Xft. */);
Vxft_settings = make_string ("", 0);
Fprovide (intern_c_string ("dynamic-setting"), Qnil);
}
-/* arch-tag: 541716ed-2e6b-42e1-8212-3197e01ea61d
- (do not change this comment) */