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:
Added possibility to configure not to use fnlib (configure --without-fnlib).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/dox.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- dox.c 1 May 2003 17:00:45 -0000 1.17
+++ dox.c 12 Jul 2003 14:34:14 -0000 1.18
@@ -37,7 +37,9 @@
#endif
#include <Imlib.h>
+#if USE_FNLIB
#include <Fnlib.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -88,7 +90,9 @@
Display *disp;
ImlibData *id;
-FnlibData *fd;
+#if USE_FNLIB
+FnlibData *pFnlibData;
+#endif
Window win_main, win_title, win_exit, win_next, win_prev, win_text, win_cover;
int w, h, t;
ImlibImage *im_text;
@@ -216,7 +220,9 @@
params.pixmapcachesize = (w * h * 3 * 2 * 8);
id = Imlib_init_with_params(disp, ¶ms);
Imlib_set_render_type(id, RT_DITHER_TRUECOL);
- fd = Fnlib_init(id);
+#if USE_FNLIB
+ pFnlibData = Fnlib_init(id);
+#endif
im_title = Imlib_create_image_from_xpm_data(id, title_xpm);
ibd.left = 50;
@@ -280,7 +286,9 @@
t = 16;
GetObjects(f);
fclose(f);
- Fnlib_add_dir(fd, docdir);
+#if USE_FNLIB
+ Fnlib_add_dir(pFnlibData, docdir);
+#endif
wx = (DisplayWidth(disp, DefaultScreen(disp)) - w) / 2;
wy = (DisplayHeight(disp, DefaultScreen(disp)) - (h + t)) / 2;
#ifdef HAS_XINERAMA
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/dox.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- dox.h 22 May 2003 19:14:55 -0000 1.15
+++ dox.h 12 Jul 2003 14:34:14 -0000 1.16
@@ -34,7 +34,9 @@
#include <X11/extensions/shape.h>
#include <X11/extensions/XShm.h>
#include <Imlib.h>
+#if USE_FNLIB
#include <Fnlib.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -104,8 +106,10 @@
typedef struct _textstate
{
char *fontname;
+#if USE_FNLIB
FnlibStyle style;
FnlibFont *font;
+#endif
ImlibColor fg_col;
ImlibColor bg_col;
int effect;
@@ -249,5 +253,7 @@
extern Display *disp;
extern ImlibData *id;
-extern FnlibData *fd;
+#if USE_FNLIB
+extern FnlibData *pFnlibData;
+#endif
extern char *docdir;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/format.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- format.c 29 Jun 2000 19:29:04 -0000 1.9
+++ format.c 12 Jul 2003 14:34:14 -0000 1.10
@@ -519,11 +519,13 @@
int wastext = 0;
ts.fontname = NULL;
+#if USE_FNLIB
ts.style.orientation = FONT_TO_RIGHT;
ts.style.mode = MODE_WRAP_WORD;
ts.style.justification = 0;
ts.style.spacing = 0;
ts.font = NULL;
+#endif
ts.fg_col.r = 0;
ts.fg_col.g = 0;
ts.fg_col.b = 0;
@@ -604,13 +606,15 @@
case FONT:
fn = pg->obj[i].object;
ts.fontname = NULL;
+#if USE_FNLIB
ts.style.orientation = FONT_TO_RIGHT;
ts.style.mode = MODE_WRAP_WORD;
ts.style.justification = 0;
ts.style.spacing = 0;
if (ts.font)
- Fnlib_free_font(fd, ts.font);
+ Fnlib_free_font(pFnlibData, ts.font);
ts.font = NULL;
+#endif
ts.fg_col.r = 0;
ts.fg_col.g = 0;
ts.fg_col.b = 0;
@@ -980,8 +984,10 @@
}
}
+#if USE_FNLIB
if (ts.font)
- Fnlib_free_font(fd, ts.font);
+ Fnlib_free_font(pFnlibData, ts.font);
+#endif
if (ts.efont)
Efont_free(ts.efont);
if (ts.xfont)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/text.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- text.c 14 Mar 2000 19:27:32 -0000 1.5
+++ text.c 12 Jul 2003 14:34:14 -0000 1.6
@@ -57,13 +57,23 @@
void
TextStateLoadFont(TextState * ts)
{
+#if USE_FNLIB
if ((ts->font) || (ts->efont) || (ts->xfont) || (ts->xfontset))
+#else
+ if ((ts->efont) || (ts->xfont) || (ts->xfontset))
+#endif
return;
if (!ts->fontname)
return;
+#if USE_FNLIB
if ((!ts->font) && (!ts->efont))
- ts->font = Fnlib_load_font(fd, ts->fontname);
+ ts->font = Fnlib_load_font(pFnlibData, ts->fontname);
+#endif
+#if USE_FNLIB
if ((!ts->font) && (!ts->efont))
+#else
+ if (!ts->efont)
+#endif
{
char s[4096], w[4046], *dup, *ss;
@@ -90,7 +100,11 @@
if (dup)
free(dup);
}
+#if USE_FNLIB
if ((!ts->font) && (!ts->efont))
+#else
+ if (!ts->efont)
+#endif
{
if ((!ts->xfont) && (strchr(ts->fontname, ',') == NULL))
{
@@ -145,13 +159,14 @@
if (!ts)
return;
TextStateLoadFont(ts);
+#if USE_FNLIB
if (ts->font)
{
for (i = 0; i < num_lines; i++)
{
int high, wid, dummy;
- Fnlib_measure(fd, ts->font, 0, 0, 999999, 999999,
+ Fnlib_measure(pFnlibData, ts->font, 0, 0, 999999, 999999,
0, 0, fsize, &ts->style, (unsigned char *)lines[i],
0, 0, &dummy, &dummy, &wid, &high, &dummy,
&dummy, &dummy, &dummy);
@@ -160,7 +175,9 @@
*width = wid;
}
}
- else if (ts->efont)
+ else
+#endif
+ if (ts->efont)
{
for (i = 0; i < num_lines; i++)
{
@@ -237,13 +254,14 @@
yy = y;
if (!gc)
gc = XCreateGC(disp, win, 0, &gcv);
+#if USE_FNLIB
if (ts->font)
{
for (i = 0; i < num_lines; i++)
{
int high, wid, dummy;
- Fnlib_measure(fd, ts->font, 0, 0, 999999, 999999,
+ Fnlib_measure(pFnlibData, ts->font, 0, 0, 999999, 999999,
0, 0, fsize, &ts->style, (unsigned char *)lines[i],
0, 0, &dummy, &dummy, &wid, &high, &dummy,
&dummy, &dummy, &dummy);
@@ -251,12 +269,14 @@
(ts->style.orientation == FONT_TO_DOWN))
fsize = w;
xx = x + (((w - wid) * justification) >> 10);
- Fnlib_draw(fd, ts->font, win, 0, xx, yy, w, h,
+ Fnlib_draw(pFnlibData, ts->font, win, 0, xx, yy, w, h,
0, 0, fsize, &ts->style, (unsigned char *)lines[i]);
yy += high;
}
}
- else if (ts->efont)
+ else
+#endif
+ if (ts->efont)
{
for (i = 0; i < num_lines; i++)
{
-------------------------------------------------------
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