aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlecoanet2004-04-30 12:03:32 +0000
committerlecoanet2004-04-30 12:03:32 +0000
commit0ecb5cdf9b0880344a01f1d865d6351cac0e0ab7 (patch)
treedd860adf09a10849c27918efd8685fa273ac4a2c
parent82665ac3ec2591ab6bdfff7443f5a3bff9dcf48f (diff)
downloadtkzinc-0ecb5cdf9b0880344a01f1d865d6351cac0e0ab7.zip
tkzinc-0ecb5cdf9b0880344a01f1d865d6351cac0e0ab7.tar.gz
tkzinc-0ecb5cdf9b0880344a01f1d865d6351cac0e0ab7.tar.bz2
tkzinc-0ecb5cdf9b0880344a01f1d865d6351cac0e0ab7.tar.xz
Adaptation for the new global variables
Reworking of the class structure
-rw-r--r--generic/Window.c15
1 files 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,