Mercurial > hg > xemacs-beta
comparison src/faces.c @ 462:0784d089fdc9 r21-2-46
Import from CVS: tag r21-2-46
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:44:37 +0200 |
parents | 1ccc32a20af4 |
children | 183866b06e0b |
comparison
equal
deleted
inserted
replaced
461:120ed4009e51 | 462:0784d089fdc9 |
---|---|
1940 someone provides invalid values for the global specifications. */ | 1940 someone provides invalid values for the global specifications. */ |
1941 | 1941 |
1942 { | 1942 { |
1943 Lisp_Object fg_fb = Qnil, bg_fb = Qnil; | 1943 Lisp_Object fg_fb = Qnil, bg_fb = Qnil; |
1944 | 1944 |
1945 #ifdef HAVE_GTK | |
1946 fg_fb = acons (list1 (Qgtk), build_string ("black"), fg_fb); | |
1947 bg_fb = acons (list1 (Qgtk), build_string ("white"), bg_fb); | |
1948 #endif | |
1945 #ifdef HAVE_X_WINDOWS | 1949 #ifdef HAVE_X_WINDOWS |
1946 fg_fb = acons (list1 (Qx), build_string ("black"), fg_fb); | 1950 fg_fb = acons (list1 (Qx), build_string ("black"), fg_fb); |
1947 bg_fb = acons (list1 (Qx), build_string ("white"), bg_fb); | 1951 bg_fb = acons (list1 (Qx), build_string ("white"), bg_fb); |
1948 #endif | 1952 #endif |
1949 #ifdef HAVE_TTY | 1953 #ifdef HAVE_TTY |
1962 | 1966 |
1963 /* #### We may want to have different fallback values if NeXTstep | 1967 /* #### We may want to have different fallback values if NeXTstep |
1964 support is compiled in. */ | 1968 support is compiled in. */ |
1965 { | 1969 { |
1966 Lisp_Object inst_list = Qnil; | 1970 Lisp_Object inst_list = Qnil; |
1967 #ifdef HAVE_X_WINDOWS | 1971 |
1972 #if defined(HAVE_X_WINDOWS) || defined(HAVE_GTK) | |
1973 /* This is kind of ugly because stephen wanted this to be CPP | |
1974 ** identical to the old version, at least for the initial | |
1975 ** checkin | |
1976 ** | |
1977 ** WMP March 9, 2001 | |
1978 */ | |
1979 | |
1968 /* The same gory list from x-faces.el. | 1980 /* The same gory list from x-faces.el. |
1969 (#### Perhaps we should remove the stuff from x-faces.el | 1981 (#### Perhaps we should remove the stuff from x-faces.el |
1970 and only depend on this stuff here? That should work.) | 1982 and only depend on this stuff here? That should work.) |
1971 */ | 1983 */ |
1972 const char *fonts[] = | 1984 const char *fonts[] = |
1987 "-*-*-*-*-*-*-*-120-*-*-*-*-*-*", | 1999 "-*-*-*-*-*-*-*-120-*-*-*-*-*-*", |
1988 "*" | 2000 "*" |
1989 }; | 2001 }; |
1990 const char **fontptr; | 2002 const char **fontptr; |
1991 | 2003 |
2004 #ifdef HAVE_X_WINDOWS | |
1992 for (fontptr = fonts + countof(fonts) - 1; fontptr >= fonts; fontptr--) | 2005 for (fontptr = fonts + countof(fonts) - 1; fontptr >= fonts; fontptr--) |
1993 inst_list = Fcons (Fcons (list1 (Qx), build_string (*fontptr)), | 2006 inst_list = Fcons (Fcons (list1 (Qx), build_string (*fontptr)), |
1994 inst_list); | 2007 inst_list); |
1995 #endif /* HAVE_X_WINDOWS */ | 2008 #endif /* HAVE_X_WINDOWS */ |
2009 | |
2010 #ifdef HAVE_GTK | |
2011 for (fontptr = fonts + countof(fonts) - 1; fontptr >= fonts; fontptr--) | |
2012 inst_list = Fcons (Fcons (list1 (Qgtk), build_string (*fontptr)), | |
2013 inst_list); | |
2014 #endif /* HAVE_GTK */ | |
2015 #endif /* HAVE_X_WINDOWS || HAVE_GTK */ | |
2016 | |
1996 | 2017 |
1997 #ifdef HAVE_TTY | 2018 #ifdef HAVE_TTY |
1998 inst_list = Fcons (Fcons (list1 (Qtty), build_string ("normal")), | 2019 inst_list = Fcons (Fcons (list1 (Qtty), build_string ("normal")), |
1999 inst_list); | 2020 inst_list); |
2000 #endif /* HAVE_TTY */ | 2021 #endif /* HAVE_TTY */ |
2001 #ifdef HAVE_MS_WINDOWS | 2022 #ifdef HAVE_MS_WINDOWS |
2002 /* Fixedsys does not exist for printers */ | 2023 /* Fixedsys does not exist for printers */ |
2003 inst_list = Fcons (Fcons (list1 (Qmsprinter), | 2024 inst_list = Fcons (Fcons (list1 (Qmsprinter), |
2004 build_string ("Courier:Regular:10::Western")), inst_list); | 2025 build_string ("Courier:Regular:10::Western")), inst_list); |
2005 inst_list = Fcons (Fcons (list1 (Qmsprinter), | 2026 inst_list = Fcons (Fcons (list1 (Qmsprinter), |
2006 build_string ("Courier New:Regular:10::Western")), inst_list); | 2027 build_string ("Courier New:Regular:10::Western")), inst_list); |
2007 | 2028 |
2008 inst_list = Fcons (Fcons (list1 (Qmswindows), | 2029 inst_list = Fcons (Fcons (list1 (Qmswindows), |
2009 build_string ("Fixedsys:Regular:9::Western")), inst_list); | 2030 build_string ("Fixedsys:Regular:9::Western")), inst_list); |
2010 inst_list = Fcons (Fcons (list1 (Qmswindows), | 2031 inst_list = Fcons (Fcons (list1 (Qmswindows), |
2011 build_string ("Courier:Regular:10::Western")), inst_list); | 2032 build_string ("Courier:Regular:10::Western")), inst_list); |
2012 inst_list = Fcons (Fcons (list1 (Qmswindows), | 2033 inst_list = Fcons (Fcons (list1 (Qmswindows), |
2013 build_string ("Courier New:Regular:10::Western")), inst_list); | 2034 build_string ("Courier New:Regular:10::Western")), inst_list); |
2014 #endif /* HAVE_MS_WINDOWS */ | 2035 #endif /* HAVE_MS_WINDOWS */ |
2015 set_specifier_fallback (Fget (Vdefault_face, Qfont, Qnil), inst_list); | 2036 set_specifier_fallback (Fget (Vdefault_face, Qfont, Qnil), inst_list); |
2016 } | 2037 } |
2017 | 2038 |
2018 set_specifier_fallback (Fget (Vdefault_face, Qunderline, Qnil), | 2039 set_specifier_fallback (Fget (Vdefault_face, Qunderline, Qnil), |
2037 /* Provide some last-resort fallbacks for gui-element face which | 2058 /* Provide some last-resort fallbacks for gui-element face which |
2038 mustn't default to default. */ | 2059 mustn't default to default. */ |
2039 { | 2060 { |
2040 Lisp_Object fg_fb = Qnil, bg_fb = Qnil; | 2061 Lisp_Object fg_fb = Qnil, bg_fb = Qnil; |
2041 | 2062 |
2063 #ifdef HAVE_GTK | |
2064 /* We need to put something in there, or error checking gets | |
2065 #%!@#ed up before the styles are set, which override the | |
2066 fallbacks. */ | |
2067 fg_fb = acons (list1 (Qgtk), build_string ("black"), fg_fb); | |
2068 bg_fb = acons (list1 (Qgtk), build_string ("Gray80"), bg_fb); | |
2069 #endif | |
2042 #ifdef HAVE_X_WINDOWS | 2070 #ifdef HAVE_X_WINDOWS |
2043 fg_fb = acons (list1 (Qx), build_string ("black"), fg_fb); | 2071 fg_fb = acons (list1 (Qx), build_string ("black"), fg_fb); |
2044 bg_fb = acons (list1 (Qx), build_string ("Gray80"), bg_fb); | 2072 bg_fb = acons (list1 (Qx), build_string ("Gray80"), bg_fb); |
2045 #endif | 2073 #endif |
2046 #ifdef HAVE_TTY | 2074 #ifdef HAVE_TTY |