From 3261805fee19e346b4d1f84b23816daa1628764a Mon Sep 17 00:00:00 2001 From: lecoanet Date: Wed, 16 Apr 2003 09:49:22 +0000 Subject: Update from the Windows port and general cleanup/restructure --- generic/PostScript.c | 54 ++++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 25 deletions(-) (limited to 'generic/PostScript.c') diff --git a/generic/PostScript.c b/generic/PostScript.c index 71781f1..27923e2 100644 --- a/generic/PostScript.c +++ b/generic/PostScript.c @@ -35,10 +35,13 @@ ********************************************************************************** */ -#include +#ifndef _WIN32 + +#ifndef _WIN32 #include -#include #include +#endif +#include #include #include @@ -75,9 +78,9 @@ static char ps_prolog[] = ""; ********************************************************************************** */ static void -SetPostScriptFont(WidgetInfo *wi, - PostScriptInfo ps_info, - XFontStruct *fs) +SetPostScriptFont(ZnWInfo *wi __unused, + ZnPostScriptInfo ps_info __unused, + XFontStruct *fs __unused) { } @@ -90,31 +93,31 @@ SetPostScriptFont(WidgetInfo *wi, ********************************************************************************** */ static void -EmitPostScript(WidgetInfo *wi, - FILE *file, - char *title, - ZnBool landscape, - int color_mode, - int x_world, - int y_world, - int world_width, - int world_height, - int bbox_ox, - int bbox_oy, - int bbox_cx, - int bbox_cy) +EmitPostScript(ZnWInfo *wi, + FILE *file, + char *title, + ZnBool landscape, + int color_mode, + int x_world, + int y_world, + int world_width, + int world_height, + int bbox_ox, + int bbox_oy, + int bbox_cx, + int bbox_cy) { - PostScriptInfo ps_info; + ZnPostScriptInfo ps_info; /* double scale;*/ ZnBBox damaged_area, bbox; - Item current_item; + ZnItem current_item; struct passwd *pwd_info; time_t now; char *s; XFontStruct *fs; int i; - ps_info = (PostScriptInfo) ZnMalloc(sizeof(PostScriptStruct)); + ps_info = (ZnPostScriptInfo) ZnMalloc(sizeof(ZnPostScriptStruct)); ps_info->file = file; ps_info->title = title; ps_info->landscape = landscape; @@ -193,9 +196,9 @@ EmitPostScript(WidgetInfo *wi, */ current_item = ZnGroupTail(wi->top_group); while (current_item != ZN_NO_ITEM) { - if (ISSET(current_item->flags, VISIBLE_BIT)) { - IntersectBBox(&ps_info->page_bbox, ¤t_item->item_bounding_box, &bbox); - if (!IsEmptyBBox(&bbox)) { + if (ISSET(current_item->flags, ZN_VISIBLE_BIT)) { + ZnIntersectBBox(&ps_info->page_bbox, ¤t_item->item_bounding_box, &bbox); + if (!ZnIsEmptyBBox(&bbox)) { current_item->class->PostScript(current_item, ps_info); } } @@ -240,7 +243,8 @@ EmitPostScript(WidgetInfo *wi, ********************************************************************************** */ -struct _POSTSCRIPT_P POSTSCRIPT_P = { +struct _ZnPOSTSCRIPT ZnPOSTSCRIPT = { EmitPostScript, SetPostScriptFont }; +#endif /* _WIN32 */ -- cgit v1.1