summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-09 09:55:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-09 09:55:56 (GMT)
commit9c82b94f7f8be2ebc6cf88f55d08d6e087cff5a5 (patch)
tree976f58bbb47262acff6f1ff2a3d3872665a22cc6
parent19d012df44dac9aaf5faa9b3beca5a6396ea21a8 (diff)
downloadtk-9c82b94f7f8be2ebc6cf88f55d08d6e087cff5a5.zip
tk-9c82b94f7f8be2ebc6cf88f55d08d6e087cff5a5.tar.gz
tk-9c82b94f7f8be2ebc6cf88f55d08d6e087cff5a5.tar.bz2
TIP #581: More progress
-rw-r--r--generic/tkGeometry.c302
-rw-r--r--generic/tkImage.c265
-rw-r--r--generic/tkImgBmap.c22
-rw-r--r--generic/tkStubInit.c2
-rw-r--r--generic/ttk/ttkManager.c24
-rw-r--r--macosx/tkMacOSXMenu.c4
-rw-r--r--macosx/tkMacOSXWm.c34
-rw-r--r--macosx/tkMacOSXWm.h2
-rw-r--r--tests/focus.test2
-rw-r--r--tests/safe.test2
-rw-r--r--tests/ttk/combobox.test8
-rw-r--r--tests/ttk/image.test2
-rw-r--r--tests/ttk/panedwindow.test6
-rw-r--r--tests/ttk/scrollbar.test8
-rw-r--r--tests/ttk/treetags.test6
-rw-r--r--tests/ttk/treeview.test6
-rw-r--r--tests/ttk/ttk.test2
-rw-r--r--tests/ttk/validate.test2
-rw-r--r--unix/Makefile.in2
-rw-r--r--unix/tkUnixWm.c106
-rw-r--r--win/Makefile.in9
-rw-r--r--win/tkWinWm.c108
22 files changed, 461 insertions, 463 deletions
diff --git a/generic/tkGeometry.c b/generic/tkGeometry.c
index b70e66a..5ecac0e 100644
--- a/generic/tkGeometry.c
+++ b/generic/tkGeometry.c
@@ -20,16 +20,16 @@
*/
typedef struct MaintainContent {
- Tk_Window slave; /* The slave window being positioned. */
- Tk_Window master; /* The master that determines slave's
+ Tk_Window content; /* The content window being positioned. */
+ Tk_Window container; /* The container that determines content's
* position; it must be a descendant of
- * slave's parent. */
- int x, y; /* Desired position of slave relative to
- * master. */
- int width, height; /* Desired dimensions of slave. */
+ * content's parent. */
+ int x, y; /* Desired position of content relative to
+ * container. */
+ int width, height; /* Desired dimensions of content. */
struct MaintainContent *nextPtr;
/* Next in list of Maintains associated with
- * master. */
+ * container. */
} MaintainContent;
/*
@@ -45,7 +45,7 @@ typedef struct MaintainContainer {
int checkScheduled; /* Non-zero means that there is already a call
* to MaintainCheckProc scheduled as an idle
* handler. */
- MaintainContent *slavePtr; /* First in list of all content associated with
+ MaintainContent *contentPtr; /* First in list of all content associated with
* this container. */
} MaintainContainer;
@@ -65,7 +65,7 @@ static void MaintainContentProc(ClientData clientData,
* Tk_ManageGeometry --
*
* Arrange for a particular procedure to manage the geometry of a given
- * slave window.
+ * content window.
*
* Results:
* None.
@@ -218,7 +218,7 @@ Tk_SetInternalBorderEx(
}
/*
- * All the slaves for which this is the master window must now be
+ * All the content for which this is the container window must now be
* repositioned to take account of the new internal border width. To
* signal all the geometry managers to do this, trigger a ConfigureNotify
* event. This will cause geometry managers to recompute everything.
@@ -341,7 +341,7 @@ TkSetGeometryContainer(
return TCL_ERROR;
}
- winPtr->geomMgrName = ckalloc(strlen(name) + 1);
+ winPtr->geomMgrName = (char *)ckalloc(strlen(name) + 1);
strcpy(winPtr->geomMgrName, name);
return TCL_OK;
}
@@ -387,12 +387,12 @@ TkFreeGeometryContainer(
*
* Tk_MaintainGeometry --
*
- * This procedure is invoked by geometry managers to handle slaves whose
- * master's are not their parents. It translates the desired geometry for
- * the slave into the coordinate system of the parent and respositions
- * the slave if it isn't already at the right place. Furthermore, it sets
- * up event handlers so that if the master (or any of its ancestors up to
- * the slave's parent) is mapped, unmapped, or moved, then the slave will
+ * This procedure is invoked by geometry managers to handle content whose
+ * container's are not their parents. It translates the desired geometry for
+ * the content into the coordinate system of the parent and respositions
+ * the content if it isn't already at the right place. Furthermore, it sets
+ * up event handlers so that if the container (or any of its ancestors up to
+ * the content's parent) is mapped, unmapped, or moved, then the content will
* be adjusted to match.
*
* Results:
@@ -400,7 +400,7 @@ TkFreeGeometryContainer(
*
* Side effects:
* Event handlers are created and state is allocated to keep track of
- * slave. Note: if slave was already managed for master by
+ * content. Note: if content was already managed for container by
* Tk_MaintainGeometry, then the previous information is replaced with
* the new information. The caller must eventually call
* Tk_UnmaintainGeometry to eliminate the correspondence (or, the state
@@ -411,40 +411,40 @@ TkFreeGeometryContainer(
void
Tk_MaintainGeometry(
- Tk_Window slave, /* Slave for geometry management. */
- Tk_Window master, /* Master for slave; must be a descendant of
- * slave's parent. */
- int x, int y, /* Desired position of slave within master. */
- int width, int height) /* Desired dimensions for slave. */
+ Tk_Window window, /* Window for geometry management. */
+ Tk_Window container, /* Container for window; must be a descendant of
+ * window's parent. */
+ int x, int y, /* Desired position of window within container. */
+ int width, int height) /* Desired dimensions for window. */
{
Tcl_HashEntry *hPtr;
- MaintainContainer *masterPtr;
- MaintainContent *slavePtr;
+ MaintainContainer *containerPtr;
+ MaintainContent *contentPtr;
int isNew, map;
Tk_Window ancestor, parent;
- TkDisplay *dispPtr = ((TkWindow *) master)->dispPtr;
+ TkDisplay *dispPtr = ((TkWindow *) container)->dispPtr;
- ((TkWindow *)slave)->maintainerPtr = (TkWindow *)master;
+ ((TkWindow *)window)->maintainerPtr = (TkWindow *)container;
- ((TkWindow *)slave)->maintainerPtr = (TkWindow *)master;
- if (master == Tk_Parent(slave)) {
+ ((TkWindow *)window)->maintainerPtr = (TkWindow *)container;
+ if (container == Tk_Parent(window)) {
/*
- * If the slave is a direct descendant of the master, don't bother
+ * If the window is a direct descendant of the container, don't bother
* setting up the extra infrastructure for management, just make a
* call to Tk_MoveResizeWindow; the parent/child relationship will
* take care of the rest.
*/
- Tk_MoveResizeWindow(slave, x, y, width, height);
+ Tk_MoveResizeWindow(window, x, y, width, height);
/*
- * Map the slave if the master is already mapped; otherwise, wait
- * until the master is mapped later (in which case mapping the slave
+ * Map the window if the container is already mapped; otherwise, wait
+ * until the container is mapped later (in which case mapping the window
* is taken care of elsewhere).
*/
- if (Tk_IsMapped(master)) {
- Tk_MapWindow(slave);
+ if (Tk_IsMapped(container)) {
+ Tk_MapWindow(window);
}
return;
}
@@ -455,55 +455,55 @@ Tk_MaintainGeometry(
}
/*
- * See if there is already a MaintainContainer structure for the master; if
+ * See if there is already a MaintainContainer structure for the container; if
* not, then create one.
*/
- parent = Tk_Parent(slave);
+ parent = Tk_Parent(window);
hPtr = Tcl_CreateHashEntry(&dispPtr->maintainHashTable,
- (char *) master, &isNew);
+ (char *) container, &isNew);
if (!isNew) {
- masterPtr = Tcl_GetHashValue(hPtr);
+ containerPtr = (MaintainContainer *)Tcl_GetHashValue(hPtr);
} else {
- masterPtr = ckalloc(sizeof(MaintainContainer));
- masterPtr->ancestor = master;
- masterPtr->checkScheduled = 0;
- masterPtr->slavePtr = NULL;
- Tcl_SetHashValue(hPtr, masterPtr);
+ containerPtr = (MaintainContainer *)ckalloc(sizeof(MaintainContainer));
+ containerPtr->ancestor = container;
+ containerPtr->checkScheduled = 0;
+ containerPtr->contentPtr = NULL;
+ Tcl_SetHashValue(hPtr, containerPtr);
}
/*
- * Create a MaintainContent structure for the slave if there isn't already
+ * Create a MaintainContent structure for the window if there isn't already
* one.
*/
- for (slavePtr = masterPtr->slavePtr; slavePtr != NULL;
- slavePtr = slavePtr->nextPtr) {
- if (slavePtr->slave == slave) {
- goto gotSlave;
+ for (contentPtr = containerPtr->contentPtr; contentPtr != NULL;
+ contentPtr = contentPtr->nextPtr) {
+ if (contentPtr->content == window) {
+ goto gotContent;
}
}
- slavePtr = ckalloc(sizeof(MaintainContent));
- slavePtr->slave = slave;
- slavePtr->master = master;
- slavePtr->nextPtr = masterPtr->slavePtr;
- masterPtr->slavePtr = slavePtr;
- Tk_CreateEventHandler(slave, StructureNotifyMask, MaintainContentProc,
- slavePtr);
+ contentPtr = (MaintainContent *)ckalloc(sizeof(MaintainContent));
+ contentPtr->content = window;
+ contentPtr->container = container;
+ contentPtr->nextPtr = containerPtr->contentPtr;
+ containerPtr->contentPtr = contentPtr;
+ Tk_CreateEventHandler(window, StructureNotifyMask, MaintainContentProc,
+ contentPtr);
/*
* Make sure that there are event handlers registered for all the windows
- * between master and slave's parent (including master but not slave's
- * parent). There may already be handlers for master and some of its
- * ancestors (masterPtr->ancestor tells how many).
+ * between container and windows's parent (including container but not window's
+ * parent). There may already be handlers for container and some of its
+ * ancestors (containerPtr->ancestor tells how many).
*/
- for (ancestor = master; ancestor != parent;
+ for (ancestor = container; ancestor != parent;
ancestor = Tk_Parent(ancestor)) {
- if (ancestor == masterPtr->ancestor) {
+ if (ancestor == containerPtr->ancestor) {
Tk_CreateEventHandler(ancestor, StructureNotifyMask,
- MaintainContainerProc, masterPtr);
- masterPtr->ancestor = Tk_Parent(ancestor);
+ MaintainContainerProc, containerPtr);
+ containerPtr->ancestor = Tk_Parent(ancestor);
}
}
@@ -512,27 +512,27 @@ Tk_MaintainGeometry(
* if it's not currently in the right place or state.
*/
- gotSlave:
- slavePtr->x = x;
- slavePtr->y = y;
- slavePtr->width = width;
- slavePtr->height = height;
+ gotContent:
+ contentPtr->x = x;
+ contentPtr->y = y;
+ contentPtr->width = width;
+ contentPtr->height = height;
map = 1;
- for (ancestor = slavePtr->master; ; ancestor = Tk_Parent(ancestor)) {
+ for (ancestor = contentPtr->container; ; ancestor = Tk_Parent(ancestor)) {
if (!Tk_IsMapped(ancestor) && (ancestor != parent)) {
map = 0;
}
if (ancestor == parent) {
- if ((x != Tk_X(slavePtr->slave))
- || (y != Tk_Y(slavePtr->slave))
- || (width != Tk_Width(slavePtr->slave))
- || (height != Tk_Height(slavePtr->slave))) {
- Tk_MoveResizeWindow(slavePtr->slave, x, y, width, height);
+ if ((x != Tk_X(contentPtr->content))
+ || (y != Tk_Y(contentPtr->content))
+ || (width != Tk_Width(contentPtr->content))
+ || (height != Tk_Height(contentPtr->content))) {
+ Tk_MoveResizeWindow(contentPtr->content, x, y, width, height);
}
if (map) {
- Tk_MapWindow(slavePtr->slave);
+ Tk_MapWindow(contentPtr->content);
} else {
- Tk_UnmapWindow(slavePtr->slave);
+ Tk_UnmapWindow(contentPtr->content);
}
break;
}
@@ -547,37 +547,37 @@ Tk_MaintainGeometry(
* Tk_UnmaintainGeometry --
*
* This procedure cancels a previous Tk_MaintainGeometry call, so that
- * the relationship between slave and master is no longer maintained.
+ * the relationship between window and container is no longer maintained.
*
* Results:
* None.
*
* Side effects:
- * The slave is unmapped and state is released, so that slave won't track
- * master any more. If we weren't previously managing slave relative to
- * master, then this procedure has no effect.
+ * The window is unmapped and state is released, so that window won't track
+ * container any more. If we weren't previously managing window relative to
+ * container, then this procedure has no effect.
*
*----------------------------------------------------------------------
*/
void
Tk_UnmaintainGeometry(
- Tk_Window slave, /* Slave for geometry management. */
- Tk_Window master) /* Master for slave; must be a descendant of
- * slave's parent. */
+ Tk_Window window, /* WIndow for geometry management. */
+ Tk_Window container) /* Container for window; must be a descendant of
+ * window's parent. */
{
Tcl_HashEntry *hPtr;
- MaintainContainer *masterPtr;
- MaintainContent *slavePtr, *prevPtr;
+ MaintainContainer *containerPtr;
+ MaintainContent *contentPtr, *prevPtr;
Tk_Window ancestor;
- TkDisplay *dispPtr = ((TkWindow *) slave)->dispPtr;
+ TkDisplay *dispPtr = ((TkWindow *) window)->dispPtr;
- ((TkWindow *)slave)->maintainerPtr = NULL;
+ ((TkWindow *)window)->maintainerPtr = NULL;
- ((TkWindow *)slave)->maintainerPtr = NULL;
- if (master == Tk_Parent(slave)) {
+ ((TkWindow *)window)->maintainerPtr = NULL;
+ if (container == Tk_Parent(window)) {
/*
- * If the slave is a direct descendant of the master,
+ * If the window is a direct descendant of the container,
* Tk_MaintainGeometry will not have set up any of the extra
* infrastructure. Don't even bother to look for it, just return.
*/
@@ -589,47 +589,47 @@ Tk_UnmaintainGeometry(
Tcl_InitHashTable(&dispPtr->maintainHashTable, TCL_ONE_WORD_KEYS);
}
- if (!(((TkWindow *) slave)->flags & TK_ALREADY_DEAD)) {
- Tk_UnmapWindow(slave);
+ if (!(((TkWindow *) window)->flags & TK_ALREADY_DEAD)) {
+ Tk_UnmapWindow(window);
}
- hPtr = Tcl_FindHashEntry(&dispPtr->maintainHashTable, (char *) master);
+ hPtr = Tcl_FindHashEntry(&dispPtr->maintainHashTable, container);
if (hPtr == NULL) {
return;
}
- masterPtr = Tcl_GetHashValue(hPtr);
- slavePtr = masterPtr->slavePtr;
- if (slavePtr->slave == slave) {
- masterPtr->slavePtr = slavePtr->nextPtr;
+ containerPtr = (MaintainContainer *)Tcl_GetHashValue(hPtr);
+ contentPtr = containerPtr->contentPtr;
+ if (contentPtr->content == window) {
+ containerPtr->contentPtr = contentPtr->nextPtr;
} else {
- for (prevPtr = slavePtr, slavePtr = slavePtr->nextPtr; ;
- prevPtr = slavePtr, slavePtr = slavePtr->nextPtr) {
- if (slavePtr == NULL) {
+ for (prevPtr = contentPtr, contentPtr = contentPtr->nextPtr; ;
+ prevPtr = contentPtr, contentPtr = contentPtr->nextPtr) {
+ if (contentPtr == NULL) {
return;
}
- if (slavePtr->slave == slave) {
- prevPtr->nextPtr = slavePtr->nextPtr;
+ if (contentPtr->content == window) {
+ prevPtr->nextPtr = contentPtr->nextPtr;
break;
}
}
}
- Tk_DeleteEventHandler(slavePtr->slave, StructureNotifyMask,
- MaintainContentProc, slavePtr);
- ckfree(slavePtr);
- if (masterPtr->slavePtr == NULL) {
- if (masterPtr->ancestor != NULL) {
- for (ancestor = master; ; ancestor = Tk_Parent(ancestor)) {
+ Tk_DeleteEventHandler(contentPtr->content, StructureNotifyMask,
+ MaintainContentProc, contentPtr);
+ ckfree(contentPtr);
+ if (containerPtr->contentPtr == NULL) {
+ if (containerPtr->ancestor != NULL) {
+ for (ancestor = container; ; ancestor = Tk_Parent(ancestor)) {
Tk_DeleteEventHandler(ancestor, StructureNotifyMask,
- MaintainContainerProc, masterPtr);
- if (ancestor == masterPtr->ancestor) {
+ MaintainContainerProc, containerPtr);
+ if (ancestor == containerPtr->ancestor) {
break;
}
}
}
- if (masterPtr->checkScheduled) {
- Tcl_CancelIdleCall(MaintainCheckProc, masterPtr);
+ if (containerPtr->checkScheduled) {
+ Tcl_CancelIdleCall(MaintainCheckProc, containerPtr);
}
Tcl_DeleteHashEntry(hPtr);
- ckfree(masterPtr);
+ ckfree(containerPtr);
}
}
@@ -639,7 +639,7 @@ Tk_UnmaintainGeometry(
* MaintainContainerProc --
*
* This procedure is invoked by the Tk event dispatcher in response to
- * StructureNotify events on the master or one of its ancestors, on
+ * StructureNotify events on the container or one of its ancestors, on
* behalf of Tk_MaintainGeometry.
*
* Results:
@@ -648,7 +648,7 @@ Tk_UnmaintainGeometry(
* Side effects:
* It schedules a call to MaintainCheckProc, which will eventually caused
* the postions and mapped states to be recalculated for all the
- * maintained slaves of the master. Or, if the master window is being
+ * maintained windows of the container. Or, if the container window is being
* deleted then state is cleaned up.
*
*----------------------------------------------------------------------
@@ -657,34 +657,34 @@ Tk_UnmaintainGeometry(
static void
MaintainContainerProc(
ClientData clientData, /* Pointer to MaintainContainer structure for the
- * master window. */
+ * container window. */
XEvent *eventPtr) /* Describes what just happened. */
{
- MaintainContainer *masterPtr = clientData;
- MaintainContent *slavePtr;
+ MaintainContainer *containerPtr = (MaintainContainer *)clientData;
+ MaintainContent *contentPtr;
int done;
if ((eventPtr->type == ConfigureNotify)
|| (eventPtr->type == MapNotify)
|| (eventPtr->type == UnmapNotify)) {
- if (!masterPtr->checkScheduled) {
- masterPtr->checkScheduled = 1;
- Tcl_DoWhenIdle(MaintainCheckProc, masterPtr);
+ if (!containerPtr->checkScheduled) {
+ containerPtr->checkScheduled = 1;
+ Tcl_DoWhenIdle(MaintainCheckProc, containerPtr);
}
} else if (eventPtr->type == DestroyNotify) {
/*
- * Delete all of the state associated with this master, but be careful
- * not to use masterPtr after the last slave is deleted, since its
+ * Delete all of the state associated with this container, but be careful
+ * not to use containerPtr after the last window is deleted, since its
* memory will have been freed.
*/
done = 0;
do {
- slavePtr = masterPtr->slavePtr;
- if (slavePtr->nextPtr == NULL) {
+ contentPtr = containerPtr->contentPtr;
+ if (contentPtr->nextPtr == NULL) {
done = 1;
}
- Tk_UnmaintainGeometry(slavePtr->slave, slavePtr->master);
+ Tk_UnmaintainGeometry(contentPtr->content, contentPtr->container);
} while (!done);
}
}
@@ -695,7 +695,7 @@ MaintainContainerProc(
* MaintainContentProc --
*
* This procedure is invoked by the Tk event dispatcher in response to
- * StructureNotify events on a slave being managed by
+ * StructureNotify events on a window being managed by
* Tk_MaintainGeometry.
*
* Results:
@@ -703,7 +703,7 @@ MaintainContainerProc(
*
* Side effects:
* If the event is a DestroyNotify event then the Maintain state and
- * event handlers for this slave are deleted.
+ * event handlers for this window are deleted.
*
*----------------------------------------------------------------------
*/
@@ -711,13 +711,13 @@ MaintainContainerProc(
static void
MaintainContentProc(
ClientData clientData, /* Pointer to MaintainContent structure for
- * master-slave pair. */
+ * container-window pair. */
XEvent *eventPtr) /* Describes what just happened. */
{
- MaintainContent *slavePtr = clientData;
+ MaintainContent *contentPtr = (MaintainContent *)clientData;
if (eventPtr->type == DestroyNotify) {
- Tk_UnmaintainGeometry(slavePtr->slave, slavePtr->master);
+ Tk_UnmaintainGeometry(contentPtr->content, contentPtr->container);
}
}
@@ -727,16 +727,16 @@ MaintainContentProc(
* MaintainCheckProc --
*
* This procedure is invoked by the Tk event dispatcher as an idle
- * handler, when a master or one of its ancestors has been reconfigured,
- * mapped, or unmapped. Its job is to scan all of the slaves for the
- * master and reposition them, map them, or unmap them as needed to
- * maintain their geometry relative to the master.
+ * handler, when a container or one of its ancestors has been reconfigured,
+ * mapped, or unmapped. Its job is to scan all of the windows for the
+ * container and reposition them, map them, or unmap them as needed to
+ * maintain their geometry relative to the container.
*
* Results:
* None.
*
* Side effects:
- * Slaves can get repositioned, mapped, or unmapped.
+ * Windows can get repositioned, mapped, or unmapped.
*
*----------------------------------------------------------------------
*/
@@ -744,33 +744,33 @@ MaintainContentProc(
static void
MaintainCheckProc(
ClientData clientData) /* Pointer to MaintainContainer structure for the
- * master window. */
+ * container window. */
{
- MaintainContainer *masterPtr = clientData;
- MaintainContent *slavePtr;
+ MaintainContainer *containerPtr = (MaintainContainer *)clientData;
+ MaintainContent *contentPtr;
Tk_Window ancestor, parent;
int x, y, map;
- masterPtr->checkScheduled = 0;
- for (slavePtr = masterPtr->slavePtr; slavePtr != NULL;
- slavePtr = slavePtr->nextPtr) {
- parent = Tk_Parent(slavePtr->slave);
- x = slavePtr->x;
- y = slavePtr->y;
+ containerPtr->checkScheduled = 0;
+ for (contentPtr = containerPtr->contentPtr; contentPtr != NULL;
+ contentPtr = contentPtr->nextPtr) {
+ parent = Tk_Parent(contentPtr->content);
+ x = contentPtr->x;
+ y = contentPtr->y;
map = 1;
- for (ancestor = slavePtr->master; ; ancestor = Tk_Parent(ancestor)) {
+ for (ancestor = contentPtr->container; ; ancestor = Tk_Parent(ancestor)) {
if (!Tk_IsMapped(ancestor) && (ancestor != parent)) {
map = 0;
}
if (ancestor == parent) {
- if ((x != Tk_X(slavePtr->slave))
- || (y != Tk_Y(slavePtr->slave))) {
- Tk_MoveWindow(slavePtr->slave, x, y);
+ if ((x != Tk_X(contentPtr->content))
+ || (y != Tk_Y(contentPtr->content))) {
+ Tk_MoveWindow(contentPtr->content, x, y);
}
if (map) {
- Tk_MapWindow(slavePtr->slave);
+ Tk_MapWindow(contentPtr->content);
} else {
- Tk_UnmapWindow(slavePtr->slave);
+ Tk_UnmapWindow(contentPtr->content);
}
break;
}
diff --git a/generic/tkImage.c b/generic/tkImage.c
index 8192c23..763c65b 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -26,8 +26,8 @@ typedef struct Image {
Display *display; /* Display for tkwin. Needed because when the
* image is eventually freed tkwin may not
* exist anymore. */
- struct ImageModel *masterPtr;
- /* Master for this image (identifiers image
+ struct ImageModel *modelPtr;
+ /* Model for this image (identifiers image
* manager, for example). */
ClientData instanceData; /* One word argument to pass to image manager
* when dealing with this image instance. */
@@ -40,7 +40,7 @@ typedef struct Image {
} Image;
/*
- * For each image master there is one of the following structures, which
+ * For each image model there is one of the following structures, which
* represents a name in the image table and all of the images instantiated
* from it. Entries in mainPtr->imageTable point to these structures.
*/
@@ -49,8 +49,8 @@ typedef struct ImageModel {
Tk_ImageType *typePtr; /* Information about image type. NULL means
* that no image manager owns this image: the
* image was deleted. */
- ClientData masterData; /* One-word argument to pass to image mgr when
- * dealing with the master, as opposed to
+ ClientData modelData; /* One-word argument to pass to image mgr when
+ * dealing with the model, as opposed to
* instances. */
int width, height; /* Last known dimensions for image. */
Tcl_HashTable *tablePtr; /* Pointer to hash table containing image (the
@@ -82,8 +82,8 @@ static Tcl_ThreadDataKey dataKey;
*/
static void ImageTypeThreadExitProc(ClientData clientData);
-static void DeleteImage(ImageModel *masterPtr);
-static void EventuallyDeleteImage(ImageModel *masterPtr,
+static void DeleteImage(ImageModel *modelPtr);
+static void EventuallyDeleteImage(ImageModel *modelPtr,
int forgetImageHashNow);
/*
@@ -104,10 +104,10 @@ static void EventuallyDeleteImage(ImageModel *masterPtr,
static void
ImageTypeThreadExitProc(
- ClientData clientData) /* not used */
+ TCL_UNUSED(void *))
{
Tk_ImageType *freePtr;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
while (tsdPtr->oldImageTypeList != NULL) {
@@ -149,14 +149,14 @@ Tk_CreateOldImageType(
* by caller. */
{
Tk_ImageType *copyPtr;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (!tsdPtr->initialized) {
tsdPtr->initialized = 1;
Tcl_CreateThreadExitHandler(ImageTypeThreadExitProc, NULL);
}
- copyPtr = ckalloc(sizeof(Tk_ImageType));
+ copyPtr = (Tk_ImageType *)ckalloc(sizeof(Tk_ImageType));
*copyPtr = *typePtr;
copyPtr->nextPtr = tsdPtr->oldImageTypeList;
tsdPtr->oldImageTypeList = copyPtr;
@@ -170,14 +170,14 @@ Tk_CreateImageType(
* by caller. */
{
Tk_ImageType *copyPtr;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (!tsdPtr->initialized) {
tsdPtr->initialized = 1;
Tcl_CreateThreadExitHandler(ImageTypeThreadExitProc, NULL);
}
- copyPtr = ckalloc(sizeof(Tk_ImageType));
+ copyPtr = (Tk_ImageType *)ckalloc(sizeof(Tk_ImageType));
*copyPtr = *typePtr;
copyPtr->nextPtr = tsdPtr->imageTypeList;
tsdPtr->imageTypeList = copyPtr;
@@ -215,10 +215,10 @@ Tk_ImageObjCmd(
IMAGE_CREATE, IMAGE_DELETE, IMAGE_HEIGHT, IMAGE_INUSE, IMAGE_NAMES,
IMAGE_TYPE, IMAGE_TYPES, IMAGE_WIDTH
};
- TkWindow *winPtr = clientData;
+ TkWindow *winPtr = (TkWindow *)clientData;
int i, isNew, firstOption, index;
Tk_ImageType *typePtr;
- ImageModel *masterPtr;
+ ImageModel *modelPtr;
Image *imagePtr;
Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
@@ -226,7 +226,7 @@ Tk_ImageObjCmd(
TkDisplay *dispPtr = winPtr->dispPtr;
const char *arg, *name;
Tcl_Obj *resultObj;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (objc < 2) {
@@ -297,7 +297,7 @@ Tk_ImageObjCmd(
/*
* Need to check if the _command_ that we are about to create is
- * the name of the current master widget command (normally "." but
+ * the name of the current model widget command (normally "." but
* could have been renamed) and fail in that case before a really
* nasty and hard to stop crash happens.
*/
@@ -318,37 +318,37 @@ Tk_ImageObjCmd(
hPtr = Tcl_CreateHashEntry(&winPtr->mainPtr->imageTable, name, &isNew);
if (isNew) {
- masterPtr = ckalloc(sizeof(ImageModel));
- masterPtr->typePtr = NULL;
- masterPtr->masterData = NULL;
- masterPtr->width = masterPtr->height = 1;
- masterPtr->tablePtr = &winPtr->mainPtr->imageTable;
- masterPtr->hPtr = hPtr;
- masterPtr->instancePtr = NULL;
- masterPtr->deleted = 0;
- masterPtr->winPtr = winPtr->mainPtr->winPtr;
- Tcl_Preserve(masterPtr->winPtr);
- Tcl_SetHashValue(hPtr, masterPtr);
+ modelPtr = (ImageModel *)ckalloc(sizeof(ImageModel));
+ modelPtr->typePtr = NULL;
+ modelPtr->modelData = NULL;
+ modelPtr->width = modelPtr->height = 1;
+ modelPtr->tablePtr = &winPtr->mainPtr->imageTable;
+ modelPtr->hPtr = hPtr;
+ modelPtr->instancePtr = NULL;
+ modelPtr->deleted = 0;
+ modelPtr->winPtr = winPtr->mainPtr->winPtr;
+ Tcl_Preserve(modelPtr->winPtr);
+ Tcl_SetHashValue(hPtr, modelPtr);
} else {
/*
* An image already exists by this name. Disconnect the instances
- * from the master.
+ * from the model.
*/
- masterPtr = Tcl_GetHashValue(hPtr);
- if (masterPtr->typePtr != NULL) {
- for (imagePtr = masterPtr->instancePtr; imagePtr != NULL;
+ modelPtr = (ImageModel *)Tcl_GetHashValue(hPtr);
+ if (modelPtr->typePtr != NULL) {
+ for (imagePtr = modelPtr->instancePtr; imagePtr != NULL;
imagePtr = imagePtr->nextPtr) {
- masterPtr->typePtr->freeProc(imagePtr->instanceData,
+ modelPtr->typePtr->freeProc(imagePtr->instanceData,
imagePtr->display);
imagePtr->changeProc(imagePtr->widgetClientData, 0, 0,
- masterPtr->width, masterPtr->height,
- masterPtr->width, masterPtr->height);
+ modelPtr->width, modelPtr->height,
+ modelPtr->width, modelPtr->height);
}
- masterPtr->typePtr->deleteProc(masterPtr->masterData);
- masterPtr->typePtr = NULL;
+ modelPtr->typePtr->deleteProc(modelPtr->modelData);
+ modelPtr->typePtr = NULL;
}
- masterPtr->deleted = 0;
+ modelPtr->deleted = 0;
}
/*
@@ -363,34 +363,34 @@ Tk_ImageObjCmd(
if (oldimage) {
int i;
- args = ckalloc((objc+1) * sizeof(char *));
+ args = (Tcl_Obj **)ckalloc((objc+1) * sizeof(Tcl_Obj *));
for (i = 0; i < objc; i++) {
args[i] = (Tcl_Obj *) Tcl_GetString(objv[i]);
}
args[objc] = NULL;
}
- Tcl_Preserve(masterPtr);
+ Tcl_Preserve(modelPtr);
if (typePtr->createProc(interp, name, objc, args, typePtr,
- (Tk_ImageModel)masterPtr, &masterPtr->masterData) != TCL_OK){
- EventuallyDeleteImage(masterPtr, 0);
- Tcl_Release(masterPtr);
+ (Tk_ImageModel)modelPtr, &modelPtr->modelData) != TCL_OK){
+ EventuallyDeleteImage(modelPtr, 0);
+ Tcl_Release(modelPtr);
if (oldimage) {
ckfree(args);
}
return TCL_ERROR;
}
- Tcl_Release(masterPtr);
+ Tcl_Release(modelPtr);
if (oldimage) {
ckfree(args);
}
- masterPtr->typePtr = typePtr;
- for (imagePtr = masterPtr->instancePtr; imagePtr != NULL;
+ modelPtr->typePtr = typePtr;
+ for (imagePtr = modelPtr->instancePtr; imagePtr != NULL;
imagePtr = imagePtr->nextPtr) {
imagePtr->instanceData = typePtr->getProc(imagePtr->tkwin,
- masterPtr->masterData);
+ modelPtr->modelData);
}
Tcl_SetObjResult(interp, Tcl_NewStringObj(
- Tcl_GetHashKey(&winPtr->mainPtr->imageTable, hPtr), -1));
+ (const char *)Tcl_GetHashKey(&winPtr->mainPtr->imageTable, hPtr), -1));
break;
}
case IMAGE_DELETE:
@@ -400,11 +400,11 @@ Tk_ImageObjCmd(
if (hPtr == NULL) {
goto alreadyDeleted;
}
- masterPtr = Tcl_GetHashValue(hPtr);
- if (masterPtr->deleted) {
+ modelPtr = (ImageModel *)Tcl_GetHashValue(hPtr);
+ if (modelPtr->deleted) {
goto alreadyDeleted;
}
- DeleteImage(masterPtr);
+ DeleteImage(modelPtr);
}
break;
case IMAGE_NAMES:
@@ -415,12 +415,12 @@ Tk_ImageObjCmd(
hPtr = Tcl_FirstHashEntry(&winPtr->mainPtr->imageTable, &search);
resultObj = Tcl_NewObj();
for ( ; hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) {
- masterPtr = Tcl_GetHashValue(hPtr);
- if (masterPtr->deleted) {
+ modelPtr = (ImageModel *)Tcl_GetHashValue(hPtr);
+ if (modelPtr->deleted) {
continue;
}
Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewStringObj(
- Tcl_GetHashKey(&winPtr->mainPtr->imageTable, hPtr), -1));
+ (const char *)Tcl_GetHashKey(&winPtr->mainPtr->imageTable, hPtr), -1));
}
Tcl_SetObjResult(interp, resultObj);
break;
@@ -449,7 +449,7 @@ Tk_ImageObjCmd(
case IMAGE_WIDTH:
/*
* These operations all parse virtually identically. First check to
- * see if three args are given. Then get a non-deleted master from the
+ * see if three args are given. Then get a non-deleted model from the
* third arg.
*/
@@ -463,8 +463,8 @@ Tk_ImageObjCmd(
if (hPtr == NULL) {
goto alreadyDeleted;
}
- masterPtr = Tcl_GetHashValue(hPtr);
- if (masterPtr->deleted) {
+ modelPtr = (ImageModel *)Tcl_GetHashValue(hPtr);
+ if (modelPtr->deleted) {
goto alreadyDeleted;
}
@@ -474,20 +474,20 @@ Tk_ImageObjCmd(
switch ((enum options) index) {
case IMAGE_HEIGHT:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(masterPtr->height));
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(modelPtr->height));
break;
case IMAGE_INUSE:
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
- masterPtr->typePtr && masterPtr->instancePtr));
+ modelPtr->typePtr && modelPtr->instancePtr));
break;
case IMAGE_TYPE:
- if (masterPtr->typePtr != NULL) {
+ if (modelPtr->typePtr != NULL) {
Tcl_SetObjResult(interp,
- Tcl_NewStringObj(masterPtr->typePtr->name, -1));
+ Tcl_NewStringObj(modelPtr->typePtr->name, -1));
}
break;
case IMAGE_WIDTH:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(masterPtr->width));
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(modelPtr->width));
break;
default:
Tcl_Panic("can't happen");
@@ -534,12 +534,12 @@ Tk_ImageChanged(
int imageWidth, int imageHeight)
/* New dimensions of image. */
{
- ImageModel *masterPtr = (ImageModel *) imageModel;
+ ImageModel *modelPtr = (ImageModel *) imageModel;
Image *imagePtr;
- masterPtr->width = imageWidth;
- masterPtr->height = imageHeight;
- for (imagePtr = masterPtr->instancePtr; imagePtr != NULL;
+ modelPtr->width = imageWidth;
+ modelPtr->height = imageHeight;
+ for (imagePtr = modelPtr->instancePtr; imagePtr != NULL;
imagePtr = imagePtr->nextPtr) {
imagePtr->changeProc(imagePtr->widgetClientData, x, y, width, height,
imageWidth, imageHeight);
@@ -551,7 +551,7 @@ Tk_ImageChanged(
*
* Tk_NameOfImage --
*
- * Given a token for an image master, this function returns the name of
+ * Given a token for an image model, this function returns the name of
* the image.
*
* Results:
@@ -567,12 +567,12 @@ const char *
Tk_NameOfImage(
Tk_ImageModel imageModel) /* Token for image. */
{
- ImageModel *masterPtr = (ImageModel *) imageModel;
+ ImageModel *modelPtr = (ImageModel *) imageModel;
- if (masterPtr->hPtr == NULL) {
+ if (modelPtr->hPtr == NULL) {
return NULL;
}
- return Tcl_GetHashKey(masterPtr->tablePtr, masterPtr->hPtr);
+ return (const char *)Tcl_GetHashKey(modelPtr->tablePtr, modelPtr->hPtr);
}
/*
@@ -610,30 +610,30 @@ Tk_GetImage(
ClientData clientData) /* One-word argument to pass to damageProc. */
{
Tcl_HashEntry *hPtr;
- ImageModel *masterPtr;
+ ImageModel *modelPtr;
Image *imagePtr;
hPtr = Tcl_FindHashEntry(&((TkWindow *) tkwin)->mainPtr->imageTable, name);
if (hPtr == NULL) {
goto noSuchImage;
}
- masterPtr = Tcl_GetHashValue(hPtr);
- if (masterPtr->typePtr == NULL) {
+ modelPtr = (ImageModel *)Tcl_GetHashValue(hPtr);
+ if (modelPtr->typePtr == NULL) {
goto noSuchImage;
}
- if (masterPtr->deleted) {
+ if (modelPtr->deleted) {
goto noSuchImage;
}
- imagePtr = ckalloc(sizeof(Image));
+ imagePtr = (Image *)ckalloc(sizeof(Image));
imagePtr->tkwin = tkwin;
imagePtr->display = Tk_Display(tkwin);
- imagePtr->masterPtr = masterPtr;
+ imagePtr->modelPtr = modelPtr;
imagePtr->instanceData =
- masterPtr->typePtr->getProc(tkwin, masterPtr->masterData);
+ modelPtr->typePtr->getProc(tkwin, modelPtr->modelData);
imagePtr->changeProc = changeProc;
imagePtr->widgetClientData = clientData;
- imagePtr->nextPtr = masterPtr->instancePtr;
- masterPtr->instancePtr = imagePtr;
+ imagePtr->nextPtr = modelPtr->instancePtr;
+ modelPtr->instancePtr = imagePtr;
return (Tk_Image) imagePtr;
noSuchImage:
@@ -669,20 +669,20 @@ Tk_FreeImage(
* a widget. */
{
Image *imagePtr = (Image *) image;
- ImageModel *masterPtr = imagePtr->masterPtr;
+ ImageModel *modelPtr = imagePtr->modelPtr;
Image *prevPtr;
/*
* Clean up the particular instance.
*/
- if (masterPtr->typePtr != NULL) {
- masterPtr->typePtr->freeProc(imagePtr->instanceData,
+ if (modelPtr->typePtr != NULL) {
+ modelPtr->typePtr->freeProc(imagePtr->instanceData,
imagePtr->display);
}
- prevPtr = masterPtr->instancePtr;
+ prevPtr = modelPtr->instancePtr;
if (prevPtr == imagePtr) {
- masterPtr->instancePtr = imagePtr->nextPtr;
+ modelPtr->instancePtr = imagePtr->nextPtr;
} else {
while (prevPtr->nextPtr != imagePtr) {
prevPtr = prevPtr->nextPtr;
@@ -692,16 +692,16 @@ Tk_FreeImage(
ckfree(imagePtr);
/*
- * If there are no more instances left for the master, and if the master
- * image has been deleted, then delete the master too.
+ * If there are no more instances left for the model, and if the model
+ * image has been deleted, then delete the model too.
*/
- if ((masterPtr->typePtr == NULL) && (masterPtr->instancePtr == NULL)) {
- if (masterPtr->hPtr != NULL) {
- Tcl_DeleteHashEntry(masterPtr->hPtr);
+ if ((modelPtr->typePtr == NULL) && (modelPtr->instancePtr == NULL)) {
+ if (modelPtr->hPtr != NULL) {
+ Tcl_DeleteHashEntry(modelPtr->hPtr);
}
- Tcl_Release(masterPtr->winPtr);
- ckfree(masterPtr);
+ Tcl_Release(modelPtr->winPtr);
+ ckfree(modelPtr);
}
}
@@ -741,9 +741,9 @@ Tk_PostscriptImage(
GC newGC;
XGCValues gcValues;
- if (imagePtr->masterPtr->typePtr == NULL) {
+ if (imagePtr->modelPtr->typePtr == NULL) {
/*
- * No master for image, so nothing to display on postscript.
+ * No model for image, so nothing to display on postscript.
*/
return TCL_OK;
@@ -754,9 +754,9 @@ Tk_PostscriptImage(
* otherwise go on with generic code.
*/
- if (imagePtr->masterPtr->typePtr->postscriptProc != NULL) {
- return imagePtr->masterPtr->typePtr->postscriptProc(
- imagePtr->masterPtr->masterData, interp, tkwin, psinfo,
+ if (imagePtr->modelPtr->typePtr->postscriptProc != NULL) {
+ return imagePtr->modelPtr->typePtr->postscriptProc(
+ imagePtr->modelPtr->modelData, interp, tkwin, psinfo,
x, y, width, height, prepass);
}
@@ -837,9 +837,9 @@ Tk_RedrawImage(
{
Image *imagePtr = (Image *) image;
- if (imagePtr->masterPtr->typePtr == NULL) {
+ if (imagePtr->modelPtr->typePtr == NULL) {
/*
- * No master for image, so nothing to display.
+ * No model for image, so nothing to display.
*/
return;
@@ -859,13 +859,13 @@ Tk_RedrawImage(
drawableY -= imageY;
imageY = 0;
}
- if ((imageX + width) > imagePtr->masterPtr->width) {
- width = imagePtr->masterPtr->width - imageX;
+ if ((imageX + width) > imagePtr->modelPtr->width) {
+ width = imagePtr->modelPtr->width - imageX;
}
- if ((imageY + height) > imagePtr->masterPtr->height) {
- height = imagePtr->masterPtr->height - imageY;
+ if ((imageY + height) > imagePtr->modelPtr->height) {
+ height = imagePtr->modelPtr->height - imageY;
}
- imagePtr->masterPtr->typePtr->displayProc(imagePtr->instanceData,
+ imagePtr->modelPtr->typePtr->displayProc(imagePtr->instanceData,
imagePtr->display, drawable, imageX, imageY, width, height,
drawableX, drawableY);
}
@@ -895,8 +895,8 @@ Tk_SizeOfImage(
{
Image *imagePtr = (Image *) image;
- *widthPtr = imagePtr->masterPtr->width;
- *heightPtr = imagePtr->masterPtr->height;
+ *widthPtr = imagePtr->modelPtr->width;
+ *heightPtr = imagePtr->modelPtr->height;
}
/*
@@ -933,7 +933,7 @@ Tk_DeleteImage(
if (hPtr == NULL) {
return;
}
- DeleteImage(Tcl_GetHashValue(hPtr));
+ DeleteImage((ImageModel *)Tcl_GetHashValue(hPtr));
}
/*
@@ -948,7 +948,7 @@ Tk_DeleteImage(
*
* Side effects:
* The connection is dropped between instances of this image and an image
- * master. Image instances will redisplay themselves as empty areas, but
+ * model. Image instances will redisplay themselves as empty areas, but
* existing instances will not be deleted.
*
*----------------------------------------------------------------------
@@ -956,31 +956,31 @@ Tk_DeleteImage(
static void
DeleteImage(
- ImageModel *masterPtr) /* Pointer to main data structure for image. */
+ ImageModel *modelPtr) /* Pointer to main data structure for image. */
{
Image *imagePtr;
Tk_ImageType *typePtr;
- typePtr = masterPtr->typePtr;
- masterPtr->typePtr = NULL;
+ typePtr = modelPtr->typePtr;
+ modelPtr->typePtr = NULL;
if (typePtr != NULL) {
- for (imagePtr = masterPtr->instancePtr; imagePtr != NULL;
+ for (imagePtr = modelPtr->instancePtr; imagePtr != NULL;
imagePtr = imagePtr->nextPtr) {
typePtr->freeProc(imagePtr->instanceData, imagePtr->display);
imagePtr->changeProc(imagePtr->widgetClientData, 0, 0,
- masterPtr->width, masterPtr->height, masterPtr->width,
- masterPtr->height);
+ modelPtr->width, modelPtr->height, modelPtr->width,
+ modelPtr->height);
}
- typePtr->deleteProc(masterPtr->masterData);
+ typePtr->deleteProc(modelPtr->modelData);
}
- if (masterPtr->instancePtr == NULL) {
- if (masterPtr->hPtr != NULL) {
- Tcl_DeleteHashEntry(masterPtr->hPtr);
+ if (modelPtr->instancePtr == NULL) {
+ if (modelPtr->hPtr != NULL) {
+ Tcl_DeleteHashEntry(modelPtr->hPtr);
}
- Tcl_Release(masterPtr->winPtr);
- ckfree(masterPtr);
+ Tcl_Release(modelPtr->winPtr);
+ ckfree(modelPtr);
} else {
- masterPtr->deleted = 1;
+ modelPtr->deleted = 1;
}
}
@@ -1004,16 +1004,16 @@ DeleteImage(
static void
EventuallyDeleteImage(
- ImageModel *masterPtr, /* Pointer to main data structure for image. */
+ ImageModel *modelPtr, /* Pointer to main data structure for image. */
int forgetImageHashNow) /* Flag to say whether the hash table is about
* to vanish. */
{
if (forgetImageHashNow) {
- masterPtr->hPtr = NULL;
+ modelPtr->hPtr = NULL;
}
- if (!masterPtr->deleted) {
- masterPtr->deleted = 1;
- Tcl_EventuallyFree(masterPtr, (Tcl_FreeProc *) DeleteImage);
+ if (!modelPtr->deleted) {
+ modelPtr->deleted = 1;
+ Tcl_EventuallyFree(modelPtr, (Tcl_FreeProc *) DeleteImage);
}
}
@@ -1045,7 +1045,7 @@ TkDeleteAllImages(
for (hPtr = Tcl_FirstHashEntry(&mainPtr->imageTable, &search);
hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) {
- EventuallyDeleteImage(Tcl_GetHashValue(hPtr), 1);
+ EventuallyDeleteImage((ImageModel *)Tcl_GetHashValue(hPtr), 1);
}
Tcl_DeleteHashTable(&mainPtr->imageTable);
}
@@ -1056,7 +1056,7 @@ TkDeleteAllImages(
* Tk_GetImageModelData --
*
* Given the name of an image, this function returns the type of the
- * image and the clientData associated with its master.
+ * image and the clientData associated with its model.
*
* Results:
* If there is no image by the given name, then NULL is returned and a
@@ -1081,20 +1081,20 @@ Tk_GetImageModelData(
{
TkWindow *winPtr = (TkWindow *) Tk_MainWindow(interp);
Tcl_HashEntry *hPtr;
- ImageModel *masterPtr;
+ ImageModel *modelPtr;
hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->imageTable, name);
if (hPtr == NULL) {
*typePtrPtr = NULL;
return NULL;
}
- masterPtr = Tcl_GetHashValue(hPtr);
- if (masterPtr->deleted) {
+ modelPtr = (ImageModel *)Tcl_GetHashValue(hPtr);
+ if (modelPtr->deleted) {
*typePtrPtr = NULL;
return NULL;
}
- *typePtrPtr = masterPtr->typePtr;
- return masterPtr->masterData;
+ *typePtrPtr = modelPtr->typePtr;
+ return modelPtr->modelData;
}
/*
@@ -1118,7 +1118,6 @@ Tk_GetImageModelData(
*----------------------------------------------------------------------
*/
-/*ARGSUSED*/
void
Tk_SetTSOrigin(
Tk_Window tkwin,
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index 8d51671..c6ab05d 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -14,7 +14,7 @@
#include "tkInt.h"
/*
- * The following data structure represents the master for a bitmap
+ * The following data structure represents the model for a bitmap
* image:
*/
@@ -40,7 +40,7 @@ typedef struct BitmapModel {
char *maskDataString; /* Value of -maskdata option (malloc'ed). */
struct BitmapInstance *instancePtr;
/* First in list of all instances associated
- * with this master. */
+ * with this model. */
} BitmapModel;
/*
@@ -51,7 +51,7 @@ typedef struct BitmapModel {
typedef struct BitmapInstance {
int refCount; /* Number of instances that share this data
* structure. */
- BitmapModel *modelPtr; /* Pointer to master for image. */
+ BitmapModel *modelPtr; /* Pointer to model for image. */
Tk_Window tkwin; /* Window in which the instances will be
* displayed. */
XColor *fg; /* Foreground color for displaying image. */
@@ -322,8 +322,8 @@ ImgBmapConfigureModel(
* ImgBmapConfigureInstance --
*
* This procedure is called to create displaying information for a bitmap
- * image instance based on the configuration information in the master.
- * It is invoked both when new instances are created and when the master
+ * image instance based on the configuration information in the model.
+ * It is invoked both when new instances are created and when the model
* is reconfigured.
*
* Results:
@@ -751,7 +751,7 @@ NextBitmapWord(
static int
ImgBmapCmd(
- ClientData clientData, /* Information about the image master. */
+ ClientData clientData, /* Information about the image model. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -816,10 +816,10 @@ static ClientData
ImgBmapGet(
Tk_Window tkwin, /* Window in which the instance will be
* used. */
- ClientData masterData) /* Pointer to our master structure for the
+ ClientData modelData) /* Pointer to our model structure for the
* image. */
{
- BitmapModel *modelPtr = masterData;
+ BitmapModel *modelPtr = modelData;
BitmapInstance *instancePtr;
/*
@@ -993,7 +993,7 @@ ImgBmapFree(
*
* ImgBmapDelete --
*
- * This procedure is called by the image code to delete the master
+ * This procedure is called by the image code to delete the model
* structure for an image.
*
* Results:
@@ -1007,10 +1007,10 @@ ImgBmapFree(
static void
ImgBmapDelete(
- ClientData masterData) /* Pointer to BitmapModel structure for
+ ClientData modelData) /* Pointer to BitmapModel structure for
* image. Must not have any more instances. */
{
- BitmapModel *modelPtr = masterData;
+ BitmapModel *modelPtr = modelData;
if (modelPtr->instancePtr != NULL) {
Tcl_Panic("tried to delete bitmap image when instances still exist");
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index cfca9ca..e637f8e 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -59,7 +59,7 @@ MODULE_SCOPE const TkStubs tkStubs;
#define TkGenWMConfigureEvent_ TkGenWMConfigureEvent
#define TkGenerateActivateEvents_ TkGenerateActivateEvents
-#if !defined(MAC_OSX_TK)
+#if !defined(MAC_OSX_TK) && defined(MAC_OSX_TCL)
# undef TkpWillDrawWidget
# undef TkpRedrawWidget
static int
diff --git a/generic/ttk/ttkManager.c b/generic/ttk/ttkManager.c
index 42f1812..8cad58c 100644
--- a/generic/ttk/ttkManager.c
+++ b/generic/ttk/ttkManager.c
@@ -463,7 +463,7 @@ int Ttk_GetContentIndexFromObj(
return TCL_OK;
}
- /* Try interpreting as a slave window name;
+ /* Try interpreting as a window name;
*/
if ((*string == '.') &&
(tkwin = Tk_NameToWindow(interp, string, mgr->window))) {
@@ -505,28 +505,28 @@ void Ttk_ReorderContent(Ttk_Manager *mgr, int fromIndex, int toIndex)
/* ASSERT: fromIndex == toIndex */
mgr->content[fromIndex] = moved;
- /* Schedule a relayout. In general, rearranging slaves
+ /* Schedule a relayout. In general, rearranging content
* may also change the size:
*/
ScheduleUpdate(mgr, MGR_RESIZE_REQUIRED);
}
-/* ++ Ttk_Maintainable(interp, slave, container) --
+/* ++ Ttk_Maintainable(interp, window, container) --
* Utility routine. Verifies that 'container' may be used to maintain
- * the geometry of 'slave' via Tk_MaintainGeometry:
+ * the geometry of 'window' via Tk_MaintainGeometry:
*
- * + 'container' is either 'slave's parent -OR-
- * + 'container is a descendant of 'slave's parent.
- * + 'slave' is not a toplevel window
- * + 'slave' belongs to the same toplevel as 'container'
+ * + 'container' is either 'window's parent -OR-
+ * + 'container is a descendant of 'window's parent.
+ * + 'window' is not a toplevel window
+ * + 'window' belongs to the same toplevel as 'container'
*
* Returns: 1 if OK; otherwise 0, leaving an error message in 'interp'.
*/
-int Ttk_Maintainable(Tcl_Interp *interp, Tk_Window slave, Tk_Window container)
+int Ttk_Maintainable(Tcl_Interp *interp, Tk_Window window, Tk_Window container)
{
- Tk_Window ancestor = container, parent = Tk_Parent(slave);
+ Tk_Window ancestor = container, parent = Tk_Parent(window);
- if (Tk_IsTopLevel(slave) || slave == container) {
+ if (Tk_IsTopLevel(window) || window == container) {
goto badWindow;
}
@@ -541,7 +541,7 @@ int Ttk_Maintainable(Tcl_Interp *interp, Tk_Window slave, Tk_Window container)
badWindow:
Tcl_SetObjResult(interp, Tcl_ObjPrintf("can't add %s as slave of %s",
- Tk_PathName(slave), Tk_PathName(container)));
+ Tk_PathName(window), Tk_PathName(container)));
Tcl_SetErrorCode(interp, "TTK", "GEOMETRY", "MAINTAINABLE", NULL);
return 0;
}
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 9ba7ce8..8005517 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -1165,12 +1165,12 @@ CheckForSpecialMenu(
cascadeEntryPtr = cascadeEntryPtr->nextCascadePtr) {
if (cascadeEntryPtr->menuPtr->menuType == MENUBAR
&& cascadeEntryPtr->menuPtr->masterMenuPtr->tkwin) {
- TkMenu *masterMenuPtr = cascadeEntryPtr->menuPtr->masterMenuPtr;
+ TkMenu *mainMenuPtr = cascadeEntryPtr->menuPtr->masterMenuPtr;
int i = 0;
Tcl_DString ds;
Tcl_DStringInit(&ds);
- Tcl_DStringAppend(&ds, Tk_PathName(masterMenuPtr->tkwin), -1);
+ Tcl_DStringAppend(&ds, Tk_PathName(mainMenuPtr->tkwin), -1);
while (specialMenus[i].name) {
Tcl_DStringAppend(&ds, specialMenus[i].name,
specialMenus[i].len);
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 3b843b9..6b7871f 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -674,7 +674,7 @@ TkWmNewWindow(
wmPtr->reparent = None;
wmPtr->titleUid = NULL;
wmPtr->iconName = NULL;
- wmPtr->master = NULL;
+ wmPtr->container = NULL;
wmPtr->hints.flags = InputHint | StateHint;
wmPtr->hints.input = True;
wmPtr->hints.initial_state = NormalState;
@@ -950,7 +950,7 @@ TkWmDeadWindow(
if (containerPtr == winPtr) {
wmPtr2 = winPtr2->wmInfoPtr;
- wmPtr2->master = NULL;
+ wmPtr2->container = NULL;
}
}
@@ -2353,7 +2353,7 @@ WmIconifyCmd(
Tcl_SetErrorCode(interp, "TK", "WM", "ICONIFY", "OVERRIDE_REDIRECT",
NULL);
return TCL_ERROR;
- } else if (wmPtr->master != NULL) {
+ } else if (wmPtr->container != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't iconify \"%s\": it is a transient", winPtr->pathName));
Tcl_SetErrorCode(interp, "TK", "WM", "ICONIFY", "TRANSIENT", NULL);
@@ -3493,7 +3493,7 @@ WmStateCmd(
"OVERRIDE_REDIRECT", NULL);
return TCL_ERROR;
}
- if (wmPtr->master != NULL) {
+ if (wmPtr->container != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't iconify \"%s\": it is a transient",
winPtr->pathName));
@@ -3620,9 +3620,9 @@ WmTransientCmd(
return TCL_ERROR;
}
if (objc == 3) {
- if (wmPtr->master != NULL) {
+ if (wmPtr->container != NULL) {
Tcl_SetObjResult(interp,
- Tcl_NewStringObj(Tk_PathName(wmPtr->master), -1));
+ Tcl_NewStringObj(Tk_PathName(wmPtr->container), -1));
}
return TCL_OK;
}
@@ -3665,7 +3665,7 @@ WmTransientCmd(
}
for (w = containerPtr; w != NULL && w->wmInfoPtr != NULL;
- w = (TkWindow *)w->wmInfoPtr->master) {
+ w = (TkWindow *)w->wmInfoPtr->container) {
if (w == winPtr) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"setting \"%s\" as master creates a transient/master cycle",
@@ -3701,7 +3701,7 @@ WmTransientCmd(
transient->flags |= WITHDRAWN_BY_CONTAINER;
}
- wmPtr->master = (Tk_Window)containerPtr;
+ wmPtr->container = (Tk_Window)containerPtr;
}
ApplyContainerOverrideChanges(winPtr, NULL);
return TCL_OK;
@@ -3734,15 +3734,15 @@ RemoveTransient(
TkWindow *containerPtr;
Transient *transPtr, *temp;
- if (wmPtr == NULL || wmPtr->master == NULL) {
+ if (wmPtr == NULL || wmPtr->container == NULL) {
return;
}
- containerPtr = (TkWindow *)wmPtr->master;
+ containerPtr = (TkWindow *)wmPtr->container;
wmPtr2 = containerPtr->wmInfoPtr;
if (wmPtr2 == NULL) {
return;
}
- wmPtr->master= NULL;
+ wmPtr->container= NULL;
transPtr = wmPtr2->transientPtr;
while (transPtr != NULL) {
if (transPtr->winPtr != winPtr) {
@@ -5375,7 +5375,7 @@ TkGetTransientMaster(
TkWindow *winPtr)
{
if (winPtr->wmInfoPtr != NULL) {
- return (Tk_Window)winPtr->wmInfoPtr->master;
+ return (Tk_Window)winPtr->wmInfoPtr->container;
}
return NULL;
}
@@ -6647,7 +6647,7 @@ TkMacOSXApplyWindowAttributes(
WmInfo *wmPtr = winPtr->wmInfoPtr;
ApplyWindowAttributeFlagChanges(winPtr, macWindow, 0, 0, 0, 1);
- if (wmPtr->master != NULL || winPtr->atts.override_redirect) {
+ if (wmPtr->container != NULL || winPtr->atts.override_redirect) {
ApplyContainerOverrideChanges(winPtr, macWindow);
}
}
@@ -6781,7 +6781,7 @@ ApplyWindowAttributeFlagChanges(
*/
if ((winPtr->atts.override_redirect) ||
- (wmPtr->master != NULL) ||
+ (wmPtr->container != NULL) ||
(winPtr->wmInfoPtr->macClass == kHelpWindowClass)) {
b |= (NSWindowCollectionBehaviorCanJoinAllSpaces |
NSWindowCollectionBehaviorFullScreenAuxiliary);
@@ -6923,7 +6923,7 @@ ApplyContainerOverrideChanges(
if (wmPtr->hints.initial_state == NormalState) {
[macWindow orderFront:nil];
}
- if (wmPtr->master != NULL) {
+ if (wmPtr->container != NULL) {
wmPtr->flags |= WM_TOPMOST;
} else {
wmPtr->flags &= ~WM_TOPMOST;
@@ -6939,8 +6939,8 @@ ApplyContainerOverrideChanges(
[macWindow setExcludedFromWindowsMenu:NO];
wmPtr->flags &= ~WM_TOPMOST;
}
- if (wmPtr->master != None) {
- TkWindow *containerWinPtr = (TkWindow *)wmPtr->master;
+ if (wmPtr->container != None) {
+ TkWindow *containerWinPtr = (TkWindow *)wmPtr->container;
if (containerWinPtr && (containerWinPtr->window != None)
&& TkMacOSXHostToplevelExists(containerWinPtr)) {
diff --git a/macosx/tkMacOSXWm.h b/macosx/tkMacOSXWm.h
index 6696b05..19bf379 100644
--- a/macosx/tkMacOSXWm.h
+++ b/macosx/tkMacOSXWm.h
@@ -66,7 +66,7 @@ typedef struct TkWmInfo {
Tk_Uid titleUid; /* Title to display in window caption. If NULL,
* use name of widget. */
char *iconName; /* Name to display in icon. */
- Tk_Window master; /* Container window for TRANSIENT_FOR property,
+ Tk_Window container; /* Container window for TRANSIENT_FOR property,
* or None. */
XWMHints hints; /* Various pieces of information for window
* manager. */
diff --git a/tests/focus.test b/tests/focus.test
index 3d9d7c3..7ce2df1 100644
--- a/tests/focus.test
+++ b/tests/focus.test
@@ -624,7 +624,7 @@ fixfocus
test focus-6.1 {miscellaneous - embedded application in same process} -constraints {
unix testwrapper
} -setup {
- eval interp delete [interp children]
+ eval interp delete [interp slaves]
} -body {
toplevel .t
wm geometry .t +0+0
diff --git a/tests/safe.test b/tests/safe.test
index a31e029..5a2cd26 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -199,7 +199,7 @@ test safe-5.1 {loading Tk in safe interps without parent's clearance} -body {
interp eval $i {load {} Tk}
} -cleanup {
safe::interpDelete $i
-} -returnCodes error -result {load of binary library for package Tk failed: not allowed}
+} -returnCodes error -match glob -result {*not allowed}
test safe-5.2 {multi-level Tk loading with clearance} -setup {
set safeParent [safe::interpCreate]
} -body {
diff --git a/tests/ttk/combobox.test b/tests/ttk/combobox.test
index 45fe0fc..c14db9b 100644
--- a/tests/ttk/combobox.test
+++ b/tests/ttk/combobox.test
@@ -38,18 +38,18 @@ test combobox-2.3 "current -- change value" -body {
.cb current
} -result 1
-test combobox-2.4 "current -- value not in list" -body {
+test combobox-2.4 "current -- value not in list" -body {
.cb set "z"
.cb current
} -result -1
-test combobox-2.5 "current -- set to end index" -body {
+test combobox-2.5 "current -- set to end index" -body {
.cb configure -values [list a b c d e thelastone]
.cb current end
.cb get
} -result thelastone
-test combobox-2.6 "current -- set to unknown index" -body {
+test combobox-2.6 "current -- set to unknown index" -body {
.cb configure -values [list a b c d e]
.cb current notanindex
} -returnCodes error -result {Incorrect index notanindex}
@@ -58,7 +58,7 @@ test combobox-2.end "Cleanup" -body { destroy .cb }
test combobox-3 "Read postoffset value dynamically from current style" -body {
ttk::combobox .cb -values [list a b c] -style "DerivedStyle.TCombobox"
- pack .cb -expand true -fill both
+ pack .cb -expand true -fill both
ttk::style configure DerivedStyle.TCombobox -postoffset [list 25 0 0 0]
ttk::combobox::Post .cb
expr {[winfo rootx .cb.popdown] - [winfo rootx .cb]}
diff --git a/tests/ttk/image.test b/tests/ttk/image.test
index a55f7f8..5e48d5c 100644
--- a/tests/ttk/image.test
+++ b/tests/ttk/image.test
@@ -23,7 +23,7 @@ test image-2.0 "Deletion of displayed image (label)" -setup {
} -cleanup {
destroy .ttk_image20
} -result {}
-
+
test image-2.1 "Deletion of displayed image (checkbutton)" -setup {
image create photo test.image -width 10 -height 10
} -body {
diff --git a/tests/ttk/panedwindow.test b/tests/ttk/panedwindow.test
index f72ffb8..ad2865c 100644
--- a/tests/ttk/panedwindow.test
+++ b/tests/ttk/panedwindow.test
@@ -110,8 +110,8 @@ test panedwindow-2.end "Cleanup" -body { destroy .pw }
#
test panedwindow-3.0 "configure pane" -body {
ttk::panedwindow .pw
- .pw add [listbox .pw.lb1]
- .pw add [listbox .pw.lb2]
+ .pw add [listbox .pw.lb1]
+ .pw add [listbox .pw.lb2]
.pw pane 1 -weight 2
.pw pane 1 -weight
} -result 2
@@ -253,7 +253,7 @@ test paned-propagation-setup "Setup." -body {
frame .pw.f2 -width 100 -height 50
list [winfo reqwidth .pw.f1] [winfo reqheight .pw.f1]
-} -result [list 100 50]
+} -result [list 100 50]
test paned-propagation-1 "Initial request size" -body {
.pw add .pw.f1
diff --git a/tests/ttk/scrollbar.test b/tests/ttk/scrollbar.test
index 903328e..0743def 100644
--- a/tests/ttk/scrollbar.test
+++ b/tests/ttk/scrollbar.test
@@ -18,8 +18,8 @@ test scrollbar-swapout-1 "Don't use core scrollbars on OSX..." \
} -body {
ttk::scrollbar .sb -command "yadda"
list [winfo class .sb] [.sb cget -command]
-} -result [list TScrollbar yadda] -cleanup {
- destroy .sb
+} -result [list TScrollbar yadda] -cleanup {
+ destroy .sb
}
test scrollbar-swapout-2 "... regardless of whether -style ..." \
@@ -28,7 +28,7 @@ test scrollbar-swapout-2 "... regardless of whether -style ..." \
} -body {
ttk::style layout Vertical.Custom.TScrollbar \
[ttk::style layout Vertical.TScrollbar] ; # See #1833339
- ttk::scrollbar .sb -command "yadda" -style Custom.TScrollbar
+ ttk::scrollbar .sb -command "yadda" -style Custom.TScrollbar
list [winfo class .sb] [.sb cget -command] [.sb cget -style]
} -result [list TScrollbar yadda Custom.TScrollbar] -cleanup {
destroy .sb
@@ -37,7 +37,7 @@ test scrollbar-swapout-2 "... regardless of whether -style ..." \
test scrollbar-swapout-3 "... or -class is specified." -constraints {
coreScrollbar
} -body {
- ttk::scrollbar .sb -command "yadda" -class Custom.TScrollbar
+ ttk::scrollbar .sb -command "yadda" -class Custom.TScrollbar
list [winfo class .sb] [.sb cget -command]
} -result [list Custom.TScrollbar yadda] -cleanup {
destroy .sb
diff --git a/tests/ttk/treetags.test b/tests/ttk/treetags.test
index 7f26e2f..f91673f 100644
--- a/tests/ttk/treetags.test
+++ b/tests/ttk/treetags.test
@@ -105,7 +105,7 @@ test treetags-1.8 "tag names" -body {
} -result [list tag1 tag2 tag3]
test treetags-1.9 "tag names - tag added to item" -body {
- $tv item item1 -tags tag4
+ $tv item item1 -tags tag4
lsort [$tv tag names]
} -result [list tag1 tag2 tag3 tag4]
@@ -201,12 +201,12 @@ test treetags-3.4 "stomp tags in tag binding procedure" -body {
set result [list]
$tv tag bind rm1 <<Remove>> { lappend ::result rm1 [%W focus] <<Remove>> }
$tv tag bind rm2 <<Remove>> {
- lappend ::result rm2 [%W focus] <<Remove>>
+ lappend ::result rm2 [%W focus] <<Remove>>
%W item [%W focus] -tags {tag1}
}
$tv tag bind rm3 <<Remove>> { lappend ::result rm3 [%W focus] <<Remove>> }
- $tv item item1 -tags {rm1 rm2 rm3}
+ $tv item item1 -tags {rm1 rm2 rm3}
$tv focus item1
event generate $tv <<Remove>>
set result
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test
index 0ad0443..f068243 100644
--- a/tests/ttk/treeview.test
+++ b/tests/ttk/treeview.test
@@ -729,7 +729,7 @@ test treeview-3085489-2 "tag remove, no -tags" -setup {
test treeview-368fa4561e "indicators cannot be clicked on leafs" -setup {
pack [ttk::treeview .tv]
- .tv insert {} end -id foo -text "<-- (1) Click the blank space to my left"
+ .tv insert {} end -id foo -text "<-- (1) Click the blank space to my left"
update
} -body {
foreach {x y w h} [.tv bbox foo #0] {}
@@ -748,7 +748,7 @@ test treeview-368fa4561e "indicators cannot be clicked on leafs" -setup {
test treeview-ce470f20fd-1 "dragging further than the right edge of the treeview is allowed" -setup {
pack [ttk::treeview .tv]
- .tv heading #0 -text "Drag my right edge -->"
+ .tv heading #0 -text "Drag my right edge -->"
update
} -body {
set res [.tv column #0 -width]
@@ -818,7 +818,7 @@ test treeview-ce470f20fd-4 "changing -stretch resizes columns" -setup {
update idletasks ; # redisplay treeview
} -body {
# only some columns are displayed (and in a different order than declared
- # in -columns), a non-displayed column becomes stretchable --> nothing
+ # in -columns), a non-displayed column becomes stretchable --> nothing
# happens
set origTreeWidth [winfo width .tv]
set res [list [.tv column bar -width] [.tv column colA -width]]
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index aba3eba..eb320e9 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -207,7 +207,7 @@ test ttk-2.8 "bug 3223850: button state disabled during click" -setup {
set ttk28 {}
pack [ttk::button .b -command {set ::ttk28 failed}]
update
-} -body {
+} -body {
bind .b <ButtonPress-1> {after 0 {.b configure -state disabled}}
after 1 {event generate .b <ButtonPress-1>}
after 20 {event generate .b <ButtonRelease-1>}
diff --git a/tests/ttk/validate.test b/tests/ttk/validate.test
index 417deac..5755943 100644
--- a/tests/ttk/validate.test
+++ b/tests/ttk/validate.test
@@ -161,7 +161,7 @@ test validate-1.18 {entry widget validation} -constraints coreEntry -body {
list [.e cget -validate] $::vVals
} -result {none {.e -1 -1 nextdata newdata {} all forced}}
# DIFFERENCE: ttk::entry doesn't validate when setting linked -variable
-# DIFFERENCE: ttk::entry doesn't disable validation
+# DIFFERENCE: ttk::entry doesn't disable validation
proc doval {W d i P s S v V} {
set ::vVals [list $W $d $i $P $s $S $v $V]
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 0fbfb5d..86ea005 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -1531,7 +1531,7 @@ rpm: all
#
# Target to create a proper Tk distribution from information in the
-# master source directory. DISTDIR must be defined to indicate where
+# source directory. DISTDIR must be defined to indicate where
# to put the distribution. DISTDIR must be an absolute path name.
#
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 2c9e9dd..00893f2 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -82,7 +82,7 @@ typedef struct TkWmInfo {
* (corresponds to hints.window_group).
* Malloc-ed. Note: this field doesn't get
* updated if leader is destroyed. */
- TkWindow *masterPtr; /* Master window for TRANSIENT_FOR property,
+ TkWindow *containerPtr; /* Container window for TRANSIENT_FOR property,
* or NULL. */
Tk_Window icon; /* Window to use as icon for this window, or
* NULL. */
@@ -259,7 +259,7 @@ typedef struct TkWmInfo {
* window (controlled by "wm resizable" command).
* WM_WITHDRAWN - non-zero means that this window has explicitly
* been withdrawn. If it's a transient, it should
- * not mirror state changes in the master.
+ * not mirror state changes in the container.
*/
#define WM_NEVER_MAPPED 1
@@ -571,7 +571,7 @@ TkWmNewWindow(
memset(wmPtr, 0, sizeof(WmInfo));
wmPtr->winPtr = winPtr;
wmPtr->reparent = None;
- wmPtr->masterPtr = NULL;
+ wmPtr->containerPtr = NULL;
wmPtr->numTransients = 0;
wmPtr->hints.flags = InputHint | StateHint;
wmPtr->hints.input = True;
@@ -684,12 +684,12 @@ TkWmMapWindow(
UpdateTitle(winPtr);
UpdatePhotoIcon(winPtr);
- if (wmPtr->masterPtr != NULL) {
+ if (wmPtr->containerPtr != NULL) {
/*
- * Don't map a transient if the master is not mapped.
+ * Don't map a transient if the container is not mapped.
*/
- if (!Tk_IsMapped(wmPtr->masterPtr)) {
+ if (!Tk_IsMapped(wmPtr->containerPtr)) {
wmPtr->withdrawn = 1;
wmPtr->hints.initial_state = WithdrawnState;
}
@@ -700,7 +700,7 @@ TkWmMapWindow(
*/
XSetTransientForHint(winPtr->display, wmPtr->wrapperPtr->window,
- wmPtr->masterPtr->wmInfoPtr->wrapperPtr->window);
+ wmPtr->containerPtr->wmInfoPtr->wrapperPtr->window);
}
wmPtr->flags |= WM_UPDATE_SIZE_HINTS;
@@ -909,16 +909,16 @@ TkWmDeadWindow(
}
/*
- * Reset all transient windows whose master is the dead window.
+ * Reset all transient windows whose container is the dead window.
*/
for (wmPtr2 = winPtr->dispPtr->firstWmPtr; wmPtr2 != NULL;
wmPtr2 = wmPtr2->nextPtr) {
- if (wmPtr2->masterPtr == winPtr) {
+ if (wmPtr2->containerPtr == winPtr) {
wmPtr->numTransients--;
- Tk_DeleteEventHandler((Tk_Window) wmPtr2->masterPtr,
+ Tk_DeleteEventHandler((Tk_Window) wmPtr2->containerPtr,
StructureNotifyMask, WmWaitMapProc, wmPtr2->winPtr);
- wmPtr2->masterPtr = NULL;
+ wmPtr2->containerPtr = NULL;
if (!(wmPtr2->flags & WM_NEVER_MAPPED)) {
XDeleteProperty(winPtr->display, wmPtr2->wrapperPtr->window,
Tk_InternAtom((Tk_Window) winPtr, "WM_TRANSIENT_FOR"));
@@ -933,19 +933,19 @@ TkWmDeadWindow(
}
/* ASSERT: numTransients == 0 [Bug 1789819] */
- if (wmPtr->masterPtr != NULL) {
- wmPtr2 = wmPtr->masterPtr->wmInfoPtr;
+ if (wmPtr->containerPtr != NULL) {
+ wmPtr2 = wmPtr->containerPtr->wmInfoPtr;
/*
- * If we had a master, tell them that we aren't tied to them anymore
+ * If we had a container, tell them that we aren't tied to them anymore
*/
if (wmPtr2 != NULL) {
wmPtr2->numTransients--;
}
- Tk_DeleteEventHandler((Tk_Window) wmPtr->masterPtr,
+ Tk_DeleteEventHandler((Tk_Window) wmPtr->containerPtr,
StructureNotifyMask, WmWaitMapProc, winPtr);
- wmPtr->masterPtr = NULL;
+ wmPtr->containerPtr = NULL;
}
ckfree(wmPtr);
winPtr->wmInfoPtr = NULL;
@@ -2220,7 +2220,7 @@ WmIconifyCmd(
NULL);
return TCL_ERROR;
}
- if (wmPtr->masterPtr != NULL) {
+ if (wmPtr->containerPtr != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't iconify \"%s\": it is a transient",
winPtr->pathName));
@@ -3408,7 +3408,7 @@ WmStateCmd(
"OVERRIDE_REDIRECT", NULL);
return TCL_ERROR;
}
- if (wmPtr->masterPtr != NULL) {
+ if (wmPtr->containerPtr != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't iconify \"%s\": it is a transient",
winPtr->pathName));
@@ -3532,7 +3532,7 @@ WmTransientCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
- TkWindow *masterPtr = wmPtr->masterPtr, *w;
+ TkWindow *containerPtr = wmPtr->containerPtr, *w;
WmInfo *wmPtr2;
if ((objc != 3) && (objc != 4)) {
@@ -3540,20 +3540,20 @@ WmTransientCmd(
return TCL_ERROR;
}
if (objc == 3) {
- if (masterPtr != NULL) {
- Tcl_SetObjResult(interp, TkNewWindowObj((Tk_Window) masterPtr));
+ if (containerPtr != NULL) {
+ Tcl_SetObjResult(interp, TkNewWindowObj((Tk_Window) containerPtr));
}
return TCL_OK;
}
if (Tcl_GetString(objv[3])[0] == '\0') {
- if (masterPtr != NULL) {
+ if (containerPtr != NULL) {
/*
- * If we had a master, tell them that we aren't tied to them
+ * If we had a container, tell them that we aren't tied to them
* anymore
*/
- masterPtr->wmInfoPtr->numTransients--;
- Tk_DeleteEventHandler((Tk_Window) masterPtr, StructureNotifyMask,
+ containerPtr->wmInfoPtr->numTransients--;
+ Tk_DeleteEventHandler((Tk_Window) containerPtr, StructureNotifyMask,
WmWaitMapProc, winPtr);
/*
@@ -3563,22 +3563,22 @@ WmTransientCmd(
*/
}
- wmPtr->masterPtr = NULL;
+ wmPtr->containerPtr = NULL;
} else {
- Tk_Window masterWin;
+ Tk_Window container;
- if (TkGetWindowFromObj(interp, tkwin, objv[3], &masterWin)!=TCL_OK) {
+ if (TkGetWindowFromObj(interp, tkwin, objv[3], &container)!=TCL_OK) {
return TCL_ERROR;
}
- masterPtr = (TkWindow *) masterWin;
- while (!Tk_TopWinHierarchy(masterPtr)) {
+ containerPtr = (TkWindow *) container;
+ while (!Tk_TopWinHierarchy(containerPtr)) {
/*
- * Ensure that the master window is actually a Tk toplevel.
+ * Ensure that the container window is actually a Tk toplevel.
*/
- masterPtr = masterPtr->parentPtr;
+ containerPtr = containerPtr->parentPtr;
}
- Tk_MakeWindowExist((Tk_Window) masterPtr);
+ Tk_MakeWindowExist((Tk_Window) containerPtr);
if (wmPtr->iconFor != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -3588,7 +3588,7 @@ WmTransientCmd(
return TCL_ERROR;
}
- wmPtr2 = masterPtr->wmInfoPtr;
+ wmPtr2 = containerPtr->wmInfoPtr;
if (wmPtr2->wrapperPtr == NULL) {
CreateWrapper(wmPtr2);
}
@@ -3601,39 +3601,39 @@ WmTransientCmd(
return TCL_ERROR;
}
- for (w = masterPtr; w != NULL && w->wmInfoPtr != NULL;
- w = (TkWindow *)w->wmInfoPtr->masterPtr) {
+ for (w = containerPtr; w != NULL && w->wmInfoPtr != NULL;
+ w = (TkWindow *)w->wmInfoPtr->containerPtr) {
if (w == winPtr) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"setting \"%s\" as master creates a transient/master cycle",
- Tk_PathName(masterPtr)));
+ Tk_PathName(containerPtr)));
Tcl_SetErrorCode(interp, "TK", "WM", "TRANSIENT", "SELF", NULL);
return TCL_ERROR;
}
}
- if (masterPtr != wmPtr->masterPtr) {
+ if (containerPtr != wmPtr->containerPtr) {
/*
- * Remove old master map/unmap binding before setting the new
- * master. The event handler will ensure that transient states
- * reflect the state of the master.
+ * Remove old container map/unmap binding before setting the new
+ * container. The event handler will ensure that transient states
+ * reflect the state of the container.
*/
- if (wmPtr->masterPtr != NULL) {
- wmPtr->masterPtr->wmInfoPtr->numTransients--;
- Tk_DeleteEventHandler((Tk_Window) wmPtr->masterPtr,
+ if (wmPtr->containerPtr != NULL) {
+ wmPtr->containerPtr->wmInfoPtr->numTransients--;
+ Tk_DeleteEventHandler((Tk_Window) wmPtr->containerPtr,
StructureNotifyMask, WmWaitMapProc, winPtr);
}
- masterPtr->wmInfoPtr->numTransients++;
- Tk_CreateEventHandler((Tk_Window) masterPtr,
+ containerPtr->wmInfoPtr->numTransients++;
+ Tk_CreateEventHandler((Tk_Window) containerPtr,
StructureNotifyMask, WmWaitMapProc, winPtr);
- wmPtr->masterPtr = masterPtr;
+ wmPtr->containerPtr = containerPtr;
}
}
if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
- if (wmPtr->masterPtr != NULL && !Tk_IsMapped(wmPtr->masterPtr)) {
+ if (wmPtr->containerPtr != NULL && !Tk_IsMapped(wmPtr->containerPtr)) {
if (TkpWmSetState(winPtr, WithdrawnState) == 0) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"couldn't send withdraw message to window manager",
@@ -3642,10 +3642,10 @@ WmTransientCmd(
return TCL_ERROR;
}
} else {
- if (wmPtr->masterPtr != NULL) {
+ if (wmPtr->containerPtr != NULL) {
XSetTransientForHint(winPtr->display,
wmPtr->wrapperPtr->window,
- wmPtr->masterPtr->wmInfoPtr->wrapperPtr->window);
+ wmPtr->containerPtr->wmInfoPtr->wrapperPtr->window);
} else {
XDeleteProperty(winPtr->display, wmPtr->wrapperPtr->window,
Tk_InternAtom((Tk_Window) winPtr,"WM_TRANSIENT_FOR"));
@@ -3721,7 +3721,7 @@ WmUpdateGeom(
/*
* Invoked when a MapNotify or UnmapNotify event is delivered for a toplevel
- * that is the master of a transient toplevel.
+ * that is the container of a transient toplevel.
*/
static void
@@ -3730,9 +3730,9 @@ WmWaitMapProc(
XEvent *eventPtr) /* Information about event. */
{
TkWindow *winPtr = clientData;
- TkWindow *masterPtr = winPtr->wmInfoPtr->masterPtr;
+ TkWindow *containerPtr = winPtr->wmInfoPtr->containerPtr;
- if (masterPtr == NULL) {
+ if (containerPtr == NULL) {
return;
}
diff --git a/win/Makefile.in b/win/Makefile.in
index 43f9c81..c561f61 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -140,9 +140,9 @@ SHARED_LIBRARIES = $(TK_DLL_FILE) $(TK_STUB_LIB_FILE)
STATIC_LIBRARIES = $(TK_LIB_FILE)
WISH = wish$(VER)${EXESUFFIX}
-TKTEST = tktest${EXEEXT}
-CAT32 = cat32$(EXEEXT)
-MAN2TCL = man2tcl$(EXEEXT)
+TKTEST = tktest.exe
+CAT32 = cat32.exe
+MAN2TCL = man2tcl.exe
@SET_MAKE@
@@ -184,7 +184,6 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@ @LDFLAGS_DEFAULT@
LDFLAGS_CONSOLE = @LDFLAGS_CONSOLE@
LDFLAGS_WINDOW = @LDFLAGS_WINDOW@
-EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
STLIB_LD = @STLIB_LD@
SHLIB_LD = @SHLIB_LD@
@@ -706,7 +705,7 @@ tkWindow.$(OBJEXT): configure Makefile
depend:
cleanhelp:
- $(RM) *.hlp *.cnt *.hpj *.GID *.rtf man2tcl${EXEEXT}
+ $(RM) *.hlp *.cnt *.hpj *.GID *.rtf man2tcl.exe
clean: cleanhelp
$(RM) *.lib *.a *.exp *.dll *.res *.${OBJEXT} *~ \#* TAGS a.out
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index f7ba611..923a58f 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -177,7 +177,7 @@ typedef struct TkWmInfo {
* (corresponds to hints.window_group).
* Malloc-ed. Note: this field doesn't get
* updated if leader is destroyed. */
- TkWindow *masterPtr; /* Master window for TRANSIENT_FOR property,
+ TkWindow *containerPtr; /* Container window for TRANSIENT_FOR property,
* or NULL. */
Tk_Window icon; /* Window to use as icon for this window, or
* NULL. */
@@ -315,7 +315,7 @@ typedef struct TkWmInfo {
* window (controlled by "wm resizable" command).
* WM_WITHDRAWN - Non-zero means that this window has explicitly
* been withdrawn. If it's a transient, it should
- * not mirror state changes in the master.
+ * not mirror state changes in the container.
* WM_FULLSCREEN - Non-zero means that this window has been placed
* in the full screen mode. It should be mapped at
* 0,0 and be the width and height of the screen.
@@ -2054,7 +2054,7 @@ UpdateWrapper(
*/
parentHWND = GetDesktopWindow();
- if (wmPtr->masterPtr) {
+ if (wmPtr->containerPtr) {
wmPtr->style |= WS_CHILD;
} else {
wmPtr->style |= WS_POPUP;
@@ -2062,10 +2062,10 @@ UpdateWrapper(
} else if (wmPtr->flags & WM_FULLSCREEN) {
wmPtr->style = WM_FULLSCREEN_STYLE;
wmPtr->exStyle = EX_FULLSCREEN_STYLE;
- } else if (wmPtr->masterPtr) {
+ } else if (wmPtr->containerPtr) {
wmPtr->style = WM_TRANSIENT_STYLE;
wmPtr->exStyle = EX_TRANSIENT_STYLE;
- parentHWND = Tk_GetHWND(Tk_WindowId(wmPtr->masterPtr));
+ parentHWND = Tk_GetHWND(Tk_WindowId(wmPtr->containerPtr));
if (! ((wmPtr->flags & WM_WIDTH_NOT_RESIZABLE)
&& (wmPtr->flags & WM_HEIGHT_NOT_RESIZABLE))) {
wmPtr->style |= WS_THICKFRAME;
@@ -2204,7 +2204,7 @@ UpdateWrapper(
if (wmPtr->numTransients > 0) {
/*
* Unset the current wrapper as the parent for all transient
- * children for whom this is the master
+ * children for whom this is the container
*/
WmInfo *wmPtr2;
@@ -2213,7 +2213,7 @@ UpdateWrapper(
state = 0;
for (wmPtr2 = winPtr->dispPtr->firstWmPtr; wmPtr2 != NULL;
wmPtr2 = wmPtr2->nextPtr) {
- if (wmPtr2->masterPtr == winPtr
+ if (wmPtr2->containerPtr == winPtr
&& !(wmPtr2->flags & WM_NEVER_MAPPED)) {
childStateInfo[state++] = wmPtr2->hints.initial_state;
SetParent(TkWinGetHWND(wmPtr2->winPtr->window), NULL);
@@ -2292,7 +2292,7 @@ UpdateWrapper(
if (childStateInfo) {
if (wmPtr->numTransients > 0) {
/*
- * Reset all transient children for whom this is the master.
+ * Reset all transient children for whom this is the container.
*/
WmInfo *wmPtr2;
@@ -2300,7 +2300,7 @@ UpdateWrapper(
state = 0;
for (wmPtr2 = winPtr->dispPtr->firstWmPtr; wmPtr2 != NULL;
wmPtr2 = wmPtr2->nextPtr) {
- if (wmPtr2->masterPtr == winPtr
+ if (wmPtr2->containerPtr == winPtr
&& !(wmPtr2->flags & WM_NEVER_MAPPED)) {
UpdateWrapper(wmPtr2->winPtr);
TkpWmSetState(wmPtr2->winPtr, childStateInfo[state++]);
@@ -2365,10 +2365,10 @@ TkWmMapWindow(
if (wmPtr->flags & WM_NEVER_MAPPED) {
/*
- * Don't map a transient if the master is not mapped.
+ * Don't map a transient if the container is not mapped.
*/
- if (wmPtr->masterPtr != NULL && !Tk_IsMapped(wmPtr->masterPtr)) {
+ if (wmPtr->containerPtr != NULL && !Tk_IsMapped(wmPtr->containerPtr)) {
wmPtr->hints.initial_state = WithdrawnState;
return;
}
@@ -2610,17 +2610,17 @@ TkWmDeadWindow(
}
/*
- * Reset all transient windows whose master is the dead window.
+ * Reset all transient windows whose container is the dead window.
*/
for (wmPtr2 = winPtr->dispPtr->firstWmPtr; wmPtr2 != NULL;
wmPtr2 = wmPtr2->nextPtr) {
- if (wmPtr2->masterPtr == winPtr) {
+ if (wmPtr2->containerPtr == winPtr) {
wmPtr->numTransients--;
- Tk_DeleteEventHandler((Tk_Window) wmPtr2->masterPtr,
+ Tk_DeleteEventHandler((Tk_Window) wmPtr2->containerPtr,
VisibilityChangeMask|StructureNotifyMask,
WmWaitVisibilityOrMapProc, wmPtr2->winPtr);
- wmPtr2->masterPtr = NULL;
+ wmPtr2->containerPtr = NULL;
if ((wmPtr2->wrapper != NULL)
&& !(wmPtr2->flags & (WM_NEVER_MAPPED))) {
UpdateWrapper(wmPtr2->winPtr);
@@ -2670,20 +2670,20 @@ TkWmDeadWindow(
if (wmPtr->flags & WM_UPDATE_PENDING) {
Tcl_CancelIdleCall(UpdateGeometryInfo, winPtr);
}
- if (wmPtr->masterPtr != NULL) {
- wmPtr2 = wmPtr->masterPtr->wmInfoPtr;
+ if (wmPtr->containerPtr != NULL) {
+ wmPtr2 = wmPtr->containerPtr->wmInfoPtr;
/*
- * If we had a master, tell them that we aren't tied to them anymore.
+ * If we had a container, tell them that we aren't tied to them anymore.
*/
if (wmPtr2 != NULL) {
wmPtr2->numTransients--;
}
- Tk_DeleteEventHandler((Tk_Window) wmPtr->masterPtr,
+ Tk_DeleteEventHandler((Tk_Window) wmPtr->containerPtr,
VisibilityChangeMask|StructureNotifyMask,
WmWaitVisibilityOrMapProc, winPtr);
- wmPtr->masterPtr = NULL;
+ wmPtr->containerPtr = NULL;
}
if (wmPtr->crefObj != NULL) {
Tcl_DecrRefCount(wmPtr->crefObj);
@@ -4154,7 +4154,7 @@ WmIconifyCmd(
NULL);
return TCL_ERROR;
}
- if (wmPtr->masterPtr != NULL) {
+ if (wmPtr->containerPtr != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't iconify \"%s\": it is a transient",
winPtr->pathName));
@@ -5403,7 +5403,7 @@ WmStateCmd(
"OVERRIDE_REDIRECT", NULL);
return TCL_ERROR;
}
- if (wmPtr->masterPtr != NULL) {
+ if (wmPtr->containerPtr != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't iconify \"%s\": it is a transient",
winPtr->pathName));
@@ -5549,7 +5549,7 @@ WmTransientCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
- TkWindow *masterPtr = wmPtr->masterPtr, **masterPtrPtr = &masterPtr, *w;
+ TkWindow *containerPtr = wmPtr->containerPtr, **containerPtrPtr = &containerPtr, *w;
WmInfo *wmPtr2;
if ((objc != 3) && (objc != 4)) {
@@ -5557,38 +5557,38 @@ WmTransientCmd(
return TCL_ERROR;
}
if (objc == 3) {
- if (masterPtr != NULL) {
- Tcl_SetObjResult(interp, TkNewWindowObj((Tk_Window) masterPtr));
+ if (containerPtr != NULL) {
+ Tcl_SetObjResult(interp, TkNewWindowObj((Tk_Window) containerPtr));
}
return TCL_OK;
}
if (Tcl_GetString(objv[3])[0] == '\0') {
- if (masterPtr != NULL) {
+ if (containerPtr != NULL) {
/*
- * If we had a master, tell them that we aren't tied to them
+ * If we had a container, tell them that we aren't tied to them
* anymore.
*/
- masterPtr->wmInfoPtr->numTransients--;
- Tk_DeleteEventHandler((Tk_Window) masterPtr,
+ containerPtr->wmInfoPtr->numTransients--;
+ Tk_DeleteEventHandler((Tk_Window) containerPtr,
VisibilityChangeMask|StructureNotifyMask,
WmWaitVisibilityOrMapProc, winPtr);
}
- wmPtr->masterPtr = NULL;
+ wmPtr->containerPtr = NULL;
} else {
if (TkGetWindowFromObj(interp, tkwin, objv[3],
- (Tk_Window *) masterPtrPtr) != TCL_OK) {
+ (Tk_Window *) containerPtrPtr) != TCL_OK) {
return TCL_ERROR;
}
- while (!Tk_TopWinHierarchy(masterPtr)) {
+ while (!Tk_TopWinHierarchy(containerPtr)) {
/*
- * Ensure that the master window is actually a Tk toplevel.
+ * Ensure that the container window is actually a Tk toplevel.
*/
- masterPtr = masterPtr->parentPtr;
+ containerPtr = containerPtr->parentPtr;
}
- Tk_MakeWindowExist((Tk_Window) masterPtr);
+ Tk_MakeWindowExist((Tk_Window) containerPtr);
if (wmPtr->iconFor != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -5598,7 +5598,7 @@ WmTransientCmd(
return TCL_ERROR;
}
- wmPtr2 = masterPtr->wmInfoPtr;
+ wmPtr2 = containerPtr->wmInfoPtr;
if (wmPtr2->iconFor != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -5607,42 +5607,42 @@ WmTransientCmd(
Tcl_SetErrorCode(interp, "TK", "WM", "TRANSIENT", "ICON", NULL);
return TCL_ERROR;
}
- for (w = masterPtr; w != NULL && w->wmInfoPtr != NULL;
- w = (TkWindow *)w->wmInfoPtr->masterPtr) {
+ for (w = containerPtr; w != NULL && w->wmInfoPtr != NULL;
+ w = (TkWindow *)w->wmInfoPtr->containerPtr) {
if (w == winPtr) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"setting \"%s\" as master creates a transient/master cycle",
- Tk_PathName(masterPtr)));
+ Tk_PathName(containerPtr)));
Tcl_SetErrorCode(interp, "TK", "WM", "TRANSIENT", "SELF", NULL);
return TCL_ERROR;
}
}
- if (masterPtr != wmPtr->masterPtr) {
+ if (containerPtr != wmPtr->containerPtr) {
/*
- * Remove old master map/unmap binding before setting the new
- * master. The event handler will ensure that transient states
- * reflect the state of the master.
+ * Remove old container map/unmap binding before setting the new
+ * container. The event handler will ensure that transient states
+ * reflect the state of the container.
*/
- if (wmPtr->masterPtr != NULL) {
- wmPtr->masterPtr->wmInfoPtr->numTransients--;
- Tk_DeleteEventHandler((Tk_Window) wmPtr->masterPtr,
+ if (wmPtr->containerPtr != NULL) {
+ wmPtr->containerPtr->wmInfoPtr->numTransients--;
+ Tk_DeleteEventHandler((Tk_Window) wmPtr->containerPtr,
VisibilityChangeMask|StructureNotifyMask,
WmWaitVisibilityOrMapProc, winPtr);
}
- masterPtr->wmInfoPtr->numTransients++;
- Tk_CreateEventHandler((Tk_Window) masterPtr,
+ containerPtr->wmInfoPtr->numTransients++;
+ Tk_CreateEventHandler((Tk_Window) containerPtr,
VisibilityChangeMask|StructureNotifyMask,
WmWaitVisibilityOrMapProc, winPtr);
- wmPtr->masterPtr = masterPtr;
+ wmPtr->containerPtr = containerPtr;
}
}
if (!((wmPtr->flags & WM_NEVER_MAPPED)
&& !(winPtr->flags & TK_EMBEDDED))) {
- if (wmPtr->masterPtr != NULL
- && !Tk_IsMapped(wmPtr->masterPtr)) {
+ if (wmPtr->containerPtr != NULL
+ && !Tk_IsMapped(wmPtr->containerPtr)) {
TkpWmSetState(winPtr, WithdrawnState);
} else {
UpdateWrapper(winPtr);
@@ -5728,9 +5728,9 @@ WmWaitVisibilityOrMapProc(
XEvent *eventPtr) /* Information about event. */
{
TkWindow *winPtr = (TkWindow *)clientData;
- TkWindow *masterPtr = winPtr->wmInfoPtr->masterPtr;
+ TkWindow *containerPtr = winPtr->wmInfoPtr->containerPtr;
- if (masterPtr == NULL)
+ if (containerPtr == NULL)
return;
if (eventPtr->type == MapNotify) {
@@ -5742,7 +5742,7 @@ WmWaitVisibilityOrMapProc(
}
if (eventPtr->type == VisibilityNotify) {
- int state = masterPtr->wmInfoPtr->hints.initial_state;
+ int state = containerPtr->wmInfoPtr->hints.initial_state;
if ((state == NormalState) || (state == ZoomState)) {
state = winPtr->wmInfoPtr->hints.initial_state;