Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h Makefile.am backgrounds.c config.c iclass.c iclass.h
Removed Files:
cmclass.c
Log Message:
Remove colormodifier stuff (this has afaict never worked in e16).
===================================================================
RCS file: /cvs/e/e16/e/src/E.h,v
retrieving revision 1.616
retrieving revision 1.617
diff -u -3 -r1.616 -r1.617
--- E.h 30 Mar 2008 12:21:38 -0000 1.616
+++ E.h 28 Jun 2008 19:08:34 -0000 1.617
@@ -67,7 +67,6 @@
#include "xtypes.h"
-#define ENABLE_COLOR_MODIFIERS 0 /* Not functional */
#define ENABLE_DESKRAY 0 /* Not functional */
#define ENABLE_TRANSPARENCY 1
===================================================================
RCS file: /cvs/e/e16/e/src/Makefile.am,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- Makefile.am 30 Mar 2008 12:13:14 -0000 1.102
+++ Makefile.am 28 Jun 2008 19:08:35 -0000 1.103
@@ -30,7 +30,6 @@
backgrounds.c backgrounds.h \
borders.c borders.h \
buttons.c buttons.h \
- cmclass.c \
comms.c comms.h \
conf.h \
config.c \
===================================================================
RCS file: /cvs/e/e16/e/src/backgrounds.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -3 -r1.111 -r1.112
--- backgrounds.c 24 May 2008 18:13:16 -0000 1.111
+++ backgrounds.c 28 Jun 2008 19:08:35 -0000 1.112
@@ -53,9 +53,6 @@
char bg_tile;
BgPart bg;
BgPart top;
-#if ENABLE_COLOR_MODIFIERS
- ColorModifierClass *cmclass;
-#endif
char external;
char keepim;
char referenced;
@@ -470,15 +467,6 @@
return updated;
}
-#if ENABLE_COLOR_MODIFIERS
-static void
-BackgroundSetColorMofifier(Background * bg, ColorModifierClass * cm)
-{
- cm->ref_count++;
- bg->cmclass = cm;
-}
-#endif
-
static void
BgFindImageSize(BgPart * bgp, unsigned int rw, unsigned int rh,
unsigned int *pw, unsigned int *ph)
@@ -557,10 +545,6 @@
char hasbg, hasfg;
EImage *im;
-#if ENABLE_COLOR_MODIFIERS
- ColorModifierClass *cm;
-#endif
-
if (bg->bg.file && !bg->bg.im)
{
if (!bg->bg.real_file)
@@ -577,37 +561,6 @@
bg->top.im = EImageLoad(bg->top.real_file);
}
-#if ENABLE_COLOR_MODIFIERS
- cm = bg->cmclass;
- if (cm)
- cm->ref_count--;
- else
- cm = FindItem("BACKGROUND", 0, LIST_FINDBY_NAME,
LIST_TYPE_COLORMODIFIER);
-
- if (cm)
- {
- cm->ref_count++;
-#if 0 /* To be implemented? */
- if (bg->top.im)
- {
- Imlib_set_image_red_curve(pImlib_Context, bg->top.im, cm->red.map);
- Imlib_set_image_green_curve(pImlib_Context, bg->top.im,
- cm->green.map);
- Imlib_set_image_blue_curve(pImlib_Context, bg->top.im,
- cm->blue.map);
- }
- if (bg->bg.im)
- {
- Imlib_set_image_red_curve(pImlib_Context, bg->bg.im, cm->red.map);
- Imlib_set_image_green_curve(pImlib_Context, bg->bg.im,
- cm->green.map);
- Imlib_set_image_blue_curve(pImlib_Context, bg->bg.im,
- cm->blue.map);
- }
-#endif
- }
-#endif
-
if (!draw)
draw = WinGetXwin(win);
@@ -1113,10 +1066,6 @@
char ignore = 0;
unsigned int desk;
-#if ENABLE_COLOR_MODIFIERS
- ColorModifierClass *cm = NULL;
-#endif
-
SET_COLOR(&color, 0, 0, 0);
while (GetLine(s, sizeof(s), fs))
@@ -1154,10 +1103,6 @@
bg = BackgroundCreate(name, &color, bg1, i1, i2, i3,
i4, i5, i6, bg2, j1, j2, j3,
j4, j5);
-#if ENABLE_COLOR_MODIFIERS
- if (cm)
- BackgroundSetColorMofifier(bg, cm);
-#endif
}
}
}
@@ -1165,9 +1110,6 @@
case CONFIG_COLORMOD:
case ICLASS_COLORMOD:
-#if ENABLE_COLOR_MODIFIERS
- cm = FindItem(s2, 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
-#endif
break;
case CONFIG_CLASSNAME:
@@ -1341,13 +1283,6 @@
bg->top.yperc);
}
-#if ENABLE_COLOR_MODIFIERS
- if (bg->cmclass)
- {
- fprintf(fs, "370 %s\n", bg->cmclass->name);
- }
-#endif
-
for (j = 0; j < N_BG_ASSIGNED; j++)
{
if (bg == bg_assigned[j])
@@ -2614,56 +2549,6 @@
autosave();
}
-#if ENABLE_COLOR_MODIFIERS
-static void
-IPC_BackgroundColormodifierSet(const char *params)
-{
- Background *bg;
- ColorModifierClass *cm;
- int i;
- char buf[FILEPATH_LEN_MAX], buf2[FILEPATH_LEN_MAX];
-
- if (params == NULL)
- return;
-
- sscanf(params, "%1000s %1000s", buf, buf2);
- bg = BackgroundFind(buf);
- cm = FindItem(buf2, 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
- if ((bg) && (bg->cmclass != cm))
- {
- if (!strcmp(buf, "(null)"))
- {
- bg->cmclass->ref_count--;
- bg->cmclass = NULL;
- }
- else if (cm)
- {
- bg->cmclass->ref_count--;
- bg->cmclass = cm;
- }
-
- BackgroundInvalidate(bg, 1);
- }
-}
-
-static void
-IPC_BackgroundColormodifierGet(const char *params)
-{
- char param1[FILEPATH_LEN_MAX], buf[FILEPATH_LEN_MAX];
- Background *bg;
-
- if (params == NULL)
- return;
-
- sscanf(params, "%1000s", param1);
- bg = BackgroundFind(param1);
- Esnprintf(buf, sizeof(buf), "(null)");
- if ((bg) && (bg->cmclass))
- Esnprintf(buf, sizeof(buf), "%s", bg->cmclass->name);
- IpcPrintf(buf);
-}
-#endif
-
static const IpcItem BackgroundsIpcArray[] = {
{
BackgroundsIpc,
@@ -2684,12 +2569,6 @@
{
IPC_BackgroundUse, "use_bg", NULL, "Deprecated - do not use", NULL}
,
-#if ENABLE_COLOR_MODIFIERS
- {IPC_BackgroundColormodifierSet, "set_bg_colmod", NULL, "TBD", NULL}
- ,
- {IPC_BackgroundColormodifierGet, "get_bg_colmod", NULL, "TBD", NULL}
- ,
-#endif
};
#define N_IPC_FUNCS (sizeof(BackgroundsIpcArray)/sizeof(IpcItem))
===================================================================
RCS file: /cvs/e/e16/e/src/config.c,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -3 -r1.163 -r1.164
--- config.c 22 Jun 2008 13:34:41 -0000 1.163
+++ config.c 28 Jun 2008 19:08:35 -0000 1.164
@@ -377,9 +377,6 @@
ConfigAlertLoad("Window match");
break;
case CONFIG_COLORMOD:
-#if ENABLE_COLOR_MODIFIERS
- Config_ColorModifier(fs);
-#endif
break;
case CONFIG_ACTIONCLASS:
err = AclassConfigLoad(fs);
@@ -567,9 +564,6 @@
static const char *const config_files[] = {
"init.cfg",
"textclasses.cfg",
-#if ENABLE_COLOR_MODIFIERS
- "colormodifiers.cfg",
-#endif
"imageclasses.cfg",
"desktops.cfg",
"actionclasses.cfg",
===================================================================
RCS file: /cvs/e/e16/e/src/iclass.c,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -3 -r1.140 -r1.141
--- iclass.c 28 Jun 2008 18:54:59 -0000 1.140
+++ iclass.c 28 Jun 2008 19:08:35 -0000 1.141
@@ -34,21 +34,6 @@
#define ENABLE_DESTROY 0 /* Broken */
-#if ENABLE_COLOR_MODIFIERS
-typedef struct {
- int num;
- unsigned char *px;
- unsigned char *py;
- unsigned char map[256];
-} ModCurve;
-
-typedef struct {
- char *name;
- ModCurve red, green, blue;
- unsigned int ref_count;
-} ColorModifierClass;
-#endif
-
struct _imagestate {
char *im_file;
char *real_file;
@@ -60,9 +45,6 @@
int pixmapfillstyle;
EColor bg, hi, lo, hihi, lolo;
int bevelstyle;
-#if ENABLE_COLOR_MODIFIERS
- ColorModifierClass *colmod;
-#endif
};
typedef struct {
@@ -76,9 +58,6 @@
char *name;
ImageStateArray norm, active, sticky, sticky_active;
EImageBorder padding;
-#if ENABLE_COLOR_MODIFIERS
- ColorModifierClass *colmod;
-#endif
unsigned int ref_count;
};
@@ -234,11 +213,6 @@
Efree(is->border);
-#if ENABLE_COLOR_MODIFIERS
- if (is->colmod)
- is->colmod->ref_count--;
-#endif
-
Efree(is);
}
@@ -333,9 +307,6 @@
ic->padding.right = 0;
ic->padding.top = 0;
ic->padding.bottom = 0;
-#if ENABLE_COLOR_MODIFIERS
- ic->colmod = NULL;
-#endif
ic->ref_count = 0;
return ic;
@@ -364,11 +335,6 @@
FreeImageStateArray(&(ic->sticky));
FreeImageStateArray(&(ic->sticky_active));
-#if ENABLE_COLOR_MODIFIERS
- if (ic->colmod)
- ic->colmod->ref_count--;
-#endif
-
Efree(ic);
}
#endif /* ENABLE_DESTROY */
@@ -433,21 +399,9 @@
#define ISTATE_SET_STATE(which, fallback) \
if (!ic->which) ic->which = ic->fallback;
-#if ENABLE_COLOR_MODIFIERS
-#define ISTATE_SET_CM(which, fallback) \
- if (!ic->which->colmod) { \
- ic->which->colmod = fallback; \
- if (fallback) fallback->ref_count++; \
- }
-#endif
-
static void
ImageclassPopulate(ImageClass * ic)
{
-#if ENABLE_COLOR_MODIFIERS
- ColorModifierClass *cm;
-#endif
-
if (!ic)
return;
@@ -472,53 +426,6 @@
ISTATE_SET_STATE(sticky_active.hilited, sticky_active.normal);
ISTATE_SET_STATE(sticky_active.clicked, sticky_active.normal);
ISTATE_SET_STATE(sticky_active.disabled, sticky_active.normal);
-
-#if ENABLE_COLOR_MODIFIERS
- if (!ic->colmod)
- {
- cm = FindItem("ICLASS", 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
- if (!cm)
- cm =
- FindItem("DEFAULT", 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
- ic->colmod = cm;
- }
-
- cm = FindItem("NORMAL", 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
- if (!cm)
- cm = ic->colmod;
-
- ISTATE_SET_CM(norm.normal, cm);
- ISTATE_SET_CM(norm.hilited, cm);
- ISTATE_SET_CM(norm.clicked, cm);
- ISTATE_SET_CM(norm.disabled, cm);
-
- cm = FindItem("ACTIVE", 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
- if (!cm)
- cm = ic->colmod;
-
- ISTATE_SET_CM(active.normal, cm);
- ISTATE_SET_CM(active.hilited, cm);
- ISTATE_SET_CM(active.clicked, cm);
- ISTATE_SET_CM(active.disabled, cm);
-
- cm = FindItem("STICKY", 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
- if (!cm)
- cm = ic->colmod;
-
- ISTATE_SET_CM(sticky.normal, cm);
- ISTATE_SET_CM(sticky.hilited, cm);
- ISTATE_SET_CM(sticky.clicked, cm);
- ISTATE_SET_CM(sticky.disabled, cm);
-
- cm = FindItem("STICKY_ACTIVE", 0, LIST_FINDBY_NAME,
LIST_TYPE_COLORMODIFIER);
- if (!cm)
- cm = ic->colmod;
-
- ISTATE_SET_CM(sticky_active.normal, cm);
- ISTATE_SET_CM(sticky_active.hilited, cm);
- ISTATE_SET_CM(sticky_active.clicked, cm);
- ISTATE_SET_CM(sticky_active.disabled, cm);
-#endif
}
int
@@ -532,10 +439,6 @@
ImageState *ICToRead = NULL;
int l, r, t, b;
-#if ENABLE_COLOR_MODIFIERS
- ColorModifierClass *cm = NULL;
-#endif
-
while (GetLine(s, sizeof(s), fs))
{
i1 = ConfigParseline1(s, s2, NULL, NULL);
@@ -573,28 +476,10 @@
ic->sticky = ICToInherit->sticky;
ic->sticky_active = ICToInherit->sticky_active;
ic->padding = ICToInherit->padding;
-#if ENABLE_COLOR_MODIFIERS
- ic->colmod = ICToInherit->colmod;
-#endif
}
break;
case CONFIG_COLORMOD:
case ICLASS_COLORMOD:
-#if ENABLE_COLOR_MODIFIERS
- cm = FindItem(s2, 0, LIST_FINDBY_NAME, LIST_TYPE_COLORMODIFIER);
- if (cm)
- {
- if (ICToRead)
- {
- ICToRead->colmod = cm;
- }
- else
- {
- ic->colmod = cm;
- }
- cm->ref_count++;
- }
-#endif
break;
case ICLASS_PADDING:
l = r = t = b = 0;
===================================================================
RCS file: /cvs/e/e16/e/src/iclass.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- iclass.h 22 Jun 2008 13:34:42 -0000 1.20
+++ iclass.h 28 Jun 2008 19:08:35 -0000 1.21
@@ -69,24 +69,6 @@
#define IC_FLAG_MAKE_MASK 0x02 /* Make mask */
#define IC_FLAG_FULL_SIZE 0x04 /* Make full size pixmaps */
-/* cmclass.c */
-#if ENABLE_COLOR_MODIFIERS
-void CreateCurve(ModCurve * c);
-void FreeModCurve(ModCurve * c);
-void FreeCMClass(ColorModifierClass * cm);
-ColorModifierClass *CreateCMClass(char *name, int rnum, unsigned char *rpx,
- unsigned char *rpy, int gnum,
- unsigned char *gpx, unsigned char *gpy,
- int bnum, unsigned char *bpx,
- unsigned char *bpy);
-void ModifyCMClass(char *name, int rnum, unsigned char *rpx,
- unsigned char *rpy, int gnum,
- unsigned char *gpx, unsigned char *gpy,
- int bnum, unsigned char *bpx,
- unsigned char *bpy);
-int ColorModifierConfigLoad(FILE * fs);
-#endif
-
/* iclass.c */
int ImageclassConfigLoad(FILE * fs);
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs