Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/dox
Modified Files:
dox.c dox.h format.c text.c
Log Message:
No global var should be named "id".
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/dox.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- dox.c 12 Jul 2003 14:34:14 -0000 1.18
+++ dox.c 12 Jul 2003 15:04:30 -0000 1.19
@@ -89,7 +89,7 @@
#include "exit2.xpm"
Display *disp;
-ImlibData *id;
+ImlibData *pImlibData;
#if USE_FNLIB
FnlibData *pFnlibData;
#endif
@@ -117,7 +117,7 @@
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 @@
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 @@
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 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 @@
}
#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 @@
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 @@
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 @@
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 @@
} 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 @@
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 @@
}
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);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/dox.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- dox.h 12 Jul 2003 14:34:14 -0000 1.16
+++ dox.h 12 Jul 2003 15:04:30 -0000 1.17
@@ -252,7 +252,7 @@
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
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/format.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- format.c 12 Jul 2003 14:34:14 -0000 1.10
+++ format.c 12 Jul 2003 15:04:30 -0000 1.11
@@ -549,11 +549,11 @@
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 @@
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 @@
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,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/text.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- text.c 12 Jul 2003 14:34:14 -0000 1.6
+++ text.c 12 Jul 2003 15:04:30 -0000 1.7
@@ -292,37 +292,37 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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;
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs