summaryrefslogtreecommitdiffstats
path: root/generic/tkTextWind.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextWind.c')
-rw-r--r--generic/tkTextWind.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index 7787cc6..aed117d 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextWind.c,v 1.26 2008/12/09 21:22:56 dgp Exp $
+ * RCS: @(#) $Id: tkTextWind.c,v 1.27 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkPort.h"
@@ -218,7 +218,7 @@ TkTextWindowCmd(
}
if (objc <= 5) {
TkTextEmbWindowClient *client;
- Tcl_Obj* objPtr;
+ Tcl_Obj *objPtr;
/*
* Copy over client specific value before querying.
@@ -410,8 +410,8 @@ EmbWinConfigure(
&textPtr->sharedTextPtr->windowTable,
Tk_PathName(oldWindow)));
Tk_DeleteEventHandler(oldWindow, StructureNotifyMask,
- EmbWinStructureProc, (ClientData) client);
- Tk_ManageGeometry(oldWindow, NULL, (ClientData) NULL);
+ EmbWinStructureProc, client);
+ Tk_ManageGeometry(oldWindow, NULL, NULL);
if (textPtr->tkwin != Tk_Parent(oldWindow)) {
Tk_UnmaintainGeometry(oldWindow, textPtr->tkwin);
} else {
@@ -476,10 +476,9 @@ EmbWinConfigure(
* event handler to find out when it is deleted.
*/
- Tk_ManageGeometry(ewPtr->body.ew.tkwin, &textGeomType,
- (ClientData) client);
+ Tk_ManageGeometry(ewPtr->body.ew.tkwin, &textGeomType, client);
Tk_CreateEventHandler(ewPtr->body.ew.tkwin, StructureNotifyMask,
- EmbWinStructureProc, (ClientData) client);
+ EmbWinStructureProc, client);
/*
* Special trick! Must enter into the hash table *after* calling
@@ -520,7 +519,7 @@ EmbWinStructureProc(
ClientData clientData, /* Pointer to record describing window item. */
XEvent *eventPtr) /* Describes what just happened. */
{
- TkTextEmbWindowClient *client = (TkTextEmbWindowClient*)clientData;
+ TkTextEmbWindowClient *client = clientData;
TkTextSegment *ewPtr = client->parent;
TkTextIndex index;
Tcl_HashEntry *hPtr;
@@ -573,7 +572,7 @@ EmbWinRequestProc(
ClientData clientData, /* Pointer to record for window item. */
Tk_Window tkwin) /* Window that changed its desired size. */
{
- TkTextEmbWindowClient *client = (TkTextEmbWindowClient*)clientData;
+ TkTextEmbWindowClient *client = clientData;
TkTextSegment *ewPtr = client->parent;
TkTextIndex index;
@@ -610,15 +609,15 @@ EmbWinLostSlaveProc(
Tk_Window tkwin) /* Window that was claimed away by another
* geometry manager. */
{
- TkTextEmbWindowClient *client = (TkTextEmbWindowClient*)clientData;
+ TkTextEmbWindowClient *client = clientData;
TkTextSegment *ewPtr = client->parent;
TkTextIndex index;
Tcl_HashEntry *hPtr;
TkTextEmbWindowClient *loop;
Tk_DeleteEventHandler(client->tkwin, StructureNotifyMask,
- EmbWinStructureProc, (ClientData) client);
- Tcl_CancelIdleCall(EmbWinDelayedUnmap, (ClientData) client);
+ EmbWinStructureProc, client);
+ Tcl_CancelIdleCall(EmbWinDelayedUnmap, client);
if (client->textPtr->tkwin != Tk_Parent(tkwin)) {
Tk_UnmaintainGeometry(tkwin, client->textPtr->tkwin);
} else {
@@ -700,10 +699,10 @@ TkTextWinFreeClient(
if (client->tkwin != NULL) {
Tk_DeleteEventHandler(client->tkwin, StructureNotifyMask,
- EmbWinStructureProc, (ClientData) client);
+ EmbWinStructureProc, client);
Tk_DestroyWindow(client->tkwin);
}
- Tcl_CancelIdleCall(EmbWinDelayedUnmap, (ClientData) client);
+ Tcl_CancelIdleCall(EmbWinDelayedUnmap, client);
/*
* Free up this client.
@@ -960,10 +959,9 @@ EmbWinLayoutProc(
}
client->tkwin = ewPtr->body.ew.tkwin;
- Tk_ManageGeometry(client->tkwin, &textGeomType,
- (ClientData) client);
+ Tk_ManageGeometry(client->tkwin, &textGeomType, client);
Tk_CreateEventHandler(client->tkwin, StructureNotifyMask,
- EmbWinStructureProc, (ClientData) client);
+ EmbWinStructureProc, client);
/*
* Special trick! Must enter into the hash table *after* calling
@@ -1015,7 +1013,7 @@ EmbWinLayoutProc(
chunkPtr->width = width;
chunkPtr->breakIndex = -1;
chunkPtr->breakIndex = 1;
- chunkPtr->clientData = (ClientData) ewPtr;
+ chunkPtr->clientData = ewPtr;
if (client != NULL) {
client->chunkCount += 1;
}
@@ -1091,7 +1089,7 @@ TkTextEmbWinDisplayProc(
{
int lineX, windowX, windowY, width, height;
Tk_Window tkwin;
- TkTextSegment *ewPtr = (TkTextSegment*) chunkPtr->clientData;
+ TkTextSegment *ewPtr = chunkPtr->clientData;
TkTextEmbWindowClient *client = EmbWinGetClient(textPtr, ewPtr);
if (client == NULL) {
@@ -1167,7 +1165,7 @@ EmbWinUndisplayProc(
TkText *textPtr, /* Overall information about text widget. */
TkTextDispChunk *chunkPtr) /* Chunk that is about to be freed. */
{
- TkTextSegment *ewPtr = (TkTextSegment*) chunkPtr->clientData;
+ TkTextSegment *ewPtr = chunkPtr->clientData;
TkTextEmbWindowClient *client = EmbWinGetClient(textPtr, ewPtr);
if (client == NULL) {
@@ -1185,7 +1183,7 @@ EmbWinUndisplayProc(
*/
client->displayed = 0;
- Tcl_DoWhenIdle(EmbWinDelayedUnmap, (ClientData) client);
+ Tcl_DoWhenIdle(EmbWinDelayedUnmap, client);
}
}
@@ -1230,7 +1228,7 @@ EmbWinBboxProc(
* pixels. */
{
Tk_Window tkwin;
- TkTextSegment *ewPtr = (TkTextSegment *) chunkPtr->clientData;
+ TkTextSegment *ewPtr = chunkPtr->clientData;
TkTextEmbWindowClient *client = EmbWinGetClient(textPtr, ewPtr);
if (client == NULL) {
@@ -1292,7 +1290,7 @@ static void
EmbWinDelayedUnmap(
ClientData clientData) /* Token for the window to be unmapped. */
{
- TkTextEmbWindowClient *client = (TkTextEmbWindowClient*) clientData;
+ TkTextEmbWindowClient *client = clientData;
if (!client->displayed && (client->tkwin != NULL)) {
if (client->textPtr->tkwin != Tk_Parent(client->tkwin)) {
@@ -1336,7 +1334,7 @@ TkTextWindowIndex(
return 0;
}
- ewPtr = (TkTextSegment *) Tcl_GetHashValue(hPtr);
+ ewPtr = Tcl_GetHashValue(hPtr);
indexPtr->tree = textPtr->sharedTextPtr->tree;
indexPtr->linePtr = ewPtr->body.ew.linePtr;
indexPtr->byteIndex = TkTextSegToOffset(ewPtr, indexPtr->linePtr);