diff options
author | nijtmans <nijtmans> | 2010-05-11 12:12:49 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-05-11 12:12:49 (GMT) |
commit | ede9fc2f74a2e9aa5084e18c93d903e81f0f3303 (patch) | |
tree | 1a71cc0e56c633acfe0fb2e4a5af9d1ea1bce8bd /unix | |
parent | 44d12a1d5aa9b0103f0c3bea1ed81b59d4d383d1 (diff) | |
download | tk-ede9fc2f74a2e9aa5084e18c93d903e81f0f3303.zip tk-ede9fc2f74a2e9aa5084e18c93d903e81f0f3303.tar.gz tk-ede9fc2f74a2e9aa5084e18c93d903e81f0f3303.tar.bz2 |
Consistent use of variable names in RestrictEvent
API documentation and implementation: Use 'prev'
in stead of 'old', and 'arg' in stead of
'clientData' everywhere, just as in tkEvent.c.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tkUnixDraw.c | 13 | ||||
-rw-r--r-- | unix/tkUnixSend.c | 11 | ||||
-rw-r--r-- | unix/tkUnixWm.c | 15 |
3 files changed, 17 insertions, 22 deletions
diff --git a/unix/tkUnixDraw.c b/unix/tkUnixDraw.c index 25741cc..71904f3 100644 --- a/unix/tkUnixDraw.c +++ b/unix/tkUnixDraw.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixDraw.c,v 1.11 2007/12/13 15:28:50 dgp Exp $ + * RCS: @(#) $Id: tkUnixDraw.c,v 1.12 2010/05/11 12:12:49 nijtmans Exp $ */ #include "tkInt.h" @@ -34,7 +34,7 @@ typedef struct ScrollInfo { * Forward declarations for functions declared later in this file: */ -static Tk_RestrictAction ScrollRestrictProc(ClientData arg, XEvent *eventPtr); +static Tk_RestrictProc ScrollRestrictProc; /* *---------------------------------------------------------------------- @@ -65,8 +65,8 @@ TkScrollWindow( int dx, int dy, /* Distance rectangle should be moved. */ TkRegion damageRgn) /* Region to accumulate damage in. */ { - Tk_RestrictProc *oldProc; - ClientData oldArg, dummy; + Tk_RestrictProc *prevProc; + ClientData prevArg; ScrollInfo info; XCopyArea(Tk_Display(tkwin), Tk_WindowId(tkwin), Tk_WindowId(tkwin), gc, @@ -86,12 +86,11 @@ TkScrollWindow( */ TkpSync(info.display); - oldProc = Tk_RestrictEvents(ScrollRestrictProc, (ClientData) &info, - &oldArg); + prevProc = Tk_RestrictEvents(ScrollRestrictProc, &info, &prevArg); while (!info.done) { Tcl_ServiceEvent(TCL_WINDOW_EVENTS); } - Tk_RestrictEvents(oldProc, oldArg, &dummy); + Tk_RestrictEvents(prevProc, prevArg, &prevArg); if (XEmptyRegion((Region) damageRgn)) { return 0; diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index 108d109..515be11 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.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: tkUnixSend.c,v 1.26 2009/12/20 23:26:53 dkf Exp $ + * RCS: @(#) $Id: tkUnixSend.c,v 1.27 2010/05/11 12:12:50 nijtmans Exp $ */ #include "tkUnixInt.h" @@ -220,8 +220,7 @@ static NameRegistry * RegOpen(Tcl_Interp *interp, TkDisplay *dispPtr, int lock); static void SendEventProc(ClientData clientData, XEvent *eventPtr); static int SendInit(Tcl_Interp *interp, TkDisplay *dispPtr); -static Tk_RestrictAction SendRestrictProc(ClientData clientData, - XEvent *eventPtr); +static Tk_RestrictProc SendRestrictProc; static int ServerSecure(TkDisplay *dispPtr); static void UpdateCommWindow(TkDisplay *dispPtr); static int ValidateName(TkDisplay *dispPtr, const char *name, @@ -946,7 +945,7 @@ Tk_SendCmd( const char *destName; int result, c, async, i, firstArg; size_t length; - Tk_RestrictProc *prevRestrictProc; + Tk_RestrictProc *prevProc; ClientData prevArg; TkDisplay *dispPtr; Tcl_Time timeout; @@ -1138,7 +1137,7 @@ Tk_SendCmd( * other events in the application. */ - prevRestrictProc = Tk_RestrictEvents(SendRestrictProc, NULL, &prevArg); + prevProc = Tk_RestrictEvents(SendRestrictProc, NULL, &prevArg); Tcl_GetTime(&timeout); timeout.sec += 2; while (!pending.gotResponse) { @@ -1169,7 +1168,7 @@ Tk_SendCmd( } } } - (void) Tk_RestrictEvents(prevRestrictProc, prevArg, &prevArg); + Tk_RestrictEvents(prevProc, prevArg, &prevArg); /* * Unregister the information about the pending command and return the diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index 109afc5..c6f56aa 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixWm.c,v 1.81 2010/02/16 21:12:57 nijtmans Exp $ + * RCS: @(#) $Id: tkUnixWm.c,v 1.82 2010/05/11 12:12:49 nijtmans Exp $ */ #include "tkUnixInt.h" @@ -358,8 +358,7 @@ static void WaitForConfigureNotify(TkWindow *winPtr, static int WaitForEvent(Display *display, WmInfo *wmInfoPtr, int type, XEvent *eventPtr); static void WaitForMapNotify(TkWindow *winPtr, int mapped); -static Tk_RestrictAction WaitRestrictProc(ClientData clientData, - XEvent *eventPtr); +static Tk_RestrictProc WaitRestrictProc; static void WrapperEventProc(ClientData clientData, XEvent *eventPtr); static void WmWaitMapProc(ClientData clientData, @@ -5169,8 +5168,8 @@ WaitForEvent( XEvent *eventPtr) /* Place to store event. */ { WaitRestrictInfo info; - Tk_RestrictProc *oldRestrictProc; - ClientData oldRestrictData; + Tk_RestrictProc *prevProc; + ClientData prevArg; Tcl_Time timeout; /* @@ -5184,8 +5183,7 @@ WaitForEvent( info.type = type; info.eventPtr = eventPtr; info.foundEvent = 0; - oldRestrictProc = Tk_RestrictEvents(WaitRestrictProc, &info, - &oldRestrictData); + prevProc = Tk_RestrictEvents(WaitRestrictProc, &info, &prevArg); Tcl_GetTime(&timeout); timeout.sec += 2; @@ -5195,8 +5193,7 @@ WaitForEvent( break; } } - (void) Tk_RestrictEvents(oldRestrictProc, oldRestrictData, - &oldRestrictData); + Tk_RestrictEvents(prevProc, prevArg, &prevArg); if (info.foundEvent) { return TCL_OK; } |