Mercurial > hg > xemacs-beta
diff src/console-xlike-inc.h @ 4969:cbe181529c34
Automatic merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 03 Feb 2010 21:46:21 -0600 |
parents | fce43cb76a1c |
children | 5502045ec510 8b2f75cecb89 |
line wrap: on
line diff
--- a/src/console-xlike-inc.h Wed Feb 03 21:06:14 2010 -0600 +++ b/src/console-xlike-inc.h Wed Feb 03 21:46:21 2010 -0600 @@ -34,17 +34,29 @@ would lead to a large number of very small functions and very hard-to-read code. - Instead, we handle the situation by having only one copy, placed in a - file called *-xlike-inc.c (e.g. redisplay-xlike-inc.c) and - conditionalizing using ifdefs. Because we can compile with both X and - GTK at once, we include this file inside of the appropriate - device-specific file (e.g. redisplay-gtk.c or redisplay-x.c). The `inc' - in *-xlike-inc.c indicates that this is a file meant to be included in - another file, despite the fact that it is a .c file. + Instead, we handle the situation by the following: + + (1) In cases where there are lots of individual differences, we have + only one copy, placed in a file called *-xlike-inc.c + (e.g. redisplay-xlike-inc.c), and conditionalize using ifdefs. Because + we can compile with both X and GTK at once, we include this file inside + of the appropriate device-specific file (e.g. redisplay-gtk.c or + redisplay-x.c). The `inc' in *-xlike-inc.c indicates that this is a + file meant to be included in another file, despite the fact that it is a + .c file. To signal which variety of "xlike" we are compiling for, either THIS_IS_X or THIS_IS_GTK needs to be defined, prior to including the - *-xlike-inc.c file. */ + *-xlike-inc.c file. + + (2) For code that is identical in both versions, or where it's possible + to have only one copy at runtime through some other means, we name + the file *-xlike.c. This is a normal file, not included in some other + file. An example of "other means" is toolbar-xlike.c, where all + functions are passed a frame or device, and it's possible to do run-time + conditionalization based on the device type. (This isn't currently the + case but will be soon once the related changes from my `hg-fixup' + workspace are checked in. --ben) */ /* About the representation of color below: @@ -72,7 +84,7 @@ #ifdef THIS_IS_X # include "console-x-impl.h" # ifdef NEED_GCCACHE_H -# include "xgccache.h" +# include "gccache-x.h" # endif # ifdef NEED_GLYPHS_H # include "glyphs-x.h" @@ -93,6 +105,20 @@ # endif #endif /* THIS_IS_GTK */ +/* Just because we have XFT support doesn't mean we should use it. + In particular, the xlike routines are used by both X and GTK code, + but XFT stuff is X-specific. HAVE_XFT will still be defined when + the GTK flavor is active, but we don't want to trigger the XFT code + in this case. We could just undefine HAVE_XFT but I'd rather make + it clearer that something else is going on. --ben */ + +#if defined (THIS_IS_X) && defined (HAVE_XFT) +#define USE_XFT +#define USE_XFT_MENUBARS +#define USE_XFT_TABS +#define USE_XFT_GAUGES +#endif + /***************************************************************************/ /* Common definitions */ /***************************************************************************/