aboutsummaryrefslogtreecommitdiffstats
path: root/src/xsettings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xsettings.c')
-rw-r--r--src/xsettings.c49
1 files changed, 14 insertions, 35 deletions
diff --git a/src/xsettings.c b/src/xsettings.c
index 2760e48fe05..e8aba9ef2d8 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -54,9 +54,7 @@ static GConfClient *gconf_client;
54 54
55 55
56static void 56static void
57store_config_changed_event (arg, display_name) 57store_config_changed_event (Lisp_Object arg, Lisp_Object display_name)
58 Lisp_Object arg;
59 Lisp_Object display_name;
60{ 58{
61 struct input_event event; 59 struct input_event event;
62 EVENT_INIT (event); 60 EVENT_INIT (event);
@@ -102,11 +100,7 @@ struct xsettings
102 that is SYSTEM_MONO_FONT. */ 100 that is SYSTEM_MONO_FONT. */
103 101
104static void 102static void
105something_changedCB (client, cnxn_id, entry, user_data) 103something_changedCB (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
106 GConfClient *client;
107 guint cnxn_id;
108 GConfEntry *entry;
109 gpointer user_data;
110{ 104{
111 GConfValue *v = gconf_entry_get_value (entry); 105 GConfValue *v = gconf_entry_get_value (entry);
112 106
@@ -156,8 +150,7 @@ something_changedCB (client, cnxn_id, entry, user_data)
156/* Find the window that contains the XSETTINGS property values. */ 150/* Find the window that contains the XSETTINGS property values. */
157 151
158static void 152static void
159get_prop_window (dpyinfo) 153get_prop_window (struct x_display_info *dpyinfo)
160 struct x_display_info *dpyinfo;
161{ 154{
162 Display *dpy = dpyinfo->display; 155 Display *dpy = dpyinfo->display;
163 156
@@ -229,10 +222,7 @@ get_prop_window (dpyinfo)
229*/ 222*/
230 223
231static int 224static int
232parse_settings (prop, bytes, settings) 225parse_settings (unsigned char *prop, long unsigned int bytes, struct xsettings *settings)
233 unsigned char *prop;
234 unsigned long bytes;
235 struct xsettings *settings;
236{ 226{
237 Lisp_Object byteorder = Fbyteorder (); 227 Lisp_Object byteorder = Fbyteorder ();
238 int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst; 228 int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst;
@@ -402,9 +392,7 @@ parse_settings (prop, bytes, settings)
402} 392}
403 393
404static int 394static int
405read_settings (dpyinfo, settings) 395read_settings (struct x_display_info *dpyinfo, struct xsettings *settings)
406 struct x_display_info *dpyinfo;
407 struct xsettings *settings;
408{ 396{
409 long long_len; 397 long long_len;
410 Atom act_type; 398 Atom act_type;
@@ -435,10 +423,7 @@ read_settings (dpyinfo, settings)
435 423
436 424
437static void 425static void
438apply_xft_settings (dpyinfo, send_event_p, settings) 426apply_xft_settings (struct x_display_info *dpyinfo, int send_event_p, struct xsettings *settings)
439 struct x_display_info *dpyinfo;
440 int send_event_p;
441 struct xsettings *settings;
442{ 427{
443#ifdef HAVE_XFT 428#ifdef HAVE_XFT
444 FcPattern *pat; 429 FcPattern *pat;
@@ -546,9 +531,7 @@ apply_xft_settings (dpyinfo, send_event_p, settings)
546} 531}
547 532
548static void 533static void
549read_and_apply_settings (dpyinfo, send_event_p) 534read_and_apply_settings (struct x_display_info *dpyinfo, int send_event_p)
550 struct x_display_info *dpyinfo;
551 int send_event_p;
552{ 535{
553 struct xsettings settings; 536 struct xsettings settings;
554 Lisp_Object dpyname = XCAR (dpyinfo->name_list_element); 537 Lisp_Object dpyname = XCAR (dpyinfo->name_list_element);
@@ -592,9 +575,7 @@ read_and_apply_settings (dpyinfo, send_event_p)
592} 575}
593 576
594void 577void
595xft_settings_event (dpyinfo, event) 578xft_settings_event (struct x_display_info *dpyinfo, XEvent *event)
596 struct x_display_info *dpyinfo;
597 XEvent *event;
598{ 579{
599 int check_window_p = 0; 580 int check_window_p = 0;
600 int apply_settings = 0; 581 int apply_settings = 0;
@@ -636,7 +617,7 @@ xft_settings_event (dpyinfo, event)
636 617
637 618
638static void 619static void
639init_gconf () 620init_gconf (void)
640{ 621{
641#if defined (HAVE_GCONF) && defined (HAVE_XFT) 622#if defined (HAVE_GCONF) && defined (HAVE_XFT)
642 int i; 623 int i;
@@ -669,8 +650,7 @@ init_gconf ()
669} 650}
670 651
671static void 652static void
672init_xsettings (dpyinfo) 653init_xsettings (struct x_display_info *dpyinfo)
673 struct x_display_info *dpyinfo;
674{ 654{
675 char sel[64]; 655 char sel[64];
676 Display *dpy = dpyinfo->display; 656 Display *dpy = dpyinfo->display;
@@ -696,8 +676,7 @@ init_xsettings (dpyinfo)
696} 676}
697 677
698void 678void
699xsettings_initialize (dpyinfo) 679xsettings_initialize (struct x_display_info *dpyinfo)
700 struct x_display_info *dpyinfo;
701{ 680{
702 if (first_dpyinfo == NULL) first_dpyinfo = dpyinfo; 681 if (first_dpyinfo == NULL) first_dpyinfo = dpyinfo;
703 init_gconf (); 682 init_gconf ();
@@ -705,13 +684,13 @@ xsettings_initialize (dpyinfo)
705} 684}
706 685
707const char * 686const char *
708xsettings_get_system_font () 687xsettings_get_system_font (void)
709{ 688{
710 return current_mono_font; 689 return current_mono_font;
711} 690}
712 691
713const char * 692const char *
714xsettings_get_system_normal_font () 693xsettings_get_system_normal_font (void)
715{ 694{
716 return current_font; 695 return current_font;
717} 696}
@@ -755,7 +734,7 @@ known style. Otherwise return image. */)
755} 734}
756 735
757void 736void
758syms_of_xsettings () 737syms_of_xsettings (void)
759{ 738{
760 current_mono_font = NULL; 739 current_mono_font = NULL;
761 current_font = NULL; 740 current_font = NULL;