parent
30e6961bb0
commit
9a1eb87c87
60
dox/dox.c
60
dox/dox.c
|
@ -89,7 +89,7 @@ typedef struct _mwmhints {
|
|||
#include "exit2.xpm"
|
||||
|
||||
Display *disp;
|
||||
ImlibData *id;
|
||||
ImlibData *pImlibData;
|
||||
#if USE_FNLIB
|
||||
FnlibData *pFnlibData;
|
||||
#endif
|
||||
|
@ -117,7 +117,7 @@ Window CreateWindow(Window parent, int x, int y, int ww, int hh)
|
|||
|
||||
attr.backing_store = NotUseful;
|
||||
attr.override_redirect = False;
|
||||
attr.colormap = Imlib_get_colormap(id);
|
||||
attr.colormap = Imlib_get_colormap(pImlibData);
|
||||
attr.border_pixel = 0;
|
||||
attr.background_pixel = 0;
|
||||
attr.save_under = False;
|
||||
|
@ -126,8 +126,8 @@ Window CreateWindow(Window parent, int x, int y, int ww, int hh)
|
|||
mwm.decorations = 0;
|
||||
mwm.inputMode = 0;
|
||||
/* a = XInternAtom(disp, "_MOTIF_WM_HINTS", False); */
|
||||
win = XCreateWindow(disp, parent, x, y, ww, hh, 0, id->x.depth,
|
||||
InputOutput, Imlib_get_visual(id),
|
||||
win = XCreateWindow(disp, parent, x, y, ww, hh, 0, pImlibData->x.depth,
|
||||
InputOutput, Imlib_get_visual(pImlibData),
|
||||
CWOverrideRedirect | CWSaveUnder | CWBackingStore |
|
||||
CWColormap | CWBackPixel | CWBorderPixel, &attr);
|
||||
XSetWindowBackground(disp, win, 0);
|
||||
|
@ -218,24 +218,24 @@ int main(int argc, char **argv)
|
|||
params.flags = PARAMS_IMAGECACHESIZE | PARAMS_PIXMAPCACHESIZE;
|
||||
params.imagecachesize = (w * h * 3 * 2);
|
||||
params.pixmapcachesize = (w * h * 3 * 2 * 8);
|
||||
id = Imlib_init_with_params(disp, ¶ms);
|
||||
Imlib_set_render_type(id, RT_DITHER_TRUECOL);
|
||||
pImlibData = Imlib_init_with_params(disp, ¶ms);
|
||||
Imlib_set_render_type(pImlibData, RT_DITHER_TRUECOL);
|
||||
#if USE_FNLIB
|
||||
pFnlibData = Fnlib_init(id);
|
||||
pFnlibData = Fnlib_init(pImlibData);
|
||||
#endif
|
||||
|
||||
im_title = Imlib_create_image_from_xpm_data(id, title_xpm);
|
||||
im_title = Imlib_create_image_from_xpm_data(pImlibData, title_xpm);
|
||||
ibd.left = 50;
|
||||
ibd.right = 2;
|
||||
ibd.top = 2;
|
||||
ibd.bottom = 2;
|
||||
Imlib_set_image_border(id, im_title, &ibd);
|
||||
im_prev1 = Imlib_create_image_from_xpm_data(id, prev1_xpm);
|
||||
im_prev2 = Imlib_create_image_from_xpm_data(id, prev2_xpm);
|
||||
im_next1 = Imlib_create_image_from_xpm_data(id, next1_xpm);
|
||||
im_next2 = Imlib_create_image_from_xpm_data(id, next2_xpm);
|
||||
im_exit1 = Imlib_create_image_from_xpm_data(id, exit1_xpm);
|
||||
im_exit2 = Imlib_create_image_from_xpm_data(id, exit2_xpm);
|
||||
Imlib_set_image_border(pImlibData, im_title, &ibd);
|
||||
im_prev1 = Imlib_create_image_from_xpm_data(pImlibData, prev1_xpm);
|
||||
im_prev2 = Imlib_create_image_from_xpm_data(pImlibData, prev2_xpm);
|
||||
im_next1 = Imlib_create_image_from_xpm_data(pImlibData, next1_xpm);
|
||||
im_next2 = Imlib_create_image_from_xpm_data(pImlibData, next2_xpm);
|
||||
im_exit1 = Imlib_create_image_from_xpm_data(pImlibData, exit1_xpm);
|
||||
im_exit2 = Imlib_create_image_from_xpm_data(pImlibData, exit2_xpm);
|
||||
|
||||
if (argc < 2) {
|
||||
printf("usage:\n"
|
||||
|
@ -301,7 +301,7 @@ int main(int argc, char **argv)
|
|||
int num;
|
||||
XineramaScreenInfo *screens;
|
||||
|
||||
XQueryPointer(disp, id->x.root, &rt, &ch, &pointer_x, &pointer_y,
|
||||
XQueryPointer(disp, pImlibData->x.root, &rt, &ch, &pointer_x, &pointer_y,
|
||||
&d, &d, &ud);
|
||||
|
||||
screens = XineramaQueryScreens(disp, &num);
|
||||
|
@ -326,7 +326,7 @@ int main(int argc, char **argv)
|
|||
|
||||
}
|
||||
#endif
|
||||
win_main = CreateWindow(id->x.root, wx, wy, w, h + t);
|
||||
win_main = CreateWindow(pImlibData->x.root, wx, wy, w, h + t);
|
||||
win_title = CreateWindow(win_main, 0, 0, (w - 64 - 64 - t), t);
|
||||
win_prev = CreateWindow(win_main, (w - 64 - 64 - t), 0, 64, t);
|
||||
XSelectInput(disp, win_prev, ButtonPressMask | ButtonReleaseMask);
|
||||
|
@ -337,12 +337,12 @@ int main(int argc, char **argv)
|
|||
win_text = CreateWindow(win_main, 0, t, w, h);
|
||||
XSelectInput(disp, win_text, ButtonPressMask | ButtonReleaseMask |
|
||||
KeyPressMask | KeyReleaseMask | PointerMotionMask);
|
||||
draw = XCreatePixmap(disp, win_text, w, h, id->x.depth);
|
||||
draw = XCreatePixmap(disp, win_text, w, h, pImlibData->x.depth);
|
||||
XSetWindowBackgroundPixmap(disp, win_text, draw);
|
||||
Imlib_apply_image(id, im_title, win_title);
|
||||
Imlib_apply_image(id, im_exit1, win_exit);
|
||||
Imlib_apply_image(id, im_next1, win_next);
|
||||
Imlib_apply_image(id, im_prev1, win_prev);
|
||||
Imlib_apply_image(pImlibData, im_title, win_title);
|
||||
Imlib_apply_image(pImlibData, im_exit1, win_exit);
|
||||
Imlib_apply_image(pImlibData, im_next1, win_next);
|
||||
Imlib_apply_image(pImlibData, im_prev1, win_prev);
|
||||
|
||||
l = RenderPage(draw, pagenum, w, h);
|
||||
|
||||
|
@ -409,11 +409,11 @@ int main(int argc, char **argv)
|
|||
break;
|
||||
case ButtonPress:
|
||||
if (ev.xbutton.window == win_prev)
|
||||
Imlib_apply_image(id, im_prev2, win_prev);
|
||||
Imlib_apply_image(pImlibData, im_prev2, win_prev);
|
||||
else if (ev.xbutton.window == win_next)
|
||||
Imlib_apply_image(id, im_next2, win_next);
|
||||
Imlib_apply_image(pImlibData, im_next2, win_next);
|
||||
else if (ev.xbutton.window == win_exit)
|
||||
Imlib_apply_image(id, im_exit2, win_exit);
|
||||
Imlib_apply_image(pImlibData, im_exit2, win_exit);
|
||||
else {
|
||||
int x, y;
|
||||
|
||||
|
@ -499,7 +499,7 @@ int main(int argc, char **argv)
|
|||
break;
|
||||
case ButtonRelease:
|
||||
if (ev.xbutton.window == win_prev) {
|
||||
Imlib_apply_image(id, im_prev1, win_prev);
|
||||
Imlib_apply_image(pImlibData, im_prev1, win_prev);
|
||||
FREE_LINKS;
|
||||
page_hist_pos--;
|
||||
if (page_hist_pos < 0)
|
||||
|
@ -510,7 +510,7 @@ int main(int argc, char **argv)
|
|||
} else if (ev.xbutton.window == win_next) {
|
||||
int prev_pagenum;
|
||||
|
||||
Imlib_apply_image(id, im_next1, win_next);
|
||||
Imlib_apply_image(pImlibData, im_next1, win_next);
|
||||
prev_pagenum = pagenum;
|
||||
pagenum++;
|
||||
pagenum = FixPage(pagenum);
|
||||
|
@ -529,7 +529,7 @@ int main(int argc, char **argv)
|
|||
UPDATE;
|
||||
}
|
||||
} else if (ev.xbutton.window == win_exit) {
|
||||
Imlib_apply_image(id, im_exit1, win_exit);
|
||||
Imlib_apply_image(pImlibData, im_exit1, win_exit);
|
||||
exit(0);
|
||||
}
|
||||
break;
|
||||
|
@ -560,9 +560,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
GetLinkColors(pagenum, &r, &g, &b);
|
||||
gc = XCreateGC(disp, win_text, 0, &gcv);
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(id, &r, &g,
|
||||
&b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XDrawRectangle(disp, win_text, gc, ll->x, ll->y,
|
||||
ll->w, ll->h);
|
||||
XFreeGC(disp, gc);
|
||||
|
|
|
@ -252,7 +252,7 @@ void GetLinkColors(int page_num, int *r, int *g, int *b);
|
|||
Link *RenderPage(Window win, int page_num, int w, int h);
|
||||
|
||||
extern Display *disp;
|
||||
extern ImlibData *id;
|
||||
extern ImlibData *pImlibData;
|
||||
#if USE_FNLIB
|
||||
extern FnlibData *pFnlibData;
|
||||
#endif
|
||||
|
|
14
dox/format.c
14
dox/format.c
|
@ -549,11 +549,11 @@ RenderPage(Window win, int page_num, int w, int h)
|
|||
|
||||
sprintf(tmp, "%s/%s", docdir, pg->background);
|
||||
findLocalizedFile(tmp);
|
||||
im = Imlib_load_image(id, tmp);
|
||||
im = Imlib_load_image(pImlibData, tmp);
|
||||
if (im)
|
||||
{
|
||||
Imlib_paste_image(id, im, win, 0, 0, w, h);
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_paste_image(pImlibData, im, win, 0, 0, w, h);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < pg->count; i++)
|
||||
|
@ -574,14 +574,14 @@ RenderPage(Window win, int page_num, int w, int h)
|
|||
char tmp[4096];
|
||||
|
||||
sprintf(tmp, "%s/%s", docdir, img->src);
|
||||
im = Imlib_load_image(id, tmp);
|
||||
im = Imlib_load_image(pImlibData, tmp);
|
||||
if (im)
|
||||
{
|
||||
img->w = im->rgb_width;
|
||||
img->h = im->rgb_height;
|
||||
Imlib_paste_image(id, im, win, img->x, img->y,
|
||||
Imlib_paste_image(pImlibData, im, win, img->x, img->y,
|
||||
im->rgb_width, im->rgb_height);
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
if (img->link)
|
||||
{
|
||||
|
@ -928,7 +928,7 @@ RenderPage(Window win, int page_num, int w, int h)
|
|||
g = ts.fg_col.g = pg->linkg;
|
||||
b = ts.fg_col.b = pg->linkb;
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(id, &r, &g, &b));
|
||||
Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
TextSize(&ts, txt_disp, &tw, &th, 17);
|
||||
extra = ((xspace - tw) * justification) >> 10;
|
||||
TextDraw(&ts, win, link_txt, x + off + lx + extra, y,
|
||||
|
|
48
dox/text.c
48
dox/text.c
|
@ -292,37 +292,37 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
r = ts->bg_col.r;
|
||||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
EFont_draw_string(disp, win, gc, xx + 1, yy + 1,
|
||||
lines[i], ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
lines[i], ts->efont, Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
}
|
||||
else if (ts->effect == 2)
|
||||
{
|
||||
r = ts->bg_col.r;
|
||||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
EFont_draw_string(disp, win, gc, xx - 1, yy,
|
||||
lines[i], ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
lines[i], ts->efont, Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
EFont_draw_string(disp, win, gc, xx + 1, yy,
|
||||
lines[i], ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
lines[i], ts->efont, Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
EFont_draw_string(disp, win, gc, xx, yy - 1,
|
||||
lines[i], ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
lines[i], ts->efont, Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
EFont_draw_string(disp, win, gc, xx, yy + 1,
|
||||
lines[i], ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
lines[i], ts->efont, Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
}
|
||||
r = ts->fg_col.r;
|
||||
g = ts->fg_col.g;
|
||||
b = ts->fg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
EFont_draw_string(disp, win, gc, xx, yy,
|
||||
lines[i], ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
lines[i], ts->efont, Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
yy += ascent + descent;
|
||||
}
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
r = ts->bg_col.r;
|
||||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XmbDrawString(disp, win, ts->xfontset, gc, xx + 1, yy + 1,
|
||||
lines[i], strlen(lines[i]));
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
r = ts->bg_col.r;
|
||||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XmbDrawString(disp, win, ts->xfontset, gc, xx - 1, yy,
|
||||
lines[i], strlen(lines[i]));
|
||||
XmbDrawString(disp, win, ts->xfontset, gc, xx + 1, yy,
|
||||
|
@ -363,7 +363,7 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
r = ts->fg_col.r;
|
||||
g = ts->fg_col.g;
|
||||
b = ts->fg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XmbDrawString(disp, win, ts->xfontset, gc, xx, yy,
|
||||
lines[i], strlen(lines[i]));
|
||||
yy += ret2.height;
|
||||
|
@ -386,7 +386,7 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
r = ts->bg_col.r;
|
||||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XDrawString(disp, win, gc, xx + 1, yy + 1,
|
||||
lines[i], strlen(lines[i]));
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
r = ts->bg_col.r;
|
||||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XDrawString(disp, win, gc, xx - 1, yy,
|
||||
lines[i], strlen(lines[i]));
|
||||
XDrawString(disp, win, gc, xx + 1, yy,
|
||||
|
@ -408,7 +408,7 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
r = ts->fg_col.r;
|
||||
g = ts->fg_col.g;
|
||||
b = ts->fg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XDrawString(disp, win, gc, xx, yy,
|
||||
lines[i], strlen(lines[i]));
|
||||
yy += ts->xfont->ascent + ts->xfont->descent;
|
||||
|
@ -431,7 +431,7 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
r = ts->bg_col.r;
|
||||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XDrawString16(disp, win, gc, xx + 1, yy + 1,
|
||||
(XChar2b *) lines[i], strlen(lines[i]) / 2);
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
r = ts->bg_col.r;
|
||||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XDrawString16(disp, win, gc, xx - 1, yy,
|
||||
(XChar2b *) lines[i], strlen(lines[i]) / 2);
|
||||
XDrawString16(disp, win, gc, xx + 1, yy,
|
||||
|
@ -453,7 +453,7 @@ TextDraw(TextState * ts, Window win, char *text,
|
|||
r = ts->fg_col.r;
|
||||
g = ts->fg_col.g;
|
||||
b = ts->fg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XDrawString16(disp, win, gc, xx, yy,
|
||||
(XChar2b *) lines[i], strlen(lines[i]) / 2);
|
||||
yy += ts->xfont->ascent + ts->xfont->descent;
|
||||
|
|
4
src/E.h
4
src/E.h
|
@ -3030,8 +3030,8 @@ extern int master_screen;
|
|||
extern int display_screens;
|
||||
extern int single_screen_mode;
|
||||
extern Display *disp;
|
||||
extern ImlibData *id;
|
||||
extern ImlibData *ird;
|
||||
extern ImlibData *pImlibData;
|
||||
extern ImlibData *prImlibData;
|
||||
|
||||
#if USE_FNLIB
|
||||
extern FnlibData *pFnlibData;
|
||||
|
|
|
@ -2044,7 +2044,7 @@ doMoveModeSet(void *params)
|
|||
if (mode.movemode > 5)
|
||||
mode.movemode = 0;
|
||||
}
|
||||
if ((ird) && (mode.movemode == 5))
|
||||
if ((prImlibData) && (mode.movemode == 5))
|
||||
mode.movemode = 3;
|
||||
autosave();
|
||||
EDBUG_RETURN(0);
|
||||
|
|
|
@ -1624,9 +1624,9 @@ FreeEwin(EWin * ewin)
|
|||
if (ewin->mini_mask)
|
||||
EFreePixmap(disp, ewin->mini_mask);
|
||||
if (ewin->icon_pmap)
|
||||
Imlib_free_pixmap(id, ewin->icon_pmap);
|
||||
Imlib_free_pixmap(pImlibData, ewin->icon_pmap);
|
||||
if (ewin->icon_mask)
|
||||
Imlib_free_pixmap(id, ewin->icon_mask);
|
||||
Imlib_free_pixmap(pImlibData, ewin->icon_mask);
|
||||
if (ewin->groups)
|
||||
{
|
||||
num_groups = ewin->num_groups;
|
||||
|
|
|
@ -174,7 +174,7 @@ CalcButton(Button * b)
|
|||
{
|
||||
w = im->rgb_width;
|
||||
h = im->rgb_height;
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
10
src/comms.c
10
src/comms.c
|
@ -505,7 +505,7 @@ HandleComms(XClientMessageEvent * ev)
|
|||
if (bg->top.file)
|
||||
Efree(bg->top.file);
|
||||
if (bg->pmap)
|
||||
Imlib_free_pixmap(id, bg->pmap);
|
||||
Imlib_free_pixmap(pImlibData, bg->pmap);
|
||||
Efree(bg);
|
||||
}
|
||||
}
|
||||
|
@ -829,7 +829,7 @@ HandleComms(XClientMessageEvent * ev)
|
|||
bg->cmclass = cm;
|
||||
}
|
||||
if (bg->pmap)
|
||||
Imlib_free_pixmap(id, bg->pmap);
|
||||
Imlib_free_pixmap(pImlibData, bg->pmap);
|
||||
bg->pmap = 0;
|
||||
for (i = 0; i < ENLIGHTENMENT_CONF_NUM_DESKTOPS; i++)
|
||||
{
|
||||
|
@ -1128,7 +1128,7 @@ HandleComms(XClientMessageEvent * ev)
|
|||
if (updated)
|
||||
{
|
||||
if (bg->pmap)
|
||||
Imlib_free_pixmap(id, bg->pmap);
|
||||
Imlib_free_pixmap(pImlibData, bg->pmap);
|
||||
bg->pmap = 0;
|
||||
for (i = 0; i < ENLIGHTENMENT_CONF_NUM_DESKTOPS; i++)
|
||||
{
|
||||
|
@ -1177,7 +1177,7 @@ HandleComms(XClientMessageEvent * ev)
|
|||
bg = (Background *) FindItem(w, 0, LIST_FINDBY_NAME,
|
||||
LIST_TYPE_BACKGROUND);
|
||||
if (bg)
|
||||
SetBackgroundTo(id, win, bg, 0);
|
||||
SetBackgroundTo(pImlibData, win, bg, 0);
|
||||
CommsSend(c, "done");
|
||||
}
|
||||
else if (!strcmp(w, "set_controls"))
|
||||
|
@ -1217,7 +1217,7 @@ HandleComms(XClientMessageEvent * ev)
|
|||
{
|
||||
word(s, wd, w);
|
||||
mode.movemode = atoi(w);
|
||||
if ((ird) && (mode.movemode == 5))
|
||||
if ((prImlibData) && (mode.movemode == 5))
|
||||
mode.movemode = 3;
|
||||
}
|
||||
else if (!strcmp(w, "RESIZEMODE:"))
|
||||
|
|
|
@ -1782,7 +1782,7 @@ Config_Desktop(FILE * ConfigFile)
|
|||
{
|
||||
if ((desks.desk[atoi(s2)].bg == NULL) || (mode.user_bg))
|
||||
{
|
||||
if ((ird) && (atoi(s2) == 0))
|
||||
if ((prImlibData) && (atoi(s2) == 0))
|
||||
bg = NULL;
|
||||
if (!bg)
|
||||
{
|
||||
|
@ -1799,7 +1799,7 @@ Config_Desktop(FILE * ConfigFile)
|
|||
{
|
||||
SetDesktopBg(atoi(s2), bg);
|
||||
}
|
||||
if ((ird) && (atoi(s2) == 0))
|
||||
if ((prImlibData) && (atoi(s2) == 0))
|
||||
bg = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -1821,7 +1821,7 @@ Config_Desktop(FILE * ConfigFile)
|
|||
{
|
||||
SetDesktopBg(atoi(s2), bg);
|
||||
}
|
||||
if ((ird) && (atoi(s2) == 0))
|
||||
if ((prImlibData) && (atoi(s2) == 0))
|
||||
bg = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,14 +65,14 @@ CreateECursor(char *name, char *image, int native_id,
|
|||
xfg.red = (fg->r << 8) | (fg->r);
|
||||
xfg.green = (fg->g << 8) | (fg->g);
|
||||
xfg.blue = (fg->b << 8) | (fg->b);
|
||||
xfg.pixel = Imlib_best_color_match(id, &r, &g, &b);
|
||||
xfg.pixel = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
r = bg->r;
|
||||
g = bg->g;
|
||||
b = bg->b;
|
||||
xbg.red = (bg->r << 8) | (bg->r);
|
||||
xbg.green = (bg->g << 8) | (bg->g);
|
||||
xbg.blue = (bg->b << 8) | (bg->b);
|
||||
xbg.pixel = Imlib_best_color_match(id, &r, &g, &b);
|
||||
xbg.pixel = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
curs = 0;
|
||||
curs = XCreatePixmapCursor(disp, pmap, mask, &xfg, &xbg, xh, yh);
|
||||
EFreePixmap(disp, pmap);
|
||||
|
|
|
@ -331,13 +331,13 @@ KeepBGimages(Background * bg, char onoff)
|
|||
{
|
||||
bg->keepim = 0;
|
||||
if (bg->bg.im)
|
||||
Imlib_destroy_image(id, bg->bg.im);
|
||||
Imlib_destroy_image(pImlibData, bg->bg.im);
|
||||
bg->bg.im = NULL;
|
||||
if (bg->top.im)
|
||||
Imlib_destroy_image(id, bg->top.im);
|
||||
Imlib_destroy_image(pImlibData, bg->top.im);
|
||||
bg->top.im = NULL;
|
||||
if (bg->pmap)
|
||||
Imlib_free_pixmap(id, bg->pmap);
|
||||
Imlib_free_pixmap(pImlibData, bg->pmap);
|
||||
bg->pmap = 0;
|
||||
}
|
||||
}
|
||||
|
@ -352,14 +352,14 @@ RemoveImagesFromBG(Background * bg)
|
|||
bg->bg.file = NULL;
|
||||
bg->bg.real_file = NULL;
|
||||
if (bg->bg.im)
|
||||
Imlib_destroy_image(id, bg->bg.im);
|
||||
Imlib_destroy_image(pImlibData, bg->bg.im);
|
||||
bg->bg.im = NULL;
|
||||
if (bg->top.im)
|
||||
Imlib_destroy_image(id, bg->top.im);
|
||||
Imlib_destroy_image(pImlibData, bg->top.im);
|
||||
bg->top.im = NULL;
|
||||
bg->keepim = 0;
|
||||
if (bg->pmap)
|
||||
Imlib_free_pixmap(id, bg->pmap);
|
||||
Imlib_free_pixmap(pImlibData, bg->pmap);
|
||||
bg->pmap = 0;
|
||||
}
|
||||
|
||||
|
@ -388,15 +388,15 @@ FreeDesktopBG(Background * bg)
|
|||
if (bg->bg.real_file)
|
||||
Efree(bg->bg.real_file);
|
||||
if (bg->bg.im)
|
||||
Imlib_destroy_image(id, bg->bg.im);
|
||||
Imlib_destroy_image(pImlibData, bg->bg.im);
|
||||
if (bg->top.file)
|
||||
Efree(bg->top.file);
|
||||
if (bg->top.real_file)
|
||||
Efree(bg->top.real_file);
|
||||
if (bg->top.im)
|
||||
Imlib_destroy_image(id, bg->top.im);
|
||||
Imlib_destroy_image(pImlibData, bg->top.im);
|
||||
if (bg->pmap)
|
||||
Imlib_free_pixmap(id, bg->pmap);
|
||||
Imlib_free_pixmap(pImlibData, bg->pmap);
|
||||
if (bg->name)
|
||||
Efree(bg->name);
|
||||
Efree(bg);
|
||||
|
@ -415,13 +415,13 @@ CreateDesktopBG(char *name, ImlibColor * solid, char *bg, char tile,
|
|||
|
||||
EDBUG(6, "CreateDesktopBG");
|
||||
|
||||
if (ird)
|
||||
if (prImlibData)
|
||||
{
|
||||
imd = ird;
|
||||
imd = prImlibData;
|
||||
}
|
||||
else
|
||||
{
|
||||
imd = id;
|
||||
imd = pImlibData;
|
||||
}
|
||||
|
||||
d = Emalloc(sizeof(Background));
|
||||
|
@ -501,10 +501,10 @@ RefreshDesktop(int num)
|
|||
dsk = desks.desk[num].bg;
|
||||
if (!dsk)
|
||||
EDBUG_RETURN_;
|
||||
if ((ird) && (num == 0))
|
||||
imd = ird;
|
||||
if ((prImlibData) && (num == 0))
|
||||
imd = prImlibData;
|
||||
else
|
||||
imd = id;
|
||||
imd = pImlibData;
|
||||
|
||||
SetBackgroundTo(imd, desks.desk[num].win, dsk, 1);
|
||||
EDBUG_RETURN_;
|
||||
|
@ -528,8 +528,9 @@ SetBackgroundTo(ImlibData * imd, Window win, Background * dsk, char setbg)
|
|||
EDBUG_RETURN_;
|
||||
GetWinWH(win, &rw, &rh);
|
||||
depth = GetWinDepth(win);
|
||||
if ((depth != imd->x.depth) && (ird) && (depth == ird->x.depth))
|
||||
imd = ird;
|
||||
if ((depth != imd->x.depth) && (prImlibData)
|
||||
&& (depth == prImlibData->x.depth))
|
||||
imd = prImlibData;
|
||||
r = dsk->bg.solid.r;
|
||||
g = dsk->bg.solid.g;
|
||||
b = dsk->bg.solid.b;
|
||||
|
@ -540,7 +541,7 @@ SetBackgroundTo(ImlibData * imd, Window win, Background * dsk, char setbg)
|
|||
h = 0;
|
||||
hasbg = 0;
|
||||
hasfg = 0;
|
||||
rt = Imlib_get_render_type(id);
|
||||
rt = Imlib_get_render_type(pImlibData);
|
||||
|
||||
if (desks.hiqualitybg)
|
||||
Imlib_set_render_type(imd, RT_DITHER_TRUECOL);
|
||||
|
@ -585,15 +586,21 @@ SetBackgroundTo(ImlibData * imd, Window win, Background * dsk, char setbg)
|
|||
cm->ref_count++;
|
||||
if (dsk->top.im)
|
||||
{
|
||||
Imlib_set_image_red_curve(id, dsk->top.im, cm->red.map);
|
||||
Imlib_set_image_green_curve(id, dsk->top.im, cm->green.map);
|
||||
Imlib_set_image_blue_curve(id, dsk->top.im, cm->blue.map);
|
||||
Imlib_set_image_red_curve(pImlibData, dsk->top.im,
|
||||
cm->red.map);
|
||||
Imlib_set_image_green_curve(pImlibData, dsk->top.im,
|
||||
cm->green.map);
|
||||
Imlib_set_image_blue_curve(pImlibData, dsk->top.im,
|
||||
cm->blue.map);
|
||||
}
|
||||
if (dsk->bg.im)
|
||||
{
|
||||
Imlib_set_image_red_curve(id, dsk->bg.im, cm->red.map);
|
||||
Imlib_set_image_green_curve(id, dsk->bg.im, cm->green.map);
|
||||
Imlib_set_image_blue_curve(id, dsk->bg.im, cm->blue.map);
|
||||
Imlib_set_image_red_curve(pImlibData, dsk->bg.im,
|
||||
cm->red.map);
|
||||
Imlib_set_image_green_curve(pImlibData, dsk->bg.im,
|
||||
cm->green.map);
|
||||
Imlib_set_image_blue_curve(pImlibData, dsk->bg.im,
|
||||
cm->blue.map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2197,15 +2204,15 @@ DesktopAccounting()
|
|||
{
|
||||
if ((now - lst[i]->last_viewed) > mode.desktop_bg_timeout)
|
||||
{
|
||||
imd = id;
|
||||
imd = pImlibData;
|
||||
for (j = 0; j < ENLIGHTENMENT_CONF_NUM_DESKTOPS; j++)
|
||||
{
|
||||
if (desks.desk[j].bg == lst[i])
|
||||
{
|
||||
if ((ird) && (j == 0))
|
||||
imd = ird;
|
||||
if ((prImlibData) && (j == 0))
|
||||
imd = prImlibData;
|
||||
else
|
||||
imd = id;
|
||||
imd = pImlibData;
|
||||
j = ENLIGHTENMENT_CONF_NUM_DESKTOPS;
|
||||
}
|
||||
}
|
||||
|
|
14
src/dialog.c
14
src/dialog.c
|
@ -1000,7 +1000,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
{
|
||||
di->item.slider.base_orig_w = im->rgb_width;
|
||||
di->item.slider.base_orig_h = im->rgb_height;
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
if (di->item.slider.ic_base)
|
||||
|
@ -1038,7 +1038,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
{
|
||||
di->item.slider.knob_orig_w = im->rgb_width;
|
||||
di->item.slider.knob_orig_h = im->rgb_height;
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
if (!di->item.slider.ic_border)
|
||||
|
@ -1068,7 +1068,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
{
|
||||
di->item.slider.border_orig_w = im->rgb_width;
|
||||
di->item.slider.border_orig_h = im->rgb_height;
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
di->item.slider.border_win =
|
||||
ECreateWindow(d->win, -20, -20, 2, 2, 0);
|
||||
EMapWindow(disp, di->item.slider.border_win);
|
||||
|
@ -1132,7 +1132,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
{
|
||||
di->item.check_button.check_orig_w = im->rgb_width;
|
||||
di->item.check_button.check_orig_h = im->rgb_height;
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
TextSize(di->tclass, 0, 0, STATE_NORMAL, di->item.check_button.text,
|
||||
|
@ -1168,8 +1168,8 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
ih = im->rgb_height;
|
||||
di->win = ECreateWindow(d->win, 0, 0, iw, ih, 0);
|
||||
EMapWindow(disp, di->win);
|
||||
Imlib_apply_image(id, im, di->win);
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_apply_image(pImlibData, im, di->win);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
di->w = iw;
|
||||
|
@ -1193,7 +1193,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
|
|||
{
|
||||
di->item.radio_button.radio_orig_w = im->rgb_width;
|
||||
di->item.radio_button.radio_orig_h = im->rgb_height;
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
TextSize(di->tclass, 0, 0, STATE_NORMAL, di->item.radio_button.text,
|
||||
|
|
25
src/draw.c
25
src/draw.c
|
@ -281,17 +281,17 @@ ECreatePixImg(Window win, int w, int h)
|
|||
int bpp;
|
||||
PixImg *pi;
|
||||
|
||||
if (id->x.depth <= 8)
|
||||
if (pImlibData->x.depth <= 8)
|
||||
bpp = 1;
|
||||
else if (id->x.depth <= 16)
|
||||
else if (pImlibData->x.depth <= 16)
|
||||
bpp = 2;
|
||||
else if (id->x.depth <= 24)
|
||||
else if (pImlibData->x.depth <= 24)
|
||||
bpp = 3;
|
||||
else
|
||||
bpp = 4;
|
||||
if ((id->max_shm) && ((bpp * w * h) > id->max_shm))
|
||||
if ((pImlibData->max_shm) && ((bpp * w * h) > pImlibData->max_shm))
|
||||
return NULL;
|
||||
if ((!id->x.shm) || (!id->x.shmp))
|
||||
if ((!pImlibData->x.shm) || (!pImlibData->x.shmp))
|
||||
return NULL;
|
||||
|
||||
pi = Emalloc(sizeof(PixImg));
|
||||
|
@ -556,7 +556,7 @@ EBlendPixImg(EWin * ewin, PixImg * s1, PixImg * s2, PixImg * dst, int x, int y,
|
|||
}
|
||||
break;
|
||||
case 16:
|
||||
if (id->x.render_depth != 15)
|
||||
if (pImlibData->x.render_depth != 15)
|
||||
{
|
||||
for (j = 0; j < h; j++)
|
||||
{
|
||||
|
@ -918,16 +918,17 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h, char firstlast)
|
|||
md = 0;
|
||||
if (md == 5)
|
||||
{
|
||||
if (id->x.depth <= 8)
|
||||
if (pImlibData->x.depth <= 8)
|
||||
bpp = 1;
|
||||
else if (id->x.depth <= 16)
|
||||
else if (pImlibData->x.depth <= 16)
|
||||
bpp = 2;
|
||||
else if (id->x.depth <= 24)
|
||||
else if (pImlibData->x.depth <= 24)
|
||||
bpp = 3;
|
||||
else
|
||||
bpp = 4;
|
||||
if ((ird) || ((id->max_shm) && ((bpp * w * h) > id->max_shm))
|
||||
|| ((!id->x.shm) || (!id->x.shmp)))
|
||||
if ((prImlibData)
|
||||
|| ((pImlibData->max_shm) && ((bpp * w * h) > pImlibData->max_shm))
|
||||
|| ((!pImlibData->x.shm) || (!pImlibData->x.shmp)))
|
||||
md = 0;
|
||||
}
|
||||
pw = w;
|
||||
|
@ -1353,7 +1354,7 @@ ImlibImage *
|
|||
ELoadImage(char *file)
|
||||
{
|
||||
EDBUG(5, "ELoadImage");
|
||||
EDBUG_RETURN(ELoadImageImlibData(id, file));
|
||||
EDBUG_RETURN(ELoadImageImlibData(pImlibData, file));
|
||||
}
|
||||
|
||||
ImlibImage *
|
||||
|
|
28
src/fx.c
28
src/fx.c
|
@ -237,14 +237,14 @@ FX_ripple_timeout(int val, void *data)
|
|||
XGCValues gcv;
|
||||
|
||||
fx_ripple_win = desks.desk[desks.current].win;
|
||||
if ((desks.current == 0) && (ird))
|
||||
if ((desks.current == 0) && (prImlibData))
|
||||
fx_ripple_above =
|
||||
ECreatePixmap(disp, fx_ripple_win, root.w, fx_ripple_waterh * 2,
|
||||
ird->x.depth);
|
||||
prImlibData->x.depth);
|
||||
else
|
||||
fx_ripple_above =
|
||||
ECreatePixmap(disp, fx_ripple_win, root.w, fx_ripple_waterh * 2,
|
||||
id->x.depth);
|
||||
pImlibData->x.depth);
|
||||
if (gc)
|
||||
XFreeGC(disp, gc);
|
||||
if (gc1)
|
||||
|
@ -382,7 +382,7 @@ FX_raindrops_timeout(int val, void *data)
|
|||
{
|
||||
XGCValues gcv;
|
||||
|
||||
if (!id->x.shm)
|
||||
if (!pImlibData->x.shm)
|
||||
{
|
||||
DIALOG_OK(_("Unable to display raindrops"),
|
||||
_("\n"
|
||||
|
@ -398,7 +398,7 @@ FX_raindrops_timeout(int val, void *data)
|
|||
"and editing it, enabling shared memory.\n" "\n"));
|
||||
return;
|
||||
}
|
||||
if (!id->x.shmp)
|
||||
if (!pImlibData->x.shmp)
|
||||
{
|
||||
DIALOG_OK(_("Unable to display raindrops"),
|
||||
_("\n"
|
||||
|
@ -693,14 +693,14 @@ FX_Wave_timeout(int val, void *data)
|
|||
XGCValues gcv;
|
||||
|
||||
fx_wave_win = desks.desk[desks.current].win;
|
||||
if ((desks.current == 0) && (ird))
|
||||
if ((desks.current == 0) && (prImlibData))
|
||||
fx_wave_above =
|
||||
XCreatePixmap(disp, fx_wave_win, root.w, FX_WAVE_WATERH * 2,
|
||||
ird->x.depth);
|
||||
prImlibData->x.depth);
|
||||
else
|
||||
fx_wave_above =
|
||||
XCreatePixmap(disp, fx_wave_win, root.w, FX_WAVE_WATERH * 2,
|
||||
id->x.depth);
|
||||
pImlibData->x.depth);
|
||||
if (gc)
|
||||
XFreeGC(disp, gc);
|
||||
if (gc1)
|
||||
|
@ -868,10 +868,10 @@ FX_imagespinner_timeout(int val, void *data)
|
|||
if (!fx_imagespinner_win)
|
||||
{
|
||||
fx_imagespinner_win = desks.desk[desks.current].win;
|
||||
if ((desks.current == 0) && (ird))
|
||||
fx_imagespinner_imd = ird;
|
||||
if ((desks.current == 0) && (prImlibData))
|
||||
fx_imagespinner_imd = prImlibData;
|
||||
else
|
||||
fx_imagespinner_imd = id;
|
||||
fx_imagespinner_imd = pImlibData;
|
||||
if (!before)
|
||||
DIALOG_OK(_("Starting up imagespinners FX..."),
|
||||
_("\n" "You have just started the imagespinners Effect.\n"
|
||||
|
@ -927,10 +927,10 @@ void
|
|||
FX_ImageSpinner_Desk(void)
|
||||
{
|
||||
fx_imagespinner_win = desks.desk[desks.current].win;
|
||||
if ((desks.current == 0) && (ird))
|
||||
fx_imagespinner_imd = ird;
|
||||
if ((desks.current == 0) && (prImlibData))
|
||||
fx_imagespinner_imd = prImlibData;
|
||||
else
|
||||
fx_imagespinner_imd = id;
|
||||
fx_imagespinner_imd = pImlibData;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -34,8 +34,8 @@ int master_screen;
|
|||
int display_screens;
|
||||
int single_screen_mode;
|
||||
Display *disp;
|
||||
ImlibData *id;
|
||||
ImlibData *ird;
|
||||
ImlibData *pImlibData;
|
||||
ImlibData *prImlibData;
|
||||
|
||||
#if USE_FNLIB
|
||||
FnlibData *pFnlibData;
|
||||
|
|
73
src/iclass.c
73
src/iclass.c
|
@ -63,7 +63,7 @@ FreeImageState(ImageState * i)
|
|||
Efree(i->real_file);
|
||||
|
||||
if (i->im)
|
||||
Imlib_destroy_image(id, i->im);
|
||||
Imlib_destroy_image(pImlibData, i->im);
|
||||
if (i->transp)
|
||||
Efree(i->transp);
|
||||
if (i->border)
|
||||
|
@ -183,27 +183,27 @@ ImageStatePopulate(ImageState * is)
|
|||
r = is->bg.r;
|
||||
g = is->bg.g;
|
||||
b = is->bg.b;
|
||||
is->bg.pixel = Imlib_best_color_match(id, &r, &g, &b);
|
||||
is->bg.pixel = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
|
||||
r = is->hi.r;
|
||||
g = is->hi.g;
|
||||
b = is->hi.b;
|
||||
is->hi.pixel = Imlib_best_color_match(id, &r, &g, &b);
|
||||
is->hi.pixel = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
|
||||
r = is->lo.r;
|
||||
g = is->lo.g;
|
||||
b = is->lo.b;
|
||||
is->lo.pixel = Imlib_best_color_match(id, &r, &g, &b);
|
||||
is->lo.pixel = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
|
||||
r = is->hihi.r;
|
||||
g = is->hihi.g;
|
||||
b = is->hihi.b;
|
||||
is->hihi.pixel = Imlib_best_color_match(id, &r, &g, &b);
|
||||
is->hihi.pixel = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
|
||||
r = is->lolo.r;
|
||||
g = is->lolo.g;
|
||||
b = is->lolo.b;
|
||||
is->lolo.pixel = Imlib_best_color_match(id, &r, &g, &b);
|
||||
is->lolo.pixel = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
|
||||
EDBUG_RETURN_;
|
||||
|
||||
|
@ -652,18 +652,19 @@ IclassApply(ImageClass * iclass, Window win, int w, int h, int active,
|
|||
is->real_file = FindFile(is->im_file);
|
||||
is->im = ELoadImage(is->real_file);
|
||||
if (is->border)
|
||||
Imlib_set_image_border(id, is->im, is->border);
|
||||
Imlib_set_image_border(pImlibData, is->im,
|
||||
is->border);
|
||||
if (is->transp)
|
||||
Imlib_set_image_shape(id, is->im, is->transp);
|
||||
Imlib_set_image_shape(pImlibData, is->im, is->transp);
|
||||
/* disabled - no idea what causes this but it causes a memory leak somewhere */
|
||||
/* and thus will be disabled - there is no time to debug this any further */
|
||||
/* if (is->colmod)
|
||||
* {
|
||||
* Imlib_set_image_red_curve(id, is->im,
|
||||
* Imlib_set_image_red_curve(pImlibData, is->im,
|
||||
* is->colmod->red.map);
|
||||
* Imlib_set_image_green_curve(id, is->im,
|
||||
* Imlib_set_image_green_curve(pImlibData, is->im,
|
||||
* is->colmod->green.map);
|
||||
* Imlib_set_image_blue_curve(id, is->im,
|
||||
* Imlib_set_image_blue_curve(pImlibData, is->im,
|
||||
* is->colmod->blue.map);
|
||||
* }
|
||||
*/
|
||||
|
@ -673,15 +674,15 @@ IclassApply(ImageClass * iclass, Window win, int w, int h, int active,
|
|||
/* if image, render */
|
||||
if (is->pixmapfillstyle == FILL_STRETCH)
|
||||
{
|
||||
Imlib_render(id, is->im, w, h);
|
||||
pmap = Imlib_move_image(id, is->im);
|
||||
mask = Imlib_move_mask(id, is->im);
|
||||
Imlib_render(pImlibData, is->im, w, h);
|
||||
pmap = Imlib_move_image(pImlibData, is->im);
|
||||
mask = Imlib_move_mask(pImlibData, is->im);
|
||||
if (pmap)
|
||||
{
|
||||
ESetWindowBackgroundPixmap(disp, win, pmap);
|
||||
EShapeCombineMask(disp, win, ShapeBounding, 0,
|
||||
0, mask, ShapeSet);
|
||||
Imlib_free_pixmap(id, pmap);
|
||||
Imlib_free_pixmap(pImlibData, pmap);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -715,9 +716,9 @@ IclassApply(ImageClass * iclass, Window win, int w, int h, int active,
|
|||
ch = 1;
|
||||
ph = h / ch;
|
||||
}
|
||||
Imlib_render(id, is->im, pw, ph);
|
||||
pmap = Imlib_move_image(id, is->im);
|
||||
mask = Imlib_move_mask(id, is->im);
|
||||
Imlib_render(pImlibData, is->im, pw, ph);
|
||||
pmap = Imlib_move_image(pImlibData, is->im);
|
||||
mask = Imlib_move_mask(pImlibData, is->im);
|
||||
if (mask)
|
||||
{
|
||||
gcv.fill_style = FillTiled;
|
||||
|
@ -736,7 +737,7 @@ IclassApply(ImageClass * iclass, Window win, int w, int h, int active,
|
|||
EFreePixmap(disp, tm);
|
||||
}
|
||||
ESetWindowBackgroundPixmap(disp, win, pmap);
|
||||
Imlib_free_pixmap(id, pmap);
|
||||
Imlib_free_pixmap(pImlibData, pmap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -748,7 +749,7 @@ IclassApply(ImageClass * iclass, Window win, int w, int h, int active,
|
|||
/* if unloadable - then unload */
|
||||
if ((is->unloadable) || (mode.memory_paranoia))
|
||||
{
|
||||
Imlib_destroy_image(id, is->im);
|
||||
Imlib_destroy_image(pImlibData, is->im);
|
||||
is->im = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -973,14 +974,14 @@ IclassApplyCopy(ImageClass * iclass, Window win, int w, int h, int active,
|
|||
/* if image, render */
|
||||
if (is->pixmapfillstyle == FILL_STRETCH)
|
||||
{
|
||||
Imlib_render(id, is->im, w, h);
|
||||
*pret = Imlib_copy_image(id, is->im);
|
||||
Imlib_render(pImlibData, is->im, w, h);
|
||||
*pret = Imlib_copy_image(pImlibData, is->im);
|
||||
if (mret)
|
||||
*mret = Imlib_copy_mask(id, is->im);
|
||||
*mret = Imlib_copy_mask(pImlibData, is->im);
|
||||
/* if unloadable - then unload */
|
||||
if ((is->unloadable) || (mode.memory_paranoia))
|
||||
{
|
||||
Imlib_destroy_image(id, is->im);
|
||||
Imlib_destroy_image(pImlibData, is->im);
|
||||
is->im = NULL;
|
||||
}
|
||||
EDBUG_RETURN_;
|
||||
|
@ -1016,10 +1017,10 @@ IclassApplyCopy(ImageClass * iclass, Window win, int w, int h, int active,
|
|||
ch = 1;
|
||||
ph = h / ch;
|
||||
}
|
||||
Imlib_render(id, is->im, pw, ph);
|
||||
pmap = Imlib_move_image(id, is->im);
|
||||
mask = Imlib_move_mask(id, is->im);
|
||||
tp = ECreatePixmap(disp, win, w, h, id->x.depth);
|
||||
Imlib_render(pImlibData, is->im, pw, ph);
|
||||
pmap = Imlib_move_image(pImlibData, is->im);
|
||||
mask = Imlib_move_mask(pImlibData, is->im);
|
||||
tp = ECreatePixmap(disp, win, w, h, pImlibData->x.depth);
|
||||
if ((mret) && (mask))
|
||||
tm = ECreatePixmap(disp, win, w, h, 1);
|
||||
gcv.fill_style = FillTiled;
|
||||
|
@ -1047,11 +1048,11 @@ IclassApplyCopy(ImageClass * iclass, Window win, int w, int h, int active,
|
|||
*pret = tp;
|
||||
if (mret)
|
||||
*mret = tm;
|
||||
Imlib_free_pixmap(id, pmap);
|
||||
Imlib_free_pixmap(pImlibData, pmap);
|
||||
/* if unloadable - then unload */
|
||||
if ((is->unloadable) || (mode.memory_paranoia))
|
||||
{
|
||||
Imlib_destroy_image(id, is->im);
|
||||
Imlib_destroy_image(pImlibData, is->im);
|
||||
is->im = NULL;
|
||||
}
|
||||
EDBUG_RETURN_;
|
||||
|
@ -1061,7 +1062,7 @@ IclassApplyCopy(ImageClass * iclass, Window win, int w, int h, int active,
|
|||
/* if there is a bevel to draw, draw it */
|
||||
if (is->bevelstyle != BEVEL_NONE)
|
||||
{
|
||||
*pret = ECreatePixmap(disp, win, w, h, id->x.depth);
|
||||
*pret = ECreatePixmap(disp, win, w, h, pImlibData->x.depth);
|
||||
gc = XCreateGC(disp, *pret, 0, &gcv);
|
||||
/* bg color */
|
||||
XSetForeground(disp, gc, is->bg.pixel);
|
||||
|
@ -1178,16 +1179,16 @@ ImageStateRealize(ImageState * is)
|
|||
is->real_file = FindFile(is->im_file);
|
||||
is->im = ELoadImage(is->real_file);
|
||||
if (is->border)
|
||||
Imlib_set_image_border(id, is->im, is->border);
|
||||
Imlib_set_image_border(pImlibData, is->im, is->border);
|
||||
if (is->transp)
|
||||
Imlib_set_image_shape(id, is->im, is->transp);
|
||||
Imlib_set_image_shape(pImlibData, is->im, is->transp);
|
||||
if (is->colmod)
|
||||
{
|
||||
Imlib_set_image_red_curve(id, is->im,
|
||||
Imlib_set_image_red_curve(pImlibData, is->im,
|
||||
is->colmod->red.map);
|
||||
Imlib_set_image_green_curve(id, is->im,
|
||||
Imlib_set_image_green_curve(pImlibData, is->im,
|
||||
is->colmod->green.map);
|
||||
Imlib_set_image_blue_curve(id, is->im,
|
||||
Imlib_set_image_blue_curve(pImlibData, is->im,
|
||||
is->colmod->blue.map);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -411,7 +411,7 @@ CreateIconbox(char *name)
|
|||
ib->arrow2_win = ECreateWindow(ib->win, 122, 26, 6, 6, 0);
|
||||
ib->scrollbar_win = ECreateWindow(ib->scroll_win, 122, 26, 6, 6, 0);
|
||||
ib->scrollbarknob_win = ECreateWindow(ib->scrollbar_win, -20, -20, 4, 4, 0);
|
||||
ib->pmap = ECreatePixmap(disp, ib->icon_win, 128, 32, id->x.depth);
|
||||
ib->pmap = ECreatePixmap(disp, ib->icon_win, 128, 32, pImlibData->x.depth);
|
||||
XSelectInput(disp, ib->icon_win,
|
||||
EnterWindowMask | LeaveWindowMask | ButtonPressMask |
|
||||
ButtonReleaseMask | PointerMotionMask);
|
||||
|
@ -634,7 +634,7 @@ IB_SnapEWin(EWin * ewin)
|
|||
h = 4;
|
||||
ewin->icon_pmap_w = w;
|
||||
ewin->icon_pmap_h = h;
|
||||
ewin->icon_pmap = ECreatePixmap(disp, ewin->win, w, h, id->x.depth);
|
||||
ewin->icon_pmap = ECreatePixmap(disp, ewin->win, w, h, pImlibData->x.depth);
|
||||
PagerScaleRect(ewin->icon_pmap, ewin->win, 0, 0, 0, 0, ewin->w, ewin->h, w,
|
||||
h);
|
||||
r = EShapeGetRectangles(disp, ewin->win, ShapeBounding, &rn, &ord);
|
||||
|
@ -670,9 +670,9 @@ IB_SnapEWin(EWin * ewin)
|
|||
if ((ewin->icon_pmap_w < 1) || (ewin->icon_pmap_h < 1))
|
||||
{
|
||||
if (ewin->icon_pmap)
|
||||
Imlib_free_pixmap(id, ewin->icon_pmap);
|
||||
Imlib_free_pixmap(pImlibData, ewin->icon_pmap);
|
||||
if (ewin->icon_mask)
|
||||
Imlib_free_pixmap(id, ewin->icon_mask);
|
||||
Imlib_free_pixmap(pImlibData, ewin->icon_mask);
|
||||
ewin->icon_pmap = 0;
|
||||
ewin->icon_mask = 0;
|
||||
}
|
||||
|
@ -706,14 +706,16 @@ IB_GetAppIcon(EWin * ewin)
|
|||
r = 255;
|
||||
g = 255;
|
||||
b = 255;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XFillRectangle(disp, ewin->icon_pmap, gc, 0, 0, w, h);
|
||||
r = 0;
|
||||
g = 0;
|
||||
b = 0;
|
||||
XSetClipOrigin(disp, gc, 0, 0);
|
||||
XSetClipMask(disp, gc, ewin->client.icon_pmap);
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XFillRectangle(disp, ewin->icon_pmap, gc, 0, 0, w, h);
|
||||
XFreeGC(disp, gc);
|
||||
}
|
||||
|
@ -724,9 +726,9 @@ IB_GetAppIcon(EWin * ewin)
|
|||
if ((ewin->icon_pmap_w < 1) || (ewin->icon_pmap_h < 1))
|
||||
{
|
||||
if (ewin->icon_pmap)
|
||||
Imlib_free_pixmap(id, ewin->icon_pmap);
|
||||
Imlib_free_pixmap(pImlibData, ewin->icon_pmap);
|
||||
if (ewin->icon_mask)
|
||||
Imlib_free_pixmap(id, ewin->icon_mask);
|
||||
Imlib_free_pixmap(pImlibData, ewin->icon_mask);
|
||||
ewin->icon_pmap = 0;
|
||||
ewin->icon_mask = 0;
|
||||
}
|
||||
|
@ -744,8 +746,8 @@ IB_PasteDefaultBase(Drawable d, int x, int y, int w, int h)
|
|||
return;
|
||||
IclassApplyCopy(ic, d, w, h, 0, 0, STATE_NORMAL, &p, &m);
|
||||
PastePixmap(disp, d, p, m, x, y);
|
||||
Imlib_free_pixmap(id, p);
|
||||
Imlib_free_pixmap(id, m);
|
||||
Imlib_free_pixmap(pImlibData, p);
|
||||
Imlib_free_pixmap(pImlibData, m);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -764,7 +766,7 @@ IB_PasteDefaultBaseMask(Drawable d, int x, int y, int w, int h)
|
|||
if (m)
|
||||
{
|
||||
PasteMask(disp, d, m, x, y, w, h);
|
||||
Imlib_free_pixmap(id, m);
|
||||
Imlib_free_pixmap(pImlibData, m);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -773,7 +775,7 @@ IB_PasteDefaultBaseMask(Drawable d, int x, int y, int w, int h)
|
|||
XFillRectangle(disp, d, gc, x, y, w, h);
|
||||
XFreeGC(disp, gc);
|
||||
}
|
||||
Imlib_free_pixmap(id, p);
|
||||
Imlib_free_pixmap(pImlibData, p);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -826,12 +828,12 @@ IB_GetEIcon(EWin * ewin)
|
|||
h = mh;
|
||||
}
|
||||
}
|
||||
Imlib_render(id, im, w, h);
|
||||
ewin->icon_pmap = Imlib_copy_image(id, im);
|
||||
ewin->icon_mask = Imlib_copy_mask(id, im);
|
||||
Imlib_render(pImlibData, im, w, h);
|
||||
ewin->icon_pmap = Imlib_copy_image(pImlibData, im);
|
||||
ewin->icon_mask = Imlib_copy_mask(pImlibData, im);
|
||||
ewin->icon_pmap_w = w;
|
||||
ewin->icon_pmap_h = h;
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1151,9 +1153,9 @@ UpdateAppIcon(EWin * ewin, int imode)
|
|||
{
|
||||
/* free whatever we had before */
|
||||
if (ewin->icon_pmap)
|
||||
Imlib_free_pixmap(id, ewin->icon_pmap);
|
||||
Imlib_free_pixmap(pImlibData, ewin->icon_pmap);
|
||||
if (ewin->icon_mask)
|
||||
Imlib_free_pixmap(id, ewin->icon_mask);
|
||||
Imlib_free_pixmap(pImlibData, ewin->icon_mask);
|
||||
ewin->icon_pmap = 0;
|
||||
ewin->icon_mask = 0;
|
||||
|
||||
|
@ -2041,7 +2043,8 @@ RedrawIconbox(Iconbox * ib)
|
|||
EResizeWindow(disp, ib->win, w, h);
|
||||
ICCCM_Configure(ib->ewin);
|
||||
EFreePixmap(disp, ib->pmap);
|
||||
ib->pmap = ECreatePixmap(disp, ib->icon_win, w, h, id->x.depth);
|
||||
ib->pmap =
|
||||
ECreatePixmap(disp, ib->icon_win, w, h, pImlibData->x.depth);
|
||||
}
|
||||
ib->w = w;
|
||||
ib->h = h;
|
||||
|
@ -2118,8 +2121,8 @@ RedrawIconbox(Iconbox * ib)
|
|||
EShapeCombineMask(disp, ib->icon_win, ShapeBounding, 0, 0,
|
||||
mask, ShapeSet);
|
||||
PastePixmap(disp, ib->pmap, pmap, mask, 0, 0);
|
||||
Imlib_free_pixmap(id, pmap);
|
||||
Imlib_free_pixmap(id, mask);
|
||||
Imlib_free_pixmap(pImlibData, pmap);
|
||||
Imlib_free_pixmap(pImlibData, mask);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2246,8 +2249,8 @@ RedrawIconbox(Iconbox * ib)
|
|||
EShapeCombineMask(disp, ib->icon_win, ShapeBounding, 0, 0,
|
||||
mask, ShapeSet);
|
||||
PastePixmap(disp, ib->pmap, pmap, mask, 0, 0);
|
||||
Imlib_free_pixmap(id, pmap);
|
||||
Imlib_free_pixmap(id, mask);
|
||||
Imlib_free_pixmap(pImlibData, pmap);
|
||||
Imlib_free_pixmap(pImlibData, mask);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2336,7 +2339,7 @@ IconboxResize(Iconbox * ib, int w, int h)
|
|||
return;
|
||||
EResizeWindow(disp, ib->win, w, h);
|
||||
EFreePixmap(disp, ib->pmap);
|
||||
ib->pmap = ECreatePixmap(disp, ib->icon_win, w, h, id->x.depth);
|
||||
ib->pmap = ECreatePixmap(disp, ib->icon_win, w, h, pImlibData->x.depth);
|
||||
ib->w = w;
|
||||
ib->h = h;
|
||||
RedrawIconbox(ib);
|
||||
|
|
|
@ -1809,7 +1809,7 @@ IPC_ImageClass(char *params, Client * c)
|
|||
|
||||
word(params, 3, param3);
|
||||
p = (Pixmap) strtol(param3, (char **)NULL, 0);
|
||||
Imlib_free_pixmap(id, p);
|
||||
Imlib_free_pixmap(pImlibData, p);
|
||||
}
|
||||
else if (!strcmp(param2, "get_padding"))
|
||||
{
|
||||
|
@ -1843,14 +1843,14 @@ IPC_ImageClass(char *params, Client * c)
|
|||
iclass->norm.normal->real_file =
|
||||
FindFile(iclass->norm.normal->im_file);
|
||||
if (iclass->norm.normal->real_file)
|
||||
im = Imlib_load_image(id,
|
||||
im = Imlib_load_image(pImlibData,
|
||||
iclass->norm.
|
||||
normal->real_file);
|
||||
if (im)
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf), "%i %i",
|
||||
im->rgb_width, im->rgb_height);
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
else
|
||||
Esnprintf(buf, sizeof(buf),
|
||||
|
|
47
src/menus.c
47
src/menus.c
|
@ -588,9 +588,9 @@ DestroyMenu(Menu * m)
|
|||
for (j = 0; j < 3; j++)
|
||||
{
|
||||
if (m->items[i]->pmap[j])
|
||||
Imlib_free_pixmap(id, m->items[i]->pmap[j]);
|
||||
Imlib_free_pixmap(pImlibData, m->items[i]->pmap[j]);
|
||||
if (m->items[i]->mask[j])
|
||||
Imlib_free_pixmap(id, m->items[i]->mask[j]);
|
||||
Imlib_free_pixmap(pImlibData, m->items[i]->mask[j]);
|
||||
}
|
||||
if (m->items[i]->icon_iclass)
|
||||
m->items[i]->icon_iclass->ref_count--;
|
||||
|
@ -634,9 +634,9 @@ EmptyMenu(Menu * m)
|
|||
for (j = 0; j < 3; j++)
|
||||
{
|
||||
if (m->items[i]->pmap[j])
|
||||
Imlib_free_pixmap(id, m->items[i]->pmap[j]);
|
||||
Imlib_free_pixmap(pImlibData, m->items[i]->pmap[j]);
|
||||
if (m->items[i]->mask[j])
|
||||
Imlib_free_pixmap(id, m->items[i]->mask[j]);
|
||||
Imlib_free_pixmap(pImlibData, m->items[i]->mask[j]);
|
||||
}
|
||||
if (m->items[i]->win)
|
||||
EDestroyWindow(disp, m->items[i]->win);
|
||||
|
@ -764,7 +764,7 @@ RealizeMenu(Menu * m)
|
|||
maxh = im->rgb_height;
|
||||
if (im->rgb_width > maxx2)
|
||||
maxx2 = im->rgb_width;
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
else
|
||||
m->items[i]->icon_iclass = NULL;
|
||||
|
@ -933,7 +933,7 @@ DrawMenuItem(Menu * m, MenuItem * mi, char shape)
|
|||
if (!m->style->use_item_bg)
|
||||
{
|
||||
mi->pmap[(int)(mi->state)] =
|
||||
ECreatePixmap(disp, mi->win, w, h, id->x.depth);
|
||||
ECreatePixmap(disp, mi->win, w, h, pImlibData->x.depth);
|
||||
gc = XCreateGC(disp, m->pmap, 0, &gcv);
|
||||
XCopyArea(disp, m->pmap, mi->pmap[(int)(mi->state)], gc, x, y,
|
||||
w, h, 0, 0);
|
||||
|
@ -955,9 +955,9 @@ DrawMenuItem(Menu * m, MenuItem * mi, char shape)
|
|||
}
|
||||
XCopyArea(disp, pmap, mi->pmap[(int)(mi->state)], gc, 0,
|
||||
0, w, h, 0, 0);
|
||||
Imlib_free_pixmap(id, pmap);
|
||||
Imlib_free_pixmap(pImlibData, pmap);
|
||||
if (mask)
|
||||
Imlib_free_pixmap(id, mask);
|
||||
Imlib_free_pixmap(pImlibData, mask);
|
||||
}
|
||||
XFreeGC(disp, gc);
|
||||
}
|
||||
|
@ -1099,7 +1099,7 @@ CreateMenuFromDirectory(char *name, MenuStyle * ms, char *dir)
|
|||
|
||||
word(s, 2, s2);
|
||||
Esnprintf(ss, sizeof(ss), "%s/%s", dir, s2);
|
||||
im = Imlib_load_image(id, ss);
|
||||
im = Imlib_load_image(pImlibData, ss);
|
||||
if (im)
|
||||
{
|
||||
ImlibImage *im2;
|
||||
|
@ -1124,12 +1124,14 @@ CreateMenuFromDirectory(char *name, MenuStyle * ms, char *dir)
|
|||
h2 = (im->rgb_height * w2) /
|
||||
im->rgb_width;
|
||||
}
|
||||
im2 = Imlib_clone_scaled_image(id, im, w2, h2);
|
||||
Imlib_save_image_to_ppm(id, im2, s2);
|
||||
Imlib_changed_image(id, im2);
|
||||
Imlib_changed_image(id, im);
|
||||
Imlib_kill_image(id, im2);
|
||||
Imlib_kill_image(id, im);
|
||||
im2 =
|
||||
Imlib_clone_scaled_image(pImlibData, im, w2,
|
||||
h2);
|
||||
Imlib_save_image_to_ppm(pImlibData, im2, s2);
|
||||
Imlib_changed_image(pImlibData, im2);
|
||||
Imlib_changed_image(pImlibData, im);
|
||||
Imlib_kill_image(pImlibData, im2);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
scr_asp = (root.w << 16) / root.h;
|
||||
im_asp = (width << 16) / height;
|
||||
if (width == height)
|
||||
|
@ -1323,7 +1325,7 @@ CreateMenuFromDirectory(char *name, MenuStyle * ms, char *dir)
|
|||
{
|
||||
ImlibImage *im;
|
||||
|
||||
im = Imlib_load_image(id, ss);
|
||||
im = Imlib_load_image(pImlibData, ss);
|
||||
if (im)
|
||||
{
|
||||
ImlibImage *im2;
|
||||
|
@ -1345,12 +1347,13 @@ CreateMenuFromDirectory(char *name, MenuStyle * ms, char *dir)
|
|||
w2 = maxw;
|
||||
h2 = (im->rgb_height * w2) / im->rgb_width;
|
||||
}
|
||||
im2 = Imlib_clone_scaled_image(id, im, w2, h2);
|
||||
Imlib_save_image_to_ppm(id, im2, s2);
|
||||
Imlib_changed_image(id, im2);
|
||||
Imlib_changed_image(id, im);
|
||||
Imlib_kill_image(id, im2);
|
||||
Imlib_kill_image(id, im);
|
||||
im2 =
|
||||
Imlib_clone_scaled_image(pImlibData, im, w2, h2);
|
||||
Imlib_save_image_to_ppm(pImlibData, im2, s2);
|
||||
Imlib_changed_image(pImlibData, im2);
|
||||
Imlib_changed_image(pImlibData, im);
|
||||
Imlib_kill_image(pImlibData, im2);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
scr_asp = (root.w << 16) / root.h;
|
||||
im_asp = (width << 16) / height;
|
||||
if (width == height)
|
||||
|
|
94
src/pager.c
94
src/pager.c
|
@ -124,7 +124,7 @@ PagerScaleLine(Pixmap dest, Window src, int dx, int dy, int sw, int pw, int sy,
|
|||
xim3 = px_buf;
|
||||
}
|
||||
difx = (sw / pw) / 2;
|
||||
switch (id->x.render_depth)
|
||||
switch (pImlibData->x.render_depth)
|
||||
{
|
||||
case 24:
|
||||
case 32:
|
||||
|
@ -518,9 +518,9 @@ CreatePager(void)
|
|||
return NULL;
|
||||
if ((!did_dialog) && (SNAP))
|
||||
{
|
||||
if (id->x.shm)
|
||||
if (pImlibData->x.shm)
|
||||
{
|
||||
if (!id->x.shmp)
|
||||
if (!pImlibData->x.shmp)
|
||||
{
|
||||
if (XShmPixmapFormat(disp) != ZPixmap)
|
||||
{
|
||||
|
@ -579,8 +579,9 @@ CreatePager(void)
|
|||
p->dw = ((48 * root.w) / root.h);
|
||||
p->dh = 48;
|
||||
p->win = ECreateWindow(root.win, 0, 0, p->w, p->h, 0);
|
||||
p->pmap = ECreatePixmap(disp, p->win, p->w, p->h, id->x.depth);
|
||||
p->bgpmap = ECreatePixmap(disp, p->win, p->w / ax, p->h / ay, id->x.depth);
|
||||
p->pmap = ECreatePixmap(disp, p->win, p->w, p->h, pImlibData->x.depth);
|
||||
p->bgpmap =
|
||||
ECreatePixmap(disp, p->win, p->w / ax, p->h / ay, pImlibData->x.depth);
|
||||
ESetWindowBackgroundPixmap(disp, p->win, p->pmap);
|
||||
XSelectInput(disp, p->win,
|
||||
ButtonPressMask | ButtonReleaseMask | PointerMotionMask);
|
||||
|
@ -623,8 +624,9 @@ PagerResize(Pager * p, int w, int h)
|
|||
p->h = h;
|
||||
p->dw = w / ax;
|
||||
p->dh = h / ay;
|
||||
p->pmap = ECreatePixmap(disp, p->win, p->w, p->h, id->x.depth);
|
||||
p->bgpmap = ECreatePixmap(disp, p->win, p->w / ax, p->h / ay, id->x.depth);
|
||||
p->pmap = ECreatePixmap(disp, p->win, p->w, p->h, pImlibData->x.depth);
|
||||
p->bgpmap =
|
||||
ECreatePixmap(disp, p->win, p->w / ax, p->h / ay, pImlibData->x.depth);
|
||||
if (p->visible)
|
||||
PagerRedraw(p, 1);
|
||||
ESetWindowBackgroundPixmap(disp, p->win, p->pmap);
|
||||
|
@ -874,10 +876,11 @@ PagerEwinUpdateMini(Pager * p, EWin * ewin)
|
|||
{
|
||||
ImlibImage *im;
|
||||
|
||||
im = Imlib_create_image_from_drawable(id, ewin->mini_pmap, 0, 0, 0,
|
||||
ewin->mini_w, ewin->mini_h);
|
||||
Imlib_apply_image(id, im, p->hi_win);
|
||||
Imlib_kill_image(id, im);
|
||||
im =
|
||||
Imlib_create_image_from_drawable(pImlibData, ewin->mini_pmap, 0, 0,
|
||||
0, ewin->mini_w, ewin->mini_h);
|
||||
Imlib_apply_image(pImlibData, im, p->hi_win);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -924,10 +927,11 @@ PagerEwinUpdateFromPager(Pager * p, EWin * ewin)
|
|||
{
|
||||
ImlibImage *im;
|
||||
|
||||
im = Imlib_create_image_from_drawable(id, ewin->mini_pmap, 0, 0, 0,
|
||||
ewin->mini_w, ewin->mini_h);
|
||||
Imlib_apply_image(id, im, p->hi_win);
|
||||
Imlib_kill_image(id, im);
|
||||
im =
|
||||
Imlib_create_image_from_drawable(pImlibData, ewin->mini_pmap, 0, 0,
|
||||
0, ewin->mini_w, ewin->mini_h);
|
||||
Imlib_apply_image(pImlibData, im, p->hi_win);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -974,11 +978,11 @@ PagerRedraw(Pager * p, char newbg)
|
|||
r = 0;
|
||||
g = 0;
|
||||
b = 0;
|
||||
c1 = Imlib_best_color_match(id, &r, &g, &b);
|
||||
c1 = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
r = 255;
|
||||
g = 255;
|
||||
b = 255;
|
||||
c2 = Imlib_best_color_match(id, &r, &g, &b);
|
||||
c2 = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
gc = XCreateGC(disp, p->pmap, 0, &gcv);
|
||||
if (gc)
|
||||
{
|
||||
|
@ -1010,25 +1014,27 @@ PagerRedraw(Pager * p, char newbg)
|
|||
(p->h / ay), uniq);
|
||||
Efree(uniq);
|
||||
|
||||
im = Imlib_load_image(id, s);
|
||||
im = Imlib_load_image(pImlibData, s);
|
||||
if (im)
|
||||
{
|
||||
EFreePixmap(disp, p->bgpmap);
|
||||
Imlib_render(id, im, (p->w / ax), (p->h / ay));
|
||||
p->bgpmap = Imlib_copy_image(id, im);
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_render(pImlibData, im, (p->w / ax),
|
||||
(p->h / ay));
|
||||
p->bgpmap = Imlib_copy_image(pImlibData, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBackgroundTo(id, p->bgpmap,
|
||||
SetBackgroundTo(pImlibData, p->bgpmap,
|
||||
desks.desk[p->desktop].bg, 0);
|
||||
im = Imlib_create_image_from_drawable(id, p->bgpmap,
|
||||
0, 0, 0,
|
||||
(p->w / ax),
|
||||
(p->h / ay));
|
||||
Imlib_save_image_to_ppm(id, im, s);
|
||||
Imlib_changed_image(id, im);
|
||||
Imlib_kill_image(id, im);
|
||||
im =
|
||||
Imlib_create_image_from_drawable(pImlibData,
|
||||
p->bgpmap, 0, 0,
|
||||
0, (p->w / ax),
|
||||
(p->h / ay));
|
||||
Imlib_save_image_to_ppm(pImlibData, im, s);
|
||||
Imlib_changed_image(pImlibData, im);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1425,8 +1431,10 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
ImlibImage *im;
|
||||
int xx, yy, ww, hh, i;
|
||||
|
||||
im = Imlib_create_image_from_drawable(id, ewin->mini_pmap, 0, 0, 0,
|
||||
ewin->mini_w, ewin->mini_h);
|
||||
im =
|
||||
Imlib_create_image_from_drawable(pImlibData, ewin->mini_pmap, 0,
|
||||
0, 0, ewin->mini_w,
|
||||
ewin->mini_h);
|
||||
if (w > h)
|
||||
{
|
||||
for (i = w; i < (w * 2); i++)
|
||||
|
@ -1437,10 +1445,10 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
hh = (i * h) / w;
|
||||
xx = x + ((w - ww) / 2);
|
||||
yy = y + ((h - hh) / 2);
|
||||
Imlib_render(id, im, ww, hh);
|
||||
pmap = Imlib_move_image(id, im);
|
||||
Imlib_render(pImlibData, im, ww, hh);
|
||||
pmap = Imlib_move_image(pImlibData, im);
|
||||
ESetWindowBackgroundPixmap(disp, p->hi_win, pmap);
|
||||
Imlib_free_pixmap(id, pmap);
|
||||
Imlib_free_pixmap(pImlibData, pmap);
|
||||
EMoveResizeWindow(disp, p->hi_win, xx, yy, ww, hh);
|
||||
XClearWindow(disp, p->hi_win);
|
||||
{
|
||||
|
@ -1450,7 +1458,7 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
if ((px < x) || (py < y) || (px >= (x + w))
|
||||
|| (py >= (y + h)))
|
||||
{
|
||||
Imlib_kill_image(id, im);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
EUnmapWindow(disp, p->hi_win);
|
||||
return;
|
||||
}
|
||||
|
@ -1467,10 +1475,10 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
hh = i;
|
||||
xx = x + ((w - ww) / 2);
|
||||
yy = y + ((h - hh) / 2);
|
||||
Imlib_render(id, im, ww, hh);
|
||||
pmap = Imlib_move_image(id, im);
|
||||
Imlib_render(pImlibData, im, ww, hh);
|
||||
pmap = Imlib_move_image(pImlibData, im);
|
||||
ESetWindowBackgroundPixmap(disp, p->hi_win, pmap);
|
||||
Imlib_free_pixmap(id, pmap);
|
||||
Imlib_free_pixmap(pImlibData, pmap);
|
||||
EMoveResizeWindow(disp, p->hi_win, xx, yy, ww, hh);
|
||||
XClearWindow(disp, p->hi_win);
|
||||
{
|
||||
|
@ -1480,7 +1488,7 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
if ((px < x) || (py < y) || (px >= (x + w))
|
||||
|| (py >= (y + h)))
|
||||
{
|
||||
Imlib_kill_image(id, im);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
EUnmapWindow(disp, p->hi_win);
|
||||
return;
|
||||
}
|
||||
|
@ -1489,8 +1497,8 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
}
|
||||
EMoveResizeWindow(disp, p->hi_win, x - (w / 2), y - (h / 2), w * 2,
|
||||
h * 2);
|
||||
Imlib_apply_image(id, im, p->hi_win);
|
||||
Imlib_kill_image(id, im);
|
||||
Imlib_apply_image(pImlibData, im, p->hi_win);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
}
|
||||
else if (ic)
|
||||
{
|
||||
|
@ -1564,11 +1572,11 @@ PagerShowHi(Pager * p, EWin * ewin, int x, int y, int w, int h)
|
|||
r = 0;
|
||||
g = 0;
|
||||
b = 0;
|
||||
c1 = Imlib_best_color_match(id, &r, &g, &b);
|
||||
c1 = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
r = 255;
|
||||
g = 255;
|
||||
b = 255;
|
||||
c2 = Imlib_best_color_match(id, &r, &g, &b);
|
||||
c2 = Imlib_best_color_match(pImlibData, &r, &g, &b);
|
||||
pmap = ECreatePixmap(disp, p->hi_win, w * 2, h * 2, root.depth);
|
||||
ESetWindowBackgroundPixmap(disp, p->hi_win, pmap);
|
||||
if (!gc)
|
||||
|
|
|
@ -338,17 +338,17 @@ SC_SetImage(char *file)
|
|||
im = ELoadImage(file);
|
||||
if (im)
|
||||
{
|
||||
Imlib_render(id, im, im->rgb_width, im->rgb_height);
|
||||
pmap = Imlib_move_image(id, im);
|
||||
mask = Imlib_move_mask(id, im);
|
||||
Imlib_render(pImlibData, im, im->rgb_width, im->rgb_height);
|
||||
pmap = Imlib_move_image(pImlibData, im);
|
||||
mask = Imlib_move_mask(pImlibData, im);
|
||||
if (pmap)
|
||||
{
|
||||
ESetWindowBackgroundPixmap(disp, sc_window, pmap);
|
||||
EShapeCombineMask(disp, sc_window, ShapeBounding, 0, 0, mask,
|
||||
ShapeSet);
|
||||
}
|
||||
Imlib_free_pixmap(id, pmap);
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_free_pixmap(pImlibData, pmap);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1066,7 +1066,7 @@ CB_DesktopDisplayRedraw(int val, void *data)
|
|||
|
||||
pmap = ECreatePixmap(disp, wins[i], 64, 48, root.depth);
|
||||
ESetWindowBackgroundPixmap(disp, wins[i], pmap);
|
||||
SetBackgroundTo(id, pmap, desks.desk[i].bg, 0);
|
||||
SetBackgroundTo(pImlibData, pmap, desks.desk[i].bg, 0);
|
||||
EFreePixmap(disp, pmap);
|
||||
}
|
||||
}
|
||||
|
@ -1254,7 +1254,7 @@ CB_AreaDisplayRedraw(int val, void *data)
|
|||
{
|
||||
IclassApplyCopy(ic, awin, 18, 14, 0, 0, STATE_NORMAL, &pmap, NULL);
|
||||
ESetWindowBackgroundPixmap(disp, awin, pmap);
|
||||
Imlib_free_pixmap(id, pmap);
|
||||
Imlib_free_pixmap(pImlibData, pmap);
|
||||
}
|
||||
XClearWindow(disp, awin);
|
||||
called = 1;
|
||||
|
@ -2491,7 +2491,7 @@ CB_ConfigureBG(int val, void *data)
|
|||
if (!tmp_bg_image)
|
||||
RemoveImagesFromBG(tmp_bg);
|
||||
if (tmp_bg->pmap)
|
||||
Imlib_free_pixmap(id, tmp_bg->pmap);
|
||||
Imlib_free_pixmap(pImlibData, tmp_bg->pmap);
|
||||
tmp_bg->pmap = 0;
|
||||
for (i = 0; i < ENLIGHTENMENT_CONF_NUM_DESKTOPS; i++)
|
||||
{
|
||||
|
@ -2516,10 +2516,11 @@ CB_ConfigureBG(int val, void *data)
|
|||
Esnprintf(s, sizeof(s), "%s/cached/bgsel/%s", UserCacheDir(),
|
||||
tmp_bg->name);
|
||||
p2 = ECreatePixmap(disp, root.win, 64, 48, root.depth);
|
||||
SetBackgroundTo(id, p2, tmp_bg, 0);
|
||||
im = Imlib_create_image_from_drawable(id, p2, 0, 0, 0, 64, 48);
|
||||
Imlib_save_image_to_ppm(id, im, s);
|
||||
Imlib_kill_image(id, im);
|
||||
SetBackgroundTo(pImlibData, p2, tmp_bg, 0);
|
||||
im =
|
||||
Imlib_create_image_from_drawable(pImlibData, p2, 0, 0, 0, 64, 48);
|
||||
Imlib_save_image_to_ppm(pImlibData, im, s);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
EFreePixmap(disp, p2);
|
||||
BG_RedrawView(1);
|
||||
}
|
||||
|
@ -2587,7 +2588,7 @@ CB_DesktopMiniDisplayRedraw(int val, void *data)
|
|||
else
|
||||
{
|
||||
if (tbg->pmap)
|
||||
Imlib_free_pixmap(id, tbg->pmap);
|
||||
Imlib_free_pixmap(pImlibData, tbg->pmap);
|
||||
tbg->bg.solid.r = tmp_bg_r;
|
||||
tbg->bg.solid.g = tmp_bg_g;
|
||||
tbg->bg.solid.b = tmp_bg_b;
|
||||
|
@ -2599,7 +2600,7 @@ CB_DesktopMiniDisplayRedraw(int val, void *data)
|
|||
else
|
||||
{
|
||||
if (tbg->bg.im)
|
||||
Imlib_destroy_image(id, tbg->bg.im);
|
||||
Imlib_destroy_image(pImlibData, tbg->bg.im);
|
||||
tbg->bg.im = NULL;
|
||||
}
|
||||
if (tbg->bg.real_file)
|
||||
|
@ -2615,7 +2616,7 @@ CB_DesktopMiniDisplayRedraw(int val, void *data)
|
|||
KeepBGimages(tbg, 1);
|
||||
pmap = ECreatePixmap(disp, win, w, h, root.depth);
|
||||
ESetWindowBackgroundPixmap(disp, win, pmap);
|
||||
SetBackgroundTo(id, pmap, tbg, 0);
|
||||
SetBackgroundTo(pImlibData, pmap, tbg, 0);
|
||||
XClearWindow(disp, win);
|
||||
EFreePixmap(disp, pmap);
|
||||
val = 0;
|
||||
|
@ -2941,7 +2942,7 @@ BG_RedrawView(char nuke_old)
|
|||
STATE_NORMAL, &pbg, NULL);
|
||||
XCopyArea(disp, pbg, pmap, gc, 0, 0, 64 + 8, 48 + 8, x,
|
||||
0);
|
||||
Imlib_free_pixmap(id, pbg);
|
||||
Imlib_free_pixmap(pImlibData, pbg);
|
||||
}
|
||||
if (!strcmp(bglist[i]->name, "NONE"))
|
||||
{
|
||||
|
@ -2969,29 +2970,33 @@ BG_RedrawView(char nuke_old)
|
|||
{
|
||||
Esnprintf(s, sizeof(s), "%s/cached/bgsel/%s",
|
||||
UserCacheDir(), bglist[i]->name);
|
||||
p2 = ECreatePixmap(disp, pmap, 64, 48, id->x.depth);
|
||||
SetBackgroundTo(id, p2, bglist[i], 0);
|
||||
p2 =
|
||||
ECreatePixmap(disp, pmap, 64, 48,
|
||||
pImlibData->x.depth);
|
||||
SetBackgroundTo(pImlibData, p2, bglist[i], 0);
|
||||
XCopyArea(disp, p2, pmap, gc, 0, 0, 64, 48, x + 4,
|
||||
4);
|
||||
im = Imlib_create_image_from_drawable(id, p2, 0, 0,
|
||||
0, 64, 48);
|
||||
Imlib_save_image_to_ppm(id, im, s);
|
||||
Imlib_kill_image(id, im);
|
||||
im =
|
||||
Imlib_create_image_from_drawable(pImlibData, p2,
|
||||
0, 0, 0, 64,
|
||||
48);
|
||||
Imlib_save_image_to_ppm(pImlibData, im, s);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
EFreePixmap(disp, p2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nuke_old)
|
||||
{
|
||||
Imlib_changed_image(id, im);
|
||||
Imlib_kill_image(id, im);
|
||||
Imlib_changed_image(pImlibData, im);
|
||||
Imlib_kill_image(pImlibData, im);
|
||||
im = ELoadImage(s);
|
||||
}
|
||||
if (im)
|
||||
{
|
||||
Imlib_paste_image(id, im, pmap, x + 4, 4, 64,
|
||||
48);
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_paste_image(pImlibData, im, pmap, x + 4,
|
||||
4, 64, 48);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
20
src/setup.c
20
src/setup.c
|
@ -319,8 +319,8 @@ SetupX()
|
|||
/* record the event base for shape change events */
|
||||
event_base_shape = shape_event_base;
|
||||
/* initialise imlib */
|
||||
id = Imlib_init(disp);
|
||||
if (!id)
|
||||
pImlibData = Imlib_init(disp);
|
||||
if (!pImlibData)
|
||||
{
|
||||
ASSIGN_ALERT(_("Imlib initialisation error"), "", "",
|
||||
_("Quit Enlightenment"));
|
||||
|
@ -332,7 +332,7 @@ SetupX()
|
|||
EExit((void *)1);
|
||||
}
|
||||
#if USE_FNLIB
|
||||
pFnlibData = Fnlib_init(id);
|
||||
pFnlibData = Fnlib_init(pImlibData);
|
||||
if (!pFnlibData)
|
||||
{
|
||||
ASSIGN_ALERT(_("X server setup error"), "", "",
|
||||
|
@ -345,10 +345,10 @@ SetupX()
|
|||
EExit((void *)1);
|
||||
}
|
||||
#endif
|
||||
root.win = id->x.root;
|
||||
root.vis = Imlib_get_visual(id);
|
||||
root.depth = id->x.depth;
|
||||
root.cmap = Imlib_get_colormap(id);
|
||||
root.win = pImlibData->x.root;
|
||||
root.vis = Imlib_get_visual(pImlibData);
|
||||
root.depth = pImlibData->x.depth;
|
||||
root.cmap = Imlib_get_colormap(pImlibData);
|
||||
root.w = DisplayWidth(disp, root.scr);
|
||||
root.h = DisplayHeight(disp, root.scr);
|
||||
root.focuswin = ECreateFocusWindow(root.win, -100, -100, 5, 5);
|
||||
|
@ -359,10 +359,12 @@ SetupX()
|
|||
|
||||
p.flags = PARAMS_VISUALID;
|
||||
p.visualid = XVisualIDFromVisual(DefaultVisual(disp, root.scr));
|
||||
ird = Imlib_init_with_params(disp, &p);
|
||||
prImlibData = Imlib_init_with_params(disp, &p);
|
||||
}
|
||||
else
|
||||
ird = NULL;
|
||||
{
|
||||
prImlibData = NULL;
|
||||
}
|
||||
/* just in case - set them up again */
|
||||
/* set up an error handler for then E would normally have fatal X errors */
|
||||
XSetErrorHandler((XErrorHandler) EHandleXError);
|
||||
|
|
|
@ -219,10 +219,10 @@ CreateStartupDisplay(char start)
|
|||
IclassApply(ic, b1, root.w, desks.dragbar_width, 0, 0, 0, 0);
|
||||
IclassApply(ic, b2, root.w, desks.dragbar_width, 0, 0, 0, 0);
|
||||
queue_up = pq;
|
||||
SetBackgroundTo(id, win1, bg, 1);
|
||||
SetBackgroundTo(id, win2, bg, 1);
|
||||
SetBackgroundTo(pImlibData, win1, bg, 1);
|
||||
SetBackgroundTo(pImlibData, win2, bg, 1);
|
||||
if (bg->pmap)
|
||||
Imlib_free_pixmap(id, bg->pmap);
|
||||
Imlib_free_pixmap(pImlibData, bg->pmap);
|
||||
bg->pmap = 0;
|
||||
init_win1 = w1;
|
||||
init_win2 = w2;
|
||||
|
|
125
src/text.c
125
src/text.c
|
@ -429,11 +429,12 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(id, &r, &g, &b));
|
||||
Imlib_best_color_match(pImlibData, &r, &g,
|
||||
&b));
|
||||
EFont_draw_string(disp, drawable, gc, offset_x + 1,
|
||||
offset_y + 1, lines[i], ts->efont,
|
||||
Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
}
|
||||
else if (ts->effect == 2)
|
||||
{
|
||||
|
@ -441,27 +442,33 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(id, &r, &g, &b));
|
||||
Imlib_best_color_match(pImlibData, &r, &g,
|
||||
&b));
|
||||
EFont_draw_string(disp, drawable, gc, offset_x - 1, offset_y,
|
||||
lines[i], ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
lines[i], ts->efont,
|
||||
Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
EFont_draw_string(disp, drawable, gc, offset_x + 1, offset_y,
|
||||
lines[i], ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
lines[i], ts->efont,
|
||||
Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
EFont_draw_string(disp, drawable, gc, offset_x, offset_y - 1,
|
||||
lines[i], ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
lines[i], ts->efont,
|
||||
Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
EFont_draw_string(disp, drawable, gc, offset_x, offset_y + 1,
|
||||
lines[i], ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
lines[i], ts->efont,
|
||||
Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
}
|
||||
r = ts->fg_col.r;
|
||||
g = ts->fg_col.g;
|
||||
b = ts->fg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
EFont_draw_string(disp, drawable, gc, offset_x, offset_y, lines[i],
|
||||
ts->efont, Imlib_get_visual(id),
|
||||
Imlib_get_colormap(id));
|
||||
ts->efont, Imlib_get_visual(pImlibData),
|
||||
Imlib_get_colormap(pImlibData));
|
||||
|
||||
TextDrawRotBack(win, drawable, xx - 1, yy - 1 - ascent, wid + 2,
|
||||
ascent + descent + 2, ts);
|
||||
|
@ -586,7 +593,8 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(id, &r, &g, &b));
|
||||
Imlib_best_color_match(pImlibData, &r, &g,
|
||||
&b));
|
||||
XmbDrawString(disp, drawable, ts->xfontset, gc, offset_x + 1,
|
||||
offset_y + 1, lines[i], strlen(lines[i]));
|
||||
}
|
||||
|
@ -596,7 +604,8 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(id, &r, &g, &b));
|
||||
Imlib_best_color_match(pImlibData, &r, &g,
|
||||
&b));
|
||||
XmbDrawString(disp, drawable, ts->xfontset, gc, offset_x - 1,
|
||||
offset_y, lines[i], strlen(lines[i]));
|
||||
XmbDrawString(disp, drawable, ts->xfontset, gc, offset_x + 1,
|
||||
|
@ -609,7 +618,8 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
r = ts->fg_col.r;
|
||||
g = ts->fg_col.g;
|
||||
b = ts->fg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XmbDrawString(disp, drawable, ts->xfontset, gc, offset_x, offset_y,
|
||||
lines[i], strlen(lines[i]));
|
||||
|
||||
|
@ -689,7 +699,8 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(id, &r, &g, &b));
|
||||
Imlib_best_color_match(pImlibData, &r, &g,
|
||||
&b));
|
||||
XDrawString(disp, drawable, gc, offset_x + 1, offset_y + 1,
|
||||
lines[i], strlen(lines[i]));
|
||||
}
|
||||
|
@ -699,7 +710,8 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(id, &r, &g, &b));
|
||||
Imlib_best_color_match(pImlibData, &r, &g,
|
||||
&b));
|
||||
XDrawString(disp, drawable, gc, offset_x - 1, offset_y,
|
||||
lines[i], strlen(lines[i]));
|
||||
XDrawString(disp, drawable, gc, offset_x + 1, offset_y,
|
||||
|
@ -712,7 +724,8 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
r = ts->fg_col.r;
|
||||
g = ts->fg_col.g;
|
||||
b = ts->fg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XDrawString(disp, drawable, gc, offset_x, offset_y, lines[i],
|
||||
strlen(lines[i]));
|
||||
|
||||
|
@ -794,7 +807,8 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(id, &r, &g, &b));
|
||||
Imlib_best_color_match(pImlibData, &r, &g,
|
||||
&b));
|
||||
XDrawString16(disp, drawable, gc, offset_x + 1, offset_y + 1,
|
||||
(XChar2b *) lines[i], strlen(lines[i]) / 2);
|
||||
}
|
||||
|
@ -804,7 +818,8 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
g = ts->bg_col.g;
|
||||
b = ts->bg_col.b;
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(id, &r, &g, &b));
|
||||
Imlib_best_color_match(pImlibData, &r, &g,
|
||||
&b));
|
||||
XDrawString16(disp, drawable, gc, offset_x - 1, offset_y,
|
||||
(XChar2b *) lines[i], strlen(lines[i]) / 2);
|
||||
XDrawString16(disp, drawable, gc, offset_y + 1, offset_y,
|
||||
|
@ -817,7 +832,8 @@ TextDraw(TextClass * tclass, Window win, int active, int sticky, int state,
|
|||
r = ts->fg_col.r;
|
||||
g = ts->fg_col.g;
|
||||
b = ts->fg_col.b;
|
||||
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
|
||||
XSetForeground(disp, gc,
|
||||
Imlib_best_color_match(pImlibData, &r, &g, &b));
|
||||
XDrawString16(disp, drawable, gc, offset_x, offset_y,
|
||||
(XChar2b *) lines[i], strlen(lines[i]) / 2);
|
||||
|
||||
|
@ -843,31 +859,32 @@ TextDrawRotTo(Window win, Drawable * drawable, int x, int y, int w, int h,
|
|||
switch (ts->style.orientation)
|
||||
{
|
||||
case FONT_TO_UP:
|
||||
ii = Imlib_create_image_from_drawable(id, win, 0, y, x, h, w);
|
||||
Imlib_rotate_image(id, ii, 1);
|
||||
Imlib_flip_image_horizontal(id, ii);
|
||||
Imlib_paste_image(id, ii, *drawable, 0, 0, w, h);
|
||||
ii = Imlib_create_image_from_drawable(pImlibData, win, 0, y, x, h, w);
|
||||
Imlib_rotate_image(pImlibData, ii, 1);
|
||||
Imlib_flip_image_horizontal(pImlibData, ii);
|
||||
Imlib_paste_image(pImlibData, ii, *drawable, 0, 0, w, h);
|
||||
break;
|
||||
case FONT_TO_DOWN:
|
||||
EGetGeometry(disp, win, &(root.win), &win_x, &win_y, &win_w, &win_h,
|
||||
&win_b, &win_d);
|
||||
ii = Imlib_create_image_from_drawable(id, win, 0, win_w - y - h, x, h,
|
||||
w);
|
||||
Imlib_rotate_image(id, ii, -1);
|
||||
Imlib_flip_image_vertical(id, ii);
|
||||
Imlib_paste_image(id, ii, *drawable, 0, 0, w, h);
|
||||
ii =
|
||||
Imlib_create_image_from_drawable(pImlibData, win, 0, win_w - y - h,
|
||||
x, h, w);
|
||||
Imlib_rotate_image(pImlibData, ii, -1);
|
||||
Imlib_flip_image_vertical(pImlibData, ii);
|
||||
Imlib_paste_image(pImlibData, ii, *drawable, 0, 0, w, h);
|
||||
break;
|
||||
case FONT_TO_LEFT: /* Holy carumba! That's for yoga addicts, maybe .... */
|
||||
ii = Imlib_create_image_from_drawable(id, win, 0, x, y, w, h);
|
||||
Imlib_flip_image_vertical(id, ii);
|
||||
Imlib_flip_image_horizontal(id, ii);
|
||||
Imlib_paste_image(id, ii, *drawable, 0, 0, w, h);
|
||||
ii = Imlib_create_image_from_drawable(pImlibData, win, 0, x, y, w, h);
|
||||
Imlib_flip_image_vertical(pImlibData, ii);
|
||||
Imlib_flip_image_horizontal(pImlibData, ii);
|
||||
Imlib_paste_image(pImlibData, ii, *drawable, 0, 0, w, h);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (ii)
|
||||
Imlib_destroy_image(id, ii);
|
||||
Imlib_destroy_image(pImlibData, ii);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -881,28 +898,34 @@ TextDrawRotBack(Window win, Pixmap drawable, int x, int y, int w, int h,
|
|||
switch (ts->style.orientation)
|
||||
{
|
||||
case FONT_TO_UP:
|
||||
ii = Imlib_create_image_from_drawable(id, drawable, 0, 0, 0, w, h);
|
||||
Imlib_rotate_image(id, ii, -1);
|
||||
Imlib_flip_image_vertical(id, ii);
|
||||
Imlib_paste_image(id, ii, win, y, x, h, w);
|
||||
ii =
|
||||
Imlib_create_image_from_drawable(pImlibData, drawable, 0, 0, 0, w,
|
||||
h);
|
||||
Imlib_rotate_image(pImlibData, ii, -1);
|
||||
Imlib_flip_image_vertical(pImlibData, ii);
|
||||
Imlib_paste_image(pImlibData, ii, win, y, x, h, w);
|
||||
break;
|
||||
case FONT_TO_DOWN:
|
||||
EGetGeometry(disp, win, &(root.win), &win_x, &win_y, &win_w, &win_h,
|
||||
&win_b, &win_d);
|
||||
ii = Imlib_create_image_from_drawable(id, drawable, 0, 0, 0, w, h);
|
||||
Imlib_rotate_image(id, ii, 1);
|
||||
Imlib_flip_image_horizontal(id, ii);
|
||||
Imlib_paste_image(id, ii, win, win_w - y - h, x, h, w);
|
||||
ii =
|
||||
Imlib_create_image_from_drawable(pImlibData, drawable, 0, 0, 0, w,
|
||||
h);
|
||||
Imlib_rotate_image(pImlibData, ii, 1);
|
||||
Imlib_flip_image_horizontal(pImlibData, ii);
|
||||
Imlib_paste_image(pImlibData, ii, win, win_w - y - h, x, h, w);
|
||||
break;
|
||||
case FONT_TO_LEFT: /* Holy carumba! That's for yoga addicts, maybe .... */
|
||||
ii = Imlib_create_image_from_drawable(id, drawable, 0, 0, 0, w, h);
|
||||
Imlib_flip_image_vertical(id, ii);
|
||||
Imlib_flip_image_horizontal(id, ii);
|
||||
Imlib_paste_image(id, ii, win, x, y, w, h);
|
||||
ii =
|
||||
Imlib_create_image_from_drawable(pImlibData, drawable, 0, 0, 0, w,
|
||||
h);
|
||||
Imlib_flip_image_vertical(pImlibData, ii);
|
||||
Imlib_flip_image_horizontal(pImlibData, ii);
|
||||
Imlib_paste_image(pImlibData, ii, win, x, y, w, h);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (ii)
|
||||
Imlib_destroy_image(id, ii);
|
||||
Imlib_destroy_image(pImlibData, ii);
|
||||
}
|
||||
|
|
214
src/tooltips.c
214
src/tooltips.c
|
@ -450,7 +450,7 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
{
|
||||
iw = im->rgb_width;
|
||||
ih = im->rgb_height;
|
||||
Imlib_destroy_image(id, im);
|
||||
Imlib_destroy_image(pImlibData, im);
|
||||
}
|
||||
w += iw;
|
||||
if (h < ih)
|
||||
|
@ -609,14 +609,14 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData, ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->im->rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(id,
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.normal->im),
|
||||
x, y);
|
||||
x += ic->norm.normal->im->rgb_width;
|
||||
|
@ -631,14 +631,14 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData, ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->im->rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(id,
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
|
@ -651,14 +651,14 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData, ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->im->rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(id,
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
|
@ -671,14 +671,14 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData, ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->im->rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(id,
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
|
@ -691,14 +691,14 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData, ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->im->rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(id,
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
|
@ -711,14 +711,14 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData, ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->im->rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(id,
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
|
@ -738,19 +738,19 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData,
|
||||
ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->
|
||||
im->rgb_height);
|
||||
ic->norm.normal->im->
|
||||
rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im),
|
||||
Imlib_copy_mask(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im), x, y);
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
x += ic->norm.normal->im->rgb_width;
|
||||
}
|
||||
}
|
||||
|
@ -761,19 +761,19 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData,
|
||||
ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->
|
||||
im->rgb_height);
|
||||
ic->norm.normal->im->
|
||||
rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im),
|
||||
Imlib_copy_mask(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im), x, y);
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
x += ic->norm.normal->im->rgb_width;
|
||||
}
|
||||
}
|
||||
|
@ -784,19 +784,19 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData,
|
||||
ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->
|
||||
im->rgb_height);
|
||||
ic->norm.normal->im->
|
||||
rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im),
|
||||
Imlib_copy_mask(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im), x, y);
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
x += ic->norm.normal->im->rgb_width;
|
||||
}
|
||||
}
|
||||
|
@ -807,19 +807,19 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData,
|
||||
ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->
|
||||
im->rgb_height);
|
||||
ic->norm.normal->im->
|
||||
rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im),
|
||||
Imlib_copy_mask(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im), x, y);
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
x += ic->norm.normal->im->rgb_width;
|
||||
}
|
||||
}
|
||||
|
@ -830,19 +830,19 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData,
|
||||
ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->
|
||||
im->rgb_height);
|
||||
ic->norm.normal->im->
|
||||
rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im),
|
||||
Imlib_copy_mask(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im), x, y);
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
x += ic->norm.normal->im->rgb_width;
|
||||
}
|
||||
}
|
||||
|
@ -853,19 +853,19 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData,
|
||||
ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->
|
||||
im->rgb_height);
|
||||
ic->norm.normal->im->
|
||||
rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im),
|
||||
Imlib_copy_mask(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im), x, y);
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
x += ic->norm.normal->im->rgb_width;
|
||||
}
|
||||
}
|
||||
|
@ -876,19 +876,19 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData,
|
||||
ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->
|
||||
im->rgb_height);
|
||||
ic->norm.normal->im->
|
||||
rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im),
|
||||
Imlib_copy_mask(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im), x, y);
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
x += ic->norm.normal->im->rgb_width;
|
||||
}
|
||||
}
|
||||
|
@ -899,19 +899,19 @@ ShowToolTip(ToolTip * tt, char *text, ActionClass * ac, int x, int y)
|
|||
if (ic)
|
||||
if (ic->norm.normal->im)
|
||||
{
|
||||
Imlib_render(id, ic->norm.normal->im,
|
||||
Imlib_render(pImlibData,
|
||||
ic->norm.normal->im,
|
||||
ic->norm.normal->im->rgb_width,
|
||||
ic->norm.normal->
|
||||
im->rgb_height);
|
||||
ic->norm.normal->im->
|
||||
rgb_height);
|
||||
PastePixmap(disp, tt->win,
|
||||
Imlib_copy_image(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im),
|
||||
Imlib_copy_mask(id,
|
||||
ic->
|
||||
norm.normal->
|
||||
im), x, y);
|
||||
Imlib_copy_image(pImlibData,
|
||||
ic->norm.
|
||||
normal->im),
|
||||
Imlib_copy_mask(pImlibData,
|
||||
ic->norm.
|
||||
normal->im), x,
|
||||
y);
|
||||
x += ic->norm.normal->im->rgb_width;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -849,7 +849,7 @@ EFont_draw_string(Display * disp, Drawable win, GC gc, int x, int y, char *text,
|
|||
{
|
||||
if (xatt.depth == 16)
|
||||
{
|
||||
if (id->x.render_depth == 15)
|
||||
if (pImlibData->x.render_depth == 15)
|
||||
merge_text_15(xim, rmap, clipx, clipy, col);
|
||||
else
|
||||
merge_text_16(xim, rmap, clipx, clipy, col);
|
||||
|
|
Loading…
Reference in New Issue