Enable compiling without pseudo-trans support (Tres Melton).

SVN revision: 15255
This commit is contained in:
Kim Woelders 2005-06-11 13:00:23 +00:00
parent 72dd701326
commit 0859350f49
4 changed files with 19 additions and 17 deletions

View File

@ -1874,6 +1874,10 @@ void TransparencySet(int transparency);
int TransparencyEnabled(void); int TransparencyEnabled(void);
int TransparencyUpdateNeeded(void); int TransparencyUpdateNeeded(void);
int ImageclassIsTransparent(ImageClass * ic); int ImageclassIsTransparent(ImageClass * ic);
#else
#define TransparencyEnabled() 0
#define TransparencyUpdateNeeded() 0
#define ImageclassIsTransparent(ic) 0
#endif #endif
ImageState *ImageclassGetImageState(ImageClass * ic, int state, ImageState *ImageclassGetImageState(ImageClass * ic, int state,
int active, int sticky); int active, int sticky);

View File

@ -41,9 +41,6 @@ TransparencyEnabled(void)
int int
TransparencyUpdateNeeded(void) TransparencyUpdateNeeded(void)
{ {
/* For this to work right prev_alpha needs set to zero on initialization */
/* if transparency is disabled (by being set to zero). */
/* FIXME - Check this. We call TransparencySet(Conf.trans.alpha) at startup */
return Conf.trans.alpha || prev_alpha; return Conf.trans.alpha || prev_alpha;
} }
@ -84,27 +81,18 @@ TransparencySet(int transparency)
if (prev_alpha == -1) if (prev_alpha == -1)
{ {
prev_alpha = Conf.trans.alpha = transparency; prev_alpha = Conf.trans.alpha = transparency;
/* Generate the color modifier tables */ changed = 1;
TransparencyMakeColorModifier();
ModulesSignal(ESIGNAL_THEME_TRANS_CHANGE, NULL);
} }
else else
{ {
changed = Conf.trans.alpha != transparency; changed = Conf.trans.alpha != transparency;
prev_alpha = Conf.trans.alpha; prev_alpha = Conf.trans.alpha;
Conf.trans.alpha = transparency; Conf.trans.alpha = transparency;
/* Generate the color modifier tables */
TransparencyMakeColorModifier();
if (changed)
ModulesSignal(ESIGNAL_THEME_TRANS_CHANGE, NULL);
} }
} /* Generate the color modifier tables */
TransparencyMakeColorModifier();
#else if (changed)
ModulesSignal(ESIGNAL_THEME_TRANS_CHANGE, NULL);
void
TransparencySet(int transparency __UNUSED__)
{
} }
#endif /* ENABLE_THEME_TRANSPARENCY */ #endif /* ENABLE_THEME_TRANSPARENCY */
@ -620,11 +608,13 @@ ImageclassCreateSimple(const char *name, const char *image)
return ic; return ic;
} }
#ifdef ENABLE_THEME_TRANSPARENCY
int int
ImageclassIsTransparent(ImageClass * ic) ImageclassIsTransparent(ImageClass * ic)
{ {
return ic && ic->norm.normal && ic->norm.normal->transparent; return ic && ic->norm.normal && ic->norm.normal->transparent;
} }
#endif
static ImageState * static ImageState *
ImageclassGetImageState1(ImageStateArray * pisa, int state) ImageclassGetImageState1(ImageStateArray * pisa, int state)

View File

@ -50,7 +50,10 @@ extern EModule ModSound;
extern EModule ModTextclass; extern EModule ModTextclass;
extern EModule ModTheme; extern EModule ModTheme;
extern EModule ModTooltips; extern EModule ModTooltips;
#ifdef ENABLE_THEME_TRANSPARENCY
extern EModule ModTransparency; extern EModule ModTransparency;
#endif
extern EModule ModWarplist; extern EModule ModWarplist;
extern EModule ModWindowMatch; extern EModule ModWindowMatch;
@ -77,7 +80,9 @@ const EModule *p_modules[] = {
&ModTextclass, &ModTextclass,
&ModTheme, &ModTheme,
&ModTooltips, &ModTooltips,
#ifdef ENABLE_THEME_TRANSPARENCY
&ModTransparency, &ModTransparency,
#endif
&ModWarplist, &ModWarplist,
&ModWindowMatch, &ModWindowMatch,
}; };

View File

@ -23,6 +23,7 @@
*/ */
#include "E.h" #include "E.h"
#ifdef ENABLE_THEME_TRANSPARENCY
/* /*
* Theme transparency settings * Theme transparency settings
*/ */
@ -426,3 +427,5 @@ EModule ModTransparency = {
{N_IPC_FUNCS, TransIpcArray}, {N_IPC_FUNCS, TransIpcArray},
{N_CFG_ITEMS, TransCfgItems} {N_CFG_ITEMS, TransCfgItems}
}; };
#endif /* ENABLE_THEME_TRANSPARENCY */