From 0ecb5cdf9b0880344a01f1d865d6351cac0e0ab7 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 30 Apr 2004 12:03:32 +0000 Subject: Adaptation for the new global variables Reworking of the class structure --- generic/Window.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/generic/Window.c b/generic/Window.c index 0e29e3e..2ed8703 100644 --- a/generic/Window.c +++ b/generic/Window.c @@ -29,6 +29,7 @@ #include "Geo.h" #include "Types.h" #include "WidgetInfo.h" +#include "tkZinc.h" static const char rcsid[] = "$Id$"; @@ -278,7 +279,7 @@ Configure(ZnItem item, * to the old one. */ if ((item->connected_item == ZN_NO_ITEM) || - (item->connected_item->class->has_anchors && + (ISSET(item->connected_item->class->flags, ZN_CLASS_HAS_ANCHORS) && (item->parent == item->connected_item->parent))) { ZnITEM.UpdateItemDependency(item, old_connected); } @@ -324,7 +325,7 @@ Query(ZnItem item, int argc __unused, Tcl_Obj *CONST argv[]) { - if (ZnQueryAttribute(item->wi, item, wind_attrs, argv[0]) == TCL_ERROR) { + if (ZnQueryAttribute(item->wi->interp, item, wind_attrs, argv[0]) == TCL_ERROR) { return TCL_ERROR; } @@ -590,12 +591,12 @@ GetClipVertices(ZnItem item, int w=0, h=0; ZnPoint *points; - ZnListAssertSize(item->wi->work_pts, 2); + ZnListAssertSize(ZnWorkPoints, 2); if (wind->win != NULL) { w = wind->real_width; h = wind->real_height; } - points = ZnListArray(item->wi->work_pts); + points = ZnListArray(ZnWorkPoints); ZnTriStrip1(tristrip, points, 2, False); points[0] = wind->pos_dev; points[1].x = points[0].x + w; @@ -656,11 +657,11 @@ Coords(ZnItem item, ********************************************************************************** */ static ZnItemClassStruct WINDOW_ITEM_CLASS = { - sizeof(WindowItemStruct), - 0, /* num_parts */ - True, /* has_anchors */ "window", + sizeof(WindowItemStruct), wind_attrs, + 0, /* num_parts */ + ZN_CLASS_HAS_ANCHORS|ZN_CLASS_ONE_COORD, /* flags */ Tk_Offset(WindowItemStruct, pos), Init, Clone, -- cgit v1.1