diff options
| author | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
| commit | 971de7fb158335fbda39525feb2d7776a26bc030 (patch) | |
| tree | 605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/xsettings.c | |
| parent | b8463cbfbe2c5183cf40772df2746e58b787ddeb (diff) | |
| download | emacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip | |
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C.
* src/atimer.c:
* src/bidi.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/ccl.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/doprnt.c:
* src/ecrt0.c:
* src/editfns.c:
* src/fileio.c:
* src/filelock.c:
* src/filemode.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/ftfont.c:
* src/ftxfont.c:
* src/gtkutil.c:
* src/indent.c:
* src/insdel.c:
* src/intervals.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/md5.c:
* src/menu.c:
* src/minibuf.c:
* src/prefix-args.c:
* src/print.c:
* src/ralloc.c:
* src/regex.c:
* src/region-cache.c:
* src/scroll.c:
* src/search.c:
* src/sound.c:
* src/strftime.c:
* src/syntax.c:
* src/sysdep.c:
* src/termcap.c:
* src/terminal.c:
* src/terminfo.c:
* src/textprop.c:
* src/tparam.c:
* src/undo.c:
* src/unexelf.c:
* src/window.c:
* src/xfaces.c:
* src/xfns.c:
* src/xfont.c:
* src/xftfont.c:
* src/xgselect.c:
* src/xmenu.c:
* src/xrdb.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c:
* src/xterm.c: Likewise.
Diffstat (limited to 'src/xsettings.c')
| -rw-r--r-- | src/xsettings.c | 49 |
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 | ||
| 56 | static void | 56 | static void |
| 57 | store_config_changed_event (arg, display_name) | 57 | store_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 | ||
| 104 | static void | 102 | static void |
| 105 | something_changedCB (client, cnxn_id, entry, user_data) | 103 | something_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 | ||
| 158 | static void | 152 | static void |
| 159 | get_prop_window (dpyinfo) | 153 | get_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 | ||
| 231 | static int | 224 | static int |
| 232 | parse_settings (prop, bytes, settings) | 225 | parse_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 | ||
| 404 | static int | 394 | static int |
| 405 | read_settings (dpyinfo, settings) | 395 | read_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 | ||
| 437 | static void | 425 | static void |
| 438 | apply_xft_settings (dpyinfo, send_event_p, settings) | 426 | apply_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 | ||
| 548 | static void | 533 | static void |
| 549 | read_and_apply_settings (dpyinfo, send_event_p) | 534 | read_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 | ||
| 594 | void | 577 | void |
| 595 | xft_settings_event (dpyinfo, event) | 578 | xft_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 | ||
| 638 | static void | 619 | static void |
| 639 | init_gconf () | 620 | init_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 | ||
| 671 | static void | 652 | static void |
| 672 | init_xsettings (dpyinfo) | 653 | init_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 | ||
| 698 | void | 678 | void |
| 699 | xsettings_initialize (dpyinfo) | 679 | xsettings_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 | ||
| 707 | const char * | 686 | const char * |
| 708 | xsettings_get_system_font () | 687 | xsettings_get_system_font (void) |
| 709 | { | 688 | { |
| 710 | return current_mono_font; | 689 | return current_mono_font; |
| 711 | } | 690 | } |
| 712 | 691 | ||
| 713 | const char * | 692 | const char * |
| 714 | xsettings_get_system_normal_font () | 693 | xsettings_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 | ||
| 757 | void | 736 | void |
| 758 | syms_of_xsettings () | 737 | syms_of_xsettings (void) |
| 759 | { | 738 | { |
| 760 | current_mono_font = NULL; | 739 | current_mono_font = NULL; |
| 761 | current_font = NULL; | 740 | current_font = NULL; |